create-principles-disciple 1.144.27 → 1.145.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +73 -21
- package/NOTICE +2 -0
- package/README.md +1 -1
- package/_release/product-identity.json +2 -2
- package/codex-adapter/dist/index.d.ts +2 -2
- package/codex-adapter/dist/index.js +1 -1
- package/codex-adapter/dist/ingestion/admission.js +16 -0
- package/codex-adapter/dist/ingestion/codex-version.d.ts +10 -4
- package/codex-adapter/dist/ingestion/codex-version.js +10 -4
- package/codex-adapter/dist/ingestion/explicit-owner-statement.d.ts +48 -0
- package/codex-adapter/dist/ingestion/explicit-owner-statement.js +123 -0
- package/codex-adapter/dist/ingestion/ingestion.js +50 -1
- package/codex-adapter/dist/pd-hook.js +66 -3
- package/codex-adapter/dist/worker/workspace-worker.d.ts +14 -0
- package/codex-adapter/dist/worker/workspace-worker.js +194 -11
- package/codex-adapter/package.json +6 -4
- package/console/dist/server/models/ApprovalsConsoleModel.d.ts +2 -2
- package/console/dist/server/models/ApprovalsConsoleModel.js +1 -1
- package/console/dist/server/models/ApprovalsGroupedConsoleModel.js +1 -1
- package/console/dist/server/models/PrinciplesConsoleModel.d.ts +26 -1
- package/console/dist/server/models/PrinciplesConsoleModel.js +18 -1
- package/console/dist/server/routes/activations.js +4 -4
- package/console/dist/server/routes/approvals.js +2 -2
- package/console/dist/server/routes/failed-tasks.d.ts +9 -0
- package/console/dist/server/routes/failed-tasks.js +116 -7
- package/console/dist/server/routes/principles.js +73 -1
- package/console/dist/shared/prompt-injection-contract.d.ts +1 -1
- package/console/dist/ui/api.d.ts +5 -5
- package/console/dist/ui/i18n/en.json +13 -2
- package/console/dist/ui/i18n/zh-CN.json +13 -2
- package/console/dist/ui/pages/activation/ActivationPage.js +2 -1
- package/console/dist/ui/pages/failed-tasks/FailedTasksPage.js +42 -4
- package/console/dist/ui/pages/focus/FocusPage.js +3 -3
- package/console/dist/ui/pages/principles/PrinciplesPage.js +7 -2
- package/console/dist/ui/utils/validators.d.ts +6 -2
- package/console/dist/ui/utils/validators.js +19 -4
- package/console/dist/web/assets/app.css +26 -0
- package/console/dist/web/assets/app.js +24 -24
- package/console/package.json +6 -5
- package/core/dist/host/host-installer.d.ts +3 -1
- package/core/dist/host/host-installer.d.ts.map +1 -1
- package/core/dist/host/host-installer.js.map +1 -1
- package/core/dist/runtime-v2/admission-gate.d.ts +8 -0
- package/core/dist/runtime-v2/admission-gate.d.ts.map +1 -1
- package/core/dist/runtime-v2/admission-gate.js +3 -2
- package/core/dist/runtime-v2/admission-gate.js.map +1 -1
- package/core/dist/runtime-v2/config/pd-config-defaults.d.ts.map +1 -1
- package/core/dist/runtime-v2/config/pd-config-defaults.js +16 -1
- package/core/dist/runtime-v2/config/pd-config-defaults.js.map +1 -1
- package/core/dist/runtime-v2/context-payload.d.ts +43 -3
- package/core/dist/runtime-v2/context-payload.d.ts.map +1 -1
- package/core/dist/runtime-v2/context-payload.js +15 -1
- package/core/dist/runtime-v2/context-payload.js.map +1 -1
- package/core/dist/runtime-v2/evidence-guards.d.ts +6 -0
- package/core/dist/runtime-v2/evidence-guards.d.ts.map +1 -1
- package/core/dist/runtime-v2/evidence-guards.js +11 -0
- package/core/dist/runtime-v2/evidence-guards.js.map +1 -1
- package/core/dist/runtime-v2/evolution/evolution-types.d.ts +4 -4
- package/core/dist/runtime-v2/evolution/evolution-types.d.ts.map +1 -1
- package/core/dist/runtime-v2/evolution/evolution-types.js +1 -1
- package/core/dist/runtime-v2/evolution/evolution-types.js.map +1 -1
- package/core/dist/runtime-v2/feature-flags/feature-flag-contract.d.ts.map +1 -1
- package/core/dist/runtime-v2/feature-flags/feature-flag-contract.js +6 -0
- package/core/dist/runtime-v2/feature-flags/feature-flag-contract.js.map +1 -1
- package/core/dist/runtime-v2/feature-flags/feature-flag-lifecycle.d.ts.map +1 -1
- package/core/dist/runtime-v2/feature-flags/feature-flag-lifecycle.js +8 -0
- package/core/dist/runtime-v2/feature-flags/feature-flag-lifecycle.js.map +1 -1
- package/core/dist/runtime-v2/index.d.ts +5 -2
- package/core/dist/runtime-v2/index.d.ts.map +1 -1
- package/core/dist/runtime-v2/index.js +3 -1
- package/core/dist/runtime-v2/index.js.map +1 -1
- package/core/dist/runtime-v2/internalization/evaluator-output.d.ts +11 -0
- package/core/dist/runtime-v2/internalization/evaluator-output.d.ts.map +1 -1
- package/core/dist/runtime-v2/internalization/evaluator-output.js +10 -0
- package/core/dist/runtime-v2/internalization/evaluator-output.js.map +1 -1
- package/core/dist/runtime-v2/internalization/evaluator-prompt-builder.d.ts +3 -3
- package/core/dist/runtime-v2/internalization/evaluator-prompt-builder.d.ts.map +1 -1
- package/core/dist/runtime-v2/internalization/evaluator-prompt-builder.js +49 -5
- package/core/dist/runtime-v2/internalization/evaluator-prompt-builder.js.map +1 -1
- package/core/dist/runtime-v2/internalization/evaluator-runner.d.ts.map +1 -1
- package/core/dist/runtime-v2/internalization/evaluator-runner.js +13 -16
- package/core/dist/runtime-v2/internalization/evaluator-runner.js.map +1 -1
- package/core/dist/runtime-v2/internalization/owner-decision-review.d.ts.map +1 -1
- package/core/dist/runtime-v2/internalization/owner-decision-review.js +5 -1
- package/core/dist/runtime-v2/internalization/owner-decision-review.js.map +1 -1
- package/core/dist/runtime-v2/internalization/owner-review.d.ts +2 -2
- package/core/dist/runtime-v2/internalization/owner-review.js +2 -2
- package/core/dist/runtime-v2/internalization/scribe-output.d.ts +12 -0
- package/core/dist/runtime-v2/internalization/scribe-output.d.ts.map +1 -1
- package/core/dist/runtime-v2/internalization/scribe-output.js +20 -0
- package/core/dist/runtime-v2/internalization/scribe-output.js.map +1 -1
- package/core/dist/runtime-v2/internalization/scribe-prompt-builder.d.ts +32 -1
- package/core/dist/runtime-v2/internalization/scribe-prompt-builder.d.ts.map +1 -1
- package/core/dist/runtime-v2/internalization/scribe-prompt-builder.js +38 -1
- package/core/dist/runtime-v2/internalization/scribe-prompt-builder.js.map +1 -1
- package/core/dist/runtime-v2/internalization-queue-read-model.d.ts +6 -0
- package/core/dist/runtime-v2/internalization-queue-read-model.d.ts.map +1 -1
- package/core/dist/runtime-v2/internalization-queue-read-model.js +8 -1
- package/core/dist/runtime-v2/internalization-queue-read-model.js.map +1 -1
- package/core/dist/runtime-v2/intervention-evidence-normalizer.d.ts.map +1 -1
- package/core/dist/runtime-v2/intervention-evidence-normalizer.js +10 -3
- package/core/dist/runtime-v2/intervention-evidence-normalizer.js.map +1 -1
- package/core/dist/runtime-v2/pain-ingress.d.ts +1 -1
- package/core/dist/runtime-v2/pain-ingress.d.ts.map +1 -1
- package/core/dist/runtime-v2/pain-signal-bridge.d.ts +68 -2
- package/core/dist/runtime-v2/pain-signal-bridge.d.ts.map +1 -1
- package/core/dist/runtime-v2/pain-signal-bridge.js +541 -18
- package/core/dist/runtime-v2/pain-signal-bridge.js.map +1 -1
- package/core/dist/runtime-v2/pain-signal-runtime-factory.d.ts.map +1 -1
- package/core/dist/runtime-v2/pain-signal-runtime-factory.js +4 -0
- package/core/dist/runtime-v2/pain-signal-runtime-factory.js.map +1 -1
- package/core/dist/runtime-v2/product-telemetry/snapshot-contract.d.ts +2 -2
- package/core/dist/runtime-v2/product-telemetry/snapshot-contract.d.ts.map +1 -1
- package/core/dist/runtime-v2/product-telemetry/snapshot-contract.js +2 -2
- package/core/dist/runtime-v2/product-telemetry/snapshot-contract.js.map +1 -1
- package/core/dist/runtime-v2/store/candidate/admission-document.d.ts +90 -0
- package/core/dist/runtime-v2/store/candidate/admission-document.d.ts.map +1 -0
- package/core/dist/runtime-v2/store/candidate/admission-document.js +142 -0
- package/core/dist/runtime-v2/store/candidate/admission-document.js.map +1 -0
- package/core/dist/runtime-v2/store/candidate/candidate-store.d.ts +53 -0
- package/core/dist/runtime-v2/store/candidate/candidate-store.d.ts.map +1 -1
- package/core/dist/runtime-v2/store/candidate/memory-candidate-store.d.ts +35 -0
- package/core/dist/runtime-v2/store/candidate/memory-candidate-store.d.ts.map +1 -1
- package/core/dist/runtime-v2/store/candidate/memory-candidate-store.js +48 -0
- package/core/dist/runtime-v2/store/candidate/memory-candidate-store.js.map +1 -1
- package/core/dist/runtime-v2/store/candidate/sqlite-candidate-store.d.ts +44 -0
- package/core/dist/runtime-v2/store/candidate/sqlite-candidate-store.d.ts.map +1 -1
- package/core/dist/runtime-v2/store/candidate/sqlite-candidate-store.js +136 -0
- package/core/dist/runtime-v2/store/candidate/sqlite-candidate-store.js.map +1 -1
- package/core/dist/runtime-v2/store/context/sqlite-context-assembler.js.map +1 -1
- package/core/dist/runtime-v2/store/intervention-evidence-schema.js +1 -1
- package/core/dist/runtime-v2/store/runtime-state-manager.d.ts +65 -0
- package/core/dist/runtime-v2/store/runtime-state-manager.d.ts.map +1 -1
- package/core/dist/runtime-v2/store/runtime-state-manager.js +46 -0
- package/core/dist/runtime-v2/store/runtime-state-manager.js.map +1 -1
- package/core/dist/runtime-v2/store/sqlite-connection.d.ts.map +1 -1
- package/core/dist/runtime-v2/store/sqlite-connection.js +42 -0
- package/core/dist/runtime-v2/store/sqlite-connection.js.map +1 -1
- package/core/dist/runtime-v2/store/sqlite-intervention-evidence-store.d.ts +1 -1
- package/core/dist/runtime-v2/store/sqlite-intervention-evidence-store.d.ts.map +1 -1
- package/core/dist/runtime-v2/store/sqlite-intervention-evidence-store.js.map +1 -1
- package/core/dist/runtime-v2/store/task/sqlite-family-reopen.d.ts +19 -0
- package/core/dist/runtime-v2/store/task/sqlite-family-reopen.d.ts.map +1 -0
- package/core/dist/runtime-v2/store/task/sqlite-family-reopen.js +36 -0
- package/core/dist/runtime-v2/store/task/sqlite-family-reopen.js.map +1 -0
- package/core/dist/runtime-v2/store/task/sqlite-task-store.d.ts +23 -0
- package/core/dist/runtime-v2/store/task/sqlite-task-store.d.ts.map +1 -1
- package/core/dist/runtime-v2/store/task/sqlite-task-store.js +50 -0
- package/core/dist/runtime-v2/store/task/sqlite-task-store.js.map +1 -1
- package/core/dist/runtime-v2/task-status.d.ts +3 -1
- package/core/dist/runtime-v2/task-status.d.ts.map +1 -1
- package/core/dist/runtime-v2/task-status.js +1 -1
- package/core/dist/runtime-v2/task-status.js.map +1 -1
- package/core/dist/runtime-v2/trajectory-schema.d.ts.map +1 -1
- package/core/dist/runtime-v2/trajectory-schema.js +11 -0
- package/core/dist/runtime-v2/trajectory-schema.js.map +1 -1
- package/core/dist/runtime-v2/types/event-types.d.ts +2 -2
- package/core/dist/runtime-v2/types/event-types.d.ts.map +1 -1
- package/core/dist/runtime-v2/types/event-types.js +1 -1
- package/core/dist/runtime-v2/types/event-types.js.map +1 -1
- package/core/dist/runtime-v2/types/evidence-chain-contract.d.ts +1 -1
- package/core/dist/runtime-v2/types/evidence-chain-contract.d.ts.map +1 -1
- package/core/dist/runtime-v2/types/evidence-chain-contract.js +2 -2
- package/core/dist/runtime-v2/types/evidence-chain-contract.js.map +1 -1
- package/core/dist/runtime-v2/types/intervention-evidence-contract.d.ts +3 -3
- package/core/dist/runtime-v2/types/intervention-evidence-contract.d.ts.map +1 -1
- package/core/dist/runtime-v2/types/intervention-evidence-contract.js +1 -0
- package/core/dist/runtime-v2/types/intervention-evidence-contract.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 +4 -0
- package/core/dist/telemetry-event.js.map +1 -1
- package/core/dist/trajectory-types.d.ts +2 -2
- package/core/dist/trajectory-types.d.ts.map +1 -1
- package/core/package.json +7 -5
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +84 -8
- package/dist/index.js.map +1 -1
- package/dist/installer.d.ts +42 -11
- package/dist/installer.d.ts.map +1 -1
- package/dist/installer.js +140 -36
- package/dist/installer.js.map +1 -1
- package/dist/installers/index.d.ts +18 -7
- package/dist/installers/index.d.ts.map +1 -1
- package/dist/installers/index.js +13 -4
- package/dist/installers/index.js.map +1 -1
- package/dist/installers/workbuddy-host-installer.d.ts +246 -0
- package/dist/installers/workbuddy-host-installer.d.ts.map +1 -0
- package/dist/installers/workbuddy-host-installer.js +1419 -0
- package/dist/installers/workbuddy-host-installer.js.map +1 -0
- package/dist/mvp-config.d.ts +24 -0
- package/dist/mvp-config.d.ts.map +1 -1
- package/dist/mvp-config.js +36 -0
- package/dist/mvp-config.js.map +1 -1
- package/dist/prompts.d.ts +13 -0
- package/dist/prompts.d.ts.map +1 -1
- package/dist/prompts.js +45 -8
- package/dist/prompts.js.map +1 -1
- package/dist/uninstaller.d.ts +1 -1
- package/dist/uninstaller.d.ts.map +1 -1
- package/dist/uninstaller.js +29 -4
- package/dist/uninstaller.js.map +1 -1
- package/host-runtime/dist/governance-signal-admission.d.ts +63 -0
- package/host-runtime/dist/governance-signal-admission.js +322 -53
- package/host-runtime/dist/host-liveness-contract.js +7 -1
- package/host-runtime/dist/index.d.ts +1 -0
- package/host-runtime/dist/index.js +5 -1
- package/host-runtime/dist/internalization-consumer-cycle.d.ts +12 -0
- package/host-runtime/dist/internalization-consumer-cycle.js +43 -1
- package/host-runtime/dist/intervention-evidence-ingress.d.ts +1 -1
- package/host-runtime/dist/product-telemetry/service.js +1 -1
- package/host-runtime/dist/production-pain-evidence.d.ts +59 -1
- package/host-runtime/dist/production-pain-evidence.js +200 -17
- package/host-runtime/dist/prompt-activation-deliverability.js +5 -4
- package/host-runtime/dist/prompt-injection-event-evidence.d.ts +1 -1
- package/host-runtime/dist/prompt-injection-event-evidence.js +5 -1
- package/host-runtime/dist/prompt-injection-projection.d.ts +14 -5
- package/host-runtime/dist/prompt-injection-projection.js +30 -16
- package/host-runtime/dist/workbuddy-worker-status.d.ts +24 -0
- package/host-runtime/dist/workbuddy-worker-status.js +52 -0
- package/host-runtime/package.json +7 -5
- package/install-layout/dist/index.d.ts +18 -1
- package/install-layout/dist/index.js +15 -2
- package/install-layout/package.json +5 -3
- package/package.json +9 -7
- package/pd-cli/dist/commands/candidate.d.ts.map +1 -1
- package/pd-cli/dist/commands/candidate.js +44 -4
- package/pd-cli/dist/commands/candidate.js.map +1 -1
- package/pd-cli/dist/commands/codex-worker.d.ts.map +1 -1
- package/pd-cli/dist/commands/codex-worker.js +30 -1
- package/pd-cli/dist/commands/codex-worker.js.map +1 -1
- package/pd-cli/dist/commands/config-doctor.d.ts.map +1 -1
- package/pd-cli/dist/commands/config-doctor.js +19 -4
- package/pd-cli/dist/commands/config-doctor.js.map +1 -1
- package/pd-cli/dist/commands/diagnose.d.ts.map +1 -1
- package/pd-cli/dist/commands/diagnose.js +4 -1
- package/pd-cli/dist/commands/diagnose.js.map +1 -1
- package/pd-cli/dist/commands/health-codex-install.d.ts +85 -0
- package/pd-cli/dist/commands/health-codex-install.d.ts.map +1 -0
- package/pd-cli/dist/commands/health-codex-install.js +207 -0
- package/pd-cli/dist/commands/health-codex-install.js.map +1 -0
- package/pd-cli/dist/commands/health-codex.d.ts.map +1 -1
- package/pd-cli/dist/commands/health-codex.js +78 -0
- package/pd-cli/dist/commands/health-codex.js.map +1 -1
- package/pd-cli/dist/commands/pain-list.d.ts +3 -2
- package/pd-cli/dist/commands/pain-list.d.ts.map +1 -1
- package/pd-cli/dist/commands/pain-list.js +10 -10
- package/pd-cli/dist/commands/pain-list.js.map +1 -1
- package/pd-cli/dist/commands/pain-record.d.ts +2 -0
- package/pd-cli/dist/commands/pain-record.d.ts.map +1 -1
- package/pd-cli/dist/commands/pain-record.js +36 -0
- package/pd-cli/dist/commands/pain-record.js.map +1 -1
- package/pd-cli/dist/commands/pain-retry.d.ts +6 -0
- package/pd-cli/dist/commands/pain-retry.d.ts.map +1 -1
- package/pd-cli/dist/commands/pain-retry.js +152 -5
- package/pd-cli/dist/commands/pain-retry.js.map +1 -1
- package/pd-cli/dist/commands/runtime-activation.d.ts +1 -1
- package/pd-cli/dist/commands/runtime-activation.d.ts.map +1 -1
- package/pd-cli/dist/commands/runtime-activation.js +3 -3
- package/pd-cli/dist/commands/runtime-activation.js.map +1 -1
- package/pd-cli/dist/commands/workbuddy-worker.d.ts +19 -0
- package/pd-cli/dist/commands/workbuddy-worker.d.ts.map +1 -0
- package/pd-cli/dist/commands/workbuddy-worker.js +168 -0
- package/pd-cli/dist/commands/workbuddy-worker.js.map +1 -0
- package/pd-cli/dist/index.js +29 -1
- package/pd-cli/dist/index.js.map +1 -1
- package/pd-cli/dist/resolve-workspace.d.ts +14 -2
- package/pd-cli/dist/resolve-workspace.d.ts.map +1 -1
- package/pd-cli/dist/resolve-workspace.js +88 -21
- package/pd-cli/dist/resolve-workspace.js.map +1 -1
- package/pd-cli/dist/services/admission-write-gate.d.ts +24 -0
- package/pd-cli/dist/services/admission-write-gate.d.ts.map +1 -0
- package/pd-cli/dist/services/admission-write-gate.js +41 -0
- package/pd-cli/dist/services/admission-write-gate.js.map +1 -0
- package/pd-cli/dist/services/pd-config-loader.d.ts +39 -7
- package/pd-cli/dist/services/pd-config-loader.d.ts.map +1 -1
- package/pd-cli/dist/services/pd-config-loader.js +111 -18
- package/pd-cli/dist/services/pd-config-loader.js.map +1 -1
- package/pd-cli/dist/services/rulehost-pipeline-runner.d.ts +10 -0
- package/pd-cli/dist/services/rulehost-pipeline-runner.d.ts.map +1 -1
- package/pd-cli/dist/services/rulehost-pipeline-runner.js +59 -4
- package/pd-cli/dist/services/rulehost-pipeline-runner.js.map +1 -1
- package/pd-cli/package.json +8 -5
- package/plugin/dist/bundle.js +564 -509
- package/plugin/dist/governance-audit.js +1 -1
- package/plugin/dist/openclaw.plugin.json +1 -1
- package/plugin/dist/rulehost-evidence.js +1 -1
- package/plugin/openclaw.plugin.json +1 -1
- package/plugin/package.json +7 -5
- package/release-manager/dist/index.d.ts.map +1 -1
- package/release-manager/dist/index.js +84 -8
- package/release-manager/dist/index.js.map +1 -1
- package/release-manager/dist/installer.d.ts +42 -11
- package/release-manager/dist/installer.d.ts.map +1 -1
- package/release-manager/dist/installer.js +140 -36
- package/release-manager/dist/installer.js.map +1 -1
- package/release-manager/dist/installers/index.d.ts +18 -7
- package/release-manager/dist/installers/index.d.ts.map +1 -1
- package/release-manager/dist/installers/index.js +13 -4
- package/release-manager/dist/installers/index.js.map +1 -1
- package/release-manager/dist/installers/workbuddy-host-installer.d.ts +246 -0
- package/release-manager/dist/installers/workbuddy-host-installer.d.ts.map +1 -0
- package/release-manager/dist/installers/workbuddy-host-installer.js +1419 -0
- package/release-manager/dist/installers/workbuddy-host-installer.js.map +1 -0
- package/release-manager/dist/mvp-config.d.ts +24 -0
- package/release-manager/dist/mvp-config.d.ts.map +1 -1
- package/release-manager/dist/mvp-config.js +36 -0
- package/release-manager/dist/mvp-config.js.map +1 -1
- package/release-manager/dist/prompts.d.ts +13 -0
- package/release-manager/dist/prompts.d.ts.map +1 -1
- package/release-manager/dist/prompts.js +45 -8
- package/release-manager/dist/prompts.js.map +1 -1
- package/release-manager/dist/uninstaller.d.ts +1 -1
- package/release-manager/dist/uninstaller.d.ts.map +1 -1
- package/release-manager/dist/uninstaller.js +29 -4
- package/release-manager/dist/uninstaller.js.map +1 -1
- package/release-manager/package.json +8 -6
- package/workbuddy-adapter/dist/codec/index.d.ts +2 -0
- package/workbuddy-adapter/dist/codec/index.js +2 -0
- package/workbuddy-adapter/dist/codec/input-decoder.d.ts +30 -0
- package/workbuddy-adapter/dist/codec/input-decoder.js +232 -0
- package/workbuddy-adapter/dist/codec/output-encoder.d.ts +62 -0
- package/workbuddy-adapter/dist/codec/output-encoder.js +75 -0
- package/workbuddy-adapter/dist/host-adapter.d.ts +33 -0
- package/workbuddy-adapter/dist/host-adapter.js +23 -0
- package/workbuddy-adapter/dist/index.d.ts +16 -0
- package/workbuddy-adapter/dist/index.js +16 -0
- package/workbuddy-adapter/dist/pd-hook.d.ts +17 -0
- package/workbuddy-adapter/dist/pd-hook.js +505 -0
- package/workbuddy-adapter/dist/tool-semantics.d.ts +22 -0
- package/workbuddy-adapter/dist/tool-semantics.js +33 -0
- package/workbuddy-adapter/dist/workbuddy-evidence-recorder.d.ts +50 -0
- package/workbuddy-adapter/dist/workbuddy-evidence-recorder.js +238 -0
- package/workbuddy-adapter/dist/worker/workspace-worker.d.ts +41 -0
- package/workbuddy-adapter/dist/worker/workspace-worker.js +219 -0
- package/workbuddy-adapter/dist/workspace-resolution.d.ts +15 -0
- package/workbuddy-adapter/dist/workspace-resolution.js +53 -0
- package/workbuddy-adapter/package.json +64 -0
- package/workbuddy-adapter/plugin/.codebuddy-plugin/plugin.json +6 -0
- package/workbuddy-adapter/plugin/hooks/hooks.json +62 -0
- package/workbuddy-adapter/plugin/scripts/wrapper.cjs +79 -0
- package/console/dist/ui/utils/navigation.d.ts +0 -9
- package/console/dist/ui/utils/navigation.js +0 -7
- package/core/dist/runtime-v2/internalization/dimension-coverage-policy.d.ts +0 -54
- package/core/dist/runtime-v2/internalization/dimension-coverage-policy.d.ts.map +0 -1
- package/core/dist/runtime-v2/internalization/dimension-coverage-policy.js +0 -70
- package/core/dist/runtime-v2/internalization/dimension-coverage-policy.js.map +0 -1
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
{
|
|
2
|
+
"hooks": {
|
|
3
|
+
"PreToolUse": [
|
|
4
|
+
{
|
|
5
|
+
"matcher": "*",
|
|
6
|
+
"hooks": [
|
|
7
|
+
{
|
|
8
|
+
"type": "command",
|
|
9
|
+
"command": "node \"${CODEBUDDY_PLUGIN_ROOT}/scripts/wrapper.cjs\" PreToolUse",
|
|
10
|
+
"timeout": 30
|
|
11
|
+
}
|
|
12
|
+
]
|
|
13
|
+
}
|
|
14
|
+
],
|
|
15
|
+
"PostToolUse": [
|
|
16
|
+
{
|
|
17
|
+
"matcher": "*",
|
|
18
|
+
"hooks": [
|
|
19
|
+
{
|
|
20
|
+
"type": "command",
|
|
21
|
+
"command": "node \"${CODEBUDDY_PLUGIN_ROOT}/scripts/wrapper.cjs\" PostToolUse",
|
|
22
|
+
"timeout": 30
|
|
23
|
+
}
|
|
24
|
+
]
|
|
25
|
+
}
|
|
26
|
+
],
|
|
27
|
+
"PostToolUseFailure": [
|
|
28
|
+
{
|
|
29
|
+
"matcher": "*",
|
|
30
|
+
"hooks": [
|
|
31
|
+
{
|
|
32
|
+
"type": "command",
|
|
33
|
+
"command": "node \"${CODEBUDDY_PLUGIN_ROOT}/scripts/wrapper.cjs\" PostToolUseFailure",
|
|
34
|
+
"timeout": 30
|
|
35
|
+
}
|
|
36
|
+
]
|
|
37
|
+
}
|
|
38
|
+
],
|
|
39
|
+
"UserPromptSubmit": [
|
|
40
|
+
{
|
|
41
|
+
"hooks": [
|
|
42
|
+
{
|
|
43
|
+
"type": "command",
|
|
44
|
+
"command": "node \"${CODEBUDDY_PLUGIN_ROOT}/scripts/wrapper.cjs\" UserPromptSubmit",
|
|
45
|
+
"timeout": 30
|
|
46
|
+
}
|
|
47
|
+
]
|
|
48
|
+
}
|
|
49
|
+
],
|
|
50
|
+
"SessionStart": [
|
|
51
|
+
{
|
|
52
|
+
"hooks": [
|
|
53
|
+
{
|
|
54
|
+
"type": "command",
|
|
55
|
+
"command": "node \"${CODEBUDDY_PLUGIN_ROOT}/scripts/wrapper.cjs\" SessionStart",
|
|
56
|
+
"timeout": 30
|
|
57
|
+
}
|
|
58
|
+
]
|
|
59
|
+
}
|
|
60
|
+
]
|
|
61
|
+
}
|
|
62
|
+
}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
'use strict';
|
|
3
|
+
/**
|
|
4
|
+
* PD WorkBuddy plugin hook wrapper.
|
|
5
|
+
*
|
|
6
|
+
* WorkBuddy executes plugin hook commands via Git Bash (probe P05, verified
|
|
7
|
+
* with spaces AND Chinese characters in both the plugin root and the project
|
|
8
|
+
* cwd). This wrapper is deliberately DUMB TRANSPORT: forward stdin, stdout,
|
|
9
|
+
* stderr and the exit code to the real adapter entry, nothing else. All
|
|
10
|
+
* governance decisions (including WHICH failures may block via exit 2) live
|
|
11
|
+
* in the adapter entry — never here.
|
|
12
|
+
*
|
|
13
|
+
* Entry resolution order:
|
|
14
|
+
* 1. PD_WORKBUDDY_ADAPTER_ENTRY (absolute path) — development and test
|
|
15
|
+
* override;
|
|
16
|
+
* 2. the installer-managed canonical runtime adapter dir, matching
|
|
17
|
+
* @principles/install-layout getInstallLayoutPaths(homeDir)
|
|
18
|
+
* .workbuddyAdapterDir (= <home>/.pd/runtime/workbuddy-adapter) with the
|
|
19
|
+
* built entry at dist/pd-hook.js. The literal path here is LOCKED to the
|
|
20
|
+
* install-layout SSoT by tests/plugin-skeleton.test.ts.
|
|
21
|
+
*
|
|
22
|
+
* On a wrapper-level failure (entry missing / spawn failure) the wrapper exits
|
|
23
|
+
* 1 with a bounded stderr diagnostic: probe P02 established exit 1 is
|
|
24
|
+
* non-blocking on WorkBuddy, and the SPEC §4.4 startup-failure row forbids
|
|
25
|
+
* claiming self-blocking the wrapper cannot guarantee.
|
|
26
|
+
*/
|
|
27
|
+
const { spawnSync } = require('node:child_process');
|
|
28
|
+
const fs = require('node:fs');
|
|
29
|
+
const path = require('node:path');
|
|
30
|
+
|
|
31
|
+
const eventName = process.argv[2];
|
|
32
|
+
|
|
33
|
+
function fail(message) {
|
|
34
|
+
try {
|
|
35
|
+
process.stderr.write(`[PD] status=degraded reason=workbuddy_wrapper:${message} nextAction=Reinstall PD (npx create-principles-disciple) or set PD_WORKBUDDY_ADAPTER_ENTRY to the built adapter entry.\n`);
|
|
36
|
+
} catch (_) { /* no channel left */ }
|
|
37
|
+
process.exit(1);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
function resolveEntry() {
|
|
41
|
+
const override = process.env.PD_WORKBUDDY_ADAPTER_ENTRY;
|
|
42
|
+
if (override && override.trim().length > 0) {
|
|
43
|
+
return override.trim();
|
|
44
|
+
}
|
|
45
|
+
const homeDir = process.env.USERPROFILE || process.env.HOME;
|
|
46
|
+
if (!homeDir) fail('no_home_dir');
|
|
47
|
+
// Mirrors @principles/install-layout getInstallLayoutPaths().workbuddyAdapterDir.
|
|
48
|
+
const adapterDir = path.join(homeDir, '.pd', 'runtime', 'workbuddy-adapter');
|
|
49
|
+
return path.join(adapterDir, 'dist', 'pd-hook.js');
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
if (!eventName || eventName.trim().length === 0) {
|
|
53
|
+
fail('missing_event_argument');
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
const entry = resolveEntry();
|
|
57
|
+
// Pre-check existence: spawning a missing script surfaces as node's own
|
|
58
|
+
// MODULE_NOT_FOUND (exit 1, unstructured) — the wrapper owns a BOUNDED,
|
|
59
|
+
// actionable diagnostic instead (P02 startup-failure boundary).
|
|
60
|
+
try {
|
|
61
|
+
if (!fs.statSync(entry).isFile()) fail('entry_not_found: not a regular file');
|
|
62
|
+
} catch (_) {
|
|
63
|
+
fail('entry_not_found:' + entry.slice(0, 120));
|
|
64
|
+
}
|
|
65
|
+
const child = spawnSync(process.execPath, [entry, eventName], {
|
|
66
|
+
stdio: ['inherit', 'inherit', 'inherit'],
|
|
67
|
+
windowsHide: true,
|
|
68
|
+
});
|
|
69
|
+
|
|
70
|
+
if (child.error) {
|
|
71
|
+
const code = child.error.code === 'ENOENT' ? 'entry_not_found' : 'spawn_failed';
|
|
72
|
+
fail(`${code}:${child.error.message.slice(0, 120)}`);
|
|
73
|
+
}
|
|
74
|
+
if (child.status === null) {
|
|
75
|
+
// Killed by signal (e.g. host timeout): mirror as a non-blocking exit 1
|
|
76
|
+
// with the observable reason; P02 timeout semantics are host-managed.
|
|
77
|
+
fail(`entry_killed_signal:${String(child.signal).slice(0, 30)}`);
|
|
78
|
+
}
|
|
79
|
+
process.exit(child.status);
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import type { Flame } from "lucide-react";
|
|
2
|
-
export interface NavItem {
|
|
3
|
-
id: string;
|
|
4
|
-
label: string;
|
|
5
|
-
icon: typeof Flame;
|
|
6
|
-
href: string;
|
|
7
|
-
alsoActive?: string[];
|
|
8
|
-
}
|
|
9
|
-
export declare function isNavActive(href: string, pathname: string, alsoActive?: string[]): boolean;
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Dreamer dimension coverage policy (design §6.5.1).
|
|
3
|
-
*
|
|
4
|
-
* The **single source of truth** for how the dreamer's five decision
|
|
5
|
-
* dimensions map to fidelity-judgement coverage classes. Both Layer 1
|
|
6
|
-
* (context-manifest well-formedness, INV-MANIFEST-CRITERION) and Layer 2 / PR 4
|
|
7
|
-
* (the progressive evaluator's flagged criteria) read this table — neither
|
|
8
|
-
* inlines a dimension-name array.
|
|
9
|
-
*
|
|
10
|
-
* rc-5 / ERR-013: dimension lookups must NOT use plain object indexing on an
|
|
11
|
-
* untrusted string (`table['__proto__']` would hit `Object.prototype`). This
|
|
12
|
-
* module only ever looks up dimensions it defines itself, so a typed record is
|
|
13
|
-
* safe here — but consumers that look up an LLM-supplied string must guard with
|
|
14
|
-
* `Object.hasOwn` or a `Map`.
|
|
15
|
-
*/
|
|
16
|
-
/** The five dimensions a dreamer candidate carries (design §6.1 dreamer fields). */
|
|
17
|
-
export type DreamerDimension = 'badDecision' | 'betterDecision' | 'rationale' | 'riskLevel' | 'strategicPerspective';
|
|
18
|
-
/** How a dimension participates in compression-fidelity judgement. */
|
|
19
|
-
export type DimensionCoverageClass = 'required' | 'optional' | 'excluded';
|
|
20
|
-
/**
|
|
21
|
-
* The coverage policy table (design §6.5.1).
|
|
22
|
-
*
|
|
23
|
-
* required normative content: must have a semantically-equivalent
|
|
24
|
-
* expression in the principle text; absence counts as a defect
|
|
25
|
-
* and enters `missingDimensions` + the flag path.
|
|
26
|
-
* optional counted as covered when present in `antiPatterns`; absence is
|
|
27
|
-
* NOT a defect, only recorded in `optionalUncovered` for diagnosis.
|
|
28
|
-
* Never enters `missingDimensions` and never flags.
|
|
29
|
-
* excluded an evaluation-lens label, not normative content; the criteria
|
|
30
|
-
* must NOT draw a conclusion about it, and it is never injected
|
|
31
|
-
* into the adjudicating manifest (§6.6.1).
|
|
32
|
-
*/
|
|
33
|
-
export declare const DIMENSION_COVERAGE_POLICY: Readonly<Record<DreamerDimension, DimensionCoverageClass>>;
|
|
34
|
-
/**
|
|
35
|
-
* The required dimensions, derived from the policy table (order stable for
|
|
36
|
-
* deterministic output). Consumers read this instead of inlining a string
|
|
37
|
-
* array.
|
|
38
|
-
*/
|
|
39
|
-
export declare const REQUIRED_FIDELITY_DIMENSIONS: readonly DreamerDimension[];
|
|
40
|
-
/** All five dimension names (order stable). */
|
|
41
|
-
export declare const ALL_DREAMER_DIMENSIONS: readonly DreamerDimension[];
|
|
42
|
-
/**
|
|
43
|
-
* rc-5-safe policy lookup for an untrusted (LLM-supplied) string. Returns the
|
|
44
|
-
* class only when `dim` is genuinely one of the five declared dimensions;
|
|
45
|
-
* `undefined` otherwise (so callers can ignore unknown / optional / excluded
|
|
46
|
-
* values the model may have stuffed into `missingDimensions`).
|
|
47
|
-
*/
|
|
48
|
-
export declare function lookupDimensionPolicy(dim: string): DimensionCoverageClass | undefined;
|
|
49
|
-
/**
|
|
50
|
-
* True iff `dim` is a required dimension (used by the flagged-criteria filter,
|
|
51
|
-
* §6.5.3). Accepts an untrusted string.
|
|
52
|
-
*/
|
|
53
|
-
export declare function isRequiredDimension(dim: string): boolean;
|
|
54
|
-
//# sourceMappingURL=dimension-coverage-policy.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"dimension-coverage-policy.d.ts","sourceRoot":"","sources":["../../../src/runtime-v2/internalization/dimension-coverage-policy.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,oFAAoF;AACpF,MAAM,MAAM,gBAAgB,GACxB,aAAa,GACb,gBAAgB,GAChB,WAAW,GACX,WAAW,GACX,sBAAsB,CAAC;AAE3B,sEAAsE;AACtE,MAAM,MAAM,sBAAsB,GAAG,UAAU,GAAG,UAAU,GAAG,UAAU,CAAC;AAE1E;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,yBAAyB,EAAE,QAAQ,CAAC,MAAM,CAAC,gBAAgB,EAAE,sBAAsB,CAAC,CAMvF,CAAC;AAEX;;;;GAIG;AACH,eAAO,MAAM,4BAA4B,EAAE,SAAS,gBAAgB,EAI9C,CAAC;AAEvB,+CAA+C;AAC/C,eAAO,MAAM,sBAAsB,EAAE,SAAS,gBAAgB,EAM7D,CAAC;AAEF;;;;;GAKG;AACH,wBAAgB,qBAAqB,CAAC,GAAG,EAAE,MAAM,GAAG,sBAAsB,GAAG,SAAS,CAGrF;AAED;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAExD"}
|
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Dreamer dimension coverage policy (design §6.5.1).
|
|
3
|
-
*
|
|
4
|
-
* The **single source of truth** for how the dreamer's five decision
|
|
5
|
-
* dimensions map to fidelity-judgement coverage classes. Both Layer 1
|
|
6
|
-
* (context-manifest well-formedness, INV-MANIFEST-CRITERION) and Layer 2 / PR 4
|
|
7
|
-
* (the progressive evaluator's flagged criteria) read this table — neither
|
|
8
|
-
* inlines a dimension-name array.
|
|
9
|
-
*
|
|
10
|
-
* rc-5 / ERR-013: dimension lookups must NOT use plain object indexing on an
|
|
11
|
-
* untrusted string (`table['__proto__']` would hit `Object.prototype`). This
|
|
12
|
-
* module only ever looks up dimensions it defines itself, so a typed record is
|
|
13
|
-
* safe here — but consumers that look up an LLM-supplied string must guard with
|
|
14
|
-
* `Object.hasOwn` or a `Map`.
|
|
15
|
-
*/
|
|
16
|
-
/**
|
|
17
|
-
* The coverage policy table (design §6.5.1).
|
|
18
|
-
*
|
|
19
|
-
* required normative content: must have a semantically-equivalent
|
|
20
|
-
* expression in the principle text; absence counts as a defect
|
|
21
|
-
* and enters `missingDimensions` + the flag path.
|
|
22
|
-
* optional counted as covered when present in `antiPatterns`; absence is
|
|
23
|
-
* NOT a defect, only recorded in `optionalUncovered` for diagnosis.
|
|
24
|
-
* Never enters `missingDimensions` and never flags.
|
|
25
|
-
* excluded an evaluation-lens label, not normative content; the criteria
|
|
26
|
-
* must NOT draw a conclusion about it, and it is never injected
|
|
27
|
-
* into the adjudicating manifest (§6.6.1).
|
|
28
|
-
*/
|
|
29
|
-
export const DIMENSION_COVERAGE_POLICY = {
|
|
30
|
-
betterDecision: 'required',
|
|
31
|
-
rationale: 'required',
|
|
32
|
-
riskLevel: 'required',
|
|
33
|
-
badDecision: 'optional',
|
|
34
|
-
strategicPerspective: 'excluded',
|
|
35
|
-
};
|
|
36
|
-
/**
|
|
37
|
-
* The required dimensions, derived from the policy table (order stable for
|
|
38
|
-
* deterministic output). Consumers read this instead of inlining a string
|
|
39
|
-
* array.
|
|
40
|
-
*/
|
|
41
|
-
export const REQUIRED_FIDELITY_DIMENSIONS = Object.entries(DIMENSION_COVERAGE_POLICY)
|
|
42
|
-
.filter(([, cls]) => cls === 'required')
|
|
43
|
-
.map(([dim]) => dim);
|
|
44
|
-
/** All five dimension names (order stable). */
|
|
45
|
-
export const ALL_DREAMER_DIMENSIONS = [
|
|
46
|
-
'badDecision',
|
|
47
|
-
'betterDecision',
|
|
48
|
-
'rationale',
|
|
49
|
-
'riskLevel',
|
|
50
|
-
'strategicPerspective',
|
|
51
|
-
];
|
|
52
|
-
/**
|
|
53
|
-
* rc-5-safe policy lookup for an untrusted (LLM-supplied) string. Returns the
|
|
54
|
-
* class only when `dim` is genuinely one of the five declared dimensions;
|
|
55
|
-
* `undefined` otherwise (so callers can ignore unknown / optional / excluded
|
|
56
|
-
* values the model may have stuffed into `missingDimensions`).
|
|
57
|
-
*/
|
|
58
|
-
export function lookupDimensionPolicy(dim) {
|
|
59
|
-
if (!Object.hasOwn(DIMENSION_COVERAGE_POLICY, dim))
|
|
60
|
-
return undefined;
|
|
61
|
-
return DIMENSION_COVERAGE_POLICY[dim];
|
|
62
|
-
}
|
|
63
|
-
/**
|
|
64
|
-
* True iff `dim` is a required dimension (used by the flagged-criteria filter,
|
|
65
|
-
* §6.5.3). Accepts an untrusted string.
|
|
66
|
-
*/
|
|
67
|
-
export function isRequiredDimension(dim) {
|
|
68
|
-
return lookupDimensionPolicy(dim) === 'required';
|
|
69
|
-
}
|
|
70
|
-
//# sourceMappingURL=dimension-coverage-policy.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"dimension-coverage-policy.js","sourceRoot":"","sources":["../../../src/runtime-v2/internalization/dimension-coverage-policy.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAaH;;;;;;;;;;;;GAYG;AACH,MAAM,CAAC,MAAM,yBAAyB,GAA+D;IACnG,cAAc,EAAE,UAAU;IAC1B,SAAS,EAAE,UAAU;IACrB,SAAS,EAAE,UAAU;IACrB,WAAW,EAAE,UAAU;IACvB,oBAAoB,EAAE,UAAU;CACxB,CAAC;AAEX;;;;GAIG;AACH,MAAM,CAAC,MAAM,4BAA4B,GACvC,MAAM,CAAC,OAAO,CAAC,yBAAyB,CACzC;KACE,MAAM,CAAC,CAAC,CAAC,EAAE,GAAG,CAAC,EAAE,EAAE,CAAC,GAAG,KAAK,UAAU,CAAC;KACvC,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,EAAE,CAAC,GAAG,CAAC,CAAC;AAEvB,+CAA+C;AAC/C,MAAM,CAAC,MAAM,sBAAsB,GAAgC;IACjE,aAAa;IACb,gBAAgB;IAChB,WAAW;IACX,WAAW;IACX,sBAAsB;CACvB,CAAC;AAEF;;;;;GAKG;AACH,MAAM,UAAU,qBAAqB,CAAC,GAAW;IAC/C,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,yBAAyB,EAAE,GAAG,CAAC;QAAE,OAAO,SAAS,CAAC;IACrE,OAAO,yBAAyB,CAAC,GAAuB,CAAC,CAAC;AAC5D,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,mBAAmB,CAAC,GAAW;IAC7C,OAAO,qBAAqB,CAAC,GAAG,CAAC,KAAK,UAAU,CAAC;AACnD,CAAC"}
|