@agimon-ai/doompi-task 0.0.1-alpha.9 → 0.0.1-alpha.91

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 (383) hide show
  1. package/README.md +123 -15
  2. package/dist/apiContracts.cjs +54 -0
  3. package/dist/apiContracts.cjs.map +1 -0
  4. package/dist/apiContracts.d.mts +53 -0
  5. package/dist/apiContracts.d.mts.map +1 -0
  6. package/dist/apiContracts.mjs +49 -0
  7. package/dist/apiContracts.mjs.map +1 -0
  8. package/dist/commands.cjs +4 -2
  9. package/dist/commands.d.mts +12 -6
  10. package/dist/commands.d.mts.map +1 -1
  11. package/dist/commands.mjs +2 -2
  12. package/dist/config-BPNE_wEU.cjs +173 -0
  13. package/dist/config-BPNE_wEU.cjs.map +1 -0
  14. package/dist/config-DmsCPDuF.mjs +72 -0
  15. package/dist/config-DmsCPDuF.mjs.map +1 -0
  16. package/dist/config.cjs +19 -2
  17. package/dist/config.d.mts +2 -38
  18. package/dist/config.mjs +2 -2
  19. package/dist/delegation-3hMdTFXF.cjs +661 -0
  20. package/dist/delegation-3hMdTFXF.cjs.map +1 -0
  21. package/dist/delegation-BiOy3_7g.mjs +7 -0
  22. package/dist/delegation-BiOy3_7g.mjs.map +1 -0
  23. package/dist/delegation-CkGbRaOl.mjs +626 -0
  24. package/dist/delegation-CkGbRaOl.mjs.map +1 -0
  25. package/dist/delegation-LDpHP2CC.cjs +12 -0
  26. package/dist/delegation-LDpHP2CC.cjs.map +1 -0
  27. package/dist/delegation-Ot2xltLi.d.mts +6 -0
  28. package/dist/delegation-Ot2xltLi.d.mts.map +1 -0
  29. package/dist/delegationManager.cjs +10 -0
  30. package/dist/delegationManager.d.mts +3 -0
  31. package/dist/delegationManager.mjs +3 -0
  32. package/dist/delegationPlatform-Cfn-Lqew.cjs +95 -0
  33. package/dist/delegationPlatform-Cfn-Lqew.cjs.map +1 -0
  34. package/dist/delegationPlatform-DZ4SZ8a5.mjs +64 -0
  35. package/dist/delegationPlatform-DZ4SZ8a5.mjs.map +1 -0
  36. package/dist/extensions/mcp-ui.mjs +23 -0
  37. package/dist/extensions/mcp-ui.mjs.map +1 -0
  38. package/dist/extensions/mcp.cjs +1876 -0
  39. package/dist/extensions/mcp.cjs.map +1 -0
  40. package/dist/extensions/mcp.d.mts +5 -0
  41. package/dist/extensions/mcp.d.mts.map +1 -0
  42. package/dist/extensions/mcp.mjs +1846 -0
  43. package/dist/extensions/mcp.mjs.map +1 -0
  44. package/dist/extensions/pi.cjs +437 -1
  45. package/dist/extensions/pi.cjs.map +1 -1
  46. package/dist/extensions/pi.d.mts +5 -2
  47. package/dist/extensions/pi.d.mts.map +1 -0
  48. package/dist/extensions/pi.mjs +432 -1
  49. package/dist/extensions/pi.mjs.map +1 -1
  50. package/dist/extensions/server.cjs +380 -0
  51. package/dist/extensions/server.cjs.map +1 -0
  52. package/dist/extensions/server.d.mts +5 -0
  53. package/dist/extensions/server.d.mts.map +1 -0
  54. package/dist/extensions/server.mjs +375 -0
  55. package/dist/extensions/server.mjs.map +1 -0
  56. package/dist/extensions/web.mjs +1013 -0
  57. package/dist/extensions/web.mjs.map +1 -0
  58. package/dist/format.cli-ChQsP1MQ.cjs +393 -0
  59. package/dist/format.cli-ChQsP1MQ.cjs.map +1 -0
  60. package/dist/format.cli-Cnc591eb.mjs +322 -0
  61. package/dist/format.cli-Cnc591eb.mjs.map +1 -0
  62. package/dist/{delegation/manager.d.cts → index-3-3ZJlaH.d.mts} +42 -39
  63. package/dist/index-3-3ZJlaH.d.mts.map +1 -0
  64. package/dist/{store/taskStore.d.cts → index-B7oVjSey.d.mts} +16 -23
  65. package/dist/index-B7oVjSey.d.mts.map +1 -0
  66. package/dist/{store/reconcile.d.cts → index-BNMm9g0K.d.mts} +4 -4
  67. package/dist/index-BNMm9g0K.d.mts.map +1 -0
  68. package/dist/{tool/responseEnvelope.d.cts → index-C3DgOhEm.d.mts} +17 -5
  69. package/dist/index-C3DgOhEm.d.mts.map +1 -0
  70. package/dist/{config.d.cts → index-D4goIk4Z.d.mts} +8 -3
  71. package/dist/index-D4goIk4Z.d.mts.map +1 -0
  72. package/dist/{store/reducer.d.mts → index-DIpc6_uJ.d.mts} +5 -5
  73. package/dist/index-DIpc6_uJ.d.mts.map +1 -0
  74. package/dist/{store/paths.d.cts → index-XY9VPmfm.d.mts} +9 -6
  75. package/dist/index-XY9VPmfm.d.mts.map +1 -0
  76. package/dist/index.cjs +106 -1
  77. package/dist/index.d.mts +16 -15
  78. package/dist/index.mjs +16 -1
  79. package/dist/invariants-DhjEjBPU.cjs +79 -0
  80. package/dist/invariants-DhjEjBPU.cjs.map +1 -0
  81. package/dist/invariants-q_UamF7D.mjs +62 -0
  82. package/dist/invariants-q_UamF7D.mjs.map +1 -0
  83. package/dist/logSinkTelemetry-C5QjZipw.mjs +41 -0
  84. package/dist/logSinkTelemetry-C5QjZipw.mjs.map +1 -0
  85. package/dist/logSinkTelemetry-CqiTuh3a.cjs +52 -0
  86. package/dist/logSinkTelemetry-CqiTuh3a.cjs.map +1 -0
  87. package/dist/logSinkTelemetry.cjs +6 -2
  88. package/dist/logSinkTelemetry.d.mts +7 -35
  89. package/dist/logSinkTelemetry.d.mts.map +1 -1
  90. package/dist/logSinkTelemetry.mjs +3 -2
  91. package/dist/paths-Bg8EEbk1.mjs +218 -0
  92. package/dist/paths-Bg8EEbk1.mjs.map +1 -0
  93. package/dist/paths-BsFVRulr.cjs +320 -0
  94. package/dist/paths-BsFVRulr.cjs.map +1 -0
  95. package/dist/processLiveness-Ccd9wenT.mjs +20 -0
  96. package/dist/processLiveness-Ccd9wenT.mjs.map +1 -0
  97. package/dist/processLiveness-umpNgsPR.cjs +25 -0
  98. package/dist/processLiveness-umpNgsPR.cjs.map +1 -0
  99. package/dist/promptGuidelines-DaxWrqud.d.mts +14 -0
  100. package/dist/promptGuidelines-DaxWrqud.d.mts.map +1 -0
  101. package/dist/promptGuidelines-g4QT8GNM.mjs +26 -0
  102. package/dist/promptGuidelines-g4QT8GNM.mjs.map +1 -0
  103. package/dist/promptGuidelines-j_SZTzlH.cjs +31 -0
  104. package/dist/promptGuidelines-j_SZTzlH.cjs.map +1 -0
  105. package/dist/reconcile-BcD-hTbd.mjs +63 -0
  106. package/dist/reconcile-BcD-hTbd.mjs.map +1 -0
  107. package/dist/reconcile-cRL0NjDr.cjs +80 -0
  108. package/dist/reconcile-cRL0NjDr.cjs.map +1 -0
  109. package/dist/reducer-BEfJFM5L.mjs +345 -0
  110. package/dist/reducer-BEfJFM5L.mjs.map +1 -0
  111. package/dist/reducer-BV0YIZ2o.cjs +380 -0
  112. package/dist/reducer-BV0YIZ2o.cjs.map +1 -0
  113. package/dist/root.cli-swHZqusx.d.mts +56 -0
  114. package/dist/root.cli-swHZqusx.d.mts.map +1 -0
  115. package/dist/selectors-BaS6dObz.mjs +142 -0
  116. package/dist/selectors-BaS6dObz.mjs.map +1 -0
  117. package/dist/{tui/selectors.d.cts → selectors-DPDPPjH3.d.mts} +11 -4
  118. package/dist/selectors-DPDPPjH3.d.mts.map +1 -0
  119. package/dist/selectors-b-69vb4W.cjs +189 -0
  120. package/dist/selectors-b-69vb4W.cjs.map +1 -0
  121. package/dist/storeInvariants.cjs +5 -0
  122. package/dist/storeInvariants.d.mts +23 -0
  123. package/dist/storeInvariants.d.mts.map +1 -0
  124. package/dist/storeInvariants.mjs +2 -0
  125. package/dist/storePaths.cjs +14 -0
  126. package/dist/storePaths.d.mts +2 -0
  127. package/dist/storePaths.mjs +2 -0
  128. package/dist/storeProcessLiveness.cjs +3 -0
  129. package/dist/{store/processLiveness.d.mts → storeProcessLiveness.d.mts} +3 -4
  130. package/dist/storeProcessLiveness.d.mts.map +1 -0
  131. package/dist/storeProcessLiveness.mjs +2 -0
  132. package/dist/storeReconcile.cjs +5 -0
  133. package/dist/storeReconcile.d.mts +2 -0
  134. package/dist/storeReconcile.mjs +2 -0
  135. package/dist/storeReducer.cjs +8 -0
  136. package/dist/storeReducer.d.mts +2 -0
  137. package/dist/storeReducer.mjs +2 -0
  138. package/dist/storeTaskGraph.cjs +7 -0
  139. package/dist/storeTaskGraph.d.mts +2 -0
  140. package/dist/storeTaskGraph.mjs +2 -0
  141. package/dist/storeTaskStore.cjs +3 -0
  142. package/dist/storeTaskStore.d.mts +2 -0
  143. package/dist/storeTaskStore.mjs +2 -0
  144. package/dist/storeTypes.cjs +6 -0
  145. package/dist/storeTypes.d.mts +2 -0
  146. package/dist/storeTypes.mjs +2 -0
  147. package/dist/task-B4aF5J9s.mjs +6 -0
  148. package/dist/task-B4aF5J9s.mjs.map +1 -0
  149. package/dist/task-CXF9VULl.cjs +49 -0
  150. package/dist/task-CXF9VULl.cjs.map +1 -0
  151. package/dist/task-CkFjC3Fo.d.mts +5 -0
  152. package/dist/task-CkFjC3Fo.d.mts.map +1 -0
  153. package/dist/{tool/schema.d.cts → task-DHSvdK6E.d.mts} +34 -18
  154. package/dist/task-DHSvdK6E.d.mts.map +1 -0
  155. package/dist/task-DKHKuems.mjs +116 -0
  156. package/dist/task-DKHKuems.mjs.map +1 -0
  157. package/dist/task-DaagqdPK.cjs +11 -0
  158. package/dist/task-DaagqdPK.cjs.map +1 -0
  159. package/dist/task-Dqy88_rr.cjs +193 -0
  160. package/dist/task-Dqy88_rr.cjs.map +1 -0
  161. package/dist/task-giCbpKzV.mjs +26 -0
  162. package/dist/task-giCbpKzV.mjs.map +1 -0
  163. package/dist/{store/types.d.mts → task-hLh4BOO7.d.mts} +37 -15
  164. package/dist/task-hLh4BOO7.d.mts.map +1 -0
  165. package/dist/task-space.cli-BH4Iy_7m.cjs +372 -0
  166. package/dist/task-space.cli-BH4Iy_7m.cjs.map +1 -0
  167. package/dist/task-space.cli-CMYNjgOW.mjs +355 -0
  168. package/dist/task-space.cli-CMYNjgOW.mjs.map +1 -0
  169. package/dist/task.cli-BM34E7GG.mjs +157 -0
  170. package/dist/task.cli-BM34E7GG.mjs.map +1 -0
  171. package/dist/task.cli-CiTkjUaX.cjs +174 -0
  172. package/dist/task.cli-CiTkjUaX.cjs.map +1 -0
  173. package/dist/taskGraph-BOQvT0-M.mjs +63 -0
  174. package/dist/taskGraph-BOQvT0-M.mjs.map +1 -0
  175. package/dist/taskGraph-BskRslrr.cjs +92 -0
  176. package/dist/taskGraph-BskRslrr.cjs.map +1 -0
  177. package/dist/{store/taskGraph.d.cts → taskGraph-YQXCfXTn.d.mts} +4 -4
  178. package/dist/taskGraph-YQXCfXTn.d.mts.map +1 -0
  179. package/dist/taskOverlay-B5wJHiml.cjs +175 -0
  180. package/dist/taskOverlay-B5wJHiml.cjs.map +1 -0
  181. package/dist/taskOverlay-CljDoTj_.mjs +164 -0
  182. package/dist/taskOverlay-CljDoTj_.mjs.map +1 -0
  183. package/dist/taskResult-D2G7b4w-.cjs +224 -0
  184. package/dist/taskResult-D2G7b4w-.cjs.map +1 -0
  185. package/dist/taskResult-edBAAKSH.mjs +165 -0
  186. package/dist/taskResult-edBAAKSH.mjs.map +1 -0
  187. package/dist/taskStore-CFx12KJk.mjs +213 -0
  188. package/dist/taskStore-CFx12KJk.mjs.map +1 -0
  189. package/dist/taskStore-T1pPy-UJ.cjs +220 -0
  190. package/dist/taskStore-T1pPy-UJ.cjs.map +1 -0
  191. package/dist/tasks.cli-8VvuN9YQ.cjs +40 -0
  192. package/dist/tasks.cli-8VvuN9YQ.cjs.map +1 -0
  193. package/dist/tasks.cli-BZj83YD_.mjs +29 -0
  194. package/dist/tasks.cli-BZj83YD_.mjs.map +1 -0
  195. package/dist/telemetry-DOyZLj8E.d.mts +36 -0
  196. package/dist/telemetry-DOyZLj8E.d.mts.map +1 -0
  197. package/dist/telemetry-I4md7Xzz.cjs +31 -0
  198. package/dist/telemetry-I4md7Xzz.cjs.map +1 -0
  199. package/dist/telemetry-PmX_1Y8a.mjs +26 -0
  200. package/dist/telemetry-PmX_1Y8a.mjs.map +1 -0
  201. package/dist/toolPromptGuidelines.cjs +3 -0
  202. package/dist/toolPromptGuidelines.d.mts +2 -0
  203. package/dist/toolPromptGuidelines.mjs +2 -0
  204. package/dist/toolResponseEnvelope.cjs +12 -0
  205. package/dist/toolResponseEnvelope.d.mts +2 -0
  206. package/dist/toolResponseEnvelope.mjs +2 -0
  207. package/dist/toolSchema.cjs +17 -0
  208. package/dist/toolSchema.d.mts +3 -0
  209. package/dist/toolSchema.mjs +3 -0
  210. package/dist/toolTaskTool.cjs +6 -0
  211. package/dist/toolTaskTool.d.mts +3 -0
  212. package/dist/toolTaskTool.mjs +3 -0
  213. package/dist/tuiFormat.cjs +14 -0
  214. package/dist/tuiFormat.d.mts +61 -0
  215. package/dist/tuiFormat.d.mts.map +1 -0
  216. package/dist/tuiFormat.mjs +2 -0
  217. package/dist/tuiSelectors.cjs +10 -0
  218. package/dist/tuiSelectors.d.mts +2 -0
  219. package/dist/tuiSelectors.mjs +2 -0
  220. package/dist/tuiTaskOverlay.cjs +4 -0
  221. package/dist/{tui/taskOverlay.d.cts → tuiTaskOverlay.d.mts} +9 -8
  222. package/dist/tuiTaskOverlay.d.mts.map +1 -0
  223. package/dist/tuiTaskOverlay.mjs +2 -0
  224. package/dist/tuiTaskSpace.cjs +5 -0
  225. package/dist/{tui/taskSpace.d.cts → tuiTaskSpace.d.mts} +11 -12
  226. package/dist/tuiTaskSpace.d.mts.map +1 -0
  227. package/dist/tuiTaskSpace.mjs +2 -0
  228. package/package.json +175 -109
  229. package/src/types/webTasks.ts +24 -0
  230. package/dist/_virtual/_rolldown/runtime.cjs +0 -1
  231. package/dist/commands.cjs.map +0 -1
  232. package/dist/commands.d.cts +0 -14
  233. package/dist/commands.d.cts.map +0 -1
  234. package/dist/commands.mjs.map +0 -1
  235. package/dist/config.cjs.map +0 -1
  236. package/dist/config.d.cts.map +0 -1
  237. package/dist/config.d.mts.map +0 -1
  238. package/dist/config.mjs.map +0 -1
  239. package/dist/delegation/manager.cjs +0 -6
  240. package/dist/delegation/manager.cjs.map +0 -1
  241. package/dist/delegation/manager.d.cts.map +0 -1
  242. package/dist/delegation/manager.d.mts +0 -189
  243. package/dist/delegation/manager.d.mts.map +0 -1
  244. package/dist/delegation/manager.mjs +0 -6
  245. package/dist/delegation/manager.mjs.map +0 -1
  246. package/dist/extension.cjs +0 -3
  247. package/dist/extension.cjs.map +0 -1
  248. package/dist/extension.d.cts +0 -12
  249. package/dist/extension.d.cts.map +0 -1
  250. package/dist/extension.d.mts +0 -12
  251. package/dist/extension.d.mts.map +0 -1
  252. package/dist/extension.mjs +0 -3
  253. package/dist/extension.mjs.map +0 -1
  254. package/dist/extensions/doom.cjs +0 -2
  255. package/dist/extensions/doom.cjs.map +0 -1
  256. package/dist/extensions/doom.d.cts +0 -6
  257. package/dist/extensions/doom.d.cts.map +0 -1
  258. package/dist/extensions/doom.d.mts +0 -7
  259. package/dist/extensions/doom.d.mts.map +0 -1
  260. package/dist/extensions/doom.mjs +0 -2
  261. package/dist/extensions/doom.mjs.map +0 -1
  262. package/dist/extensions/pi.d.cts +0 -2
  263. package/dist/index.d.cts +0 -15
  264. package/dist/logSinkTelemetry.cjs.map +0 -1
  265. package/dist/logSinkTelemetry.d.cts +0 -51
  266. package/dist/logSinkTelemetry.d.cts.map +0 -1
  267. package/dist/logSinkTelemetry.mjs.map +0 -1
  268. package/dist/store/invariants.cjs +0 -2
  269. package/dist/store/invariants.cjs.map +0 -1
  270. package/dist/store/invariants.d.cts +0 -14
  271. package/dist/store/invariants.d.cts.map +0 -1
  272. package/dist/store/invariants.d.mts +0 -14
  273. package/dist/store/invariants.d.mts.map +0 -1
  274. package/dist/store/invariants.mjs +0 -2
  275. package/dist/store/invariants.mjs.map +0 -1
  276. package/dist/store/paths.cjs +0 -2
  277. package/dist/store/paths.cjs.map +0 -1
  278. package/dist/store/paths.d.cts.map +0 -1
  279. package/dist/store/paths.d.mts +0 -23
  280. package/dist/store/paths.d.mts.map +0 -1
  281. package/dist/store/paths.mjs +0 -2
  282. package/dist/store/paths.mjs.map +0 -1
  283. package/dist/store/processLiveness.cjs +0 -2
  284. package/dist/store/processLiveness.cjs.map +0 -1
  285. package/dist/store/processLiveness.d.cts +0 -12
  286. package/dist/store/processLiveness.d.cts.map +0 -1
  287. package/dist/store/processLiveness.d.mts.map +0 -1
  288. package/dist/store/processLiveness.mjs +0 -2
  289. package/dist/store/processLiveness.mjs.map +0 -1
  290. package/dist/store/reconcile.cjs +0 -2
  291. package/dist/store/reconcile.cjs.map +0 -1
  292. package/dist/store/reconcile.d.cts.map +0 -1
  293. package/dist/store/reconcile.d.mts +0 -34
  294. package/dist/store/reconcile.d.mts.map +0 -1
  295. package/dist/store/reconcile.mjs +0 -2
  296. package/dist/store/reconcile.mjs.map +0 -1
  297. package/dist/store/reducer.cjs +0 -3
  298. package/dist/store/reducer.cjs.map +0 -1
  299. package/dist/store/reducer.d.cts +0 -72
  300. package/dist/store/reducer.d.cts.map +0 -1
  301. package/dist/store/reducer.d.mts.map +0 -1
  302. package/dist/store/reducer.mjs +0 -3
  303. package/dist/store/reducer.mjs.map +0 -1
  304. package/dist/store/taskGraph.cjs +0 -2
  305. package/dist/store/taskGraph.cjs.map +0 -1
  306. package/dist/store/taskGraph.d.cts.map +0 -1
  307. package/dist/store/taskGraph.d.mts +0 -25
  308. package/dist/store/taskGraph.d.mts.map +0 -1
  309. package/dist/store/taskGraph.mjs +0 -2
  310. package/dist/store/taskGraph.mjs.map +0 -1
  311. package/dist/store/taskStore.cjs +0 -2
  312. package/dist/store/taskStore.cjs.map +0 -1
  313. package/dist/store/taskStore.d.cts.map +0 -1
  314. package/dist/store/taskStore.d.mts +0 -77
  315. package/dist/store/taskStore.d.mts.map +0 -1
  316. package/dist/store/taskStore.mjs +0 -2
  317. package/dist/store/taskStore.mjs.map +0 -1
  318. package/dist/store/types.cjs +0 -2
  319. package/dist/store/types.cjs.map +0 -1
  320. package/dist/store/types.d.cts +0 -165
  321. package/dist/store/types.d.cts.map +0 -1
  322. package/dist/store/types.d.mts.map +0 -1
  323. package/dist/store/types.mjs +0 -2
  324. package/dist/store/types.mjs.map +0 -1
  325. package/dist/tool/promptGuidelines.cjs +0 -2
  326. package/dist/tool/promptGuidelines.cjs.map +0 -1
  327. package/dist/tool/promptGuidelines.d.cts +0 -5
  328. package/dist/tool/promptGuidelines.d.cts.map +0 -1
  329. package/dist/tool/promptGuidelines.d.mts +0 -5
  330. package/dist/tool/promptGuidelines.d.mts.map +0 -1
  331. package/dist/tool/promptGuidelines.mjs +0 -2
  332. package/dist/tool/promptGuidelines.mjs.map +0 -1
  333. package/dist/tool/responseEnvelope.cjs +0 -6
  334. package/dist/tool/responseEnvelope.cjs.map +0 -1
  335. package/dist/tool/responseEnvelope.d.cts.map +0 -1
  336. package/dist/tool/responseEnvelope.d.mts +0 -39
  337. package/dist/tool/responseEnvelope.d.mts.map +0 -1
  338. package/dist/tool/responseEnvelope.mjs +0 -6
  339. package/dist/tool/responseEnvelope.mjs.map +0 -1
  340. package/dist/tool/schema.cjs +0 -2
  341. package/dist/tool/schema.cjs.map +0 -1
  342. package/dist/tool/schema.d.cts.map +0 -1
  343. package/dist/tool/schema.d.mts +0 -86
  344. package/dist/tool/schema.d.mts.map +0 -1
  345. package/dist/tool/schema.mjs +0 -2
  346. package/dist/tool/schema.mjs.map +0 -1
  347. package/dist/tool/taskTool.cjs +0 -3
  348. package/dist/tool/taskTool.cjs.map +0 -1
  349. package/dist/tool/taskTool.d.cts +0 -17
  350. package/dist/tool/taskTool.d.cts.map +0 -1
  351. package/dist/tool/taskTool.d.mts +0 -17
  352. package/dist/tool/taskTool.d.mts.map +0 -1
  353. package/dist/tool/taskTool.mjs +0 -3
  354. package/dist/tool/taskTool.mjs.map +0 -1
  355. package/dist/tui/format.cjs +0 -4
  356. package/dist/tui/format.cjs.map +0 -1
  357. package/dist/tui/format.d.cts +0 -62
  358. package/dist/tui/format.d.cts.map +0 -1
  359. package/dist/tui/format.d.mts +0 -62
  360. package/dist/tui/format.d.mts.map +0 -1
  361. package/dist/tui/format.mjs +0 -4
  362. package/dist/tui/format.mjs.map +0 -1
  363. package/dist/tui/selectors.cjs +0 -2
  364. package/dist/tui/selectors.cjs.map +0 -1
  365. package/dist/tui/selectors.d.cts.map +0 -1
  366. package/dist/tui/selectors.d.mts +0 -53
  367. package/dist/tui/selectors.d.mts.map +0 -1
  368. package/dist/tui/selectors.mjs +0 -2
  369. package/dist/tui/selectors.mjs.map +0 -1
  370. package/dist/tui/taskOverlay.cjs +0 -2
  371. package/dist/tui/taskOverlay.cjs.map +0 -1
  372. package/dist/tui/taskOverlay.d.cts.map +0 -1
  373. package/dist/tui/taskOverlay.d.mts +0 -38
  374. package/dist/tui/taskOverlay.d.mts.map +0 -1
  375. package/dist/tui/taskOverlay.mjs +0 -2
  376. package/dist/tui/taskOverlay.mjs.map +0 -1
  377. package/dist/tui/taskSpace.cjs +0 -5
  378. package/dist/tui/taskSpace.cjs.map +0 -1
  379. package/dist/tui/taskSpace.d.cts.map +0 -1
  380. package/dist/tui/taskSpace.d.mts +0 -61
  381. package/dist/tui/taskSpace.d.mts.map +0 -1
  382. package/dist/tui/taskSpace.mjs +0 -5
  383. package/dist/tui/taskSpace.mjs.map +0 -1
@@ -1,6 +1,6 @@
1
- import { TaskAction, TaskDetails, TaskDocument, TaskMutationParams } from "../store/types.cjs";
2
- import { Op } from "../store/reducer.cjs";
3
- //#region src/tool/responseEnvelope.d.ts
1
+ import { c as TaskAction, d as TaskDetails, f as TaskDocument, m as TaskMutationParams, t as AssignmentSummary } from "./task-hLh4BOO7.mjs";
2
+ import { r as Op } from "./index-DIpc6_uJ.mjs";
3
+ //#region src/services/taskResult/index.d.ts
4
4
  declare const MSG_ALL_COMPLETE_CLEAR = "All tasks are completed. Review the full task list once more, then close it with task {\"action\":\"clear\"}.";
5
5
  /**
6
6
  * Steering for a mixed batch. Unlike a batch of spawned subagents, a failed
@@ -10,6 +10,16 @@ declare const MSG_ALL_COMPLETE_CLEAR = "All tasks are completed. Review the full
10
10
  */
11
11
  declare const MSG_UPSERT_PARTIAL = "The applied entries are committed. Resend only the failed entries, corrected — a failed entry changed nothing, so a corrected retry is safe. Do not resend an entry that already applied: an entry without an id creates a second task.";
12
12
  declare const MSG_UPSERT_NONE_APPLIED = "No task changed, so the whole call can be resent once corrected.";
13
+ declare const MSG_ASSIGN_PARTIAL = "Successful assignments are already running. Retry only the failed entries after correcting their task state or arguments; do not resend successful entries.";
14
+ interface AssignmentItemResult {
15
+ index: number;
16
+ id: number;
17
+ agent: string;
18
+ ok: boolean;
19
+ message: string;
20
+ }
21
+ /** LLM-facing report for a native assignment batch. */
22
+ declare function formatAssignmentResults(items: readonly AssignmentItemResult[]): string;
13
23
  /**
14
24
  * The thrown message when an upsert applied nothing. Kept separate from
15
25
  * `formatContent` because the caller wraps it in the actionable Options block
@@ -32,8 +42,10 @@ interface ToolResult {
32
42
  }
33
43
  /** Build the LLM-facing envelope. `details` carries the post-mutation snapshot. */
34
44
  declare function buildToolResult(action: TaskAction, params: TaskMutationParams, document: TaskDocument, op: Op): ToolResult;
45
+ /** Envelope for a native assignment batch, including ids used by the consolidated TUI result. */
46
+ declare function buildAssignmentResult(params: TaskMutationParams, document: TaskDocument, text: string, assignment: AssignmentSummary): ToolResult;
35
47
  /** Envelope for delegation actions, which do not flow through the reducer. */
36
48
  declare function buildTextResult(action: TaskAction, params: TaskMutationParams, document: TaskDocument, text: string, error?: string): ToolResult;
37
49
  //#endregion
38
- export { MSG_ALL_COMPLETE_CLEAR, MSG_UPSERT_NONE_APPLIED, MSG_UPSERT_PARTIAL, ToolResult, buildTextResult, buildToolResult, formatContent, formatUpsertFailureText };
39
- //# sourceMappingURL=responseEnvelope.d.cts.map
50
+ export { MSG_UPSERT_PARTIAL as a, buildTextResult as c, formatContent as d, formatUpsertFailureText as f, MSG_UPSERT_NONE_APPLIED as i, buildToolResult as l, MSG_ALL_COMPLETE_CLEAR as n, ToolResult as o, MSG_ASSIGN_PARTIAL as r, buildAssignmentResult as s, AssignmentItemResult as t, formatAssignmentResults as u };
51
+ //# sourceMappingURL=index-C3DgOhEm.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index-C3DgOhEm.d.mts","names":[],"sources":["../src/services/taskResult/index.ts"],"mappings":";;;cAYa;;;;;;;cASA;cAGA;cAEA;UAGI;EACf;EACA;EACA;EACA;EACA;;;iBAIc,wBAAwB,gBAAgB;;;;;;iBAgFxC,wBAAwB,IAAI,QAAQ;EAAM;;;;;;iBAa1C,cAAc,IAAI,IAAI,UAAU;UAmC/B;EACf,SAAS;IAAQ;IAAc;;EAC/B,SAAS;;;iBAIK,gBACd,QAAQ,YACR,QAAQ,oBACR,UAAU,cACV,IAAI,KACH;;iBA0Ba,sBACd,QAAQ,oBACR,UAAU,cACV,cACA,YAAY,oBACX;;iBAea,gBACd,QAAQ,YACR,QAAQ,oBACR,UAAU,cACV,cACA,iBACC"}
@@ -1,4 +1,4 @@
1
- //#region src/config.d.ts
1
+ //#region src/services/config/index.d.ts
2
2
  /**
3
3
  * Extension configuration, read from the environment.
4
4
  *
@@ -7,10 +7,12 @@
7
7
  * configures the rest of the extension set.
8
8
  */
9
9
  declare const MAX_WIDGET_LINES_ENV = "DOOM_TASK_MAX_WIDGET_LINES";
10
+ declare const MAX_TASKS_ENV = "DOOM_TASK_MAX_TASKS";
10
11
  declare const COLLAPSE_KEY_ENV = "DOOM_TASK_COLLAPSE_KEY";
11
12
  declare const STORE_TTL_MS_ENV = "DOOM_TASK_STORE_TTL_MS";
12
13
  declare const DELEGATION_TIMEOUT_MS_ENV = "DOOM_TASK_DELEGATION_TIMEOUT_MS";
13
14
  declare const DEFAULT_MAX_WIDGET_LINES = 12;
15
+ declare const DEFAULT_MAX_TASKS = 15;
14
16
  declare const DEFAULT_COLLAPSE_KEY = "ctrl+shift+t";
15
17
  declare const DEFAULT_STORE_TTL_MS: number;
16
18
  /** Deliberately under the subagents auto-drain ceiling (30 min) so a headless
@@ -19,6 +21,7 @@ declare const DEFAULT_DELEGATION_TIMEOUT_MS: number;
19
21
  declare const COLLAPSE_KEY_OFF = "off";
20
22
  interface PiTaskConfig {
21
23
  maxWidgetLines: number;
24
+ maxTasks: number;
22
25
  storeTtlMs: number;
23
26
  collapseKey: string;
24
27
  delegationTimeoutMs: number;
@@ -27,6 +30,8 @@ interface PiTaskConfig {
27
30
  declare function parsePiTaskConfig(value: unknown): PiTaskConfig;
28
31
  /** Rows the overlay may use for content, clamped to a sane range. */
29
32
  declare function getMaxWidgetLines(env?: NodeJS.ProcessEnv): number;
33
+ /** Maximum number of non-deleted tasks retained on one board. */
34
+ declare function getMaxTasks(env?: NodeJS.ProcessEnv): number;
30
35
  /** Retention window for inactive session-tree stores. */
31
36
  declare function getStoreTtlMs(env?: NodeJS.ProcessEnv): number;
32
37
  /** How long a delegated run may go without reporting a result. */
@@ -34,5 +39,5 @@ declare function getDelegationTimeoutMs(env?: NodeJS.ProcessEnv): number;
34
39
  /** Collapse shortcut, or the `off` sentinel when the user disabled it. */
35
40
  declare function resolveCollapseKey(env?: NodeJS.ProcessEnv): string;
36
41
  //#endregion
37
- export { COLLAPSE_KEY_ENV, COLLAPSE_KEY_OFF, DEFAULT_COLLAPSE_KEY, DEFAULT_DELEGATION_TIMEOUT_MS, DEFAULT_MAX_WIDGET_LINES, DEFAULT_STORE_TTL_MS, DELEGATION_TIMEOUT_MS_ENV, MAX_WIDGET_LINES_ENV, PiTaskConfig, STORE_TTL_MS_ENV, getDelegationTimeoutMs, getMaxWidgetLines, getStoreTtlMs, parsePiTaskConfig, resolveCollapseKey };
38
- //# sourceMappingURL=config.d.cts.map
42
+ export { parsePiTaskConfig as _, DEFAULT_MAX_TASKS as a, DELEGATION_TIMEOUT_MS_ENV as c, PiTaskConfig as d, STORE_TTL_MS_ENV as f, getStoreTtlMs as g, getMaxWidgetLines as h, DEFAULT_DELEGATION_TIMEOUT_MS as i, MAX_TASKS_ENV as l, getMaxTasks as m, COLLAPSE_KEY_OFF as n, DEFAULT_MAX_WIDGET_LINES as o, getDelegationTimeoutMs as p, DEFAULT_COLLAPSE_KEY as r, DEFAULT_STORE_TTL_MS as s, COLLAPSE_KEY_ENV as t, MAX_WIDGET_LINES_ENV as u, resolveCollapseKey as v };
43
+ //# sourceMappingURL=index-D4goIk4Z.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index-D4goIk4Z.d.mts","names":[],"sources":["../src/services/config/index.ts"],"mappings":";;;;;;;;cAQa;cACA;cACA;cACA;cACA;cAEA;cACA;cACA;cACA;;;cAGA;cACA;UAKI;EACf;EACA;EACA;EACA;EACA;;;iBAQc,kBAAkB,iBAAiB;;iBA+BnC,kBAAkB,MAAK,OAAO;;iBAO9B,YAAY,MAAK,OAAO;;iBAMxB,cAAc,MAAK,OAAO;;iBAM1B,uBAAuB,MAAK,OAAO;;iBAMnC,mBAAmB,MAAK,OAAO"}
@@ -1,5 +1,5 @@
1
- import { Task, TaskAction, TaskDocument, TaskMutationParams, TaskStatus, UpsertItemOutcome } from "./types.mjs";
2
- //#region src/store/reducer.d.ts
1
+ import { c as TaskAction, f as TaskDocument, g as UpsertItemOutcome, h as TaskStatus, m as TaskMutationParams, s as Task } from "./task-hLh4BOO7.mjs";
2
+ //#region src/services/reducer/index.d.ts
3
3
  /** Bounds the work one call can do, and with it the size of one committed write. */
4
4
  declare const MAX_UPSERT_ITEMS = 100;
5
5
  /**
@@ -66,7 +66,7 @@ declare function singleItemOutcome(op: Op): UpsertItemOutcome | undefined;
66
66
  * (transition legality, dangling or deleted blockedBy, self-block, cycles,
67
67
  * in-flight delegations). The caller owns persistence and formatting.
68
68
  */
69
- declare function applyTaskMutation(document: TaskDocument, action: ReducerAction, params: TaskMutationParams, now?: string): ApplyResult;
69
+ declare function applyTaskMutation(document: TaskDocument, action: ReducerAction, params: TaskMutationParams, now?: string, maxTasks?: number): ApplyResult;
70
70
  //#endregion
71
- export { ApplyResult, MAX_UPSERT_ITEMS, Op, REF_PATTERN, ReducerAction, applyTaskMutation, formatUpsertFailure, isCommittingOp, singleItemOutcome };
72
- //# sourceMappingURL=reducer.d.mts.map
71
+ export { ReducerAction as a, isCommittingOp as c, REF_PATTERN as i, singleItemOutcome as l, MAX_UPSERT_ITEMS as n, applyTaskMutation as o, Op as r, formatUpsertFailure as s, ApplyResult as t };
72
+ //# sourceMappingURL=index-DIpc6_uJ.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index-DIpc6_uJ.d.mts","names":[],"sources":["../src/services/reducer/index.ts"],"mappings":";;;cAmBa;;;;;;cAOA,aAAW;;;;;;;;;KAUZ;EACN;EAAgB,OAAO;EAAqB;EAAiB;;EAC7D;EAAgB;EAAY;;EAC5B;EAAc,eAAe;EAAY;;EACzC;EAAa,MAAM;;EACnB;EAAe;;EACf;EAAe;;UAEJ;EACf,UAAU;EACV,IAAI;;;KAIM,gBAAgB,QAAQ;;;;;;;;iBASpB,eAAe,IAAI;;iBAenB,oBAAoB,IAAI,QAAQ;EAAM;;;iBAQtC,kBAAkB,IAAI,KAAK;;;;;;;;iBA8T3B,kBACd,UAAU,cACV,QAAQ,eACR,QAAQ,oBACR,cACA,oBACC"}
@@ -1,23 +1,26 @@
1
- //#region src/store/paths.d.ts
1
+ //#region src/services/paths/index.d.ts
2
2
  declare const STORE_PATH_ENV = "DOOM_TASK_STORE";
3
3
  /** Resolve the tree root without relying on extension startup order. */
4
- declare function resolveSessionKey(rootSessionId: string, env?: NodeJS.ProcessEnv): string;
4
+ declare function resolveSessionKey(rootSessionId: string, env?: Readonly<Record<string, string | undefined>>): string;
5
5
  /** Resolve one root session tree to a task document under the Pi agent directory. */
6
- declare function resolveStorePath(_cwd?: string, env?: NodeJS.ProcessEnv, sessionKey?: string): string;
6
+ declare function resolveStorePath(_cwd?: string, env?: Readonly<Record<string, string | undefined>>, sessionKey?: string): string;
7
7
  /** Whether a deliberate unscoped task-store override is active. */
8
- declare function hasStorePathOverride(env?: NodeJS.ProcessEnv): boolean;
8
+ declare function hasStorePathOverride(env?: Readonly<Record<string, string | undefined>>): boolean;
9
9
  /** Exact legacy Git-directory store, if the current working tree has one. */
10
10
  declare function resolveLegacyStoreDirectory(cwd?: string): string | undefined;
11
+ declare function resolveLegacyStoreDirectoryAsync(cwd?: string): Promise<string | undefined>;
11
12
  interface StoreSweepResult {
12
13
  removed: string[];
13
14
  errors: string[];
14
15
  }
15
16
  /** Remove only the validated legacy Git store unless it contains the active override. */
16
17
  declare function removeLegacyStoreDirectory(currentStorePath: string, cwd?: string): StoreSweepResult;
18
+ declare function removeLegacyStoreDirectoryAsync(currentStorePath: string, cwd?: string): Promise<StoreSweepResult>;
17
19
  /** Delete expired sibling session stores while preserving active or unreadable stores. */
18
20
  declare function sweepStoreFiles(currentStorePath: string, ttlMs: number, now?: number): StoreSweepResult;
21
+ declare function sweepStoreFilesAsync(currentStorePath: string, ttlMs: number, now?: number): Promise<StoreSweepResult>;
19
22
  declare function lockPathFor(storePath: string): string;
20
23
  declare function tempPathFor(storePath: string, pid?: number): string;
21
24
  //#endregion
22
- export { STORE_PATH_ENV, StoreSweepResult, hasStorePathOverride, lockPathFor, removeLegacyStoreDirectory, resolveLegacyStoreDirectory, resolveSessionKey, resolveStorePath, sweepStoreFiles, tempPathFor };
23
- //# sourceMappingURL=paths.d.cts.map
25
+ export { removeLegacyStoreDirectory as a, resolveLegacyStoreDirectoryAsync as c, sweepStoreFiles as d, sweepStoreFilesAsync as f, lockPathFor as i, resolveSessionKey as l, StoreSweepResult as n, removeLegacyStoreDirectoryAsync as o, tempPathFor as p, hasStorePathOverride as r, resolveLegacyStoreDirectory as s, STORE_PATH_ENV as t, resolveStorePath as u };
26
+ //# sourceMappingURL=index-XY9VPmfm.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index-XY9VPmfm.d.mts","names":[],"sources":["../src/services/paths/index.ts"],"mappings":";cAOa;;iBAsDG,kBACd,uBACA,MAAK,SAAS;;iBASA,iBACd,eACA,MAAK,SAAS,qCACd;;iBAWc,qBAAqB,MAAK,SAAS;;iBAKnC,4BAA4B;iBAKtB,iCAAiC,eAA8B;UAKpE;EACf;EACA;;;iBAIc,2BAA2B,0BAA0B,eAA8B;iBAe7E,gCACpB,0BACA,eACC,QAAQ;;iBAkBK,gBAAgB,0BAA0B,eAAe,eAA2B;iBA8B9E,qBACpB,0BACA,eACA,eACC,QAAQ;iBAqCK,YAAY;iBAIZ,YAAY,mBAAmB"}
package/dist/index.cjs CHANGED
@@ -1 +1,106 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./config.cjs"),t=require("./store/types.cjs"),n=require("./store/reconcile.cjs"),r=require("./store/taskGraph.cjs"),i=require("./delegation/manager.cjs"),a=require("./tool/schema.cjs"),o=require("./store/reducer.cjs"),s=require("./tui/selectors.cjs"),c=require("./store/paths.cjs"),l=require("./store/taskStore.cjs"),u=require("./tool/responseEnvelope.cjs"),d=require("./tool/promptGuidelines.cjs"),f=require("./tool/taskTool.cjs"),p=require("./extension.cjs");exports.BACKGROUND_WORK_PROVIDER=i.BACKGROUND_WORK_PROVIDER,exports.COLLAPSE_KEY_ENV=e.COLLAPSE_KEY_ENV,exports.COLLAPSE_KEY_OFF=e.COLLAPSE_KEY_OFF,exports.COMMAND_NAME=a.COMMAND_NAME,exports.DEFAULT_COLLAPSE_KEY=e.DEFAULT_COLLAPSE_KEY,exports.DEFAULT_DELEGATION_TIMEOUT_MS=e.DEFAULT_DELEGATION_TIMEOUT_MS,exports.DEFAULT_MAX_WIDGET_LINES=e.DEFAULT_MAX_WIDGET_LINES,exports.DEFAULT_PROMPT_GUIDELINES=d.DEFAULT_PROMPT_GUIDELINES,exports.DEFAULT_PROMPT_SNIPPET=f.DEFAULT_PROMPT_SNIPPET,exports.DEFAULT_STORE_TTL_MS=e.DEFAULT_STORE_TTL_MS,exports.DELEGATION_TIMEOUT_MS_ENV=e.DELEGATION_TIMEOUT_MS_ENV,exports.DELETED_STATUS=t.DELETED_STATUS,exports.DelegationManager=i.DelegationManager,exports.ERR_CANCEL_UNACKNOWLEDGED=i.ERR_CANCEL_UNACKNOWLEDGED,exports.ERR_CHILD_SESSION=i.ERR_CHILD_SESSION,exports.ERR_NO_RUNTIME=i.ERR_NO_RUNTIME,exports.ERR_ORPHANED_BY_RESTART=n.ERR_ORPHANED_BY_RESTART,exports.ERR_ORPHANED_BY_SESSION=n.ERR_ORPHANED_BY_SESSION,exports.ERR_REQUIRES_INTERACTIVE=a.ERR_REQUIRES_INTERACTIVE,exports.MAX_BRIEF_FILES=i.MAX_BRIEF_FILES,exports.MAX_UPSERT_ITEMS=o.MAX_UPSERT_ITEMS,exports.MAX_WIDGET_LINES_ENV=e.MAX_WIDGET_LINES_ENV,exports.MSG_ALL_COMPLETE_CLEAR=u.MSG_ALL_COMPLETE_CLEAR,exports.MSG_NO_TASKS=a.MSG_NO_TASKS,exports.MSG_UPSERT_FIELD_MISPLACED=a.MSG_UPSERT_FIELD_MISPLACED,exports.MSG_UPSERT_NONE_APPLIED=u.MSG_UPSERT_NONE_APPLIED,exports.MSG_UPSERT_PARTIAL=u.MSG_UPSERT_PARTIAL,exports.NOTIFY_CUSTOM_TYPE=i.NOTIFY_CUSTOM_TYPE,exports.REF_PATTERN=o.REF_PATTERN,exports.STORE_PATH_ENV=c.STORE_PATH_ENV,exports.STORE_SCHEMA_VERSION=t.STORE_SCHEMA_VERSION,exports.STORE_TTL_MS_ENV=e.STORE_TTL_MS_ENV,exports.TASK_ACTIONS=a.TASK_ACTIONS,exports.TASK_ACTION_FIELDS=a.TASK_ACTION_FIELDS,exports.TASK_CONTEXTS=a.TASK_CONTEXTS,exports.TASK_STATUSES=a.TASK_STATUSES,exports.TOOL_LABEL=a.TOOL_LABEL,exports.TOOL_NAME=a.TOOL_NAME,exports.TaskItemSchema=a.TaskItemSchema,exports.TaskParamsSchema=a.TaskParamsSchema,exports.TaskStore=l.TaskStore,exports.applyTaskMutation=o.applyTaskMutation,exports.buildTextResult=u.buildTextResult,exports.buildToolResult=u.buildToolResult,exports.countTasks=s.countTasks,exports.deriveBlocks=r.deriveBlocks,exports.deriveTaskProjection=s.deriveTaskProjection,exports.detectCycle=r.detectCycle,exports.emptyDocument=t.emptyDocument,exports.formatContent=u.formatContent,exports.formatUpsertFailure=o.formatUpsertFailure,exports.formatUpsertFailureText=u.formatUpsertFailureText,exports.getDelegationTimeoutMs=e.getDelegationTimeoutMs,exports.getMaxWidgetLines=e.getMaxWidgetLines,exports.getStoreTtlMs=e.getStoreTtlMs,exports.groupTasks=s.groupTasks,exports.hasActiveWork=s.hasActiveWork,exports.hasStorePathOverride=c.hasStorePathOverride,exports.isBlocked=r.isBlocked,exports.isCommittingOp=o.isCommittingOp,exports.isDelegationActive=t.isDelegationActive,exports.isTaskListComplete=r.isTaskListComplete,exports.lockPathFor=c.lockPathFor,exports.parsePiTaskConfig=e.parsePiTaskConfig,exports.reconcileOrphanedDelegations=n.reconcileOrphanedDelegations,exports.registerTaskTool=f.registerTaskTool,exports.removeLegacyStoreDirectory=c.removeLegacyStoreDirectory,exports.resolveCollapseKey=e.resolveCollapseKey,exports.resolveLegacyStoreDirectory=c.resolveLegacyStoreDirectory,exports.resolveSessionKey=c.resolveSessionKey,exports.resolveStorePath=c.resolveStorePath,exports.selectOverlayLayout=s.selectOverlayLayout,exports.selectOverlayLayoutFromProjection=s.selectOverlayLayoutFromProjection,exports.shouldShowIds=s.shouldShowIds,exports.singleItemOutcome=o.singleItemOutcome,exports.sweepStoreFiles=c.sweepStoreFiles,exports.taskActionAcceptsField=a.taskActionAcceptsField,exports.taskExtension=p.default,exports.tempPathFor=c.tempPathFor,exports.unresolvedBlockers=r.unresolvedBlockers,exports.visibleTasks=s.visibleTasks;
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
+ const require_paths = require("./paths-BsFVRulr.cjs");
3
+ const require_task = require("./task-DaagqdPK.cjs");
4
+ const require_delegation = require("./delegation-LDpHP2CC.cjs");
5
+ const require_task$1 = require("./task-Dqy88_rr.cjs");
6
+ const require_config = require("./config-BPNE_wEU.cjs");
7
+ const require_taskGraph = require("./taskGraph-BskRslrr.cjs");
8
+ const require_task$2 = require("./task-CXF9VULl.cjs");
9
+ const require_reconcile = require("./reconcile-cRL0NjDr.cjs");
10
+ const require_delegation$1 = require("./delegation-3hMdTFXF.cjs");
11
+ const require_taskResult = require("./taskResult-D2G7b4w-.cjs");
12
+ const require_promptGuidelines = require("./promptGuidelines-j_SZTzlH.cjs");
13
+ const require_reducer = require("./reducer-BV0YIZ2o.cjs");
14
+ const require_task_cli = require("./task.cli-CiTkjUaX.cjs");
15
+ const require_taskStore = require("./taskStore-T1pPy-UJ.cjs");
16
+ const require_selectors = require("./selectors-b-69vb4W.cjs");
17
+ exports.BACKGROUND_WORK_PROVIDER = require_delegation$1.BACKGROUND_WORK_PROVIDER;
18
+ exports.COLLAPSE_KEY_ENV = require_config.COLLAPSE_KEY_ENV;
19
+ exports.COLLAPSE_KEY_OFF = require_config.COLLAPSE_KEY_OFF;
20
+ exports.COMMAND_NAME = require_task.COMMAND_NAME;
21
+ exports.DEFAULT_COLLAPSE_KEY = require_config.DEFAULT_COLLAPSE_KEY;
22
+ exports.DEFAULT_DELEGATION_TIMEOUT_MS = require_config.DEFAULT_DELEGATION_TIMEOUT_MS;
23
+ exports.DEFAULT_MAX_TASKS = require_config.DEFAULT_MAX_TASKS;
24
+ exports.DEFAULT_MAX_WIDGET_LINES = require_config.DEFAULT_MAX_WIDGET_LINES;
25
+ exports.DEFAULT_PROMPT_GUIDELINES = require_promptGuidelines.DEFAULT_PROMPT_GUIDELINES;
26
+ exports.DEFAULT_PROMPT_SNIPPET = require_task_cli.DEFAULT_PROMPT_SNIPPET;
27
+ exports.DEFAULT_STORE_TTL_MS = require_config.DEFAULT_STORE_TTL_MS;
28
+ exports.DELEGATION_TIMEOUT_MS_ENV = require_config.DELEGATION_TIMEOUT_MS_ENV;
29
+ exports.DELETED_STATUS = require_task$2.DELETED_STATUS;
30
+ exports.DelegationManager = require_delegation$1.DelegationManager;
31
+ exports.ERR_CANCEL_UNACKNOWLEDGED = require_delegation$1.ERR_CANCEL_UNACKNOWLEDGED;
32
+ exports.ERR_CHILD_SESSION = require_delegation$1.ERR_CHILD_SESSION;
33
+ exports.ERR_NO_RUNTIME = require_delegation$1.ERR_NO_RUNTIME;
34
+ exports.ERR_ORPHANED_BY_RESTART = require_reconcile.ERR_ORPHANED_BY_RESTART;
35
+ exports.ERR_ORPHANED_BY_SESSION = require_reconcile.ERR_ORPHANED_BY_SESSION;
36
+ exports.ERR_REQUIRES_INTERACTIVE = require_task$1.ERR_REQUIRES_INTERACTIVE;
37
+ exports.MAX_BRIEF_FILES = require_delegation.MAX_BRIEF_FILES;
38
+ exports.MAX_TASKS_ENV = require_config.MAX_TASKS_ENV;
39
+ exports.MAX_UPSERT_ITEMS = require_reducer.MAX_UPSERT_ITEMS;
40
+ exports.MAX_WIDGET_LINES_ENV = require_config.MAX_WIDGET_LINES_ENV;
41
+ exports.MSG_ALL_COMPLETE_CLEAR = require_taskResult.MSG_ALL_COMPLETE_CLEAR;
42
+ exports.MSG_ASSIGN_PARTIAL = require_taskResult.MSG_ASSIGN_PARTIAL;
43
+ exports.MSG_NO_TASKS = require_task$1.MSG_NO_TASKS;
44
+ exports.MSG_UPSERT_FIELD_MISPLACED = require_task$1.MSG_UPSERT_FIELD_MISPLACED;
45
+ exports.MSG_UPSERT_NONE_APPLIED = require_taskResult.MSG_UPSERT_NONE_APPLIED;
46
+ exports.MSG_UPSERT_PARTIAL = require_taskResult.MSG_UPSERT_PARTIAL;
47
+ exports.NOTIFY_CUSTOM_TYPE = require_delegation$1.NOTIFY_CUSTOM_TYPE;
48
+ exports.REF_PATTERN = require_reducer.REF_PATTERN;
49
+ exports.STORE_PATH_ENV = require_paths.STORE_PATH_ENV;
50
+ exports.STORE_SCHEMA_VERSION = require_task$2.STORE_SCHEMA_VERSION;
51
+ exports.STORE_TTL_MS_ENV = require_config.STORE_TTL_MS_ENV;
52
+ exports.TASK_ACTIONS = require_task$1.TASK_ACTIONS;
53
+ exports.TASK_ACTION_FIELDS = require_task$1.TASK_ACTION_FIELDS;
54
+ exports.TASK_CONTEXTS = require_task$1.TASK_CONTEXTS;
55
+ exports.TASK_STATUSES = require_task$1.TASK_STATUSES;
56
+ exports.TOOL_LABEL = require_task$1.TOOL_LABEL;
57
+ exports.TOOL_NAME = require_task$1.TOOL_NAME;
58
+ exports.TaskAssignmentSchema = require_task$1.TaskAssignmentSchema;
59
+ exports.TaskItemSchema = require_task$1.TaskItemSchema;
60
+ exports.TaskParamsSchema = require_task$1.TaskParamsSchema;
61
+ exports.TaskStore = require_taskStore.TaskStore;
62
+ exports.applyTaskMutation = require_reducer.applyTaskMutation;
63
+ exports.buildAssignmentResult = require_taskResult.buildAssignmentResult;
64
+ exports.buildTextResult = require_taskResult.buildTextResult;
65
+ exports.buildToolResult = require_taskResult.buildToolResult;
66
+ exports.countTasks = require_selectors.countTasks;
67
+ exports.createTaskTool = require_task_cli.createTaskTool;
68
+ exports.deriveBlocks = require_taskGraph.deriveBlocks;
69
+ exports.deriveTaskProjection = require_selectors.deriveTaskProjection;
70
+ exports.detectCycle = require_taskGraph.detectCycle;
71
+ exports.emptyDocument = require_task$2.emptyDocument;
72
+ exports.formatAssignmentResults = require_taskResult.formatAssignmentResults;
73
+ exports.formatContent = require_taskResult.formatContent;
74
+ exports.formatUpsertFailure = require_reducer.formatUpsertFailure;
75
+ exports.formatUpsertFailureText = require_taskResult.formatUpsertFailureText;
76
+ exports.getDelegationTimeoutMs = require_config.getDelegationTimeoutMs;
77
+ exports.getMaxTasks = require_config.getMaxTasks;
78
+ exports.getMaxWidgetLines = require_config.getMaxWidgetLines;
79
+ exports.getStoreTtlMs = require_config.getStoreTtlMs;
80
+ exports.groupTasks = require_selectors.groupTasks;
81
+ exports.hasActiveWork = require_selectors.hasActiveWork;
82
+ exports.hasStorePathOverride = require_paths.hasStorePathOverride;
83
+ exports.isBlocked = require_taskGraph.isBlocked;
84
+ exports.isCommittingOp = require_reducer.isCommittingOp;
85
+ exports.isDelegationActive = require_task$2.isDelegationActive;
86
+ exports.isTaskListComplete = require_taskGraph.isTaskListComplete;
87
+ exports.lockPathFor = require_paths.lockPathFor;
88
+ exports.parsePiTaskConfig = require_config.parsePiTaskConfig;
89
+ exports.reconcileOrphanedDelegations = require_reconcile.reconcileOrphanedDelegations;
90
+ exports.removeLegacyStoreDirectory = require_paths.removeLegacyStoreDirectory;
91
+ exports.removeLegacyStoreDirectoryAsync = require_paths.removeLegacyStoreDirectoryAsync;
92
+ exports.resolveCollapseKey = require_config.resolveCollapseKey;
93
+ exports.resolveLegacyStoreDirectory = require_paths.resolveLegacyStoreDirectory;
94
+ exports.resolveLegacyStoreDirectoryAsync = require_paths.resolveLegacyStoreDirectoryAsync;
95
+ exports.resolveSessionKey = require_paths.resolveSessionKey;
96
+ exports.resolveStorePath = require_paths.resolveStorePath;
97
+ exports.selectOverlayLayout = require_selectors.selectOverlayLayout;
98
+ exports.selectOverlayLayoutFromProjection = require_selectors.selectOverlayLayoutFromProjection;
99
+ exports.shouldShowIds = require_selectors.shouldShowIds;
100
+ exports.singleItemOutcome = require_reducer.singleItemOutcome;
101
+ exports.sweepStoreFiles = require_paths.sweepStoreFiles;
102
+ exports.sweepStoreFilesAsync = require_paths.sweepStoreFilesAsync;
103
+ exports.taskActionAcceptsField = require_task$1.taskActionAcceptsField;
104
+ exports.tempPathFor = require_paths.tempPathFor;
105
+ exports.unresolvedBlockers = require_taskGraph.unresolvedBlockers;
106
+ exports.visibleTasks = require_selectors.visibleTasks;
package/dist/index.d.mts CHANGED
@@ -1,15 +1,16 @@
1
- import { DELETED_STATUS, DelegationResult, DelegationState, DepToken, STORE_SCHEMA_VERSION, Task, TaskAction, TaskDelegation, TaskDetails, TaskDocument, TaskItemMutation, TaskMutationParams, TaskStatus, UpsertItemOutcome, UpsertSummary, emptyDocument, isDelegationActive } from "./store/types.mjs";
2
- import { TaskStore, TaskStoreOptions } from "./store/taskStore.mjs";
3
- import { COLLAPSE_KEY_ENV, COLLAPSE_KEY_OFF, DEFAULT_COLLAPSE_KEY, DEFAULT_DELEGATION_TIMEOUT_MS, DEFAULT_MAX_WIDGET_LINES, DEFAULT_STORE_TTL_MS, DELEGATION_TIMEOUT_MS_ENV, MAX_WIDGET_LINES_ENV, PiTaskConfig, STORE_TTL_MS_ENV, getDelegationTimeoutMs, getMaxWidgetLines, getStoreTtlMs, parsePiTaskConfig, resolveCollapseKey } from "./config.mjs";
4
- import { AssignOptions, BACKGROUND_WORK_PROVIDER, DelegationManager, DelegationManagerOptions, DelegationNotifier, DelegationOutcome, DelegationProgress, ERR_CANCEL_UNACKNOWLEDGED, ERR_CHILD_SESSION, ERR_NO_RUNTIME, MAX_BRIEF_FILES, NOTIFY_CUSTOM_TYPE } from "./delegation/manager.mjs";
5
- import taskExtension from "./extension.mjs";
6
- import { STORE_PATH_ENV, StoreSweepResult, hasStorePathOverride, lockPathFor, removeLegacyStoreDirectory, resolveLegacyStoreDirectory, resolveSessionKey, resolveStorePath, sweepStoreFiles, tempPathFor } from "./store/paths.mjs";
7
- import { ERR_ORPHANED_BY_RESTART, ERR_ORPHANED_BY_SESSION, ReconcileResult, ReconcileSelf, reconcileOrphanedDelegations } from "./store/reconcile.mjs";
8
- import { ApplyResult, MAX_UPSERT_ITEMS, Op, REF_PATTERN, ReducerAction, applyTaskMutation, formatUpsertFailure, isCommittingOp, singleItemOutcome } from "./store/reducer.mjs";
9
- import { deriveBlocks, detectCycle, isBlocked, isTaskListComplete, unresolvedBlockers } from "./store/taskGraph.mjs";
10
- import { MSG_ALL_COMPLETE_CLEAR, MSG_UPSERT_NONE_APPLIED, MSG_UPSERT_PARTIAL, ToolResult, buildTextResult, buildToolResult, formatContent, formatUpsertFailureText } from "./tool/responseEnvelope.mjs";
11
- import { COMMAND_NAME, ERR_REQUIRES_INTERACTIVE, MSG_NO_TASKS, MSG_UPSERT_FIELD_MISPLACED, TASK_ACTIONS, TASK_ACTION_FIELDS, TASK_CONTEXTS, TASK_STATUSES, TOOL_LABEL, TOOL_NAME, TaskItemParams, TaskItemSchema, TaskParams, TaskParamsSchema, taskActionAcceptsField } from "./tool/schema.mjs";
12
- import { DEFAULT_PROMPT_GUIDELINES } from "./tool/promptGuidelines.mjs";
13
- import { DEFAULT_PROMPT_SNIPPET, TaskToolDependencies, registerTaskTool } from "./tool/taskTool.mjs";
14
- import { OverlayLayout, TaskCounts, TaskGroups, TaskProjection, countTasks, deriveTaskProjection, groupTasks, hasActiveWork, selectOverlayLayout, selectOverlayLayoutFromProjection, shouldShowIds, visibleTasks } from "./tui/selectors.mjs";
15
- export { ApplyResult, AssignOptions, BACKGROUND_WORK_PROVIDER, COLLAPSE_KEY_ENV, COLLAPSE_KEY_OFF, COMMAND_NAME, DEFAULT_COLLAPSE_KEY, DEFAULT_DELEGATION_TIMEOUT_MS, DEFAULT_MAX_WIDGET_LINES, DEFAULT_PROMPT_GUIDELINES, DEFAULT_PROMPT_SNIPPET, DEFAULT_STORE_TTL_MS, DELEGATION_TIMEOUT_MS_ENV, DELETED_STATUS, DelegationManager, DelegationManagerOptions, DelegationNotifier, DelegationOutcome, DelegationProgress, DelegationResult, DelegationState, DepToken, ERR_CANCEL_UNACKNOWLEDGED, ERR_CHILD_SESSION, ERR_NO_RUNTIME, ERR_ORPHANED_BY_RESTART, ERR_ORPHANED_BY_SESSION, ERR_REQUIRES_INTERACTIVE, MAX_BRIEF_FILES, MAX_UPSERT_ITEMS, MAX_WIDGET_LINES_ENV, MSG_ALL_COMPLETE_CLEAR, MSG_NO_TASKS, MSG_UPSERT_FIELD_MISPLACED, MSG_UPSERT_NONE_APPLIED, MSG_UPSERT_PARTIAL, NOTIFY_CUSTOM_TYPE, Op, OverlayLayout, PiTaskConfig, REF_PATTERN, ReconcileResult, ReconcileSelf, ReducerAction, STORE_PATH_ENV, STORE_SCHEMA_VERSION, STORE_TTL_MS_ENV, StoreSweepResult, TASK_ACTIONS, TASK_ACTION_FIELDS, TASK_CONTEXTS, TASK_STATUSES, TOOL_LABEL, TOOL_NAME, Task, TaskAction, TaskCounts, TaskDelegation, TaskDetails, TaskDocument, TaskGroups, TaskItemMutation, TaskItemParams, TaskItemSchema, TaskMutationParams, TaskParams, TaskParamsSchema, TaskProjection, TaskStatus, TaskStore, TaskStoreOptions, TaskToolDependencies, ToolResult, UpsertItemOutcome, UpsertSummary, applyTaskMutation, buildTextResult, buildToolResult, countTasks, deriveBlocks, deriveTaskProjection, detectCycle, emptyDocument, formatContent, formatUpsertFailure, formatUpsertFailureText, getDelegationTimeoutMs, getMaxWidgetLines, getStoreTtlMs, groupTasks, hasActiveWork, hasStorePathOverride, isBlocked, isCommittingOp, isDelegationActive, isTaskListComplete, lockPathFor, parsePiTaskConfig, reconcileOrphanedDelegations, registerTaskTool, removeLegacyStoreDirectory, resolveCollapseKey, resolveLegacyStoreDirectory, resolveSessionKey, resolveStorePath, selectOverlayLayout, selectOverlayLayoutFromProjection, shouldShowIds, singleItemOutcome, sweepStoreFiles, taskActionAcceptsField, taskExtension, tempPathFor, unresolvedBlockers, visibleTasks };
1
+ import { _ as UpsertSummary, a as DepToken, c as TaskAction, d as TaskDetails, f as TaskDocument, g as UpsertItemOutcome, h as TaskStatus, i as DelegationState, l as TaskAssignment, m as TaskMutationParams, n as DELETED_STATUS, o as STORE_SCHEMA_VERSION, p as TaskItemMutation, r as DelegationResult, s as Task, t as AssignmentSummary, u as TaskDelegation, v as emptyDocument, y as isDelegationActive } from "./task-hLh4BOO7.mjs";
2
+ import { n as TaskStoreCommitListener, r as TaskStoreOptions, t as TaskStore } from "./index-B7oVjSey.mjs";
3
+ import { t as MAX_BRIEF_FILES } from "./delegation-Ot2xltLi.mjs";
4
+ import { a as DelegationNotifier, c as DelegationProgress, d as ERR_NO_RUNTIME, f as NOTIFY_CUSTOM_TYPE, i as DelegationManagerOptions, l as ERR_CANCEL_UNACKNOWLEDGED, n as BACKGROUND_WORK_PROVIDER, o as DelegationOutcome, r as DelegationManager, s as DelegationPlatform, t as AssignOptions, u as ERR_CHILD_SESSION } from "./index-3-3ZJlaH.mjs";
5
+ import { t as COMMAND_NAME } from "./task-CkFjC3Fo.mjs";
6
+ import { a as TASK_ACTION_FIELDS, c as TOOL_LABEL, d as TaskAssignmentSchema, f as TaskItemParams, g as taskActionAcceptsField, h as TaskParamsSchema, i as TASK_ACTIONS, l as TOOL_NAME, m as TaskParams, n as MSG_NO_TASKS, o as TASK_CONTEXTS, p as TaskItemSchema, r as MSG_UPSERT_FIELD_MISPLACED, s as TASK_STATUSES, t as ERR_REQUIRES_INTERACTIVE, u as TaskAssignmentParams } from "./task-DHSvdK6E.mjs";
7
+ import { a as ReducerAction, c as isCommittingOp, i as REF_PATTERN, l as singleItemOutcome, n as MAX_UPSERT_ITEMS, o as applyTaskMutation, r as Op, s as formatUpsertFailure, t as ApplyResult } from "./index-DIpc6_uJ.mjs";
8
+ import { a as MSG_UPSERT_PARTIAL, c as buildTextResult, d as formatContent, f as formatUpsertFailureText, i as MSG_UPSERT_NONE_APPLIED, l as buildToolResult, n as MSG_ALL_COMPLETE_CLEAR, o as ToolResult, r as MSG_ASSIGN_PARTIAL, s as buildAssignmentResult, t as AssignmentItemResult, u as formatAssignmentResults } from "./index-C3DgOhEm.mjs";
9
+ import { t as DEFAULT_PROMPT_GUIDELINES } from "./promptGuidelines-DaxWrqud.mjs";
10
+ import { i as createTaskTool, n as DEFAULT_PROMPT_SNIPPET, r as TaskToolDependencies } from "./root.cli-swHZqusx.mjs";
11
+ import { _ as parsePiTaskConfig, a as DEFAULT_MAX_TASKS, c as DELEGATION_TIMEOUT_MS_ENV, d as PiTaskConfig, f as STORE_TTL_MS_ENV, g as getStoreTtlMs, h as getMaxWidgetLines, i as DEFAULT_DELEGATION_TIMEOUT_MS, l as MAX_TASKS_ENV, m as getMaxTasks, n as COLLAPSE_KEY_OFF, o as DEFAULT_MAX_WIDGET_LINES, p as getDelegationTimeoutMs, r as DEFAULT_COLLAPSE_KEY, s as DEFAULT_STORE_TTL_MS, t as COLLAPSE_KEY_ENV, u as MAX_WIDGET_LINES_ENV, v as resolveCollapseKey } from "./index-D4goIk4Z.mjs";
12
+ import { a as removeLegacyStoreDirectory, c as resolveLegacyStoreDirectoryAsync, d as sweepStoreFiles, f as sweepStoreFilesAsync, i as lockPathFor, l as resolveSessionKey, n as StoreSweepResult, o as removeLegacyStoreDirectoryAsync, p as tempPathFor, r as hasStorePathOverride, s as resolveLegacyStoreDirectory, t as STORE_PATH_ENV, u as resolveStorePath } from "./index-XY9VPmfm.mjs";
13
+ import { a as reconcileOrphanedDelegations, i as ReconcileSelf, n as ERR_ORPHANED_BY_SESSION, r as ReconcileResult, t as ERR_ORPHANED_BY_RESTART } from "./index-BNMm9g0K.mjs";
14
+ import { a as unresolvedBlockers, i as isTaskListComplete, n as detectCycle, r as isBlocked, t as deriveBlocks } from "./taskGraph-YQXCfXTn.mjs";
15
+ import { a as countTasks, c as hasActiveWork, d as shouldShowIds, f as visibleTasks, i as TaskProjection, l as selectOverlayLayout, n as TaskCounts, o as deriveTaskProjection, r as TaskGroups, s as groupTasks, t as OverlayLayout, u as selectOverlayLayoutFromProjection } from "./selectors-DPDPPjH3.mjs";
16
+ export { ApplyResult, AssignOptions, AssignmentItemResult, AssignmentSummary, BACKGROUND_WORK_PROVIDER, COLLAPSE_KEY_ENV, COLLAPSE_KEY_OFF, COMMAND_NAME, DEFAULT_COLLAPSE_KEY, DEFAULT_DELEGATION_TIMEOUT_MS, DEFAULT_MAX_TASKS, DEFAULT_MAX_WIDGET_LINES, DEFAULT_PROMPT_GUIDELINES, DEFAULT_PROMPT_SNIPPET, DEFAULT_STORE_TTL_MS, DELEGATION_TIMEOUT_MS_ENV, DELETED_STATUS, DelegationManager, DelegationManagerOptions, DelegationNotifier, DelegationOutcome, DelegationPlatform, DelegationProgress, DelegationResult, DelegationState, DepToken, ERR_CANCEL_UNACKNOWLEDGED, ERR_CHILD_SESSION, ERR_NO_RUNTIME, ERR_ORPHANED_BY_RESTART, ERR_ORPHANED_BY_SESSION, ERR_REQUIRES_INTERACTIVE, MAX_BRIEF_FILES, MAX_TASKS_ENV, MAX_UPSERT_ITEMS, MAX_WIDGET_LINES_ENV, MSG_ALL_COMPLETE_CLEAR, MSG_ASSIGN_PARTIAL, MSG_NO_TASKS, MSG_UPSERT_FIELD_MISPLACED, MSG_UPSERT_NONE_APPLIED, MSG_UPSERT_PARTIAL, NOTIFY_CUSTOM_TYPE, Op, OverlayLayout, PiTaskConfig, REF_PATTERN, ReconcileResult, ReconcileSelf, ReducerAction, STORE_PATH_ENV, STORE_SCHEMA_VERSION, STORE_TTL_MS_ENV, StoreSweepResult, TASK_ACTIONS, TASK_ACTION_FIELDS, TASK_CONTEXTS, TASK_STATUSES, TOOL_LABEL, TOOL_NAME, Task, TaskAction, TaskAssignment, TaskAssignmentParams, TaskAssignmentSchema, TaskCounts, TaskDelegation, TaskDetails, TaskDocument, TaskGroups, TaskItemMutation, TaskItemParams, TaskItemSchema, TaskMutationParams, TaskParams, TaskParamsSchema, TaskProjection, TaskStatus, TaskStore, TaskStoreCommitListener, TaskStoreOptions, TaskToolDependencies, ToolResult, UpsertItemOutcome, UpsertSummary, applyTaskMutation, buildAssignmentResult, buildTextResult, buildToolResult, countTasks, createTaskTool, deriveBlocks, deriveTaskProjection, detectCycle, emptyDocument, formatAssignmentResults, formatContent, formatUpsertFailure, formatUpsertFailureText, getDelegationTimeoutMs, getMaxTasks, getMaxWidgetLines, getStoreTtlMs, groupTasks, hasActiveWork, hasStorePathOverride, isBlocked, isCommittingOp, isDelegationActive, isTaskListComplete, lockPathFor, parsePiTaskConfig, reconcileOrphanedDelegations, removeLegacyStoreDirectory, removeLegacyStoreDirectoryAsync, resolveCollapseKey, resolveLegacyStoreDirectory, resolveLegacyStoreDirectoryAsync, resolveSessionKey, resolveStorePath, selectOverlayLayout, selectOverlayLayoutFromProjection, shouldShowIds, singleItemOutcome, sweepStoreFiles, sweepStoreFilesAsync, taskActionAcceptsField, tempPathFor, unresolvedBlockers, visibleTasks };
package/dist/index.mjs CHANGED
@@ -1 +1,16 @@
1
- import{COLLAPSE_KEY_ENV as e,COLLAPSE_KEY_OFF as t,DEFAULT_COLLAPSE_KEY as n,DEFAULT_DELEGATION_TIMEOUT_MS as r,DEFAULT_MAX_WIDGET_LINES as i,DEFAULT_STORE_TTL_MS as a,DELEGATION_TIMEOUT_MS_ENV as o,MAX_WIDGET_LINES_ENV as s,STORE_TTL_MS_ENV as c,getDelegationTimeoutMs as l,getMaxWidgetLines as u,getStoreTtlMs as d,parsePiTaskConfig as f,resolveCollapseKey as p}from"./config.mjs";import{DELETED_STATUS as m,STORE_SCHEMA_VERSION as h,emptyDocument as g,isDelegationActive as _}from"./store/types.mjs";import{ERR_ORPHANED_BY_RESTART as v,ERR_ORPHANED_BY_SESSION as y,reconcileOrphanedDelegations as b}from"./store/reconcile.mjs";import{deriveBlocks as x,detectCycle as S,isBlocked as C,isTaskListComplete as w,unresolvedBlockers as T}from"./store/taskGraph.mjs";import{BACKGROUND_WORK_PROVIDER as E,DelegationManager as D,ERR_CANCEL_UNACKNOWLEDGED as O,ERR_CHILD_SESSION as k,ERR_NO_RUNTIME as A,MAX_BRIEF_FILES as j,NOTIFY_CUSTOM_TYPE as M}from"./delegation/manager.mjs";import{COMMAND_NAME as N,ERR_REQUIRES_INTERACTIVE as P,MSG_NO_TASKS as F,MSG_UPSERT_FIELD_MISPLACED as I,TASK_ACTIONS as L,TASK_ACTION_FIELDS as R,TASK_CONTEXTS as z,TASK_STATUSES as B,TOOL_LABEL as V,TOOL_NAME as H,TaskItemSchema as U,TaskParamsSchema as W,taskActionAcceptsField as G}from"./tool/schema.mjs";import{MAX_UPSERT_ITEMS as K,REF_PATTERN as q,applyTaskMutation as J,formatUpsertFailure as Y,isCommittingOp as X,singleItemOutcome as Z}from"./store/reducer.mjs";import{countTasks as Q,deriveTaskProjection as $,groupTasks as ee,hasActiveWork as te,selectOverlayLayout as ne,selectOverlayLayoutFromProjection as re,shouldShowIds as ie,visibleTasks as ae}from"./tui/selectors.mjs";import{STORE_PATH_ENV as oe,hasStorePathOverride as se,lockPathFor as ce,removeLegacyStoreDirectory as le,resolveLegacyStoreDirectory as ue,resolveSessionKey as de,resolveStorePath as fe,sweepStoreFiles as pe,tempPathFor as me}from"./store/paths.mjs";import{TaskStore as he}from"./store/taskStore.mjs";import{MSG_ALL_COMPLETE_CLEAR as ge,MSG_UPSERT_NONE_APPLIED as _e,MSG_UPSERT_PARTIAL as ve,buildTextResult as ye,buildToolResult as be,formatContent as xe,formatUpsertFailureText as Se}from"./tool/responseEnvelope.mjs";import{DEFAULT_PROMPT_GUIDELINES as Ce}from"./tool/promptGuidelines.mjs";import{DEFAULT_PROMPT_SNIPPET as we,registerTaskTool as Te}from"./tool/taskTool.mjs";import Ee from"./extension.mjs";export{E as BACKGROUND_WORK_PROVIDER,e as COLLAPSE_KEY_ENV,t as COLLAPSE_KEY_OFF,N as COMMAND_NAME,n as DEFAULT_COLLAPSE_KEY,r as DEFAULT_DELEGATION_TIMEOUT_MS,i as DEFAULT_MAX_WIDGET_LINES,Ce as DEFAULT_PROMPT_GUIDELINES,we as DEFAULT_PROMPT_SNIPPET,a as DEFAULT_STORE_TTL_MS,o as DELEGATION_TIMEOUT_MS_ENV,m as DELETED_STATUS,D as DelegationManager,O as ERR_CANCEL_UNACKNOWLEDGED,k as ERR_CHILD_SESSION,A as ERR_NO_RUNTIME,v as ERR_ORPHANED_BY_RESTART,y as ERR_ORPHANED_BY_SESSION,P as ERR_REQUIRES_INTERACTIVE,j as MAX_BRIEF_FILES,K as MAX_UPSERT_ITEMS,s as MAX_WIDGET_LINES_ENV,ge as MSG_ALL_COMPLETE_CLEAR,F as MSG_NO_TASKS,I as MSG_UPSERT_FIELD_MISPLACED,_e as MSG_UPSERT_NONE_APPLIED,ve as MSG_UPSERT_PARTIAL,M as NOTIFY_CUSTOM_TYPE,q as REF_PATTERN,oe as STORE_PATH_ENV,h as STORE_SCHEMA_VERSION,c as STORE_TTL_MS_ENV,L as TASK_ACTIONS,R as TASK_ACTION_FIELDS,z as TASK_CONTEXTS,B as TASK_STATUSES,V as TOOL_LABEL,H as TOOL_NAME,U as TaskItemSchema,W as TaskParamsSchema,he as TaskStore,J as applyTaskMutation,ye as buildTextResult,be as buildToolResult,Q as countTasks,x as deriveBlocks,$ as deriveTaskProjection,S as detectCycle,g as emptyDocument,xe as formatContent,Y as formatUpsertFailure,Se as formatUpsertFailureText,l as getDelegationTimeoutMs,u as getMaxWidgetLines,d as getStoreTtlMs,ee as groupTasks,te as hasActiveWork,se as hasStorePathOverride,C as isBlocked,X as isCommittingOp,_ as isDelegationActive,w as isTaskListComplete,ce as lockPathFor,f as parsePiTaskConfig,b as reconcileOrphanedDelegations,Te as registerTaskTool,le as removeLegacyStoreDirectory,p as resolveCollapseKey,ue as resolveLegacyStoreDirectory,de as resolveSessionKey,fe as resolveStorePath,ne as selectOverlayLayout,re as selectOverlayLayoutFromProjection,ie as shouldShowIds,Z as singleItemOutcome,pe as sweepStoreFiles,G as taskActionAcceptsField,Ee as taskExtension,me as tempPathFor,T as unresolvedBlockers,ae as visibleTasks};
1
+ import { t as COMMAND_NAME } from "./task-B4aF5J9s.mjs";
2
+ import { t as MAX_BRIEF_FILES } from "./delegation-BiOy3_7g.mjs";
3
+ import { a as TASK_ACTION_FIELDS, c as TOOL_LABEL, d as TaskItemSchema, f as TaskParamsSchema, i as TASK_ACTIONS, l as TOOL_NAME, n as MSG_NO_TASKS, o as TASK_CONTEXTS, p as taskActionAcceptsField, r as MSG_UPSERT_FIELD_MISPLACED, s as TASK_STATUSES, t as ERR_REQUIRES_INTERACTIVE, u as TaskAssignmentSchema } from "./task-DKHKuems.mjs";
4
+ import { _ as resolveCollapseKey, a as DEFAULT_MAX_TASKS, c as DELEGATION_TIMEOUT_MS_ENV, d as STORE_TTL_MS_ENV, f as getDelegationTimeoutMs, g as parsePiTaskConfig, h as getStoreTtlMs, i as DEFAULT_DELEGATION_TIMEOUT_MS, l as MAX_TASKS_ENV, m as getMaxWidgetLines, n as COLLAPSE_KEY_OFF, o as DEFAULT_MAX_WIDGET_LINES, p as getMaxTasks, r as DEFAULT_COLLAPSE_KEY, s as DEFAULT_STORE_TTL_MS, t as COLLAPSE_KEY_ENV, u as MAX_WIDGET_LINES_ENV } from "./config-DmsCPDuF.mjs";
5
+ import { a as unresolvedBlockers, i as isTaskListComplete, n as detectCycle, r as isBlocked, t as deriveBlocks } from "./taskGraph-BOQvT0-M.mjs";
6
+ import { i as isDelegationActive, n as STORE_SCHEMA_VERSION, r as emptyDocument, t as DELETED_STATUS } from "./task-giCbpKzV.mjs";
7
+ import { n as ERR_ORPHANED_BY_SESSION, r as reconcileOrphanedDelegations, t as ERR_ORPHANED_BY_RESTART } from "./reconcile-BcD-hTbd.mjs";
8
+ import { a as ERR_NO_RUNTIME, i as ERR_CHILD_SESSION, n as DelegationManager, o as NOTIFY_CUSTOM_TYPE, r as ERR_CANCEL_UNACKNOWLEDGED, t as BACKGROUND_WORK_PROVIDER } from "./delegation-CkGbRaOl.mjs";
9
+ import { a as buildAssignmentResult, c as formatAssignmentResults, i as MSG_UPSERT_PARTIAL, l as formatContent, n as MSG_ASSIGN_PARTIAL, o as buildTextResult, r as MSG_UPSERT_NONE_APPLIED, s as buildToolResult, t as MSG_ALL_COMPLETE_CLEAR, u as formatUpsertFailureText } from "./taskResult-edBAAKSH.mjs";
10
+ import { t as DEFAULT_PROMPT_GUIDELINES } from "./promptGuidelines-g4QT8GNM.mjs";
11
+ import { a as isCommittingOp, i as formatUpsertFailure, n as REF_PATTERN, o as singleItemOutcome, r as applyTaskMutation, t as MAX_UPSERT_ITEMS } from "./reducer-BEfJFM5L.mjs";
12
+ import { n as createTaskTool, t as DEFAULT_PROMPT_SNIPPET } from "./task.cli-BM34E7GG.mjs";
13
+ import { a as removeLegacyStoreDirectoryAsync, c as resolveSessionKey, d as sweepStoreFilesAsync, f as tempPathFor, i as removeLegacyStoreDirectory, l as resolveStorePath, n as hasStorePathOverride, o as resolveLegacyStoreDirectory, r as lockPathFor, s as resolveLegacyStoreDirectoryAsync, t as STORE_PATH_ENV, u as sweepStoreFiles } from "./paths-Bg8EEbk1.mjs";
14
+ import { t as TaskStore } from "./taskStore-CFx12KJk.mjs";
15
+ import { a as selectOverlayLayout, c as visibleTasks, i as hasActiveWork, n as deriveTaskProjection, o as selectOverlayLayoutFromProjection, r as groupTasks, s as shouldShowIds, t as countTasks } from "./selectors-BaS6dObz.mjs";
16
+ export { BACKGROUND_WORK_PROVIDER, COLLAPSE_KEY_ENV, COLLAPSE_KEY_OFF, COMMAND_NAME, DEFAULT_COLLAPSE_KEY, DEFAULT_DELEGATION_TIMEOUT_MS, DEFAULT_MAX_TASKS, DEFAULT_MAX_WIDGET_LINES, DEFAULT_PROMPT_GUIDELINES, DEFAULT_PROMPT_SNIPPET, DEFAULT_STORE_TTL_MS, DELEGATION_TIMEOUT_MS_ENV, DELETED_STATUS, DelegationManager, ERR_CANCEL_UNACKNOWLEDGED, ERR_CHILD_SESSION, ERR_NO_RUNTIME, ERR_ORPHANED_BY_RESTART, ERR_ORPHANED_BY_SESSION, ERR_REQUIRES_INTERACTIVE, MAX_BRIEF_FILES, MAX_TASKS_ENV, MAX_UPSERT_ITEMS, MAX_WIDGET_LINES_ENV, MSG_ALL_COMPLETE_CLEAR, MSG_ASSIGN_PARTIAL, MSG_NO_TASKS, MSG_UPSERT_FIELD_MISPLACED, MSG_UPSERT_NONE_APPLIED, MSG_UPSERT_PARTIAL, NOTIFY_CUSTOM_TYPE, REF_PATTERN, STORE_PATH_ENV, STORE_SCHEMA_VERSION, STORE_TTL_MS_ENV, TASK_ACTIONS, TASK_ACTION_FIELDS, TASK_CONTEXTS, TASK_STATUSES, TOOL_LABEL, TOOL_NAME, TaskAssignmentSchema, TaskItemSchema, TaskParamsSchema, TaskStore, applyTaskMutation, buildAssignmentResult, buildTextResult, buildToolResult, countTasks, createTaskTool, deriveBlocks, deriveTaskProjection, detectCycle, emptyDocument, formatAssignmentResults, formatContent, formatUpsertFailure, formatUpsertFailureText, getDelegationTimeoutMs, getMaxTasks, getMaxWidgetLines, getStoreTtlMs, groupTasks, hasActiveWork, hasStorePathOverride, isBlocked, isCommittingOp, isDelegationActive, isTaskListComplete, lockPathFor, parsePiTaskConfig, reconcileOrphanedDelegations, removeLegacyStoreDirectory, removeLegacyStoreDirectoryAsync, resolveCollapseKey, resolveLegacyStoreDirectory, resolveLegacyStoreDirectoryAsync, resolveSessionKey, resolveStorePath, selectOverlayLayout, selectOverlayLayoutFromProjection, shouldShowIds, singleItemOutcome, sweepStoreFiles, sweepStoreFilesAsync, taskActionAcceptsField, tempPathFor, unresolvedBlockers, visibleTasks };
@@ -0,0 +1,79 @@
1
+ //#region src/services/invariants/index.ts
2
+ /**
3
+ * Collapse a malformed snapshot to one row per task id.
4
+ *
5
+ * Normal writes replace tasks in place, but older or externally edited stores
6
+ * can contain both a stale and a current copy. Prefer the copy with the newest
7
+ * ISO update timestamp; equal or missing timestamps use the later array entry.
8
+ * The winning row keeps the id's original position so repair does not reorder
9
+ * an otherwise stable task list.
10
+ */
11
+ function canonicalizeTasks(tasks) {
12
+ const canonical = [];
13
+ const indexById = /* @__PURE__ */ new Map();
14
+ for (const task of tasks) {
15
+ const existingIndex = indexById.get(task.id);
16
+ if (existingIndex === void 0) {
17
+ indexById.set(task.id, canonical.length);
18
+ canonical.push(task);
19
+ continue;
20
+ }
21
+ const existing = canonical[existingIndex];
22
+ if (!existing.updatedAt || !task.updatedAt || task.updatedAt >= existing.updatedAt) canonical[existingIndex] = task;
23
+ }
24
+ return canonical;
25
+ }
26
+ /**
27
+ * Allowed forward transitions per source status.
28
+ *
29
+ * `failed` is recoverable (a delegation can be retried) so it may return to
30
+ * pending or in_progress. `completed` is one-way to `deleted`; `deleted` is a
31
+ * terminal tombstone.
32
+ */
33
+ const VALID_TRANSITIONS = {
34
+ pending: /* @__PURE__ */ new Set([
35
+ "in_progress",
36
+ "completed",
37
+ "failed",
38
+ "deleted"
39
+ ]),
40
+ in_progress: /* @__PURE__ */ new Set([
41
+ "pending",
42
+ "completed",
43
+ "failed",
44
+ "deleted"
45
+ ]),
46
+ failed: /* @__PURE__ */ new Set([
47
+ "pending",
48
+ "in_progress",
49
+ "completed",
50
+ "deleted"
51
+ ]),
52
+ completed: /* @__PURE__ */ new Set(["deleted"]),
53
+ deleted: /* @__PURE__ */ new Set()
54
+ };
55
+ function isTransitionValid(from, to) {
56
+ if (from === to) return true;
57
+ return VALID_TRANSITIONS[from].has(to);
58
+ }
59
+ //#endregion
60
+ Object.defineProperty(exports, "VALID_TRANSITIONS", {
61
+ enumerable: true,
62
+ get: function() {
63
+ return VALID_TRANSITIONS;
64
+ }
65
+ });
66
+ Object.defineProperty(exports, "canonicalizeTasks", {
67
+ enumerable: true,
68
+ get: function() {
69
+ return canonicalizeTasks;
70
+ }
71
+ });
72
+ Object.defineProperty(exports, "isTransitionValid", {
73
+ enumerable: true,
74
+ get: function() {
75
+ return isTransitionValid;
76
+ }
77
+ });
78
+
79
+ //# sourceMappingURL=invariants-DhjEjBPU.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"invariants-DhjEjBPU.cjs","names":[],"sources":["../src/services/invariants/index.ts"],"sourcesContent":["import type { Task, TaskStatus } from '../../models/task';\n\n/**\n * Collapse a malformed snapshot to one row per task id.\n *\n * Normal writes replace tasks in place, but older or externally edited stores\n * can contain both a stale and a current copy. Prefer the copy with the newest\n * ISO update timestamp; equal or missing timestamps use the later array entry.\n * The winning row keeps the id's original position so repair does not reorder\n * an otherwise stable task list.\n */\nexport function canonicalizeTasks(tasks: readonly Task[]): Task[] {\n const canonical: Task[] = [];\n const indexById = new Map<number, number>();\n\n for (const task of tasks) {\n const existingIndex = indexById.get(task.id);\n if (existingIndex === undefined) {\n indexById.set(task.id, canonical.length);\n canonical.push(task);\n continue;\n }\n\n const existing = canonical[existingIndex];\n if (!existing.updatedAt || !task.updatedAt || task.updatedAt >= existing.updatedAt) {\n canonical[existingIndex] = task;\n }\n }\n\n return canonical;\n}\n\n/**\n * Allowed forward transitions per source status.\n *\n * `failed` is recoverable (a delegation can be retried) so it may return to\n * pending or in_progress. `completed` is one-way to `deleted`; `deleted` is a\n * terminal tombstone.\n */\nexport const VALID_TRANSITIONS: Record<TaskStatus, ReadonlySet<TaskStatus>> = {\n pending: new Set<TaskStatus>(['in_progress', 'completed', 'failed', 'deleted']),\n in_progress: new Set<TaskStatus>(['pending', 'completed', 'failed', 'deleted']),\n failed: new Set<TaskStatus>(['pending', 'in_progress', 'completed', 'deleted']),\n completed: new Set<TaskStatus>(['deleted']),\n deleted: new Set<TaskStatus>(),\n};\n\nexport function isTransitionValid(from: TaskStatus, to: TaskStatus): boolean {\n if (from === to) return true;\n return VALID_TRANSITIONS[from].has(to);\n}\n"],"mappings":";;;;;;;;;;AAWA,SAAgB,kBAAkB,OAAgC;CAChE,MAAM,YAAoB,CAAC;CAC3B,MAAM,4BAAY,IAAI,IAAoB;CAE1C,KAAK,MAAM,QAAQ,OAAO;EACxB,MAAM,gBAAgB,UAAU,IAAI,KAAK,EAAE;EAC3C,IAAI,kBAAkB,KAAA,GAAW;GAC/B,UAAU,IAAI,KAAK,IAAI,UAAU,MAAM;GACvC,UAAU,KAAK,IAAI;GACnB;EACF;EAEA,MAAM,WAAW,UAAU;EAC3B,IAAI,CAAC,SAAS,aAAa,CAAC,KAAK,aAAa,KAAK,aAAa,SAAS,WACvE,UAAU,iBAAiB;CAE/B;CAEA,OAAO;AACT;;;;;;;;AASA,MAAa,oBAAiE;CAC5E,yBAAS,IAAI,IAAgB;EAAC;EAAe;EAAa;EAAU;CAAS,CAAC;CAC9E,6BAAa,IAAI,IAAgB;EAAC;EAAW;EAAa;EAAU;CAAS,CAAC;CAC9E,wBAAQ,IAAI,IAAgB;EAAC;EAAW;EAAe;EAAa;CAAS,CAAC;CAC9E,2BAAW,IAAI,IAAgB,CAAC,SAAS,CAAC;CAC1C,yBAAS,IAAI,IAAgB;AAC/B;AAEA,SAAgB,kBAAkB,MAAkB,IAAyB;CAC3E,IAAI,SAAS,IAAI,OAAO;CACxB,OAAO,kBAAkB,KAAK,CAAC,IAAI,EAAE;AACvC"}
@@ -0,0 +1,62 @@
1
+ //#region src/services/invariants/index.ts
2
+ /**
3
+ * Collapse a malformed snapshot to one row per task id.
4
+ *
5
+ * Normal writes replace tasks in place, but older or externally edited stores
6
+ * can contain both a stale and a current copy. Prefer the copy with the newest
7
+ * ISO update timestamp; equal or missing timestamps use the later array entry.
8
+ * The winning row keeps the id's original position so repair does not reorder
9
+ * an otherwise stable task list.
10
+ */
11
+ function canonicalizeTasks(tasks) {
12
+ const canonical = [];
13
+ const indexById = /* @__PURE__ */ new Map();
14
+ for (const task of tasks) {
15
+ const existingIndex = indexById.get(task.id);
16
+ if (existingIndex === void 0) {
17
+ indexById.set(task.id, canonical.length);
18
+ canonical.push(task);
19
+ continue;
20
+ }
21
+ const existing = canonical[existingIndex];
22
+ if (!existing.updatedAt || !task.updatedAt || task.updatedAt >= existing.updatedAt) canonical[existingIndex] = task;
23
+ }
24
+ return canonical;
25
+ }
26
+ /**
27
+ * Allowed forward transitions per source status.
28
+ *
29
+ * `failed` is recoverable (a delegation can be retried) so it may return to
30
+ * pending or in_progress. `completed` is one-way to `deleted`; `deleted` is a
31
+ * terminal tombstone.
32
+ */
33
+ const VALID_TRANSITIONS = {
34
+ pending: /* @__PURE__ */ new Set([
35
+ "in_progress",
36
+ "completed",
37
+ "failed",
38
+ "deleted"
39
+ ]),
40
+ in_progress: /* @__PURE__ */ new Set([
41
+ "pending",
42
+ "completed",
43
+ "failed",
44
+ "deleted"
45
+ ]),
46
+ failed: /* @__PURE__ */ new Set([
47
+ "pending",
48
+ "in_progress",
49
+ "completed",
50
+ "deleted"
51
+ ]),
52
+ completed: /* @__PURE__ */ new Set(["deleted"]),
53
+ deleted: /* @__PURE__ */ new Set()
54
+ };
55
+ function isTransitionValid(from, to) {
56
+ if (from === to) return true;
57
+ return VALID_TRANSITIONS[from].has(to);
58
+ }
59
+ //#endregion
60
+ export { canonicalizeTasks as n, isTransitionValid as r, VALID_TRANSITIONS as t };
61
+
62
+ //# sourceMappingURL=invariants-q_UamF7D.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"invariants-q_UamF7D.mjs","names":[],"sources":["../src/services/invariants/index.ts"],"sourcesContent":["import type { Task, TaskStatus } from '../../models/task';\n\n/**\n * Collapse a malformed snapshot to one row per task id.\n *\n * Normal writes replace tasks in place, but older or externally edited stores\n * can contain both a stale and a current copy. Prefer the copy with the newest\n * ISO update timestamp; equal or missing timestamps use the later array entry.\n * The winning row keeps the id's original position so repair does not reorder\n * an otherwise stable task list.\n */\nexport function canonicalizeTasks(tasks: readonly Task[]): Task[] {\n const canonical: Task[] = [];\n const indexById = new Map<number, number>();\n\n for (const task of tasks) {\n const existingIndex = indexById.get(task.id);\n if (existingIndex === undefined) {\n indexById.set(task.id, canonical.length);\n canonical.push(task);\n continue;\n }\n\n const existing = canonical[existingIndex];\n if (!existing.updatedAt || !task.updatedAt || task.updatedAt >= existing.updatedAt) {\n canonical[existingIndex] = task;\n }\n }\n\n return canonical;\n}\n\n/**\n * Allowed forward transitions per source status.\n *\n * `failed` is recoverable (a delegation can be retried) so it may return to\n * pending or in_progress. `completed` is one-way to `deleted`; `deleted` is a\n * terminal tombstone.\n */\nexport const VALID_TRANSITIONS: Record<TaskStatus, ReadonlySet<TaskStatus>> = {\n pending: new Set<TaskStatus>(['in_progress', 'completed', 'failed', 'deleted']),\n in_progress: new Set<TaskStatus>(['pending', 'completed', 'failed', 'deleted']),\n failed: new Set<TaskStatus>(['pending', 'in_progress', 'completed', 'deleted']),\n completed: new Set<TaskStatus>(['deleted']),\n deleted: new Set<TaskStatus>(),\n};\n\nexport function isTransitionValid(from: TaskStatus, to: TaskStatus): boolean {\n if (from === to) return true;\n return VALID_TRANSITIONS[from].has(to);\n}\n"],"mappings":";;;;;;;;;;AAWA,SAAgB,kBAAkB,OAAgC;CAChE,MAAM,YAAoB,CAAC;CAC3B,MAAM,4BAAY,IAAI,IAAoB;CAE1C,KAAK,MAAM,QAAQ,OAAO;EACxB,MAAM,gBAAgB,UAAU,IAAI,KAAK,EAAE;EAC3C,IAAI,kBAAkB,KAAA,GAAW;GAC/B,UAAU,IAAI,KAAK,IAAI,UAAU,MAAM;GACvC,UAAU,KAAK,IAAI;GACnB;EACF;EAEA,MAAM,WAAW,UAAU;EAC3B,IAAI,CAAC,SAAS,aAAa,CAAC,KAAK,aAAa,KAAK,aAAa,SAAS,WACvE,UAAU,iBAAiB;CAE/B;CAEA,OAAO;AACT;;;;;;;;AASA,MAAa,oBAAiE;CAC5E,yBAAS,IAAI,IAAgB;EAAC;EAAe;EAAa;EAAU;CAAS,CAAC;CAC9E,6BAAa,IAAI,IAAgB;EAAC;EAAW;EAAa;EAAU;CAAS,CAAC;CAC9E,wBAAQ,IAAI,IAAgB;EAAC;EAAW;EAAe;EAAa;CAAS,CAAC;CAC9E,2BAAW,IAAI,IAAgB,CAAC,SAAS,CAAC;CAC1C,yBAAS,IAAI,IAAgB;AAC/B;AAEA,SAAgB,kBAAkB,MAAkB,IAAyB;CAC3E,IAAI,SAAS,IAAI,OAAO;CACxB,OAAO,kBAAkB,KAAK,CAAC,IAAI,EAAE;AACvC"}
@@ -0,0 +1,41 @@
1
+ import { t as TASK_EVENT } from "./telemetry-PmX_1Y8a.mjs";
2
+ import { createDoomTelemetry } from "@agimon-ai/doompi-telemetry";
3
+ //#region src/services/logSinkTelemetry/index.ts
4
+ const SERVICE_NAME = "doom-task";
5
+ const PACKAGE_NAME = "@agimon-ai/doompi-task";
6
+ const NOTIFICATION_OPERATION = "completion_notification";
7
+ function createTaskErrorReporter(options = {}) {
8
+ const telemetry = createDoomTelemetry({
9
+ serviceName: SERVICE_NAME,
10
+ packageName: PACKAGE_NAME,
11
+ cwd: options.cwd,
12
+ workspaceRoot: options.workspaceRoot,
13
+ env: options.env,
14
+ telemetryFactory: options.telemetryFactory,
15
+ warn: options.warn,
16
+ enableLogs: true,
17
+ enableTraces: true
18
+ });
19
+ return {
20
+ recordError: (event, error, attributes) => telemetry.recordError(event, error, attributes),
21
+ recordWarning: (event, error, attributes) => telemetry.recordWarning(event, error, attributes),
22
+ recordEvent: (event, attributes) => telemetry.recordEvent(event, attributes),
23
+ recordNotificationError: (error, taskId) => telemetry.recordError(TASK_EVENT.notificationFailed, error, {
24
+ "task.id": taskId,
25
+ "task.operation": NOTIFICATION_OPERATION
26
+ }),
27
+ flush: () => telemetry.flush(),
28
+ shutdown: () => telemetry.shutdown()
29
+ };
30
+ }
31
+ function toFailureReporter(reporter) {
32
+ return {
33
+ error: (event, error, attributes) => void reporter.recordError(event, error, attributes),
34
+ warn: (event, error, attributes) => void reporter.recordWarning(event, error, attributes),
35
+ event: (event, attributes) => void reporter.recordEvent(event, attributes)
36
+ };
37
+ }
38
+ //#endregion
39
+ export { toFailureReporter as n, createTaskErrorReporter as t };
40
+
41
+ //# sourceMappingURL=logSinkTelemetry-C5QjZipw.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"logSinkTelemetry-C5QjZipw.mjs","names":[],"sources":["../src/services/logSinkTelemetry/index.ts"],"sourcesContent":["import { createDoomTelemetry, type DoomTelemetry, type DoomTelemetryOptions } from '@agimon-ai/doompi-telemetry';\n\nimport { TASK_EVENT, type TaskErrorAttributes, type TaskFailureReporter } from '../../types/telemetry';\n\nexport {\n TASK_EVENT,\n type TaskErrorAttributes,\n type TaskErrorSink,\n type TaskEventName,\n type TaskEventSink,\n type TaskFailureReporter,\n} from '../../types/telemetry';\n\nconst SERVICE_NAME = 'doom-task';\nconst PACKAGE_NAME = '@agimon-ai/doompi-task';\nconst NOTIFICATION_OPERATION = 'completion_notification';\n\nexport interface TaskErrorReporterOptions {\n cwd?: string;\n workspaceRoot?: string;\n env?: NodeJS.ProcessEnv;\n telemetryFactory?: NonNullable<DoomTelemetryOptions['telemetryFactory']>;\n warn?: (message: string) => void;\n}\n\nexport interface TaskErrorReporter {\n recordError(event: string, error: unknown, attributes?: TaskErrorAttributes): Promise<void>;\n recordWarning(event: string, error: unknown, attributes?: TaskErrorAttributes): Promise<void>;\n recordEvent(event: string, attributes?: TaskErrorAttributes): Promise<void>;\n recordNotificationError(error: unknown, taskId: number): Promise<void>;\n flush(): Promise<void>;\n shutdown(): Promise<void>;\n}\n\nexport function createTaskErrorReporter(options: TaskErrorReporterOptions = {}): TaskErrorReporter {\n const telemetry: DoomTelemetry = createDoomTelemetry({\n serviceName: SERVICE_NAME,\n packageName: PACKAGE_NAME,\n cwd: options.cwd,\n workspaceRoot: options.workspaceRoot,\n env: options.env,\n telemetryFactory: options.telemetryFactory,\n warn: options.warn,\n enableLogs: true,\n enableTraces: true,\n });\n return {\n recordError: (event, error, attributes) => telemetry.recordError(event, error, attributes),\n recordWarning: (event, error, attributes) => telemetry.recordWarning(event, error, attributes),\n recordEvent: (event, attributes) => telemetry.recordEvent(event, attributes),\n recordNotificationError: (error, taskId) =>\n telemetry.recordError(TASK_EVENT.notificationFailed, error, {\n 'task.id': taskId,\n 'task.operation': NOTIFICATION_OPERATION,\n }),\n flush: () => telemetry.flush(),\n shutdown: () => telemetry.shutdown(),\n };\n}\n\nexport function toFailureReporter(reporter: TaskErrorReporter): TaskFailureReporter {\n return {\n error: (event, error, attributes) => void reporter.recordError(event, error, attributes),\n warn: (event, error, attributes) => void reporter.recordWarning(event, error, attributes),\n event: (event, attributes) => void reporter.recordEvent(event, attributes),\n };\n}\n"],"mappings":";;;AAaA,MAAM,eAAe;AACrB,MAAM,eAAe;AACrB,MAAM,yBAAyB;AAmB/B,SAAgB,wBAAwB,UAAoC,CAAC,GAAsB;CACjG,MAAM,YAA2B,oBAAoB;EACnD,aAAa;EACb,aAAa;EACb,KAAK,QAAQ;EACb,eAAe,QAAQ;EACvB,KAAK,QAAQ;EACb,kBAAkB,QAAQ;EAC1B,MAAM,QAAQ;EACd,YAAY;EACZ,cAAc;CAChB,CAAC;CACD,OAAO;EACL,cAAc,OAAO,OAAO,eAAe,UAAU,YAAY,OAAO,OAAO,UAAU;EACzF,gBAAgB,OAAO,OAAO,eAAe,UAAU,cAAc,OAAO,OAAO,UAAU;EAC7F,cAAc,OAAO,eAAe,UAAU,YAAY,OAAO,UAAU;EAC3E,0BAA0B,OAAO,WAC/B,UAAU,YAAY,WAAW,oBAAoB,OAAO;GAC1D,WAAW;GACX,kBAAkB;EACpB,CAAC;EACH,aAAa,UAAU,MAAM;EAC7B,gBAAgB,UAAU,SAAS;CACrC;AACF;AAEA,SAAgB,kBAAkB,UAAkD;CAClF,OAAO;EACL,QAAQ,OAAO,OAAO,eAAe,KAAK,SAAS,YAAY,OAAO,OAAO,UAAU;EACvF,OAAO,OAAO,OAAO,eAAe,KAAK,SAAS,cAAc,OAAO,OAAO,UAAU;EACxF,QAAQ,OAAO,eAAe,KAAK,SAAS,YAAY,OAAO,UAAU;CAC3E;AACF"}