create-principles-disciple 1.152.2 → 1.152.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/_release/product-identity.json +1 -1
- package/codex-adapter/dist/pd-hook.js +34 -4
- package/codex-adapter/package.json +1 -1
- package/console/dist/server/config/pd-config-store.d.ts +48 -0
- package/console/dist/server/config/pd-config-store.js +273 -93
- package/console/dist/server/index.js +16 -1
- package/console/dist/server/models/ActivationsConsoleModel.d.ts +72 -1
- package/console/dist/server/models/ActivationsConsoleModel.js +92 -14
- package/console/dist/server/models/AdaptiveActivationConsoleModel.d.ts +79 -0
- package/console/dist/server/models/AdaptiveActivationConsoleModel.js +151 -0
- package/console/dist/server/models/ApprovalsConsoleModel.d.ts +28 -0
- package/console/dist/server/models/ApprovalsConsoleModel.js +118 -3
- package/console/dist/server/models/ApprovalsGroupedConsoleModel.d.ts +38 -0
- package/console/dist/server/models/ApprovalsGroupedConsoleModel.js +158 -26
- package/console/dist/server/models/IntentDecisionModel.d.ts +6 -1
- package/console/dist/server/models/IntentDecisionModel.js +17 -9
- package/console/dist/server/models/pipeline-health-metrics.d.ts +128 -0
- package/console/dist/server/models/pipeline-health-metrics.js +225 -0
- package/console/dist/server/routes/approvals.js +14 -0
- package/console/dist/server/routes/config.js +212 -1
- package/console/dist/server/routes/diagnostician.js +13 -2
- package/console/dist/server/routes/intent-decisions.js +19 -1
- package/console/dist/server/routes/pipeline-health.d.ts +9 -0
- package/console/dist/server/routes/pipeline-health.js +124 -0
- package/console/dist/web/assets/app.css +484 -67
- package/console/dist/web/assets/app.js +36 -31
- package/console/dist/web/assets/evidence-art-1.webp +0 -0
- package/console/dist/web/assets/evidence-art-2.webp +0 -0
- package/console/dist/web/assets/evidence-art-3.webp +0 -0
- package/console/dist/web/assets/evidence-art-4.webp +0 -0
- package/console/dist/web/assets/principle-grove.jpg +0 -0
- package/console/dist/web/assets/principle-stone-steps.jpg +0 -0
- package/console/dist/web/assets/principles-art-1.webp +0 -0
- package/console/dist/web/assets/principles-art-2.webp +0 -0
- package/console/dist/web/assets/principles-art-3.webp +0 -0
- package/console/dist/web/assets/principles-art-4.webp +0 -0
- package/console/dist/web/assets/today-art-1.webp +0 -0
- package/console/dist/web/assets/today-art-2.webp +0 -0
- package/console/dist/web/assets/today-art-3.webp +0 -0
- package/console/dist/web/assets/today-art-4.webp +0 -0
- package/core/dist/runtime/activation/activation-types.d.ts +6 -0
- package/core/dist/runtime/activation/activation-types.d.ts.map +1 -1
- package/core/dist/runtime/activation/activation-types.js.map +1 -1
- package/core/dist/runtime/activation/index.d.ts +2 -1
- package/core/dist/runtime/activation/index.d.ts.map +1 -1
- package/core/dist/runtime/activation/index.js +1 -1
- package/core/dist/runtime/activation/index.js.map +1 -1
- package/core/dist/runtime/activation/ledger-identity.d.ts +8 -0
- package/core/dist/runtime/activation/ledger-identity.d.ts.map +1 -1
- package/core/dist/runtime/activation/ledger-identity.js +20 -1
- package/core/dist/runtime/activation/ledger-identity.js.map +1 -1
- package/core/dist/runtime/activation/sqlite-approval-store.d.ts +18 -0
- package/core/dist/runtime/activation/sqlite-approval-store.d.ts.map +1 -1
- package/core/dist/runtime/activation/sqlite-approval-store.js +146 -20
- package/core/dist/runtime/activation/sqlite-approval-store.js.map +1 -1
- package/core/dist/runtime/adapter/artificer-l2-adapter.d.ts.map +1 -1
- package/core/dist/runtime/adapter/artificer-l2-adapter.js +11 -4
- package/core/dist/runtime/adapter/artificer-l2-adapter.js.map +1 -1
- package/core/dist/runtime/adapter/l2-agent-loop-adapter.d.ts.map +1 -1
- package/core/dist/runtime/adapter/l2-agent-loop-adapter.js +11 -4
- package/core/dist/runtime/adapter/l2-agent-loop-adapter.js.map +1 -1
- package/core/dist/runtime/adapter/output-repair-contract.d.ts +21 -1
- package/core/dist/runtime/adapter/output-repair-contract.d.ts.map +1 -1
- package/core/dist/runtime/adapter/output-repair-contract.js.map +1 -1
- package/core/dist/runtime/adapter/pi-ai-catalog.d.ts +42 -0
- package/core/dist/runtime/adapter/pi-ai-catalog.d.ts.map +1 -1
- package/core/dist/runtime/adapter/pi-ai-catalog.js +68 -0
- package/core/dist/runtime/adapter/pi-ai-catalog.js.map +1 -1
- package/core/dist/runtime/adapter/pi-ai-connection-probe.d.ts +45 -0
- package/core/dist/runtime/adapter/pi-ai-connection-probe.d.ts.map +1 -0
- package/core/dist/runtime/adapter/pi-ai-connection-probe.js +321 -0
- package/core/dist/runtime/adapter/pi-ai-connection-probe.js.map +1 -0
- package/core/dist/runtime/adapter/pi-ai-runtime-adapter.d.ts +27 -2
- package/core/dist/runtime/adapter/pi-ai-runtime-adapter.d.ts.map +1 -1
- package/core/dist/runtime/adapter/pi-ai-runtime-adapter.js +71 -10
- package/core/dist/runtime/adapter/pi-ai-runtime-adapter.js.map +1 -1
- package/core/dist/runtime/adapter/schema-prompt-adapter.d.ts.map +1 -1
- package/core/dist/runtime/adapter/schema-prompt-adapter.js +39 -6
- package/core/dist/runtime/adapter/schema-prompt-adapter.js.map +1 -1
- package/core/dist/runtime/adapter/structured-output-repair.d.ts +26 -0
- package/core/dist/runtime/adapter/structured-output-repair.d.ts.map +1 -1
- package/core/dist/runtime/adapter/structured-output-repair.js +140 -2
- package/core/dist/runtime/adapter/structured-output-repair.js.map +1 -1
- package/core/dist/runtime/config/execution-timing.d.ts +56 -0
- package/core/dist/runtime/config/execution-timing.d.ts.map +1 -0
- package/core/dist/runtime/config/execution-timing.js +76 -0
- package/core/dist/runtime/config/execution-timing.js.map +1 -0
- package/core/dist/runtime/config/index.d.ts +4 -0
- package/core/dist/runtime/config/index.d.ts.map +1 -1
- package/core/dist/runtime/config/index.js +2 -0
- package/core/dist/runtime/config/index.js.map +1 -1
- package/core/dist/runtime/config/pd-config-redaction.d.ts.map +1 -1
- package/core/dist/runtime/config/pd-config-redaction.js +4 -0
- package/core/dist/runtime/config/pd-config-redaction.js.map +1 -1
- package/core/dist/runtime/config/pd-config-types.d.ts +5 -0
- package/core/dist/runtime/config/pd-config-types.d.ts.map +1 -1
- package/core/dist/runtime/config/pd-config-types.js.map +1 -1
- package/core/dist/runtime/config/pd-credentials.d.ts +105 -0
- package/core/dist/runtime/config/pd-credentials.d.ts.map +1 -0
- package/core/dist/runtime/config/pd-credentials.js +409 -0
- package/core/dist/runtime/config/pd-credentials.js.map +1 -0
- package/core/dist/runtime/diagnostician/diag-rootcause-output.d.ts +13 -2
- package/core/dist/runtime/diagnostician/diag-rootcause-output.d.ts.map +1 -1
- package/core/dist/runtime/diagnostician/diag-rootcause-output.js.map +1 -1
- package/core/dist/runtime/diagnostician/diagnostic-context-budget.d.ts +45 -0
- package/core/dist/runtime/diagnostician/diagnostic-context-budget.d.ts.map +1 -0
- package/core/dist/runtime/diagnostician/diagnostic-context-budget.js +74 -0
- package/core/dist/runtime/diagnostician/diagnostic-context-budget.js.map +1 -0
- package/core/dist/runtime/diagnostician/prompt-projection.d.ts +51 -0
- package/core/dist/runtime/diagnostician/prompt-projection.d.ts.map +1 -0
- package/core/dist/runtime/diagnostician/prompt-projection.js +192 -0
- package/core/dist/runtime/diagnostician/prompt-projection.js.map +1 -0
- package/core/dist/runtime/diagnostician-output.d.ts +1 -1
- package/core/dist/runtime/diagnostician-output.d.ts.map +1 -1
- package/core/dist/runtime/diagnostician-output.js +2 -2
- package/core/dist/runtime/diagnostician-output.js.map +1 -1
- package/core/dist/runtime/index.d.ts +5 -2
- package/core/dist/runtime/index.d.ts.map +1 -1
- package/core/dist/runtime/index.js +11 -1
- package/core/dist/runtime/index.js.map +1 -1
- package/core/dist/runtime/intent/index.d.ts +2 -0
- package/core/dist/runtime/intent/index.d.ts.map +1 -1
- package/core/dist/runtime/intent/index.js +2 -0
- package/core/dist/runtime/intent/index.js.map +1 -1
- package/core/dist/runtime/intent/intent-decision-record.d.ts +51 -3
- package/core/dist/runtime/intent/intent-decision-record.d.ts.map +1 -1
- package/core/dist/runtime/intent/intent-snapshot.d.ts +104 -0
- package/core/dist/runtime/intent/intent-snapshot.d.ts.map +1 -0
- package/core/dist/runtime/intent/intent-snapshot.js +164 -0
- package/core/dist/runtime/intent/intent-snapshot.js.map +1 -0
- package/core/dist/runtime/intent/strategic-conflict-gate.d.ts +70 -0
- package/core/dist/runtime/intent/strategic-conflict-gate.d.ts.map +1 -0
- package/core/dist/runtime/intent/strategic-conflict-gate.js +148 -0
- package/core/dist/runtime/intent/strategic-conflict-gate.js.map +1 -0
- package/core/dist/runtime/internalization/artificer-runner.js +1 -1
- package/core/dist/runtime/internalization/artificer-runner.js.map +1 -1
- package/core/dist/runtime/internalization/diag-distiller-runner.d.ts +6 -0
- package/core/dist/runtime/internalization/diag-distiller-runner.d.ts.map +1 -1
- package/core/dist/runtime/internalization/diag-distiller-runner.js +62 -5
- package/core/dist/runtime/internalization/diag-distiller-runner.js.map +1 -1
- package/core/dist/runtime/internalization/diag-rootcause-runner.d.ts +41 -1
- package/core/dist/runtime/internalization/diag-rootcause-runner.d.ts.map +1 -1
- package/core/dist/runtime/internalization/diag-rootcause-runner.js +190 -43
- package/core/dist/runtime/internalization/diag-rootcause-runner.js.map +1 -1
- package/core/dist/runtime/internalization/diag-router-runner.d.ts +6 -0
- package/core/dist/runtime/internalization/diag-router-runner.d.ts.map +1 -1
- package/core/dist/runtime/internalization/diag-router-runner.js +114 -69
- package/core/dist/runtime/internalization/diag-router-runner.js.map +1 -1
- package/core/dist/runtime/internalization/dreamer-prompt-builder.d.ts.map +1 -1
- package/core/dist/runtime/internalization/dreamer-prompt-builder.js +3 -0
- package/core/dist/runtime/internalization/dreamer-prompt-builder.js.map +1 -1
- package/core/dist/runtime/internalization/dreamer-runner.js +1 -1
- package/core/dist/runtime/internalization/dreamer-runner.js.map +1 -1
- package/core/dist/runtime/internalization/evaluator-runner.js +4 -4
- package/core/dist/runtime/internalization/evaluator-runner.js.map +1 -1
- package/core/dist/runtime/internalization/formation-context.d.ts +54 -0
- package/core/dist/runtime/internalization/formation-context.d.ts.map +1 -1
- package/core/dist/runtime/internalization/formation-context.js +135 -3
- package/core/dist/runtime/internalization/formation-context.js.map +1 -1
- package/core/dist/runtime/internalization/index.d.ts +2 -2
- package/core/dist/runtime/internalization/index.d.ts.map +1 -1
- package/core/dist/runtime/internalization/index.js +1 -1
- package/core/dist/runtime/internalization/index.js.map +1 -1
- package/core/dist/runtime/internalization/intent-contract.d.ts +107 -0
- package/core/dist/runtime/internalization/intent-contract.d.ts.map +1 -1
- package/core/dist/runtime/internalization/intent-contract.js +315 -4
- package/core/dist/runtime/internalization/intent-contract.js.map +1 -1
- package/core/dist/runtime/internalization/peer-runner-contracts.d.ts +8 -0
- package/core/dist/runtime/internalization/peer-runner-contracts.d.ts.map +1 -1
- package/core/dist/runtime/internalization/peer-runner-contracts.js.map +1 -1
- package/core/dist/runtime/internalization/philosopher-prompt-builder.d.ts +22 -1
- package/core/dist/runtime/internalization/philosopher-prompt-builder.d.ts.map +1 -1
- package/core/dist/runtime/internalization/philosopher-prompt-builder.js +22 -3
- package/core/dist/runtime/internalization/philosopher-prompt-builder.js.map +1 -1
- package/core/dist/runtime/internalization/philosopher-runner.d.ts +15 -0
- package/core/dist/runtime/internalization/philosopher-runner.d.ts.map +1 -1
- package/core/dist/runtime/internalization/philosopher-runner.js +74 -2
- package/core/dist/runtime/internalization/philosopher-runner.js.map +1 -1
- package/core/dist/runtime/internalization/pitask-metadata.d.ts +32 -0
- package/core/dist/runtime/internalization/pitask-metadata.d.ts.map +1 -1
- package/core/dist/runtime/internalization/pitask-metadata.js +44 -0
- package/core/dist/runtime/internalization/pitask-metadata.js.map +1 -1
- package/core/dist/runtime/internalization/rollout-reviewer-runner.d.ts +6 -1
- package/core/dist/runtime/internalization/rollout-reviewer-runner.d.ts.map +1 -1
- package/core/dist/runtime/internalization/rollout-reviewer-runner.js +31 -15
- package/core/dist/runtime/internalization/rollout-reviewer-runner.js.map +1 -1
- package/core/dist/runtime/internalization/scribe-output.d.ts +21 -0
- package/core/dist/runtime/internalization/scribe-output.d.ts.map +1 -1
- package/core/dist/runtime/internalization/scribe-output.js +125 -2
- package/core/dist/runtime/internalization/scribe-output.js.map +1 -1
- package/core/dist/runtime/internalization/scribe-prompt-builder.d.ts +26 -1
- package/core/dist/runtime/internalization/scribe-prompt-builder.d.ts.map +1 -1
- package/core/dist/runtime/internalization/scribe-prompt-builder.js +33 -3
- package/core/dist/runtime/internalization/scribe-prompt-builder.js.map +1 -1
- package/core/dist/runtime/internalization/scribe-runner.d.ts +32 -2
- package/core/dist/runtime/internalization/scribe-runner.d.ts.map +1 -1
- package/core/dist/runtime/internalization/scribe-runner.js +106 -8
- package/core/dist/runtime/internalization/scribe-runner.js.map +1 -1
- package/core/dist/runtime/internalization/split-diagnostician-runner.d.ts +46 -0
- package/core/dist/runtime/internalization/split-diagnostician-runner.d.ts.map +1 -1
- package/core/dist/runtime/internalization/split-diagnostician-runner.js +220 -20
- package/core/dist/runtime/internalization/split-diagnostician-runner.js.map +1 -1
- package/core/dist/runtime/internalization-integrity-remediation.d.ts +7 -0
- package/core/dist/runtime/internalization-integrity-remediation.d.ts.map +1 -1
- package/core/dist/runtime/internalization-integrity-remediation.js +44 -12
- package/core/dist/runtime/internalization-integrity-remediation.js.map +1 -1
- package/core/dist/runtime/pain-signal-runtime-factory.d.ts.map +1 -1
- package/core/dist/runtime/pain-signal-runtime-factory.js +25 -4
- package/core/dist/runtime/pain-signal-runtime-factory.js.map +1 -1
- package/core/dist/runtime/pain-submit-capability.js +5 -5
- package/core/dist/runtime/pain-submit-capability.js.map +1 -1
- package/core/dist/runtime/runner/base-peer-runner.d.ts +90 -2
- package/core/dist/runtime/runner/base-peer-runner.d.ts.map +1 -1
- package/core/dist/runtime/runner/base-peer-runner.js +463 -170
- package/core/dist/runtime/runner/base-peer-runner.js.map +1 -1
- package/core/dist/runtime/runner/peer-runner-types.d.ts +19 -0
- package/core/dist/runtime/runner/peer-runner-types.d.ts.map +1 -1
- package/core/dist/runtime/runtime-protocol.d.ts +19 -0
- package/core/dist/runtime/runtime-protocol.d.ts.map +1 -1
- package/core/dist/runtime/signal-collector/llm-stage.d.ts +5 -0
- package/core/dist/runtime/signal-collector/llm-stage.d.ts.map +1 -1
- package/core/dist/runtime/signal-collector/llm-stage.js.map +1 -1
- package/core/dist/runtime/store/artifact/sqlite-pi-artifact-store.d.ts +14 -0
- package/core/dist/runtime/store/artifact/sqlite-pi-artifact-store.d.ts.map +1 -1
- package/core/dist/runtime/store/artifact/sqlite-pi-artifact-store.js +16 -1
- package/core/dist/runtime/store/artifact/sqlite-pi-artifact-store.js.map +1 -1
- package/core/dist/runtime/store/commit/diagnostician-committer.d.ts +19 -0
- package/core/dist/runtime/store/commit/diagnostician-committer.d.ts.map +1 -1
- package/core/dist/runtime/store/commit/diagnostician-committer.js +11 -0
- package/core/dist/runtime/store/commit/diagnostician-committer.js.map +1 -1
- package/core/dist/runtime/store/intent/sqlite-intent-decision-store.d.ts +2 -2
- package/core/dist/runtime/store/intent/sqlite-intent-decision-store.d.ts.map +1 -1
- package/core/dist/runtime/store/intent/sqlite-intent-decision-store.js +285 -35
- package/core/dist/runtime/store/intent/sqlite-intent-decision-store.js.map +1 -1
- package/core/dist/runtime/store/lifecycle/fenced-task-writer.d.ts +64 -0
- package/core/dist/runtime/store/lifecycle/fenced-task-writer.d.ts.map +1 -0
- package/core/dist/runtime/store/lifecycle/fenced-task-writer.js +231 -0
- package/core/dist/runtime/store/lifecycle/fenced-task-writer.js.map +1 -0
- package/core/dist/runtime/store/lifecycle/index.d.ts +2 -0
- package/core/dist/runtime/store/lifecycle/index.d.ts.map +1 -1
- package/core/dist/runtime/store/lifecycle/index.js +1 -0
- package/core/dist/runtime/store/lifecycle/index.js.map +1 -1
- package/core/dist/runtime/store/lifecycle/lease-fence.d.ts +80 -0
- package/core/dist/runtime/store/lifecycle/lease-fence.d.ts.map +1 -0
- package/core/dist/runtime/store/lifecycle/lease-fence.js +79 -0
- package/core/dist/runtime/store/lifecycle/lease-fence.js.map +1 -0
- package/core/dist/runtime/store/lifecycle/lease-heartbeat.d.ts +118 -0
- package/core/dist/runtime/store/lifecycle/lease-heartbeat.d.ts.map +1 -0
- package/core/dist/runtime/store/lifecycle/lease-heartbeat.js +187 -0
- package/core/dist/runtime/store/lifecycle/lease-heartbeat.js.map +1 -0
- package/core/dist/runtime/store/lifecycle/lease-manager.d.ts +30 -20
- package/core/dist/runtime/store/lifecycle/lease-manager.d.ts.map +1 -1
- package/core/dist/runtime/store/lifecycle/lease-manager.js +94 -53
- package/core/dist/runtime/store/lifecycle/lease-manager.js.map +1 -1
- package/core/dist/runtime/store/lifecycle/recovery-sweep.d.ts.map +1 -1
- package/core/dist/runtime/store/lifecycle/recovery-sweep.js +32 -15
- package/core/dist/runtime/store/lifecycle/recovery-sweep.js.map +1 -1
- package/core/dist/runtime/store/run/sqlite-run-store.d.ts +29 -0
- package/core/dist/runtime/store/run/sqlite-run-store.d.ts.map +1 -1
- package/core/dist/runtime/store/run/sqlite-run-store.js +40 -0
- package/core/dist/runtime/store/run/sqlite-run-store.js.map +1 -1
- package/core/dist/runtime/store/runtime-state-manager.d.ts +64 -10
- package/core/dist/runtime/store/runtime-state-manager.d.ts.map +1 -1
- package/core/dist/runtime/store/runtime-state-manager.js +154 -89
- package/core/dist/runtime/store/runtime-state-manager.js.map +1 -1
- package/core/dist/runtime/store/sqlite-connection.d.ts.map +1 -1
- package/core/dist/runtime/store/sqlite-connection.js +73 -4
- package/core/dist/runtime/store/sqlite-connection.js.map +1 -1
- package/core/dist/runtime/store/task/sqlite-task-store.d.ts.map +1 -1
- package/core/dist/runtime/store/task/sqlite-task-store.js +6 -3
- package/core/dist/runtime/store/task/sqlite-task-store.js.map +1 -1
- package/core/dist/runtime/task-status.d.ts +16 -0
- package/core/dist/runtime/task-status.d.ts.map +1 -1
- package/core/dist/runtime/task-status.js +8 -0
- package/core/dist/runtime/task-status.js.map +1 -1
- package/core/dist/runtime/trajectory-schema.d.ts.map +1 -1
- package/core/dist/runtime/trajectory-schema.js +20 -1
- package/core/dist/runtime/trajectory-schema.js.map +1 -1
- package/core/dist/runtime/types/event-types.d.ts +20 -0
- package/core/dist/runtime/types/event-types.d.ts.map +1 -1
- package/core/dist/runtime/types/event-types.js +7 -0
- package/core/dist/runtime/types/event-types.js.map +1 -1
- package/core/dist/telemetry-event.d.ts +2 -2
- package/core/dist/telemetry-event.d.ts.map +1 -1
- package/core/dist/telemetry-event.js +27 -2
- package/core/dist/telemetry-event.js.map +1 -1
- package/core/dist/trajectory-types.d.ts +33 -0
- package/core/dist/trajectory-types.d.ts.map +1 -1
- package/core/package.json +1 -1
- package/dist/installer.d.ts.map +1 -1
- package/dist/installer.js +12 -5
- package/dist/installer.js.map +1 -1
- package/dist/installers/codex-host-installer.d.ts.map +1 -1
- package/dist/installers/codex-host-installer.js +9 -12
- package/dist/installers/codex-host-installer.js.map +1 -1
- package/host-runtime/dist/adaptive-consumer-schedule.d.ts +103 -0
- package/host-runtime/dist/adaptive-consumer-schedule.js +145 -0
- package/host-runtime/dist/adaptive-priority-provider.d.ts +7 -1
- package/host-runtime/dist/adaptive-priority-provider.js +6 -3
- package/host-runtime/dist/adaptive-selection.d.ts +1 -1
- package/host-runtime/dist/adaptive-selection.js +2 -1
- package/host-runtime/dist/degraded-enforcement-marker.d.ts +35 -0
- package/host-runtime/dist/degraded-enforcement-marker.js +79 -0
- package/host-runtime/dist/index.d.ts +2 -0
- package/host-runtime/dist/index.js +8 -0
- package/host-runtime/dist/internalization-consumer-cycle.d.ts +35 -0
- package/host-runtime/dist/internalization-consumer-cycle.js +51 -17
- package/host-runtime/dist/prompt-activation-deliverability.d.ts +10 -0
- package/host-runtime/dist/prompt-activation-deliverability.js +5 -2
- package/host-runtime/dist/prompt-injection-event-evidence.d.ts +34 -0
- package/host-runtime/dist/prompt-injection-event-evidence.js +96 -0
- package/host-runtime/dist/signal-classifier.js +4 -4
- package/host-runtime/package.json +1 -1
- package/install-layout/dist/mcp-binding-contract.js +4 -15
- package/install-layout/package.json +1 -1
- package/package.json +3 -3
- package/pd-cli/dist/commands/health-codex.d.ts.map +1 -1
- package/pd-cli/dist/commands/health-codex.js +26 -1
- package/pd-cli/dist/commands/health-codex.js.map +1 -1
- package/pd-cli/dist/commands/health.d.ts.map +1 -1
- package/pd-cli/dist/commands/health.js +32 -2
- package/pd-cli/dist/commands/health.js.map +1 -1
- package/pd-cli/dist/commands/pain-retry.d.ts.map +1 -1
- package/pd-cli/dist/commands/pain-retry.js +6 -4
- package/pd-cli/dist/commands/pain-retry.js.map +1 -1
- package/pd-cli/dist/commands/runtime-init.d.ts.map +1 -1
- package/pd-cli/dist/commands/runtime-init.js +29 -1
- package/pd-cli/dist/commands/runtime-init.js.map +1 -1
- package/pd-cli/dist/commands/runtime-internalization-run-once.d.ts.map +1 -1
- package/pd-cli/dist/commands/runtime-internalization-run-once.js +9 -14
- package/pd-cli/dist/commands/runtime-internalization-run-once.js.map +1 -1
- package/pd-cli/dist/commands/runtime-internalization-run-rulehost.d.ts.map +1 -1
- package/pd-cli/dist/commands/runtime-internalization-run-rulehost.js +5 -5
- package/pd-cli/dist/commands/runtime-internalization-run-rulehost.js.map +1 -1
- package/pd-cli/dist/commands/runtime-usage.d.ts +62 -0
- package/pd-cli/dist/commands/runtime-usage.d.ts.map +1 -0
- package/pd-cli/dist/commands/runtime-usage.js +315 -0
- package/pd-cli/dist/commands/runtime-usage.js.map +1 -0
- package/pd-cli/dist/commands/runtime.js +6 -6
- package/pd-cli/dist/commands/runtime.js.map +1 -1
- package/pd-cli/dist/index.d.ts.map +1 -1
- package/pd-cli/dist/index.js +51 -17
- package/pd-cli/dist/index.js.map +1 -1
- package/pd-cli/dist/program.d.ts.map +1 -1
- package/pd-cli/dist/program.js +4 -0
- package/pd-cli/dist/program.js.map +1 -1
- package/pd-cli/dist/services/cli-invocation-log.d.ts +66 -0
- package/pd-cli/dist/services/cli-invocation-log.d.ts.map +1 -0
- package/pd-cli/dist/services/cli-invocation-log.js +139 -0
- package/pd-cli/dist/services/cli-invocation-log.js.map +1 -0
- package/pd-cli/dist/services/config-doctor.d.ts.map +1 -1
- package/pd-cli/dist/services/config-doctor.js +5 -4
- package/pd-cli/dist/services/config-doctor.js.map +1 -1
- package/pd-cli/dist/services/demo-story-a-runner.d.ts.map +1 -1
- package/pd-cli/dist/services/demo-story-a-runner.js +6 -2
- package/pd-cli/dist/services/demo-story-a-runner.js.map +1 -1
- package/pd-cli/dist/services/pd-config-loader.d.ts +3 -1
- package/pd-cli/dist/services/pd-config-loader.d.ts.map +1 -1
- package/pd-cli/dist/services/pd-config-loader.js +20 -8
- package/pd-cli/dist/services/pd-config-loader.js.map +1 -1
- package/pd-cli/dist/services/runtime-adapter-resolver.d.ts.map +1 -1
- package/pd-cli/dist/services/runtime-adapter-resolver.js +5 -5
- package/pd-cli/dist/services/runtime-adapter-resolver.js.map +1 -1
- package/pd-cli/package.json +1 -1
- package/plugin/dist/bundle.js +632 -536
- package/plugin/dist/core/signal-collector-host.d.ts +5 -0
- package/plugin/dist/governance-audit.js +2 -2
- package/plugin/dist/openclaw.plugin.json +1 -1
- package/plugin/dist/rulehost-evidence.js +13 -10
- package/plugin/dist/service/internalization-auto-consumer-service.d.ts +2 -1
- package/plugin/dist/templates/langs/en/skills/pd-pain-signal/SKILL.md +1 -1
- package/plugin/dist/templates/langs/zh/skills/pd-pain-signal/SKILL.md +1 -1
- package/plugin/openclaw.plugin.json +1 -1
- package/plugin/package.json +1 -1
- package/plugin/templates/langs/en/skills/pd-pain-signal/SKILL.md +1 -1
- package/plugin/templates/langs/zh/skills/pd-pain-signal/SKILL.md +1 -1
- package/release-manager/dist/installer.js +12 -5
- package/release-manager/dist/installers/codex-host-installer.js +9 -12
- package/release-manager/package.json +1 -1
- package/workbuddy-adapter/package.json +1 -1
- package/workbuddy-adapter/plugin/skills/pd-pain-signal/SKILL.md +1 -1
- package/dist/installers/mcp-binding-shape-mirror.d.ts +0 -27
- package/dist/installers/mcp-binding-shape-mirror.d.ts.map +0 -1
- package/dist/installers/mcp-binding-shape-mirror.js +0 -105
- package/dist/installers/mcp-binding-shape-mirror.js.map +0 -1
- package/release-manager/dist/installers/mcp-binding-shape-mirror.js +0 -105
|
@@ -1,105 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* PINNED MIRROR of `@principles/install-layout`'s `validateMcpBinding`.
|
|
3
|
-
*
|
|
4
|
-
* Why a mirror instead of a runtime import: the packaged installer dist is
|
|
5
|
-
* installed from the npm registry, so it must keep loading against the
|
|
6
|
-
* PUBLISHED @principles/install-layout (registry-parity smoke, PRI-669/RF-02).
|
|
7
|
-
* A normal PR may not raise the dependency floor (release-intent guard
|
|
8
|
-
* N-version), so a brand-new export cannot be imported here at runtime — the
|
|
9
|
-
* published package does not carry it yet.
|
|
10
|
-
*
|
|
11
|
-
* This is NOT a second declaration and NOT a looser gate. The declaration
|
|
12
|
-
* lives in `@principles/install-layout` (`mcp-binding-contract.ts`); this file
|
|
13
|
-
* mirrors it verbatim, and `mcp-binding-shape-mirror-parity.test.ts` pins the
|
|
14
|
-
* two to identical verdicts (ok + reason) over
|
|
15
|
-
* `MCP_BINDING_HOSTS × MCP_BINDING_FIXTURES`. A new reason code, a reordered
|
|
16
|
-
* check or a relaxed comparison on either side turns that test red.
|
|
17
|
-
*
|
|
18
|
-
* SAME-SOURCE POINTER — the authoritative declaration is
|
|
19
|
-
* packages/install-layout/src/mcp-binding-contract.ts
|
|
20
|
-
* The two files MUST change together, in the same commit. Retiring this mirror
|
|
21
|
-
* (restoring the single implementation) is tracked by PRI-1191 and is blocked
|
|
22
|
-
* until the export is published to the registry AND the installer's
|
|
23
|
-
* install-layout dependency floor reaches that version.
|
|
24
|
-
*
|
|
25
|
-
* Same discipline as the WorkBuddy plugin-state mirror (2026-11-08).
|
|
26
|
-
*/
|
|
27
|
-
import * as path from 'node:path';
|
|
28
|
-
const MCP_BINDING_SCHEMA_VERSION = 'pd.mcp-binding.v1';
|
|
29
|
-
const MCP_BINDING_HOSTS = ['codex', 'openclaw', 'workbuddy'];
|
|
30
|
-
const MCP_BINDING_SERVER_ENTRY_SEGMENTS = {
|
|
31
|
-
codex: ['node_modules', '@principles', 'pd-mcp-server', 'dist', 'index.js'],
|
|
32
|
-
openclaw: ['pd-mcp-server', 'dist', 'index.js'],
|
|
33
|
-
workbuddy: ['pd-mcp-server', 'dist', 'index.js'],
|
|
34
|
-
};
|
|
35
|
-
function getCanonicalMcpServerEntry(host, runtimeDir) {
|
|
36
|
-
return path.join(runtimeDir, ...MCP_BINDING_SERVER_ENTRY_SEGMENTS[host]);
|
|
37
|
-
}
|
|
38
|
-
const SEMVER = /^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-[0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*)?(?:\+[0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*)?$/;
|
|
39
|
-
function isRecord(value) {
|
|
40
|
-
return typeof value === 'object' && value !== null && !Array.isArray(value);
|
|
41
|
-
}
|
|
42
|
-
function isAbsolutePath(value) {
|
|
43
|
-
return typeof value === 'string' && path.isAbsolute(value);
|
|
44
|
-
}
|
|
45
|
-
function isMcpBindingHost(value) {
|
|
46
|
-
return typeof value === 'string' && MCP_BINDING_HOSTS.includes(value);
|
|
47
|
-
}
|
|
48
|
-
function isSemverVersion(value) {
|
|
49
|
-
return typeof value === 'string' && SEMVER.test(value);
|
|
50
|
-
}
|
|
51
|
-
/** Mirrors the shared `isSameMcpBindingPath` — see the SAME-SOURCE POINTER above. */
|
|
52
|
-
export function isSameMcpBindingPath(left, right, platform) {
|
|
53
|
-
const a = path.resolve(left);
|
|
54
|
-
const b = path.resolve(right);
|
|
55
|
-
return platform === 'win32' ? a.toLowerCase() === b.toLowerCase() : a === b;
|
|
56
|
-
}
|
|
57
|
-
function reject(reason) {
|
|
58
|
-
return { ok: false, reason };
|
|
59
|
-
}
|
|
60
|
-
/**
|
|
61
|
-
* Validate the binding SHAPE (and the canonical-entry rule) exactly as the
|
|
62
|
-
* launcher and `validateMcpBinding` do. Filesystem facts stay outside.
|
|
63
|
-
*/
|
|
64
|
-
export function validateMcpBindingShape(raw, expectedHost, platform) {
|
|
65
|
-
if (!isRecord(raw))
|
|
66
|
-
return reject('binding_invalid');
|
|
67
|
-
if (raw.schemaVersion !== MCP_BINDING_SCHEMA_VERSION) {
|
|
68
|
-
// rc-8: untrusted value reaches host logs; keep the launcher's exact shape.
|
|
69
|
-
const schemaKind = typeof raw.schemaVersion === 'string'
|
|
70
|
-
? raw.schemaVersion.replace(/[^A-Za-z0-9._-]/g, '').slice(0, 60)
|
|
71
|
-
: 'non-string';
|
|
72
|
-
return reject(`binding_schema_unsupported:${schemaKind}`);
|
|
73
|
-
}
|
|
74
|
-
if (!isMcpBindingHost(raw.host))
|
|
75
|
-
return reject('binding_host_invalid');
|
|
76
|
-
if (raw.host !== expectedHost)
|
|
77
|
-
return reject(`binding_host_mismatch:${raw.host}!=${expectedHost}`);
|
|
78
|
-
if (!isAbsolutePath(raw.workspaceDir))
|
|
79
|
-
return reject('binding_workspace_invalid');
|
|
80
|
-
if (!isAbsolutePath(raw.runtimeDir))
|
|
81
|
-
return reject('binding_runtime_dir_invalid');
|
|
82
|
-
if (!isAbsolutePath(raw.serverEntry))
|
|
83
|
-
return reject('binding_server_entry_invalid');
|
|
84
|
-
const { versions } = raw;
|
|
85
|
-
if (!isRecord(versions) || !isSemverVersion(versions.mcpServer))
|
|
86
|
-
return reject('binding_versions_invalid');
|
|
87
|
-
const canonicalEntry = getCanonicalMcpServerEntry(expectedHost, raw.runtimeDir);
|
|
88
|
-
if (!isSameMcpBindingPath(raw.serverEntry, canonicalEntry, platform)) {
|
|
89
|
-
return reject(`server_entry_not_canonical:${expectedHost}`);
|
|
90
|
-
}
|
|
91
|
-
const { mcpServer } = versions;
|
|
92
|
-
return {
|
|
93
|
-
ok: true,
|
|
94
|
-
binding: {
|
|
95
|
-
workspaceDir: raw.workspaceDir,
|
|
96
|
-
runtimeDir: raw.runtimeDir,
|
|
97
|
-
serverEntry: raw.serverEntry,
|
|
98
|
-
versions: {
|
|
99
|
-
mcpServer,
|
|
100
|
-
...(typeof versions.core === 'string' ? { core: versions.core } : {}),
|
|
101
|
-
},
|
|
102
|
-
},
|
|
103
|
-
};
|
|
104
|
-
}
|
|
105
|
-
//# sourceMappingURL=mcp-binding-shape-mirror.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"mcp-binding-shape-mirror.js","sourceRoot":"","sources":["../../src/installers/mcp-binding-shape-mirror.ts"],"names":[],"mappings":"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"}
|
|
@@ -1,105 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* PINNED MIRROR of `@principles/install-layout`'s `validateMcpBinding`.
|
|
3
|
-
*
|
|
4
|
-
* Why a mirror instead of a runtime import: the packaged installer dist is
|
|
5
|
-
* installed from the npm registry, so it must keep loading against the
|
|
6
|
-
* PUBLISHED @principles/install-layout (registry-parity smoke, PRI-669/RF-02).
|
|
7
|
-
* A normal PR may not raise the dependency floor (release-intent guard
|
|
8
|
-
* N-version), so a brand-new export cannot be imported here at runtime — the
|
|
9
|
-
* published package does not carry it yet.
|
|
10
|
-
*
|
|
11
|
-
* This is NOT a second declaration and NOT a looser gate. The declaration
|
|
12
|
-
* lives in `@principles/install-layout` (`mcp-binding-contract.ts`); this file
|
|
13
|
-
* mirrors it verbatim, and `mcp-binding-shape-mirror-parity.test.ts` pins the
|
|
14
|
-
* two to identical verdicts (ok + reason) over
|
|
15
|
-
* `MCP_BINDING_HOSTS × MCP_BINDING_FIXTURES`. A new reason code, a reordered
|
|
16
|
-
* check or a relaxed comparison on either side turns that test red.
|
|
17
|
-
*
|
|
18
|
-
* SAME-SOURCE POINTER — the authoritative declaration is
|
|
19
|
-
* packages/install-layout/src/mcp-binding-contract.ts
|
|
20
|
-
* The two files MUST change together, in the same commit. Retiring this mirror
|
|
21
|
-
* (restoring the single implementation) is tracked by PRI-1191 and is blocked
|
|
22
|
-
* until the export is published to the registry AND the installer's
|
|
23
|
-
* install-layout dependency floor reaches that version.
|
|
24
|
-
*
|
|
25
|
-
* Same discipline as the WorkBuddy plugin-state mirror (2026-11-08).
|
|
26
|
-
*/
|
|
27
|
-
import * as path from 'node:path';
|
|
28
|
-
const MCP_BINDING_SCHEMA_VERSION = 'pd.mcp-binding.v1';
|
|
29
|
-
const MCP_BINDING_HOSTS = ['codex', 'openclaw', 'workbuddy'];
|
|
30
|
-
const MCP_BINDING_SERVER_ENTRY_SEGMENTS = {
|
|
31
|
-
codex: ['node_modules', '@principles', 'pd-mcp-server', 'dist', 'index.js'],
|
|
32
|
-
openclaw: ['pd-mcp-server', 'dist', 'index.js'],
|
|
33
|
-
workbuddy: ['pd-mcp-server', 'dist', 'index.js'],
|
|
34
|
-
};
|
|
35
|
-
function getCanonicalMcpServerEntry(host, runtimeDir) {
|
|
36
|
-
return path.join(runtimeDir, ...MCP_BINDING_SERVER_ENTRY_SEGMENTS[host]);
|
|
37
|
-
}
|
|
38
|
-
const SEMVER = /^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-[0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*)?(?:\+[0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*)?$/;
|
|
39
|
-
function isRecord(value) {
|
|
40
|
-
return typeof value === 'object' && value !== null && !Array.isArray(value);
|
|
41
|
-
}
|
|
42
|
-
function isAbsolutePath(value) {
|
|
43
|
-
return typeof value === 'string' && path.isAbsolute(value);
|
|
44
|
-
}
|
|
45
|
-
function isMcpBindingHost(value) {
|
|
46
|
-
return typeof value === 'string' && MCP_BINDING_HOSTS.includes(value);
|
|
47
|
-
}
|
|
48
|
-
function isSemverVersion(value) {
|
|
49
|
-
return typeof value === 'string' && SEMVER.test(value);
|
|
50
|
-
}
|
|
51
|
-
/** Mirrors the shared `isSameMcpBindingPath` — see the SAME-SOURCE POINTER above. */
|
|
52
|
-
export function isSameMcpBindingPath(left, right, platform) {
|
|
53
|
-
const a = path.resolve(left);
|
|
54
|
-
const b = path.resolve(right);
|
|
55
|
-
return platform === 'win32' ? a.toLowerCase() === b.toLowerCase() : a === b;
|
|
56
|
-
}
|
|
57
|
-
function reject(reason) {
|
|
58
|
-
return { ok: false, reason };
|
|
59
|
-
}
|
|
60
|
-
/**
|
|
61
|
-
* Validate the binding SHAPE (and the canonical-entry rule) exactly as the
|
|
62
|
-
* launcher and `validateMcpBinding` do. Filesystem facts stay outside.
|
|
63
|
-
*/
|
|
64
|
-
export function validateMcpBindingShape(raw, expectedHost, platform) {
|
|
65
|
-
if (!isRecord(raw))
|
|
66
|
-
return reject('binding_invalid');
|
|
67
|
-
if (raw.schemaVersion !== MCP_BINDING_SCHEMA_VERSION) {
|
|
68
|
-
// rc-8: untrusted value reaches host logs; keep the launcher's exact shape.
|
|
69
|
-
const schemaKind = typeof raw.schemaVersion === 'string'
|
|
70
|
-
? raw.schemaVersion.replace(/[^A-Za-z0-9._-]/g, '').slice(0, 60)
|
|
71
|
-
: 'non-string';
|
|
72
|
-
return reject(`binding_schema_unsupported:${schemaKind}`);
|
|
73
|
-
}
|
|
74
|
-
if (!isMcpBindingHost(raw.host))
|
|
75
|
-
return reject('binding_host_invalid');
|
|
76
|
-
if (raw.host !== expectedHost)
|
|
77
|
-
return reject(`binding_host_mismatch:${raw.host}!=${expectedHost}`);
|
|
78
|
-
if (!isAbsolutePath(raw.workspaceDir))
|
|
79
|
-
return reject('binding_workspace_invalid');
|
|
80
|
-
if (!isAbsolutePath(raw.runtimeDir))
|
|
81
|
-
return reject('binding_runtime_dir_invalid');
|
|
82
|
-
if (!isAbsolutePath(raw.serverEntry))
|
|
83
|
-
return reject('binding_server_entry_invalid');
|
|
84
|
-
const { versions } = raw;
|
|
85
|
-
if (!isRecord(versions) || !isSemverVersion(versions.mcpServer))
|
|
86
|
-
return reject('binding_versions_invalid');
|
|
87
|
-
const canonicalEntry = getCanonicalMcpServerEntry(expectedHost, raw.runtimeDir);
|
|
88
|
-
if (!isSameMcpBindingPath(raw.serverEntry, canonicalEntry, platform)) {
|
|
89
|
-
return reject(`server_entry_not_canonical:${expectedHost}`);
|
|
90
|
-
}
|
|
91
|
-
const { mcpServer } = versions;
|
|
92
|
-
return {
|
|
93
|
-
ok: true,
|
|
94
|
-
binding: {
|
|
95
|
-
workspaceDir: raw.workspaceDir,
|
|
96
|
-
runtimeDir: raw.runtimeDir,
|
|
97
|
-
serverEntry: raw.serverEntry,
|
|
98
|
-
versions: {
|
|
99
|
-
mcpServer,
|
|
100
|
-
...(typeof versions.core === 'string' ? { core: versions.core } : {}),
|
|
101
|
-
},
|
|
102
|
-
},
|
|
103
|
-
};
|
|
104
|
-
}
|
|
105
|
-
//# sourceMappingURL=mcp-binding-shape-mirror.js.map
|