create-principles-disciple 1.152.2 → 1.152.4
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 +1 -1
- package/codex-adapter/dist/pd-hook.js +34 -4
- package/codex-adapter/package.json +1 -1
- package/console/dist/server/config/pd-config-store.d.ts +48 -0
- package/console/dist/server/config/pd-config-store.js +273 -93
- package/console/dist/server/index.js +16 -1
- package/console/dist/server/models/ActivationsConsoleModel.d.ts +72 -1
- package/console/dist/server/models/ActivationsConsoleModel.js +92 -14
- package/console/dist/server/models/AdaptiveActivationConsoleModel.d.ts +79 -0
- package/console/dist/server/models/AdaptiveActivationConsoleModel.js +151 -0
- package/console/dist/server/models/ApprovalsConsoleModel.d.ts +28 -0
- package/console/dist/server/models/ApprovalsConsoleModel.js +118 -3
- package/console/dist/server/models/ApprovalsGroupedConsoleModel.d.ts +38 -0
- package/console/dist/server/models/ApprovalsGroupedConsoleModel.js +158 -26
- package/console/dist/server/models/IntentDecisionModel.d.ts +6 -1
- package/console/dist/server/models/IntentDecisionModel.js +17 -9
- package/console/dist/server/models/pipeline-health-metrics.d.ts +128 -0
- package/console/dist/server/models/pipeline-health-metrics.js +225 -0
- package/console/dist/server/routes/approvals.js +14 -0
- package/console/dist/server/routes/config.js +212 -1
- package/console/dist/server/routes/diagnostician.js +13 -2
- package/console/dist/server/routes/intent-decisions.js +19 -1
- package/console/dist/server/routes/pipeline-health.d.ts +9 -0
- package/console/dist/server/routes/pipeline-health.js +124 -0
- package/console/dist/web/assets/app.css +484 -67
- package/console/dist/web/assets/app.js +36 -31
- package/console/dist/web/assets/evidence-art-1.webp +0 -0
- package/console/dist/web/assets/evidence-art-2.webp +0 -0
- package/console/dist/web/assets/evidence-art-3.webp +0 -0
- package/console/dist/web/assets/evidence-art-4.webp +0 -0
- package/console/dist/web/assets/principle-grove.jpg +0 -0
- package/console/dist/web/assets/principle-stone-steps.jpg +0 -0
- package/console/dist/web/assets/principles-art-1.webp +0 -0
- package/console/dist/web/assets/principles-art-2.webp +0 -0
- package/console/dist/web/assets/principles-art-3.webp +0 -0
- package/console/dist/web/assets/principles-art-4.webp +0 -0
- package/console/dist/web/assets/today-art-1.webp +0 -0
- package/console/dist/web/assets/today-art-2.webp +0 -0
- package/console/dist/web/assets/today-art-3.webp +0 -0
- package/console/dist/web/assets/today-art-4.webp +0 -0
- package/core/dist/runtime/activation/activation-types.d.ts +6 -0
- package/core/dist/runtime/activation/activation-types.d.ts.map +1 -1
- package/core/dist/runtime/activation/activation-types.js.map +1 -1
- package/core/dist/runtime/activation/index.d.ts +2 -1
- package/core/dist/runtime/activation/index.d.ts.map +1 -1
- package/core/dist/runtime/activation/index.js +1 -1
- package/core/dist/runtime/activation/index.js.map +1 -1
- package/core/dist/runtime/activation/ledger-identity.d.ts +8 -0
- package/core/dist/runtime/activation/ledger-identity.d.ts.map +1 -1
- package/core/dist/runtime/activation/ledger-identity.js +20 -1
- package/core/dist/runtime/activation/ledger-identity.js.map +1 -1
- package/core/dist/runtime/activation/sqlite-approval-store.d.ts +18 -0
- package/core/dist/runtime/activation/sqlite-approval-store.d.ts.map +1 -1
- package/core/dist/runtime/activation/sqlite-approval-store.js +146 -20
- package/core/dist/runtime/activation/sqlite-approval-store.js.map +1 -1
- package/core/dist/runtime/adapter/artificer-l2-adapter.d.ts.map +1 -1
- package/core/dist/runtime/adapter/artificer-l2-adapter.js +11 -4
- package/core/dist/runtime/adapter/artificer-l2-adapter.js.map +1 -1
- package/core/dist/runtime/adapter/l2-agent-loop-adapter.d.ts.map +1 -1
- package/core/dist/runtime/adapter/l2-agent-loop-adapter.js +11 -4
- package/core/dist/runtime/adapter/l2-agent-loop-adapter.js.map +1 -1
- package/core/dist/runtime/adapter/output-repair-contract.d.ts +21 -1
- package/core/dist/runtime/adapter/output-repair-contract.d.ts.map +1 -1
- package/core/dist/runtime/adapter/output-repair-contract.js.map +1 -1
- package/core/dist/runtime/adapter/pi-ai-catalog.d.ts +42 -0
- package/core/dist/runtime/adapter/pi-ai-catalog.d.ts.map +1 -1
- package/core/dist/runtime/adapter/pi-ai-catalog.js +68 -0
- package/core/dist/runtime/adapter/pi-ai-catalog.js.map +1 -1
- package/core/dist/runtime/adapter/pi-ai-connection-probe.d.ts +45 -0
- package/core/dist/runtime/adapter/pi-ai-connection-probe.d.ts.map +1 -0
- package/core/dist/runtime/adapter/pi-ai-connection-probe.js +321 -0
- package/core/dist/runtime/adapter/pi-ai-connection-probe.js.map +1 -0
- package/core/dist/runtime/adapter/pi-ai-runtime-adapter.d.ts +27 -2
- package/core/dist/runtime/adapter/pi-ai-runtime-adapter.d.ts.map +1 -1
- package/core/dist/runtime/adapter/pi-ai-runtime-adapter.js +71 -10
- package/core/dist/runtime/adapter/pi-ai-runtime-adapter.js.map +1 -1
- package/core/dist/runtime/adapter/schema-prompt-adapter.d.ts.map +1 -1
- package/core/dist/runtime/adapter/schema-prompt-adapter.js +39 -6
- package/core/dist/runtime/adapter/schema-prompt-adapter.js.map +1 -1
- package/core/dist/runtime/adapter/structured-output-repair.d.ts +26 -0
- package/core/dist/runtime/adapter/structured-output-repair.d.ts.map +1 -1
- package/core/dist/runtime/adapter/structured-output-repair.js +140 -2
- package/core/dist/runtime/adapter/structured-output-repair.js.map +1 -1
- package/core/dist/runtime/config/execution-timing.d.ts +56 -0
- package/core/dist/runtime/config/execution-timing.d.ts.map +1 -0
- package/core/dist/runtime/config/execution-timing.js +76 -0
- package/core/dist/runtime/config/execution-timing.js.map +1 -0
- package/core/dist/runtime/config/index.d.ts +4 -0
- package/core/dist/runtime/config/index.d.ts.map +1 -1
- package/core/dist/runtime/config/index.js +2 -0
- package/core/dist/runtime/config/index.js.map +1 -1
- package/core/dist/runtime/config/pd-config-redaction.d.ts.map +1 -1
- package/core/dist/runtime/config/pd-config-redaction.js +4 -0
- package/core/dist/runtime/config/pd-config-redaction.js.map +1 -1
- package/core/dist/runtime/config/pd-config-types.d.ts +5 -0
- package/core/dist/runtime/config/pd-config-types.d.ts.map +1 -1
- package/core/dist/runtime/config/pd-config-types.js.map +1 -1
- package/core/dist/runtime/config/pd-credentials.d.ts +105 -0
- package/core/dist/runtime/config/pd-credentials.d.ts.map +1 -0
- package/core/dist/runtime/config/pd-credentials.js +409 -0
- package/core/dist/runtime/config/pd-credentials.js.map +1 -0
- package/core/dist/runtime/diagnostician/diag-rootcause-output.d.ts +13 -2
- package/core/dist/runtime/diagnostician/diag-rootcause-output.d.ts.map +1 -1
- package/core/dist/runtime/diagnostician/diag-rootcause-output.js.map +1 -1
- package/core/dist/runtime/diagnostician/diagnostic-context-budget.d.ts +45 -0
- package/core/dist/runtime/diagnostician/diagnostic-context-budget.d.ts.map +1 -0
- package/core/dist/runtime/diagnostician/diagnostic-context-budget.js +74 -0
- package/core/dist/runtime/diagnostician/diagnostic-context-budget.js.map +1 -0
- package/core/dist/runtime/diagnostician/prompt-projection.d.ts +51 -0
- package/core/dist/runtime/diagnostician/prompt-projection.d.ts.map +1 -0
- package/core/dist/runtime/diagnostician/prompt-projection.js +192 -0
- package/core/dist/runtime/diagnostician/prompt-projection.js.map +1 -0
- package/core/dist/runtime/diagnostician-output.d.ts +1 -1
- package/core/dist/runtime/diagnostician-output.d.ts.map +1 -1
- package/core/dist/runtime/diagnostician-output.js +2 -2
- package/core/dist/runtime/diagnostician-output.js.map +1 -1
- package/core/dist/runtime/index.d.ts +5 -2
- package/core/dist/runtime/index.d.ts.map +1 -1
- package/core/dist/runtime/index.js +11 -1
- package/core/dist/runtime/index.js.map +1 -1
- package/core/dist/runtime/intent/index.d.ts +2 -0
- package/core/dist/runtime/intent/index.d.ts.map +1 -1
- package/core/dist/runtime/intent/index.js +2 -0
- package/core/dist/runtime/intent/index.js.map +1 -1
- package/core/dist/runtime/intent/intent-decision-record.d.ts +51 -3
- package/core/dist/runtime/intent/intent-decision-record.d.ts.map +1 -1
- package/core/dist/runtime/intent/intent-snapshot.d.ts +104 -0
- package/core/dist/runtime/intent/intent-snapshot.d.ts.map +1 -0
- package/core/dist/runtime/intent/intent-snapshot.js +164 -0
- package/core/dist/runtime/intent/intent-snapshot.js.map +1 -0
- package/core/dist/runtime/intent/strategic-conflict-gate.d.ts +70 -0
- package/core/dist/runtime/intent/strategic-conflict-gate.d.ts.map +1 -0
- package/core/dist/runtime/intent/strategic-conflict-gate.js +148 -0
- package/core/dist/runtime/intent/strategic-conflict-gate.js.map +1 -0
- package/core/dist/runtime/internalization/artificer-runner.js +1 -1
- package/core/dist/runtime/internalization/artificer-runner.js.map +1 -1
- package/core/dist/runtime/internalization/diag-distiller-runner.d.ts +6 -0
- package/core/dist/runtime/internalization/diag-distiller-runner.d.ts.map +1 -1
- package/core/dist/runtime/internalization/diag-distiller-runner.js +62 -5
- package/core/dist/runtime/internalization/diag-distiller-runner.js.map +1 -1
- package/core/dist/runtime/internalization/diag-rootcause-runner.d.ts +41 -1
- package/core/dist/runtime/internalization/diag-rootcause-runner.d.ts.map +1 -1
- package/core/dist/runtime/internalization/diag-rootcause-runner.js +190 -43
- package/core/dist/runtime/internalization/diag-rootcause-runner.js.map +1 -1
- package/core/dist/runtime/internalization/diag-router-runner.d.ts +6 -0
- package/core/dist/runtime/internalization/diag-router-runner.d.ts.map +1 -1
- package/core/dist/runtime/internalization/diag-router-runner.js +114 -69
- package/core/dist/runtime/internalization/diag-router-runner.js.map +1 -1
- package/core/dist/runtime/internalization/dreamer-prompt-builder.d.ts.map +1 -1
- package/core/dist/runtime/internalization/dreamer-prompt-builder.js +3 -0
- package/core/dist/runtime/internalization/dreamer-prompt-builder.js.map +1 -1
- package/core/dist/runtime/internalization/dreamer-runner.js +1 -1
- package/core/dist/runtime/internalization/dreamer-runner.js.map +1 -1
- package/core/dist/runtime/internalization/evaluator-runner.js +4 -4
- package/core/dist/runtime/internalization/evaluator-runner.js.map +1 -1
- package/core/dist/runtime/internalization/formation-context.d.ts +54 -0
- package/core/dist/runtime/internalization/formation-context.d.ts.map +1 -1
- package/core/dist/runtime/internalization/formation-context.js +135 -3
- package/core/dist/runtime/internalization/formation-context.js.map +1 -1
- package/core/dist/runtime/internalization/index.d.ts +2 -2
- 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/intent-contract.d.ts +107 -0
- package/core/dist/runtime/internalization/intent-contract.d.ts.map +1 -1
- package/core/dist/runtime/internalization/intent-contract.js +315 -4
- package/core/dist/runtime/internalization/intent-contract.js.map +1 -1
- package/core/dist/runtime/internalization/peer-runner-contracts.d.ts +8 -0
- package/core/dist/runtime/internalization/peer-runner-contracts.d.ts.map +1 -1
- package/core/dist/runtime/internalization/peer-runner-contracts.js.map +1 -1
- package/core/dist/runtime/internalization/philosopher-prompt-builder.d.ts +22 -1
- package/core/dist/runtime/internalization/philosopher-prompt-builder.d.ts.map +1 -1
- package/core/dist/runtime/internalization/philosopher-prompt-builder.js +22 -3
- package/core/dist/runtime/internalization/philosopher-prompt-builder.js.map +1 -1
- package/core/dist/runtime/internalization/philosopher-runner.d.ts +15 -0
- package/core/dist/runtime/internalization/philosopher-runner.d.ts.map +1 -1
- package/core/dist/runtime/internalization/philosopher-runner.js +74 -2
- package/core/dist/runtime/internalization/philosopher-runner.js.map +1 -1
- package/core/dist/runtime/internalization/pitask-metadata.d.ts +32 -0
- package/core/dist/runtime/internalization/pitask-metadata.d.ts.map +1 -1
- package/core/dist/runtime/internalization/pitask-metadata.js +44 -0
- package/core/dist/runtime/internalization/pitask-metadata.js.map +1 -1
- package/core/dist/runtime/internalization/rollout-reviewer-runner.d.ts +6 -1
- package/core/dist/runtime/internalization/rollout-reviewer-runner.d.ts.map +1 -1
- package/core/dist/runtime/internalization/rollout-reviewer-runner.js +31 -15
- package/core/dist/runtime/internalization/rollout-reviewer-runner.js.map +1 -1
- package/core/dist/runtime/internalization/scribe-output.d.ts +21 -0
- package/core/dist/runtime/internalization/scribe-output.d.ts.map +1 -1
- package/core/dist/runtime/internalization/scribe-output.js +125 -2
- package/core/dist/runtime/internalization/scribe-output.js.map +1 -1
- package/core/dist/runtime/internalization/scribe-prompt-builder.d.ts +26 -1
- package/core/dist/runtime/internalization/scribe-prompt-builder.d.ts.map +1 -1
- package/core/dist/runtime/internalization/scribe-prompt-builder.js +33 -3
- package/core/dist/runtime/internalization/scribe-prompt-builder.js.map +1 -1
- package/core/dist/runtime/internalization/scribe-runner.d.ts +32 -2
- package/core/dist/runtime/internalization/scribe-runner.d.ts.map +1 -1
- package/core/dist/runtime/internalization/scribe-runner.js +106 -8
- package/core/dist/runtime/internalization/scribe-runner.js.map +1 -1
- package/core/dist/runtime/internalization/split-diagnostician-runner.d.ts +46 -0
- package/core/dist/runtime/internalization/split-diagnostician-runner.d.ts.map +1 -1
- package/core/dist/runtime/internalization/split-diagnostician-runner.js +220 -20
- package/core/dist/runtime/internalization/split-diagnostician-runner.js.map +1 -1
- package/core/dist/runtime/internalization-integrity-remediation.d.ts +7 -0
- package/core/dist/runtime/internalization-integrity-remediation.d.ts.map +1 -1
- package/core/dist/runtime/internalization-integrity-remediation.js +44 -12
- package/core/dist/runtime/internalization-integrity-remediation.js.map +1 -1
- package/core/dist/runtime/pain-signal-runtime-factory.d.ts.map +1 -1
- package/core/dist/runtime/pain-signal-runtime-factory.js +25 -4
- package/core/dist/runtime/pain-signal-runtime-factory.js.map +1 -1
- package/core/dist/runtime/pain-submit-capability.js +5 -5
- package/core/dist/runtime/pain-submit-capability.js.map +1 -1
- package/core/dist/runtime/runner/base-peer-runner.d.ts +90 -2
- package/core/dist/runtime/runner/base-peer-runner.d.ts.map +1 -1
- package/core/dist/runtime/runner/base-peer-runner.js +463 -170
- package/core/dist/runtime/runner/base-peer-runner.js.map +1 -1
- package/core/dist/runtime/runner/peer-runner-types.d.ts +19 -0
- package/core/dist/runtime/runner/peer-runner-types.d.ts.map +1 -1
- package/core/dist/runtime/runtime-protocol.d.ts +19 -0
- package/core/dist/runtime/runtime-protocol.d.ts.map +1 -1
- package/core/dist/runtime/signal-collector/llm-stage.d.ts +5 -0
- package/core/dist/runtime/signal-collector/llm-stage.d.ts.map +1 -1
- package/core/dist/runtime/signal-collector/llm-stage.js.map +1 -1
- package/core/dist/runtime/store/artifact/sqlite-pi-artifact-store.d.ts +14 -0
- package/core/dist/runtime/store/artifact/sqlite-pi-artifact-store.d.ts.map +1 -1
- package/core/dist/runtime/store/artifact/sqlite-pi-artifact-store.js +16 -1
- package/core/dist/runtime/store/artifact/sqlite-pi-artifact-store.js.map +1 -1
- package/core/dist/runtime/store/commit/diagnostician-committer.d.ts +19 -0
- package/core/dist/runtime/store/commit/diagnostician-committer.d.ts.map +1 -1
- package/core/dist/runtime/store/commit/diagnostician-committer.js +11 -0
- package/core/dist/runtime/store/commit/diagnostician-committer.js.map +1 -1
- package/core/dist/runtime/store/intent/sqlite-intent-decision-store.d.ts +2 -2
- package/core/dist/runtime/store/intent/sqlite-intent-decision-store.d.ts.map +1 -1
- package/core/dist/runtime/store/intent/sqlite-intent-decision-store.js +285 -35
- package/core/dist/runtime/store/intent/sqlite-intent-decision-store.js.map +1 -1
- package/core/dist/runtime/store/lifecycle/fenced-task-writer.d.ts +64 -0
- package/core/dist/runtime/store/lifecycle/fenced-task-writer.d.ts.map +1 -0
- package/core/dist/runtime/store/lifecycle/fenced-task-writer.js +231 -0
- package/core/dist/runtime/store/lifecycle/fenced-task-writer.js.map +1 -0
- package/core/dist/runtime/store/lifecycle/index.d.ts +2 -0
- package/core/dist/runtime/store/lifecycle/index.d.ts.map +1 -1
- package/core/dist/runtime/store/lifecycle/index.js +1 -0
- package/core/dist/runtime/store/lifecycle/index.js.map +1 -1
- package/core/dist/runtime/store/lifecycle/lease-fence.d.ts +80 -0
- package/core/dist/runtime/store/lifecycle/lease-fence.d.ts.map +1 -0
- package/core/dist/runtime/store/lifecycle/lease-fence.js +79 -0
- package/core/dist/runtime/store/lifecycle/lease-fence.js.map +1 -0
- package/core/dist/runtime/store/lifecycle/lease-heartbeat.d.ts +118 -0
- package/core/dist/runtime/store/lifecycle/lease-heartbeat.d.ts.map +1 -0
- package/core/dist/runtime/store/lifecycle/lease-heartbeat.js +187 -0
- package/core/dist/runtime/store/lifecycle/lease-heartbeat.js.map +1 -0
- package/core/dist/runtime/store/lifecycle/lease-manager.d.ts +30 -20
- package/core/dist/runtime/store/lifecycle/lease-manager.d.ts.map +1 -1
- package/core/dist/runtime/store/lifecycle/lease-manager.js +94 -53
- package/core/dist/runtime/store/lifecycle/lease-manager.js.map +1 -1
- package/core/dist/runtime/store/lifecycle/recovery-sweep.d.ts.map +1 -1
- package/core/dist/runtime/store/lifecycle/recovery-sweep.js +32 -15
- package/core/dist/runtime/store/lifecycle/recovery-sweep.js.map +1 -1
- package/core/dist/runtime/store/run/sqlite-run-store.d.ts +29 -0
- package/core/dist/runtime/store/run/sqlite-run-store.d.ts.map +1 -1
- package/core/dist/runtime/store/run/sqlite-run-store.js +40 -0
- package/core/dist/runtime/store/run/sqlite-run-store.js.map +1 -1
- package/core/dist/runtime/store/runtime-state-manager.d.ts +64 -10
- package/core/dist/runtime/store/runtime-state-manager.d.ts.map +1 -1
- package/core/dist/runtime/store/runtime-state-manager.js +154 -89
- package/core/dist/runtime/store/runtime-state-manager.js.map +1 -1
- package/core/dist/runtime/store/sqlite-connection.d.ts.map +1 -1
- package/core/dist/runtime/store/sqlite-connection.js +73 -4
- package/core/dist/runtime/store/sqlite-connection.js.map +1 -1
- package/core/dist/runtime/store/task/sqlite-task-store.d.ts.map +1 -1
- package/core/dist/runtime/store/task/sqlite-task-store.js +6 -3
- package/core/dist/runtime/store/task/sqlite-task-store.js.map +1 -1
- package/core/dist/runtime/task-status.d.ts +16 -0
- package/core/dist/runtime/task-status.d.ts.map +1 -1
- package/core/dist/runtime/task-status.js +8 -0
- package/core/dist/runtime/task-status.js.map +1 -1
- package/core/dist/runtime/trajectory-schema.d.ts.map +1 -1
- package/core/dist/runtime/trajectory-schema.js +20 -1
- package/core/dist/runtime/trajectory-schema.js.map +1 -1
- package/core/dist/runtime/types/event-types.d.ts +20 -0
- package/core/dist/runtime/types/event-types.d.ts.map +1 -1
- package/core/dist/runtime/types/event-types.js +7 -0
- package/core/dist/runtime/types/event-types.js.map +1 -1
- package/core/dist/telemetry-event.d.ts +2 -2
- package/core/dist/telemetry-event.d.ts.map +1 -1
- package/core/dist/telemetry-event.js +27 -2
- package/core/dist/telemetry-event.js.map +1 -1
- package/core/dist/trajectory-types.d.ts +33 -0
- package/core/dist/trajectory-types.d.ts.map +1 -1
- package/core/package.json +1 -1
- package/dist/installer.d.ts.map +1 -1
- package/dist/installer.js +12 -5
- package/dist/installer.js.map +1 -1
- package/dist/installers/codex-host-installer.d.ts.map +1 -1
- package/dist/installers/codex-host-installer.js +9 -12
- package/dist/installers/codex-host-installer.js.map +1 -1
- package/host-runtime/dist/adaptive-consumer-schedule.d.ts +103 -0
- package/host-runtime/dist/adaptive-consumer-schedule.js +145 -0
- package/host-runtime/dist/adaptive-priority-provider.d.ts +7 -1
- package/host-runtime/dist/adaptive-priority-provider.js +6 -3
- package/host-runtime/dist/adaptive-selection.d.ts +1 -1
- package/host-runtime/dist/adaptive-selection.js +2 -1
- package/host-runtime/dist/degraded-enforcement-marker.d.ts +35 -0
- package/host-runtime/dist/degraded-enforcement-marker.js +79 -0
- package/host-runtime/dist/index.d.ts +2 -0
- package/host-runtime/dist/index.js +8 -0
- package/host-runtime/dist/internalization-consumer-cycle.d.ts +35 -0
- package/host-runtime/dist/internalization-consumer-cycle.js +51 -17
- package/host-runtime/dist/prompt-activation-deliverability.d.ts +10 -0
- package/host-runtime/dist/prompt-activation-deliverability.js +5 -2
- package/host-runtime/dist/prompt-injection-event-evidence.d.ts +34 -0
- package/host-runtime/dist/prompt-injection-event-evidence.js +96 -0
- package/host-runtime/dist/signal-classifier.js +4 -4
- package/host-runtime/package.json +1 -1
- package/install-layout/dist/mcp-binding-contract.js +4 -15
- package/install-layout/package.json +1 -1
- package/package.json +3 -3
- package/pd-cli/dist/commands/health-codex.d.ts.map +1 -1
- package/pd-cli/dist/commands/health-codex.js +26 -1
- package/pd-cli/dist/commands/health-codex.js.map +1 -1
- package/pd-cli/dist/commands/health.d.ts.map +1 -1
- package/pd-cli/dist/commands/health.js +32 -2
- package/pd-cli/dist/commands/health.js.map +1 -1
- package/pd-cli/dist/commands/pain-retry.d.ts.map +1 -1
- package/pd-cli/dist/commands/pain-retry.js +6 -4
- package/pd-cli/dist/commands/pain-retry.js.map +1 -1
- package/pd-cli/dist/commands/runtime-init.d.ts.map +1 -1
- package/pd-cli/dist/commands/runtime-init.js +29 -1
- package/pd-cli/dist/commands/runtime-init.js.map +1 -1
- package/pd-cli/dist/commands/runtime-internalization-run-once.d.ts.map +1 -1
- package/pd-cli/dist/commands/runtime-internalization-run-once.js +9 -14
- package/pd-cli/dist/commands/runtime-internalization-run-once.js.map +1 -1
- package/pd-cli/dist/commands/runtime-internalization-run-rulehost.d.ts.map +1 -1
- package/pd-cli/dist/commands/runtime-internalization-run-rulehost.js +5 -5
- package/pd-cli/dist/commands/runtime-internalization-run-rulehost.js.map +1 -1
- package/pd-cli/dist/commands/runtime-usage.d.ts +62 -0
- package/pd-cli/dist/commands/runtime-usage.d.ts.map +1 -0
- package/pd-cli/dist/commands/runtime-usage.js +315 -0
- package/pd-cli/dist/commands/runtime-usage.js.map +1 -0
- package/pd-cli/dist/commands/runtime.js +6 -6
- package/pd-cli/dist/commands/runtime.js.map +1 -1
- package/pd-cli/dist/index.d.ts.map +1 -1
- package/pd-cli/dist/index.js +51 -17
- package/pd-cli/dist/index.js.map +1 -1
- package/pd-cli/dist/program.d.ts.map +1 -1
- package/pd-cli/dist/program.js +4 -0
- package/pd-cli/dist/program.js.map +1 -1
- package/pd-cli/dist/services/cli-invocation-log.d.ts +66 -0
- package/pd-cli/dist/services/cli-invocation-log.d.ts.map +1 -0
- package/pd-cli/dist/services/cli-invocation-log.js +139 -0
- package/pd-cli/dist/services/cli-invocation-log.js.map +1 -0
- package/pd-cli/dist/services/config-doctor.d.ts.map +1 -1
- package/pd-cli/dist/services/config-doctor.js +5 -4
- package/pd-cli/dist/services/config-doctor.js.map +1 -1
- package/pd-cli/dist/services/demo-story-a-runner.d.ts.map +1 -1
- package/pd-cli/dist/services/demo-story-a-runner.js +6 -2
- package/pd-cli/dist/services/demo-story-a-runner.js.map +1 -1
- package/pd-cli/dist/services/pd-config-loader.d.ts +3 -1
- package/pd-cli/dist/services/pd-config-loader.d.ts.map +1 -1
- package/pd-cli/dist/services/pd-config-loader.js +20 -8
- package/pd-cli/dist/services/pd-config-loader.js.map +1 -1
- package/pd-cli/dist/services/runtime-adapter-resolver.d.ts.map +1 -1
- package/pd-cli/dist/services/runtime-adapter-resolver.js +5 -5
- package/pd-cli/dist/services/runtime-adapter-resolver.js.map +1 -1
- package/pd-cli/package.json +1 -1
- package/plugin/dist/bundle.js +632 -536
- package/plugin/dist/core/signal-collector-host.d.ts +5 -0
- package/plugin/dist/governance-audit.js +2 -2
- package/plugin/dist/openclaw.plugin.json +1 -1
- package/plugin/dist/rulehost-evidence.js +13 -10
- package/plugin/dist/service/internalization-auto-consumer-service.d.ts +2 -1
- package/plugin/dist/templates/langs/en/skills/pd-pain-signal/SKILL.md +1 -1
- package/plugin/dist/templates/langs/zh/skills/pd-pain-signal/SKILL.md +1 -1
- package/plugin/openclaw.plugin.json +1 -1
- package/plugin/package.json +1 -1
- package/plugin/templates/langs/en/skills/pd-pain-signal/SKILL.md +1 -1
- package/plugin/templates/langs/zh/skills/pd-pain-signal/SKILL.md +1 -1
- package/release-manager/dist/installer.js +12 -5
- package/release-manager/dist/installers/codex-host-installer.js +9 -12
- package/release-manager/package.json +1 -1
- package/workbuddy-adapter/package.json +1 -1
- package/workbuddy-adapter/plugin/skills/pd-pain-signal/SKILL.md +1 -1
- package/dist/installers/mcp-binding-shape-mirror.d.ts +0 -27
- package/dist/installers/mcp-binding-shape-mirror.d.ts.map +0 -1
- package/dist/installers/mcp-binding-shape-mirror.js +0 -105
- package/dist/installers/mcp-binding-shape-mirror.js.map +0 -1
- package/release-manager/dist/installers/mcp-binding-shape-mirror.js +0 -105
|
@@ -33,12 +33,13 @@ export class DefaultRecoverySweep {
|
|
|
33
33
|
* internal telemetry fields.
|
|
34
34
|
*/
|
|
35
35
|
atomicRecover(db, taskId, now) {
|
|
36
|
-
const row = db.prepare('SELECT task_id, status, attempt_count, max_attempts, lease_expires_at, last_error FROM tasks WHERE task_id = ?').get(taskId);
|
|
36
|
+
const row = db.prepare('SELECT task_id, status, attempt_count, max_attempts, lease_owner, lease_expires_at, last_error FROM tasks WHERE task_id = ?').get(taskId);
|
|
37
37
|
if (!row)
|
|
38
38
|
return null;
|
|
39
39
|
const attemptCount = Number(row.attempt_count ?? 0);
|
|
40
40
|
const maxAttempts = Number(row.max_attempts ?? 3);
|
|
41
41
|
const leaseExpiresAt = row.lease_expires_at ? String(row.lease_expires_at) : undefined;
|
|
42
|
+
const leaseOwner = row.lease_owner === null || row.lease_owner === undefined ? null : String(row.lease_owner);
|
|
42
43
|
const status = String(row.status);
|
|
43
44
|
// Idempotency: not leased or not expired → nothing to do
|
|
44
45
|
if (status !== 'leased' || !leaseExpiresAt)
|
|
@@ -52,29 +53,42 @@ export class DefaultRecoverySweep {
|
|
|
52
53
|
const isDirtyStall = lastError === 'workspace_dirty';
|
|
53
54
|
// If dirty workspace stall and attempts remain → needs_human_review (terminal, no auto-retry)
|
|
54
55
|
if (isDirtyStall && attemptCount < maxAttempts) {
|
|
55
|
-
|
|
56
|
+
// SPEC-PD-PIPELINE-RELIABILITY-AND-EFFICIENCY-001 §5.4: the write is
|
|
57
|
+
// guarded by the lease identity observed in THIS transaction. A heartbeat
|
|
58
|
+
// that renewed the lease (new expires_at) between detection and this
|
|
59
|
+
// update makes the recovery a no-op instead of stealing a live task.
|
|
60
|
+
const changed = db.prepare(`
|
|
56
61
|
UPDATE tasks
|
|
57
|
-
SET status = 'needs_human_review', lease_owner = NULL, lease_expires_at = NULL,
|
|
58
|
-
|
|
59
|
-
|
|
62
|
+
SET status = 'needs_human_review', lease_owner = NULL, lease_expires_at = NULL,
|
|
63
|
+
updated_at = ?
|
|
64
|
+
WHERE task_id = ? AND status = 'leased' AND lease_owner IS ? AND lease_expires_at IS ?
|
|
65
|
+
`).run(now, taskId, leaseOwner, leaseExpiresAt).changes;
|
|
66
|
+
if (changed === 0)
|
|
67
|
+
return null;
|
|
60
68
|
return { taskId, recoveredAt: now, previousStatus, newStatus: 'needs_human_review', wasLeaseExpired: true, attemptCount };
|
|
61
69
|
}
|
|
62
70
|
if (this.retryPolicy.shouldRetry({ taskId, status, attemptCount, maxAttempts })) {
|
|
63
71
|
const backoffMs = this.retryPolicy.calculateBackoff(attemptCount + 1);
|
|
64
72
|
const retryExpiresAt = new Date(Date.now() + backoffMs).toISOString();
|
|
65
|
-
db.prepare(`
|
|
73
|
+
const changed = db.prepare(`
|
|
66
74
|
UPDATE tasks
|
|
67
|
-
SET status = 'retry_wait', lease_owner = NULL, lease_expires_at = ?,
|
|
68
|
-
|
|
69
|
-
|
|
75
|
+
SET status = 'retry_wait', lease_owner = NULL, lease_expires_at = ?,
|
|
76
|
+
last_error = ?, updated_at = ?
|
|
77
|
+
WHERE task_id = ? AND status = 'leased' AND lease_owner IS ? AND lease_expires_at IS ?
|
|
78
|
+
`).run(retryExpiresAt, 'lease_expired', now, taskId, leaseOwner, leaseExpiresAt).changes;
|
|
79
|
+
if (changed === 0)
|
|
80
|
+
return null;
|
|
70
81
|
return { taskId, recoveredAt: now, previousStatus, newStatus: 'retry_wait', wasLeaseExpired: true, attemptCount, backoffMs };
|
|
71
82
|
}
|
|
72
83
|
else {
|
|
73
|
-
db.prepare(`
|
|
84
|
+
const changed = db.prepare(`
|
|
74
85
|
UPDATE tasks
|
|
75
|
-
SET status = 'failed', lease_owner = NULL, lease_expires_at = NULL,
|
|
76
|
-
|
|
77
|
-
|
|
86
|
+
SET status = 'failed', lease_owner = NULL, lease_expires_at = NULL,
|
|
87
|
+
last_error = ?, updated_at = ?
|
|
88
|
+
WHERE task_id = ? AND status = 'leased' AND lease_owner IS ? AND lease_expires_at IS ?
|
|
89
|
+
`).run('max_attempts_exceeded', now, taskId, leaseOwner, leaseExpiresAt).changes;
|
|
90
|
+
if (changed === 0)
|
|
91
|
+
return null;
|
|
78
92
|
return { taskId, recoveredAt: now, previousStatus, newStatus: 'failed', wasLeaseExpired: true, attemptCount };
|
|
79
93
|
}
|
|
80
94
|
}
|
|
@@ -94,8 +108,11 @@ export class DefaultRecoverySweep {
|
|
|
94
108
|
async recoverTask(taskId) {
|
|
95
109
|
const db = this.connection.getDb();
|
|
96
110
|
const now = new Date().toISOString();
|
|
97
|
-
// Atomic read-check-write inside a transaction
|
|
98
|
-
|
|
111
|
+
// Atomic read-check-write inside a single IMMEDIATE transaction: the write
|
|
112
|
+
// lock is taken before the expiry re-check, so a heartbeat renewing the
|
|
113
|
+
// lease concurrently either lands before (recovery becomes a no-op) or
|
|
114
|
+
// after (renewal fails the fence) — never both.
|
|
115
|
+
const result = db.transaction(() => this.atomicRecover(db, taskId, now)).immediate();
|
|
99
116
|
if (!result)
|
|
100
117
|
return null;
|
|
101
118
|
// Emit telemetry after successful atomic update
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"recovery-sweep.js","sourceRoot":"","sources":["../../../../src/runtime/store/lifecycle/recovery-sweep.ts"],"names":[],"mappings":"AAoBA,OAAO,EAAE,YAAY,EAA0B,MAAM,qBAAqB,CAAC;AAkB3E,MAAM,OAAO,oBAAoB;IAKZ,SAAS;IACT,YAAY;IACZ,WAAW;IACX,UAAU;IAPZ,OAAO,CAAoB;IAE5C,yDAAyD;IACzD,YACmB,SAAoB,EACpB,YAA0B,EAC1B,WAAwB,EACxB,UAA4B,EAC7C,OAA2B;yBAJV,SAAS;4BACT,YAAY;2BACZ,WAAW;0BACX,UAAU;QAG3B,IAAI,CAAC,OAAO,GAAG,OAAO,IAAI,YAAY,CAAC;IACzC,CAAC;IAED;;;;;OAKG;IACH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,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC;gBACzB,SAAS,EAAE,aAAa;gBACxB,OAAO,EAAE,MAAM,CAAC,MAAM;gBACtB,SAAS,EAAE,MAAM,CAAC,WAAW;gBAC7B,SAAS,EAAE,QAAQ;gBACnB,OAAO,EAAE,EAAE,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,SAAS,EAAE,uBAAuB,EAAE,YAAY,EAAE,MAAM,CAAC,YAAY,EAAE;aAC1G,CAAC,CAAC;QACL,CAAC;QAED,OAAO,MAAM,CAAC;IAChB,CAAC;IAED;;;;;OAKG;IACH,KAAK,CAAC,UAAU;QACd,MAAM,UAAU,GAAG,MAAM,IAAI,CAAC,mBAAmB,EAAE,CAAC;QACpD,IAAI,SAAS,GAAG,CAAC,CAAC;QAClB,MAAM,MAAM,GAAa,EAAE,CAAC;QAE5B,KAAK,MAAM,MAAM,IAAI,UAAU,EAAE,CAAC;YAChC,IAAI,CAAC;gBACH,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC;gBAC9C,IAAI,MAAM;oBAAE,SAAS,EAAE,CAAC;YAC1B,CAAC;YAAC,OAAO,GAAG,EAAE,CAAC;gBACb,MAAM,CAAC,IAAI,CAAC,GAAG,MAAM,KAAK,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;YAChF,CAAC;QACH,CAAC;QAED,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,CAAC;IAC/B,CAAC;CACF"}
|
|
@@ -2,6 +2,22 @@ import { type RunRecord } from '../../runtime-protocol.js';
|
|
|
2
2
|
import { PDRuntimeError } from '../../error-categories.js';
|
|
3
3
|
import type { SqliteConnection } from '../sqlite-connection.js';
|
|
4
4
|
import type { DegradedRunInfo, RunStore, TolerantRunListResult } from './run-store.js';
|
|
5
|
+
/**
|
|
6
|
+
* Row shape for the pipeline health read model (SPEC §3).
|
|
7
|
+
*
|
|
8
|
+
* Kept module-internal: it is a store read DTO, not a public contract. The
|
|
9
|
+
* Console model declares a structurally identical mirror.
|
|
10
|
+
*/
|
|
11
|
+
export interface StageRunSample {
|
|
12
|
+
readonly runId: string;
|
|
13
|
+
readonly taskId: string;
|
|
14
|
+
readonly taskKind: string;
|
|
15
|
+
readonly startedAt: string;
|
|
16
|
+
readonly endedAt: string | null;
|
|
17
|
+
readonly executionStatus: string;
|
|
18
|
+
readonly errorCategory: string | null;
|
|
19
|
+
readonly attemptNumber: number;
|
|
20
|
+
}
|
|
5
21
|
export declare class MalformedRunError extends PDRuntimeError {
|
|
6
22
|
readonly validRuns: RunRecord[];
|
|
7
23
|
readonly degradedRuns: DegradedRunInfo[];
|
|
@@ -16,6 +32,19 @@ export declare class SqliteRunStore implements RunStore {
|
|
|
16
32
|
listRunsByTask(taskId: string): Promise<RunRecord[]>;
|
|
17
33
|
listValidRunsByTaskTolerant(taskId: string): Promise<TolerantRunListResult>;
|
|
18
34
|
getLatestRunStartedAtForTaskKind(taskKind: string): Promise<string | null>;
|
|
35
|
+
/**
|
|
36
|
+
* SPEC-PD-PIPELINE-RELIABILITY-AND-EFFICIENCY-001 §3: bounded, read-only run
|
|
37
|
+
* samples joined to their task kind, for the pipeline health projection.
|
|
38
|
+
*
|
|
39
|
+
* Why a store method instead of console SQL: `runs` schema knowledge stays in
|
|
40
|
+
* the package that owns it. The caller supplies the window; the LIMIT keeps
|
|
41
|
+
* memory bounded on a long-lived workspace. Malformed rows fail loud (rc-3) —
|
|
42
|
+
* a metrics read model must not silently drop evidence.
|
|
43
|
+
*/
|
|
44
|
+
listStageRunSamples(input: {
|
|
45
|
+
sinceIso: string;
|
|
46
|
+
limit?: number;
|
|
47
|
+
}): Promise<StageRunSample[]>;
|
|
19
48
|
deleteRun(runId: string): Promise<boolean>;
|
|
20
49
|
/**
|
|
21
50
|
* Convert a raw DB row into a validated RunRecord.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sqlite-run-store.d.ts","sourceRoot":"","sources":["../../../../src/runtime/store/run/sqlite-run-store.ts"],"names":[],"mappings":"AAOA,OAAO,EAAsC,KAAK,SAAS,EAA2B,MAAM,2BAA2B,CAAC;AACxH,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAC3D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,KAAK,EAAE,eAAe,EAAE,QAAQ,EAAE,qBAAqB,EAAE,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"sqlite-run-store.d.ts","sourceRoot":"","sources":["../../../../src/runtime/store/run/sqlite-run-store.ts"],"names":[],"mappings":"AAOA,OAAO,EAAsC,KAAK,SAAS,EAA2B,MAAM,2BAA2B,CAAC;AACxH,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAC3D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,KAAK,EAAE,eAAe,EAAE,QAAQ,EAAE,qBAAqB,EAAE,MAAM,gBAAgB,CAAC;AAEvF;;;;;GAKG;AACH,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IAChC,QAAQ,CAAC,eAAe,EAAE,MAAM,CAAC;IACjC,QAAQ,CAAC,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IACtC,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC;CAChC;AAiED,qBAAa,iBAAkB,SAAQ,cAAc;aAGjC,SAAS,EAAE,SAAS,EAAE;aACtB,YAAY,EAAE,e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AAO,CAAC,GAAG,SAAS,CAsC1D;CACF"}
|
|
@@ -181,6 +181,46 @@ export class SqliteRunStore {
|
|
|
181
181
|
const latest = row?.latest;
|
|
182
182
|
return typeof latest === 'string' && latest.length > 0 ? latest : null;
|
|
183
183
|
}
|
|
184
|
+
/**
|
|
185
|
+
* SPEC-PD-PIPELINE-RELIABILITY-AND-EFFICIENCY-001 §3: bounded, read-only run
|
|
186
|
+
* samples joined to their task kind, for the pipeline health projection.
|
|
187
|
+
*
|
|
188
|
+
* Why a store method instead of console SQL: `runs` schema knowledge stays in
|
|
189
|
+
* the package that owns it. The caller supplies the window; the LIMIT keeps
|
|
190
|
+
* memory bounded on a long-lived workspace. Malformed rows fail loud (rc-3) —
|
|
191
|
+
* a metrics read model must not silently drop evidence.
|
|
192
|
+
*/
|
|
193
|
+
async listStageRunSamples(input) {
|
|
194
|
+
const db = this.connection.getDb();
|
|
195
|
+
const limit = Math.max(1, Math.min(5000, Math.floor(input.limit ?? 2000)));
|
|
196
|
+
const rows = db
|
|
197
|
+
.prepare(`
|
|
198
|
+
SELECT r.run_id, r.task_id, t.task_kind, r.started_at, r.ended_at, r.execution_status, r.error_category, r.attempt_number
|
|
199
|
+
FROM runs r
|
|
200
|
+
JOIN tasks t ON t.task_id = r.task_id
|
|
201
|
+
WHERE r.started_at >= ?
|
|
202
|
+
ORDER BY r.started_at DESC
|
|
203
|
+
LIMIT ?
|
|
204
|
+
`)
|
|
205
|
+
.all(input.sinceIso, limit);
|
|
206
|
+
const samples = [];
|
|
207
|
+
for (const row of rows) {
|
|
208
|
+
const runId = readRequiredString(row.run_id, 'run_id', String(row.run_id ?? 'unknown'));
|
|
209
|
+
samples.push({
|
|
210
|
+
runId,
|
|
211
|
+
taskId: readRequiredString(row.task_id, 'task_id', runId),
|
|
212
|
+
taskKind: readRequiredString(row.task_kind, 'task_kind', runId),
|
|
213
|
+
startedAt: readRequiredString(row.started_at, 'started_at', runId),
|
|
214
|
+
endedAt: typeof row.ended_at === 'string' && row.ended_at.length > 0 ? row.ended_at : null,
|
|
215
|
+
executionStatus: readRequiredString(row.execution_status, 'execution_status', runId),
|
|
216
|
+
errorCategory: typeof row.error_category === 'string' && row.error_category.length > 0 ? row.error_category : null,
|
|
217
|
+
attemptNumber: typeof row.attempt_number === 'number' && Number.isInteger(row.attempt_number) && row.attempt_number >= 0
|
|
218
|
+
? row.attempt_number
|
|
219
|
+
: 0,
|
|
220
|
+
});
|
|
221
|
+
}
|
|
222
|
+
return samples;
|
|
223
|
+
}
|
|
184
224
|
async deleteRun(runId) {
|
|
185
225
|
const db = this.connection.getDb();
|
|
186
226
|
const result = db.prepare('DELETE FROM runs WHERE run_id = ?').run(runId);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sqlite-run-store.js","sourceRoot":"","sources":["../../../../src/runtime/store/run/sqlite-run-store.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAAE,KAAK,EAAE,MAAM,yBAAyB,CAAC;AAChD,OAAO,EAAE,iBAAiB,EAAE,eAAe,EAA2C,MAAM,2BAA2B,CAAC;AACxH,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;
|
|
1
|
+
{"version":3,"file":"sqlite-run-store.js","sourceRoot":"","sources":["../../../../src/runtime/store/run/sqlite-run-store.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAAE,KAAK,EAAE,MAAM,yBAAyB,CAAC;AAChD,OAAO,EAAE,iBAAiB,EAAE,eAAe,EAA2C,MAAM,2BAA2B,CAAC;AACxH,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAqB3D,gFAAgF;AAChF,EAAE;AACF,4EAA4E;AAC5E,8EAA8E;AAC9E,8EAA8E;AAC9E,8EAA8E;AAC9E,4EAA4E;AAC5E,kEAAkE;AAElE,gFAAgF;AAChF,SAAS,kBAAkB,CAAC,KAAc,EAAE,SAAiB,EAAE,aAAqB;IAClF,IAAI,OAAO,KAAK,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kB,CAAC,GAAG,CAAC,MAAM,EAAE,QAAQ,EAAE,aAAa,CAAC;YAC/D,SAAS,EAAE,kBAAkB,CAAC,GAAG,CAAC,UAAU,EAAE,YAAY,EAAE,aAAa,CAAC;YAC1E,YAAY,EAAE,kBAAkB,CAAC,GAAG,CAAC,aAAa,EAAE,eAAe,EAAE,aAAa,CAAC;YACnF,aAAa,EAAE,kBAAkB,CAAC,GAAG,CAAC,cAAc,EAAE,gBAAgB,EAAE,aAAa,CAAC;YACtF,wEAAwE;YACxE,aAAa,EAAE,CAAC,GAAG,CAAC,cAAc,IAAI,SAAS,CAA+B;SAC/E,CAAC;QAEF,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,eAAe,EAAE,MAAM,CAAC,EAAE,CAAC;YAC1C,MAAM,MAAM,GAAG,CAAC,GAAG,KAAK,CAAC,MAAM,CAAC,eAAe,EAAE,MAAM,CAAC,CAAC,CAAC;YAC1D,MAAM,OAAO,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;YACtE,MAAM,IAAI,cAAc,CACtB,qBAAqB,EACrB,OAAO,aAAa,wBAAwB,OAAO,EAAE,CACtD,CAAC;QACJ,CAAC;QAED,OAAO,MAAM,CAAC;IAChB,CAAC;CACF"}
|
|
@@ -20,13 +20,15 @@
|
|
|
20
20
|
import type { SqliteConnection } from './sqlite-connection.js';
|
|
21
21
|
import type { TaskStore, TaskStoreFilter, TaskStoreUpdatePatch } from './task/task-store.js';
|
|
22
22
|
import type { RunStore, RunRecord, TolerantRunListResult } from './run/run-store.js';
|
|
23
|
-
import type { AcquireLeaseOptions } from './lifecycle/lease-manager.js';
|
|
23
|
+
import type { AcquireLeaseOptions, LeaseAcquisition } from './lifecycle/lease-manager.js';
|
|
24
|
+
import type { LeaseFence } from './lifecycle/lease-fence.js';
|
|
24
25
|
import type { RetryPolicy, RetryPolicyConfig } from './lifecycle/retry-policy.js';
|
|
25
26
|
import type { RecoveryResult } from './lifecycle/recovery-sweep.js';
|
|
26
27
|
import type { PDErrorCategory } from '../error-categories.js';
|
|
27
28
|
import type { TaskRecord } from '../task-status.js';
|
|
28
29
|
import { type StoreEventEmitter } from './event-emitter.js';
|
|
29
30
|
import { type TaskArtifactCasInput } from './task/sqlite-task-store.js';
|
|
31
|
+
import type { CommitResult, CommitInput, CommitPIArtifactInput } from './commit/diagnostician-committer.js';
|
|
30
32
|
import type { AdmissionEvaluationRecord, AdmissionProcessingRecord, CandidateAdmissionDocument } from './candidate/admission-document.js';
|
|
31
33
|
import type { PIArtifactStore } from '../internalization/pi-artifact.js';
|
|
32
34
|
import type { PainDiagnosisRecord, PainDiagnosisWriteInput } from './pain-diagnosis/pain-diagnosis-store.js';
|
|
@@ -66,6 +68,8 @@ export declare class RuntimeStateManager {
|
|
|
66
68
|
private leaseManager;
|
|
67
69
|
private retryPolicy;
|
|
68
70
|
private recoverySweep;
|
|
71
|
+
private fencedLifecycle;
|
|
72
|
+
private diagnosticianCommitter;
|
|
69
73
|
private readonly emitter;
|
|
70
74
|
private _initialized;
|
|
71
75
|
constructor(options: RuntimeStateManagerOptions);
|
|
@@ -99,18 +103,68 @@ export declare class RuntimeStateManager {
|
|
|
99
103
|
getValidRunsByTaskTolerant(taskId: string): Promise<TolerantRunListResult>;
|
|
100
104
|
getRun(runId: string): Promise<RunRecord | null>;
|
|
101
105
|
acquireLease(options: AcquireLeaseOptions): Promise<TaskRecord>;
|
|
102
|
-
|
|
103
|
-
|
|
106
|
+
/**
|
|
107
|
+
* Acquisition variant that returns the execution identity (runId + fencing
|
|
108
|
+
* token). Every production execution path uses this; `acquireLease` exists
|
|
109
|
+
* only for bootstrap tooling that never writes an execution result.
|
|
110
|
+
*/
|
|
111
|
+
acquireLeaseDetailed(options: AcquireLeaseOptions): Promise<LeaseAcquisition>;
|
|
112
|
+
releaseLease(fence: LeaseFence): Promise<TaskRecord>;
|
|
113
|
+
renewLease(fence: LeaseFence, durationMs?: number): Promise<TaskRecord>;
|
|
104
114
|
forceExpireLease(taskId: string): Promise<TaskRecord>;
|
|
105
115
|
isLeaseExpired(task: TaskRecord): boolean;
|
|
106
|
-
/**
|
|
107
|
-
|
|
108
|
-
/**
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
*
|
|
116
|
+
/** Fence-only ownership probe (task exists + leased + owner + generation + live). */
|
|
117
|
+
assertLeaseOwned(fence: LeaseFence): Promise<boolean>;
|
|
118
|
+
/**
|
|
119
|
+
* Mark a task as succeeded. SPEC §5.3: the fence is REQUIRED and is part of
|
|
120
|
+
* the same UPDATE that mutates the row; the caller's explicit `runId` is the
|
|
121
|
+
* only run updated, in the same transaction.
|
|
122
|
+
*/
|
|
123
|
+
markTaskSucceeded(taskId: string, resultRef: string | undefined, fence: LeaseFence, runId: string): Promise<TaskRecord>;
|
|
124
|
+
/** Mark a task as failed (fenced; run addressed explicitly). */
|
|
125
|
+
markTaskFailed(taskId: string, lastError: PDErrorCategory, failureReason: string | undefined, fence: LeaseFence, runId: string): Promise<TaskRecord>;
|
|
126
|
+
/**
|
|
127
|
+
* Mark a task as retry_wait (fenced).
|
|
128
|
+
*
|
|
129
|
+
* The run is the caller's OWN run — never "the newest run", which after a
|
|
130
|
+
* concurrent re-acquisition belongs to a different execution. Task and run
|
|
131
|
+
* are written in one transaction, so a failed CAS leaves neither changed.
|
|
132
|
+
*/
|
|
133
|
+
markTaskRetryWait(taskId: string, errorCategory: PDErrorCategory, failureReason: string | undefined, fence: LeaseFence, runId: string): Promise<TaskRecord>;
|
|
134
|
+
private finalizeFenced;
|
|
135
|
+
/**
|
|
136
|
+
* ONE transaction for the whole Stage C result publication:
|
|
137
|
+
* fence CAS → artifact + commit + candidates → pi_artifacts → task/run success.
|
|
138
|
+
*
|
|
139
|
+
* SPEC §5.3: calling `assertOwned()` before `committer.commit()` and then
|
|
140
|
+
* writing three times is a check-then-write race — the lease can be
|
|
141
|
+
* reclaimed in between, publishing a result nobody owns. Here every write is
|
|
142
|
+
* inside the same transaction as the CAS, so either the whole result becomes
|
|
143
|
+
* durable under a live fence or nothing does.
|
|
144
|
+
*
|
|
145
|
+
* The idempotency key passed to the committer must already bind the execution
|
|
146
|
+
* identity (`taskId:runId`); this method does not invent a second key.
|
|
147
|
+
*/
|
|
148
|
+
commitDiagnosticianAndFinalize(input: {
|
|
149
|
+
fence: LeaseFence;
|
|
150
|
+
runId: string;
|
|
151
|
+
/** Defaults to `commit://<commitId>` (the id is minted inside the unit). */
|
|
152
|
+
resultRef?: string;
|
|
153
|
+
commit: CommitInput;
|
|
154
|
+
piArtifact?: CommitPIArtifactInput & {
|
|
155
|
+
sourceTaskId: string;
|
|
156
|
+
};
|
|
157
|
+
}): Promise<{
|
|
158
|
+
commit: CommitResult;
|
|
159
|
+
task: TaskRecord;
|
|
160
|
+
resultRef: string;
|
|
161
|
+
}>;
|
|
162
|
+
/**
|
|
163
|
+
* Fenced diagnostic-JSON write: read + mutate + conditional UPDATE in ONE
|
|
164
|
+
* transaction. A superseded worker gets `lease_conflict`, never a silent
|
|
165
|
+
* overwrite of the new execution's facts.
|
|
112
166
|
*/
|
|
113
|
-
|
|
167
|
+
applyFencedDiagnosticJson(fence: LeaseFence, mutate: (currentDiagnosticJson: string | null) => string): Promise<TaskRecord>;
|
|
114
168
|
/**
|
|
115
169
|
* Write output payload to a run record.
|
|
116
170
|
* Per D-04: DiagnosticianOutputV2 JSON serialized into RunRecord.outputPayload.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runtime-state-manager.d.ts","sourceRoot":"","sources":["../../../src/runtime/store/runtime-state-manager.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AACH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC/D,OAAO,KAAK,EAAE,SAAS,EAAE,eAAe,EAAE,oBAAoB,EAA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