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
|
@@ -87,6 +87,8 @@ export async function runGovernanceAdmission(args) {
|
|
|
87
87
|
workspaceDir,
|
|
88
88
|
logicalObservationKey: outcome.logicalObservationKey,
|
|
89
89
|
canonicalPainId: outcome.canonicalPainId,
|
|
90
|
+
codexConversationIngestionEnabled: true,
|
|
91
|
+
// Legacy alias: an older installed host-runtime reads only this name.
|
|
90
92
|
conversationIngestionEnabled: true,
|
|
91
93
|
});
|
|
92
94
|
if (!cont.ok) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ingestGovernanceObservations, recordVerifiedToolOutcomes, runConversationIngestion, } from '@principles/host-runtime';
|
|
1
|
+
import { CODEX_INGESTION_DISCLOSURE_VERSION, ingestGovernanceObservations, readConversationIngestionConsent, recordVerifiedToolOutcomes, resolveTextPolicy, runConversationIngestion, } from '@principles/host-runtime';
|
|
2
2
|
import { createNodeTranscriptPort } from './transcript-decoder.js';
|
|
3
3
|
import { createCodexTranscriptSource } from './transcript-source.js';
|
|
4
4
|
import { resolveCodexHome } from './codex-home.js';
|
|
@@ -13,6 +13,19 @@ export function setCodexTranscriptPortForTest(port) {
|
|
|
13
13
|
function activeTranscriptPort(options) {
|
|
14
14
|
return options.port ?? activePort ?? createNodeTranscriptPort();
|
|
15
15
|
}
|
|
16
|
+
/**
|
|
17
|
+
* PRI-1179: the consent-tiered `visible_text` bound for Codex. The full tier is
|
|
18
|
+
* reachable ONLY from a record that is `granted` against the CURRENT frozen
|
|
19
|
+
* disclosure (`CODEX_INGESTION_DISCLOSURE_VERSION`); an absent, unreadable,
|
|
20
|
+
* revoked or older-disclosure record resolves to the bounded tier. An
|
|
21
|
+
* unreadable ledger resolves narrow on purpose — the health surface reports the
|
|
22
|
+
* malformed record loudly, and no content is lost by staying bounded.
|
|
23
|
+
*/
|
|
24
|
+
function resolveCodexTextPolicy(workspaceDir) {
|
|
25
|
+
const read = readConversationIngestionConsent(workspaceDir, 'codex');
|
|
26
|
+
const record = read.ok ? read.record : null;
|
|
27
|
+
return resolveTextPolicy({ decision: record?.decision ?? 'not_present', disclosureVersion: record?.disclosureVersion ?? null }, CODEX_INGESTION_DISCLOSURE_VERSION);
|
|
28
|
+
}
|
|
16
29
|
function ingestLiveObservation({ fields, rolloutIdentity, workspaceDir, now }) {
|
|
17
30
|
const nowIso = now.toISOString();
|
|
18
31
|
let observation = null;
|
|
@@ -54,6 +67,11 @@ function ingestLiveObservation({ fields, rolloutIdentity, workspaceDir, now }) {
|
|
|
54
67
|
}
|
|
55
68
|
const result = ingestGovernanceObservations({
|
|
56
69
|
workspaceDir,
|
|
70
|
+
// PRI-1179 P1: the LIVE path must apply the same consent-tiered bound as
|
|
71
|
+
// the transcript replay. A narrower live bound stores a truncated
|
|
72
|
+
// user_turn, and the replay then sees a content mismatch on the same
|
|
73
|
+
// logical key — a lineage conflict that stalls the checkpoint forever.
|
|
74
|
+
maxVisibleTextChars: resolveCodexTextPolicy(workspaceDir).maxChars,
|
|
57
75
|
observations: [observation],
|
|
58
76
|
now,
|
|
59
77
|
});
|
|
@@ -147,11 +165,14 @@ function ingestTranscriptDelta({ fallbackRootSessionId, transcriptPath, workspac
|
|
|
147
165
|
// codex_conversation_ingestion) is checked by pd-hook / catch-up BEFORE
|
|
148
166
|
// this module is entered, and the consent LEDGER remains the governance
|
|
149
167
|
// record the setup flow enforces (v2 authority model — the runtime gate
|
|
150
|
-
// reads only the flags). The pipeline's consent gate therefore
|
|
151
|
-
// the setup-flow invariant 'granted'
|
|
152
|
-
// the real v3 record + disclosureVersion tier.
|
|
168
|
+
// reads only the flags). The pipeline's consent gate therefore keeps
|
|
169
|
+
// receiving the setup-flow invariant 'granted'.
|
|
153
170
|
flags: { ingestionEnabled: true },
|
|
154
171
|
consent: { decision: 'granted' },
|
|
172
|
+
// PRI-1179: the STORED TEXT bound is a separate fact from the gate above —
|
|
173
|
+
// it comes from the recorded v3 consent record, so a stale disclosure or a
|
|
174
|
+
// revoke can only ever narrow what is stored, never widen it.
|
|
175
|
+
textPolicy: resolveCodexTextPolicy(workspaceDir),
|
|
155
176
|
now,
|
|
156
177
|
port,
|
|
157
178
|
degradeTexts: CODEX_PIPELINE_DEGRADE_TEXTS,
|
|
@@ -10,9 +10,11 @@
|
|
|
10
10
|
* execution facts anchored on the `event_msg item_completed
|
|
11
11
|
* CommandExecution` record whose `item.id` IS the hook `tool_use_id` id
|
|
12
12
|
* space (the G1-verified bridge; the model-level `call_id` is a different
|
|
13
|
-
* space). Hidden reasoning
|
|
14
|
-
*
|
|
15
|
-
*
|
|
13
|
+
* space). Hidden reasoning BODIES (encrypted_content) are never read — only the
|
|
14
|
+
* optional plaintext `summary` is projected as a `reasoning` observation
|
|
15
|
+
* (PRI-1179). System/developer prompts, world_state, host-injected context,
|
|
16
|
+
* and unknown record bodies are identified by shape and dropped before
|
|
17
|
+
* persistence — never projected, logged, or emitted.
|
|
16
18
|
*
|
|
17
19
|
* Failure classes are distinct (SPEC §14): an incomplete final line (no
|
|
18
20
|
* trailing newline at EOF) is a transient append/flush boundary — the
|
|
@@ -10,9 +10,11 @@
|
|
|
10
10
|
* execution facts anchored on the `event_msg item_completed
|
|
11
11
|
* CommandExecution` record whose `item.id` IS the hook `tool_use_id` id
|
|
12
12
|
* space (the G1-verified bridge; the model-level `call_id` is a different
|
|
13
|
-
* space). Hidden reasoning
|
|
14
|
-
*
|
|
15
|
-
*
|
|
13
|
+
* space). Hidden reasoning BODIES (encrypted_content) are never read — only the
|
|
14
|
+
* optional plaintext `summary` is projected as a `reasoning` observation
|
|
15
|
+
* (PRI-1179). System/developer prompts, world_state, host-injected context,
|
|
16
|
+
* and unknown record bodies are identified by shape and dropped before
|
|
17
|
+
* persistence — never projected, logged, or emitted.
|
|
16
18
|
*
|
|
17
19
|
* Failure classes are distinct (SPEC §14): an incomplete final line (no
|
|
18
20
|
* trailing newline at EOF) is a transient append/flush boundary — the
|
|
@@ -123,6 +125,28 @@ function joinItemText(item) {
|
|
|
123
125
|
}
|
|
124
126
|
return parts.length > 0 ? parts.join('') : null;
|
|
125
127
|
}
|
|
128
|
+
/**
|
|
129
|
+
* PRI-1179: the storable face of a Codex reasoning record. The rollout stores
|
|
130
|
+
* the reasoning body encrypted (`encrypted_content`, never read) and an
|
|
131
|
+
* optional `summary: [{ type: 'summary_text', text }]`. Only that summary text
|
|
132
|
+
* is evidence; no summary means nothing is stored (not a degradation).
|
|
133
|
+
*/
|
|
134
|
+
function joinReasoningSummary(payload) {
|
|
135
|
+
const summary = own(payload, 'summary');
|
|
136
|
+
if (!Array.isArray(summary))
|
|
137
|
+
return null;
|
|
138
|
+
const parts = [];
|
|
139
|
+
for (const entry of summary) {
|
|
140
|
+
if (!isRecord(entry))
|
|
141
|
+
continue;
|
|
142
|
+
if (own(entry, 'type') !== 'summary_text')
|
|
143
|
+
continue;
|
|
144
|
+
const text = own(entry, 'text');
|
|
145
|
+
if (typeof text === 'string' && text.trim().length > 0)
|
|
146
|
+
parts.push(text);
|
|
147
|
+
}
|
|
148
|
+
return parts.length > 0 ? parts.join('\n') : null;
|
|
149
|
+
}
|
|
126
150
|
function observationBase(context, turnId) {
|
|
127
151
|
return {
|
|
128
152
|
hostKind: 'codex',
|
|
@@ -156,8 +180,33 @@ function projectRecord(context, record) {
|
|
|
156
180
|
}
|
|
157
181
|
if (type === 'response_item') {
|
|
158
182
|
const payloadType = own(payload, 'type');
|
|
159
|
-
if (payloadType === 'reasoning')
|
|
160
|
-
|
|
183
|
+
if (payloadType === 'reasoning') {
|
|
184
|
+
// PRI-1179: the rollout carries the hidden reasoning ONLY as
|
|
185
|
+
// `encrypted_content` plus an OPTIONAL plaintext `summary` array. The
|
|
186
|
+
// encrypted blob is never read; the summary is the one storable face.
|
|
187
|
+
const summaryText = joinReasoningSummary(payload);
|
|
188
|
+
if (summaryText === null)
|
|
189
|
+
return; // no summary → nothing to store
|
|
190
|
+
const itemId = own(payload, 'id');
|
|
191
|
+
const turnId = metadataTurnId(payload) ?? context.currentTurnId;
|
|
192
|
+
if (turnId === null || typeof itemId !== 'string' || itemId.length === 0) {
|
|
193
|
+
warnBounded(context, `observation_skipped_missing_identity:${ordinal}`);
|
|
194
|
+
return;
|
|
195
|
+
}
|
|
196
|
+
context.observations.push({
|
|
197
|
+
...observationBase(context, turnId),
|
|
198
|
+
kind: 'reasoning',
|
|
199
|
+
logicalObservationKey: `codex|${context.rolloutIdentity}|${turnId}|reasoning:${itemId}`,
|
|
200
|
+
transcriptRecordKey: `codex|${context.rolloutIdentity}|${ordinal}`,
|
|
201
|
+
recordOrdinal: ordinal,
|
|
202
|
+
recordByteStart,
|
|
203
|
+
visibleText: summaryText,
|
|
204
|
+
source: 'transcript',
|
|
205
|
+
completeness: 'complete',
|
|
206
|
+
observedAt,
|
|
207
|
+
});
|
|
208
|
+
return;
|
|
209
|
+
}
|
|
161
210
|
if (payloadType === 'custom_tool_call' || payloadType === 'function_call') {
|
|
162
211
|
const turnId = metadataTurnId(payload);
|
|
163
212
|
const callId = own(payload, 'call_id');
|
|
@@ -205,6 +254,12 @@ function projectRecord(context, record) {
|
|
|
205
254
|
}
|
|
206
255
|
if (type === 'event_msg') {
|
|
207
256
|
const payloadType = own(payload, 'type');
|
|
257
|
+
// PRI-1179: turn identity for records that cannot carry their own (the
|
|
258
|
+
// reasoning response_item). Transcript order makes the latest event-level
|
|
259
|
+
// turn the enclosing one.
|
|
260
|
+
const eventTurnId = own(payload, 'turn_id');
|
|
261
|
+
if (typeof eventTurnId === 'string' && eventTurnId.length > 0)
|
|
262
|
+
context.currentTurnId = eventTurnId;
|
|
208
263
|
if (payloadType === 'item_completed') {
|
|
209
264
|
const item = own(payload, 'item');
|
|
210
265
|
if (!isRecord(item))
|
|
@@ -367,6 +422,7 @@ export function decodeTranscriptWindow(input) {
|
|
|
367
422
|
observations: [],
|
|
368
423
|
meta: { rootSessionId: null, cliVersion: null, parentRolloutIdentity: null, agentIdentity: null, agentDepth: null },
|
|
369
424
|
modelCallsByTurn: new Map(),
|
|
425
|
+
currentTurnId: null,
|
|
370
426
|
compactionTimestamp: null,
|
|
371
427
|
rollbackTurns: [],
|
|
372
428
|
warnings: [],
|
|
@@ -23,19 +23,21 @@ export declare const CODEX_HOOK_TIMEOUT_MS = 5000;
|
|
|
23
23
|
/** Reserved for Native packing, encoding and stdout after Adaptive is cut off. */
|
|
24
24
|
export declare const CODEX_NATIVE_RESERVE_MS = 800;
|
|
25
25
|
export declare const CODEX_ADAPTIVE_BUDGET_MS: number;
|
|
26
|
+
/** Maximum from sending a scoring request to validating its full response. */
|
|
27
|
+
export declare const CODEX_ADAPTIVE_DECISION_MS: 2000;
|
|
26
28
|
export interface PdHookDeps {
|
|
27
29
|
/** Test seam: replace the outbound transport without bypassing the hook entry. */
|
|
28
30
|
readonly fetchImpl?: typeof fetch;
|
|
29
31
|
readonly now?: () => number;
|
|
30
|
-
readonly
|
|
31
|
-
readonly generationTimeoutMs?: number;
|
|
32
|
+
readonly requestTimeoutMs?: number;
|
|
32
33
|
/** Test seam: effective adaptive budget inside the host hook window. */
|
|
33
34
|
readonly hookBudgetMs?: number;
|
|
34
35
|
/**
|
|
35
|
-
* PRI-
|
|
36
|
-
* to the
|
|
36
|
+
* PRI-1182: remaining-budget floor for the pre-selection skip gate. Defaults
|
|
37
|
+
* to the request's minimum executable envelope; 0 keeps a cancellation
|
|
38
|
+
* scenario sending.
|
|
37
39
|
*/
|
|
38
|
-
readonly
|
|
40
|
+
readonly minExecutableBudgetMs?: number;
|
|
39
41
|
}
|
|
40
42
|
export declare function processHookInvocation(rawStdin: string, _env?: EnvMap, cwd?: string, deps?: PdHookDeps): Promise<PdHookResult>;
|
|
41
43
|
export {};
|
|
@@ -5,7 +5,7 @@ import path from 'node:path';
|
|
|
5
5
|
import process from 'node:process';
|
|
6
6
|
import { pathToFileURL, fileURLToPath } from 'node:url';
|
|
7
7
|
import { appendEventLogLine, redactTelemetryString, isRuleHostEvaluatedEventData } from '@principles/core/runtime';
|
|
8
|
-
import { createAdaptivePriorityProviderForConfig, createCodexRuleContextProvider, createProductionHostRuntime, loadPdConfigForPlugin, resolveHostToolSemanticsForHook, resolveNearestPdWorkspace } from '@principles/host-runtime';
|
|
8
|
+
import { ADAPTIVE_SELECTION_LIMITS, createAdaptivePriorityProviderForConfig, createCodexRuleContextProvider, createProductionHostRuntime, loadPdConfigForPlugin, resolveHostToolSemanticsForHook, resolveNearestPdWorkspace } from '@principles/host-runtime';
|
|
9
9
|
import { CODEX_TOOL_SEMANTIC_MAPPINGS, CODEX_TOOL_SEMANTICS } from './tool-semantics.js';
|
|
10
10
|
import { computeFeatureFlagsFromConfig } from '@principles/core/runtime';
|
|
11
11
|
import { CodexHooksHostAdapter } from './host-adapter.js';
|
|
@@ -38,7 +38,15 @@ function adaptiveSelectionDiagnostic(line) {
|
|
|
38
38
|
? 'skipped'
|
|
39
39
|
: 'degraded';
|
|
40
40
|
const failures = line.failures.length > 0 ? line.failures.join('|') : 'none';
|
|
41
|
-
|
|
41
|
+
// rc-8: bounded score projection — ids are `c1..cN` / `insufficient_context`,
|
|
42
|
+
// never prompt text, and at most 16 entries reach the line.
|
|
43
|
+
const scores = line.decision === null
|
|
44
|
+
? 'none'
|
|
45
|
+
: Object.entries(line.decision.scores).slice(0, 16).map(([id, value]) => `${id}=${value}`).join(',');
|
|
46
|
+
const decision = line.decision === null
|
|
47
|
+
? 'unknown'
|
|
48
|
+
: `${line.decision.status}:${line.decision.reason}:${line.decision.ref ?? 'none'}`;
|
|
49
|
+
return `[PD] status=${status} reason=adaptive_selection_${line.status}:${line.reason} stage=${line.stage} sends=${line.sends} requestSentAt=${line.requestSentAt ?? 'unknown'} firstByteAt=${line.firstByteAt ?? 'unknown'} generationEndedAt=${line.generationEndedAt ?? 'unknown'} validatedAt=${line.validatedAt ?? 'unknown'} cancelledAt=${line.cancelledAt ?? 'unknown'} httpStatus=${line.httpStatus ?? 'unknown'} finishReason=${line.finishReason} modelObserved=${line.modelObserved ?? 'unknown'} providerObserved=${line.providerObserved ?? 'absent'} decision=${decision} scores=${scores} failures=${failures}`
|
|
42
50
|
.replace(/\s+/g, ' ')
|
|
43
51
|
.trim()
|
|
44
52
|
.slice(0, MAX_DIAGNOSTIC * 2);
|
|
@@ -222,6 +230,8 @@ export const CODEX_HOOK_TIMEOUT_MS = 5_000;
|
|
|
222
230
|
/** Reserved for Native packing, encoding and stdout after Adaptive is cut off. */
|
|
223
231
|
export const CODEX_NATIVE_RESERVE_MS = 800;
|
|
224
232
|
export const CODEX_ADAPTIVE_BUDGET_MS = CODEX_HOOK_TIMEOUT_MS - CODEX_NATIVE_RESERVE_MS;
|
|
233
|
+
/** Maximum from sending a scoring request to validating its full response. */
|
|
234
|
+
export const CODEX_ADAPTIVE_DECISION_MS = ADAPTIVE_SELECTION_LIMITS.requestTimeoutMs;
|
|
225
235
|
// stdin, env and cwd are the host CLI contract; `deps` is the optional transport
|
|
226
236
|
// seam that lets integration tests drive the real entry point without a network.
|
|
227
237
|
// eslint-disable-next-line @typescript-eslint/max-params
|
|
@@ -431,9 +441,8 @@ export async function processHookInvocation(rawStdin, _env = process.env, cwd =
|
|
|
431
441
|
env: _env,
|
|
432
442
|
...(deps.fetchImpl ? { fetchImpl: deps.fetchImpl } : {}),
|
|
433
443
|
...(deps.now ? { now: deps.now } : {}),
|
|
434
|
-
|
|
435
|
-
...(deps.
|
|
436
|
-
...(deps.minRemainingBudgetMs !== undefined ? { minRemainingBudgetMs: deps.minRemainingBudgetMs } : {}),
|
|
444
|
+
requestTimeoutMs: deps.requestTimeoutMs ?? CODEX_ADAPTIVE_DECISION_MS,
|
|
445
|
+
...(deps.minExecutableBudgetMs !== undefined ? { minExecutableBudgetMs: deps.minExecutableBudgetMs } : {}),
|
|
437
446
|
outerDeadlineAt: adaptiveDeadlineAt,
|
|
438
447
|
onDiagnostic: (line) => { adaptiveDiagnostics.push(adaptiveSelectionDiagnostic(line)); },
|
|
439
448
|
});
|
|
@@ -458,13 +467,15 @@ export async function processHookInvocation(rawStdin, _env = process.env, cwd =
|
|
|
458
467
|
? toolSemanticsResolution.registry
|
|
459
468
|
: CODEX_TOOL_SEMANTICS;
|
|
460
469
|
const toolSemanticsDiagnostics = toolSemanticsResolution.ok
|
|
461
|
-
|
|
470
|
+
// ADR-0030: a legacy persisted declaration still loads (degraded to
|
|
471
|
+
// defaults) and must be visible on stderr (rc-9).
|
|
472
|
+
? toolSemanticsResolution.warnings.map((warning) => diagnostic(warning, 're-run this host so it refreshes its persisted tool declaration'))
|
|
462
473
|
: [diagnostic(toolSemanticsResolution.reason, toolSemanticsResolution.nextAction)];
|
|
463
474
|
const result = await createProductionHostRuntime({
|
|
464
475
|
projectDir: requestedCwd,
|
|
465
476
|
hostKind: 'codex',
|
|
466
477
|
toolSemantics,
|
|
467
|
-
...(adaptivePriorityProvider ? { adaptivePriorityProvider } : {}),
|
|
478
|
+
...(adaptivePriorityProvider ? { adaptiveGapProvider: adaptivePriorityProvider } : {}),
|
|
468
479
|
ruleContextProvider: createCodexRuleContextProvider({
|
|
469
480
|
workspaceDir: resolution.workspaceDir,
|
|
470
481
|
projectDir: requestedCwd,
|
|
@@ -21,7 +21,11 @@
|
|
|
21
21
|
import { buildToolSemanticRegistry } from '@principles/core/runtime';
|
|
22
22
|
export const CODEX_TOOL_SEMANTIC_MAPPINGS = Object.freeze([
|
|
23
23
|
{ rawToolName: 'Bash', canonicalKind: 'execute' },
|
|
24
|
-
|
|
24
|
+
// ADR-0030: apply_patch writes a `*** Begin Patch` envelope. The design gate
|
|
25
|
+
// must parse those file headers to know the target paths, and that encoding
|
|
26
|
+
// is not expressible via canonicalKind — declare it instead of matching the
|
|
27
|
+
// raw name downstream.
|
|
28
|
+
{ rawToolName: 'apply_patch', canonicalKind: 'write', writePayloadFormat: 'file-header-patch' },
|
|
25
29
|
]);
|
|
26
30
|
const built = buildToolSemanticRegistry(CODEX_TOOL_SEMANTIC_MAPPINGS);
|
|
27
31
|
if (!built.ok) {
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
import fs from 'node:fs';
|
|
29
29
|
import path from 'node:path';
|
|
30
30
|
import { computeFeatureFlagsFromConfig, createRuntimeStateHandle, createPainSignalBridge, isRetryWaitBackoffElapsed, pickDiagnosticianCandidate, PrincipleTreeLedgerAdapter, resolveDiagnosticianCapability, } from '@principles/core/runtime';
|
|
31
|
-
import { createWorkspaceBehaviorEvidencePort, createCodexArtificerTrustedFactsPort, loadPdConfigForPlugin, loadFeatureFlagFromConfig, reconcileGovernanceContinuation, runInternalizationConsumerCycle, runStage2CorrectionCycle, createSignalClassifierForWorkspace, saveHostToolDeclaration, } from '@principles/host-runtime';
|
|
31
|
+
import { createWorkspaceBehaviorEvidencePort, createCodexArtificerTrustedFactsPort, loadPdConfigForPlugin, loadFeatureFlagFromConfig, reconcileGovernanceContinuation, runInternalizationConsumerCycle, runStage2CorrectionCycle, createSignalClassifierForWorkspace, saveHostToolDeclaration, HOST_TOOL_DECLARATION_VERSION, } from '@principles/host-runtime';
|
|
32
32
|
import { catchUpCodexIngestion } from '../ingestion/catch-up.js';
|
|
33
33
|
import { CODEX_TOOL_SEMANTIC_MAPPINGS, CODEX_TOOL_SEMANTICS } from '../tool-semantics.js';
|
|
34
34
|
const WORKER_OWNER = 'companion-worker';
|
|
@@ -179,6 +179,8 @@ export async function runCodexWorkspaceWorkerCycle(options) {
|
|
|
179
179
|
// Step 3 — Slice B idempotent reconciliation (always runs; creates no LLM work).
|
|
180
180
|
const reconcile = await reconcileGovernanceContinuation({
|
|
181
181
|
workspaceDir,
|
|
182
|
+
codexConversationIngestionEnabled: flags.codex_conversation_ingestion?.enabled === true,
|
|
183
|
+
// Legacy alias for an older installed host-runtime (P2 review).
|
|
182
184
|
conversationIngestionEnabled: flags.codex_conversation_ingestion?.enabled === true,
|
|
183
185
|
});
|
|
184
186
|
// Steps 4–6 — execution authority: internalization_auto_consumer.
|
|
@@ -355,7 +357,7 @@ export async function runCodexWorkspaceWorkerCycle(options) {
|
|
|
355
357
|
// for host-neutral consumers) and thread the registry into the cycle so
|
|
356
358
|
// activation-gate replay resolves Codex tool semantics (Bash, not bash).
|
|
357
359
|
const declared = saveHostToolDeclaration(workspaceDir, {
|
|
358
|
-
version:
|
|
360
|
+
version: HOST_TOOL_DECLARATION_VERSION,
|
|
359
361
|
hostKind: 'codex',
|
|
360
362
|
mappings: CODEX_TOOL_SEMANTIC_MAPPINGS,
|
|
361
363
|
declaredAt: new Date().toISOString(),
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@principles/codex-adapter",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.9.0",
|
|
4
4
|
"description": "Codex CLI host adapter for Principles Disciple — implements HostAdapter interface for OpenAI Codex CLI's stdin/stdout JSON hook model (ADR-0020).",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
import { clsx } from "clsx";
|
|
2
|
-
import {
|
|
2
|
+
import { extendTailwindMerge } from "tailwind-merge";
|
|
3
|
+
/**
|
|
4
|
+
* The §3.1 type scale is declared as `--text-*` theme tokens, so the generated
|
|
5
|
+
* utilities (`text-body`, `text-caption`, …) are font sizes. tailwind-merge
|
|
6
|
+
* cannot tell a custom token apart from a colour utility (`text-ink`), which
|
|
7
|
+
* makes `cn()` silently drop one of the two. Register the scale explicitly.
|
|
8
|
+
*/
|
|
9
|
+
const twMerge = extendTailwindMerge({
|
|
10
|
+
extend: {
|
|
11
|
+
classGroups: {
|
|
12
|
+
"font-size": [
|
|
13
|
+
{ text: ["display", "title", "subtitle", "body", "reading", "caption", "eyebrow"] },
|
|
14
|
+
],
|
|
15
|
+
},
|
|
16
|
+
},
|
|
17
|
+
});
|
|
3
18
|
export function cn(...inputs) {
|
|
4
19
|
return twMerge(clsx(inputs));
|
|
5
20
|
}
|
|
@@ -16,7 +16,7 @@ import { handleFeedbackReportsRoute, handleFeedbackChannelsRoute, disposeFeedbac
|
|
|
16
16
|
import { handleFailedTasksRoute, disposeFailedTasksModels } from './routes/failed-tasks.js';
|
|
17
17
|
import { handleDiagnosticianRoute } from './routes/diagnostician.js';
|
|
18
18
|
import { handleApprovalsRoute, disposeApprovalsModels } from './routes/approvals.js';
|
|
19
|
-
import { handleHealthRoute, disposeHealthModels } from './routes/health.js';
|
|
19
|
+
import { handleHealthRoute, handleIngestionHealthRoute, disposeHealthModels } from './routes/health.js';
|
|
20
20
|
import { handlePrinciplesRoute, handleCorePrinciplesRoute, disposePrinciplesModels } from './routes/principles.js';
|
|
21
21
|
import { handleLifecycleRoute, disposeLifecycleModels } from './routes/lifecycle.js';
|
|
22
22
|
import { handleExaminerRoute } from './routes/examiner.js';
|
|
@@ -584,7 +584,8 @@ export function handleRequest(services) {
|
|
|
584
584
|
return;
|
|
585
585
|
}
|
|
586
586
|
// PRI-331: GET /api/evidence-chain
|
|
587
|
-
|
|
587
|
+
// P1-2: GET /api/evidence-chain/assistant-turn?id=&session= (verbatim turn)
|
|
588
|
+
if (routePath === '/api/evidence-chain' || routePath === '/api/evidence-chain/assistant-turn') {
|
|
588
589
|
asyncHandler(() => handleEvidenceChainRoute(req, res, services.workspaceDir))(req, res);
|
|
589
590
|
return;
|
|
590
591
|
}
|
|
@@ -613,6 +614,17 @@ export function handleRequest(services) {
|
|
|
613
614
|
}))(req, res);
|
|
614
615
|
return;
|
|
615
616
|
}
|
|
617
|
+
// GET /api/health/ingestion — PRI-1171 ticket ⑦: unified three-host
|
|
618
|
+
// conversation-ingestion health (verbatim CLI passthrough, read-only
|
|
619
|
+
// status, never trajectory browsing). The route budget must COVER the
|
|
620
|
+
// model's 30s CLI subprocess timeout — a 504 from the default timeout
|
|
621
|
+
// would render "unable to determine" while the CLI is still working.
|
|
622
|
+
if (routePath === '/api/health/ingestion') {
|
|
623
|
+
asyncHandler(() => handleIngestionHealthRoute(req, res, {
|
|
624
|
+
workspaceDir: services.workspaceDir,
|
|
625
|
+
}), 45_000)(req, res);
|
|
626
|
+
return;
|
|
627
|
+
}
|
|
616
628
|
// 404 fallback for API routes
|
|
617
629
|
sendNotFound(res, `Route ${routePath} not found`);
|
|
618
630
|
return;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { SqliteConnection, SqliteActivationStateStore, SqlitePIArtifactStore, extractPrincipleId, extractEvidenceRefs, PromotionReadinessReader, RuleHostWriter, createProductionGateDeps, SqliteActivationSafetyStore, isFeatureEnabled, RuleCodeOwnerDecisionService, collectOpenClawPromotionChecks, summarizeRuleCodeShadowEvents, buildPromotionEvidenceSnapshot, createRuntimeStateHandle, PrincipleTreeLedgerAdapter, previewApprovedRuleRevision, reviseApprovedRuleOnce, } from '@principles/core/runtime';
|
|
2
|
+
import { resolveStateDbPath } from '@principles/core/runtime/storage-paths';
|
|
2
3
|
import { resolvePromotionHostLiveness, resolveWorkspaceHostToolSemantics, readPromptActivationInjectionStatuses, operatorDeclaredBudgetResolution, runtimeBudgetObservationToResolution, selectConsoleRuntimeBudgetFacts, productionRouteRotationState, RUNTIME_BUDGET_OBSERVATION_STALE_REASON, RUNTIME_EVENT_LOG_CANDIDATE_DIRS, collectRuleCodeEventEntries } from '@principles/host-runtime';
|
|
3
4
|
import { PROMPT_BUDGET_HOST_KINDS } from '@principles/core/runtime';
|
|
4
5
|
import { loadPdConfig, computeFlagsFromLoadResult } from '../config/pd-config-store.js';
|
|
@@ -155,7 +156,7 @@ export class ActivationsConsoleModel {
|
|
|
155
156
|
}
|
|
156
157
|
}
|
|
157
158
|
async getActivations(targetHost) {
|
|
158
|
-
const stateDbPath =
|
|
159
|
+
const stateDbPath = resolveStateDbPath(this.workspaceDir);
|
|
159
160
|
if (!fs.existsSync(stateDbPath)) {
|
|
160
161
|
return { activations: [], status: 'degraded', reason: 'state.db not found — workspace may not be initialized', nextAction: 'Run pd runtime diagnostics to check workspace state' };
|
|
161
162
|
}
|
|
@@ -809,7 +810,7 @@ export class ActivationsConsoleModel {
|
|
|
809
810
|
throw new Error('feature_not_enabled: enable rulecode_owner_live_decision only after the rollout gate passes');
|
|
810
811
|
}
|
|
811
812
|
async deactivateActivation(activationId) {
|
|
812
|
-
const stateDbPath =
|
|
813
|
+
const stateDbPath = resolveStateDbPath(this.workspaceDir);
|
|
813
814
|
if (!fs.existsSync(stateDbPath)) {
|
|
814
815
|
return { ok: false, reason: 'state.db not found — workspace may not be initialized', nextAction: 'Ensure the workspace has been initialized with PD before disabling activations.' };
|
|
815
816
|
}
|
|
@@ -3,6 +3,7 @@ import { approvalReviewMaterial } from './approval-review-material.js';
|
|
|
3
3
|
import * as fs from 'node:fs';
|
|
4
4
|
import * as path from 'node:path';
|
|
5
5
|
import { SqliteConnection, SqliteApprovalQueueStore, SqliteActivationStateStore, SqlitePIArtifactStore, ActivationDispatcher, PromptWriter, DeferArchiveWriter, RuleHostWriter, createProductionGateDeps, ApprovalCompletionService, ApprovalQueue, mapConfidenceToLabel, isArtifactRevisionOf, detectPromptReplacementTarget, detectRuleReplacementTarget, buildOwnerRevisionArtifact, PrincipleTreeLedgerAdapter, MVP_CHANNELS, computeArtifactDigest, } from '@principles/core/runtime';
|
|
6
|
+
import { resolveStateDbPath } from '@principles/core/runtime/storage-paths';
|
|
6
7
|
import { resolveLedgerPrincipleId } from './principle-id-resolution.js';
|
|
7
8
|
import { createArtifactPrincipleResolutionDeps } from './artifact-principle-resolver.js';
|
|
8
9
|
import { loadPdConfig, computeFlagsFromLoadResult } from '../config/pd-config-store.js';
|
|
@@ -49,7 +50,7 @@ function describeBudgetBasis(hostKind, facts, declared) {
|
|
|
49
50
|
return `budget basis=fixed_fallback (no runtime budget observation for ${hostKind})`;
|
|
50
51
|
}
|
|
51
52
|
function stateDbExists(workspaceDir) {
|
|
52
|
-
return fs.existsSync(
|
|
53
|
+
return fs.existsSync(resolveStateDbPath(workspaceDir));
|
|
53
54
|
}
|
|
54
55
|
export class ApprovalsConsoleModel {
|
|
55
56
|
workspaceDir;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { SqliteConnection, SqliteApprovalQueueStore, SqlitePIArtifactStore, ApprovalQueue, RUNTIME_PRINCIPLE_BUDGET, detectPromptReplacementTarget, computeArtifactDigest, SqliteActivationStateStore, } from '@principles/core/runtime';
|
|
2
|
+
import { resolveStateDbPath } from '@principles/core/runtime/storage-paths';
|
|
2
3
|
import { checkPromptArtifactDeliverability, hostRotationCapability, operatorDeclaredBudgetResolution, resolveLivePromptInjectionProjection, RUNTIME_BUDGET_OBSERVATION_STALE_REASON, runtimeBudgetObservationToResolution, selectConsoleRuntimeBudgetFacts, } from '@principles/host-runtime';
|
|
3
4
|
import { PROMPT_BUDGET_HOST_KINDS } from '@principles/core/runtime';
|
|
4
5
|
import { loadLedger } from '@principles/core/principle-tree-ledger';
|
|
@@ -167,7 +168,7 @@ export class ApprovalsGroupedConsoleModel {
|
|
|
167
168
|
this.workspaceDir = workspaceDir;
|
|
168
169
|
}
|
|
169
170
|
async getApprovalsGrouped(targetHost) {
|
|
170
|
-
const stateDbPath =
|
|
171
|
+
const stateDbPath = resolveStateDbPath(this.workspaceDir);
|
|
171
172
|
if (!fs.existsSync(stateDbPath)) {
|
|
172
173
|
return { groups: [], generatedAt: new Date().toISOString(), note: 'state.db not found — workspace may not be initialized' };
|
|
173
174
|
}
|
|
@@ -15,6 +15,11 @@
|
|
|
15
15
|
* - All summaries go through sanitizeString from evidence-sanitizer
|
|
16
16
|
* - Degraded paths include structured reason + nextAction (ERR-002)
|
|
17
17
|
*
|
|
18
|
+
* P1-2 exception: `getAssistantTurn()` returns ONE referenced assistant turn
|
|
19
|
+
* verbatim, on purpose — the Owner must be able to compare the recorded
|
|
20
|
+
* correction against exactly what the agent said. It is bounded to the turn id
|
|
21
|
+
* recorded in correction evidence and pinned to that turn's session.
|
|
22
|
+
*
|
|
18
23
|
* ERR checklist:
|
|
19
24
|
* - ERR-001/005: All DB rows treated as unknown, runtime validation with typeof guards
|
|
20
25
|
* - ERR-002: Degraded paths include reason + nextAction, never silent fallback
|
|
@@ -24,9 +29,50 @@
|
|
|
24
29
|
*/
|
|
25
30
|
import type { EvidenceChainState, EvidenceChainRecord, EvidenceChainResponse } from '@principles/core/runtime';
|
|
26
31
|
export type { EvidenceChainState, EvidenceChainRecord, EvidenceChainResponse, };
|
|
32
|
+
/**
|
|
33
|
+
* P1-2: verbatim assistant output referenced by a correction record.
|
|
34
|
+
*
|
|
35
|
+
* This is the ONE place raw assistant text is returned to the Owner. It is not
|
|
36
|
+
* sanitized on purpose: the Owner must be able to compare the correction text
|
|
37
|
+
* with exactly what the agent said. Access is by turn id, optionally pinned to
|
|
38
|
+
* the session id recorded in the correction evidence, so a record can never
|
|
39
|
+
* pull an unrelated conversation.
|
|
40
|
+
*/
|
|
41
|
+
export interface AssistantTurnLookup {
|
|
42
|
+
ok: true;
|
|
43
|
+
turn: {
|
|
44
|
+
id: number;
|
|
45
|
+
sessionId: string;
|
|
46
|
+
/** Verbatim assistant output (newlines, spaces and markdown preserved). */
|
|
47
|
+
text: string;
|
|
48
|
+
/**
|
|
49
|
+
* `raw` when the original text was persisted inline or in the overflow
|
|
50
|
+
* blob; `sanitized` when only the redacted copy survives (retention or
|
|
51
|
+
* write-path policy). The UI must label which one the Owner is reading.
|
|
52
|
+
*/
|
|
53
|
+
textSource: 'raw' | 'sanitized';
|
|
54
|
+
createdAt: string;
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
export interface AssistantTurnLookupFailure {
|
|
58
|
+
ok: false;
|
|
59
|
+
reason: string;
|
|
60
|
+
nextAction: string;
|
|
61
|
+
}
|
|
27
62
|
export declare class EvidenceChainConsoleModel {
|
|
28
63
|
private readonly workspaceDir;
|
|
29
64
|
constructor(workspaceDir: string);
|
|
30
65
|
getEvidenceChain(): Promise<EvidenceChainResponse>;
|
|
66
|
+
/**
|
|
67
|
+
* P1-2: read the raw assistant turn referenced by correction evidence.
|
|
68
|
+
* Verbatim by contract — no sanitization, no markdown rendering.
|
|
69
|
+
*
|
|
70
|
+
* Uses the registered trajectory-store seam (`openTrajectoryDbReadonly`) so
|
|
71
|
+
* the read-only + path-contract rules have a single owner. The overflow blob
|
|
72
|
+
* directory is derived from the trajectory database location, never
|
|
73
|
+
* hardcoded, and a blob reference is confined to that directory before it is
|
|
74
|
+
* read.
|
|
75
|
+
*/
|
|
76
|
+
getAssistantTurn(turnId: number, expectedSessionId?: string): Promise<AssistantTurnLookup | AssistantTurnLookupFailure>;
|
|
31
77
|
dispose(): void;
|
|
32
78
|
}
|