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.
- package/PERMISSIONS.md +2 -2
- package/README.ja.md +17 -5
- package/README.ko.md +17 -5
- package/README.md +17 -5
- package/README.zh-CN.md +17 -5
- package/dist/akinator/skill-discovery-attempt.d.ts +3 -1
- package/dist/akinator/skill-discovery-attempt.d.ts.map +1 -1
- package/dist/akinator/skill-discovery-attempt.js +12 -11
- package/dist/akinator/skill-discovery-attempt.js.map +1 -1
- package/dist/client.cjs +7 -10
- package/dist/client.d.ts.map +1 -1
- package/dist/context/continuity-view.d.ts +0 -11
- package/dist/context/continuity-view.d.ts.map +1 -1
- package/dist/context/continuity-view.js +5 -9
- package/dist/context/continuity-view.js.map +1 -1
- package/dist/deep-thinker/controller.d.ts +4 -1
- package/dist/deep-thinker/controller.d.ts.map +1 -1
- package/dist/deep-thinker/controller.js +10 -0
- package/dist/deep-thinker/controller.js.map +1 -1
- package/dist/deep-thinker/core/contracts.d.ts +11 -11
- package/dist/deep-thinker/memory-finalizer.d.ts +1 -1
- package/dist/deep-thinker/native-executor.d.ts +1 -1
- package/dist/deep-thinker/native-executor.d.ts.map +1 -1
- package/dist/deep-thinker/prompts.js +1 -1
- package/dist/deep-thinker/prompts.js.map +1 -1
- package/dist/deep-thinker/quality-prompts.js +1 -1
- package/dist/deep-thinker/quality-prompts.js.map +1 -1
- package/dist/deep-thinker/report.d.ts +1 -1
- package/dist/deep-thinker/store.d.ts +1 -1
- package/dist/dsh/agenticreplay-hooks.d.ts.map +1 -1
- package/dist/dsh/agenticreplay-hooks.js +13 -0
- package/dist/dsh/agenticreplay-hooks.js.map +1 -1
- package/dist/dsh/agenticreplay-recorder.d.ts +5 -0
- package/dist/dsh/agenticreplay-recorder.d.ts.map +1 -1
- package/dist/dsh/agenticreplay-recorder.js +19 -0
- package/dist/dsh/agenticreplay-recorder.js.map +1 -1
- package/dist/dsh/coding-workflow/contracts.d.ts +2 -5
- package/dist/dsh/coding-workflow/contracts.d.ts.map +1 -1
- package/dist/dsh/coding-workflow/contracts.js +1 -1
- package/dist/dsh/coding-workflow/contracts.js.map +1 -1
- package/dist/dsh/coding-workflow/host.d.ts.map +1 -1
- package/dist/dsh/coding-workflow/host.js +1 -4
- package/dist/dsh/coding-workflow/host.js.map +1 -1
- package/dist/dsh/coding-workflow/intent.d.ts.map +1 -1
- package/dist/dsh/coding-workflow/intent.js +0 -6
- package/dist/dsh/coding-workflow/intent.js.map +1 -1
- package/dist/dsh/coding-workflow/service.d.ts +4 -8
- package/dist/dsh/coding-workflow/service.d.ts.map +1 -1
- package/dist/dsh/coding-workflow/service.js +5 -57
- package/dist/dsh/coding-workflow/service.js.map +1 -1
- package/dist/dsh/completion-report.d.ts +0 -31
- package/dist/dsh/completion-report.d.ts.map +1 -1
- package/dist/dsh/completion-report.js +16 -94
- package/dist/dsh/completion-report.js.map +1 -1
- package/dist/dsh/composition.d.ts +1 -3
- package/dist/dsh/composition.d.ts.map +1 -1
- package/dist/dsh/composition.js +13 -34
- package/dist/dsh/composition.js.map +1 -1
- package/dist/dsh/config.d.ts +1 -22
- package/dist/dsh/config.d.ts.map +1 -1
- package/dist/dsh/config.js +0 -8
- package/dist/dsh/config.js.map +1 -1
- package/dist/dsh/context-injection.d.ts +1 -11
- package/dist/dsh/context-injection.d.ts.map +1 -1
- package/dist/dsh/context-injection.js +3 -24
- package/dist/dsh/context-injection.js.map +1 -1
- package/dist/dsh/continuity-adapter.d.ts +0 -5
- package/dist/dsh/continuity-adapter.d.ts.map +1 -1
- package/dist/dsh/continuity-adapter.js +1 -39
- package/dist/dsh/continuity-adapter.js.map +1 -1
- package/dist/dsh/decisions/contracts.d.ts +0 -1
- package/dist/dsh/decisions/contracts.d.ts.map +1 -1
- package/dist/dsh/decisions/contracts.js +1 -1
- package/dist/dsh/decisions/contracts.js.map +1 -1
- package/dist/dsh/decisions/diagnostics.d.ts +8 -11
- package/dist/dsh/decisions/diagnostics.d.ts.map +1 -1
- package/dist/dsh/decisions/diagnostics.js +1 -9
- package/dist/dsh/decisions/diagnostics.js.map +1 -1
- package/dist/dsh/decisions/intent-assessment.d.ts +2 -5
- package/dist/dsh/decisions/intent-assessment.d.ts.map +1 -1
- package/dist/dsh/decisions/intent-assessment.js +17 -9
- package/dist/dsh/decisions/intent-assessment.js.map +1 -1
- package/dist/dsh/efficiency.d.ts +0 -3
- package/dist/dsh/efficiency.d.ts.map +1 -1
- package/dist/dsh/efficiency.js +1 -9
- package/dist/dsh/efficiency.js.map +1 -1
- package/dist/dsh/execution-selection.d.ts +6 -7
- package/dist/dsh/execution-selection.d.ts.map +1 -1
- package/dist/dsh/execution-selection.js +10 -15
- package/dist/dsh/execution-selection.js.map +1 -1
- package/dist/dsh/execution-support.d.ts +0 -4
- package/dist/dsh/execution-support.d.ts.map +1 -1
- package/dist/dsh/execution-support.js +3 -15
- package/dist/dsh/execution-support.js.map +1 -1
- package/dist/dsh/harness/factory.d.ts +109 -0
- package/dist/dsh/harness/factory.d.ts.map +1 -0
- package/dist/dsh/harness/factory.js +566 -0
- package/dist/dsh/harness/factory.js.map +1 -0
- package/dist/dsh/harness/inbox.d.ts +22 -0
- package/dist/dsh/harness/inbox.d.ts.map +1 -0
- package/dist/dsh/harness/inbox.js +61 -0
- package/dist/dsh/harness/inbox.js.map +1 -0
- package/dist/dsh/harness/index.d.ts +19 -0
- package/dist/dsh/harness/index.d.ts.map +1 -0
- package/dist/dsh/harness/index.js +26 -0
- package/dist/dsh/harness/index.js.map +1 -0
- package/dist/dsh/harness/lifecycle.d.ts +26 -0
- package/dist/dsh/harness/lifecycle.d.ts.map +1 -0
- package/dist/dsh/harness/lifecycle.js +21 -0
- package/dist/dsh/harness/lifecycle.js.map +1 -0
- package/dist/dsh/harness/projections.d.ts +16 -0
- package/dist/dsh/harness/projections.d.ts.map +1 -0
- package/dist/dsh/harness/projections.js +34 -0
- package/dist/dsh/harness/projections.js.map +1 -0
- package/dist/dsh/head-worker-configuration.d.ts +1 -2
- package/dist/dsh/head-worker-configuration.d.ts.map +1 -1
- package/dist/dsh/head-worker-configuration.js +0 -5
- package/dist/dsh/head-worker-configuration.js.map +1 -1
- package/dist/dsh/host-adapter/admission.d.ts +1 -8
- package/dist/dsh/host-adapter/admission.d.ts.map +1 -1
- package/dist/dsh/host-adapter/admission.js +51 -260
- package/dist/dsh/host-adapter/admission.js.map +1 -1
- package/dist/dsh/host-adapter/boundaries.d.ts +1 -28
- package/dist/dsh/host-adapter/boundaries.d.ts.map +1 -1
- package/dist/dsh/host-adapter/boundaries.js +27 -328
- package/dist/dsh/host-adapter/boundaries.js.map +1 -1
- package/dist/dsh/host-adapter/context.d.ts +1 -7
- package/dist/dsh/host-adapter/context.d.ts.map +1 -1
- package/dist/dsh/host-adapter/context.js +5 -28
- package/dist/dsh/host-adapter/context.js.map +1 -1
- package/dist/dsh/host-adapter/efficiency-host.d.ts +0 -2
- package/dist/dsh/host-adapter/efficiency-host.d.ts.map +1 -1
- package/dist/dsh/host-adapter/efficiency-host.js +2 -2
- package/dist/dsh/host-adapter/efficiency-host.js.map +1 -1
- package/dist/dsh/host-adapter/lifecycle.d.ts +0 -7
- package/dist/dsh/host-adapter/lifecycle.d.ts.map +1 -1
- package/dist/dsh/host-adapter/lifecycle.js +58 -71
- package/dist/dsh/host-adapter/lifecycle.js.map +1 -1
- package/dist/dsh/host-adapter/memory-application-host.d.ts +0 -2
- package/dist/dsh/host-adapter/memory-application-host.d.ts.map +1 -1
- package/dist/dsh/host-adapter/memory-application-host.js +2 -2
- package/dist/dsh/host-adapter/memory-application-host.js.map +1 -1
- package/dist/dsh/host-adapter/routing.d.ts +1 -5
- package/dist/dsh/host-adapter/routing.d.ts.map +1 -1
- package/dist/dsh/host-adapter/routing.js +21 -73
- package/dist/dsh/host-adapter/routing.js.map +1 -1
- package/dist/dsh/host-adapter/session-observation.d.ts +1 -8
- package/dist/dsh/host-adapter/session-observation.d.ts.map +1 -1
- package/dist/dsh/host-adapter/session-observation.js +2 -55
- package/dist/dsh/host-adapter/session-observation.js.map +1 -1
- package/dist/dsh/host-adapter/tool-host.d.ts +3 -41
- package/dist/dsh/host-adapter/tool-host.d.ts.map +1 -1
- package/dist/dsh/host-adapter/tool-host.js +14 -243
- package/dist/dsh/host-adapter/tool-host.js.map +1 -1
- package/dist/dsh/host-adapter/turn-state.d.ts +0 -4
- package/dist/dsh/host-adapter/turn-state.d.ts.map +1 -1
- package/dist/dsh/host-adapter/turn-state.js +16 -93
- package/dist/dsh/host-adapter/turn-state.js.map +1 -1
- package/dist/dsh/host-adapter.d.ts +0 -11
- package/dist/dsh/host-adapter.d.ts.map +1 -1
- package/dist/dsh/host-adapter.js +17 -179
- package/dist/dsh/host-adapter.js.map +1 -1
- package/dist/dsh/index.d.ts +3 -16
- package/dist/dsh/index.d.ts.map +1 -1
- package/dist/dsh/index.js +0 -6
- package/dist/dsh/index.js.map +1 -1
- package/dist/dsh/lifecycle-memory.d.ts +3 -0
- package/dist/dsh/lifecycle-memory.d.ts.map +1 -1
- package/dist/dsh/lifecycle-memory.js +67 -45
- package/dist/dsh/lifecycle-memory.js.map +1 -1
- package/dist/dsh/lisp/candidate.d.ts +2 -2
- package/dist/dsh/lisp/code-intelligence-contracts.d.ts +1 -1
- package/dist/dsh/lisp/compiled-cache.d.ts.map +1 -1
- package/dist/dsh/lisp/compiled-cache.js +27 -6
- package/dist/dsh/lisp/compiled-cache.js.map +1 -1
- package/dist/dsh/lisp/host-tool-dispatch.d.ts.map +1 -1
- package/dist/dsh/lisp/host-tool-dispatch.js +14 -5
- package/dist/dsh/lisp/host-tool-dispatch.js.map +1 -1
- package/dist/dsh/lisp/manager.d.ts +7 -4
- package/dist/dsh/lisp/manager.d.ts.map +1 -1
- package/dist/dsh/lisp/manager.js +132 -103
- package/dist/dsh/lisp/manager.js.map +1 -1
- package/dist/dsh/lisp/sandbox.d.ts.map +1 -1
- package/dist/dsh/lisp/sandbox.js +1 -5
- package/dist/dsh/lisp/sandbox.js.map +1 -1
- package/dist/dsh/lisp/supervision.d.ts +33 -0
- package/dist/dsh/lisp/supervision.d.ts.map +1 -0
- package/dist/dsh/lisp/supervision.js +89 -0
- package/dist/dsh/lisp/supervision.js.map +1 -0
- package/dist/dsh/lisp/surface.d.ts +2 -2
- package/dist/dsh/lisp/surface.d.ts.map +1 -1
- package/dist/dsh/lisp/surface.js +105 -11
- package/dist/dsh/lisp/surface.js.map +1 -1
- package/dist/dsh/lisp/worker.d.ts +2 -1
- package/dist/dsh/lisp/worker.d.ts.map +1 -1
- package/dist/dsh/lisp/worker.js +7 -1
- package/dist/dsh/lisp/worker.js.map +1 -1
- package/dist/dsh/loop-guard.d.ts +0 -8
- package/dist/dsh/loop-guard.d.ts.map +1 -1
- package/dist/dsh/loop-guard.js +0 -51
- package/dist/dsh/loop-guard.js.map +1 -1
- package/dist/dsh/memory-application.d.ts.map +1 -1
- package/dist/dsh/memory-application.js +0 -6
- package/dist/dsh/memory-application.js.map +1 -1
- package/dist/dsh/message-sources.d.ts +2 -12
- package/dist/dsh/message-sources.d.ts.map +1 -1
- package/dist/dsh/message-sources.js +20 -39
- package/dist/dsh/message-sources.js.map +1 -1
- package/dist/dsh/model-configuration.d.ts +6 -24
- package/dist/dsh/model-configuration.d.ts.map +1 -1
- package/dist/dsh/model-configuration.js +1 -78
- package/dist/dsh/model-configuration.js.map +1 -1
- package/dist/dsh/model-routing.d.ts +1 -3
- package/dist/dsh/model-routing.d.ts.map +1 -1
- package/dist/dsh/model-routing.js +0 -11
- package/dist/dsh/model-routing.js.map +1 -1
- package/dist/dsh/model-selection-ui.d.ts +1 -2
- package/dist/dsh/model-selection-ui.d.ts.map +1 -1
- package/dist/dsh/model-selection-ui.js +48 -309
- package/dist/dsh/model-selection-ui.js.map +1 -1
- package/dist/dsh/models/contracts.d.ts +2 -2
- package/dist/dsh/models/service.d.ts +1 -1
- package/dist/dsh/modules/legacy-bindings.d.ts +3 -1
- package/dist/dsh/modules/legacy-bindings.d.ts.map +1 -1
- package/dist/dsh/modules/legacy-bindings.js +5 -5
- package/dist/dsh/modules/legacy-bindings.js.map +1 -1
- package/dist/dsh/modules/lisp.js +1 -1
- package/dist/dsh/modules/lisp.js.map +1 -1
- package/dist/dsh/native-execution-ownership.d.ts.map +1 -1
- package/dist/dsh/native-execution-ownership.js +0 -2
- package/dist/dsh/native-execution-ownership.js.map +1 -1
- package/dist/dsh/native-worker-routing.d.ts.map +1 -1
- package/dist/dsh/native-worker-routing.js +7 -2
- package/dist/dsh/native-worker-routing.js.map +1 -1
- package/dist/dsh/on-demand-intake.d.ts.map +1 -1
- package/dist/dsh/on-demand-intake.js +17 -8
- package/dist/dsh/on-demand-intake.js.map +1 -1
- package/dist/dsh/orchestration/execution-owner.d.ts +3 -1
- package/dist/dsh/orchestration/execution-owner.d.ts.map +1 -1
- package/dist/dsh/orchestration/execution-owner.js.map +1 -1
- package/dist/dsh/owned-execution.js +1 -1
- package/dist/dsh/owned-execution.js.map +1 -1
- package/dist/dsh/replay-memory-extract.d.ts.map +1 -1
- package/dist/dsh/replay-memory-extract.js +15 -1
- package/dist/dsh/replay-memory-extract.js.map +1 -1
- package/dist/dsh/repository-learning.d.ts.map +1 -1
- package/dist/dsh/repository-learning.js +3 -0
- package/dist/dsh/repository-learning.js.map +1 -1
- package/dist/dsh/runtime.d.ts +10 -2
- package/dist/dsh/runtime.d.ts.map +1 -1
- package/dist/dsh/runtime.js +22 -43
- package/dist/dsh/runtime.js.map +1 -1
- package/dist/dsh/semantic-compaction/policy.js +1 -1
- package/dist/dsh/semantic-compaction/policy.js.map +1 -1
- package/dist/dsh/session-bridge.d.ts +1 -1
- package/dist/dsh/session-bridge.d.ts.map +1 -1
- package/dist/dsh/session-bridge.js +1 -1
- package/dist/dsh/session-bridge.js.map +1 -1
- package/dist/dsh/session-memory-finalizer.js +1 -1
- package/dist/dsh/session-memory-finalizer.js.map +1 -1
- package/dist/dsh/session-review-context.d.ts.map +1 -1
- package/dist/dsh/session-review-context.js +3 -16
- package/dist/dsh/session-review-context.js.map +1 -1
- package/dist/dsh/setup.d.ts +1 -1
- package/dist/dsh/setup.d.ts.map +1 -1
- package/dist/dsh/skill-compiler.js +1 -1
- package/dist/dsh/skill-compiler.js.map +1 -1
- package/dist/dsh/skill-prompt-contracts.d.ts +2 -2
- package/dist/dsh/skill-prompt-contracts.js +1 -1
- package/dist/dsh/skill-prompts.json +1 -1
- package/dist/dsh/standard-skills.d.ts +1 -8
- package/dist/dsh/standard-skills.d.ts.map +1 -1
- package/dist/dsh/standard-skills.js +1 -8
- package/dist/dsh/standard-skills.js.map +1 -1
- package/dist/dsh/task-authority-context.d.ts +3 -0
- package/dist/dsh/task-authority-context.d.ts.map +1 -1
- package/dist/dsh/task-authority-context.js +3 -0
- package/dist/dsh/task-authority-context.js.map +1 -1
- package/dist/dsh/task-completion-guidance.d.ts +1 -5
- package/dist/dsh/task-completion-guidance.d.ts.map +1 -1
- package/dist/dsh/task-completion-guidance.js +4 -6
- package/dist/dsh/task-completion-guidance.js.map +1 -1
- package/dist/dsh/task-completion-host.js +4 -4
- package/dist/dsh/task-completion-host.js.map +1 -1
- package/dist/dsh/task-completion.d.ts +1 -13
- package/dist/dsh/task-completion.d.ts.map +1 -1
- package/dist/dsh/task-completion.js +9 -104
- package/dist/dsh/task-completion.js.map +1 -1
- package/dist/dsh/task-intake.d.ts +2 -3
- package/dist/dsh/task-intake.d.ts.map +1 -1
- package/dist/dsh/task-intake.js +90 -86
- package/dist/dsh/task-intake.js.map +1 -1
- package/dist/dsh/task-state.d.ts.map +1 -1
- package/dist/dsh/task-state.js +0 -8
- package/dist/dsh/task-state.js.map +1 -1
- package/dist/dsh/tool-exposure.d.ts +1 -1
- package/dist/dsh/tool-exposure.d.ts.map +1 -1
- package/dist/dsh/tool-exposure.js +0 -2
- package/dist/dsh/tool-exposure.js.map +1 -1
- package/dist/dsh/tool-policy.d.ts +5 -8
- package/dist/dsh/tool-policy.d.ts.map +1 -1
- package/dist/dsh/tool-policy.js +3 -35
- package/dist/dsh/tool-policy.js.map +1 -1
- package/dist/dsh/tools.d.ts +2 -6
- package/dist/dsh/tools.d.ts.map +1 -1
- package/dist/dsh/tools.js +7 -63
- package/dist/dsh/tools.js.map +1 -1
- package/dist/dsh/turn-process.d.ts +0 -93
- package/dist/dsh/turn-process.d.ts.map +1 -1
- package/dist/dsh/turn-process.js +1 -307
- package/dist/dsh/turn-process.js.map +1 -1
- package/dist/dsh/user-interaction.d.ts +9 -16
- package/dist/dsh/user-interaction.d.ts.map +1 -1
- package/dist/dsh/user-interaction.js +19 -158
- package/dist/dsh/user-interaction.js.map +1 -1
- package/dist/index.js +2 -19
- package/dist/ledger/types.d.ts +1 -1
- package/dist/ledger/types.d.ts.map +1 -1
- package/dist/ledger/types.js +0 -7
- package/dist/ledger/types.js.map +1 -1
- package/dist/locale/en.json +1 -1
- package/dist/locale/ja.json +1 -1
- package/dist/locale/ko.json +1 -1
- package/dist/locale/zh-CN.json +1 -1
- package/dist/memory/correction-contract.d.ts +4 -4
- package/dist/memory/lifecycle.d.ts +1 -1
- package/dist/memory/review/evidence.js +1 -1
- package/dist/memory/review/evidence.js.map +1 -1
- package/dist/model-tools/contracts.d.ts +0 -437
- package/dist/model-tools/contracts.d.ts.map +1 -1
- package/dist/model-tools/contracts.js +0 -13
- package/dist/model-tools/contracts.js.map +1 -1
- package/dist/model-tools/names.d.ts +1 -1
- package/dist/model-tools/names.d.ts.map +1 -1
- package/dist/model-tools/names.js +0 -7
- package/dist/model-tools/names.js.map +1 -1
- package/dist/model-tools/registry.js +1 -1
- package/dist/model-tools/registry.js.map +1 -1
- package/dist/models-client.cjs +2 -2
- package/dist/models-client.js +2 -2
- package/dist/models-client.js.map +1 -1
- package/docs/README.ja.md +0 -1
- package/docs/README.md +0 -1
- package/docs/agenticreplay-recording.md +1 -1
- package/docs/agenticreplay-verification.md +1 -1
- package/docs/answer-review.md +2 -2
- package/docs/architecture.md +4 -7
- package/docs/auto-memory-review.md +3 -3
- package/docs/coding-workflow.md +1 -1
- package/docs/concepts.ja.md +3 -5
- package/docs/concepts.md +3 -5
- package/docs/core-modules.md +5 -16
- package/docs/database.md +5 -10
- package/docs/decision-diagnostics.md +1 -2
- package/docs/deep-planning.md +3 -3
- package/docs/dsh-plugin.md +42 -178
- package/docs/execution-ledger.md +1 -2
- package/docs/execution-support.md +6 -7
- package/docs/harness-map.md +1 -1
- package/docs/japanese-output.md +1 -1
- package/docs/keyboard-shortcuts.md +1 -1
- package/docs/kiokuko-harness.md +71 -0
- package/docs/kiokuko-models.md +4 -9
- package/docs/lisp-hot-tools.md +12 -7
- package/docs/lisp.md +43 -9
- package/docs/memory-application.md +5 -5
- package/docs/memory-delivery.md +1 -1
- package/docs/memory-reuse.md +1 -1
- package/docs/model-selection.ja.md +40 -123
- package/docs/model-selection.md +45 -114
- package/docs/on-demand-intake.md +2 -2
- package/docs/owned-execution.md +7 -7
- package/docs/pr72-ci-verification.md +2 -2
- package/docs/pstack-adaptation.json +0 -34
- package/docs/pstack-skills.md +1 -1
- package/docs/semantic-compaction.md +2 -2
- package/docs/session-history-repair.md +2 -2
- package/docs/skill-compiler.md +2 -4
- package/docs/tool-exposure.md +1 -1
- package/docs/typed-decisions.md +1 -9
- package/docs/verification.md +11 -7
- package/dsh/cordis.legacy.patch.yml +7 -0
- package/dsh/cordis.patch.yml +6 -1
- package/lisp/supervisor.mjs +16 -7
- package/lisp/tools.lisp +1 -1
- package/migrations/051_drop_enno.sql +19 -0
- package/package.json +5 -14
- package/scripts/session-history-codec.mjs +1 -1
- package/skills/coding-ideal-routine-skill/SKILL.md +1 -1
- package/skills/kiokuko-lisp/SKILL.md +11 -5
- package/skills/kiokuko-single-purpose-functions/SKILL.md +1 -1
- package/skills/kiokuko-ui-design-soul/SKILL.md +2 -2
- package/skills/one-shot-software-completion/SKILL.md +4 -7
- package/skills/one-shot-software-completion/references/boundaries-and-lifecycle.md +3 -5
- package/dist/dsh/advisory-runner.d.ts +0 -32
- package/dist/dsh/advisory-runner.d.ts.map +0 -1
- package/dist/dsh/advisory-runner.js +0 -116
- package/dist/dsh/advisory-runner.js.map +0 -1
- package/dist/dsh/completion-verifiers.d.ts +0 -45
- package/dist/dsh/completion-verifiers.d.ts.map +0 -1
- package/dist/dsh/completion-verifiers.js +0 -9
- package/dist/dsh/completion-verifiers.js.map +0 -1
- package/dist/dsh/continuation.d.ts +0 -24
- package/dist/dsh/continuation.d.ts.map +0 -1
- package/dist/dsh/continuation.js +0 -215
- package/dist/dsh/continuation.js.map +0 -1
- package/dist/dsh/decisions/check-model.d.ts +0 -6
- package/dist/dsh/decisions/check-model.d.ts.map +0 -1
- package/dist/dsh/decisions/check-model.js +0 -36
- package/dist/dsh/decisions/check-model.js.map +0 -1
- package/dist/dsh/decisions/plan-review.d.ts +0 -17
- package/dist/dsh/decisions/plan-review.d.ts.map +0 -1
- package/dist/dsh/decisions/plan-review.js +0 -68
- package/dist/dsh/decisions/plan-review.js.map +0 -1
- package/dist/dsh/directive-projection.d.ts +0 -7
- package/dist/dsh/directive-projection.d.ts.map +0 -1
- package/dist/dsh/directive-projection.js +0 -32
- package/dist/dsh/directive-projection.js.map +0 -1
- package/dist/dsh/enno-controller.d.ts +0 -132
- package/dist/dsh/enno-controller.d.ts.map +0 -1
- package/dist/dsh/enno-controller.js +0 -368
- package/dist/dsh/enno-controller.js.map +0 -1
- package/dist/dsh/enno-delegation.d.ts +0 -36
- package/dist/dsh/enno-delegation.d.ts.map +0 -1
- package/dist/dsh/enno-delegation.js +0 -203
- package/dist/dsh/enno-delegation.js.map +0 -1
- package/dist/dsh/enno-memory-refresh-store.d.ts +0 -26
- package/dist/dsh/enno-memory-refresh-store.d.ts.map +0 -1
- package/dist/dsh/enno-memory-refresh-store.js +0 -45
- package/dist/dsh/enno-memory-refresh-store.js.map +0 -1
- package/dist/dsh/enno-memory-refresh.d.ts +0 -57
- package/dist/dsh/enno-memory-refresh.d.ts.map +0 -1
- package/dist/dsh/enno-memory-refresh.js +0 -280
- package/dist/dsh/enno-memory-refresh.js.map +0 -1
- package/dist/dsh/host-adapter/enno-memory-host.d.ts +0 -29
- package/dist/dsh/host-adapter/enno-memory-host.d.ts.map +0 -1
- package/dist/dsh/host-adapter/enno-memory-host.js +0 -49
- package/dist/dsh/host-adapter/enno-memory-host.js.map +0 -1
- package/dist/dsh/modules/enno.d.ts +0 -70
- package/dist/dsh/modules/enno.d.ts.map +0 -1
- package/dist/dsh/modules/enno.js +0 -22
- package/dist/dsh/modules/enno.js.map +0 -1
- package/dist/dsh/verification-identity.d.ts +0 -3
- package/dist/dsh/verification-identity.d.ts.map +0 -1
- package/dist/dsh/verification-identity.js +0 -15
- package/dist/dsh/verification-identity.js.map +0 -1
- package/dist/enno-oduno/advisory-store.d.ts +0 -31
- package/dist/enno-oduno/advisory-store.d.ts.map +0 -1
- package/dist/enno-oduno/advisory-store.js +0 -105
- package/dist/enno-oduno/advisory-store.js.map +0 -1
- package/dist/enno-oduno/advisory.d.ts +0 -18
- package/dist/enno-oduno/advisory.d.ts.map +0 -1
- package/dist/enno-oduno/advisory.js +0 -311
- package/dist/enno-oduno/advisory.js.map +0 -1
- package/dist/enno-oduno/coding-workflow.d.ts +0 -39
- package/dist/enno-oduno/coding-workflow.d.ts.map +0 -1
- package/dist/enno-oduno/coding-workflow.js +0 -33
- package/dist/enno-oduno/coding-workflow.js.map +0 -1
- package/dist/enno-oduno/confirmation.d.ts +0 -4
- package/dist/enno-oduno/confirmation.d.ts.map +0 -1
- package/dist/enno-oduno/confirmation.js +0 -146
- package/dist/enno-oduno/confirmation.js.map +0 -1
- package/dist/enno-oduno/directives.d.ts +0 -10
- package/dist/enno-oduno/directives.d.ts.map +0 -1
- package/dist/enno-oduno/directives.js +0 -294
- package/dist/enno-oduno/directives.js.map +0 -1
- package/dist/enno-oduno/experts.d.ts +0 -3
- package/dist/enno-oduno/experts.d.ts.map +0 -1
- package/dist/enno-oduno/experts.js +0 -28
- package/dist/enno-oduno/experts.js.map +0 -1
- package/dist/enno-oduno/handoff.d.ts +0 -4
- package/dist/enno-oduno/handoff.d.ts.map +0 -1
- package/dist/enno-oduno/handoff.js +0 -18
- package/dist/enno-oduno/handoff.js.map +0 -1
- package/dist/enno-oduno/language.d.ts +0 -4
- package/dist/enno-oduno/language.d.ts.map +0 -1
- package/dist/enno-oduno/language.js +0 -6
- package/dist/enno-oduno/language.js.map +0 -1
- package/dist/enno-oduno/memory-focus.d.ts +0 -32
- package/dist/enno-oduno/memory-focus.d.ts.map +0 -1
- package/dist/enno-oduno/memory-focus.js +0 -87
- package/dist/enno-oduno/memory-focus.js.map +0 -1
- package/dist/enno-oduno/memory-refresh-policy.d.ts +0 -17
- package/dist/enno-oduno/memory-refresh-policy.d.ts.map +0 -1
- package/dist/enno-oduno/memory-refresh-policy.js +0 -11
- package/dist/enno-oduno/memory-refresh-policy.js.map +0 -1
- package/dist/enno-oduno/memory-verification.d.ts +0 -7
- package/dist/enno-oduno/memory-verification.d.ts.map +0 -1
- package/dist/enno-oduno/memory-verification.js +0 -59
- package/dist/enno-oduno/memory-verification.js.map +0 -1
- package/dist/enno-oduno/plan-draft.d.ts +0 -15
- package/dist/enno-oduno/plan-draft.d.ts.map +0 -1
- package/dist/enno-oduno/plan-draft.js +0 -20
- package/dist/enno-oduno/plan-draft.js.map +0 -1
- package/dist/enno-oduno/plan-recovery.d.ts +0 -44
- package/dist/enno-oduno/plan-recovery.d.ts.map +0 -1
- package/dist/enno-oduno/plan-recovery.js +0 -160
- package/dist/enno-oduno/plan-recovery.js.map +0 -1
- package/dist/enno-oduno/repository-state.d.ts +0 -10
- package/dist/enno-oduno/repository-state.d.ts.map +0 -1
- package/dist/enno-oduno/repository-state.js +0 -146
- package/dist/enno-oduno/repository-state.js.map +0 -1
- package/dist/enno-oduno/sanitize.d.ts +0 -17
- package/dist/enno-oduno/sanitize.d.ts.map +0 -1
- package/dist/enno-oduno/sanitize.js +0 -88
- package/dist/enno-oduno/sanitize.js.map +0 -1
- package/dist/enno-oduno/schemas.d.ts +0 -968
- package/dist/enno-oduno/schemas.d.ts.map +0 -1
- package/dist/enno-oduno/schemas.js +0 -622
- package/dist/enno-oduno/schemas.js.map +0 -1
- package/dist/enno-oduno/service.d.ts +0 -62
- package/dist/enno-oduno/service.d.ts.map +0 -1
- package/dist/enno-oduno/service.js +0 -1505
- package/dist/enno-oduno/service.js.map +0 -1
- package/dist/enno-oduno/skills.d.ts +0 -22
- package/dist/enno-oduno/skills.d.ts.map +0 -1
- package/dist/enno-oduno/skills.js +0 -127
- package/dist/enno-oduno/skills.js.map +0 -1
- package/dist/enno-oduno/store.d.ts +0 -109
- package/dist/enno-oduno/store.d.ts.map +0 -1
- package/dist/enno-oduno/store.js +0 -833
- package/dist/enno-oduno/store.js.map +0 -1
- package/dist/enno-oduno/types.d.ts +0 -457
- package/dist/enno-oduno/types.d.ts.map +0 -1
- package/dist/enno-oduno/types.js +0 -66
- package/dist/enno-oduno/types.js.map +0 -1
- package/dist/enno-oduno/validation-errors.d.ts +0 -93
- package/dist/enno-oduno/validation-errors.d.ts.map +0 -1
- package/dist/enno-oduno/validation-errors.js +0 -159
- package/dist/enno-oduno/validation-errors.js.map +0 -1
- package/dist/enno-oduno/verifier.d.ts +0 -16
- package/dist/enno-oduno/verifier.d.ts.map +0 -1
- package/dist/enno-oduno/verifier.js +0 -271
- package/dist/enno-oduno/verifier.js.map +0 -1
- package/docs/enno-memory-benchmark.json +0 -761
- package/docs/enno-memory-evaluation.md +0 -137
- package/docs/enno-oduno.ja.md +0 -68
- package/docs/enno-oduno.md +0 -94
- package/skills/kiokuko-enno-oduno/SKILL.md +0 -64
- package/skills/kiokuko-enno-oduno/enno-oduno.png +0 -0
package/dist/dsh/host-adapter.js
CHANGED
|
@@ -37,7 +37,6 @@ import { readCodingWorkflow } from "./coding-workflow/store.js";
|
|
|
37
37
|
import { stableLispCapabilities } from "./lisp-service-key.js";
|
|
38
38
|
import { createEfficiencyHost } from "./host-adapter/efficiency-host.js";
|
|
39
39
|
import { createMemoryReviewHost } from "./host-adapter/memory-review-host.js";
|
|
40
|
-
import { createEnnoMemoryHost } from "./host-adapter/enno-memory-host.js";
|
|
41
40
|
import { createSessionAccess } from "./host-adapter/session-access.js";
|
|
42
41
|
import { createEvolutionHost } from "./host-adapter/evolution-host.js";
|
|
43
42
|
import { onNativeEvent, onNativeServiceEvent, } from "./host-adapter/native-events.js";
|
|
@@ -60,8 +59,6 @@ import { AnswerReviewConfig } from "./answer-review/contracts.js";
|
|
|
60
59
|
import { AutoMemoryReviewCoordinator, } from "./auto-memory-review.js";
|
|
61
60
|
import { MemoryReviewConfig } from "../memory/review/contracts.js";
|
|
62
61
|
import { MemoryRetrievalConfig } from "../memory/retrieval-contracts.js";
|
|
63
|
-
import { DshEnnoMemoryRefresh } from "./enno-memory-refresh.js";
|
|
64
|
-
import { EnnoMemoryConfig } from "./config.js";
|
|
65
62
|
import { CompletionConfig } from "./task-completion.js";
|
|
66
63
|
import { saveSessionNotice } from "./plugin-records.js";
|
|
67
64
|
import { MemoryEvolutionConfig, } from "../memory/evolution/contracts.js";
|
|
@@ -70,7 +67,6 @@ import { readExecutionSelection, writeExecutionSelection, } from "./execution-se
|
|
|
70
67
|
import { LISP_CODING_SERVICE, } from "./lisp/coding-choice.js";
|
|
71
68
|
import { DshSkillPrompts } from "./skill-prompts.js";
|
|
72
69
|
import { nativeModelCatalog } from "./native-model-catalog.js";
|
|
73
|
-
import { DshEnnoDelegation } from "./enno-delegation.js";
|
|
74
70
|
import { createDshAgenticReplayHost } from "./agenticreplay-host.js";
|
|
75
71
|
import { fileURLToPath } from "node:url";
|
|
76
72
|
import { realpathSync } from "node:fs";
|
|
@@ -82,13 +78,10 @@ import { DiffReviewConfig } from "./config.js";
|
|
|
82
78
|
import { DiffReviewController } from "../diff-review/controller.js";
|
|
83
79
|
import { DshMemoryFinalizer, } from "./session-memory-finalizer.js";
|
|
84
80
|
import { DshPonytailModes } from "./commands.js";
|
|
85
|
-
import { createDshConfirmationAnswerer, } from "./user-interaction.js";
|
|
86
81
|
import { createDshCapabilityCatalog, } from "./capability-catalog.js";
|
|
87
82
|
import { STANDARD_SKILL_MANIFESTS } from "./standard-skills.js";
|
|
88
83
|
import { canonicalContentHash, compareCanonicalStrings, } from "../serialization/validate.js";
|
|
89
84
|
import { KiokukoError } from "../errors.js";
|
|
90
|
-
import { stateForSnapshot } from "../enno-oduno/service.js";
|
|
91
|
-
import { readEnnoSnapshot } from "../enno-oduno/store.js";
|
|
92
85
|
import { DeepPlanningController } from "../deep-thinker/controller.js";
|
|
93
86
|
import { DshSessionLogMirror, } from "./session-log-mirror.js";
|
|
94
87
|
import { DshExecutionSupport } from "./execution-support.js";
|
|
@@ -216,17 +209,6 @@ export function eventContinuationId(data) {
|
|
|
216
209
|
const record = objectRecord(data);
|
|
217
210
|
return pluginContinuationId(record?.message);
|
|
218
211
|
}
|
|
219
|
-
export function continuationMessage(continuationId, nextAction) {
|
|
220
|
-
const work = nextAction === "execute_work_unit"
|
|
221
|
-
? "The current WorkUnit is not accepted unless the latest Enno result says so. Correct or report only that WorkUnit."
|
|
222
|
-
: `Continue only the current Kiokuko phase for nextAction=${nextAction}. Do not skip ahead.`;
|
|
223
|
-
return Object.freeze({
|
|
224
|
-
id: continuationId,
|
|
225
|
-
role: "user",
|
|
226
|
-
content: [{ type: "text", text: work }],
|
|
227
|
-
source: { kind: KIOKUKO_DSH_SOURCE_KIND, form: "instructions" },
|
|
228
|
-
});
|
|
229
|
-
}
|
|
230
212
|
async function capabilityCatalog(skills, tools, context) {
|
|
231
213
|
if (skills?.snapshot === undefined || tools?.schemas === undefined) {
|
|
232
214
|
throw new Error("kiokuko-dsh requires native Skill and tool snapshots");
|
|
@@ -326,8 +308,6 @@ export function createDshHostAdapter(ctx, options = {}) {
|
|
|
326
308
|
const llm = options.llm ?? native.get("llm", false);
|
|
327
309
|
const reviewConfig = DiffReviewConfig.parse(options.diffReview ?? {});
|
|
328
310
|
const completionMode = CompletionConfig.parse(options.completion ?? {}).mode;
|
|
329
|
-
const advisory = options.advisory ??
|
|
330
|
-
native.get("dshAdvisory", false);
|
|
331
311
|
const modelCatalog = nativeModelCatalog(native.get("llm", false), native.get("settings", false));
|
|
332
312
|
const modelCompatibility = options.modelCompatibility ??
|
|
333
313
|
native.get("dshModelCompatibility", false);
|
|
@@ -378,7 +358,6 @@ export function createDshHostAdapter(ctx, options = {}) {
|
|
|
378
358
|
new SemanticCompactionCoordinator(ctx, decisions, root, options.observationPack);
|
|
379
359
|
const modelHandoff = new ModelHandoff(ctx, decisions, root, options.modelHandoff);
|
|
380
360
|
const lifecycleMemory = new DshLifecycleMemory(ctx, runtime, root);
|
|
381
|
-
const delegation = new DshEnnoDelegation(runtime, native.get("subagents", false));
|
|
382
361
|
const deepPlanning = new DeepPlanningController({
|
|
383
362
|
runtime,
|
|
384
363
|
decisions,
|
|
@@ -402,24 +381,7 @@ export function createDshHostAdapter(ctx, options = {}) {
|
|
|
402
381
|
return [...catalog.skills, ...catalog.tools];
|
|
403
382
|
},
|
|
404
383
|
});
|
|
405
|
-
const isGenericNativeChild = (agent) => isNativeSubagent(agent) &&
|
|
406
|
-
!delegation.isChild(agent) &&
|
|
407
|
-
!deepPlanning.executor.isChild(agent);
|
|
408
|
-
const childGuardDisposer = tools?.guard((value) => {
|
|
409
|
-
const execution = value;
|
|
410
|
-
return execution.agent
|
|
411
|
-
? delegation.toolDenial(execution.agent, execution.name ?? "", execution.arguments)
|
|
412
|
-
: undefined;
|
|
413
|
-
});
|
|
414
|
-
const childExecutionDisposer = onNativeEvent(ctx, "tools/execute", async (execution, next) => {
|
|
415
|
-
if (execution.agent && delegation.isChild(execution.agent)) {
|
|
416
|
-
await delegation.assertCurrent(execution.agent);
|
|
417
|
-
const denial = delegation.toolDenial(execution.agent, execution.name, execution.arguments);
|
|
418
|
-
if (denial)
|
|
419
|
-
throw new KiokukoError("CONFLICT", denial);
|
|
420
|
-
}
|
|
421
|
-
return next();
|
|
422
|
-
}, { prepend: true });
|
|
384
|
+
const isGenericNativeChild = (agent) => isNativeSubagent(agent) && !deepPlanning.executor.isChild(agent);
|
|
423
385
|
const sessionCachePath = options.sessionCachePath ??
|
|
424
386
|
(options.databasePath === undefined
|
|
425
387
|
? undefined
|
|
@@ -442,12 +404,11 @@ export function createDshHostAdapter(ctx, options = {}) {
|
|
|
442
404
|
sessionMirror,
|
|
443
405
|
});
|
|
444
406
|
const policy = new DshToolPolicy({
|
|
445
|
-
phase: "
|
|
407
|
+
phase: "normal",
|
|
446
408
|
runId: "pending",
|
|
447
409
|
workspace: "pending",
|
|
448
410
|
orchestrationId: "pending",
|
|
449
411
|
revision: 1,
|
|
450
|
-
routeEpoch: 0,
|
|
451
412
|
});
|
|
452
413
|
const modes = new DshPonytailModes();
|
|
453
414
|
const turnState = createTurnState(modes, policy, (runId) => selections.get(runId));
|
|
@@ -464,21 +425,6 @@ export function createDshHostAdapter(ctx, options = {}) {
|
|
|
464
425
|
? {}
|
|
465
426
|
: { tools: { guard: tools.guard.bind(tools) } }),
|
|
466
427
|
});
|
|
467
|
-
const ennoMemory = new DshEnnoMemoryRefresh(runtime, EnnoMemoryConfig.parse(options.ennoMemory ?? {}), (value) => efficiencyHost.efficiency?.recordEnnoMemory(value));
|
|
468
|
-
const { refreshEnnoMemory } = createEnnoMemoryHost({
|
|
469
|
-
ennoMemory,
|
|
470
|
-
runtime,
|
|
471
|
-
executionSupport,
|
|
472
|
-
delegation,
|
|
473
|
-
getSelection: (runId) => selections.get(runId),
|
|
474
|
-
turnState,
|
|
475
|
-
currentSession,
|
|
476
|
-
capabilityCatalog,
|
|
477
|
-
skills,
|
|
478
|
-
tools,
|
|
479
|
-
assertTurnStoppingCatalog: (expected, actual) => gate.assertTurnStoppingCatalog(expected, actual),
|
|
480
|
-
isHumanMessage,
|
|
481
|
-
});
|
|
482
428
|
const executionBinding = turnState.executionBinding;
|
|
483
429
|
const memoryFinalizer = new DshMemoryFinalizer({
|
|
484
430
|
onDeepFinalized: (sessionId) => deepPlanning.deliver(sessionId),
|
|
@@ -535,9 +481,6 @@ export function createDshHostAdapter(ctx, options = {}) {
|
|
|
535
481
|
startSeq: 0,
|
|
536
482
|
});
|
|
537
483
|
deepPlanning.attachFinalizer(() => memoryFinalizer.kick());
|
|
538
|
-
const confirmationAnswerer = userQuestions === undefined
|
|
539
|
-
? undefined
|
|
540
|
-
: createDshConfirmationAnswerer(userQuestions);
|
|
541
484
|
const observation = createSessionObservation(runtime);
|
|
542
485
|
const captureInitialInput = observation.captureInitialInput;
|
|
543
486
|
let retireSupersededRun;
|
|
@@ -556,9 +499,7 @@ export function createDshHostAdapter(ctx, options = {}) {
|
|
|
556
499
|
runtime,
|
|
557
500
|
decisions,
|
|
558
501
|
answerReview,
|
|
559
|
-
delegation,
|
|
560
502
|
executionSupport,
|
|
561
|
-
ennoMemory,
|
|
562
503
|
memoryFinalizer,
|
|
563
504
|
autoReview,
|
|
564
505
|
sessionMirror,
|
|
@@ -570,7 +511,6 @@ export function createDshHostAdapter(ctx, options = {}) {
|
|
|
570
511
|
setSelection: (runId, value) => {
|
|
571
512
|
selections.set(runId, value);
|
|
572
513
|
},
|
|
573
|
-
refreshEnnoMemory,
|
|
574
514
|
executionBinding,
|
|
575
515
|
captureInitialInput,
|
|
576
516
|
contextMessages: (event, pending) => contextMessages(event, pending),
|
|
@@ -583,7 +523,6 @@ export function createDshHostAdapter(ctx, options = {}) {
|
|
|
583
523
|
cancelBoundarySession: (sessionId) => boundaryWorker.cancelSession(sessionId),
|
|
584
524
|
isSelectionBlocked: (agent) => routing.isSelectionBlocked(agent),
|
|
585
525
|
closeTurn: (input) => runLifecycle.closeTurn(input),
|
|
586
|
-
readStateForRun: (item) => runtime.withDatabase((db) => stateForRun(db, item)),
|
|
587
526
|
capabilityCatalog,
|
|
588
527
|
sessionEventSource,
|
|
589
528
|
objectRecord,
|
|
@@ -702,42 +641,6 @@ export function createDshHostAdapter(ctx, options = {}) {
|
|
|
702
641
|
advance: async (input) => {
|
|
703
642
|
policy.beginTurn(input.agent.session.id, input.turn);
|
|
704
643
|
},
|
|
705
|
-
resumeConfirmation: async (input) => runtime.withDatabase(async (db) => {
|
|
706
|
-
const sessionId = input.agent.session.id;
|
|
707
|
-
if (detachedDemandSessions.has(sessionId))
|
|
708
|
-
return false;
|
|
709
|
-
const current = currentSession(sessionId);
|
|
710
|
-
if (current !== undefined) {
|
|
711
|
-
if (current.nativeAgent !== input.agent ||
|
|
712
|
-
current.nativeSession !== input.agent.session ||
|
|
713
|
-
current.turn > input.turn) {
|
|
714
|
-
if (process.env.KIOKUKO_INTENT_DEBUG === "1")
|
|
715
|
-
console.error("confirmation resume current mismatch", {
|
|
716
|
-
turn: input.turn,
|
|
717
|
-
currentTurn: current.turn,
|
|
718
|
-
agent: current.nativeAgent === input.agent,
|
|
719
|
-
session: current.nativeSession === input.agent.session,
|
|
720
|
-
});
|
|
721
|
-
return false;
|
|
722
|
-
}
|
|
723
|
-
}
|
|
724
|
-
const project = await resolveProjectWorkspaceReadOnly(db, answerCwd(input.agent), { allowDirectory: true });
|
|
725
|
-
if (!project)
|
|
726
|
-
return false;
|
|
727
|
-
const candidates = db
|
|
728
|
-
.prepare(`SELECT lr.run_id AS runId
|
|
729
|
-
FROM ledger_runs AS lr
|
|
730
|
-
JOIN enno_contracts AS ec ON ec.run_id = lr.run_id
|
|
731
|
-
WHERE lr.workspace = ? AND lr.dsh_session_id = ? AND lr.status = 'active'
|
|
732
|
-
AND ec.repository_root = ? AND ec.status = 'needs_confirmation'
|
|
733
|
-
ORDER BY lr.created_at, lr.run_id LIMIT 2`)
|
|
734
|
-
.all(project.workspace, sessionId, project.repositoryRoot);
|
|
735
|
-
if (process.env.KIOKUKO_INTENT_DEBUG === "1")
|
|
736
|
-
console.error("confirmation resume candidates", candidates.length);
|
|
737
|
-
return (candidates.length === 1 &&
|
|
738
|
-
(current === undefined ||
|
|
739
|
-
current.runId === candidates[0].runId));
|
|
740
|
-
}),
|
|
741
644
|
replay: async (input) => runtime.withDatabase((db) => {
|
|
742
645
|
const sessionId = input.agent.session.id;
|
|
743
646
|
if (detachedDemandSessions.has(sessionId))
|
|
@@ -799,7 +702,6 @@ export function createDshHostAdapter(ctx, options = {}) {
|
|
|
799
702
|
if (current &&
|
|
800
703
|
current.turn < input.turn &&
|
|
801
704
|
input.messages.some(isHumanMessage) &&
|
|
802
|
-
!current.prepared.ennoOduno.applicable &&
|
|
803
705
|
!resumeCoding)
|
|
804
706
|
return false;
|
|
805
707
|
if (current)
|
|
@@ -814,12 +716,10 @@ export function createDshHostAdapter(ctx, options = {}) {
|
|
|
814
716
|
// Recovery still goes through admission's exact workspace/session checks.
|
|
815
717
|
return Boolean(db
|
|
816
718
|
.prepare(`SELECT 1 FROM ledger_runs lr
|
|
817
|
-
LEFT JOIN enno_contracts ec ON ec.run_id=lr.run_id
|
|
818
719
|
LEFT JOIN dsh_coding_workflows cw ON cw.run_id=lr.run_id
|
|
819
720
|
WHERE lr.workspace=? AND lr.dsh_session_id=? AND lr.status='active'
|
|
820
|
-
AND (
|
|
821
|
-
|
|
822
|
-
.get(project.workspace, input.agent.session.id, project.repositoryRoot, requestIntent?.relation === "new" ? 0 : 1));
|
|
721
|
+
AND (?=1 AND json_extract(cw.snapshot_json,'$.state') NOT IN ('completed','cancelled','superseded')) LIMIT 1`)
|
|
722
|
+
.get(project.workspace, input.agent.session.id, requestIntent?.relation === "new" ? 0 : 1));
|
|
823
723
|
}),
|
|
824
724
|
classify: (input, task) => classifyTaskForIntake(decisions, dshTurnRequestId({
|
|
825
725
|
dshSessionId: input.agent.session.id,
|
|
@@ -980,9 +880,8 @@ export function createDshHostAdapter(ctx, options = {}) {
|
|
|
980
880
|
pair: stored.value.headWorker,
|
|
981
881
|
};
|
|
982
882
|
}
|
|
983
|
-
// An existing approved
|
|
984
|
-
if (stored?.value.mode === "
|
|
985
|
-
stored?.value.mode === "deep-thinker")
|
|
883
|
+
// An existing approved Deep configuration owns its own roles.
|
|
884
|
+
if (stored?.value.mode === "deep-thinker")
|
|
986
885
|
return undefined;
|
|
987
886
|
}
|
|
988
887
|
if (!pairLlm)
|
|
@@ -1137,7 +1036,6 @@ export function createDshHostAdapter(ctx, options = {}) {
|
|
|
1137
1036
|
modelAuto,
|
|
1138
1037
|
answerReview,
|
|
1139
1038
|
semanticCompaction,
|
|
1140
|
-
delegation,
|
|
1141
1039
|
deepPlanning,
|
|
1142
1040
|
isGenericNativeChild,
|
|
1143
1041
|
demand,
|
|
@@ -1157,7 +1055,6 @@ export function createDshHostAdapter(ctx, options = {}) {
|
|
|
1157
1055
|
prepareTurn: (event) => gate.prepare(event),
|
|
1158
1056
|
mapPreStep,
|
|
1159
1057
|
currentSession,
|
|
1160
|
-
readStateForRun: (item) => runtime.withDatabase((db) => stateForRun(db, item)),
|
|
1161
1058
|
refreshMemoryOwner: admission.refreshMemoryOwner,
|
|
1162
1059
|
});
|
|
1163
1060
|
const contextMessages = createContextMessages({
|
|
@@ -1172,7 +1069,6 @@ export function createDshHostAdapter(ctx, options = {}) {
|
|
|
1172
1069
|
systemSkillsFor: routing.systemSkillsFor,
|
|
1173
1070
|
getSelection: (runId) => selections.get(runId),
|
|
1174
1071
|
currentForAgentEvent,
|
|
1175
|
-
advisoryEvidenceFor: (item, state) => toolHostModule.advisoryEvidenceFor(item, state),
|
|
1176
1072
|
executionBinding,
|
|
1177
1073
|
sessionEventSource,
|
|
1178
1074
|
});
|
|
@@ -1183,22 +1079,13 @@ export function createDshHostAdapter(ctx, options = {}) {
|
|
|
1183
1079
|
currentForAgentEvent,
|
|
1184
1080
|
skills,
|
|
1185
1081
|
tools,
|
|
1186
|
-
sessions,
|
|
1187
|
-
agents,
|
|
1188
1082
|
gate,
|
|
1189
1083
|
decisions,
|
|
1190
|
-
delegation,
|
|
1191
|
-
llm,
|
|
1192
|
-
modelCatalog,
|
|
1193
1084
|
executionSupport,
|
|
1194
1085
|
executionBinding,
|
|
1195
|
-
policy,
|
|
1196
|
-
advisory,
|
|
1197
1086
|
capabilityCatalog,
|
|
1198
|
-
objectRecord,
|
|
1199
1087
|
});
|
|
1200
|
-
const { toolHost,
|
|
1201
|
-
const advisoryEvidenceFor = toolHostModule.advisoryEvidenceFor;
|
|
1088
|
+
const { toolHost, assertTurnBoundary } = toolHostModule;
|
|
1202
1089
|
const boundaries = createBoundaries({
|
|
1203
1090
|
isGenericNativeChild,
|
|
1204
1091
|
ctx,
|
|
@@ -1210,31 +1097,18 @@ export function createDshHostAdapter(ctx, options = {}) {
|
|
|
1210
1097
|
tools,
|
|
1211
1098
|
userQuestions,
|
|
1212
1099
|
gate,
|
|
1213
|
-
delegation,
|
|
1214
1100
|
executionSupport,
|
|
1215
1101
|
answerReview,
|
|
1216
1102
|
sessionMirror,
|
|
1217
1103
|
currentSession,
|
|
1218
|
-
currentForAgentEvent,
|
|
1219
|
-
stateForRun,
|
|
1220
|
-
systemSkillsFor: routing.systemSkillsFor,
|
|
1221
|
-
getSkillPrompts: () => skillPrompts,
|
|
1222
|
-
refreshEnnoMemory,
|
|
1223
|
-
confirmationAnswerer,
|
|
1224
|
-
assertTurnBoundary,
|
|
1225
|
-
advisoryRunner,
|
|
1226
|
-
submitAdvisory,
|
|
1227
|
-
advisoryEvidenceFor,
|
|
1228
|
-
applyPolicy: turnState.applyPolicy,
|
|
1229
1104
|
capabilityCatalog,
|
|
1230
1105
|
closeTurn: (input) => runLifecycle.closeTurn(input),
|
|
1231
1106
|
sessionEventSource,
|
|
1232
1107
|
boundedUtf8Text,
|
|
1233
1108
|
boundedMessageText,
|
|
1234
1109
|
recoveryMessage,
|
|
1235
|
-
continuationMessage,
|
|
1236
1110
|
});
|
|
1237
|
-
const { boundaryWorker,
|
|
1111
|
+
const { boundaryWorker, deliverCompletionReport, boundarySessionStartDisposer, } = boundaries;
|
|
1238
1112
|
const applicationDisposer = mountHostMemoryApplication({
|
|
1239
1113
|
questions: userQuestions,
|
|
1240
1114
|
ctx,
|
|
@@ -1244,7 +1118,6 @@ export function createDshHostAdapter(ctx, options = {}) {
|
|
|
1244
1118
|
skills,
|
|
1245
1119
|
agents,
|
|
1246
1120
|
sessions,
|
|
1247
|
-
delegation,
|
|
1248
1121
|
currentSession,
|
|
1249
1122
|
turnState,
|
|
1250
1123
|
gate,
|
|
@@ -1270,13 +1143,11 @@ export function createDshHostAdapter(ctx, options = {}) {
|
|
|
1270
1143
|
agents?.get(agent.id) !== agent ||
|
|
1271
1144
|
sessions?.get(session.id) !== session)
|
|
1272
1145
|
return undefined;
|
|
1273
|
-
const
|
|
1274
|
-
const item = currentSession(child?.parentSessionId ?? session.id);
|
|
1146
|
+
const item = currentSession(session.id);
|
|
1275
1147
|
if (!item ||
|
|
1276
1148
|
item.closed ||
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
(item.nativeAgent !== agent || item.nativeSession !== session)))
|
|
1149
|
+
item.nativeAgent !== agent ||
|
|
1150
|
+
item.nativeSession !== session)
|
|
1280
1151
|
return undefined;
|
|
1281
1152
|
return {
|
|
1282
1153
|
runId: item.runId,
|
|
@@ -1308,7 +1179,6 @@ export function createDshHostAdapter(ctx, options = {}) {
|
|
|
1308
1179
|
item.closed ||
|
|
1309
1180
|
item.nativeAgent !== agent ||
|
|
1310
1181
|
item.nativeSession !== session ||
|
|
1311
|
-
delegation.isChild(agent) ||
|
|
1312
1182
|
isGenericNativeChild(agent))
|
|
1313
1183
|
return undefined;
|
|
1314
1184
|
return {
|
|
@@ -1331,15 +1201,11 @@ export function createDshHostAdapter(ctx, options = {}) {
|
|
|
1331
1201
|
sessions?.get(session.id) !== session ||
|
|
1332
1202
|
isGenericNativeChild(agent))
|
|
1333
1203
|
return undefined;
|
|
1334
|
-
const
|
|
1335
|
-
const item = currentSession(child?.parentSessionId ?? session.id);
|
|
1204
|
+
const item = currentSession(session.id);
|
|
1336
1205
|
if (!item ||
|
|
1337
1206
|
item.closed ||
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
return undefined;
|
|
1341
|
-
if (child &&
|
|
1342
|
-
delegation.toolDenial(agent, execution.name, execution.arguments))
|
|
1207
|
+
item.nativeAgent !== agent ||
|
|
1208
|
+
item.nativeSession !== session)
|
|
1343
1209
|
return undefined;
|
|
1344
1210
|
return {
|
|
1345
1211
|
runId: item.runId,
|
|
@@ -1395,8 +1261,6 @@ export function createDshHostAdapter(ctx, options = {}) {
|
|
|
1395
1261
|
return cwd === root
|
|
1396
1262
|
? nativeTaskAuthority.read(execution)
|
|
1397
1263
|
: undefined;
|
|
1398
|
-
if (delegation.isChild(agent))
|
|
1399
|
-
return cwd === root ? resolveParentOwned(execution) : undefined;
|
|
1400
1264
|
const current = resolveParentOwned(execution);
|
|
1401
1265
|
if (execution.name === "kioku_read" && current) {
|
|
1402
1266
|
const item = currentSession(session.id);
|
|
@@ -1458,13 +1322,11 @@ export function createDshHostAdapter(ctx, options = {}) {
|
|
|
1458
1322
|
}, ctx.get("planMode", false));
|
|
1459
1323
|
const observationMount = observation.install({
|
|
1460
1324
|
ctx,
|
|
1461
|
-
ennoMemory,
|
|
1462
1325
|
evolutionConfig,
|
|
1463
1326
|
memoryFinalizer,
|
|
1464
1327
|
currentSession,
|
|
1465
1328
|
currentForAgentEvent,
|
|
1466
1329
|
answerReview,
|
|
1467
|
-
markModelUnavailable: (agent) => routing.markModelUnavailable(agent),
|
|
1468
1330
|
recordManualChange: (sessionId, pending) => routing.recordManualChange(sessionId, pending),
|
|
1469
1331
|
modelAuto,
|
|
1470
1332
|
root,
|
|
@@ -1481,7 +1343,6 @@ export function createDshHostAdapter(ctx, options = {}) {
|
|
|
1481
1343
|
if (!nativeAgent || !isGenericNativeChild(nativeAgent))
|
|
1482
1344
|
boundaryWorker.kick(sessionId, agent);
|
|
1483
1345
|
},
|
|
1484
|
-
stateForRun,
|
|
1485
1346
|
objectRecord,
|
|
1486
1347
|
isHumanMessage,
|
|
1487
1348
|
eventContinuationId,
|
|
@@ -1494,19 +1355,15 @@ export function createDshHostAdapter(ctx, options = {}) {
|
|
|
1494
1355
|
memoryFinalizer,
|
|
1495
1356
|
autoReview,
|
|
1496
1357
|
answerReview,
|
|
1497
|
-
ennoController,
|
|
1498
|
-
ennoMemory,
|
|
1499
1358
|
executionSupport,
|
|
1500
1359
|
gate,
|
|
1501
1360
|
turnState,
|
|
1502
1361
|
getSelection: (runId) => selections.get(runId),
|
|
1503
1362
|
currentSession,
|
|
1504
1363
|
currentForAgentEvent,
|
|
1505
|
-
stateForRun,
|
|
1506
1364
|
deliverCompletionReport,
|
|
1507
1365
|
reviewBinding,
|
|
1508
1366
|
evolutionConfig,
|
|
1509
|
-
clearToolRun: toolHostModule.clearRun,
|
|
1510
1367
|
sessionEventSource,
|
|
1511
1368
|
onRunClosed: (runId, status, sessionId, authority) => lifecycleMemory.completed(runId, status, sessionId, authority),
|
|
1512
1369
|
});
|
|
@@ -1520,7 +1377,7 @@ export function createDshHostAdapter(ctx, options = {}) {
|
|
|
1520
1377
|
agent: (id) => agents?.get(id),
|
|
1521
1378
|
logicalRun: resolveSessionRunId,
|
|
1522
1379
|
...(userQuestions ? { questions: userQuestions } : {}),
|
|
1523
|
-
interactive: (agent) => !
|
|
1380
|
+
interactive: (agent) => !deepPlanning.executor.isChild(agent),
|
|
1524
1381
|
recordingRun: (agent) => deepPlanning.executor.recordingRun(agent),
|
|
1525
1382
|
recordingParent: (agent) => deepPlanning.executor.recordingParent(agent),
|
|
1526
1383
|
});
|
|
@@ -1532,7 +1389,6 @@ export function createDshHostAdapter(ctx, options = {}) {
|
|
|
1532
1389
|
memoryFinalizer,
|
|
1533
1390
|
agents,
|
|
1534
1391
|
sessions,
|
|
1535
|
-
delegation,
|
|
1536
1392
|
deepPlanning,
|
|
1537
1393
|
currentSession,
|
|
1538
1394
|
});
|
|
@@ -1548,6 +1404,8 @@ export function createDshHostAdapter(ctx, options = {}) {
|
|
|
1548
1404
|
on: (name, listener, options) => onNativeServiceEvent(ctx, name, listener, options),
|
|
1549
1405
|
});
|
|
1550
1406
|
const host = {
|
|
1407
|
+
...(ctx.get('kiokukoHarness', false)?.lifecycle
|
|
1408
|
+
? { harnessLifecycle: ctx.get('kiokukoHarness', false).lifecycle } : {}),
|
|
1551
1409
|
...(demand ? { onDemandIntake: demand } : {}),
|
|
1552
1410
|
...(taskWorkflow ? { taskWorkflow } : {}),
|
|
1553
1411
|
bypassNativeIntake: isGenericNativeChild,
|
|
@@ -1576,7 +1434,6 @@ export function createDshHostAdapter(ctx, options = {}) {
|
|
|
1576
1434
|
configureSkillPrompts(prompts) {
|
|
1577
1435
|
skillPrompts = prompts;
|
|
1578
1436
|
},
|
|
1579
|
-
configureEnnoMemory: (config) => ennoMemory.configure(config),
|
|
1580
1437
|
configureToolExposure: (config) => {
|
|
1581
1438
|
toolExposureConfig = ToolExposureConfig.parse(config);
|
|
1582
1439
|
},
|
|
@@ -1658,9 +1515,7 @@ export function createDshHostAdapter(ctx, options = {}) {
|
|
|
1658
1515
|
await demand?.dispose();
|
|
1659
1516
|
demandEnd?.();
|
|
1660
1517
|
demandDisposed?.();
|
|
1661
|
-
childGuardDisposer?.();
|
|
1662
1518
|
discussionGuardDisposer?.();
|
|
1663
|
-
childExecutionDisposer();
|
|
1664
1519
|
routing.dispose();
|
|
1665
1520
|
nativeTaskAuthority.dispose();
|
|
1666
1521
|
nativeWorkers.dispose();
|
|
@@ -1676,7 +1531,6 @@ export function createDshHostAdapter(ctx, options = {}) {
|
|
|
1676
1531
|
failures.push(error);
|
|
1677
1532
|
}
|
|
1678
1533
|
const pausedSessions = new Set(turnState.sessionIds().filter((id) => executionSupport.paused(id)));
|
|
1679
|
-
ennoMemory.close();
|
|
1680
1534
|
executionSupport.dispose();
|
|
1681
1535
|
try {
|
|
1682
1536
|
observationMount.disposeError();
|
|
@@ -1708,12 +1562,6 @@ export function createDshHostAdapter(ctx, options = {}) {
|
|
|
1708
1562
|
catch (error) {
|
|
1709
1563
|
failures.push(error);
|
|
1710
1564
|
}
|
|
1711
|
-
try {
|
|
1712
|
-
ennoController.dispose();
|
|
1713
|
-
}
|
|
1714
|
-
catch (error) {
|
|
1715
|
-
failures.push(error);
|
|
1716
|
-
}
|
|
1717
1565
|
try {
|
|
1718
1566
|
await boundaryWorker.dispose();
|
|
1719
1567
|
}
|
|
@@ -1786,7 +1634,6 @@ export function createDshHostAdapter(ctx, options = {}) {
|
|
|
1786
1634
|
failures.push(error);
|
|
1787
1635
|
}
|
|
1788
1636
|
turnState.clear();
|
|
1789
|
-
toolHostModule.clear();
|
|
1790
1637
|
boundaries.clear();
|
|
1791
1638
|
admission.clear();
|
|
1792
1639
|
observation.clear();
|
|
@@ -1797,14 +1644,5 @@ export function createDshHostAdapter(ctx, options = {}) {
|
|
|
1797
1644
|
})()),
|
|
1798
1645
|
};
|
|
1799
1646
|
}
|
|
1800
|
-
function stateForRun(database, item) {
|
|
1801
|
-
if (!item.prepared.ennoOduno.applicable)
|
|
1802
|
-
return item.prepared.ennoOduno;
|
|
1803
|
-
return stateForSnapshot(readEnnoSnapshot(database, {
|
|
1804
|
-
runId: item.runId,
|
|
1805
|
-
workspace: item.workspace,
|
|
1806
|
-
orchestrationId: item.orchestrationId,
|
|
1807
|
-
}));
|
|
1808
|
-
}
|
|
1809
1647
|
export { KIOKUKO_DSH_HOST_SERVICE };
|
|
1810
1648
|
//# sourceMappingURL=host-adapter.js.map
|