kiokuko-dsh 0.2.1 → 0.2.2

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 (286) hide show
  1. package/PERMISSIONS.md +21 -28
  2. package/README.ja.md +5 -2
  3. package/README.md +8 -2
  4. package/THIRD_PARTY_NOTICES.md +8 -0
  5. package/dist/client.cjs +2248 -1383
  6. package/dist/client.d.ts +3 -1
  7. package/dist/client.d.ts.map +1 -1
  8. package/dist/deep-thinker/configuration.d.ts.map +1 -1
  9. package/dist/deep-thinker/configuration.js +8 -5
  10. package/dist/deep-thinker/configuration.js.map +1 -1
  11. package/dist/deep-thinker/core/contracts.d.ts +107 -13
  12. package/dist/deep-thinker/core/contracts.d.ts.map +1 -1
  13. package/dist/deep-thinker/core/contracts.js +4 -2
  14. package/dist/deep-thinker/core/contracts.js.map +1 -1
  15. package/dist/deep-thinker/memory-finalizer.d.ts +10 -10
  16. package/dist/deep-thinker/memory-finalizer.js +2 -2
  17. package/dist/deep-thinker/memory-finalizer.js.map +1 -1
  18. package/dist/deep-thinker/report.d.ts +1 -1
  19. package/dist/deep-thinker/store.d.ts +10 -10
  20. package/dist/deep-thinker/store.d.ts.map +1 -1
  21. package/dist/deep-thinker/store.js +2 -2
  22. package/dist/deep-thinker/store.js.map +1 -1
  23. package/dist/dsh/completion-verifiers.d.ts +26 -0
  24. package/dist/dsh/completion-verifiers.d.ts.map +1 -0
  25. package/dist/dsh/completion-verifiers.js +9 -0
  26. package/dist/dsh/completion-verifiers.js.map +1 -0
  27. package/dist/dsh/config.d.ts +5 -1
  28. package/dist/dsh/config.d.ts.map +1 -1
  29. package/dist/dsh/core/host.d.ts +1 -1
  30. package/dist/dsh/core/host.d.ts.map +1 -1
  31. package/dist/dsh/core/host.js +49 -4
  32. package/dist/dsh/core/host.js.map +1 -1
  33. package/dist/dsh/core/index.d.ts +4 -4
  34. package/dist/dsh/core/tasks.d.ts.map +1 -1
  35. package/dist/dsh/core/tasks.js +7 -0
  36. package/dist/dsh/core/tasks.js.map +1 -1
  37. package/dist/dsh/core-runtime.d.ts +1 -0
  38. package/dist/dsh/core-runtime.d.ts.map +1 -1
  39. package/dist/dsh/core-runtime.js +4 -1
  40. package/dist/dsh/core-runtime.js.map +1 -1
  41. package/dist/dsh/decisions/config.d.ts +2 -2
  42. package/dist/dsh/enno-delegation.js +2 -2
  43. package/dist/dsh/enno-delegation.js.map +1 -1
  44. package/dist/dsh/execution-command.d.ts +4 -0
  45. package/dist/dsh/execution-command.d.ts.map +1 -0
  46. package/dist/dsh/execution-command.js +52 -0
  47. package/dist/dsh/execution-command.js.map +1 -0
  48. package/dist/dsh/execution-journal.d.ts +17 -0
  49. package/dist/dsh/execution-journal.d.ts.map +1 -0
  50. package/dist/dsh/execution-journal.js +69 -0
  51. package/dist/dsh/execution-journal.js.map +1 -0
  52. package/dist/dsh/execution-result.d.ts +20 -0
  53. package/dist/dsh/execution-result.d.ts.map +1 -0
  54. package/dist/dsh/execution-result.js +7 -0
  55. package/dist/dsh/execution-result.js.map +1 -0
  56. package/dist/dsh/execution-selection.d.ts +149 -22
  57. package/dist/dsh/execution-selection.d.ts.map +1 -1
  58. package/dist/dsh/execution-selection.js +18 -6
  59. package/dist/dsh/execution-selection.js.map +1 -1
  60. package/dist/dsh/host-adapter/admission.d.ts.map +1 -1
  61. package/dist/dsh/host-adapter/admission.js +20 -0
  62. package/dist/dsh/host-adapter/admission.js.map +1 -1
  63. package/dist/dsh/host-adapter/turn-state.js +1 -1
  64. package/dist/dsh/host-adapter/turn-state.js.map +1 -1
  65. package/dist/dsh/host-adapter.d.ts.map +1 -1
  66. package/dist/dsh/host-adapter.js +26 -13
  67. package/dist/dsh/host-adapter.js.map +1 -1
  68. package/dist/dsh/index.d.ts +4 -2
  69. package/dist/dsh/index.d.ts.map +1 -1
  70. package/dist/dsh/index.js +7 -0
  71. package/dist/dsh/index.js.map +1 -1
  72. package/dist/dsh/intake-gate.d.ts +1 -0
  73. package/dist/dsh/intake-gate.d.ts.map +1 -1
  74. package/dist/dsh/intake-gate.js +9 -1
  75. package/dist/dsh/intake-gate.js.map +1 -1
  76. package/dist/dsh/lisp/approval.d.ts +2 -1
  77. package/dist/dsh/lisp/approval.d.ts.map +1 -1
  78. package/dist/dsh/lisp/approval.js +4 -3
  79. package/dist/dsh/lisp/approval.js.map +1 -1
  80. package/dist/dsh/lisp/candidate.d.ts +3 -3
  81. package/dist/dsh/lisp/code-intelligence-contracts.d.ts +78 -0
  82. package/dist/dsh/lisp/code-intelligence-contracts.d.ts.map +1 -0
  83. package/dist/dsh/lisp/code-intelligence-contracts.js +54 -0
  84. package/dist/dsh/lisp/code-intelligence-contracts.js.map +1 -0
  85. package/dist/dsh/lisp/code-intelligence-provider.d.ts +116 -0
  86. package/dist/dsh/lisp/code-intelligence.d.ts +13 -0
  87. package/dist/dsh/lisp/code-intelligence.d.ts.map +1 -0
  88. package/dist/dsh/lisp/code-intelligence.js +181 -0
  89. package/dist/dsh/lisp/code-intelligence.js.map +1 -0
  90. package/dist/dsh/lisp/coding-choice.d.ts +1 -0
  91. package/dist/dsh/lisp/coding-choice.d.ts.map +1 -1
  92. package/dist/dsh/lisp/coding-choice.js +17 -6
  93. package/dist/dsh/lisp/coding-choice.js.map +1 -1
  94. package/dist/dsh/lisp/compiled-cache.d.ts.map +1 -1
  95. package/dist/dsh/lisp/compiled-cache.js +3 -2
  96. package/dist/dsh/lisp/compiled-cache.js.map +1 -1
  97. package/dist/dsh/lisp/contracts.d.ts +4 -0
  98. package/dist/dsh/lisp/contracts.d.ts.map +1 -1
  99. package/dist/dsh/lisp/contracts.js +1 -0
  100. package/dist/dsh/lisp/contracts.js.map +1 -1
  101. package/dist/dsh/lisp/manager.d.ts +8 -1
  102. package/dist/dsh/lisp/manager.d.ts.map +1 -1
  103. package/dist/dsh/lisp/manager.js +78 -24
  104. package/dist/dsh/lisp/manager.js.map +1 -1
  105. package/dist/dsh/lisp/model-result.d.ts.map +1 -1
  106. package/dist/dsh/lisp/model-result.js +35 -1
  107. package/dist/dsh/lisp/model-result.js.map +1 -1
  108. package/dist/dsh/lisp/proposal-batch.d.ts +2 -0
  109. package/dist/dsh/lisp/proposal-batch.d.ts.map +1 -1
  110. package/dist/dsh/lisp/proposal-batch.js +32 -2
  111. package/dist/dsh/lisp/proposal-batch.js.map +1 -1
  112. package/dist/dsh/lisp/sandbox.d.ts +3 -0
  113. package/dist/dsh/lisp/sandbox.d.ts.map +1 -1
  114. package/dist/dsh/lisp/sandbox.js +13 -6
  115. package/dist/dsh/lisp/sandbox.js.map +1 -1
  116. package/dist/dsh/lisp/surface.d.ts +1 -1
  117. package/dist/dsh/lisp/surface.d.ts.map +1 -1
  118. package/dist/dsh/lisp/surface.js +74 -20
  119. package/dist/dsh/lisp/surface.js.map +1 -1
  120. package/dist/dsh/lisp/worker.d.ts +2 -0
  121. package/dist/dsh/lisp/worker.d.ts.map +1 -1
  122. package/dist/dsh/lisp/worker.js +7 -5
  123. package/dist/dsh/lisp/worker.js.map +1 -1
  124. package/dist/dsh/memory-application.d.ts +1 -1
  125. package/dist/dsh/memory-application.d.ts.map +1 -1
  126. package/dist/dsh/memory-application.js +4 -3
  127. package/dist/dsh/memory-application.js.map +1 -1
  128. package/dist/dsh/model-auto/candidates.d.ts.map +1 -1
  129. package/dist/dsh/model-auto/candidates.js +31 -22
  130. package/dist/dsh/model-auto/candidates.js.map +1 -1
  131. package/dist/dsh/model-configuration.d.ts +145 -2
  132. package/dist/dsh/model-configuration.d.ts.map +1 -1
  133. package/dist/dsh/model-configuration.js +10 -3
  134. package/dist/dsh/model-configuration.js.map +1 -1
  135. package/dist/dsh/model-selection-ui.d.ts.map +1 -1
  136. package/dist/dsh/model-selection-ui.js +7 -2
  137. package/dist/dsh/model-selection-ui.js.map +1 -1
  138. package/dist/dsh/models/config-store.d.ts +8 -0
  139. package/dist/dsh/models/config-store.d.ts.map +1 -0
  140. package/dist/dsh/models/config-store.js +49 -0
  141. package/dist/dsh/models/config-store.js.map +1 -0
  142. package/dist/dsh/models/contracts.d.ts +107 -0
  143. package/dist/dsh/models/contracts.d.ts.map +1 -0
  144. package/dist/dsh/models/contracts.js +104 -0
  145. package/dist/dsh/models/contracts.js.map +1 -0
  146. package/dist/dsh/models/metadata.d.ts +7 -0
  147. package/dist/dsh/models/metadata.d.ts.map +1 -0
  148. package/dist/dsh/models/metadata.js +13 -0
  149. package/dist/dsh/models/metadata.js.map +1 -0
  150. package/dist/dsh/models/profiles.d.ts +10 -0
  151. package/dist/dsh/models/profiles.d.ts.map +1 -0
  152. package/dist/dsh/models/profiles.js +176 -0
  153. package/dist/dsh/models/profiles.js.map +1 -0
  154. package/dist/dsh/models/service.d.ts +97 -0
  155. package/dist/dsh/models/service.d.ts.map +1 -0
  156. package/dist/dsh/models/service.js +518 -0
  157. package/dist/dsh/models/service.js.map +1 -0
  158. package/dist/dsh/models/surface.d.ts +8 -0
  159. package/dist/dsh/models/surface.d.ts.map +1 -0
  160. package/dist/dsh/models/surface.js +162 -0
  161. package/dist/dsh/models/surface.js.map +1 -0
  162. package/dist/dsh/models/vendor/THIRD_PARTY_NOTICES.txt +134 -0
  163. package/dist/dsh/models/vendor/abortable.d.ts +3 -0
  164. package/dist/dsh/models/vendor/abortable.d.ts.map +1 -0
  165. package/dist/dsh/models/vendor/abortable.js +10 -0
  166. package/dist/dsh/models/vendor/abortable.js.map +1 -0
  167. package/dist/dsh/models/vendor/auth-contract.d.ts +67 -0
  168. package/dist/dsh/models/vendor/auth-contract.d.ts.map +1 -0
  169. package/dist/dsh/models/vendor/auth-contract.js +2 -0
  170. package/dist/dsh/models/vendor/auth-contract.js.map +1 -0
  171. package/dist/dsh/models/vendor/credentials.d.ts +58 -0
  172. package/dist/dsh/models/vendor/credentials.d.ts.map +1 -0
  173. package/dist/dsh/models/vendor/credentials.js +205 -0
  174. package/dist/dsh/models/vendor/credentials.js.map +1 -0
  175. package/dist/dsh/models/vendor/nous-oauth.d.ts +6 -0
  176. package/dist/dsh/models/vendor/nous-oauth.d.ts.map +1 -0
  177. package/dist/dsh/models/vendor/nous-oauth.js +113 -0
  178. package/dist/dsh/models/vendor/nous-oauth.js.map +1 -0
  179. package/dist/dsh/models/vendor/opencode-adapter.d.ts +38 -0
  180. package/dist/dsh/models/vendor/opencode-adapter.d.ts.map +1 -0
  181. package/dist/dsh/models/vendor/opencode-adapter.js +207 -0
  182. package/dist/dsh/models/vendor/opencode-adapter.js.map +1 -0
  183. package/dist/dsh/models/vendor/opencode-catalog.d.ts +73 -0
  184. package/dist/dsh/models/vendor/opencode-catalog.d.ts.map +1 -0
  185. package/dist/dsh/models/vendor/opencode-catalog.js +253 -0
  186. package/dist/dsh/models/vendor/opencode-catalog.js.map +1 -0
  187. package/dist/dsh/models/vendor/opencode-codec.d.ts +7 -0
  188. package/dist/dsh/models/vendor/opencode-codec.d.ts.map +1 -0
  189. package/dist/dsh/models/vendor/opencode-codec.js +107 -0
  190. package/dist/dsh/models/vendor/opencode-codec.js.map +1 -0
  191. package/dist/dsh/models/vendor/opencode-owned.generated.d.ts +114 -0
  192. package/dist/dsh/models/vendor/opencode-owned.generated.d.ts.map +1 -0
  193. package/dist/dsh/models/vendor/opencode-owned.generated.js +2867 -0
  194. package/dist/dsh/models/vendor/opencode-owned.generated.js.map +1 -0
  195. package/dist/dsh/models/vendor/opencode-replay.d.ts +17 -0
  196. package/dist/dsh/models/vendor/opencode-replay.d.ts.map +1 -0
  197. package/dist/dsh/models/vendor/opencode-replay.js +147 -0
  198. package/dist/dsh/models/vendor/opencode-replay.js.map +1 -0
  199. package/dist/dsh/models/vendor/opencode-sdk.d.ts +6 -0
  200. package/dist/dsh/models/vendor/opencode-sdk.d.ts.map +1 -0
  201. package/dist/dsh/models/vendor/opencode-sdk.js +49915 -0
  202. package/dist/dsh/models/vendor/opencode-sdk.js.map +7 -0
  203. package/dist/dsh/models/vendor/opencode-transport.d.ts +6 -0
  204. package/dist/dsh/models/vendor/opencode-transport.d.ts.map +1 -0
  205. package/dist/dsh/models/vendor/opencode-transport.js +70 -0
  206. package/dist/dsh/models/vendor/opencode-transport.js.map +1 -0
  207. package/dist/dsh/models/vendor/pi-ai.d.ts +23 -0
  208. package/dist/dsh/models/vendor/pi-ai.d.ts.map +1 -0
  209. package/dist/dsh/models/vendor/pi-ai.js +27 -0
  210. package/dist/dsh/models/vendor/pi-ai.js.map +1 -0
  211. package/dist/dsh/modules/lisp.d.ts +1 -1
  212. package/dist/dsh/modules/lisp.d.ts.map +1 -1
  213. package/dist/dsh/modules/lisp.js +1 -1
  214. package/dist/dsh/modules/lisp.js.map +1 -1
  215. package/dist/dsh/native-model-catalog.d.ts.map +1 -1
  216. package/dist/dsh/native-model-catalog.js +4 -3
  217. package/dist/dsh/native-model-catalog.js.map +1 -1
  218. package/dist/dsh/node-tap-summary.d.ts +6 -1
  219. package/dist/dsh/node-tap-summary.d.ts.map +1 -1
  220. package/dist/dsh/node-tap-summary.js +27 -2
  221. package/dist/dsh/node-tap-summary.js.map +1 -1
  222. package/dist/dsh/on-demand-intake.d.ts +1 -1
  223. package/dist/dsh/on-demand-intake.d.ts.map +1 -1
  224. package/dist/dsh/on-demand-intake.js +23 -11
  225. package/dist/dsh/on-demand-intake.js.map +1 -1
  226. package/dist/dsh/owned-evidence.d.ts +49 -0
  227. package/dist/dsh/owned-evidence.d.ts.map +1 -0
  228. package/dist/dsh/owned-evidence.js +69 -0
  229. package/dist/dsh/owned-evidence.js.map +1 -0
  230. package/dist/dsh/owned-execution.d.ts +98 -0
  231. package/dist/dsh/owned-execution.d.ts.map +1 -0
  232. package/dist/dsh/owned-execution.js +523 -0
  233. package/dist/dsh/owned-execution.js.map +1 -0
  234. package/dist/dsh/plan-transition.d.ts +5 -0
  235. package/dist/dsh/plan-transition.d.ts.map +1 -0
  236. package/dist/dsh/plan-transition.js +34 -0
  237. package/dist/dsh/plan-transition.js.map +1 -0
  238. package/dist/dsh/session-memory-finalizer.d.ts.map +1 -1
  239. package/dist/dsh/session-memory-finalizer.js +46 -3
  240. package/dist/dsh/session-memory-finalizer.js.map +1 -1
  241. package/dist/dsh/setup.d.ts +1 -1
  242. package/dist/dsh/setup.d.ts.map +1 -1
  243. package/dist/dsh/setup.js +2 -0
  244. package/dist/dsh/setup.js.map +1 -1
  245. package/dist/dsh/skill-prompts.json +1 -1
  246. package/dist/dsh/task-completion.d.ts +1 -0
  247. package/dist/dsh/task-completion.d.ts.map +1 -1
  248. package/dist/dsh/task-completion.js +19 -19
  249. package/dist/dsh/task-completion.js.map +1 -1
  250. package/dist/enno-oduno/schemas.d.ts +9 -9
  251. package/dist/enno-oduno/store.d.ts.map +1 -1
  252. package/dist/enno-oduno/store.js +12 -0
  253. package/dist/enno-oduno/store.js.map +1 -1
  254. package/dist/locale/en.json +1 -1
  255. package/dist/locale/ja.json +1 -1
  256. package/dist/locale/ko.json +1 -1
  257. package/dist/locale/zh-CN.json +1 -1
  258. package/dist/memory/application.d.ts +2 -1
  259. package/dist/memory/application.d.ts.map +1 -1
  260. package/dist/memory/application.js +26 -12
  261. package/dist/memory/application.js.map +1 -1
  262. package/dist/memory/evidence.d.ts +2 -0
  263. package/dist/memory/evidence.d.ts.map +1 -1
  264. package/dist/memory/evidence.js +3 -1
  265. package/dist/memory/evidence.js.map +1 -1
  266. package/dist/model-tools/contracts.d.ts +4 -4
  267. package/dist/models-client.cjs +635 -0
  268. package/dist/models-client.d.ts +26 -0
  269. package/dist/models-client.d.ts.map +1 -0
  270. package/dist/models-client.js +642 -0
  271. package/dist/models-client.js.map +1 -0
  272. package/docs/code-intelligence.md +149 -0
  273. package/docs/dsh-auth-LICENSE.txt +22 -0
  274. package/docs/dsh-auth-provenance.md +25 -0
  275. package/docs/dsh-plugin.md +19 -0
  276. package/docs/kiokuko-models.md +66 -0
  277. package/docs/lisp.md +107 -56
  278. package/docs/model-selection.ja.md +7 -9
  279. package/docs/model-selection.md +14 -12
  280. package/docs/owned-execution.md +99 -0
  281. package/lisp/supervisor.mjs +8 -2
  282. package/lisp/tools.lisp +31 -3
  283. package/migrations/035_owned_execution.sql +19 -0
  284. package/package.json +46 -11
  285. package/skills/kiokuko-lisp/SKILL.md +49 -67
  286. package/skills/kiokuko-soul/SKILL.md +7 -28
@@ -0,0 +1 @@
1
+ {"version":3,"file":"models-client.js","sourceRoot":"","sources":["../src/models-client.ts"],"names":[],"mappings":"AAkCA,SAAS,SAAS,CAAC,KAAc;IAC/B,OAAO,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;AAChE,CAAC;AACD,MAAM,CAAC,MAAM,MAAM,GAAG,CAAC,OAAO,EAAE,QAAQ,CAAU,CAAC;AACnD,MAAM,UAAU,KAAK,CAAC,GAAqB;IACzC,iBAAiB,CAAC,GAAG,CAAC,CAAC;AACzB,CAAC;AAED,MAAM,SAAS,GAAG,gBAAgB,CAAC;AACnC,MAAM,yBAAyB,GAAsC;IACnE,MAAM,EAAE,CAAC,YAAY,EAAE,2BAA2B,EAAE,WAAW,CAAC;IAChE,KAAK,EAAE,CAAC,OAAO,EAAE,uCAAuC,EAAE,WAAW,CAAC;IACtE,MAAM,EAAE,CAAC,QAAQ,EAAE,2BAA2B,EAAE,UAAU,CAAC;IAC3D,GAAG,EAAE,CAAC,KAAK,EAAE,qBAAqB,EAAE,kBAAkB,CAAC;IACvD,QAAQ,EAAE,CAAC,UAAU,EAAE,6BAA6B,EAAE,kBAAkB,CAAC;IACzE,QAAQ,EAAE,CAAC,cAAc,EAAE,4BAA4B,EAAE,kBAAkB,CAAC;IAC5E,aAAa,EAAE;QACb,aAAa;QACb,+BAA+B;QAC/B,kBAAkB;KACnB;IACD,UAAU,EAAE;QACV,YAAY;QACZ,8BAA8B;QAC9B,kBAAkB;KACnB;IACD,IAAI,EAAE;QACJ,eAAe;QACf,2CAA2C;QAC3C,kBAAkB;KACnB;IACD,MAAM,EAAE,CAAC,QAAQ,EAAE,8BAA8B,EAAE,kBAAkB,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AAC,CAAC;YACb,KAAK,EAAE,EAAE,aAAa,EAAE,KAAK,EAAE;YAC/B,WAAW,EAAE,KAAK;YAClB,mBAAmB,EAAE,MAAM;SAC5B,CAAC;KACH,EACD,mBAAmB,CACpB,CACF,CAAC;IACF,GAAG,CAAC,KAAK,CAAC,MAAM,CAAC,eAAe,EAAE,GAAG,EAAE,CACrC,GAAG,CAAC,KAAK,CAAC,QAAQ,CAChB;QACE,IAAI,EAAE,eAAe;QACrB,EAAE,EAAE,wBAAwB;QAC5B,MAAM,EAAE,SAAS;QACjB,MAAM,EAAE,GAAG,EAAE,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE,aAAa,EAAE,KAAK,EAAE,EAAE,WAAW,EAAE,KAAK,EAAE,CAAC;KACxE,EACD,mBAAmB,CACpB,CACF,CAAC;IACF,GAAG,CAAC,EAAE,CAAC,kBAAkB,EAAE,CAAC,SAAS,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE;QACrD,IAAI,IAAI,KAAK,SAAS,IAAI,MAAM,CAAC,IAAI,KAAK,SAAS;YACjD,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE;gBACjB,CAAC,CAAC,IAAI,GAAG,IAAI,CAAC;gBACd,CAAC,CAAC,SAAS,GAAG,SAAS,CAAC;YAC1B,CAAC,CAAC,CAAC;IACP,CAAC,CAAC,CAAC;IACH,GAAG,CAAC,MAAM,CACR,GAAG,EAAE,CACH,GAAG,CAAC,MAAM,CAAC,QAAQ,CAAC,SAAS,EAAE;QAC7B,EAAE,EAAE,EAAE,YAAY,EAAE,gBAAgB,EAAE;QACtC,EAAE,EAAE,EAAE,YAAY,EAAE,gBAAgB,EAAE;KACvC,CAAe,EAClB,uBAAuB,CACxB,CAAC;AACJ,CAAC"}
@@ -0,0 +1,149 @@
1
+ # Optional code intelligence
2
+
3
+ Kiokuko's `kioku.code` API consumes `CodeIntelligenceServiceV1` in the calling
4
+ agent's service realm. Tree-sitter, grammars, snapshots and language servers
5
+ belong to `@askdkc/dsh-lsp-server`. Core alone does not load them.
6
+
7
+ The published provider 0.1.12 does not expose V1. This repository includes a
8
+ [reproducible local upstream patch](../patches/code-intelligence/README.md), not a
9
+ published replacement. Installing the registry's 0.1.12 alone returns
10
+ `unavailable` with `provider_missing`; it does not enable this API.
11
+
12
+ ## macOS
13
+
14
+ Use Node >=24.16.0 and install SBCL:
15
+
16
+ ```sh
17
+ brew install sbcl
18
+ ```
19
+
20
+ The local acceptance path was exercised on macOS 27.0.1 arm64, Node 26.5.0,
21
+ SBCL 2.6.8, DSH 0.2.1-alpha.2, Cordis 4.0.5-alpha.1 and CLI 0.14.4. Both
22
+ development and the native Seatbelt-protected Lisp path are tested. A failed
23
+ sandbox probe keeps protected mode unavailable; it does not downgrade isolation.
24
+
25
+ ## Ubuntu 26.04
26
+
27
+ Use Node >=24.16.0 and install the development prerequisites:
28
+
29
+ ```sh
30
+ sudo apt update
31
+ sudo apt install sbcl git python3 build-essential
32
+ ```
33
+
34
+ The Ubuntu 26.04 CI job runs development-mode source and packed acceptance.
35
+ That job has not been executed in this local macOS checkout. Linux protected
36
+ mode needs the existing Bubblewrap, namespace and seccomp probes; this guide
37
+ does not claim a verified Ubuntu protected configuration.
38
+
39
+ ## Arch Linux
40
+
41
+ Use Node >=24.16.0 and install the development prerequisites:
42
+
43
+ ```sh
44
+ sudo pacman -Syu sbcl git python base-devel
45
+ ```
46
+
47
+ The Arch CI job runs the same development-mode source and packed acceptance.
48
+ That job has not been executed locally. Protected mode remains subject to the
49
+ existing Linux sandbox probes and separate acceptance.
50
+
51
+ ## Prepare and test the local preview
52
+
53
+ Run these from this repository after its dependencies and the existing pinned
54
+ `tests/fixtures/dsh-runtime` dependencies are installed:
55
+
56
+ ```sh
57
+ node scripts/prepare-code-provider.mjs
58
+ npm run test:code-intelligence
59
+ npm run test:code-intelligence:packed
60
+ ```
61
+
62
+ On an environment where only development is being tested:
63
+
64
+ ```sh
65
+ npm run test:code-intelligence -- --development-only
66
+ npm run test:code-intelligence:packed -- --development-only
67
+ ```
68
+
69
+ Preparation uses the reviewed official provider base and verifies the consumer
70
+ contract against it. It does not reset an existing checkout. The packed recipe
71
+ creates `.artifacts/code-intelligence/profile`, installs local provider/suite
72
+ tarballs with scripts disabled, verifies actual DSH bundle discovery, then mounts
73
+ CLI 0.14.4's host services and invokes the public Lisp tools. This is an isolated
74
+ acceptance fixture, without model credentials or the interactive TUI. It does not
75
+ change a live profile or prove a live browser session.
76
+
77
+ ## Activate a chosen profile
78
+
79
+ For Web, use the existing `web` profile. For CLI, use the existing `dsh-cli`
80
+ profile and its intended preset. Add both local artifacts to that same profile:
81
+
82
+ ```sh
83
+ dsh plugin --profile web add "kiokuko-dsh@file:/absolute/path/to/suite.tgz"
84
+ dsh plugin --profile web add "@askdkc/dsh-lsp-server@file:/absolute/path/to/provider.tgz"
85
+ dsh --profile web --dump-config
86
+ ```
87
+
88
+ For CLI replace `web` with `dsh-cli`, inspect the resulting preset rows, then
89
+ start `dsh --profile dsh-cli`. The preview tarballs are under
90
+ `.artifacts/code-intelligence/pack-suite` and `pack-provider`; use the actual
91
+ generated filenames. These are manual profile-changing commands, not actions
92
+ performed by the acceptance recipe. Do not install Tree-sitter or another
93
+ TypeScript server into Kiokuko.
94
+
95
+ Enable Lisp with `/kioku-lisp enable` in the intended session. First evaluate:
96
+
97
+ ```lisp
98
+ (kioku.code:capabilities)
99
+ ```
100
+
101
+ An accepted response reports `sourceKinds`, `limits`, `queryIds` and
102
+ `languageCapabilities`. Grammar support and negotiated semantic support are
103
+ separate. Capability inspection does not start a server: `server_not_ready`
104
+ can be reported until a semantic request starts and negotiates it. Missing
105
+ grammars and unconfigured languages remain unsupported. The preview distributes
106
+ JS, JSX, TS and TSX; it does not claim PHP, Blade, Svelte or Rust grammar support.
107
+ PHPantom and rust-analyzer remain prerequisites for their existing provider APIs.
108
+
109
+ Use [the bounded aggregation example](lisp.md#read-only-code-intelligence):
110
+ select files, obtain outlines, filter/count in Lisp, and request only chosen
111
+ spans or semantic results. Include processed/unprocessed counts, failures,
112
+ omissions and snapshot versions. A `partial` count is not the total population.
113
+
114
+ ## Updates, disable and recovery
115
+
116
+ Use the ordinary plugin update mechanism for a released V1-compatible provider.
117
+ For this local preview, prepare reviewed source, rebuild/repack and explicitly
118
+ replace its local artifact. Restart/reload the owning profile and recheck
119
+ capabilities. Never restore saved handles: each evaluation owns and releases its
120
+ live snapshots. An unknown provider major version is rejected.
121
+
122
+ Disable Lisp with `/kioku-lisp disable` before removing the optional provider:
123
+
124
+ ```sh
125
+ dsh plugin --profile dsh-cli remove @askdkc/dsh-lsp-server
126
+ ```
127
+
128
+ Choose `web` for the Web profile. Existing protected session fences remain
129
+ fail-closed after plugin disposal; removing a plugin does not authorize generic
130
+ tools. CLI also denies child-session generic tools under a protected parent
131
+ fence in development mode. A child cannot borrow its parent's code lease.
132
+
133
+ | Outcome | Next action |
134
+ | --- | --- |
135
+ | `unavailable`, missing service/version | Check the intended realm and installed provider's V1 contract; reload the profile. |
136
+ | `unsupported`, grammar or semantic capability | Choose a supported language/operation; do not substitute another parser or tool. |
137
+ | Semantic unready or `timeout` | Check configured server readiness and retry in a new bounded evaluation. No diagnostics publication means no verified clean result. |
138
+ | `stale` | Explicitly reopen the source in a new evaluation after checking the current workspace/checkout. |
139
+ | Scope/identity denial | Restore the owning session/provider; do not change root or owner arguments. |
140
+ | `limit_exceeded` or `partial` | Reduce files, captures or spans; retain omission metadata. |
141
+
142
+ All snapshots are disk-only, zero-based UTF-16 and half-open. Linked Git worktree
143
+ metadata outside the scoped filesystem is unavailable; no raw filesystem fallback
144
+ is used. Ordinary Git loose and packed refs are checked for checkout changes.
145
+
146
+ Run `npm run test:code-intelligence:benchmark` for the fixed comparison corpus.
147
+ It measures host time/RSS, serialized payload bytes and round trips. It does not
148
+ measure model tokens, model correctness or child language-server RSS, and does
149
+ not guarantee a speedup or lower memory use.
@@ -0,0 +1,22 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 ccch1mneyyy
4
+ Copyright (c) 2026 dkc (askdkc)
5
+
6
+ Permission is hereby granted, free of charge, to any person obtaining a copy
7
+ of this software and associated documentation files (the "Software"), to deal
8
+ in the Software without restriction, including without limitation the rights
9
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10
+ copies of the Software, and to permit persons to whom the Software is
11
+ furnished to do so, subject to the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be included in all
14
+ copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22
+ SOFTWARE.
@@ -0,0 +1,25 @@
1
+ # Vendored dsh-auth source
2
+
3
+ Source: https://github.com/askdkc/dsh-cli/tree/348082d873f563ed76ec7a70f2ff717038d5fe70/dsh-auth
4
+ Revision: `348082d873f563ed76ec7a70f2ff717038d5fe70`.
5
+ License: MIT, reproduced in [dsh-auth-LICENSE.txt](dsh-auth-LICENSE.txt).
6
+
7
+ `src/dsh/models/vendor/` contains the required credential persistence, authentication
8
+ contracts, Pi catalog bridge, Nous OAuth flow, cancellation helpers and OpenCode
9
+ catalog/transport/codec/replay/SDK adapter sources. The upstream command and UI services
10
+ are excluded: Kiokuko owns its Web management service and does not register TUI `/auth`.
11
+
12
+ Local changes: relative imports target the vendored directory; Nous depends on the
13
+ structural AuthInteraction interface; optional properties use conditional spreads for
14
+ Kiokuko's exactOptionalPropertyTypes; catalog optional state types are explicit.
15
+ Credential JSON parse diagnostics omit underlying content to avoid secret disclosure.
16
+ The canonical storage format/path/keys, file lock, atomic write, permissions and OAuth
17
+ refresh behavior are retained. No pre-existing credential migration is performed.
18
+
19
+ The SDK transport is bundled by `scripts/build-model-transports.mjs` from the pinned
20
+ AI SDK development dependencies. Each bundled dependency's license is collected in
21
+ `dist/dsh/models/vendor/THIRD_PARTY_NOTICES.txt` and shipped in full/modular packages.
22
+ Native DSH/Pi libraries remain host dependencies and are used through their public APIs.
23
+
24
+ Kiokuko's non-vendored service adds profile settings, route identity mapping, human Web
25
+ operations, lifecycle cancellation, immutable prepared adapters and Infron tier hooks.
@@ -561,3 +561,22 @@ recording. `/kioku-agenticreplay stop`, `list`, `show <run ID>` and
561
561
  DSH internal events, not a complete replayable HTTP/filesystem capture.
562
562
  See [AgenticReplay recording](agenticreplay-recording.md) for configuration, limits, sensitive data,
563
563
  storage, disabling and removal.
564
+
565
+
566
+ ## Optional code-intelligence provider
567
+
568
+ Enable Lisp through the existing session/preset route. Mount a V1-capable
569
+ `@askdkc/dsh-lsp-server` bundle in the same intended preset/service realm; Kiokuko
570
+ uses the calling agent's `codeIntelligence` service, scoped filesystem and process
571
+ services. It never looks up a parent-global provider as a fallback. The V1 contract
572
+ export is side-effect-free and imported only as a type. The checked-in declaration
573
+ is generated from the unreleased provider prerequisite, so optional runtime absence
574
+ does not prevent compilation or startup.
575
+
576
+ The current v0.1.12 registry artifact lacks V1. Use the [local patch recipe](../patches/code-intelligence/README.md)
577
+ for development and review; it does not update your active CLI profile. For an
578
+ installed compatible provider, confirm `(kioku.code:capabilities)` in the actual
579
+ session instead of treating a download, build, or package version as activation.
580
+ The suite and optional Lisp module contain the bridge; the core artifact contains
581
+ neither Lisp code nor parser/server dependencies. See [the API](lisp.md#read-only-code-intelligence)
582
+ for outcomes, scope, disk freshness, budgets, and protected fences.
@@ -0,0 +1,66 @@
1
+ # Kiokuko Models
2
+
3
+ In the Web profile, open **Settings → Kiokuko Models**, or enter exactly
4
+ `/kiokuko model` in a chat. The host executes this command without a model request.
5
+ Both entry points use the same panel, including before a native provider is configured.
6
+
7
+ Choose a provider, save the connection, then enter an API key in the masked field
8
+ or choose **Log in** where OAuth is supported by the installed adapter. The browser
9
+ shows the authentication link, device code or manual prompt and a cancellation button.
10
+ Authentication errors require an explicit retry; closing the panel cancels pending login.
11
+ **Log out** also signs the shared credential out of dsh-cli.
12
+
13
+ Supported connections: OpenAI API, Codex, Claude, xAI, DeepSeek, OpenCode Zen/Go,
14
+ OpenRouter, Nous/Hermes, Infron, Ollama and custom connections. OAuth availability
15
+ comes from the installed provider implementation; unsupported flows are not invented.
16
+ Ollama needs no key. Custom connections explicitly select Chat Completions, Responses
17
+ or Messages. Use HTTPS, or HTTP on loopback for a local server. For Messages,
18
+ an origin or API prefix ending in `/v1` is accepted; the SDK adds `/v1/messages`
19
+ once, preserving any preceding path prefix.
20
+
21
+ **Refresh models** imports models with known context and output limits. If discovery
22
+ fails or returns no limits, register the exact model ID and limits manually, then
23
+ save the connection. Search the resulting list. **Use in current chat** only changes
24
+ that idle chat; **Default for new chats** saves the native default for future chats.
25
+ Enno, Deep and model-auto use the same registered adapters and model capabilities.
26
+ An unavailable model is rejected rather than silently substituted.
27
+
28
+ ## Infron
29
+
30
+ The default endpoint is `https://llm.onerouter.pro/v1`, using Chat Completions.
31
+ Select **Service tier → Standard / Flex**; the default is Standard. Kiokuko sends
32
+ `provider: {service_tier: "standard" | "flex"}` at the top level of the request body.
33
+ It never sends an `extra_body` wrapper, changes tier on a failed request, or adds this
34
+ field to other providers. A prepared request keeps its tier through retries even if
35
+ settings change. The panel distinguishes the next requested tier from the last
36
+ request and its reported served tier. Missing response metadata means **unknown**;
37
+ Flex can be served as Standard by Infron.
38
+
39
+ ## Storage and permissions
40
+
41
+ Non-secret connection settings live in `kiokuko-models.json` under the active profile
42
+ directory. Changes use a revision check, a file lock and atomic replacement. Credentials
43
+ share dsh-auth's `$DSH_HOME/dsh-auth/credentials.json` location (normally
44
+ `~/.dsh/dsh-auth/credentials.json`, with the existing `DSH_AUTH_CREDENTIALS` override), provider keys and format. Credentials are written with
45
+ mode 0600, using the vendored lock and atomic-update implementation. Shared OAuth refresh
46
+ is serialized. Existing credentials and native profile settings are never migrated or deleted.
47
+
48
+ The Web transport's authentication protects management requests. Secret operations use
49
+ JSON POST requests and reject cross-site browser requests. Keys and refresh tokens never
50
+ appear in list responses, normal profile settings or command history. The settings panel
51
+ necessarily grants access to the shared credentials through login, replacement and logout.
52
+ Session tool permissions do not govern these explicit human settings operations.
53
+
54
+ OrcaRouter is no longer offered or recommended. Legacy saved Enno/Deep configurations
55
+ remain readable and require explicit model reselection before reuse. Replay history and
56
+ migrations are unaffected.
57
+
58
+ ## Verification
59
+
60
+ `npm run test:models:web` installs the packed package in a disposable Web profile,
61
+ uses a local provider and tests Settings, commands, authentication cancellation,
62
+ selection, reload/restart and the native tool loop. Unit tests send actual Pi adapter
63
+ requests to a local server. Real account OAuth completion and live Infron generation
64
+ are separate acceptance gates; local fixtures do not establish either.
65
+
66
+ [Vendored auth provenance and changes](dsh-auth-provenance.md).
package/docs/lisp.md CHANGED
@@ -1,4 +1,4 @@
1
- For configured semantic routing, use [provider-independent decisions](typed-decisions.md) and `kioku.decisions`. The Lisp mode-choice prompt and proposal approvals are unchanged.
1
+ For configured semantic routing, use [provider-independent decisions](typed-decisions.md) and `kioku.decisions`. Lisp coexists with normal tools; routine development is authorized and destructive changes retain concrete review.
2
2
 
3
3
  # Common Lisp tools
4
4
 
@@ -10,6 +10,8 @@ For explicit semantic decisions and `/kioku-typesafe-key` setup, see
10
10
  [TypeSafe from Lisp](typesafe.md). Answers can guide inspection and proposals;
11
11
  the existing permission and approval boundaries still apply.
12
12
 
13
+ The default is `lisp.executionMode: development`. Old `approvalMode` values remain readable. Set `executionMode: protected` explicitly to select the legacy worker/approval/fence behavior. See [owned execution and memory evidence](owned-execution.md).
14
+
13
15
  ## Compose task tools
14
16
 
15
17
  Use the worker as a persistent programming environment. Before repeating primitive
@@ -76,7 +78,7 @@ repeat the generic category dialog merely because the classifier abstained. The
76
78
  before coding begins; it resolves unclear task intent first. Both enable and decline choices
77
79
  persist for that session, including after a restart. Conversation and review
78
80
  requests do not trigger this prompt. Free text returns to conversation without
79
- starting Lisp; cancellation and startup failure block coding admission.
81
+ starting Lisp; cancellation preserves pending work; startup failure leaves ordinary coding available.
80
82
 
81
83
  Choosing Lisp also selects normal execution; Enno requires choosing not to use
82
84
  Lisp. The prompt is available only when `lisp.enabled` is true. To enable Lisp
@@ -90,10 +92,7 @@ manually or inspect its state, use these commands in the desired DSH session:
90
92
  This enables the Lisp tools and supplies the bundled `kiokuko-lisp` Skill.
91
93
  Existing DSH `read`, `glob`, `grep` and `skill` tools remain available under native
92
94
  session permissions, so project files and applicable Skills can be inspected.
93
- File changes still use Lisp proposals and their confirmation rules. The read
94
- implementations are bound when Lisp is enabled; a later same-name replacement
95
- does not inherit permission. Normal sessions retain their tools. Protection also blocks
96
- unclassified child-session execution, late registrations, and PTC bypasses.
95
+ File changes can use owned native tools or Lisp proposals. Ordinary writes/edits do not request approval; destructive source/data deletion retains a concrete review. Lisp startup/recovery failures do not block ordinary tools.
97
96
  The protected agent uses native tool presentation even in a PTC deployment.
98
97
 
99
98
  `sbclPath` can point to an explicit installed SBCL launcher. Its runtime files must
@@ -143,13 +142,8 @@ not the complete worker startup or the speed of an individual Lisp computation.
143
142
  copied into the worker's read-only inputs. Files from other sessions and arbitrary
144
143
  absolute paths are refused. The original attachment store stays inaccessible to
145
144
  Lisp and its subprocesses. Limits: 64 MiB per file, 256 MiB per worker generation.
146
- - Direct Lisp/FFI/Python/shell access is limited by the OS to runtime files,
147
- selected read-only input copies and compiled bundle, and the worker's scratch/cache.
148
- - Project changes use host-validated proposals. New regular files can be created
149
- with necessary parent directories. Deletion and replacement require one human
150
- confirmation for the evaluation's frozen batch, showing every target, diff,
151
- digest and backup location. Duplicate targets are rejected; unchanged writes
152
- return `UNCHANGED` without a confirmation or write.
145
+ - Lisp/FFI/Python/shell use the normal user environment. Prefer owned tools and broker APIs for host-observed execution; direct arbitrary effects are not verification evidence.
146
+ - Project proposals freeze targets, preserve backups and reject duplicate targets. Writes/edits are authorized; source/data deletion requires concrete confirmation. Generated/temp/disposable artifacts are routine development.
153
147
  - Refusal, skip, timeout, cancelled confirmation or unavailable UI means no change.
154
148
  File identities/content are checked again after approval. Links, directories,
155
149
  database files/sidecars, common credential paths and plugin/state data are refused.
@@ -223,11 +217,7 @@ schema-size comparisons. It makes no model calls and does not estimate token
223
217
  charges. Native integration tests separately verify confirmation counts, tool
224
218
  delivery, output validation and recovery.
225
219
 
226
- The host serializes conflicting target proposals. OS protection prevents the Lisp
227
- worker from swapping project paths while the host applies a proposal. This is not
228
- a filesystem transaction against unrelated host programs: an external application
229
- can change directory entries between host filesystem calls. Stop other writers
230
- when reviewing/applying sensitive changes; an uncertain outcome requires inspection.
220
+ The host serializes conflicting target proposals and checks their captured hashes before applying them. This is not a transaction against arbitrary Lisp or unrelated programs; concurrent external changes can still race filesystem calls. Unknown outcomes require inspection and must not be replayed.
231
221
 
232
222
  ## Stop and recover
233
223
 
@@ -281,13 +271,7 @@ subprocesses use the same output limit and parent-liveness supervisor as workers
281
271
  Published bundles are limited to 256 MiB each. Concurrent first enables share one
282
272
  serialized build under the host's existing exclusive data-directory lease.
283
273
 
284
- The macOS sandbox denies fork inside workers and jobs. Use `kioku.process` broker APIs for
285
- external processes. Result helpers (`result-ok?`, `result-code`, `result-stdout`,
286
- `result-stderr`, `run-lines`, `python-stdout`, `shell-stdout`) and generation-local
287
- job helpers (`list-jobs`, `forget-job`) avoid ordinary shell plumbing.
288
- `run` and `start-job` accept `:directory`, relative to scratch (default `"."`);
289
- absolute paths, traversal and symlink directories are refused. Node uses an empty
290
- OpenSSL configuration, so it does not need access to host OpenSSL configuration.
274
+ Lisp workers and processes use the normal user environment and process groups for termination. kioku.process run/start-job use the owned execution service; directory defaults to the admitted workspace and may select a real subdirectory. Collect background results rather than rerunning commands.
291
275
  `python`, `shell`, `run-lines`, `python-stdout` and `shell-stdout` also accept
292
276
  `:directory`. The output-only helpers signal an error on process failure, so a
293
277
  composed operation stops before its next step. Use `run` when the function needs
@@ -337,12 +321,7 @@ different repository is rejected.
337
321
  `vendor`. These map to fixed `npm` commands and timeouts; arbitrary executable,
338
322
  arguments, URL or shell input is not accepted. `:directory` selects a relative
339
323
  project directory under the bound workspace, or under the current worker's scratch
340
- with `:location :scratch`. Absolute paths, traversal and links are refused. Before
341
- execution, native confirmation shows the command, package script, exact directory,
342
- timeout and possible artifact effects. The verifier runs on the host, including npm
343
- lifecycle scripts, outside the worker sandbox. Directory identity and scripts are
344
- rechecked after approval. Refusal, cancellation or unavailable confirmation returns
345
- `NOT_APPLIED`; nonzero exit returns `FAILED` with bounded output. The enclosing
324
+ with `:location :scratch`. Absolute paths, traversal and links are refused. Routine verifier execution needs no approval. The host records actual cwd, process outcome and full-output test summaries before display shortening. Register completion checks and source paths before execution. Nonzero exit is FAILED; zero exit alone is not test coverage. The enclosing
346
325
  `lisp_eval` operation ID provides replay and conflict handling.
347
326
 
348
327
  Typical flow:
@@ -385,33 +364,14 @@ For API examples see [the bundled Skill](../skills/kiokuko-lisp/SKILL.md).
385
364
 
386
365
  Verification scope and installed Web reproduction: [verification record](lisp-verification.md).
387
366
 
388
- Native `ask_user_question` and `exit_plan_mode` remain available in both Lisp modes. Plan approval uses the DSH review UI and does not remove Lisp protection. Run `npm run test:lisp:plan:web` for a disposable packed-package Web check without model credentials.
367
+ Native `ask_user_question` and `exit_plan_mode` remain available in both Lisp modes. Plan approval uses the DSH review UI. Explicit human implementation instructions also request exit at the next accepted boundary. Protected compatibility mode retains its Lisp sandbox; development mode allows ordinary owned tools after Plan exits. Run `npm run test:lisp:plan:web` for a disposable packed-package Web check without model credentials.
389
368
 
390
369
  <!-- kiokuko:runtime approval-policy -->
391
- ## Profile-wide Lisp approval policy
392
-
393
- `lisp.approvalMode` defaults to `ask`; auto-approval is never inferred from an
394
- unknown request or from selecting Lisp. Ordinary questions keep normal execution
395
- without a Lisp choice or an approval selector in the chat composer. Once a task
396
- is identified as coding implementation or debugging, the existing coding choice
397
- can offer protected Lisp or normal execution; coding plans do not require Lisp.
398
- Auto-approval is an explicit opt-in through General settings,
399
- `/kioku-lisp approval auto`, or “Auto-approve all Lisp actions for this profile and
400
- continue” in a Lisp approval dialog. Use `/kioku-lisp approval ask` to return to
401
- manual consent. Explicit configuration and saved profile settings persist across
402
- chats and restarts and override the default; changing the default does not revoke
403
- a previously saved choice.
404
- All Lisp permission categories are covered, including file restoration, host
405
- verification, public npm package operations, and shared-function changes.
406
-
407
- Follow the current host-reported mode. In auto mode execute authorized work
408
- without asking whether to submit, resubmit, run tests, or apply changes. Ask only
409
- for missing intent that materially changes the work. In ask mode submit the
410
- operation directly to the host approval dialog without an extra conversational
411
- permission question. Earlier references to human approval describe ask mode.
412
- Explicit refusal, cancellation, stale inputs and unknown outcomes still stop
413
- execution; changing mode does not replay completed or refused operations.
414
- Identity checks, protected paths, backups and journal recovery remain enforced.
370
+ ## Development approval policy
371
+
372
+ The legacy lisp.approvalMode ask/auto configuration and profile commands remain readable. Both authorize routine project edits, tests, helper registration and Kioku saving. Neither disables concrete confirmation for source/data deletion or durable user database mutation. A worker failure leaves normal tools available. Refusal, cancellation, changed targets and unknown outcomes cannot authorize effects.
373
+
374
+ Use kioku_read/write/edit/remove/exec/result for observed work. Host receipts distinguish actual process outcome, source-bound verification and saving status. Lisp/model passed fields are advisory. Saving can be retried without repeating development effects; after restart an interrupted process remains unknown. See [owned execution](owned-execution.md).
415
375
  <!-- /kiokuko:runtime -->
416
376
 
417
377
  Pinned DSH stores this setting in the native `kiokuko-lisp` namespace, keyed by
@@ -419,3 +379,94 @@ the host-owned profile identity. Current DSH exposes `lisp.approvalMode` through
419
379
  the native `kiokuko-dsh` configuration form and saves its profile patch. This
420
380
  compatibility difference does not change the controls or scope. No separate
421
381
  preference file or database migration is used.
382
+
383
+
384
+ ## Read-only code intelligence
385
+
386
+ Persistent `lisp_eval` can use an optional `CodeIntelligenceServiceV1` from
387
+ `@askdkc/dsh-lsp-server`. Kiokuko resolves it in the calling agent's context.
388
+ The provider owns Tree-sitter, grammars, source snapshots, coordinates, and LSP
389
+ processes. Kiokuko does not install them or fall back to generic LSP tools.
390
+ Core alone has no code-intelligence runtime dependency.
391
+
392
+ The published provider v0.1.12 does not supply V1. The local prerequisite is kept
393
+ as a reproducible [upstream patch](../patches/code-intelligence/README.md). A
394
+ future compatible provider should advertise V1 and the required capabilities;
395
+ package version alone is insufficient. Absence, an old provider, missing grammar,
396
+ and an unready language server return explicit outcomes. They do not block the
397
+ ordinary Lisp APIs. Node must satisfy Kiokuko's `>=24.16.0` requirement.
398
+
399
+ Start with `(kioku.code:capabilities)`. Its response includes `status`, `reason`
400
+ when relevant, `data.version`, `data.capabilities`, `data.languages`, distributed
401
+ `data.queryIds`, and `data.semanticReady`. The last field stays false until this lease completes a semantic query: a
402
+ server executable's presence does not establish a synchronized semantic result.
403
+
404
+ ```lisp
405
+ ;; One evaluation: aggregate locally, return selected source and metadata.
406
+ (kioku.code:with-snapshot (snapshot "src/example.ts")
407
+ (let ((outline (kioku.code:outline snapshot :limit 20)))
408
+ (if (member (gethash "status" outline) '("ok" "partial") :test #'equal)
409
+ (let ((items (gethash "items" (gethash "data" outline))))
410
+ (kioku.internal:object
411
+ "status" (gethash "status" outline)
412
+ "omitted" (gethash "omitted" outline)
413
+ "declarationCount" (length items)
414
+ "selected" (if (plusp (length items))
415
+ (kioku.code:span (gethash "handle" (aref items 0))
416
+ :max-chars 1000)
417
+ #())))
418
+ outline)))
419
+ ```
420
+
421
+ Check `status` before accessing `data`. `ok` with an empty array means the query
422
+ completed with no results. `partial` preserves parse-error/truncation information.
423
+ `unsupported`, `unavailable`, `stale`, `cancelled`, `timeout`, and `limit_exceeded`
424
+ are separate states. Missing diagnostics publication never becomes a clean file.
425
+ `with-snapshot` returns the opening failure unchanged and always releases an
426
+ accepted snapshot, including on a Lisp error. For other queries, branch explicitly
427
+ on `ok`/`partial` before using their `data`.
428
+
429
+ | Lisp function | Arguments | Purpose |
430
+ | --- | --- | --- |
431
+ | `capabilities` | none | Negotiate V1, per-language readiness, disk sources and limits |
432
+ | `open` | path | Pin a bounded disk source snapshot |
433
+ | `outline` | handle, `:range`, `:limit` | Bounded declaration map |
434
+ | `enclosing` | handle, position, `:kinds` | Nearest matching node and ancestors |
435
+ | `query` | handle, query ID, `:range`, `:limit` | Distributed `declarations`, `calls`, `imports` captures |
436
+ | `span` | node handle, `:max-chars` | Bounded original source span |
437
+ | `semantic` | handle, kind, `:position`, `:limit` | `definition`, `references`, `implementation`, `hover`, `diagnostics`, `completion` |
438
+ | `release` | handle | Idempotent release |
439
+
440
+ Positions are JSON objects such as `(kioku.internal:object "line" 1 "character" 2)`:
441
+ zero-based lines and UTF-16 character offsets. Ranges have `start` and `end` and
442
+ are half-open. The provider performs conversion. There is no unsaved-editor
443
+ synchronization claim: `sourceKind` is `disk`, with freshness and a snapshot version
444
+ on every accepted source result. File/checkout changes require an explicit reopen.
445
+ Handles and node handles expire at evaluation end; journal replay and saved
446
+ `lisp_inspect` output are historical evidence, never live capabilities. Task workers
447
+ retain their host-RPC prohibition. Neither `lsp` nor `lsp_extra` is added to the
448
+ protected tool allowlist; child sessions cannot borrow admission.
449
+
450
+ Each evaluation has 100 charged calls (including capabilities and failed attempts),
451
+ 100 files, 16 MiB cumulative source input, 64 KiB cumulative code responses, and a
452
+ 30-second code budget. Individual documents are at most 2 MiB; captures 200,
453
+ outline entries 100, source spans 8,000 UTF-16 units, responses 32 KiB. Structural
454
+ calls have a 2-second deadline and semantic calls 10 seconds, capped by the batch
455
+ and caller deadlines. Release/disposal remain available outside exhausted budgets.
456
+ Model presentation remains capped at 16 KiB and retains code outcome metadata;
457
+ use bounded `lisp_inspect` pages for saved detail. Aggregate counts and chosen spans
458
+ inside Lisp; returning full outlines can increase output instead of reducing it.
459
+
460
+ The local prerequisite currently supports JavaScript/JSX/TypeScript/TSX. Its
461
+ checkout metadata read must be allowed by the scoped host filesystem. Linked Git
462
+ worktrees whose metadata is outside that scope return
463
+ `unavailable` rather than read through another filesystem. This condition is
464
+ reported independently from grammar and language-server readiness.
465
+
466
+ Development verification is `npm run test:code-intelligence` after preparing the
467
+ provider fixture. The source/native and packed paths are separate checks. The CI
468
+ matrix runs normal development on macOS, Ubuntu 26.04, and Arch; the protected code-provider path
469
+ is exercised on macOS; Linux protection remains a separate native-suite check. A configured job
470
+ is not evidence that the remote job passed.
471
+
472
+ Clean installation and platform status: [code intelligence setup](code-intelligence.md).