create-principles-disciple 1.104.0 → 1.104.2
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/README.md +2 -2
- package/console/dist/server/config/pd-config-store.d.ts +8 -1
- package/console/dist/server/config/pd-config-store.js +50 -0
- package/console/dist/server/index.js +24 -3
- package/console/dist/server/models/HealthCheckModel.d.ts +27 -0
- package/console/dist/server/models/HealthCheckModel.js +56 -0
- package/console/dist/server/routes/failed-tasks.d.ts +24 -0
- package/console/dist/server/routes/failed-tasks.js +207 -0
- package/console/dist/server/routes/feedback-reports.d.ts +1 -0
- package/console/dist/server/routes/feedback-reports.js +29 -2
- package/console/dist/server/routes/lifecycle.js +19 -1
- package/console/dist/server/routes/onboarding.js +2 -2
- package/console/dist/server/routes/update.js +307 -35
- package/console/dist/server/utils/gateway.d.ts +25 -0
- package/console/dist/server/utils/gateway.js +131 -0
- package/console/dist/ui/App.d.ts +1 -1
- package/console/dist/ui/App.js +2 -1
- package/console/dist/ui/api.d.ts +2 -1
- package/console/dist/ui/api.js +14 -2
- package/console/dist/ui/components/auth/login-form.d.ts +2 -1
- package/console/dist/ui/components/auth/splash-screen.d.ts +2 -1
- package/console/dist/ui/components/error-boundary.d.ts +1 -1
- package/console/dist/ui/components/focus/daily-thought-card.d.ts +1 -1
- package/console/dist/ui/components/language-switcher.d.ts +2 -1
- package/console/dist/ui/components/layout/app-sidebar.d.ts +6 -1
- package/console/dist/ui/components/layout/app-sidebar.js +10 -2
- package/console/dist/ui/components/layout/page-loading.d.ts +1 -1
- package/console/dist/ui/components/layout/page-shell.d.ts +1 -1
- package/console/dist/ui/components/layout/section-title.d.ts +1 -1
- package/console/dist/ui/components/notifications/NotificationProvider.d.ts +1 -1
- package/console/dist/ui/components/onboarding/CircuitDiagram.d.ts +1 -1
- package/console/dist/ui/components/onboarding/DemoResultView.d.ts +1 -1
- package/console/dist/ui/components/onboarding/SlashCommandsCard.d.ts +16 -0
- package/console/dist/ui/components/onboarding/SlashCommandsCard.js +20 -0
- package/console/dist/ui/components/onboarding/slashCommands.d.ts +20 -0
- package/console/dist/ui/components/onboarding/slashCommands.js +23 -0
- package/console/dist/ui/components/theme-provider.d.ts +1 -1
- package/console/dist/ui/components/theme-toggle.d.ts +2 -1
- package/console/dist/ui/components/ui/alert-dialog.d.ts +8 -8
- package/console/dist/ui/components/ui/badge.d.ts +2 -2
- package/console/dist/ui/components/ui/button.d.ts +2 -2
- package/console/dist/ui/components/ui/charts.d.ts +5 -5
- package/console/dist/ui/components/ui/dialog.d.ts +8 -8
- package/console/dist/ui/components/ui/markdown.d.ts +4 -4
- package/console/dist/ui/components/ui/progress-bar.d.ts +2 -2
- package/console/dist/ui/components/ui/sheet.d.ts +9 -9
- package/console/dist/ui/components/ui/shiny-text.d.ts +1 -1
- package/console/dist/ui/components/ui/skeleton.d.ts +1 -1
- package/console/dist/ui/components/ui/sonner.d.ts +1 -1
- package/console/dist/ui/i18n/en.json +52 -7
- package/console/dist/ui/i18n/zh-CN.json +52 -7
- package/console/dist/ui/pages/ReportProblemValidators.d.ts +63 -0
- package/console/dist/ui/pages/ReportProblemValidators.js +238 -0
- package/console/dist/ui/pages/activation/ActivationPage.d.ts +1 -1
- package/console/dist/ui/pages/activation/ActivationPage.js +1 -1
- package/console/dist/ui/pages/control-center/AgentCard.d.ts +1 -1
- package/console/dist/ui/pages/control-center/AgentCard.js +1 -1
- package/console/dist/ui/pages/control-center/AgentGroup.d.ts +1 -1
- package/console/dist/ui/pages/control-center/ControlCenterPage.d.ts +1 -1
- package/console/dist/ui/pages/control-center/ControlCenterPage.js +1 -1
- package/console/dist/ui/pages/control-center/EmpathyObserverCostHint.d.ts +1 -1
- package/console/dist/ui/pages/control-center/RuntimeProfileManager.d.ts +1 -1
- package/console/dist/ui/pages/control-center/RuntimeProfileManager.js +1 -1
- package/console/dist/ui/pages/control-center/WorkflowDiagram.d.ts +1 -1
- package/console/dist/ui/pages/debt/DebtPage.d.ts +2 -1
- package/console/dist/ui/pages/debt/DebtPage.js +1 -1
- package/console/dist/ui/pages/design-system/DesignSystemPage.d.ts +2 -1
- package/console/dist/ui/pages/failed-tasks/FailedTasksPage.d.ts +1 -0
- package/console/dist/ui/pages/failed-tasks/FailedTasksPage.js +229 -0
- package/console/dist/ui/pages/focus/FocusPage.d.ts +1 -1
- package/console/dist/ui/pages/focus/FocusPage.js +2 -2
- package/console/dist/ui/pages/intent/IntentOnboarding.d.ts +4 -4
- package/console/dist/ui/pages/intent/IntentOnboarding.js +1 -1
- package/console/dist/ui/pages/intent/IntentPage.d.ts +1 -1
- package/console/dist/ui/pages/intent/IntentPage.js +1 -1
- package/console/dist/ui/pages/pain/PainPage.d.ts +1 -1
- package/console/dist/ui/pages/pain/PainPage.js +1 -1
- package/console/dist/ui/pages/principles/PrincipleDetailPage.d.ts +1 -1
- package/console/dist/ui/pages/principles/PrincipleDetailPage.js +1 -1
- package/console/dist/ui/pages/principles/PrinciplesPage.d.ts +1 -1
- package/console/dist/ui/pages/report-problem/ReportProblemPage.d.ts +1 -1
- package/console/dist/ui/pages/report-problem/ReportProblemPage.js +36 -9
- package/console/dist/ui/pages/settings/SettingsPage.d.ts +1 -1
- package/console/dist/ui/pages/settings/SettingsPage.js +1 -1
- package/console/dist/ui/pages/settings/UpdatePage.d.ts +1 -1
- package/console/dist/ui/pages/settings/UpdatePage.js +35 -3
- package/console/dist/ui/pages/signal-keywords/KeywordEditDialog.d.ts +1 -1
- package/console/dist/ui/pages/signal-keywords/KeywordListSection.d.ts +1 -1
- package/console/dist/ui/pages/signal-keywords/PendingTermsSection.d.ts +1 -1
- package/console/dist/ui/pages/signal-keywords/SignalKeywordsPage.d.ts +1 -1
- package/console/dist/ui/pages/welcome/WelcomePage.d.ts +1 -1
- package/console/dist/ui/pages/welcome/WelcomePage.js +7 -5
- package/console/dist/ui/utils/agent-metadata.js +9 -9
- package/console/dist/ui/utils/validators.d.ts +14 -2
- package/console/dist/ui/utils/validators.js +18 -1
- package/console/dist/web/assets/app.css +428 -716
- package/console/dist/web/assets/app.js +1574 -877
- package/console/package.json +14 -14
- package/core/dist/adapters/__tests__/code-review-pain-adapter.test.d.ts +2 -0
- package/core/dist/adapters/__tests__/code-review-pain-adapter.test.d.ts.map +1 -0
- package/core/dist/adapters/__tests__/code-review-pain-adapter.test.js +346 -0
- package/core/dist/adapters/__tests__/code-review-pain-adapter.test.js.map +1 -0
- package/core/dist/adapters/__tests__/openclaw-pain-adapter.test.d.ts +2 -0
- package/core/dist/adapters/__tests__/openclaw-pain-adapter.test.d.ts.map +1 -0
- package/core/dist/adapters/__tests__/openclaw-pain-adapter.test.js +290 -0
- package/core/dist/adapters/__tests__/openclaw-pain-adapter.test.js.map +1 -0
- package/core/dist/adapters/__tests__/writing-pain-adapter.test.d.ts +2 -0
- package/core/dist/adapters/__tests__/writing-pain-adapter.test.d.ts.map +1 -0
- package/core/dist/adapters/__tests__/writing-pain-adapter.test.js +239 -0
- package/core/dist/adapters/__tests__/writing-pain-adapter.test.js.map +1 -0
- package/core/dist/adapters/code-review/code-review-pain-adapter.d.ts.map +1 -1
- package/core/dist/adapters/coding/openclaw-pain-adapter.d.ts.map +1 -1
- package/core/dist/adapters/writing/writing-pain-adapter.d.ts.map +1 -1
- package/core/dist/evolution-store.js.map +1 -1
- package/core/dist/evolution-store.test.d.ts +2 -0
- package/core/dist/evolution-store.test.d.ts.map +1 -0
- package/core/dist/evolution-store.test.js +291 -0
- package/core/dist/evolution-store.test.js.map +1 -0
- package/core/dist/host/__tests__/host-adapter.test.d.ts +2 -0
- package/core/dist/host/__tests__/host-adapter.test.d.ts.map +1 -0
- package/core/dist/host/__tests__/host-adapter.test.js +96 -0
- package/core/dist/host/__tests__/host-adapter.test.js.map +1 -0
- package/core/dist/host/host-adapter.d.ts +185 -0
- package/core/dist/host/host-adapter.d.ts.map +1 -0
- package/core/dist/host/host-adapter.js +81 -0
- package/core/dist/host/host-adapter.js.map +1 -0
- package/core/dist/host/host-installer.d.ts +165 -0
- package/core/dist/host/host-installer.d.ts.map +1 -0
- package/core/dist/host/host-installer.js +55 -0
- package/core/dist/host/host-installer.js.map +1 -0
- package/core/dist/host/index.d.ts +14 -0
- package/core/dist/host/index.d.ts.map +1 -0
- package/core/dist/host/index.js +3 -0
- package/core/dist/host/index.js.map +1 -0
- package/core/dist/index.d.ts +2 -0
- package/core/dist/index.d.ts.map +1 -1
- package/core/dist/index.js +1 -0
- package/core/dist/index.js.map +1 -1
- package/core/dist/principle-injector.d.ts.map +1 -1
- package/core/dist/principle-injector.test.d.ts +2 -0
- package/core/dist/principle-injector.test.d.ts.map +1 -0
- package/core/dist/principle-injector.test.js +158 -0
- package/core/dist/principle-injector.test.js.map +1 -0
- package/core/dist/principle-tree-ledger-lifecycle.test.d.ts +2 -0
- package/core/dist/principle-tree-ledger-lifecycle.test.d.ts.map +1 -0
- package/core/dist/principle-tree-ledger-lifecycle.test.js +530 -0
- package/core/dist/principle-tree-ledger-lifecycle.test.js.map +1 -0
- package/core/dist/principle-tree-ledger.d.ts.map +1 -1
- package/core/dist/principle-tree-ledger.js +55 -30
- package/core/dist/principle-tree-ledger.js.map +1 -1
- package/core/dist/prompt-builder/__tests__/attitude-directive.test.d.ts +2 -0
- package/core/dist/prompt-builder/__tests__/attitude-directive.test.d.ts.map +1 -0
- package/core/dist/prompt-builder/__tests__/attitude-directive.test.js +49 -0
- package/core/dist/prompt-builder/__tests__/attitude-directive.test.js.map +1 -0
- package/core/dist/prompt-builder/__tests__/correction-cue.test.d.ts +2 -0
- package/core/dist/prompt-builder/__tests__/correction-cue.test.d.ts.map +1 -0
- package/core/dist/prompt-builder/__tests__/correction-cue.test.js +61 -0
- package/core/dist/prompt-builder/__tests__/correction-cue.test.js.map +1 -0
- package/core/dist/prompt-builder/__tests__/message-extraction.test.d.ts +2 -0
- package/core/dist/prompt-builder/__tests__/message-extraction.test.d.ts.map +1 -0
- package/core/dist/prompt-builder/__tests__/message-extraction.test.js +90 -0
- package/core/dist/prompt-builder/__tests__/message-extraction.test.js.map +1 -0
- package/core/dist/prompt-builder/__tests__/minimal-trigger.test.d.ts +2 -0
- package/core/dist/prompt-builder/__tests__/minimal-trigger.test.d.ts.map +1 -0
- package/core/dist/prompt-builder/__tests__/minimal-trigger.test.js +45 -0
- package/core/dist/prompt-builder/__tests__/minimal-trigger.test.js.map +1 -0
- package/core/dist/prompt-builder/__tests__/principle-selection.test.js.map +1 -1
- package/core/dist/prompt-builder/empathy-keyword-matching.js.map +1 -1
- package/core/dist/prompt-builder/empathy-types.js.map +1 -1
- package/core/dist/prompt-builder/focus-compression.js.map +1 -1
- package/core/dist/prompt-builder/routing-guidance.d.ts +3 -3
- package/core/dist/prompt-builder/routing-guidance.d.ts.map +1 -1
- package/core/dist/prompt-builder/routing-guidance.js.map +1 -1
- package/core/dist/quality-scorecard/__tests__/quality-scorecard.test.js +399 -1
- package/core/dist/quality-scorecard/__tests__/quality-scorecard.test.js.map +1 -1
- package/core/dist/quality-scorecard/__tests__/report-generator.test.d.ts +2 -0
- package/core/dist/quality-scorecard/__tests__/report-generator.test.d.ts.map +1 -0
- package/core/dist/quality-scorecard/__tests__/report-generator.test.js +627 -0
- package/core/dist/quality-scorecard/__tests__/report-generator.test.js.map +1 -0
- package/core/dist/quality-scorecard/types.d.ts +1 -1
- package/core/dist/quality-scorecard/types.d.ts.map +1 -1
- package/core/dist/runtime-v2/__tests__/admission-gate.test.js.map +1 -1
- package/core/dist/runtime-v2/__tests__/adversarial-loop.test.js.map +1 -1
- package/core/dist/runtime-v2/__tests__/architecture-regression.test.js +317 -6
- package/core/dist/runtime-v2/__tests__/architecture-regression.test.js.map +1 -1
- package/core/dist/runtime-v2/__tests__/artificer-runner-vslice.test.js +839 -0
- package/core/dist/runtime-v2/__tests__/artificer-runner-vslice.test.js.map +1 -1
- package/core/dist/runtime-v2/__tests__/attack-e2e-pipeline-smoke.test.js.map +1 -1
- package/core/dist/runtime-v2/__tests__/bridge-result-shaper.test.d.ts +26 -0
- package/core/dist/runtime-v2/__tests__/bridge-result-shaper.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/__tests__/bridge-result-shaper.test.js +402 -0
- package/core/dist/runtime-v2/__tests__/bridge-result-shaper.test.js.map +1 -0
- package/core/dist/runtime-v2/__tests__/build-golden-trace-from-artificer.test.js.map +1 -1
- package/core/dist/runtime-v2/__tests__/context-payload-validation.test.d.ts +11 -0
- package/core/dist/runtime-v2/__tests__/context-payload-validation.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/__tests__/context-payload-validation.test.js +309 -0
- package/core/dist/runtime-v2/__tests__/context-payload-validation.test.js.map +1 -0
- package/core/dist/runtime-v2/__tests__/diagnostician-output-schema.test.d.ts +25 -0
- package/core/dist/runtime-v2/__tests__/diagnostician-output-schema.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/__tests__/diagnostician-output-schema.test.js +405 -0
- package/core/dist/runtime-v2/__tests__/diagnostician-output-schema.test.js.map +1 -0
- package/core/dist/runtime-v2/__tests__/dreamer-runner-vslice.test.js.map +1 -1
- package/core/dist/runtime-v2/__tests__/dreamer-runner.test.js.map +1 -1
- package/core/dist/runtime-v2/__tests__/error-categories.test.js +1 -0
- package/core/dist/runtime-v2/__tests__/error-categories.test.js.map +1 -1
- package/core/dist/runtime-v2/__tests__/evaluator-repair-loop.test.d.ts +2 -0
- package/core/dist/runtime-v2/__tests__/evaluator-repair-loop.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/__tests__/evaluator-repair-loop.test.js +562 -0
- package/core/dist/runtime-v2/__tests__/evaluator-repair-loop.test.js.map +1 -0
- package/core/dist/runtime-v2/__tests__/evaluator-runner-vslice-v2.test.js.map +1 -1
- package/core/dist/runtime-v2/__tests__/evaluator-runner-vslice.test.js.map +1 -1
- package/core/dist/runtime-v2/__tests__/evidence-chain-intent-tension.test.js.map +1 -1
- package/core/dist/runtime-v2/__tests__/feedback/create-report.test.js +51 -0
- package/core/dist/runtime-v2/__tests__/feedback/create-report.test.js.map +1 -1
- package/core/dist/runtime-v2/__tests__/feedback/privacy-preview.test.js +1 -1
- package/core/dist/runtime-v2/__tests__/feedback/privacy-preview.test.js.map +1 -1
- package/core/dist/runtime-v2/__tests__/feedback/render-markdown.test.js +1 -1
- package/core/dist/runtime-v2/__tests__/feedback/render-markdown.test.js.map +1 -1
- package/core/dist/runtime-v2/__tests__/fixtures/test-helpers.js.map +1 -1
- package/core/dist/runtime-v2/__tests__/golden-trace-candidate-builder.test.js.map +1 -1
- package/core/dist/runtime-v2/__tests__/intake-to-internalization-bridge.test.js.map +1 -1
- package/core/dist/runtime-v2/__tests__/internalization-consumer-product-path.test.js.map +1 -1
- package/core/dist/runtime-v2/__tests__/internalization-contracts.test.js +1 -1
- package/core/dist/runtime-v2/__tests__/internalization-contracts.test.js.map +1 -1
- package/core/dist/runtime-v2/__tests__/internalization-orchestrator.test.js.map +1 -1
- package/core/dist/runtime-v2/__tests__/internalization-route.test.js +1 -1
- package/core/dist/runtime-v2/__tests__/internalization-route.test.js.map +1 -1
- package/core/dist/runtime-v2/__tests__/internalization-state-machine.test.js.map +1 -1
- package/core/dist/runtime-v2/__tests__/l1-hard-cap.test.js.map +1 -1
- package/core/dist/runtime-v2/__tests__/operator-health-cold-start-guard.test.js.map +1 -1
- package/core/dist/runtime-v2/__tests__/pain-signal-bridge-result-shaping.test.js.map +1 -1
- package/core/dist/runtime-v2/__tests__/pain-signal-runtime-factory-edge-cases.test.d.ts +8 -0
- package/core/dist/runtime-v2/__tests__/pain-signal-runtime-factory-edge-cases.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/__tests__/pain-signal-runtime-factory-edge-cases.test.js +168 -0
- package/core/dist/runtime-v2/__tests__/pain-signal-runtime-factory-edge-cases.test.js.map +1 -0
- package/core/dist/runtime-v2/__tests__/pain-to-principle-service.test.js +13 -2
- package/core/dist/runtime-v2/__tests__/pain-to-principle-service.test.js.map +1 -1
- package/core/dist/runtime-v2/__tests__/philosopher-runner-vslice.test.js.map +1 -1
- package/core/dist/runtime-v2/__tests__/pi-artifact-store.test.js.map +1 -1
- package/core/dist/runtime-v2/__tests__/pitask-metadata.test.js +150 -0
- package/core/dist/runtime-v2/__tests__/pitask-metadata.test.js.map +1 -1
- package/core/dist/runtime-v2/__tests__/pruning-mask.test.d.ts +25 -0
- package/core/dist/runtime-v2/__tests__/pruning-mask.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/__tests__/pruning-mask.test.js +281 -0
- package/core/dist/runtime-v2/__tests__/pruning-mask.test.js.map +1 -0
- package/core/dist/runtime-v2/__tests__/resolve-runtime-config-from-pd-config.test.js +8 -8
- package/core/dist/runtime-v2/__tests__/resolve-runtime-config-from-pd-config.test.js.map +1 -1
- package/core/dist/runtime-v2/__tests__/rollout-reviewer-runner-vslice.test.js.map +1 -1
- package/core/dist/runtime-v2/__tests__/schema-orphan-detection.test.js.map +1 -1
- package/core/dist/runtime-v2/__tests__/schema-version.test.d.ts +19 -0
- package/core/dist/runtime-v2/__tests__/schema-version.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/__tests__/schema-version.test.js +176 -0
- package/core/dist/runtime-v2/__tests__/schema-version.test.js.map +1 -0
- package/core/dist/runtime-v2/__tests__/scribe-runner-vslice.test.js.map +1 -1
- package/core/dist/runtime-v2/__tests__/story-a-demo.test.js +20 -5
- package/core/dist/runtime-v2/__tests__/story-a-demo.test.js.map +1 -1
- package/core/dist/runtime-v2/__tests__/task-state-semantics.test.js.map +1 -1
- package/core/dist/runtime-v2/__tests__/task-three-strikes.test.js.map +1 -1
- package/core/dist/runtime-v2/__tests__/workflow-funnel-loader.test.d.ts +29 -0
- package/core/dist/runtime-v2/__tests__/workflow-funnel-loader.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/__tests__/workflow-funnel-loader.test.js +431 -0
- package/core/dist/runtime-v2/__tests__/workflow-funnel-loader.test.js.map +1 -0
- package/core/dist/runtime-v2/__tests__/workspace-leak-guard.test.d.ts +2 -0
- package/core/dist/runtime-v2/__tests__/workspace-leak-guard.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/__tests__/workspace-leak-guard.test.js +110 -0
- package/core/dist/runtime-v2/__tests__/workspace-leak-guard.test.js.map +1 -0
- package/core/dist/runtime-v2/activation/__tests__/activation-dispatcher.test.js +109 -0
- package/core/dist/runtime-v2/activation/__tests__/activation-dispatcher.test.js.map +1 -1
- package/core/dist/runtime-v2/activation/__tests__/activation-re-dispatch.test.js.map +1 -1
- package/core/dist/runtime-v2/activation/__tests__/approval-completion-service.test.js.map +1 -1
- package/core/dist/runtime-v2/activation/__tests__/approval-store-extended.test.js.map +1 -1
- package/core/dist/runtime-v2/activation/__tests__/helpers.js.map +1 -1
- package/core/dist/runtime-v2/activation/__tests__/memory-activation-state-store.test.js.map +1 -1
- package/core/dist/runtime-v2/activation/__tests__/prompt-activation-reader-contract.test.js.map +1 -1
- package/core/dist/runtime-v2/activation/activation-dispatcher.d.ts +11 -0
- package/core/dist/runtime-v2/activation/activation-dispatcher.d.ts.map +1 -1
- package/core/dist/runtime-v2/activation/activation-dispatcher.js +60 -6
- package/core/dist/runtime-v2/activation/activation-dispatcher.js.map +1 -1
- package/core/dist/runtime-v2/activation/activation-types.d.ts +4 -0
- package/core/dist/runtime-v2/activation/activation-types.d.ts.map +1 -1
- package/core/dist/runtime-v2/activation/approval-completion-service.d.ts.map +1 -1
- package/core/dist/runtime-v2/activation/approval-completion-service.js.map +1 -1
- package/core/dist/runtime-v2/activation/approval-queue.d.ts.map +1 -1
- package/core/dist/runtime-v2/activation/approval-queue.js.map +1 -1
- package/core/dist/runtime-v2/activation/low-risk-writers.d.ts +2 -2
- package/core/dist/runtime-v2/activation/low-risk-writers.d.ts.map +1 -1
- package/core/dist/runtime-v2/activation/memory-activation-state-store.d.ts.map +1 -1
- package/core/dist/runtime-v2/activation/memory-approval-store.d.ts.map +1 -1
- package/core/dist/runtime-v2/activation/prompt-activation-reader-contract.js.map +1 -1
- package/core/dist/runtime-v2/activation/sqlite-activation-state-store.d.ts.map +1 -1
- package/core/dist/runtime-v2/activation/sqlite-activation-state-store.js.map +1 -1
- package/core/dist/runtime-v2/activation/sqlite-approval-store.d.ts.map +1 -1
- package/core/dist/runtime-v2/activation/sqlite-approval-store.js.map +1 -1
- package/core/dist/runtime-v2/activation/writers/__tests__/rule-host-writer.test.js.map +1 -1
- package/core/dist/runtime-v2/activation/writers/rule-host-writer.d.ts +1 -1
- package/core/dist/runtime-v2/activation/writers/rule-host-writer.d.ts.map +1 -1
- package/core/dist/runtime-v2/adapter/__tests__/artificer-l2-adapter.test.js +13 -3
- package/core/dist/runtime-v2/adapter/__tests__/artificer-l2-adapter.test.js.map +1 -1
- package/core/dist/runtime-v2/adapter/__tests__/l2-agent-loop-adapter.test.js +3 -2
- package/core/dist/runtime-v2/adapter/__tests__/l2-agent-loop-adapter.test.js.map +1 -1
- package/core/dist/runtime-v2/adapter/__tests__/openclaw-cli-runtime-adapter-message-file.test.d.ts +19 -0
- package/core/dist/runtime-v2/adapter/__tests__/openclaw-cli-runtime-adapter-message-file.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/adapter/__tests__/openclaw-cli-runtime-adapter-message-file.test.js +188 -0
- package/core/dist/runtime-v2/adapter/__tests__/openclaw-cli-runtime-adapter-message-file.test.js.map +1 -0
- package/core/dist/runtime-v2/adapter/__tests__/openclaw-cli-runtime-adapter.test.js +102 -9
- package/core/dist/runtime-v2/adapter/__tests__/openclaw-cli-runtime-adapter.test.js.map +1 -1
- package/core/dist/runtime-v2/adapter/__tests__/pi-ai-runtime-adapter.test.js +51 -23
- package/core/dist/runtime-v2/adapter/__tests__/pi-ai-runtime-adapter.test.js.map +1 -1
- package/core/dist/runtime-v2/adapter/__tests__/principle-tree-ledger-adapter.test.js.map +1 -1
- package/core/dist/runtime-v2/adapter/__tests__/runtime-config-contract.test.js +1 -1
- package/core/dist/runtime-v2/adapter/__tests__/runtime-config-contract.test.js.map +1 -1
- package/core/dist/runtime-v2/adapter/artificer-l2-adapter.d.ts.map +1 -1
- package/core/dist/runtime-v2/adapter/artificer-l2-adapter.js +2 -1
- package/core/dist/runtime-v2/adapter/artificer-l2-adapter.js.map +1 -1
- package/core/dist/runtime-v2/adapter/l2-agent-loop-adapter.d.ts +1 -1
- package/core/dist/runtime-v2/adapter/l2-agent-loop-adapter.d.ts.map +1 -1
- package/core/dist/runtime-v2/adapter/l2-agent-loop-adapter.js +2 -2
- package/core/dist/runtime-v2/adapter/l2-agent-loop-adapter.js.map +1 -1
- package/core/dist/runtime-v2/adapter/openclaw-cli-runtime-adapter.d.ts.map +1 -1
- package/core/dist/runtime-v2/adapter/openclaw-cli-runtime-adapter.js +42 -16
- package/core/dist/runtime-v2/adapter/openclaw-cli-runtime-adapter.js.map +1 -1
- package/core/dist/runtime-v2/adapter/output-repair-contract.d.ts +1 -1
- package/core/dist/runtime-v2/adapter/output-repair-contract.d.ts.map +1 -1
- package/core/dist/runtime-v2/adapter/output-schema-registry.d.ts +36 -0
- package/core/dist/runtime-v2/adapter/output-schema-registry.d.ts.map +1 -0
- package/core/dist/runtime-v2/adapter/output-schema-registry.js +44 -0
- package/core/dist/runtime-v2/adapter/output-schema-registry.js.map +1 -0
- package/core/dist/runtime-v2/adapter/pi-ai-runtime-adapter.d.ts +17 -0
- package/core/dist/runtime-v2/adapter/pi-ai-runtime-adapter.d.ts.map +1 -1
- package/core/dist/runtime-v2/adapter/pi-ai-runtime-adapter.js +61 -33
- package/core/dist/runtime-v2/adapter/pi-ai-runtime-adapter.js.map +1 -1
- package/core/dist/runtime-v2/adapter/principle-tree-ledger-adapter.d.ts.map +1 -1
- package/core/dist/runtime-v2/adapter/schema-prompt-adapter.d.ts.map +1 -1
- package/core/dist/runtime-v2/adapter/structured-output-repair.js.map +1 -1
- package/core/dist/runtime-v2/adapter/test-double-runtime-adapter.d.ts.map +1 -1
- package/core/dist/runtime-v2/adapter/test-double-runtime-adapter.js +1 -1
- package/core/dist/runtime-v2/adapter/test-double-runtime-adapter.js.map +1 -1
- package/core/dist/runtime-v2/admission-gate.js.map +1 -1
- package/core/dist/runtime-v2/agent-spec.d.ts +10 -10
- package/core/dist/runtime-v2/agent-spec.d.ts.map +1 -1
- package/core/dist/runtime-v2/candidate-intake-service.d.ts.map +1 -1
- package/core/dist/runtime-v2/candidate-intake.d.ts +5 -5
- package/core/dist/runtime-v2/candidate-intake.d.ts.map +1 -1
- package/core/dist/runtime-v2/candidate-intake.js.map +1 -1
- package/core/dist/runtime-v2/config/__tests__/pd-config-agent-binding.test.js +29 -1
- package/core/dist/runtime-v2/config/__tests__/pd-config-agent-binding.test.js.map +1 -1
- package/core/dist/runtime-v2/config/__tests__/pd-config-context-injection.test.d.ts +2 -0
- package/core/dist/runtime-v2/config/__tests__/pd-config-context-injection.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/config/__tests__/pd-config-context-injection.test.js +308 -0
- package/core/dist/runtime-v2/config/__tests__/pd-config-context-injection.test.js.map +1 -0
- package/core/dist/runtime-v2/config/__tests__/pd-config-contract.test.js +5 -4
- package/core/dist/runtime-v2/config/__tests__/pd-config-contract.test.js.map +1 -1
- package/core/dist/runtime-v2/config/__tests__/pd-config-validation-edge-cases.test.js +44 -0
- package/core/dist/runtime-v2/config/__tests__/pd-config-validation-edge-cases.test.js.map +1 -1
- package/core/dist/runtime-v2/config/index.d.ts +1 -1
- package/core/dist/runtime-v2/config/index.d.ts.map +1 -1
- package/core/dist/runtime-v2/config/index.js.map +1 -1
- package/core/dist/runtime-v2/config/pd-config-agent-binding.d.ts +2 -0
- package/core/dist/runtime-v2/config/pd-config-agent-binding.d.ts.map +1 -1
- package/core/dist/runtime-v2/config/pd-config-agent-binding.js +16 -0
- package/core/dist/runtime-v2/config/pd-config-agent-binding.js.map +1 -1
- package/core/dist/runtime-v2/config/pd-config-defaults.d.ts +2 -2
- package/core/dist/runtime-v2/config/pd-config-defaults.d.ts.map +1 -1
- package/core/dist/runtime-v2/config/pd-config-defaults.js +5 -15
- package/core/dist/runtime-v2/config/pd-config-defaults.js.map +1 -1
- package/core/dist/runtime-v2/config/pd-config-effective.d.ts.map +1 -1
- package/core/dist/runtime-v2/config/pd-config-effective.js.map +1 -1
- package/core/dist/runtime-v2/config/pd-config-feature-flags.d.ts +1 -1
- package/core/dist/runtime-v2/config/pd-config-feature-flags.d.ts.map +1 -1
- package/core/dist/runtime-v2/config/pd-config-types.d.ts +25 -10
- package/core/dist/runtime-v2/config/pd-config-types.d.ts.map +1 -1
- package/core/dist/runtime-v2/config/pd-config-types.js.map +1 -1
- package/core/dist/runtime-v2/config/pd-config-validate.d.ts.map +1 -1
- package/core/dist/runtime-v2/config/pd-config-validate.js +9 -0
- package/core/dist/runtime-v2/config/pd-config-validate.js.map +1 -1
- package/core/dist/runtime-v2/context-payload.d.ts +8 -8
- package/core/dist/runtime-v2/core-principles/core-axiom-block.js.map +1 -1
- package/core/dist/runtime-v2/detection/__tests__/detection-funnel-policy.test.js.map +1 -1
- package/core/dist/runtime-v2/detection/detection-funnel-policy.d.ts.map +1 -1
- package/core/dist/runtime-v2/diagnostician/__tests__/diag-distiller-output.test.js +46 -0
- package/core/dist/runtime-v2/diagnostician/__tests__/diag-distiller-output.test.js.map +1 -1
- package/core/dist/runtime-v2/diagnostician/diag-distiller-output.d.ts +2 -0
- package/core/dist/runtime-v2/diagnostician/diag-distiller-output.d.ts.map +1 -1
- package/core/dist/runtime-v2/diagnostician/diag-distiller-output.js +29 -2
- package/core/dist/runtime-v2/diagnostician/diag-distiller-output.js.map +1 -1
- package/core/dist/runtime-v2/diagnostician/diag-rootcause-output.d.ts.map +1 -1
- package/core/dist/runtime-v2/diagnostician/distiller-prompt-builder.d.ts.map +1 -1
- package/core/dist/runtime-v2/diagnostician/distiller-prompt-builder.js.map +1 -1
- package/core/dist/runtime-v2/diagnostician/rootcause-prompt-builder.d.ts.map +1 -1
- package/core/dist/runtime-v2/diagnostician/rootcause-prompt-builder.js.map +1 -1
- package/core/dist/runtime-v2/diagnostician/router-prompt-builder.d.ts.map +1 -1
- package/core/dist/runtime-v2/diagnostician/router-prompt-builder.js.map +1 -1
- package/core/dist/runtime-v2/diagnostician-output.d.ts.map +1 -1
- package/core/dist/runtime-v2/diagnostician-output.js +7 -1
- package/core/dist/runtime-v2/diagnostician-output.js.map +1 -1
- package/core/dist/runtime-v2/error-categories.d.ts +2 -2
- package/core/dist/runtime-v2/error-categories.d.ts.map +1 -1
- package/core/dist/runtime-v2/error-categories.js +4 -1
- package/core/dist/runtime-v2/error-categories.js.map +1 -1
- package/core/dist/runtime-v2/evidence-triage/__tests__/admission-events.test.js.map +1 -1
- package/core/dist/runtime-v2/evidence-triage/__tests__/observation-resolver.test.js.map +1 -1
- package/core/dist/runtime-v2/evidence-triage/__tests__/triage-policy.test.js.map +1 -1
- package/core/dist/runtime-v2/evidence-triage/trigger-controller.js.map +1 -1
- package/core/dist/runtime-v2/feature-flags/__tests__/artifact-summary-redundancy-flag.test.d.ts +15 -0
- package/core/dist/runtime-v2/feature-flags/__tests__/artifact-summary-redundancy-flag.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/feature-flags/__tests__/artifact-summary-redundancy-flag.test.js +90 -0
- package/core/dist/runtime-v2/feature-flags/__tests__/artifact-summary-redundancy-flag.test.js.map +1 -0
- package/core/dist/runtime-v2/feature-flags/__tests__/context-manifest-budget-flag.test.d.ts +12 -0
- package/core/dist/runtime-v2/feature-flags/__tests__/context-manifest-budget-flag.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/feature-flags/__tests__/context-manifest-budget-flag.test.js +114 -0
- package/core/dist/runtime-v2/feature-flags/__tests__/context-manifest-budget-flag.test.js.map +1 -0
- package/core/dist/runtime-v2/feature-flags/__tests__/feature-flag-contract.test.js +66 -0
- package/core/dist/runtime-v2/feature-flags/__tests__/feature-flag-contract.test.js.map +1 -1
- package/core/dist/runtime-v2/feature-flags/__tests__/progressive-evaluator-flag.test.d.ts +8 -0
- package/core/dist/runtime-v2/feature-flags/__tests__/progressive-evaluator-flag.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/feature-flags/__tests__/progressive-evaluator-flag.test.js +56 -0
- package/core/dist/runtime-v2/feature-flags/__tests__/progressive-evaluator-flag.test.js.map +1 -0
- package/core/dist/runtime-v2/feature-flags/feature-flag-contract.d.ts +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 +56 -1
- package/core/dist/runtime-v2/feature-flags/feature-flag-contract.js.map +1 -1
- package/core/dist/runtime-v2/feature-flags/plugin-surface-registry.js.map +1 -1
- package/core/dist/runtime-v2/feature-flags/surface-guard-policy.js.map +1 -1
- package/core/dist/runtime-v2/feedback/__tests__/create-report-agent-draft.test.d.ts +2 -0
- package/core/dist/runtime-v2/feedback/__tests__/create-report-agent-draft.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/feedback/__tests__/create-report-agent-draft.test.js +221 -0
- package/core/dist/runtime-v2/feedback/__tests__/create-report-agent-draft.test.js.map +1 -0
- package/core/dist/runtime-v2/feedback/__tests__/mailto-url.test.d.ts +11 -0
- package/core/dist/runtime-v2/feedback/__tests__/mailto-url.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/feedback/__tests__/mailto-url.test.js +160 -0
- package/core/dist/runtime-v2/feedback/__tests__/mailto-url.test.js.map +1 -0
- package/core/dist/runtime-v2/feedback/__tests__/pending-agent-draft-store.test.d.ts +2 -0
- package/core/dist/runtime-v2/feedback/__tests__/pending-agent-draft-store.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/feedback/__tests__/pending-agent-draft-store.test.js +342 -0
- package/core/dist/runtime-v2/feedback/__tests__/pending-agent-draft-store.test.js.map +1 -0
- package/core/dist/runtime-v2/feedback/create-report.d.ts +7 -1
- package/core/dist/runtime-v2/feedback/create-report.d.ts.map +1 -1
- package/core/dist/runtime-v2/feedback/create-report.js +65 -7
- package/core/dist/runtime-v2/feedback/create-report.js.map +1 -1
- package/core/dist/runtime-v2/feedback/feedback-types.d.ts +18 -1
- package/core/dist/runtime-v2/feedback/feedback-types.d.ts.map +1 -1
- package/core/dist/runtime-v2/feedback/feedback-types.js +19 -12
- package/core/dist/runtime-v2/feedback/feedback-types.js.map +1 -1
- package/core/dist/runtime-v2/feedback/index.d.ts +3 -1
- package/core/dist/runtime-v2/feedback/index.d.ts.map +1 -1
- package/core/dist/runtime-v2/feedback/index.js +7 -1
- package/core/dist/runtime-v2/feedback/index.js.map +1 -1
- package/core/dist/runtime-v2/feedback/pending-agent-draft-store.d.ts +106 -0
- package/core/dist/runtime-v2/feedback/pending-agent-draft-store.d.ts.map +1 -0
- package/core/dist/runtime-v2/feedback/pending-agent-draft-store.js +220 -0
- package/core/dist/runtime-v2/feedback/pending-agent-draft-store.js.map +1 -0
- package/core/dist/runtime-v2/feedback/privacy-preview.d.ts +16 -0
- package/core/dist/runtime-v2/feedback/privacy-preview.d.ts.map +1 -1
- package/core/dist/runtime-v2/feedback/privacy-preview.js +54 -0
- package/core/dist/runtime-v2/feedback/privacy-preview.js.map +1 -1
- package/core/dist/runtime-v2/feedback/redact-sensitive.js.map +1 -1
- package/core/dist/runtime-v2/feedback/render-markdown.js.map +1 -1
- package/core/dist/runtime-v2/full-trace-contract.d.ts +8 -8
- package/core/dist/runtime-v2/full-trace-contract.d.ts.map +1 -1
- package/core/dist/runtime-v2/gfi/__tests__/gfi-kernel.test.js.map +1 -1
- package/core/dist/runtime-v2/gfi/__tests__/gfi-read-model.test.js.map +1 -1
- package/core/dist/runtime-v2/gfi/gfi-kernel.js.map +1 -1
- package/core/dist/runtime-v2/golden-trace.js.map +1 -1
- package/core/dist/runtime-v2/index.d.ts +11 -2
- package/core/dist/runtime-v2/index.d.ts.map +1 -1
- package/core/dist/runtime-v2/index.js +13 -1
- package/core/dist/runtime-v2/index.js.map +1 -1
- package/core/dist/runtime-v2/intent/__tests__/intent-patch-proposal.test.js.map +1 -1
- package/core/dist/runtime-v2/intent/intent-doc-reader-port.d.ts.map +1 -1
- package/core/dist/runtime-v2/internalization/__tests__/__fixtures__/intent-tension-cases.d.ts.map +1 -1
- package/core/dist/runtime-v2/internalization/__tests__/adversarial-case.test.js.map +1 -1
- package/core/dist/runtime-v2/internalization/__tests__/adversarial-feedback.test.js.map +1 -1
- package/core/dist/runtime-v2/internalization/__tests__/artifact-content-hash.property.test.d.ts +11 -0
- package/core/dist/runtime-v2/internalization/__tests__/artifact-content-hash.property.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/internalization/__tests__/artifact-content-hash.property.test.js +124 -0
- package/core/dist/runtime-v2/internalization/__tests__/artifact-content-hash.property.test.js.map +1 -0
- package/core/dist/runtime-v2/internalization/__tests__/artifact-summary.property.test.d.ts +12 -0
- package/core/dist/runtime-v2/internalization/__tests__/artifact-summary.property.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/internalization/__tests__/artifact-summary.property.test.js +253 -0
- package/core/dist/runtime-v2/internalization/__tests__/artifact-summary.property.test.js.map +1 -0
- package/core/dist/runtime-v2/internalization/__tests__/artificer-prompt-builder.test.js +175 -0
- package/core/dist/runtime-v2/internalization/__tests__/artificer-prompt-builder.test.js.map +1 -1
- package/core/dist/runtime-v2/internalization/__tests__/behavior-example-pack.test.js.map +1 -1
- package/core/dist/runtime-v2/internalization/__tests__/c2-live-runner-chain.test.js +32 -5
- package/core/dist/runtime-v2/internalization/__tests__/c2-live-runner-chain.test.js.map +1 -1
- package/core/dist/runtime-v2/internalization/__tests__/candidate-lineage.property.test.d.ts +15 -0
- package/core/dist/runtime-v2/internalization/__tests__/candidate-lineage.property.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/internalization/__tests__/candidate-lineage.property.test.js +301 -0
- package/core/dist/runtime-v2/internalization/__tests__/candidate-lineage.property.test.js.map +1 -0
- package/core/dist/runtime-v2/internalization/__tests__/context-manifest.property.test.d.ts +12 -0
- package/core/dist/runtime-v2/internalization/__tests__/context-manifest.property.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/internalization/__tests__/context-manifest.property.test.js +176 -0
- package/core/dist/runtime-v2/internalization/__tests__/context-manifest.property.test.js.map +1 -0
- package/core/dist/runtime-v2/internalization/__tests__/diag-chain-e2e.test.js.map +1 -1
- package/core/dist/runtime-v2/internalization/__tests__/diag-distiller-runner.test.js.map +1 -1
- package/core/dist/runtime-v2/internalization/__tests__/diag-rootcause-intent-tension.test.js.map +1 -1
- package/core/dist/runtime-v2/internalization/__tests__/diag-rootcause-runner.test.js.map +1 -1
- package/core/dist/runtime-v2/internalization/__tests__/diag-router-intent-tension.test.js.map +1 -1
- package/core/dist/runtime-v2/internalization/__tests__/diag-router-runner.test.js.map +1 -1
- package/core/dist/runtime-v2/internalization/__tests__/internalization-consumer-decision.test.js +27 -1
- package/core/dist/runtime-v2/internalization/__tests__/internalization-consumer-decision.test.js.map +1 -1
- package/core/dist/runtime-v2/internalization/__tests__/internalization-task-guards.test.js.map +1 -1
- package/core/dist/runtime-v2/internalization/__tests__/philosopher-runner-trust-boundary.test.js.map +1 -1
- package/core/dist/runtime-v2/internalization/__tests__/philosopher-toggle-characterization.test.d.ts +2 -0
- package/core/dist/runtime-v2/internalization/__tests__/philosopher-toggle-characterization.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/internalization/__tests__/philosopher-toggle-characterization.test.js +279 -0
- package/core/dist/runtime-v2/internalization/__tests__/philosopher-toggle-characterization.test.js.map +1 -0
- package/core/dist/runtime-v2/internalization/__tests__/progressive-disclosure-scope-regression.test.d.ts +22 -0
- package/core/dist/runtime-v2/internalization/__tests__/progressive-disclosure-scope-regression.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/internalization/__tests__/progressive-disclosure-scope-regression.test.js +92 -0
- package/core/dist/runtime-v2/internalization/__tests__/progressive-disclosure-scope-regression.test.js.map +1 -0
- package/core/dist/runtime-v2/internalization/__tests__/progressive-disclosure-spike-fixtures.d.ts +165 -0
- package/core/dist/runtime-v2/internalization/__tests__/progressive-disclosure-spike-fixtures.d.ts.map +1 -0
- package/core/dist/runtime-v2/internalization/__tests__/progressive-disclosure-spike-fixtures.js +659 -0
- package/core/dist/runtime-v2/internalization/__tests__/progressive-disclosure-spike-fixtures.js.map +1 -0
- package/core/dist/runtime-v2/internalization/__tests__/progressive-disclosure-spike-fixtures.test.d.ts +22 -0
- package/core/dist/runtime-v2/internalization/__tests__/progressive-disclosure-spike-fixtures.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/internalization/__tests__/progressive-disclosure-spike-fixtures.test.js +229 -0
- package/core/dist/runtime-v2/internalization/__tests__/progressive-disclosure-spike-fixtures.test.js.map +1 -0
- package/core/dist/runtime-v2/internalization/__tests__/progressive-disclosure-spike.test.d.ts +2 -0
- package/core/dist/runtime-v2/internalization/__tests__/progressive-disclosure-spike.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/internalization/__tests__/progressive-disclosure-spike.test.js +1039 -0
- package/core/dist/runtime-v2/internalization/__tests__/progressive-disclosure-spike.test.js.map +1 -0
- package/core/dist/runtime-v2/internalization/__tests__/progressive-evaluator-stage-isolation.property.test.d.ts +13 -0
- package/core/dist/runtime-v2/internalization/__tests__/progressive-evaluator-stage-isolation.property.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/internalization/__tests__/progressive-evaluator-stage-isolation.property.test.js +257 -0
- package/core/dist/runtime-v2/internalization/__tests__/progressive-evaluator-stage-isolation.property.test.js.map +1 -0
- package/core/dist/runtime-v2/internalization/__tests__/progressive-evaluator.property.test.d.ts +11 -0
- package/core/dist/runtime-v2/internalization/__tests__/progressive-evaluator.property.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/internalization/__tests__/progressive-evaluator.property.test.js +154 -0
- package/core/dist/runtime-v2/internalization/__tests__/progressive-evaluator.property.test.js.map +1 -0
- package/core/dist/runtime-v2/internalization/__tests__/prompt-budget-manager.property.test.d.ts +12 -0
- package/core/dist/runtime-v2/internalization/__tests__/prompt-budget-manager.property.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/internalization/__tests__/prompt-budget-manager.property.test.js +254 -0
- package/core/dist/runtime-v2/internalization/__tests__/prompt-budget-manager.property.test.js.map +1 -0
- package/core/dist/runtime-v2/internalization/__tests__/queue-actionability.test.js +14 -5
- package/core/dist/runtime-v2/internalization/__tests__/queue-actionability.test.js.map +1 -1
- package/core/dist/runtime-v2/internalization/__tests__/refiner-rulehost-gate.test.js.map +1 -1
- package/core/dist/runtime-v2/internalization/__tests__/refiner-sandbox-wrapper.test.js.map +1 -1
- package/core/dist/runtime-v2/internalization/__tests__/resolve-injection.property.test.d.ts +15 -0
- package/core/dist/runtime-v2/internalization/__tests__/resolve-injection.property.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/internalization/__tests__/resolve-injection.property.test.js +150 -0
- package/core/dist/runtime-v2/internalization/__tests__/resolve-injection.property.test.js.map +1 -0
- package/core/dist/runtime-v2/internalization/__tests__/rule-code-dialect.test.js +29 -0
- package/core/dist/runtime-v2/internalization/__tests__/rule-code-dialect.test.js.map +1 -1
- package/core/dist/runtime-v2/internalization/__tests__/rule-context-v2.test.js.map +1 -1
- package/core/dist/runtime-v2/internalization/__tests__/split-diagnostician-runner-retry.test.js +173 -0
- package/core/dist/runtime-v2/internalization/__tests__/split-diagnostician-runner-retry.test.js.map +1 -1
- package/core/dist/runtime-v2/internalization/__tests__/summary-chain-flow.property.test.d.ts +22 -0
- package/core/dist/runtime-v2/internalization/__tests__/summary-chain-flow.property.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/internalization/__tests__/summary-chain-flow.property.test.js +280 -0
- package/core/dist/runtime-v2/internalization/__tests__/summary-chain-flow.property.test.js.map +1 -0
- package/core/dist/runtime-v2/internalization/__tests__/summary-envelope-writer.property.test.d.ts +25 -0
- package/core/dist/runtime-v2/internalization/__tests__/summary-envelope-writer.property.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/internalization/__tests__/summary-envelope-writer.property.test.js +413 -0
- package/core/dist/runtime-v2/internalization/__tests__/summary-envelope-writer.property.test.js.map +1 -0
- package/core/dist/runtime-v2/internalization/__tests__/summary-freshness.property.test.d.ts +12 -0
- package/core/dist/runtime-v2/internalization/__tests__/summary-freshness.property.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/internalization/__tests__/summary-freshness.property.test.js +176 -0
- package/core/dist/runtime-v2/internalization/__tests__/summary-freshness.property.test.js.map +1 -0
- package/core/dist/runtime-v2/internalization/artifact-content-hash.d.ts +19 -0
- package/core/dist/runtime-v2/internalization/artifact-content-hash.d.ts.map +1 -0
- package/core/dist/runtime-v2/internalization/artifact-content-hash.js +116 -0
- package/core/dist/runtime-v2/internalization/artifact-content-hash.js.map +1 -0
- package/core/dist/runtime-v2/internalization/artifact-summary.d.ts +106 -0
- package/core/dist/runtime-v2/internalization/artifact-summary.d.ts.map +1 -0
- package/core/dist/runtime-v2/internalization/artifact-summary.js +331 -0
- package/core/dist/runtime-v2/internalization/artifact-summary.js.map +1 -0
- package/core/dist/runtime-v2/internalization/artificer-output.d.ts.map +1 -1
- package/core/dist/runtime-v2/internalization/artificer-prompt-builder.d.ts +42 -1
- package/core/dist/runtime-v2/internalization/artificer-prompt-builder.d.ts.map +1 -1
- package/core/dist/runtime-v2/internalization/artificer-prompt-builder.js +22 -3
- package/core/dist/runtime-v2/internalization/artificer-prompt-builder.js.map +1 -1
- package/core/dist/runtime-v2/internalization/artificer-runner.d.ts +22 -0
- package/core/dist/runtime-v2/internalization/artificer-runner.d.ts.map +1 -1
- package/core/dist/runtime-v2/internalization/artificer-runner.js +229 -3
- package/core/dist/runtime-v2/internalization/artificer-runner.js.map +1 -1
- package/core/dist/runtime-v2/internalization/attach-summary-envelope.d.ts +60 -0
- package/core/dist/runtime-v2/internalization/attach-summary-envelope.d.ts.map +1 -0
- package/core/dist/runtime-v2/internalization/attach-summary-envelope.js +126 -0
- package/core/dist/runtime-v2/internalization/attach-summary-envelope.js.map +1 -0
- package/core/dist/runtime-v2/internalization/candidate-lineage.d.ts +136 -0
- package/core/dist/runtime-v2/internalization/candidate-lineage.d.ts.map +1 -0
- package/core/dist/runtime-v2/internalization/candidate-lineage.js +230 -0
- package/core/dist/runtime-v2/internalization/candidate-lineage.js.map +1 -0
- package/core/dist/runtime-v2/internalization/context-manifest.d.ts +117 -0
- package/core/dist/runtime-v2/internalization/context-manifest.d.ts.map +1 -0
- package/core/dist/runtime-v2/internalization/context-manifest.js +156 -0
- package/core/dist/runtime-v2/internalization/context-manifest.js.map +1 -0
- package/core/dist/runtime-v2/internalization/context-manifests.d.ts +74 -0
- package/core/dist/runtime-v2/internalization/context-manifests.d.ts.map +1 -0
- package/core/dist/runtime-v2/internalization/context-manifests.js +192 -0
- package/core/dist/runtime-v2/internalization/context-manifests.js.map +1 -0
- package/core/dist/runtime-v2/internalization/correction-proposal.js.map +1 -1
- package/core/dist/runtime-v2/internalization/diag-distiller-runner.d.ts +1 -1
- package/core/dist/runtime-v2/internalization/diag-distiller-runner.d.ts.map +1 -1
- package/core/dist/runtime-v2/internalization/diag-distiller-runner.js +23 -2
- package/core/dist/runtime-v2/internalization/diag-distiller-runner.js.map +1 -1
- package/core/dist/runtime-v2/internalization/diag-rootcause-runner.d.ts.map +1 -1
- package/core/dist/runtime-v2/internalization/diag-rootcause-runner.js +9 -1
- package/core/dist/runtime-v2/internalization/diag-rootcause-runner.js.map +1 -1
- package/core/dist/runtime-v2/internalization/diag-router-runner.d.ts +7 -2
- package/core/dist/runtime-v2/internalization/diag-router-runner.d.ts.map +1 -1
- package/core/dist/runtime-v2/internalization/diag-router-runner.js +28 -1
- package/core/dist/runtime-v2/internalization/diag-router-runner.js.map +1 -1
- package/core/dist/runtime-v2/internalization/dimension-coverage-policy.d.ts +54 -0
- package/core/dist/runtime-v2/internalization/dimension-coverage-policy.d.ts.map +1 -0
- package/core/dist/runtime-v2/internalization/dimension-coverage-policy.js +70 -0
- package/core/dist/runtime-v2/internalization/dimension-coverage-policy.js.map +1 -0
- package/core/dist/runtime-v2/internalization/dreamer-output.d.ts.map +1 -1
- package/core/dist/runtime-v2/internalization/dreamer-prompt-builder.d.ts.map +1 -1
- package/core/dist/runtime-v2/internalization/dreamer-prompt-builder.js.map +1 -1
- package/core/dist/runtime-v2/internalization/dreamer-runner.d.ts +9 -1
- package/core/dist/runtime-v2/internalization/dreamer-runner.d.ts.map +1 -1
- package/core/dist/runtime-v2/internalization/dreamer-runner.js +41 -7
- package/core/dist/runtime-v2/internalization/dreamer-runner.js.map +1 -1
- package/core/dist/runtime-v2/internalization/evaluator-output.d.ts +27 -1
- package/core/dist/runtime-v2/internalization/evaluator-output.d.ts.map +1 -1
- package/core/dist/runtime-v2/internalization/evaluator-output.js +7 -1
- package/core/dist/runtime-v2/internalization/evaluator-output.js.map +1 -1
- package/core/dist/runtime-v2/internalization/evaluator-prompt-builder.d.ts +1 -1
- package/core/dist/runtime-v2/internalization/evaluator-prompt-builder.d.ts.map +1 -1
- package/core/dist/runtime-v2/internalization/evaluator-prompt-builder.js +12 -0
- package/core/dist/runtime-v2/internalization/evaluator-prompt-builder.js.map +1 -1
- package/core/dist/runtime-v2/internalization/evaluator-runner.d.ts +115 -1
- package/core/dist/runtime-v2/internalization/evaluator-runner.d.ts.map +1 -1
- package/core/dist/runtime-v2/internalization/evaluator-runner.js +384 -5
- package/core/dist/runtime-v2/internalization/evaluator-runner.js.map +1 -1
- package/core/dist/runtime-v2/internalization/index.d.ts +2 -0
- package/core/dist/runtime-v2/internalization/index.d.ts.map +1 -1
- package/core/dist/runtime-v2/internalization/index.js +2 -0
- package/core/dist/runtime-v2/internalization/index.js.map +1 -1
- package/core/dist/runtime-v2/internalization/internalization-consumer-decision.d.ts +24 -0
- package/core/dist/runtime-v2/internalization/internalization-consumer-decision.d.ts.map +1 -1
- package/core/dist/runtime-v2/internalization/internalization-consumer-decision.js +25 -2
- package/core/dist/runtime-v2/internalization/internalization-consumer-decision.js.map +1 -1
- package/core/dist/runtime-v2/internalization/internalization-orchestrator.d.ts +1 -1
- package/core/dist/runtime-v2/internalization/internalization-orchestrator.d.ts.map +1 -1
- package/core/dist/runtime-v2/internalization/internalization-orchestrator.js +44 -1
- package/core/dist/runtime-v2/internalization/internalization-orchestrator.js.map +1 -1
- package/core/dist/runtime-v2/internalization/internalization-task-guards.js.map +1 -1
- package/core/dist/runtime-v2/internalization/lifecycle-read-model.test.js.map +1 -1
- package/core/dist/runtime-v2/internalization/peer-runner-contracts.d.ts +3 -0
- package/core/dist/runtime-v2/internalization/peer-runner-contracts.d.ts.map +1 -1
- package/core/dist/runtime-v2/internalization/peer-runner-contracts.js.map +1 -1
- package/core/dist/runtime-v2/internalization/philosopher-output.d.ts.map +1 -1
- package/core/dist/runtime-v2/internalization/philosopher-prompt-builder.d.ts.map +1 -1
- package/core/dist/runtime-v2/internalization/philosopher-prompt-builder.js.map +1 -1
- package/core/dist/runtime-v2/internalization/philosopher-runner.d.ts.map +1 -1
- package/core/dist/runtime-v2/internalization/philosopher-runner.js +25 -1
- package/core/dist/runtime-v2/internalization/philosopher-runner.js.map +1 -1
- package/core/dist/runtime-v2/internalization/pi-artifact-store.d.ts.map +1 -1
- package/core/dist/runtime-v2/internalization/pitask-metadata.d.ts +35 -1
- package/core/dist/runtime-v2/internalization/pitask-metadata.d.ts.map +1 -1
- package/core/dist/runtime-v2/internalization/pitask-metadata.js +64 -0
- package/core/dist/runtime-v2/internalization/pitask-metadata.js.map +1 -1
- package/core/dist/runtime-v2/internalization/progressive-evaluator.d.ts +115 -0
- package/core/dist/runtime-v2/internalization/progressive-evaluator.d.ts.map +1 -0
- package/core/dist/runtime-v2/internalization/progressive-evaluator.js +248 -0
- package/core/dist/runtime-v2/internalization/progressive-evaluator.js.map +1 -0
- package/core/dist/runtime-v2/internalization/prompt-budget-manager.d.ts +90 -0
- package/core/dist/runtime-v2/internalization/prompt-budget-manager.d.ts.map +1 -0
- package/core/dist/runtime-v2/internalization/prompt-budget-manager.js +149 -0
- package/core/dist/runtime-v2/internalization/prompt-budget-manager.js.map +1 -0
- package/core/dist/runtime-v2/internalization/queue-actionability.d.ts +11 -0
- package/core/dist/runtime-v2/internalization/queue-actionability.d.ts.map +1 -1
- package/core/dist/runtime-v2/internalization/queue-actionability.js +12 -0
- package/core/dist/runtime-v2/internalization/queue-actionability.js.map +1 -1
- package/core/dist/runtime-v2/internalization/resolve-injection.d.ts +62 -0
- package/core/dist/runtime-v2/internalization/resolve-injection.d.ts.map +1 -0
- package/core/dist/runtime-v2/internalization/resolve-injection.js +78 -0
- package/core/dist/runtime-v2/internalization/resolve-injection.js.map +1 -0
- package/core/dist/runtime-v2/internalization/rollout-reviewer-output.d.ts +1 -1
- package/core/dist/runtime-v2/internalization/rollout-reviewer-output.d.ts.map +1 -1
- package/core/dist/runtime-v2/internalization/rollout-reviewer-prompt-builder.d.ts.map +1 -1
- package/core/dist/runtime-v2/internalization/rollout-reviewer-runner.d.ts.map +1 -1
- package/core/dist/runtime-v2/internalization/rollout-reviewer-runner.js.map +1 -1
- package/core/dist/runtime-v2/internalization/routing-policy.test.js.map +1 -1
- package/core/dist/runtime-v2/internalization/rule-code-validator.d.ts.map +1 -1
- package/core/dist/runtime-v2/internalization/rule-code-validator.js +7 -1
- package/core/dist/runtime-v2/internalization/rule-code-validator.js.map +1 -1
- package/core/dist/runtime-v2/internalization/rule-host-input-builder.js.map +1 -1
- package/core/dist/runtime-v2/internalization/scribe-output.d.ts.map +1 -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.map +1 -1
- package/core/dist/runtime-v2/internalization/scribe-runner.d.ts.map +1 -1
- package/core/dist/runtime-v2/internalization/scribe-runner.js +33 -1
- package/core/dist/runtime-v2/internalization/scribe-runner.js.map +1 -1
- package/core/dist/runtime-v2/internalization/split-diagnostician-runner.d.ts.map +1 -1
- package/core/dist/runtime-v2/internalization/split-diagnostician-runner.js +75 -13
- package/core/dist/runtime-v2/internalization/split-diagnostician-runner.js.map +1 -1
- package/core/dist/runtime-v2/internalization/summary-field-reader.d.ts +38 -0
- package/core/dist/runtime-v2/internalization/summary-field-reader.d.ts.map +1 -0
- package/core/dist/runtime-v2/internalization/summary-field-reader.js +108 -0
- package/core/dist/runtime-v2/internalization/summary-field-reader.js.map +1 -0
- package/core/dist/runtime-v2/internalization-chain-integrity-read-model.d.ts.map +1 -1
- package/core/dist/runtime-v2/internalization-integrity-remediation.d.ts.map +1 -1
- package/core/dist/runtime-v2/internalization-queue-read-model.d.ts.map +1 -1
- package/core/dist/runtime-v2/internalization-queue-read-model.js.map +1 -1
- package/core/dist/runtime-v2/language-directive.d.ts +1 -1
- package/core/dist/runtime-v2/language-directive.d.ts.map +1 -1
- package/core/dist/runtime-v2/language-directive.js.map +1 -1
- package/core/dist/runtime-v2/mainline-contract.js.map +1 -1
- package/core/dist/runtime-v2/observer/agent-scheduler.d.ts.map +1 -1
- package/core/dist/runtime-v2/observer/correction-observer.d.ts.map +1 -1
- package/core/dist/runtime-v2/observer/empathy-observer.d.ts.map +1 -1
- package/core/dist/runtime-v2/operator-health-read-model.d.ts.map +1 -1
- package/core/dist/runtime-v2/pain-chain-read-model.d.ts.map +1 -1
- package/core/dist/runtime-v2/pain-gate/__tests__/pain-diagnostic-gate-policy.test.js.map +1 -1
- package/core/dist/runtime-v2/pain-gate/pain-diagnostic-gate-policy.d.ts +1 -1
- package/core/dist/runtime-v2/pain-gate/pain-diagnostic-gate-policy.d.ts.map +1 -1
- package/core/dist/runtime-v2/pain-signal-bridge.d.ts.map +1 -1
- package/core/dist/runtime-v2/pain-signal-runtime-factory.d.ts +4 -0
- package/core/dist/runtime-v2/pain-signal-runtime-factory.d.ts.map +1 -1
- package/core/dist/runtime-v2/pain-signal-runtime-factory.js +3 -1
- package/core/dist/runtime-v2/pain-signal-runtime-factory.js.map +1 -1
- package/core/dist/runtime-v2/pain-to-principle-service.d.ts +2 -0
- package/core/dist/runtime-v2/pain-to-principle-service.d.ts.map +1 -1
- package/core/dist/runtime-v2/pain-to-principle-service.js +2 -0
- package/core/dist/runtime-v2/pain-to-principle-service.js.map +1 -1
- package/core/dist/runtime-v2/proven-channel-baseline.js +1 -1
- package/core/dist/runtime-v2/proven-channel-baseline.js.map +1 -1
- package/core/dist/runtime-v2/pruning-read-model.d.ts.map +1 -1
- package/core/dist/runtime-v2/recovery-sweep-service.js.map +1 -1
- package/core/dist/runtime-v2/runner/__tests__/base-peer-runner-agent-draft.test.d.ts +2 -0
- package/core/dist/runtime-v2/runner/__tests__/base-peer-runner-agent-draft.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/runner/__tests__/base-peer-runner-agent-draft.test.js +459 -0
- package/core/dist/runtime-v2/runner/__tests__/base-peer-runner-agent-draft.test.js.map +1 -0
- package/core/dist/runtime-v2/runner/__tests__/base-peer-runner-rate-limit-degradation.test.d.ts +2 -0
- package/core/dist/runtime-v2/runner/__tests__/base-peer-runner-rate-limit-degradation.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/runner/__tests__/base-peer-runner-rate-limit-degradation.test.js +320 -0
- package/core/dist/runtime-v2/runner/__tests__/base-peer-runner-rate-limit-degradation.test.js.map +1 -0
- package/core/dist/runtime-v2/runner/__tests__/default-validator.test.js +63 -0
- package/core/dist/runtime-v2/runner/__tests__/default-validator.test.js.map +1 -1
- package/core/dist/runtime-v2/runner/__tests__/diagnose.test.js.map +1 -1
- package/core/dist/runtime-v2/runner/base-peer-runner.d.ts +117 -4
- package/core/dist/runtime-v2/runner/base-peer-runner.d.ts.map +1 -1
- package/core/dist/runtime-v2/runner/base-peer-runner.js +403 -0
- package/core/dist/runtime-v2/runner/base-peer-runner.js.map +1 -1
- package/core/dist/runtime-v2/runner/default-validator.d.ts.map +1 -1
- package/core/dist/runtime-v2/runner/default-validator.js +31 -3
- package/core/dist/runtime-v2/runner/default-validator.js.map +1 -1
- package/core/dist/runtime-v2/runner/diagnostician-validator.d.ts.map +1 -1
- package/core/dist/runtime-v2/runner/peer-runner-types.d.ts +36 -0
- package/core/dist/runtime-v2/runner/peer-runner-types.d.ts.map +1 -1
- package/core/dist/runtime-v2/runtime-protocol.d.ts +1 -1
- package/core/dist/runtime-v2/schema-conformance-read-model.d.ts.map +1 -1
- package/core/dist/runtime-v2/signal-collector/types.d.ts.map +1 -1
- package/core/dist/runtime-v2/stalled-diagnostician-task-read-model.d.ts.map +1 -1
- package/core/dist/runtime-v2/store/artifact/memory-artifact-store.d.ts.map +1 -1
- package/core/dist/runtime-v2/store/artifact/memory-artifact-store.js.map +1 -1
- package/core/dist/runtime-v2/store/artifact/sqlite-artifact-store.d.ts.map +1 -1
- package/core/dist/runtime-v2/store/artifact/sqlite-artifact-store.js.map +1 -1
- package/core/dist/runtime-v2/store/artifact/sqlite-pi-artifact-store.d.ts.map +1 -1
- package/core/dist/runtime-v2/store/artifact/sqlite-pi-artifact-store.js.map +1 -1
- package/core/dist/runtime-v2/store/candidate/memory-candidate-store.d.ts.map +1 -1
- 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.map +1 -1
- package/core/dist/runtime-v2/store/commit/diagnostician-committer.d.ts +15 -0
- package/core/dist/runtime-v2/store/commit/diagnostician-committer.d.ts.map +1 -1
- package/core/dist/runtime-v2/store/commit/diagnostician-committer.js +32 -1
- package/core/dist/runtime-v2/store/commit/diagnostician-committer.js.map +1 -1
- package/core/dist/runtime-v2/store/commit/memory-commit-store.d.ts.map +1 -1
- package/core/dist/runtime-v2/store/commit/sqlite-commit-store.d.ts.map +1 -1
- package/core/dist/runtime-v2/store/commit/sqlite-commit-store.js.map +1 -1
- package/core/dist/runtime-v2/store/context/resilient-context-assembler.d.ts.map +1 -1
- package/core/dist/runtime-v2/store/context/resilient-context-assembler.js.map +1 -1
- package/core/dist/runtime-v2/store/context/sqlite-context-assembler.d.ts.map +1 -1
- package/core/dist/runtime-v2/store/context/sqlite-context-assembler.js.map +1 -1
- package/core/dist/runtime-v2/store/diagnostician-committer.test.js +36 -2
- package/core/dist/runtime-v2/store/diagnostician-committer.test.js.map +1 -1
- package/core/dist/runtime-v2/store/event-emitter.d.ts.map +1 -1
- package/core/dist/runtime-v2/store/history/resilient-history-query.d.ts.map +1 -1
- package/core/dist/runtime-v2/store/history/resilient-history-query.js.map +1 -1
- package/core/dist/runtime-v2/store/history/sqlite-history-query.d.ts.map +1 -1
- package/core/dist/runtime-v2/store/history/sqlite-history-query.js.map +1 -1
- package/core/dist/runtime-v2/store/intent/__tests__/sqlite-intent-decision-store.test.js.map +1 -1
- package/core/dist/runtime-v2/store/intent/sqlite-intent-decision-store.d.ts.map +1 -1
- package/core/dist/runtime-v2/store/intent/sqlite-intent-decision-store.js.map +1 -1
- package/core/dist/runtime-v2/store/intent/sqlite-intent-doc-version-store.d.ts.map +1 -1
- package/core/dist/runtime-v2/store/intent/sqlite-intent-doc-version-store.js.map +1 -1
- package/core/dist/runtime-v2/store/lifecycle/lease-manager.d.ts.map +1 -1
- package/core/dist/runtime-v2/store/lifecycle/lease-manager.js.map +1 -1
- package/core/dist/runtime-v2/store/lifecycle/lease-manager.test.js.map +1 -1
- package/core/dist/runtime-v2/store/lifecycle/recovery-sweep.d.ts.map +1 -1
- package/core/dist/runtime-v2/store/lifecycle/recovery-sweep.js.map +1 -1
- package/core/dist/runtime-v2/store/lifecycle/recovery-sweep.test.js.map +1 -1
- package/core/dist/runtime-v2/store/lifecycle/retry-policy.d.ts.map +1 -1
- package/core/dist/runtime-v2/store/lifecycle/retry-policy.js.map +1 -1
- package/core/dist/runtime-v2/store/pain/__tests__/sqlite-dead-letter-store.test.d.ts +2 -0
- package/core/dist/runtime-v2/store/pain/__tests__/sqlite-dead-letter-store.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/store/pain/__tests__/sqlite-dead-letter-store.test.js +225 -0
- package/core/dist/runtime-v2/store/pain/__tests__/sqlite-dead-letter-store.test.js.map +1 -0
- package/core/dist/runtime-v2/store/pain/index.d.ts +3 -0
- package/core/dist/runtime-v2/store/pain/index.d.ts.map +1 -0
- package/core/dist/runtime-v2/store/pain/index.js +2 -0
- package/core/dist/runtime-v2/store/pain/index.js.map +1 -0
- package/core/dist/runtime-v2/store/pain/sqlite-dead-letter-store.d.ts +70 -0
- package/core/dist/runtime-v2/store/pain/sqlite-dead-letter-store.d.ts.map +1 -0
- package/core/dist/runtime-v2/store/pain/sqlite-dead-letter-store.js +154 -0
- package/core/dist/runtime-v2/store/pain/sqlite-dead-letter-store.js.map +1 -0
- package/core/dist/runtime-v2/store/run/memory-run-store.d.ts.map +1 -1
- package/core/dist/runtime-v2/store/run/sqlite-run-store.d.ts.map +1 -1
- package/core/dist/runtime-v2/store/run/sqlite-run-store.js.map +1 -1
- package/core/dist/runtime-v2/store/runtime-state-manager.d.ts.map +1 -1
- package/core/dist/runtime-v2/store/runtime-state-manager.integration.test.js.map +1 -1
- 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 +46 -1
- package/core/dist/runtime-v2/store/sqlite-connection.js.map +1 -1
- package/core/dist/runtime-v2/store/sqlite-task-store.test.js.map +1 -1
- package/core/dist/runtime-v2/store/task/__tests__/sqlite-task-store.failed-tasks.test.d.ts +2 -0
- package/core/dist/runtime-v2/store/task/__tests__/sqlite-task-store.failed-tasks.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/store/task/__tests__/sqlite-task-store.failed-tasks.test.js +442 -0
- package/core/dist/runtime-v2/store/task/__tests__/sqlite-task-store.failed-tasks.test.js.map +1 -0
- package/core/dist/runtime-v2/store/task/index.d.ts +1 -0
- package/core/dist/runtime-v2/store/task/index.d.ts.map +1 -1
- package/core/dist/runtime-v2/store/task/index.js.map +1 -1
- package/core/dist/runtime-v2/store/task/memory-task-store.d.ts.map +1 -1
- package/core/dist/runtime-v2/store/task/sqlite-task-store.d.ts +45 -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 +205 -0
- package/core/dist/runtime-v2/store/task/sqlite-task-store.js.map +1 -1
- package/core/dist/runtime-v2/store/task/task-types.d.ts +60 -0
- package/core/dist/runtime-v2/store/task/task-types.d.ts.map +1 -0
- package/core/dist/runtime-v2/store/task/task-types.js +2 -0
- package/core/dist/runtime-v2/store/task/task-types.js.map +1 -0
- package/core/dist/runtime-v2/store/task-migration.d.ts.map +1 -1
- package/core/dist/runtime-v2/store/task-migration.js.map +1 -1
- package/core/dist/runtime-v2/store/trajectory/source-trace-locator.test.js.map +1 -1
- package/core/dist/runtime-v2/store/trajectory/sqlite-source-trace-locator.d.ts.map +1 -1
- package/core/dist/runtime-v2/store/trajectory/sqlite-source-trace-locator.js.map +1 -1
- package/core/dist/runtime-v2/store/trajectory/sqlite-trajectory-locator.d.ts.map +1 -1
- package/core/dist/runtime-v2/store/trajectory/sqlite-trajectory-locator.js.map +1 -1
- package/core/dist/runtime-v2/store/workspace-leak-guard.d.ts +23 -0
- package/core/dist/runtime-v2/store/workspace-leak-guard.d.ts.map +1 -0
- package/core/dist/runtime-v2/store/workspace-leak-guard.js +111 -0
- package/core/dist/runtime-v2/store/workspace-leak-guard.js.map +1 -0
- package/core/dist/runtime-v2/story-a-demo.d.ts +1 -1
- package/core/dist/runtime-v2/story-a-demo.d.ts.map +1 -1
- package/core/dist/runtime-v2/story-a-demo.js +8 -10
- package/core/dist/runtime-v2/story-a-demo.js.map +1 -1
- package/core/dist/runtime-v2/task-status.d.ts +2 -2
- package/core/dist/runtime-v2/tools/__tests__/agent-tool-contract.test.js.map +1 -1
- package/core/dist/runtime-v2/tools/__tests__/artificer-l2-tool-contract.test.js.map +1 -1
- package/core/dist/runtime-v2/tools/__tests__/dreamer-output-typebox.test.js.map +1 -1
- package/core/dist/runtime-v2/trace-refiner.d.ts +2 -2
- package/core/dist/runtime-v2/trace-refiner.d.ts.map +1 -1
- package/core/dist/runtime-v2/types/evidence-chain-contract.js.map +1 -1
- package/core/dist/trajectory-store.js.map +1 -1
- package/core/dist/trajectory-store.test.d.ts +2 -0
- package/core/dist/trajectory-store.test.d.ts.map +1 -0
- package/core/dist/trajectory-store.test.js +251 -0
- package/core/dist/trajectory-store.test.js.map +1 -0
- package/core/dist/workflow-funnel-loader.d.ts.map +1 -1
- package/core/package.json +13 -7
- package/dist/i18n.d.ts.map +1 -1
- package/dist/i18n.js +56 -6
- package/dist/i18n.js.map +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +186 -27
- package/dist/index.js.map +1 -1
- package/dist/installer.d.ts +11 -2
- package/dist/installer.d.ts.map +1 -1
- package/dist/installer.js +296 -145
- package/dist/installer.js.map +1 -1
- package/dist/installers/codex-host-installer.d.ts +15 -0
- package/dist/installers/codex-host-installer.d.ts.map +1 -0
- package/dist/installers/codex-host-installer.js +445 -0
- package/dist/installers/codex-host-installer.js.map +1 -0
- package/dist/installers/index.d.ts +40 -0
- package/dist/installers/index.d.ts.map +1 -0
- package/dist/installers/index.js +35 -0
- package/dist/installers/index.js.map +1 -0
- package/dist/installers/openclaw-host-installer.d.ts +18 -0
- package/dist/installers/openclaw-host-installer.d.ts.map +1 -0
- package/dist/installers/openclaw-host-installer.js +404 -0
- package/dist/installers/openclaw-host-installer.js.map +1 -0
- package/dist/mvp-config.d.ts +23 -4
- package/dist/mvp-config.d.ts.map +1 -1
- package/dist/mvp-config.js +15 -7
- package/dist/mvp-config.js.map +1 -1
- package/dist/prompts.d.ts +17 -1
- package/dist/prompts.d.ts.map +1 -1
- package/dist/prompts.js +114 -0
- package/dist/prompts.js.map +1 -1
- package/dist/uninstaller.d.ts +18 -1
- package/dist/uninstaller.d.ts.map +1 -1
- package/dist/uninstaller.js +60 -75
- package/dist/uninstaller.js.map +1 -1
- package/dist/updater.d.ts +0 -6
- package/dist/updater.d.ts.map +1 -1
- package/dist/updater.js +0 -11
- package/dist/updater.js.map +1 -1
- package/dist/utils/env.d.ts +14 -0
- package/dist/utils/env.d.ts.map +1 -1
- package/dist/utils/env.js +35 -2
- package/dist/utils/env.js.map +1 -1
- package/dist/utils/logger.d.ts.map +1 -1
- package/dist/utils/logger.js +1 -1
- package/dist/utils/logger.js.map +1 -1
- package/package.json +7 -7
- package/pd-cli/dist/commands/__tests__/pain-retry-maxTokens-flag.test.d.ts +2 -0
- package/pd-cli/dist/commands/__tests__/pain-retry-maxTokens-flag.test.d.ts.map +1 -0
- package/pd-cli/dist/commands/__tests__/pain-retry-maxTokens-flag.test.js +60 -0
- package/pd-cli/dist/commands/__tests__/pain-retry-maxTokens-flag.test.js.map +1 -0
- package/pd-cli/dist/commands/__tests__/rulecode-flag-wiring.test.js +11 -4
- package/pd-cli/dist/commands/__tests__/rulecode-flag-wiring.test.js.map +1 -1
- package/pd-cli/dist/commands/__tests__/runtime-probe-config.test.js +2 -2
- package/pd-cli/dist/commands/__tests__/runtime-probe-config.test.js.map +1 -1
- package/pd-cli/dist/commands/admission-gate.d.ts +24 -0
- package/pd-cli/dist/commands/admission-gate.d.ts.map +1 -0
- package/pd-cli/dist/commands/admission-gate.js +29 -0
- package/pd-cli/dist/commands/admission-gate.js.map +1 -0
- package/pd-cli/dist/commands/candidate.d.ts.map +1 -1
- package/pd-cli/dist/commands/candidate.js +2 -21
- package/pd-cli/dist/commands/candidate.js.map +1 -1
- package/pd-cli/dist/commands/console.d.ts.map +1 -1
- package/pd-cli/dist/commands/console.js +40 -0
- package/pd-cli/dist/commands/console.js.map +1 -1
- package/pd-cli/dist/commands/demo-story-a.js.map +1 -1
- package/pd-cli/dist/commands/diagnose.d.ts.map +1 -1
- package/pd-cli/dist/commands/diagnose.js +88 -9
- package/pd-cli/dist/commands/diagnose.js.map +1 -1
- package/pd-cli/dist/commands/errors-list.d.ts +25 -0
- package/pd-cli/dist/commands/errors-list.d.ts.map +1 -0
- package/pd-cli/dist/commands/errors-list.js +368 -0
- package/pd-cli/dist/commands/errors-list.js.map +1 -0
- package/pd-cli/dist/commands/health.js.map +1 -1
- package/pd-cli/dist/commands/pain-evidence.d.ts +6 -0
- package/pd-cli/dist/commands/pain-evidence.d.ts.map +1 -1
- package/pd-cli/dist/commands/pain-evidence.js +6 -0
- package/pd-cli/dist/commands/pain-evidence.js.map +1 -1
- package/pd-cli/dist/commands/pain-retry.d.ts +1 -0
- package/pd-cli/dist/commands/pain-retry.d.ts.map +1 -1
- package/pd-cli/dist/commands/pain-retry.js +288 -19
- package/pd-cli/dist/commands/pain-retry.js.map +1 -1
- package/pd-cli/dist/commands/proven-channel-baseline.js.map +1 -1
- package/pd-cli/dist/commands/runtime-canary.d.ts.map +1 -1
- package/pd-cli/dist/commands/runtime-canary.js +28 -5
- package/pd-cli/dist/commands/runtime-canary.js.map +1 -1
- package/pd-cli/dist/commands/runtime-internalization-context-trace.d.ts +25 -0
- package/pd-cli/dist/commands/runtime-internalization-context-trace.d.ts.map +1 -0
- package/pd-cli/dist/commands/runtime-internalization-context-trace.js +374 -0
- package/pd-cli/dist/commands/runtime-internalization-context-trace.js.map +1 -0
- package/pd-cli/dist/commands/runtime-internalization-run-once.d.ts.map +1 -1
- package/pd-cli/dist/commands/runtime-internalization-run-once.js +20 -5
- package/pd-cli/dist/commands/runtime-internalization-run-once.js.map +1 -1
- package/pd-cli/dist/commands/runtime-uat.guard.test.js +13 -15
- package/pd-cli/dist/commands/runtime-uat.guard.test.js.map +1 -1
- package/pd-cli/dist/commands/runtime-uat.js.map +1 -1
- package/pd-cli/dist/index.js +21 -3
- package/pd-cli/dist/index.js.map +1 -1
- package/pd-cli/dist/services/__tests__/evaluator-runner-deps.test.d.ts +2 -0
- package/pd-cli/dist/services/__tests__/evaluator-runner-deps.test.d.ts.map +1 -0
- package/pd-cli/dist/services/__tests__/evaluator-runner-deps.test.js +304 -0
- package/pd-cli/dist/services/__tests__/evaluator-runner-deps.test.js.map +1 -0
- package/pd-cli/dist/services/__tests__/rulehost-readiness.test.js.map +1 -1
- package/pd-cli/dist/services/__tests__/runtime-adapter-resolver.test.js.map +1 -1
- package/pd-cli/dist/services/config-doctor.js.map +1 -1
- package/pd-cli/dist/services/pain-flood-simulation-runner.d.ts.map +1 -1
- package/pd-cli/dist/services/pain-flood-simulation-runner.js +9 -0
- package/pd-cli/dist/services/pain-flood-simulation-runner.js.map +1 -1
- package/pd-cli/dist/services/proven-channel-baseline-runner.d.ts.map +1 -1
- package/pd-cli/dist/services/proven-channel-baseline-runner.js +10 -2
- package/pd-cli/dist/services/proven-channel-baseline-runner.js.map +1 -1
- package/pd-cli/dist/services/quality-scorecard/data-extractor.js.map +1 -1
- package/pd-cli/dist/services/resolve-runtime-from-pd-config.js.map +1 -1
- package/pd-cli/dist/services/rulehost-pipeline-runner.d.ts +73 -1
- package/pd-cli/dist/services/rulehost-pipeline-runner.d.ts.map +1 -1
- package/pd-cli/dist/services/rulehost-pipeline-runner.js +107 -6
- package/pd-cli/dist/services/rulehost-pipeline-runner.js.map +1 -1
- package/pd-cli/dist/services/rulehost-readiness.js.map +1 -1
- package/pd-cli/dist/services/runtime-adapter-resolver.d.ts +1 -0
- package/pd-cli/dist/services/runtime-adapter-resolver.d.ts.map +1 -1
- package/pd-cli/dist/services/runtime-adapter-resolver.js +2 -0
- package/pd-cli/dist/services/runtime-adapter-resolver.js.map +1 -1
- package/pd-cli/dist/services/synthetic-baseline-runner.d.ts.map +1 -1
- package/pd-cli/dist/services/synthetic-baseline-runner.js +11 -0
- package/pd-cli/dist/services/synthetic-baseline-runner.js.map +1 -1
- package/pd-cli/dist/utils/production-workspace-guard.d.ts +4 -4
- package/pd-cli/dist/utils/production-workspace-guard.d.ts.map +1 -1
- package/pd-cli/dist/utils/production-workspace-guard.js +19 -16
- package/pd-cli/dist/utils/production-workspace-guard.js.map +1 -1
- package/pd-cli/dist/utils/production-workspace-guard.test.js +54 -19
- package/pd-cli/dist/utils/production-workspace-guard.test.js.map +1 -1
- package/pd-cli/package.json +4 -4
- package/plugin/dist/assets/logo.svg +11 -0
- package/plugin/dist/bundle.js +3152 -0
- package/plugin/dist/config/defaults/runtime.d.ts +1 -1
- package/plugin/dist/constants/tools.d.ts +4 -4
- package/plugin/dist/core/config-health.d.ts +1 -11
- package/plugin/dist/core/dictionary.d.ts +1 -1
- package/plugin/dist/core/path-resolver.d.ts +3 -3
- package/plugin/dist/core/signal-collector-host.d.ts +9 -1
- package/plugin/dist/core/system-logger.d.ts +16 -0
- package/plugin/dist/index.d.ts +1 -1
- package/plugin/dist/index.js +1 -808
- package/plugin/dist/openclaw-sdk.d.ts +49 -8
- package/plugin/dist/openclaw.plugin.json +65 -0
- package/plugin/dist/service/evolution-worker.d.ts +27 -1
- package/plugin/dist/templates/langs/en/core/AGENTS.md +205 -0
- package/plugin/dist/templates/langs/en/core/BOOT.md +60 -0
- package/plugin/dist/templates/langs/en/core/BOOTSTRAP.md +259 -0
- package/plugin/dist/templates/langs/en/core/HEARTBEAT.md +74 -0
- package/plugin/dist/templates/langs/en/core/IDENTITY.md +8 -0
- package/plugin/dist/templates/langs/en/core/PRINCIPLES.md +10 -0
- package/plugin/dist/templates/langs/en/core/SOUL.md +46 -0
- package/plugin/dist/templates/langs/en/core/TOOLS.md +15 -0
- package/plugin/dist/templates/langs/en/core/USER.md +10 -0
- package/plugin/dist/templates/langs/en/pain/00_seed_samples.md +23 -0
- package/plugin/dist/templates/langs/en/pain_dictionary.json +22 -0
- package/plugin/dist/templates/langs/en/principles/THINKING_OS.md +77 -0
- package/plugin/dist/templates/langs/en/skills/admin/SKILL.md +39 -0
- package/plugin/dist/templates/langs/en/skills/ai-sprint-orchestration/runtime/.gitignore +2 -0
- package/plugin/dist/templates/langs/en/skills/bootstrap-tools/SKILL.md +53 -0
- package/plugin/dist/templates/langs/en/skills/deductive-audit/SKILL.md +36 -0
- package/plugin/dist/templates/langs/en/skills/evolution-framework-update/SKILL.md +31 -0
- package/plugin/dist/templates/langs/en/skills/evolve-task/SKILL.md +83 -0
- package/plugin/dist/templates/langs/en/skills/feedback/SKILL.md +51 -0
- package/plugin/dist/templates/langs/en/skills/init-strategy/SKILL.md +54 -0
- package/plugin/dist/templates/langs/en/skills/inject-rule/SKILL.md +19 -0
- package/plugin/dist/templates/langs/en/skills/pd-auditor/SKILL.md +61 -0
- package/plugin/dist/templates/langs/en/skills/pd-cli-operator/SKILL.md +76 -0
- package/plugin/dist/templates/langs/en/skills/pd-explorer/SKILL.md +65 -0
- package/plugin/dist/templates/langs/en/skills/pd-implementer/SKILL.md +68 -0
- package/plugin/dist/templates/langs/en/skills/pd-mentor/SKILL.md +213 -0
- package/plugin/dist/templates/langs/en/skills/pd-pain-signal/SKILL.md +30 -0
- package/plugin/dist/templates/langs/en/skills/pd-planner/SKILL.md +65 -0
- package/plugin/dist/templates/langs/en/skills/pd-runtime-v2/SKILL.md +71 -0
- package/plugin/dist/templates/langs/en/skills/profile/SKILL.md +24 -0
- package/plugin/dist/templates/langs/en/skills/reflection/SKILL.md +40 -0
- package/plugin/dist/templates/langs/en/skills/reflection-log/SKILL.md +37 -0
- package/plugin/dist/templates/langs/en/skills/report/SKILL.md +13 -0
- package/plugin/dist/templates/langs/en/skills/root-cause/SKILL.md +33 -0
- package/plugin/dist/templates/langs/en/skills/triage/SKILL.md +29 -0
- package/plugin/dist/templates/langs/en/skills/watch-evolution/SKILL.md +33 -0
- package/plugin/dist/templates/langs/zh/core/AGENTS.md +197 -0
- package/plugin/dist/templates/langs/zh/core/BOOT.md +60 -0
- package/plugin/dist/templates/langs/zh/core/BOOTSTRAP.md +260 -0
- package/plugin/dist/templates/langs/zh/core/HEARTBEAT.md +98 -0
- package/plugin/dist/templates/langs/zh/core/IDENTITY.md +8 -0
- package/plugin/dist/templates/langs/zh/core/PRINCIPLES.md +7 -0
- package/plugin/dist/templates/langs/zh/core/SOUL.md +46 -0
- package/plugin/dist/templates/langs/zh/core/TOOLS.md +15 -0
- package/plugin/dist/templates/langs/zh/core/USER.md +10 -0
- package/plugin/dist/templates/langs/zh/pain/00_seed_samples.md +24 -0
- package/plugin/dist/templates/langs/zh/pain_dictionary.json +18 -0
- package/plugin/dist/templates/langs/zh/principles/THINKING_OS.md +77 -0
- package/plugin/dist/templates/langs/zh/skills/admin/SKILL.md +41 -0
- package/plugin/dist/templates/langs/zh/skills/bootstrap-tools/SKILL.md +52 -0
- package/plugin/dist/templates/langs/zh/skills/deductive-audit/SKILL.md +36 -0
- package/plugin/dist/templates/langs/zh/skills/evolution-framework-update/SKILL.md +31 -0
- package/plugin/dist/templates/langs/zh/skills/evolve-task/SKILL.md +83 -0
- package/plugin/dist/templates/langs/zh/skills/feedback/SKILL.md +53 -0
- package/plugin/dist/templates/langs/zh/skills/init-strategy/SKILL.md +54 -0
- package/plugin/dist/templates/langs/zh/skills/inject-rule/SKILL.md +19 -0
- package/plugin/dist/templates/langs/zh/skills/pd-auditor/SKILL.md +61 -0
- package/plugin/dist/templates/langs/zh/skills/pd-cli-operator/SKILL.md +76 -0
- package/plugin/dist/templates/langs/zh/skills/pd-explorer/SKILL.md +65 -0
- package/plugin/dist/templates/langs/zh/skills/pd-implementer/SKILL.md +68 -0
- package/plugin/dist/templates/langs/zh/skills/pd-mentor/SKILL.md +213 -0
- package/plugin/dist/templates/langs/zh/skills/pd-pain-signal/SKILL.md +30 -0
- package/plugin/dist/templates/langs/zh/skills/pd-planner/SKILL.md +65 -0
- package/plugin/dist/templates/langs/zh/skills/pd-runtime-v2/SKILL.md +71 -0
- package/plugin/dist/templates/langs/zh/skills/profile/SKILL.md +24 -0
- package/plugin/dist/templates/langs/zh/skills/reflection/SKILL.md +40 -0
- package/plugin/dist/templates/langs/zh/skills/reflection-log/SKILL.md +37 -0
- package/plugin/dist/templates/langs/zh/skills/report/SKILL.md +13 -0
- package/plugin/dist/templates/langs/zh/skills/root-cause/SKILL.md +33 -0
- package/plugin/dist/templates/langs/zh/skills/triage/SKILL.md +29 -0
- package/plugin/dist/templates/langs/zh/skills/watch-evolution/SKILL.md +33 -0
- package/plugin/dist/templates/pain_dictionary.json +36 -0
- package/plugin/dist/templates/pain_settings.json +103 -0
- package/plugin/dist/templates/workspace/.principles/DECISION_POLICY.json +44 -0
- package/plugin/dist/templates/workspace/.principles/PRINCIPLES.md +20 -0
- package/plugin/dist/templates/workspace/.principles/PROFILE.json +54 -0
- package/plugin/dist/templates/workspace/.principles/PROFILE.schema.json +56 -0
- package/plugin/dist/templates/workspace/.principles/THINKING_OS.md +65 -0
- package/plugin/dist/templates/workspace/.principles/THINKING_OS_ARCHIVE.md +7 -0
- package/plugin/dist/templates/workspace/.principles/THINKING_OS_CANDIDATES.md +9 -0
- package/plugin/dist/templates/workspace/.principles/models/_INDEX.md +27 -0
- package/plugin/dist/templates/workspace/.principles/models/first_principles.md +62 -0
- package/plugin/dist/templates/workspace/.principles/models/marketing_4p.md +52 -0
- package/plugin/dist/templates/workspace/.principles/models/porter_five.md +63 -0
- package/plugin/dist/templates/workspace/.principles/models/swot.md +60 -0
- package/plugin/dist/templates/workspace/.principles/models/user_story_map.md +63 -0
- package/plugin/dist/templates/workspace/.state/WORKBOARD.json +4 -0
- package/plugin/dist/templates/workspace/AUDIT.md +15 -0
- package/plugin/dist/templates/workspace/okr/CURRENT_FOCUS.md +57 -0
- package/plugin/dist/templates/workspace/okr/RECOVERY_PROTOCOL.md +56 -0
- package/plugin/dist/templates/workspace/okr/TASK_CHANGES.jsonl +6 -0
- package/plugin/dist/templates/workspace/okr/WEEK_TASKS.json +6 -0
- package/plugin/openclaw.plugin.json +5 -5
- package/plugin/package.json +22 -10
- package/plugin/scripts/bootstrap-rules.mjs +5 -1
- package/plugin/scripts/postinstall.cjs +177 -0
- package/plugin/scripts/sync-plugin.mjs +12 -1
- package/plugin/dist/commands/archive-impl.js +0 -105
- package/plugin/dist/commands/capabilities.js +0 -77
- package/plugin/dist/commands/context.js +0 -299
- package/plugin/dist/commands/disable-impl.js +0 -118
- package/plugin/dist/commands/evolution-status.js +0 -185
- package/plugin/dist/commands/export.js +0 -53
- package/plugin/dist/commands/focus.js +0 -451
- package/plugin/dist/commands/pain.js +0 -336
- package/plugin/dist/commands/principle-rollback.js +0 -26
- package/plugin/dist/commands/promote-impl.js +0 -194
- package/plugin/dist/commands/rollback-impl.js +0 -180
- package/plugin/dist/commands/rollback.js +0 -126
- package/plugin/dist/commands/samples.js +0 -83
- package/plugin/dist/commands/strategy.js +0 -16
- package/plugin/dist/commands/thinking-os.js +0 -186
- package/plugin/dist/commands/workflow-debug.js +0 -132
- package/plugin/dist/config/defaults/runtime.js +0 -74
- package/plugin/dist/config/errors.js +0 -107
- package/plugin/dist/config/index.js +0 -7
- package/plugin/dist/constants/tools.js +0 -53
- package/plugin/dist/core/__tests__/focus-history.test.js +0 -160
- package/plugin/dist/core/behavior-example-pack-assembler.js +0 -207
- package/plugin/dist/core/bootstrap-rules.js +0 -187
- package/plugin/dist/core/code-implementation-storage.js +0 -139
- package/plugin/dist/core/config-health.js +0 -60
- package/plugin/dist/core/config-service.js +0 -26
- package/plugin/dist/core/config.js +0 -191
- package/plugin/dist/core/control-ui-db.js +0 -333
- package/plugin/dist/core/correction-cue-learner.js +0 -186
- package/plugin/dist/core/correction-types.js +0 -1
- package/plugin/dist/core/detection-funnel.js +0 -56
- package/plugin/dist/core/detection-service.js +0 -28
- package/plugin/dist/core/dictionary-service.js +0 -26
- package/plugin/dist/core/dictionary.js +0 -148
- package/plugin/dist/core/empathy-keyword-matcher.js +0 -40
- package/plugin/dist/core/empathy-types.js +0 -1
- package/plugin/dist/core/event-log.js +0 -706
- package/plugin/dist/core/evolution-engine.js +0 -460
- package/plugin/dist/core/evolution-logger.js +0 -261
- package/plugin/dist/core/evolution-reducer.js +0 -720
- package/plugin/dist/core/evolution-types.js +0 -11
- package/plugin/dist/core/file-store.js +0 -46
- package/plugin/dist/core/focus-history.js +0 -574
- package/plugin/dist/core/hygiene/tracker.js +0 -110
- package/plugin/dist/core/init.js +0 -254
- package/plugin/dist/core/intent-doc-reader-adapter.js +0 -76
- package/plugin/dist/core/intent-doc-reader.js +0 -210
- package/plugin/dist/core/migration.js +0 -86
- package/plugin/dist/core/pain-diagnostic-gate.js +0 -69
- package/plugin/dist/core/pain.js +0 -56
- package/plugin/dist/core/path-resolver.js +0 -358
- package/plugin/dist/core/paths.js +0 -77
- package/plugin/dist/core/pd-config-loader.js +0 -307
- package/plugin/dist/core/pd-task-reconciler.js +0 -262
- package/plugin/dist/core/pd-task-service.js +0 -32
- package/plugin/dist/core/pd-task-store.js +0 -62
- package/plugin/dist/core/pd-task-types.js +0 -2
- package/plugin/dist/core/principle-compiler/__tests__/compiler-replay-gate.test.js +0 -132
- package/plugin/dist/core/principle-compiler/code-validator.js +0 -86
- package/plugin/dist/core/principle-compiler/compiler.js +0 -289
- package/plugin/dist/core/principle-compiler/index.js +0 -10
- package/plugin/dist/core/principle-compiler/ledger-registrar.js +0 -95
- package/plugin/dist/core/principle-compiler/template-generator.js +0 -7
- package/plugin/dist/core/principle-injection.js +0 -10
- package/plugin/dist/core/principle-internalization/filesystem-lifecycle-datasource.js +0 -34
- package/plugin/dist/core/principle-internalization/lifecycle-read-model.js +0 -21
- package/plugin/dist/core/principle-internalization/lifecycle-refresh.js +0 -4
- package/plugin/dist/core/principle-internalization/principle-lifecycle-service.js +0 -89
- package/plugin/dist/core/principle-training-state.js +0 -113
- package/plugin/dist/core/principle-tree-ledger.js +0 -42
- package/plugin/dist/core/profile.js +0 -211
- package/plugin/dist/core/reflection/reflection-context.js +0 -91
- package/plugin/dist/core/replay-engine.js +0 -82
- package/plugin/dist/core/rule-context-assembler.js +0 -148
- package/plugin/dist/core/rule-host.js +0 -554
- package/plugin/dist/core/rule-implementation-runtime.js +0 -112
- package/plugin/dist/core/runtime-v2-prompt-activation-reader.js +0 -99
- package/plugin/dist/core/session-tracker.js +0 -462
- package/plugin/dist/core/signal-collector-host.js +0 -337
- package/plugin/dist/core/system-logger.js +0 -113
- package/plugin/dist/core/thinking-models.js +0 -94
- package/plugin/dist/core/thinking-os-parser.js +0 -132
- package/plugin/dist/core/trajectory-types.js +0 -8
- package/plugin/dist/core/trajectory.js +0 -1692
- package/plugin/dist/core/workflow-funnel-loader.js +0 -135
- package/plugin/dist/core/workspace-context.js +0 -260
- package/plugin/dist/core/workspace-dir-validation.js +0 -37
- package/plugin/dist/core/workspace-guidance-migrator.js +0 -141
- package/plugin/dist/hooks/after-tool-call-helpers.js +0 -552
- package/plugin/dist/hooks/after-tool-call-types.js +0 -13
- package/plugin/dist/hooks/gate-block-helper.js +0 -249
- package/plugin/dist/hooks/gate.js +0 -430
- package/plugin/dist/hooks/lifecycle.js +0 -284
- package/plugin/dist/hooks/llm.js +0 -452
- package/plugin/dist/hooks/message-sanitize.js +0 -77
- package/plugin/dist/hooks/pain.js +0 -369
- package/plugin/dist/hooks/prompt-helpers.js +0 -288
- package/plugin/dist/hooks/prompt-types.js +0 -12
- package/plugin/dist/hooks/prompt.js +0 -501
- package/plugin/dist/hooks/raw-observation-adapter.js +0 -15
- package/plugin/dist/hooks/raw-observation-types.js +0 -11
- package/plugin/dist/hooks/trajectory-collector.js +0 -164
- package/plugin/dist/hooks/trajectory-evidence.js +0 -92
- package/plugin/dist/hooks/triage-adapter.js +0 -72
- package/plugin/dist/hooks/trigger-cooldown-tracker.js +0 -80
- package/plugin/dist/i18n/commands.js +0 -120
- package/plugin/dist/openclaw-sdk.js +0 -4
- package/plugin/dist/rulehost-evidence.js +0 -3
- package/plugin/dist/service/correction-observer-service.js +0 -191
- package/plugin/dist/service/evolution-dedup.js +0 -54
- package/plugin/dist/service/evolution-worker.js +0 -578
- package/plugin/dist/service/internalization-auto-consumer-service.js +0 -323
- package/plugin/dist/service/keyword-optimization-service.js +0 -137
- package/plugin/dist/service/phase3-input-filter.js +0 -172
- package/plugin/dist/service/queue-io.js +0 -91
- package/plugin/dist/service/queue-migration.js +0 -113
- package/plugin/dist/service/runtime-summary-service.js +0 -639
- package/plugin/dist/service/subagent-workflow/subagent-error-utils.js +0 -23
- package/plugin/dist/service/subagent-workflow/types.js +0 -11
- package/plugin/dist/service/subagent-workflow/workflow-store.js +0 -298
- package/plugin/dist/service/trajectory-service.js +0 -16
- package/plugin/dist/service/workflow-watchdog.js +0 -104
- package/plugin/dist/types/event-types.js +0 -1
- package/plugin/dist/types/hygiene-types.js +0 -1
- package/plugin/dist/types/principle-tree-schema.js +0 -24
- package/plugin/dist/types/queue.js +0 -1
- package/plugin/dist/types/runtime-summary.js +0 -1
- package/plugin/dist/types.js +0 -11
- package/plugin/dist/utils/file-lock.js +0 -310
- package/plugin/dist/utils/hashing.js +0 -25
- package/plugin/dist/utils/io.js +0 -174
- package/plugin/dist/utils/node-vm-polyfill.js +0 -9
- package/plugin/dist/utils/retry.js +0 -380
- package/plugin/dist/utils/session-key.js +0 -21
- package/plugin/dist/utils/workspace-resolver.js +0 -288
|
@@ -0,0 +1,445 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CodexHostInstaller — implements HostInstaller for OpenAI Codex CLI (ADR-0020 §2.3, SPEC v4.1 §5.7)
|
|
3
|
+
*
|
|
4
|
+
* Writes/merges `~/.codex/hooks.json` pointing to the codex-adapter's pd-hook.js
|
|
5
|
+
* entry. Codex spawns pd-hook.js as a subprocess for each hook event.
|
|
6
|
+
*
|
|
7
|
+
* Install layout (does NOT mix with OpenClaw's ~/.openclaw/ tree):
|
|
8
|
+
* ~/.pd/codex/
|
|
9
|
+
* ├── pd-hook-entry.cjs # wrapper: sets env vars + imports codex-adapter
|
|
10
|
+
* └── .pd-hooks.marker # sidecar marker for precise uninstall
|
|
11
|
+
*
|
|
12
|
+
* hooks.json entries (SPEC v4.1 §5.7):
|
|
13
|
+
* ~/.codex/hooks.json (merged — append, never overwrite)
|
|
14
|
+
*
|
|
15
|
+
* Runtime Contract Rules:
|
|
16
|
+
* - rc-1-treat-as-unknown: hooks.json parsed as unknown, validated.
|
|
17
|
+
* - rc-2-no-as-bypass: uses Object.hasOwn + typeof guards.
|
|
18
|
+
* - rc-3-fail-loud-missing: malformed hooks.json throws.
|
|
19
|
+
* - rc-5-object-hasown-not-in: uses Object.hasOwn for untrusted keys.
|
|
20
|
+
* - rc-9-no-silent-fallback: every result includes reason + nextAction.
|
|
21
|
+
*
|
|
22
|
+
* EP-06 (Source of Truth): hooks.json is the canonical hook config — we
|
|
23
|
+
* merge into it, never overwrite. The marker file is our own bookkeeping
|
|
24
|
+
* for precise uninstall.
|
|
25
|
+
*/
|
|
26
|
+
import { existsSync, readFileSync, writeFileSync, mkdirSync } from 'fs';
|
|
27
|
+
import * as path from 'path';
|
|
28
|
+
import * as os from 'os';
|
|
29
|
+
import { createRequire } from 'module';
|
|
30
|
+
const requireFromModule = createRequire(import.meta.url);
|
|
31
|
+
// ─── Codex hook event names (SPEC v4.1 §5.7) ────────────────────────────────
|
|
32
|
+
const CODEX_EVENTS = ['PreToolUse', 'PostToolUse', 'UserPromptSubmit', 'SessionStart'];
|
|
33
|
+
const PD_HOOK_MARKER = 'pd-hooks.marker';
|
|
34
|
+
// ─── Type guards (rc-2: no `as` bypass) ─────────────────────────────────────
|
|
35
|
+
function isRecord(value) {
|
|
36
|
+
return typeof value === 'object' && value !== null && !Array.isArray(value);
|
|
37
|
+
}
|
|
38
|
+
function isUnknownArray(value) {
|
|
39
|
+
return Array.isArray(value);
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Type guard: extracts `.code` from a thrown error without `as NodeJS.ErrnoException`.
|
|
43
|
+
* ESLint `no-undef` flags the `NodeJS` namespace; this helper avoids it.
|
|
44
|
+
*/
|
|
45
|
+
function getErrorCode(err) {
|
|
46
|
+
if (err !== null && typeof err === 'object' && Object.hasOwn(err, 'code')) {
|
|
47
|
+
const { code } = err;
|
|
48
|
+
return typeof code === 'string' ? code : undefined;
|
|
49
|
+
}
|
|
50
|
+
return undefined;
|
|
51
|
+
}
|
|
52
|
+
// ─── Path helpers ───────────────────────────────────────────────────────────
|
|
53
|
+
function getCodexDir() {
|
|
54
|
+
return path.join(os.homedir(), '.codex');
|
|
55
|
+
}
|
|
56
|
+
function getCodexHooksJsonPath() {
|
|
57
|
+
return path.join(getCodexDir(), 'hooks.json');
|
|
58
|
+
}
|
|
59
|
+
function getPdCodexDir() {
|
|
60
|
+
return path.join(os.homedir(), '.pd', 'codex');
|
|
61
|
+
}
|
|
62
|
+
function getPdHookMarkerPath() {
|
|
63
|
+
return path.join(getPdCodexDir(), PD_HOOK_MARKER);
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* Resolve the path to the codex-adapter's pd-hook.js entry.
|
|
67
|
+
*
|
|
68
|
+
* Strategy:
|
|
69
|
+
* 1. Try require.resolve('@principles/codex-adapter/pd-hook') — works if
|
|
70
|
+
* the package is installed locally or globally resolvable.
|
|
71
|
+
* 2. Fall back to undefined — installer reports the missing dependency.
|
|
72
|
+
*/
|
|
73
|
+
function resolvePdHookPath() {
|
|
74
|
+
try {
|
|
75
|
+
const entry = requireFromModule.resolve('@principles/codex-adapter/pd-hook');
|
|
76
|
+
return entry;
|
|
77
|
+
}
|
|
78
|
+
catch {
|
|
79
|
+
return undefined;
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* Build the hook command string for hooks.json.
|
|
84
|
+
*
|
|
85
|
+
* The wrapper script sets PD_HOST_CODEX_ENABLED=1 and PD_WORKSPACE_DIR before
|
|
86
|
+
* invoking pd-hook.js. This is cross-platform (no shell-specific env var syntax).
|
|
87
|
+
*/
|
|
88
|
+
function buildHookCommand(entryScriptPath, _workspaceDir) {
|
|
89
|
+
// Unix command: node <entry>
|
|
90
|
+
// workspaceDir is injected by the wrapper script (pd-hook-entry.cjs), not here.
|
|
91
|
+
void _workspaceDir;
|
|
92
|
+
return `node "${entryScriptPath}"`;
|
|
93
|
+
}
|
|
94
|
+
function buildHookCommandWindows(entryScriptPath, _workspaceDir) {
|
|
95
|
+
// Windows command — same node invocation; the entry script handles env internally
|
|
96
|
+
void _workspaceDir;
|
|
97
|
+
return `node "${entryScriptPath}"`;
|
|
98
|
+
}
|
|
99
|
+
function buildMatcherGroup(eventName, entryScriptPath, workspaceDir) {
|
|
100
|
+
const command = buildHookCommand(entryScriptPath, workspaceDir);
|
|
101
|
+
const commandWindows = buildHookCommandWindows(entryScriptPath, workspaceDir);
|
|
102
|
+
switch (eventName) {
|
|
103
|
+
case 'PreToolUse':
|
|
104
|
+
return {
|
|
105
|
+
matcher: 'Bash|apply_patch',
|
|
106
|
+
hooks: [{
|
|
107
|
+
type: 'command',
|
|
108
|
+
command,
|
|
109
|
+
commandWindows,
|
|
110
|
+
timeout: 5,
|
|
111
|
+
statusMessage: 'PD: checking tool call',
|
|
112
|
+
}],
|
|
113
|
+
};
|
|
114
|
+
case 'PostToolUse':
|
|
115
|
+
return {
|
|
116
|
+
matcher: '.*',
|
|
117
|
+
hooks: [{
|
|
118
|
+
type: 'command',
|
|
119
|
+
command,
|
|
120
|
+
commandWindows,
|
|
121
|
+
timeout: 5,
|
|
122
|
+
async: true,
|
|
123
|
+
statusMessage: 'PD: capturing pain signal',
|
|
124
|
+
}],
|
|
125
|
+
};
|
|
126
|
+
case 'UserPromptSubmit':
|
|
127
|
+
return {
|
|
128
|
+
hooks: [{
|
|
129
|
+
type: 'command',
|
|
130
|
+
command,
|
|
131
|
+
commandWindows,
|
|
132
|
+
timeout: 5,
|
|
133
|
+
additionalContextLimit: 10000,
|
|
134
|
+
statusMessage: 'PD: injecting principles',
|
|
135
|
+
}],
|
|
136
|
+
};
|
|
137
|
+
case 'SessionStart':
|
|
138
|
+
return {
|
|
139
|
+
hooks: [{
|
|
140
|
+
type: 'command',
|
|
141
|
+
command,
|
|
142
|
+
commandWindows,
|
|
143
|
+
timeout: 600,
|
|
144
|
+
additionalContextLimit: 10000,
|
|
145
|
+
statusMessage: 'PD: hydrating state',
|
|
146
|
+
}],
|
|
147
|
+
};
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
// ─── Wrapper script content ─────────────────────────────────────────────────
|
|
151
|
+
/**
|
|
152
|
+
* Generate the wrapper script that sets env vars and imports pd-hook.js.
|
|
153
|
+
*
|
|
154
|
+
* This is a CommonJS file so it can use process.env mutation before the
|
|
155
|
+
* ESM pd-hook.js is dynamically imported. Cross-platform (no shell syntax).
|
|
156
|
+
*/
|
|
157
|
+
function buildWrapperScriptContent(pdHookPath, workspaceDir) {
|
|
158
|
+
return [
|
|
159
|
+
'#!/usr/bin/env node',
|
|
160
|
+
'// Auto-generated by create-principles-disciple installer (CodexHostInstaller).',
|
|
161
|
+
'// Sets PD env vars, then imports the codex-adapter pd-hook entry.',
|
|
162
|
+
'// DO NOT edit manually — re-run the installer to regenerate.',
|
|
163
|
+
'',
|
|
164
|
+
'process.env.PD_HOST_CODEX_ENABLED = "1";',
|
|
165
|
+
`process.env.PD_WORKSPACE_DIR = ${JSON.stringify(workspaceDir)};`,
|
|
166
|
+
'',
|
|
167
|
+
'// Import the codex-adapter pd-hook entry (ESM).',
|
|
168
|
+
'// pd-hook.js reads stdin, processes the hook, writes stdout, exits.',
|
|
169
|
+
`import(${JSON.stringify('file://' + pdHookPath.replace(/\\/g, '/'))});`,
|
|
170
|
+
'',
|
|
171
|
+
].join('\n');
|
|
172
|
+
}
|
|
173
|
+
// ─── CodexHostInstaller ─────────────────────────────────────────────────────
|
|
174
|
+
export class CodexHostInstaller {
|
|
175
|
+
hostId = 'codex';
|
|
176
|
+
async install(ctx) {
|
|
177
|
+
const pdCodexDir = getPdCodexDir();
|
|
178
|
+
const hooksJsonPath = getCodexHooksJsonPath();
|
|
179
|
+
const markerPath = getPdHookMarkerPath();
|
|
180
|
+
// 1. Resolve codex-adapter pd-hook.js
|
|
181
|
+
const pdHookPath = resolvePdHookPath();
|
|
182
|
+
if (!pdHookPath) {
|
|
183
|
+
return {
|
|
184
|
+
success: false,
|
|
185
|
+
hostId: this.hostId,
|
|
186
|
+
configPath: hooksJsonPath,
|
|
187
|
+
configAction: 'skipped',
|
|
188
|
+
reason: '@principles/codex-adapter is not installed. The codex-adapter package provides the pd-hook.js entry Codex spawns.',
|
|
189
|
+
nextAction: 'Install it first: npm install -g @principles/codex-adapter, then re-run: npx create-principles-disciple install --host codex',
|
|
190
|
+
};
|
|
191
|
+
}
|
|
192
|
+
// 2. Write wrapper script to ~/.pd/codex/pd-hook-entry.cjs
|
|
193
|
+
// (marker file is written AFTER mergeHooksJson succeeds — see step 3.
|
|
194
|
+
// Writing the marker before the merge would make detect() report a
|
|
195
|
+
// failed install as installed, violating rc-3-fail-loud-missing.)
|
|
196
|
+
try {
|
|
197
|
+
if (!existsSync(pdCodexDir)) {
|
|
198
|
+
mkdirSync(pdCodexDir, { recursive: true });
|
|
199
|
+
}
|
|
200
|
+
const wrapperPath = path.join(pdCodexDir, 'pd-hook-entry.cjs');
|
|
201
|
+
const wrapperContent = buildWrapperScriptContent(pdHookPath, ctx.workspaceDir);
|
|
202
|
+
writeFileSync(wrapperPath, wrapperContent, { encoding: 'utf-8' });
|
|
203
|
+
// 3. Merge PD hook entries into ~/.codex/hooks.json (append, never overwrite).
|
|
204
|
+
// If hooks.json is malformed, mergeHooksJson returns 'preserved' without
|
|
205
|
+
// writing any PD entries. This MUST surface as a failure (rc-3 / rc-9)
|
|
206
|
+
// — otherwise the user would see "install succeeded" while Codex never
|
|
207
|
+
// triggers PD hooks. The marker is NOT written in this branch, so
|
|
208
|
+
// detect() correctly reports "not installed".
|
|
209
|
+
const configAction = this.mergeHooksJson(hooksJsonPath, wrapperPath, ctx.workspaceDir);
|
|
210
|
+
if (configAction === 'preserved') {
|
|
211
|
+
return {
|
|
212
|
+
success: false,
|
|
213
|
+
hostId: this.hostId,
|
|
214
|
+
configPath: hooksJsonPath,
|
|
215
|
+
configAction,
|
|
216
|
+
reason: `${hooksJsonPath} is malformed (not a JSON object). PD did not write any hook entries to avoid overwriting the user's config.`,
|
|
217
|
+
nextAction: `Manually fix ${hooksJsonPath} (must be a JSON object), then re-run: npx create-principles-disciple install --host codex`,
|
|
218
|
+
};
|
|
219
|
+
}
|
|
220
|
+
// 4. Merge succeeded — now safe to record the marker. detect() will
|
|
221
|
+
// only report installed when hooks.json actually contains PD entries.
|
|
222
|
+
writeFileSync(markerPath, JSON.stringify({
|
|
223
|
+
installedAt: new Date().toISOString(),
|
|
224
|
+
workspaceDir: ctx.workspaceDir,
|
|
225
|
+
pdHookPath,
|
|
226
|
+
wrapperPath,
|
|
227
|
+
events: CODEX_EVENTS,
|
|
228
|
+
}, null, 2), { encoding: 'utf-8' });
|
|
229
|
+
return {
|
|
230
|
+
success: true,
|
|
231
|
+
hostId: this.hostId,
|
|
232
|
+
configPath: hooksJsonPath,
|
|
233
|
+
configAction,
|
|
234
|
+
nextAction: 'Open Codex and run /hooks to trust PD hooks before they execute. Verify with: codex doctor (hooks feature should be ON).',
|
|
235
|
+
};
|
|
236
|
+
}
|
|
237
|
+
catch (err) {
|
|
238
|
+
const reason = err instanceof Error ? err.message : String(err);
|
|
239
|
+
return {
|
|
240
|
+
success: false,
|
|
241
|
+
hostId: this.hostId,
|
|
242
|
+
configPath: hooksJsonPath,
|
|
243
|
+
configAction: 'skipped',
|
|
244
|
+
reason: `Failed to write Codex hook config: ${reason}`,
|
|
245
|
+
nextAction: `Check write permissions on ${pdCodexDir} and ${hooksJsonPath}, then re-run installer.`,
|
|
246
|
+
};
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
/**
|
|
250
|
+
* Merge PD hook entries into ~/.codex/hooks.json.
|
|
251
|
+
* - If file doesn't exist: create it with PD entries (configAction = 'created').
|
|
252
|
+
* - If file exists: merge PD entries into existing event arrays (configAction = 'updated').
|
|
253
|
+
* - Idempotent: re-running install replaces PD entries (matched by marker), not duplicates.
|
|
254
|
+
*/
|
|
255
|
+
// eslint-disable-next-line @typescript-eslint/class-methods-use-this
|
|
256
|
+
mergeHooksJson(hooksJsonPath, wrapperPath, workspaceDir) {
|
|
257
|
+
const codexDir = getCodexDir();
|
|
258
|
+
if (!existsSync(codexDir)) {
|
|
259
|
+
mkdirSync(codexDir, { recursive: true });
|
|
260
|
+
}
|
|
261
|
+
let existing = {};
|
|
262
|
+
let action = 'created';
|
|
263
|
+
// CodeQL TOCTOU fix: try/catch read instead of existsSync+readFileSync.
|
|
264
|
+
// ENOENT → 'created' (file doesn't exist yet); other parse errors → 'preserved'.
|
|
265
|
+
try {
|
|
266
|
+
const raw = readFileSync(hooksJsonPath, 'utf-8');
|
|
267
|
+
const parsed = JSON.parse(raw);
|
|
268
|
+
if (isRecord(parsed)) {
|
|
269
|
+
existing = { ...parsed };
|
|
270
|
+
action = 'updated';
|
|
271
|
+
}
|
|
272
|
+
else {
|
|
273
|
+
// Malformed — back off, don't overwrite
|
|
274
|
+
action = 'preserved';
|
|
275
|
+
}
|
|
276
|
+
}
|
|
277
|
+
catch (err) {
|
|
278
|
+
const code = getErrorCode(err);
|
|
279
|
+
if (code === 'ENOENT') {
|
|
280
|
+
// File doesn't exist — 'created' (default action stays)
|
|
281
|
+
}
|
|
282
|
+
else {
|
|
283
|
+
// Malformed JSON — back off
|
|
284
|
+
action = 'preserved';
|
|
285
|
+
}
|
|
286
|
+
}
|
|
287
|
+
if (action === 'preserved') {
|
|
288
|
+
return action;
|
|
289
|
+
}
|
|
290
|
+
// For each Codex event, replace any existing PD-owned matcher groups
|
|
291
|
+
// with our fresh set (idempotent — re-install doesn't duplicate).
|
|
292
|
+
const PD_MARKER = 'pd-owned';
|
|
293
|
+
for (const eventName of CODEX_EVENTS) {
|
|
294
|
+
const group = buildMatcherGroup(eventName, wrapperPath, workspaceDir);
|
|
295
|
+
// Tag the group so uninstall can find PD-owned entries precisely.
|
|
296
|
+
group.__pd_marker = PD_MARKER;
|
|
297
|
+
const existingGroups = existing[eventName];
|
|
298
|
+
if (isUnknownArray(existingGroups)) {
|
|
299
|
+
// Filter out previously-PD-owned groups, then append the new one.
|
|
300
|
+
// rc-2: no `as` bypass — use Object.hasOwn to check marker presence.
|
|
301
|
+
const filtered = existingGroups.filter((g) => !(isRecord(g) && Object.hasOwn(g, '__pd_marker') && g.__pd_marker === PD_MARKER));
|
|
302
|
+
filtered.push(group);
|
|
303
|
+
existing[eventName] = filtered;
|
|
304
|
+
}
|
|
305
|
+
else {
|
|
306
|
+
existing[eventName] = [group];
|
|
307
|
+
}
|
|
308
|
+
}
|
|
309
|
+
writeFileSync(hooksJsonPath, JSON.stringify(existing, null, 2), { encoding: 'utf-8' });
|
|
310
|
+
return action;
|
|
311
|
+
}
|
|
312
|
+
async uninstall(_ctx) {
|
|
313
|
+
const hooksJsonPath = getCodexHooksJsonPath();
|
|
314
|
+
const markerPath = getPdHookMarkerPath();
|
|
315
|
+
const pdCodexDir = getPdCodexDir();
|
|
316
|
+
const removedPaths = [];
|
|
317
|
+
const preservedPaths = [];
|
|
318
|
+
// 1. Remove PD-owned entries from hooks.json.
|
|
319
|
+
// CodeQL TOCTOU fix: try/catch read instead of existsSync+readFileSync.
|
|
320
|
+
try {
|
|
321
|
+
const raw = readFileSync(hooksJsonPath, 'utf-8');
|
|
322
|
+
const parsed = JSON.parse(raw);
|
|
323
|
+
if (isRecord(parsed)) {
|
|
324
|
+
const config = { ...parsed };
|
|
325
|
+
let modified = false;
|
|
326
|
+
const PD_MARKER = 'pd-owned';
|
|
327
|
+
for (const eventName of CODEX_EVENTS) {
|
|
328
|
+
const groups = config[eventName];
|
|
329
|
+
if (isUnknownArray(groups)) {
|
|
330
|
+
const before = groups.length;
|
|
331
|
+
// rc-2: use Object.hasOwn instead of `as` cast for marker check.
|
|
332
|
+
const filtered = groups.filter((g) => !(isRecord(g) && Object.hasOwn(g, '__pd_marker') && g.__pd_marker === PD_MARKER));
|
|
333
|
+
if (filtered.length === 0) {
|
|
334
|
+
delete config[eventName];
|
|
335
|
+
}
|
|
336
|
+
else {
|
|
337
|
+
config[eventName] = filtered;
|
|
338
|
+
}
|
|
339
|
+
if (filtered.length !== before)
|
|
340
|
+
modified = true;
|
|
341
|
+
}
|
|
342
|
+
}
|
|
343
|
+
if (modified) {
|
|
344
|
+
writeFileSync(hooksJsonPath, JSON.stringify(config, null, 2), { encoding: 'utf-8' });
|
|
345
|
+
removedPaths.push(hooksJsonPath);
|
|
346
|
+
}
|
|
347
|
+
}
|
|
348
|
+
}
|
|
349
|
+
catch (err) {
|
|
350
|
+
const code = getErrorCode(err);
|
|
351
|
+
if (code === 'ENOENT') {
|
|
352
|
+
// hooks.json not found — nothing to clean, proceed to marker cleanup.
|
|
353
|
+
}
|
|
354
|
+
else {
|
|
355
|
+
// Malformed hooks.json — can't safely merge. Leave it alone.
|
|
356
|
+
preservedPaths.push(hooksJsonPath);
|
|
357
|
+
}
|
|
358
|
+
}
|
|
359
|
+
// 2. Remove wrapper script + marker file
|
|
360
|
+
const wrapperPath = path.join(pdCodexDir, 'pd-hook-entry.cjs');
|
|
361
|
+
if (existsSync(wrapperPath)) {
|
|
362
|
+
try {
|
|
363
|
+
const fs = await import('fs');
|
|
364
|
+
await fs.promises.rm(wrapperPath, { force: true });
|
|
365
|
+
removedPaths.push(wrapperPath);
|
|
366
|
+
}
|
|
367
|
+
catch {
|
|
368
|
+
preservedPaths.push(wrapperPath);
|
|
369
|
+
}
|
|
370
|
+
}
|
|
371
|
+
if (existsSync(markerPath)) {
|
|
372
|
+
try {
|
|
373
|
+
const fs = await import('fs');
|
|
374
|
+
await fs.promises.rm(markerPath, { force: true });
|
|
375
|
+
removedPaths.push(markerPath);
|
|
376
|
+
}
|
|
377
|
+
catch {
|
|
378
|
+
preservedPaths.push(markerPath);
|
|
379
|
+
}
|
|
380
|
+
}
|
|
381
|
+
return {
|
|
382
|
+
success: preservedPaths.length === 0,
|
|
383
|
+
hostId: this.hostId,
|
|
384
|
+
removedPaths,
|
|
385
|
+
preservedPaths,
|
|
386
|
+
reason: preservedPaths.length > 0
|
|
387
|
+
? `Some files could not be removed: ${preservedPaths.join(', ')}`
|
|
388
|
+
: undefined,
|
|
389
|
+
nextAction: preservedPaths.length > 0
|
|
390
|
+
? `Manually inspect: ${preservedPaths.join(', ')}`
|
|
391
|
+
: 'Codex hooks uninstalled. Verify: open ~/.codex/hooks.json (should have no __pd_marker entries).',
|
|
392
|
+
};
|
|
393
|
+
}
|
|
394
|
+
// eslint-disable-next-line @typescript-eslint/class-methods-use-this
|
|
395
|
+
detect() {
|
|
396
|
+
const markerPath = getPdHookMarkerPath();
|
|
397
|
+
const hooksJsonPath = getCodexHooksJsonPath();
|
|
398
|
+
const wrapperPath = path.join(getPdCodexDir(), 'pd-hook-entry.cjs');
|
|
399
|
+
const paths = [
|
|
400
|
+
{
|
|
401
|
+
exists: existsSync(markerPath),
|
|
402
|
+
path: markerPath,
|
|
403
|
+
name: 'PD Codex install marker',
|
|
404
|
+
type: 'file',
|
|
405
|
+
},
|
|
406
|
+
{
|
|
407
|
+
exists: existsSync(wrapperPath),
|
|
408
|
+
path: wrapperPath,
|
|
409
|
+
name: 'PD Codex hook entry script',
|
|
410
|
+
type: 'file',
|
|
411
|
+
},
|
|
412
|
+
{
|
|
413
|
+
exists: existsSync(hooksJsonPath),
|
|
414
|
+
path: hooksJsonPath,
|
|
415
|
+
name: 'Codex hooks.json',
|
|
416
|
+
type: 'file',
|
|
417
|
+
},
|
|
418
|
+
];
|
|
419
|
+
// PD is "installed" for Codex if the marker exists OR hooks.json has PD entries
|
|
420
|
+
let installed = existsSync(markerPath);
|
|
421
|
+
if (!installed && existsSync(hooksJsonPath)) {
|
|
422
|
+
try {
|
|
423
|
+
const raw = readFileSync(hooksJsonPath, 'utf-8');
|
|
424
|
+
const parsed = JSON.parse(raw);
|
|
425
|
+
if (isRecord(parsed)) {
|
|
426
|
+
for (const eventName of CODEX_EVENTS) {
|
|
427
|
+
const groups = parsed[eventName];
|
|
428
|
+
if (isUnknownArray(groups)) {
|
|
429
|
+
const hasPd = groups.some((g) => isRecord(g) && Object.hasOwn(g, '__pd_marker') && g.__pd_marker === 'pd-owned');
|
|
430
|
+
if (hasPd) {
|
|
431
|
+
installed = true;
|
|
432
|
+
break;
|
|
433
|
+
}
|
|
434
|
+
}
|
|
435
|
+
}
|
|
436
|
+
}
|
|
437
|
+
}
|
|
438
|
+
catch {
|
|
439
|
+
// Malformed hooks.json — treat as not installed (will be cleaned on uninstall)
|
|
440
|
+
}
|
|
441
|
+
}
|
|
442
|
+
return { installed, paths };
|
|
443
|
+
}
|
|
444
|
+
}
|
|
445
|
+
//# sourceMappingURL=codex-host-installer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"codex-host-installer.js","sourceRoot":"","sources":["../../src/installers/codex-host-installer.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,IAAI,CAAC;AACxE,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAC7B,OAAO,KAAK,EAAE,MAAM,IAAI,CAAC;AACzB,OAAO,EAAE,aAAa,EAAE,MAAM,QAAQ,CAAC;AAUvC,MAAM,iBAAiB,GAAG,aAAa,CAAC,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC;AAEzD,+EAA+E;AAC/E,MAAM,YAAY,GAAG,CAAC,YAAY,EAAE,aAAa,EAAE,kBAAkB,EAAE,cAAc,CAAU,CAAC;AAGhG,MAAM,cAAc,GAAG,iBAAiB,CAAC;AAEzC,+EAA+E;AAC/E,SAAS,QAAQ,CAAC,KAAc;IAC9B,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;AAC9E,CAAC;AAED,SAAS,cAAc,CAAC,KAAc;IACpC,OAAO,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;AAC9B,CAAC;AAED;;;GAGG;AACH,SAAS,YAAY,CAAC,GAAY;IAChC,IAAI,GAAG,KAAK,IAAI,IAAI,OAAO,GAAG,KAAK,QAAQ,IAAI,MAAM,CAAC,MAAM,CAAC,GAAG,EAAE,MAAM,CAAC,EAAE,CAAC;QAC1E,MAAM,EAAE,IAAI,EAAE,GAAG,GAAyB,CAAC;QAC3C,OAAO,OAAO,IAAI,KAAK,QAAQ,CAAC,CAAC,CAAC,IAAI,CA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C;gBACxC,IAAI,QAAQ,CAAC,MAAM,CAAC,EAAE,CAAC;oBACrB,KAAK,MAAM,SAAS,IAAI,YAAY,EAAE,CAAC;wBACrC,MAAM,MAAM,GAAG,MAAM,CAAC,SAAS,CAAC,CAAC;wBACjC,IAAI,cAAc,CAAC,MAAM,CAAC,EAAE,CAAC;4BAC3B,MAAM,KAAK,GAAG,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAC9B,QAAQ,CAAC,CAAC,CAAC,IAAI,MAAM,CAAC,MAAM,CAAC,CAAC,EAAE,aAAa,CAAC,IAAI,CAAC,CAAC,WAAW,KAAK,UAAU,CAC/E,CAAC;4BACF,IAAI,KAAK,EAAE,CAAC;gCACV,SAAS,GAAG,IAAI,CAAC;gCACjB,MAAM;4BACR,CAAC;wBACH,CAAC;oBACH,CAAC;gBACH,CAAC;YACH,CAAC;YAAC,MAAM,CAAC;gBACP,+EAA+E;YACjF,CAAC;QACH,CAAC;QAED,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC;IAC9B,CAAC;CACF"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Host installers barrel (ADR-0020 §2.3)
|
|
3
|
+
*
|
|
4
|
+
* Exports HostTarget type + factory for selecting host installers by CLI --host.
|
|
5
|
+
*
|
|
6
|
+
* MVP hosts:
|
|
7
|
+
* - 'openclaw' (default) — OpenClawHostInstaller writes ~/.openclaw/openclaw.json.
|
|
8
|
+
* - 'codex' — CodexHostInstaller writes ~/.codex/hooks.json.
|
|
9
|
+
* - 'all' — both installers run (for operators using multiple hosts).
|
|
10
|
+
*
|
|
11
|
+
* Runtime Contract Rules:
|
|
12
|
+
* - rc-1-treat-as-unknown: --host CLI value is `unknown` until validated here.
|
|
13
|
+
* - rc-3-fail-loud-missing: invalid --host value throws with valid options.
|
|
14
|
+
* - rc-9-no-silent-fallback: factory returns concrete installers, not nulls.
|
|
15
|
+
*/
|
|
16
|
+
import type { HostInstaller } from '@principles/core/host';
|
|
17
|
+
export { OpenClawHostInstaller } from './openclaw-host-installer.js';
|
|
18
|
+
export { CodexHostInstaller } from './codex-host-installer.js';
|
|
19
|
+
/**
|
|
20
|
+
* Host target selector. 'all' runs every registered installer.
|
|
21
|
+
* Add new host IDs here when new HostInstaller implementations land.
|
|
22
|
+
*/
|
|
23
|
+
export type HostTarget = 'openclaw' | 'codex' | 'all';
|
|
24
|
+
export declare const HOST_TARGETS: readonly HostTarget[];
|
|
25
|
+
/**
|
|
26
|
+
* Validate a CLI --host value. rc-1/rc-3: treat input as unknown, fail loud.
|
|
27
|
+
*/
|
|
28
|
+
export declare function isHostTarget(value: unknown): value is HostTarget;
|
|
29
|
+
/**
|
|
30
|
+
* Factory: return the concrete HostInstaller instances for a given target.
|
|
31
|
+
*
|
|
32
|
+
* - 'openclaw' → [OpenClawHostInstaller]
|
|
33
|
+
* - 'codex' → [CodexHostInstaller]
|
|
34
|
+
* - 'all' → [OpenClawHostInstaller, CodexHostInstaller]
|
|
35
|
+
*
|
|
36
|
+
* Callers iterate the returned array and call install()/uninstall()/detect()
|
|
37
|
+
* on each. This keeps the CLI install/uninstall flow host-agnostic.
|
|
38
|
+
*/
|
|
39
|
+
export declare function getHostInstallers(target: HostTarget): HostInstaller[];
|
|
40
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/installers/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAI3D,OAAO,EAAE,qBAAqB,EAAE,MAAM,8BAA8B,CAAC;AACrE,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAE/D;;;GAGG;AACH,MAAM,MAAM,UAAU,GAAG,UAAU,GAAG,OAAO,GAAG,KAAK,CAAC;AAEtD,eAAO,MAAM,YAAY,EAAE,SAAS,UAAU,EAAiC,CAAC;AAEhF;;GAEG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,UAAU,CAEhE;AAED;;;;;;;;;GASG;AACH,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,UAAU,GAAG,aAAa,EAAE,CAYrE"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { OpenClawHostInstaller } from './openclaw-host-installer.js';
|
|
2
|
+
import { CodexHostInstaller } from './codex-host-installer.js';
|
|
3
|
+
export { OpenClawHostInstaller } from './openclaw-host-installer.js';
|
|
4
|
+
export { CodexHostInstaller } from './codex-host-installer.js';
|
|
5
|
+
export const HOST_TARGETS = ['openclaw', 'codex', 'all'];
|
|
6
|
+
/**
|
|
7
|
+
* Validate a CLI --host value. rc-1/rc-3: treat input as unknown, fail loud.
|
|
8
|
+
*/
|
|
9
|
+
export function isHostTarget(value) {
|
|
10
|
+
return typeof value === 'string' && HOST_TARGETS.includes(value);
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Factory: return the concrete HostInstaller instances for a given target.
|
|
14
|
+
*
|
|
15
|
+
* - 'openclaw' → [OpenClawHostInstaller]
|
|
16
|
+
* - 'codex' → [CodexHostInstaller]
|
|
17
|
+
* - 'all' → [OpenClawHostInstaller, CodexHostInstaller]
|
|
18
|
+
*
|
|
19
|
+
* Callers iterate the returned array and call install()/uninstall()/detect()
|
|
20
|
+
* on each. This keeps the CLI install/uninstall flow host-agnostic.
|
|
21
|
+
*/
|
|
22
|
+
export function getHostInstallers(target) {
|
|
23
|
+
if (!isHostTarget(target)) {
|
|
24
|
+
throw new Error(`Invalid host target: ${JSON.stringify(target)}. Valid: ${HOST_TARGETS.join(', ')}`);
|
|
25
|
+
}
|
|
26
|
+
switch (target) {
|
|
27
|
+
case 'openclaw':
|
|
28
|
+
return [new OpenClawHostInstaller()];
|
|
29
|
+
case 'codex':
|
|
30
|
+
return [new CodexHostInstaller()];
|
|
31
|
+
case 'all':
|
|
32
|
+
return [new OpenClawHostInstaller(), new CodexHostInstaller()];
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/installers/index.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAE,qBAAqB,EAAE,MAAM,8BAA8B,CAAC;AACrE,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAE/D,OAAO,EAAE,qBAAqB,EAAE,MAAM,8BAA8B,CAAC;AACrE,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAQ/D,MAAM,CAAC,MAAM,YAAY,GAA0B,CAAC,UAAU,EAAE,OAAO,EAAE,KAAK,CAAC,CAAC;AAEhF;;GAEG;AACH,MAAM,UAAU,YAAY,CAAC,KAAc;IACzC,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAK,YAAkC,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;AAC1F,CAAC;AAED;;;;;;;;;GASG;AACH,MAAM,UAAU,iBAAiB,CAAC,MAAkB;IAClD,IAAI,CAAC,YAAY,CAAC,MAAM,CAAC,EAAE,CAAC;QAC1B,MAAM,IAAI,KAAK,CAAC,wBAAwB,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,YAAY,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACvG,CAAC;IACD,QAAQ,MAAM,EAAE,CAAC;QACf,KAAK,UAAU;YACb,OAAO,CAAC,IAAI,qBAAqB,EAAE,CAAC,CAAC;QACvC,KAAK,OAAO;YACV,OAAO,CAAC,IAAI,kBAAkB,EAAE,CAAC,CAAC;QACpC,KAAK,KAAK;YACR,OAAO,CAAC,IAAI,qBAAqB,EAAE,EAAE,IAAI,kBAAkB,EAAE,CAAC,CAAC;IACnE,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { HostInstaller, HostInstallContext, HostInstallResult, HostUninstallContext, HostUninstallResult, HostDetectResult } from '@principles/core/host';
|
|
2
|
+
/**
|
|
3
|
+
* OpenClaw host installer — writes/merges ~/.openclaw/openclaw.json and
|
|
4
|
+
* ~/.openclaw/plugins/installs.json. Does NOT install bundled components
|
|
5
|
+
* (core/pd-cli/console) — that's the shared installer's job.
|
|
6
|
+
*/
|
|
7
|
+
export declare class OpenClawHostInstaller implements HostInstaller {
|
|
8
|
+
readonly hostId = "openclaw";
|
|
9
|
+
install(_ctx: HostInstallContext): Promise<HostInstallResult>;
|
|
10
|
+
/**
|
|
11
|
+
* Write install record to ~/.openclaw/plugins/installs.json.
|
|
12
|
+
* Non-fatal on failure — OpenClaw manages this file and will self-heal.
|
|
13
|
+
*/
|
|
14
|
+
private writeInstallRecord;
|
|
15
|
+
uninstall(_ctx: HostUninstallContext): Promise<HostUninstallResult>;
|
|
16
|
+
detect(): HostDetectResult;
|
|
17
|
+
}
|
|
18
|
+
//# sourceMappingURL=openclaw-host-installer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"openclaw-host-installer.d.ts","sourceRoot":"","sources":["../../src/installers/openclaw-host-installer.ts"],"names":[],"mappings":"AAqBA,OAAO,KAAK,EACV,aAAa,EACb,kBAAkB,EAClB,iBAAiB,EACjB,oBAAoB,EACpB,mBAAmB,EACnB,gBAAgB,EACjB,MAAM,uBAAuB,CAAC;AAgE/B;;;;GAIG;AACH,qBAAa,qBAAsB,YAAW,aAAa;IACzD,QAAQ,CAAC,MAAM,cAAc;IAEvB,OAAO,CAAC,IAAI,EAAE,kBAAkB,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAqIlE;IAED;;;OAGG;IAEH,OAAO,CAAC,kBAAkB;IAmEpB,SAAS,CAAC,IAAI,EAAE,oBAAoB,GAAG,OAAO,CAAC,mBAAmB,CAAC,CAwGxE;IAGD,MAAM,IAAI,gBAAgB,CAsBzB;CACF"}
|