kiki-agent 0.5.0 → 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 +92 -30
- package/dist/docs/en/configuration/data-locations.md +14 -9
- package/dist/docs/en/configuration/env-vars.md +32 -2
- package/dist/docs/en/configuration/overrides.md +1 -1
- package/dist/docs/en/configuration/providers.md +44 -10
- package/dist/docs/en/customization/agent-profiles.md +1 -1
- package/dist/docs/en/customization/agents-and-subagents.md +49 -10
- package/dist/docs/en/customization/hooks.md +3 -3
- package/dist/docs/en/customization/personas.md +1 -1
- package/dist/docs/en/customization/plugins.md +16 -3
- package/dist/docs/en/customization/prompt-fields.md +62 -6
- 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/browser-and-computer.md +5 -5
- package/dist/docs/en/features/daily.md +3 -3
- package/dist/docs/en/features/ecosystem.md +1 -1
- package/dist/docs/en/features/extend.md +2 -2
- package/dist/docs/en/features/freedom.md +1 -1
- package/dist/docs/en/features/index.md +15 -1
- package/dist/docs/en/features/long-work.md +9 -5
- package/dist/docs/en/features/look.md +1 -1
- package/dist/docs/en/features/phone.md +11 -3
- package/dist/docs/en/features/spaces.md +5 -5
- 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 +18 -8
- package/dist/docs/en/guides/memory.md +64 -10
- package/dist/docs/en/guides/sessions.md +15 -7
- package/dist/docs/en/guides/settings.md +49 -38
- package/dist/docs/en/index.md +3 -1
- package/dist/docs/en/reference/command.md +35 -33
- 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 +40 -15
- package/dist/docs/en/server/acp.md +6 -2
- package/dist/docs/en/server/local-server.md +19 -27
- package/dist/docs/en/server/mcp.md +4 -4
- package/dist/docs/en/server/rest-api.md +240 -23
- package/dist/docs/en/server/script-tools.md +268 -0
- package/dist/docs/zh/configuration/config-files.md +92 -30
- package/dist/docs/zh/configuration/data-locations.md +14 -9
- package/dist/docs/zh/configuration/env-vars.md +32 -2
- package/dist/docs/zh/configuration/overrides.md +1 -1
- package/dist/docs/zh/configuration/providers.md +44 -10
- package/dist/docs/zh/customization/agent-profiles.md +1 -1
- package/dist/docs/zh/customization/agents-and-subagents.md +49 -10
- package/dist/docs/zh/customization/hooks.md +3 -3
- package/dist/docs/zh/customization/personas.md +1 -1
- package/dist/docs/zh/customization/plugins.md +16 -3
- package/dist/docs/zh/customization/prompt-fields.md +62 -6
- 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/browser-and-computer.md +5 -5
- package/dist/docs/zh/features/daily.md +3 -3
- package/dist/docs/zh/features/ecosystem.md +1 -1
- package/dist/docs/zh/features/extend.md +2 -2
- package/dist/docs/zh/features/freedom.md +1 -1
- package/dist/docs/zh/features/index.md +16 -2
- package/dist/docs/zh/features/long-work.md +9 -5
- package/dist/docs/zh/features/look.md +1 -1
- package/dist/docs/zh/features/phone.md +11 -3
- package/dist/docs/zh/features/spaces.md +5 -5
- 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 +18 -8
- package/dist/docs/zh/guides/memory.md +64 -10
- package/dist/docs/zh/guides/sessions.md +15 -7
- package/dist/docs/zh/guides/settings.md +49 -38
- package/dist/docs/zh/index.md +4 -2
- package/dist/docs/zh/reference/command.md +35 -33
- 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 +40 -15
- package/dist/docs/zh/server/acp.md +6 -2
- package/dist/docs/zh/server/local-server.md +19 -27
- package/dist/docs/zh/server/mcp.md +4 -4
- package/dist/docs/zh/server/rest-api.md +229 -23
- 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 +24 -6
- package/dist/mailbox-worker.mjs +111 -5
- 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 +52 -11
- package/dist/sqlite-indexer.mjs +32 -2
- package/dist/sqlite-query-worker.mjs +35 -0
- package/dist/usage-parser-worker.mjs +3953 -4
- package/dist/usage-read-model-worker.mjs +761 -0
- package/dist/web/assets/{AppErrorBoundary-BN6IDdP1.js → AppErrorBoundary-B5Fc4f6-.js} +1 -1
- package/dist/web/assets/NavScopeBoundary-C7MnGQio.js +1 -0
- package/dist/web/assets/{arc-C7IAvCCJ.js → arc-DGB9OVgQ.js} +1 -1
- package/dist/web/assets/{architectureDiagram-3BPJPVTR-CbwFBxn7.js → architectureDiagram-3BPJPVTR-glnQCMub.js} +1 -1
- package/dist/web/assets/{blockDiagram-GPEHLZMM-B20N4t8r.js → blockDiagram-GPEHLZMM-bM0tnGby.js} +1 -1
- package/dist/web/assets/{c4Diagram-AAUBKEIU-3BYtlcP-.js → c4Diagram-AAUBKEIU-DMf_rTtt.js} +1 -1
- package/dist/web/assets/channel-Cj8SKJ38.js +1 -0
- package/dist/web/assets/{chunk-2J33WTMH-CpjgczxM.js → chunk-2J33WTMH-mTccJ3tW.js} +1 -1
- package/dist/web/assets/{chunk-4BX2VUAB-BScxUF5G.js → chunk-4BX2VUAB-DhqPYMjY.js} +1 -1
- package/dist/web/assets/{chunk-55IACEB6-CrcLYJXd.js → chunk-55IACEB6-BujrYRoO.js} +1 -1
- package/dist/web/assets/{chunk-727SXJPM-BwlyIOjw.js → chunk-727SXJPM-ciMmSI4G.js} +1 -1
- package/dist/web/assets/{chunk-AQP2D5EJ-DKKIRkRv.js → chunk-AQP2D5EJ-CZW9pKTc.js} +1 -1
- package/dist/web/assets/{chunk-FMBD7UC4-CVDMj2kX.js → chunk-FMBD7UC4-hdALNnnU.js} +1 -1
- package/dist/web/assets/{chunk-ND2GUHAM-CL-PM6r8.js → chunk-ND2GUHAM-CgKyqUdb.js} +1 -1
- package/dist/web/assets/{chunk-QZHKN3VN-DPV2KbKZ.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-D1CEiQM6.js → cose-bilkent-S5V4N54A-UV3uPjkK.js} +1 -1
- package/dist/web/assets/{dagre-BM42HDAG-BlFV941E.js → dagre-BM42HDAG-Zjy-gQ6C.js} +1 -1
- package/dist/web/assets/{diagram-2AECGRRQ-BC0ldkFY.js → diagram-2AECGRRQ-DL-kilIf.js} +1 -1
- package/dist/web/assets/{diagram-5GNKFQAL-B22Iej6G.js → diagram-5GNKFQAL-CjB_xR5B.js} +1 -1
- package/dist/web/assets/{diagram-KO2AKTUF-B75UNw6D.js → diagram-KO2AKTUF-CjN4i3b9.js} +1 -1
- package/dist/web/assets/{diagram-LMA3HP47-CypI7IJM.js → diagram-LMA3HP47-CPCAMndo.js} +1 -1
- package/dist/web/assets/{diagram-OG6HWLK6-OsXumvcD.js → diagram-OG6HWLK6-DVeBWBKd.js} +1 -1
- package/dist/web/assets/{erDiagram-TEJ5UH35-3756GOvS.js → erDiagram-TEJ5UH35-CHKzBHrr.js} +1 -1
- package/dist/web/assets/export-CXoWon32.js +2 -0
- package/dist/web/assets/{flowDiagram-I6XJVG4X-DB6Y_UDg.js → flowDiagram-I6XJVG4X-C5rQa2pq.js} +1 -1
- package/dist/web/assets/{ganttDiagram-6RSMTGT7-CHJeuoAY.js → ganttDiagram-6RSMTGT7-BrLjEsNJ.js} +1 -1
- package/dist/web/assets/{gitGraphDiagram-PVQCEYII-Dj85554Y.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-C6qeLCPw.js → index-BJxtlf4P.js} +4 -4
- package/dist/web/assets/{index-DxUmR9aV.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-DZMkZKhW.js → index-BvRBCpc6.js} +2 -2
- package/dist/web/assets/index-BxYCSNg_.js +3 -0
- package/dist/web/assets/{index-CJqIcuAl.js → index-C62wjCF_.js} +1 -1
- package/dist/web/assets/index-CBvwNH_H.js +1 -0
- package/dist/web/assets/{index-DRMjjql1.js → index-CG9e6lgq.js} +1 -1
- package/dist/web/assets/{index-C7mOS2T4.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-bYtKyBMB.js → index-CypTtrCB.js} +1 -1
- package/dist/web/assets/{index-DqK8MfQN.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-0tHq8zh2.js → index-DfUpwUTM.js} +2 -2
- package/dist/web/assets/{index-D--cw39y.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-DeDPIdEH.js → infoDiagram-5YYISTIA-CCwV4Z0v.js} +1 -1
- package/dist/web/assets/{ishikawaDiagram-YF4QCWOH-ButuBiBW.js → ishikawaDiagram-YF4QCWOH-BwwZcGyZ.js} +1 -1
- package/dist/web/assets/{journeyDiagram-JHISSGLW-Dlbmqm-j.js → journeyDiagram-JHISSGLW-Dc6WqniQ.js} +1 -1
- package/dist/web/assets/{kanban-definition-UN3LZRKU-tlQK1cOz.js → kanban-definition-UN3LZRKU-DVUqULOS.js} +1 -1
- package/dist/web/assets/{linear-iXuNfUWp.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-2qPv-mwT.js → mindmap-definition-RKZ34NQL-_JHAkhHL.js} +1 -1
- package/dist/web/assets/navViewState-DaCMIYWA.js +1 -0
- package/dist/web/assets/{pieDiagram-4H26LBE5-CrLe1C-O.js → pieDiagram-4H26LBE5-BlhlygGy.js} +1 -1
- package/dist/web/assets/{quadrantDiagram-W4KKPZXB-DfeIFxc0.js → quadrantDiagram-W4KKPZXB-jn6R_C0S.js} +1 -1
- package/dist/web/assets/{requirementDiagram-4Y6WPE33-BWtjdxie.js → requirementDiagram-4Y6WPE33-B9fXCHBr.js} +1 -1
- package/dist/web/assets/{sankeyDiagram-5OEKKPKP-B5TxJ6mb.js → sankeyDiagram-5OEKKPKP-fPJwIxkl.js} +1 -1
- package/dist/web/assets/{sequenceDiagram-3UESZ5HK-Cf92ZCl1.js → sequenceDiagram-3UESZ5HK-1v1DTNGt.js} +1 -1
- package/dist/web/assets/{spaces-DqMTtCXX.js → spaces-CvL2DRZM.js} +1 -1
- package/dist/web/assets/{stateDiagram-AJRCARHV-NR9I-Q4d.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-CBAOVMfm.js → timeline-definition-PNZ67QCA-CEjhuitj.js} +1 -1
- package/dist/web/assets/{vennDiagram-CIIHVFJN-C68x6TdS.js → vennDiagram-CIIHVFJN-CActt9h9.js} +1 -1
- package/dist/web/assets/{wardley-L42UT6IY-DuZZr5jm.js → wardley-L42UT6IY-Bp3q2izt.js} +1 -1
- package/dist/web/assets/{wardleyDiagram-YWT4CUSO-D6dVGtHd.js → wardleyDiagram-YWT4CUSO-C_zutiQ2.js} +1 -1
- package/dist/web/assets/{xychartDiagram-2RQKCTM6-DYLUhZX4.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 +22 -3
- package/dist/web/assets/LifeMark-UBMVaTWr.js +0 -1
- package/dist/web/assets/NavScopeBoundary-BCryw-UG.js +0 -1
- package/dist/web/assets/channel-BJs5vJuh.js +0 -1
- package/dist/web/assets/classDiagram-4FO5ZUOK-BookeACB.js +0 -1
- package/dist/web/assets/classDiagram-v2-Q7XG4LA2-BookeACB.js +0 -1
- package/dist/web/assets/client-CXcrCawx.js +0 -3
- package/dist/web/assets/connection-C8nwzwXB.js +0 -1
- package/dist/web/assets/export-Bn8PqPg4.js +0 -2
- package/dist/web/assets/highlighted-body-OFNGDK62-DMgPHetp.js +0 -1
- package/dist/web/assets/index-7ySDqvaN.css +0 -1
- package/dist/web/assets/index-B0KPRi1U.js +0 -166
- package/dist/web/assets/index-B599VnpP.js +0 -1
- package/dist/web/assets/index-BFK-GypQ.js +0 -1
- package/dist/web/assets/index-BPX8gmpB.js +0 -1
- package/dist/web/assets/index-BSGYc1tb.js +0 -1
- package/dist/web/assets/index-BTt9Q5iv.js +0 -1
- package/dist/web/assets/index-BWzUsoY_.js +0 -1
- package/dist/web/assets/index-BYlSV3FO.js +0 -3
- package/dist/web/assets/index-BpXQ1q-u.js +0 -1
- package/dist/web/assets/index-BqPxpGUh.js +0 -1
- package/dist/web/assets/index-C8OFfbEs.js +0 -1
- package/dist/web/assets/index-CI7yuMGZ.js +0 -1
- package/dist/web/assets/index-CTRJmDep.js +0 -1
- package/dist/web/assets/index-CXGCKoId.js +0 -1
- package/dist/web/assets/index-CsY571EL.js +0 -13
- package/dist/web/assets/index-CwQG_9rB.js +0 -1
- package/dist/web/assets/index-D260jsUJ.js +0 -1
- package/dist/web/assets/index-DJjmEXx4.js +0 -1
- package/dist/web/assets/index-DUxOVxHS.js +0 -1
- package/dist/web/assets/index-GK8aa9pT.js +0 -7
- package/dist/web/assets/index-wxHFHTgD.js +0 -1
- package/dist/web/assets/mermaid-GHXKKRXX-sDJax95P.js +0 -624
- package/dist/web/assets/stateDiagram-v2-BHNVJYJU-BiegFWxE.js +0 -1
- package/dist/web/assets/theme-6OL1RXgY.js +0 -1
|
@@ -23,6 +23,12 @@ The main agent dispatches sub-agents on its own as the work calls for it, and yo
|
|
|
23
23
|
|
|
24
24
|
Each dispatch appears as an approval request unless it matches an allow rule or YOLO mode is active, so you can read the task description before it runs. A sub-agent can run in the background and returns its result to the main agent on completion; you can also resume an existing sub-agent to continue the same task.
|
|
25
25
|
|
|
26
|
+
Results also return when a child starts another turn on its own, such as after its background `Bash` finishes or a scheduled prompt fires. A completed turn with a final written result gets a new parent-owned task receipt, including an `output.log` pointer. If the previous task failed, the new `completed` receipt names that task and its status; the earlier `failed` record stays unchanged. If the parent is no longer live or the session is archived, the receipt is retained in the parent's task history for later inspection rather than waking it.
|
|
27
|
+
|
|
28
|
+
A live background-task completion wakes an idle main agent, including while its goal is paused or after the goal completes, is removed, or is replaced. Receiving a result does not resume a paused goal or start its automatic follow-up turns; use `/goal resume` for that. A completion queued just as a successful turn ends is delivered in a new turn without another user message.
|
|
29
|
+
|
|
30
|
+
Cancelling the turn that launched a task or exhausting the current goal's budget prevents its result from waking the idle main agent. Held results are delivered when it next runs, such as when you send another message. Tasks launched after a cancellation can still wake it. A restored `lost` receipt also waits for an available turn and joins an explicit resume instead of starting a competing turn; the external execution outcome remains unconfirmed.
|
|
31
|
+
|
|
26
32
|
## Named child agents
|
|
27
33
|
|
|
28
34
|
The main `agent` profile gets three child-agent tools with no experiment flag: `AgentRun`, `AgentList` and `AgentSend`. Built-in subagent profiles do not. Each caller sees only the children it created itself — a grandchild or another caller's child is not a valid target.
|
|
@@ -35,14 +41,35 @@ The main `agent` profile gets three child-agent tools with no experiment flag: `
|
|
|
35
41
|
| `profile_file` | A subagent role Markdown file, absolute or workspace-relative. It is a role definition rather than a shared prompt template, and cannot be combined with `profile`, `route` or `resume`. |
|
|
36
42
|
| `route` | A named route of the base profile. |
|
|
37
43
|
| `name` | A handle for addressing this child again: `^[a-z0-9_]+$`, not `root`, unique within the session. |
|
|
44
|
+
| `source_ref` | A server-generated agent-reference ID from a visible user message. Links the run to that message when its profile and engine match; it does not select a target or change permissions. |
|
|
38
45
|
| `background` | Omitted, main runs it in the background and a subagent waits in the foreground. `true` and `false` force background and synchronous waiting respectively. |
|
|
39
46
|
| `model_alias`, `effort` | Omitted, the saved or default values are kept. |
|
|
40
47
|
|
|
48
|
+
Each non-native executor descriptor also projects a reserved native target named `engine:<executor-id>`, for example `engine:codex-app-server`, `engine:claude-acp`, `engine:agy-cli` and `engine:grok-acp`. Pass that stable name as `AgentRun`'s `profile` to launch a bare child with the engine's own configuration; no Markdown role profile is required. Ordinary named role profiles keep their existing behavior. If a registered profile already uses the same `engine:<executor-id>` name, that registered definition remains in effect; the virtual projection does not replace it.
|
|
49
|
+
|
|
50
|
+
For a bare engine target, model selection is `AgentRun.model_alias` → `[agent_executor_overrides."<id>".defaults].model_alias` → the vendor's default, and Kiki does not resolve the vendor model through native `[models]` or provider settings. It has no Kiki role, system prompt or profile body, and it does not receive the Kiki MCP bridge merely because it is a child. Explicit per-engine defaults still apply.
|
|
51
|
+
|
|
52
|
+
An explicit `allowed_subagents` list is not widened by projecting these targets; include the exact `engine:<executor-id>` name when the caller may use it. Hard model and effort constraints remain active. If the vendor default cannot be verified against an `allowed_models`, `deny_models` or `allowed_efforts` rule, select an explicit permitted vendor model or effort instead of relying on that default.
|
|
53
|
+
|
|
41
54
|
A child runs inside the current session and inherits its working directory and declared additional workspace directories by default. A new child may instead set typed `workDir` and `additionalDirs` roots for an already admitted independent writer directory; these roots are mapped through the selected runtime and become the child's actual tool and external-executor roots. Mentioning a path in `prompt` does not add it. `resume` rejects `workDir` and `additionalDirs` and keeps the roots frozen from the original launch. For a separate working directory or worktree owned by a whole conversation, configure that session's working directory first, then dispatch its children.
|
|
42
55
|
|
|
43
|
-
Workspace inheritance provides context, not a new directory sandbox.
|
|
56
|
+
Workspace inheritance provides context, not a new directory sandbox. It does not invent extra input roots or override an external engine's sandbox; unset model, effort and permission choices keep the [engine's own configuration](#direct-external-execution). Explicitly declared additional directories go through the executor's supported directory interface; an ACP executor that does not declare support records `additional_directories_dropped`. Declaring a directory does not disable explicit permission rules, persisted worktree restrictions or the engine's own sandbox.
|
|
57
|
+
|
|
58
|
+
To continue a direct child, set `resume` to its name or agent id; it rejects `name`, `profile`, `profile_file` and `route`. The child must be idle. Choose `context_mode` explicitly when you need to control its next context window:
|
|
59
|
+
|
|
60
|
+
| `context_mode` | Continuation |
|
|
61
|
+
| --- | --- |
|
|
62
|
+
| `direct` | Keep the current context. This is also the default for an ordinary resume. |
|
|
63
|
+
| `compact` | Summarize the current window with the currently bound model, then continue from that summary and saved task state. |
|
|
64
|
+
| `fresh` | Build a new window from saved task state and history references without calling the old model. |
|
|
65
|
+
|
|
66
|
+
All three keep the same child ID, task notes, Todo, full history and workspace roots. Omit `model_alias` and `effort` to keep the saved binding; this also lets you compact or start fresh without changing models. An explicit `model_alias` that selects a different canonical model is confirmed by the chosen `context_mode`, within the same profile, caller, route and machine rules. `compact` and `fresh` rebuild native Kiki context only; external executors reject them rather than replacing the remote session. `[model_switch].default_mode` does not change the ordinary resume default.
|
|
67
|
+
|
|
68
|
+
For example, `AgentRun({ resume: "saved_child", context_mode: "compact", prompt: "Continue the remaining checks.", description: "Continue remaining checks" })` summarizes first and continues with the same model. Add a permitted `model_alias` to continue with a different model after the summary.
|
|
69
|
+
|
|
70
|
+
The legacy parameters remain supported: `allow_model_change: true` confirms a model change while keeping context, and `new_window: true` selects fresh context and also confirms a model change. `new_window: true` takes precedence when both legacy flags are true; `new_window: false` does not veto `allow_model_change: true`. `allow_model_change` requires `resume` and `model_alias`; `new_window` requires `resume`. Do not combine either legacy parameter with `context_mode`, even with a false value.
|
|
44
71
|
|
|
45
|
-
|
|
72
|
+
A failed or cancelled summary before commit keeps the old binding and context. If saving the switch fails after commit, recover the original operation before starting new work; the committed summary is reused. If a native child has older prompts held after reopening, an explicit `resume` runs the requested work while keeping that older queue held.
|
|
46
73
|
|
|
47
74
|
A completed provider response is not itself a task receipt. If a completed response contains real thinking but no text or tool calls, Kiki continues within the same turn until text or a tool call arrives, whether or not the thinking has a signature. Existing signatures and usage are preserved without adding another user prompt; step budgets, cancellation and permanent provider errors still stop the turn. Text-free tool steps remain valid, but an agent task still needs a final written result.
|
|
48
75
|
|
|
@@ -50,7 +77,7 @@ A native child that ends with no content or tool calls fails with `loop.empty_co
|
|
|
50
77
|
|
|
51
78
|
Inspect the original turn and any saved work before resuming the same child with a new prompt asking it to finish and report the result. SDK callers must use a new prompt ID; repeating an already-settled ID replays its recorded outcome. Kiki does not automatically retry these failures or rewrite earlier task records.
|
|
52
79
|
|
|
53
|
-
A new launch picks its model from the concrete `model_alias` parameter, then the effective profile, route or caller-lease pin, then an explicitly configured `[subagent].default_model`. With none of those it fails with `model.not_configured` and no child is created, and an unknown alias is an error. Effort resolves separately, from the tool call, the route, the caller lease, the profile, or the model itself — [the full order is below](#named-profile-routes-experimental). Omitted `model_alias` and `effort` on `resume` keep the saved binding; an alias resolving to the same canonical model is a no-op, and a different one needs `allow_model_change: true
|
|
80
|
+
A new ordinary role-profile launch picks its model from the concrete `model_alias` parameter, then the effective profile, route or caller-lease pin, then an explicitly configured `[subagent].default_model`. With none of those it fails with `model.not_configured` and no child is created, and an unknown alias is an error. Engine targets use the vendor-default order described above instead. Effort resolves separately, from the tool call, the route, the caller lease, the profile, or the model itself — [the full order is below](#named-profile-routes-experimental). Omitted `model_alias` and `effort` on `resume` keep the saved binding; an alias resolving to the same canonical model is a no-op, and a different one needs an explicit `context_mode` or the legacy `allow_model_change: true` / `new_window: true` confirmation.
|
|
54
81
|
|
|
55
82
|
`preferred_models`, `discouraged_models`, `preferred_efforts` and route or caller-lease pins are soft: a hard-permitted override runs with a structured advisory. `allowed_models`, `deny_models` and `allowed_efforts` are hard in every scope. Machine `[subagent].deny_models`, unsupported model capabilities, route identity, a missing model-change confirmation and executor or thread restrictions are hard errors, and an external executor that cannot change a resumed thread binding returns an error rather than recreating the thread or executor.
|
|
56
83
|
|
|
@@ -64,7 +91,9 @@ For `AgentRun` model choices, a profile's menu is a candidate list rather than a
|
|
|
64
91
|
|
|
65
92
|
`AgentList` returns direct children. By default it lists running children and children with no tracking task; pass `include_finished: true` to also get children whose latest background task has already finished or failed. At most 50 entries come back, running ones first.
|
|
66
93
|
|
|
67
|
-
|
|
94
|
+
Native child turns automatically retry [upstream connection interruptions](../configuration/providers.md#incremental-responses-over-websocket), discarding incomplete output before resending. When the retry budget is exhausted, the task becomes `failed` and its notification includes recovery instructions. Use `AgentRun` with `resume` set to that child's id to continue with its existing context.
|
|
95
|
+
|
|
96
|
+
`AgentSend` gives a direct child the input it needs to continue. A running native child receives it at the next step boundary. Codex and a steer-capable ACP child can receive it during the run. A stopped child, including one whose run ends as the message arrives, continues with the same model, profile, tools, and context, and the parent is notified when that run finishes. Saved messages stay in order on that same binding. `queued` means the message is saved, not that a run is already going. If a continuation cannot start, the saved message stays queued and the sender receives the reason, the error code, the target, and the original message 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 the prompt, and do not set new_window. A failed external resume does not open a new remote session. ACP recovery uses the saved original session regardless of how permission mode is configured. If the process reconnects before prompt delivery, Kiki restores and verifies the actual session's model, thinking and permission controls before sending; unsupported resume/load, a changed binding or unverifiable controls stop delivery. If startup failed before any remote session or prompt existed, `AgentRun` can retry construction. Kiki saves ACP session and Codex thread references before sending a prompt. An external resume whose delivery was attempted or whose result is unknown is not sent again for the same operation, including after a Kiki restart; inspect the original remote session and saved task result before deciding what to do next. A confirmed pre-send failure remains retryable. Address the child by `name` or agent id.
|
|
68
97
|
|
|
69
98
|
`AgentNotify` goes the other way and is available only to subagents: it queues a fire-and-forget message in the parent agent's mailbox, read at the parent's next step boundary or next run. The main agent has no parent and never receives it. `[agents] notify_parent = false` in `config.toml` turns it off globally; it is on by default.
|
|
70
99
|
|
|
@@ -134,9 +163,17 @@ A harness chooses the execution program; a profile is optional customization, an
|
|
|
134
163
|
|
|
135
164
|
Direct execution preserves the configured launch environment, home and working directory, but the program must resolve to the same executable and settings sources as the CLI you expect. An ACP adapter may launch an SDK-provided binary or a configured override instead of the CLI on PATH; omitting a profile does not make those programs identical. An unknown login observation alone does not prevent launch.
|
|
136
165
|
|
|
137
|
-
An unset permission mode keeps the engine's own mode, including its auto, YOLO or manual behavior; a native Kiki default or an inherited parent mode is not an external override. An explicit session, profile, harness setting or agent-level permission change applies
|
|
166
|
+
An unset permission mode keeps the engine's own mode, including its auto, YOLO or manual behavior; a native Kiki default or an inherited parent mode is not an external override. An explicit session, profile, harness setting or agent-level permission change applies through the engine's native controls. Named external profiles also inherit the harness's `permission_mode` default when they do not declare one, and save that choice with their binding.
|
|
167
|
+
|
|
168
|
+
The engine owns permissions for its native tools. Kiki does not translate those calls into Kiki tool names or file-path approvals, and unknown native tools are not rejected for lacking that translation. Kiki's visible-tool catalog is not an engine allowlist. Kiki-only `review` mode, finite tool allowlists, `disallowed_tools`, deny or ask `permission.rules`, execution restrictions and persisted worktree write isolation cannot currently be enforced through these native interfaces. Such bindings fail before a prompt is sent, naming the unsupported fields; use the native Kiki executor for those restrictions or configure the external engine's own permissions.
|
|
138
169
|
|
|
139
|
-
Changing only permission mode keeps the remote conversation. Clearing an override returns to the remaining profile or harness setting; when none remains, ACP and Codex restore the engine's saved pre-override policy, including after reopening the Kiki session. An adapter that cannot apply the requested mode or restore its saved policy reports an error rather than silently starting another conversation.
|
|
170
|
+
Changing only permission mode keeps the remote conversation. Clearing an override returns to the remaining profile or harness setting; when none remains, ACP and Codex restore the engine's saved pre-override policy, including after reopening the Kiki session. Codex restores both approval and sandbox policies after Full access. An adapter that cannot apply the requested mode or restore its saved policy reports an error rather than silently starting another conversation.
|
|
171
|
+
|
|
172
|
+
The bundled AGY CLI adapter applies overrides with session-only `--settings`, without writing the engine's global settings: `manual` selects `request-review` with the default agent mode, `auto` selects `request-review` with AGY's auto agent mode, and Full access selects `always-proceed`, `accept-edits`, non-workspace access and no terminal sandbox, plus `--dangerously-skip-permissions`. AGY's explicit deny rules still apply. An idle mode change restarts only the adapter's own CLI process with `--conversation` for the same native conversation; an active turn must finish first. The adapter installs no permission `PreToolUse` hook; its separate steering hook and MCP bootstrap remain available.
|
|
173
|
+
|
|
174
|
+
Resuming a child launched through `engine:<executor-id>` keeps the saved native engine-session contract. Kiki does not silently replace an unavailable or unverifiable native session with a new one; the resume fails with the engine's diagnostic instead. Resume, load and control support still varies by vendor, so a target can be launchable without supporting every recovery operation.
|
|
175
|
+
|
|
176
|
+
An ordinary resume, or `context_mode: "direct"`, with no model override keeps the existing engine session. Changing `effort` requires an explicit vendor model; Kiki does not infer one from the engine-default binding. `context_mode: "compact"`, `context_mode: "fresh"` and legacy `new_window: true` cannot rebuild an external engine's context and return an error without replacing its session.
|
|
140
177
|
|
|
141
178
|
Approval delivery is separate from that choice of policy. ACP and Codex approval requests appear in Kiki's approval interaction when the adapter supports them. A headless CLI that asks for approval but has no supported response channel cannot complete that request: use an adapter with an approval bridge or explicitly choose a supported permission mode for that task, rather than changing the engine's global defaults.
|
|
142
179
|
|
|
@@ -170,7 +207,7 @@ The bridge attaches to the **existing session**, without creating a separate sea
|
|
|
170
207
|
|
|
171
208
|
A child's completion is queued back to the same main agent without blocking the child: if the main agent is busy, delivery waits for its turn to settle; if it is idle, the receipt wakes it. An allowed `AgentNotify` call reaches the real parent's mailbox and remains subject to `allow_parent_notify` and the configured notification policy. Closing the executor releases its bridge; a released seat or a destroyed and recreated agent cannot reuse the old connection.
|
|
172
209
|
|
|
173
|
-
Codex app-server
|
|
210
|
+
Codex app-server approval requests appear in Kiki's persistent approval interaction with the vendor's decisions intact. Explicit Full access (YOLO) sends `approvalPolicy: "never"` and `sandboxPolicy: { type: "dangerFullAccess" }` for the turn. Explicit `manual` and `auto` use `on-request` approvals and retain the engine's sandbox; Kiki-only restrictions are rejected as described under [direct external execution](#direct-external-execution). Calls through the Kiki MCP bridge still execute as that agent's native Kiki tools, with its existing authorization.
|
|
174
211
|
|
|
175
212
|
Explicit YOLO also adds per-server tool pre-approval for the attached `kiki-harness` MCP server only; native Kiki capability and execution policies still govern its calls. An ambient parent YOLO mode enables neither override. Clearing the explicit mode follows the [permission restoration behavior above](#direct-external-execution).
|
|
176
213
|
|
|
@@ -214,9 +251,11 @@ Claude and Codex `PreCompact` hooks prepare an auditable handoff snapshot rather
|
|
|
214
251
|
|
|
215
252
|
### Rebuilding a session context
|
|
216
253
|
|
|
217
|
-
After editing prompt sources, open the
|
|
254
|
+
After editing prompt sources, open the **+** menu in the session composer, choose **Rebuild context**, and confirm. Kiki reloads the current profile, prompt-field overrides, Agent Skills, `AGENTS.md` instructions and plugin prompt or session-start injections from disk, reconciles the other runtime context injections, and uses the rebuilt snapshot for later requests. Sources added since the session started are picked up as well, while anything you switched off stays off.
|
|
255
|
+
|
|
256
|
+
A saved session can be rebuilt even after Kiki has released its inactive runtime: Kiki restores that same session for the action. Its messages, history, draft, permissions and execution binding are kept, and the rebuild itself sends nothing to the model. It applies to the main agent and is unavailable while a turn is running or queued. Notifications waiting for the next turn stay queued and do not block rebuilding. If rebuilding fails, the error appears in the conversation; correct the reported source problem and choose **Rebuild context** again.
|
|
218
257
|
|
|
219
|
-
Rebuilding
|
|
258
|
+
Rebuilding is not a way to switch the agent, engine or model. For an external engine, Kiki refreshes its host-side sources without restarting the external session or sending it a new prompt. The conversation's MCP servers are re-read as part of it: a server the configuration enabled since the session started joins the list, and a server you switched off here stays off. The **+** menu's **MCP servers** row is where one is added or removed for this conversation (see [Interface overview](../guides/interface.md#input-box)).
|
|
220
259
|
|
|
221
260
|
**Child agents** on a profile is where you decide whether this agent may start others. Open **Settings → Models & agents → Agents** and that section on the profile. **Allow creating child agents** is separate from whether a saved model, profile, or effort is still valid: **Not declared** follows the layer above, **Allowed** permits child agents, and **Off** stops presets, routes, and a definition supplied by path. **Preset list** chooses which named presets and routes it may start. **Recommended first** is only an order: it does not grant or deny a child, and a name outside that list stays allowed when the preset list allows it. **Never dispatch** refuses those names even when the preset list would allow them. A model or preset the catalog does not have is reported on the profile; a catalog that is still loading does not by itself invalidate a saved choice, and this check does not ask an external provider whether it is up. [Plan mode](../reference/tools.md#plan-mode) can still limit a launch to read-only research. If a model, profile, or effort is unavailable, pick a valid value before sending.
|
|
222
261
|
|
|
@@ -437,7 +476,7 @@ Resume never reselects or switches a route: the journal stores the canonical bas
|
|
|
437
476
|
|
|
438
477
|
A new child picks its model from the concrete `model_alias` parameter, then the pin on the effective profile, route or caller lease, then an explicitly configured `[subagent].default_model`; with none of them the spawn fails with `model.not_configured` and no child is created, and the caller's model is not a silent fallback. Set `model_alias: inherit` in a profile, route or caller lease to bind the caller's resolved model explicitly — `AgentRun` itself rejects `model_alias: "inherit"`, so pass a concrete name or omit the parameter. With configured inheritance the caller's effort follows too, unless a tool `effort` or an applicable `thinking_effort` pin takes priority; otherwise effort resolves as tool `effort` → the route's locked effort, or the caller lease's when the route pins none → matching `model_profiles` effort → profile `thinking_effort` when the bound model matches the profile pin → the bound model's own default. When none supplies an effort, a model known not to support thinking uses `off`; a thinking model without a resolvable default still needs an explicit effort. Unknown capabilities do not imply `off`, and an unknown alias is an error wherever it came from.
|
|
439
478
|
|
|
440
|
-
On `resume`, omitting both `model_alias` and `effort` keeps the saved binding, and an alias resolving to the same canonical model is a no-op. Changing only `effort` applies it to the next idle run. Changing `model_alias` to a different canonical model needs `allow_model_change: true
|
|
479
|
+
On `resume`, omitting both `model_alias` and `effort` keeps the saved binding, and an alias resolving to the same canonical model is a no-op. Changing only `effort` applies it to the next idle run. Changing `model_alias` to a different canonical model needs an explicit `context_mode` or the legacy `allow_model_change: true` / `new_window: true` confirmation, and with `effort` also omitted the target model's own default is re-resolved rather than carried over. Profile, lease, model-profile and inherited hard rules are checked at resume admission, and a rejection leaves the saved binding unchanged; an effort the provider cannot honor, a machine model denial and executor thread-binding restrictions are hard errors too.
|
|
441
480
|
|
|
442
481
|
Omit `model_alias` and `effort` to use the target's defaults for a new child. The model catalog lists hard-permitted configured models and marks the preferences coming from the effective profile, lease, route and model-profile entries; a model listed for another target is neither preferred nor allowed here. Pair `preferred_models` with a default `model_alias` to publish a preferred pool, and keep `model_profiles` for per-model defaults and guidance. A route's `service_tier`, including `service_tier: null`, does not clear a configured model-level tier.
|
|
443
482
|
|
|
@@ -112,7 +112,7 @@ A hook supplements permission rules; it is not an operating-system sandbox and c
|
|
|
112
112
|
This flashes a notification in the terminal title bar when a background task completes (macOS needs `terminal-notifier` installed):
|
|
113
113
|
|
|
114
114
|
```toml
|
|
115
|
-
# Written in ~/.kiki/config.toml
|
|
115
|
+
# Written in <home>/config.toml (default: ~/.kiki/config.toml)
|
|
116
116
|
[[hooks]]
|
|
117
117
|
event = "Notification" # Trigger: when a background task status changes
|
|
118
118
|
matcher = "task\\.completed" # Only care about "completed" notifications
|
|
@@ -123,7 +123,7 @@ Save the config, start a new session, and a notification will appear the next ti
|
|
|
123
123
|
|
|
124
124
|
## Legacy rule fields
|
|
125
125
|
|
|
126
|
-
Each legacy rule is one entry in the `[[hooks]]` array in `~/.kiki/config.toml
|
|
126
|
+
Each legacy rule is one entry in the `[[hooks]]` array in the current `<home>/config.toml` (default `~/.kiki/config.toml`):
|
|
127
127
|
|
|
128
128
|
| Field | Type | Required | Description |
|
|
129
129
|
| --- | --- | --- | --- |
|
|
@@ -221,7 +221,7 @@ The following hook checks the command content before the Agent calls the `Bash`
|
|
|
221
221
|
[[hooks]]
|
|
222
222
|
event = "PreToolUse"
|
|
223
223
|
matcher = "Bash"
|
|
224
|
-
command = "node
|
|
224
|
+
command = "node \"$KIKI_HOME/hooks/block-dangerous-bash.mjs\""
|
|
225
225
|
timeout = 5
|
|
226
226
|
```
|
|
227
227
|
|
|
@@ -57,7 +57,7 @@ room_budget = 12
|
|
|
57
57
|
|
|
58
58
|
A session's `delivery` is either `reply` or `message`. New persona sessions use message mode when the persona omits `delivery`; an explicit session choice takes priority, and an existing session keeps its saved choice. Sessions without a persona, and personas with explicit `reply`, answer directly. The persona editor saves the delivery mode it shows, including an explicit `reply`.
|
|
59
59
|
|
|
60
|
-
In the message view, a completed turn's last complete ordinary reply also appears when that turn has
|
|
60
|
+
In the message view, a completed turn's last complete ordinary reply also appears when that turn has not called the native `SendMessage` tool. Calling it suppresses this fallback even if the send fails, is cancelled, or is still pending. When a call sends a `messages` batch, each message grows in its own row while streaming and keeps its own delivery result. Long replies and sent messages load the rest of their text automatically. Failed turns keep a failure indicator. Switch to the process view to read ordinary text that is not shown as a message, including unfinished replies. This display fallback does not send to a room, another persona, or an IM channel; those destinations still need an actual delivery.
|
|
61
61
|
|
|
62
62
|
When `SendMessage` confirms delivery to the user, its result tells the model to end the turn without another closing message if the request is complete and no work remains. Progress updates still allow required tools and pending work to continue. A native-executor turn that ends in ordinary text instead receives guidance in the next model request when the tool is available; it does not add a request to the completed turn or resend its answer.
|
|
63
63
|
|
|
@@ -71,6 +71,7 @@ You are approving the source, not the exact bytes: Kiki fingerprints the plugin
|
|
|
71
71
|
|
|
72
72
|
- **Local edits take effect in the conversation you are already in.** Install once with `/plugins install --trust <path>`, enable global use with `/plugins enable <id>` (a fresh CLI install leaves global use off), then after editing your source run `/plugins install <path>` again with the same path: the managed copy is replaced, the plugin stays enabled, and the tool is available to that conversation as soon as the command returns. No `/plugins reload`, `/reload` or `/new` is needed, and the consented source does not ask for `--trust` again.
|
|
73
73
|
- **An update waits for that plugin's in-flight work.** Running calls finish on the old version and calls arriving during the switch wait and run on the new one. Other plugins keep running untouched, and a call already resolved against an older tool definition asks for a retry instead of running against changed rules.
|
|
74
|
+
- **A package preview does not hold up installed tools or Skills.** It reads the complete package, including dependency files. Disconnecting the preview request cancels its remaining download, extraction and fingerprint work; installation still requires a completed preview.
|
|
74
75
|
- **`/plugins reload` is the global re-read**, of `installed.json` and every managed copy. It never copies from your source directories, so it is not how you pick up a source edit; system-prompt sections and plugin Skills rebuild on their own documented timing (see [System-prompt instructions](#system-prompt-instructions) and [Plugin agents](#plugin-agents)).
|
|
75
76
|
- **Local installs are copied** to `$KIKI_HOME/plugins/managed/<id>/`, and the CLI always runs from that copy. Edit the source and reinstall — editing the managed copy by hand has no update path and a later reinstall overwrites it.
|
|
76
77
|
- **Removing a plugin deletes only the installation record.** The managed copy and your source files stay on disk.
|
|
@@ -82,7 +83,7 @@ Install one copy of a plugin, then choose where it is used. The GUI install prev
|
|
|
82
83
|
|
|
83
84
|
In **Settings → Workspaces**, open a workspace to set its plugin defaults. In a conversation, open **Capability controls → Plugins** in the right rail to change plugin use for that session only; **Capability inventory → Tools** shows the plugin's tools rather than its usage switch. Selecting an installed plugin from the composer's **+** menu or plugin picker also enables it only for that session, without sending a message. Before your first message, those choices stay with the new-conversation draft and apply before that message starts; a failed application keeps the draft for retry. Other sessions and workspace defaults stay unchanged. This capability is available by default; an explicit `[experimental] plugin_workspace_usage = false` or `KIKI_EXPERIMENTAL_PLUGIN_WORKSPACE_USAGE=0` keeps the selection surface off.
|
|
84
85
|
|
|
85
|
-
The most specific selection wins: session, then workspace, then global default. **Restore default** removes the local override. An explicitly globally disabled or invalid plugin cannot be enabled locally; restore its master switch in Plugin settings first. Profile tool restrictions still apply.
|
|
86
|
+
The most specific selection wins: session, then workspace, then global default. **Restore default** removes the local override. An explicitly globally disabled or invalid plugin cannot be enabled locally; restore its master switch in Plugin settings first. Profile tool restrictions still apply. The shipped default main profile allows tools from enabled plugins; custom profiles and subagent profiles still use their own tool lists.
|
|
86
87
|
|
|
87
88
|
Turning a plugin off removes its tools, Skills, commands, plugin agents, hooks and panel access from that scope. Calls already admitted may finish. Plugin instructions update at the next safe step; a completed selection does not rewrite an already sent request or past messages. **Applying** indicates that catalog or runtime changes are still being applied. A failed application restores the previous selection and shows the error.
|
|
88
89
|
|
|
@@ -152,7 +153,7 @@ Reading results and output-layer model history are stored separately. The defaul
|
|
|
152
153
|
|
|
153
154
|
## Media Sources
|
|
154
155
|
|
|
155
|
-
Install and enable **Kiki Media** (`kiki-media`) once, then open **Capabilities → Extensions & tools → Plugins → Media sources**.
|
|
156
|
+
Install and enable **Kiki Media** (`kiki-media`) once, then open **Capabilities → Extensions & tools → Plugins → Media sources**. It includes OpenAI, Google, Ark, xAI, MiniMax, StepFun, Novita, Agnes, NewAPI and ComfyUI sources for images, video and speech; you do not need a separate package for each vendor. Your own local commands can join the same list as script sources.
|
|
156
157
|
|
|
157
158
|
The unified package needs a Kiki host with grouped media sources and script-source management. If your build has no **Add script source** action or rejects unknown manifest fields, update the host first. The package's plugin-engine requirement `>=0.4.0` is a protocol version, not a CLI release number; the [package README](https://github.com/X-T-E-R/kiki-plugins/tree/main/plugins/official/kiki-media#configure-a-source) gives the host contract.
|
|
158
159
|
|
|
@@ -160,6 +161,8 @@ The unified package needs a Kiki host with grouped media sources and script-sour
|
|
|
160
161
|
|
|
161
162
|
Media generation has no experimental master switch. Install and enable the plugin, configure an enabled source, then request a generation. Opening the list or saving settings does not start a job; the source's access requirements, charges and script authorization still apply.
|
|
162
163
|
|
|
164
|
+
The plugin ships the `media-image`, `media-video` and `media-tts` skills; the agent uses its `generate` tool for images, video and speech. Independent generations can run in parallel. Each source handles eight simultaneous submit or poll requests by default; change this with **Maximum concurrent provider requests** in that source's settings.
|
|
165
|
+
|
|
163
166
|
### The list
|
|
164
167
|
|
|
165
168
|
Each row identifies a source and its owning package, with its configuration and enabled state. Open a source marked **Needs setup** to fill in missing settings. A disabled or removed source stays visible so you can restore it; a package that did not load must be repaired before its sources can generate. A blocked job is kept rather than discarded.
|
|
@@ -453,7 +456,7 @@ A plugin that uses another installed plugin declares its required version range,
|
|
|
453
456
|
|
|
454
457
|
For chat connections, declare `x-kiki.imAdapters` and call `api.registerImAdapter(definition, adapter)`. Each definition represents one configured account and has `schemaVersion: 1`, a local `id`, `label`, independent `inbound` and `outbound` booleans, `maxInboundBytes`, and a `mediaCapabilities` array. Kiki assigns `plugin:<pluginId>/<adapterId>` as the provider and instance ID. Inbound definitions also require `listenerRealm`, the real protocol or message-source namespace. Use `qq-onebot` with the actual QQ self ID as `start()`'s `listenerAccountId`; QQ official API connections use `qq-official` with the app ID. `accountId` remains the plugin's stable binding identity and may keep an existing prefix. When `listenerAccountId` is omitted, Kiki uses `accountId` for listener ownership. An already-running listener retains a source/account claim; a conflicting new listener stops and reports `account_in_use`. Output-only connections do not claim inbound ownership.
|
|
455
458
|
|
|
456
|
-
`start({ signal, settings, instanceId, offset, messageLimits, emit })` returns `{ accountId, listenerAccountId?, targets? }`. Emit only after startup completes. Output-only adapters can return `targets` for the user to confirm without fabricating an inbound event. Disabling, reloading or removing the plugin closes its own connections and keeps the user's listening preference and bindings for later re-enabling. The user confirms each destination; group bindings default to the original sender and can explicitly use `binding_scope: "topic"` or `"chat"`. A shared group session preserves each message's real sender, and does not let another member answer the original sender's pending approval or question.
|
|
459
|
+
`start({ signal, settings, instanceId, offset, messageLimits, emit, report })` returns `{ accountId, listenerAccountId?, targets? }`. Emit only after startup completes. Output-only adapters can return `targets` for the user to confirm without fabricating an inbound event. Disabling, reloading or removing the plugin closes its own connections and keeps the user's listening preference and bindings for later re-enabling. The user confirms each destination; group bindings default to the original sender and can explicitly use `binding_scope: "topic"` or `"chat"`. A shared group session preserves each message's real sender, and does not let another member answer the original sender's pending approval or question.
|
|
457
460
|
|
|
458
461
|
For one platform message containing text and several attachments, finish normalization and media downloads before calling `await emit({ kind: "message", eventId, sourceMessageId, identity, parts, ...metadata })` once. Put the real mention, quote and sender metadata on that envelope. Each ordered part has `kind: "text" | "image" | "file" | "audio" | "video"`, optional `text`, and hydrated `media: { name, mediaType, bytes }` when available. `sourceMessageId` is required and `operation` is omitted or `"create"`; edits and retractions use the existing single-event form. Kiki admits all parts before one prompt and keeps their order. Existing single-kind events keep their per-event behavior; Kiki does not guess when a series of them is complete.
|
|
459
462
|
|
|
@@ -461,6 +464,10 @@ Read the frozen `context.messageLimits` object supplied to `start()`; managed pl
|
|
|
461
464
|
|
|
462
465
|
If an attachment is known to have no usable download URL, keep its non-text `kind` and put its name, reason and any available ASR transcript in nonempty `text`, without `media`. Kiki renders that part in place as explicitly unavailable external text and creates no media bytes for it. A real download failure or cancellation must emit nothing for that source message; retry the whole source with the same root `eventId`. Exceeding a message budget rejects `emit()` as a whole. A part marked `tooLarge: true` also rejects the entire `emit()` without submitting or saving an earlier prefix. Stop or unload discards incomplete transport frames and rejects queued emissions from the retired connection.
|
|
463
466
|
|
|
467
|
+
After startup, use optional `await context.report?.({ status: "failed", sourceId, code })` to make receive failures visible under **Settings → Notifications → IM**. `code` is `hydrate_failed`, `download_failed`, `message_too_large` or `admission_failed`; `sourceId` is an opaque, non-content token of 1–64 ASCII letters, digits, `_` or `-`, stable across source retries. Reports accept no message text, URLs, credentials, error objects or stacks, and are limited to 1,024 UTF-8 bytes. Kiki binds the account and instance from the active connection and retains the newest 32 source/code diagnostics for snapshot refreshes and same-account reconnects within that Host. Older Hosts omit `report`; existing adapters need no changes.
|
|
468
|
+
|
|
469
|
+
After the same complete source succeeds, report `status: "recovered"` with its matching `sourceId` and `code`. This clears only that diagnostic, preserving other sources and connection errors. Do not report cancellation or stop as a failure, advance a source cursor after failed hydration or admission, or emit a diagnostic as a chat message. Report acknowledgement confirms diagnostic retention, not message delivery. A Host replacement starts a new diagnostic lifetime; an adapter retry must report any continuing failure again.
|
|
470
|
+
|
|
464
471
|
Keep `eventId` for event deduplication and send the platform's real message ID separately as `sourceMessageId`. Inbound `mentioned`, `mentionIds`, `replyToMessageId`, optional `isSelf` and epoch-millisecond `timestamp` reach the session's message metadata. Emit `operation: "edit"` or `"retract"` with the real target `sourceMessageId`; these update the received history without starting another model turn. Do not infer self identity from a display name. The model receives real sender facts and selected background beside the current body, marked as untrusted external data rather than instructions or authorization. Outbound text carries `replyToMessageId` for a quote, `messageId` for an edit, and `mentionIds` for platform mentions. Declare `supportsReply`, `supportsEdit` and `supportsMentions` only when implemented; unsupported requests return a channel receipt instead of silently dropping those fields. Platform passive-reply tokens stay inside the adapter.
|
|
465
472
|
|
|
466
473
|
New explicit topic/chat group bindings retain ordinary messages quietly and wake on a real mention or reply to a known self message. The user can choose a literal prefix, every-message wake, or record-only mode through [`group_policy`](../server/rest-api.md#im-account-and-channel-bindings). Older sender-scoped bindings keep their every-message behavior. Mention/reply wake requires real adapter metadata; built-in transports that do not expose it can use a configured prefix or `wake: "always"`. [ReadMessageHistory](../reference/tools.md#im-chat-history) reads the retained journal through the current session's admitted binding.
|
|
@@ -485,6 +492,12 @@ Use either single-message `text`/`attachments`/`reply_to`/`mention_ids` or an ex
|
|
|
485
492
|
|
|
486
493
|
`minSendIntervalMs` sets the Host's per-target sending interval. Adapters may report `{ status: "failed", errorKind: "rate_limited", retryAfterMs }` only when the platform explicitly rejected the send without accepting it. Kiki retries that result at most twice; delivered results with no message IDs, partial deliveries and unknown outcomes are not retried. Built-in channels also use the Host's target pacing; a platform rate limit without an exact retry delay remains a failed receipt.
|
|
487
494
|
|
|
495
|
+
### Native tool concurrency
|
|
496
|
+
|
|
497
|
+
For a tool whose independent calls can safely overlap, set `"concurrencySafe": true` in its `x-kiki.tools` definition and in the identical definition passed to `api.registerTool`. Omit it or set it to `false` to retain the existing scheduling behavior.
|
|
498
|
+
|
|
499
|
+
This declaration changes scheduling only: broad `accesses: [{ "kind": "all" }]` no longer makes independent calls mutually exclusive. Permissions and approvals still use the original `accesses`. Declared file writes retain their read/write ordering, and an unknown `Bash` command remains a barrier. The plugin must handle shared state safely and enforce its own provider limits.
|
|
500
|
+
|
|
488
501
|
### Native tool results
|
|
489
502
|
|
|
490
503
|
Native tools declared under `x-kiki.tools` can return text and PNG, JPEG or WebP images as base64 data URLs. Large results are saved automatically as session attachments: text keeps a preview with the complete original's path and `kimi-file://` reference, and images remain available through the session attachment reference. Ask the agent to use `Read` to page through the original text or `ReadMediaFile` to inspect the original image. Plugin authors can keep the usual return format; they do not need to split the result themselves.
|
|
@@ -8,7 +8,7 @@ Prompt field overrides replace named pieces of the built-in prompt — system se
|
|
|
8
8
|
|
|
9
9
|
Useful built-in field ids include `system.language`, `system.reply_style`, `system.coding`, `system.shared`, `tool.web-search.description`, `tool.web-search.guidance`, `delegation.sub.notice` and `delegation.independent.notice`. System fields replace sections of the built-in prompt, except `system.shared`, which is the one shared outer addition and is appended once when non-empty. A tool `description` replaces its static description; a tool `guidance` is appended under the existing `User-configured guidance:` label.
|
|
10
10
|
|
|
11
|
-
Kiki's built-in collaboration guidance works without a Recipe. It asks agents to give one owner a complete outcome, inspect and incorporate returned work before accepting it, and send the inputs a recipient still needs for its next action. It does not impose a message quota on user-requested discussion. Reply language follows the user or task brief, including an explicit reply-language requirement; internal steering, reminders and quoted documents do not by themselves switch it. Customize this guidance through `system.delegation_brief_hygiene`, `delegation.sub.notice`, or the `description` and `guidance` fields for `tool.agent-run`, `tool.agent-send` and `tool.thread-send`.
|
|
11
|
+
Kiki's built-in collaboration guidance works without a Recipe. It asks agents to give one owner a complete outcome, inspect and incorporate returned work before accepting it, and send the inputs a recipient still needs for its next action. Model, route and tool requirements are applied through `AgentRun` parameters and the chosen role rather than repeated in the subagent's instructions. It does not impose a message quota on user-requested discussion. Reply language follows the user or task brief, including an explicit reply-language requirement; internal steering, reminders and quoted documents do not by themselves switch it. Customize this guidance through `system.delegation_brief_hygiene`, `delegation.sub.notice`, or the `description` and `guidance` fields for `tool.agent-run`, `tool.agent-send` and `tool.thread-send`.
|
|
12
12
|
|
|
13
13
|
These defaults keep existing profile and Recipe overrides, delegation-notice off choices, and role and tool limits intact. A custom replacement profile still controls its own body. External executors receive the text through their selected profile or configured `executor_prompt` composition; [direct external execution](./agents-and-subagents.md#direct-external-execution) without those additions stays bare.
|
|
14
14
|
|
|
@@ -27,7 +27,7 @@ Every override surface uses the same format — optional `files` (strict TOML fi
|
|
|
27
27
|
|
|
28
28
|
Precedence from low to high follows the table order; a missing key inherits the lower value. The complete format, `${name}` variable substitution rules, and validation failures are documented in [`prompt`](../configuration/config-files.md#prompt).
|
|
29
29
|
|
|
30
|
-
An existing agent keeps its bound prompt fields, custom variables and cognition text when it resumes, even if their source files have changed or been deleted. Edits apply to new bindings; choose [Rebuild context](./agents-and-subagents.md#rebuilding-a-session-context) to adopt them in an existing session. An explicit model change selects the target model's prompt inputs; `new_window` alone does not reload prompt sources. Current tool permissions and hard model constraints still apply.
|
|
30
|
+
An existing agent keeps its bound prompt fields, custom variables and cognition text when it resumes, even if their source files have changed or been deleted. Edits apply to new bindings; choose [Rebuild context](./agents-and-subagents.md#rebuilding-a-session-context) to adopt them in an existing session. An explicit model change selects the target model's prompt inputs; `context_mode: "fresh"`, `context_mode: "compact"`, or legacy `new_window` alone does not reload prompt sources. Current tool permissions and hard model constraints still apply.
|
|
31
31
|
|
|
32
32
|
Older records reuse their saved system prompt and recover inline fields from the saved profile where possible. If a record never saved a required shared field, tool override, steering cue or anchor and its original inputs cannot be reconstructed, recovery names the missing inputs. Rebuild the context to use current sources rather than rolling back your installed prompts.
|
|
33
33
|
|
|
@@ -48,7 +48,7 @@ If your config still carries the old `prompt.shared` and `prompt.tools` keys, mo
|
|
|
48
48
|
|
|
49
49
|
## Recipe model presets
|
|
50
50
|
|
|
51
|
-
A Recipe packages model tuning
|
|
51
|
+
A Recipe packages reusable model tuning and selectable prompt text: prompt fields, system/steering/anchor text, and model settings. Recipes are enabled by default. Use the [model editor](../guides/settings.md#models-and-recipes) or `global.recipes` in the [client SDK](../server/sdk.md). An explicit `KIKI_EXPERIMENTAL_RECIPES=false` or `[experimental] recipes = false` on the server keeps them disabled; remove that override to use the default.
|
|
52
52
|
|
|
53
53
|
Create an absolute-path package directory containing `recipe.toml`. Prompt files must be Markdown paths inside that directory:
|
|
54
54
|
|
|
@@ -58,10 +58,16 @@ id = "example"
|
|
|
58
58
|
name = "Example"
|
|
59
59
|
version = "1.0.0"
|
|
60
60
|
|
|
61
|
+
[options.research]
|
|
62
|
+
name = "Research guidance"
|
|
63
|
+
description = "Include source-checking guidance"
|
|
64
|
+
default = true
|
|
65
|
+
|
|
61
66
|
[model.parameters]
|
|
62
67
|
temperature = 0.35
|
|
63
68
|
|
|
64
69
|
[prompts]
|
|
70
|
+
system = { text = "Cite sources when making factual claims.", when = "research" }
|
|
65
71
|
steering = { text = "Keep the current goal in focus." }
|
|
66
72
|
steering_on_turn = true
|
|
67
73
|
steering_on_input = true
|
|
@@ -71,7 +77,11 @@ steering_interval_steps = 0
|
|
|
71
77
|
"system.reply_style" = "Answer concisely and directly."
|
|
72
78
|
```
|
|
73
79
|
|
|
74
|
-
`
|
|
80
|
+
An `[options.<id>]` table requires `name` and boolean `default`; `description` is optional. Option ids use the same regular expression as Recipe ids: `^[a-z0-9][a-z0-9._-]*$`.
|
|
81
|
+
|
|
82
|
+
A source in `system`, `steering`, `anchor.content`, or the `custom.steering` source under `steering_sources.<source>` may be one `{ text = "..." }` or `{ file = "..." }`, or an array of those sources. Each source may use either `when = "<option-id>"` or `unless = "<option-id>"`, but not both. A gate that names an undeclared option is an error, and `off` cannot be gated. Filtering every source leaves the declared slot empty; an `extends` child does not fall back to the parent for that slot.
|
|
83
|
+
|
|
84
|
+
`prompts.fields` accepts every registered, writable prompt field and uses its normal variable and empty-value validation. Options affect prompt text only; they do not affect model settings, hooks, permissions or fields. `model` uses the existing [per-model configuration](../configuration/config-files.md#models) syntax and validation for tuning settings, including parameters, usage budgets and behavior. It cannot change provider routing, credentials, request identity or permissions. Parameters and behavior remain shared across agent positions; existing main/independent usage budgets retain their separate meanings.
|
|
75
85
|
|
|
76
86
|
A package may also carry [script hooks](./hooks.md#recipe-script-hooks). Inspect `preview.hooks` and obtain the user's explicit installation consent before sending `consent: true` for a script-bearing package; never set it automatically from `consent_required`. The hook-free example below needs no script confirmation.
|
|
77
87
|
|
|
@@ -91,6 +101,10 @@ A model's `recipe` can also reference a local file or package directory, such as
|
|
|
91
101
|
|
|
92
102
|
A profile can reference the same installed package, or a local Recipe file, without changing the global model. Add `recipe: installation:<installed-id>` (or just the installation id) to its Markdown frontmatter; the id is returned by `install`. A local file or package directory also works: `recipe: ./focus/recipe.toml`, or an absolute path. A profile's relative path resolves from the profile file and is read at bind time.
|
|
93
103
|
|
|
104
|
+
Select text options with `recipe_options = { research = true }` for the model's Recipe, or with `recipe_options:` in profile frontmatter for the profile's Recipe. Each layer applies its selections only to that layer's Recipe package. An omitted selection uses the option's `default`; an unknown selected id leaves text unchanged and reports a configuration diagnostic. In the GUI, the existing model editor and the existing profile editor for a profile with a declared Recipe show these options as checkboxes.
|
|
105
|
+
|
|
106
|
+
Inspect effective option values without changing a binding with `GET /api/recipes/{id}?recipe_options=<URL-encoded JSON boolean map>` in REST or `klient.global.recipes.get(id, values)` in the klient API.
|
|
107
|
+
|
|
94
108
|
The file is not installed, and binding does not download a URL. Save through the existing profile Markdown editor or edit the profile file. Script hooks in a directly referenced file still require the existing installation consent; `hooks = "off"` contributes no scripts.
|
|
95
109
|
|
|
96
110
|
```markdown
|
|
@@ -99,6 +113,8 @@ name: reviewer
|
|
|
99
113
|
description: Review changes
|
|
100
114
|
model_alias: example-model
|
|
101
115
|
recipe: installation:YOUR_INSTALLED_ID
|
|
116
|
+
recipe_options:
|
|
117
|
+
research: true
|
|
102
118
|
request_params:
|
|
103
119
|
temperature: 0.2
|
|
104
120
|
---
|
|
@@ -109,11 +125,17 @@ A child space reads installed Recipes from its base home by default; a local ent
|
|
|
109
125
|
|
|
110
126
|
Recipes contribute only their declared values. Model settings resolve from the saved model, then the model Recipe, local model `overrides`, the profile Recipe, explicit profile parameters, and matching `model_profiles` parameters. Context and output caps still take the smallest applicable limit. Prompt fields resolve from global, saved model fields, model Recipe fields, profile Recipe fields, profile fields, then matching profile-model or caller-lease fields. Uncovered cognition slots and ordinary model-profile prompt text continue to apply; the role, persona, workspace instructions, host context and permissions keep their existing authority.
|
|
111
127
|
|
|
112
|
-
Set `recipe: off` on a model or profile to disable that layer's Recipe, including an inherited model selection. For model API updates, pass the current `base_revision`; `recipe: null` clears the local selection instead. Saved manual values and the other layer's Recipe remain intact. New bindings freeze each referenced package revision, expanded text and effective model settings, including inherited parameters
|
|
128
|
+
Set `recipe: off` on a model or profile to disable that layer's Recipe, including an inherited model selection. For model API updates, pass the current `base_revision`; `recipe: null` clears the local selection instead. Saved manual values and the other layer's Recipe remain intact. New bindings freeze each referenced package revision, selected option values, expanded text and effective model settings, including inherited parameters; option values and patch content are part of the revision, so the result is reproducible.
|
|
129
|
+
|
|
130
|
+
To check a session's profile Recipe, click **Recipe** beside the model in the composer. **Effective prompts** lists the bound package and revision. Under **Per-turn user reminder**, expand `recipe.profile.steering` to see **Steering applied**, the full frozen text and its sources. A steering-only Recipe sends a user message after the task prompt; it does not add that text to the system prompt.
|
|
131
|
+
|
|
132
|
+
Existing bindings and cold restores keep their snapshot. Older snapshots without a saved name show the installation id and revision unless the same package revision can supply a confirmed name. The displayed body still comes from the saved binding, even if the package changes or becomes unavailable. To adopt changed option values, rebuild the context or create a new binding; hot reload alone does not change an existing binding immediately.
|
|
133
|
+
|
|
134
|
+
If a Recipe reference cannot be resolved, the profile editor shows the unavailable reference, and a failed binding reports the profile, reference and reason. Correct the installation id or profile-relative path, then bind again or rebuild the existing context. A failed bind or rebuild keeps the previous binding; inspecting its diagnostics does not replace it.
|
|
113
135
|
|
|
114
136
|
### Inherit or customize
|
|
115
137
|
|
|
116
|
-
A package can declare one parent with `extends = { source = "https://example.com/presets/recipe.toml" }` before its tables. Missing slots inherit; each text source or source array replaces its parent atomically. Model settings merge by declared leaf, and arrays replace as a whole. Root `model = "off"` clears inherited Recipe settings and returns to saved model settings. A prompt slot such as `steering = "off"` removes that package's inherited slot; a field value of `false` removes that inherited Recipe field. Other model or profile layers can still supply a value.
|
|
138
|
+
A package can declare one parent with `extends = { source = "https://example.com/presets/recipe.toml" }` before its tables. Missing slots inherit; each text source or source array replaces its parent atomically. Model settings merge by declared leaf, and arrays replace as a whole. Root `model = "off"` clears inherited Recipe settings and returns to saved model settings. A prompt slot such as `steering = "off"` removes that package's inherited slot; a field value of `false` removes that inherited Recipe field. Other model or profile layers can still supply a value. Before evaluating any `when` or `unless`, option definitions merge by id. A child definition with the same id replaces the parent's complete definition, including `name`, `default`, `description`, `prepend`, `append` and `patch`; parent gates are evaluated against the merged option table. Option order after `extends` is parent options first, followed by new child ids; an override keeps the parent's position.
|
|
117
139
|
|
|
118
140
|
`prompts` is the common branch used by subagents. A `[prompts.main]` or `[prompts.independent]` table selects a whole position-specific branch; it does not implicitly fill missing slots from common. Set `main = "same"` or `independent = "same"` inside `[prompts]` to explicitly use common, or use `"off"` to disable the whole branch. Text slots accept `{ text = "..." }`, `{ file = "prompt.md" }`, or an array of those sources. An anchor uses `{ content = { text = "..." }, steps = 1, scope = "session" }`; `scope` also accepts `"turn"`.
|
|
119
141
|
|
|
@@ -132,6 +154,40 @@ custom = { steering = { file = "task-cue.md" }, steering_interval_steps = 2 }
|
|
|
132
154
|
|
|
133
155
|
A custom Recipe body accepts the normal text/file/array forms or `"off"`; the latter suppresses lower-layer custom text. Off and inherit modes keep any saved custom draft.
|
|
134
156
|
|
|
157
|
+
### Option insertions and section patches
|
|
158
|
+
|
|
159
|
+
Options can add prompt text without replacing a declared slot. The option-level `prepend` and `append` forms are whole-slot shorthands: they insert before or after the entire slot, so a prepend can appear before a heading rather than targeting a section body. For example:
|
|
160
|
+
|
|
161
|
+
```toml
|
|
162
|
+
[options.citations]
|
|
163
|
+
name = "Citations"
|
|
164
|
+
default = false
|
|
165
|
+
append.main.steering = { text = "Cite sources" }
|
|
166
|
+
prepend.common.system = { file = "preface.md" }
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
`prepend` and `append` use `common`, `main` or `independent` branches. Their slots are `system`, `steering`, `anchor` (the anchor's `content`) and `steering_sources.<source>` (the custom steering body). Each insertion slot accepts one `{ text = "..." }` or `{ file = "..." }`, or an array of those sources. After inheritance is merged, each insertion expands to a source gated by `when = "<option-id>"` and is inserted before or after the actual declared slot; a single declared source is treated as an array before insertion.
|
|
170
|
+
|
|
171
|
+
For section-aware edits, add patch entries to an option:
|
|
172
|
+
|
|
173
|
+
```toml
|
|
174
|
+
[options.cite]
|
|
175
|
+
name = "Citations"
|
|
176
|
+
default = false
|
|
177
|
+
|
|
178
|
+
[[options.cite.patch]]
|
|
179
|
+
slot = "main.system"
|
|
180
|
+
section = "Sources"
|
|
181
|
+
action = "append"
|
|
182
|
+
content = { text = "Cite sources." }
|
|
183
|
+
```
|
|
184
|
+
|
|
185
|
+
`slot` uses the same `branch.slot` syntax as `prepend` and `append`; `section` is optional. Without `section`, only `action = "prepend"` or `action = "append"` is allowed, and the entry becomes a `when = "<option-id>"` source. With `section`, Kiki first gates and concatenates the complete slot text, then applies enabled options' patches in option declaration order and each option's patch-array order. Only enabled options apply.
|
|
186
|
+
|
|
187
|
+
A section matches heading text exactly at any heading level and runs from that heading to before the next heading at the same or a higher level. Lines beginning with `#` inside a fenced code block are not headings. Section-level `prepend` and `append` add content at the section body head or tail; `before` and `after` insert content before or after the whole section; `replace` replaces the whole section and requires content with its own heading; `remove` deletes the whole section and cannot have content. Every action except `remove` requires `content`, and inserted blocks are separated by a blank line. Unedited text is preserved byte-for-byte, including the trailing newline when the final section is untouched.
|
|
188
|
+
|
|
189
|
+
After `extends` is merged, the target slot must be declared and must not be `off`; an invalid slot key, missing or disabled target, or `content` carrying `when` or `unless` is an error. If an enabled patch cannot find its section or finds it more than once, evaluation fails with the option id and section in the diagnostic. Insertions cannot use `when` or `unless` themselves.
|
|
190
|
+
|
|
135
191
|
`global.recipes.fork` creates either an independent `copy` or an `extend` child; `saveLocal` edits the resulting local package with an `expected_revision` guard. Installed packages lock the complete dependency chain and work offline. `follow` checks updates daily; `pinned` keeps the accepted revision. Invalid updates leave the whole last accepted revision active. HTTPS ZIP sources require `sha256`; an inherited ZIP source can supply it in `extends`. Preview and install accept the same inspected snapshot, with no second source download at install time.
|
|
136
192
|
|
|
137
193
|
To share a local customization, save any draft first, then call `global.recipes.export(installation_id)`. It returns `{ name, revision, files }`: a suggested ZIP filename, the accepted source revision, and a relative file map. ZIP the files client-side; inherited text, model settings and cadence are materialized without a parent installation reference, so another Kiki home can preview and install the package independently. Export does not create an installation, change a model, modify source files or upload anything. Importing the package creates its own revision; the export's `revision` identifies what was accepted in the sender's home.
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
# Recipes
|
|
2
|
+
|
|
3
|
+
A Recipe packages reusable prompt text, model settings and optional script hooks. Install it once, then select it on a model or [agent profile](./prompt-fields.md#recipe-model-presets). Each binding keeps its own option choices.
|
|
4
|
+
|
|
5
|
+
## Install and select
|
|
6
|
+
|
|
7
|
+
In **Settings → Models & agents → Models & providers**, open a model's editor and choose **Choose a Recipe**. You can select an installed package, browse a configured Recipe market, or import a source.
|
|
8
|
+
|
|
9
|
+
1. Preview the source URL or an absolute path on the server. A local source can be a directory or `recipe.toml` file; an HTTPS ZIP requires its SHA-256 checksum.
|
|
10
|
+
2. Review the expanded prompts, model settings and any script files. A package with new scripts requires explicit consent to install them.
|
|
11
|
+
3. Choose **Install only** to keep the package without changing the model, or **Install and apply** to also save the model binding and its current drafts.
|
|
12
|
+
4. For an already installed package, select its options and choose **Apply to model**. Merely reading or selecting a package leaves the saved binding unchanged.
|
|
13
|
+
|
|
14
|
+
If installation succeeds but applying to the model fails, keep the installation and retry **Apply to model** after correcting the reported problem. **Restore manual settings** removes the model's Recipe reference while retaining its saved manual values and any separate profile Recipe.
|
|
15
|
+
|
|
16
|
+
## Choose options and inspect the result
|
|
17
|
+
|
|
18
|
+
An option has an id, a name, an optional description and a boolean default. Options can include or remove text, insert text into a prompt slot, or patch a named Markdown section. The full [option and patch syntax](./prompt-fields.md#option-insertions-and-section-patches) belongs to the package manifest.
|
|
19
|
+
|
|
20
|
+
Select options on the model or profile that uses the package. Omitted choices use the package defaults; two models can use the same installation with different choices. An option removed by an update produces a diagnostic and is ignored; review the binding's choices before saving again.
|
|
21
|
+
|
|
22
|
+
To inspect a choice without saving it, use `klient.global.recipes.get(id, values)` or `GET /api/recipes/{id}?recipe_options=<URL-encoded JSON boolean map>`. The response's `resolved.option_values` contains the effective choices, and `resolved.branches` contains the expanded prompt text.
|
|
23
|
+
|
|
24
|
+
For example, with an already connected [Klient](../server/sdk.md), apply a previewed package to one model:
|
|
25
|
+
|
|
26
|
+
```ts
|
|
27
|
+
const recipes = klient.global.recipes;
|
|
28
|
+
const preview = await recipes.preview({ source: { locator: "/path/to/recipe" } });
|
|
29
|
+
const installed = await recipes.install({ preview_id: preview.preview_id });
|
|
30
|
+
const values = { research: true };
|
|
31
|
+
const effective = await recipes.get(installed.installation_id, values);
|
|
32
|
+
const model = await klient.global.kosong.readModel("example-model");
|
|
33
|
+
await klient.global.kosong.updateModel(model.id, {
|
|
34
|
+
recipe: installed.installation_id,
|
|
35
|
+
recipe_options: values,
|
|
36
|
+
base_revision: model.revision,
|
|
37
|
+
});
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
Review `preview.hooks` before installing a package with scripts; pass `consent: true` only after that approval. For several models, read and update each alias with its own `base_revision`. If a model changed in between, refresh that model and retry its save; already successful model saves remain in place.
|
|
41
|
+
|
|
42
|
+
New bindings freeze the package revision, selected options, expanded text and model settings. An existing or restored conversation keeps that snapshot. Start a new binding or [rebuild the context while idle](./agents-and-subagents.md#rebuilding-a-session-context) to adopt changed options or package content.
|
|
43
|
+
|
|
44
|
+
## Browse installed packages
|
|
45
|
+
|
|
46
|
+
**Settings → Models & agents → Recipes** (`/settings/recipes`) manages packages without opening a model. The list shows each package's version, update rule, any failed update, and the models that use it. Open a package to read it (`?recipe=<installation id>`), then choose **Edit this Recipe** (`&view=edit`); a package installed from a source offers **Customize this Recipe**, which copies or extends it first. Nothing on this page binds a model. **Remove** names the models that still use the package and switches them back to their own saved settings. The page also installs from a link or path and manages Recipe markets. In a model's Recipe tab, **Open in the Recipe library** jumps to the bound package.
|
|
47
|
+
|
|
48
|
+
If a save is refused because the package was saved elsewhere first, the editor keeps your edits and offers **Load the newer version**. Your changed files keep your words, untouched files take the newer copy, and the next save uses the newer revision.
|
|
49
|
+
|
|
50
|
+
The [Recipe API](../server/rest-api.md#recipes-and-markets) exposes `global.recipes.list()` and `GET /api/recipes`. Each entry includes its installation id, display name, version, accepted revision, source locator, update mode and health. `copied_from` records a fork's source; market entries associate a package with their source URL.
|
|
51
|
+
|
|
52
|
+
The optional directory fields support model pickers and management lists:
|
|
53
|
+
|
|
54
|
+
| Field | Meaning |
|
|
55
|
+
| --- | --- |
|
|
56
|
+
| `used_by` | Current effective model aliases using this installation, including inherited model references; omitted when none use it |
|
|
57
|
+
| `options` | Option definitions and defaults from the accepted revision; omitted when none are declared or that revision is unavailable |
|
|
58
|
+
| `update_available` | A successful update check found another revision |
|
|
59
|
+
| `last_error` | The update or revision-read failure to resolve |
|
|
60
|
+
|
|
61
|
+
`GET /api/models` and `klient.global.kosong.listModels()` also return each model's `recipe` and explicit `recipe_options`. A `recipe` reference may start with `installation:`; remove that prefix when joining it to the directory's `installation_id`. For a selected-options summary, combine the model's choices with each option's default. An unbound model or a model set to `off` omits both fields.
|
|
62
|
+
|
|
63
|
+
Directory reads use accepted local snapshots and do not fetch package sources. If a revision cannot be read or validated, its entry remains visible with `health: "unavailable"` and a diagnostic. Repair its installation or remove it; other packages remain usable.
|
|
64
|
+
|
|
65
|
+
## Update, customize and share
|
|
66
|
+
|
|
67
|
+
An installed package locks its dependency chain and remains usable offline. **Follow** (`follow`) checks for updates daily and adopts a valid revision when no new script consent is needed. **Pinned** (`pinned`) keeps the accepted revision and is skipped by update checks. An explicit check reports availability without replacing the current revision. Invalid updates retain the complete last accepted package.
|
|
68
|
+
|
|
69
|
+
Use **Copy and edit** for an independent local package, or **Extend from this** to retain a parent reference. Edit **Prompt words** or **Source files**, then choose **Save Recipe**. Saving the package does not select it on another model. API edits use `expected_revision`; on a conflict, reload before editing again. Inherited installations are read-only in a child space, so copy or extend them there before saving.
|
|
70
|
+
|
|
71
|
+
Save author drafts before **Download as ZIP**. The export includes accepted inherited content so another home can import it independently. The API returns `{ name, revision, files }`; the caller creates the ZIP from that relative file map. Export does not upload the package.
|
|
72
|
+
|
|
73
|
+
## Markets and removal
|
|
74
|
+
|
|
75
|
+
Recipe markets are HTTPS catalogs configured under `recipes.markets`. Each market has an `id`, `name`, `url` and `enabled` choice. Disabling a market keeps installed packages. A failed catalog fetch can return its cached entries with `offline: true`; the diagnostic names the source to repair. Plugin markets and Recipe markets have separate catalogs and installation operations.
|
|
76
|
+
|
|
77
|
+
Before removing an installation, inspect its `used_by` model aliases. Removal is rejected while those models still reference it, unless you explicitly pass `disable_models: true`; this writes `recipe: "off"` on the affected models and preserves their other settings. Profile references are separate and are not included in `used_by`; switch or remove those references before deleting a package they need. Existing frozen bindings retain their accepted snapshot.
|
|
@@ -36,7 +36,7 @@ Settings → Appearance → Background puts a picture or a short video behind th
|
|
|
36
36
|
- **Panel opacity** and **Panel blur**: how much the sidebar, page sheets, headers and composer surfaces let the picture through, within the scope you chose.
|
|
37
37
|
- **Separate for light and dark**: off by default. Turn it on to pick a different background for each theme.
|
|
38
38
|
|
|
39
|
-
Readability assist adds a local wash behind conversation and settings text without raising your **Panel opacity** setting. Page sheets, headers and the composer follow that setting; menus
|
|
39
|
+
Readability assist adds a local wash behind conversation and settings text without raising your **Panel opacity** setting. Page sheets, headers and the composer follow that setting; menus and dialogs keep solid backgrounds. Since an approval request is answered in the composer card, it follows that setting too. A busy picture can still make text hard to read at low opacity, so raise **Panel opacity** when you need more separation.
|
|
40
40
|
|
|
41
41
|
Video plays muted and on a loop. It holds on its first frame — or the pack's poster — while the window is hidden or not focused, when reduced motion is on, and when the battery is low and you are unplugged. Kiki warns about videos above 1440p or 40 MB: they cost a lot of memory and you cannot see the difference behind the panels.
|
|
42
42
|
|
|
@@ -54,7 +54,7 @@ After adding a file, press **Reload skins** in Appearance. No restart needed.
|
|
|
54
54
|
::: warning Which machine's folder?
|
|
55
55
|
The themes folder is read on the machine running the Kiki server, since that is the only filesystem it can see.
|
|
56
56
|
|
|
57
|
-
- **Desktop app** —
|
|
57
|
+
- **Desktop app** — the current Space's `<home>/themes/` (default `~/.kiki/themes/`).
|
|
58
58
|
- **Browser connected to a remote server** — the folder belongs to that server, not to the device you are browsing from. Built-in skins work either way, because they ship inside the app.
|
|
59
59
|
:::
|
|
60
60
|
|
|
@@ -36,7 +36,7 @@ A custom theme can override any token below. The `dark` and `light` columns are
|
|
|
36
36
|
|
|
37
37
|
## Let the skill write it
|
|
38
38
|
|
|
39
|
-
You do not have to write the JSON by hand. Run `/kiki-ops` and describe the theme you want — the skill picks the colors, writes the file under `~/.kiki/themes
|
|
39
|
+
You do not have to write the JSON by hand. Run `/kiki-ops` and describe the theme you want — the skill picks the colors, writes the file under the current `<home>/themes/` (default `~/.kiki/themes/`), checks the hex values, and tells you how to apply it.
|
|
40
40
|
|
|
41
41
|
- `/kiki-ops Create a warm dark theme with amber accents.`
|
|
42
42
|
- `/kiki-ops Make a light theme based on Solarized, but keep errors easy to see.`
|
|
@@ -10,18 +10,18 @@ Kiki's browser driver, any independent browser it starts, and computer control r
|
|
|
10
10
|
|
|
11
11
|
## Browser control {#browser-control}
|
|
12
12
|
|
|
13
|
-
Once you complete the component setup and
|
|
13
|
+
Once you complete the component setup and allow the browsers an agent may use under **Settings → Capabilities → Browser & computer → Browser control**, agents can open pages, read snapshots, click elements, fill forms, and take screenshots through the [browser tools](/en/reference/tools#browser-tools), attaching screenshots or recordings back to the timeline. Connections start only when a task requests them.
|
|
14
14
|
|
|
15
|
-
You can connect the kind of browser that fits the job:
|
|
15
|
+
**Add browser** opens a side panel: pick a route first, then finish that route's own setup in the same panel. You can connect the kind of browser that fits the job:
|
|
16
16
|
|
|
17
|
-
- **Your everyday signed-in browser (Kimi / Codex browser extensions)**: use the **Kimi Browser Extension** or **Codex / ChatGPT browser extension** to drive the browser you already use, keeping your existing sign-ins and cookies for internal dashboards, social research, form filling, and cross-site collection. Kiki
|
|
17
|
+
- **Your everyday signed-in browser (Kimi / Codex browser extensions)**: use the **Kimi Browser Extension** or **Codex / ChatGPT browser extension** to drive the browser you already use, keeping your existing sign-ins and cookies for internal dashboards, social research, form filling, and cross-site collection. For the Kimi extension, Kiki installs the plugin and local bridge, and you add and approve the extension from your browser's store. For the Codex extension, you first install the Codex or ChatGPT desktop app and its browser extension, authorize it by the official instructions, and then connect it in Kiki.
|
|
18
18
|
- **Kiki-managed independent browser**: Kiki starts and manages a separate browser and sign-in profile on the server without copying your everyday cookies. It is suited for automated verification, stateless browsing, or tasks that need an isolated account. It runs headless by default, with an option to show the browser window.
|
|
19
19
|
- **Ego Lite**: if you install Ego Lite yourself and finish its setup window, Kiki can check its readiness and connect it so agents can run page automation scripts with screenshots attached directly to the timeline.
|
|
20
|
-
- **Existing or remote browsers (CDP)**: under
|
|
20
|
+
- **Existing or remote browsers (CDP)**: under **Add browser → Configure manually**, attach directly to any local or remote browser that already exposes a CDP address without launching a new browser instance.
|
|
21
21
|
|
|
22
22
|
### Browser permissions
|
|
23
23
|
|
|
24
|
-
Each source and each
|
|
24
|
+
Each browser source has an enable switch for that integration method (turning a source off stops discovery, connection, and tool calls for it while preserving your checked browsers), and each browser in the connection list has its own allow switch on its row. An agent can use only the browsers you switch on, and switching one off revokes that access immediately. You can allow several browsers at once and pick **Set as default** in a row's **⋯** menu to make it the browser for new sessions; with no default, each call names its browser explicitly.
|
|
25
25
|
|
|
26
26
|
See [Settings pages: Browser control](/en/guides/settings#browser-control) for route setup and readiness checks, and [Built-in Tools: Browser Tools](/en/reference/tools#browser-tools) for tool parameters.
|
|
27
27
|
|