pulseed 0.3.0 → 0.4.0

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.
Files changed (699) hide show
  1. package/dist/base/config/config-metadata.d.ts +1 -1
  2. package/dist/base/config/config-metadata.d.ts.map +1 -1
  3. package/dist/base/config/config-metadata.js +1 -1
  4. package/dist/base/config/config-metadata.js.map +1 -1
  5. package/dist/base/config/identity-loader.d.ts +1 -1
  6. package/dist/base/config/identity-loader.d.ts.map +1 -1
  7. package/dist/base/config/identity-loader.js +4 -3
  8. package/dist/base/config/identity-loader.js.map +1 -1
  9. package/dist/base/config/tool-metadata.d.ts +2 -0
  10. package/dist/base/config/tool-metadata.d.ts.map +1 -1
  11. package/dist/base/config/tool-metadata.js +30 -6
  12. package/dist/base/config/tool-metadata.js.map +1 -1
  13. package/dist/base/llm/llm-client.d.ts +12 -1
  14. package/dist/base/llm/llm-client.d.ts.map +1 -1
  15. package/dist/base/llm/llm-client.js +78 -2
  16. package/dist/base/llm/llm-client.js.map +1 -1
  17. package/dist/base/llm/ollama-client.d.ts +1 -0
  18. package/dist/base/llm/ollama-client.d.ts.map +1 -1
  19. package/dist/base/llm/ollama-client.js +1 -0
  20. package/dist/base/llm/ollama-client.js.map +1 -1
  21. package/dist/base/llm/openai-client.d.ts +3 -1
  22. package/dist/base/llm/openai-client.d.ts.map +1 -1
  23. package/dist/base/llm/openai-client.js +131 -41
  24. package/dist/base/llm/openai-client.js.map +1 -1
  25. package/dist/base/llm/provider-config.d.ts +1 -1
  26. package/dist/base/llm/provider-config.d.ts.map +1 -1
  27. package/dist/base/llm/provider-factory.d.ts.map +1 -1
  28. package/dist/base/llm/provider-factory.js +22 -3
  29. package/dist/base/llm/provider-factory.js.map +1 -1
  30. package/dist/base/state/checkpoint-trust-port.d.ts +4 -0
  31. package/dist/base/state/checkpoint-trust-port.d.ts.map +1 -0
  32. package/dist/base/state/checkpoint-trust-port.js +2 -0
  33. package/dist/base/state/checkpoint-trust-port.js.map +1 -0
  34. package/dist/base/state/state-manager.d.ts +12 -2
  35. package/dist/base/state/state-manager.d.ts.map +1 -1
  36. package/dist/base/state/state-manager.js +15 -0
  37. package/dist/base/state/state-manager.js.map +1 -1
  38. package/dist/base/utils/errors.d.ts +4 -0
  39. package/dist/base/utils/errors.d.ts.map +1 -1
  40. package/dist/base/utils/errors.js +8 -0
  41. package/dist/base/utils/errors.js.map +1 -1
  42. package/dist/base/utils/pulseed-meta.d.ts +4 -0
  43. package/dist/base/utils/pulseed-meta.d.ts.map +1 -0
  44. package/dist/base/utils/pulseed-meta.js +32 -0
  45. package/dist/base/utils/pulseed-meta.js.map +1 -0
  46. package/dist/index.d.ts +3 -0
  47. package/dist/index.d.ts.map +1 -1
  48. package/dist/index.js +1 -0
  49. package/dist/index.js.map +1 -1
  50. package/dist/interface/chat/chat-event-state.d.ts +10 -0
  51. package/dist/interface/chat/chat-event-state.d.ts.map +1 -0
  52. package/dist/interface/chat/chat-event-state.js +75 -0
  53. package/dist/interface/chat/chat-event-state.js.map +1 -0
  54. package/dist/interface/chat/chat-events.d.ts +59 -0
  55. package/dist/interface/chat/chat-events.d.ts.map +1 -0
  56. package/dist/interface/chat/chat-events.js +2 -0
  57. package/dist/interface/chat/chat-events.js.map +1 -0
  58. package/dist/interface/chat/chat-history.d.ts +4 -4
  59. package/dist/interface/chat/chat-history.d.ts.map +1 -1
  60. package/dist/interface/chat/chat-history.js +3 -3
  61. package/dist/interface/chat/chat-history.js.map +1 -1
  62. package/dist/interface/chat/chat-runner.d.ts +14 -3
  63. package/dist/interface/chat/chat-runner.d.ts.map +1 -1
  64. package/dist/interface/chat/chat-runner.js +241 -27
  65. package/dist/interface/chat/chat-runner.js.map +1 -1
  66. package/dist/interface/chat/event-subscriber.d.ts +3 -1
  67. package/dist/interface/chat/event-subscriber.d.ts.map +1 -1
  68. package/dist/interface/chat/event-subscriber.js +39 -0
  69. package/dist/interface/chat/event-subscriber.js.map +1 -1
  70. package/dist/interface/chat/grounding.d.ts +2 -0
  71. package/dist/interface/chat/grounding.d.ts.map +1 -1
  72. package/dist/interface/chat/grounding.js +95 -42
  73. package/dist/interface/chat/grounding.js.map +1 -1
  74. package/dist/interface/chat/mutation-tool-defs.js +1 -1
  75. package/dist/interface/chat/mutation-tool-defs.js.map +1 -1
  76. package/dist/interface/chat/self-knowledge-mutation-tools.d.ts.map +1 -1
  77. package/dist/interface/chat/self-knowledge-mutation-tools.js +20 -3
  78. package/dist/interface/chat/self-knowledge-mutation-tools.js.map +1 -1
  79. package/dist/interface/chat/self-knowledge-tools.js +2 -2
  80. package/dist/interface/chat/self-knowledge-tools.js.map +1 -1
  81. package/dist/interface/cli/commands/chat.d.ts.map +1 -1
  82. package/dist/interface/cli/commands/chat.js +45 -12
  83. package/dist/interface/cli/commands/chat.js.map +1 -1
  84. package/dist/interface/cli/commands/config.d.ts.map +1 -1
  85. package/dist/interface/cli/commands/config.js +37 -6
  86. package/dist/interface/cli/commands/config.js.map +1 -1
  87. package/dist/interface/cli/commands/daemon.d.ts.map +1 -1
  88. package/dist/interface/cli/commands/daemon.js +21 -9
  89. package/dist/interface/cli/commands/daemon.js.map +1 -1
  90. package/dist/interface/cli/commands/doctor.d.ts +1 -1
  91. package/dist/interface/cli/commands/doctor.d.ts.map +1 -1
  92. package/dist/interface/cli/commands/doctor.js +5 -7
  93. package/dist/interface/cli/commands/doctor.js.map +1 -1
  94. package/dist/interface/cli/commands/presets/root-presets.d.ts +3 -3
  95. package/dist/interface/cli/commands/presets/root-presets.d.ts.map +1 -1
  96. package/dist/interface/cli/commands/presets/root-presets.js +8 -5
  97. package/dist/interface/cli/commands/presets/root-presets.js.map +1 -1
  98. package/dist/interface/cli/commands/schedule.d.ts.map +1 -1
  99. package/dist/interface/cli/commands/schedule.js +165 -12
  100. package/dist/interface/cli/commands/schedule.js.map +1 -1
  101. package/dist/interface/cli/setup.d.ts +9 -0
  102. package/dist/interface/cli/setup.d.ts.map +1 -1
  103. package/dist/interface/cli/setup.js +43 -20
  104. package/dist/interface/cli/setup.js.map +1 -1
  105. package/dist/interface/cli/utils.d.ts.map +1 -1
  106. package/dist/interface/cli/utils.js +5 -1
  107. package/dist/interface/cli/utils.js.map +1 -1
  108. package/dist/interface/tui/app.d.ts.map +1 -1
  109. package/dist/interface/tui/app.js +8 -12
  110. package/dist/interface/tui/app.js.map +1 -1
  111. package/dist/interface/tui/chat.js +2 -2
  112. package/dist/interface/tui/chat.js.map +1 -1
  113. package/dist/interface/tui/checkerboard-spinner.d.ts +3 -0
  114. package/dist/interface/tui/checkerboard-spinner.d.ts.map +1 -0
  115. package/dist/interface/tui/checkerboard-spinner.js +20 -0
  116. package/dist/interface/tui/checkerboard-spinner.js.map +1 -0
  117. package/dist/interface/tui/dashboard.js +2 -2
  118. package/dist/interface/tui/dashboard.js.map +1 -1
  119. package/dist/interface/tui/entry.d.ts.map +1 -1
  120. package/dist/interface/tui/entry.js +49 -5
  121. package/dist/interface/tui/entry.js.map +1 -1
  122. package/dist/orchestrator/ethics-gate.d.ts +3 -0
  123. package/dist/orchestrator/ethics-gate.d.ts.map +1 -0
  124. package/dist/orchestrator/ethics-gate.js +2 -0
  125. package/dist/orchestrator/ethics-gate.js.map +1 -0
  126. package/dist/orchestrator/execution/context/context-builder.d.ts +8 -0
  127. package/dist/orchestrator/execution/context/context-builder.d.ts.map +1 -1
  128. package/dist/orchestrator/execution/context/context-builder.js +38 -0
  129. package/dist/orchestrator/execution/context/context-builder.js.map +1 -1
  130. package/dist/orchestrator/execution/parallel-execution-types.d.ts +7 -0
  131. package/dist/orchestrator/execution/parallel-execution-types.d.ts.map +1 -0
  132. package/dist/orchestrator/execution/parallel-execution-types.js +2 -0
  133. package/dist/orchestrator/execution/parallel-execution-types.js.map +1 -0
  134. package/dist/orchestrator/execution/parallel-executor.d.ts +2 -6
  135. package/dist/orchestrator/execution/parallel-executor.d.ts.map +1 -1
  136. package/dist/orchestrator/execution/parallel-executor.js.map +1 -1
  137. package/dist/orchestrator/execution/result-reconciler.d.ts +1 -1
  138. package/dist/orchestrator/execution/result-reconciler.d.ts.map +1 -1
  139. package/dist/orchestrator/execution/task/task-lifecycle.d.ts +5 -10
  140. package/dist/orchestrator/execution/task/task-lifecycle.d.ts.map +1 -1
  141. package/dist/orchestrator/execution/task/task-lifecycle.js +25 -1
  142. package/dist/orchestrator/execution/task/task-lifecycle.js.map +1 -1
  143. package/dist/orchestrator/execution/task/task-pipeline-cycle.d.ts +5 -35
  144. package/dist/orchestrator/execution/task/task-pipeline-cycle.d.ts.map +1 -1
  145. package/dist/orchestrator/execution/task/task-pipeline-cycle.js.map +1 -1
  146. package/dist/orchestrator/execution/task/task-pipeline-types.d.ts +39 -0
  147. package/dist/orchestrator/execution/task/task-pipeline-types.d.ts.map +1 -0
  148. package/dist/orchestrator/execution/task/task-pipeline-types.js +2 -0
  149. package/dist/orchestrator/execution/task/task-pipeline-types.js.map +1 -0
  150. package/dist/orchestrator/goal/goal-negotiator.d.ts.map +1 -1
  151. package/dist/orchestrator/goal/goal-negotiator.js +2 -1
  152. package/dist/orchestrator/goal/goal-negotiator.js.map +1 -1
  153. package/dist/orchestrator/goal/goal-refiner.d.ts.map +1 -1
  154. package/dist/orchestrator/goal/goal-refiner.js +1 -1
  155. package/dist/orchestrator/goal/goal-refiner.js.map +1 -1
  156. package/dist/orchestrator/goal/goal-tree-manager.d.ts +2 -2
  157. package/dist/orchestrator/goal/goal-tree-manager.d.ts.map +1 -1
  158. package/dist/orchestrator/goal/goal-tree-manager.js.map +1 -1
  159. package/dist/orchestrator/goal/negotiator-feasibility.d.ts +10 -0
  160. package/dist/orchestrator/goal/negotiator-feasibility.d.ts.map +1 -0
  161. package/dist/orchestrator/goal/negotiator-feasibility.js +55 -0
  162. package/dist/orchestrator/goal/negotiator-feasibility.js.map +1 -0
  163. package/dist/orchestrator/goal/negotiator-steps.d.ts +1 -6
  164. package/dist/orchestrator/goal/negotiator-steps.d.ts.map +1 -1
  165. package/dist/orchestrator/goal/negotiator-steps.js +4 -56
  166. package/dist/orchestrator/goal/negotiator-steps.js.map +1 -1
  167. package/dist/orchestrator/knowledge/knowledge-manager.d.ts +2 -0
  168. package/dist/orchestrator/knowledge/knowledge-manager.d.ts.map +1 -0
  169. package/dist/orchestrator/knowledge/knowledge-manager.js +2 -0
  170. package/dist/orchestrator/knowledge/knowledge-manager.js.map +1 -0
  171. package/dist/orchestrator/knowledge/memory/memory-lifecycle.d.ts +2 -0
  172. package/dist/orchestrator/knowledge/memory/memory-lifecycle.d.ts.map +1 -0
  173. package/dist/orchestrator/knowledge/memory/memory-lifecycle.js +2 -0
  174. package/dist/orchestrator/knowledge/memory/memory-lifecycle.js.map +1 -0
  175. package/dist/orchestrator/knowledge/transfer/knowledge-transfer.d.ts +2 -0
  176. package/dist/orchestrator/knowledge/transfer/knowledge-transfer.d.ts.map +1 -0
  177. package/dist/orchestrator/knowledge/transfer/knowledge-transfer.js +2 -0
  178. package/dist/orchestrator/knowledge/transfer/knowledge-transfer.js.map +1 -0
  179. package/dist/orchestrator/loop/core-loop-capability.d.ts +7 -1
  180. package/dist/orchestrator/loop/core-loop-capability.d.ts.map +1 -1
  181. package/dist/orchestrator/loop/core-loop-capability.js +53 -6
  182. package/dist/orchestrator/loop/core-loop-capability.js.map +1 -1
  183. package/dist/orchestrator/loop/core-loop-phases-b.d.ts +2 -1
  184. package/dist/orchestrator/loop/core-loop-phases-b.d.ts.map +1 -1
  185. package/dist/orchestrator/loop/core-loop-phases-b.js +82 -3
  186. package/dist/orchestrator/loop/core-loop-phases-b.js.map +1 -1
  187. package/dist/orchestrator/loop/core-loop-types.d.ts +5 -68
  188. package/dist/orchestrator/loop/core-loop-types.d.ts.map +1 -1
  189. package/dist/orchestrator/loop/core-loop-types.js +1 -26
  190. package/dist/orchestrator/loop/core-loop-types.js.map +1 -1
  191. package/dist/orchestrator/loop/core-loop.d.ts +6 -3
  192. package/dist/orchestrator/loop/core-loop.d.ts.map +1 -1
  193. package/dist/orchestrator/loop/core-loop.js +87 -3
  194. package/dist/orchestrator/loop/core-loop.js.map +1 -1
  195. package/dist/orchestrator/loop/loop-result-types.d.ts +67 -0
  196. package/dist/orchestrator/loop/loop-result-types.d.ts.map +1 -0
  197. package/dist/orchestrator/loop/loop-result-types.js +27 -0
  198. package/dist/orchestrator/loop/loop-result-types.js.map +1 -0
  199. package/dist/orchestrator/loop/post-loop-hooks.d.ts +3 -0
  200. package/dist/orchestrator/loop/post-loop-hooks.d.ts.map +1 -1
  201. package/dist/orchestrator/loop/post-loop-hooks.js +19 -1
  202. package/dist/orchestrator/loop/post-loop-hooks.js.map +1 -1
  203. package/dist/orchestrator/observation/capability-detector.d.ts +2 -0
  204. package/dist/orchestrator/observation/capability-detector.d.ts.map +1 -0
  205. package/dist/orchestrator/observation/capability-detector.js +2 -0
  206. package/dist/orchestrator/observation/capability-detector.js.map +1 -0
  207. package/dist/orchestrator/strategy/strategy-manager-base.d.ts +1 -0
  208. package/dist/orchestrator/strategy/strategy-manager-base.d.ts.map +1 -1
  209. package/dist/orchestrator/strategy/strategy-manager-base.js +48 -4
  210. package/dist/orchestrator/strategy/strategy-manager-base.js.map +1 -1
  211. package/dist/orchestrator/strategy-manager.d.ts +2 -0
  212. package/dist/orchestrator/strategy-manager.d.ts.map +1 -0
  213. package/dist/orchestrator/strategy-manager.js +2 -0
  214. package/dist/orchestrator/strategy-manager.js.map +1 -0
  215. package/dist/platform/dream/dream-activation.d.ts +52 -0
  216. package/dist/platform/dream/dream-activation.d.ts.map +1 -0
  217. package/dist/platform/dream/dream-activation.js +199 -0
  218. package/dist/platform/dream/dream-activation.js.map +1 -0
  219. package/dist/platform/dream/dream-analyzer.d.ts +53 -0
  220. package/dist/platform/dream/dream-analyzer.d.ts.map +1 -0
  221. package/dist/platform/dream/dream-analyzer.js +489 -0
  222. package/dist/platform/dream/dream-analyzer.js.map +1 -0
  223. package/dist/platform/dream/dream-config.d.ts +6 -0
  224. package/dist/platform/dream/dream-config.d.ts.map +1 -0
  225. package/dist/platform/dream/dream-config.js +20 -0
  226. package/dist/platform/dream/dream-config.js.map +1 -0
  227. package/dist/platform/dream/dream-consolidator.d.ts +35 -0
  228. package/dist/platform/dream/dream-consolidator.d.ts.map +1 -0
  229. package/dist/platform/dream/dream-consolidator.js +304 -0
  230. package/dist/platform/dream/dream-consolidator.js.map +1 -0
  231. package/dist/platform/dream/dream-importance.d.ts +24 -0
  232. package/dist/platform/dream/dream-importance.d.ts.map +1 -0
  233. package/dist/platform/dream/dream-importance.js +71 -0
  234. package/dist/platform/dream/dream-importance.js.map +1 -0
  235. package/dist/platform/dream/dream-log-collector.d.ts +73 -0
  236. package/dist/platform/dream/dream-log-collector.d.ts.map +1 -0
  237. package/dist/platform/dream/dream-log-collector.js +256 -0
  238. package/dist/platform/dream/dream-log-collector.js.map +1 -0
  239. package/dist/platform/dream/dream-log-store.d.ts +22 -0
  240. package/dist/platform/dream/dream-log-store.d.ts.map +1 -0
  241. package/dist/platform/dream/dream-log-store.js +150 -0
  242. package/dist/platform/dream/dream-log-store.js.map +1 -0
  243. package/dist/platform/dream/dream-schedule-suggestions.d.ts +26 -0
  244. package/dist/platform/dream/dream-schedule-suggestions.d.ts.map +1 -0
  245. package/dist/platform/dream/dream-schedule-suggestions.js +195 -0
  246. package/dist/platform/dream/dream-schedule-suggestions.js.map +1 -0
  247. package/dist/platform/dream/dream-types.d.ts +2587 -0
  248. package/dist/platform/dream/dream-types.d.ts.map +1 -0
  249. package/dist/platform/dream/dream-types.js +265 -0
  250. package/dist/platform/dream/dream-types.js.map +1 -0
  251. package/dist/platform/dream/index.d.ts +6 -0
  252. package/dist/platform/dream/index.d.ts.map +1 -0
  253. package/dist/platform/dream/index.js +6 -0
  254. package/dist/platform/dream/index.js.map +1 -0
  255. package/dist/platform/ethics-gate.d.ts +2 -0
  256. package/dist/platform/ethics-gate.d.ts.map +1 -0
  257. package/dist/platform/ethics-gate.js +2 -0
  258. package/dist/platform/ethics-gate.js.map +1 -0
  259. package/dist/platform/execution/task/task-lifecycle.d.ts +2 -0
  260. package/dist/platform/execution/task/task-lifecycle.d.ts.map +1 -0
  261. package/dist/platform/execution/task/task-lifecycle.js +2 -0
  262. package/dist/platform/execution/task/task-lifecycle.js.map +1 -0
  263. package/dist/platform/knowledge/transfer/knowledge-transfer-apply.d.ts.map +1 -1
  264. package/dist/platform/knowledge/transfer/knowledge-transfer-apply.js +6 -0
  265. package/dist/platform/knowledge/transfer/knowledge-transfer-apply.js.map +1 -1
  266. package/dist/platform/knowledge/transfer/knowledge-transfer-detect.d.ts.map +1 -1
  267. package/dist/platform/knowledge/transfer/knowledge-transfer-detect.js +32 -0
  268. package/dist/platform/knowledge/transfer/knowledge-transfer-detect.js.map +1 -1
  269. package/dist/platform/knowledge/transfer/knowledge-transfer.d.ts +18 -1
  270. package/dist/platform/knowledge/transfer/knowledge-transfer.d.ts.map +1 -1
  271. package/dist/platform/knowledge/transfer/knowledge-transfer.js +121 -6
  272. package/dist/platform/knowledge/transfer/knowledge-transfer.js.map +1 -1
  273. package/dist/platform/observation/capability-detector.d.ts +8 -0
  274. package/dist/platform/observation/capability-detector.d.ts.map +1 -1
  275. package/dist/platform/observation/capability-detector.js +71 -4
  276. package/dist/platform/observation/capability-detector.js.map +1 -1
  277. package/dist/platform/observation/data-source-adapter.d.ts +19 -0
  278. package/dist/platform/observation/data-source-adapter.d.ts.map +1 -1
  279. package/dist/platform/observation/data-source-adapter.js +166 -0
  280. package/dist/platform/observation/data-source-adapter.js.map +1 -1
  281. package/dist/platform/observation/observation-helpers.d.ts +6 -0
  282. package/dist/platform/observation/observation-helpers.d.ts.map +1 -1
  283. package/dist/platform/observation/observation-helpers.js +2 -0
  284. package/dist/platform/observation/observation-helpers.js.map +1 -1
  285. package/dist/platform/observation/types/data-source.d.ts +12 -0
  286. package/dist/platform/observation/types/data-source.d.ts.map +1 -1
  287. package/dist/platform/observation/types/data-source.js +1 -0
  288. package/dist/platform/observation/types/data-source.js.map +1 -1
  289. package/dist/platform/runtime/plugin-loader.d.ts +2 -0
  290. package/dist/platform/runtime/plugin-loader.d.ts.map +1 -0
  291. package/dist/platform/runtime/plugin-loader.js +2 -0
  292. package/dist/platform/runtime/plugin-loader.js.map +1 -0
  293. package/dist/platform/tools/executor.d.ts +2 -0
  294. package/dist/platform/tools/executor.d.ts.map +1 -0
  295. package/dist/platform/tools/executor.js +2 -0
  296. package/dist/platform/tools/executor.js.map +1 -0
  297. package/dist/prompt/purposes/dream.d.ts +9 -0
  298. package/dist/prompt/purposes/dream.d.ts.map +1 -0
  299. package/dist/prompt/purposes/dream.js +71 -0
  300. package/dist/prompt/purposes/dream.js.map +1 -0
  301. package/dist/prompt/purposes/index.d.ts +1 -0
  302. package/dist/prompt/purposes/index.d.ts.map +1 -1
  303. package/dist/prompt/purposes/index.js +1 -0
  304. package/dist/prompt/purposes/index.js.map +1 -1
  305. package/dist/reporting/report-formatters.d.ts +1 -1
  306. package/dist/reporting/report-formatters.d.ts.map +1 -1
  307. package/dist/reporting/reporting-engine.d.ts +2 -24
  308. package/dist/reporting/reporting-engine.d.ts.map +1 -1
  309. package/dist/reporting/reporting-engine.js +0 -1
  310. package/dist/reporting/reporting-engine.js.map +1 -1
  311. package/dist/reporting/reporting-types.d.ts +25 -0
  312. package/dist/reporting/reporting-types.d.ts.map +1 -0
  313. package/dist/reporting/reporting-types.js +2 -0
  314. package/dist/reporting/reporting-types.js.map +1 -0
  315. package/dist/runtime/approval-broker.d.ts +44 -0
  316. package/dist/runtime/approval-broker.d.ts.map +1 -0
  317. package/dist/runtime/approval-broker.js +140 -0
  318. package/dist/runtime/approval-broker.js.map +1 -0
  319. package/dist/runtime/daemon-runner.d.ts +23 -1
  320. package/dist/runtime/daemon-runner.d.ts.map +1 -1
  321. package/dist/runtime/daemon-runner.js +212 -44
  322. package/dist/runtime/daemon-runner.js.map +1 -1
  323. package/dist/runtime/event-server.d.ts +12 -2
  324. package/dist/runtime/event-server.d.ts.map +1 -1
  325. package/dist/runtime/event-server.js +137 -38
  326. package/dist/runtime/event-server.js.map +1 -1
  327. package/dist/runtime/executor/loop-supervisor.d.ts +20 -1
  328. package/dist/runtime/executor/loop-supervisor.d.ts.map +1 -1
  329. package/dist/runtime/executor/loop-supervisor.js +264 -55
  330. package/dist/runtime/executor/loop-supervisor.js.map +1 -1
  331. package/dist/runtime/gateway/http-channel-adapter.js +2 -2
  332. package/dist/runtime/gateway/http-channel-adapter.js.map +1 -1
  333. package/dist/runtime/gateway/ingress-gateway.js +1 -1
  334. package/dist/runtime/gateway/ingress-gateway.js.map +1 -1
  335. package/dist/runtime/goal-lease-manager.d.ts +35 -0
  336. package/dist/runtime/goal-lease-manager.d.ts.map +1 -0
  337. package/dist/runtime/goal-lease-manager.js +191 -0
  338. package/dist/runtime/goal-lease-manager.js.map +1 -0
  339. package/dist/runtime/hook-manager.d.ts +4 -0
  340. package/dist/runtime/hook-manager.d.ts.map +1 -1
  341. package/dist/runtime/hook-manager.js +33 -0
  342. package/dist/runtime/hook-manager.js.map +1 -1
  343. package/dist/runtime/leader-lock-manager.d.ts +30 -0
  344. package/dist/runtime/leader-lock-manager.d.ts.map +1 -0
  345. package/dist/runtime/leader-lock-manager.js +160 -0
  346. package/dist/runtime/leader-lock-manager.js.map +1 -0
  347. package/dist/runtime/notification-dispatcher.d.ts +2 -0
  348. package/dist/runtime/notification-dispatcher.d.ts.map +1 -1
  349. package/dist/runtime/notification-dispatcher.js +12 -0
  350. package/dist/runtime/notification-dispatcher.js.map +1 -1
  351. package/dist/runtime/queue/index.d.ts +4 -0
  352. package/dist/runtime/queue/index.d.ts.map +1 -1
  353. package/dist/runtime/queue/index.js +2 -0
  354. package/dist/runtime/queue/index.js.map +1 -1
  355. package/dist/runtime/queue/journal-backed-queue.d.ts +80 -0
  356. package/dist/runtime/queue/journal-backed-queue.d.ts.map +1 -0
  357. package/dist/runtime/queue/journal-backed-queue.js +509 -0
  358. package/dist/runtime/queue/journal-backed-queue.js.map +1 -0
  359. package/dist/runtime/queue/queue-claim-sweeper.d.ts +15 -0
  360. package/dist/runtime/queue/queue-claim-sweeper.d.ts.map +1 -0
  361. package/dist/runtime/queue/queue-claim-sweeper.js +28 -0
  362. package/dist/runtime/queue/queue-claim-sweeper.js.map +1 -0
  363. package/dist/runtime/schedule-engine-layers.d.ts +9 -3
  364. package/dist/runtime/schedule-engine-layers.d.ts.map +1 -1
  365. package/dist/runtime/schedule-engine-layers.js +135 -4
  366. package/dist/runtime/schedule-engine-layers.js.map +1 -1
  367. package/dist/runtime/schedule-engine.d.ts +25 -5
  368. package/dist/runtime/schedule-engine.d.ts.map +1 -1
  369. package/dist/runtime/schedule-engine.js +82 -0
  370. package/dist/runtime/schedule-engine.js.map +1 -1
  371. package/dist/runtime/schedule-presets.d.ts +536 -0
  372. package/dist/runtime/schedule-presets.d.ts.map +1 -0
  373. package/dist/runtime/schedule-presets.js +166 -0
  374. package/dist/runtime/schedule-presets.js.map +1 -0
  375. package/dist/runtime/store/approval-store.d.ts +26 -0
  376. package/dist/runtime/store/approval-store.d.ts.map +1 -0
  377. package/dist/runtime/store/approval-store.js +119 -0
  378. package/dist/runtime/store/approval-store.js.map +1 -0
  379. package/dist/runtime/store/health-store.d.ts +16 -0
  380. package/dist/runtime/store/health-store.d.ts.map +1 -0
  381. package/dist/runtime/store/health-store.js +68 -0
  382. package/dist/runtime/store/health-store.js.map +1 -0
  383. package/dist/runtime/store/index.d.ts +10 -0
  384. package/dist/runtime/store/index.d.ts.map +1 -0
  385. package/dist/runtime/store/index.js +7 -0
  386. package/dist/runtime/store/index.js.map +1 -0
  387. package/dist/runtime/store/outbox-store.d.ts +16 -0
  388. package/dist/runtime/store/outbox-store.d.ts.map +1 -0
  389. package/dist/runtime/store/outbox-store.js +92 -0
  390. package/dist/runtime/store/outbox-store.js.map +1 -0
  391. package/dist/runtime/store/runtime-journal.d.ts +19 -0
  392. package/dist/runtime/store/runtime-journal.d.ts.map +1 -0
  393. package/dist/runtime/store/runtime-journal.js +77 -0
  394. package/dist/runtime/store/runtime-journal.js.map +1 -0
  395. package/dist/runtime/store/runtime-paths.d.ts +35 -0
  396. package/dist/runtime/store/runtime-paths.d.ts.map +1 -0
  397. package/dist/runtime/store/runtime-paths.js +108 -0
  398. package/dist/runtime/store/runtime-paths.js.map +1 -0
  399. package/dist/runtime/store/runtime-schemas.d.ts +218 -0
  400. package/dist/runtime/store/runtime-schemas.d.ts.map +1 -0
  401. package/dist/runtime/store/runtime-schemas.js +94 -0
  402. package/dist/runtime/store/runtime-schemas.js.map +1 -0
  403. package/dist/runtime/types/daemon.d.ts +6 -0
  404. package/dist/runtime/types/daemon.d.ts.map +1 -1
  405. package/dist/runtime/types/daemon.js +2 -0
  406. package/dist/runtime/types/daemon.js.map +1 -1
  407. package/dist/runtime/types/hook.d.ts +12 -12
  408. package/dist/runtime/types/hook.d.ts.map +1 -1
  409. package/dist/runtime/types/hook.js +1 -0
  410. package/dist/runtime/types/hook.js.map +1 -1
  411. package/dist/runtime/types/schedule.d.ts +204 -27
  412. package/dist/runtime/types/schedule.d.ts.map +1 -1
  413. package/dist/runtime/types/schedule.js +25 -0
  414. package/dist/runtime/types/schedule.js.map +1 -1
  415. package/dist/tools/builtin/index.d.ts +15 -0
  416. package/dist/tools/builtin/index.d.ts.map +1 -1
  417. package/dist/tools/builtin/index.js +31 -2
  418. package/dist/tools/builtin/index.js.map +1 -1
  419. package/dist/tools/execution/MemoryConsolidateTool/MemoryConsolidateTool.d.ts +1 -1
  420. package/dist/tools/execution/MemoryConsolidateTool/MemoryConsolidateTool.d.ts.map +1 -1
  421. package/dist/tools/execution/MemoryConsolidateTool/MemoryConsolidateTool.js +6 -5
  422. package/dist/tools/execution/MemoryConsolidateTool/MemoryConsolidateTool.js.map +1 -1
  423. package/dist/tools/fs/FileEditTool/FileEditTool.d.ts +1 -1
  424. package/dist/tools/fs/FileEditTool/FileEditTool.d.ts.map +1 -1
  425. package/dist/tools/fs/FileEditTool/FileEditTool.js +1 -1
  426. package/dist/tools/fs/FileEditTool/FileEditTool.js.map +1 -1
  427. package/dist/tools/fs/FileWriteTool/FileWriteTool.d.ts +1 -1
  428. package/dist/tools/fs/FileWriteTool/FileWriteTool.d.ts.map +1 -1
  429. package/dist/tools/fs/FileWriteTool/FileWriteTool.js +1 -1
  430. package/dist/tools/fs/FileWriteTool/FileWriteTool.js.map +1 -1
  431. package/dist/tools/fs/GlobTool/GlobTool.d.ts +2 -2
  432. package/dist/tools/fs/GlobTool/GlobTool.d.ts.map +1 -1
  433. package/dist/tools/fs/GlobTool/GlobTool.js +2 -2
  434. package/dist/tools/fs/GlobTool/GlobTool.js.map +1 -1
  435. package/dist/tools/fs/GrepTool/GrepTool.d.ts +2 -2
  436. package/dist/tools/fs/GrepTool/GrepTool.d.ts.map +1 -1
  437. package/dist/tools/fs/GrepTool/GrepTool.js +9 -3
  438. package/dist/tools/fs/GrepTool/GrepTool.js.map +1 -1
  439. package/dist/tools/fs/JsonQueryTool/JsonQueryTool.d.ts +2 -2
  440. package/dist/tools/fs/JsonQueryTool/JsonQueryTool.d.ts.map +1 -1
  441. package/dist/tools/fs/JsonQueryTool/JsonQueryTool.js +6 -2
  442. package/dist/tools/fs/JsonQueryTool/JsonQueryTool.js.map +1 -1
  443. package/dist/tools/fs/ListDirTool/ListDirTool.d.ts +2 -2
  444. package/dist/tools/fs/ListDirTool/ListDirTool.d.ts.map +1 -1
  445. package/dist/tools/fs/ListDirTool/ListDirTool.js +2 -2
  446. package/dist/tools/fs/ListDirTool/ListDirTool.js.map +1 -1
  447. package/dist/tools/fs/ReadTool/ReadTool.d.ts +1 -1
  448. package/dist/tools/fs/ReadTool/ReadTool.d.ts.map +1 -1
  449. package/dist/tools/fs/ReadTool/ReadTool.js +1 -1
  450. package/dist/tools/fs/ReadTool/ReadTool.js.map +1 -1
  451. package/dist/tools/mutation/ArchiveGoalTool/ArchiveGoalTool.d.ts +1 -1
  452. package/dist/tools/mutation/ArchiveGoalTool/ArchiveGoalTool.d.ts.map +1 -1
  453. package/dist/tools/mutation/ArchiveGoalTool/ArchiveGoalTool.js +1 -1
  454. package/dist/tools/mutation/ArchiveGoalTool/ArchiveGoalTool.js.map +1 -1
  455. package/dist/tools/mutation/DeleteGoalTool/DeleteGoalTool.d.ts +1 -1
  456. package/dist/tools/mutation/DeleteGoalTool/DeleteGoalTool.d.ts.map +1 -1
  457. package/dist/tools/mutation/DeleteGoalTool/DeleteGoalTool.js +1 -1
  458. package/dist/tools/mutation/DeleteGoalTool/DeleteGoalTool.js.map +1 -1
  459. package/dist/tools/mutation/ResetTrustTool/ResetTrustTool.d.ts +1 -1
  460. package/dist/tools/mutation/ResetTrustTool/ResetTrustTool.d.ts.map +1 -1
  461. package/dist/tools/mutation/ResetTrustTool/ResetTrustTool.js +1 -1
  462. package/dist/tools/mutation/ResetTrustTool/ResetTrustTool.js.map +1 -1
  463. package/dist/tools/mutation/SetGoalTool/SetGoalTool.d.ts +2 -2
  464. package/dist/tools/mutation/SetGoalTool/SetGoalTool.d.ts.map +1 -1
  465. package/dist/tools/mutation/SetGoalTool/SetGoalTool.js +2 -2
  466. package/dist/tools/mutation/SetGoalTool/SetGoalTool.js.map +1 -1
  467. package/dist/tools/mutation/TaskCreateTool/TaskCreateTool.d.ts +216 -0
  468. package/dist/tools/mutation/TaskCreateTool/TaskCreateTool.d.ts.map +1 -0
  469. package/dist/tools/mutation/TaskCreateTool/TaskCreateTool.js +104 -0
  470. package/dist/tools/mutation/TaskCreateTool/TaskCreateTool.js.map +1 -0
  471. package/dist/tools/mutation/TaskCreateTool/constants.d.ts +5 -0
  472. package/dist/tools/mutation/TaskCreateTool/constants.d.ts.map +1 -0
  473. package/dist/tools/mutation/TaskCreateTool/constants.js +5 -0
  474. package/dist/tools/mutation/TaskCreateTool/constants.js.map +1 -0
  475. package/dist/tools/mutation/TaskCreateTool/prompt.d.ts +2 -0
  476. package/dist/tools/mutation/TaskCreateTool/prompt.d.ts.map +1 -0
  477. package/dist/tools/mutation/TaskCreateTool/prompt.js +2 -0
  478. package/dist/tools/mutation/TaskCreateTool/prompt.js.map +1 -0
  479. package/dist/tools/mutation/TaskOutputTool/TaskOutputTool.d.ts +46 -0
  480. package/dist/tools/mutation/TaskOutputTool/TaskOutputTool.d.ts.map +1 -0
  481. package/dist/tools/mutation/TaskOutputTool/TaskOutputTool.js +95 -0
  482. package/dist/tools/mutation/TaskOutputTool/TaskOutputTool.js.map +1 -0
  483. package/dist/tools/mutation/TaskOutputTool/constants.d.ts +5 -0
  484. package/dist/tools/mutation/TaskOutputTool/constants.d.ts.map +1 -0
  485. package/dist/tools/mutation/TaskOutputTool/constants.js +5 -0
  486. package/dist/tools/mutation/TaskOutputTool/constants.js.map +1 -0
  487. package/dist/tools/mutation/TaskOutputTool/prompt.d.ts +2 -0
  488. package/dist/tools/mutation/TaskOutputTool/prompt.d.ts.map +1 -0
  489. package/dist/tools/mutation/TaskOutputTool/prompt.js +2 -0
  490. package/dist/tools/mutation/TaskOutputTool/prompt.js.map +1 -0
  491. package/dist/tools/mutation/TaskStopTool/TaskStopTool.d.ts +40 -0
  492. package/dist/tools/mutation/TaskStopTool/TaskStopTool.d.ts.map +1 -0
  493. package/dist/tools/mutation/TaskStopTool/TaskStopTool.js +95 -0
  494. package/dist/tools/mutation/TaskStopTool/TaskStopTool.js.map +1 -0
  495. package/dist/tools/mutation/TaskStopTool/constants.d.ts +5 -0
  496. package/dist/tools/mutation/TaskStopTool/constants.d.ts.map +1 -0
  497. package/dist/tools/mutation/TaskStopTool/constants.js +5 -0
  498. package/dist/tools/mutation/TaskStopTool/constants.js.map +1 -0
  499. package/dist/tools/mutation/TaskStopTool/prompt.d.ts +2 -0
  500. package/dist/tools/mutation/TaskStopTool/prompt.d.ts.map +1 -0
  501. package/dist/tools/mutation/TaskStopTool/prompt.js +2 -0
  502. package/dist/tools/mutation/TaskStopTool/prompt.js.map +1 -0
  503. package/dist/tools/mutation/TaskUpdateTool/TaskUpdateTool.d.ts +270 -0
  504. package/dist/tools/mutation/TaskUpdateTool/TaskUpdateTool.d.ts.map +1 -0
  505. package/dist/tools/mutation/TaskUpdateTool/TaskUpdateTool.js +137 -0
  506. package/dist/tools/mutation/TaskUpdateTool/TaskUpdateTool.js.map +1 -0
  507. package/dist/tools/mutation/TaskUpdateTool/constants.d.ts +5 -0
  508. package/dist/tools/mutation/TaskUpdateTool/constants.d.ts.map +1 -0
  509. package/dist/tools/mutation/TaskUpdateTool/constants.js +5 -0
  510. package/dist/tools/mutation/TaskUpdateTool/constants.js.map +1 -0
  511. package/dist/tools/mutation/TaskUpdateTool/prompt.d.ts +2 -0
  512. package/dist/tools/mutation/TaskUpdateTool/prompt.d.ts.map +1 -0
  513. package/dist/tools/mutation/TaskUpdateTool/prompt.js +2 -0
  514. package/dist/tools/mutation/TaskUpdateTool/prompt.js.map +1 -0
  515. package/dist/tools/mutation/TogglePluginTool/TogglePluginTool.d.ts +1 -1
  516. package/dist/tools/mutation/TogglePluginTool/TogglePluginTool.d.ts.map +1 -1
  517. package/dist/tools/mutation/TogglePluginTool/TogglePluginTool.js +1 -1
  518. package/dist/tools/mutation/TogglePluginTool/TogglePluginTool.js.map +1 -1
  519. package/dist/tools/mutation/UpdateConfigTool/UpdateConfigTool.d.ts +2 -2
  520. package/dist/tools/mutation/UpdateConfigTool/UpdateConfigTool.d.ts.map +1 -1
  521. package/dist/tools/mutation/UpdateConfigTool/UpdateConfigTool.js +11 -2
  522. package/dist/tools/mutation/UpdateConfigTool/UpdateConfigTool.js.map +1 -1
  523. package/dist/tools/mutation/UpdateGoalTool/UpdateGoalTool.d.ts +2 -2
  524. package/dist/tools/mutation/UpdateGoalTool/UpdateGoalTool.d.ts.map +1 -1
  525. package/dist/tools/mutation/UpdateGoalTool/UpdateGoalTool.js +2 -2
  526. package/dist/tools/mutation/UpdateGoalTool/UpdateGoalTool.js.map +1 -1
  527. package/dist/tools/mutation/task-history-utils.d.ts +4 -0
  528. package/dist/tools/mutation/task-history-utils.d.ts.map +1 -0
  529. package/dist/tools/mutation/task-history-utils.js +30 -0
  530. package/dist/tools/mutation/task-history-utils.js.map +1 -0
  531. package/dist/tools/network/HttpFetchTool/HttpFetchTool.d.ts +1 -1
  532. package/dist/tools/network/HttpFetchTool/HttpFetchTool.d.ts.map +1 -1
  533. package/dist/tools/network/HttpFetchTool/HttpFetchTool.js +1 -1
  534. package/dist/tools/network/HttpFetchTool/HttpFetchTool.js.map +1 -1
  535. package/dist/tools/query/ArchitectureTool/ArchitectureTool.d.ts +2 -2
  536. package/dist/tools/query/ArchitectureTool/ArchitectureTool.d.ts.map +1 -1
  537. package/dist/tools/query/ArchitectureTool/ArchitectureTool.js +2 -2
  538. package/dist/tools/query/ArchitectureTool/ArchitectureTool.js.map +1 -1
  539. package/dist/tools/query/ConfigTool/ConfigTool.d.ts +2 -2
  540. package/dist/tools/query/ConfigTool/ConfigTool.d.ts.map +1 -1
  541. package/dist/tools/query/ConfigTool/ConfigTool.js +2 -2
  542. package/dist/tools/query/ConfigTool/ConfigTool.js.map +1 -1
  543. package/dist/tools/query/GoalStateTool/GoalStateTool.d.ts +2 -2
  544. package/dist/tools/query/GoalStateTool/GoalStateTool.d.ts.map +1 -1
  545. package/dist/tools/query/GoalStateTool/GoalStateTool.js +2 -2
  546. package/dist/tools/query/GoalStateTool/GoalStateTool.js.map +1 -1
  547. package/dist/tools/query/KnowledgeQueryTool/KnowledgeQueryTool.d.ts +2 -2
  548. package/dist/tools/query/KnowledgeQueryTool/KnowledgeQueryTool.d.ts.map +1 -1
  549. package/dist/tools/query/KnowledgeQueryTool/KnowledgeQueryTool.js +2 -2
  550. package/dist/tools/query/KnowledgeQueryTool/KnowledgeQueryTool.js.map +1 -1
  551. package/dist/tools/query/MemoryRecallTool/MemoryRecallTool.d.ts +7 -7
  552. package/dist/tools/query/MemoryRecallTool/MemoryRecallTool.d.ts.map +1 -1
  553. package/dist/tools/query/MemoryRecallTool/MemoryRecallTool.js +11 -10
  554. package/dist/tools/query/MemoryRecallTool/MemoryRecallTool.js.map +1 -1
  555. package/dist/tools/query/PluginStateTool/PluginStateTool.d.ts +2 -2
  556. package/dist/tools/query/PluginStateTool/PluginStateTool.d.ts.map +1 -1
  557. package/dist/tools/query/PluginStateTool/PluginStateTool.js +2 -2
  558. package/dist/tools/query/PluginStateTool/PluginStateTool.js.map +1 -1
  559. package/dist/tools/query/ProgressHistoryTool/ProgressHistoryTool.d.ts +4 -4
  560. package/dist/tools/query/ProgressHistoryTool/ProgressHistoryTool.d.ts.map +1 -1
  561. package/dist/tools/query/ProgressHistoryTool/ProgressHistoryTool.js +2 -2
  562. package/dist/tools/query/ProgressHistoryTool/ProgressHistoryTool.js.map +1 -1
  563. package/dist/tools/query/SessionHistoryTool/SessionHistoryTool.d.ts +2 -2
  564. package/dist/tools/query/SessionHistoryTool/SessionHistoryTool.d.ts.map +1 -1
  565. package/dist/tools/query/SessionHistoryTool/SessionHistoryTool.js +2 -2
  566. package/dist/tools/query/SessionHistoryTool/SessionHistoryTool.js.map +1 -1
  567. package/dist/tools/query/TaskGetTool/TaskGetTool.d.ts +34 -0
  568. package/dist/tools/query/TaskGetTool/TaskGetTool.d.ts.map +1 -0
  569. package/dist/tools/query/TaskGetTool/TaskGetTool.js +77 -0
  570. package/dist/tools/query/TaskGetTool/TaskGetTool.js.map +1 -0
  571. package/dist/tools/query/TaskGetTool/constants.d.ts +6 -0
  572. package/dist/tools/query/TaskGetTool/constants.d.ts.map +1 -0
  573. package/dist/tools/query/TaskGetTool/constants.js +6 -0
  574. package/dist/tools/query/TaskGetTool/constants.js.map +1 -0
  575. package/dist/tools/query/TaskGetTool/prompt.d.ts +2 -0
  576. package/dist/tools/query/TaskGetTool/prompt.d.ts.map +1 -0
  577. package/dist/tools/query/TaskGetTool/prompt.js +2 -0
  578. package/dist/tools/query/TaskGetTool/prompt.js.map +1 -0
  579. package/dist/tools/query/TaskListTool/TaskListTool.d.ts +58 -0
  580. package/dist/tools/query/TaskListTool/TaskListTool.d.ts.map +1 -0
  581. package/dist/tools/query/TaskListTool/TaskListTool.js +101 -0
  582. package/dist/tools/query/TaskListTool/TaskListTool.js.map +1 -0
  583. package/dist/tools/query/TaskListTool/constants.d.ts +6 -0
  584. package/dist/tools/query/TaskListTool/constants.d.ts.map +1 -0
  585. package/dist/tools/query/TaskListTool/constants.js +6 -0
  586. package/dist/tools/query/TaskListTool/constants.js.map +1 -0
  587. package/dist/tools/query/TaskListTool/prompt.d.ts +2 -0
  588. package/dist/tools/query/TaskListTool/prompt.d.ts.map +1 -0
  589. package/dist/tools/query/TaskListTool/prompt.js +2 -0
  590. package/dist/tools/query/TaskListTool/prompt.js.map +1 -0
  591. package/dist/tools/query/TrustStateTool/TrustStateTool.d.ts +2 -2
  592. package/dist/tools/query/TrustStateTool/TrustStateTool.d.ts.map +1 -1
  593. package/dist/tools/query/TrustStateTool/TrustStateTool.js +2 -2
  594. package/dist/tools/query/TrustStateTool/TrustStateTool.js.map +1 -1
  595. package/dist/tools/schedule/CreateScheduleTool/CreateScheduleTool.d.ts +1638 -0
  596. package/dist/tools/schedule/CreateScheduleTool/CreateScheduleTool.d.ts.map +1 -0
  597. package/dist/tools/schedule/CreateScheduleTool/CreateScheduleTool.js +86 -0
  598. package/dist/tools/schedule/CreateScheduleTool/CreateScheduleTool.js.map +1 -0
  599. package/dist/tools/schedule/CreateScheduleTool/constants.d.ts +5 -0
  600. package/dist/tools/schedule/CreateScheduleTool/constants.d.ts.map +1 -0
  601. package/dist/tools/schedule/CreateScheduleTool/constants.js +5 -0
  602. package/dist/tools/schedule/CreateScheduleTool/constants.js.map +1 -0
  603. package/dist/tools/schedule/CreateScheduleTool/prompt.d.ts +2 -0
  604. package/dist/tools/schedule/CreateScheduleTool/prompt.d.ts.map +1 -0
  605. package/dist/tools/schedule/CreateScheduleTool/prompt.js +2 -0
  606. package/dist/tools/schedule/CreateScheduleTool/prompt.js.map +1 -0
  607. package/dist/tools/schedule/GetScheduleTool/GetScheduleTool.d.ts +28 -0
  608. package/dist/tools/schedule/GetScheduleTool/GetScheduleTool.d.ts.map +1 -0
  609. package/dist/tools/schedule/GetScheduleTool/GetScheduleTool.js +79 -0
  610. package/dist/tools/schedule/GetScheduleTool/GetScheduleTool.js.map +1 -0
  611. package/dist/tools/schedule/GetScheduleTool/constants.d.ts +6 -0
  612. package/dist/tools/schedule/GetScheduleTool/constants.d.ts.map +1 -0
  613. package/dist/tools/schedule/GetScheduleTool/constants.js +6 -0
  614. package/dist/tools/schedule/GetScheduleTool/constants.js.map +1 -0
  615. package/dist/tools/schedule/GetScheduleTool/prompt.d.ts +2 -0
  616. package/dist/tools/schedule/GetScheduleTool/prompt.d.ts.map +1 -0
  617. package/dist/tools/schedule/GetScheduleTool/prompt.js +2 -0
  618. package/dist/tools/schedule/GetScheduleTool/prompt.js.map +1 -0
  619. package/dist/tools/schedule/ListSchedulesTool/ListSchedulesTool.d.ts +40 -0
  620. package/dist/tools/schedule/ListSchedulesTool/ListSchedulesTool.d.ts.map +1 -0
  621. package/dist/tools/schedule/ListSchedulesTool/ListSchedulesTool.js +83 -0
  622. package/dist/tools/schedule/ListSchedulesTool/ListSchedulesTool.js.map +1 -0
  623. package/dist/tools/schedule/ListSchedulesTool/constants.d.ts +6 -0
  624. package/dist/tools/schedule/ListSchedulesTool/constants.d.ts.map +1 -0
  625. package/dist/tools/schedule/ListSchedulesTool/constants.js +6 -0
  626. package/dist/tools/schedule/ListSchedulesTool/constants.js.map +1 -0
  627. package/dist/tools/schedule/ListSchedulesTool/prompt.d.ts +2 -0
  628. package/dist/tools/schedule/ListSchedulesTool/prompt.d.ts.map +1 -0
  629. package/dist/tools/schedule/ListSchedulesTool/prompt.js +2 -0
  630. package/dist/tools/schedule/ListSchedulesTool/prompt.js.map +1 -0
  631. package/dist/tools/schedule/PauseScheduleTool/PauseScheduleTool.d.ts +32 -0
  632. package/dist/tools/schedule/PauseScheduleTool/PauseScheduleTool.d.ts.map +1 -0
  633. package/dist/tools/schedule/PauseScheduleTool/PauseScheduleTool.js +94 -0
  634. package/dist/tools/schedule/PauseScheduleTool/PauseScheduleTool.js.map +1 -0
  635. package/dist/tools/schedule/PauseScheduleTool/constants.d.ts +5 -0
  636. package/dist/tools/schedule/PauseScheduleTool/constants.d.ts.map +1 -0
  637. package/dist/tools/schedule/PauseScheduleTool/constants.js +5 -0
  638. package/dist/tools/schedule/PauseScheduleTool/constants.js.map +1 -0
  639. package/dist/tools/schedule/PauseScheduleTool/prompt.d.ts +2 -0
  640. package/dist/tools/schedule/PauseScheduleTool/prompt.d.ts.map +1 -0
  641. package/dist/tools/schedule/PauseScheduleTool/prompt.js +2 -0
  642. package/dist/tools/schedule/PauseScheduleTool/prompt.js.map +1 -0
  643. package/dist/tools/schedule/RemoveScheduleTool/RemoveScheduleTool.d.ts +35 -0
  644. package/dist/tools/schedule/RemoveScheduleTool/RemoveScheduleTool.d.ts.map +1 -0
  645. package/dist/tools/schedule/RemoveScheduleTool/RemoveScheduleTool.js +100 -0
  646. package/dist/tools/schedule/RemoveScheduleTool/RemoveScheduleTool.js.map +1 -0
  647. package/dist/tools/schedule/RemoveScheduleTool/constants.d.ts +5 -0
  648. package/dist/tools/schedule/RemoveScheduleTool/constants.d.ts.map +1 -0
  649. package/dist/tools/schedule/RemoveScheduleTool/constants.js +5 -0
  650. package/dist/tools/schedule/RemoveScheduleTool/constants.js.map +1 -0
  651. package/dist/tools/schedule/RemoveScheduleTool/prompt.d.ts +2 -0
  652. package/dist/tools/schedule/RemoveScheduleTool/prompt.d.ts.map +1 -0
  653. package/dist/tools/schedule/RemoveScheduleTool/prompt.js +2 -0
  654. package/dist/tools/schedule/RemoveScheduleTool/prompt.js.map +1 -0
  655. package/dist/tools/schedule/ResumeScheduleTool/ResumeScheduleTool.d.ts +32 -0
  656. package/dist/tools/schedule/ResumeScheduleTool/ResumeScheduleTool.d.ts.map +1 -0
  657. package/dist/tools/schedule/ResumeScheduleTool/ResumeScheduleTool.js +94 -0
  658. package/dist/tools/schedule/ResumeScheduleTool/ResumeScheduleTool.js.map +1 -0
  659. package/dist/tools/schedule/ResumeScheduleTool/constants.d.ts +5 -0
  660. package/dist/tools/schedule/ResumeScheduleTool/constants.d.ts.map +1 -0
  661. package/dist/tools/schedule/ResumeScheduleTool/constants.js +5 -0
  662. package/dist/tools/schedule/ResumeScheduleTool/constants.js.map +1 -0
  663. package/dist/tools/schedule/ResumeScheduleTool/prompt.d.ts +2 -0
  664. package/dist/tools/schedule/ResumeScheduleTool/prompt.d.ts.map +1 -0
  665. package/dist/tools/schedule/ResumeScheduleTool/prompt.js +2 -0
  666. package/dist/tools/schedule/ResumeScheduleTool/prompt.js.map +1 -0
  667. package/dist/tools/schedule/UpdateScheduleTool/UpdateScheduleTool.d.ts +770 -0
  668. package/dist/tools/schedule/UpdateScheduleTool/UpdateScheduleTool.d.ts.map +1 -0
  669. package/dist/tools/schedule/UpdateScheduleTool/UpdateScheduleTool.js +131 -0
  670. package/dist/tools/schedule/UpdateScheduleTool/UpdateScheduleTool.js.map +1 -0
  671. package/dist/tools/schedule/UpdateScheduleTool/constants.d.ts +5 -0
  672. package/dist/tools/schedule/UpdateScheduleTool/constants.d.ts.map +1 -0
  673. package/dist/tools/schedule/UpdateScheduleTool/constants.js +5 -0
  674. package/dist/tools/schedule/UpdateScheduleTool/constants.js.map +1 -0
  675. package/dist/tools/schedule/UpdateScheduleTool/prompt.d.ts +2 -0
  676. package/dist/tools/schedule/UpdateScheduleTool/prompt.d.ts.map +1 -0
  677. package/dist/tools/schedule/UpdateScheduleTool/prompt.js +2 -0
  678. package/dist/tools/schedule/UpdateScheduleTool/prompt.js.map +1 -0
  679. package/dist/tools/system/EnvTool/EnvTool.d.ts +2 -2
  680. package/dist/tools/system/EnvTool/EnvTool.d.ts.map +1 -1
  681. package/dist/tools/system/EnvTool/EnvTool.js +2 -2
  682. package/dist/tools/system/EnvTool/EnvTool.js.map +1 -1
  683. package/dist/tools/system/GitDiffTool/GitDiffTool.d.ts +2 -2
  684. package/dist/tools/system/GitDiffTool/GitDiffTool.d.ts.map +1 -1
  685. package/dist/tools/system/GitDiffTool/GitDiffTool.js +2 -2
  686. package/dist/tools/system/GitDiffTool/GitDiffTool.js.map +1 -1
  687. package/dist/tools/system/GitLogTool/GitLogTool.d.ts +2 -2
  688. package/dist/tools/system/GitLogTool/GitLogTool.d.ts.map +1 -1
  689. package/dist/tools/system/GitLogTool/GitLogTool.js +2 -2
  690. package/dist/tools/system/GitLogTool/GitLogTool.js.map +1 -1
  691. package/dist/tools/system/SleepTool/SleepTool.d.ts +2 -2
  692. package/dist/tools/system/SleepTool/SleepTool.d.ts.map +1 -1
  693. package/dist/tools/system/SleepTool/SleepTool.js +2 -2
  694. package/dist/tools/system/SleepTool/SleepTool.js.map +1 -1
  695. package/dist/tools/system/test-runner.d.ts +2 -52
  696. package/dist/tools/system/test-runner.d.ts.map +1 -1
  697. package/dist/tools/system/test-runner.js +1 -180
  698. package/dist/tools/system/test-runner.js.map +1 -1
  699. package/package.json +1 -1
@@ -0,0 +1,256 @@
1
+ import * as fsp from "node:fs/promises";
2
+ import * as path from "node:path";
3
+ import { randomUUID } from "node:crypto";
4
+ import { writeJsonFileAtomic } from "../../base/utils/json-io.js";
5
+ import { EventLogSchema, ImportanceEntrySchema, IterationLogSchema, SessionLogSchema, WatermarkStateSchema, } from "./dream-types.js";
6
+ const DEFAULT_MAX_FILE_SIZE_BYTES = 10 * 1024 * 1024;
7
+ const DEFAULT_PRUNE_TARGET_RATIO = 0.8;
8
+ const DEFAULT_IMPORTANCE_THRESHOLD = 0.5;
9
+ /**
10
+ * Best-effort append-only collector for Dream Mode Phase 1.
11
+ *
12
+ * It intentionally avoids overwriting runtime state. When it has to prune a log,
13
+ * it keeps the newest lines only and preserves JSONL semantics.
14
+ */
15
+ export class DreamLogCollector {
16
+ baseDir;
17
+ logger;
18
+ config;
19
+ queues = new Map();
20
+ constructor(baseDir, logger, config = {}) {
21
+ this.baseDir = baseDir;
22
+ this.logger = logger;
23
+ this.config = {
24
+ enabled: config.enabled ?? true,
25
+ iterationLoggingEnabled: config.iterationLoggingEnabled ?? true,
26
+ sessionSummariesEnabled: config.sessionSummariesEnabled ?? true,
27
+ eventPersistenceEnabled: config.eventPersistenceEnabled ?? true,
28
+ maxFileSizeBytes: config.maxFileSizeBytes ?? DEFAULT_MAX_FILE_SIZE_BYTES,
29
+ pruneTargetRatio: config.pruneTargetRatio ?? DEFAULT_PRUNE_TARGET_RATIO,
30
+ rotationMode: config.rotationMode ?? "size",
31
+ watermarkBehavior: config.watermarkBehavior ?? "readwrite",
32
+ importanceThreshold: config.importanceThreshold ?? DEFAULT_IMPORTANCE_THRESHOLD,
33
+ };
34
+ }
35
+ async appendIterationLog(entry) {
36
+ if (!this.config.enabled || !this.config.iterationLoggingEnabled)
37
+ return;
38
+ const parsed = IterationLogSchema.parse(entry);
39
+ await this.appendJsonl(this.goalIterationPath(parsed.goalId), parsed);
40
+ }
41
+ async appendSessionLog(entry) {
42
+ if (!this.config.enabled || !this.config.sessionSummariesEnabled)
43
+ return;
44
+ const parsed = SessionLogSchema.parse(entry);
45
+ await this.appendJsonl(this.sessionLogPath(), parsed);
46
+ }
47
+ async appendEventLog(entry) {
48
+ if (!this.config.enabled || !this.config.eventPersistenceEnabled)
49
+ return;
50
+ const parsed = EventLogSchema.parse(entry);
51
+ await this.appendJsonl(this.eventLogPath(parsed.goalId), parsed);
52
+ }
53
+ async appendImportanceEntry(entry, options) {
54
+ const parsed = ImportanceEntrySchema.parse(entry);
55
+ if (!options?.force && parsed.importance < this.config.importanceThreshold) {
56
+ return false;
57
+ }
58
+ await this.appendJsonl(this.importanceBufferPath(), parsed);
59
+ return true;
60
+ }
61
+ async loadWatermarks() {
62
+ const raw = await this.readWatermarksFile();
63
+ if (raw === null) {
64
+ return WatermarkStateSchema.parse({});
65
+ }
66
+ return WatermarkStateSchema.parse(raw);
67
+ }
68
+ async saveWatermarks(state) {
69
+ if (this.config.watermarkBehavior === "readonly") {
70
+ return;
71
+ }
72
+ const parsed = WatermarkStateSchema.parse(state);
73
+ await this.withQueue("watermarks", async () => {
74
+ await this.ensureDreamDir();
75
+ await writeJsonFileAtomic(this.watermarksPath(), parsed);
76
+ });
77
+ }
78
+ async markGoalProcessed(goalId, lastProcessedLine, lastProcessedTimestamp) {
79
+ const state = await this.loadWatermarks();
80
+ state.goals[goalId] = {
81
+ lastProcessedLine,
82
+ ...(lastProcessedTimestamp ? { lastProcessedTimestamp } : {}),
83
+ };
84
+ await this.saveWatermarks(state);
85
+ }
86
+ async markImportanceProcessed(lastProcessedLine, lastProcessedTimestamp) {
87
+ const state = await this.loadWatermarks();
88
+ state.importanceBuffer = {
89
+ lastProcessedLine,
90
+ ...(lastProcessedTimestamp ? { lastProcessedTimestamp } : {}),
91
+ };
92
+ await this.saveWatermarks(state);
93
+ }
94
+ async updateImportanceWatermark(lastProcessedLine, lastProcessedTimestamp) {
95
+ await this.markImportanceProcessed(lastProcessedLine, lastProcessedTimestamp);
96
+ }
97
+ async markImportanceCursorProcessed(cursor) {
98
+ const state = await this.loadWatermarks();
99
+ state.importanceBuffer = {
100
+ lastProcessedLine: cursor.lastProcessedLine,
101
+ ...(cursor.lastProcessedTimestamp ? { lastProcessedTimestamp: cursor.lastProcessedTimestamp } : {}),
102
+ ...(cursor.lastProcessedId ? { lastProcessedId: cursor.lastProcessedId } : {}),
103
+ };
104
+ await this.saveWatermarks(state);
105
+ }
106
+ buildSessionId(goalId, startedAt) {
107
+ return `${goalId}:${startedAt}`;
108
+ }
109
+ async appendIterationResult(params) {
110
+ const { goalId, sessionId, iterationResult, timestamp } = params;
111
+ await this.appendIterationLog({
112
+ entryId: randomUUID(),
113
+ timestamp: timestamp ?? new Date().toISOString(),
114
+ goalId,
115
+ iteration: iterationResult.loopIndex,
116
+ sessionId,
117
+ gapAggregate: iterationResult.gapAggregate,
118
+ driveScores: this.toDriveScores(iterationResult.driveScores),
119
+ taskId: iterationResult.taskResult?.task.id ?? null,
120
+ taskAction: iterationResult.taskResult?.action ?? null,
121
+ strategyId: iterationResult.taskResult?.task.strategy_id ?? null,
122
+ verificationResult: iterationResult.taskResult
123
+ ? {
124
+ verdict: iterationResult.taskResult.verificationResult.verdict,
125
+ confidence: iterationResult.taskResult.verificationResult.confidence,
126
+ timestamp: iterationResult.taskResult.verificationResult.timestamp,
127
+ }
128
+ : null,
129
+ stallDetected: iterationResult.stallDetected,
130
+ stallSeverity: iterationResult.stallReport?.escalation_level ?? null,
131
+ tokensUsed: iterationResult.tokensUsed ?? iterationResult.taskResult?.tokensUsed ?? null,
132
+ elapsedMs: iterationResult.elapsedMs,
133
+ skipped: iterationResult.skipped ?? false,
134
+ skipReason: iterationResult.skipReason ?? null,
135
+ completionJudgment: iterationResult.completionJudgment,
136
+ waitSuppressed: iterationResult.waitSuppressed ?? false,
137
+ });
138
+ }
139
+ async appendSessionSummary(params) {
140
+ const { goalId, sessionId, completedAt, finalStatus, iterations, totalTokensUsed } = params;
141
+ const strategiesUsed = Array.from(new Set(iterations
142
+ .map((iteration) => iteration.taskResult?.task.strategy_id)
143
+ .filter((strategyId) => typeof strategyId === "string" && strategyId.length > 0)));
144
+ await this.appendSessionLog({
145
+ timestamp: completedAt,
146
+ goalId,
147
+ sessionId,
148
+ iterationCount: iterations.length,
149
+ initialGapAggregate: iterations[0]?.gapAggregate ?? 0,
150
+ finalGapAggregate: iterations[iterations.length - 1]?.gapAggregate ?? 0,
151
+ totalTokensUsed,
152
+ totalElapsedMs: iterations.reduce((sum, iteration) => sum + iteration.elapsedMs, 0),
153
+ stallCount: iterations.filter((iteration) => iteration.stallDetected).length,
154
+ outcome: finalStatus,
155
+ strategiesUsed,
156
+ });
157
+ }
158
+ goalIterationPath(goalId) {
159
+ return path.join(this.baseDir, "goals", goalId, "iteration-logs.jsonl");
160
+ }
161
+ sessionLogPath() {
162
+ return path.join(this.baseDir, "dream", "session-logs.jsonl");
163
+ }
164
+ importanceBufferPath() {
165
+ return path.join(this.baseDir, "dream", "importance-buffer.jsonl");
166
+ }
167
+ eventLogPath(goalId) {
168
+ return path.join(this.baseDir, "dream", "events", `${goalId}.jsonl`);
169
+ }
170
+ watermarksPath() {
171
+ return path.join(this.baseDir, "dream", "watermarks.json");
172
+ }
173
+ toDriveScores(driveScores) {
174
+ if (driveScores.length === 0)
175
+ return undefined;
176
+ return driveScores.map((score) => ({
177
+ dimensionName: score.dimension_name,
178
+ score: score.final_score,
179
+ }));
180
+ }
181
+ async readWatermarksFile() {
182
+ try {
183
+ const raw = await fsp.readFile(this.watermarksPath(), "utf8");
184
+ return JSON.parse(raw);
185
+ }
186
+ catch (err) {
187
+ if (err.code === "ENOENT")
188
+ return null;
189
+ this.logger?.warn(`[DreamLogCollector] Failed to read watermarks: ${err instanceof Error ? err.message : String(err)}`);
190
+ return null;
191
+ }
192
+ }
193
+ async appendJsonl(filePath, entry) {
194
+ const line = JSON.stringify(entry);
195
+ await this.withQueue(filePath, async () => {
196
+ const targetPath = this.resolveJsonlPath(filePath);
197
+ await this.ensureDirFor(targetPath);
198
+ await this.rotateIfNeeded(targetPath, line);
199
+ await fsp.appendFile(targetPath, `${line}\n`, "utf8");
200
+ });
201
+ }
202
+ resolveJsonlPath(filePath) {
203
+ if (this.config.rotationMode !== "date") {
204
+ return filePath;
205
+ }
206
+ const ext = path.extname(filePath);
207
+ const stem = path.basename(filePath, ext);
208
+ const today = new Date().toISOString().slice(0, 10);
209
+ return path.join(path.dirname(filePath), `${stem}.${today}${ext || ".jsonl"}`);
210
+ }
211
+ async rotateIfNeeded(filePath, nextLine) {
212
+ const maxSizeBytes = this.config.maxFileSizeBytes;
213
+ const currentSize = await fsp.stat(filePath).then((stat) => stat.size).catch(() => 0);
214
+ const nextSize = Buffer.byteLength(nextLine + "\n", "utf8");
215
+ if (currentSize + nextSize <= maxSizeBytes) {
216
+ return;
217
+ }
218
+ const existing = await fsp.readFile(filePath, "utf8").catch(() => "");
219
+ const lines = existing.split(/\r?\n/).filter((line) => line.trim().length > 0);
220
+ const targetBytes = Math.max(nextSize, Math.floor(maxSizeBytes * this.config.pruneTargetRatio));
221
+ const kept = [];
222
+ let total = nextSize;
223
+ for (let i = lines.length - 1; i >= 0; i--) {
224
+ const line = lines[i];
225
+ const lineBytes = Buffer.byteLength(`${line}\n`, "utf8");
226
+ if (kept.length > 0 && total + lineBytes > targetBytes) {
227
+ break;
228
+ }
229
+ kept.unshift(line);
230
+ total += lineBytes;
231
+ }
232
+ const rotated = kept.length > 0 ? `${kept.join("\n")}\n` : "";
233
+ await this.atomicWriteText(filePath, rotated);
234
+ }
235
+ async atomicWriteText(filePath, content) {
236
+ const dir = path.dirname(filePath);
237
+ await fsp.mkdir(dir, { recursive: true });
238
+ const tmp = `${filePath}.${randomUUID()}.tmp`;
239
+ await fsp.writeFile(tmp, content, "utf8");
240
+ await fsp.rename(tmp, filePath);
241
+ }
242
+ async ensureDirFor(filePath) {
243
+ await fsp.mkdir(path.dirname(filePath), { recursive: true });
244
+ }
245
+ async ensureDreamDir() {
246
+ await fsp.mkdir(path.join(this.baseDir, "dream"), { recursive: true });
247
+ await fsp.mkdir(path.join(this.baseDir, "dream", "events"), { recursive: true });
248
+ }
249
+ async withQueue(key, task) {
250
+ const previous = this.queues.get(key) ?? Promise.resolve();
251
+ const next = previous.catch(() => undefined).then(task, task);
252
+ this.queues.set(key, next.then(() => undefined, () => undefined));
253
+ return next;
254
+ }
255
+ }
256
+ //# sourceMappingURL=dream-log-collector.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dream-log-collector.js","sourceRoot":"","sources":["../../../src/platform/dream/dream-log-collector.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,GAAG,MAAM,kBAAkB,CAAC;AACxC,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAClC,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AAIlE,OAAO,EACL,cAAc,EACd,qBAAqB,EACrB,kBAAkB,EAClB,gBAAgB,EAChB,oBAAoB,GAQrB,MAAM,kBAAkB,CAAC;AAc1B,MAAM,2BAA2B,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,GAAG,EAAE,CAAC,SAAS,EAAE,GAAG,EAAE,CAAC,SAAS,CAAC,CAAC,CAAC;QAClE,OAAO,IAAI,CAAC;IACd,CAAC;CACF"}
@@ -0,0 +1,22 @@
1
+ import { type DreamWatermark } from "./dream-types.js";
2
+ import type { z } from "zod";
3
+ export interface JsonlReadResult<T> {
4
+ records: T[];
5
+ malformed_lines: number;
6
+ total_lines: number;
7
+ }
8
+ export interface JsonlRotationConfig {
9
+ rotation_mode: "size" | "date";
10
+ max_file_size_bytes: number;
11
+ target_fill_ratio: number;
12
+ }
13
+ declare function resolvedJsonlPath(filePath: string, rotationMode: "size" | "date"): string;
14
+ export declare function appendJsonlRecord(filePath: string, record: unknown, rotation: JsonlRotationConfig): Promise<string>;
15
+ export declare function readJsonlRecords<T>(filePath: string, schema?: z.ZodType<T>): Promise<JsonlReadResult<T>>;
16
+ export declare function readJsonlSinceLine<T>(filePath: string, sinceLine: number, schema?: z.ZodType<T>): Promise<JsonlReadResult<T>>;
17
+ export declare function loadDreamWatermarks(filePath: string): Promise<DreamWatermark>;
18
+ export declare function saveDreamWatermarks(filePath: string, watermarks: DreamWatermark): Promise<void>;
19
+ export declare function updateDreamWatermark(filePath: string, scope: "goal" | "importance_buffer", keyOrLine: string | number, timestamp: string): Promise<DreamWatermark>;
20
+ export declare function getJsonlLineCount(filePath: string): Promise<number>;
21
+ export { resolvedJsonlPath };
22
+ //# sourceMappingURL=dream-log-store.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dream-log-store.d.ts","sourceRoot":"","sources":["../../../src/platform/dream/dream-log-store.ts"],"names":[],"mappings":"AAGA,OAAO,EAAwB,KAAK,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAC7E,OAAO,KAAK,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAE7B,MAAM,WAAW,eAAe,CAAC,CAAC;IAChC,OAAO,EAAE,CAAC,EAAE,CAAC;IACb,eAAe,EAAE,MAAM,CAAC;IACxB,WAAW,E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CAEzE;AAED,OAAO,EAAE,iBAAiB,EAAE,CAAC"}
@@ -0,0 +1,150 @@
1
+ import * as fsp from "node:fs/promises";
2
+ import * as path from "node:path";
3
+ import { writeJsonFileAtomic, readJsonFileOrNull } from "../../base/utils/json-io.js";
4
+ import { DreamWatermarkSchema } from "./dream-types.js";
5
+ function todayISO() {
6
+ return new Date().toISOString().slice(0, 10);
7
+ }
8
+ function resolvedJsonlPath(filePath, rotationMode) {
9
+ if (rotationMode !== "date")
10
+ return filePath;
11
+ const ext = path.extname(filePath);
12
+ const stem = path.basename(filePath, ext);
13
+ return path.join(path.dirname(filePath), `${stem}.${todayISO()}${ext || ".jsonl"}`);
14
+ }
15
+ async function ensureDir(filePath) {
16
+ await fsp.mkdir(path.dirname(filePath), { recursive: true });
17
+ }
18
+ async function countLines(filePath) {
19
+ try {
20
+ const content = await fsp.readFile(filePath, "utf-8");
21
+ return content.split(/\r?\n/).filter((line) => line.trim().length > 0).length;
22
+ }
23
+ catch (err) {
24
+ if (err.code === "ENOENT")
25
+ return 0;
26
+ throw err;
27
+ }
28
+ }
29
+ async function maybeRotateBySize(filePath, rotation) {
30
+ if (rotation.rotation_mode !== "size")
31
+ return;
32
+ let stat;
33
+ try {
34
+ stat = await fsp.stat(filePath);
35
+ }
36
+ catch (err) {
37
+ if (err.code === "ENOENT")
38
+ return;
39
+ throw err;
40
+ }
41
+ const maxBytes = rotation.max_file_size_bytes;
42
+ if (stat.size <= maxBytes)
43
+ return;
44
+ const content = await fsp.readFile(filePath, "utf-8");
45
+ const lines = content.split(/\r?\n/).filter((line) => line.trim().length > 0);
46
+ const targetBytes = Math.max(1, Math.floor(maxBytes * rotation.target_fill_ratio));
47
+ const kept = [];
48
+ let bytes = 0;
49
+ for (let i = lines.length - 1; i >= 0; i--) {
50
+ const line = lines[i];
51
+ const lineBytes = Buffer.byteLength(line + "\n", "utf-8");
52
+ if (kept.length > 0 && bytes + lineBytes > targetBytes)
53
+ break;
54
+ kept.unshift(line);
55
+ bytes += lineBytes;
56
+ }
57
+ await fsp.writeFile(filePath, kept.length > 0 ? `${kept.join("\n")}\n` : "", "utf-8");
58
+ }
59
+ export async function appendJsonlRecord(filePath, record, rotation) {
60
+ const targetPath = resolvedJsonlPath(filePath, rotation.rotation_mode);
61
+ await ensureDir(targetPath);
62
+ await maybeRotateBySize(targetPath, rotation);
63
+ await fsp.appendFile(targetPath, `${JSON.stringify(record)}\n`, "utf-8");
64
+ return targetPath;
65
+ }
66
+ export async function readJsonlRecords(filePath, schema) {
67
+ let content = "";
68
+ try {
69
+ content = await fsp.readFile(filePath, "utf-8");
70
+ }
71
+ catch (err) {
72
+ if (err.code === "ENOENT") {
73
+ return { records: [], malformed_lines: 0, total_lines: 0 };
74
+ }
75
+ throw err;
76
+ }
77
+ const records = [];
78
+ let malformed = 0;
79
+ const lines = content.split(/\r?\n/);
80
+ for (const line of lines) {
81
+ const trimmed = line.trim();
82
+ if (!trimmed)
83
+ continue;
84
+ try {
85
+ const raw = JSON.parse(trimmed);
86
+ if (schema) {
87
+ const parsed = schema.safeParse(raw);
88
+ if (parsed.success) {
89
+ records.push(parsed.data);
90
+ }
91
+ else {
92
+ malformed++;
93
+ }
94
+ }
95
+ else {
96
+ records.push(raw);
97
+ }
98
+ }
99
+ catch {
100
+ malformed++;
101
+ }
102
+ }
103
+ return {
104
+ records,
105
+ malformed_lines: malformed,
106
+ total_lines: lines.filter((line) => line.trim().length > 0).length,
107
+ };
108
+ }
109
+ export async function readJsonlSinceLine(filePath, sinceLine, schema) {
110
+ const result = await readJsonlRecords(filePath, schema);
111
+ if (sinceLine <= 0)
112
+ return result;
113
+ return {
114
+ ...result,
115
+ records: result.records.slice(Math.max(0, sinceLine)),
116
+ };
117
+ }
118
+ export async function loadDreamWatermarks(filePath) {
119
+ const raw = await readJsonFileOrNull(filePath);
120
+ const parsed = DreamWatermarkSchema.safeParse(raw ?? {});
121
+ return parsed.success ? parsed.data : DreamWatermarkSchema.parse({});
122
+ }
123
+ export async function saveDreamWatermarks(filePath, watermarks) {
124
+ await writeJsonFileAtomic(filePath, DreamWatermarkSchema.parse(watermarks));
125
+ }
126
+ export async function updateDreamWatermark(filePath, scope, keyOrLine, timestamp) {
127
+ const current = await loadDreamWatermarks(filePath);
128
+ const updated = { ...current };
129
+ if (scope === "goal") {
130
+ const goalId = String(keyOrLine);
131
+ updated.goals[goalId] = {
132
+ lastProcessedLine: typeof keyOrLine === "number" ? keyOrLine : current.goals[goalId]?.lastProcessedLine ?? 0,
133
+ lastProcessedTimestamp: timestamp,
134
+ };
135
+ }
136
+ else {
137
+ const line = typeof keyOrLine === "number" ? keyOrLine : Number(keyOrLine) || 0;
138
+ updated.importanceBuffer = {
139
+ lastProcessedLine: line,
140
+ lastProcessedTimestamp: timestamp,
141
+ };
142
+ }
143
+ await saveDreamWatermarks(filePath, updated);
144
+ return updated;
145
+ }
146
+ export async function getJsonlLineCount(filePath) {
147
+ return countLines(filePath);
148
+ }
149
+ export { resolvedJsonlPath };
150
+ //# sourceMappingURL=dream-log-store.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dream-log-store.js","sourceRoot":"","sources":["../../../src/platform/dream/dream-log-store.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,GAAG,MAAM,kBAAkB,CAAC;AACxC,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAClC,OAAO,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AACtF,OAAO,EAAE,oBAAoB,EAAuB,MAAM,kBAAkB,CAAC;AAe7E,SAAS,QAAQ;IACf,OAAO,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;AAC/C,CAAC;AAED,SAAS,iBAAiB,CAAC,QAAgB,EAAE,YAA6B;IACxE,IAAI,YAAY,KAAK,MAAM;QAAE,OAAO,QAAQ,CAAC;IAC7C,MAAM,GAAG,GAAG,IAAI,CAAC,OAAO,CAAC,QAA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AAO,UAAU,CAAC,QAAQ,CAAC,CAAC;AAC9B,CAAC;AAED,OAAO,EAAE,iBAAiB,EAAE,CAAC"}
@@ -0,0 +1,26 @@
1
+ import { ScheduleEngine } from "../../runtime/schedule-engine.js";
2
+ import { type ScheduleEntry } from "../../runtime/types/schedule.js";
3
+ import { type ScheduleSuggestion } from "./dream-types.js";
4
+ export interface ResolvedScheduleSuggestion extends ScheduleSuggestion {
5
+ id: string;
6
+ status: "pending" | "applied" | "rejected" | "dismissed";
7
+ }
8
+ export declare class DreamScheduleSuggestionStore {
9
+ private readonly baseDir;
10
+ private readonly filePath;
11
+ constructor(baseDir: string);
12
+ load(): Promise<{
13
+ generated_at: string;
14
+ suggestions: ResolvedScheduleSuggestion[];
15
+ }>;
16
+ list(): Promise<ResolvedScheduleSuggestion[]>;
17
+ save(suggestions: ResolvedScheduleSuggestion[], generatedAt?: string): Promise<void>;
18
+ resolveSuggestion(idOrPrefix: string): Promise<ResolvedScheduleSuggestion | null>;
19
+ markDecision(idOrPrefix: string, status: "rejected" | "dismissed", reason?: string): Promise<ResolvedScheduleSuggestion>;
20
+ applySuggestion(idOrPrefix: string, scheduleEngine: ScheduleEngine): Promise<{
21
+ suggestion: ResolvedScheduleSuggestion;
22
+ entry: ScheduleEntry;
23
+ duplicate: boolean;
24
+ }>;
25
+ }
26
+ //# sourceMappingURL=dream-schedule-suggestions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dream-schedule-suggestions.d.ts","sourceRoot":"","sources":["../../../src/platform/dream/dream-schedule-suggestions.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,cAAc,EAAE,MAAM,kCAAkC,CAAC;AAClE,OAAO,EAEL,KAAK,aAAa,EAGnB,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAGL,KAAK,kBAAkB,EACxB,MAAM,kBAAkB,CAAC;AAsB1B,MAAM,WAAW,0BAA2B,SAAQ,kBAAkB;IACpE,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,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