samagotchi 0.171.0 → 0.172.1

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 (209) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +46 -1
  3. data/bin/chi +6 -4
  4. data/docs/architecture.md +24 -7
  5. data/docs/bundles.md +4 -21
  6. data/docs/cli.md +50 -80
  7. data/docs/configuration.md +11 -13
  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/bridge.md +29 -3
  14. data/docs/internals/engine.md +21 -9
  15. data/docs/internals/objectives.md +3 -5
  16. data/docs/internals/participants.md +118 -143
  17. data/docs/internals/prompt-caching.md +4 -5
  18. data/docs/internals/web-frontend.md +70 -27
  19. data/docs/internals/working-set.md +7 -5
  20. data/docs/memory.md +1 -1
  21. data/docs/plugins.md +2 -16
  22. data/docs/scheduling.md +1 -1
  23. data/docs/sessions.md +15 -49
  24. data/docs/sub-agent.md +2 -2
  25. data/docs/system-one.md +2 -2
  26. data/docs/testing.md +81 -8
  27. data/lib/samagotchi/bridge/card_store.rb +1 -0
  28. data/lib/samagotchi/bridge/sse_writer.rb +1 -0
  29. data/lib/samagotchi/bridge/turn_accumulator.rb +0 -1
  30. data/lib/samagotchi/bridge.rb +26 -9
  31. data/lib/samagotchi/bridge_client/event_stream.rb +2 -0
  32. data/lib/samagotchi/bundle_command/test_run.rb +1 -0
  33. data/lib/samagotchi/bundle_command/try/run.rb +1 -0
  34. data/lib/samagotchi/bundles/coordinator/manifest.yml +4 -5
  35. data/lib/samagotchi/bundles/coordinator/plugin.rb +6 -79
  36. data/lib/samagotchi/bundles/coordinator/skill_coordinator.md +1 -16
  37. data/lib/samagotchi/bundles/github-pr/manifest.yml +2 -2
  38. data/lib/samagotchi/bundles/github-pr/plugin.rb +0 -1
  39. data/lib/samagotchi/bundles/inline-widgets/manifest.yml +2 -2
  40. data/lib/samagotchi/bundles/inline-widgets/plugin.rb +4 -5
  41. data/lib/samagotchi/bundles/system/manifest.yml +1 -1
  42. data/lib/samagotchi/client_id.rb +126 -67
  43. data/lib/samagotchi/command_intake.rb +15 -3
  44. data/lib/samagotchi/compat.rb +6 -1
  45. data/lib/samagotchi/context_candidate_choice.rb +1 -3
  46. data/lib/samagotchi/context_candidates.rb +3 -4
  47. data/lib/samagotchi/continue_offer.rb +9 -2
  48. data/lib/samagotchi/delivery.rb +23 -12
  49. data/lib/samagotchi/empty_answer_error.rb +5 -0
  50. data/lib/samagotchi/engine/cards.rb +3 -0
  51. data/lib/samagotchi/engine/context_judge.rb +5 -3
  52. data/lib/samagotchi/engine/events.rb +4 -0
  53. data/lib/samagotchi/engine/hooks.rb +3 -0
  54. data/lib/samagotchi/engine/messages.rb +5 -0
  55. data/lib/samagotchi/engine/model_settings.rb +2 -0
  56. data/lib/samagotchi/engine/models.rb +10 -0
  57. data/lib/samagotchi/engine/objectives.rb +6 -0
  58. data/lib/samagotchi/engine/participants.rb +18 -14
  59. data/lib/samagotchi/engine/plugins.rb +8 -0
  60. data/lib/samagotchi/engine/questions.rb +3 -0
  61. data/lib/samagotchi/engine/recap.rb +1 -0
  62. data/lib/samagotchi/engine/session.rb +4 -0
  63. data/lib/samagotchi/engine/side_requests.rb +9 -0
  64. data/lib/samagotchi/engine/steering.rb +2 -0
  65. data/lib/samagotchi/engine/toolkit.rb +5 -0
  66. data/lib/samagotchi/engine/turn_end.rb +7 -0
  67. data/lib/samagotchi/engine/turn_helpers.rb +8 -0
  68. data/lib/samagotchi/engine/verify.rb +2 -0
  69. data/lib/samagotchi/engine.rb +3 -2
  70. data/lib/samagotchi/grants.rb +28 -22
  71. data/lib/samagotchi/guardrail_wiring.rb +23 -18
  72. data/lib/samagotchi/guardrails/approval_use.rb +59 -0
  73. data/lib/samagotchi/guardrails/approvals.rb +9 -11
  74. data/lib/samagotchi/guardrails/child_boundary.rb +1 -0
  75. data/lib/samagotchi/guardrails/gate.rb +10 -5
  76. data/lib/samagotchi/guardrails/implicit_writers.rb +1 -0
  77. data/lib/samagotchi/guardrails/pair_boundary.rb +6 -6
  78. data/lib/samagotchi/guardrails/participant_refusal.rb +33 -0
  79. data/lib/samagotchi/guardrails/review_paths.rb +2 -3
  80. data/lib/samagotchi/guardrails.rb +1 -1
  81. data/lib/samagotchi/llm_context_strategy.rb +2 -0
  82. data/lib/samagotchi/objectives.rb +1 -4
  83. data/lib/samagotchi/objectives_audit.rb +1 -1
  84. data/lib/samagotchi/objectives_track.rb +1 -1
  85. data/lib/samagotchi/owner_prompt.rb +3 -6
  86. data/lib/samagotchi/parent_report.rb +1 -0
  87. data/lib/samagotchi/participant_messages.rb +9 -4
  88. data/lib/samagotchi/participant_turn_mode.rb +50 -0
  89. data/lib/samagotchi/participants.rb +21 -12
  90. data/lib/samagotchi/participants_watch.rb +2 -2
  91. data/lib/samagotchi/plugin/api.rb +2 -2
  92. data/lib/samagotchi/plugin/attached_context.rb +1 -1
  93. data/lib/samagotchi/plugin/context.rb +0 -4
  94. data/lib/samagotchi/plugin/sessions.rb +1 -25
  95. data/lib/samagotchi/run_options.rb +2 -3
  96. data/lib/samagotchi/send_command.rb +10 -10
  97. data/lib/samagotchi/session.rb +0 -3
  98. data/lib/samagotchi/session_access/contract.rb +1 -10
  99. data/lib/samagotchi/session_access/local.rb +10 -23
  100. data/lib/samagotchi/session_access/remote.rb +9 -20
  101. data/lib/samagotchi/session_access.rb +12 -16
  102. data/lib/samagotchi/session_chain.rb +4 -6
  103. data/lib/samagotchi/session_commands.rb +6 -3
  104. data/lib/samagotchi/session_continue.rb +1 -2
  105. data/lib/samagotchi/session_manager/delivery.rb +25 -5
  106. data/lib/samagotchi/session_manager/lifecycle.rb +12 -0
  107. data/lib/samagotchi/session_manager/listing.rb +5 -0
  108. data/lib/samagotchi/session_manager/spawn.rb +2 -2
  109. data/lib/samagotchi/session_manager/worker_command.rb +9 -0
  110. data/lib/samagotchi/session_participants.rb +12 -8
  111. data/lib/samagotchi/session_review.rb +5 -7
  112. data/lib/samagotchi/session_stores.rb +3 -3
  113. data/lib/samagotchi/share_command.rb +10 -12
  114. data/lib/samagotchi/share_terms.rb +41 -0
  115. data/lib/samagotchi/steer.rb +8 -14
  116. data/lib/samagotchi/system_prompt.rb +16 -25
  117. data/lib/samagotchi/terminal_ui/attach_launcher.rb +2 -1
  118. data/lib/samagotchi/terminal_ui/attached_loop/exit_commands.rb +1 -0
  119. data/lib/samagotchi/terminal_ui/attached_loop/queueing.rb +1 -0
  120. data/lib/samagotchi/terminal_ui/attached_loop/sending.rb +2 -0
  121. data/lib/samagotchi/terminal_ui/formatting.rb +15 -17
  122. data/lib/samagotchi/terminal_ui/participant_commands.rb +2 -2
  123. data/lib/samagotchi/terminal_ui/status_row.rb +2 -2
  124. data/lib/samagotchi/terminal_ui.rb +1 -2
  125. data/lib/samagotchi/testing/sessions.rb +2 -10
  126. data/lib/samagotchi/tool_runner.rb +8 -9
  127. data/lib/samagotchi/toolkit.rb +4 -22
  128. data/lib/samagotchi/toolkit_suggest.rb +3 -3
  129. data/lib/samagotchi/tools/deferred_tools.rb +1 -0
  130. data/lib/samagotchi/tools/execute.rb +11 -45
  131. data/lib/samagotchi/tools/leftovers.rb +126 -0
  132. data/lib/samagotchi/tools/memory.rb +70 -26
  133. data/lib/samagotchi/tools/task_get.rb +1 -0
  134. data/lib/samagotchi/tools/task_list.rb +3 -2
  135. data/lib/samagotchi/tools/task_record.rb +6 -4
  136. data/lib/samagotchi/tools/task_runtime.rb +199 -20
  137. data/lib/samagotchi/tools/task_wait.rb +4 -3
  138. data/lib/samagotchi/turn_context.rb +1 -1
  139. data/lib/samagotchi/turn_origin.rb +1 -1
  140. data/lib/samagotchi/turn_stages/context_judge.rb +4 -4
  141. data/lib/samagotchi/turn_stages/objectives.rb +2 -2
  142. data/lib/samagotchi/turn_stages/toolkit_suggestion.rb +2 -2
  143. data/lib/samagotchi/update_hint.rb +3 -1
  144. data/lib/samagotchi/verify_fresh.rb +1 -1
  145. data/lib/samagotchi/verify_fresh_origin.rb +13 -11
  146. data/lib/samagotchi/version.rb +1 -1
  147. data/lib/samagotchi/web/app.rb +3 -5
  148. data/lib/samagotchi/web/participant_access.rb +14 -18
  149. data/lib/samagotchi/web/participant_review.rb +3 -4
  150. data/lib/samagotchi/web/participant_show.rb +4 -3
  151. data/lib/samagotchi/web/participant_view.rb +3 -3
  152. data/lib/samagotchi/web/participants_admin.rb +21 -40
  153. data/lib/samagotchi/web/public/app.js +7 -48
  154. data/lib/samagotchi/web/public/card_kinds.js +51 -0
  155. data/lib/samagotchi/web/public/cards_place.js +13 -2
  156. data/lib/samagotchi/web/public/data.js +2 -10
  157. data/lib/samagotchi/web/public/delivery_line.js +17 -60
  158. data/lib/samagotchi/web/public/index.html +10 -30
  159. data/lib/samagotchi/web/public/live_turn.js +1 -1
  160. data/lib/samagotchi/web/public/owner_claim.js +2 -2
  161. data/lib/samagotchi/web/public/participant_bar.js +4 -5
  162. data/lib/samagotchi/web/public/participant_names.js +14 -10
  163. data/lib/samagotchi/web/public/participants_panel.js +29 -62
  164. data/lib/samagotchi/web/public/question_cards.js +29 -14
  165. data/lib/samagotchi/web/public/reload_check.js +2 -3
  166. data/lib/samagotchi/web/public/send_turn.js +4 -23
  167. data/lib/samagotchi/web/public/session_actions.js +4 -45
  168. data/lib/samagotchi/web/public/session_fields.js +0 -1
  169. data/lib/samagotchi/web/public/session_state.js +0 -3
  170. data/lib/samagotchi/web/public/session_sync.js +4 -2
  171. data/lib/samagotchi/web/public/session_view.js +2 -3
  172. data/lib/samagotchi/web/public/settings_panel.js +4 -18
  173. data/lib/samagotchi/web/public/stage_answer.js +56 -0
  174. data/lib/samagotchi/web/public/stage_asking.js +30 -11
  175. data/lib/samagotchi/web/public/stage_cloud.js +93 -0
  176. data/lib/samagotchi/web/public/stage_dom.js +100 -0
  177. data/lib/samagotchi/web/public/stage_handoff.js +154 -0
  178. data/lib/samagotchi/web/public/stage_pager.js +59 -0
  179. data/lib/samagotchi/web/public/stage_place.js +144 -0
  180. data/lib/samagotchi/web/public/stage_probe.js +64 -0
  181. data/lib/samagotchi/web/public/stage_quiet_clock.js +52 -0
  182. data/lib/samagotchi/web/public/stage_view.js +133 -506
  183. data/lib/samagotchi/web/public/stage_waiting.js +30 -13
  184. data/lib/samagotchi/web/public/start_page.js +12 -33
  185. data/lib/samagotchi/web/public/start_settings.js +24 -78
  186. data/lib/samagotchi/web/public/start_toolkit.js +6 -10
  187. data/lib/samagotchi/web/public/stream_handlers.js +1 -9
  188. data/lib/samagotchi/web/public/turn_block.js +3 -7
  189. data/lib/samagotchi/web/public/turn_events.js +15 -6
  190. data/lib/samagotchi/web/public/turn_pieces.js +3 -4
  191. data/lib/samagotchi/web/public/viewer_self.js +8 -2
  192. data/lib/samagotchi/web/qr.rb +1 -1
  193. data/lib/samagotchi/web/session_control.rb +3 -1
  194. data/lib/samagotchi/web/session_create.rb +5 -71
  195. data/lib/samagotchi/web/session_summary.rb +1 -4
  196. data/lib/samagotchi/web/verify_fresh_routes.rb +8 -7
  197. data/lib/samagotchi/web/viewer.rb +3 -3
  198. data/lib/samagotchi/worker.rb +16 -14
  199. data/lib/samagotchi/worker_inbound.rb +4 -3
  200. data/lib/samagotchi/worker_link.rb +17 -0
  201. data/lib/samagotchi/working_set.rb +87 -28
  202. metadata +16 -8
  203. data/lib/samagotchi/guardrails/review_boundary.rb +0 -99
  204. data/lib/samagotchi/participant_mode.rb +0 -86
  205. data/lib/samagotchi/review_apply.rb +0 -131
  206. data/lib/samagotchi/review_command.rb +0 -123
  207. data/lib/samagotchi/review_start.rb +0 -196
  208. data/lib/samagotchi/web/public/review_apply.js +0 -34
  209. data/lib/samagotchi/web/public/review_start.js +0 -55
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e45a5742b8855d69057bb153ca6cf956fa351408b583ae278564443cb7952f73
4
- data.tar.gz: fa6dec2db1397d60c023f3bd939b5a36795c5482f59a42f768a99455829ee533
3
+ metadata.gz: 373feecab32762e6d14c5740f3989bc31d93722133f1f956783e4203a977a44b
4
+ data.tar.gz: b7bb34bbfa66dcb9ea47f464856d4eb7cbf9ed696bf3ab59f72cc34bee69bcc9
5
5
  SHA512:
6
- metadata.gz: 37dac3cb11eed26b34929ba153e25294ece85fcb88fe12f3e3a4b3e4cce2d2ac881983cfb200c0c13febae830d6ca1ce74e7afffa61eb4a9cb7f2d0daf836633
7
- data.tar.gz: 28e81c566c62bcee5da8fcbc234c08b4486a8d2bbf6d320f3c28dd85d9e28ab4a1f7ac961a2a00333700db345b206b24cb4e5f3901fb7306b35942c159d8fd3c
6
+ metadata.gz: 20c1e7acc7574a0cd8c216a76faacc12de4466ce8728900374b459bc99ea7875093c51a8f56cf2ca685d7463937cc378a7f868e0502f80025fd0ec98d39d0e91
7
+ data.tar.gz: b63932bda384afa0d83f966e988f18945728b62a1af362452c3fcb4d2f5d6d89cda359ec1c74624b5b3119242de3a62f99100bd7d4a0f7c654d9d2f56d4d5374
data/CHANGELOG.md CHANGED
@@ -8,6 +8,49 @@ and commands may change between minor versions. How releases are made:
8
8
 
9
9
  ## [Unreleased]
10
10
 
11
+ ## [0.172.1] - 2026-11-14
12
+
13
+ ### Fixed
14
+
15
+ - `execute`: the hint for a background process that left the command's process group and is still running now says chi
16
+ can't stop it and to kill it if it shouldn't run, instead of advising how to keep it running.
17
+ - Web: a card you folded while the turn waits stays folded after a reload or a reconnect when the session has an answered
18
+ question (in its history, or earlier in the same turn); it used to come back unfolded. Answering one card no longer
19
+ unfolds another you folded.
20
+
21
+ Update with `chi update`.
22
+
23
+ ## [0.172.0] - 2026-11-14
24
+
25
+ ### Changed
26
+
27
+ - Participants: one kind of invite. An invited person's turns act in the session under your guardrails (asks come to you, Allow once only); there are no read-only turns any more. `chi share` and the panel's Invite always say so, and refuse to invite anyone to a session whose worker is older ("restart the session first").
28
+ - `chi share`: text invites and `ls` label the stored `reviewer` role as `participant`.
29
+ - Participants: a link an older chi issued for read-only review turns has ended: opening it says "This link is from an older chi: ask the session's owner for a new one", the panel lists it as "ended (older link)", and its queued turns are refused. Invite them again. Restart `chi web` after updating: an older chi web still running keeps such a link opening (and its conversation readable) until then; restarted sessions refuse its turns either way.
30
+ - A session an older chi started as a review is an ordinary session now: it stays in the list, its participants' turns act like anyone's, and a continue carries its last answer and objectives.
31
+ - `toolkit.kits.review` is an ordinary config kit name now (there is no built-in review kit).
32
+ - `chi` commands that run no turn start faster: `bin/chi` no longer loads the engine for every command (`chi --version` 203 → 63 ms, `chi home` 204 → 69 ms, `chi sessions list` 206 → 149 ms on a Mac Studio).
33
+ - Participants' words: links are "this link …" rather than "this review link …", a participant's prompt is labelled `invited`, their badge reads `· pair` (an older chi's read-only turn `· read-only`), and `chi send` says "queued as turn T".
34
+ - Participants: a participant's turn uses only your approvals for this session ("Allow … for the session"); a call your repo or rule approval would allow asks you on a card.
35
+ - Participants: a participant's turn in your own Verify fresh child is refused before it starts ("revoked"), rather than starting and having every call denied as an older chi's.
36
+ - Input that names no sender is never taken as yours: its `/model x` line is text and its `!` line is refused, it doesn't un-archive the session, and the worker's `POST /command` without a `client_id` answers 400 (every chi UI and command names itself); from a participant, a delegate, a plugin or an id chi doesn't know it answers 403 and runs nothing. A session's first prompt and your Continue / Stop on a card still count as yours.
37
+ - Participants: a participant's client id is `participant:<id>` (was `review:<id>`); a `review:<id>` from before (drawn turns, queued input, an older `chi web` or worker still running) is read as a participant's until 0.173.
38
+
39
+ ### Removed
40
+
41
+ - Review sessions: `chi review` (and `chi --remote … review`), the web's Start review and the start page's review files.
42
+ - Apply: the owner's turn quoting a review turn's proposal, on the web.
43
+ - `chi share --agent`, `/share --agent` and the panel's person / agent choice: a participant is a participant. An invite link still works from the command line (its token as a Bearer header).
44
+ - The plugin API's `ctx.review?` and `ctx.sessions.review`, with no stub: a bundle that still calls them gets an error (NoMethodError) there, and is flagged by `chi bundle check` and on `chi update`. The coordinator bundle's `/coordinate review` goes with them (coordinator 0.9.0; inline-widgets 0.1.2 and github-pr 0.6.5 treat every session alike).
45
+
46
+ ### Fixed
47
+
48
+ - `chi -p` in a terminal: a turn that ends with an empty answer prints "chi: the model gave an empty answer" again, instead of an error (NameError) since 0.171.0.
49
+ - chi web: a memory in the working set is marked stale when a project memory or model overlay now answers its read.
50
+ - A background task that leaves processes running after its command ends (`cmd &` without `wait`) has them stopped, as `execute` does, and the task's result says so. `execute`'s note on a stopped background process now says to start a long job with `task_create` in the foreground (no `&`).
51
+
52
+ Update with `chi update` (it upgrades coordinator to 0.9.0, github-pr to 0.6.5 and inline-widgets to 0.1.2), then restart chi web and running sessions (`chi sessions restart`).
53
+
11
54
  ## [0.171.0] - 2026-11-14
12
55
 
13
56
  ### Added
@@ -6316,7 +6359,9 @@ and long-lived sessions.
6316
6359
  - A macOS desktop helper (`chi desktop install`): a "Send to chi" Service and a
6317
6360
  hotkey panel that send selected text or the clipboard to your sessions.
6318
6361
 
6319
- [Unreleased]: https://github.com/dm1try/samagotchi/compare/v0.171.0...HEAD
6362
+ [Unreleased]: https://github.com/dm1try/samagotchi/compare/v0.172.1...HEAD
6363
+ [0.172.1]: https://github.com/dm1try/samagotchi/compare/v0.172.0...v0.172.1
6364
+ [0.172.0]: https://github.com/dm1try/samagotchi/compare/v0.171.0...v0.172.0
6320
6365
  [0.171.0]: https://github.com/dm1try/samagotchi/compare/v0.170.0...v0.171.0
6321
6366
  [0.170.0]: https://github.com/dm1try/samagotchi/compare/v0.169.0...v0.170.0
6322
6367
  [0.169.0]: https://github.com/dm1try/samagotchi/compare/v0.168.0...v0.169.0
data/bin/chi CHANGED
@@ -24,7 +24,9 @@ rescue Samagotchi::ConfigFile::RemovedApi => e
24
24
  warn "Error: #{e.message}"
25
25
  exit 1
26
26
  end
27
- require "samagotchi"
27
+ # No `require "samagotchi"` (the engine, everything a turn needs): each branch
28
+ # below requires what it uses, so `chi --version` or `chi home` loads no
29
+ # engine and no Reline (docs/architecture.md, What each process loads).
28
30
 
29
31
  # A web self-restart re-enters through the installed wrapper: its marker and
30
32
  # the worker starters to adopt leave ENV before anything spawns with it
@@ -77,10 +79,8 @@ SUBCOMMANDS = {
77
79
  "send" => ["samagotchi/send_command", "SendCommand"],
78
80
  # answer the question a session waits on, then wait (--question, --option)
79
81
  "answer" => ["samagotchi/answer_command", "AnswerCommand"],
80
- # invite participants to review a session, list them, revoke them
82
+ # invite participants into a session, list them, revoke them
81
83
  "share" => ["samagotchi/share_command", "ShareCommand"],
82
- # a review session for files, or of a session (--from, --dir, --model)
83
- "review" => ["samagotchi/review_command", "ReviewCommand"],
84
84
  # find a model server and write config.yml (--model, --name)
85
85
  "bootstrap" => ["samagotchi/bootstrap_command", "BootstrapCommand"],
86
86
  # bring an installed chi up to date
@@ -277,6 +277,7 @@ if options[:web]
277
277
  end
278
278
 
279
279
  # --resume and --attach take a unique id prefix too, like git.
280
+ require "samagotchi/session"
280
281
  begin
281
282
  %i[resume attach].each { |key| options[key] &&= Samagotchi::Session.resolve_id(options[key]) }
282
283
  rescue Samagotchi::Session::AmbiguousId => e
@@ -444,6 +445,7 @@ end
444
445
  # --non-interactive: the -p prompt's one turn in this process (TerminalUI,
445
446
  # the one-shot host); bare, a no-op that creates no session.
446
447
  require "samagotchi/cli/exit"
448
+ require "samagotchi/terminal_ui"
447
449
  begin
448
450
  ended = Samagotchi::TerminalUI.new(
449
451
  prompt: options[:prompt],
data/docs/architecture.md CHANGED
@@ -192,6 +192,26 @@ another Ruby), `Desktop::MacOS#launch_problem` / `#home_problem`, `ChiShim.probl
192
192
  `ProjectEnv.last_warning` (the newest `project_env` / `project_env_applied` record for the folder, from the debug
193
193
  log's last 4 MB). Rows: [configuration.md](configuration.md#checking-it-chi-home-doctor).
194
194
 
195
+ ### What each process loads
196
+
197
+ Each entry point requires what it uses, so a process loads its own part of chi and no more:
198
+
199
+ | Process | Entry | Loads |
200
+ |---|---|---|
201
+ | a worker | the boot string's `samagotchi/worker_boot` | the boot, then the Worker, its Engine and Bridge; no TerminalUI, no Reline |
202
+ | `chi <subcommand>`, `chi self`, `chi web push` | `bin/chi`, then the subcommand's file | that command's closure; no `engine.rb`, no Reline (`chi --version` 27 of chi's files, `chi sessions list` about 270) |
203
+ | the attached TUI | `bin/chi` → `terminal_ui/attach_launcher` | the TUI, Reline and its Bridge client; no `engine.rb` |
204
+ | chi web | `bin/chi` → `web/server` | the control plane; no `engine.rb` |
205
+ | the one-shot (`-p X --non-interactive`) | `bin/chi` → `terminal_ui` | TerminalUI and an Engine of its own |
206
+ | outside callers (a script, `chi bundle try`'s sandbox, the suite's `fork_chi` preload) | `samagotchi` (`lib/samagotchi.rb`) | eager: everything a turn needs |
207
+
208
+ `bin/chi` never requires the umbrella `samagotchi.rb`: each branch requires its own file (`samagotchi/session` before
209
+ the `--resume`/`--attach` id check, `samagotchi/terminal_ui` before the one-shot). The rule: **a file requires what it
210
+ names**; `autoload` only for a constant defined in one file, never for a namespace other files reopen (that fires
211
+ the autoload from inside the reopening file and ends in a `NameError`). `spec/require_cycle_spec.rb` pins it: no
212
+ `engine.rb` or Reline for `chi --version`, `home`, `sessions list` and `schedule list`, no TerminalUI or Reline in a
213
+ worker.
214
+
195
215
  ## Session retention & ordering
196
216
 
197
217
  - **Files:** `~/.local/state/samagotchi/sessions/<uuid>.json` + `<uuid>/input|output|owner.lock|bridge.json` (XDG-aware), and the `<uuid>/stopped`, `<uuid>/starting` and `<uuid>/archived` marker files. Durable schedules belong to the machine, not a session: `~/.local/state/samagotchi/schedules.json` and its `schedules.lock`, next to `sessions/` ([Scheduling](scheduling.md)).
@@ -457,7 +477,7 @@ token-gated like the rest (LAN mode: `Authorization: Bearer`), and one that take
457
477
  that isn't one, or no such session: 404 `not_found`). Every `ROUTES` row also names who may use it, checked against
458
478
  the request's `Web::Principal` (`App#principal_for`): `owner`, or `participant` for a route a participant may use too.
459
479
  A participant (a `Grants` token for one session) may use the page (`GET /`), `GET /api/info`, their session's
460
- show, review and filtered stream, and their turns and waits, each answered as theirs; every other route is `owner` (Permission below, and the participants routes in
480
+ show and filtered stream, and their turns and waits, each answered as theirs; every other route is `owner` (Permission below, and the participants routes in
461
481
  [internals/participants.md](internals/participants.md)); `spec/web/principal_spec.rb` fails on a row without one. How a request flows end to end, which checks run where and the trust
462
482
  model: [internals/remote-sessions.md](internals/remote-sessions.md).
463
483
 
@@ -490,8 +510,6 @@ model: [internals/remote-sessions.md](internals/remote-sessions.md).
490
510
  | `POST /api/sessions/:id/turn` (`no_interrupt`) | owner | `no_interrupt: true`: the turn runs with the raised iteration limit (`SessionManager.deliver_turn(no_interrupt:)`, to the Bridge or the input file) | as before | |
491
511
  | `POST /api/sessions/:id/command` (its 501) | owner | | | 501 `not_supported` for a builtin the worker lacks adds `command` (`"/title"`) and `message` |
492
512
  | `GET`/`POST`/`DELETE /api/sessions/:id/participants`, `GET`/`DELETE /api/participants` | owner | `chi share`'s (`name`, `kind`, `ttl`; `?id=p_…`) | the grants, never a token but POST's own once ([internals/participants.md](internals/participants.md)) | 400 `invalid_participant`; 404; 409 `grants_unwritable` (the store doesn't read: its words, which a remote `chi share` prints as a local one does) |
493
- | `GET /api/sessions/:id/apply[?turn=T]` | owner | `turn`: a turn id or a prefix (none: the latest review turn with a reply) | 200 `{text, turn_id, author, author_name}` (`ReviewApply`): the owner's Apply of a participant's review turn, for the composer, never sent ([internals/participants.md](internals/participants.md)) | 404 `not_found`; 400 `not_review_turn`; 409 `no_reply` |
494
- | `POST /api/sessions` (`review`) | owner | `review: {subjects: [project files], from: a session id}`; never with `prompt`, `preview`, `idle` or `continues` (a `from` takes the source's folder and setup) | 201 as a create's: an idle review session (`ReviewStart.start`, or `ReviewStart.fork` with `from`) | 400 `invalid_review` (`ReviewStart::Refused`'s words: a subject, a gone folder); with `from` also 404 `not_found`, 400 `ambiguous_id` |
495
513
 
496
514
  `GET /api/info` names the feature `session_commands` (`SessionAccessRoutes::FEATURE`): `SessionAccess::Remote` asks it
497
515
  once before its first request, and a chi web without it (or `serve_static`'s 404 for a path no route takes) is "remote NAME runs chi X, too
@@ -627,7 +645,7 @@ A map of the parts the overview above doesn't name (paths under `lib/samagotchi/
627
645
  | Paths | `paths.rb` (`Paths`) | The XDG base dirs chi's files live under, read from the env on every call: `Paths.state_home` (`$XDG_STATE_HOME`, else `~/.local/state`) and `Paths.config_home` (`$XDG_CONFIG_HOME`, else `~/.config`), both defaults under `Dir.home`; a blank variable counts as unset, a relative one is made absolute from the current directory. `Paths.tilde` shows a path with `~` for the home folder. `SessionManager` hands a spawned worker the spawner's `XDG_STATE_HOME` / `XDG_CONFIG_HOME`, when set, made absolute, so a relative one isn't read from the session's folder. |
628
646
  | MemoryBundle | `memory_bundle.rb`, `memory_bundle/{installer,builder,installed_bundle,plugin_ref,bundle_hook}.rb` (`Installer`, `Builder`, `InstalledBundle`, `PluginRef`, `BundleHook`) | Installing, building and reading bundles of memories, rules, plugins and scripts (`BundleHook`: an older record's retired class-file hook). |
629
647
  | Bundle authoring | `bundle_command.rb` (`BundleCommand`), `bundle_command/{scaffold,check,test_run}.rb`, `bundle_command/try/{run,sandbox,trace}.rb`, `testing.rb` + `testing/` (the test kit) | `chi bundle new`, `check`, `test` and `try`, and the kit a bundle's tests load it with ([bundle-authoring.md](bundle-authoring.md), [internals/bundles.md](internals/bundles.md)). |
630
- | Session file | `session.rb` (`Session`, `Session::FIELDS`), `session_field.rb` (`SessionField`), `session_paths.rb` (`SessionPaths`), `session_setup.rb` (`SessionSetup`) | A session's `<uuid>.json`: one `SessionField` row per key (default, cast, what the file gets; the codec on its type), from which `Session.new`, `.from_h` and `#to_h` are built; `SessionPaths` is where the file and the session's dir are and the id rule, a leaf `Session` extends (so `ArchiveStore`, `ContextSources` and `ParticipantMode` name no `Session` constant; the first two still require session.rb at load, `ParticipantMode` lazily); `SessionSetup` the settings a fork and a continue carry (`.of`), applied by member name; every new-session request (chi's run flags, the one-shot, `chi send --new`, chi web's create) builds its setup with `SessionSetup.from_request`, and `spec/session_setup_entrypoints_spec.rb` holds each entrypoint's cell for each member. See [sessions.md](sessions.md#session-file). |
648
+ | Session file | `session.rb` (`Session`, `Session::FIELDS`), `session_field.rb` (`SessionField`), `session_paths.rb` (`SessionPaths`), `session_setup.rb` (`SessionSetup`) | A session's `<uuid>.json`: one `SessionField` row per key (default, cast, what the file gets; the codec on its type), from which `Session.new`, `.from_h` and `#to_h` are built; `SessionPaths` is where the file and the session's dir are and the id rule, a leaf `Session` extends (so `ArchiveStore` and `ContextSources` name no `Session` constant; both still require session.rb at load); `SessionSetup` the settings a fork and a continue carry (`.of`), applied by member name; every new-session request (chi's run flags, the one-shot, `chi send --new`, chi web's create) builds its setup with `SessionSetup.from_request`, and `spec/session_setup_entrypoints_spec.rb` holds each entrypoint's cell for each member. See [sessions.md](sessions.md#session-file). |
631
649
  | Session config (`--set`) | `session_config.rb` (`SessionConfig`, `SessionConfig::Settings`) | A session's own settings as one value (`Session#settings`, `SessionSetup#settings`): `core`, the `--set KEY=VALUE` values of the core keys marked `session: true` (`Config::Entry`), typed by `Config.coerce!` and read first through `Config.get(key, session:)` (`RecapSetup`; `Engine#session=` rebuilds the recap job, `IdleScheduler#replace_job`), file key `config_settings`; `bundles`, the `--set BUNDLE.KEY=VALUE` values, checked against the manifest's `session_settings:`, laid over `bundles: <name>:` in `ctx.settings` ([plugins.md](plugins.md)), file key `bundle_settings`. `SessionConfig.clash` refuses a bundle setting named like a core one (install, `chi bundle check`). See [configuration.md](configuration.md#per-session-settings). |
632
650
  | Plugin API | `plugin/api.rb` (`Plugin::Api`), `plugin/tool_spec.rb` (`Plugin::ToolSpec`: a checked tool declaration, how it is registered), `plugin/loader.rb`, `plugin/context.rb` (`ctx`), `plugin/http.rb` + `plugin/http_transport.rb` (`ctx.http`), `plugin/card.rb` (`Plugin::Card`) | What a bundle's plugin registers: tools, commands, annotation actions, hooks, services, toolkits, peer sources; what its handlers get as `ctx` ([plugins.md](plugins.md)). |
633
651
  | Peer bundles' base | `plugin/peer.rb` (`Plugin::Peer`) | What claude-peer and codex-peer share (the send tool, the command, the cards, payloads); each bundle's subclass sets its strings and transport ([bundles.md](bundles.md#the-claude-peer-bundle)). |
@@ -643,12 +661,11 @@ A map of the parts the overview above doesn't name (paths under `lib/samagotchi/
643
661
  | Attached context | `context_sources.rb` (`ContextSources`), `context_poller.rb`, `context_absorber.rb`, `context_candidates.rb` (`ContextCandidates`: proposed sources, attached on the owner's mention at a turn's start, before the worker's absorb, or in a one-shot's turn; `owner_prompt.rb` decides whose words count), `peer_sources.rb` (`PeerSources`: the sources peer bundles declare) | External sources a session keeps fresh, and the peer loop's wakes ([context.md](context.md)). |
644
662
  | LLM context strategies | `llm_context_strategy.rb`, `llm_context_view.rb`, `llm_context_stale.rb`, `llm_context_forget.rb` | What a request sends of the history (none, stale, forget) ([internals/llm-context-forget.md](internals/llm-context-forget.md)). |
645
663
  | Session chains | `session_continue.rb` (`SessionContinue`), `session_chain.rb` (`SessionChain`), `session_chain/links.rb` (`SessionChain::Links`) | A session that continues an earlier one. `SessionChain::Links` is the one chain walker (one listing; `latest`, `first_live`, `root`, `next_of`): `SessionChain.latest`/`.next_of`, `SessionInbox::Head` and the schedule tick all ask it. `SessionChain.opener_for` gives the text web `continue →` prefills in the new link: the previous link's own first typed message when that link continues one itself, else nil (the 201's `opener`; not saved) ([sessions.md](sessions.md)). |
646
- | Review sessions | `review_start.rb` (`ReviewStart`), `session_review.rb` (`SessionReview`, the session's `review` field), `review_command.rb` (`ReviewCommand`, `chi review`), `review_apply.rb` (`ReviewApply`) | A session made to be shared: idle, its subjects project files checked by `Guardrails::ReviewPaths`, a fork of a working session from its recap (`--from`); Apply quotes a participant's review turn into the owner's composer ([sessions.md](sessions.md#review-sessions), [internals/participants.md](internals/participants.md)). |
647
- | chi web's routes | `web/app.rb` (`Web::App`: the gate, `ROUTES`, the shared helpers), `web/message_display.rb` (`Web::MessageDisplay`: saved messages and cards as display items, the owner show's stamped with their turns' drawings and carrying no parts (a step's ✂ marks only), the participant review's with their parts, `POST /api/render`), `web/session_show.rb` (`Web::SessionShow`: `GET /api/sessions/:id` with its `cards`, `tail` and `timing` re-reads, `GET …/output`, the timing payload), `web/session_create.rb` (`Web::SessionCreate`: `POST /api/sessions`, a continue, a review fork), `web/session_control.rb` (`Web::SessionControl`: answer, command, turn and images, cancel, stop, restart, archive, delete), `web/push_routes.rb` (`Web::PushRoutes`: `/api/push`, its subscriptions, prefs, test and presence), `web/block_renderer_routes.rb` (`Web::BlockRendererRoutes`: `GET /api/block_renderers` and one renderer's file, [internals/block-renderers.md](internals/block-renderers.md)), `web/reload_check_route.rb` (`Web::ReloadCheckRoute`: `POST /api/sessions/:id/reload_check`, the opt-in `web.reload_check`'s counts from the page's `reload_check.js`, 204 and one `reload_checked` log line, with `reload_mismatch`, its `kinds`, `excused` (ACCEPTED ids) and `explained` when the turn read otherwise after a reload; the worker's version is chi web's own view, its sidecar) | The handlers `App`'s `ROUTES` name, in the file that holds their kind; each mixin is included in `App` and reads its helpers and ivars, so `app.send(:handle_show, …)` and the specs that stub `App` methods work as before. |
664
+ | chi web's routes | `web/app.rb` (`Web::App`: the gate, `ROUTES`, the shared helpers), `web/message_display.rb` (`Web::MessageDisplay`: saved messages and cards as display items, the owner show's stamped with their turns' drawings and carrying no parts (a step's ✂ marks only), the participant show's with their parts, `POST /api/render`), `web/session_show.rb` (`Web::SessionShow`: `GET /api/sessions/:id` with its `cards`, `tail` and `timing` re-reads, `GET …/output`, the timing payload), `web/session_create.rb` (`Web::SessionCreate`: `POST /api/sessions`, a continue), `web/session_control.rb` (`Web::SessionControl`: answer, command, turn and images, cancel, stop, restart, archive, delete), `web/verify_fresh_routes.rb` (`Web::VerifyFreshRoutes`: Verify fresh children), `web/working_set_routes.rb` (`Web::WorkingSetRoutes`: the working set routes), `web/viewer.rb` (`Web::Viewer`: page capabilities), `web/push_routes.rb` (`Web::PushRoutes`: `/api/push`, its subscriptions, prefs, test and presence), `web/block_renderer_routes.rb` (`Web::BlockRendererRoutes`: `GET /api/block_renderers` and one renderer's file, [internals/block-renderers.md](internals/block-renderers.md)), `web/reload_check_route.rb` (`Web::ReloadCheckRoute`: `POST /api/sessions/:id/reload_check`, the opt-in `web.reload_check`'s counts from the page's `reload_check.js`, 204 and one `reload_checked` log line, with `reload_mismatch`, its `kinds`, `excused` (ACCEPTED ids) and `explained` when the turn read otherwise after a reload; the worker's version is chi web's own view, its sidecar) | The handlers `App`'s `ROUTES` name, in the file that holds their kind; each mixin is included in `App` and reads its helpers and ivars, so `app.send(:handle_show, …)` and the specs that stub `App` methods work as before. |
648
665
  | Web Push | `web/push.rb` (`Web::Push`: `Runtime`, `preflight!`, the `web.push.*` settings), `web/push/crypto.rb` (`Push::Crypto`: RFC 8291 aes128gcm, RFC 8292 VAPID), `web/push/store.rb` (`Push::Store`, `Store::Sub`: `web-push/vapid.pem`, `subscriptions.json`), `web/push/client.rb` (`Push::Client`, `Client::Result`), `web/push/attention.rb` (`Push::Attention`: notify.js's rules in Ruby, shared cases in `spec/fixtures/attention_cases.json`), `web/push/presence.rb` (`Push::Presence`: the pages' "in front" reports), `web/push/notifier.rb` (`Push::Notifier`, a hub subscriber with a sender thread), `web/push_routes.rb` (`Web::PushRoutes`), `private_files.rb` (`PrivateFiles`, shared with the grants), `public/sw.js`, `public/push.js`, `public/manifest.webmanifest` | chi web pushes what the tab notifies for (approvals, questions, step-limit questions, cards, failed turns; done turns to a device that asks) to the owner's Home Screen app over an https public URL: the Notifier turns the hub's new attentions into show pushes after a hold, unless a chi web page is in front, at most 30 an hour, with one retry and a restart catch-up (`sent.json`) (each carries the keys still open, and the badge; no close push: every push shows a notification); the bell (`notifications.js`) subscribes the device, and the service worker and the page close the answered ones. See [internals/web-push.md](internals/web-push.md). |
649
666
  | chi web's updates | `web/update_check.rb` (`Web::UpdateCheck`), `web/update_ops.rb` (`Web::UpdateOps`), `web/auto_update.rb` (`Web::AutoUpdate`) | The RubyGems checker and its `update_check.json`; the install, worker-restart and chi-web-restart operations (one at a time) the owner's routes and AutoUpdate share; `update.auto: install`'s thread (install when no turn runs, then idle workers and chi web). See [configuration](configuration.md#unattended-updates-updateauto). |
650
667
  | Behind an auth proxy | `web/public_url.rb` (`Web::PublicUrl`: `web.public_url`, `web.proxy.identity_header`, `web.proxy.owner`), `web/proxy_gate.rb` (`Web::ProxyGate`, mixed into App; `RawHeaderNames`, prepended to WEBrick's request by `Web::Server`), `web/link_codes.rb` (`Web::LinkCodes`: the links' one-time codes), `proxy_trace.rb` (`ProxyTrace`), `web/public/token_fragment.js`, `web/public/auth_lost.js`, `web/tunnel.rb` + `web/tunnel/tailscale.rb` (`Web::Tunnel`, `Web::Tunnel::Tailscale`: `chi web --tunnel tailscale`, Tailscale Serve set for one run and the PublicUrl it makes) | Experimental: chi web behind an auth proxy. Every request needs the token; a proxied one's owner also needs the identity header (one clean value under one name); the `__Host-` cookie, an absolute `Location` from the public URL, https links with a one-time code in the fragment; the page's lost-sign-in banner. Bridges refuse proxy traces ([configuration.md](configuration.md#behind-an-auth-proxy)). |
651
- | Participants | `participants.rb` (`Participants`, the `participants.json` sidecar), `share_command.rb` (`ShareCommand`, `chi share`), `session_participants.rb`, `participants_watch.rb`, `grants.rb` (`Grants`), `participant_exposure.rb` (`ParticipantExposure`), `web/principal.rb` (`Web::Principal`), `web/participant_access.rb` (`Web::ParticipantAccess`: the participant's gate and routes), `web/participants_admin.rb` (`Web::ParticipantsAdmin`: the owner's invite, list, revoke, cap and Apply routes), `web/participant_review.rb` + `web/participant_view.rb` (`Web::ParticipantReview`, `Web::ParticipantView`), `redact.rb` (`Redact`, `Redact::Viewer`: the redaction every string a participant gets passes, also the Engine's Verify quote check), `web/participant_stream_filter.rb`, `guardrails/review_boundary.rb` + `guardrails/review_paths.rb` | The people or agents an owner invites to review one session through chi web: their grants and gate, what they read, their read-only review turns ([internals/participants.md](internals/participants.md), [guardrails.md](guardrails.md)). |
668
+ | Participants | `participants.rb` (`Participants`, the `participants.json` sidecar), `share_command.rb` (`ShareCommand`, `chi share`), `session_participants.rb`, `participants_watch.rb`, `grants.rb` (`Grants`), `participant_exposure.rb` (`ParticipantExposure`), `web/principal.rb` (`Web::Principal`), `web/participant_access.rb` (`Web::ParticipantAccess`: the participant's gate and routes), `web/participants_admin.rb` (`Web::ParticipantsAdmin`: the owner's invite, list, revoke and cap routes), `web/participant_review.rb` + `web/participant_view.rb` (`Web::ParticipantReview`, `Web::ParticipantView`), `web/participant_show.rb` (`Web::ParticipantShow`), `web/participant_images.rb` (`Web::ParticipantImages`), `participant_uploads.rb` (`ParticipantUploads`), `participant_revise.rb` (`ParticipantRevise`), `participant_messages.rb` (`ParticipantMessages`), `revise_anchor.rb` (`ReviseAnchor`), `redact.rb` (`Redact`, `Redact::Viewer`: the redaction every string a participant gets passes, also the Engine's Verify quote check), `web/participant_stream_filter.rb`, `share_terms.rb` (`ShareTerms`), `guardrails/pair_boundary.rb` + `guardrails/participant_refusal.rb` + `guardrails/review_paths.rb` | The people an owner invites into one session through chi web: their grants and gate, what they read, their turns under the owner's guardrails ([internals/participants.md](internals/participants.md), [guardrails.md](guardrails.md)). |
652
669
  | Analytics | `analytics_file.rb` (`AnalyticsFile`), `session_metrics/totals.rb` (`SessionMetrics::Totals`), `session_metrics/model_segment.rb` (`SessionMetrics::ModelSegment`) | A session's `analytics.json` (`SessionMetrics#persist`); the sums over its turn records (`Totals`: tokens, cost, speeds, kept as running counters) and their split per model after a `/model` switch (`ModelSegment`: a run of turns on one model, the `model_segments` rows); `session_metrics/cost.rb` (`SessionMetrics::Cost`): the spend `ctx.cost` reads; `session_metrics/usage.rb` (`SessionMetrics::Usage`): the work `ctx.usage` reads. `session_metrics/side_totals.rb` (`SessionMetrics::SideTotals`) and `side_usage.rb` (`SideUsage`): the side requests' sums, apart from the turns'. |
653
670
  | Images / vision | `image_store.rb` (`ImageStore`), `vision_support.rb`, `vision_context.rb` | Stored prompt images and whether a model takes them. |
654
671
  | Toolkits | `toolkit.rb` (`Toolkit`), `toolkit_binding.rb` (`ToolkitBinding`, the Engine's seam), `toolkit_command.rb` (`/toolkit`), `tools/registry.rb` (`Registry#toolkit`), `tools/tool_surface.rb` (`ToolSurface#left_out`, read by the prompt and `/toolkit`), `web/public/toolkit_chip.js` | Which registered tools a session's prompts declare: saved in the session, resolved at a turn's start (`Engine#apply_toolkit!`), named in the prompt's not-loaded line, a kit's prompt text after the appended files; `chi.toolkit` and `ctx.use_toolkit` for plugins ([configuration.md](configuration.md#toolkits)). |
data/docs/bundles.md CHANGED
@@ -273,8 +273,7 @@ bundles:
273
273
  | `categories`, `engines` | unset | comma-separated. SearXNG silently drops names it doesn't know, so a typo gives its defaults |
274
274
 
275
275
  - **Privacy:** the query goes to your SearXNG and on to the engines it is configured with. No guardrail rule asks
276
- about it by default; add one (`tool: web_search`, `verdict: ask`) if you want to approve each search. A review
277
- turn can't call it.
276
+ about it by default; add one (`tool: web_search`, `verdict: ask`) if you want to approve each search.
278
277
  - **Toolkits:** the tool follows a kit's list like a built-in ([Toolkits](configuration.md#toolkits)). `full` (and
279
278
  any kit on `base: full`) declares it (about 150 tokens per request); on `lean`, `child` and the kits built on them
280
279
  it is reachable, not declared: the model finds it with `find_tools` (`chi/web_search`) and calls it with
@@ -926,21 +925,6 @@ replies wouldn't come back by themselves there.
926
925
  report ending with the `/coordinate resume <slug>` to pick it up next
927
926
  time. It starts, merges and stops nothing: running children stay running
928
927
  and are named in the report.
929
- - **Sprint review (experimental, 0.6.0).** **`/coordinate review [name]`**
930
- starts a review session of this coordinator session (`ctx.sessions.review`:
931
- its recap, never its transcript; this session keeps running) seeded with the
932
- open handoff's body (the one named, the only one, or a card with a Review
933
- action each when several are open; with none, the recap alone), and prints
934
- the `chi share <id> --name NAME` line. A participant (a manager, a teammate)
935
- brings new context there; the skill's Sprint review section (copied into
936
- the seed: a participant's turn reads project memories only, and the skill
937
- is a system one) has the review's model answer it with a **hand-off diff** (the handoff's lines as
938
- they would change, in a `diff` block, and what it means per branch), in a
939
- turn that may only read. Your **Apply** under it (the web's) quotes the
940
- diff in your turn there: the model brings the handoff up to date and
941
- re-plans in words, and starts, stops or merges nothing from the review
942
- session: the coordinator session picks the change up from the handoff,
943
- and merges as it always does. Experimental: it may go if it doesn't earn its place.
944
928
  - **The coordinator toolkit.** The bundle declares `coordinator`: `lean`
945
929
  plus `delegate`, `delegate_result`, `list_sessions` and `objectives` (the skill records moves with it)
946
930
  ([Toolkits](configuration.md#toolkits)). `/coordinate` puts a fresh session
@@ -1376,10 +1360,9 @@ this API (`lib/samagotchi/bundles/inline-widgets/plugin.rb`) and has no settings
1376
1360
  choose from.
1377
1361
  - **Where it draws**: chi web, in the answers. The terminal shows the block's YAML, and a block chi can't read stays
1378
1362
  YAML with a short note under it.
1379
- - **Where the prompt has none**: a delegate child (its parent reads the report, nobody sees it drawn), a one-shot
1380
- `chi -p … --non-interactive`, and a review session (`chi review`: its participants' page draws no widgets, so they
1381
- would read the YAML). A working session you pair in keeps them: your page draws them, and inviting someone later
1382
- doesn't change the prompt. `/stats` lists the sections a session's prompt holds: `picks (inline-widgets), walk
1363
+ - **Where the prompt has none**: a delegate child (its parent reads the report, nobody sees it drawn) and a one-shot
1364
+ `chi -p … --non-interactive`. A session with participants keeps them: its pages draw them, and inviting someone
1365
+ later doesn't change the prompt. `/stats` lists the sections a session's prompt holds: `picks (inline-widgets), walk
1383
1366
  (inline-widgets)`.
1384
1367
  - **Cost**: about 2,900 characters in the stable part of the prompt, the same at every build, so the prompt cache keeps.
1385
1368
  - **Uninstall**: `chi bundle uninstall inline-widgets` takes the sections out of new sessions' prompts (a session you
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
 
@@ -1453,8 +1452,8 @@ On a touch screen (a phone, a tablet) the bar sits just above the composer
1453
1452
  instead of next to the selection, where the system's own Copy menu and the
1454
1453
  selection handles would cover it; several pills wrap to a second row.
1455
1454
 
1456
- Participants get the same on their page (a `chi share` / `chi review`
1457
- link, the main page): a selection quotes into their composer with the same
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
1458
1457
  presets; no plugin pills and no Copy link there.
1459
1458
 
1460
1459
  After the presets comes a built-in **Verify**: the quote, then
@@ -1464,7 +1463,7 @@ claim a verdict card can come from; elsewhere (an earlier reply, a step, a messa
1464
1463
  still running) the bar keeps its other actions. A session whose worker predates Verify (started by an older chi) refuses it (409
1465
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
1466
1465
  also offers **Copy link**: a link to that turn and quote for a participant's
1467
- 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
1468
1467
  scrolled to the quote and highlights it; with no one invited, a link to it
1469
1468
  on your own page. A secret in the selection goes into the link as
1470
1469
  `[redacted]`, as the participant's page shows it. One browser holds one participant link at a time, and
@@ -1723,12 +1722,12 @@ How it works inside (`SessionAccess`, chi web's routes, where each check runs):
1723
1722
 
1724
1723
  ### Participants
1725
1724
 
1726
- A session's owner can invite **participants**, people or agents, to review it through chi web on the LAN
1727
- (`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:
1728
1727
 
1729
1728
  ```sh
1730
1729
  chi share 3f9a1c2e --name Alex
1731
- # 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
1732
1731
  # http://192.168.1.29:4567/?token=chp_…#s=3f9a1c2e-…
1733
1732
  # (shown once: chi keeps only its digest; chi share revoke 3f9a1c2e p_7c01d2aa ends it)
1734
1733
  chi share ls # every session's participants (--format json; never a token)
@@ -1738,42 +1737,42 @@ chi share revoke --all # every link to every session
1738
1737
  ```
1739
1738
 
1740
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
1741
- participant; opening it sets their browser's cookie, as the owner's LAN link does. `--agent` marks an agent
1742
- 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.
1743
1743
  - It works for 7 days (`--expires Nh` or `Nd`, 1 hour to 30 days; `web.participants.expires`), until it is revoked,
1744
- or until the session is archived or deleted. A revoked link shows "This review link was revoked by the session's
1745
- owner.", an expired one "This review link expired: ask the session's owner for a new one."
1746
- - **Review turns (experimental).** A participant can ask questions and comment through chi web's `POST …/turn`: each
1747
- message is a turn of its own, queued behind the running one, that the model answers **read-only**. It may read the
1748
- project (never its secret files or chi's own), and proposes changes as text or a diff for you to apply; it can't
1749
- write, run, fetch, send notes or set reminders, and any approval or question is yours. A line starting `!` or `/`
1750
- is refused. A participant can attach images to their own messages (paste, drop or the image button; png, jpeg, gif
1751
- or webp), up to 40 per invite and within their cap, when the session's model takes images; they see only their own
1752
- images, anyone else's as "N images". One running and 3 waiting turns per participant (`web.participants.queue`). You pay: each
1753
- participant has a spending cap (`--cap DOLLARS`, default $2, `web.participants.cap`), counted from their turns'
1754
- cost and the side requests they cause; at the cap their next comment is refused and you get a notice, and `chi
1755
- share cap` raises it. `/stats` shows each participant's spend. Their turns go only to a worker with the review
1756
- boundary: restart an older one. While your turn waits at the step limit (Continue or Stop), their turns wait too
1757
- (still queued, still counted): they run, in order, once you continue, stop or send a turn of your own.
1758
- - **Pair turns: sharing a working session.** The read-only review turn is a review session's (`chi review`). Invite
1759
- someone to a working session instead and their turns **act** in it with its tools, writes included, under your
1760
- guardrails: what your rules allow runs, what they ask about comes to you as "Sam's turn asks: approve tool call?"
1761
- with **Allow once** only (nothing session-wide or repo-wide is approved from their calls), and System 1 never
1762
- 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
1763
1754
  write secrets or chi's own files (keys, shell startup files, histories, credential files; by a file tool, a
1764
1755
  command, a glob or a variable), run chi, leave a command running in the background, read the environment or the
1765
1756
  keychain, sweep your home with find/tar/cp/grep, delegate, set or cancel reminders, send notes, start or stop
1766
1757
  background tasks, load tools, forget outputs or write memories, and it asks its questions in its reply, not on a
1767
1758
  card. Its commands run without your secret-named environment variables (`KEY`, `TOKEN`, `SECRET`, `PASS`,
1768
1759
  `CREDENTIAL`, `AUTH` in the name) and are killed at the execute limit rather than left running; a command that
1769
- writes outside the project asks you, as a write does (the tmp dirs aside). A pair turn stops mid-turn once their
1770
- cap is passed or their link ends. `chi share` and the panel's Invite
1771
- warn you with what their turns may do and how many tool outputs the history holds, and only a link issued with
1772
- that warning acts: links from before, or issued while the session's worker predated pair turns (the warning says
1773
- so), stay read-only until you restart the worker and invite them again. Their messages carry a `pair` badge and no
1774
- Apply (they acted already). This is an accident guard for a trusted team, not containment: a pair turn can still
1775
- send what it reads out through `web_fetch` or your MCP tools. A link without `--identity` gets the same access:
1776
- share it only with people you'd let type in your session.
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`.
1777
1776
  - **Their page is the main page.** Their link opens the page you use, as theirs: the session's title, their name
1778
1777
  ("Alex · invited") and when the link ends, the conversation with the same folded steps, answers and live turn box
1779
1778
  (what chi says, which tools and files it touches, the working set's file names; never thinking, tool arguments or
@@ -1787,21 +1786,16 @@ chi share revoke --all # every link to every session
1787
1786
  (yet), session menu, participants panel, cards or approvals, and no file panel (they ask chi to quote what they
1788
1787
  need). They never see tool output or arguments, thinking, approvals or questions, memories, context notes,
1789
1788
  plugin and delegate input, cards, command output, your cost or host paths; secret-shaped text (API keys, tokens,
1790
- private keys) is redacted too. An agent participant can wait on its
1791
- turns' replies through the API, or with chi: its link's token in a remote, `chi --remote NAME send --wait -m "…" ID`,
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`,
1792
1791
  or `send -m`, which prints the turn id `--wait --turn T` takes; that wait exits 3 with `waiting_for_owner` while
1793
1792
  their turn waits on you (a question, an approval, your step-limit Continue) and 1 with `refused` (`cancel_reason`
1794
- `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
1795
1794
  session 404.
1796
- - **Apply.** Under each of a participant's review turns that has a reply, your page shows **Apply** (full width on a
1797
- phone): it puts an Apply turn in your composer, not sent, `Apply this proposal from Alex's review turn 3f2a1c0d, as
1798
- far as it fits the plan. It's quoted: …` and the reply quoted line by line. Read it, edit it, send it: the
1799
- participant's text reaches the model as a quote under your line, never as your instruction. Don't send "do what
1800
- Alex said" instead: that hands their words your tools.
1801
1795
  - **Your side of it.** In the session bar, the participants chip (`participants · invite` while nobody has a link,
1802
1796
  then `2 participants`, with a green dot while one is on their page) opens the panel: each participant's state, last visit,
1803
1797
  spend against their cap, turns and expiry, with **Cap** and **Revoke** (revoking ends their page and stream and
1804
- drops their queued comments). **Invite** takes a name, person or agent, the expiry and a cap, and shows the link
1798
+ drops their queued turns). **Invite** takes a name, the expiry and a cap, and shows the link
1805
1799
  once, with Copy, Share (a phone's share sheet) and its QR code. A participant's prompt
1806
1800
  shows their name in their colour, live and after a reload.
1807
1801
  - `chi --remote studio share …` invites on studio: the link names studio's LAN address. Locally, the link names
@@ -1813,50 +1807,26 @@ chi share revoke --all # every link to every session
1813
1807
  127.0.0.1). A tunnel link opens only on a device on your tailnet; the grant still decides.
1814
1808
  - **A link for one account.** Behind an auth proxy that names the signed-in user (`web.public_url` with
1815
1809
  `web.proxy.identity_header`, or `chi web --tunnel tailscale`), `--identity EMAIL` binds the link to that account:
1816
- 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
1817
1811
  is for another account …", and its one-time code still works for EMAIL. `chi share` says `· bound to EMAIL`, `chi
1818
1812
  share ls` `alex@corp · bound`, and the panel's Invite has an email field there. Without such a proxy `--identity`
1819
1813
  is refused (the link could never open); with one, an unbound invite gets a warning line. Through `chi --remote`
1820
1814
  it needs that chi web to have bound links (this version or newer), else it is refused before anything is issued.
1821
1815
  See [configuration.md](configuration.md#inviting-colleagues).
1822
1816
  - The owner's own token and the `chi web --new-token` rotation are separate: rotating it ends no participant's link.
1823
- - **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
1824
1818
  participant's own colour (queued, running, and the last exchange when you join); yours stay as they were. A line
1825
1819
  says when someone is invited, revoked or their link expires (`participants> Alex joined (p_7c01d2aa)`,
1826
1820
  `participants> Alex left: their link was revoked`), within a few seconds and between turns, and the status row
1827
- counts who is in the review (`2 participants`). The same commands work from there, on the attached session:
1828
- `/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),
1829
1823
  `/participants revoke [P]` (one participant, or everyone) and `/participants cap P DOLLARS`. They are `chi share`'s
1830
1824
  own, so under `chi --remote NAME` they reach that machine's chi web, as `chi --remote NAME share` does; an invite or
1831
1825
  a revoke made with them isn't announced again by the `participants>` line.
1832
1826
 
1833
- #### Review sessions
1834
-
1835
- Share a **review session**, not a working one: a working session's history holds its tool outputs, and a review
1836
- turn's model may quote them. `chi review` starts one, idle:
1837
-
1838
- ```sh
1839
- chi review docs/plan.md docs/spec.md # a fresh session in this project for those files
1840
- # 4b7e9a01-… review · docs/plan.md, docs/spec.md · idle
1841
- # open it: chi --attach 4b7e9a01 or the web
1842
- # invite someone: chi share 4b7e9a01 --name NAME
1843
- chi review --from 3f9a1c2e docs/plan.md # a review of a working session: its recap, not its transcript
1844
- ```
1845
-
1846
- - Each FILE is a **subject**: a file in the session's project (the git work tree of its folder, `--dir`, else
1847
- here), relative to that folder or absolute. A missing file, a folder, a file outside the project, a secret
1848
- (`.env*`, keys and certificates, credentials files, a git config) or chi's own refuses the review with one line:
1849
- `chi review: .env can't be a review subject: …`. At most 20.
1850
- - `--from ID` (an id, a prefix, `last:ID`) starts a **review fork**: a new session in ID's folder, on its model
1851
- (`--model` to change it) and setup, seeded with a fresh recap of ID (its live worker is asked first, as a continue
1852
- asks), never its transcript. ID keeps running, unarchived, its delegates its own. Its FILEs are relative to ID's
1853
- folder.
1854
- - `chi --remote NAME review … --dir /path/there` starts it on that machine; its chi web checks the files there.
1855
- - Sharing a working session (one `chi review` didn't start) still works, with a warning on stderr that says how many
1856
- tool outputs its history holds: `chi share: warning: 3f9a1c2e is a working session, not a review session: a
1857
- participant's review turn can quote what its history holds (42 tool outputs so far). … (chi review --from 3f9a1c2e
1858
- starts one)`. On the web the participants panel shows the same words before its Invite, with **Start a review of
1859
- 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.
1860
1830
 
1861
1831
  How it works inside (grants, the gate, the routes, the audit trail):
1862
1832
  [internals/participants.md](internals/participants.md).
@@ -2026,7 +1996,7 @@ status> model=Qwen3.6-35B | ⑂ 2 running · 1 waiting | 2 participants | ctx=8.
2026
1996
  ends and when a delegate's report merges into a turn. A
2027
1997
  child that starts waiting on an approval (which doesn't wake the parent) shows at the next of
2028
1998
  those.
2029
- - `N participants`: who is in the session's review now ([Participants](#participants)).
1999
+ - `N participants`: who is in the session now ([Participants](#participants)).
2030
2000
  - `ctx=`: the kernel's context estimate and its bucket, updated during a turn (on hosts that
2031
2001
  report none, `api: openai`, at the turn's end).
2032
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