create-principles-disciple 1.150.3 → 1.150.6
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/ingestion/admission.js +2 -0
- package/codex-adapter/dist/ingestion/ingestion.js +25 -4
- package/codex-adapter/dist/ingestion/transcript-decoder.d.ts +5 -3
- package/codex-adapter/dist/ingestion/transcript-decoder.js +61 -5
- package/codex-adapter/dist/pd-hook.d.ts +7 -5
- package/codex-adapter/dist/pd-hook.js +18 -7
- package/codex-adapter/dist/tool-semantics.js +5 -1
- package/codex-adapter/dist/worker/workspace-worker.js +4 -2
- package/codex-adapter/package.json +1 -1
- package/console/dist/lib/utils.js +16 -1
- package/console/dist/server/index.js +14 -2
- package/console/dist/server/models/ActivationsConsoleModel.js +3 -2
- package/console/dist/server/models/ApprovalsConsoleModel.js +2 -1
- package/console/dist/server/models/ApprovalsGroupedConsoleModel.js +2 -1
- package/console/dist/server/models/EvidenceChainConsoleModel.d.ts +46 -0
- package/console/dist/server/models/EvidenceChainConsoleModel.js +121 -2
- package/console/dist/server/models/GovernanceConsoleModel.js +3 -2
- package/console/dist/server/models/GovernanceExperienceCollector.js +2 -1
- package/console/dist/server/models/GovernanceProjectionCollector.js +2 -1
- package/console/dist/server/models/IngestionHealthModel.d.ts +34 -0
- package/console/dist/server/models/IngestionHealthModel.js +254 -0
- package/console/dist/server/models/IntentDecisionModel.js +2 -2
- package/console/dist/server/models/IntentPageModel.js +2 -1
- package/console/dist/server/models/OwnerDecisionConsoleModel.js +3 -3
- package/console/dist/server/models/OwnerDecisionViewModel.js +2 -2
- package/console/dist/server/models/PrincipleTrajectoryModel.js +2 -1
- package/console/dist/server/models/ReceiptsConsoleModel.js +2 -2
- package/console/dist/server/models/RuleCandidateBindingConsoleModel.js +3 -2
- package/console/dist/server/routes/diagnostician.js +2 -1
- package/console/dist/server/routes/evidence-chain.d.ts +4 -0
- package/console/dist/server/routes/evidence-chain.js +22 -0
- package/console/dist/server/routes/failed-tasks.js +78 -2
- package/console/dist/server/routes/health.d.ts +8 -0
- package/console/dist/server/routes/health.js +72 -0
- package/console/dist/server/routes/owner-identity.d.ts +6 -0
- package/console/dist/server/routes/owner-identity.js +7 -3
- package/console/dist/server/routes/principles.js +3 -3
- package/console/dist/web/assets/app.css +150 -46
- package/console/dist/web/assets/app.js +37 -32
- package/console/package.json +2 -0
- package/core/dist/runtime/activation/adaptive-selection-output.d.ts +0 -21
- package/core/dist/runtime/activation/adaptive-selection-output.d.ts.map +1 -1
- package/core/dist/runtime/activation/adaptive-selection-output.js.map +1 -1
- package/core/dist/runtime/activation/index.d.ts +2 -6
- package/core/dist/runtime/activation/index.d.ts.map +1 -1
- package/core/dist/runtime/activation/index.js.map +1 -1
- package/core/dist/runtime/activation/production-gate-deps.d.ts +2 -1
- package/core/dist/runtime/activation/production-gate-deps.d.ts.map +1 -1
- package/core/dist/runtime/activation/prompt-activation-reader-contract.d.ts +2 -1
- package/core/dist/runtime/activation/prompt-activation-reader-contract.d.ts.map +1 -1
- package/core/dist/runtime/activation/writers/index.d.ts +0 -1
- package/core/dist/runtime/activation/writers/index.d.ts.map +1 -1
- package/core/dist/runtime/activation/writers/rule-host-writer.d.ts.map +1 -1
- package/core/dist/runtime/activation/writers/rule-host-writer.js +15 -6
- package/core/dist/runtime/activation/writers/rule-host-writer.js.map +1 -1
- package/core/dist/runtime/activation-compatibility-read-model.d.ts +3 -2
- package/core/dist/runtime/activation-compatibility-read-model.d.ts.map +1 -1
- package/core/dist/runtime/activation-compatibility-read-model.js +2 -1
- package/core/dist/runtime/activation-compatibility-read-model.js.map +1 -1
- package/core/dist/runtime/adapter/context-budget.d.ts +3 -14
- package/core/dist/runtime/adapter/context-budget.d.ts.map +1 -1
- package/core/dist/runtime/adapter/context-budget.js +2 -2
- package/core/dist/runtime/adapter/context-budget.js.map +1 -1
- package/core/dist/runtime/adapter/index.d.ts +1 -2
- package/core/dist/runtime/adapter/index.d.ts.map +1 -1
- package/core/dist/runtime/adapter/index.js +1 -1
- package/core/dist/runtime/adapter/index.js.map +1 -1
- package/core/dist/runtime/adapter/output-repair-contract.d.ts +18 -1
- package/core/dist/runtime/adapter/output-repair-contract.d.ts.map +1 -1
- package/core/dist/runtime/adapter/output-repair-contract.js +94 -0
- package/core/dist/runtime/adapter/output-repair-contract.js.map +1 -1
- package/core/dist/runtime/adapter/pi-ai-runtime-adapter.d.ts +2 -3
- package/core/dist/runtime/adapter/pi-ai-runtime-adapter.d.ts.map +1 -1
- package/core/dist/runtime/adapter/pi-ai-runtime-adapter.js +111 -21
- package/core/dist/runtime/adapter/pi-ai-runtime-adapter.js.map +1 -1
- package/core/dist/runtime/adapter/principle-tree-ledger-adapter.d.ts +1 -1
- package/core/dist/runtime/adapter/principle-tree-ledger-adapter.d.ts.map +1 -1
- package/core/dist/runtime/adapter/schema-prompt-adapter.d.ts +0 -1
- package/core/dist/runtime/adapter/schema-prompt-adapter.d.ts.map +1 -1
- package/core/dist/runtime/adapter/schema-prompt-adapter.js +43 -1
- package/core/dist/runtime/adapter/schema-prompt-adapter.js.map +1 -1
- package/core/dist/runtime/bridge-result-shaper.d.ts +1 -1
- package/core/dist/runtime/bridge-result-shaper.d.ts.map +1 -1
- package/core/dist/runtime/candidate-audit.d.ts.map +1 -1
- package/core/dist/runtime/candidate-audit.js +2 -1
- package/core/dist/runtime/candidate-audit.js.map +1 -1
- package/core/dist/runtime/candidate-intake-service.d.ts +2 -1
- package/core/dist/runtime/candidate-intake-service.d.ts.map +1 -1
- package/core/dist/runtime/cli/diagnose.d.ts +4 -3
- package/core/dist/runtime/cli/diagnose.d.ts.map +1 -1
- package/core/dist/runtime/config/index.d.ts +2 -2
- package/core/dist/runtime/config/index.d.ts.map +1 -1
- package/core/dist/runtime/config/index.js +3 -3
- package/core/dist/runtime/config/index.js.map +1 -1
- package/core/dist/runtime/config/pd-config-defaults.d.ts +0 -2
- package/core/dist/runtime/config/pd-config-defaults.d.ts.map +1 -1
- package/core/dist/runtime/config/pd-config-defaults.js +2 -2
- package/core/dist/runtime/config/pd-config-defaults.js.map +1 -1
- package/core/dist/runtime/config/pd-config-effective.d.ts.map +1 -1
- package/core/dist/runtime/config/pd-config-effective.js +2 -0
- package/core/dist/runtime/config/pd-config-effective.js.map +1 -1
- package/core/dist/runtime/config/pd-config-types.d.ts +54 -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-config-validate.d.ts.map +1 -1
- package/core/dist/runtime/config/pd-config-validate.js +143 -0
- package/core/dist/runtime/config/pd-config-validate.js.map +1 -1
- package/core/dist/runtime/config/pd-profile-constants.d.ts +1 -7
- package/core/dist/runtime/config/pd-profile-constants.d.ts.map +1 -1
- package/core/dist/runtime/config/pd-profile-constants.js +5 -6
- package/core/dist/runtime/config/pd-profile-constants.js.map +1 -1
- package/core/dist/runtime/config/pd-validate-profile.d.ts +3 -2
- package/core/dist/runtime/config/pd-validate-profile.d.ts.map +1 -1
- package/core/dist/runtime/context-payload.d.ts +0 -7
- package/core/dist/runtime/context-payload.d.ts.map +1 -1
- package/core/dist/runtime/context-payload.js +1 -1
- package/core/dist/runtime/context-payload.js.map +1 -1
- package/core/dist/runtime/core-principles/index.d.ts +1 -1
- package/core/dist/runtime/core-principles/index.d.ts.map +1 -1
- package/core/dist/runtime/correction/correction-types.d.ts +0 -10
- package/core/dist/runtime/correction/correction-types.d.ts.map +1 -1
- package/core/dist/runtime/correction/correction-types.js.map +1 -1
- package/core/dist/runtime/diagnostician/diag-distiller-output.d.ts +0 -3
- package/core/dist/runtime/diagnostician/diag-distiller-output.d.ts.map +1 -1
- package/core/dist/runtime/diagnostician/diag-distiller-output.js +1 -1
- package/core/dist/runtime/diagnostician/diag-distiller-output.js.map +1 -1
- package/core/dist/runtime/diagnostician/diag-rootcause-output.d.ts +3 -11
- package/core/dist/runtime/diagnostician/diag-rootcause-output.d.ts.map +1 -1
- package/core/dist/runtime/diagnostician/diag-rootcause-output.js +3 -3
- package/core/dist/runtime/diagnostician/diag-rootcause-output.js.map +1 -1
- package/core/dist/runtime/diagnostician/distiller-prompt-builder.d.ts +5 -4
- package/core/dist/runtime/diagnostician/distiller-prompt-builder.d.ts.map +1 -1
- package/core/dist/runtime/diagnostician/evidence-ref-binding.d.ts +2 -1
- package/core/dist/runtime/diagnostician/evidence-ref-binding.d.ts.map +1 -1
- package/core/dist/runtime/diagnostician/rootcause-prompt-builder.d.ts +2 -1
- package/core/dist/runtime/diagnostician/rootcause-prompt-builder.d.ts.map +1 -1
- package/core/dist/runtime/diagnostician/router-prompt-builder.d.ts +22 -3
- package/core/dist/runtime/diagnostician/router-prompt-builder.d.ts.map +1 -1
- package/core/dist/runtime/diagnostician/router-prompt-builder.js +11 -1
- package/core/dist/runtime/diagnostician/router-prompt-builder.js.map +1 -1
- package/core/dist/runtime/diagnostician-association-shadow.d.ts +2 -2
- package/core/dist/runtime/diagnostician-association-shadow.d.ts.map +1 -1
- package/core/dist/runtime/diagnostician-association-validation.d.ts +3 -2
- package/core/dist/runtime/diagnostician-association-validation.d.ts.map +1 -1
- package/core/dist/runtime/diagnostician-output.d.ts +32 -5
- package/core/dist/runtime/diagnostician-output.d.ts.map +1 -1
- package/core/dist/runtime/diagnostician-output.js +47 -4
- package/core/dist/runtime/diagnostician-output.js.map +1 -1
- package/core/dist/runtime/diagnostician-prompt-builder.d.ts +2 -1
- package/core/dist/runtime/diagnostician-prompt-builder.d.ts.map +1 -1
- package/core/dist/runtime/error-categories.d.ts.map +1 -1
- package/core/dist/runtime/error-categories.js +10 -1
- package/core/dist/runtime/error-categories.js.map +1 -1
- package/core/dist/runtime/evidence-sanitizer.d.ts +8 -1
- package/core/dist/runtime/evidence-sanitizer.d.ts.map +1 -1
- package/core/dist/runtime/evidence-sanitizer.js +10 -3
- package/core/dist/runtime/evidence-sanitizer.js.map +1 -1
- package/core/dist/runtime/evolution/evolution-types.d.ts +0 -26
- package/core/dist/runtime/evolution/evolution-types.d.ts.map +1 -1
- package/core/dist/runtime/evolution/evolution-types.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 +8 -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 +24 -0
- package/core/dist/runtime/feature-flags/feature-flag-lifecycle.js.map +1 -1
- package/core/dist/runtime/feature-flags/index.d.ts +0 -1
- package/core/dist/runtime/feature-flags/index.d.ts.map +1 -1
- package/core/dist/runtime/feature-flags/index.js.map +1 -1
- package/core/dist/runtime/golden-trace.d.ts +9 -1
- package/core/dist/runtime/golden-trace.d.ts.map +1 -1
- package/core/dist/runtime/golden-trace.js +7 -0
- package/core/dist/runtime/golden-trace.js.map +1 -1
- package/core/dist/runtime/governance-projection-contract.d.ts +0 -6
- package/core/dist/runtime/governance-projection-contract.d.ts.map +1 -1
- package/core/dist/runtime/governance-projection-contract.js +3 -3
- package/core/dist/runtime/governance-projection-contract.js.map +1 -1
- package/core/dist/runtime/index.d.ts +2 -0
- package/core/dist/runtime/index.d.ts.map +1 -1
- package/core/dist/runtime/index.js +2 -0
- package/core/dist/runtime/index.js.map +1 -1
- package/core/dist/runtime/internalization/artifact-summary.d.ts +5 -4
- package/core/dist/runtime/internalization/artifact-summary.d.ts.map +1 -1
- package/core/dist/runtime/internalization/artifact-summary.js +1 -1
- package/core/dist/runtime/internalization/artifact-summary.js.map +1 -1
- package/core/dist/runtime/internalization/artificer-intent-preflight.d.ts +1 -1
- package/core/dist/runtime/internalization/artificer-intent-preflight.d.ts.map +1 -1
- package/core/dist/runtime/internalization/artificer-output.d.ts +0 -2
- package/core/dist/runtime/internalization/artificer-output.d.ts.map +1 -1
- package/core/dist/runtime/internalization/artificer-output.js +17 -0
- package/core/dist/runtime/internalization/artificer-output.js.map +1 -1
- package/core/dist/runtime/internalization/artificer-prompt-builder.d.ts +14 -3
- package/core/dist/runtime/internalization/artificer-prompt-builder.d.ts.map +1 -1
- package/core/dist/runtime/internalization/artificer-prompt-builder.js +13 -1
- package/core/dist/runtime/internalization/artificer-prompt-builder.js.map +1 -1
- package/core/dist/runtime/internalization/artificer-run-correlation.d.ts +3 -2
- package/core/dist/runtime/internalization/artificer-run-correlation.d.ts.map +1 -1
- package/core/dist/runtime/internalization/consumer-evidence-preflight.d.ts +2 -1
- package/core/dist/runtime/internalization/consumer-evidence-preflight.d.ts.map +1 -1
- package/core/dist/runtime/internalization/diag-distiller-runner.d.ts +1 -1
- package/core/dist/runtime/internalization/diag-distiller-runner.d.ts.map +1 -1
- package/core/dist/runtime/internalization/diag-rootcause-runner.d.ts +1 -1
- package/core/dist/runtime/internalization/diag-rootcause-runner.d.ts.map +1 -1
- package/core/dist/runtime/internalization/diag-router-runner.d.ts +11 -1
- package/core/dist/runtime/internalization/diag-router-runner.d.ts.map +1 -1
- package/core/dist/runtime/internalization/diag-router-runner.js +105 -1
- package/core/dist/runtime/internalization/diag-router-runner.js.map +1 -1
- package/core/dist/runtime/internalization/dreamer-output.d.ts +0 -9
- package/core/dist/runtime/internalization/dreamer-output.d.ts.map +1 -1
- package/core/dist/runtime/internalization/dreamer-output.js +1 -1
- package/core/dist/runtime/internalization/dreamer-output.js.map +1 -1
- package/core/dist/runtime/internalization/dreamer-prompt-builder.d.ts +3 -2
- package/core/dist/runtime/internalization/dreamer-prompt-builder.d.ts.map +1 -1
- package/core/dist/runtime/internalization/dreamer-runner.d.ts +1 -1
- package/core/dist/runtime/internalization/dreamer-runner.d.ts.map +1 -1
- package/core/dist/runtime/internalization/evaluator-output.d.ts +7 -17
- package/core/dist/runtime/internalization/evaluator-output.d.ts.map +1 -1
- package/core/dist/runtime/internalization/evaluator-output.js +2 -2
- package/core/dist/runtime/internalization/evaluator-output.js.map +1 -1
- package/core/dist/runtime/internalization/evaluator-prompt-builder.d.ts +3 -9
- package/core/dist/runtime/internalization/evaluator-prompt-builder.d.ts.map +1 -1
- package/core/dist/runtime/internalization/evaluator-prompt-builder.js +1 -1
- package/core/dist/runtime/internalization/evaluator-prompt-builder.js.map +1 -1
- package/core/dist/runtime/internalization/formation-context.d.ts +4 -6
- package/core/dist/runtime/internalization/formation-context.d.ts.map +1 -1
- package/core/dist/runtime/internalization/formation-context.js +3 -3
- package/core/dist/runtime/internalization/formation-context.js.map +1 -1
- package/core/dist/runtime/internalization/index.d.ts +2 -4
- package/core/dist/runtime/internalization/index.d.ts.map +1 -1
- package/core/dist/runtime/internalization/index.js +8 -1
- package/core/dist/runtime/internalization/index.js.map +1 -1
- package/core/dist/runtime/internalization/intake-to-internalization-bridge.d.ts +2 -1
- package/core/dist/runtime/internalization/intake-to-internalization-bridge.d.ts.map +1 -1
- package/core/dist/runtime/internalization/intent-contract.d.ts +2 -1
- package/core/dist/runtime/internalization/intent-contract.d.ts.map +1 -1
- package/core/dist/runtime/internalization/internalization-job-graph.d.ts +1 -1
- package/core/dist/runtime/internalization/internalization-job-graph.d.ts.map +1 -1
- package/core/dist/runtime/internalization/internalization-route.d.ts +2 -1
- package/core/dist/runtime/internalization/internalization-route.d.ts.map +1 -1
- package/core/dist/runtime/internalization/owner-decision-review.d.ts +3 -2
- package/core/dist/runtime/internalization/owner-decision-review.d.ts.map +1 -1
- package/core/dist/runtime/internalization/owner-resolution-service.d.ts +2 -1
- package/core/dist/runtime/internalization/owner-resolution-service.d.ts.map +1 -1
- package/core/dist/runtime/internalization/owner-retry.d.ts +2 -1
- package/core/dist/runtime/internalization/owner-retry.d.ts.map +1 -1
- package/core/dist/runtime/internalization/owner-review.d.ts +2 -21
- package/core/dist/runtime/internalization/owner-review.d.ts.map +1 -1
- package/core/dist/runtime/internalization/owner-review.js +2 -2
- package/core/dist/runtime/internalization/owner-review.js.map +1 -1
- package/core/dist/runtime/internalization/peer-runner-contracts.d.ts +2 -5
- package/core/dist/runtime/internalization/peer-runner-contracts.d.ts.map +1 -1
- package/core/dist/runtime/internalization/peer-runner-contracts.js +1 -1
- package/core/dist/runtime/internalization/peer-runner-contracts.js.map +1 -1
- package/core/dist/runtime/internalization/philosopher-output.d.ts +0 -8
- package/core/dist/runtime/internalization/philosopher-output.d.ts.map +1 -1
- package/core/dist/runtime/internalization/philosopher-output.js +1 -1
- package/core/dist/runtime/internalization/philosopher-output.js.map +1 -1
- package/core/dist/runtime/internalization/philosopher-prompt-builder.d.ts +3 -2
- package/core/dist/runtime/internalization/philosopher-prompt-builder.d.ts.map +1 -1
- package/core/dist/runtime/internalization/pitask-metadata.d.ts +1 -1
- package/core/dist/runtime/internalization/pitask-metadata.d.ts.map +1 -1
- package/core/dist/runtime/internalization/repair-replay-resolver.d.ts +4 -3
- package/core/dist/runtime/internalization/repair-replay-resolver.d.ts.map +1 -1
- package/core/dist/runtime/internalization/rollout-reviewer-output.d.ts +2 -3
- package/core/dist/runtime/internalization/rollout-reviewer-output.d.ts.map +1 -1
- package/core/dist/runtime/internalization/rollout-reviewer-output.js.map +1 -1
- package/core/dist/runtime/internalization/rollout-reviewer-prompt-builder.d.ts +0 -1
- package/core/dist/runtime/internalization/rollout-reviewer-prompt-builder.d.ts.map +1 -1
- package/core/dist/runtime/internalization/rollout-reviewer-prompt-builder.js +1 -1
- package/core/dist/runtime/internalization/rollout-reviewer-prompt-builder.js.map +1 -1
- package/core/dist/runtime/internalization/router-context-reconstruction.d.ts +3 -3
- package/core/dist/runtime/internalization/router-context-reconstruction.d.ts.map +1 -1
- package/core/dist/runtime/internalization/rule-activation-contract.d.ts +3 -2
- package/core/dist/runtime/internalization/rule-activation-contract.d.ts.map +1 -1
- package/core/dist/runtime/internalization/rule-host-input-builder.d.ts +16 -0
- package/core/dist/runtime/internalization/rule-host-input-builder.d.ts.map +1 -1
- package/core/dist/runtime/internalization/rule-host-input-builder.js +18 -0
- package/core/dist/runtime/internalization/rule-host-input-builder.js.map +1 -1
- package/core/dist/runtime/internalization/rule-reliability-validation.d.ts +13 -18
- package/core/dist/runtime/internalization/rule-reliability-validation.d.ts.map +1 -1
- package/core/dist/runtime/internalization/rule-reliability-validation.js +43 -1
- package/core/dist/runtime/internalization/rule-reliability-validation.js.map +1 -1
- package/core/dist/runtime/internalization/scribe-output.d.ts +2 -15
- package/core/dist/runtime/internalization/scribe-output.d.ts.map +1 -1
- package/core/dist/runtime/internalization/scribe-output.js +2 -2
- package/core/dist/runtime/internalization/scribe-output.js.map +1 -1
- package/core/dist/runtime/internalization/scribe-prompt-builder.d.ts +3 -3
- package/core/dist/runtime/internalization/scribe-prompt-builder.d.ts.map +1 -1
- package/core/dist/runtime/internalization/scribe-prompt-builder.js +0 -1
- package/core/dist/runtime/internalization/scribe-prompt-builder.js.map +1 -1
- package/core/dist/runtime/internalization/split-diagnostician-runner.d.ts +25 -1
- package/core/dist/runtime/internalization/split-diagnostician-runner.d.ts.map +1 -1
- package/core/dist/runtime/internalization/split-diagnostician-runner.js +122 -5
- package/core/dist/runtime/internalization/split-diagnostician-runner.js.map +1 -1
- package/core/dist/runtime/internalization/textual-basis-anchor.d.ts +3 -6
- package/core/dist/runtime/internalization/textual-basis-anchor.d.ts.map +1 -1
- package/core/dist/runtime/internalization/textual-basis-anchor.js +2 -2
- package/core/dist/runtime/internalization/textual-basis-anchor.js.map +1 -1
- package/core/dist/runtime/internalization/tool-semantic-registry.d.ts +26 -0
- package/core/dist/runtime/internalization/tool-semantic-registry.d.ts.map +1 -1
- package/core/dist/runtime/internalization/tool-semantic-registry.js +55 -5
- package/core/dist/runtime/internalization/tool-semantic-registry.js.map +1 -1
- package/core/dist/runtime/internalization-chain-integrity-read-model.d.ts.map +1 -1
- package/core/dist/runtime/internalization-chain-integrity-read-model.js +2 -2
- package/core/dist/runtime/internalization-chain-integrity-read-model.js.map +1 -1
- package/core/dist/runtime/internalization-integrity-remediation.d.ts.map +1 -1
- package/core/dist/runtime/internalization-integrity-remediation.js +2 -2
- package/core/dist/runtime/internalization-integrity-remediation.js.map +1 -1
- package/core/dist/runtime/language-directive.d.ts +2 -1
- package/core/dist/runtime/language-directive.d.ts.map +1 -1
- package/core/dist/runtime/operator-health-read-model.d.ts.map +1 -1
- package/core/dist/runtime/operator-health-read-model.js +2 -2
- package/core/dist/runtime/operator-health-read-model.js.map +1 -1
- package/core/dist/runtime/owner-decision/owner-decision-view-contract.d.ts +3 -29
- package/core/dist/runtime/owner-decision/owner-decision-view-contract.d.ts.map +1 -1
- package/core/dist/runtime/owner-decision/owner-decision-view-contract.js +4 -5
- package/core/dist/runtime/owner-decision/owner-decision-view-contract.js.map +1 -1
- package/core/dist/runtime/owner-decision/owner-decision-view.d.ts +0 -49
- package/core/dist/runtime/owner-decision/owner-decision-view.d.ts.map +1 -1
- package/core/dist/runtime/owner-decision/owner-decision-view.js +5 -5
- package/core/dist/runtime/owner-decision/owner-decision-view.js.map +1 -1
- package/core/dist/runtime/owner-decision/semantic-selector.d.ts +3 -2
- package/core/dist/runtime/owner-decision/semantic-selector.d.ts.map +1 -1
- package/core/dist/runtime/owner-identity.d.ts +12 -1
- package/core/dist/runtime/owner-identity.d.ts.map +1 -1
- package/core/dist/runtime/owner-identity.js +19 -1
- package/core/dist/runtime/owner-identity.js.map +1 -1
- package/core/dist/runtime/pain-ingress-payload.d.ts +0 -39
- package/core/dist/runtime/pain-ingress-payload.d.ts.map +1 -1
- package/core/dist/runtime/pain-ingress-payload.js +4 -4
- package/core/dist/runtime/pain-ingress-payload.js.map +1 -1
- package/core/dist/runtime/pain-ingress.d.ts +1 -1
- package/core/dist/runtime/pain-ingress.d.ts.map +1 -1
- package/core/dist/runtime/pain-ingress.js.map +1 -1
- package/core/dist/runtime/pain-recall-read-model.d.ts.map +1 -1
- package/core/dist/runtime/pain-recall-read-model.js +4 -3
- package/core/dist/runtime/pain-recall-read-model.js.map +1 -1
- package/core/dist/runtime/pain-signal-bridge.d.ts +0 -2
- package/core/dist/runtime/pain-signal-bridge.d.ts.map +1 -1
- package/core/dist/runtime/pain-signal-bridge.js +1 -1
- package/core/dist/runtime/pain-signal-bridge.js.map +1 -1
- package/core/dist/runtime/pain-signal-runtime-factory.d.ts +3 -3
- package/core/dist/runtime/pain-signal-runtime-factory.d.ts.map +1 -1
- package/core/dist/runtime/pain-signal-runtime-factory.js +1 -1
- package/core/dist/runtime/pain-signal-runtime-factory.js.map +1 -1
- package/core/dist/runtime/principle-reuse/reuse-proposal.d.ts +3 -2
- package/core/dist/runtime/principle-reuse/reuse-proposal.d.ts.map +1 -1
- package/core/dist/runtime/principle-reuse/reuse-retrieval.d.ts +0 -10
- package/core/dist/runtime/principle-reuse/reuse-retrieval.d.ts.map +1 -1
- package/core/dist/runtime/principle-reuse/reuse-retrieval.js +1 -1
- package/core/dist/runtime/principle-reuse/reuse-retrieval.js.map +1 -1
- package/core/dist/runtime/principle-reuse/reuse-shortlist.d.ts +1 -8
- package/core/dist/runtime/principle-reuse/reuse-shortlist.d.ts.map +1 -1
- package/core/dist/runtime/principle-reuse/reuse-shortlist.js +1 -1
- package/core/dist/runtime/principle-reuse/reuse-shortlist.js.map +1 -1
- package/core/dist/runtime/product-telemetry/snapshot-contract.d.ts +3 -2
- package/core/dist/runtime/product-telemetry/snapshot-contract.d.ts.map +1 -1
- package/core/dist/runtime/pruning-read-model.d.ts.map +1 -1
- package/core/dist/runtime/pruning-read-model.js +3 -2
- package/core/dist/runtime/pruning-read-model.js.map +1 -1
- package/core/dist/runtime/risk/risk-calculator-policy.d.ts +12 -2
- package/core/dist/runtime/risk/risk-calculator-policy.d.ts.map +1 -1
- package/core/dist/runtime/risk/risk-calculator-policy.js +33 -22
- package/core/dist/runtime/risk/risk-calculator-policy.js.map +1 -1
- package/core/dist/runtime/runner/base-peer-runner.d.ts +32 -0
- package/core/dist/runtime/runner/base-peer-runner.d.ts.map +1 -1
- package/core/dist/runtime/runner/base-peer-runner.js +168 -16
- package/core/dist/runtime/runner/base-peer-runner.js.map +1 -1
- package/core/dist/runtime/runner/default-validator.d.ts +0 -1
- package/core/dist/runtime/runner/default-validator.d.ts.map +1 -1
- package/core/dist/runtime/runner/default-validator.js +11 -3
- package/core/dist/runtime/runner/default-validator.js.map +1 -1
- package/core/dist/runtime/runner/peer-runner-types.d.ts +11 -0
- package/core/dist/runtime/runner/peer-runner-types.d.ts.map +1 -1
- package/core/dist/runtime/schema-conformance-read-model.js +2 -2
- package/core/dist/runtime/schema-conformance-read-model.js.map +1 -1
- package/core/dist/runtime/storage-paths.d.ts +15 -0
- package/core/dist/runtime/storage-paths.d.ts.map +1 -0
- package/core/dist/runtime/storage-paths.js +15 -0
- package/core/dist/runtime/storage-paths.js.map +1 -0
- package/core/dist/runtime/store/artifact/index.d.ts +1 -1
- package/core/dist/runtime/store/artifact/index.d.ts.map +1 -1
- package/core/dist/runtime/store/candidate/admission-document.d.ts +4 -3
- package/core/dist/runtime/store/candidate/admission-document.d.ts.map +1 -1
- package/core/dist/runtime/store/commit/index.d.ts +0 -1
- package/core/dist/runtime/store/commit/index.d.ts.map +1 -1
- package/core/dist/runtime/store/commit/index.js.map +1 -1
- package/core/dist/runtime/store/design-gate/sqlite-design-gate-store.d.ts +4 -3
- package/core/dist/runtime/store/design-gate/sqlite-design-gate-store.d.ts.map +1 -1
- package/core/dist/runtime/store/lifecycle/lease-manager.d.ts +2 -1
- package/core/dist/runtime/store/lifecycle/lease-manager.d.ts.map +1 -1
- package/core/dist/runtime/store/runtime-state-manager.d.ts +1 -2
- 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/sqlite-connection.d.ts +2 -6
- package/core/dist/runtime/store/sqlite-connection.d.ts.map +1 -1
- package/core/dist/runtime/store/sqlite-connection.js +4 -12
- package/core/dist/runtime/store/sqlite-connection.js.map +1 -1
- package/core/dist/runtime/store/storage-paths.d.ts +17 -0
- package/core/dist/runtime/store/storage-paths.d.ts.map +1 -0
- package/core/dist/runtime/store/storage-paths.js +52 -0
- package/core/dist/runtime/store/storage-paths.js.map +1 -0
- package/core/dist/runtime/store/task/sqlite-family-reopen.d.ts +2 -1
- package/core/dist/runtime/store/task/sqlite-family-reopen.d.ts.map +1 -1
- package/core/dist/runtime/store/task/sqlite-task-store.d.ts +2 -1
- package/core/dist/runtime/store/task/sqlite-task-store.d.ts.map +1 -1
- package/core/dist/runtime/story-a-demo.d.ts.map +1 -1
- package/core/dist/runtime/story-a-demo.js +4 -1
- package/core/dist/runtime/story-a-demo.js.map +1 -1
- package/core/dist/runtime/tools/agent-tool-contract.d.ts +1 -2
- package/core/dist/runtime/tools/agent-tool-contract.d.ts.map +1 -1
- package/core/dist/runtime/tools/agent-tool-contract.js +0 -2
- package/core/dist/runtime/tools/agent-tool-contract.js.map +1 -1
- package/core/dist/runtime/tools/artificer-l2-tool-contract.d.ts +0 -2
- package/core/dist/runtime/tools/artificer-l2-tool-contract.d.ts.map +1 -1
- package/core/dist/runtime/tools/artificer-l2-tool-contract.js +0 -2
- package/core/dist/runtime/tools/artificer-l2-tool-contract.js.map +1 -1
- package/core/dist/runtime/trajectory-retention.d.ts +257 -0
- package/core/dist/runtime/trajectory-retention.d.ts.map +1 -0
- package/core/dist/runtime/trajectory-retention.js +598 -0
- package/core/dist/runtime/trajectory-retention.js.map +1 -0
- package/core/dist/runtime/types/event-payload.d.ts +0 -2
- package/core/dist/runtime/types/event-payload.d.ts.map +1 -1
- package/core/dist/runtime/types/event-payload.js.map +1 -1
- package/core/dist/runtime/types/evidence-chain-contract.d.ts +66 -2
- package/core/dist/runtime/types/evidence-chain-contract.d.ts.map +1 -1
- package/core/dist/runtime/types/evidence-chain-contract.js +69 -4
- package/core/dist/runtime/types/evidence-chain-contract.js.map +1 -1
- package/core/dist/runtime/types/hygiene-types.d.ts +0 -6
- package/core/dist/runtime/types/hygiene-types.d.ts.map +1 -1
- package/core/dist/runtime/types/hygiene-types.js.map +1 -1
- package/core/dist/runtime/types/index.d.ts +1 -1
- package/core/dist/runtime/types/index.d.ts.map +1 -1
- package/core/dist/runtime/types/index.js.map +1 -1
- package/core/dist/runtime/types/intervention-evidence-contract.d.ts +5 -5
- package/core/dist/runtime/types/intervention-evidence-contract.d.ts.map +1 -1
- package/core/dist/runtime/types/intervention-evidence-contract.js +0 -2
- package/core/dist/runtime/types/intervention-evidence-contract.js.map +1 -1
- package/core/dist/runtime/types/principle-dependency.d.ts +0 -2
- package/core/dist/runtime/types/principle-dependency.d.ts.map +1 -1
- package/core/dist/runtime/types/principle-dependency.js.map +1 -1
- package/core/dist/runtime/types/principle-lifecycle-event.d.ts +0 -2
- package/core/dist/runtime/types/principle-lifecycle-event.d.ts.map +1 -1
- package/core/dist/runtime/types/principle-lifecycle-event.js.map +1 -1
- package/core/dist/runtime/types/principle-schema.d.ts +0 -26
- package/core/dist/runtime/types/principle-schema.d.ts.map +1 -1
- package/core/dist/runtime/types/principle-schema.js +2 -2
- package/core/dist/runtime/types/principle-schema.js.map +1 -1
- package/core/dist/runtime/types/principle-tree-store.d.ts +0 -2
- package/core/dist/runtime/types/principle-tree-store.d.ts.map +1 -1
- package/core/dist/runtime/types/principle-tree-store.js.map +1 -1
- package/core/dist/runtime/types/principle-value-metrics.d.ts +0 -2
- package/core/dist/runtime/types/principle-value-metrics.d.ts.map +1 -1
- package/core/dist/runtime/types/principle-value-metrics.js.map +1 -1
- package/core/dist/runtime/types/rule-candidate-binding.d.ts +2 -1
- package/core/dist/runtime/types/rule-candidate-binding.d.ts.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 +11 -0
- package/core/dist/telemetry-event.js.map +1 -1
- package/core/dist/trajectory-store.d.ts +9 -9
- package/core/dist/trajectory-store.d.ts.map +1 -1
- package/core/dist/trajectory-store.js +9 -12
- package/core/dist/trajectory-store.js.map +1 -1
- package/core/package.json +5 -1
- package/dist/installers/codex-host-installer.d.ts +9 -0
- package/dist/installers/codex-host-installer.d.ts.map +1 -1
- package/dist/installers/codex-host-installer.js +127 -6
- package/dist/installers/codex-host-installer.js.map +1 -1
- package/dist/installers/mcp-binding-shape-mirror.d.ts +27 -0
- package/dist/installers/mcp-binding-shape-mirror.d.ts.map +1 -0
- package/dist/installers/mcp-binding-shape-mirror.js +105 -0
- package/dist/installers/mcp-binding-shape-mirror.js.map +1 -0
- package/dist/skill-catalog.d.ts +35 -0
- package/dist/skill-catalog.d.ts.map +1 -0
- package/dist/skill-catalog.js +85 -0
- package/dist/skill-catalog.js.map +1 -0
- package/dist/skill-delivery-parity.d.ts +22 -0
- package/dist/skill-delivery-parity.d.ts.map +1 -0
- package/dist/skill-delivery-parity.js +31 -0
- package/dist/skill-delivery-parity.js.map +1 -0
- package/dist/update/product-identity.d.ts.map +1 -1
- package/dist/update/product-identity.js +5 -1
- package/dist/update/product-identity.js.map +1 -1
- package/host-runtime/dist/active-principle-prompt.d.ts +13 -0
- package/host-runtime/dist/active-principle-prompt.js +87 -10
- package/host-runtime/dist/adaptive-decision-protocol.d.ts +129 -0
- package/host-runtime/dist/adaptive-decision-protocol.js +176 -0
- package/host-runtime/dist/adaptive-priority-provider.d.ts +38 -13
- package/host-runtime/dist/adaptive-priority-provider.js +70 -66
- package/host-runtime/dist/adaptive-selection.d.ts +71 -64
- package/host-runtime/dist/adaptive-selection.js +220 -329
- package/host-runtime/dist/adaptive-skip-decision.d.ts +26 -14
- package/host-runtime/dist/adaptive-skip-decision.js +33 -29
- package/host-runtime/dist/codex-disclosure.d.ts +12 -7
- package/host-runtime/dist/codex-disclosure.js +12 -7
- package/host-runtime/dist/codex-rule-context-provider.js +4 -1
- package/host-runtime/dist/conversation-ingestion/pipeline.d.ts +8 -0
- package/host-runtime/dist/conversation-ingestion/pipeline.js +6 -1
- package/host-runtime/dist/conversation-ingestion/text-policy.d.ts +3 -4
- package/host-runtime/dist/conversation-ingestion/text-policy.js +3 -4
- package/host-runtime/dist/governance-observation-store.d.ts +73 -1
- package/host-runtime/dist/governance-observation-store.js +251 -14
- package/host-runtime/dist/governance-signal-admission.d.ts +19 -3
- package/host-runtime/dist/governance-signal-admission.js +12 -4
- package/host-runtime/dist/host-tool-declaration.d.ts +18 -2
- package/host-runtime/dist/host-tool-declaration.js +67 -11
- package/host-runtime/dist/host-tool-semantic-resolver.d.ts +7 -0
- package/host-runtime/dist/host-tool-semantic-resolver.js +22 -2
- package/host-runtime/dist/index.d.ts +3 -0
- package/host-runtime/dist/index.js +17 -0
- package/host-runtime/dist/production-rulehost-gate.d.ts +36 -1
- package/host-runtime/dist/production-rulehost-gate.js +106 -4
- package/host-runtime/dist/trajectory-retention.d.ts +147 -0
- package/host-runtime/dist/trajectory-retention.js +907 -0
- package/host-runtime/package.json +1 -1
- package/install-layout/dist/index.d.ts +9 -2
- package/install-layout/dist/index.js +26 -9
- package/install-layout/dist/mcp-binding-contract.d.ts +91 -0
- package/install-layout/dist/mcp-binding-contract.js +230 -0
- package/install-layout/package.json +1 -1
- package/package.json +4 -4
- package/pd-cli/dist/commands/build-trajectory-evidence.d.ts.map +1 -1
- package/pd-cli/dist/commands/build-trajectory-evidence.js +17 -11
- package/pd-cli/dist/commands/build-trajectory-evidence.js.map +1 -1
- package/pd-cli/dist/commands/codex-reconcile.d.ts +7 -0
- package/pd-cli/dist/commands/codex-reconcile.d.ts.map +1 -1
- package/pd-cli/dist/commands/codex-reconcile.js +11 -2
- package/pd-cli/dist/commands/codex-reconcile.js.map +1 -1
- package/pd-cli/dist/commands/codex-worker.d.ts.map +1 -1
- package/pd-cli/dist/commands/codex-worker.js +35 -0
- package/pd-cli/dist/commands/codex-worker.js.map +1 -1
- package/pd-cli/dist/commands/command-helpers.d.ts +1 -1
- package/pd-cli/dist/commands/command-helpers.js +1 -1
- package/pd-cli/dist/commands/diagnose.js +1 -1
- package/pd-cli/dist/commands/diagnose.js.map +1 -1
- package/pd-cli/dist/commands/errors-list.d.ts +1 -1
- package/pd-cli/dist/commands/errors-list.js +1 -1
- package/pd-cli/dist/commands/health-ingestion.d.ts +96 -0
- package/pd-cli/dist/commands/health-ingestion.d.ts.map +1 -0
- package/pd-cli/dist/commands/health-ingestion.js +473 -0
- package/pd-cli/dist/commands/health-ingestion.js.map +1 -0
- package/pd-cli/dist/commands/health-mcp.d.ts +23 -1
- package/pd-cli/dist/commands/health-mcp.d.ts.map +1 -1
- package/pd-cli/dist/commands/health-mcp.js +81 -22
- package/pd-cli/dist/commands/health-mcp.js.map +1 -1
- package/pd-cli/dist/commands/health.d.ts +1 -1
- package/pd-cli/dist/commands/health.d.ts.map +1 -1
- package/pd-cli/dist/commands/health.js +22 -5
- package/pd-cli/dist/commands/health.js.map +1 -1
- package/pd-cli/dist/commands/principles-stats.d.ts +1 -1
- package/pd-cli/dist/commands/principles-stats.js +1 -1
- package/pd-cli/dist/commands/trajectory-retention.d.ts +23 -0
- package/pd-cli/dist/commands/trajectory-retention.d.ts.map +1 -0
- package/pd-cli/dist/commands/trajectory-retention.js +159 -0
- package/pd-cli/dist/commands/trajectory-retention.js.map +1 -0
- package/pd-cli/dist/commands/workbuddy-setup.d.ts +69 -0
- package/pd-cli/dist/commands/workbuddy-setup.d.ts.map +1 -0
- package/pd-cli/dist/commands/workbuddy-setup.js +379 -0
- package/pd-cli/dist/commands/workbuddy-setup.js.map +1 -0
- package/pd-cli/dist/commands/workbuddy-worker.d.ts.map +1 -1
- package/pd-cli/dist/commands/workbuddy-worker.js +42 -6
- package/pd-cli/dist/commands/workbuddy-worker.js.map +1 -1
- package/pd-cli/dist/index.d.ts +1 -7
- package/pd-cli/dist/index.d.ts.map +1 -1
- package/pd-cli/dist/index.js +15 -1201
- package/pd-cli/dist/index.js.map +1 -1
- package/pd-cli/dist/program.d.ts +17 -0
- package/pd-cli/dist/program.d.ts.map +1 -0
- package/pd-cli/dist/program.js +1263 -0
- package/pd-cli/dist/program.js.map +1 -0
- package/pd-cli/dist/services/delivery-surfaces.d.ts.map +1 -1
- package/pd-cli/dist/services/delivery-surfaces.js +7 -5
- package/pd-cli/dist/services/delivery-surfaces.js.map +1 -1
- package/pd-cli/dist/services/demo-story-a-runner.js +1 -1
- package/pd-cli/dist/services/demo-story-a-runner.js.map +1 -1
- package/pd-cli/dist/services/version-report.d.ts.map +1 -1
- package/pd-cli/dist/services/version-report.js +35 -5
- package/pd-cli/dist/services/version-report.js.map +1 -1
- package/pd-cli/package.json +1 -1
- 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 +3 -1
- package/plugin/dist/bundle.js +529 -468
- package/plugin/dist/constants/tools.d.ts +8 -1
- package/plugin/dist/core/experiment-workspace-guard.d.ts +25 -0
- package/plugin/dist/core/trajectory-retention-trigger.d.ts +13 -0
- package/plugin/dist/core/trajectory.d.ts +14 -0
- package/plugin/dist/hooks/gate-block-helper.d.ts +17 -0
- package/plugin/dist/hooks/gate.d.ts +6 -1
- package/plugin/dist/host-runtime/openclaw-host-runtime.d.ts +1 -0
- package/plugin/dist/index.d.ts +5 -0
- package/plugin/dist/openclaw.plugin.json +1 -1
- package/plugin/dist/rulehost-evidence.js +29 -23
- package/plugin/dist/templates/langs/en/skills/pd-cli-operator/SKILL.md +16 -5
- package/plugin/dist/templates/langs/en/skills/pd-control/SKILL.md +7 -6
- package/plugin/dist/templates/langs/en/skills/pd-pain-signal/SKILL.md +141 -28
- package/plugin/dist/templates/langs/en/skills/pd-review/SKILL.md +15 -1
- package/plugin/dist/templates/langs/zh/skills/pd-cli-operator/SKILL.md +16 -5
- package/plugin/dist/templates/langs/zh/skills/pd-control/SKILL.md +7 -6
- package/plugin/dist/templates/langs/zh/skills/pd-pain-signal/SKILL.md +142 -29
- package/plugin/dist/templates/langs/zh/skills/pd-review/SKILL.md +15 -1
- package/plugin/openclaw.plugin.json +1 -1
- package/plugin/package.json +1 -1
- package/plugin/templates/langs/en/skills/pd-cli-operator/SKILL.md +16 -5
- package/plugin/templates/langs/en/skills/pd-control/SKILL.md +7 -6
- package/plugin/templates/langs/en/skills/pd-pain-signal/SKILL.md +141 -28
- package/plugin/templates/langs/en/skills/pd-review/SKILL.md +15 -1
- package/plugin/templates/langs/zh/skills/pd-cli-operator/SKILL.md +16 -5
- package/plugin/templates/langs/zh/skills/pd-control/SKILL.md +7 -6
- package/plugin/templates/langs/zh/skills/pd-pain-signal/SKILL.md +142 -29
- package/plugin/templates/langs/zh/skills/pd-review/SKILL.md +15 -1
- package/release-manager/dist/installers/codex-host-installer.js +127 -6
- package/release-manager/dist/installers/mcp-binding-shape-mirror.js +105 -0
- package/release-manager/dist/update/product-identity.js +5 -1
- package/release-manager/package.json +1 -1
- package/workbuddy-adapter/dist/codec/input-decoder.d.ts +10 -0
- package/workbuddy-adapter/dist/codec/input-decoder.js +62 -5
- package/workbuddy-adapter/dist/host-adapter.js +1 -0
- package/workbuddy-adapter/dist/index.d.ts +1 -0
- package/workbuddy-adapter/dist/index.js +1 -0
- package/workbuddy-adapter/dist/ingestion/catch-up.d.ts +36 -0
- package/workbuddy-adapter/dist/ingestion/catch-up.js +166 -0
- package/workbuddy-adapter/dist/ingestion/encode-cwd.d.ts +6 -0
- package/workbuddy-adapter/dist/ingestion/encode-cwd.js +39 -0
- package/workbuddy-adapter/dist/ingestion/index.d.ts +13 -0
- package/workbuddy-adapter/dist/ingestion/index.js +13 -0
- package/workbuddy-adapter/dist/ingestion/ingestion.d.ts +46 -0
- package/workbuddy-adapter/dist/ingestion/ingestion.js +135 -0
- package/workbuddy-adapter/dist/ingestion/transcript-decoder.d.ts +70 -0
- package/workbuddy-adapter/dist/ingestion/transcript-decoder.js +554 -0
- package/workbuddy-adapter/dist/ingestion/transcript-path.d.ts +39 -0
- package/workbuddy-adapter/dist/ingestion/transcript-path.js +117 -0
- package/workbuddy-adapter/dist/ingestion/transcript-source.d.ts +15 -0
- package/workbuddy-adapter/dist/ingestion/transcript-source.js +152 -0
- package/workbuddy-adapter/dist/pd-hook.d.ts +8 -0
- package/workbuddy-adapter/dist/pd-hook.js +59 -2
- package/workbuddy-adapter/dist/worker/workspace-worker.d.ts +9 -0
- package/workbuddy-adapter/dist/worker/workspace-worker.js +46 -17
- package/workbuddy-adapter/package.json +1 -1
- package/workbuddy-adapter/plugin/hooks/hooks.json +11 -0
- package/workbuddy-adapter/plugin/skills/pd-cli-operator/SKILL.md +57 -19
- package/workbuddy-adapter/plugin/skills/pd-control/SKILL.md +21 -9
- package/workbuddy-adapter/plugin/skills/pd-pain-signal/SKILL.md +72 -61
- package/workbuddy-adapter/plugin/skills/pd-review/SKILL.md +27 -12
|
@@ -0,0 +1,473 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Unified three-host conversation-ingestion health section for `pd health`
|
|
3
|
+
* (PRI-1171 ticket ⑦; SPEC v0.2 §6, tech design §9).
|
|
4
|
+
*
|
|
5
|
+
* Read-only throughout: checkpoint/observation reads through the store,
|
|
6
|
+
* transcript access is a SIZE STAT ONLY — never content. Every degraded or
|
|
7
|
+
* unknown field carries reason + nextAction (rc-9); "unknown" is never
|
|
8
|
+
* rendered as healthy.
|
|
9
|
+
*
|
|
10
|
+
* Per-host contract (tech design §9): hostFlag + ingestionFlag + consent +
|
|
11
|
+
* checkpoint water-mark summary (lastSuccessAt / checkpointOffset / lagBytes
|
|
12
|
+
* / lastDegradation) + the explicit `live_only` list — sessions with
|
|
13
|
+
* observations but NO checkpoint row. The live hook path never writes a
|
|
14
|
+
* checkpoint, so a missing checkpoint is a STATUS, not a lag anomaly.
|
|
15
|
+
*
|
|
16
|
+
* Host wiring truth table (honest, not aspirational):
|
|
17
|
+
* - codex: host.codex + codex_conversation_ingestion + v3 ledger slot +
|
|
18
|
+
* per-rollout byte lag via locateCodexTranscriptByRolloutIdentity;
|
|
19
|
+
* - workbuddy: host.workbuddy + workbuddy_conversation_ingestion + v3
|
|
20
|
+
* ledger slot + per-session byte lag via the ONE session locator the
|
|
21
|
+
* catch-up writer uses (locateWorkbuddyTranscriptBySessionIdentity);
|
|
22
|
+
* - openclaw: `not_wired` — its live hook path writes to the governance
|
|
23
|
+
* base tables (user_turns/assistant_turns) and the unified live
|
|
24
|
+
* observation bypass (`openclaw_unified_observation`) lands in P3
|
|
25
|
+
* (ticket ⑨). Reported as an explicit state with nextAction, never as
|
|
26
|
+
* an empty-but-monitored row.
|
|
27
|
+
*/
|
|
28
|
+
import * as fs from 'fs';
|
|
29
|
+
import * as os from 'os';
|
|
30
|
+
import * as path from 'path';
|
|
31
|
+
import { deriveConversationIngestionConsentState, listGovernanceCheckpoints, listGovernanceUncheckpointedSessions, loadPdConfigForPlugin, readConversationIngestionConsent, } from '@principles/host-runtime';
|
|
32
|
+
import { computeFeatureFlagsFromConfig, isFeatureEnabled } from '@principles/core/runtime';
|
|
33
|
+
async function loadAdapterLocators() {
|
|
34
|
+
// Dynamic imports of workspace packages are fully typed — no casts needed.
|
|
35
|
+
const codex = await import('@principles/codex-adapter').then((m) => m.locateCodexTranscriptByRolloutIdentity).catch(() => null);
|
|
36
|
+
const workbuddy = await import('@principles/workbuddy-adapter').then((m) => ({
|
|
37
|
+
locate: m.locateWorkbuddyTranscriptBySessionIdentity,
|
|
38
|
+
root: m.workbuddyProjectsRoot,
|
|
39
|
+
validate: m.validateWorkbuddyTranscriptPath,
|
|
40
|
+
})).catch(() => null);
|
|
41
|
+
return {
|
|
42
|
+
codex,
|
|
43
|
+
workbuddy: workbuddy?.locate ?? null,
|
|
44
|
+
workbuddyRoot: workbuddy?.root ?? null,
|
|
45
|
+
workbuddyValidate: workbuddy?.validate ?? null,
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
const ADAPTER_NEXT_ACTION = 'The host adapter package failed to resolve in this pd-cli install; repair the install with `npx create-principles-disciple` (do not edit the runtime by hand).';
|
|
49
|
+
const LAG_UNDETECTABLE_NEXT_ACTION = 'Verify the host adapter install, the ingestion consent grant, and the transcript files for the checkpointed sessions; then re-run `pd health`.';
|
|
50
|
+
/** Bounded per-session detail rows in the health output. */
|
|
51
|
+
const MAX_DETAIL_SESSIONS = 8;
|
|
52
|
+
const MAX_LIVE_SESSIONS = 8;
|
|
53
|
+
/** Bounded transcript SIZE lookups per host — locating a transcript is a directory walk, not a stat. */
|
|
54
|
+
const MAX_LAG_SESSIONS = 32;
|
|
55
|
+
/** Bounded per-host rows in the TEXT report (JSON always carries up to MAX_DETAIL_SESSIONS). */
|
|
56
|
+
const TEXT_DETAIL_SESSIONS = 3;
|
|
57
|
+
function boundedDetail(error) {
|
|
58
|
+
const raw = error instanceof Error ? error.message : String(error);
|
|
59
|
+
return raw.slice(0, 160);
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* A whole-host failure is an explicit, fully-degraded row — never an absent
|
|
63
|
+
* row and never a healthy-looking one (rc-9). This is the LAST line of defence:
|
|
64
|
+
* `pd health` must survive a read-only observability section throwing, even
|
|
65
|
+
* when a lower-level store/reader throws unexpectedly (PR #2563 review).
|
|
66
|
+
*/
|
|
67
|
+
function degradedHost(reason, nextAction) {
|
|
68
|
+
const flag = { state: 'UNKNOWN', source: 'unavailable', reason, nextAction };
|
|
69
|
+
return {
|
|
70
|
+
status: 'monitored',
|
|
71
|
+
hostFlag: flag,
|
|
72
|
+
ingestionFlag: flag,
|
|
73
|
+
consent: { state: 'unreadable', reason, nextAction },
|
|
74
|
+
checkpoints: { reason, nextAction },
|
|
75
|
+
liveOnly: { reason, nextAction },
|
|
76
|
+
};
|
|
77
|
+
}
|
|
78
|
+
function safeAssess(assess) {
|
|
79
|
+
try {
|
|
80
|
+
return assess();
|
|
81
|
+
}
|
|
82
|
+
catch (error) {
|
|
83
|
+
return degradedHost(`ingestion_assessment_failed:${boundedDetail(error)}`, 'The ingestion health section degraded without mutating anything; re-run `pd health` and inspect the workspace trajectory database if it persists.');
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
function resolveFlags(workspaceDir, hostFlagKey, ingestionFlagKey) {
|
|
87
|
+
const configLoad = loadPdConfigForPlugin(workspaceDir);
|
|
88
|
+
if (!configLoad.ok) {
|
|
89
|
+
const [first] = configLoad.errors;
|
|
90
|
+
return {
|
|
91
|
+
source: 'malformed',
|
|
92
|
+
hostEnabled: false,
|
|
93
|
+
ingestionEnabled: false,
|
|
94
|
+
...(first !== undefined ? { reason: first.reason, nextAction: first.nextAction } : {}),
|
|
95
|
+
};
|
|
96
|
+
}
|
|
97
|
+
const flags = computeFeatureFlagsFromConfig(configLoad.effective);
|
|
98
|
+
return {
|
|
99
|
+
source: configLoad.source,
|
|
100
|
+
hostEnabled: isFeatureEnabled(flags, hostFlagKey),
|
|
101
|
+
ingestionEnabled: isFeatureEnabled(flags, ingestionFlagKey),
|
|
102
|
+
};
|
|
103
|
+
}
|
|
104
|
+
function flagView(enabled, verdict) {
|
|
105
|
+
return {
|
|
106
|
+
state: verdict.source === 'malformed' ? 'UNKNOWN' : enabled ? 'ENABLED' : 'DISABLED',
|
|
107
|
+
source: verdict.source,
|
|
108
|
+
...(verdict.reason !== undefined ? { reason: verdict.reason } : {}),
|
|
109
|
+
...(verdict.nextAction !== undefined ? { nextAction: verdict.nextAction } : {}),
|
|
110
|
+
};
|
|
111
|
+
}
|
|
112
|
+
function consentView(workspaceDir, hostKind, ingestionEnabled) {
|
|
113
|
+
const read = readConversationIngestionConsent(workspaceDir, hostKind);
|
|
114
|
+
if (!read.ok) {
|
|
115
|
+
return { state: 'unreadable', reason: read.reason, nextAction: read.nextAction };
|
|
116
|
+
}
|
|
117
|
+
const state = deriveConversationIngestionConsentState(read.record, ingestionEnabled);
|
|
118
|
+
const { record } = read;
|
|
119
|
+
if (record === null) {
|
|
120
|
+
return {
|
|
121
|
+
state,
|
|
122
|
+
nextAction: state === 'flag_on_without_grant'
|
|
123
|
+
? `Record a consent decision for ${hostKind} (setup flow or Owner directive) before transcript ingestion runs.`
|
|
124
|
+
: undefined,
|
|
125
|
+
};
|
|
126
|
+
}
|
|
127
|
+
return {
|
|
128
|
+
state,
|
|
129
|
+
decidedAt: record.decidedAt,
|
|
130
|
+
decidedVia: record.decidedVia,
|
|
131
|
+
disclosureVersion: record.disclosureVersion,
|
|
132
|
+
};
|
|
133
|
+
}
|
|
134
|
+
/**
|
|
135
|
+
* One bounded, memoized SIZE lookup per session identity. Locating a host
|
|
136
|
+
* transcript is a DIRECTORY WALK (Codex scans up to 5000 entries), not a stat.
|
|
137
|
+
* The previous three passes — summary loop, detail rows, undetectability scan
|
|
138
|
+
* — re-walked the tree up to ~2n+8 times and used a linear `.find()` to
|
|
139
|
+
* recover each byte offset. Sessions beyond MAX_LAG_SESSIONS are NOT located;
|
|
140
|
+
* their lag is undetectable, surfaced explicitly instead of being silently
|
|
141
|
+
* dropped from the max (rc-9, PR #2563 review).
|
|
142
|
+
*/
|
|
143
|
+
function makeLagResolver(checkpoints, computeSize, base) {
|
|
144
|
+
const eligible = new Set([...checkpoints]
|
|
145
|
+
.sort((a, b) => (a.updatedAt < b.updatedAt ? 1 : a.updatedAt > b.updatedAt ? -1 : 0))
|
|
146
|
+
.slice(0, MAX_LAG_SESSIONS)
|
|
147
|
+
.map((checkpoint) => checkpoint.rolloutIdentity));
|
|
148
|
+
const cache = new Map();
|
|
149
|
+
let firstReason = base.baseReason;
|
|
150
|
+
const note = (reason) => {
|
|
151
|
+
if (firstReason === null)
|
|
152
|
+
firstReason = reason;
|
|
153
|
+
};
|
|
154
|
+
const sizeOf = (identity) => {
|
|
155
|
+
if (!eligible.has(identity))
|
|
156
|
+
return null;
|
|
157
|
+
if (cache.has(identity))
|
|
158
|
+
return cache.get(identity) ?? null;
|
|
159
|
+
const size = computeSize(identity);
|
|
160
|
+
cache.set(identity, size);
|
|
161
|
+
return size;
|
|
162
|
+
};
|
|
163
|
+
const lagOf = (checkpoint) => {
|
|
164
|
+
// Every null branch records a CONCRETE reason: "undetectable" alone is
|
|
165
|
+
// not actionable (rc-9, PR #2563 re-review 4546345444).
|
|
166
|
+
if (!eligible.has(checkpoint.rolloutIdentity)) {
|
|
167
|
+
note('lag_lookup_budget_exceeded');
|
|
168
|
+
return null;
|
|
169
|
+
}
|
|
170
|
+
const size = sizeOf(checkpoint.rolloutIdentity);
|
|
171
|
+
if (size === null) {
|
|
172
|
+
note('transcript_unavailable_or_stat_failed');
|
|
173
|
+
return null;
|
|
174
|
+
}
|
|
175
|
+
// A transcript SMALLER than the committed offset was replaced/truncated:
|
|
176
|
+
// that is an incomparable state, not "no lag".
|
|
177
|
+
if (size < checkpoint.byteOffset) {
|
|
178
|
+
note('transcript_shrank_below_offset');
|
|
179
|
+
return null;
|
|
180
|
+
}
|
|
181
|
+
return size - checkpoint.byteOffset;
|
|
182
|
+
};
|
|
183
|
+
// With no checkpoints there is no lag to determine at all — do not report
|
|
184
|
+
// a spurious "undetectable" on a fresh workspace.
|
|
185
|
+
const lagUndetectable = checkpoints.length > 0 && (base.baseUndetectable || checkpoints.some((checkpoint) => lagOf(checkpoint) === null));
|
|
186
|
+
return {
|
|
187
|
+
lagOf,
|
|
188
|
+
lagUndetectable,
|
|
189
|
+
lagUndetectableReason: lagUndetectable ? (firstReason ?? 'lag_undeterminable') : null,
|
|
190
|
+
};
|
|
191
|
+
}
|
|
192
|
+
/** Latest-degradation-wins over the checkpoint rows (rows are oldest-updated-first). */
|
|
193
|
+
function summarizeCheckpoints(checkpoints, lagOf, lagState) {
|
|
194
|
+
let lastSuccessAt = null;
|
|
195
|
+
let checkpointOffset = null;
|
|
196
|
+
let lagBytes = null;
|
|
197
|
+
let incompleteTailCount = 0;
|
|
198
|
+
let lastDegradation = null;
|
|
199
|
+
for (const checkpoint of checkpoints) {
|
|
200
|
+
// A deferral/failure refreshes updated_at WITH a degradation reason; only
|
|
201
|
+
// clean rows may claim lastSuccessAt (a postponed failure is not a success).
|
|
202
|
+
if (checkpoint.lastDegradationReason === null
|
|
203
|
+
&& (lastSuccessAt === null || checkpoint.updatedAt > lastSuccessAt))
|
|
204
|
+
lastSuccessAt = checkpoint.updatedAt;
|
|
205
|
+
if (checkpointOffset === null || checkpoint.byteOffset > checkpointOffset)
|
|
206
|
+
checkpointOffset = checkpoint.byteOffset;
|
|
207
|
+
const lag = lagOf(checkpoint);
|
|
208
|
+
if (lag !== null && (lagBytes === null || lag > lagBytes))
|
|
209
|
+
lagBytes = lag;
|
|
210
|
+
if (checkpoint.incompleteTail)
|
|
211
|
+
incompleteTailCount += 1;
|
|
212
|
+
if (checkpoint.lastDegradationReason !== null
|
|
213
|
+
&& (lastDegradation === null || checkpoint.updatedAt > lastDegradation.updatedAt)) {
|
|
214
|
+
lastDegradation = { reason: checkpoint.lastDegradationReason, ordinal: checkpoint.lastDegradationOrdinal, updatedAt: checkpoint.updatedAt };
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
const detail = [...checkpoints]
|
|
218
|
+
.sort((a, b) => (a.updatedAt < b.updatedAt ? 1 : a.updatedAt > b.updatedAt ? -1 : 0))
|
|
219
|
+
.slice(0, MAX_DETAIL_SESSIONS)
|
|
220
|
+
.map((checkpoint) => ({
|
|
221
|
+
rolloutIdentity: checkpoint.rolloutIdentity,
|
|
222
|
+
byteOffset: checkpoint.byteOffset,
|
|
223
|
+
lagBytes: lagOf(checkpoint),
|
|
224
|
+
incompleteTail: checkpoint.incompleteTail,
|
|
225
|
+
lastDegradationReason: checkpoint.lastDegradationReason,
|
|
226
|
+
updatedAt: checkpoint.updatedAt,
|
|
227
|
+
}));
|
|
228
|
+
return {
|
|
229
|
+
total: checkpoints.length,
|
|
230
|
+
lastSuccessAt,
|
|
231
|
+
checkpointOffset,
|
|
232
|
+
lagBytes,
|
|
233
|
+
lagUndetectable: lagState.lagUndetectable,
|
|
234
|
+
lagUndetectableReason: lagState.lagUndetectableReason,
|
|
235
|
+
incompleteTailCount,
|
|
236
|
+
lastDegradation,
|
|
237
|
+
sessions: detail,
|
|
238
|
+
truncated: checkpoints.length > detail.length,
|
|
239
|
+
};
|
|
240
|
+
}
|
|
241
|
+
function assessCodex(workspaceDir, locator, codexHomeOverride) {
|
|
242
|
+
const verdict = resolveFlags(workspaceDir, 'host.codex', 'codex_conversation_ingestion');
|
|
243
|
+
// Consent BEFORE any transcript locate (privacy ordering, same discipline as
|
|
244
|
+
// the workbuddy row): a revoked or absent grant must not walk the host's
|
|
245
|
+
// sessions tree — the health surface then describes store rows only.
|
|
246
|
+
const consent = consentView(workspaceDir, 'codex', verdict.ingestionEnabled);
|
|
247
|
+
const consentAllowsLookup = consent.state === 'granted';
|
|
248
|
+
const codexHome = codexHomeOverride ?? process.env.CODEX_HOME ?? path.join(os.homedir(), '.codex');
|
|
249
|
+
// Lag = transcript size − committed byte offset; sizeBytes rides on the
|
|
250
|
+
// lookup (stat only, never content). A null locator = adapter package
|
|
251
|
+
// unresolvable (PRI-1061): flags/consent stay live, lag degrades explicitly.
|
|
252
|
+
const computeSize = (identity) => {
|
|
253
|
+
if (!consentAllowsLookup || locator === null)
|
|
254
|
+
return null;
|
|
255
|
+
try {
|
|
256
|
+
const lookup = locator(codexHome, identity);
|
|
257
|
+
return lookup.ok && typeof lookup.sizeBytes === 'number' ? lookup.sizeBytes : null;
|
|
258
|
+
}
|
|
259
|
+
catch {
|
|
260
|
+
// An unreadable/unexpected sessions tree is an UNDETECTABLE lag, never
|
|
261
|
+
// a fake zero — surfaced through lagUndetectable (rc-9).
|
|
262
|
+
return null;
|
|
263
|
+
}
|
|
264
|
+
};
|
|
265
|
+
let checkpoints;
|
|
266
|
+
let liveOnly;
|
|
267
|
+
const listed = listGovernanceCheckpoints({ workspaceDir, hostKind: 'codex' });
|
|
268
|
+
if (listed.ok) {
|
|
269
|
+
let baseReason = null;
|
|
270
|
+
if (locator === null)
|
|
271
|
+
baseReason = 'host_adapter_unavailable:@principles/codex-adapter';
|
|
272
|
+
else if (!consentAllowsLookup)
|
|
273
|
+
baseReason = 'consent_not_granted';
|
|
274
|
+
const lag = makeLagResolver(listed.checkpoints, computeSize, {
|
|
275
|
+
baseUndetectable: locator === null || !consentAllowsLookup,
|
|
276
|
+
baseReason,
|
|
277
|
+
});
|
|
278
|
+
checkpoints = summarizeCheckpoints(listed.checkpoints, lag.lagOf, lag);
|
|
279
|
+
}
|
|
280
|
+
else {
|
|
281
|
+
checkpoints = { reason: listed.reason, nextAction: listed.nextAction };
|
|
282
|
+
}
|
|
283
|
+
if (locator === null) {
|
|
284
|
+
checkpoints = {
|
|
285
|
+
reason: 'host_adapter_unavailable:@principles/codex-adapter',
|
|
286
|
+
nextAction: ADAPTER_NEXT_ACTION,
|
|
287
|
+
};
|
|
288
|
+
}
|
|
289
|
+
const live = listGovernanceUncheckpointedSessions({ workspaceDir, hostKind: 'codex', limit: MAX_LIVE_SESSIONS });
|
|
290
|
+
liveOnly = live.ok ? { sessions: live.sessions, truncated: live.truncated } : { reason: live.reason, nextAction: live.nextAction };
|
|
291
|
+
return {
|
|
292
|
+
status: 'monitored',
|
|
293
|
+
hostFlag: flagView(verdict.hostEnabled, verdict),
|
|
294
|
+
ingestionFlag: flagView(verdict.ingestionEnabled, verdict),
|
|
295
|
+
consent,
|
|
296
|
+
checkpoints,
|
|
297
|
+
liveOnly,
|
|
298
|
+
};
|
|
299
|
+
}
|
|
300
|
+
function assessWorkbuddy(workspaceDir, home, locators) {
|
|
301
|
+
const verdict = resolveFlags(workspaceDir, 'host.workbuddy', 'workbuddy_conversation_ingestion');
|
|
302
|
+
// Consent BEFORE any transcript locate/stat (privacy ordering): a revoked
|
|
303
|
+
// or absent grant means the health surface describes checkpoint rows from
|
|
304
|
+
// the store only — it never touches the host's transcript files.
|
|
305
|
+
const consent = consentView(workspaceDir, 'workbuddy', verdict.ingestionEnabled);
|
|
306
|
+
const consentAllowsStat = consent.state === 'granted';
|
|
307
|
+
const projectsRoot = locators.workbuddyRoot !== null ? locators.workbuddyRoot(home) : null;
|
|
308
|
+
// Size via stat ONLY and only AFTER the same containment/shape validation
|
|
309
|
+
// the catch-up writer applies — a symlink escape located by the raw name
|
|
310
|
+
// scan must never feed the lag number. Returns the RAW size; the
|
|
311
|
+
// replaced/truncated-file comparison belongs to the single lag resolver.
|
|
312
|
+
const computeSize = (identity) => {
|
|
313
|
+
if (!consentAllowsStat || projectsRoot === null || locators.workbuddy === null || locators.workbuddyValidate === null)
|
|
314
|
+
return null;
|
|
315
|
+
try {
|
|
316
|
+
const located = locators.workbuddy(projectsRoot, identity);
|
|
317
|
+
if (located === null || locators.workbuddyValidate(located, projectsRoot).ok !== true)
|
|
318
|
+
return null;
|
|
319
|
+
const { size } = fs.statSync(located);
|
|
320
|
+
return size;
|
|
321
|
+
}
|
|
322
|
+
catch {
|
|
323
|
+
// Unreadable/invalid transcript → UNDETECTABLE lag, never a fake zero.
|
|
324
|
+
return null;
|
|
325
|
+
}
|
|
326
|
+
};
|
|
327
|
+
const baseUndetectable = !consentAllowsStat
|
|
328
|
+
|| locators.workbuddy === null
|
|
329
|
+
|| projectsRoot === null
|
|
330
|
+
|| locators.workbuddyValidate === null;
|
|
331
|
+
let checkpoints;
|
|
332
|
+
let liveOnly;
|
|
333
|
+
const listed = listGovernanceCheckpoints({ workspaceDir, hostKind: 'workbuddy' });
|
|
334
|
+
if (listed.ok) {
|
|
335
|
+
let baseReason = null;
|
|
336
|
+
if (locators.workbuddy === null || projectsRoot === null)
|
|
337
|
+
baseReason = 'host_adapter_unavailable:@principles/workbuddy-adapter';
|
|
338
|
+
else if (!consentAllowsStat)
|
|
339
|
+
baseReason = 'consent_not_granted';
|
|
340
|
+
else if (locators.workbuddyValidate === null)
|
|
341
|
+
baseReason = 'transcript_path_validator_unavailable';
|
|
342
|
+
const lag = makeLagResolver(listed.checkpoints, computeSize, { baseUndetectable, baseReason });
|
|
343
|
+
checkpoints = summarizeCheckpoints(listed.checkpoints, lag.lagOf, lag);
|
|
344
|
+
}
|
|
345
|
+
else {
|
|
346
|
+
checkpoints = { reason: listed.reason, nextAction: listed.nextAction };
|
|
347
|
+
}
|
|
348
|
+
if (locators.workbuddy === null || projectsRoot === null) {
|
|
349
|
+
checkpoints = {
|
|
350
|
+
reason: 'host_adapter_unavailable:@principles/workbuddy-adapter',
|
|
351
|
+
nextAction: ADAPTER_NEXT_ACTION,
|
|
352
|
+
};
|
|
353
|
+
}
|
|
354
|
+
const live = listGovernanceUncheckpointedSessions({ workspaceDir, hostKind: 'workbuddy', limit: MAX_LIVE_SESSIONS });
|
|
355
|
+
liveOnly = live.ok ? { sessions: live.sessions, truncated: live.truncated } : { reason: live.reason, nextAction: live.nextAction };
|
|
356
|
+
return {
|
|
357
|
+
status: 'monitored',
|
|
358
|
+
hostFlag: flagView(verdict.hostEnabled, verdict),
|
|
359
|
+
ingestionFlag: flagView(verdict.ingestionEnabled, verdict),
|
|
360
|
+
consent,
|
|
361
|
+
checkpoints,
|
|
362
|
+
liveOnly,
|
|
363
|
+
};
|
|
364
|
+
}
|
|
365
|
+
export async function assessIngestionHealth(options) {
|
|
366
|
+
// The caller (handleHealth / tests) owns workspace resolution — this section
|
|
367
|
+
// reads the SAME workspace the rest of the report describes, never a
|
|
368
|
+
// separately re-resolved "nearest" one that could disagree with the report.
|
|
369
|
+
const { workspaceDir } = options;
|
|
370
|
+
const home = options.home ?? os.homedir();
|
|
371
|
+
let locators;
|
|
372
|
+
try {
|
|
373
|
+
locators = await loadAdapterLocators();
|
|
374
|
+
}
|
|
375
|
+
catch {
|
|
376
|
+
// The loader already downgrades each failed package import to null; this
|
|
377
|
+
// guard keeps an unforeseen linker error from taking down `pd health`.
|
|
378
|
+
locators = { codex: null, workbuddy: null, workbuddyRoot: null, workbuddyValidate: null };
|
|
379
|
+
}
|
|
380
|
+
return {
|
|
381
|
+
// Per-host isolation (PR #2563 review): a throwing store reader / adapter /
|
|
382
|
+
// consent reader degrades THAT host into a structured row; the main health
|
|
383
|
+
// report (JSON + text + `--host codex`) still renders in full.
|
|
384
|
+
codex: safeAssess(() => assessCodex(workspaceDir, locators.codex, options.codexHome)),
|
|
385
|
+
workbuddy: safeAssess(() => assessWorkbuddy(workspaceDir, home, locators)),
|
|
386
|
+
openclaw: {
|
|
387
|
+
status: 'not_wired',
|
|
388
|
+
reason: 'openclaw live observation bypass (openclaw_unified_observation) lands in PRI-1171 P3 ticket ⑨; the OpenClaw live hook path writes the governance base tables and never a transcript checkpoint.',
|
|
389
|
+
nextAction: 'No action — this row becomes monitored when P3 ticket ⑨ wires the unified live bypass.',
|
|
390
|
+
},
|
|
391
|
+
};
|
|
392
|
+
}
|
|
393
|
+
/** Compact text lines for the non-JSON `pd health` output (cli-6: nextAction visible). */
|
|
394
|
+
export function formatIngestionHealthLines(section) {
|
|
395
|
+
const lines = [];
|
|
396
|
+
lines.push('Conversation ingestion (unified transcript seam):');
|
|
397
|
+
for (const host of ['codex', 'workbuddy', 'openclaw']) {
|
|
398
|
+
const row = section[host];
|
|
399
|
+
if (row.status === 'not_wired') {
|
|
400
|
+
lines.push(` ${host}: not_wired — ${row.reason}`);
|
|
401
|
+
lines.push(` nextAction: ${row.nextAction}`);
|
|
402
|
+
continue;
|
|
403
|
+
}
|
|
404
|
+
const flags = `host=${row.hostFlag.state}/ingestion=${row.ingestionFlag.state}/consent=${row.consent.state}`;
|
|
405
|
+
const checkpoints = 'reason' in row.checkpoints
|
|
406
|
+
? `checkpoints=degraded(${row.checkpoints.reason})`
|
|
407
|
+
: `checkpoints=${row.checkpoints.total}(offset=${row.checkpoints.checkpointOffset ?? 'n/a'}, lag=${row.checkpoints.lagBytes ?? 'n/a'}B${row.checkpoints.lagUndetectable ? ', lagUndetectable' : ''})`;
|
|
408
|
+
const liveOnly = 'reason' in row.liveOnly
|
|
409
|
+
? `liveOnly=degraded(${row.liveOnly.reason})`
|
|
410
|
+
: `liveOnly=${row.liveOnly.sessions.length}${row.liveOnly.truncated ? '+' : ''}`;
|
|
411
|
+
lines.push(` ${host}: ${flags}; ${checkpoints}; ${liveOnly}`);
|
|
412
|
+
// Bounded session detail in TEXT mode too (the JSON fields are not a
|
|
413
|
+
// substitute for operator diagnosis): newest sessions with their lag,
|
|
414
|
+
// the latest degradation, and which sessions are live_only.
|
|
415
|
+
if ('sessions' in row.checkpoints) {
|
|
416
|
+
// TD §9 defines this as MAX(updated_at) over checkpoints carrying NO
|
|
417
|
+
// degradation reason — a "last clean checkpoint", NOT an independently
|
|
418
|
+
// persisted success timestamp (a deferral refreshes updated_at). Keep
|
|
419
|
+
// the label honest; see PR #2563 re-review 4546268135 (follow-up).
|
|
420
|
+
lines.push(` lastCleanCheckpoint: ${row.checkpoints.lastSuccessAt ?? 'n/a'}`);
|
|
421
|
+
// rc-9: an undetectable lag must say WHY and what to do, not just be a flag.
|
|
422
|
+
if (row.checkpoints.lagUndetectable) {
|
|
423
|
+
lines.push(` lagUndetectable: ${row.checkpoints.lagUndetectableReason ?? 'lag_undeterminable'}`);
|
|
424
|
+
lines.push(` nextAction: ${LAG_UNDETECTABLE_NEXT_ACTION}`);
|
|
425
|
+
}
|
|
426
|
+
if (row.checkpoints.lastDegradation !== null) {
|
|
427
|
+
lines.push(` lastDegradation: ${row.checkpoints.lastDegradation.reason} @ ${row.checkpoints.lastDegradation.updatedAt}`);
|
|
428
|
+
}
|
|
429
|
+
const shown = row.checkpoints.sessions.slice(0, TEXT_DETAIL_SESSIONS);
|
|
430
|
+
for (const session of shown) {
|
|
431
|
+
const lag = session.lagBytes === null ? 'n/a' : `${session.lagBytes}B`;
|
|
432
|
+
const tail = session.incompleteTail ? ', incomplete_tail' : '';
|
|
433
|
+
const degradation = session.lastDegradationReason !== null ? `, degraded=${session.lastDegradationReason}` : '';
|
|
434
|
+
lines.push(` session ${session.rolloutIdentity}: offset=${session.byteOffset}, lag=${lag}${tail}${degradation}`);
|
|
435
|
+
}
|
|
436
|
+
// `total` is the FULL checkpoint count and `sessions` is already capped
|
|
437
|
+
// at MAX_DETAIL_SESSIONS. Count against what the operator ACTUALLY saw:
|
|
438
|
+
// 4..8 sessions used to lose 1..5 rows with no hint at all (PR #2563
|
|
439
|
+
// review, CodeRabbit re-review comment 4545551439).
|
|
440
|
+
const hidden = row.checkpoints.total - shown.length;
|
|
441
|
+
if (hidden > 0)
|
|
442
|
+
lines.push(` …and ${hidden} more sessions (JSON report carries up to ${MAX_DETAIL_SESSIONS})`);
|
|
443
|
+
}
|
|
444
|
+
if ('sessions' in row.liveOnly) {
|
|
445
|
+
const shown = row.liveOnly.sessions.slice(0, TEXT_DETAIL_SESSIONS);
|
|
446
|
+
for (const session of shown) {
|
|
447
|
+
lines.push(` liveOnly session ${session.rolloutIdentity}: lastObserved=${session.lastObservedAt}, ${session.observationCount} observation(s), no checkpoint (live hook path)`);
|
|
448
|
+
}
|
|
449
|
+
const hidden = row.liveOnly.sessions.length - shown.length;
|
|
450
|
+
if (hidden > 0)
|
|
451
|
+
lines.push(` …and ${hidden} more live-only sessions`);
|
|
452
|
+
if (row.liveOnly.truncated)
|
|
453
|
+
lines.push(` …and more live-only sessions beyond the store limit (${MAX_LIVE_SESSIONS})`);
|
|
454
|
+
}
|
|
455
|
+
if ('reason' in row.checkpoints)
|
|
456
|
+
lines.push(` nextAction: ${row.checkpoints.nextAction}`);
|
|
457
|
+
if ('reason' in row.liveOnly)
|
|
458
|
+
lines.push(` nextAction: ${row.liveOnly.nextAction}`);
|
|
459
|
+
if (row.consent.state === 'unreadable' && row.consent.nextAction !== undefined) {
|
|
460
|
+
lines.push(` nextAction: ${row.consent.nextAction}`);
|
|
461
|
+
}
|
|
462
|
+
if (row.consent.state === 'flag_on_without_grant' && row.consent.nextAction !== undefined) {
|
|
463
|
+
lines.push(` nextAction: ${row.consent.nextAction}`);
|
|
464
|
+
}
|
|
465
|
+
if (row.hostFlag.reason !== undefined) {
|
|
466
|
+
lines.push(` config: ${row.hostFlag.reason}`);
|
|
467
|
+
if (row.hostFlag.nextAction !== undefined)
|
|
468
|
+
lines.push(` nextAction: ${row.hostFlag.nextAction}`);
|
|
469
|
+
}
|
|
470
|
+
}
|
|
471
|
+
return lines;
|
|
472
|
+
}
|
|
473
|
+
//# sourceMappingURL=health-ingestion.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"health-ingestion.js","sourceRoot":"","sources":["../../src/commands/health-ingestion.ts"],"names":[],"mappings":"AAAA;;;;;;;;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,CAAC,CAAC;QACtG,CAAC;IACH,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC"}
|
|
@@ -78,7 +78,6 @@ export interface McpHealthSection {
|
|
|
78
78
|
reason?: string;
|
|
79
79
|
nextAction?: string;
|
|
80
80
|
}
|
|
81
|
-
export declare const MCP_BINDING_SCHEMA = "pd.mcp-binding.v1";
|
|
82
81
|
interface AssessOptions {
|
|
83
82
|
host: McpHealthHost;
|
|
84
83
|
homeDir?: string;
|
|
@@ -89,5 +88,28 @@ interface AssessOptions {
|
|
|
89
88
|
export declare function assessMcpHealth(options: AssessOptions): McpHealthSection;
|
|
90
89
|
/** Shared text rendering so every host health surface reports the same fields. */
|
|
91
90
|
export declare function formatMcpHealthLines(section: McpHealthSection): string[];
|
|
91
|
+
/** How `pd health` chose the MCP host when `--host` was not given (PRI-1186). */
|
|
92
|
+
export type McpHostSelectionBy = 'explicit-flag' | 'binding-workspace-match' | 'default-no-match' | 'default-ambiguous';
|
|
93
|
+
export interface McpHostSelection {
|
|
94
|
+
host: McpHealthHost;
|
|
95
|
+
selectedBy: McpHostSelectionBy;
|
|
96
|
+
/** Every host whose binding serves the workspace (candidate order). */
|
|
97
|
+
matchedHosts: McpHealthHost[];
|
|
98
|
+
}
|
|
99
|
+
/**
|
|
100
|
+
* The serving binding is the host authority (PRI-1186): each host's
|
|
101
|
+
* installer-written mcp-binding.json records the workspace it serves, so a
|
|
102
|
+
* unique workspaceDir match selects that host. Zero or multiple matches keep
|
|
103
|
+
* the historical openclaw default and are disclosed via selectedBy — never a
|
|
104
|
+
* silent guess (rc-9). Feature flags are deliberately NOT consulted: they
|
|
105
|
+
* default on machine-wide and say nothing about which host serves a workspace.
|
|
106
|
+
*/
|
|
107
|
+
export declare function selectMcpHostForWorkspace(workspaceDir: string, options?: {
|
|
108
|
+
homeDir?: string;
|
|
109
|
+
env?: {
|
|
110
|
+
CODEX_HOME?: string;
|
|
111
|
+
};
|
|
112
|
+
}): McpHostSelection;
|
|
113
|
+
export declare function formatMcpHostSelectionLine(selection: McpHostSelection): string;
|
|
92
114
|
export {};
|
|
93
115
|
//# sourceMappingURL=health-mcp.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"health-mcp.d.ts","sourceRoot":"","sources":["../../src/commands/health-mcp.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"health-mcp.d.ts","sourceRoot":"","sources":["../../src/commands/health-mcp.ts"],"names":[],"mappings":"AAoCA,MAAM,MAAM,aAAa,GAAG,OAAO,GAAG,UAAU,GAAG,WAAW,CAAC;AAE/D,MAAM,MAAM,eAAe,GACvB,SAAS,GACT,gBAAgB,GAChB,eAAe,GACf,gBAAgB,GAChB,cAAc,GACd,kBAAkB,GAClB,kBAAkB,GAClB,2BAA2B,CAAC;AAEhC,MAAM,MAAM,MAAM,GAAG,OAAO,GAAG,YAAY,CAAC;AAE5C,MAAM,WAAW,gBAAgB;IAC/B,+FAA+F;IAC/F,WAAW,EAAE,MAAM,CAAC;IACpB,wEAAwE;IACxE,KAAK,EAAE,MAAM,CAAC;IACd,kGAAkG;IAClG,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,aAAa,CAAC;IACpB,MAAM,EAAE,eAAe,CAAC;IACxB,MAAM,EAAE;QACN,UAAU,EAAE,MAAM,CAAC;QACnB,KAAK,EAAE,MAAM,CAAC;QACd,WAAW,EAAE,OAAO,CAAC;QACrB,qEAAqE;QACrE,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;QACvB,uFAAuF;QACvF,GAAG,EAAE,MAAM,GAAG,IAAI,CAAC;QACnB,SAAS,EAAE,sBAAsB,GAAG,4BAA4B,GAAG,IAAI,CAAC;QACxE,iBAAiB,EAAE,MAAM,CAAC;KAC3B,CAAC;IACF,OAAO,EAAE;QACP,IAAI,EAAE,MAAM,CAAC;QACb,MAAM,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