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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +61 -1
- data/bin/chi +6 -4
- data/docs/architecture.md +26 -9
- data/docs/bundles.md +4 -21
- data/docs/cli.md +81 -97
- data/docs/configuration.md +12 -14
- data/docs/context.md +5 -6
- data/docs/guardrails.md +57 -96
- data/docs/hooks.md +3 -4
- data/docs/internals/attached-context.md +6 -7
- data/docs/internals/background-tasks.md +4 -3
- data/docs/internals/block-renderers.md +2 -2
- data/docs/internals/bridge.md +34 -7
- data/docs/internals/context-telemetry.md +13 -1
- data/docs/internals/engine.md +25 -13
- data/docs/internals/inline-widgets.md +1 -1
- data/docs/internals/objectives.md +4 -6
- data/docs/internals/participants.md +340 -249
- data/docs/internals/prompt-caching.md +4 -5
- data/docs/internals/web-frontend.md +185 -35
- data/docs/internals/working-set.md +71 -5
- data/docs/memory.md +1 -1
- data/docs/plugins.md +2 -16
- data/docs/releasing.md +2 -1
- data/docs/scheduling.md +1 -1
- data/docs/sessions.md +17 -48
- data/docs/sub-agent.md +2 -2
- data/docs/system-one.md +2 -2
- data/docs/testing.md +56 -7
- data/lib/samagotchi/bridge/card_store.rb +1 -0
- data/lib/samagotchi/bridge/sse_writer.rb +1 -0
- data/lib/samagotchi/bridge/turn_accumulator.rb +8 -5
- data/lib/samagotchi/bridge.rb +64 -20
- data/lib/samagotchi/bridge_client/event_stream.rb +2 -0
- data/lib/samagotchi/bundle_command/test_run.rb +1 -0
- data/lib/samagotchi/bundle_command/try/run.rb +1 -0
- data/lib/samagotchi/bundles/coordinator/manifest.yml +4 -5
- data/lib/samagotchi/bundles/coordinator/plugin.rb +6 -79
- data/lib/samagotchi/bundles/coordinator/skill_coordinator.md +1 -16
- data/lib/samagotchi/bundles/github-pr/manifest.yml +2 -2
- data/lib/samagotchi/bundles/github-pr/plugin.rb +0 -1
- data/lib/samagotchi/bundles/inline-widgets/manifest.yml +2 -2
- data/lib/samagotchi/bundles/inline-widgets/plugin.rb +4 -5
- data/lib/samagotchi/bundles/system/manifest.yml +1 -1
- data/lib/samagotchi/client_id.rb +126 -67
- data/lib/samagotchi/command_intake.rb +15 -3
- data/lib/samagotchi/compat.rb +6 -1
- data/lib/samagotchi/context_candidate_choice.rb +1 -3
- data/lib/samagotchi/context_candidates.rb +3 -4
- data/lib/samagotchi/continue_offer.rb +9 -2
- data/lib/samagotchi/delivery.rb +36 -12
- data/lib/samagotchi/empty_answer_error.rb +5 -0
- data/lib/samagotchi/engine/cards.rb +3 -0
- data/lib/samagotchi/engine/context_judge.rb +5 -3
- data/lib/samagotchi/engine/events.rb +4 -0
- data/lib/samagotchi/engine/hooks.rb +3 -0
- data/lib/samagotchi/engine/messages.rb +5 -0
- data/lib/samagotchi/engine/model_settings.rb +2 -0
- data/lib/samagotchi/engine/models.rb +10 -0
- data/lib/samagotchi/engine/objectives.rb +6 -0
- data/lib/samagotchi/engine/participants.rb +18 -14
- data/lib/samagotchi/engine/plugins.rb +8 -0
- data/lib/samagotchi/engine/questions.rb +3 -0
- data/lib/samagotchi/engine/recap.rb +1 -0
- data/lib/samagotchi/engine/session.rb +4 -0
- data/lib/samagotchi/engine/side_requests.rb +9 -0
- data/lib/samagotchi/engine/steering.rb +2 -0
- data/lib/samagotchi/engine/toolkit.rb +5 -0
- data/lib/samagotchi/engine/turn_end.rb +7 -0
- data/lib/samagotchi/engine/turn_helpers.rb +8 -0
- data/lib/samagotchi/engine/verify.rb +2 -0
- data/lib/samagotchi/engine.rb +8 -3
- data/lib/samagotchi/event_fanout.rb +22 -1
- data/lib/samagotchi/grants.rb +33 -22
- data/lib/samagotchi/guardrail_wiring.rb +23 -18
- data/lib/samagotchi/guardrails/approval_use.rb +59 -0
- data/lib/samagotchi/guardrails/approvals.rb +9 -11
- data/lib/samagotchi/guardrails/child_boundary.rb +1 -0
- data/lib/samagotchi/guardrails/gate.rb +10 -5
- data/lib/samagotchi/guardrails/implicit_writers.rb +1 -0
- data/lib/samagotchi/guardrails/pair_boundary.rb +6 -6
- data/lib/samagotchi/guardrails/participant_refusal.rb +33 -0
- data/lib/samagotchi/guardrails/review_paths.rb +2 -3
- data/lib/samagotchi/guardrails.rb +1 -1
- data/lib/samagotchi/image_store.rb +51 -12
- data/lib/samagotchi/kernel_loop.rb +7 -1
- data/lib/samagotchi/llm/stray_tool_call.rb +7 -4
- data/lib/samagotchi/llm_context_stale.rb +4 -1
- data/lib/samagotchi/llm_context_strategy.rb +2 -0
- data/lib/samagotchi/objectives.rb +1 -4
- data/lib/samagotchi/objectives_audit.rb +1 -1
- data/lib/samagotchi/objectives_track.rb +1 -1
- data/lib/samagotchi/owner_prompt.rb +3 -6
- data/lib/samagotchi/parent_report.rb +1 -0
- data/lib/samagotchi/participant_messages.rb +48 -4
- data/lib/samagotchi/participant_revise.rb +61 -0
- data/lib/samagotchi/participant_turn_mode.rb +50 -0
- data/lib/samagotchi/participant_uploads.rb +98 -0
- data/lib/samagotchi/participants.rb +21 -12
- data/lib/samagotchi/participants_watch.rb +2 -2
- data/lib/samagotchi/plugin/api.rb +2 -2
- data/lib/samagotchi/plugin/attached_context.rb +1 -1
- data/lib/samagotchi/plugin/context.rb +0 -4
- data/lib/samagotchi/plugin/sessions.rb +1 -25
- data/lib/samagotchi/reply_wait/poll.rb +5 -1
- data/lib/samagotchi/revise_anchor.rb +9 -0
- data/lib/samagotchi/run_options.rb +2 -3
- data/lib/samagotchi/send_command.rb +15 -10
- data/lib/samagotchi/session.rb +0 -3
- data/lib/samagotchi/session_access/contract.rb +1 -10
- data/lib/samagotchi/session_access/local.rb +10 -23
- data/lib/samagotchi/session_access/remote.rb +9 -20
- data/lib/samagotchi/session_access.rb +12 -16
- data/lib/samagotchi/session_chain.rb +4 -6
- data/lib/samagotchi/session_commands.rb +6 -3
- data/lib/samagotchi/session_continue.rb +1 -2
- data/lib/samagotchi/session_inbox.rb +20 -12
- data/lib/samagotchi/session_manager/delivery.rb +32 -5
- data/lib/samagotchi/session_manager/lifecycle.rb +12 -0
- data/lib/samagotchi/session_manager/listing.rb +5 -0
- data/lib/samagotchi/session_manager/spawn.rb +2 -2
- data/lib/samagotchi/session_manager/worker_command.rb +9 -0
- data/lib/samagotchi/session_participants.rb +12 -8
- data/lib/samagotchi/session_review.rb +5 -7
- data/lib/samagotchi/session_stores.rb +3 -1
- data/lib/samagotchi/share_command.rb +10 -12
- data/lib/samagotchi/share_terms.rb +41 -0
- data/lib/samagotchi/steer.rb +8 -14
- data/lib/samagotchi/system_prompt.rb +16 -25
- data/lib/samagotchi/terminal_ui/attach_launcher.rb +2 -1
- data/lib/samagotchi/terminal_ui/attached_loop/exit_commands.rb +1 -0
- data/lib/samagotchi/terminal_ui/attached_loop/queueing.rb +1 -0
- data/lib/samagotchi/terminal_ui/attached_loop/sending.rb +2 -0
- data/lib/samagotchi/terminal_ui/formatting.rb +15 -17
- data/lib/samagotchi/terminal_ui/participant_commands.rb +2 -2
- data/lib/samagotchi/terminal_ui/status_row.rb +2 -2
- data/lib/samagotchi/terminal_ui.rb +1 -2
- data/lib/samagotchi/testing/sessions.rb +2 -10
- data/lib/samagotchi/tool_runner.rb +42 -9
- data/lib/samagotchi/toolkit.rb +4 -22
- data/lib/samagotchi/toolkit_suggest.rb +3 -3
- data/lib/samagotchi/tools/deferred_tools.rb +1 -0
- data/lib/samagotchi/tools/execute.rb +11 -45
- data/lib/samagotchi/tools/leftovers.rb +122 -0
- data/lib/samagotchi/tools/memory.rb +88 -25
- data/lib/samagotchi/tools/task_get.rb +1 -0
- data/lib/samagotchi/tools/task_list.rb +3 -2
- data/lib/samagotchi/tools/task_record.rb +6 -4
- data/lib/samagotchi/tools/task_runtime.rb +199 -20
- data/lib/samagotchi/tools/task_wait.rb +4 -3
- data/lib/samagotchi/turn_anchors.rb +0 -3
- data/lib/samagotchi/turn_context.rb +1 -1
- data/lib/samagotchi/turn_origin.rb +1 -1
- data/lib/samagotchi/turn_stages/context_judge.rb +4 -4
- data/lib/samagotchi/turn_stages/objectives.rb +2 -2
- data/lib/samagotchi/turn_stages/toolkit_suggestion.rb +2 -2
- data/lib/samagotchi/turn_stages/verify_anchors.rb +13 -1
- data/lib/samagotchi/update_hint.rb +3 -1
- data/lib/samagotchi/verify_anchor.rb +6 -0
- data/lib/samagotchi/verify_fresh.rb +1 -1
- data/lib/samagotchi/verify_fresh_origin.rb +13 -11
- data/lib/samagotchi/version.rb +1 -1
- data/lib/samagotchi/web/app.rb +45 -82
- data/lib/samagotchi/web/participant_access.rb +139 -40
- data/lib/samagotchi/web/participant_images.rb +185 -0
- data/lib/samagotchi/web/participant_review.rb +22 -142
- data/lib/samagotchi/web/participant_show.rb +241 -0
- data/lib/samagotchi/web/participant_stream_filter.rb +25 -2
- data/lib/samagotchi/web/participant_view.rb +334 -27
- data/lib/samagotchi/web/participants_admin.rb +21 -40
- data/lib/samagotchi/web/public/annotate_bar.css +1 -2
- data/lib/samagotchi/web/public/annotate_bar.js +1 -2
- data/lib/samagotchi/web/public/app.js +126 -132
- data/lib/samagotchi/web/public/block_host.js +7 -4
- data/lib/samagotchi/web/public/bubbles.js +9 -1
- data/lib/samagotchi/web/public/cards_offscreen.js +69 -0
- data/lib/samagotchi/web/public/chip_popover.js +5 -4
- data/lib/samagotchi/web/public/claim_link.js +4 -4
- data/lib/samagotchi/web/public/composer.css +4 -6
- data/lib/samagotchi/web/public/composer_mode.js +11 -6
- data/lib/samagotchi/web/public/composer_mount.js +4 -4
- data/lib/samagotchi/web/public/ctx.js +12 -3
- data/lib/samagotchi/web/public/data.js +2 -10
- data/lib/samagotchi/web/public/delivery_line.js +49 -63
- data/lib/samagotchi/web/public/history_shape.js +5 -1
- data/lib/samagotchi/web/public/images.js +7 -1
- data/lib/samagotchi/web/public/index.html +50 -34
- data/lib/samagotchi/web/public/info_bar_model.js +2 -1
- data/lib/samagotchi/web/public/live_turn.js +1 -1
- data/lib/samagotchi/web/public/markdown_place.js +5 -4
- data/lib/samagotchi/web/public/owner_claim.js +5 -5
- data/lib/samagotchi/web/public/owner_verify.js +0 -2
- data/lib/samagotchi/web/public/participant_bar.js +107 -0
- data/lib/samagotchi/web/public/participant_main.js +289 -0
- data/lib/samagotchi/web/public/participant_model.js +5 -292
- data/lib/samagotchi/web/public/participant_names.js +17 -8
- data/lib/samagotchi/web/public/participant_revise.js +66 -0
- data/lib/samagotchi/web/public/participants_panel.js +32 -74
- data/lib/samagotchi/web/public/question_cards.js +14 -3
- data/lib/samagotchi/web/public/refs.js +53 -36
- data/lib/samagotchi/web/public/reload_check.js +70 -14
- data/lib/samagotchi/web/public/revise_stack.js +21 -10
- data/lib/samagotchi/web/public/send_turn.js +28 -29
- data/lib/samagotchi/web/public/session_actions.js +4 -45
- data/lib/samagotchi/web/public/session_fields.js +1 -2
- data/lib/samagotchi/web/public/session_state.js +12 -7
- data/lib/samagotchi/web/public/session_sync.js +9 -2
- data/lib/samagotchi/web/public/session_view.js +14 -5
- data/lib/samagotchi/web/public/settings_panel.js +4 -18
- data/lib/samagotchi/web/public/stage_answer.js +56 -0
- data/lib/samagotchi/web/public/stage_asking.js +7 -5
- data/lib/samagotchi/web/public/stage_cloud.js +93 -0
- data/lib/samagotchi/web/public/stage_dom.js +100 -0
- data/lib/samagotchi/web/public/stage_handoff.js +154 -0
- data/lib/samagotchi/web/public/stage_owner_wait.js +35 -0
- data/lib/samagotchi/web/public/stage_pager.js +59 -0
- data/lib/samagotchi/web/public/stage_quiet_clock.js +52 -0
- data/lib/samagotchi/web/public/stage_view.js +103 -410
- data/lib/samagotchi/web/public/stage_waiting.js +74 -6
- data/lib/samagotchi/web/public/start_page.js +12 -33
- data/lib/samagotchi/web/public/start_settings.js +24 -78
- data/lib/samagotchi/web/public/start_toolkit.js +6 -10
- data/lib/samagotchi/web/public/storage.js +22 -0
- data/lib/samagotchi/web/public/stream_handlers.js +3 -10
- data/lib/samagotchi/web/public/tokens.css +1 -1
- data/lib/samagotchi/web/public/turn_block.js +2 -5
- data/lib/samagotchi/web/public/turn_events.js +30 -12
- data/lib/samagotchi/web/public/turn_html.js +9 -2
- data/lib/samagotchi/web/public/turn_pieces.js +3 -4
- data/lib/samagotchi/web/public/turn_range.js +1 -2
- data/lib/samagotchi/web/public/verify_target.js +2 -4
- data/lib/samagotchi/web/public/viewer.js +59 -0
- data/lib/samagotchi/web/public/viewer_self.js +59 -0
- data/lib/samagotchi/web/public/working_set.js +11 -5
- data/lib/samagotchi/web/public/working_set_view.js +53 -8
- data/lib/samagotchi/web/public/ws_cards.js +89 -0
- data/lib/samagotchi/web/public/ws_peek.js +106 -0
- data/lib/samagotchi/web/public/ws_preview.css +126 -0
- data/lib/samagotchi/web/public/ws_reader.js +319 -0
- data/lib/samagotchi/web/public/ws_timeline.js +200 -0
- data/lib/samagotchi/web/public/ws_way_in.js +25 -0
- data/lib/samagotchi/web/qr.rb +1 -1
- data/lib/samagotchi/web/session_control.rb +42 -15
- data/lib/samagotchi/web/session_create.rb +6 -72
- data/lib/samagotchi/web/session_show.rb +75 -28
- data/lib/samagotchi/web/session_summary.rb +1 -4
- data/lib/samagotchi/web/verify_fresh_routes.rb +8 -7
- data/lib/samagotchi/web/viewer.rb +70 -0
- data/lib/samagotchi/web/working_set_routes.rb +132 -0
- data/lib/samagotchi/worker.rb +35 -28
- data/lib/samagotchi/worker_inbound.rb +4 -3
- data/lib/samagotchi/worker_link.rb +17 -0
- data/lib/samagotchi/working_set.rb +322 -11
- metadata +32 -13
- data/lib/samagotchi/guardrails/review_boundary.rb +0 -99
- data/lib/samagotchi/participant_mode.rb +0 -86
- data/lib/samagotchi/review_apply.rb +0 -131
- data/lib/samagotchi/review_command.rb +0 -123
- data/lib/samagotchi/review_start.rb +0 -196
- data/lib/samagotchi/web/public/participant.html +0 -218
- data/lib/samagotchi/web/public/participant.js +0 -719
- data/lib/samagotchi/web/public/participant_annotate.js +0 -76
- data/lib/samagotchi/web/public/review_apply.js +0 -34
- data/lib/samagotchi/web/public/review_history.js +0 -72
- data/lib/samagotchi/web/public/review_start.js +0 -55
- data/lib/samagotchi/web/public/tools_overview.js +0 -42
data/docs/cli.md
CHANGED
|
@@ -26,9 +26,8 @@
|
|
|
26
26
|
- `chi answer ID --question QID (--option N|LABEL)... [--text T] [--timeout S] [--format json]` (or `--dismiss`) — answer the question a session waits on (the one `chi send --wait` exited 3 with), then wait and print what comes next as `chi send --wait` does: the reply (0), the next question (3), still running after `--timeout` (4). `--option` is 1-based or the label, repeated on a multi-select question; `--text` is free text, or a Deny's reason; `--dismiss` leaves it unanswered and the model finishes its reply. A question no longer open (the web answered first) isn't answered again: it waits for that turn's reply. An option the question doesn't offer exits 2; a worker that is gone exits 1 (`send the task again: chi send --wait -m "…" ID`). What a parent may pick follows `guardrails.parent_answers`, or the session's own `parent_answers` when stricter (`soft`, the default: a deny, a plain answer, Continue and "Allow once"; `standard`: no allow; `hard`: no Continue either), never a wider scope or an allow on chi's own config; a refused pick exits 1 with what to answer instead (a convention, not a security boundary; see [Guardrails](guardrails.md#answers-from-a-parent-agent))
|
|
27
27
|
- `chi schedule <add|list|show|tick|run-now|enable|disable|cancel>` — durable schedules on this machine: a prompt with a clock that fires out of no worker (cron, systemd, or chi web's hub with `schedule.auto_tick`), as the next link of a session's chain or as a turn in the session itself (see [Scheduling](scheduling.md) and [Durable schedules](#durable-schedules-chi-schedule)). A usage error exits 2, an unknown session or schedule 1; `chi --remote X schedule list` exits 2
|
|
28
28
|
- `chi remote add NAME URL [--token-file F | --token-stdin]`, `chi remote ls`, `chi remote rm NAME` — the other machines whose chi web the session commands reach with `--remote NAME` (see [Remote sessions](#remote-sessions))
|
|
29
|
-
- `chi
|
|
30
|
-
- `chi
|
|
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
|
|
490
|
+
in a participant's turn.
|
|
492
491
|
|
|
493
492
|
## Flags
|
|
494
493
|
|
|
@@ -1223,7 +1222,7 @@ threshold; its folded row shows its first line as typed). A delegate
|
|
|
1223
1222
|
report itself starts folded. Folding is this browser's choice, kept per session in
|
|
1224
1223
|
localStorage (`chi_answer_fold:<session id>`, the last 200 folded answers and prompts;
|
|
1225
1224
|
the keys of sessions gone from the list are dropped when the list loads);
|
|
1226
|
-
other viewers
|
|
1225
|
+
other viewers (a participant's browser too) are not affected. A jump into a
|
|
1227
1226
|
folded answer (a claim link, say) unfolds it for that page load.
|
|
1228
1227
|
|
|
1229
1228
|
**Revise** rewrites an answer and stacks the versions. A finished turn's
|
|
@@ -1246,8 +1245,13 @@ version on view, and the chip names it, "v1 of 3"); › back to the newest. Swit
|
|
|
1246
1245
|
page shows, and a reload shows the newest again. Revise
|
|
1247
1246
|
again on the newest version adds to the stack. Stacks are session data (the
|
|
1248
1247
|
stamp is on the Revise prompt, see [sessions.md](sessions.md), Revise
|
|
1249
|
-
stacks): every
|
|
1250
|
-
participant
|
|
1248
|
+
stacks): every page shows them, live and after a reload, a participant's too.
|
|
1249
|
+
A participant (`chi share`) gets Revise on the answer to their own message
|
|
1250
|
+
only, while no one else's turn (the owner's, another participant's, a wake
|
|
1251
|
+
turn's) came after it; the owner's answers have no button on their page, and
|
|
1252
|
+
a closed composer shows none. A send that came too late is refused with
|
|
1253
|
+
"someone else's turn came after this answer: send a new message instead",
|
|
1254
|
+
the text and the chip kept. A session whose worker predates
|
|
1251
1255
|
Revise (started by an older chi) disables the button and shows the chip as
|
|
1252
1256
|
"Revise: restart this session to use Revise"; a message sent then is a plain
|
|
1253
1257
|
one. A Revise turn that fails comes back into the composer with its chip.
|
|
@@ -1336,7 +1340,7 @@ made (up to 120 lines or 8 KB), live and after a reload (see
|
|
|
1336
1340
|
`web.view`, `chi web --web-view`, `SAMAGOTCHI_WEB_VIEW` and `?view=` were removed with the turn view (the
|
|
1337
1341
|
stage is the only view; a config.yml that still sets `web.view:` warns about an unknown key).
|
|
1338
1342
|
|
|
1339
|
-
**When things happened**, on the owner's page and on a participant's
|
|
1343
|
+
**When things happened**, on the owner's page and on a participant's: where 10 minutes or
|
|
1340
1344
|
more of quiet passed between the end of one activity and the start of the next (a turn, a context
|
|
1341
1345
|
note, a reminder), the history has one dim centred line, `── 14:32 · 47 min later ──`; the date is
|
|
1342
1346
|
added when the day changed or the turn wasn't today (`── Sat 24 Oct 09:10 · 13 h later ──`).
|
|
@@ -1402,6 +1406,12 @@ session bar shows the `mem N` chip again.
|
|
|
1402
1406
|
forgotten row offers `refresh`, the same add of it. While a turn runs the
|
|
1403
1407
|
stage's rail shows an add queued for its end as a dashed `+ name · next turn`
|
|
1404
1408
|
line.
|
|
1409
|
+
- **What chi has of an item**: a row's `▸` in the list peeks at it (its latest edit's diff, else its newest
|
|
1410
|
+
read's first lines); `Open the timeline` (also a tool row's `timeline` and a file ref's ▾ `What chi has`) puts
|
|
1411
|
+
the item's timeline over the stage, newest first: reads merged into line slices over a strip of the file, edits
|
|
1412
|
+
as diffs, what chi no longer has greyed (with `undrop` for your drop), a changed memory's `Now · diff`. `← Stage`
|
|
1413
|
+
or Esc goes back to the same place, ↑↓ step through the set; on a phone it is full screen (`‹ Set`, `‹ ›`).
|
|
1414
|
+
Yours only: a participant's list has no `▸`.
|
|
1405
1415
|
|
|
1406
1416
|
Only `read`, `edit`, `write`, `memory_read`, `memory_write` and `web_fetch`
|
|
1407
1417
|
calls that succeeded count; files an `execute` touched don't.
|
|
@@ -1442,20 +1452,18 @@ On a touch screen (a phone, a tablet) the bar sits just above the composer
|
|
|
1442
1452
|
instead of next to the selection, where the system's own Copy menu and the
|
|
1443
1453
|
selection handles would cover it; several pills wrap to a second row.
|
|
1444
1454
|
|
|
1445
|
-
|
|
1446
|
-
|
|
1447
|
-
|
|
1448
|
-
with the same presets. Not in the owner's participant view, and no plugin
|
|
1449
|
-
pills there (a review turn refuses `/` lines).
|
|
1455
|
+
Participants get the same on their page (a `chi share` link, the main
|
|
1456
|
+
page): a selection quotes into their composer with the same
|
|
1457
|
+
presets; no plugin pills and no Copy link there.
|
|
1450
1458
|
|
|
1451
|
-
After the presets
|
|
1459
|
+
After the presets comes a built-in **Verify**: the quote, then
|
|
1452
1460
|
an ask to check the claim against the code and end on a line `Verdict:
|
|
1453
1461
|
confirmed|refuted|unclear — <reason>`. Verify is offered only on text in a finished turn's final answer, the
|
|
1454
1462
|
claim a verdict card can come from; elsewhere (an earlier reply, a step, a message, a line added mid-turn, a turn
|
|
1455
1463
|
still running) the bar keeps its other actions. A session whose worker predates Verify (started by an older chi) refuses it (409
|
|
1456
1464
|
`verify_unavailable`); a participant's page disables Verify and Verify fresh with a hint to restart the session. On your page a selection in a turn
|
|
1457
1465
|
also offers **Copy link**: a link to that turn and quote for a participant's
|
|
1458
|
-
browser (the one their
|
|
1466
|
+
browser (the one their invite link was opened in), which opens their page
|
|
1459
1467
|
scrolled to the quote and highlights it; with no one invited, a link to it
|
|
1460
1468
|
on your own page. A secret in the selection goes into the link as
|
|
1461
1469
|
`[redacted]`, as the participant's page shows it. One browser holds one participant link at a time, and
|
|
@@ -1714,12 +1722,12 @@ How it works inside (`SessionAccess`, chi web's routes, where each check runs):
|
|
|
1714
1722
|
|
|
1715
1723
|
### Participants
|
|
1716
1724
|
|
|
1717
|
-
A session's owner can invite **participants
|
|
1718
|
-
|
|
1725
|
+
A session's owner can invite **participants** into it through chi web on the LAN (`web.host: lan`), each with a
|
|
1726
|
+
link of their own that reaches that one session, whose turns act in it under the owner's guardrails:
|
|
1719
1727
|
|
|
1720
1728
|
```sh
|
|
1721
1729
|
chi share 3f9a1c2e --name Alex
|
|
1722
|
-
# p_7c01d2aa Alex (
|
|
1730
|
+
# p_7c01d2aa Alex (reviewer) · session 3f9a1c2e · expires 2026-10-30 14:02 · cap $2.00
|
|
1723
1731
|
# http://192.168.1.29:4567/?token=chp_…#s=3f9a1c2e-…
|
|
1724
1732
|
# (shown once: chi keeps only its digest; chi share revoke 3f9a1c2e p_7c01d2aa ends it)
|
|
1725
1733
|
chi share ls # every session's participants (--format json; never a token)
|
|
@@ -1729,66 +1737,66 @@ chi share revoke --all # every link to every session
|
|
|
1729
1737
|
```
|
|
1730
1738
|
|
|
1731
1739
|
- The link is printed once (with a QR code at a terminal): chi keeps only a digest of its token. Send it to the
|
|
1732
|
-
participant; opening it sets their browser's cookie, as the owner's LAN link does.
|
|
1733
|
-
|
|
1740
|
+
participant; opening it sets their browser's cookie, as the owner's LAN link does. The same link works from the
|
|
1741
|
+
command line: its token as `Authorization: Bearer` (a script, another agent, your own second tool; `chi --remote`
|
|
1742
|
+
with that token), on the LAN, this machine or an SSH tunnel, not behind a sign-in proxy.
|
|
1734
1743
|
- It works for 7 days (`--expires Nh` or `Nd`, 1 hour to 30 days; `web.participants.expires`), until it is revoked,
|
|
1735
|
-
or until the session is archived or deleted. A revoked link shows "This
|
|
1736
|
-
owner.", an expired one "This
|
|
1737
|
-
-
|
|
1738
|
-
|
|
1739
|
-
|
|
1740
|
-
|
|
1741
|
-
|
|
1742
|
-
|
|
1743
|
-
|
|
1744
|
-
|
|
1745
|
-
boundary: restart an older one. While your turn waits at the step limit (Continue or Stop), their turns wait too
|
|
1746
|
-
(still queued, still counted): they run, in order, once you continue, stop or send a turn of your own.
|
|
1747
|
-
- **Pair turns: sharing a working session.** The read-only review turn is a review session's (`chi review`). Invite
|
|
1748
|
-
someone to a working session instead and their turns **act** in it with its tools, writes included, under your
|
|
1749
|
-
guardrails: what your rules allow runs, what they ask about comes to you as "Sam's turn asks: approve tool call?"
|
|
1750
|
-
with **Allow once** only (nothing session-wide or repo-wide is approved from their calls), and System 1 never
|
|
1751
|
-
answers for you. A write outside the project always asks you, whatever you approved before. It can't read or
|
|
1744
|
+
or until the session is archived or deleted. A revoked link shows "This link was revoked by the session's
|
|
1745
|
+
owner.", an expired one "This link expired: ask the session's owner for a new one." A link an older chi issued
|
|
1746
|
+
for read-only review turns has ended too: "This link is from an older chi: ask the session's owner for a new one."
|
|
1747
|
+
(the panel lists it as "ended (older link)"); invite them again.
|
|
1748
|
+
- **Their turns (experimental).** A participant sends messages through chi web's `POST …/turn`: each message is a
|
|
1749
|
+
turn of its own, queued behind the running one, that **acts** in the session with its tools, writes included,
|
|
1750
|
+
under your guardrails: what your rules allow runs, what they ask about comes to you as "Sam's turn asks: approve
|
|
1751
|
+
tool call?" with **Allow once** only (nothing session-wide or repo-wide is approved from their calls), of your stored
|
|
1752
|
+
approvals only those for this session ("Allow … for the session") answer their asks (a call you allowed in this repo
|
|
1753
|
+
or for a rule asks you again), and System 1 never answers for you. A write outside the project always asks you, whatever you approved before. It can't read or
|
|
1752
1754
|
write secrets or chi's own files (keys, shell startup files, histories, credential files; by a file tool, a
|
|
1753
1755
|
command, a glob or a variable), run chi, leave a command running in the background, read the environment or the
|
|
1754
1756
|
keychain, sweep your home with find/tar/cp/grep, delegate, set or cancel reminders, send notes, start or stop
|
|
1755
1757
|
background tasks, load tools, forget outputs or write memories, and it asks its questions in its reply, not on a
|
|
1756
1758
|
card. Its commands run without your secret-named environment variables (`KEY`, `TOKEN`, `SECRET`, `PASS`,
|
|
1757
1759
|
`CREDENTIAL`, `AUTH` in the name) and are killed at the execute limit rather than left running; a command that
|
|
1758
|
-
writes outside the project asks you, as a write does (the tmp dirs aside). A
|
|
1759
|
-
|
|
1760
|
-
|
|
1761
|
-
|
|
1762
|
-
|
|
1763
|
-
|
|
1764
|
-
|
|
1765
|
-
|
|
1766
|
-
|
|
1767
|
-
|
|
1768
|
-
|
|
1769
|
-
|
|
1770
|
-
|
|
1771
|
-
|
|
1772
|
-
|
|
1773
|
-
|
|
1774
|
-
|
|
1775
|
-
|
|
1776
|
-
|
|
1760
|
+
writes outside the project asks you, as a write does (the tmp dirs aside). A line starting `!` or `/` is refused.
|
|
1761
|
+
`chi share` and the panel's Invite warn you with what their turns may do and how many tool outputs the history
|
|
1762
|
+
holds. This is an accident guard for a trusted team, not containment: a turn can still send what it reads out
|
|
1763
|
+
through `web_fetch` or your MCP tools. A link without `--identity` gets the same access: share it only with people
|
|
1764
|
+
you'd let type in your session.
|
|
1765
|
+
- **Images, queue and cap.** A participant can attach images to their own messages (paste, drop or the image button;
|
|
1766
|
+
png, jpeg, gif or webp), up to 40 per invite and within their cap, when the session's model takes images; they see
|
|
1767
|
+
only their own images, anyone else's as "N images". One running and 3 waiting turns per participant
|
|
1768
|
+
(`web.participants.queue`). You pay: each participant has a spending cap (`--cap DOLLARS`, default $2,
|
|
1769
|
+
`web.participants.cap`), counted from their turns' cost and the side requests they cause; a turn stops mid-turn
|
|
1770
|
+
once their cap is passed or their link ends, their next one is refused and you get a notice, and `chi share cap`
|
|
1771
|
+
raises it. `/stats` shows each participant's spend. Their turns go only to a worker that runs them under your rules,
|
|
1772
|
+
and nobody is invited to a session whose worker predates that ("restart the session first"): restart an older one.
|
|
1773
|
+
While your turn waits at the step limit (Continue or Stop), their turns wait too (still queued, still counted):
|
|
1774
|
+
they run, in order, once you continue, stop or send a turn of your own. Their messages carry a `pair` badge; one
|
|
1775
|
+
an older chi ran read-only reads `· read-only`.
|
|
1776
|
+
- **Their page is the main page.** Their link opens the page you use, as theirs: the session's title, their name
|
|
1777
|
+
("Alex · invited") and when the link ends, the conversation with the same folded steps, answers and live turn box
|
|
1778
|
+
(what chi says, which tools and files it touches, the working set's file names; never thinking, tool arguments or
|
|
1779
|
+
output), and the composer. Your messages read "owner" to them. Under the composer: the turn's status, the context's
|
|
1780
|
+
fill, the speed (the turn's time while one runs) and what they spent of the cap you set ("$0.42 of $2.00 used").
|
|
1781
|
+
While their own turn runs they can **Stop turn**, and a message goes in at its next step (Alt+Enter keeps it for
|
|
1782
|
+
after the turn); while yours or another participant's runs, it goes in as their own turn afterwards. When their
|
|
1783
|
+
turn waits for you (an approval, a question, your Continue) they see that it waits and for what kind of thing,
|
|
1784
|
+
never its content. At their cap, in a stopped session, or once their link ended the composer gives way to one line
|
|
1785
|
+
and the conversation stays readable. They get none of your controls: no new session, list, rename, model, images
|
|
1786
|
+
(yet), session menu, participants panel, cards or approvals, and no file panel (they ask chi to quote what they
|
|
1787
|
+
need). They never see tool output or arguments, thinking, approvals or questions, memories, context notes,
|
|
1788
|
+
plugin and delegate input, cards, command output, your cost or host paths; secret-shaped text (API keys, tokens,
|
|
1789
|
+
private keys) is redacted too. From the command line an invite link
|
|
1790
|
+
waits on its turns' replies through the API, or with chi: its link's token in a remote, `chi --remote NAME send --wait -m "…" ID`,
|
|
1777
1791
|
or `send -m`, which prints the turn id `--wait --turn T` takes; that wait exits 3 with `waiting_for_owner` while
|
|
1778
1792
|
their turn waits on you (a question, an approval, your step-limit Continue) and 1 with `refused` (`cancel_reason`
|
|
1779
|
-
`revoked` or `cap_reached`) when their queued turn is refused before it runs. They can't reach anything else: every other route answers them 403, another
|
|
1793
|
+
`revoked`, `outdated` or `cap_reached`) when their queued turn is refused before it runs. They can't reach anything else: every other route answers them 403, another
|
|
1780
1794
|
session 404.
|
|
1781
|
-
- **Apply.** Under each of a participant's review turns that has a reply, your page shows **Apply** (full width on a
|
|
1782
|
-
phone): it puts an Apply turn in your composer, not sent, `Apply this proposal from Alex's review turn 3f2a1c0d, as
|
|
1783
|
-
far as it fits the plan. It's quoted: …` and the reply quoted line by line. Read it, edit it, send it: the
|
|
1784
|
-
participant's text reaches the model as a quote under your line, never as your instruction. Don't send "do what
|
|
1785
|
-
Alex said" instead: that hands their words your tools.
|
|
1786
1795
|
- **Your side of it.** In the session bar, the participants chip (`participants · invite` while nobody has a link,
|
|
1787
1796
|
then `2 participants`, with a green dot while one is on their page) opens the panel: each participant's state, last visit,
|
|
1788
1797
|
spend against their cap, turns and expiry, with **Cap** and **Revoke** (revoking ends their page and stream and
|
|
1789
|
-
drops their queued
|
|
1790
|
-
once, with Copy, Share (a phone's share sheet) and its QR code.
|
|
1791
|
-
session in a new tab, read-only, through the same server filter: exactly what they see. A participant's prompt
|
|
1798
|
+
drops their queued turns). **Invite** takes a name, the expiry and a cap, and shows the link
|
|
1799
|
+
once, with Copy, Share (a phone's share sheet) and its QR code. A participant's prompt
|
|
1792
1800
|
shows their name in their colour, live and after a reload.
|
|
1793
1801
|
- `chi --remote studio share …` invites on studio: the link names studio's LAN address. Locally, the link names
|
|
1794
1802
|
this machine's running chi web, on the port it listens on (it records it in `$XDG_STATE_HOME/samagotchi/web.json`;
|
|
@@ -1799,50 +1807,26 @@ chi share revoke --all # every link to every session
|
|
|
1799
1807
|
127.0.0.1). A tunnel link opens only on a device on your tailnet; the grant still decides.
|
|
1800
1808
|
- **A link for one account.** Behind an auth proxy that names the signed-in user (`web.public_url` with
|
|
1801
1809
|
`web.proxy.identity_header`, or `chi web --tunnel tailscale`), `--identity EMAIL` binds the link to that account:
|
|
1802
|
-
it opens only through the proxy, signed in as EMAIL. A forwarded link opened by anyone else says "This
|
|
1810
|
+
it opens only through the proxy, signed in as EMAIL. A forwarded link opened by anyone else says "This link
|
|
1803
1811
|
is for another account …", and its one-time code still works for EMAIL. `chi share` says `· bound to EMAIL`, `chi
|
|
1804
1812
|
share ls` `alex@corp · bound`, and the panel's Invite has an email field there. Without such a proxy `--identity`
|
|
1805
1813
|
is refused (the link could never open); with one, an unbound invite gets a warning line. Through `chi --remote`
|
|
1806
1814
|
it needs that chi web to have bound links (this version or newer), else it is refused before anything is issued.
|
|
1807
1815
|
See [configuration.md](configuration.md#inviting-colleagues).
|
|
1808
1816
|
- The owner's own token and the `chi web --new-token` rotation are separate: rotating it ends no participant's link.
|
|
1809
|
-
- **In the attached terminal.** A participant's message reads `Alex ▸
|
|
1817
|
+
- **In the attached terminal.** A participant's message reads `Alex ▸ invited> is step 3 right?`, the name in that
|
|
1810
1818
|
participant's own colour (queued, running, and the last exchange when you join); yours stay as they were. A line
|
|
1811
1819
|
says when someone is invited, revoked or their link expires (`participants> Alex joined (p_7c01d2aa)`,
|
|
1812
1820
|
`participants> Alex left: their link was revoked`), within a few seconds and between turns, and the status row
|
|
1813
|
-
counts who is in the
|
|
1814
|
-
`/share NAME [--
|
|
1821
|
+
counts who is in the session (`2 participants`). The same commands work from there, on the attached session:
|
|
1822
|
+
`/share NAME [--expires 3d] [--cap 2]` (the link and its QR code, once), `/participants` (the list),
|
|
1815
1823
|
`/participants revoke [P]` (one participant, or everyone) and `/participants cap P DOLLARS`. They are `chi share`'s
|
|
1816
1824
|
own, so under `chi --remote NAME` they reach that machine's chi web, as `chi --remote NAME share` does; an invite or
|
|
1817
1825
|
a revoke made with them isn't announced again by the `participants>` line.
|
|
1818
1826
|
|
|
1819
|
-
|
|
1820
|
-
|
|
1821
|
-
|
|
1822
|
-
turn's model may quote them. `chi review` starts one, idle:
|
|
1823
|
-
|
|
1824
|
-
```sh
|
|
1825
|
-
chi review docs/plan.md docs/spec.md # a fresh session in this project for those files
|
|
1826
|
-
# 4b7e9a01-… review · docs/plan.md, docs/spec.md · idle
|
|
1827
|
-
# open it: chi --attach 4b7e9a01 or the web
|
|
1828
|
-
# invite someone: chi share 4b7e9a01 --name NAME
|
|
1829
|
-
chi review --from 3f9a1c2e docs/plan.md # a review of a working session: its recap, not its transcript
|
|
1830
|
-
```
|
|
1831
|
-
|
|
1832
|
-
- Each FILE is a **subject**: a file in the session's project (the git work tree of its folder, `--dir`, else
|
|
1833
|
-
here), relative to that folder or absolute. A missing file, a folder, a file outside the project, a secret
|
|
1834
|
-
(`.env*`, keys and certificates, credentials files, a git config) or chi's own refuses the review with one line:
|
|
1835
|
-
`chi review: .env can't be a review subject: …`. At most 20.
|
|
1836
|
-
- `--from ID` (an id, a prefix, `last:ID`) starts a **review fork**: a new session in ID's folder, on its model
|
|
1837
|
-
(`--model` to change it) and setup, seeded with a fresh recap of ID (its live worker is asked first, as a continue
|
|
1838
|
-
asks), never its transcript. ID keeps running, unarchived, its delegates its own. Its FILEs are relative to ID's
|
|
1839
|
-
folder.
|
|
1840
|
-
- `chi --remote NAME review … --dir /path/there` starts it on that machine; its chi web checks the files there.
|
|
1841
|
-
- Sharing a working session (one `chi review` didn't start) still works, with a warning on stderr that says how many
|
|
1842
|
-
tool outputs its history holds: `chi share: warning: 3f9a1c2e is a working session, not a review session: a
|
|
1843
|
-
participant's review turn can quote what its history holds (42 tool outputs so far). … (chi review --from 3f9a1c2e
|
|
1844
|
-
starts one)`. On the web the participants panel shows the same words before its Invite, with **Start a review of
|
|
1845
|
-
it**, and again above the link an invite gives.
|
|
1827
|
+
- **A session an older chi started as a review** (`chi review`, the web's Start review) is an ordinary session
|
|
1828
|
+
now: it stays in the list, its participants' turns act as anyone's, and it carries its last answer and objectives
|
|
1829
|
+
on a continue. `chi review` is gone.
|
|
1846
1830
|
|
|
1847
1831
|
How it works inside (grants, the gate, the routes, the audit trail):
|
|
1848
1832
|
[internals/participants.md](internals/participants.md).
|
|
@@ -2012,7 +1996,7 @@ status> model=Qwen3.6-35B | ⑂ 2 running · 1 waiting | 2 participants | ctx=8.
|
|
|
2012
1996
|
ends and when a delegate's report merges into a turn. A
|
|
2013
1997
|
child that starts waiting on an approval (which doesn't wake the parent) shows at the next of
|
|
2014
1998
|
those.
|
|
2015
|
-
- `N participants`: who is in the session
|
|
1999
|
+
- `N participants`: who is in the session now ([Participants](#participants)).
|
|
2016
2000
|
- `ctx=`: the kernel's context estimate and its bucket, updated during a turn (on hosts that
|
|
2017
2001
|
report none, `api: openai`, at the turn's end).
|
|
2018
2002
|
- `mem:`: the memories the session read, with its `--memory` list; `muted:` its `--mute` list.
|
data/docs/configuration.md
CHANGED
|
@@ -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`
|
|
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
|
|
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, `
|
|
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 `
|
|
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.
|
|
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)`)
|
|
1785
|
-
has no values for is hidden. What is set shows on the row as an accent chip (`think high`, `ctx stale
|
|
1786
|
-
|
|
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
|
|
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 (
|
|
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
|
|
1992
|
+
this machine, it says "This link is for another account …", and its one-time code stays: Alex can still open
|
|
1995
1993
|
it. The refusal is in the session's participants audit with the identity that tried. Without an identity header
|
|
1996
1994
|
`--identity` is refused: the link could never open.
|
|
1997
1995
|
- Run only chi 0.109 or newer on the same state dir: an older chi rewriting the grants store drops the binding and
|
|
@@ -2385,7 +2383,7 @@ column says so, a `--kebab-name` flag. The maps (`hosts:`, `models:`,
|
|
|
2385
2383
|
| `web.host` | `127.0.0.1` | yes | `127.0.0.1`, `::1` or `localhost`; `lan` (this machine's private IPv4 address) or one of its IPv4 addresses also opens `chi web` to the network, with an access token, asked of this machine's 127.0.0.1 too (its `Local:` link carries a one-time code; `chi web --new-token` replaces the token; it is chi web's one access token, also used by `--tunnel` and `web.public_url`/a proxy). Anything else binds `127.0.0.1` with a warning. See [CLI: chi web on your phone](cli.md#chi-web-on-your-phone). |
|
|
2386
2384
|
| `web.markdown` | `false` | yes | Render answers as Markdown in `chi web`. |
|
|
2387
2385
|
| `web.working_set` | `true` | yes | The stage view's working set: the files, memories and URLs a turn brought into the model's context, in a rail in the stage, a footprint as each finished turn's block summary and a `set N` chip in place of the mem chip; `false` brings the mem chip back. `?working_set=1` or `?working_set=0` on the page URL overrides it for that page load. See [CLI: the working set](cli.md#the-working-set). |
|
|
2388
|
-
| `web.reload_check` | `false` | yes | Opt-in: once each finished turn has moved into the history, the page reads the session again (one full read per turn end), draws that turn as a reload would and compares the two, strictly: a known divergence counts as a mismatch too. `chi web` logs one `reload_checked` line per check and a `reload_mismatch` line naming the kinds that differed, `excused` (the known divergences, `history_shape.js` `ACCEPTED`, that would explain them) and `explained` (all of them had one), with `turn_id`, `drawn` (the turn came back from its drawing, so a mismatch with `drawn: true` is a drawing bug), `undrawn` (how many of the reload's rows came without their turn's drawing, the page's plain fallback: 0 unless chi web missed a turn) and the worker's version: counts only, never content. The count is `grep -c reload_mismatch` over `grep -c reload_checked` in chi web's log, split by `excused`.
|
|
2386
|
+
| `web.reload_check` | `false` | yes | Opt-in: once each finished turn has moved into the history, the page reads the session again (one full read per turn end), draws that turn as a reload would and compares the two, strictly: a known divergence counts as a mismatch too. `chi web` logs one `reload_checked` line per check and a `reload_mismatch` line naming the kinds that differed, `excused` (the known divergences, `history_shape.js` `ACCEPTED`, that would explain them) and `explained` (all of them had one), with `turn_id`, `drawn` (the turn came back from its drawing, so a mismatch with `drawn: true` is a drawing bug), `undrawn` (how many of the reload's rows came without their turn's drawing, the page's plain fallback: 0 unless chi web missed a turn) and the worker's version: counts only, never content. The count is `grep -c reload_mismatch` over `grep -c reload_checked` in chi web's log, split by `excused`. The turn's own cards and answered questions are compared too: a drawn turn already renders its plugin cards, and the snapshot's questions (and an undrawn turn's entries) are placed into the offscreen render by the page's own placer with inert hooks (`cards_offscreen.js`). A card counts as the same when it has the same id and title in the same place, a question when its summary line and the kept reply's plain line do; bodies, buttons, folds and the tag a card is drawn in are ignored. Only entries CardStore attributes to this turn (`of_turn`) are compared: a card of another turn or between turns is dropped by id, and a question the read gives no turn and no opening stamp for (an older worker) is left out on both sides. Between-turn cards and notices stay with the e2e reload checks. Every open owner tab runs the check; `chi web` logs a turn's first report only, and starts over when it restarts. |
|
|
2389
2387
|
| `web.annotate_presets` | `Agreed\|Could you please elaborate?` | yes | Quick replies next to Annotate in `chi web`, `\|`-separated (a YAML list works too); `""` in the file or on the CLI leaves only Annotate (an empty env value means the default). See [CLI](cli.md#web-annotate-presets). |
|
|
2390
2388
|
| `web.editor` | `vscode` | yes | What a file ref in `chi web` (a file tool row's title, a diff line) opens, for a viewer on this machine: a preset (`vscode`, `vscode-insiders`, `cursor`, `zed`) or a URL template with `{path}` and an optional `{line}`; `none` turns refs off. See [Opening files from chi web](#opening-files-from-chi-web). |
|
|
2391
2389
|
| `web.start_dir` | the folder `chi web` runs in | | The folder `chi web` starts in (`chi web --start-dir DIR` for one run): its page (the printed link, a bare `/`, the LAN link and QR code, the Home Screen app) opens on that folder's project, outside a project (no repository or marked folder) on every session, and a new session from the all view starts there; the header's project picker switches projects. `~` and a relative path (resolved from your home folder) work; one that isn't a folder stops `chi web` from starting. `chi web` never changes its own folder. See [CLI](cli.md). |
|
data/docs/context.md
CHANGED
|
@@ -361,7 +361,7 @@ text. The source itself stays with its old link; forks do not carry this text.
|
|
|
361
361
|
`chi send --new --continues` and the web's Continue toast say the same in a
|
|
362
362
|
few words, and `chi context ls` marks a session's source that stays
|
|
363
363
|
(`· stays`; `--format json` has the derived `movable`). Project sources are
|
|
364
|
-
shared already, and a
|
|
364
|
+
shared already, and a delegate takes none.
|
|
365
365
|
|
|
366
366
|
A push into a continued session is refused, nothing written, with the next
|
|
367
367
|
link's id (`chi context push` exits 1; chi web answers 410
|
|
@@ -413,7 +413,7 @@ How a mention counts:
|
|
|
413
413
|
- nothing inside a fenced code block: a pasted log's `#412` isn't you asking.
|
|
414
414
|
|
|
415
415
|
Only the session's owner counts: a participant's message, a steer, a note or
|
|
416
|
-
a reminder never attaches anything
|
|
416
|
+
a reminder never attaches anything.
|
|
417
417
|
A bundle usually proposes from an init task that finishes while your first
|
|
418
418
|
turn runs; when it does, the prompts you already wrote count too, and a hit
|
|
419
419
|
is attached at once (its note comes with your next turn).
|
|
@@ -433,8 +433,7 @@ candidates (attached when the session's owner mentions one):
|
|
|
433
433
|
|
|
434
434
|
You can also choose yourself: `/context attach NAME` attaches a proposed
|
|
435
435
|
candidate (its why: "you attached it"), `/context decline NAME` declines it.
|
|
436
|
-
Both are the session owner's (a participant can't send a `/` line,
|
|
437
|
-
review session refuses them); an unknown name, or one attached or declined
|
|
436
|
+
Both are the session owner's (a participant can't send a `/` line); an unknown name, or one attached or declined
|
|
438
437
|
already, is an error that says so. They are what the judge's card's buttons
|
|
439
438
|
run (see [On mode](#on-mode)).
|
|
440
439
|
|
|
@@ -465,7 +464,7 @@ context:
|
|
|
465
464
|
What it asks, and when:
|
|
466
465
|
|
|
467
466
|
- **One ask per candidate**, at the start of each of your own turns (never a
|
|
468
|
-
participant's, never
|
|
467
|
+
participant's, never on a Continue), after the
|
|
469
468
|
toolkit suggestion. A candidate proposed while your turn runs (github-pr's
|
|
470
469
|
usual case) is asked about right then, on your prompts so far.
|
|
471
470
|
- **What it sees:** the candidate's title (and description, when the bundle
|
|
@@ -556,7 +555,7 @@ It needs [`gh`](https://cli.github.com), logged in (`gh auth login`).
|
|
|
556
555
|
"#42 <the PR's title>": nothing reaches the agent until you mention it
|
|
557
556
|
in a prompt (`#42`, the branch's name, or the PR's URL). Then it is
|
|
558
557
|
attached in that same turn ("Why: you mentioned #42"). Not in a `chi
|
|
559
|
-
scratch` session
|
|
558
|
+
scratch` session, and quietly nothing without `gh`, a
|
|
560
559
|
login, a repository or an open PR. A delegate child gets the proposal too
|
|
561
560
|
(its task may name the PR). At a turn's start more than 5 minutes after
|
|
562
561
|
its last look, the bundle looks again, beside the turn (a branch switched
|