kiokuko-dsh 0.2.39 → 0.2.41

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 (540) hide show
  1. package/PERMISSIONS.md +2 -2
  2. package/README.ja.md +17 -5
  3. package/README.ko.md +17 -5
  4. package/README.md +17 -5
  5. package/README.zh-CN.md +17 -5
  6. package/dist/akinator/skill-discovery-attempt.d.ts +3 -1
  7. package/dist/akinator/skill-discovery-attempt.d.ts.map +1 -1
  8. package/dist/akinator/skill-discovery-attempt.js +12 -11
  9. package/dist/akinator/skill-discovery-attempt.js.map +1 -1
  10. package/dist/client.cjs +7 -10
  11. package/dist/client.d.ts.map +1 -1
  12. package/dist/context/continuity-view.d.ts +0 -11
  13. package/dist/context/continuity-view.d.ts.map +1 -1
  14. package/dist/context/continuity-view.js +5 -9
  15. package/dist/context/continuity-view.js.map +1 -1
  16. package/dist/deep-thinker/controller.d.ts +4 -1
  17. package/dist/deep-thinker/controller.d.ts.map +1 -1
  18. package/dist/deep-thinker/controller.js +10 -0
  19. package/dist/deep-thinker/controller.js.map +1 -1
  20. package/dist/deep-thinker/core/contracts.d.ts +11 -11
  21. package/dist/deep-thinker/memory-finalizer.d.ts +1 -1
  22. package/dist/deep-thinker/native-executor.d.ts +1 -1
  23. package/dist/deep-thinker/native-executor.d.ts.map +1 -1
  24. package/dist/deep-thinker/prompts.js +1 -1
  25. package/dist/deep-thinker/prompts.js.map +1 -1
  26. package/dist/deep-thinker/quality-prompts.js +1 -1
  27. package/dist/deep-thinker/quality-prompts.js.map +1 -1
  28. package/dist/deep-thinker/report.d.ts +1 -1
  29. package/dist/deep-thinker/store.d.ts +1 -1
  30. package/dist/dsh/agenticreplay-hooks.d.ts.map +1 -1
  31. package/dist/dsh/agenticreplay-hooks.js +13 -0
  32. package/dist/dsh/agenticreplay-hooks.js.map +1 -1
  33. package/dist/dsh/agenticreplay-recorder.d.ts +5 -0
  34. package/dist/dsh/agenticreplay-recorder.d.ts.map +1 -1
  35. package/dist/dsh/agenticreplay-recorder.js +19 -0
  36. package/dist/dsh/agenticreplay-recorder.js.map +1 -1
  37. package/dist/dsh/coding-workflow/contracts.d.ts +2 -5
  38. package/dist/dsh/coding-workflow/contracts.d.ts.map +1 -1
  39. package/dist/dsh/coding-workflow/contracts.js +1 -1
  40. package/dist/dsh/coding-workflow/contracts.js.map +1 -1
  41. package/dist/dsh/coding-workflow/host.d.ts.map +1 -1
  42. package/dist/dsh/coding-workflow/host.js +1 -4
  43. package/dist/dsh/coding-workflow/host.js.map +1 -1
  44. package/dist/dsh/coding-workflow/intent.d.ts.map +1 -1
  45. package/dist/dsh/coding-workflow/intent.js +0 -6
  46. package/dist/dsh/coding-workflow/intent.js.map +1 -1
  47. package/dist/dsh/coding-workflow/service.d.ts +4 -8
  48. package/dist/dsh/coding-workflow/service.d.ts.map +1 -1
  49. package/dist/dsh/coding-workflow/service.js +5 -57
  50. package/dist/dsh/coding-workflow/service.js.map +1 -1
  51. package/dist/dsh/completion-report.d.ts +0 -31
  52. package/dist/dsh/completion-report.d.ts.map +1 -1
  53. package/dist/dsh/completion-report.js +16 -94
  54. package/dist/dsh/completion-report.js.map +1 -1
  55. package/dist/dsh/composition.d.ts +1 -3
  56. package/dist/dsh/composition.d.ts.map +1 -1
  57. package/dist/dsh/composition.js +13 -34
  58. package/dist/dsh/composition.js.map +1 -1
  59. package/dist/dsh/config.d.ts +1 -22
  60. package/dist/dsh/config.d.ts.map +1 -1
  61. package/dist/dsh/config.js +0 -8
  62. package/dist/dsh/config.js.map +1 -1
  63. package/dist/dsh/context-injection.d.ts +1 -11
  64. package/dist/dsh/context-injection.d.ts.map +1 -1
  65. package/dist/dsh/context-injection.js +3 -24
  66. package/dist/dsh/context-injection.js.map +1 -1
  67. package/dist/dsh/continuity-adapter.d.ts +0 -5
  68. package/dist/dsh/continuity-adapter.d.ts.map +1 -1
  69. package/dist/dsh/continuity-adapter.js +1 -39
  70. package/dist/dsh/continuity-adapter.js.map +1 -1
  71. package/dist/dsh/decisions/contracts.d.ts +0 -1
  72. package/dist/dsh/decisions/contracts.d.ts.map +1 -1
  73. package/dist/dsh/decisions/contracts.js +1 -1
  74. package/dist/dsh/decisions/contracts.js.map +1 -1
  75. package/dist/dsh/decisions/diagnostics.d.ts +8 -11
  76. package/dist/dsh/decisions/diagnostics.d.ts.map +1 -1
  77. package/dist/dsh/decisions/diagnostics.js +1 -9
  78. package/dist/dsh/decisions/diagnostics.js.map +1 -1
  79. package/dist/dsh/decisions/intent-assessment.d.ts +2 -5
  80. package/dist/dsh/decisions/intent-assessment.d.ts.map +1 -1
  81. package/dist/dsh/decisions/intent-assessment.js +17 -9
  82. package/dist/dsh/decisions/intent-assessment.js.map +1 -1
  83. package/dist/dsh/efficiency.d.ts +0 -3
  84. package/dist/dsh/efficiency.d.ts.map +1 -1
  85. package/dist/dsh/efficiency.js +1 -9
  86. package/dist/dsh/efficiency.js.map +1 -1
  87. package/dist/dsh/execution-selection.d.ts +6 -7
  88. package/dist/dsh/execution-selection.d.ts.map +1 -1
  89. package/dist/dsh/execution-selection.js +10 -15
  90. package/dist/dsh/execution-selection.js.map +1 -1
  91. package/dist/dsh/execution-support.d.ts +0 -4
  92. package/dist/dsh/execution-support.d.ts.map +1 -1
  93. package/dist/dsh/execution-support.js +3 -15
  94. package/dist/dsh/execution-support.js.map +1 -1
  95. package/dist/dsh/harness/factory.d.ts +109 -0
  96. package/dist/dsh/harness/factory.d.ts.map +1 -0
  97. package/dist/dsh/harness/factory.js +566 -0
  98. package/dist/dsh/harness/factory.js.map +1 -0
  99. package/dist/dsh/harness/inbox.d.ts +22 -0
  100. package/dist/dsh/harness/inbox.d.ts.map +1 -0
  101. package/dist/dsh/harness/inbox.js +61 -0
  102. package/dist/dsh/harness/inbox.js.map +1 -0
  103. package/dist/dsh/harness/index.d.ts +19 -0
  104. package/dist/dsh/harness/index.d.ts.map +1 -0
  105. package/dist/dsh/harness/index.js +26 -0
  106. package/dist/dsh/harness/index.js.map +1 -0
  107. package/dist/dsh/harness/lifecycle.d.ts +26 -0
  108. package/dist/dsh/harness/lifecycle.d.ts.map +1 -0
  109. package/dist/dsh/harness/lifecycle.js +21 -0
  110. package/dist/dsh/harness/lifecycle.js.map +1 -0
  111. package/dist/dsh/harness/projections.d.ts +16 -0
  112. package/dist/dsh/harness/projections.d.ts.map +1 -0
  113. package/dist/dsh/harness/projections.js +34 -0
  114. package/dist/dsh/harness/projections.js.map +1 -0
  115. package/dist/dsh/head-worker-configuration.d.ts +1 -2
  116. package/dist/dsh/head-worker-configuration.d.ts.map +1 -1
  117. package/dist/dsh/head-worker-configuration.js +0 -5
  118. package/dist/dsh/head-worker-configuration.js.map +1 -1
  119. package/dist/dsh/host-adapter/admission.d.ts +1 -8
  120. package/dist/dsh/host-adapter/admission.d.ts.map +1 -1
  121. package/dist/dsh/host-adapter/admission.js +51 -260
  122. package/dist/dsh/host-adapter/admission.js.map +1 -1
  123. package/dist/dsh/host-adapter/boundaries.d.ts +1 -28
  124. package/dist/dsh/host-adapter/boundaries.d.ts.map +1 -1
  125. package/dist/dsh/host-adapter/boundaries.js +27 -328
  126. package/dist/dsh/host-adapter/boundaries.js.map +1 -1
  127. package/dist/dsh/host-adapter/context.d.ts +1 -7
  128. package/dist/dsh/host-adapter/context.d.ts.map +1 -1
  129. package/dist/dsh/host-adapter/context.js +5 -28
  130. package/dist/dsh/host-adapter/context.js.map +1 -1
  131. package/dist/dsh/host-adapter/efficiency-host.d.ts +0 -2
  132. package/dist/dsh/host-adapter/efficiency-host.d.ts.map +1 -1
  133. package/dist/dsh/host-adapter/efficiency-host.js +2 -2
  134. package/dist/dsh/host-adapter/efficiency-host.js.map +1 -1
  135. package/dist/dsh/host-adapter/lifecycle.d.ts +0 -7
  136. package/dist/dsh/host-adapter/lifecycle.d.ts.map +1 -1
  137. package/dist/dsh/host-adapter/lifecycle.js +58 -71
  138. package/dist/dsh/host-adapter/lifecycle.js.map +1 -1
  139. package/dist/dsh/host-adapter/memory-application-host.d.ts +0 -2
  140. package/dist/dsh/host-adapter/memory-application-host.d.ts.map +1 -1
  141. package/dist/dsh/host-adapter/memory-application-host.js +2 -2
  142. package/dist/dsh/host-adapter/memory-application-host.js.map +1 -1
  143. package/dist/dsh/host-adapter/routing.d.ts +1 -5
  144. package/dist/dsh/host-adapter/routing.d.ts.map +1 -1
  145. package/dist/dsh/host-adapter/routing.js +21 -73
  146. package/dist/dsh/host-adapter/routing.js.map +1 -1
  147. package/dist/dsh/host-adapter/session-observation.d.ts +1 -8
  148. package/dist/dsh/host-adapter/session-observation.d.ts.map +1 -1
  149. package/dist/dsh/host-adapter/session-observation.js +2 -55
  150. package/dist/dsh/host-adapter/session-observation.js.map +1 -1
  151. package/dist/dsh/host-adapter/tool-host.d.ts +3 -41
  152. package/dist/dsh/host-adapter/tool-host.d.ts.map +1 -1
  153. package/dist/dsh/host-adapter/tool-host.js +14 -243
  154. package/dist/dsh/host-adapter/tool-host.js.map +1 -1
  155. package/dist/dsh/host-adapter/turn-state.d.ts +0 -4
  156. package/dist/dsh/host-adapter/turn-state.d.ts.map +1 -1
  157. package/dist/dsh/host-adapter/turn-state.js +16 -93
  158. package/dist/dsh/host-adapter/turn-state.js.map +1 -1
  159. package/dist/dsh/host-adapter.d.ts +0 -11
  160. package/dist/dsh/host-adapter.d.ts.map +1 -1
  161. package/dist/dsh/host-adapter.js +17 -179
  162. package/dist/dsh/host-adapter.js.map +1 -1
  163. package/dist/dsh/index.d.ts +3 -16
  164. package/dist/dsh/index.d.ts.map +1 -1
  165. package/dist/dsh/index.js +0 -6
  166. package/dist/dsh/index.js.map +1 -1
  167. package/dist/dsh/lifecycle-memory.d.ts +3 -0
  168. package/dist/dsh/lifecycle-memory.d.ts.map +1 -1
  169. package/dist/dsh/lifecycle-memory.js +67 -45
  170. package/dist/dsh/lifecycle-memory.js.map +1 -1
  171. package/dist/dsh/lisp/candidate.d.ts +2 -2
  172. package/dist/dsh/lisp/code-intelligence-contracts.d.ts +1 -1
  173. package/dist/dsh/lisp/compiled-cache.d.ts.map +1 -1
  174. package/dist/dsh/lisp/compiled-cache.js +27 -6
  175. package/dist/dsh/lisp/compiled-cache.js.map +1 -1
  176. package/dist/dsh/lisp/host-tool-dispatch.d.ts.map +1 -1
  177. package/dist/dsh/lisp/host-tool-dispatch.js +14 -5
  178. package/dist/dsh/lisp/host-tool-dispatch.js.map +1 -1
  179. package/dist/dsh/lisp/manager.d.ts +7 -4
  180. package/dist/dsh/lisp/manager.d.ts.map +1 -1
  181. package/dist/dsh/lisp/manager.js +132 -103
  182. package/dist/dsh/lisp/manager.js.map +1 -1
  183. package/dist/dsh/lisp/sandbox.d.ts.map +1 -1
  184. package/dist/dsh/lisp/sandbox.js +1 -5
  185. package/dist/dsh/lisp/sandbox.js.map +1 -1
  186. package/dist/dsh/lisp/supervision.d.ts +33 -0
  187. package/dist/dsh/lisp/supervision.d.ts.map +1 -0
  188. package/dist/dsh/lisp/supervision.js +89 -0
  189. package/dist/dsh/lisp/supervision.js.map +1 -0
  190. package/dist/dsh/lisp/surface.d.ts +2 -2
  191. package/dist/dsh/lisp/surface.d.ts.map +1 -1
  192. package/dist/dsh/lisp/surface.js +105 -11
  193. package/dist/dsh/lisp/surface.js.map +1 -1
  194. package/dist/dsh/lisp/worker.d.ts +2 -1
  195. package/dist/dsh/lisp/worker.d.ts.map +1 -1
  196. package/dist/dsh/lisp/worker.js +7 -1
  197. package/dist/dsh/lisp/worker.js.map +1 -1
  198. package/dist/dsh/loop-guard.d.ts +0 -8
  199. package/dist/dsh/loop-guard.d.ts.map +1 -1
  200. package/dist/dsh/loop-guard.js +0 -51
  201. package/dist/dsh/loop-guard.js.map +1 -1
  202. package/dist/dsh/memory-application.d.ts.map +1 -1
  203. package/dist/dsh/memory-application.js +0 -6
  204. package/dist/dsh/memory-application.js.map +1 -1
  205. package/dist/dsh/message-sources.d.ts +2 -12
  206. package/dist/dsh/message-sources.d.ts.map +1 -1
  207. package/dist/dsh/message-sources.js +20 -39
  208. package/dist/dsh/message-sources.js.map +1 -1
  209. package/dist/dsh/model-configuration.d.ts +6 -24
  210. package/dist/dsh/model-configuration.d.ts.map +1 -1
  211. package/dist/dsh/model-configuration.js +1 -78
  212. package/dist/dsh/model-configuration.js.map +1 -1
  213. package/dist/dsh/model-routing.d.ts +1 -3
  214. package/dist/dsh/model-routing.d.ts.map +1 -1
  215. package/dist/dsh/model-routing.js +0 -11
  216. package/dist/dsh/model-routing.js.map +1 -1
  217. package/dist/dsh/model-selection-ui.d.ts +1 -2
  218. package/dist/dsh/model-selection-ui.d.ts.map +1 -1
  219. package/dist/dsh/model-selection-ui.js +48 -309
  220. package/dist/dsh/model-selection-ui.js.map +1 -1
  221. package/dist/dsh/models/contracts.d.ts +2 -2
  222. package/dist/dsh/models/service.d.ts +1 -1
  223. package/dist/dsh/modules/legacy-bindings.d.ts +3 -1
  224. package/dist/dsh/modules/legacy-bindings.d.ts.map +1 -1
  225. package/dist/dsh/modules/legacy-bindings.js +5 -5
  226. package/dist/dsh/modules/legacy-bindings.js.map +1 -1
  227. package/dist/dsh/modules/lisp.js +1 -1
  228. package/dist/dsh/modules/lisp.js.map +1 -1
  229. package/dist/dsh/native-execution-ownership.d.ts.map +1 -1
  230. package/dist/dsh/native-execution-ownership.js +0 -2
  231. package/dist/dsh/native-execution-ownership.js.map +1 -1
  232. package/dist/dsh/native-worker-routing.d.ts.map +1 -1
  233. package/dist/dsh/native-worker-routing.js +7 -2
  234. package/dist/dsh/native-worker-routing.js.map +1 -1
  235. package/dist/dsh/on-demand-intake.d.ts.map +1 -1
  236. package/dist/dsh/on-demand-intake.js +17 -8
  237. package/dist/dsh/on-demand-intake.js.map +1 -1
  238. package/dist/dsh/orchestration/execution-owner.d.ts +3 -1
  239. package/dist/dsh/orchestration/execution-owner.d.ts.map +1 -1
  240. package/dist/dsh/orchestration/execution-owner.js.map +1 -1
  241. package/dist/dsh/owned-execution.js +1 -1
  242. package/dist/dsh/owned-execution.js.map +1 -1
  243. package/dist/dsh/replay-memory-extract.d.ts.map +1 -1
  244. package/dist/dsh/replay-memory-extract.js +15 -1
  245. package/dist/dsh/replay-memory-extract.js.map +1 -1
  246. package/dist/dsh/repository-learning.d.ts.map +1 -1
  247. package/dist/dsh/repository-learning.js +3 -0
  248. package/dist/dsh/repository-learning.js.map +1 -1
  249. package/dist/dsh/runtime.d.ts +10 -2
  250. package/dist/dsh/runtime.d.ts.map +1 -1
  251. package/dist/dsh/runtime.js +22 -43
  252. package/dist/dsh/runtime.js.map +1 -1
  253. package/dist/dsh/semantic-compaction/policy.js +1 -1
  254. package/dist/dsh/semantic-compaction/policy.js.map +1 -1
  255. package/dist/dsh/session-bridge.d.ts +1 -1
  256. package/dist/dsh/session-bridge.d.ts.map +1 -1
  257. package/dist/dsh/session-bridge.js +1 -1
  258. package/dist/dsh/session-bridge.js.map +1 -1
  259. package/dist/dsh/session-memory-finalizer.js +1 -1
  260. package/dist/dsh/session-memory-finalizer.js.map +1 -1
  261. package/dist/dsh/session-review-context.d.ts.map +1 -1
  262. package/dist/dsh/session-review-context.js +3 -16
  263. package/dist/dsh/session-review-context.js.map +1 -1
  264. package/dist/dsh/setup.d.ts +1 -1
  265. package/dist/dsh/setup.d.ts.map +1 -1
  266. package/dist/dsh/skill-compiler.js +1 -1
  267. package/dist/dsh/skill-compiler.js.map +1 -1
  268. package/dist/dsh/skill-prompt-contracts.d.ts +2 -2
  269. package/dist/dsh/skill-prompt-contracts.js +1 -1
  270. package/dist/dsh/skill-prompts.json +1 -1
  271. package/dist/dsh/standard-skills.d.ts +1 -8
  272. package/dist/dsh/standard-skills.d.ts.map +1 -1
  273. package/dist/dsh/standard-skills.js +1 -8
  274. package/dist/dsh/standard-skills.js.map +1 -1
  275. package/dist/dsh/task-authority-context.d.ts +3 -0
  276. package/dist/dsh/task-authority-context.d.ts.map +1 -1
  277. package/dist/dsh/task-authority-context.js +3 -0
  278. package/dist/dsh/task-authority-context.js.map +1 -1
  279. package/dist/dsh/task-completion-guidance.d.ts +1 -5
  280. package/dist/dsh/task-completion-guidance.d.ts.map +1 -1
  281. package/dist/dsh/task-completion-guidance.js +4 -6
  282. package/dist/dsh/task-completion-guidance.js.map +1 -1
  283. package/dist/dsh/task-completion-host.js +4 -4
  284. package/dist/dsh/task-completion-host.js.map +1 -1
  285. package/dist/dsh/task-completion.d.ts +1 -13
  286. package/dist/dsh/task-completion.d.ts.map +1 -1
  287. package/dist/dsh/task-completion.js +9 -104
  288. package/dist/dsh/task-completion.js.map +1 -1
  289. package/dist/dsh/task-intake.d.ts +2 -3
  290. package/dist/dsh/task-intake.d.ts.map +1 -1
  291. package/dist/dsh/task-intake.js +90 -86
  292. package/dist/dsh/task-intake.js.map +1 -1
  293. package/dist/dsh/task-state.d.ts.map +1 -1
  294. package/dist/dsh/task-state.js +0 -8
  295. package/dist/dsh/task-state.js.map +1 -1
  296. package/dist/dsh/tool-exposure.d.ts +1 -1
  297. package/dist/dsh/tool-exposure.d.ts.map +1 -1
  298. package/dist/dsh/tool-exposure.js +0 -2
  299. package/dist/dsh/tool-exposure.js.map +1 -1
  300. package/dist/dsh/tool-policy.d.ts +5 -8
  301. package/dist/dsh/tool-policy.d.ts.map +1 -1
  302. package/dist/dsh/tool-policy.js +3 -35
  303. package/dist/dsh/tool-policy.js.map +1 -1
  304. package/dist/dsh/tools.d.ts +2 -6
  305. package/dist/dsh/tools.d.ts.map +1 -1
  306. package/dist/dsh/tools.js +7 -63
  307. package/dist/dsh/tools.js.map +1 -1
  308. package/dist/dsh/turn-process.d.ts +0 -93
  309. package/dist/dsh/turn-process.d.ts.map +1 -1
  310. package/dist/dsh/turn-process.js +1 -307
  311. package/dist/dsh/turn-process.js.map +1 -1
  312. package/dist/dsh/user-interaction.d.ts +9 -16
  313. package/dist/dsh/user-interaction.d.ts.map +1 -1
  314. package/dist/dsh/user-interaction.js +19 -158
  315. package/dist/dsh/user-interaction.js.map +1 -1
  316. package/dist/index.js +2 -19
  317. package/dist/ledger/types.d.ts +1 -1
  318. package/dist/ledger/types.d.ts.map +1 -1
  319. package/dist/ledger/types.js +0 -7
  320. package/dist/ledger/types.js.map +1 -1
  321. package/dist/locale/en.json +1 -1
  322. package/dist/locale/ja.json +1 -1
  323. package/dist/locale/ko.json +1 -1
  324. package/dist/locale/zh-CN.json +1 -1
  325. package/dist/memory/correction-contract.d.ts +4 -4
  326. package/dist/memory/lifecycle.d.ts +1 -1
  327. package/dist/memory/review/evidence.js +1 -1
  328. package/dist/memory/review/evidence.js.map +1 -1
  329. package/dist/model-tools/contracts.d.ts +0 -437
  330. package/dist/model-tools/contracts.d.ts.map +1 -1
  331. package/dist/model-tools/contracts.js +0 -13
  332. package/dist/model-tools/contracts.js.map +1 -1
  333. package/dist/model-tools/names.d.ts +1 -1
  334. package/dist/model-tools/names.d.ts.map +1 -1
  335. package/dist/model-tools/names.js +0 -7
  336. package/dist/model-tools/names.js.map +1 -1
  337. package/dist/model-tools/registry.js +1 -1
  338. package/dist/model-tools/registry.js.map +1 -1
  339. package/dist/models-client.cjs +2 -2
  340. package/dist/models-client.js +2 -2
  341. package/dist/models-client.js.map +1 -1
  342. package/docs/README.ja.md +0 -1
  343. package/docs/README.md +0 -1
  344. package/docs/agenticreplay-recording.md +1 -1
  345. package/docs/agenticreplay-verification.md +1 -1
  346. package/docs/answer-review.md +2 -2
  347. package/docs/architecture.md +4 -7
  348. package/docs/auto-memory-review.md +3 -3
  349. package/docs/coding-workflow.md +1 -1
  350. package/docs/concepts.ja.md +3 -5
  351. package/docs/concepts.md +3 -5
  352. package/docs/core-modules.md +5 -16
  353. package/docs/database.md +5 -10
  354. package/docs/decision-diagnostics.md +1 -2
  355. package/docs/deep-planning.md +3 -3
  356. package/docs/dsh-plugin.md +42 -178
  357. package/docs/execution-ledger.md +1 -2
  358. package/docs/execution-support.md +6 -7
  359. package/docs/harness-map.md +1 -1
  360. package/docs/japanese-output.md +1 -1
  361. package/docs/keyboard-shortcuts.md +1 -1
  362. package/docs/kiokuko-harness.md +71 -0
  363. package/docs/kiokuko-models.md +4 -9
  364. package/docs/lisp-hot-tools.md +12 -7
  365. package/docs/lisp.md +43 -9
  366. package/docs/memory-application.md +5 -5
  367. package/docs/memory-delivery.md +1 -1
  368. package/docs/memory-reuse.md +1 -1
  369. package/docs/model-selection.ja.md +40 -123
  370. package/docs/model-selection.md +45 -114
  371. package/docs/on-demand-intake.md +2 -2
  372. package/docs/owned-execution.md +7 -7
  373. package/docs/pr72-ci-verification.md +2 -2
  374. package/docs/pstack-adaptation.json +0 -34
  375. package/docs/pstack-skills.md +1 -1
  376. package/docs/semantic-compaction.md +2 -2
  377. package/docs/session-history-repair.md +2 -2
  378. package/docs/skill-compiler.md +2 -4
  379. package/docs/tool-exposure.md +1 -1
  380. package/docs/typed-decisions.md +1 -9
  381. package/docs/verification.md +11 -7
  382. package/dsh/cordis.legacy.patch.yml +7 -0
  383. package/dsh/cordis.patch.yml +6 -1
  384. package/lisp/supervisor.mjs +16 -7
  385. package/lisp/tools.lisp +1 -1
  386. package/migrations/051_drop_enno.sql +19 -0
  387. package/package.json +5 -14
  388. package/scripts/session-history-codec.mjs +1 -1
  389. package/skills/coding-ideal-routine-skill/SKILL.md +1 -1
  390. package/skills/kiokuko-lisp/SKILL.md +11 -5
  391. package/skills/kiokuko-single-purpose-functions/SKILL.md +1 -1
  392. package/skills/kiokuko-ui-design-soul/SKILL.md +2 -2
  393. package/skills/one-shot-software-completion/SKILL.md +4 -7
  394. package/skills/one-shot-software-completion/references/boundaries-and-lifecycle.md +3 -5
  395. package/dist/dsh/advisory-runner.d.ts +0 -32
  396. package/dist/dsh/advisory-runner.d.ts.map +0 -1
  397. package/dist/dsh/advisory-runner.js +0 -116
  398. package/dist/dsh/advisory-runner.js.map +0 -1
  399. package/dist/dsh/completion-verifiers.d.ts +0 -45
  400. package/dist/dsh/completion-verifiers.d.ts.map +0 -1
  401. package/dist/dsh/completion-verifiers.js +0 -9
  402. package/dist/dsh/completion-verifiers.js.map +0 -1
  403. package/dist/dsh/continuation.d.ts +0 -24
  404. package/dist/dsh/continuation.d.ts.map +0 -1
  405. package/dist/dsh/continuation.js +0 -215
  406. package/dist/dsh/continuation.js.map +0 -1
  407. package/dist/dsh/decisions/check-model.d.ts +0 -6
  408. package/dist/dsh/decisions/check-model.d.ts.map +0 -1
  409. package/dist/dsh/decisions/check-model.js +0 -36
  410. package/dist/dsh/decisions/check-model.js.map +0 -1
  411. package/dist/dsh/decisions/plan-review.d.ts +0 -17
  412. package/dist/dsh/decisions/plan-review.d.ts.map +0 -1
  413. package/dist/dsh/decisions/plan-review.js +0 -68
  414. package/dist/dsh/decisions/plan-review.js.map +0 -1
  415. package/dist/dsh/directive-projection.d.ts +0 -7
  416. package/dist/dsh/directive-projection.d.ts.map +0 -1
  417. package/dist/dsh/directive-projection.js +0 -32
  418. package/dist/dsh/directive-projection.js.map +0 -1
  419. package/dist/dsh/enno-controller.d.ts +0 -132
  420. package/dist/dsh/enno-controller.d.ts.map +0 -1
  421. package/dist/dsh/enno-controller.js +0 -368
  422. package/dist/dsh/enno-controller.js.map +0 -1
  423. package/dist/dsh/enno-delegation.d.ts +0 -36
  424. package/dist/dsh/enno-delegation.d.ts.map +0 -1
  425. package/dist/dsh/enno-delegation.js +0 -203
  426. package/dist/dsh/enno-delegation.js.map +0 -1
  427. package/dist/dsh/enno-memory-refresh-store.d.ts +0 -26
  428. package/dist/dsh/enno-memory-refresh-store.d.ts.map +0 -1
  429. package/dist/dsh/enno-memory-refresh-store.js +0 -45
  430. package/dist/dsh/enno-memory-refresh-store.js.map +0 -1
  431. package/dist/dsh/enno-memory-refresh.d.ts +0 -57
  432. package/dist/dsh/enno-memory-refresh.d.ts.map +0 -1
  433. package/dist/dsh/enno-memory-refresh.js +0 -280
  434. package/dist/dsh/enno-memory-refresh.js.map +0 -1
  435. package/dist/dsh/host-adapter/enno-memory-host.d.ts +0 -29
  436. package/dist/dsh/host-adapter/enno-memory-host.d.ts.map +0 -1
  437. package/dist/dsh/host-adapter/enno-memory-host.js +0 -49
  438. package/dist/dsh/host-adapter/enno-memory-host.js.map +0 -1
  439. package/dist/dsh/modules/enno.d.ts +0 -70
  440. package/dist/dsh/modules/enno.d.ts.map +0 -1
  441. package/dist/dsh/modules/enno.js +0 -22
  442. package/dist/dsh/modules/enno.js.map +0 -1
  443. package/dist/dsh/verification-identity.d.ts +0 -3
  444. package/dist/dsh/verification-identity.d.ts.map +0 -1
  445. package/dist/dsh/verification-identity.js +0 -15
  446. package/dist/dsh/verification-identity.js.map +0 -1
  447. package/dist/enno-oduno/advisory-store.d.ts +0 -31
  448. package/dist/enno-oduno/advisory-store.d.ts.map +0 -1
  449. package/dist/enno-oduno/advisory-store.js +0 -105
  450. package/dist/enno-oduno/advisory-store.js.map +0 -1
  451. package/dist/enno-oduno/advisory.d.ts +0 -18
  452. package/dist/enno-oduno/advisory.d.ts.map +0 -1
  453. package/dist/enno-oduno/advisory.js +0 -311
  454. package/dist/enno-oduno/advisory.js.map +0 -1
  455. package/dist/enno-oduno/coding-workflow.d.ts +0 -39
  456. package/dist/enno-oduno/coding-workflow.d.ts.map +0 -1
  457. package/dist/enno-oduno/coding-workflow.js +0 -33
  458. package/dist/enno-oduno/coding-workflow.js.map +0 -1
  459. package/dist/enno-oduno/confirmation.d.ts +0 -4
  460. package/dist/enno-oduno/confirmation.d.ts.map +0 -1
  461. package/dist/enno-oduno/confirmation.js +0 -146
  462. package/dist/enno-oduno/confirmation.js.map +0 -1
  463. package/dist/enno-oduno/directives.d.ts +0 -10
  464. package/dist/enno-oduno/directives.d.ts.map +0 -1
  465. package/dist/enno-oduno/directives.js +0 -294
  466. package/dist/enno-oduno/directives.js.map +0 -1
  467. package/dist/enno-oduno/experts.d.ts +0 -3
  468. package/dist/enno-oduno/experts.d.ts.map +0 -1
  469. package/dist/enno-oduno/experts.js +0 -28
  470. package/dist/enno-oduno/experts.js.map +0 -1
  471. package/dist/enno-oduno/handoff.d.ts +0 -4
  472. package/dist/enno-oduno/handoff.d.ts.map +0 -1
  473. package/dist/enno-oduno/handoff.js +0 -18
  474. package/dist/enno-oduno/handoff.js.map +0 -1
  475. package/dist/enno-oduno/language.d.ts +0 -4
  476. package/dist/enno-oduno/language.d.ts.map +0 -1
  477. package/dist/enno-oduno/language.js +0 -6
  478. package/dist/enno-oduno/language.js.map +0 -1
  479. package/dist/enno-oduno/memory-focus.d.ts +0 -32
  480. package/dist/enno-oduno/memory-focus.d.ts.map +0 -1
  481. package/dist/enno-oduno/memory-focus.js +0 -87
  482. package/dist/enno-oduno/memory-focus.js.map +0 -1
  483. package/dist/enno-oduno/memory-refresh-policy.d.ts +0 -17
  484. package/dist/enno-oduno/memory-refresh-policy.d.ts.map +0 -1
  485. package/dist/enno-oduno/memory-refresh-policy.js +0 -11
  486. package/dist/enno-oduno/memory-refresh-policy.js.map +0 -1
  487. package/dist/enno-oduno/memory-verification.d.ts +0 -7
  488. package/dist/enno-oduno/memory-verification.d.ts.map +0 -1
  489. package/dist/enno-oduno/memory-verification.js +0 -59
  490. package/dist/enno-oduno/memory-verification.js.map +0 -1
  491. package/dist/enno-oduno/plan-draft.d.ts +0 -15
  492. package/dist/enno-oduno/plan-draft.d.ts.map +0 -1
  493. package/dist/enno-oduno/plan-draft.js +0 -20
  494. package/dist/enno-oduno/plan-draft.js.map +0 -1
  495. package/dist/enno-oduno/plan-recovery.d.ts +0 -44
  496. package/dist/enno-oduno/plan-recovery.d.ts.map +0 -1
  497. package/dist/enno-oduno/plan-recovery.js +0 -160
  498. package/dist/enno-oduno/plan-recovery.js.map +0 -1
  499. package/dist/enno-oduno/repository-state.d.ts +0 -10
  500. package/dist/enno-oduno/repository-state.d.ts.map +0 -1
  501. package/dist/enno-oduno/repository-state.js +0 -146
  502. package/dist/enno-oduno/repository-state.js.map +0 -1
  503. package/dist/enno-oduno/sanitize.d.ts +0 -17
  504. package/dist/enno-oduno/sanitize.d.ts.map +0 -1
  505. package/dist/enno-oduno/sanitize.js +0 -88
  506. package/dist/enno-oduno/sanitize.js.map +0 -1
  507. package/dist/enno-oduno/schemas.d.ts +0 -968
  508. package/dist/enno-oduno/schemas.d.ts.map +0 -1
  509. package/dist/enno-oduno/schemas.js +0 -622
  510. package/dist/enno-oduno/schemas.js.map +0 -1
  511. package/dist/enno-oduno/service.d.ts +0 -62
  512. package/dist/enno-oduno/service.d.ts.map +0 -1
  513. package/dist/enno-oduno/service.js +0 -1505
  514. package/dist/enno-oduno/service.js.map +0 -1
  515. package/dist/enno-oduno/skills.d.ts +0 -22
  516. package/dist/enno-oduno/skills.d.ts.map +0 -1
  517. package/dist/enno-oduno/skills.js +0 -127
  518. package/dist/enno-oduno/skills.js.map +0 -1
  519. package/dist/enno-oduno/store.d.ts +0 -109
  520. package/dist/enno-oduno/store.d.ts.map +0 -1
  521. package/dist/enno-oduno/store.js +0 -833
  522. package/dist/enno-oduno/store.js.map +0 -1
  523. package/dist/enno-oduno/types.d.ts +0 -457
  524. package/dist/enno-oduno/types.d.ts.map +0 -1
  525. package/dist/enno-oduno/types.js +0 -66
  526. package/dist/enno-oduno/types.js.map +0 -1
  527. package/dist/enno-oduno/validation-errors.d.ts +0 -93
  528. package/dist/enno-oduno/validation-errors.d.ts.map +0 -1
  529. package/dist/enno-oduno/validation-errors.js +0 -159
  530. package/dist/enno-oduno/validation-errors.js.map +0 -1
  531. package/dist/enno-oduno/verifier.d.ts +0 -16
  532. package/dist/enno-oduno/verifier.d.ts.map +0 -1
  533. package/dist/enno-oduno/verifier.js +0 -271
  534. package/dist/enno-oduno/verifier.js.map +0 -1
  535. package/docs/enno-memory-benchmark.json +0 -761
  536. package/docs/enno-memory-evaluation.md +0 -137
  537. package/docs/enno-oduno.ja.md +0 -68
  538. package/docs/enno-oduno.md +0 -94
  539. package/skills/kiokuko-enno-oduno/SKILL.md +0 -64
  540. package/skills/kiokuko-enno-oduno/enno-oduno.png +0 -0
@@ -2,7 +2,7 @@
2
2
 
3
3
  ## Model and reasoning handoff
4
4
 
5
- When a user changes the DSH model or reasoning effort, Kiokuko can shorten eligible older tool results with the selected Jev or Laya decision provider and ask DSH's configured summarizer to create one native checkpoint. The checkpoint replaces older model-visible conversation; the original events remain in the append-only session history. The last two completed model steps, pending input, and latest user message remain verbatim. Automatic Enno/Deep routing and delegated children do not trigger a handoff.
5
+ When a user changes the DSH model or reasoning effort, Kiokuko can shorten eligible older tool results with the selected Jev or Laya decision provider and ask DSH's configured summarizer to create one native checkpoint. The checkpoint replaces older model-visible conversation; the original events remain in the append-only session history. The last two completed model steps, pending input, and latest user message remain verbatim. Automatic Deep routing and delegated children do not trigger a handoff.
6
6
 
7
7
  ```yaml
8
8
  modelHandoff:
@@ -35,7 +35,7 @@ If no complete source line fits that excerpt, the result stays full: no new pack
35
35
 
36
36
  Failures, unknown success, background execution, Lisp and execution-control results are excluded. Bash additionally requires a captured structured foreground exit status of zero, without interruption or sandbox failure, and an exact match to the logged presentation. `isError: false` alone is insufficient. After reload, Bash results without that live proof remain untouched.
37
37
 
38
- The auxiliary native tool is separate from Enno business operations:
38
+ The auxiliary native tool is separate from business operations:
39
39
 
40
40
  ```ts
41
41
  observation_read({ handle, offset: 2000, limit: 2000 })
@@ -41,9 +41,9 @@ hooks do not provide those running services.
41
41
  For historical v0 logs, the checker also normalizes Kiokuko's old
42
42
  `continuation` / `loop-recovery` message sources and serialized diagnostic
43
43
  stacks in supported abort causes. The exact old cancellation text
44
- `kiokuko dsh Enno continuation stopped: continuation_limit` becomes a
44
+ `kiokuko dsh continuation stopped: continuation_limit` becomes a
45
45
  `hook` cause retaining that text; other string causes remain unsupported.
46
- Native Enno cancellations also use structured `hook` causes for new records.
46
+ Native cancellations also use structured `hook` causes for new records.
47
47
  It runs the complete native migration in
48
48
  isolation, validates the resulting v3 history, then publishes that new
49
49
  generation under DSH's write lease. The original v0 file remains unchanged,
@@ -18,9 +18,8 @@ Reload the plugin to change modes. `full` is also the rollback setting. Neither
18
18
  mode changes native permissions, tool schemas, task selection or the original
19
19
  user message. The ordinary Skill catalog is not a claim that every listed Skill
20
20
  was loaded. SOUL is automatic; Japanese guidance follows the routed model family;
21
- Lisp guidance follows explicit enable; Enno contracts follow the current role and
22
- selected experts; ordinary additional Skills remain available through the native
23
- Skill tool. Complete supplied runtime guidance needs no full-file reread.
21
+ Lisp guidance follows explicit enable; ordinary additional Skills remain
22
+ available through the native Skill tool. Complete supplied runtime guidance needs no full-file reread.
24
23
 
25
24
  ## One source, two representations
26
25
 
@@ -77,7 +76,6 @@ it never installs into the user's live profile.
77
76
  | --- | --- |
78
77
  | SOUL, native/explicit/prompt-only entrypoints | Compiled body in adapter-observed request |
79
78
  | All nine native Skill lookups | Native tool execution, result rendering, next request |
80
- | Enno role Skills and selected expert | Real admitted role transitions, retry and persisted resume |
81
79
  | Deep Japanese guidance | Every worker's request and budget accounting |
82
80
  | Lisp enable and lisp_describe | Real protected SBCL, six-tool surface, next request body |
83
81
  | DeepSeek wire serializer | Actual provider serializer; fetch boundary captured before network |
@@ -2,7 +2,7 @@
2
2
 
3
3
  On hosts where the executor supplies schemas after the prompt waterfall, Kiokuko preserves the provider's admitted tools and reports `unsupported_runtime` for presentation reduction. `phase`, `lean`, and `auto` do not claim tool or description savings on that API. Native permissions, task guards, and scoped protocol tools remain authoritative; no older runtime is selected.
4
4
 
5
- `toolExposure.mode` controls only which Kiokuko-owned definitions appear in native model requests. The default is `auto`. On all DSH native provider connections, normal chat, research, analysis, writing and review omit the nine Kiokuko model tools. Normal build, debug and devops use lean descriptions with the current phase and `nextAction` policy. An active Enno selection takes precedence over task type and uses that same policy. Native and external tools remain available. Configure explicitly with:
5
+ `toolExposure.mode` controls only which Kiokuko-owned definitions appear in native model requests. The default is `auto`. On all DSH native provider connections, normal chat, research, analysis, writing and review omit the Kiokuko model tools entirely. Normal build, debug and devops requests use full definitions without lean descriptions. Native and external tools remain available. Configure explicitly with:
6
6
 
7
7
  ```yaml
8
8
  config:
@@ -1,7 +1,7 @@
1
1
  # Typed AI decisions
2
2
 
3
3
  Kiokuko uses one host-owned decision service for provisional Akinator task types,
4
- installed Skill relevance, past memory reuse, Zenki draft review, [post-display answer review](answer-review.md), and semantic decisions inside Lisp.
4
+ installed Skill relevance, past memory reuse, [post-display answer review](answer-review.md), and semantic decisions inside Lisp.
5
5
  The selected adapter owns its transport protocol and uncertainty policy. Domain
6
6
  workflows consume `selected` or `abstained`; they do not depend on model names.
7
7
 
@@ -286,14 +286,6 @@ missing configuration, uncertainty and service failures use the existing workflo
286
286
  fallback. Identity, revision, permission and integrity failures never authorize
287
287
  fallback execution.
288
288
 
289
- Zenki calls `enno_plan_review` with the complete candidate. All atomic checks must
290
- be answered; otherwise the exact persisted `roles.check` model reviews the full
291
- candidate in a no-tool stream. Both paths share a 30-second review budget. All
292
- three contribution slots need dispositions. `enno_plan_submit` accepts only the
293
- identical reviewed candidate with the same catalog and revisions. A changed draft
294
- requires review again. If neither reviewer completes, the draft remains
295
- unsubmitted. Existing confirmation and Goki lease checks still apply. Already
296
- accepted plans continue normally; old pre-draft advice cannot satisfy review.
297
289
 
298
290
  In Lisp:
299
291
 
@@ -17,14 +17,21 @@ fixtures remain `prerequisite-missing` for checks that require them.
17
17
 
18
18
  CI schedules **Linux x64** and **macOS ARM64**. Full selection has 21 jobs:
19
19
  selection, two native micro-judge builds, 17 verification lanes and the aggregate.
20
+ Every CI run resolves the latest official DSH `master` before selecting coverage.
21
+ That SHA is an independent input to the plan and its digest: repository-only
22
+ diffs, including prose-only changes, cannot reduce GitHub compatibility coverage.
23
+ All lanes build that run's resolved SHA; the next run resolves upstream again.
24
+ Resolution failure fails the run rather than falling back to a locked fixture.
25
+ A daily GitHub run at 03:17 UTC also checks upstream-only changes. Depot keeps its
26
+ Linux-only coverage, but likewise resolves latest DSH and never skips it for prose.
20
27
  Linux ARM64 is not scheduled or claimed as CI coverage. Its runtime/build support
21
28
  remains in the native target registry; this workflow does not produce its binary.
22
29
 
23
30
  The required `verify` aggregate consumes `select`, `micro-judge-native` and `checks`.
24
31
  Every selected lane and native artifact must be present, successful, fresh and
25
32
  bound to the same selected plan and source. Failure, cancellation, a missing
26
- selected report, an extra target or an altered artifact fails acceptance. Only
27
- prose-only selection can legitimately skip both executable job groups. The
33
+ selected report, an extra target or an altered artifact fails acceptance. Local
34
+ diff-only plans without an upstream input may skip prose-only work; CI may not. The
28
35
  remaining Linux x64/macOS ARM64 check inventories and their deadlines are unchanged.
29
36
  The CI review bundle contains exactly its selected targets; standalone native
30
37
  bundle verification still requires the complete supported-target inventory.
@@ -82,7 +89,6 @@ arbitrary stdout or a successful no-op process is insufficient.
82
89
  | skill-delivery | main, lisp | `node scripts/run-skill-delivery.mjs` | explicit completion receipt |
83
90
  | consumer-npm | main, runtime | `node scripts/verify-agenticreplay-consumer.mjs` | explicit completion receipt |
84
91
  | consumer-pnpm | main, runtime | `node scripts/verify-agenticreplay-consumer.mjs --pnpm` | explicit completion receipt |
85
- | dsh-lifecycle | main, runtime | `node scripts/run-enno-dsh-e2e.mjs` | explicit completion receipt |
86
92
  | sqlite-vec | main, semantic | `npm run test:sqlite-vec` | explicit completion receipt |
87
93
  | code-provider | code-provider | `node scripts/run-ci-native.mjs code-provider` | Explicit selected native fixture; nonempty official lifecycle without skipped required cases. |
88
94
  | p0 | p0 | `node scripts/run-ci-native.mjs p0` | Explicit selected native fixture; nonempty official lifecycle without skipped required cases. |
@@ -112,10 +118,6 @@ Node/ABI or native dependency is reused across platforms.
112
118
  Import-only convenience entrypoints remain usable explicitly. Recursive discovery
113
119
  excludes these aliases and executes each declared leaf exactly once:
114
120
 
115
- - `tests/dsh/integration/capability.test.ts`: `tests/dsh/integration/akinator-gate.test.ts`, `tests/dsh/integration/pre-step/gate.test.ts`, `tests/dsh/unit/capability-catalog.test.ts`.
116
- - `tests/dsh/integration/close-resume.test.ts`: `tests/dsh/integration/run-close.test.ts`, `tests/dsh/integration/run-resume.test.ts`, `tests/dsh/integration/run-resume/exact-route.test.ts`.
117
- - `tests/dsh/integration/enno-turn-stopping.test.ts`: `tests/dsh/integration/turn-stopping-gate.test.ts`, `tests/dsh/integration/enno-role-loop.test.ts`.
118
- - `tests/dsh/integration/provider.test.ts`: `tests/dsh/integration/skill-provider.test.ts`.
119
121
 
120
122
  ## Explicit optional lanes
121
123
 
@@ -143,3 +145,5 @@ Native Lisp integration requires `protected-python3`: a real sandbox subprocess
143
145
  probe. An Apple launcher that only reports its version outside the sandbox does
144
146
  not satisfy this capability. Local/CI environment preparation must select a real
145
147
  installed Python interpreter; the repository never changes the global PATH.
148
+
149
+ `full` runs unit/integration/e2e through the existing CI ownership split when the protected Lisp lane is required. Lisp and explicitly owned package/Skill cases run in their dedicated checks once. Standalone `main` remains complete. The import-only aliases and manual duplicate suite launchers have been removed; use the canonical check plan.
@@ -0,0 +1,7 @@
1
+ # Apply after the Kiokuko bundle only when validating the original plugin mode.
2
+ - id: kiokuko-harness
3
+ disabled: true
4
+ - id: agent-loop
5
+ disabled: false
6
+ - id: kiokuko-dsh
7
+ inject: [skills, systemPrompt, tools, commands, userQuestions, sessions, sessionQuery, sessionPersistence, llm, agents, attachments, subagents, subprocess]
@@ -3,6 +3,8 @@
3
3
  # the stock row automatically.
4
4
  - id: session-log-download
5
5
  disabled: true
6
+ - id: agent-loop
7
+ disabled: true
6
8
  - insert:
7
9
  # Saved model providers must survive a failure of the execution plugin.
8
10
  - id: kiokuko-models
@@ -10,7 +12,7 @@
10
12
  inject: [llm, commands]
11
13
  - id: kiokuko-dsh
12
14
  name: 'kiokuko-dsh'
13
- inject: [skills, systemPrompt, tools, commands, userQuestions, sessions, sessionQuery, sessionPersistence, llm, agents, attachments, subagents, subprocess]
15
+ inject: [kiokukoHarness, skills, systemPrompt, tools, commands, userQuestions, sessions, sessionQuery, sessionPersistence, llm, agents, attachments, subagents, subprocess]
14
16
  config:
15
17
  enabled: true
16
18
  agenticReplay:
@@ -21,3 +23,6 @@
21
23
  capture:
22
24
  content: redacted
23
25
  reasoning: false
26
+ - id: kiokuko-harness
27
+ name: 'kiokuko-dsh/harness'
28
+ inject: [agents, sessions, llm, systemPrompt, tools, sessionProjections, sessionPersistence]
@@ -38,12 +38,15 @@ const finish = () => {
38
38
  if (!terminal) return
39
39
  if (launch.namespaceInfo) {
40
40
  if (!namespace) return // Missing ownership evidence never confirms Stop.
41
- try {
42
- if (sameProcess(namespace.pid, namespace.identity)) {
43
- finishTimer ??= setTimeout(() => { finishTimer = undefined; finish() }, 10)
44
- return
45
- }
46
- } catch { unconfirmed('cannot confirm sandbox child termination'); return }
41
+ let stopped = false
42
+ try { stopped = !sameProcess(namespace.pid, namespace.identity) }
43
+ catch (error) { unconfirmed(`cannot confirm sandbox child termination (${error.code ?? 'UNKNOWN'})`) }
44
+ // Observation can race /proc teardown. Keep ownership until a later positive
45
+ // confirmation; one failed lookup must not disable the existing polling.
46
+ if (!stopped) {
47
+ finishTimer ??= setTimeout(() => { finishTimer = undefined; finish() }, 10)
48
+ return
49
+ }
47
50
  }
48
51
  clearTimeout(finishTimer)
49
52
  clearInterval(namespaceLifetime)
@@ -109,7 +112,13 @@ if (launch.namespaceInfo) {
109
112
  // The channel is private to bwrap and closed before guest execution.
110
113
  // Check kernel parentage while its monitor is alive, then retain the
111
114
  // birth fingerprint so a later orphan or PID reuse cannot change scope.
112
- if (sameProcess(pid, identity) && (!identity || parentPid(pid) !== child.pid)) throw new Error('not an owned child')
115
+ if (sameProcess(pid, identity)) {
116
+ if (!identity) throw new Error('identity unavailable')
117
+ try { if (parentPid(pid) !== child.pid) throw new Error('not an owned child') }
118
+ catch (error) {
119
+ if (!['ENOENT', 'ESRCH'].includes(error.code) || sameProcess(pid, identity)) throw error
120
+ }
121
+ }
113
122
  namespace = { pid, identity }
114
123
  // A dead bwrap monitor cannot donate a still-live namespace runtime.
115
124
  reportRuntime(pid)
package/lisp/tools.lisp CHANGED
@@ -322,7 +322,7 @@ CHOICES contains 1-8 (restart-name description) pairs. No expression replay or a
322
322
  (unless (member restart (compute-restarts condition)) (error "RECOVERY_STALE"))
323
323
  (invoke-restart restart)))))
324
324
  (in-package :kioku.environment)
325
- (defun status () (kioku.internal:object "generation" kioku.internal:*generation* "sbcl" (lisp-implementation-version) "os" (software-type) "architecture" (machine-type) "scratch" (namestring (kioku.files:scratch)) "executionMode" (or (uiop:getenv "KIOKU_EXECUTION_MODE") "protected") "network" (if (equal (uiop:getenv "KIOKU_EXECUTION_MODE") "development") "normal user environment" yason:false) "hostWrites" (if (equal (uiop:getenv "KIOKU_EXECUTION_MODE") "development") "owned tools and direct Lisp; only host receipts prove observed effects" "proposals only") "libraries" #("yason" "cl-ppcre" "cl-csv")))
325
+ (defun status () (kioku.internal:object "generation" kioku.internal:*generation* "sbcl" (lisp-implementation-version) "os" (software-type) "architecture" (machine-type) "scratch" (namestring (kioku.files:scratch)) "executionMode" (or (uiop:getenv "KIOKU_EXECUTION_MODE") "protected") "network" yason:false "hostWrites" (if (equal (uiop:getenv "KIOKU_EXECUTION_MODE") "development") "host tools and proposals; operation permissions apply" "proposals only") "libraries" #("yason" "cl-ppcre" "cl-csv")))
326
326
  (in-package :kioku.tools)
327
327
  (defun available-tools () (kioku.internal:rpc "tools-list" (kioku.internal:object)))
328
328
  (defun call-tool (name &optional (arguments (kioku.internal:object)))
@@ -0,0 +1,19 @@
1
+ -- 051_drop_enno.sql
2
+ -- The Enno (役小角 / enno-oduno) orchestration feature was removed from the
3
+ -- codebase. Its durable tables are dropped here, children first, so existing
4
+ -- databases stay valid and openable after this forward-only migration.
5
+ -- Shared DSH machinery (ledger_runs, dsh_turn_receipts, dsh_boundary_jobs,
6
+ -- dsh_continuation_outbox, dsh_loop_guard_*) is deliberately retained.
7
+
8
+ DROP TABLE IF EXISTS enno_advisory_contributions;
9
+ DROP TABLE IF EXISTS enno_advisory_rounds;
10
+ DROP TABLE IF EXISTS enno_execution_leases;
11
+ DROP TABLE IF EXISTS enno_resume_tokens;
12
+ DROP TABLE IF EXISTS enno_dsh_continuations;
13
+ DROP TABLE IF EXISTS enno_operation_receipts;
14
+ DROP TABLE IF EXISTS enno_verifier_runs;
15
+ DROP TABLE IF EXISTS enno_work_units;
16
+ DROP TABLE IF EXISTS enno_plan_drafts;
17
+ DROP TABLE IF EXISTS dsh_enno_delegations;
18
+ DROP TABLE IF EXISTS dsh_enno_memory_refresh;
19
+ DROP TABLE IF EXISTS enno_contracts;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kiokuko-dsh",
3
- "version": "0.2.39",
3
+ "version": "0.2.41",
4
4
  "description": "Kiokuko plugin for DeepSeek Harness",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -22,7 +22,7 @@
22
22
  "dist/",
23
23
  "migrations/",
24
24
  "skills/",
25
- "dsh/cordis.patch.yml",
25
+ "dsh/",
26
26
  "docs/",
27
27
  "scripts/prepare-build.mjs",
28
28
  "scripts/backfill-akinator-memory.mjs",
@@ -70,9 +70,9 @@
70
70
  "types": "./dist/dsh/core/index.d.ts",
71
71
  "default": "./dist/dsh/core/index.js"
72
72
  },
73
- "./modules/enno": {
74
- "types": "./dist/dsh/modules/enno.d.ts",
75
- "default": "./dist/dsh/modules/enno.js"
73
+ "./harness": {
74
+ "types": "./dist/dsh/harness/index.d.ts",
75
+ "default": "./dist/dsh/harness/index.js"
76
76
  },
77
77
  "./modules/lisp": {
78
78
  "types": "./dist/dsh/modules/lisp.d.ts",
@@ -187,14 +187,12 @@
187
187
  "test:evaluation:memory-reuse": "node --import tsx scripts/run-memory-reuse-evaluation.mjs",
188
188
  "probe:lisp:p0": "node --import tsx scripts/probe-lisp-p0.ts",
189
189
  "test:integration": "node scripts/run-tests.mjs tests/dsh/integration",
190
- "test:memory:admission": "node scripts/run-tests.mjs tests/dsh/integration/memory-application.test.ts tests/dsh/integration/on-demand-native.test.ts tests/dsh/unit/on-demand-review-regressions.test.ts",
191
190
  "test:integration:tool-exposure": "node scripts/run-tests.mjs tests/dsh/integration/tool-exposure-native.test.ts",
192
191
  "test:sqlite-vec": "node --import tsx tests/ci/sqlite-vec-package-smoke.ts",
193
192
  "test:evaluation": "npm run build && node scripts/run-retrieval-evaluation.mjs",
194
193
  "test:benchmark": "npm run build && node scripts/run-retrieval-benchmark.mjs",
195
194
  "test:benchmark:dsh-log": "npm run build && node scripts/run-dsh-million-event-benchmark.mjs",
196
195
  "test:efficiency": "node --import tsx scripts/run-token-efficiency-evaluation.mjs",
197
- "test:e2e:dsh": "npm run build && node scripts/run-enno-dsh-e2e.mjs",
198
196
  "test:cli-profile": "node scripts/verify-cli-profile.mjs",
199
197
  "verify:prepare": "node scripts/verify-prepare-reproducibility.mjs",
200
198
  "sampledb:generate": "node --import tsx tests/fixtures/sample-database.ts tests/sampledb/kiokuko-dsh.sqlite3",
@@ -214,9 +212,6 @@
214
212
  "test:benchmark:akinator": "npm run build && node scripts/run-akinator-memory-benchmark.mjs",
215
213
  "test:continuity": "node scripts/run-tests.mjs tests/dsh/unit/continuity tests/dsh/integration/continuity",
216
214
  "test:evaluation:continuity": "node --import tsx scripts/run-continuity-evaluation.mjs",
217
- "test:enno-memory": "node scripts/run-tests.mjs tests/dsh/unit/enno-memory tests/dsh/integration/enno-memory",
218
- "test:benchmark:enno-memory": "node --import tsx scripts/run-enno-memory-benchmark.ts",
219
- "test:evaluation:enno-memory": "node scripts/run-enno-memory-evaluation.mjs",
220
215
  "verify:lisp:vendor": "node scripts/verify-lisp-vendor.mjs",
221
216
  "test:packages:live": "KIOKUKO_REQUIRE_LISP_RUNTIME=1 KIOKUKO_PACKAGE_LIVE=1 node scripts/run-tests.mjs tests/dsh/integration/lisp/packages-live.test.ts",
222
217
  "test:packages": "KIOKUKO_REQUIRE_LISP_RUNTIME=1 node scripts/run-tests.mjs tests/dsh/unit/lisp/packages.test.ts tests/dsh/integration/lisp/packages-runtime.test.ts tests/dsh/integration/lisp/packages-update.test.ts",
@@ -251,13 +246,9 @@
251
246
  "test:ci:e2e": "node scripts/run-ci-native.mjs e2e",
252
247
  "test:ci:metadata": "npm run publint",
253
248
  "test:ci:e2e:core": "node scripts/run-ci-native.mjs e2e-core",
254
- "test:ci:e2e:agent": "node scripts/run-ci-native.mjs e2e-agent",
255
249
  "test:ci:e2e:repeated": "node scripts/run-ci-native.mjs e2e-repeated",
256
250
  "test:ci:repeated:deep": "node scripts/run-ci-native.mjs e2e-repeated-deep",
257
251
  "test:ci:repeated:normal": "node scripts/run-ci-native.mjs e2e-repeated-normal",
258
- "test:ci:repeated:enno": "node scripts/run-ci-native.mjs e2e-repeated-enno",
259
- "test:ci:repeated:enno:prefix": "node scripts/run-ci-native.mjs e2e-repeated-enno-prefix",
260
- "test:ci:repeated:enno:bounded": "node scripts/run-ci-native.mjs e2e-repeated-enno-bounded",
261
252
  "test:ci:lisp": "node scripts/run-ci-native.mjs lisp",
262
253
  "test:ci:prepare": "npm run verify:prepare",
263
254
  "test:ci:embedding": "node scripts/run-local-embedding-smoke.mjs --offline",
@@ -156,7 +156,7 @@ function repairLegacyAbortRecord(value) {
156
156
  const record = objectRecord(value), data = objectRecord(record?.data)
157
157
  const reason = objectRecord(data?.reason)
158
158
  if (record?.type !== 'turn/end' || reason?.kind !== 'aborted') return value
159
- if (reason.reason === 'kiokuko dsh Enno continuation stopped: continuation_limit') {
159
+ if (reason.reason === 'kiokuko dsh continuation stopped: continuation_limit') {
160
160
  return { ...record, data: { ...data, reason: { ...reason, reason: { kind: 'hook', reason: reason.reason } } } }
161
161
  }
162
162
  const cause = objectRecord(reason.reason)
@@ -45,7 +45,7 @@ description: コードを書く、変更するすべての依頼で使用する
45
45
 
46
46
  ## 2. 部品ではなく、つながった利用経路を見る
47
47
 
48
- DSH の実装タスクで明示的な coding workflow を使う場合は、初回の変更前に `coding_workflow status` を読む。`applicable:false` は通常チャットに workflow がないという観測であり、エラーや通常操作の禁止ではない。準備済みのタスクでは、`propose` で Goal・依存関係付きの全項目・各項目の観測可能な条件・別の最終 Goal 条件を原子的に登録する。先に必要な読取調査を行ってよい。元依頼の権限と対象を広げない。Enno では既存 ideal・plan を提出し、その共通表示を使う。別の Goal を提案しない。
48
+ DSH の実装タスクで明示的な coding workflow を使う場合は、初回の変更前に `coding_workflow status` を読む。`applicable:false` は通常チャットに workflow がないという観測であり、エラーや通常操作の禁止ではない。準備済みのタスクでは、`propose` で Goal・依存関係付きの全項目・各項目の観測可能な条件・別の最終 Goal 条件を原子的に登録する。先に必要な読取調査を行ってよい。元依頼の権限と対象を広げない。既に登録された Goal と検証条件があれば再利用する。
49
49
 
50
50
  通常 native 実装依頼ではモデル要求前に Lisp を提案し、ON 済みならその経路を使う。Goal 準備は同じ依頼の人間の回答を再利用する。全ての goal.criterionIds を、実装を担当する少なくとも1つの items[].goalCriterionIds に対応付ける。未対応 ID の診断では該当 item を自分で選んで修正し、最終条件を消したり対応を捏造しない。
51
51
 
@@ -14,11 +14,11 @@ Coding: coding_workflow defines Goal/items/checks before the task Lisp choice. P
14
14
 
15
15
 
16
16
 
17
- Persistent: coding choice or /kioku-lisp enable. Task: /kioku-lisp enable-task, fresh workers per call. ON selects Lisp computation/orchestration; direct Bash/zsh/PowerShell is rejected, even reads. Run Git/gh/builds/tests through kioku.process:run / start-job. Read/search/Skill and owned file tools remain available. Failure requires recovery or explicit /kioku-lisp disable; no silent shell fallback. Never spoof host-bound session/agent/directory/generation.
17
+ Persistent: coding choice or /kioku-lisp enable. /kioku-lisp enable-task optionally selects disposable scratch evaluations. lisp_define, lisp_call and lisp_observe need no task-mode switch or Working task. Compose functions by exact dependency refs; reuse only your own protected worker, otherwise compute in private protected scratch with no repository mount or host RPC. Schemas never prove arbitrary Lisp safe. A child inherits only capabilities visible in its native scope, not the parent's task lease, heap, or result refs. Shared publication and real effects retain their approval and authority checks. ON selects Lisp computation/orchestration; direct Bash/zsh/PowerShell is rejected, even reads. Run Git/gh/builds/tests through kioku.process:run / start-job. Read/search/Skill and owned file tools remain available. Failure requires recovery or explicit /kioku-lisp disable; no silent shell fallback. Never spoof host-bound session/agent/directory/generation.
18
18
 
19
19
  Owned kioku_read/write/edit/remove/exec/result retain development receipts. Ordinary commands, investigation, builds/tests, edits and disposable artifacts need no routine confirmation. Source/data deletion and durable user DB mutation require concrete review; declare destructiveTargets. Arbitrary code effects are not exhaustively classified. Organize memory only after completion and permission; save only the exact approved content.
20
20
 
21
- Foreground kioku.process:run retains native Bash sandbox/approval/Stop without a memory task/Goal. Protected coding requires prototype/result inspection. Admitted workflows, owned tools and async jobs keep task/protocol authority. Use kioku.tools:call-tool/broker receipts; direct Lisp/FFI or generated passed fields prove no verification. Bind task_completion conditions/source paths before checks; collect async receipts with kioku_result. Cancellation/ownership remain authoritative. Plan permits read/search/status until human approval exits at the next boundary.
21
+ Foreground kioku.process:run retains native Bash sandbox/approval/Stop without a memory task/Goal. Protected coding requires prototype/result inspection. Admitted workflows, owned tools and async jobs keep task/protocol authority. Use kioku.tools:call-tool/broker receipts. All workers are OS-isolated; direct Lisp/FFI cannot access workspace files or inherited credentials. Generated passed fields prove no verification. Bind task_completion conditions/source paths before checks; collect async receipts with kioku_result. Cancellation/ownership remain authoritative. Plan permits read/search/status until human approval exits at the next boundary.
22
22
 
23
23
  Schemas define arguments; never guess. `lisp_describe` without a symbol gives the
24
24
  API/verifier map, even during recovery. Persistent `lisp_eval`: declared inputs;
@@ -86,9 +86,15 @@ approval never authorizes writes; only host changes receipts establish APPLIED/U
86
86
 
87
87
  ## Evidence, recovery and adapters
88
88
 
89
- Idle suspension: five minutes/slot pressure, never during turns/evaluations/approvals/jobs.
90
- Use auto-starts, status does not. WORKER_RESUMED ran no code: rebuild state, never
91
- effects. Abnormal stops require recovery.
89
+ Workers persist by default; configured idle suspension never interrupts turns/evaluations/approvals/jobs.
90
+ Routed children keep separate persistent heaps/scratch; reuse definitions per generation.
91
+ Return results via native delivery; never borrow parent authority or foreign refs.
92
+ Failed startup blocks admission; disposal stops only that child. Effects retain session
93
+ permissions/tool restrictions. The host owns startup, capacity and exit. With settled
94
+ journals, clean restart/idle exit auto-starts on next admission, never status; no manual
95
+ recovery prompt. Fault replacements: 2/owner/minute. WORKER_RESUMED ran no code:
96
+ rebuild state, never effects. Cancellation, unknown effects, unconfirmed stop or restart
97
+ limit require inspection/recovery.
92
98
  Results: 16 KiB, no source echoes/duplicates. Page journaled evidence, never rerun/fetch
93
99
  all history. Fix missing paths with native reads; input errors need no recovery. Report
94
100
  observed errors/recovery; missing results never prove deletion/restoration.
@@ -50,7 +50,7 @@ to check the complete workflow. An isolated edit needs no additional audit.
50
50
 
51
51
  For each new or materially changed function, or for the smallest WorkUnit owning one cohesive use case: classify the dominant risk, select one expert below, add at most two more only when the same contract genuinely crosses those risks, record a concrete reason for each, and read the selected files before implementation or review. A different expert set or reason to change means a separate WorkUnit or a separate function contract inside it.
52
52
 
53
- Enno-Oduno plans bind `expertRefs` to the WorkUnit revision: a `code` route requires at least one `code.*`, a `ui` route requires `code.*` and `ui.*`, and `test`, `docs`, and `operations` routes inherit neither. Outside Enno-Oduno, keep the same mapping in the working plan or review notes:
53
+ Code changes select `code.*` expertise; interactive UI changes also select `ui.*`. Tests, documentation and operations select expertise for their actual risks. Keep the mapping in the working plan or review notes:
54
54
 
55
55
  ```text
56
56
  target -> responsibility -> expert IDs -> focused verifier
@@ -39,9 +39,9 @@ When requirements compete, prioritize safety and data preservation, accessibilit
39
39
 
40
40
  ## Expert selection
41
41
 
42
- Select one dominant expert for each UI component or cohesive flow, add at most two more only when the same WorkUnit genuinely crosses those risks, and record a concrete reason for each. On an Enno-Oduno `ui` route the WorkUnit also carries `code.*` expertise, because UI behavior is code behavior; sibling `test`, `docs`, and `operations` units inherit neither.
42
+ Select one dominant expert for each UI component or cohesive flow, add at most two more only when the same WorkUnit genuinely crosses those risks, and record a concrete reason for each. Interactive UI changes also select `code.*` expertise. Tests, documentation and operations select expertise for their actual risks.
43
43
 
44
- Do not read every UI reference “for completeness.” If implementation exposes a new risk, return the WorkUnit for an explicit selection or update the non-Enno working plan before reading the additional fragment.
44
+ Do not read every UI reference “for completeness.” If implementation exposes a new risk, update the working plan and expert selection before reading the additional fragment.
45
45
 
46
46
  ## Expert index
47
47
 
@@ -81,13 +81,10 @@ invalidated by review edits; repeating a checklist proves nothing.
81
81
  In Kiokuko, enter through `kiokuko-soul`; also apply
82
82
  `kiokuko-single-purpose-functions` for code and the applicable UI/workflow Skills.
83
83
  Reuse their contract, plan and evidence rather than generating duplicate plans
84
- or checklists. In DSH, the host owns intake, model routing, delegation and
85
- continuation. Respect the current role/WorkUnit scope; this Skill neither creates
86
- an Enno run nor authorizes extra agents, retries, publication or deployment.
87
-
88
- Assign Frame/Trace/Bound/Implement/Verify/Finish to the admitted role: Zenki
89
- plans, Goki implements/verifies its WorkUnit, Enno accepts the run. A WorkUnit
90
- report is not final acceptance. Normal work adds no orchestration approval.
84
+ or checklists. In DSH, Kiokuko owns the model/tool loop and preserves native
85
+ session and tool contracts. Complete the observable request within the user's
86
+ scope and permissions. This Skill does not authorize extra agents, retries,
87
+ publication or deployment. Passing an intermediate check is not final acceptance.
91
88
 
92
89
  For admitted Lisp, follow its Skill, with prototype-driven-planning for
93
90
  coding/plans: native reads, scratch → proposals → host confirmation → durable
@@ -57,11 +57,9 @@ rollout/restart ordering when old and new versions can coexist.
57
57
 
58
58
  ## Admitted execution paths
59
59
 
60
- Frame/Trace/Bound/Implement/Verify/Finish are responsibilities assigned to the
61
- current role. Zenki plans; Goki implements and verifies only its approved
62
- WorkUnit; Enno owns final acceptance. A WorkUnit report is not run completion.
63
- Normal execution completes the observable request with the available native
64
- permissions; it adds no orchestration approval.
60
+ Trace the request through Kiokuko's model/tool loop to the observable result.
61
+ Native permissions apply at each operation. Intermediate reports and passing
62
+ checks do not establish completion of the whole request.
65
63
 
66
64
  When the host admits protected Lisp, use its Skill and current state: native
67
65
  read/glob/grep/skill remain subject to existing permissions; workspace mutation
@@ -1,32 +0,0 @@
1
- import { type AdvisoryContext, type AdvisoryContribution, type AdvisoryFanoutDirective, type AdvisoryPhase, type AdvisorySlotId } from '../enno-oduno/types.js';
2
- export interface DshAdvisoryCall {
3
- readonly phase: AdvisoryPhase;
4
- readonly slotId: AdvisorySlotId;
5
- readonly rank: number;
6
- readonly role: string;
7
- readonly instructions: string;
8
- readonly context: AdvisoryContext;
9
- readonly tools: readonly [];
10
- readonly signal: AbortSignal;
11
- }
12
- export interface DshAdvisoryRunnerDependencies {
13
- readonly execute: (call: DshAdvisoryCall) => Promise<unknown>;
14
- readonly verifyReadOnly: (call: DshAdvisoryCall) => boolean | PromiseLike<boolean>;
15
- readonly timeoutMs?: number;
16
- }
17
- export interface DshAdvisoryRoundResult {
18
- readonly phase: AdvisoryPhase;
19
- readonly inputDigest: string;
20
- readonly contributions: readonly AdvisoryContribution[];
21
- readonly degraded: boolean;
22
- }
23
- /** Execute exactly the current phase's fixed three slots with no advisor authority. */
24
- export declare class DshAdvisoryRunner {
25
- #private;
26
- constructor(dependencies: DshAdvisoryRunnerDependencies);
27
- run(input: {
28
- readonly directive: AdvisoryFanoutDirective;
29
- readonly signal?: AbortSignal;
30
- }): Promise<DshAdvisoryRoundResult>;
31
- }
32
- //# sourceMappingURL=advisory-runner.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"advisory-runner.d.ts","sourceRoot":"","sources":["../../src/dsh/advisory-runner.ts"],"names":[],"mappings":"AAIA,OAAO,EAGL,KAAK,eAAe,EACpB,KAAK,oBAAoB,EACzB,KAAK,uBAAuB,EAC5B,KAAK,aAAa,EAClB,KAAK,cAAc,EACpB,MAAM,wBAAwB,CAAA;AAE/B,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,KAAK,EAAE,aAAa,CAAA;IAC7B,QAAQ,CAAC,MAAM,EAAE,cAAc,CAAA;IAC/B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IACrB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IACrB,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAA;IAC7B,QAAQ,CAAC,OAAO,EAAE,eAAe,CAAA;IACjC,QAAQ,CAAC,KAAK,EAAE,SAAS,EAAE,CAAA;IAC3B,QAAQ,CAAC,MAAM,EAAE,WAAW,CAAA;CAC7B;AAED,MAAM,WAAW,6BAA6B;IAC5C,QAAQ,CAAC,OAAO,EAAE,CAAC,IAAI,EAAE,eAAe,KAAK,OAAO,CAAC,OAAO,CAAC,CAAA;IAC7D,QAAQ,CAAC,cAAc,EAAE,CAAC,IAAI,EAAE,eAAe,KAAK,OAAO,GAAG,WAAW,CAAC,OAAO,CAAC,CAAA;IAClF,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAA;CAC5B;AAED,MAAM,WAAW,sBAAsB;IACrC,QAAQ,CAAC,KAAK,EAAE,aAAa,CAAA;IAC7B,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAA;IAC5B,QAAQ,CAAC,aAAa,EAAE,SAAS,oBAAoB,EAAE,CAAA;IACvD,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAA;CAC3B;AAmFD,uFAAuF;AACvF,qBAAa,iBAAiB;;gBAGhB,YAAY,EAAE,6BAA6B;IAMjD,GAAG,CAAC,KAAK,EAAE;QACf,QAAQ,CAAC,SAAS,EAAE,uBAAuB,CAAA;QAC3C,QAAQ,CAAC,MAAM,CAAC,EAAE,WAAW,CAAA;KAC9B,GAAG,OAAO,CAAC,sBAAsB,CAAC;CAuBpC"}
@@ -1,116 +0,0 @@
1
- import { canonicalJson, canonicalContentHash } from '../serialization/validate.js';
2
- import { findSecretInValue } from '../memory/secrets.js';
3
- import { advisorySlotDefinitions, normalizeAdvisoryContributions, advisoryRoundAggregate } from '../enno-oduno/advisory.js';
4
- import { advisoryContributionSchemaPublic } from '../enno-oduno/schemas.js';
5
- import { ADVISORY_MAX_ROUND_BYTES, ADVISORY_MAX_SLOT_BYTES, } from '../enno-oduno/types.js';
6
- function failure(slotId, reasonCode) {
7
- return { slotId, outcome: reasonCode === 'host_timeout' ? 'timeout' : reasonCode === 'host_read_only_unavailable' ? 'unavailable' : 'failed', reasonCode };
8
- }
9
- function boundedOutput(slotId, value) {
10
- if (findSecretInValue(value) !== undefined)
11
- return failure(slotId, 'unsafe_output');
12
- if (Buffer.byteLength(canonicalJson(value), 'utf8') > ADVISORY_MAX_SLOT_BYTES)
13
- return failure(slotId, 'invalid_response');
14
- const parsed = advisoryContributionSchemaPublic.safeParse(value);
15
- return parsed.success && parsed.data.slotId === slotId ? parsed.data : failure(slotId, 'invalid_response');
16
- }
17
- function linkAbort(parent, child) {
18
- if (parent.aborted)
19
- child.abort(parent.reason);
20
- const abort = () => child.abort(parent.reason);
21
- parent.addEventListener('abort', abort, { once: true });
22
- return () => parent.removeEventListener('abort', abort);
23
- }
24
- async function runSlot(directive, slot, context, dependencies, parentSignal) {
25
- const controller = new AbortController();
26
- const unlink = linkAbort(parentSignal, controller);
27
- const call = {
28
- phase: directive.phase,
29
- slotId: slot.slotId,
30
- rank: slot.rank,
31
- role: slot.role,
32
- instructions: slot.instructions,
33
- context,
34
- tools: [],
35
- signal: controller.signal,
36
- };
37
- try {
38
- try {
39
- if (!(await dependencies.verifyReadOnly(call)))
40
- return failure(slot.slotId, 'host_read_only_unavailable');
41
- }
42
- catch {
43
- return failure(slot.slotId, 'host_execution_failed');
44
- }
45
- if (parentSignal.aborted)
46
- return failure(slot.slotId, 'host_execution_failed');
47
- const timeoutMs = dependencies.timeoutMs ?? 30_000;
48
- let timer;
49
- const timeout = new Promise((_, reject) => {
50
- timer = setTimeout(() => {
51
- controller.abort(new Error('advisory timeout'));
52
- reject(new Error('advisory timeout'));
53
- }, timeoutMs);
54
- });
55
- let unlinkParentAbort;
56
- const aborted = new Promise((_, reject) => {
57
- if (parentSignal.aborted)
58
- reject(new Error('advisory aborted'));
59
- else {
60
- const onAbort = () => reject(new Error('advisory aborted'));
61
- parentSignal.addEventListener('abort', onAbort, { once: true });
62
- unlinkParentAbort = () => parentSignal.removeEventListener('abort', onAbort);
63
- }
64
- });
65
- try {
66
- const output = await Promise.race([dependencies.execute(call), timeout, aborted]);
67
- try {
68
- return boundedOutput(slot.slotId, output);
69
- }
70
- catch {
71
- return failure(slot.slotId, 'invalid_response');
72
- }
73
- }
74
- catch (error) {
75
- return error instanceof Error && error.message === 'advisory timeout'
76
- ? failure(slot.slotId, 'host_timeout')
77
- : failure(slot.slotId, 'host_execution_failed');
78
- }
79
- finally {
80
- if (timer !== undefined)
81
- clearTimeout(timer);
82
- unlinkParentAbort?.();
83
- }
84
- }
85
- finally {
86
- unlink();
87
- }
88
- }
89
- /** Execute exactly the current phase's fixed three slots with no advisor authority. */
90
- export class DshAdvisoryRunner {
91
- #dependencies;
92
- constructor(dependencies) {
93
- this.#dependencies = dependencies;
94
- const timeoutMs = dependencies.timeoutMs ?? 30_000;
95
- if (!Number.isSafeInteger(timeoutMs) || timeoutMs < 1 || timeoutMs > 120_000)
96
- throw new Error('advisory timeoutMs must be between 1 and 120000');
97
- }
98
- async run(input) {
99
- const expected = advisorySlotDefinitions(input.directive.phase);
100
- if (input.directive.slots.length !== expected.length || input.directive.slots.some((slot, index) => (slot.slotId !== expected[index]?.slotId || slot.rank !== expected[index]?.rank || slot.role !== expected[index]?.role)))
101
- throw new Error('Advisory directive slots do not match the fixed core slot set');
102
- const signal = input.signal ?? new AbortController().signal;
103
- const contributions = await Promise.all(input.directive.slots.map((slot) => runSlot(input.directive, slot, input.directive.context, this.#dependencies, signal)));
104
- const normalized = normalizeAdvisoryContributions(input.directive.phase, contributions);
105
- if (Buffer.byteLength(canonicalJson(normalized), 'utf8') > ADVISORY_MAX_ROUND_BYTES)
106
- throw new Error('Advisory round exceeds the safety limit');
107
- const aggregate = advisoryRoundAggregate(normalized);
108
- return Object.freeze({
109
- phase: input.directive.phase,
110
- inputDigest: canonicalContentHash({ phase: input.directive.phase, slots: expected, context: input.directive.context }),
111
- contributions: Object.freeze(aggregate.contributions),
112
- degraded: aggregate.degraded,
113
- });
114
- }
115
- }
116
- //# sourceMappingURL=advisory-runner.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"advisory-runner.js","sourceRoot":"","sources":["../../src/dsh/advisory-runner.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,oBAAo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