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
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a13b61890c6a215efb8f13715a30637a12324d560eec91f1f827a849156453c9
4
- data.tar.gz: d839197f63a218e01cd48ee326f17f25c7b9027c906ccdf5cd78b855e31b05f8
3
+ metadata.gz: bfe906ee3292322e9a57c71caedb63f4ace3ad5248d1c0f95bdc424db1d92bad
4
+ data.tar.gz: 896b04b2697472298a152e14f261a97544304ab7223b04989a2baacb38669203
5
5
  SHA512:
6
- metadata.gz: fcef2226618d6d543b180c536a24cb8b2e669a1c5a309a424b7c64acede977ade18593a36af9da5cf0e15a1e5781502f8dae3b2f7c78d61b7193905dc4538c86
7
- data.tar.gz: f66ae46d4079588380f56a7fe6ffd7f222fc7eea442545f1200ce5598a8897681a9e3924ad3933189320870f6cf0e9ad18e389b763cf5f55db863c625a7433ab
6
+ metadata.gz: 279e46b4a993c87614a76c6f02f90da96a5cdfc2442fe3aa410d9bccfbc5e095b9e3aff35d9517513dc4bc606e3b06c3c733e3933b8ce0c393bf6b8914e4f5ec
7
+ data.tar.gz: e1429785e271590573057eefe132b955f3da83a790594bcaad4bf7cdd2362b8a5a451675d9c61c25debe9b9175877b70366172fc270216f484964d963b1c0b72
data/CHANGELOG.md CHANGED
@@ -8,6 +8,64 @@ and commands may change between minor versions. How releases are made:
8
8
 
9
9
  ## [Unreleased]
10
10
 
11
+ ## [0.172.0] - 2026-11-14
12
+
13
+ ### Changed
14
+
15
+ - 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").
16
+ - `chi share`: text invites and `ls` label the stored `reviewer` role as `participant`.
17
+ - 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.
18
+ - 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.
19
+ - `toolkit.kits.review` is an ordinary config kit name now (there is no built-in review kit).
20
+ - `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).
21
+ - 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".
22
+ - 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.
23
+ - 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.
24
+ - 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.
25
+ - 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.
26
+
27
+ ### Removed
28
+
29
+ - Review sessions: `chi review` (and `chi --remote … review`), the web's Start review and the start page's review files.
30
+ - Apply: the owner's turn quoting a review turn's proposal, on the web.
31
+ - `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).
32
+ - 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).
33
+
34
+ ### Fixed
35
+
36
+ - `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.
37
+ - chi web: a memory in the working set is marked stale when a project memory or model overlay now answers its read.
38
+ - 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 `&`).
39
+
40
+ 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`).
41
+
42
+ ## [0.171.0] - 2026-11-14
43
+
44
+ ### Added
45
+
46
+ - chi web: see what chi has of a working-set item: a row's ▸ in the working set list peeks at its latest edit or read, and "Open the timeline" (also a tool row's "timeline" and a file ref's "What chi has") shows every read as merged line slices over a strip of the file, every edit as its diff, slices chi no longer has greyed, and for a memory that changed since chi read it, the diff to what it says now.
47
+ - chi web: a participant can attach images to their own turn (paste, drop or the image button); they see their own thumbnails only, up to 40 images per invite, within their cap.
48
+ - chi web: a participant can Revise the answer to their own message (when no one else's turn came after it); the earlier version folds into a stack on every page, and a participant's page now draws Revise stacks too.
49
+
50
+ ### Changed
51
+
52
+ - chi web: the opt-in reload check (`web.reload_check`) now compares a turn's cards and answered questions, not just its rows: a card or question a reload places differently is a mismatch.
53
+ - chi web: a participant's message sent while their own turn runs now goes into that turn at its next step, as the owner's does; during someone else's turn it still waits and runs as their own turn after it.
54
+ - chi web: a participant's link now opens the main page: the same conversation, live turn box and composer as the owner's, with their name and link expiry at the top, their spending against the cap under the composer, Stop turn on their own turns, "waiting for the owner" (and for what kind of thing) when their turn needs you, and the composer giving way to one line at their limit, in a stopped session or once their link ended. Your messages read "owner" to them; they get none of your controls and no file panel.
55
+ - chi web: pressing Enter twice while a message is still being sent sends it once.
56
+
57
+ ### Removed
58
+
59
+ - chi web: the separate participant page (with its Plan view of a review's files) and the owner's "Participant view ↗" in the participants panel.
60
+
61
+ ### Fixed
62
+
63
+ - A reply that is only a tool call written as text, closing with `</tool_call>`, is asked again instead of taken as the answer.
64
+ - chi web: a memory in the working set is marked stale when its file, or the model overlay read with it, changed since chi read it.
65
+ - chi web: a page opened while a turn runs shows the context percent at once, not `ctx ?`.
66
+ - chi web: in the iPhone Home Screen app, the top bar no longer sits in iOS's blurred band under the clock.
67
+ - chi web: a question card folded in the turn box stays folded after a reload or when the page reconnects mid-turn.
68
+
11
69
  ## [0.170.0] - 2026-11-13
12
70
 
13
71
  ### Fixed
@@ -6289,7 +6347,9 @@ and long-lived sessions.
6289
6347
  - A macOS desktop helper (`chi desktop install`): a "Send to chi" Service and a
6290
6348
  hotkey panel that send selected text or the clipboard to your sessions.
6291
6349
 
6292
- [Unreleased]: https://github.com/dm1try/samagotchi/compare/v0.170.0...HEAD
6350
+ [Unreleased]: https://github.com/dm1try/samagotchi/compare/v0.172.0...HEAD
6351
+ [0.172.0]: https://github.com/dm1try/samagotchi/compare/v0.171.0...v0.172.0
6352
+ [0.171.0]: https://github.com/dm1try/samagotchi/compare/v0.170.0...v0.171.0
6293
6353
  [0.170.0]: https://github.com/dm1try/samagotchi/compare/v0.169.0...v0.170.0
6294
6354
  [0.169.0]: https://github.com/dm1try/samagotchi/compare/v0.168.0...v0.169.0
6295
6355
  [0.168.0]: https://github.com/dm1try/samagotchi/compare/v0.167.0...v0.168.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)).
@@ -240,8 +260,8 @@ agent logic and can be used without any terminal rendering; the UI is a thin lay
240
260
  run's own prompts until their turns end; `#run` distinguishes an empty answer from a
241
261
  prompt this terminal removed before it ran (both exit 1), as well as chi's other outcomes.
242
262
  Without a capable terminal it falls back to `PlainSurface` (append-only).
243
- - The browser's page (`lib/samagotchi/web/public/`: `app.js` for the owner, `participant.js` for a participant) is a
244
- client of chi web: where its state lives, which redraw follows which write, its render idioms, stale-answer guards,
263
+ - The browser's page (`lib/samagotchi/web/public/`: `app.js`, the owner's and a participant's alike, with
264
+ `participant_main.js` for what is a participant's) is a client of chi web: where its state lives, which redraw follows which write, its render idioms, stale-answer guards,
245
265
  storage keys and streams are in [internals/web-frontend.md](internals/web-frontend.md).
246
266
 
247
267
  #### Using the core
@@ -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