kiki-agent 0.4.2 → 0.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (238) hide show
  1. package/README.md +3 -3
  2. package/dist/cpu-worker.mjs +52744 -0
  3. package/dist/docs/en/configuration/config-files.md +121 -46
  4. package/dist/docs/en/configuration/data-locations.md +34 -7
  5. package/dist/docs/en/configuration/env-vars.md +37 -9
  6. package/dist/docs/en/configuration/overrides.md +20 -9
  7. package/dist/docs/en/configuration/providers.md +114 -9
  8. package/dist/docs/en/customization/agent-profiles.md +1 -1
  9. package/dist/docs/en/customization/agents-and-subagents.md +55 -12
  10. package/dist/docs/en/customization/hooks.md +3 -3
  11. package/dist/docs/en/customization/personas.md +36 -2
  12. package/dist/docs/en/customization/plugins.md +56 -3
  13. package/dist/docs/en/customization/prompt-fields.md +65 -5
  14. package/dist/docs/en/customization/recipes.md +77 -0
  15. package/dist/docs/en/customization/skins.md +2 -2
  16. package/dist/docs/en/customization/themes.md +1 -1
  17. package/dist/docs/en/features/agent-workflows.md +8 -8
  18. package/dist/docs/en/features/browser-and-computer.md +40 -0
  19. package/dist/docs/en/features/daily.md +13 -13
  20. package/dist/docs/en/features/ecosystem.md +6 -6
  21. package/dist/docs/en/features/extend.md +11 -10
  22. package/dist/docs/en/features/freedom.md +9 -9
  23. package/dist/docs/en/features/index.md +58 -28
  24. package/dist/docs/en/features/long-work.md +18 -14
  25. package/dist/docs/en/features/look.md +6 -6
  26. package/dist/docs/en/features/people.md +6 -6
  27. package/dist/docs/en/features/phone.md +13 -3
  28. package/dist/docs/en/features/spaces.md +12 -12
  29. package/dist/docs/en/features/workbench.md +8 -8
  30. package/dist/docs/en/getting-started/desktop-app.md +4 -8
  31. package/dist/docs/en/getting-started/first-launch.md +1 -1
  32. package/dist/docs/en/guides/goals.md +4 -2
  33. package/dist/docs/en/guides/interface.md +32 -10
  34. package/dist/docs/en/guides/memory.md +64 -10
  35. package/dist/docs/en/guides/sessions.md +21 -9
  36. package/dist/docs/en/guides/settings.md +64 -40
  37. package/dist/docs/en/index.md +3 -1
  38. package/dist/docs/en/reference/command.md +90 -31
  39. package/dist/docs/en/reference/model-vocabulary.md +2 -2
  40. package/dist/docs/en/reference/slash-commands.md +1 -1
  41. package/dist/docs/en/reference/tools.md +65 -20
  42. package/dist/docs/en/server/acp.md +9 -3
  43. package/dist/docs/en/server/local-server.md +19 -27
  44. package/dist/docs/en/server/mcp.md +9 -5
  45. package/dist/docs/en/server/rest-api.md +350 -22
  46. package/dist/docs/en/server/script-tools.md +268 -0
  47. package/dist/docs/zh/configuration/config-files.md +121 -46
  48. package/dist/docs/zh/configuration/data-locations.md +34 -7
  49. package/dist/docs/zh/configuration/env-vars.md +37 -9
  50. package/dist/docs/zh/configuration/overrides.md +20 -9
  51. package/dist/docs/zh/configuration/providers.md +114 -9
  52. package/dist/docs/zh/customization/agent-profiles.md +1 -1
  53. package/dist/docs/zh/customization/agents-and-subagents.md +55 -12
  54. package/dist/docs/zh/customization/hooks.md +3 -3
  55. package/dist/docs/zh/customization/personas.md +36 -2
  56. package/dist/docs/zh/customization/plugins.md +56 -3
  57. package/dist/docs/zh/customization/prompt-fields.md +65 -5
  58. package/dist/docs/zh/customization/recipes.md +77 -0
  59. package/dist/docs/zh/customization/skins.md +2 -2
  60. package/dist/docs/zh/customization/themes.md +1 -1
  61. package/dist/docs/zh/features/agent-workflows.md +10 -10
  62. package/dist/docs/zh/features/browser-and-computer.md +40 -0
  63. package/dist/docs/zh/features/daily.md +13 -13
  64. package/dist/docs/zh/features/ecosystem.md +6 -6
  65. package/dist/docs/zh/features/extend.md +10 -9
  66. package/dist/docs/zh/features/freedom.md +9 -9
  67. package/dist/docs/zh/features/index.md +58 -28
  68. package/dist/docs/zh/features/long-work.md +17 -13
  69. package/dist/docs/zh/features/look.md +6 -6
  70. package/dist/docs/zh/features/people.md +5 -5
  71. package/dist/docs/zh/features/phone.md +13 -3
  72. package/dist/docs/zh/features/spaces.md +12 -12
  73. package/dist/docs/zh/features/workbench.md +8 -8
  74. package/dist/docs/zh/getting-started/desktop-app.md +4 -8
  75. package/dist/docs/zh/getting-started/first-launch.md +1 -1
  76. package/dist/docs/zh/guides/goals.md +4 -2
  77. package/dist/docs/zh/guides/interface.md +32 -10
  78. package/dist/docs/zh/guides/memory.md +64 -10
  79. package/dist/docs/zh/guides/sessions.md +21 -9
  80. package/dist/docs/zh/guides/settings.md +64 -40
  81. package/dist/docs/zh/index.md +4 -2
  82. package/dist/docs/zh/reference/command.md +90 -31
  83. package/dist/docs/zh/reference/model-vocabulary.md +2 -2
  84. package/dist/docs/zh/reference/slash-commands.md +1 -1
  85. package/dist/docs/zh/reference/tools.md +65 -20
  86. package/dist/docs/zh/server/acp.md +9 -3
  87. package/dist/docs/zh/server/local-server.md +19 -27
  88. package/dist/docs/zh/server/mcp.md +9 -5
  89. package/dist/docs/zh/server/rest-api.md +338 -21
  90. package/dist/docs/zh/server/script-tools.md +268 -0
  91. package/dist/external-harness/agy-cli-acp.mjs +168 -162
  92. package/dist/external-harness/agy-hook-registration.mjs +69 -30
  93. package/dist/external-harness/agy-mcp-plugin.mjs +19 -0
  94. package/dist/external-harness/agy-permission-hook.mjs +29 -2
  95. package/dist/hostRunner.mjs +112 -3
  96. package/dist/mailbox-worker.mjs +403 -0
  97. package/dist/main.mjs +2 -2
  98. package/dist/memory-worker.mjs +1008 -0
  99. package/dist/native/windows-process-helper.exe +0 -0
  100. package/dist/query-store-worker.mjs +487 -0
  101. package/dist/sqlite-indexer.mjs +255 -403
  102. package/dist/sqlite-query-worker.mjs +261 -249
  103. package/dist/usage-parser-worker.mjs +3977 -9
  104. package/dist/usage-read-model-worker.mjs +761 -0
  105. package/dist/web/assets/AppErrorBoundary-B5Fc4f6-.js +1 -0
  106. package/dist/web/assets/NavScopeBoundary-C7MnGQio.js +1 -0
  107. package/dist/web/assets/{arc-DYDCMlOS.js → arc-DGB9OVgQ.js} +1 -1
  108. package/dist/web/assets/{architectureDiagram-3BPJPVTR-C9Y7T0O2.js → architectureDiagram-3BPJPVTR-glnQCMub.js} +1 -1
  109. package/dist/web/assets/{blockDiagram-GPEHLZMM-CdUrp-tD.js → blockDiagram-GPEHLZMM-bM0tnGby.js} +1 -1
  110. package/dist/web/assets/{c4Diagram-AAUBKEIU-PrwvB9IJ.js → c4Diagram-AAUBKEIU-DMf_rTtt.js} +1 -1
  111. package/dist/web/assets/channel-Cj8SKJ38.js +1 -0
  112. package/dist/web/assets/{chunk-2J33WTMH-BL56g_Es.js → chunk-2J33WTMH-mTccJ3tW.js} +1 -1
  113. package/dist/web/assets/{chunk-4BX2VUAB-DvJD5M9M.js → chunk-4BX2VUAB-DhqPYMjY.js} +1 -1
  114. package/dist/web/assets/{chunk-55IACEB6-C8f-nzvx.js → chunk-55IACEB6-BujrYRoO.js} +1 -1
  115. package/dist/web/assets/{chunk-727SXJPM-DOGkWKkV.js → chunk-727SXJPM-ciMmSI4G.js} +1 -1
  116. package/dist/web/assets/{chunk-AQP2D5EJ-fFOuz7g6.js → chunk-AQP2D5EJ-CZW9pKTc.js} +1 -1
  117. package/dist/web/assets/{chunk-FMBD7UC4-BpeXZ9LM.js → chunk-FMBD7UC4-hdALNnnU.js} +1 -1
  118. package/dist/web/assets/{chunk-ND2GUHAM-CRUh76fb.js → chunk-ND2GUHAM-CgKyqUdb.js} +1 -1
  119. package/dist/web/assets/{chunk-QZHKN3VN-uNfxaPk0.js → chunk-QZHKN3VN-B2mmUz_E.js} +1 -1
  120. package/dist/web/assets/classDiagram-4FO5ZUOK-f8V9p-dD.js +1 -0
  121. package/dist/web/assets/classDiagram-v2-Q7XG4LA2-f8V9p-dD.js +1 -0
  122. package/dist/web/assets/client-ClWQBErG.js +3 -0
  123. package/dist/web/assets/connection-C0J3BPgk.js +1 -0
  124. package/dist/web/assets/{cose-bilkent-S5V4N54A-BNkxG-qX.js → cose-bilkent-S5V4N54A-UV3uPjkK.js} +1 -1
  125. package/dist/web/assets/{dagre-BM42HDAG-BerioUei.js → dagre-BM42HDAG-Zjy-gQ6C.js} +1 -1
  126. package/dist/web/assets/{diagram-2AECGRRQ-Czv2SR07.js → diagram-2AECGRRQ-DL-kilIf.js} +1 -1
  127. package/dist/web/assets/{diagram-5GNKFQAL-Uzi1weGK.js → diagram-5GNKFQAL-CjB_xR5B.js} +1 -1
  128. package/dist/web/assets/{diagram-KO2AKTUF-W36h_ff3.js → diagram-KO2AKTUF-CjN4i3b9.js} +1 -1
  129. package/dist/web/assets/{diagram-LMA3HP47-FG4dDk52.js → diagram-LMA3HP47-CPCAMndo.js} +1 -1
  130. package/dist/web/assets/{diagram-OG6HWLK6-CQoEjIAY.js → diagram-OG6HWLK6-DVeBWBKd.js} +1 -1
  131. package/dist/web/assets/{erDiagram-TEJ5UH35-Ck06KVyZ.js → erDiagram-TEJ5UH35-CHKzBHrr.js} +1 -1
  132. package/dist/web/assets/export-CXoWon32.js +2 -0
  133. package/dist/web/assets/{flowDiagram-I6XJVG4X-C5hgxdFZ.js → flowDiagram-I6XJVG4X-C5rQa2pq.js} +1 -1
  134. package/dist/web/assets/{ganttDiagram-6RSMTGT7-BS52Pw5_.js → ganttDiagram-6RSMTGT7-BrLjEsNJ.js} +1 -1
  135. package/dist/web/assets/{gitGraphDiagram-PVQCEYII-DLlQKZHs.js → gitGraphDiagram-PVQCEYII-3DRR5VZj.js} +1 -1
  136. package/dist/web/assets/highlighted-body-OFNGDK62-Bdj5SJfv.js +1 -0
  137. package/dist/web/assets/index-2Vx5mHRn.js +1 -0
  138. package/dist/web/assets/index-B1UXw2C9.js +1 -0
  139. package/dist/web/assets/{index-CM-nNfuV.js → index-BJxtlf4P.js} +4 -4
  140. package/dist/web/assets/{index-DKIysLbI.js → index-BY7jPurv.js} +1 -1
  141. package/dist/web/assets/index-Bq79v-Sa.js +1 -0
  142. package/dist/web/assets/index-BqD3iTIl.js +1 -0
  143. package/dist/web/assets/index-Br3AlBrQ.js +1 -0
  144. package/dist/web/assets/{index-Ca607_hK.js → index-BvRBCpc6.js} +2 -2
  145. package/dist/web/assets/index-BxYCSNg_.js +3 -0
  146. package/dist/web/assets/{index-B2Pu0Iuu.js → index-C62wjCF_.js} +1 -1
  147. package/dist/web/assets/index-CBvwNH_H.js +1 -0
  148. package/dist/web/assets/{index-BNch_a4L.js → index-CG9e6lgq.js} +1 -1
  149. package/dist/web/assets/{index-ByiwExpV.js → index-CPSWYh_R.js} +2 -2
  150. package/dist/web/assets/index-CS4xJLZV.js +1 -0
  151. package/dist/web/assets/index-CjvqtF2I.js +1 -0
  152. package/dist/web/assets/index-CprdjRRk.js +13 -0
  153. package/dist/web/assets/{index-Bg99yVX_.js → index-CypTtrCB.js} +1 -1
  154. package/dist/web/assets/{index-BwcG86o3.js → index-DDJQGcUL.js} +1 -1
  155. package/dist/web/assets/index-DLWzxUOO.js +1 -0
  156. package/dist/web/assets/index-DQxkxZmn.js +7 -0
  157. package/dist/web/assets/index-DRo5Y_9p.js +1 -0
  158. package/dist/web/assets/index-De_LkTZx.js +1 -0
  159. package/dist/web/assets/{index-CZX3qUe2.js → index-DfUpwUTM.js} +2 -2
  160. package/dist/web/assets/{index-BLU8_Um7.js → index-Dkbz748K.js} +2 -2
  161. package/dist/web/assets/index-DmwFFSkV.js +1 -0
  162. package/dist/web/assets/index-DpcWEDhW.js +1 -0
  163. package/dist/web/assets/index-Dqq1RDP4.js +1 -0
  164. package/dist/web/assets/index-H1uMvIoa.css +1 -0
  165. package/dist/web/assets/index-ICHWJ2SM.js +1 -0
  166. package/dist/web/assets/index-O5fSd569.js +229 -0
  167. package/dist/web/assets/index-odjtqLLS.js +1 -0
  168. package/dist/web/assets/index-v_yAQ0Am.js +1 -0
  169. package/dist/web/assets/{infoDiagram-5YYISTIA-CD4XJGFm.js → infoDiagram-5YYISTIA-CCwV4Z0v.js} +1 -1
  170. package/dist/web/assets/{ishikawaDiagram-YF4QCWOH-fu5E3_CT.js → ishikawaDiagram-YF4QCWOH-BwwZcGyZ.js} +1 -1
  171. package/dist/web/assets/{journeyDiagram-JHISSGLW-CXcnKBfJ.js → journeyDiagram-JHISSGLW-Dc6WqniQ.js} +1 -1
  172. package/dist/web/assets/{kanban-definition-UN3LZRKU-BawKH6Pl.js → kanban-definition-UN3LZRKU-DVUqULOS.js} +1 -1
  173. package/dist/web/assets/{linear-BplJuXph.js → linear-d6rWsNOU.js} +1 -1
  174. package/dist/web/assets/memoryAdvisor-DBQXJB1o.js +1 -0
  175. package/dist/web/assets/mermaid-GHXKKRXX-Ik6SkVDT.js +642 -0
  176. package/dist/web/assets/{mindmap-definition-RKZ34NQL-DA1SE2uy.js → mindmap-definition-RKZ34NQL-_JHAkhHL.js} +1 -1
  177. package/dist/web/assets/navViewState-DaCMIYWA.js +1 -0
  178. package/dist/web/assets/{pieDiagram-4H26LBE5-6i021QeX.js → pieDiagram-4H26LBE5-BlhlygGy.js} +1 -1
  179. package/dist/web/assets/{quadrantDiagram-W4KKPZXB-CcKSZDMT.js → quadrantDiagram-W4KKPZXB-jn6R_C0S.js} +1 -1
  180. package/dist/web/assets/{requirementDiagram-4Y6WPE33-lYVuWRuD.js → requirementDiagram-4Y6WPE33-B9fXCHBr.js} +1 -1
  181. package/dist/web/assets/{sankeyDiagram-5OEKKPKP-4Zfb4_h4.js → sankeyDiagram-5OEKKPKP-fPJwIxkl.js} +1 -1
  182. package/dist/web/assets/{sequenceDiagram-3UESZ5HK-DqltKmlY.js → sequenceDiagram-3UESZ5HK-1v1DTNGt.js} +1 -1
  183. package/dist/web/assets/{spaces-CjuXbmxF.js → spaces-CvL2DRZM.js} +1 -1
  184. package/dist/web/assets/{stateDiagram-AJRCARHV-HFdhqxzx.js → stateDiagram-AJRCARHV-CEc_PLov.js} +1 -1
  185. package/dist/web/assets/stateDiagram-v2-BHNVJYJU-iAMctzaT.js +1 -0
  186. package/dist/web/assets/theme-LRSmy8mD.js +1 -0
  187. package/dist/web/assets/{timeline-definition-PNZ67QCA-HNRxaB3t.js → timeline-definition-PNZ67QCA-CEjhuitj.js} +1 -1
  188. package/dist/web/assets/{vennDiagram-CIIHVFJN-DwsCTyaD.js → vennDiagram-CIIHVFJN-CActt9h9.js} +1 -1
  189. package/dist/web/assets/{wardley-L42UT6IY-BWW2wtVO.js → wardley-L42UT6IY-Bp3q2izt.js} +1 -1
  190. package/dist/web/assets/{wardleyDiagram-YWT4CUSO-C-ktKm7v.js → wardleyDiagram-YWT4CUSO-C_zutiQ2.js} +1 -1
  191. package/dist/web/assets/{xychartDiagram-2RQKCTM6-48AxNW9k.js → xychartDiagram-2RQKCTM6-CRafvv33.js} +1 -1
  192. package/dist/web/icons/apple-touch-icon.png +0 -0
  193. package/dist/web/icons/icon-192.png +0 -0
  194. package/dist/web/icons/icon-512.png +0 -0
  195. package/dist/web/icons/maskable-512.png +0 -0
  196. package/dist/web/index.html +12 -2
  197. package/dist/web/manifest.webmanifest +16 -0
  198. package/native/auth-native/prebuilds/linux-arm64/auth-native.node +0 -0
  199. package/native/auth-native/prebuilds/linux-x64/auth-native.node +0 -0
  200. package/native/auth-native/prebuilds/win32-arm64/auth-native.node +0 -0
  201. package/native/auth-native/prebuilds/win32-x64/auth-native.node +0 -0
  202. package/package.json +23 -4
  203. package/dist/search-worker.mjs +0 -14177
  204. package/dist/web/assets/AppErrorBoundary-DiGMUg4r.js +0 -1
  205. package/dist/web/assets/LifeMark-CL6-HWDu.js +0 -1
  206. package/dist/web/assets/NavScopeBoundary-CFCnvZR0.js +0 -1
  207. package/dist/web/assets/channel-Bj_gZ_Lv.js +0 -1
  208. package/dist/web/assets/classDiagram-4FO5ZUOK-ssCwe2R4.js +0 -1
  209. package/dist/web/assets/classDiagram-v2-Q7XG4LA2-ssCwe2R4.js +0 -1
  210. package/dist/web/assets/client-DGj93bGT.js +0 -3
  211. package/dist/web/assets/connection-Bpf-EjrL.js +0 -1
  212. package/dist/web/assets/export-T_izwEkQ.js +0 -2
  213. package/dist/web/assets/highlighted-body-OFNGDK62-Btm6MuZ4.js +0 -1
  214. package/dist/web/assets/index-5_yzg61S.js +0 -1
  215. package/dist/web/assets/index-B-6LiYTY.js +0 -1
  216. package/dist/web/assets/index-B4iu4SJW.js +0 -1
  217. package/dist/web/assets/index-B9MlqF7J.js +0 -1
  218. package/dist/web/assets/index-BECSk4If.js +0 -1
  219. package/dist/web/assets/index-BFcyN2Zw.js +0 -1
  220. package/dist/web/assets/index-BIebkSEI.css +0 -1
  221. package/dist/web/assets/index-BMWid2q9.js +0 -1
  222. package/dist/web/assets/index-BeMvPEXs.js +0 -1
  223. package/dist/web/assets/index-Bezli3SF.js +0 -1
  224. package/dist/web/assets/index-BkPV0psm.js +0 -1
  225. package/dist/web/assets/index-CG8uIlD7.js +0 -1
  226. package/dist/web/assets/index-CJ92kLtO.js +0 -1
  227. package/dist/web/assets/index-CRDDqofN.js +0 -1
  228. package/dist/web/assets/index-Cd62y0wD.js +0 -1
  229. package/dist/web/assets/index-CgcJPsK6.js +0 -3
  230. package/dist/web/assets/index-Cy8C_eFR.js +0 -7
  231. package/dist/web/assets/index-D8z7lcQn.js +0 -166
  232. package/dist/web/assets/index-D_oPSlBL.js +0 -1
  233. package/dist/web/assets/index-Dceu0bqY.js +0 -1
  234. package/dist/web/assets/index-eUyF-8Sq.js +0 -1
  235. package/dist/web/assets/index-hG2s2Spn.js +0 -13
  236. package/dist/web/assets/mermaid-GHXKKRXX-BO9hkP3Z.js +0 -621
  237. package/dist/web/assets/stateDiagram-v2-BHNVJYJU-Dx28QuZF.js +0 -1
  238. package/dist/web/assets/theme-beWE_6f8.js +0 -1
@@ -1,6 +1,6 @@
1
1
  # Local Server and API
2
2
 
3
- Kiki ships with a shared daemon and a compatible local server. Use `kiki serve` to start, reuse, or stop the daemon used by the interactive TUI and external callers; use `kiki web` when a foreground process must mount the Kiki GUI in your browser, a REST API (`/api`), and a WebSocket event stream (`/api/ws`). The Kiki GUI lets you use Kiki in a browser; the REST and WebSocket APIs are for scripts and third-party tools, letting you create sessions, submit prompts, and follow execution from code — all reading and writing the same session data as the TUI and the Kiki GUI.
3
+ Kiki's local server is the shared daemon. Use `kiki serve` to start, reuse, or stop the daemon shared by the interactive TUI, the desktop GUI, and external callers; it mounts the Kiki GUI for your browser, a REST API (`/api`), and a WebSocket event stream (`/api/ws`). To let a browser on another device into this Kiki, use `kiki web` to turn on [Web access](#use-kiki-in-a-browser) on that same daemon. The Kiki GUI lets you use Kiki in a browser; the REST and WebSocket APIs are for scripts and third-party tools, letting you create sessions, submit prompts, and follow execution from code — all reading and writing the same session data as the TUI and the Kiki GUI.
4
4
 
5
5
  > Make sure Kiki is installed and ready to use first — either logged in via `/login` (in the TUI, or `kiki login`), or with a provider configured in `config.toml`. The server shares the CLI's login state and configuration, so no separate credential is needed for it.
6
6
 
@@ -20,25 +20,17 @@ kiki serve --stop
20
20
 
21
21
  With no mode, `serve` runs the daemon in the foreground. `--query --json` only inspects the current instance; `--ensure` attaches to an existing healthy instance or starts one; `--stop` shuts down the reachable instance for the selected home. If a live instance's identity cannot be verified, stop or upgrade it before Kiki will start another. `--idle-exit` defaults to `30m`; active client leases (periodically renewed indications that a client is still using the daemon) and running dispatches keep it alive. Explicit `--idle-exit 0ms` keeps a newly started daemon running until you stop it. The TUI attaches or starts the same way after workspace trust.
22
22
 
23
- ## Run the compatible foreground server
23
+ ## Open it from a browser on another device
24
24
 
25
- Use `kiki web` when a foreground process must serve the browser UI and the REST/WebSocket API:
25
+ `kiki web` no longer runs a foreground server of its own. It finds this home's shared daemon (starting one first, kept running until you stop it, if none is reachable), turns on Web access there, prints a single-use entry link, and returns:
26
26
 
27
27
  ```sh
28
- kiki web # run the server in the foreground and open the browser
29
- kiki web --no-open # run the server only, don't open the browser
30
- kiki web --port 58628 # pick a specific bind port
28
+ kiki web # turn on temporary Web access, print the link and open it here
29
+ kiki web --no-open # print the link only
30
+ kiki web --json # status and link as JSON for scripts
31
31
  ```
32
32
 
33
- The server binds to `127.0.0.1:58627` by default (loopback only). If the port is taken it automatically retries with the next one, so multiple instances can coexist on the same machine; each instance registers under `~/.kiki/server/instances/`. The startup banner prints the access URL and the plaintext token:
34
-
35
- ```text
36
- Local: http://127.0.0.1:58627/#token=...
37
- Token: ...
38
- Stop: Ctrl+C
39
- ```
40
-
41
- The server runs in the foreground; press `Ctrl-C` for a clean shutdown. For the full option list such as `--host` and `--log-level`, see the [kiki command reference](../reference/command.md#kiki-web).
33
+ The daemon itself listens only on `127.0.0.1`. Without `--port`, Web access reuses the daemon's local port; `--host`, `--port`, and `--public-url` open a separate listener for browsers only. The terminal output never contains `#token=` or the local-owner capability. See [Use Kiki in a browser](#use-kiki-in-a-browser) below for sessions, revocation, and network options, and the [kiki command reference](../reference/command.md#kiki-web) for every option.
42
34
 
43
35
  ## Authentication
44
36
 
@@ -49,42 +41,42 @@ Remote GUI access additionally requires the target's inbound gate to be enabled,
49
41
  For a trusted local client, carry the local-owner capability as follows:
50
42
 
51
43
  - **REST**: the `Authorization: Bearer <token>` request header.
52
- - **Kiki GUI**: the URL in the startup banner carries a `#token=` fragment, so opening it in a browser completes sign-in automatically. The fragment is never sent to the server.
44
+ - **Kiki GUI**: the desktop GUI and local launchers connect directly with the local-owner capability; a `#token=` fragment in the address is also accepted and is never sent to the server. A browser on another device does not use this path; it signs in with a single-use [Web access](#use-kiki-in-a-browser) link.
53
45
  - **WebSocket**: clients that can set headers use `Authorization: Bearer`; clients that cannot (such as browsers) pass the token in the handshake subprotocol as `kimi-code.bearer.<token>`.
54
46
 
55
47
  If the remote owner token leaks, run `kiki web rotate-token`: it replaces `server.token`, invalidates the old remote credential and stops affected peer streams without a restart. It does not rotate `server.local-owner`, so treat exposure of that file as a compromise of local access.
56
48
 
57
- The desktop GUI first checks the instance registry and attaches to an existing server with its local-owner capability; only when none is found does it start its own sidecar. Supported local clients in the same home therefore share the same sessions, regardless of which launcher started the server.
49
+ The desktop GUI discovers local instances through its native launcher and authenticates with the local-owner capability. It verifies the service identity and connection protocol before attaching. Different desktop and service builds can connect when the protocol is compatible; status and diagnostics show the service's actual build. If an identified service has an incompatible protocol, Kiki reports the problem instead of starting a second service. When no instance is found, it starts its bundled backend.
50
+
51
+ After a backend restart or port/token change, the desktop automatically rediscovers the service and verifies the original home, current space, and authentication mode. Temporary failures retry with exponential backoff starting at 1 second and capped at 10 seconds. The draft, current session route, and reading position remain in place. A candidate from another home, space, or authentication mode is rejected while the original view stays open.
52
+
53
+ Supported local clients in the same home share the same sessions, regardless of which launcher started the server.
58
54
 
59
55
  ::: warning Note
60
56
  Two independently provisioned runtimes that do not trust each other — separate services with their own host identity and authority domain — must not share a writable `KIKI_HOME`, must not copy session directories between their homes, and must not copy `device_id` to impersonate the same host. Session indexes, thread attribution, and permission boundaries all depend on a home having a unique identity. The shared daemon, TUI, desktop GUI, and coexisting server instances inside one home are supported and unaffected.
61
57
  :::
62
58
 
63
- Binding a non-loopback address (`--host`, including bare `--host`, which targets `0.0.0.0`) requires either a TLS-terminating reverse proxy in front of the server or `--insecure-no-tls`; without one of those the server refuses to start. Once it is running on a non-loopback address, you may set `KIKI_PASSWORD` as an additional owner credential; it does not replace the local-owner capability or the per-source grant. The server rate-limits authentication failures automatically.
64
-
65
- ::: danger
66
- `--dangerous-bypass-auth` still exposes legacy APIs without authentication: anyone who can reach the port can control your sessions, filesystem and shell. Connection management and forwarding remain local-owner-only, and this mode cannot accept peers, enable effective inbound access or issue new grants. Saved allow lists are retained but inactive. Only use it on trusted networks or behind your own authenticating proxy. See the [kiki command reference](../reference/command.md#kiki-web).
67
- :::
59
+ Binding the Web access listener to a non-loopback address (`--host`, including bare `--host`, which targets `0.0.0.0`) requires either `--public-url` pointing at an HTTPS TLS-terminating reverse proxy or `--insecure-no-tls`; without one of those Web access refuses to turn on. You may set `KIKI_PASSWORD` as an additional owner credential; it does not replace the local-owner capability or the per-source grant. The server rate-limits authentication failures automatically.
68
60
 
69
61
  ## Use Kiki in a browser
70
62
 
71
63
  Web access is a door into **this** Kiki from a browser on another device. Whoever holds a link can use the Kiki in full, with the same access you have — it is not a read-only share, and a temporary entry is temporary only in how long it stays open.
72
64
 
73
- Turn it on from the GUI under **Settings → Spaces → Web access**, or from the command line:
65
+ Turn it on from the GUI under **Settings → Connection & remote → Access from elsewhere → Web access**, or from the terminal:
74
66
 
75
67
  ```sh
76
- kiki web --temporary # open for eight hours, then close by itself
68
+ kiki web --temporary # the default: open for eight hours, then close by itself
77
69
  kiki web --persistent # stay open until you turn it off
78
70
  kiki web --status # is it on, and which browsers are signed in
79
71
  kiki web --off # close it without stopping Kiki or its tasks
80
72
  kiki web --revoke [session-id] # sign out one browser, or all of them
81
- kiki web --host --port 58627 # reachable from another device on this network
82
- kiki web --insecure-no-tls # allow plain LAN HTTP (see the warning below)
73
+ kiki web --host --public-url https://kiki.example.test # reachable from other devices through a TLS-terminating reverse proxy
74
+ kiki web --host --insecure-no-tls # allow plain LAN HTTP (see the warning below)
83
75
  ```
84
76
 
85
77
  In the TUI the same operations are `/web temporary|persistent|status|off|link|revoke [id]`, with `--host`, `--port`, `--public-url`, `--insecure-no-tls`, and `--no-open`.
86
78
 
87
- Each run prints a single-use link that signs a browser in. Kiki redeems it for a session cookie held by the browser itself (HttpOnly, `SameSite=Strict`, host-only, `Secure` over HTTPS); no session or root token is ever placed in JavaScript, `localStorage`, or a URL query string. The server keeps only a digest, so a lost link is replaced by a new one rather than looked up. An already-authorized browser keeps working across service restarts; a new device needs a new link.
79
+ Each run prints a single-use link that is valid for ten minutes and signs in one browser; **New link for another device** in the GUI and `/web link` in the TUI each sign a fresh one. Kiki redeems it for a session cookie held by the browser itself (HttpOnly, `SameSite=Strict`, host-only, `Secure` over HTTPS); no session or root token is ever placed in JavaScript, `localStorage`, or a URL query string. The server keeps only a digest, so a lost, expired, or used link is replaced by a new one rather than looked up. In always-on mode an already-authorized browser keeps working across service restarts and expires after 30 days unused; in temporary mode browser sessions end with that opening. A new device needs a new link.
88
80
 
89
81
  Turning Web access off revokes every link and every browser session, and closes the open streams. It does not stop the daemon, the desktop app, or the TUI, and it does not cancel work already started. `kiki serve` and the desktop app are unaffected either way.
90
82
 
@@ -8,9 +8,9 @@ MCP tool results can carry embedded media. When the current model cannot take an
8
8
 
9
9
  Kiki can also serve its native tools to an explicitly authorized MCP client. The feature is available by default; it does not start a listener or authorize a client until you configure access.
10
10
 
11
- 1. In Settings → Connection & remote → Access from elsewhere, add an external client and choose its shared tools and permission ceiling. These are access settings, not a workspace or conversation.
11
+ 1. In Settings → Connection & remote → Access from elsewhere → External clients, add an external client and choose its shared tools and permission ceiling. These are access settings, not a workspace or conversation.
12
12
  2. Create a conversation in Kiki, choose that external client, and select the workspace, worktree, Profile, and permission mode there. Kiki binds the resolved workspace to the conversation; the client cannot supply an arbitrary working directory.
13
- 3. Configure the other application's MCP entry with the local command below, replacing `CONNECTION_ID` with the connection's ID. For remote access, enable the MCP listener in connection services and use its displayed HTTPS URL; approve the client's authorization request in Kiki.
13
+ 3. Configure the other application's MCP entry with the local command below, replacing `CONNECTION_ID` with the connection's ID. For remote access, enable the MCP listener on the same tab and use its displayed HTTPS URL; approve the client's authorization request in Kiki.
14
14
 
15
15
  ```sh
16
16
  kiki mcp --client CONNECTION_ID --tools
@@ -43,7 +43,7 @@ Run `/kiki-ops help me configure MCP` in the TUI to interactively add, edit, or
43
43
 
44
44
  Deleting a server from the configuration does not interrupt open sessions: the server stays listed in `/mcp` as `removed`, its tools remain visible there, and calls to them fail with a removal notice, while new sessions do not register the tools at all. Conversely, a server added mid-session — by editing `mcp.json` or installing a plugin — is not registered in already-open sessions; it only joins sessions created later.
45
45
 
46
- When Kiki finds project-level MCP servers in an untrusted folder, it shows each server's transport and launch target in the workspace trust prompt. The prompt defaults to `Trust this folder`; review the listed command and arguments or remote URL before confirming. Trusting the folder enables the project-level MCP servers for that workspace.
46
+ Before trusting a folder, the TUI shows project MCP launch targets and their defining configuration files, configured additional directories and their source, and available AGENTS.md, skill and agent-profile sources. It inspects these sources without connecting MCP servers. If inspection fails, the prompt shows a warning rather than implying that no configuration exists. The prompt defaults to `Trust this folder`; review the commands, arguments, remote URLs and paths before confirming. Trusting the folder enables its project-level MCP servers and configured additional directories.
47
47
 
48
48
  Structure of `mcp.json`:
49
49
 
@@ -81,6 +81,10 @@ Optional fields:
81
81
  | `enabledTools` | `string[]` | All | Tool allowlist |
82
82
  | `disabledTools` | `string[]` | All | Tool blocklist |
83
83
 
84
+ On Windows, `command` can be an executable path or a name such as `node` or `npx`. Names are resolved through the child's effective `PATH`/`PATHEXT`, not by searching its working directory; `env` overrides such as `Path` replace inherited values without case sensitivity. To run a file in the child working directory, give `command` an explicit relative path such as `.\server.cmd`. Keep paths unquoted in `command` and put each argument in its own `args` entry, including arguments containing spaces, quotes or `&`.
85
+
86
+ Kiki launches Windows `.cmd`/`.bat` wrappers automatically; do not add `cmd /c` for them. Batch-wrapper arguments cannot contain NUL or line breaks; for multiline arguments, launch the underlying executable directly, such as `node` with the script path as its first argument. A missing command reports `ENOENT`; install it or provide its absolute path.
87
+
84
88
  You do not have to set the connection timeout or the single tool-call timeout per server: `[mcp] startup_timeout_ms` / `[mcp] tool_timeout_ms` in `config.toml` or the `KIKI_MCP_STARTUP_TIMEOUT_MS` / `KIKI_MCP_TOOL_TIMEOUT_MS` environment variables change the global defaults. Precedence is: per-server field > environment variable > `config.toml` > built-in default. See [Configuration files](../configuration/config-files.md#mcp).
85
89
 
86
90
  HTTP and SSE servers support providing static credentials via `headers` or `bearerTokenEnvVar`. When OAuth is needed, run `/kiki-ops help me log in to MCP <server-name>` to complete browser-based authorization. If the server's authorization metadata says it supports `offline_access`, Kiki asks for that scope during login so the authorization can be refreshed later without a new sign-in; otherwise your original scopes are used as they are. A server that advertises the scope may still show an extra consent page, and does not guarantee it issues a refresh token. An already-signed-in server keeps its existing grant and goes on refreshing it — a new scope does not sign you out.
@@ -125,9 +129,9 @@ In YOLO mode, MCP tool calls are automatically approved. Only use this mode when
125
129
 
126
130
  ## Let an external client use Kiki tools
127
131
 
128
- External clients reverse the direction described above: an MCP-capable model calls Kiki's native file, media, agent, task, History and authorized Memory tools. Kiki keeps the tool activity in a normal session without binding a local model to its main agent. This does not automatically import the external chat, its thinking, or its usage.
132
+ External clients reverse the direction described above: an MCP-capable model calls Kiki's native file, media, agent, task, History and authorized Memory tools. Kiki keeps the tool activity in a normal session without binding a local model to its main agent. This does not automatically import the external chat, its thinking, or its usage. Local programs can use the same grants through [HTTP and the JSON tools CLI](./script-tools.md), without MCP.
129
133
 
130
- Open **Settings → Connection & remote → Access from elsewhere** to create a named connection, select the shared workspace and tools, and choose a permission mode. The capability is available by default; setting `external_clients = false` under `[experimental]`, or `KIKI_EXPERIMENTAL_EXTERNAL_CLIENTS=0`, keeps it off, and changing that override requires a host restart. Leave local commands off unless the client needs them. A connection is a permission grant, not a chat: initialization and tool discovery do not create business sessions.
134
+ Open **Settings → Connection & remote → Access from elsewhere → External clients** to create a named connection and choose its shared tools and permission ceiling. The workspace is chosen when you create a conversation for that client. The capability is available by default; setting `external_clients = false` under `[experimental]`, or `KIKI_EXPERIMENTAL_EXTERNAL_CLIENTS=0`, keeps it off, and changing that override requires a host restart. Leave local commands off unless the client needs them. A connection is a permission grant, not a chat: initialization and tool discovery do not create business sessions.
131
135
 
132
136
  ### Connect a local client
133
137