pulseed 0.6.1 → 0.6.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/adapters/types/a2a.d.ts +24 -24
- package/dist/base/config/global-config.d.ts +4 -4
- package/dist/base/state/state-manager-goal-write.d.ts +1 -1
- package/dist/base/state/state-manager-goal-write.d.ts.map +1 -1
- package/dist/base/state/state-manager.d.ts +2 -6
- package/dist/base/state/state-manager.d.ts.map +1 -1
- package/dist/base/state/state-manager.js.map +1 -1
- package/dist/base/state/state-write-fence.d.ts +7 -0
- package/dist/base/state/state-write-fence.d.ts.map +1 -0
- package/dist/base/state/state-write-fence.js +2 -0
- package/dist/base/state/state-write-fence.js.map +1 -0
- package/dist/base/types/companion.d.ts +2 -0
- package/dist/base/types/companion.d.ts.map +1 -0
- package/dist/base/types/companion.js +2 -0
- package/dist/base/types/companion.js.map +1 -0
- package/dist/base/types/index.d.ts +1 -0
- package/dist/base/types/index.d.ts.map +1 -1
- package/dist/base/types/index.js +1 -0
- package/dist/base/types/index.js.map +1 -1
- package/dist/index.d.ts +4 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -1
- package/dist/index.js.map +1 -1
- package/dist/interface/chat/chat-event-state.d.ts +2 -0
- package/dist/interface/chat/chat-event-state.d.ts.map +1 -1
- package/dist/interface/chat/chat-event-state.js +28 -11
- package/dist/interface/chat/chat-event-state.js.map +1 -1
- package/dist/interface/chat/chat-events.d.ts +9 -1
- package/dist/interface/chat/chat-events.d.ts.map +1 -1
- package/dist/interface/chat/chat-history.d.ts +4739 -1
- package/dist/interface/chat/chat-history.d.ts.map +1 -1
- package/dist/interface/chat/chat-history.js +40 -2
- package/dist/interface/chat/chat-history.js.map +1 -1
- package/dist/interface/chat/chat-runner-commands.d.ts +2 -32
- package/dist/interface/chat/chat-runner-commands.d.ts.map +1 -1
- package/dist/interface/chat/chat-runner-commands.js +2 -2
- package/dist/interface/chat/chat-runner-commands.js.map +1 -1
- package/dist/interface/chat/chat-runner-contracts.d.ts +152 -0
- package/dist/interface/chat/chat-runner-contracts.d.ts.map +1 -0
- package/dist/interface/chat/chat-runner-contracts.js +2 -0
- package/dist/interface/chat/chat-runner-contracts.js.map +1 -0
- package/dist/interface/chat/chat-runner-event-bridge.d.ts +8 -2
- package/dist/interface/chat/chat-runner-event-bridge.d.ts.map +1 -1
- package/dist/interface/chat/chat-runner-event-bridge.js +76 -11
- package/dist/interface/chat/chat-runner-event-bridge.js.map +1 -1
- package/dist/interface/chat/chat-runner-routes.d.ts +66 -12
- package/dist/interface/chat/chat-runner-routes.d.ts.map +1 -1
- package/dist/interface/chat/chat-runner-routes.js +322 -30
- package/dist/interface/chat/chat-runner-routes.js.map +1 -1
- package/dist/interface/chat/chat-runner-runtime.d.ts +1 -1
- package/dist/interface/chat/chat-runner-runtime.d.ts.map +1 -1
- package/dist/interface/chat/chat-runner-runtime.js +4 -0
- package/dist/interface/chat/chat-runner-runtime.js.map +1 -1
- package/dist/interface/chat/chat-runner.d.ts +10 -71
- package/dist/interface/chat/chat-runner.d.ts.map +1 -1
- package/dist/interface/chat/chat-runner.js +403 -58
- package/dist/interface/chat/chat-runner.js.map +1 -1
- package/dist/interface/chat/chat-session-store.d.ts +2 -0
- package/dist/interface/chat/chat-session-store.d.ts.map +1 -1
- package/dist/interface/chat/chat-session-store.js +3 -6
- package/dist/interface/chat/chat-session-store.js.map +1 -1
- package/dist/interface/chat/cross-platform-session-global.d.ts +2 -1
- package/dist/interface/chat/cross-platform-session-global.d.ts.map +1 -1
- package/dist/interface/chat/cross-platform-session-global.js +4 -10
- package/dist/interface/chat/cross-platform-session-global.js.map +1 -1
- package/dist/interface/chat/cross-platform-session.d.ts +30 -1
- package/dist/interface/chat/cross-platform-session.d.ts.map +1 -1
- package/dist/interface/chat/cross-platform-session.js +413 -52
- package/dist/interface/chat/cross-platform-session.js.map +1 -1
- package/dist/interface/chat/event-subscriber.js +2 -2
- package/dist/interface/chat/event-subscriber.js.map +1 -1
- package/dist/interface/chat/failure-recovery.js +1 -1
- package/dist/interface/chat/failure-recovery.js.map +1 -1
- package/dist/interface/chat/freeform-route-classifier.d.ts +5 -5
- package/dist/interface/chat/freeform-route-classifier.js +3 -2
- package/dist/interface/chat/freeform-route-classifier.js.map +1 -1
- package/dist/interface/chat/gateway-setup-status.d.ts +33 -0
- package/dist/interface/chat/gateway-setup-status.d.ts.map +1 -0
- package/dist/interface/chat/gateway-setup-status.js +44 -0
- package/dist/interface/chat/gateway-setup-status.js.map +1 -0
- package/dist/interface/chat/ingress-router.d.ts +22 -0
- package/dist/interface/chat/ingress-router.d.ts.map +1 -1
- package/dist/interface/chat/ingress-router.js +148 -11
- package/dist/interface/chat/ingress-router.js.map +1 -1
- package/dist/interface/chat/operation-progress.d.ts +17 -0
- package/dist/interface/chat/operation-progress.d.ts.map +1 -0
- package/dist/interface/chat/operation-progress.js +29 -0
- package/dist/interface/chat/operation-progress.js.map +1 -0
- package/dist/interface/chat/setup-config-write.d.ts +27 -0
- package/dist/interface/chat/setup-config-write.d.ts.map +1 -0
- package/dist/interface/chat/setup-config-write.js +79 -0
- package/dist/interface/chat/setup-config-write.js.map +1 -0
- package/dist/interface/chat/setup-dialogue.d.ts +199 -0
- package/dist/interface/chat/setup-dialogue.d.ts.map +1 -0
- package/dist/interface/chat/setup-dialogue.js +97 -0
- package/dist/interface/chat/setup-dialogue.js.map +1 -0
- package/dist/interface/chat/setup-secret-intake.d.ts +68 -0
- package/dist/interface/chat/setup-secret-intake.d.ts.map +1 -0
- package/dist/interface/chat/setup-secret-intake.js +84 -0
- package/dist/interface/chat/setup-secret-intake.js.map +1 -0
- package/dist/interface/chat/turn-language.d.ts +23 -0
- package/dist/interface/chat/turn-language.d.ts.map +1 -0
- package/dist/interface/chat/turn-language.js +46 -0
- package/dist/interface/chat/turn-language.js.map +1 -0
- package/dist/interface/cli/cli-command-registry.d.ts +1 -1
- package/dist/interface/cli/cli-command-registry.d.ts.map +1 -1
- package/dist/interface/cli/cli-runner.js +1 -1
- package/dist/interface/cli/cli-runner.js.map +1 -1
- package/dist/interface/cli/commands/daemon.d.ts.map +1 -1
- package/dist/interface/cli/commands/daemon.js +3 -0
- package/dist/interface/cli/commands/daemon.js.map +1 -1
- package/dist/interface/cli/commands/operator-binding-status.d.ts +59 -0
- package/dist/interface/cli/commands/operator-binding-status.d.ts.map +1 -0
- package/dist/interface/cli/commands/operator-binding-status.js +257 -0
- package/dist/interface/cli/commands/operator-binding-status.js.map +1 -0
- package/dist/interface/cli/commands/run.d.ts +2 -2
- package/dist/interface/cli/commands/run.d.ts.map +1 -1
- package/dist/interface/cli/commands/run.js.map +1 -1
- package/dist/interface/cli/commands/runtime.d.ts.map +1 -1
- package/dist/interface/cli/commands/runtime.js +8 -1
- package/dist/interface/cli/commands/runtime.js.map +1 -1
- package/dist/interface/cli/commands/setup/steps-gateway.js +14 -3
- package/dist/interface/cli/commands/setup/steps-gateway.js.map +1 -1
- package/dist/interface/cli/commands/setup-wizard.d.ts +31 -0
- package/dist/interface/cli/commands/setup-wizard.d.ts.map +1 -1
- package/dist/interface/cli/commands/setup-wizard.js +88 -0
- package/dist/interface/cli/commands/setup-wizard.js.map +1 -1
- package/dist/interface/cli/commands/telegram.d.ts.map +1 -1
- package/dist/interface/cli/commands/telegram.js +27 -3
- package/dist/interface/cli/commands/telegram.js.map +1 -1
- package/dist/interface/cli/setup.d.ts +3 -3
- package/dist/interface/cli/setup.d.ts.map +1 -1
- package/dist/interface/cli/setup.js +3 -2
- package/dist/interface/cli/setup.js.map +1 -1
- package/dist/interface/cli/utils/loop-runner.d.ts +1 -1
- package/dist/interface/cli/utils/loop-runner.d.ts.map +1 -1
- package/dist/interface/cli/utils.js +1 -1
- package/dist/interface/tui/actions.d.ts.map +1 -1
- package/dist/interface/tui/actions.js +14 -6
- package/dist/interface/tui/actions.js.map +1 -1
- package/dist/interface/tui/app.d.ts +1 -7
- package/dist/interface/tui/app.d.ts.map +1 -1
- package/dist/interface/tui/app.js +71 -120
- package/dist/interface/tui/app.js.map +1 -1
- package/dist/interface/tui/chat-surface.d.ts +1 -0
- package/dist/interface/tui/chat-surface.d.ts.map +1 -1
- package/dist/interface/tui/chat-surface.js +15 -0
- package/dist/interface/tui/chat-surface.js.map +1 -1
- package/dist/interface/tui/entry-approval.js +2 -2
- package/dist/interface/tui/entry-approval.js.map +1 -1
- package/dist/interface/tui/entry-deps.d.ts +1 -1
- package/dist/interface/tui/entry-deps.d.ts.map +1 -1
- package/dist/interface/tui/entry-deps.js +54 -8
- package/dist/interface/tui/entry-deps.js.map +1 -1
- package/dist/interface/tui/input-action.d.ts +49 -0
- package/dist/interface/tui/input-action.d.ts.map +1 -0
- package/dist/interface/tui/input-action.js +46 -0
- package/dist/interface/tui/input-action.js.map +1 -0
- package/dist/interface/tui/markdown-renderer.d.ts.map +1 -1
- package/dist/interface/tui/markdown-renderer.js +4 -1
- package/dist/interface/tui/markdown-renderer.js.map +1 -1
- package/dist/interface/tui/use-loop.d.ts +1 -1
- package/dist/interface/tui/use-loop.d.ts.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 +14 -0
- package/dist/orchestrator/execution/agent-loop/agent-loop-default-profile.js.map +1 -1
- package/dist/orchestrator/execution/agent-loop/agent-loop-events.d.ts +3 -0
- package/dist/orchestrator/execution/agent-loop/agent-loop-events.d.ts.map +1 -1
- package/dist/orchestrator/execution/agent-loop/agent-loop-events.js.map +1 -1
- package/dist/orchestrator/execution/agent-loop/agent-loop-result.d.ts +17 -0
- package/dist/orchestrator/execution/agent-loop/agent-loop-result.d.ts.map +1 -1
- package/dist/orchestrator/execution/agent-loop/agent-loop-tool-output.d.ts +3 -0
- package/dist/orchestrator/execution/agent-loop/agent-loop-tool-output.d.ts.map +1 -1
- package/dist/orchestrator/execution/agent-loop/agent-loop-tool-runtime.d.ts +1 -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 +20 -3
- package/dist/orchestrator/execution/agent-loop/agent-loop-tool-runtime.js.map +1 -1
- package/dist/orchestrator/execution/agent-loop/agent-loop-trace-store.d.ts.map +1 -1
- package/dist/orchestrator/execution/agent-loop/agent-loop-trace-store.js +5 -3
- package/dist/orchestrator/execution/agent-loop/agent-loop-trace-store.js.map +1 -1
- package/dist/orchestrator/execution/agent-loop/agent-timeline.d.ts +3 -1
- package/dist/orchestrator/execution/agent-loop/agent-timeline.d.ts.map +1 -1
- package/dist/orchestrator/execution/agent-loop/agent-timeline.js +8 -20
- package/dist/orchestrator/execution/agent-loop/agent-timeline.js.map +1 -1
- 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 +38 -25
- 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.map +1 -1
- package/dist/orchestrator/execution/agent-loop/chat-agent-loop-runner.js +20 -4
- 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 +1 -51
- 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 -239
- package/dist/orchestrator/execution/agent-loop/core-loop-control-tools.js.map +1 -1
- package/dist/orchestrator/execution/agent-loop/durable-loop-control-tools.d.ts +60 -0
- package/dist/orchestrator/execution/agent-loop/durable-loop-control-tools.d.ts.map +1 -0
- package/dist/orchestrator/execution/agent-loop/durable-loop-control-tools.js +244 -0
- package/dist/orchestrator/execution/agent-loop/durable-loop-control-tools.js.map +1 -0
- package/dist/orchestrator/execution/agent-loop/index.d.ts +1 -1
- package/dist/orchestrator/execution/agent-loop/index.d.ts.map +1 -1
- package/dist/orchestrator/execution/agent-loop/index.js +1 -1
- package/dist/orchestrator/execution/agent-loop/index.js.map +1 -1
- package/dist/orchestrator/execution/task/task-generation.d.ts +50 -2
- package/dist/orchestrator/execution/task/task-generation.d.ts.map +1 -1
- package/dist/orchestrator/execution/task/task-generation.js +19 -1
- package/dist/orchestrator/execution/task/task-generation.js.map +1 -1
- package/dist/orchestrator/execution/task/task-lifecycle.js +8 -11
- package/dist/orchestrator/execution/task/task-lifecycle.js.map +1 -1
- package/dist/orchestrator/execution/task/task-prompt-builder.d.ts.map +1 -1
- package/dist/orchestrator/execution/task/task-prompt-builder.js +9 -0
- package/dist/orchestrator/execution/task/task-prompt-builder.js.map +1 -1
- package/dist/orchestrator/execution/types/task-group.d.ts +68 -4
- package/dist/orchestrator/execution/types/task-group.d.ts.map +1 -1
- package/dist/orchestrator/execution/types/task.d.ts +100 -2
- package/dist/orchestrator/execution/types/task.d.ts.map +1 -1
- package/dist/orchestrator/execution/types/task.js +10 -0
- package/dist/orchestrator/execution/types/task.js.map +1 -1
- package/dist/orchestrator/goal/goal-decomposer.d.ts.map +1 -1
- package/dist/orchestrator/goal/goal-decomposer.js +2 -1
- package/dist/orchestrator/goal/goal-decomposer.js.map +1 -1
- package/dist/orchestrator/goal/goal-negotiator.d.ts.map +1 -1
- package/dist/orchestrator/goal/goal-negotiator.js +5 -2
- package/dist/orchestrator/goal/goal-negotiator.js.map +1 -1
- package/dist/orchestrator/goal/goal-suggest.d.ts +6 -6
- package/dist/orchestrator/goal/goal-validation.d.ts +4 -5
- package/dist/orchestrator/goal/goal-validation.d.ts.map +1 -1
- package/dist/orchestrator/goal/goal-validation.js +11 -17
- package/dist/orchestrator/goal/goal-validation.js.map +1 -1
- package/dist/orchestrator/goal/negotiator-prompts.d.ts.map +1 -1
- package/dist/orchestrator/goal/negotiator-prompts.js +8 -4
- package/dist/orchestrator/goal/negotiator-prompts.js.map +1 -1
- package/dist/orchestrator/goal/negotiator-steps.d.ts.map +1 -1
- package/dist/orchestrator/goal/negotiator-steps.js +7 -11
- package/dist/orchestrator/goal/negotiator-steps.js.map +1 -1
- package/dist/orchestrator/goal/types/goal-refiner.d.ts +6 -6
- package/dist/orchestrator/goal/types/goal.d.ts +161 -0
- package/dist/orchestrator/goal/types/goal.d.ts.map +1 -1
- package/dist/orchestrator/goal/types/goal.js +8 -0
- package/dist/orchestrator/goal/types/goal.js.map +1 -1
- package/dist/orchestrator/goal/types/negotiation.d.ts +120 -6
- package/dist/orchestrator/goal/types/negotiation.d.ts.map +1 -1
- package/dist/orchestrator/goal/types/negotiation.js +3 -0
- package/dist/orchestrator/goal/types/negotiation.js.map +1 -1
- package/dist/orchestrator/goal/types/suggest.d.ts +6 -6
- package/dist/orchestrator/loop/checkpoint-manager-loop.d.ts +1 -1
- package/dist/orchestrator/loop/checkpoint-manager-loop.d.ts.map +1 -1
- package/dist/orchestrator/loop/core-loop/capability.d.ts +1 -21
- package/dist/orchestrator/loop/core-loop/capability.d.ts.map +1 -1
- package/dist/orchestrator/loop/core-loop/capability.js +1 -150
- package/dist/orchestrator/loop/core-loop/capability.js.map +1 -1
- package/dist/orchestrator/loop/core-loop/contracts.d.ts +1 -318
- package/dist/orchestrator/loop/core-loop/contracts.d.ts.map +1 -1
- package/dist/orchestrator/loop/core-loop/contracts.js +1 -39
- package/dist/orchestrator/loop/core-loop/contracts.js.map +1 -1
- package/dist/orchestrator/loop/core-loop/control.d.ts +1 -26
- package/dist/orchestrator/loop/core-loop/control.d.ts.map +1 -1
- package/dist/orchestrator/loop/core-loop/control.js +1 -71
- package/dist/orchestrator/loop/core-loop/control.js.map +1 -1
- package/dist/orchestrator/loop/core-loop/decision-engine.d.ts +1 -78
- package/dist/orchestrator/loop/core-loop/decision-engine.d.ts.map +1 -1
- package/dist/orchestrator/loop/core-loop/decision-engine.js +1 -144
- package/dist/orchestrator/loop/core-loop/decision-engine.js.map +1 -1
- package/dist/orchestrator/loop/core-loop/dream-review-checkpoint.d.ts +1 -47
- package/dist/orchestrator/loop/core-loop/dream-review-checkpoint.d.ts.map +1 -1
- package/dist/orchestrator/loop/core-loop/dream-review-checkpoint.js +1 -385
- package/dist/orchestrator/loop/core-loop/dream-review-checkpoint.js.map +1 -1
- package/dist/orchestrator/loop/core-loop/evidence-ledger.d.ts +1 -21
- package/dist/orchestrator/loop/core-loop/evidence-ledger.d.ts.map +1 -1
- package/dist/orchestrator/loop/core-loop/evidence-ledger.js +1 -35
- package/dist/orchestrator/loop/core-loop/evidence-ledger.js.map +1 -1
- package/dist/orchestrator/loop/core-loop/iteration-kernel-knowledge.d.ts +1 -6
- package/dist/orchestrator/loop/core-loop/iteration-kernel-knowledge.d.ts.map +1 -1
- package/dist/orchestrator/loop/core-loop/iteration-kernel-knowledge.js +1 -42
- package/dist/orchestrator/loop/core-loop/iteration-kernel-knowledge.js.map +1 -1
- package/dist/orchestrator/loop/core-loop/iteration-kernel-wait.d.ts +1 -13
- package/dist/orchestrator/loop/core-loop/iteration-kernel-wait.d.ts.map +1 -1
- package/dist/orchestrator/loop/core-loop/iteration-kernel-wait.js +1 -40
- package/dist/orchestrator/loop/core-loop/iteration-kernel-wait.js.map +1 -1
- package/dist/orchestrator/loop/core-loop/iteration-kernel.d.ts +1 -36
- package/dist/orchestrator/loop/core-loop/iteration-kernel.d.ts.map +1 -1
- package/dist/orchestrator/loop/core-loop/iteration-kernel.js +1 -834
- package/dist/orchestrator/loop/core-loop/iteration-kernel.js.map +1 -1
- package/dist/orchestrator/loop/core-loop/learning.d.ts +1 -30
- package/dist/orchestrator/loop/core-loop/learning.d.ts.map +1 -1
- package/dist/orchestrator/loop/core-loop/learning.js +1 -91
- package/dist/orchestrator/loop/core-loop/learning.js.map +1 -1
- package/dist/orchestrator/loop/core-loop/phase-policy.d.ts +1 -19
- package/dist/orchestrator/loop/core-loop/phase-policy.d.ts.map +1 -1
- package/dist/orchestrator/loop/core-loop/phase-policy.js +1 -157
- package/dist/orchestrator/loop/core-loop/phase-policy.js.map +1 -1
- package/dist/orchestrator/loop/core-loop/phase-runtime.d.ts +1 -30
- package/dist/orchestrator/loop/core-loop/phase-runtime.d.ts.map +1 -1
- package/dist/orchestrator/loop/core-loop/phase-runtime.js +1 -102
- package/dist/orchestrator/loop/core-loop/phase-runtime.js.map +1 -1
- package/dist/orchestrator/loop/core-loop/phase-specs.d.ts +1 -1268
- package/dist/orchestrator/loop/core-loop/phase-specs.d.ts.map +1 -1
- package/dist/orchestrator/loop/core-loop/phase-specs.js +1 -348
- package/dist/orchestrator/loop/core-loop/phase-specs.js.map +1 -1
- package/dist/orchestrator/loop/core-loop/preparation.d.ts +1 -58
- package/dist/orchestrator/loop/core-loop/preparation.d.ts.map +1 -1
- package/dist/orchestrator/loop/core-loop/preparation.js +1 -367
- package/dist/orchestrator/loop/core-loop/preparation.js.map +1 -1
- package/dist/orchestrator/loop/core-loop/public-research.d.ts +1 -31
- package/dist/orchestrator/loop/core-loop/public-research.d.ts.map +1 -1
- package/dist/orchestrator/loop/core-loop/public-research.js +1 -111
- package/dist/orchestrator/loop/core-loop/public-research.js.map +1 -1
- package/dist/orchestrator/loop/core-loop/task-cycle-stall.d.ts +1 -8
- package/dist/orchestrator/loop/core-loop/task-cycle-stall.d.ts.map +1 -1
- package/dist/orchestrator/loop/core-loop/task-cycle-stall.js +1 -432
- package/dist/orchestrator/loop/core-loop/task-cycle-stall.js.map +1 -1
- package/dist/orchestrator/loop/core-loop/task-cycle-wait.d.ts +1 -10
- package/dist/orchestrator/loop/core-loop/task-cycle-wait.d.ts.map +1 -1
- package/dist/orchestrator/loop/core-loop/task-cycle-wait.js +1 -175
- package/dist/orchestrator/loop/core-loop/task-cycle-wait.js.map +1 -1
- package/dist/orchestrator/loop/core-loop/task-cycle.d.ts +1 -40
- package/dist/orchestrator/loop/core-loop/task-cycle.d.ts.map +1 -1
- package/dist/orchestrator/loop/core-loop/task-cycle.js +1 -429
- package/dist/orchestrator/loop/core-loop/task-cycle.js.map +1 -1
- package/dist/orchestrator/loop/core-loop.d.ts +1 -85
- package/dist/orchestrator/loop/core-loop.d.ts.map +1 -1
- package/dist/orchestrator/loop/core-loop.js +3 -625
- package/dist/orchestrator/loop/core-loop.js.map +1 -1
- package/dist/orchestrator/loop/durable-loop/capability.d.ts +22 -0
- package/dist/orchestrator/loop/durable-loop/capability.d.ts.map +1 -0
- package/dist/orchestrator/loop/durable-loop/capability.js +151 -0
- package/dist/orchestrator/loop/durable-loop/capability.js.map +1 -0
- package/dist/orchestrator/loop/durable-loop/contracts.d.ts +319 -0
- package/dist/orchestrator/loop/durable-loop/contracts.d.ts.map +1 -0
- package/dist/orchestrator/loop/durable-loop/contracts.js +40 -0
- package/dist/orchestrator/loop/durable-loop/contracts.js.map +1 -0
- package/dist/orchestrator/loop/durable-loop/control.d.ts +27 -0
- package/dist/orchestrator/loop/durable-loop/control.d.ts.map +1 -0
- package/dist/orchestrator/loop/durable-loop/control.js +72 -0
- package/dist/orchestrator/loop/durable-loop/control.js.map +1 -0
- package/dist/orchestrator/loop/durable-loop/decision-engine.d.ts +79 -0
- package/dist/orchestrator/loop/durable-loop/decision-engine.d.ts.map +1 -0
- package/dist/orchestrator/loop/durable-loop/decision-engine.js +145 -0
- package/dist/orchestrator/loop/durable-loop/decision-engine.js.map +1 -0
- package/dist/orchestrator/loop/durable-loop/dream-review-checkpoint.d.ts +48 -0
- package/dist/orchestrator/loop/durable-loop/dream-review-checkpoint.d.ts.map +1 -0
- package/dist/orchestrator/loop/durable-loop/dream-review-checkpoint.js +386 -0
- package/dist/orchestrator/loop/durable-loop/dream-review-checkpoint.js.map +1 -0
- package/dist/orchestrator/loop/durable-loop/evidence-ledger.d.ts +22 -0
- package/dist/orchestrator/loop/durable-loop/evidence-ledger.d.ts.map +1 -0
- package/dist/orchestrator/loop/durable-loop/evidence-ledger.js +36 -0
- package/dist/orchestrator/loop/durable-loop/evidence-ledger.js.map +1 -0
- package/dist/orchestrator/loop/durable-loop/iteration-kernel-knowledge.d.ts +7 -0
- package/dist/orchestrator/loop/durable-loop/iteration-kernel-knowledge.d.ts.map +1 -0
- package/dist/orchestrator/loop/durable-loop/iteration-kernel-knowledge.js +43 -0
- package/dist/orchestrator/loop/durable-loop/iteration-kernel-knowledge.js.map +1 -0
- package/dist/orchestrator/loop/durable-loop/iteration-kernel-wait.d.ts +14 -0
- package/dist/orchestrator/loop/durable-loop/iteration-kernel-wait.d.ts.map +1 -0
- package/dist/orchestrator/loop/durable-loop/iteration-kernel-wait.js +41 -0
- package/dist/orchestrator/loop/durable-loop/iteration-kernel-wait.js.map +1 -0
- package/dist/orchestrator/loop/durable-loop/iteration-kernel.d.ts +37 -0
- package/dist/orchestrator/loop/durable-loop/iteration-kernel.d.ts.map +1 -0
- package/dist/orchestrator/loop/durable-loop/iteration-kernel.js +835 -0
- package/dist/orchestrator/loop/durable-loop/iteration-kernel.js.map +1 -0
- package/dist/orchestrator/loop/durable-loop/learning.d.ts +31 -0
- package/dist/orchestrator/loop/durable-loop/learning.d.ts.map +1 -0
- package/dist/orchestrator/loop/durable-loop/learning.js +92 -0
- package/dist/orchestrator/loop/durable-loop/learning.js.map +1 -0
- package/dist/orchestrator/loop/durable-loop/phase-policy.d.ts +20 -0
- package/dist/orchestrator/loop/durable-loop/phase-policy.d.ts.map +1 -0
- package/dist/orchestrator/loop/durable-loop/phase-policy.js +158 -0
- package/dist/orchestrator/loop/durable-loop/phase-policy.js.map +1 -0
- package/dist/orchestrator/loop/durable-loop/phase-runtime.d.ts +31 -0
- package/dist/orchestrator/loop/durable-loop/phase-runtime.d.ts.map +1 -0
- package/dist/orchestrator/loop/durable-loop/phase-runtime.js +103 -0
- package/dist/orchestrator/loop/durable-loop/phase-runtime.js.map +1 -0
- package/dist/orchestrator/loop/durable-loop/phase-specs.d.ts +1269 -0
- package/dist/orchestrator/loop/durable-loop/phase-specs.d.ts.map +1 -0
- package/dist/orchestrator/loop/durable-loop/phase-specs.js +349 -0
- package/dist/orchestrator/loop/durable-loop/phase-specs.js.map +1 -0
- package/dist/orchestrator/loop/durable-loop/preparation.d.ts +59 -0
- package/dist/orchestrator/loop/durable-loop/preparation.d.ts.map +1 -0
- package/dist/orchestrator/loop/durable-loop/preparation.js +368 -0
- package/dist/orchestrator/loop/durable-loop/preparation.js.map +1 -0
- package/dist/orchestrator/loop/durable-loop/public-research.d.ts +32 -0
- package/dist/orchestrator/loop/durable-loop/public-research.d.ts.map +1 -0
- package/dist/orchestrator/loop/durable-loop/public-research.js +112 -0
- package/dist/orchestrator/loop/durable-loop/public-research.js.map +1 -0
- package/dist/orchestrator/loop/durable-loop/task-cycle-stall.d.ts +9 -0
- package/dist/orchestrator/loop/durable-loop/task-cycle-stall.d.ts.map +1 -0
- package/dist/orchestrator/loop/durable-loop/task-cycle-stall.js +464 -0
- package/dist/orchestrator/loop/durable-loop/task-cycle-stall.js.map +1 -0
- package/dist/orchestrator/loop/durable-loop/task-cycle-wait.d.ts +11 -0
- package/dist/orchestrator/loop/durable-loop/task-cycle-wait.d.ts.map +1 -0
- package/dist/orchestrator/loop/durable-loop/task-cycle-wait.js +176 -0
- package/dist/orchestrator/loop/durable-loop/task-cycle-wait.js.map +1 -0
- package/dist/orchestrator/loop/durable-loop/task-cycle.d.ts +41 -0
- package/dist/orchestrator/loop/durable-loop/task-cycle.d.ts.map +1 -0
- package/dist/orchestrator/loop/durable-loop/task-cycle.js +430 -0
- package/dist/orchestrator/loop/durable-loop/task-cycle.js.map +1 -0
- package/dist/orchestrator/loop/durable-loop.d.ts +92 -0
- package/dist/orchestrator/loop/durable-loop.d.ts.map +1 -0
- package/dist/orchestrator/loop/durable-loop.js +631 -0
- package/dist/orchestrator/loop/durable-loop.js.map +1 -0
- package/dist/orchestrator/loop/loop-report-helper.d.ts +1 -1
- package/dist/orchestrator/loop/loop-report-helper.d.ts.map +1 -1
- package/dist/orchestrator/loop/loop-result-types.d.ts +1 -1
- package/dist/orchestrator/loop/loop-result-types.d.ts.map +1 -1
- package/dist/orchestrator/loop/parallel-dispatch.d.ts +2 -2
- package/dist/orchestrator/loop/parallel-dispatch.d.ts.map +1 -1
- package/dist/orchestrator/loop/post-loop-hooks.d.ts +1 -1
- package/dist/orchestrator/loop/post-loop-hooks.d.ts.map +1 -1
- package/dist/orchestrator/loop/run-policy.d.ts +1 -1
- package/dist/orchestrator/loop/run-policy.d.ts.map +1 -1
- package/dist/orchestrator/loop/tree-loop-runner.d.ts +1 -1
- package/dist/orchestrator/loop/tree-loop-runner.d.ts.map +1 -1
- package/dist/orchestrator/loop/tree-loop-runner.js +1 -1
- package/dist/orchestrator/loop/tree-loop-runner.js.map +1 -1
- package/dist/orchestrator/strategy/divergent-exploration.d.ts +2 -1
- package/dist/orchestrator/strategy/divergent-exploration.d.ts.map +1 -1
- package/dist/orchestrator/strategy/divergent-exploration.js +119 -36
- package/dist/orchestrator/strategy/divergent-exploration.js.map +1 -1
- package/dist/orchestrator/strategy/strategy-helpers.d.ts +86 -4
- package/dist/orchestrator/strategy/strategy-helpers.d.ts.map +1 -1
- package/dist/orchestrator/strategy/strategy-manager-base.d.ts +6 -2
- package/dist/orchestrator/strategy/strategy-manager-base.d.ts.map +1 -1
- package/dist/orchestrator/strategy/strategy-manager-base.js +71 -18
- package/dist/orchestrator/strategy/strategy-manager-base.js.map +1 -1
- package/dist/orchestrator/strategy/types/strategy.d.ts +450 -14
- package/dist/orchestrator/strategy/types/strategy.d.ts.map +1 -1
- package/dist/orchestrator/strategy/types/strategy.js +30 -0
- package/dist/orchestrator/strategy/types/strategy.js.map +1 -1
- package/dist/platform/code-search/contracts.d.ts +3 -0
- package/dist/platform/code-search/contracts.d.ts.map +1 -1
- package/dist/platform/code-search/contracts.js.map +1 -1
- package/dist/platform/code-search/indexes/indexer.d.ts.map +1 -1
- package/dist/platform/code-search/indexes/indexer.js +3 -0
- package/dist/platform/code-search/indexes/indexer.js.map +1 -1
- package/dist/platform/code-search/indexes/semantic-index.d.ts.map +1 -1
- package/dist/platform/code-search/indexes/semantic-index.js +3 -0
- package/dist/platform/code-search/indexes/semantic-index.js.map +1 -1
- package/dist/platform/code-search/orchestrator.d.ts.map +1 -1
- package/dist/platform/code-search/orchestrator.js +14 -3
- package/dist/platform/code-search/orchestrator.js.map +1 -1
- package/dist/platform/code-search/query-planner.d.ts.map +1 -1
- package/dist/platform/code-search/query-planner.js +1 -17
- package/dist/platform/code-search/query-planner.js.map +1 -1
- package/dist/platform/code-search/reranker.d.ts +5 -1
- package/dist/platform/code-search/reranker.d.ts.map +1 -1
- package/dist/platform/code-search/reranker.js +9 -5
- package/dist/platform/code-search/reranker.js.map +1 -1
- package/dist/platform/corrections/memory-correction-ledger.d.ts +30 -30
- package/dist/platform/dream/dream-activation.d.ts +161 -1
- package/dist/platform/dream/dream-activation.d.ts.map +1 -1
- package/dist/platform/dream/dream-activation.js +63 -14
- package/dist/platform/dream/dream-activation.js.map +1 -1
- package/dist/platform/dream/dream-event-workflows.d.ts +2 -2
- package/dist/platform/dream/dream-types.d.ts +52 -52
- package/dist/platform/dream/playbook-memory.d.ts +3 -3
- package/dist/platform/drive/stall-detector/repetitive.d.ts.map +1 -1
- package/dist/platform/drive/stall-detector/repetitive.js +50 -5
- package/dist/platform/drive/stall-detector/repetitive.js.map +1 -1
- package/dist/platform/drive/stall-detector.d.ts +19 -0
- package/dist/platform/drive/stall-detector.d.ts.map +1 -1
- package/dist/platform/drive/stall-detector.js.map +1 -1
- package/dist/platform/drive/types/stall.d.ts +1 -1
- package/dist/platform/knowledge/transfer/knowledge-transfer-apply.d.ts.map +1 -1
- package/dist/platform/knowledge/transfer/knowledge-transfer-apply.js +7 -3
- package/dist/platform/knowledge/transfer/knowledge-transfer-apply.js.map +1 -1
- package/dist/platform/knowledge/types/agent-memory.d.ts +46 -46
- package/dist/platform/knowledge/types/embedding.d.ts +4 -4
- package/dist/platform/knowledge/types/knowledge.d.ts +53 -0
- package/dist/platform/knowledge/types/knowledge.d.ts.map +1 -1
- package/dist/platform/knowledge/types/knowledge.js +15 -0
- package/dist/platform/knowledge/types/knowledge.js.map +1 -1
- package/dist/platform/knowledge/types/memory-lifecycle.d.ts +2 -2
- package/dist/platform/observation/capability-detector/types.d.ts +4 -4
- package/dist/platform/observation/context-provider/collector.d.ts +2 -0
- package/dist/platform/observation/context-provider/collector.d.ts.map +1 -1
- package/dist/platform/observation/context-provider/collector.js +27 -2
- package/dist/platform/observation/context-provider/collector.js.map +1 -1
- package/dist/platform/observation/context-provider.d.ts +4 -0
- package/dist/platform/observation/context-provider.d.ts.map +1 -1
- package/dist/platform/observation/context-provider.js.map +1 -1
- package/dist/platform/observation/engine/observe-datasource-stage.d.ts +3 -2
- package/dist/platform/observation/engine/observe-datasource-stage.d.ts.map +1 -1
- package/dist/platform/observation/engine/observe-datasource-stage.js +2 -2
- package/dist/platform/observation/engine/observe-datasource-stage.js.map +1 -1
- package/dist/platform/observation/observation-apply.d.ts +1 -1
- package/dist/platform/observation/observation-apply.d.ts.map +1 -1
- package/dist/platform/observation/observation-apply.js +3 -3
- package/dist/platform/observation/observation-apply.js.map +1 -1
- package/dist/platform/observation/observation-datasource.d.ts +2 -2
- package/dist/platform/observation/observation-datasource.d.ts.map +1 -1
- package/dist/platform/observation/observation-datasource.js +13 -7
- package/dist/platform/observation/observation-datasource.js.map +1 -1
- package/dist/platform/observation/observation-engine.d.ts +1 -1
- package/dist/platform/observation/observation-engine.d.ts.map +1 -1
- package/dist/platform/observation/observation-engine.js +8 -6
- package/dist/platform/observation/observation-engine.js.map +1 -1
- package/dist/platform/observation/types/capability.d.ts +16 -16
- package/dist/platform/observation/workspace-context.d.ts +8 -1
- package/dist/platform/observation/workspace-context.d.ts.map +1 -1
- package/dist/platform/observation/workspace-context.js +35 -14
- package/dist/platform/observation/workspace-context.js.map +1 -1
- package/dist/platform/profile/profile-change-proposal.d.ts +20 -20
- package/dist/platform/profile/relationship-profile.d.ts +6 -6
- package/dist/platform/profile/user-md-profile-import.d.ts +2 -2
- package/dist/platform/soil/contracts.d.ts +98 -98
- package/dist/platform/soil/types.d.ts +8 -8
- package/dist/platform/traits/curiosity-engine.d.ts +2 -5
- package/dist/platform/traits/curiosity-engine.d.ts.map +1 -1
- package/dist/platform/traits/curiosity-engine.js.map +1 -1
- package/dist/platform/traits/curiosity-proposals.d.ts +2 -0
- package/dist/platform/traits/curiosity-proposals.d.ts.map +1 -1
- package/dist/platform/traits/curiosity-proposals.js +36 -17
- package/dist/platform/traits/curiosity-proposals.js.map +1 -1
- package/dist/platform/traits/curiosity-transfer.d.ts +9 -5
- package/dist/platform/traits/curiosity-transfer.d.ts.map +1 -1
- package/dist/platform/traits/curiosity-transfer.js +4 -1
- package/dist/platform/traits/curiosity-transfer.js.map +1 -1
- package/dist/platform/traits/ethics-gate.d.ts +16 -17
- package/dist/platform/traits/ethics-gate.d.ts.map +1 -1
- package/dist/platform/traits/ethics-gate.js +83 -47
- package/dist/platform/traits/ethics-gate.js.map +1 -1
- package/dist/platform/traits/ethics-rules.d.ts +4 -6
- package/dist/platform/traits/ethics-rules.d.ts.map +1 -1
- package/dist/platform/traits/ethics-rules.js +19 -261
- package/dist/platform/traits/ethics-rules.js.map +1 -1
- package/dist/platform/traits/types/curiosity.d.ts +157 -10
- package/dist/platform/traits/types/curiosity.d.ts.map +1 -1
- package/dist/platform/traits/types/curiosity.js +10 -0
- package/dist/platform/traits/types/curiosity.js.map +1 -1
- package/dist/platform/traits/types/guardrail.d.ts +6 -6
- package/dist/prompt/purposes/curiosity.d.ts +4 -4
- package/dist/runtime/approval-broker.d.ts +33 -0
- package/dist/runtime/approval-broker.d.ts.map +1 -1
- package/dist/runtime/approval-broker.js +155 -17
- package/dist/runtime/approval-broker.js.map +1 -1
- package/dist/runtime/companion-policy.d.ts +27 -0
- package/dist/runtime/companion-policy.d.ts.map +1 -0
- package/dist/runtime/companion-policy.js +135 -0
- package/dist/runtime/companion-policy.js.map +1 -0
- package/dist/runtime/confirmation-decision.d.ts +2 -2
- package/dist/runtime/control/daemon-runtime-control-executor.d.ts +0 -6
- package/dist/runtime/control/daemon-runtime-control-executor.d.ts.map +1 -1
- package/dist/runtime/control/daemon-runtime-control-executor.js +1 -1
- package/dist/runtime/control/daemon-runtime-control-executor.js.map +1 -1
- package/dist/runtime/control/index.d.ts +6 -3
- package/dist/runtime/control/index.d.ts.map +1 -1
- package/dist/runtime/control/index.js +2 -1
- package/dist/runtime/control/index.js.map +1 -1
- package/dist/runtime/control/runtime-control-intent.d.ts +16 -1
- package/dist/runtime/control/runtime-control-intent.d.ts.map +1 -1
- package/dist/runtime/control/runtime-control-intent.js +26 -13
- package/dist/runtime/control/runtime-control-intent.js.map +1 -1
- package/dist/runtime/control/runtime-control-service.d.ts +1 -1
- package/dist/runtime/control/runtime-control-service.d.ts.map +1 -1
- package/dist/runtime/control/runtime-control-service.js +29 -64
- package/dist/runtime/control/runtime-control-service.js.map +1 -1
- package/dist/runtime/control/runtime-target-resolver.d.ts +39 -0
- package/dist/runtime/control/runtime-target-resolver.d.ts.map +1 -0
- package/dist/runtime/control/runtime-target-resolver.js +112 -0
- package/dist/runtime/control/runtime-target-resolver.js.map +1 -0
- package/dist/runtime/conversational-approval-decision.d.ts +29 -0
- package/dist/runtime/conversational-approval-decision.d.ts.map +1 -0
- package/dist/runtime/conversational-approval-decision.js +92 -0
- package/dist/runtime/conversational-approval-decision.js.map +1 -0
- package/dist/runtime/daemon/client.d.ts +1 -4
- package/dist/runtime/daemon/client.d.ts.map +1 -1
- package/dist/runtime/daemon/client.js +0 -3
- package/dist/runtime/daemon/client.js.map +1 -1
- package/dist/runtime/daemon/control-contracts.d.ts +7 -0
- package/dist/runtime/daemon/control-contracts.d.ts.map +1 -0
- package/dist/runtime/daemon/control-contracts.js +2 -0
- package/dist/runtime/daemon/control-contracts.js.map +1 -0
- package/dist/runtime/daemon/runner-startup.js +1 -1
- package/dist/runtime/daemon/runner-startup.js.map +1 -1
- package/dist/runtime/daemon/runner.d.ts +1 -1
- package/dist/runtime/daemon/runner.d.ts.map +1 -1
- package/dist/runtime/executor/goal-worker.d.ts +3 -3
- package/dist/runtime/executor/goal-worker.d.ts.map +1 -1
- package/dist/runtime/executor/loop-supervisor.d.ts +2 -2
- package/dist/runtime/executor/loop-supervisor.d.ts.map +1 -1
- package/dist/runtime/executor/loop-supervisor.js +2 -2
- package/dist/runtime/executor/loop-supervisor.js.map +1 -1
- package/dist/runtime/gateway/channel-adapter.d.ts +19 -0
- package/dist/runtime/gateway/channel-adapter.d.ts.map +1 -1
- package/dist/runtime/gateway/channel-policy.d.ts +1 -0
- package/dist/runtime/gateway/channel-policy.d.ts.map +1 -1
- package/dist/runtime/gateway/channel-policy.js +6 -4
- package/dist/runtime/gateway/channel-policy.js.map +1 -1
- package/dist/runtime/gateway/chat-event-rendering.d.ts +34 -0
- package/dist/runtime/gateway/chat-event-rendering.d.ts.map +1 -0
- package/dist/runtime/gateway/chat-event-rendering.js +61 -0
- package/dist/runtime/gateway/chat-event-rendering.js.map +1 -0
- package/dist/runtime/gateway/chat-session-dispatch.d.ts +2 -13
- package/dist/runtime/gateway/chat-session-dispatch.d.ts.map +1 -1
- package/dist/runtime/gateway/chat-session-dispatch.js +6 -3
- package/dist/runtime/gateway/chat-session-dispatch.js.map +1 -1
- package/dist/runtime/gateway/chat-session-port.d.ts +25 -0
- package/dist/runtime/gateway/chat-session-port.d.ts.map +1 -0
- package/dist/runtime/gateway/chat-session-port.js +20 -0
- package/dist/runtime/gateway/chat-session-port.js.map +1 -0
- package/dist/runtime/gateway/discord-gateway-adapter.d.ts +3 -1
- package/dist/runtime/gateway/discord-gateway-adapter.d.ts.map +1 -1
- package/dist/runtime/gateway/discord-gateway-adapter.js +34 -2
- package/dist/runtime/gateway/discord-gateway-adapter.js.map +1 -1
- package/dist/runtime/gateway/index.d.ts +2 -0
- package/dist/runtime/gateway/index.d.ts.map +1 -1
- package/dist/runtime/gateway/index.js +1 -0
- package/dist/runtime/gateway/index.js.map +1 -1
- package/dist/runtime/gateway/ingress-gateway.d.ts.map +1 -1
- package/dist/runtime/gateway/ingress-gateway.js +1 -0
- package/dist/runtime/gateway/ingress-gateway.js.map +1 -1
- package/dist/runtime/gateway/signal-gateway-adapter.d.ts +2 -1
- package/dist/runtime/gateway/signal-gateway-adapter.d.ts.map +1 -1
- package/dist/runtime/gateway/signal-gateway-adapter.js +13 -3
- package/dist/runtime/gateway/signal-gateway-adapter.js.map +1 -1
- package/dist/runtime/gateway/slack-channel-adapter.d.ts +2 -1
- package/dist/runtime/gateway/slack-channel-adapter.d.ts.map +1 -1
- package/dist/runtime/gateway/slack-channel-adapter.js +6 -2
- package/dist/runtime/gateway/slack-channel-adapter.js.map +1 -1
- package/dist/runtime/gateway/telegram-gateway-adapter.d.ts +9 -2
- package/dist/runtime/gateway/telegram-gateway-adapter.d.ts.map +1 -1
- package/dist/runtime/gateway/telegram-gateway-adapter.js +141 -13
- package/dist/runtime/gateway/telegram-gateway-adapter.js.map +1 -1
- package/dist/runtime/gateway/typing-indicator.d.ts +11 -0
- package/dist/runtime/gateway/typing-indicator.d.ts.map +1 -0
- package/dist/runtime/gateway/typing-indicator.js +68 -0
- package/dist/runtime/gateway/typing-indicator.js.map +1 -0
- package/dist/runtime/gateway/whatsapp-gateway-adapter.d.ts +2 -1
- package/dist/runtime/gateway/whatsapp-gateway-adapter.d.ts.map +1 -1
- package/dist/runtime/gateway/whatsapp-gateway-adapter.js +22 -8
- package/dist/runtime/gateway/whatsapp-gateway-adapter.js.map +1 -1
- package/dist/runtime/gateway/ws-channel-adapter.d.ts.map +1 -1
- package/dist/runtime/gateway/ws-channel-adapter.js +1 -0
- package/dist/runtime/gateway/ws-channel-adapter.js.map +1 -1
- package/dist/runtime/interactive-automation/failure-classifier.d.ts +0 -1
- package/dist/runtime/interactive-automation/failure-classifier.d.ts.map +1 -1
- package/dist/runtime/interactive-automation/failure-classifier.js +0 -19
- package/dist/runtime/interactive-automation/failure-classifier.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 +30 -1
- package/dist/runtime/interactive-automation/providers/manus-browser.js.map +1 -1
- package/dist/runtime/logger.d.ts.map +1 -1
- package/dist/runtime/logger.js +5 -2
- package/dist/runtime/logger.js.map +1 -1
- package/dist/runtime/plugin-loader.js +2 -2
- package/dist/runtime/plugin-loader.js.map +1 -1
- package/dist/runtime/run-spec/derive.d.ts +24 -24
- package/dist/runtime/run-spec/derive.d.ts.map +1 -1
- package/dist/runtime/run-spec/derive.js +6 -0
- package/dist/runtime/run-spec/derive.js.map +1 -1
- package/dist/runtime/run-spec/handoff.d.ts +74 -0
- package/dist/runtime/run-spec/handoff.d.ts.map +1 -0
- package/dist/runtime/run-spec/handoff.js +496 -0
- package/dist/runtime/run-spec/handoff.js.map +1 -0
- package/dist/runtime/run-spec/index.d.ts +2 -0
- package/dist/runtime/run-spec/index.d.ts.map +1 -1
- package/dist/runtime/run-spec/index.js +2 -0
- package/dist/runtime/run-spec/index.js.map +1 -1
- package/dist/runtime/run-spec/pending-dialogue-arbiter.d.ts +25 -0
- package/dist/runtime/run-spec/pending-dialogue-arbiter.d.ts.map +1 -0
- package/dist/runtime/run-spec/pending-dialogue-arbiter.js +81 -0
- package/dist/runtime/run-spec/pending-dialogue-arbiter.js.map +1 -0
- package/dist/runtime/run-spec/types.d.ts +91 -42
- package/dist/runtime/run-spec/types.d.ts.map +1 -1
- package/dist/runtime/run-spec/types.js +7 -0
- package/dist/runtime/run-spec/types.js.map +1 -1
- package/dist/runtime/schedule/engine-execution.js +2 -35
- package/dist/runtime/schedule/engine-execution.js.map +1 -1
- package/dist/runtime/schedule/history.d.ts +2 -2
- package/dist/runtime/schedule/presets.d.ts +4 -4
- package/dist/runtime/schedule/source.d.ts +1 -1
- package/dist/runtime/session-registry/registry.d.ts.map +1 -1
- package/dist/runtime/session-registry/registry.js +27 -2
- package/dist/runtime/session-registry/registry.js.map +1 -1
- package/dist/runtime/session-registry/types.d.ts +120 -112
- package/dist/runtime/session-registry/types.d.ts.map +1 -1
- package/dist/runtime/session-registry/types.js +1 -0
- package/dist/runtime/session-registry/types.js.map +1 -1
- package/dist/runtime/store/artifact-retention.d.ts +11 -6
- package/dist/runtime/store/artifact-retention.d.ts.map +1 -1
- package/dist/runtime/store/artifact-retention.js +0 -13
- package/dist/runtime/store/artifact-retention.js.map +1 -1
- 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 +8 -8
- package/dist/runtime/store/dream-checkpoints.d.ts +1 -1
- package/dist/runtime/store/dream-checkpoints.d.ts.map +1 -1
- package/dist/runtime/store/evaluator-results.d.ts +1 -1
- package/dist/runtime/store/evaluator-results.d.ts.map +1 -1
- package/dist/runtime/store/evidence-ledger.d.ts +39 -6377
- package/dist/runtime/store/evidence-ledger.d.ts.map +1 -1
- package/dist/runtime/store/evidence-ledger.js +415 -501
- package/dist/runtime/store/evidence-ledger.js.map +1 -1
- package/dist/runtime/store/evidence-types.d.ts +6378 -0
- package/dist/runtime/store/evidence-types.d.ts.map +1 -0
- package/dist/runtime/store/evidence-types.js +459 -0
- package/dist/runtime/store/evidence-types.js.map +1 -0
- package/dist/runtime/store/experiment-queue-store.d.ts +109 -109
- package/dist/runtime/store/experiment-queue-store.d.ts.map +1 -1
- package/dist/runtime/store/experiment-queue-store.js +1 -1
- package/dist/runtime/store/experiment-queue-store.js.map +1 -1
- package/dist/runtime/store/index.d.ts +4 -4
- package/dist/runtime/store/index.d.ts.map +1 -1
- package/dist/runtime/store/index.js +2 -2
- package/dist/runtime/store/index.js.map +1 -1
- package/dist/runtime/store/metric-history.d.ts +1 -1
- package/dist/runtime/store/metric-history.d.ts.map +1 -1
- package/dist/runtime/store/operator-handoff-store.d.ts +12 -12
- package/dist/runtime/store/postmortem-report.d.ts +38 -38
- package/dist/runtime/store/postmortem-report.js.map +1 -1
- package/dist/runtime/store/proactive-intervention-store.d.ts +8 -8
- package/dist/runtime/store/reproducibility-manifest.d.ts +27 -27
- package/dist/runtime/store/reproducibility-manifest.d.ts.map +1 -1
- package/dist/runtime/store/reproducibility-manifest.js.map +1 -1
- package/dist/runtime/store/research-evidence.d.ts +1 -1
- package/dist/runtime/store/research-evidence.d.ts.map +1 -1
- package/dist/runtime/store/runtime-operation-schemas.d.ts +46 -46
- package/dist/runtime/store/runtime-schemas.d.ts +73 -12
- package/dist/runtime/store/runtime-schemas.d.ts.map +1 -1
- package/dist/runtime/store/runtime-schemas.js +9 -0
- package/dist/runtime/store/runtime-schemas.js.map +1 -1
- package/dist/runtime/types/companion.d.ts +394 -0
- package/dist/runtime/types/companion.d.ts.map +1 -0
- package/dist/runtime/types/companion.js +87 -0
- package/dist/runtime/types/companion.js.map +1 -0
- package/dist/runtime/types/daemon.d.ts +3 -3
- package/dist/runtime/types/hook.d.ts +12 -12
- package/dist/runtime/types/schedule.d.ts +32 -32
- package/dist/tools/builtin/exports.d.ts +2 -0
- package/dist/tools/builtin/exports.d.ts.map +1 -1
- package/dist/tools/builtin/exports.js +2 -0
- package/dist/tools/builtin/exports.js.map +1 -1
- package/dist/tools/builtin/factory.d.ts +10 -1
- package/dist/tools/builtin/factory.d.ts.map +1 -1
- package/dist/tools/builtin/factory.js +18 -1
- package/dist/tools/builtin/factory.js.map +1 -1
- package/dist/tools/executor.d.ts.map +1 -1
- package/dist/tools/executor.js +8 -6
- package/dist/tools/executor.js.map +1 -1
- package/dist/tools/fs/ApplyPatchTool/ApplyPatchTool.d.ts.map +1 -1
- package/dist/tools/fs/ApplyPatchTool/ApplyPatchTool.js +1 -0
- package/dist/tools/fs/ApplyPatchTool/ApplyPatchTool.js.map +1 -1
- package/dist/tools/fs/FileEditTool/FileEditTool.d.ts.map +1 -1
- package/dist/tools/fs/FileEditTool/FileEditTool.js +1 -0
- package/dist/tools/fs/FileEditTool/FileEditTool.js.map +1 -1
- package/dist/tools/fs/FileWriteTool/FileWriteTool.d.ts.map +1 -1
- package/dist/tools/fs/FileWriteTool/FileWriteTool.js +1 -0
- package/dist/tools/fs/FileWriteTool/FileWriteTool.js.map +1 -1
- package/dist/tools/fs/GlobTool/GlobTool.d.ts.map +1 -1
- package/dist/tools/fs/GlobTool/GlobTool.js +1 -0
- package/dist/tools/fs/GlobTool/GlobTool.js.map +1 -1
- package/dist/tools/fs/GrepTool/GrepTool.d.ts.map +1 -1
- package/dist/tools/fs/GrepTool/GrepTool.js +1 -0
- package/dist/tools/fs/GrepTool/GrepTool.js.map +1 -1
- package/dist/tools/fs/JsonQueryTool/JsonQueryTool.d.ts.map +1 -1
- package/dist/tools/fs/JsonQueryTool/JsonQueryTool.js +1 -0
- package/dist/tools/fs/JsonQueryTool/JsonQueryTool.js.map +1 -1
- package/dist/tools/fs/ListDirTool/ListDirTool.d.ts.map +1 -1
- package/dist/tools/fs/ListDirTool/ListDirTool.js +1 -0
- package/dist/tools/fs/ListDirTool/ListDirTool.js.map +1 -1
- package/dist/tools/fs/ReadTool/ReadTool.d.ts.map +1 -1
- package/dist/tools/fs/ReadTool/ReadTool.js +1 -0
- package/dist/tools/fs/ReadTool/ReadTool.js.map +1 -1
- package/dist/tools/kaggle/KaggleSubmissionTools.d.ts +4 -4
- package/dist/tools/kaggle/metrics.d.ts +4 -4
- package/dist/tools/mutation/TaskCreateTool/TaskCreateTool.d.ts +4 -4
- package/dist/tools/mutation/TaskUpdateTool/TaskUpdateTool.d.ts +4 -4
- package/dist/tools/network/GitHubCliTool/GitHubCliTool.d.ts +8 -8
- package/dist/tools/network/HttpFetchTool/HttpFetchTool.d.ts.map +1 -1
- package/dist/tools/network/HttpFetchTool/HttpFetchTool.js +1 -0
- package/dist/tools/network/HttpFetchTool/HttpFetchTool.js.map +1 -1
- package/dist/tools/network/WebSearchTool/WebSearchTool.d.ts.map +1 -1
- package/dist/tools/network/WebSearchTool/WebSearchTool.js +1 -0
- package/dist/tools/network/WebSearchTool/WebSearchTool.js.map +1 -1
- package/dist/tools/query/ArchitectureTool/ArchitectureTool.js +3 -3
- package/dist/tools/query/ArchitectureTool/ArchitectureTool.js.map +1 -1
- package/dist/tools/query/CodeReadContextTool/CodeReadContextTool.d.ts +20 -20
- package/dist/tools/query/CodeReadContextTool/CodeReadContextTool.d.ts.map +1 -1
- package/dist/tools/query/CodeReadContextTool/CodeReadContextTool.js +1 -0
- package/dist/tools/query/CodeReadContextTool/CodeReadContextTool.js.map +1 -1
- package/dist/tools/query/CodeSearchRepairTool/CodeSearchRepairTool.d.ts.map +1 -1
- package/dist/tools/query/CodeSearchRepairTool/CodeSearchRepairTool.js +1 -0
- 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 +1 -0
- package/dist/tools/query/CodeSearchTool/CodeSearchTool.js.map +1 -1
- package/dist/tools/query/KnowledgeQueryTool/KnowledgeQueryTool.d.ts.map +1 -1
- package/dist/tools/query/KnowledgeQueryTool/KnowledgeQueryTool.js +1 -0
- package/dist/tools/query/KnowledgeQueryTool/KnowledgeQueryTool.js.map +1 -1
- package/dist/tools/query/SkillSearchTool/SkillSearchTool.d.ts.map +1 -1
- package/dist/tools/query/SkillSearchTool/SkillSearchTool.js +1 -0
- package/dist/tools/query/SkillSearchTool/SkillSearchTool.js.map +1 -1
- package/dist/tools/query/ToolSearchTool/ToolSearchTool.d.ts.map +1 -1
- package/dist/tools/query/ToolSearchTool/ToolSearchTool.js +1 -0
- package/dist/tools/query/ToolSearchTool/ToolSearchTool.js.map +1 -1
- package/dist/tools/runtime/LongRunningRuntimeTools.d.ts +32 -32
- package/dist/tools/runtime/RunSpecHandoffTools.d.ts +12 -0
- package/dist/tools/runtime/RunSpecHandoffTools.d.ts.map +1 -0
- package/dist/tools/runtime/RunSpecHandoffTools.js +224 -0
- package/dist/tools/runtime/RunSpecHandoffTools.js.map +1 -0
- package/dist/tools/runtime/SetupRuntimeControlTools.d.ts +11 -0
- package/dist/tools/runtime/SetupRuntimeControlTools.d.ts.map +1 -0
- package/dist/tools/runtime/SetupRuntimeControlTools.js +463 -0
- package/dist/tools/runtime/SetupRuntimeControlTools.js.map +1 -0
- package/dist/tools/schedule/CreateScheduleTool/CreateScheduleTool.d.ts +28 -28
- package/dist/tools/schedule/UpdateScheduleTool/UpdateScheduleTool.d.ts +32 -32
- package/dist/tools/system/GitDiffTool/GitDiffTool.d.ts.map +1 -1
- package/dist/tools/system/GitDiffTool/GitDiffTool.js +1 -0
- package/dist/tools/system/GitDiffTool/GitDiffTool.js.map +1 -1
- package/dist/tools/system/GitLogTool/GitLogTool.d.ts.map +1 -1
- package/dist/tools/system/GitLogTool/GitLogTool.js +1 -0
- package/dist/tools/system/GitLogTool/GitLogTool.js.map +1 -1
- package/dist/tools/system/ShellTool/ShellTool.d.ts.map +1 -1
- package/dist/tools/system/ShellTool/ShellTool.js +1 -0
- package/dist/tools/system/ShellTool/ShellTool.js.map +1 -1
- package/dist/tools/system/TestRunnerTool/TestRunnerTool.d.ts.map +1 -1
- package/dist/tools/system/TestRunnerTool/TestRunnerTool.js +1 -0
- package/dist/tools/system/TestRunnerTool/TestRunnerTool.js.map +1 -1
- package/dist/tools/system/UpdatePlanTool/UpdatePlanTool.d.ts.map +1 -1
- package/dist/tools/system/UpdatePlanTool/UpdatePlanTool.js +1 -0
- package/dist/tools/system/UpdatePlanTool/UpdatePlanTool.js.map +1 -1
- package/dist/tools/types.d.ts +62 -2
- package/dist/tools/types.d.ts.map +1 -1
- package/dist/tools/types.js +25 -0
- package/dist/tools/types.js.map +1 -1
- package/package.json +1 -1
- package/dist/interface/tui/approval-overlay.d.ts +0 -8
- package/dist/interface/tui/approval-overlay.d.ts.map +0 -1
- package/dist/interface/tui/approval-overlay.js +0 -21
- package/dist/interface/tui/approval-overlay.js.map +0 -1
|
@@ -0,0 +1,464 @@
|
|
|
1
|
+
import { randomUUID } from "node:crypto";
|
|
2
|
+
import { selectMetricTrendForDimension, summarizeEvidenceMetricTrends, } from "../../../runtime/store/metric-history.js";
|
|
3
|
+
import { gatherStallEvidence } from "../stall-evidence.js";
|
|
4
|
+
import { buildDecisionLineageForStrategy, } from "../../strategy/strategy-manager-base.js";
|
|
5
|
+
import { collectDivergentHypotheses } from "../../strategy/divergent-exploration.js";
|
|
6
|
+
function resolveGoalWorkspacePath(goal) {
|
|
7
|
+
const constraint = goal.constraints.find((entry) => entry.startsWith("workspace_path:"));
|
|
8
|
+
const workspacePath = constraint?.slice("workspace_path:".length).trim();
|
|
9
|
+
return workspacePath || undefined;
|
|
10
|
+
}
|
|
11
|
+
function indexGapHistoryByDimension(goal, gapHistory) {
|
|
12
|
+
const indexedHistory = new Map();
|
|
13
|
+
for (const dim of goal.dimensions) {
|
|
14
|
+
indexedHistory.set(dim.name, []);
|
|
15
|
+
}
|
|
16
|
+
for (const entry of gapHistory) {
|
|
17
|
+
const seenDimensions = new Set();
|
|
18
|
+
for (const gap of entry.gap_vector) {
|
|
19
|
+
if (seenDimensions.has(gap.dimension_name))
|
|
20
|
+
continue;
|
|
21
|
+
seenDimensions.add(gap.dimension_name);
|
|
22
|
+
const dimHistory = indexedHistory.get(gap.dimension_name);
|
|
23
|
+
if (!dimHistory) {
|
|
24
|
+
continue;
|
|
25
|
+
}
|
|
26
|
+
dimHistory.push({
|
|
27
|
+
normalized_gap: gap.normalized_weighted_gap ?? 1,
|
|
28
|
+
timestamp: entry.timestamp,
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
return indexedHistory;
|
|
33
|
+
}
|
|
34
|
+
function buildWaitStrategyActivationContext(ctx, goalId, goal, gapHistoryByDimension) {
|
|
35
|
+
if (!ctx.timeHorizonEngine) {
|
|
36
|
+
return undefined;
|
|
37
|
+
}
|
|
38
|
+
const velocityByDimension = new Map();
|
|
39
|
+
for (const [dimensionName, dimHistory] of gapHistoryByDimension.entries()) {
|
|
40
|
+
if (dimHistory.length < 2)
|
|
41
|
+
continue;
|
|
42
|
+
const currentGap = dimHistory[dimHistory.length - 1]?.normalized_gap;
|
|
43
|
+
if (typeof currentGap !== "number" || !Number.isFinite(currentGap))
|
|
44
|
+
continue;
|
|
45
|
+
const observations = dimHistory.map((entry) => ({
|
|
46
|
+
timestamp: entry.timestamp,
|
|
47
|
+
normalizedGap: entry.normalized_gap,
|
|
48
|
+
}));
|
|
49
|
+
const pacing = ctx.timeHorizonEngine.evaluatePacing(goalId, currentGap, goal.deadline ?? null, observations);
|
|
50
|
+
if (Number.isFinite(pacing.velocityPerHour)) {
|
|
51
|
+
velocityByDimension.set(dimensionName, pacing.velocityPerHour);
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
return {
|
|
55
|
+
getCurrentGap: (_goalId, dimension) => {
|
|
56
|
+
const history = gapHistoryByDimension.get(dimension);
|
|
57
|
+
return history && history.length > 0
|
|
58
|
+
? history[history.length - 1]?.normalized_gap ?? null
|
|
59
|
+
: null;
|
|
60
|
+
},
|
|
61
|
+
canAffordWait: ({ strategy, waitHours, currentGap, initialGap, startedAt }) => {
|
|
62
|
+
const velocityPerHour = velocityByDimension.get(strategy.primary_dimension);
|
|
63
|
+
if (velocityPerHour === undefined) {
|
|
64
|
+
return false;
|
|
65
|
+
}
|
|
66
|
+
const budget = ctx.timeHorizonEngine.getTimeBudget(goal.deadline ?? null, goal.created_at ?? startedAt, currentGap, initialGap, velocityPerHour);
|
|
67
|
+
return budget.canAffordWait(waitHours);
|
|
68
|
+
},
|
|
69
|
+
};
|
|
70
|
+
}
|
|
71
|
+
async function applyStallAction(ctx, goalId, goal, dimHistory, stallReport, escalationLevel, incrementDimName, result, logPrefix, stallActionHints, waitActivationContext) {
|
|
72
|
+
if (ctx.deps.learningPipeline) {
|
|
73
|
+
try {
|
|
74
|
+
await ctx.deps.learningPipeline.onStallDetected(goalId, stallReport);
|
|
75
|
+
}
|
|
76
|
+
catch {
|
|
77
|
+
// non-fatal
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
const activeStrategyForRecord = await Promise.resolve(ctx.deps.strategyManager.getActiveStrategy(goalId)).catch(() => null);
|
|
81
|
+
const strategyIdForRecord = activeStrategyForRecord?.id ?? "unknown";
|
|
82
|
+
const metricTrendContext = stallReport.metric_trend_context;
|
|
83
|
+
const failedLineages = await loadFailedLineageContexts(ctx, goalId);
|
|
84
|
+
if (metricTrendContext) {
|
|
85
|
+
result.metricTrendContext = metricTrendContext;
|
|
86
|
+
ctx.logger?.info(`CoreLoop: ${logPrefix}metric trend evidence — ${metricTrendContext.summary}`, {
|
|
87
|
+
goalId,
|
|
88
|
+
metricTrend: metricTrendContext.trend,
|
|
89
|
+
metricKey: metricTrendContext.metric_key,
|
|
90
|
+
latestValue: metricTrendContext.latest_value,
|
|
91
|
+
bestValue: metricTrendContext.best_value,
|
|
92
|
+
});
|
|
93
|
+
}
|
|
94
|
+
const analysis = ctx.deps.stallDetector.analyzeStallCause?.(dimHistory);
|
|
95
|
+
result.stallAnalysis = analysis;
|
|
96
|
+
const selectedAction = analysis?.recommended_action === "escalate"
|
|
97
|
+
? "escalate"
|
|
98
|
+
: stallActionHints?.recommendedAction ?? analysis?.recommended_action ?? "pivot";
|
|
99
|
+
if (selectedAction === "continue") {
|
|
100
|
+
ctx.logger?.info(`CoreLoop: ${logPrefix}stall CONTINUE — replanning evidence prefers continuing current strategy`, {
|
|
101
|
+
goalId,
|
|
102
|
+
evidence: analysis?.evidence,
|
|
103
|
+
});
|
|
104
|
+
}
|
|
105
|
+
else if (stallReport.suggested_cause === "information_deficit" && ctx.deps.goalRefiner) {
|
|
106
|
+
ctx.logger?.info(`CoreLoop: ${logPrefix}observation-failure stall — calling reRefineLeaf`, { goalId });
|
|
107
|
+
try {
|
|
108
|
+
await ctx.deps.goalRefiner.reRefineLeaf(goalId, stallReport.suggested_cause);
|
|
109
|
+
}
|
|
110
|
+
catch (reRefineErr) {
|
|
111
|
+
ctx.logger?.warn(`CoreLoop: ${logPrefix}reRefineLeaf failed (non-fatal)`, {
|
|
112
|
+
goalId,
|
|
113
|
+
err: reRefineErr instanceof Error ? reRefineErr.message : String(reRefineErr),
|
|
114
|
+
});
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
else if (selectedAction === "refine") {
|
|
118
|
+
ctx.logger?.info(`CoreLoop: ${logPrefix}stall REFINE — parameter_issue detected, keeping strategy`, {
|
|
119
|
+
goalId,
|
|
120
|
+
evidence: analysis?.evidence,
|
|
121
|
+
});
|
|
122
|
+
}
|
|
123
|
+
else if (selectedAction === "escalate") {
|
|
124
|
+
ctx.logger?.warn(`CoreLoop: ${logPrefix}stall ESCALATE — goal_unreachable detected`, {
|
|
125
|
+
goalId,
|
|
126
|
+
evidence: analysis?.evidence,
|
|
127
|
+
});
|
|
128
|
+
await callStrategyOnStall(ctx, [
|
|
129
|
+
goalId,
|
|
130
|
+
3,
|
|
131
|
+
goal.origin ?? "general",
|
|
132
|
+
waitActivationContext,
|
|
133
|
+
metricTrendContext,
|
|
134
|
+
failedLineages,
|
|
135
|
+
]);
|
|
136
|
+
await appendDivergentRecoveryEvidence(ctx, goalId, result, stallReport);
|
|
137
|
+
result.pivotOccurred = true;
|
|
138
|
+
}
|
|
139
|
+
else {
|
|
140
|
+
const portfolio = await ctx.deps.strategyManager.getPortfolio(goalId);
|
|
141
|
+
const activeStrategy = portfolio?.strategies.find((s) => s.state === "active");
|
|
142
|
+
const pivotCount = activeStrategy?.pivot_count ?? 0;
|
|
143
|
+
const maxPivotCount = activeStrategy?.max_pivot_count ?? 2;
|
|
144
|
+
if (pivotCount >= maxPivotCount) {
|
|
145
|
+
ctx.logger?.warn(`CoreLoop: ${logPrefix}stall auto-ESCALATE — pivot_count limit reached`, {
|
|
146
|
+
goalId,
|
|
147
|
+
pivotCount,
|
|
148
|
+
maxPivotCount,
|
|
149
|
+
});
|
|
150
|
+
await callStrategyOnStall(ctx, [
|
|
151
|
+
goalId,
|
|
152
|
+
3,
|
|
153
|
+
goal.origin ?? "general",
|
|
154
|
+
waitActivationContext,
|
|
155
|
+
metricTrendContext,
|
|
156
|
+
failedLineages,
|
|
157
|
+
]);
|
|
158
|
+
await appendDivergentRecoveryEvidence(ctx, goalId, result, stallReport);
|
|
159
|
+
result.pivotOccurred = true;
|
|
160
|
+
}
|
|
161
|
+
else {
|
|
162
|
+
const newStrategy = await callStrategyOnStall(ctx, [
|
|
163
|
+
goalId,
|
|
164
|
+
escalationLevel + 1,
|
|
165
|
+
goal.origin ?? "general",
|
|
166
|
+
waitActivationContext,
|
|
167
|
+
metricTrendContext,
|
|
168
|
+
failedLineages,
|
|
169
|
+
]);
|
|
170
|
+
if (newStrategy) {
|
|
171
|
+
await appendDivergentRecoveryEvidence(ctx, goalId, result, stallReport);
|
|
172
|
+
result.pivotOccurred = true;
|
|
173
|
+
if (activeStrategy?.id) {
|
|
174
|
+
try {
|
|
175
|
+
await ctx.deps.strategyManager.incrementPivotCount(goalId, activeStrategy.id);
|
|
176
|
+
}
|
|
177
|
+
catch {
|
|
178
|
+
// non-fatal
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
if (ctx.deps.knowledgeManager) {
|
|
185
|
+
try {
|
|
186
|
+
const latestGap = dimHistory[dimHistory.length - 1]?.normalized_gap ?? 1;
|
|
187
|
+
const recordedDecision = selectedAction === "continue" ? "proceed" : selectedAction;
|
|
188
|
+
const decisionLineage = buildDecisionLineageForStrategy(activeStrategyForRecord);
|
|
189
|
+
await ctx.deps.knowledgeManager.recordDecision({
|
|
190
|
+
id: randomUUID(),
|
|
191
|
+
goal_id: goalId,
|
|
192
|
+
goal_type: goal.origin ?? "general",
|
|
193
|
+
strategy_id: strategyIdForRecord,
|
|
194
|
+
hypothesis: activeStrategyForRecord?.hypothesis,
|
|
195
|
+
...(decisionLineage ? { lineage: decisionLineage } : {}),
|
|
196
|
+
decision: recordedDecision,
|
|
197
|
+
context: {
|
|
198
|
+
gap_value: latestGap,
|
|
199
|
+
stall_count: stallReport.escalation_level,
|
|
200
|
+
cycle_count: dimHistory.length,
|
|
201
|
+
trust_score: 0,
|
|
202
|
+
},
|
|
203
|
+
outcome: "pending",
|
|
204
|
+
timestamp: new Date().toISOString(),
|
|
205
|
+
what_worked: [],
|
|
206
|
+
what_failed: [],
|
|
207
|
+
suggested_next: [],
|
|
208
|
+
});
|
|
209
|
+
}
|
|
210
|
+
catch {
|
|
211
|
+
// non-fatal
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
if (incrementDimName) {
|
|
215
|
+
await ctx.deps.stallDetector.incrementEscalation(goalId, incrementDimName);
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
async function callStrategyOnStall(ctx, args) {
|
|
219
|
+
const [goalId, stallCount, goalType, activationContext, metricTrendContext] = args;
|
|
220
|
+
const failedLineages = args[5];
|
|
221
|
+
const hasFailedLineages = failedLineages !== undefined && failedLineages.length > 0;
|
|
222
|
+
if (metricTrendContext) {
|
|
223
|
+
return hasFailedLineages
|
|
224
|
+
? ctx.deps.strategyManager.onStallDetected(goalId, stallCount, goalType, activationContext, metricTrendContext, failedLineages)
|
|
225
|
+
: ctx.deps.strategyManager.onStallDetected(goalId, stallCount, goalType, activationContext, metricTrendContext);
|
|
226
|
+
}
|
|
227
|
+
return hasFailedLineages
|
|
228
|
+
? ctx.deps.strategyManager.onStallDetected(goalId, stallCount, goalType, activationContext, undefined, failedLineages)
|
|
229
|
+
: ctx.deps.strategyManager.onStallDetected(goalId, stallCount, goalType, activationContext);
|
|
230
|
+
}
|
|
231
|
+
async function loadMetricTrendContexts(ctx, goalId) {
|
|
232
|
+
const readByGoal = ctx.deps.evidenceLedger?.readByGoal;
|
|
233
|
+
if (!readByGoal)
|
|
234
|
+
return [];
|
|
235
|
+
try {
|
|
236
|
+
const read = await readByGoal.call(ctx.deps.evidenceLedger, goalId);
|
|
237
|
+
return summarizeEvidenceMetricTrends(read.entries);
|
|
238
|
+
}
|
|
239
|
+
catch (err) {
|
|
240
|
+
ctx.logger?.warn("CoreLoop: metric trend history unavailable (non-fatal)", {
|
|
241
|
+
goalId,
|
|
242
|
+
error: err instanceof Error ? err.message : String(err),
|
|
243
|
+
});
|
|
244
|
+
return [];
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
async function loadFailedLineageContexts(ctx, goalId) {
|
|
248
|
+
const summarizeGoal = ctx.deps.evidenceLedger?.summarizeGoal;
|
|
249
|
+
if (!summarizeGoal)
|
|
250
|
+
return [];
|
|
251
|
+
try {
|
|
252
|
+
const summary = await summarizeGoal.call(ctx.deps.evidenceLedger, goalId);
|
|
253
|
+
return summary.failed_lineages;
|
|
254
|
+
}
|
|
255
|
+
catch (err) {
|
|
256
|
+
ctx.logger?.warn("CoreLoop: failed lineage summary unavailable (non-fatal)", {
|
|
257
|
+
goalId,
|
|
258
|
+
error: err instanceof Error ? err.message : String(err),
|
|
259
|
+
});
|
|
260
|
+
return [];
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
async function appendDivergentRecoveryEvidence(ctx, goalId, result, stallReport) {
|
|
264
|
+
let hypotheses = [];
|
|
265
|
+
try {
|
|
266
|
+
const portfolio = await ctx.deps.strategyManager.getPortfolio(goalId);
|
|
267
|
+
hypotheses = collectDivergentHypotheses(portfolio?.strategies ?? []);
|
|
268
|
+
}
|
|
269
|
+
catch {
|
|
270
|
+
return;
|
|
271
|
+
}
|
|
272
|
+
if (hypotheses.length === 0)
|
|
273
|
+
return;
|
|
274
|
+
result.divergentExploration = {
|
|
275
|
+
trigger: stallReport.stall_type === "predicted_plateau" || stallReport.stall_type === "predicted_regression"
|
|
276
|
+
? stallReport.stall_type
|
|
277
|
+
: stallReport.stall_type === "global_stall"
|
|
278
|
+
? "global_stall"
|
|
279
|
+
: "dimension_stall",
|
|
280
|
+
candidates: hypotheses,
|
|
281
|
+
};
|
|
282
|
+
const append = ctx.deps.evidenceLedger?.append;
|
|
283
|
+
if (!append)
|
|
284
|
+
return;
|
|
285
|
+
try {
|
|
286
|
+
const entries = await append.call(ctx.deps.evidenceLedger, {
|
|
287
|
+
kind: "strategy",
|
|
288
|
+
scope: { goal_id: goalId, loop_index: result.loopIndex, phase: "divergent_stall_recovery" },
|
|
289
|
+
divergent_exploration: hypotheses,
|
|
290
|
+
outcome: "continued",
|
|
291
|
+
summary: `Divergent stall recovery proposed ${hypotheses.length} speculative hypothesis candidate(s).`,
|
|
292
|
+
raw_refs: stallReport.metric_trend_context?.source_refs.flatMap((source) => source.raw_refs?.map((ref) => ({
|
|
293
|
+
kind: ref.kind,
|
|
294
|
+
id: ref.id,
|
|
295
|
+
path: ref.path,
|
|
296
|
+
state_relative_path: ref.state_relative_path,
|
|
297
|
+
url: ref.url,
|
|
298
|
+
})) ?? []) ?? [],
|
|
299
|
+
});
|
|
300
|
+
result.divergentExploration.evidenceEntryId = entries[0]?.id;
|
|
301
|
+
}
|
|
302
|
+
catch (err) {
|
|
303
|
+
ctx.logger?.warn("CoreLoop: divergent stall recovery evidence write failed (non-fatal)", {
|
|
304
|
+
goalId,
|
|
305
|
+
error: err instanceof Error ? err.message : String(err),
|
|
306
|
+
});
|
|
307
|
+
}
|
|
308
|
+
}
|
|
309
|
+
async function requestPredictedDivergentExploration(ctx, goalId, goal, dimHistory, stallReport, result, trigger) {
|
|
310
|
+
const planner = ctx.deps.strategyManager;
|
|
311
|
+
if (!planner.prepareDivergentExplorationOnStall)
|
|
312
|
+
return;
|
|
313
|
+
const dimension = stallReport.dimension_name ?? goal.dimensions[0]?.name ?? "";
|
|
314
|
+
const failedLineages = await loadFailedLineageContexts(ctx, goalId);
|
|
315
|
+
try {
|
|
316
|
+
await planner.prepareDivergentExplorationOnStall(goalId, {
|
|
317
|
+
primaryDimension: dimension,
|
|
318
|
+
targetDimensions: goal.dimensions.map((entry) => entry.name),
|
|
319
|
+
currentGap: dimHistory[dimHistory.length - 1]?.normalized_gap ?? 1,
|
|
320
|
+
stallCount: Math.max(2, stallReport.escalation_level),
|
|
321
|
+
trigger,
|
|
322
|
+
...(stallReport.metric_trend_context ? { metricTrendContext: stallReport.metric_trend_context } : {}),
|
|
323
|
+
...(failedLineages.length > 0 ? { failedLineages } : {}),
|
|
324
|
+
});
|
|
325
|
+
await appendDivergentRecoveryEvidence(ctx, goalId, result, stallReport);
|
|
326
|
+
}
|
|
327
|
+
catch (err) {
|
|
328
|
+
ctx.logger?.warn("CoreLoop: predicted plateau divergent exploration failed (non-fatal)", {
|
|
329
|
+
goalId,
|
|
330
|
+
trigger,
|
|
331
|
+
error: err instanceof Error ? err.message : String(err),
|
|
332
|
+
});
|
|
333
|
+
}
|
|
334
|
+
}
|
|
335
|
+
async function checkGlobalStall(ctx, goalId, goal, result, gapHistoryByDimension, suppressedDimensions, stallActionHints, waitActivationContext) {
|
|
336
|
+
const activeGapHistoryByDimension = suppressedDimensions.size === 0
|
|
337
|
+
? gapHistoryByDimension
|
|
338
|
+
: new Map(Array.from(gapHistoryByDimension.entries()).filter(([dimensionName]) => !suppressedDimensions.has(dimensionName)));
|
|
339
|
+
if (activeGapHistoryByDimension.size === 0) {
|
|
340
|
+
return;
|
|
341
|
+
}
|
|
342
|
+
const globalStall = ctx.deps.stallDetector.checkGlobalStall(goalId, activeGapHistoryByDimension);
|
|
343
|
+
if (!globalStall)
|
|
344
|
+
return;
|
|
345
|
+
result.stallDetected = true;
|
|
346
|
+
result.stallReport = globalStall;
|
|
347
|
+
const firstActiveDimension = goal.dimensions.find((dimension) => !suppressedDimensions.has(dimension.name))?.name
|
|
348
|
+
?? activeGapHistoryByDimension.keys().next().value
|
|
349
|
+
?? "";
|
|
350
|
+
const firstDimHistory = activeGapHistoryByDimension.get(firstActiveDimension) ?? [];
|
|
351
|
+
await applyStallAction(ctx, goalId, goal, firstDimHistory, globalStall, 1, firstActiveDimension, result, "global ", stallActionHints, waitActivationContext);
|
|
352
|
+
}
|
|
353
|
+
async function rebalancePortfolio(ctx, goalId, goal, waitActivationContext) {
|
|
354
|
+
if (!ctx.deps.portfolioManager)
|
|
355
|
+
return;
|
|
356
|
+
try {
|
|
357
|
+
const rebalanceTrigger = await ctx.deps.portfolioManager.shouldRebalance(goalId);
|
|
358
|
+
if (rebalanceTrigger) {
|
|
359
|
+
const rebalanceResult = await ctx.deps.portfolioManager.rebalance(goalId, rebalanceTrigger);
|
|
360
|
+
if (rebalanceResult.new_generation_needed) {
|
|
361
|
+
await ctx.deps.strategyManager.onStallDetected(goalId, 3, goal.origin ?? "general", waitActivationContext);
|
|
362
|
+
}
|
|
363
|
+
}
|
|
364
|
+
}
|
|
365
|
+
catch {
|
|
366
|
+
// non-fatal
|
|
367
|
+
}
|
|
368
|
+
}
|
|
369
|
+
export async function detectStallsAndRebalance(ctx, goalId, goal, result, stallActionHints) {
|
|
370
|
+
try {
|
|
371
|
+
const gapHistory = await ctx.deps.stateManager.loadGapHistory(goalId);
|
|
372
|
+
const gapHistoryByDimension = indexGapHistoryByDimension(goal, gapHistory);
|
|
373
|
+
const metricTrends = await loadMetricTrendContexts(ctx, goalId);
|
|
374
|
+
const waitActivationContext = buildWaitStrategyActivationContext(ctx, goalId, goal, gapHistoryByDimension);
|
|
375
|
+
if (ctx.toolExecutor) {
|
|
376
|
+
try {
|
|
377
|
+
const workspacePath = resolveGoalWorkspacePath(goal);
|
|
378
|
+
const toolContext = {
|
|
379
|
+
cwd: workspacePath ?? process.cwd(),
|
|
380
|
+
goalId,
|
|
381
|
+
trustBalance: 0,
|
|
382
|
+
preApproved: true,
|
|
383
|
+
approvalFn: async () => false,
|
|
384
|
+
};
|
|
385
|
+
const evidence = await gatherStallEvidence(ctx.toolExecutor, toolContext, workspacePath);
|
|
386
|
+
result.toolStallEvidence = evidence;
|
|
387
|
+
if (!evidence.hasWorkspaceChanges) {
|
|
388
|
+
ctx.logger?.info("CoreLoop: stall evidence — no workspace changes detected", { goalId, toolErrors: evidence.toolErrors });
|
|
389
|
+
}
|
|
390
|
+
}
|
|
391
|
+
catch {
|
|
392
|
+
// Non-fatal
|
|
393
|
+
}
|
|
394
|
+
}
|
|
395
|
+
const suppressedDimensions = new Set();
|
|
396
|
+
if (ctx.deps.portfolioManager) {
|
|
397
|
+
try {
|
|
398
|
+
const portfolio = await ctx.deps.strategyManager.getPortfolio(goalId);
|
|
399
|
+
if (portfolio) {
|
|
400
|
+
for (const s of portfolio.strategies) {
|
|
401
|
+
if (s.state !== "active" || !ctx.deps.portfolioManager.isWaitStrategy(s))
|
|
402
|
+
continue;
|
|
403
|
+
const ws = s;
|
|
404
|
+
const waitUntil = typeof ws["wait_until"] === "string" ? ws["wait_until"] : null;
|
|
405
|
+
if (!ctx.deps.stallDetector.isSuppressed(waitUntil))
|
|
406
|
+
continue;
|
|
407
|
+
const primaryDim = typeof ws["primary_dimension"] === "string" ? ws["primary_dimension"] : null;
|
|
408
|
+
if (primaryDim) {
|
|
409
|
+
suppressedDimensions.add(primaryDim);
|
|
410
|
+
ctx.logger?.info("CoreLoop: stall detection suppressed for dimension by active WaitStrategy", {
|
|
411
|
+
goalId,
|
|
412
|
+
dimension: primaryDim,
|
|
413
|
+
waitUntil,
|
|
414
|
+
});
|
|
415
|
+
result.waitSuppressed = true;
|
|
416
|
+
}
|
|
417
|
+
}
|
|
418
|
+
}
|
|
419
|
+
}
|
|
420
|
+
catch {
|
|
421
|
+
// Non-fatal
|
|
422
|
+
}
|
|
423
|
+
}
|
|
424
|
+
for (const dim of goal.dimensions) {
|
|
425
|
+
if (suppressedDimensions.has(dim.name))
|
|
426
|
+
continue;
|
|
427
|
+
const dimGapHistory = gapHistoryByDimension.get(dim.name) ?? [];
|
|
428
|
+
const metricTrendContext = selectMetricTrendForDimension(metricTrends, dim.name);
|
|
429
|
+
if (metricTrendContext) {
|
|
430
|
+
result.metricTrendContext = metricTrendContext;
|
|
431
|
+
}
|
|
432
|
+
const stallReport = ctx.deps.stallDetector.checkDimensionStall(goalId, dim.name, dimGapHistory, undefined, metricTrendContext);
|
|
433
|
+
if (stallReport) {
|
|
434
|
+
result.stallDetected = true;
|
|
435
|
+
result.stallReport = stallReport;
|
|
436
|
+
if (stallReport.stall_type === "predicted_plateau" ||
|
|
437
|
+
stallReport.stall_type === "predicted_regression") {
|
|
438
|
+
ctx.logger?.info(`CoreLoop: early warning ${stallReport.stall_type} — requesting divergent exploration portfolio without pivot`, {
|
|
439
|
+
goalId,
|
|
440
|
+
metricTrend: stallReport.metric_trend_context?.summary,
|
|
441
|
+
});
|
|
442
|
+
await requestPredictedDivergentExploration(ctx, goalId, goal, dimGapHistory, stallReport, result, stallReport.stall_type);
|
|
443
|
+
continue;
|
|
444
|
+
}
|
|
445
|
+
const escalationLevel = await ctx.deps.stallDetector.getEscalationLevel(goalId, dim.name);
|
|
446
|
+
await applyStallAction(ctx, goalId, goal, dimGapHistory, stallReport, escalationLevel, dim.name, result, "", stallActionHints, waitActivationContext);
|
|
447
|
+
break;
|
|
448
|
+
}
|
|
449
|
+
}
|
|
450
|
+
if (!result.stallDetected) {
|
|
451
|
+
await checkGlobalStall(ctx, goalId, goal, result, gapHistoryByDimension, suppressedDimensions, stallActionHints, waitActivationContext);
|
|
452
|
+
}
|
|
453
|
+
if (ctx.deps.portfolioManager) {
|
|
454
|
+
await rebalancePortfolio(ctx, goalId, goal, waitActivationContext);
|
|
455
|
+
}
|
|
456
|
+
}
|
|
457
|
+
catch (err) {
|
|
458
|
+
ctx.logger?.warn("CoreLoop: stall detection failed (non-fatal)", { error: err instanceof Error ? err.message : String(err) });
|
|
459
|
+
}
|
|
460
|
+
}
|
|
461
|
+
export function buildWaitObservationActivationContext(ctx, goalId, goal, gapHistory) {
|
|
462
|
+
return buildWaitStrategyActivationContext(ctx, goalId, goal, indexGapHistoryByDimension(goal, gapHistory));
|
|
463
|
+
}
|
|
464
|
+
//# sourceMappingURL=task-cycle-stall.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"task-cycle-stall.js","sourceRoot":"","sources":["../../../../src/orchestrator/loop/durable-loop/task-cycle-stall.ts"],"names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AAI,EACJ,0BAA0B,CAAC,IAAI,EAAE,UAAU,CAAC,CAC7C,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Goal } from "../../../base/types/goal.js";
|
|
2
|
+
import type { WaitExpiryOutcome } from "../../../base/types/strategy.js";
|
|
3
|
+
import type { LoopIterationResult } from "./contracts.js";
|
|
4
|
+
import type { PhaseCtx } from "./preparation.js";
|
|
5
|
+
export interface WaitStrategyObservationDecision {
|
|
6
|
+
observeOnly: boolean;
|
|
7
|
+
newGenerationNeeded: boolean;
|
|
8
|
+
outcome: WaitExpiryOutcome | null;
|
|
9
|
+
}
|
|
10
|
+
export declare function evaluateWaitStrategiesForObserveOnly(ctx: PhaseCtx, goalId: string, goal: Goal, result: LoopIterationResult, preferredWaitStrategyId?: string): Promise<WaitStrategyObservationDecision>;
|
|
11
|
+
//# sourceMappingURL=task-cycle-wait.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"task-cycle-wait.d.ts","sourceRoot":"","sources":["../../../../src/orchestrator/loop/durable-loop/task-cycle-wait.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,6BAA6B,CAAC;AACxD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AAIzE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AAC1D,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAMjD,MAAM,WAAW,+BAA+B;IAC9C,WAAW,EAAE,OAAO,CAAC;IACrB,mBAAmB,EAAE,OAAO,CAAC;IAC7B,OAAO,EAAE,iBAAiB,GAAG,IAAI,CAAC;CACnC;AAOD,wBAAsB,oCAAoC,CACxD,GAAG,EAAE,QAAQ,EACb,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,IAAI,EACV,MAAM,EAAE,mBAAmB,EAC3B,uBAAuB,CAAC,EAAE,MAAM,GAC/B,OAAO,CAAC,+BAA+B,CAAC,CAqF1C"}
|