pulseed 0.5.3 → 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/state/state-manager-goal-state.d.ts +40 -0
- package/dist/base/state/state-manager-goal-state.d.ts.map +1 -0
- package/dist/base/state/state-manager-goal-state.js +235 -0
- package/dist/base/state/state-manager-goal-state.js.map +1 -0
- package/dist/base/state/state-manager.d.ts +0 -5
- package/dist/base/state/state-manager.d.ts.map +1 -1
- package/dist/base/state/state-manager.js +27 -273
- package/dist/base/state/state-manager.js.map +1 -1
- package/dist/base/types/goal-activation.d.ts +37 -0
- package/dist/base/types/goal-activation.d.ts.map +1 -0
- package/dist/base/types/goal-activation.js +13 -0
- package/dist/base/types/goal-activation.js.map +1 -0
- 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-history.d.ts +129 -0
- package/dist/interface/chat/chat-history.d.ts.map +1 -1
- package/dist/interface/chat/chat-history.js +135 -0
- package/dist/interface/chat/chat-history.js.map +1 -1
- package/dist/interface/chat/chat-runner-command-helpers.d.ts +50 -0
- package/dist/interface/chat/chat-runner-command-helpers.d.ts.map +1 -0
- package/dist/interface/chat/chat-runner-command-helpers.js +189 -0
- package/dist/interface/chat/chat-runner-command-helpers.js.map +1 -0
- package/dist/interface/chat/chat-runner-commands.d.ts +82 -0
- package/dist/interface/chat/chat-runner-commands.d.ts.map +1 -0
- package/dist/interface/chat/chat-runner-commands.js +906 -0
- package/dist/interface/chat/chat-runner-commands.js.map +1 -0
- package/dist/interface/chat/chat-runner-event-bridge.d.ts +60 -0
- package/dist/interface/chat/chat-runner-event-bridge.d.ts.map +1 -0
- package/dist/interface/chat/chat-runner-event-bridge.js +377 -0
- package/dist/interface/chat/chat-runner-event-bridge.js.map +1 -0
- package/dist/interface/chat/chat-runner-routes.d.ts +67 -0
- package/dist/interface/chat/chat-runner-routes.d.ts.map +1 -0
- package/dist/interface/chat/chat-runner-routes.js +610 -0
- package/dist/interface/chat/chat-runner-routes.js.map +1 -0
- package/dist/interface/chat/chat-runner-runtime.d.ts +37 -0
- package/dist/interface/chat/chat-runner-runtime.d.ts.map +1 -0
- package/dist/interface/chat/chat-runner-runtime.js +236 -0
- package/dist/interface/chat/chat-runner-runtime.js.map +1 -0
- package/dist/interface/chat/chat-runner-state.d.ts +20 -0
- package/dist/interface/chat/chat-runner-state.d.ts.map +1 -0
- package/dist/interface/chat/chat-runner-state.js +157 -0
- package/dist/interface/chat/chat-runner-state.js.map +1 -0
- package/dist/interface/chat/chat-runner-support.d.ts +39 -0
- package/dist/interface/chat/chat-runner-support.d.ts.map +1 -0
- package/dist/interface/chat/chat-runner-support.js +170 -0
- package/dist/interface/chat/chat-runner-support.js.map +1 -0
- package/dist/interface/chat/chat-runner.d.ts +10 -153
- package/dist/interface/chat/chat-runner.d.ts.map +1 -1
- package/dist/interface/chat/chat-runner.js +330 -2643
- package/dist/interface/chat/chat-runner.js.map +1 -1
- package/dist/interface/chat/chat-session-store.d.ts +32 -0
- package/dist/interface/chat/chat-session-store.d.ts.map +1 -1
- package/dist/interface/chat/chat-session-store.js +100 -10
- package/dist/interface/chat/chat-session-store.js.map +1 -1
- package/dist/interface/chat/cross-platform-session.d.ts.map +1 -1
- package/dist/interface/chat/cross-platform-session.js +15 -6
- 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 +61 -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 -26
- package/dist/interface/chat/ingress-router.d.ts.map +1 -1
- package/dist/interface/chat/ingress-router.js +14 -88
- package/dist/interface/chat/ingress-router.js.map +1 -1
- package/dist/interface/chat/tend-command.d.ts.map +1 -1
- package/dist/interface/chat/tend-command.js +3 -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 +33 -0
- package/dist/interface/cli/commands/daemon-shared.d.ts.map +1 -0
- package/dist/interface/cli/commands/daemon-shared.js +152 -0
- package/dist/interface/cli/commands/daemon-shared.js.map +1 -0
- package/dist/interface/cli/commands/daemon.d.ts +2 -2
- package/dist/interface/cli/commands/daemon.d.ts.map +1 -1
- package/dist/interface/cli/commands/daemon.js +62 -127
- 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/commands/schedule/history.d.ts.map +1 -1
- package/dist/interface/cli/commands/schedule/history.js +5 -1
- package/dist/interface/cli/commands/schedule/history.js.map +1 -1
- package/dist/interface/cli/commands/schedule.js +34 -4
- package/dist/interface/cli/commands/schedule.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 +282 -11
- package/dist/interface/tui/app.js.map +1 -1
- package/dist/interface/tui/chat/suggestions.d.ts.map +1 -1
- package/dist/interface/tui/chat/suggestions.js +118 -4
- package/dist/interface/tui/chat/suggestions.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-approval.d.ts +8 -0
- package/dist/interface/tui/entry-approval.d.ts.map +1 -0
- package/dist/interface/tui/entry-approval.js +59 -0
- package/dist/interface/tui/entry-approval.js.map +1 -0
- package/dist/interface/tui/entry-daemon.d.ts +12 -0
- package/dist/interface/tui/entry-daemon.d.ts.map +1 -0
- package/dist/interface/tui/entry-daemon.js +74 -0
- package/dist/interface/tui/entry-daemon.js.map +1 -0
- package/dist/interface/tui/entry-deps.d.ts +24 -0
- package/dist/interface/tui/entry-deps.d.ts.map +1 -0
- package/dist/interface/tui/entry-deps.js +427 -0
- package/dist/interface/tui/entry-deps.js.map +1 -0
- package/dist/interface/tui/entry.d.ts +2 -4
- package/dist/interface/tui/entry.d.ts.map +1 -1
- package/dist/interface/tui/entry.js +11 -556
- package/dist/interface/tui/entry.js.map +1 -1
- package/dist/interface/tui/fullscreen-chat-render.d.ts +127 -0
- package/dist/interface/tui/fullscreen-chat-render.d.ts.map +1 -0
- package/dist/interface/tui/fullscreen-chat-render.js +667 -0
- package/dist/interface/tui/fullscreen-chat-render.js.map +1 -0
- package/dist/interface/tui/fullscreen-chat.d.ts +2 -111
- package/dist/interface/tui/fullscreen-chat.d.ts.map +1 -1
- package/dist/interface/tui/fullscreen-chat.js +4 -663
- package/dist/interface/tui/fullscreen-chat.js.map +1 -1
- package/dist/interface/tui/help-overlay.d.ts.map +1 -1
- package/dist/interface/tui/help-overlay.js +1 -1
- package/dist/interface/tui/help-overlay.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 +49 -0
- package/dist/orchestrator/execution/agent-loop/agent-loop-default-profile.js.map +1 -1
- package/dist/orchestrator/execution/agent-loop/agent-loop-tool-router.d.ts.map +1 -1
- package/dist/orchestrator/execution/agent-loop/agent-loop-tool-router.js +2 -1
- package/dist/orchestrator/execution/agent-loop/agent-loop-tool-router.js.map +1 -1
- package/dist/orchestrator/execution/agent-loop/agent-loop-tool-runtime.d.ts +2 -0
- package/dist/orchestrator/execution/agent-loop/agent-loop-tool-runtime.d.ts.map +1 -1
- package/dist/orchestrator/execution/agent-loop/agent-loop-tool-runtime.js +31 -0
- package/dist/orchestrator/execution/agent-loop/agent-loop-tool-runtime.js.map +1 -1
- package/dist/orchestrator/execution/agent-loop/agent-loop-turn-context.d.ts +1 -0
- package/dist/orchestrator/execution/agent-loop/agent-loop-turn-context.d.ts.map +1 -1
- package/dist/orchestrator/execution/agent-loop/agent-loop-turn-context.js.map +1 -1
- package/dist/orchestrator/execution/agent-loop/bounded-agent-loop-runner.d.ts +1 -0
- package/dist/orchestrator/execution/agent-loop/bounded-agent-loop-runner.d.ts.map +1 -1
- package/dist/orchestrator/execution/agent-loop/bounded-agent-loop-runner.js +36 -2
- package/dist/orchestrator/execution/agent-loop/bounded-agent-loop-runner.js.map +1 -1
- package/dist/orchestrator/execution/agent-loop/chat-agent-loop-runner.d.ts +1 -1
- package/dist/orchestrator/execution/agent-loop/chat-agent-loop-runner.d.ts.map +1 -1
- package/dist/orchestrator/execution/agent-loop/chat-agent-loop-runner.js +2 -1
- package/dist/orchestrator/execution/agent-loop/chat-agent-loop-runner.js.map +1 -1
- package/dist/orchestrator/execution/agent-loop/core-loop-control-tools.d.ts +19 -0
- 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 +165 -14
- 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/reflection-generator.d.ts +1 -0
- package/dist/orchestrator/execution/reflection-generator.d.ts.map +1 -1
- package/dist/orchestrator/execution/reflection-generator.js +10 -1
- package/dist/orchestrator/execution/reflection-generator.js.map +1 -1
- package/dist/orchestrator/execution/task/task-context-enricher.d.ts +2 -0
- package/dist/orchestrator/execution/task/task-context-enricher.d.ts.map +1 -1
- package/dist/orchestrator/execution/task/task-context-enricher.js +9 -4
- package/dist/orchestrator/execution/task/task-context-enricher.js.map +1 -1
- package/dist/orchestrator/execution/task/task-execution-helpers-internal.d.ts +5 -0
- package/dist/orchestrator/execution/task/task-execution-helpers-internal.d.ts.map +1 -0
- package/dist/orchestrator/execution/task/task-execution-helpers-internal.js +6 -0
- package/dist/orchestrator/execution/task/task-execution-helpers-internal.js.map +1 -0
- 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 +25 -5
- package/dist/orchestrator/execution/task/task-generation.js.map +1 -1
- package/dist/orchestrator/execution/task/task-lifecycle-runner.d.ts +77 -0
- package/dist/orchestrator/execution/task/task-lifecycle-runner.d.ts.map +1 -0
- package/dist/orchestrator/execution/task/task-lifecycle-runner.js +188 -0
- package/dist/orchestrator/execution/task/task-lifecycle-runner.js.map +1 -0
- package/dist/orchestrator/execution/task/task-lifecycle.d.ts +17 -8
- package/dist/orchestrator/execution/task/task-lifecycle.d.ts.map +1 -1
- package/dist/orchestrator/execution/task/task-lifecycle.js +144 -187
- 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/task/task-verifier-internal.d.ts +2 -0
- package/dist/orchestrator/execution/task/task-verifier-internal.d.ts.map +1 -0
- package/dist/orchestrator/execution/task/task-verifier-internal.js +2 -0
- package/dist/orchestrator/execution/task/task-verifier-internal.js.map +1 -0
- package/dist/orchestrator/execution/types/pipeline.d.ts +6 -6
- package/dist/orchestrator/goal/goal-negotiator.d.ts.map +1 -1
- package/dist/orchestrator/goal/goal-negotiator.js +23 -3
- package/dist/orchestrator/goal/goal-negotiator.js.map +1 -1
- 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 +47 -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-knowledge.d.ts +7 -0
- package/dist/orchestrator/loop/core-loop/iteration-kernel-knowledge.d.ts.map +1 -0
- package/dist/orchestrator/loop/core-loop/iteration-kernel-knowledge.js +43 -0
- package/dist/orchestrator/loop/core-loop/iteration-kernel-knowledge.js.map +1 -0
- package/dist/orchestrator/loop/core-loop/iteration-kernel-wait.d.ts +14 -0
- package/dist/orchestrator/loop/core-loop/iteration-kernel-wait.d.ts.map +1 -0
- package/dist/orchestrator/loop/core-loop/iteration-kernel-wait.js +41 -0
- package/dist/orchestrator/loop/core-loop/iteration-kernel-wait.js.map +1 -0
- package/dist/orchestrator/loop/core-loop/iteration-kernel.d.ts +4 -2
- package/dist/orchestrator/loop/core-loop/iteration-kernel.d.ts.map +1 -1
- package/dist/orchestrator/loop/core-loop/iteration-kernel.js +507 -87
- 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 +40 -5
- 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 +9 -0
- package/dist/orchestrator/loop/core-loop/task-cycle-stall.d.ts.map +1 -0
- package/dist/orchestrator/loop/core-loop/task-cycle-stall.js +433 -0
- package/dist/orchestrator/loop/core-loop/task-cycle-stall.js.map +1 -0
- package/dist/orchestrator/loop/core-loop/task-cycle-wait.d.ts +11 -0
- package/dist/orchestrator/loop/core-loop/task-cycle-wait.d.ts.map +1 -0
- package/dist/orchestrator/loop/core-loop/task-cycle-wait.js +176 -0
- package/dist/orchestrator/loop/core-loop/task-cycle-wait.js.map +1 -0
- package/dist/orchestrator/loop/core-loop/task-cycle.d.ts +7 -15
- package/dist/orchestrator/loop/core-loop/task-cycle.d.ts.map +1 -1
- package/dist/orchestrator/loop/core-loop/task-cycle.js +17 -444
- package/dist/orchestrator/loop/core-loop/task-cycle.js.map +1 -1
- package/dist/orchestrator/loop/core-loop.d.ts +18 -5
- package/dist/orchestrator/loop/core-loop.d.ts.map +1 -1
- package/dist/orchestrator/loop/core-loop.js +287 -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/portfolio-manager.d.ts +3 -2
- package/dist/orchestrator/strategy/portfolio-manager.d.ts.map +1 -1
- package/dist/orchestrator/strategy/portfolio-manager.js +16 -11
- package/dist/orchestrator/strategy/portfolio-manager.js.map +1 -1
- package/dist/orchestrator/strategy/portfolio-rebalance.d.ts +1 -1
- package/dist/orchestrator/strategy/portfolio-rebalance.d.ts.map +1 -1
- package/dist/orchestrator/strategy/portfolio-rebalance.js +31 -9
- package/dist/orchestrator/strategy/portfolio-rebalance.js.map +1 -1
- 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 +31 -2
- package/dist/orchestrator/strategy/strategy-manager-base.d.ts.map +1 -1
- package/dist/orchestrator/strategy/strategy-manager-base.js +93 -12
- package/dist/orchestrator/strategy/strategy-manager-base.js.map +1 -1
- package/dist/orchestrator/strategy/strategy-manager.d.ts +1 -11
- package/dist/orchestrator/strategy/strategy-manager.d.ts.map +1 -1
- package/dist/orchestrator/strategy/strategy-manager.js +78 -19
- package/dist/orchestrator/strategy/strategy-manager.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-consolidator/fs-metrics.d.ts +18 -0
- package/dist/platform/dream/dream-consolidator/fs-metrics.d.ts.map +1 -0
- package/dist/platform/dream/dream-consolidator/fs-metrics.js +130 -0
- package/dist/platform/dream/dream-consolidator/fs-metrics.js.map +1 -0
- package/dist/platform/dream/dream-consolidator.d.ts +4 -14
- package/dist/platform/dream/dream-consolidator.d.ts.map +1 -1
- package/dist/platform/dream/dream-consolidator.js +46 -166
- package/dist/platform/dream/dream-consolidator.js.map +1 -1
- package/dist/platform/dream/dream-event-workflows.d.ts +6 -6
- package/dist/platform/dream/dream-soil-sync.d.ts +1 -0
- package/dist/platform/dream/dream-soil-sync.d.ts.map +1 -1
- package/dist/platform/dream/dream-soil-sync.js +8 -1
- package/dist/platform/dream/dream-soil-sync.js.map +1 -1
- package/dist/platform/dream/dream-types.d.ts +94 -89
- package/dist/platform/dream/dream-types.d.ts.map +1 -1
- package/dist/platform/dream/dream-types.js +1 -0
- package/dist/platform/dream/dream-types.js.map +1 -1
- package/dist/platform/dream/playbook-memory.d.ts +4 -4
- 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/analysis.d.ts +5 -0
- package/dist/platform/drive/stall-detector/analysis.d.ts.map +1 -0
- package/dist/platform/drive/stall-detector/analysis.js +55 -0
- package/dist/platform/drive/stall-detector/analysis.js.map +1 -0
- package/dist/platform/drive/stall-detector/repetitive.d.ts +3 -0
- package/dist/platform/drive/stall-detector/repetitive.d.ts.map +1 -0
- package/dist/platform/drive/stall-detector/repetitive.js +72 -0
- package/dist/platform/drive/stall-detector/repetitive.js.map +1 -0
- package/dist/platform/drive/stall-detector/thresholds.d.ts +10 -0
- package/dist/platform/drive/stall-detector/thresholds.d.ts.map +1 -0
- package/dist/platform/drive/stall-detector/thresholds.js +61 -0
- package/dist/platform/drive/stall-detector/thresholds.js.map +1 -0
- package/dist/platform/drive/stall-detector.d.ts +5 -21
- package/dist/platform/drive/stall-detector.d.ts.map +1 -1
- package/dist/platform/drive/stall-detector.js +47 -201
- 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/knowledge-manager-agent-memory.d.ts +55 -0
- package/dist/platform/knowledge/knowledge-manager-agent-memory.d.ts.map +1 -0
- package/dist/platform/knowledge/knowledge-manager-agent-memory.js +232 -0
- package/dist/platform/knowledge/knowledge-manager-agent-memory.js.map +1 -0
- package/dist/platform/knowledge/knowledge-manager-internals.d.ts +10 -0
- package/dist/platform/knowledge/knowledge-manager-internals.d.ts.map +1 -0
- package/dist/platform/knowledge/knowledge-manager-internals.js +43 -0
- package/dist/platform/knowledge/knowledge-manager-internals.js.map +1 -0
- package/dist/platform/knowledge/knowledge-manager-store.d.ts +13 -0
- package/dist/platform/knowledge/knowledge-manager-store.d.ts.map +1 -0
- package/dist/platform/knowledge/knowledge-manager-store.js +67 -0
- package/dist/platform/knowledge/knowledge-manager-store.js.map +1 -0
- package/dist/platform/knowledge/knowledge-manager.d.ts +6 -2
- package/dist/platform/knowledge/knowledge-manager.d.ts.map +1 -1
- package/dist/platform/knowledge/knowledge-manager.js +43 -344
- package/dist/platform/knowledge/knowledge-manager.js.map +1 -1
- package/dist/platform/knowledge/memory/memory-lifecycle-storage.d.ts +4 -0
- package/dist/platform/knowledge/memory/memory-lifecycle-storage.d.ts.map +1 -0
- package/dist/platform/knowledge/memory/memory-lifecycle-storage.js +106 -0
- package/dist/platform/knowledge/memory/memory-lifecycle-storage.js.map +1 -0
- package/dist/platform/knowledge/memory/memory-lifecycle.d.ts.map +1 -1
- package/dist/platform/knowledge/memory/memory-lifecycle.js +6 -112
- package/dist/platform/knowledge/memory/memory-lifecycle.js.map +1 -1
- package/dist/platform/knowledge/types/learning.d.ts +2 -2
- package/dist/platform/observation/capability-detector/prompts.d.ts +18 -0
- package/dist/platform/observation/capability-detector/prompts.d.ts.map +1 -0
- package/dist/platform/observation/capability-detector/prompts.js +80 -0
- package/dist/platform/observation/capability-detector/prompts.js.map +1 -0
- package/dist/platform/observation/capability-detector/recommendations.d.ts +5 -0
- package/dist/platform/observation/capability-detector/recommendations.d.ts.map +1 -0
- package/dist/platform/observation/capability-detector/recommendations.js +76 -0
- package/dist/platform/observation/capability-detector/recommendations.js.map +1 -0
- package/dist/platform/observation/capability-detector/types.d.ts +112 -0
- package/dist/platform/observation/capability-detector/types.d.ts.map +1 -0
- package/dist/platform/observation/capability-detector/types.js +75 -0
- package/dist/platform/observation/capability-detector/types.js.map +1 -0
- package/dist/platform/observation/capability-detector.d.ts +4 -9
- package/dist/platform/observation/capability-detector.d.ts.map +1 -1
- package/dist/platform/observation/capability-detector.js +12 -212
- package/dist/platform/observation/capability-detector.js.map +1 -1
- package/dist/platform/observation/context-provider/collector.d.ts +13 -0
- package/dist/platform/observation/context-provider/collector.d.ts.map +1 -0
- package/dist/platform/observation/context-provider/collector.js +259 -0
- package/dist/platform/observation/context-provider/collector.js.map +1 -0
- package/dist/platform/observation/context-provider/search-terms.d.ts +2 -0
- package/dist/platform/observation/context-provider/search-terms.d.ts.map +1 -0
- package/dist/platform/observation/context-provider/search-terms.js +24 -0
- package/dist/platform/observation/context-provider/search-terms.js.map +1 -0
- package/dist/platform/observation/context-provider/shared.d.ts +17 -0
- package/dist/platform/observation/context-provider/shared.d.ts.map +1 -0
- package/dist/platform/observation/context-provider/shared.js +87 -0
- package/dist/platform/observation/context-provider/shared.js.map +1 -0
- package/dist/platform/observation/context-provider.d.ts +3 -28
- package/dist/platform/observation/context-provider.d.ts.map +1 -1
- package/dist/platform/observation/context-provider.js +7 -395
- package/dist/platform/observation/context-provider.js.map +1 -1
- 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/compiled-memory-projections.d.ts +2 -0
- package/dist/platform/soil/compiled-memory-projections.d.ts.map +1 -1
- package/dist/platform/soil/compiled-memory-projections.js +59 -0
- package/dist/platform/soil/compiled-memory-projections.js.map +1 -1
- package/dist/platform/soil/contracts.d.ts +67 -67
- package/dist/platform/soil/importer.d.ts +6 -6
- package/dist/platform/soil/retriever.d.ts +25 -0
- package/dist/platform/soil/retriever.d.ts.map +1 -1
- package/dist/platform/soil/retriever.js +94 -5
- package/dist/platform/soil/retriever.js.map +1 -1
- package/dist/platform/soil/sqlite-repository-helpers.d.ts +80 -0
- package/dist/platform/soil/sqlite-repository-helpers.d.ts.map +1 -0
- package/dist/platform/soil/sqlite-repository-helpers.js +143 -0
- package/dist/platform/soil/sqlite-repository-helpers.js.map +1 -0
- package/dist/platform/soil/sqlite-repository-search.d.ts +8 -0
- package/dist/platform/soil/sqlite-repository-search.d.ts.map +1 -0
- package/dist/platform/soil/sqlite-repository-search.js +367 -0
- package/dist/platform/soil/sqlite-repository-search.js.map +1 -0
- package/dist/platform/soil/sqlite-repository-storage.d.ts +8 -0
- package/dist/platform/soil/sqlite-repository-storage.d.ts.map +1 -0
- package/dist/platform/soil/sqlite-repository-storage.js +278 -0
- package/dist/platform/soil/sqlite-repository-storage.js.map +1 -0
- package/dist/platform/soil/sqlite-repository.d.ts +1 -4
- package/dist/platform/soil/sqlite-repository.d.ts.map +1 -1
- package/dist/platform/soil/sqlite-repository.js +26 -820
- package/dist/platform/soil/sqlite-repository.js.map +1 -1
- 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/index.d.ts +1 -1
- package/dist/runtime/daemon/index.d.ts.map +1 -1
- package/dist/runtime/daemon/index.js +1 -1
- package/dist/runtime/daemon/index.js.map +1 -1
- package/dist/runtime/daemon/maintenance.d.ts +2 -10
- package/dist/runtime/daemon/maintenance.d.ts.map +1 -1
- package/dist/runtime/daemon/maintenance.js +14 -45
- package/dist/runtime/daemon/maintenance.js.map +1 -1
- package/dist/runtime/daemon/runner-bootstrap.d.ts +25 -0
- package/dist/runtime/daemon/runner-bootstrap.d.ts.map +1 -0
- package/dist/runtime/daemon/runner-bootstrap.js +77 -0
- package/dist/runtime/daemon/runner-bootstrap.js.map +1 -0
- package/dist/runtime/daemon/runner-commands.d.ts +13 -9
- package/dist/runtime/daemon/runner-commands.d.ts.map +1 -1
- package/dist/runtime/daemon/runner-commands.js +272 -21
- 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 +62 -6
- package/dist/runtime/daemon/runner-goal-cycle.js.map +1 -1
- package/dist/runtime/daemon/runner-resident-curiosity.d.ts +12 -0
- package/dist/runtime/daemon/runner-resident-curiosity.d.ts.map +1 -0
- package/dist/runtime/daemon/runner-resident-curiosity.js +155 -0
- package/dist/runtime/daemon/runner-resident-curiosity.js.map +1 -0
- package/dist/runtime/daemon/runner-resident-dream.d.ts +20 -0
- package/dist/runtime/daemon/runner-resident-dream.d.ts.map +1 -0
- package/dist/runtime/daemon/runner-resident-dream.js +148 -0
- package/dist/runtime/daemon/runner-resident-dream.js.map +1 -0
- package/dist/runtime/daemon/runner-resident-proactive.d.ts +4 -0
- package/dist/runtime/daemon/runner-resident-proactive.d.ts.map +1 -0
- package/dist/runtime/daemon/runner-resident-proactive.js +113 -0
- package/dist/runtime/daemon/runner-resident-proactive.js.map +1 -0
- package/dist/runtime/daemon/runner-resident-shared.d.ts +40 -0
- package/dist/runtime/daemon/runner-resident-shared.d.ts.map +1 -0
- package/dist/runtime/daemon/runner-resident-shared.js +101 -0
- package/dist/runtime/daemon/runner-resident-shared.js.map +1 -0
- package/dist/runtime/daemon/runner-resident.d.ts +4 -68
- package/dist/runtime/daemon/runner-resident.d.ts.map +1 -1
- package/dist/runtime/daemon/runner-resident.js +4 -506
- package/dist/runtime/daemon/runner-resident.js.map +1 -1
- package/dist/runtime/daemon/runner-runtime.d.ts +12 -0
- package/dist/runtime/daemon/runner-runtime.d.ts.map +1 -0
- package/dist/runtime/daemon/runner-runtime.js +43 -0
- package/dist/runtime/daemon/runner-runtime.js.map +1 -0
- package/dist/runtime/daemon/runner-startup.d.ts.map +1 -1
- package/dist/runtime/daemon/runner-startup.js +15 -6
- package/dist/runtime/daemon/runner-startup.js.map +1 -1
- package/dist/runtime/daemon/runner.d.ts +14 -23
- package/dist/runtime/daemon/runner.d.ts.map +1 -1
- package/dist/runtime/daemon/runner.js +40 -110
- 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/daemon/wait-deadline-resolver.d.ts +5 -2
- package/dist/runtime/daemon/wait-deadline-resolver.d.ts.map +1 -1
- package/dist/runtime/daemon/wait-deadline-resolver.js +55 -35
- package/dist/runtime/daemon/wait-deadline-resolver.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/dispatcher.d.ts +0 -2
- package/dist/runtime/event/dispatcher.d.ts.map +1 -1
- package/dist/runtime/event/dispatcher.js +0 -4
- package/dist/runtime/event/dispatcher.js.map +1 -1
- 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 +6 -2
- package/dist/runtime/executor/goal-worker.d.ts.map +1 -1
- package/dist/runtime/executor/goal-worker.js +7 -2
- package/dist/runtime/executor/goal-worker.js.map +1 -1
- package/dist/runtime/executor/loop-supervisor.d.ts +7 -0
- package/dist/runtime/executor/loop-supervisor.d.ts.map +1 -1
- package/dist/runtime/executor/loop-supervisor.js +72 -17
- 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-cron-reflection.d.ts +31 -0
- package/dist/runtime/schedule/engine-cron-reflection.d.ts.map +1 -0
- package/dist/runtime/schedule/engine-cron-reflection.js +229 -0
- package/dist/runtime/schedule/engine-cron-reflection.js.map +1 -0
- package/dist/runtime/schedule/engine-execution.d.ts +48 -0
- package/dist/runtime/schedule/engine-execution.d.ts.map +1 -0
- package/dist/runtime/schedule/engine-execution.js +424 -0
- package/dist/runtime/schedule/engine-execution.js.map +1 -0
- package/dist/runtime/schedule/engine-heartbeat.d.ts +5 -0
- package/dist/runtime/schedule/engine-heartbeat.d.ts.map +1 -0
- package/dist/runtime/schedule/engine-heartbeat.js +104 -0
- package/dist/runtime/schedule/engine-heartbeat.js.map +1 -0
- package/dist/runtime/schedule/engine-layers.d.ts +4 -1
- package/dist/runtime/schedule/engine-layers.d.ts.map +1 -1
- package/dist/runtime/schedule/engine-layers.js +15 -229
- package/dist/runtime/schedule/engine-layers.js.map +1 -1
- package/dist/runtime/schedule/engine-mutations.d.ts +37 -0
- package/dist/runtime/schedule/engine-mutations.d.ts.map +1 -0
- package/dist/runtime/schedule/engine-mutations.js +263 -0
- package/dist/runtime/schedule/engine-mutations.js.map +1 -0
- package/dist/runtime/schedule/engine.d.ts +13 -39
- package/dist/runtime/schedule/engine.d.ts.map +1 -1
- package/dist/runtime/schedule/engine.js +65 -810
- package/dist/runtime/schedule/engine.js.map +1 -1
- package/dist/runtime/schedule/history.d.ts +20 -4
- package/dist/runtime/schedule/history.d.ts.map +1 -1
- package/dist/runtime/schedule/history.js +8 -0
- package/dist/runtime/schedule/history.js.map +1 -1
- package/dist/runtime/schedule/index.d.ts +1 -0
- package/dist/runtime/schedule/index.d.ts.map +1 -1
- package/dist/runtime/schedule/index.js +1 -0
- package/dist/runtime/schedule/index.js.map +1 -1
- package/dist/runtime/schedule/legacy-cron-migration.d.ts +9 -0
- package/dist/runtime/schedule/legacy-cron-migration.d.ts.map +1 -0
- package/dist/runtime/schedule/legacy-cron-migration.js +89 -0
- package/dist/runtime/schedule/legacy-cron-migration.js.map +1 -0
- package/dist/runtime/schedule/wait-projection.d.ts +6 -0
- package/dist/runtime/schedule/wait-projection.d.ts.map +1 -0
- package/dist/runtime/schedule/wait-projection.js +102 -0
- package/dist/runtime/schedule/wait-projection.js.map +1 -0
- package/dist/runtime/session-registry/registry-helpers.d.ts +34 -0
- package/dist/runtime/session-registry/registry-helpers.d.ts.map +1 -0
- package/dist/runtime/session-registry/registry-helpers.js +241 -0
- package/dist/runtime/session-registry/registry-helpers.js.map +1 -0
- package/dist/runtime/session-registry/registry.d.ts.map +1 -1
- package/dist/runtime/session-registry/registry.js +16 -243
- package/dist/runtime/session-registry/registry.js.map +1 -1
- package/dist/runtime/session-registry/types.d.ts +138 -130
- 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 +80 -34
- 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 +1934 -15
- 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 +234 -14
- package/dist/runtime/types/daemon.d.ts.map +1 -1
- package/dist/runtime/types/daemon.js +29 -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 +162 -54
- package/dist/runtime/types/schedule.d.ts.map +1 -1
- package/dist/runtime/types/schedule.js +15 -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 +2 -1
- package/dist/tools/builtin/exports.d.ts.map +1 -1
- package/dist/tools/builtin/exports.js +2 -1
- package/dist/tools/builtin/exports.js.map +1 -1
- package/dist/tools/builtin/factory.d.ts +7 -0
- package/dist/tools/builtin/factory.d.ts.map +1 -1
- package/dist/tools/builtin/factory.js +26 -3
- package/dist/tools/builtin/factory.js.map +1 -1
- package/dist/tools/fs/FileValidationTool/protected-path-policy.d.ts +1 -0
- package/dist/tools/fs/FileValidationTool/protected-path-policy.d.ts.map +1 -1
- package/dist/tools/fs/FileValidationTool/protected-path-policy.js +17 -4
- package/dist/tools/fs/FileValidationTool/protected-path-policy.js.map +1 -1
- package/dist/tools/fs/ListDirTool/ListDirTool.js +1 -1
- package/dist/tools/fs/ListDirTool/ListDirTool.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/kaggle/paths.d.ts.map +1 -1
- package/dist/tools/kaggle/paths.js +6 -0
- package/dist/tools/kaggle/paths.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/CodeSearchRepairTool/CodeSearchRepairTool.d.ts.map +1 -1
- package/dist/tools/query/CodeSearchRepairTool/CodeSearchRepairTool.js +23 -2
- package/dist/tools/query/CodeSearchRepairTool/CodeSearchRepairTool.js.map +1 -1
- package/dist/tools/query/CodeSearchTool/CodeSearchTool.d.ts.map +1 -1
- package/dist/tools/query/CodeSearchTool/CodeSearchTool.js +24 -2
- package/dist/tools/query/CodeSearchTool/CodeSearchTool.js.map +1 -1
- package/dist/tools/query/MemoryRecallTool/MemoryRecallTool.d.ts +2 -2
- package/dist/tools/query/SoilQueryTool/SoilQueryTool.d.ts.map +1 -1
- package/dist/tools/query/SoilQueryTool/SoilQueryTool.js +43 -9
- package/dist/tools/query/SoilQueryTool/SoilQueryTool.js.map +1 -1
- package/dist/tools/query/code-search-root.d.ts +8 -0
- package/dist/tools/query/code-search-root.d.ts.map +1 -0
- package/dist/tools/query/code-search-root.js +41 -0
- package/dist/tools/query/code-search-root.js.map +1 -0
- 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 +560 -0
- package/dist/tools/query/runtime-session-tools.d.ts.map +1 -0
- package/dist/tools/query/runtime-session-tools.js +1017 -0
- package/dist/tools/query/runtime-session-tools.js.map +1 -0
- package/dist/tools/runtime/LongRunningRuntimeTools.d.ts +821 -0
- package/dist/tools/runtime/LongRunningRuntimeTools.d.ts.map +1 -0
- package/dist/tools/runtime/LongRunningRuntimeTools.js +905 -0
- package/dist/tools/runtime/LongRunningRuntimeTools.js.map +1 -0
- 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/ProcessSessionTool/ProcessSessionTool.d.ts +1 -0
- package/dist/tools/system/ProcessSessionTool/ProcessSessionTool.d.ts.map +1 -1
- package/dist/tools/system/ProcessSessionTool/ProcessSessionTool.js +11 -0
- package/dist/tools/system/ProcessSessionTool/ProcessSessionTool.js.map +1 -1
- package/dist/tools/system/ShellTool/ShellTool.d.ts.map +1 -1
- package/dist/tools/system/ShellTool/ShellTool.js +2 -1
- package/dist/tools/system/ShellTool/ShellTool.js.map +1 -1
- package/dist/tools/system/TestRunnerTool/TestRunnerTool.d.ts +4 -4
- package/dist/tools/types.d.ts +2 -0
- package/dist/tools/types.d.ts.map +1 -1
- package/dist/tools/types.js.map +1 -1
- package/package.json +2 -1
- package/dist/base/types/cron.d.ts +0 -2
- package/dist/base/types/cron.d.ts.map +0 -1
- package/dist/base/types/cron.js +0 -3
- package/dist/base/types/cron.js.map +0 -1
- package/dist/runtime/cron-scheduler.d.ts +0 -13
- package/dist/runtime/cron-scheduler.d.ts.map +0 -1
- package/dist/runtime/cron-scheduler.js +0 -90
- package/dist/runtime/cron-scheduler.js.map +0 -1
- package/dist/runtime/types/cron.d.ts +0 -59
- package/dist/runtime/types/cron.d.ts.map +0 -1
- package/dist/runtime/types/cron.js +0 -13
- package/dist/runtime/types/cron.js.map +0 -1
|
@@ -0,0 +1,424 @@
|
|
|
1
|
+
import { randomUUID } from "node:crypto";
|
|
2
|
+
import { ScheduleResultSchema, } from "../types/schedule.js";
|
|
3
|
+
import { executeHeartbeatEntry } from "./engine-heartbeat.js";
|
|
4
|
+
import { computeNextFireAt } from "./engine-mutations.js";
|
|
5
|
+
const DEFAULT_RETRY_POLICY = {
|
|
6
|
+
enabled: true,
|
|
7
|
+
initial_delay_ms: 30_000,
|
|
8
|
+
max_delay_ms: 15 * 60 * 1000,
|
|
9
|
+
multiplier: 2,
|
|
10
|
+
jitter_factor: 0.2,
|
|
11
|
+
max_attempts: 3,
|
|
12
|
+
max_retry_window_ms: 24 * 60 * 60 * 1000,
|
|
13
|
+
retryable_failure_kinds: ["transient"],
|
|
14
|
+
};
|
|
15
|
+
export function getDueEntriesFromEngine(entries) {
|
|
16
|
+
return getDueEntryDescriptors(entries).map((descriptor) => descriptor.entry);
|
|
17
|
+
}
|
|
18
|
+
export async function runEntryNowForEngine(host, entryId, options = {}) {
|
|
19
|
+
const entry = await host.withScheduleFileLock(async () => {
|
|
20
|
+
await host.refreshEntriesForMutation();
|
|
21
|
+
return host.entries.find((candidate) => candidate.id === entryId) ?? null;
|
|
22
|
+
});
|
|
23
|
+
if (!entry)
|
|
24
|
+
return null;
|
|
25
|
+
const scheduledFor = new Date().toISOString();
|
|
26
|
+
const immediateEntry = { ...entry, enabled: true, next_fire_at: scheduledFor };
|
|
27
|
+
const executedResult = await host.executeEntry(immediateEntry);
|
|
28
|
+
const sideEffects = entry.layer === "probe" ? host.captureExecutionSideEffects(entry.id) : null;
|
|
29
|
+
const applied = await host.withScheduleFileLock(async () => {
|
|
30
|
+
await host.refreshEntriesForMutation();
|
|
31
|
+
const outcome = await applyExecutionOutcome(host, entry.id, executedResult, scheduledFor, {
|
|
32
|
+
preserveEnabled: options.preserveEnabled ?? true,
|
|
33
|
+
});
|
|
34
|
+
if (outcome) {
|
|
35
|
+
host.applyExecutionSideEffects(entry.id, sideEffects);
|
|
36
|
+
await host.writeEntriesAndProject();
|
|
37
|
+
}
|
|
38
|
+
return outcome;
|
|
39
|
+
});
|
|
40
|
+
let finalResult = executedResult;
|
|
41
|
+
if (options.allowEscalation && applied?.entry) {
|
|
42
|
+
const escalationResult = await host.checkEscalation(applied.entry, executedResult);
|
|
43
|
+
if (escalationResult !== null)
|
|
44
|
+
finalResult = escalationResult;
|
|
45
|
+
}
|
|
46
|
+
if (applied) {
|
|
47
|
+
const entryMetadata = applied.entry?.metadata ?? entry.metadata;
|
|
48
|
+
await host.recordHistory({
|
|
49
|
+
entry_id: applied.entry?.id ?? entry.id,
|
|
50
|
+
entry_name: applied.entry?.name ?? entry.name,
|
|
51
|
+
layer: entry.layer,
|
|
52
|
+
result: { ...finalResult, failure_kind: applied.failureKind },
|
|
53
|
+
reason: "manual_run",
|
|
54
|
+
attempt: applied.attempt,
|
|
55
|
+
scheduled_for: scheduledFor,
|
|
56
|
+
started_at: applied.startedAt,
|
|
57
|
+
finished_at: applied.finishedAt,
|
|
58
|
+
retry_at: applied.retryAt,
|
|
59
|
+
failure_kind: applied.failureKind,
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
return { entry: applied?.entry ?? null, result: finalResult, reason: "manual_run" };
|
|
63
|
+
}
|
|
64
|
+
export async function tickEngine(host) {
|
|
65
|
+
const due = await host.withScheduleFileLock(async () => {
|
|
66
|
+
await host.refreshEntriesForMutation();
|
|
67
|
+
const nowMs = Date.now();
|
|
68
|
+
let budgetReset = false;
|
|
69
|
+
for (let i = 0; i < host.entries.length; i++) {
|
|
70
|
+
const e = host.entries[i];
|
|
71
|
+
if (!e.budget_reset_at || new Date(e.budget_reset_at).getTime() <= nowMs) {
|
|
72
|
+
host.entries[i] = {
|
|
73
|
+
...e,
|
|
74
|
+
tokens_used_today: 0,
|
|
75
|
+
budget_reset_at: new Date(nowMs + 24 * 60 * 60 * 1000).toISOString(),
|
|
76
|
+
};
|
|
77
|
+
budgetReset = true;
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
if (budgetReset) {
|
|
81
|
+
await host.writeEntriesAndProject();
|
|
82
|
+
}
|
|
83
|
+
return getDueEntryDescriptors(host.entries);
|
|
84
|
+
});
|
|
85
|
+
const results = [];
|
|
86
|
+
for (const descriptor of due) {
|
|
87
|
+
const executedResult = await host.executeEntry(descriptor.entry);
|
|
88
|
+
const sideEffects = descriptor.entry.layer === "probe"
|
|
89
|
+
? host.captureExecutionSideEffects(descriptor.entry.id)
|
|
90
|
+
: null;
|
|
91
|
+
const applied = await host.withScheduleFileLock(async () => {
|
|
92
|
+
await host.refreshEntriesForMutation();
|
|
93
|
+
const outcome = await applyExecutionOutcome(host, descriptor.entry.id, executedResult, descriptor.scheduledFor);
|
|
94
|
+
if (outcome) {
|
|
95
|
+
host.applyExecutionSideEffects(descriptor.entry.id, sideEffects);
|
|
96
|
+
await host.writeEntriesAndProject();
|
|
97
|
+
}
|
|
98
|
+
return outcome;
|
|
99
|
+
});
|
|
100
|
+
let finalResult = executedResult;
|
|
101
|
+
if (applied?.entry) {
|
|
102
|
+
const escalationResult = await host.checkEscalation(applied.entry, executedResult);
|
|
103
|
+
if (escalationResult !== null)
|
|
104
|
+
finalResult = escalationResult;
|
|
105
|
+
}
|
|
106
|
+
if (applied) {
|
|
107
|
+
const entryMetadata = applied.entry?.metadata ?? descriptor.entry.metadata;
|
|
108
|
+
await host.recordHistory({
|
|
109
|
+
entry_id: applied.entry?.id ?? descriptor.entry.id,
|
|
110
|
+
entry_name: applied.entry?.name ?? descriptor.entry.name,
|
|
111
|
+
layer: descriptor.entry.layer,
|
|
112
|
+
result: { ...finalResult, failure_kind: applied.failureKind },
|
|
113
|
+
reason: descriptor.reason,
|
|
114
|
+
attempt: applied.attempt,
|
|
115
|
+
scheduled_for: descriptor.scheduledFor,
|
|
116
|
+
started_at: applied.startedAt,
|
|
117
|
+
finished_at: applied.finishedAt,
|
|
118
|
+
retry_at: applied.retryAt,
|
|
119
|
+
failure_kind: applied.failureKind,
|
|
120
|
+
activation_kind: entryMetadata?.activation_kind ?? null,
|
|
121
|
+
strategy_id: entryMetadata?.strategy_id ?? null,
|
|
122
|
+
wait_strategy_id: entryMetadata?.wait_strategy_id ?? null,
|
|
123
|
+
internal: entryMetadata?.internal === true,
|
|
124
|
+
});
|
|
125
|
+
}
|
|
126
|
+
results.push(finalResult);
|
|
127
|
+
}
|
|
128
|
+
return results;
|
|
129
|
+
}
|
|
130
|
+
export async function executeEntryForEngine(host, entry) {
|
|
131
|
+
if (entry.layer === "heartbeat")
|
|
132
|
+
return executeHeartbeatEntry(entry, host.logger);
|
|
133
|
+
if (entry.layer === "probe")
|
|
134
|
+
return host.executeProbe(entry);
|
|
135
|
+
if (entry.layer === "cron")
|
|
136
|
+
return host.executeCron(entry);
|
|
137
|
+
if (entry.layer === "goal_trigger")
|
|
138
|
+
return host.executeGoalTrigger(entry);
|
|
139
|
+
host.logger.info(`Skipping unknown layer entry: ${entry.name} (layer=${entry.layer})`);
|
|
140
|
+
return ScheduleResultSchema.parse({
|
|
141
|
+
entry_id: entry.id,
|
|
142
|
+
status: "skipped",
|
|
143
|
+
duration_ms: 0,
|
|
144
|
+
fired_at: new Date().toISOString(),
|
|
145
|
+
});
|
|
146
|
+
}
|
|
147
|
+
export async function executeEscalationTargetEntryForEngine(host, targetEntryId) {
|
|
148
|
+
const targetEntry = await host.withScheduleFileLock(async () => {
|
|
149
|
+
await host.refreshEntriesForMutation();
|
|
150
|
+
return host.entries.find((candidate) => candidate.id === targetEntryId) ?? null;
|
|
151
|
+
});
|
|
152
|
+
if (!targetEntry) {
|
|
153
|
+
host.logger.warn(`Escalation target entry not found: ${targetEntryId}`);
|
|
154
|
+
return null;
|
|
155
|
+
}
|
|
156
|
+
const immediateEntry = { ...targetEntry, enabled: true, next_fire_at: new Date().toISOString() };
|
|
157
|
+
const result = await host.executeEntry(immediateEntry);
|
|
158
|
+
const sideEffects = targetEntry.layer === "probe" ? host.captureExecutionSideEffects(targetEntry.id) : null;
|
|
159
|
+
const applied = await host.withScheduleFileLock(async () => {
|
|
160
|
+
await host.refreshEntriesForMutation();
|
|
161
|
+
const outcome = await applyExecutionOutcome(host, targetEntryId, result, immediateEntry.next_fire_at);
|
|
162
|
+
if (outcome) {
|
|
163
|
+
host.applyExecutionSideEffects(targetEntryId, sideEffects);
|
|
164
|
+
await host.writeEntriesAndProject();
|
|
165
|
+
}
|
|
166
|
+
return outcome;
|
|
167
|
+
});
|
|
168
|
+
if (applied) {
|
|
169
|
+
const entryMetadata = applied.entry?.metadata ?? targetEntry.metadata;
|
|
170
|
+
await host.recordHistory({
|
|
171
|
+
entry_id: targetEntry.id,
|
|
172
|
+
entry_name: targetEntry.name,
|
|
173
|
+
layer: targetEntry.layer,
|
|
174
|
+
result: { ...result, failure_kind: applied.failureKind },
|
|
175
|
+
reason: "escalation_target",
|
|
176
|
+
attempt: applied.attempt,
|
|
177
|
+
scheduled_for: immediateEntry.next_fire_at,
|
|
178
|
+
started_at: applied.startedAt,
|
|
179
|
+
finished_at: applied.finishedAt,
|
|
180
|
+
retry_at: applied.retryAt,
|
|
181
|
+
failure_kind: applied.failureKind,
|
|
182
|
+
activation_kind: entryMetadata?.activation_kind ?? null,
|
|
183
|
+
strategy_id: entryMetadata?.strategy_id ?? null,
|
|
184
|
+
wait_strategy_id: entryMetadata?.wait_strategy_id ?? null,
|
|
185
|
+
internal: entryMetadata?.internal === true,
|
|
186
|
+
});
|
|
187
|
+
}
|
|
188
|
+
return result;
|
|
189
|
+
}
|
|
190
|
+
export async function executeEscalationTargetGoalForEngine(host, goalId) {
|
|
191
|
+
const now = new Date().toISOString();
|
|
192
|
+
if (!host.coreLoop) {
|
|
193
|
+
return ScheduleResultSchema.parse({
|
|
194
|
+
entry_id: randomUUID(),
|
|
195
|
+
status: "error",
|
|
196
|
+
duration_ms: 0,
|
|
197
|
+
fired_at: now,
|
|
198
|
+
goal_id: goalId,
|
|
199
|
+
error_message: "No coreLoop provided for escalation target goal",
|
|
200
|
+
failure_kind: "permanent",
|
|
201
|
+
});
|
|
202
|
+
}
|
|
203
|
+
const startedAt = Date.now();
|
|
204
|
+
try {
|
|
205
|
+
const result = await host.coreLoop.run(goalId, { maxIterations: 10, runPolicy: "bounded" });
|
|
206
|
+
return ScheduleResultSchema.parse({
|
|
207
|
+
entry_id: randomUUID(),
|
|
208
|
+
status: "ok",
|
|
209
|
+
duration_ms: Date.now() - startedAt,
|
|
210
|
+
fired_at: now,
|
|
211
|
+
goal_id: goalId,
|
|
212
|
+
tokens_used: result?.tokensUsed ?? 0,
|
|
213
|
+
});
|
|
214
|
+
}
|
|
215
|
+
catch (error) {
|
|
216
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
217
|
+
host.logger.warn(`Escalation target goal "${goalId}" failed: ${message}`);
|
|
218
|
+
return ScheduleResultSchema.parse({
|
|
219
|
+
entry_id: randomUUID(),
|
|
220
|
+
status: "error",
|
|
221
|
+
duration_ms: Date.now() - startedAt,
|
|
222
|
+
fired_at: now,
|
|
223
|
+
goal_id: goalId,
|
|
224
|
+
error_message: message,
|
|
225
|
+
failure_kind: "transient",
|
|
226
|
+
});
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
export async function checkEscalationForEngine(host, entry, result) {
|
|
230
|
+
const isFailure = result.status === "error" || result.status === "down";
|
|
231
|
+
if (!isFailure)
|
|
232
|
+
return null;
|
|
233
|
+
const escalationEntry = await host.withScheduleFileLock(async () => {
|
|
234
|
+
await host.refreshEntriesForMutation();
|
|
235
|
+
const idx = host.entries.findIndex((e) => e.id === entry.id);
|
|
236
|
+
if (idx === -1)
|
|
237
|
+
return null;
|
|
238
|
+
const current = host.entries[idx];
|
|
239
|
+
const esc = current.escalation;
|
|
240
|
+
if (!esc?.enabled)
|
|
241
|
+
return null;
|
|
242
|
+
const now = Date.now();
|
|
243
|
+
if (current.last_escalation_at) {
|
|
244
|
+
const lastEsc = new Date(current.last_escalation_at).getTime();
|
|
245
|
+
if (now - lastEsc < esc.cooldown_minutes * 60 * 1000) {
|
|
246
|
+
host.logger.info(`Escalation for "${current.name}" suppressed (cooldown)`);
|
|
247
|
+
return null;
|
|
248
|
+
}
|
|
249
|
+
}
|
|
250
|
+
const hourAgo = now - 60 * 60 * 1000;
|
|
251
|
+
const recentTimestamps = (current.escalation_timestamps ?? []).filter((ts) => new Date(ts).getTime() > hourAgo);
|
|
252
|
+
if (recentTimestamps.length >= esc.max_per_hour) {
|
|
253
|
+
host.logger.info(`Escalation for "${current.name}" suppressed (max_per_hour=${esc.max_per_hour} reached)`);
|
|
254
|
+
return null;
|
|
255
|
+
}
|
|
256
|
+
const nowIso = new Date(now).toISOString();
|
|
257
|
+
host.entries[idx] = {
|
|
258
|
+
...current,
|
|
259
|
+
last_escalation_at: nowIso,
|
|
260
|
+
escalation_timestamps: [...recentTimestamps, nowIso],
|
|
261
|
+
};
|
|
262
|
+
await host.writeEntriesAndProject();
|
|
263
|
+
return host.entries[idx];
|
|
264
|
+
});
|
|
265
|
+
if (!escalationEntry?.escalation)
|
|
266
|
+
return null;
|
|
267
|
+
const esc = escalationEntry.escalation;
|
|
268
|
+
await host.dispatchNotification({
|
|
269
|
+
report_type: "schedule_escalation",
|
|
270
|
+
entry_id: escalationEntry.id,
|
|
271
|
+
entry_name: escalationEntry.name,
|
|
272
|
+
target_layer: esc.target_layer,
|
|
273
|
+
target_entry_id: esc.target_entry_id,
|
|
274
|
+
target_goal_id: esc.target_goal_id,
|
|
275
|
+
consecutive_failures: escalationEntry.consecutive_failures,
|
|
276
|
+
});
|
|
277
|
+
host.logger.warn(`Escalating "${escalationEntry.name}" to ${esc.target_layer ?? "unknown"} (failures=${escalationEntry.consecutive_failures})`);
|
|
278
|
+
if (esc.target_goal_id)
|
|
279
|
+
await host.executeEscalationTargetGoal(esc.target_goal_id);
|
|
280
|
+
if (esc.target_entry_id)
|
|
281
|
+
await host.executeEscalationTargetEntry(esc.target_entry_id);
|
|
282
|
+
return ScheduleResultSchema.parse({
|
|
283
|
+
...result,
|
|
284
|
+
status: "escalated",
|
|
285
|
+
escalated_to: esc.target_goal_id ?? esc.target_entry_id ?? esc.target_layer ?? null,
|
|
286
|
+
});
|
|
287
|
+
}
|
|
288
|
+
function getDueEntryDescriptors(entries) {
|
|
289
|
+
const now = Date.now();
|
|
290
|
+
return entries.flatMap((entry) => {
|
|
291
|
+
if (!entry.enabled)
|
|
292
|
+
return [];
|
|
293
|
+
const retryState = entry.retry_state ?? null;
|
|
294
|
+
if (retryState?.next_retry_at) {
|
|
295
|
+
return new Date(retryState.next_retry_at).getTime() <= now
|
|
296
|
+
? [{ entry, reason: "retry", scheduledFor: retryState.next_retry_at }]
|
|
297
|
+
: [];
|
|
298
|
+
}
|
|
299
|
+
return new Date(entry.next_fire_at).getTime() <= now
|
|
300
|
+
? [{ entry, reason: "cadence", scheduledFor: entry.next_fire_at }]
|
|
301
|
+
: [];
|
|
302
|
+
});
|
|
303
|
+
}
|
|
304
|
+
function normalizeRetryPolicy(entry) {
|
|
305
|
+
return { ...DEFAULT_RETRY_POLICY, ...(entry.retry_policy ?? {}) };
|
|
306
|
+
}
|
|
307
|
+
function classifyFailureKind(entry, result) {
|
|
308
|
+
if (result.failure_kind)
|
|
309
|
+
return result.failure_kind;
|
|
310
|
+
const message = `${result.error_message ?? ""}`.toLowerCase();
|
|
311
|
+
const permanentHints = [
|
|
312
|
+
"no cron config",
|
|
313
|
+
"no heartbeat config",
|
|
314
|
+
"no probe config",
|
|
315
|
+
"no coreloop",
|
|
316
|
+
"not found",
|
|
317
|
+
"missing",
|
|
318
|
+
"invalid",
|
|
319
|
+
"unsupported",
|
|
320
|
+
"cannot",
|
|
321
|
+
"schema",
|
|
322
|
+
"permission denied",
|
|
323
|
+
];
|
|
324
|
+
if (permanentHints.some((hint) => message.includes(hint)))
|
|
325
|
+
return "permanent";
|
|
326
|
+
const transientHints = [
|
|
327
|
+
"timeout",
|
|
328
|
+
"timed out",
|
|
329
|
+
"econnrefused",
|
|
330
|
+
"econnreset",
|
|
331
|
+
"etimedout",
|
|
332
|
+
"eai_again",
|
|
333
|
+
"enotfound",
|
|
334
|
+
"network",
|
|
335
|
+
"temporar",
|
|
336
|
+
"unavailable",
|
|
337
|
+
"rate limit",
|
|
338
|
+
"busy",
|
|
339
|
+
"abort",
|
|
340
|
+
];
|
|
341
|
+
if (transientHints.some((hint) => message.includes(hint)))
|
|
342
|
+
return "transient";
|
|
343
|
+
return entry.layer === "goal_trigger" ? "permanent" : "transient";
|
|
344
|
+
}
|
|
345
|
+
function computeRetryDelay(policy, attempt) {
|
|
346
|
+
const baseDelay = policy.initial_delay_ms * Math.pow(policy.multiplier, Math.max(0, attempt - 1));
|
|
347
|
+
const cappedDelay = Math.min(baseDelay, policy.max_delay_ms);
|
|
348
|
+
if (policy.jitter_factor <= 0)
|
|
349
|
+
return cappedDelay;
|
|
350
|
+
const jitter = cappedDelay * policy.jitter_factor * (Math.random() * 2 - 1);
|
|
351
|
+
return Math.max(0, Math.round(cappedDelay + jitter));
|
|
352
|
+
}
|
|
353
|
+
async function applyExecutionOutcome(host, entryId, result, scheduledFor, options = {}) {
|
|
354
|
+
const idx = host.entries.findIndex((candidate) => candidate.id === entryId);
|
|
355
|
+
if (idx === -1)
|
|
356
|
+
return null;
|
|
357
|
+
const entry = host.entries[idx];
|
|
358
|
+
const startedAt = scheduledFor ?? result.fired_at;
|
|
359
|
+
const finishedAt = new Date().toISOString();
|
|
360
|
+
const failureKind = classifyFailureKind(entry, result);
|
|
361
|
+
const isFailure = result.status === "error" || result.status === "down";
|
|
362
|
+
const retryPolicy = normalizeRetryPolicy(entry);
|
|
363
|
+
const currentRetryState = entry.retry_state ?? null;
|
|
364
|
+
let retryAt = null;
|
|
365
|
+
let retryState = null;
|
|
366
|
+
if (isFailure && retryPolicy.enabled && retryPolicy.retryable_failure_kinds.includes(failureKind)) {
|
|
367
|
+
const attempts = (currentRetryState?.attempts ?? 0) + 1;
|
|
368
|
+
const firstFailureAt = currentRetryState?.first_failure_at ?? result.fired_at;
|
|
369
|
+
const windowElapsed = new Date(result.fired_at).getTime() - new Date(firstFailureAt).getTime();
|
|
370
|
+
if (attempts <= retryPolicy.max_attempts && windowElapsed <= retryPolicy.max_retry_window_ms) {
|
|
371
|
+
retryAt = new Date(Date.now() + computeRetryDelay(retryPolicy, attempts)).toISOString();
|
|
372
|
+
retryState = {
|
|
373
|
+
attempts,
|
|
374
|
+
next_retry_at: retryAt,
|
|
375
|
+
last_attempt_at: result.fired_at,
|
|
376
|
+
first_failure_at: firstFailureAt,
|
|
377
|
+
last_failure_kind: failureKind,
|
|
378
|
+
last_error_message: result.error_message ?? null,
|
|
379
|
+
};
|
|
380
|
+
}
|
|
381
|
+
}
|
|
382
|
+
host.entries[idx] = {
|
|
383
|
+
...entry,
|
|
384
|
+
enabled: options.preserveEnabled ? entry.enabled : true,
|
|
385
|
+
last_fired_at: result.fired_at,
|
|
386
|
+
next_fire_at: computeNextFireAt(entry.trigger),
|
|
387
|
+
updated_at: new Date().toISOString(),
|
|
388
|
+
total_executions: entry.total_executions + 1,
|
|
389
|
+
total_tokens_used: entry.total_tokens_used + (result.tokens_used ?? 0),
|
|
390
|
+
tokens_used_today: (entry.tokens_used_today ?? 0) + (result.tokens_used ?? 0),
|
|
391
|
+
consecutive_failures: isFailure ? entry.consecutive_failures + 1 : 0,
|
|
392
|
+
retry_state: retryState,
|
|
393
|
+
};
|
|
394
|
+
const updated = host.entries[idx];
|
|
395
|
+
if (updated.escalation?.circuit_breaker_threshold &&
|
|
396
|
+
updated.consecutive_failures >= updated.escalation.circuit_breaker_threshold) {
|
|
397
|
+
updated.enabled = false;
|
|
398
|
+
host.logger.warn(`Entry "${updated.name}" disabled by circuit breaker (${updated.consecutive_failures}/${updated.escalation.circuit_breaker_threshold})`);
|
|
399
|
+
}
|
|
400
|
+
if (result.status === "down" &&
|
|
401
|
+
updated.heartbeat &&
|
|
402
|
+
updated.consecutive_failures >= updated.heartbeat.failure_threshold) {
|
|
403
|
+
host.logger.warn(`Entry "${updated.name}" reached failure threshold (${updated.consecutive_failures}/${updated.heartbeat.failure_threshold})`);
|
|
404
|
+
if (updated.consecutive_failures === updated.heartbeat.failure_threshold) {
|
|
405
|
+
await host.dispatchNotification({
|
|
406
|
+
report_type: "schedule_heartbeat_failure",
|
|
407
|
+
entry_id: updated.id,
|
|
408
|
+
entry_name: updated.name,
|
|
409
|
+
failure_threshold: updated.heartbeat.failure_threshold,
|
|
410
|
+
consecutive_failures: updated.consecutive_failures,
|
|
411
|
+
layer: updated.layer,
|
|
412
|
+
});
|
|
413
|
+
}
|
|
414
|
+
}
|
|
415
|
+
return {
|
|
416
|
+
entry: updated,
|
|
417
|
+
attempt: retryState?.attempts ?? 0,
|
|
418
|
+
startedAt,
|
|
419
|
+
finishedAt,
|
|
420
|
+
retryAt,
|
|
421
|
+
failureKind,
|
|
422
|
+
};
|
|
423
|
+
}
|
|
424
|
+
//# sourceMappingURL=engine-execution.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"engine-execution.js","sourceRoot":"","sources":["../../../src/runtime/schedule/engine-execution.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EACL,oBAAoB,GAMrB,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAC;AAC9D,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAE1D,MAAM,oBAAoB,GAAwB;IAChD,OAAO,EAAE,IAAI;IACb,gBAAgB,EAAE,MAAM;IACxB,YAAY,EAAE,EAAE,GAAG,EAAE,GAAG,IAAI;IAC5B,UAAU,EAAE,CAAC;IACb,aAAa,EAAE,GAAG;IAClB,YAAY,EAAE,CAAC;IACf,mBAAmB,EAAE,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,IAAI;IACxC,uBAAuB,EAAE,CAAC,WAAW,CAAC;CACvC,CAAC;AA0CF,MAAM,UAAU,uBAAuB,CAAC,OAAwB;IAC9D,OAAO,sBAAsB,CAAC,OAAO,CAAC,CAAC,GAAG,CAAC,CAAC,UAAU,EAAE,EAAE,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC;AAC/E,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,oBAAoB,CACxC,IAA2B,EAC3B,OAAe,EACf,UAAiC,EAAE;IAEnC,MAAM,KAAK,GAAG,MAAM,IAAI,CAAC,oBAAoB,CAAC,KAAK,IAAI,EAAE;QACvD,MAAM,IAAI,CAAC,yBAAyB,EAAE,CAAC;QACvC,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,SAAS,EAAE,EAAE,CAAC,SAAS,CAAC,EAAE,KAAK,OAAO,CAAC,IAAI,IAAI,CAAC;IAC5E,CAAC,CAAC,CAAC;IACH,IAAI,CA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rB,CAAC,CAAC;QACL,CAAC;IACH,CAAC;IAED,OAAO;QACL,KAAK,EAAE,OAAO;QACd,OAAO,EAAE,UAAU,EAAE,QAAQ,IAAI,CAAC;QAClC,SAAS;QACT,UAAU;QACV,OAAO;QACP,WAAW;KACZ,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { type ScheduleEntry, type ScheduleResult } from "../types/schedule.js";
|
|
2
|
+
export declare function executeHeartbeatEntry(entry: ScheduleEntry, logger: {
|
|
3
|
+
error(message: string, context?: Record<string, unknown>): void;
|
|
4
|
+
}): Promise<ScheduleResult>;
|
|
5
|
+
//# sourceMappingURL=engine-heartbeat.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"engine-heartbeat.d.ts","sourceRoot":"","sources":["../../../src/runtime/schedule/engine-heartbeat.ts"],"names":[],"mappings":"AAEA,OAAO,EAEL,KAAK,aAAa,EAClB,KAAK,cAAc,EACpB,MAAM,sBAAsB,CAAC;AAE9B,wBAAsB,qBAAqB,CACzC,KAAK,EAAE,aAAa,EACpB,MAAM,EAAE;IACN,KAAK,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAAC;CACjE,GACA,OAAO,CAAC,cAAc,CAAC,CAwDzB"}
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
import * as net from "node:net";
|
|
2
|
+
import { exec } from "node:child_process";
|
|
3
|
+
import { ScheduleResultSchema, } from "../types/schedule.js";
|
|
4
|
+
export async function executeHeartbeatEntry(entry, logger) {
|
|
5
|
+
const firedAt = new Date().toISOString();
|
|
6
|
+
const start = Date.now();
|
|
7
|
+
const cfg = entry.heartbeat;
|
|
8
|
+
if (!cfg) {
|
|
9
|
+
return ScheduleResultSchema.parse({
|
|
10
|
+
entry_id: entry.id,
|
|
11
|
+
status: "error",
|
|
12
|
+
duration_ms: 0,
|
|
13
|
+
error_message: "No heartbeat config",
|
|
14
|
+
fired_at: firedAt,
|
|
15
|
+
failure_kind: "permanent",
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
try {
|
|
19
|
+
const timeoutMs = cfg.timeout_ms;
|
|
20
|
+
const config = cfg.check_config;
|
|
21
|
+
switch (cfg.check_type) {
|
|
22
|
+
case "http":
|
|
23
|
+
await checkHttp(config.url, timeoutMs);
|
|
24
|
+
break;
|
|
25
|
+
case "tcp":
|
|
26
|
+
await checkTcp(config.host, config.port, timeoutMs);
|
|
27
|
+
break;
|
|
28
|
+
case "process":
|
|
29
|
+
checkProcess(config.pid);
|
|
30
|
+
break;
|
|
31
|
+
case "disk":
|
|
32
|
+
await checkDisk(config.path);
|
|
33
|
+
break;
|
|
34
|
+
case "custom":
|
|
35
|
+
await checkCustom(config.command, timeoutMs);
|
|
36
|
+
break;
|
|
37
|
+
}
|
|
38
|
+
return ScheduleResultSchema.parse({
|
|
39
|
+
entry_id: entry.id,
|
|
40
|
+
status: "ok",
|
|
41
|
+
duration_ms: Date.now() - start,
|
|
42
|
+
fired_at: firedAt,
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
catch (err) {
|
|
46
|
+
const msg = err instanceof Error ? err.message : String(err);
|
|
47
|
+
logger.error(`Heartbeat "${entry.name}" failed: ${msg}`);
|
|
48
|
+
return ScheduleResultSchema.parse({
|
|
49
|
+
entry_id: entry.id,
|
|
50
|
+
status: "down",
|
|
51
|
+
duration_ms: Date.now() - start,
|
|
52
|
+
error_message: msg,
|
|
53
|
+
fired_at: firedAt,
|
|
54
|
+
failure_kind: "transient",
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
async function checkHttp(url, timeoutMs) {
|
|
59
|
+
const controller = new AbortController();
|
|
60
|
+
const timer = setTimeout(() => controller.abort(), timeoutMs);
|
|
61
|
+
try {
|
|
62
|
+
const res = await fetch(url, { signal: controller.signal });
|
|
63
|
+
if (!res.ok)
|
|
64
|
+
throw new Error(`HTTP ${res.status}`);
|
|
65
|
+
}
|
|
66
|
+
finally {
|
|
67
|
+
clearTimeout(timer);
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
function checkTcp(host, port, timeoutMs) {
|
|
71
|
+
return new Promise((resolve, reject) => {
|
|
72
|
+
const socket = net.createConnection({ host, port }, () => {
|
|
73
|
+
socket.destroy();
|
|
74
|
+
resolve();
|
|
75
|
+
});
|
|
76
|
+
socket.setTimeout(timeoutMs);
|
|
77
|
+
socket.on("timeout", () => {
|
|
78
|
+
socket.destroy();
|
|
79
|
+
reject(new Error(`TCP timeout after ${timeoutMs}ms`));
|
|
80
|
+
});
|
|
81
|
+
socket.on("error", (err) => {
|
|
82
|
+
socket.destroy();
|
|
83
|
+
reject(err);
|
|
84
|
+
});
|
|
85
|
+
});
|
|
86
|
+
}
|
|
87
|
+
function checkProcess(pid) {
|
|
88
|
+
process.kill(pid, 0);
|
|
89
|
+
}
|
|
90
|
+
function checkCustom(command, timeoutMs) {
|
|
91
|
+
return new Promise((resolve, reject) => {
|
|
92
|
+
exec(command, { timeout: timeoutMs }, (err) => {
|
|
93
|
+
if (err)
|
|
94
|
+
reject(err);
|
|
95
|
+
else
|
|
96
|
+
resolve();
|
|
97
|
+
});
|
|
98
|
+
});
|
|
99
|
+
}
|
|
100
|
+
async function checkDisk(diskPath) {
|
|
101
|
+
const { statfs } = await import("node:fs/promises");
|
|
102
|
+
await statfs(diskPath);
|
|
103
|
+
}
|
|
104
|
+
//# sourceMappingURL=engine-heartbeat.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"engine-heartbeat.js","sourceRoot":"","sources":["../../../src/runtime/schedule/engine-heartbeat.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,GAAG,MAAM,UAAU,CAAC;AAChC,OAAO,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAC;AAC1C,OAAO,EACL,oBAAoB,GAGrB,MAAM,sBAAsB,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C,QAAQ,CAAC,CAAC;AACzB,CAAC"}
|
|
@@ -10,6 +10,7 @@ import type { StateManager } from "../../base/state/state-manager.js";
|
|
|
10
10
|
import type { HookManager } from "../hook-manager.js";
|
|
11
11
|
import type { MemoryLifecycleManager } from "../../platform/knowledge/memory/memory-lifecycle.js";
|
|
12
12
|
import type { KnowledgeManager } from "../../platform/knowledge/knowledge-manager.js";
|
|
13
|
+
import type { GoalRunActivationContext } from "../../base/types/goal-activation.js";
|
|
13
14
|
interface LayerDeps {
|
|
14
15
|
baseDir?: string;
|
|
15
16
|
dataSourceRegistry?: Map<string, IDataSourceAdapter> | DataSourceRegistry;
|
|
@@ -19,7 +20,9 @@ interface LayerDeps {
|
|
|
19
20
|
};
|
|
20
21
|
coreLoop?: {
|
|
21
22
|
run(goalId: string, options?: {
|
|
22
|
-
maxIterations?: number;
|
|
23
|
+
maxIterations?: number | null;
|
|
24
|
+
runPolicy?: "bounded" | "resident";
|
|
25
|
+
activation?: GoalRunActivationContext;
|
|
23
26
|
}): Promise<any>;
|
|
24
27
|
};
|
|
25
28
|
stateManager?: StateManager;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"engine-layers.d.ts","sourceRoot":"","sources":["../../../src/runtime/schedule/engine-layers.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EAEL,KAAK,aAAa,EAClB,KAAK,cAAc,
|
|
1
|
+
{"version":3,"file":"engine-layers.d.ts","sourceRoot":"","sources":["../../../src/runtime/schedule/engine-layers.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EAEL,KAAK,aAAa,EAClB,KAAK,cAAc,EACpB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,mDAAmD,CAAC;AAC5F,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,mDAAmD,CAAC;AAC5F,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAC/D,OAA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