kiokuko-dsh 0.2.0 → 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 (294) 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/agenticreplay-read-service.d.ts.map +1 -1
  24. package/dist/dsh/agenticreplay-read-service.js +2 -1
  25. package/dist/dsh/agenticreplay-read-service.js.map +1 -1
  26. package/dist/dsh/agenticreplay-security.d.ts +2 -0
  27. package/dist/dsh/agenticreplay-security.d.ts.map +1 -1
  28. package/dist/dsh/agenticreplay-security.js +67 -0
  29. package/dist/dsh/agenticreplay-security.js.map +1 -1
  30. package/dist/dsh/completion-verifiers.d.ts +26 -0
  31. package/dist/dsh/completion-verifiers.d.ts.map +1 -0
  32. package/dist/dsh/completion-verifiers.js +9 -0
  33. package/dist/dsh/completion-verifiers.js.map +1 -0
  34. package/dist/dsh/config.d.ts +5 -1
  35. package/dist/dsh/config.d.ts.map +1 -1
  36. package/dist/dsh/core/host.d.ts +1 -1
  37. package/dist/dsh/core/host.d.ts.map +1 -1
  38. package/dist/dsh/core/host.js +49 -4
  39. package/dist/dsh/core/host.js.map +1 -1
  40. package/dist/dsh/core/index.d.ts +4 -4
  41. package/dist/dsh/core/tasks.d.ts.map +1 -1
  42. package/dist/dsh/core/tasks.js +7 -0
  43. package/dist/dsh/core/tasks.js.map +1 -1
  44. package/dist/dsh/core-runtime.d.ts +1 -0
  45. package/dist/dsh/core-runtime.d.ts.map +1 -1
  46. package/dist/dsh/core-runtime.js +4 -1
  47. package/dist/dsh/core-runtime.js.map +1 -1
  48. package/dist/dsh/decisions/config.d.ts +2 -2
  49. package/dist/dsh/enno-delegation.js +2 -2
  50. package/dist/dsh/enno-delegation.js.map +1 -1
  51. package/dist/dsh/execution-command.d.ts +4 -0
  52. package/dist/dsh/execution-command.d.ts.map +1 -0
  53. package/dist/dsh/execution-command.js +52 -0
  54. package/dist/dsh/execution-command.js.map +1 -0
  55. package/dist/dsh/execution-journal.d.ts +17 -0
  56. package/dist/dsh/execution-journal.d.ts.map +1 -0
  57. package/dist/dsh/execution-journal.js +69 -0
  58. package/dist/dsh/execution-journal.js.map +1 -0
  59. package/dist/dsh/execution-result.d.ts +20 -0
  60. package/dist/dsh/execution-result.d.ts.map +1 -0
  61. package/dist/dsh/execution-result.js +7 -0
  62. package/dist/dsh/execution-result.js.map +1 -0
  63. package/dist/dsh/execution-selection.d.ts +149 -22
  64. package/dist/dsh/execution-selection.d.ts.map +1 -1
  65. package/dist/dsh/execution-selection.js +18 -6
  66. package/dist/dsh/execution-selection.js.map +1 -1
  67. package/dist/dsh/host-adapter/admission.d.ts.map +1 -1
  68. package/dist/dsh/host-adapter/admission.js +20 -0
  69. package/dist/dsh/host-adapter/admission.js.map +1 -1
  70. package/dist/dsh/host-adapter/turn-state.js +1 -1
  71. package/dist/dsh/host-adapter/turn-state.js.map +1 -1
  72. package/dist/dsh/host-adapter.d.ts.map +1 -1
  73. package/dist/dsh/host-adapter.js +26 -13
  74. package/dist/dsh/host-adapter.js.map +1 -1
  75. package/dist/dsh/index.d.ts +4 -2
  76. package/dist/dsh/index.d.ts.map +1 -1
  77. package/dist/dsh/index.js +7 -0
  78. package/dist/dsh/index.js.map +1 -1
  79. package/dist/dsh/intake-gate.d.ts +1 -0
  80. package/dist/dsh/intake-gate.d.ts.map +1 -1
  81. package/dist/dsh/intake-gate.js +9 -1
  82. package/dist/dsh/intake-gate.js.map +1 -1
  83. package/dist/dsh/lisp/approval.d.ts +2 -1
  84. package/dist/dsh/lisp/approval.d.ts.map +1 -1
  85. package/dist/dsh/lisp/approval.js +4 -3
  86. package/dist/dsh/lisp/approval.js.map +1 -1
  87. package/dist/dsh/lisp/candidate.d.ts +3 -3
  88. package/dist/dsh/lisp/code-intelligence-contracts.d.ts +78 -0
  89. package/dist/dsh/lisp/code-intelligence-contracts.d.ts.map +1 -0
  90. package/dist/dsh/lisp/code-intelligence-contracts.js +54 -0
  91. package/dist/dsh/lisp/code-intelligence-contracts.js.map +1 -0
  92. package/dist/dsh/lisp/code-intelligence-provider.d.ts +116 -0
  93. package/dist/dsh/lisp/code-intelligence.d.ts +13 -0
  94. package/dist/dsh/lisp/code-intelligence.d.ts.map +1 -0
  95. package/dist/dsh/lisp/code-intelligence.js +181 -0
  96. package/dist/dsh/lisp/code-intelligence.js.map +1 -0
  97. package/dist/dsh/lisp/coding-choice.d.ts +1 -0
  98. package/dist/dsh/lisp/coding-choice.d.ts.map +1 -1
  99. package/dist/dsh/lisp/coding-choice.js +17 -6
  100. package/dist/dsh/lisp/coding-choice.js.map +1 -1
  101. package/dist/dsh/lisp/compiled-cache.d.ts.map +1 -1
  102. package/dist/dsh/lisp/compiled-cache.js +3 -2
  103. package/dist/dsh/lisp/compiled-cache.js.map +1 -1
  104. package/dist/dsh/lisp/contracts.d.ts +4 -0
  105. package/dist/dsh/lisp/contracts.d.ts.map +1 -1
  106. package/dist/dsh/lisp/contracts.js +1 -0
  107. package/dist/dsh/lisp/contracts.js.map +1 -1
  108. package/dist/dsh/lisp/manager.d.ts +8 -1
  109. package/dist/dsh/lisp/manager.d.ts.map +1 -1
  110. package/dist/dsh/lisp/manager.js +78 -24
  111. package/dist/dsh/lisp/manager.js.map +1 -1
  112. package/dist/dsh/lisp/model-result.d.ts.map +1 -1
  113. package/dist/dsh/lisp/model-result.js +35 -1
  114. package/dist/dsh/lisp/model-result.js.map +1 -1
  115. package/dist/dsh/lisp/proposal-batch.d.ts +2 -0
  116. package/dist/dsh/lisp/proposal-batch.d.ts.map +1 -1
  117. package/dist/dsh/lisp/proposal-batch.js +32 -2
  118. package/dist/dsh/lisp/proposal-batch.js.map +1 -1
  119. package/dist/dsh/lisp/sandbox.d.ts +3 -0
  120. package/dist/dsh/lisp/sandbox.d.ts.map +1 -1
  121. package/dist/dsh/lisp/sandbox.js +13 -6
  122. package/dist/dsh/lisp/sandbox.js.map +1 -1
  123. package/dist/dsh/lisp/surface.d.ts +1 -1
  124. package/dist/dsh/lisp/surface.d.ts.map +1 -1
  125. package/dist/dsh/lisp/surface.js +74 -20
  126. package/dist/dsh/lisp/surface.js.map +1 -1
  127. package/dist/dsh/lisp/worker.d.ts +2 -0
  128. package/dist/dsh/lisp/worker.d.ts.map +1 -1
  129. package/dist/dsh/lisp/worker.js +7 -5
  130. package/dist/dsh/lisp/worker.js.map +1 -1
  131. package/dist/dsh/memory-application.d.ts +1 -1
  132. package/dist/dsh/memory-application.d.ts.map +1 -1
  133. package/dist/dsh/memory-application.js +4 -3
  134. package/dist/dsh/memory-application.js.map +1 -1
  135. package/dist/dsh/model-auto/candidates.d.ts.map +1 -1
  136. package/dist/dsh/model-auto/candidates.js +31 -22
  137. package/dist/dsh/model-auto/candidates.js.map +1 -1
  138. package/dist/dsh/model-configuration.d.ts +145 -2
  139. package/dist/dsh/model-configuration.d.ts.map +1 -1
  140. package/dist/dsh/model-configuration.js +10 -3
  141. package/dist/dsh/model-configuration.js.map +1 -1
  142. package/dist/dsh/model-selection-ui.d.ts.map +1 -1
  143. package/dist/dsh/model-selection-ui.js +7 -2
  144. package/dist/dsh/model-selection-ui.js.map +1 -1
  145. package/dist/dsh/models/config-store.d.ts +8 -0
  146. package/dist/dsh/models/config-store.d.ts.map +1 -0
  147. package/dist/dsh/models/config-store.js +49 -0
  148. package/dist/dsh/models/config-store.js.map +1 -0
  149. package/dist/dsh/models/contracts.d.ts +107 -0
  150. package/dist/dsh/models/contracts.d.ts.map +1 -0
  151. package/dist/dsh/models/contracts.js +104 -0
  152. package/dist/dsh/models/contracts.js.map +1 -0
  153. package/dist/dsh/models/metadata.d.ts +7 -0
  154. package/dist/dsh/models/metadata.d.ts.map +1 -0
  155. package/dist/dsh/models/metadata.js +13 -0
  156. package/dist/dsh/models/metadata.js.map +1 -0
  157. package/dist/dsh/models/profiles.d.ts +10 -0
  158. package/dist/dsh/models/profiles.d.ts.map +1 -0
  159. package/dist/dsh/models/profiles.js +176 -0
  160. package/dist/dsh/models/profiles.js.map +1 -0
  161. package/dist/dsh/models/service.d.ts +97 -0
  162. package/dist/dsh/models/service.d.ts.map +1 -0
  163. package/dist/dsh/models/service.js +518 -0
  164. package/dist/dsh/models/service.js.map +1 -0
  165. package/dist/dsh/models/surface.d.ts +8 -0
  166. package/dist/dsh/models/surface.d.ts.map +1 -0
  167. package/dist/dsh/models/surface.js +162 -0
  168. package/dist/dsh/models/surface.js.map +1 -0
  169. package/dist/dsh/models/vendor/THIRD_PARTY_NOTICES.txt +134 -0
  170. package/dist/dsh/models/vendor/abortable.d.ts +3 -0
  171. package/dist/dsh/models/vendor/abortable.d.ts.map +1 -0
  172. package/dist/dsh/models/vendor/abortable.js +10 -0
  173. package/dist/dsh/models/vendor/abortable.js.map +1 -0
  174. package/dist/dsh/models/vendor/auth-contract.d.ts +67 -0
  175. package/dist/dsh/models/vendor/auth-contract.d.ts.map +1 -0
  176. package/dist/dsh/models/vendor/auth-contract.js +2 -0
  177. package/dist/dsh/models/vendor/auth-contract.js.map +1 -0
  178. package/dist/dsh/models/vendor/credentials.d.ts +58 -0
  179. package/dist/dsh/models/vendor/credentials.d.ts.map +1 -0
  180. package/dist/dsh/models/vendor/credentials.js +205 -0
  181. package/dist/dsh/models/vendor/credentials.js.map +1 -0
  182. package/dist/dsh/models/vendor/nous-oauth.d.ts +6 -0
  183. package/dist/dsh/models/vendor/nous-oauth.d.ts.map +1 -0
  184. package/dist/dsh/models/vendor/nous-oauth.js +113 -0
  185. package/dist/dsh/models/vendor/nous-oauth.js.map +1 -0
  186. package/dist/dsh/models/vendor/opencode-adapter.d.ts +38 -0
  187. package/dist/dsh/models/vendor/opencode-adapter.d.ts.map +1 -0
  188. package/dist/dsh/models/vendor/opencode-adapter.js +207 -0
  189. package/dist/dsh/models/vendor/opencode-adapter.js.map +1 -0
  190. package/dist/dsh/models/vendor/opencode-catalog.d.ts +73 -0
  191. package/dist/dsh/models/vendor/opencode-catalog.d.ts.map +1 -0
  192. package/dist/dsh/models/vendor/opencode-catalog.js +253 -0
  193. package/dist/dsh/models/vendor/opencode-catalog.js.map +1 -0
  194. package/dist/dsh/models/vendor/opencode-codec.d.ts +7 -0
  195. package/dist/dsh/models/vendor/opencode-codec.d.ts.map +1 -0
  196. package/dist/dsh/models/vendor/opencode-codec.js +107 -0
  197. package/dist/dsh/models/vendor/opencode-codec.js.map +1 -0
  198. package/dist/dsh/models/vendor/opencode-owned.generated.d.ts +114 -0
  199. package/dist/dsh/models/vendor/opencode-owned.generated.d.ts.map +1 -0
  200. package/dist/dsh/models/vendor/opencode-owned.generated.js +2867 -0
  201. package/dist/dsh/models/vendor/opencode-owned.generated.js.map +1 -0
  202. package/dist/dsh/models/vendor/opencode-replay.d.ts +17 -0
  203. package/dist/dsh/models/vendor/opencode-replay.d.ts.map +1 -0
  204. package/dist/dsh/models/vendor/opencode-replay.js +147 -0
  205. package/dist/dsh/models/vendor/opencode-replay.js.map +1 -0
  206. package/dist/dsh/models/vendor/opencode-sdk.d.ts +6 -0
  207. package/dist/dsh/models/vendor/opencode-sdk.d.ts.map +1 -0
  208. package/dist/dsh/models/vendor/opencode-sdk.js +49915 -0
  209. package/dist/dsh/models/vendor/opencode-sdk.js.map +7 -0
  210. package/dist/dsh/models/vendor/opencode-transport.d.ts +6 -0
  211. package/dist/dsh/models/vendor/opencode-transport.d.ts.map +1 -0
  212. package/dist/dsh/models/vendor/opencode-transport.js +70 -0
  213. package/dist/dsh/models/vendor/opencode-transport.js.map +1 -0
  214. package/dist/dsh/models/vendor/pi-ai.d.ts +23 -0
  215. package/dist/dsh/models/vendor/pi-ai.d.ts.map +1 -0
  216. package/dist/dsh/models/vendor/pi-ai.js +27 -0
  217. package/dist/dsh/models/vendor/pi-ai.js.map +1 -0
  218. package/dist/dsh/modules/lisp.d.ts +1 -1
  219. package/dist/dsh/modules/lisp.d.ts.map +1 -1
  220. package/dist/dsh/modules/lisp.js +1 -1
  221. package/dist/dsh/modules/lisp.js.map +1 -1
  222. package/dist/dsh/native-model-catalog.d.ts.map +1 -1
  223. package/dist/dsh/native-model-catalog.js +4 -3
  224. package/dist/dsh/native-model-catalog.js.map +1 -1
  225. package/dist/dsh/node-tap-summary.d.ts +6 -1
  226. package/dist/dsh/node-tap-summary.d.ts.map +1 -1
  227. package/dist/dsh/node-tap-summary.js +27 -2
  228. package/dist/dsh/node-tap-summary.js.map +1 -1
  229. package/dist/dsh/on-demand-intake.d.ts +1 -1
  230. package/dist/dsh/on-demand-intake.d.ts.map +1 -1
  231. package/dist/dsh/on-demand-intake.js +24 -12
  232. package/dist/dsh/on-demand-intake.js.map +1 -1
  233. package/dist/dsh/owned-evidence.d.ts +49 -0
  234. package/dist/dsh/owned-evidence.d.ts.map +1 -0
  235. package/dist/dsh/owned-evidence.js +69 -0
  236. package/dist/dsh/owned-evidence.js.map +1 -0
  237. package/dist/dsh/owned-execution.d.ts +98 -0
  238. package/dist/dsh/owned-execution.d.ts.map +1 -0
  239. package/dist/dsh/owned-execution.js +523 -0
  240. package/dist/dsh/owned-execution.js.map +1 -0
  241. package/dist/dsh/plan-transition.d.ts +5 -0
  242. package/dist/dsh/plan-transition.d.ts.map +1 -0
  243. package/dist/dsh/plan-transition.js +34 -0
  244. package/dist/dsh/plan-transition.js.map +1 -0
  245. package/dist/dsh/session-memory-finalizer.d.ts.map +1 -1
  246. package/dist/dsh/session-memory-finalizer.js +46 -3
  247. package/dist/dsh/session-memory-finalizer.js.map +1 -1
  248. package/dist/dsh/setup.d.ts +1 -1
  249. package/dist/dsh/setup.d.ts.map +1 -1
  250. package/dist/dsh/setup.js +2 -0
  251. package/dist/dsh/setup.js.map +1 -1
  252. package/dist/dsh/skill-prompts.json +1 -1
  253. package/dist/dsh/task-completion.d.ts +1 -0
  254. package/dist/dsh/task-completion.d.ts.map +1 -1
  255. package/dist/dsh/task-completion.js +19 -19
  256. package/dist/dsh/task-completion.js.map +1 -1
  257. package/dist/enno-oduno/schemas.d.ts +9 -9
  258. package/dist/enno-oduno/store.d.ts.map +1 -1
  259. package/dist/enno-oduno/store.js +12 -0
  260. package/dist/enno-oduno/store.js.map +1 -1
  261. package/dist/locale/en.json +1 -1
  262. package/dist/locale/ja.json +1 -1
  263. package/dist/locale/ko.json +1 -1
  264. package/dist/locale/zh-CN.json +1 -1
  265. package/dist/memory/application.d.ts +2 -1
  266. package/dist/memory/application.d.ts.map +1 -1
  267. package/dist/memory/application.js +26 -12
  268. package/dist/memory/application.js.map +1 -1
  269. package/dist/memory/evidence.d.ts +2 -0
  270. package/dist/memory/evidence.d.ts.map +1 -1
  271. package/dist/memory/evidence.js +3 -1
  272. package/dist/memory/evidence.js.map +1 -1
  273. package/dist/model-tools/contracts.d.ts +4 -4
  274. package/dist/models-client.cjs +635 -0
  275. package/dist/models-client.d.ts +26 -0
  276. package/dist/models-client.d.ts.map +1 -0
  277. package/dist/models-client.js +642 -0
  278. package/dist/models-client.js.map +1 -0
  279. package/docs/agenticreplay-recording.md +14 -0
  280. package/docs/code-intelligence.md +149 -0
  281. package/docs/dsh-auth-LICENSE.txt +22 -0
  282. package/docs/dsh-auth-provenance.md +25 -0
  283. package/docs/dsh-plugin.md +21 -0
  284. package/docs/kiokuko-models.md +66 -0
  285. package/docs/lisp.md +107 -56
  286. package/docs/model-selection.ja.md +7 -9
  287. package/docs/model-selection.md +14 -12
  288. package/docs/owned-execution.md +99 -0
  289. package/lisp/supervisor.mjs +8 -2
  290. package/lisp/tools.lisp +31 -3
  291. package/migrations/035_owned_execution.sql +19 -0
  292. package/package.json +46 -11
  293. package/skills/kiokuko-lisp/SKILL.md +49 -67
  294. package/skills/kiokuko-soul/SKILL.md +7 -26
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: kiokuko-lisp
3
- description: Compose reusable Common Lisp task tools in protected disposable workers or use the legacy persistent session.
3
+ description: Compose reusable Common Lisp task tools alongside owned development tools, in disposable or persistent workers.
4
4
  ---
5
5
 
6
6
  <!-- KIOKUKO MANAGED STANDARD SKILL: kiokuko-lisp -->
@@ -10,22 +10,19 @@ description: Compose reusable Common Lisp task tools in protected disposable wor
10
10
 
11
11
  ## Admission and tools
12
12
 
13
- Persistent mode: coding choice or `/kioku-lisp enable`. Task mode: separate session
14
- via `/kioku-lisp enable-task`, fresh protected workers per definition/call. Missing
15
- runtime or failed protection blocks admission.
16
- Never spoof host-bound session/agent/directory/generation. Native read/glob/grep/skill retain
17
- DSH permissions; ordinary bash/mutation/delegation stay blocked. Lisp/FFI/programs:
18
- runtime files, declared read-only copies, scratch only; no private host files, project
19
- writes, database, network or host sockets. Helpers cannot expand permissions. Use
20
- proposals/audited brokers, never escape protection.
13
+ Persistent mode: coding choice or /kioku-lisp enable. Task mode uses /kioku-lisp enable-task with fresh workers per definition/call. Lisp and ordinary tools coexist. Worker startup/recovery failures leave normal development available. Never spoof host-bound session/agent/directory/generation.
14
+
15
+ Use kioku_read, kioku_write, kioku_edit, kioku_remove, kioku_exec and kioku_result for observed development. PATH commands, bash/zsh, builds/tests, coding-needed external investigation and project edits need no routine confirmation. Source/data deletion and existing durable user database mutation need a concrete review; generated/temp/disposable artifacts and routine Kioku saving are authorized. Declare destructiveTargets when executing commands with destructive intent. The host does not attempt to classify every side effect of arbitrary code.
16
+
17
+ Lisp uses the normal user environment and child processes. Prefer kioku.tools:call-tool with the owned tools or kioku.process broker APIs to obtain host receipts. Direct Lisp/FFI effects are not independently observed and cannot establish successful verification. Bind task_completion conditions/source paths before executing checks, including subdirectory checks. Collect asynchronous final receipts with kioku_result. A model/Lisp passed field is never process evidence. Plan, goal, cancellation and execution ownership remain authoritative. During Plan use read/search/status; explicit human implementation instructions or Plan approval exit at the next accepted boundary.
21
18
 
22
19
  Schemas define arguments; never guess. `lisp_describe` without a symbol gives the
23
20
  API/verifier map, even during recovery. Persistent `lisp_eval`: declared inputs;
24
21
  `lisp_describe`: functions; `lisp_inspect`: paged evidence; `lisp_status`: state;
25
22
  `lisp_cancel`: stop; `lisp_reset`: healthy, confirmed-stopped worker only, no recovery bypass.
26
- Task `lisp_define`: protected example-checked lambda; `lisp_call`: inline input/inputRef;
23
+ Task `lisp_define`: compiled, schema/example-checked lambda; `lisp_call`: inline input/inputRef;
27
24
  `lisp_observe`: workspace capture without bodies; `lisp_stage`: freeze against observed
28
- baseRef; `lisp_verify`: private-scratch check; `lisp_apply`: host approval/frozen-target
25
+ baseRef; `lisp_verify`: private-scratch check; `lisp_apply`: frozen-target
29
26
  recheck; `lisp_compare`: no execution. Status/inspection read refs/receipts. Unknown
30
27
  test status or generated `passed` fields never prove host verification.
31
28
 
@@ -40,13 +37,15 @@ remain owner-bound until expiry. Never replay effects.
40
37
 
41
38
  Common Lisp/CL-PPCRE/CL-CSV/YASON via `kioku.tools`, `kioku.data`,
42
39
  `kioku.files`, `kioku.process`, `kioku.objects`, `kioku.environment`, `kioku.ci`,
43
- `kioku.decisions`, `kioku.typesafe`; no Quicklisp/network downloads. First enable
40
+ `kioku.decisions`, `kioku.typesafe`, `kioku.code`; no Quicklisp/network downloads. First enable
44
41
  compiles; later starts reuse verified code, not session state. Compile/cache failure
45
42
  blocks startup: report `/kioku-lisp recover`; never modify compiled files or replay effects.
46
43
  Task mode: bounded JSON schemas, exact dependency toolRefs, no heap/worker refs
47
44
  between calls. Disposable `lisp_eval`; workspace inputs use `lisp_observe`, never
48
45
  legacy inputs/proposals. Expired refs never read current files; persistent mode owns shared heap.
49
46
 
47
+ Persistent `kioku.code`: negotiate V1 with capabilities; use with-snapshot; check status/freshness. Handles expire per evaluation. Missing V1 returns unavailable, with no tool/parser fallback. Aggregate before returning. Fixed DTOs and budgets: docs/lisp.md.
48
+
50
49
  Persistent: define/test/use cohesive `defun` tools in one `lisp_eval`, reuse on new
51
50
  inputs. Batch known work/compact evidence; split at decisions/approvals/limits. Never
52
51
  preprogram guesses or eval data. Definitions last one generation; `lisp_describe`
@@ -57,19 +56,15 @@ identity/size/digest and read-only copies; other absolute paths fail. Limits: 64
57
56
  256 MiB/generation. `kioku.files:input`: read; `kioku.files:scratch`: write/unzip. Reimport
58
57
  applied files for comparison; export only when authorized. `kioku.files:propose-write`:
59
58
  relative paths, successful evaluation, durable recording.
60
- Deletion/replacement: profile policy on frozen targets/diffs. Duplicate targets fail;
59
+ Development mode: ordinary replacement is authorized; deletion of source/data requires concrete confirmation. Protected compatibility mode retains its frozen-target profile policy. Duplicate targets fail;
61
60
  unchanged writes do nothing. Refusal/skip/UI failure/cancellation never authorizes.
62
61
  Trust APPLIED/UNCHANGED/NOT_APPLIED/UNKNOWN receipts; partial failure stops later writes.
63
- Never retry unknown effects. Refuse protected paths/databases/links, recursive deletion
64
- and database mutation. Independent backups never auto-prune. RUNNING lasts until
62
+ Never retry unknown effects. Use owned tools for ordinary project files and confirmed durable DB changes; protected compatibility mode refuses its protected paths/databases/links and recursive deletion. Independent backups never auto-prune. RUNNING lasts until
65
63
  receipts save; restart repairs finalization without reapplying effects.
66
64
 
67
65
  ## Programs, verification and packages
68
66
 
69
- `kioku.process:run`/`start-job`: program/args/timeout/scratch-relative directory, no
70
- links/traversal; job-status/cancel-job manage bounded credential-free jobs. macOS:
71
- no fork, use Lisp/direct brokers, not shell/npm/multiprocessing. Node (22.8+):
72
- `--test --experimental-test-isolation=none` avoids children. Linux: Bubblewrap PID namespaces.
67
+ `kioku.process:run`/`start-job` use project-relative or absolute directories in development mode, normal PATH/environment and child processes. Use job-status/cancel-job and inspect final receipts. Explicit protected mode retains scratch-only directories, sandboxed environment and its OS child/network restrictions; never escape protection.
73
68
 
74
69
  `kioku.ci:list-runs :limit 10`/`failed-log`: bound-repo host gh/auth, no Lisp credentials.
75
70
  `verify`: only `:typecheck`, `:lisp`, `:test`, `:build`, `:package`, `:vendor`, never shell
@@ -82,23 +77,8 @@ ok=true is not process success: check result-code/verifier state/code. Report ob
82
77
  results; partial reads cannot prove byte equality. Separate scratch/applied-file
83
78
  checks; validate custom checkers on known cases.
84
79
 
85
- `kioku.packages`: separately approved public npm host broker, never arbitrary URLs,
86
- registry credentials or shell args; workers remain network-denied:
87
- - `metadata "sharp"`: latest metadata, or one exact canonical `:version`; verify advisory ranges.
88
- - `audit versions`: hash table of at most ten names/exact versions sent to npm bulk
89
- advisories. Empty results cover only those versions, not the whole project.
90
- - `update-lockfiles versions`: capture root manifest and existing npm/pnpm locks,
91
- add explicit security overrides; installed managers generate locks in private
92
- OS-protected scratch. `:directory`: workspace-relative root. Refuse Local/Git deps
93
- and multi-project workspaces; exclude scripts/hooks/original npm config/inherited
94
- credentials. Separate sandbox allows networking/children, unchanged worker protection.
95
- Updates: persistent eval, one call, no unrelated proposals; ordinary review/backups/
96
- journal. Recheck captures before generation returns and before application. Generation
97
- approval never authorizes writes. SUCCEEDED/generatedOnly means generation; only host
98
- `changes` receipts establish APPLIED/UNCHANGED. Refusal/failure/cancellation: no proposals;
99
- exact replay sends nothing. HTTP: 30 seconds/256 KiB; each fixed package-manager command:
100
- 90 seconds/256 KiB output. No retries/runtime downloads/dependency installation/
101
- profile changes/auto-reload. New host APIs need plugin build/reload, never just worker reset.
80
+ `kioku.packages` remains a bounded public npm broker: metadata (latest/exact version), audit (at most ten exact names/versions), update-lockfiles (persistent eval, one call, root npm/pnpm manifests/locks and security overrides). No arbitrary URLs, credentials, shell arguments, Local/Git dependencies or multi-project workspaces. Managers generate frozen proposals in separate network scratch; scripts/hooks and inherited config/credentials are excluded. Recheck captured inputs before returning and applying. Generation
81
+ approval never authorizes writes; only host changes receipts establish APPLIED/UNCHANGED. SUCCEEDED/generatedOnly is generation. Failure/refusal/cancellation returns no proposals; exact replay sends nothing. HTTP: 30s/256KiB; manager: 90s/256KiB. No retries, runtime downloads, installs, profile changes or reloads. New host APIs require plugin build/reload, not worker reset.
102
82
 
103
83
  ## Evidence, recovery and adapters
104
84
 
@@ -149,7 +129,7 @@ DSH guards/registry, refuses others/recursive eval. Bounded stdout/stderr. See l
149
129
 
150
130
  <!-- kiokuko:runtime prototype-driven-planning -->
151
131
  For Lisp coding, plans or reviews, settle testable doubts with current evidence or authorized target-runtime probes. Choose controls and counterexamples first; record commands, failures, observations and refs in one reasoned plan. Stop when evidence suffices or budgets expire; ask only for needed intent or authority.
152
- ask_user_question/exit_plan_mode keep Lisp guards.
132
+ ask_user_question/exit_plan_mode preserve ownership, cancellation and the selected execution mode.
153
133
 
154
134
  <!-- /kiokuko:runtime -->
155
135
 
@@ -157,7 +137,7 @@ ask_user_question/exit_plan_mode keep Lisp guards.
157
137
  ## Project-shared functions
158
138
 
159
139
  Project-shared functions work in both Lisp modes without a mode switch after the
160
- coding choice. They execute in separate protected workers, preserving the persistent
140
+ coding choice. They execute in separate workers under the selected execution mode, preserving the persistent
161
141
  worker's APIs and heap. `lisp_hot_contract` applies the profile approval policy to
162
142
  schemas and 1–32 finite input/expected cases. Only the host grants approval. `lisp_hot_install` validates against that immutable contract and replaces
163
143
  the active version only at the expected revision. Dependency code is snapshotted.
@@ -176,7 +156,7 @@ Native tool schemas remain authoritative for exact arguments.
176
156
  - `lisp_define`: `{operationId, name, description, source, inputSchema,
177
157
  outputSchema, dependencies?: [{binding,toolRef}], examples?: [{input,expected}],
178
158
  firstInput?}`. Source is one Lisp lambda. The host saves an immutable toolRef
179
- only after protected compilation and declared examples pass.
159
+ only after compilation and declared examples pass.
180
160
  - `lisp_call`: `{operationId, toolRef, input}` or `{operationId, toolRef, inputRef}`.
181
161
  Select bounded `fields` with JSON pointers when the full body is unnecessary;
182
162
  pass its resultRef to later calls without sending that body through the model.
@@ -189,14 +169,13 @@ Native tool schemas remain authoritative for exact arguments.
189
169
  captured bytes in private scratch and runs an approved host verifier. Observe
190
170
  all required files, including `package.json`; missing dependencies/scripts
191
171
  fail or return NOT_APPLIED. `testStatus:unknown` is not a passing test.
192
- - `lisp_apply`: `{operationId, candidateRef, verificationRef?}` requires host
193
- approval, rechecks the read set and frozen targets, and accepts only a successful
172
+ - `lisp_apply`: `{operationId, candidateRef, verificationRef?}` uses owned execution in development mode and concrete approval for destructive changes; it rechecks the read set and frozen targets, and accepts only a successful
194
173
  verification receipt for the same candidate. Without one, it reports `not-run`.
195
174
  - `lisp_compare`: `{operationId, leftRef, rightRef}` compares saved bases and
196
175
  operation/content hashes without executing either candidate.
197
176
 
198
177
  The task worker recompiles saved source for each call. Global variables and
199
- process RPC cannot carry state between calls. Saved resultRefs remain owner-bound
178
+ process RPC cannot carry heap state between calls. Development mode can invoke owned host tools; protected compatibility task workers deny host RPC. Saved resultRefs remain owner-bound
200
179
  for up to 30 days across worker/host restart; expired refs do not read live files.
201
180
  `lisp_status` lists recent refs and unresolved attempts; `lisp_inspect` reads
202
181
  receipts without replay. Persistent `lisp_inspect` accepts a current-generation
@@ -352,32 +331,35 @@ shortlist order for selection; source and test for diagnosis. Define `obj` first
352
331
  <!-- /kiokuko:documentation -->
353
332
 
354
333
  <!-- kiokuko:documentation approval-help -->
355
- ## Profile-wide Lisp approval policy
356
-
357
- `lisp.approvalMode` defaults to `ask`; auto-approval is never inferred from an
358
- unknown request or from selecting Lisp. Ordinary questions keep normal execution
359
- without a Lisp choice or an approval selector in the chat composer. Once a task
360
- is identified as coding implementation or debugging, the existing coding choice
361
- can offer protected Lisp or normal execution; coding plans do not require Lisp.
362
- Auto-approval is an explicit opt-in through General settings,
363
- `/kioku-lisp approval auto`, or “Auto-approve all Lisp actions for this profile and
364
- continue” in a Lisp approval dialog. Use `/kioku-lisp approval ask` to return to
365
- manual consent. Explicit configuration and saved profile settings persist across
366
- chats and restarts and override the default; changing the default does not revoke
367
- a previously saved choice.
368
- All Lisp permission categories are covered, including file restoration, host
369
- verification, public npm package operations, and shared-function changes.
370
-
371
- Follow the current host-reported mode. In auto mode execute authorized work
372
- without asking whether to submit, resubmit, run tests, or apply changes. Ask only
373
- for missing intent that materially changes the work. In ask mode submit the
374
- operation directly to the host approval dialog without an extra conversational
375
- permission question. Earlier references to human approval describe ask mode.
376
- Explicit refusal, cancellation, stale inputs and unknown outcomes still stop
377
- execution; changing mode does not replay completed or refused operations.
378
- Identity checks, protected paths, backups and journal recovery remain enforced.
334
+ ## Development approval policy
335
+
336
+ Project edits, verification, helper compilation/registration and ordinary Kioku storage are authorized. Source/data deletion and durable user DB mutations need a concrete review, regardless of the legacy lisp.approvalMode ask/auto value. Old profile settings still load. Do not request conversational permission before a required host review. Refusal, cancellation, stale targets and uncertain outcomes remain authoritative; never replay effects.
379
337
 
380
338
  <!-- /kiokuko:documentation -->
381
339
  <!-- kiokuko:runtime approval-policy -->
382
- Follow the live host approval mode. Profile auto-approve covers every Lisp permission: execute authorized actions without permission or resubmission questions. Ask only for materially missing intent. Ask mode uses host dialogs without an extra conversational permission request. Refusal, cancellation, stale inputs and unknown outcomes still stop work; never replay effects because mode changed.
340
+ Routine development and helper registration are authorized. Concrete destructive review remains required. Lisp failure does not block ordinary tools. Report execution, verification and saving separately; retry saving without replaying effects.
383
341
  <!-- /kiokuko:runtime -->
342
+
343
+
344
+ <!-- kiokuko:documentation code-intelligence -->
345
+ ## Read-only code intelligence
346
+
347
+ Persistent evaluations may use `kioku.code` when the calling agent has a V1
348
+ provider. Call `capabilities` first; absence/old version returns `unavailable`.
349
+ There is no generic LSP/tool/parser fallback. Task workers cannot use host RPC.
350
+ Use `with-snapshot` around `open`/`outline`/`enclosing`/fixed `query`/`span`/read-only
351
+ `semantic`; it releases accepted snapshots with `unwind-protect`. Check `status`
352
+ before `data`: preserve partial, unsupported, unavailable, stale, cancelled,
353
+ timeout and limit-exceeded results. Unready diagnostics are not clean diagnostics.
354
+ Queries are only `declarations`, `calls`, `imports`; semantic kinds are definition,
355
+ references, implementation, hover, diagnostics, completion. Never request writes,
356
+ rename, commands, arbitrary query text, or arbitrary RPC.
357
+ Aggregate/filter in Lisp and return counts plus chosen spans and outcome metadata.
358
+ Do not return an entire large corpus just because the worker can hold it. Positions
359
+ are zero-based UTF-16; ranges half-open; snapshots are disk-only. Reopen after a
360
+ file/checkout change. Handles expire at evaluation end and saved results are not
361
+ live authority. Keep 100 calls, 16 MiB input, 64 KiB responses, 30 seconds per code
362
+ batch; per response 32 KiB, document 2 MiB, captures 200, outline 100, span 8000.
363
+ Release stays available after limits. Check `lisp_describe` for exact arguments.
364
+
365
+ <!-- /kiokuko:documentation -->
@@ -8,37 +8,18 @@ description: Kiokuko's entry router for non-trivial DSH work. Read it before any
8
8
  <!-- kiokuko:runtime contract -->
9
9
  # SOUL router
10
10
 
11
- ## Authority
11
+ Read first. Host owns intake/session/capabilities/routing/delegation. No model task_prepare/task_answer; their absence is normal. Require ready/exhausted, permissive nextAction; invent no profile.
12
12
 
13
- Read first. The host owns Akinator intake, session/capability binding, model/execution routing and delegation. `task_prepare`/`task_answer` are host-only: neither call/emulate them nor stop for their absence. Require intake `ready`/`exhausted` and permissive `nextAction`; invent no profile fields.
14
-
15
- User instructions outrank Skill preferences, never host safety, authorization, identity, revision, lease, state-machine or integrity checks. Use existing authorization/evidence for routine choices; ask when intent or permitted effects are unclear. Optional intake/enrichment failures degrade guidance without vetoing native work.
16
-
17
- Complete authorized requirements with focused evidence. Report observed blockers. Repeat checks only after relevant changes. Never guess budgets or automatically retry/continue.
18
-
19
- ## Shared credo
13
+ User instructions outrank Skill preferences. Preserve identity/revisions/leases/integrity and Plan/goal/cancellation/ownership. Optional enrichment never vetoes ordinary work. Resolve routine choices from authorization/evidence; clarify unclear intent/destruction. Complete work, report blockers, recheck changes; no invented budgets/effect replay.
20
14
 
21
15
  **本当に、それを全部計算・保存・検索する必要があるのか?**
16
+ Preserve required results; remove needless computation/storage/search, narrow the rest, then optimize. Exhaustive work needs evidence. Never silently approximate/delete data or waive required validation, recovery or audit. No extra approval/artifact.
22
17
 
23
- Justify work before designing it: preserve the required result, eliminate unnecessary computation, storage and search, narrow the rest, then optimize.
24
-
25
- Exhaustive work needs evidence. Never silently approximate, delete data or waive required validation, recovery, audit or host checks. No extra approval or artifact.
26
-
27
- ## Capabilities and routes
28
-
29
- Kiokuko supports conversation, research, writing, organization, memory and coding. Use available Skills matching the request and host directive; never impose code contracts, execution choices or runtime startup on unrelated work.
30
-
31
- Read the selected Skill index, then only risk-selected references. Resource availability does not authorize execution; the host owns configuration and permissions.
32
-
33
- Modules own their detailed roles, tools, execution and recovery contracts. Preserve host-declared exclusions and current identity/lease/outcome. A missing required module or unresolved request stays blocked; never switch execution paths or replay effects to bypass it. Missing optional capabilities do not block unrelated requests.
34
-
35
- Normal execution: current model, applicable memory/Skills, native permissions; no orchestration contract or extra approval. Never invent run/role/revision/WorkUnit/state transitions or bypass host routing by changing provider or launching agents. Respect role directives and approved scope.
36
-
37
- ## Availability and trust
18
+ Match Skills to the request/directive; non-code needs no coding startup. Read selected indexes and risk-selected references. Preserve roles/exclusions/recovery and host outcomes/model/effort; optional gaps never block work.
38
19
 
39
- Unavailable Skills: use current evidence unless host safety/authorization/identity/integrity blocks progress. Never replace required bundled Skills with similar/namespaced/fetched/reference-only Skills or auto-install/execute external Skills. Never claim unread Skills/unrun checks; availability is not use.
20
+ Normal execution uses current model/memory/Skills and kioku_read/write/edit/remove/exec/result. Project work, PATH/bash/zsh, Lisp, builds/tests and routine Kioku saving need no routine approval; review source/data deletion and durable user DB changes concretely. Lisp and ordinary tools coexist; Lisp failure leaves ordinary tools available. Bind source/test/config checks before execution and collect final background receipts. Receipts prove observations, not generalized lessons; check recalled candidates against current sources. Report work/verification/saving separately; retry saving only. Human implementation instructions or Plan approval request exit at the next accepted boundary; a plan-only answer does not exit.
40
21
 
41
- ## Specialists
22
+ Unavailable Skills: use current evidence unless required host identity/authority/integrity prevents it. Never substitute required Skills or auto-install/execute fetched Skills. Never claim unread Skills or unrun checks. Before diagnostics check supported file types; For Markdown and unsupported documents, read and check structure, requirements and whitespace manually. Unavailable diagnostics remain unverified, not clean. After a successful edit or write, re-read before the next mutation. Serialize changes; on stale content re-read and reconcile, never force overwrite or repeat unsupported diagnostics unchanged.
42
23
 
43
- Select `kiokuko-{investigate,architecture,review,benchmark,verification,skill-authoring,technical-writing}` as needed; apply `coding-ideal-routine-skill` for code changes. Inherit host model/effort.
24
+ Select kiokuko-{investigate,architecture,review,benchmark,verification,skill-authoring,technical-writing} as needed; coding-ideal-routine-skill governs code changes.
44
25
  <!-- /kiokuko:runtime -->