Skip to main content

Module local

Module local 

Source
Expand description

Local tasks (lean-ctx-tasks) for a project that is not linked to a Cloud vault: where its store lives, which projects use it, the bus notices of every transition and how an agent reads them.

  • A project linked to a vault keeps using Cloud exactly as before (linked); every other project keeps its tasks on this machine in <data>/tasks/<project hash>/ (keyed like knowledge).
  • Every transition posts on the local bus (category status, sender SENDER, key task:<n>:<event>:<seq>:<i>), so the Queen and Cloud Desktop react at once. A result to check goes to every agent of the project except the one that did the work. A notice names the number only, never task text, so nothing in it reads as an instruction.

Structs§

LocalFilter
Which local tasks a listing shows.

Constants§

SENDER
Who posts the notices of local tasks on the bus.

Functions§

announce
Post the notices of changes on the project’s bus; whether the bus write went through. A notice that cannot be posted never undoes the transition (it is journaled already): when the bus write fails (a contended registry.lock past its wait, an unreadable registry) the store keeps it due and it is posted on the next access (Cloud task #39; before, it was dropped here with only a warning).
board
The board of root as of now; claims that ran out are given back first, and every transition the bus has not taken yet is announced.
evidence
Evidence as a caller names it, checked as Cloud checks it (a file_anchor is digested in root as it is now).
for_reader
task with mine set for the reader agent.
linked
Whether root is linked to a Cloud vault on this machine (its tasks are Cloud’s then). A Cloud state that cannot be read is an error, never “unlinked”: a linked project’s writes must not go local silently. Only a vault map that does not exist yet means no project is linked.
list
The project’s local tasks, by number (LeanCTX · Share brings them into a vault on link).
mark_shared
Record that local task number was brought into vault (ws/vault) as its task vault_number; a second mark is refused (already_shared).
notices
The posts change asks for. local are the project’s active agents. The text is plain language for people; what may be done next travels in the notice’s TaskAction (agents are shown the exact call from it).
post_notices
announce into registry (no lock of its own).
render_change
The answer of a write, in the words of the Cloud answers.
render_list
The listing as an agent reads it; task text fenced as foreign data.
render_task
One local task with its updates, result and transitions.
select
The tasks filter selects, high priority first, then by number, for the reader agent.
store_dir
The directory of root’s local tasks.
summary
A listing row of task for the reader agent (the newest transition is its update time).
write
Change root’s tasks and announce every transition of the write (and any an earlier failed bus write left behind).