samagotchi 0.187.0 → 0.188.0
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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +55 -1
- data/bin/chi +2 -0
- data/docs/architecture.md +8 -4
- data/docs/bundles.md +124 -120
- data/docs/cli.md +25 -5
- data/docs/configuration.md +4 -4
- data/docs/context.md +18 -162
- data/docs/guardrails.md +3 -1
- data/docs/hooks.md +2 -1
- data/docs/internals/attached-context.md +19 -37
- data/docs/internals/bridge.md +1 -0
- data/docs/internals/engine.md +2 -2
- data/docs/internals/llm-context-forget.md +5 -6
- data/docs/internals/objectives.md +1 -0
- data/docs/internals/pages.md +6 -3
- data/docs/internals/peers.md +149 -0
- data/docs/internals/remote-sessions.md +7 -4
- data/docs/internals/web-frontend.md +61 -37
- data/docs/internals/web-push.md +1 -1
- data/docs/memory.md +1 -1
- data/docs/pages.md +2 -1
- data/docs/peers.md +141 -0
- data/docs/plugins.md +52 -27
- data/docs/sessions.md +8 -4
- data/docs/sub-agent.md +5 -5
- data/lib/samagotchi/bridge.rb +3 -3
- data/lib/samagotchi/bundle_command/api_calls.rb +2 -1
- data/lib/samagotchi/bundle_command/check.rb +1 -1
- data/lib/samagotchi/bundles/claude-peer/manifest.yml +11 -18
- data/lib/samagotchi/bundles/claude-peer/plugin.rb +22 -16
- data/lib/samagotchi/bundles/claude-peer/scripts/chi-peer-SKILL.md +48 -39
- data/lib/samagotchi/bundles/claude-peer/scripts/pair +15 -73
- data/lib/samagotchi/bundles/claude-peer/skill_claude_peer.md +16 -16
- data/lib/samagotchi/bundles/codex-peer/manifest.yml +11 -15
- data/lib/samagotchi/bundles/codex-peer/plugin.rb +35 -24
- data/lib/samagotchi/bundles/codex-peer/scripts/chi-peer-SKILL.md +51 -40
- data/lib/samagotchi/bundles/codex-peer/scripts/pair +18 -54
- data/lib/samagotchi/bundles/codex-peer/skill_codex_peer.md +16 -16
- data/lib/samagotchi/bundles/dev/manifest.yml +2 -2
- data/lib/samagotchi/bundles/skills/manifest.yml +2 -2
- data/lib/samagotchi/bundles/skills/plugin.rb +14 -8
- data/lib/samagotchi/bundles/system/manifest.yml +1 -1
- data/lib/samagotchi/client_id.rb +15 -1
- data/lib/samagotchi/config.rb +8 -7
- data/lib/samagotchi/context_absorber.rb +23 -277
- data/lib/samagotchi/context_sources.rb +17 -69
- data/lib/samagotchi/engine/messages.rb +12 -1
- data/lib/samagotchi/engine/plugins.rb +1 -1
- data/lib/samagotchi/engine.rb +7 -6
- data/lib/samagotchi/engine_peers.rb +0 -3
- data/lib/samagotchi/guardrail_wiring.rb +2 -0
- data/lib/samagotchi/guardrails/chi_dirs.rb +4 -3
- data/lib/samagotchi/guardrails/parent_approvals.rb +6 -5
- data/lib/samagotchi/guardrails/protected_paths.rb +6 -3
- data/lib/samagotchi/inline_widgets.rb +11 -3
- data/lib/samagotchi/log_line.rb +1 -1
- data/lib/samagotchi/note_move.rb +3 -1
- data/lib/samagotchi/page_command.rb +18 -9
- data/lib/samagotchi/pages/builder.rb +7 -8
- data/lib/samagotchi/pages/launch.rb +8 -2
- data/lib/samagotchi/pages/store.rb +11 -2
- data/lib/samagotchi/peer_command.rb +192 -0
- data/lib/samagotchi/peer_continue.rb +99 -0
- data/lib/samagotchi/peer_exchanges.rb +3 -3
- data/lib/samagotchi/peer_mailbox.rb +360 -0
- data/lib/samagotchi/peer_note.rb +208 -0
- data/lib/samagotchi/peer_receipts.rb +247 -0
- data/lib/samagotchi/peer_registry.rb +44 -0
- data/lib/samagotchi/peer_roster.rb +79 -0
- data/lib/samagotchi/peer_say.rb +168 -0
- data/lib/samagotchi/plugin/api.rb +29 -21
- data/lib/samagotchi/plugin/context.rb +7 -0
- data/lib/samagotchi/plugin/loader.rb +3 -3
- data/lib/samagotchi/plugin/peer.rb +175 -64
- data/lib/samagotchi/plugin/peers.rb +70 -0
- data/lib/samagotchi/run_options.rb +2 -1
- data/lib/samagotchi/schedule_command.rb +10 -3
- data/lib/samagotchi/schedule_display.rb +32 -0
- data/lib/samagotchi/session_access/contract.rb +18 -1
- data/lib/samagotchi/session_access/local.rb +132 -14
- data/lib/samagotchi/session_access/remote.rb +4 -2
- data/lib/samagotchi/session_access/remote_peers.rb +75 -0
- data/lib/samagotchi/session_continue.rb +12 -0
- data/lib/samagotchi/session_inbox_delivery.rb +5 -2
- data/lib/samagotchi/session_manager/delivery.rb +5 -3
- data/lib/samagotchi/session_manager/removal.rb +2 -0
- data/lib/samagotchi/session_manager/spawn.rb +2 -1
- data/lib/samagotchi/session_manager.rb +1 -0
- data/lib/samagotchi/session_stores.rb +17 -0
- data/lib/samagotchi/steer.rb +1 -1
- data/lib/samagotchi/system_prompt.rb +1 -1
- data/lib/samagotchi/terminal_ui/attached_loop.rb +1 -1
- data/lib/samagotchi/terminal_ui/formatting.rb +4 -1
- data/lib/samagotchi/testing/boundary.rb +4 -13
- data/lib/samagotchi/testing/bundle.rb +40 -5
- data/lib/samagotchi/testing/install.rb +4 -4
- data/lib/samagotchi/testing/recording_api.rb +2 -1
- data/lib/samagotchi/tools/context_read.rb +0 -14
- data/lib/samagotchi/tools/list_schedules.rb +8 -3
- data/lib/samagotchi/version.rb +1 -1
- data/lib/samagotchi/web/app.rb +2 -13
- data/lib/samagotchi/web/message_display.rb +4 -2
- data/lib/samagotchi/web/peer_routes.rb +133 -0
- data/lib/samagotchi/web/public/app.js +11 -11
- data/lib/samagotchi/web/public/bubbles.js +2 -2
- data/lib/samagotchi/web/public/cards_place.js +20 -1
- data/lib/samagotchi/web/public/context_chips.js +45 -46
- data/lib/samagotchi/web/public/history_reveal.js +4 -1
- data/lib/samagotchi/web/public/history_shape.js +3 -2
- data/lib/samagotchi/web/public/index.html +13 -0
- data/lib/samagotchi/web/public/notify.js +1 -1
- data/lib/samagotchi/web/public/page_view.js +2 -1
- data/lib/samagotchi/web/public/peer_chip.js +60 -74
- data/lib/samagotchi/web/public/peer_data.js +13 -11
- data/lib/samagotchi/web/public/peer_links.js +12 -7
- data/lib/samagotchi/web/public/peer_mailbox_api.js +20 -0
- data/lib/samagotchi/web/public/peer_note.js +7 -3
- data/lib/samagotchi/web/public/peer_text.js +4 -4
- data/lib/samagotchi/web/public/quiet_notes.js +199 -0
- data/lib/samagotchi/web/public/revise_stack.js +4 -3
- data/lib/samagotchi/web/public/session_view.js +2 -2
- data/lib/samagotchi/web/public/stream_handlers.js +3 -2
- data/lib/samagotchi/web/public/turn_block.js +7 -3
- data/lib/samagotchi/web/public/turn_events.js +6 -0
- data/lib/samagotchi/web/push/attention.rb +3 -2
- data/lib/samagotchi/web/session_access_routes.rb +3 -20
- data/lib/samagotchi/worker/leave.rb +3 -0
- data/lib/samagotchi/worker/mail.rb +73 -0
- data/lib/samagotchi/worker/startup.rb +3 -0
- data/lib/samagotchi/worker/wake_turns.rb +20 -5
- data/lib/samagotchi/worker.rb +12 -6
- data/lib/samagotchi/worker_inbound/mail.rb +214 -0
- data/lib/samagotchi/worker_inbound.rb +43 -46
- data/lib/samagotchi/worker_wakes.rb +26 -21
- metadata +19 -2
- data/lib/samagotchi/peer_sources.rb +0 -58
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
# Peers: the mailbox, the receipts, the mail path
|
|
2
|
+
|
|
3
|
+
The user side is [peers.md](../peers.md). A peer's messages are their own layer, not attached context: a
|
|
4
|
+
context source is "a source with one latest text you can read"; a peer is communication with rules (every
|
|
5
|
+
message kept, in order, each with a receipt). Nothing here is shared with `ContextSources` but its text limits
|
|
6
|
+
and `RE_RE` (a send ref).
|
|
7
|
+
|
|
8
|
+
## The two stores
|
|
9
|
+
|
|
10
|
+
**The peer's side, `<state>/samagotchi/mailbox/<session id>/<peer>/`** (`PeerMailbox`): the only folder a
|
|
11
|
+
sandboxed peer writes, beside the sessions folder and apart from it.
|
|
12
|
+
|
|
13
|
+
- `link.json`: `PeerLink(peer, address, paired_at, from)`; `address` nil: answers only. `chi peer pair` writes it
|
|
14
|
+
whole; `unpair` removes only it.
|
|
15
|
+
- `in/<serial>.json`: `PeerMessage(serial, text, summary, wake, re, at)`, one file per message, written whole
|
|
16
|
+
(`AtomicFile`; its temp name never matches `FILE_RE`).
|
|
17
|
+
- `lock`: the say's, while it picks a serial and writes (`flock`, opened `NOFOLLOW`).
|
|
18
|
+
|
|
19
|
+
No head file: the next serial is `max(the newest file, taken) + 1`, and trim (by the say) removes only files at
|
|
20
|
+
or below `taken`, keeping the newest `TAKEN_KEPT` (50) of them, so a number is never reused and an untaken
|
|
21
|
+
message is never deleted. A forged file with a high serial pushes the next real one above it instead of hiding
|
|
22
|
+
it. No gap limit: a writer of the folder can plant a `SERIAL_MAX` file and use up a peer's serials; the folder's
|
|
23
|
+
writers are trusted that far (they can delete its files too). Every file is checked before it is trusted
|
|
24
|
+
(`PeerMessage.from_file`): its name a serial, a regular file (`lstat`, `NOFOLLOW`), its size under
|
|
25
|
+
`FILE_MAX_BYTES` before it is read, the serial in it its name's, the field types, the summary already one line.
|
|
26
|
+
A bad file is a `BadFile` with its reason. A directory link is never followed: a linked peer folder isn't
|
|
27
|
+
listed, `serials` reads a linked folder as empty and `post` refuses one.
|
|
28
|
+
|
|
29
|
+
**chi's side, `sessions/<id>/peer_receipts.json`** (`PeerReceipts`), written only by the session's worker, on
|
|
30
|
+
its loop thread: `{peers: {<peer>: {box, taken, receipts}}}`, `Receipt(serial, state, reason, turn, outcome,
|
|
31
|
+
at)`. `box` is 6 random hex the worker mints (and writes at once) with a peer's first message; `taken` is the
|
|
32
|
+
newest serial it took. The CLI and chi web only read it.
|
|
33
|
+
|
|
34
|
+
`SessionStores` rows: `link.json`, `in/`, `lock` (removal `:peer_mailbox`: a delete removes the session's
|
|
35
|
+
mailbox folder) and `peer_receipts.json` (`:session_files`); a continue leaves all of them with the previous
|
|
36
|
+
link (below).
|
|
37
|
+
|
|
38
|
+
## Who is a peer
|
|
39
|
+
|
|
40
|
+
- **The worker:** `PeerRegistry`, filled by `chi.peer NAME` (`Plugin::Api#peer`, staged until the plugin's
|
|
41
|
+
register returns). It alone decides that a mailbox message becomes a peer's note and may wake. A name no
|
|
42
|
+
loaded bundle declared gets a `refused` receipt (`undeclared`) and `taken` doesn't move, so it is delivered
|
|
43
|
+
once the bundle loads.
|
|
44
|
+
- **The CLI and chi web:** "paired" means `link.json` exists; they decide no behaviour.
|
|
45
|
+
- **The label** is `PeerMailbox.label(name)`, the name capitalised, in every process.
|
|
46
|
+
|
|
47
|
+
`chi.peer_source` is a method that raises "chi.peer_source is gone: upgrade this bundle (chi bundle install
|
|
48
|
+
<name> --force)", so an installed older peer bundle fails to load (`Plugin::Loader` records the failure) and chi
|
|
49
|
+
starts without it.
|
|
50
|
+
|
|
51
|
+
## The say
|
|
52
|
+
|
|
53
|
+
`chi peer say` (`PeerCommand`) → `SessionAccess::Local#peer_say` (`RemotePeers#peer_say` through `--remote`,
|
|
54
|
+
which posts `…/peers/NAME/say` with its `wait`: chi web waits, and its read timeout is the wait plus 30 s).
|
|
55
|
+
|
|
56
|
+
1. Refused before anything is written: no session, continued (with the next id), no `link.json`, a live worker
|
|
57
|
+
without the `peer_mail` Bridge feature (`WorkerLink.live_features`, read only), `UNTAKEN_MAX` (200) untaken
|
|
58
|
+
messages or noted receipts.
|
|
59
|
+
2. `SessionInbox.deliver(:peer)` (`WakePolicy::ROWS[:peer]`, the push row; `START_EVENTS[:peer] =
|
|
60
|
+
:peer_woke_session`): a session gone or being deleted refuses before its block writes. Inside the block:
|
|
61
|
+
the lock, the serial, the write, the trim. The block's "asks for a worker" is the message's own `wake`: no
|
|
62
|
+
`context.wake`, no 10-minute window.
|
|
63
|
+
3. The line (`PeerSay`): what the say saw at once (a running turn, a stopped or archived session, a one-turn run,
|
|
64
|
+
a failed start), else a receipt read every 250 ms within the wait, then the peer's other held receipts.
|
|
65
|
+
|
|
66
|
+
`chi peer pair` makes the old-worker and continued checks too, with the same sentences (`PeerPaired`).
|
|
67
|
+
|
|
68
|
+
## The worker's mail path
|
|
69
|
+
|
|
70
|
+
`WorkerInbound#absorb_mail(hold:)` (`worker_inbound/mail.rb`), a fourth inbound kind, from `Worker#pass` (before
|
|
71
|
+
`absorb_context`), `run_prompt`'s before-turn absorb and `Worker#left`; never in a one-shot run. `hold:` names
|
|
72
|
+
why a wake can't run: `:queued`, `:exit`, `:leaving`, `:before_turn` (nil: it may).
|
|
73
|
+
|
|
74
|
+
- **Change detection:** names and mtimes of each `<peer>/in`, each pass.
|
|
75
|
+
- **Which folders:** every `<peer>/in`, whatever its `link.json` (the link gates the say only).
|
|
76
|
+
- **Order:** by `at`, then peer name, then serial. One note each: id `peer-<name>-<box>-<serial>` (the box keeps
|
|
77
|
+
a fork's seed notes from hiding its own third message), source `peer <Label>`, the `peer` hash (`PeerNote.payload`
|
|
78
|
+
plus `box`), its text by `PeerNote.body` (a wake note up to the tool output cap, a plain one up to
|
|
79
|
+
`PeerNote::HELD_CHARS`; over it, `PeerNote.message_text` points at `<peer>_read(serial: N)`).
|
|
80
|
+
- **Wake:** the batch wakes when a message in it asked, `peer.turns` is above 0 (else `held: off`), the caller
|
|
81
|
+
gave no `hold:` and `WorkerWakes#wake_hold(peer: !agreed)` is nil. The turn starts at the batch's last note;
|
|
82
|
+
its wake line, its origin (`peer:<name>`, `ClientId::PEER_PREFIX`) and the count come from the newest message
|
|
83
|
+
that asked; an agreeing one (`VERDICT OK`) counts toward `session.max_wakes` only. In the start grace nothing
|
|
84
|
+
is taken and `mail_wake_waiting?` joins `idle_wait`'s check.
|
|
85
|
+
- **Order of writes:** the notes, the session save, then the receipts (`PeerReceipts#absorbed`). A crash between
|
|
86
|
+
the save and the receipts: the next pass finds the notes already there (ids dedupe); a turn-start note with no
|
|
87
|
+
receipt is put back plain, wakes pause and its receipt is `held: paused`; no second wake turn. A batch with a
|
|
88
|
+
note already in the conversation doesn't wake.
|
|
89
|
+
- **An unreadable file** (a transient read error) raises and the batch retries on the next pass; a bad file's
|
|
90
|
+
contents are refused as `invalid` and move `taken`.
|
|
91
|
+
- **The wake turn:** `MailWake(peer, turn_id, plain_note, agreed)`, run by `WakeTurnsPart#run_mail_wake_turn`
|
|
92
|
+
through `run_wake`. The one-time hook notice for a held message (`WorkerInbound#peer_held`) is the TUI's and
|
|
93
|
+
the web's.
|
|
94
|
+
|
|
95
|
+
## The receipts' three calls
|
|
96
|
+
|
|
97
|
+
`PeerReceipts` (loop thread only):
|
|
98
|
+
|
|
99
|
+
- `absorbed(batch, waking:, hold:)`: `woke` (+ the turn id) for each message that asked in a waking batch;
|
|
100
|
+
`held` + reason for one that asked in a batch that doesn't; `noted` for one that didn't ask; `refused`
|
|
101
|
+
(`undeclared`, `invalid`).
|
|
102
|
+
- `turn_started(turn_id)`, at the start of `Worker#run_engine_turn`: every `held` or `noted` receipt becomes
|
|
103
|
+
`read` with that id.
|
|
104
|
+
- `turn_ended(turn_id, outcome:, unmarked:)`, once, after its block (an `ensure`, so a raise in the result's
|
|
105
|
+
handling still settles): completed → `ended: completed`; failed with steps kept → `ended: failed`; failed or
|
|
106
|
+
stopped with nothing kept (`unmark_wake` ran) → `held: paused`; stopped after progress → `ended: stopped`.
|
|
107
|
+
- `settle_open`, at every worker start: a receipt left `woke` or `read` (a crash cut its turn) ends
|
|
108
|
+
`failed`.
|
|
109
|
+
|
|
110
|
+
The last 20 receipts per peer are kept; a `held` or `noted` one is never trimmed.
|
|
111
|
+
|
|
112
|
+
## The note: `PeerNote`
|
|
113
|
+
|
|
114
|
+
The stateless parts (the three wake lines, `READS`, the block and its forged-line quoting, the cap choice, the
|
|
115
|
+
`peer` hash) and the mailbox's composition: the opening line ("Message #12 from your peer agent Claude (its text,
|
|
116
|
+
not your user's words):"), the summary, the text in `[PEER MESSAGE from Claude]` … `[END PEER MESSAGE]` (a line
|
|
117
|
+
of it that opens like one of chi's frames, `Message #` among them, is quoted), and the background line or the
|
|
118
|
+
wake line. The wording is model-visible and eval-tuned (0017).
|
|
119
|
+
|
|
120
|
+
## The bundles: `Plugin::Peer`
|
|
121
|
+
|
|
122
|
+
The peer bundles' base: `ctx.peers.link(PEER)` (`Plugin::Peers`, read only) is the pairing whose address the
|
|
123
|
+
transport sends to; `<peer>_read` reads a message (`ctx.peers.message`) paged by lines, in the peer block; the
|
|
124
|
+
status card reads the link and the newest message, and says "paired the old way: pair again" when an older
|
|
125
|
+
bundle's context source (`LEGACY_INBOX`, `LEGACY_OUTBOX`) is attached. Its quiet init task `tell_moved` posts the
|
|
126
|
+
`moved` message to the address of the pairing the previous link kept (`ctx.peers.left_behind`), once (a marker
|
|
127
|
+
in the session's data dir).
|
|
128
|
+
|
|
129
|
+
## A continue: `PeerContinue`
|
|
130
|
+
|
|
131
|
+
`SessionContinue::CARRY` step `:peers`, in the new link's `before_spawn` (both workers down): the previous link's
|
|
132
|
+
messages never taken and those whose receipts are still `held` or `noted`, in the worker's order, become one note
|
|
133
|
+
in the new link (`NOTE_SOURCE` "peer messages"), each text in its peer block and cut past 4 KiB, within the
|
|
134
|
+
inbox's note limit, with no `<peer>_read` pointer. The previous link's mailbox, `taken` and receipts are only read,
|
|
135
|
+
so there is no undo. The pairing stays; the peer pairs again (`tell_moved`). Moving the pairing with the chain
|
|
136
|
+
(and the peer's prompt-cache cost of re-pairing) is a later discussion.
|
|
137
|
+
|
|
138
|
+
## chi web
|
|
139
|
+
|
|
140
|
+
`Web::PeerRoutes` (all `:owner`, a participant gets 403):
|
|
141
|
+
|
|
142
|
+
- `GET …/peers` → `{peers: [{name, label, paired_at, from, address, can_send, messages, exchanges}]}`: one row per
|
|
143
|
+
mailbox folder (`PeerRoster`), its newest 20 messages with their receipts and `words`
|
|
144
|
+
(`PeerRoster.state_words`), and `exchanges` (`PeerExchanges.joined` over chi's sends and the messages as answer
|
|
145
|
+
lines). No text.
|
|
146
|
+
- `GET …/peers/NAME/messages/SERIAL` (the text and its receipt); `DELETE …/peers/NAME` (Unpair); `POST
|
|
147
|
+
…/peers/NAME/pair` and `…/say` (the remote's; the say waits here).
|
|
148
|
+
|
|
149
|
+
The page's peer chip is fed by `GET …/peers` alone ([web-frontend.md](web-frontend.md), The peer exchange).
|
|
@@ -532,7 +532,10 @@ the closing line reads `stopped` as `unreachable`, the words it always had.
|
|
|
532
532
|
"could not send", yet ran: sending it again runs it twice (no idempotency key yet).
|
|
533
533
|
|
|
534
534
|
- Through a remote the pair scripts (`bundles/{claude,codex}-peer/scripts/pair`) detect `CHI_REMOTE` or `--remote` in
|
|
535
|
-
`CHI` the way Dispatch does, and
|
|
536
|
-
thread, so chi's replies reach Claude only when relayed
|
|
537
|
-
|
|
538
|
-
|
|
535
|
+
`CHI` the way Dispatch does, and pair with no address (answers only): chi there can't reach this machine's Claude
|
|
536
|
+
socket or Codex thread, so chi's replies reach Claude only when relayed (claude-peer's `pair-remote` forwards the
|
|
537
|
+
socket over SSH instead). `chi peer say` through a remote posts `…/peers/NAME/say` with its `wait`: chi web waits
|
|
538
|
+
for the receipt and returns the line (`RemotePeers`, a read timeout of the wait plus 30 s); an older chi web's 404
|
|
539
|
+
is "chi web on <remote> is older: it has no chi peer".
|
|
540
|
+
- The peer skills (`skill_claude_peer`, `skill_codex_peer`) have no remote recipe. The `/claude` card says "paired for
|
|
541
|
+
answers only" for an answers-only pairing.
|
|
@@ -35,9 +35,9 @@ the next release (its baseline refresh) for the same reason, marked as kept for
|
|
|
35
35
|
sheet still keeps `isChained` and `format.js deleteConfirmText` that way; and `ws_peek.js`'s `PEEK_WIDTH`, which 0.183.0's
|
|
36
36
|
`working_set_view.js` imports though the view is 520 wide always now: `ws_part_peek_mixed_cache.test.js` loads this view
|
|
37
37
|
with 0.183.0's `ws_reader.js` and `ws_peek.js`, and 0.183.0's view with this `ws_reader.js`, from
|
|
38
|
-
`spec/web/public/fixtures/v0.183.0/`). `answer_fold.js`, `details_motion.js`,
|
|
38
|
+
`spec/web/public/fixtures/v0.183.0/`). `answer_fold.js`, `quiet_notes.js`, `details_motion.js`,
|
|
39
39
|
`turn_range.js`, `history_reveal.js`, `latest.js`, `session_payload.js`, `method_api.js`, `session_store.js`,
|
|
40
|
-
`session_fields.js`, `feature_gates.js`, `revise_stack.js`, `revise_switch.js`, `shell_command.js`, `stale_params.js`, `popover_modal.js`, `more_sheet.js`, `delete_sheet.js` (The delete sheet, below), `removal_sheet_model.js` (its words: rows, button words, the archive model, the toast; DOM-free), `running_tasks.js` (a delete's or archive's tasks: their line and the toast's suffix; DOM-free, so `stop_sheet.js` and the delete sheet share its cut), `hash_intent.js` (what the hash asks for: session, all, start or keep), `views.js` (the views by hash, in one place: All sessions at `#/sessions` opened, closed and left; a page at `#/p/NAME`, read before the session intent, `hashIntent` calling it `keep`: `body.page-view`, Back to where it was opened from, the session's hash not written while it is open, a session picked leaving it; the session's `#/s/<id>` written; a hash change applied and selected; app.js makes it after the lists and hands its functions lazily to what it made before), the page's modules `page_route.js`, `page_view.js`, `page_model.js`, `page_blocks.js`, `page_table.js`, `page_table_model.js`, `pages_group.js` and `page_links.js` (a page in chi web: [pages.md](pages.md#chi-web)), `worker_features.js`, `version_notices.js`, `owner_claim.js`, `owner_verify.js`, `composer_mode.js`, `strip_hidden.js`, `block_open.js`, `text_roots.js`, `block_source.js`, `block_frame.js`, `block_host.js`, `block_watch.js`, `card_stamps.js`, `recap_stamp.js` (a saved recap's place by its `opening_id` stamp, else its count), `inline_widgets.js`, `widget_walk.js`, `widget_picks.js`, `history_shape.js` (the history's shape, live against a reload: the e2e reload checks and the opt-in reload check share its normalizer and its `ACCEPTED` allowlist), `turn_pieces.js` (a finished turn's one order and its answer rule: the live hand-off's `handOffOrder` and `turnEnded`, and a reload's `turnHistoryNodes`), `reload_check.js` (the opt-in `web.reload_check`: after the stage's hand-off, the turn against a reload of it, the counts posted; the history without its cards and questions, and those as data: the page's `card_registry.js` against one seeded from the read, this turn's entries, a capped read's missing keys skipped), `turn_drawing.js` (a finished turn's drawing, `turn_drawings` in the show: its fold into steps and its end kind; `turn_block.js` draws it), `stage_stall.js` (the stage's quiet signal), `stage_quiet_clock.js`, `stage_dom.js`, `stage_answer.js`, `stage_pager.js`, `stage_cloud.js`, `stage_handoff.js`, `stage_place.js`, `stage_probe.js` (the stage's features: below, The stage's modules), `card_kinds.js` (what a card waits as, from its data: the kind, approval and folded-row text the stage's registry takes; the node's read is its cross-check), `card_registry.js` (the open session's cards as data, an observer of the stream's card events and a read's seed: Where state lives), `history_end.js` (the stage's one move of pieces to the history's end), `stage_opened.js` (a running turn opened in the history while a card waits: the lead-in bubble, the moves, the end fold), `stage_asking.js` (the stage's docked card and its fold: the docking and lead-in rules, the opening, a waiting card's own toggle, the folded row's text per kind, the fold's choice, reveal and the docked card's fold; `stage_view.js` wires it), `stage_waiting.js` (the stage's waiting cards as data, keyed by `data-qid` / `data-card-id`: kind, docked, approval, the stage's order, the shown card and its pager, the docked card's fold, kept for this tab in `chi_asking_fold:<session>`; `front`, `count`, `shown`, `blocking`), `stage_cards.js` (the cards that wait in the stage: `PENDING`, `ASKS`, `waitsInStage`, read by `stage_model.js placeKind`), `resync_reach.js` (a re-read that can't reach chi web keeps the drawn history; the status chip says retrying / offline, outside a turn), `session_sync.js` (the open session's sync: `select`, `resync` and its retries, the stream's life; the stream handle and the re-read bookkeeping are its own), `session_view.js` (the open session's view: `renderSessionView` draws a read, `forgetSession` resets the page for another session, `readTurnEnd`, `endTurnView`; app.js makes both right after the cards, each reaching the other and the later views through getters), `participant_main.js`, `participant_bar.js`, `viewer_self.js`, `participant_history.js` (a participant's ↑/↓ list), `stage_owner_wait.js`, `participant_revise.js` (a participant's page: The participant's page, below), `ws_timeline.js`, `ws_cards.js`, `ws_peek.js`, `ws_part_peek.js`, `ws_reader.js`, `ws_way_in.js`, `ws_item_sig.js`, `ws_markdown.js` (what chi has of a working-set item: below, The working set's reader), `session_prefs.js` (a session's own view settings, `<key>:<session>`: Storage keys, below), `ws_sections.js` (the working set's head view: its sections from the prompt's parts, [working-set.md](working-set.md), The head view), `ws_order.js` (the working-set list's order: last touched first, held while it is open, [working-set.md](working-set.md), The list's order), `ctx_tokens.js` (the context's token count beside its %: `ctxTokens`, below), `stage_view_memory.js` (what was opened of a running turn, per session, in memory: Where state lives), `peer_data.js`, `peer_exchange.js`, `peer_note.js`, `peer_links.js`, `peer_text.js` (a peer's send and answer in the conversation: The peer exchange, below), `peer_chip.js` (a paired peer's one chip in the session bar: The peer exchange), `picture_viewer.js` (the picture viewer, `#lightbox`: below, Picture viewer), `pan_zoom.js` (its maths, pure), `diagram_wiring.js` (`wireDiagrams`: the block host with the viewer as its `openPicture`, the viewer closed on a theme change, the regions' layer given to the viewer; the viewer itself stays made in app.js, which `createSessionView` reads first), `block_regions.js` (a renderer's regions cleaned, pure: [block-renderers.md](block-renderers.md#regions)), `region_hit.js` (their hit test, the arrow keys' nearest region and the reveal under the card, pure), `picture_regions.js` (the regions' layer over the viewer: below, Picture viewer), `no_contact_fill.js` (a text field that isn't a contact form: autocomplete off and a name with no contact word, against iOS Safari's AutoFill Contact bar; a template's fields carry the same attributes, and its spec checks the page's markup for them) and the `objectives_*.js` modules are new modules for that reason. The last four `block_*` draw fenced blocks (`block_watch.js` finds and watches them, `block_host.js` is its frame drawer for a bundle's renderers): [block-renderers.md](block-renderers.md). `inline_widgets.js` is its core drawer for `chi-ui` blocks, drawing `widget_walk.js`'s and `widget_picks.js`'s widgets in a shadow root styled by `widgets.css`: [inline-widgets.md](inline-widgets.md).
|
|
40
|
+
`session_fields.js`, `feature_gates.js`, `revise_stack.js`, `revise_switch.js`, `shell_command.js`, `stale_params.js`, `popover_modal.js`, `more_sheet.js`, `delete_sheet.js` (The delete sheet, below), `removal_sheet_model.js` (its words: rows, button words, the archive model, the toast; DOM-free), `running_tasks.js` (a delete's or archive's tasks: their line and the toast's suffix; DOM-free, so `stop_sheet.js` and the delete sheet share its cut), `hash_intent.js` (what the hash asks for: session, all, start or keep), `views.js` (the views by hash, in one place: All sessions at `#/sessions` opened, closed and left; a page at `#/p/NAME`, read before the session intent, `hashIntent` calling it `keep`: `body.page-view`, Back to where it was opened from, the session's hash not written while it is open, a session picked leaving it; the session's `#/s/<id>` written; a hash change applied and selected; app.js makes it after the lists and hands its functions lazily to what it made before), the page's modules `page_route.js`, `page_view.js`, `page_model.js`, `page_blocks.js`, `page_table.js`, `page_table_model.js`, `pages_group.js` and `page_links.js` (a page in chi web: [pages.md](pages.md#chi-web)), `worker_features.js`, `version_notices.js`, `owner_claim.js`, `owner_verify.js`, `composer_mode.js`, `strip_hidden.js`, `block_open.js`, `text_roots.js`, `block_source.js`, `block_frame.js`, `block_host.js`, `block_watch.js`, `card_stamps.js`, `recap_stamp.js` (a saved recap's place by its `opening_id` stamp, else its count), `inline_widgets.js`, `widget_walk.js`, `widget_picks.js`, `history_shape.js` (the history's shape, live against a reload: the e2e reload checks and the opt-in reload check share its normalizer and its `ACCEPTED` allowlist), `turn_pieces.js` (a finished turn's one order and its answer rule: the live hand-off's `handOffOrder` and `turnEnded`, and a reload's `turnHistoryNodes`), `reload_check.js` (the opt-in `web.reload_check`: after the stage's hand-off, the turn against a reload of it, the counts posted; the history without its cards and questions, and those as data: the page's `card_registry.js` against one seeded from the read, this turn's entries, a capped read's missing keys skipped), `turn_drawing.js` (a finished turn's drawing, `turn_drawings` in the show: its fold into steps and its end kind; `turn_block.js` draws it), `stage_stall.js` (the stage's quiet signal), `stage_quiet_clock.js`, `stage_dom.js`, `stage_answer.js`, `stage_pager.js`, `stage_cloud.js`, `stage_handoff.js`, `stage_place.js`, `stage_probe.js` (the stage's features: below, The stage's modules), `card_kinds.js` (what a card waits as, from its data: the kind, approval and folded-row text the stage's registry takes; the node's read is its cross-check), `card_registry.js` (the open session's cards as data, an observer of the stream's card events and a read's seed: Where state lives), `history_end.js` (the stage's one move of pieces to the history's end), `stage_opened.js` (a running turn opened in the history while a card waits: the lead-in bubble, the moves, the end fold), `stage_asking.js` (the stage's docked card and its fold: the docking and lead-in rules, the opening, a waiting card's own toggle, the folded row's text per kind, the fold's choice, reveal and the docked card's fold; `stage_view.js` wires it), `stage_waiting.js` (the stage's waiting cards as data, keyed by `data-qid` / `data-card-id`: kind, docked, approval, the stage's order, the shown card and its pager, the docked card's fold, kept for this tab in `chi_asking_fold:<session>`; `front`, `count`, `shown`, `blocking`), `stage_cards.js` (the cards that wait in the stage: `PENDING`, `ASKS`, `waitsInStage`, read by `stage_model.js placeKind`), `resync_reach.js` (a re-read that can't reach chi web keeps the drawn history; the status chip says retrying / offline, outside a turn), `session_sync.js` (the open session's sync: `select`, `resync` and its retries, the stream's life; the stream handle and the re-read bookkeeping are its own), `session_view.js` (the open session's view: `renderSessionView` draws a read, `forgetSession` resets the page for another session, `readTurnEnd`, `endTurnView`; app.js makes both right after the cards, each reaching the other and the later views through getters), `participant_main.js`, `participant_bar.js`, `viewer_self.js`, `participant_history.js` (a participant's ↑/↓ list), `stage_owner_wait.js`, `participant_revise.js` (a participant's page: The participant's page, below), `ws_timeline.js`, `ws_cards.js`, `ws_peek.js`, `ws_part_peek.js`, `ws_reader.js`, `ws_way_in.js`, `ws_item_sig.js`, `ws_markdown.js` (what chi has of a working-set item: below, The working set's reader), `session_prefs.js` (a session's own view settings, `<key>:<session>`: Storage keys, below), `ws_sections.js` (the working set's head view: its sections from the prompt's parts, [working-set.md](working-set.md), The head view), `ws_order.js` (the working-set list's order: last touched first, held while it is open, [working-set.md](working-set.md), The list's order), `ctx_tokens.js` (the context's token count beside its %: `ctxTokens`, below), `stage_view_memory.js` (what was opened of a running turn, per session, in memory: Where state lives), `peer_data.js`, `peer_exchange.js`, `peer_note.js`, `peer_links.js`, `peer_text.js` (a peer's send and answer in the conversation: The peer exchange, below), `peer_chip.js` (a paired peer's one chip in the session bar: The peer exchange), `peer_mailbox_api.js` (the chip's message and Unpair calls), `picture_viewer.js` (the picture viewer, `#lightbox`: below, Picture viewer), `pan_zoom.js` (its maths, pure), `diagram_wiring.js` (`wireDiagrams`: the block host with the viewer as its `openPicture`, the viewer closed on a theme change, the regions' layer given to the viewer; the viewer itself stays made in app.js, which `createSessionView` reads first), `block_regions.js` (a renderer's regions cleaned, pure: [block-renderers.md](block-renderers.md#regions)), `region_hit.js` (their hit test, the arrow keys' nearest region and the reveal under the card, pure), `picture_regions.js` (the regions' layer over the viewer: below, Picture viewer), `no_contact_fill.js` (a text field that isn't a contact form: autocomplete off and a name with no contact word, against iOS Safari's AutoFill Contact bar; a template's fields carry the same attributes, and its spec checks the page's markup for them) and the `objectives_*.js` modules are new modules for that reason. The last four `block_*` draw fenced blocks (`block_watch.js` finds and watches them, `block_host.js` is its frame drawer for a bundle's renderers): [block-renderers.md](block-renderers.md). `inline_widgets.js` is its core drawer for `chi-ui` blocks, drawing `widget_walk.js`'s and `widget_picks.js`'s widgets in a shadow root styled by `widgets.css`: [inline-widgets.md](inline-widgets.md).
|
|
41
41
|
|
|
42
42
|
## One page, every viewer
|
|
43
43
|
|
|
@@ -60,13 +60,28 @@ their viewer (The viewer, below), their show and stream are filtered (`Web::Part
|
|
|
60
60
|
| **`store.current`** (`session_state.js`: `emptySessionState` / `sessionStateFrom`; per field: `session_fields.js FIELDS`) | the open session's fields, about 40 (info bar, chips, verdicts, timing, worker, stream cursor) | `store.update` / `setStatus` from app.js, `stream_handlers.js`, `session_sync.js`, `session_view.js`, `send_turn.js` (`firstPreview`, `owner`), `session_actions.js` (`status`), `owner_verify.js` (`verdicts`, `verifyFresh`); `forgetSession`'s `replaceCurrent` (`session_view.js`). Two writers in place, on purpose (D8 in `FIELDS`): live_timing.js's `activeTurn`, verdict_fresh.js's running list | the store runs the field's redraws (`FIELDS[key].redraws`) |
|
|
61
61
|
| **`store.sessions`** (the hub's projection) | every card | `store.update({sessions})` from app.js: `openSessionEvents` (`applySessionEvent`), `refresh` (the list fallback), `addCreatedSession`, `views.js applyView` (re-sorted), `replaceSelectedCard` (`setLiveStatus` through `setStatus`, `readTurnEnd`, `setUsedMemories`), the stream's close (`withoutWorker`); `session_actions.js` (`setSessions`) | the store: `lists` and `infoBar`. **Always a new array**; an entry is replaced, never changed in place. `followSelectedSession` copies the open one's owner and worker (`fieldsFromCard`) and, when not streaming, its status (`setStatus(…, "hub")`) into `store.current` |
|
|
62
62
|
| **Factory closures**: the `create*` factories (popovers, panels, views) | each component's own state: open-for, busy, error, its own fetched list | the factory | an `onChange` hook back into app.js, or a getter the factory reads at draw time |
|
|
63
|
-
| **The history DOM** | the conversation as drawn (a running turn's reason bubble, `.bubble.said`, is live only: see A turn opened in the history): which turn a bubble belongs to (`data-turn-id`, `data-answer-turn`), what opens a turn (`TURN_PROMPT`, `bubbles.js`: a prompt or a wake's note, the same turns `Steer.turn_opening?` counts for a card's `turns_since`), an opening's id for a card's and the saved recap's stamp (`data-turn-id` on a prompt, `data-opening-id` on a wake's note or `/continue no`'s reason line; `card_stamps.js` places a snapshot's card after the stamped opening, `recap_stamp.js` the saved recap after the last turn it covers, each by its count (`turns_since`) only without one), kept command bubbles, which texts were shown, unnamed badges, folded answers and long prompts (`.folded`), Revise stamps (`data-revises` on a prompt; a Verify turn's `data-verify`) and the stacks' folded versions (`.stack-hidden`, `.stack-stub.open`); the switcher's version on view is `revise_stack.js`'s own (a copy `.stack-view` before the top answer, the top `.stack-swapped`; never stored) | `bubbles.js`, `cards_place.js`, `question_cards.js`, `turn_block.js`/`stage_view.js`, `answer_fold.js`, `revise_stack.js`, `stream_handlers.js` (a live `turn_completed`'s `revises` and `verify` onto its prompt) | read back as state: `turn_range.js turnElements` (one walker for a turn's elements), `keptCommandBubbles`, `seedSeenFromDom`, `nameUnnamedBadges`/`nameVerdictCards`, `answer_fold.js` and `revise_stack.js` (their observers decorate every path that fills `#history`; the stacks are `stacks()` of the stamps, read again on each change, never a store field), `history_reveal.js revealInHistory` (the one way a jump unfolds what hides its target) |
|
|
63
|
+
| **The history DOM** | the conversation as drawn (a running turn's reason bubble, `.bubble.said`, is live only: see A turn opened in the history): which turn a bubble belongs to (`data-turn-id`, `data-answer-turn`), what opens a turn (`TURN_PROMPT`, `bubbles.js`: a prompt or a wake's note, the same turns `Steer.turn_opening?` counts for a card's `turns_since`), an opening's id for a card's and the saved recap's stamp (`data-turn-id` on a prompt, `data-opening-id` on a wake's note or `/continue no`'s reason line; `card_stamps.js` places a snapshot's card after the stamped opening, `recap_stamp.js` the saved recap after the last turn it covers, each by its count (`turns_since`) only without one), kept command bubbles, which texts were shown, unnamed badges, folded answers and long prompts (`.folded`), the notes rows over a stretch of background items (`.quiet-notes`, open by its `open` class, the items `.quiet-hidden`; never stored), Revise stamps (`data-revises` on a prompt; a Verify turn's `data-verify`) and the stacks' folded versions (`.stack-hidden`, `.stack-stub.open`); the switcher's version on view is `revise_stack.js`'s own (a copy `.stack-view` before the top answer, the top `.stack-swapped`; never stored) | `bubbles.js`, `cards_place.js`, `question_cards.js`, `turn_block.js`/`stage_view.js`, `answer_fold.js`, `quiet_notes.js`, `revise_stack.js`, `stream_handlers.js` (a live `turn_completed`'s `revises` and `verify` onto its prompt) | read back as state: `turn_range.js turnElements` (one walker for a turn's elements), `keptCommandBubbles`, `seedSeenFromDom`, `nameUnnamedBadges`/`nameVerdictCards`, `answer_fold.js`, `quiet_notes.js` and `revise_stack.js` (their observers decorate every path that fills `#history`; the stacks are `stacks()` of the stamps, read again on each change, never a store field), `history_reveal.js revealInHistory` (the one way a jump unfolds what hides its target) |
|
|
64
64
|
| **A drawn turn** (`turn_drawings` of the full read) | every finished turn, as live drew it: `turnGroups` groups by the stamps only, a turn's stamped items (`drawn: <turn_id>`) one group, and `turnHistoryNodes` draws it by feeding its drawing's events to a live turn block offscreen (`turn_block.js drawnTurnNodes`: the block's own handlers, as the stage's), the stage's extras (a reminder, merged lines, a card that waited when it arrived, an answered question) in the order live left them for the history (`turn_settle.js settleOrder`, pure: from the drawing's `part_settled` and question events, whether the turn was opened, and whether a question had a lead-in) and the end as live, then the answer, the merged lines and the steps' texts from their saved items (markdown, refs). Each of its top-level elements carries `data-drawn`: `cards_place.js` leaves that turn's in-turn CardStore entries (`of_turn`) to it, and a kept reminder bubble of that turn (`data-turn-id`) stays out after a resync. chi web sends a drawing for every finished turn (one made from its messages where live wrote none): `drawnGroup` pairs the record the end names (`end.record_id`, by place for a turn saved before turn ids), else by the turn's id, and the answer's `data-answer-turn` is the end's own `turn_id` only (a made-up id, `m…` or `…~N`, keys none: no Revise). Nothing is rebuilt from messages: an item that comes unstamped is a `plain` group drawn as a plain row of its text (its prompt or answer bubble, no steps), the running turn's as expected (`runningTurnId`, the show's `current_turn`: it has no line yet), any other a miss, marked `data-undrawn`, logged once per render (`console.warn`) and counted by the reload check (`undrawn`), never a throw; a drawing with no parts (a minimal line) draws its prompt, answer and end | chi web (the show) | `renderHistory`, the reload check's render |
|
|
65
65
|
| **The cards as data** (`card_registry.js`; app.js `cardRegistry`) | every question, continue offer and plugin card of the open session, keyed as `stage_waiting.js` keys them (`q:<id>`, `c:<id>`, `continue`): its kind and folded text (`card_kinds.js`), status (pending, answered, cancelled; resolved or dropped for the continue offer; asks or shown for a plugin card), `of_turn`, `opening_id`, step, `relayed_to` | `observeCards` around the stream handlers (outside the participant wrap: the page's handler first, then `apply`), so a read's replay feeds it too; `session_view.js renderSessionView` seeds it from the read right before the replay (`seed`: CardStore's listing, the pending question, the continue offer; it replaces), `forgetSession` resets it. Idempotent: a merge per key, a final status never back to pending, the first `of_turn`/`opening_id`/step kept, so seed then replay is what live holds. A question still pending at its turn's end is cancelled (the page cancels the card, no event comes) | an observer: nothing on the page draws from it; its one reader is the opt-in reload check (`reload_check.js`: this turn's entries against a registry seeded from a fresh read). `stage_cuts_parity.test.js` checks it against the stage's waiting cards at each cut, `card_registry.test.js` the events against each cut's seed and replay |
|
|
66
66
|
| **What was opened of a running turn** (`stage_view_memory.js`, in `session_view.js`) | per session, for this tab: the cloud open, the steps opened in it, the working set's reader on an item; a Map of at most 20 sessions, nothing stored or sent (the peek isn't kept: it closes with its popover) | `session_view.js leaveSession`, from `session_sync.js select` and from `forgetSession` itself for the session it drew last (so the start page, `clearSelection`, keeps it too) before its reset (`captureView`); dropped by `endTurnView` | `renderSessionView`, once the read is drawn: put back (`applyView`) only when the read's running turn (`current_turn.turn_id`) is the one saved; taken either way |
|
|
67
67
|
| **localStorage** (`storage.js` `readStored`/`writeStored`, guarded) | per-browser choices only; a session's view settings per session (`session_prefs.js`) | the module that owns the choice | read at start, a session's view settings again when its view is drawn (see Storage keys) |
|
|
68
68
|
| **SSE** | see Streams | the server | events go into the DOM directly (a participant's through `participant_main.js wrapHandlers` first) |
|
|
69
69
|
|
|
70
|
+
**The notes rows** (`quiet_notes.js`): what nobody says in the conversation folds, so a phone shows the prompt and
|
|
71
|
+
the answer, not the background under them. A stretch is a run of `#history` children that match `QUIET` (a
|
|
72
|
+
`.bubble.hook-notice` but the empty-answer line, a `.bubble.note` that is neither a wake's opening `.turn-start` nor a
|
|
73
|
+
`.peer-answer`, so objectives lines too, and a `.bubble.steer-row`); the `.turn-timing` line passes through it, and
|
|
74
|
+
anything else ends it (a prompt, an answer, a card, a peer's answer, a time divider, another fold's row). Each stretch
|
|
75
|
+
gets one `<button class="quiet-notes">` before its first item, closed, and its items get `.quiet-hidden`. The row is a
|
|
76
|
+
sibling tied to its first item (WeakMaps, as `answer_fold.js`'s), not a wrapper: the bubbles stay direct children of
|
|
77
|
+
`#history`, where every walker (`turn_range.js`, `cards_place.js`, the stage's hand-off, the reload check) and the
|
|
78
|
+
other observers expect them; a row something was placed after goes back before its item and keeps its open class.
|
|
79
|
+
A between-turn notice is placed after its turn, not below the next divider (`cards_place.js afterTurnEnd`). Its one
|
|
80
|
+
observer watches `#history`'s own children, and a settle writes only what changed (the copy, answer-fold,
|
|
81
|
+
Revise and objectives observers see class and subtree writes). `revise_stack.js historyTurns`, `history_shape.js
|
|
82
|
+
childItems` and `bubbles.js showRecap`'s walk skip the rows, and `history_reveal.js revealInHistory` opens one over a
|
|
83
|
+
jump's target.
|
|
84
|
+
|
|
70
85
|
The objectives' strip keeps the list in its own closure (`objectives_strip.js`, seeded by `renderSessionView`, reset by
|
|
71
86
|
`forgetSession`, updated by `objectives_updated`): [objectives.md](objectives.md#the-page).
|
|
72
87
|
|
|
@@ -836,39 +851,45 @@ rendered slice (no `.read-line` in it).
|
|
|
836
851
|
## The peer exchange
|
|
837
852
|
|
|
838
853
|
A send to a paired peer (claude-peer's `claude_send`, codex-peer's) and the peer's answer, linked in the owner's
|
|
839
|
-
conversation ([bundles.md](../bundles.md#the-claude-peer-bundle), In the web
|
|
840
|
-
/api/sessions/:id/peers` (owner only, read from the session's files:
|
|
841
|
-
|
|
842
|
-
`
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
854
|
+
conversation ([bundles.md](../bundles.md#the-claude-peer-bundle), In the web; the store: [peers.md](peers.md)). The
|
|
855
|
+
data is the server's: `GET /api/sessions/:id/peers` (owner only, read from the session's files without a worker: the
|
|
856
|
+
mailbox, the receipts and `PeerExchanges.joined` over `peer_exchanges.jsonl`) gives each peer with a mailbox folder,
|
|
857
|
+
its pairing (`paired_at`, `address`, `can_send`), its newest messages with their receipts and the receipt's words
|
|
858
|
+
(`words`: "held · peer turns"), and its last exchanges, newest first, with their `state` (waiting, answered,
|
|
859
|
+
none_expected, failed) and an answer's `serial` and `verdict`; a send row carries the send's id as its `peer` ref, a
|
|
860
|
+
peer's message note its `peer` hash (`peer`, `label`, `re`, `summary`, `serial`, `verdict`, `agreed`, `box` for a
|
|
861
|
+
mailbox message, and `inline` when the note's content holds the peer's text). The page joins nothing; the one parse is
|
|
862
|
+
`peer_text.js`'s cut of an `inline` note's text block.
|
|
846
863
|
|
|
847
864
|
- `peer_data.js` (state): `listPeers` (an older chi web's 404 is an empty list) and `createPeers`, the page's one model
|
|
848
865
|
of the open session's peers (app.js `peers`, made only with the `context` capability, so a participant's page has
|
|
849
866
|
none): its own closure holds the last read for the open session (`createLatest`: an older read, or one for a
|
|
850
|
-
session left, is dropped); `exchange(id)` (the newest of an id: each send has its own, but an older chi's resend shared one), `answer(name, serial, re)`. It
|
|
851
|
-
|
|
867
|
+
session left, is dropped); `exchange(id)` (the newest of an id: each send has its own, but an older chi's resend shared one), `answer(name, serial, re)`, `peers()`. It
|
|
868
|
+
is the peer chip's only feed, so the page reads it for every session it opens (`hasPeer: () => true`).
|
|
852
869
|
Read again on: the session drawn (`session_view.js renderSessionView`, through `peerLinks.drawn()`), a
|
|
853
870
|
`context_added` with `peer`, a `tool_call_completed` with a peer ref, `command_ran` (a `/claude validate`), window
|
|
854
871
|
focus, and a 60 s tick while an exchange waits; a `turn_completed` redraws without a fetch (`touch()`) (one interval, cleared with the session: `forgetSession` →
|
|
855
872
|
`peerLinks.reset()`). The peer chips read the same model: its `onChange` also calls `contextChips.peersChanged()`, and
|
|
856
|
-
the chips' own load (a session opened
|
|
857
|
-
|
|
873
|
+
the chips' own load (a session opened) calls `peers.refresh({ reuse: true })`. A pairing made from the peer's side
|
|
874
|
+
sends the page nothing: the chip appears at the next read (a focus, a peer note, a send).
|
|
875
|
+
- `peer_mailbox_api.js` (state): `getPeerMessage(id, name, serial)` (a message's text: View latest answer, a
|
|
876
|
+
mailbox note's "Read the full answer") and `unpairPeer(id, name)` (`DELETE …/peers/NAME`).
|
|
858
877
|
- `peer_exchange.js` (pure): `peerRef(row)`, `stateText` (long and the phone's short words, both drawn; CSS picks),
|
|
859
878
|
`pillTemplate` (a button with ↓ once answered, a span otherwise; its title the row's output text).
|
|
860
879
|
- `peer_note.js`: `peerNoteTemplate`, which `turn_html.js noteBubbleTemplate` draws a note with `peer` as. It keeps
|
|
861
880
|
what an opening note has (`bubble note`, `turn-start`, `data-opening-id`, the time title), so `TURN_PROMPT`,
|
|
862
881
|
`card_stamps.js`, `stage_handoff.js OPENING`, `reload_check.js` and `revise_stack.js` (its `.note-text` is the
|
|
863
|
-
summary) read it as any wake note.
|
|
882
|
+
summary) read it as any wake note. A live `context_added` wake note carries `turn_start`/`turn_id`, so live and reload
|
|
883
|
+
agree on its opening. With `peer.inline` the peer's text goes in `.peer-text` under the summary (an
|
|
864
884
|
element of its own, not a `data-peer-slot`, its source in `data-peer-md`): already as markdown when a history
|
|
865
|
-
read sent the note's `peer_html` (`MessageDisplay#peer_text_html`, `
|
|
885
|
+
read sent the note's `peer_html` (`MessageDisplay#peer_text_html`, `PeerNote.text_of`, rendered and
|
|
866
886
|
sanitized as an answer is), else as plain text (a live `context_added`, an older server), the "what chi told the
|
|
867
887
|
agent" fold shows the content without the block, and the bubble carries `data-peer-inline`. Without it (an older
|
|
868
|
-
session,
|
|
888
|
+
session, a message over the cap) the bubble draws as before. A mailbox message's note (its hash has `box`) carries
|
|
889
|
+
`data-peer-box` and no source; an older context answer's keeps its `<peer>-outbox` source as `data-peer-source`.
|
|
869
890
|
- `peer_text.js` (pure): `peerBlock(content)` cuts the text out between the first `[PEER MESSAGE from …]` line and the
|
|
870
|
-
last `[END PEER MESSAGE]` line and undoes the
|
|
871
|
-
(`PEER_FORGED_OPENINGS` and `PEER_FORGED_LINES`, the Ruby `
|
|
891
|
+
last `[END PEER MESSAGE]` line and undoes the `PeerNote.block` mark on forged frame lines
|
|
892
|
+
(`PEER_FORGED_OPENINGS` and `PEER_FORGED_LINES`, the Ruby `PeerNote::FORGED_OPENINGS` and `FORGED_LINES`, and the same line breaks and leads
|
|
872
893
|
as `Steer::FORGED_BREAKS` / `FORGED_LEAD`: `peer_text.test.js` keeps the lists alike and undoes the Ruby specs' cases);
|
|
873
894
|
null without a block.
|
|
874
895
|
- **The slot idiom.** Finished rows are never drawn again and a reload makes them anew, so what arrives later is
|
|
@@ -881,30 +902,33 @@ parse is `peer_text.js`'s cut of an `inline` note's text block.
|
|
|
881
902
|
sent" when its row failed, or once its turn has ended when its peer's list is under the server's cap of 20
|
|
882
903
|
(`EXCHANGES_CAP`) or holds a send drawn before it; else it is unknown and gets no pill, as are the sends of a peer
|
|
883
904
|
the read doesn't name), the ↑ into each answer (none for an answer no send claims) and "Read the full
|
|
884
|
-
answer" into
|
|
905
|
+
answer" into each mailbox message, and into the last of an older pairing's answers of each source, unless that
|
|
906
|
+
bubble is `data-peer-inline` (its text is there). It
|
|
885
907
|
also swaps a plain inline bubble's `.peer-text` (not `.markdown`: one that came with `peer_html` asks nothing) for
|
|
886
908
|
its markdown (`renderMarkdown`, POST /api/render, sanitized there; an
|
|
887
909
|
optional factory dep, so a cached older app.js leaves the text plain), once per element; `history_shape.js` reads a
|
|
888
910
|
`[data-peer-md]` element as its source, so live and an offscreen reload compare alike. Its one delegated click handler on the turn roots does the jumps,
|
|
889
911
|
buttons, never an `href` (the page routes by its hash): ↓ `revealInHistory` + `scrollIntoView` on the answer; ↑
|
|
890
912
|
`refs.js showRow` on the last row of that id before the answer (its `ref:reveal` opens a folded step or the stage's
|
|
891
|
-
cloud); focus moves to the target (`tabindex="-1"`). "Read the full answer" calls `context_chips.js
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
chip, the first state that applies: answers only (
|
|
898
|
-
`
|
|
899
|
-
newest validate/question `waiting`, its age the send's), answered
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
and
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
the
|
|
913
|
+
cloud); focus moves to the target (`tabindex="-1"`). "Read the full answer" calls `context_chips.js
|
|
914
|
+
showMessage(name, serial)` for a mailbox message (its peer chip's popover on that message's text) or
|
|
915
|
+
`showText(source)` for an older answer (that source's own chip), in a task of its own (the click's way to the
|
|
916
|
+
document would close it).
|
|
917
|
+
- `peer_chip.js` (pure): a paired peer in the session bar. `peerGroups(peers)` gives one group per peer of the
|
|
918
|
+
model that is paired (`paired_at`; an unpaired one keeps its messages but has no chip): `{key: "peer:<name>", name,
|
|
919
|
+
label, peer}`. `peerChipModel` is the chip, the first state that applies: answers only (`can_send` false: a pairing
|
|
920
|
+
with no address), can't send (the newest send `failed` and the pairing not renewed since, `paired_at` past the failed
|
|
921
|
+
send's time ends it, `cantSend`), waiting (the newest validate/question `waiting`, its age the send's), answered
|
|
922
|
+
(its newest message unread: no receipt, `held` or `noted`; with the dot), paired. A peer the read doesn't name, an
|
|
923
|
+
older chi web or a send not in the list is never "can't send": only the server's `failed` is. `peerPopoverTemplate`
|
|
924
|
+
is its popover (scene 2 of the design): where chi sends (the address), how it answers, the last 8 exchanges (sends,
|
|
925
|
+
and messages no send claims as `#N · summary`) with `exchangeState`'s words and the answer's receipt words, View
|
|
926
|
+
latest answer, Status card (`peerStatusCommand`: `/<name>` when the session lists it) and Unpair.
|
|
927
|
+
`context_chips.js` draws it: its chips are keyed (`data-name`: a source's name, a peer's `peer:<name>`), peer chips
|
|
928
|
+
first; context rows are never grouped (a `claude-outbox` source is an ordinary chip); an open popover stays while its
|
|
929
|
+
key is among the drawn chips; View latest answer reads the newest message (`api.message`), Unpair confirms once,
|
|
930
|
+
`DELETE`s the pairing and reads the peers again (the chip goes; a failure names itself in a toast); after a detach
|
|
931
|
+
or Unpair that took the focused chip, focus goes to the strip's first chip, else the composer (`focusAway`); an
|
|
908
932
|
exchange row is a button only when its send's row is drawn (`peerLinks.hasSend`) and jumps there
|
|
909
933
|
(`peerLinks.showSend`) after closing the popover. Under 600 px the peer popover is a bottom sheet (`sheetPlace`);
|
|
910
934
|
ordinary chips' popovers stay at their chip.
|
data/docs/internals/web-push.md
CHANGED
|
@@ -149,7 +149,7 @@ the top and in `pending_question` / `pending_card`, strings in `last_turn`), `no
|
|
|
149
149
|
3. a top-level turn whose `last_turn["ended_at"]` changed (a delegated child's is its parent's to report):
|
|
150
150
|
a newly recorded verdict is `verdict`, keyed by `"<sid>:<check_turn_id>"`; otherwise `failed`, or `done` when
|
|
151
151
|
`completed` and `seconds` ≥ `DONE_MIN_SECONDS` 10 or its origin is in `UNWATCHED_ORIGINS`
|
|
152
|
-
(`delegate_report`, `context`, `task`), keyed by `"<sid>:<ended_at>"`. A verdict wins over the done/no-event
|
|
152
|
+
(`delegate_report`, `context`, `task`, `peer`: a peer's message's wake turn), keyed by `"<sid>:<ended_at>"`. A verdict wins over the done/no-event
|
|
153
153
|
rule, including for a short turn. A reminder turn follows the same rules (no reminder event of its own).
|
|
154
154
|
- `WAITING` (approval, question, continue, card) are the reasons that stay open until answered: badged, in `open`,
|
|
155
155
|
cleaned up, and pushed only while still open. A failed, done or verdict turn has nothing to answer.
|
data/docs/memory.md
CHANGED
|
@@ -439,7 +439,7 @@ It is a memory like any other: `memory_read`, `chi --mute skill_release`,
|
|
|
439
439
|
skills`, [docs/bundles.md](bundles.md#the-skills-bundle)) adds `/skill save`,
|
|
440
440
|
`/skill list`, `/skill show`, `/skill diff`, keeps older versions with a
|
|
441
441
|
one-line diff after each update, and nudges a model that skips a failing
|
|
442
|
-
step instead of fixing the skill.
|
|
442
|
+
step instead of fixing the skill; a skill a bundle ships is skipped.
|
|
443
443
|
|
|
444
444
|
chi ships one skill itself: `skill_pages` in the system bundle
|
|
445
445
|
(`lib/samagotchi/bundles/system/skill_pages.md`), how to make, check and link a
|
data/docs/pages.md
CHANGED
|
@@ -84,7 +84,8 @@ A rule broken fails the run with a message naming the block and the limit: `tabl
|
|
|
84
84
|
- A run that fails (the script raised, has a syntax error, called `exit`, broke a limit, or printed more than 256 KB of
|
|
85
85
|
blocks) prints `error: line 9: undefined method 'fetch' for nil`, the last lines of what the script wrote to stderr,
|
|
86
86
|
and exits 1. **The result of the last good run is kept**: a bad edit never blanks the page.
|
|
87
|
-
- A run still going at **30 s** is stopped, with everything it started; the error says so.
|
|
87
|
+
- A run still going at **30 s** is stopped, with everything it started; the error says so. One that finished just as
|
|
88
|
+
the cut fires keeps its result. If what started the run
|
|
88
89
|
dies first (a killed terminal or chi web), the run stops itself a few seconds after its 30 s and records the same
|
|
89
90
|
error. Its output then has nowhere to go: a script that prints a lot may fail with `Broken pipe` instead (the last
|
|
90
91
|
good result is kept).
|
data/docs/peers.md
ADDED
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
# Peers: another agent beside chi
|
|
2
|
+
|
|
3
|
+
A **peer** is another agent's session the user works with beside chi: a Claude Code session (the claude-peer
|
|
4
|
+
bundle) or a Codex CLI session (codex-peer). chi sends it a part of its work (`claude_send`, `/claude validate`),
|
|
5
|
+
and the peer answers into chi. Each answer is a **message** in the session's **mailbox**: its own note in the
|
|
6
|
+
conversation, in order, with its text. chi says what it did with each one, on the peer's terminal and in the
|
|
7
|
+
peer chip. How it is built: [internals/peers.md](internals/peers.md).
|
|
8
|
+
|
|
9
|
+
## Pairing
|
|
10
|
+
|
|
11
|
+
The peer pairs from its side, with its `chi-peer` skill (`/claude install-skill` or `/codex install-skill`
|
|
12
|
+
installs it). Its pair script runs one command:
|
|
13
|
+
|
|
14
|
+
```sh
|
|
15
|
+
chi peer pair claude <session id> --address <where chi sends> --from "<who paired>"
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
- `--address` is where chi's sends go: Claude Code's inbox socket, Codex's thread id. A pairing without one
|
|
19
|
+
answers only: the peer can say, chi can't send to it (a peer on another machine with no forwarded socket).
|
|
20
|
+
- Pairing again only replaces the address (a Claude Code restart gives it a new socket).
|
|
21
|
+
- `chi peer unpair claude <id>` ends the pairing. Its messages stay, and chi still reads those it hasn't. The
|
|
22
|
+
peer chip's **Unpair** does the same.
|
|
23
|
+
- `chi peer pair` refuses a session whose live worker is older than the mailbox ("restart the session"), and a
|
|
24
|
+
session that was continued (it names the new id).
|
|
25
|
+
|
|
26
|
+
Which agents are peers is the bundles' to say (`chi.peer NAME` in plugin code), never a file's. A message from
|
|
27
|
+
a name no loaded bundle declared is refused with "no bundle in that session declares peer NAME".
|
|
28
|
+
|
|
29
|
+
## Saying something: `chi peer say`
|
|
30
|
+
|
|
31
|
+
```sh
|
|
32
|
+
chi peer say claude <id> --wake --re s-ab12cd --summary "validate step 2: VERDICT CHANGES, 2 issues" --wait 8 <<'EOF'
|
|
33
|
+
<the full answer>
|
|
34
|
+
EOF
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
- `--wake` or `--nowake` is required: `--wake` asks chi to run a turn for it (a validate's answer, a question's,
|
|
38
|
+
a message chi should act on now); `--nowake` leaves it as a note for chi's next turn.
|
|
39
|
+
- `--re` names the send it answers (the `ref:` line of chi's message); leave it out for a message the peer starts.
|
|
40
|
+
- `--summary` is one line (200 characters); the text is stdin, or `-m TEXT`, up to 1 MiB.
|
|
41
|
+
- `--wait SECONDS` (0 to 30) waits for chi's answer; the skills use 8.
|
|
42
|
+
|
|
43
|
+
It prints one line, which the skills tell the agent to quote to its user:
|
|
44
|
+
|
|
45
|
+
| What chi did | The line |
|
|
46
|
+
|---|---|
|
|
47
|
+
| started a turn | `#12 received · woke chi` |
|
|
48
|
+
| held it | `#12 received · held: 3 peer turns in a row (peer.turns) · waits for the user's next message` |
|
|
49
|
+
| took it as background | `#12 received · noted` |
|
|
50
|
+
| can't say yet | `#12 received · chi is in a turn: it reads this when the turn ends`, `chi is stopped: …`, `this session is archived: …`, `chi's worker isn't running and couldn't be started from here: …` |
|
|
51
|
+
| nothing within the wait | `#12 received · no answer from chi yet` |
|
|
52
|
+
| refused | `refused: no bundle in that session declares peer claude` (exit 1) |
|
|
53
|
+
|
|
54
|
+
Other messages of the same peer held and unread follow: `· also held: #10, #11 (paused)`. A held message is not
|
|
55
|
+
lost: it is a note, and the user's next message lets chi read it. The skills say not to send it again, and not to
|
|
56
|
+
`chi send` past it.
|
|
57
|
+
|
|
58
|
+
A say is refused, with nothing written, for: no such session; a session being deleted; a continued one (`this
|
|
59
|
+
session was continued as <id>: say it there`); not paired (`not paired: run the pair script`); an older worker
|
|
60
|
+
(`restart the session`); 200 messages chi hasn't read yet.
|
|
61
|
+
|
|
62
|
+
Through `--remote NAME` (or `CHI_REMOTE`) the remote's chi web does the say and the wait, and returns the line.
|
|
63
|
+
|
|
64
|
+
## What chi does with a message: the receipts
|
|
65
|
+
|
|
66
|
+
The worker takes the peer's messages in order, between turns, and writes one receipt per message:
|
|
67
|
+
|
|
68
|
+
- `woke` (a turn started for it), `held` with a reason, `noted` (it asked for no turn), `refused`;
|
|
69
|
+
- then `read` once a turn starts with it in the conversation, and `completed`, `failed` or `stopped` when that
|
|
70
|
+
turn ends.
|
|
71
|
+
|
|
72
|
+
Held reasons: `off` (`peer.turns` is 0), `paused` (after a failed wake turn), `continue` (a continue offer waits),
|
|
73
|
+
`max_wakes`, `peer turns`, `queued`, `exit`, `leaving`, `before a turn`.
|
|
74
|
+
|
|
75
|
+
`chi peer ls <id>` lists each peer, its pairing and its newest messages with their receipts; the peer chip's list
|
|
76
|
+
shows the same words (`held · peer turns`, `read`, `completed`).
|
|
77
|
+
|
|
78
|
+
## The budget: `peer.turns`
|
|
79
|
+
|
|
80
|
+
A peer's messages may wake chi `peer.turns` times in a row (default 3) with nothing typed by the user, within
|
|
81
|
+
`session.max_wakes`. Past it they wait as notes, the say's line says so, and the TUI and the web say it once. A
|
|
82
|
+
message whose summary ends its round with `VERDICT OK` wakes chi once more to close it, held only by
|
|
83
|
+
`session.max_wakes`. Only input typed in the web or a TUI resets the count: `chi send` does not, since a peer can
|
|
84
|
+
run it. `peer.turns: 0` means a peer's message never wakes chi. `context.wake` is attached context's only.
|
|
85
|
+
|
|
86
|
+
`peer.turns` replaced `context.peer_turns` (no alias): rename it in config.yml.
|
|
87
|
+
|
|
88
|
+
## Limits
|
|
89
|
+
|
|
90
|
+
- A message's text up to 1 MiB, its summary one line of 200 characters.
|
|
91
|
+
- In the conversation, a note that wakes chi holds the text up to the tool output cap (10,000 characters by
|
|
92
|
+
default); one that doesn't, up to 2,000. A longer one points at the `claude_read` / `codex_read` tool
|
|
93
|
+
(`serial`, `offset`, `limit`), which pages it.
|
|
94
|
+
- 200 messages chi hasn't read: further says are refused until it reads them.
|
|
95
|
+
- The mailbox keeps every message chi hasn't taken, and the newest 50 it has.
|
|
96
|
+
|
|
97
|
+
## Continuing a session
|
|
98
|
+
|
|
99
|
+
A continue leaves the pairing and the mailbox with the previous link:
|
|
100
|
+
|
|
101
|
+
- the new link's `/claude` init task posts the peer a `moved` message with the new id, and the peer pairs again
|
|
102
|
+
with it, the way it paired before (its skill knows how);
|
|
103
|
+
- a say to the old id is refused, naming the new id;
|
|
104
|
+
- the messages the previous link hadn't read (never taken, or held or noted and not yet read by a turn) reach the
|
|
105
|
+
new link as **one** note, each text in its peer block.
|
|
106
|
+
|
|
107
|
+
## Codex's sandbox
|
|
108
|
+
|
|
109
|
+
Codex's default sandbox writes only where its config allows, and `chi peer pair` and `say` write the mailbox:
|
|
110
|
+
|
|
111
|
+
```toml
|
|
112
|
+
[sandbox_workspace_write]
|
|
113
|
+
writable_roots = ["<state>/samagotchi/mailbox"]
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
`/codex install-skill` shows the exact line and makes the folder, so the root exists when Codex restarts. A config
|
|
117
|
+
from an older skill names `…/samagotchi/context`: change it. A say from inside the sandbox can't start a stopped
|
|
118
|
+
worker; it prints "couldn't be started from here", and chi reads the message at its next start.
|
|
119
|
+
|
|
120
|
+
## Who can write the mailbox
|
|
121
|
+
|
|
122
|
+
The mailbox is `<state>/samagotchi/mailbox/<session id>/<peer>/`, apart from the sessions folder: the only folder a
|
|
123
|
+
sandboxed peer writes, so it holds nothing chi trusts. chi's own record of each message (the receipts) is in the
|
|
124
|
+
session's own folder, written only by its worker. Every message file is checked before it is read.
|
|
125
|
+
|
|
126
|
+
The say is unauthenticated, as a context push is: any process that can write the mailbox can send as a peer. A
|
|
127
|
+
writer of the mailbox folder can also plant a file with the largest serial and use up a peer's serials (later
|
|
128
|
+
says then fail with "serials are used up"); the folder's writers are trusted that far, as they can delete its
|
|
129
|
+
files. chi's own tools can't write there (the `chi-mailbox` guardrail), and a shell command naming it asks.
|
|
130
|
+
|
|
131
|
+
## Upgrading from an older peer bundle
|
|
132
|
+
|
|
133
|
+
The claude-peer and codex-peer bundles paired through two attached context sources (`<peer>-inbox`,
|
|
134
|
+
`<peer>-outbox`). That is gone, with no compatibility:
|
|
135
|
+
|
|
136
|
+
1. `chi update` (or `chi bundle upgrade claude-peer`); an older bundle that still declares `chi.peer_source` fails
|
|
137
|
+
to load with "upgrade this bundle", and chi starts without it.
|
|
138
|
+
2. In Claude Code: `/claude install-skill`, then **Replace**; in Codex: `/codex install-skill` and change the
|
|
139
|
+
`writable_roots` line.
|
|
140
|
+
3. Pair again. Until then `/claude` says "paired the old way: pair again", and a push to an old `claude-outbox`
|
|
141
|
+
source is an ordinary context note.
|