create-principles-disciple 1.154.4 → 1.155.1
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 +10 -0
- package/console/dist/server/models/EvidenceChainConsoleModel.js +31 -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 +37 -37
- 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 +1 -1
- 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 +4 -4
- 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/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/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/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 +586 -568
- package/plugin/dist/openclaw-worker.d.ts +92 -0
- package/plugin/dist/openclaw-worker.js +2439 -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 +2 -2
- 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":"install-layout.d.ts","sourceRoot":"","sources":["../../src/update/install-layout.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;
|
|
1
|
+
{"version":3,"file":"install-layout.d.ts","sourceRoot":"","sources":["../../src/update/install-layout.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAMH,OAAO,EAAmE,KAAK,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAIjI,MAAM,WAAW,WAAW;IAC1B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC9B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;IAC5B;;;;;;;;OAQG;IACH,QAAQ,CAAC,kBAAkB,CAAC,EAAE,MAAM,CAAC;CACtC;AAmBD;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,WAAW,GAAG,aAAa,CAwBnE;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,qBAAqB,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,CAO3F;AAiCD,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,WAAW,EAAE,MAAM,EAAE,aAAa,GAAG,IAAI,CAiBlF;AAED,sEAAsE;AACtE,wBAAgB,oBAAoB,CAClC,QAAQ,EAAE,MAAM,EAChB,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAC7B,IAAI,CAON"}
|
|
@@ -20,8 +20,10 @@
|
|
|
20
20
|
import * as fs from 'node:fs';
|
|
21
21
|
import * as path from 'node:path';
|
|
22
22
|
import * as crypto from 'node:crypto';
|
|
23
|
+
import { atomicReplaceTextFile } from '../utils/config-file-io.js';
|
|
23
24
|
import { parseProductVersion, ProductIdentityError, isReleaseChannelName } from './product-identity.js';
|
|
24
25
|
import { normalizeReleaseMetadataUrl } from './release-metadata-source.js';
|
|
26
|
+
import * as installLayoutModule from '@principles/install-layout';
|
|
25
27
|
export function resolvePdHomePaths(pdHome) {
|
|
26
28
|
const home = path.resolve(pdHome);
|
|
27
29
|
return {
|
|
@@ -206,24 +208,49 @@ export function readInstallJsonRecord(filePath) {
|
|
|
206
208
|
* disk; only an explicit value overwrites it. There is no programmatic way to
|
|
207
209
|
* clear the field — clearing is an installer-level decision.
|
|
208
210
|
*/
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
211
|
+
/**
|
|
212
|
+
* Shared lock discipline for install.json writers: LOUD failure, never a
|
|
213
|
+
* silent unlocked fallback — an unlocked write is exactly the ERR-168
|
|
214
|
+
* clobber the lock exists to prevent.
|
|
215
|
+
*
|
|
216
|
+
* A missing lock export is an incompatible runtime cohort and fails closed;
|
|
217
|
+
* no caller may downgrade to an unlocked write of the shared ownership manifest.
|
|
218
|
+
*/
|
|
219
|
+
function runUnderManifestWriteLock(options, fn) {
|
|
220
|
+
const lock = installLayoutModule.withInstallManifestWriteLock;
|
|
221
|
+
if (typeof lock !== 'function') {
|
|
222
|
+
throw new InstallLayoutError('install.json', `install_manifest_lock_unavailable (${options.operation}): the installed @principles/install-layout does not expose the shared manifest lock; no write was performed. Update the installer/runtime cohort and retry.`);
|
|
218
223
|
}
|
|
219
|
-
|
|
220
|
-
|
|
224
|
+
const result = lock(options, fn);
|
|
225
|
+
if (!result.ok) {
|
|
226
|
+
throw new InstallLayoutError('install.json', `could not acquire the install manifest write lock (${options.operation}): ${result.message}`);
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
export function writeInstallConfig(paths, config) {
|
|
230
|
+
// ERR-168 / PRI-1282: this file also carries the per-Workspace ownership
|
|
231
|
+
// records written under the §8.4 CAS lock — take the same physical lock so
|
|
232
|
+
// a config write can never interleave with (and clobber) a transition.
|
|
233
|
+
runUnderManifestWriteLock({ manifestPath: paths.installConfigPath, operation: 'update.writeInstallConfig', context: paths.home }, () => {
|
|
234
|
+
const existing = readInstallJsonRecord(paths.installConfigPath);
|
|
235
|
+
const payload = {
|
|
236
|
+
...(existing ?? {}),
|
|
237
|
+
channel: config.channel,
|
|
238
|
+
autoCheck: config.autoCheck,
|
|
239
|
+
};
|
|
240
|
+
if (config.releaseMetadataUrl !== undefined) {
|
|
241
|
+
payload.releaseMetadataUrl = config.releaseMetadataUrl;
|
|
242
|
+
}
|
|
243
|
+
fs.mkdirSync(paths.home, { recursive: true });
|
|
244
|
+
atomicReplaceTextFile(paths.installConfigPath, `${JSON.stringify(payload, null, 2)}\n`);
|
|
245
|
+
});
|
|
221
246
|
}
|
|
222
247
|
/** Field-level merge for writers that do not own the whole record. */
|
|
223
248
|
export function mergeIntoInstallJson(filePath, patch) {
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
249
|
+
runUnderManifestWriteLock({ manifestPath: filePath, operation: 'update.mergeIntoInstallJson', context: path.dirname(filePath) }, () => {
|
|
250
|
+
const existing = readInstallJsonRecord(filePath);
|
|
251
|
+
const payload = { ...(existing ?? {}), ...patch };
|
|
252
|
+
fs.mkdirSync(path.dirname(filePath), { recursive: true });
|
|
253
|
+
atomicReplaceTextFile(filePath, `${JSON.stringify(payload, null, 2)}\n`);
|
|
254
|
+
});
|
|
228
255
|
}
|
|
229
256
|
//# sourceMappingURL=install-layout.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"install-layout.js","sourceRoot":"","sources":["../../src/update/install-layout.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,KAAK,EAAE,MAAM,SAAS,CAAC;AAC9B,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAClC,OAAO,KAAK,MAAM,MAAM,aAAa,CAAC;AACtC,OAAO,EAAE,mBAAmB,EAAE,oBAAoB,EAAE,oBAAoB,EAA2B,MAAM,uBAAuB,CAAC;AACjI,OAAO,EAAE,2BAA2B,EAAE,MAAM,8BAA8B,CAAC;
|
|
1
|
+
{"version":3,"file":"install-layout.js","sourceRoot":"","sources":["../../src/update/install-layout.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,KAAK,EAAE,MAAM,SAAS,CAAC;AAC9B,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAClC,OAAO,KAAK,MAAM,MAAM,aAAa,CAAC;AACtC,OAAO,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AACnE,OAAO,EAAE,mBAAmB,EAAE,oBAAoB,EAAE,oBAAoB,EAA2B,MAAM,uBAAuB,CAAC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ConfigForPlugin } from './pd-config.js
|
|
|
23
23
|
import { isAutomaticPainSubmissionAuthorized } from './auto-pain-authorization.js';
|
|
24
24
|
import { createHostIntentDocReader } from './intent-doc-reader.js';
|
|
25
25
|
import { createGovernanceTrajectoryTurnReader } from './governance-trajectory-turn-reader.js';
|
|
26
|
+
import { createConsentLedgerSourceMaterialAuthorization } from './source-material-authorization.js';
|
|
26
27
|
/** Quiet flag that owns the L3 half of the ladder. */
|
|
27
28
|
export const DIAGNOSTICIAN_AUTO_RUN_FLAG = 'openclaw_diagnostician_consumer';
|
|
28
29
|
/** Owner string used for the diagnostics this module starts. */
|
|
@@ -116,7 +117,9 @@ export async function runPendingDiagnosticianOnce(options) {
|
|
|
116
117
|
intentDocReader: createHostIntentDocReader({ workspaceDir: options.workspaceDir, effectiveConfig: config.effective }),
|
|
117
118
|
// PRI-1265: the auto-run path sees the bound session's ORIGINAL turns
|
|
118
119
|
// like every other diagnosis entry.
|
|
119
|
-
trajectoryTurnReader: createGovernanceTrajectoryTurnReader({ workspaceDir: options.workspaceDir }),
|
|
120
|
+
trajectoryTurnReader: createGovernanceTrajectoryTurnReader({ workspaceDir: options.workspaceDir, sourceMaterialAuthorization: createConsentLedgerSourceMaterialAuthorization(options.workspaceDir) }),
|
|
121
|
+
// PRI-1283 R2: latest-consent gate consulted per assembly / model call.
|
|
122
|
+
sourceMaterialAuthorization: createConsentLedgerSourceMaterialAuthorization(options.workspaceDir),
|
|
120
123
|
// SPEC §9.6: lazy probe — a flag revoked between candidate pick and
|
|
121
124
|
// execution still stops the run at the bridge boundary.
|
|
122
125
|
isAutoPainSubmissionAuthorized: () => isAutomaticPainSubmissionAuthorized(options.workspaceDir),
|
|
@@ -282,6 +282,13 @@ export interface ListGovernanceTurnTextsInput {
|
|
|
282
282
|
readonly sessionId: string;
|
|
283
283
|
/** Restrict to ONE host's observations — session ids are only unique per `(host_kind, rollout_identity)`. */
|
|
284
284
|
readonly hostKind?: 'codex' | 'openclaw' | 'workbuddy';
|
|
285
|
+
/**
|
|
286
|
+
* PRI-1283 R2: restrict to this SET of hosts' observations (empty = no
|
|
287
|
+
* rows). Mutually exclusive with `hostKind`; used by the turn-reader gate to
|
|
288
|
+
* exclude hosts whose conversation-ingestion consent is no longer granted
|
|
289
|
+
* AT THE QUERY BOUNDARY.
|
|
290
|
+
*/
|
|
291
|
+
readonly authorizedHostKinds?: readonly ('codex' | 'openclaw' | 'workbuddy')[];
|
|
285
292
|
readonly limit?: number;
|
|
286
293
|
readonly databaseFactory?: ObservationDatabaseFactory;
|
|
287
294
|
}
|
|
@@ -836,15 +836,26 @@ export function listGovernanceTurnTexts(input) {
|
|
|
836
836
|
const { db, close } = opened;
|
|
837
837
|
try {
|
|
838
838
|
const limit = Math.min(Math.max(input.limit ?? 200, 1), 2000);
|
|
839
|
+
// PRI-1283 R2: host predicate — one host (hostKind) or an authorized SET
|
|
840
|
+
// (authorizedHostKinds; an explicitly EMPTY set matches nothing, which is
|
|
841
|
+
// the correct "every host revoked" outcome, not invalid SQL).
|
|
842
|
+
if (input.hostKind !== undefined && input.authorizedHostKinds !== undefined) {
|
|
843
|
+
return { ok: false, reason: 'governance_turn_texts_invalid_input:host_kind_and_authorized_host_kinds_exclusive', nextAction: 'Pass exactly one of hostKind / authorizedHostKinds.' };
|
|
844
|
+
}
|
|
845
|
+
const hostPredicate = input.hostKind !== undefined
|
|
846
|
+
? { sql: ' AND host_kind = ?', params: [input.hostKind] }
|
|
847
|
+
: input.authorizedHostKinds !== undefined
|
|
848
|
+
? input.authorizedHostKinds.length === 0
|
|
849
|
+
? { sql: ' AND 1 = 0', params: [] }
|
|
850
|
+
: { sql: ` AND host_kind IN (${input.authorizedHostKinds.map(() => '?').join(',')})`, params: [...input.authorizedHostKinds] }
|
|
851
|
+
: { sql: '', params: [] };
|
|
839
852
|
const newestThenAsc = (identityColumn) => db.prepare('SELECT id, source_ordinal, visible_text, observed_at FROM ('
|
|
840
853
|
+ `SELECT id, source_ordinal, visible_text, observed_at, source_order FROM governance_observations `
|
|
841
854
|
+ `WHERE kind = ? AND ${identityColumn} = ? AND visible_text IS NOT NULL `
|
|
842
855
|
+ `AND retention_class IN ('operational', 'promoted')`
|
|
843
|
-
+ `${
|
|
856
|
+
+ `${hostPredicate.sql} `
|
|
844
857
|
+ 'ORDER BY observed_at DESC, source_order DESC, id DESC LIMIT ?'
|
|
845
|
-
+ ') ORDER BY observed_at ASC, source_order ASC, id ASC').all(
|
|
846
|
-
? [input.kind, input.sessionId, input.hostKind, limit]
|
|
847
|
-
: [input.kind, input.sessionId, limit]));
|
|
858
|
+
+ ') ORDER BY observed_at ASC, source_order ASC, id ASC').all(input.kind, input.sessionId, ...hostPredicate.params, limit);
|
|
848
859
|
// Exact session rows first; the root_session_id fallback keeps historical
|
|
849
860
|
// (pre-rollout-identity) rows readable but can no longer drag another
|
|
850
861
|
// rollout's turns (e.g. a subagent's) into this session's context.
|
|
@@ -87,6 +87,16 @@ export interface GovernanceCorrectionCandidate {
|
|
|
87
87
|
* admission, rate limit and idempotency are identical either way.
|
|
88
88
|
*/
|
|
89
89
|
readonly explicitChannel?: 'codex_explicit_prefix' | 'codex_explicit_agent' | 'workbuddy_explicit_prefix';
|
|
90
|
+
/**
|
|
91
|
+
* PRI-1283 round 3 (owner_manual ruling): set ONLY by the registration
|
|
92
|
+
* path after the submitted statement was verified VERBATIM against the
|
|
93
|
+
* current turn's host transcript — the trusted Owner interaction record.
|
|
94
|
+
* Never accepted from a submission payload: an agent cannot self-declare
|
|
95
|
+
* Owner confirmation (a payload claim is not a confirmation record).
|
|
96
|
+
* Agent-assisted statements without this flag persist as Agent-derived
|
|
97
|
+
* (no `owner_statement` classification, no ownerConfirmation block).
|
|
98
|
+
*/
|
|
99
|
+
readonly ownerVerbatimConfirmed?: boolean;
|
|
90
100
|
}
|
|
91
101
|
export type GovernanceSignalCandidate = GovernanceCorrectionCandidate;
|
|
92
102
|
export type GovernanceAdmissionOutcome = {
|
|
@@ -184,14 +194,53 @@ export type ClaimPendingCandidatesResult = {
|
|
|
184
194
|
ok: true;
|
|
185
195
|
candidates: readonly PendingCorrectionCandidate[];
|
|
186
196
|
expired: number;
|
|
197
|
+
revoked: number;
|
|
187
198
|
} | Degradation;
|
|
188
199
|
/**
|
|
189
200
|
* Claim bounded pending candidates with an optimistic CAS on the exact payload
|
|
190
201
|
* text. Rows whose claim is younger than PENDING_REVIEW_CLAIM_TTL_MS are
|
|
191
202
|
* skipped (another worker is reviewing them); TTL-expired rows become
|
|
192
203
|
* `abandoned(ttl_expired)` here, before any LLM work.
|
|
204
|
+
*
|
|
205
|
+
* PRI-1283 review round 2 (directive A4): every claim re-reads the LATEST
|
|
206
|
+
* conversation-ingestion consent for the row's host. A host whose consent is
|
|
207
|
+
* no longer granted never yields a claimable candidate — the pending row is
|
|
208
|
+
* terminated as `abandoned('source_revoked')` right here (CAS on the exact
|
|
209
|
+
* payload text; the D6 terminal field set drops trigger.text /
|
|
210
|
+
* trigger.matchedTerms / hostTurnId / task_payload), so the revoked excerpt
|
|
211
|
+
* can neither be claimed nor keep living in the payload. Revocation is the
|
|
212
|
+
* linearization point: claims after it see the terminal row, and an
|
|
213
|
+
* in-flight claim is fenced by `recordPendingCorrectionReview` /
|
|
214
|
+
* `settlePendingCorrection` (both CAS on `decision='pending_llm_review'`).
|
|
193
215
|
*/
|
|
194
216
|
export declare function claimPendingCorrectionCandidates(input: ClaimPendingCandidatesInput): ClaimPendingCandidatesResult;
|
|
217
|
+
export interface VerifyPendingClaimInput {
|
|
218
|
+
readonly workspaceDir: string;
|
|
219
|
+
readonly logicalObservationKey: string;
|
|
220
|
+
/** The fencing token this worker received from the claim. */
|
|
221
|
+
readonly claimToken: string;
|
|
222
|
+
readonly databaseFactory?: ObservationDatabaseFactory;
|
|
223
|
+
}
|
|
224
|
+
export type VerifyPendingClaimResult = {
|
|
225
|
+
ok: true;
|
|
226
|
+
allowed: true;
|
|
227
|
+
} | {
|
|
228
|
+
ok: true;
|
|
229
|
+
allowed: false;
|
|
230
|
+
reason: 'source_revoked' | 'consent_not_granted' | 'claim_not_owned' | 'not_pending' | 'payload_invalid';
|
|
231
|
+
} | Degradation;
|
|
232
|
+
/**
|
|
233
|
+
* PRI-1283 review round 2 (directive A5): the LAST authorization gate before
|
|
234
|
+
* `classifier(candidate.text, …)` starts a model request. Verifies, in one
|
|
235
|
+
* fresh read, that (a) the row is STILL `pending_llm_review`, (b) this
|
|
236
|
+
* worker's fencing token still owns the claim, and (c) the row's host still
|
|
237
|
+
* has granted consent. This is the revocation linearization boundary for NEW
|
|
238
|
+
* model requests: after a revocation completes (ledger decision or sweep
|
|
239
|
+
* termination), no fresh classifier call may start on the old source's text.
|
|
240
|
+
* A request already in flight cannot be recalled — its RESULT is fenced
|
|
241
|
+
* instead by `recordPendingCorrectionReview` (decision + claimToken CAS).
|
|
242
|
+
*/
|
|
243
|
+
export declare function verifyPendingClaimForClassification(input: VerifyPendingClaimInput): VerifyPendingClaimResult;
|
|
195
244
|
export interface ReleasePendingClaimInput {
|
|
196
245
|
readonly workspaceDir: string;
|
|
197
246
|
readonly logicalObservationKey: string;
|