create-principles-disciple 1.0.0 → 1.74.0
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 +109 -7
- package/console/dist/lib/utils.d.ts +2 -0
- package/console/dist/lib/utils.js +5 -0
- package/console/dist/server/config/AuthConfig.d.ts +14 -0
- package/console/dist/server/config/AuthConfig.js +36 -0
- package/console/dist/server/config/WorkspaceConfigStore.d.ts +15 -0
- package/console/dist/server/config/WorkspaceConfigStore.js +100 -0
- package/console/dist/server/index.d.ts +1 -0
- package/console/dist/server/index.js +734 -0
- package/console/dist/server/models/ApprovalsConsoleModel.d.ts +48 -0
- package/console/dist/server/models/ApprovalsConsoleModel.js +208 -0
- package/console/dist/server/models/EventLogReadModel.d.ts +33 -0
- package/console/dist/server/models/EventLogReadModel.js +218 -0
- package/console/dist/server/models/EvolutionConsoleModel.d.ts +79 -0
- package/console/dist/server/models/EvolutionConsoleModel.js +179 -0
- package/console/dist/server/models/FeedbackConsoleModel.d.ts +38 -0
- package/console/dist/server/models/FeedbackConsoleModel.js +129 -0
- package/console/dist/server/models/GateConsoleModel.d.ts +50 -0
- package/console/dist/server/models/GateConsoleModel.js +151 -0
- package/console/dist/server/models/HealthCheckModel.d.ts +43 -0
- package/console/dist/server/models/HealthCheckModel.js +341 -0
- package/console/dist/server/models/OverviewConsoleModel.d.ts +22 -0
- package/console/dist/server/models/OverviewConsoleModel.js +202 -0
- package/console/dist/server/models/PipelineStatsModel.d.ts +35 -0
- package/console/dist/server/models/PipelineStatsModel.js +129 -0
- package/console/dist/server/models/PrinciplesConsoleModel.d.ts +69 -0
- package/console/dist/server/models/PrinciplesConsoleModel.js +200 -0
- package/console/dist/server/models/SampleConsoleModel.d.ts +21 -0
- package/console/dist/server/models/SampleConsoleModel.js +188 -0
- package/console/dist/server/models/ThinkingModelsConsoleModel.d.ts +22 -0
- package/console/dist/server/models/ThinkingModelsConsoleModel.js +75 -0
- package/console/dist/server/models/WorkspaceService.d.ts +34 -0
- package/console/dist/server/models/WorkspaceService.js +105 -0
- package/console/dist/server/routes/agents.d.ts +3 -0
- package/console/dist/server/routes/agents.js +442 -0
- package/console/dist/server/routes/approvals.d.ts +3 -0
- package/console/dist/server/routes/approvals.js +184 -0
- package/console/dist/server/routes/central.d.ts +5 -0
- package/console/dist/server/routes/central.js +31 -0
- package/console/dist/server/routes/events.d.ts +10 -0
- package/console/dist/server/routes/events.js +99 -0
- package/console/dist/server/routes/evolution.d.ts +3 -0
- package/console/dist/server/routes/evolution.js +73 -0
- package/console/dist/server/routes/feedback.d.ts +3 -0
- package/console/dist/server/routes/feedback.js +65 -0
- package/console/dist/server/routes/gates.d.ts +3 -0
- package/console/dist/server/routes/gates.js +52 -0
- package/console/dist/server/routes/health.d.ts +3 -0
- package/console/dist/server/routes/health.js +33 -0
- package/console/dist/server/routes/overview.d.ts +3 -0
- package/console/dist/server/routes/overview.js +49 -0
- package/console/dist/server/routes/pipeline.d.ts +3 -0
- package/console/dist/server/routes/pipeline.js +33 -0
- package/console/dist/server/routes/principles.d.ts +10 -0
- package/console/dist/server/routes/principles.js +48 -0
- package/console/dist/server/routes/samples.d.ts +3 -0
- package/console/dist/server/routes/samples.js +101 -0
- package/console/dist/server/routes/state.d.ts +11 -0
- package/console/dist/server/routes/state.js +97 -0
- package/console/dist/server/routes/thinking-models.d.ts +3 -0
- package/console/dist/server/routes/thinking-models.js +54 -0
- package/console/dist/server/routes/update-history.d.ts +12 -0
- package/console/dist/server/routes/update-history.js +52 -0
- package/console/dist/server/routes/update.d.ts +10 -0
- package/console/dist/server/routes/update.js +435 -0
- package/console/dist/server/routes/workspaces.d.ts +6 -0
- package/console/dist/server/routes/workspaces.js +105 -0
- package/console/dist/server/types/index.d.ts +248 -0
- package/console/dist/server/types/index.js +1 -0
- package/console/dist/server/utils/diagnostic-parser.d.ts +6 -0
- package/console/dist/server/utils/diagnostic-parser.js +81 -0
- package/console/dist/server/utils/request.d.ts +4 -0
- package/console/dist/server/utils/request.js +43 -0
- package/console/dist/server/utils/response.d.ts +8 -0
- package/console/dist/server/utils/response.js +31 -0
- package/console/dist/server.d.ts +1 -0
- package/console/dist/server.js +1 -0
- package/console/dist/types.d.ts +85 -0
- package/console/dist/types.js +1 -0
- package/console/dist/ui/App.d.ts +1 -0
- package/console/dist/ui/App.js +53 -0
- package/console/dist/ui/api.d.ts +498 -0
- package/console/dist/ui/api.js +243 -0
- package/console/dist/ui/components/UpdateBanner.d.ts +1 -0
- package/console/dist/ui/components/UpdateBanner.js +41 -0
- package/console/dist/ui/components/UpdateProgressDialog.d.ts +12 -0
- package/console/dist/ui/components/UpdateProgressDialog.js +28 -0
- package/console/dist/ui/components/app-sidebar.d.ts +7 -0
- package/console/dist/ui/components/app-sidebar.js +74 -0
- package/console/dist/ui/components/approval-card.d.ts +8 -0
- package/console/dist/ui/components/approval-card.js +39 -0
- package/console/dist/ui/components/approval-detail-dialog.d.ts +9 -0
- package/console/dist/ui/components/approval-detail-dialog.js +20 -0
- package/console/dist/ui/components/compare-view.d.ts +7 -0
- package/console/dist/ui/components/compare-view.js +32 -0
- package/console/dist/ui/components/data-freshness-indicator.d.ts +10 -0
- package/console/dist/ui/components/data-freshness-indicator.js +63 -0
- package/console/dist/ui/components/error-boundary.d.ts +15 -0
- package/console/dist/ui/components/error-boundary.js +23 -0
- package/console/dist/ui/components/health-diagnostic-card.d.ts +15 -0
- package/console/dist/ui/components/health-diagnostic-card.js +42 -0
- package/console/dist/ui/components/language-switcher.d.ts +1 -0
- package/console/dist/ui/components/language-switcher.js +17 -0
- package/console/dist/ui/components/page-header.d.ts +10 -0
- package/console/dist/ui/components/page-header.js +37 -0
- package/console/dist/ui/components/rejection-reason-dialog.d.ts +6 -0
- package/console/dist/ui/components/rejection-reason-dialog.js +23 -0
- package/console/dist/ui/components/theme-provider.d.ts +14 -0
- package/console/dist/ui/components/theme-provider.js +35 -0
- package/console/dist/ui/components/theme-toggle.d.ts +1 -0
- package/console/dist/ui/components/theme-toggle.js +30 -0
- package/console/dist/ui/components/ui/alert-dialog.d.ts +20 -0
- package/console/dist/ui/components/ui/alert-dialog.js +26 -0
- package/console/dist/ui/components/ui/badge.d.ts +9 -0
- package/console/dist/ui/components/ui/badge.js +20 -0
- package/console/dist/ui/components/ui/button.d.ts +11 -0
- package/console/dist/ui/components/ui/button.js +33 -0
- package/console/dist/ui/components/ui/card.d.ts +8 -0
- package/console/dist/ui/components/ui/card.js +16 -0
- package/console/dist/ui/components/ui/charts.d.ts +51 -0
- package/console/dist/ui/components/ui/charts.js +69 -0
- package/console/dist/ui/components/ui/dialog.d.ts +19 -0
- package/console/dist/ui/components/ui/dialog.js +22 -0
- package/console/dist/ui/components/ui/input.d.ts +3 -0
- package/console/dist/ui/components/ui/input.js +8 -0
- package/console/dist/ui/components/ui/markdown.d.ts +24 -0
- package/console/dist/ui/components/ui/markdown.js +115 -0
- package/console/dist/ui/components/ui/progress-bar.d.ts +20 -0
- package/console/dist/ui/components/ui/progress-bar.js +38 -0
- package/console/dist/ui/components/ui/select.d.ts +13 -0
- package/console/dist/ui/components/ui/select.js +26 -0
- package/console/dist/ui/components/ui/separator.d.ts +3 -0
- package/console/dist/ui/components/ui/separator.js +6 -0
- package/console/dist/ui/components/ui/sheet.d.ts +25 -0
- package/console/dist/ui/components/ui/sheet.js +36 -0
- package/console/dist/ui/components/ui/skeleton.d.ts +3 -0
- package/console/dist/ui/components/ui/skeleton.js +6 -0
- package/console/dist/ui/components/ui/sonner.d.ts +3 -0
- package/console/dist/ui/components/ui/sonner.js +13 -0
- package/console/dist/ui/components/ui/tooltip.d.ts +7 -0
- package/console/dist/ui/components/ui/tooltip.js +10 -0
- package/console/dist/ui/hooks/useAutoRefresh.d.ts +13 -0
- package/console/dist/ui/hooks/useAutoRefresh.js +64 -0
- package/console/dist/ui/hooks/useBookmarks.d.ts +6 -0
- package/console/dist/ui/hooks/useBookmarks.js +43 -0
- package/console/dist/ui/hooks/useDebounce.d.ts +2 -0
- package/console/dist/ui/hooks/useDebounce.js +32 -0
- package/console/dist/ui/hooks/useKeyboardNavigation.d.ts +14 -0
- package/console/dist/ui/hooks/useKeyboardNavigation.js +75 -0
- package/console/dist/ui/i18n/en.json +530 -0
- package/console/dist/ui/i18n/index.d.ts +2 -0
- package/console/dist/ui/i18n/index.js +21 -0
- package/console/dist/ui/i18n/zh-CN.json +530 -0
- package/console/dist/ui/main.d.ts +1 -0
- package/console/dist/ui/main.js +8 -0
- package/console/dist/ui/pages/AgentsPage.d.ts +1 -0
- package/console/dist/ui/pages/AgentsPage.js +167 -0
- package/console/dist/ui/pages/ApprovalsPage.d.ts +1 -0
- package/console/dist/ui/pages/ApprovalsPage.js +123 -0
- package/console/dist/ui/pages/CentralPage.d.ts +1 -0
- package/console/dist/ui/pages/CentralPage.js +57 -0
- package/console/dist/ui/pages/DataFlowPage.d.ts +1 -0
- package/console/dist/ui/pages/DataFlowPage.js +158 -0
- package/console/dist/ui/pages/EventLogPage.d.ts +1 -0
- package/console/dist/ui/pages/EventLogPage.js +176 -0
- package/console/dist/ui/pages/EvolutionPage.d.ts +1 -0
- package/console/dist/ui/pages/EvolutionPage.js +118 -0
- package/console/dist/ui/pages/FeedbackPage.d.ts +1 -0
- package/console/dist/ui/pages/FeedbackPage.js +46 -0
- package/console/dist/ui/pages/GatesPage.d.ts +1 -0
- package/console/dist/ui/pages/GatesPage.js +31 -0
- package/console/dist/ui/pages/LoginPage.d.ts +5 -0
- package/console/dist/ui/pages/LoginPage.js +39 -0
- package/console/dist/ui/pages/OverviewPage.d.ts +1 -0
- package/console/dist/ui/pages/OverviewPage.js +50 -0
- package/console/dist/ui/pages/PainPage.d.ts +1 -0
- package/console/dist/ui/pages/PainPage.js +50 -0
- package/console/dist/ui/pages/PrincipleDetailPage.d.ts +1 -0
- package/console/dist/ui/pages/PrincipleDetailPage.js +145 -0
- package/console/dist/ui/pages/PrinciplesPage.d.ts +1 -0
- package/console/dist/ui/pages/PrinciplesPage.js +322 -0
- package/console/dist/ui/pages/SamplesPage.d.ts +1 -0
- package/console/dist/ui/pages/SamplesPage.js +105 -0
- package/console/dist/ui/pages/SettingsPage.d.ts +1 -0
- package/console/dist/ui/pages/SettingsPage.js +86 -0
- package/console/dist/ui/pages/TasksPage.d.ts +1 -0
- package/console/dist/ui/pages/TasksPage.js +373 -0
- package/console/dist/ui/pages/ThinkingModelsPage.d.ts +1 -0
- package/console/dist/ui/pages/ThinkingModelsPage.js +32 -0
- package/console/dist/ui/pages/UpdatePage.d.ts +1 -0
- package/console/dist/ui/pages/UpdatePage.js +142 -0
- package/console/dist/ui/utils/format.d.ts +3 -0
- package/console/dist/ui/utils/format.js +20 -0
- package/console/dist/ui/utils/navigation.d.ts +9 -0
- package/console/dist/ui/utils/navigation.js +7 -0
- package/console/dist/web/assets/app.css +2828 -0
- package/console/dist/web/assets/app.js +46353 -0
- package/console/dist/web/index.html +13 -0
- package/console/package.json +53 -0
- package/core/dist/adapters/code-review/code-review-pain-adapter.d.ts +13 -0
- package/core/dist/adapters/code-review/code-review-pain-adapter.d.ts.map +1 -0
- package/core/dist/adapters/code-review/code-review-pain-adapter.js +139 -0
- package/core/dist/adapters/code-review/code-review-pain-adapter.js.map +1 -0
- package/core/dist/adapters/code-review/index.d.ts +6 -0
- package/core/dist/adapters/code-review/index.d.ts.map +1 -0
- package/core/dist/adapters/code-review/index.js +2 -0
- package/core/dist/adapters/code-review/index.js.map +1 -0
- package/core/dist/adapters/code-review/review-event-types.d.ts +54 -0
- package/core/dist/adapters/code-review/review-event-types.d.ts.map +1 -0
- package/core/dist/adapters/code-review/review-event-types.js +8 -0
- package/core/dist/adapters/code-review/review-event-types.js.map +1 -0
- package/core/dist/adapters/coding/index.d.ts +6 -0
- package/core/dist/adapters/coding/index.d.ts.map +1 -0
- package/core/dist/adapters/coding/index.js +5 -0
- package/core/dist/adapters/coding/index.js.map +1 -0
- package/core/dist/adapters/coding/openclaw-event-types.d.ts +26 -0
- package/core/dist/adapters/coding/openclaw-event-types.d.ts.map +1 -0
- package/core/dist/adapters/coding/openclaw-event-types.js +9 -0
- package/core/dist/adapters/coding/openclaw-event-types.js.map +1 -0
- package/core/dist/adapters/coding/openclaw-pain-adapter.d.ts +27 -0
- package/core/dist/adapters/coding/openclaw-pain-adapter.d.ts.map +1 -0
- package/core/dist/adapters/coding/openclaw-pain-adapter.js +102 -0
- package/core/dist/adapters/coding/openclaw-pain-adapter.js.map +1 -0
- package/core/dist/adapters/writing/index.d.ts +6 -0
- package/core/dist/adapters/writing/index.d.ts.map +1 -0
- package/core/dist/adapters/writing/index.js +5 -0
- package/core/dist/adapters/writing/index.js.map +1 -0
- package/core/dist/adapters/writing/writing-pain-adapter.d.ts +22 -0
- package/core/dist/adapters/writing/writing-pain-adapter.d.ts.map +1 -0
- package/core/dist/adapters/writing/writing-pain-adapter.js +62 -0
- package/core/dist/adapters/writing/writing-pain-adapter.js.map +1 -0
- package/core/dist/adapters/writing/writing-types.d.ts +34 -0
- package/core/dist/adapters/writing/writing-types.d.ts.map +1 -0
- package/core/dist/adapters/writing/writing-types.js +9 -0
- package/core/dist/adapters/writing/writing-types.js.map +1 -0
- package/core/dist/evolution-hook.d.ts +70 -0
- package/core/dist/evolution-hook.d.ts.map +1 -0
- package/core/dist/evolution-hook.js +10 -0
- package/core/dist/evolution-hook.js.map +1 -0
- package/core/dist/evolution-store.d.ts +56 -0
- package/core/dist/evolution-store.d.ts.map +1 -0
- package/core/dist/evolution-store.js +150 -0
- package/core/dist/evolution-store.js.map +1 -0
- package/core/dist/index.d.ts +62 -0
- package/core/dist/index.d.ts.map +1 -0
- package/core/dist/index.js +64 -0
- package/core/dist/index.js.map +1 -0
- package/core/dist/io.d.ts +36 -0
- package/core/dist/io.d.ts.map +1 -0
- package/core/dist/io.js +99 -0
- package/core/dist/io.js.map +1 -0
- package/core/dist/pain-flag-resolver.d.ts +18 -0
- package/core/dist/pain-flag-resolver.d.ts.map +1 -0
- package/core/dist/pain-flag-resolver.js +21 -0
- package/core/dist/pain-flag-resolver.js.map +1 -0
- package/core/dist/pain-recorder.d.ts +38 -0
- package/core/dist/pain-recorder.d.ts.map +1 -0
- package/core/dist/pain-recorder.js +62 -0
- package/core/dist/pain-recorder.js.map +1 -0
- package/core/dist/pain-signal-adapter.d.ts +37 -0
- package/core/dist/pain-signal-adapter.d.ts.map +1 -0
- package/core/dist/pain-signal-adapter.js +2 -0
- package/core/dist/pain-signal-adapter.js.map +1 -0
- package/core/dist/pain-signal.d.ts +76 -0
- package/core/dist/pain-signal.d.ts.map +1 -0
- package/core/dist/pain-signal.js +125 -0
- package/core/dist/pain-signal.js.map +1 -0
- package/core/dist/principle-injector.d.ts +67 -0
- package/core/dist/principle-injector.d.ts.map +1 -0
- package/core/dist/principle-injector.js +89 -0
- package/core/dist/principle-injector.js.map +1 -0
- package/core/dist/principle-tree-ledger.d.ts +106 -0
- package/core/dist/principle-tree-ledger.d.ts.map +1 -0
- package/core/dist/principle-tree-ledger.js +254 -0
- package/core/dist/principle-tree-ledger.js.map +1 -0
- package/core/dist/prompt-builder/__tests__/empathy-keyword-matching.test.d.ts +2 -0
- package/core/dist/prompt-builder/__tests__/empathy-keyword-matching.test.d.ts.map +1 -0
- package/core/dist/prompt-builder/__tests__/empathy-keyword-matching.test.js +380 -0
- package/core/dist/prompt-builder/__tests__/empathy-keyword-matching.test.js.map +1 -0
- package/core/dist/prompt-builder/__tests__/focus-compression.test.d.ts +2 -0
- package/core/dist/prompt-builder/__tests__/focus-compression.test.d.ts.map +1 -0
- package/core/dist/prompt-builder/__tests__/focus-compression.test.js +265 -0
- package/core/dist/prompt-builder/__tests__/focus-compression.test.js.map +1 -0
- package/core/dist/prompt-builder/__tests__/principle-selection.test.d.ts +7 -0
- package/core/dist/prompt-builder/__tests__/principle-selection.test.d.ts.map +1 -0
- package/core/dist/prompt-builder/__tests__/principle-selection.test.js +214 -0
- package/core/dist/prompt-builder/__tests__/principle-selection.test.js.map +1 -0
- package/core/dist/prompt-builder/__tests__/prompt-builder-core.test.d.ts +7 -0
- package/core/dist/prompt-builder/__tests__/prompt-builder-core.test.d.ts.map +1 -0
- package/core/dist/prompt-builder/__tests__/prompt-builder-core.test.js +283 -0
- package/core/dist/prompt-builder/__tests__/prompt-builder-core.test.js.map +1 -0
- package/core/dist/prompt-builder/__tests__/routing-guidance.test.d.ts +11 -0
- package/core/dist/prompt-builder/__tests__/routing-guidance.test.d.ts.map +1 -0
- package/core/dist/prompt-builder/__tests__/routing-guidance.test.js +305 -0
- package/core/dist/prompt-builder/__tests__/routing-guidance.test.js.map +1 -0
- package/core/dist/prompt-builder/attitude-directive.d.ts +7 -0
- package/core/dist/prompt-builder/attitude-directive.d.ts.map +1 -0
- package/core/dist/prompt-builder/attitude-directive.js +39 -0
- package/core/dist/prompt-builder/attitude-directive.js.map +1 -0
- package/core/dist/prompt-builder/correction-cue.d.ts +15 -0
- package/core/dist/prompt-builder/correction-cue.d.ts.map +1 -0
- package/core/dist/prompt-builder/correction-cue.js +39 -0
- package/core/dist/prompt-builder/correction-cue.js.map +1 -0
- package/core/dist/prompt-builder/empathy-keyword-matching.d.ts +30 -0
- package/core/dist/prompt-builder/empathy-keyword-matching.d.ts.map +1 -0
- package/core/dist/prompt-builder/empathy-keyword-matching.js +142 -0
- package/core/dist/prompt-builder/empathy-keyword-matching.js.map +1 -0
- package/core/dist/prompt-builder/empathy-types.d.ts +62 -0
- package/core/dist/prompt-builder/empathy-types.d.ts.map +1 -0
- package/core/dist/prompt-builder/empathy-types.js +88 -0
- package/core/dist/prompt-builder/empathy-types.js.map +1 -0
- package/core/dist/prompt-builder/focus-compression.d.ts +63 -0
- package/core/dist/prompt-builder/focus-compression.d.ts.map +1 -0
- package/core/dist/prompt-builder/focus-compression.js +448 -0
- package/core/dist/prompt-builder/focus-compression.js.map +1 -0
- package/core/dist/prompt-builder/index.d.ts +29 -0
- package/core/dist/prompt-builder/index.d.ts.map +1 -0
- package/core/dist/prompt-builder/index.js +27 -0
- package/core/dist/prompt-builder/index.js.map +1 -0
- package/core/dist/prompt-builder/message-extraction.d.ts +7 -0
- package/core/dist/prompt-builder/message-extraction.d.ts.map +1 -0
- package/core/dist/prompt-builder/message-extraction.js +23 -0
- package/core/dist/prompt-builder/message-extraction.js.map +1 -0
- package/core/dist/prompt-builder/minimal-trigger.d.ts +7 -0
- package/core/dist/prompt-builder/minimal-trigger.d.ts.map +1 -0
- package/core/dist/prompt-builder/minimal-trigger.js +11 -0
- package/core/dist/prompt-builder/minimal-trigger.js.map +1 -0
- package/core/dist/prompt-builder/principle-selection.d.ts +68 -0
- package/core/dist/prompt-builder/principle-selection.d.ts.map +1 -0
- package/core/dist/prompt-builder/principle-selection.js +140 -0
- package/core/dist/prompt-builder/principle-selection.js.map +1 -0
- package/core/dist/prompt-builder/routing-guidance.d.ts +64 -0
- package/core/dist/prompt-builder/routing-guidance.d.ts.map +1 -0
- package/core/dist/prompt-builder/routing-guidance.js +227 -0
- package/core/dist/prompt-builder/routing-guidance.js.map +1 -0
- package/core/dist/prompt-builder/size-guard.d.ts +35 -0
- package/core/dist/prompt-builder/size-guard.d.ts.map +1 -0
- package/core/dist/prompt-builder/size-guard.js +144 -0
- package/core/dist/prompt-builder/size-guard.js.map +1 -0
- package/core/dist/prompt-builder/types.d.ts +28 -0
- package/core/dist/prompt-builder/types.d.ts.map +1 -0
- package/core/dist/prompt-builder/types.js +7 -0
- package/core/dist/prompt-builder/types.js.map +1 -0
- package/core/dist/runtime-v2/__tests__/admission-gate.test.d.ts +2 -0
- package/core/dist/runtime-v2/__tests__/admission-gate.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/__tests__/admission-gate.test.js +126 -0
- package/core/dist/runtime-v2/__tests__/admission-gate.test.js.map +1 -0
- package/core/dist/runtime-v2/__tests__/architecture-regression.test.d.ts +2 -0
- package/core/dist/runtime-v2/__tests__/architecture-regression.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/__tests__/architecture-regression.test.js +2990 -0
- package/core/dist/runtime-v2/__tests__/architecture-regression.test.js.map +1 -0
- package/core/dist/runtime-v2/__tests__/artificer-runner-vslice.test.d.ts +2 -0
- package/core/dist/runtime-v2/__tests__/artificer-runner-vslice.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/__tests__/artificer-runner-vslice.test.js +608 -0
- package/core/dist/runtime-v2/__tests__/artificer-runner-vslice.test.js.map +1 -0
- package/core/dist/runtime-v2/__tests__/attack-e2e-pipeline-smoke.test.d.ts +20 -0
- package/core/dist/runtime-v2/__tests__/attack-e2e-pipeline-smoke.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/__tests__/attack-e2e-pipeline-smoke.test.js +473 -0
- package/core/dist/runtime-v2/__tests__/attack-e2e-pipeline-smoke.test.js.map +1 -0
- package/core/dist/runtime-v2/__tests__/candidate-audit.test.d.ts +2 -0
- package/core/dist/runtime-v2/__tests__/candidate-audit.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/__tests__/candidate-audit.test.js +100 -0
- package/core/dist/runtime-v2/__tests__/candidate-audit.test.js.map +1 -0
- package/core/dist/runtime-v2/__tests__/chain-integrity-attack.test.d.ts +2 -0
- package/core/dist/runtime-v2/__tests__/chain-integrity-attack.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/__tests__/chain-integrity-attack.test.js +276 -0
- package/core/dist/runtime-v2/__tests__/chain-integrity-attack.test.js.map +1 -0
- package/core/dist/runtime-v2/__tests__/chain-integrity-real-path.test.d.ts +2 -0
- package/core/dist/runtime-v2/__tests__/chain-integrity-real-path.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/__tests__/chain-integrity-real-path.test.js +561 -0
- package/core/dist/runtime-v2/__tests__/chain-integrity-real-path.test.js.map +1 -0
- package/core/dist/runtime-v2/__tests__/control-plane-triage.test.d.ts +2 -0
- package/core/dist/runtime-v2/__tests__/control-plane-triage.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/__tests__/control-plane-triage.test.js +107 -0
- package/core/dist/runtime-v2/__tests__/control-plane-triage.test.js.map +1 -0
- package/core/dist/runtime-v2/__tests__/correction-proposal.test.d.ts +2 -0
- package/core/dist/runtime-v2/__tests__/correction-proposal.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/__tests__/correction-proposal.test.js +486 -0
- package/core/dist/runtime-v2/__tests__/correction-proposal.test.js.map +1 -0
- package/core/dist/runtime-v2/__tests__/dreamer-output-validator.test.d.ts +2 -0
- package/core/dist/runtime-v2/__tests__/dreamer-output-validator.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/__tests__/dreamer-output-validator.test.js +171 -0
- package/core/dist/runtime-v2/__tests__/dreamer-output-validator.test.js.map +1 -0
- package/core/dist/runtime-v2/__tests__/dreamer-runner-real-llm.test.d.ts +2 -0
- package/core/dist/runtime-v2/__tests__/dreamer-runner-real-llm.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/__tests__/dreamer-runner-real-llm.test.js +155 -0
- package/core/dist/runtime-v2/__tests__/dreamer-runner-real-llm.test.js.map +1 -0
- package/core/dist/runtime-v2/__tests__/dreamer-runner-vslice.test.d.ts +2 -0
- package/core/dist/runtime-v2/__tests__/dreamer-runner-vslice.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/__tests__/dreamer-runner-vslice.test.js +515 -0
- package/core/dist/runtime-v2/__tests__/dreamer-runner-vslice.test.js.map +1 -0
- package/core/dist/runtime-v2/__tests__/dreamer-runner.test.d.ts +2 -0
- package/core/dist/runtime-v2/__tests__/dreamer-runner.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/__tests__/dreamer-runner.test.js +348 -0
- package/core/dist/runtime-v2/__tests__/dreamer-runner.test.js.map +1 -0
- package/core/dist/runtime-v2/__tests__/error-categories.test.d.ts +2 -0
- package/core/dist/runtime-v2/__tests__/error-categories.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/__tests__/error-categories.test.js +149 -0
- package/core/dist/runtime-v2/__tests__/error-categories.test.js.map +1 -0
- package/core/dist/runtime-v2/__tests__/evaluator-runner-vslice.test.d.ts +2 -0
- package/core/dist/runtime-v2/__tests__/evaluator-runner-vslice.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/__tests__/evaluator-runner-vslice.test.js +1047 -0
- package/core/dist/runtime-v2/__tests__/evaluator-runner-vslice.test.js.map +1 -0
- package/core/dist/runtime-v2/__tests__/fixtures/index.d.ts +4 -0
- package/core/dist/runtime-v2/__tests__/fixtures/index.d.ts.map +1 -0
- package/core/dist/runtime-v2/__tests__/fixtures/index.js +3 -0
- package/core/dist/runtime-v2/__tests__/fixtures/index.js.map +1 -0
- package/core/dist/runtime-v2/__tests__/fixtures/llm-e2e-config.d.ts +20 -0
- package/core/dist/runtime-v2/__tests__/fixtures/llm-e2e-config.d.ts.map +1 -0
- package/core/dist/runtime-v2/__tests__/fixtures/llm-e2e-config.js +39 -0
- package/core/dist/runtime-v2/__tests__/fixtures/llm-e2e-config.js.map +1 -0
- package/core/dist/runtime-v2/__tests__/fixtures/llm-e2e-config.test.d.ts +2 -0
- package/core/dist/runtime-v2/__tests__/fixtures/llm-e2e-config.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/__tests__/fixtures/llm-e2e-config.test.js +111 -0
- package/core/dist/runtime-v2/__tests__/fixtures/llm-e2e-config.test.js.map +1 -0
- package/core/dist/runtime-v2/__tests__/fixtures/test-helpers.d.ts +20 -0
- package/core/dist/runtime-v2/__tests__/fixtures/test-helpers.d.ts.map +1 -0
- package/core/dist/runtime-v2/__tests__/fixtures/test-helpers.js +37 -0
- package/core/dist/runtime-v2/__tests__/fixtures/test-helpers.js.map +1 -0
- package/core/dist/runtime-v2/__tests__/full-chain-real-llm.test.d.ts +2 -0
- package/core/dist/runtime-v2/__tests__/full-chain-real-llm.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/__tests__/full-chain-real-llm.test.js +152 -0
- package/core/dist/runtime-v2/__tests__/full-chain-real-llm.test.js.map +1 -0
- package/core/dist/runtime-v2/__tests__/full-trace-contract.test.d.ts +2 -0
- package/core/dist/runtime-v2/__tests__/full-trace-contract.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/__tests__/full-trace-contract.test.js +552 -0
- package/core/dist/runtime-v2/__tests__/full-trace-contract.test.js.map +1 -0
- package/core/dist/runtime-v2/__tests__/gfi-workspace-health.test.d.ts +2 -0
- package/core/dist/runtime-v2/__tests__/gfi-workspace-health.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/__tests__/gfi-workspace-health.test.js +128 -0
- package/core/dist/runtime-v2/__tests__/gfi-workspace-health.test.js.map +1 -0
- package/core/dist/runtime-v2/__tests__/golden-trace-candidate-builder.test.d.ts +2 -0
- package/core/dist/runtime-v2/__tests__/golden-trace-candidate-builder.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/__tests__/golden-trace-candidate-builder.test.js +759 -0
- package/core/dist/runtime-v2/__tests__/golden-trace-candidate-builder.test.js.map +1 -0
- package/core/dist/runtime-v2/__tests__/golden-trace-replay-validator.test.d.ts +2 -0
- package/core/dist/runtime-v2/__tests__/golden-trace-replay-validator.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/__tests__/golden-trace-replay-validator.test.js +231 -0
- package/core/dist/runtime-v2/__tests__/golden-trace-replay-validator.test.js.map +1 -0
- package/core/dist/runtime-v2/__tests__/golden-trace.test.d.ts +2 -0
- package/core/dist/runtime-v2/__tests__/golden-trace.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/__tests__/golden-trace.test.js +335 -0
- package/core/dist/runtime-v2/__tests__/golden-trace.test.js.map +1 -0
- package/core/dist/runtime-v2/__tests__/intake-to-internalization-bridge.test.d.ts +2 -0
- package/core/dist/runtime-v2/__tests__/intake-to-internalization-bridge.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/__tests__/intake-to-internalization-bridge.test.js +307 -0
- package/core/dist/runtime-v2/__tests__/intake-to-internalization-bridge.test.js.map +1 -0
- package/core/dist/runtime-v2/__tests__/internalization-chain-integrity-read-model.test.d.ts +2 -0
- package/core/dist/runtime-v2/__tests__/internalization-chain-integrity-read-model.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/__tests__/internalization-chain-integrity-read-model.test.js +268 -0
- package/core/dist/runtime-v2/__tests__/internalization-chain-integrity-read-model.test.js.map +1 -0
- package/core/dist/runtime-v2/__tests__/internalization-contracts.test.d.ts +2 -0
- package/core/dist/runtime-v2/__tests__/internalization-contracts.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/__tests__/internalization-contracts.test.js +78 -0
- package/core/dist/runtime-v2/__tests__/internalization-contracts.test.js.map +1 -0
- package/core/dist/runtime-v2/__tests__/internalization-integrity-remediation.test.d.ts +2 -0
- package/core/dist/runtime-v2/__tests__/internalization-integrity-remediation.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/__tests__/internalization-integrity-remediation.test.js +218 -0
- package/core/dist/runtime-v2/__tests__/internalization-integrity-remediation.test.js.map +1 -0
- package/core/dist/runtime-v2/__tests__/internalization-orchestrator.test.d.ts +2 -0
- package/core/dist/runtime-v2/__tests__/internalization-orchestrator.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/__tests__/internalization-orchestrator.test.js +569 -0
- package/core/dist/runtime-v2/__tests__/internalization-orchestrator.test.js.map +1 -0
- package/core/dist/runtime-v2/__tests__/internalization-peer-runner-contracts.test.d.ts +2 -0
- package/core/dist/runtime-v2/__tests__/internalization-peer-runner-contracts.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/__tests__/internalization-peer-runner-contracts.test.js +448 -0
- package/core/dist/runtime-v2/__tests__/internalization-peer-runner-contracts.test.js.map +1 -0
- package/core/dist/runtime-v2/__tests__/internalization-queue-read-model.test.d.ts +2 -0
- package/core/dist/runtime-v2/__tests__/internalization-queue-read-model.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/__tests__/internalization-queue-read-model.test.js +415 -0
- package/core/dist/runtime-v2/__tests__/internalization-queue-read-model.test.js.map +1 -0
- package/core/dist/runtime-v2/__tests__/internalization-route.test.d.ts +2 -0
- package/core/dist/runtime-v2/__tests__/internalization-route.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/__tests__/internalization-route.test.js +136 -0
- package/core/dist/runtime-v2/__tests__/internalization-route.test.js.map +1 -0
- package/core/dist/runtime-v2/__tests__/internalization-state-machine.test.d.ts +2 -0
- package/core/dist/runtime-v2/__tests__/internalization-state-machine.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/__tests__/internalization-state-machine.test.js +679 -0
- package/core/dist/runtime-v2/__tests__/internalization-state-machine.test.js.map +1 -0
- package/core/dist/runtime-v2/__tests__/l1-hard-cap.test.d.ts +2 -0
- package/core/dist/runtime-v2/__tests__/l1-hard-cap.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/__tests__/l1-hard-cap.test.js +157 -0
- package/core/dist/runtime-v2/__tests__/l1-hard-cap.test.js.map +1 -0
- package/core/dist/runtime-v2/__tests__/operator-health-cold-start-guard.test.d.ts +2 -0
- package/core/dist/runtime-v2/__tests__/operator-health-cold-start-guard.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/__tests__/operator-health-cold-start-guard.test.js +102 -0
- package/core/dist/runtime-v2/__tests__/operator-health-cold-start-guard.test.js.map +1 -0
- package/core/dist/runtime-v2/__tests__/operator-health-gfi-degraded.test.d.ts +2 -0
- package/core/dist/runtime-v2/__tests__/operator-health-gfi-degraded.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/__tests__/operator-health-gfi-degraded.test.js +148 -0
- package/core/dist/runtime-v2/__tests__/operator-health-gfi-degraded.test.js.map +1 -0
- package/core/dist/runtime-v2/__tests__/operator-health-gfi.test.d.ts +2 -0
- package/core/dist/runtime-v2/__tests__/operator-health-gfi.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/__tests__/operator-health-gfi.test.js +113 -0
- package/core/dist/runtime-v2/__tests__/operator-health-gfi.test.js.map +1 -0
- package/core/dist/runtime-v2/__tests__/operator-health-read-model.test.d.ts +2 -0
- package/core/dist/runtime-v2/__tests__/operator-health-read-model.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/__tests__/operator-health-read-model.test.js +136 -0
- package/core/dist/runtime-v2/__tests__/operator-health-read-model.test.js.map +1 -0
- package/core/dist/runtime-v2/__tests__/pain-chain-read-model.test.d.ts +2 -0
- package/core/dist/runtime-v2/__tests__/pain-chain-read-model.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/__tests__/pain-chain-read-model.test.js +248 -0
- package/core/dist/runtime-v2/__tests__/pain-chain-read-model.test.js.map +1 -0
- package/core/dist/runtime-v2/__tests__/pain-evidence-contract.test.d.ts +2 -0
- package/core/dist/runtime-v2/__tests__/pain-evidence-contract.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/__tests__/pain-evidence-contract.test.js +328 -0
- package/core/dist/runtime-v2/__tests__/pain-evidence-contract.test.js.map +1 -0
- package/core/dist/runtime-v2/__tests__/pain-flood-simulation.test.d.ts +2 -0
- package/core/dist/runtime-v2/__tests__/pain-flood-simulation.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/__tests__/pain-flood-simulation.test.js +267 -0
- package/core/dist/runtime-v2/__tests__/pain-flood-simulation.test.js.map +1 -0
- package/core/dist/runtime-v2/__tests__/pain-signal-bridge-retried.test.d.ts +2 -0
- package/core/dist/runtime-v2/__tests__/pain-signal-bridge-retried.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/__tests__/pain-signal-bridge-retried.test.js +147 -0
- package/core/dist/runtime-v2/__tests__/pain-signal-bridge-retried.test.js.map +1 -0
- package/core/dist/runtime-v2/__tests__/pain-signal-observability.test.d.ts +2 -0
- package/core/dist/runtime-v2/__tests__/pain-signal-observability.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/__tests__/pain-signal-observability.test.js +151 -0
- package/core/dist/runtime-v2/__tests__/pain-signal-observability.test.js.map +1 -0
- package/core/dist/runtime-v2/__tests__/pain-to-principle-service.test.d.ts +2 -0
- package/core/dist/runtime-v2/__tests__/pain-to-principle-service.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/__tests__/pain-to-principle-service.test.js +209 -0
- package/core/dist/runtime-v2/__tests__/pain-to-principle-service.test.js.map +1 -0
- package/core/dist/runtime-v2/__tests__/philosopher-runner-real-llm.test.d.ts +2 -0
- package/core/dist/runtime-v2/__tests__/philosopher-runner-real-llm.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/__tests__/philosopher-runner-real-llm.test.js +167 -0
- package/core/dist/runtime-v2/__tests__/philosopher-runner-real-llm.test.js.map +1 -0
- package/core/dist/runtime-v2/__tests__/philosopher-runner-vslice.test.d.ts +2 -0
- package/core/dist/runtime-v2/__tests__/philosopher-runner-vslice.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/__tests__/philosopher-runner-vslice.test.js +338 -0
- package/core/dist/runtime-v2/__tests__/philosopher-runner-vslice.test.js.map +1 -0
- package/core/dist/runtime-v2/__tests__/pi-artifact-store.test.d.ts +2 -0
- package/core/dist/runtime-v2/__tests__/pi-artifact-store.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/__tests__/pi-artifact-store.test.js +247 -0
- package/core/dist/runtime-v2/__tests__/pi-artifact-store.test.js.map +1 -0
- package/core/dist/runtime-v2/__tests__/pitask-metadata.test.d.ts +8 -0
- package/core/dist/runtime-v2/__tests__/pitask-metadata.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/__tests__/pitask-metadata.test.js +333 -0
- package/core/dist/runtime-v2/__tests__/pitask-metadata.test.js.map +1 -0
- package/core/dist/runtime-v2/__tests__/principle-compiler-core.test.d.ts +2 -0
- package/core/dist/runtime-v2/__tests__/principle-compiler-core.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/__tests__/principle-compiler-core.test.js +141 -0
- package/core/dist/runtime-v2/__tests__/principle-compiler-core.test.js.map +1 -0
- package/core/dist/runtime-v2/__tests__/production-canary-fixture-gate.test.d.ts +2 -0
- package/core/dist/runtime-v2/__tests__/production-canary-fixture-gate.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/__tests__/production-canary-fixture-gate.test.js +524 -0
- package/core/dist/runtime-v2/__tests__/production-canary-fixture-gate.test.js.map +1 -0
- package/core/dist/runtime-v2/__tests__/proven-channel-baseline.test.d.ts +2 -0
- package/core/dist/runtime-v2/__tests__/proven-channel-baseline.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/__tests__/proven-channel-baseline.test.js +428 -0
- package/core/dist/runtime-v2/__tests__/proven-channel-baseline.test.js.map +1 -0
- package/core/dist/runtime-v2/__tests__/pruning-read-model.test.d.ts +2 -0
- package/core/dist/runtime-v2/__tests__/pruning-read-model.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/__tests__/pruning-read-model.test.js +783 -0
- package/core/dist/runtime-v2/__tests__/pruning-read-model.test.js.map +1 -0
- package/core/dist/runtime-v2/__tests__/pruning-review-log.test.d.ts +2 -0
- package/core/dist/runtime-v2/__tests__/pruning-review-log.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/__tests__/pruning-review-log.test.js +159 -0
- package/core/dist/runtime-v2/__tests__/pruning-review-log.test.js.map +1 -0
- package/core/dist/runtime-v2/__tests__/recovery-sweep-service.test.d.ts +2 -0
- package/core/dist/runtime-v2/__tests__/recovery-sweep-service.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/__tests__/recovery-sweep-service.test.js +83 -0
- package/core/dist/runtime-v2/__tests__/recovery-sweep-service.test.js.map +1 -0
- package/core/dist/runtime-v2/__tests__/remediation-contract.test.d.ts +2 -0
- package/core/dist/runtime-v2/__tests__/remediation-contract.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/__tests__/remediation-contract.test.js +39 -0
- package/core/dist/runtime-v2/__tests__/remediation-contract.test.js.map +1 -0
- package/core/dist/runtime-v2/__tests__/rollout-reviewer-runner-vslice.test.d.ts +2 -0
- package/core/dist/runtime-v2/__tests__/rollout-reviewer-runner-vslice.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/__tests__/rollout-reviewer-runner-vslice.test.js +658 -0
- package/core/dist/runtime-v2/__tests__/rollout-reviewer-runner-vslice.test.js.map +1 -0
- package/core/dist/runtime-v2/__tests__/rule-host-evaluator.test.d.ts +2 -0
- package/core/dist/runtime-v2/__tests__/rule-host-evaluator.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/__tests__/rule-host-evaluator.test.js +509 -0
- package/core/dist/runtime-v2/__tests__/rule-host-evaluator.test.js.map +1 -0
- package/core/dist/runtime-v2/__tests__/rulehost-oob-defense-simulation.test.d.ts +2 -0
- package/core/dist/runtime-v2/__tests__/rulehost-oob-defense-simulation.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/__tests__/rulehost-oob-defense-simulation.test.js +535 -0
- package/core/dist/runtime-v2/__tests__/rulehost-oob-defense-simulation.test.js.map +1 -0
- package/core/dist/runtime-v2/__tests__/runtime-config-boundary.test.d.ts +2 -0
- package/core/dist/runtime-v2/__tests__/runtime-config-boundary.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/__tests__/runtime-config-boundary.test.js +256 -0
- package/core/dist/runtime-v2/__tests__/runtime-config-boundary.test.js.map +1 -0
- package/core/dist/runtime-v2/__tests__/runtime-state-handle.test.d.ts +2 -0
- package/core/dist/runtime-v2/__tests__/runtime-state-handle.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/__tests__/runtime-state-handle.test.js +76 -0
- package/core/dist/runtime-v2/__tests__/runtime-state-handle.test.js.map +1 -0
- package/core/dist/runtime-v2/__tests__/schema-conformance-read-model.test.d.ts +2 -0
- package/core/dist/runtime-v2/__tests__/schema-conformance-read-model.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/__tests__/schema-conformance-read-model.test.js +208 -0
- package/core/dist/runtime-v2/__tests__/schema-conformance-read-model.test.js.map +1 -0
- package/core/dist/runtime-v2/__tests__/scribe-runner-real-llm.test.d.ts +2 -0
- package/core/dist/runtime-v2/__tests__/scribe-runner-real-llm.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/__tests__/scribe-runner-real-llm.test.js +156 -0
- package/core/dist/runtime-v2/__tests__/scribe-runner-real-llm.test.js.map +1 -0
- package/core/dist/runtime-v2/__tests__/scribe-runner-vslice.test.d.ts +2 -0
- package/core/dist/runtime-v2/__tests__/scribe-runner-vslice.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/__tests__/scribe-runner-vslice.test.js +430 -0
- package/core/dist/runtime-v2/__tests__/scribe-runner-vslice.test.js.map +1 -0
- package/core/dist/runtime-v2/__tests__/sqlite-confirm-first-state-store.test.d.ts +2 -0
- package/core/dist/runtime-v2/__tests__/sqlite-confirm-first-state-store.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/__tests__/sqlite-confirm-first-state-store.test.js +148 -0
- package/core/dist/runtime-v2/__tests__/sqlite-confirm-first-state-store.test.js.map +1 -0
- package/core/dist/runtime-v2/__tests__/sqlite-connection-readonly.test.d.ts +2 -0
- package/core/dist/runtime-v2/__tests__/sqlite-connection-readonly.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/__tests__/sqlite-connection-readonly.test.js +95 -0
- package/core/dist/runtime-v2/__tests__/sqlite-connection-readonly.test.js.map +1 -0
- package/core/dist/runtime-v2/__tests__/story-a-demo.test.d.ts +2 -0
- package/core/dist/runtime-v2/__tests__/story-a-demo.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/__tests__/story-a-demo.test.js +257 -0
- package/core/dist/runtime-v2/__tests__/story-a-demo.test.js.map +1 -0
- package/core/dist/runtime-v2/__tests__/synthetic-baseline.test.d.ts +2 -0
- package/core/dist/runtime-v2/__tests__/synthetic-baseline.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/__tests__/synthetic-baseline.test.js +155 -0
- package/core/dist/runtime-v2/__tests__/synthetic-baseline.test.js.map +1 -0
- package/core/dist/runtime-v2/__tests__/task-state-semantics.test.d.ts +2 -0
- package/core/dist/runtime-v2/__tests__/task-state-semantics.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/__tests__/task-state-semantics.test.js +145 -0
- package/core/dist/runtime-v2/__tests__/task-state-semantics.test.js.map +1 -0
- package/core/dist/runtime-v2/__tests__/task-three-strikes.test.d.ts +2 -0
- package/core/dist/runtime-v2/__tests__/task-three-strikes.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/__tests__/task-three-strikes.test.js +268 -0
- package/core/dist/runtime-v2/__tests__/task-three-strikes.test.js.map +1 -0
- package/core/dist/runtime-v2/__tests__/trace-refiner-agent.test.d.ts +2 -0
- package/core/dist/runtime-v2/__tests__/trace-refiner-agent.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/__tests__/trace-refiner-agent.test.js +726 -0
- package/core/dist/runtime-v2/__tests__/trace-refiner-agent.test.js.map +1 -0
- package/core/dist/runtime-v2/__tests__/trace-refiner.test.d.ts +2 -0
- package/core/dist/runtime-v2/__tests__/trace-refiner.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/__tests__/trace-refiner.test.js +527 -0
- package/core/dist/runtime-v2/__tests__/trace-refiner.test.js.map +1 -0
- package/core/dist/runtime-v2/__tests__/trainer-output-validator.test.d.ts +2 -0
- package/core/dist/runtime-v2/__tests__/trainer-output-validator.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/__tests__/trainer-output-validator.test.js +257 -0
- package/core/dist/runtime-v2/__tests__/trainer-output-validator.test.js.map +1 -0
- package/core/dist/runtime-v2/__tests__/trainer-runner-vslice.test.d.ts +2 -0
- package/core/dist/runtime-v2/__tests__/trainer-runner-vslice.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/__tests__/trainer-runner-vslice.test.js +506 -0
- package/core/dist/runtime-v2/__tests__/trainer-runner-vslice.test.js.map +1 -0
- package/core/dist/runtime-v2/__tests__/trajectory-store.test.d.ts +2 -0
- package/core/dist/runtime-v2/__tests__/trajectory-store.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/__tests__/trajectory-store.test.js +127 -0
- package/core/dist/runtime-v2/__tests__/trajectory-store.test.js.map +1 -0
- package/core/dist/runtime-v2/activation/__tests__/activation-dispatcher.test.d.ts +2 -0
- package/core/dist/runtime-v2/activation/__tests__/activation-dispatcher.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/activation/__tests__/activation-dispatcher.test.js +510 -0
- package/core/dist/runtime-v2/activation/__tests__/activation-dispatcher.test.js.map +1 -0
- package/core/dist/runtime-v2/activation/__tests__/approval-context-types.test.d.ts +2 -0
- package/core/dist/runtime-v2/activation/__tests__/approval-context-types.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/activation/__tests__/approval-context-types.test.js +117 -0
- package/core/dist/runtime-v2/activation/__tests__/approval-context-types.test.js.map +1 -0
- package/core/dist/runtime-v2/activation/__tests__/approval-queue.test.d.ts +2 -0
- package/core/dist/runtime-v2/activation/__tests__/approval-queue.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/activation/__tests__/approval-queue.test.js +179 -0
- package/core/dist/runtime-v2/activation/__tests__/approval-queue.test.js.map +1 -0
- package/core/dist/runtime-v2/activation/__tests__/approval-store-extended.test.d.ts +2 -0
- package/core/dist/runtime-v2/activation/__tests__/approval-store-extended.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/activation/__tests__/approval-store-extended.test.js +174 -0
- package/core/dist/runtime-v2/activation/__tests__/approval-store-extended.test.js.map +1 -0
- package/core/dist/runtime-v2/activation/__tests__/memory-activation-state-store.test.d.ts +2 -0
- package/core/dist/runtime-v2/activation/__tests__/memory-activation-state-store.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/activation/__tests__/memory-activation-state-store.test.js +244 -0
- package/core/dist/runtime-v2/activation/__tests__/memory-activation-state-store.test.js.map +1 -0
- package/core/dist/runtime-v2/activation/__tests__/sqlite-activation-state-store.test.d.ts +2 -0
- package/core/dist/runtime-v2/activation/__tests__/sqlite-activation-state-store.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/activation/__tests__/sqlite-activation-state-store.test.js +109 -0
- package/core/dist/runtime-v2/activation/__tests__/sqlite-activation-state-store.test.js.map +1 -0
- package/core/dist/runtime-v2/activation/__tests__/sqlite-approval-store.test.d.ts +2 -0
- package/core/dist/runtime-v2/activation/__tests__/sqlite-approval-store.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/activation/__tests__/sqlite-approval-store.test.js +124 -0
- package/core/dist/runtime-v2/activation/__tests__/sqlite-approval-store.test.js.map +1 -0
- package/core/dist/runtime-v2/activation/activation-dispatcher.d.ts +18 -0
- package/core/dist/runtime-v2/activation/activation-dispatcher.d.ts.map +1 -0
- package/core/dist/runtime-v2/activation/activation-dispatcher.js +231 -0
- package/core/dist/runtime-v2/activation/activation-dispatcher.js.map +1 -0
- package/core/dist/runtime-v2/activation/activation-types.d.ts +195 -0
- package/core/dist/runtime-v2/activation/activation-types.d.ts.map +1 -0
- package/core/dist/runtime-v2/activation/activation-types.js +29 -0
- package/core/dist/runtime-v2/activation/activation-types.js.map +1 -0
- package/core/dist/runtime-v2/activation/approval-queue.d.ts +15 -0
- package/core/dist/runtime-v2/activation/approval-queue.d.ts.map +1 -0
- package/core/dist/runtime-v2/activation/approval-queue.js +50 -0
- package/core/dist/runtime-v2/activation/approval-queue.js.map +1 -0
- package/core/dist/runtime-v2/activation/index.d.ts +15 -0
- package/core/dist/runtime-v2/activation/index.d.ts.map +1 -0
- package/core/dist/runtime-v2/activation/index.js +11 -0
- package/core/dist/runtime-v2/activation/index.js.map +1 -0
- package/core/dist/runtime-v2/activation/low-risk-writers.d.ts +14 -0
- package/core/dist/runtime-v2/activation/low-risk-writers.d.ts.map +1 -0
- package/core/dist/runtime-v2/activation/low-risk-writers.js +83 -0
- package/core/dist/runtime-v2/activation/low-risk-writers.js.map +1 -0
- package/core/dist/runtime-v2/activation/memory-activation-state-store.d.ts +13 -0
- package/core/dist/runtime-v2/activation/memory-activation-state-store.d.ts.map +1 -0
- package/core/dist/runtime-v2/activation/memory-activation-state-store.js +28 -0
- package/core/dist/runtime-v2/activation/memory-activation-state-store.js.map +1 -0
- package/core/dist/runtime-v2/activation/memory-approval-store.d.ts +12 -0
- package/core/dist/runtime-v2/activation/memory-approval-store.d.ts.map +1 -0
- package/core/dist/runtime-v2/activation/memory-approval-store.js +102 -0
- package/core/dist/runtime-v2/activation/memory-approval-store.js.map +1 -0
- package/core/dist/runtime-v2/activation/sqlite-activation-state-store.d.ts +10 -0
- package/core/dist/runtime-v2/activation/sqlite-activation-state-store.d.ts.map +1 -0
- package/core/dist/runtime-v2/activation/sqlite-activation-state-store.js +87 -0
- package/core/dist/runtime-v2/activation/sqlite-activation-state-store.js.map +1 -0
- package/core/dist/runtime-v2/activation/sqlite-approval-store.d.ts +14 -0
- package/core/dist/runtime-v2/activation/sqlite-approval-store.d.ts.map +1 -0
- package/core/dist/runtime-v2/activation/sqlite-approval-store.js +138 -0
- package/core/dist/runtime-v2/activation/sqlite-approval-store.js.map +1 -0
- package/core/dist/runtime-v2/activation/sqlite-confirm-first-state-store.d.ts +22 -0
- package/core/dist/runtime-v2/activation/sqlite-confirm-first-state-store.d.ts.map +1 -0
- package/core/dist/runtime-v2/activation/sqlite-confirm-first-state-store.js +136 -0
- package/core/dist/runtime-v2/activation/sqlite-confirm-first-state-store.js.map +1 -0
- package/core/dist/runtime-v2/activation/writers/__tests__/rule-host-writer.test.d.ts +2 -0
- package/core/dist/runtime-v2/activation/writers/__tests__/rule-host-writer.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/activation/writers/__tests__/rule-host-writer.test.js +615 -0
- package/core/dist/runtime-v2/activation/writers/__tests__/rule-host-writer.test.js.map +1 -0
- package/core/dist/runtime-v2/activation/writers/index.d.ts +3 -0
- package/core/dist/runtime-v2/activation/writers/index.d.ts.map +1 -0
- package/core/dist/runtime-v2/activation/writers/index.js +2 -0
- package/core/dist/runtime-v2/activation/writers/index.js.map +1 -0
- package/core/dist/runtime-v2/activation/writers/rule-host-writer.d.ts +14 -0
- package/core/dist/runtime-v2/activation/writers/rule-host-writer.d.ts.map +1 -0
- package/core/dist/runtime-v2/activation/writers/rule-host-writer.js +135 -0
- package/core/dist/runtime-v2/activation/writers/rule-host-writer.js.map +1 -0
- package/core/dist/runtime-v2/adapter/__tests__/chaos-json-repair.test.d.ts +2 -0
- package/core/dist/runtime-v2/adapter/__tests__/chaos-json-repair.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/adapter/__tests__/chaos-json-repair.test.js +553 -0
- package/core/dist/runtime-v2/adapter/__tests__/chaos-json-repair.test.js.map +1 -0
- package/core/dist/runtime-v2/adapter/__tests__/json-extractor.test.d.ts +2 -0
- package/core/dist/runtime-v2/adapter/__tests__/json-extractor.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/adapter/__tests__/json-extractor.test.js +148 -0
- package/core/dist/runtime-v2/adapter/__tests__/json-extractor.test.js.map +1 -0
- package/core/dist/runtime-v2/adapter/__tests__/openclaw-cli-runtime-adapter.test.d.ts +2 -0
- package/core/dist/runtime-v2/adapter/__tests__/openclaw-cli-runtime-adapter.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/adapter/__tests__/openclaw-cli-runtime-adapter.test.js +565 -0
- package/core/dist/runtime-v2/adapter/__tests__/openclaw-cli-runtime-adapter.test.js.map +1 -0
- package/core/dist/runtime-v2/adapter/__tests__/output-repair-contract.test.d.ts +2 -0
- package/core/dist/runtime-v2/adapter/__tests__/output-repair-contract.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/adapter/__tests__/output-repair-contract.test.js +305 -0
- package/core/dist/runtime-v2/adapter/__tests__/output-repair-contract.test.js.map +1 -0
- package/core/dist/runtime-v2/adapter/__tests__/pi-ai-runtime-adapter.test.d.ts +2 -0
- package/core/dist/runtime-v2/adapter/__tests__/pi-ai-runtime-adapter.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/adapter/__tests__/pi-ai-runtime-adapter.test.js +1362 -0
- package/core/dist/runtime-v2/adapter/__tests__/pi-ai-runtime-adapter.test.js.map +1 -0
- package/core/dist/runtime-v2/adapter/__tests__/runtime-config-contract.test.d.ts +2 -0
- package/core/dist/runtime-v2/adapter/__tests__/runtime-config-contract.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/adapter/__tests__/runtime-config-contract.test.js +245 -0
- package/core/dist/runtime-v2/adapter/__tests__/runtime-config-contract.test.js.map +1 -0
- package/core/dist/runtime-v2/adapter/__tests__/schema-prompt-adapter.test.d.ts +2 -0
- package/core/dist/runtime-v2/adapter/__tests__/schema-prompt-adapter.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/adapter/__tests__/schema-prompt-adapter.test.js +270 -0
- package/core/dist/runtime-v2/adapter/__tests__/schema-prompt-adapter.test.js.map +1 -0
- package/core/dist/runtime-v2/adapter/__tests__/structured-output-repair.test.d.ts +2 -0
- package/core/dist/runtime-v2/adapter/__tests__/structured-output-repair.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/adapter/__tests__/structured-output-repair.test.js +494 -0
- package/core/dist/runtime-v2/adapter/__tests__/structured-output-repair.test.js.map +1 -0
- package/core/dist/runtime-v2/adapter/__tests__/test-double-runtime-adapter.test.d.ts +2 -0
- package/core/dist/runtime-v2/adapter/__tests__/test-double-runtime-adapter.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/adapter/__tests__/test-double-runtime-adapter.test.js +123 -0
- package/core/dist/runtime-v2/adapter/__tests__/test-double-runtime-adapter.test.js.map +1 -0
- package/core/dist/runtime-v2/adapter/index.d.ts +10 -0
- package/core/dist/runtime-v2/adapter/index.d.ts.map +1 -0
- package/core/dist/runtime-v2/adapter/index.js +6 -0
- package/core/dist/runtime-v2/adapter/index.js.map +1 -0
- package/core/dist/runtime-v2/adapter/json-extractor.d.ts +14 -0
- package/core/dist/runtime-v2/adapter/json-extractor.d.ts.map +1 -0
- package/core/dist/runtime-v2/adapter/json-extractor.js +97 -0
- package/core/dist/runtime-v2/adapter/json-extractor.js.map +1 -0
- package/core/dist/runtime-v2/adapter/openclaw-cli-runtime-adapter.d.ts +66 -0
- package/core/dist/runtime-v2/adapter/openclaw-cli-runtime-adapter.d.ts.map +1 -0
- package/core/dist/runtime-v2/adapter/openclaw-cli-runtime-adapter.js +705 -0
- package/core/dist/runtime-v2/adapter/openclaw-cli-runtime-adapter.js.map +1 -0
- package/core/dist/runtime-v2/adapter/output-repair-contract.d.ts +50 -0
- package/core/dist/runtime-v2/adapter/output-repair-contract.d.ts.map +1 -0
- package/core/dist/runtime-v2/adapter/output-repair-contract.js +96 -0
- package/core/dist/runtime-v2/adapter/output-repair-contract.js.map +1 -0
- package/core/dist/runtime-v2/adapter/pi-ai-runtime-adapter.d.ts +114 -0
- package/core/dist/runtime-v2/adapter/pi-ai-runtime-adapter.d.ts.map +1 -0
- package/core/dist/runtime-v2/adapter/pi-ai-runtime-adapter.js +1110 -0
- package/core/dist/runtime-v2/adapter/pi-ai-runtime-adapter.js.map +1 -0
- package/core/dist/runtime-v2/adapter/principle-tree-ledger-adapter.d.ts +22 -0
- package/core/dist/runtime-v2/adapter/principle-tree-ledger-adapter.d.ts.map +1 -0
- package/core/dist/runtime-v2/adapter/principle-tree-ledger-adapter.js +84 -0
- package/core/dist/runtime-v2/adapter/principle-tree-ledger-adapter.js.map +1 -0
- package/core/dist/runtime-v2/adapter/schema-prompt-adapter.d.ts +13 -0
- package/core/dist/runtime-v2/adapter/schema-prompt-adapter.d.ts.map +1 -0
- package/core/dist/runtime-v2/adapter/schema-prompt-adapter.js +266 -0
- package/core/dist/runtime-v2/adapter/schema-prompt-adapter.js.map +1 -0
- package/core/dist/runtime-v2/adapter/structured-output-repair.d.ts +95 -0
- package/core/dist/runtime-v2/adapter/structured-output-repair.d.ts.map +1 -0
- package/core/dist/runtime-v2/adapter/structured-output-repair.js +259 -0
- package/core/dist/runtime-v2/adapter/structured-output-repair.js.map +1 -0
- package/core/dist/runtime-v2/adapter/test-double-runtime-adapter.d.ts +35 -0
- package/core/dist/runtime-v2/adapter/test-double-runtime-adapter.d.ts.map +1 -0
- package/core/dist/runtime-v2/adapter/test-double-runtime-adapter.js +94 -0
- package/core/dist/runtime-v2/adapter/test-double-runtime-adapter.js.map +1 -0
- package/core/dist/runtime-v2/adapter/tools/diagnostician-tool.d.ts +17 -0
- package/core/dist/runtime-v2/adapter/tools/diagnostician-tool.d.ts.map +1 -0
- package/core/dist/runtime-v2/adapter/tools/diagnostician-tool.js +8 -0
- package/core/dist/runtime-v2/adapter/tools/diagnostician-tool.js.map +1 -0
- package/core/dist/runtime-v2/admission-gate.d.ts +27 -0
- package/core/dist/runtime-v2/admission-gate.d.ts.map +1 -0
- package/core/dist/runtime-v2/admission-gate.js +57 -0
- package/core/dist/runtime-v2/admission-gate.js.map +1 -0
- package/core/dist/runtime-v2/agent-spec.d.ts +86 -0
- package/core/dist/runtime-v2/agent-spec.d.ts.map +1 -0
- package/core/dist/runtime-v2/agent-spec.js +74 -0
- package/core/dist/runtime-v2/agent-spec.js.map +1 -0
- package/core/dist/runtime-v2/candidate-audit.d.ts +8 -0
- package/core/dist/runtime-v2/candidate-audit.d.ts.map +1 -0
- package/core/dist/runtime-v2/candidate-audit.js +47 -0
- package/core/dist/runtime-v2/candidate-audit.js.map +1 -0
- package/core/dist/runtime-v2/candidate-intake-service.d.ts +43 -0
- package/core/dist/runtime-v2/candidate-intake-service.d.ts.map +1 -0
- package/core/dist/runtime-v2/candidate-intake-service.js +117 -0
- package/core/dist/runtime-v2/candidate-intake-service.js.map +1 -0
- package/core/dist/runtime-v2/candidate-intake.d.ts +219 -0
- package/core/dist/runtime-v2/candidate-intake.d.ts.map +1 -0
- package/core/dist/runtime-v2/candidate-intake.js +178 -0
- package/core/dist/runtime-v2/candidate-intake.js.map +1 -0
- package/core/dist/runtime-v2/cli/diagnose.d.ts +127 -0
- package/core/dist/runtime-v2/cli/diagnose.d.ts.map +1 -0
- package/core/dist/runtime-v2/cli/diagnose.js +113 -0
- package/core/dist/runtime-v2/cli/diagnose.js.map +1 -0
- package/core/dist/runtime-v2/cli/index.d.ts +5 -0
- package/core/dist/runtime-v2/cli/index.d.ts.map +1 -0
- package/core/dist/runtime-v2/cli/index.js +3 -0
- package/core/dist/runtime-v2/cli/index.js.map +1 -0
- package/core/dist/runtime-v2/cli/probe.d.ts +31 -0
- package/core/dist/runtime-v2/cli/probe.d.ts.map +1 -0
- package/core/dist/runtime-v2/cli/probe.js +58 -0
- package/core/dist/runtime-v2/cli/probe.js.map +1 -0
- package/core/dist/runtime-v2/context-payload.d.ts +298 -0
- package/core/dist/runtime-v2/context-payload.d.ts.map +1 -0
- package/core/dist/runtime-v2/context-payload.js +140 -0
- package/core/dist/runtime-v2/context-payload.js.map +1 -0
- package/core/dist/runtime-v2/control-plane-triage.d.ts +32 -0
- package/core/dist/runtime-v2/control-plane-triage.d.ts.map +1 -0
- package/core/dist/runtime-v2/control-plane-triage.js +220 -0
- package/core/dist/runtime-v2/control-plane-triage.js.map +1 -0
- package/core/dist/runtime-v2/correction/correction-types.d.ts +87 -0
- package/core/dist/runtime-v2/correction/correction-types.d.ts.map +1 -0
- package/core/dist/runtime-v2/correction/correction-types.js +66 -0
- package/core/dist/runtime-v2/correction/correction-types.js.map +1 -0
- package/core/dist/runtime-v2/correction/index.d.ts +2 -0
- package/core/dist/runtime-v2/correction/index.d.ts.map +1 -0
- package/core/dist/runtime-v2/correction/index.js +2 -0
- package/core/dist/runtime-v2/correction/index.js.map +1 -0
- package/core/dist/runtime-v2/diagnostician/__tests__/diagnostician-prompt-builder.integration.test.d.ts +2 -0
- package/core/dist/runtime-v2/diagnostician/__tests__/diagnostician-prompt-builder.integration.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/diagnostician/__tests__/diagnostician-prompt-builder.integration.test.js +170 -0
- package/core/dist/runtime-v2/diagnostician/__tests__/diagnostician-prompt-builder.integration.test.js.map +1 -0
- package/core/dist/runtime-v2/diagnostician/__tests__/diagnostician-prompt-builder.test.d.ts +2 -0
- package/core/dist/runtime-v2/diagnostician/__tests__/diagnostician-prompt-builder.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/diagnostician/__tests__/diagnostician-prompt-builder.test.js +396 -0
- package/core/dist/runtime-v2/diagnostician/__tests__/diagnostician-prompt-builder.test.js.map +1 -0
- package/core/dist/runtime-v2/diagnostician-output.d.ts +84 -0
- package/core/dist/runtime-v2/diagnostician-output.d.ts.map +1 -0
- package/core/dist/runtime-v2/diagnostician-output.js +60 -0
- package/core/dist/runtime-v2/diagnostician-output.js.map +1 -0
- package/core/dist/runtime-v2/diagnostician-prompt-builder.d.ts +130 -0
- package/core/dist/runtime-v2/diagnostician-prompt-builder.d.ts.map +1 -0
- package/core/dist/runtime-v2/diagnostician-prompt-builder.js +162 -0
- package/core/dist/runtime-v2/diagnostician-prompt-builder.js.map +1 -0
- package/core/dist/runtime-v2/error-categories.d.ts +42 -0
- package/core/dist/runtime-v2/error-categories.d.ts.map +1 -0
- package/core/dist/runtime-v2/error-categories.js +119 -0
- package/core/dist/runtime-v2/error-categories.js.map +1 -0
- package/core/dist/runtime-v2/evolution/evolution-types.d.ts +709 -0
- package/core/dist/runtime-v2/evolution/evolution-types.d.ts.map +1 -0
- package/core/dist/runtime-v2/evolution/evolution-types.js +410 -0
- package/core/dist/runtime-v2/evolution/evolution-types.js.map +1 -0
- package/core/dist/runtime-v2/evolution/index.d.ts +2 -0
- package/core/dist/runtime-v2/evolution/index.d.ts.map +1 -0
- package/core/dist/runtime-v2/evolution/index.js +2 -0
- package/core/dist/runtime-v2/evolution/index.js.map +1 -0
- package/core/dist/runtime-v2/feature-flags/__tests__/feature-flag-contract.test.d.ts +2 -0
- package/core/dist/runtime-v2/feature-flags/__tests__/feature-flag-contract.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/feature-flags/__tests__/feature-flag-contract.test.js +298 -0
- package/core/dist/runtime-v2/feature-flags/__tests__/feature-flag-contract.test.js.map +1 -0
- package/core/dist/runtime-v2/feature-flags/feature-flag-contract.d.ts +35 -0
- package/core/dist/runtime-v2/feature-flags/feature-flag-contract.d.ts.map +1 -0
- package/core/dist/runtime-v2/feature-flags/feature-flag-contract.js +124 -0
- package/core/dist/runtime-v2/feature-flags/feature-flag-contract.js.map +1 -0
- package/core/dist/runtime-v2/feature-flags/index.d.ts +3 -0
- package/core/dist/runtime-v2/feature-flags/index.d.ts.map +1 -0
- package/core/dist/runtime-v2/feature-flags/index.js +2 -0
- package/core/dist/runtime-v2/feature-flags/index.js.map +1 -0
- package/core/dist/runtime-v2/full-trace-contract.d.ts +79 -0
- package/core/dist/runtime-v2/full-trace-contract.d.ts.map +1 -0
- package/core/dist/runtime-v2/full-trace-contract.js +464 -0
- package/core/dist/runtime-v2/full-trace-contract.js.map +1 -0
- package/core/dist/runtime-v2/gfi/__tests__/gfi-kernel.test.d.ts +2 -0
- package/core/dist/runtime-v2/gfi/__tests__/gfi-kernel.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/gfi/__tests__/gfi-kernel.test.js +626 -0
- package/core/dist/runtime-v2/gfi/__tests__/gfi-kernel.test.js.map +1 -0
- package/core/dist/runtime-v2/gfi/__tests__/gfi-read-model.test.d.ts +2 -0
- package/core/dist/runtime-v2/gfi/__tests__/gfi-read-model.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/gfi/__tests__/gfi-read-model.test.js +212 -0
- package/core/dist/runtime-v2/gfi/__tests__/gfi-read-model.test.js.map +1 -0
- package/core/dist/runtime-v2/gfi/gfi-kernel.d.ts +12 -0
- package/core/dist/runtime-v2/gfi/gfi-kernel.d.ts.map +1 -0
- package/core/dist/runtime-v2/gfi/gfi-kernel.js +148 -0
- package/core/dist/runtime-v2/gfi/gfi-kernel.js.map +1 -0
- package/core/dist/runtime-v2/gfi/gfi-policy.d.ts +3 -0
- package/core/dist/runtime-v2/gfi/gfi-policy.d.ts.map +1 -0
- package/core/dist/runtime-v2/gfi/gfi-policy.js +23 -0
- package/core/dist/runtime-v2/gfi/gfi-policy.js.map +1 -0
- package/core/dist/runtime-v2/gfi/gfi-read-model.d.ts +78 -0
- package/core/dist/runtime-v2/gfi/gfi-read-model.d.ts.map +1 -0
- package/core/dist/runtime-v2/gfi/gfi-read-model.js +129 -0
- package/core/dist/runtime-v2/gfi/gfi-read-model.js.map +1 -0
- package/core/dist/runtime-v2/gfi/gfi-types.d.ts +70 -0
- package/core/dist/runtime-v2/gfi/gfi-types.d.ts.map +1 -0
- package/core/dist/runtime-v2/gfi/gfi-types.js +2 -0
- package/core/dist/runtime-v2/gfi/gfi-types.js.map +1 -0
- package/core/dist/runtime-v2/gfi/index.d.ts +6 -0
- package/core/dist/runtime-v2/gfi/index.d.ts.map +1 -0
- package/core/dist/runtime-v2/gfi/index.js +4 -0
- package/core/dist/runtime-v2/gfi/index.js.map +1 -0
- package/core/dist/runtime-v2/golden-trace-candidate-builder.d.ts +23 -0
- package/core/dist/runtime-v2/golden-trace-candidate-builder.d.ts.map +1 -0
- package/core/dist/runtime-v2/golden-trace-candidate-builder.js +193 -0
- package/core/dist/runtime-v2/golden-trace-candidate-builder.js.map +1 -0
- package/core/dist/runtime-v2/golden-trace-replay-adapter.d.ts +18 -0
- package/core/dist/runtime-v2/golden-trace-replay-adapter.d.ts.map +1 -0
- package/core/dist/runtime-v2/golden-trace-replay-adapter.js +18 -0
- package/core/dist/runtime-v2/golden-trace-replay-adapter.js.map +1 -0
- package/core/dist/runtime-v2/golden-trace-replay-validator.d.ts +42 -0
- package/core/dist/runtime-v2/golden-trace-replay-validator.d.ts.map +1 -0
- package/core/dist/runtime-v2/golden-trace-replay-validator.js +220 -0
- package/core/dist/runtime-v2/golden-trace-replay-validator.js.map +1 -0
- package/core/dist/runtime-v2/golden-trace.d.ts +80 -0
- package/core/dist/runtime-v2/golden-trace.d.ts.map +1 -0
- package/core/dist/runtime-v2/golden-trace.js +158 -0
- package/core/dist/runtime-v2/golden-trace.js.map +1 -0
- package/core/dist/runtime-v2/index.d.ts +281 -0
- package/core/dist/runtime-v2/index.d.ts.map +1 -0
- package/core/dist/runtime-v2/index.js +224 -0
- package/core/dist/runtime-v2/index.js.map +1 -0
- package/core/dist/runtime-v2/internalization/__tests__/artificer-prompt-builder.test.d.ts +2 -0
- package/core/dist/runtime-v2/internalization/__tests__/artificer-prompt-builder.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/internalization/__tests__/artificer-prompt-builder.test.js +57 -0
- package/core/dist/runtime-v2/internalization/__tests__/artificer-prompt-builder.test.js.map +1 -0
- package/core/dist/runtime-v2/internalization/__tests__/dreamer-prompt-builder.test.d.ts +2 -0
- package/core/dist/runtime-v2/internalization/__tests__/dreamer-prompt-builder.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/internalization/__tests__/dreamer-prompt-builder.test.js +182 -0
- package/core/dist/runtime-v2/internalization/__tests__/dreamer-prompt-builder.test.js.map +1 -0
- package/core/dist/runtime-v2/internalization/__tests__/evaluator-prompt-builder.test.d.ts +2 -0
- package/core/dist/runtime-v2/internalization/__tests__/evaluator-prompt-builder.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/internalization/__tests__/evaluator-prompt-builder.test.js +112 -0
- package/core/dist/runtime-v2/internalization/__tests__/evaluator-prompt-builder.test.js.map +1 -0
- package/core/dist/runtime-v2/internalization/__tests__/internalization-job-graph.test.d.ts +2 -0
- package/core/dist/runtime-v2/internalization/__tests__/internalization-job-graph.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/internalization/__tests__/internalization-job-graph.test.js +176 -0
- package/core/dist/runtime-v2/internalization/__tests__/internalization-job-graph.test.js.map +1 -0
- package/core/dist/runtime-v2/internalization/__tests__/internalization-task-guards.test.d.ts +2 -0
- package/core/dist/runtime-v2/internalization/__tests__/internalization-task-guards.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/internalization/__tests__/internalization-task-guards.test.js +297 -0
- package/core/dist/runtime-v2/internalization/__tests__/internalization-task-guards.test.js.map +1 -0
- package/core/dist/runtime-v2/internalization/__tests__/philosopher-prompt-builder.test.d.ts +2 -0
- package/core/dist/runtime-v2/internalization/__tests__/philosopher-prompt-builder.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/internalization/__tests__/philosopher-prompt-builder.test.js +149 -0
- package/core/dist/runtime-v2/internalization/__tests__/philosopher-prompt-builder.test.js.map +1 -0
- package/core/dist/runtime-v2/internalization/__tests__/queue-actionability.test.d.ts +2 -0
- package/core/dist/runtime-v2/internalization/__tests__/queue-actionability.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/internalization/__tests__/queue-actionability.test.js +92 -0
- package/core/dist/runtime-v2/internalization/__tests__/queue-actionability.test.js.map +1 -0
- package/core/dist/runtime-v2/internalization/__tests__/refiner-rulehost-gate.test.d.ts +2 -0
- package/core/dist/runtime-v2/internalization/__tests__/refiner-rulehost-gate.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/internalization/__tests__/refiner-rulehost-gate.test.js +431 -0
- package/core/dist/runtime-v2/internalization/__tests__/refiner-rulehost-gate.test.js.map +1 -0
- package/core/dist/runtime-v2/internalization/__tests__/refiner-sandbox-wrapper.test.d.ts +2 -0
- package/core/dist/runtime-v2/internalization/__tests__/refiner-sandbox-wrapper.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/internalization/__tests__/refiner-sandbox-wrapper.test.js +763 -0
- package/core/dist/runtime-v2/internalization/__tests__/refiner-sandbox-wrapper.test.js.map +1 -0
- package/core/dist/runtime-v2/internalization/__tests__/rollout-reviewer-prompt-builder.test.d.ts +2 -0
- package/core/dist/runtime-v2/internalization/__tests__/rollout-reviewer-prompt-builder.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/internalization/__tests__/rollout-reviewer-prompt-builder.test.js +75 -0
- package/core/dist/runtime-v2/internalization/__tests__/rollout-reviewer-prompt-builder.test.js.map +1 -0
- package/core/dist/runtime-v2/internalization/__tests__/scribe-prompt-builder.test.d.ts +2 -0
- package/core/dist/runtime-v2/internalization/__tests__/scribe-prompt-builder.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/internalization/__tests__/scribe-prompt-builder.test.js +56 -0
- package/core/dist/runtime-v2/internalization/__tests__/scribe-prompt-builder.test.js.map +1 -0
- package/core/dist/runtime-v2/internalization/__tests__/trainer-prompt-builder.test.d.ts +2 -0
- package/core/dist/runtime-v2/internalization/__tests__/trainer-prompt-builder.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/internalization/__tests__/trainer-prompt-builder.test.js +141 -0
- package/core/dist/runtime-v2/internalization/__tests__/trainer-prompt-builder.test.js.map +1 -0
- package/core/dist/runtime-v2/internalization/artificer-output.d.ts +67 -0
- package/core/dist/runtime-v2/internalization/artificer-output.d.ts.map +1 -0
- package/core/dist/runtime-v2/internalization/artificer-output.js +103 -0
- package/core/dist/runtime-v2/internalization/artificer-output.js.map +1 -0
- package/core/dist/runtime-v2/internalization/artificer-prompt-builder.d.ts +24 -0
- package/core/dist/runtime-v2/internalization/artificer-prompt-builder.d.ts.map +1 -0
- package/core/dist/runtime-v2/internalization/artificer-prompt-builder.js +62 -0
- package/core/dist/runtime-v2/internalization/artificer-prompt-builder.js.map +1 -0
- package/core/dist/runtime-v2/internalization/artificer-runner.d.ts +77 -0
- package/core/dist/runtime-v2/internalization/artificer-runner.d.ts.map +1 -0
- package/core/dist/runtime-v2/internalization/artificer-runner.js +521 -0
- package/core/dist/runtime-v2/internalization/artificer-runner.js.map +1 -0
- package/core/dist/runtime-v2/internalization/compile-result.d.ts +20 -0
- package/core/dist/runtime-v2/internalization/compile-result.d.ts.map +1 -0
- package/core/dist/runtime-v2/internalization/compile-result.js +8 -0
- package/core/dist/runtime-v2/internalization/compile-result.js.map +1 -0
- package/core/dist/runtime-v2/internalization/correction-proposal.d.ts +38 -0
- package/core/dist/runtime-v2/internalization/correction-proposal.d.ts.map +1 -0
- package/core/dist/runtime-v2/internalization/correction-proposal.js +322 -0
- package/core/dist/runtime-v2/internalization/correction-proposal.js.map +1 -0
- package/core/dist/runtime-v2/internalization/deprecated-readiness.d.ts +20 -0
- package/core/dist/runtime-v2/internalization/deprecated-readiness.d.ts.map +1 -0
- package/core/dist/runtime-v2/internalization/deprecated-readiness.js +75 -0
- package/core/dist/runtime-v2/internalization/deprecated-readiness.js.map +1 -0
- package/core/dist/runtime-v2/internalization/deprecated-readiness.test.d.ts +2 -0
- package/core/dist/runtime-v2/internalization/deprecated-readiness.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/internalization/deprecated-readiness.test.js +127 -0
- package/core/dist/runtime-v2/internalization/deprecated-readiness.test.js.map +1 -0
- package/core/dist/runtime-v2/internalization/dreamer-output.d.ts +120 -0
- package/core/dist/runtime-v2/internalization/dreamer-output.d.ts.map +1 -0
- package/core/dist/runtime-v2/internalization/dreamer-output.js +92 -0
- package/core/dist/runtime-v2/internalization/dreamer-output.js.map +1 -0
- package/core/dist/runtime-v2/internalization/dreamer-prompt-builder.d.ts +41 -0
- package/core/dist/runtime-v2/internalization/dreamer-prompt-builder.d.ts.map +1 -0
- package/core/dist/runtime-v2/internalization/dreamer-prompt-builder.js +43 -0
- package/core/dist/runtime-v2/internalization/dreamer-prompt-builder.js.map +1 -0
- package/core/dist/runtime-v2/internalization/dreamer-runner.d.ts +134 -0
- package/core/dist/runtime-v2/internalization/dreamer-runner.d.ts.map +1 -0
- package/core/dist/runtime-v2/internalization/dreamer-runner.js +636 -0
- package/core/dist/runtime-v2/internalization/dreamer-runner.js.map +1 -0
- package/core/dist/runtime-v2/internalization/evaluator-output.d.ts +71 -0
- package/core/dist/runtime-v2/internalization/evaluator-output.d.ts.map +1 -0
- package/core/dist/runtime-v2/internalization/evaluator-output.js +113 -0
- package/core/dist/runtime-v2/internalization/evaluator-output.js.map +1 -0
- package/core/dist/runtime-v2/internalization/evaluator-prompt-builder.d.ts +24 -0
- package/core/dist/runtime-v2/internalization/evaluator-prompt-builder.d.ts.map +1 -0
- package/core/dist/runtime-v2/internalization/evaluator-prompt-builder.js +49 -0
- package/core/dist/runtime-v2/internalization/evaluator-prompt-builder.js.map +1 -0
- package/core/dist/runtime-v2/internalization/evaluator-runner.d.ts +80 -0
- package/core/dist/runtime-v2/internalization/evaluator-runner.d.ts.map +1 -0
- package/core/dist/runtime-v2/internalization/evaluator-runner.js +661 -0
- package/core/dist/runtime-v2/internalization/evaluator-runner.js.map +1 -0
- package/core/dist/runtime-v2/internalization/index.d.ts +81 -0
- package/core/dist/runtime-v2/internalization/index.d.ts.map +1 -0
- package/core/dist/runtime-v2/internalization/index.js +47 -0
- package/core/dist/runtime-v2/internalization/index.js.map +1 -0
- package/core/dist/runtime-v2/internalization/intake-to-internalization-bridge.d.ts +57 -0
- package/core/dist/runtime-v2/internalization/intake-to-internalization-bridge.d.ts.map +1 -0
- package/core/dist/runtime-v2/internalization/intake-to-internalization-bridge.js +99 -0
- package/core/dist/runtime-v2/internalization/intake-to-internalization-bridge.js.map +1 -0
- package/core/dist/runtime-v2/internalization/internalization-job-graph.d.ts +78 -0
- package/core/dist/runtime-v2/internalization/internalization-job-graph.d.ts.map +1 -0
- package/core/dist/runtime-v2/internalization/internalization-job-graph.js +153 -0
- package/core/dist/runtime-v2/internalization/internalization-job-graph.js.map +1 -0
- package/core/dist/runtime-v2/internalization/internalization-orchestrator.d.ts +182 -0
- package/core/dist/runtime-v2/internalization/internalization-orchestrator.d.ts.map +1 -0
- package/core/dist/runtime-v2/internalization/internalization-orchestrator.js +355 -0
- package/core/dist/runtime-v2/internalization/internalization-orchestrator.js.map +1 -0
- package/core/dist/runtime-v2/internalization/internalization-route.d.ts +28 -0
- package/core/dist/runtime-v2/internalization/internalization-route.d.ts.map +1 -0
- package/core/dist/runtime-v2/internalization/internalization-route.js +112 -0
- package/core/dist/runtime-v2/internalization/internalization-route.js.map +1 -0
- package/core/dist/runtime-v2/internalization/internalization-state-machine.d.ts +157 -0
- package/core/dist/runtime-v2/internalization/internalization-state-machine.d.ts.map +1 -0
- package/core/dist/runtime-v2/internalization/internalization-state-machine.js +274 -0
- package/core/dist/runtime-v2/internalization/internalization-state-machine.js.map +1 -0
- package/core/dist/runtime-v2/internalization/internalization-task-guards.d.ts +92 -0
- package/core/dist/runtime-v2/internalization/internalization-task-guards.d.ts.map +1 -0
- package/core/dist/runtime-v2/internalization/internalization-task-guards.js +152 -0
- package/core/dist/runtime-v2/internalization/internalization-task-guards.js.map +1 -0
- package/core/dist/runtime-v2/internalization/lifecycle-datasource.d.ts +18 -0
- package/core/dist/runtime-v2/internalization/lifecycle-datasource.d.ts.map +1 -0
- package/core/dist/runtime-v2/internalization/lifecycle-datasource.js +2 -0
- package/core/dist/runtime-v2/internalization/lifecycle-datasource.js.map +1 -0
- package/core/dist/runtime-v2/internalization/lifecycle-metrics.d.ts +24 -0
- package/core/dist/runtime-v2/internalization/lifecycle-metrics.d.ts.map +1 -0
- package/core/dist/runtime-v2/internalization/lifecycle-metrics.js +124 -0
- package/core/dist/runtime-v2/internalization/lifecycle-metrics.js.map +1 -0
- package/core/dist/runtime-v2/internalization/lifecycle-metrics.test.d.ts +2 -0
- package/core/dist/runtime-v2/internalization/lifecycle-metrics.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/internalization/lifecycle-metrics.test.js +201 -0
- package/core/dist/runtime-v2/internalization/lifecycle-metrics.test.js.map +1 -0
- package/core/dist/runtime-v2/internalization/lifecycle-read-model.d.ts +11 -0
- package/core/dist/runtime-v2/internalization/lifecycle-read-model.d.ts.map +1 -0
- package/core/dist/runtime-v2/internalization/lifecycle-read-model.js +155 -0
- package/core/dist/runtime-v2/internalization/lifecycle-read-model.js.map +1 -0
- package/core/dist/runtime-v2/internalization/lifecycle-read-model.test.d.ts +2 -0
- package/core/dist/runtime-v2/internalization/lifecycle-read-model.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/internalization/lifecycle-read-model.test.js +408 -0
- package/core/dist/runtime-v2/internalization/lifecycle-read-model.test.js.map +1 -0
- package/core/dist/runtime-v2/internalization/lifecycle-types.d.ts +75 -0
- package/core/dist/runtime-v2/internalization/lifecycle-types.d.ts.map +1 -0
- package/core/dist/runtime-v2/internalization/lifecycle-types.js +2 -0
- package/core/dist/runtime-v2/internalization/lifecycle-types.js.map +1 -0
- package/core/dist/runtime-v2/internalization/peer-runner-contracts.d.ts +140 -0
- package/core/dist/runtime-v2/internalization/peer-runner-contracts.d.ts.map +1 -0
- package/core/dist/runtime-v2/internalization/peer-runner-contracts.js +124 -0
- package/core/dist/runtime-v2/internalization/peer-runner-contracts.js.map +1 -0
- package/core/dist/runtime-v2/internalization/philosopher-output.d.ts +56 -0
- package/core/dist/runtime-v2/internalization/philosopher-output.d.ts.map +1 -0
- package/core/dist/runtime-v2/internalization/philosopher-output.js +69 -0
- package/core/dist/runtime-v2/internalization/philosopher-output.js.map +1 -0
- package/core/dist/runtime-v2/internalization/philosopher-prompt-builder.d.ts +41 -0
- package/core/dist/runtime-v2/internalization/philosopher-prompt-builder.d.ts.map +1 -0
- package/core/dist/runtime-v2/internalization/philosopher-prompt-builder.js +50 -0
- package/core/dist/runtime-v2/internalization/philosopher-prompt-builder.js.map +1 -0
- package/core/dist/runtime-v2/internalization/philosopher-runner.d.ts +103 -0
- package/core/dist/runtime-v2/internalization/philosopher-runner.d.ts.map +1 -0
- package/core/dist/runtime-v2/internalization/philosopher-runner.js +519 -0
- package/core/dist/runtime-v2/internalization/philosopher-runner.js.map +1 -0
- package/core/dist/runtime-v2/internalization/pi-artifact-store.d.ts +13 -0
- package/core/dist/runtime-v2/internalization/pi-artifact-store.d.ts.map +1 -0
- package/core/dist/runtime-v2/internalization/pi-artifact-store.js +65 -0
- package/core/dist/runtime-v2/internalization/pi-artifact-store.js.map +1 -0
- package/core/dist/runtime-v2/internalization/pi-artifact.d.ts +23 -0
- package/core/dist/runtime-v2/internalization/pi-artifact.d.ts.map +1 -0
- package/core/dist/runtime-v2/internalization/pi-artifact.js +2 -0
- package/core/dist/runtime-v2/internalization/pi-artifact.js.map +1 -0
- package/core/dist/runtime-v2/internalization/pitask-metadata.d.ts +80 -0
- package/core/dist/runtime-v2/internalization/pitask-metadata.d.ts.map +1 -0
- package/core/dist/runtime-v2/internalization/pitask-metadata.js +194 -0
- package/core/dist/runtime-v2/internalization/pitask-metadata.js.map +1 -0
- package/core/dist/runtime-v2/internalization/queue-actionability.d.ts +37 -0
- package/core/dist/runtime-v2/internalization/queue-actionability.d.ts.map +1 -0
- package/core/dist/runtime-v2/internalization/queue-actionability.js +50 -0
- package/core/dist/runtime-v2/internalization/queue-actionability.js.map +1 -0
- package/core/dist/runtime-v2/internalization/refiner-rulehost-gate.d.ts +20 -0
- package/core/dist/runtime-v2/internalization/refiner-rulehost-gate.d.ts.map +1 -0
- package/core/dist/runtime-v2/internalization/refiner-rulehost-gate.js +151 -0
- package/core/dist/runtime-v2/internalization/refiner-rulehost-gate.js.map +1 -0
- package/core/dist/runtime-v2/internalization/refiner-sandbox-wrapper.d.ts +36 -0
- package/core/dist/runtime-v2/internalization/refiner-sandbox-wrapper.d.ts.map +1 -0
- package/core/dist/runtime-v2/internalization/refiner-sandbox-wrapper.js +227 -0
- package/core/dist/runtime-v2/internalization/refiner-sandbox-wrapper.js.map +1 -0
- package/core/dist/runtime-v2/internalization/rollout-reviewer-output.d.ts +74 -0
- package/core/dist/runtime-v2/internalization/rollout-reviewer-output.d.ts.map +1 -0
- package/core/dist/runtime-v2/internalization/rollout-reviewer-output.js +117 -0
- package/core/dist/runtime-v2/internalization/rollout-reviewer-output.js.map +1 -0
- package/core/dist/runtime-v2/internalization/rollout-reviewer-prompt-builder.d.ts +24 -0
- package/core/dist/runtime-v2/internalization/rollout-reviewer-prompt-builder.d.ts.map +1 -0
- package/core/dist/runtime-v2/internalization/rollout-reviewer-prompt-builder.js +52 -0
- package/core/dist/runtime-v2/internalization/rollout-reviewer-prompt-builder.js.map +1 -0
- package/core/dist/runtime-v2/internalization/rollout-reviewer-runner.d.ts +76 -0
- package/core/dist/runtime-v2/internalization/rollout-reviewer-runner.d.ts.map +1 -0
- package/core/dist/runtime-v2/internalization/rollout-reviewer-runner.js +538 -0
- package/core/dist/runtime-v2/internalization/rollout-reviewer-runner.js.map +1 -0
- package/core/dist/runtime-v2/internalization/routing-policy.d.ts +24 -0
- package/core/dist/runtime-v2/internalization/routing-policy.d.ts.map +1 -0
- package/core/dist/runtime-v2/internalization/routing-policy.js +169 -0
- package/core/dist/runtime-v2/internalization/routing-policy.js.map +1 -0
- package/core/dist/runtime-v2/internalization/routing-policy.test.d.ts +2 -0
- package/core/dist/runtime-v2/internalization/routing-policy.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/internalization/routing-policy.test.js +286 -0
- package/core/dist/runtime-v2/internalization/routing-policy.test.js.map +1 -0
- package/core/dist/runtime-v2/internalization/rule-code-validator.d.ts +21 -0
- package/core/dist/runtime-v2/internalization/rule-code-validator.d.ts.map +1 -0
- package/core/dist/runtime-v2/internalization/rule-code-validator.js +42 -0
- package/core/dist/runtime-v2/internalization/rule-code-validator.js.map +1 -0
- package/core/dist/runtime-v2/internalization/rule-host-adapter.d.ts +16 -0
- package/core/dist/runtime-v2/internalization/rule-host-adapter.d.ts.map +1 -0
- package/core/dist/runtime-v2/internalization/rule-host-adapter.js +13 -0
- package/core/dist/runtime-v2/internalization/rule-host-adapter.js.map +1 -0
- package/core/dist/runtime-v2/internalization/rule-host-contracts.d.ts +61 -0
- package/core/dist/runtime-v2/internalization/rule-host-contracts.d.ts.map +1 -0
- package/core/dist/runtime-v2/internalization/rule-host-contracts.js +14 -0
- package/core/dist/runtime-v2/internalization/rule-host-contracts.js.map +1 -0
- package/core/dist/runtime-v2/internalization/rule-host-evaluator.d.ts +36 -0
- package/core/dist/runtime-v2/internalization/rule-host-evaluator.d.ts.map +1 -0
- package/core/dist/runtime-v2/internalization/rule-host-evaluator.js +103 -0
- package/core/dist/runtime-v2/internalization/rule-host-evaluator.js.map +1 -0
- package/core/dist/runtime-v2/internalization/rule-host-helpers.d.ts +27 -0
- package/core/dist/runtime-v2/internalization/rule-host-helpers.d.ts.map +1 -0
- package/core/dist/runtime-v2/internalization/rule-host-helpers.js +27 -0
- package/core/dist/runtime-v2/internalization/rule-host-helpers.js.map +1 -0
- package/core/dist/runtime-v2/internalization/scribe-output.d.ts +74 -0
- package/core/dist/runtime-v2/internalization/scribe-output.d.ts.map +1 -0
- package/core/dist/runtime-v2/internalization/scribe-output.js +98 -0
- package/core/dist/runtime-v2/internalization/scribe-output.js.map +1 -0
- package/core/dist/runtime-v2/internalization/scribe-prompt-builder.d.ts +24 -0
- package/core/dist/runtime-v2/internalization/scribe-prompt-builder.d.ts.map +1 -0
- package/core/dist/runtime-v2/internalization/scribe-prompt-builder.js +60 -0
- package/core/dist/runtime-v2/internalization/scribe-prompt-builder.js.map +1 -0
- package/core/dist/runtime-v2/internalization/scribe-runner.d.ts +77 -0
- package/core/dist/runtime-v2/internalization/scribe-runner.d.ts.map +1 -0
- package/core/dist/runtime-v2/internalization/scribe-runner.js +518 -0
- package/core/dist/runtime-v2/internalization/scribe-runner.js.map +1 -0
- package/core/dist/runtime-v2/internalization/template-generator.d.ts +21 -0
- package/core/dist/runtime-v2/internalization/template-generator.d.ts.map +1 -0
- package/core/dist/runtime-v2/internalization/template-generator.js +61 -0
- package/core/dist/runtime-v2/internalization/template-generator.js.map +1 -0
- package/core/dist/runtime-v2/internalization/trainer-output.d.ts +122 -0
- package/core/dist/runtime-v2/internalization/trainer-output.d.ts.map +1 -0
- package/core/dist/runtime-v2/internalization/trainer-output.js +223 -0
- package/core/dist/runtime-v2/internalization/trainer-output.js.map +1 -0
- package/core/dist/runtime-v2/internalization/trainer-prompt-builder.d.ts +24 -0
- package/core/dist/runtime-v2/internalization/trainer-prompt-builder.d.ts.map +1 -0
- package/core/dist/runtime-v2/internalization/trainer-prompt-builder.js +57 -0
- package/core/dist/runtime-v2/internalization/trainer-prompt-builder.js.map +1 -0
- package/core/dist/runtime-v2/internalization/trainer-runner.d.ts +76 -0
- package/core/dist/runtime-v2/internalization/trainer-runner.d.ts.map +1 -0
- package/core/dist/runtime-v2/internalization/trainer-runner.js +538 -0
- package/core/dist/runtime-v2/internalization/trainer-runner.js.map +1 -0
- package/core/dist/runtime-v2/internalization-chain-integrity-read-model.d.ts +42 -0
- package/core/dist/runtime-v2/internalization-chain-integrity-read-model.d.ts.map +1 -0
- package/core/dist/runtime-v2/internalization-chain-integrity-read-model.js +413 -0
- package/core/dist/runtime-v2/internalization-chain-integrity-read-model.js.map +1 -0
- package/core/dist/runtime-v2/internalization-integrity-remediation.d.ts +17 -0
- package/core/dist/runtime-v2/internalization-integrity-remediation.d.ts.map +1 -0
- package/core/dist/runtime-v2/internalization-integrity-remediation.js +269 -0
- package/core/dist/runtime-v2/internalization-integrity-remediation.js.map +1 -0
- package/core/dist/runtime-v2/internalization-queue-read-model.d.ts +93 -0
- package/core/dist/runtime-v2/internalization-queue-read-model.d.ts.map +1 -0
- package/core/dist/runtime-v2/internalization-queue-read-model.js +217 -0
- package/core/dist/runtime-v2/internalization-queue-read-model.js.map +1 -0
- package/core/dist/runtime-v2/l1-hard-cap.d.ts +21 -0
- package/core/dist/runtime-v2/l1-hard-cap.d.ts.map +1 -0
- package/core/dist/runtime-v2/l1-hard-cap.js +51 -0
- package/core/dist/runtime-v2/l1-hard-cap.js.map +1 -0
- package/core/dist/runtime-v2/observer/__tests__/agent-scheduler.test.d.ts +2 -0
- package/core/dist/runtime-v2/observer/__tests__/agent-scheduler.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/observer/__tests__/agent-scheduler.test.js +49 -0
- package/core/dist/runtime-v2/observer/__tests__/agent-scheduler.test.js.map +1 -0
- package/core/dist/runtime-v2/observer/__tests__/correction-observer.test.d.ts +2 -0
- package/core/dist/runtime-v2/observer/__tests__/correction-observer.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/observer/__tests__/correction-observer.test.js +144 -0
- package/core/dist/runtime-v2/observer/__tests__/correction-observer.test.js.map +1 -0
- package/core/dist/runtime-v2/observer/__tests__/empathy-observer.real-e2e.test.d.ts +2 -0
- package/core/dist/runtime-v2/observer/__tests__/empathy-observer.real-e2e.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/observer/__tests__/empathy-observer.real-e2e.test.js +67 -0
- package/core/dist/runtime-v2/observer/__tests__/empathy-observer.real-e2e.test.js.map +1 -0
- package/core/dist/runtime-v2/observer/__tests__/empathy-observer.test.d.ts +2 -0
- package/core/dist/runtime-v2/observer/__tests__/empathy-observer.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/observer/__tests__/empathy-observer.test.js +84 -0
- package/core/dist/runtime-v2/observer/__tests__/empathy-observer.test.js.map +1 -0
- package/core/dist/runtime-v2/observer/agent-scheduler.d.ts +40 -0
- package/core/dist/runtime-v2/observer/agent-scheduler.d.ts.map +1 -0
- package/core/dist/runtime-v2/observer/agent-scheduler.js +30 -0
- package/core/dist/runtime-v2/observer/agent-scheduler.js.map +1 -0
- package/core/dist/runtime-v2/observer/correction-observer.d.ts +59 -0
- package/core/dist/runtime-v2/observer/correction-observer.d.ts.map +1 -0
- package/core/dist/runtime-v2/observer/correction-observer.js +178 -0
- package/core/dist/runtime-v2/observer/correction-observer.js.map +1 -0
- package/core/dist/runtime-v2/observer/empathy-observer.d.ts +35 -0
- package/core/dist/runtime-v2/observer/empathy-observer.d.ts.map +1 -0
- package/core/dist/runtime-v2/observer/empathy-observer.js +98 -0
- package/core/dist/runtime-v2/observer/empathy-observer.js.map +1 -0
- package/core/dist/runtime-v2/operator-health-read-model.d.ts +45 -0
- package/core/dist/runtime-v2/operator-health-read-model.d.ts.map +1 -0
- package/core/dist/runtime-v2/operator-health-read-model.js +189 -0
- package/core/dist/runtime-v2/operator-health-read-model.js.map +1 -0
- package/core/dist/runtime-v2/pain-chain-read-model.d.ts +40 -0
- package/core/dist/runtime-v2/pain-chain-read-model.d.ts.map +1 -0
- package/core/dist/runtime-v2/pain-chain-read-model.js +293 -0
- package/core/dist/runtime-v2/pain-chain-read-model.js.map +1 -0
- package/core/dist/runtime-v2/pain-flood-simulation.d.ts +62 -0
- package/core/dist/runtime-v2/pain-flood-simulation.d.ts.map +1 -0
- package/core/dist/runtime-v2/pain-flood-simulation.js +152 -0
- package/core/dist/runtime-v2/pain-flood-simulation.js.map +1 -0
- package/core/dist/runtime-v2/pain-signal-bridge.d.ts +72 -0
- package/core/dist/runtime-v2/pain-signal-bridge.d.ts.map +1 -0
- package/core/dist/runtime-v2/pain-signal-bridge.js +340 -0
- package/core/dist/runtime-v2/pain-signal-bridge.js.map +1 -0
- package/core/dist/runtime-v2/pain-signal-observability.d.ts +19 -0
- package/core/dist/runtime-v2/pain-signal-observability.d.ts.map +1 -0
- package/core/dist/runtime-v2/pain-signal-observability.js +161 -0
- package/core/dist/runtime-v2/pain-signal-observability.js.map +1 -0
- package/core/dist/runtime-v2/pain-signal-runtime-factory.d.ts +82 -0
- package/core/dist/runtime-v2/pain-signal-runtime-factory.d.ts.map +1 -0
- package/core/dist/runtime-v2/pain-signal-runtime-factory.js +279 -0
- package/core/dist/runtime-v2/pain-signal-runtime-factory.js.map +1 -0
- package/core/dist/runtime-v2/pain-to-principle-service.d.ts +53 -0
- package/core/dist/runtime-v2/pain-to-principle-service.d.ts.map +1 -0
- package/core/dist/runtime-v2/pain-to-principle-service.js +114 -0
- package/core/dist/runtime-v2/pain-to-principle-service.js.map +1 -0
- package/core/dist/runtime-v2/proven-channel-baseline.d.ts +56 -0
- package/core/dist/runtime-v2/proven-channel-baseline.d.ts.map +1 -0
- package/core/dist/runtime-v2/proven-channel-baseline.js +480 -0
- package/core/dist/runtime-v2/proven-channel-baseline.js.map +1 -0
- package/core/dist/runtime-v2/pruning-mask.d.ts +27 -0
- package/core/dist/runtime-v2/pruning-mask.d.ts.map +1 -0
- package/core/dist/runtime-v2/pruning-mask.js +59 -0
- package/core/dist/runtime-v2/pruning-mask.js.map +1 -0
- package/core/dist/runtime-v2/pruning-read-model.d.ts +76 -0
- package/core/dist/runtime-v2/pruning-read-model.d.ts.map +1 -0
- package/core/dist/runtime-v2/pruning-read-model.js +266 -0
- package/core/dist/runtime-v2/pruning-read-model.js.map +1 -0
- package/core/dist/runtime-v2/pruning-review-log.d.ts +41 -0
- package/core/dist/runtime-v2/pruning-review-log.d.ts.map +1 -0
- package/core/dist/runtime-v2/pruning-review-log.js +106 -0
- package/core/dist/runtime-v2/pruning-review-log.js.map +1 -0
- package/core/dist/runtime-v2/recovery-sweep-service.d.ts +14 -0
- package/core/dist/runtime-v2/recovery-sweep-service.d.ts.map +1 -0
- package/core/dist/runtime-v2/recovery-sweep-service.js +26 -0
- package/core/dist/runtime-v2/recovery-sweep-service.js.map +1 -0
- package/core/dist/runtime-v2/remediation-contract.d.ts +46 -0
- package/core/dist/runtime-v2/remediation-contract.d.ts.map +1 -0
- package/core/dist/runtime-v2/remediation-contract.js +29 -0
- package/core/dist/runtime-v2/remediation-contract.js.map +1 -0
- package/core/dist/runtime-v2/runner/__tests__/default-validator.test.d.ts +2 -0
- package/core/dist/runtime-v2/runner/__tests__/default-validator.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/runner/__tests__/default-validator.test.js +526 -0
- package/core/dist/runtime-v2/runner/__tests__/default-validator.test.js.map +1 -0
- package/core/dist/runtime-v2/runner/__tests__/diagnose.test.d.ts +2 -0
- package/core/dist/runtime-v2/runner/__tests__/diagnose.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/runner/__tests__/diagnose.test.js +81 -0
- package/core/dist/runtime-v2/runner/__tests__/diagnose.test.js.map +1 -0
- package/core/dist/runtime-v2/runner/__tests__/diagnostician-runner.integration.test.d.ts +2 -0
- package/core/dist/runtime-v2/runner/__tests__/diagnostician-runner.integration.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/runner/__tests__/diagnostician-runner.integration.test.js +378 -0
- package/core/dist/runtime-v2/runner/__tests__/diagnostician-runner.integration.test.js.map +1 -0
- package/core/dist/runtime-v2/runner/__tests__/diagnostician-runner.test.d.ts +2 -0
- package/core/dist/runtime-v2/runner/__tests__/diagnostician-runner.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/runner/__tests__/diagnostician-runner.test.js +642 -0
- package/core/dist/runtime-v2/runner/__tests__/diagnostician-runner.test.js.map +1 -0
- package/core/dist/runtime-v2/runner/__tests__/diagnostician-telemetry.test.d.ts +2 -0
- package/core/dist/runtime-v2/runner/__tests__/diagnostician-telemetry.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/runner/__tests__/diagnostician-telemetry.test.js +286 -0
- package/core/dist/runtime-v2/runner/__tests__/diagnostician-telemetry.test.js.map +1 -0
- package/core/dist/runtime-v2/runner/__tests__/dual-track-e2e.test.d.ts +2 -0
- package/core/dist/runtime-v2/runner/__tests__/dual-track-e2e.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/runner/__tests__/dual-track-e2e.test.js +320 -0
- package/core/dist/runtime-v2/runner/__tests__/dual-track-e2e.test.js.map +1 -0
- package/core/dist/runtime-v2/runner/__tests__/lease-expiration-recovery.integration.test.d.ts +2 -0
- package/core/dist/runtime-v2/runner/__tests__/lease-expiration-recovery.integration.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/runner/__tests__/lease-expiration-recovery.integration.test.js +261 -0
- package/core/dist/runtime-v2/runner/__tests__/lease-expiration-recovery.integration.test.js.map +1 -0
- package/core/dist/runtime-v2/runner/__tests__/m5-05-e2e.test.d.ts +2 -0
- package/core/dist/runtime-v2/runner/__tests__/m5-05-e2e.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/runner/__tests__/m5-05-e2e.test.js +405 -0
- package/core/dist/runtime-v2/runner/__tests__/m5-05-e2e.test.js.map +1 -0
- package/core/dist/runtime-v2/runner/__tests__/m6-06-e2e.test.d.ts +2 -0
- package/core/dist/runtime-v2/runner/__tests__/m6-06-e2e.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/runner/__tests__/m6-06-e2e.test.js +347 -0
- package/core/dist/runtime-v2/runner/__tests__/m6-06-e2e.test.js.map +1 -0
- package/core/dist/runtime-v2/runner/__tests__/m6-06-legacy.test.d.ts +2 -0
- package/core/dist/runtime-v2/runner/__tests__/m6-06-legacy.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/runner/__tests__/m6-06-legacy.test.js +186 -0
- package/core/dist/runtime-v2/runner/__tests__/m6-06-legacy.test.js.map +1 -0
- package/core/dist/runtime-v2/runner/__tests__/m6-06-real-path.test.d.ts +2 -0
- package/core/dist/runtime-v2/runner/__tests__/m6-06-real-path.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/runner/__tests__/m6-06-real-path.test.js +355 -0
- package/core/dist/runtime-v2/runner/__tests__/m6-06-real-path.test.js.map +1 -0
- package/core/dist/runtime-v2/runner/__tests__/m8-02-e2e.test.d.ts +2 -0
- package/core/dist/runtime-v2/runner/__tests__/m8-02-e2e.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/runner/__tests__/m8-02-e2e.test.js +488 -0
- package/core/dist/runtime-v2/runner/__tests__/m8-02-e2e.test.js.map +1 -0
- package/core/dist/runtime-v2/runner/__tests__/m9-adapter-integration.test.d.ts +2 -0
- package/core/dist/runtime-v2/runner/__tests__/m9-adapter-integration.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/runner/__tests__/m9-adapter-integration.test.js +171 -0
- package/core/dist/runtime-v2/runner/__tests__/m9-adapter-integration.test.js.map +1 -0
- package/core/dist/runtime-v2/runner/__tests__/m9-e2e.test.d.ts +2 -0
- package/core/dist/runtime-v2/runner/__tests__/m9-e2e.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/runner/__tests__/m9-e2e.test.js +182 -0
- package/core/dist/runtime-v2/runner/__tests__/m9-e2e.test.js.map +1 -0
- package/core/dist/runtime-v2/runner/__tests__/max-attempts-exceeded.integration.test.d.ts +2 -0
- package/core/dist/runtime-v2/runner/__tests__/max-attempts-exceeded.integration.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/runner/__tests__/max-attempts-exceeded.integration.test.js +276 -0
- package/core/dist/runtime-v2/runner/__tests__/max-attempts-exceeded.integration.test.js.map +1 -0
- package/core/dist/runtime-v2/runner/__tests__/pain-signal-bridge-admission.test.d.ts +2 -0
- package/core/dist/runtime-v2/runner/__tests__/pain-signal-bridge-admission.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/runner/__tests__/pain-signal-bridge-admission.test.js +462 -0
- package/core/dist/runtime-v2/runner/__tests__/pain-signal-bridge-admission.test.js.map +1 -0
- package/core/dist/runtime-v2/runner/__tests__/pain-signal-bridge.test.d.ts +2 -0
- package/core/dist/runtime-v2/runner/__tests__/pain-signal-bridge.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/runner/__tests__/pain-signal-bridge.test.js +160 -0
- package/core/dist/runtime-v2/runner/__tests__/pain-signal-bridge.test.js.map +1 -0
- package/core/dist/runtime-v2/runner/__tests__/retry-wait-recovery.integration.test.d.ts +2 -0
- package/core/dist/runtime-v2/runner/__tests__/retry-wait-recovery.integration.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/runner/__tests__/retry-wait-recovery.integration.test.js +272 -0
- package/core/dist/runtime-v2/runner/__tests__/retry-wait-recovery.integration.test.js.map +1 -0
- package/core/dist/runtime-v2/runner/__tests__/start-run-input.test.d.ts +2 -0
- package/core/dist/runtime-v2/runner/__tests__/start-run-input.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/runner/__tests__/start-run-input.test.js +67 -0
- package/core/dist/runtime-v2/runner/__tests__/start-run-input.test.js.map +1 -0
- package/core/dist/runtime-v2/runner/default-validator.d.ts +10 -0
- package/core/dist/runtime-v2/runner/default-validator.d.ts.map +1 -0
- package/core/dist/runtime-v2/runner/default-validator.js +168 -0
- package/core/dist/runtime-v2/runner/default-validator.js.map +1 -0
- package/core/dist/runtime-v2/runner/diagnostician-runner-options.d.ts +37 -0
- package/core/dist/runtime-v2/runner/diagnostician-runner-options.d.ts.map +1 -0
- package/core/dist/runtime-v2/runner/diagnostician-runner-options.js +19 -0
- package/core/dist/runtime-v2/runner/diagnostician-runner-options.js.map +1 -0
- package/core/dist/runtime-v2/runner/diagnostician-runner.d.ts +87 -0
- package/core/dist/runtime-v2/runner/diagnostician-runner.d.ts.map +1 -0
- package/core/dist/runtime-v2/runner/diagnostician-runner.js +417 -0
- package/core/dist/runtime-v2/runner/diagnostician-runner.js.map +1 -0
- package/core/dist/runtime-v2/runner/diagnostician-validator.d.ts +56 -0
- package/core/dist/runtime-v2/runner/diagnostician-validator.d.ts.map +1 -0
- package/core/dist/runtime-v2/runner/diagnostician-validator.js +11 -0
- package/core/dist/runtime-v2/runner/diagnostician-validator.js.map +1 -0
- package/core/dist/runtime-v2/runner/runner-phase.d.ts +21 -0
- package/core/dist/runtime-v2/runner/runner-phase.d.ts.map +1 -0
- package/core/dist/runtime-v2/runner/runner-phase.js +22 -0
- package/core/dist/runtime-v2/runner/runner-phase.js.map +1 -0
- package/core/dist/runtime-v2/runner/runner-result.d.ts +20 -0
- package/core/dist/runtime-v2/runner/runner-result.d.ts.map +1 -0
- package/core/dist/runtime-v2/runner/runner-result.js +2 -0
- package/core/dist/runtime-v2/runner/runner-result.js.map +1 -0
- package/core/dist/runtime-v2/runtime-protocol.d.ts +165 -0
- package/core/dist/runtime-v2/runtime-protocol.d.ts.map +1 -0
- package/core/dist/runtime-v2/runtime-protocol.js +130 -0
- package/core/dist/runtime-v2/runtime-protocol.js.map +1 -0
- package/core/dist/runtime-v2/runtime-selector.d.ts +77 -0
- package/core/dist/runtime-v2/runtime-selector.d.ts.map +1 -0
- package/core/dist/runtime-v2/runtime-selector.js +23 -0
- package/core/dist/runtime-v2/runtime-selector.js.map +1 -0
- package/core/dist/runtime-v2/runtime-state-handle.d.ts +10 -0
- package/core/dist/runtime-v2/runtime-state-handle.d.ts.map +1 -0
- package/core/dist/runtime-v2/runtime-state-handle.js +30 -0
- package/core/dist/runtime-v2/runtime-state-handle.js.map +1 -0
- package/core/dist/runtime-v2/schema-conformance-read-model.d.ts +24 -0
- package/core/dist/runtime-v2/schema-conformance-read-model.d.ts.map +1 -0
- package/core/dist/runtime-v2/schema-conformance-read-model.js +178 -0
- package/core/dist/runtime-v2/schema-conformance-read-model.js.map +1 -0
- package/core/dist/runtime-v2/schema-version.d.ts +20 -0
- package/core/dist/runtime-v2/schema-version.d.ts.map +1 -0
- package/core/dist/runtime-v2/schema-version.js +20 -0
- package/core/dist/runtime-v2/schema-version.js.map +1 -0
- package/core/dist/runtime-v2/store/artifact/artifact-store.d.ts +28 -0
- package/core/dist/runtime-v2/store/artifact/artifact-store.d.ts.map +1 -0
- package/core/dist/runtime-v2/store/artifact/artifact-store.js +2 -0
- package/core/dist/runtime-v2/store/artifact/artifact-store.js.map +1 -0
- package/core/dist/runtime-v2/store/artifact/index.d.ts +4 -0
- package/core/dist/runtime-v2/store/artifact/index.d.ts.map +1 -0
- package/core/dist/runtime-v2/store/artifact/index.js +3 -0
- package/core/dist/runtime-v2/store/artifact/index.js.map +1 -0
- package/core/dist/runtime-v2/store/artifact/memory-artifact-store.d.ts +14 -0
- package/core/dist/runtime-v2/store/artifact/memory-artifact-store.d.ts.map +1 -0
- package/core/dist/runtime-v2/store/artifact/memory-artifact-store.js +25 -0
- package/core/dist/runtime-v2/store/artifact/memory-artifact-store.js.map +1 -0
- package/core/dist/runtime-v2/store/artifact/sqlite-artifact-store.d.ts +12 -0
- package/core/dist/runtime-v2/store/artifact/sqlite-artifact-store.d.ts.map +1 -0
- package/core/dist/runtime-v2/store/artifact/sqlite-artifact-store.js +51 -0
- package/core/dist/runtime-v2/store/artifact/sqlite-artifact-store.js.map +1 -0
- package/core/dist/runtime-v2/store/artifact/sqlite-pi-artifact-store.d.ts +13 -0
- package/core/dist/runtime-v2/store/artifact/sqlite-pi-artifact-store.d.ts.map +1 -0
- package/core/dist/runtime-v2/store/artifact/sqlite-pi-artifact-store.js +98 -0
- package/core/dist/runtime-v2/store/artifact/sqlite-pi-artifact-store.js.map +1 -0
- package/core/dist/runtime-v2/store/candidate/__tests__/recommendation-kind-resolver.test.d.ts +2 -0
- package/core/dist/runtime-v2/store/candidate/__tests__/recommendation-kind-resolver.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/store/candidate/__tests__/recommendation-kind-resolver.test.js +34 -0
- package/core/dist/runtime-v2/store/candidate/__tests__/recommendation-kind-resolver.test.js.map +1 -0
- package/core/dist/runtime-v2/store/candidate/candidate-store.d.ts +42 -0
- package/core/dist/runtime-v2/store/candidate/candidate-store.d.ts.map +1 -0
- package/core/dist/runtime-v2/store/candidate/candidate-store.js +2 -0
- package/core/dist/runtime-v2/store/candidate/candidate-store.js.map +1 -0
- package/core/dist/runtime-v2/store/candidate/index.d.ts +4 -0
- package/core/dist/runtime-v2/store/candidate/index.d.ts.map +1 -0
- package/core/dist/runtime-v2/store/candidate/index.js +3 -0
- package/core/dist/runtime-v2/store/candidate/index.js.map +1 -0
- package/core/dist/runtime-v2/store/candidate/memory-candidate-store.d.ts +22 -0
- package/core/dist/runtime-v2/store/candidate/memory-candidate-store.d.ts.map +1 -0
- package/core/dist/runtime-v2/store/candidate/memory-candidate-store.js +36 -0
- package/core/dist/runtime-v2/store/candidate/memory-candidate-store.js.map +1 -0
- package/core/dist/runtime-v2/store/candidate/recommendation-kind-resolver.d.ts +4 -0
- package/core/dist/runtime-v2/store/candidate/recommendation-kind-resolver.d.ts.map +1 -0
- package/core/dist/runtime-v2/store/candidate/recommendation-kind-resolver.js +14 -0
- package/core/dist/runtime-v2/store/candidate/recommendation-kind-resolver.js.map +1 -0
- package/core/dist/runtime-v2/store/candidate/sqlite-candidate-store.d.ts +13 -0
- package/core/dist/runtime-v2/store/candidate/sqlite-candidate-store.d.ts.map +1 -0
- package/core/dist/runtime-v2/store/candidate/sqlite-candidate-store.js +61 -0
- package/core/dist/runtime-v2/store/candidate/sqlite-candidate-store.js.map +1 -0
- package/core/dist/runtime-v2/store/commit/commit-store.d.ts +19 -0
- package/core/dist/runtime-v2/store/commit/commit-store.d.ts.map +1 -0
- package/core/dist/runtime-v2/store/commit/commit-store.js +2 -0
- package/core/dist/runtime-v2/store/commit/commit-store.js.map +1 -0
- package/core/dist/runtime-v2/store/commit/diagnostician-committer.d.ts +47 -0
- package/core/dist/runtime-v2/store/commit/diagnostician-committer.d.ts.map +1 -0
- package/core/dist/runtime-v2/store/commit/diagnostician-committer.js +140 -0
- package/core/dist/runtime-v2/store/commit/diagnostician-committer.js.map +1 -0
- package/core/dist/runtime-v2/store/commit/index.d.ts +7 -0
- package/core/dist/runtime-v2/store/commit/index.d.ts.map +1 -0
- package/core/dist/runtime-v2/store/commit/index.js +4 -0
- package/core/dist/runtime-v2/store/commit/index.js.map +1 -0
- package/core/dist/runtime-v2/store/commit/memory-commit-store.d.ts +16 -0
- package/core/dist/runtime-v2/store/commit/memory-commit-store.d.ts.map +1 -0
- package/core/dist/runtime-v2/store/commit/memory-commit-store.js +18 -0
- package/core/dist/runtime-v2/store/commit/memory-commit-store.js.map +1 -0
- package/core/dist/runtime-v2/store/commit/sqlite-commit-store.d.ts +11 -0
- package/core/dist/runtime-v2/store/commit/sqlite-commit-store.d.ts.map +1 -0
- package/core/dist/runtime-v2/store/commit/sqlite-commit-store.js +25 -0
- package/core/dist/runtime-v2/store/commit/sqlite-commit-store.js.map +1 -0
- package/core/dist/runtime-v2/store/concurrent-lease.test.d.ts +2 -0
- package/core/dist/runtime-v2/store/concurrent-lease.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/store/concurrent-lease.test.js +129 -0
- package/core/dist/runtime-v2/store/concurrent-lease.test.js.map +1 -0
- package/core/dist/runtime-v2/store/context/context-assembler.d.ts +19 -0
- package/core/dist/runtime-v2/store/context/context-assembler.d.ts.map +1 -0
- package/core/dist/runtime-v2/store/context/context-assembler.js +2 -0
- package/core/dist/runtime-v2/store/context/context-assembler.js.map +1 -0
- package/core/dist/runtime-v2/store/context/index.d.ts +4 -0
- package/core/dist/runtime-v2/store/context/index.d.ts.map +1 -0
- package/core/dist/runtime-v2/store/context/index.js +3 -0
- package/core/dist/runtime-v2/store/context/index.js.map +1 -0
- package/core/dist/runtime-v2/store/context/resilient-context-assembler.d.ts +13 -0
- package/core/dist/runtime-v2/store/context/resilient-context-assembler.d.ts.map +1 -0
- package/core/dist/runtime-v2/store/context/resilient-context-assembler.js +72 -0
- package/core/dist/runtime-v2/store/context/resilient-context-assembler.js.map +1 -0
- package/core/dist/runtime-v2/store/context/resilient-context-assembler.test.d.ts +2 -0
- package/core/dist/runtime-v2/store/context/resilient-context-assembler.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/store/context/resilient-context-assembler.test.js +113 -0
- package/core/dist/runtime-v2/store/context/resilient-context-assembler.test.js.map +1 -0
- package/core/dist/runtime-v2/store/context/sqlite-context-assembler.d.ts +28 -0
- package/core/dist/runtime-v2/store/context/sqlite-context-assembler.d.ts.map +1 -0
- package/core/dist/runtime-v2/store/context/sqlite-context-assembler.js +277 -0
- package/core/dist/runtime-v2/store/context/sqlite-context-assembler.js.map +1 -0
- package/core/dist/runtime-v2/store/context/sqlite-context-assembler.test.d.ts +2 -0
- package/core/dist/runtime-v2/store/context/sqlite-context-assembler.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/store/context/sqlite-context-assembler.test.js +1181 -0
- package/core/dist/runtime-v2/store/context/sqlite-context-assembler.test.js.map +1 -0
- package/core/dist/runtime-v2/store/diagnostician-committer.test.d.ts +2 -0
- package/core/dist/runtime-v2/store/diagnostician-committer.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/store/diagnostician-committer.test.js +326 -0
- package/core/dist/runtime-v2/store/diagnostician-committer.test.js.map +1 -0
- package/core/dist/runtime-v2/store/event-emitter.d.ts +18 -0
- package/core/dist/runtime-v2/store/event-emitter.d.ts.map +1 -0
- package/core/dist/runtime-v2/store/event-emitter.js +78 -0
- package/core/dist/runtime-v2/store/event-emitter.js.map +1 -0
- package/core/dist/runtime-v2/store/history/history-query.d.ts +57 -0
- package/core/dist/runtime-v2/store/history/history-query.d.ts.map +1 -0
- package/core/dist/runtime-v2/store/history/history-query.js +7 -0
- package/core/dist/runtime-v2/store/history/history-query.js.map +1 -0
- package/core/dist/runtime-v2/store/history/index.d.ts +5 -0
- package/core/dist/runtime-v2/store/history/index.d.ts.map +1 -0
- package/core/dist/runtime-v2/store/history/index.js +4 -0
- package/core/dist/runtime-v2/store/history/index.js.map +1 -0
- package/core/dist/runtime-v2/store/history/resilient-history-query.d.ts +20 -0
- package/core/dist/runtime-v2/store/history/resilient-history-query.d.ts.map +1 -0
- package/core/dist/runtime-v2/store/history/resilient-history-query.js +40 -0
- package/core/dist/runtime-v2/store/history/resilient-history-query.js.map +1 -0
- package/core/dist/runtime-v2/store/history/resilient-history-query.test.d.ts +2 -0
- package/core/dist/runtime-v2/store/history/resilient-history-query.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/store/history/resilient-history-query.test.js +128 -0
- package/core/dist/runtime-v2/store/history/resilient-history-query.test.js.map +1 -0
- package/core/dist/runtime-v2/store/history/sqlite-history-query.d.ts +24 -0
- package/core/dist/runtime-v2/store/history/sqlite-history-query.d.ts.map +1 -0
- package/core/dist/runtime-v2/store/history/sqlite-history-query.js +166 -0
- package/core/dist/runtime-v2/store/history/sqlite-history-query.js.map +1 -0
- package/core/dist/runtime-v2/store/history/sqlite-history-query.test.d.ts +2 -0
- package/core/dist/runtime-v2/store/history/sqlite-history-query.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/store/history/sqlite-history-query.test.js +536 -0
- package/core/dist/runtime-v2/store/history/sqlite-history-query.test.js.map +1 -0
- package/core/dist/runtime-v2/store/idempotent-transitions.test.d.ts +2 -0
- package/core/dist/runtime-v2/store/idempotent-transitions.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/store/idempotent-transitions.test.js +168 -0
- package/core/dist/runtime-v2/store/idempotent-transitions.test.js.map +1 -0
- package/core/dist/runtime-v2/store/lifecycle/index.d.ts +7 -0
- package/core/dist/runtime-v2/store/lifecycle/index.d.ts.map +1 -0
- package/core/dist/runtime-v2/store/lifecycle/index.js +4 -0
- package/core/dist/runtime-v2/store/lifecycle/index.js.map +1 -0
- package/core/dist/runtime-v2/store/lifecycle/lease-manager.d.ts +91 -0
- package/core/dist/runtime-v2/store/lifecycle/lease-manager.d.ts.map +1 -0
- package/core/dist/runtime-v2/store/lifecycle/lease-manager.js +154 -0
- package/core/dist/runtime-v2/store/lifecycle/lease-manager.js.map +1 -0
- package/core/dist/runtime-v2/store/lifecycle/lease-manager.test.d.ts +2 -0
- package/core/dist/runtime-v2/store/lifecycle/lease-manager.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/store/lifecycle/lease-manager.test.js +243 -0
- package/core/dist/runtime-v2/store/lifecycle/lease-manager.test.js.map +1 -0
- package/core/dist/runtime-v2/store/lifecycle/recovery-sweep.d.ts +82 -0
- package/core/dist/runtime-v2/store/lifecycle/recovery-sweep.d.ts.map +1 -0
- package/core/dist/runtime-v2/store/lifecycle/recovery-sweep.js +145 -0
- package/core/dist/runtime-v2/store/lifecycle/recovery-sweep.js.map +1 -0
- package/core/dist/runtime-v2/store/lifecycle/recovery-sweep.test.d.ts +2 -0
- package/core/dist/runtime-v2/store/lifecycle/recovery-sweep.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/store/lifecycle/recovery-sweep.test.js +318 -0
- package/core/dist/runtime-v2/store/lifecycle/recovery-sweep.test.js.map +1 -0
- package/core/dist/runtime-v2/store/lifecycle/retry-policy.d.ts +105 -0
- package/core/dist/runtime-v2/store/lifecycle/retry-policy.d.ts.map +1 -0
- package/core/dist/runtime-v2/store/lifecycle/retry-policy.js +48 -0
- package/core/dist/runtime-v2/store/lifecycle/retry-policy.js.map +1 -0
- package/core/dist/runtime-v2/store/lifecycle/retry-policy.test.d.ts +2 -0
- package/core/dist/runtime-v2/store/lifecycle/retry-policy.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/store/lifecycle/retry-policy.test.js +86 -0
- package/core/dist/runtime-v2/store/lifecycle/retry-policy.test.js.map +1 -0
- package/core/dist/runtime-v2/store/run/index.d.ts +4 -0
- package/core/dist/runtime-v2/store/run/index.d.ts.map +1 -0
- package/core/dist/runtime-v2/store/run/index.js +3 -0
- package/core/dist/runtime-v2/store/run/index.js.map +1 -0
- package/core/dist/runtime-v2/store/run/memory-run-store.d.ts +15 -0
- package/core/dist/runtime-v2/store/run/memory-run-store.d.ts.map +1 -0
- package/core/dist/runtime-v2/store/run/memory-run-store.js +33 -0
- package/core/dist/runtime-v2/store/run/memory-run-store.js.map +1 -0
- package/core/dist/runtime-v2/store/run/run-store.d.ts +43 -0
- package/core/dist/runtime-v2/store/run/run-store.d.ts.map +1 -0
- package/core/dist/runtime-v2/store/run/run-store.js +2 -0
- package/core/dist/runtime-v2/store/run/run-store.js.map +1 -0
- package/core/dist/runtime-v2/store/run/sqlite-run-store.d.ts +14 -0
- package/core/dist/runtime-v2/store/run/sqlite-run-store.d.ts.map +1 -0
- package/core/dist/runtime-v2/store/run/sqlite-run-store.js +108 -0
- package/core/dist/runtime-v2/store/run/sqlite-run-store.js.map +1 -0
- package/core/dist/runtime-v2/store/runtime-state-manager.d.ts +116 -0
- package/core/dist/runtime-v2/store/runtime-state-manager.d.ts.map +1 -0
- package/core/dist/runtime-v2/store/runtime-state-manager.integration.test.d.ts +2 -0
- package/core/dist/runtime-v2/store/runtime-state-manager.integration.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/store/runtime-state-manager.integration.test.js +187 -0
- package/core/dist/runtime-v2/store/runtime-state-manager.integration.test.js.map +1 -0
- package/core/dist/runtime-v2/store/runtime-state-manager.js +321 -0
- package/core/dist/runtime-v2/store/runtime-state-manager.js.map +1 -0
- package/core/dist/runtime-v2/store/schema-conformance.test.d.ts +2 -0
- package/core/dist/runtime-v2/store/schema-conformance.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/store/schema-conformance.test.js +607 -0
- package/core/dist/runtime-v2/store/schema-conformance.test.js.map +1 -0
- package/core/dist/runtime-v2/store/sqlite-connection-close.test.d.ts +2 -0
- package/core/dist/runtime-v2/store/sqlite-connection-close.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/store/sqlite-connection-close.test.js +57 -0
- package/core/dist/runtime-v2/store/sqlite-connection-close.test.js.map +1 -0
- package/core/dist/runtime-v2/store/sqlite-connection-pragma.test.d.ts +2 -0
- package/core/dist/runtime-v2/store/sqlite-connection-pragma.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/store/sqlite-connection-pragma.test.js +261 -0
- package/core/dist/runtime-v2/store/sqlite-connection-pragma.test.js.map +1 -0
- package/core/dist/runtime-v2/store/sqlite-connection.d.ts +39 -0
- package/core/dist/runtime-v2/store/sqlite-connection.d.ts.map +1 -0
- package/core/dist/runtime-v2/store/sqlite-connection.js +364 -0
- package/core/dist/runtime-v2/store/sqlite-connection.js.map +1 -0
- package/core/dist/runtime-v2/store/sqlite-run-store.test.d.ts +2 -0
- package/core/dist/runtime-v2/store/sqlite-run-store.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/store/sqlite-run-store.test.js +152 -0
- package/core/dist/runtime-v2/store/sqlite-run-store.test.js.map +1 -0
- package/core/dist/runtime-v2/store/sqlite-task-store.test.d.ts +2 -0
- package/core/dist/runtime-v2/store/sqlite-task-store.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/store/sqlite-task-store.test.js +166 -0
- package/core/dist/runtime-v2/store/sqlite-task-store.test.js.map +1 -0
- package/core/dist/runtime-v2/store/task/index.d.ts +4 -0
- package/core/dist/runtime-v2/store/task/index.d.ts.map +1 -0
- package/core/dist/runtime-v2/store/task/index.js +3 -0
- package/core/dist/runtime-v2/store/task/index.js.map +1 -0
- package/core/dist/runtime-v2/store/task/memory-task-store.d.ts +15 -0
- package/core/dist/runtime-v2/store/task/memory-task-store.d.ts.map +1 -0
- package/core/dist/runtime-v2/store/task/memory-task-store.js +43 -0
- package/core/dist/runtime-v2/store/task/memory-task-store.js.map +1 -0
- package/core/dist/runtime-v2/store/task/sqlite-task-store.d.ts +14 -0
- package/core/dist/runtime-v2/store/task/sqlite-task-store.d.ts.map +1 -0
- package/core/dist/runtime-v2/store/task/sqlite-task-store.js +144 -0
- package/core/dist/runtime-v2/store/task/sqlite-task-store.js.map +1 -0
- package/core/dist/runtime-v2/store/task/task-store.d.ts +48 -0
- package/core/dist/runtime-v2/store/task/task-store.d.ts.map +1 -0
- package/core/dist/runtime-v2/store/task/task-store.js +2 -0
- package/core/dist/runtime-v2/store/task/task-store.js.map +1 -0
- package/core/dist/runtime-v2/store/task-migration.d.ts +89 -0
- package/core/dist/runtime-v2/store/task-migration.d.ts.map +1 -0
- package/core/dist/runtime-v2/store/task-migration.js +79 -0
- package/core/dist/runtime-v2/store/task-migration.js.map +1 -0
- package/core/dist/runtime-v2/store/trajectory/index.d.ts +5 -0
- package/core/dist/runtime-v2/store/trajectory/index.d.ts.map +1 -0
- package/core/dist/runtime-v2/store/trajectory/index.js +3 -0
- package/core/dist/runtime-v2/store/trajectory/index.js.map +1 -0
- package/core/dist/runtime-v2/store/trajectory/source-trace-locator.d.ts +40 -0
- package/core/dist/runtime-v2/store/trajectory/source-trace-locator.d.ts.map +1 -0
- package/core/dist/runtime-v2/store/trajectory/source-trace-locator.js +18 -0
- package/core/dist/runtime-v2/store/trajectory/source-trace-locator.js.map +1 -0
- package/core/dist/runtime-v2/store/trajectory/source-trace-locator.test.d.ts +2 -0
- package/core/dist/runtime-v2/store/trajectory/source-trace-locator.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/store/trajectory/source-trace-locator.test.js +320 -0
- package/core/dist/runtime-v2/store/trajectory/source-trace-locator.test.js.map +1 -0
- package/core/dist/runtime-v2/store/trajectory/sqlite-source-trace-locator.d.ts +23 -0
- package/core/dist/runtime-v2/store/trajectory/sqlite-source-trace-locator.d.ts.map +1 -0
- package/core/dist/runtime-v2/store/trajectory/sqlite-source-trace-locator.js +140 -0
- package/core/dist/runtime-v2/store/trajectory/sqlite-source-trace-locator.js.map +1 -0
- package/core/dist/runtime-v2/store/trajectory/sqlite-trajectory-locator.d.ts +27 -0
- package/core/dist/runtime-v2/store/trajectory/sqlite-trajectory-locator.d.ts.map +1 -0
- package/core/dist/runtime-v2/store/trajectory/sqlite-trajectory-locator.js +183 -0
- package/core/dist/runtime-v2/store/trajectory/sqlite-trajectory-locator.js.map +1 -0
- package/core/dist/runtime-v2/store/trajectory/sqlite-trajectory-locator.test.d.ts +2 -0
- package/core/dist/runtime-v2/store/trajectory/sqlite-trajectory-locator.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/store/trajectory/sqlite-trajectory-locator.test.js +328 -0
- package/core/dist/runtime-v2/store/trajectory/sqlite-trajectory-locator.test.js.map +1 -0
- package/core/dist/runtime-v2/store/trajectory/trajectory-locator.d.ts +30 -0
- package/core/dist/runtime-v2/store/trajectory/trajectory-locator.d.ts.map +1 -0
- package/core/dist/runtime-v2/store/trajectory/trajectory-locator.js +2 -0
- package/core/dist/runtime-v2/store/trajectory/trajectory-locator.js.map +1 -0
- package/core/dist/runtime-v2/store/workspace-isolation.test.d.ts +2 -0
- package/core/dist/runtime-v2/store/workspace-isolation.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/store/workspace-isolation.test.js +139 -0
- package/core/dist/runtime-v2/store/workspace-isolation.test.js.map +1 -0
- package/core/dist/runtime-v2/story-a-demo.d.ts +67 -0
- package/core/dist/runtime-v2/story-a-demo.d.ts.map +1 -0
- package/core/dist/runtime-v2/story-a-demo.js +188 -0
- package/core/dist/runtime-v2/story-a-demo.js.map +1 -0
- package/core/dist/runtime-v2/synthetic-baseline.d.ts +28 -0
- package/core/dist/runtime-v2/synthetic-baseline.d.ts.map +1 -0
- package/core/dist/runtime-v2/synthetic-baseline.js +116 -0
- package/core/dist/runtime-v2/synthetic-baseline.js.map +1 -0
- package/core/dist/runtime-v2/task-status.d.ts +99 -0
- package/core/dist/runtime-v2/task-status.d.ts.map +1 -0
- package/core/dist/runtime-v2/task-status.js +88 -0
- package/core/dist/runtime-v2/task-status.js.map +1 -0
- package/core/dist/runtime-v2/trace-refiner-agent.d.ts +71 -0
- package/core/dist/runtime-v2/trace-refiner-agent.d.ts.map +1 -0
- package/core/dist/runtime-v2/trace-refiner-agent.js +239 -0
- package/core/dist/runtime-v2/trace-refiner-agent.js.map +1 -0
- package/core/dist/runtime-v2/trace-refiner.d.ts +47 -0
- package/core/dist/runtime-v2/trace-refiner.d.ts.map +1 -0
- package/core/dist/runtime-v2/trace-refiner.js +261 -0
- package/core/dist/runtime-v2/trace-refiner.js.map +1 -0
- package/core/dist/runtime-v2/types/artifact-lineage.d.ts +19 -0
- package/core/dist/runtime-v2/types/artifact-lineage.d.ts.map +1 -0
- package/core/dist/runtime-v2/types/artifact-lineage.js +6 -0
- package/core/dist/runtime-v2/types/artifact-lineage.js.map +1 -0
- package/core/dist/runtime-v2/types/event-payload.d.ts +232 -0
- package/core/dist/runtime-v2/types/event-payload.d.ts.map +1 -0
- package/core/dist/runtime-v2/types/event-payload.js +149 -0
- package/core/dist/runtime-v2/types/event-payload.js.map +1 -0
- package/core/dist/runtime-v2/types/event-types.d.ts +843 -0
- package/core/dist/runtime-v2/types/event-types.d.ts.map +1 -0
- package/core/dist/runtime-v2/types/event-types.js +486 -0
- package/core/dist/runtime-v2/types/event-types.js.map +1 -0
- package/core/dist/runtime-v2/types/hygiene-types.d.ts +40 -0
- package/core/dist/runtime-v2/types/hygiene-types.d.ts.map +1 -0
- package/core/dist/runtime-v2/types/hygiene-types.js +30 -0
- package/core/dist/runtime-v2/types/hygiene-types.js.map +1 -0
- package/core/dist/runtime-v2/types/index.d.ts +32 -0
- package/core/dist/runtime-v2/types/index.d.ts.map +1 -0
- package/core/dist/runtime-v2/types/index.js +17 -0
- package/core/dist/runtime-v2/types/index.js.map +1 -0
- package/core/dist/runtime-v2/types/pain-signal.d.ts +63 -0
- package/core/dist/runtime-v2/types/pain-signal.d.ts.map +1 -0
- package/core/dist/runtime-v2/types/pain-signal.js +118 -0
- package/core/dist/runtime-v2/types/pain-signal.js.map +1 -0
- package/core/dist/runtime-v2/types/pd-task-types.d.ts +139 -0
- package/core/dist/runtime-v2/types/pd-task-types.d.ts.map +1 -0
- package/core/dist/runtime-v2/types/pd-task-types.js +99 -0
- package/core/dist/runtime-v2/types/pd-task-types.js.map +1 -0
- package/core/dist/runtime-v2/types/principle-dependency.d.ts +15 -0
- package/core/dist/runtime-v2/types/principle-dependency.d.ts.map +1 -0
- package/core/dist/runtime-v2/types/principle-dependency.js +8 -0
- package/core/dist/runtime-v2/types/principle-dependency.js.map +1 -0
- package/core/dist/runtime-v2/types/principle-enums.d.ts +19 -0
- package/core/dist/runtime-v2/types/principle-enums.d.ts.map +1 -0
- package/core/dist/runtime-v2/types/principle-enums.js +59 -0
- package/core/dist/runtime-v2/types/principle-enums.js.map +1 -0
- package/core/dist/runtime-v2/types/principle-lifecycle-event.d.ts +28 -0
- package/core/dist/runtime-v2/types/principle-lifecycle-event.d.ts.map +1 -0
- package/core/dist/runtime-v2/types/principle-lifecycle-event.js +24 -0
- package/core/dist/runtime-v2/types/principle-lifecycle-event.js.map +1 -0
- package/core/dist/runtime-v2/types/principle-schema.d.ts +136 -0
- package/core/dist/runtime-v2/types/principle-schema.d.ts.map +1 -0
- package/core/dist/runtime-v2/types/principle-schema.js +71 -0
- package/core/dist/runtime-v2/types/principle-schema.js.map +1 -0
- package/core/dist/runtime-v2/types/principle-tree-store.d.ts +89 -0
- package/core/dist/runtime-v2/types/principle-tree-store.d.ts.map +1 -0
- package/core/dist/runtime-v2/types/principle-tree-store.js +11 -0
- package/core/dist/runtime-v2/types/principle-tree-store.js.map +1 -0
- package/core/dist/runtime-v2/types/principle-value-metrics.d.ts +27 -0
- package/core/dist/runtime-v2/types/principle-value-metrics.d.ts.map +1 -0
- package/core/dist/runtime-v2/types/principle-value-metrics.js +14 -0
- package/core/dist/runtime-v2/types/principle-value-metrics.js.map +1 -0
- package/core/dist/runtime-v2/types/queue-types.d.ts +51 -0
- package/core/dist/runtime-v2/types/queue-types.d.ts.map +1 -0
- package/core/dist/runtime-v2/types/queue-types.js +44 -0
- package/core/dist/runtime-v2/types/queue-types.js.map +1 -0
- package/core/dist/runtime-v2/types/replay-types.d.ts +40 -0
- package/core/dist/runtime-v2/types/replay-types.d.ts.map +1 -0
- package/core/dist/runtime-v2/types/replay-types.js +2 -0
- package/core/dist/runtime-v2/types/replay-types.js.map +1 -0
- package/core/dist/runtime-v2/types/runtime-summary-types.d.ts +93 -0
- package/core/dist/runtime-v2/types/runtime-summary-types.d.ts.map +1 -0
- package/core/dist/runtime-v2/types/runtime-summary-types.js +35 -0
- package/core/dist/runtime-v2/types/runtime-summary-types.js.map +1 -0
- package/core/dist/runtime-v2/utils/cli-process-runner.d.ts +35 -0
- package/core/dist/runtime-v2/utils/cli-process-runner.d.ts.map +1 -0
- package/core/dist/runtime-v2/utils/cli-process-runner.js +259 -0
- package/core/dist/runtime-v2/utils/cli-process-runner.js.map +1 -0
- package/core/dist/runtime-v2/utils/cli-process-runner.test.d.ts +2 -0
- package/core/dist/runtime-v2/utils/cli-process-runner.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/utils/cli-process-runner.test.js +111 -0
- package/core/dist/runtime-v2/utils/cli-process-runner.test.js.map +1 -0
- package/core/dist/storage-adapter.d.ts +59 -0
- package/core/dist/storage-adapter.d.ts.map +1 -0
- package/core/dist/storage-adapter.js +2 -0
- package/core/dist/storage-adapter.js.map +1 -0
- package/core/dist/telemetry-event.d.ts +102 -0
- package/core/dist/telemetry-event.d.ts.map +1 -0
- package/core/dist/telemetry-event.js +186 -0
- package/core/dist/telemetry-event.js.map +1 -0
- package/core/dist/trajectory-store.d.ts +45 -0
- package/core/dist/trajectory-store.d.ts.map +1 -0
- package/core/dist/trajectory-store.js +139 -0
- package/core/dist/trajectory-store.js.map +1 -0
- package/core/dist/types/workspace-resolver.d.ts +25 -0
- package/core/dist/types/workspace-resolver.d.ts.map +1 -0
- package/core/dist/types/workspace-resolver.js +10 -0
- package/core/dist/types/workspace-resolver.js.map +1 -0
- package/core/dist/types.d.ts +56 -0
- package/core/dist/types.d.ts.map +1 -0
- package/core/dist/types.js +16 -0
- package/core/dist/types.js.map +1 -0
- package/core/dist/workflow-funnel-loader.d.ts +143 -0
- package/core/dist/workflow-funnel-loader.d.ts.map +1 -0
- package/core/dist/workflow-funnel-loader.js +174 -0
- package/core/dist/workflow-funnel-loader.js.map +1 -0
- package/core/package.json +100 -0
- package/dist/i18n.d.ts +6 -0
- package/dist/i18n.d.ts.map +1 -0
- package/dist/i18n.js +176 -0
- package/dist/i18n.js.map +1 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +203 -122
- package/dist/index.js.map +1 -1
- package/dist/installer.d.ts +21 -6
- package/dist/installer.d.ts.map +1 -1
- package/dist/installer.js +846 -178
- package/dist/installer.js.map +1 -1
- package/dist/mvp-config.d.ts +81 -0
- package/dist/mvp-config.d.ts.map +1 -0
- package/dist/mvp-config.js +265 -0
- package/dist/mvp-config.js.map +1 -0
- package/dist/prompts.d.ts +8 -11
- package/dist/prompts.d.ts.map +1 -1
- package/dist/prompts.js +52 -80
- package/dist/prompts.js.map +1 -1
- package/dist/uninstaller.d.ts +6 -4
- package/dist/uninstaller.d.ts.map +1 -1
- package/dist/uninstaller.js +238 -51
- package/dist/uninstaller.js.map +1 -1
- package/dist/updater.d.ts +45 -0
- package/dist/updater.d.ts.map +1 -0
- package/dist/updater.js +333 -0
- package/dist/updater.js.map +1 -0
- package/dist/utils/env.d.ts +8 -0
- package/dist/utils/env.d.ts.map +1 -1
- package/dist/utils/env.js +79 -3
- package/dist/utils/env.js.map +1 -1
- package/dist/utils/logger.d.ts +1 -0
- package/dist/utils/logger.d.ts.map +1 -1
- package/dist/utils/logger.js +16 -8
- package/dist/utils/logger.js.map +1 -1
- package/package.json +24 -9
- package/pd-cli/dist/commands/artifact.d.ts +14 -0
- package/pd-cli/dist/commands/artifact.d.ts.map +1 -0
- package/pd-cli/dist/commands/artifact.js +67 -0
- package/pd-cli/dist/commands/artifact.js.map +1 -0
- package/pd-cli/dist/commands/candidate.d.ts +83 -0
- package/pd-cli/dist/commands/candidate.d.ts.map +1 -0
- package/pd-cli/dist/commands/candidate.js +891 -0
- package/pd-cli/dist/commands/candidate.js.map +1 -0
- package/pd-cli/dist/commands/central-sync.d.ts +10 -0
- package/pd-cli/dist/commands/central-sync.d.ts.map +1 -0
- package/pd-cli/dist/commands/central-sync.js +32 -0
- package/pd-cli/dist/commands/central-sync.js.map +1 -0
- package/pd-cli/dist/commands/console.d.ts +9 -0
- package/pd-cli/dist/commands/console.d.ts.map +1 -0
- package/pd-cli/dist/commands/console.js +114 -0
- package/pd-cli/dist/commands/console.js.map +1 -0
- package/pd-cli/dist/commands/context.d.ts +7 -0
- package/pd-cli/dist/commands/context.d.ts.map +1 -0
- package/pd-cli/dist/commands/context.js +55 -0
- package/pd-cli/dist/commands/context.js.map +1 -0
- package/pd-cli/dist/commands/demo-story-a.d.ts +12 -0
- package/pd-cli/dist/commands/demo-story-a.d.ts.map +1 -0
- package/pd-cli/dist/commands/demo-story-a.js +175 -0
- package/pd-cli/dist/commands/demo-story-a.js.map +1 -0
- package/pd-cli/dist/commands/diagnose.d.ts +35 -0
- package/pd-cli/dist/commands/diagnose.d.ts.map +1 -0
- package/pd-cli/dist/commands/diagnose.js +390 -0
- package/pd-cli/dist/commands/diagnose.js.map +1 -0
- package/pd-cli/dist/commands/evolution-tasks-list.d.ts +15 -0
- package/pd-cli/dist/commands/evolution-tasks-list.d.ts.map +1 -0
- package/pd-cli/dist/commands/evolution-tasks-list.js +34 -0
- package/pd-cli/dist/commands/evolution-tasks-list.js.map +1 -0
- package/pd-cli/dist/commands/evolution-tasks-show.d.ts +14 -0
- package/pd-cli/dist/commands/evolution-tasks-show.d.ts.map +1 -0
- package/pd-cli/dist/commands/evolution-tasks-show.js +52 -0
- package/pd-cli/dist/commands/evolution-tasks-show.js.map +1 -0
- package/pd-cli/dist/commands/flow.d.ts +7 -0
- package/pd-cli/dist/commands/flow.d.ts.map +1 -0
- package/pd-cli/dist/commands/flow.js +57 -0
- package/pd-cli/dist/commands/flow.js.map +1 -0
- package/pd-cli/dist/commands/health.d.ts +16 -0
- package/pd-cli/dist/commands/health.d.ts.map +1 -0
- package/pd-cli/dist/commands/health.js +150 -0
- package/pd-cli/dist/commands/health.js.map +1 -0
- package/pd-cli/dist/commands/history.d.ts +11 -0
- package/pd-cli/dist/commands/history.d.ts.map +1 -0
- package/pd-cli/dist/commands/history.js +50 -0
- package/pd-cli/dist/commands/history.js.map +1 -0
- package/pd-cli/dist/commands/legacy-cleanup.d.ts +27 -0
- package/pd-cli/dist/commands/legacy-cleanup.d.ts.map +1 -0
- package/pd-cli/dist/commands/legacy-cleanup.js +171 -0
- package/pd-cli/dist/commands/legacy-cleanup.js.map +1 -0
- package/pd-cli/dist/commands/legacy-import.d.ts +7 -0
- package/pd-cli/dist/commands/legacy-import.d.ts.map +1 -0
- package/pd-cli/dist/commands/legacy-import.js +86 -0
- package/pd-cli/dist/commands/legacy-import.js.map +1 -0
- package/pd-cli/dist/commands/pain-record.d.ts +10 -0
- package/pd-cli/dist/commands/pain-record.d.ts.map +1 -0
- package/pd-cli/dist/commands/pain-record.js +162 -0
- package/pd-cli/dist/commands/pain-record.js.map +1 -0
- package/pd-cli/dist/commands/proven-channel-baseline.d.ts +12 -0
- package/pd-cli/dist/commands/proven-channel-baseline.d.ts.map +1 -0
- package/pd-cli/dist/commands/proven-channel-baseline.js +97 -0
- package/pd-cli/dist/commands/proven-channel-baseline.js.map +1 -0
- package/pd-cli/dist/commands/remediation-output.d.ts +40 -0
- package/pd-cli/dist/commands/remediation-output.d.ts.map +1 -0
- package/pd-cli/dist/commands/remediation-output.js +23 -0
- package/pd-cli/dist/commands/remediation-output.js.map +1 -0
- package/pd-cli/dist/commands/run.d.ts +10 -0
- package/pd-cli/dist/commands/run.d.ts.map +1 -0
- package/pd-cli/dist/commands/run.js +68 -0
- package/pd-cli/dist/commands/run.js.map +1 -0
- package/pd-cli/dist/commands/runtime-activation.d.ts +11 -0
- package/pd-cli/dist/commands/runtime-activation.d.ts.map +1 -0
- package/pd-cli/dist/commands/runtime-activation.js +150 -0
- package/pd-cli/dist/commands/runtime-activation.js.map +1 -0
- package/pd-cli/dist/commands/runtime-canary.d.ts +30 -0
- package/pd-cli/dist/commands/runtime-canary.d.ts.map +1 -0
- package/pd-cli/dist/commands/runtime-canary.js +343 -0
- package/pd-cli/dist/commands/runtime-canary.js.map +1 -0
- package/pd-cli/dist/commands/runtime-diagnostics-export.d.ts +20 -0
- package/pd-cli/dist/commands/runtime-diagnostics-export.d.ts.map +1 -0
- package/pd-cli/dist/commands/runtime-diagnostics-export.js +177 -0
- package/pd-cli/dist/commands/runtime-diagnostics-export.js.map +1 -0
- package/pd-cli/dist/commands/runtime-features.d.ts +26 -0
- package/pd-cli/dist/commands/runtime-features.d.ts.map +1 -0
- package/pd-cli/dist/commands/runtime-features.js +70 -0
- package/pd-cli/dist/commands/runtime-features.js.map +1 -0
- package/pd-cli/dist/commands/runtime-gfi-snapshot.d.ts +7 -0
- package/pd-cli/dist/commands/runtime-gfi-snapshot.d.ts.map +1 -0
- package/pd-cli/dist/commands/runtime-gfi-snapshot.js +101 -0
- package/pd-cli/dist/commands/runtime-gfi-snapshot.js.map +1 -0
- package/pd-cli/dist/commands/runtime-health-snapshot.d.ts +7 -0
- package/pd-cli/dist/commands/runtime-health-snapshot.d.ts.map +1 -0
- package/pd-cli/dist/commands/runtime-health-snapshot.js +93 -0
- package/pd-cli/dist/commands/runtime-health-snapshot.js.map +1 -0
- package/pd-cli/dist/commands/runtime-internalization-enqueue-successors.d.ts +9 -0
- package/pd-cli/dist/commands/runtime-internalization-enqueue-successors.d.ts.map +1 -0
- package/pd-cli/dist/commands/runtime-internalization-enqueue-successors.js +393 -0
- package/pd-cli/dist/commands/runtime-internalization-enqueue-successors.js.map +1 -0
- package/pd-cli/dist/commands/runtime-internalization-integrity-repair.d.ts +9 -0
- package/pd-cli/dist/commands/runtime-internalization-integrity-repair.d.ts.map +1 -0
- package/pd-cli/dist/commands/runtime-internalization-integrity-repair.js +54 -0
- package/pd-cli/dist/commands/runtime-internalization-integrity-repair.js.map +1 -0
- package/pd-cli/dist/commands/runtime-internalization-integrity.d.ts +7 -0
- package/pd-cli/dist/commands/runtime-internalization-integrity.d.ts.map +1 -0
- package/pd-cli/dist/commands/runtime-internalization-integrity.js +53 -0
- package/pd-cli/dist/commands/runtime-internalization-integrity.js.map +1 -0
- package/pd-cli/dist/commands/runtime-internalization-queue.d.ts +7 -0
- package/pd-cli/dist/commands/runtime-internalization-queue.d.ts.map +1 -0
- package/pd-cli/dist/commands/runtime-internalization-queue.js +85 -0
- package/pd-cli/dist/commands/runtime-internalization-queue.js.map +1 -0
- package/pd-cli/dist/commands/runtime-internalization-run-once.d.ts +12 -0
- package/pd-cli/dist/commands/runtime-internalization-run-once.d.ts.map +1 -0
- package/pd-cli/dist/commands/runtime-internalization-run-once.js +546 -0
- package/pd-cli/dist/commands/runtime-internalization-run-once.js.map +1 -0
- package/pd-cli/dist/commands/runtime-internalization-wake-once.d.ts +8 -0
- package/pd-cli/dist/commands/runtime-internalization-wake-once.d.ts.map +1 -0
- package/pd-cli/dist/commands/runtime-internalization-wake-once.js +72 -0
- package/pd-cli/dist/commands/runtime-internalization-wake-once.js.map +1 -0
- package/pd-cli/dist/commands/runtime-pain-flood-simulation.d.ts +10 -0
- package/pd-cli/dist/commands/runtime-pain-flood-simulation.d.ts.map +1 -0
- package/pd-cli/dist/commands/runtime-pain-flood-simulation.js +104 -0
- package/pd-cli/dist/commands/runtime-pain-flood-simulation.js.map +1 -0
- package/pd-cli/dist/commands/runtime-pruning.d.ts +45 -0
- package/pd-cli/dist/commands/runtime-pruning.d.ts.map +1 -0
- package/pd-cli/dist/commands/runtime-pruning.js +355 -0
- package/pd-cli/dist/commands/runtime-pruning.js.map +1 -0
- package/pd-cli/dist/commands/runtime-recovery.d.ts +9 -0
- package/pd-cli/dist/commands/runtime-recovery.d.ts.map +1 -0
- package/pd-cli/dist/commands/runtime-recovery.js +94 -0
- package/pd-cli/dist/commands/runtime-recovery.js.map +1 -0
- package/pd-cli/dist/commands/runtime-synthetic-baseline.d.ts +7 -0
- package/pd-cli/dist/commands/runtime-synthetic-baseline.d.ts.map +1 -0
- package/pd-cli/dist/commands/runtime-synthetic-baseline.js +59 -0
- package/pd-cli/dist/commands/runtime-synthetic-baseline.js.map +1 -0
- package/pd-cli/dist/commands/runtime-uat.d.ts +52 -0
- package/pd-cli/dist/commands/runtime-uat.d.ts.map +1 -0
- package/pd-cli/dist/commands/runtime-uat.js +274 -0
- package/pd-cli/dist/commands/runtime-uat.js.map +1 -0
- package/pd-cli/dist/commands/runtime.d.ts +20 -0
- package/pd-cli/dist/commands/runtime.d.ts.map +1 -0
- package/pd-cli/dist/commands/runtime.js +256 -0
- package/pd-cli/dist/commands/runtime.js.map +1 -0
- package/pd-cli/dist/commands/samples-list.d.ts +11 -0
- package/pd-cli/dist/commands/samples-list.d.ts.map +1 -0
- package/pd-cli/dist/commands/samples-list.js +37 -0
- package/pd-cli/dist/commands/samples-list.js.map +1 -0
- package/pd-cli/dist/commands/samples-review.d.ts +14 -0
- package/pd-cli/dist/commands/samples-review.d.ts.map +1 -0
- package/pd-cli/dist/commands/samples-review.js +22 -0
- package/pd-cli/dist/commands/samples-review.js.map +1 -0
- package/pd-cli/dist/commands/task.d.ts +14 -0
- package/pd-cli/dist/commands/task.d.ts.map +1 -0
- package/pd-cli/dist/commands/task.js +92 -0
- package/pd-cli/dist/commands/task.js.map +1 -0
- package/pd-cli/dist/commands/trace.d.ts +19 -0
- package/pd-cli/dist/commands/trace.d.ts.map +1 -0
- package/pd-cli/dist/commands/trace.js +154 -0
- package/pd-cli/dist/commands/trace.js.map +1 -0
- package/pd-cli/dist/commands/trajectory.d.ts +11 -0
- package/pd-cli/dist/commands/trajectory.d.ts.map +1 -0
- package/pd-cli/dist/commands/trajectory.js +47 -0
- package/pd-cli/dist/commands/trajectory.js.map +1 -0
- package/pd-cli/dist/index.d.ts +9 -0
- package/pd-cli/dist/index.d.ts.map +1 -0
- package/pd-cli/dist/index.js +739 -0
- package/pd-cli/dist/index.js.map +1 -0
- package/pd-cli/dist/legacy/legacy-import.d.ts +15 -0
- package/pd-cli/dist/legacy/legacy-import.d.ts.map +1 -0
- package/pd-cli/dist/legacy/legacy-import.js +141 -0
- package/pd-cli/dist/legacy/legacy-import.js.map +1 -0
- package/pd-cli/dist/legacy/session-history-import.d.ts +26 -0
- package/pd-cli/dist/legacy/session-history-import.d.ts.map +1 -0
- package/pd-cli/dist/legacy/session-history-import.js +151 -0
- package/pd-cli/dist/legacy/session-history-import.js.map +1 -0
- package/pd-cli/dist/principle-tree-ledger-adapter.d.ts +12 -0
- package/pd-cli/dist/principle-tree-ledger-adapter.d.ts.map +1 -0
- package/pd-cli/dist/principle-tree-ledger-adapter.js +12 -0
- package/pd-cli/dist/principle-tree-ledger-adapter.js.map +1 -0
- package/pd-cli/dist/resolve-workspace.d.ts +12 -0
- package/pd-cli/dist/resolve-workspace.d.ts.map +1 -0
- package/pd-cli/dist/resolve-workspace.js +20 -0
- package/pd-cli/dist/resolve-workspace.js.map +1 -0
- package/pd-cli/dist/services/demo-story-a-runner.d.ts +8 -0
- package/pd-cli/dist/services/demo-story-a-runner.d.ts.map +1 -0
- package/pd-cli/dist/services/demo-story-a-runner.js +369 -0
- package/pd-cli/dist/services/demo-story-a-runner.js.map +1 -0
- package/pd-cli/dist/services/feature-flag-loader.d.ts +6 -0
- package/pd-cli/dist/services/feature-flag-loader.d.ts.map +1 -0
- package/pd-cli/dist/services/feature-flag-loader.js +54 -0
- package/pd-cli/dist/services/feature-flag-loader.js.map +1 -0
- package/pd-cli/dist/services/pain-flood-simulation-runner.d.ts +10 -0
- package/pd-cli/dist/services/pain-flood-simulation-runner.d.ts.map +1 -0
- package/pd-cli/dist/services/pain-flood-simulation-runner.js +289 -0
- package/pd-cli/dist/services/pain-flood-simulation-runner.js.map +1 -0
- package/pd-cli/dist/services/proven-channel-baseline-runner.d.ts +12 -0
- package/pd-cli/dist/services/proven-channel-baseline-runner.d.ts.map +1 -0
- package/pd-cli/dist/services/proven-channel-baseline-runner.js +114 -0
- package/pd-cli/dist/services/proven-channel-baseline-runner.js.map +1 -0
- package/pd-cli/dist/services/synthetic-baseline-runner.d.ts +8 -0
- package/pd-cli/dist/services/synthetic-baseline-runner.d.ts.map +1 -0
- package/pd-cli/dist/services/synthetic-baseline-runner.js +251 -0
- package/pd-cli/dist/services/synthetic-baseline-runner.js.map +1 -0
- package/pd-cli/package.json +35 -0
- package/plugin/dist/commands/archive-impl.d.ts +18 -0
- package/plugin/dist/commands/archive-impl.js +105 -0
- package/plugin/dist/commands/capabilities.d.ts +3 -0
- package/plugin/dist/commands/capabilities.js +76 -0
- package/plugin/dist/commands/context.d.ts +5 -0
- package/plugin/dist/commands/context.js +293 -0
- package/plugin/dist/commands/disable-impl.d.ts +22 -0
- package/plugin/dist/commands/disable-impl.js +118 -0
- package/plugin/dist/commands/evolution-status.d.ts +4 -0
- package/plugin/dist/commands/evolution-status.js +187 -0
- package/plugin/dist/commands/export.d.ts +2 -0
- package/plugin/dist/commands/export.js +53 -0
- package/plugin/dist/commands/focus.d.ts +14 -0
- package/plugin/dist/commands/focus.js +443 -0
- package/plugin/dist/commands/pain.d.ts +6 -0
- package/plugin/dist/commands/pain.js +309 -0
- package/plugin/dist/commands/principle-rollback.d.ts +4 -0
- package/plugin/dist/commands/principle-rollback.js +26 -0
- package/plugin/dist/commands/promote-impl.d.ts +22 -0
- package/plugin/dist/commands/promote-impl.js +194 -0
- package/plugin/dist/commands/rollback-impl.d.ts +32 -0
- package/plugin/dist/commands/rollback-impl.js +180 -0
- package/plugin/dist/commands/rollback.d.ts +19 -0
- package/plugin/dist/commands/rollback.js +126 -0
- package/plugin/dist/commands/samples.d.ts +2 -0
- package/plugin/dist/commands/samples.js +58 -0
- package/plugin/dist/commands/strategy.d.ts +3 -0
- package/plugin/dist/commands/strategy.js +30 -0
- package/plugin/dist/commands/thinking-os.d.ts +2 -0
- package/plugin/dist/commands/thinking-os.js +164 -0
- package/plugin/dist/commands/workflow-debug.d.ts +6 -0
- package/plugin/dist/commands/workflow-debug.js +111 -0
- package/plugin/dist/config/defaults/runtime.d.ts +64 -0
- package/plugin/dist/config/defaults/runtime.js +81 -0
- package/plugin/dist/config/errors.d.ts +86 -0
- package/plugin/dist/config/errors.js +107 -0
- package/plugin/dist/config/index.d.ts +7 -0
- package/plugin/dist/config/index.js +7 -0
- package/plugin/dist/constants/diagnostician.d.ts +12 -0
- package/plugin/dist/constants/diagnostician.js +65 -0
- package/plugin/dist/constants/tools.d.ts +17 -0
- package/plugin/dist/constants/tools.js +53 -0
- package/plugin/dist/core/__tests__/focus-history.test.d.ts +1 -0
- package/plugin/dist/core/__tests__/focus-history.test.js +160 -0
- package/plugin/dist/core/bootstrap-rules.d.ts +50 -0
- package/plugin/dist/core/bootstrap-rules.js +187 -0
- package/plugin/dist/core/code-implementation-storage.d.ts +80 -0
- package/plugin/dist/core/code-implementation-storage.js +173 -0
- package/plugin/dist/core/config-service.d.ts +15 -0
- package/plugin/dist/core/config-service.js +26 -0
- package/plugin/dist/core/config.d.ts +111 -0
- package/plugin/dist/core/config.js +191 -0
- package/plugin/dist/core/confirm-first-gate.d.ts +59 -0
- package/plugin/dist/core/confirm-first-gate.js +215 -0
- package/plugin/dist/core/control-ui-db.d.ts +106 -0
- package/plugin/dist/core/control-ui-db.js +309 -0
- package/plugin/dist/core/correction-cue-learner.d.ts +33 -0
- package/plugin/dist/core/correction-cue-learner.js +184 -0
- package/plugin/dist/core/correction-types.d.ts +3 -0
- package/plugin/dist/core/correction-types.js +1 -0
- package/plugin/dist/core/detection-funnel.d.ts +33 -0
- package/plugin/dist/core/detection-funnel.js +104 -0
- package/plugin/dist/core/detection-service.d.ts +15 -0
- package/plugin/dist/core/detection-service.js +28 -0
- package/plugin/dist/core/dictionary-service.d.ts +15 -0
- package/plugin/dist/core/dictionary-service.js +26 -0
- package/plugin/dist/core/dictionary.d.ts +38 -0
- package/plugin/dist/core/dictionary.js +148 -0
- package/plugin/dist/core/empathy-keyword-matcher.d.ts +5 -0
- package/plugin/dist/core/empathy-keyword-matcher.js +40 -0
- package/plugin/dist/core/empathy-types.d.ts +2 -0
- package/plugin/dist/core/empathy-types.js +1 -0
- package/plugin/dist/core/event-log.d.ts +73 -0
- package/plugin/dist/core/event-log.js +613 -0
- package/plugin/dist/core/evolution-engine.d.ts +119 -0
- package/plugin/dist/core/evolution-engine.js +460 -0
- package/plugin/dist/core/evolution-hook.d.ts +54 -0
- package/plugin/dist/core/evolution-hook.js +9 -0
- package/plugin/dist/core/evolution-logger.d.ts +137 -0
- package/plugin/dist/core/evolution-logger.js +261 -0
- package/plugin/dist/core/evolution-migration.d.ts +5 -0
- package/plugin/dist/core/evolution-migration.js +65 -0
- package/plugin/dist/core/evolution-reducer.d.ts +124 -0
- package/plugin/dist/core/evolution-reducer.js +730 -0
- package/plugin/dist/core/evolution-types.d.ts +50 -0
- package/plugin/dist/core/evolution-types.js +11 -0
- package/plugin/dist/core/external-training-contract.d.ts +276 -0
- package/plugin/dist/core/external-training-contract.js +269 -0
- package/plugin/dist/core/file-storage-adapter.d.ts +43 -0
- package/plugin/dist/core/file-storage-adapter.js +158 -0
- package/plugin/dist/core/file-store.d.ts +41 -0
- package/plugin/dist/core/file-store.js +46 -0
- package/plugin/dist/core/focus-history.d.ts +50 -0
- package/plugin/dist/core/focus-history.js +574 -0
- package/plugin/dist/core/hygiene/tracker.d.ts +22 -0
- package/plugin/dist/core/hygiene/tracker.js +110 -0
- package/plugin/dist/core/init.d.ts +30 -0
- package/plugin/dist/core/init.js +259 -0
- package/plugin/dist/core/local-worker-routing.d.ts +124 -0
- package/plugin/dist/core/local-worker-routing.js +216 -0
- package/plugin/dist/core/merge-gate-audit.d.ts +21 -0
- package/plugin/dist/core/merge-gate-audit.js +241 -0
- package/plugin/dist/core/migration.d.ts +6 -0
- package/plugin/dist/core/migration.js +87 -0
- package/plugin/dist/core/model-deployment-registry.d.ts +218 -0
- package/plugin/dist/core/model-deployment-registry.js +502 -0
- package/plugin/dist/core/model-training-registry.d.ts +295 -0
- package/plugin/dist/core/model-training-registry.js +474 -0
- package/plugin/dist/core/observability.d.ts +40 -0
- package/plugin/dist/core/observability.js +164 -0
- package/plugin/dist/core/pain-context-extractor.d.ts +31 -0
- package/plugin/dist/core/pain-context-extractor.js +278 -0
- package/plugin/dist/core/pain-diagnostic-gate.d.ts +30 -0
- package/plugin/dist/core/pain-diagnostic-gate.js +96 -0
- package/plugin/dist/core/pain-lifecycle.d.ts +15 -0
- package/plugin/dist/core/pain-lifecycle.js +37 -0
- package/plugin/dist/core/pain-signal-adapter.d.ts +37 -0
- package/plugin/dist/core/pain-signal-adapter.js +1 -0
- package/plugin/dist/core/pain-signal.d.ts +6 -0
- package/plugin/dist/core/pain-signal.js +3 -0
- package/plugin/dist/core/pain.d.ts +87 -0
- package/plugin/dist/core/pain.js +223 -0
- package/plugin/dist/core/path-resolver.d.ts +60 -0
- package/plugin/dist/core/path-resolver.js +359 -0
- package/plugin/dist/core/paths.d.ts +67 -0
- package/plugin/dist/core/paths.js +83 -0
- package/plugin/dist/core/pd-task-reconciler.d.ts +89 -0
- package/plugin/dist/core/pd-task-reconciler.js +262 -0
- package/plugin/dist/core/pd-task-service.d.ts +2 -0
- package/plugin/dist/core/pd-task-service.js +32 -0
- package/plugin/dist/core/pd-task-store.d.ts +5 -0
- package/plugin/dist/core/pd-task-store.js +62 -0
- package/plugin/dist/core/pd-task-types.d.ts +8 -0
- package/plugin/dist/core/pd-task-types.js +2 -0
- package/plugin/dist/core/principle-compiler/__tests__/compiler-replay-gate.test.d.ts +1 -0
- package/plugin/dist/core/principle-compiler/__tests__/compiler-replay-gate.test.js +132 -0
- package/plugin/dist/core/principle-compiler/code-validator.d.ts +14 -0
- package/plugin/dist/core/principle-compiler/code-validator.js +83 -0
- package/plugin/dist/core/principle-compiler/compiler.d.ts +45 -0
- package/plugin/dist/core/principle-compiler/compiler.js +287 -0
- package/plugin/dist/core/principle-compiler/index.d.ts +12 -0
- package/plugin/dist/core/principle-compiler/index.js +10 -0
- package/plugin/dist/core/principle-compiler/ledger-registrar.d.ts +28 -0
- package/plugin/dist/core/principle-compiler/ledger-registrar.js +95 -0
- package/plugin/dist/core/principle-compiler/template-generator.d.ts +7 -0
- package/plugin/dist/core/principle-compiler/template-generator.js +7 -0
- package/plugin/dist/core/principle-injection.d.ts +10 -0
- package/plugin/dist/core/principle-injection.js +10 -0
- package/plugin/dist/core/principle-injector.d.ts +55 -0
- package/plugin/dist/core/principle-injector.js +17 -0
- package/plugin/dist/core/principle-internalization/filesystem-lifecycle-datasource.d.ts +15 -0
- package/plugin/dist/core/principle-internalization/filesystem-lifecycle-datasource.js +34 -0
- package/plugin/dist/core/principle-internalization/lifecycle-read-model.d.ts +17 -0
- package/plugin/dist/core/principle-internalization/lifecycle-read-model.js +21 -0
- package/plugin/dist/core/principle-internalization/lifecycle-refresh.d.ts +2 -0
- package/plugin/dist/core/principle-internalization/lifecycle-refresh.js +4 -0
- package/plugin/dist/core/principle-internalization/principle-lifecycle-service.d.ts +28 -0
- package/plugin/dist/core/principle-internalization/principle-lifecycle-service.js +89 -0
- package/plugin/dist/core/principle-training-state.d.ts +47 -0
- package/plugin/dist/core/principle-training-state.js +113 -0
- package/plugin/dist/core/principle-tree-ledger-adapter.d.ts +32 -0
- package/plugin/dist/core/principle-tree-ledger-adapter.js +125 -0
- package/plugin/dist/core/principle-tree-ledger.d.ts +86 -0
- package/plugin/dist/core/principle-tree-ledger.js +534 -0
- package/plugin/dist/core/principle-tree-migration.d.ts +35 -0
- package/plugin/dist/core/principle-tree-migration.js +137 -0
- package/plugin/dist/core/profile.d.ts +62 -0
- package/plugin/dist/core/profile.js +211 -0
- package/plugin/dist/core/promotion-gate.d.ts +243 -0
- package/plugin/dist/core/promotion-gate.js +554 -0
- package/plugin/dist/core/reflection/reflection-context.d.ts +31 -0
- package/plugin/dist/core/reflection/reflection-context.js +91 -0
- package/plugin/dist/core/replay-engine.d.ts +12 -0
- package/plugin/dist/core/replay-engine.js +82 -0
- package/plugin/dist/core/risk-calculator.d.ts +22 -0
- package/plugin/dist/core/risk-calculator.js +88 -0
- package/plugin/dist/core/rule-host-helpers.d.ts +8 -0
- package/plugin/dist/core/rule-host-helpers.js +7 -0
- package/plugin/dist/core/rule-host-types.d.ts +7 -0
- package/plugin/dist/core/rule-host-types.js +7 -0
- package/plugin/dist/core/rule-host.d.ts +56 -0
- package/plugin/dist/core/rule-host.js +152 -0
- package/plugin/dist/core/rule-implementation-runtime.d.ts +5 -0
- package/plugin/dist/core/rule-implementation-runtime.js +24 -0
- package/plugin/dist/core/runtime-v2-prompt-activation-reader.d.ts +27 -0
- package/plugin/dist/core/runtime-v2-prompt-activation-reader.js +181 -0
- package/plugin/dist/core/schema/db-types.d.ts +11 -0
- package/plugin/dist/core/schema/db-types.js +5 -0
- package/plugin/dist/core/schema/index.d.ts +17 -0
- package/plugin/dist/core/schema/index.js +15 -0
- package/plugin/dist/core/schema/migration-runner.d.ts +53 -0
- package/plugin/dist/core/schema/migration-runner.js +170 -0
- package/plugin/dist/core/schema/migrations/001-init-trajectory.d.ts +6 -0
- package/plugin/dist/core/schema/migrations/001-init-trajectory.js +193 -0
- package/plugin/dist/core/schema/migrations/002-init-central.d.ts +5 -0
- package/plugin/dist/core/schema/migrations/002-init-central.js +108 -0
- package/plugin/dist/core/schema/migrations/003-init-workflow.d.ts +5 -0
- package/plugin/dist/core/schema/migrations/003-init-workflow.js +50 -0
- package/plugin/dist/core/schema/migrations/004-add-thinking-and-gfi.d.ts +8 -0
- package/plugin/dist/core/schema/migrations/004-add-thinking-and-gfi.js +66 -0
- package/plugin/dist/core/schema/migrations/index.d.ts +16 -0
- package/plugin/dist/core/schema/migrations/index.js +27 -0
- package/plugin/dist/core/schema/schema-definitions.d.ts +46 -0
- package/plugin/dist/core/schema/schema-definitions.js +601 -0
- package/plugin/dist/core/session-tracker.d.ts +119 -0
- package/plugin/dist/core/session-tracker.js +462 -0
- package/plugin/dist/core/shadow-observation-registry.d.ts +217 -0
- package/plugin/dist/core/shadow-observation-registry.js +280 -0
- package/plugin/dist/core/storage-adapter.d.ts +58 -0
- package/plugin/dist/core/storage-adapter.js +1 -0
- package/plugin/dist/core/system-logger.d.ts +8 -0
- package/plugin/dist/core/system-logger.js +113 -0
- package/plugin/dist/core/telemetry-event.d.ts +66 -0
- package/plugin/dist/core/telemetry-event.js +86 -0
- package/plugin/dist/core/thinking-models.d.ts +69 -0
- package/plugin/dist/core/thinking-models.js +320 -0
- package/plugin/dist/core/thinking-os-parser.d.ts +35 -0
- package/plugin/dist/core/thinking-os-parser.js +123 -0
- package/plugin/dist/core/training-program.d.ts +233 -0
- package/plugin/dist/core/training-program.js +435 -0
- package/plugin/dist/core/trajectory-types.d.ts +216 -0
- package/plugin/dist/core/trajectory-types.js +8 -0
- package/plugin/dist/core/trajectory.d.ts +242 -0
- package/plugin/dist/core/trajectory.js +1450 -0
- package/plugin/dist/core/workflow-funnel-loader.d.ts +72 -0
- package/plugin/dist/core/workflow-funnel-loader.js +135 -0
- package/plugin/dist/core/workspace-context.d.ts +111 -0
- package/plugin/dist/core/workspace-context.js +247 -0
- package/plugin/dist/core/workspace-dir-service.d.ts +33 -0
- package/plugin/dist/core/workspace-dir-service.js +71 -0
- package/plugin/dist/core/workspace-dir-validation.d.ts +11 -0
- package/plugin/dist/core/workspace-dir-validation.js +37 -0
- package/plugin/dist/hooks/gate-block-helper.d.ts +44 -0
- package/plugin/dist/hooks/gate-block-helper.js +168 -0
- package/plugin/dist/hooks/gate.d.ts +16 -0
- package/plugin/dist/hooks/gate.js +424 -0
- package/plugin/dist/hooks/lifecycle-routing.d.ts +24 -0
- package/plugin/dist/hooks/lifecycle-routing.js +110 -0
- package/plugin/dist/hooks/lifecycle.d.ts +5 -0
- package/plugin/dist/hooks/lifecycle.js +287 -0
- package/plugin/dist/hooks/llm.d.ts +13 -0
- package/plugin/dist/hooks/llm.js +353 -0
- package/plugin/dist/hooks/message-sanitize.d.ts +3 -0
- package/plugin/dist/hooks/message-sanitize.js +47 -0
- package/plugin/dist/hooks/pain.d.ts +11 -0
- package/plugin/dist/hooks/pain.js +553 -0
- package/plugin/dist/hooks/prompt.d.ts +46 -0
- package/plugin/dist/hooks/prompt.js +1108 -0
- package/plugin/dist/hooks/subagent.d.ts +9 -0
- package/plugin/dist/hooks/subagent.js +122 -0
- package/plugin/dist/hooks/trajectory-collector.d.ts +36 -0
- package/plugin/dist/hooks/trajectory-collector.js +258 -0
- package/plugin/dist/i18n/commands.d.ts +26 -0
- package/plugin/dist/i18n/commands.js +108 -0
- package/plugin/dist/index.d.ts +8 -0
- package/plugin/dist/index.js +692 -0
- package/plugin/dist/openclaw-sdk.d.ts +292 -0
- package/plugin/dist/openclaw-sdk.js +4 -0
- package/plugin/dist/service/central-database.d.ts +138 -0
- package/plugin/dist/service/central-database.js +731 -0
- package/plugin/dist/service/central-sync-service.d.ts +8 -0
- package/plugin/dist/service/central-sync-service.js +71 -0
- package/plugin/dist/service/event-log-auditor.d.ts +46 -0
- package/plugin/dist/service/event-log-auditor.js +236 -0
- package/plugin/dist/service/evolution-dedup.d.ts +27 -0
- package/plugin/dist/service/evolution-dedup.js +54 -0
- package/plugin/dist/service/evolution-queue-lock.d.ts +18 -0
- package/plugin/dist/service/evolution-queue-lock.js +36 -0
- package/plugin/dist/service/evolution-queue-migration.d.ts +128 -0
- package/plugin/dist/service/evolution-queue-migration.js +53 -0
- package/plugin/dist/service/evolution-worker.d.ts +103 -0
- package/plugin/dist/service/evolution-worker.js +760 -0
- package/plugin/dist/service/failure-classifier.d.ts +46 -0
- package/plugin/dist/service/failure-classifier.js +57 -0
- package/plugin/dist/service/internalization-trigger-adapter.d.ts +51 -0
- package/plugin/dist/service/internalization-trigger-adapter.js +184 -0
- package/plugin/dist/service/keyword-optimization-service.d.ts +44 -0
- package/plugin/dist/service/keyword-optimization-service.js +137 -0
- package/plugin/dist/service/monitoring-query-service.d.ts +21 -0
- package/plugin/dist/service/monitoring-query-service.js +45 -0
- package/plugin/dist/service/phase3-input-filter.d.ts +73 -0
- package/plugin/dist/service/phase3-input-filter.js +172 -0
- package/plugin/dist/service/queue-io.d.ts +30 -0
- package/plugin/dist/service/queue-io.js +79 -0
- package/plugin/dist/service/queue-migration.d.ts +83 -0
- package/plugin/dist/service/queue-migration.js +56 -0
- package/plugin/dist/service/runtime-summary-service.d.ts +158 -0
- package/plugin/dist/service/runtime-summary-service.js +636 -0
- package/plugin/dist/service/subagent-workflow/index.d.ts +3 -0
- package/plugin/dist/service/subagent-workflow/index.js +2 -0
- package/plugin/dist/service/subagent-workflow/subagent-error-utils.d.ts +8 -0
- package/plugin/dist/service/subagent-workflow/subagent-error-utils.js +23 -0
- package/plugin/dist/service/subagent-workflow/types.d.ts +264 -0
- package/plugin/dist/service/subagent-workflow/types.js +11 -0
- package/plugin/dist/service/subagent-workflow/workflow-store.d.ts +30 -0
- package/plugin/dist/service/subagent-workflow/workflow-store.js +209 -0
- package/plugin/dist/service/trajectory-service.d.ts +2 -0
- package/plugin/dist/service/trajectory-service.js +16 -0
- package/plugin/dist/service/workflow-watchdog.d.ts +23 -0
- package/plugin/dist/service/workflow-watchdog.js +103 -0
- package/plugin/dist/tools/critique-prompt.d.ts +1 -0
- package/plugin/dist/tools/critique-prompt.js +1 -0
- package/plugin/dist/tools/deep-reflect.d.ts +1 -0
- package/plugin/dist/tools/deep-reflect.js +1 -0
- package/plugin/dist/tools/model-index.d.ts +1 -0
- package/plugin/dist/tools/model-index.js +1 -0
- package/plugin/dist/types/event-payload.d.ts +2 -0
- package/plugin/dist/types/event-payload.js +1 -0
- package/plugin/dist/types/event-types.d.ts +2 -0
- package/plugin/dist/types/event-types.js +1 -0
- package/plugin/dist/types/hygiene-types.d.ts +2 -0
- package/plugin/dist/types/hygiene-types.js +1 -0
- package/plugin/dist/types/principle-tree-schema.d.ts +29 -0
- package/plugin/dist/types/principle-tree-schema.js +24 -0
- package/plugin/dist/types/queue.d.ts +2 -0
- package/plugin/dist/types/queue.js +1 -0
- package/plugin/dist/types/runtime-summary.d.ts +1 -0
- package/plugin/dist/types/runtime-summary.js +1 -0
- package/plugin/dist/types.d.ts +33 -0
- package/plugin/dist/types.js +16 -0
- package/plugin/dist/utils/file-lock.d.ts +68 -0
- package/plugin/dist/utils/file-lock.js +310 -0
- package/plugin/dist/utils/glob-match.d.ts +28 -0
- package/plugin/dist/utils/glob-match.js +49 -0
- package/plugin/dist/utils/hashing.d.ts +9 -0
- package/plugin/dist/utils/hashing.js +25 -0
- package/plugin/dist/utils/io.d.ts +12 -0
- package/plugin/dist/utils/io.js +176 -0
- package/plugin/dist/utils/nlp.d.ts +4 -0
- package/plugin/dist/utils/nlp.js +21 -0
- package/plugin/dist/utils/node-vm-polyfill.d.ts +9 -0
- package/plugin/dist/utils/node-vm-polyfill.js +9 -0
- package/plugin/dist/utils/plugin-logger.d.ts +39 -0
- package/plugin/dist/utils/plugin-logger.js +70 -0
- package/plugin/dist/utils/retry.d.ts +210 -0
- package/plugin/dist/utils/retry.js +375 -0
- package/plugin/dist/utils/session-key.d.ts +10 -0
- package/plugin/dist/utils/session-key.js +18 -0
- package/plugin/dist/utils/shadow-fingerprint.d.ts +16 -0
- package/plugin/dist/utils/shadow-fingerprint.js +34 -0
- package/plugin/dist/utils/subagent-probe.d.ts +35 -0
- package/plugin/dist/utils/subagent-probe.js +67 -0
- package/plugin/dist/utils/workspace-resolver.d.ts +50 -0
- package/plugin/dist/utils/workspace-resolver.js +109 -0
- package/plugin/docs/COMMAND_REFERENCE.md +76 -0
- package/plugin/docs/COMMAND_REFERENCE_EN.md +79 -0
- package/plugin/openclaw.plugin.json +65 -0
- package/plugin/package.json +79 -0
- package/plugin/scripts/acceptance-test.mjs +257 -0
- package/plugin/scripts/bootstrap-rules.mjs +66 -0
- package/plugin/scripts/compile-principles.mjs +104 -0
- package/plugin/scripts/db-migrate.mjs +170 -0
- package/plugin/scripts/install-dependencies.cjs +47 -0
- package/plugin/scripts/sync-plugin.mjs +1355 -0
- package/plugin/scripts/validate-live-path.ts +480 -0
- package/plugin/scripts/verify-build.mjs +109 -0
- package/plugin/templates/langs/en/core/AGENTS.md +205 -0
- package/plugin/templates/langs/en/core/BOOT.md +60 -0
- package/plugin/templates/langs/en/core/BOOTSTRAP.md +273 -0
- package/plugin/templates/langs/en/core/HEARTBEAT.md +74 -0
- package/plugin/templates/langs/en/core/IDENTITY.md +8 -0
- package/plugin/templates/langs/en/core/PRINCIPLES.md +10 -0
- package/plugin/templates/langs/en/core/SOUL.md +46 -0
- package/plugin/templates/langs/en/core/TOOLS.md +15 -0
- package/plugin/templates/langs/en/core/USER.md +10 -0
- package/plugin/templates/langs/en/pain/00_seed_samples.md +23 -0
- package/plugin/templates/langs/en/pain_dictionary.json +22 -0
- package/plugin/templates/langs/en/principles/THINKING_OS.md +64 -0
- package/plugin/templates/langs/en/skills/admin/SKILL.md +39 -0
- package/plugin/templates/langs/en/skills/ai-sprint-orchestration/EXAMPLES.md +63 -0
- package/plugin/templates/langs/en/skills/ai-sprint-orchestration/REFERENCE.md +136 -0
- package/plugin/templates/langs/en/skills/ai-sprint-orchestration/SKILL.md +67 -0
- package/plugin/templates/langs/en/skills/ai-sprint-orchestration/references/agent-registry.json +143 -0
- package/plugin/templates/langs/en/skills/ai-sprint-orchestration/references/specs/bugfix-complex-template.json +107 -0
- package/plugin/templates/langs/en/skills/ai-sprint-orchestration/references/specs/feature-complex-template.json +107 -0
- package/plugin/templates/langs/en/skills/ai-sprint-orchestration/references/specs/workflow-validation-minimal-verify.json +95 -0
- package/plugin/templates/langs/en/skills/ai-sprint-orchestration/references/specs/workflow-validation-minimal.json +98 -0
- package/plugin/templates/langs/en/skills/ai-sprint-orchestration/references/workflow-v1-acceptance-checklist.md +58 -0
- package/plugin/templates/langs/en/skills/ai-sprint-orchestration/references/workflow-v1.4-work-unit-handoff.md +190 -0
- package/plugin/templates/langs/en/skills/ai-sprint-orchestration/runtime/.gitignore +2 -0
- package/plugin/templates/langs/en/skills/ai-sprint-orchestration/scripts/lib/archive.mjs +310 -0
- package/plugin/templates/langs/en/skills/ai-sprint-orchestration/scripts/lib/contract-enforcement.mjs +683 -0
- package/plugin/templates/langs/en/skills/ai-sprint-orchestration/scripts/lib/decision.mjs +604 -0
- package/plugin/templates/langs/en/skills/ai-sprint-orchestration/scripts/lib/state-store.mjs +32 -0
- package/plugin/templates/langs/en/skills/ai-sprint-orchestration/scripts/lib/task-specs.mjs +707 -0
- package/plugin/templates/langs/en/skills/ai-sprint-orchestration/scripts/run.mjs +3455 -0
- package/plugin/templates/langs/en/skills/bootstrap-tools/SKILL.md +53 -0
- package/plugin/templates/langs/en/skills/deductive-audit/SKILL.md +36 -0
- package/plugin/templates/langs/en/skills/evolution-framework-update/SKILL.md +31 -0
- package/plugin/templates/langs/en/skills/evolve-system/SKILL.md +46 -0
- package/plugin/templates/langs/en/skills/evolve-task/SKILL.md +83 -0
- package/plugin/templates/langs/en/skills/feedback/SKILL.md +51 -0
- package/plugin/templates/langs/en/skills/init-strategy/SKILL.md +54 -0
- package/plugin/templates/langs/en/skills/inject-rule/SKILL.md +19 -0
- package/plugin/templates/langs/en/skills/manage-okr/SKILL.md +96 -0
- package/plugin/templates/langs/en/skills/pd-auditor/SKILL.md +61 -0
- package/plugin/templates/langs/en/skills/pd-cli-operator/SKILL.md +67 -0
- package/plugin/templates/langs/en/skills/pd-daily/SKILL.md +199 -0
- package/plugin/templates/langs/en/skills/pd-diagnostician/SKILL.md +466 -0
- package/plugin/templates/langs/en/skills/pd-explorer/SKILL.md +65 -0
- package/plugin/templates/langs/en/skills/pd-grooming/SKILL.md +46 -0
- package/plugin/templates/langs/en/skills/pd-implementer/SKILL.md +68 -0
- package/plugin/templates/langs/en/skills/pd-mentor/SKILL.md +230 -0
- package/plugin/templates/langs/en/skills/pd-pain-signal/SKILL.md +30 -0
- package/plugin/templates/langs/en/skills/pd-planner/SKILL.md +65 -0
- package/plugin/templates/langs/en/skills/pd-runtime-v2/SKILL.md +61 -0
- package/plugin/templates/langs/en/skills/plan-script/SKILL.md +32 -0
- package/plugin/templates/langs/en/skills/profile/SKILL.md +24 -0
- package/plugin/templates/langs/en/skills/reflection/SKILL.md +40 -0
- package/plugin/templates/langs/en/skills/reflection-log/SKILL.md +37 -0
- package/plugin/templates/langs/en/skills/report/SKILL.md +13 -0
- package/plugin/templates/langs/en/skills/root-cause/SKILL.md +33 -0
- package/plugin/templates/langs/en/skills/triage/SKILL.md +29 -0
- package/plugin/templates/langs/en/skills/watch-evolution/SKILL.md +33 -0
- package/plugin/templates/langs/zh/core/AGENTS.md +197 -0
- package/plugin/templates/langs/zh/core/BOOT.md +60 -0
- package/plugin/templates/langs/zh/core/BOOTSTRAP.md +273 -0
- package/plugin/templates/langs/zh/core/HEARTBEAT.md +98 -0
- package/plugin/templates/langs/zh/core/IDENTITY.md +8 -0
- package/plugin/templates/langs/zh/core/PRINCIPLES.md +7 -0
- package/plugin/templates/langs/zh/core/SOUL.md +46 -0
- package/plugin/templates/langs/zh/core/TOOLS.md +15 -0
- package/plugin/templates/langs/zh/core/USER.md +10 -0
- package/plugin/templates/langs/zh/pain/00_seed_samples.md +24 -0
- package/plugin/templates/langs/zh/pain_dictionary.json +18 -0
- package/plugin/templates/langs/zh/principles/THINKING_OS.md +64 -0
- package/plugin/templates/langs/zh/skills/admin/SKILL.md +41 -0
- package/plugin/templates/langs/zh/skills/ai-sprint-orchestration/EXAMPLES.md +63 -0
- package/plugin/templates/langs/zh/skills/ai-sprint-orchestration/REFERENCE.md +136 -0
- package/plugin/templates/langs/zh/skills/ai-sprint-orchestration/SKILL.md +67 -0
- package/plugin/templates/langs/zh/skills/ai-sprint-orchestration/references/agent-registry.json +143 -0
- package/plugin/templates/langs/zh/skills/ai-sprint-orchestration/references/specs/bugfix-complex-template.json +107 -0
- package/plugin/templates/langs/zh/skills/ai-sprint-orchestration/references/specs/feature-complex-template.json +107 -0
- package/plugin/templates/langs/zh/skills/ai-sprint-orchestration/references/specs/nocturnal-trinity-quality-enhancement.json +111 -0
- package/plugin/templates/langs/zh/skills/ai-sprint-orchestration/references/specs/workflow-validation-minimal-verify.json +95 -0
- package/plugin/templates/langs/zh/skills/ai-sprint-orchestration/references/specs/workflow-validation-minimal.json +98 -0
- package/plugin/templates/langs/zh/skills/ai-sprint-orchestration/references/workflow-v1-acceptance-checklist.md +58 -0
- package/plugin/templates/langs/zh/skills/ai-sprint-orchestration/references/workflow-v1.4-work-unit-handoff.md +190 -0
- package/plugin/templates/langs/zh/skills/ai-sprint-orchestration/runtime/.gitignore +2 -0
- package/plugin/templates/langs/zh/skills/ai-sprint-orchestration/scripts/lib/archive.mjs +310 -0
- package/plugin/templates/langs/zh/skills/ai-sprint-orchestration/scripts/lib/contract-enforcement.mjs +683 -0
- package/plugin/templates/langs/zh/skills/ai-sprint-orchestration/scripts/lib/decision.mjs +604 -0
- package/plugin/templates/langs/zh/skills/ai-sprint-orchestration/scripts/lib/state-store.mjs +32 -0
- package/plugin/templates/langs/zh/skills/ai-sprint-orchestration/scripts/lib/task-specs.mjs +707 -0
- package/plugin/templates/langs/zh/skills/ai-sprint-orchestration/scripts/run.mjs +3455 -0
- package/plugin/templates/langs/zh/skills/ai-sprint-orchestration/test/archive.test.mjs +230 -0
- package/plugin/templates/langs/zh/skills/ai-sprint-orchestration/test/contract-enforcement.test.mjs +672 -0
- package/plugin/templates/langs/zh/skills/ai-sprint-orchestration/test/decision.test.mjs +1321 -0
- package/plugin/templates/langs/zh/skills/ai-sprint-orchestration/test/run.test.mjs +1435 -0
- package/plugin/templates/langs/zh/skills/bootstrap-tools/SKILL.md +52 -0
- package/plugin/templates/langs/zh/skills/deductive-audit/SKILL.md +36 -0
- package/plugin/templates/langs/zh/skills/evolution-framework-update/SKILL.md +31 -0
- package/plugin/templates/langs/zh/skills/evolve-system/SKILL.md +46 -0
- package/plugin/templates/langs/zh/skills/evolve-task/SKILL.md +83 -0
- package/plugin/templates/langs/zh/skills/feedback/SKILL.md +53 -0
- package/plugin/templates/langs/zh/skills/init-strategy/SKILL.md +54 -0
- package/plugin/templates/langs/zh/skills/inject-rule/SKILL.md +19 -0
- package/plugin/templates/langs/zh/skills/manage-okr/SKILL.md +109 -0
- package/plugin/templates/langs/zh/skills/pd-auditor/SKILL.md +61 -0
- package/plugin/templates/langs/zh/skills/pd-cli-operator/SKILL.md +67 -0
- package/plugin/templates/langs/zh/skills/pd-daily/SKILL.md +283 -0
- package/plugin/templates/langs/zh/skills/pd-diagnostician/SKILL.md +391 -0
- package/plugin/templates/langs/zh/skills/pd-explorer/SKILL.md +65 -0
- package/plugin/templates/langs/zh/skills/pd-grooming/SKILL.md +46 -0
- package/plugin/templates/langs/zh/skills/pd-implementer/SKILL.md +68 -0
- package/plugin/templates/langs/zh/skills/pd-mentor/SKILL.md +230 -0
- package/plugin/templates/langs/zh/skills/pd-pain-signal/SKILL.md +30 -0
- package/plugin/templates/langs/zh/skills/pd-planner/SKILL.md +65 -0
- package/plugin/templates/langs/zh/skills/pd-runtime-v2/SKILL.md +61 -0
- package/plugin/templates/langs/zh/skills/plan-script/SKILL.md +32 -0
- package/plugin/templates/langs/zh/skills/profile/SKILL.md +24 -0
- package/plugin/templates/langs/zh/skills/reflection/SKILL.md +40 -0
- package/plugin/templates/langs/zh/skills/reflection-log/SKILL.md +37 -0
- package/plugin/templates/langs/zh/skills/report/SKILL.md +13 -0
- package/plugin/templates/langs/zh/skills/root-cause/SKILL.md +33 -0
- package/plugin/templates/langs/zh/skills/triage/SKILL.md +29 -0
- package/plugin/templates/langs/zh/skills/watch-evolution/SKILL.md +33 -0
- package/plugin/templates/pain_dictionary.json +36 -0
- package/plugin/templates/pain_settings.json +103 -0
- package/plugin/templates/workspace/.principles/DECISION_POLICY.json +44 -0
- package/plugin/templates/workspace/.principles/PRINCIPLES.md +20 -0
- package/plugin/templates/workspace/.principles/PROFILE.json +54 -0
- package/plugin/templates/workspace/.principles/PROFILE.schema.json +56 -0
- package/plugin/templates/workspace/.principles/THINKING_OS.md +64 -0
- package/plugin/templates/workspace/.principles/THINKING_OS_ARCHIVE.md +7 -0
- package/plugin/templates/workspace/.principles/THINKING_OS_CANDIDATES.md +9 -0
- package/plugin/templates/workspace/.principles/models/_INDEX.md +27 -0
- package/plugin/templates/workspace/.principles/models/first_principles.md +62 -0
- package/plugin/templates/workspace/.principles/models/marketing_4p.md +52 -0
- package/plugin/templates/workspace/.principles/models/porter_five.md +63 -0
- package/plugin/templates/workspace/.principles/models/swot.md +60 -0
- package/plugin/templates/workspace/.principles/models/user_story_map.md +63 -0
- package/plugin/templates/workspace/.state/WORKBOARD.json +4 -0
- package/plugin/templates/workspace/AUDIT.md +15 -0
- package/plugin/templates/workspace/PLAN.md +2 -0
- package/plugin/templates/workspace/okr/CURRENT_FOCUS.md +57 -0
- package/plugin/templates/workspace/okr/RECOVERY_PROTOCOL.md +56 -0
- package/plugin/templates/workspace/okr/TASK_CHANGES.jsonl +6 -0
- package/plugin/templates/workspace/okr/WEEK_TASKS.json +6 -0
- package/templates/langs/en/core/AGENTS.md +205 -0
- package/templates/langs/en/core/BOOT.md +60 -0
- package/templates/langs/en/core/BOOTSTRAP.md +273 -0
- package/templates/langs/en/core/HEARTBEAT.md +74 -0
- package/templates/langs/en/core/IDENTITY.md +8 -0
- package/templates/langs/en/core/PRINCIPLES.md +10 -0
- package/templates/langs/en/core/SOUL.md +46 -0
- package/templates/langs/en/core/TOOLS.md +58 -0
- package/templates/langs/en/core/USER.md +10 -0
- package/templates/langs/en/pain/00_seed_samples.md +23 -0
- package/templates/langs/en/pain_dictionary.json +22 -0
- package/templates/langs/en/principles/THINKING_OS.md +64 -0
- package/templates/langs/en/skills/admin/SKILL.md +39 -0
- package/templates/langs/en/skills/bootstrap-tools/SKILL.md +53 -0
- package/templates/langs/en/skills/deductive-audit/SKILL.md +36 -0
- package/templates/langs/en/skills/evolution-framework-update/SKILL.md +31 -0
- package/templates/langs/en/skills/evolve-system/SKILL.md +46 -0
- package/templates/langs/en/skills/evolve-task/SKILL.md +83 -0
- package/templates/langs/en/skills/feedback/SKILL.md +51 -0
- package/templates/langs/en/skills/init-strategy/SKILL.md +54 -0
- package/templates/langs/en/skills/inject-rule/SKILL.md +19 -0
- package/templates/langs/en/skills/manage-okr/SKILL.md +96 -0
- package/templates/langs/en/skills/pain/SKILL.md +19 -0
- package/templates/langs/en/skills/pd-daily/SKILL.md +199 -0
- package/templates/langs/en/skills/pd-grooming/SKILL.md +46 -0
- package/templates/langs/en/skills/pd-mentor/SKILL.md +230 -0
- package/templates/langs/en/skills/plan-script/SKILL.md +32 -0
- package/templates/langs/en/skills/profile/SKILL.md +24 -0
- package/templates/langs/en/skills/reflection/SKILL.md +40 -0
- package/templates/langs/en/skills/reflection-log/SKILL.md +37 -0
- package/templates/langs/en/skills/report/SKILL.md +13 -0
- package/templates/langs/en/skills/root-cause/SKILL.md +33 -0
- package/templates/langs/en/skills/triage/SKILL.md +29 -0
- package/templates/langs/en/skills/watch-evolution/SKILL.md +33 -0
- package/templates/langs/zh/core/AGENTS.md +197 -0
- package/templates/langs/zh/core/BOOT.md +60 -0
- package/templates/langs/zh/core/BOOTSTRAP.md +273 -0
- package/templates/langs/zh/core/HEARTBEAT.md +98 -0
- package/templates/langs/zh/core/IDENTITY.md +8 -0
- package/templates/langs/zh/core/SOUL.md +46 -0
- package/templates/langs/zh/core/TOOLS.md +58 -0
- package/templates/langs/zh/core/USER.md +10 -0
- package/templates/langs/zh/pain/00_seed_samples.md +24 -0
- package/templates/langs/zh/pain_dictionary.json +18 -0
- package/templates/langs/zh/principles/THINKING_OS.md +64 -0
- package/templates/langs/zh/skills/admin/SKILL.md +41 -0
- package/templates/langs/zh/skills/bootstrap-tools/SKILL.md +52 -0
- package/templates/langs/zh/skills/deductive-audit/SKILL.md +36 -0
- package/templates/langs/zh/skills/evolution-framework-update/SKILL.md +31 -0
- package/templates/langs/zh/skills/evolve-system/SKILL.md +46 -0
- package/templates/langs/zh/skills/evolve-task/SKILL.md +83 -0
- package/templates/langs/zh/skills/feedback/SKILL.md +53 -0
- package/templates/langs/zh/skills/init-strategy/SKILL.md +54 -0
- package/templates/langs/zh/skills/inject-rule/SKILL.md +19 -0
- package/templates/langs/zh/skills/manage-okr/SKILL.md +109 -0
- package/templates/langs/zh/skills/pain/SKILL.md +30 -0
- package/templates/langs/zh/skills/pd-auditor/SKILL.md +61 -0
- package/templates/langs/zh/skills/pd-daily/SKILL.md +283 -0
- package/templates/langs/zh/skills/pd-diagnostician/SKILL.md +287 -0
- package/templates/langs/zh/skills/pd-explorer/SKILL.md +65 -0
- package/templates/langs/zh/skills/pd-grooming/SKILL.md +46 -0
- package/templates/langs/zh/skills/pd-implementer/SKILL.md +68 -0
- package/templates/langs/zh/skills/pd-mentor/SKILL.md +230 -0
- package/templates/langs/zh/skills/pd-planner/SKILL.md +65 -0
- package/templates/langs/zh/skills/pd-reporter/SKILL.md +78 -0
- package/templates/langs/zh/skills/pd-reviewer/SKILL.md +66 -0
- package/templates/langs/zh/skills/plan-script/SKILL.md +32 -0
- package/templates/langs/zh/skills/profile/SKILL.md +24 -0
- package/templates/langs/zh/skills/reflection/SKILL.md +40 -0
- package/templates/langs/zh/skills/reflection-log/SKILL.md +37 -0
- package/templates/langs/zh/skills/report/SKILL.md +13 -0
- package/templates/langs/zh/skills/root-cause/SKILL.md +33 -0
- package/templates/langs/zh/skills/triage/SKILL.md +29 -0
- package/templates/langs/zh/skills/watch-evolution/SKILL.md +33 -0
- package/templates/pain_dictionary.json +36 -0
- package/templates/pain_settings.json +129 -0
- package/templates/workspace/.principles/THINKING_OS.md +64 -0
- package/templates/workspace/AUDIT.md +15 -0
- package/templates/workspace/PLAN.md +2 -0
- package/templates/workspace/okr/CURRENT_FOCUS.md +57 -0
- package/templates/workspace/okr/RECOVERY_PROTOCOL.md +56 -0
- package/templates/workspace/okr/TASK_CHANGES.jsonl +6 -0
- package/templates/workspace/okr/WEEK_TASKS.json +6 -0
|
@@ -0,0 +1,1450 @@
|
|
|
1
|
+
import Database from 'better-sqlite3';
|
|
2
|
+
import fs from 'fs';
|
|
3
|
+
import path from 'path';
|
|
4
|
+
import crypto from 'crypto';
|
|
5
|
+
import { withLock } from '../utils/file-lock.js';
|
|
6
|
+
import { atomicWriteFileSync } from '../utils/io.js';
|
|
7
|
+
import { resolvePdPath } from './paths.js';
|
|
8
|
+
import { SampleNotFoundError } from '../config/index.js';
|
|
9
|
+
/**
|
|
10
|
+
* Trajectory database stores HISTORICAL and ANALYTICS data.
|
|
11
|
+
*
|
|
12
|
+
* PURPOSE: Track task outcomes, trust changes, and evolution progress over time.
|
|
13
|
+
* USAGE: Insights, trends, and Phase 3 supporting evidence (where explicitly allowed).
|
|
14
|
+
* NOT FOR: Control decisions, Phase 3 eligibility, or real-time operations.
|
|
15
|
+
*
|
|
16
|
+
* Runtime truth comes from: queue state, workspace trust scorecard, active sessions
|
|
17
|
+
*/
|
|
18
|
+
const DEFAULT_INLINE_THRESHOLD = 16 * 1024;
|
|
19
|
+
const DEFAULT_BUSY_TIMEOUT_MS = 5000;
|
|
20
|
+
const DEFAULT_ORPHAN_BLOB_GRACE_DAYS = 7;
|
|
21
|
+
const SCHEMA_VERSION = 1;
|
|
22
|
+
function nowIso() {
|
|
23
|
+
return new Date().toISOString();
|
|
24
|
+
}
|
|
25
|
+
function safeJson(value) {
|
|
26
|
+
return JSON.stringify(value ?? {});
|
|
27
|
+
}
|
|
28
|
+
function fileSizeIfExists(filePath) {
|
|
29
|
+
try {
|
|
30
|
+
return fs.existsSync(filePath) ? fs.statSync(filePath).size : 0;
|
|
31
|
+
}
|
|
32
|
+
catch {
|
|
33
|
+
return 0;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
function summarizeForDiff(text) {
|
|
37
|
+
return text.length > 240 ? `${text.slice(0, 237)}...` : text;
|
|
38
|
+
}
|
|
39
|
+
function redactText(text) {
|
|
40
|
+
return text
|
|
41
|
+
.replace(/[A-Za-z]:\\[^\s"'`]+/g, '<WINDOWS_PATH>')
|
|
42
|
+
.replace(/\/[A-Za-z0-9._-]+(?:\/[A-Za-z0-9._-]+)+/g, '<PATH>')
|
|
43
|
+
.replace(/[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,}/gi, '<EMAIL>')
|
|
44
|
+
.replace(/\b(sk|rk|pk)_[A-Za-z0-9]+\b/g, '<TOKEN>');
|
|
45
|
+
}
|
|
46
|
+
export class TrajectoryDatabase {
|
|
47
|
+
workspaceDir;
|
|
48
|
+
stateDir;
|
|
49
|
+
dbPath;
|
|
50
|
+
blobDir;
|
|
51
|
+
exportDir;
|
|
52
|
+
blobInlineThresholdBytes;
|
|
53
|
+
orphanBlobGraceMs;
|
|
54
|
+
db;
|
|
55
|
+
constructor(opts) {
|
|
56
|
+
this.workspaceDir = path.resolve(opts.workspaceDir);
|
|
57
|
+
this.stateDir = resolvePdPath(this.workspaceDir, 'STATE_DIR');
|
|
58
|
+
this.dbPath = resolvePdPath(this.workspaceDir, 'TRAJECTORY_DB');
|
|
59
|
+
this.blobDir = resolvePdPath(this.workspaceDir, 'TRAJECTORY_BLOBS_DIR');
|
|
60
|
+
this.exportDir = resolvePdPath(this.workspaceDir, 'EXPORTS_DIR');
|
|
61
|
+
this.blobInlineThresholdBytes = opts.blobInlineThresholdBytes ?? DEFAULT_INLINE_THRESHOLD;
|
|
62
|
+
this.orphanBlobGraceMs = Math.max(0, (opts.orphanBlobGraceDays ?? DEFAULT_ORPHAN_BLOB_GRACE_DAYS) * 24 * 60 * 60 * 1000);
|
|
63
|
+
fs.mkdirSync(this.stateDir, { recursive: true });
|
|
64
|
+
fs.mkdirSync(this.blobDir, { recursive: true });
|
|
65
|
+
fs.mkdirSync(this.exportDir, { recursive: true });
|
|
66
|
+
this.db = new Database(this.dbPath);
|
|
67
|
+
this.db.pragma('journal_mode = WAL');
|
|
68
|
+
this.db.pragma('foreign_keys = ON');
|
|
69
|
+
this.db.pragma('synchronous = NORMAL');
|
|
70
|
+
this.db.pragma(`busy_timeout = ${Math.max(0, opts.busyTimeoutMs ?? DEFAULT_BUSY_TIMEOUT_MS)}`);
|
|
71
|
+
this.initSchema();
|
|
72
|
+
this.importLegacyArtifacts();
|
|
73
|
+
this.pruneUnreferencedBlobs();
|
|
74
|
+
}
|
|
75
|
+
dispose() {
|
|
76
|
+
this.db.close();
|
|
77
|
+
}
|
|
78
|
+
recordSession(input) {
|
|
79
|
+
const startedAt = input.startedAt ?? nowIso();
|
|
80
|
+
this.withWrite(() => {
|
|
81
|
+
this.db.prepare(`
|
|
82
|
+
INSERT INTO sessions (session_id, started_at, updated_at)
|
|
83
|
+
VALUES (?, ?, ?)
|
|
84
|
+
ON CONFLICT(session_id) DO UPDATE SET updated_at = excluded.updated_at
|
|
85
|
+
`).run(input.sessionId, startedAt, nowIso());
|
|
86
|
+
});
|
|
87
|
+
}
|
|
88
|
+
recordAssistantTurn(input) {
|
|
89
|
+
this.recordSession({ sessionId: input.sessionId, startedAt: input.createdAt });
|
|
90
|
+
const rawStorage = this.storeRawText('assistant', input.rawText);
|
|
91
|
+
const createdAt = input.createdAt ?? nowIso();
|
|
92
|
+
return this.withWrite(() => {
|
|
93
|
+
const result = this.db.prepare(`
|
|
94
|
+
INSERT INTO assistant_turns (
|
|
95
|
+
session_id, run_id, provider, model, raw_text, sanitized_text, usage_json,
|
|
96
|
+
empathy_signal_json, blob_ref, raw_excerpt, created_at
|
|
97
|
+
) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
|
|
98
|
+
`).run(input.sessionId, input.runId, input.provider, input.model, rawStorage.inlineText, input.sanitizedText, safeJson(input.usageJson), safeJson(input.empathySignalJson), rawStorage.blobRef, rawStorage.excerpt, createdAt);
|
|
99
|
+
return Number(result.lastInsertRowid);
|
|
100
|
+
});
|
|
101
|
+
}
|
|
102
|
+
recordUserTurn(input) {
|
|
103
|
+
this.recordSession({ sessionId: input.sessionId, startedAt: input.createdAt });
|
|
104
|
+
const rawStorage = this.storeRawText('user', input.rawText);
|
|
105
|
+
const createdAt = input.createdAt ?? nowIso();
|
|
106
|
+
return this.withWrite(() => {
|
|
107
|
+
const result = this.db.prepare(`
|
|
108
|
+
INSERT INTO user_turns (
|
|
109
|
+
session_id, turn_index, raw_text, blob_ref, raw_excerpt,
|
|
110
|
+
correction_detected, correction_cue, references_assistant_turn_id, created_at
|
|
111
|
+
) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)
|
|
112
|
+
`).run(input.sessionId, input.turnIndex, rawStorage.inlineText, rawStorage.blobRef, rawStorage.excerpt, input.correctionDetected ? 1 : 0, input.correctionCue ?? null, input.referencesAssistantTurnId ?? null, createdAt);
|
|
113
|
+
return Number(result.lastInsertRowid);
|
|
114
|
+
});
|
|
115
|
+
}
|
|
116
|
+
recordToolCall(input) {
|
|
117
|
+
this.recordSession({ sessionId: input.sessionId, startedAt: input.createdAt });
|
|
118
|
+
const createdAt = input.createdAt ?? nowIso();
|
|
119
|
+
const rowId = this.withWrite(() => {
|
|
120
|
+
const result = this.db.prepare(`
|
|
121
|
+
INSERT INTO tool_calls (
|
|
122
|
+
session_id, tool_name, outcome, duration_ms, exit_code, error_type, error_message,
|
|
123
|
+
gfi_before, gfi_after, params_json, created_at
|
|
124
|
+
) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
|
|
125
|
+
`).run(input.sessionId, input.toolName, input.outcome, input.durationMs ?? null, input.exitCode ?? null, input.errorType ?? null, input.errorMessage ?? null, input.gfiBefore ?? null, input.gfiAfter ?? null, safeJson(input.paramsJson), createdAt);
|
|
126
|
+
return Number(result.lastInsertRowid);
|
|
127
|
+
});
|
|
128
|
+
if (input.outcome === 'success') {
|
|
129
|
+
this.maybeCreateCorrectionSample(input.sessionId);
|
|
130
|
+
}
|
|
131
|
+
return rowId;
|
|
132
|
+
}
|
|
133
|
+
recordPainEvent(input) {
|
|
134
|
+
this.recordSession({ sessionId: input.sessionId, startedAt: input.createdAt });
|
|
135
|
+
let insertedId = -1;
|
|
136
|
+
this.withWrite(() => {
|
|
137
|
+
const runResult = this.db.prepare(`
|
|
138
|
+
INSERT INTO pain_events (
|
|
139
|
+
session_id, source, score, reason, severity, origin, confidence, text, created_at
|
|
140
|
+
) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)
|
|
141
|
+
`).run(input.sessionId, input.source, input.score, input.reason ?? null, input.severity ?? null, input.origin ?? null, input.confidence ?? null, input.text ?? null, input.createdAt ?? nowIso());
|
|
142
|
+
insertedId = runResult.lastInsertRowid;
|
|
143
|
+
});
|
|
144
|
+
// FTS indexing is best-effort — run outside the transaction so it cannot
|
|
145
|
+
// roll back the committed pain event row (MEM-03, MEM-04).
|
|
146
|
+
if (input.text && insertedId > 0) {
|
|
147
|
+
try {
|
|
148
|
+
this.db.prepare(`
|
|
149
|
+
INSERT INTO pain_events_fts (text, pain_event_id) VALUES (?, ?)
|
|
150
|
+
`).run(input.text, insertedId);
|
|
151
|
+
}
|
|
152
|
+
catch (err) {
|
|
153
|
+
// Non-fatal: FTS index is for search convenience, not correctness.
|
|
154
|
+
// Log but do not re-throw — the pain event itself is already committed.
|
|
155
|
+
console.warn(`[trajectory] FTS index insert failed for pain_event ${insertedId}: ${String(err)}`);
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
return insertedId;
|
|
159
|
+
}
|
|
160
|
+
/**
|
|
161
|
+
* Search pain_events using FTS5 full-text search (MEM-04).
|
|
162
|
+
* Returns pain events matching the query, ordered by relevance.
|
|
163
|
+
*/
|
|
164
|
+
searchPainEvents(query, limit = 10) {
|
|
165
|
+
if (!query || query.trim().length === 0) {
|
|
166
|
+
return [];
|
|
167
|
+
}
|
|
168
|
+
// Escape FTS5 special characters and format query for porter tokenizer
|
|
169
|
+
const ftsQuery = query.trim().split(/\s+/).map(term => `"${term.replace(/"/g, '""')}"`).join(' ');
|
|
170
|
+
try {
|
|
171
|
+
const results = this.db.prepare(`
|
|
172
|
+
SELECT pe.*
|
|
173
|
+
FROM pain_events_fts pf
|
|
174
|
+
JOIN pain_events pe ON pe.id = pf.pain_event_id
|
|
175
|
+
WHERE pain_events_fts MATCH ?
|
|
176
|
+
ORDER BY bm25(pain_events_fts) DESC
|
|
177
|
+
LIMIT ?
|
|
178
|
+
`).all(ftsQuery, limit);
|
|
179
|
+
return results.map(row => ({
|
|
180
|
+
id: row.id,
|
|
181
|
+
sessionId: row.session_id,
|
|
182
|
+
source: row.source,
|
|
183
|
+
score: row.score,
|
|
184
|
+
reason: row.reason,
|
|
185
|
+
severity: row.severity,
|
|
186
|
+
origin: row.origin,
|
|
187
|
+
confidence: row.confidence,
|
|
188
|
+
text: row.text,
|
|
189
|
+
createdAt: row.created_at,
|
|
190
|
+
}));
|
|
191
|
+
}
|
|
192
|
+
catch (err) {
|
|
193
|
+
// If FTS5 query fails (e.g., syntax error), return empty results
|
|
194
|
+
console.warn(`[PD:TrajectoryDatabase] FTS5 search failed: ${String(err)}`);
|
|
195
|
+
return [];
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
recordGateBlock(input) {
|
|
199
|
+
this.withWrite(() => {
|
|
200
|
+
this.db.prepare(`
|
|
201
|
+
INSERT INTO gate_blocks (session_id, tool_name, file_path, reason, plan_status, created_at)
|
|
202
|
+
VALUES (?, ?, ?, ?, ?, ?)
|
|
203
|
+
`).run(input.sessionId ?? null, input.toolName, input.filePath ?? null, input.reason, input.planStatus ?? null, input.createdAt ?? nowIso());
|
|
204
|
+
});
|
|
205
|
+
}
|
|
206
|
+
recordTrustChange(input) {
|
|
207
|
+
this.withWrite(() => {
|
|
208
|
+
this.db.prepare(`
|
|
209
|
+
INSERT INTO trust_changes (session_id, previous_score, new_score, delta, reason, created_at)
|
|
210
|
+
VALUES (?, ?, ?, ?, ?, ?)
|
|
211
|
+
`).run(input.sessionId ?? null, input.previousScore, input.newScore, input.delta, input.reason, input.createdAt ?? nowIso());
|
|
212
|
+
});
|
|
213
|
+
}
|
|
214
|
+
recordPrincipleEvent(input) {
|
|
215
|
+
this.withWrite(() => {
|
|
216
|
+
this.db.prepare(`
|
|
217
|
+
INSERT INTO principle_events (principle_id, event_type, payload_json, created_at)
|
|
218
|
+
VALUES (?, ?, ?, ?)
|
|
219
|
+
`).run(input.principleId ?? null, input.eventType, safeJson(input.payload), input.createdAt ?? nowIso());
|
|
220
|
+
});
|
|
221
|
+
}
|
|
222
|
+
recordTaskOutcome(input) {
|
|
223
|
+
this.withWrite(() => {
|
|
224
|
+
this.db.prepare(`
|
|
225
|
+
INSERT INTO task_outcomes (session_id, task_id, outcome, summary, principle_ids_json, created_at)
|
|
226
|
+
VALUES (?, ?, ?, ?, ?, ?)
|
|
227
|
+
`).run(input.sessionId, input.taskId ?? null, input.outcome, input.summary ?? null, safeJson(input.principleIdsJson), input.createdAt ?? nowIso());
|
|
228
|
+
});
|
|
229
|
+
}
|
|
230
|
+
recordEvolutionTask(input) {
|
|
231
|
+
const now = nowIso();
|
|
232
|
+
// Cast to V2 to access new fields
|
|
233
|
+
const v2 = input;
|
|
234
|
+
this.withWrite(() => {
|
|
235
|
+
this.db.prepare(`
|
|
236
|
+
INSERT INTO evolution_tasks (
|
|
237
|
+
task_id, trace_id, source, reason, score, status,
|
|
238
|
+
enqueued_at, started_at, completed_at, resolution, created_at, updated_at,
|
|
239
|
+
task_kind, priority, retry_count, max_retries, last_error, result_ref
|
|
240
|
+
) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
|
|
241
|
+
ON CONFLICT(task_id) DO UPDATE SET
|
|
242
|
+
status = excluded.status,
|
|
243
|
+
started_at = excluded.started_at,
|
|
244
|
+
completed_at = excluded.completed_at,
|
|
245
|
+
resolution = excluded.resolution,
|
|
246
|
+
updated_at = excluded.updated_at,
|
|
247
|
+
task_kind = excluded.task_kind,
|
|
248
|
+
priority = excluded.priority,
|
|
249
|
+
retry_count = excluded.retry_count,
|
|
250
|
+
max_retries = excluded.max_retries,
|
|
251
|
+
last_error = excluded.last_error,
|
|
252
|
+
result_ref = excluded.result_ref
|
|
253
|
+
`).run(input.taskId, input.traceId, input.source, input.reason ?? null, input.score ?? 0, input.status ?? 'pending', input.enqueuedAt ?? null, input.startedAt ?? null, input.completedAt ?? null, input.resolution ?? null, input.createdAt ?? now, input.updatedAt ?? now, v2.taskKind ?? null, v2.priority ?? null, v2.retryCount ?? null, v2.maxRetries ?? null, v2.lastError ?? null, v2.resultRef ?? null);
|
|
254
|
+
});
|
|
255
|
+
}
|
|
256
|
+
updateEvolutionTask(taskId, updates) {
|
|
257
|
+
const now = nowIso();
|
|
258
|
+
// Cast to V2 to access new fields
|
|
259
|
+
const v2Updates = updates;
|
|
260
|
+
this.withWrite(() => {
|
|
261
|
+
const setClauses = ['updated_at = ?'];
|
|
262
|
+
const values = [now];
|
|
263
|
+
if (updates.status !== undefined) {
|
|
264
|
+
setClauses.push('status = ?');
|
|
265
|
+
values.push(updates.status);
|
|
266
|
+
}
|
|
267
|
+
if (updates.startedAt !== undefined) {
|
|
268
|
+
setClauses.push('started_at = ?');
|
|
269
|
+
values.push(updates.startedAt);
|
|
270
|
+
}
|
|
271
|
+
if (updates.completedAt !== undefined) {
|
|
272
|
+
setClauses.push('completed_at = ?');
|
|
273
|
+
values.push(updates.completedAt);
|
|
274
|
+
}
|
|
275
|
+
if (updates.resolution !== undefined) {
|
|
276
|
+
setClauses.push('resolution = ?');
|
|
277
|
+
values.push(updates.resolution);
|
|
278
|
+
}
|
|
279
|
+
if (updates.score !== undefined) {
|
|
280
|
+
setClauses.push('score = ?');
|
|
281
|
+
values.push(updates.score);
|
|
282
|
+
}
|
|
283
|
+
// V2 fields
|
|
284
|
+
if (v2Updates.taskKind !== undefined) {
|
|
285
|
+
setClauses.push('task_kind = ?');
|
|
286
|
+
values.push(v2Updates.taskKind);
|
|
287
|
+
}
|
|
288
|
+
if (v2Updates.priority !== undefined) {
|
|
289
|
+
setClauses.push('priority = ?');
|
|
290
|
+
values.push(v2Updates.priority);
|
|
291
|
+
}
|
|
292
|
+
if (v2Updates.retryCount !== undefined) {
|
|
293
|
+
setClauses.push('retry_count = ?');
|
|
294
|
+
values.push(v2Updates.retryCount);
|
|
295
|
+
}
|
|
296
|
+
if (v2Updates.maxRetries !== undefined) {
|
|
297
|
+
setClauses.push('max_retries = ?');
|
|
298
|
+
values.push(v2Updates.maxRetries);
|
|
299
|
+
}
|
|
300
|
+
if (v2Updates.lastError !== undefined) {
|
|
301
|
+
setClauses.push('last_error = ?');
|
|
302
|
+
values.push(v2Updates.lastError);
|
|
303
|
+
}
|
|
304
|
+
if (v2Updates.resultRef !== undefined) {
|
|
305
|
+
setClauses.push('result_ref = ?');
|
|
306
|
+
values.push(v2Updates.resultRef);
|
|
307
|
+
}
|
|
308
|
+
values.push(taskId);
|
|
309
|
+
this.db.prepare(`
|
|
310
|
+
UPDATE evolution_tasks SET ${setClauses.join(', ')} WHERE task_id = ?
|
|
311
|
+
`).run(...values);
|
|
312
|
+
});
|
|
313
|
+
}
|
|
314
|
+
recordEvolutionEvent(input) {
|
|
315
|
+
this.withWrite(() => {
|
|
316
|
+
this.db.prepare(`
|
|
317
|
+
INSERT INTO evolution_events (trace_id, task_id, stage, level, message, summary, metadata_json, created_at)
|
|
318
|
+
VALUES (?, ?, ?, ?, ?, ?, ?, ?)
|
|
319
|
+
`).run(input.traceId, input.taskId ?? null, input.stage, input.level ?? 'info', input.message, input.summary ?? null, safeJson(input.metadata), input.createdAt ?? nowIso());
|
|
320
|
+
});
|
|
321
|
+
}
|
|
322
|
+
/**
|
|
323
|
+
* List evolution tasks with optional filtering.
|
|
324
|
+
*
|
|
325
|
+
* Returns: Analytics data aggregated from trajectory database.
|
|
326
|
+
* Not: Runtime truth or real-time queue state.
|
|
327
|
+
*/
|
|
328
|
+
listEvolutionTasks(filters = {}) {
|
|
329
|
+
const conditions = [];
|
|
330
|
+
const values = [];
|
|
331
|
+
if (filters.status) {
|
|
332
|
+
conditions.push('status = ?');
|
|
333
|
+
values.push(filters.status);
|
|
334
|
+
}
|
|
335
|
+
if (filters.dateFrom) {
|
|
336
|
+
conditions.push('created_at >= ?');
|
|
337
|
+
values.push(filters.dateFrom);
|
|
338
|
+
}
|
|
339
|
+
if (filters.dateTo) {
|
|
340
|
+
conditions.push('created_at <= ?');
|
|
341
|
+
values.push(filters.dateTo);
|
|
342
|
+
}
|
|
343
|
+
const whereClause = conditions.length > 0 ? `WHERE ${conditions.join(' AND ')}` : '';
|
|
344
|
+
const limit = filters.limit ?? 50;
|
|
345
|
+
const offset = filters.offset ?? 0;
|
|
346
|
+
const rows = this.db.prepare(`
|
|
347
|
+
SELECT id, task_id, trace_id, source, reason, score, status,
|
|
348
|
+
enqueued_at, started_at, completed_at, resolution, created_at, updated_at,
|
|
349
|
+
task_kind, priority, retry_count, max_retries, last_error, result_ref
|
|
350
|
+
FROM evolution_tasks
|
|
351
|
+
${whereClause}
|
|
352
|
+
ORDER BY created_at DESC
|
|
353
|
+
LIMIT ? OFFSET ?
|
|
354
|
+
`).all(...values, limit, offset);
|
|
355
|
+
return rows.map((row) => ({
|
|
356
|
+
id: Number(row.id),
|
|
357
|
+
taskId: String(row.task_id),
|
|
358
|
+
traceId: String(row.trace_id),
|
|
359
|
+
source: String(row.source),
|
|
360
|
+
reason: row.reason ? String(row.reason) : null,
|
|
361
|
+
score: Number(row.score ?? 0),
|
|
362
|
+
status: String(row.status),
|
|
363
|
+
enqueuedAt: row.enqueued_at ? String(row.enqueued_at) : null,
|
|
364
|
+
startedAt: row.started_at ? String(row.started_at) : null,
|
|
365
|
+
completedAt: row.completed_at ? String(row.completed_at) : null,
|
|
366
|
+
resolution: row.resolution ? String(row.resolution) : null,
|
|
367
|
+
createdAt: String(row.created_at),
|
|
368
|
+
updatedAt: String(row.updated_at),
|
|
369
|
+
taskKind: row.task_kind ? row.task_kind : null,
|
|
370
|
+
priority: row.priority ? row.priority : null,
|
|
371
|
+
retryCount: row.retry_count != null ? Number(row.retry_count) : null,
|
|
372
|
+
maxRetries: row.max_retries != null ? Number(row.max_retries) : null,
|
|
373
|
+
lastError: row.last_error ? String(row.last_error) : null,
|
|
374
|
+
resultRef: row.result_ref ? String(row.result_ref) : null,
|
|
375
|
+
}));
|
|
376
|
+
}
|
|
377
|
+
/**
|
|
378
|
+
* List evolution events for a trace or globally.
|
|
379
|
+
*
|
|
380
|
+
* Returns: Analytics data aggregated from trajectory database.
|
|
381
|
+
* Not: Runtime truth or real-time queue state.
|
|
382
|
+
*/
|
|
383
|
+
listEvolutionEvents(traceId, filters = {}) {
|
|
384
|
+
const limit = filters.limit ?? 100;
|
|
385
|
+
const offset = filters.offset ?? 0;
|
|
386
|
+
let rows;
|
|
387
|
+
if (traceId) {
|
|
388
|
+
rows = this.db.prepare(`
|
|
389
|
+
SELECT id, trace_id, task_id, stage, level, message, summary, metadata_json, created_at
|
|
390
|
+
FROM evolution_events
|
|
391
|
+
WHERE trace_id = ?
|
|
392
|
+
ORDER BY created_at ASC
|
|
393
|
+
LIMIT ? OFFSET ?
|
|
394
|
+
`).all(traceId, limit, offset);
|
|
395
|
+
}
|
|
396
|
+
else {
|
|
397
|
+
rows = this.db.prepare(`
|
|
398
|
+
SELECT id, trace_id, task_id, stage, level, message, summary, metadata_json, created_at
|
|
399
|
+
FROM evolution_events
|
|
400
|
+
ORDER BY created_at DESC
|
|
401
|
+
LIMIT ? OFFSET ?
|
|
402
|
+
`).all(limit, offset);
|
|
403
|
+
}
|
|
404
|
+
return rows.map((row) => ({
|
|
405
|
+
id: Number(row.id),
|
|
406
|
+
traceId: String(row.trace_id),
|
|
407
|
+
taskId: row.task_id ? String(row.task_id) : null,
|
|
408
|
+
stage: String(row.stage),
|
|
409
|
+
level: String(row.level ?? 'info'),
|
|
410
|
+
message: String(row.message),
|
|
411
|
+
summary: row.summary ? String(row.summary) : null,
|
|
412
|
+
metadata: JSON.parse(String(row.metadata_json ?? '{}')),
|
|
413
|
+
createdAt: String(row.created_at),
|
|
414
|
+
}));
|
|
415
|
+
}
|
|
416
|
+
/**
|
|
417
|
+
* Get evolution task by trace ID.
|
|
418
|
+
*
|
|
419
|
+
* Returns: Analytics data aggregated from trajectory database.
|
|
420
|
+
* Not: Runtime truth or real-time queue state.
|
|
421
|
+
*/
|
|
422
|
+
getEvolutionTaskByTraceId(traceId) {
|
|
423
|
+
const row = this.db.prepare(`
|
|
424
|
+
SELECT id, task_id, trace_id, source, reason, score, status,
|
|
425
|
+
enqueued_at, started_at, completed_at, resolution, created_at, updated_at,
|
|
426
|
+
task_kind, priority, retry_count, max_retries, last_error, result_ref
|
|
427
|
+
FROM evolution_tasks
|
|
428
|
+
WHERE trace_id = ?
|
|
429
|
+
LIMIT 1
|
|
430
|
+
`).get(traceId);
|
|
431
|
+
if (!row)
|
|
432
|
+
return null;
|
|
433
|
+
return {
|
|
434
|
+
id: Number(row.id),
|
|
435
|
+
taskId: String(row.task_id),
|
|
436
|
+
traceId: String(row.trace_id),
|
|
437
|
+
source: String(row.source),
|
|
438
|
+
reason: row.reason ? String(row.reason) : null,
|
|
439
|
+
score: Number(row.score ?? 0),
|
|
440
|
+
status: String(row.status),
|
|
441
|
+
enqueuedAt: row.enqueued_at ? String(row.enqueued_at) : null,
|
|
442
|
+
startedAt: row.started_at ? String(row.started_at) : null,
|
|
443
|
+
completedAt: row.completed_at ? String(row.completed_at) : null,
|
|
444
|
+
resolution: row.resolution ? String(row.resolution) : null,
|
|
445
|
+
createdAt: String(row.created_at),
|
|
446
|
+
updatedAt: String(row.updated_at),
|
|
447
|
+
taskKind: row.task_kind ? row.task_kind : null,
|
|
448
|
+
priority: row.priority ? row.priority : null,
|
|
449
|
+
retryCount: row.retry_count != null ? Number(row.retry_count) : null,
|
|
450
|
+
maxRetries: row.max_retries != null ? Number(row.max_retries) : null,
|
|
451
|
+
lastError: row.last_error ? String(row.last_error) : null,
|
|
452
|
+
resultRef: row.result_ref ? String(row.result_ref) : null,
|
|
453
|
+
};
|
|
454
|
+
}
|
|
455
|
+
/**
|
|
456
|
+
* Get evolution task statistics.
|
|
457
|
+
*
|
|
458
|
+
* Returns: Analytics data aggregated from trajectory database.
|
|
459
|
+
* Not: Runtime truth or real-time queue state.
|
|
460
|
+
*/
|
|
461
|
+
getEvolutionStats() {
|
|
462
|
+
const rows = this.db.prepare(`
|
|
463
|
+
SELECT status, COUNT(*) as count FROM evolution_tasks GROUP BY status
|
|
464
|
+
`).all();
|
|
465
|
+
const stats = { total: 0, pending: 0, inProgress: 0, completed: 0, failed: 0 };
|
|
466
|
+
for (const row of rows) {
|
|
467
|
+
stats.total += row.count;
|
|
468
|
+
if (row.status === 'pending')
|
|
469
|
+
stats.pending = row.count;
|
|
470
|
+
else if (row.status === 'in_progress')
|
|
471
|
+
stats.inProgress = row.count;
|
|
472
|
+
else if (row.status === 'completed')
|
|
473
|
+
stats.completed = row.count;
|
|
474
|
+
else if (row.status === 'failed')
|
|
475
|
+
stats.failed = row.count;
|
|
476
|
+
}
|
|
477
|
+
return stats;
|
|
478
|
+
}
|
|
479
|
+
/**
|
|
480
|
+
* List recent sessions from the trajectory database.
|
|
481
|
+
*
|
|
482
|
+
* Returns: Recent session records ordered by most recently updated.
|
|
483
|
+
*
|
|
484
|
+
* @param options.limit - Maximum number of sessions to return (default: 20)
|
|
485
|
+
* @param options.dateFrom - Only return sessions updated after this date
|
|
486
|
+
* @param options.dateTo - Only return sessions updated before this date
|
|
487
|
+
*/
|
|
488
|
+
listRecentSessions(options = {}) {
|
|
489
|
+
const conditions = [];
|
|
490
|
+
const values = [];
|
|
491
|
+
if (options.dateFrom) {
|
|
492
|
+
conditions.push('updated_at >= ?');
|
|
493
|
+
values.push(options.dateFrom);
|
|
494
|
+
}
|
|
495
|
+
if (options.dateTo) {
|
|
496
|
+
conditions.push('updated_at <= ?');
|
|
497
|
+
values.push(options.dateTo);
|
|
498
|
+
}
|
|
499
|
+
const whereClause = conditions.length > 0 ? `WHERE ${conditions.join(' AND ')}` : '';
|
|
500
|
+
const limit = options.limit ?? 20;
|
|
501
|
+
const rows = this.db.prepare(`
|
|
502
|
+
SELECT session_id, started_at, updated_at
|
|
503
|
+
FROM sessions
|
|
504
|
+
${whereClause}
|
|
505
|
+
ORDER BY updated_at DESC
|
|
506
|
+
LIMIT ?
|
|
507
|
+
`).all(...values, limit);
|
|
508
|
+
return rows.map((row) => ({
|
|
509
|
+
sessionId: String(row.session_id),
|
|
510
|
+
startedAt: String(row.started_at),
|
|
511
|
+
updatedAt: String(row.updated_at),
|
|
512
|
+
}));
|
|
513
|
+
}
|
|
514
|
+
/**
|
|
515
|
+
* List assistant turns for a session.
|
|
516
|
+
*
|
|
517
|
+
* Returns: Analytics data aggregated from trajectory database.
|
|
518
|
+
* Not: Runtime truth or real-time queue state.
|
|
519
|
+
*/
|
|
520
|
+
listAssistantTurns(sessionId) {
|
|
521
|
+
const rows = this.db.prepare(`
|
|
522
|
+
SELECT id, session_id, run_id, provider, model, raw_text, sanitized_text, blob_ref, created_at
|
|
523
|
+
FROM assistant_turns
|
|
524
|
+
WHERE session_id = ?
|
|
525
|
+
ORDER BY id ASC
|
|
526
|
+
`).all(sessionId);
|
|
527
|
+
return rows.map((row) => ({
|
|
528
|
+
id: Number(row.id),
|
|
529
|
+
sessionId: String(row.session_id),
|
|
530
|
+
runId: String(row.run_id),
|
|
531
|
+
provider: String(row.provider),
|
|
532
|
+
model: String(row.model),
|
|
533
|
+
rawText: this.restoreRawText(row.raw_text, row.blob_ref),
|
|
534
|
+
sanitizedText: String(row.sanitized_text ?? ''),
|
|
535
|
+
blobRef: row.blob_ref ? String(row.blob_ref) : null,
|
|
536
|
+
createdAt: String(row.created_at),
|
|
537
|
+
}));
|
|
538
|
+
}
|
|
539
|
+
/**
|
|
540
|
+
* List tool calls for a session.
|
|
541
|
+
*
|
|
542
|
+
* Returns: Analytics data aggregated from trajectory database.
|
|
543
|
+
* Not: Runtime truth or real-time queue state.
|
|
544
|
+
*/
|
|
545
|
+
listToolCallsForSession(sessionId) {
|
|
546
|
+
const rows = this.db.prepare(`
|
|
547
|
+
SELECT id, tool_name, outcome, params_json, duration_ms, exit_code, error_type, error_message,
|
|
548
|
+
gfi_before, gfi_after, created_at
|
|
549
|
+
FROM tool_calls
|
|
550
|
+
WHERE session_id = ?
|
|
551
|
+
ORDER BY id ASC
|
|
552
|
+
`).all(sessionId);
|
|
553
|
+
return rows.map((row) => {
|
|
554
|
+
// Extract filePath from params_json if present
|
|
555
|
+
let filePath = null;
|
|
556
|
+
if (row.params_json && typeof row.params_json === 'string') {
|
|
557
|
+
try {
|
|
558
|
+
const params = JSON.parse(row.params_json);
|
|
559
|
+
if (params && typeof params.filePath === 'string') {
|
|
560
|
+
filePath = params.filePath;
|
|
561
|
+
}
|
|
562
|
+
}
|
|
563
|
+
catch {
|
|
564
|
+
// Ignore malformed JSON
|
|
565
|
+
}
|
|
566
|
+
}
|
|
567
|
+
return {
|
|
568
|
+
id: Number(row.id),
|
|
569
|
+
toolName: String(row.tool_name),
|
|
570
|
+
outcome: String(row.outcome),
|
|
571
|
+
filePath,
|
|
572
|
+
durationMs: row.duration_ms != null ? Number(row.duration_ms) : null,
|
|
573
|
+
exitCode: row.exit_code != null ? Number(row.exit_code) : null,
|
|
574
|
+
errorType: row.error_type ? String(row.error_type) : null,
|
|
575
|
+
errorMessage: row.error_message ? String(row.error_message) : null,
|
|
576
|
+
gfiBefore: row.gfi_before != null ? Number(row.gfi_before) : null,
|
|
577
|
+
gfiAfter: row.gfi_after != null ? Number(row.gfi_after) : null,
|
|
578
|
+
createdAt: String(row.created_at),
|
|
579
|
+
};
|
|
580
|
+
});
|
|
581
|
+
}
|
|
582
|
+
/**
|
|
583
|
+
* List pain events for a session.
|
|
584
|
+
*
|
|
585
|
+
* Returns: Analytics data aggregated from trajectory database.
|
|
586
|
+
* Not: Runtime truth or real-time queue state.
|
|
587
|
+
*/
|
|
588
|
+
listPainEventsForSession(sessionId) {
|
|
589
|
+
const rows = this.db.prepare(`
|
|
590
|
+
SELECT id, source, score, reason, severity, origin, confidence, created_at
|
|
591
|
+
FROM pain_events
|
|
592
|
+
WHERE session_id = ?
|
|
593
|
+
ORDER BY created_at ASC
|
|
594
|
+
`).all(sessionId);
|
|
595
|
+
return rows.map((row) => ({
|
|
596
|
+
id: Number(row.id),
|
|
597
|
+
source: String(row.source),
|
|
598
|
+
score: Number(row.score),
|
|
599
|
+
reason: row.reason ? String(row.reason) : null,
|
|
600
|
+
severity: row.severity ? String(row.severity) : null,
|
|
601
|
+
origin: row.origin ? String(row.origin) : null,
|
|
602
|
+
confidence: row.confidence != null ? Number(row.confidence) : null,
|
|
603
|
+
createdAt: String(row.created_at),
|
|
604
|
+
}));
|
|
605
|
+
}
|
|
606
|
+
/**
|
|
607
|
+
* List user turns for a session.
|
|
608
|
+
* Returns sanitized/reduced fields for nocturnal use — NO raw text.
|
|
609
|
+
*/
|
|
610
|
+
listUserTurnsForSession(sessionId) {
|
|
611
|
+
const rows = this.db.prepare(`
|
|
612
|
+
SELECT id, turn_index, raw_excerpt, correction_detected, correction_cue, created_at
|
|
613
|
+
FROM user_turns
|
|
614
|
+
WHERE session_id = ?
|
|
615
|
+
ORDER BY turn_index ASC
|
|
616
|
+
`).all(sessionId);
|
|
617
|
+
return rows.map((row) => ({
|
|
618
|
+
id: Number(row.id),
|
|
619
|
+
turnIndex: Number(row.turn_index),
|
|
620
|
+
rawExcerpt: String(row.raw_excerpt ?? ''),
|
|
621
|
+
correctionDetected: Boolean(row.correction_detected),
|
|
622
|
+
correctionCue: row.correction_cue ? String(row.correction_cue) : null,
|
|
623
|
+
createdAt: String(row.created_at),
|
|
624
|
+
}));
|
|
625
|
+
}
|
|
626
|
+
/**
|
|
627
|
+
* List correction samples with optional review status filter.
|
|
628
|
+
*
|
|
629
|
+
* Returns: Analytics data aggregated from trajectory database.
|
|
630
|
+
* Not: Runtime truth or real-time queue state.
|
|
631
|
+
*/
|
|
632
|
+
listCorrectionSamples(status = 'pending') {
|
|
633
|
+
const rows = this.db.prepare(`
|
|
634
|
+
SELECT sample_id, session_id, bad_assistant_turn_id, user_correction_turn_id,
|
|
635
|
+
recovery_tool_span_json, diff_excerpt, principle_ids_json, quality_score,
|
|
636
|
+
review_status, export_mode, created_at, updated_at
|
|
637
|
+
FROM correction_samples
|
|
638
|
+
WHERE review_status = ?
|
|
639
|
+
ORDER BY created_at DESC
|
|
640
|
+
`).all(status);
|
|
641
|
+
return rows.map((row) => ({
|
|
642
|
+
sampleId: String(row.sample_id),
|
|
643
|
+
sessionId: String(row.session_id),
|
|
644
|
+
badAssistantTurnId: Number(row.bad_assistant_turn_id),
|
|
645
|
+
userCorrectionTurnId: Number(row.user_correction_turn_id),
|
|
646
|
+
recoveryToolSpanJson: String(row.recovery_tool_span_json),
|
|
647
|
+
diffExcerpt: String(row.diff_excerpt ?? ''),
|
|
648
|
+
principleIdsJson: String(row.principle_ids_json ?? '[]'),
|
|
649
|
+
qualityScore: Number(row.quality_score),
|
|
650
|
+
reviewStatus: row.review_status,
|
|
651
|
+
exportMode: row.export_mode,
|
|
652
|
+
createdAt: String(row.created_at),
|
|
653
|
+
updatedAt: String(row.updated_at),
|
|
654
|
+
}));
|
|
655
|
+
}
|
|
656
|
+
/**
|
|
657
|
+
* List gate blocks for a session.
|
|
658
|
+
* Returns minimal fields for nocturnal use — no raw text.
|
|
659
|
+
*/
|
|
660
|
+
listGateBlocksForSession(sessionId) {
|
|
661
|
+
const rows = this.db.prepare(`
|
|
662
|
+
SELECT id, tool_name, file_path, reason, plan_status, created_at
|
|
663
|
+
FROM gate_blocks
|
|
664
|
+
WHERE session_id = ?
|
|
665
|
+
ORDER BY id ASC
|
|
666
|
+
`).all(sessionId);
|
|
667
|
+
return rows.map((row) => ({
|
|
668
|
+
id: Number(row.id),
|
|
669
|
+
toolName: String(row.tool_name),
|
|
670
|
+
filePath: row.file_path ? String(row.file_path) : null,
|
|
671
|
+
reason: String(row.reason),
|
|
672
|
+
planStatus: row.plan_status ? String(row.plan_status) : null,
|
|
673
|
+
createdAt: String(row.created_at),
|
|
674
|
+
}));
|
|
675
|
+
}
|
|
676
|
+
/**
|
|
677
|
+
* List correction samples for a specific session.
|
|
678
|
+
* Returns minimal fields for nocturnal use — correction cue only.
|
|
679
|
+
* #268: Wire correction_samples into nocturnal pipeline.
|
|
680
|
+
*/
|
|
681
|
+
listCorrectionSamplesForSession(sessionId) {
|
|
682
|
+
const rows = this.db.prepare(`
|
|
683
|
+
SELECT cs.sample_id, ut.correction_cue
|
|
684
|
+
FROM correction_samples cs
|
|
685
|
+
LEFT JOIN user_turns ut ON ut.id = cs.user_correction_turn_id
|
|
686
|
+
WHERE cs.session_id = ?
|
|
687
|
+
ORDER BY cs.created_at DESC
|
|
688
|
+
`).all(sessionId);
|
|
689
|
+
return rows.map((row) => ({
|
|
690
|
+
correctionCue: row.correction_cue ? String(row.correction_cue) : null,
|
|
691
|
+
}));
|
|
692
|
+
}
|
|
693
|
+
reviewCorrectionSample(sampleId, status, note) {
|
|
694
|
+
const updatedAt = nowIso();
|
|
695
|
+
const updated = this.withWrite(() => {
|
|
696
|
+
const updateResult = this.db.prepare(`
|
|
697
|
+
UPDATE correction_samples
|
|
698
|
+
SET review_status = ?, updated_at = ?
|
|
699
|
+
WHERE sample_id = ?
|
|
700
|
+
`).run(status, updatedAt, sampleId);
|
|
701
|
+
if (updateResult.changes === 0) {
|
|
702
|
+
return false;
|
|
703
|
+
}
|
|
704
|
+
this.db.prepare(`
|
|
705
|
+
INSERT INTO sample_reviews (sample_id, review_status, note, created_at)
|
|
706
|
+
VALUES (?, ?, ?, ?)
|
|
707
|
+
`).run(sampleId, status, note ?? null, updatedAt);
|
|
708
|
+
return true;
|
|
709
|
+
});
|
|
710
|
+
if (!updated) {
|
|
711
|
+
throw new SampleNotFoundError(sampleId);
|
|
712
|
+
}
|
|
713
|
+
const record = this.db.prepare(`
|
|
714
|
+
SELECT sample_id, session_id, bad_assistant_turn_id, user_correction_turn_id,
|
|
715
|
+
recovery_tool_span_json, diff_excerpt, principle_ids_json, quality_score,
|
|
716
|
+
review_status, export_mode, created_at, updated_at
|
|
717
|
+
FROM correction_samples
|
|
718
|
+
WHERE sample_id = ?
|
|
719
|
+
`).get(sampleId);
|
|
720
|
+
if (!record) {
|
|
721
|
+
throw new SampleNotFoundError(`${sampleId} (after update)`);
|
|
722
|
+
}
|
|
723
|
+
// #Phase2b: Emit pain event for rejected corrections
|
|
724
|
+
if (status === 'rejected') {
|
|
725
|
+
this.recordCorrectionRejectedPain({
|
|
726
|
+
session_id: record.session_id,
|
|
727
|
+
quality_score: record.quality_score,
|
|
728
|
+
diff_excerpt: record.diff_excerpt,
|
|
729
|
+
principle_ids_json: record.principle_ids_json,
|
|
730
|
+
created_at: record.created_at,
|
|
731
|
+
});
|
|
732
|
+
}
|
|
733
|
+
return {
|
|
734
|
+
sampleId: String(record.sample_id),
|
|
735
|
+
sessionId: String(record.session_id),
|
|
736
|
+
badAssistantTurnId: Number(record.bad_assistant_turn_id),
|
|
737
|
+
userCorrectionTurnId: Number(record.user_correction_turn_id),
|
|
738
|
+
recoveryToolSpanJson: String(record.recovery_tool_span_json),
|
|
739
|
+
diffExcerpt: String(record.diff_excerpt ?? ''),
|
|
740
|
+
principleIdsJson: String(record.principle_ids_json ?? '[]'),
|
|
741
|
+
qualityScore: Number(record.quality_score),
|
|
742
|
+
reviewStatus: record.review_status,
|
|
743
|
+
exportMode: record.export_mode,
|
|
744
|
+
createdAt: String(record.created_at),
|
|
745
|
+
updatedAt: String(record.updated_at),
|
|
746
|
+
};
|
|
747
|
+
}
|
|
748
|
+
/**
|
|
749
|
+
* When a correction sample is rejected, emit a pain event to the trajectory.
|
|
750
|
+
* This feeds rejected corrections into the nocturnal pipeline as a high-fidelity
|
|
751
|
+
* violation signal (human-verified, unlike heuristic pain detection).
|
|
752
|
+
*/
|
|
753
|
+
recordCorrectionRejectedPain(record) {
|
|
754
|
+
const sessionId = String(record.session_id);
|
|
755
|
+
const qualityScore = Number(record.quality_score);
|
|
756
|
+
const diffExcerpt = String(record.diff_excerpt ?? '');
|
|
757
|
+
const principleIds = String(record.principle_ids_json ?? '[]');
|
|
758
|
+
// quality_score (0-100) from correction sample → pain score (0-100), clamped
|
|
759
|
+
const painScore = Math.max(0, Math.min(100, Math.round(Number(qualityScore) || 0)));
|
|
760
|
+
const reason = `Correction rejected (quality ${qualityScore.toFixed(2)}). Principles: ${principleIds}${diffExcerpt ? ` — ${diffExcerpt.slice(0, 120)}` : ''}`;
|
|
761
|
+
try {
|
|
762
|
+
this.recordPainEvent({
|
|
763
|
+
sessionId,
|
|
764
|
+
source: 'correction_rejected',
|
|
765
|
+
score: painScore,
|
|
766
|
+
reason,
|
|
767
|
+
severity: painScore >= 70 ? 'severe' : painScore >= 40 ? 'moderate' : 'mild',
|
|
768
|
+
origin: 'system_infer',
|
|
769
|
+
text: diffExcerpt || undefined,
|
|
770
|
+
createdAt: String(record.created_at),
|
|
771
|
+
});
|
|
772
|
+
}
|
|
773
|
+
catch (err) {
|
|
774
|
+
// Non-fatal: pain event recording should not break the review flow
|
|
775
|
+
console.warn(`[Trajectory] Failed to record correction_rejected pain event: ${String(err)}`);
|
|
776
|
+
}
|
|
777
|
+
}
|
|
778
|
+
/**
|
|
779
|
+
* Export correction samples to JSONL file.
|
|
780
|
+
*
|
|
781
|
+
* Returns: Analytics data aggregated from trajectory database.
|
|
782
|
+
* Not: Runtime truth or real-time queue state.
|
|
783
|
+
*/
|
|
784
|
+
exportCorrections(opts) {
|
|
785
|
+
const rows = this.db.prepare(`
|
|
786
|
+
SELECT cs.sample_id, cs.session_id, cs.recovery_tool_span_json, cs.diff_excerpt, cs.quality_score,
|
|
787
|
+
at.raw_text AS assistant_raw_text, at.blob_ref AS assistant_blob_ref, at.sanitized_text,
|
|
788
|
+
ut.raw_text AS user_raw_text, ut.blob_ref AS user_blob_ref, ut.correction_cue
|
|
789
|
+
FROM correction_samples cs
|
|
790
|
+
JOIN assistant_turns at ON at.id = cs.bad_assistant_turn_id
|
|
791
|
+
JOIN user_turns ut ON ut.id = cs.user_correction_turn_id
|
|
792
|
+
WHERE (? = 0 OR cs.review_status = 'approved')
|
|
793
|
+
ORDER BY cs.created_at ASC
|
|
794
|
+
`).all(opts.approvedOnly ? 1 : 0);
|
|
795
|
+
const exportPath = path.join(this.exportDir, `corrections-${Date.now()}-${opts.mode}.jsonl`);
|
|
796
|
+
const lines = rows.map((row) => {
|
|
797
|
+
const assistantRaw = this.restoreRawText(row.assistant_raw_text, row.assistant_blob_ref);
|
|
798
|
+
const userRaw = this.restoreRawText(row.user_raw_text, row.user_blob_ref);
|
|
799
|
+
const assistantText = opts.mode === 'redacted' ? redactText(assistantRaw) : assistantRaw;
|
|
800
|
+
const userText = opts.mode === 'redacted' ? redactText(userRaw) : userRaw;
|
|
801
|
+
return JSON.stringify({
|
|
802
|
+
sample_id: row.sample_id,
|
|
803
|
+
session_id: row.session_id,
|
|
804
|
+
instruction: userText,
|
|
805
|
+
input_context: assistantText,
|
|
806
|
+
bad_attempt_summary: String(row.diff_excerpt ?? ''),
|
|
807
|
+
preferred_response: userText,
|
|
808
|
+
labels: {
|
|
809
|
+
correction_cue: row.correction_cue,
|
|
810
|
+
quality_score: row.quality_score,
|
|
811
|
+
},
|
|
812
|
+
metadata: {
|
|
813
|
+
mode: opts.mode,
|
|
814
|
+
recovery_tool_span_json: row.recovery_tool_span_json,
|
|
815
|
+
},
|
|
816
|
+
});
|
|
817
|
+
});
|
|
818
|
+
atomicWriteFileSync(exportPath, `${lines.join('\n')}${lines.length > 0 ? '\n' : ''}`);
|
|
819
|
+
this.recordExportAudit('corrections', opts.mode, opts.approvedOnly, exportPath, rows.length);
|
|
820
|
+
return { filePath: exportPath, count: rows.length, mode: opts.mode };
|
|
821
|
+
}
|
|
822
|
+
/**
|
|
823
|
+
* Export analytics data to JSON file.
|
|
824
|
+
*
|
|
825
|
+
* Returns: Analytics data aggregated from trajectory database.
|
|
826
|
+
* Not: Runtime truth or real-time queue state.
|
|
827
|
+
*/
|
|
828
|
+
exportAnalytics() {
|
|
829
|
+
const payload = {
|
|
830
|
+
generatedAt: nowIso(),
|
|
831
|
+
stats: this.getDataStats(),
|
|
832
|
+
dailyMetrics: this.dailyMetrics(),
|
|
833
|
+
errorClusters: this.db.prepare('SELECT * FROM v_error_clusters').all(),
|
|
834
|
+
principleEffectiveness: this.db.prepare('SELECT * FROM v_principle_effectiveness').all(),
|
|
835
|
+
sampleQueue: this.db.prepare('SELECT * FROM v_sample_queue').all(),
|
|
836
|
+
};
|
|
837
|
+
const exportPath = path.join(this.exportDir, `analytics-${Date.now()}.json`);
|
|
838
|
+
atomicWriteFileSync(exportPath, JSON.stringify(payload, null, 2));
|
|
839
|
+
this.recordExportAudit('analytics', 'raw', true, exportPath, Array.isArray(payload.dailyMetrics) ? payload.dailyMetrics.length : 0);
|
|
840
|
+
return { filePath: exportPath, count: Array.isArray(payload.dailyMetrics) ? payload.dailyMetrics.length : 0 };
|
|
841
|
+
}
|
|
842
|
+
/**
|
|
843
|
+
* Get trajectory database statistics.
|
|
844
|
+
*
|
|
845
|
+
* Returns: Analytics data aggregated from trajectory database.
|
|
846
|
+
* Not: Runtime truth or real-time queue state.
|
|
847
|
+
*/
|
|
848
|
+
getDataStats() {
|
|
849
|
+
const getCount = (table, where) => {
|
|
850
|
+
const sql = where ? `SELECT COUNT(*) as count FROM ${table} WHERE ${where}` : `SELECT COUNT(*) as count FROM ${table}`;
|
|
851
|
+
return Number(this.db.prepare(sql).get().count);
|
|
852
|
+
};
|
|
853
|
+
const lastIngest = this.db.prepare(`
|
|
854
|
+
SELECT MAX(ts) AS ts FROM (
|
|
855
|
+
SELECT MAX(created_at) AS ts FROM assistant_turns
|
|
856
|
+
UNION ALL SELECT MAX(created_at) AS ts FROM user_turns
|
|
857
|
+
UNION ALL SELECT MAX(created_at) AS ts FROM tool_calls
|
|
858
|
+
UNION ALL SELECT MAX(created_at) AS ts FROM pain_events
|
|
859
|
+
)
|
|
860
|
+
`).get();
|
|
861
|
+
return {
|
|
862
|
+
dbPath: this.dbPath,
|
|
863
|
+
dbSizeBytes: fileSizeIfExists(this.dbPath),
|
|
864
|
+
assistantTurns: getCount('assistant_turns'),
|
|
865
|
+
userTurns: getCount('user_turns'),
|
|
866
|
+
toolCalls: getCount('tool_calls'),
|
|
867
|
+
painEvents: getCount('pain_events'),
|
|
868
|
+
pendingSamples: getCount('correction_samples', `review_status = 'pending'`),
|
|
869
|
+
approvedSamples: getCount('correction_samples', `review_status = 'approved'`),
|
|
870
|
+
blobBytes: this.computeBlobBytes(),
|
|
871
|
+
lastIngestAt: lastIngest.ts ?? null,
|
|
872
|
+
};
|
|
873
|
+
}
|
|
874
|
+
cleanupBlobStorage() {
|
|
875
|
+
return this.pruneUnreferencedBlobs();
|
|
876
|
+
}
|
|
877
|
+
initSchema() {
|
|
878
|
+
this.db.exec(`
|
|
879
|
+
CREATE TABLE IF NOT EXISTS schema_version (version INTEGER NOT NULL);
|
|
880
|
+
CREATE TABLE IF NOT EXISTS ingest_checkpoint (
|
|
881
|
+
source_key TEXT PRIMARY KEY,
|
|
882
|
+
imported_at TEXT NOT NULL
|
|
883
|
+
);
|
|
884
|
+
CREATE TABLE IF NOT EXISTS sessions (
|
|
885
|
+
session_id TEXT PRIMARY KEY,
|
|
886
|
+
started_at TEXT NOT NULL,
|
|
887
|
+
updated_at TEXT NOT NULL
|
|
888
|
+
);
|
|
889
|
+
CREATE TABLE IF NOT EXISTS assistant_turns (
|
|
890
|
+
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
|
891
|
+
session_id TEXT NOT NULL,
|
|
892
|
+
run_id TEXT NOT NULL,
|
|
893
|
+
provider TEXT NOT NULL,
|
|
894
|
+
model TEXT NOT NULL,
|
|
895
|
+
raw_text TEXT,
|
|
896
|
+
sanitized_text TEXT NOT NULL,
|
|
897
|
+
usage_json TEXT NOT NULL,
|
|
898
|
+
empathy_signal_json TEXT NOT NULL,
|
|
899
|
+
blob_ref TEXT,
|
|
900
|
+
raw_excerpt TEXT,
|
|
901
|
+
created_at TEXT NOT NULL
|
|
902
|
+
);
|
|
903
|
+
CREATE TABLE IF NOT EXISTS user_turns (
|
|
904
|
+
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
|
905
|
+
session_id TEXT NOT NULL,
|
|
906
|
+
turn_index INTEGER NOT NULL,
|
|
907
|
+
raw_text TEXT,
|
|
908
|
+
blob_ref TEXT,
|
|
909
|
+
raw_excerpt TEXT,
|
|
910
|
+
correction_detected INTEGER NOT NULL DEFAULT 0,
|
|
911
|
+
correction_cue TEXT,
|
|
912
|
+
references_assistant_turn_id INTEGER,
|
|
913
|
+
created_at TEXT NOT NULL
|
|
914
|
+
);
|
|
915
|
+
CREATE TABLE IF NOT EXISTS tool_calls (
|
|
916
|
+
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
|
917
|
+
session_id TEXT NOT NULL,
|
|
918
|
+
tool_name TEXT NOT NULL,
|
|
919
|
+
outcome TEXT NOT NULL,
|
|
920
|
+
duration_ms INTEGER,
|
|
921
|
+
exit_code INTEGER,
|
|
922
|
+
error_type TEXT,
|
|
923
|
+
error_message TEXT,
|
|
924
|
+
gfi_before REAL,
|
|
925
|
+
gfi_after REAL,
|
|
926
|
+
params_json TEXT NOT NULL,
|
|
927
|
+
created_at TEXT NOT NULL
|
|
928
|
+
);
|
|
929
|
+
CREATE TABLE IF NOT EXISTS pain_events (
|
|
930
|
+
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
|
931
|
+
session_id TEXT NOT NULL,
|
|
932
|
+
source TEXT NOT NULL,
|
|
933
|
+
score REAL NOT NULL,
|
|
934
|
+
reason TEXT,
|
|
935
|
+
severity TEXT,
|
|
936
|
+
origin TEXT,
|
|
937
|
+
confidence REAL,
|
|
938
|
+
text TEXT,
|
|
939
|
+
created_at TEXT NOT NULL
|
|
940
|
+
);
|
|
941
|
+
CREATE TABLE IF NOT EXISTS gate_blocks (
|
|
942
|
+
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
|
943
|
+
session_id TEXT,
|
|
944
|
+
tool_name TEXT NOT NULL,
|
|
945
|
+
file_path TEXT,
|
|
946
|
+
reason TEXT NOT NULL,
|
|
947
|
+
plan_status TEXT,
|
|
948
|
+
created_at TEXT NOT NULL
|
|
949
|
+
);
|
|
950
|
+
CREATE TABLE IF NOT EXISTS trust_changes (
|
|
951
|
+
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
|
952
|
+
session_id TEXT,
|
|
953
|
+
previous_score REAL NOT NULL,
|
|
954
|
+
new_score REAL NOT NULL,
|
|
955
|
+
delta REAL NOT NULL,
|
|
956
|
+
reason TEXT NOT NULL,
|
|
957
|
+
created_at TEXT NOT NULL
|
|
958
|
+
);
|
|
959
|
+
CREATE TABLE IF NOT EXISTS principle_events (
|
|
960
|
+
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
|
961
|
+
principle_id TEXT,
|
|
962
|
+
event_type TEXT NOT NULL,
|
|
963
|
+
payload_json TEXT NOT NULL,
|
|
964
|
+
created_at TEXT NOT NULL
|
|
965
|
+
);
|
|
966
|
+
CREATE TABLE IF NOT EXISTS task_outcomes (
|
|
967
|
+
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
|
968
|
+
session_id TEXT NOT NULL,
|
|
969
|
+
task_id TEXT,
|
|
970
|
+
outcome TEXT NOT NULL,
|
|
971
|
+
summary TEXT,
|
|
972
|
+
principle_ids_json TEXT NOT NULL,
|
|
973
|
+
created_at TEXT NOT NULL
|
|
974
|
+
);
|
|
975
|
+
CREATE TABLE IF NOT EXISTS correction_samples (
|
|
976
|
+
sample_id TEXT PRIMARY KEY,
|
|
977
|
+
session_id TEXT NOT NULL,
|
|
978
|
+
bad_assistant_turn_id INTEGER NOT NULL,
|
|
979
|
+
user_correction_turn_id INTEGER NOT NULL,
|
|
980
|
+
recovery_tool_span_json TEXT NOT NULL,
|
|
981
|
+
diff_excerpt TEXT NOT NULL,
|
|
982
|
+
principle_ids_json TEXT NOT NULL,
|
|
983
|
+
quality_score REAL NOT NULL,
|
|
984
|
+
review_status TEXT NOT NULL,
|
|
985
|
+
export_mode TEXT NOT NULL,
|
|
986
|
+
created_at TEXT NOT NULL,
|
|
987
|
+
updated_at TEXT NOT NULL
|
|
988
|
+
);
|
|
989
|
+
CREATE TABLE IF NOT EXISTS sample_reviews (
|
|
990
|
+
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
|
991
|
+
sample_id TEXT NOT NULL,
|
|
992
|
+
review_status TEXT NOT NULL,
|
|
993
|
+
note TEXT,
|
|
994
|
+
created_at TEXT NOT NULL
|
|
995
|
+
);
|
|
996
|
+
CREATE TABLE IF NOT EXISTS exports_audit (
|
|
997
|
+
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
|
998
|
+
export_kind TEXT NOT NULL,
|
|
999
|
+
mode TEXT NOT NULL,
|
|
1000
|
+
approved_only INTEGER NOT NULL,
|
|
1001
|
+
file_path TEXT NOT NULL,
|
|
1002
|
+
row_count INTEGER NOT NULL,
|
|
1003
|
+
created_at TEXT NOT NULL
|
|
1004
|
+
);
|
|
1005
|
+
CREATE TABLE IF NOT EXISTS evolution_tasks (
|
|
1006
|
+
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
|
1007
|
+
task_id TEXT UNIQUE NOT NULL,
|
|
1008
|
+
trace_id TEXT NOT NULL,
|
|
1009
|
+
source TEXT NOT NULL,
|
|
1010
|
+
reason TEXT,
|
|
1011
|
+
score INTEGER DEFAULT 0,
|
|
1012
|
+
status TEXT DEFAULT 'pending',
|
|
1013
|
+
enqueued_at TEXT,
|
|
1014
|
+
started_at TEXT,
|
|
1015
|
+
completed_at TEXT,
|
|
1016
|
+
resolution TEXT,
|
|
1017
|
+
created_at TEXT NOT NULL,
|
|
1018
|
+
updated_at TEXT NOT NULL
|
|
1019
|
+
);
|
|
1020
|
+
CREATE TABLE IF NOT EXISTS evolution_events (
|
|
1021
|
+
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
|
1022
|
+
trace_id TEXT NOT NULL,
|
|
1023
|
+
task_id TEXT,
|
|
1024
|
+
stage TEXT NOT NULL,
|
|
1025
|
+
level TEXT DEFAULT 'info',
|
|
1026
|
+
message TEXT NOT NULL,
|
|
1027
|
+
summary TEXT,
|
|
1028
|
+
metadata_json TEXT,
|
|
1029
|
+
created_at TEXT NOT NULL
|
|
1030
|
+
);
|
|
1031
|
+
`);
|
|
1032
|
+
// Migration: Add text column to pain_events if it doesn't exist (MEM-01)
|
|
1033
|
+
// SQLite doesn't support IF NOT EXISTS for ADD COLUMN, so we use try/catch
|
|
1034
|
+
try {
|
|
1035
|
+
this.db.exec(`ALTER TABLE pain_events ADD COLUMN text TEXT`);
|
|
1036
|
+
}
|
|
1037
|
+
catch (err) {
|
|
1038
|
+
const message = err instanceof Error ? err.message : String(err);
|
|
1039
|
+
if (!message.includes('duplicate column name') && !message.includes('no column named')) {
|
|
1040
|
+
// Re-throw unexpected errors — silently swallowing migration failures is dangerous
|
|
1041
|
+
throw err;
|
|
1042
|
+
}
|
|
1043
|
+
}
|
|
1044
|
+
// Create FTS5 virtual table for pain_events text search (MEM-04)
|
|
1045
|
+
this.db.exec(`
|
|
1046
|
+
CREATE VIRTUAL TABLE IF NOT EXISTS pain_events_fts USING fts5(
|
|
1047
|
+
text,
|
|
1048
|
+
pain_event_id UNINDEXED,
|
|
1049
|
+
tokenize='porter unicode61'
|
|
1050
|
+
)
|
|
1051
|
+
`);
|
|
1052
|
+
// V2 migration: Add V2 columns to evolution_tasks if they don't exist
|
|
1053
|
+
// SQLite does not support IF NOT EXISTS for ADD COLUMN, so we must check manually
|
|
1054
|
+
// before each ALTER to avoid "duplicate column name" errors on existing DBs
|
|
1055
|
+
const v2Columns = [
|
|
1056
|
+
{ name: 'task_kind', type: 'TEXT' },
|
|
1057
|
+
{ name: 'priority', type: 'TEXT' },
|
|
1058
|
+
{ name: 'retry_count', type: 'INTEGER' },
|
|
1059
|
+
{ name: 'max_retries', type: 'INTEGER' },
|
|
1060
|
+
{ name: 'last_error', type: 'TEXT' },
|
|
1061
|
+
{ name: 'result_ref', type: 'TEXT' },
|
|
1062
|
+
];
|
|
1063
|
+
for (const col of v2Columns) {
|
|
1064
|
+
const exists = this.db.prepare(`PRAGMA table_info(evolution_tasks)`).all()
|
|
1065
|
+
.some((row) => row.name === col.name);
|
|
1066
|
+
if (!exists) {
|
|
1067
|
+
this.db.exec(`ALTER TABLE evolution_tasks ADD COLUMN ${col.name} ${col.type}`);
|
|
1068
|
+
}
|
|
1069
|
+
}
|
|
1070
|
+
this.db.exec(`
|
|
1071
|
+
CREATE VIEW IF NOT EXISTS v_error_clusters AS
|
|
1072
|
+
SELECT tool_name, COALESCE(error_type, 'unknown') AS error_type, COUNT(*) AS occurrences
|
|
1073
|
+
FROM tool_calls
|
|
1074
|
+
WHERE outcome = 'failure'
|
|
1075
|
+
GROUP BY tool_name, COALESCE(error_type, 'unknown')
|
|
1076
|
+
ORDER BY occurrences DESC;
|
|
1077
|
+
CREATE VIEW IF NOT EXISTS v_principle_effectiveness AS
|
|
1078
|
+
SELECT event_type, COUNT(*) AS total
|
|
1079
|
+
FROM principle_events
|
|
1080
|
+
GROUP BY event_type
|
|
1081
|
+
ORDER BY total DESC;
|
|
1082
|
+
CREATE VIEW IF NOT EXISTS v_sample_queue AS
|
|
1083
|
+
SELECT review_status, COUNT(*) AS total
|
|
1084
|
+
FROM correction_samples
|
|
1085
|
+
GROUP BY review_status;
|
|
1086
|
+
CREATE INDEX IF NOT EXISTS idx_assistant_turns_session_id ON assistant_turns(session_id);
|
|
1087
|
+
CREATE INDEX IF NOT EXISTS idx_assistant_turns_created_at ON assistant_turns(created_at);
|
|
1088
|
+
CREATE INDEX IF NOT EXISTS idx_assistant_turns_provider_model ON assistant_turns(provider, model);
|
|
1089
|
+
CREATE INDEX IF NOT EXISTS idx_user_turns_session_id ON user_turns(session_id);
|
|
1090
|
+
CREATE INDEX IF NOT EXISTS idx_tool_calls_session_id ON tool_calls(session_id);
|
|
1091
|
+
CREATE INDEX IF NOT EXISTS idx_tool_calls_created_at ON tool_calls(created_at);
|
|
1092
|
+
CREATE INDEX IF NOT EXISTS idx_pain_events_session_id ON pain_events(session_id);
|
|
1093
|
+
CREATE INDEX IF NOT EXISTS idx_correction_samples_review_status ON correction_samples(review_status);
|
|
1094
|
+
CREATE INDEX IF NOT EXISTS idx_evolution_tasks_trace_id ON evolution_tasks(trace_id);
|
|
1095
|
+
CREATE INDEX IF NOT EXISTS idx_evolution_tasks_status ON evolution_tasks(status);
|
|
1096
|
+
CREATE INDEX IF NOT EXISTS idx_evolution_tasks_created_at ON evolution_tasks(created_at);
|
|
1097
|
+
CREATE INDEX IF NOT EXISTS idx_evolution_events_trace_id ON evolution_events(trace_id);
|
|
1098
|
+
CREATE INDEX IF NOT EXISTS idx_evolution_events_created_at ON evolution_events(created_at);
|
|
1099
|
+
`);
|
|
1100
|
+
const row = this.db.prepare('SELECT version FROM schema_version LIMIT 1').get();
|
|
1101
|
+
this.migrateSchema(row?.version);
|
|
1102
|
+
if (!row) {
|
|
1103
|
+
this.db.prepare('INSERT INTO schema_version (version) VALUES (?)').run(SCHEMA_VERSION);
|
|
1104
|
+
}
|
|
1105
|
+
else if (row.version !== SCHEMA_VERSION) {
|
|
1106
|
+
this.db.prepare('UPDATE schema_version SET version = ?').run(SCHEMA_VERSION);
|
|
1107
|
+
}
|
|
1108
|
+
}
|
|
1109
|
+
importLegacyArtifacts() {
|
|
1110
|
+
this.importLegacySessions();
|
|
1111
|
+
this.importLegacyEvents();
|
|
1112
|
+
this.importLegacyEvolution();
|
|
1113
|
+
}
|
|
1114
|
+
migrateSchema(_fromVersion) {
|
|
1115
|
+
this.db.exec(`
|
|
1116
|
+
DROP VIEW IF EXISTS v_daily_metrics;
|
|
1117
|
+
CREATE VIEW IF NOT EXISTS v_daily_metrics AS
|
|
1118
|
+
WITH tool_daily AS (
|
|
1119
|
+
SELECT
|
|
1120
|
+
substr(created_at, 1, 10) AS day,
|
|
1121
|
+
COUNT(*) AS tool_calls,
|
|
1122
|
+
SUM(CASE WHEN outcome = 'failure' THEN 1 ELSE 0 END) AS failures
|
|
1123
|
+
FROM tool_calls
|
|
1124
|
+
GROUP BY substr(created_at, 1, 10)
|
|
1125
|
+
),
|
|
1126
|
+
correction_daily AS (
|
|
1127
|
+
SELECT
|
|
1128
|
+
substr(created_at, 1, 10) AS day,
|
|
1129
|
+
SUM(CASE WHEN correction_detected = 1 THEN 1 ELSE 0 END) AS user_corrections
|
|
1130
|
+
FROM user_turns
|
|
1131
|
+
GROUP BY substr(created_at, 1, 10)
|
|
1132
|
+
)
|
|
1133
|
+
SELECT
|
|
1134
|
+
tool_daily.day AS day,
|
|
1135
|
+
tool_daily.tool_calls AS tool_calls,
|
|
1136
|
+
tool_daily.failures AS failures,
|
|
1137
|
+
COALESCE(correction_daily.user_corrections, 0) AS user_corrections
|
|
1138
|
+
FROM tool_daily
|
|
1139
|
+
LEFT JOIN correction_daily ON correction_daily.day = tool_daily.day;
|
|
1140
|
+
`);
|
|
1141
|
+
}
|
|
1142
|
+
/**
|
|
1143
|
+
* Get daily metrics for analytics.
|
|
1144
|
+
*
|
|
1145
|
+
* Returns: Analytics data aggregated from trajectory database.
|
|
1146
|
+
* Not: Runtime truth or real-time queue state.
|
|
1147
|
+
*/
|
|
1148
|
+
dailyMetrics() {
|
|
1149
|
+
return this.db.prepare('SELECT * FROM v_daily_metrics ORDER BY day ASC').all();
|
|
1150
|
+
}
|
|
1151
|
+
importLegacySessions() {
|
|
1152
|
+
const key = 'legacy:sessions';
|
|
1153
|
+
if (this.isImported(key))
|
|
1154
|
+
return;
|
|
1155
|
+
const sessionDir = resolvePdPath(this.workspaceDir, 'SESSION_DIR');
|
|
1156
|
+
if (!fs.existsSync(sessionDir))
|
|
1157
|
+
return;
|
|
1158
|
+
for (const file of fs.readdirSync(sessionDir).filter((entry) => entry.endsWith('.json'))) {
|
|
1159
|
+
try {
|
|
1160
|
+
const content = JSON.parse(fs.readFileSync(path.join(sessionDir, file), 'utf8'));
|
|
1161
|
+
if (content.sessionId) {
|
|
1162
|
+
const startedAt = typeof content.lastActivityAt === 'number'
|
|
1163
|
+
? new Date(content.lastActivityAt).toISOString()
|
|
1164
|
+
: nowIso();
|
|
1165
|
+
this.recordSession({ sessionId: content.sessionId, startedAt });
|
|
1166
|
+
}
|
|
1167
|
+
}
|
|
1168
|
+
catch {
|
|
1169
|
+
// Ignore malformed legacy sessions.
|
|
1170
|
+
}
|
|
1171
|
+
}
|
|
1172
|
+
this.markImported(key);
|
|
1173
|
+
}
|
|
1174
|
+
importLegacyEvents() {
|
|
1175
|
+
const key = 'legacy:events';
|
|
1176
|
+
if (this.isImported(key))
|
|
1177
|
+
return;
|
|
1178
|
+
const eventsPath = path.join(this.stateDir, 'logs', 'events.jsonl');
|
|
1179
|
+
if (!fs.existsSync(eventsPath))
|
|
1180
|
+
return;
|
|
1181
|
+
const raw = fs.readFileSync(eventsPath, 'utf8').trim();
|
|
1182
|
+
if (!raw) {
|
|
1183
|
+
this.markImported(key);
|
|
1184
|
+
return;
|
|
1185
|
+
}
|
|
1186
|
+
for (const line of raw.split('\n')) {
|
|
1187
|
+
try {
|
|
1188
|
+
const event = JSON.parse(line);
|
|
1189
|
+
if (event.type === 'pain_signal' && event.sessionId) {
|
|
1190
|
+
this.recordPainEvent({
|
|
1191
|
+
sessionId: event.sessionId,
|
|
1192
|
+
source: String(event.data?.source ?? 'legacy'),
|
|
1193
|
+
score: Number(event.data?.score ?? 0),
|
|
1194
|
+
reason: typeof event.data?.reason === 'string' ? event.data.reason : null,
|
|
1195
|
+
severity: typeof event.data?.severity === 'string' ? event.data.severity : null,
|
|
1196
|
+
origin: typeof event.data?.origin === 'string' ? event.data.origin : null,
|
|
1197
|
+
confidence: typeof event.data?.confidence === 'number' ? event.data.confidence : null,
|
|
1198
|
+
createdAt: event.ts,
|
|
1199
|
+
});
|
|
1200
|
+
}
|
|
1201
|
+
if (event.type === 'trust_change') {
|
|
1202
|
+
this.recordTrustChange({
|
|
1203
|
+
sessionId: event.sessionId,
|
|
1204
|
+
previousScore: Number(event.data?.previousScore ?? 0),
|
|
1205
|
+
newScore: Number(event.data?.newScore ?? 0),
|
|
1206
|
+
delta: Number(event.data?.delta ?? 0),
|
|
1207
|
+
reason: String(event.data?.reason ?? 'legacy'),
|
|
1208
|
+
createdAt: event.ts,
|
|
1209
|
+
});
|
|
1210
|
+
}
|
|
1211
|
+
if (event.type === 'gate_block') {
|
|
1212
|
+
this.recordGateBlock({
|
|
1213
|
+
sessionId: event.sessionId,
|
|
1214
|
+
toolName: String(event.data?.toolName ?? 'unknown'),
|
|
1215
|
+
filePath: typeof event.data?.filePath === 'string' ? event.data.filePath : null,
|
|
1216
|
+
reason: String(event.data?.reason ?? 'legacy'),
|
|
1217
|
+
planStatus: typeof event.data?.planStatus === 'string' ? event.data.planStatus : null,
|
|
1218
|
+
createdAt: event.ts,
|
|
1219
|
+
});
|
|
1220
|
+
}
|
|
1221
|
+
}
|
|
1222
|
+
catch {
|
|
1223
|
+
// Ignore malformed legacy events.
|
|
1224
|
+
}
|
|
1225
|
+
}
|
|
1226
|
+
this.markImported(key);
|
|
1227
|
+
}
|
|
1228
|
+
importLegacyEvolution() {
|
|
1229
|
+
const key = 'legacy:evolution';
|
|
1230
|
+
if (this.isImported(key))
|
|
1231
|
+
return;
|
|
1232
|
+
const evolutionPath = resolvePdPath(this.workspaceDir, 'EVOLUTION_STREAM');
|
|
1233
|
+
if (!fs.existsSync(evolutionPath))
|
|
1234
|
+
return;
|
|
1235
|
+
const raw = fs.readFileSync(evolutionPath, 'utf8').trim();
|
|
1236
|
+
if (!raw) {
|
|
1237
|
+
this.markImported(key);
|
|
1238
|
+
return;
|
|
1239
|
+
}
|
|
1240
|
+
for (const line of raw.split('\n')) {
|
|
1241
|
+
try {
|
|
1242
|
+
const event = JSON.parse(line);
|
|
1243
|
+
this.recordPrincipleEvent({
|
|
1244
|
+
principleId: typeof event.data?.principleId === 'string' ? event.data.principleId : null,
|
|
1245
|
+
eventType: String(event.type ?? 'legacy'),
|
|
1246
|
+
payload: event.data ?? {},
|
|
1247
|
+
createdAt: event.ts,
|
|
1248
|
+
});
|
|
1249
|
+
}
|
|
1250
|
+
catch {
|
|
1251
|
+
// Ignore malformed legacy evolution events.
|
|
1252
|
+
}
|
|
1253
|
+
}
|
|
1254
|
+
this.markImported(key);
|
|
1255
|
+
}
|
|
1256
|
+
markImported(sourceKey) {
|
|
1257
|
+
this.withWrite(() => {
|
|
1258
|
+
this.db.prepare(`
|
|
1259
|
+
INSERT INTO ingest_checkpoint (source_key, imported_at)
|
|
1260
|
+
VALUES (?, ?)
|
|
1261
|
+
ON CONFLICT(source_key) DO UPDATE SET imported_at = excluded.imported_at
|
|
1262
|
+
`).run(sourceKey, nowIso());
|
|
1263
|
+
});
|
|
1264
|
+
}
|
|
1265
|
+
isImported(sourceKey) {
|
|
1266
|
+
const row = this.db.prepare('SELECT source_key FROM ingest_checkpoint WHERE source_key = ?').get(sourceKey);
|
|
1267
|
+
return Boolean(row);
|
|
1268
|
+
}
|
|
1269
|
+
maybeCreateCorrectionSample(sessionId) {
|
|
1270
|
+
const pending = this.db.prepare(`
|
|
1271
|
+
SELECT sample_id FROM correction_samples
|
|
1272
|
+
WHERE session_id = ? AND review_status = 'pending'
|
|
1273
|
+
ORDER BY created_at DESC
|
|
1274
|
+
LIMIT 1
|
|
1275
|
+
`).get(sessionId);
|
|
1276
|
+
if (pending?.sample_id)
|
|
1277
|
+
return;
|
|
1278
|
+
const correctionTurn = this.db.prepare(`
|
|
1279
|
+
SELECT id, references_assistant_turn_id, correction_cue, raw_text, blob_ref
|
|
1280
|
+
FROM user_turns
|
|
1281
|
+
WHERE session_id = ? AND correction_detected = 1
|
|
1282
|
+
ORDER BY id DESC
|
|
1283
|
+
LIMIT 1
|
|
1284
|
+
`).get(sessionId);
|
|
1285
|
+
if (!correctionTurn || !correctionTurn.references_assistant_turn_id)
|
|
1286
|
+
return;
|
|
1287
|
+
// #Phase2b-fix: Tool failure is NOT required for correction samples.
|
|
1288
|
+
// User corrections are the highest-fidelity signal — they indicate the agent
|
|
1289
|
+
// said or did something wrong, regardless of whether tool calls succeeded.
|
|
1290
|
+
// Requiring tool failure excluded the most valuable cases: "agent did something
|
|
1291
|
+
// that technically worked but violated a principle or was logically wrong."
|
|
1292
|
+
const failedCall = this.db.prepare(`
|
|
1293
|
+
SELECT id, tool_name, error_type, error_message
|
|
1294
|
+
FROM tool_calls
|
|
1295
|
+
WHERE session_id = ? AND outcome = 'failure'
|
|
1296
|
+
ORDER BY id DESC
|
|
1297
|
+
LIMIT 1
|
|
1298
|
+
`).get(sessionId);
|
|
1299
|
+
const recentCalls = this.db.prepare(`
|
|
1300
|
+
SELECT id, tool_name, outcome
|
|
1301
|
+
FROM tool_calls
|
|
1302
|
+
WHERE session_id = ?
|
|
1303
|
+
ORDER BY id DESC
|
|
1304
|
+
LIMIT 5
|
|
1305
|
+
`).all(sessionId);
|
|
1306
|
+
const successfulCalls = recentCalls.filter(c => c.outcome === 'success');
|
|
1307
|
+
// Generate sample ID from correction turn + first recent call (or correction id if no calls)
|
|
1308
|
+
const refForHash = successfulCalls[0]?.id ?? correctionTurn.id;
|
|
1309
|
+
const sampleId = `sample_${crypto.createHash('md5').update(`${sessionId}:${correctionTurn.id}:${refForHash}`).digest('hex').slice(0, 12)}`;
|
|
1310
|
+
const userRawText = this.restoreRawText(correctionTurn.raw_text, correctionTurn.blob_ref);
|
|
1311
|
+
// Quality scoring: correction cue is always valuable
|
|
1312
|
+
// Tool failure adds context (20pts), successful calls add context (up to 15pts)
|
|
1313
|
+
// Pure conversation corrections still score 55-75 (high enough to review)
|
|
1314
|
+
const qualityScore = [
|
|
1315
|
+
correctionTurn.references_assistant_turn_id ? 35 : 0,
|
|
1316
|
+
correctionTurn.correction_cue ? 20 : 0,
|
|
1317
|
+
failedCall ? 20 : 0,
|
|
1318
|
+
Math.min(successfulCalls.length, 3) * 5,
|
|
1319
|
+
].reduce((sum, value) => sum + value, 0);
|
|
1320
|
+
// Diff excerpt: prefer user correction text, fallback to error info, fallback to cue
|
|
1321
|
+
const diffText = userRawText
|
|
1322
|
+
|| (failedCall ? String(failedCall.error_message ?? failedCall.error_type ?? failedCall.tool_name) : '')
|
|
1323
|
+
|| String(correctionTurn.correction_cue ?? 'user correction');
|
|
1324
|
+
this.withWrite(() => {
|
|
1325
|
+
this.db.prepare(`
|
|
1326
|
+
INSERT OR IGNORE INTO correction_samples (
|
|
1327
|
+
sample_id, session_id, bad_assistant_turn_id, user_correction_turn_id,
|
|
1328
|
+
recovery_tool_span_json, diff_excerpt, principle_ids_json, quality_score,
|
|
1329
|
+
review_status, export_mode, created_at, updated_at
|
|
1330
|
+
) VALUES (?, ?, ?, ?, ?, ?, ?, ?, 'pending', 'raw', ?, ?)
|
|
1331
|
+
`).run(sampleId, sessionId, Number(correctionTurn.references_assistant_turn_id), Number(correctionTurn.id), safeJson(successfulCalls.map((call) => ({ id: call.id, toolName: call.tool_name, outcome: call.outcome }))), summarizeForDiff(diffText), '[]', qualityScore, nowIso(), nowIso());
|
|
1332
|
+
});
|
|
1333
|
+
}
|
|
1334
|
+
recordExportAudit(exportKind, mode, approvedOnly, filePath, rowCount) {
|
|
1335
|
+
this.withWrite(() => {
|
|
1336
|
+
this.db.prepare(`
|
|
1337
|
+
INSERT INTO exports_audit (export_kind, mode, approved_only, file_path, row_count, created_at)
|
|
1338
|
+
VALUES (?, ?, ?, ?, ?, ?)
|
|
1339
|
+
`).run(exportKind, mode, approvedOnly ? 1 : 0, filePath, rowCount, nowIso());
|
|
1340
|
+
});
|
|
1341
|
+
}
|
|
1342
|
+
storeRawText(kind, text) {
|
|
1343
|
+
const excerpt = text.length > 200 ? `${text.slice(0, 197)}...` : text;
|
|
1344
|
+
const bytes = Buffer.byteLength(text, 'utf8');
|
|
1345
|
+
if (bytes <= this.blobInlineThresholdBytes) {
|
|
1346
|
+
return { inlineText: text, blobRef: null, excerpt };
|
|
1347
|
+
}
|
|
1348
|
+
const hash = crypto.createHash('sha256').update(text).digest('hex');
|
|
1349
|
+
const relativePath = `${kind}-${hash}.txt`;
|
|
1350
|
+
const fullPath = path.join(this.blobDir, relativePath);
|
|
1351
|
+
if (!fs.existsSync(fullPath)) {
|
|
1352
|
+
atomicWriteFileSync(fullPath, text);
|
|
1353
|
+
}
|
|
1354
|
+
return { inlineText: null, blobRef: relativePath, excerpt };
|
|
1355
|
+
}
|
|
1356
|
+
restoreRawText(inlineText, blobRef) {
|
|
1357
|
+
if (inlineText)
|
|
1358
|
+
return inlineText;
|
|
1359
|
+
if (!blobRef)
|
|
1360
|
+
return '';
|
|
1361
|
+
const fullPath = path.join(this.blobDir, blobRef);
|
|
1362
|
+
return fs.existsSync(fullPath) ? fs.readFileSync(fullPath, 'utf8') : '';
|
|
1363
|
+
}
|
|
1364
|
+
computeBlobBytes() {
|
|
1365
|
+
if (!fs.existsSync(this.blobDir))
|
|
1366
|
+
return 0;
|
|
1367
|
+
return fs.readdirSync(this.blobDir).reduce((sum, file) => sum + fileSizeIfExists(path.join(this.blobDir, file)), 0);
|
|
1368
|
+
}
|
|
1369
|
+
pruneUnreferencedBlobs() {
|
|
1370
|
+
if (!fs.existsSync(this.blobDir)) {
|
|
1371
|
+
return { removedFiles: 0, reclaimedBytes: 0 };
|
|
1372
|
+
}
|
|
1373
|
+
const referenced = new Set();
|
|
1374
|
+
const rows = this.db.prepare(`
|
|
1375
|
+
SELECT blob_ref FROM assistant_turns WHERE blob_ref IS NOT NULL
|
|
1376
|
+
UNION
|
|
1377
|
+
SELECT blob_ref FROM user_turns WHERE blob_ref IS NOT NULL
|
|
1378
|
+
`).all();
|
|
1379
|
+
for (const row of rows) {
|
|
1380
|
+
if (row.blob_ref)
|
|
1381
|
+
referenced.add(String(row.blob_ref));
|
|
1382
|
+
}
|
|
1383
|
+
const now = Date.now();
|
|
1384
|
+
let removedFiles = 0;
|
|
1385
|
+
let reclaimedBytes = 0;
|
|
1386
|
+
for (const entry of fs.readdirSync(this.blobDir)) {
|
|
1387
|
+
if (referenced.has(entry))
|
|
1388
|
+
continue;
|
|
1389
|
+
const fullPath = path.join(this.blobDir, entry);
|
|
1390
|
+
let stat;
|
|
1391
|
+
try {
|
|
1392
|
+
stat = fs.statSync(fullPath);
|
|
1393
|
+
}
|
|
1394
|
+
catch {
|
|
1395
|
+
continue;
|
|
1396
|
+
}
|
|
1397
|
+
if (!stat.isFile())
|
|
1398
|
+
continue;
|
|
1399
|
+
if (this.orphanBlobGraceMs > 0 && now - stat.mtimeMs < this.orphanBlobGraceMs)
|
|
1400
|
+
continue;
|
|
1401
|
+
reclaimedBytes += stat.size;
|
|
1402
|
+
removedFiles += 1;
|
|
1403
|
+
fs.rmSync(fullPath, { force: true });
|
|
1404
|
+
}
|
|
1405
|
+
return { removedFiles, reclaimedBytes };
|
|
1406
|
+
}
|
|
1407
|
+
withWrite(fn) {
|
|
1408
|
+
return withLock(this.dbPath, fn, { lockSuffix: '.trajectory.lock', lockStaleMs: 30000 });
|
|
1409
|
+
}
|
|
1410
|
+
}
|
|
1411
|
+
export class TrajectoryRegistry {
|
|
1412
|
+
static instances = new Map();
|
|
1413
|
+
static get(workspaceDir, opts = {}) {
|
|
1414
|
+
const normalized = path.resolve(workspaceDir);
|
|
1415
|
+
const existing = this.instances.get(normalized);
|
|
1416
|
+
if (existing)
|
|
1417
|
+
return existing;
|
|
1418
|
+
const created = new TrajectoryDatabase({ workspaceDir: normalized, ...opts });
|
|
1419
|
+
this.instances.set(normalized, created);
|
|
1420
|
+
return created;
|
|
1421
|
+
}
|
|
1422
|
+
static dispose(workspaceDir) {
|
|
1423
|
+
const normalized = path.resolve(workspaceDir);
|
|
1424
|
+
const instance = this.instances.get(normalized);
|
|
1425
|
+
if (instance) {
|
|
1426
|
+
instance.dispose();
|
|
1427
|
+
this.instances.delete(normalized);
|
|
1428
|
+
}
|
|
1429
|
+
}
|
|
1430
|
+
static clear() {
|
|
1431
|
+
for (const instance of this.instances.values()) {
|
|
1432
|
+
instance.dispose();
|
|
1433
|
+
}
|
|
1434
|
+
this.instances.clear();
|
|
1435
|
+
}
|
|
1436
|
+
static use(workspaceDir, fn, opts = {}) {
|
|
1437
|
+
const normalized = path.resolve(workspaceDir);
|
|
1438
|
+
const existing = this.instances.get(normalized);
|
|
1439
|
+
if (existing) {
|
|
1440
|
+
return fn(existing);
|
|
1441
|
+
}
|
|
1442
|
+
const transient = new TrajectoryDatabase({ workspaceDir: normalized, ...opts });
|
|
1443
|
+
try {
|
|
1444
|
+
return fn(transient);
|
|
1445
|
+
}
|
|
1446
|
+
finally {
|
|
1447
|
+
transient.dispose();
|
|
1448
|
+
}
|
|
1449
|
+
}
|
|
1450
|
+
}
|