pulseed 0.4.4 → 0.4.7
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 +30 -102
- 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-lock.d.ts +3 -1
- package/dist/base/state/state-lock.d.ts.map +1 -1
- package/dist/base/state/state-lock.js +52 -10
- package/dist/base/state/state-lock.js.map +1 -1
- package/dist/base/state/state-manager-goal-write.d.ts +4 -0
- package/dist/base/state/state-manager-goal-write.d.ts.map +1 -1
- package/dist/base/state/state-manager-goal-write.js +45 -3
- package/dist/base/state/state-manager-goal-write.js.map +1 -1
- package/dist/base/state/state-manager-wal.d.ts.map +1 -1
- package/dist/base/state/state-manager-wal.js +12 -0
- package/dist/base/state/state-manager-wal.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 +221 -177
- package/dist/base/state/state-manager.js.map +1 -1
- package/dist/index.d.ts +13 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +9 -0
- package/dist/index.js.map +1 -1
- package/dist/interface/chat/chat-event-state.d.ts.map +1 -1
- package/dist/interface/chat/chat-event-state.js +12 -24
- 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 +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 +28 -0
- package/dist/interface/chat/chat-runner.d.ts.map +1 -1
- package/dist/interface/chat/chat-runner.js +392 -45
- 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 +249 -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 +57 -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 +29 -6
- package/dist/interface/cli/commands/daemon.js.map +1 -1
- package/dist/interface/cli/commands/doctor.d.ts +4 -0
- package/dist/interface/cli/commands/doctor.d.ts.map +1 -1
- package/dist/interface/cli/commands/doctor.js +172 -1
- 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/import/apply.d.ts +3 -0
- package/dist/interface/cli/commands/setup/import/apply.d.ts.map +1 -0
- package/dist/interface/cli/commands/setup/import/apply.js +140 -0
- package/dist/interface/cli/commands/setup/import/apply.js.map +1 -0
- package/dist/interface/cli/commands/setup/import/constants.d.ts +5 -0
- package/dist/interface/cli/commands/setup/import/constants.d.ts.map +1 -0
- package/dist/interface/cli/commands/setup/import/constants.js +19 -0
- package/dist/interface/cli/commands/setup/import/constants.js.map +1 -0
- package/dist/interface/cli/commands/setup/import/discovery.d.ts +3 -0
- package/dist/interface/cli/commands/setup/import/discovery.d.ts.map +1 -0
- package/dist/interface/cli/commands/setup/import/discovery.js +140 -0
- package/dist/interface/cli/commands/setup/import/discovery.js.map +1 -0
- package/dist/interface/cli/commands/setup/import/flow.d.ts +5 -0
- package/dist/interface/cli/commands/setup/import/flow.d.ts.map +1 -0
- package/dist/interface/cli/commands/setup/import/flow.js +138 -0
- package/dist/interface/cli/commands/setup/import/flow.js.map +1 -0
- package/dist/interface/cli/commands/setup/import/fs-utils.d.ts +9 -0
- package/dist/interface/cli/commands/setup/import/fs-utils.d.ts.map +1 -0
- package/dist/interface/cli/commands/setup/import/fs-utils.js +83 -0
- package/dist/interface/cli/commands/setup/import/fs-utils.js.map +1 -0
- package/dist/interface/cli/commands/setup/import/mcp.d.ts +4 -0
- package/dist/interface/cli/commands/setup/import/mcp.d.ts.map +1 -0
- package/dist/interface/cli/commands/setup/import/mcp.js +71 -0
- package/dist/interface/cli/commands/setup/import/mcp.js.map +1 -0
- package/dist/interface/cli/commands/setup/import/parse.d.ts +7 -0
- package/dist/interface/cli/commands/setup/import/parse.d.ts.map +1 -0
- package/dist/interface/cli/commands/setup/import/parse.js +40 -0
- package/dist/interface/cli/commands/setup/import/parse.js.map +1 -0
- package/dist/interface/cli/commands/setup/import/provider.d.ts +4 -0
- package/dist/interface/cli/commands/setup/import/provider.d.ts.map +1 -0
- package/dist/interface/cli/commands/setup/import/provider.js +142 -0
- package/dist/interface/cli/commands/setup/import/provider.js.map +1 -0
- package/dist/interface/cli/commands/setup/import/types.d.ts +53 -0
- package/dist/interface/cli/commands/setup/import/types.d.ts.map +1 -0
- package/dist/interface/cli/commands/setup/import/types.js +2 -0
- package/dist/interface/cli/commands/setup/import/types.js.map +1 -0
- package/dist/interface/cli/commands/setup/steps-adapter.d.ts +1 -1
- package/dist/interface/cli/commands/setup/steps-adapter.d.ts.map +1 -1
- package/dist/interface/cli/commands/setup/steps-adapter.js +32 -5
- package/dist/interface/cli/commands/setup/steps-adapter.js.map +1 -1
- package/dist/interface/cli/commands/setup/steps-identity.d.ts +2 -2
- package/dist/interface/cli/commands/setup/steps-identity.d.ts.map +1 -1
- package/dist/interface/cli/commands/setup/steps-identity.js +10 -4
- package/dist/interface/cli/commands/setup/steps-identity.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/steps-provider.d.ts +4 -4
- package/dist/interface/cli/commands/setup/steps-provider.d.ts.map +1 -1
- package/dist/interface/cli/commands/setup/steps-provider.js +58 -10
- package/dist/interface/cli/commands/setup/steps-provider.js.map +1 -1
- package/dist/interface/cli/commands/setup/steps-runtime.d.ts.map +1 -1
- package/dist/interface/cli/commands/setup/steps-runtime.js +2 -3
- package/dist/interface/cli/commands/setup/steps-runtime.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-wizard.d.ts.map +1 -1
- package/dist/interface/cli/commands/setup-wizard.js +309 -62
- package/dist/interface/cli/commands/setup-wizard.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 +146 -17
- 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 +40 -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 +125 -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/pipeline-executor.d.ts +1 -0
- package/dist/orchestrator/execution/pipeline-executor.d.ts.map +1 -1
- package/dist/orchestrator/execution/pipeline-executor.js +39 -8
- package/dist/orchestrator/execution/pipeline-executor.js.map +1 -1
- package/dist/orchestrator/execution/result-reconciler.d.ts.map +1 -1
- package/dist/orchestrator/execution/result-reconciler.js +79 -54
- package/dist/orchestrator/execution/result-reconciler.js.map +1 -1
- package/dist/orchestrator/execution/task/task-execution-helpers.d.ts +2 -1
- package/dist/orchestrator/execution/task/task-execution-helpers.d.ts.map +1 -1
- package/dist/orchestrator/execution/task/task-execution-helpers.js +11 -1
- package/dist/orchestrator/execution/task/task-execution-helpers.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 +23 -4
- package/dist/orchestrator/execution/task/task-lifecycle.d.ts.map +1 -1
- package/dist/orchestrator/execution/task/task-lifecycle.js +188 -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/goal-dependency-graph.d.ts.map +1 -1
- package/dist/orchestrator/goal/goal-dependency-graph.js +20 -8
- package/dist/orchestrator/goal/goal-dependency-graph.js.map +1 -1
- package/dist/orchestrator/goal/goal-refiner.d.ts +3 -5
- package/dist/orchestrator/goal/goal-refiner.d.ts.map +1 -1
- package/dist/orchestrator/goal/goal-refiner.js +3 -5
- package/dist/orchestrator/goal/goal-refiner.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/cross-goal-portfolio.d.ts.map +1 -1
- package/dist/orchestrator/strategy/cross-goal-portfolio.js +20 -12
- package/dist/orchestrator/strategy/cross-goal-portfolio.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 +11 -7
- 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-base.d.ts.map +1 -1
- package/dist/orchestrator/strategy/strategy-manager-base.js +29 -24
- package/dist/orchestrator/strategy/strategy-manager-base.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 +32 -0
- package/dist/platform/dream/dream-soil-sync.d.ts.map +1 -0
- package/dist/platform/dream/dream-soil-sync.js +106 -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/drive/satisficing-judge.d.ts.map +1 -1
- package/dist/platform/drive/satisficing-judge.js +20 -6
- package/dist/platform/drive/satisficing-judge.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 +20 -6
- 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 +40 -1
- package/dist/platform/knowledge/knowledge-manager.js.map +1 -1
- package/dist/platform/knowledge/knowledge-search.d.ts.map +1 -1
- package/dist/platform/knowledge/knowledge-search.js +15 -3
- package/dist/platform/knowledge/knowledge-search.js.map +1 -1
- package/dist/platform/knowledge/learning/learning-cross-goal.d.ts.map +1 -1
- package/dist/platform/knowledge/learning/learning-cross-goal.js +9 -5
- package/dist/platform/knowledge/learning/learning-cross-goal.js.map +1 -1
- package/dist/platform/observation/observation-apply.d.ts.map +1 -1
- package/dist/platform/observation/observation-apply.js +93 -99
- package/dist/platform/observation/observation-apply.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/compiled-memory-projections.d.ts +12 -0
- package/dist/platform/soil/compiled-memory-projections.d.ts.map +1 -0
- package/dist/platform/soil/compiled-memory-projections.js +238 -0
- package/dist/platform/soil/compiled-memory-projections.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 +20 -0
- package/dist/platform/soil/content-projections.d.ts.map +1 -0
- package/dist/platform/soil/content-projections.js +451 -0
- package/dist/platform/soil/content-projections.js.map +1 -0
- package/dist/platform/soil/context-compiler.d.ts +34 -0
- package/dist/platform/soil/context-compiler.d.ts.map +1 -0
- package/dist/platform/soil/context-compiler.js +298 -0
- package/dist/platform/soil/context-compiler.js.map +1 -0
- package/dist/platform/soil/context-evaluation.d.ts +63 -0
- package/dist/platform/soil/context-evaluation.d.ts.map +1 -0
- package/dist/platform/soil/context-evaluation.js +90 -0
- package/dist/platform/soil/context-evaluation.js.map +1 -0
- package/dist/platform/soil/contracts.d.ts +1366 -0
- package/dist/platform/soil/contracts.d.ts.map +1 -0
- package/dist/platform/soil/contracts.js +281 -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 +38 -0
- package/dist/platform/soil/doctor.d.ts.map +1 -0
- package/dist/platform/soil/doctor.js +473 -0
- package/dist/platform/soil/doctor.js.map +1 -0
- package/dist/platform/soil/feedback-store.d.ts +10 -0
- package/dist/platform/soil/feedback-store.d.ts.map +1 -0
- package/dist/platform/soil/feedback-store.js +38 -0
- package/dist/platform/soil/feedback-store.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/health.d.ts +35 -0
- package/dist/platform/soil/health.d.ts.map +1 -0
- package/dist/platform/soil/health.js +126 -0
- package/dist/platform/soil/health.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 +408 -0
- package/dist/platform/soil/index-store.js.map +1 -0
- package/dist/platform/soil/index.d.ts +24 -0
- package/dist/platform/soil/index.d.ts.map +1 -0
- package/dist/platform/soil/index.js +24 -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/projection-support.d.ts +48 -0
- package/dist/platform/soil/projection-support.d.ts.map +1 -0
- package/dist/platform/soil/projection-support.js +107 -0
- package/dist/platform/soil/projection-support.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 +200 -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 +929 -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/command-dispatcher.d.ts +2 -0
- package/dist/runtime/command-dispatcher.d.ts.map +1 -1
- package/dist/runtime/command-dispatcher.js +11 -0
- package/dist/runtime/command-dispatcher.js.map +1 -1
- package/dist/runtime/control/daemon-runtime-control-executor.d.ts +13 -0
- package/dist/runtime/control/daemon-runtime-control-executor.d.ts.map +1 -0
- package/dist/runtime/control/daemon-runtime-control-executor.js +46 -0
- package/dist/runtime/control/daemon-runtime-control-executor.js.map +1 -0
- package/dist/runtime/control/index.d.ts +7 -0
- package/dist/runtime/control/index.d.ts.map +1 -0
- package/dist/runtime/control/index.js +4 -0
- package/dist/runtime/control/index.js.map +1 -0
- package/dist/runtime/control/runtime-control-intent.d.ts +7 -0
- package/dist/runtime/control/runtime-control-intent.d.ts.map +1 -0
- package/dist/runtime/control/runtime-control-intent.js +31 -0
- package/dist/runtime/control/runtime-control-intent.js.map +1 -0
- package/dist/runtime/control/runtime-control-service.d.ts +44 -0
- package/dist/runtime/control/runtime-control-service.d.ts.map +1 -0
- package/dist/runtime/control/runtime-control-service.js +143 -0
- package/dist/runtime/control/runtime-control-service.js.map +1 -0
- package/dist/runtime/daemon/client.d.ts +17 -0
- package/dist/runtime/daemon/client.d.ts.map +1 -1
- package/dist/runtime/daemon/client.js +45 -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 +8 -3
- package/dist/runtime/daemon/runner.d.ts.map +1 -1
- package/dist/runtime/daemon/runner.js +211 -169
- 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 +28 -0
- package/dist/runtime/event/server.d.ts.map +1 -1
- package/dist/runtime/event/server.js +341 -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/store/index.d.ts +3 -0
- package/dist/runtime/store/index.d.ts.map +1 -1
- package/dist/runtime/store/index.js +2 -0
- package/dist/runtime/store/index.js.map +1 -1
- package/dist/runtime/store/runtime-operation-schemas.d.ts +213 -0
- package/dist/runtime/store/runtime-operation-schemas.d.ts.map +1 -0
- package/dist/runtime/store/runtime-operation-schemas.js +62 -0
- package/dist/runtime/store/runtime-operation-schemas.js.map +1 -0
- package/dist/runtime/store/runtime-operation-store.d.ts +17 -0
- package/dist/runtime/store/runtime-operation-store.d.ts.map +1 -0
- package/dist/runtime/store/runtime-operation-store.js +57 -0
- package/dist/runtime/store/runtime-operation-store.js.map +1 -0
- package/dist/runtime/store/runtime-schemas.d.ts +2 -2
- package/dist/runtime/types/cron.d.ts +4 -4
- package/dist/runtime/types/daemon.d.ts +6 -0
- package/dist/runtime/types/daemon.d.ts.map +1 -1
- package/dist/runtime/types/daemon.js +2 -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/RunAdapterTool/RunAdapterTool.d.ts.map +1 -1
- package/dist/tools/execution/RunAdapterTool/RunAdapterTool.js +20 -0
- package/dist/tools/execution/RunAdapterTool/RunAdapterTool.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/EnvTool/EnvTool.d.ts +4 -4
- 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
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import * as fs from "node:fs";
|
|
2
|
-
import * as fsp from "node:fs/promises";
|
|
3
2
|
import * as path from "node:path";
|
|
4
3
|
import { spawnSync } from "node:child_process";
|
|
5
|
-
import { TaskSchema } from "../../base/types/task.js";
|
|
6
4
|
import { getProviderRuntimeFingerprint } from "../../base/llm/provider-config.js";
|
|
7
5
|
import { EventServer } from "../event/server.js";
|
|
8
6
|
import { DaemonConfigSchema, DaemonStateSchema, ResidentActivitySchema } from "../../base/types/daemon.js";
|
|
7
|
+
import { lintAgentMemory } from "../../platform/knowledge/knowledge-manager-lint.js";
|
|
9
8
|
import { DreamAnalyzer } from "../../platform/dream/dream-analyzer.js";
|
|
9
|
+
import { DreamConsolidator } from "../../platform/dream/dream-consolidator.js";
|
|
10
10
|
import { DreamScheduleSuggestionStore } from "../../platform/dream/dream-schedule-suggestions.js";
|
|
11
|
+
import { createRuntimeDreamSoilSyncService } from "../../platform/dream/dream-soil-sync.js";
|
|
11
12
|
import { runDreamConsolidation } from "../../reflection/dream-consolidation.js";
|
|
12
|
-
import { PipelineStateSchema } from "../../base/types/pipeline.js";
|
|
13
13
|
import { generateCronEntry } from "./signals.js";
|
|
14
14
|
import { rotateDaemonLog, calculateAdaptiveInterval as calcAdaptiveInterval } from "./health.js";
|
|
15
15
|
import { HttpChannelAdapter } from "../gateway/index.js";
|
|
16
16
|
import { PulSeedEventSchema } from "../../base/types/drive.js";
|
|
17
17
|
import { LoopSupervisor } from "../executor/index.js";
|
|
18
|
-
import { ApprovalStore, OutboxStore, RuntimeHealthStore, createRuntimeStorePaths } from "../store/index.js";
|
|
18
|
+
import { ApprovalStore, OutboxStore, RuntimeHealthStore, RuntimeOperationStore, createRuntimeStorePaths, } from "../store/index.js";
|
|
19
19
|
import { LeaderLockManager } from "../leader-lock-manager.js";
|
|
20
20
|
import { GoalLeaseManager } from "../goal-lease-manager.js";
|
|
21
21
|
import { JournalBackedQueue } from "../queue/journal-backed-queue.js";
|
|
@@ -25,10 +25,14 @@ import { CommandDispatcher } from "../command-dispatcher.js";
|
|
|
25
25
|
import { EventDispatcher } from "../event/dispatcher.js";
|
|
26
26
|
import { RuntimeOwnershipCoordinator, } from "./runtime-ownership.js";
|
|
27
27
|
import { ProcessShutdownCoordinator, startDaemonStatusHeartbeat, } from "./runner-lifecycle.js";
|
|
28
|
+
import { handleCriticalDaemonError, handleDaemonLoopError, runCommandWithHealth as runCommandWithHealthFn, } from "./runner-errors.js";
|
|
29
|
+
import { reconcileInterruptedExecutions as reconcileInterruptedExecutionsFn } from "./runner-recovery.js";
|
|
28
30
|
import { checkCrashRecoveryMarker, cleanupDaemonRun, collectGoalCycleScheduleSnapshot, deleteShutdownMarkerFile, determineActiveGoalsForCycle, expireOldCronTasks, getMaxGapScoreForGoals, getNextIntervalForGoals, processCronTasksForDaemon, processScheduleEntriesForDaemon, runRuntimeStoreMaintenanceCycle, readShutdownMarkerFile, restoreInterruptedGoals, runProactiveMaintenance, runSupervisorMaintenanceCycleForDaemon, saveDaemonStateFile, writeChatMessageEvent, writeShutdownMarkerFile, } from "./index.js";
|
|
29
|
-
import { appendTaskOutcomeEvent } from "../../orchestrator/execution/task/task-outcome-ledger.js";
|
|
30
|
-
import { durationToMs } from "../../orchestrator/execution/task/task-executor.js";
|
|
31
31
|
const RUNTIME_JOURNAL_MAX_ATTEMPTS = 1_000;
|
|
32
|
+
function resolveResidentWorkspaceDir(configuredPath) {
|
|
33
|
+
const trimmed = configuredPath?.trim();
|
|
34
|
+
return trimmed ? path.resolve(trimmed) : process.cwd();
|
|
35
|
+
}
|
|
32
36
|
function gatherResidentWorkspaceContext(workspaceDir, seedDescription) {
|
|
33
37
|
const parts = [`Workspace: ${workspaceDir}`];
|
|
34
38
|
const seed = seedDescription?.trim();
|
|
@@ -132,6 +136,8 @@ export class DaemonRunner {
|
|
|
132
136
|
shutdownCoordinator = null;
|
|
133
137
|
stopStatusHeartbeat = null;
|
|
134
138
|
lastRuntimeStoreMaintenanceAt = 0;
|
|
139
|
+
startupRuntimeStoreMaintenancePromise = null;
|
|
140
|
+
startupRuntimeStoreMaintenanceError = null;
|
|
135
141
|
deps;
|
|
136
142
|
runtimeRoot = null;
|
|
137
143
|
approvalStore = null;
|
|
@@ -248,7 +254,6 @@ export class DaemonRunner {
|
|
|
248
254
|
await this.checkCrashRecovery();
|
|
249
255
|
await this.initializeRuntimeFoundation();
|
|
250
256
|
await this.acquireRuntimeLeadership();
|
|
251
|
-
await this.runRuntimeStoreMaintenance(true);
|
|
252
257
|
// 2c. Start EventServer (always-on) and file watcher
|
|
253
258
|
if (!this.eventServer) {
|
|
254
259
|
const esPort = this.config.event_server_port ?? 41700;
|
|
@@ -406,6 +411,7 @@ export class DaemonRunner {
|
|
|
406
411
|
this.logger.error(`Goal ${goalId} suspended after ${crashCount} crashes: ${lastError}`);
|
|
407
412
|
},
|
|
408
413
|
}, {
|
|
414
|
+
concurrency: this.config.max_concurrent_goals,
|
|
409
415
|
iterationsPerCycle: this.config.iterations_per_cycle,
|
|
410
416
|
stateFilePath: path.join(this.runtimeRoot, "supervisor-state.json"),
|
|
411
417
|
});
|
|
@@ -427,6 +433,7 @@ export class DaemonRunner {
|
|
|
427
433
|
onGoalStop: async (goalId) => this.runCommandWithHealth("goal_stop", () => this.handleGoalStopCommand(goalId)),
|
|
428
434
|
onChatMessage: async (goalId, message) => this.runCommandWithHealth("chat_message", () => this.handleChatMessageCommand(goalId, message)),
|
|
429
435
|
onApprovalResponse: async (goalId, requestId, approved) => this.runCommandWithHealth("approval_response", () => this.handleApprovalResponseCommand(goalId, requestId, approved)),
|
|
436
|
+
onRuntimeControl: async (operationId, kind) => this.runCommandWithHealth("runtime_control", () => this.handleRuntimeControlCommand(operationId, kind)),
|
|
430
437
|
});
|
|
431
438
|
}
|
|
432
439
|
await this.saveRuntimeHealthSnapshot(this.supervisor
|
|
@@ -439,6 +446,7 @@ export class DaemonRunner {
|
|
|
439
446
|
outbox: "ok",
|
|
440
447
|
supervisor: this.supervisor ? "ok" : "degraded",
|
|
441
448
|
});
|
|
449
|
+
this.startStartupRuntimeStoreMaintenance();
|
|
442
450
|
// 8. Run main loop — supervisor mode when supervisor is injected via deps,
|
|
443
451
|
// fallback to sequential runLoop otherwise.
|
|
444
452
|
startupReady = true;
|
|
@@ -451,6 +459,7 @@ export class DaemonRunner {
|
|
|
451
459
|
await this.supervisor.start(mergedGoalIds);
|
|
452
460
|
const maintenanceIntervalMs = this.config.check_interval_ms;
|
|
453
461
|
await this.runSupervisorMaintenanceCycle();
|
|
462
|
+
await this.reconcileRuntimeControlOperationsAfterStartup();
|
|
454
463
|
this.cronScheduleInterval = setInterval(async () => {
|
|
455
464
|
if (this.shuttingDown)
|
|
456
465
|
return;
|
|
@@ -466,6 +475,7 @@ export class DaemonRunner {
|
|
|
466
475
|
}
|
|
467
476
|
else {
|
|
468
477
|
// Fallback: sequential mode
|
|
478
|
+
await this.reconcileRuntimeControlOperationsAfterStartup();
|
|
469
479
|
await this.runLoop();
|
|
470
480
|
cleanupHandled = true;
|
|
471
481
|
}
|
|
@@ -500,7 +510,12 @@ export class DaemonRunner {
|
|
|
500
510
|
}
|
|
501
511
|
catch (err) {
|
|
502
512
|
if (!startupReady) {
|
|
503
|
-
|
|
513
|
+
try {
|
|
514
|
+
await this.drainStartupRuntimeStoreMaintenance();
|
|
515
|
+
}
|
|
516
|
+
finally {
|
|
517
|
+
await this.releaseStartupOwnership();
|
|
518
|
+
}
|
|
504
519
|
}
|
|
505
520
|
throw err;
|
|
506
521
|
}
|
|
@@ -687,17 +702,15 @@ export class DaemonRunner {
|
|
|
687
702
|
* Increments crash_count and stops daemon if max_retries exceeded.
|
|
688
703
|
*/
|
|
689
704
|
handleLoopError(goalId, err) {
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
705
|
+
const { shouldStop } = handleDaemonLoopError({
|
|
706
|
+
goalId,
|
|
707
|
+
error: err,
|
|
708
|
+
state: this.state,
|
|
709
|
+
maxRetries: this.config.crash_recovery.max_retries,
|
|
710
|
+
logger: this.logger,
|
|
711
|
+
observeTaskExecution: (status, reason) => this.runtimeOwnership.observeTaskExecution(status, reason),
|
|
697
712
|
});
|
|
698
|
-
|
|
699
|
-
if (this.state.crash_count >= this.config.crash_recovery.max_retries) {
|
|
700
|
-
this.logger.error(`Max crash retries (${this.config.crash_recovery.max_retries}) exceeded, stopping daemon`);
|
|
713
|
+
if (shouldStop) {
|
|
701
714
|
this.running = false;
|
|
702
715
|
}
|
|
703
716
|
}
|
|
@@ -706,13 +719,13 @@ export class DaemonRunner {
|
|
|
706
719
|
* Marks state as crashed and stops the loop.
|
|
707
720
|
*/
|
|
708
721
|
async handleCriticalError(err) {
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
722
|
+
await handleCriticalDaemonError({
|
|
723
|
+
error: err,
|
|
724
|
+
state: this.state,
|
|
725
|
+
logger: this.logger,
|
|
726
|
+
observeTaskExecution: (status, reason) => this.runtimeOwnership.observeTaskExecution(status, reason),
|
|
727
|
+
saveDaemonState: () => this.saveDaemonState(),
|
|
728
|
+
});
|
|
716
729
|
this.running = false;
|
|
717
730
|
}
|
|
718
731
|
// ─── Private: State Persistence ───
|
|
@@ -731,142 +744,38 @@ export class DaemonRunner {
|
|
|
731
744
|
return restoreInterruptedGoals(this.baseDir, goalIds, this.logger);
|
|
732
745
|
}
|
|
733
746
|
async reconcileInterruptedExecutions() {
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
...task,
|
|
739
|
-
status: "error",
|
|
740
|
-
completed_at: task.completed_at ?? now,
|
|
741
|
-
heartbeat_at: now,
|
|
742
|
-
execution_output: [
|
|
743
|
-
task.execution_output,
|
|
744
|
-
"[RECOVERED] Task execution was interrupted by daemon crash or restart before completion.",
|
|
745
|
-
]
|
|
746
|
-
.filter((value) => typeof value === "string" && value.length > 0)
|
|
747
|
-
.join("\n"),
|
|
748
|
-
});
|
|
749
|
-
await this.stateManager.writeRaw(`tasks/${task.goal_id}/${task.id}.json`, recoveredTask);
|
|
750
|
-
await this.appendRecoveredTaskHistory(recoveredTask);
|
|
751
|
-
await appendTaskOutcomeEvent(this.stateManager, {
|
|
752
|
-
task: recoveredTask,
|
|
753
|
-
type: "failed",
|
|
754
|
-
attempt: Math.max(task.consecutive_failure_count + 1, 1),
|
|
755
|
-
reason: "task execution interrupted by daemon recovery",
|
|
756
|
-
});
|
|
757
|
-
await appendTaskOutcomeEvent(this.stateManager, {
|
|
758
|
-
task: recoveredTask,
|
|
759
|
-
type: "retried",
|
|
760
|
-
attempt: Math.max(task.consecutive_failure_count + 1, 1),
|
|
761
|
-
action: "keep",
|
|
762
|
-
reason: "daemon restarted; task preserved for retry",
|
|
763
|
-
});
|
|
764
|
-
recoveredGoalIds.add(task.goal_id);
|
|
765
|
-
}
|
|
766
|
-
await this.reconcileInterruptedPipelines(now);
|
|
767
|
-
if (recoveredGoalIds.size > 0) {
|
|
768
|
-
this.logger.warn("Recovered interrupted task executions on startup", {
|
|
769
|
-
goals: [...recoveredGoalIds],
|
|
770
|
-
count: recoveredGoalIds.size,
|
|
771
|
-
});
|
|
772
|
-
}
|
|
773
|
-
return [...recoveredGoalIds];
|
|
774
|
-
}
|
|
775
|
-
async findRunningTasks() {
|
|
776
|
-
const tasksDir = path.join(this.baseDir, "tasks");
|
|
777
|
-
let goalDirs;
|
|
778
|
-
try {
|
|
779
|
-
goalDirs = await fsp.readdir(tasksDir, { withFileTypes: true });
|
|
780
|
-
}
|
|
781
|
-
catch (err) {
|
|
782
|
-
if (err.code === "ENOENT") {
|
|
783
|
-
return [];
|
|
784
|
-
}
|
|
785
|
-
throw err;
|
|
786
|
-
}
|
|
787
|
-
const runningTasks = [];
|
|
788
|
-
for (const goalDir of goalDirs) {
|
|
789
|
-
if (!goalDir.isDirectory()) {
|
|
790
|
-
continue;
|
|
791
|
-
}
|
|
792
|
-
const goalTaskDir = path.join(tasksDir, goalDir.name);
|
|
793
|
-
let taskEntries;
|
|
794
|
-
try {
|
|
795
|
-
taskEntries = await fsp.readdir(goalTaskDir, { withFileTypes: true });
|
|
796
|
-
}
|
|
797
|
-
catch {
|
|
798
|
-
continue;
|
|
799
|
-
}
|
|
800
|
-
for (const entry of taskEntries) {
|
|
801
|
-
if (!entry.isFile() || !entry.name.endsWith(".json") || entry.name === "task-history.json") {
|
|
802
|
-
continue;
|
|
803
|
-
}
|
|
804
|
-
try {
|
|
805
|
-
const raw = await this.stateManager.readRaw(`tasks/${goalDir.name}/${entry.name}`);
|
|
806
|
-
if (!raw || typeof raw !== "object" || raw.status !== "running") {
|
|
807
|
-
continue;
|
|
808
|
-
}
|
|
809
|
-
runningTasks.push(TaskSchema.parse(raw));
|
|
810
|
-
}
|
|
811
|
-
catch {
|
|
812
|
-
// Ignore malformed task files during startup reconciliation.
|
|
813
|
-
}
|
|
814
|
-
}
|
|
815
|
-
}
|
|
816
|
-
return runningTasks;
|
|
817
|
-
}
|
|
818
|
-
async appendRecoveredTaskHistory(task) {
|
|
819
|
-
const historyPath = `tasks/${task.goal_id}/task-history.json`;
|
|
820
|
-
const existing = await this.stateManager.readRaw(historyPath);
|
|
821
|
-
const history = Array.isArray(existing) ? existing : [];
|
|
822
|
-
const actualElapsedMs = task.started_at && task.completed_at
|
|
823
|
-
? new Date(task.completed_at).getTime() - new Date(task.started_at).getTime()
|
|
824
|
-
: null;
|
|
825
|
-
history.push({
|
|
826
|
-
task_id: task.id,
|
|
827
|
-
status: task.status,
|
|
828
|
-
primary_dimension: task.primary_dimension,
|
|
829
|
-
consecutive_failure_count: task.consecutive_failure_count,
|
|
830
|
-
completed_at: task.completed_at ?? new Date().toISOString(),
|
|
831
|
-
actual_elapsed_ms: actualElapsedMs,
|
|
832
|
-
estimated_duration_ms: task.estimated_duration ? durationToMs(task.estimated_duration) : null,
|
|
747
|
+
return reconcileInterruptedExecutionsFn({
|
|
748
|
+
baseDir: this.baseDir,
|
|
749
|
+
stateManager: this.stateManager,
|
|
750
|
+
logger: this.logger,
|
|
833
751
|
});
|
|
834
|
-
await this.stateManager.writeRaw(historyPath, history);
|
|
835
752
|
}
|
|
836
|
-
async
|
|
837
|
-
const
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
if (err.code === "ENOENT") {
|
|
844
|
-
return;
|
|
845
|
-
}
|
|
846
|
-
throw err;
|
|
847
|
-
}
|
|
848
|
-
for (const entry of entries) {
|
|
849
|
-
if (!entry.endsWith(".json")) {
|
|
753
|
+
async reconcileRuntimeControlOperationsAfterStartup() {
|
|
754
|
+
const operationStore = new RuntimeOperationStore(this.runtimeRoot ?? undefined);
|
|
755
|
+
const pending = await operationStore.listPending();
|
|
756
|
+
const now = new Date().toISOString();
|
|
757
|
+
for (const operation of pending) {
|
|
758
|
+
if (operation.state !== "restarting" ||
|
|
759
|
+
(operation.kind !== "restart_daemon" && operation.kind !== "restart_gateway")) {
|
|
850
760
|
continue;
|
|
851
761
|
}
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
}
|
|
762
|
+
await operationStore.save({
|
|
763
|
+
...operation,
|
|
764
|
+
state: "verified",
|
|
765
|
+
updated_at: now,
|
|
766
|
+
completed_at: now,
|
|
767
|
+
result: {
|
|
768
|
+
ok: true,
|
|
769
|
+
message: operation.kind === "restart_gateway"
|
|
770
|
+
? "gateway restart verified after daemon startup."
|
|
771
|
+
: "daemon restart verified after startup.",
|
|
772
|
+
daemon_status: this.state.status,
|
|
773
|
+
},
|
|
774
|
+
});
|
|
775
|
+
this.logger.info("Runtime control restart operation verified after startup", {
|
|
776
|
+
operation_id: operation.operation_id,
|
|
777
|
+
kind: operation.kind,
|
|
778
|
+
});
|
|
870
779
|
}
|
|
871
780
|
}
|
|
872
781
|
// ─── Private: Cleanup ───
|
|
@@ -875,6 +784,13 @@ export class DaemonRunner {
|
|
|
875
784
|
* Also writes "clean_shutdown" marker to enable crash-vs-clean detection on next startup.
|
|
876
785
|
*/
|
|
877
786
|
async cleanup() {
|
|
787
|
+
let startupMaintenanceError = null;
|
|
788
|
+
try {
|
|
789
|
+
await this.drainStartupRuntimeStoreMaintenance();
|
|
790
|
+
}
|
|
791
|
+
catch (err) {
|
|
792
|
+
startupMaintenanceError = err;
|
|
793
|
+
}
|
|
878
794
|
await cleanupDaemonRun({
|
|
879
795
|
baseDir: this.baseDir,
|
|
880
796
|
state: this.state,
|
|
@@ -883,6 +799,9 @@ export class DaemonRunner {
|
|
|
883
799
|
runtimeOwnership: this.runtimeOwnership,
|
|
884
800
|
logger: this.logger,
|
|
885
801
|
});
|
|
802
|
+
if (startupMaintenanceError) {
|
|
803
|
+
throw startupMaintenanceError;
|
|
804
|
+
}
|
|
886
805
|
}
|
|
887
806
|
beginGracefulShutdown() {
|
|
888
807
|
if (this.shuttingDown) {
|
|
@@ -1017,6 +936,45 @@ export class DaemonRunner {
|
|
|
1017
936
|
this.abortSleep();
|
|
1018
937
|
await this.broadcastGoalUpdated(goalId, "stopped");
|
|
1019
938
|
}
|
|
939
|
+
async handleRuntimeControlCommand(operationId, kind) {
|
|
940
|
+
const operationStore = new RuntimeOperationStore(this.runtimeRoot ?? undefined);
|
|
941
|
+
const operation = await operationStore.load(operationId);
|
|
942
|
+
if (!operation) {
|
|
943
|
+
this.logger.warn("Runtime control operation not found", { operation_id: operationId, kind });
|
|
944
|
+
return;
|
|
945
|
+
}
|
|
946
|
+
if (kind !== "restart_daemon" && kind !== "restart_gateway") {
|
|
947
|
+
const now = new Date().toISOString();
|
|
948
|
+
await operationStore.save({
|
|
949
|
+
...operation,
|
|
950
|
+
state: "failed",
|
|
951
|
+
updated_at: now,
|
|
952
|
+
completed_at: now,
|
|
953
|
+
result: {
|
|
954
|
+
ok: false,
|
|
955
|
+
message: `Runtime control operation ${kind} is not implemented yet.`,
|
|
956
|
+
},
|
|
957
|
+
});
|
|
958
|
+
return;
|
|
959
|
+
}
|
|
960
|
+
const now = new Date().toISOString();
|
|
961
|
+
await operationStore.save({
|
|
962
|
+
...operation,
|
|
963
|
+
state: "restarting",
|
|
964
|
+
started_at: operation.started_at ?? now,
|
|
965
|
+
updated_at: now,
|
|
966
|
+
result: {
|
|
967
|
+
ok: true,
|
|
968
|
+
message: kind === "restart_gateway"
|
|
969
|
+
? "gateway restart is being handled by a daemon restart because the gateway runs in-process."
|
|
970
|
+
: "daemon restart was accepted by the runtime command dispatcher.",
|
|
971
|
+
},
|
|
972
|
+
});
|
|
973
|
+
this.logger.info("Runtime control requested daemon restart", { operation_id: operationId, kind });
|
|
974
|
+
setTimeout(() => {
|
|
975
|
+
this.beginGracefulShutdown();
|
|
976
|
+
}, 25).unref?.();
|
|
977
|
+
}
|
|
1020
978
|
async handleGoalCompletion(goalId, result) {
|
|
1021
979
|
this.state.loop_count++;
|
|
1022
980
|
this.currentLoopIndex = this.state.loop_count;
|
|
@@ -1099,7 +1057,7 @@ export class DaemonRunner {
|
|
|
1099
1057
|
const hintedDescription = typeof details?.["description"] === "string" ? details["description"].trim() : "";
|
|
1100
1058
|
const hintedTitle = typeof details?.["title"] === "string" ? details["title"].trim() : "";
|
|
1101
1059
|
try {
|
|
1102
|
-
const workspaceDir =
|
|
1060
|
+
const workspaceDir = resolveResidentWorkspaceDir(this.config.workspace_path);
|
|
1103
1061
|
const workspaceContext = gatherResidentWorkspaceContext(workspaceDir, hintedDescription);
|
|
1104
1062
|
const existingTitles = await this.loadExistingGoalTitles();
|
|
1105
1063
|
const suggestions = await this.goalNegotiator.suggestGoals(workspaceContext, {
|
|
@@ -1248,6 +1206,72 @@ export class DaemonRunner {
|
|
|
1248
1206
|
});
|
|
1249
1207
|
return analyzer.run({ tier });
|
|
1250
1208
|
}
|
|
1209
|
+
async runPlatformDreamConsolidation(tier) {
|
|
1210
|
+
try {
|
|
1211
|
+
const knowledgeManager = this.knowledgeManager;
|
|
1212
|
+
const llmClient = this.llmClient;
|
|
1213
|
+
const consolidator = new DreamConsolidator({
|
|
1214
|
+
baseDir: this.baseDir,
|
|
1215
|
+
logger: this.logger,
|
|
1216
|
+
syncService: createRuntimeDreamSoilSyncService(),
|
|
1217
|
+
memoryQualityService: knowledgeManager && llmClient
|
|
1218
|
+
? {
|
|
1219
|
+
run: async (input) => {
|
|
1220
|
+
const result = await lintAgentMemory({
|
|
1221
|
+
km: knowledgeManager,
|
|
1222
|
+
llmCall: async (prompt) => {
|
|
1223
|
+
const response = await llmClient.sendMessage([{ role: "user", content: prompt }], { max_tokens: 2000, model_tier: "light" });
|
|
1224
|
+
return response.content;
|
|
1225
|
+
},
|
|
1226
|
+
autoRepair: input.autoRepair,
|
|
1227
|
+
minAutoRepairConfidence: input.minAutoRepairConfidence,
|
|
1228
|
+
});
|
|
1229
|
+
return {
|
|
1230
|
+
findings: result.findings.length,
|
|
1231
|
+
contradictionsFound: result.findings.filter((finding) => finding.type === "contradiction").length,
|
|
1232
|
+
stalenessFound: result.findings.filter((finding) => finding.type === "staleness").length,
|
|
1233
|
+
redundancyFound: result.findings.filter((finding) => finding.type === "redundancy").length,
|
|
1234
|
+
repairsApplied: result.repairs_applied,
|
|
1235
|
+
entriesFlagged: result.entries_flagged,
|
|
1236
|
+
};
|
|
1237
|
+
},
|
|
1238
|
+
}
|
|
1239
|
+
: undefined,
|
|
1240
|
+
legacyConsolidationService: tier === "deep"
|
|
1241
|
+
? {
|
|
1242
|
+
run: () => runDreamConsolidation({
|
|
1243
|
+
stateManager: this.stateManager,
|
|
1244
|
+
memoryLifecycle: this.memoryLifecycle,
|
|
1245
|
+
knowledgeManager: this.knowledgeManager,
|
|
1246
|
+
baseDir: this.baseDir,
|
|
1247
|
+
}),
|
|
1248
|
+
}
|
|
1249
|
+
: undefined,
|
|
1250
|
+
});
|
|
1251
|
+
return await consolidator.run({ tier });
|
|
1252
|
+
}
|
|
1253
|
+
catch (error) {
|
|
1254
|
+
this.logger.warn("Platform Dream consolidation failed", {
|
|
1255
|
+
error: error instanceof Error ? error.message : String(error),
|
|
1256
|
+
});
|
|
1257
|
+
return null;
|
|
1258
|
+
}
|
|
1259
|
+
}
|
|
1260
|
+
legacyReportFromPlatformDream(report) {
|
|
1261
|
+
const category = report?.categories.find((result) => result.category === "legacyReflectionCompatibility");
|
|
1262
|
+
if (!category || category.status !== "completed") {
|
|
1263
|
+
return null;
|
|
1264
|
+
}
|
|
1265
|
+
const legacy = report?.operational?.legacy_reflection;
|
|
1266
|
+
return legacy
|
|
1267
|
+
? {
|
|
1268
|
+
goals_consolidated: legacy.goals_consolidated,
|
|
1269
|
+
entries_compressed: legacy.entries_compressed,
|
|
1270
|
+
stale_entries_found: legacy.stale_entries_found,
|
|
1271
|
+
revalidation_tasks_created: legacy.revalidation_tasks_created,
|
|
1272
|
+
}
|
|
1273
|
+
: null;
|
|
1274
|
+
}
|
|
1251
1275
|
async triggerResidentDreamMaintenance(details, tier = "deep") {
|
|
1252
1276
|
try {
|
|
1253
1277
|
const appliedBeforeAnalysis = await this.tryApplyPendingDreamSuggestion();
|
|
@@ -1264,8 +1288,9 @@ export class DaemonRunner {
|
|
|
1264
1288
|
}
|
|
1265
1289
|
const analysisReport = await this.runDreamAnalysis(tier);
|
|
1266
1290
|
const appliedAfterAnalysis = tier === "deep" ? await this.tryApplyPendingDreamSuggestion() : null;
|
|
1291
|
+
const platformReport = await this.runPlatformDreamConsolidation(tier);
|
|
1267
1292
|
const consolidationReport = tier === "deep"
|
|
1268
|
-
? await runDreamConsolidation({
|
|
1293
|
+
? this.legacyReportFromPlatformDream(platformReport) ?? await runDreamConsolidation({
|
|
1269
1294
|
stateManager: this.stateManager,
|
|
1270
1295
|
memoryLifecycle: this.memoryLifecycle,
|
|
1271
1296
|
knowledgeManager: this.knowledgeManager,
|
|
@@ -1421,16 +1446,7 @@ export class DaemonRunner {
|
|
|
1421
1446
|
this.abortSleep();
|
|
1422
1447
|
}
|
|
1423
1448
|
async runCommandWithHealth(commandName, fn) {
|
|
1424
|
-
|
|
1425
|
-
const result = await fn();
|
|
1426
|
-
await this.runtimeOwnership.observeCommandAcceptance("ok");
|
|
1427
|
-
return result;
|
|
1428
|
-
}
|
|
1429
|
-
catch (error) {
|
|
1430
|
-
const message = error instanceof Error ? error.message : String(error);
|
|
1431
|
-
await this.runtimeOwnership.observeCommandAcceptance("failed", `${commandName} failed: ${message}`);
|
|
1432
|
-
throw error;
|
|
1433
|
-
}
|
|
1449
|
+
return runCommandWithHealthFn(commandName, fn, (status, reason) => this.runtimeOwnership.observeCommandAcceptance(status, reason));
|
|
1434
1450
|
}
|
|
1435
1451
|
async handleApprovalResponseCommand(goalId, requestId, approved) {
|
|
1436
1452
|
if (this.approvalBroker) {
|
|
@@ -1474,6 +1490,32 @@ export class DaemonRunner {
|
|
|
1474
1490
|
now,
|
|
1475
1491
|
});
|
|
1476
1492
|
}
|
|
1493
|
+
startStartupRuntimeStoreMaintenance() {
|
|
1494
|
+
if (this.startupRuntimeStoreMaintenancePromise) {
|
|
1495
|
+
return;
|
|
1496
|
+
}
|
|
1497
|
+
this.startupRuntimeStoreMaintenanceError = null;
|
|
1498
|
+
this.startupRuntimeStoreMaintenancePromise = this.runRuntimeStoreMaintenance(true)
|
|
1499
|
+
.catch((err) => {
|
|
1500
|
+
this.startupRuntimeStoreMaintenanceError = err;
|
|
1501
|
+
this.logger.error("Startup runtime store maintenance failed", {
|
|
1502
|
+
error: err instanceof Error ? err.message : String(err),
|
|
1503
|
+
});
|
|
1504
|
+
});
|
|
1505
|
+
}
|
|
1506
|
+
async drainStartupRuntimeStoreMaintenance() {
|
|
1507
|
+
const maintenancePromise = this.startupRuntimeStoreMaintenancePromise;
|
|
1508
|
+
if (!maintenancePromise) {
|
|
1509
|
+
return;
|
|
1510
|
+
}
|
|
1511
|
+
await maintenancePromise;
|
|
1512
|
+
this.startupRuntimeStoreMaintenancePromise = null;
|
|
1513
|
+
const maintenanceError = this.startupRuntimeStoreMaintenanceError;
|
|
1514
|
+
this.startupRuntimeStoreMaintenanceError = null;
|
|
1515
|
+
if (maintenanceError) {
|
|
1516
|
+
throw maintenanceError;
|
|
1517
|
+
}
|
|
1518
|
+
}
|
|
1477
1519
|
// ─── Private: Proactive Tick ───
|
|
1478
1520
|
/**
|
|
1479
1521
|
* Ask the LLM for a proactive action when no goals were activated this cycle.
|