pulseed 0.5.4 → 0.6.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 +13 -9
- package/dist/adapters/datasources/artifact-metric-datasource.d.ts +18 -0
- package/dist/adapters/datasources/artifact-metric-datasource.d.ts.map +1 -0
- package/dist/adapters/datasources/artifact-metric-datasource.js +592 -0
- package/dist/adapters/datasources/artifact-metric-datasource.js.map +1 -0
- package/dist/adapters/types/mcp.d.ts +6 -6
- package/dist/base/types/goal-activation.d.ts +14 -2
- package/dist/base/types/goal-activation.d.ts.map +1 -1
- package/dist/base/types/goal-activation.js +4 -0
- package/dist/base/types/goal-activation.js.map +1 -1
- package/dist/index.d.ts +6 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -0
- package/dist/index.js.map +1 -1
- package/dist/interface/chat/chat-runner-commands.d.ts +6 -0
- package/dist/interface/chat/chat-runner-commands.d.ts.map +1 -1
- package/dist/interface/chat/chat-runner-commands.js +94 -2
- package/dist/interface/chat/chat-runner-commands.js.map +1 -1
- package/dist/interface/chat/chat-runner-event-bridge.d.ts +8 -1
- package/dist/interface/chat/chat-runner-event-bridge.d.ts.map +1 -1
- package/dist/interface/chat/chat-runner-event-bridge.js +69 -3
- package/dist/interface/chat/chat-runner-event-bridge.js.map +1 -1
- package/dist/interface/chat/chat-runner-routes.d.ts.map +1 -1
- package/dist/interface/chat/chat-runner-routes.js +23 -7
- package/dist/interface/chat/chat-runner-routes.js.map +1 -1
- package/dist/interface/chat/chat-runner-support.d.ts +25 -1
- package/dist/interface/chat/chat-runner-support.d.ts.map +1 -1
- package/dist/interface/chat/chat-runner-support.js +66 -12
- package/dist/interface/chat/chat-runner-support.js.map +1 -1
- package/dist/interface/chat/chat-runner.d.ts.map +1 -1
- package/dist/interface/chat/chat-runner.js +38 -8
- package/dist/interface/chat/chat-runner.js.map +1 -1
- package/dist/interface/chat/cross-platform-session.d.ts.map +1 -1
- package/dist/interface/chat/cross-platform-session.js +13 -1
- package/dist/interface/chat/cross-platform-session.js.map +1 -1
- package/dist/interface/chat/event-subscriber.d.ts.map +1 -1
- package/dist/interface/chat/event-subscriber.js +20 -0
- package/dist/interface/chat/event-subscriber.js.map +1 -1
- package/dist/interface/chat/failure-recovery.d.ts +43 -1
- package/dist/interface/chat/failure-recovery.d.ts.map +1 -1
- package/dist/interface/chat/failure-recovery.js +259 -89
- package/dist/interface/chat/failure-recovery.js.map +1 -1
- package/dist/interface/chat/ingress-router.d.ts +2 -1
- package/dist/interface/chat/ingress-router.d.ts.map +1 -1
- package/dist/interface/chat/ingress-router.js +2 -3
- package/dist/interface/chat/ingress-router.js.map +1 -1
- package/dist/interface/chat/tend-command.js +1 -0
- package/dist/interface/chat/tend-command.js.map +1 -1
- package/dist/interface/cli/cli-command-registry.d.ts.map +1 -1
- package/dist/interface/cli/cli-command-registry.js +19 -3
- package/dist/interface/cli/cli-command-registry.js.map +1 -1
- package/dist/interface/cli/commands/daemon-shared.d.ts +2 -1
- package/dist/interface/cli/commands/daemon-shared.d.ts.map +1 -1
- package/dist/interface/cli/commands/daemon-shared.js +33 -1
- package/dist/interface/cli/commands/daemon-shared.js.map +1 -1
- package/dist/interface/cli/commands/daemon.d.ts.map +1 -1
- package/dist/interface/cli/commands/daemon.js +59 -8
- package/dist/interface/cli/commands/daemon.js.map +1 -1
- package/dist/interface/cli/commands/goal-read.d.ts.map +1 -1
- package/dist/interface/cli/commands/goal-read.js +10 -3
- package/dist/interface/cli/commands/goal-read.js.map +1 -1
- package/dist/interface/cli/commands/notify.d.ts.map +1 -1
- package/dist/interface/cli/commands/notify.js +7 -1
- package/dist/interface/cli/commands/notify.js.map +1 -1
- package/dist/interface/cli/commands/run.d.ts.map +1 -1
- package/dist/interface/cli/commands/run.js +29 -0
- package/dist/interface/cli/commands/run.js.map +1 -1
- package/dist/interface/cli/commands/runtime.d.ts +1 -1
- package/dist/interface/cli/commands/runtime.d.ts.map +1 -1
- package/dist/interface/cli/commands/runtime.js +407 -2
- package/dist/interface/cli/commands/runtime.js.map +1 -1
- package/dist/interface/cli/data-source-bootstrap.d.ts.map +1 -1
- package/dist/interface/cli/data-source-bootstrap.js +25 -12
- package/dist/interface/cli/data-source-bootstrap.js.map +1 -1
- package/dist/interface/cli/setup.d.ts.map +1 -1
- package/dist/interface/cli/setup.js +14 -0
- package/dist/interface/cli/setup.js.map +1 -1
- package/dist/interface/cli/utils/loop-runner.d.ts.map +1 -1
- package/dist/interface/cli/utils/loop-runner.js +2 -1
- package/dist/interface/cli/utils/loop-runner.js.map +1 -1
- package/dist/interface/cli/utils.d.ts.map +1 -1
- package/dist/interface/cli/utils.js +8 -1
- package/dist/interface/cli/utils.js.map +1 -1
- package/dist/interface/tui/app.d.ts +4 -1
- package/dist/interface/tui/app.d.ts.map +1 -1
- package/dist/interface/tui/app.js +268 -10
- package/dist/interface/tui/app.js.map +1 -1
- package/dist/interface/tui/chat-surface.d.ts +2 -0
- package/dist/interface/tui/chat-surface.d.ts.map +1 -1
- package/dist/interface/tui/chat-surface.js +3 -0
- package/dist/interface/tui/chat-surface.js.map +1 -1
- package/dist/interface/tui/dashboard.d.ts +37 -1
- package/dist/interface/tui/dashboard.d.ts.map +1 -1
- package/dist/interface/tui/dashboard.js +264 -1
- package/dist/interface/tui/dashboard.js.map +1 -1
- package/dist/interface/tui/entry-deps.d.ts +3 -1
- package/dist/interface/tui/entry-deps.d.ts.map +1 -1
- package/dist/interface/tui/entry-deps.js +19 -1
- package/dist/interface/tui/entry-deps.js.map +1 -1
- package/dist/interface/tui/entry.d.ts.map +1 -1
- package/dist/interface/tui/entry.js +4 -2
- package/dist/interface/tui/entry.js.map +1 -1
- package/dist/interface/tui/intent-recognizer.d.ts +8 -3
- package/dist/interface/tui/intent-recognizer.d.ts.map +1 -1
- package/dist/interface/tui/intent-recognizer.js +74 -68
- package/dist/interface/tui/intent-recognizer.js.map +1 -1
- package/dist/orchestrator/execution/agent-loop/agent-loop-default-profile.d.ts.map +1 -1
- package/dist/orchestrator/execution/agent-loop/agent-loop-default-profile.js +41 -0
- package/dist/orchestrator/execution/agent-loop/agent-loop-default-profile.js.map +1 -1
- package/dist/orchestrator/execution/agent-loop/chat-agent-loop-runner.d.ts +1 -1
- package/dist/orchestrator/execution/agent-loop/core-loop-control-tools.d.ts +1 -1
- package/dist/orchestrator/execution/agent-loop/core-loop-control-tools.d.ts.map +1 -1
- package/dist/orchestrator/execution/agent-loop/core-loop-control-tools.js +3 -2
- package/dist/orchestrator/execution/agent-loop/core-loop-control-tools.js.map +1 -1
- package/dist/orchestrator/execution/agent-loop/core-phase-runner.d.ts +1 -1
- package/dist/orchestrator/execution/agent-loop/core-phase-runner.d.ts.map +1 -1
- package/dist/orchestrator/execution/agent-loop/core-phase-runner.js +10 -1
- package/dist/orchestrator/execution/agent-loop/core-phase-runner.js.map +1 -1
- package/dist/orchestrator/execution/agent-loop/kaggle-training-benchmark.d.ts +2 -0
- package/dist/orchestrator/execution/agent-loop/kaggle-training-benchmark.d.ts.map +1 -1
- package/dist/orchestrator/execution/agent-loop/kaggle-training-benchmark.js +4 -0
- package/dist/orchestrator/execution/agent-loop/kaggle-training-benchmark.js.map +1 -1
- package/dist/orchestrator/execution/agent-loop/task-agent-loop-result.d.ts +8 -8
- package/dist/orchestrator/execution/task/task-generation.d.ts +3 -1
- package/dist/orchestrator/execution/task/task-generation.d.ts.map +1 -1
- package/dist/orchestrator/execution/task/task-generation.js +17 -2
- package/dist/orchestrator/execution/task/task-generation.js.map +1 -1
- package/dist/orchestrator/execution/task/task-lifecycle-runner.d.ts +5 -1
- package/dist/orchestrator/execution/task/task-lifecycle-runner.d.ts.map +1 -1
- package/dist/orchestrator/execution/task/task-lifecycle-runner.js +9 -5
- package/dist/orchestrator/execution/task/task-lifecycle-runner.js.map +1 -1
- package/dist/orchestrator/execution/task/task-lifecycle.d.ts +10 -1
- package/dist/orchestrator/execution/task/task-lifecycle.d.ts.map +1 -1
- package/dist/orchestrator/execution/task/task-lifecycle.js +108 -7
- package/dist/orchestrator/execution/task/task-lifecycle.js.map +1 -1
- package/dist/orchestrator/execution/task/task-prompt-builder.d.ts +2 -1
- package/dist/orchestrator/execution/task/task-prompt-builder.d.ts.map +1 -1
- package/dist/orchestrator/execution/task/task-prompt-builder.js +4 -2
- package/dist/orchestrator/execution/task/task-prompt-builder.js.map +1 -1
- package/dist/orchestrator/execution/types/pipeline.d.ts +6 -6
- package/dist/orchestrator/goal/types/goal.d.ts +282 -0
- package/dist/orchestrator/goal/types/goal.d.ts.map +1 -1
- package/dist/orchestrator/goal/types/goal.js +20 -0
- package/dist/orchestrator/goal/types/goal.js.map +1 -1
- package/dist/orchestrator/loop/core-loop/contracts.d.ts +46 -3
- package/dist/orchestrator/loop/core-loop/contracts.d.ts.map +1 -1
- package/dist/orchestrator/loop/core-loop/contracts.js.map +1 -1
- package/dist/orchestrator/loop/core-loop/decision-engine.d.ts.map +1 -1
- package/dist/orchestrator/loop/core-loop/decision-engine.js +4 -0
- package/dist/orchestrator/loop/core-loop/decision-engine.js.map +1 -1
- package/dist/orchestrator/loop/core-loop/dream-review-checkpoint.d.ts +48 -0
- package/dist/orchestrator/loop/core-loop/dream-review-checkpoint.d.ts.map +1 -0
- package/dist/orchestrator/loop/core-loop/dream-review-checkpoint.js +377 -0
- package/dist/orchestrator/loop/core-loop/dream-review-checkpoint.js.map +1 -0
- package/dist/orchestrator/loop/core-loop/evidence-ledger.js +1 -1
- package/dist/orchestrator/loop/core-loop/evidence-ledger.js.map +1 -1
- package/dist/orchestrator/loop/core-loop/iteration-kernel.d.ts +1 -0
- package/dist/orchestrator/loop/core-loop/iteration-kernel.d.ts.map +1 -1
- package/dist/orchestrator/loop/core-loop/iteration-kernel.js +492 -1
- package/dist/orchestrator/loop/core-loop/iteration-kernel.js.map +1 -1
- package/dist/orchestrator/loop/core-loop/phase-policy.d.ts.map +1 -1
- package/dist/orchestrator/loop/core-loop/phase-policy.js +35 -0
- package/dist/orchestrator/loop/core-loop/phase-policy.js.map +1 -1
- package/dist/orchestrator/loop/core-loop/phase-runtime.d.ts +2 -0
- package/dist/orchestrator/loop/core-loop/phase-runtime.d.ts.map +1 -1
- package/dist/orchestrator/loop/core-loop/phase-runtime.js +43 -2
- package/dist/orchestrator/loop/core-loop/phase-runtime.js.map +1 -1
- package/dist/orchestrator/loop/core-loop/phase-specs.d.ts +969 -2
- package/dist/orchestrator/loop/core-loop/phase-specs.d.ts.map +1 -1
- package/dist/orchestrator/loop/core-loop/phase-specs.js +198 -0
- package/dist/orchestrator/loop/core-loop/phase-specs.js.map +1 -1
- package/dist/orchestrator/loop/core-loop/public-research.d.ts +32 -0
- package/dist/orchestrator/loop/core-loop/public-research.d.ts.map +1 -0
- package/dist/orchestrator/loop/core-loop/public-research.js +112 -0
- package/dist/orchestrator/loop/core-loop/public-research.js.map +1 -0
- package/dist/orchestrator/loop/core-loop/task-cycle-stall.d.ts.map +1 -1
- package/dist/orchestrator/loop/core-loop/task-cycle-stall.js +141 -5
- package/dist/orchestrator/loop/core-loop/task-cycle-stall.js.map +1 -1
- package/dist/orchestrator/loop/core-loop/task-cycle.d.ts +4 -0
- package/dist/orchestrator/loop/core-loop/task-cycle.d.ts.map +1 -1
- package/dist/orchestrator/loop/core-loop/task-cycle.js +7 -0
- package/dist/orchestrator/loop/core-loop/task-cycle.js.map +1 -1
- package/dist/orchestrator/loop/core-loop.d.ts +15 -5
- package/dist/orchestrator/loop/core-loop.d.ts.map +1 -1
- package/dist/orchestrator/loop/core-loop.js +283 -17
- package/dist/orchestrator/loop/core-loop.js.map +1 -1
- package/dist/orchestrator/loop/loop-report-helper.d.ts.map +1 -1
- package/dist/orchestrator/loop/loop-report-helper.js +4 -0
- package/dist/orchestrator/loop/loop-report-helper.js.map +1 -1
- package/dist/orchestrator/loop/loop-result-types.d.ts +20 -1
- package/dist/orchestrator/loop/loop-result-types.d.ts.map +1 -1
- package/dist/orchestrator/loop/loop-result-types.js.map +1 -1
- package/dist/orchestrator/loop/post-loop-hooks.d.ts +1 -0
- package/dist/orchestrator/loop/post-loop-hooks.d.ts.map +1 -1
- package/dist/orchestrator/loop/post-loop-hooks.js +34 -1
- package/dist/orchestrator/loop/post-loop-hooks.js.map +1 -1
- package/dist/orchestrator/loop/run-policy.d.ts +10 -0
- package/dist/orchestrator/loop/run-policy.d.ts.map +1 -0
- package/dist/orchestrator/loop/run-policy.js +30 -0
- package/dist/orchestrator/loop/run-policy.js.map +1 -0
- package/dist/orchestrator/strategy/divergent-exploration.d.ts +37 -0
- package/dist/orchestrator/strategy/divergent-exploration.d.ts.map +1 -0
- package/dist/orchestrator/strategy/divergent-exploration.js +324 -0
- package/dist/orchestrator/strategy/divergent-exploration.js.map +1 -0
- package/dist/orchestrator/strategy/strategy-helpers.d.ts +108 -0
- package/dist/orchestrator/strategy/strategy-helpers.d.ts.map +1 -1
- package/dist/orchestrator/strategy/strategy-helpers.js +34 -2
- package/dist/orchestrator/strategy/strategy-helpers.js.map +1 -1
- package/dist/orchestrator/strategy/strategy-manager-base.d.ts +20 -1
- package/dist/orchestrator/strategy/strategy-manager-base.d.ts.map +1 -1
- package/dist/orchestrator/strategy/strategy-manager-base.js +71 -6
- package/dist/orchestrator/strategy/strategy-manager-base.js.map +1 -1
- package/dist/orchestrator/strategy/types/cross-portfolio.d.ts +2 -2
- package/dist/orchestrator/strategy/types/strategy.d.ts +364 -0
- package/dist/orchestrator/strategy/types/strategy.d.ts.map +1 -1
- package/dist/orchestrator/strategy/types/strategy.js +43 -0
- package/dist/orchestrator/strategy/types/strategy.js.map +1 -1
- package/dist/platform/dream/dream-activation.d.ts +1 -1
- package/dist/platform/dream/dream-event-workflows.d.ts +6 -6
- package/dist/platform/dream/dream-types.d.ts +91 -91
- package/dist/platform/drive/metric-history.d.ts +61 -0
- package/dist/platform/drive/metric-history.d.ts.map +1 -0
- package/dist/platform/drive/metric-history.js +206 -0
- package/dist/platform/drive/metric-history.js.map +1 -0
- package/dist/platform/drive/progress-predictor.d.ts +7 -0
- package/dist/platform/drive/progress-predictor.d.ts.map +1 -1
- package/dist/platform/drive/progress-predictor.js +23 -0
- package/dist/platform/drive/progress-predictor.js.map +1 -1
- package/dist/platform/drive/stall-detector.d.ts +3 -1
- package/dist/platform/drive/stall-detector.d.ts.map +1 -1
- package/dist/platform/drive/stall-detector.js +40 -1
- package/dist/platform/drive/stall-detector.js.map +1 -1
- package/dist/platform/drive/types/satisficing.d.ts +2 -2
- package/dist/platform/drive/types/stall.d.ts +4 -0
- package/dist/platform/drive/types/stall.d.ts.map +1 -1
- package/dist/platform/drive/types/stall.js +1 -0
- package/dist/platform/drive/types/stall.js.map +1 -1
- package/dist/platform/knowledge/types/learning.d.ts +2 -2
- package/dist/platform/observation/data-source-adapter.d.ts +1 -0
- package/dist/platform/observation/data-source-adapter.d.ts.map +1 -1
- package/dist/platform/observation/data-source-adapter.js.map +1 -1
- package/dist/platform/observation/observation-datasource.d.ts.map +1 -1
- package/dist/platform/observation/observation-datasource.js +2 -0
- package/dist/platform/observation/observation-datasource.js.map +1 -1
- package/dist/platform/observation/types/data-source.d.ts +153 -9
- package/dist/platform/observation/types/data-source.d.ts.map +1 -1
- package/dist/platform/observation/types/data-source.js +13 -1
- package/dist/platform/observation/types/data-source.js.map +1 -1
- package/dist/platform/soil/contracts.d.ts +65 -65
- package/dist/platform/soil/importer.d.ts +6 -6
- package/dist/platform/soil/types.d.ts +8 -8
- package/dist/platform/time/deadline-finalization.d.ts +57 -0
- package/dist/platform/time/deadline-finalization.d.ts.map +1 -0
- package/dist/platform/time/deadline-finalization.js +136 -0
- package/dist/platform/time/deadline-finalization.js.map +1 -0
- package/dist/platform/time/execution-mode.d.ts +29 -0
- package/dist/platform/time/execution-mode.d.ts.map +1 -0
- package/dist/platform/time/execution-mode.js +84 -0
- package/dist/platform/time/execution-mode.js.map +1 -0
- package/dist/platform/traits/types/curiosity.d.ts +9 -9
- package/dist/platform/traits/types/guardrail.d.ts +6 -6
- package/dist/reporting/report-formatters.d.ts.map +1 -1
- package/dist/reporting/report-formatters.js +67 -2
- package/dist/reporting/report-formatters.js.map +1 -1
- package/dist/reporting/reporting-engine.d.ts.map +1 -1
- package/dist/reporting/reporting-engine.js +3 -1
- package/dist/reporting/reporting-engine.js.map +1 -1
- package/dist/reporting/reporting-types.d.ts +4 -0
- package/dist/reporting/reporting-types.d.ts.map +1 -1
- package/dist/reporting/types/report.d.ts +59 -0
- package/dist/reporting/types/report.d.ts.map +1 -1
- package/dist/reporting/types/report.js +9 -0
- package/dist/reporting/types/report.js.map +1 -1
- package/dist/runtime/command-dispatcher.d.ts +2 -0
- package/dist/runtime/command-dispatcher.d.ts.map +1 -1
- package/dist/runtime/command-dispatcher.js +16 -0
- package/dist/runtime/command-dispatcher.js.map +1 -1
- package/dist/runtime/confirmation-decision.d.ts +94 -0
- package/dist/runtime/confirmation-decision.d.ts.map +1 -0
- package/dist/runtime/confirmation-decision.js +109 -0
- package/dist/runtime/confirmation-decision.js.map +1 -0
- package/dist/runtime/control/daemon-runtime-control-executor.d.ts.map +1 -1
- package/dist/runtime/control/daemon-runtime-control-executor.js +31 -1
- package/dist/runtime/control/daemon-runtime-control-executor.js.map +1 -1
- package/dist/runtime/control/runtime-control-intent.d.ts +9 -1
- package/dist/runtime/control/runtime-control-intent.d.ts.map +1 -1
- package/dist/runtime/control/runtime-control-intent.js +82 -16
- package/dist/runtime/control/runtime-control-intent.js.map +1 -1
- package/dist/runtime/control/runtime-control-service.d.ts +35 -1
- package/dist/runtime/control/runtime-control-service.d.ts.map +1 -1
- package/dist/runtime/control/runtime-control-service.js +285 -5
- package/dist/runtime/control/runtime-control-service.js.map +1 -1
- package/dist/runtime/daemon/client.d.ts +12 -0
- package/dist/runtime/daemon/client.d.ts.map +1 -1
- package/dist/runtime/daemon/client.js +9 -0
- package/dist/runtime/daemon/client.js.map +1 -1
- package/dist/runtime/daemon/runner-commands.d.ts +6 -2
- package/dist/runtime/daemon/runner-commands.d.ts.map +1 -1
- package/dist/runtime/daemon/runner-commands.js +237 -1
- package/dist/runtime/daemon/runner-commands.js.map +1 -1
- package/dist/runtime/daemon/runner-goal-cycle.d.ts.map +1 -1
- package/dist/runtime/daemon/runner-goal-cycle.js +59 -1
- package/dist/runtime/daemon/runner-goal-cycle.js.map +1 -1
- package/dist/runtime/daemon/runner-startup.d.ts.map +1 -1
- package/dist/runtime/daemon/runner-startup.js +12 -2
- package/dist/runtime/daemon/runner-startup.js.map +1 -1
- package/dist/runtime/daemon/runner.d.ts +4 -0
- package/dist/runtime/daemon/runner.d.ts.map +1 -1
- package/dist/runtime/daemon/runner.js +14 -1
- package/dist/runtime/daemon/runner.js.map +1 -1
- package/dist/runtime/daemon/runtime-ownership.d.ts +9 -0
- package/dist/runtime/daemon/runtime-ownership.d.ts.map +1 -1
- package/dist/runtime/daemon/runtime-ownership.js +248 -1
- package/dist/runtime/daemon/runtime-ownership.js.map +1 -1
- package/dist/runtime/dream-sidecar-review.d.ts +92 -0
- package/dist/runtime/dream-sidecar-review.d.ts.map +1 -0
- package/dist/runtime/dream-sidecar-review.js +495 -0
- package/dist/runtime/dream-sidecar-review.js.map +1 -0
- package/dist/runtime/event/server-command-handler.d.ts +2 -4
- package/dist/runtime/event/server-command-handler.d.ts.map +1 -1
- package/dist/runtime/event/server-command-handler.js +36 -6
- package/dist/runtime/event/server-command-handler.js.map +1 -1
- package/dist/runtime/event/server-snapshot-reader.d.ts +15 -1
- package/dist/runtime/event/server-snapshot-reader.d.ts.map +1 -1
- package/dist/runtime/event/server-snapshot-reader.js +66 -2
- package/dist/runtime/event/server-snapshot-reader.js.map +1 -1
- package/dist/runtime/event/server-types.d.ts +7 -0
- package/dist/runtime/event/server-types.d.ts.map +1 -1
- package/dist/runtime/event/server.d.ts +5 -0
- package/dist/runtime/event/server.d.ts.map +1 -1
- package/dist/runtime/event/server.js +43 -11
- package/dist/runtime/event/server.js.map +1 -1
- package/dist/runtime/evidence-answer.d.ts +41 -0
- package/dist/runtime/evidence-answer.d.ts.map +1 -0
- package/dist/runtime/evidence-answer.js +366 -0
- package/dist/runtime/evidence-answer.js.map +1 -0
- package/dist/runtime/executor/goal-worker.d.ts +4 -1
- package/dist/runtime/executor/goal-worker.d.ts.map +1 -1
- package/dist/runtime/executor/goal-worker.js +5 -1
- package/dist/runtime/executor/goal-worker.js.map +1 -1
- package/dist/runtime/executor/loop-supervisor.d.ts +4 -0
- package/dist/runtime/executor/loop-supervisor.d.ts.map +1 -1
- package/dist/runtime/executor/loop-supervisor.js +35 -6
- package/dist/runtime/executor/loop-supervisor.js.map +1 -1
- package/dist/runtime/guardrails/backpressure-controller.d.ts +32 -0
- package/dist/runtime/guardrails/backpressure-controller.d.ts.map +1 -0
- package/dist/runtime/guardrails/backpressure-controller.js +88 -0
- package/dist/runtime/guardrails/backpressure-controller.js.map +1 -0
- package/dist/runtime/guardrails/circuit-breaker.d.ts +32 -0
- package/dist/runtime/guardrails/circuit-breaker.d.ts.map +1 -0
- package/dist/runtime/guardrails/circuit-breaker.js +88 -0
- package/dist/runtime/guardrails/circuit-breaker.js.map +1 -0
- package/dist/runtime/guardrails/guardrail-store.d.ts +23 -0
- package/dist/runtime/guardrails/guardrail-store.d.ts.map +1 -0
- package/dist/runtime/guardrails/guardrail-store.js +95 -0
- package/dist/runtime/guardrails/guardrail-store.js.map +1 -0
- package/dist/runtime/guardrails/index.d.ts +4 -0
- package/dist/runtime/guardrails/index.d.ts.map +1 -0
- package/dist/runtime/guardrails/index.js +4 -0
- package/dist/runtime/guardrails/index.js.map +1 -0
- package/dist/runtime/interactive-automation/browser-session-store.d.ts +43 -0
- package/dist/runtime/interactive-automation/browser-session-store.d.ts.map +1 -0
- package/dist/runtime/interactive-automation/browser-session-store.js +104 -0
- package/dist/runtime/interactive-automation/browser-session-store.js.map +1 -0
- package/dist/runtime/interactive-automation/failure-classifier.d.ts +12 -0
- package/dist/runtime/interactive-automation/failure-classifier.d.ts.map +1 -0
- package/dist/runtime/interactive-automation/failure-classifier.js +50 -0
- package/dist/runtime/interactive-automation/failure-classifier.js.map +1 -0
- package/dist/runtime/interactive-automation/index.d.ts +2 -0
- package/dist/runtime/interactive-automation/index.d.ts.map +1 -1
- package/dist/runtime/interactive-automation/index.js +2 -0
- package/dist/runtime/interactive-automation/index.js.map +1 -1
- package/dist/runtime/interactive-automation/providers/manus-browser.d.ts.map +1 -1
- package/dist/runtime/interactive-automation/providers/manus-browser.js +17 -1
- package/dist/runtime/interactive-automation/providers/manus-browser.js.map +1 -1
- package/dist/runtime/interactive-automation/types.d.ts +4 -0
- package/dist/runtime/interactive-automation/types.d.ts.map +1 -1
- package/dist/runtime/interactive-automation/types.js.map +1 -1
- package/dist/runtime/notification-routing.d.ts +45 -2
- package/dist/runtime/notification-routing.d.ts.map +1 -1
- package/dist/runtime/notification-routing.js +196 -79
- package/dist/runtime/notification-routing.js.map +1 -1
- package/dist/runtime/run-spec/confirmation.d.ts +34 -0
- package/dist/runtime/run-spec/confirmation.d.ts.map +1 -0
- package/dist/runtime/run-spec/confirmation.js +176 -0
- package/dist/runtime/run-spec/confirmation.js.map +1 -0
- package/dist/runtime/run-spec/derive.d.ts +284 -0
- package/dist/runtime/run-spec/derive.d.ts.map +1 -0
- package/dist/runtime/run-spec/derive.js +379 -0
- package/dist/runtime/run-spec/derive.js.map +1 -0
- package/dist/runtime/run-spec/index.d.ts +5 -0
- package/dist/runtime/run-spec/index.d.ts.map +1 -0
- package/dist/runtime/run-spec/index.js +5 -0
- package/dist/runtime/run-spec/index.js.map +1 -0
- package/dist/runtime/run-spec/store.d.ts +11 -0
- package/dist/runtime/run-spec/store.d.ts.map +1 -0
- package/dist/runtime/run-spec/store.js +36 -0
- package/dist/runtime/run-spec/store.js.map +1 -0
- package/dist/runtime/run-spec/types.d.ts +495 -0
- package/dist/runtime/run-spec/types.d.ts.map +1 -0
- package/dist/runtime/run-spec/types.js +87 -0
- package/dist/runtime/run-spec/types.js.map +1 -0
- package/dist/runtime/schedule/engine-execution.d.ts +2 -1
- package/dist/runtime/schedule/engine-execution.d.ts.map +1 -1
- package/dist/runtime/schedule/engine-execution.js +1 -1
- package/dist/runtime/schedule/engine-execution.js.map +1 -1
- package/dist/runtime/schedule/engine-layers.d.ts +2 -1
- package/dist/runtime/schedule/engine-layers.d.ts.map +1 -1
- package/dist/runtime/schedule/engine-layers.js +3 -1
- package/dist/runtime/schedule/engine-layers.js.map +1 -1
- package/dist/runtime/schedule/engine.d.ts +2 -1
- package/dist/runtime/schedule/engine.d.ts.map +1 -1
- package/dist/runtime/schedule/engine.js.map +1 -1
- package/dist/runtime/schedule/history.d.ts +4 -4
- package/dist/runtime/session-registry/registry.d.ts.map +1 -1
- package/dist/runtime/session-registry/registry.js +2 -0
- package/dist/runtime/session-registry/registry.js.map +1 -1
- package/dist/runtime/session-registry/types.d.ts +102 -94
- package/dist/runtime/session-registry/types.d.ts.map +1 -1
- package/dist/runtime/session-registry/types.js +2 -0
- package/dist/runtime/session-registry/types.js.map +1 -1
- package/dist/runtime/store/artifact-retention.d.ts +44 -0
- package/dist/runtime/store/artifact-retention.d.ts.map +1 -0
- package/dist/runtime/store/artifact-retention.js +263 -0
- package/dist/runtime/store/artifact-retention.js.map +1 -0
- package/dist/runtime/store/background-run-store.d.ts +1 -0
- package/dist/runtime/store/background-run-store.d.ts.map +1 -1
- package/dist/runtime/store/background-run-store.js +1 -0
- package/dist/runtime/store/background-run-store.js.map +1 -1
- package/dist/runtime/store/budget-store.d.ts +442 -0
- package/dist/runtime/store/budget-store.d.ts.map +1 -0
- package/dist/runtime/store/budget-store.js +318 -0
- package/dist/runtime/store/budget-store.js.map +1 -0
- package/dist/runtime/store/dream-checkpoints.d.ts +9 -0
- package/dist/runtime/store/dream-checkpoints.d.ts.map +1 -0
- package/dist/runtime/store/dream-checkpoints.js +16 -0
- package/dist/runtime/store/dream-checkpoints.js.map +1 -0
- package/dist/runtime/store/evaluator-results.d.ts +97 -0
- package/dist/runtime/store/evaluator-results.d.ts.map +1 -0
- package/dist/runtime/store/evaluator-results.js +355 -0
- package/dist/runtime/store/evaluator-results.js.map +1 -0
- package/dist/runtime/store/evidence-ledger.d.ts +5298 -0
- package/dist/runtime/store/evidence-ledger.d.ts.map +1 -0
- package/dist/runtime/store/evidence-ledger.js +1452 -0
- package/dist/runtime/store/evidence-ledger.js.map +1 -0
- package/dist/runtime/store/experiment-queue-store.d.ts +1164 -0
- package/dist/runtime/store/experiment-queue-store.d.ts.map +1 -0
- package/dist/runtime/store/experiment-queue-store.js +341 -0
- package/dist/runtime/store/experiment-queue-store.js.map +1 -0
- package/dist/runtime/store/health-store.d.ts.map +1 -1
- package/dist/runtime/store/health-store.js +6 -0
- package/dist/runtime/store/health-store.js.map +1 -1
- package/dist/runtime/store/index.d.ts +25 -2
- package/dist/runtime/store/index.d.ts.map +1 -1
- package/dist/runtime/store/index.js +13 -1
- package/dist/runtime/store/index.js.map +1 -1
- package/dist/runtime/store/metric-history.d.ts +10 -0
- package/dist/runtime/store/metric-history.d.ts.map +1 -0
- package/dist/runtime/store/metric-history.js +56 -0
- package/dist/runtime/store/metric-history.js.map +1 -0
- package/dist/runtime/store/operator-handoff-store.d.ts +179 -0
- package/dist/runtime/store/operator-handoff-store.d.ts.map +1 -0
- package/dist/runtime/store/operator-handoff-store.js +120 -0
- package/dist/runtime/store/operator-handoff-store.js.map +1 -0
- package/dist/runtime/store/postmortem-report.d.ts +485 -0
- package/dist/runtime/store/postmortem-report.d.ts.map +1 -0
- package/dist/runtime/store/postmortem-report.js +561 -0
- package/dist/runtime/store/postmortem-report.js.map +1 -0
- package/dist/runtime/store/reproducibility-manifest.d.ts +565 -0
- package/dist/runtime/store/reproducibility-manifest.d.ts.map +1 -0
- package/dist/runtime/store/reproducibility-manifest.js +392 -0
- package/dist/runtime/store/reproducibility-manifest.js.map +1 -0
- package/dist/runtime/store/research-evidence.d.ts +8 -0
- package/dist/runtime/store/research-evidence.d.ts.map +1 -0
- package/dist/runtime/store/research-evidence.js +15 -0
- package/dist/runtime/store/research-evidence.js.map +1 -0
- package/dist/runtime/store/runtime-operation-schemas.d.ts +70 -24
- package/dist/runtime/store/runtime-operation-schemas.d.ts.map +1 -1
- package/dist/runtime/store/runtime-operation-schemas.js +16 -1
- package/dist/runtime/store/runtime-operation-schemas.js.map +1 -1
- package/dist/runtime/store/runtime-paths.d.ts +25 -0
- package/dist/runtime/store/runtime-paths.d.ts.map +1 -1
- package/dist/runtime/store/runtime-paths.js +73 -0
- package/dist/runtime/store/runtime-paths.js.map +1 -1
- package/dist/runtime/store/runtime-schemas.d.ts +1936 -17
- package/dist/runtime/store/runtime-schemas.d.ts.map +1 -1
- package/dist/runtime/store/runtime-schemas.js +201 -0
- package/dist/runtime/store/runtime-schemas.js.map +1 -1
- package/dist/runtime/store/safe-pause-store.d.ts +28 -0
- package/dist/runtime/store/safe-pause-store.d.ts.map +1 -0
- package/dist/runtime/store/safe-pause-store.js +103 -0
- package/dist/runtime/store/safe-pause-store.js.map +1 -0
- package/dist/runtime/types/daemon.d.ts +224 -14
- package/dist/runtime/types/daemon.d.ts.map +1 -1
- package/dist/runtime/types/daemon.js +27 -2
- package/dist/runtime/types/daemon.js.map +1 -1
- package/dist/runtime/types/envelope.d.ts +10 -10
- package/dist/runtime/types/hook.d.ts +9 -9
- package/dist/runtime/types/notification.d.ts +6 -6
- package/dist/runtime/types/plugin.d.ts +2 -2
- package/dist/runtime/types/schedule.d.ts +97 -54
- package/dist/runtime/types/schedule.d.ts.map +1 -1
- package/dist/runtime/types/schedule.js +10 -1
- package/dist/runtime/types/schedule.js.map +1 -1
- package/dist/runtime/types/trigger.d.ts +2 -2
- package/dist/tools/automation/InteractiveAutomationTools.d.ts +10 -0
- package/dist/tools/automation/InteractiveAutomationTools.d.ts.map +1 -1
- package/dist/tools/automation/InteractiveAutomationTools.js +139 -8
- package/dist/tools/automation/InteractiveAutomationTools.js.map +1 -1
- package/dist/tools/builtin/exports.d.ts +1 -1
- package/dist/tools/builtin/exports.d.ts.map +1 -1
- package/dist/tools/builtin/exports.js +1 -1
- package/dist/tools/builtin/exports.js.map +1 -1
- package/dist/tools/builtin/factory.d.ts +5 -0
- package/dist/tools/builtin/factory.d.ts.map +1 -1
- package/dist/tools/builtin/factory.js +18 -2
- package/dist/tools/builtin/factory.js.map +1 -1
- package/dist/tools/kaggle/KaggleExperimentTools.d.ts +792 -8
- package/dist/tools/kaggle/KaggleExperimentTools.d.ts.map +1 -1
- package/dist/tools/kaggle/KaggleExperimentTools.js +284 -19
- package/dist/tools/kaggle/KaggleExperimentTools.js.map +1 -1
- package/dist/tools/kaggle/KaggleSubmissionTools.d.ts +18 -12
- package/dist/tools/kaggle/KaggleSubmissionTools.d.ts.map +1 -1
- package/dist/tools/kaggle/KaggleSubmissionTools.js +23 -4
- package/dist/tools/kaggle/KaggleSubmissionTools.js.map +1 -1
- package/dist/tools/kaggle/KaggleWorkspacePrepareTool.d.ts +28 -9
- package/dist/tools/kaggle/KaggleWorkspacePrepareTool.d.ts.map +1 -1
- package/dist/tools/kaggle/KaggleWorkspacePrepareTool.js +182 -4
- package/dist/tools/kaggle/KaggleWorkspacePrepareTool.js.map +1 -1
- package/dist/tools/kaggle/index.d.ts +1 -1
- package/dist/tools/kaggle/index.d.ts.map +1 -1
- package/dist/tools/kaggle/index.js +1 -1
- package/dist/tools/kaggle/index.js.map +1 -1
- package/dist/tools/kaggle/metrics.d.ts +845 -4
- package/dist/tools/kaggle/metrics.d.ts.map +1 -1
- package/dist/tools/kaggle/metrics.js +410 -1
- package/dist/tools/kaggle/metrics.js.map +1 -1
- package/dist/tools/mutation/ConfigureNotificationRoutingTool/ConfigureNotificationRoutingTool.d.ts +6 -0
- package/dist/tools/mutation/ConfigureNotificationRoutingTool/ConfigureNotificationRoutingTool.d.ts.map +1 -1
- package/dist/tools/mutation/ConfigureNotificationRoutingTool/ConfigureNotificationRoutingTool.js +9 -2
- package/dist/tools/mutation/ConfigureNotificationRoutingTool/ConfigureNotificationRoutingTool.js.map +1 -1
- package/dist/tools/mutation/TaskCreateTool/TaskCreateTool.d.ts +4 -4
- package/dist/tools/network/McpStdioTool/McpStdioTool.d.ts +4 -4
- package/dist/tools/query/MemoryRecallTool/MemoryRecallTool.d.ts +2 -2
- package/dist/tools/query/runtime-dream-review-tool.d.ts +34 -0
- package/dist/tools/query/runtime-dream-review-tool.d.ts.map +1 -0
- package/dist/tools/query/runtime-dream-review-tool.js +62 -0
- package/dist/tools/query/runtime-dream-review-tool.js.map +1 -0
- package/dist/tools/query/runtime-session-tools.d.ts.map +1 -1
- package/dist/tools/query/runtime-session-tools.js +2 -0
- package/dist/tools/query/runtime-session-tools.js.map +1 -1
- package/dist/tools/runtime/LongRunningRuntimeTools.d.ts +103 -103
- package/dist/tools/runtime/LongRunningRuntimeTools.d.ts.map +1 -1
- package/dist/tools/runtime/LongRunningRuntimeTools.js +60 -0
- package/dist/tools/runtime/LongRunningRuntimeTools.js.map +1 -1
- package/dist/tools/schedule/CreateScheduleTool/CreateScheduleTool.d.ts +62 -32
- package/dist/tools/schedule/CreateScheduleTool/CreateScheduleTool.d.ts.map +1 -1
- package/dist/tools/schedule/UpdateScheduleTool/UpdateScheduleTool.d.ts +78 -44
- package/dist/tools/schedule/UpdateScheduleTool/UpdateScheduleTool.d.ts.map +1 -1
- package/dist/tools/system/TestRunnerTool/TestRunnerTool.d.ts +4 -4
- package/package.json +2 -1
|
@@ -26,7 +26,7 @@ export declare const SoilSourceRefSchema: z.ZodObject<{
|
|
|
26
26
|
committed_at: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, unknown>>;
|
|
27
27
|
reliability: z.ZodOptional<z.ZodEnum<["high", "medium", "low"]>>;
|
|
28
28
|
}, "strip", z.ZodTypeAny, {
|
|
29
|
-
source_type: "web" | "runtime_json" | "controlled_md" | "soil_md" | "manual_overlay" | "tool_output"
|
|
29
|
+
source_type: "web" | "log" | "runtime_json" | "controlled_md" | "soil_md" | "manual_overlay" | "tool_output";
|
|
30
30
|
source_path: string;
|
|
31
31
|
reliability?: "low" | "high" | "medium" | undefined;
|
|
32
32
|
source_id?: string | undefined;
|
|
@@ -36,7 +36,7 @@ export declare const SoilSourceRefSchema: z.ZodObject<{
|
|
|
36
36
|
fetched_at?: string | undefined;
|
|
37
37
|
committed_at?: string | undefined;
|
|
38
38
|
}, {
|
|
39
|
-
source_type: "web" | "runtime_json" | "controlled_md" | "soil_md" | "manual_overlay" | "tool_output"
|
|
39
|
+
source_type: "web" | "log" | "runtime_json" | "controlled_md" | "soil_md" | "manual_overlay" | "tool_output";
|
|
40
40
|
source_path: string;
|
|
41
41
|
reliability?: "low" | "high" | "medium" | undefined;
|
|
42
42
|
source_id?: string | undefined;
|
|
@@ -138,7 +138,7 @@ export declare const SoilPageFrontmatterSchema: z.ZodObject<{
|
|
|
138
138
|
committed_at: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, unknown>>;
|
|
139
139
|
reliability: z.ZodOptional<z.ZodEnum<["high", "medium", "low"]>>;
|
|
140
140
|
}, "strip", z.ZodTypeAny, {
|
|
141
|
-
source_type: "web" | "runtime_json" | "controlled_md" | "soil_md" | "manual_overlay" | "tool_output"
|
|
141
|
+
source_type: "web" | "log" | "runtime_json" | "controlled_md" | "soil_md" | "manual_overlay" | "tool_output";
|
|
142
142
|
source_path: string;
|
|
143
143
|
reliability?: "low" | "high" | "medium" | undefined;
|
|
144
144
|
source_id?: string | undefined;
|
|
@@ -148,7 +148,7 @@ export declare const SoilPageFrontmatterSchema: z.ZodObject<{
|
|
|
148
148
|
fetched_at?: string | undefined;
|
|
149
149
|
committed_at?: string | undefined;
|
|
150
150
|
}, {
|
|
151
|
-
source_type: "web" | "runtime_json" | "controlled_md" | "soil_md" | "manual_overlay" | "tool_output"
|
|
151
|
+
source_type: "web" | "log" | "runtime_json" | "controlled_md" | "soil_md" | "manual_overlay" | "tool_output";
|
|
152
152
|
source_path: string;
|
|
153
153
|
reliability?: "low" | "high" | "medium" | undefined;
|
|
154
154
|
source_id?: string | undefined;
|
|
@@ -266,7 +266,7 @@ export declare const SoilPageFrontmatterSchema: z.ZodObject<{
|
|
|
266
266
|
committed_at: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, unknown>>;
|
|
267
267
|
reliability: z.ZodOptional<z.ZodEnum<["high", "medium", "low"]>>;
|
|
268
268
|
}, "strip", z.ZodTypeAny, {
|
|
269
|
-
source_type: "web" | "runtime_json" | "controlled_md" | "soil_md" | "manual_overlay" | "tool_output"
|
|
269
|
+
source_type: "web" | "log" | "runtime_json" | "controlled_md" | "soil_md" | "manual_overlay" | "tool_output";
|
|
270
270
|
source_path: string;
|
|
271
271
|
reliability?: "low" | "high" | "medium" | undefined;
|
|
272
272
|
source_id?: string | undefined;
|
|
@@ -276,7 +276,7 @@ export declare const SoilPageFrontmatterSchema: z.ZodObject<{
|
|
|
276
276
|
fetched_at?: string | undefined;
|
|
277
277
|
committed_at?: string | undefined;
|
|
278
278
|
}, {
|
|
279
|
-
source_type: "web" | "runtime_json" | "controlled_md" | "soil_md" | "manual_overlay" | "tool_output"
|
|
279
|
+
source_type: "web" | "log" | "runtime_json" | "controlled_md" | "soil_md" | "manual_overlay" | "tool_output";
|
|
280
280
|
source_path: string;
|
|
281
281
|
reliability?: "low" | "high" | "medium" | undefined;
|
|
282
282
|
source_id?: string | undefined;
|
|
@@ -394,7 +394,7 @@ export declare const SoilPageFrontmatterSchema: z.ZodObject<{
|
|
|
394
394
|
committed_at: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, unknown>>;
|
|
395
395
|
reliability: z.ZodOptional<z.ZodEnum<["high", "medium", "low"]>>;
|
|
396
396
|
}, "strip", z.ZodTypeAny, {
|
|
397
|
-
source_type: "web" | "runtime_json" | "controlled_md" | "soil_md" | "manual_overlay" | "tool_output"
|
|
397
|
+
source_type: "web" | "log" | "runtime_json" | "controlled_md" | "soil_md" | "manual_overlay" | "tool_output";
|
|
398
398
|
source_path: string;
|
|
399
399
|
reliability?: "low" | "high" | "medium" | undefined;
|
|
400
400
|
source_id?: string | undefined;
|
|
@@ -404,7 +404,7 @@ export declare const SoilPageFrontmatterSchema: z.ZodObject<{
|
|
|
404
404
|
fetched_at?: string | undefined;
|
|
405
405
|
committed_at?: string | undefined;
|
|
406
406
|
}, {
|
|
407
|
-
source_type: "web" | "runtime_json" | "controlled_md" | "soil_md" | "manual_overlay" | "tool_output"
|
|
407
|
+
source_type: "web" | "log" | "runtime_json" | "controlled_md" | "soil_md" | "manual_overlay" | "tool_output";
|
|
408
408
|
source_path: string;
|
|
409
409
|
reliability?: "low" | "high" | "medium" | undefined;
|
|
410
410
|
source_id?: string | undefined;
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import type { Goal, GoalFinalizationPolicy } from "../../base/types/goal.js";
|
|
2
|
+
export type DeadlineFinalizationMode = "no_deadline" | "exploration" | "consolidation" | "finalization" | "missed_deadline";
|
|
3
|
+
export interface DeadlineFinalizationArtifact {
|
|
4
|
+
id?: string;
|
|
5
|
+
label: string;
|
|
6
|
+
kind?: string;
|
|
7
|
+
summary?: string;
|
|
8
|
+
path?: string;
|
|
9
|
+
state_relative_path?: string;
|
|
10
|
+
url?: string;
|
|
11
|
+
occurred_at?: string;
|
|
12
|
+
source: "runtime_evidence_ledger" | "policy" | "none";
|
|
13
|
+
}
|
|
14
|
+
export interface DeadlineFinalizationAction {
|
|
15
|
+
id: string;
|
|
16
|
+
label: string;
|
|
17
|
+
tool_name?: string;
|
|
18
|
+
payload_ref?: string;
|
|
19
|
+
approval_required: true;
|
|
20
|
+
}
|
|
21
|
+
export interface DeadlineFinalizationPlan {
|
|
22
|
+
deliverable_contract: string | null;
|
|
23
|
+
best_artifact_selection: GoalFinalizationPolicy["best_artifact_selection"];
|
|
24
|
+
best_artifact: DeadlineFinalizationArtifact | null;
|
|
25
|
+
reproducibility_manifest: DeadlineReproducibilityManifestPreflight;
|
|
26
|
+
verification_steps: string[];
|
|
27
|
+
approval_required_actions: DeadlineFinalizationAction[];
|
|
28
|
+
handoff_required: boolean;
|
|
29
|
+
}
|
|
30
|
+
export interface DeadlineReproducibilityManifestPreflight {
|
|
31
|
+
required: boolean;
|
|
32
|
+
status: "not_required" | "required_missing" | "ready";
|
|
33
|
+
manifest_id?: string;
|
|
34
|
+
reason: string;
|
|
35
|
+
}
|
|
36
|
+
export interface DeadlineFinalizationStatus {
|
|
37
|
+
mode: DeadlineFinalizationMode;
|
|
38
|
+
deadline: string | null;
|
|
39
|
+
evaluated_at: string;
|
|
40
|
+
remaining_ms: number | null;
|
|
41
|
+
reserved_finalization_ms: number;
|
|
42
|
+
remaining_exploration_ms: number | null;
|
|
43
|
+
consolidation_buffer_ms: number;
|
|
44
|
+
finalization_plan: DeadlineFinalizationPlan | null;
|
|
45
|
+
reason: string;
|
|
46
|
+
}
|
|
47
|
+
export interface BuildDeadlineFinalizationStatusInput {
|
|
48
|
+
goal: Goal;
|
|
49
|
+
now?: Date;
|
|
50
|
+
bestArtifact?: DeadlineFinalizationArtifact | null;
|
|
51
|
+
reproducibilityManifestId?: string | null;
|
|
52
|
+
}
|
|
53
|
+
export declare const DEFAULT_FINALIZATION_POLICY: GoalFinalizationPolicy;
|
|
54
|
+
export declare function normalizeFinalizationPolicy(policy: Goal["finalization_policy"] | null | undefined): GoalFinalizationPolicy;
|
|
55
|
+
export declare function buildDeadlineFinalizationStatus(input: BuildDeadlineFinalizationStatusInput): DeadlineFinalizationStatus;
|
|
56
|
+
export declare function shouldStopExplorationForFinalization(status: DeadlineFinalizationStatus): boolean;
|
|
57
|
+
//# sourceMappingURL=deadline-finalization.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"deadline-finalization.d.ts","sourceRoot":"","sources":["../../../src/platform/time/deadline-finalization.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,IAAI,EAEJ,sBAAsB,EACvB,MAAM,0BAA0B,CAAC;AAElC,MAAM,MAAM,wBAAwB,GAChC,aAAa,GACb,aAAa,GACb,eAAe,GACf,cAAc,GACd,iBA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Y,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,wBAAwB,EAAE,MAAM,CAAC;IACjC,wBAAwB,EAAE,MAAM,GAAG,IAAI,CAAC;IACxC,uBAAuB,EAAE,MAAM,CAAC;IAChC,iBAAiB,EAAE,wBAAwB,GAAG,IAAI,CAAC;IACnD,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,oCAAoC;IACnD,IAAI,EAAE,IAAI,CAAC;IACX,GAAG,CAAC,EAAE,IAAI,CAAC;IACX,YAAY,CAAC,EAAE,4BAA4B,GAAG,IAAI,CAAC;IACnD,yBAAyB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC3C;AAED,eAAO,MAAM,2BAA2B,EAAE,sBAOzC,CAAC;AAEF,wBAAgB,2BAA2B,CACzC,MAAM,EAAE,IAAI,CAAC,qBAAqB,CAAC,GAAG,IAAI,GAAG,SAAS,GACrD,sBAAsB,CAOxB;AAED,wBAAgB,+BAA+B,CAC7C,KAAK,EAAE,oCAAoC,GAC1C,0BAA0B,CAkD5B;AAED,wBAAgB,oCAAoC,CAAC,MAAM,EAAE,0BAA0B,GAAG,OAAO,CAEhG"}
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
export const DEFAULT_FINALIZATION_POLICY = {
|
|
2
|
+
minimum_buffer_ms: 30 * 60 * 1000,
|
|
3
|
+
consolidation_buffer_ms: 0,
|
|
4
|
+
best_artifact_selection: "best_evidence",
|
|
5
|
+
require_reproducibility_manifest: false,
|
|
6
|
+
verification_steps: [],
|
|
7
|
+
external_actions: [],
|
|
8
|
+
};
|
|
9
|
+
export function normalizeFinalizationPolicy(policy) {
|
|
10
|
+
return {
|
|
11
|
+
...DEFAULT_FINALIZATION_POLICY,
|
|
12
|
+
...(policy ?? {}),
|
|
13
|
+
external_actions: (policy?.external_actions ?? []).map(normalizeExternalAction),
|
|
14
|
+
verification_steps: [...(policy?.verification_steps ?? DEFAULT_FINALIZATION_POLICY.verification_steps)],
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
export function buildDeadlineFinalizationStatus(input) {
|
|
18
|
+
const now = input.now ?? new Date();
|
|
19
|
+
const evaluatedAt = now.toISOString();
|
|
20
|
+
const deadline = input.goal.deadline ?? null;
|
|
21
|
+
const policy = normalizeFinalizationPolicy(input.goal.finalization_policy);
|
|
22
|
+
if (!deadline) {
|
|
23
|
+
return {
|
|
24
|
+
mode: "no_deadline",
|
|
25
|
+
deadline: null,
|
|
26
|
+
evaluated_at: evaluatedAt,
|
|
27
|
+
remaining_ms: null,
|
|
28
|
+
reserved_finalization_ms: policy.minimum_buffer_ms,
|
|
29
|
+
remaining_exploration_ms: null,
|
|
30
|
+
consolidation_buffer_ms: policy.consolidation_buffer_ms,
|
|
31
|
+
finalization_plan: null,
|
|
32
|
+
reason: "Goal has no deadline.",
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
const deadlineMs = Date.parse(deadline);
|
|
36
|
+
if (!Number.isFinite(deadlineMs)) {
|
|
37
|
+
return {
|
|
38
|
+
mode: "no_deadline",
|
|
39
|
+
deadline,
|
|
40
|
+
evaluated_at: evaluatedAt,
|
|
41
|
+
remaining_ms: null,
|
|
42
|
+
reserved_finalization_ms: policy.minimum_buffer_ms,
|
|
43
|
+
remaining_exploration_ms: null,
|
|
44
|
+
consolidation_buffer_ms: policy.consolidation_buffer_ms,
|
|
45
|
+
finalization_plan: null,
|
|
46
|
+
reason: "Goal deadline is not parseable.",
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
const remainingMs = deadlineMs - now.getTime();
|
|
50
|
+
const remainingExplorationMs = Math.max(0, remainingMs - policy.minimum_buffer_ms);
|
|
51
|
+
const mode = classifyFinalizationMode(remainingMs, policy);
|
|
52
|
+
return {
|
|
53
|
+
mode,
|
|
54
|
+
deadline,
|
|
55
|
+
evaluated_at: evaluatedAt,
|
|
56
|
+
remaining_ms: remainingMs,
|
|
57
|
+
reserved_finalization_ms: policy.minimum_buffer_ms,
|
|
58
|
+
remaining_exploration_ms: remainingExplorationMs,
|
|
59
|
+
consolidation_buffer_ms: policy.consolidation_buffer_ms,
|
|
60
|
+
finalization_plan: buildFinalizationPlan(policy, input.bestArtifact ?? null, input.reproducibilityManifestId ?? null),
|
|
61
|
+
reason: buildReason(mode, remainingMs, policy),
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
export function shouldStopExplorationForFinalization(status) {
|
|
65
|
+
return status.mode === "finalization" || status.mode === "missed_deadline";
|
|
66
|
+
}
|
|
67
|
+
function classifyFinalizationMode(remainingMs, policy) {
|
|
68
|
+
if (remainingMs <= 0)
|
|
69
|
+
return "missed_deadline";
|
|
70
|
+
if (remainingMs <= policy.minimum_buffer_ms)
|
|
71
|
+
return "finalization";
|
|
72
|
+
if (remainingMs <= policy.minimum_buffer_ms + policy.consolidation_buffer_ms) {
|
|
73
|
+
return "consolidation";
|
|
74
|
+
}
|
|
75
|
+
return "exploration";
|
|
76
|
+
}
|
|
77
|
+
function buildFinalizationPlan(policy, bestArtifact, reproducibilityManifestId) {
|
|
78
|
+
const approvalActions = policy.external_actions.map((action) => ({
|
|
79
|
+
id: action.id,
|
|
80
|
+
label: action.label,
|
|
81
|
+
...(action.tool_name ? { tool_name: action.tool_name } : {}),
|
|
82
|
+
...(action.payload_ref ? { payload_ref: action.payload_ref } : {}),
|
|
83
|
+
approval_required: true,
|
|
84
|
+
}));
|
|
85
|
+
const reproducibilityManifest = buildReproducibilityManifestPreflight(policy, reproducibilityManifestId);
|
|
86
|
+
return {
|
|
87
|
+
deliverable_contract: policy.deliverable_contract ?? null,
|
|
88
|
+
best_artifact_selection: policy.best_artifact_selection,
|
|
89
|
+
best_artifact: bestArtifact,
|
|
90
|
+
reproducibility_manifest: reproducibilityManifest,
|
|
91
|
+
verification_steps: [...policy.verification_steps],
|
|
92
|
+
approval_required_actions: approvalActions,
|
|
93
|
+
handoff_required: approvalActions.length > 0 || reproducibilityManifest.status === "required_missing",
|
|
94
|
+
};
|
|
95
|
+
}
|
|
96
|
+
function buildReproducibilityManifestPreflight(policy, manifestId) {
|
|
97
|
+
if (!policy.require_reproducibility_manifest) {
|
|
98
|
+
return {
|
|
99
|
+
required: false,
|
|
100
|
+
status: "not_required",
|
|
101
|
+
reason: "Reproducibility manifest is not required by this finalization policy.",
|
|
102
|
+
};
|
|
103
|
+
}
|
|
104
|
+
if (manifestId) {
|
|
105
|
+
return {
|
|
106
|
+
required: true,
|
|
107
|
+
status: "ready",
|
|
108
|
+
manifest_id: manifestId,
|
|
109
|
+
reason: "Reproducibility manifest is ready before delivery/submission.",
|
|
110
|
+
};
|
|
111
|
+
}
|
|
112
|
+
return {
|
|
113
|
+
required: true,
|
|
114
|
+
status: "required_missing",
|
|
115
|
+
reason: "Reproducibility manifest is required before delivery/submission.",
|
|
116
|
+
};
|
|
117
|
+
}
|
|
118
|
+
function normalizeExternalAction(action) {
|
|
119
|
+
return {
|
|
120
|
+
...action,
|
|
121
|
+
approval_required: true,
|
|
122
|
+
};
|
|
123
|
+
}
|
|
124
|
+
function buildReason(mode, remainingMs, policy) {
|
|
125
|
+
if (mode === "missed_deadline") {
|
|
126
|
+
return "Deadline has passed; preserve the best artifact and prepare operator handoff.";
|
|
127
|
+
}
|
|
128
|
+
if (mode === "finalization") {
|
|
129
|
+
return `Remaining time is inside the reserved finalization buffer (${policy.minimum_buffer_ms}ms).`;
|
|
130
|
+
}
|
|
131
|
+
if (mode === "consolidation") {
|
|
132
|
+
return `Remaining time is inside the consolidation window (${policy.minimum_buffer_ms + policy.consolidation_buffer_ms}ms).`;
|
|
133
|
+
}
|
|
134
|
+
return `Exploration may continue with ${Math.max(0, remainingMs - policy.minimum_buffer_ms)}ms before the reserved finalization buffer.`;
|
|
135
|
+
}
|
|
136
|
+
//# sourceMappingURL=deadline-finalization.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"deadline-finalization.js","sourceRoot":"","sources":["../../../src/platform/time/deadline-finalization.ts"],"names":[],"mappings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2
|
+
export type ExecutionMode = "exploration" | "consolidation" | "finalization";
|
|
3
|
+
export type ExecutionModeTransitionSource = "default" | "deadline_finalization" | "operator" | "dream";
|
|
4
|
+
export interface ExecutionModeState {
|
|
5
|
+
mode: ExecutionMode;
|
|
6
|
+
source: ExecutionModeTransitionSource;
|
|
7
|
+
reason: string;
|
|
8
|
+
changed_at: string;
|
|
9
|
+
finalization_mode?: DeadlineFinalizationStatus["mode"];
|
|
10
|
+
approval_required_to_explore?: boolean;
|
|
11
|
+
}
|
|
12
|
+
export interface GeneratedTaskForModeCheck {
|
|
13
|
+
work_description: string;
|
|
14
|
+
rationale?: string;
|
|
15
|
+
approach?: string;
|
|
16
|
+
scope_boundary?: {
|
|
17
|
+
in_scope?: string[];
|
|
18
|
+
out_of_scope?: string[];
|
|
19
|
+
blast_radius?: string;
|
|
20
|
+
};
|
|
21
|
+
constraints?: string[];
|
|
22
|
+
}
|
|
23
|
+
export declare function deriveExecutionModeFromDeadlineStatus(status: DeadlineFinalizationStatus): ExecutionModeState;
|
|
24
|
+
export declare function formatExecutionModePromptSection(executionMode: ExecutionModeState | undefined): string;
|
|
25
|
+
export declare function isExploratoryGeneratedTask(task: GeneratedTaskForModeCheck): boolean;
|
|
26
|
+
export declare function isGeneratedTaskAllowedForExecutionMode(task: GeneratedTaskForModeCheck, executionMode: ExecutionModeState | undefined, options?: {
|
|
27
|
+
explorationApproved?: boolean;
|
|
28
|
+
}): boolean;
|
|
29
|
+
//# sourceMappingURL=execution-mode.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"execution-mode.d.ts","sourceRoot":"","sources":["../../../src/platform/time/execution-mode.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,4BAA4B,CAAC;AAE7E,MAAM,MAAM,aAAa,GAAG,aAAa,GAAG,eAAe,GAAG,cAAc,CAAC;AAE7E,MAAM,MAAM,6BAA6B,GACrC,SAAS,GACT,uBAAuB,GACvB,UAAU,GACV,OAAO,CAAC;AAEZ,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,aAAa,CAAC;IACpB,MAAM,EAAE,6BAA6B,CAAC;IACtC,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,MAAM,CAAC;IACnB,iBAAiB,CAAC,EAAE,0BAA0B,CAAC,MAAM,CAAC,CAAC;IACvD,4BAA4B,CAAC,EAAE,OAAO,CAAC;CACxC;AAED,MAAM,WAAW,yBAAyB;IACxC,gBAAgB,EAAE,MAAM,CAAC;IACzB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,cAAc,CAAC,EAAE;QACf,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;QACpB,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;QACxB,YAAY,CAAC,EAAE,MAAM,CAAC;KACvB,CAAC;IACF,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;CACxB;AAED,wBAAgB,qCAAqC,CACnD,MAAM,EAAE,0BAA0B,GACjC,kBAAkB,CAwBpB;AAED,wBAAgB,gCAAgC,CAC9C,aAAa,EAAE,kBAAkB,GAAG,SAAS,GAC5C,MAAM,CAmCR;AAED,wBAAgB,0BAA0B,CAAC,IAAI,EAAE,yBAAyB,GAAG,OAAO,CAqBnF;AAED,wBAAgB,sCAAsC,CACpD,IAAI,EAAE,yBAAyB,EAC/B,aAAa,EAAE,kBAAkB,GAAG,SAAS,EAC7C,OAAO,GAAE;IAAE,mBAAmB,CAAC,EAAE,OAAO,CAAA;CAAO,GAC9C,OAAO,CAIT"}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
export function deriveExecutionModeFromDeadlineStatus(status) {
|
|
2
|
+
const base = {
|
|
3
|
+
source: "deadline_finalization",
|
|
4
|
+
reason: status.reason,
|
|
5
|
+
changed_at: status.evaluated_at,
|
|
6
|
+
finalization_mode: status.mode,
|
|
7
|
+
};
|
|
8
|
+
if (status.mode === "consolidation") {
|
|
9
|
+
return { ...base, mode: "consolidation" };
|
|
10
|
+
}
|
|
11
|
+
if (status.mode === "finalization" || status.mode === "missed_deadline") {
|
|
12
|
+
return {
|
|
13
|
+
...base,
|
|
14
|
+
mode: "finalization",
|
|
15
|
+
approval_required_to_explore: true,
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
return {
|
|
19
|
+
...base,
|
|
20
|
+
mode: "exploration",
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
export function formatExecutionModePromptSection(executionMode) {
|
|
24
|
+
if (!executionMode)
|
|
25
|
+
return "";
|
|
26
|
+
const header = [
|
|
27
|
+
"",
|
|
28
|
+
"=== Current Execution Mode ===",
|
|
29
|
+
`Mode: ${executionMode.mode}`,
|
|
30
|
+
`Reason: ${executionMode.reason}`,
|
|
31
|
+
];
|
|
32
|
+
if (executionMode.mode === "exploration") {
|
|
33
|
+
return [
|
|
34
|
+
...header,
|
|
35
|
+
"Allowed task categories: new hypotheses, new experiments, evidence gathering, and implementation tasks that open a plausible path toward the goal.",
|
|
36
|
+
"Keep scope bounded and verifiable.",
|
|
37
|
+
"",
|
|
38
|
+
].join("\n");
|
|
39
|
+
}
|
|
40
|
+
if (executionMode.mode === "consolidation") {
|
|
41
|
+
return [
|
|
42
|
+
...header,
|
|
43
|
+
"Allowed task categories: stabilize existing candidates, rerun selected validations, compare evidence, reduce uncertainty, and prepare candidate handoff material.",
|
|
44
|
+
"Avoid opening a new speculative experiment family unless the operator has already approved that return to broad exploration.",
|
|
45
|
+
"",
|
|
46
|
+
].join("\n");
|
|
47
|
+
}
|
|
48
|
+
return [
|
|
49
|
+
...header,
|
|
50
|
+
"Allowed task categories: artifact verification, packaging, candidate selection from existing evidence, final report preparation, and operator handoff.",
|
|
51
|
+
"Blocked by default: new speculative experiments, new candidate families, broad exploration branches, and infrastructure created only to search for more candidates.",
|
|
52
|
+
"Returning to broad exploration requires explicit operator approval.",
|
|
53
|
+
"",
|
|
54
|
+
].join("\n");
|
|
55
|
+
}
|
|
56
|
+
export function isExploratoryGeneratedTask(task) {
|
|
57
|
+
const text = [
|
|
58
|
+
task.work_description,
|
|
59
|
+
task.rationale,
|
|
60
|
+
task.approach,
|
|
61
|
+
...(task.scope_boundary?.in_scope ?? []),
|
|
62
|
+
...(task.scope_boundary?.out_of_scope ?? []),
|
|
63
|
+
task.scope_boundary?.blast_radius,
|
|
64
|
+
...(task.constraints ?? []),
|
|
65
|
+
]
|
|
66
|
+
.filter(Boolean)
|
|
67
|
+
.join("\n")
|
|
68
|
+
.toLowerCase();
|
|
69
|
+
return [
|
|
70
|
+
/\bexplor(e|ation|atory)\b/,
|
|
71
|
+
/\b(new|novel|additional)\s+(hypothes(is|es)|experiment|candidate|model|feature|branch|lineage|approach|pipeline|infrastructure)\b/,
|
|
72
|
+
/\btry\s+(a|another|new|multiple)\b/,
|
|
73
|
+
/\bprototype\b/,
|
|
74
|
+
/\bexperiment\s+(bank|family|runner|backfill)\b/,
|
|
75
|
+
].some((pattern) => pattern.test(text));
|
|
76
|
+
}
|
|
77
|
+
export function isGeneratedTaskAllowedForExecutionMode(task, executionMode, options = {}) {
|
|
78
|
+
if (!executionMode || executionMode.mode !== "finalization")
|
|
79
|
+
return true;
|
|
80
|
+
if (options.explorationApproved)
|
|
81
|
+
return true;
|
|
82
|
+
return !isExploratoryGeneratedTask(task);
|
|
83
|
+
}
|
|
84
|
+
//# sourceMappingURL=execution-mode.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"execution-mode.js","sourceRoot":"","sources":["../../../src/platform/time/execution-mode.ts"],"names":[],"mappings":"AA+BA,MAAM,UAAU,qCAAqC,CACnD,MAAkC;IAElC,MAAM,IAAI,GAAG;QACX,MAAM,EAAE,uBAAgC;QACxC,MAAM,EAAE,MAAM,CAAC,MAAM;QACrB,UAAU,EAAE,MAAM,CAAC,YAAY;QAC/B,iBAAiB,EAAE,MAAM,CAAC,IAAI;KAC/B,CAAC;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AAI,CAAC,QAAQ;QACb,GAAG,CAAC,IAAI,CAAC,cAAc,EAAE,QAAQ,IAAI,EAAE,CAAC;QACxC,GAAG,CAAC,IAAI,CAAC,cAAc,EAAE,YAAY,IAAI,EAAE,CAAC;QAC5C,IAAI,CAAC,cAAc,EAAE,YAAY;QACjC,GAAG,CAAC,IAAI,CAAC,WAAW,IAAI,EAAE,CAAC;KAC5B;SACE,MAAM,CAAC,OAAO,CAAC;SACf,IAAI,CAAC,IAAI,CAAC;SACV,WAAW,EAAE,CAAC;IAEjB,OAAO;QACL,2BAA2B;QAC3B,mIAAmI;QACnI,oCAAoC;QACpC,eAAe;QACf,gDAAgD;KACjD,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;AAC1C,CAAC;AAED,MAAM,UAAU,sCAAsC,CACpD,IAA+B,EAC/B,aAA6C,EAC7C,UAA6C,EAAE;IAE/C,IAAI,CAAC,aAAa,IAAI,aAAa,CAAC,IAAI,KAAK,cAAc;QAAE,OAAO,IAAI,CAAC;IACzE,IAAI,OAAO,CAAC,mBAAmB;QAAE,OAAO,IAAI,CAAC;IAC7C,OAAO,CAAC,0BAA0B,CAAC,IAAI,CAAC,CAAC;AAC3C,CAAC"}
|
|
@@ -91,7 +91,7 @@ export declare const CuriosityProposalSchema: z.ZodObject<{
|
|
|
91
91
|
loop_count: z.ZodDefault<z.ZodNumber>;
|
|
92
92
|
goal_id: z.ZodNullable<z.ZodString>;
|
|
93
93
|
}, "strip", z.ZodTypeAny, {
|
|
94
|
-
status: "pending" | "expired" | "
|
|
94
|
+
status: "pending" | "expired" | "approved" | "rejected" | "auto_closed";
|
|
95
95
|
id: string;
|
|
96
96
|
created_at: string;
|
|
97
97
|
trigger: {
|
|
@@ -102,8 +102,8 @@ export declare const CuriosityProposalSchema: z.ZodObject<{
|
|
|
102
102
|
severity: number;
|
|
103
103
|
};
|
|
104
104
|
goal_id: string | null;
|
|
105
|
-
loop_count: number;
|
|
106
105
|
expires_at: string;
|
|
106
|
+
loop_count: number;
|
|
107
107
|
proposed_goal: {
|
|
108
108
|
description: string;
|
|
109
109
|
rationale: string;
|
|
@@ -118,7 +118,7 @@ export declare const CuriosityProposalSchema: z.ZodObject<{
|
|
|
118
118
|
reviewed_at: string | null;
|
|
119
119
|
rejection_cooldown_until: string | null;
|
|
120
120
|
}, {
|
|
121
|
-
status: "pending" | "expired" | "
|
|
121
|
+
status: "pending" | "expired" | "approved" | "rejected" | "auto_closed";
|
|
122
122
|
id: string;
|
|
123
123
|
created_at: string;
|
|
124
124
|
trigger: {
|
|
@@ -282,7 +282,7 @@ export declare const CuriosityStateSchema: z.ZodObject<{
|
|
|
282
282
|
loop_count: z.ZodDefault<z.ZodNumber>;
|
|
283
283
|
goal_id: z.ZodNullable<z.ZodString>;
|
|
284
284
|
}, "strip", z.ZodTypeAny, {
|
|
285
|
-
status: "pending" | "expired" | "
|
|
285
|
+
status: "pending" | "expired" | "approved" | "rejected" | "auto_closed";
|
|
286
286
|
id: string;
|
|
287
287
|
created_at: string;
|
|
288
288
|
trigger: {
|
|
@@ -293,8 +293,8 @@ export declare const CuriosityStateSchema: z.ZodObject<{
|
|
|
293
293
|
severity: number;
|
|
294
294
|
};
|
|
295
295
|
goal_id: string | null;
|
|
296
|
-
loop_count: number;
|
|
297
296
|
expires_at: string;
|
|
297
|
+
loop_count: number;
|
|
298
298
|
proposed_goal: {
|
|
299
299
|
description: string;
|
|
300
300
|
rationale: string;
|
|
@@ -309,7 +309,7 @@ export declare const CuriosityStateSchema: z.ZodObject<{
|
|
|
309
309
|
reviewed_at: string | null;
|
|
310
310
|
rejection_cooldown_until: string | null;
|
|
311
311
|
}, {
|
|
312
|
-
status: "pending" | "expired" | "
|
|
312
|
+
status: "pending" | "expired" | "approved" | "rejected" | "auto_closed";
|
|
313
313
|
id: string;
|
|
314
314
|
created_at: string;
|
|
315
315
|
trigger: {
|
|
@@ -362,7 +362,7 @@ export declare const CuriosityStateSchema: z.ZodObject<{
|
|
|
362
362
|
rejected_proposal_hashes: z.ZodArray<z.ZodString, "many">;
|
|
363
363
|
}, "strip", z.ZodTypeAny, {
|
|
364
364
|
proposals: {
|
|
365
|
-
status: "pending" | "expired" | "
|
|
365
|
+
status: "pending" | "expired" | "approved" | "rejected" | "auto_closed";
|
|
366
366
|
id: string;
|
|
367
367
|
created_at: string;
|
|
368
368
|
trigger: {
|
|
@@ -373,8 +373,8 @@ export declare const CuriosityStateSchema: z.ZodObject<{
|
|
|
373
373
|
severity: number;
|
|
374
374
|
};
|
|
375
375
|
goal_id: string | null;
|
|
376
|
-
loop_count: number;
|
|
377
376
|
expires_at: string;
|
|
377
|
+
loop_count: number;
|
|
378
378
|
proposed_goal: {
|
|
379
379
|
description: string;
|
|
380
380
|
rationale: string;
|
|
@@ -401,7 +401,7 @@ export declare const CuriosityStateSchema: z.ZodObject<{
|
|
|
401
401
|
rejected_proposal_hashes: string[];
|
|
402
402
|
}, {
|
|
403
403
|
proposals: {
|
|
404
|
-
status: "pending" | "expired" | "
|
|
404
|
+
status: "pending" | "expired" | "approved" | "rejected" | "auto_closed";
|
|
405
405
|
id: string;
|
|
406
406
|
created_at: string;
|
|
407
407
|
trigger: {
|
|
@@ -11,15 +11,15 @@ export declare const GuardrailResultSchema: z.ZodObject<{
|
|
|
11
11
|
reason: z.ZodOptional<z.ZodString>;
|
|
12
12
|
modified_input: z.ZodOptional<z.ZodUnknown>;
|
|
13
13
|
}, "strip", z.ZodTypeAny, {
|
|
14
|
-
hook_name: string;
|
|
15
14
|
checkpoint: "before_model" | "after_model" | "before_tool" | "after_tool";
|
|
15
|
+
hook_name: string;
|
|
16
16
|
allowed: boolean;
|
|
17
17
|
severity: "critical" | "info" | "warning";
|
|
18
18
|
reason?: string | undefined;
|
|
19
19
|
modified_input?: unknown;
|
|
20
20
|
}, {
|
|
21
|
-
hook_name: string;
|
|
22
21
|
checkpoint: "before_model" | "after_model" | "before_tool" | "after_tool";
|
|
22
|
+
hook_name: string;
|
|
23
23
|
allowed: boolean;
|
|
24
24
|
reason?: string | undefined;
|
|
25
25
|
severity?: "critical" | "info" | "warning" | undefined;
|
|
@@ -36,15 +36,15 @@ export declare const GuardrailAggregateResultSchema: z.ZodObject<{
|
|
|
36
36
|
reason: z.ZodOptional<z.ZodString>;
|
|
37
37
|
modified_input: z.ZodOptional<z.ZodUnknown>;
|
|
38
38
|
}, "strip", z.ZodTypeAny, {
|
|
39
|
-
hook_name: string;
|
|
40
39
|
checkpoint: "before_model" | "after_model" | "before_tool" | "after_tool";
|
|
40
|
+
hook_name: string;
|
|
41
41
|
allowed: boolean;
|
|
42
42
|
severity: "critical" | "info" | "warning";
|
|
43
43
|
reason?: string | undefined;
|
|
44
44
|
modified_input?: unknown;
|
|
45
45
|
}, {
|
|
46
|
-
hook_name: string;
|
|
47
46
|
checkpoint: "before_model" | "after_model" | "before_tool" | "after_tool";
|
|
47
|
+
hook_name: string;
|
|
48
48
|
allowed: boolean;
|
|
49
49
|
reason?: string | undefined;
|
|
50
50
|
severity?: "critical" | "info" | "warning" | undefined;
|
|
@@ -54,8 +54,8 @@ export declare const GuardrailAggregateResultSchema: z.ZodObject<{
|
|
|
54
54
|
}, "strip", z.ZodTypeAny, {
|
|
55
55
|
allowed: boolean;
|
|
56
56
|
results: {
|
|
57
|
-
hook_name: string;
|
|
58
57
|
checkpoint: "before_model" | "after_model" | "before_tool" | "after_tool";
|
|
58
|
+
hook_name: string;
|
|
59
59
|
allowed: boolean;
|
|
60
60
|
severity: "critical" | "info" | "warning";
|
|
61
61
|
reason?: string | undefined;
|
|
@@ -65,8 +65,8 @@ export declare const GuardrailAggregateResultSchema: z.ZodObject<{
|
|
|
65
65
|
}, {
|
|
66
66
|
allowed: boolean;
|
|
67
67
|
results: {
|
|
68
|
-
hook_name: string;
|
|
69
68
|
checkpoint: "before_model" | "after_model" | "before_tool" | "after_tool";
|
|
69
|
+
hook_name: string;
|
|
70
70
|
allowed: boolean;
|
|
71
71
|
reason?: string | undefined;
|
|
72
72
|
severity?: "critical" | "info" | "warning" | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"report-formatters.d.ts","sourceRoot":"","sources":["../../src/reporting/report-formatters.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AACtD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAClE,OAAO,KAAK,EAAE,sBAAsB,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAI1G,wBAAgB,iBAAiB,CAAC,eAAe,EAAE,eAAe,GAAG,OAAO,GAAG,QAAQ,GAAG,UAAU,CAKnG;AAED,wBAAgB,qBAAqB,CAAC,CAAC,EACrC,aAAa,EAAE,CAAC,GAAG,IAAI,GAAG,SAAS,EACnC,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,MAAM,EACf,KAAK,EAAE,CAAC,KAAK,EAAE,gBAAgB,KAAK,CAAC,GACpC,CAAC,GAAG,IAAI,CAIV;AAED,wBAAgB,2BAA2B,CAAC,IAAI,EAAE;IAChD,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;CACrB,GAAG,MAAM,CAOT;AAID,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CA+DzD;AAID,wBAAgB,4BAA4B,CAC1C,MAAM,EAAE,sBAAsB,EAC9B,SAAS,EAAE,OAAO,GAAG,QAAQ,GAAG,UAAU,GACzC,MAAM,
|
|
1
|
+
{"version":3,"file":"report-formatters.d.ts","sourceRoot":"","sources":["../../src/reporting/report-formatters.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AACtD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAClE,OAAO,KAAK,EAAE,sBAAsB,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAI1G,wBAAgB,iBAAiB,CAAC,eAAe,EAAE,eAAe,GAAG,OAAO,GAAG,QAAQ,GAAG,UAAU,CAKnG;AAED,wBAAgB,qBAAqB,CAAC,CAAC,EACrC,aAAa,EAAE,CAAC,GAAG,IAAI,GAAG,SAAS,EACnC,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,MAAM,EACf,KAAK,EAAE,CAAC,KAAK,EAAE,gBAAgB,KAAK,CAAC,GACpC,CAAC,GAAG,IAAI,CAIV;AAED,wBAAgB,2BAA2B,CAAC,IAAI,EAAE;IAChD,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;CACrB,GAAG,MAAM,CAOT;AAID,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CA+DzD;AAID,wBAAgB,4BAA4B,CAC1C,MAAM,EAAE,sBAAsB,EAC9B,SAAS,EAAE,OAAO,GAAG,QAAQ,GAAG,UAAU,GACzC,MAAM,CAiFR;AAoGD,wBAAgB,wBAAwB,CACtC,IAAI,EAAE,gBAAgB,EACtB,OAAO,EAAE,mBAAmB,EAC5B,eAAe,EAAE,eAAe,GAC/B;IAAE,UAAU,EAAE,MAAM,CAAC,aAAa,CAAC,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,CAqDvE"}
|
|
@@ -57,10 +57,18 @@ export function formatReportForCLI(report) {
|
|
|
57
57
|
}
|
|
58
58
|
// ─── buildExecutionSummaryContent ───
|
|
59
59
|
export function buildExecutionSummaryContent(params, verbosity) {
|
|
60
|
-
const { loopIndex, observation, gapAggregate, taskResult, stallDetected, pivotOccurred, elapsedMs, waitStatus, } = params;
|
|
60
|
+
const { loopIndex, observation, gapAggregate, taskResult, stallDetected, pivotOccurred, elapsedMs, waitStatus, finalizationStatus, executionMode, } = params;
|
|
61
61
|
const now = new Date().toISOString();
|
|
62
62
|
const elapsedSec = (elapsedMs / 1000).toFixed(1);
|
|
63
|
-
const
|
|
63
|
+
const structuralExecutionMode = executionMode
|
|
64
|
+
? isStructuralExecutionMode(executionMode)
|
|
65
|
+
: false;
|
|
66
|
+
const isStructuralEvent = stallDetected
|
|
67
|
+
|| pivotOccurred
|
|
68
|
+
|| taskResult === null
|
|
69
|
+
|| structuralExecutionMode
|
|
70
|
+
|| waitStatus !== undefined
|
|
71
|
+
|| finalizationStatus !== undefined;
|
|
64
72
|
const useBrief = verbosity === "brief" && !isStructuralEvent;
|
|
65
73
|
if (useBrief) {
|
|
66
74
|
const gapSummary = gapAggregate.toFixed(4);
|
|
@@ -93,6 +101,8 @@ export function buildExecutionSummaryContent(params, verbosity) {
|
|
|
93
101
|
const stallStatus = stallDetected ? "Yes" : "No";
|
|
94
102
|
const pivotStatus = pivotOccurred ? "Yes" : "No";
|
|
95
103
|
const waitSection = waitStatus ? formatWaitStatusSection(waitStatus) : "";
|
|
104
|
+
const executionModeSection = executionMode ? formatExecutionModeSection(executionMode) : "";
|
|
105
|
+
const finalizationSection = finalizationStatus ? formatFinalizationStatusSection(finalizationStatus) : "";
|
|
96
106
|
return (`## Execution Summary — Loop ${loopIndex}\n\n` +
|
|
97
107
|
`**Timestamp**: ${now}\n\n` +
|
|
98
108
|
`### Observation Results\n\n${obsTable}\n` +
|
|
@@ -102,9 +112,27 @@ export function buildExecutionSummaryContent(params, verbosity) {
|
|
|
102
112
|
`### Status\n\n` +
|
|
103
113
|
`- **Stall detected**: ${stallStatus}\n` +
|
|
104
114
|
`- **Strategy pivot**: ${pivotStatus}\n\n` +
|
|
115
|
+
executionModeSection +
|
|
105
116
|
waitSection +
|
|
117
|
+
finalizationSection +
|
|
106
118
|
`### Elapsed Time\n\n${elapsedSec}s`);
|
|
107
119
|
}
|
|
120
|
+
function isStructuralExecutionMode(executionMode) {
|
|
121
|
+
return executionMode.mode !== "exploration" || executionMode.finalization_mode !== "no_deadline";
|
|
122
|
+
}
|
|
123
|
+
function formatExecutionModeSection(executionMode) {
|
|
124
|
+
const lines = [
|
|
125
|
+
"### Execution Mode",
|
|
126
|
+
"",
|
|
127
|
+
`- **Mode**: ${executionMode.mode}`,
|
|
128
|
+
`- **Source**: ${executionMode.source}`,
|
|
129
|
+
`- **Reason**: ${executionMode.reason}`,
|
|
130
|
+
];
|
|
131
|
+
if (executionMode.approval_required_to_explore !== undefined) {
|
|
132
|
+
lines.push(`- **Approval required to explore**: ${executionMode.approval_required_to_explore ? "Yes" : "No"}`);
|
|
133
|
+
}
|
|
134
|
+
return `${lines.join("\n")}\n\n`;
|
|
135
|
+
}
|
|
108
136
|
function formatWaitStatusSection(waitStatus) {
|
|
109
137
|
const lines = [
|
|
110
138
|
"### Wait Status",
|
|
@@ -134,6 +162,43 @@ function formatWaitStatusSection(waitStatus) {
|
|
|
134
162
|
}
|
|
135
163
|
return `${lines.join("\n")}\n\n`;
|
|
136
164
|
}
|
|
165
|
+
function formatFinalizationStatusSection(status) {
|
|
166
|
+
const lines = [
|
|
167
|
+
"### Deadline Finalization",
|
|
168
|
+
"",
|
|
169
|
+
`- **Mode**: ${status.mode}`,
|
|
170
|
+
`- **Deadline**: ${status.deadline ?? "-"}`,
|
|
171
|
+
`- **Remaining exploration**: ${formatDurationMs(status.remaining_exploration_ms)}`,
|
|
172
|
+
`- **Reserved finalization**: ${formatDurationMs(status.reserved_finalization_ms)}`,
|
|
173
|
+
`- **Reason**: ${status.reason}`,
|
|
174
|
+
];
|
|
175
|
+
const plan = status.finalization_plan;
|
|
176
|
+
if (plan) {
|
|
177
|
+
lines.push(`- **Deliverable**: ${plan.deliverable_contract ?? "-"}`);
|
|
178
|
+
lines.push(`- **Best artifact**: ${plan.best_artifact?.label ?? "-"}`);
|
|
179
|
+
if (plan.verification_steps.length > 0) {
|
|
180
|
+
lines.push(`- **Verification steps**: ${plan.verification_steps.join("; ")}`);
|
|
181
|
+
}
|
|
182
|
+
if (plan.approval_required_actions.length > 0) {
|
|
183
|
+
lines.push(`- **Approval-required actions**: ${plan.approval_required_actions
|
|
184
|
+
.map((action) => action.label)
|
|
185
|
+
.join("; ")}`);
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
return `${lines.join("\n")}\n\n`;
|
|
189
|
+
}
|
|
190
|
+
function formatDurationMs(value) {
|
|
191
|
+
if (value === null)
|
|
192
|
+
return "-";
|
|
193
|
+
if (value <= 0)
|
|
194
|
+
return "0m";
|
|
195
|
+
const minutes = Math.ceil(value / 60_000);
|
|
196
|
+
if (minutes < 60)
|
|
197
|
+
return `${minutes}m`;
|
|
198
|
+
const hours = Math.floor(minutes / 60);
|
|
199
|
+
const remainder = minutes % 60;
|
|
200
|
+
return remainder === 0 ? `${hours}h` : `${hours}h ${remainder}m`;
|
|
201
|
+
}
|
|
137
202
|
// ─── buildNotificationContent ───
|
|
138
203
|
export function buildNotificationContent(type, context, characterConfig) {
|
|
139
204
|
const now = new Date().toISOString();
|