@aeondave/pi-persona 1.17.1 → 1.17.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENTS.md +103 -64
- package/CHANGELOG.md +310 -1
- package/README.md +37 -23
- package/agents/architect.md +21 -0
- package/agents/balthasar.md +17 -22
- package/agents/casper.md +17 -23
- package/agents/evidence-verifier.md +31 -16
- package/agents/melchior.md +17 -22
- package/agents/operator.md +15 -55
- package/agents/research.md +14 -48
- package/agents/reviewer.md +20 -39
- package/agents/scout.md +14 -15
- package/agents/verifier.md +15 -16
- package/docs/ARCHITECTURE.md +280 -92
- package/docs/COLLABORATION.md +110 -0
- package/docs/EXPERIENCE.md +52 -17
- package/docs/MONITORS.md +62 -3
- package/docs/README.md +12 -0
- package/docs/REFERENCE.md +139 -38
- package/docs/SPINE.md +2 -2
- package/docs/STRATEGIES.md +23 -8
- package/docs/TELEMETRY.md +1 -0
- package/flows/deep-review.flow.json +1 -1
- package/package.json +15 -8
- package/personas/audit.md +28 -17
- package/personas/dev.md +30 -32
- package/personas/elite.md +223 -221
- package/personas/judge.md +25 -19
- package/personas/magi.md +26 -29
- package/personas/planner.md +31 -24
- package/personas/researcher.md +25 -26
- package/personas/swarm.md +35 -25
- package/personas/verify.md +30 -19
- package/src/agents/agent.ts +26 -0
- package/src/bridge.ts +28 -10
- package/src/bus/broker/client.ts +119 -21
- package/src/bus/broker/host.ts +123 -8
- package/src/bus/broker/messages.ts +31 -4
- package/src/bus/contact.ts +113 -38
- package/src/bus/peers.ts +15 -0
- package/src/bus/result-reader.ts +88 -0
- package/src/core/brief.ts +436 -353
- package/src/core/capabilities.ts +1 -1
- package/src/core/config.ts +15 -10
- package/src/core/leg-thinking.ts +57 -0
- package/src/core/model-catalog.ts +171 -0
- package/src/core/model-tier.ts +89 -0
- package/src/core/models.ts +13 -4
- package/src/core/monitor-output.ts +85 -0
- package/src/core/monitor.ts +34 -2
- package/src/core/nudge.ts +176 -23
- package/src/core/ownership.ts +1 -2
- package/src/core/pi-compat.ts +5 -12
- package/src/core/seed.ts +99 -6
- package/src/core/session-runs.ts +87 -0
- package/src/core/settings.ts +1 -1
- package/src/core/timer.ts +34 -9
- package/src/core/types.ts +1 -1
- package/src/engine/adapter.ts +95 -27
- package/src/engine/async.ts +213 -155
- package/src/engine/child.ts +12 -4
- package/src/engine/host-module.ts +12 -0
- package/src/engine/inproc.ts +99 -53
- package/src/engine/result-grant.ts +62 -0
- package/src/engine/session-tools.ts +6 -0
- package/src/engine/stream.ts +10 -20
- package/src/engine/worktree.ts +17 -7
- package/src/exocom/collaboration-delivery.ts +29 -0
- package/src/exocom/collaboration.ts +148 -0
- package/src/exocom/envelope.ts +43 -4
- package/src/exocom/gate.ts +7 -2
- package/src/exocom/install.ts +47 -18
- package/src/exocom/ledger.ts +58 -8
- package/src/exocom/plane.ts +32 -1
- package/src/exocom/profile.ts +40 -0
- package/src/exocom/registry.ts +5 -0
- package/src/exocom/status.ts +11 -1
- package/src/exocom/write-guard.ts +7 -0
- package/src/extension/broker-host.ts +61 -9
- package/src/extension/engine.ts +54 -28
- package/src/extension/hooks.ts +952 -868
- package/src/extension/identity.ts +41 -75
- package/src/extension/persona-model-settings.ts +31 -13
- package/src/extension/results.ts +136 -0
- package/src/extension/shared.ts +32 -7
- package/src/extension.ts +2965 -2611
- package/src/loader.ts +11 -3
- package/src/monitor/archive.ts +235 -0
- package/src/monitor/session.ts +21 -1
- package/src/orchestration/flow-journal.ts +33 -6
- package/src/orchestration/flow-run.ts +160 -32
- package/src/orchestration/flow.ts +20 -2
- package/src/orchestration/reducers.ts +9 -5
- package/src/orchestration/render.ts +1 -1
- package/src/orchestration/roster.ts +71 -23
- package/src/orchestration/sdk.ts +61 -11
- package/src/orchestration/strategies/compete.ts +5 -1
- package/src/orchestration/strategies/council-rounds.ts +2 -0
- package/src/orchestration/strategies/critic-loop.ts +3 -0
- package/src/orchestration/strategies/debate.ts +2 -0
- package/src/orchestration/strategies/fanout.ts +3 -2
- package/src/orchestration/strategies/judge.ts +5 -1
- package/src/orchestration/strategies/magi.ts +40 -23
- package/src/orchestration/strategies/map.ts +13 -3
- package/src/orchestration/strategies/pair.ts +2 -0
- package/src/orchestration/strategies/pipeline.ts +2 -0
- package/src/orchestration/strategies/synthesize.ts +27 -7
- package/src/orchestration/strategy.ts +31 -0
- package/src/orchestration/types.ts +10 -0
- package/src/persona/model-participants.ts +20 -7
- package/src/persona/orchestrate.ts +2 -0
- package/src/persona/persona.ts +8 -4
- package/src/results/archive.ts +281 -0
- package/src/results/record.ts +166 -0
- package/src/results/retrieval.ts +142 -0
- package/src/results/types.ts +128 -0
- package/src/telemetry/contract.ts +1 -1
- package/src/tools/background-run.ts +151 -0
- package/src/tools/council.ts +108 -66
- package/src/tools/delegate-tool.ts +349 -283
- package/src/tools/delegate.ts +35 -216
- package/src/tools/exocom-collaboration-input.ts +168 -0
- package/src/tools/exocom-collaboration.ts +315 -0
- package/src/tools/exocom-profile.ts +102 -0
- package/src/tools/exocom-work.ts +18 -53
- package/src/tools/exocom.ts +35 -22
- package/src/tools/flow.ts +103 -30
- package/src/tools/intercom-tool.ts +202 -128
- package/src/tools/intercom.ts +1 -1
- package/src/tools/models.ts +34 -9
- package/src/tools/monitor.ts +58 -6
- package/src/tools/read-result.ts +52 -0
- package/src/tools/timer.ts +34 -15
- package/src/ui/agent-overlay.ts +65 -16
- package/src/ui/agent-tree.ts +127 -19
- package/src/ui/compact-widget.ts +25 -0
- package/src/ui/failure-summary.ts +55 -0
- package/src/ui/literal-tool-result.ts +24 -0
- package/src/ui/model-picker.ts +158 -81
- package/src/ui/orchestration-launch.ts +49 -0
- package/src/ui/persona-settings.ts +9 -3
- package/src/ui/presentation.ts +24 -0
- package/src/ui/report-body.ts +63 -0
- package/src/ui/session-cards.ts +366 -0
- package/src/ui/wake-rows.ts +262 -0
- package/teams.yaml +5 -1
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
# Supervised workers and independent colleagues
|
|
2
|
+
|
|
3
|
+
Use **Intercom** for workers launched by this session. Use **Exocom** for independent Pi sessions
|
|
4
|
+
that choose to collaborate. An Exocom peer is responsible to its own user; messages and shared tasks
|
|
5
|
+
do not make it a subordinate or grant it permission to act.
|
|
6
|
+
|
|
7
|
+
## Supervising a leg
|
|
8
|
+
|
|
9
|
+
Choose `thinking` independently of `model` in a delegate or roster entry. The runtime preserves an
|
|
10
|
+
explicit provider choice and reports requested and observed thinking separately. A compact tree
|
|
11
|
+
label is only a projection; it does not prove the provider's internal reasoning effort.
|
|
12
|
+
|
|
13
|
+
Use `intercom peek` to inspect a particular uncertainty, `steer` to queue an instruction, and `stop`
|
|
14
|
+
to stop work. A steering receipt proves acceptance, not that the worker acted on it. Interactive
|
|
15
|
+
completions wake the supervisor automatically; end the turn instead of polling or sleeping.
|
|
16
|
+
|
|
17
|
+
`intercom results` lists terminal reports. `intercom result { ref, offset, limit }` reads a bounded
|
|
18
|
+
page after reload. A `result:<UUID>` identifies stored evidence, not a live worker. The receipt says
|
|
19
|
+
whether storage is durable or memory-only and whether retention truncated the original report.
|
|
20
|
+
Paging to the end cannot restore text that exceeded the retention ceiling.
|
|
21
|
+
|
|
22
|
+
An unanswered decision remains unresolved. Timeout, cancellation, disconnection and headless delivery
|
|
23
|
+
never imply approval. Continue only independent work already authorized, or return a partial result.
|
|
24
|
+
|
|
25
|
+
## Sharing an objective without a leader
|
|
26
|
+
|
|
27
|
+
Start participating sessions with `--exocom` in the same workspace, or join an existing scope with
|
|
28
|
+
its code as described in [the user guide](EXPERIENCE.md#work-with-another-pi-through-exocom).
|
|
29
|
+
Use `exocom_list` to find stable qualified targets and self-reported profiles. A profile's capabilities
|
|
30
|
+
and availability are suggestions for choosing a colleague, not verified skills, reservations or tool
|
|
31
|
+
permissions. Missing availability is **unknown**. Profiles disappear when the Exocom plane stops.
|
|
32
|
+
|
|
33
|
+
1. Describe an independent slice with `exocom_task { action: "create", work_key, description,
|
|
34
|
+
write_set }`. An empty write set means read-only work. Creation is an invitation to collaborate,
|
|
35
|
+
not an assignment. Keep tasks within the users' authorized objective.
|
|
36
|
+
2. Inspect tasks using `exocom_task { action: "list", offset, limit, detail }`. Every task carries a
|
|
37
|
+
`task_id`, the immutable creation message ID, alongside its human-selected `work_key`. Before
|
|
38
|
+
taking a write task, use `exocom_task { action: "get", work_key, task_id }` to inspect the complete
|
|
39
|
+
bounded write set; list previews may shorten paths.
|
|
40
|
+
3. Optionally send `exocom_offer { work_key, task_id, target, expiresInMinutes }`. Omitting target
|
|
41
|
+
records a pool invitation for discovery; it does not broadcast a model wake. A targeted offer uses
|
|
42
|
+
the existing signed wake path. Default expiry is one hour, maximum 24 hours. It never creates a
|
|
43
|
+
response obligation; expiration is not acceptance or rejection.
|
|
44
|
+
4. A colleague voluntarily calls `exocom_task { action: "take", work_key, task_id }`. Pickup and the
|
|
45
|
+
declared file claim commit atomically; a second pickup or overlapping claim fails. A stale task ID
|
|
46
|
+
cannot act on a newly created task that reused the same key. Foreign-workspace members may take
|
|
47
|
+
read-only tasks, but cannot create or take write tasks in the joined scope.
|
|
48
|
+
5. The taker posts `progress` with a bounded `note`, then `finish` with `outcome: "done"` or
|
|
49
|
+
`"abandoned"` and a note, always supplying the same `work_key` and `task_id`. The latest progress
|
|
50
|
+
note is retained. Finishing releases the task's claim; it never merges or approves code.
|
|
51
|
+
|
|
52
|
+
Task division does not need leader election. Each task has one taker and its own claim. Peers choose
|
|
53
|
+
separate open tasks; availability and execution remain up to each session. A peer may propose a different split, decline by doing
|
|
54
|
+
nothing with an offer, or discuss a conflict in a postcard. If a decision belongs to a user, bring it
|
|
55
|
+
to that user; there is no automatic arbitration or authority transfer between peers.
|
|
56
|
+
|
|
57
|
+
Use `exocom_ask` only when a peer's answer must gate the next action. Unlike an offer, an ask constrains
|
|
58
|
+
its addressee until `exocom_answer` or `exocom_decline`. Identity metadata and explicit read actions
|
|
59
|
+
remain available. `exocom_wait` arms a nonblocking wake; it does not block the current tool call.
|
|
60
|
+
|
|
61
|
+
## Publishing evidence
|
|
62
|
+
|
|
63
|
+
`exocom_publish { action: "publish", work_key, task_id, title, excerpt }` copies an explicit excerpt
|
|
64
|
+
into the shared ledger. A title is at most 160 characters; an excerpt is at most 4,096 UTF-16 units
|
|
65
|
+
and 8,192 UTF-8 bytes. No tool follows paths or archive references in that text. To share a retained
|
|
66
|
+
leg report, read the needed page through Intercom, select the relevant excerpt, then publish that text.
|
|
67
|
+
|
|
68
|
+
Discover evidence with `exocom_publish { action: "read", work_key, offset, limit }`, then retrieve one
|
|
69
|
+
excerpt with `msg_id`. Publisher identity is resolved from the registry or retained session ID, never
|
|
70
|
+
the envelope's claimed display name. The excerpt remains fenced peer data. Verify its claims before
|
|
71
|
+
using it; a peer's `done` means that peer finished its task, not that checks passed or a reviewer approved.
|
|
72
|
+
|
|
73
|
+
## Failure, retention and controls
|
|
74
|
+
|
|
75
|
+
`exocom_status` and `/exocom` show claims, questions, shared task states and invitations. Task lists
|
|
76
|
+
default to 10 entries (maximum 20); detailed pages default to 5 and allow at most 5. Evidence-title pages are bounded.
|
|
77
|
+
Tool cards collapse long content and expand using Pi's normal keybinding; this never changes the
|
|
78
|
+
stored evidence or the text supplied to the model.
|
|
79
|
+
|
|
80
|
+
Loss of a task owner's registry lease or explicit release marks unfinished work **stale**. It never
|
|
81
|
+
silently reopens the task. Inspect the work and create a newly scoped task if reassignment is needed.
|
|
82
|
+
Clean shutdown releases both write and read-only task ownership. `exocom_release` intentionally
|
|
83
|
+
releases this session's current ownership and outbound asks on a work key.
|
|
84
|
+
|
|
85
|
+
The ledger retains at most 64 tasks, 64 offers and 64 evidence excerpts in a 128 KiB collaboration
|
|
86
|
+
budget, including lifecycle headroom. Terminal/stale tasks remain visible for the existing one-hour
|
|
87
|
+
result retention window; offers remain until one hour after expiry, evidence for one hour after
|
|
88
|
+
publication. Removing a task also removes its related offers/evidence. Live open/taken tasks are not
|
|
89
|
+
evicted to admit new work. Limits fail explicitly; there is no silent ownership loss or global archive
|
|
90
|
+
access. Transactions perform durable cleanup; reads project current expiry without starting workers.
|
|
91
|
+
|
|
92
|
+
## Contract boundaries
|
|
93
|
+
|
|
94
|
+
| Boundary | Required meaning | Enforcement |
|
|
95
|
+
|---|---|---|
|
|
96
|
+
| Intercom vs Exocom | Worker supervision vs independent peers | Existing capability gates, attribution and distinct transports |
|
|
97
|
+
| Delivery vs decision | Accepted/delivered is not answered, acted or approved | Explicit outcomes and unresolved guidance |
|
|
98
|
+
| Task identity | A reused key cannot retarget old intent | Creation `task_id` checked inside the ledger transaction and signed on frames |
|
|
99
|
+
| Pickup and ownership | One taker, claim admitted together, no overlap | Atomic ledger transaction; scope/capability admission inside its lock |
|
|
100
|
+
| Optional offer vs ask | Invitations never gate; targeted asks do | Separate records, tool actions and pending-ask gate |
|
|
101
|
+
| Evidence | Explicit bounded copied text, no cross-session archive access | Schema validation, ledger budgets, registry attribution and fences |
|
|
102
|
+
| Persistence | Versioned authoritative state must not become an empty ledger on error | Snapshot validation, retained-message idempotency and lifecycle budget reservation |
|
|
103
|
+
| Retention | Stale is visible, expiry never implies takeover | First-stale timestamp, bounded retention, fresh generation on recreation |
|
|
104
|
+
| Profiles and views | Self-report/projection cannot grant authority | Separate presence metadata and runtime-owned status |
|
|
105
|
+
| Flow references | Only compatible, successful archived phases can resume | Journal-version/status checks, scoped reads, explicit unavailable/truncated outcomes |
|
|
106
|
+
|
|
107
|
+
These are runtime contracts. The existing `outputContract` facility validates a worker's final JSON
|
|
108
|
+
report with scalar fields; a model-written `proof` is not a command receipt. It is not the right place
|
|
109
|
+
to encode task ownership or ledger transitions. Nested report schemas and host-executed acceptance
|
|
110
|
+
receipts remain separate product work; this collaboration protocol does not claim to implement them.
|
package/docs/EXPERIENCE.md
CHANGED
|
@@ -43,33 +43,47 @@ supervisor is free. Keep the session open, and cancel a watch when its purpose e
|
|
|
43
43
|
- **F9** opens the agent tree. Queued rows have not started their clocks. Live supervisor asks show
|
|
44
44
|
`waiting for supervisor`, not a stall; running rows otherwise show elapsed time and switch to
|
|
45
45
|
`⚠ stalled <duration>` after 90 seconds without progress — a suspicion, not proof of a deadlock.
|
|
46
|
-
Council parent clocks refresh on child engine events; that indicates liveness, not useful work.
|
|
46
|
+
Council parent clocks refresh on child engine events; that indicates liveness, not useful work. For the
|
|
47
|
+
stall card and `/peek`, "stalled" is stricter: 90 seconds with no assistant output, tokens, turns or
|
|
48
|
+
completed tool call, so a tool that only streams output (`npm run dev`, `tail -f`) is flagged too. It is
|
|
49
|
+
advice only: nothing is killed.
|
|
47
50
|
A parent is waiting only when all its live descendant branches are waiting. Enter opens a selectable worker's output; `s` sends a course correction;
|
|
48
51
|
`x` requests cancellation and appears only when the run can actually be stopped, marking the row
|
|
49
52
|
`stopping…` at once; a stop that can't be applied says so instead of doing nothing. Escape goes
|
|
50
53
|
back or closes the panel.
|
|
51
54
|
- **`/peek`** gives a compact progress view. A quiet worker is a reason to inspect its last
|
|
52
55
|
progress and current activity, not to launch a duplicate immediately.
|
|
56
|
+
- **`/flow <name> <task>`** runs a flow (`/flow` alone lists them with descriptions; a `gate: true`
|
|
57
|
+
phase pauses for your approval, showing its output and what runs next). `/orchestrate <task>` runs
|
|
58
|
+
the active persona's `orchestration:` block (bundled personas declare `council:` instead, used via the
|
|
59
|
+
`council` tool); both run inline and their result also reaches the
|
|
60
|
+
supervisor's next turn. In the F9 list, `X` stops every running leaf agent after a
|
|
61
|
+
second press that states how many.
|
|
53
62
|
- **Background results arrive automatically.** A supervisor can continue independent work while
|
|
54
63
|
they run. When only background workers remain, end the turn and let completion follow-ups return
|
|
55
|
-
their results;
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
64
|
+
their results; never sleep, poll, or arm a timer to wait for healthy workers (or monitors) - a
|
|
65
|
+
finished worker wakes the supervisor by itself. `intercom result { to: runId }` retrieves a settled
|
|
66
|
+
run. Interactive `delegate`, `council` and `flow` always run in the background (a receipt now, one
|
|
67
|
+
follow-up with the outcome; a flow checkpoint waits for you, not the supervisor; Esc does not abort
|
|
68
|
+
them: stop legs from F9 with `x`/`X`, or have the supervisor `intercom stop` the run); headless `pi -p` always blocks for the
|
|
69
|
+
turn and returns results inline, since nothing drains a follow-up after the process exits.
|
|
70
|
+
- **Answer a waiting worker promptly.** A coaching worker may need a decision from its
|
|
60
71
|
supervisor before it can finish. An unanswered question is actionable work.
|
|
61
72
|
- **Steering is a request.** Check the subsequent output to see whether the worker incorporated
|
|
62
73
|
it. In-process workers can receive guidance mid-run; child-engine workers (including MCP/worktree
|
|
63
74
|
runs) receive it as a queued follow-up. Neither promises to interrupt arbitrary tool work, and
|
|
64
|
-
steering
|
|
65
|
-
|
|
66
|
-
made are not undone.
|
|
75
|
+
steering is not a substitute for ending the turn. After requesting cancellation, the stopped report
|
|
76
|
+
arrives as a completion follow-up; changes already made are not undone.
|
|
67
77
|
|
|
68
78
|
Launch cards and targeted Intercom calls show the same worker alias as the live tree. A steering
|
|
69
79
|
receipt previews the message that was actually queued; expand it (`Ctrl+O` by default, or your
|
|
70
80
|
configured key) to read the full message and diagnostic run ID. Aliases are display names, not
|
|
71
81
|
addresses: tools still route by run ID, and duplicate aliases show a secondary ID to distinguish them.
|
|
72
82
|
Saved launch/control receipts keep their display names even after the runtime tracker is gone.
|
|
83
|
+
Council and flow launch receipts also retain each participant's model and requested effort, with
|
|
84
|
+
phase and auxiliary roles identified. Expand the card for the full panel. A pending model choice
|
|
85
|
+
is marked explicitly; launch selections are not proof of the effective model or effort after
|
|
86
|
+
setup, provider recovery or Pi's effort adjustment. Later settings changes do not rewrite history.
|
|
73
87
|
|
|
74
88
|
A truncated message includes a message id. The supervisor can retrieve its retained body with
|
|
75
89
|
`intercom { action: "message", messageId: "m1" }`. A worker's final report has a run id instead:
|
|
@@ -82,14 +96,35 @@ outcomes that make sense without remembering those names.
|
|
|
82
96
|
|
|
83
97
|
## Work with another Pi through Exocom
|
|
84
98
|
|
|
85
|
-
Use Intercom for this supervisor's workers and Exocom for independent Pi sessions.
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
99
|
+
Use Intercom for this supervisor's workers and Exocom for independent Pi sessions. Use
|
|
100
|
+
`exocom_list` or `/exocom` to find the intended session-qualified target before sending a postcard
|
|
101
|
+
or asking a question.
|
|
102
|
+
|
|
103
|
+
`exocom_task create` records a voluntary objective and declared write paths; it does not start
|
|
104
|
+
another Pi or require a peer to accept. The receipt gives a `task_id`; keep it with the
|
|
105
|
+
`work_key` when inviting, taking, reporting progress, finishing or publishing evidence. A work key
|
|
106
|
+
can be reused after retention, so the task id identifies the exact generation. The peer chooses
|
|
107
|
+
whether to take the task. Write-set pickup and its advisory claim happen atomically, but a claim is
|
|
108
|
+
not an OS file lock. A peer that joined from another workspace can take read-only tasks, not tasks
|
|
109
|
+
that claim paths in the selected workspace. Use `exocom_task get` to inspect the complete write set;
|
|
110
|
+
the paginated list is a summary.
|
|
111
|
+
|
|
112
|
+
Use `exocom_offer` for a non-blocking invitation that expires by itself; it creates no obligation
|
|
113
|
+
to answer. Use `exocom_ask` when a specific decision is needed and the recipient must answer or
|
|
114
|
+
decline. A pending ask temporarily permits settlement, `exocom_name`, `exocom_status`, explicit
|
|
115
|
+
read actions (task list/get, evidence read and profile get), and read-only filesystem tools.
|
|
116
|
+
Changing `exocom_profile` is not allowed while an ask is pending. Changing the name does not answer
|
|
117
|
+
the ask.
|
|
118
|
+
|
|
119
|
+
Share only a bounded excerpt through `exocom_publish`; it does not grant access to another session's
|
|
120
|
+
terminal-result archive. Peer text is untrusted and appears fenced with registry-resolved attribution.
|
|
121
|
+
Capability labels and availability in `exocom_profile` are self-reported metadata, not verified
|
|
122
|
+
skills or permissions. Exchange decisions and evidence when they affect the work; acknowledgement-only
|
|
123
|
+
conversations add noise. If a peer joined from another workspace, agree which workspace owns each
|
|
124
|
+
artifact.
|
|
125
|
+
|
|
126
|
+
See the [cross-session collaboration guide](./COLLABORATION.md) for command shapes, retention limits,
|
|
127
|
+
and detailed examples.
|
|
93
128
|
|
|
94
129
|
`exocom_status` (or `/exocom`) shows who owns what right now: your open claims, a peer's open
|
|
95
130
|
claims, and any asks waiting on either side. Claims are advisory, not a lock — if you write into a
|
package/docs/MONITORS.md
CHANGED
|
@@ -6,7 +6,8 @@ preserving the cached system prefix. During a long run it can call `timer` with
|
|
|
6
6
|
to refresh the clock. This is sampled wall-clock time, not a continuously updated model sense.
|
|
7
7
|
|
|
8
8
|
Use `timer arm` for a known time. Use `monitor arm` when a program can report the event you care
|
|
9
|
-
about. Sub-agent completions and Exocom messages already
|
|
9
|
+
about, never one whose only job is to elapse time. Sub-agent completions and Exocom messages already
|
|
10
|
+
wake the supervisor automatically, so neither tool should wait on them.
|
|
10
11
|
|
|
11
12
|
## Background programs
|
|
12
13
|
|
|
@@ -36,13 +37,70 @@ Adapters can use native file/system subscriptions, a program's streaming API, or
|
|
|
36
37
|
polling inside the program when no subscription exists. The model does not run a polling loop.
|
|
37
38
|
Print one short event per line to stdout; send diagnostic chatter to stderr. Flush output promptly
|
|
38
39
|
(for Python, use `-u` or `flush=True`). Repeated identical lines are ignored for that watch.
|
|
39
|
-
|
|
40
|
+
Monitor stdout and stderr are captured automatically within fixed limits. For a complete, unlimited
|
|
41
|
+
transcript, keep using the program's own log file; monitor capture is bounded diagnostic evidence.
|
|
40
42
|
|
|
41
43
|
The model can continue independent work while a monitor runs. Events wait while it is busy and
|
|
42
44
|
arrive together at an idle boundary. When only the event remains, it should end its turn. Natural
|
|
43
45
|
requests such as “let me know when this build finishes” are enough; tool parameters are for the
|
|
44
46
|
model or an integration, not something the user needs to manage.
|
|
45
47
|
|
|
48
|
+
## Visibility
|
|
49
|
+
|
|
50
|
+
An armed timer or active monitor shows as a row in the agent widget and the F9 / `/agents` overlay,
|
|
51
|
+
beside the sub-agents: `◉ <label> <id> · <mode> · <elapsed> · deadline in <remaining>` for a monitor
|
|
52
|
+
(`<id> · output · k/N events` as events arrive), `⏰ <label> <id> · fires in <remaining>` for a timer
|
|
53
|
+
(just `⏰ <id> fires in <remaining>` when the timer has no label).
|
|
54
|
+
The countdown replaces the stall clock, so a quiet watch is never `⚠ stalled`. While a process runs,
|
|
55
|
+
its latest useful stdout/stderr progress is displayed on its row, including partial lines and carriage-return
|
|
56
|
+
progress updates. Tails ingest every chunk immediately; their display is updated at the existing UI
|
|
57
|
+
frame cadence instead of rebuilding the full row for every chunk. Terminal events and cancellation
|
|
58
|
+
include the final tail immediately. This is a bounded, sanitized UI projection: it does not create a
|
|
59
|
+
model wake or consume an output-event allowance. `⏎` opens the command, cwd, times, bounded live output tails and last 40 event
|
|
60
|
+
lines (monitor), or the fire time and message (timer); `x` cancels that
|
|
61
|
+
one watch like `monitor cancel` / `timer cancel`. These are rows, not agents: no steer, `X` stop-all
|
|
62
|
+
skips them (`intercom stop { to: "all" }` likewise leaves them alone; cancel with `monitor cancel` /
|
|
63
|
+
`timer cancel` or `x`), and they never count in `N agents` or reach telemetry. A finished row settles
|
|
64
|
+
and leaves like an async run: its final ✓/✗/■ goes to the tree change stream (telemetry excluded), not
|
|
65
|
+
to the screen.
|
|
66
|
+
|
|
67
|
+
## Session-owned logs and results
|
|
68
|
+
|
|
69
|
+
`monitor { action: "result" }` lists retained captures, including completed jobs; add `id` to read one.
|
|
70
|
+
The default read shows a short tail; `full: true` reads the complete **retained** capture, not bytes
|
|
71
|
+
already discarded by the capture limit. This is retrieval, not a wait: do not poll it for completion.
|
|
72
|
+
`list` still lists only active watches. IDs are activation-unique so reload cannot confuse an old log
|
|
73
|
+
with a newly launched process.
|
|
74
|
+
|
|
75
|
+
The archive belongs to the **whole session tree**, not only the active conversation branch.
|
|
76
|
+
`result` can therefore list or retrieve a log from a sibling branch that is absent from the current
|
|
77
|
+
transcript. Branch navigation changes the transcript, not archive visibility or ownership. Both
|
|
78
|
+
retention budgets below are shared across all branches and remain shared after reload.
|
|
79
|
+
|
|
80
|
+
A terminal event or cancellation saves one bounded stdout/stderr snapshot and outcome as a custom
|
|
81
|
+
entry in the owning Pi session. An expandable operator-only log card exposes it without adding the
|
|
82
|
+
raw log to model context or triggering another turn. No per-chunk session entries or sidecar files
|
|
83
|
+
are written. Shutdown/reload stops processes and saves their available diagnostics; resume can read
|
|
84
|
+
the snapshots but never restarts the processes. A hard crash can lose a running job's not-yet-saved
|
|
85
|
+
capture. In a non-persistent session, logs remain in memory only.
|
|
86
|
+
|
|
87
|
+
Deleting the owning session file removes its stored logs with it. Reload, ordinary shutdown and
|
|
88
|
+
context compaction are not deletion. Forking/copying a session can copy its historical log entries;
|
|
89
|
+
each copy then owns its own data, with no shared external file to orphan or delete accidentally.
|
|
90
|
+
Backups and exports may also retain copies; deleting the original session is not secure erasure
|
|
91
|
+
of those copies. Treat captured stdout/stderr as session data: printed credentials, signed URLs
|
|
92
|
+
and other secrets can be stored in the JSONL. Sanitize/redact sensitive output in the producing
|
|
93
|
+
program before capture. Display sanitization is not secret redaction; requesting `result` returns
|
|
94
|
+
the selected retained text to the model, even when it originated on a sibling branch.
|
|
95
|
+
|
|
96
|
+
Each capture retains the last 16,384 UTF-16 code units of stdout and stderr independently, plus at
|
|
97
|
+
most 16,384 code units of status text. Live F9 tails retain 4,000 code units per stream. The journal
|
|
98
|
+
admits at most 64 terminal records and a conservative 2 MiB cumulative serialized-data budget per
|
|
99
|
+
session (JSON escaping, metadata and envelope allowance included). Historical entries, even unknown
|
|
100
|
+
formats, consume that budget; reload does not reset it. Once exhausted, new captures remain only in
|
|
101
|
+
the bounded runtime history, and `result` explicitly reports the storage limitation. Truncation and
|
|
102
|
+
persistence failures never claim a complete or durable log.
|
|
103
|
+
|
|
46
104
|
## Lifetime and limits
|
|
47
105
|
|
|
48
106
|
- `list` shows active watches; `cancel` with the returned `id` stops the owned process tree and
|
|
@@ -56,7 +114,8 @@ model or an integration, not something the user needs to manage.
|
|
|
56
114
|
to four per batch, and reports omitted older events if a busy model cannot keep up.
|
|
57
115
|
- Keep Pi open. Watches are in memory and stop on shutdown, reload, or session replacement;
|
|
58
116
|
they are not restored on resume. A headless `pi -p` invocation that exits after its answer is
|
|
59
|
-
not a persistent monitoring service
|
|
117
|
+
not a persistent monitoring service: an alarm or event wakes it only if it lands before the single
|
|
118
|
+
turn settles, and the arm result says so instead of inviting the model to end its turn.
|
|
60
119
|
|
|
61
120
|
## Permissions and architecture
|
|
62
121
|
|
package/docs/README.md
CHANGED
|
@@ -16,6 +16,8 @@ introduced a behavior. An `Unreleased` entry is not yet part of a published rele
|
|
|
16
16
|
- Vendor-neutral observer contract, privacy boundary, persistence, and consumer conformance.
|
|
17
17
|
- [`EXPERIENCE.md`](./EXPERIENCE.md)
|
|
18
18
|
- Choosing a persona, supervising background work, and collaborating through Exocom.
|
|
19
|
+
- [`COLLABORATION.md`](./COLLABORATION.md)
|
|
20
|
+
- Intercom supervision, voluntary peer tasks, invitations, evidence, retention and runtime contracts.
|
|
19
21
|
- [`MONITORS.md`](./MONITORS.md)
|
|
20
22
|
- Clock snapshots, timers, and background event sources that wake the supervisor.
|
|
21
23
|
- [`REFERENCE.md`](./REFERENCE.md)
|
|
@@ -28,6 +30,16 @@ introduced a behavior. An `Unreleased` entry is not yet part of a published rele
|
|
|
28
30
|
- **For behavior-layer changes:** consult `SPINE.md` and `src/core` / `src/persona/spine.ts` together.
|
|
29
31
|
- **For telemetry producers or consumers:** start with `TELEMETRY.md` and its conformance corpus.
|
|
30
32
|
|
|
33
|
+
## Research and verification records
|
|
34
|
+
|
|
35
|
+
- [`The pi-subagents comparison`](https://github.com/AeonDave/pi-persona/blob/main/docs/reviews/2026-10-24-pi-subagents.md) records the bounded source
|
|
36
|
+
study and links its evidence and source notes.
|
|
37
|
+
- [`Current-host cleanup and final requalification`](https://github.com/AeonDave/pi-persona/blob/main/docs/reviews/2026-10-25-current-host-cleanup.md)
|
|
38
|
+
is the latest qualification report and links the preceding implementation review for its distinct
|
|
39
|
+
behavioral and live-run evidence.
|
|
40
|
+
- [`ROADMAP.md`](https://github.com/AeonDave/pi-persona/blob/main/ROADMAP.md) tracks the remaining work, including the unqualified
|
|
41
|
+
[compaction proposal](https://github.com/AeonDave/pi-persona/blob/main/docs/plans/2026-10-20-compaction-evaluation-proposal.md).
|
|
42
|
+
|
|
31
43
|
## Documentation maintenance notes
|
|
32
44
|
|
|
33
45
|
When touching this folder:
|