kiokuko-dsh 0.2.8 → 0.2.9
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 +1 -1
- package/README.ja.md +35 -10
- package/README.ko.md +30 -3
- package/README.md +36 -12
- package/README.zh-CN.md +30 -3
- package/THIRD_PARTY_NOTICES.md +4 -0
- package/dist/db/transaction.d.ts +2 -1
- package/dist/db/transaction.d.ts.map +1 -1
- package/dist/db/transaction.js +44 -7
- package/dist/db/transaction.js.map +1 -1
- package/dist/deep-planning-config.d.ts +32 -0
- package/dist/deep-planning-config.d.ts.map +1 -0
- package/dist/deep-planning-config.js +20 -0
- package/dist/deep-planning-config.js.map +1 -0
- package/dist/deep-thinker/core/contracts.d.ts +1 -29
- package/dist/deep-thinker/core/contracts.d.ts.map +1 -1
- package/dist/deep-thinker/core/contracts.js +2 -17
- package/dist/deep-thinker/core/contracts.js.map +1 -1
- package/dist/deep-thinker/memory-finalizer.d.ts.map +1 -1
- package/dist/deep-thinker/memory-finalizer.js +1 -114
- package/dist/deep-thinker/memory-finalizer.js.map +1 -1
- package/dist/deep-thinker/native-executor.d.ts.map +1 -1
- package/dist/deep-thinker/native-executor.js +3 -4
- package/dist/deep-thinker/native-executor.js.map +1 -1
- package/dist/deep-thinker/store.js +1 -2
- package/dist/deep-thinker/store.js.map +1 -1
- package/dist/dsh/agenticreplay-event-mapper.d.ts +1 -1
- package/dist/dsh/agenticreplay-event-mapper.d.ts.map +1 -1
- package/dist/dsh/agenticreplay-event-mapper.js +5 -1
- package/dist/dsh/agenticreplay-event-mapper.js.map +1 -1
- package/dist/dsh/agenticreplay-files.d.ts +1 -0
- package/dist/dsh/agenticreplay-files.d.ts.map +1 -1
- package/dist/dsh/agenticreplay-files.js +19 -2
- package/dist/dsh/agenticreplay-files.js.map +1 -1
- package/dist/dsh/agenticreplay-host.js +3 -3
- package/dist/dsh/agenticreplay-host.js.map +1 -1
- package/dist/dsh/agenticreplay-read-service.d.ts +14 -0
- package/dist/dsh/agenticreplay-read-service.d.ts.map +1 -1
- package/dist/dsh/agenticreplay-read-service.js +17 -0
- package/dist/dsh/agenticreplay-read-service.js.map +1 -1
- package/dist/dsh/agenticreplay-recorder.d.ts.map +1 -1
- package/dist/dsh/agenticreplay-recorder.js +5 -2
- package/dist/dsh/agenticreplay-recorder.js.map +1 -1
- package/dist/dsh/answer-review/coordinator.js +2 -1
- package/dist/dsh/answer-review/coordinator.js.map +1 -1
- package/dist/dsh/auto-memory-review.d.ts.map +1 -1
- package/dist/dsh/auto-memory-review.js +10 -193
- package/dist/dsh/auto-memory-review.js.map +1 -1
- package/dist/dsh/coding-workflow/contracts.d.ts +2 -0
- package/dist/dsh/coding-workflow/contracts.d.ts.map +1 -1
- package/dist/dsh/coding-workflow/contracts.js.map +1 -1
- package/dist/dsh/coding-workflow/intent.d.ts.map +1 -1
- package/dist/dsh/coding-workflow/intent.js +5 -2
- package/dist/dsh/coding-workflow/intent.js.map +1 -1
- package/dist/dsh/coding-workflow/service.d.ts +10 -81
- package/dist/dsh/coding-workflow/service.d.ts.map +1 -1
- package/dist/dsh/coding-workflow/service.js +52 -1
- package/dist/dsh/coding-workflow/service.js.map +1 -1
- package/dist/dsh/completion-verifiers.d.ts +6 -0
- package/dist/dsh/completion-verifiers.d.ts.map +1 -1
- package/dist/dsh/completion-verifiers.js.map +1 -1
- package/dist/dsh/composition.d.ts +2 -0
- package/dist/dsh/composition.d.ts.map +1 -1
- package/dist/dsh/composition.js +3 -0
- package/dist/dsh/composition.js.map +1 -1
- package/dist/dsh/config.d.ts +1 -1
- package/dist/dsh/config.d.ts.map +1 -1
- package/dist/dsh/config.js +3 -3
- package/dist/dsh/config.js.map +1 -1
- package/dist/dsh/core/host.d.ts.map +1 -1
- package/dist/dsh/core/host.js +151 -33
- package/dist/dsh/core/host.js.map +1 -1
- package/dist/dsh/core/tasks.d.ts +5 -2
- package/dist/dsh/core/tasks.d.ts.map +1 -1
- package/dist/dsh/core/tasks.js +124 -93
- package/dist/dsh/core/tasks.js.map +1 -1
- package/dist/dsh/decisions/request-intent.d.ts +101 -1
- package/dist/dsh/decisions/request-intent.d.ts.map +1 -1
- package/dist/dsh/decisions/request-intent.js +77 -15
- package/dist/dsh/decisions/request-intent.js.map +1 -1
- package/dist/dsh/execution-result.d.ts +1 -0
- package/dist/dsh/execution-result.d.ts.map +1 -1
- package/dist/dsh/execution-support.d.ts +2 -0
- package/dist/dsh/execution-support.d.ts.map +1 -1
- package/dist/dsh/execution-support.js +39 -4
- package/dist/dsh/execution-support.js.map +1 -1
- package/dist/dsh/existing-task-intake.d.ts +22 -0
- package/dist/dsh/existing-task-intake.d.ts.map +1 -0
- package/dist/dsh/existing-task-intake.js +46 -0
- package/dist/dsh/existing-task-intake.js.map +1 -0
- package/dist/dsh/finalization-request.d.ts +1 -1
- package/dist/dsh/finalization-request.d.ts.map +1 -1
- package/dist/dsh/finalization-request.js +1 -1
- package/dist/dsh/finalization-request.js.map +1 -1
- package/dist/dsh/guardrail/contracts.d.ts +85 -0
- package/dist/dsh/guardrail/contracts.d.ts.map +1 -0
- package/dist/dsh/guardrail/contracts.js +10 -0
- package/dist/dsh/guardrail/contracts.js.map +1 -0
- package/dist/dsh/guardrail/engine.d.ts +19 -0
- package/dist/dsh/guardrail/engine.d.ts.map +1 -0
- package/dist/dsh/guardrail/engine.js +178 -0
- package/dist/dsh/guardrail/engine.js.map +1 -0
- package/dist/dsh/guardrail/evidence.d.ts +16 -0
- package/dist/dsh/guardrail/evidence.d.ts.map +1 -0
- package/dist/dsh/guardrail/evidence.js +101 -0
- package/dist/dsh/guardrail/evidence.js.map +1 -0
- package/dist/dsh/guardrail/service.d.ts +27 -0
- package/dist/dsh/guardrail/service.d.ts.map +1 -0
- package/dist/dsh/guardrail/service.js +253 -0
- package/dist/dsh/guardrail/service.js.map +1 -0
- package/dist/dsh/host-adapter/admission.d.ts.map +1 -1
- package/dist/dsh/host-adapter/admission.js +143 -144
- package/dist/dsh/host-adapter/admission.js.map +1 -1
- package/dist/dsh/host-adapter/lifecycle.d.ts.map +1 -1
- package/dist/dsh/host-adapter/lifecycle.js +104 -90
- package/dist/dsh/host-adapter/lifecycle.js.map +1 -1
- package/dist/dsh/host-adapter/routing.d.ts.map +1 -1
- package/dist/dsh/host-adapter/routing.js +4 -4
- package/dist/dsh/host-adapter/routing.js.map +1 -1
- package/dist/dsh/host-adapter/turn-state.d.ts +4 -2
- package/dist/dsh/host-adapter/turn-state.d.ts.map +1 -1
- package/dist/dsh/host-adapter/turn-state.js +14 -7
- package/dist/dsh/host-adapter/turn-state.js.map +1 -1
- package/dist/dsh/host-adapter.d.ts.map +1 -1
- package/dist/dsh/host-adapter.js +115 -24
- package/dist/dsh/host-adapter.js.map +1 -1
- package/dist/dsh/intake-clarification.js +2 -2
- package/dist/dsh/intake-clarification.js.map +1 -1
- package/dist/dsh/intake-gate.js +6 -7
- package/dist/dsh/intake-gate.js.map +1 -1
- package/dist/dsh/legacy-session-codecs.d.ts +1 -0
- package/dist/dsh/legacy-session-codecs.d.ts.map +1 -1
- package/dist/dsh/legacy-session-codecs.js +831 -127
- package/dist/dsh/legacy-session-codecs.js.map +4 -4
- package/dist/dsh/lifecycle-memory.d.ts +30 -29
- package/dist/dsh/lifecycle-memory.d.ts.map +1 -1
- package/dist/dsh/lifecycle-memory.js +309 -431
- package/dist/dsh/lifecycle-memory.js.map +1 -1
- package/dist/dsh/lisp/candidate.d.ts +2 -2
- package/dist/dsh/lisp/ci.d.ts +2 -1
- package/dist/dsh/lisp/ci.d.ts.map +1 -1
- package/dist/dsh/lisp/ci.js +15 -2
- package/dist/dsh/lisp/ci.js.map +1 -1
- package/dist/dsh/lisp/contracts.d.ts +1 -18
- package/dist/dsh/lisp/contracts.d.ts.map +1 -1
- package/dist/dsh/lisp/contracts.js +1 -10
- package/dist/dsh/lisp/contracts.js.map +1 -1
- package/dist/dsh/lisp/files.d.ts +1 -1
- package/dist/dsh/lisp/files.d.ts.map +1 -1
- package/dist/dsh/lisp/files.js +17 -4
- package/dist/dsh/lisp/files.js.map +1 -1
- package/dist/dsh/lisp/hot-store.d.ts.map +1 -1
- package/dist/dsh/lisp/hot-store.js +4 -0
- package/dist/dsh/lisp/hot-store.js.map +1 -1
- package/dist/dsh/lisp/hot-tools.d.ts +2 -0
- package/dist/dsh/lisp/hot-tools.d.ts.map +1 -1
- package/dist/dsh/lisp/hot-tools.js +10 -0
- package/dist/dsh/lisp/hot-tools.js.map +1 -1
- package/dist/dsh/lisp/manager.d.ts +14 -1
- package/dist/dsh/lisp/manager.d.ts.map +1 -1
- package/dist/dsh/lisp/manager.js +238 -37
- package/dist/dsh/lisp/manager.js.map +1 -1
- package/dist/dsh/lisp/memory-verification.d.ts +5 -2
- package/dist/dsh/lisp/memory-verification.d.ts.map +1 -1
- package/dist/dsh/lisp/memory-verification.js +5 -1
- package/dist/dsh/lisp/memory-verification.js.map +1 -1
- package/dist/dsh/lisp/package-manager.d.ts +1 -1
- package/dist/dsh/lisp/package-manager.d.ts.map +1 -1
- package/dist/dsh/lisp/package-manager.js +10 -1
- package/dist/dsh/lisp/package-manager.js.map +1 -1
- package/dist/dsh/lisp/packages.d.ts +1 -1
- package/dist/dsh/lisp/packages.d.ts.map +1 -1
- package/dist/dsh/lisp/packages.js +15 -5
- package/dist/dsh/lisp/packages.js.map +1 -1
- package/dist/dsh/lisp/proposal-batch.d.ts +2 -0
- package/dist/dsh/lisp/proposal-batch.d.ts.map +1 -1
- package/dist/dsh/lisp/proposal-batch.js +17 -3
- package/dist/dsh/lisp/proposal-batch.js.map +1 -1
- package/dist/dsh/lisp/request-surface.d.ts +12 -0
- package/dist/dsh/lisp/request-surface.d.ts.map +1 -1
- package/dist/dsh/lisp/store.d.ts +2 -1
- package/dist/dsh/lisp/store.d.ts.map +1 -1
- package/dist/dsh/lisp/store.js +5 -1
- package/dist/dsh/lisp/store.js.map +1 -1
- package/dist/dsh/lisp/surface.d.ts.map +1 -1
- package/dist/dsh/lisp/surface.js +107 -13
- package/dist/dsh/lisp/surface.js.map +1 -1
- package/dist/dsh/lisp/task-authority.d.ts +29 -0
- package/dist/dsh/lisp/task-authority.d.ts.map +1 -0
- package/dist/dsh/lisp/task-authority.js +87 -0
- package/dist/dsh/lisp/task-authority.js.map +1 -0
- package/dist/dsh/lisp/worker.d.ts +3 -1
- package/dist/dsh/lisp/worker.d.ts.map +1 -1
- package/dist/dsh/lisp/worker.js +26 -4
- package/dist/dsh/lisp/worker.js.map +1 -1
- package/dist/dsh/lisp-config.d.ts +21 -0
- package/dist/dsh/lisp-config.d.ts.map +1 -0
- package/dist/dsh/lisp-config.js +13 -0
- package/dist/dsh/lisp-config.js.map +1 -0
- package/dist/dsh/memory-application.d.ts +3 -2
- package/dist/dsh/memory-application.d.ts.map +1 -1
- package/dist/dsh/memory-application.js +31 -22
- package/dist/dsh/memory-application.js.map +1 -1
- package/dist/dsh/model-handoff.d.ts.map +1 -1
- package/dist/dsh/model-handoff.js +2 -1
- package/dist/dsh/model-handoff.js.map +1 -1
- package/dist/dsh/models/service.d.ts.map +1 -1
- package/dist/dsh/models/service.js +13 -2
- package/dist/dsh/models/service.js.map +1 -1
- package/dist/dsh/native-cancellation-observer.d.ts +13 -0
- package/dist/dsh/native-cancellation-observer.d.ts.map +1 -0
- package/dist/dsh/native-cancellation-observer.js +54 -0
- package/dist/dsh/native-cancellation-observer.js.map +1 -0
- package/dist/dsh/native-execution-ownership.d.ts +6 -0
- package/dist/dsh/native-execution-ownership.d.ts.map +1 -0
- package/dist/dsh/native-execution-ownership.js +34 -0
- package/dist/dsh/native-execution-ownership.js.map +1 -0
- package/dist/dsh/native-subagent.d.ts +2 -2
- package/dist/dsh/native-subagent.d.ts.map +1 -1
- package/dist/dsh/native-subagent.js +2 -3
- package/dist/dsh/native-subagent.js.map +1 -1
- package/dist/dsh/native-task-authority.d.ts +66 -0
- package/dist/dsh/native-task-authority.d.ts.map +1 -0
- package/dist/dsh/native-task-authority.js +220 -0
- package/dist/dsh/native-task-authority.js.map +1 -0
- package/dist/dsh/on-demand-intake.d.ts +23 -1
- package/dist/dsh/on-demand-intake.d.ts.map +1 -1
- package/dist/dsh/on-demand-intake.js +171 -10
- package/dist/dsh/on-demand-intake.js.map +1 -1
- package/dist/dsh/orchestration/execution-owner.js +1 -1
- package/dist/dsh/orchestration/execution-owner.js.map +1 -1
- package/dist/dsh/orchestration/managed-agent-executor.d.ts +12 -1
- package/dist/dsh/orchestration/managed-agent-executor.d.ts.map +1 -1
- package/dist/dsh/orchestration/managed-agent-executor.js +28 -2
- package/dist/dsh/orchestration/managed-agent-executor.js.map +1 -1
- package/dist/dsh/owned-completion-evidence.d.ts +11 -0
- package/dist/dsh/owned-completion-evidence.d.ts.map +1 -0
- package/dist/dsh/owned-completion-evidence.js +59 -0
- package/dist/dsh/owned-completion-evidence.js.map +1 -0
- package/dist/dsh/owned-execution.d.ts +28 -1
- package/dist/dsh/owned-execution.d.ts.map +1 -1
- package/dist/dsh/owned-execution.js +325 -101
- package/dist/dsh/owned-execution.js.map +1 -1
- package/dist/dsh/owned-read-owner.d.ts +6 -0
- package/dist/dsh/owned-read-owner.d.ts.map +1 -0
- package/dist/dsh/owned-read-owner.js +22 -0
- package/dist/dsh/owned-read-owner.js.map +1 -0
- package/dist/dsh/replay-memory-extract.d.ts +36 -0
- package/dist/dsh/replay-memory-extract.d.ts.map +1 -0
- package/dist/dsh/replay-memory-extract.js +192 -0
- package/dist/dsh/replay-memory-extract.js.map +1 -0
- package/dist/dsh/semantic-compaction/coordinator.d.ts.map +1 -1
- package/dist/dsh/semantic-compaction/coordinator.js +2 -1
- package/dist/dsh/semantic-compaction/coordinator.js.map +1 -1
- package/dist/dsh/session-bridge.d.ts +3 -0
- package/dist/dsh/session-bridge.d.ts.map +1 -1
- package/dist/dsh/session-bridge.js +22 -25
- package/dist/dsh/session-bridge.js.map +1 -1
- package/dist/dsh/session-history-compatibility.d.ts.map +1 -1
- package/dist/dsh/session-history-compatibility.js +15 -1
- package/dist/dsh/session-history-compatibility.js.map +1 -1
- package/dist/dsh/session-history-lookup.d.ts +1 -1
- package/dist/dsh/session-history-lookup.d.ts.map +1 -1
- package/dist/dsh/session-history-lookup.js +4 -3
- package/dist/dsh/session-history-lookup.js.map +1 -1
- package/dist/dsh/session-memory-finalizer.d.ts.map +1 -1
- package/dist/dsh/session-memory-finalizer.js +129 -117
- package/dist/dsh/session-memory-finalizer.js.map +1 -1
- package/dist/dsh/setup.d.ts +1 -1
- package/dist/dsh/setup.d.ts.map +1 -1
- package/dist/dsh/setup.js +1 -1
- package/dist/dsh/skill-prompts.json +1 -1
- package/dist/dsh/task-authority-context.d.ts +8 -0
- package/dist/dsh/task-authority-context.d.ts.map +1 -0
- package/dist/dsh/task-authority-context.js +28 -0
- package/dist/dsh/task-authority-context.js.map +1 -0
- package/dist/dsh/task-completion-host.d.ts +2 -1
- package/dist/dsh/task-completion-host.d.ts.map +1 -1
- package/dist/dsh/task-completion-host.js +17 -5
- package/dist/dsh/task-completion-host.js.map +1 -1
- package/dist/dsh/task-completion.d.ts +13 -0
- package/dist/dsh/task-completion.d.ts.map +1 -1
- package/dist/dsh/task-completion.js +23 -6
- package/dist/dsh/task-completion.js.map +1 -1
- package/dist/dsh/task-intake.d.ts.map +1 -1
- package/dist/dsh/task-intake.js +7 -16
- package/dist/dsh/task-intake.js.map +1 -1
- package/dist/dsh/task-source-history.d.ts +33 -0
- package/dist/dsh/task-source-history.d.ts.map +1 -0
- package/dist/dsh/task-source-history.js +62 -0
- package/dist/dsh/task-source-history.js.map +1 -0
- package/dist/dsh/task-state-host.d.ts +124 -0
- package/dist/dsh/task-state-host.d.ts.map +1 -0
- package/dist/dsh/task-state-host.js +403 -0
- package/dist/dsh/task-state-host.js.map +1 -0
- package/dist/dsh/task-state-surface.d.ts +8 -0
- package/dist/dsh/task-state-surface.d.ts.map +1 -0
- package/dist/dsh/task-state-surface.js +113 -0
- package/dist/dsh/task-state-surface.js.map +1 -0
- package/dist/dsh/task-state.d.ts +217 -0
- package/dist/dsh/task-state.d.ts.map +1 -0
- package/dist/dsh/task-state.js +315 -0
- package/dist/dsh/task-state.js.map +1 -0
- package/dist/dsh/tool-exposure-config.d.ts +12 -0
- package/dist/dsh/tool-exposure-config.d.ts.map +1 -0
- package/dist/dsh/tool-exposure-config.js +4 -0
- package/dist/dsh/tool-exposure-config.js.map +1 -0
- package/dist/dsh/tool-exposure.d.ts +2 -11
- package/dist/dsh/tool-exposure.d.ts.map +1 -1
- package/dist/dsh/tool-exposure.js +2 -2
- package/dist/dsh/tool-exposure.js.map +1 -1
- package/dist/dsh/tools.d.ts +2 -2
- package/dist/dsh/tools.d.ts.map +1 -1
- package/dist/dsh/tools.js +3 -2
- package/dist/dsh/tools.js.map +1 -1
- package/dist/enno-oduno/memory-verification.d.ts +2 -1
- package/dist/enno-oduno/memory-verification.d.ts.map +1 -1
- package/dist/enno-oduno/memory-verification.js +42 -30
- package/dist/enno-oduno/memory-verification.js.map +1 -1
- package/dist/enno-oduno/schemas.d.ts +1 -1
- package/dist/enno-oduno/store.d.ts +7 -0
- package/dist/enno-oduno/store.d.ts.map +1 -1
- package/dist/enno-oduno/store.js +42 -0
- package/dist/enno-oduno/store.js.map +1 -1
- package/dist/ledger/store.d.ts.map +1 -1
- package/dist/ledger/store.js +0 -5
- package/dist/ledger/store.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/auto-globalization.d.ts.map +1 -1
- package/dist/memory/auto-globalization.js +4 -82
- package/dist/memory/auto-globalization.js.map +1 -1
- package/dist/memory/evolution/contracts.d.ts +3 -1
- package/dist/memory/evolution/contracts.d.ts.map +1 -1
- package/dist/memory/evolution/contracts.js +1 -1
- package/dist/memory/evolution/contracts.js.map +1 -1
- package/dist/memory/evolution/store.d.ts +2 -1
- package/dist/memory/evolution/store.d.ts.map +1 -1
- package/dist/memory/evolution/store.js +75 -34
- package/dist/memory/evolution/store.js.map +1 -1
- package/dist/memory/evolution/worker.d.ts +1 -0
- package/dist/memory/evolution/worker.d.ts.map +1 -1
- package/dist/memory/evolution/worker.js +6 -18
- package/dist/memory/evolution/worker.js.map +1 -1
- package/dist/memory/explain.d.ts.map +1 -1
- package/dist/memory/explain.js +2 -2
- package/dist/memory/explain.js.map +1 -1
- package/dist/memory/forget.d.ts.map +1 -1
- package/dist/memory/forget.js +12 -3
- package/dist/memory/forget.js.map +1 -1
- package/dist/memory/index-reasoning/service.d.ts.map +1 -1
- package/dist/memory/index-reasoning/service.js +5 -43
- package/dist/memory/index-reasoning/service.js.map +1 -1
- package/dist/memory/index-reasoning/worker.d.ts.map +1 -1
- package/dist/memory/index-reasoning/worker.js +1 -15
- package/dist/memory/index-reasoning/worker.js.map +1 -1
- package/dist/memory/lifecycle.d.ts +1 -1
- package/dist/memory/lifecycle.d.ts.map +1 -1
- package/dist/memory/lifecycle.js +4 -79
- package/dist/memory/lifecycle.js.map +1 -1
- package/dist/memory/replay-review.d.ts +90 -0
- package/dist/memory/replay-review.d.ts.map +1 -0
- package/dist/memory/replay-review.js +82 -0
- package/dist/memory/replay-review.js.map +1 -0
- package/dist/memory/replay-store.d.ts +14 -0
- package/dist/memory/replay-store.d.ts.map +1 -0
- package/dist/memory/replay-store.js +117 -0
- package/dist/memory/replay-store.js.map +1 -0
- package/dist/memory/review/adoption.d.ts.map +1 -1
- package/dist/memory/review/adoption.js +2 -106
- package/dist/memory/review/adoption.js.map +1 -1
- package/dist/memory/review/store.d.ts.map +1 -1
- package/dist/memory/review/store.js +9 -5
- package/dist/memory/review/store.js.map +1 -1
- package/dist/memory/review/worker.d.ts.map +1 -1
- package/dist/memory/review/worker.js +1 -7
- package/dist/memory/review/worker.js.map +1 -1
- package/dist/memory/scoped-memory.js +1 -1
- package/dist/memory/scoped-memory.js.map +1 -1
- package/dist/model-tools/contracts.d.ts +2 -2
- package/dist/model-tools/contracts.d.ts.map +1 -1
- package/dist/model-tools/contracts.js +1 -11
- package/dist/model-tools/contracts.js.map +1 -1
- package/dist/model-tools/names.d.ts +4 -0
- package/dist/model-tools/names.d.ts.map +1 -0
- package/dist/model-tools/names.js +13 -0
- package/dist/model-tools/names.js.map +1 -0
- package/docs/code-intelligence.md +54 -119
- package/docs/dsh-plugin.md +86 -9
- package/docs/getting-started.md +10 -0
- package/docs/guardrail-licenses/Apache-2.0.txt +73 -0
- package/docs/guardrail-licenses/BSD-2-Clause.txt +9 -0
- package/docs/guardrail-licenses/COPYRIGHT-Rust.txt +34 -0
- package/docs/guardrail-licenses/COPYRIGHT-library.html +29357 -0
- package/docs/guardrail-licenses/ISC.txt +7 -0
- package/docs/guardrail-licenses/LICENSE-APACHE +176 -0
- package/docs/guardrail-licenses/LICENSE-MIT +25 -0
- package/docs/guardrail-licenses/LLVM-exception.txt +15 -0
- package/docs/guardrail-licenses/MIT.txt +9 -0
- package/docs/guardrail-licenses/NCSA.txt +29 -0
- package/docs/guardrail-licenses/README.md +7 -0
- package/docs/guardrail-licenses/Unicode-3.0.txt +39 -0
- package/docs/guardrail-licenses/libunwind-LICENSE.txt +311 -0
- package/docs/guardrail-licenses/manifest.json +71 -0
- package/docs/guardrail-licenses/musl-COPYRIGHT.txt +193 -0
- package/docs/guardrail.md +33 -0
- package/docs/lisp.md +33 -9
- package/docs/memory-evolution.md +6 -6
- package/docs/replay-memory-review.md +26 -0
- package/guardrail/aarch64-apple-darwin/kiokuko-guardrail +0 -0
- package/guardrail/aarch64-apple-darwin/manifest.json +71 -0
- package/guardrail/aarch64-unknown-linux-musl/kiokuko-guardrail +0 -0
- package/guardrail/aarch64-unknown-linux-musl/manifest.json +69 -0
- package/guardrail/manifest.json +204 -0
- package/guardrail/node-runner.mjs +37 -0
- package/guardrail/protocols/coding-routine.lisp +33 -0
- package/guardrail/x86_64-apple-darwin/kiokuko-guardrail +0 -0
- package/guardrail/x86_64-apple-darwin/manifest.json +71 -0
- package/guardrail/x86_64-unknown-linux-musl/kiokuko-guardrail +0 -0
- package/guardrail/x86_64-unknown-linux-musl/manifest.json +68 -0
- package/migrations/040_task_state.sql +45 -0
- package/migrations/041_task_source_history.sql +88 -0
- package/migrations/042_evolution_source_epochs.sql +148 -0
- package/package.json +45 -27
- package/scripts/guardrail-artifacts.d.mts +13 -0
- package/scripts/guardrail-artifacts.mjs +136 -0
- package/skills/kiokuko-lisp/SKILL.md +1 -1
- package/skills/kiokuko-soul/SKILL.md +6 -6
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
-- Retain each completed source epoch under its real ledger run identity.
|
|
2
|
+
-- The migration runner already owns BEGIN IMMEDIATE with foreign keys enabled.
|
|
3
|
+
-- Plain temporary copies avoid both parent-table rename rewriting and DROP cascades.
|
|
4
|
+
CREATE TEMP TABLE migration_042_memory_episodes AS SELECT run_id,workspace,signature,evidence_digest,episode_json,overview_entry_id,created_at FROM memory_episodes;
|
|
5
|
+
CREATE TEMP TABLE migration_042_memory_episode_entries AS SELECT run_id,entry_id FROM memory_episode_entries;
|
|
6
|
+
CREATE TEMP TABLE migration_042_memory_evolution_jobs AS SELECT id,workspace,trigger_run,signature,kind,input_json,seen_json,input_digest,model_json,algorithm,state,attempts,claim_token,lease_until,settings_generation,reason,created_at,updated_at FROM memory_evolution_jobs;
|
|
7
|
+
CREATE TEMP TABLE migration_042_memory_evolution_calls AS SELECT id,job_id,trigger_run,workspace,utc_day,input_bytes,input_tokens,output_tokens,duration_ms,outcome,created_at FROM memory_evolution_calls;
|
|
8
|
+
CREATE TEMP TABLE migration_042_memory_evolution_skips AS SELECT run_id,workspace,reason FROM memory_evolution_skips;
|
|
9
|
+
|
|
10
|
+
-- Remove dependent tables first; the copies have no foreign keys.
|
|
11
|
+
DROP TABLE memory_episode_entries;
|
|
12
|
+
DROP TABLE memory_evolution_calls;
|
|
13
|
+
DROP TABLE memory_episodes;
|
|
14
|
+
DROP TABLE memory_evolution_jobs;
|
|
15
|
+
DROP TABLE memory_evolution_skips;
|
|
16
|
+
|
|
17
|
+
CREATE TABLE memory_episodes (
|
|
18
|
+
run_id TEXT NOT NULL REFERENCES ledger_runs(run_id) ON DELETE CASCADE,
|
|
19
|
+
workspace TEXT NOT NULL,
|
|
20
|
+
signature TEXT NOT NULL,
|
|
21
|
+
evidence_digest TEXT NOT NULL,
|
|
22
|
+
episode_json TEXT NOT NULL,
|
|
23
|
+
overview_entry_id TEXT,
|
|
24
|
+
created_at TEXT NOT NULL,
|
|
25
|
+
source_epoch INTEGER NOT NULL DEFAULT 1 CHECK(source_epoch>0),
|
|
26
|
+
PRIMARY KEY(run_id,source_epoch)
|
|
27
|
+
);
|
|
28
|
+
|
|
29
|
+
CREATE TABLE memory_episode_entries (
|
|
30
|
+
run_id TEXT NOT NULL,
|
|
31
|
+
entry_id TEXT NOT NULL REFERENCES entries(id) ON DELETE CASCADE,
|
|
32
|
+
source_epoch INTEGER NOT NULL DEFAULT 1 CHECK(source_epoch>0),
|
|
33
|
+
PRIMARY KEY(run_id,source_epoch,entry_id),
|
|
34
|
+
FOREIGN KEY(run_id,source_epoch) REFERENCES memory_episodes(run_id,source_epoch) ON DELETE CASCADE
|
|
35
|
+
);
|
|
36
|
+
|
|
37
|
+
CREATE TABLE memory_evolution_jobs (
|
|
38
|
+
id TEXT PRIMARY KEY,
|
|
39
|
+
workspace TEXT NOT NULL,
|
|
40
|
+
trigger_run TEXT NOT NULL REFERENCES ledger_runs(run_id) ON DELETE CASCADE,
|
|
41
|
+
signature TEXT NOT NULL,
|
|
42
|
+
kind TEXT NOT NULL CHECK(kind IN ('positive','avoidance')),
|
|
43
|
+
input_json TEXT NOT NULL,
|
|
44
|
+
seen_json TEXT NOT NULL,
|
|
45
|
+
input_digest TEXT NOT NULL UNIQUE,
|
|
46
|
+
model_json TEXT NOT NULL,
|
|
47
|
+
algorithm TEXT NOT NULL DEFAULT 'episode-evolution-v1',
|
|
48
|
+
state TEXT NOT NULL CHECK(state IN ('pending','processing','completed','held','failed')),
|
|
49
|
+
attempts INTEGER NOT NULL DEFAULT 0 CHECK(attempts BETWEEN 0 AND 2),
|
|
50
|
+
claim_token TEXT,
|
|
51
|
+
lease_until TEXT,
|
|
52
|
+
settings_generation INTEGER,
|
|
53
|
+
reason TEXT,
|
|
54
|
+
created_at TEXT NOT NULL,
|
|
55
|
+
updated_at TEXT NOT NULL,
|
|
56
|
+
source_epoch INTEGER NOT NULL DEFAULT 1 CHECK(source_epoch>0),
|
|
57
|
+
UNIQUE(trigger_run,source_epoch)
|
|
58
|
+
);
|
|
59
|
+
|
|
60
|
+
CREATE TABLE memory_evolution_calls (
|
|
61
|
+
id TEXT PRIMARY KEY,
|
|
62
|
+
job_id TEXT REFERENCES memory_evolution_jobs(id) ON DELETE SET NULL,
|
|
63
|
+
trigger_run TEXT NOT NULL,
|
|
64
|
+
workspace TEXT NOT NULL,
|
|
65
|
+
utc_day TEXT NOT NULL,
|
|
66
|
+
input_bytes INTEGER NOT NULL,
|
|
67
|
+
input_tokens INTEGER,
|
|
68
|
+
output_tokens INTEGER,
|
|
69
|
+
duration_ms INTEGER,
|
|
70
|
+
outcome TEXT NOT NULL,
|
|
71
|
+
created_at TEXT NOT NULL,
|
|
72
|
+
source_epoch INTEGER NOT NULL DEFAULT 1 CHECK(source_epoch>0),
|
|
73
|
+
UNIQUE(trigger_run,source_epoch)
|
|
74
|
+
);
|
|
75
|
+
|
|
76
|
+
CREATE TABLE memory_evolution_skips (
|
|
77
|
+
run_id TEXT NOT NULL REFERENCES ledger_runs(run_id) ON DELETE CASCADE,
|
|
78
|
+
workspace TEXT NOT NULL,
|
|
79
|
+
reason TEXT NOT NULL,
|
|
80
|
+
source_epoch INTEGER NOT NULL DEFAULT 1 CHECK(source_epoch>0),
|
|
81
|
+
PRIMARY KEY(run_id,source_epoch)
|
|
82
|
+
);
|
|
83
|
+
|
|
84
|
+
INSERT INTO memory_episodes(run_id,workspace,signature,evidence_digest,episode_json,overview_entry_id,created_at,source_epoch)
|
|
85
|
+
SELECT run_id,workspace,signature,evidence_digest,episode_json,overview_entry_id,created_at,1 FROM migration_042_memory_episodes;
|
|
86
|
+
INSERT INTO memory_evolution_jobs(id,workspace,trigger_run,signature,kind,input_json,seen_json,input_digest,model_json,algorithm,state,attempts,claim_token,lease_until,settings_generation,reason,created_at,updated_at,source_epoch)
|
|
87
|
+
SELECT id,workspace,trigger_run,signature,kind,input_json,seen_json,input_digest,model_json,algorithm,state,attempts,claim_token,lease_until,settings_generation,reason,created_at,updated_at,1 FROM migration_042_memory_evolution_jobs;
|
|
88
|
+
INSERT INTO memory_evolution_skips(run_id,workspace,reason,source_epoch)
|
|
89
|
+
SELECT run_id,workspace,reason,1 FROM migration_042_memory_evolution_skips;
|
|
90
|
+
INSERT INTO memory_episode_entries(run_id,entry_id,source_epoch)
|
|
91
|
+
SELECT run_id,entry_id,1 FROM migration_042_memory_episode_entries;
|
|
92
|
+
INSERT INTO memory_evolution_calls(id,job_id,trigger_run,workspace,utc_day,input_bytes,input_tokens,output_tokens,duration_ms,outcome,created_at,source_epoch)
|
|
93
|
+
SELECT id,job_id,trigger_run,workspace,utc_day,input_bytes,input_tokens,output_tokens,duration_ms,outcome,created_at,1 FROM migration_042_memory_evolution_calls;
|
|
94
|
+
DROP TABLE migration_042_memory_episodes;
|
|
95
|
+
DROP TABLE migration_042_memory_episode_entries;
|
|
96
|
+
DROP TABLE migration_042_memory_evolution_jobs;
|
|
97
|
+
DROP TABLE migration_042_memory_evolution_calls;
|
|
98
|
+
DROP TABLE migration_042_memory_evolution_skips;
|
|
99
|
+
|
|
100
|
+
CREATE INDEX memory_episodes_signature ON memory_episodes(workspace,signature,created_at);
|
|
101
|
+
CREATE INDEX memory_evolution_jobs_state ON memory_evolution_jobs(state,created_at);
|
|
102
|
+
CREATE INDEX memory_evolution_calls_budget ON memory_evolution_calls(workspace,utc_day);
|
|
103
|
+
|
|
104
|
+
CREATE TRIGGER memory_episode_identity_immutable
|
|
105
|
+
BEFORE UPDATE OF run_id,source_epoch,workspace,signature,evidence_digest,episode_json ON memory_episodes
|
|
106
|
+
BEGIN SELECT RAISE(ABORT, 'episode identity is immutable'); END;
|
|
107
|
+
|
|
108
|
+
CREATE TRIGGER memory_episode_overview_immutable
|
|
109
|
+
BEFORE UPDATE OF overview_entry_id ON memory_episodes
|
|
110
|
+
WHEN OLD.overview_entry_id IS NOT NULL AND NEW.overview_entry_id IS NOT OLD.overview_entry_id
|
|
111
|
+
BEGIN SELECT RAISE(ABORT, 'episode overview identity is immutable'); END;
|
|
112
|
+
|
|
113
|
+
CREATE TRIGGER memory_evolution_job_input_immutable BEFORE UPDATE OF id,workspace,trigger_run,source_epoch,signature,kind,input_json,seen_json,input_digest,model_json,algorithm ON memory_evolution_jobs
|
|
114
|
+
WHEN NOT(EXISTS(SELECT 1 FROM memory_forget_jobs WHERE kind='evolution' AND id=OLD.id)
|
|
115
|
+
AND NEW.id=OLD.id AND NEW.workspace=OLD.workspace AND NEW.trigger_run=OLD.trigger_run AND NEW.source_epoch=OLD.source_epoch AND NEW.signature=OLD.signature
|
|
116
|
+
AND NEW.kind=OLD.kind AND NEW.input_digest=OLD.input_digest AND NEW.model_json=OLD.model_json AND NEW.algorithm=OLD.algorithm
|
|
117
|
+
AND NEW.input_json='[]' AND NEW.seen_json='[]')
|
|
118
|
+
BEGIN SELECT RAISE(ABORT,'evolution job input is immutable'); END;
|
|
119
|
+
|
|
120
|
+
CREATE TRIGGER lifecycle_reference_memory_episodes_insert AFTER INSERT ON memory_episodes BEGIN
|
|
121
|
+
INSERT INTO dsh_memory_processing_state(workspace,context_revision) VALUES('global',1)
|
|
122
|
+
ON CONFLICT(workspace) DO UPDATE SET context_revision=context_revision+1;
|
|
123
|
+
END;
|
|
124
|
+
|
|
125
|
+
CREATE TRIGGER lifecycle_reference_memory_episodes_update AFTER UPDATE ON memory_episodes BEGIN
|
|
126
|
+
INSERT INTO dsh_memory_processing_state(workspace,context_revision) VALUES('global',1)
|
|
127
|
+
ON CONFLICT(workspace) DO UPDATE SET context_revision=context_revision+1;
|
|
128
|
+
END;
|
|
129
|
+
|
|
130
|
+
CREATE TRIGGER lifecycle_reference_memory_episodes_delete AFTER DELETE ON memory_episodes BEGIN
|
|
131
|
+
INSERT INTO dsh_memory_processing_state(workspace,context_revision) VALUES('global',1)
|
|
132
|
+
ON CONFLICT(workspace) DO UPDATE SET context_revision=context_revision+1;
|
|
133
|
+
END;
|
|
134
|
+
|
|
135
|
+
CREATE TRIGGER lifecycle_reference_memory_episode_entries_insert AFTER INSERT ON memory_episode_entries BEGIN
|
|
136
|
+
INSERT INTO dsh_memory_processing_state(workspace,context_revision) VALUES('global',1)
|
|
137
|
+
ON CONFLICT(workspace) DO UPDATE SET context_revision=context_revision+1;
|
|
138
|
+
END;
|
|
139
|
+
|
|
140
|
+
CREATE TRIGGER lifecycle_reference_memory_episode_entries_update AFTER UPDATE ON memory_episode_entries BEGIN
|
|
141
|
+
INSERT INTO dsh_memory_processing_state(workspace,context_revision) VALUES('global',1)
|
|
142
|
+
ON CONFLICT(workspace) DO UPDATE SET context_revision=context_revision+1;
|
|
143
|
+
END;
|
|
144
|
+
|
|
145
|
+
CREATE TRIGGER lifecycle_reference_memory_episode_entries_delete AFTER DELETE ON memory_episode_entries BEGIN
|
|
146
|
+
INSERT INTO dsh_memory_processing_state(workspace,context_revision) VALUES('global',1)
|
|
147
|
+
ON CONFLICT(workspace) DO UPDATE SET context_revision=context_revision+1;
|
|
148
|
+
END;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "kiokuko-dsh",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.9",
|
|
4
4
|
"description": "Kiokuko plugin for DeepSeek Harness",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -45,7 +45,10 @@
|
|
|
45
45
|
"scripts/evaluate-answer-review.mjs",
|
|
46
46
|
"scripts/answer-review-evaluation.mjs",
|
|
47
47
|
"scripts/answer-review-evaluation.d.mts",
|
|
48
|
-
"scripts/verification-completion.mjs"
|
|
48
|
+
"scripts/verification-completion.mjs",
|
|
49
|
+
"guardrail/",
|
|
50
|
+
"scripts/guardrail-artifacts.mjs",
|
|
51
|
+
"scripts/guardrail-artifacts.d.mts"
|
|
49
52
|
],
|
|
50
53
|
"exports": {
|
|
51
54
|
".": {
|
|
@@ -93,12 +96,14 @@
|
|
|
93
96
|
"patch": "./dsh/cordis.patch.yml"
|
|
94
97
|
},
|
|
95
98
|
"compatibility": {
|
|
96
|
-
"dsh": "0.2.1-alpha.2",
|
|
99
|
+
"dsh": ">=0.2.1-alpha.2",
|
|
97
100
|
"dshReleases": {
|
|
98
|
-
"0.2.1-alpha.2": "compatible"
|
|
101
|
+
"0.2.1-alpha.2": "compatible",
|
|
102
|
+
"0.2.1-alpha.3": "compatible"
|
|
99
103
|
},
|
|
100
104
|
"profiles": [
|
|
101
105
|
"web",
|
|
106
|
+
"dsh-cli",
|
|
102
107
|
"dsh-tui"
|
|
103
108
|
]
|
|
104
109
|
},
|
|
@@ -109,7 +114,8 @@
|
|
|
109
114
|
"Registered project roots and their repository metadata",
|
|
110
115
|
"Selected session repository status, staged and working-tree diffs, and explicitly selected untracked files for Diff review",
|
|
111
116
|
"AgenticReplay traces belonging to the exact native DSH session",
|
|
112
|
-
"Stored native DSH session IDs and histories for startup validation and legacy Kiokuko compatibility"
|
|
117
|
+
"Stored native DSH session IDs and histories for startup validation and legacy Kiokuko compatibility",
|
|
118
|
+
"Bundled Rust guardrail manifests, bounded protocol and exact precompiled host artifact for explicitly enrolled TDD units"
|
|
113
119
|
],
|
|
114
120
|
"writePaths": [
|
|
115
121
|
"Seventeen bundled managed Skills and references under ~/.agents/skills on enabled plugin load",
|
|
@@ -124,7 +130,8 @@
|
|
|
124
130
|
"commands": [
|
|
125
131
|
"Restricted repository-relative verifier and backup subprocesses when explicitly requested",
|
|
126
132
|
"Read-only fixed-argument Git commands for an explicitly captured Diff review",
|
|
127
|
-
"Owned bash/zsh, PATH commands, builds/tests and Lisp with the normal user environment; explicit protected Lisp compatibility mode remains available"
|
|
133
|
+
"Owned bash/zsh, PATH commands, builds/tests and Lisp with the normal user environment; explicit protected Lisp compatibility mode remains available",
|
|
134
|
+
"Bundled Rust guardrail check/validate and the host-owned Node test runner for explicitly enrolled bounded TDD units; no download, Cargo, SBCL or PATH engine fallback"
|
|
128
135
|
],
|
|
129
136
|
"externalServices": [
|
|
130
137
|
"GitHub or skills.sh for optional Skill discovery and source retrieval",
|
|
@@ -147,7 +154,8 @@
|
|
|
147
154
|
"Repository identity, run identity, lease, revision, and integrity mismatches fail closed",
|
|
148
155
|
"Remote embedding is disabled by default and unavailable services do not become normal success",
|
|
149
156
|
"Ordinary memory finalization failures are retryable; uncertain Deep requests are never automatically resent. Neither can veto completion or session-log export",
|
|
150
|
-
"AgenticReplay is configured by default; capture requires a session choice or start command, adds no network transmission, and cannot veto native outcomes"
|
|
157
|
+
"AgenticReplay is configured by default; capture requires a session choice or start command, adds no network transmission, and cannot veto native outcomes",
|
|
158
|
+
"Explicitly enrolled bounded TDD units fail closed on absent/invalid guardrail artifacts or stale authority/receipt bindings; only Linux x64 has native engine verification, other bundled targets are cross-built"
|
|
151
159
|
],
|
|
152
160
|
"lifecycleEvidence": [
|
|
153
161
|
"prepare runs only npm run build",
|
|
@@ -158,7 +166,7 @@
|
|
|
158
166
|
},
|
|
159
167
|
"scripts": {
|
|
160
168
|
"clean:dist": "node --input-type=module --eval \"import { rmSync } from 'node:fs'; rmSync('dist', { recursive: true, force: true });\"",
|
|
161
|
-
"build": "npm run clean:dist && tsc -p tsconfig.build.json && node scripts/build-model-transports.mjs && node scripts/compile-skill-prompts.mjs && node scripts/build-dsh-client.mjs && node scripts/build-history-codecs.mjs && node scripts/build-plugin-entry.mjs",
|
|
169
|
+
"build": "npm run clean:dist && tsc -p tsconfig.build.json && node scripts/build-model-transports.mjs && node scripts/compile-skill-prompts.mjs && node scripts/build-dsh-client.mjs && node scripts/build-history-codecs.mjs && node scripts/build-plugin-entry.mjs && node scripts/guardrail-artifacts.mjs --verify-bundled --quiet",
|
|
162
170
|
"typecheck": "tsc -p tsconfig.json --noEmit",
|
|
163
171
|
"test": "node scripts/run-tests.mjs tests/dsh",
|
|
164
172
|
"test:harness": "node --import tsx scripts/run-harness-evaluation.mjs",
|
|
@@ -176,6 +184,7 @@
|
|
|
176
184
|
"test:benchmark:dsh-log": "npm run build && node scripts/run-dsh-million-event-benchmark.mjs",
|
|
177
185
|
"test:efficiency": "node --import tsx scripts/run-token-efficiency-evaluation.mjs",
|
|
178
186
|
"test:e2e:dsh": "npm run build && node scripts/run-enno-dsh-e2e.mjs",
|
|
187
|
+
"test:cli-profile": "node scripts/verify-cli-profile.mjs",
|
|
179
188
|
"verify:prepare": "node scripts/verify-prepare-reproducibility.mjs",
|
|
180
189
|
"sampledb:generate": "node --import tsx tests/fixtures/sample-database.ts tests/sampledb/kiokuko-dsh.sqlite3",
|
|
181
190
|
"test:sampledb": "npm run build && node --import tsx tests/ci/verify-sample-database.ts",
|
|
@@ -249,11 +258,13 @@
|
|
|
249
258
|
"test:code-intelligence:benchmark": "node scripts/benchmark-code-intelligence.mjs",
|
|
250
259
|
"verify": "node scripts/verify.mjs",
|
|
251
260
|
"verify:plan": "node scripts/verify.mjs --plan",
|
|
252
|
-
"test:verification": "node --test scripts/verification-contract.test.mjs"
|
|
261
|
+
"test:verification": "node --test scripts/verification-contract.test.mjs",
|
|
262
|
+
"verify:guardrail": "node scripts/guardrail-artifacts.mjs --verify-bundled",
|
|
263
|
+
"check:guardrail": "node scripts/guardrail-artifacts.mjs --check-host"
|
|
253
264
|
},
|
|
254
265
|
"dependencies": {
|
|
255
|
-
"@deepseek-ai/cosmokit": "1.8.
|
|
256
|
-
"@deepseek-ai/schemastery": "3.18.5-alpha.
|
|
266
|
+
"@deepseek-ai/cosmokit": "~1.8.6-alpha.2",
|
|
267
|
+
"@deepseek-ai/schemastery": "~3.18.5-alpha.2",
|
|
257
268
|
"agenticreplay": ">=0.1.0 <1.0.0",
|
|
258
269
|
"jsonc-parser": "3.3.1",
|
|
259
270
|
"semver": "7.8.5",
|
|
@@ -266,15 +277,15 @@
|
|
|
266
277
|
"global-agent": "4.1.3"
|
|
267
278
|
},
|
|
268
279
|
"peerDependencies": {
|
|
269
|
-
"@ai-sdk/provider": "4.0.21",
|
|
280
|
+
"@ai-sdk/provider": "^4.0.21",
|
|
270
281
|
"@deepseek-ai/cordis": "~4.0.5-alpha.1",
|
|
271
|
-
"@deepseek-ai/dsh-agent": "0.2.1-alpha.2",
|
|
272
|
-
"@deepseek-ai/dsh-attachment": "0.2.1-alpha.2",
|
|
273
|
-
"@deepseek-ai/dsh-llm": "0.2.1-alpha.2",
|
|
274
|
-
"@deepseek-ai/dsh-llm-pi-ai": "0.2.1-alpha.2",
|
|
275
|
-
"@huggingface/hub": "2.16.1",
|
|
276
|
-
"@huggingface/transformers": "4.2.0",
|
|
277
|
-
"sqlite-vec": "0.1.9"
|
|
282
|
+
"@deepseek-ai/dsh-agent": ">=0.2.1-alpha.2",
|
|
283
|
+
"@deepseek-ai/dsh-attachment": ">=0.2.1-alpha.2",
|
|
284
|
+
"@deepseek-ai/dsh-llm": ">=0.2.1-alpha.2",
|
|
285
|
+
"@deepseek-ai/dsh-llm-pi-ai": ">=0.2.1-alpha.2",
|
|
286
|
+
"@huggingface/hub": "^2.16.1",
|
|
287
|
+
"@huggingface/transformers": "^4.2.0",
|
|
288
|
+
"sqlite-vec": "^0.1.9"
|
|
278
289
|
},
|
|
279
290
|
"peerDependenciesMeta": {
|
|
280
291
|
"@huggingface/hub": {
|
|
@@ -308,14 +319,15 @@
|
|
|
308
319
|
"@ai-sdk/openai": "4.0.83",
|
|
309
320
|
"@ai-sdk/openai-compatible": "3.0.62",
|
|
310
321
|
"@ai-sdk/provider": "4.0.21",
|
|
311
|
-
"@deepseek-ai/cordis": "4.0.5-alpha.
|
|
312
|
-
"@deepseek-ai/dsh-agent": "0.2.1-alpha.
|
|
313
|
-
"@deepseek-ai/dsh-attachment": "0.2.1-alpha.
|
|
314
|
-
"@deepseek-ai/dsh-llm": "0.2.1-alpha.
|
|
315
|
-
"@deepseek-ai/dsh-llm-pi-ai": "0.2.1-alpha.
|
|
316
|
-
"@deepseek-ai/dsh-session-format": "0.2.1-alpha.
|
|
317
|
-
"@deepseek-ai/dsh-session-format-v0-to-v1": "0.2.1-alpha.
|
|
318
|
-
"@deepseek-ai/dsh-session-format-v1-to-v2": "0.2.1-alpha.
|
|
322
|
+
"@deepseek-ai/cordis": "4.0.5-alpha.2",
|
|
323
|
+
"@deepseek-ai/dsh-agent": "0.2.1-alpha.3",
|
|
324
|
+
"@deepseek-ai/dsh-attachment": "0.2.1-alpha.3",
|
|
325
|
+
"@deepseek-ai/dsh-llm": "0.2.1-alpha.3",
|
|
326
|
+
"@deepseek-ai/dsh-llm-pi-ai": "0.2.1-alpha.3",
|
|
327
|
+
"@deepseek-ai/dsh-session-format": "0.2.1-alpha.3",
|
|
328
|
+
"@deepseek-ai/dsh-session-format-v0-to-v1": "0.2.1-alpha.3",
|
|
329
|
+
"@deepseek-ai/dsh-session-format-v1-to-v2": "0.2.1-alpha.3",
|
|
330
|
+
"@deepseek-ai/dsh-session-format-v2-to-v3": "0.2.1-alpha.3",
|
|
319
331
|
"@huggingface/hub": "2.16.1",
|
|
320
332
|
"@huggingface/transformers": "4.2.0",
|
|
321
333
|
"@types/node": "24.13.3",
|
|
@@ -326,5 +338,11 @@
|
|
|
326
338
|
"sqlite-vec": "0.1.9",
|
|
327
339
|
"tsx": "4.23.13",
|
|
328
340
|
"typescript": "5.9.3"
|
|
341
|
+
},
|
|
342
|
+
"guardrail": {
|
|
343
|
+
"manifest": "guardrail/manifest.json",
|
|
344
|
+
"manifestSha256": "0a48e29154e1bf498254dbeb4073d16a6526d1e27019e3e21d490d9c179048e4",
|
|
345
|
+
"availability": "Bundled Linux x64/arm64 static musl and macOS x64/arm64; only Linux x64 native smoke verified. Missing or invalid host artifact blocks protocol enrollment.",
|
|
346
|
+
"verification": "npm run verify:guardrail validates bundled identities without executing cross-built binaries; npm run check:guardrail checks current host availability."
|
|
329
347
|
}
|
|
330
348
|
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/** Test overrides select packaged targets; normal enrollment uses the actual host. */
|
|
2
|
+
export interface GuardrailResolveOptions { platform?: string; arch?: string }
|
|
3
|
+
export interface ResolvedGuardrail {
|
|
4
|
+
binary: string
|
|
5
|
+
protocol: string
|
|
6
|
+
engineDigest: string
|
|
7
|
+
protocolFileDigest: string
|
|
8
|
+
manifestDigest: string
|
|
9
|
+
version: string
|
|
10
|
+
target: string
|
|
11
|
+
}
|
|
12
|
+
/** Verify bundled file identities and format synchronously; no execution or network fallback. */
|
|
13
|
+
export function resolveGuardrail(root: string, options?: GuardrailResolveOptions): ResolvedGuardrail
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
import { constants, closeSync, fstatSync, lstatSync, openSync, readFileSync, realpathSync } from 'node:fs'
|
|
2
|
+
import { createHash } from 'node:crypto'
|
|
3
|
+
import { dirname, join, resolve } from 'node:path'
|
|
4
|
+
import { fileURLToPath } from 'node:url'
|
|
5
|
+
|
|
6
|
+
const targets = Object.freeze({
|
|
7
|
+
'linux:x64': 'x86_64-unknown-linux-musl',
|
|
8
|
+
'linux:arm64': 'aarch64-unknown-linux-musl',
|
|
9
|
+
'darwin:x64': 'x86_64-apple-darwin',
|
|
10
|
+
'darwin:arm64': 'aarch64-apple-darwin',
|
|
11
|
+
})
|
|
12
|
+
const digest = bytes => createHash('sha256').update(bytes).digest('hex')
|
|
13
|
+
const fail = message => { throw new Error(`Bundled Rust guardrail: ${message}`) }
|
|
14
|
+
const hex = value => typeof value === 'string' && /^[a-f0-9]{64}$/u.test(value)
|
|
15
|
+
const record = value => value !== null && typeof value === 'object' && !Array.isArray(value)
|
|
16
|
+
|
|
17
|
+
function regularBytes(root, path, maximum, executable = false) {
|
|
18
|
+
if (typeof path !== 'string' || path.startsWith('/') || path.split('/').some(part => !part || part === '.' || part === '..' || part.includes('\\'))) fail('invalid asset path')
|
|
19
|
+
let full = root
|
|
20
|
+
const parts = path.split('/')
|
|
21
|
+
for (let index = 0; index <= parts.length; index++) {
|
|
22
|
+
if (index > 0) full = join(full, parts[index - 1])
|
|
23
|
+
let stat
|
|
24
|
+
try { stat = lstatSync(full) } catch (error) { if (error.code === 'ENOENT') fail(`missing artifact ${path}; enrollment unavailable`); throw error }
|
|
25
|
+
if (stat.isSymbolicLink()) fail(`symlink asset is forbidden: ${path}`)
|
|
26
|
+
if (index < parts.length && !stat.isDirectory()) fail(`asset parent must be a directory: ${path}`)
|
|
27
|
+
if (index === parts.length && !stat.isFile()) fail(`artifact must be a regular file: ${path}`)
|
|
28
|
+
}
|
|
29
|
+
const fd = openSync(full, constants.O_RDONLY | (constants.O_NOFOLLOW ?? 0) | (constants.O_NONBLOCK ?? 0))
|
|
30
|
+
try {
|
|
31
|
+
const stat = fstatSync(fd)
|
|
32
|
+
if (!stat.isFile()) fail(`artifact must be a regular file: ${path}`)
|
|
33
|
+
if (stat.size <= 0 || stat.size > maximum) fail(`invalid artifact size: ${path}`)
|
|
34
|
+
if (executable && (stat.mode & 0o111) === 0) fail(`artifact is not executable: ${path}`)
|
|
35
|
+
const bytes = readFileSync(fd)
|
|
36
|
+
if (bytes.length !== stat.size) fail(`artifact size changed while reading: ${path}`)
|
|
37
|
+
return bytes
|
|
38
|
+
} finally { closeSync(fd) }
|
|
39
|
+
}
|
|
40
|
+
function json(bytes, label) {
|
|
41
|
+
let value
|
|
42
|
+
try { value = JSON.parse(bytes.toString('utf8')) } catch { fail(`malformed ${label}`) }
|
|
43
|
+
if (!record(value)) fail(`malformed ${label}`)
|
|
44
|
+
return value
|
|
45
|
+
}
|
|
46
|
+
function matches(bytes, expected, label) {
|
|
47
|
+
if (!record(expected) || !Number.isSafeInteger(expected.bytes) || expected.bytes !== bytes.length || !hex(expected.sha256) || digest(bytes) !== expected.sha256) fail(`size/digest integrity mismatch: ${label}`)
|
|
48
|
+
}
|
|
49
|
+
function boundedOffset(value, maximum, label) {
|
|
50
|
+
if (value > BigInt(maximum)) fail(`${label} exceeds artifact bytes`)
|
|
51
|
+
return Number(value)
|
|
52
|
+
}
|
|
53
|
+
function executableHeader(bytes, target) {
|
|
54
|
+
const arm = target.startsWith('aarch64-')
|
|
55
|
+
if (target.endsWith('-linux-musl')) {
|
|
56
|
+
if (bytes.length < 64 || !bytes.subarray(0, 7).equals(Buffer.from([0x7f, 69, 76, 70, 2, 1, 1])) || bytes.readUInt16LE(18) !== (arm ? 183 : 62)) fail('ELF64 architecture/header mismatch')
|
|
57
|
+
const type = bytes.readUInt16LE(16), phoff = boundedOffset(bytes.readBigUInt64LE(32), bytes.length, 'ELF header')
|
|
58
|
+
const stride = bytes.readUInt16LE(54), count = bytes.readUInt16LE(56)
|
|
59
|
+
if (![2, 3].includes(type) || bytes.readUInt32LE(20) !== 1 || bytes.readUInt16LE(52) !== 64 || stride !== 56 || !count || phoff < 64 || phoff + count * stride > bytes.length) fail('truncated or unsupported ELF executable layout')
|
|
60
|
+
let executable = false
|
|
61
|
+
for (let offset = phoff; offset < phoff + count * stride; offset += stride) {
|
|
62
|
+
const kind = bytes.readUInt32LE(offset), flags = bytes.readUInt32LE(offset + 4)
|
|
63
|
+
const start = bytes.readBigUInt64LE(offset + 8), size = bytes.readBigUInt64LE(offset + 32), memory = bytes.readBigUInt64LE(offset + 40)
|
|
64
|
+
if (size && (start > BigInt(bytes.length) || start + size > BigInt(bytes.length))) fail('ELF segment exceeds artifact bytes')
|
|
65
|
+
if (kind === 1 && size > memory) fail('ELF load segment size is invalid')
|
|
66
|
+
if (kind === 3) fail('expected static musl ELF without a dynamic interpreter')
|
|
67
|
+
executable ||= kind === 1 && Boolean(flags & 1)
|
|
68
|
+
}
|
|
69
|
+
if (!executable) fail('ELF has no executable load segment')
|
|
70
|
+
} else {
|
|
71
|
+
if (bytes.length < 32 || bytes.readUInt32LE(0) !== 0xfeedfacf || bytes.readUInt32LE(4) !== (arm ? 0x0100000c : 0x01000007)) fail('Mach-O64 architecture/header mismatch')
|
|
72
|
+
const count = bytes.readUInt32LE(16), size = bytes.readUInt32LE(20)
|
|
73
|
+
if (bytes.readUInt32LE(12) !== 2 || !count || size > bytes.length - 32) fail('truncated or non-executable Mach-O layout')
|
|
74
|
+
let offset = 32, executable = false
|
|
75
|
+
for (let index = 0; index < count; index++) {
|
|
76
|
+
if (offset + 8 > 32 + size) fail('truncated Mach-O load command')
|
|
77
|
+
const kind = bytes.readUInt32LE(offset), stride = bytes.readUInt32LE(offset + 4)
|
|
78
|
+
if (stride < 8 || stride % 8 || offset + stride > 32 + size) fail('invalid Mach-O load command size')
|
|
79
|
+
if (kind === 0x19) {
|
|
80
|
+
if (stride < 72) fail('truncated Mach-O64 segment')
|
|
81
|
+
const start = bytes.readBigUInt64LE(offset + 40), length = bytes.readBigUInt64LE(offset + 48)
|
|
82
|
+
if (start + length > BigInt(bytes.length)) fail('Mach-O segment exceeds artifact bytes')
|
|
83
|
+
executable ||= length > 0n && Boolean(bytes.readUInt32LE(offset + 60) & 4)
|
|
84
|
+
}
|
|
85
|
+
offset += stride
|
|
86
|
+
}
|
|
87
|
+
if (offset !== 32 + size || !executable) fail('Mach-O executable segment/layout mismatch')
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
function indexAt(root) {
|
|
91
|
+
const metadata = json(regularBytes(root, 'package.json', 1024 * 1024), 'package metadata')
|
|
92
|
+
if (!record(metadata.guardrail) || metadata.guardrail.manifest !== 'guardrail/manifest.json' || !hex(metadata.guardrail.manifestSha256)) fail('package metadata has no pinned guardrail manifest')
|
|
93
|
+
const bytes = regularBytes(root, metadata.guardrail.manifest, 1024 * 1024)
|
|
94
|
+
if (digest(bytes) !== metadata.guardrail.manifestSha256) fail('package manifest digest integrity mismatch')
|
|
95
|
+
const index = json(bytes, 'guardrail manifest')
|
|
96
|
+
if (index.schema !== 1 || index.package !== 'kiokuko-guardrail' || typeof index.version !== 'string' || !/^[0-9]+\.[0-9]+\.[0-9]+(?:[-+][a-zA-Z0-9.-]+)?$/u.test(index.version) || !record(index.targets) || !record(index.protocol) || index.protocol.path !== 'guardrail/protocols/coding-routine.lisp') fail('guardrail manifest identity/schema mismatch')
|
|
97
|
+
if (Object.keys(index.targets).length === 0) fail('guardrail manifest declares no bundled targets')
|
|
98
|
+
if (!Array.isArray(index.unavailableTargets) || Object.keys(index.targets).some(target => !Object.values(targets).includes(target)) || index.unavailableTargets.some(target => !Object.values(targets).includes(target) || target in index.targets)) fail('guardrail manifest target declaration mismatch')
|
|
99
|
+
return { index, manifestDigest: digest(bytes) }
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
/** Select already bundled bytes only. This performs no execution, compilation, download, or PATH lookup. */
|
|
103
|
+
export function resolveGuardrail(root, options = {}) {
|
|
104
|
+
root = resolve(root)
|
|
105
|
+
const platform = options.platform ?? process.platform, arch = options.arch ?? process.arch
|
|
106
|
+
const target = targets[`${platform}:${arch}`]
|
|
107
|
+
if (!target) fail(`unsupported host ${platform}/${arch}; no binary fallback`)
|
|
108
|
+
const { index, manifestDigest } = indexAt(root)
|
|
109
|
+
if (!Object.hasOwn(index.targets, target)) fail(`target ${target} unavailable: not bundled; no download or compilation fallback`)
|
|
110
|
+
const entry = index.targets[target]
|
|
111
|
+
if (!record(entry) || entry.platform !== platform || entry.arch !== arch || entry.binary !== `guardrail/${target}/kiokuko-guardrail` || entry.manifest !== `guardrail/${target}/manifest.json` || !hex(entry.manifestSha256)) fail('target manifest identity/path mismatch')
|
|
112
|
+
const releaseBytes = regularBytes(root, entry.manifest, 1024 * 1024)
|
|
113
|
+
if (digest(releaseBytes) !== entry.manifestSha256) fail('target manifest digest integrity mismatch')
|
|
114
|
+
const release = json(releaseBytes, 'target manifest')
|
|
115
|
+
if (release.schema !== 1 || release.package !== index.package || release.target !== target || release.version !== index.version || release.build_inputs?.target !== target || !hex(release.source_sha256)) fail('release manifest identity mismatch')
|
|
116
|
+
const binary = regularBytes(root, entry.binary, 16 * 1024 * 1024, true)
|
|
117
|
+
matches(binary, entry, 'engine'); matches(binary, release.artifacts?.['bin/kiokuko-guardrail'], 'release engine')
|
|
118
|
+
executableHeader(binary, target)
|
|
119
|
+
const protocol = regularBytes(root, index.protocol.path, 256 * 1024)
|
|
120
|
+
matches(protocol, index.protocol, 'protocol'); matches(protocol, release.artifacts?.['protocols/coding-routine.lisp'], 'release protocol')
|
|
121
|
+
return { binary: join(root, entry.binary), protocol: join(root, index.protocol.path), engineDigest: digest(binary), protocolFileDigest: digest(protocol), manifestDigest, version: index.version, target }
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
if (process.argv[1] && realpathSync(process.argv[1]) === fileURLToPath(import.meta.url)) {
|
|
125
|
+
try {
|
|
126
|
+
const root = resolve(dirname(fileURLToPath(import.meta.url)), '..')
|
|
127
|
+
const quiet = process.argv[3] === '--quiet'
|
|
128
|
+
if ((process.argv.length !== 3 && !(process.argv.length === 4 && quiet && process.argv[2] === '--verify-bundled')) || !['--verify-bundled', '--check-host'].includes(process.argv[2])) fail('usage: guardrail-artifacts.mjs --verify-bundled [--quiet]|--check-host')
|
|
129
|
+
if (process.argv[2] === '--check-host') console.log(JSON.stringify(resolveGuardrail(root)))
|
|
130
|
+
else {
|
|
131
|
+
const { index } = indexAt(root)
|
|
132
|
+
for (const entry of Object.values(index.targets)) resolveGuardrail(root, { platform: entry.platform, arch: entry.arch })
|
|
133
|
+
if (!quiet) console.log(JSON.stringify({ verifiedTargets: Object.keys(index.targets), unavailableTargets: index.unavailableTargets, nativeExecutionClaim: false, verification: Object.fromEntries(Object.entries(index.targets).map(([target, entry]) => [target, entry.verification])) }))
|
|
134
|
+
}
|
|
135
|
+
} catch (error) { console.error(error instanceof Error ? error.message : String(error)); process.exitCode = 1 }
|
|
136
|
+
}
|
|
@@ -16,7 +16,7 @@ Coding: coding_workflow defines Goal/items/checks before the task Lisp choice. P
|
|
|
16
16
|
|
|
17
17
|
Persistent mode: coding choice or /kioku-lisp enable. Task mode uses /kioku-lisp enable-task with fresh workers per definition/call. Lisp and ordinary tools coexist. Coding-task startup failure blocks until recovery or explicit route change; legacy ordinary tools remain available. Never spoof host-bound session/agent/directory/generation.
|
|
18
18
|
|
|
19
|
-
Use kioku_read, kioku_write, kioku_edit, kioku_remove, kioku_exec and kioku_result for observed development. PATH commands, bash/zsh, builds/tests, coding-needed external investigation and project edits need no routine confirmation. Source/data deletion and existing durable user database mutation need a concrete review; generated/temp/disposable artifacts and
|
|
19
|
+
Use kioku_read, kioku_write, kioku_edit, kioku_remove, kioku_exec and kioku_result for observed development. PATH commands, bash/zsh, builds/tests, coding-needed external investigation and project edits need no routine confirmation. Source/data deletion and existing durable user database mutation need a concrete review; generated/temp/disposable artifacts are ordinary development. Memory organization waits until task completion and user permission; saving requires approval of the exact shown content. Declare destructiveTargets when executing commands with destructive intent. The host does not attempt to classify every side effect of arbitrary code.
|
|
20
20
|
|
|
21
21
|
Lisp uses the normal user environment and child processes. Prefer kioku.tools:call-tool with the owned tools or kioku.process broker APIs to obtain host receipts. Direct Lisp/FFI effects are not independently observed and cannot establish successful verification. Bind task_completion conditions/source paths before executing checks, including subdirectory checks. Collect asynchronous final receipts with kioku_result. A model/Lisp passed field is never process evidence. Plan, goal, cancellation and execution ownership remain authoritative. During Plan use read/search/status; explicit human implementation instructions or Plan approval exit at the next accepted boundary.
|
|
22
22
|
|
|
@@ -8,18 +8,18 @@ description: Kiokuko's entry router for non-trivial DSH work. Read it before any
|
|
|
8
8
|
<!-- kiokuko:runtime contract -->
|
|
9
9
|
# SOUL router
|
|
10
10
|
|
|
11
|
-
Read first. Host owns intake/session/capabilities/routing/delegation
|
|
11
|
+
Read first. Host owns intake/session/capabilities/routing/delegation; absent task_prepare/task_answer is normal. Require ready/exhausted and permissive nextAction; invent no profile.
|
|
12
12
|
|
|
13
|
-
User instructions outrank
|
|
13
|
+
User instructions outrank Skills. Preserve identity/revisions/leases/integrity and Plan/goal/cancellation/ownership. Optional enrichment never vetoes work. Use authorization/evidence for routine choices; clarify unclear intent/destruction. Finish, report blockers, recheck changes; no invented budgets.
|
|
14
14
|
|
|
15
15
|
**本当に、それを全部計算・保存・検索する必要があるのか?**
|
|
16
|
-
Preserve
|
|
16
|
+
Preserve results: eliminate needless computation/storage/search, narrow scope, then optimize. Justify exhaustive work. Never silently approximate/delete data or waive validation, recovery or audit. No extra approvals/artifacts.
|
|
17
17
|
|
|
18
|
-
|
|
18
|
+
Choose request-relevant Skills; non-code needs no coding startup. Read indexes and risk-relevant references. Preserve roles/exclusions/recovery and host outcomes/model/effort.
|
|
19
19
|
|
|
20
|
-
|
|
20
|
+
Use current model/memory/Skills and kioku_read/write/edit/remove/exec/result. Project work, PATH/bash/zsh, Lisp and builds/tests are authorized; review source/data deletion and durable user DB changes concretely. Recover Lisp or explicitly change route. Pre-bind source/test/config checks; collect final background receipts. Receipts establish observations only; check recalled candidates against current sources. Report work, verification and memory saving separately. After completion, get permission to organize memory; show the exact proposal and save only its user-approved revision. Comments need new previews; decline saves nothing. Memory failure never blocks work. Reconcile uncertain approved saves with the original key; never replay work or invent save identities. Human implementation requests or Plan approval request exit at the next accepted boundary; plan-only answers stay in Plan.
|
|
21
21
|
|
|
22
|
-
|
|
22
|
+
Without Skills, use current evidence within host identity/authority/integrity; never substitute required Skills or auto-install/execute fetched ones. Claim no unread Skills or unrun checks. Check supported file types before diagnostics; manually check Markdown/unsupported documents for structure, requirements and whitespace. Unavailable diagnostics stay unverified. After each successful edit/write, re-read before the next mutation; reconcile stale content and never force overwrites. Never repeat unsupported diagnostics unchanged.
|
|
23
23
|
|
|
24
24
|
Select kiokuko-{investigate,architecture,review,benchmark,verification,skill-authoring,technical-writing} as needed. Coding: coding-ideal-routine-skill owns coding_workflow and fresh Goal evidence.
|
|
25
25
|
<!-- /kiokuko:runtime -->
|