pulseed 0.4.4 → 0.4.6
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 +27 -103
- package/dist/adapters/agents/native-agent-loop.d.ts +7 -0
- package/dist/adapters/agents/native-agent-loop.d.ts.map +1 -0
- package/dist/adapters/agents/native-agent-loop.js +19 -0
- package/dist/adapters/agents/native-agent-loop.js.map +1 -0
- package/dist/adapters/agents/openai-codex.d.ts +3 -0
- package/dist/adapters/agents/openai-codex.d.ts.map +1 -1
- package/dist/adapters/agents/openai-codex.js +7 -1
- package/dist/adapters/agents/openai-codex.js.map +1 -1
- package/dist/adapters/datasources/github-issue-datasource.d.ts +13 -0
- package/dist/adapters/datasources/github-issue-datasource.d.ts.map +1 -1
- package/dist/adapters/datasources/github-issue-datasource.js +114 -134
- package/dist/adapters/datasources/github-issue-datasource.js.map +1 -1
- package/dist/adapters/spawn-helper.js +3 -3
- package/dist/adapters/spawn-helper.js.map +1 -1
- package/dist/base/llm/provider-config.d.ts +11 -2
- package/dist/base/llm/provider-config.d.ts.map +1 -1
- package/dist/base/llm/provider-config.js +13 -7
- package/dist/base/llm/provider-config.js.map +1 -1
- package/dist/base/llm/provider-factory.d.ts +2 -2
- package/dist/base/llm/provider-factory.js +4 -4
- package/dist/base/llm/provider-factory.js.map +1 -1
- package/dist/base/state/state-manager.d.ts +12 -0
- package/dist/base/state/state-manager.d.ts.map +1 -1
- package/dist/base/state/state-manager.js +112 -109
- package/dist/base/state/state-manager.js.map +1 -1
- package/dist/index.d.ts +7 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +6 -0
- package/dist/index.js.map +1 -1
- package/dist/interface/chat/chat-history.d.ts +3 -2
- package/dist/interface/chat/chat-history.d.ts.map +1 -1
- package/dist/interface/chat/chat-history.js +3 -0
- package/dist/interface/chat/chat-history.js.map +1 -1
- package/dist/interface/chat/chat-runner.d.ts +9 -0
- package/dist/interface/chat/chat-runner.d.ts.map +1 -1
- package/dist/interface/chat/chat-runner.js +295 -44
- package/dist/interface/chat/chat-runner.js.map +1 -1
- package/dist/interface/chat/cross-platform-session.d.ts +78 -0
- package/dist/interface/chat/cross-platform-session.d.ts.map +1 -0
- package/dist/interface/chat/cross-platform-session.js +213 -0
- package/dist/interface/chat/cross-platform-session.js.map +1 -0
- package/dist/interface/chat/event-subscriber.d.ts +3 -1
- package/dist/interface/chat/event-subscriber.d.ts.map +1 -1
- package/dist/interface/chat/event-subscriber.js +13 -3
- package/dist/interface/chat/event-subscriber.js.map +1 -1
- package/dist/interface/cli/commands/chat.d.ts.map +1 -1
- package/dist/interface/cli/commands/chat.js +48 -3
- package/dist/interface/cli/commands/chat.js.map +1 -1
- package/dist/interface/cli/commands/config.d.ts.map +1 -1
- package/dist/interface/cli/commands/config.js +30 -1
- package/dist/interface/cli/commands/config.js.map +1 -1
- package/dist/interface/cli/commands/daemon.d.ts.map +1 -1
- package/dist/interface/cli/commands/daemon.js +15 -6
- package/dist/interface/cli/commands/daemon.js.map +1 -1
- package/dist/interface/cli/commands/doctor.d.ts +1 -0
- package/dist/interface/cli/commands/doctor.d.ts.map +1 -1
- package/dist/interface/cli/commands/doctor.js +36 -0
- package/dist/interface/cli/commands/doctor.js.map +1 -1
- package/dist/interface/cli/commands/install.d.ts +1 -0
- package/dist/interface/cli/commands/install.d.ts.map +1 -1
- package/dist/interface/cli/commands/install.js +6 -1
- package/dist/interface/cli/commands/install.js.map +1 -1
- package/dist/interface/cli/commands/notify.d.ts.map +1 -1
- package/dist/interface/cli/commands/notify.js +33 -21
- package/dist/interface/cli/commands/notify.js.map +1 -1
- package/dist/interface/cli/commands/setup/steps-notification.d.ts.map +1 -1
- package/dist/interface/cli/commands/setup/steps-notification.js +3 -2
- package/dist/interface/cli/commands/setup/steps-notification.js.map +1 -1
- package/dist/interface/cli/commands/setup-shared.js +6 -6
- package/dist/interface/cli/commands/setup-shared.js.map +1 -1
- package/dist/interface/cli/commands/setup.d.ts.map +1 -1
- package/dist/interface/cli/commands/setup.js +38 -1
- package/dist/interface/cli/commands/setup.js.map +1 -1
- package/dist/interface/cli/commands/telegram.d.ts.map +1 -1
- package/dist/interface/cli/commands/telegram.js +15 -1
- package/dist/interface/cli/commands/telegram.js.map +1 -1
- package/dist/interface/cli/setup.d.ts +12 -1
- package/dist/interface/cli/setup.d.ts.map +1 -1
- package/dist/interface/cli/setup.js +145 -16
- package/dist/interface/cli/setup.js.map +1 -1
- package/dist/interface/cli/utils.js +1 -1
- package/dist/interface/tui/entry.d.ts.map +1 -1
- package/dist/interface/tui/entry.js +69 -17
- package/dist/interface/tui/entry.js.map +1 -1
- package/dist/orchestrator/execution/adapter-layer.d.ts +19 -0
- package/dist/orchestrator/execution/adapter-layer.d.ts.map +1 -1
- package/dist/orchestrator/execution/adapter-layer.js.map +1 -1
- package/dist/orchestrator/execution/agent-loop/agent-loop-budget.d.ts +15 -0
- package/dist/orchestrator/execution/agent-loop/agent-loop-budget.d.ts.map +1 -0
- package/dist/orchestrator/execution/agent-loop/agent-loop-budget.js +12 -0
- package/dist/orchestrator/execution/agent-loop/agent-loop-budget.js.map +1 -0
- package/dist/orchestrator/execution/agent-loop/agent-loop-command-classifier.d.ts +9 -0
- package/dist/orchestrator/execution/agent-loop/agent-loop-command-classifier.d.ts.map +1 -0
- package/dist/orchestrator/execution/agent-loop/agent-loop-command-classifier.js +40 -0
- package/dist/orchestrator/execution/agent-loop/agent-loop-command-classifier.js.map +1 -0
- package/dist/orchestrator/execution/agent-loop/agent-loop-compactor.d.ts +33 -0
- package/dist/orchestrator/execution/agent-loop/agent-loop-compactor.d.ts.map +1 -0
- package/dist/orchestrator/execution/agent-loop/agent-loop-compactor.js +68 -0
- package/dist/orchestrator/execution/agent-loop/agent-loop-compactor.js.map +1 -0
- package/dist/orchestrator/execution/agent-loop/agent-loop-context-assembler.d.ts +38 -0
- package/dist/orchestrator/execution/agent-loop/agent-loop-context-assembler.d.ts.map +1 -0
- package/dist/orchestrator/execution/agent-loop/agent-loop-context-assembler.js +109 -0
- package/dist/orchestrator/execution/agent-loop/agent-loop-context-assembler.js.map +1 -0
- package/dist/orchestrator/execution/agent-loop/agent-loop-dogfood-benchmark.d.ts +76 -0
- package/dist/orchestrator/execution/agent-loop/agent-loop-dogfood-benchmark.d.ts.map +1 -0
- package/dist/orchestrator/execution/agent-loop/agent-loop-dogfood-benchmark.js +164 -0
- package/dist/orchestrator/execution/agent-loop/agent-loop-dogfood-benchmark.js.map +1 -0
- package/dist/orchestrator/execution/agent-loop/agent-loop-evaluator.d.ts +46 -0
- package/dist/orchestrator/execution/agent-loop/agent-loop-evaluator.d.ts.map +1 -0
- package/dist/orchestrator/execution/agent-loop/agent-loop-evaluator.js +75 -0
- package/dist/orchestrator/execution/agent-loop/agent-loop-evaluator.js.map +1 -0
- package/dist/orchestrator/execution/agent-loop/agent-loop-events.d.ts +98 -0
- package/dist/orchestrator/execution/agent-loop/agent-loop-events.d.ts.map +1 -0
- package/dist/orchestrator/execution/agent-loop/agent-loop-events.js +6 -0
- package/dist/orchestrator/execution/agent-loop/agent-loop-events.js.map +1 -0
- package/dist/orchestrator/execution/agent-loop/agent-loop-history.d.ts +8 -0
- package/dist/orchestrator/execution/agent-loop/agent-loop-history.d.ts.map +1 -0
- package/dist/orchestrator/execution/agent-loop/agent-loop-history.js +7 -0
- package/dist/orchestrator/execution/agent-loop/agent-loop-history.js.map +1 -0
- package/dist/orchestrator/execution/agent-loop/agent-loop-model-client-factory.d.ts +9 -0
- package/dist/orchestrator/execution/agent-loop/agent-loop-model-client-factory.d.ts.map +1 -0
- package/dist/orchestrator/execution/agent-loop/agent-loop-model-client-factory.js +19 -0
- package/dist/orchestrator/execution/agent-loop/agent-loop-model-client-factory.js.map +1 -0
- package/dist/orchestrator/execution/agent-loop/agent-loop-model-client.d.ts +13 -0
- package/dist/orchestrator/execution/agent-loop/agent-loop-model-client.d.ts.map +1 -0
- package/dist/orchestrator/execution/agent-loop/agent-loop-model-client.js +72 -0
- package/dist/orchestrator/execution/agent-loop/agent-loop-model-client.js.map +1 -0
- package/dist/orchestrator/execution/agent-loop/agent-loop-model-registry.d.ts +10 -0
- package/dist/orchestrator/execution/agent-loop/agent-loop-model-registry.d.ts.map +1 -0
- package/dist/orchestrator/execution/agent-loop/agent-loop-model-registry.js +26 -0
- package/dist/orchestrator/execution/agent-loop/agent-loop-model-registry.js.map +1 -0
- package/dist/orchestrator/execution/agent-loop/agent-loop-model.d.ts +87 -0
- package/dist/orchestrator/execution/agent-loop/agent-loop-model.d.ts.map +1 -0
- package/dist/orchestrator/execution/agent-loop/agent-loop-model.js +22 -0
- package/dist/orchestrator/execution/agent-loop/agent-loop-model.js.map +1 -0
- package/dist/orchestrator/execution/agent-loop/agent-loop-prompts.d.ts +5 -0
- package/dist/orchestrator/execution/agent-loop/agent-loop-prompts.d.ts.map +1 -0
- package/dist/orchestrator/execution/agent-loop/agent-loop-prompts.js +18 -0
- package/dist/orchestrator/execution/agent-loop/agent-loop-prompts.js.map +1 -0
- package/dist/orchestrator/execution/agent-loop/agent-loop-real-dogfood.d.ts +2 -0
- package/dist/orchestrator/execution/agent-loop/agent-loop-real-dogfood.d.ts.map +1 -0
- package/dist/orchestrator/execution/agent-loop/agent-loop-real-dogfood.js +362 -0
- package/dist/orchestrator/execution/agent-loop/agent-loop-real-dogfood.js.map +1 -0
- package/dist/orchestrator/execution/agent-loop/agent-loop-result.d.ts +42 -0
- package/dist/orchestrator/execution/agent-loop/agent-loop-result.d.ts.map +1 -0
- package/dist/orchestrator/execution/agent-loop/agent-loop-result.js +2 -0
- package/dist/orchestrator/execution/agent-loop/agent-loop-result.js.map +1 -0
- package/dist/orchestrator/execution/agent-loop/agent-loop-session-factory.d.ts +15 -0
- package/dist/orchestrator/execution/agent-loop/agent-loop-session-factory.d.ts.map +1 -0
- package/dist/orchestrator/execution/agent-loop/agent-loop-session-factory.js +26 -0
- package/dist/orchestrator/execution/agent-loop/agent-loop-session-factory.js.map +1 -0
- package/dist/orchestrator/execution/agent-loop/agent-loop-session-state.d.ts +39 -0
- package/dist/orchestrator/execution/agent-loop/agent-loop-session-state.d.ts.map +1 -0
- package/dist/orchestrator/execution/agent-loop/agent-loop-session-state.js +35 -0
- package/dist/orchestrator/execution/agent-loop/agent-loop-session-state.js.map +1 -0
- package/dist/orchestrator/execution/agent-loop/agent-loop-session.d.ts +21 -0
- package/dist/orchestrator/execution/agent-loop/agent-loop-session.d.ts.map +1 -0
- package/dist/orchestrator/execution/agent-loop/agent-loop-session.js +16 -0
- package/dist/orchestrator/execution/agent-loop/agent-loop-session.js.map +1 -0
- package/dist/orchestrator/execution/agent-loop/agent-loop-tool-output.d.ts +21 -0
- package/dist/orchestrator/execution/agent-loop/agent-loop-tool-output.d.ts.map +1 -0
- package/dist/orchestrator/execution/agent-loop/agent-loop-tool-output.js +2 -0
- package/dist/orchestrator/execution/agent-loop/agent-loop-tool-output.js.map +1 -0
- package/dist/orchestrator/execution/agent-loop/agent-loop-tool-router.d.ts +19 -0
- package/dist/orchestrator/execution/agent-loop/agent-loop-tool-router.d.ts.map +1 -0
- package/dist/orchestrator/execution/agent-loop/agent-loop-tool-router.js +34 -0
- package/dist/orchestrator/execution/agent-loop/agent-loop-tool-router.js.map +1 -0
- package/dist/orchestrator/execution/agent-loop/agent-loop-tool-runtime.d.ts +21 -0
- package/dist/orchestrator/execution/agent-loop/agent-loop-tool-runtime.d.ts.map +1 -0
- package/dist/orchestrator/execution/agent-loop/agent-loop-tool-runtime.js +114 -0
- package/dist/orchestrator/execution/agent-loop/agent-loop-tool-runtime.js.map +1 -0
- package/dist/orchestrator/execution/agent-loop/agent-loop-trace-store.d.ts +18 -0
- package/dist/orchestrator/execution/agent-loop/agent-loop-trace-store.d.ts.map +1 -0
- package/dist/orchestrator/execution/agent-loop/agent-loop-trace-store.js +31 -0
- package/dist/orchestrator/execution/agent-loop/agent-loop-trace-store.js.map +1 -0
- package/dist/orchestrator/execution/agent-loop/agent-loop-turn-context.d.ts +39 -0
- package/dist/orchestrator/execution/agent-loop/agent-loop-turn-context.d.ts.map +1 -0
- package/dist/orchestrator/execution/agent-loop/agent-loop-turn-context.js +5 -0
- package/dist/orchestrator/execution/agent-loop/agent-loop-turn-context.js.map +1 -0
- package/dist/orchestrator/execution/agent-loop/anthropic-messages-agent-loop-model-client.d.ts +23 -0
- package/dist/orchestrator/execution/agent-loop/anthropic-messages-agent-loop-model-client.d.ts.map +1 -0
- package/dist/orchestrator/execution/agent-loop/anthropic-messages-agent-loop-model-client.js +156 -0
- package/dist/orchestrator/execution/agent-loop/anthropic-messages-agent-loop-model-client.js.map +1 -0
- package/dist/orchestrator/execution/agent-loop/bounded-agent-loop-runner.d.ts +38 -0
- package/dist/orchestrator/execution/agent-loop/bounded-agent-loop-runner.d.ts.map +1 -0
- package/dist/orchestrator/execution/agent-loop/bounded-agent-loop-runner.js +479 -0
- package/dist/orchestrator/execution/agent-loop/bounded-agent-loop-runner.js.map +1 -0
- package/dist/orchestrator/execution/agent-loop/chat-agent-loop-runner.d.ts +67 -0
- package/dist/orchestrator/execution/agent-loop/chat-agent-loop-runner.d.ts.map +1 -0
- package/dist/orchestrator/execution/agent-loop/chat-agent-loop-runner.js +113 -0
- package/dist/orchestrator/execution/agent-loop/chat-agent-loop-runner.js.map +1 -0
- package/dist/orchestrator/execution/agent-loop/core-loop-control-tools.d.ts +33 -0
- package/dist/orchestrator/execution/agent-loop/core-loop-control-tools.d.ts.map +1 -0
- package/dist/orchestrator/execution/agent-loop/core-loop-control-tools.js +89 -0
- package/dist/orchestrator/execution/agent-loop/core-loop-control-tools.js.map +1 -0
- package/dist/orchestrator/execution/agent-loop/core-phase-runner.d.ts +32 -0
- package/dist/orchestrator/execution/agent-loop/core-phase-runner.d.ts.map +1 -0
- package/dist/orchestrator/execution/agent-loop/core-phase-runner.js +40 -0
- package/dist/orchestrator/execution/agent-loop/core-phase-runner.js.map +1 -0
- package/dist/orchestrator/execution/agent-loop/index.d.ts +35 -0
- package/dist/orchestrator/execution/agent-loop/index.d.ts.map +1 -0
- package/dist/orchestrator/execution/agent-loop/index.js +35 -0
- package/dist/orchestrator/execution/agent-loop/index.js.map +1 -0
- package/dist/orchestrator/execution/agent-loop/openai-responses-agent-loop-model-client.d.ts +18 -0
- package/dist/orchestrator/execution/agent-loop/openai-responses-agent-loop-model-client.d.ts.map +1 -0
- package/dist/orchestrator/execution/agent-loop/openai-responses-agent-loop-model-client.js +148 -0
- package/dist/orchestrator/execution/agent-loop/openai-responses-agent-loop-model-client.js.map +1 -0
- package/dist/orchestrator/execution/agent-loop/task-agent-loop-context.d.ts +26 -0
- package/dist/orchestrator/execution/agent-loop/task-agent-loop-context.d.ts.map +1 -0
- package/dist/orchestrator/execution/agent-loop/task-agent-loop-context.js +79 -0
- package/dist/orchestrator/execution/agent-loop/task-agent-loop-context.js.map +1 -0
- package/dist/orchestrator/execution/agent-loop/task-agent-loop-factory.d.ts +28 -0
- package/dist/orchestrator/execution/agent-loop/task-agent-loop-factory.d.ts.map +1 -0
- package/dist/orchestrator/execution/agent-loop/task-agent-loop-factory.js +96 -0
- package/dist/orchestrator/execution/agent-loop/task-agent-loop-factory.js.map +1 -0
- package/dist/orchestrator/execution/agent-loop/task-agent-loop-result.d.ts +54 -0
- package/dist/orchestrator/execution/agent-loop/task-agent-loop-result.d.ts.map +1 -0
- package/dist/orchestrator/execution/agent-loop/task-agent-loop-result.js +61 -0
- package/dist/orchestrator/execution/agent-loop/task-agent-loop-result.js.map +1 -0
- package/dist/orchestrator/execution/agent-loop/task-agent-loop-runner.d.ts +46 -0
- package/dist/orchestrator/execution/agent-loop/task-agent-loop-runner.d.ts.map +1 -0
- package/dist/orchestrator/execution/agent-loop/task-agent-loop-runner.js +70 -0
- package/dist/orchestrator/execution/agent-loop/task-agent-loop-runner.js.map +1 -0
- package/dist/orchestrator/execution/agent-loop/task-agent-loop-verification.d.ts +5 -0
- package/dist/orchestrator/execution/agent-loop/task-agent-loop-verification.d.ts.map +1 -0
- package/dist/orchestrator/execution/agent-loop/task-agent-loop-verification.js +94 -0
- package/dist/orchestrator/execution/agent-loop/task-agent-loop-verification.js.map +1 -0
- package/dist/orchestrator/execution/agent-loop/task-agent-loop-worktree.d.ts +23 -0
- package/dist/orchestrator/execution/agent-loop/task-agent-loop-worktree.d.ts.map +1 -0
- package/dist/orchestrator/execution/agent-loop/task-agent-loop-worktree.js +145 -0
- package/dist/orchestrator/execution/agent-loop/task-agent-loop-worktree.js.map +1 -0
- package/dist/orchestrator/execution/context/dimension-selector.d.ts +5 -1
- package/dist/orchestrator/execution/context/dimension-selector.d.ts.map +1 -1
- package/dist/orchestrator/execution/context/dimension-selector.js +9 -5
- package/dist/orchestrator/execution/context/dimension-selector.js.map +1 -1
- package/dist/orchestrator/execution/task/task-generation.d.ts.map +1 -1
- package/dist/orchestrator/execution/task/task-generation.js +46 -6
- package/dist/orchestrator/execution/task/task-generation.js.map +1 -1
- package/dist/orchestrator/execution/task/task-health-check.d.ts +1 -1
- package/dist/orchestrator/execution/task/task-health-check.d.ts.map +1 -1
- package/dist/orchestrator/execution/task/task-health-check.js +8 -8
- package/dist/orchestrator/execution/task/task-health-check.js.map +1 -1
- package/dist/orchestrator/execution/task/task-lifecycle.d.ts +22 -3
- package/dist/orchestrator/execution/task/task-lifecycle.d.ts.map +1 -1
- package/dist/orchestrator/execution/task/task-lifecycle.js +155 -25
- 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 +63 -3
- package/dist/orchestrator/execution/task/task-prompt-builder.js.map +1 -1
- package/dist/orchestrator/execution/task/task-verifier-llm.d.ts.map +1 -1
- package/dist/orchestrator/execution/task/task-verifier-llm.js +19 -1
- package/dist/orchestrator/execution/task/task-verifier-llm.js.map +1 -1
- package/dist/orchestrator/execution/task/task-verifier-rules.d.ts.map +1 -1
- package/dist/orchestrator/execution/task/task-verifier-rules.js +96 -44
- package/dist/orchestrator/execution/task/task-verifier-rules.js.map +1 -1
- package/dist/orchestrator/execution/task/task-verifier-types.d.ts +8 -0
- package/dist/orchestrator/execution/task/task-verifier-types.d.ts.map +1 -1
- package/dist/orchestrator/execution/task/task-verifier-types.js.map +1 -1
- package/dist/orchestrator/execution/task/task-verifier.d.ts.map +1 -1
- package/dist/orchestrator/execution/task/task-verifier.js +19 -1
- package/dist/orchestrator/execution/task/task-verifier.js.map +1 -1
- package/dist/orchestrator/goal/tree-loop-orchestrator.d.ts +9 -0
- package/dist/orchestrator/goal/tree-loop-orchestrator.d.ts.map +1 -1
- package/dist/orchestrator/goal/tree-loop-orchestrator.js +32 -0
- package/dist/orchestrator/goal/tree-loop-orchestrator.js.map +1 -1
- package/dist/orchestrator/loop/core-loop/contracts.d.ts +9 -0
- 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 +79 -0
- package/dist/orchestrator/loop/core-loop/decision-engine.d.ts.map +1 -0
- package/dist/orchestrator/loop/core-loop/decision-engine.js +141 -0
- package/dist/orchestrator/loop/core-loop/decision-engine.js.map +1 -0
- package/dist/orchestrator/loop/core-loop/evidence-ledger.d.ts +22 -0
- package/dist/orchestrator/loop/core-loop/evidence-ledger.d.ts.map +1 -0
- package/dist/orchestrator/loop/core-loop/evidence-ledger.js +36 -0
- package/dist/orchestrator/loop/core-loop/evidence-ledger.js.map +1 -0
- package/dist/orchestrator/loop/core-loop/iteration-kernel.d.ts +34 -0
- package/dist/orchestrator/loop/core-loop/iteration-kernel.d.ts.map +1 -0
- package/dist/orchestrator/loop/core-loop/iteration-kernel.js +356 -0
- package/dist/orchestrator/loop/core-loop/iteration-kernel.js.map +1 -0
- package/dist/orchestrator/loop/core-loop/phase-policy.d.ts +20 -0
- package/dist/orchestrator/loop/core-loop/phase-policy.d.ts.map +1 -0
- package/dist/orchestrator/loop/core-loop/phase-policy.js +96 -0
- package/dist/orchestrator/loop/core-loop/phase-policy.js.map +1 -0
- package/dist/orchestrator/loop/core-loop/phase-runtime.d.ts +29 -0
- package/dist/orchestrator/loop/core-loop/phase-runtime.d.ts.map +1 -0
- package/dist/orchestrator/loop/core-loop/phase-runtime.js +62 -0
- package/dist/orchestrator/loop/core-loop/phase-runtime.js.map +1 -0
- package/dist/orchestrator/loop/core-loop/phase-specs.d.ts +180 -0
- package/dist/orchestrator/loop/core-loop/phase-specs.d.ts.map +1 -0
- package/dist/orchestrator/loop/core-loop/phase-specs.js +116 -0
- package/dist/orchestrator/loop/core-loop/phase-specs.js.map +1 -0
- package/dist/orchestrator/loop/core-loop/preparation.d.ts +1 -5
- package/dist/orchestrator/loop/core-loop/preparation.d.ts.map +1 -1
- package/dist/orchestrator/loop/core-loop/preparation.js +2 -1
- package/dist/orchestrator/loop/core-loop/preparation.js.map +1 -1
- package/dist/orchestrator/loop/core-loop/task-cycle.d.ts +10 -2
- package/dist/orchestrator/loop/core-loop/task-cycle.d.ts.map +1 -1
- package/dist/orchestrator/loop/core-loop/task-cycle.js +37 -54
- package/dist/orchestrator/loop/core-loop/task-cycle.js.map +1 -1
- package/dist/orchestrator/loop/core-loop.d.ts +3 -0
- package/dist/orchestrator/loop/core-loop.d.ts.map +1 -1
- package/dist/orchestrator/loop/core-loop.js +58 -217
- package/dist/orchestrator/loop/core-loop.js.map +1 -1
- package/dist/orchestrator/loop/loop-result-types.d.ts +23 -0
- 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/tree-loop-runner.d.ts +6 -2
- package/dist/orchestrator/loop/tree-loop-runner.d.ts.map +1 -1
- package/dist/orchestrator/loop/tree-loop-runner.js +62 -6
- package/dist/orchestrator/loop/tree-loop-runner.js.map +1 -1
- package/dist/orchestrator/strategy/portfolio-manager.d.ts +3 -3
- package/dist/orchestrator/strategy/portfolio-manager.d.ts.map +1 -1
- package/dist/orchestrator/strategy/portfolio-manager.js +3 -3
- package/dist/orchestrator/strategy/portfolio-manager.js.map +1 -1
- package/dist/orchestrator/strategy/portfolio-rebalance.d.ts +3 -3
- package/dist/orchestrator/strategy/portfolio-rebalance.d.ts.map +1 -1
- package/dist/orchestrator/strategy/portfolio-rebalance.js +14 -7
- package/dist/orchestrator/strategy/portfolio-rebalance.js.map +1 -1
- package/dist/orchestrator/strategy/strategy-manager.d.ts +11 -1
- package/dist/orchestrator/strategy/strategy-manager.d.ts.map +1 -1
- package/dist/orchestrator/strategy/strategy-manager.js +23 -2
- package/dist/orchestrator/strategy/strategy-manager.js.map +1 -1
- package/dist/platform/dream/dream-activation-artifacts.d.ts +5 -0
- package/dist/platform/dream/dream-activation-artifacts.d.ts.map +1 -0
- package/dist/platform/dream/dream-activation-artifacts.js +35 -0
- package/dist/platform/dream/dream-activation-artifacts.js.map +1 -0
- package/dist/platform/dream/dream-activation.d.ts +7 -0
- package/dist/platform/dream/dream-activation.d.ts.map +1 -1
- package/dist/platform/dream/dream-activation.js +41 -0
- package/dist/platform/dream/dream-activation.js.map +1 -1
- package/dist/platform/dream/dream-consolidator.d.ts +51 -1
- package/dist/platform/dream/dream-consolidator.d.ts.map +1 -1
- package/dist/platform/dream/dream-consolidator.js +425 -74
- package/dist/platform/dream/dream-consolidator.js.map +1 -1
- package/dist/platform/dream/dream-event-workflows.d.ts +115 -0
- package/dist/platform/dream/dream-event-workflows.d.ts.map +1 -0
- package/dist/platform/dream/dream-event-workflows.js +328 -0
- package/dist/platform/dream/dream-event-workflows.js.map +1 -0
- package/dist/platform/dream/dream-soil-mutation.d.ts +28 -0
- package/dist/platform/dream/dream-soil-mutation.d.ts.map +1 -0
- package/dist/platform/dream/dream-soil-mutation.js +605 -0
- package/dist/platform/dream/dream-soil-mutation.js.map +1 -0
- package/dist/platform/dream/dream-soil-sync.d.ts +30 -0
- package/dist/platform/dream/dream-soil-sync.d.ts.map +1 -0
- package/dist/platform/dream/dream-soil-sync.js +87 -0
- package/dist/platform/dream/dream-soil-sync.js.map +1 -0
- package/dist/platform/dream/dream-types.d.ts +635 -50
- package/dist/platform/dream/dream-types.d.ts.map +1 -1
- package/dist/platform/dream/dream-types.js +70 -0
- package/dist/platform/dream/dream-types.js.map +1 -1
- package/dist/platform/dream/index.d.ts +4 -0
- package/dist/platform/dream/index.d.ts.map +1 -1
- package/dist/platform/dream/index.js +4 -0
- package/dist/platform/dream/index.js.map +1 -1
- package/dist/platform/knowledge/knowledge-decisions.d.ts.map +1 -1
- package/dist/platform/knowledge/knowledge-decisions.js +32 -0
- package/dist/platform/knowledge/knowledge-decisions.js.map +1 -1
- package/dist/platform/knowledge/knowledge-manager-lint.d.ts +1 -0
- package/dist/platform/knowledge/knowledge-manager-lint.d.ts.map +1 -1
- package/dist/platform/knowledge/knowledge-manager-lint.js +16 -3
- package/dist/platform/knowledge/knowledge-manager-lint.js.map +1 -1
- package/dist/platform/knowledge/knowledge-manager.d.ts +3 -0
- package/dist/platform/knowledge/knowledge-manager.d.ts.map +1 -1
- package/dist/platform/knowledge/knowledge-manager.js +38 -0
- package/dist/platform/knowledge/knowledge-manager.js.map +1 -1
- package/dist/platform/observation/workspace-context.d.ts.map +1 -1
- package/dist/platform/observation/workspace-context.js +12 -6
- package/dist/platform/observation/workspace-context.js.map +1 -1
- package/dist/platform/soil/checksum.d.ts +2 -0
- package/dist/platform/soil/checksum.d.ts.map +1 -0
- package/dist/platform/soil/checksum.js +17 -0
- package/dist/platform/soil/checksum.js.map +1 -0
- package/dist/platform/soil/compiler.d.ts +27 -0
- package/dist/platform/soil/compiler.d.ts.map +1 -0
- package/dist/platform/soil/compiler.js +78 -0
- package/dist/platform/soil/compiler.js.map +1 -0
- package/dist/platform/soil/config.d.ts +16 -0
- package/dist/platform/soil/config.d.ts.map +1 -0
- package/dist/platform/soil/config.js +30 -0
- package/dist/platform/soil/config.js.map +1 -0
- package/dist/platform/soil/content-projections.d.ts +24 -0
- package/dist/platform/soil/content-projections.d.ts.map +1 -0
- package/dist/platform/soil/content-projections.js +489 -0
- package/dist/platform/soil/content-projections.js.map +1 -0
- package/dist/platform/soil/contracts.d.ts +1127 -0
- package/dist/platform/soil/contracts.d.ts.map +1 -0
- package/dist/platform/soil/contracts.js +194 -0
- package/dist/platform/soil/contracts.js.map +1 -0
- package/dist/platform/soil/ddl.d.ts +8 -0
- package/dist/platform/soil/ddl.d.ts.map +1 -0
- package/dist/platform/soil/ddl.js +150 -0
- package/dist/platform/soil/ddl.js.map +1 -0
- package/dist/platform/soil/doctor.d.ts +34 -0
- package/dist/platform/soil/doctor.d.ts.map +1 -0
- package/dist/platform/soil/doctor.js +380 -0
- package/dist/platform/soil/doctor.js.map +1 -0
- package/dist/platform/soil/frontmatter.d.ts +15 -0
- package/dist/platform/soil/frontmatter.d.ts.map +1 -0
- package/dist/platform/soil/frontmatter.js +82 -0
- package/dist/platform/soil/frontmatter.js.map +1 -0
- package/dist/platform/soil/importer.d.ts +118 -0
- package/dist/platform/soil/importer.d.ts.map +1 -0
- package/dist/platform/soil/importer.js +145 -0
- package/dist/platform/soil/importer.js.map +1 -0
- package/dist/platform/soil/index-store.d.ts +89 -0
- package/dist/platform/soil/index-store.d.ts.map +1 -0
- package/dist/platform/soil/index-store.js +399 -0
- package/dist/platform/soil/index-store.js.map +1 -0
- package/dist/platform/soil/index.d.ts +20 -0
- package/dist/platform/soil/index.d.ts.map +1 -0
- package/dist/platform/soil/index.js +20 -0
- package/dist/platform/soil/index.js.map +1 -0
- package/dist/platform/soil/io.d.ts +18 -0
- package/dist/platform/soil/io.d.ts.map +1 -0
- package/dist/platform/soil/io.js +56 -0
- package/dist/platform/soil/io.js.map +1 -0
- package/dist/platform/soil/open.d.ts +32 -0
- package/dist/platform/soil/open.d.ts.map +1 -0
- package/dist/platform/soil/open.js +78 -0
- package/dist/platform/soil/open.js.map +1 -0
- package/dist/platform/soil/paths.d.ts +9 -0
- package/dist/platform/soil/paths.d.ts.map +1 -0
- package/dist/platform/soil/paths.js +78 -0
- package/dist/platform/soil/paths.js.map +1 -0
- package/dist/platform/soil/projections.d.ts +16 -0
- package/dist/platform/soil/projections.d.ts.map +1 -0
- package/dist/platform/soil/projections.js +265 -0
- package/dist/platform/soil/projections.js.map +1 -0
- package/dist/platform/soil/publish/apple-notes.d.ts +15 -0
- package/dist/platform/soil/publish/apple-notes.d.ts.map +1 -0
- package/dist/platform/soil/publish/apple-notes.js +58 -0
- package/dist/platform/soil/publish/apple-notes.js.map +1 -0
- package/dist/platform/soil/publish/config.d.ts +14 -0
- package/dist/platform/soil/publish/config.d.ts.map +1 -0
- package/dist/platform/soil/publish/config.js +59 -0
- package/dist/platform/soil/publish/config.js.map +1 -0
- package/dist/platform/soil/publish/index.d.ts +7 -0
- package/dist/platform/soil/publish/index.d.ts.map +1 -0
- package/dist/platform/soil/publish/index.js +7 -0
- package/dist/platform/soil/publish/index.js.map +1 -0
- package/dist/platform/soil/publish/notion.d.ts +51 -0
- package/dist/platform/soil/publish/notion.d.ts.map +1 -0
- package/dist/platform/soil/publish/notion.js +201 -0
- package/dist/platform/soil/publish/notion.js.map +1 -0
- package/dist/platform/soil/publish/publisher.d.ts +13 -0
- package/dist/platform/soil/publish/publisher.d.ts.map +1 -0
- package/dist/platform/soil/publish/publisher.js +55 -0
- package/dist/platform/soil/publish/publisher.js.map +1 -0
- package/dist/platform/soil/publish/snapshot.d.ts +4 -0
- package/dist/platform/soil/publish/snapshot.d.ts.map +1 -0
- package/dist/platform/soil/publish/snapshot.js +40 -0
- package/dist/platform/soil/publish/snapshot.js.map +1 -0
- package/dist/platform/soil/publish/types.d.ts +169 -0
- package/dist/platform/soil/publish/types.d.ts.map +1 -0
- package/dist/platform/soil/publish/types.js +32 -0
- package/dist/platform/soil/publish/types.js.map +1 -0
- package/dist/platform/soil/retriever.d.ts +52 -0
- package/dist/platform/soil/retriever.d.ts.map +1 -0
- package/dist/platform/soil/retriever.js +262 -0
- package/dist/platform/soil/retriever.js.map +1 -0
- package/dist/platform/soil/runtime-rebuild.d.ts +33 -0
- package/dist/platform/soil/runtime-rebuild.d.ts.map +1 -0
- package/dist/platform/soil/runtime-rebuild.js +201 -0
- package/dist/platform/soil/runtime-rebuild.js.map +1 -0
- package/dist/platform/soil/sqlite-repository.d.ts +25 -0
- package/dist/platform/soil/sqlite-repository.d.ts.map +1 -0
- package/dist/platform/soil/sqlite-repository.js +893 -0
- package/dist/platform/soil/sqlite-repository.js.map +1 -0
- package/dist/platform/soil/types.d.ts +506 -0
- package/dist/platform/soil/types.d.ts.map +1 -0
- package/dist/platform/soil/types.js +146 -0
- package/dist/platform/soil/types.js.map +1 -0
- package/dist/reflection/types.d.ts +2 -2
- package/dist/reporting/reporting-engine.d.ts.map +1 -1
- package/dist/reporting/reporting-engine.js +10 -0
- package/dist/reporting/reporting-engine.js.map +1 -1
- package/dist/runtime/approval-broker.d.ts.map +1 -1
- package/dist/runtime/approval-broker.js +32 -9
- package/dist/runtime/approval-broker.js.map +1 -1
- package/dist/runtime/daemon/client.d.ts +13 -0
- package/dist/runtime/daemon/client.d.ts.map +1 -1
- package/dist/runtime/daemon/client.js +41 -2
- package/dist/runtime/daemon/client.js.map +1 -1
- package/dist/runtime/daemon/runner-errors.d.ts +28 -0
- package/dist/runtime/daemon/runner-errors.d.ts.map +1 -0
- package/dist/runtime/daemon/runner-errors.js +41 -0
- package/dist/runtime/daemon/runner-errors.js.map +1 -0
- package/dist/runtime/daemon/runner-recovery.d.ts +12 -0
- package/dist/runtime/daemon/runner-recovery.d.ts.map +1 -0
- package/dist/runtime/daemon/runner-recovery.js +146 -0
- package/dist/runtime/daemon/runner-recovery.js.map +1 -0
- package/dist/runtime/daemon/runner.d.ts +6 -3
- package/dist/runtime/daemon/runner.d.ts.map +1 -1
- package/dist/runtime/daemon/runner.js +143 -172
- package/dist/runtime/daemon/runner.js.map +1 -1
- package/dist/runtime/event/server-sse.d.ts.map +1 -1
- package/dist/runtime/event/server-sse.js +0 -1
- package/dist/runtime/event/server-sse.js.map +1 -1
- package/dist/runtime/event/server.d.ts +27 -0
- package/dist/runtime/event/server.d.ts.map +1 -1
- package/dist/runtime/event/server.js +305 -71
- package/dist/runtime/event/server.js.map +1 -1
- package/dist/runtime/leader-lock-manager.d.ts.map +1 -1
- package/dist/runtime/leader-lock-manager.js +2 -1
- package/dist/runtime/leader-lock-manager.js.map +1 -1
- package/dist/runtime/notification-dispatcher.d.ts +7 -0
- package/dist/runtime/notification-dispatcher.d.ts.map +1 -1
- package/dist/runtime/notification-dispatcher.js +43 -1
- package/dist/runtime/notification-dispatcher.js.map +1 -1
- package/dist/runtime/notification-routing.d.ts +16 -0
- package/dist/runtime/notification-routing.d.ts.map +1 -0
- package/dist/runtime/notification-routing.js +147 -0
- package/dist/runtime/notification-routing.js.map +1 -0
- package/dist/runtime/plugin-loader.d.ts +2 -0
- package/dist/runtime/plugin-loader.d.ts.map +1 -1
- package/dist/runtime/plugin-loader.js +34 -2
- package/dist/runtime/plugin-loader.js.map +1 -1
- package/dist/runtime/schedule/engine-layers.d.ts.map +1 -1
- package/dist/runtime/schedule/engine-layers.js +106 -6
- package/dist/runtime/schedule/engine-layers.js.map +1 -1
- package/dist/runtime/schedule/engine.d.ts +2 -0
- package/dist/runtime/schedule/engine.d.ts.map +1 -1
- package/dist/runtime/schedule/engine.js +28 -0
- package/dist/runtime/schedule/engine.js.map +1 -1
- package/dist/runtime/schedule/history.d.ts +3 -3
- package/dist/runtime/schedule/presets.d.ts +128 -15
- package/dist/runtime/schedule/presets.d.ts.map +1 -1
- package/dist/runtime/schedule/presets.js +24 -0
- package/dist/runtime/schedule/presets.js.map +1 -1
- package/dist/runtime/schedule/source.d.ts +2 -2
- package/dist/runtime/types/cron.d.ts +4 -4
- package/dist/runtime/types/daemon.d.ts +3 -0
- package/dist/runtime/types/daemon.d.ts.map +1 -1
- package/dist/runtime/types/daemon.js +1 -0
- package/dist/runtime/types/daemon.js.map +1 -1
- package/dist/runtime/types/notification.d.ts +91 -0
- package/dist/runtime/types/notification.d.ts.map +1 -1
- package/dist/runtime/types/notification.js +10 -0
- package/dist/runtime/types/notification.js.map +1 -1
- package/dist/runtime/types/schedule.d.ts +60 -60
- package/dist/runtime/types/schedule.js +1 -1
- package/dist/runtime/types/schedule.js.map +1 -1
- package/dist/runtime/types/trigger.d.ts +6 -6
- package/dist/runtime/watchdog.d.ts +22 -0
- package/dist/runtime/watchdog.d.ts.map +1 -1
- package/dist/runtime/watchdog.js +47 -3
- package/dist/runtime/watchdog.js.map +1 -1
- package/dist/tools/builtin/index.d.ts +17 -0
- package/dist/tools/builtin/index.d.ts.map +1 -1
- package/dist/tools/builtin/index.js +46 -3
- package/dist/tools/builtin/index.js.map +1 -1
- package/dist/tools/execution/SoilDoctorTool/SoilDoctorTool.d.ts +43 -0
- package/dist/tools/execution/SoilDoctorTool/SoilDoctorTool.d.ts.map +1 -0
- package/dist/tools/execution/SoilDoctorTool/SoilDoctorTool.js +83 -0
- package/dist/tools/execution/SoilDoctorTool/SoilDoctorTool.js.map +1 -0
- package/dist/tools/execution/SoilDoctorTool/constants.d.ts +8 -0
- package/dist/tools/execution/SoilDoctorTool/constants.d.ts.map +1 -0
- package/dist/tools/execution/SoilDoctorTool/constants.js +8 -0
- package/dist/tools/execution/SoilDoctorTool/constants.js.map +1 -0
- package/dist/tools/execution/SoilDoctorTool/prompt.d.ts +2 -0
- package/dist/tools/execution/SoilDoctorTool/prompt.d.ts.map +1 -0
- package/dist/tools/execution/SoilDoctorTool/prompt.js +2 -0
- package/dist/tools/execution/SoilDoctorTool/prompt.js.map +1 -0
- package/dist/tools/execution/SoilImportTool/SoilImportTool.d.ts +109 -0
- package/dist/tools/execution/SoilImportTool/SoilImportTool.d.ts.map +1 -0
- package/dist/tools/execution/SoilImportTool/SoilImportTool.js +72 -0
- package/dist/tools/execution/SoilImportTool/SoilImportTool.js.map +1 -0
- package/dist/tools/execution/SoilImportTool/constants.d.ts +6 -0
- package/dist/tools/execution/SoilImportTool/constants.d.ts.map +1 -0
- package/dist/tools/execution/SoilImportTool/constants.js +6 -0
- package/dist/tools/execution/SoilImportTool/constants.js.map +1 -0
- package/dist/tools/execution/SoilImportTool/prompt.d.ts +2 -0
- package/dist/tools/execution/SoilImportTool/prompt.d.ts.map +1 -0
- package/dist/tools/execution/SoilImportTool/prompt.js +2 -0
- package/dist/tools/execution/SoilImportTool/prompt.js.map +1 -0
- package/dist/tools/execution/SoilOpenTool/SoilOpenTool.d.ts +46 -0
- package/dist/tools/execution/SoilOpenTool/SoilOpenTool.d.ts.map +1 -0
- package/dist/tools/execution/SoilOpenTool/SoilOpenTool.js +64 -0
- package/dist/tools/execution/SoilOpenTool/SoilOpenTool.js.map +1 -0
- package/dist/tools/execution/SoilOpenTool/constants.d.ts +6 -0
- package/dist/tools/execution/SoilOpenTool/constants.d.ts.map +1 -0
- package/dist/tools/execution/SoilOpenTool/constants.js +6 -0
- package/dist/tools/execution/SoilOpenTool/constants.js.map +1 -0
- package/dist/tools/execution/SoilOpenTool/prompt.d.ts +2 -0
- package/dist/tools/execution/SoilOpenTool/prompt.d.ts.map +1 -0
- package/dist/tools/execution/SoilOpenTool/prompt.js +2 -0
- package/dist/tools/execution/SoilOpenTool/prompt.js.map +1 -0
- package/dist/tools/execution/SoilPublishTool/SoilPublishTool.d.ts +49 -0
- package/dist/tools/execution/SoilPublishTool/SoilPublishTool.d.ts.map +1 -0
- package/dist/tools/execution/SoilPublishTool/SoilPublishTool.js +71 -0
- package/dist/tools/execution/SoilPublishTool/SoilPublishTool.js.map +1 -0
- package/dist/tools/execution/SoilPublishTool/constants.d.ts +6 -0
- package/dist/tools/execution/SoilPublishTool/constants.d.ts.map +1 -0
- package/dist/tools/execution/SoilPublishTool/constants.js +6 -0
- package/dist/tools/execution/SoilPublishTool/constants.js.map +1 -0
- package/dist/tools/execution/SoilPublishTool/prompt.d.ts +2 -0
- package/dist/tools/execution/SoilPublishTool/prompt.d.ts.map +1 -0
- package/dist/tools/execution/SoilPublishTool/prompt.js +2 -0
- package/dist/tools/execution/SoilPublishTool/prompt.js.map +1 -0
- package/dist/tools/execution/SoilRebuildTool/SoilRebuildTool.d.ts +34 -0
- package/dist/tools/execution/SoilRebuildTool/SoilRebuildTool.d.ts.map +1 -0
- package/dist/tools/execution/SoilRebuildTool/SoilRebuildTool.js +66 -0
- package/dist/tools/execution/SoilRebuildTool/SoilRebuildTool.js.map +1 -0
- package/dist/tools/execution/SoilRebuildTool/constants.d.ts +6 -0
- package/dist/tools/execution/SoilRebuildTool/constants.d.ts.map +1 -0
- package/dist/tools/execution/SoilRebuildTool/constants.js +6 -0
- package/dist/tools/execution/SoilRebuildTool/constants.js.map +1 -0
- package/dist/tools/execution/SoilRebuildTool/prompt.d.ts +2 -0
- package/dist/tools/execution/SoilRebuildTool/prompt.d.ts.map +1 -0
- package/dist/tools/execution/SoilRebuildTool/prompt.js +2 -0
- package/dist/tools/execution/SoilRebuildTool/prompt.js.map +1 -0
- package/dist/tools/executor.d.ts.map +1 -1
- package/dist/tools/executor.js +5 -2
- package/dist/tools/executor.js.map +1 -1
- package/dist/tools/fs/ApplyPatchTool/ApplyPatchTool.d.ts +38 -0
- package/dist/tools/fs/ApplyPatchTool/ApplyPatchTool.d.ts.map +1 -0
- package/dist/tools/fs/ApplyPatchTool/ApplyPatchTool.js +247 -0
- package/dist/tools/fs/ApplyPatchTool/ApplyPatchTool.js.map +1 -0
- package/dist/tools/fs/FileValidationTool/FileValidationTool.d.ts.map +1 -1
- package/dist/tools/fs/FileValidationTool/FileValidationTool.js +3 -2
- package/dist/tools/fs/FileValidationTool/FileValidationTool.js.map +1 -1
- package/dist/tools/fs/GlobTool/GlobTool.d.ts +1 -1
- package/dist/tools/fs/GlobTool/GlobTool.d.ts.map +1 -1
- package/dist/tools/fs/GlobTool/GlobTool.js +12 -1
- package/dist/tools/fs/GlobTool/GlobTool.js.map +1 -1
- package/dist/tools/fs/GrepTool/GrepTool.d.ts +1 -1
- package/dist/tools/fs/GrepTool/GrepTool.d.ts.map +1 -1
- package/dist/tools/fs/GrepTool/GrepTool.js +10 -3
- package/dist/tools/fs/GrepTool/GrepTool.js.map +1 -1
- package/dist/tools/fs/JsonQueryTool/JsonQueryTool.d.ts +1 -1
- package/dist/tools/fs/JsonQueryTool/JsonQueryTool.d.ts.map +1 -1
- package/dist/tools/fs/JsonQueryTool/JsonQueryTool.js +8 -1
- package/dist/tools/fs/JsonQueryTool/JsonQueryTool.js.map +1 -1
- package/dist/tools/fs/ListDirTool/ListDirTool.d.ts +2 -2
- package/dist/tools/fs/ListDirTool/ListDirTool.d.ts.map +1 -1
- package/dist/tools/fs/ListDirTool/ListDirTool.js +13 -5
- package/dist/tools/fs/ListDirTool/ListDirTool.js.map +1 -1
- package/dist/tools/fs/ReadTool/ReadTool.d.ts +1 -1
- package/dist/tools/fs/ReadTool/ReadTool.d.ts.map +1 -1
- package/dist/tools/fs/ReadTool/ReadTool.js +8 -1
- package/dist/tools/fs/ReadTool/ReadTool.js.map +1 -1
- package/dist/tools/index.d.ts +2 -0
- package/dist/tools/index.d.ts.map +1 -1
- package/dist/tools/index.js +1 -0
- package/dist/tools/index.js.map +1 -1
- package/dist/tools/media/ViewImageTool/ViewImageTool.d.ts +31 -0
- package/dist/tools/media/ViewImageTool/ViewImageTool.d.ts.map +1 -0
- package/dist/tools/media/ViewImageTool/ViewImageTool.js +53 -0
- package/dist/tools/media/ViewImageTool/ViewImageTool.js.map +1 -0
- package/dist/tools/mutation/ConfigureNotificationRoutingTool/ConfigureNotificationRoutingTool.d.ts +25 -0
- package/dist/tools/mutation/ConfigureNotificationRoutingTool/ConfigureNotificationRoutingTool.d.ts.map +1 -0
- package/dist/tools/mutation/ConfigureNotificationRoutingTool/ConfigureNotificationRoutingTool.js +59 -0
- package/dist/tools/mutation/ConfigureNotificationRoutingTool/ConfigureNotificationRoutingTool.js.map +1 -0
- package/dist/tools/mutation/ConfigureNotificationRoutingTool/constants.d.ts +5 -0
- package/dist/tools/mutation/ConfigureNotificationRoutingTool/constants.d.ts.map +1 -0
- package/dist/tools/mutation/ConfigureNotificationRoutingTool/constants.js +5 -0
- package/dist/tools/mutation/ConfigureNotificationRoutingTool/constants.js.map +1 -0
- package/dist/tools/mutation/ConfigureNotificationRoutingTool/prompt.d.ts +2 -0
- package/dist/tools/mutation/ConfigureNotificationRoutingTool/prompt.d.ts.map +1 -0
- package/dist/tools/mutation/ConfigureNotificationRoutingTool/prompt.js +5 -0
- package/dist/tools/mutation/ConfigureNotificationRoutingTool/prompt.js.map +1 -0
- package/dist/tools/mutation/TaskCreateTool/TaskCreateTool.d.ts +4 -4
- package/dist/tools/mutation/TaskOutputTool/TaskOutputTool.d.ts +2 -2
- package/dist/tools/network/GitHubCliTool/GitHubCliTool.d.ts +144 -0
- package/dist/tools/network/GitHubCliTool/GitHubCliTool.d.ts.map +1 -0
- package/dist/tools/network/GitHubCliTool/GitHubCliTool.js +245 -0
- package/dist/tools/network/GitHubCliTool/GitHubCliTool.js.map +1 -0
- package/dist/tools/network/HttpFetchTool/HttpFetchTool.d.ts +16 -0
- package/dist/tools/network/HttpFetchTool/HttpFetchTool.d.ts.map +1 -1
- package/dist/tools/network/HttpFetchTool/HttpFetchTool.js +252 -13
- package/dist/tools/network/HttpFetchTool/HttpFetchTool.js.map +1 -1
- package/dist/tools/network/McpStdioTool/McpStdioTool.d.ts +109 -0
- package/dist/tools/network/McpStdioTool/McpStdioTool.d.ts.map +1 -0
- package/dist/tools/network/McpStdioTool/McpStdioTool.js +121 -0
- package/dist/tools/network/McpStdioTool/McpStdioTool.js.map +1 -0
- package/dist/tools/query/GoalStateTool/GoalStateTool.js +1 -1
- package/dist/tools/query/GoalStateTool/GoalStateTool.js.map +1 -1
- package/dist/tools/query/MemoryRecallTool/MemoryRecallTool.d.ts +4 -4
- package/dist/tools/query/SoilQueryTool/SoilQueryTool.d.ts +118 -0
- package/dist/tools/query/SoilQueryTool/SoilQueryTool.d.ts.map +1 -0
- package/dist/tools/query/SoilQueryTool/SoilQueryTool.js +335 -0
- package/dist/tools/query/SoilQueryTool/SoilQueryTool.js.map +1 -0
- package/dist/tools/query/SoilQueryTool/constants.d.ts +8 -0
- package/dist/tools/query/SoilQueryTool/constants.d.ts.map +1 -0
- package/dist/tools/query/SoilQueryTool/constants.js +8 -0
- package/dist/tools/query/SoilQueryTool/constants.js.map +1 -0
- package/dist/tools/query/SoilQueryTool/prompt.d.ts +2 -0
- package/dist/tools/query/SoilQueryTool/prompt.d.ts.map +1 -0
- package/dist/tools/query/SoilQueryTool/prompt.js +2 -0
- package/dist/tools/query/SoilQueryTool/prompt.js.map +1 -0
- package/dist/tools/schedule/CreateScheduleTool/CreateScheduleTool.d.ts +164 -52
- package/dist/tools/schedule/CreateScheduleTool/CreateScheduleTool.d.ts.map +1 -1
- package/dist/tools/schedule/ListSchedulesTool/ListSchedulesTool.d.ts +4 -4
- package/dist/tools/schedule/UpdateScheduleTool/UpdateScheduleTool.d.ts +76 -76
- package/dist/tools/system/GitLogTool/GitLogTool.d.ts +4 -4
- package/dist/tools/system/ProcessSessionTool/ProcessSessionTool.d.ts +220 -0
- package/dist/tools/system/ProcessSessionTool/ProcessSessionTool.d.ts.map +1 -0
- package/dist/tools/system/ProcessSessionTool/ProcessSessionTool.js +354 -0
- package/dist/tools/system/ProcessSessionTool/ProcessSessionTool.js.map +1 -0
- package/dist/tools/system/ShellCommandTool/ShellCommandTool.d.ts +44 -0
- package/dist/tools/system/ShellCommandTool/ShellCommandTool.d.ts.map +1 -0
- package/dist/tools/system/ShellCommandTool/ShellCommandTool.js +40 -0
- package/dist/tools/system/ShellCommandTool/ShellCommandTool.js.map +1 -0
- package/dist/tools/system/UpdatePlanTool/UpdatePlanTool.d.ts +61 -0
- package/dist/tools/system/UpdatePlanTool/UpdatePlanTool.d.ts.map +1 -0
- package/dist/tools/system/UpdatePlanTool/UpdatePlanTool.js +42 -0
- package/dist/tools/system/UpdatePlanTool/UpdatePlanTool.js.map +1 -0
- package/dist/tools/types.d.ts +6 -2
- package/dist/tools/types.d.ts.map +1 -1
- package/dist/tools/types.js.map +1 -1
- package/package.json +7 -1
- package/dist/adapters/agents/browser-use-cli.d.ts +0 -19
- package/dist/adapters/agents/browser-use-cli.d.ts.map +0 -1
- package/dist/adapters/agents/browser-use-cli.js +0 -74
- package/dist/adapters/agents/browser-use-cli.js.map +0 -1
- package/dist/adapters/agents/openclaw-acp.d.ts +0 -32
- package/dist/adapters/agents/openclaw-acp.d.ts.map +0 -1
- package/dist/adapters/agents/openclaw-acp.js +0 -212
- package/dist/adapters/agents/openclaw-acp.js.map +0 -1
- package/dist/adapters/datasources/openclaw-datasource.d.ts +0 -33
- package/dist/adapters/datasources/openclaw-datasource.d.ts.map +0 -1
- package/dist/adapters/datasources/openclaw-datasource.js +0 -176
- package/dist/adapters/datasources/openclaw-datasource.js.map +0 -1
- package/dist/orchestrator/knowledge/memory/memory-lifecycle.d.ts +0 -2
- package/dist/orchestrator/knowledge/memory/memory-lifecycle.d.ts.map +0 -1
- package/dist/orchestrator/knowledge/memory/memory-lifecycle.js +0 -2
- package/dist/orchestrator/knowledge/memory/memory-lifecycle.js.map +0 -1
|
@@ -3,14 +3,11 @@ import { IterationBudget } from "./iteration-budget.js";
|
|
|
3
3
|
import { saveLoopCheckpoint, restoreLoopCheckpoint } from "./checkpoint-manager-loop.js";
|
|
4
4
|
import { runPostLoopHooks } from "./post-loop-hooks.js";
|
|
5
5
|
import { generateLoopReport } from "./loop-report-helper.js";
|
|
6
|
-
import { makeEmptyIterationResult } from "./loop-result-types.js";
|
|
7
6
|
import { runTreeIteration as runTreeIterationImpl, runMultiGoalIteration as runMultiGoalIterationImpl, } from "./tree-loop-runner.js";
|
|
8
|
-
import { loadGoalWithAggregation, observeAndReload, calculateGapOrComplete, scoreDrivesAndCheckKnowledge, phaseAutoDecompose, } from "./core-loop/preparation.js";
|
|
9
|
-
import { checkCompletionAndMilestones, detectStallsAndRebalance, checkDependencyBlock, runTaskCycleWithContext, } from "./core-loop/task-cycle.js";
|
|
10
|
-
import { runStateDiffCheck, tryParallelExecution, } from "./core-loop/control.js";
|
|
11
|
-
import { handleCapabilityAcquisition } from "./core-loop/capability.js";
|
|
12
7
|
import { CoreLoopLearning } from "./core-loop/learning.js";
|
|
13
|
-
import {
|
|
8
|
+
import { StaticCorePhasePolicyRegistry } from "./core-loop/phase-policy.js";
|
|
9
|
+
import { CoreDecisionEngine } from "./core-loop/decision-engine.js";
|
|
10
|
+
import { CoreIterationKernel } from "./core-loop/iteration-kernel.js";
|
|
14
11
|
export { buildDriveContext } from "./core-loop/contracts.js";
|
|
15
12
|
export { makeEmptyIterationResult } from "./loop-result-types.js";
|
|
16
13
|
const DEFAULT_CONFIG = {
|
|
@@ -44,9 +41,12 @@ export class CoreLoop {
|
|
|
44
41
|
logger;
|
|
45
42
|
stopped = false;
|
|
46
43
|
learning = new CoreLoopLearning();
|
|
44
|
+
corePhasePolicyRegistry;
|
|
45
|
+
coreDecisionEngine;
|
|
47
46
|
/** Optional StateDiffCalculator for loop-skip optimization. */
|
|
48
47
|
stateDiff;
|
|
49
48
|
stateDiffState = new Map();
|
|
49
|
+
pendingIterationDirectives = new Map();
|
|
50
50
|
/** Tracks goals that have already been through auto-decompose this run. */
|
|
51
51
|
decomposedGoals = new Set();
|
|
52
52
|
/** Optional TimeHorizonEngine for adaptive observation interval (Gap 4). */
|
|
@@ -58,6 +58,8 @@ export class CoreLoop {
|
|
|
58
58
|
this.config = { ...DEFAULT_CONFIG, ...config };
|
|
59
59
|
this.logger = deps.logger;
|
|
60
60
|
this.stateDiff = stateDiff;
|
|
61
|
+
this.corePhasePolicyRegistry = deps.corePhasePolicyRegistry ?? new StaticCorePhasePolicyRegistry();
|
|
62
|
+
this.coreDecisionEngine = deps.coreDecisionEngine ?? new CoreDecisionEngine();
|
|
61
63
|
// Wire optional StrategyTemplateRegistry into StrategyManager for auto-templating
|
|
62
64
|
if (deps.strategyTemplateRegistry) {
|
|
63
65
|
deps.strategyManager.setStrategyTemplateRegistry(deps.strategyTemplateRegistry);
|
|
@@ -77,6 +79,7 @@ export class CoreLoop {
|
|
|
77
79
|
this.stateDiffState.clear();
|
|
78
80
|
// Reset auto-decompose tracking for each run
|
|
79
81
|
this.decomposedGoals.clear();
|
|
82
|
+
this.pendingIterationDirectives.clear();
|
|
80
83
|
// Load and validate goal
|
|
81
84
|
const goal = await this.deps.stateManager.loadGoal(goalId);
|
|
82
85
|
if (!goal) {
|
|
@@ -111,9 +114,11 @@ export class CoreLoop {
|
|
|
111
114
|
const startLoopIndex = await restoreLoopCheckpoint(this.deps.stateManager, goalId, this.config.adapterType, this.deps.trustManager);
|
|
112
115
|
const iterations = [];
|
|
113
116
|
let totalTokens = 0;
|
|
114
|
-
let
|
|
115
|
-
|
|
116
|
-
|
|
117
|
+
let decisionCounters = {
|
|
118
|
+
consecutiveErrors: 0,
|
|
119
|
+
consecutiveDenied: 0,
|
|
120
|
+
consecutiveEscalations: 0,
|
|
121
|
+
};
|
|
117
122
|
let finalStatus = "max_iterations";
|
|
118
123
|
// Effective maxIterations: runtime override takes precedence over config.
|
|
119
124
|
const effectiveMaxIterations = options?.maxIterations ?? this.config.maxIterations;
|
|
@@ -141,8 +146,11 @@ export class CoreLoop {
|
|
|
141
146
|
catch (err) {
|
|
142
147
|
const msg = err instanceof Error ? err.message : String(err);
|
|
143
148
|
this.logger?.error(`[CoreLoop] unexpected error in iteration ${loopIndex}: ${msg}`);
|
|
144
|
-
|
|
145
|
-
|
|
149
|
+
decisionCounters = {
|
|
150
|
+
...decisionCounters,
|
|
151
|
+
consecutiveErrors: decisionCounters.consecutiveErrors + 1,
|
|
152
|
+
};
|
|
153
|
+
if (decisionCounters.consecutiveErrors >= this.config.maxConsecutiveErrors) {
|
|
146
154
|
finalStatus = "error";
|
|
147
155
|
break;
|
|
148
156
|
}
|
|
@@ -187,52 +195,19 @@ export class CoreLoop {
|
|
|
187
195
|
if (!this.config.dryRun && iterationResult.error === null && iterationResult.taskResult !== null) {
|
|
188
196
|
await saveLoopCheckpoint(this.deps.stateManager, goalId, loopIndex, iterationResult, this.config.adapterType, this.deps.trustManager, this.logger);
|
|
189
197
|
}
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
loopIndex
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
}
|
|
197
|
-
|
|
198
|
-
if (
|
|
199
|
-
|
|
200
|
-
if (
|
|
201
|
-
finalStatus
|
|
202
|
-
break;
|
|
203
|
-
}
|
|
204
|
-
}
|
|
205
|
-
else {
|
|
206
|
-
consecutiveErrors = 0;
|
|
207
|
-
}
|
|
208
|
-
// Check approval_denied and escalate counters
|
|
209
|
-
const taskAction = iterationResult.taskResult?.action ?? null;
|
|
210
|
-
if (taskAction === "approval_denied") {
|
|
211
|
-
consecutiveDenied++;
|
|
212
|
-
if (consecutiveDenied >= 3) {
|
|
213
|
-
finalStatus = "stopped";
|
|
214
|
-
break;
|
|
215
|
-
}
|
|
216
|
-
}
|
|
217
|
-
else {
|
|
218
|
-
consecutiveDenied = 0;
|
|
219
|
-
}
|
|
220
|
-
if (taskAction === "escalate") {
|
|
221
|
-
consecutiveEscalations++;
|
|
222
|
-
if (consecutiveEscalations >= 3) {
|
|
223
|
-
finalStatus = "stalled";
|
|
224
|
-
break;
|
|
198
|
+
const runDecision = this.coreDecisionEngine.evaluateRunDecision({
|
|
199
|
+
iterationResult,
|
|
200
|
+
loopIndex,
|
|
201
|
+
minIterations: this.config.minIterations ?? 1,
|
|
202
|
+
maxConsecutiveErrors: this.config.maxConsecutiveErrors,
|
|
203
|
+
counters: decisionCounters,
|
|
204
|
+
});
|
|
205
|
+
decisionCounters = runDecision.counters;
|
|
206
|
+
if (runDecision.shouldStop && runDecision.finalStatus) {
|
|
207
|
+
finalStatus = runDecision.finalStatus;
|
|
208
|
+
if (finalStatus === "completed" || finalStatus === "stalled") {
|
|
209
|
+
void this.deps.hookManager?.emit("GoalStateChange", { goal_id: goalId, data: { newStatus: finalStatus } });
|
|
225
210
|
}
|
|
226
|
-
}
|
|
227
|
-
else {
|
|
228
|
-
consecutiveEscalations = 0;
|
|
229
|
-
}
|
|
230
|
-
// Check stall escalation (escalation_level >= 3 means max escalation)
|
|
231
|
-
if (iterationResult.stallDetected &&
|
|
232
|
-
iterationResult.stallReport &&
|
|
233
|
-
iterationResult.stallReport.escalation_level >= 3) {
|
|
234
|
-
finalStatus = "stalled";
|
|
235
|
-
void this.deps.hookManager?.emit("GoalStateChange", { goal_id: goalId, data: { newStatus: "stalled" } });
|
|
236
211
|
break;
|
|
237
212
|
}
|
|
238
213
|
if (this.stopped) {
|
|
@@ -297,167 +272,29 @@ export class CoreLoop {
|
|
|
297
272
|
* Run a single iteration of the loop.
|
|
298
273
|
*/
|
|
299
274
|
async runOneIteration(goalId, loopIndex, isFirstIteration) {
|
|
300
|
-
const
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
error: err instanceof Error ? err.message : String(err),
|
|
320
|
-
});
|
|
321
|
-
throw err;
|
|
322
|
-
}
|
|
323
|
-
};
|
|
324
|
-
// Default result (filled in progressively)
|
|
325
|
-
const result = makeEmptyIterationResult(goalId, loopIndex);
|
|
326
|
-
this.logger?.info(`[CoreLoop] iteration ${loopIndex + 1} starting`, { goalId, loopIndex });
|
|
327
|
-
// 1. Load goal + tree aggregation
|
|
328
|
-
const loadedGoal = await runPhase("load-goal", () => loadGoalWithAggregation(ctx, goalId, result, startTime));
|
|
329
|
-
if (!loadedGoal)
|
|
330
|
-
return result;
|
|
331
|
-
let goal = loadedGoal;
|
|
332
|
-
await runPhase("auto-decompose", () => phaseAutoDecompose(goalId, goal, this.deps, this.config, this.logger, this.decomposedGoals, isFirstIteration));
|
|
333
|
-
// After decomposition: if children were created, reload and switch to tree mode.
|
|
334
|
-
if (!goal.children_ids.length) {
|
|
335
|
-
const reloadedAfterDecompose = await this.deps.stateManager.loadGoal(goalId);
|
|
336
|
-
if (reloadedAfterDecompose && reloadedAfterDecompose.children_ids.length > 0) {
|
|
337
|
-
goal = reloadedAfterDecompose;
|
|
338
|
-
if (this.deps.treeLoopOrchestrator) {
|
|
339
|
-
this.config = { ...this.config, treeMode: true };
|
|
340
|
-
this.logger?.info("[CoreLoop] treeMode enabled after auto-decomposition", { goalId, childrenCount: goal.children_ids.length });
|
|
341
|
-
}
|
|
342
|
-
}
|
|
343
|
-
}
|
|
344
|
-
// 2. Observe + reload
|
|
345
|
-
goal = await runPhase("observe", () => observeAndReload(ctx, goalId, goal, loopIndex));
|
|
346
|
-
// 2b. State diff check (Pillar 2: State Diff + Loop Skip)
|
|
347
|
-
if (this.stateDiff) {
|
|
348
|
-
const { shouldSkip } = await runStateDiffCheck(this.stateDiff, this.stateDiffState, goalId, goal, loopIndex, this.config, this.deps, result, startTime, this.logger);
|
|
349
|
-
if (shouldSkip)
|
|
350
|
-
return result;
|
|
351
|
-
}
|
|
352
|
-
// 3. Gap calculate + zero check
|
|
353
|
-
const gapResult = await runPhase("gap-analysis", () => calculateGapOrComplete(ctx, goalId, goal, loopIndex, result, startTime));
|
|
354
|
-
if (!gapResult)
|
|
355
|
-
return result;
|
|
356
|
-
const { gapVector, gapAggregate, skipTaskGeneration } = gapResult;
|
|
357
|
-
this.logger?.info(`[iter ${loopIndex}] gap: ${gapAggregate.toFixed(2)} | ${(gapVector.gaps ?? []).map((g) => `${g.dimension_name}=${g.normalized_weighted_gap.toFixed(2)}`).join(', ')}`);
|
|
358
|
-
// 4. Drive scoring + knowledge gap check (skip when gap=0 — no task needed)
|
|
359
|
-
let driveScores = [];
|
|
360
|
-
let highDissatisfactionDimensions = [];
|
|
361
|
-
if (!skipTaskGeneration) {
|
|
362
|
-
const driveResult = await runPhase("drive-scoring", () => scoreDrivesAndCheckKnowledge(ctx, goalId, goal, gapVector, loopIndex, result, startTime, (id, idx, r, g) => generateLoopReport(id, idx, r, g, this.deps.reportingEngine, this.logger)));
|
|
363
|
-
if (!driveResult)
|
|
364
|
-
return result;
|
|
365
|
-
driveScores = driveResult.driveScores;
|
|
366
|
-
highDissatisfactionDimensions = driveResult.highDissatisfactionDimensions;
|
|
367
|
-
}
|
|
368
|
-
// 5. Completion check + milestones
|
|
369
|
-
await runPhase("completion-check", () => checkCompletionAndMilestones(ctx, goalId, goal, result, startTime));
|
|
370
|
-
if (result.error)
|
|
371
|
-
return result;
|
|
372
|
-
// 6. Stall detection + rebalance
|
|
373
|
-
await runPhase("stall-detection", () => detectStallsAndRebalance(ctx, goalId, goal, result));
|
|
374
|
-
if (result.stallDetected && result.stallReport) {
|
|
375
|
-
this.logger?.warn(`[iter ${loopIndex}] stall detected: ${result.stallReport.stall_type}`, { escalation: result.stallReport.escalation_level });
|
|
376
|
-
void this.deps.hookManager?.emit("StallDetected", {
|
|
377
|
-
goal_id: goalId,
|
|
378
|
-
dimension: result.stallReport.dimension_name ?? undefined,
|
|
379
|
-
data: {
|
|
380
|
-
stall_type: result.stallReport.stall_type,
|
|
381
|
-
escalation_level: result.stallReport.escalation_level,
|
|
382
|
-
suggested_cause: result.stallReport.suggested_cause,
|
|
383
|
-
task_id: result.stallReport.task_id ?? undefined,
|
|
384
|
-
},
|
|
385
|
-
});
|
|
386
|
-
}
|
|
387
|
-
if (result.stallDetected &&
|
|
388
|
-
this.deps.knowledgeManager &&
|
|
389
|
-
this.deps.toolExecutor) {
|
|
390
|
-
try {
|
|
391
|
-
const activation = await loadDreamActivationState(this.deps.stateManager.getBaseDir());
|
|
392
|
-
if (activation.flags.autoAcquireKnowledge) {
|
|
393
|
-
const portfolio = await Promise.resolve(this.deps.strategyManager.getPortfolio(goalId)).catch(() => null);
|
|
394
|
-
const observationContext = {
|
|
395
|
-
observations: goal.dimensions.map((dimension) => ({
|
|
396
|
-
name: dimension.name,
|
|
397
|
-
current_value: dimension.current_value,
|
|
398
|
-
confidence: dimension.confidence,
|
|
399
|
-
})),
|
|
400
|
-
strategies: portfolio?.strategies ?? null,
|
|
401
|
-
confidence: gapVector.gaps.reduce((sum, gap) => sum + gap.confidence, 0) /
|
|
402
|
-
Math.max(gapVector.gaps.length, 1),
|
|
403
|
-
};
|
|
404
|
-
const gapSignal = await this.deps.knowledgeManager.detectKnowledgeGap(observationContext);
|
|
405
|
-
if (gapSignal) {
|
|
406
|
-
const acquired = await this.deps.knowledgeManager.acquireWithTools(gapSignal.missing_knowledge, goalId, this.deps.toolExecutor, {
|
|
407
|
-
cwd: process.cwd(),
|
|
408
|
-
goalId,
|
|
409
|
-
trustBalance: 0,
|
|
410
|
-
preApproved: true,
|
|
411
|
-
approvalFn: async () => false,
|
|
412
|
-
});
|
|
413
|
-
for (const entry of acquired) {
|
|
414
|
-
await this.deps.knowledgeManager.saveKnowledge(goalId, entry);
|
|
415
|
-
}
|
|
416
|
-
if (acquired.length > 0) {
|
|
417
|
-
this.logger?.info("CoreLoop: dream auto-acquired knowledge and skipped execution for context refresh", {
|
|
418
|
-
goalId,
|
|
419
|
-
acquiredCount: acquired.length,
|
|
420
|
-
});
|
|
421
|
-
await generateLoopReport(goalId, loopIndex, result, goal, this.deps.reportingEngine, this.logger);
|
|
422
|
-
result.skipped = true;
|
|
423
|
-
result.skipReason = "dream_auto_acquire_knowledge";
|
|
424
|
-
result.elapsedMs = Date.now() - startTime;
|
|
425
|
-
return result;
|
|
426
|
-
}
|
|
427
|
-
}
|
|
428
|
-
}
|
|
429
|
-
}
|
|
430
|
-
catch (err) {
|
|
431
|
-
this.logger?.warn("CoreLoop: autoAcquireKnowledge failed (non-fatal)", {
|
|
432
|
-
goalId,
|
|
433
|
-
error: err instanceof Error ? err.message : String(err),
|
|
434
|
-
});
|
|
435
|
-
}
|
|
275
|
+
const result = await new CoreIterationKernel({
|
|
276
|
+
deps: this.deps,
|
|
277
|
+
getConfig: () => this.config,
|
|
278
|
+
setConfig: (nextConfig) => {
|
|
279
|
+
this.config = nextConfig;
|
|
280
|
+
},
|
|
281
|
+
logger: this.logger,
|
|
282
|
+
stateDiff: this.stateDiff,
|
|
283
|
+
stateDiffState: this.stateDiffState,
|
|
284
|
+
decomposedGoals: this.decomposedGoals,
|
|
285
|
+
timeHorizonEngine: this.timeHorizonEngine,
|
|
286
|
+
corePhasePolicyRegistry: this.corePhasePolicyRegistry,
|
|
287
|
+
coreDecisionEngine: this.coreDecisionEngine,
|
|
288
|
+
capabilityFailures: this.learning.getCapabilityFailures(),
|
|
289
|
+
incrementTransferCounter: () => this.learning.incrementTransferCounter(),
|
|
290
|
+
getPendingDirective: (id) => this.pendingIterationDirectives.get(id),
|
|
291
|
+
}).run({ goalId, loopIndex, isFirstIteration });
|
|
292
|
+
if (result.nextIterationDirective) {
|
|
293
|
+
this.pendingIterationDirectives.set(goalId, result.nextIterationDirective);
|
|
436
294
|
}
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
result.elapsedMs = Date.now() - startTime;
|
|
440
|
-
return result;
|
|
295
|
+
else {
|
|
296
|
+
this.pendingIterationDirectives.delete(goalId);
|
|
441
297
|
}
|
|
442
|
-
// 6b. Dependency block check
|
|
443
|
-
if (checkDependencyBlock(ctx, goalId, result))
|
|
444
|
-
return result;
|
|
445
|
-
// 6c. TaskGroup detection and routing (M15 Phase 2)
|
|
446
|
-
const tookParallelPath = await tryParallelExecution(goalId, goal, gapAggregate, result, startTime, this.deps, loopIndex, this.logger);
|
|
447
|
-
if (tookParallelPath)
|
|
448
|
-
return result;
|
|
449
|
-
// 7. Task cycle with context
|
|
450
|
-
const loopCallbacks = {
|
|
451
|
-
handleCapabilityAcquisition: (task, gId, adapter) => handleCapabilityAcquisition(task, gId, adapter, this.deps.capabilityDetector, this.learning.getCapabilityFailures(), this.logger),
|
|
452
|
-
incrementTransferCounter: () => this.learning.incrementTransferCounter(),
|
|
453
|
-
tryGenerateReport: (id, idx, r, g) => generateLoopReport(id, idx, r, g, this.deps.reportingEngine, this.logger),
|
|
454
|
-
};
|
|
455
|
-
const taskCycleOk = await runTaskCycleWithContext(ctx, goalId, goal, gapVector, driveScores, highDissatisfactionDimensions, loopIndex, result, startTime, loopCallbacks);
|
|
456
|
-
if (!taskCycleOk)
|
|
457
|
-
return result;
|
|
458
|
-
// 8. Report
|
|
459
|
-
await generateLoopReport(goalId, loopIndex, result, goal, this.deps.reportingEngine, this.logger);
|
|
460
|
-
result.elapsedMs = Date.now() - startTime;
|
|
461
298
|
return result;
|
|
462
299
|
}
|
|
463
300
|
/**
|
|
@@ -465,13 +302,17 @@ export class CoreLoop {
|
|
|
465
302
|
* normal observe→gap→score→task cycle on that node, then aggregate upward.
|
|
466
303
|
*/
|
|
467
304
|
async runTreeIteration(rootId, loopIndex, nodeConsumedMap) {
|
|
468
|
-
return runTreeIterationImpl(rootId, loopIndex, this.deps, this.config, this.logger, (id, idx) => this.runOneIteration(id, idx), nodeConsumedMap
|
|
305
|
+
return runTreeIterationImpl(rootId, loopIndex, this.deps, this.config, this.logger, (id, idx) => this.runOneIteration(id, idx), nodeConsumedMap, {
|
|
306
|
+
getPendingDirective: (id) => this.pendingIterationDirectives.get(id),
|
|
307
|
+
});
|
|
469
308
|
}
|
|
470
309
|
/**
|
|
471
310
|
* Run one iteration of the multi-goal loop.
|
|
472
311
|
*/
|
|
473
312
|
async runMultiGoalIteration(loopIndex) {
|
|
474
|
-
return runMultiGoalIterationImpl(loopIndex, this.deps, this.config, (id, idx) => this.runOneIteration(id, idx)
|
|
313
|
+
return runMultiGoalIterationImpl(loopIndex, this.deps, this.config, (id, idx) => this.runOneIteration(id, idx), {
|
|
314
|
+
getPendingDirective: (id) => this.pendingIterationDirectives.get(id),
|
|
315
|
+
});
|
|
475
316
|
}
|
|
476
317
|
/**
|
|
477
318
|
* Stop the loop externally (e.g., on SIGTERM).
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"core-loop.js","sourceRoot":"","sources":["../../../src/orchestrator/loop/core-loop.ts"],"names":[],"mapp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AAC;QACD,OAAO,MAAM,CAAC;IAChB,CAAC;IAED;;;OAGG;IACH,KAAK,CAAC,gBAAgB,CAAC,MAAc,EAAE,SAAiB,EAAE,eAAoC;QAC5F,OAAO,oBAAoB,CAAC,MAAM,EAAE,SAAS,EAAE,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,MAAM,EAChF,CAAC,EAAE,EAAE,GAAG,EAAE,EAAE,CAAC,IAAI,CAAC,eAAe,CAAC,EAAE,EAAE,GAAG,CAAC,EAAE,eAAe,EAAE;YAC3D,mBAAmB,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,IAAI,CAAC,0BAA0B,CAAC,GAAG,CAAC,EAAE,CAAC;SACrE,CAAC,CAAC;IACP,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,qBAAqB,CAAC,SAAiB;QAC3C,OAAO,yBAAyB,CAAC,SAAS,EAAE,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,MAAM,EAChE,CAAC,EAAE,EAAE,GAAG,EAAE,EAAE,CAAC,IAAI,CAAC,eAAe,CAAC,EAAE,EAAE,GAAG,CAAC,EAAE;YAC1C,mBAAmB,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,IAAI,CAAC,0BAA0B,CAAC,GAAG,CAAC,EAAE,CAAC;SACrE,CAAC,CAAC;IACP,CAAC;IAED;;OAEG;IACH,IAAI;QACF,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC;IACtB,CAAC;IAED;;;;OAIG;IACH,oBAAoB,CAAC,MAA0B;QAC7C,IAAI,CAAC,iBAAiB,GAAG,MAAM,CAAC;IAClC,CAAC;IAED;;OAEG;IACH,SAAS;QACP,OAAO,IAAI,CAAC,OAAO,CAAC;IACtB,CAAC;CAEF"}
|
|
@@ -4,6 +4,25 @@ import type { StallAnalysis, StallReport } from "../../base/types/stall.js";
|
|
|
4
4
|
import type { TransferCandidate } from "../../base/types/cross-portfolio.js";
|
|
5
5
|
import type { TaskCycleResult } from "../execution/task/task-execution-types.js";
|
|
6
6
|
import type { VerificationLayer1Result } from "./verification-layer1.js";
|
|
7
|
+
import type { CorePhaseKind } from "../execution/agent-loop/core-phase-runner.js";
|
|
8
|
+
export interface CorePhaseIterationResult {
|
|
9
|
+
phase: CorePhaseKind;
|
|
10
|
+
status: "skipped" | "completed" | "low_confidence" | "failed";
|
|
11
|
+
summary?: string;
|
|
12
|
+
traceId?: string;
|
|
13
|
+
sessionId?: string;
|
|
14
|
+
turnId?: string;
|
|
15
|
+
stopReason?: string;
|
|
16
|
+
lowConfidence?: boolean;
|
|
17
|
+
error?: string;
|
|
18
|
+
}
|
|
19
|
+
export interface NextIterationDirective {
|
|
20
|
+
sourcePhase: "knowledge_refresh" | "replanning_options" | "stall_investigation";
|
|
21
|
+
reason: string;
|
|
22
|
+
focusDimension?: string;
|
|
23
|
+
preferredAction?: "continue" | "refine" | "pivot";
|
|
24
|
+
requestedPhase?: "knowledge_refresh" | "normal";
|
|
25
|
+
}
|
|
7
26
|
export interface LoopIterationResult {
|
|
8
27
|
loopIndex: number;
|
|
9
28
|
goalId: string;
|
|
@@ -46,6 +65,10 @@ export interface LoopIterationResult {
|
|
|
46
65
|
waitExpired?: boolean;
|
|
47
66
|
/** Strategy ID of the active WaitStrategy, if any. */
|
|
48
67
|
waitStrategyId?: string;
|
|
68
|
+
/** Agentic core phase results collected during the iteration. */
|
|
69
|
+
corePhaseResults?: CorePhaseIterationResult[];
|
|
70
|
+
/** Deterministic scheduler directive for the next iteration of the same goal. */
|
|
71
|
+
nextIterationDirective?: NextIterationDirective;
|
|
49
72
|
}
|
|
50
73
|
/**
|
|
51
74
|
* Factory that returns a zeroed-out LoopIterationResult for the given goalId
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"loop-result-types.d.ts","sourceRoot":"","sources":["../../../src/orchestrator/loop/loop-result-types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC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F,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,6EAA6E;IAC7E,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,sDAAsD;IACtD,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,iEAAiE;IACjE,gBAAgB,CAAC,EAAE,wBAAwB,EAAE,CAAC;IAC9C,iFAAiF;IACjF,sBAAsB,CAAC,EAAE,sBAAsB,CAAC;CACjD;AAED;;;GAGG;AACH,wBAAgB,wBAAwB,CACtC,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,MAAM,EACjB,SAAS,CAAC,EAAE,OAAO,CAAC,mBAAmB,CAAC,GACvC,mBAAmB,CAqBrB;AAED,MAAM,WAAW,UAAU;IACzB,MAAM,EAAE,MAAM,CAAC;IACf,eAAe,EAAE,MAAM,CAAC;IACxB,WAAW,EAAE,WAAW,GAAG,SAAS,GAAG,gBAAgB,GAAG,OAAO,GAAG,SAAS,CAAC;IAC9E,UAAU,EAAE,mBAAmB,EAAE,CAAC;IAClC,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;IACpB,6DAA6D;IAC7D,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,kDAAkD;IAClD,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"loop-result-types.js","sourceRoot":"","sources":["../../../src/orchestrator/loop/loop-result-types.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"loop-result-types.js","sourceRoot":"","sources":["../../../src/orchestrator/loop/loop-result-types.ts"],"names":[],"mappings":"AAwEA;;;GAGG;AACH,MAAM,UAAU,wBAAwB,CACtC,MAAc,EACd,SAAiB,EACjB,SAAwC;IAExC,OAAO;QACL,SAAS;QACT,MAAM;QACN,YAAY,EAAE,CAAC;QACf,WAAW,EAAE,EAAE;QACf,UAAU,EAAE,IAAI;QAChB,aAAa,EAAE,KAAK;QACpB,WAAW,EAAE,IAAI;QACjB,aAAa,EAAE,KAAK;QACpB,kBAAkB,EAAE;YAClB,WAAW,EAAE,KAAK;YAClB,mBAAmB,EAAE,EAAE;YACvB,yBAAyB,EAAE,EAAE;YAC7B,uBAAuB,EAAE,KAAK;YAC9B,UAAU,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;SACrC;QACD,SAAS,EAAE,CAAC;QACZ,KAAK,EAAE,IAAI;QACX,GAAG,SAAS;KACb,CAAC;AACJ,CAAC"}
|
|
@@ -1,12 +1,16 @@
|
|
|
1
1
|
import type { CoreLoopDeps, ResolvedLoopConfig, LoopIterationResult } from "./core-loop/contracts.js";
|
|
2
2
|
import type { Logger } from "../../runtime/logger.js";
|
|
3
|
+
import type { NextIterationDirective } from "./loop-result-types.js";
|
|
4
|
+
export interface LoopSchedulerOptions {
|
|
5
|
+
getPendingDirective?: (goalId: string) => NextIterationDirective | undefined;
|
|
6
|
+
}
|
|
3
7
|
/**
|
|
4
8
|
* Standalone function extracted from CoreLoop.runTreeIteration.
|
|
5
9
|
*
|
|
6
10
|
* Tree-mode iteration: select one node via TreeLoopOrchestrator, run a
|
|
7
11
|
* normal observe→gap→score→task cycle on that node, then aggregate upward.
|
|
8
12
|
*/
|
|
9
|
-
export declare function runTreeIteration(rootId: string, loopIndex: number, deps: CoreLoopDeps, config: ResolvedLoopConfig, logger: Logger | undefined, runOneIteration: (goalId: string, loopIndex: number) => Promise<LoopIterationResult>, nodeConsumedMap: Map<string, number
|
|
13
|
+
export declare function runTreeIteration(rootId: string, loopIndex: number, deps: CoreLoopDeps, config: ResolvedLoopConfig, logger: Logger | undefined, runOneIteration: (goalId: string, loopIndex: number) => Promise<LoopIterationResult>, nodeConsumedMap: Map<string, number>, schedulerOptions?: LoopSchedulerOptions): Promise<LoopIterationResult>;
|
|
10
14
|
/**
|
|
11
15
|
* Standalone function extracted from CoreLoop.runMultiGoalIteration.
|
|
12
16
|
*
|
|
@@ -20,5 +24,5 @@ export declare function runTreeIteration(rootId: string, loopIndex: number, deps
|
|
|
20
24
|
* Requires config.multiGoalMode=true and config.goalIds to be set.
|
|
21
25
|
* Throws if CrossGoalPortfolio is not injected and multiGoalMode is enabled.
|
|
22
26
|
*/
|
|
23
|
-
export declare function runMultiGoalIteration(loopIndex: number, deps: CoreLoopDeps, config: ResolvedLoopConfig, runOneIteration: (goalId: string, loopIndex: number) => Promise<LoopIterationResult
|
|
27
|
+
export declare function runMultiGoalIteration(loopIndex: number, deps: CoreLoopDeps, config: ResolvedLoopConfig, runOneIteration: (goalId: string, loopIndex: number) => Promise<LoopIterationResult>, schedulerOptions?: LoopSchedulerOptions): Promise<LoopIterationResult>;
|
|
24
28
|
//# sourceMappingURL=tree-loop-runner.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tree-loop-runner.d.ts","sourceRoot":"","sources":["../../../src/orchestrator/loop/tree-loop-runner.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAEtG,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;
|
|
1
|
+
{"version":3,"file":"tree-loop-runner.d.ts","sourceRoot":"","sources":["../../../src/orchestrator/loop/tree-loop-runner.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAEtG,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AAEtD,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,wBAAwB,CAAC;AAErE,MAAM,WAAW,oBAAoB;IACnC,mBAAmB,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,sBAAsB,GAAG,SAAS,CAAC;CAC9E;AAiDD;;;;;GAKG;AACH,wBAAsB,gBAAgB,CACpC,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,MAAM,EACjB,IAAI,EAAE,YAAY,EAClB,MAAM,EAAE,kBAAkB,EAC1B,MAAM,EAAE,MAAM,GAAG,SAAS,EAC1B,eAAe,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,KAAK,OAAO,CAAC,mBAAmB,CAAC,EACpF,eAAe,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,EACpC,gBAAgB,CAAC,EAAE,oBAAoB,GACtC,OAAO,CAAC,mBAAmB,CAAC,CAmI9B;AAED;;;;;;;;;;;;GAYG;AACH,wBAAsB,qBAAqB,CACzC,SAAS,EAAE,MAAM,EACjB,IAAI,EAAE,YAAY,EAClB,MAAM,EAAE,kBAAkB,EAC1B,eAAe,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,KAAK,OAAO,CAAC,mBAAmB,CAAC,EACpF,gBAAgB,CAAC,EAAE,oBAAoB,GACtC,OAAO,CAAC,mBAAmB,CAAC,CA6D9B"}
|
|
@@ -1,11 +1,46 @@
|
|
|
1
1
|
import { makeEmptyIterationResult } from "./core-loop/contracts.js";
|
|
2
|
+
function prioritizeGoalIdsWithDirectives(goalIds, schedulerOptions) {
|
|
3
|
+
const getPendingDirective = schedulerOptions?.getPendingDirective;
|
|
4
|
+
if (!getPendingDirective)
|
|
5
|
+
return [...goalIds];
|
|
6
|
+
const scored = goalIds.map((goalId, index) => {
|
|
7
|
+
const directive = getPendingDirective(goalId);
|
|
8
|
+
const priority = directive
|
|
9
|
+
? (directive.requestedPhase === "knowledge_refresh" ? 0 : 1)
|
|
10
|
+
: 2;
|
|
11
|
+
return { goalId, index, priority };
|
|
12
|
+
});
|
|
13
|
+
scored.sort((a, b) => a.priority - b.priority || a.index - b.index);
|
|
14
|
+
return scored.map((entry) => entry.goalId);
|
|
15
|
+
}
|
|
16
|
+
async function collectDirectivePreferredTreeNodeIds(rootId, deps, schedulerOptions) {
|
|
17
|
+
const getPendingDirective = schedulerOptions?.getPendingDirective;
|
|
18
|
+
if (!getPendingDirective)
|
|
19
|
+
return [];
|
|
20
|
+
const root = await deps.stateManager.loadGoal(rootId);
|
|
21
|
+
if (!root)
|
|
22
|
+
return [];
|
|
23
|
+
const collected = [];
|
|
24
|
+
const queue = [rootId];
|
|
25
|
+
while (queue.length > 0) {
|
|
26
|
+
const currentId = queue.shift();
|
|
27
|
+
const goal = currentId === rootId ? root : await deps.stateManager.loadGoal(currentId);
|
|
28
|
+
if (!goal)
|
|
29
|
+
continue;
|
|
30
|
+
if (getPendingDirective(currentId)) {
|
|
31
|
+
collected.push(currentId);
|
|
32
|
+
}
|
|
33
|
+
queue.push(...goal.children_ids);
|
|
34
|
+
}
|
|
35
|
+
return collected;
|
|
36
|
+
}
|
|
2
37
|
/**
|
|
3
38
|
* Standalone function extracted from CoreLoop.runTreeIteration.
|
|
4
39
|
*
|
|
5
40
|
* Tree-mode iteration: select one node via TreeLoopOrchestrator, run a
|
|
6
41
|
* normal observe→gap→score→task cycle on that node, then aggregate upward.
|
|
7
42
|
*/
|
|
8
|
-
export async function runTreeIteration(rootId, loopIndex, deps, config, logger, runOneIteration, nodeConsumedMap) {
|
|
43
|
+
export async function runTreeIteration(rootId, loopIndex, deps, config, logger, runOneIteration, nodeConsumedMap, schedulerOptions) {
|
|
9
44
|
const orchestrator = deps.treeLoopOrchestrator;
|
|
10
45
|
// 0. Auto-decompose (or refine) if root has no children yet.
|
|
11
46
|
// If root already has children (e.g. resumed session), reset all nodes to "idle"
|
|
@@ -60,7 +95,20 @@ export async function runTreeIteration(rootId, loopIndex, deps, config, logger,
|
|
|
60
95
|
return runOneIteration(rootId, loopIndex);
|
|
61
96
|
}
|
|
62
97
|
// 1. Select next node to iterate
|
|
63
|
-
|
|
98
|
+
let selectedNodeId;
|
|
99
|
+
const preferredNodeIds = await collectDirectivePreferredTreeNodeIds(rootId, deps, schedulerOptions);
|
|
100
|
+
if (preferredNodeIds.length > 0 && "selectPreferredNode" in orchestrator && typeof orchestrator.selectPreferredNode === "function") {
|
|
101
|
+
const preferredSelection = await orchestrator.selectPreferredNode(rootId, preferredNodeIds);
|
|
102
|
+
if (preferredSelection === undefined) {
|
|
103
|
+
selectedNodeId = await orchestrator.selectNextNode(rootId);
|
|
104
|
+
}
|
|
105
|
+
else {
|
|
106
|
+
selectedNodeId = preferredSelection;
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
else {
|
|
110
|
+
selectedNodeId = await orchestrator.selectNextNode(rootId);
|
|
111
|
+
}
|
|
64
112
|
// 2. If null, all nodes are completed/paused — check root completion
|
|
65
113
|
if (selectedNodeId === null) {
|
|
66
114
|
const rootGoal = await deps.stateManager.loadGoal(rootId);
|
|
@@ -133,11 +181,13 @@ export async function runTreeIteration(rootId, loopIndex, deps, config, logger,
|
|
|
133
181
|
* Requires config.multiGoalMode=true and config.goalIds to be set.
|
|
134
182
|
* Throws if CrossGoalPortfolio is not injected and multiGoalMode is enabled.
|
|
135
183
|
*/
|
|
136
|
-
export async function runMultiGoalIteration(loopIndex, deps, config, runOneIteration) {
|
|
184
|
+
export async function runMultiGoalIteration(loopIndex, deps, config, runOneIteration, schedulerOptions) {
|
|
137
185
|
if (!config.multiGoalMode || !config.goalIds || config.goalIds.length === 0) {
|
|
138
186
|
throw new Error("runMultiGoalIteration requires config.multiGoalMode=true and config.goalIds to be non-empty");
|
|
139
187
|
}
|
|
140
188
|
const goalIds = config.goalIds;
|
|
189
|
+
const prioritizedGoalIds = prioritizeGoalIdsWithDirectives(goalIds, schedulerOptions);
|
|
190
|
+
const directiveGoalIds = prioritizedGoalIds.filter((goalId) => schedulerOptions?.getPendingDirective?.(goalId));
|
|
141
191
|
// Build allocation map
|
|
142
192
|
let allocationMap;
|
|
143
193
|
if (deps.crossGoalPortfolio) {
|
|
@@ -151,13 +201,19 @@ export async function runMultiGoalIteration(loopIndex, deps, config, runOneItera
|
|
|
151
201
|
// Select next goal + strategy using PortfolioManager
|
|
152
202
|
if (!deps.portfolioManager) {
|
|
153
203
|
// Without a portfolio manager, round-robin by loopIndex
|
|
154
|
-
const selectedGoalId =
|
|
204
|
+
const selectedGoalId = directiveGoalIds[0] ?? prioritizedGoalIds[loopIndex % prioritizedGoalIds.length];
|
|
155
205
|
return runOneIteration(selectedGoalId, loopIndex);
|
|
156
206
|
}
|
|
157
|
-
|
|
207
|
+
let selection = null;
|
|
208
|
+
if (directiveGoalIds.length > 0) {
|
|
209
|
+
selection = await deps.portfolioManager.selectNextStrategyAcrossGoals(directiveGoalIds, allocationMap);
|
|
210
|
+
}
|
|
211
|
+
if (selection === null) {
|
|
212
|
+
selection = await deps.portfolioManager.selectNextStrategyAcrossGoals(prioritizedGoalIds, allocationMap);
|
|
213
|
+
}
|
|
158
214
|
if (selection === null) {
|
|
159
215
|
// No strategies available — return a no-op result for the first goal
|
|
160
|
-
const fallbackGoalId =
|
|
216
|
+
const fallbackGoalId = prioritizedGoalIds[0];
|
|
161
217
|
return runOneIteration(fallbackGoalId, loopIndex);
|
|
162
218
|
}
|
|
163
219
|
// Record that a task was dispatched for this goal
|