pulseed 0.3.0 → 0.4.1
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/dist/base/config/config-metadata.d.ts +1 -1
- package/dist/base/config/config-metadata.d.ts.map +1 -1
- package/dist/base/config/config-metadata.js +1 -1
- package/dist/base/config/config-metadata.js.map +1 -1
- package/dist/base/config/identity-loader.d.ts +1 -1
- package/dist/base/config/identity-loader.d.ts.map +1 -1
- package/dist/base/config/identity-loader.js +4 -3
- package/dist/base/config/identity-loader.js.map +1 -1
- package/dist/base/config/tool-metadata.d.ts +2 -0
- package/dist/base/config/tool-metadata.d.ts.map +1 -1
- package/dist/base/config/tool-metadata.js +30 -6
- package/dist/base/config/tool-metadata.js.map +1 -1
- package/dist/base/llm/llm-client.d.ts +12 -1
- package/dist/base/llm/llm-client.d.ts.map +1 -1
- package/dist/base/llm/llm-client.js +78 -2
- package/dist/base/llm/llm-client.js.map +1 -1
- package/dist/base/llm/ollama-client.d.ts +1 -0
- package/dist/base/llm/ollama-client.d.ts.map +1 -1
- package/dist/base/llm/ollama-client.js +1 -0
- package/dist/base/llm/ollama-client.js.map +1 -1
- package/dist/base/llm/openai-client.d.ts +3 -1
- package/dist/base/llm/openai-client.d.ts.map +1 -1
- package/dist/base/llm/openai-client.js +131 -41
- package/dist/base/llm/openai-client.js.map +1 -1
- package/dist/base/llm/provider-config.d.ts +1 -1
- package/dist/base/llm/provider-config.d.ts.map +1 -1
- package/dist/base/llm/provider-factory.d.ts.map +1 -1
- package/dist/base/llm/provider-factory.js +22 -3
- package/dist/base/llm/provider-factory.js.map +1 -1
- package/dist/base/state/checkpoint-trust-port.d.ts +4 -0
- package/dist/base/state/checkpoint-trust-port.d.ts.map +1 -0
- package/dist/base/state/checkpoint-trust-port.js +2 -0
- package/dist/base/state/checkpoint-trust-port.js.map +1 -0
- package/dist/base/state/state-manager-goal-write.d.ts +22 -0
- package/dist/base/state/state-manager-goal-write.d.ts.map +1 -0
- package/dist/base/state/state-manager-goal-write.js +74 -0
- package/dist/base/state/state-manager-goal-write.js.map +1 -0
- package/dist/base/state/state-manager-wal.d.ts +11 -0
- package/dist/base/state/state-manager-wal.d.ts.map +1 -0
- package/dist/base/state/state-manager-wal.js +89 -0
- package/dist/base/state/state-manager-wal.js.map +1 -0
- package/dist/base/state/state-manager.d.ts +12 -5
- package/dist/base/state/state-manager.d.ts.map +1 -1
- package/dist/base/state/state-manager.js +24 -118
- package/dist/base/state/state-manager.js.map +1 -1
- package/dist/base/utils/errors.d.ts +4 -0
- package/dist/base/utils/errors.d.ts.map +1 -1
- package/dist/base/utils/errors.js +8 -0
- package/dist/base/utils/errors.js.map +1 -1
- package/dist/base/utils/pulseed-meta.d.ts +4 -0
- package/dist/base/utils/pulseed-meta.d.ts.map +1 -0
- package/dist/base/utils/pulseed-meta.js +32 -0
- package/dist/base/utils/pulseed-meta.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/interface/chat/chat-event-state.d.ts +10 -0
- package/dist/interface/chat/chat-event-state.d.ts.map +1 -0
- package/dist/interface/chat/chat-event-state.js +75 -0
- package/dist/interface/chat/chat-event-state.js.map +1 -0
- package/dist/interface/chat/chat-events.d.ts +59 -0
- package/dist/interface/chat/chat-events.d.ts.map +1 -0
- package/dist/interface/chat/chat-events.js +2 -0
- package/dist/interface/chat/chat-events.js.map +1 -0
- package/dist/interface/chat/chat-history.d.ts +4 -4
- package/dist/interface/chat/chat-history.d.ts.map +1 -1
- package/dist/interface/chat/chat-history.js +3 -3
- package/dist/interface/chat/chat-history.js.map +1 -1
- package/dist/interface/chat/chat-runner.d.ts +15 -4
- package/dist/interface/chat/chat-runner.d.ts.map +1 -1
- package/dist/interface/chat/chat-runner.js +241 -27
- package/dist/interface/chat/chat-runner.js.map +1 -1
- package/dist/interface/chat/event-subscriber.d.ts +7 -1
- package/dist/interface/chat/event-subscriber.d.ts.map +1 -1
- package/dist/interface/chat/event-subscriber.js +88 -2
- package/dist/interface/chat/event-subscriber.js.map +1 -1
- package/dist/interface/chat/grounding.d.ts +2 -0
- package/dist/interface/chat/grounding.d.ts.map +1 -1
- package/dist/interface/chat/grounding.js +95 -42
- package/dist/interface/chat/grounding.js.map +1 -1
- package/dist/interface/chat/mutation-tool-defs.js +1 -1
- package/dist/interface/chat/mutation-tool-defs.js.map +1 -1
- package/dist/interface/chat/self-knowledge-mutation-tools.d.ts.map +1 -1
- package/dist/interface/chat/self-knowledge-mutation-tools.js +20 -3
- package/dist/interface/chat/self-knowledge-mutation-tools.js.map +1 -1
- package/dist/interface/chat/self-knowledge-tools.js +2 -2
- package/dist/interface/chat/self-knowledge-tools.js.map +1 -1
- package/dist/interface/chat/tend-command.d.ts +1 -1
- package/dist/interface/cli/cli-command-registry.js +1 -1
- package/dist/interface/cli/cli-command-registry.js.map +1 -1
- package/dist/interface/cli/commands/chat.d.ts.map +1 -1
- package/dist/interface/cli/commands/chat.js +46 -13
- 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 +37 -6
- 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 +105 -50
- package/dist/interface/cli/commands/daemon.js.map +1 -1
- package/dist/interface/cli/commands/doctor.d.ts +1 -1
- package/dist/interface/cli/commands/doctor.d.ts.map +1 -1
- package/dist/interface/cli/commands/doctor.js +5 -7
- package/dist/interface/cli/commands/doctor.js.map +1 -1
- package/dist/interface/cli/commands/presets/root-presets.d.ts +3 -3
- package/dist/interface/cli/commands/presets/root-presets.d.ts.map +1 -1
- package/dist/interface/cli/commands/presets/root-presets.js +8 -5
- package/dist/interface/cli/commands/presets/root-presets.js.map +1 -1
- package/dist/interface/cli/commands/schedule.d.ts.map +1 -1
- package/dist/interface/cli/commands/schedule.js +166 -13
- package/dist/interface/cli/commands/schedule.js.map +1 -1
- package/dist/interface/cli/commands/setup/steps-runtime.js +1 -1
- package/dist/interface/cli/ensure-api-key.d.ts +4 -1
- package/dist/interface/cli/ensure-api-key.d.ts.map +1 -1
- package/dist/interface/cli/ensure-api-key.js +52 -15
- package/dist/interface/cli/ensure-api-key.js.map +1 -1
- package/dist/interface/cli/setup.d.ts +9 -0
- package/dist/interface/cli/setup.d.ts.map +1 -1
- package/dist/interface/cli/setup.js +43 -20
- package/dist/interface/cli/setup.js.map +1 -1
- package/dist/interface/cli/utils.d.ts.map +1 -1
- package/dist/interface/cli/utils.js +5 -1
- package/dist/interface/cli/utils.js.map +1 -1
- package/dist/interface/tui/app.d.ts +1 -1
- package/dist/interface/tui/app.d.ts.map +1 -1
- package/dist/interface/tui/app.js +8 -12
- package/dist/interface/tui/app.js.map +1 -1
- package/dist/interface/tui/chat/scroll.d.ts +14 -0
- package/dist/interface/tui/chat/scroll.d.ts.map +1 -0
- package/dist/interface/tui/chat/scroll.js +46 -0
- package/dist/interface/tui/chat/scroll.js.map +1 -0
- package/dist/interface/tui/chat/suggestions.d.ts +8 -0
- package/dist/interface/tui/chat/suggestions.d.ts.map +1 -0
- package/dist/interface/tui/chat/suggestions.js +112 -0
- package/dist/interface/tui/chat/suggestions.js.map +1 -0
- package/dist/interface/tui/chat/types.d.ts +31 -0
- package/dist/interface/tui/chat/types.d.ts.map +1 -0
- package/dist/interface/tui/chat/types.js +2 -0
- package/dist/interface/tui/chat/types.js.map +1 -0
- package/dist/interface/tui/chat/viewport.d.ts +3 -0
- package/dist/interface/tui/chat/viewport.d.ts.map +1 -0
- package/dist/interface/tui/chat/viewport.js +78 -0
- package/dist/interface/tui/chat/viewport.js.map +1 -0
- package/dist/interface/tui/chat.d.ts +5 -49
- package/dist/interface/tui/chat.d.ts.map +1 -1
- package/dist/interface/tui/chat.js +9 -238
- package/dist/interface/tui/chat.js.map +1 -1
- package/dist/interface/tui/checkerboard-spinner.d.ts +3 -0
- package/dist/interface/tui/checkerboard-spinner.d.ts.map +1 -0
- package/dist/interface/tui/checkerboard-spinner.js +20 -0
- package/dist/interface/tui/checkerboard-spinner.js.map +1 -0
- package/dist/interface/tui/dashboard.js +2 -2
- package/dist/interface/tui/dashboard.js.map +1 -1
- package/dist/interface/tui/entry.d.ts.map +1 -1
- package/dist/interface/tui/entry.js +51 -7
- package/dist/interface/tui/entry.js.map +1 -1
- package/dist/interface/tui/use-loop.d.ts +1 -1
- package/dist/orchestrator/ethics-gate.d.ts +3 -0
- package/dist/orchestrator/ethics-gate.d.ts.map +1 -0
- package/dist/orchestrator/ethics-gate.js +2 -0
- package/dist/orchestrator/ethics-gate.js.map +1 -0
- package/dist/orchestrator/execution/context/context-builder.d.ts +8 -0
- package/dist/orchestrator/execution/context/context-builder.d.ts.map +1 -1
- package/dist/orchestrator/execution/context/context-builder.js +38 -0
- package/dist/orchestrator/execution/context/context-builder.js.map +1 -1
- package/dist/orchestrator/execution/parallel-execution-types.d.ts +7 -0
- package/dist/orchestrator/execution/parallel-execution-types.d.ts.map +1 -0
- package/dist/orchestrator/execution/parallel-execution-types.js +2 -0
- package/dist/orchestrator/execution/parallel-execution-types.js.map +1 -0
- package/dist/orchestrator/execution/parallel-executor.d.ts +2 -6
- package/dist/orchestrator/execution/parallel-executor.d.ts.map +1 -1
- package/dist/orchestrator/execution/parallel-executor.js.map +1 -1
- package/dist/orchestrator/execution/result-reconciler.d.ts +1 -1
- package/dist/orchestrator/execution/result-reconciler.d.ts.map +1 -1
- package/dist/orchestrator/execution/task/task-lifecycle.d.ts +8 -10
- package/dist/orchestrator/execution/task/task-lifecycle.d.ts.map +1 -1
- package/dist/orchestrator/execution/task/task-lifecycle.js +28 -1
- package/dist/orchestrator/execution/task/task-lifecycle.js.map +1 -1
- package/dist/orchestrator/execution/task/task-pipeline-cycle.d.ts +5 -35
- package/dist/orchestrator/execution/task/task-pipeline-cycle.d.ts.map +1 -1
- package/dist/orchestrator/execution/task/task-pipeline-cycle.js.map +1 -1
- package/dist/orchestrator/execution/task/task-pipeline-types.d.ts +39 -0
- package/dist/orchestrator/execution/task/task-pipeline-types.d.ts.map +1 -0
- package/dist/orchestrator/execution/task/task-pipeline-types.js +2 -0
- package/dist/orchestrator/execution/task/task-pipeline-types.js.map +1 -0
- package/dist/orchestrator/execution/task/task-verifier-rules.d.ts.map +1 -1
- package/dist/orchestrator/execution/task/task-verifier-rules.js +34 -2
- package/dist/orchestrator/execution/task/task-verifier-rules.js.map +1 -1
- package/dist/orchestrator/execution/task/task-verifier-types.d.ts +2 -0
- package/dist/orchestrator/execution/task/task-verifier-types.d.ts.map +1 -1
- package/dist/orchestrator/goal/goal-negotiator.d.ts.map +1 -1
- package/dist/orchestrator/goal/goal-negotiator.js +2 -1
- package/dist/orchestrator/goal/goal-negotiator.js.map +1 -1
- package/dist/orchestrator/goal/goal-refiner.d.ts.map +1 -1
- package/dist/orchestrator/goal/goal-refiner.js +1 -1
- package/dist/orchestrator/goal/goal-refiner.js.map +1 -1
- package/dist/orchestrator/goal/goal-tree-manager.d.ts +2 -2
- package/dist/orchestrator/goal/goal-tree-manager.d.ts.map +1 -1
- package/dist/orchestrator/goal/goal-tree-manager.js.map +1 -1
- package/dist/orchestrator/goal/negotiator-feasibility.d.ts +10 -0
- package/dist/orchestrator/goal/negotiator-feasibility.d.ts.map +1 -0
- package/dist/orchestrator/goal/negotiator-feasibility.js +55 -0
- package/dist/orchestrator/goal/negotiator-feasibility.js.map +1 -0
- package/dist/orchestrator/goal/negotiator-steps.d.ts +1 -6
- package/dist/orchestrator/goal/negotiator-steps.d.ts.map +1 -1
- package/dist/orchestrator/goal/negotiator-steps.js +4 -56
- package/dist/orchestrator/goal/negotiator-steps.js.map +1 -1
- package/dist/orchestrator/knowledge/knowledge-manager.d.ts +2 -0
- package/dist/orchestrator/knowledge/knowledge-manager.d.ts.map +1 -0
- package/dist/orchestrator/knowledge/knowledge-manager.js +2 -0
- package/dist/orchestrator/knowledge/knowledge-manager.js.map +1 -0
- package/dist/orchestrator/knowledge/memory/memory-lifecycle.d.ts +2 -0
- package/dist/orchestrator/knowledge/memory/memory-lifecycle.d.ts.map +1 -0
- package/dist/orchestrator/knowledge/memory/memory-lifecycle.js +2 -0
- package/dist/orchestrator/knowledge/memory/memory-lifecycle.js.map +1 -0
- package/dist/orchestrator/knowledge/transfer/knowledge-transfer.d.ts +2 -0
- package/dist/orchestrator/knowledge/transfer/knowledge-transfer.d.ts.map +1 -0
- package/dist/orchestrator/knowledge/transfer/knowledge-transfer.js +2 -0
- package/dist/orchestrator/knowledge/transfer/knowledge-transfer.js.map +1 -0
- package/dist/orchestrator/loop/checkpoint-manager-loop.d.ts +1 -1
- package/dist/orchestrator/loop/checkpoint-manager-loop.d.ts.map +1 -1
- package/dist/orchestrator/loop/core-loop/capability.d.ts +22 -0
- package/dist/orchestrator/loop/core-loop/capability.d.ts.map +1 -0
- package/dist/orchestrator/loop/core-loop/capability.js +151 -0
- package/dist/orchestrator/loop/core-loop/capability.js.map +1 -0
- package/dist/orchestrator/loop/core-loop/contracts.d.ts +245 -0
- package/dist/orchestrator/loop/core-loop/contracts.d.ts.map +1 -0
- package/dist/orchestrator/loop/core-loop/contracts.js +40 -0
- package/dist/orchestrator/loop/core-loop/contracts.js.map +1 -0
- package/dist/orchestrator/loop/core-loop/control.d.ts +27 -0
- package/dist/orchestrator/loop/core-loop/control.d.ts.map +1 -0
- package/dist/orchestrator/loop/core-loop/control.js +72 -0
- package/dist/orchestrator/loop/core-loop/control.js.map +1 -0
- package/dist/orchestrator/loop/core-loop/learning.d.ts +31 -0
- package/dist/orchestrator/loop/core-loop/learning.d.ts.map +1 -0
- package/dist/orchestrator/loop/core-loop/learning.js +92 -0
- package/dist/orchestrator/loop/core-loop/learning.js.map +1 -0
- package/dist/orchestrator/loop/core-loop/preparation.d.ts +63 -0
- package/dist/orchestrator/loop/core-loop/preparation.d.ts.map +1 -0
- package/dist/orchestrator/loop/core-loop/preparation.js +362 -0
- package/dist/orchestrator/loop/core-loop/preparation.js.map +1 -0
- package/dist/orchestrator/loop/core-loop/task-cycle.d.ts +29 -0
- package/dist/orchestrator/loop/core-loop/task-cycle.d.ts.map +1 -0
- package/dist/orchestrator/loop/core-loop/task-cycle.js +674 -0
- package/dist/orchestrator/loop/core-loop/task-cycle.js.map +1 -0
- package/dist/orchestrator/loop/core-loop-capability.d.ts +1 -18
- package/dist/orchestrator/loop/core-loop-capability.d.ts.map +1 -1
- package/dist/orchestrator/loop/core-loop-capability.js +1 -106
- package/dist/orchestrator/loop/core-loop-capability.js.map +1 -1
- package/dist/orchestrator/loop/core-loop-learning.d.ts +1 -34
- package/dist/orchestrator/loop/core-loop-learning.d.ts.map +1 -1
- package/dist/orchestrator/loop/core-loop-learning.js +1 -95
- package/dist/orchestrator/loop/core-loop-learning.js.map +1 -1
- package/dist/orchestrator/loop/core-loop-phases-b.d.ts +1 -30
- package/dist/orchestrator/loop/core-loop-phases-b.d.ts.map +1 -1
- package/dist/orchestrator/loop/core-loop-phases-b.js +1 -590
- package/dist/orchestrator/loop/core-loop-phases-b.js.map +1 -1
- package/dist/orchestrator/loop/core-loop-phases-c.d.ts +1 -26
- package/dist/orchestrator/loop/core-loop-phases-c.d.ts.map +1 -1
- package/dist/orchestrator/loop/core-loop-phases-c.js +1 -71
- package/dist/orchestrator/loop/core-loop-phases-c.js.map +1 -1
- package/dist/orchestrator/loop/core-loop-phases.d.ts +1 -68
- package/dist/orchestrator/loop/core-loop-phases.d.ts.map +1 -1
- package/dist/orchestrator/loop/core-loop-phases.js +1 -367
- package/dist/orchestrator/loop/core-loop-phases.js.map +1 -1
- package/dist/orchestrator/loop/core-loop-types.d.ts +1 -307
- package/dist/orchestrator/loop/core-loop-types.d.ts.map +1 -1
- package/dist/orchestrator/loop/core-loop-types.js +1 -64
- package/dist/orchestrator/loop/core-loop-types.js.map +1 -1
- package/dist/orchestrator/loop/core-loop.d.ts +6 -3
- package/dist/orchestrator/loop/core-loop.d.ts.map +1 -1
- package/dist/orchestrator/loop/core-loop.js +92 -8
- package/dist/orchestrator/loop/core-loop.js.map +1 -1
- package/dist/orchestrator/loop/loop-report-helper.d.ts +1 -1
- package/dist/orchestrator/loop/loop-report-helper.d.ts.map +1 -1
- package/dist/orchestrator/loop/loop-result-types.d.ts +67 -0
- package/dist/orchestrator/loop/loop-result-types.d.ts.map +1 -0
- package/dist/orchestrator/loop/loop-result-types.js +27 -0
- package/dist/orchestrator/loop/loop-result-types.js.map +1 -0
- package/dist/orchestrator/loop/parallel-dispatch.d.ts +2 -2
- package/dist/orchestrator/loop/parallel-dispatch.d.ts.map +1 -1
- package/dist/orchestrator/loop/post-loop-hooks.d.ts +4 -1
- package/dist/orchestrator/loop/post-loop-hooks.d.ts.map +1 -1
- package/dist/orchestrator/loop/post-loop-hooks.js +19 -1
- package/dist/orchestrator/loop/post-loop-hooks.js.map +1 -1
- package/dist/orchestrator/loop/tree-loop-runner.d.ts +1 -1
- package/dist/orchestrator/loop/tree-loop-runner.d.ts.map +1 -1
- package/dist/orchestrator/loop/tree-loop-runner.js +1 -1
- package/dist/orchestrator/loop/tree-loop-runner.js.map +1 -1
- package/dist/orchestrator/observation/capability-detector.d.ts +2 -0
- package/dist/orchestrator/observation/capability-detector.d.ts.map +1 -0
- package/dist/orchestrator/observation/capability-detector.js +2 -0
- package/dist/orchestrator/observation/capability-detector.js.map +1 -0
- package/dist/orchestrator/strategy/strategy-manager-base.d.ts +1 -0
- package/dist/orchestrator/strategy/strategy-manager-base.d.ts.map +1 -1
- package/dist/orchestrator/strategy/strategy-manager-base.js +48 -4
- package/dist/orchestrator/strategy/strategy-manager-base.js.map +1 -1
- package/dist/orchestrator/strategy-manager.d.ts +2 -0
- package/dist/orchestrator/strategy-manager.d.ts.map +1 -0
- package/dist/orchestrator/strategy-manager.js +2 -0
- package/dist/orchestrator/strategy-manager.js.map +1 -0
- package/dist/platform/dream/dream-activation.d.ts +52 -0
- package/dist/platform/dream/dream-activation.d.ts.map +1 -0
- package/dist/platform/dream/dream-activation.js +199 -0
- package/dist/platform/dream/dream-activation.js.map +1 -0
- package/dist/platform/dream/dream-analyzer.d.ts +53 -0
- package/dist/platform/dream/dream-analyzer.d.ts.map +1 -0
- package/dist/platform/dream/dream-analyzer.js +489 -0
- package/dist/platform/dream/dream-analyzer.js.map +1 -0
- package/dist/platform/dream/dream-config.d.ts +6 -0
- package/dist/platform/dream/dream-config.d.ts.map +1 -0
- package/dist/platform/dream/dream-config.js +20 -0
- package/dist/platform/dream/dream-config.js.map +1 -0
- package/dist/platform/dream/dream-consolidator.d.ts +35 -0
- package/dist/platform/dream/dream-consolidator.d.ts.map +1 -0
- package/dist/platform/dream/dream-consolidator.js +304 -0
- package/dist/platform/dream/dream-consolidator.js.map +1 -0
- package/dist/platform/dream/dream-importance.d.ts +24 -0
- package/dist/platform/dream/dream-importance.d.ts.map +1 -0
- package/dist/platform/dream/dream-importance.js +71 -0
- package/dist/platform/dream/dream-importance.js.map +1 -0
- package/dist/platform/dream/dream-log-collector.d.ts +73 -0
- package/dist/platform/dream/dream-log-collector.d.ts.map +1 -0
- package/dist/platform/dream/dream-log-collector.js +256 -0
- package/dist/platform/dream/dream-log-collector.js.map +1 -0
- package/dist/platform/dream/dream-log-store.d.ts +22 -0
- package/dist/platform/dream/dream-log-store.d.ts.map +1 -0
- package/dist/platform/dream/dream-log-store.js +150 -0
- package/dist/platform/dream/dream-log-store.js.map +1 -0
- package/dist/platform/dream/dream-schedule-suggestions.d.ts +26 -0
- package/dist/platform/dream/dream-schedule-suggestions.d.ts.map +1 -0
- package/dist/platform/dream/dream-schedule-suggestions.js +195 -0
- package/dist/platform/dream/dream-schedule-suggestions.js.map +1 -0
- package/dist/platform/dream/dream-types.d.ts +2587 -0
- package/dist/platform/dream/dream-types.d.ts.map +1 -0
- package/dist/platform/dream/dream-types.js +265 -0
- package/dist/platform/dream/dream-types.js.map +1 -0
- package/dist/platform/dream/index.d.ts +6 -0
- package/dist/platform/dream/index.d.ts.map +1 -0
- package/dist/platform/dream/index.js +6 -0
- package/dist/platform/dream/index.js.map +1 -0
- package/dist/platform/drive/drive-system.d.ts +8 -0
- package/dist/platform/drive/drive-system.d.ts.map +1 -1
- package/dist/platform/drive/drive-system.js +39 -22
- package/dist/platform/drive/drive-system.js.map +1 -1
- package/dist/platform/ethics-gate.d.ts +2 -0
- package/dist/platform/ethics-gate.d.ts.map +1 -0
- package/dist/platform/ethics-gate.js +2 -0
- package/dist/platform/ethics-gate.js.map +1 -0
- package/dist/platform/execution/task/task-lifecycle.d.ts +2 -0
- package/dist/platform/execution/task/task-lifecycle.d.ts.map +1 -0
- package/dist/platform/execution/task/task-lifecycle.js +2 -0
- package/dist/platform/execution/task/task-lifecycle.js.map +1 -0
- package/dist/platform/knowledge/transfer/knowledge-transfer-apply.d.ts.map +1 -1
- package/dist/platform/knowledge/transfer/knowledge-transfer-apply.js +6 -0
- package/dist/platform/knowledge/transfer/knowledge-transfer-apply.js.map +1 -1
- package/dist/platform/knowledge/transfer/knowledge-transfer-detect.d.ts.map +1 -1
- package/dist/platform/knowledge/transfer/knowledge-transfer-detect.js +32 -0
- package/dist/platform/knowledge/transfer/knowledge-transfer-detect.js.map +1 -1
- package/dist/platform/knowledge/transfer/knowledge-transfer.d.ts +18 -1
- package/dist/platform/knowledge/transfer/knowledge-transfer.d.ts.map +1 -1
- package/dist/platform/knowledge/transfer/knowledge-transfer.js +121 -6
- package/dist/platform/knowledge/transfer/knowledge-transfer.js.map +1 -1
- package/dist/platform/observation/capability-detector.d.ts +8 -0
- package/dist/platform/observation/capability-detector.d.ts.map +1 -1
- package/dist/platform/observation/capability-detector.js +71 -4
- package/dist/platform/observation/capability-detector.js.map +1 -1
- package/dist/platform/observation/data-source-adapter.d.ts +19 -0
- package/dist/platform/observation/data-source-adapter.d.ts.map +1 -1
- package/dist/platform/observation/data-source-adapter.js +166 -0
- package/dist/platform/observation/data-source-adapter.js.map +1 -1
- package/dist/platform/observation/engine/observe-context.d.ts +4 -0
- package/dist/platform/observation/engine/observe-context.d.ts.map +1 -0
- package/dist/platform/observation/engine/observe-context.js +26 -0
- package/dist/platform/observation/engine/observe-context.js.map +1 -0
- package/dist/platform/observation/engine/observe-datasource-stage.d.ts +33 -0
- package/dist/platform/observation/engine/observe-datasource-stage.d.ts.map +1 -0
- package/dist/platform/observation/engine/observe-datasource-stage.js +66 -0
- package/dist/platform/observation/engine/observe-datasource-stage.js.map +1 -0
- package/dist/platform/observation/engine/observe-llm-stage.d.ts +25 -0
- package/dist/platform/observation/engine/observe-llm-stage.d.ts.map +1 -0
- package/dist/platform/observation/engine/observe-llm-stage.js +79 -0
- package/dist/platform/observation/engine/observe-llm-stage.js.map +1 -0
- package/dist/platform/observation/engine/observe-precheck.d.ts +21 -0
- package/dist/platform/observation/engine/observe-precheck.d.ts.map +1 -0
- package/dist/platform/observation/engine/observe-precheck.js +51 -0
- package/dist/platform/observation/engine/observe-precheck.js.map +1 -0
- package/dist/platform/observation/engine/observe-self-report.d.ts +18 -0
- package/dist/platform/observation/engine/observe-self-report.d.ts.map +1 -0
- package/dist/platform/observation/engine/observe-self-report.js +26 -0
- package/dist/platform/observation/engine/observe-self-report.js.map +1 -0
- package/dist/platform/observation/engine/observe-tool-stage.d.ts +21 -0
- package/dist/platform/observation/engine/observe-tool-stage.d.ts.map +1 -0
- package/dist/platform/observation/engine/observe-tool-stage.js +49 -0
- package/dist/platform/observation/engine/observe-tool-stage.js.map +1 -0
- package/dist/platform/observation/observation-engine.d.ts.map +1 -1
- package/dist/platform/observation/observation-engine.js +67 -246
- package/dist/platform/observation/observation-engine.js.map +1 -1
- package/dist/platform/observation/observation-helpers.d.ts +6 -0
- package/dist/platform/observation/observation-helpers.d.ts.map +1 -1
- package/dist/platform/observation/observation-helpers.js +2 -0
- package/dist/platform/observation/observation-helpers.js.map +1 -1
- package/dist/platform/observation/types/data-source.d.ts +12 -0
- package/dist/platform/observation/types/data-source.d.ts.map +1 -1
- package/dist/platform/observation/types/data-source.js +1 -0
- package/dist/platform/observation/types/data-source.js.map +1 -1
- package/dist/platform/runtime/plugin-loader.d.ts +2 -0
- package/dist/platform/runtime/plugin-loader.d.ts.map +1 -0
- package/dist/platform/runtime/plugin-loader.js +2 -0
- package/dist/platform/runtime/plugin-loader.js.map +1 -0
- package/dist/platform/tools/executor.d.ts +2 -0
- package/dist/platform/tools/executor.d.ts.map +1 -0
- package/dist/platform/tools/executor.js +2 -0
- package/dist/platform/tools/executor.js.map +1 -0
- package/dist/prompt/context-assembler.d.ts +61 -13
- package/dist/prompt/context-assembler.d.ts.map +1 -1
- package/dist/prompt/context-assembler.js +18 -3
- package/dist/prompt/context-assembler.js.map +1 -1
- package/dist/prompt/purposes/dream.d.ts +9 -0
- package/dist/prompt/purposes/dream.d.ts.map +1 -0
- package/dist/prompt/purposes/dream.js +71 -0
- package/dist/prompt/purposes/dream.js.map +1 -0
- package/dist/prompt/purposes/index.d.ts +1 -0
- package/dist/prompt/purposes/index.d.ts.map +1 -1
- package/dist/prompt/purposes/index.js +1 -0
- package/dist/prompt/purposes/index.js.map +1 -1
- package/dist/reporting/report-formatters.d.ts +1 -1
- package/dist/reporting/report-formatters.d.ts.map +1 -1
- package/dist/reporting/reporting-engine.d.ts +2 -24
- package/dist/reporting/reporting-engine.d.ts.map +1 -1
- package/dist/reporting/reporting-engine.js +0 -1
- package/dist/reporting/reporting-engine.js.map +1 -1
- package/dist/reporting/reporting-types.d.ts +25 -0
- package/dist/reporting/reporting-types.d.ts.map +1 -0
- package/dist/reporting/reporting-types.js +2 -0
- package/dist/reporting/reporting-types.js.map +1 -0
- package/dist/runtime/approval-broker.d.ts +44 -0
- package/dist/runtime/approval-broker.d.ts.map +1 -0
- package/dist/runtime/approval-broker.js +141 -0
- package/dist/runtime/approval-broker.js.map +1 -0
- package/dist/runtime/command-dispatcher.d.ts +35 -0
- package/dist/runtime/command-dispatcher.d.ts.map +1 -0
- package/dist/runtime/command-dispatcher.js +145 -0
- package/dist/runtime/command-dispatcher.js.map +1 -0
- package/dist/runtime/daemon/client.d.ts +67 -0
- package/dist/runtime/daemon/client.d.ts.map +1 -0
- package/dist/runtime/daemon/client.js +330 -0
- package/dist/runtime/daemon/client.js.map +1 -0
- package/dist/runtime/daemon/health.d.ts +31 -0
- package/dist/runtime/daemon/health.d.ts.map +1 -0
- package/dist/runtime/daemon/health.js +113 -0
- package/dist/runtime/daemon/health.js.map +1 -0
- package/dist/runtime/daemon/index.d.ts +9 -0
- package/dist/runtime/daemon/index.d.ts.map +1 -0
- package/dist/runtime/daemon/index.js +8 -0
- package/dist/runtime/daemon/index.js.map +1 -0
- package/dist/runtime/daemon/maintenance.d.ts +47 -0
- package/dist/runtime/daemon/maintenance.d.ts.map +1 -0
- package/dist/runtime/daemon/maintenance.js +230 -0
- package/dist/runtime/daemon/maintenance.js.map +1 -0
- package/dist/runtime/daemon/persistence.d.ts +20 -0
- package/dist/runtime/daemon/persistence.d.ts.map +1 -0
- package/dist/runtime/daemon/persistence.js +112 -0
- package/dist/runtime/daemon/persistence.js.map +1 -0
- package/dist/runtime/daemon/runner-lifecycle.d.ts +29 -0
- package/dist/runtime/daemon/runner-lifecycle.d.ts.map +1 -0
- package/dist/runtime/daemon/runner-lifecycle.js +56 -0
- package/dist/runtime/daemon/runner-lifecycle.js.map +1 -0
- package/dist/runtime/daemon/runner.d.ts +229 -0
- package/dist/runtime/daemon/runner.d.ts.map +1 -0
- package/dist/runtime/daemon/runner.js +875 -0
- package/dist/runtime/daemon/runner.js.map +1 -0
- package/dist/runtime/daemon/runtime-ownership.d.ts +30 -0
- package/dist/runtime/daemon/runtime-ownership.d.ts.map +1 -0
- package/dist/runtime/daemon/runtime-ownership.js +132 -0
- package/dist/runtime/daemon/runtime-ownership.js.map +1 -0
- package/dist/runtime/daemon/signals.d.ts +17 -0
- package/dist/runtime/daemon/signals.d.ts.map +1 -0
- package/dist/runtime/daemon/signals.js +31 -0
- package/dist/runtime/daemon/signals.js.map +1 -0
- package/dist/runtime/daemon/types.d.ts +8 -0
- package/dist/runtime/daemon/types.d.ts.map +1 -0
- package/dist/runtime/daemon/types.js +2 -0
- package/dist/runtime/daemon/types.js.map +1 -0
- package/dist/runtime/daemon-client.d.ts +1 -55
- package/dist/runtime/daemon-client.d.ts.map +1 -1
- package/dist/runtime/daemon-client.js +1 -297
- package/dist/runtime/daemon-client.js.map +1 -1
- package/dist/runtime/daemon-health.d.ts +1 -30
- package/dist/runtime/daemon-health.d.ts.map +1 -1
- package/dist/runtime/daemon-health.js +1 -112
- package/dist/runtime/daemon-health.js.map +1 -1
- package/dist/runtime/daemon-runner-lifecycle.d.ts +2 -0
- package/dist/runtime/daemon-runner-lifecycle.d.ts.map +1 -0
- package/dist/runtime/daemon-runner-lifecycle.js +2 -0
- package/dist/runtime/daemon-runner-lifecycle.js.map +1 -0
- package/dist/runtime/daemon-runner.d.ts +1 -209
- package/dist/runtime/daemon-runner.d.ts.map +1 -1
- package/dist/runtime/daemon-runner.js +1 -874
- package/dist/runtime/daemon-runner.js.map +1 -1
- package/dist/runtime/daemon-runtime-ownership.d.ts +2 -0
- package/dist/runtime/daemon-runtime-ownership.d.ts.map +1 -0
- package/dist/runtime/daemon-runtime-ownership.js +2 -0
- package/dist/runtime/daemon-runtime-ownership.js.map +1 -0
- package/dist/runtime/daemon-signals.d.ts +1 -16
- package/dist/runtime/daemon-signals.d.ts.map +1 -1
- package/dist/runtime/daemon-signals.js +1 -30
- package/dist/runtime/daemon-signals.js.map +1 -1
- package/dist/runtime/event/dispatcher.d.ts +34 -0
- package/dist/runtime/event/dispatcher.d.ts.map +1 -0
- package/dist/runtime/event/dispatcher.js +124 -0
- package/dist/runtime/event/dispatcher.js.map +1 -0
- package/dist/runtime/event/index.d.ts +5 -0
- package/dist/runtime/event/index.d.ts.map +1 -0
- package/dist/runtime/event/index.js +5 -0
- package/dist/runtime/event/index.js.map +1 -0
- package/dist/runtime/event/server-snapshot-reader.d.ts +31 -0
- package/dist/runtime/event/server-snapshot-reader.d.ts.map +1 -0
- package/dist/runtime/event/server-snapshot-reader.js +94 -0
- package/dist/runtime/event/server-snapshot-reader.js.map +1 -0
- package/dist/runtime/event/server-sse.d.ts +25 -0
- package/dist/runtime/event/server-sse.d.ts.map +1 -0
- package/dist/runtime/event/server-sse.js +149 -0
- package/dist/runtime/event/server-sse.js.map +1 -0
- package/dist/runtime/event/server.d.ts +114 -0
- package/dist/runtime/event/server.d.ts.map +1 -0
- package/dist/runtime/event/server.js +651 -0
- package/dist/runtime/event/server.js.map +1 -0
- package/dist/runtime/event-dispatcher.d.ts +2 -0
- package/dist/runtime/event-dispatcher.d.ts.map +1 -0
- package/dist/runtime/event-dispatcher.js +2 -0
- package/dist/runtime/event-dispatcher.js.map +1 -0
- package/dist/runtime/event-server-snapshot-reader.d.ts +2 -0
- package/dist/runtime/event-server-snapshot-reader.d.ts.map +1 -0
- package/dist/runtime/event-server-snapshot-reader.js +2 -0
- package/dist/runtime/event-server-snapshot-reader.js.map +1 -0
- package/dist/runtime/event-server-sse.d.ts +2 -0
- package/dist/runtime/event-server-sse.d.ts.map +1 -0
- package/dist/runtime/event-server-sse.js +2 -0
- package/dist/runtime/event-server-sse.js.map +1 -0
- package/dist/runtime/event-server.d.ts +1 -81
- package/dist/runtime/event-server.d.ts.map +1 -1
- package/dist/runtime/event-server.js +1 -599
- package/dist/runtime/event-server.js.map +1 -1
- package/dist/runtime/executor/loop-supervisor.d.ts +25 -2
- package/dist/runtime/executor/loop-supervisor.d.ts.map +1 -1
- package/dist/runtime/executor/loop-supervisor.js +249 -57
- package/dist/runtime/executor/loop-supervisor.js.map +1 -1
- package/dist/runtime/gateway/http-channel-adapter.d.ts +1 -1
- package/dist/runtime/gateway/http-channel-adapter.js +2 -2
- package/dist/runtime/gateway/http-channel-adapter.js.map +1 -1
- package/dist/runtime/gateway/ingress-gateway.js +1 -1
- package/dist/runtime/gateway/ingress-gateway.js.map +1 -1
- package/dist/runtime/goal-lease-manager.d.ts +35 -0
- package/dist/runtime/goal-lease-manager.d.ts.map +1 -0
- package/dist/runtime/goal-lease-manager.js +191 -0
- package/dist/runtime/goal-lease-manager.js.map +1 -0
- package/dist/runtime/hook-manager.d.ts +4 -0
- package/dist/runtime/hook-manager.d.ts.map +1 -1
- package/dist/runtime/hook-manager.js +33 -0
- package/dist/runtime/hook-manager.js.map +1 -1
- package/dist/runtime/leader-lock-manager.d.ts +30 -0
- package/dist/runtime/leader-lock-manager.d.ts.map +1 -0
- package/dist/runtime/leader-lock-manager.js +160 -0
- package/dist/runtime/leader-lock-manager.js.map +1 -0
- package/dist/runtime/notification-dispatcher.d.ts +2 -0
- package/dist/runtime/notification-dispatcher.d.ts.map +1 -1
- package/dist/runtime/notification-dispatcher.js +12 -0
- package/dist/runtime/notification-dispatcher.js.map +1 -1
- package/dist/runtime/plugin-loader.d.ts +1 -1
- package/dist/runtime/queue/index.d.ts +4 -4
- package/dist/runtime/queue/index.d.ts.map +1 -1
- package/dist/runtime/queue/index.js +2 -2
- package/dist/runtime/queue/index.js.map +1 -1
- package/dist/runtime/queue/journal-backed-queue.d.ts +80 -0
- package/dist/runtime/queue/journal-backed-queue.d.ts.map +1 -0
- package/dist/runtime/queue/journal-backed-queue.js +511 -0
- package/dist/runtime/queue/journal-backed-queue.js.map +1 -0
- package/dist/runtime/queue/queue-claim-sweeper.d.ts +15 -0
- package/dist/runtime/queue/queue-claim-sweeper.d.ts.map +1 -0
- package/dist/runtime/queue/queue-claim-sweeper.js +28 -0
- package/dist/runtime/queue/queue-claim-sweeper.js.map +1 -0
- package/dist/runtime/schedule/engine-layers.d.ts +44 -0
- package/dist/runtime/schedule/engine-layers.d.ts.map +1 -0
- package/dist/runtime/schedule/engine-layers.js +433 -0
- package/dist/runtime/schedule/engine-layers.js.map +1 -0
- package/dist/runtime/schedule/engine.d.ts +82 -0
- package/dist/runtime/schedule/engine.d.ts.map +1 -0
- package/dist/runtime/schedule/engine.js +480 -0
- package/dist/runtime/schedule/engine.js.map +1 -0
- package/dist/runtime/schedule/index.d.ts +5 -0
- package/dist/runtime/schedule/index.d.ts.map +1 -0
- package/dist/runtime/schedule/index.js +5 -0
- package/dist/runtime/schedule/index.js.map +1 -0
- package/dist/runtime/schedule/presets.d.ts +536 -0
- package/dist/runtime/schedule/presets.d.ts.map +1 -0
- package/dist/runtime/schedule/presets.js +166 -0
- package/dist/runtime/schedule/presets.js.map +1 -0
- package/dist/runtime/schedule/source.d.ts +65 -0
- package/dist/runtime/schedule/source.d.ts.map +1 -0
- package/dist/runtime/schedule/source.js +16 -0
- package/dist/runtime/schedule/source.js.map +1 -0
- package/dist/runtime/schedule-engine-layers.d.ts +1 -37
- package/dist/runtime/schedule-engine-layers.d.ts.map +1 -1
- package/dist/runtime/schedule-engine-layers.js +1 -301
- package/dist/runtime/schedule-engine-layers.js.map +1 -1
- package/dist/runtime/schedule-engine.d.ts +1 -61
- package/dist/runtime/schedule-engine.d.ts.map +1 -1
- package/dist/runtime/schedule-engine.js +1 -397
- package/dist/runtime/schedule-engine.js.map +1 -1
- package/dist/runtime/schedule-presets.d.ts +2 -0
- package/dist/runtime/schedule-presets.d.ts.map +1 -0
- package/dist/runtime/schedule-presets.js +2 -0
- package/dist/runtime/schedule-presets.js.map +1 -0
- package/dist/runtime/schedule-source.d.ts +1 -64
- package/dist/runtime/schedule-source.d.ts.map +1 -1
- package/dist/runtime/schedule-source.js +1 -15
- package/dist/runtime/schedule-source.js.map +1 -1
- package/dist/runtime/store/approval-store.d.ts +26 -0
- package/dist/runtime/store/approval-store.d.ts.map +1 -0
- package/dist/runtime/store/approval-store.js +119 -0
- package/dist/runtime/store/approval-store.js.map +1 -0
- package/dist/runtime/store/health-store.d.ts +16 -0
- package/dist/runtime/store/health-store.d.ts.map +1 -0
- package/dist/runtime/store/health-store.js +68 -0
- package/dist/runtime/store/health-store.js.map +1 -0
- package/dist/runtime/store/index.d.ts +10 -0
- package/dist/runtime/store/index.d.ts.map +1 -0
- package/dist/runtime/store/index.js +7 -0
- package/dist/runtime/store/index.js.map +1 -0
- package/dist/runtime/store/outbox-store.d.ts +16 -0
- package/dist/runtime/store/outbox-store.d.ts.map +1 -0
- package/dist/runtime/store/outbox-store.js +92 -0
- package/dist/runtime/store/outbox-store.js.map +1 -0
- package/dist/runtime/store/runtime-journal.d.ts +19 -0
- package/dist/runtime/store/runtime-journal.d.ts.map +1 -0
- package/dist/runtime/store/runtime-journal.js +77 -0
- package/dist/runtime/store/runtime-journal.js.map +1 -0
- package/dist/runtime/store/runtime-paths.d.ts +35 -0
- package/dist/runtime/store/runtime-paths.d.ts.map +1 -0
- package/dist/runtime/store/runtime-paths.js +108 -0
- package/dist/runtime/store/runtime-paths.js.map +1 -0
- package/dist/runtime/store/runtime-schemas.d.ts +218 -0
- package/dist/runtime/store/runtime-schemas.d.ts.map +1 -0
- package/dist/runtime/store/runtime-schemas.js +94 -0
- package/dist/runtime/store/runtime-schemas.js.map +1 -0
- 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 +3 -0
- package/dist/runtime/types/daemon.js.map +1 -1
- package/dist/runtime/types/hook.d.ts +12 -12
- package/dist/runtime/types/hook.d.ts.map +1 -1
- package/dist/runtime/types/hook.js +1 -0
- package/dist/runtime/types/hook.js.map +1 -1
- package/dist/runtime/types/schedule.d.ts +204 -27
- package/dist/runtime/types/schedule.d.ts.map +1 -1
- package/dist/runtime/types/schedule.js +25 -0
- package/dist/runtime/types/schedule.js.map +1 -1
- package/dist/runtime/watchdog.d.ts +44 -0
- package/dist/runtime/watchdog.d.ts.map +1 -0
- package/dist/runtime/watchdog.js +185 -0
- package/dist/runtime/watchdog.js.map +1 -0
- package/dist/tools/builtin/index.d.ts +15 -0
- package/dist/tools/builtin/index.d.ts.map +1 -1
- package/dist/tools/builtin/index.js +31 -2
- package/dist/tools/builtin/index.js.map +1 -1
- package/dist/tools/execution/MemoryConsolidateTool/MemoryConsolidateTool.d.ts +1 -1
- package/dist/tools/execution/MemoryConsolidateTool/MemoryConsolidateTool.d.ts.map +1 -1
- package/dist/tools/execution/MemoryConsolidateTool/MemoryConsolidateTool.js +6 -5
- package/dist/tools/execution/MemoryConsolidateTool/MemoryConsolidateTool.js.map +1 -1
- package/dist/tools/fs/FileEditTool/FileEditTool.d.ts +1 -1
- package/dist/tools/fs/FileEditTool/FileEditTool.d.ts.map +1 -1
- package/dist/tools/fs/FileEditTool/FileEditTool.js +1 -1
- package/dist/tools/fs/FileEditTool/FileEditTool.js.map +1 -1
- package/dist/tools/fs/FileWriteTool/FileWriteTool.d.ts +1 -1
- package/dist/tools/fs/FileWriteTool/FileWriteTool.d.ts.map +1 -1
- package/dist/tools/fs/FileWriteTool/FileWriteTool.js +1 -1
- package/dist/tools/fs/FileWriteTool/FileWriteTool.js.map +1 -1
- package/dist/tools/fs/GlobTool/GlobTool.d.ts +2 -2
- package/dist/tools/fs/GlobTool/GlobTool.d.ts.map +1 -1
- package/dist/tools/fs/GlobTool/GlobTool.js +2 -2
- package/dist/tools/fs/GlobTool/GlobTool.js.map +1 -1
- package/dist/tools/fs/GrepTool/GrepTool.d.ts +2 -2
- package/dist/tools/fs/GrepTool/GrepTool.d.ts.map +1 -1
- package/dist/tools/fs/GrepTool/GrepTool.js +9 -3
- package/dist/tools/fs/GrepTool/GrepTool.js.map +1 -1
- package/dist/tools/fs/JsonQueryTool/JsonQueryTool.d.ts +2 -2
- package/dist/tools/fs/JsonQueryTool/JsonQueryTool.d.ts.map +1 -1
- package/dist/tools/fs/JsonQueryTool/JsonQueryTool.js +6 -2
- 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 +2 -2
- 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 +1 -1
- package/dist/tools/fs/ReadTool/ReadTool.js.map +1 -1
- package/dist/tools/mutation/ArchiveGoalTool/ArchiveGoalTool.d.ts +1 -1
- package/dist/tools/mutation/ArchiveGoalTool/ArchiveGoalTool.d.ts.map +1 -1
- package/dist/tools/mutation/ArchiveGoalTool/ArchiveGoalTool.js +1 -1
- package/dist/tools/mutation/ArchiveGoalTool/ArchiveGoalTool.js.map +1 -1
- package/dist/tools/mutation/DeleteGoalTool/DeleteGoalTool.d.ts +1 -1
- package/dist/tools/mutation/DeleteGoalTool/DeleteGoalTool.d.ts.map +1 -1
- package/dist/tools/mutation/DeleteGoalTool/DeleteGoalTool.js +1 -1
- package/dist/tools/mutation/DeleteGoalTool/DeleteGoalTool.js.map +1 -1
- package/dist/tools/mutation/ResetTrustTool/ResetTrustTool.d.ts +1 -1
- package/dist/tools/mutation/ResetTrustTool/ResetTrustTool.d.ts.map +1 -1
- package/dist/tools/mutation/ResetTrustTool/ResetTrustTool.js +1 -1
- package/dist/tools/mutation/ResetTrustTool/ResetTrustTool.js.map +1 -1
- package/dist/tools/mutation/SetGoalTool/SetGoalTool.d.ts +2 -2
- package/dist/tools/mutation/SetGoalTool/SetGoalTool.d.ts.map +1 -1
- package/dist/tools/mutation/SetGoalTool/SetGoalTool.js +2 -2
- package/dist/tools/mutation/SetGoalTool/SetGoalTool.js.map +1 -1
- package/dist/tools/mutation/TaskCreateTool/TaskCreateTool.d.ts +216 -0
- package/dist/tools/mutation/TaskCreateTool/TaskCreateTool.d.ts.map +1 -0
- package/dist/tools/mutation/TaskCreateTool/TaskCreateTool.js +104 -0
- package/dist/tools/mutation/TaskCreateTool/TaskCreateTool.js.map +1 -0
- package/dist/tools/mutation/TaskCreateTool/constants.d.ts +5 -0
- package/dist/tools/mutation/TaskCreateTool/constants.d.ts.map +1 -0
- package/dist/tools/mutation/TaskCreateTool/constants.js +5 -0
- package/dist/tools/mutation/TaskCreateTool/constants.js.map +1 -0
- package/dist/tools/mutation/TaskCreateTool/prompt.d.ts +2 -0
- package/dist/tools/mutation/TaskCreateTool/prompt.d.ts.map +1 -0
- package/dist/tools/mutation/TaskCreateTool/prompt.js +2 -0
- package/dist/tools/mutation/TaskCreateTool/prompt.js.map +1 -0
- package/dist/tools/mutation/TaskOutputTool/TaskOutputTool.d.ts +46 -0
- package/dist/tools/mutation/TaskOutputTool/TaskOutputTool.d.ts.map +1 -0
- package/dist/tools/mutation/TaskOutputTool/TaskOutputTool.js +95 -0
- package/dist/tools/mutation/TaskOutputTool/TaskOutputTool.js.map +1 -0
- package/dist/tools/mutation/TaskOutputTool/constants.d.ts +5 -0
- package/dist/tools/mutation/TaskOutputTool/constants.d.ts.map +1 -0
- package/dist/tools/mutation/TaskOutputTool/constants.js +5 -0
- package/dist/tools/mutation/TaskOutputTool/constants.js.map +1 -0
- package/dist/tools/mutation/TaskOutputTool/prompt.d.ts +2 -0
- package/dist/tools/mutation/TaskOutputTool/prompt.d.ts.map +1 -0
- package/dist/tools/mutation/TaskOutputTool/prompt.js +2 -0
- package/dist/tools/mutation/TaskOutputTool/prompt.js.map +1 -0
- package/dist/tools/mutation/TaskStopTool/TaskStopTool.d.ts +40 -0
- package/dist/tools/mutation/TaskStopTool/TaskStopTool.d.ts.map +1 -0
- package/dist/tools/mutation/TaskStopTool/TaskStopTool.js +95 -0
- package/dist/tools/mutation/TaskStopTool/TaskStopTool.js.map +1 -0
- package/dist/tools/mutation/TaskStopTool/constants.d.ts +5 -0
- package/dist/tools/mutation/TaskStopTool/constants.d.ts.map +1 -0
- package/dist/tools/mutation/TaskStopTool/constants.js +5 -0
- package/dist/tools/mutation/TaskStopTool/constants.js.map +1 -0
- package/dist/tools/mutation/TaskStopTool/prompt.d.ts +2 -0
- package/dist/tools/mutation/TaskStopTool/prompt.d.ts.map +1 -0
- package/dist/tools/mutation/TaskStopTool/prompt.js +2 -0
- package/dist/tools/mutation/TaskStopTool/prompt.js.map +1 -0
- package/dist/tools/mutation/TaskUpdateTool/TaskUpdateTool.d.ts +270 -0
- package/dist/tools/mutation/TaskUpdateTool/TaskUpdateTool.d.ts.map +1 -0
- package/dist/tools/mutation/TaskUpdateTool/TaskUpdateTool.js +137 -0
- package/dist/tools/mutation/TaskUpdateTool/TaskUpdateTool.js.map +1 -0
- package/dist/tools/mutation/TaskUpdateTool/constants.d.ts +5 -0
- package/dist/tools/mutation/TaskUpdateTool/constants.d.ts.map +1 -0
- package/dist/tools/mutation/TaskUpdateTool/constants.js +5 -0
- package/dist/tools/mutation/TaskUpdateTool/constants.js.map +1 -0
- package/dist/tools/mutation/TaskUpdateTool/prompt.d.ts +2 -0
- package/dist/tools/mutation/TaskUpdateTool/prompt.d.ts.map +1 -0
- package/dist/tools/mutation/TaskUpdateTool/prompt.js +2 -0
- package/dist/tools/mutation/TaskUpdateTool/prompt.js.map +1 -0
- package/dist/tools/mutation/TogglePluginTool/TogglePluginTool.d.ts +1 -1
- package/dist/tools/mutation/TogglePluginTool/TogglePluginTool.d.ts.map +1 -1
- package/dist/tools/mutation/TogglePluginTool/TogglePluginTool.js +1 -1
- package/dist/tools/mutation/TogglePluginTool/TogglePluginTool.js.map +1 -1
- package/dist/tools/mutation/UpdateConfigTool/UpdateConfigTool.d.ts +2 -2
- package/dist/tools/mutation/UpdateConfigTool/UpdateConfigTool.d.ts.map +1 -1
- package/dist/tools/mutation/UpdateConfigTool/UpdateConfigTool.js +11 -2
- package/dist/tools/mutation/UpdateConfigTool/UpdateConfigTool.js.map +1 -1
- package/dist/tools/mutation/UpdateGoalTool/UpdateGoalTool.d.ts +2 -2
- package/dist/tools/mutation/UpdateGoalTool/UpdateGoalTool.d.ts.map +1 -1
- package/dist/tools/mutation/UpdateGoalTool/UpdateGoalTool.js +2 -2
- package/dist/tools/mutation/UpdateGoalTool/UpdateGoalTool.js.map +1 -1
- package/dist/tools/mutation/task-history-utils.d.ts +4 -0
- package/dist/tools/mutation/task-history-utils.d.ts.map +1 -0
- package/dist/tools/mutation/task-history-utils.js +30 -0
- package/dist/tools/mutation/task-history-utils.js.map +1 -0
- package/dist/tools/network/HttpFetchTool/HttpFetchTool.d.ts +1 -1
- package/dist/tools/network/HttpFetchTool/HttpFetchTool.d.ts.map +1 -1
- package/dist/tools/network/HttpFetchTool/HttpFetchTool.js +1 -1
- package/dist/tools/network/HttpFetchTool/HttpFetchTool.js.map +1 -1
- package/dist/tools/query/ArchitectureTool/ArchitectureTool.d.ts +2 -2
- package/dist/tools/query/ArchitectureTool/ArchitectureTool.d.ts.map +1 -1
- package/dist/tools/query/ArchitectureTool/ArchitectureTool.js +2 -2
- package/dist/tools/query/ArchitectureTool/ArchitectureTool.js.map +1 -1
- package/dist/tools/query/ConfigTool/ConfigTool.d.ts +2 -2
- package/dist/tools/query/ConfigTool/ConfigTool.d.ts.map +1 -1
- package/dist/tools/query/ConfigTool/ConfigTool.js +2 -2
- package/dist/tools/query/ConfigTool/ConfigTool.js.map +1 -1
- package/dist/tools/query/GoalStateTool/GoalStateTool.d.ts +2 -2
- package/dist/tools/query/GoalStateTool/GoalStateTool.d.ts.map +1 -1
- package/dist/tools/query/GoalStateTool/GoalStateTool.js +2 -2
- package/dist/tools/query/GoalStateTool/GoalStateTool.js.map +1 -1
- package/dist/tools/query/KnowledgeQueryTool/KnowledgeQueryTool.d.ts +2 -2
- package/dist/tools/query/KnowledgeQueryTool/KnowledgeQueryTool.d.ts.map +1 -1
- package/dist/tools/query/KnowledgeQueryTool/KnowledgeQueryTool.js +2 -2
- package/dist/tools/query/KnowledgeQueryTool/KnowledgeQueryTool.js.map +1 -1
- package/dist/tools/query/MemoryRecallTool/MemoryRecallTool.d.ts +7 -7
- package/dist/tools/query/MemoryRecallTool/MemoryRecallTool.d.ts.map +1 -1
- package/dist/tools/query/MemoryRecallTool/MemoryRecallTool.js +11 -10
- package/dist/tools/query/MemoryRecallTool/MemoryRecallTool.js.map +1 -1
- package/dist/tools/query/PluginStateTool/PluginStateTool.d.ts +2 -2
- package/dist/tools/query/PluginStateTool/PluginStateTool.d.ts.map +1 -1
- package/dist/tools/query/PluginStateTool/PluginStateTool.js +2 -2
- package/dist/tools/query/PluginStateTool/PluginStateTool.js.map +1 -1
- package/dist/tools/query/ProgressHistoryTool/ProgressHistoryTool.d.ts +4 -4
- package/dist/tools/query/ProgressHistoryTool/ProgressHistoryTool.d.ts.map +1 -1
- package/dist/tools/query/ProgressHistoryTool/ProgressHistoryTool.js +2 -2
- package/dist/tools/query/ProgressHistoryTool/ProgressHistoryTool.js.map +1 -1
- package/dist/tools/query/SessionHistoryTool/SessionHistoryTool.d.ts +2 -2
- package/dist/tools/query/SessionHistoryTool/SessionHistoryTool.d.ts.map +1 -1
- package/dist/tools/query/SessionHistoryTool/SessionHistoryTool.js +2 -2
- package/dist/tools/query/SessionHistoryTool/SessionHistoryTool.js.map +1 -1
- package/dist/tools/query/TaskGetTool/TaskGetTool.d.ts +34 -0
- package/dist/tools/query/TaskGetTool/TaskGetTool.d.ts.map +1 -0
- package/dist/tools/query/TaskGetTool/TaskGetTool.js +77 -0
- package/dist/tools/query/TaskGetTool/TaskGetTool.js.map +1 -0
- package/dist/tools/query/TaskGetTool/constants.d.ts +6 -0
- package/dist/tools/query/TaskGetTool/constants.d.ts.map +1 -0
- package/dist/tools/query/TaskGetTool/constants.js +6 -0
- package/dist/tools/query/TaskGetTool/constants.js.map +1 -0
- package/dist/tools/query/TaskGetTool/prompt.d.ts +2 -0
- package/dist/tools/query/TaskGetTool/prompt.d.ts.map +1 -0
- package/dist/tools/query/TaskGetTool/prompt.js +2 -0
- package/dist/tools/query/TaskGetTool/prompt.js.map +1 -0
- package/dist/tools/query/TaskListTool/TaskListTool.d.ts +58 -0
- package/dist/tools/query/TaskListTool/TaskListTool.d.ts.map +1 -0
- package/dist/tools/query/TaskListTool/TaskListTool.js +101 -0
- package/dist/tools/query/TaskListTool/TaskListTool.js.map +1 -0
- package/dist/tools/query/TaskListTool/constants.d.ts +6 -0
- package/dist/tools/query/TaskListTool/constants.d.ts.map +1 -0
- package/dist/tools/query/TaskListTool/constants.js +6 -0
- package/dist/tools/query/TaskListTool/constants.js.map +1 -0
- package/dist/tools/query/TaskListTool/prompt.d.ts +2 -0
- package/dist/tools/query/TaskListTool/prompt.d.ts.map +1 -0
- package/dist/tools/query/TaskListTool/prompt.js +2 -0
- package/dist/tools/query/TaskListTool/prompt.js.map +1 -0
- package/dist/tools/query/TrustStateTool/TrustStateTool.d.ts +2 -2
- package/dist/tools/query/TrustStateTool/TrustStateTool.d.ts.map +1 -1
- package/dist/tools/query/TrustStateTool/TrustStateTool.js +2 -2
- package/dist/tools/query/TrustStateTool/TrustStateTool.js.map +1 -1
- package/dist/tools/schedule/CreateScheduleTool/CreateScheduleTool.d.ts +1638 -0
- package/dist/tools/schedule/CreateScheduleTool/CreateScheduleTool.d.ts.map +1 -0
- package/dist/tools/schedule/CreateScheduleTool/CreateScheduleTool.js +86 -0
- package/dist/tools/schedule/CreateScheduleTool/CreateScheduleTool.js.map +1 -0
- package/dist/tools/schedule/CreateScheduleTool/constants.d.ts +5 -0
- package/dist/tools/schedule/CreateScheduleTool/constants.d.ts.map +1 -0
- package/dist/tools/schedule/CreateScheduleTool/constants.js +5 -0
- package/dist/tools/schedule/CreateScheduleTool/constants.js.map +1 -0
- package/dist/tools/schedule/CreateScheduleTool/prompt.d.ts +2 -0
- package/dist/tools/schedule/CreateScheduleTool/prompt.d.ts.map +1 -0
- package/dist/tools/schedule/CreateScheduleTool/prompt.js +2 -0
- package/dist/tools/schedule/CreateScheduleTool/prompt.js.map +1 -0
- package/dist/tools/schedule/GetScheduleTool/GetScheduleTool.d.ts +28 -0
- package/dist/tools/schedule/GetScheduleTool/GetScheduleTool.d.ts.map +1 -0
- package/dist/tools/schedule/GetScheduleTool/GetScheduleTool.js +79 -0
- package/dist/tools/schedule/GetScheduleTool/GetScheduleTool.js.map +1 -0
- package/dist/tools/schedule/GetScheduleTool/constants.d.ts +6 -0
- package/dist/tools/schedule/GetScheduleTool/constants.d.ts.map +1 -0
- package/dist/tools/schedule/GetScheduleTool/constants.js +6 -0
- package/dist/tools/schedule/GetScheduleTool/constants.js.map +1 -0
- package/dist/tools/schedule/GetScheduleTool/prompt.d.ts +2 -0
- package/dist/tools/schedule/GetScheduleTool/prompt.d.ts.map +1 -0
- package/dist/tools/schedule/GetScheduleTool/prompt.js +2 -0
- package/dist/tools/schedule/GetScheduleTool/prompt.js.map +1 -0
- package/dist/tools/schedule/ListSchedulesTool/ListSchedulesTool.d.ts +40 -0
- package/dist/tools/schedule/ListSchedulesTool/ListSchedulesTool.d.ts.map +1 -0
- package/dist/tools/schedule/ListSchedulesTool/ListSchedulesTool.js +83 -0
- package/dist/tools/schedule/ListSchedulesTool/ListSchedulesTool.js.map +1 -0
- package/dist/tools/schedule/ListSchedulesTool/constants.d.ts +6 -0
- package/dist/tools/schedule/ListSchedulesTool/constants.d.ts.map +1 -0
- package/dist/tools/schedule/ListSchedulesTool/constants.js +6 -0
- package/dist/tools/schedule/ListSchedulesTool/constants.js.map +1 -0
- package/dist/tools/schedule/ListSchedulesTool/prompt.d.ts +2 -0
- package/dist/tools/schedule/ListSchedulesTool/prompt.d.ts.map +1 -0
- package/dist/tools/schedule/ListSchedulesTool/prompt.js +2 -0
- package/dist/tools/schedule/ListSchedulesTool/prompt.js.map +1 -0
- package/dist/tools/schedule/PauseScheduleTool/PauseScheduleTool.d.ts +32 -0
- package/dist/tools/schedule/PauseScheduleTool/PauseScheduleTool.d.ts.map +1 -0
- package/dist/tools/schedule/PauseScheduleTool/PauseScheduleTool.js +94 -0
- package/dist/tools/schedule/PauseScheduleTool/PauseScheduleTool.js.map +1 -0
- package/dist/tools/schedule/PauseScheduleTool/constants.d.ts +5 -0
- package/dist/tools/schedule/PauseScheduleTool/constants.d.ts.map +1 -0
- package/dist/tools/schedule/PauseScheduleTool/constants.js +5 -0
- package/dist/tools/schedule/PauseScheduleTool/constants.js.map +1 -0
- package/dist/tools/schedule/PauseScheduleTool/prompt.d.ts +2 -0
- package/dist/tools/schedule/PauseScheduleTool/prompt.d.ts.map +1 -0
- package/dist/tools/schedule/PauseScheduleTool/prompt.js +2 -0
- package/dist/tools/schedule/PauseScheduleTool/prompt.js.map +1 -0
- package/dist/tools/schedule/RemoveScheduleTool/RemoveScheduleTool.d.ts +35 -0
- package/dist/tools/schedule/RemoveScheduleTool/RemoveScheduleTool.d.ts.map +1 -0
- package/dist/tools/schedule/RemoveScheduleTool/RemoveScheduleTool.js +100 -0
- package/dist/tools/schedule/RemoveScheduleTool/RemoveScheduleTool.js.map +1 -0
- package/dist/tools/schedule/RemoveScheduleTool/constants.d.ts +5 -0
- package/dist/tools/schedule/RemoveScheduleTool/constants.d.ts.map +1 -0
- package/dist/tools/schedule/RemoveScheduleTool/constants.js +5 -0
- package/dist/tools/schedule/RemoveScheduleTool/constants.js.map +1 -0
- package/dist/tools/schedule/RemoveScheduleTool/prompt.d.ts +2 -0
- package/dist/tools/schedule/RemoveScheduleTool/prompt.d.ts.map +1 -0
- package/dist/tools/schedule/RemoveScheduleTool/prompt.js +2 -0
- package/dist/tools/schedule/RemoveScheduleTool/prompt.js.map +1 -0
- package/dist/tools/schedule/ResumeScheduleTool/ResumeScheduleTool.d.ts +32 -0
- package/dist/tools/schedule/ResumeScheduleTool/ResumeScheduleTool.d.ts.map +1 -0
- package/dist/tools/schedule/ResumeScheduleTool/ResumeScheduleTool.js +94 -0
- package/dist/tools/schedule/ResumeScheduleTool/ResumeScheduleTool.js.map +1 -0
- package/dist/tools/schedule/ResumeScheduleTool/constants.d.ts +5 -0
- package/dist/tools/schedule/ResumeScheduleTool/constants.d.ts.map +1 -0
- package/dist/tools/schedule/ResumeScheduleTool/constants.js +5 -0
- package/dist/tools/schedule/ResumeScheduleTool/constants.js.map +1 -0
- package/dist/tools/schedule/ResumeScheduleTool/prompt.d.ts +2 -0
- package/dist/tools/schedule/ResumeScheduleTool/prompt.d.ts.map +1 -0
- package/dist/tools/schedule/ResumeScheduleTool/prompt.js +2 -0
- package/dist/tools/schedule/ResumeScheduleTool/prompt.js.map +1 -0
- package/dist/tools/schedule/UpdateScheduleTool/UpdateScheduleTool.d.ts +770 -0
- package/dist/tools/schedule/UpdateScheduleTool/UpdateScheduleTool.d.ts.map +1 -0
- package/dist/tools/schedule/UpdateScheduleTool/UpdateScheduleTool.js +131 -0
- package/dist/tools/schedule/UpdateScheduleTool/UpdateScheduleTool.js.map +1 -0
- package/dist/tools/schedule/UpdateScheduleTool/constants.d.ts +5 -0
- package/dist/tools/schedule/UpdateScheduleTool/constants.d.ts.map +1 -0
- package/dist/tools/schedule/UpdateScheduleTool/constants.js +5 -0
- package/dist/tools/schedule/UpdateScheduleTool/constants.js.map +1 -0
- package/dist/tools/schedule/UpdateScheduleTool/prompt.d.ts +2 -0
- package/dist/tools/schedule/UpdateScheduleTool/prompt.d.ts.map +1 -0
- package/dist/tools/schedule/UpdateScheduleTool/prompt.js +2 -0
- package/dist/tools/schedule/UpdateScheduleTool/prompt.js.map +1 -0
- package/dist/tools/system/EnvTool/EnvTool.d.ts +2 -2
- package/dist/tools/system/EnvTool/EnvTool.d.ts.map +1 -1
- package/dist/tools/system/EnvTool/EnvTool.js +2 -2
- package/dist/tools/system/EnvTool/EnvTool.js.map +1 -1
- package/dist/tools/system/GitDiffTool/GitDiffTool.d.ts +2 -2
- package/dist/tools/system/GitDiffTool/GitDiffTool.d.ts.map +1 -1
- package/dist/tools/system/GitDiffTool/GitDiffTool.js +2 -2
- package/dist/tools/system/GitDiffTool/GitDiffTool.js.map +1 -1
- package/dist/tools/system/GitLogTool/GitLogTool.d.ts +2 -2
- package/dist/tools/system/GitLogTool/GitLogTool.d.ts.map +1 -1
- package/dist/tools/system/GitLogTool/GitLogTool.js +2 -2
- package/dist/tools/system/GitLogTool/GitLogTool.js.map +1 -1
- package/dist/tools/system/SleepTool/SleepTool.d.ts +2 -2
- package/dist/tools/system/SleepTool/SleepTool.d.ts.map +1 -1
- package/dist/tools/system/SleepTool/SleepTool.js +2 -2
- package/dist/tools/system/SleepTool/SleepTool.js.map +1 -1
- package/dist/tools/system/test-runner.d.ts +2 -52
- package/dist/tools/system/test-runner.d.ts.map +1 -1
- package/dist/tools/system/test-runner.js +1 -180
- package/dist/tools/system/test-runner.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,591 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
* core-loop-phases-b.ts
|
|
3
|
-
*
|
|
4
|
-
* Phases 5–7 of CoreLoop.runOneIteration() as standalone functions.
|
|
5
|
-
* Phases 1–4 are in core-loop-phases.ts.
|
|
6
|
-
*/
|
|
7
|
-
import { randomUUID } from "node:crypto";
|
|
8
|
-
import { buildDriveContext, } from "./core-loop-types.js";
|
|
9
|
-
import { getMilestones, evaluatePace, } from "../goal/milestone-evaluator.js";
|
|
10
|
-
import { gatherStallEvidence } from "./stall-evidence.js";
|
|
11
|
-
import { verifyWithTools } from "./verification-layer1.js";
|
|
12
|
-
import { buildLoopToolContext } from "./core-loop-phases.js";
|
|
13
|
-
// ─── Phase 5 ───
|
|
14
|
-
/** Completion check + milestone deadline check.
|
|
15
|
-
* Sets result.error on fatal failure, sets result.completionJudgment. */
|
|
16
|
-
export async function checkCompletionAndMilestones(ctx, goalId, goal, result, startTime) {
|
|
17
|
-
// R1-1: record pre-task judgment (do NOT early-return here)
|
|
18
|
-
try {
|
|
19
|
-
const judgment = goal.children_ids.length > 0
|
|
20
|
-
? await ctx.deps.satisficingJudge.judgeTreeCompletion(goalId)
|
|
21
|
-
: ctx.deps.satisficingJudge.isGoalComplete(goal);
|
|
22
|
-
result.completionJudgment = judgment;
|
|
23
|
-
// Wire satisficing callback to MemoryLifecycleManager
|
|
24
|
-
// SatisficingJudge fires (goalId, satisfiedDimensions[]) but MLM expects per-dimension calls
|
|
25
|
-
if (ctx.deps.memoryLifecycleManager) {
|
|
26
|
-
const blockingSet = new Set(judgment.blocking_dimensions);
|
|
27
|
-
for (const dim of goal.dimensions) {
|
|
28
|
-
const isSatisfied = !blockingSet.has(dim.name);
|
|
29
|
-
ctx.deps.memoryLifecycleManager.onSatisficingJudgment(goalId, dim.name, isSatisfied);
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
catch (err) {
|
|
34
|
-
result.error = `Completion check failed: ${err instanceof Error ? err.message : String(err)}`;
|
|
35
|
-
ctx.logger?.error(`CoreLoop: ${result.error}`, { goalId });
|
|
36
|
-
result.elapsedMs = Date.now() - startTime;
|
|
37
|
-
return;
|
|
38
|
-
}
|
|
39
|
-
// Milestone deadline check
|
|
40
|
-
try {
|
|
41
|
-
const allGoals = [goal];
|
|
42
|
-
for (const childId of goal.children_ids) {
|
|
43
|
-
const child = await ctx.deps.stateManager.loadGoal(childId);
|
|
44
|
-
if (child)
|
|
45
|
-
allGoals.push(child);
|
|
46
|
-
}
|
|
47
|
-
const milestones = getMilestones(allGoals);
|
|
48
|
-
if (milestones.length > 0) {
|
|
49
|
-
const milestoneAlerts = [];
|
|
50
|
-
for (const milestone of milestones) {
|
|
51
|
-
const currentAchievement = milestone.pace_snapshot?.achievement_ratio ??
|
|
52
|
-
(typeof milestone.dimensions[0]?.current_value === "number"
|
|
53
|
-
? Math.min(milestone.dimensions[0].current_value / 100, 1)
|
|
54
|
-
: 0);
|
|
55
|
-
const snapshot = evaluatePace(milestone, currentAchievement);
|
|
56
|
-
await ctx.deps.stateManager.savePaceSnapshot(milestone.id, snapshot);
|
|
57
|
-
if (snapshot.status === "at_risk" || snapshot.status === "behind") {
|
|
58
|
-
milestoneAlerts.push({
|
|
59
|
-
goalId: milestone.id,
|
|
60
|
-
status: snapshot.status,
|
|
61
|
-
pace_ratio: snapshot.pace_ratio,
|
|
62
|
-
});
|
|
63
|
-
}
|
|
64
|
-
else {
|
|
65
|
-
if (ctx.deps.learningPipeline) {
|
|
66
|
-
try {
|
|
67
|
-
await ctx.deps.learningPipeline.onMilestoneReached(goalId, `Milestone ${milestone.title}: pace ${snapshot.status}`);
|
|
68
|
-
}
|
|
69
|
-
catch {
|
|
70
|
-
// non-fatal
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
if (milestoneAlerts.length > 0) {
|
|
76
|
-
result.milestoneAlerts = milestoneAlerts;
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
catch {
|
|
81
|
-
// Milestone check failure is non-fatal
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
// ─── Phase 6 ───
|
|
85
|
-
/** Stall detection per-dimension and globally, plus portfolio rebalance. */
|
|
86
|
-
export async function detectStallsAndRebalance(ctx, goalId, goal, result) {
|
|
87
|
-
try {
|
|
88
|
-
const gapHistory = await ctx.deps.stateManager.loadGapHistory(goalId);
|
|
89
|
-
// Gather tool-based workspace evidence for stall detection (Phase 6)
|
|
90
|
-
if (ctx.toolExecutor) {
|
|
91
|
-
try {
|
|
92
|
-
const toolContext = {
|
|
93
|
-
cwd: process.cwd(),
|
|
94
|
-
goalId,
|
|
95
|
-
trustBalance: 0,
|
|
96
|
-
preApproved: true,
|
|
97
|
-
approvalFn: async () => false,
|
|
98
|
-
};
|
|
99
|
-
const evidence = await gatherStallEvidence(ctx.toolExecutor, toolContext);
|
|
100
|
-
result.toolStallEvidence = evidence;
|
|
101
|
-
if (!evidence.hasWorkspaceChanges) {
|
|
102
|
-
ctx.logger?.info("CoreLoop: stall evidence — no workspace changes detected", { goalId, toolErrors: evidence.toolErrors });
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
catch {
|
|
106
|
-
// Non-fatal: evidence gathering failure does not block stall detection
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
// Gap 3: isSuppressed wiring — suppression is per-dimension only.
|
|
110
|
-
// Collect suppressed dimensions from all active WaitStrategies; skip those dims in stall loop.
|
|
111
|
-
const suppressedDimensions = new Set();
|
|
112
|
-
if (ctx.deps.portfolioManager) {
|
|
113
|
-
try {
|
|
114
|
-
const portfolio = await ctx.deps.strategyManager.getPortfolio(goalId);
|
|
115
|
-
if (portfolio) {
|
|
116
|
-
for (const s of portfolio.strategies) {
|
|
117
|
-
if (s.state !== "active" || !ctx.deps.portfolioManager.isWaitStrategy(s))
|
|
118
|
-
continue;
|
|
119
|
-
const ws = s;
|
|
120
|
-
const waitUntil = typeof ws["wait_until"] === "string" ? ws["wait_until"] : null;
|
|
121
|
-
if (!ctx.deps.stallDetector.isSuppressed(waitUntil))
|
|
122
|
-
continue;
|
|
123
|
-
// Suppress only the primary_dimension of this WaitStrategy
|
|
124
|
-
const primaryDim = typeof ws["primary_dimension"] === "string" ? ws["primary_dimension"] : null;
|
|
125
|
-
if (primaryDim) {
|
|
126
|
-
suppressedDimensions.add(primaryDim);
|
|
127
|
-
ctx.logger?.info("CoreLoop: stall detection suppressed for dimension by active WaitStrategy", {
|
|
128
|
-
goalId,
|
|
129
|
-
dimension: primaryDim,
|
|
130
|
-
waitUntil,
|
|
131
|
-
});
|
|
132
|
-
result.waitSuppressed = true;
|
|
133
|
-
}
|
|
134
|
-
}
|
|
135
|
-
}
|
|
136
|
-
}
|
|
137
|
-
catch {
|
|
138
|
-
// Non-fatal: suppression check failure does not block stall detection
|
|
139
|
-
}
|
|
140
|
-
}
|
|
141
|
-
// Per-dimension stall check (skip dimensions suppressed by active WaitStrategies)
|
|
142
|
-
for (const dim of goal.dimensions) {
|
|
143
|
-
if (suppressedDimensions.has(dim.name))
|
|
144
|
-
continue;
|
|
145
|
-
const dimGapHistory = gapHistory
|
|
146
|
-
.filter((entry) => entry.gap_vector.some((g) => g.dimension_name === dim.name))
|
|
147
|
-
.map((entry) => {
|
|
148
|
-
const g = entry.gap_vector.find((g) => g.dimension_name === dim.name);
|
|
149
|
-
return { normalized_gap: g?.normalized_weighted_gap ?? 1 };
|
|
150
|
-
});
|
|
151
|
-
const stallReport = ctx.deps.stallDetector.checkDimensionStall(goalId, dim.name, dimGapHistory);
|
|
152
|
-
if (stallReport) {
|
|
153
|
-
result.stallDetected = true;
|
|
154
|
-
result.stallReport = stallReport;
|
|
155
|
-
// Predicted stalls are advisory — log but don't pivot/escalate
|
|
156
|
-
if (stallReport.stall_type === "predicted_plateau" ||
|
|
157
|
-
stallReport.stall_type === "predicted_regression") {
|
|
158
|
-
ctx.logger?.info(`CoreLoop: early warning ${stallReport.stall_type} — monitoring, no pivot`, { goalId });
|
|
159
|
-
continue;
|
|
160
|
-
}
|
|
161
|
-
const escalationLevel = await ctx.deps.stallDetector.getEscalationLevel(goalId, dim.name);
|
|
162
|
-
await applyStallAction(ctx, goalId, goal, dimGapHistory, stallReport, escalationLevel, dim.name, result, "");
|
|
163
|
-
break;
|
|
164
|
-
}
|
|
165
|
-
}
|
|
166
|
-
// Global stall check
|
|
167
|
-
if (!result.stallDetected) {
|
|
168
|
-
await checkGlobalStall(ctx, goalId, goal, result, gapHistory);
|
|
169
|
-
}
|
|
170
|
-
// Portfolio: check rebalance after stall detection
|
|
171
|
-
if (ctx.deps.portfolioManager) {
|
|
172
|
-
await rebalancePortfolio(ctx, goalId, goal, result);
|
|
173
|
-
}
|
|
174
|
-
}
|
|
175
|
-
catch (err) {
|
|
176
|
-
ctx.logger?.warn("CoreLoop: stall detection failed (non-fatal)", { error: err instanceof Error ? err.message : String(err) });
|
|
177
|
-
}
|
|
178
|
-
}
|
|
179
|
-
// ─── Shared stall-action helper ───
|
|
180
|
-
/** Apply REFINE/PIVOT/ESCALATE logic for a detected stall (per-dimension or global).
|
|
181
|
-
* @param dimHistory Gap history slice used for analysis (single-dim or first-dim for global).
|
|
182
|
-
* @param stallReport The detected StallReport.
|
|
183
|
-
* @param escalationLevel Current escalation level for the stall dimension.
|
|
184
|
-
* @param incrementDimName Dimension name passed to incrementEscalation after handling.
|
|
185
|
-
* @param logPrefix Short prefix for log messages, e.g. "" or "global ".
|
|
186
|
-
*/
|
|
187
|
-
async function applyStallAction(ctx, goalId, goal, dimHistory, stallReport, escalationLevel, incrementDimName, result, logPrefix) {
|
|
188
|
-
if (ctx.deps.learningPipeline) {
|
|
189
|
-
try {
|
|
190
|
-
await ctx.deps.learningPipeline.onStallDetected(goalId, stallReport);
|
|
191
|
-
}
|
|
192
|
-
catch {
|
|
193
|
-
// non-fatal
|
|
194
|
-
}
|
|
195
|
-
}
|
|
196
|
-
const activeStrategyForRecord = await Promise.resolve(ctx.deps.strategyManager.getActiveStrategy(goalId)).catch(() => null);
|
|
197
|
-
const strategyIdForRecord = activeStrategyForRecord?.id ?? "unknown";
|
|
198
|
-
// M14-S2: analyze stall cause to determine REFINE/PIVOT/ESCALATE
|
|
199
|
-
// Falls back to PIVOT behavior when analyzeStallCause is unavailable
|
|
200
|
-
const analysis = ctx.deps.stallDetector.analyzeStallCause?.(dimHistory);
|
|
201
|
-
result.stallAnalysis = analysis;
|
|
202
|
-
if (analysis?.recommended_action === "refine") {
|
|
203
|
-
// REFINE: keep current strategy, just log and continue
|
|
204
|
-
ctx.logger?.info(`CoreLoop: ${logPrefix}stall REFINE — parameter_issue detected, keeping strategy`, {
|
|
205
|
-
goalId,
|
|
206
|
-
evidence: analysis.evidence,
|
|
207
|
-
});
|
|
208
|
-
}
|
|
209
|
-
else if (stallReport.suggested_cause === "information_deficit" && ctx.deps.goalRefiner) {
|
|
210
|
-
// Observation-failure stall: re-refine the leaf to get better dimensions
|
|
211
|
-
ctx.logger?.info(`CoreLoop: ${logPrefix}observation-failure stall — calling reRefineLeaf`, { goalId });
|
|
212
|
-
try {
|
|
213
|
-
await ctx.deps.goalRefiner.reRefineLeaf(goalId, stallReport.suggested_cause);
|
|
214
|
-
}
|
|
215
|
-
catch (reRefineErr) {
|
|
216
|
-
ctx.logger?.warn(`CoreLoop: ${logPrefix}reRefineLeaf failed (non-fatal)`, {
|
|
217
|
-
goalId,
|
|
218
|
-
err: reRefineErr instanceof Error ? reRefineErr.message : String(reRefineErr),
|
|
219
|
-
});
|
|
220
|
-
}
|
|
221
|
-
}
|
|
222
|
-
else if (analysis?.recommended_action === "escalate") {
|
|
223
|
-
// ESCALATE: set escalation level to max to trigger loop exit
|
|
224
|
-
ctx.logger?.warn(`CoreLoop: ${logPrefix}stall ESCALATE — goal_unreachable detected`, {
|
|
225
|
-
goalId,
|
|
226
|
-
evidence: analysis.evidence,
|
|
227
|
-
});
|
|
228
|
-
await ctx.deps.strategyManager.onStallDetected(goalId, 3, goal.origin ?? "general");
|
|
229
|
-
result.pivotOccurred = true;
|
|
230
|
-
}
|
|
231
|
-
else {
|
|
232
|
-
// PIVOT: switch strategy, but check pivot count limit first
|
|
233
|
-
const portfolio = await ctx.deps.strategyManager.getPortfolio(goalId);
|
|
234
|
-
const activeStrategy = portfolio?.strategies.find((s) => s.state === "active");
|
|
235
|
-
const pivotCount = activeStrategy?.pivot_count ?? 0;
|
|
236
|
-
const maxPivotCount = activeStrategy?.max_pivot_count ?? 2;
|
|
237
|
-
if (pivotCount >= maxPivotCount) {
|
|
238
|
-
// Auto-escalate when pivot limit reached
|
|
239
|
-
ctx.logger?.warn(`CoreLoop: ${logPrefix}stall auto-ESCALATE — pivot_count limit reached`, {
|
|
240
|
-
goalId,
|
|
241
|
-
pivotCount,
|
|
242
|
-
maxPivotCount,
|
|
243
|
-
});
|
|
244
|
-
await ctx.deps.strategyManager.onStallDetected(goalId, 3, goal.origin ?? "general");
|
|
245
|
-
result.pivotOccurred = true;
|
|
246
|
-
}
|
|
247
|
-
else {
|
|
248
|
-
const newStrategy = await ctx.deps.strategyManager.onStallDetected(goalId, escalationLevel + 1, goal.origin ?? "general");
|
|
249
|
-
if (newStrategy) {
|
|
250
|
-
result.pivotOccurred = true;
|
|
251
|
-
if (activeStrategy?.id) {
|
|
252
|
-
try {
|
|
253
|
-
await ctx.deps.strategyManager.incrementPivotCount(goalId, activeStrategy.id);
|
|
254
|
-
}
|
|
255
|
-
catch {
|
|
256
|
-
// non-fatal
|
|
257
|
-
}
|
|
258
|
-
}
|
|
259
|
-
}
|
|
260
|
-
}
|
|
261
|
-
}
|
|
262
|
-
// M14-S3: Record decision (non-fatal)
|
|
263
|
-
if (ctx.deps.knowledgeManager) {
|
|
264
|
-
try {
|
|
265
|
-
const latestGap = dimHistory[dimHistory.length - 1]?.normalized_gap ?? 1;
|
|
266
|
-
await ctx.deps.knowledgeManager.recordDecision({
|
|
267
|
-
id: randomUUID(),
|
|
268
|
-
goal_id: goalId,
|
|
269
|
-
goal_type: goal.origin ?? "general",
|
|
270
|
-
strategy_id: strategyIdForRecord,
|
|
271
|
-
hypothesis: activeStrategyForRecord?.hypothesis,
|
|
272
|
-
decision: analysis?.recommended_action ?? "pivot",
|
|
273
|
-
context: {
|
|
274
|
-
gap_value: latestGap,
|
|
275
|
-
stall_count: stallReport.escalation_level,
|
|
276
|
-
cycle_count: dimHistory.length,
|
|
277
|
-
trust_score: 0,
|
|
278
|
-
},
|
|
279
|
-
outcome: "pending",
|
|
280
|
-
timestamp: new Date().toISOString(),
|
|
281
|
-
what_worked: [],
|
|
282
|
-
what_failed: [],
|
|
283
|
-
suggested_next: [],
|
|
284
|
-
});
|
|
285
|
-
}
|
|
286
|
-
catch {
|
|
287
|
-
// non-fatal: never block the loop for decision recording
|
|
288
|
-
}
|
|
289
|
-
}
|
|
290
|
-
if (incrementDimName) {
|
|
291
|
-
await ctx.deps.stallDetector.incrementEscalation(goalId, incrementDimName);
|
|
292
|
-
}
|
|
293
|
-
}
|
|
294
|
-
/** Global stall detection: check all dimensions together, handle REFINE/PIVOT/ESCALATE. */
|
|
295
|
-
async function checkGlobalStall(ctx, goalId, goal, result, gapHistory) {
|
|
296
|
-
const allDimGaps = new Map();
|
|
297
|
-
for (const dim of goal.dimensions) {
|
|
298
|
-
const dimGapHistory = gapHistory
|
|
299
|
-
.filter((entry) => entry.gap_vector.some((g) => g.dimension_name === dim.name))
|
|
300
|
-
.map((entry) => {
|
|
301
|
-
const g = entry.gap_vector.find((g) => g.dimension_name === dim.name);
|
|
302
|
-
return { normalized_gap: g?.normalized_weighted_gap ?? 1 };
|
|
303
|
-
});
|
|
304
|
-
allDimGaps.set(dim.name, dimGapHistory);
|
|
305
|
-
}
|
|
306
|
-
const globalStall = ctx.deps.stallDetector.checkGlobalStall(goalId, allDimGaps);
|
|
307
|
-
if (!globalStall)
|
|
308
|
-
return;
|
|
309
|
-
result.stallDetected = true;
|
|
310
|
-
result.stallReport = globalStall;
|
|
311
|
-
const firstDimHistory = allDimGaps.values().next().value ?? [];
|
|
312
|
-
const firstDimName = goal.dimensions[0]?.name ?? "";
|
|
313
|
-
// Pass escalationLevel=1 so that escalationLevel+1=2, preserving the original global PIVOT level
|
|
314
|
-
await applyStallAction(ctx, goalId, goal, firstDimHistory, globalStall, 1, firstDimName, result, "global ");
|
|
315
|
-
}
|
|
316
|
-
/** Portfolio rebalance: check for rebalance triggers and handle wait strategy expiry. */
|
|
317
|
-
async function rebalancePortfolio(ctx, goalId, goal, result) {
|
|
318
|
-
if (!ctx.deps.portfolioManager)
|
|
319
|
-
return;
|
|
320
|
-
try {
|
|
321
|
-
const rebalanceTrigger = await ctx.deps.portfolioManager.shouldRebalance(goalId);
|
|
322
|
-
if (rebalanceTrigger) {
|
|
323
|
-
const rebalanceResult = await ctx.deps.portfolioManager.rebalance(goalId, rebalanceTrigger);
|
|
324
|
-
if (rebalanceResult.new_generation_needed) {
|
|
325
|
-
await ctx.deps.strategyManager.onStallDetected(goalId, 3, goal.origin ?? "general");
|
|
326
|
-
}
|
|
327
|
-
}
|
|
328
|
-
}
|
|
329
|
-
catch {
|
|
330
|
-
// Portfolio rebalance errors are non-fatal
|
|
331
|
-
}
|
|
332
|
-
try {
|
|
333
|
-
const portfolio = await ctx.deps.strategyManager.getPortfolio(goalId);
|
|
334
|
-
if (portfolio) {
|
|
335
|
-
for (const strategy of portfolio.strategies) {
|
|
336
|
-
if (ctx.deps.portfolioManager.isWaitStrategy(strategy)) {
|
|
337
|
-
// Gap 1: canAffordWait gate — if TimeHorizonEngine is available, check whether
|
|
338
|
-
// the goal can afford the wait before processing WaitStrategy expiry.
|
|
339
|
-
if (ctx.timeHorizonEngine) {
|
|
340
|
-
try {
|
|
341
|
-
const ws = strategy;
|
|
342
|
-
const waitUntil = typeof ws["wait_until"] === "string" ? ws["wait_until"] : null;
|
|
343
|
-
const startedAt = typeof ws["started_at"] === "string" ? ws["started_at"] : (goal.created_at ?? new Date().toISOString());
|
|
344
|
-
// Remaining wait time (not total): use now as reference so nearly-expired waits pass
|
|
345
|
-
const waitHours = waitUntil
|
|
346
|
-
? Math.max(0, (new Date(waitUntil).getTime() - Date.now()) / 3_600_000)
|
|
347
|
-
: 0;
|
|
348
|
-
const currentGap = result?.gapAggregate ?? 1;
|
|
349
|
-
const initialGap = typeof ws["gap_snapshot_at_start"] === "number" ? ws["gap_snapshot_at_start"] : currentGap;
|
|
350
|
-
// Compute an approximate velocity from gap progress and elapsed time.
|
|
351
|
-
// Fallback to a small positive value (0.01/h) when elapsed is too short to measure.
|
|
352
|
-
const elapsedHours = waitUntil
|
|
353
|
-
? Math.max(0, (Date.now() - new Date(startedAt).getTime()) / 3_600_000)
|
|
354
|
-
: 0;
|
|
355
|
-
const gapDelta = initialGap - currentGap;
|
|
356
|
-
const velocity = elapsedHours > 0.001 && gapDelta > 0
|
|
357
|
-
? gapDelta / elapsedHours
|
|
358
|
-
: 0.01; // conservative positive fallback; replace with real velocity when available
|
|
359
|
-
const budget = ctx.timeHorizonEngine.getTimeBudget(goal.deadline ?? null, startedAt, currentGap, initialGap, velocity);
|
|
360
|
-
if (!budget.canAffordWait(waitHours)) {
|
|
361
|
-
ctx.logger?.info("CoreLoop: canAffordWait=false, skipping WaitStrategy processing", {
|
|
362
|
-
goalId,
|
|
363
|
-
strategyId: strategy.id,
|
|
364
|
-
waitHours,
|
|
365
|
-
});
|
|
366
|
-
continue;
|
|
367
|
-
}
|
|
368
|
-
}
|
|
369
|
-
catch {
|
|
370
|
-
// Non-fatal: if canAffordWait check fails, proceed normally
|
|
371
|
-
}
|
|
372
|
-
}
|
|
373
|
-
const waitTrigger = await ctx.deps.portfolioManager.handleWaitStrategyExpiry(goalId, strategy.id);
|
|
374
|
-
if (waitTrigger) {
|
|
375
|
-
await ctx.deps.portfolioManager.rebalance(goalId, waitTrigger);
|
|
376
|
-
if (result) {
|
|
377
|
-
result.waitExpired = true;
|
|
378
|
-
result.waitStrategyId = strategy.id;
|
|
379
|
-
}
|
|
380
|
-
}
|
|
381
|
-
}
|
|
382
|
-
}
|
|
383
|
-
}
|
|
384
|
-
}
|
|
385
|
-
catch {
|
|
386
|
-
// WaitStrategy expiry errors are non-fatal
|
|
387
|
-
}
|
|
388
|
-
}
|
|
389
|
-
// ─── Phase 6b ───
|
|
390
|
-
/** Check dependency graph block.
|
|
391
|
-
* Returns true if goal is blocked (result.error set, caller should return). */
|
|
392
|
-
export function checkDependencyBlock(ctx, goalId, result) {
|
|
393
|
-
if (ctx.deps.goalDependencyGraph) {
|
|
394
|
-
try {
|
|
395
|
-
if (ctx.deps.goalDependencyGraph.isBlocked(goalId)) {
|
|
396
|
-
const blockingGoals = ctx.deps.goalDependencyGraph.getBlockingGoals(goalId);
|
|
397
|
-
result.error = `Goal ${goalId} is blocked by prerequisites: ${blockingGoals.join(", ")}`;
|
|
398
|
-
return true;
|
|
399
|
-
}
|
|
400
|
-
}
|
|
401
|
-
catch {
|
|
402
|
-
// Dependency graph errors are non-fatal
|
|
403
|
-
}
|
|
404
|
-
}
|
|
405
|
-
return false;
|
|
406
|
-
}
|
|
407
|
-
/** Collect context, run task cycle, handle capability acquisition,
|
|
408
|
-
* transfer detection, and post-task completion re-check.
|
|
409
|
-
* Returns true on success, false if the caller should return result early.
|
|
410
|
-
* `transferCheckCounter` is incremented via the callback to keep mutable state on CoreLoop. */
|
|
411
|
-
export async function runTaskCycleWithContext(ctx, goalId, goal, gapVector, driveScores, highDissatisfactionDimensions, loopIndex, result, startTime, callbacks) {
|
|
412
|
-
const { handleCapabilityAcquisition, incrementTransferCounter, tryGenerateReport } = callbacks;
|
|
413
|
-
try {
|
|
414
|
-
const taskStartTime = Date.now();
|
|
415
|
-
const driveContext = buildDriveContext(goal);
|
|
416
|
-
const adapter = ctx.deps.adapterRegistry.getAdapter(ctx.config.adapterType);
|
|
417
|
-
// Portfolio: select strategy for next task
|
|
418
|
-
if (ctx.deps.portfolioManager) {
|
|
419
|
-
try {
|
|
420
|
-
const selectionResult = await ctx.deps.portfolioManager.selectNextStrategyForTask(goalId);
|
|
421
|
-
if (selectionResult) {
|
|
422
|
-
ctx.deps.taskLifecycle.setOnTaskComplete((strategyId) => {
|
|
423
|
-
ctx.deps.portfolioManager?.recordTaskCompletion(strategyId);
|
|
424
|
-
});
|
|
425
|
-
}
|
|
426
|
-
}
|
|
427
|
-
catch {
|
|
428
|
-
// Portfolio strategy selection is non-fatal
|
|
429
|
-
}
|
|
430
|
-
}
|
|
431
|
-
// Collect knowledge context
|
|
432
|
-
let knowledgeContext;
|
|
433
|
-
if (ctx.deps.knowledgeManager) {
|
|
434
|
-
try {
|
|
435
|
-
const topDimension = driveScores[0]?.dimension_name ?? goal.dimensions[0]?.name;
|
|
436
|
-
if (topDimension) {
|
|
437
|
-
const entries = await ctx.deps.knowledgeManager.getRelevantKnowledge(goalId, topDimension);
|
|
438
|
-
if (entries.length > 0) {
|
|
439
|
-
knowledgeContext = entries
|
|
440
|
-
.map((e) => `Q: ${e.question}\nA: ${e.answer}`)
|
|
441
|
-
.join("\n\n");
|
|
442
|
-
}
|
|
443
|
-
}
|
|
444
|
-
}
|
|
445
|
-
catch {
|
|
446
|
-
// Knowledge retrieval failure is non-fatal
|
|
447
|
-
}
|
|
448
|
-
}
|
|
449
|
-
// Tier-aware memory selection: use highDissatisfactionDimensions and dynamic budget
|
|
450
|
-
if (ctx.deps.memoryLifecycleManager) {
|
|
451
|
-
try {
|
|
452
|
-
const dimensions = goal.dimensions.map((d) => d.name);
|
|
453
|
-
const maxDissatisfaction = driveScores.length > 0
|
|
454
|
-
? Math.max(...driveScores.map((s) => s.dissatisfaction))
|
|
455
|
-
: 0;
|
|
456
|
-
const satisfiedDimensions = goal.dimensions
|
|
457
|
-
.filter((d) => !result.completionJudgment?.blocking_dimensions.includes(d.name))
|
|
458
|
-
.map((d) => d.name);
|
|
459
|
-
await ctx.deps.memoryLifecycleManager.selectForWorkingMemoryTierAware(goalId, dimensions, [], 10, [goalId], [], satisfiedDimensions, highDissatisfactionDimensions, maxDissatisfaction);
|
|
460
|
-
}
|
|
461
|
-
catch {
|
|
462
|
-
// Memory selection failure is non-fatal
|
|
463
|
-
}
|
|
464
|
-
}
|
|
465
|
-
// Fetch existing tasks for dedup context
|
|
466
|
-
let existingTasks;
|
|
467
|
-
if (adapter.listExistingTasks) {
|
|
468
|
-
try {
|
|
469
|
-
existingTasks = await adapter.listExistingTasks();
|
|
470
|
-
}
|
|
471
|
-
catch {
|
|
472
|
-
// Non-fatal: proceed without existing tasks context
|
|
473
|
-
}
|
|
474
|
-
}
|
|
475
|
-
// Collect workspace context
|
|
476
|
-
let workspaceContext;
|
|
477
|
-
if (ctx.deps.contextProvider) {
|
|
478
|
-
try {
|
|
479
|
-
const topDimension = driveScores[0]?.dimension_name ?? goal.dimensions[0]?.name ?? "";
|
|
480
|
-
workspaceContext = await ctx.deps.contextProvider(goalId, topDimension);
|
|
481
|
-
}
|
|
482
|
-
catch {
|
|
483
|
-
// Non-fatal: proceed without workspace context
|
|
484
|
-
}
|
|
485
|
-
}
|
|
486
|
-
ctx.logger?.debug("CoreLoop: running task cycle", { adapter: adapter.adapterType, goalId });
|
|
487
|
-
ctx.deps.onProgress?.({
|
|
488
|
-
iteration: loopIndex + 1,
|
|
489
|
-
maxIterations: ctx.config.maxIterations,
|
|
490
|
-
phase: "Executing task...",
|
|
491
|
-
gap: result.gapAggregate,
|
|
492
|
-
});
|
|
493
|
-
const taskResult = await ctx.deps.taskLifecycle.runTaskCycle(goalId, gapVector, driveContext, adapter, knowledgeContext, existingTasks, workspaceContext);
|
|
494
|
-
ctx.logger?.info("CoreLoop: task cycle result", { action: taskResult.action, taskId: taskResult.task.id });
|
|
495
|
-
result.taskResult = taskResult;
|
|
496
|
-
result.tokensUsed = (result.tokensUsed ?? 0) + (taskResult.tokensUsed ?? 0);
|
|
497
|
-
ctx.deps.onProgress?.({
|
|
498
|
-
iteration: loopIndex + 1,
|
|
499
|
-
maxIterations: ctx.config.maxIterations,
|
|
500
|
-
phase: "Verifying result...",
|
|
501
|
-
gap: result.gapAggregate,
|
|
502
|
-
taskDescription: taskResult.task.work_description
|
|
503
|
-
? taskResult.task.work_description.split("\n")[0]?.slice(0, 80)
|
|
504
|
-
: undefined,
|
|
505
|
-
});
|
|
506
|
-
// Handle capability_acquiring
|
|
507
|
-
if (taskResult.action === "capability_acquiring" && taskResult.acquisition_task) {
|
|
508
|
-
await handleCapabilityAcquisition(taskResult.acquisition_task, goalId, adapter);
|
|
509
|
-
}
|
|
510
|
-
// Portfolio: record task completion
|
|
511
|
-
if (ctx.deps.portfolioManager && taskResult.action === "completed" && taskResult.task.strategy_id) {
|
|
512
|
-
try {
|
|
513
|
-
ctx.deps.portfolioManager.recordTaskCompletion(taskResult.task.strategy_id);
|
|
514
|
-
}
|
|
515
|
-
catch {
|
|
516
|
-
// Non-fatal
|
|
517
|
-
}
|
|
518
|
-
}
|
|
519
|
-
// Phase 7: tool-based verification (Layer 1)
|
|
520
|
-
if (ctx.toolExecutor && taskResult.task.success_criteria.length > 0) {
|
|
521
|
-
try {
|
|
522
|
-
const toolCtx = await buildLoopToolContext(ctx, goalId);
|
|
523
|
-
const verificationResult = await verifyWithTools(taskResult.task.success_criteria, ctx.toolExecutor, toolCtx);
|
|
524
|
-
if (!verificationResult.mechanicalPassed) {
|
|
525
|
-
taskResult.verificationResult = { ...taskResult.verificationResult, verdict: "fail" };
|
|
526
|
-
ctx.logger?.info("CoreLoop Phase 7: tool verification failed", {
|
|
527
|
-
taskId: taskResult.task.id,
|
|
528
|
-
details: verificationResult.details,
|
|
529
|
-
});
|
|
530
|
-
}
|
|
531
|
-
result.toolVerification = verificationResult;
|
|
532
|
-
// Feed execution results back to strategy for scoring
|
|
533
|
-
if (typeof ctx.deps.strategyManager.recordExecutionFeedback === 'function') {
|
|
534
|
-
const activeStrat = await ctx.deps.strategyManager.getActiveStrategy(goalId);
|
|
535
|
-
if (activeStrat) {
|
|
536
|
-
ctx.deps.strategyManager.recordExecutionFeedback({
|
|
537
|
-
strategyId: activeStrat.hypothesis,
|
|
538
|
-
taskId: taskResult.task?.id ?? 'unknown',
|
|
539
|
-
success: taskResult.action === 'completed',
|
|
540
|
-
verificationPassed: verificationResult.mechanicalPassed,
|
|
541
|
-
duration_ms: Date.now() - taskStartTime,
|
|
542
|
-
timestamp: Date.now(),
|
|
543
|
-
});
|
|
544
|
-
}
|
|
545
|
-
}
|
|
546
|
-
}
|
|
547
|
-
catch (err) {
|
|
548
|
-
ctx.logger?.warn("CoreLoop Phase 7: tool verification threw (non-fatal)", {
|
|
549
|
-
error: err instanceof Error ? err.message : String(err),
|
|
550
|
-
});
|
|
551
|
-
}
|
|
552
|
-
}
|
|
553
|
-
// Re-check completion after task execution
|
|
554
|
-
const updatedGoal = await ctx.deps.stateManager.loadGoal(goalId);
|
|
555
|
-
if (updatedGoal) {
|
|
556
|
-
const postTaskJudgment = updatedGoal.children_ids.length > 0
|
|
557
|
-
? await ctx.deps.satisficingJudge.judgeTreeCompletion(updatedGoal.id)
|
|
558
|
-
: ctx.deps.satisficingJudge.isGoalComplete(updatedGoal);
|
|
559
|
-
result.completionJudgment = postTaskJudgment;
|
|
560
|
-
}
|
|
561
|
-
}
|
|
562
|
-
catch (err) {
|
|
563
|
-
result.error = `Task cycle failed: ${err instanceof Error ? err.message : String(err)}`;
|
|
564
|
-
ctx.logger?.error(`CoreLoop: ${result.error}`, { goalId });
|
|
565
|
-
result.elapsedMs = Date.now() - startTime;
|
|
566
|
-
tryGenerateReport(goalId, loopIndex, result, goal);
|
|
567
|
-
return false;
|
|
568
|
-
}
|
|
569
|
-
// Track curiosity goal loop count
|
|
570
|
-
if (ctx.deps.curiosityEngine) {
|
|
571
|
-
const currentGoal = await ctx.deps.stateManager.loadGoal(goalId);
|
|
572
|
-
if (currentGoal?.origin === "curiosity") {
|
|
573
|
-
ctx.deps.curiosityEngine.incrementLoopCount(goalId);
|
|
574
|
-
}
|
|
575
|
-
}
|
|
576
|
-
// Transfer Detection (every 5 iterations, suggestion-only)
|
|
577
|
-
const transferCount = incrementTransferCounter();
|
|
578
|
-
if (ctx.deps.knowledgeTransfer && transferCount % 5 === 0) {
|
|
579
|
-
try {
|
|
580
|
-
const candidates = await ctx.deps.knowledgeTransfer.detectTransferOpportunities(goalId);
|
|
581
|
-
if (candidates.length > 0) {
|
|
582
|
-
result.transfer_candidates = candidates;
|
|
583
|
-
}
|
|
584
|
-
}
|
|
585
|
-
catch {
|
|
586
|
-
// non-fatal
|
|
587
|
-
}
|
|
588
|
-
}
|
|
589
|
-
return true;
|
|
590
|
-
}
|
|
1
|
+
export * from "./core-loop/task-cycle.js";
|
|
591
2
|
//# sourceMappingURL=core-loop-phases-b.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"core-loop-phases-b.js","sourceRoot":"","sources":["../../../src/orchestrator/loop/core-loop-phases-b.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAKzC,OAAO,EACL,iBAAiB,GAElB,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EACL,aAAa,EACb,YAAY,GACb,MAAM,gCAAgC,CAAC;AACxC,OAAO,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAC1D,OAAO,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAC3D,OAAO,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAE7D,kBAAkB;AAElB;yEACyE;AACzE,MAAM,CAAC,KAAK,UAAU,4BAA4B,CAChD,GAAa,EACb,MAAc,EACd,IAAU,EACV,MAA2B,EAC3B,SAAiB;IAEjB,4DAA4D;IAC5D,IAAI,CAAC;QACH,MAAM,QA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ED,2DAA2D;IAC3D,MAAM,aAAa,GAAG,wBAAwB,EAAE,CAAC;IACjD,IAAI,GAAG,CAAC,IAAI,CAAC,iBAAiB,IAAI,aAAa,GAAG,CAAC,KAAK,CAAC,EAAE,CAAC;QAC1D,IAAI,CAAC;YACH,MAAM,UAAU,GAAG,MAAM,GAAG,CAAC,IAAI,CAAC,iBAAiB,CAAC,2BAA2B,CAAC,MAAM,CAAC,CAAC;YACxF,IAAI,UAAU,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;gBAC1B,MAAM,CAAC,mBAAmB,GAAG,UAAU,CAAC;YAC1C,CAAC;QACH,CAAC;QAAC,MAAM,CAAC;YACP,YAAY;QACd,CAAC;IACH,CAAC;IAED,OAAO,IAAI,CAAC;AACd,CAAC"}
|
|
1
|
+
{"version":3,"file":"core-loop-phases-b.js","sourceRoot":"","sources":["../../../src/orchestrator/loop/core-loop-phases-b.ts"],"names":[],"mappings":"AAAA,cAAc,2BAA2B,CAAC"}
|
|
@@ -1,27 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
import type { StateDiffCalculator, IterationSnapshot } from "./state-diff.js";
|
|
3
|
-
import type { ResolvedLoopConfig, LoopIterationResult, CoreLoopDeps } from "./core-loop-types.js";
|
|
4
|
-
import type { Goal } from "../../base/types/goal.js";
|
|
5
|
-
export interface StateDiffState {
|
|
6
|
-
previousSnapshot: IterationSnapshot | null;
|
|
7
|
-
consecutiveSkips: number;
|
|
8
|
-
}
|
|
9
|
-
/**
|
|
10
|
-
* Runs the state diff check for a loop iteration.
|
|
11
|
-
*
|
|
12
|
-
* Returns an object indicating whether to skip the rest of the iteration.
|
|
13
|
-
* When `shouldSkip` is true, `result` has been fully populated with skip info
|
|
14
|
-
* and the caller should return it immediately.
|
|
15
|
-
* When `shouldSkip` is false, the loop should continue normally.
|
|
16
|
-
*/
|
|
17
|
-
export declare function runStateDiffCheck(stateDiff: StateDiffCalculator, stateDiffStateMap: Map<string, StateDiffState>, goalId: string, goal: Goal, loopIndex: number, config: ResolvedLoopConfig, deps: CoreLoopDeps, result: LoopIterationResult, startTime: number, logger?: Logger): Promise<{
|
|
18
|
-
shouldSkip: boolean;
|
|
19
|
-
}>;
|
|
20
|
-
/**
|
|
21
|
-
* Attempts to run the iteration in parallel (TaskGroup mode).
|
|
22
|
-
*
|
|
23
|
-
* Returns `true` if the parallel path was taken (caller should return result),
|
|
24
|
-
* `false` if parallel was skipped/unavailable (fall through to normal task cycle).
|
|
25
|
-
*/
|
|
26
|
-
export declare function tryParallelExecution(goalId: string, goal: Goal, gapAggregate: number, result: LoopIterationResult, startTime: number, deps: CoreLoopDeps, loopIndex: number, logger?: Logger): Promise<boolean>;
|
|
1
|
+
export * from "./core-loop/control.js";
|
|
27
2
|
//# sourceMappingURL=core-loop-phases-c.d.ts.map
|