kiki-agent 0.4.2 → 0.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -3
- package/dist/cpu-worker.mjs +52744 -0
- package/dist/docs/en/configuration/config-files.md +121 -46
- package/dist/docs/en/configuration/data-locations.md +34 -7
- package/dist/docs/en/configuration/env-vars.md +37 -9
- package/dist/docs/en/configuration/overrides.md +20 -9
- package/dist/docs/en/configuration/providers.md +114 -9
- package/dist/docs/en/customization/agent-profiles.md +1 -1
- package/dist/docs/en/customization/agents-and-subagents.md +55 -12
- package/dist/docs/en/customization/hooks.md +3 -3
- package/dist/docs/en/customization/personas.md +36 -2
- package/dist/docs/en/customization/plugins.md +56 -3
- package/dist/docs/en/customization/prompt-fields.md +65 -5
- package/dist/docs/en/customization/recipes.md +77 -0
- package/dist/docs/en/customization/skins.md +2 -2
- package/dist/docs/en/customization/themes.md +1 -1
- package/dist/docs/en/features/agent-workflows.md +8 -8
- package/dist/docs/en/features/browser-and-computer.md +40 -0
- package/dist/docs/en/features/daily.md +13 -13
- package/dist/docs/en/features/ecosystem.md +6 -6
- package/dist/docs/en/features/extend.md +11 -10
- package/dist/docs/en/features/freedom.md +9 -9
- package/dist/docs/en/features/index.md +58 -28
- package/dist/docs/en/features/long-work.md +18 -14
- package/dist/docs/en/features/look.md +6 -6
- package/dist/docs/en/features/people.md +6 -6
- package/dist/docs/en/features/phone.md +13 -3
- package/dist/docs/en/features/spaces.md +12 -12
- package/dist/docs/en/features/workbench.md +8 -8
- package/dist/docs/en/getting-started/desktop-app.md +4 -8
- package/dist/docs/en/getting-started/first-launch.md +1 -1
- package/dist/docs/en/guides/goals.md +4 -2
- package/dist/docs/en/guides/interface.md +32 -10
- package/dist/docs/en/guides/memory.md +64 -10
- package/dist/docs/en/guides/sessions.md +21 -9
- package/dist/docs/en/guides/settings.md +64 -40
- package/dist/docs/en/index.md +3 -1
- package/dist/docs/en/reference/command.md +90 -31
- package/dist/docs/en/reference/model-vocabulary.md +2 -2
- package/dist/docs/en/reference/slash-commands.md +1 -1
- package/dist/docs/en/reference/tools.md +65 -20
- package/dist/docs/en/server/acp.md +9 -3
- package/dist/docs/en/server/local-server.md +19 -27
- package/dist/docs/en/server/mcp.md +9 -5
- package/dist/docs/en/server/rest-api.md +350 -22
- package/dist/docs/en/server/script-tools.md +268 -0
- package/dist/docs/zh/configuration/config-files.md +121 -46
- package/dist/docs/zh/configuration/data-locations.md +34 -7
- package/dist/docs/zh/configuration/env-vars.md +37 -9
- package/dist/docs/zh/configuration/overrides.md +20 -9
- package/dist/docs/zh/configuration/providers.md +114 -9
- package/dist/docs/zh/customization/agent-profiles.md +1 -1
- package/dist/docs/zh/customization/agents-and-subagents.md +55 -12
- package/dist/docs/zh/customization/hooks.md +3 -3
- package/dist/docs/zh/customization/personas.md +36 -2
- package/dist/docs/zh/customization/plugins.md +56 -3
- package/dist/docs/zh/customization/prompt-fields.md +65 -5
- package/dist/docs/zh/customization/recipes.md +77 -0
- package/dist/docs/zh/customization/skins.md +2 -2
- package/dist/docs/zh/customization/themes.md +1 -1
- package/dist/docs/zh/features/agent-workflows.md +10 -10
- package/dist/docs/zh/features/browser-and-computer.md +40 -0
- package/dist/docs/zh/features/daily.md +13 -13
- package/dist/docs/zh/features/ecosystem.md +6 -6
- package/dist/docs/zh/features/extend.md +10 -9
- package/dist/docs/zh/features/freedom.md +9 -9
- package/dist/docs/zh/features/index.md +58 -28
- package/dist/docs/zh/features/long-work.md +17 -13
- package/dist/docs/zh/features/look.md +6 -6
- package/dist/docs/zh/features/people.md +5 -5
- package/dist/docs/zh/features/phone.md +13 -3
- package/dist/docs/zh/features/spaces.md +12 -12
- package/dist/docs/zh/features/workbench.md +8 -8
- package/dist/docs/zh/getting-started/desktop-app.md +4 -8
- package/dist/docs/zh/getting-started/first-launch.md +1 -1
- package/dist/docs/zh/guides/goals.md +4 -2
- package/dist/docs/zh/guides/interface.md +32 -10
- package/dist/docs/zh/guides/memory.md +64 -10
- package/dist/docs/zh/guides/sessions.md +21 -9
- package/dist/docs/zh/guides/settings.md +64 -40
- package/dist/docs/zh/index.md +4 -2
- package/dist/docs/zh/reference/command.md +90 -31
- package/dist/docs/zh/reference/model-vocabulary.md +2 -2
- package/dist/docs/zh/reference/slash-commands.md +1 -1
- package/dist/docs/zh/reference/tools.md +65 -20
- package/dist/docs/zh/server/acp.md +9 -3
- package/dist/docs/zh/server/local-server.md +19 -27
- package/dist/docs/zh/server/mcp.md +9 -5
- package/dist/docs/zh/server/rest-api.md +338 -21
- package/dist/docs/zh/server/script-tools.md +268 -0
- package/dist/external-harness/agy-cli-acp.mjs +168 -162
- package/dist/external-harness/agy-hook-registration.mjs +69 -30
- package/dist/external-harness/agy-mcp-plugin.mjs +19 -0
- package/dist/external-harness/agy-permission-hook.mjs +29 -2
- package/dist/hostRunner.mjs +112 -3
- package/dist/mailbox-worker.mjs +403 -0
- package/dist/main.mjs +2 -2
- package/dist/memory-worker.mjs +1008 -0
- package/dist/native/windows-process-helper.exe +0 -0
- package/dist/query-store-worker.mjs +487 -0
- package/dist/sqlite-indexer.mjs +255 -403
- package/dist/sqlite-query-worker.mjs +261 -249
- package/dist/usage-parser-worker.mjs +3977 -9
- package/dist/usage-read-model-worker.mjs +761 -0
- package/dist/web/assets/AppErrorBoundary-B5Fc4f6-.js +1 -0
- package/dist/web/assets/NavScopeBoundary-C7MnGQio.js +1 -0
- package/dist/web/assets/{arc-DYDCMlOS.js → arc-DGB9OVgQ.js} +1 -1
- package/dist/web/assets/{architectureDiagram-3BPJPVTR-C9Y7T0O2.js → architectureDiagram-3BPJPVTR-glnQCMub.js} +1 -1
- package/dist/web/assets/{blockDiagram-GPEHLZMM-CdUrp-tD.js → blockDiagram-GPEHLZMM-bM0tnGby.js} +1 -1
- package/dist/web/assets/{c4Diagram-AAUBKEIU-PrwvB9IJ.js → c4Diagram-AAUBKEIU-DMf_rTtt.js} +1 -1
- package/dist/web/assets/channel-Cj8SKJ38.js +1 -0
- package/dist/web/assets/{chunk-2J33WTMH-BL56g_Es.js → chunk-2J33WTMH-mTccJ3tW.js} +1 -1
- package/dist/web/assets/{chunk-4BX2VUAB-DvJD5M9M.js → chunk-4BX2VUAB-DhqPYMjY.js} +1 -1
- package/dist/web/assets/{chunk-55IACEB6-C8f-nzvx.js → chunk-55IACEB6-BujrYRoO.js} +1 -1
- package/dist/web/assets/{chunk-727SXJPM-DOGkWKkV.js → chunk-727SXJPM-ciMmSI4G.js} +1 -1
- package/dist/web/assets/{chunk-AQP2D5EJ-fFOuz7g6.js → chunk-AQP2D5EJ-CZW9pKTc.js} +1 -1
- package/dist/web/assets/{chunk-FMBD7UC4-BpeXZ9LM.js → chunk-FMBD7UC4-hdALNnnU.js} +1 -1
- package/dist/web/assets/{chunk-ND2GUHAM-CRUh76fb.js → chunk-ND2GUHAM-CgKyqUdb.js} +1 -1
- package/dist/web/assets/{chunk-QZHKN3VN-uNfxaPk0.js → chunk-QZHKN3VN-B2mmUz_E.js} +1 -1
- package/dist/web/assets/classDiagram-4FO5ZUOK-f8V9p-dD.js +1 -0
- package/dist/web/assets/classDiagram-v2-Q7XG4LA2-f8V9p-dD.js +1 -0
- package/dist/web/assets/client-ClWQBErG.js +3 -0
- package/dist/web/assets/connection-C0J3BPgk.js +1 -0
- package/dist/web/assets/{cose-bilkent-S5V4N54A-BNkxG-qX.js → cose-bilkent-S5V4N54A-UV3uPjkK.js} +1 -1
- package/dist/web/assets/{dagre-BM42HDAG-BerioUei.js → dagre-BM42HDAG-Zjy-gQ6C.js} +1 -1
- package/dist/web/assets/{diagram-2AECGRRQ-Czv2SR07.js → diagram-2AECGRRQ-DL-kilIf.js} +1 -1
- package/dist/web/assets/{diagram-5GNKFQAL-Uzi1weGK.js → diagram-5GNKFQAL-CjB_xR5B.js} +1 -1
- package/dist/web/assets/{diagram-KO2AKTUF-W36h_ff3.js → diagram-KO2AKTUF-CjN4i3b9.js} +1 -1
- package/dist/web/assets/{diagram-LMA3HP47-FG4dDk52.js → diagram-LMA3HP47-CPCAMndo.js} +1 -1
- package/dist/web/assets/{diagram-OG6HWLK6-CQoEjIAY.js → diagram-OG6HWLK6-DVeBWBKd.js} +1 -1
- package/dist/web/assets/{erDiagram-TEJ5UH35-Ck06KVyZ.js → erDiagram-TEJ5UH35-CHKzBHrr.js} +1 -1
- package/dist/web/assets/export-CXoWon32.js +2 -0
- package/dist/web/assets/{flowDiagram-I6XJVG4X-C5hgxdFZ.js → flowDiagram-I6XJVG4X-C5rQa2pq.js} +1 -1
- package/dist/web/assets/{ganttDiagram-6RSMTGT7-BS52Pw5_.js → ganttDiagram-6RSMTGT7-BrLjEsNJ.js} +1 -1
- package/dist/web/assets/{gitGraphDiagram-PVQCEYII-DLlQKZHs.js → gitGraphDiagram-PVQCEYII-3DRR5VZj.js} +1 -1
- package/dist/web/assets/highlighted-body-OFNGDK62-Bdj5SJfv.js +1 -0
- package/dist/web/assets/index-2Vx5mHRn.js +1 -0
- package/dist/web/assets/index-B1UXw2C9.js +1 -0
- package/dist/web/assets/{index-CM-nNfuV.js → index-BJxtlf4P.js} +4 -4
- package/dist/web/assets/{index-DKIysLbI.js → index-BY7jPurv.js} +1 -1
- package/dist/web/assets/index-Bq79v-Sa.js +1 -0
- package/dist/web/assets/index-BqD3iTIl.js +1 -0
- package/dist/web/assets/index-Br3AlBrQ.js +1 -0
- package/dist/web/assets/{index-Ca607_hK.js → index-BvRBCpc6.js} +2 -2
- package/dist/web/assets/index-BxYCSNg_.js +3 -0
- package/dist/web/assets/{index-B2Pu0Iuu.js → index-C62wjCF_.js} +1 -1
- package/dist/web/assets/index-CBvwNH_H.js +1 -0
- package/dist/web/assets/{index-BNch_a4L.js → index-CG9e6lgq.js} +1 -1
- package/dist/web/assets/{index-ByiwExpV.js → index-CPSWYh_R.js} +2 -2
- package/dist/web/assets/index-CS4xJLZV.js +1 -0
- package/dist/web/assets/index-CjvqtF2I.js +1 -0
- package/dist/web/assets/index-CprdjRRk.js +13 -0
- package/dist/web/assets/{index-Bg99yVX_.js → index-CypTtrCB.js} +1 -1
- package/dist/web/assets/{index-BwcG86o3.js → index-DDJQGcUL.js} +1 -1
- package/dist/web/assets/index-DLWzxUOO.js +1 -0
- package/dist/web/assets/index-DQxkxZmn.js +7 -0
- package/dist/web/assets/index-DRo5Y_9p.js +1 -0
- package/dist/web/assets/index-De_LkTZx.js +1 -0
- package/dist/web/assets/{index-CZX3qUe2.js → index-DfUpwUTM.js} +2 -2
- package/dist/web/assets/{index-BLU8_Um7.js → index-Dkbz748K.js} +2 -2
- package/dist/web/assets/index-DmwFFSkV.js +1 -0
- package/dist/web/assets/index-DpcWEDhW.js +1 -0
- package/dist/web/assets/index-Dqq1RDP4.js +1 -0
- package/dist/web/assets/index-H1uMvIoa.css +1 -0
- package/dist/web/assets/index-ICHWJ2SM.js +1 -0
- package/dist/web/assets/index-O5fSd569.js +229 -0
- package/dist/web/assets/index-odjtqLLS.js +1 -0
- package/dist/web/assets/index-v_yAQ0Am.js +1 -0
- package/dist/web/assets/{infoDiagram-5YYISTIA-CD4XJGFm.js → infoDiagram-5YYISTIA-CCwV4Z0v.js} +1 -1
- package/dist/web/assets/{ishikawaDiagram-YF4QCWOH-fu5E3_CT.js → ishikawaDiagram-YF4QCWOH-BwwZcGyZ.js} +1 -1
- package/dist/web/assets/{journeyDiagram-JHISSGLW-CXcnKBfJ.js → journeyDiagram-JHISSGLW-Dc6WqniQ.js} +1 -1
- package/dist/web/assets/{kanban-definition-UN3LZRKU-BawKH6Pl.js → kanban-definition-UN3LZRKU-DVUqULOS.js} +1 -1
- package/dist/web/assets/{linear-BplJuXph.js → linear-d6rWsNOU.js} +1 -1
- package/dist/web/assets/memoryAdvisor-DBQXJB1o.js +1 -0
- package/dist/web/assets/mermaid-GHXKKRXX-Ik6SkVDT.js +642 -0
- package/dist/web/assets/{mindmap-definition-RKZ34NQL-DA1SE2uy.js → mindmap-definition-RKZ34NQL-_JHAkhHL.js} +1 -1
- package/dist/web/assets/navViewState-DaCMIYWA.js +1 -0
- package/dist/web/assets/{pieDiagram-4H26LBE5-6i021QeX.js → pieDiagram-4H26LBE5-BlhlygGy.js} +1 -1
- package/dist/web/assets/{quadrantDiagram-W4KKPZXB-CcKSZDMT.js → quadrantDiagram-W4KKPZXB-jn6R_C0S.js} +1 -1
- package/dist/web/assets/{requirementDiagram-4Y6WPE33-lYVuWRuD.js → requirementDiagram-4Y6WPE33-B9fXCHBr.js} +1 -1
- package/dist/web/assets/{sankeyDiagram-5OEKKPKP-4Zfb4_h4.js → sankeyDiagram-5OEKKPKP-fPJwIxkl.js} +1 -1
- package/dist/web/assets/{sequenceDiagram-3UESZ5HK-DqltKmlY.js → sequenceDiagram-3UESZ5HK-1v1DTNGt.js} +1 -1
- package/dist/web/assets/{spaces-CjuXbmxF.js → spaces-CvL2DRZM.js} +1 -1
- package/dist/web/assets/{stateDiagram-AJRCARHV-HFdhqxzx.js → stateDiagram-AJRCARHV-CEc_PLov.js} +1 -1
- package/dist/web/assets/stateDiagram-v2-BHNVJYJU-iAMctzaT.js +1 -0
- package/dist/web/assets/theme-LRSmy8mD.js +1 -0
- package/dist/web/assets/{timeline-definition-PNZ67QCA-HNRxaB3t.js → timeline-definition-PNZ67QCA-CEjhuitj.js} +1 -1
- package/dist/web/assets/{vennDiagram-CIIHVFJN-DwsCTyaD.js → vennDiagram-CIIHVFJN-CActt9h9.js} +1 -1
- package/dist/web/assets/{wardley-L42UT6IY-BWW2wtVO.js → wardley-L42UT6IY-Bp3q2izt.js} +1 -1
- package/dist/web/assets/{wardleyDiagram-YWT4CUSO-C-ktKm7v.js → wardleyDiagram-YWT4CUSO-C_zutiQ2.js} +1 -1
- package/dist/web/assets/{xychartDiagram-2RQKCTM6-48AxNW9k.js → xychartDiagram-2RQKCTM6-CRafvv33.js} +1 -1
- package/dist/web/icons/apple-touch-icon.png +0 -0
- package/dist/web/icons/icon-192.png +0 -0
- package/dist/web/icons/icon-512.png +0 -0
- package/dist/web/icons/maskable-512.png +0 -0
- package/dist/web/index.html +12 -2
- package/dist/web/manifest.webmanifest +16 -0
- package/native/auth-native/prebuilds/linux-arm64/auth-native.node +0 -0
- package/native/auth-native/prebuilds/linux-x64/auth-native.node +0 -0
- package/native/auth-native/prebuilds/win32-arm64/auth-native.node +0 -0
- package/native/auth-native/prebuilds/win32-x64/auth-native.node +0 -0
- package/package.json +23 -4
- package/dist/search-worker.mjs +0 -14177
- package/dist/web/assets/AppErrorBoundary-DiGMUg4r.js +0 -1
- package/dist/web/assets/LifeMark-CL6-HWDu.js +0 -1
- package/dist/web/assets/NavScopeBoundary-CFCnvZR0.js +0 -1
- package/dist/web/assets/channel-Bj_gZ_Lv.js +0 -1
- package/dist/web/assets/classDiagram-4FO5ZUOK-ssCwe2R4.js +0 -1
- package/dist/web/assets/classDiagram-v2-Q7XG4LA2-ssCwe2R4.js +0 -1
- package/dist/web/assets/client-DGj93bGT.js +0 -3
- package/dist/web/assets/connection-Bpf-EjrL.js +0 -1
- package/dist/web/assets/export-T_izwEkQ.js +0 -2
- package/dist/web/assets/highlighted-body-OFNGDK62-Btm6MuZ4.js +0 -1
- package/dist/web/assets/index-5_yzg61S.js +0 -1
- package/dist/web/assets/index-B-6LiYTY.js +0 -1
- package/dist/web/assets/index-B4iu4SJW.js +0 -1
- package/dist/web/assets/index-B9MlqF7J.js +0 -1
- package/dist/web/assets/index-BECSk4If.js +0 -1
- package/dist/web/assets/index-BFcyN2Zw.js +0 -1
- package/dist/web/assets/index-BIebkSEI.css +0 -1
- package/dist/web/assets/index-BMWid2q9.js +0 -1
- package/dist/web/assets/index-BeMvPEXs.js +0 -1
- package/dist/web/assets/index-Bezli3SF.js +0 -1
- package/dist/web/assets/index-BkPV0psm.js +0 -1
- package/dist/web/assets/index-CG8uIlD7.js +0 -1
- package/dist/web/assets/index-CJ92kLtO.js +0 -1
- package/dist/web/assets/index-CRDDqofN.js +0 -1
- package/dist/web/assets/index-Cd62y0wD.js +0 -1
- package/dist/web/assets/index-CgcJPsK6.js +0 -3
- package/dist/web/assets/index-Cy8C_eFR.js +0 -7
- package/dist/web/assets/index-D8z7lcQn.js +0 -166
- package/dist/web/assets/index-D_oPSlBL.js +0 -1
- package/dist/web/assets/index-Dceu0bqY.js +0 -1
- package/dist/web/assets/index-eUyF-8Sq.js +0 -1
- package/dist/web/assets/index-hG2s2Spn.js +0 -13
- package/dist/web/assets/mermaid-GHXKKRXX-BO9hkP3Z.js +0 -621
- package/dist/web/assets/stateDiagram-v2-BHNVJYJU-Dx28QuZF.js +0 -1
- package/dist/web/assets/theme-beWE_6f8.js +0 -1
|
@@ -149,7 +149,73 @@ Thread communication is allowed and off by default. A user setting of `[thread_c
|
|
|
149
149
|
|
|
150
150
|
## Subcommands
|
|
151
151
|
|
|
152
|
-
`kiki` provides the following subcommands: `serve` (start, reuse, or stop the shared daemon), `seat` (manage external-caller seats), `mcp` (run the stdio MCP edge), `doctor` (diagnose the daemon connection), `prompt-fields` (discover and validate prompt fields), `login` (non-interactive OAuth login), `acp` (ACP IDE mode), `web` (the compatible foreground REST/WebSocket/web service), `export` (export a session), and `provider` (manage providers).
|
|
152
|
+
`kiki` provides the following subcommands: `session` (inspect saved timelines), `storage` (upgrade and back up canonical mailboxes), `serve` (start, reuse, or stop the shared daemon), `seat` (manage external-caller seats), [`tools`](../server/script-tools.md) (call shared tools and download saved results as JSON), `mcp` (run the stdio MCP edge), `doctor` (diagnose the daemon connection), `prompt-fields` (discover and validate prompt fields), `login` (non-interactive OAuth login), `acp` (ACP IDE mode), `web` (the compatible foreground REST/WebSocket/web service), `export` (export a session), and `provider` (manage providers).
|
|
153
|
+
|
|
154
|
+
### `kiki session`
|
|
155
|
+
|
|
156
|
+
Read saved session timelines without resuming the session, acquiring its writer lock, or sending model requests:
|
|
157
|
+
|
|
158
|
+
```sh
|
|
159
|
+
kiki session list
|
|
160
|
+
kiki session show <session_id> --agent main
|
|
161
|
+
kiki session show <session_id> --agent main --json
|
|
162
|
+
kiki session show <session_id> --agent main --before <cursor>
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
`show` accepts a `session_<uuid>` ID, a bare UUID, or an `/s/session_<uuid>` link. Use `--workspace <workspace-id>` to select a copy when the same session exists in more than one workspace. For a different home, set the `KIKI_HOME` environment variable before running the command.
|
|
166
|
+
|
|
167
|
+
Large timelines open in bounded windows rather than failing at a whole-file size limit. The default target is the newest 8 MiB of wire records. `--max-bytes <bytes>` sets a target from 1 to 8,388,608 bytes. The reader searches back up to another 64 MiB for a turn opening; actual reads can therefore exceed the target. A page spans at most 72 MiB, with at most 136 MiB plus one 64 KiB alignment block of total read I/O. If a long turn has no opening within that search, the page starts at a complete record instead and remains pageable. A single record exceeding the 64 MiB limit is reported as a resource limit, with JSON error code `inspection_limit`, without changing or declaring the session damaged.
|
|
168
|
+
|
|
169
|
+
JSON identifies page edges with `wire.startBoundary` (`turn` or `record`) and `wire.endBoundary` (`turn`, `record` or `watermark`). When either edge is `record`, the page is a turn continuation: `timeline` contains `type: "wire-record"` entries with absolute `byteOffset`, stable `id` (`<agent>:wire:<byteOffset>`) and the original `record`, rather than reconstructed complete-turn messages. JSON consumers must handle these entries as raw records. Text output labels them `turn continuation`. This preserves records such as a tool result whose call is on another page; continue with `Older` to read that earlier context.
|
|
170
|
+
|
|
171
|
+
Text output includes an `Older` command. JSON returns `wire.nextCursor`, byte boundaries and the original `watermark` (the file size fixed when this pagination began). Pass the cursor with the same session, workspace and agent to read the preceding window. The cursor is bound to that wire file's identity and first size. Normal appends do not shift the page boundaries; replacement, shortening or a same-size edit that changes the modification time rejects the cursor. Same-size edits preserving that time, and same-file prefix edits followed by growth, are not detected by this check. Cursor mismatches and invalid window arguments return `invalid_option` in JSON.
|
|
172
|
+
|
|
173
|
+
`selectedAgent.wireComplete=false` means the selected timeline is partial; each agent summary has its own `wireComplete`. Complete-turn pages contain timeline projections, while continuation pages contain raw records. Neither represents a complete session-state snapshot: messages and state changes outside the window have not been replayed. The session header and summaries of other agents describe the currently saved files, not their state at the selected page's watermark. Continue paging to inspect earlier records; the canonical journal remains intact.
|
|
174
|
+
|
|
175
|
+
`--follow` observes saved changes without attaching to the running agent. With `--json`, it writes one snapshot per NDJSON line. `--before` and `--follow` are mutually exclusive.
|
|
176
|
+
|
|
177
|
+
`seal` stores a compressed, sealed copy of each agent journal in one persisted session. Later journal reads use that copy. The original `wire.jsonl` stays on disk at its current size, so sealing does not reduce its disk use and the extra sealed data can increase the home directory's size. `unseal` removes the seal without modifying the original file; later reads use that file again.
|
|
178
|
+
|
|
179
|
+
```sh
|
|
180
|
+
kiki session seal <session_id>
|
|
181
|
+
kiki session unseal <session_id> --json
|
|
182
|
+
```
|
|
183
|
+
|
|
184
|
+
Both commands accept the same session reference forms and `--workspace <workspace-id>` selection as `show`. They do not resume the session or send model requests. If another Kiki process holds the session writer lock, the command refuses to run and leaves the journal unchanged; the JSON error code is `session_active`.
|
|
185
|
+
|
|
186
|
+
If a sealed journal is already being read, `seal` and `unseal` wait until that read finishes or the reading process exits before removing its sealed segments. A damaged seal fails the read with `Cold journal cannot be read` (`storage.corrupted`), rather than silently reading the original file. Run `unseal` to remove that seal and return to the retained file.
|
|
187
|
+
|
|
188
|
+
On success, text output reports how many journals were sealed or unsealed. `--json` returns `schemaVersion`, `action` (`seal` or `unseal`), `sessionId`, `workspaceId`, `wires`, and `originalRetained: true`.
|
|
189
|
+
|
|
190
|
+
### `kiki storage`
|
|
191
|
+
|
|
192
|
+
Upgrade the canonical peer-message mailbox before opening an older home in Kiki 0.5.x. Interactive and print startup report `mailbox.migration_required` rather than creating an empty mailbox. `status` reads the upgrade state without starting the engine or changing mailbox authority:
|
|
193
|
+
|
|
194
|
+
```sh
|
|
195
|
+
kiki storage status --home /path/to/home --json
|
|
196
|
+
kiki storage migrate --home /path/to/home
|
|
197
|
+
```
|
|
198
|
+
|
|
199
|
+
Close every other Kiki writer using that home before `migrate`. If a writer still owns it, the command reports `waiting` and exits with code `2`; it does not take the writer's lock. After the writer exits, repeat `migrate`. The upgrade backs up the source, imports and verifies records, then switches to SQLite. Interrupting a cancellable phase preserves the source and committed import pages; repeat `migrate` to resume. Legacy imports belong to the 0.5.x upgrade series: complete this step with the latest 0.5.x tool before moving to 0.6.
|
|
200
|
+
|
|
201
|
+
Every storage subcommand accepts `--home` and `--json`. JSON status and progress are newline-delimited objects, including `authority`, `phase`, `state`, `progress`, optional `failure` or `warning`, `canCancel`, and `canRollback`. A source's `exists` means its directory was detected; `stage` tracks its backup, import, and verification. `failure.source` names the failing source; for invalid or conflicting legacy records, `failure.key` names the exact row, while other failures may report the last committed key. If `mailbox.checkpoint_warning` appears with `authority: "sqlite"` and `state: "complete"`, the mailbox remains usable; the old migration record needs repair before rollback, so `canRollback` is `false`. A failed operation exits `1`; a cancelled upgrade exits `130`. The recovery commands are:
|
|
202
|
+
|
|
203
|
+
```sh
|
|
204
|
+
kiki storage cancel --home /path/to/home
|
|
205
|
+
kiki storage rollback --home /path/to/home
|
|
206
|
+
kiki storage backup /path/to/mailbox-backup.sqlite --home /path/to/home
|
|
207
|
+
```
|
|
208
|
+
|
|
209
|
+
`cancel` requests cancellation at a committed batch boundary; authority switching finishes once it has begun. `rollback` restores the retained original only before SQLite has accepted new canonical writes. After new writes, keep SQLite authority and retain its backups. `backup` creates and verifies a consistent SQLite copy without overwriting an existing destination; it requires a completed upgrade.
|
|
210
|
+
|
|
211
|
+
To reclaim duplicate recovery copies after rollback has closed, first preview the exact directories and byte counts. Once all Kiki writers for this home have stopped, confirm with a new backup destination outside the home:
|
|
212
|
+
|
|
213
|
+
```sh
|
|
214
|
+
kiki storage cleanup-recovery --home /path/to/home --json
|
|
215
|
+
kiki storage cleanup-recovery --home /path/to/home --backup /path/outside-home/mailbox-cleanup.sqlite --confirm
|
|
216
|
+
```
|
|
217
|
+
|
|
218
|
+
The confirmed command verifies that every frozen `sources/` file matches its moved original, creates and checks an independent SQLite backup, then removes only matching `sources/` copies for this migration. New migrations already discard their temporary import archive when switching to SQLite; this command also compacts archives left in previously migrated databases. It preserves `originals/` (including older activity epochs), mailbox fences, and the independent backup. If an old or current writer is active, a copy differs, or backup verification fails, no recovery copy is removed. Resume an interrupted cleanup with `--confirm` and its recorded backup, without supplying `--backup` again; if another mailbox writer took ownership since then, choose a new backup destination. Keep the [canonical mailbox directory and retained originals](../configuration/data-locations.md#canonical-mailbox), not only the search or query caches.
|
|
153
219
|
|
|
154
220
|
### `kiki serve`
|
|
155
221
|
|
|
@@ -385,41 +451,34 @@ Client-provided stdio MCP servers are disabled by default. To trust an IDE to st
|
|
|
385
451
|
|
|
386
452
|
### `kiki web`
|
|
387
453
|
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
When the server is running, `GET /openapi.json` returns the REST OpenAPI document and `GET /asyncapi.json` returns the local WebSocket AsyncAPI document. For an end-to-end walkthrough of driving sessions over the API, see [Local server and API](../server/local-server.md); for the protocol details, see the [Server API](../server/rest-api.md) reference.
|
|
454
|
+
Turn on Web access on this home's shared daemon so a browser on another device can enter this Kiki. If no daemon is reachable, one is started first and kept running until you stop it (as `kiki serve --ensure --idle-exit 0ms` would). Kiki then signs a single-use entry link, prints it, opens it in the local browser by default, and the command returns instead of holding the terminal. The output never contains `#token=` or the local-owner capability.
|
|
391
455
|
|
|
392
456
|
```sh
|
|
393
|
-
kiki web
|
|
394
|
-
kiki web --no-open
|
|
395
|
-
kiki web --
|
|
457
|
+
kiki web # temporary Web access (eight hours), print a single-use link
|
|
458
|
+
kiki web --persistent --no-open # always on, print the link only
|
|
459
|
+
kiki web --status # query only; does not start a daemon
|
|
460
|
+
kiki web --off # close Web access; Kiki and its tasks keep running
|
|
461
|
+
kiki web --revoke [session-id] # sign out one browser, or all without an id
|
|
396
462
|
```
|
|
397
463
|
|
|
398
|
-
Multiple instances can run concurrently under the same home: each registers itself in `~/.kiki/server/instances/`, and port collisions increment automatically (58628, 58629, etc.).
|
|
399
|
-
|
|
400
464
|
| Option | Description |
|
|
401
465
|
| --- | --- |
|
|
402
|
-
| `--
|
|
403
|
-
| `--
|
|
404
|
-
| `--
|
|
405
|
-
| `--
|
|
406
|
-
| `--
|
|
407
|
-
| `--
|
|
408
|
-
| `--
|
|
409
|
-
| `--
|
|
410
|
-
| `--
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
:::
|
|
419
|
-
|
|
420
|
-
::: danger Warning
|
|
421
|
-
`--dangerous-bypass-auth` exposes legacy APIs without authentication: anyone with access to the port can control sessions, files and shell. Connection management and forwarding still require local-owner access; effective peer admission is unavailable, and saved grants cannot authorize incoming peers in this mode. Use only in trusted networks or behind an authenticating reverse proxy, and stop the server when finished.
|
|
422
|
-
:::
|
|
466
|
+
| `--home <dir>` | Kiki home to operate on |
|
|
467
|
+
| `--temporary` | Open for eight hours, then close by itself (default) |
|
|
468
|
+
| `--persistent` | Stay open across daemon restarts until you turn it off |
|
|
469
|
+
| `--status` | Show whether it is on and which browsers are signed in; does not start a daemon |
|
|
470
|
+
| `--off` | Close Web access and revoke every link and browser session; Kiki and its tasks keep running |
|
|
471
|
+
| `--revoke [session-id]` | Sign out one browser, or all of them without an id |
|
|
472
|
+
| `--port <port>` | Port for the Web listener; omitted, it reuses the daemon's local port |
|
|
473
|
+
| `--host [host]` | Web listener address; bare `--host` listens on all IPv4 interfaces. A non-loopback address needs an HTTPS `--public-url` or `--insecure-no-tls` |
|
|
474
|
+
| `--public-url <url>` | The origin browsers actually use, for example your HTTPS reverse proxy |
|
|
475
|
+
| `--insecure-no-tls` | Allow plain LAN HTTP; traffic and browser access are not encrypted |
|
|
476
|
+
| `--json` | Print the result as JSON (including `link` when turning on) |
|
|
477
|
+
| `--no-open` | Do not open the link in the local default browser |
|
|
478
|
+
|
|
479
|
+
Choose at most one of `--status`, `--off`, and `--revoke`, and not both `--temporary` and `--persistent`. A single-use link is valid for ten minutes and signs in one browser; Web access is a full-access entry into this Kiki rather than a read-only share. See [Use Kiki in a browser](../server/local-server.md#use-kiki-in-a-browser) for the session and revocation model. The same operations are available as `/web temporary|persistent|status|off|link|revoke [id]` in the interactive TUI, and under **Settings → Connection & remote → Access from elsewhere → Web access** in the GUI.
|
|
480
|
+
|
|
481
|
+
The daemon's own lifecycle belongs to [`kiki serve`](#kiki-serve). While it runs, `GET /openapi.json` returns the REST OpenAPI document and `GET /asyncapi.json` returns the local WebSocket AsyncAPI document; see [Local server and API](../server/local-server.md) for driving sessions over the API and the [Server API](../server/rest-api.md) reference for protocol details. The legacy `kiki server …` command is no longer supported.
|
|
423
482
|
|
|
424
483
|
#### `kiki web rotate-token`
|
|
425
484
|
|
|
@@ -440,7 +499,7 @@ kiki export [sessionId] [options]
|
|
|
440
499
|
| `--yes` | `-y` | Skip confirmation when exporting the default session |
|
|
441
500
|
| `--no-include-global-log` | | Exclude the global diagnostic log. Included by default |
|
|
442
501
|
|
|
443
|
-
The export includes all files in the target session directory. The global diagnostic log (`~/.kiki/logs/kimi-code.log`) is included by default because it may contain events from other sessions or projects; add `--no-include-global-log` if you do not want to share it.
|
|
502
|
+
The export includes all files in the target session directory. The global diagnostic log (`<home>/logs/kimi-code.log`; default `~/.kiki/logs/kimi-code.log`) is included by default because it may contain events from other sessions or projects; add `--no-include-global-log` if you do not want to share it.
|
|
444
503
|
|
|
445
504
|
```sh
|
|
446
505
|
# Export the most recent session in the current directory, skipping confirmation
|
|
@@ -25,7 +25,7 @@ A newly spawned subagent selects its model in this order:
|
|
|
25
25
|
|
|
26
26
|
With none of these sources, the spawn fails with `model.not_configured`; neither the caller's model nor the main-agent `default_model` is a silent fallback. `model_alias: inherit` on a profile, route, or caller lease binds the caller's current model and thinking effort unless an explicit tool `effort` or an applicable effort pin overrides them. `AgentRun` itself rejects `model_alias: "inherit"` — pass a concrete configured model name, or omit the parameter to use the target default. An unknown alias or a model on a denylist fails before the child starts. Choosing a model outside `preferred_models` / `discouraged_models` is allowed as long as it is inside every hard model and effort limit.
|
|
27
27
|
|
|
28
|
-
A resumed or retried subagent keeps its persisted binding unless the `AgentRun` `resume` explicitly requests a change. Omitting both `model_alias` and `effort` keeps the current binding; an explicit effort applies to the next idle run. `AgentRun` rejects `model_alias: "inherit"` on resume as well; specify a concrete model name for an explicit change, or omit it to keep the saved model. Switching to a different canonical model requires `allow_model_change: true
|
|
28
|
+
A resumed or retried subagent keeps its persisted binding unless the `AgentRun` `resume` explicitly requests a change. Omitting both `model_alias` and `effort` keeps the current binding; an explicit effort applies to the next idle run. `AgentRun` rejects `model_alias: "inherit"` on resume as well; specify a concrete model name for an explicit change, or omit it to keep the saved model. Switching to a different canonical model requires an explicit [`context_mode`](../customization/agents-and-subagents.md#named-child-agents), or the legacy `allow_model_change: true` / `new_window: true` confirmation. Do not mix `context_mode` with either legacy parameter. An alias resolving to the same canonical model is a no-op; `compact` and `fresh` can still rebuild its context without changing models.
|
|
29
29
|
|
|
30
30
|
## Agent files and routes
|
|
31
31
|
|
|
@@ -45,7 +45,7 @@ Identity is who the model is serving, not which profile is selected, so switchin
|
|
|
45
45
|
|
|
46
46
|
The context budget and the generated-token ceiling are caps, not preferences: the effective value is the lower of the shared cap and any identity value, so an identity can tighten them but never raise them past what the model allows.
|
|
47
47
|
|
|
48
|
-
In Settings › Models,
|
|
48
|
+
In Settings › Models & providers › Providers & accounts, expand a connection, open its Models list, and click a model row to open the side-panel editor. It opens on the shared values; switch to Main agent to see and edit only that identity's differences, and the editor shows what each field inherits and what it resolves to.
|
|
49
49
|
|
|
50
50
|
## Model ID resolution
|
|
51
51
|
|
|
@@ -41,7 +41,7 @@ Some commands are only available in the idle state. Executing these commands whi
|
|
|
41
41
|
| `/export-debug-zip` | — | Export the current session as a debug ZIP archive (same behavior as [`kiki export`](./command.md#kiki-export)) | No |
|
|
42
42
|
| `/copy` | — | Copy the last assistant message to the clipboard | No |
|
|
43
43
|
| `/add-dir [<path>]` | — | Add an extra workspace directory to the current session. Run without a path (or with `list`) to list configured directories. When adding, choose whether to remember the directory for the project in `.kiki/local.toml` | No |
|
|
44
|
-
| `/web` | — |
|
|
44
|
+
| `/web` | — | Manage Web access on the shared daemon: `/web temporary\|persistent\|status\|off\|link\|revoke [id]`, with `--host`, `--port`, `--public-url`, `--insecure-no-tls`, and `--no-open`; with no argument it turns on temporary access and prints a single-use link while the TUI keeps running. See [`kiki web`](./command.md#kiki-web) | Yes |
|
|
45
45
|
|
|
46
46
|
## Modes & Run Control
|
|
47
47
|
|
|
@@ -4,16 +4,22 @@ Built-in tools are the tool set provided by Kiki alongside its core engine — n
|
|
|
4
4
|
|
|
5
5
|
Compared to MCP tools, built-in tools are managed directly by the runtime, their lifecycle is bound to the session, and no external process is required. Both follow the same unified approval mechanism: **read-only tools** (such as `Read`, `Grep`, `Glob`) are automatically allowed by default, while **execution tools** (such as `Bash`) require user approval by default. File writes follow the workspace trust model: in a trusted working directory, `Write` / `Edit` inside that directory run without per-file approval; external targets require approval. Sensitive targets are checked at their resolved location: manual and Auto modes ask for approval, while YOLO mode skips the prompt unless an explicit deny rule applies. Plan mode exit approval is not affected.
|
|
6
6
|
|
|
7
|
+
When a result reports `Tool output formatting failed after execution`, use `Read` or `Grep` on its `output_path` before rerunning the tool. Execution has already happened; the saved text and attached media remain available. The result states whether it saved the complete text or only a retention-limited prefix.
|
|
8
|
+
|
|
9
|
+
History, thread, room, child-agent, task, memory, and working-note receipts use a compact model view: source text appears before paging details, timestamps use the runtime's local timezone with an explicit UTC offset, and partial coverage and truncation include continuation guidance. Copy the supplied call to read another page or segment. `HistoryRead` character ranges count UTF-16 units; task-log offsets count UTF-8 bytes. In compacted handoffs, repeated sources share a single numbered `HistoryRead` call; `t42.3` means turn 42, step 3.
|
|
10
|
+
|
|
11
|
+
For the full original receipt, add `raw: true` to `HistoryList`, `HistoryRead`, `HistorySearch`, `ThreadList`, `ThreadRead`, `ThreadWait`, `ThreadSend`, `RoomRead`, `AgentList`, `TaskList`, `TaskOutput`, `MemorySearch`, `MemoryRead`, or `TodoList`. It can accompany a continuation cursor without changing its query. Raw mode changes presentation only: it still performs the requested operation, so do not resend a message or rewrite notes just to inspect metadata. Structured results used by the GUI and SDK remain unchanged; field names below describe that original data.
|
|
12
|
+
|
|
7
13
|
## File Tools
|
|
8
14
|
|
|
9
|
-
File tools handle reading, writing, and searching
|
|
15
|
+
File tools handle reading, writing, and searching files — the foundation for code analysis and modification tasks. With native SSH enabled, `Read`, `Write`, `Edit`, `Grep`, `Glob`, and `ReadMediaFile` also accept `host` or an `ssh://host/path` address. Paths belong to the selected host; use native Windows paths such as `E:/project` on Windows SSH hosts. Results identify the host, platform, and execution shell.
|
|
10
16
|
|
|
11
17
|
| Tool | Default Approval | Description |
|
|
12
18
|
| --- | --- | --- |
|
|
13
19
|
| `Read` | Auto-allow | Read a text file's contents |
|
|
14
20
|
| `Write` | Auto-allow inside a trusted workspace; blocked or approval outside | Create or overwrite a file |
|
|
15
21
|
| `Edit` | Auto-allow inside a trusted workspace; blocked or approval outside | Precise string replacement |
|
|
16
|
-
| `Grep` | Auto-allow |
|
|
22
|
+
| `Grep` | Auto-allow | Search file contents |
|
|
17
23
|
| `Glob` | Auto-allow | Find files by glob pattern |
|
|
18
24
|
| `ReadMediaFile` | Auto-allow | Read an image or video file |
|
|
19
25
|
|
|
@@ -21,13 +27,15 @@ File tools handle reading, writing, and searching the local filesystem — the f
|
|
|
21
27
|
|
|
22
28
|
The result shows line numbers and reports the original line endings. A pure CRLF file appears as LF in `Read`, and `Edit` preserves CRLF when you edit that view; a file with mixed line endings needs the visible `\r` characters matched exactly.
|
|
23
29
|
|
|
24
|
-
|
|
30
|
+
UTF-8 line-window reads over SSH stream the requested lines. Tail reads may scan the file to count lines when remote counting is unavailable. Decoding errors are checked in the decoded window, including lookahead when needed. If a tail read reports that the file changed, retry it to obtain consistent line numbers.
|
|
31
|
+
|
|
32
|
+
An explicit absolute path can read outside the workspace, subject to sensitive-file approval. Registered user Skill and agent definition roots (including linked installations) are readable by default, while an ordinary workspace link to an external file requires approval. In the current Space's `<home>` (default `~/.kiki`), only `agents`, `skills`, `commands`, and `docs` count as definition or documentation roots. Inherited agent and registered Skill roots are also readable; generic `~/.agents` roots remain under the OS home. Other paths still need an explicit path and remain subject to the sensitive-file rules. Local home paths are not applied to SSH runtimes.
|
|
25
33
|
|
|
26
34
|
**`Write`** accepts `path`, `content`, and an optional `mode` (`overwrite` or `append`; defaults to overwrite). Missing parent directories are created automatically; `append` mode appends content to the end of the file without automatically adding a newline.
|
|
27
35
|
|
|
28
36
|
**`Edit`** accepts `path`, `old_string` (the exact text to replace), and `new_string` (the replacement text). By default it replaces only one unique match; if the same content appears multiple times in the file, the tool returns an error and suggests using `replace_all: true`. `old_string` and `new_string` must not be identical. `Write` and `Edit` resolve links before approval: a link in a skill directory does not grant permission to write its target. If a target changes between approval and execution, retry the call after reviewing the new target.
|
|
29
37
|
|
|
30
|
-
**`Grep`**
|
|
38
|
+
**`Grep`** searches file contents with ripgrep, or PowerShell on Windows SSH hosts. It supports regular expressions (`pattern`), a search path (`path`), file type filtering (`type`, e.g., `ts`, `py`), glob filtering (`glob`), and output mode (`output_mode`: `files_with_matches` / `content` / `count_matches`; defaults to `files_with_matches`). `content` mode supports context lines (`-A`, `-B`, `-C`), case-insensitive matching (`-i`), line numbers (`-n`, default true), and multiline matching (`multiline`). Windows SSH uses .NET regular expressions; an invalid expression or unsupported file type returns an error. Use `glob` if the requested type is unavailable. All modes support `offset` + `head_limit` pagination; `head_limit` defaults to 250 and `0` means unlimited. Sensitive files such as `.env` files and private keys are automatically filtered out; set `include_ignored=true` to search files ignored by `.gitignore`, though sensitive files remain filtered.
|
|
31
39
|
|
|
32
40
|
**`Glob`** matches files in a specified directory (`path`; defaults to the working directory) by glob pattern (`pattern`). Results are sorted by modification time in descending order, returning 100 entries by default. It respects `.gitignore`, `.ignore`, and `.rgignore` by default; set `include_ignored=true` to include ignored files such as build outputs, while sensitive files remain filtered. Brace patterns such as `*.{ts,tsx}` are supported, and broad wildcard patterns are allowed.
|
|
33
41
|
|
|
@@ -56,9 +64,9 @@ When a command is only a file read, search, or text-file write, `Bash` still run
|
|
|
56
64
|
|
|
57
65
|
A foreground command that hits its timeout is not killed by default: it keeps running as a background task, with a fresh copy of the 600s background budget. Set [`bash_auto_background_on_timeout`](../configuration/config-files.md#background) to `false` under `[background]` to kill timed-out foreground commands instead, and change the background budget itself with [`bash_task_timeout_s`](../configuration/config-files.md#background) (`0` = no timeout; print mode defaults to no timeout).
|
|
58
66
|
|
|
59
|
-
stdin is always closed, so an interactive command receives EOF immediately. A stopped or timed-out task is terminated with SIGTERM, then SIGKILL after the 5-second grace period.
|
|
67
|
+
stdin is always closed, so an interactive command receives EOF immediately. A stopped or timed-out task is terminated with SIGTERM, then SIGKILL after the 5-second grace period. Local Windows commands use Git Bash by default. With native SSH enabled, pass `host` to run on an SSH host; Windows SSH commands use PowerShell syntax and native Windows paths, without requiring Git Bash on that host. Results and joined-host announcements show the remote platform and shell after the first connection.
|
|
60
68
|
|
|
61
|
-
On Windows, a local `Bash` command can leave processes running after the command itself exits. Those processes belong to the Kiki backend that started them. They keep running
|
|
69
|
+
On Windows, a local `Bash` command can leave processes running after the command itself exits. Those processes belong to the Kiki backend that started them. They keep running when you [close the desktop window](../getting-started/desktop-app.md#windows-tray-and-opening-files); with **Hide to tray** enabled, closing the window only hides or minimizes it. Stopping that backend, or an unexpected exit, stops each of those command trees and leaves other programs on the machine alone.
|
|
62
70
|
|
|
63
71
|
`TaskStop`, or a foreground timeout that kills the command instead of moving it to the background, still ends the tree. A command on a remote SSH host is not tied to the local backend's lifetime; closing or stopping local Kiki does not use this cleanup for that remote command. If `Bash` reports that the Windows Bash process helper is missing, or that the Windows process helper does not support "owner lifetime" (keeping the command's processes with the Kiki backend), reinstall Kiki from the matching release so the helper and the app are the same build.
|
|
64
72
|
|
|
@@ -86,9 +94,9 @@ Normal appends during a transcript search do not require the writer to stop: the
|
|
|
86
94
|
|
|
87
95
|
If a session or workspace cannot be resolved, follow the structured error's `next_call`. A known session keeps its indexed workspace and the applicable access approval. An unknown session leads to discovery rather than reading the requested turn in another session. A stale cursor may first retry its original session without the cursor; if that session is still missing, use the returned discovery call instead of repeating the missing id.
|
|
88
96
|
|
|
89
|
-
Use `HistoryList` to browse short turn excerpts or archived agents when you lack search words. A turn entry's `ref` opens the whole turn as source blocks with `HistoryRead`; `turn` and `step_id` also select bounded turn/step blocks. A cursor already carries its original target and should be passed alone.
|
|
97
|
+
Use `HistoryList` to browse short turn excerpts or archived agents when you lack search words. A turn entry's `ref` opens the whole turn as source blocks with `HistoryRead`; `turn` and `step_id` also select bounded turn/step blocks. A cursor already carries its original target and should be passed alone. For a cold large session, the default newest-first list can return recent turns and readable refs before the older directory is prepared. This page remains `partial` and may contain fewer turns than `limit`; its cursor continues toward older turns at the same source watermark. Other directory preparation pages may be empty. Continue with their cursor rather than treating partial coverage as a complete list. Use `HistoryRead({"step_id":"t42.3"})` for a known step. For a Search hit on a text block, `HistoryRead({"ref":"<hit.ref>"})` starts near the match. Each block includes its own `ref` and UTF-16 `range`; continue with `cursor`, or reopen a block with its `ref` and `start_char` set to the previous `range.end` if the cursor expires. A stale or removed source returns a structured recovery error: discard the `ref` or cursor and follow `next_call` rather than repeating it. Existing v1 Read cursors continue their legacy JSON paging; restart with a ref, turn, or step_id for blocks.
|
|
90
98
|
|
|
91
|
-
`HistoryRead` reports a normal `partial` read with the blocks it scanned and a cursor to continue. `no_match` means the scan finished and the selector has nothing there. `source_pending` means the persisted transcript ends in an unfinished record, so the lookup cannot yet say whether the selector matches; retry it once the writer settles. When the navigation directory is
|
|
99
|
+
`HistoryRead` reports a normal `partial` read with the blocks it scanned and a cursor to continue. `no_match` means the scan finished and the selector has nothing there. `source_pending` means the persisted transcript ends in an unfinished record, so the lookup cannot yet say whether the selector matches; retry it once the writer settles. When the navigation directory is being prepared or a saved ref's navigation cache needs rebuilding, `partial` comes with a preparation cursor and progress. Continue with that cursor: it keeps the original ref, source watermark and read position, and an empty block list means preparation is unfinished rather than `no_match`. If the agent's persisted transcript is unavailable altogether, the error points you at `HistoryList` with `kind: "agents"` to check the agent id. A source that has changed returns an error rather than another turn's content.
|
|
92
100
|
|
|
93
101
|
To search only cross-thread messages, use `HistorySearch({"query":"handoff","scope":"peer"})`. It searches both directions within the current workspace, or the explicitly approved `workspace_id`; an optional `session_id` narrows to one session. Peer search reuses the lexical matching modes but is newest-first, so omit `sort` or use `"newest"`. It excludes subagents and ordinary user input, does not accept `source: "transcript"`, and accepts only `agent_id: "main"`.
|
|
94
102
|
|
|
@@ -96,6 +104,28 @@ The response has `source: "mailbox"`; hits carry `communication` metadata with m
|
|
|
96
104
|
|
|
97
105
|
In non-interactive prompt runs (`kiki -p`), `HistoryList` reads a bounded prefix of the persisted transcript without starting a server or search worker: at most 2 MiB, 10,000 records and 256 KiB per record; agent rosters inspect at most 256 directory entries. Results explicitly report `partial` coverage and do not contain navigation `ref` values. You can list the current session or specify another persisted `session_id`. `HistorySearch` and `HistoryRead` remain unavailable in this print host; use an interactive session or the server for indexed search and full history reads.
|
|
98
106
|
|
|
107
|
+
## IM chat history
|
|
108
|
+
|
|
109
|
+
`ReadMessageHistory` reads received group messages through an enabled inbound IM binding of the current conversation. It is available to the main agent and follows the normal tool policy and approval checks; it does not borrow unbound channels. If more than one inbound channel is bound, specify `channel: "im:<binding-id>"`. Sender-only bindings keep reads isolated to that exact sender ID, even when members have the same display name. Topic reads stay within the bound topic unless the binding explicitly covers the whole chat.
|
|
110
|
+
|
|
111
|
+
The default `source: "local"` searches the retained received timeline, including quiet messages that did not wake the agent. Use `keyword` for case-insensitive matching against the full retained text, `sender_id` for an exact sender, `before` for an exclusive epoch-millisecond cutoff, and `limit` from 1 to 50. Results are newest first and contain bounded previews. Continue with the returned opaque `nextCursor` and the same filters; edits, retractions or expired retention can require a fresh read. `coverage: "received_only"` means only messages Kiki received, not a complete platform archive; `retention_limited` means older received entries were evicted. `end: "reached"` marks the end of that local retained view.
|
|
112
|
+
|
|
113
|
+
For a result with `original.message_id`, pass that ID as `message_id` to read its complete retained text in segments. `text_offset` counts UTF-16 units; `text_limit` defaults to 8,192 and accepts 1–16,384. Follow `text_range.next_offset` until absent. The result keeps media descriptors and the real sender; text segments do not fetch or execute media. An offset beyond the original length is rejected. Exact reads cannot combine `message_id` with `keyword`, `before` or `cursor`, and retain the same channel, topic and sender restrictions. Distinct received parts with the same real source ID form one original; repeated event IDs are deduplicated.
|
|
114
|
+
|
|
115
|
+
Explicit `source: "platform"` uses the adapter's optional history API and requires an explicit chat/topic binding. It does not support local keyword, sender or time filters, or exact `message_id` reads. Unsupported adapters return `status: "unsupported"`; successful pages report their own order, coverage and end. A short or empty page does not establish exhaustion: `coverage` and `end` can be `unknown`. Platform reads do not automatically synchronize the local timeline.
|
|
116
|
+
|
|
117
|
+
Quiet collection and automatic background follow the binding's [group policy](../server/rest-api.md#im-account-and-channel-bindings). Background consumption advances a separate watermark while retaining the received timeline. All results, sender names, mentions and quoted text remain untrusted external data, not instructions or permission grants.
|
|
118
|
+
|
|
119
|
+
## Message delivery
|
|
120
|
+
|
|
121
|
+
`SendMessage` delivers one complete user-visible message or an ordered `messages` batch to the thread's enabled bound outputs, a room, or another Bot. Use either the top-level `text` / `attachments` / `reply_to` fields or `messages`, never both; omit `channel` / `channels` for bound-output fan-out or name explicit output channel IDs. Attachments may be sent without text; set `kind` explicitly for image, audio, voice, or video delivery, and inspect channel receipts before deciding how to recover an uncertain send.
|
|
122
|
+
|
|
123
|
+
| Field | Type | Default | Description |
|
|
124
|
+
| --- | --- | --- | --- |
|
|
125
|
+
| Top-level `end_turn` | `boolean` | `false` | Set to `true` only for the final answer. Leave it unset for progress messages. The engine omits the tool continuation only when `end_turn: true`, every user-targeted delivery succeeds, and this step contains exactly one `SendMessage` tool call. Partial or failed delivery, an unapproved call, or any additional tool call keeps the continuation available. Existing `afterStep` handling for goals, queued input, steer input, and task notifications still applies. |
|
|
126
|
+
|
|
127
|
+
An ordinary final reply is delivered in full as a fallback; do not resend it. Do not split one message into sentences or repeat it as ordinary text. A progress message leaves `end_turn` unset so required tools and pending work can continue.
|
|
128
|
+
|
|
99
129
|
## Web Tools
|
|
100
130
|
|
|
101
131
|
Both web tools are backed by Kiki's built-in search and retrieval module, which ships with the product — there is nothing to install. General-web search and URL fetching work without configuration or an API key. See [`nb_search`](../configuration/config-files.md#nb-search) for configuration.
|
|
@@ -175,19 +205,21 @@ Both tools share the same execution model:
|
|
|
175
205
|
|
|
176
206
|
## Browser Tools
|
|
177
207
|
|
|
178
|
-
Browser tools appear only when the `native_browser` experimental flag is on
|
|
208
|
+
Browser tools appear only when the `native_browser` experimental flag is on. Saved connections choose the managed agent-browser backend, an extension bridge, or Ego Lite on the Kiki server. See [Browser control](../guides/settings.md#browser-control) for the settings page and what each connection style targets.
|
|
179
209
|
|
|
180
210
|
**`BrowserConnections`** works on the connection itself: `action: "list"` (the default) returns saved connections, the new-session default, and an installed unsaved Ego Lite candidate when one is available; `"select"` binds the connection this agent will use, `"status"` and `"check"` read runtime state, `"connect"` and `"disconnect"` start or attach and release it, and `"tools"` loads the backend's page operations on demand. Selecting the discovered Ego candidate is the explicit step that saves and connects it; a connection is then named by its saved id, including a custom id, and a display name is never resolved to an id. Omitting `browser` uses this agent's bound connection or the new-session default — never a guessed or merely ready browser.
|
|
181
211
|
|
|
182
212
|
`"tools"` registers only the groups or tool names you ask for. Each loaded operation becomes a tool named `browser__agent_browser_<name>`, keeps the backend's own schema, and additionally takes `browser` and `browserTab`. Element references from a snapshot are valid only in the browser, tab and frame that produced them, so read a new snapshot after the page changes. Browser installation, plugin, and cross-session administration operations are not offered as page tools.
|
|
183
213
|
|
|
184
|
-
**`BrowserTabs`** manages the target inside one connection: `list`, `open`, `window`, `select`, `close`, and `frame` (`main` returns to the top frame).
|
|
214
|
+
**`BrowserTabs`** manages the target inside one connection: `list`, `open`, `window`, `select`, `close`, and `frame` (`main` returns to the top frame). Use the exact target identity returned by that connection, not a tab position; these tools never follow the user's foreground tab. After changing tab or frame, or reconnecting, element references need a fresh snapshot.
|
|
215
|
+
|
|
216
|
+
**WebBridge command connections** use `wb:<decimal id>` targets. Each agent has its own command session and can operate, select or close only the tab its last navigate opened. Open a tab through `BrowserTabs` before running snapshot, click, fill, evaluate, screenshot, network, upload, PDF or extension CDP actions. The extension CDP action is a command, not a DevTools endpoint attachment. Selecting another tab by URL, windows and frames are unavailable. Disconnect leaves tabs open; use `agent_browser_end_session` only when the user wants that agent's command-session tabs closed. A lost response or cancellation after send leaves the outcome `unconfirmed`, without retry: check the connection, reconnect after it returns `idle`, and open and observe a tab before the next page action.
|
|
185
217
|
|
|
186
218
|
**Ego Lite** is a separate connection. Install Ego Lite yourself, finish its own setup window, check it in browser settings, and select that connection. Kiki does not install it and does not import Chrome data. After an agent selects an Ego connection, later calls that omit `browser` keep using that selection; pass the saved id explicitly when choosing among multiple Ego connections. `browser__ego_run` takes an optional `browser` id and a required `script`, and runs that script in the connection. The script receives `shotDir`, an absolute directory for this call. Pass an absolute file, for example `page.screenshot({ path: shotDir + '/shot.png' })`. A png or jpeg written there is attached when it is 20 MiB or smaller. Omitting `path` leaves the file in the system temp directory, and that file is not attached. On an Ego Lite connection, `BrowserTabs` lists, opens, selects, and closes pages; a tab id is the page label, such as `p1`, and close applies only to a tab the agent opened. Window and frame are not available there. Denying browser tools also denies the Ego script. A subagent needs the script tool named.
|
|
187
219
|
|
|
188
220
|
Results carry the resolved connection, runtime session, tab and frame. An artifact Kiki named for the call — a screenshot, HAR, trace, profiler output or recording — is attached to the timeline up to 20 MiB; a larger file stays on the execution host and has to be retrieved over the existing file channel. A timeout does not confirm the action: observe the same target again before repeating it.
|
|
189
221
|
|
|
190
|
-
Cancelling a tool call stops the browser work when the cancellation lands before the action is sent — while the call is still queued, and again after the target is found but before the action goes out. A cancelled call that was never sent does not disturb the connection, and it does not close a browser that other work is using. Once an action has been sent, cancellation does not take it back
|
|
222
|
+
Cancelling a tool call stops the browser work when the cancellation lands before the action is sent — while the call is still queued, and again after the target is found but before the action goes out. A cancelled call that was never sent does not disturb the connection, and it does not close a browser that other work is using. Once an action has been sent, cancellation does not take it back. Managed agent-browser calls keep running to completion and their results still apply; WebBridge command calls can instead become `unconfirmed` when the response is lost. Neither path replays or retries the action for you. Read the outcome instead of assuming the cancel reversed it.
|
|
191
223
|
|
|
192
224
|
## Plan Mode
|
|
193
225
|
|
|
@@ -260,7 +292,7 @@ Failures come back as structured errors with a `code`, a message and recovery gu
|
|
|
260
292
|
|
|
261
293
|
### Searching and reading
|
|
262
294
|
|
|
263
|
-
`MemorySearch` takes `mode: "search"` (the default, requires `query`) or `mode: "list"` (no query, browses the inventory). `page_size` is 1–20 and defaults to 8 for search and 20 for list; continue with `cursor` alone, and changing any filter invalidates it. Each item carries the full title, type, status, revision, owning scope, a `target` whose fields can be copied straight into `MemoryWrite`, `basis_kind` and an `applicability` of `expired`, `recheck` or `unrecorded`. The response's `coverage` states which scopes and statuses were inspected and whether anything was skipped. Continue empty preparation pages while `exhausted` is false; scan budgets do not cut off the remaining source.
|
|
295
|
+
`MemorySearch` takes `mode: "search"` (the default, requires `query`) or `mode: "list"` (no query, browses the inventory). `page_size` is 1–20 and defaults to 8 for search and 20 for list; continue with `cursor` alone, and changing any filter invalidates it. Each item carries the full title, type, status, revision, owning scope, a `target` whose fields can be copied straight into `MemoryWrite`, `basis_kind` and an `applicability` of `expired`, `recheck` or `unrecorded`. The response's `coverage` states which scopes and statuses were inspected and whether anything was skipped. Continue empty preparation pages while `exhausted` is false; scan budgets do not cut off the remaining source. The file backend ranks each bounded source chunk. Search adds the full body, source, basis and validity with `complete: true` when the whole entry fits a serialized response budget of 24,000 UTF-16 units and 6,000 estimated tokens. Reuse that complete revision without another read. Otherwise the item has `complete: false` and an exact `read` target; expand it before relying on or changing the content. Complete search items carry `score`, with `score_details` when the backend provides them. If reference metadata alone exceeds the budget, restart with a smaller `page_size`. List returns references.
|
|
264
296
|
|
|
265
297
|
`MemoryRead` takes exactly one of `id` or `ids` (up to 10), reads active, archived and replaced entries by default, and includes pending proposals only with `include_pending: true`. The result is the complete entry — not a summary — with its owning scope, target fields and applicability, so a read can be the source for an `update`.
|
|
266
298
|
|
|
@@ -268,16 +300,20 @@ For the three-scope model, the review inbox, the undoable change history, and th
|
|
|
268
300
|
|
|
269
301
|
## Collaboration Tools
|
|
270
302
|
|
|
271
|
-
|
|
303
|
+
The default main-agent profile includes five thread tools (`ThreadCreate`, `ThreadList`, `ThreadRead`, `ThreadSend`, and `ThreadWait`) and two room tools (`RoomRead` and `RoomAdd`). `ThreadCreate` opens an independent top-level session; the other four thread tools address existing sessions through `host_id`, `workspace_id`, and `session_id`. `ThreadSend`, `RoomRead`, and `RoomAdd` stay main-only. A subagent profile can opt in to `ThreadCreate`, `ThreadList`, `ThreadRead`, and `ThreadWait` (see [`subagent`](../configuration/config-files.md#subagent)), but cannot gain room access.
|
|
272
304
|
|
|
273
305
|
Omitting `host_id`, leaving it empty, or using `"local"` addresses the executing agent's home, not the space currently open in the GUI. Same-home communication can cross workspaces. Another local or remote space requires an owner-approved one-way [thread bridge](./command.md#kiki-bridges); use its returned host-qualified reference and `bridge_id` or `connection_id`. Identical session IDs in different homes remain different threads. GUI browsing permission does not grant bridge permission.
|
|
274
306
|
|
|
275
307
|
- `ThreadCreate` is for an explicit user request to create a new thread or session, not for routine delegation. Optional `cwd` must be an absolute path to an existing directory, including one outside the current workspace; omitted `cwd` uses the current session's workspace root. Optional `profile` must name an enabled main-agent profile; omitted `profile` uses the default. Optional `prompt` (at most 100,000 characters) becomes the new thread's first user message and starts its turn immediately; without it, the thread stays empty until the user sends a message. Optional `title` overrides the default: with a prompt and no title, the first line (up to 80 characters) becomes the title. The result returns `id`, `title`, `cwd`, `profile`, and `prompt_started`; the thread then appears in the left session list within a few seconds, and `ThreadSend` and `ThreadWait` continue the conversation.
|
|
276
308
|
- `ThreadList` lists enabled, unarchived sessions, optionally filtered by `workspace_id`. With no bridge selector it lists the executing home; with a selector it lists only the approved target scope and requires `read`. Local results are newest first. `limit` defaults to 50 and accepts 1–100; use the returned opaque cursor for another page.
|
|
277
|
-
- `ThreadRead` reads completed main-agent turns locally without resuming a cold session. Across a bridge it requires `read` and returns a bounded `view.transcript` page with coverage and cursors; omitted text or frames carry `contentRefs`.
|
|
309
|
+
- `ThreadRead` reads completed main-agent turns locally without resuming a cold session. Small local turns keep complete input and output. For an oversized local input or output, the turn keeps a preview and returns a stable `contentRefs` reference; pass it as `content_ref` with the same thread to receive bounded `view.segment` chunks of up to 16,384 UTF-16 units and follow `next` until it is absent. While the local history projection is preparing, it can return `turns: []`, `incomplete: "history_preparing"`, and an opaque `nextCursor`; this means the history is not ready, not that the thread has no conversation. Preparation cursors bind the projection generation and a fixed source watermark while retaining the original older-turn boundary. Continue with that cursor and the same thread and bridge scope until preparation completes. Across a bridge it requires `read` and returns a bounded `view.transcript` page with coverage and cursors; omitted text or frames carry `contentRefs`. `limit` defaults to 20 and accepts 1–100, and the normal chronological order is unchanged. Existing read cursors remain accepted; a rewrite or generation change invalidates its cursor, so restart from the first page when the server rejects it.
|
|
278
310
|
- `ThreadSend` durably saves an explicit message and records the executing main-agent session as its verified source. Supply the target, non-empty `content` of at most 100,000 characters, and `idempotency_key` of at most 256 characters. There is no source parameter; reuse a key only for the same message. A bridge needs `send`, plus `wake` to deliver into a model prompt or resume a cold thread; without wake it stays pending. `delivered` confirms prompt delivery, not a reply. After durable acceptance, slow delivery returns `pending` instead of holding the sender indefinitely; delivery continues in the background. Cancelling that wait does not recall the accepted message. Bridge pending records retry with the original key for up to 15 minutes; use bridge receipts to inspect rejection reasons. Ordinary assistant text is never forwarded automatically.
|
|
279
311
|
- `ThreadSend({ room, content, mentions? })` posts to a room the current thread belongs to. Room content is limited to 20,000 characters; mentions use thread session IDs or persona IDs, and the retry key defaults to the tool call ID. ThreadSend is how this thread speaks in the room; text in the thread stays in the thread. A user message with no mention goes to the room host. A message from a member wakes only the members it mentions. Room `delivered` means the room log has the message, not that every member has answered; thread members queue while busy by default.
|
|
280
312
|
- `ThreadWait` waits for terminal, attention, lifecycle, or undeliverable-message activity on 1–8 distinct local or approved bridge threads. Bridge waits require `wait`; they do not wake the target. `timeout_ms` defaults to 30,000 and accepts 0–60,000; `0` checks once. Carry each returned cursor into the next call, and cancel the tool call to stop waiting.
|
|
313
|
+
- `RoomRead({ room: "room-id", limit: 50 })` returns a room's host, member roster, pause/archive state, and saved log. `limit` accepts 1–100 and defaults to 50; pass the returned `nextCursor` as `after_id` for the next page. Roster `id` values are the exact thread or persona IDs accepted by room mentions. Reading does not wake members, mark notifications read, or change membership; empty `entries` mean no new saved messages, not that members have exited.
|
|
314
|
+
- `RoomAdd({ room: "room-id", session_id: "thread-id" })` adds an existing unarchived top-level thread only when the user asks. Find its `session_id` with `ThreadList`. The room keeps its host, existing member settings, six-member limit, and each thread's permissions. An already joined thread is returned unchanged with `added: false`. This tool does not create a room, persona, or session, or join the calling thread to a room.
|
|
315
|
+
|
|
316
|
+
Both room tools require enabled thread communication and a main agent whose current thread already belongs to that room. They accept room IDs in the executing home, not bridge selectors. Create a room or join the current thread through the user interface before asking the agent to read it or add another existing thread.
|
|
281
317
|
|
|
282
318
|
`ThreadCreate` stays available by default and has its own switch under Settings → Permissions → Tools, so it can be turned off without turning off the other thread tools. Peer communication is allowed and off by default. A user `[thread_communication] enabled = false` turns it off completely; `enabled = true` keeps the older default-on behavior until [`optional_capabilities.defaults.thread`](../configuration/config-files.md#optional-capabilities) is written. Turning the current session off keeps peer tools closed for that session even when its profile names them. Only a child run that names those tools opens that child. A persisted workspace mailbox override still applies. Bridge receiving stays off until the target owner approves it; disabling target communication or inbound access stops bridge delivery without deleting sessions.
|
|
283
319
|
|
|
@@ -305,9 +341,12 @@ Collaboration tools handle inter-Agent coordination, user interaction, and Skill
|
|
|
305
341
|
| `background` | Omitted: background for a main-agent call, foreground for a subagent call. An explicit `false` waits synchronously |
|
|
306
342
|
| `name` | A session-unique handle of lowercase letters, digits, and underscores; `root` is reserved |
|
|
307
343
|
| `route` | A profile route to run instead of a named profile |
|
|
308
|
-
| `model_alias` | The model the child uses. See [model selection](./model-vocabulary.md#binding-rules) for the full resolution order |
|
|
344
|
+
| `model_alias` | The model the child uses. See [model selection](./model-vocabulary.md#binding-rules) for the full resolution order. The receipt's `actual_model` line reports the model actually bound |
|
|
309
345
|
| `effort` | Thinking effort for this child |
|
|
310
|
-
| `
|
|
346
|
+
| `resume` | Name or ID of an existing idle direct child; rejects new-agent target and workspace fields |
|
|
347
|
+
| `context_mode` | Resume-only: `direct` keeps context, `compact` summarizes with the current model first, `fresh` rebuilds from saved task state without calling the old model; also confirms an explicit model change |
|
|
348
|
+
| `allow_model_change` | Legacy model-change confirmation requiring `resume` and `model_alias`; mutually exclusive with `context_mode` |
|
|
349
|
+
| `new_window` | Legacy fresh-context continuation requiring `resume`; mutually exclusive with `context_mode` |
|
|
311
350
|
| `tools` | Replaces the resolved tool selection for this binding only. A lone `*`, or `["*", ThreadRead]`, keeps the ordinary tools and adds that opt-in; a finite list stays finite |
|
|
312
351
|
| `disallowed_tools` | Adds a call-level deny. `[]` clears only that layer, never a profile, ancestor, or route deny |
|
|
313
352
|
|
|
@@ -317,7 +356,9 @@ Omit both `tools` and `disallowed_tools` and a new child uses the configured def
|
|
|
317
356
|
|
|
318
357
|
`preferred_models`, `discouraged_models`, and `preferred_efforts` are recommendations, so a model outside them still runs. `allowed_models`, `deny_models`, and `allowed_efforts` are hard: binding, manual changes, and resume all reject a violation, as do machine-level deny rules and unavailable capabilities.
|
|
319
358
|
|
|
320
|
-
**Resume.** `resume` continues an
|
|
359
|
+
**Resume.** `resume` continues an idle direct child by name or agent id, and rejects `name`, `profile`, `profile_file`, `route`, `workDir` and `additionalDirs`. Omit `model_alias` and `effort` to keep the saved binding, or pass `effort` for the next idle run. An explicit `context_mode` chooses `direct`, `compact` or `fresh` and confirms a different canonical model when `model_alias` is also supplied. Without a context choice, ordinary resume remains direct. The same child ID, task notes, Todo, history and workspace remain available. `compact` and `fresh` require native Kiki execution; an external executor returns an error without recreating its thread.
|
|
360
|
+
|
|
361
|
+
Do not combine `context_mode` with either legacy parameter, even when false. Without `context_mode`, legacy `new_window: true` selects fresh context and takes precedence over `allow_model_change`; otherwise `allow_model_change: true` confirms a direct model change. `new_window: false` does not veto that confirmation. `model_alias: "inherit"` remains invalid. See [resume choices and recovery](../customization/agents-and-subagents.md#named-child-agents) for an example and commit-failure behavior.
|
|
321
362
|
|
|
322
363
|
**Timeouts and modes.** Agent tasks time out after 2 hours by default; set the global limit with `[subagent] timeout_ms` or `KIKI_SUBAGENT_TIMEOUT_MS` (`0` disables it), and print mode defaults to no timeout. There is no per-call timeout. In foreground mode the parent waits; in background mode a task ID returns immediately and the result arrives later as a synthetic User message. The TUI groups several foreground calls from one step and shows their status and elapsed time. See [Agents and Sub-Agents](../customization/agents-and-subagents.md) for the complete profile and lifecycle contract.
|
|
323
364
|
|
|
@@ -325,13 +366,17 @@ The `AgentRun` default follows the caller's runtime identity, not the target pro
|
|
|
325
366
|
|
|
326
367
|
A large foreground result comes back as a tail preview rather than in full. The receipt adds `output_size_bytes`, `preview_bytes`, `truncated`, `full_output_available`, and — when one exists — `output_path`. When `output_path` is present, read the complete result with `Read` on that file, or page through it with `TaskOutput` using `offset` and `max_bytes`. When no complete output file exists, `full_output_available` is `false` and only the preview can be read: run the work in smaller pieces, or re-run it with narrower instructions so the result fits. A small result keeps the plain summary text and needs none of this.
|
|
327
368
|
|
|
328
|
-
A completion still reaches you automatically while a [goal](../guides/goals.md) is blocked: the main agent wakes to process that
|
|
369
|
+
A completion still reaches you automatically while a [goal](../guides/goals.md) is blocked or paused: the main agent wakes to process that result without resuming the goal. A cancelled launching turn or an exhausted current goal budget holds the result until the next authorized turn. Restored `lost` receipts join an available turn or explicit resume without starting a competing turn; they do not confirm the external execution outcome.
|
|
329
370
|
|
|
330
|
-
**`AgentList`** lists direct children of the current agent. Optional `include_finished` defaults to false. A live child that is starting, running, or cancelling stays visible as `running`, even after its previous background task has completed or timed out. A
|
|
371
|
+
**`AgentList`** lists direct children of the current agent. Optional `include_finished` defaults to false. A live child that is starting, running, or cancelling stays visible as `running`, even after its previous background task has completed or timed out. A child whose execution ended but whose final save failed stays visible as `persistence_failed`; its `persistence_failure` includes the turn id, execution outcome, and storage error. When no execution is active, a saved completion, failure, or cancellation supplies the status if its tracking task is no longer retained or the same task still has a stale running record. An outcome from an older task never overrides a newer task. Otherwise status follows the latest background task or the executor's broken or closed state; an idle child with no saved outcome or task is `untracked`. Pass `true` to also include finished or errored children. At most 50 entries are returned, running first; `omitted` is the count that did not fit. Each entry includes `agent_id`, optional `name` and `profile`, and `status`. A `running` child does not necessarily have a tracked background task or a pending completion notification; use `TaskList` to inspect tracked work.
|
|
372
|
+
|
|
373
|
+
When a native agent's final save fails, the GUI shows a failed status and the save error while recovery remains pending. Restore writable storage rather than repeating its prompt or tool calls. After its initial backoff, the agent keeps retrying disk-full and temporary storage failures every five minutes, so recovery does not require another message or history read. A successful journal write can bring that retry forward; journal corruption stops low-frequency recovery and requires inspection. Recovery completes the original task and its notification without rerunning its work. Explicit resume or message delivery also tries the pending save first; a persistent failure returns the storage error instead of `already running` or waiting indefinitely. Stopping the task still takes effect, and recovery does not restart a stopped task.
|
|
331
374
|
|
|
332
375
|
**`AgentSend`** sends a non-empty `message` to a direct child identified by `target` (a `name` from `AgentRun`, or an agent id). A child that is running natively receives the message at the next step boundary, steered into its active turn. Codex and a steer-capable ACP child can receive it during the run. A child that has stopped, including one whose run ends before the message is in its context, continues with the same model, profile, tools, and context. Saved messages for an external child enter that same binding in arrival order, one run after another, without a separate resume. When dispatch capacity is full, that continuation waits until a running child finishes and does not open a run past the limit. If no run will free the capacity, or an external resume cannot open the existing session, the saved message remains under its `message_id`. The sender then receives the reason, the error code, the target, and that id. Resume that same child with AgentRun: set `resume` to the target agent id, set `prompt` to an empty string, and set `description` to a short label. Do not call AgentSend again, do not repeat the saved message in `prompt`, and do not set `new_window`. That failure does not open a new remote session. That continuation is an ordinary child task, and its completion notifies the parent. If more than one direct child matches, or none do, the call fails — use `AgentList` and retry with an unambiguous value. A full mailbox means the child has too many unread queued messages; wait until it consumes some, then retry.
|
|
333
376
|
|
|
334
|
-
The result includes a `message_id` and a `queued` or `delivered` status. `queued` means the mailbox accepted the message. It does not mean a run is in progress. Delivery can complete concurrently, so it does not say the message is definitely still unread. `delivered`
|
|
377
|
+
The result includes a `message_id` and a `queued` or `delivered` status. `queued` means the mailbox accepted the message. It does not mean a run is in progress. Delivery can complete concurrently, so it does not say the message is definitely still unread. `delivered` confirms that the message entered the recipient's persisted context or turn input; the child may still be working on it. `resumed: true` reports that a new run was actually observed starting; the field is omitted when no run start was observed, so its absence is not a negative answer. The sender's transcript records a delivery receipt and clears the GUI's pending-delivery label, even if the child's transcript is not open. This update runs independently of the recipient's next step. If the sender is unloaded, Kiki retains the receipt and records it when that sender is next loaded. The receipt survives reload and history replay without duplicating the message or starting another run.
|
|
378
|
+
|
|
379
|
+
After a restart, messages already received by a turn are acknowledged without appending their bodies again or starting another run. If disk-full, temporary storage errors, or mailbox transport failures prevent saving a receipt or acknowledgement, Kiki retries that save every 30 seconds while the agent remains loaded. Restore writable storage or allow the runtime to recover; the original message stays saved. Temporary mailbox transport failures receive up to eight bounded, cancellable recovery attempts at the same safe execution boundary, with increasing delays totaling about two minutes in addition to call time. Recovery preserves the request identity and delivery receipt rather than replaying external actions. If recovery still fails, the diagnostic identifies the retained messages and how to resume the same agent; permanent errors and cancellation are not retried.
|
|
335
380
|
|
|
336
381
|
**`AskUserQuestion`** asks the user a structured multiple-choice question — useful for disambiguation or option selection. The `questions` parameter accepts 1–4 questions; each question requires `question` (ending with `?`), `options` (2–4 choices, each with a `label` and `description`), and optional `header` (max 12 characters) and `multi_select` (defaults to false). An "Other" option is appended automatically. Setting `background` to true starts a background question task and returns a task ID immediately. When the host does not support interactive questioning, a failure message is returned and the Agent should ask the user directly in a text reply instead.
|
|
337
382
|
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
kiki acp
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
-
Once started, the command prints no banner and immediately waits for the ACP client to send an `initialize` request on stdin. Logs are written to stderr (as well as the diagnostic log under `~/.kiki/logs/`), so the ACP channel itself stays clean.
|
|
9
|
+
Once started, the command prints no banner and immediately waits for the ACP client to send an `initialize` request on stdin. Logs are written to stderr (as well as the diagnostic log under `<home>/logs/`; default `~/.kiki/logs/`), so the ACP channel itself stays clean.
|
|
10
10
|
|
|
11
11
|
::: tip Who calls this?
|
|
12
12
|
You typically do not need to run `kiki acp` manually — this command is the subprocess entry point for IDEs. For IDE-side configuration, see [Using in IDEs](./ide.md).
|
|
@@ -79,11 +79,17 @@ To use an IDE that sends stdio MCP servers, explicitly start Kiki with `kiki acp
|
|
|
79
79
|
|
|
80
80
|
### Kiki tools in an external harness
|
|
81
81
|
|
|
82
|
-
The forwarding above is inbound: an IDE supplies MCP servers to `kiki acp`. When Kiki runs an external harness, it can supply a session-local bridge bound to the exact Kiki session and agent. The adapter must accept stdio MCP;
|
|
82
|
+
The forwarding above is inbound: an IDE supplies MCP servers to `kiki acp`. When Kiki runs an external harness, it can supply a session-local bridge bound to the exact Kiki session and agent. The adapter must accept stdio MCP; OpenClaw and Pi cannot receive this bridge. Model settings, vendor login and permissions remain the harness's own. You do not copy the managed bridge's temporary credentials into vendor configuration.
|
|
83
|
+
|
|
84
|
+
The session's capability list shows authentication observations reported by its running adapter. ACP's explicit authentication-required error appears as **Authentication required** for that session. Codex's account updates appear as the engine-reported account status; unrecognized modes stay **Sign-in unknown**. The tooltip identifies the protocol source, working directory and observation time. These saved observations remain readable after the session closes and are cleared when its execution binding changes; they do not replace the connection check in Settings.
|
|
85
|
+
|
|
86
|
+
Native engine children keep the saved engine-session contract when Kiki resumes them. If an adapter cannot resume or verify that session, Kiki reports the engine error instead of silently opening a new one. Resume, load and control support remains engine-specific.
|
|
87
|
+
|
|
88
|
+
If a Codex prompt was submitted but its start could not be confirmed, Kiki reports `executor.session_failed` with `details.deliveryOutcome: "unknown"`. While the Kiki session remains loaded, retrying that same resume operation returns the original failure without resending the prompt. Inspect the external session before starting a new operation or reloading the Kiki session. A failure before submission can be retried with the same operation.
|
|
83
89
|
|
|
84
90
|
Set `inject_kiki_mcp` under `[agent_executor_overrides.<executor-id>.defaults]` to choose the engine default. A Profile's `inject_kiki_mcp` overrides it, and `execution.overrides.inject_kiki_mcp` overrides the Profile for a session. Set the session value to `null` to inherit again. These choices take effect on the next binding, including named external child profiles; cold restore keeps the saved choice. Once an agent binds `false`, existing bridge credentials can no longer list or call its tools.
|
|
85
91
|
|
|
86
|
-
When injection is omitted at every layer, existing behavior remains
|
|
92
|
+
When injection is omitted at every layer, existing behavior remains for ordinary compatible role-profile children: they receive only their allowed native tools, while a bare main agent gets a bridge only when context or delegation is requested. A child launched with `profile: engine:<executor-id>` is bare instead: Kiki sends no role, system prompt or profile body by default, and being a child does not create a Kiki bridge by itself. Explicit per-engine defaults still apply, and an explicit `inject_kiki_mcp = false` closes the bridge. Turning injection on does not open extra tool groups. Explicit `kiki_context: []` and `allow_kiki_subagents: false` keep those groups closed.
|
|
87
93
|
|
|
88
94
|
Opening the bridge does not grant a tool the binding already denies. When an external tool is checked under both its vendor name and the mapped native name, each allow list must include at least one of those names, and a deny of either name blocks the call.
|
|
89
95
|
|