create-principles-disciple 1.154.5 → 1.155.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/_release/product-identity.json +2 -2
- package/codex-adapter/dist/codec/input-decoder.d.ts +17 -0
- package/codex-adapter/dist/codec/input-decoder.js +39 -0
- package/codex-adapter/dist/ingestion/explicit-owner-statement.js +125 -1
- package/codex-adapter/dist/ingestion/pain-receipt-fallback.d.ts +46 -0
- package/codex-adapter/dist/ingestion/pain-receipt-fallback.js +193 -0
- package/codex-adapter/dist/ingestion/turn-context.d.ts +10 -15
- package/codex-adapter/dist/ingestion/turn-context.js +35 -9
- package/codex-adapter/dist/pd-hook.js +57 -1
- package/codex-adapter/dist/worker/workspace-worker.d.ts +15 -0
- package/codex-adapter/dist/worker/workspace-worker.js +91 -12
- package/codex-adapter/package.json +1 -1
- package/console/dist/server/index.js +11 -0
- package/console/dist/server/models/EvidenceChainConsoleModel.js +31 -0
- package/console/dist/server/routes/health.d.ts +1 -0
- package/console/dist/server/routes/health.js +12 -0
- package/console/dist/server/routes/service-host.d.ts +19 -0
- package/console/dist/server/routes/service-host.js +129 -0
- package/console/dist/web/assets/app.js +39 -39
- package/console/package.json +1 -1
- package/core/dist/runtime/adapter/pi-ai-http-transport.d.ts.map +1 -1
- package/core/dist/runtime/adapter/pi-ai-http-transport.js.map +1 -1
- package/core/dist/runtime/context-payload.d.ts +48 -0
- package/core/dist/runtime/context-payload.d.ts.map +1 -1
- package/core/dist/runtime/context-payload.js +12 -0
- package/core/dist/runtime/context-payload.js.map +1 -1
- package/core/dist/runtime/diagnostician/rootcause-prompt-builder.d.ts.map +1 -1
- package/core/dist/runtime/diagnostician/rootcause-prompt-builder.js +18 -0
- package/core/dist/runtime/diagnostician/rootcause-prompt-builder.js.map +1 -1
- package/core/dist/runtime/diagnostician-candidate.d.ts.map +1 -1
- package/core/dist/runtime/diagnostician-candidate.js +18 -2
- package/core/dist/runtime/diagnostician-candidate.js.map +1 -1
- package/core/dist/runtime/evidence-guards.d.ts +7 -3
- package/core/dist/runtime/evidence-guards.d.ts.map +1 -1
- package/core/dist/runtime/evidence-guards.js +9 -7
- package/core/dist/runtime/evidence-guards.js.map +1 -1
- package/core/dist/runtime/feature-flags/feature-flag-contract.d.ts.map +1 -1
- package/core/dist/runtime/feature-flags/feature-flag-contract.js +14 -0
- package/core/dist/runtime/feature-flags/feature-flag-contract.js.map +1 -1
- package/core/dist/runtime/feature-flags/feature-flag-lifecycle.d.ts.map +1 -1
- package/core/dist/runtime/feature-flags/feature-flag-lifecycle.js +8 -0
- package/core/dist/runtime/feature-flags/feature-flag-lifecycle.js.map +1 -1
- package/core/dist/runtime/host-submission-context.d.ts +83 -0
- package/core/dist/runtime/host-submission-context.d.ts.map +1 -0
- package/core/dist/runtime/host-submission-context.js +183 -0
- package/core/dist/runtime/host-submission-context.js.map +1 -0
- package/core/dist/runtime/index.d.ts +9 -2
- package/core/dist/runtime/index.d.ts.map +1 -1
- package/core/dist/runtime/index.js +29 -2
- package/core/dist/runtime/index.js.map +1 -1
- package/core/dist/runtime/intent/intent-doc.d.ts.map +1 -1
- package/core/dist/runtime/intent/intent-doc.js +29 -5
- package/core/dist/runtime/intent/intent-doc.js.map +1 -1
- package/core/dist/runtime/internalization/diag-distiller-runner.d.ts +9 -0
- package/core/dist/runtime/internalization/diag-distiller-runner.d.ts.map +1 -1
- package/core/dist/runtime/internalization/diag-distiller-runner.js +13 -0
- package/core/dist/runtime/internalization/diag-distiller-runner.js.map +1 -1
- package/core/dist/runtime/internalization/diag-rootcause-runner.d.ts +11 -0
- package/core/dist/runtime/internalization/diag-rootcause-runner.d.ts.map +1 -1
- package/core/dist/runtime/internalization/diag-rootcause-runner.js +10 -0
- package/core/dist/runtime/internalization/diag-rootcause-runner.js.map +1 -1
- package/core/dist/runtime/internalization/diag-router-runner.d.ts +9 -0
- package/core/dist/runtime/internalization/diag-router-runner.d.ts.map +1 -1
- package/core/dist/runtime/internalization/diag-router-runner.js +13 -0
- package/core/dist/runtime/internalization/diag-router-runner.js.map +1 -1
- package/core/dist/runtime/internalization/index.d.ts +1 -1
- package/core/dist/runtime/internalization/index.d.ts.map +1 -1
- package/core/dist/runtime/internalization/index.js +1 -1
- package/core/dist/runtime/internalization/index.js.map +1 -1
- package/core/dist/runtime/internalization/intake-to-internalization-bridge.d.ts +19 -0
- package/core/dist/runtime/internalization/intake-to-internalization-bridge.d.ts.map +1 -1
- package/core/dist/runtime/internalization/intake-to-internalization-bridge.js +24 -0
- package/core/dist/runtime/internalization/intake-to-internalization-bridge.js.map +1 -1
- package/core/dist/runtime/internalization/internalization-orchestrator.d.ts +8 -0
- package/core/dist/runtime/internalization/internalization-orchestrator.d.ts.map +1 -1
- package/core/dist/runtime/internalization/internalization-orchestrator.js +36 -4
- package/core/dist/runtime/internalization/internalization-orchestrator.js.map +1 -1
- package/core/dist/runtime/internalization/source-authorization-boundary.d.ts +39 -0
- package/core/dist/runtime/internalization/source-authorization-boundary.d.ts.map +1 -0
- package/core/dist/runtime/internalization/source-authorization-boundary.js +57 -0
- package/core/dist/runtime/internalization/source-authorization-boundary.js.map +1 -0
- package/core/dist/runtime/internalization/split-diagnostician-runner.d.ts.map +1 -1
- package/core/dist/runtime/internalization/split-diagnostician-runner.js +72 -5
- package/core/dist/runtime/internalization/split-diagnostician-runner.js.map +1 -1
- package/core/dist/runtime/pain-admission-disposition.d.ts +60 -0
- package/core/dist/runtime/pain-admission-disposition.d.ts.map +1 -0
- package/core/dist/runtime/pain-admission-disposition.js +37 -0
- package/core/dist/runtime/pain-admission-disposition.js.map +1 -0
- package/core/dist/runtime/pain-ingress-payload.d.ts +36 -2
- package/core/dist/runtime/pain-ingress-payload.d.ts.map +1 -1
- package/core/dist/runtime/pain-ingress-payload.js +63 -6
- package/core/dist/runtime/pain-ingress-payload.js.map +1 -1
- package/core/dist/runtime/pain-ingress.d.ts.map +1 -1
- package/core/dist/runtime/pain-ingress.js +28 -0
- package/core/dist/runtime/pain-ingress.js.map +1 -1
- package/core/dist/runtime/pain-recall-read-model.d.ts +13 -1
- package/core/dist/runtime/pain-recall-read-model.d.ts.map +1 -1
- package/core/dist/runtime/pain-recall-read-model.js +50 -7
- package/core/dist/runtime/pain-recall-read-model.js.map +1 -1
- package/core/dist/runtime/pain-receipt-recovery.d.ts +147 -0
- package/core/dist/runtime/pain-receipt-recovery.d.ts.map +1 -0
- package/core/dist/runtime/pain-receipt-recovery.js +475 -0
- package/core/dist/runtime/pain-receipt-recovery.js.map +1 -0
- package/core/dist/runtime/pain-signal-bridge.d.ts +13 -1
- package/core/dist/runtime/pain-signal-bridge.d.ts.map +1 -1
- package/core/dist/runtime/pain-signal-bridge.js +174 -0
- package/core/dist/runtime/pain-signal-bridge.js.map +1 -1
- package/core/dist/runtime/pain-signal-runtime-factory.d.ts +9 -0
- package/core/dist/runtime/pain-signal-runtime-factory.d.ts.map +1 -1
- package/core/dist/runtime/pain-signal-runtime-factory.js +8 -3
- package/core/dist/runtime/pain-signal-runtime-factory.js.map +1 -1
- package/core/dist/runtime/pain-submit-capability.d.ts +11 -0
- package/core/dist/runtime/pain-submit-capability.d.ts.map +1 -1
- package/core/dist/runtime/pain-submit-capability.js +77 -3
- package/core/dist/runtime/pain-submit-capability.js.map +1 -1
- package/core/dist/runtime/pain-target-evidence-reconcile.d.ts +55 -0
- package/core/dist/runtime/pain-target-evidence-reconcile.d.ts.map +1 -0
- package/core/dist/runtime/pain-target-evidence-reconcile.js +164 -0
- package/core/dist/runtime/pain-target-evidence-reconcile.js.map +1 -0
- package/core/dist/runtime/pain-to-principle-service.d.ts +8 -0
- package/core/dist/runtime/pain-to-principle-service.d.ts.map +1 -1
- package/core/dist/runtime/pain-to-principle-service.js +1 -0
- package/core/dist/runtime/pain-to-principle-service.js.map +1 -1
- package/core/dist/runtime/source-material-authorization.d.ts +166 -0
- package/core/dist/runtime/source-material-authorization.d.ts.map +1 -0
- package/core/dist/runtime/source-material-authorization.js +250 -0
- package/core/dist/runtime/source-material-authorization.js.map +1 -0
- package/core/dist/runtime/store/context/index.d.ts +1 -0
- package/core/dist/runtime/store/context/index.d.ts.map +1 -1
- package/core/dist/runtime/store/context/index.js +1 -0
- package/core/dist/runtime/store/context/index.js.map +1 -1
- package/core/dist/runtime/store/context/promoted-evidence-reader.d.ts +8 -0
- package/core/dist/runtime/store/context/promoted-evidence-reader.d.ts.map +1 -1
- package/core/dist/runtime/store/context/promoted-evidence-reader.js +15 -1
- package/core/dist/runtime/store/context/promoted-evidence-reader.js.map +1 -1
- package/core/dist/runtime/store/context/sqlite-context-assembler.d.ts +22 -0
- package/core/dist/runtime/store/context/sqlite-context-assembler.d.ts.map +1 -1
- package/core/dist/runtime/store/context/sqlite-context-assembler.js +153 -3
- package/core/dist/runtime/store/context/sqlite-context-assembler.js.map +1 -1
- package/core/dist/runtime/store/context/trajectory-turn-reader.d.ts +13 -0
- package/core/dist/runtime/store/context/trajectory-turn-reader.d.ts.map +1 -1
- package/core/dist/runtime/store/lifecycle/lease-manager.d.ts +15 -0
- package/core/dist/runtime/store/lifecycle/lease-manager.d.ts.map +1 -1
- package/core/dist/runtime/store/lifecycle/lease-manager.js +16 -1
- package/core/dist/runtime/store/lifecycle/lease-manager.js.map +1 -1
- package/core/dist/runtime/store/runtime-state-manager.d.ts +2 -0
- package/core/dist/runtime/store/runtime-state-manager.d.ts.map +1 -1
- package/core/dist/runtime/store/runtime-state-manager.js.map +1 -1
- package/core/dist/runtime/store/task/memory-task-store.d.ts +1 -0
- package/core/dist/runtime/store/task/memory-task-store.d.ts.map +1 -1
- package/core/dist/runtime/store/task/memory-task-store.js +37 -0
- package/core/dist/runtime/store/task/memory-task-store.js.map +1 -1
- package/core/dist/runtime/store/task/sqlite-task-store.d.ts +10 -0
- package/core/dist/runtime/store/task/sqlite-task-store.d.ts.map +1 -1
- package/core/dist/runtime/store/task/sqlite-task-store.js +20 -0
- package/core/dist/runtime/store/task/sqlite-task-store.js.map +1 -1
- package/core/dist/runtime/store/task/task-store.d.ts +16 -0
- package/core/dist/runtime/store/task/task-store.d.ts.map +1 -1
- package/core/dist/runtime/task-status.d.ts +13 -0
- package/core/dist/runtime/task-status.d.ts.map +1 -1
- package/core/dist/runtime/task-status.js +9 -0
- package/core/dist/runtime/task-status.js.map +1 -1
- package/core/dist/runtime/types/evidence-chain-contract.d.ts +10 -0
- package/core/dist/runtime/types/evidence-chain-contract.d.ts.map +1 -1
- package/core/dist/runtime/types/evidence-chain-contract.js +7 -0
- package/core/dist/runtime/types/evidence-chain-contract.js.map +1 -1
- package/core/package.json +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +11 -0
- package/dist/index.js.map +1 -1
- package/dist/installer.d.ts.map +1 -1
- package/dist/installer.js +77 -30
- package/dist/installer.js.map +1 -1
- package/dist/installers/mcp-registration-conflict.d.ts +8 -0
- package/dist/installers/mcp-registration-conflict.d.ts.map +1 -1
- package/dist/installers/mcp-registration-conflict.js +34 -1
- package/dist/installers/mcp-registration-conflict.js.map +1 -1
- package/dist/installers/workbuddy-host-installer.d.ts +45 -13
- package/dist/installers/workbuddy-host-installer.d.ts.map +1 -1
- package/dist/installers/workbuddy-host-installer.js +284 -21
- package/dist/installers/workbuddy-host-installer.js.map +1 -1
- package/dist/prompts.d.ts +11 -0
- package/dist/prompts.d.ts.map +1 -1
- package/dist/prompts.js +4 -0
- package/dist/prompts.js.map +1 -1
- package/dist/service-host-bridge.d.ts +67 -0
- package/dist/service-host-bridge.d.ts.map +1 -0
- package/dist/service-host-bridge.js +292 -0
- package/dist/service-host-bridge.js.map +1 -0
- package/dist/uninstaller.d.ts.map +1 -1
- package/dist/uninstaller.js +26 -0
- package/dist/uninstaller.js.map +1 -1
- package/dist/update/install-layout.d.ts +0 -12
- package/dist/update/install-layout.d.ts.map +1 -1
- package/dist/update/install-layout.js +42 -15
- package/dist/update/install-layout.js.map +1 -1
- package/host-runtime/dist/diagnostician-auto-run.js +4 -1
- package/host-runtime/dist/governance-observation-store.d.ts +7 -0
- package/host-runtime/dist/governance-observation-store.js +15 -4
- package/host-runtime/dist/governance-signal-admission.d.ts +49 -0
- package/host-runtime/dist/governance-signal-admission.js +355 -94
- package/host-runtime/dist/governance-trajectory-turn-reader.d.ts +20 -4
- package/host-runtime/dist/governance-trajectory-turn-reader.js +77 -5
- package/host-runtime/dist/index.d.ts +2 -0
- package/host-runtime/dist/index.js +5 -0
- package/host-runtime/dist/internalization-consumer-cycle.js +4 -1
- package/host-runtime/dist/pd-config.d.ts +10 -0
- package/host-runtime/dist/pd-config.js +37 -0
- package/host-runtime/dist/signal-stage2-cycle.js +28 -1
- package/host-runtime/dist/source-material-authorization.d.ts +53 -0
- package/host-runtime/dist/source-material-authorization.js +67 -0
- package/host-runtime/dist/source-revocation-sweep.d.ts +172 -0
- package/host-runtime/dist/source-revocation-sweep.js +928 -0
- package/host-runtime/package.json +5 -1
- package/install-layout/dist/background-execution-transition.d.ts +258 -0
- package/install-layout/dist/background-execution-transition.js +836 -0
- package/install-layout/dist/index.d.ts +8 -0
- package/install-layout/dist/index.js +8 -0
- package/install-layout/package.json +6 -2
- package/package.json +7 -6
- package/pd-cli/dist/commands/candidate.d.ts.map +1 -1
- package/pd-cli/dist/commands/candidate.js +16 -5
- package/pd-cli/dist/commands/candidate.js.map +1 -1
- package/pd-cli/dist/commands/codex-setup.d.ts.map +1 -1
- package/pd-cli/dist/commands/codex-setup.js +17 -1
- package/pd-cli/dist/commands/codex-setup.js.map +1 -1
- package/pd-cli/dist/commands/codex-worker.d.ts.map +1 -1
- package/pd-cli/dist/commands/codex-worker.js +8 -4
- package/pd-cli/dist/commands/codex-worker.js.map +1 -1
- package/pd-cli/dist/commands/consent-sweep-revoked.d.ts +20 -0
- package/pd-cli/dist/commands/consent-sweep-revoked.d.ts.map +1 -0
- package/pd-cli/dist/commands/consent-sweep-revoked.js +85 -0
- package/pd-cli/dist/commands/consent-sweep-revoked.js.map +1 -0
- package/pd-cli/dist/commands/console.d.ts.map +1 -1
- package/pd-cli/dist/commands/console.js +9 -0
- package/pd-cli/dist/commands/console.js.map +1 -1
- package/pd-cli/dist/commands/context.d.ts.map +1 -1
- package/pd-cli/dist/commands/context.js +9 -1
- package/pd-cli/dist/commands/context.js.map +1 -1
- package/pd-cli/dist/commands/diagnose.d.ts.map +1 -1
- package/pd-cli/dist/commands/diagnose.js +12 -6
- package/pd-cli/dist/commands/diagnose.js.map +1 -1
- package/pd-cli/dist/commands/health-console.d.ts +1 -1
- package/pd-cli/dist/commands/health-console.d.ts.map +1 -1
- package/pd-cli/dist/commands/health-console.js +15 -1
- package/pd-cli/dist/commands/health-console.js.map +1 -1
- package/pd-cli/dist/commands/health.d.ts.map +1 -1
- package/pd-cli/dist/commands/health.js +7 -1
- package/pd-cli/dist/commands/health.js.map +1 -1
- package/pd-cli/dist/commands/openclaw-worker.d.ts +11 -0
- package/pd-cli/dist/commands/openclaw-worker.d.ts.map +1 -0
- package/pd-cli/dist/commands/openclaw-worker.js +199 -0
- package/pd-cli/dist/commands/openclaw-worker.js.map +1 -0
- package/pd-cli/dist/commands/pain-explicit.d.ts.map +1 -1
- package/pd-cli/dist/commands/pain-explicit.js +1 -0
- package/pd-cli/dist/commands/pain-explicit.js.map +1 -1
- package/pd-cli/dist/commands/pain-recall.d.ts +2 -2
- package/pd-cli/dist/commands/pain-recall.d.ts.map +1 -1
- package/pd-cli/dist/commands/pain-recall.js +7 -1
- package/pd-cli/dist/commands/pain-recall.js.map +1 -1
- package/pd-cli/dist/commands/pain-retry.d.ts.map +1 -1
- package/pd-cli/dist/commands/pain-retry.js +12 -6
- package/pd-cli/dist/commands/pain-retry.js.map +1 -1
- package/pd-cli/dist/commands/runtime-internalization-enqueue-successors.d.ts.map +1 -1
- package/pd-cli/dist/commands/runtime-internalization-enqueue-successors.js +2 -1
- package/pd-cli/dist/commands/runtime-internalization-enqueue-successors.js.map +1 -1
- package/pd-cli/dist/commands/runtime-internalization-run-once.d.ts +1 -0
- package/pd-cli/dist/commands/runtime-internalization-run-once.d.ts.map +1 -1
- package/pd-cli/dist/commands/runtime-internalization-run-once.js +32 -8
- package/pd-cli/dist/commands/runtime-internalization-run-once.js.map +1 -1
- package/pd-cli/dist/commands/runtime-internalization-wake-once.d.ts.map +1 -1
- package/pd-cli/dist/commands/runtime-internalization-wake-once.js +2 -1
- package/pd-cli/dist/commands/runtime-internalization-wake-once.js.map +1 -1
- package/pd-cli/dist/commands/service-handover.d.ts +12 -0
- package/pd-cli/dist/commands/service-handover.d.ts.map +1 -0
- package/pd-cli/dist/commands/service-handover.js +117 -0
- package/pd-cli/dist/commands/service-handover.js.map +1 -0
- package/pd-cli/dist/commands/service-lifecycle.d.ts +31 -0
- package/pd-cli/dist/commands/service-lifecycle.d.ts.map +1 -0
- package/pd-cli/dist/commands/service-lifecycle.js +207 -0
- package/pd-cli/dist/commands/service-lifecycle.js.map +1 -0
- package/pd-cli/dist/commands/service-run-once.d.ts +96 -0
- package/pd-cli/dist/commands/service-run-once.d.ts.map +1 -1
- package/pd-cli/dist/commands/service-run-once.js +432 -13
- package/pd-cli/dist/commands/service-run-once.js.map +1 -1
- package/pd-cli/dist/commands/workbuddy-setup.d.ts.map +1 -1
- package/pd-cli/dist/commands/workbuddy-setup.js +22 -2
- package/pd-cli/dist/commands/workbuddy-setup.js.map +1 -1
- package/pd-cli/dist/program.d.ts.map +1 -1
- package/pd-cli/dist/program.js +167 -9
- package/pd-cli/dist/program.js.map +1 -1
- package/pd-cli/dist/services/admission-write-gate.d.ts +3 -1
- package/pd-cli/dist/services/admission-write-gate.d.ts.map +1 -1
- package/pd-cli/dist/services/admission-write-gate.js +1 -0
- package/pd-cli/dist/services/admission-write-gate.js.map +1 -1
- package/pd-cli/dist/services/console-launcher.d.ts +93 -1
- package/pd-cli/dist/services/console-launcher.d.ts.map +1 -1
- package/pd-cli/dist/services/console-launcher.js +375 -10
- package/pd-cli/dist/services/console-launcher.js.map +1 -1
- package/pd-cli/dist/services/service-host/coordinator-common.d.ts +49 -0
- package/pd-cli/dist/services/service-host/coordinator-common.d.ts.map +1 -0
- package/pd-cli/dist/services/service-host/coordinator-common.js +158 -0
- package/pd-cli/dist/services/service-host/coordinator-common.js.map +1 -0
- package/pd-cli/dist/services/service-host/handover-claims.d.ts +14 -0
- package/pd-cli/dist/services/service-host/handover-claims.d.ts.map +1 -0
- package/pd-cli/dist/services/service-host/handover-claims.js +50 -0
- package/pd-cli/dist/services/service-host/handover-claims.js.map +1 -0
- package/pd-cli/dist/services/service-host/index.d.ts +19 -3
- package/pd-cli/dist/services/service-host/index.d.ts.map +1 -1
- package/pd-cli/dist/services/service-host/index.js +21 -3
- package/pd-cli/dist/services/service-host/index.js.map +1 -1
- package/pd-cli/dist/services/service-host/install-identity.d.ts +23 -3
- package/pd-cli/dist/services/service-host/install-identity.d.ts.map +1 -1
- package/pd-cli/dist/services/service-host/install-identity.js +15 -5
- package/pd-cli/dist/services/service-host/install-identity.js.map +1 -1
- package/pd-cli/dist/services/service-host/locking/service-run-lock.d.ts +130 -9
- package/pd-cli/dist/services/service-host/locking/service-run-lock.d.ts.map +1 -1
- package/pd-cli/dist/services/service-host/locking/service-run-lock.js +99 -19
- package/pd-cli/dist/services/service-host/locking/service-run-lock.js.map +1 -1
- package/pd-cli/dist/services/service-host/managed-run.d.ts +75 -0
- package/pd-cli/dist/services/service-host/managed-run.d.ts.map +1 -0
- package/pd-cli/dist/services/service-host/managed-run.js +550 -0
- package/pd-cli/dist/services/service-host/managed-run.js.map +1 -0
- package/pd-cli/dist/services/service-host/progress-evidence.d.ts +38 -0
- package/pd-cli/dist/services/service-host/progress-evidence.d.ts.map +1 -0
- package/pd-cli/dist/services/service-host/progress-evidence.js +155 -0
- package/pd-cli/dist/services/service-host/progress-evidence.js.map +1 -0
- package/pd-cli/dist/services/service-host/run-once.d.ts.map +1 -1
- package/pd-cli/dist/services/service-host/run-once.js +4 -136
- package/pd-cli/dist/services/service-host/run-once.js.map +1 -1
- package/pd-cli/dist/services/service-host/scheduler/contract.d.ts +184 -0
- package/pd-cli/dist/services/service-host/scheduler/contract.d.ts.map +1 -0
- package/pd-cli/dist/services/service-host/scheduler/contract.js +86 -0
- package/pd-cli/dist/services/service-host/scheduler/contract.js.map +1 -0
- package/pd-cli/dist/services/service-host/scheduler/index.d.ts +76 -0
- package/pd-cli/dist/services/service-host/scheduler/index.d.ts.map +1 -0
- package/pd-cli/dist/services/service-host/scheduler/index.js +128 -0
- package/pd-cli/dist/services/service-host/scheduler/index.js.map +1 -0
- package/pd-cli/dist/services/service-host/scheduler/linux.d.ts +27 -0
- package/pd-cli/dist/services/service-host/scheduler/linux.d.ts.map +1 -0
- package/pd-cli/dist/services/service-host/scheduler/linux.js +1010 -0
- package/pd-cli/dist/services/service-host/scheduler/linux.js.map +1 -0
- package/pd-cli/dist/services/service-host/scheduler/macos.d.ts +13 -0
- package/pd-cli/dist/services/service-host/scheduler/macos.d.ts.map +1 -0
- package/pd-cli/dist/services/service-host/scheduler/macos.js +819 -0
- package/pd-cli/dist/services/service-host/scheduler/macos.js.map +1 -0
- package/pd-cli/dist/services/service-host/scheduler/runtime-io.d.ts +13 -0
- package/pd-cli/dist/services/service-host/scheduler/runtime-io.d.ts.map +1 -0
- package/pd-cli/dist/services/service-host/scheduler/runtime-io.js +141 -0
- package/pd-cli/dist/services/service-host/scheduler/runtime-io.js.map +1 -0
- package/pd-cli/dist/services/service-host/scheduler/service-status.d.ts +99 -0
- package/pd-cli/dist/services/service-host/scheduler/service-status.d.ts.map +1 -0
- package/pd-cli/dist/services/service-host/scheduler/service-status.js +202 -0
- package/pd-cli/dist/services/service-host/scheduler/service-status.js.map +1 -0
- package/pd-cli/dist/services/service-host/scheduler/windows.d.ts +40 -0
- package/pd-cli/dist/services/service-host/scheduler/windows.d.ts.map +1 -0
- package/pd-cli/dist/services/service-host/scheduler/windows.js +688 -0
- package/pd-cli/dist/services/service-host/scheduler/windows.js.map +1 -0
- package/pd-cli/dist/services/service-host/shadow-progress-store.d.ts +43 -0
- package/pd-cli/dist/services/service-host/shadow-progress-store.d.ts.map +1 -0
- package/pd-cli/dist/services/service-host/shadow-progress-store.js +156 -0
- package/pd-cli/dist/services/service-host/shadow-progress-store.js.map +1 -0
- package/pd-cli/dist/services/service-host/shadow-run.d.ts +87 -0
- package/pd-cli/dist/services/service-host/shadow-run.d.ts.map +1 -0
- package/pd-cli/dist/services/service-host/shadow-run.js +549 -0
- package/pd-cli/dist/services/service-host/shadow-run.js.map +1 -0
- package/pd-cli/dist/services/service-host/status/service-run-status.d.ts +114 -4
- package/pd-cli/dist/services/service-host/status/service-run-status.d.ts.map +1 -1
- package/pd-cli/dist/services/service-host/status/service-run-status.js +37 -0
- package/pd-cli/dist/services/service-host/status/service-run-status.js.map +1 -1
- package/pd-cli/dist/services/service-host/worker-adapter-codex.d.ts +2 -0
- package/pd-cli/dist/services/service-host/worker-adapter-codex.d.ts.map +1 -0
- package/pd-cli/dist/services/service-host/worker-adapter-codex.js +76 -0
- package/pd-cli/dist/services/service-host/worker-adapter-codex.js.map +1 -0
- package/pd-cli/dist/services/service-host/worker-adapter-openclaw.d.ts +2 -0
- package/pd-cli/dist/services/service-host/worker-adapter-openclaw.d.ts.map +1 -0
- package/pd-cli/dist/services/service-host/worker-adapter-openclaw.js +49 -0
- package/pd-cli/dist/services/service-host/worker-adapter-openclaw.js.map +1 -0
- package/pd-cli/dist/services/service-host/worker-adapter-workbuddy.d.ts +2 -0
- package/pd-cli/dist/services/service-host/worker-adapter-workbuddy.d.ts.map +1 -0
- package/pd-cli/dist/services/service-host/worker-adapter-workbuddy.js +36 -0
- package/pd-cli/dist/services/service-host/worker-adapter-workbuddy.js.map +1 -0
- package/pd-cli/dist/services/service-host/worker-adapter.d.ts +187 -0
- package/pd-cli/dist/services/service-host/worker-adapter.d.ts.map +1 -0
- package/pd-cli/dist/services/service-host/worker-adapter.js +609 -0
- package/pd-cli/dist/services/service-host/worker-adapter.js.map +1 -0
- package/pd-cli/dist/services/service-host/worker-env.d.ts +84 -0
- package/pd-cli/dist/services/service-host/worker-env.d.ts.map +1 -0
- package/pd-cli/dist/services/service-host/worker-env.js +195 -0
- package/pd-cli/dist/services/service-host/worker-env.js.map +1 -0
- package/pd-cli/dist/services/service-host/worker-process.d.ts +75 -0
- package/pd-cli/dist/services/service-host/worker-process.d.ts.map +1 -0
- package/pd-cli/dist/services/service-host/worker-process.js +225 -0
- package/pd-cli/dist/services/service-host/worker-process.js.map +1 -0
- package/pd-cli/dist/services/service-host/workspace-dispatch.d.ts +61 -0
- package/pd-cli/dist/services/service-host/workspace-dispatch.d.ts.map +1 -0
- package/pd-cli/dist/services/service-host/workspace-dispatch.js +105 -0
- package/pd-cli/dist/services/service-host/workspace-dispatch.js.map +1 -0
- package/pd-cli/dist/services/service-host/workspace-handover.d.ts +190 -0
- package/pd-cli/dist/services/service-host/workspace-handover.d.ts.map +1 -0
- package/pd-cli/dist/services/service-host/workspace-handover.js +1393 -0
- package/pd-cli/dist/services/service-host/workspace-handover.js.map +1 -0
- package/pd-cli/package.json +6 -5
- package/pd-mcp-server/dist/submit-assembly.js +159 -42
- package/pd-mcp-server/dist/version.d.ts +1 -1
- package/pd-mcp-server/dist/version.js +1 -1
- package/pd-mcp-server/package.json +1 -1
- package/plugin/dist/bundle.js +662 -637
- package/plugin/dist/openclaw-worker.d.ts +92 -0
- package/plugin/dist/openclaw-worker.js +2446 -0
- package/plugin/dist/openclaw.plugin.json +1 -1
- package/plugin/dist/service/gateway-consumer-lease.d.ts +142 -0
- package/plugin/dist/service/gateway-quiesce-ack.d.ts +40 -0
- package/plugin/dist/service/internalization-auto-consumer-service.d.ts +68 -1
- package/plugin/openclaw.plugin.json +1 -1
- package/plugin/package.json +5 -1
- package/release-manager/dist/installer.js +77 -30
- package/release-manager/dist/installers/mcp-registration-conflict.js +34 -1
- package/release-manager/dist/installers/workbuddy-host-installer.js +284 -21
- package/release-manager/dist/service-host-bridge.js +292 -0
- package/release-manager/dist/update/install-layout.js +42 -15
- package/release-manager/package.json +5 -4
- package/workbuddy-adapter/dist/index.d.ts +1 -1
- package/workbuddy-adapter/dist/index.js +1 -1
- package/workbuddy-adapter/dist/worker/workspace-worker.d.ts +7 -0
- package/workbuddy-adapter/dist/worker/workspace-worker.js +179 -10
- package/workbuddy-adapter/package.json +1 -1
- package/workbuddy-adapter/plugin/.codebuddy-plugin/plugin.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pain-to-principle-service.d.ts","sourceRoot":"","sources":["../../src/runtime/pain-to-principle-service.ts"],"names":[],"mappings":"AAcA,OAAO,KAAK,EAAE,gBAAgB,EAA0B,cAAc,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AACrK,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AAEtE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAC3D,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AAErE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,oCAAoC,CAAC;AAC1E,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AACtF,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAE5D,MAAM,MAAM,eAAe,GACvB,qBAAqB,GACrB,gBAAgB,GAChB,iBAAiB,GACjB,gBAAgB,GAChB,kBAAkB,GAClB,qBAAqB,GACrB,mBAAmB;AACrB;;;;GAIG;GACD,qBAAqB,CAAC;AAI1B,MAAM,WAAW,6BAA6B;IAC5C,YAAY,EAAE,MAAM,CAAC;IACrB,QAAQ,EAAE,MAAM,CAAC;IACjB,aAAa,EAAE,aAAa,CAAC;IAC7B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B;;2DAEuD;IACvD,eAAe,CAAC,EAAE,iBAAiB,CAAC;IACpC,+EAA+E;IAC/E,SAAS,CAAC,EAAE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AC;IACpB,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,cAAc,EAAE,MAAM,EAAE,CAAC;IACzB,gBAAgB,CAAC,EAAE;QACjB,WAAW,EAAE,MAAM,CAAC;QACpB,kBAAkB,EAAE,MAAM,CAAC;QAC3B,SAAS,EAAE;YAAE,QAAQ,EAAE,MAAM,CAAC;YAAC,MAAM,EAAE,MAAM,CAAC;YAAC,UAAU,EAAE,MAAM,CAAC;YAAC,cAAc,EAAE,MAAM,CAAA;SAAE,CAAC;KAC7F,EAAE,CAAC;IACJ,gEAAgE;IAChE,QAAQ,CAAC,EAAE,kBAAkB,CAAC;IAC9B,gFAAgF;IAChF,iBAAiB,CAAC,EAAE,oBAAoB,EAAE,CAAC;IAC3C,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,qBAAqB,EAAE,MAAM,EAAE,CAAC;IAChC,eAAe,CAAC,EAAE,eAAe,CAAC;IAClC,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAmCD,qBAAa,sBAAsB;IACjC,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAgC;IAErD,YAAY,IAAI,EAAE,6BAA6B,EAE9C;IAEK,UAAU,CAAC,KAAK,EAAE,oBAAoB,GAAG,OAAO,CAAC,qBAAqB,CAAC,CA2K5E;CACF"}
|
|
@@ -79,6 +79,7 @@ export class PainToPrincipleService {
|
|
|
79
79
|
painIngress: input.painIngress,
|
|
80
80
|
...(input.deviationAnchor ? { deviationAnchor: input.deviationAnchor } : {}),
|
|
81
81
|
...(input.anchor ? { anchor: input.anchor } : {}),
|
|
82
|
+
...(input.admissionDisposition ? { admissionDisposition: input.admissionDisposition } : {}),
|
|
82
83
|
};
|
|
83
84
|
// SPEC §9.6: B-class authorization is enforced BEFORE the submission
|
|
84
85
|
// chain — ahead of the async pending-task persist AND the synchronous
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pain-to-principle-service.js","sourceRoot":"","sources":["../../src/runtime/pain-to-principle-service.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,OAAO,EAAE,sBAAsB,EAAE,MAAM,kCAAkC,CAAC;AAC1E,OAAO,EAAE,6BAA6B,EAAE,MAAM,gCAAgC,CAAC;AAC/E,OAAO,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAC7D,OAAO,EAAE,yBAAyB,EAAE,eAAe,EAAE,wBAAwB,EAAE,MAAM,yBAAyB,CAAC;AAC/G,OAAO,EAAE,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;AAGvE,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAGvD,OAAO,EAAE,8BAA8B,EAAE,MAAM,+BAA+B,CAAC;
|
|
1
|
+
{"version":3,"file":"pain-to-principle-service.js","sourceRoot":"","sources":["../../src/runtime/pain-to-principle-service.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,OAAO,EAAE,sBAAsB,EAAE,MAAM,kCAAkC,CAAC;AAC1E,OAAO,EAAE,6BAA6B,EAAE,MAAM,gCAAgC,CAAC;AAC/E,OAAO,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAC7D,OAAO,EAAE,yBAAyB,EAAE,eAAe,EAAE,wBAAwB,EAAE,MAAM,yBAAyB,CAAC;AAC/G,OAAO,EAAE,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;AAGvE,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAGvD,OAAO,EAAE,8BAA8B,EAAE,MAAM,+BAA+B,CAAC;AAyH/E,8EAA8E;AAE9E,SAAS,kBAAkB,CAAC,MAA8B;IACxD,2EAA2E;IAC3E,4DAA4D;IAC5D,uEAAuE;IACvE,yDAAyD;IACzD,IAAI,MAAM,CAAC,aAAa,KAAK,oBAAoB,IAAI,MAAM,CAAC,UAAU,KAAK,SAAS,EAAE,CAAC;QACrF,OAAO,qBAAqB,CAAC;IAC/B,CAAC;IACD,IAA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oEAAoE;gBACpE,8DAA8D;gBAC9D,sEAAsE;gBACtE,qBAAqB,EAAE;oBACrB,GAAG,CAAC,YAAY,CAAC,qBAAqB,IAAI,EAAE,CAAC;oBAC7C,GAAG,qBAAqB;iBACzB;gBACD,qEAAqE;gBACrE,uEAAuE;gBACvE,wEAAwE;gBACxE,qEAAqE;gBACrE,gEAAgE;gBAChE,eAAe,EAAE,kBAAkB,CAAC,YAAY,CAAC;gBACjD,GAAG,CAAC,YAAY,CAAC,UAAU,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,UAAU,EAAE,YAAY,CAAC,UAAU,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;gBACzF,SAAS;aACV,CAAC;QACJ,CAAC;QAAC,OAAO,GAAY,EAAE,CAAC;YACtB,MAAM,SAAS,GAAG,IAAI,CAAC,GAAG,EAAE,GAAG,SAAS,CAAC;YACzC,OAAO;gBACL,MAAM,EAAE,QAAQ;gBAChB,MAAM;gBACN,MAAM;gBACN,YAAY,EAAE,EAAE;gBAChB,cAAc,EAAE,EAAE;gBAClB,OAAO,EAAE,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC;gBACzD,qBAAqB,EAAE,EAAE;gBACzB,wEAAwE;gBACxE,qEAAqE;gBACrE,0DAA0D;gBAC1D,eAAe,EAAE,iBAAiB,CAAC,GAAG,CAAC;gBACvC,SAAS;aACV,CAAC;QACJ,CAAC;IACH,CAAC;CACF"}
|
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Source-material authorization — PRI-1283 R2 shared gate (SPEC-PD-FEEDBACK
|
|
3
|
+
* RESILIENCE-001 TECH §2.2).
|
|
4
|
+
*
|
|
5
|
+
* One authorization question, asked identically at every consumption entry
|
|
6
|
+
* point: "may material sourced from host H's consent-gated conversation
|
|
7
|
+
* ingestion still be read RIGHT NOW?"
|
|
8
|
+
*
|
|
9
|
+
* Authority model (P4 — one source of truth):
|
|
10
|
+
* - The DECISION authority is the conversation-ingestion consent ledger v3
|
|
11
|
+
* file (`<workspace>/.state/conversation-ingestion-consent.json`), owned
|
|
12
|
+
* by `@principles/host-runtime` `conversation-ingestion/consent.ts`.
|
|
13
|
+
* - This module defines the PORT (pure interface) plus the pure helpers that
|
|
14
|
+
* map `sourceRef` strings onto host kinds and filter evidence entries.
|
|
15
|
+
* Core read paths (context assembly, diagnosis runners, recall) consume
|
|
16
|
+
* the port; host-runtime supplies the ledger-backed implementation at the
|
|
17
|
+
* composition roots. Core never parses the ledger file itself.
|
|
18
|
+
*
|
|
19
|
+
* Fail-closed posture (R2, TECH §2.2.1):
|
|
20
|
+
* - A port is consulted PER CALL — never cached — so a revocation recorded
|
|
21
|
+
* between two reads takes effect on the next call ("缓存命中时撤回 → 不得
|
|
22
|
+
* 返回旧缓存内容").
|
|
23
|
+
* - When NO port is wired, governance-sourced material is DENIED
|
|
24
|
+
* (`denyAllSourceMaterialAuthorization`): consuming consent-gated
|
|
25
|
+
* excerpts without an authorization check is exactly the R2 gap; the
|
|
26
|
+
* default must not silently re-open it. Non-governance refs
|
|
27
|
+
* (`owner_reported:`, `candidate://`, openclaw inline refs, …) are not
|
|
28
|
+
* governed by the conversation-ingestion consent ledger and remain
|
|
29
|
+
* usable.
|
|
30
|
+
*
|
|
31
|
+
* sourceRef → host mapping (Evidence Over Assumption — the two producers in
|
|
32
|
+
* this repository are codex-adapter and workbuddy-adapter ingestion):
|
|
33
|
+
* - `governance_observation:codex|<rollout>|<turn>|<kind>` → 'codex'
|
|
34
|
+
* - `governance_observation:wb|<sessionIdentity>|<recordId>` → 'workbuddy'
|
|
35
|
+
* - `governance_observation:<anything else>` → unknown host: DENIED (the ref
|
|
36
|
+
* CLAIMS governance origin; an unparseable origin cannot become a grant).
|
|
37
|
+
* - any other prefix → null (not consent-gated by this ledger).
|
|
38
|
+
*/
|
|
39
|
+
/** Host kinds whose conversation ingestion is governed by the consent ledger. */
|
|
40
|
+
export type SourceMaterialHostKind = 'codex' | 'workbuddy' | 'openclaw';
|
|
41
|
+
/** Structured denial reason (stable IDs, rc-9). */
|
|
42
|
+
export type SourceMaterialDenialReason = 'consent_revoked' | 'consent_not_granted' | 'consent_missing' | 'consent_unreadable' | 'authorization_unavailable';
|
|
43
|
+
export type SourceAuthorizationState = {
|
|
44
|
+
readonly authorized: true;
|
|
45
|
+
} | {
|
|
46
|
+
readonly authorized: false;
|
|
47
|
+
readonly reason: SourceMaterialDenialReason;
|
|
48
|
+
readonly detail?: string;
|
|
49
|
+
};
|
|
50
|
+
/**
|
|
51
|
+
* The R2 port. Implementations MUST read the latest consent state on every
|
|
52
|
+
* call — a captured/cached decision re-serves a pre-revocation answer, which
|
|
53
|
+
* is the exact bug class this gate exists to close.
|
|
54
|
+
*/
|
|
55
|
+
export interface SourceMaterialAuthorizationPort {
|
|
56
|
+
isHostSourceMaterialAuthorized(hostKind: SourceMaterialHostKind): SourceAuthorizationState;
|
|
57
|
+
}
|
|
58
|
+
/** Fail-closed default used when no port is wired: every host is denied. */
|
|
59
|
+
export declare const denyAllSourceMaterialAuthorization: SourceMaterialAuthorizationPort;
|
|
60
|
+
/** The one sourceRef prefix produced by consent-gated governance ingestion. */
|
|
61
|
+
export declare const GOVERNANCE_OBSERVATION_SOURCE_REF_PREFIX = "governance_observation:";
|
|
62
|
+
/**
|
|
63
|
+
* Correction-evidence channels where the channel ITSELF is the credible
|
|
64
|
+
* Owner record — the text was read from the Owner's own input by the host
|
|
65
|
+
* (prefix entries), typed by the Owner on a manual entry, or recorded as a
|
|
66
|
+
* manual OpenClaw pain. `codex_explicit_agent` is deliberately absent: it is
|
|
67
|
+
* model-transcribed text and requires a bound confirmation record instead
|
|
68
|
+
* ({@link isOwnerManualCorrectionEvidence}).
|
|
69
|
+
*/
|
|
70
|
+
export declare const OWNER_EXPLICIT_CORRECTION_CHANNELS: readonly string[];
|
|
71
|
+
/**
|
|
72
|
+
* Does this correction-evidence channel mark an explicit Owner submission?
|
|
73
|
+
* Unknown/non-string channels are NOT owner-explicit (fail toward the
|
|
74
|
+
* consent-gated reading — directive B3: unattributable is never a grant).
|
|
75
|
+
*/
|
|
76
|
+
export declare function isOwnerExplicitCorrectionChannel(channel: unknown): boolean;
|
|
77
|
+
/**
|
|
78
|
+
* The `ownerConfirmation.kind` the registration path stamps on an
|
|
79
|
+
* agent-assisted statement ONLY after verifying the submitted text appears
|
|
80
|
+
* verbatim in the current turn's host transcript — the trusted Owner
|
|
81
|
+
* interaction record. `statementFingerprint` is sha256 of the PERSISTED
|
|
82
|
+
* (sanitized) text, binding the confirmation to the final submitted content:
|
|
83
|
+
* a confirmation recorded for different text, or text altered afterwards,
|
|
84
|
+
* never matches.
|
|
85
|
+
*/
|
|
86
|
+
export declare const OWNER_VERBATIM_CONFIRMATION_KIND = "owner_verbatim_turn_match";
|
|
87
|
+
/**
|
|
88
|
+
* The ONE Owner-statement judgment (owner_manual vs Agent-derived): is this
|
|
89
|
+
* persisted correction evidence credibly Owner-authored — an Owner act that
|
|
90
|
+
* survives a consent revocation?
|
|
91
|
+
*
|
|
92
|
+
* - a direct-Owner channel → yes (the channel is the credible record);
|
|
93
|
+
* - `codex_explicit_agent` → yes ONLY with `classification` 'owner_statement'
|
|
94
|
+
* AND an `ownerConfirmation` of kind {@link OWNER_VERBATIM_CONFIRMATION_KIND}
|
|
95
|
+
* whose `statementFingerprint` equals the fingerprint of the persisted
|
|
96
|
+
* text (the confirmation must bind to the final submitted content);
|
|
97
|
+
* - anything else — agent-reported, unattributable, self-declared — no.
|
|
98
|
+
*/
|
|
99
|
+
export declare function isOwnerManualCorrectionEvidence(evidence: unknown): boolean;
|
|
100
|
+
/**
|
|
101
|
+
* The persisted `reason` marker produced by `correctionReason` for explicit
|
|
102
|
+
* Owner statements (admission markers and pain_events rows carry it).
|
|
103
|
+
*/
|
|
104
|
+
export declare const OWNER_EXPLICIT_STATEMENT_REASON_MARKER = "explicit owner statement";
|
|
105
|
+
/**
|
|
106
|
+
* Does this persisted pain/admission reason describe an explicit Owner
|
|
107
|
+
* statement — an Owner act that survives revocation? A reason carrying the
|
|
108
|
+
* marker but also an agent-derived qualifier (legacy agent-assisted rows, or
|
|
109
|
+
* a disclosure of unverified confirmation) is Agent-derived, not owner_manual.
|
|
110
|
+
*/
|
|
111
|
+
export declare function isOwnerExplicitStatementReason(reason: unknown): boolean;
|
|
112
|
+
export declare function isGovernanceSourceRef(sourceRef: string): boolean;
|
|
113
|
+
/**
|
|
114
|
+
* Map a sourceRef onto the host kind whose consent governs it.
|
|
115
|
+
* `null` = not governed by the conversation-ingestion consent ledger
|
|
116
|
+
* (owner-reported / candidate / openclaw inline references).
|
|
117
|
+
* `'unknown'`-shape (parse failure on a governance ref) is expressed by the
|
|
118
|
+
* caller denying via {@link governanceSourceRefHostState} instead.
|
|
119
|
+
*/
|
|
120
|
+
export declare function hostKindFromGovernanceSourceRef(sourceRef: string): SourceMaterialHostKind | null;
|
|
121
|
+
/**
|
|
122
|
+
* Authorization decision for ONE evidence sourceRef:
|
|
123
|
+
* - `not_governed` → the ref is outside the consent ledger's scope;
|
|
124
|
+
* - `{ state }` → the governing host's live authorization state.
|
|
125
|
+
*/
|
|
126
|
+
export type SourceRefAuthorization = {
|
|
127
|
+
readonly governed: false;
|
|
128
|
+
} | {
|
|
129
|
+
readonly governed: true;
|
|
130
|
+
readonly hostKind: SourceMaterialHostKind | null;
|
|
131
|
+
readonly state: SourceAuthorizationState;
|
|
132
|
+
};
|
|
133
|
+
export declare function authorizeSourceRef(sourceRef: string, port: SourceMaterialAuthorizationPort): SourceRefAuthorization;
|
|
134
|
+
/** Minimal structural shape shared by every persisted evidence entry. */
|
|
135
|
+
export interface EvidenceEntryLike {
|
|
136
|
+
readonly sourceRef: string;
|
|
137
|
+
readonly note: string;
|
|
138
|
+
}
|
|
139
|
+
export interface EvidenceAuthorizationFilterResult<E extends EvidenceEntryLike> {
|
|
140
|
+
/** Entries whose sources remain authorized (or were never governed). */
|
|
141
|
+
readonly kept: readonly E[];
|
|
142
|
+
/** Entries removed because their governing host's consent is not granted. */
|
|
143
|
+
readonly removed: readonly E[];
|
|
144
|
+
/** Distinct denial reasons encountered (for structured notes/telemetry). */
|
|
145
|
+
readonly denialReasons: readonly SourceMaterialDenialReason[];
|
|
146
|
+
}
|
|
147
|
+
/**
|
|
148
|
+
* Pure evidence filter — the one judgment every consumer reuses. Never throws
|
|
149
|
+
* on malformed entries: a non-string/empty sourceRef is not a governance ref,
|
|
150
|
+
* so the entry is treated as not governed (persisted shapes are untrusted,
|
|
151
|
+
* rc-1/rc-2 — the schema boundary still validates on write).
|
|
152
|
+
*/
|
|
153
|
+
export declare function filterEvidenceByAuthorization<E extends EvidenceEntryLike>(entries: readonly E[], port: SourceMaterialAuthorizationPort): EvidenceAuthorizationFilterResult<E>;
|
|
154
|
+
/**
|
|
155
|
+
* Model-boundary assertion (TECH §2.2 ruling 5): does this list of sourceRefs
|
|
156
|
+
* still contain governed-but-unauthorized material? Used for the LAST check
|
|
157
|
+
* between assembly and the model call — a hit means the run must be blocked,
|
|
158
|
+
* not filtered (the payload was already assembled; silently re-filtering here
|
|
159
|
+
* would hide the race instead of honoring the revocation).
|
|
160
|
+
*/
|
|
161
|
+
export declare function findUnauthorizedSourceRef(sourceRefs: readonly string[], port: SourceMaterialAuthorizationPort): {
|
|
162
|
+
sourceRef: string;
|
|
163
|
+
reason: SourceMaterialDenialReason;
|
|
164
|
+
hostKind: SourceMaterialHostKind | null;
|
|
165
|
+
} | null;
|
|
166
|
+
//# sourceMappingURL=source-material-authorization.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"source-material-authorization.d.ts","sourceRoot":"","sources":["../../src/runtime/source-material-authorization.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqCG;AAIH,iFAAiF;AACjF,MAAM,MAAM,sBAAsB,GAAG,OAAO,GAAG,WAAW,GAA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2 shared gate (SPEC-PD-FEEDBACK
|
|
3
|
+
* RESILIENCE-001 TECH §2.2).
|
|
4
|
+
*
|
|
5
|
+
* One authorization question, asked identically at every consumption entry
|
|
6
|
+
* point: "may material sourced from host H's consent-gated conversation
|
|
7
|
+
* ingestion still be read RIGHT NOW?"
|
|
8
|
+
*
|
|
9
|
+
* Authority model (P4 — one source of truth):
|
|
10
|
+
* - The DECISION authority is the conversation-ingestion consent ledger v3
|
|
11
|
+
* file (`<workspace>/.state/conversation-ingestion-consent.json`), owned
|
|
12
|
+
* by `@principles/host-runtime` `conversation-ingestion/consent.ts`.
|
|
13
|
+
* - This module defines the PORT (pure interface) plus the pure helpers that
|
|
14
|
+
* map `sourceRef` strings onto host kinds and filter evidence entries.
|
|
15
|
+
* Core read paths (context assembly, diagnosis runners, recall) consume
|
|
16
|
+
* the port; host-runtime supplies the ledger-backed implementation at the
|
|
17
|
+
* composition roots. Core never parses the ledger file itself.
|
|
18
|
+
*
|
|
19
|
+
* Fail-closed posture (R2, TECH §2.2.1):
|
|
20
|
+
* - A port is consulted PER CALL — never cached — so a revocation recorded
|
|
21
|
+
* between two reads takes effect on the next call ("缓存命中时撤回 → 不得
|
|
22
|
+
* 返回旧缓存内容").
|
|
23
|
+
* - When NO port is wired, governance-sourced material is DENIED
|
|
24
|
+
* (`denyAllSourceMaterialAuthorization`): consuming consent-gated
|
|
25
|
+
* excerpts without an authorization check is exactly the R2 gap; the
|
|
26
|
+
* default must not silently re-open it. Non-governance refs
|
|
27
|
+
* (`owner_reported:`, `candidate://`, openclaw inline refs, …) are not
|
|
28
|
+
* governed by the conversation-ingestion consent ledger and remain
|
|
29
|
+
* usable.
|
|
30
|
+
*
|
|
31
|
+
* sourceRef → host mapping (Evidence Over Assumption — the two producers in
|
|
32
|
+
* this repository are codex-adapter and workbuddy-adapter ingestion):
|
|
33
|
+
* - `governance_observation:codex|<rollout>|<turn>|<kind>` → 'codex'
|
|
34
|
+
* - `governance_observation:wb|<sessionIdentity>|<recordId>` → 'workbuddy'
|
|
35
|
+
* - `governance_observation:<anything else>` → unknown host: DENIED (the ref
|
|
36
|
+
* CLAIMS governance origin; an unparseable origin cannot become a grant).
|
|
37
|
+
* - any other prefix → null (not consent-gated by this ledger).
|
|
38
|
+
*/
|
|
39
|
+
import { fingerprintStatement } from './store/candidate/admission-document.js';
|
|
40
|
+
/** Fail-closed default used when no port is wired: every host is denied. */
|
|
41
|
+
export const denyAllSourceMaterialAuthorization = {
|
|
42
|
+
isHostSourceMaterialAuthorized: () => ({
|
|
43
|
+
authorized: false,
|
|
44
|
+
reason: 'authorization_unavailable',
|
|
45
|
+
detail: 'no source-material authorization check wired; governance-sourced material is denied (PRI-1283 R2 fail-closed default)',
|
|
46
|
+
}),
|
|
47
|
+
};
|
|
48
|
+
/** The one sourceRef prefix produced by consent-gated governance ingestion. */
|
|
49
|
+
export const GOVERNANCE_OBSERVATION_SOURCE_REF_PREFIX = 'governance_observation:';
|
|
50
|
+
// ── Owner-explicit provenance (PRI-1283 review round 2, directive B; ───────
|
|
51
|
+
// round 3: owner_manual vs Agent-derived semantics) ──────────────────────
|
|
52
|
+
//
|
|
53
|
+
// Revocation of a host's conversation-ingestion consent governs material the
|
|
54
|
+
// system COLLECTED from that host's conversations. It does NOT govern material
|
|
55
|
+
// the Owner explicitly submitted (`PD记录痛苦:` prefix, `pd pain explicit`,
|
|
56
|
+
// WorkBuddy explicit intake, `--owner-statement`, manual OpenClaw pains) —
|
|
57
|
+
// those are Owner acts, not ingestion. Every purge/read gate below must
|
|
58
|
+
// classify provenance through these helpers so all consumption entry points
|
|
59
|
+
// (sweep / recall / context assembler / console / admission) share ONE
|
|
60
|
+
// judgment instead of five (directive B2).
|
|
61
|
+
//
|
|
62
|
+
// Owner ruling (final): a statement is `owner_manual` ONLY when
|
|
63
|
+
// (a) the Owner submitted it directly — the channel itself is the credible
|
|
64
|
+
// record (the host read the Owner's prompt, or the Owner typed it on a
|
|
65
|
+
// manual entry), or
|
|
66
|
+
// (b) an agent submitted it AND a trusted Owner confirmation record bound
|
|
67
|
+
// to the exact persisted text exists (`ownerConfirmation` written by
|
|
68
|
+
// the registration path after a verbatim turn-transcript match — a
|
|
69
|
+
// field the submission API cannot self-declare).
|
|
70
|
+
// Everything else an agent produced — paraphrase, summary, inference, or a
|
|
71
|
+
// bare payload claim of Owner approval — is Agent-derived: it stays governed
|
|
72
|
+
// by the host's consent and is withheld/purged on revocation. A persisted
|
|
73
|
+
// `codex_explicit_agent` channel WITHOUT a bound confirmation is therefore
|
|
74
|
+
// never owner-exempt.
|
|
75
|
+
/**
|
|
76
|
+
* Correction-evidence channels where the channel ITSELF is the credible
|
|
77
|
+
* Owner record — the text was read from the Owner's own input by the host
|
|
78
|
+
* (prefix entries), typed by the Owner on a manual entry, or recorded as a
|
|
79
|
+
* manual OpenClaw pain. `codex_explicit_agent` is deliberately absent: it is
|
|
80
|
+
* model-transcribed text and requires a bound confirmation record instead
|
|
81
|
+
* ({@link isOwnerManualCorrectionEvidence}).
|
|
82
|
+
*/
|
|
83
|
+
export const OWNER_EXPLICIT_CORRECTION_CHANNELS = [
|
|
84
|
+
'codex_explicit_prefix',
|
|
85
|
+
'workbuddy_explicit_prefix',
|
|
86
|
+
'cli_owner_statement',
|
|
87
|
+
'openclaw_manual_pain',
|
|
88
|
+
];
|
|
89
|
+
/**
|
|
90
|
+
* Does this correction-evidence channel mark an explicit Owner submission?
|
|
91
|
+
* Unknown/non-string channels are NOT owner-explicit (fail toward the
|
|
92
|
+
* consent-gated reading — directive B3: unattributable is never a grant).
|
|
93
|
+
*/
|
|
94
|
+
export function isOwnerExplicitCorrectionChannel(channel) {
|
|
95
|
+
return typeof channel === 'string' && OWNER_EXPLICIT_CORRECTION_CHANNELS.includes(channel);
|
|
96
|
+
}
|
|
97
|
+
/**
|
|
98
|
+
* The `ownerConfirmation.kind` the registration path stamps on an
|
|
99
|
+
* agent-assisted statement ONLY after verifying the submitted text appears
|
|
100
|
+
* verbatim in the current turn's host transcript — the trusted Owner
|
|
101
|
+
* interaction record. `statementFingerprint` is sha256 of the PERSISTED
|
|
102
|
+
* (sanitized) text, binding the confirmation to the final submitted content:
|
|
103
|
+
* a confirmation recorded for different text, or text altered afterwards,
|
|
104
|
+
* never matches.
|
|
105
|
+
*/
|
|
106
|
+
export const OWNER_VERBATIM_CONFIRMATION_KIND = 'owner_verbatim_turn_match';
|
|
107
|
+
function ownField(record, key) {
|
|
108
|
+
return Object.hasOwn(record, key) ? Object.getOwnPropertyDescriptor(record, key)?.value : undefined;
|
|
109
|
+
}
|
|
110
|
+
/**
|
|
111
|
+
* The ONE Owner-statement judgment (owner_manual vs Agent-derived): is this
|
|
112
|
+
* persisted correction evidence credibly Owner-authored — an Owner act that
|
|
113
|
+
* survives a consent revocation?
|
|
114
|
+
*
|
|
115
|
+
* - a direct-Owner channel → yes (the channel is the credible record);
|
|
116
|
+
* - `codex_explicit_agent` → yes ONLY with `classification` 'owner_statement'
|
|
117
|
+
* AND an `ownerConfirmation` of kind {@link OWNER_VERBATIM_CONFIRMATION_KIND}
|
|
118
|
+
* whose `statementFingerprint` equals the fingerprint of the persisted
|
|
119
|
+
* text (the confirmation must bind to the final submitted content);
|
|
120
|
+
* - anything else — agent-reported, unattributable, self-declared — no.
|
|
121
|
+
*/
|
|
122
|
+
export function isOwnerManualCorrectionEvidence(evidence) {
|
|
123
|
+
if (typeof evidence !== 'object' || evidence === null || Array.isArray(evidence))
|
|
124
|
+
return false;
|
|
125
|
+
const record = evidence;
|
|
126
|
+
const text = ownField(record, 'text');
|
|
127
|
+
if (typeof text !== 'string' || text.length === 0)
|
|
128
|
+
return false;
|
|
129
|
+
const channel = ownField(record, 'channel');
|
|
130
|
+
if (isOwnerExplicitCorrectionChannel(channel))
|
|
131
|
+
return true;
|
|
132
|
+
if (channel !== 'codex_explicit_agent')
|
|
133
|
+
return false;
|
|
134
|
+
if (ownField(record, 'classification') !== 'owner_statement')
|
|
135
|
+
return false;
|
|
136
|
+
const confirmation = ownField(record, 'ownerConfirmation');
|
|
137
|
+
if (typeof confirmation !== 'object' || confirmation === null || Array.isArray(confirmation))
|
|
138
|
+
return false;
|
|
139
|
+
const confirmationRecord = confirmation;
|
|
140
|
+
return ownField(confirmationRecord, 'kind') === OWNER_VERBATIM_CONFIRMATION_KIND
|
|
141
|
+
&& ownField(confirmationRecord, 'statementFingerprint') === fingerprintStatement(text);
|
|
142
|
+
}
|
|
143
|
+
/**
|
|
144
|
+
* The persisted `reason` marker produced by `correctionReason` for explicit
|
|
145
|
+
* Owner statements (admission markers and pain_events rows carry it).
|
|
146
|
+
*/
|
|
147
|
+
export const OWNER_EXPLICIT_STATEMENT_REASON_MARKER = 'explicit owner statement';
|
|
148
|
+
/**
|
|
149
|
+
* Reason qualifiers that DISQUALIFY the owner-explicit marker: the legacy
|
|
150
|
+
* agent-assisted reason (`agent-assisted, no prefix`) and every reason that
|
|
151
|
+
* discloses an unverified Owner confirmation — both describe agent-derived
|
|
152
|
+
* text, never an Owner act.
|
|
153
|
+
*/
|
|
154
|
+
const AGENT_DERIVED_REASON_QUALIFIERS = [
|
|
155
|
+
'agent-assisted, no prefix',
|
|
156
|
+
'unverified',
|
|
157
|
+
];
|
|
158
|
+
/**
|
|
159
|
+
* Does this persisted pain/admission reason describe an explicit Owner
|
|
160
|
+
* statement — an Owner act that survives revocation? A reason carrying the
|
|
161
|
+
* marker but also an agent-derived qualifier (legacy agent-assisted rows, or
|
|
162
|
+
* a disclosure of unverified confirmation) is Agent-derived, not owner_manual.
|
|
163
|
+
*/
|
|
164
|
+
export function isOwnerExplicitStatementReason(reason) {
|
|
165
|
+
return typeof reason === 'string'
|
|
166
|
+
&& reason.includes(OWNER_EXPLICIT_STATEMENT_REASON_MARKER)
|
|
167
|
+
&& !AGENT_DERIVED_REASON_QUALIFIERS.some((qualifier) => reason.includes(qualifier));
|
|
168
|
+
}
|
|
169
|
+
/** logicalKey host prefixes, as produced by the codex/workbuddy adapters. */
|
|
170
|
+
const GOVERNANCE_LOGICAL_KEY_HOST_PREFIXES = new Map([
|
|
171
|
+
['codex|', 'codex'],
|
|
172
|
+
['wb|', 'workbuddy'],
|
|
173
|
+
]);
|
|
174
|
+
export function isGovernanceSourceRef(sourceRef) {
|
|
175
|
+
return sourceRef.startsWith(GOVERNANCE_OBSERVATION_SOURCE_REF_PREFIX);
|
|
176
|
+
}
|
|
177
|
+
/**
|
|
178
|
+
* Map a sourceRef onto the host kind whose consent governs it.
|
|
179
|
+
* `null` = not governed by the conversation-ingestion consent ledger
|
|
180
|
+
* (owner-reported / candidate / openclaw inline references).
|
|
181
|
+
* `'unknown'`-shape (parse failure on a governance ref) is expressed by the
|
|
182
|
+
* caller denying via {@link governanceSourceRefHostState} instead.
|
|
183
|
+
*/
|
|
184
|
+
export function hostKindFromGovernanceSourceRef(sourceRef) {
|
|
185
|
+
if (!isGovernanceSourceRef(sourceRef))
|
|
186
|
+
return null;
|
|
187
|
+
const logicalKey = sourceRef.slice(GOVERNANCE_OBSERVATION_SOURCE_REF_PREFIX.length);
|
|
188
|
+
for (const [prefix, hostKind] of GOVERNANCE_LOGICAL_KEY_HOST_PREFIXES) {
|
|
189
|
+
if (logicalKey.startsWith(prefix))
|
|
190
|
+
return hostKind;
|
|
191
|
+
}
|
|
192
|
+
return null;
|
|
193
|
+
}
|
|
194
|
+
export function authorizeSourceRef(sourceRef, port) {
|
|
195
|
+
const hostKind = hostKindFromGovernanceSourceRef(sourceRef);
|
|
196
|
+
if (!isGovernanceSourceRef(sourceRef))
|
|
197
|
+
return { governed: false };
|
|
198
|
+
if (hostKind === null) {
|
|
199
|
+
// A ref that claims governance origin but cannot be attributed to a host
|
|
200
|
+
// fails closed — an unattributable origin is never a grant (rc-2 posture).
|
|
201
|
+
return {
|
|
202
|
+
governed: true,
|
|
203
|
+
hostKind: null,
|
|
204
|
+
state: { authorized: false, reason: 'authorization_unavailable', detail: `unattributable governance sourceRef host: ${sourceRef.slice(0, 80)}` },
|
|
205
|
+
};
|
|
206
|
+
}
|
|
207
|
+
return { governed: true, hostKind, state: port.isHostSourceMaterialAuthorized(hostKind) };
|
|
208
|
+
}
|
|
209
|
+
/**
|
|
210
|
+
* Pure evidence filter — the one judgment every consumer reuses. Never throws
|
|
211
|
+
* on malformed entries: a non-string/empty sourceRef is not a governance ref,
|
|
212
|
+
* so the entry is treated as not governed (persisted shapes are untrusted,
|
|
213
|
+
* rc-1/rc-2 — the schema boundary still validates on write).
|
|
214
|
+
*/
|
|
215
|
+
export function filterEvidenceByAuthorization(entries, port) {
|
|
216
|
+
const kept = [];
|
|
217
|
+
const removed = [];
|
|
218
|
+
const denialReasons = new Set();
|
|
219
|
+
for (const entry of entries) {
|
|
220
|
+
const sourceRef = typeof entry?.sourceRef === 'string' ? entry.sourceRef : '';
|
|
221
|
+
const decision = authorizeSourceRef(sourceRef, port);
|
|
222
|
+
if (!decision.governed || decision.state.authorized) {
|
|
223
|
+
kept.push(entry);
|
|
224
|
+
}
|
|
225
|
+
else {
|
|
226
|
+
removed.push(entry);
|
|
227
|
+
denialReasons.add(decision.state.reason);
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
return { kept, removed, denialReasons: [...denialReasons] };
|
|
231
|
+
}
|
|
232
|
+
/**
|
|
233
|
+
* Model-boundary assertion (TECH §2.2 ruling 5): does this list of sourceRefs
|
|
234
|
+
* still contain governed-but-unauthorized material? Used for the LAST check
|
|
235
|
+
* between assembly and the model call — a hit means the run must be blocked,
|
|
236
|
+
* not filtered (the payload was already assembled; silently re-filtering here
|
|
237
|
+
* would hide the race instead of honoring the revocation).
|
|
238
|
+
*/
|
|
239
|
+
export function findUnauthorizedSourceRef(sourceRefs, port) {
|
|
240
|
+
for (const sourceRef of sourceRefs) {
|
|
241
|
+
if (typeof sourceRef !== 'string')
|
|
242
|
+
continue;
|
|
243
|
+
const decision = authorizeSourceRef(sourceRef, port);
|
|
244
|
+
if (decision.governed && !decision.state.authorized) {
|
|
245
|
+
return { sourceRef, reason: decision.state.reason, hostKind: decision.hostKind };
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
return null;
|
|
249
|
+
}
|
|
250
|
+
//# sourceMappingURL=source-material-authorization.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"source-material-authorization.js","sourceRoot":"","sources":["../../src/runtime/source-material-authorization.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqCG;AAEH,OAAO,EAAE,oBAAoB,EAAE,MAAM,yCAAyC,CAAC;AA0B/E,4EAA4E;AAC5E,MAAM,CAAC,MAAM,kCAAkC,GAAoC;IACjF,8BAA8B,EAAE,GAA6B,EAAE,CAAC,CAAC;QAC/D,UAAU,EAAE,KAAK;QACjB,MAAM,EAAE,2BAA2B;QACnC,MAAM,EAAE,uHAAuH;KAChI,CAAC;CACH,CAAC;AAEF,+EAA+E;AAC/E,MAAM,CAAC,MAAM,wCAAwC,GAAG,yBAAyB,CAAC;AAElF,8EAA8E;AAC9E,8EAA8E;AAC9E,EAAE;AACF,6EAA6E;AAC7E,+EAA+E;AAC/E,wEAAwE;AACxE,2EAA2E;AAC3E,wEAAwE;AACxE,4EAA4E;AAC5E,uEAAuE;AACvE,2CAA2C;AAC3C,EAAE;AACF,gEAAgE;AAChE,6EAA6E;AAC7E,6EAA6E;AAC7E,0BAA0B;AAC1B,4EAA4E;AAC5E,2EAA2E;AAC3E,yEAAyE;AACzE,uDAAuD;AACvD,2EAA2E;AAC3E,6EAA6E;AAC7E,0EAA0E;AAC1E,2EAA2E;AAC3E,sBAAsB;AAEtB;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,kCAAkC,GAAsB;IACnE,uBAAuB;IACvB,2BAA2B;IAC3B,qBAAqB;IACrB,sBAAsB;CACvB,CAAC;AAEF;;;;GAIG;AACH,MAAM,UAAU,gCAAgC,CAAC,OAAgB;IAC/D,OAAO,OAAO,OAAO,KAAK,QAAQ,IAAI,kCAAkC,CAAC,QAAQ,CAAC,OAAO,C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AC,KAAK,CAAC,CAAC;QACnB,CAAC;aAAM,CAAC;YACN,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;YACpB,aAAa,CAAC,GAAG,CAAC,QAAQ,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;QAC3C,CAAC;IACH,CAAC;IACD,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,aAAa,EAAE,CAAC,GAAG,aAAa,CAAC,EAAE,CAAC;AAC9D,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,yBAAyB,CAAC,UAA6B,EAAE,IAAqC;IAK5G,KAAK,MAAM,SAAS,IAAI,UAAU,EAAE,CAAC;QACnC,IAAI,OAAO,SAAS,KAAK,QAAQ;YAAE,SAAS;QAC5C,MAAM,QAAQ,GAAG,kBAAkB,CAAC,SAAS,EAAE,IAAI,CAAC,CAAC;QACrD,IAAI,QAAQ,CAAC,QAAQ,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,UAAU,EAAE,CAAC;YACpD,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,CAAC,KAAK,CAAC,MAAM,EAAE,QAAQ,EAAE,QAAQ,CAAC,QAAQ,EAAE,CAAC;QACnF,CAAC;IACH,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC"}
|
|
@@ -2,4 +2,5 @@ export type { ContextAssembler } from './context-assembler.js';
|
|
|
2
2
|
export { SqliteContextAssembler } from './sqlite-context-assembler.js';
|
|
3
3
|
export { ResilientContextAssembler } from './resilient-context-assembler.js';
|
|
4
4
|
export type { TrajectoryTurnReader, TrajectoryUserTurn, TrajectoryAssistantTurn } from './trajectory-turn-reader.js';
|
|
5
|
+
export { readPromotedEvidenceWindow } from './promoted-evidence-reader.js';
|
|
5
6
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/runtime/store/context/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC/D,OAAO,EAAE,sBAAsB,EAAE,MAAM,+BAA+B,CAAC;AACvE,OAAO,EAAE,yBAAyB,EAAE,MAAM,kCAAkC,CAAC;AAC7E,YAAY,EAAE,oBAAoB,EAAE,kBAAkB,EAAE,uBAAuB,EAAE,MAAM,6BAA6B,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/runtime/store/context/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC/D,OAAO,EAAE,sBAAsB,EAAE,MAAM,+BAA+B,CAAC;AACvE,OAAO,EAAE,yBAAyB,EAAE,MAAM,kCAAkC,CAAC;AAC7E,YAAY,EAAE,oBAAoB,EAAE,kBAAkB,EAAE,uBAAuB,EAAE,MAAM,6BAA6B,CAAC;AACrH,OAAO,EAAE,0BAA0B,EAAE,MAAM,+BAA+B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/runtime/store/context/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,sBAAsB,EAAE,MAAM,+BAA+B,CAAC;AACvE,OAAO,EAAE,yBAAyB,EAAE,MAAM,kCAAkC,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/runtime/store/context/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,sBAAsB,EAAE,MAAM,+BAA+B,CAAC;AACvE,OAAO,EAAE,yBAAyB,EAAE,MAAM,kCAAkC,CAAC;AAE7E,OAAO,EAAE,0BAA0B,EAAE,MAAM,+BAA+B,CAAC"}
|
|
@@ -49,11 +49,19 @@ export type PromotedEvidenceReadResult = ({
|
|
|
49
49
|
* Missing database, missing `governance_observations` table or any query error
|
|
50
50
|
* is reported as `unavailable` with a reason — never thrown and never silently
|
|
51
51
|
* treated as "no evidence" (rc-3/rc-9).
|
|
52
|
+
*
|
|
53
|
+
* PRI-1283 R2: `authorizedHostKinds` excludes rows of hosts whose
|
|
54
|
+
* conversation-ingestion consent is no longer granted AT THE QUERY BOUNDARY —
|
|
55
|
+
* revoked conversation material must not be read into the window at all. An
|
|
56
|
+
* empty array therefore yields an empty window (all hosts unauthorized);
|
|
57
|
+
* omitting the option preserves the pre-R2 behavior (test seams only).
|
|
52
58
|
*/
|
|
53
59
|
export declare function readPromotedEvidenceWindow(input: {
|
|
54
60
|
readonly workspaceDir: string;
|
|
55
61
|
readonly painId: string;
|
|
56
62
|
/** Context budget for entries; the most recent entries are kept. */
|
|
57
63
|
readonly maxEntries: number;
|
|
64
|
+
/** PRI-1283 R2: only these host kinds' rows may be read; absent = all. */
|
|
65
|
+
readonly authorizedHostKinds?: readonly string[];
|
|
58
66
|
}): PromotedEvidenceReadResult;
|
|
59
67
|
//# sourceMappingURL=promoted-evidence-reader.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"promoted-evidence-reader.d.ts","sourceRoot":"","sources":["../../../../src/runtime/store/context/promoted-evidence-reader.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAGH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAelE,MAAM,WAAW,sBAAsB;IACrC,4DAA4D;IAC5D,QAAQ,CAAC,OAAO,EAAE,iBAAiB,EAAE,CAAC;IACtC,6EAA6E;IAC7E,QAAQ,CAAC,gBAAgB,EAAE,MAAM,CAAC;IAClC,8EAA8E;IAC9E,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC9B,+DAA+D;IAC/D,QAAQ,CAAC,SAAS,EAAE,OAAO,CAAC;CAC7B;AAED,MAAM,MAAM,0BAA0B,GAClC,CAAC;IAAE,MAAM,EAAE,IAAI,CAAA;CAAE,GAAG,sBAAsB,CAAC,GAC3C;IAAE,MAAM,EAAE,aAAa,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC;AA4G9C
|
|
1
|
+
{"version":3,"file":"promoted-evidence-reader.d.ts","sourceRoot":"","sources":["../../../../src/runtime/store/context/promoted-evidence-reader.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAGH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAelE,MAAM,WAAW,sBAAsB;IACrC,4DAA4D;IAC5D,QAAQ,CAAC,OAAO,EAAE,iBAAiB,EAAE,CAAC;IACtC,6EAA6E;IAC7E,QAAQ,CAAC,gBAAgB,EAAE,MAAM,CAAC;IAClC,8EAA8E;IAC9E,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC9B,+DAA+D;IAC/D,QAAQ,CAAC,SAAS,EAAE,OAAO,CAAC;CAC7B;AAED,MAAM,MAAM,0BAA0B,GAClC,CAAC;IAAE,MAAM,EAAE,IAAI,CAAA;CAAE,GAAG,sBAAsB,CAAC,GAC3C;IAAE,MAAM,EAAE,aAAa,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC;AA4G9C;;;;;;;;;;;;GAYG;AACH,wBAAgB,0BAA0B,CAAC,KAAK,EAAE;IAChD,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,oEAAoE;IACpE,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,0EAA0E;IAC1E,QAAQ,CAAC,mBAAmB,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;CAClD,GAAG,0BAA0B,CAsD7B"}
|
|
@@ -151,6 +151,12 @@ function toEntry(row) {
|
|
|
151
151
|
* Missing database, missing `governance_observations` table or any query error
|
|
152
152
|
* is reported as `unavailable` with a reason — never thrown and never silently
|
|
153
153
|
* treated as "no evidence" (rc-3/rc-9).
|
|
154
|
+
*
|
|
155
|
+
* PRI-1283 R2: `authorizedHostKinds` excludes rows of hosts whose
|
|
156
|
+
* conversation-ingestion consent is no longer granted AT THE QUERY BOUNDARY —
|
|
157
|
+
* revoked conversation material must not be read into the window at all. An
|
|
158
|
+
* empty array therefore yields an empty window (all hosts unauthorized);
|
|
159
|
+
* omitting the option preserves the pre-R2 behavior (test seams only).
|
|
154
160
|
*/
|
|
155
161
|
export function readPromotedEvidenceWindow(input) {
|
|
156
162
|
let db;
|
|
@@ -163,17 +169,25 @@ export function readPromotedEvidenceWindow(input) {
|
|
|
163
169
|
try {
|
|
164
170
|
// Inner DESC + LIMIT keeps the END of the transcript window when a pain has
|
|
165
171
|
// more rows than the hard cap; the outer ASC restores reading order.
|
|
172
|
+
// PRI-1283 R2 + SEC-BASE-4: the host authorization filter is a FIXED SQL
|
|
173
|
+
// shape with three bind slots (one per governance host); an unauthorized
|
|
174
|
+
// host binds NULL, and `host_kind = NULL` is never true — an explicitly
|
|
175
|
+
// EMPTY authorized list therefore yields zero rows without dynamic SQL.
|
|
176
|
+
// An ABSENT list preserves the pre-R2 contract (no host filter — test
|
|
177
|
+
// seams only), so all three slots bind to their host kind.
|
|
178
|
+
const hostSlots = ['codex', 'workbuddy', 'openclaw'].map((host) => (input.authorizedHostKinds === undefined || input.authorizedHostKinds.includes(host) ? host : null));
|
|
166
179
|
const rows = db.prepare(`
|
|
167
180
|
SELECT id, kind, visible_text, source_order, observed_at, sanitized_tool_facts_json
|
|
168
181
|
FROM (
|
|
169
182
|
SELECT id, kind, visible_text, source_order, observed_at, sanitized_tool_facts_json
|
|
170
183
|
FROM governance_observations
|
|
171
184
|
WHERE retention_class = 'promoted' AND promotion_ref = ?
|
|
185
|
+
AND (host_kind = ? OR host_kind = ? OR host_kind = ?)
|
|
172
186
|
ORDER BY source_order IS NULL DESC, source_order DESC, observed_at DESC, id DESC
|
|
173
187
|
LIMIT ?
|
|
174
188
|
)
|
|
175
189
|
ORDER BY source_order IS NULL, source_order ASC, observed_at ASC, id ASC
|
|
176
|
-
`).all(input.painId, MAX_HISTORY_PAGE_SIZE);
|
|
190
|
+
`).all(input.painId, ...hostSlots, MAX_HISTORY_PAGE_SIZE);
|
|
177
191
|
const mapped = rows.map(toEntry);
|
|
178
192
|
const entries = mapped.filter((entry) => entry !== null);
|
|
179
193
|
const omittedCount = mapped.length - entries.length;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"promoted-evidence-reader.js","sourceRoot":"","sources":["../../../../src/runtime/store/context/promoted-evidence-reader.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAEH,OAAO,EAAE,wBAAwB,EAAE,MAAM,8BAA8B,CAAC;AAExE,OAAO,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;AAEpE,wEAAwE;AACxE,MAAM,4BAA4B,GAAG,GAAG,CAAC;AACzC,mEAAmE;AACnE,MAAM,mBAAmB,GAAG,GAAG,CAAC;AAEhC,MAAM,YAAY,GAAwD;IACxE,SAAS,EAAE,MAAM;IACjB,cAAc,EAAE,WAAW;IAC3B,SAAS,EAAE,MAAM;IACjB,SAAS,EAAE,QAAQ;CACpB,CAAC;AAiBF,SAAS,QAAQ,CAAC,KAAc;IAC9B,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;AAC9E,CAAC;AAED,SAAS,KAAK,CAAC,GAAY,EAAE,GAAW;IACtC,OAAO,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;AAC9C,CAAC;AAED,SAAS,cAAc,CAAC,KAAc;IACpC,IAAI,OAAO,KAAK,KAAK,QAAQ;QAAE,OAAO,SAAS,CAAC;IAChD,MAAM,OAAO,GAAG,KAAK,CAAC,IAAI,EAAE,CAAC;IAC7B,OAAO,OAAO,CAAC,MAAM,GAAG,CA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