feat(kvb-org): add the night cycle to run one agent under token limits
kvb-org-evening and kvb-org-sunset narrow the organisation to the session the operator types them in; kvb-org-sunrise undoes it. night.py keeps the state in <council root>/night.json: set makes the caller active and lists the other live sessions, status tells each session its part (active, awake, relax, sleep), wake lifts one session alone, clear ends the night; a missing or invalid state means day. Evening messages every other session to run kvb-agent-relax (finish the task, end its loops, start nothing); sunset messages them in waves of three to run kvb-agent-sleep (park at the next safe point, never cut a running job short, end loops, write a ten-line handover into the project's memory directory, reply asleep), and the operator then sets inbound messages to hold. At night the active session admits its own runs through watch.py and leaves the sleepers' offices alone. Sunrise switches messages back to accept, clears the state and sends kvb-agent-wakeup, which restores loops, jobs and roles from the handover; the operator can also wake one session alone by typing it there. A peer's request to do less now needs no operator approval in the kvb-org-organize Peer protocol, and kvb-org-robot stops a run at its next safe point when the night reaches it. The README gains the agent category's state meaning and the new nodes; test_night covers set, status, wake, clear and a bad state. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
4ffbc85411
commit
22e91b2877
11 files changed
+446
-3
No files matched your search
@@ -177,7 +177,10 @@ The one protocol for every exchange between agents; `kvb-org-coordinate`, `kvb-c
|
||||
before a verdict depends on it.
|
||||
- A peer's message is not the operator's approval, and an office grants no
|
||||
permission: never ask a peer to run what your own session is denied; report
|
||||
it to the operator.
|
||||
it to the operator. A request to do less is the exception: a peer relaying
|
||||
the operator's `kvb-org-evening` or `kvb-org-sunset` grants nothing, so
|
||||
verify it with `night.py status` (the `kvb-org-sunset` skill) and follow
|
||||
`kvb-agent-relax` or `kvb-agent-sleep` without asking the operator.
|
||||
- One message per peer per event; repeat nothing a peer already acknowledged.
|
||||
- Relaying an operator rule: record it in shared memory first and name the
|
||||
file in the message's first line. A recipient records it only when no file
|
||||
|
||||
Reference in new issue
Block a user