samagotchi 0.170.0 → 0.172.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.
Files changed (267) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +61 -1
  3. data/bin/chi +6 -4
  4. data/docs/architecture.md +26 -9
  5. data/docs/bundles.md +4 -21
  6. data/docs/cli.md +81 -97
  7. data/docs/configuration.md +12 -14
  8. data/docs/context.md +5 -6
  9. data/docs/guardrails.md +57 -96
  10. data/docs/hooks.md +3 -4
  11. data/docs/internals/attached-context.md +6 -7
  12. data/docs/internals/background-tasks.md +4 -3
  13. data/docs/internals/block-renderers.md +2 -2
  14. data/docs/internals/bridge.md +34 -7
  15. data/docs/internals/context-telemetry.md +13 -1
  16. data/docs/internals/engine.md +25 -13
  17. data/docs/internals/inline-widgets.md +1 -1
  18. data/docs/internals/objectives.md +4 -6
  19. data/docs/internals/participants.md +340 -249
  20. data/docs/internals/prompt-caching.md +4 -5
  21. data/docs/internals/web-frontend.md +185 -35
  22. data/docs/internals/working-set.md +71 -5
  23. data/docs/memory.md +1 -1
  24. data/docs/plugins.md +2 -16
  25. data/docs/releasing.md +2 -1
  26. data/docs/scheduling.md +1 -1
  27. data/docs/sessions.md +17 -48
  28. data/docs/sub-agent.md +2 -2
  29. data/docs/system-one.md +2 -2
  30. data/docs/testing.md +56 -7
  31. data/lib/samagotchi/bridge/card_store.rb +1 -0
  32. data/lib/samagotchi/bridge/sse_writer.rb +1 -0
  33. data/lib/samagotchi/bridge/turn_accumulator.rb +8 -5
  34. data/lib/samagotchi/bridge.rb +64 -20
  35. data/lib/samagotchi/bridge_client/event_stream.rb +2 -0
  36. data/lib/samagotchi/bundle_command/test_run.rb +1 -0
  37. data/lib/samagotchi/bundle_command/try/run.rb +1 -0
  38. data/lib/samagotchi/bundles/coordinator/manifest.yml +4 -5
  39. data/lib/samagotchi/bundles/coordinator/plugin.rb +6 -79
  40. data/lib/samagotchi/bundles/coordinator/skill_coordinator.md +1 -16
  41. data/lib/samagotchi/bundles/github-pr/manifest.yml +2 -2
  42. data/lib/samagotchi/bundles/github-pr/plugin.rb +0 -1
  43. data/lib/samagotchi/bundles/inline-widgets/manifest.yml +2 -2
  44. data/lib/samagotchi/bundles/inline-widgets/plugin.rb +4 -5
  45. data/lib/samagotchi/bundles/system/manifest.yml +1 -1
  46. data/lib/samagotchi/client_id.rb +126 -67
  47. data/lib/samagotchi/command_intake.rb +15 -3
  48. data/lib/samagotchi/compat.rb +6 -1
  49. data/lib/samagotchi/context_candidate_choice.rb +1 -3
  50. data/lib/samagotchi/context_candidates.rb +3 -4
  51. data/lib/samagotchi/continue_offer.rb +9 -2
  52. data/lib/samagotchi/delivery.rb +36 -12
  53. data/lib/samagotchi/empty_answer_error.rb +5 -0
  54. data/lib/samagotchi/engine/cards.rb +3 -0
  55. data/lib/samagotchi/engine/context_judge.rb +5 -3
  56. data/lib/samagotchi/engine/events.rb +4 -0
  57. data/lib/samagotchi/engine/hooks.rb +3 -0
  58. data/lib/samagotchi/engine/messages.rb +5 -0
  59. data/lib/samagotchi/engine/model_settings.rb +2 -0
  60. data/lib/samagotchi/engine/models.rb +10 -0
  61. data/lib/samagotchi/engine/objectives.rb +6 -0
  62. data/lib/samagotchi/engine/participants.rb +18 -14
  63. data/lib/samagotchi/engine/plugins.rb +8 -0
  64. data/lib/samagotchi/engine/questions.rb +3 -0
  65. data/lib/samagotchi/engine/recap.rb +1 -0
  66. data/lib/samagotchi/engine/session.rb +4 -0
  67. data/lib/samagotchi/engine/side_requests.rb +9 -0
  68. data/lib/samagotchi/engine/steering.rb +2 -0
  69. data/lib/samagotchi/engine/toolkit.rb +5 -0
  70. data/lib/samagotchi/engine/turn_end.rb +7 -0
  71. data/lib/samagotchi/engine/turn_helpers.rb +8 -0
  72. data/lib/samagotchi/engine/verify.rb +2 -0
  73. data/lib/samagotchi/engine.rb +8 -3
  74. data/lib/samagotchi/event_fanout.rb +22 -1
  75. data/lib/samagotchi/grants.rb +33 -22
  76. data/lib/samagotchi/guardrail_wiring.rb +23 -18
  77. data/lib/samagotchi/guardrails/approval_use.rb +59 -0
  78. data/lib/samagotchi/guardrails/approvals.rb +9 -11
  79. data/lib/samagotchi/guardrails/child_boundary.rb +1 -0
  80. data/lib/samagotchi/guardrails/gate.rb +10 -5
  81. data/lib/samagotchi/guardrails/implicit_writers.rb +1 -0
  82. data/lib/samagotchi/guardrails/pair_boundary.rb +6 -6
  83. data/lib/samagotchi/guardrails/participant_refusal.rb +33 -0
  84. data/lib/samagotchi/guardrails/review_paths.rb +2 -3
  85. data/lib/samagotchi/guardrails.rb +1 -1
  86. data/lib/samagotchi/image_store.rb +51 -12
  87. data/lib/samagotchi/kernel_loop.rb +7 -1
  88. data/lib/samagotchi/llm/stray_tool_call.rb +7 -4
  89. data/lib/samagotchi/llm_context_stale.rb +4 -1
  90. data/lib/samagotchi/llm_context_strategy.rb +2 -0
  91. data/lib/samagotchi/objectives.rb +1 -4
  92. data/lib/samagotchi/objectives_audit.rb +1 -1
  93. data/lib/samagotchi/objectives_track.rb +1 -1
  94. data/lib/samagotchi/owner_prompt.rb +3 -6
  95. data/lib/samagotchi/parent_report.rb +1 -0
  96. data/lib/samagotchi/participant_messages.rb +48 -4
  97. data/lib/samagotchi/participant_revise.rb +61 -0
  98. data/lib/samagotchi/participant_turn_mode.rb +50 -0
  99. data/lib/samagotchi/participant_uploads.rb +98 -0
  100. data/lib/samagotchi/participants.rb +21 -12
  101. data/lib/samagotchi/participants_watch.rb +2 -2
  102. data/lib/samagotchi/plugin/api.rb +2 -2
  103. data/lib/samagotchi/plugin/attached_context.rb +1 -1
  104. data/lib/samagotchi/plugin/context.rb +0 -4
  105. data/lib/samagotchi/plugin/sessions.rb +1 -25
  106. data/lib/samagotchi/reply_wait/poll.rb +5 -1
  107. data/lib/samagotchi/revise_anchor.rb +9 -0
  108. data/lib/samagotchi/run_options.rb +2 -3
  109. data/lib/samagotchi/send_command.rb +15 -10
  110. data/lib/samagotchi/session.rb +0 -3
  111. data/lib/samagotchi/session_access/contract.rb +1 -10
  112. data/lib/samagotchi/session_access/local.rb +10 -23
  113. data/lib/samagotchi/session_access/remote.rb +9 -20
  114. data/lib/samagotchi/session_access.rb +12 -16
  115. data/lib/samagotchi/session_chain.rb +4 -6
  116. data/lib/samagotchi/session_commands.rb +6 -3
  117. data/lib/samagotchi/session_continue.rb +1 -2
  118. data/lib/samagotchi/session_inbox.rb +20 -12
  119. data/lib/samagotchi/session_manager/delivery.rb +32 -5
  120. data/lib/samagotchi/session_manager/lifecycle.rb +12 -0
  121. data/lib/samagotchi/session_manager/listing.rb +5 -0
  122. data/lib/samagotchi/session_manager/spawn.rb +2 -2
  123. data/lib/samagotchi/session_manager/worker_command.rb +9 -0
  124. data/lib/samagotchi/session_participants.rb +12 -8
  125. data/lib/samagotchi/session_review.rb +5 -7
  126. data/lib/samagotchi/session_stores.rb +3 -1
  127. data/lib/samagotchi/share_command.rb +10 -12
  128. data/lib/samagotchi/share_terms.rb +41 -0
  129. data/lib/samagotchi/steer.rb +8 -14
  130. data/lib/samagotchi/system_prompt.rb +16 -25
  131. data/lib/samagotchi/terminal_ui/attach_launcher.rb +2 -1
  132. data/lib/samagotchi/terminal_ui/attached_loop/exit_commands.rb +1 -0
  133. data/lib/samagotchi/terminal_ui/attached_loop/queueing.rb +1 -0
  134. data/lib/samagotchi/terminal_ui/attached_loop/sending.rb +2 -0
  135. data/lib/samagotchi/terminal_ui/formatting.rb +15 -17
  136. data/lib/samagotchi/terminal_ui/participant_commands.rb +2 -2
  137. data/lib/samagotchi/terminal_ui/status_row.rb +2 -2
  138. data/lib/samagotchi/terminal_ui.rb +1 -2
  139. data/lib/samagotchi/testing/sessions.rb +2 -10
  140. data/lib/samagotchi/tool_runner.rb +42 -9
  141. data/lib/samagotchi/toolkit.rb +4 -22
  142. data/lib/samagotchi/toolkit_suggest.rb +3 -3
  143. data/lib/samagotchi/tools/deferred_tools.rb +1 -0
  144. data/lib/samagotchi/tools/execute.rb +11 -45
  145. data/lib/samagotchi/tools/leftovers.rb +122 -0
  146. data/lib/samagotchi/tools/memory.rb +88 -25
  147. data/lib/samagotchi/tools/task_get.rb +1 -0
  148. data/lib/samagotchi/tools/task_list.rb +3 -2
  149. data/lib/samagotchi/tools/task_record.rb +6 -4
  150. data/lib/samagotchi/tools/task_runtime.rb +199 -20
  151. data/lib/samagotchi/tools/task_wait.rb +4 -3
  152. data/lib/samagotchi/turn_anchors.rb +0 -3
  153. data/lib/samagotchi/turn_context.rb +1 -1
  154. data/lib/samagotchi/turn_origin.rb +1 -1
  155. data/lib/samagotchi/turn_stages/context_judge.rb +4 -4
  156. data/lib/samagotchi/turn_stages/objectives.rb +2 -2
  157. data/lib/samagotchi/turn_stages/toolkit_suggestion.rb +2 -2
  158. data/lib/samagotchi/turn_stages/verify_anchors.rb +13 -1
  159. data/lib/samagotchi/update_hint.rb +3 -1
  160. data/lib/samagotchi/verify_anchor.rb +6 -0
  161. data/lib/samagotchi/verify_fresh.rb +1 -1
  162. data/lib/samagotchi/verify_fresh_origin.rb +13 -11
  163. data/lib/samagotchi/version.rb +1 -1
  164. data/lib/samagotchi/web/app.rb +45 -82
  165. data/lib/samagotchi/web/participant_access.rb +139 -40
  166. data/lib/samagotchi/web/participant_images.rb +185 -0
  167. data/lib/samagotchi/web/participant_review.rb +22 -142
  168. data/lib/samagotchi/web/participant_show.rb +241 -0
  169. data/lib/samagotchi/web/participant_stream_filter.rb +25 -2
  170. data/lib/samagotchi/web/participant_view.rb +334 -27
  171. data/lib/samagotchi/web/participants_admin.rb +21 -40
  172. data/lib/samagotchi/web/public/annotate_bar.css +1 -2
  173. data/lib/samagotchi/web/public/annotate_bar.js +1 -2
  174. data/lib/samagotchi/web/public/app.js +126 -132
  175. data/lib/samagotchi/web/public/block_host.js +7 -4
  176. data/lib/samagotchi/web/public/bubbles.js +9 -1
  177. data/lib/samagotchi/web/public/cards_offscreen.js +69 -0
  178. data/lib/samagotchi/web/public/chip_popover.js +5 -4
  179. data/lib/samagotchi/web/public/claim_link.js +4 -4
  180. data/lib/samagotchi/web/public/composer.css +4 -6
  181. data/lib/samagotchi/web/public/composer_mode.js +11 -6
  182. data/lib/samagotchi/web/public/composer_mount.js +4 -4
  183. data/lib/samagotchi/web/public/ctx.js +12 -3
  184. data/lib/samagotchi/web/public/data.js +2 -10
  185. data/lib/samagotchi/web/public/delivery_line.js +49 -63
  186. data/lib/samagotchi/web/public/history_shape.js +5 -1
  187. data/lib/samagotchi/web/public/images.js +7 -1
  188. data/lib/samagotchi/web/public/index.html +50 -34
  189. data/lib/samagotchi/web/public/info_bar_model.js +2 -1
  190. data/lib/samagotchi/web/public/live_turn.js +1 -1
  191. data/lib/samagotchi/web/public/markdown_place.js +5 -4
  192. data/lib/samagotchi/web/public/owner_claim.js +5 -5
  193. data/lib/samagotchi/web/public/owner_verify.js +0 -2
  194. data/lib/samagotchi/web/public/participant_bar.js +107 -0
  195. data/lib/samagotchi/web/public/participant_main.js +289 -0
  196. data/lib/samagotchi/web/public/participant_model.js +5 -292
  197. data/lib/samagotchi/web/public/participant_names.js +17 -8
  198. data/lib/samagotchi/web/public/participant_revise.js +66 -0
  199. data/lib/samagotchi/web/public/participants_panel.js +32 -74
  200. data/lib/samagotchi/web/public/question_cards.js +14 -3
  201. data/lib/samagotchi/web/public/refs.js +53 -36
  202. data/lib/samagotchi/web/public/reload_check.js +70 -14
  203. data/lib/samagotchi/web/public/revise_stack.js +21 -10
  204. data/lib/samagotchi/web/public/send_turn.js +28 -29
  205. data/lib/samagotchi/web/public/session_actions.js +4 -45
  206. data/lib/samagotchi/web/public/session_fields.js +1 -2
  207. data/lib/samagotchi/web/public/session_state.js +12 -7
  208. data/lib/samagotchi/web/public/session_sync.js +9 -2
  209. data/lib/samagotchi/web/public/session_view.js +14 -5
  210. data/lib/samagotchi/web/public/settings_panel.js +4 -18
  211. data/lib/samagotchi/web/public/stage_answer.js +56 -0
  212. data/lib/samagotchi/web/public/stage_asking.js +7 -5
  213. data/lib/samagotchi/web/public/stage_cloud.js +93 -0
  214. data/lib/samagotchi/web/public/stage_dom.js +100 -0
  215. data/lib/samagotchi/web/public/stage_handoff.js +154 -0
  216. data/lib/samagotchi/web/public/stage_owner_wait.js +35 -0
  217. data/lib/samagotchi/web/public/stage_pager.js +59 -0
  218. data/lib/samagotchi/web/public/stage_quiet_clock.js +52 -0
  219. data/lib/samagotchi/web/public/stage_view.js +103 -410
  220. data/lib/samagotchi/web/public/stage_waiting.js +74 -6
  221. data/lib/samagotchi/web/public/start_page.js +12 -33
  222. data/lib/samagotchi/web/public/start_settings.js +24 -78
  223. data/lib/samagotchi/web/public/start_toolkit.js +6 -10
  224. data/lib/samagotchi/web/public/storage.js +22 -0
  225. data/lib/samagotchi/web/public/stream_handlers.js +3 -10
  226. data/lib/samagotchi/web/public/tokens.css +1 -1
  227. data/lib/samagotchi/web/public/turn_block.js +2 -5
  228. data/lib/samagotchi/web/public/turn_events.js +30 -12
  229. data/lib/samagotchi/web/public/turn_html.js +9 -2
  230. data/lib/samagotchi/web/public/turn_pieces.js +3 -4
  231. data/lib/samagotchi/web/public/turn_range.js +1 -2
  232. data/lib/samagotchi/web/public/verify_target.js +2 -4
  233. data/lib/samagotchi/web/public/viewer.js +59 -0
  234. data/lib/samagotchi/web/public/viewer_self.js +59 -0
  235. data/lib/samagotchi/web/public/working_set.js +11 -5
  236. data/lib/samagotchi/web/public/working_set_view.js +53 -8
  237. data/lib/samagotchi/web/public/ws_cards.js +89 -0
  238. data/lib/samagotchi/web/public/ws_peek.js +106 -0
  239. data/lib/samagotchi/web/public/ws_preview.css +126 -0
  240. data/lib/samagotchi/web/public/ws_reader.js +319 -0
  241. data/lib/samagotchi/web/public/ws_timeline.js +200 -0
  242. data/lib/samagotchi/web/public/ws_way_in.js +25 -0
  243. data/lib/samagotchi/web/qr.rb +1 -1
  244. data/lib/samagotchi/web/session_control.rb +42 -15
  245. data/lib/samagotchi/web/session_create.rb +6 -72
  246. data/lib/samagotchi/web/session_show.rb +75 -28
  247. data/lib/samagotchi/web/session_summary.rb +1 -4
  248. data/lib/samagotchi/web/verify_fresh_routes.rb +8 -7
  249. data/lib/samagotchi/web/viewer.rb +70 -0
  250. data/lib/samagotchi/web/working_set_routes.rb +132 -0
  251. data/lib/samagotchi/worker.rb +35 -28
  252. data/lib/samagotchi/worker_inbound.rb +4 -3
  253. data/lib/samagotchi/worker_link.rb +17 -0
  254. data/lib/samagotchi/working_set.rb +322 -11
  255. metadata +32 -13
  256. data/lib/samagotchi/guardrails/review_boundary.rb +0 -99
  257. data/lib/samagotchi/participant_mode.rb +0 -86
  258. data/lib/samagotchi/review_apply.rb +0 -131
  259. data/lib/samagotchi/review_command.rb +0 -123
  260. data/lib/samagotchi/review_start.rb +0 -196
  261. data/lib/samagotchi/web/public/participant.html +0 -218
  262. data/lib/samagotchi/web/public/participant.js +0 -719
  263. data/lib/samagotchi/web/public/participant_annotate.js +0 -76
  264. data/lib/samagotchi/web/public/review_apply.js +0 -34
  265. data/lib/samagotchi/web/public/review_history.js +0 -72
  266. data/lib/samagotchi/web/public/review_start.js +0 -55
  267. data/lib/samagotchi/web/public/tools_overview.js +0 -42
data/docs/cli.md CHANGED
@@ -26,9 +26,8 @@
26
26
  - `chi answer ID --question QID (--option N|LABEL)... [--text T] [--timeout S] [--format json]` (or `--dismiss`) — answer the question a session waits on (the one `chi send --wait` exited 3 with), then wait and print what comes next as `chi send --wait` does: the reply (0), the next question (3), still running after `--timeout` (4). `--option` is 1-based or the label, repeated on a multi-select question; `--text` is free text, or a Deny's reason; `--dismiss` leaves it unanswered and the model finishes its reply. A question no longer open (the web answered first) isn't answered again: it waits for that turn's reply. An option the question doesn't offer exits 2; a worker that is gone exits 1 (`send the task again: chi send --wait -m "…" ID`). What a parent may pick follows `guardrails.parent_answers`, or the session's own `parent_answers` when stricter (`soft`, the default: a deny, a plain answer, Continue and "Allow once"; `standard`: no allow; `hard`: no Continue either), never a wider scope or an allow on chi's own config; a refused pick exits 1 with what to answer instead (a convention, not a security boundary; see [Guardrails](guardrails.md#answers-from-a-parent-agent))
27
27
  - `chi schedule <add|list|show|tick|run-now|enable|disable|cancel>` — durable schedules on this machine: a prompt with a clock that fires out of no worker (cron, systemd, or chi web's hub with `schedule.auto_tick`), as the next link of a session's chain or as a turn in the session itself (see [Scheduling](scheduling.md) and [Durable schedules](#durable-schedules-chi-schedule)). A usage error exits 2, an unknown session or schedule 1; `chi --remote X schedule list` exits 2
28
28
  - `chi remote add NAME URL [--token-file F | --token-stdin]`, `chi remote ls`, `chi remote rm NAME` — the other machines whose chi web the session commands reach with `--remote NAME` (see [Remote sessions](#remote-sessions))
29
- - `chi review FILE… [--dir DIR] [--model M]`, `chi review --from ID [FILE…]` — start a review session to invite participants to: for files of a project, or as a review of a working session that starts from its recap, not its transcript (see [Review sessions](#review-sessions))
30
- - `chi share ID --name NAME [--identity EMAIL] [--agent] [--expires 3d] [--cap 2]`, `chi share ls [ID]`, `chi share cap ID P DOLLARS`, `chi share revoke ID [P] | --all` — invite a participant to a session through chi web on the LAN (read-only review turns in a review session, pair turns that act under your guardrails in a working session) (a link of their own, 7 days, a $2 spending cap), list them, change one's cap, revoke them (see [Participants](#participants))
31
- - `chi --remote NAME send|answer|note|context|sessions|share|review …` (or `CHI_REMOTE=NAME`) — those commands on that machine's sessions, through its chi web (see [Remote sessions](#remote-sessions))
29
+ - `chi share ID --name NAME [--identity EMAIL] [--expires 3d] [--cap 2]`, `chi share ls [ID]`, `chi share cap ID P DOLLARS`, `chi share revoke ID [P] | --all` — invite a participant into a session through chi web on the LAN, whose turns act under your guardrails (a link of their own, 7 days, a $2 spending cap), list them, change one's cap, revoke them (see [Participants](#participants))
30
+ - `chi --remote NAME send|answer|note|context|sessions|share …` (or `CHI_REMOTE=NAME`) — those commands on that machine's sessions, through its chi web (see [Remote sessions](#remote-sessions))
32
31
  - `chi --remote NAME --attach ID` (`--resume ID`, `--dir DIR [-p TEXT]`) — the attached TUI on a session of that machine (see [Remote sessions](#remote-sessions))
33
32
  - `chi memory ls [--scope project|system] [--format text|json]` — the memories of both scopes (this folder's project first), one row each: scope, name, size, date, `from <bundle>`, the index description and its model overlays; `chi memory rm NAME [--scope project|system]` removes one as `memory_write` with `remove: true` does: its file and model overlays go to the bundle trash (the line names the dir; `chi bundle trash` lists and empties it) and its index line is dropped. NAME in both scopes without `--scope` exits 2 naming both; a missing NAME or a bundle's memory (`chi bundle uninstall` removes it) exits 1. `chi memory usage [--scope project|system] [--top N] [--format text|json]` reports what the memories cost over the saved sessions: each scope's index tokens and how many of its lines name a memory nobody read, the memories read most by tokens, and the user's own memories no saved session read (`--top` caps the rows per section, 10; no sessions says so and exits 0) — see [Memory: What the memories cost](memory.md#what-the-memories-cost)
34
33
  - `chi desktop install|upgrade|uninstall|status` — the macOS "Send to chi" helper: a Service and a ⌃⌥⌘N hotkey that send text or images to a session (live, stopped or new) as a message (⏎, a turn runs) or a context note (⌘⏎) (see [Desktop helper](desktop.md))
@@ -488,7 +487,7 @@ fire twice.
488
487
  The model can register its own schedules with `schedule_task` (defaulting to the
489
488
  session it is in), list them with `list_schedules` and stop them with
490
489
  `cancel_schedule`; like `register_reminder`, these are owner-voiced tools, refused
491
- in a participant's review or pair turn.
490
+ in a participant's turn.
492
491
 
493
492
  ## Flags
494
493
 
@@ -1223,7 +1222,7 @@ threshold; its folded row shows its first line as typed). A delegate
1223
1222
  report itself starts folded. Folding is this browser's choice, kept per session in
1224
1223
  localStorage (`chi_answer_fold:<session id>`, the last 200 folded answers and prompts;
1225
1224
  the keys of sessions gone from the list are dropped when the list loads);
1226
- other viewers and the participant page are not affected. A jump into a
1225
+ other viewers (a participant's browser too) are not affected. A jump into a
1227
1226
  folded answer (a claim link, say) unfolds it for that page load.
1228
1227
 
1229
1228
  **Revise** rewrites an answer and stacks the versions. A finished turn's
@@ -1246,8 +1245,13 @@ version on view, and the chip names it, "v1 of 3"); › back to the newest. Swit
1246
1245
  page shows, and a reload shows the newest again. Revise
1247
1246
  again on the newest version adds to the stack. Stacks are session data (the
1248
1247
  stamp is on the Revise prompt, see [sessions.md](sessions.md), Revise
1249
- stacks): every owner's page shows them, live and after a reload; the
1250
- participant page doesn't draw them yet. A session whose worker predates
1248
+ stacks): every page shows them, live and after a reload, a participant's too.
1249
+ A participant (`chi share`) gets Revise on the answer to their own message
1250
+ only, while no one else's turn (the owner's, another participant's, a wake
1251
+ turn's) came after it; the owner's answers have no button on their page, and
1252
+ a closed composer shows none. A send that came too late is refused with
1253
+ "someone else's turn came after this answer: send a new message instead",
1254
+ the text and the chip kept. A session whose worker predates
1251
1255
  Revise (started by an older chi) disables the button and shows the chip as
1252
1256
  "Revise: restart this session to use Revise"; a message sent then is a plain
1253
1257
  one. A Revise turn that fails comes back into the composer with its chip.
@@ -1336,7 +1340,7 @@ made (up to 120 lines or 8 KB), live and after a reload (see
1336
1340
  `web.view`, `chi web --web-view`, `SAMAGOTCHI_WEB_VIEW` and `?view=` were removed with the turn view (the
1337
1341
  stage is the only view; a config.yml that still sets `web.view:` warns about an unknown key).
1338
1342
 
1339
- **When things happened**, on the owner's page and on a participant's review page: where 10 minutes or
1343
+ **When things happened**, on the owner's page and on a participant's: where 10 minutes or
1340
1344
  more of quiet passed between the end of one activity and the start of the next (a turn, a context
1341
1345
  note, a reminder), the history has one dim centred line, `── 14:32 · 47 min later ──`; the date is
1342
1346
  added when the day changed or the turn wasn't today (`── Sat 24 Oct 09:10 · 13 h later ──`).
@@ -1402,6 +1406,12 @@ session bar shows the `mem N` chip again.
1402
1406
  forgotten row offers `refresh`, the same add of it. While a turn runs the
1403
1407
  stage's rail shows an add queued for its end as a dashed `+ name · next turn`
1404
1408
  line.
1409
+ - **What chi has of an item**: a row's `▸` in the list peeks at it (its latest edit's diff, else its newest
1410
+ read's first lines); `Open the timeline` (also a tool row's `timeline` and a file ref's ▾ `What chi has`) puts
1411
+ the item's timeline over the stage, newest first: reads merged into line slices over a strip of the file, edits
1412
+ as diffs, what chi no longer has greyed (with `undrop` for your drop), a changed memory's `Now · diff`. `← Stage`
1413
+ or Esc goes back to the same place, ↑↓ step through the set; on a phone it is full screen (`‹ Set`, `‹ ›`).
1414
+ Yours only: a participant's list has no `▸`.
1405
1415
 
1406
1416
  Only `read`, `edit`, `write`, `memory_read`, `memory_write` and `web_fetch`
1407
1417
  calls that succeeded count; files an `execute` touched don't.
@@ -1442,20 +1452,18 @@ On a touch screen (a phone, a tablet) the bar sits just above the composer
1442
1452
  instead of next to the selection, where the system's own Copy menu and the
1443
1453
  selection handles would cover it; several pills wrap to a second row.
1444
1454
 
1445
- A review's participants get the same on their page (a `chi share` / `chi
1446
- review` link): selecting text in the Plan or the thread quotes it into
1447
- their comment box, labelled `From docs/plan.md:` or `From Sam's comment:`,
1448
- with the same presets. Not in the owner's participant view, and no plugin
1449
- pills there (a review turn refuses `/` lines).
1455
+ Participants get the same on their page (a `chi share` link, the main
1456
+ page): a selection quotes into their composer with the same
1457
+ presets; no plugin pills and no Copy link there.
1450
1458
 
1451
- After the presets, both pages have a built-in **Verify**: the quote, then
1459
+ After the presets comes a built-in **Verify**: the quote, then
1452
1460
  an ask to check the claim against the code and end on a line `Verdict:
1453
1461
  confirmed|refuted|unclear — <reason>`. Verify is offered only on text in a finished turn's final answer, the
1454
1462
  claim a verdict card can come from; elsewhere (an earlier reply, a step, a message, a line added mid-turn, a turn
1455
1463
  still running) the bar keeps its other actions. A session whose worker predates Verify (started by an older chi) refuses it (409
1456
1464
  `verify_unavailable`); a participant's page disables Verify and Verify fresh with a hint to restart the session. On your page a selection in a turn
1457
1465
  also offers **Copy link**: a link to that turn and quote for a participant's
1458
- browser (the one their review link was opened in), which opens their page
1466
+ browser (the one their invite link was opened in), which opens their page
1459
1467
  scrolled to the quote and highlights it; with no one invited, a link to it
1460
1468
  on your own page. A secret in the selection goes into the link as
1461
1469
  `[redacted]`, as the participant's page shows it. One browser holds one participant link at a time, and
@@ -1714,12 +1722,12 @@ How it works inside (`SessionAccess`, chi web's routes, where each check runs):
1714
1722
 
1715
1723
  ### Participants
1716
1724
 
1717
- A session's owner can invite **participants**, people or agents, to review it through chi web on the LAN
1718
- (`web.host: lan`), each with a link of their own that reaches that one session:
1725
+ A session's owner can invite **participants** into it through chi web on the LAN (`web.host: lan`), each with a
1726
+ link of their own that reaches that one session, whose turns act in it under the owner's guardrails:
1719
1727
 
1720
1728
  ```sh
1721
1729
  chi share 3f9a1c2e --name Alex
1722
- # p_7c01d2aa Alex (human, reviewer) · session 3f9a1c2e · expires 2026-10-30 14:02 · cap $2.00
1730
+ # p_7c01d2aa Alex (reviewer) · session 3f9a1c2e · expires 2026-10-30 14:02 · cap $2.00
1723
1731
  # http://192.168.1.29:4567/?token=chp_…#s=3f9a1c2e-…
1724
1732
  # (shown once: chi keeps only its digest; chi share revoke 3f9a1c2e p_7c01d2aa ends it)
1725
1733
  chi share ls # every session's participants (--format json; never a token)
@@ -1729,66 +1737,66 @@ chi share revoke --all # every link to every session
1729
1737
  ```
1730
1738
 
1731
1739
  - The link is printed once (with a QR code at a terminal): chi keeps only a digest of its token. Send it to the
1732
- participant; opening it sets their browser's cookie, as the owner's LAN link does. `--agent` marks an agent
1733
- participant, which uses the token as `Authorization: Bearer` (e.g. `chi --remote` with that token).
1740
+ participant; opening it sets their browser's cookie, as the owner's LAN link does. The same link works from the
1741
+ command line: its token as `Authorization: Bearer` (a script, another agent, your own second tool; `chi --remote`
1742
+ with that token), on the LAN, this machine or an SSH tunnel, not behind a sign-in proxy.
1734
1743
  - It works for 7 days (`--expires Nh` or `Nd`, 1 hour to 30 days; `web.participants.expires`), until it is revoked,
1735
- or until the session is archived or deleted. A revoked link shows "This review link was revoked by the session's
1736
- owner.", an expired one "This review link expired: ask the session's owner for a new one."
1737
- - **Review turns (experimental).** A participant can ask questions and comment through chi web's `POST …/turn`: each
1738
- message is a turn of its own, queued behind the running one, that the model answers **read-only**. It may read the
1739
- project (never its secret files or chi's own), and proposes changes as text or a diff for you to apply; it can't
1740
- write, run, fetch, send notes or set reminders, and any approval or question is yours. A line starting `!` or `/`
1741
- and images are refused. One running and 3 waiting turns per participant (`web.participants.queue`). You pay: each
1742
- participant has a spending cap (`--cap DOLLARS`, default $2, `web.participants.cap`), counted from their turns'
1743
- cost and the side requests they cause; at the cap their next comment is refused and you get a notice, and `chi
1744
- share cap` raises it. `/stats` shows each participant's spend. Their turns go only to a worker with the review
1745
- boundary: restart an older one. While your turn waits at the step limit (Continue or Stop), their turns wait too
1746
- (still queued, still counted): they run, in order, once you continue, stop or send a turn of your own.
1747
- - **Pair turns: sharing a working session.** The read-only review turn is a review session's (`chi review`). Invite
1748
- someone to a working session instead and their turns **act** in it with its tools, writes included, under your
1749
- guardrails: what your rules allow runs, what they ask about comes to you as "Sam's turn asks: approve tool call?"
1750
- with **Allow once** only (nothing session-wide or repo-wide is approved from their calls), and System 1 never
1751
- answers for you. A write outside the project always asks you, whatever you approved before. It can't read or
1744
+ or until the session is archived or deleted. A revoked link shows "This link was revoked by the session's
1745
+ owner.", an expired one "This link expired: ask the session's owner for a new one." A link an older chi issued
1746
+ for read-only review turns has ended too: "This link is from an older chi: ask the session's owner for a new one."
1747
+ (the panel lists it as "ended (older link)"); invite them again.
1748
+ - **Their turns (experimental).** A participant sends messages through chi web's `POST …/turn`: each message is a
1749
+ turn of its own, queued behind the running one, that **acts** in the session with its tools, writes included,
1750
+ under your guardrails: what your rules allow runs, what they ask about comes to you as "Sam's turn asks: approve
1751
+ tool call?" with **Allow once** only (nothing session-wide or repo-wide is approved from their calls), of your stored
1752
+ approvals only those for this session ("Allow … for the session") answer their asks (a call you allowed in this repo
1753
+ or for a rule asks you again), and System 1 never answers for you. A write outside the project always asks you, whatever you approved before. It can't read or
1752
1754
  write secrets or chi's own files (keys, shell startup files, histories, credential files; by a file tool, a
1753
1755
  command, a glob or a variable), run chi, leave a command running in the background, read the environment or the
1754
1756
  keychain, sweep your home with find/tar/cp/grep, delegate, set or cancel reminders, send notes, start or stop
1755
1757
  background tasks, load tools, forget outputs or write memories, and it asks its questions in its reply, not on a
1756
1758
  card. Its commands run without your secret-named environment variables (`KEY`, `TOKEN`, `SECRET`, `PASS`,
1757
1759
  `CREDENTIAL`, `AUTH` in the name) and are killed at the execute limit rather than left running; a command that
1758
- writes outside the project asks you, as a write does (the tmp dirs aside). A pair turn stops mid-turn once their
1759
- cap is passed or their link ends. `chi share` and the panel's Invite
1760
- warn you with what their turns may do and how many tool outputs the history holds, and only a link issued with
1761
- that warning acts: links from before, or issued while the session's worker predated pair turns (the warning says
1762
- so), stay read-only until you restart the worker and invite them again. Their messages carry a `pair` badge and no
1763
- Apply (they acted already). This is an accident guard for a trusted team, not containment: a pair turn can still
1764
- send what it reads out through `web_fetch` or your MCP tools. A link without `--identity` gets the same access:
1765
- share it only with people you'd let type in your session.
1766
- - **The participant page.** Their link opens a page of its own (never yours): the session's title and status, who
1767
- else takes part, and the conversation as a participant sees it: every prompt and reply with who wrote it, each
1768
- step's tools as one line (`read docs/plan.md`: the tool and a project file's path, never arguments or output), and
1769
- the reply streaming in while a turn runs. A "Comment or ask" box sends their comment (your composer's box, with its
1770
- grip to resize or fold it and ↑/↓ over their own earlier comments from that browser; no `/` list, no images yet);
1771
- their queued comments show with **Take back**; "waiting for the owner" shows while you answer a question or an approval of the turn; a refused
1772
- comment (a `!` or `/` line, too many waiting, their cap reached) says why. On a phone it is the thread first with
1773
- the box pinned, tool lines folded. They never see tool output or arguments, thinking, approvals or questions,
1774
- memories, context notes, plugin and delegate input, cards, command output, the working set, cost, timing or host
1775
- paths; secret-shaped text (API keys, tokens, private keys) is redacted too. An agent participant can wait on its
1776
- turns' replies through the API, or with chi: its link's token in a remote, `chi --remote NAME send --wait -m "…" ID`,
1760
+ writes outside the project asks you, as a write does (the tmp dirs aside). A line starting `!` or `/` is refused.
1761
+ `chi share` and the panel's Invite warn you with what their turns may do and how many tool outputs the history
1762
+ holds. This is an accident guard for a trusted team, not containment: a turn can still send what it reads out
1763
+ through `web_fetch` or your MCP tools. A link without `--identity` gets the same access: share it only with people
1764
+ you'd let type in your session.
1765
+ - **Images, queue and cap.** A participant can attach images to their own messages (paste, drop or the image button;
1766
+ png, jpeg, gif or webp), up to 40 per invite and within their cap, when the session's model takes images; they see
1767
+ only their own images, anyone else's as "N images". One running and 3 waiting turns per participant
1768
+ (`web.participants.queue`). You pay: each participant has a spending cap (`--cap DOLLARS`, default $2,
1769
+ `web.participants.cap`), counted from their turns' cost and the side requests they cause; a turn stops mid-turn
1770
+ once their cap is passed or their link ends, their next one is refused and you get a notice, and `chi share cap`
1771
+ raises it. `/stats` shows each participant's spend. Their turns go only to a worker that runs them under your rules,
1772
+ and nobody is invited to a session whose worker predates that ("restart the session first"): restart an older one.
1773
+ While your turn waits at the step limit (Continue or Stop), their turns wait too (still queued, still counted):
1774
+ they run, in order, once you continue, stop or send a turn of your own. Their messages carry a `pair` badge; one
1775
+ an older chi ran read-only reads `· read-only`.
1776
+ - **Their page is the main page.** Their link opens the page you use, as theirs: the session's title, their name
1777
+ ("Alex · invited") and when the link ends, the conversation with the same folded steps, answers and live turn box
1778
+ (what chi says, which tools and files it touches, the working set's file names; never thinking, tool arguments or
1779
+ output), and the composer. Your messages read "owner" to them. Under the composer: the turn's status, the context's
1780
+ fill, the speed (the turn's time while one runs) and what they spent of the cap you set ("$0.42 of $2.00 used").
1781
+ While their own turn runs they can **Stop turn**, and a message goes in at its next step (Alt+Enter keeps it for
1782
+ after the turn); while yours or another participant's runs, it goes in as their own turn afterwards. When their
1783
+ turn waits for you (an approval, a question, your Continue) they see that it waits and for what kind of thing,
1784
+ never its content. At their cap, in a stopped session, or once their link ended the composer gives way to one line
1785
+ and the conversation stays readable. They get none of your controls: no new session, list, rename, model, images
1786
+ (yet), session menu, participants panel, cards or approvals, and no file panel (they ask chi to quote what they
1787
+ need). They never see tool output or arguments, thinking, approvals or questions, memories, context notes,
1788
+ plugin and delegate input, cards, command output, your cost or host paths; secret-shaped text (API keys, tokens,
1789
+ private keys) is redacted too. From the command line an invite link
1790
+ waits on its turns' replies through the API, or with chi: its link's token in a remote, `chi --remote NAME send --wait -m "…" ID`,
1777
1791
  or `send -m`, which prints the turn id `--wait --turn T` takes; that wait exits 3 with `waiting_for_owner` while
1778
1792
  their turn waits on you (a question, an approval, your step-limit Continue) and 1 with `refused` (`cancel_reason`
1779
- `revoked` or `cap_reached`) when their queued turn is refused before it runs. They can't reach anything else: every other route answers them 403, another
1793
+ `revoked`, `outdated` or `cap_reached`) when their queued turn is refused before it runs. They can't reach anything else: every other route answers them 403, another
1780
1794
  session 404.
1781
- - **Apply.** Under each of a participant's review turns that has a reply, your page shows **Apply** (full width on a
1782
- phone): it puts an Apply turn in your composer, not sent, `Apply this proposal from Alex's review turn 3f2a1c0d, as
1783
- far as it fits the plan. It's quoted: …` and the reply quoted line by line. Read it, edit it, send it: the
1784
- participant's text reaches the model as a quote under your line, never as your instruction. Don't send "do what
1785
- Alex said" instead: that hands their words your tools.
1786
1795
  - **Your side of it.** In the session bar, the participants chip (`participants · invite` while nobody has a link,
1787
1796
  then `2 participants`, with a green dot while one is on their page) opens the panel: each participant's state, last visit,
1788
1797
  spend against their cap, turns and expiry, with **Cap** and **Revoke** (revoking ends their page and stream and
1789
- drops their queued comments). **Invite** takes a name, person or agent, the expiry and a cap, and shows the link
1790
- once, with Copy, Share (a phone's share sheet) and its QR code. **Participant view ↗** opens their page for this
1791
- session in a new tab, read-only, through the same server filter: exactly what they see. A participant's prompt
1798
+ drops their queued turns). **Invite** takes a name, the expiry and a cap, and shows the link
1799
+ once, with Copy, Share (a phone's share sheet) and its QR code. A participant's prompt
1792
1800
  shows their name in their colour, live and after a reload.
1793
1801
  - `chi --remote studio share …` invites on studio: the link names studio's LAN address. Locally, the link names
1794
1802
  this machine's running chi web, on the port it listens on (it records it in `$XDG_STATE_HOME/samagotchi/web.json`;
@@ -1799,50 +1807,26 @@ chi share revoke --all # every link to every session
1799
1807
  127.0.0.1). A tunnel link opens only on a device on your tailnet; the grant still decides.
1800
1808
  - **A link for one account.** Behind an auth proxy that names the signed-in user (`web.public_url` with
1801
1809
  `web.proxy.identity_header`, or `chi web --tunnel tailscale`), `--identity EMAIL` binds the link to that account:
1802
- it opens only through the proxy, signed in as EMAIL. A forwarded link opened by anyone else says "This review link
1810
+ it opens only through the proxy, signed in as EMAIL. A forwarded link opened by anyone else says "This link
1803
1811
  is for another account …", and its one-time code still works for EMAIL. `chi share` says `· bound to EMAIL`, `chi
1804
1812
  share ls` `alex@corp · bound`, and the panel's Invite has an email field there. Without such a proxy `--identity`
1805
1813
  is refused (the link could never open); with one, an unbound invite gets a warning line. Through `chi --remote`
1806
1814
  it needs that chi web to have bound links (this version or newer), else it is refused before anything is issued.
1807
1815
  See [configuration.md](configuration.md#inviting-colleagues).
1808
1816
  - The owner's own token and the `chi web --new-token` rotation are separate: rotating it ends no participant's link.
1809
- - **In the attached terminal.** A participant's message reads `Alex ▸ review> is step 3 right?`, the name in that
1817
+ - **In the attached terminal.** A participant's message reads `Alex ▸ invited> is step 3 right?`, the name in that
1810
1818
  participant's own colour (queued, running, and the last exchange when you join); yours stay as they were. A line
1811
1819
  says when someone is invited, revoked or their link expires (`participants> Alex joined (p_7c01d2aa)`,
1812
1820
  `participants> Alex left: their link was revoked`), within a few seconds and between turns, and the status row
1813
- counts who is in the review (`2 participants`). The same commands work from there, on the attached session:
1814
- `/share NAME [--agent] [--expires 3d] [--cap 2]` (the link and its QR code, once), `/participants` (the list),
1821
+ counts who is in the session (`2 participants`). The same commands work from there, on the attached session:
1822
+ `/share NAME [--expires 3d] [--cap 2]` (the link and its QR code, once), `/participants` (the list),
1815
1823
  `/participants revoke [P]` (one participant, or everyone) and `/participants cap P DOLLARS`. They are `chi share`'s
1816
1824
  own, so under `chi --remote NAME` they reach that machine's chi web, as `chi --remote NAME share` does; an invite or
1817
1825
  a revoke made with them isn't announced again by the `participants>` line.
1818
1826
 
1819
- #### Review sessions
1820
-
1821
- Share a **review session**, not a working one: a working session's history holds its tool outputs, and a review
1822
- turn's model may quote them. `chi review` starts one, idle:
1823
-
1824
- ```sh
1825
- chi review docs/plan.md docs/spec.md # a fresh session in this project for those files
1826
- # 4b7e9a01-… review · docs/plan.md, docs/spec.md · idle
1827
- # open it: chi --attach 4b7e9a01 or the web
1828
- # invite someone: chi share 4b7e9a01 --name NAME
1829
- chi review --from 3f9a1c2e docs/plan.md # a review of a working session: its recap, not its transcript
1830
- ```
1831
-
1832
- - Each FILE is a **subject**: a file in the session's project (the git work tree of its folder, `--dir`, else
1833
- here), relative to that folder or absolute. A missing file, a folder, a file outside the project, a secret
1834
- (`.env*`, keys and certificates, credentials files, a git config) or chi's own refuses the review with one line:
1835
- `chi review: .env can't be a review subject: …`. At most 20.
1836
- - `--from ID` (an id, a prefix, `last:ID`) starts a **review fork**: a new session in ID's folder, on its model
1837
- (`--model` to change it) and setup, seeded with a fresh recap of ID (its live worker is asked first, as a continue
1838
- asks), never its transcript. ID keeps running, unarchived, its delegates its own. Its FILEs are relative to ID's
1839
- folder.
1840
- - `chi --remote NAME review … --dir /path/there` starts it on that machine; its chi web checks the files there.
1841
- - Sharing a working session (one `chi review` didn't start) still works, with a warning on stderr that says how many
1842
- tool outputs its history holds: `chi share: warning: 3f9a1c2e is a working session, not a review session: a
1843
- participant's review turn can quote what its history holds (42 tool outputs so far). … (chi review --from 3f9a1c2e
1844
- starts one)`. On the web the participants panel shows the same words before its Invite, with **Start a review of
1845
- it**, and again above the link an invite gives.
1827
+ - **A session an older chi started as a review** (`chi review`, the web's Start review) is an ordinary session
1828
+ now: it stays in the list, its participants' turns act as anyone's, and it carries its last answer and objectives
1829
+ on a continue. `chi review` is gone.
1846
1830
 
1847
1831
  How it works inside (grants, the gate, the routes, the audit trail):
1848
1832
  [internals/participants.md](internals/participants.md).
@@ -2012,7 +1996,7 @@ status> model=Qwen3.6-35B | ⑂ 2 running · 1 waiting | 2 participants | ctx=8.
2012
1996
  ends and when a delegate's report merges into a turn. A
2013
1997
  child that starts waiting on an approval (which doesn't wake the parent) shows at the next of
2014
1998
  those.
2015
- - `N participants`: who is in the session's review now ([Participants](#participants)).
1999
+ - `N participants`: who is in the session now ([Participants](#participants)).
2016
2000
  - `ctx=`: the kernel's context estimate and its bucket, updated during a turn (on hosts that
2017
2001
  report none, `api: openai`, at the turn's end).
2018
2002
  - `mem:`: the memories the session read, with its `--memory` list; `muted:` its `--mute` list.
@@ -1546,14 +1546,13 @@ toolkit:
1546
1546
  | `child` | `lean` plus `send_note`, without `memory_write`, `delegate`, `delegate_result` |
1547
1547
  | `coordinator` | `lean` plus `delegate`, `delegate_result`, `list_sessions`, `objectives` (declared by the coordinator bundle) |
1548
1548
  | `coding` | `child`, with the prompt text `- Be concise in your responses` / `- Show file paths clearly when working with files` (declared by the coordinator bundle, for build and fix children) |
1549
- | `review` | `read`, `memory_read` (not `forget_outputs`, even under the `forget` layer): what a [participant's](internals/participants.md#turns) turn may call, whatever the session declares (the review boundary, [guardrails](guardrails.md#a-participants-review-boundary)). Reserved: `toolkit.kits.review` is refused ("review is reserved for participants' turns"), and a bundle can't declare it. A session may run on it too, as any kit |
1550
1549
 
1551
1550
  - **Plugin tools** (a bundle's `chi.tool`, such as web-search's `web_search`) follow a kit's list as built-ins do:
1552
1551
  `full` (and every kit on `base: full`, the `kits:` default) declares them, another kit leaves them **reachable**
1553
1552
  (below) unless its `remove:` names them, and `add:` declares one (`search: { base: lean, add: [web_search] }`).
1554
1553
  `forget_outputs` is declared in every toolkit under the `forget` layer, unless removed. A `kits:` entry takes
1555
1554
  `base:` (default `full`), `add:`, `remove:`, `prompt:`, `groups:` and `description:` (any other key, a typo or a `tools:` list, is ignored with a warning); it can't reuse a built-in's name
1556
- (`review`'s least of all: it is the participants' boundary). A bundle declares its own with `chi.toolkit`
1555
+ (`full`, `lean`, `child`; `review` is an ordinary name since there is no review kit). A bundle declares its own with `chi.toolkit`
1557
1556
  ([plugins](plugins.md#chitoolkitname-base-add--remove--prompt-nil-groups-nil-description-nil)).
1558
1557
  `description:` is optional classifier input, up to 300 characters; it is not included in the session prompt.
1559
1558
  - **Memory kits.** A memory named `toolkit_<name>.md` defines kit `<name>` with one fenced YAML block containing
@@ -1566,7 +1565,7 @@ toolkit:
1566
1565
  - **Audit suggestions.** `toolkit.suggest.mode: audit` asks System 1 which described kit fits an eligible new session's
1567
1566
  prompt, without changing its toolkit or delaying the turn. It offers the configured default as the fallback and
1568
1567
  `undecided` for greetings or check-ins. Only a default-origin session with at least two described candidates is
1569
- asked; chosen or inherited toolkits, delegate children, review sessions and participant turns are skipped. After
1568
+ asked; chosen or inherited toolkits, delegate children and participant turns are skipped. After
1570
1569
  `undecided`, later owner prompts may be asked again within both defer limits. The default is `off`. System 1's
1571
1570
  host, model and timeout come from `system_one.*`; the suggestion threshold and defer limits are its own
1572
1571
  settings below. Suggestions are
@@ -1602,7 +1601,7 @@ toolkit:
1602
1601
  names or globs; fix config.yml to start a session on toolkit KIT`. A session already saved on it keeps running,
1603
1602
  its kit reaching no group (with a `toolkit>` warning) until config.yml is fixed. Selectors are sorted and deduplicated and match the groups declared when plugins load.
1604
1603
  An omitted key inherits the base's selectors; `full` and `lean` (and `child`, which is on `lean`) reach all
1605
- groups, `review` (the participants' kit) reaches none, `groups: ["*"]` matches every group, and `groups: []`
1604
+ groups, `groups: ["*"]` matches every group, and `groups: []`
1606
1605
  reaches none. A kit whose base doesn't resolve (an unknown name, a cycle) falls back to `full`, which reaches
1607
1606
  every group.
1608
1607
  A selector that matches no group in that load-time snapshot warns once. `find_tools` and `call_tool` are
@@ -1635,11 +1634,10 @@ toolkit:
1635
1634
  and memory kits can add candidates it doesn't see. A kit picked is sent as `POST /api/sessions`'s `toolkit` and
1636
1635
  saved as `chosen`: no suggestion, the default kit included (its row says `default`); without Auto, the default's
1637
1636
  row is the one checked and sends nothing. The list holds the built-ins and config kits a new session can start
1638
- on: not `review`, `child` or a kit named `undecided`, not a kit whose `groups:` refuses a new session, and not one
1637
+ on: not `child` or a kit named `undecided`, not a kit whose `groups:` refuses a new session, and not one
1639
1638
  that doesn't resolve in chi web (a base that is a bundle kit); bundle and memory kits load in the worker, so pick
1640
1639
  them with `/toolkit`. The configured default is always listed. A pick closes the list and shows a `tools: lean`
1641
- chip on the row (a dot on 🧰 on a phone); it is for that create only, never remembered. A review session is
1642
- always `chosen`: with review files set the list says it starts on the default unless you pick a kit.
1640
+ chip on the row (a dot on 🧰 on a phone); it is for that create only, never remembered.
1643
1641
  - **Left out: reachable or removed.** A built-in or plugin tool missing from a kit's base list (`lean` has no
1644
1642
  `delegate` and no `web_search`; a `kits:` entry on `base: lean` or `child` inherits that) is left out softly: it
1645
1643
  is **reachable**. `find_tools` searches it as group `chi` (`chi/delegate`, `chi/web_search`, with its
@@ -1781,9 +1779,9 @@ its own). The first target is a long session such as a day-long coordinator, whe
1781
1779
  - **A new web chat:** the start page's ⚙ panel (beside the model picker; a bottom sheet on a phone) holds the new
1782
1780
  session's rarely used settings, each a row of segments that applies at once: **Thinking** and **Context** (the
1783
1781
  strategy; **Apply and budget ▸** opens the other two fields, with their own Set), the first segment following the
1784
- picked model (`default (high)`), and **Review files…** (docs/sessions.md, Review sessions). A row the picked model
1785
- has no values for is hidden. What is set shows on the row as an accent chip (`think high`, `ctx stale`,
1786
- `review: README.md`) that opens the panel; on a phone ⚙ carries a dot and its label names them. The create sends
1782
+ picked model (`default (high)`). A row the picked model
1783
+ has no values for is hidden. What is set shows on the row as an accent chip (`think high`, `ctx stale`)
1784
+ that opens the panel; on a phone ⚙ carries a dot and its label names them. The create sends
1787
1785
  the context choice as `POST /api/sessions`'s `llm_context` (`{"strategy": "stale,forget", "apply": "turn_end",
1788
1786
  "budget": "64k"}`, each a word as `/llm-context` takes it, `default` for unset; anything else answers
1789
1787
  `400 invalid_llm_context` and starts nothing), so the session file holds it before the first turn runs. Nothing
@@ -1981,17 +1979,17 @@ Keep the state dir (`web-token`, the grants) out of any folder others can read,
1981
1979
  ### Inviting colleagues
1982
1980
 
1983
1981
  Behind a proxy whose sign-in lets colleagues in (a work pod behind Okta and oauth2-proxy, a tailnet you share), give
1984
- each reviewer a link bound to their account:
1982
+ each participant a link bound to their account:
1985
1983
 
1986
1984
  ```sh
1987
1985
  chi share 3f9a1c2e --name Alex --identity alex@corp.example
1988
- # p_7c01d2aa Alex (human, reviewer) · session 3f9a1c2e · expires … · cap $2.00 · bound to alex@corp.example
1986
+ # p_7c01d2aa Alex (reviewer) · session 3f9a1c2e · expires … · cap $2.00 · bound to alex@corp.example
1989
1987
  # https://4567.pod.example.com/#code=chc_…&s=3f9a1c2e-…
1990
1988
  ```
1991
1989
 
1992
1990
  - It needs `web.proxy.identity_header` (or `chi web --tunnel tailscale`): the link opens only through the proxy,
1993
1991
  signed in as that email (any case). Opened by someone else (forwarded, pasted in the wrong chat), on the LAN or on
1994
- this machine, it says "This review link is for another account …", and its one-time code stays: Alex can still open
1992
+ this machine, it says "This link is for another account …", and its one-time code stays: Alex can still open
1995
1993
  it. The refusal is in the session's participants audit with the identity that tried. Without an identity header
1996
1994
  `--identity` is refused: the link could never open.
1997
1995
  - Run only chi 0.109 or newer on the same state dir: an older chi rewriting the grants store drops the binding and
@@ -2385,7 +2383,7 @@ column says so, a `--kebab-name` flag. The maps (`hosts:`, `models:`,
2385
2383
  | `web.host` | `127.0.0.1` | yes | `127.0.0.1`, `::1` or `localhost`; `lan` (this machine's private IPv4 address) or one of its IPv4 addresses also opens `chi web` to the network, with an access token, asked of this machine's 127.0.0.1 too (its `Local:` link carries a one-time code; `chi web --new-token` replaces the token; it is chi web's one access token, also used by `--tunnel` and `web.public_url`/a proxy). Anything else binds `127.0.0.1` with a warning. See [CLI: chi web on your phone](cli.md#chi-web-on-your-phone). |
2386
2384
  | `web.markdown` | `false` | yes | Render answers as Markdown in `chi web`. |
2387
2385
  | `web.working_set` | `true` | yes | The stage view's working set: the files, memories and URLs a turn brought into the model's context, in a rail in the stage, a footprint as each finished turn's block summary and a `set N` chip in place of the mem chip; `false` brings the mem chip back. `?working_set=1` or `?working_set=0` on the page URL overrides it for that page load. See [CLI: the working set](cli.md#the-working-set). |
2388
- | `web.reload_check` | `false` | yes | Opt-in: once each finished turn has moved into the history, the page reads the session again (one full read per turn end), draws that turn as a reload would and compares the two, strictly: a known divergence counts as a mismatch too. `chi web` logs one `reload_checked` line per check and a `reload_mismatch` line naming the kinds that differed, `excused` (the known divergences, `history_shape.js` `ACCEPTED`, that would explain them) and `explained` (all of them had one), with `turn_id`, `drawn` (the turn came back from its drawing, so a mismatch with `drawn: true` is a drawing bug), `undrawn` (how many of the reload's rows came without their turn's drawing, the page's plain fallback: 0 unless chi web missed a turn) and the worker's version: counts only, never content. The count is `grep -c reload_mismatch` over `grep -c reload_checked` in chi web's log, split by `excused`. Cards and answered question cards are left out: a reload places them after the render, which the check doesn't run (the e2e reload checks compare them). Every open owner tab runs the check; `chi web` logs a turn's first report only, and starts over when it restarts. |
2386
+ | `web.reload_check` | `false` | yes | Opt-in: once each finished turn has moved into the history, the page reads the session again (one full read per turn end), draws that turn as a reload would and compares the two, strictly: a known divergence counts as a mismatch too. `chi web` logs one `reload_checked` line per check and a `reload_mismatch` line naming the kinds that differed, `excused` (the known divergences, `history_shape.js` `ACCEPTED`, that would explain them) and `explained` (all of them had one), with `turn_id`, `drawn` (the turn came back from its drawing, so a mismatch with `drawn: true` is a drawing bug), `undrawn` (how many of the reload's rows came without their turn's drawing, the page's plain fallback: 0 unless chi web missed a turn) and the worker's version: counts only, never content. The count is `grep -c reload_mismatch` over `grep -c reload_checked` in chi web's log, split by `excused`. The turn's own cards and answered questions are compared too: a drawn turn already renders its plugin cards, and the snapshot's questions (and an undrawn turn's entries) are placed into the offscreen render by the page's own placer with inert hooks (`cards_offscreen.js`). A card counts as the same when it has the same id and title in the same place, a question when its summary line and the kept reply's plain line do; bodies, buttons, folds and the tag a card is drawn in are ignored. Only entries CardStore attributes to this turn (`of_turn`) are compared: a card of another turn or between turns is dropped by id, and a question the read gives no turn and no opening stamp for (an older worker) is left out on both sides. Between-turn cards and notices stay with the e2e reload checks. Every open owner tab runs the check; `chi web` logs a turn's first report only, and starts over when it restarts. |
2389
2387
  | `web.annotate_presets` | `Agreed\|Could you please elaborate?` | yes | Quick replies next to Annotate in `chi web`, `\|`-separated (a YAML list works too); `""` in the file or on the CLI leaves only Annotate (an empty env value means the default). See [CLI](cli.md#web-annotate-presets). |
2390
2388
  | `web.editor` | `vscode` | yes | What a file ref in `chi web` (a file tool row's title, a diff line) opens, for a viewer on this machine: a preset (`vscode`, `vscode-insiders`, `cursor`, `zed`) or a URL template with `{path}` and an optional `{line}`; `none` turns refs off. See [Opening files from chi web](#opening-files-from-chi-web). |
2391
2389
  | `web.start_dir` | the folder `chi web` runs in | | The folder `chi web` starts in (`chi web --start-dir DIR` for one run): its page (the printed link, a bare `/`, the LAN link and QR code, the Home Screen app) opens on that folder's project, outside a project (no repository or marked folder) on every session, and a new session from the all view starts there; the header's project picker switches projects. `~` and a relative path (resolved from your home folder) work; one that isn't a folder stops `chi web` from starting. `chi web` never changes its own folder. See [CLI](cli.md). |
data/docs/context.md CHANGED
@@ -361,7 +361,7 @@ text. The source itself stays with its old link; forks do not carry this text.
361
361
  `chi send --new --continues` and the web's Continue toast say the same in a
362
362
  few words, and `chi context ls` marks a session's source that stays
363
363
  (`· stays`; `--format json` has the derived `movable`). Project sources are
364
- shared already, and a review fork (`chi review --from`) and a delegate take none.
364
+ shared already, and a delegate takes none.
365
365
 
366
366
  A push into a continued session is refused, nothing written, with the next
367
367
  link's id (`chi context push` exits 1; chi web answers 410
@@ -413,7 +413,7 @@ How a mention counts:
413
413
  - nothing inside a fenced code block: a pasted log's `#412` isn't you asking.
414
414
 
415
415
  Only the session's owner counts: a participant's message, a steer, a note or
416
- a reminder never attaches anything, and a review session gets no candidates.
416
+ a reminder never attaches anything.
417
417
  A bundle usually proposes from an init task that finishes while your first
418
418
  turn runs; when it does, the prompts you already wrote count too, and a hit
419
419
  is attached at once (its note comes with your next turn).
@@ -433,8 +433,7 @@ candidates (attached when the session's owner mentions one):
433
433
 
434
434
  You can also choose yourself: `/context attach NAME` attaches a proposed
435
435
  candidate (its why: "you attached it"), `/context decline NAME` declines it.
436
- Both are the session owner's (a participant can't send a `/` line, and a
437
- review session refuses them); an unknown name, or one attached or declined
436
+ Both are the session owner's (a participant can't send a `/` line); an unknown name, or one attached or declined
438
437
  already, is an error that says so. They are what the judge's card's buttons
439
438
  run (see [On mode](#on-mode)).
440
439
 
@@ -465,7 +464,7 @@ context:
465
464
  What it asks, and when:
466
465
 
467
466
  - **One ask per candidate**, at the start of each of your own turns (never a
468
- participant's, never in a review session or on a Continue), after the
467
+ participant's, never on a Continue), after the
469
468
  toolkit suggestion. A candidate proposed while your turn runs (github-pr's
470
469
  usual case) is asked about right then, on your prompts so far.
471
470
  - **What it sees:** the candidate's title (and description, when the bundle
@@ -556,7 +555,7 @@ It needs [`gh`](https://cli.github.com), logged in (`gh auth login`).
556
555
  "#42 <the PR's title>": nothing reaches the agent until you mention it
557
556
  in a prompt (`#42`, the branch's name, or the PR's URL). Then it is
558
557
  attached in that same turn ("Why: you mentioned #42"). Not in a `chi
559
- scratch` session or a review session, and quietly nothing without `gh`, a
558
+ scratch` session, and quietly nothing without `gh`, a
560
559
  login, a repository or an open PR. A delegate child gets the proposal too
561
560
  (its task may name the PR). At a turn's start more than 5 minutes after
562
561
  its last look, the bundle looks again, beside the turn (a branch switched