pulseed 0.4.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/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 +1 -4
- package/dist/base/state/state-manager.d.ts.map +1 -1
- package/dist/base/state/state-manager.js +18 -127
- package/dist/base/state/state-manager.js.map +1 -1
- package/dist/interface/chat/chat-runner.d.ts +1 -1
- package/dist/interface/chat/event-subscriber.d.ts +4 -0
- package/dist/interface/chat/event-subscriber.d.ts.map +1 -1
- package/dist/interface/chat/event-subscriber.js +49 -2
- package/dist/interface/chat/event-subscriber.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.js +2 -2
- package/dist/interface/cli/commands/daemon.d.ts.map +1 -1
- package/dist/interface/cli/commands/daemon.js +87 -44
- package/dist/interface/cli/commands/daemon.js.map +1 -1
- package/dist/interface/cli/commands/schedule.js +2 -2
- 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/tui/app.d.ts +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 +7 -236
- package/dist/interface/tui/chat.js.map +1 -1
- package/dist/interface/tui/entry.js +3 -3
- package/dist/interface/tui/use-loop.d.ts +1 -1
- package/dist/orchestrator/execution/task/task-lifecycle.d.ts +3 -0
- package/dist/orchestrator/execution/task/task-lifecycle.d.ts.map +1 -1
- package/dist/orchestrator/execution/task/task-lifecycle.js +3 -0
- package/dist/orchestrator/execution/task/task-lifecycle.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 +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/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 -24
- package/dist/orchestrator/loop/core-loop-capability.d.ts.map +1 -1
- package/dist/orchestrator/loop/core-loop-capability.js +1 -153
- 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 -31
- package/dist/orchestrator/loop/core-loop-phases-b.d.ts.map +1 -1
- package/dist/orchestrator/loop/core-loop-phases-b.js +1 -669
- 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 -244
- package/dist/orchestrator/loop/core-loop-types.d.ts.map +1 -1
- package/dist/orchestrator/loop/core-loop-types.js +1 -39
- package/dist/orchestrator/loop/core-loop-types.js.map +1 -1
- package/dist/orchestrator/loop/core-loop.d.ts +3 -3
- package/dist/orchestrator/loop/core-loop.d.ts.map +1 -1
- package/dist/orchestrator/loop/core-loop.js +6 -6
- 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/parallel-dispatch.d.ts +2 -2
- package/dist/orchestrator/loop/parallel-dispatch.d.ts.map +1 -1
- package/dist/orchestrator/loop/post-loop-hooks.d.ts +1 -1
- package/dist/orchestrator/loop/post-loop-hooks.d.ts.map +1 -1
- package/dist/orchestrator/loop/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/platform/dream/dream-schedule-suggestions.d.ts +1 -1
- 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/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/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/runtime/approval-broker.d.ts.map +1 -1
- package/dist/runtime/approval-broker.js +1 -0
- package/dist/runtime/approval-broker.js.map +1 -1
- 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 -231
- package/dist/runtime/daemon-runner.d.ts.map +1 -1
- package/dist/runtime/daemon-runner.js +1 -1042
- 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 -91
- package/dist/runtime/event-server.d.ts.map +1 -1
- package/dist/runtime/event-server.js +1 -698
- package/dist/runtime/event-server.js.map +1 -1
- package/dist/runtime/executor/loop-supervisor.d.ts +9 -5
- package/dist/runtime/executor/loop-supervisor.d.ts.map +1 -1
- package/dist/runtime/executor/loop-supervisor.js +59 -76
- package/dist/runtime/executor/loop-supervisor.js.map +1 -1
- package/dist/runtime/gateway/http-channel-adapter.d.ts +1 -1
- package/dist/runtime/plugin-loader.d.ts +1 -1
- package/dist/runtime/queue/index.d.ts +0 -4
- package/dist/runtime/queue/index.d.ts.map +1 -1
- package/dist/runtime/queue/index.js +0 -2
- package/dist/runtime/queue/index.js.map +1 -1
- package/dist/runtime/queue/journal-backed-queue.d.ts.map +1 -1
- package/dist/runtime/queue/journal-backed-queue.js +2 -0
- package/dist/runtime/queue/journal-backed-queue.js.map +1 -1
- 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 -43
- package/dist/runtime/schedule-engine-layers.d.ts.map +1 -1
- package/dist/runtime/schedule-engine-layers.js +1 -432
- package/dist/runtime/schedule-engine-layers.js.map +1 -1
- package/dist/runtime/schedule-engine.d.ts +1 -81
- package/dist/runtime/schedule-engine.d.ts.map +1 -1
- package/dist/runtime/schedule-engine.js +1 -479
- package/dist/runtime/schedule-engine.js.map +1 -1
- package/dist/runtime/schedule-presets.d.ts +1 -535
- package/dist/runtime/schedule-presets.d.ts.map +1 -1
- package/dist/runtime/schedule-presets.js +1 -165
- package/dist/runtime/schedule-presets.js.map +1 -1
- 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/types/daemon.d.ts.map +1 -1
- package/dist/runtime/types/daemon.js +2 -1
- package/dist/runtime/types/daemon.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 +1 -1
- package/dist/tools/schedule/CreateScheduleTool/CreateScheduleTool.d.ts +1 -1
- package/dist/tools/schedule/CreateScheduleTool/CreateScheduleTool.js +1 -1
- package/dist/tools/schedule/GetScheduleTool/GetScheduleTool.d.ts +1 -1
- package/dist/tools/schedule/ListSchedulesTool/ListSchedulesTool.d.ts +1 -1
- package/dist/tools/schedule/PauseScheduleTool/PauseScheduleTool.d.ts +1 -1
- package/dist/tools/schedule/RemoveScheduleTool/RemoveScheduleTool.d.ts +1 -1
- package/dist/tools/schedule/ResumeScheduleTool/ResumeScheduleTool.d.ts +1 -1
- package/dist/tools/schedule/UpdateScheduleTool/UpdateScheduleTool.d.ts +1 -1
- package/package.json +1 -1
|
@@ -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;AACzC,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAKlC,OAAO,EAAE,cAAc,EAAE,MAAM,6CAA6C,CAAC;AAC7E,OAAO,EAAE,wBAAwB,EAAE,2BAA2B,EAAE,MAAM,0CAA0C,CAAC;AACjH,OAAO,EACL,iBAAiB,GAElB,MAAM,sBAAsB,CAAC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,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
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"core-loop-phases-c.d.ts","sourceRoot":"","sources":["../../../src/orchestrator/loop/core-loop-phases-c.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"core-loop-phases-c.d.ts","sourceRoot":"","sources":["../../../src/orchestrator/loop/core-loop-phases-c.ts"],"names":[],"mappings":"AAAA,cAAc,wBAAwB,CAAC"}
|
|
@@ -1,72 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
import { generateLoopReport } from "./loop-report-helper.js";
|
|
3
|
-
/**
|
|
4
|
-
* Runs the state diff check for a loop iteration.
|
|
5
|
-
*
|
|
6
|
-
* Returns an object indicating whether to skip the rest of the iteration.
|
|
7
|
-
* When `shouldSkip` is true, `result` has been fully populated with skip info
|
|
8
|
-
* and the caller should return it immediately.
|
|
9
|
-
* When `shouldSkip` is false, the loop should continue normally.
|
|
10
|
-
*/
|
|
11
|
-
export async function runStateDiffCheck(stateDiff, stateDiffStateMap, goalId, goal, loopIndex, config, deps, result, startTime, logger) {
|
|
12
|
-
const diffState = stateDiffStateMap.get(goalId) ?? { previousSnapshot: null, consecutiveSkips: 0 };
|
|
13
|
-
const snapshot = stateDiff.buildSnapshot(goal, loopIndex);
|
|
14
|
-
const diff = stateDiff.compare(diffState.previousSnapshot, snapshot);
|
|
15
|
-
diffState.previousSnapshot = snapshot;
|
|
16
|
-
if (!diff.hasChange && diffState.consecutiveSkips < config.maxConsecutiveSkips) {
|
|
17
|
-
diffState.consecutiveSkips++;
|
|
18
|
-
stateDiffStateMap.set(goalId, diffState);
|
|
19
|
-
logger?.info(`[CoreLoop] iteration ${loopIndex} skipped: no state change detected ` +
|
|
20
|
-
`(consecutiveSkips=${diffState.consecutiveSkips}/${config.maxConsecutiveSkips})`, { goalId });
|
|
21
|
-
result.skipped = true;
|
|
22
|
-
result.skipReason = "no_state_change";
|
|
23
|
-
deps.onProgress?.({
|
|
24
|
-
iteration: loopIndex + 1,
|
|
25
|
-
maxIterations: config.maxIterations,
|
|
26
|
-
phase: "Skipped",
|
|
27
|
-
skipReason: result.skipReason,
|
|
28
|
-
});
|
|
29
|
-
// Carry forward completion status from the already-loaded goal so a
|
|
30
|
-
// completed goal is not forced through 5 more iterations.
|
|
31
|
-
const goalState = await deps.stateManager.loadGoal(goalId);
|
|
32
|
-
if (goalState?.status === "completed") {
|
|
33
|
-
result.completionJudgment.is_complete = true;
|
|
34
|
-
}
|
|
35
|
-
deps.onProgress?.({
|
|
36
|
-
iteration: loopIndex + 1,
|
|
37
|
-
maxIterations: config.maxIterations,
|
|
38
|
-
phase: "Skipped (no state change)",
|
|
39
|
-
});
|
|
40
|
-
result.elapsedMs = Date.now() - startTime;
|
|
41
|
-
return { shouldSkip: true };
|
|
42
|
-
}
|
|
43
|
-
// Reset skip counter — full loop is running
|
|
44
|
-
diffState.consecutiveSkips = 0;
|
|
45
|
-
stateDiffStateMap.set(goalId, diffState);
|
|
46
|
-
if (!diff.hasChange) {
|
|
47
|
-
logger?.info(`[CoreLoop] max consecutive skips reached (${config.maxConsecutiveSkips}), ` +
|
|
48
|
-
"forcing full iteration for stall detection", { goalId });
|
|
49
|
-
}
|
|
50
|
-
return { shouldSkip: false };
|
|
51
|
-
}
|
|
52
|
-
// ─── Parallel execution check ───
|
|
53
|
-
/**
|
|
54
|
-
* Attempts to run the iteration in parallel (TaskGroup mode).
|
|
55
|
-
*
|
|
56
|
-
* Returns `true` if the parallel path was taken (caller should return result),
|
|
57
|
-
* `false` if parallel was skipped/unavailable (fall through to normal task cycle).
|
|
58
|
-
*/
|
|
59
|
-
export async function tryParallelExecution(goalId, goal, gapAggregate, result, startTime, deps, loopIndex, logger) {
|
|
60
|
-
if (!deps.parallelExecutor || !deps.generateTaskGroupFn) {
|
|
61
|
-
return false;
|
|
62
|
-
}
|
|
63
|
-
const parallelResult = await tryRunParallel(goalId, goal, gapAggregate, result, startTime, deps, logger);
|
|
64
|
-
if (parallelResult !== null) {
|
|
65
|
-
// Parallel path completed — skip normal task cycle
|
|
66
|
-
await generateLoopReport(goalId, loopIndex, result, goal, deps.reportingEngine, logger);
|
|
67
|
-
result.elapsedMs = Date.now() - startTime;
|
|
68
|
-
return true;
|
|
69
|
-
}
|
|
70
|
-
return false;
|
|
71
|
-
}
|
|
1
|
+
export * from "./core-loop/control.js";
|
|
72
2
|
//# sourceMappingURL=core-loop-phases-c.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"core-loop-phases-c.js","sourceRoot":"","sources":["../../../src/orchestrator/loop/core-loop-phases-c.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"core-loop-phases-c.js","sourceRoot":"","sources":["../../../src/orchestrator/loop/core-loop-phases-c.ts"],"names":[],"mappings":"AAAA,cAAc,wBAAwB,CAAC"}
|
|
@@ -1,69 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
* core-loop-phases.ts
|
|
3
|
-
*
|
|
4
|
-
* Phases 1–4 of CoreLoop.runOneIteration() as standalone functions.
|
|
5
|
-
* Each function accepts a PhaseCtx (deps + config + logger) plus phase-specific
|
|
6
|
-
* parameters. They mutate `result` by reference and return values as documented.
|
|
7
|
-
*
|
|
8
|
-
* Phases 5–7 are in core-loop-phases-b.ts.
|
|
9
|
-
*/
|
|
10
|
-
import type { Logger } from "../../runtime/logger.js";
|
|
11
|
-
import type { ToolExecutor } from "../../tools/executor.js";
|
|
12
|
-
import type { Goal } from "../../base/types/goal.js";
|
|
13
|
-
import type { GapVector } from "../../base/types/gap.js";
|
|
14
|
-
import type { DriveScore } from "../../base/types/drive.js";
|
|
15
|
-
import { type CoreLoopDeps, type ResolvedLoopConfig, type LoopIterationResult } from "./core-loop-types.js";
|
|
16
|
-
/** Minimal context passed to every phase function. */
|
|
17
|
-
export interface PhaseCtx {
|
|
18
|
-
deps: CoreLoopDeps;
|
|
19
|
-
config: ResolvedLoopConfig;
|
|
20
|
-
logger: Logger | undefined;
|
|
21
|
-
toolExecutor?: ToolExecutor;
|
|
22
|
-
/**
|
|
23
|
-
* Optional TimeHorizonEngine for canAffordWait gate in rebalancePortfolio (Gap 1).
|
|
24
|
-
* When present, WaitStrategy processing is skipped if the engine reports the goal
|
|
25
|
-
* cannot afford to wait given the remaining time budget.
|
|
26
|
-
*/
|
|
27
|
-
timeHorizonEngine?: import('../../platform/time/time-horizon-engine.js').ITimeHorizonEngine;
|
|
28
|
-
}
|
|
29
|
-
/** Load goal from state, apply tree aggregation if applicable.
|
|
30
|
-
* Returns the loaded Goal, or null if an error occurred (result is mutated). */
|
|
31
|
-
export declare function loadGoalWithAggregation(ctx: PhaseCtx, goalId: string, result: LoopIterationResult, startTime: number): Promise<Goal | null>;
|
|
32
|
-
/**
|
|
33
|
-
* Automatically decompose an abstract goal into sub-goals using
|
|
34
|
-
* TreeLoopOrchestrator.ensureGoalRefined(). Skipped when disabled,
|
|
35
|
-
* when the goal already has children, or when the goal is a leaf.
|
|
36
|
-
* Only root goals (decomposition_depth === 0) are auto-decomposed to
|
|
37
|
-
* prevent recursive decomposition of child nodes.
|
|
38
|
-
* Specificity checks are delegated to ensureGoalRefined internally.
|
|
39
|
-
*
|
|
40
|
-
* @param decomposedGoals - Set of goal IDs already decomposed this run.
|
|
41
|
-
* When provided, goals already in the set are skipped and the goal ID is
|
|
42
|
-
* added to the set after a successful decomposition attempt.
|
|
43
|
-
*/
|
|
44
|
-
export declare function phaseAutoDecompose(goalId: string, goal: Goal, deps: CoreLoopDeps, config: ResolvedLoopConfig, logger: Logger | undefined, decomposedGoals?: Set<string>, isFirstIteration?: boolean): Promise<void>;
|
|
45
|
-
/** Build a ToolCallContext from PhaseCtx for CoreLoop autonomous tool calls. */
|
|
46
|
-
export declare function buildLoopToolContext(ctx: PhaseCtx, goalId: string): Promise<import("../../tools/types.js").ToolCallContext>;
|
|
47
|
-
/** Run observation engine, reload goal after observation.
|
|
48
|
-
* Observation failure is non-fatal — returns current goal state.
|
|
49
|
-
* When ctx.toolExecutor is present, routes through the observe-goal tool first
|
|
50
|
-
* and falls back to direct engine.observe() on tool failure. */
|
|
51
|
-
export declare function observeAndReload(ctx: PhaseCtx, goalId: string, goal: Goal, loopIndex: number): Promise<Goal>;
|
|
52
|
-
/** Calculate gap vector and aggregate.
|
|
53
|
-
* Returns null on error.
|
|
54
|
-
* When gap === 0, returns the gap result with skipTaskGeneration=true so the
|
|
55
|
-
* caller continues to Phase 5 (SatisficingJudge) instead of short-circuiting.
|
|
56
|
-
*/
|
|
57
|
-
export declare function calculateGapOrComplete(ctx: PhaseCtx, goalId: string, goal: Goal, loopIndex: number, result: LoopIterationResult, startTime: number): Promise<{
|
|
58
|
-
gapVector: GapVector;
|
|
59
|
-
gapAggregate: number;
|
|
60
|
-
skipTaskGeneration?: boolean;
|
|
61
|
-
} | null>;
|
|
62
|
-
/** Score drives, update DriveScoreAdapter, check knowledge gap.
|
|
63
|
-
* Returns ranked DriveScores with highDissatisfactionDimensions, or null if the caller should
|
|
64
|
-
* return result early (knowledge gap task generated or drive scoring failed). */
|
|
65
|
-
export declare function scoreDrivesAndCheckKnowledge(ctx: PhaseCtx, goalId: string, goal: Goal, gapVector: GapVector, loopIndex: number, result: LoopIterationResult, startTime: number, tryGenerateReport: (goalId: string, loopIndex: number, result: LoopIterationResult, goal: Goal) => void): Promise<{
|
|
66
|
-
driveScores: DriveScore[];
|
|
67
|
-
highDissatisfactionDimensions: string[];
|
|
68
|
-
} | null>;
|
|
1
|
+
export * from "./core-loop/preparation.js";
|
|
69
2
|
//# sourceMappingURL=core-loop-phases.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"core-loop-phases.d.ts","sourceRoot":"","sources":["../../../src/orchestrator/loop/core-loop-phases.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"core-loop-phases.d.ts","sourceRoot":"","sources":["../../../src/orchestrator/loop/core-loop-phases.ts"],"names":[],"mappings":"AAAA,cAAc,4BAA4B,CAAC"}
|
|
@@ -1,368 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
* core-loop-phases.ts
|
|
3
|
-
*
|
|
4
|
-
* Phases 1–4 of CoreLoop.runOneIteration() as standalone functions.
|
|
5
|
-
* Each function accepts a PhaseCtx (deps + config + logger) plus phase-specific
|
|
6
|
-
* parameters. They mutate `result` by reference and return values as documented.
|
|
7
|
-
*
|
|
8
|
-
* Phases 5–7 are in core-loop-phases-b.ts.
|
|
9
|
-
*/
|
|
10
|
-
import { buildDriveContext, } from "./core-loop-types.js";
|
|
11
|
-
import { logRewardComputation } from "../../platform/drive/reward-log.js";
|
|
12
|
-
// ─── Phase 1 ───
|
|
13
|
-
/** Load goal from state, apply tree aggregation if applicable.
|
|
14
|
-
* Returns the loaded Goal, or null if an error occurred (result is mutated). */
|
|
15
|
-
export async function loadGoalWithAggregation(ctx, goalId, result, startTime) {
|
|
16
|
-
let goal;
|
|
17
|
-
try {
|
|
18
|
-
const loaded = await ctx.deps.stateManager.loadGoal(goalId);
|
|
19
|
-
if (!loaded) {
|
|
20
|
-
result.error = `Goal "${goalId}" not found`;
|
|
21
|
-
result.elapsedMs = Date.now() - startTime;
|
|
22
|
-
return null;
|
|
23
|
-
}
|
|
24
|
-
goal = loaded;
|
|
25
|
-
}
|
|
26
|
-
catch (err) {
|
|
27
|
-
result.error = `Failed to load goal: ${err instanceof Error ? err.message : String(err)}`;
|
|
28
|
-
ctx.logger?.error(`CoreLoop: ${result.error}`, { goalId });
|
|
29
|
-
result.elapsedMs = Date.now() - startTime;
|
|
30
|
-
return null;
|
|
31
|
-
}
|
|
32
|
-
// Tree aggregation
|
|
33
|
-
if (ctx.deps.stateAggregator && goal.children_ids.length > 0) {
|
|
34
|
-
try {
|
|
35
|
-
await ctx.deps.stateAggregator.aggregateChildStates(goalId);
|
|
36
|
-
const reloaded = await ctx.deps.stateManager.loadGoal(goalId);
|
|
37
|
-
if (reloaded)
|
|
38
|
-
goal = reloaded;
|
|
39
|
-
}
|
|
40
|
-
catch {
|
|
41
|
-
// Tree aggregation failure is non-fatal
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
return goal;
|
|
45
|
-
}
|
|
46
|
-
// ─── Phase 1b: Auto-decompose ───
|
|
47
|
-
/**
|
|
48
|
-
* Automatically decompose an abstract goal into sub-goals using
|
|
49
|
-
* TreeLoopOrchestrator.ensureGoalRefined(). Skipped when disabled,
|
|
50
|
-
* when the goal already has children, or when the goal is a leaf.
|
|
51
|
-
* Only root goals (decomposition_depth === 0) are auto-decomposed to
|
|
52
|
-
* prevent recursive decomposition of child nodes.
|
|
53
|
-
* Specificity checks are delegated to ensureGoalRefined internally.
|
|
54
|
-
*
|
|
55
|
-
* @param decomposedGoals - Set of goal IDs already decomposed this run.
|
|
56
|
-
* When provided, goals already in the set are skipped and the goal ID is
|
|
57
|
-
* added to the set after a successful decomposition attempt.
|
|
58
|
-
*/
|
|
59
|
-
export async function phaseAutoDecompose(goalId, goal, deps, config, logger, decomposedGoals, isFirstIteration) {
|
|
60
|
-
if (config.autoDecompose === false)
|
|
61
|
-
return;
|
|
62
|
-
if (!deps.treeLoopOrchestrator)
|
|
63
|
-
return;
|
|
64
|
-
if (goal.children_ids.length > 0) {
|
|
65
|
-
logger?.debug("[CoreLoop] phaseAutoDecompose: skipped — goal already has children", { goalId });
|
|
66
|
-
return;
|
|
67
|
-
}
|
|
68
|
-
if (goal.node_type === "leaf") {
|
|
69
|
-
logger?.debug("[CoreLoop] phaseAutoDecompose: skipped — goal is leaf", { goalId });
|
|
70
|
-
return;
|
|
71
|
-
}
|
|
72
|
-
// Only auto-decompose root goals — prevent recursive decomposition of children
|
|
73
|
-
if ((goal.decomposition_depth ?? 0) > 0) {
|
|
74
|
-
logger?.debug("[CoreLoop] phaseAutoDecompose: skipped — non-root goal (depth > 0)", { goalId, depth: goal.decomposition_depth });
|
|
75
|
-
return;
|
|
76
|
-
}
|
|
77
|
-
// Skip if already decomposed this run
|
|
78
|
-
if (decomposedGoals?.has(goalId)) {
|
|
79
|
-
logger?.debug("[CoreLoop] phaseAutoDecompose: skipped — already decomposed this run", { goalId });
|
|
80
|
-
return;
|
|
81
|
-
}
|
|
82
|
-
const force = isFirstIteration === true;
|
|
83
|
-
if (force) {
|
|
84
|
-
logger?.info("[decompose] forcing goal decomposition on first iteration", { goalId });
|
|
85
|
-
}
|
|
86
|
-
else {
|
|
87
|
-
logger?.info("[CoreLoop] phaseAutoDecompose: decomposing abstract goal", { goalId });
|
|
88
|
-
}
|
|
89
|
-
decomposedGoals?.add(goalId);
|
|
90
|
-
try {
|
|
91
|
-
await deps.treeLoopOrchestrator.ensureGoalRefined(goalId, { force });
|
|
92
|
-
}
|
|
93
|
-
catch (err) {
|
|
94
|
-
logger?.warn("[CoreLoop] phaseAutoDecompose: ensureGoalRefined failed (non-fatal)", {
|
|
95
|
-
goalId,
|
|
96
|
-
error: err instanceof Error ? err.message : String(err),
|
|
97
|
-
});
|
|
98
|
-
return;
|
|
99
|
-
}
|
|
100
|
-
logger?.info("[CoreLoop] phaseAutoDecompose: decomposition complete", { goalId });
|
|
101
|
-
}
|
|
102
|
-
// ─── Phase 2 helpers ───
|
|
103
|
-
/** Build a ToolCallContext from PhaseCtx for CoreLoop autonomous tool calls. */
|
|
104
|
-
export async function buildLoopToolContext(ctx, goalId) {
|
|
105
|
-
let trustBalance = 0;
|
|
106
|
-
if (ctx.deps.trustManager) {
|
|
107
|
-
try {
|
|
108
|
-
const balance = await ctx.deps.trustManager.getBalance(goalId);
|
|
109
|
-
trustBalance = balance.balance;
|
|
110
|
-
}
|
|
111
|
-
catch {
|
|
112
|
-
// Non-fatal — default to 0
|
|
113
|
-
}
|
|
114
|
-
}
|
|
115
|
-
return {
|
|
116
|
-
cwd: process.cwd(),
|
|
117
|
-
goalId,
|
|
118
|
-
trustBalance,
|
|
119
|
-
preApproved: true,
|
|
120
|
-
approvalFn: async () => false,
|
|
121
|
-
};
|
|
122
|
-
}
|
|
123
|
-
// ─── Phase 2 ───
|
|
124
|
-
/** Run observation engine, reload goal after observation.
|
|
125
|
-
* Observation failure is non-fatal — returns current goal state.
|
|
126
|
-
* When ctx.toolExecutor is present, routes through the observe-goal tool first
|
|
127
|
-
* and falls back to direct engine.observe() on tool failure. */
|
|
128
|
-
export async function observeAndReload(ctx, goalId, goal, loopIndex) {
|
|
129
|
-
ctx.deps.onProgress?.({
|
|
130
|
-
iteration: loopIndex + 1,
|
|
131
|
-
maxIterations: ctx.config.maxIterations,
|
|
132
|
-
phase: "Observing...",
|
|
133
|
-
});
|
|
134
|
-
// Tool path: route through ToolExecutor when available
|
|
135
|
-
if (ctx.toolExecutor) {
|
|
136
|
-
try {
|
|
137
|
-
const toolCtx = await buildLoopToolContext(ctx, goalId);
|
|
138
|
-
const toolResult = await ctx.toolExecutor.execute("observe-goal", { goal_id: goalId }, toolCtx);
|
|
139
|
-
if (toolResult.success) {
|
|
140
|
-
const reloaded = await ctx.deps.stateManager.loadGoal(goalId);
|
|
141
|
-
if (reloaded)
|
|
142
|
-
return reloaded;
|
|
143
|
-
return goal;
|
|
144
|
-
}
|
|
145
|
-
ctx.logger?.warn(`CoreLoop: observe-goal tool failed: ${toolResult.error}, falling back to direct call`);
|
|
146
|
-
}
|
|
147
|
-
catch (err) {
|
|
148
|
-
ctx.logger?.warn("CoreLoop: observe-goal tool threw (falling back to direct call)", { error: err instanceof Error ? err.message : String(err) });
|
|
149
|
-
}
|
|
150
|
-
}
|
|
151
|
-
// Direct path: fallback (or when toolExecutor is absent)
|
|
152
|
-
try {
|
|
153
|
-
const engine = ctx.deps.observationEngine;
|
|
154
|
-
ctx.logger?.debug("CoreLoop: engine.getDataSources exists", { exists: true });
|
|
155
|
-
const dataSources = engine.getDataSources();
|
|
156
|
-
ctx.logger?.debug("CoreLoop: observation setup", { dataSourceCount: dataSources.length });
|
|
157
|
-
await engine.observe(goalId, []);
|
|
158
|
-
const reloaded = await ctx.deps.stateManager.loadGoal(goalId);
|
|
159
|
-
if (reloaded)
|
|
160
|
-
return reloaded;
|
|
161
|
-
}
|
|
162
|
-
catch (err) {
|
|
163
|
-
ctx.logger?.warn("CoreLoop: observation failed (non-fatal)", { error: err instanceof Error ? err.message : String(err) });
|
|
164
|
-
}
|
|
165
|
-
return goal;
|
|
166
|
-
}
|
|
167
|
-
// ─── Phase 3 ───
|
|
168
|
-
/** Calculate gap vector and aggregate.
|
|
169
|
-
* Returns null on error.
|
|
170
|
-
* When gap === 0, returns the gap result with skipTaskGeneration=true so the
|
|
171
|
-
* caller continues to Phase 5 (SatisficingJudge) instead of short-circuiting.
|
|
172
|
-
*/
|
|
173
|
-
export async function calculateGapOrComplete(ctx, goalId, goal, loopIndex, result, startTime) {
|
|
174
|
-
let gapVector;
|
|
175
|
-
let gapAggregate;
|
|
176
|
-
try {
|
|
177
|
-
// Refresh stale dimensions via tool measurement before gap calculation
|
|
178
|
-
if (ctx.toolExecutor && goal.dimensions) {
|
|
179
|
-
const { needsDirectMeasurement, measureDirectly } = await import("../../platform/drive/gap-calculator-tools.js");
|
|
180
|
-
let anyRefreshed = false;
|
|
181
|
-
for (const dim of goal.dimensions) {
|
|
182
|
-
if (needsDirectMeasurement(dim)) {
|
|
183
|
-
try {
|
|
184
|
-
const refreshed = await measureDirectly(dim, ctx.toolExecutor, {
|
|
185
|
-
cwd: process.cwd(),
|
|
186
|
-
goalId,
|
|
187
|
-
trustBalance: 0,
|
|
188
|
-
preApproved: true,
|
|
189
|
-
approvalFn: async () => false,
|
|
190
|
-
});
|
|
191
|
-
if (refreshed !== null) {
|
|
192
|
-
dim.current_value = refreshed.value;
|
|
193
|
-
dim.confidence = refreshed.confidence;
|
|
194
|
-
anyRefreshed = true;
|
|
195
|
-
ctx.logger?.debug(`[GapRefresh] Refreshed stale dimension ${dim.name}: confidence ${dim.confidence}`);
|
|
196
|
-
}
|
|
197
|
-
}
|
|
198
|
-
catch (err) {
|
|
199
|
-
ctx.logger?.warn(`[GapRefresh] Failed to refresh ${dim.name}: ${err instanceof Error ? err.message : String(err)}`);
|
|
200
|
-
}
|
|
201
|
-
}
|
|
202
|
-
}
|
|
203
|
-
// Persist refreshed dimension values to avoid re-measuring on the next iteration
|
|
204
|
-
if (anyRefreshed) {
|
|
205
|
-
try {
|
|
206
|
-
await ctx.deps.stateManager.saveGoal(goal);
|
|
207
|
-
ctx.logger?.debug('[GapRefresh] Persisted refreshed dimensions for goal ' + goalId);
|
|
208
|
-
}
|
|
209
|
-
catch (err) {
|
|
210
|
-
ctx.logger?.warn?.('[GapRefresh] Failed to persist refreshed dimensions: ' + String(err));
|
|
211
|
-
}
|
|
212
|
-
}
|
|
213
|
-
}
|
|
214
|
-
gapVector = ctx.deps.gapCalculator.calculateGapVector(goalId, goal.dimensions, goal.uncertainty_weight);
|
|
215
|
-
const gapValues = gapVector.gaps.map((g) => g.normalized_weighted_gap);
|
|
216
|
-
gapAggregate = ctx.deps.gapCalculator.aggregateGaps(gapValues, goal.gap_aggregation);
|
|
217
|
-
result.gapAggregate = gapAggregate;
|
|
218
|
-
await ctx.deps.stateManager.appendGapHistoryEntry(goalId, {
|
|
219
|
-
iteration: loopIndex,
|
|
220
|
-
timestamp: new Date().toISOString(),
|
|
221
|
-
gap_vector: gapVector.gaps.map((g) => ({
|
|
222
|
-
dimension_name: g.dimension_name,
|
|
223
|
-
normalized_weighted_gap: g.normalized_weighted_gap,
|
|
224
|
-
})),
|
|
225
|
-
confidence_vector: gapVector.gaps.map((g) => ({
|
|
226
|
-
dimension_name: g.dimension_name,
|
|
227
|
-
confidence: g.confidence,
|
|
228
|
-
})),
|
|
229
|
-
});
|
|
230
|
-
}
|
|
231
|
-
catch (err) {
|
|
232
|
-
result.error = `Gap calculation failed: ${err instanceof Error ? err.message : String(err)}`;
|
|
233
|
-
ctx.logger?.error(`CoreLoop: ${result.error}`, { goalId });
|
|
234
|
-
result.elapsedMs = Date.now() - startTime;
|
|
235
|
-
return null;
|
|
236
|
-
}
|
|
237
|
-
// Gap zero check — gap is satisfied; skip task generation but continue to
|
|
238
|
-
// Phase 5 so SatisficingJudge can enforce confidence and double-confirmation.
|
|
239
|
-
if (gapAggregate === 0) {
|
|
240
|
-
ctx.logger?.info(`[CoreLoop] gap=0 for goal ${goalId} — skipping task generation, deferring to SatisficingJudge`);
|
|
241
|
-
return { gapVector, gapAggregate, skipTaskGeneration: true };
|
|
242
|
-
}
|
|
243
|
-
const avgConf = gapVector.gaps.length > 0
|
|
244
|
-
? gapVector.gaps.reduce((s, g) => s + g.confidence, 0) / gapVector.gaps.length
|
|
245
|
-
: undefined;
|
|
246
|
-
ctx.deps.onProgress?.({
|
|
247
|
-
iteration: loopIndex + 1,
|
|
248
|
-
maxIterations: ctx.config.maxIterations,
|
|
249
|
-
phase: "Generating task...",
|
|
250
|
-
gap: gapAggregate,
|
|
251
|
-
confidence: avgConf,
|
|
252
|
-
});
|
|
253
|
-
return { gapVector, gapAggregate };
|
|
254
|
-
}
|
|
255
|
-
// ─── Phase 4 ───
|
|
256
|
-
/** Score drives, update DriveScoreAdapter, check knowledge gap.
|
|
257
|
-
* Returns ranked DriveScores with highDissatisfactionDimensions, or null if the caller should
|
|
258
|
-
* return result early (knowledge gap task generated or drive scoring failed). */
|
|
259
|
-
export async function scoreDrivesAndCheckKnowledge(ctx, goalId, goal, gapVector, loopIndex, result, startTime, tryGenerateReport) {
|
|
260
|
-
let driveScores;
|
|
261
|
-
let highDissatisfactionDimensions = [];
|
|
262
|
-
try {
|
|
263
|
-
const driveContext = buildDriveContext(goal);
|
|
264
|
-
driveScores = ctx.deps.driveScorer.scoreAllDimensions(gapVector, driveContext);
|
|
265
|
-
const rankedScores = ctx.deps.driveScorer.rankDimensions(driveScores);
|
|
266
|
-
result.driveScores = rankedScores;
|
|
267
|
-
driveScores = rankedScores;
|
|
268
|
-
if (ctx.deps.driveScoreAdapter) {
|
|
269
|
-
ctx.deps.driveScoreAdapter.update(driveScores);
|
|
270
|
-
}
|
|
271
|
-
// Extract dimensions with high dissatisfaction (> 0.7) for memory tier promotion
|
|
272
|
-
highDissatisfactionDimensions = driveScores
|
|
273
|
-
.filter((s) => s.dissatisfaction > 0.7)
|
|
274
|
-
.map((s) => s.dimension_name);
|
|
275
|
-
// Consolidated reward computation log (PULSEED_REWARD_LOG=1 to enable)
|
|
276
|
-
const confidenceAvg = gapVector.gaps.reduce((sum, g) => sum + g.confidence, 0) /
|
|
277
|
-
Math.max(gapVector.gaps.length, 1);
|
|
278
|
-
let trustScore = null;
|
|
279
|
-
if (ctx.deps.trustManager) {
|
|
280
|
-
try {
|
|
281
|
-
const balance = await ctx.deps.trustManager.getBalance(ctx.config.adapterType);
|
|
282
|
-
trustScore = balance.balance;
|
|
283
|
-
}
|
|
284
|
-
catch {
|
|
285
|
-
// Non-fatal: trust score is diagnostic-only
|
|
286
|
-
}
|
|
287
|
-
}
|
|
288
|
-
logRewardComputation({
|
|
289
|
-
goalId,
|
|
290
|
-
iteration: loopIndex,
|
|
291
|
-
gapAggregate: result.gapAggregate ?? 0,
|
|
292
|
-
confidenceAvg,
|
|
293
|
-
trustScore,
|
|
294
|
-
driveScores,
|
|
295
|
-
completionJudgment: null,
|
|
296
|
-
});
|
|
297
|
-
}
|
|
298
|
-
catch (err) {
|
|
299
|
-
result.error = `Drive scoring failed: ${err instanceof Error ? err.message : String(err)}`;
|
|
300
|
-
ctx.logger?.error(`CoreLoop: ${result.error}`, { goalId });
|
|
301
|
-
result.elapsedMs = Date.now() - startTime;
|
|
302
|
-
return null;
|
|
303
|
-
}
|
|
304
|
-
// Knowledge gap check
|
|
305
|
-
if (ctx.deps.knowledgeManager) {
|
|
306
|
-
try {
|
|
307
|
-
let strategies = null;
|
|
308
|
-
try {
|
|
309
|
-
const portfolio = await ctx.deps.strategyManager.getPortfolio(goalId);
|
|
310
|
-
strategies = portfolio !== null ? portfolio.strategies : null;
|
|
311
|
-
}
|
|
312
|
-
catch {
|
|
313
|
-
// If strategy loading fails, leave as null
|
|
314
|
-
}
|
|
315
|
-
const observationContext = {
|
|
316
|
-
observations: goal.dimensions.map((d) => ({
|
|
317
|
-
name: d.name,
|
|
318
|
-
current_value: d.current_value,
|
|
319
|
-
confidence: d.confidence,
|
|
320
|
-
})),
|
|
321
|
-
strategies,
|
|
322
|
-
confidence: gapVector.gaps.reduce((sum, g) => sum + g.confidence, 0) /
|
|
323
|
-
Math.max(gapVector.gaps.length, 1),
|
|
324
|
-
};
|
|
325
|
-
// Skip knowledge gap detection when:
|
|
326
|
-
// 1. Observations are purely self-report (confidence <= 0.3, no data sources)
|
|
327
|
-
// 2. Not the first iteration — prevents repeated gap detection from blocking
|
|
328
|
-
// task execution every loop. Gap detection runs once; after that, let the
|
|
329
|
-
// normal task cycle proceed.
|
|
330
|
-
const skipGapDetection = observationContext.confidence <= 0.3 ||
|
|
331
|
-
!Number.isFinite(observationContext.confidence) ||
|
|
332
|
-
loopIndex > 0;
|
|
333
|
-
const gapSignal = skipGapDetection
|
|
334
|
-
? null
|
|
335
|
-
: await ctx.deps.knowledgeManager.detectKnowledgeGap(observationContext);
|
|
336
|
-
if (gapSignal !== null) {
|
|
337
|
-
const acquisitionTask = await ctx.deps.knowledgeManager.generateAcquisitionTask(gapSignal, goalId);
|
|
338
|
-
const acquisitionVerification = {
|
|
339
|
-
task_id: acquisitionTask.id,
|
|
340
|
-
verdict: "pass",
|
|
341
|
-
confidence: 0.9,
|
|
342
|
-
evidence: [
|
|
343
|
-
{
|
|
344
|
-
layer: "mechanical",
|
|
345
|
-
description: "Knowledge acquisition task generated for gap: " + gapSignal.signal_type,
|
|
346
|
-
confidence: 0.9,
|
|
347
|
-
},
|
|
348
|
-
],
|
|
349
|
-
dimension_updates: [],
|
|
350
|
-
timestamp: new Date().toISOString(),
|
|
351
|
-
};
|
|
352
|
-
result.taskResult = {
|
|
353
|
-
task: acquisitionTask,
|
|
354
|
-
verificationResult: acquisitionVerification,
|
|
355
|
-
action: "completed",
|
|
356
|
-
};
|
|
357
|
-
tryGenerateReport(goalId, loopIndex, result, goal);
|
|
358
|
-
result.elapsedMs = Date.now() - startTime;
|
|
359
|
-
return null;
|
|
360
|
-
}
|
|
361
|
-
}
|
|
362
|
-
catch {
|
|
363
|
-
// Knowledge gap detection failure is non-fatal
|
|
364
|
-
}
|
|
365
|
-
}
|
|
366
|
-
return { driveScores, highDissatisfactionDimensions };
|
|
367
|
-
}
|
|
1
|
+
export * from "./core-loop/preparation.js";
|
|
368
2
|
//# sourceMappingURL=core-loop-phases.js.map
|