kiki-agent 0.5.0 → 0.6.0-beta.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (307) hide show
  1. package/README.md +3 -3
  2. package/dist/builtin/examples/custom-json.mjs +7 -1
  3. package/dist/builtin/rules/claude/entry.mjs +8 -7
  4. package/dist/builtin/rules/codex/entry.mjs +8 -7
  5. package/dist/builtin/rules/files.mjs +6 -1
  6. package/dist/builtin/rules/grok.mjs +2 -2
  7. package/dist/builtin/rules/opencode.mjs +2 -2
  8. package/dist/builtin/rules/pi.mjs +3 -3
  9. package/dist/cpu-worker.mjs +61264 -0
  10. package/dist/docs/en/configuration/config-files.md +258 -45
  11. package/dist/docs/en/configuration/data-locations.md +18 -10
  12. package/dist/docs/en/configuration/env-vars.md +32 -2
  13. package/dist/docs/en/configuration/overrides.md +1 -1
  14. package/dist/docs/en/configuration/providers.md +98 -16
  15. package/dist/docs/en/customization/agent-profiles.md +3 -3
  16. package/dist/docs/en/customization/agents-and-subagents.md +120 -19
  17. package/dist/docs/en/customization/hooks.md +69 -13
  18. package/dist/docs/en/customization/personas.md +4 -4
  19. package/dist/docs/en/customization/plugins.md +171 -8
  20. package/dist/docs/en/customization/prompt-fields.md +66 -8
  21. package/dist/docs/en/customization/recipes.md +77 -0
  22. package/dist/docs/en/customization/skills.md +1 -1
  23. package/dist/docs/en/customization/skins.md +3 -3
  24. package/dist/docs/en/customization/themes.md +1 -1
  25. package/dist/docs/en/features/agent-workflows.md +1 -1
  26. package/dist/docs/en/features/browser-and-computer.md +5 -5
  27. package/dist/docs/en/features/daily.md +8 -6
  28. package/dist/docs/en/features/ecosystem.md +2 -2
  29. package/dist/docs/en/features/extend.md +2 -2
  30. package/dist/docs/en/features/freedom.md +4 -4
  31. package/dist/docs/en/features/index.md +19 -4
  32. package/dist/docs/en/features/long-work.md +13 -7
  33. package/dist/docs/en/features/look.md +2 -2
  34. package/dist/docs/en/features/people.md +2 -2
  35. package/dist/docs/en/features/phone.md +12 -4
  36. package/dist/docs/en/features/spaces.md +39 -27
  37. package/dist/docs/en/features/workbench.md +2 -0
  38. package/dist/docs/en/getting-started/desktop-app.md +4 -8
  39. package/dist/docs/en/getting-started/first-launch.md +11 -9
  40. package/dist/docs/en/getting-started/installation.md +15 -1
  41. package/dist/docs/en/getting-started/use-cases.md +2 -2
  42. package/dist/docs/en/guides/goals.md +4 -2
  43. package/dist/docs/en/guides/interaction.md +12 -10
  44. package/dist/docs/en/guides/interface.md +39 -19
  45. package/dist/docs/en/guides/memory.md +64 -10
  46. package/dist/docs/en/guides/sessions.md +21 -9
  47. package/dist/docs/en/guides/settings.md +88 -76
  48. package/dist/docs/en/index.md +11 -6
  49. package/dist/docs/en/reference/command.md +91 -42
  50. package/dist/docs/en/reference/keyboard.md +32 -15
  51. package/dist/docs/en/reference/model-vocabulary.md +5 -9
  52. package/dist/docs/en/reference/slash-commands.md +11 -5
  53. package/dist/docs/en/reference/tools.md +107 -46
  54. package/dist/docs/en/server/acp.md +6 -2
  55. package/dist/docs/en/server/local-server.md +27 -29
  56. package/dist/docs/en/server/mcp.md +4 -4
  57. package/dist/docs/en/server/rest-api.md +394 -56
  58. package/dist/docs/en/server/script-tools.md +268 -0
  59. package/dist/docs/zh/configuration/config-files.md +258 -45
  60. package/dist/docs/zh/configuration/data-locations.md +18 -10
  61. package/dist/docs/zh/configuration/env-vars.md +32 -2
  62. package/dist/docs/zh/configuration/overrides.md +1 -1
  63. package/dist/docs/zh/configuration/providers.md +98 -16
  64. package/dist/docs/zh/customization/agent-profiles.md +3 -3
  65. package/dist/docs/zh/customization/agents-and-subagents.md +120 -19
  66. package/dist/docs/zh/customization/hooks.md +69 -13
  67. package/dist/docs/zh/customization/personas.md +4 -4
  68. package/dist/docs/zh/customization/plugins.md +171 -8
  69. package/dist/docs/zh/customization/prompt-fields.md +66 -8
  70. package/dist/docs/zh/customization/recipes.md +77 -0
  71. package/dist/docs/zh/customization/skills.md +1 -1
  72. package/dist/docs/zh/customization/skins.md +3 -3
  73. package/dist/docs/zh/customization/themes.md +1 -1
  74. package/dist/docs/zh/features/agent-workflows.md +1 -1
  75. package/dist/docs/zh/features/browser-and-computer.md +5 -5
  76. package/dist/docs/zh/features/daily.md +8 -6
  77. package/dist/docs/zh/features/ecosystem.md +2 -2
  78. package/dist/docs/zh/features/extend.md +2 -2
  79. package/dist/docs/zh/features/freedom.md +4 -4
  80. package/dist/docs/zh/features/index.md +20 -5
  81. package/dist/docs/zh/features/long-work.md +13 -7
  82. package/dist/docs/zh/features/look.md +2 -2
  83. package/dist/docs/zh/features/people.md +2 -2
  84. package/dist/docs/zh/features/phone.md +12 -4
  85. package/dist/docs/zh/features/spaces.md +40 -28
  86. package/dist/docs/zh/features/workbench.md +2 -0
  87. package/dist/docs/zh/getting-started/desktop-app.md +4 -8
  88. package/dist/docs/zh/getting-started/first-launch.md +11 -9
  89. package/dist/docs/zh/getting-started/installation.md +15 -1
  90. package/dist/docs/zh/getting-started/use-cases.md +2 -2
  91. package/dist/docs/zh/guides/goals.md +4 -2
  92. package/dist/docs/zh/guides/interaction.md +12 -10
  93. package/dist/docs/zh/guides/interface.md +39 -19
  94. package/dist/docs/zh/guides/memory.md +64 -10
  95. package/dist/docs/zh/guides/sessions.md +21 -9
  96. package/dist/docs/zh/guides/settings.md +89 -77
  97. package/dist/docs/zh/index.md +12 -7
  98. package/dist/docs/zh/reference/command.md +91 -42
  99. package/dist/docs/zh/reference/keyboard.md +32 -15
  100. package/dist/docs/zh/reference/model-vocabulary.md +5 -9
  101. package/dist/docs/zh/reference/slash-commands.md +11 -5
  102. package/dist/docs/zh/reference/tools.md +105 -44
  103. package/dist/docs/zh/server/acp.md +6 -2
  104. package/dist/docs/zh/server/local-server.md +27 -29
  105. package/dist/docs/zh/server/mcp.md +4 -4
  106. package/dist/docs/zh/server/rest-api.md +381 -56
  107. package/dist/docs/zh/server/script-tools.md +268 -0
  108. package/dist/external-harness/agy-cli-acp.mjs +3856 -848
  109. package/dist/external-harness/agy-hook-registration.mjs +133 -42
  110. package/dist/external-harness/agy-mcp-plugin.mjs +19 -0
  111. package/dist/external-harness/agy-permission-hook.mjs +38 -2
  112. package/dist/history-navigation-worker.mjs +25512 -0
  113. package/dist/hostRunner.mjs +423 -13
  114. package/dist/mailbox-worker.mjs +256 -49
  115. package/dist/main.mjs +2 -2
  116. package/dist/memory-worker.mjs +1184 -0
  117. package/dist/native/windows-process-helper.exe +0 -0
  118. package/dist/plugin-isolation-worker.mjs +57 -0
  119. package/dist/query-store-worker.mjs +168 -43
  120. package/dist/sqlite-indexer.mjs +6087 -275
  121. package/dist/sqlite-query-worker.mjs +5918 -233
  122. package/dist/usage-parser-worker.mjs +3989 -4
  123. package/dist/usage-read-model-worker.mjs +852 -0
  124. package/dist/web/assets/AppErrorBoundary-C9VSooQP.js +1 -0
  125. package/dist/web/assets/ArchivedSessionsPage-QBDgQfmJ.js +1 -0
  126. package/dist/web/assets/CapabilitiesPage-CGd_8tc1.js +11 -0
  127. package/dist/web/assets/CodeEditor-BH2oKQ1E.js +4 -0
  128. package/dist/web/assets/ExternalEnginesSection-Cg0ZHV_Q.js +2 -0
  129. package/dist/web/assets/GlobalCronPanel-CkxiceFF.js +1 -0
  130. package/dist/web/assets/ImageViewport-Bm3A9cOx.js +1 -0
  131. package/dist/web/assets/ListParts-ALUaVCbQ.js +1 -0
  132. package/dist/web/assets/MediaLightbox-B_ovuTW7.js +1 -0
  133. package/dist/web/assets/MemoryPage-B7uc5mfC.js +1 -0
  134. package/dist/web/assets/ModelConnectCard-DZ3oD99k.js +2 -0
  135. package/dist/web/assets/NavScopeBoundary-BlowWTWB.js +1 -0
  136. package/dist/web/assets/PersonasPage-DfoIJD5s.js +3 -0
  137. package/dist/web/assets/PluginPanelHost-DYo0hMIh.js +1 -0
  138. package/dist/web/assets/PreviewWorkspace-DouCcOAD.js +1 -0
  139. package/dist/web/assets/RoomPage-H_4BwkAH.js +1 -0
  140. package/dist/web/assets/SecretField-DFIbmeTY.js +1 -0
  141. package/dist/web/assets/SectionCard-DWTLEA6F.js +1 -0
  142. package/dist/web/assets/SettingsPage-D7XE_1Qb.js +253 -0
  143. package/dist/web/assets/TasksPage-CSu0juVx.js +1 -0
  144. package/dist/web/assets/TerminalPanel-QWFMyS_C.js +9 -0
  145. package/dist/web/assets/UsagePage-CE_H2MKQ.js +1 -0
  146. package/dist/web/assets/{arc-C7IAvCCJ.js → arc-Do2UT5LJ.js} +1 -1
  147. package/dist/web/assets/architectureDiagram-3BPJPVTR-_lPS4SA2.js +36 -0
  148. package/dist/web/assets/askKiki-NJNt6ZhE.js +2 -0
  149. package/dist/web/assets/{blockDiagram-GPEHLZMM-B20N4t8r.js → blockDiagram-GPEHLZMM-Dg_y7shf.js} +2 -2
  150. package/dist/web/assets/{c4Diagram-AAUBKEIU-3BYtlcP-.js → c4Diagram-AAUBKEIU-Ytc3U8k7.js} +2 -2
  151. package/dist/web/assets/channel-ftewyUYM.js +1 -0
  152. package/dist/web/assets/{chunk-2J33WTMH-CpjgczxM.js → chunk-2J33WTMH-CqGuNCrJ.js} +1 -1
  153. package/dist/web/assets/{chunk-4BX2VUAB-BScxUF5G.js → chunk-4BX2VUAB-DRbcHFwS.js} +1 -1
  154. package/dist/web/assets/{chunk-55IACEB6-CrcLYJXd.js → chunk-55IACEB6-BNbqFUmr.js} +1 -1
  155. package/dist/web/assets/{chunk-727SXJPM-BwlyIOjw.js → chunk-727SXJPM-CVRLzEnd.js} +1 -1
  156. package/dist/web/assets/{chunk-AQP2D5EJ-DKKIRkRv.js → chunk-AQP2D5EJ-WwaaHdh3.js} +1 -1
  157. package/dist/web/assets/{chunk-FMBD7UC4-CVDMj2kX.js → chunk-FMBD7UC4-CTnLqBUW.js} +1 -1
  158. package/dist/web/assets/{chunk-ND2GUHAM-CL-PM6r8.js → chunk-ND2GUHAM-DfNIka0g.js} +1 -1
  159. package/dist/web/assets/{chunk-QZHKN3VN-DPV2KbKZ.js → chunk-QZHKN3VN-BoPlJyiP.js} +1 -1
  160. package/dist/web/assets/classDiagram-4FO5ZUOK-qKmPNr--.js +1 -0
  161. package/dist/web/assets/classDiagram-v2-Q7XG4LA2-qKmPNr--.js +1 -0
  162. package/dist/web/assets/client-D1ri2q1x.js +5 -0
  163. package/dist/web/assets/connection-ChgSscSb.js +380 -0
  164. package/dist/web/assets/cose-bilkent-S5V4N54A-WLT7POr1.js +1 -0
  165. package/dist/web/assets/dagre-BM42HDAG-BXUVmWhW.js +4 -0
  166. package/dist/web/assets/diagram-2AECGRRQ-MZROjHGa.js +43 -0
  167. package/dist/web/assets/diagram-5GNKFQAL-CvgKuYL7.js +10 -0
  168. package/dist/web/assets/{diagram-KO2AKTUF-B75UNw6D.js → diagram-KO2AKTUF-ittFRs4S.js} +2 -2
  169. package/dist/web/assets/diagram-LMA3HP47-BJd5TYg_.js +24 -0
  170. package/dist/web/assets/diagram-OG6HWLK6-Bpiu3NRl.js +24 -0
  171. package/dist/web/assets/{erDiagram-TEJ5UH35-3756GOvS.js → erDiagram-TEJ5UH35-CxnYHs1J.js} +4 -4
  172. package/dist/web/assets/export-mMswqyX7.js +2 -0
  173. package/dist/web/assets/{flowDiagram-I6XJVG4X-DB6Y_UDg.js → flowDiagram-I6XJVG4X-CLYrSoLb.js} +2 -2
  174. package/dist/web/assets/ganttDiagram-6RSMTGT7-61QGJn_n.js +292 -0
  175. package/dist/web/assets/gitGraphDiagram-PVQCEYII-BAhOrVeR.js +106 -0
  176. package/dist/web/assets/highlighted-body-OFNGDK62-SDd5GB8L.js +1 -0
  177. package/dist/web/assets/index-0gPR5d3F.js +1 -0
  178. package/dist/web/assets/index-BA9G_SDz.js +1 -0
  179. package/dist/web/assets/{index-DRMjjql1.js → index-BCIhGPzu.js} +1 -1
  180. package/dist/web/assets/index-BHly9bb_.js +1 -0
  181. package/dist/web/assets/index-BXMQKufW.js +1 -0
  182. package/dist/web/assets/{index-0tHq8zh2.js → index-BcSha9Jz.js} +2 -2
  183. package/dist/web/assets/index-Bdx0etDz.js +1 -0
  184. package/dist/web/assets/index-Bf5YCkSy.js +1 -0
  185. package/dist/web/assets/index-BfAzAzpA.css +1 -0
  186. package/dist/web/assets/{index-C6qeLCPw.js → index-BnWnRbrf.js} +10 -10
  187. package/dist/web/assets/index-Bry0pMwp.js +7 -0
  188. package/dist/web/assets/index-BtPOr38s.js +1 -0
  189. package/dist/web/assets/{index-C7mOS2T4.js → index-C9M75mVg.js} +5 -5
  190. package/dist/web/assets/index-CIiZeIPv.js +1 -0
  191. package/dist/web/assets/index-CX9gQtt9.js +1 -0
  192. package/dist/web/assets/index-CpkOEdmz.js +13 -0
  193. package/dist/web/assets/index-Cy-BfvW9.js +1 -0
  194. package/dist/web/assets/index-CyyQI7pL.js +1 -0
  195. package/dist/web/assets/index-DHMHDDXt.js +1 -0
  196. package/dist/web/assets/index-DRz_-PDL.js +1 -0
  197. package/dist/web/assets/index-DSrINsBp.js +1 -0
  198. package/dist/web/assets/index-DXDJteB5.js +1 -0
  199. package/dist/web/assets/{index-DqK8MfQN.js → index-DibUqmJR.js} +1 -1
  200. package/dist/web/assets/index-DoSMztOD.js +1 -0
  201. package/dist/web/assets/index-DpYi3xv9.js +206 -0
  202. package/dist/web/assets/index-DxlP-RnZ.js +1 -0
  203. package/dist/web/assets/{index-D--cw39y.js → index-Ke_VZNNU.js} +4 -4
  204. package/dist/web/assets/index-h4LfI98N.js +1 -0
  205. package/dist/web/assets/{index-DZMkZKhW.js → index-jXLzpyDX.js} +2 -2
  206. package/dist/web/assets/index-oRr6dIng.js +1 -0
  207. package/dist/web/assets/index-q0pNyABD.js +1 -0
  208. package/dist/web/assets/index-wYbP0VdO.js +3 -0
  209. package/dist/web/assets/infoDiagram-5YYISTIA-ChA8rWAW.js +2 -0
  210. package/dist/web/assets/{ishikawaDiagram-YF4QCWOH-ButuBiBW.js → ishikawaDiagram-YF4QCWOH-wAdA3Wum.js} +2 -2
  211. package/dist/web/assets/{journeyDiagram-JHISSGLW-Dlbmqm-j.js → journeyDiagram-JHISSGLW-XQ27BLI2.js} +2 -2
  212. package/dist/web/assets/{kanban-definition-UN3LZRKU-tlQK1cOz.js → kanban-definition-UN3LZRKU-enaS2PwO.js} +6 -6
  213. package/dist/web/assets/{linear-iXuNfUWp.js → linear-dpbaf_C7.js} +1 -1
  214. package/dist/web/assets/memoryAuthority-DU5hzCm_.js +1 -0
  215. package/dist/web/assets/mermaid-GHXKKRXX-B_VPMKIu.css +1 -0
  216. package/dist/web/assets/mermaid-GHXKKRXX-DK-iCZ3T.js +362 -0
  217. package/dist/web/assets/{mindmap-definition-RKZ34NQL-2qPv-mwT.js → mindmap-definition-RKZ34NQL-CCR0JUFu.js} +2 -2
  218. package/dist/web/assets/navViewState-Dx1Fcceg.js +1 -0
  219. package/dist/web/assets/packs-BpjM4FQC.js +1 -0
  220. package/dist/web/assets/pdf-CIFzrehN.js +13 -0
  221. package/dist/web/assets/pieDiagram-4H26LBE5-BaLRkfVx.js +30 -0
  222. package/dist/web/assets/{quadrantDiagram-W4KKPZXB-DfeIFxc0.js → quadrantDiagram-W4KKPZXB-4x90cb4U.js} +2 -2
  223. package/dist/web/assets/{requirementDiagram-4Y6WPE33-BWtjdxie.js → requirementDiagram-4Y6WPE33-CJUCq4Dk.js} +2 -2
  224. package/dist/web/assets/{sankeyDiagram-5OEKKPKP-B5TxJ6mb.js → sankeyDiagram-5OEKKPKP-Bqgmpo8V.js} +2 -2
  225. package/dist/web/assets/{sequenceDiagram-3UESZ5HK-Cf92ZCl1.js → sequenceDiagram-3UESZ5HK-CwReh5y5.js} +2 -2
  226. package/dist/web/assets/sessionList-BPxVFLPa.js +1 -0
  227. package/dist/web/assets/spaces-BeS8BmJE.js +1 -0
  228. package/dist/web/assets/stateDiagram-AJRCARHV-CqH-TMCh.js +1 -0
  229. package/dist/web/assets/stateDiagram-v2-BHNVJYJU-gUjzaHlq.js +1 -0
  230. package/dist/web/assets/theme-gMChIIPj.js +1 -0
  231. package/dist/web/assets/{timeline-definition-PNZ67QCA-CBAOVMfm.js → timeline-definition-PNZ67QCA-DcCNXJwx.js} +2 -2
  232. package/dist/web/assets/uiZoom-Bgw2mRqt.js +1 -0
  233. package/dist/web/assets/vendor-react-C8dhNtzF.js +61 -0
  234. package/dist/web/assets/{vennDiagram-CIIHVFJN-C68x6TdS.js → vennDiagram-CIIHVFJN-CHtc_X23.js} +2 -2
  235. package/dist/web/assets/{wardley-L42UT6IY-DuZZr5jm.js → wardley-L42UT6IY-Bmi7Nc9-.js} +1 -1
  236. package/dist/web/assets/{wardleyDiagram-YWT4CUSO-D6dVGtHd.js → wardleyDiagram-YWT4CUSO-C3By9c62.js} +2 -2
  237. package/dist/web/assets/{xychartDiagram-2RQKCTM6-DYLUhZX4.js → xychartDiagram-2RQKCTM6-v4BXQWoy.js} +2 -2
  238. package/dist/web/icons/apple-touch-icon.png +0 -0
  239. package/dist/web/icons/icon-192.png +0 -0
  240. package/dist/web/icons/icon-512.png +0 -0
  241. package/dist/web/icons/maskable-512.png +0 -0
  242. package/dist/web/index.html +35 -17
  243. package/dist/web/manifest.webmanifest +16 -0
  244. package/dist/web/pdfjs/pdf.worker.min.mjs +1 -1
  245. package/dist/web/theme-boot.js +20 -0
  246. package/native/auth-native/index.cjs +6 -0
  247. package/native/auth-native/index.d.ts +14 -0
  248. package/native/auth-native/package.json +1 -2
  249. package/native/auth-native/prebuilds/darwin-arm64/auth-native.node +0 -0
  250. package/native/auth-native/prebuilds/darwin-x64/auth-native.node +0 -0
  251. package/native/auth-native/prebuilds/linux-arm64/auth-native.node +0 -0
  252. package/native/auth-native/prebuilds/linux-x64/auth-native.node +0 -0
  253. package/native/auth-native/prebuilds/win32-arm64/auth-native.node +0 -0
  254. package/native/auth-native/prebuilds/win32-x64/auth-native.node +0 -0
  255. package/package.json +22 -3
  256. package/dist/web/assets/AppErrorBoundary-BN6IDdP1.js +0 -1
  257. package/dist/web/assets/LifeMark-UBMVaTWr.js +0 -1
  258. package/dist/web/assets/NavScopeBoundary-BCryw-UG.js +0 -1
  259. package/dist/web/assets/architectureDiagram-3BPJPVTR-CbwFBxn7.js +0 -36
  260. package/dist/web/assets/channel-BJs5vJuh.js +0 -1
  261. package/dist/web/assets/classDiagram-4FO5ZUOK-BookeACB.js +0 -1
  262. package/dist/web/assets/classDiagram-v2-Q7XG4LA2-BookeACB.js +0 -1
  263. package/dist/web/assets/client-CXcrCawx.js +0 -3
  264. package/dist/web/assets/connection-C8nwzwXB.js +0 -1
  265. package/dist/web/assets/cose-bilkent-S5V4N54A-D1CEiQM6.js +0 -1
  266. package/dist/web/assets/dagre-BM42HDAG-BlFV941E.js +0 -4
  267. package/dist/web/assets/diagram-2AECGRRQ-BC0ldkFY.js +0 -43
  268. package/dist/web/assets/diagram-5GNKFQAL-B22Iej6G.js +0 -10
  269. package/dist/web/assets/diagram-LMA3HP47-CypI7IJM.js +0 -24
  270. package/dist/web/assets/diagram-OG6HWLK6-OsXumvcD.js +0 -24
  271. package/dist/web/assets/export-Bn8PqPg4.js +0 -2
  272. package/dist/web/assets/ganttDiagram-6RSMTGT7-CHJeuoAY.js +0 -292
  273. package/dist/web/assets/gitGraphDiagram-PVQCEYII-Dj85554Y.js +0 -106
  274. package/dist/web/assets/highlighted-body-OFNGDK62-DMgPHetp.js +0 -1
  275. package/dist/web/assets/index-7ySDqvaN.css +0 -1
  276. package/dist/web/assets/index-B0KPRi1U.js +0 -166
  277. package/dist/web/assets/index-B599VnpP.js +0 -1
  278. package/dist/web/assets/index-BFK-GypQ.js +0 -1
  279. package/dist/web/assets/index-BPX8gmpB.js +0 -1
  280. package/dist/web/assets/index-BSGYc1tb.js +0 -1
  281. package/dist/web/assets/index-BTt9Q5iv.js +0 -1
  282. package/dist/web/assets/index-BWzUsoY_.js +0 -1
  283. package/dist/web/assets/index-BYlSV3FO.js +0 -3
  284. package/dist/web/assets/index-BpXQ1q-u.js +0 -1
  285. package/dist/web/assets/index-BqPxpGUh.js +0 -1
  286. package/dist/web/assets/index-C8OFfbEs.js +0 -1
  287. package/dist/web/assets/index-CI7yuMGZ.js +0 -1
  288. package/dist/web/assets/index-CJqIcuAl.js +0 -1
  289. package/dist/web/assets/index-CTRJmDep.js +0 -1
  290. package/dist/web/assets/index-CXGCKoId.js +0 -1
  291. package/dist/web/assets/index-CsY571EL.js +0 -13
  292. package/dist/web/assets/index-CwQG_9rB.js +0 -1
  293. package/dist/web/assets/index-D260jsUJ.js +0 -1
  294. package/dist/web/assets/index-DJjmEXx4.js +0 -1
  295. package/dist/web/assets/index-DUxOVxHS.js +0 -1
  296. package/dist/web/assets/index-DxUmR9aV.js +0 -1
  297. package/dist/web/assets/index-GK8aa9pT.js +0 -7
  298. package/dist/web/assets/index-bYtKyBMB.js +0 -1
  299. package/dist/web/assets/index-wxHFHTgD.js +0 -1
  300. package/dist/web/assets/infoDiagram-5YYISTIA-DeDPIdEH.js +0 -2
  301. package/dist/web/assets/mermaid-GHXKKRXX-sDJax95P.js +0 -624
  302. package/dist/web/assets/pdf-C-olXVQ4.js +0 -12
  303. package/dist/web/assets/pieDiagram-4H26LBE5-CrLe1C-O.js +0 -30
  304. package/dist/web/assets/spaces-DqMTtCXX.js +0 -1
  305. package/dist/web/assets/stateDiagram-AJRCARHV-NR9I-Q4d.js +0 -1
  306. package/dist/web/assets/stateDiagram-v2-BHNVJYJU-BiegFWxE.js +0 -1
  307. package/dist/web/assets/theme-6OL1RXgY.js +0 -1
@@ -33,10 +33,31 @@ Reloading a file and applying a setting have different timing:
33
33
  | Setting | When it takes effect |
34
34
  | --- | --- |
35
35
  | [`request_governance`](#request-governance) | Re-evaluates waiting requests and agent admissions as soon as the edit is loaded; active work finishes normally |
36
+ | [`session_access`](#session-access) | Applies immediately; setting `enabled = false` revokes all active tokens and rejects token requests; `terminal_handoff = false` clears tickets, refuses ticket requests and exchange, and revokes terminal-channel tokens without affecting owner-issued tokens |
37
+ | [`cpu_workers`](#cpu-workers) | Next process start; the pool reads the section when the App service is created |
38
+ | [`session_residency`](#session-residency) | The next restore or eviction decision; changing restore limits wakes queued restores, but does not interrupt an active restore. The sweep timer interval is set when the service starts |
39
+ | [`transcript_memory`](#transcript-memory) | The next cache admission, eviction, or residency-maintenance pass; an in-progress read is not canceled |
36
40
  | Session defaults such as `default_model`, `default_permission_mode`, and `default_plan_mode` | New sessions; an existing session keeps its own choices |
37
41
  | [`identity`](#identity) | Next process start |
38
42
  | [`tui.toml`](#tui-toml) | Next start, or `/reload-tui` in the TUI |
39
43
 
44
+ The resource formulas below are resolved from the host hardware when the process starts. Explicit values from `config.toml` or an environment variable override the formula exactly; they are not rewritten to the old upper bounds.
45
+
46
+ ## Hardware-scaled resource defaults
47
+
48
+ When a resource field is omitted, Kiki derives it from the host instead of using one fixed machine size. Let `C = os.availableParallelism()`, `M = floor(totalmem / MiB)`, `H = max(512, floor(M / 64))` MiB, and `W = max(1, min(C - 1, floor(M / 4 / H)))`. The `C - 1` term leaves one parallelism slot for the host, while the minimums keep small machines usable.
49
+
50
+ | Area | Adaptive default | What remains configurable or unchanged |
51
+ | --- | --- | --- |
52
+ | CPU workers | `max_workers = W`; `max_queue = max(128, 16W)`; `max_queued_bytes = max(64, floor(M / 128))` MiB | `KIKI_CPU_MAX_WORKERS`, `KIKI_CPU_MAX_QUEUE`, `KIKI_CPU_MAX_QUEUED_BYTES`, and `KIKI_CPU_TIMEOUT_MS` still override the matching fields. `timeout_ms` remains 30 seconds. The actual pool size is still capped at `C - 1` |
53
+ | Session residency | `max_live_sessions = max(16, floor(M / 128))`; `max_concurrent_restores = W`; `max_queued_restores = max(128, 16C)`; `max_resident_heap_bytes = min(max(256, floor(M / 8)) MiB, 60% of the effective V8 heap)` | Idle and sweep timers remain 10 minutes, 1 minute, and 30 seconds. Explicit session values remain overrides |
54
+ | Worker-backed storage and parsing | SQLite query, mailbox, memory, usage, and kap parser workers use `H` MiB; storage-worker waiting queues default to `max(128, 16C)` | SQLite keeps a single writer; parser backpressure is unchanged |
55
+ | Search | The one query worker uses `H` MiB, keeps 8 active slots, and queues `max(128, 16C)` requests. The indexer child uses `H` MiB with soft RSS `2H + 256` MiB and hard RSS `3H + 256` MiB | Explicit indexer options still win over `KIKI_SEARCH_INDEXER_SOFT_MB` / `KIKI_SEARCH_INDEXER_HARD_MB`, which win over these defaults. Search keeps one writer |
56
+ | Transcript detail | The single-detail cache defaults to `H` MiB | `tail_turns = 20` and `max_agent_bytes = 16` MiB remain unchanged; each single-page read is still independently bounded |
57
+ | Request governance | `max_queue_size = max(1024, 4 × max(128, 16C))` | `rules = []` and the 300-second wait budget remain unchanged. User rules and an explicitly configured queue size still win; this local queue is not a provider rate limit |
58
+
59
+ The resource values in the sections below are explicit override examples, not the hardware defaults. The desktop launcher gives a sidecar an explicit target heap of `max(8192, floor(totalmem / MiB / 4))` MiB. Native SEA profiles use no CLI heap flag and let `NODE_OPTIONS` remain the user's authoritative override. Foreground `serve`, non-login `acp`, and in-process prompt runs (`-p`, `--prompt`, or `--prompt-file`) re-exec at most once when the current heap is below 90% of that target and the user has not supplied a heap override. Default interactive `kiki`, resume/continue, `web`, and `serve --ensure/--query/--stop` are daemon clients and do not auto-restart; newly spawned daemons receive their target before launch. Short-lived commands such as `--version`, tool calls, and completion do not restart. Do not assume one fixed V8 heap size across machines.
60
+
40
61
  `/reload` remains available in the TUI to explicitly reload `config.toml` and `tui.toml`. Settings with a turn or session snapshot use the timing documented in their own section; automatic file reload does not replace an in-progress request.
41
62
 
42
63
  ## Complete example
@@ -105,7 +126,7 @@ pattern = "Bash(rm -rf*)"
105
126
  [[hooks]]
106
127
  event = "PreToolUse"
107
128
  matcher = "Bash"
108
- command = "node ~/.kiki/hooks/check-bash.mjs"
129
+ command = "node \"$KIKI_HOME/hooks/check-bash.mjs\""
109
130
  timeout = 5
110
131
  ```
111
132
 
@@ -123,7 +144,11 @@ kiki_context = []
123
144
  allow_kiki_subagents = false
124
145
  ```
125
146
 
126
- Omit model, effort and permission fields to let the harness choose them. `kiki_context` accepts `memory`, `board`, `cron`, `threads`, `history` and `hooks`; `[]` explicitly disables all groups, and `allow_kiki_subagents = false` explicitly disables delegation. An omitted profile field inherits the harness settings in this execution path. Changing settings does not rewrite an existing binding: select the execution again or explicitly rebuild its context to adopt them.
147
+ Omit model, effort and permission fields to let the harness choose them. `kiki_context` accepts `memory`, `board`, `cron`, `threads`, `history` and `hooks`; `[]` explicitly disables all groups, and `allow_kiki_subagents = false` explicitly disables delegation. An omitted profile field inherits the harness settings in this execution path. Named external role profiles also inherit `defaults.permission_mode` when they do not declare a mode. External permission support and rejected Kiki-only restrictions are described under [direct external execution](../customization/agents-and-subagents.md#direct-external-execution). Changing settings does not rewrite an existing binding: select the execution again or explicitly rebuild its context to adopt them.
148
+
149
+ Every non-native executor descriptor also projects a reserved native target named `engine:<executor-id>`, such as `engine:codex-app-server`, `engine:claude-acp`, `engine:agy-cli` or `engine:grok-acp`. `AgentRun` can use that name as its `profile` to start a child with the engine's own configuration; it does not require a Markdown role profile. Ordinary named role profiles keep their existing behavior. For a bare engine target, model selection is explicit `AgentRun` value → `[agent_executor_overrides."<id>".defaults].model_alias` → the vendor's own default. The model ID is not resolved through Kiki's native `[models]` or provider settings.
150
+
151
+ A bare engine target has no Kiki role, system prompt or profile body by default, and being a child does not by itself open the Kiki MCP bridge. Explicit per-engine defaults remain in force: `inject_kiki_mcp`, `kiki_context`, `allow_kiki_subagents` and `executor_prompt` can still request the corresponding bridge, context or prompt behavior when the engine supports it. The bridge itself is still filtered by the existing tool, path and approval rules.
127
152
 
128
153
  `native_agent` selects the vendor's own agent. It is a session override or a value in these defaults, not a profile field. JSON `null` on the session override clears that choice and inherits the defaults value. Omit it, or set `engine-default`, to keep the vendor's default agent; Kiki then does not send a custom agent selection. A newly chosen value must be one the executor has already advertised. Missing discovery keeps an existing choice when the executor, that agent, and the descriptor revision still match; a discovery list that omits the value is rejected and the current binding stays.
129
154
 
@@ -135,7 +160,7 @@ Kiki's own executor accepts only omission or `engine-default`. AGY CLI's menu cu
135
160
 
136
161
  Through [the REST API](../server/rest-api.md#sessions), update these settings with `POST /api/config` and an `agent_executor_overrides` object. A defaults field set to JSON `null` removes that saved setting; `defaults: null` removes the whole defaults block. TOML has no `null`, so remove the corresponding key when editing the file. Launch settings such as `bin_path`, `home_dir`, `env` and `args` remain separate from defaults.
137
162
 
138
- Display preferences are separate from execution settings. An external engine becomes a new profile or execution choice only when `[agent_executor_overrides.<id>]` sets `show_in_profile_list = true`. A missing field leaves that engine on the settings page and out of new choices. `show_in_profile_list = false` stays off: refresh, a new check, and another import all keep that off. `externals_visible = false` under `[agent_executor_display]` blocks every external engine from new choices. Omitting it, or setting `true`, only opens that gate; engines already set to `false` stay off. Reopening the gate brings back only the engines that are still `true`. `discovery_initialized = true` records that Settings has already run the one-time import check. It does not enable an engine. Native stays in the choices. A profile or session already bound to a hidden or unavailable engine keeps that identity as its current value. Those engines stay available there and do not return to the list of new choices. Hiding a choice does not uninstall an engine, rewrite an existing execution binding, or cancel a task.
163
+ Display preferences are separate from execution settings. An original external-engine entry becomes a new profile or execution choice only when `[agent_executor_overrides.<id>]` sets `show_in_profile_list = true`; [explicitly created instances](#named-harness-instances) are offered unless hidden. A missing field leaves that engine on the settings page and out of new choices. `show_in_profile_list = false` stays off: refresh, a new check, and another import all keep that off. `externals_visible = false` under `[agent_executor_display]` blocks every external engine from new choices. Omitting it, or setting `true`, only opens that gate; engines already set to `false` stay off. Reopening the gate brings back only the engines that are still `true`. `discovery_initialized = true` records that Settings has already run the one-time import check. It does not enable an engine. Native stays in the choices. A profile or session already bound to a hidden or unavailable engine keeps that identity as its current value. Those engines stay available there and do not return to the list of new choices. Hiding a choice does not uninstall an engine, rewrite an existing execution binding, or cancel a task.
139
164
 
140
165
  ```toml
141
166
  [agent_executor_overrides."claude-acp"]
@@ -148,6 +173,67 @@ discovery_initialized = true
148
173
 
149
174
  Send the same snake_case fields in `POST /api/config`. JSON `null` removes only that display preference; launch settings and defaults stay. `GET /api/config` and the write response expose these fields in `raw.agent_executor_overrides` and `raw.agent_executor_display`. `raw.agent_executors` contains configured descriptors, not the shipped engine catalog. `GET /api/executors` reads the latest check and does not probe the program or the login. Check one engine with `POST /api/executors/{id}/check`. Catalog `status: "unknown"` means that engine has no check yet. After 60 seconds the response still carries the previous `check_status` and `checked_at`, with `check_stale: true`. A timeout or failure is recorded on that engine alone. Settings lists every engine for configuration and Check. The first time Settings opens while `discovery_initialized` is not `true`, each external engine is checked once. A `ready` or `warning` result turns on an engine that has no explicit on or off yet, by writing `show_in_profile_list = true`. A failure, a timeout, and an engine already set to `false` stay as they are. Once that import records `discovery_initialized = true`, opening Settings again does not repeat it. A bare execution entry needs all three: a ready program, a confirmed login or the engine's declared API-key environment, and `show_in_profile_list = true`. A saved profile, launch preference, or native Kiki model on its own does not add the engine to new choices.
150
175
 
176
+ ### Named harness instances
177
+
178
+ To use the same harness with separate accounts or proxies, open its entry in **[Settings → Models & agents → Models → Connections](../guides/settings.md#connections) → Command-line agents → External engines** and choose **Add instance**. Give it a name, select the configuration source the harness supports, and choose its proxy. The instance appears as its own engine in the existing execution and profile selectors. Creating one does not change the original entry. Without instance configuration, AGY keeps its single global `agy-cli` entry.
179
+
180
+ Instances reuse their source engine's installation and protocol, including an explicitly chosen program path. AGY CLI instances also inherit `AGY_ACP_SDK_PATH` and `AGY_CLI_PATH` from the original entry's environment overrides as program dependencies. They do not copy its other environment overrides, configuration-home or extra arguments; credentials such as `GEMINI_API_KEY` and proxy overrides stay with the original entry. Each instance has its own model defaults, capability checks and saved execution identity. The global external-engine visibility switch and an explicit per-instance `show_in_profile_list = false` still hide new choices; otherwise creating an instance makes it available for selection when its engine is runnable.
181
+
182
+ ```toml
183
+ [agent_executor_instances.instance-work]
184
+ source_executor = "codex-app-server"
185
+ label = "Work"
186
+ configuration = { kind = "config_directory", path = "C:/accounts/work/codex" }
187
+ proxy = { kind = "url", url = "socks5h://127.0.0.1:1080" }
188
+ ```
189
+
190
+ Use a unique ID beginning with `instance-`. Configuration paths must already exist on the Kiki host. The configuration choices are `inherit`, `config_directory` for a harness with a declared configuration-home variable, `claude_settings` for the official Claude adapter, and `credential_env` for a harness with a declared API-key variable. `credential_env` stores a host environment-variable name, not the key. A Claude settings-file instance loads that file plus project and local settings, skipping the user-level `settings.json`; its login check uses the same file.
191
+
192
+ Proxy `inherit` keeps the host environment, `direct` clears proxy and bypass variables for that child, and `url` accepts an HTTP(S) or SOCKS proxy origin without credentials in the address. Choose **Add proxy authentication** in the instance form to save its username and password. Kiki stores both in `credentials/credentials.toml`, separately from `config.toml`, and loads changes without restarting the service. Explicit proxies keep loopback traffic local. These settings affect only that instance, not Kiki or other engines. The existing `proxy = { kind = "env", name = "WORK_PROXY_URL" }` option still reads a full proxy URL, including credentials, from the Kiki host's environment.
193
+
194
+ To save authentication through `POST /api/config`, send the complete instance entry with `proxy.authorization`:
195
+
196
+ ```json
197
+ {
198
+ "agent_executor_instances": {
199
+ "instance-work": {
200
+ "source_executor": "agy-cli",
201
+ "label": "Work",
202
+ "configuration": { "kind": "inherit" },
203
+ "proxy": {
204
+ "kind": "url",
205
+ "url": "http://127.0.0.1:8080",
206
+ "authorization": { "username": "YOUR_PROXY_USERNAME", "password": "YOUR_PROXY_PASSWORD" }
207
+ }
208
+ }
209
+ }
210
+ }
211
+ ```
212
+
213
+ When updating a URL-proxy instance, omitting `authorization` keeps the saved authentication only if the proxy address stays the same after URL normalization. If you change the address, enter the new proxy's username and password in the same save; otherwise Kiki removes the old authentication. Send JSON `null` to remove authentication without changing the address. Switching to `inherit`, `direct` or `env` also removes it. In a space with shared credentials, removing inherited proxy authentication affects only that space; the base credentials stay unchanged. Public config and executor responses expose only `proxy.has_authorization = true`, never the saved username or password.
214
+
215
+ AGY CLI and Codex app-server also accept **Account from a plugin** when an enabled [plugin](../customization/plugins.md) supplies accounts for that engine. Select a source and account in the instance form. Sign-in, account management and OAuth refresh remain in that plugin. The saved reference is `configuration = { kind = "plugin_account", source = "plugin:example-accounts/accounts", account_id = "YOUR_ACCOUNT_ID" }`, not a credential or connection URL.
216
+
217
+ Plugin-account engines run on the Kiki host. Their proxy choice is passed to the account source as system, direct or custom. For AGY CLI with a loopback source, the engine uses a stable Kiki endpoint; after a confirmed connection failure, a later request receives a replacement connection from the same source, instance and account. A dead lease accepts no new requests and is released after its existing streams finish. Kiki never resends the failed or cancelled request itself, and native continuation retains the conversation and settled tools when its safety checks allow.
218
+
219
+ Codex app-server keeps its original direct connection and launch parameters, including for loopback sources. Models come from the selected account when the engine starts, not from the global engine's catalog. The engine receives only its scoped capability; replacement connection keys stay inside Kiki, and leases are released when the engine exits or startup fails. If an account or source becomes unavailable, **Check** and startup report that instance; Kiki does not switch to another account or the global entry. Update an older source-owned AGY bridge through its existing adapter installation action before using plugin accounts.
220
+
221
+ An existing session keeps its instance identity and configuration revision. After changing an instance's configuration or proxy, create a new session to use the new revision; an old session will not silently resume with a different account. Removing the instance in Settings removes its registration, not the source engine or its account directory. Through `POST /api/config`, set `agent_executor_instances.<instance-id>` to JSON `null` to remove that entry.
222
+
223
+ Every external engine can run as itself, as one named instance, or by letting Kiki pick an instance from comparable quota. The choice is `main`, `auto`, an `instance-…` id, or `{ "account_id": "…" }`. Leave it unset to inherit the next layer. The layers, from lowest to highest, are the engine's own launch, the engine override, the instance, the profile, and the call or session. An explicit `main` replaces a lower `auto`. With nothing configured, a new run uses `main`. The initial main agent stays on native Kiki.
224
+
225
+ ```toml
226
+ [agent_executor_overrides.agy-cli]
227
+ quota_source = "plugin:example-quota/example"
228
+
229
+ [agent_executor_overrides.agy-cli.defaults]
230
+ executor_instance = "auto"
231
+ ```
232
+
233
+ `quota_source` is a sibling of `defaults`. Any enabled plugin can register a source; Kiki does not keep a list of allowed plugins. `main` and a manually chosen instance or account do not read quota. `auto` reads the selected source when a conversation is first bound, then keeps that instance. The source is read at most once per its interval, and the interval is at least five minutes. Restoring a conversation uses the saved instance and does not read quota again. A vendor session is not resumed when its launch home no longer matches.
234
+
235
+ On an instance, `quota_account_id` links the instance to a quota account. `launch` can set `home_dir`, `bin_path`, `env`, `args`, and the configuration or proxy already described above. Kiki selects the instance first, then merges those fields. Omitting a launch field keeps the lower value. `null` clears that field. Environment variables merge by name. An explicit argument list replaces extra arguments. A config update that omits `launch` or `quota_account_id` keeps the saved values; `null` clears them. Omitting `env` inside a sent `launch` object keeps the saved environment values, and `"env": {}` clears them. A profile or call overlay does not rewrite the saved instance. Public responses list environment names and `proxy.has_authorization`. They do not include environment values or proxy passwords.
236
+
151
237
  Custom executor descriptors can read model IDs from a metadata-only command under `[agent_executors.<id>.model_probe]`. For a command whose JSON response contains `command.data.models`, configure:
152
238
 
153
239
  ```toml
@@ -199,7 +285,7 @@ Fields in the config file fall into two categories: **top-level scalars** that d
199
285
  | Field | Type | Default | Description |
200
286
  | --- | --- | --- | --- |
201
287
  | `default_model` | `string` | — | Default model alias; must be defined in `models` |
202
- | `default_permission_mode` | `string` | `auto` | Default for new sessions: `manual` asks for unapproved actions; `auto` approves routine work but asks for protected actions; `review` routes those requests to a reviewer first; `yolo` approves most tool actions, though Git-control paths may still ask |
288
+ | `default_permission_mode` | `string` | `auto` | Default for new sessions: `manual` asks for unapproved actions; `auto` approves routine work but asks for protected actions; `review` routes those requests to a reviewer first; `yolo` approves most tool actions without asking; explicit deny rules still apply |
203
289
  | `default_plan_mode` | `boolean` | `false` | Whether new sessions start in Plan mode (produce a plan before executing) by default |
204
290
  | `merge_all_available_skills` | `boolean` | `true` | Whether to merge Agent Skills from all available directories |
205
291
  | `extra_skill_dirs` | `array<string>` | — | Extra skill search directories, layered on top of the default directories |
@@ -229,6 +315,7 @@ Fields in the config file fall into two categories: **top-level scalars** that d
229
315
  | `nb_search` | `table` | — | Built-in search and retrieval module behind `WebSearch` and `FetchURL` → [`nb_search`](#nb-search) |
230
316
  | `permission` | `table` | — | Permission rules and reviewer → [`permission`](#permission) |
231
317
  | `interaction` | `table` | — | Whether agent questions block the turn → [`interaction`](#interaction) |
318
+ | `session_access` | `table` | Both settings default to `true` | Session access tokens and their terminal-handoff status → [`[session_access]`](#session-access) |
232
319
  | `hooks` | `array<table>` | — | Lifecycle hooks; see [Hooks](../customization/hooks.md) |
233
320
  | `identity` | `table` | — | Custom agent identity → [`identity`](#identity) |
234
321
  | `prompt` | `table` | `{}` | Prompt field overrides and custom variables → [`prompt`](#prompt) |
@@ -267,7 +354,7 @@ Each entry in the `models` table defines a model alias (the name used in `defaul
267
354
  | --- | --- | --- | --- |
268
355
  | `provider` | `string` | Yes | Name of the provider to use; must be defined in `providers` |
269
356
  | `model` | `string` | Yes | Model identifier sent to the server when calling the API |
270
- | `pricing_model` | `string` | No | Canonical model used to estimate usage cost, independent of the upstream model ID; for example, a proxy alias can bill as `gpt-6-sol`. An unavailable price remains unknown; this never changes the model sent to the provider |
357
+ | `pricing_model` | `string` | No | Canonical billing name for local usage cost and the content-free usage export model name. Letters, digits, and `.` `_` `:` `/` `-`, up to 160 characters, are used even outside the built-in public model list. When the name is an exact price-catalog key whose first segment equals that entry's provider, and the rest is a single model id, export uses the model id (`gemini/gemini-4-argon` exports as `gemini-4-argon`). Any other explicit name is exported as written. Empty keeps the current inference. This does not change the model sent to the provider, the alias, or the display name. Recorded usage for a removed model stays and falls back without adding a model entry |
271
358
  | `max_context_size` | `integer` | Yes | Maximum context length in tokens; must be at least 1 |
272
359
  | `max_input_size` | `integer` | No | Declared per-request input limit when it sits below the total window (e.g. gpt-5: 400k window, 272k input). Compaction, context-overflow checks, and usage ratios prefer it; completion budgeting keeps the total window. Resolution clamps it to `max_context_size` |
273
360
  | `max_output_size` | `integer` | No | Per-request output token cap (maps to `max_tokens`). Currently only the `anthropic` provider honors it. When set for a Claude model, this explicit value overrides the built-in server-side maximum |
@@ -278,6 +365,7 @@ Each entry in the `models` table defines a model alias (the name used in `defaul
278
365
  | `request_params` | `table` | No | Extra request parameters merged into every request for this model (for example `temperature`, `top_p`); values may be strings, numbers, or booleans. Layered values merge by key |
279
366
  | `context_budget` | `integer` | No | Upper bound (tokens) applied to the model's effective context window; never above the model's real capacity. Layered values take the smallest |
280
367
  | `auto_compact` | `integer` | No | Automatic compaction point in absolute tokens for this model. A closer profile or session value takes precedence; this does not change the model's context limit. Also accepted under this model's `overrides` table |
368
+ | `context_strategy` | `string` | No | Automatic compaction strategy for this model: `auto`, `summarize`, or `fresh`. A closer profile or session value takes precedence; omit to inherit the global strategy. Also accepted under this model's `overrides` table |
281
369
  | `max_completion_tokens` | `integer` | No | Upper bound on per-request completion tokens. Layered values take the smallest, within the model's output cap |
282
370
  | `off_effort` | `string` | No | Effort value sent on the wire to disable thinking (e.g. `none` for xai grok). Only meaningful for models that declare such an encoding (catalog imports set it): turning thinking Off then sends this value instead of omitting the effort field — the only way to actually stop reasoning on models that reason by default |
283
371
  | `protocol` | `string` | No | Request format for this model: `anthropic`, `openai`, `openai_responses`, or `google-genai`. Resolution uses this field, then the provider type when that type is one of these four, then the vendor base format. A value that differs from the provider type is a valid gateway choice. Not accepted in `overrides`; writing it there raises a warning and is not applied |
@@ -301,7 +389,7 @@ max_context_size = 1048576
301
389
 
302
390
  ### Legacy model parameter migration
303
391
 
304
- Older configurations put `temperature` / `top_p` and `max_completion_tokens` / `service_tier` in different places. **Settings → Models & providers → Available models → Legacy model parameter migration** can copy them into a model's `parameters` table.
392
+ Older configurations put `temperature` / `top_p` and `max_completion_tokens` / `service_tier` in different places. **[Settings → Models & agents → Models → Connections](../guides/settings.md#connections) → Maintenance → Legacy model parameter migration** can copy them into a model's `parameters` table.
305
393
 
306
394
  **Preview migration** first, which lists the model aliases, parameter names, review reasons, a revision and the backup name it would use, and writes nothing. Unambiguous values are copied; ambiguous or conflicting ones are left for you to decide. Your existing fields are not removed, so read the preview instead of assuming anything changed.
307
395
 
@@ -355,7 +443,7 @@ max_context_size = 131072
355
443
  display_name = "Kimi for Coding (custom)"
356
444
  ```
357
445
 
358
- `[models."<alias>".overrides]` accepts ordinary model fields such as `max_context_size`, `max_input_size`, `max_output_size`, `capabilities`, `display_name`, `reasoning_key`, `adaptive_thinking`, `support_efforts`, `default_effort`, `off_effort`, `service_tier`, `request_params`, `context_budget`, `auto_compact`, and `max_completion_tokens`. It does not accept identity or routing fields: `provider`, `model`, `protocol`, `beta_api` and `base_url`. Writing one of those fields there raises a warning when the config loads and does not change the model; set it on the model itself. The model settings page names that warning and shows whether the effective format, endpoint, and credential come from the model, the provider, or an environment variable. It does not show the key or the endpoint address.
446
+ `[models."<alias>".overrides]` accepts ordinary model fields such as `max_context_size`, `max_input_size`, `max_output_size`, `capabilities`, `display_name`, `reasoning_key`, `adaptive_thinking`, `support_efforts`, `default_effort`, `off_effort`, `service_tier`, `request_params`, `context_budget`, `auto_compact`, `context_strategy`, and `max_completion_tokens`. It does not accept identity or routing fields: `provider`, `model`, `protocol`, `beta_api` and `base_url`. Writing one of those fields there raises a warning when the config loads and does not change the model; set it on the model itself. The model settings page names that warning and shows whether the effective format, endpoint, and credential come from the model, the provider, or an environment variable. It does not show the key or the endpoint address.
359
447
 
360
448
  Recipes can change supported model prompts and generation parameters, but not the model's provider, request format, endpoint, or credentials. A routing field in a Recipe is rejected; set it on the model itself instead. This also applies to programmatic model-settings overlays, including nested routing fields in `overrides`.
361
449
 
@@ -375,7 +463,7 @@ You can also switch models temporarily without touching the config file — by s
375
463
  | `steering_on_turn` | `boolean` | `true` | Inject on a new user-source turn and after compaction re-arms its context |
376
464
  | `steering_on_input` | `boolean` | `true` | Inject after newly accepted human input, including in-turn Send now corrections |
377
465
  | `steering_interval_steps` | `integer` | `0` | Repeat every N model steps driven by user input; nonnegative, with `0` disabling periodic steering |
378
- | `steering_sources` | `table` | verified child completions inherit; other sources off | Per-source `mode`: `off`, `inherit` (use user settings), or `custom` (separate body and cadence) |
466
+ | `steering_sources` | `table` | verified child completions and a new thread's first instruction inherit; other sources off | Per-source `mode`: `off`, `inherit` (use user settings), or `custom` (separate body and cadence) |
379
467
  | `anchor` | `{text: string}`, `string` or `array<string>` | — | Body used as the complete system prompt for the opening steps of a turn, replacing the profile prompt and any `overlay` |
380
468
  | `anchor_steps` | `integer` | `1` | How many model requests at the start of an anchored turn use the `anchor` text; must be at least 1 |
381
469
  | `anchor_scope` | `string` | `session` | `session` anchors only the session's first turn; `turn` anchors the opening steps of every turn |
@@ -405,9 +493,9 @@ Usage differences on `main` and `independent` are not that copy. `thinking_effor
405
493
 
406
494
  Paths are relative to the [data root directory](./data-locations.md#data-root-directory) (`~/.kiki` by default). Absolute paths, paths that resolve outside the data root (including through a symlink), and missing files are rejected when the profile binds, with an error naming the field and the path. A declared file that exists but is empty is skipped; when every file declared for one field is empty, that field behaves as unset. Reading the model does not alter these files. Explicitly saving an edited file-backed slot as `{text}` stores a body in the model instead, leaving the original files unchanged; restore their original path references to use them again. Existing sessions keep their frozen text until an explicit context rebuild or model change.
407
495
 
408
- The three text slots differ in how far they sit from the model's next token. `overlay` and `anchor` rewrite the system prompt, which the model reads before your request. `steering` follows your input as an ordinary user message — not a `<system-reminder>`. Its body and cadence apply to direct user messages, including queued input, **Send now**, user-slash skills and plugin commands. Verified completed subagent-task receipts inherit that steering by default; an explicit `steering_sources.task.mode = "off"` still wins. Ordinary process results, failed child tasks and other non-user sources remain off unless enabled in `steering_sources`. A retry keeps the original input's source.
496
+ The three text slots differ in how far they sit from the model's next token. `overlay` and `anchor` rewrite the system prompt, which the model reads before your request. `steering` follows your input as an ordinary user message — not a `<system-reminder>`. Its body and cadence apply to direct user messages, including queued input, **Send now**, user-slash skills and plugin commands. Verified completed subagent-task receipts inherit that steering by default; an explicit `steering_sources.task.mode = "off"` still wins. A new thread's first instruction (`thread_create`) also inherits it when `steering_sources.thread` is unset; an explicit `off`, `inherit`, or `custom` on `thread` still wins, and later peer or bridged-peer messages stay off until `thread` is enabled. Ordinary process results, failed child tasks and other non-user sources remain off unless enabled in `steering_sources`. A retry keeps the original input's source.
409
497
 
410
- Choose `mode = "inherit"` to use the steering body and timing already in effect for user messages on the selected identity, or `mode = "custom"` to use `custom.steering`, `custom.steering_on_turn`, `custom.steering_on_input` and `custom.steering_interval_steps`. Custom bodies accept the same inline, path and path-array forms; a missing custom body does not inherit user text. `off` and `inherit` retain a saved custom draft. Source keys are `thread` (peer messages and model-created threads), `room`, `agent` (child messages and parent notifications), `task`, `cron`, `hook`, `automation` (automatic goal continuation), `skill` (model-tool activation) and `external` (external-client thread input). Unknown sources remain off; delivery through Send now does not turn another source into user input.
498
+ Choose `mode = "inherit"` to use the steering body and timing already in effect for user messages on the selected identity, or `mode = "custom"` to use `custom.steering`, `custom.steering_on_turn`, `custom.steering_on_input` and `custom.steering_interval_steps`. Custom bodies accept the same inline, path and path-array forms; a missing custom body does not inherit user text. `off` and `inherit` retain a saved custom draft. Source keys are `thread` (peer messages, and model-created threads — the first instruction inherits user steering when this source is unset), `room`, `agent` (child messages and parent notifications), `task`, `cron`, `hook`, `automation` (automatic goal continuation), `skill` (model-tool activation) and `external` (external-client thread input). Unknown sources remain off; delivery through Send now does not turn another source into user input.
411
499
 
412
500
  ```toml
413
501
  [models."example-model".cognition.steering_sources.thread]
@@ -486,7 +574,7 @@ the bound model's `overrides.default_effort` → its `default_effort` → global
486
574
 
487
575
  ## `model_switch`
488
576
 
489
- `[model_switch]` decides what happens to the current context when you change models. The desktop control is **Model switching** under **Settings → Models & providers → Defaults**; this table is the saved configuration.
577
+ `[model_switch]` decides what happens to the current context when you change models. The desktop control is **Model switching** under **[Settings → Models & agents → Models → Defaults](../guides/settings.md#models-and-recipes)**; this table is the saved configuration.
490
578
 
491
579
  | Field | Type | Default | Description |
492
580
  | --- | --- | --- | --- |
@@ -541,19 +629,23 @@ A partial update changes only the fields you send. `POST /api/config` with `{ "m
541
629
  | `zero_output_continuation` | `boolean` | `false` | Send one explicit `Continue.` user message when a normal completion has no thinking text, visible text, or tool call |
542
630
  | `reserved_context_size` | `integer` | `50000` | Tokens reserved above the automatic compaction point for model output |
543
631
  | `auto_compact` | `string` | — | Global default compaction point as a percentage of the model's usable context (e.g. `"85%"`). This layer does not accept token counts; model, profile, and session settings use positive integer tokens |
632
+ | `context_strategy` | `string` | `"summarize"` | Global default compaction strategy for the main agent: `auto`, `summarize`, or `fresh` |
633
+ | `subagent_context_strategy` | `string` | `"summarize"` | Global default compaction strategy for subagents when neither the profile nor the model specifies `context_strategy`: `auto`, `summarize`, or `fresh` |
544
634
  | `compaction_trigger_ratio` | `number` | `0.85` | Legacy trigger ratio, used only when no `auto_compact` is set at any layer |
545
635
  | `compaction_soft_context_size` | `integer` | `0` | Legacy absolute token ceiling, used only when no `auto_compact` is set at any layer |
546
- | `compaction_max_attempts` | `integer` | `3` | Maximum total requests for a failing compaction, including the initial attempt; all recovery paths share this budget |
636
+ | `compaction_max_attempts` | `integer` | `3` | Maximum compaction-loop summary attempts, including the initial attempt; stream interruptions and overflow recovery share this budget. The requester separately handles OAuth/projection recovery and opt-in pre-output infinite retries |
547
637
 
548
- The compaction point resolves in this order: the session's per-model token override, a matching `model_profiles` entry, the profile's top-level value, the model alias, then this global percentage. With no `auto_compact` set anywhere, the previous threshold applies: `min(0.85 × usable context, usable context − 50000, positive compaction_soft_context_size)`, using your explicit legacy ratio in place of 0.85. Saving a new global value converts the current model's token point to a percentage and drops the old ratio and soft-ceiling keys — after which a legacy absolute ceiling no longer means the same thing on models of different sizes. The change applies before the next model step, and `/autocompact` shows the current session value.
638
+ The compaction point resolves in this order: the session's per-model token override, a matching `model_profiles` entry, the profile's top-level value, the model alias, then this global percentage. Compaction strategy follows the same precedence for the main agent (session override, matching `model_profiles` entry, profile top-level value, model alias, then `loop_control.context_strategy`) and for subagents (matching `model_profiles` entry, profile top-level value, model alias, then `loop_control.subagent_context_strategy`); external executors always use `summarize`. With no `auto_compact` set anywhere, the previous threshold applies: `min(0.85 × usable context, usable context − 50000, positive compaction_soft_context_size)`, using your explicit legacy ratio in place of 0.85. Saving a new global value converts the current model's token point to a percentage and drops the old ratio and soft-ceiling keys — after which a legacy absolute ceiling no longer means the same thing on models of different sizes. The change applies before the next model step, and `/autocompact` shows the current session value.
549
639
 
550
640
  `max_steps_per_turn` can be overridden by the `KIKI_LOOP_MAX_STEPS_PER_TURN` environment variable, and `max_attempts_per_step` by `KIKI_LOOP_MAX_ATTEMPTS_PER_STEP`; both take higher priority than the config file.
551
641
 
552
- Retries only apply to transient failures — connection errors, timeouts, HTTP 429 rate limits, and eligible HTTP 500–599 server errors. Partial output, safety refusals, and exhausted quota stop rather than replaying the request.
642
+ Retries apply to transient failures — connection errors, timeouts, HTTP 429 rate limits, and eligible HTTP 500–599 server errors. Partial output normally stops rather than replaying the request; for native agent turns, a connection interruption after output can be retried when `[retry].retry_partial_responses` is `true` (the default). HTTP 429 or 500–599 failures after output, safety refusals, and exhausted quota still stop without replaying the request.
643
+
644
+ When a provider confirms a normal end with non-empty thinking but no answer, tool call, or refusal, Kiki keeps the thinking and its signature and sends a `Continue.` user message once per consecutive run of thinking-only responses. A successful step with an answer or tool call resets this budget. A gateway's exact `antigravity_thinking_only` event can also qualify, but only when Kiki retained the actual thinking and confirmed that no other output, grounding, or refusal occurred. Cancellation, missing terminal events, interrupted streams, and token-limit stops do not qualify. The follow-up counts as a real model request with its own usage. A second empty response or failure stops the turn—even HTTP 429 or a temporary server error is not retried for this follow-up.
553
645
 
554
- When a provider confirms a normal end with non-empty thinking but no answer, tool call, or refusal, Kiki keeps the thinking and its signature and sends a `Continue.` user message at most once per turn. A gateway's exact `antigravity_thinking_only` event can also qualify, but only when Kiki retained the actual thinking and confirmed that no other output, grounding, or refusal occurred. Cancellation, missing terminal events, interrupted streams, and token-limit stops do not qualify. The follow-up counts as a real model request with its own usage. A second empty response or failure stops the turn—even HTTP 429 or a temporary server error is not retried for this follow-up.
646
+ Set `[loop_control] thinking_only_continuation = false` to disable this automatic message. Changes apply at the next step boundary. Google models that reject a trailing model turn keep their existing original-snapshot retry; it shares the same one-recovery-per-consecutive-run budget and is not disabled by this setting. For a Google `CONTINUATION` response with a complete continuation token, the provider sends the next request itself; without a usable token, the turn stops with the partial response kept.
555
647
 
556
- Set `[loop_control] thinking_only_continuation = false` to disable this automatic message. Changes apply at the next step boundary. Google models that reject a trailing model turn keep their existing original-snapshot retry; it shares the same one-recovery-per-turn budget and is not disabled by this setting. Google `CONTINUATION` stops still require a continuation token that this SDK cannot send.
648
+ After `SendMessage` confirms user delivery, a main agent's tool-result continuation can end quietly on a normal completed response with only thinking or no output. Kiki preserves the thinking without another recovery request; eligible clean empty-response or thinking-only provider errors also close the turn. This does not apply to child agents, interrupted partial responses, or Google `CONTINUATION` responses without a usable token.
557
649
 
558
650
  `zero_output_continuation` stays off when omitted or set to `false`. Set `[loop_control] zero_output_continuation = true` to send one `Continue.` user message after a provider confirms a normal completion whose thinking text, visible answer, and tool calls are all empty. A signature attached to empty thinking is not thinking content and stays in the conversation. Non-empty redacted thinking data is output. Non-empty thinking text still uses `thinking_only_continuation`. A child agent uses the same rule; while the switch is off, a child completion with no content still fails, and a second empty completion stops the turn. Token counts do not decide this. The choice applies at the next step boundary. That follow-up is one model request in the same turn and is not retried as a connection or rate-limit error. Cancellation, provider errors, and a stream that ends without a normal stop stay on their existing paths.
559
651
 
@@ -599,11 +691,16 @@ New sessions keep changing date, directory listings, workspace instructions and
599
691
 
600
692
  ## `retry`
601
693
 
602
- `retry` customizes the total attempt budget and fixed backoff for selected step errors. By default, a retryable step gets five total attempts, with waits of 2, 4, 8, and 16 seconds plus up to 25% jitter (30–37.5 seconds in total). A provider `Retry-After` value or a matching policy's fixed `backoff` replaces the corresponding default wait. Policies can also target exact model and provider configuration keys, so one provider's temporary failures do not change retry behavior elsewhere. The section and each policy are strict: an unknown field is rejected rather than silently ignored.
694
+ `retry` customizes the total attempt budget and fixed backoff for selected step errors, Output Layer transformations, and session title requests. By default, each retryable operation gets five total attempts, with waits of 2, 4, 8, and 16 seconds plus up to 25% jitter (30–37.5 seconds in total). For retryable gateway HTTP 502/503/504 failures without confirmed execution, a provider `Retry-After` value can lengthen but not shorten the default exponential wait. An explicit policy `backoff` keeps its fixed delay, with `Retry-After` taking precedence; other errors also keep their existing `Retry-After` behavior. Policies can also target exact model and provider configuration keys, so one provider's temporary failures do not change retry behavior elsewhere. The section and each policy are strict: an unknown field is rejected rather than silently ignored.
695
+
696
+ `retry_partial_responses` defaults to `true`. Set it to `false` to disable only native agent turn retries after partial output; eligible failures before the first token keep the existing bounded retry budget. A gateway error marked `gateway_stream_terminal_error` stops the request even before the first token, regardless of retry settings. Eligible connection retries are capped at five total attempts, including the initial request; `max_attempts` or a matching policy can lower that cap. Other protocols discard partial output. Google GenAI keeps visible text and thinking summaries pending, reuses only exact visible prefixes, and retracts divergent or prematurely truncated blocks. It uses a complete continuation token only when no later output has moved past that checkpoint; otherwise it retries the original request snapshot. Tools run only after a complete response, and retries may incur additional charges.
697
+
698
+ For an uncommitted native turn step, malformed function calls (`antigravity_malformed_function_call` or `MALFORMED_FUNCTION_CALL`) and `antigravity_missing_terminal` before any answer, media, or tool call get at most three total attempts. Missing-terminal retries discard thinking, including signatures on empty thinking, but leave visible partial answers for normal failure handling. These exact cases can retry despite a gateway's `retryable: false`; a smaller attempt budget, an explicit retry veto, cancellation, and `retry_partial_responses = false` after observed output still apply. No `Continue.` message is added, and completed tools are not replayed.
603
699
 
604
700
  | Field | Type | Default | Description |
605
701
  | --- | --- | --- | --- |
606
- | `max_attempts` | `integer` | — | Maximum total attempts for a failing step, including the initial attempt; overrides `loop_control.max_attempts_per_step` |
702
+ | `max_attempts` | `integer` | — | Maximum total attempts, including the initial attempt; for agent steps, overrides `loop_control.max_attempts_per_step` |
703
+ | `retry_partial_responses` | `boolean` | `true` | Whether an eligible native agent turn may retry after partial output has streamed |
607
704
  | `policies` | `array<table>` | — | Ordered per-error policies written as `[[retry.policies]]`; the first matching policy applies |
608
705
 
609
706
  Each `[[retry.policies]]` entry has these fields:
@@ -630,7 +727,25 @@ max_attempts = 20
630
727
  backoff = 15000
631
728
  ```
632
729
 
633
- Replace `gemini-4-argon` and `google-native` with the exact keys used in your `[models]` and `[providers]` tables. The `backoff` applies only when the provider does not send `Retry-After`. The policy does not make HTTP 400, exhausted quota, partial output, or already-executed failures retryable; `retry = true` never overrides Kiki's non-retryable classification.
730
+ Replace `gemini-4-argon` and `google-native` with the exact keys used in your `[models]` and `[providers]` tables. The `backoff` applies only when the provider does not send `Retry-After`. A model stream that ends without its protocol's completion event is a connection failure, not a successful partial answer. With partial output, the bounded recovery cases above still apply; this policy does not add retries for HTTP 429 or 500–599 failures after output or other ineligible provider failures. Other protocols discard the failed attempt's output; Google GenAI applies the checkpoint and exact-prefix rules above and retracts divergent or prematurely truncated blocks. Native tools run only after a complete response, and the failed generation may incur additional charges. The policy does not make HTTP 400, exhausted quota, or already-executed failures retryable; `retry = true` never overrides Kiki's non-retryable classification.
731
+
732
+ ## `session_residency`
733
+
734
+ Session restoration uses a process-wide queue, shared across workspaces. Empty sessions without an agent or main wire bypass this queue. Idle-session reclamation runs before acquiring a restore slot, so unloading a slow session does not occupy one.
735
+
736
+ | Field | Type | Default | Description |
737
+ | --- | --- | --- | --- |
738
+ | `idle_ttl_ms` | integer, 0–2147483647 | `600000` (10 minutes) | Minimum idle age before the periodic sweep can unload a session when the live-session capacity is not under pressure |
739
+ | `max_live_sessions` | positive integer | `max(16, floor(M / 128))` | Live-session capacity. When the process is at or above this capacity, idle sessions use `min_idle_ms` as the quicker reclamation threshold |
740
+ | `min_idle_ms` | integer, 0–2147483647 | `60000` (1 minute) | Minimum idle age used while live-session capacity or heap pressure requires reclamation |
741
+ | `sweep_interval_ms` | integer, 1000–2147483647 | `30000` (30 seconds) | Periodic eviction check interval |
742
+ | `max_concurrent_restores` | positive integer | `W` | Concurrent cold-session restores. Raising it takes effect without restarting and immediately wakes queued restores. Lowering it leaves current restores running |
743
+ | `max_queued_restores` | non-negative integer | `max(128, 16C)` | Maximum waiting restores; additional requests fail with a queue-full error |
744
+ | `max_resident_heap_bytes` | non-negative integer | `min(max(256, floor(M / 8)) MiB, 60% of the effective V8 heap)` | Heap-pressure threshold for idle-session reclamation. `0` disables this heap trigger, but capacity and idle-time rules still apply |
745
+
746
+ The timer fields use Node's maximum timer delay of `2147483647` milliseconds. Explicit values are not capped at the former `64`-session, `4`-restore, or `64`-queued-restore schema limits.
747
+
748
+ Each restore has a 60-second deadline, including its queue wait. A timed-out restore releases its slot; a saved message remains available for retry or cancellation. See [durable prompt recovery](../server/rest-api.md#prompts) for message state and GUI recovery actions.
634
749
 
635
750
  ## `transcript_memory`
636
751
 
@@ -640,9 +755,9 @@ Replace `gemini-4-argon` and `google-native` with the exact keys used in your `[
640
755
  | --- | --- | --- | --- |
641
756
  | `tail_turns` | positive integer | `20` | How many finished turns stay resident per agent |
642
757
  | `max_agent_bytes` | positive integer | `16777216` (16 MiB) | Per-agent resident byte budget — what stays in memory. Older turns are read from disk on demand |
643
- | `max_detail_cache_bytes` | non-negative safe integer | `268435456` (256 MiB) | Largest single full-detail read cached at once. `0` turns that extra slot off, leaving the content to be read without being held in that cache. A changed value takes effect at the next cache admission or eviction; lowering it evicts what no longer fits, and does not cancel a read already in progress |
758
+ | `max_detail_cache_bytes` | non-negative safe integer | `H` MiB | Largest single full-detail read cached at once. `0` turns that extra slot off, leaving the content to be read without being held in that cache. A changed value takes effect at the next cache admission or eviction; lowering it evicts what no longer fits, and does not cancel a read already in progress |
644
759
 
645
- These are server-side memory budgets, not read limits. Lowering them reduces memory use and may mean reading the same content from disk again.
760
+ `H` is the hardware-derived worker heap from [hardware-scaled resource defaults](#hardware-scaled-resource-defaults). These are server-side memory budgets, not read limits. Lowering them reduces memory use and may mean reading the same content from disk again.
646
761
 
647
762
  ## `token_counting`
648
763
 
@@ -664,7 +779,7 @@ These are server-side memory budgets, not read limits. Lowering them reduces mem
664
779
  | `keep_alive_on_exit` | `boolean` | `false` | Whether to keep still-running background tasks when the session closes. By default, Kiki requests that all background tasks stop before the process exits; set this to `true` only when you want tasks to outlive the session. In print mode (`kiki -p`), this is only a legacy fallback used when `print_background_mode` is unset: `true` is equivalent to `print_background_mode = "drain"` |
665
780
  | `kill_grace_period_ms` | `integer` | `5000` | Grace period in milliseconds after session close, a manual stop, or a task timeout requests graceful termination. If a task is still running after this period, Kiki attempts to force-stop it |
666
781
  | `bash_auto_background_on_timeout` | `boolean` | `true` | When a foreground `Bash` command hits its timeout, move it to a background task instead of killing it — the agent is notified when it completes, and the backgrounded command is bounded by the `bash_task_timeout_s` default background timeout. Set to `false` to kill timed-out foreground commands instead |
667
- | `bash_file_tool_hints` | `boolean` | `true` | Append a brief dedicated-tool hint when a `Bash` command only reads, searches, or writes a text file. Commands still execute normally; set to `false` to suppress hints |
782
+ | `bash_file_tool_hints` | `boolean` | `false` | Append a brief dedicated-tool hint when a `Bash` command only reads, searches, or writes a text file. Commands still execute normally; set to `true` to turn the hints on |
668
783
  | `bash_task_timeout_s` | `integer` | `600` | Default timeout (seconds) for background `Bash` tasks when the call omits `timeout`; also used to re-arm foreground commands moved to the background on timeout. `0` means no timeout — the task runs until it exits or the model stops it. Explicit per-call `timeout` values are unaffected. In print mode (`kiki -p`) the default is `0` unless explicitly set |
669
784
  | `print_background_mode` | `"exit" \| "drain" \| "steer"` | `"steer"` | Print mode (`kiki -p`) only. Governs how pending background tasks are handled once the main agent's turn ends: `"exit"` exits immediately; `"drain"` waits for every background task to reach a terminal state before exiting (results are not fed back to the main agent); `"steer"` stays alive so a completing background task — like a background subagent — injects a synthetic user message that steers the main agent into a new turn, looping until a turn ends with no pending background tasks or a limit is hit. Takes precedence over the `keep_alive_on_exit` print fallback |
670
785
  | `print_wait_ceiling_s` | `integer` | `2147483` | In print mode (`kiki -p`), the wall-clock ceiling (seconds) for the wait/steer loop when `print_background_mode` is `"drain"` or `"steer"` (the default is ~24.8 days — effectively unbounded). Has no effect outside print mode or when it is `"exit"` |
@@ -674,16 +789,52 @@ These are server-side memory budgets, not read limits. Lowering them reduces mem
674
789
 
675
790
  In print mode (`kiki -p "<prompt>"`), Kiki stays alive after the main agent's turn as long as background tasks are still pending: each completion is fed back to the main agent as a synthetic user message, steering it into a new turn (`print_background_mode = "steer"` by default), and the run exits once a turn ends with nothing pending. The loop is bounded by `print_wait_ceiling_s` and `print_max_turns`, both effectively unbounded by default. Background work is never killed by a wall-clock cap in print mode either: background `Bash` tasks default to no timeout (`bash_task_timeout_s = 0`), and subagents run without a timeout (`[subagent] timeout_ms = 0`), so only the model itself stops a task. Set `print_background_mode` to `"drain"` to wait for tasks without feeding results back, or `"exit"` to end the run as soon as the main agent finishes.
676
791
 
792
+ ## `cron`
793
+
794
+ `cron` controls the built-in scheduler (`Cron` tool and `/api/cron`) and registers owner-approved scripts that scheduled tasks can run before waking the model.
795
+
796
+ | Field | Type | Default | Description |
797
+ | --- | --- | --- | --- |
798
+ | `disabled` | `boolean` | `false` | Disable all scheduled cron firing and new `Cron` creations (`KIKI_DISABLE_CRON=1` overrides) |
799
+ | `no_jitter` | `boolean` | `false` | Disable deterministic schedule jitter (`KIKI_CRON_NO_JITTER=1` overrides) |
800
+ | `no_stale` | `boolean` | `false` | Disable the 7-day auto-expiry for recurring tasks (`KIKI_CRON_NO_STALE=1` overrides) |
801
+ | `poll_interval_ms` | `integer \| null` | `600000` (10 min) | Full-inventory safety refresh interval in milliseconds (`0` or `null` disables automatic firing; `KIKI_CRON_POLL_INTERVAL_MS` overrides) |
802
+ | `scripts` | `object[]` | — | Owner-registered trigger scripts (`[[cron.scripts]]`) available to `trigger.script` in matching workspaces |
803
+
804
+ Each `[[cron.scripts]]` entry defines one script ID:
805
+
806
+ | Field | Type | Default | Description |
807
+ | --- | --- | --- | --- |
808
+ | `id` | `string` | required | Unique script ID matching `^[a-z][a-z0-9-]{0,63}$` |
809
+ | `command` | `string` | required | Absolute path to the executable (on Windows, must end in `.exe`) |
810
+ | `args` | `string[]` | `[]` | Fixed argument array passed directly to the executable without a shell |
811
+ | `workspaces` | `string[]` | required | Non-empty list of absolute workspace root paths allowed to use this script |
812
+ | `timeout` | `integer` | `10` | Per-check timeout in seconds (`1`–`60`) |
813
+
814
+ ```toml
815
+ [[cron.scripts]]
816
+ id = "inbox-gate"
817
+ command = "/usr/local/bin/node"
818
+ args = ["/Users/alice/.kiki/scripts/inbox-gate.mjs"]
819
+ workspaces = ["/Users/alice/projects/assistant"]
820
+ timeout = 10
821
+ ```
822
+
823
+ Registering an entry under `[[cron.scripts]]` makes its `id` selectable for matching workspaces; it does not run the script by itself. When a schedule is created or updated with `trigger.script`, the owner approves the resolved `{ command, args, cwd, timeout, environment: "isolated" }` snapshot (via the `Cron` tool approval prompt or `script_confirmation` in [`POST /api/cron`](../server/rest-api.md#background-tasks)). If you later edit `command`, `args`, `workspaces`, or `timeout` in `config.toml`, existing tasks keep their previous snapshot and stop passing authorization (`not_authorized`) until recreated or re-approved. See [Scheduled tasks](../reference/tools.md#scheduled-tasks) for `trigger` examples and exit-code semantics.
824
+
677
825
  ## `subagent`
678
826
 
679
- `subagent` controls how spawned subagents (`AgentRun`) run. Role selection uses the profile's [`can_spawn_subagents`, `allowed_subagents`, `preferred_subagents`, and `deny_subagents`](../customization/agents-and-subagents.md#agent-file-format); the former host dispatch-policy settings are removed.
827
+ `subagent` controls how spawned subagents (`AgentRun`) run. Role selection uses the profile's [`can_spawn_subagents`, `allowed_subagents`, `preferred_subagents`, and `deny_subagents`](../customization/agents-and-subagents.md#agent-file-format); the former host dispatch-policy settings are removed. Reserved native engine targets such as `engine:claude-acp` are ordinary stable target names for these checks: an explicit `allowed_subagents` list must include the exact `engine:<executor-id>` name to permit that child. Projecting a target from an executor descriptor never widens an existing allowlist.
680
828
 
681
829
  | Field | Type | Default | Description |
682
830
  | --- | --- | --- | --- |
683
831
  | `default_profile` | `string` | built-in general-purpose prompt | Explicit profile override when `AgentRun` omits `profile`, `route`, and `profile_file`. If the key is absent, including from a partial `[subagent]` table, `AgentRun` uses the built-in general-purpose subagent prompt without loading a catalog profile. Set `""` to require an explicit target (strict mode) |
684
- | `default_model` | `string` | — | Explicit fallback only when neither a dispatch parameter nor an effective profile, route, or caller-lease pin selects a model; never inherits the caller |
832
+ | `default_model` | `string` | — | Static fallback only when neither a dispatch parameter nor an effective profile, route, or caller-lease pin selects a model; never inherits the caller |
833
+ | `model_selection` | `"static"` or `"auto"` | `"static"` | Selection mode for new children when `AgentRun` omits `model_alias`. The target profile's `model_selection` overrides this default; a concrete dispatch alias always wins |
834
+ | `auto_model` | `table` | equal weights | Automatic selector configuration: relative `weights`, an owner-registered `script` ID, or `plugin = { id, tool }`. `script` and `plugin` are mutually exclusive |
685
835
  | `deny_models` | `string[]` | — | Hard denylist for every subagent binding after alias resolution; pins, manual changes, resume, and advisory dispatch cannot bypass it. Profile/lease/tree/model-profile hard rules remain additional boundaries |
686
836
  | `allowed_tools` | `string[]` | `[]` | Exact tool names to allow past the native subagent default restriction. It covers every built-in tool a subagent does not get by default (`AskUserQuestion`, `Cron`, `EnterPlanMode` / `ExitPlanMode`, `ThreadCreate` / `ThreadList` / `ThreadRead` / `ThreadWait`); it does not override profile allowlists, denylists, or other policy limits |
837
+ | `agent_list_fields` | `string[]` | `["model", "elapsed_ms", "idle_ms", "tool_call_count"]` | Optional read-only telemetry fields included by [`AgentList`](../reference/tools.md#collaboration-tools) when `raw` is omitted (`"model"`, `"thinking_effort"`, `"elapsed_ms"`, `"idle_ms"`, `"tool_call_count"`, `"context_tokens"`). Set `[]` to omit all optional telemetry fields in compact calls; `raw = true` always returns all available fields |
687
838
  | `max_direct_children` | `integer` | `16` | Maximum simultaneous dispatched child runs per caller, including startup and cancellation; `0` disables this limit |
688
839
  | `max_total_subagents` | `integer` | `0` | Maximum simultaneous dispatched subagent runs throughout one session tree, including grandchildren and deeper descendants but not main; `0` disables this limit |
689
840
  | `timeout_ms` | `integer` | `7200000` (2 hours) | Maximum wall-clock time (milliseconds) a single subagent (`AgentRun`) is allowed to run before it is settled as `timed_out`. `0` means no timeout — the subagent runs until it finishes or the model stops it. This is the background-task manager's per-task timeout for each subagent task, so it applies to both foreground and background subagents. In print mode (`kiki -p`) the default is `0` unless explicitly set. Note: any value above `2147483647` (about 24.8 days) is clamped to roughly 24.8 days by the runtime |
@@ -705,6 +856,34 @@ Tool lists in profile descriptions and settings are configuration previews, not
705
856
 
706
857
  The limits are global configuration defaults, but counts are isolated to each session. Idle and historical children do not count. A running descendant still counts after its parent finishes; resuming a child takes an execution slot without creating another agent. Admission reserves capacity before asynchronous startup and releases it after startup failure or execution completion. Exceeding either limit immediately returns `dispatch.limit_exceeded` with `layer`, `current`, `limit`, and `owner` (REST business code `42904`); it does not queue work or stop another agent. Wait for an active run to finish or explicitly raise the relevant configuration limit. Automatic task-completion wakeups obey the same limits. If a wakeup is rejected, the finished task and its output remain available through `TaskOutput`; the notification is not marked delivered.
707
858
 
859
+ ### Automatic model selection
860
+
861
+ Use `AgentRun` with `model_alias: "auto"` to select once for that dispatch. To use it by default for new children, set `[subagent] model_selection = "auto"`; a profile can override that default with `model_selection: static` or `model_selection: auto`. A concrete `model_alias` always takes precedence. See [continuing a child](../customization/agents-and-subagents.md#named-child-agents) for how explicit `auto` works on resume.
862
+
863
+ Candidates come from configured native models or the external executor's model catalog and declared model choices. Kiki intersects them with the saved menu and applicable hard model and effort limits. Each candidate needs a resolvable effort; an explicit dispatch `effort` takes precedence. No eligible candidate means an error, not a fallback.
864
+
865
+ Without a custom selector, Kiki draws from eligible models with equal weight. To favor a model, assign it a larger weight under `[subagent.auto_model.weights]`. Use the candidate's model ID as the key, quote keys containing `/`, and set a weight to `0` to leave that model out of the draw. Unlisted models still have weight `1`. The draw fails if no eligible candidate has positive weight.
866
+
867
+ For a custom decision, name one local script or enabled plugin tool in `[subagent.auto_model]`. Before sending dispatch text to that destination, Kiki asks for approval for `AgentRunSelector`. Select **Always allow AgentRunSelector in this session** when approving to reuse the approval for the same selector configuration and working directory. If the destination changes, approve it again. A setting or allow rule in `config.toml` alone does not grant this approval. YOLO mode still allows the action unless an explicit deny applies.
868
+
869
+ An approved selector receives the dispatch `description`, `prompt`, and filtered `candidates` (`alias`, optional `when`, and `thinking_effort`). Approve only code you trust with that text. The selector returns just `{"model_alias":"candidate-id"}`; it cannot add a candidate or change the effort. If approval or selection fails, Kiki does not fall back to another model. Weighted selection and a concrete `model_alias` do not require this approval.
870
+
871
+ ```toml
872
+ [subagent.auto_model]
873
+ script = "choose-model"
874
+
875
+ [[subagent.auto_model.scripts]]
876
+ id = "choose-model"
877
+ command = "/usr/local/bin/node"
878
+ args = ["/Users/alice/.kiki/scripts/agentrun-model-selector.mjs"]
879
+ workspaces = ["/Users/alice/projects/assistant"]
880
+ timeout = 10
881
+ ```
882
+
883
+ Use absolute paths for the executable and authorized workspace roots; on Windows, use an `.exe`. The script runs without a shell and with an isolated environment. It reads one JSON object from `stdin` (the program's input channel) and writes its choice as JSON to `stdout` (the program's output channel). The timeout defaults to 10 seconds and accepts 1–60 seconds. The repository example `scripts/examples/agentrun-model-selector.mjs` selects the first eligible model, or ranks candidates by a local `{"scores":{"candidate-id":2}}` JSON file if you pass that file as a second argument in `args`.
884
+
885
+ To use a plugin instead, set `plugin = { id = "example-selector", tool = "SelectModel" }` in `[subagent.auto_model]` and remove `script`. The named tool must already be registered by an enabled local plugin. It receives the same object as its input and returns the choice as JSON text in its tool output. Kiki does not send dispatch text to a script or plugin when using the weighted draw.
886
+
708
887
  ## `agents`
709
888
 
710
889
  This strict section controls the boolean gates for [delegation notices](../customization/agents-and-subagents.md). Unknown keys are configuration errors.
@@ -812,6 +991,29 @@ Like the `tools` / `disallowedTools` fields of an agent file, this section shape
812
991
 
813
992
  Which image formats reach the model depends on the provider the request resolves to. Every provider accepts PNG, JPEG, GIF, and WebP; the Kimi provider additionally accepts BMP, HEIC, and HEIF, so an iPhone photo needs no conversion first. Any other image is replaced by a text notice that names the formats the current provider accepts.
814
993
 
994
+ ## `cpu_workers`
995
+
996
+ `cpu_workers` controls the App-scoped pool for CPU-bound work. Its first landed consumer is the initial image decode used to validate image data; it does not change the image size or format limits in [`image`](#image). The pool creates worker threads lazily on the first request and closes them during App teardown.
997
+
998
+ The values below are an explicit override example, not the defaults:
999
+
1000
+ ```toml
1001
+ [cpu_workers]
1002
+ max_workers = 4
1003
+ max_queue = 64
1004
+ max_queued_bytes = 67108864
1005
+ timeout_ms = 30000
1006
+ ```
1007
+
1008
+ | Field | Type | Default | Environment variable | Description |
1009
+ | --- | --- | --- | --- | --- |
1010
+ | `max_workers` | positive integer | `W` | `KIKI_CPU_MAX_WORKERS` | The pool size is `max(1, min(os.availableParallelism() - 1, max_workers))`; the schema no longer imposes a `64` upper bound |
1011
+ | `max_queue` | positive integer | `max(128, 16W)` | `KIKI_CPU_MAX_QUEUE` | Maximum number of requests waiting for a worker, not counting active requests; the schema no longer imposes a `1024` upper bound |
1012
+ | `max_queued_bytes` | positive integer | `max(64, floor(M / 128))` MiB | `KIKI_CPU_MAX_QUEUED_BYTES` | Maximum total bytes declared by queued requests |
1013
+ | `timeout_ms` | positive integer, up to `2147483647` | `30000` (30 seconds) | `KIKI_CPU_TIMEOUT_MS` | Request timeout in milliseconds, including time spent waiting in the queue |
1014
+
1015
+ `C`, `M`, `W`, and `H` are defined in [hardware-scaled resource defaults](#hardware-scaled-resource-defaults). Environment variables take precedence over `config.toml` and are read at startup. The queue is bounded by both `max_queue` and `max_queued_bytes`; when either limit is reached, new requests are rejected with `CPU_QUEUE_FULL` rather than waiting. If an active request is canceled or times out, its worker is terminated and the next request starts on a replacement; the failed work is not replayed.
1016
+
815
1017
  ## `session_title`
816
1018
 
817
1019
  `session_title` chooses how AI session titles are written.
@@ -822,9 +1024,11 @@ Which image formats reach the model depends on the provider the request resolves
822
1024
  | `triggers` | `array<string>` | `["first_turn_completed"]` | The moments that write a title on their own. Any of `first_user_message`, `first_turn_completed`, `context_compacted`. An empty array turns automatic titling off; asking for a title on demand still works, and it still needs a `model` |
823
1025
  | `prompt` | `string` | built-in prompt | Optional system prompt for the title model. Multiline text is sent in full, without template expansion. Remove this field or leave it blank to use the built-in prompt; the default text is not saved as an override |
824
1026
 
825
- The built-in prompt asks for a recognizable title based on the current purpose and concrete subject, keeping useful names and identifiers without claiming unproven success. Changing `prompt` takes effect on the next title request, including in an open session, without restarting. Saving or removing the override does not rename existing sessions or send a title request.
1027
+ The built-in prompt asks for the concrete subject and main work in the language of your request, preserving useful names, versions and error codes. It tells the model to keep the main goal through small follow-ups and reflect an explicit change of goal, using summary, assistant replies and the previous generated title as references. Changing `prompt` takes effect on the next title request, including in an open session, without restarting. Saving or removing the override does not rename existing sessions or send a title request.
1028
+
1029
+ Title requests use source-labelled excerpts from the live context and prompt queue, with independent budgets for user requests and supporting text. The first completed turn requires both a real user prompt and its reply. After compaction, the material combines the earliest available user prompt, up to four later recent user requests, the live summary, an available reply to the latest user, and the previous generated title. The original opening request may no longer be available. Long excerpts keep their beginning and end; conversation material stays below 6,800 characters, and the built-in prompt plus material stays below 8,000. A custom system prompt is sent in full outside that material budget.
826
1030
 
827
- A model you picked is used as-is, under the same excerpt budgets. Automatic titling never overwrites a title you typed yourself, and neither does an ordinary on-demand request. Only a forced request replaces a title you set by hand.
1031
+ A model you picked is used as-is. Zero-output transient failures follow [`retry`](#retry); a missing model or invalid configuration fails once, and observed model output is never replayed. After you rename a conversation, automatic titling skips excerpt collection and model requests, including queued triggers. Ordinary on-demand requests also preserve your title. A forced request can replace the title present when it starts, but a title changed during the request or retry backoff wins.
828
1032
 
829
1033
  `GET /api/config` and successful `POST /api/config` responses include `session_title.default_prompt` and `prompt_source` (`default` or `custom`). These are read-only fields; `prompt` is returned only for a nonblank override. Save with `{ "session_title": { "prompt": "Your title instructions" } }`, or remove the override with `{ "session_title": { "prompt": null } }`. Omitted fields stay unchanged, so these patches preserve `model` and `triggers`. Use `model: null` to remove the model without erasing the prompt or selected moments; do not use `replace_domains` for a single-field edit.
830
1034
 
@@ -881,6 +1085,8 @@ Computer tools from the recognized cua-driver MCP default to the main agent of e
881
1085
 
882
1086
  The default `WebSearch` lane is `duckduckgo.search`, which searches the general web without registration, credentials or configuration. Its public HTML endpoint may issue a challenge or rate limit; wait before retrying, or explicitly choose another configured source. These failures are errors, not empty results, and never trigger a silent switch to a paid provider. Configured defaults and explicit lane selections take precedence. For repository search or library documentation, choose `github.repositories` or `context7.docs` explicitly; the latter returns typed context and cannot be combined with result lanes. Field names and merge behavior follow the module's canonical configuration contract, shared with the standalone nb-search CLI, so an existing nb-search configuration file applies without translation.
883
1087
 
1088
+ Search memory and queue defaults follow the same hardware formula: the single query worker uses `H` MiB, keeps 8 active slots, and queues `max(128, 16C)` requests. The indexer child uses `H` MiB, with soft RSS `2H + 256` MiB and hard RSS `3H + 256` MiB. Explicit host options override `KIKI_SEARCH_INDEXER_SOFT_MB` and `KIKI_SEARCH_INDEXER_HARD_MB`, which override these defaults; writer election remains single-writer. These are local resource budgets, not provider rate limits.
1089
+
884
1090
  | Field | Type | Required | Description |
885
1091
  | --- | --- | --- | --- |
886
1092
  | `provider_instances` | `table` | No | Named provider instances with `provider_id`, `enabled`, optional `credential_slot_id` / `base_url`, `key_strategy` (`round-robin` or `priority`), `balance_ttl_ms` (60,000–86,400,000), and provider-specific `options` |
@@ -1022,37 +1228,29 @@ dangerous_bash = "default"
1022
1228
 
1023
1229
  `review` ("Approve for me") keeps Auto's routine approvals but sends policy-generated approval requests to a reviewer first. An explicit configured `deny` rule always blocks the call; an exact "approve for session" match is approved before configured `ask` rules and protected-path checks. Otherwise, an explicit configured `ask` rule prompts you. A confident reviewer approval proceeds without a user prompt; a confident denial stops the tool. Uncertain answers, invalid responses, timeouts, missing credentials, and unavailable reviewers ask you instead. After three consecutive reviewer denials in one turn, later requests in that turn go directly to you. Reviewer decisions do not create an "approve for session" rule.
1024
1230
 
1025
- Both reviewer backends receive up to three recent user-origin text messages, the complete Bash command or resolved file paths and operations, the policy name and reason, and the workspace directory. For reviewed `Write` and `Edit` calls, they also receive byte sizes and SHA-256 digests of the submitted content (including both sides of an edit), never file contents or raw diffs. Writes and edits to sensitive files go directly to you because the reviewer cannot verify unseen content. PEM private keys and common API-key formats are redacted from text fields. When the input exceeds its size limit, user-message text is trimmed; the action, policy and directory are never truncated. Assistant messages and tool output are not sent. Commands or target lists beyond their input bounds, fixed action/policy data beyond the size limit, actions without an exact command or resolved file target, and cases where unseen content is needed to judge safety go to user approval instead. Choose a configured model alias for the model backend:
1231
+ Reviewers receive up to three recent user-origin text messages, the complete Bash command or resolved file paths and operations, the policy name and reason, and the workspace directory. For reviewed `Write` and `Edit` calls, they also receive byte sizes and SHA-256 digests of the submitted content (including both sides of an edit), never file contents or raw diffs. Writes and edits to sensitive files go directly to you because the reviewer cannot verify unseen content. PEM private keys and common API-key formats are redacted from text fields. When the input exceeds its size limit, user-message text is trimmed; the action, policy and directory are never truncated. Assistant messages and tool output are not sent. Commands or target lists beyond their input bounds, fixed action/policy data beyond the size limit, actions without an exact command or resolved file target, and cases where unseen content is needed to judge safety go to user approval instead. Choose an existing chat model or [decision connection](./providers.md#decision-connections):
1026
1232
 
1027
1233
  ```toml
1028
1234
  # ~/.kiki/config.toml
1029
1235
  default_permission_mode = "review"
1030
1236
 
1031
1237
  [permission.reviewer]
1032
- backend = "model"
1033
- model = "k3-review"
1238
+ source = { kind = "model", model = "review-model" }
1034
1239
  allow_threshold = 0.9
1035
1240
  deny_threshold = 0.9
1036
1241
  timeout_ms = 8000
1037
1242
  categories = ["policy_compliance", "no_secret_egress", "no_irreversible_damage", "no_outward_effect", "prompt_injection_absent"]
1038
1243
  ```
1039
1244
 
1040
- `backend` accepts `model` or `jev`; the model backend requires `model`. `allow_threshold` and `deny_threshold` each accept 0.5–1; lower confidence asks you. `categories` selects Jev yes/no checks from the five names above. The default timeout is 8 seconds for a model and 4 seconds for Jev (`timeout_ms` overrides either; accepted range 100–30,000). To use TypeSafe Jev, select it as the backend and store the key separately. Choosing `backend = "jev"` is the consent to send this limited reviewer input to TypeSafe; there is no separate consent flag (an old `jev_consent` key is ignored):
1245
+ For a decision service, set `source = { kind = "connection", connection = "judgment" }`. It uses that connection's existing credentials and remote `default_model`; add `model` to the source to override the remote name. Reviewer accepts `system_one`, while `pair_score` is only for memory ranking. Choosing a source permits the limited reviewer input above to be sent to it; Memory Advisor keeps its own source and enable switch. In **[Settings → Models & agents → Models → Connections](../guides/settings.md#connections) → Decision models**, select the two sources independently. The permission settings keep the review thresholds and timeout.
1041
1246
 
1042
- ```toml
1043
- # ~/.kiki/config.toml
1044
- [permission.reviewer]
1045
- backend = "jev"
1046
- model = "jev-latest"
1047
- ```
1247
+ `allow_threshold` and `deny_threshold` each accept 0.5–1; lower confidence asks you. `categories` selects the System One yes/no checks from the five names above. `timeout_ms` accepts 100–30,000 milliseconds. Without an override, the existing `backend` setting supplies the timeout default: 8 seconds for `model` (the default), 4 seconds for `jev`.
1048
1248
 
1049
- ```toml
1050
- # ~/.kiki/credentials/credentials.toml
1051
- [permission.reviewer]
1052
- api_key = "YOUR_TYPESAFE_API_KEY"
1053
- ```
1249
+ Memory Advisor has its own `[memory.advisor] first_step_wait_ms` (0–5000 milliseconds). When it is not set, the first step waits up to 3000 ms for a `system_one` or `pair_score` source and 1500 ms for a chat model, following the current source. An explicit value always wins. See [Memory Advisor](../guides/memory.md#memory-advisor).
1250
+
1251
+ Existing configurations without `source` keep using `backend = "model"` with a model alias, or `backend = "jev"` with an optional remote model name (default `jev-latest`). Legacy Jev reads `[permission.reviewer].api_key` from `credentials.toml`, then the server's `TYPESAFE_API_KEY`; without either, approval goes to you. Choosing legacy `backend = "jev"` permits this reviewer input to TypeSafe, and an old `jev_consent` key is ignored. A new `source` takes precedence. API `source: null` clears it and the old model choice and resets `backend` to `model`, leaving the Reviewer unconfigured.
1054
1252
 
1055
- The config writer keeps `api_key` in `credentials.toml` rather than `config.toml`; `TYPESAFE_API_KEY` in the server environment is a fallback when no stored key is present. Without an available key, Jev is not called and approval goes to you. In **Settings → Permissions → Reviewer** a saved key stays masked but is not write-only: you can explicitly reveal, copy, edit, or clear it, and a key taken from the environment shows its source and can be overridden with a value saved in Kiki. Anyone holding the Kiki bearer token can reveal the stored key.
1253
+ If a legacy Reviewer key is saved, **Move to a connection** transfers it on the server; the browser never reads it for this operation. A partial result preserves concurrent changes: refresh and check settings before retrying, and choose a new connection name if the saved connection holds a different key. Afterward, reveal, copy, edit and clear credentials through the existing connection editor. Anyone holding the Kiki bearer token can reveal keys through the authenticated secret API.
1056
1254
 
1057
1255
  ::: tip
1058
1256
  MCP server declarations are configured in `~/.kiki/mcp.json` or the project-local `.kiki/mcp.json`, not in `config.toml`. The legacy `.kimi-code/mcp.json` path is not read. The interactive configuration entry point is the built-in `kiki-ops` skill (Kiki's product-usage and configuration Skill): type `/kiki-ops help me configure MCP`; see [Model Context Protocol](../server/mcp.md).
@@ -1141,15 +1339,30 @@ The old `[prompt] shared` and `[prompt.tools]` keys have been removed and now fa
1141
1339
 
1142
1340
  In the desktop GUI, open **Settings → Agents → Prompt fields** to edit this section. The card is collapsed by default — expand it before editing.
1143
1341
 
1342
+ ## `[session_access]`
1343
+
1344
+ `[session_access]` controls owner-issued tokens that grant a local program fixed access to one session and the terminal hand-off channel. Both settings take effect immediately. Turning `enabled` off revokes all active tokens and disables the hand-off routes; `GET /api/session-access` remains available to the local owner. Turning `terminal_handoff` off clears pending tickets and revokes terminal-channel tokens without affecting owner-channel tokens. Tokens and tickets are held in memory and become invalid after a server restart. See [Session access tokens](../server/rest-api.md#session-access-tokens), especially [Terminal hand-off](../server/rest-api.md#session-access-terminal-handoff), and [kiki session-access](../reference/command.md#kiki-session-access) for CLI management.
1345
+
1346
+ | Field | Type | Default | Description |
1347
+ | --- | --- | --- | --- |
1348
+ | `enabled` | `boolean` | `true` | Whether session access is enabled; `false` revokes all active tokens and disables token-management, ticket, presence, and release routes. `GET /api/session-access` remains available to the local owner, and exchange returns the generic `invalid_ticket` error |
1349
+ | `terminal_handoff` | `boolean` | `true` | Whether terminal hand-off is enabled; `false` clears pending tickets, refuses ticket issuance with HTTP 403 (`session_access_disabled`), and makes exchange return HTTP 401 with code `40101` and `msg: "invalid_ticket"`. Owner-channel tokens keep working |
1350
+
1351
+ ```toml
1352
+ [session_access]
1353
+ enabled = true
1354
+ terminal_handoff = true
1355
+ ```
1356
+
1144
1357
  ## `[request_governance]`
1145
1358
 
1146
- `request_governance` limits either native model requests (`resource = "model_request"`) or running agents (`resource = "agent_execution"`). No rule means no concurrency cap; existing rules without `resource` remain model-request rules. In the GUI, **Usage → Live** shows running and queued requests and includes **Concurrency limits** to add, edit, pause, or delete rules. **History**, the default tab, shows token usage and estimated cost. See [Usage](../guides/settings.md#usage) for the diagnostic workflow.
1359
+ `request_governance` limits either native model requests (`resource = "model_request"`) or running agents (`resource = "agent_execution"`). No rule means no concurrency cap; existing rules without `resource` remain model-request rules. In the GUI, **Usage → Live** shows running and queued requests and includes **Concurrency limits** to add, edit, pause, or delete rules. **History** shows token usage and estimated cost, and **Live** is the tab that opens by default. See [Usage](../guides/settings.md#usage) for the diagnostic workflow.
1147
1360
 
1148
1361
  A `global` rule shares capacity across sessions in the same Kiki service process. An `each_session` rule gives each session its own bucket. These limits do not span independent Kiki processes, set requests-per-minute, or impose token or spending budgets. For search and fetch calls, use [`nb_search.execution`](#nb-search).
1149
1362
 
1150
1363
  Model-request rules count provider generation attempts, including compaction and OAuth replay. External harness requests are unmanaged, not zero. Agent-execution rules cover both Kiki and external executors launched through Kiki, including main agents, subagents, and externally delegated independent agents. One agent holds one slot throughout its execution, including tool work, approval waits, cancellation cleanup, and finalization. Idle agents, background shell tasks, and child task receipts do not add agent slots. External model identities remain unknown when the harness has not supplied a binding; Kiki never substitutes its native default model.
1151
1364
 
1152
- For example, cap all models using one provider at two simultaneous requests across sessions. Replace `example-provider` with the exact key from `[providers]`:
1365
+ For example, cap all models using one provider at two simultaneous requests across sessions. Replace `example-provider` with the exact key from `[providers]`. The `max_queue_size = 1024` line is an explicit override example; when omitted, the hardware-scaled default is `max(1024, 4 × max(128, 16C))`.
1153
1366
 
1154
1367
  ```toml
1155
1368
  [request_governance]
@@ -1196,7 +1409,7 @@ overflow = "queue"
1196
1409
  | --- | --- | --- | --- |
1197
1410
  | `schema_version` | `integer` | `1` | Configuration version; only `1` is accepted |
1198
1411
  | `max_wait_ms` | `integer` | `300000` | Positive local waiting budget in milliseconds; cumulative across model-request retries, or per agent admission |
1199
- | `max_queue_size` | `integer` | `1024` | Positive maximum number of pending admissions across both resources |
1412
+ | `max_queue_size` | positive integer | `max(1024, 4 × max(128, 16C))` | Positive maximum number of pending admissions across both resources; an explicit value remains an override |
1200
1413
  | `rules` | `array<table>` | `[]` | Concurrency rules, written as `[[request_governance.rules]]` |
1201
1414
  | Rule `id` | `string` | Required | Nonempty, unique rule identifier |
1202
1415
  | Rule `resource` | `string` | `model_request` | `model_request` or `agent_execution`; counts requests or agents, respectively |