@agimon-ai/doompi-task 0.0.1-alpha.2 → 0.0.1-alpha.21

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 (330) hide show
  1. package/README.md +39 -12
  2. package/dist/adapters/pi/extension.cjs +3 -0
  3. package/dist/adapters/pi/extension.cjs.map +1 -0
  4. package/dist/adapters/pi/extension.d.cts +12 -0
  5. package/dist/adapters/pi/extension.d.cts.map +1 -0
  6. package/dist/adapters/pi/extension.d.mts +12 -0
  7. package/dist/adapters/pi/extension.d.mts.map +1 -0
  8. package/dist/adapters/pi/extension.mjs +3 -0
  9. package/dist/adapters/pi/extension.mjs.map +1 -0
  10. package/dist/adapters/store/paths.cjs +2 -0
  11. package/dist/adapters/store/paths.cjs.map +1 -0
  12. package/dist/adapters/store/paths.d.cts +26 -0
  13. package/dist/adapters/store/paths.d.cts.map +1 -0
  14. package/dist/adapters/store/paths.d.mts +26 -0
  15. package/dist/adapters/store/paths.d.mts.map +1 -0
  16. package/dist/adapters/store/paths.mjs +2 -0
  17. package/dist/adapters/store/paths.mjs.map +1 -0
  18. package/dist/adapters/store/taskStore.cjs +2 -0
  19. package/dist/adapters/store/taskStore.cjs.map +1 -0
  20. package/dist/adapters/store/taskStore.d.cts +87 -0
  21. package/dist/adapters/store/taskStore.d.cts.map +1 -0
  22. package/dist/adapters/store/taskStore.d.mts +87 -0
  23. package/dist/adapters/store/taskStore.d.mts.map +1 -0
  24. package/dist/adapters/store/taskStore.mjs +2 -0
  25. package/dist/adapters/store/taskStore.mjs.map +1 -0
  26. package/dist/adapters/telemetry/logSinkTelemetry.cjs +2 -0
  27. package/dist/adapters/telemetry/logSinkTelemetry.cjs.map +1 -0
  28. package/dist/adapters/telemetry/logSinkTelemetry.d.cts +52 -0
  29. package/dist/adapters/telemetry/logSinkTelemetry.d.cts.map +1 -0
  30. package/dist/adapters/telemetry/logSinkTelemetry.d.mts +52 -0
  31. package/dist/adapters/telemetry/logSinkTelemetry.d.mts.map +1 -0
  32. package/dist/adapters/telemetry/logSinkTelemetry.mjs +2 -0
  33. package/dist/adapters/telemetry/logSinkTelemetry.mjs.map +1 -0
  34. package/dist/commands/index.cjs +2 -0
  35. package/dist/commands/index.cjs.map +1 -0
  36. package/dist/commands/index.d.cts +15 -0
  37. package/dist/commands/index.d.cts.map +1 -0
  38. package/dist/commands/index.d.mts +15 -0
  39. package/dist/commands/index.d.mts.map +1 -0
  40. package/dist/commands/index.mjs +2 -0
  41. package/dist/commands/index.mjs.map +1 -0
  42. package/dist/commands/task/promptGuidelines.cjs +2 -0
  43. package/dist/commands/task/promptGuidelines.cjs.map +1 -0
  44. package/dist/commands/task/promptGuidelines.d.cts +5 -0
  45. package/dist/commands/task/promptGuidelines.d.cts.map +1 -0
  46. package/dist/commands/task/promptGuidelines.d.mts +5 -0
  47. package/dist/commands/task/promptGuidelines.d.mts.map +1 -0
  48. package/dist/commands/task/promptGuidelines.mjs +2 -0
  49. package/dist/commands/task/promptGuidelines.mjs.map +1 -0
  50. package/dist/commands/task/responseEnvelope.cjs +7 -0
  51. package/dist/commands/task/responseEnvelope.cjs.map +1 -0
  52. package/dist/commands/task/responseEnvelope.d.cts +51 -0
  53. package/dist/commands/task/responseEnvelope.d.cts.map +1 -0
  54. package/dist/commands/task/responseEnvelope.d.mts +51 -0
  55. package/dist/commands/task/responseEnvelope.d.mts.map +1 -0
  56. package/dist/commands/task/responseEnvelope.mjs +7 -0
  57. package/dist/commands/task/responseEnvelope.mjs.map +1 -0
  58. package/dist/commands/task/taskTool.cjs +3 -0
  59. package/dist/commands/task/taskTool.cjs.map +1 -0
  60. package/dist/commands/task/taskTool.d.cts +19 -0
  61. package/dist/commands/task/taskTool.d.cts.map +1 -0
  62. package/dist/commands/task/taskTool.d.mts +19 -0
  63. package/dist/commands/task/taskTool.d.mts.map +1 -0
  64. package/dist/commands/task/taskTool.mjs +3 -0
  65. package/dist/commands/task/taskTool.mjs.map +1 -0
  66. package/dist/commands.cjs +1 -2
  67. package/dist/commands.d.cts +2 -14
  68. package/dist/commands.d.mts +2 -14
  69. package/dist/commands.mjs +1 -2
  70. package/dist/config.cjs +1 -2
  71. package/dist/config.d.cts +2 -38
  72. package/dist/config.d.mts +2 -38
  73. package/dist/config.mjs +1 -2
  74. package/dist/delegation/manager.cjs +1 -6
  75. package/dist/delegation/manager.d.cts +2 -189
  76. package/dist/delegation/manager.d.mts +2 -189
  77. package/dist/delegation/manager.mjs +1 -6
  78. package/dist/extension.cjs +1 -3
  79. package/dist/extension.d.cts +2 -12
  80. package/dist/extension.d.mts +2 -12
  81. package/dist/extension.mjs +1 -3
  82. package/dist/extensions/doom.cjs +1 -1
  83. package/dist/extensions/doom.cjs.map +1 -1
  84. package/dist/extensions/doom.mjs +1 -1
  85. package/dist/extensions/doom.mjs.map +1 -1
  86. package/dist/extensions/pi.cjs +1 -1
  87. package/dist/extensions/pi.cjs.map +1 -1
  88. package/dist/extensions/pi.d.cts +1 -1
  89. package/dist/extensions/pi.d.mts +1 -1
  90. package/dist/extensions/pi.mjs +1 -1
  91. package/dist/extensions/pi.mjs.map +1 -1
  92. package/dist/index.cjs +1 -1
  93. package/dist/index.d.cts +15 -14
  94. package/dist/index.d.mts +15 -14
  95. package/dist/index.mjs +1 -1
  96. package/dist/logSinkTelemetry.cjs +1 -2
  97. package/dist/logSinkTelemetry.d.cts +2 -51
  98. package/dist/logSinkTelemetry.d.mts +2 -51
  99. package/dist/logSinkTelemetry.mjs +1 -2
  100. package/dist/schemas/task.cjs +2 -0
  101. package/dist/schemas/task.cjs.map +1 -0
  102. package/dist/schemas/task.d.cts +103 -0
  103. package/dist/schemas/task.d.cts.map +1 -0
  104. package/dist/schemas/task.d.mts +103 -0
  105. package/dist/schemas/task.d.mts.map +1 -0
  106. package/dist/schemas/task.mjs +2 -0
  107. package/dist/schemas/task.mjs.map +1 -0
  108. package/dist/services/delegation/manager.cjs +6 -0
  109. package/dist/services/delegation/manager.cjs.map +1 -0
  110. package/dist/services/delegation/manager.d.cts +188 -0
  111. package/dist/services/delegation/manager.d.cts.map +1 -0
  112. package/dist/services/delegation/manager.d.mts +188 -0
  113. package/dist/services/delegation/manager.d.mts.map +1 -0
  114. package/dist/services/delegation/manager.mjs +6 -0
  115. package/dist/services/delegation/manager.mjs.map +1 -0
  116. package/dist/services/narration/taskNarration.cjs +2 -0
  117. package/dist/services/narration/taskNarration.cjs.map +1 -0
  118. package/dist/services/narration/taskNarration.mjs +2 -0
  119. package/dist/services/narration/taskNarration.mjs.map +1 -0
  120. package/dist/services/store/invariants.cjs +2 -0
  121. package/dist/services/store/invariants.cjs.map +1 -0
  122. package/dist/services/store/invariants.d.cts +14 -0
  123. package/dist/services/store/invariants.d.cts.map +1 -0
  124. package/dist/services/store/invariants.d.mts +14 -0
  125. package/dist/services/store/invariants.d.mts.map +1 -0
  126. package/dist/services/store/invariants.mjs +2 -0
  127. package/dist/services/store/invariants.mjs.map +1 -0
  128. package/dist/services/store/paths.cjs +1 -0
  129. package/dist/services/store/paths.mjs +1 -0
  130. package/dist/services/store/processLiveness.cjs +2 -0
  131. package/dist/services/store/processLiveness.cjs.map +1 -0
  132. package/dist/services/store/processLiveness.d.cts +12 -0
  133. package/dist/services/store/processLiveness.d.cts.map +1 -0
  134. package/dist/services/store/processLiveness.d.mts +12 -0
  135. package/dist/services/store/processLiveness.d.mts.map +1 -0
  136. package/dist/services/store/processLiveness.mjs +2 -0
  137. package/dist/services/store/processLiveness.mjs.map +1 -0
  138. package/dist/services/store/reconcile.cjs +2 -0
  139. package/dist/services/store/reconcile.cjs.map +1 -0
  140. package/dist/services/store/reconcile.d.cts +34 -0
  141. package/dist/services/store/reconcile.d.cts.map +1 -0
  142. package/dist/services/store/reconcile.d.mts +34 -0
  143. package/dist/services/store/reconcile.d.mts.map +1 -0
  144. package/dist/services/store/reconcile.mjs +2 -0
  145. package/dist/services/store/reconcile.mjs.map +1 -0
  146. package/dist/services/store/reducer.cjs +3 -0
  147. package/dist/services/store/reducer.cjs.map +1 -0
  148. package/dist/services/store/reducer.d.cts +72 -0
  149. package/dist/services/store/reducer.d.cts.map +1 -0
  150. package/dist/services/store/reducer.d.mts +72 -0
  151. package/dist/services/store/reducer.d.mts.map +1 -0
  152. package/dist/services/store/reducer.mjs +3 -0
  153. package/dist/services/store/reducer.mjs.map +1 -0
  154. package/dist/services/store/taskGraph.cjs +2 -0
  155. package/dist/services/store/taskGraph.cjs.map +1 -0
  156. package/dist/services/store/taskGraph.d.cts +25 -0
  157. package/dist/services/store/taskGraph.d.cts.map +1 -0
  158. package/dist/services/store/taskGraph.d.mts +25 -0
  159. package/dist/services/store/taskGraph.d.mts.map +1 -0
  160. package/dist/services/store/taskGraph.mjs +2 -0
  161. package/dist/services/store/taskGraph.mjs.map +1 -0
  162. package/dist/services/store/taskStore.cjs +1 -0
  163. package/dist/services/store/taskStore.d.cts +2 -0
  164. package/dist/services/store/taskStore.d.mts +2 -0
  165. package/dist/services/store/taskStore.mjs +1 -0
  166. package/dist/services/store/types.cjs +2 -0
  167. package/dist/services/store/types.cjs.map +1 -0
  168. package/dist/services/store/types.d.cts +177 -0
  169. package/dist/services/store/types.d.cts.map +1 -0
  170. package/dist/services/store/types.d.mts +177 -0
  171. package/dist/services/store/types.d.mts.map +1 -0
  172. package/dist/services/store/types.mjs +2 -0
  173. package/dist/services/store/types.mjs.map +1 -0
  174. package/dist/store/invariants.cjs +1 -2
  175. package/dist/store/invariants.d.cts +2 -14
  176. package/dist/store/invariants.d.mts +2 -14
  177. package/dist/store/invariants.mjs +1 -2
  178. package/dist/store/paths.cjs +1 -2
  179. package/dist/store/paths.d.cts +2 -23
  180. package/dist/store/paths.d.mts +2 -23
  181. package/dist/store/paths.mjs +1 -2
  182. package/dist/store/processLiveness.cjs +1 -2
  183. package/dist/store/processLiveness.d.cts +2 -12
  184. package/dist/store/processLiveness.d.mts +2 -12
  185. package/dist/store/processLiveness.mjs +1 -2
  186. package/dist/store/reconcile.cjs +1 -2
  187. package/dist/store/reconcile.d.cts +2 -34
  188. package/dist/store/reconcile.d.mts +2 -34
  189. package/dist/store/reconcile.mjs +1 -2
  190. package/dist/store/reducer.cjs +1 -3
  191. package/dist/store/reducer.d.cts +2 -72
  192. package/dist/store/reducer.d.mts +2 -72
  193. package/dist/store/reducer.mjs +1 -3
  194. package/dist/store/taskGraph.cjs +1 -2
  195. package/dist/store/taskGraph.d.cts +2 -25
  196. package/dist/store/taskGraph.d.mts +2 -25
  197. package/dist/store/taskGraph.mjs +1 -2
  198. package/dist/store/taskStore.cjs +1 -2
  199. package/dist/store/taskStore.d.cts +3 -77
  200. package/dist/store/taskStore.d.mts +3 -77
  201. package/dist/store/taskStore.mjs +1 -2
  202. package/dist/store/types.cjs +1 -2
  203. package/dist/store/types.d.cts +2 -165
  204. package/dist/store/types.d.mts +2 -165
  205. package/dist/store/types.mjs +1 -2
  206. package/dist/tool/promptGuidelines.cjs +1 -2
  207. package/dist/tool/promptGuidelines.d.cts +2 -5
  208. package/dist/tool/promptGuidelines.d.mts +2 -5
  209. package/dist/tool/promptGuidelines.mjs +1 -2
  210. package/dist/tool/responseEnvelope.cjs +1 -6
  211. package/dist/tool/responseEnvelope.d.cts +2 -39
  212. package/dist/tool/responseEnvelope.d.mts +2 -39
  213. package/dist/tool/responseEnvelope.mjs +1 -6
  214. package/dist/tool/schema.cjs +1 -2
  215. package/dist/tool/schema.d.cts +2 -86
  216. package/dist/tool/schema.d.mts +2 -86
  217. package/dist/tool/schema.mjs +1 -2
  218. package/dist/tool/taskTool.cjs +1 -3
  219. package/dist/tool/taskTool.d.cts +3 -17
  220. package/dist/tool/taskTool.d.mts +3 -17
  221. package/dist/tool/taskTool.mjs +1 -3
  222. package/dist/tui/format.cjs +3 -3
  223. package/dist/tui/format.cjs.map +1 -1
  224. package/dist/tui/format.d.cts +5 -5
  225. package/dist/tui/format.d.cts.map +1 -1
  226. package/dist/tui/format.d.mts +5 -5
  227. package/dist/tui/format.d.mts.map +1 -1
  228. package/dist/tui/format.mjs +3 -3
  229. package/dist/tui/format.mjs.map +1 -1
  230. package/dist/tui/selectors.cjs +1 -1
  231. package/dist/tui/selectors.cjs.map +1 -1
  232. package/dist/tui/selectors.d.cts +8 -1
  233. package/dist/tui/selectors.d.cts.map +1 -1
  234. package/dist/tui/selectors.d.mts +8 -1
  235. package/dist/tui/selectors.d.mts.map +1 -1
  236. package/dist/tui/selectors.mjs +1 -1
  237. package/dist/tui/selectors.mjs.map +1 -1
  238. package/dist/tui/taskOverlay.cjs +1 -1
  239. package/dist/tui/taskOverlay.cjs.map +1 -1
  240. package/dist/tui/taskOverlay.d.cts +2 -2
  241. package/dist/tui/taskOverlay.d.cts.map +1 -1
  242. package/dist/tui/taskOverlay.d.mts +2 -2
  243. package/dist/tui/taskOverlay.d.mts.map +1 -1
  244. package/dist/tui/taskOverlay.mjs +1 -1
  245. package/dist/tui/taskOverlay.mjs.map +1 -1
  246. package/dist/tui/taskSpace.cjs +3 -3
  247. package/dist/tui/taskSpace.cjs.map +1 -1
  248. package/dist/tui/taskSpace.d.cts +2 -1
  249. package/dist/tui/taskSpace.d.cts.map +1 -1
  250. package/dist/tui/taskSpace.d.mts +2 -1
  251. package/dist/tui/taskSpace.d.mts.map +1 -1
  252. package/dist/tui/taskSpace.mjs +3 -3
  253. package/dist/tui/taskSpace.mjs.map +1 -1
  254. package/dist/types/config.cjs +2 -0
  255. package/dist/types/config.cjs.map +1 -0
  256. package/dist/types/config.d.cts +43 -0
  257. package/dist/types/config.d.cts.map +1 -0
  258. package/dist/types/config.d.mts +43 -0
  259. package/dist/types/config.d.mts.map +1 -0
  260. package/dist/types/config.mjs +2 -0
  261. package/dist/types/config.mjs.map +1 -0
  262. package/package.json +16 -9
  263. package/dist/commands.cjs.map +0 -1
  264. package/dist/commands.d.cts.map +0 -1
  265. package/dist/commands.d.mts.map +0 -1
  266. package/dist/commands.mjs.map +0 -1
  267. package/dist/config.cjs.map +0 -1
  268. package/dist/config.d.cts.map +0 -1
  269. package/dist/config.d.mts.map +0 -1
  270. package/dist/config.mjs.map +0 -1
  271. package/dist/delegation/manager.cjs.map +0 -1
  272. package/dist/delegation/manager.d.cts.map +0 -1
  273. package/dist/delegation/manager.d.mts.map +0 -1
  274. package/dist/delegation/manager.mjs.map +0 -1
  275. package/dist/extension.cjs.map +0 -1
  276. package/dist/extension.d.cts.map +0 -1
  277. package/dist/extension.d.mts.map +0 -1
  278. package/dist/extension.mjs.map +0 -1
  279. package/dist/logSinkTelemetry.cjs.map +0 -1
  280. package/dist/logSinkTelemetry.d.cts.map +0 -1
  281. package/dist/logSinkTelemetry.d.mts.map +0 -1
  282. package/dist/logSinkTelemetry.mjs.map +0 -1
  283. package/dist/store/invariants.cjs.map +0 -1
  284. package/dist/store/invariants.d.cts.map +0 -1
  285. package/dist/store/invariants.d.mts.map +0 -1
  286. package/dist/store/invariants.mjs.map +0 -1
  287. package/dist/store/paths.cjs.map +0 -1
  288. package/dist/store/paths.d.cts.map +0 -1
  289. package/dist/store/paths.d.mts.map +0 -1
  290. package/dist/store/paths.mjs.map +0 -1
  291. package/dist/store/processLiveness.cjs.map +0 -1
  292. package/dist/store/processLiveness.d.cts.map +0 -1
  293. package/dist/store/processLiveness.d.mts.map +0 -1
  294. package/dist/store/processLiveness.mjs.map +0 -1
  295. package/dist/store/reconcile.cjs.map +0 -1
  296. package/dist/store/reconcile.d.cts.map +0 -1
  297. package/dist/store/reconcile.d.mts.map +0 -1
  298. package/dist/store/reconcile.mjs.map +0 -1
  299. package/dist/store/reducer.cjs.map +0 -1
  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.map +0 -1
  303. package/dist/store/taskGraph.cjs.map +0 -1
  304. package/dist/store/taskGraph.d.cts.map +0 -1
  305. package/dist/store/taskGraph.d.mts.map +0 -1
  306. package/dist/store/taskGraph.mjs.map +0 -1
  307. package/dist/store/taskStore.cjs.map +0 -1
  308. package/dist/store/taskStore.d.cts.map +0 -1
  309. package/dist/store/taskStore.d.mts.map +0 -1
  310. package/dist/store/taskStore.mjs.map +0 -1
  311. package/dist/store/types.cjs.map +0 -1
  312. package/dist/store/types.d.cts.map +0 -1
  313. package/dist/store/types.d.mts.map +0 -1
  314. package/dist/store/types.mjs.map +0 -1
  315. package/dist/tool/promptGuidelines.cjs.map +0 -1
  316. package/dist/tool/promptGuidelines.d.cts.map +0 -1
  317. package/dist/tool/promptGuidelines.d.mts.map +0 -1
  318. package/dist/tool/promptGuidelines.mjs.map +0 -1
  319. package/dist/tool/responseEnvelope.cjs.map +0 -1
  320. package/dist/tool/responseEnvelope.d.cts.map +0 -1
  321. package/dist/tool/responseEnvelope.d.mts.map +0 -1
  322. package/dist/tool/responseEnvelope.mjs.map +0 -1
  323. package/dist/tool/schema.cjs.map +0 -1
  324. package/dist/tool/schema.d.cts.map +0 -1
  325. package/dist/tool/schema.d.mts.map +0 -1
  326. package/dist/tool/schema.mjs.map +0 -1
  327. package/dist/tool/taskTool.cjs.map +0 -1
  328. package/dist/tool/taskTool.d.cts.map +0 -1
  329. package/dist/tool/taskTool.d.mts.map +0 -1
  330. package/dist/tool/taskTool.mjs.map +0 -1
@@ -1,165 +1,2 @@
1
- import { InlineAgent } from "@agimon-ai/doompi-extension-contracts/subagent-tool";
2
- //#region src/store/types.d.ts
3
- type TaskStatus = 'pending' | 'in_progress' | 'completed' | 'failed' | 'deleted';
4
- declare const DELETED_STATUS: TaskStatus;
5
- type TaskAction = 'upsert' | 'list' | 'get' | 'delete' | 'clear' | 'assign' | 'cancel';
6
- type DelegationState = 'requested' | 'running' | 'completed' | 'failed' | 'cancelled';
7
- /** Terminal result of a delegated subagent run, copied off the delegation response. */
8
- interface DelegationResult {
9
- status: string;
10
- output?: string;
11
- outputPath?: string;
12
- sessionFile?: string;
13
- error?: string;
14
- durationMs?: number;
15
- toolCount?: number;
16
- }
17
- /**
18
- * Delegation bookkeeping attached to a task that was handed to a subagent.
19
- *
20
- * `pid` is the harness process that owns the run: it is the only way to tell an
21
- * genuinely-running delegation from one orphaned by a harness crash, since the
22
- * child dies with its parent but the file survives.
23
- */
24
- interface TaskDelegation {
25
- requestId: string;
26
- agent: string;
27
- state: DelegationState;
28
- sessionId?: string;
29
- pid?: number;
30
- runId?: string;
31
- model?: string;
32
- startedAt?: string;
33
- endedAt?: string;
34
- result?: DelegationResult;
35
- }
36
- interface Task {
37
- id: number;
38
- subject: string;
39
- description?: string;
40
- activeForm?: string;
41
- status: TaskStatus;
42
- blockedBy?: number[];
43
- owner?: string;
44
- metadata?: Record<string, unknown>;
45
- createdAt?: string;
46
- updatedAt?: string;
47
- delegation?: TaskDelegation;
48
- }
49
- declare const STORE_SCHEMA_VERSION = 1;
50
- /** The complete on-disk document. `rev` increments on every committed write. */
51
- interface TaskDocument {
52
- version: number;
53
- rev: number;
54
- nextId: number;
55
- tasks: Task[];
56
- }
57
- declare function emptyDocument(): TaskDocument;
58
- /**
59
- * A dependency target inside an upsert item: an existing task id, or the `ref`
60
- * of a task created earlier in the same call.
61
- *
62
- * Refs must start with a letter (see `REF_PATTERN`), so a ref is structurally
63
- * unconfusable with a stringified id and the discrimination is just `typeof`.
64
- */
65
- type DepToken = number | string;
66
- /**
67
- * One entry of an `upsert` call. No `id` creates a task; an `id` updates one.
68
- *
69
- * `blockedBy` (absolute set) is create-only and `addBlockedBy`/`removeBlockedBy`
70
- * (additive merge) are update-only, matching the split the two former actions
71
- * had. A field used against the wrong kind fails that item rather than being
72
- * silently ignored.
73
- */
74
- interface TaskItemMutation {
75
- id?: number;
76
- ref?: string;
77
- subject?: string;
78
- description?: string;
79
- activeForm?: string;
80
- status?: TaskStatus;
81
- blockedBy?: DepToken[];
82
- addBlockedBy?: DepToken[];
83
- removeBlockedBy?: DepToken[];
84
- owner?: string;
85
- metadata?: Record<string, unknown>;
86
- }
87
- /**
88
- * What one upsert item did. `index` is its position in the request array, so a
89
- * model reading a partial result can tell which entries still need resending.
90
- *
91
- * `message` is unprefixed: the `item[N] failed:` framing belongs to the
92
- * formatter, because the Task Space overlay shows this text on its own.
93
- */
94
- type UpsertItemOutcome = {
95
- index: number;
96
- kind: 'created';
97
- id: number;
98
- subject: string;
99
- status: TaskStatus;
100
- ref?: string;
101
- blockedBy?: number[];
102
- } | {
103
- index: number;
104
- kind: 'updated';
105
- id: number;
106
- fromStatus: TaskStatus;
107
- toStatus: TaskStatus;
108
- } | {
109
- index: number;
110
- kind: 'unchanged';
111
- id: number;
112
- status: TaskStatus;
113
- } | {
114
- index: number;
115
- kind: 'failed';
116
- message: string;
117
- id?: number;
118
- ref?: string;
119
- };
120
- /** Which tasks an upsert touched, so renderResult names them instead of guessing. */
121
- interface UpsertSummary {
122
- /** Ids of applied entries, in request order. A failed entry contributes nothing. */
123
- applied: number[];
124
- failed: number;
125
- }
126
- /**
127
- * Open-shape input bag the reducer accepts. The index signature lets the
128
- * runtime pass a TypeBox `Static<typeof TaskParamsSchema>` through without
129
- * casting each field.
130
- *
131
- * Per-task fields live on `tasks[]`, not here: a top-level `subject` or
132
- * `status` would be ambiguous once one call can carry many tasks.
133
- */
134
- interface TaskMutationParams {
135
- [key: string]: unknown;
136
- tasks?: TaskItemMutation[];
137
- /** `list` filter only. To set a status, upsert the task by id. */
138
- status?: TaskStatus;
139
- /** `get`, `delete`, `assign` and `cancel` only. */
140
- id?: number;
141
- includeDeleted?: boolean;
142
- agent?: string;
143
- inlineAgent?: InlineAgent;
144
- instructions?: string;
145
- /** `assign` only: the context pack the parent hands to the child. */
146
- relevantFiles?: string[];
147
- priorFindings?: string;
148
- model?: string;
149
- context?: 'fresh' | 'fork';
150
- }
151
- /** Snapshot returned under a tool result's `details` for renderResult. */
152
- interface TaskDetails {
153
- action: TaskAction;
154
- params: Record<string, unknown>;
155
- tasks: Task[];
156
- nextId: number;
157
- rev: number;
158
- error?: string;
159
- upsert?: UpsertSummary;
160
- }
161
- /** A delegation is "live" while the owning run may still produce a response. */
162
- declare function isDelegationActive(task: Task): boolean;
163
- //#endregion
164
- export { DELETED_STATUS, DelegationResult, DelegationState, DepToken, STORE_SCHEMA_VERSION, Task, TaskAction, TaskDelegation, TaskDetails, TaskDocument, TaskItemMutation, TaskMutationParams, TaskStatus, UpsertItemOutcome, UpsertSummary, emptyDocument, isDelegationActive };
165
- //# sourceMappingURL=types.d.cts.map
1
+ import { AssignmentSummary, DELETED_STATUS, DelegationResult, DelegationState, DepToken, STORE_SCHEMA_VERSION, Task, TaskAction, TaskAssignment, TaskDelegation, TaskDetails, TaskDocument, TaskItemMutation, TaskMutationParams, TaskStatus, UpsertItemOutcome, UpsertSummary, emptyDocument, isDelegationActive } from "../services/store/types.cjs";
2
+ export { AssignmentSummary, DELETED_STATUS, DelegationResult, DelegationState, DepToken, STORE_SCHEMA_VERSION, Task, TaskAction, TaskAssignment, TaskDelegation, TaskDetails, TaskDocument, TaskItemMutation, TaskMutationParams, TaskStatus, UpsertItemOutcome, UpsertSummary, emptyDocument, isDelegationActive };
@@ -1,165 +1,2 @@
1
- import { InlineAgent } from "@agimon-ai/doompi-extension-contracts/subagent-tool";
2
- //#region src/store/types.d.ts
3
- type TaskStatus = 'pending' | 'in_progress' | 'completed' | 'failed' | 'deleted';
4
- declare const DELETED_STATUS: TaskStatus;
5
- type TaskAction = 'upsert' | 'list' | 'get' | 'delete' | 'clear' | 'assign' | 'cancel';
6
- type DelegationState = 'requested' | 'running' | 'completed' | 'failed' | 'cancelled';
7
- /** Terminal result of a delegated subagent run, copied off the delegation response. */
8
- interface DelegationResult {
9
- status: string;
10
- output?: string;
11
- outputPath?: string;
12
- sessionFile?: string;
13
- error?: string;
14
- durationMs?: number;
15
- toolCount?: number;
16
- }
17
- /**
18
- * Delegation bookkeeping attached to a task that was handed to a subagent.
19
- *
20
- * `pid` is the harness process that owns the run: it is the only way to tell an
21
- * genuinely-running delegation from one orphaned by a harness crash, since the
22
- * child dies with its parent but the file survives.
23
- */
24
- interface TaskDelegation {
25
- requestId: string;
26
- agent: string;
27
- state: DelegationState;
28
- sessionId?: string;
29
- pid?: number;
30
- runId?: string;
31
- model?: string;
32
- startedAt?: string;
33
- endedAt?: string;
34
- result?: DelegationResult;
35
- }
36
- interface Task {
37
- id: number;
38
- subject: string;
39
- description?: string;
40
- activeForm?: string;
41
- status: TaskStatus;
42
- blockedBy?: number[];
43
- owner?: string;
44
- metadata?: Record<string, unknown>;
45
- createdAt?: string;
46
- updatedAt?: string;
47
- delegation?: TaskDelegation;
48
- }
49
- declare const STORE_SCHEMA_VERSION = 1;
50
- /** The complete on-disk document. `rev` increments on every committed write. */
51
- interface TaskDocument {
52
- version: number;
53
- rev: number;
54
- nextId: number;
55
- tasks: Task[];
56
- }
57
- declare function emptyDocument(): TaskDocument;
58
- /**
59
- * A dependency target inside an upsert item: an existing task id, or the `ref`
60
- * of a task created earlier in the same call.
61
- *
62
- * Refs must start with a letter (see `REF_PATTERN`), so a ref is structurally
63
- * unconfusable with a stringified id and the discrimination is just `typeof`.
64
- */
65
- type DepToken = number | string;
66
- /**
67
- * One entry of an `upsert` call. No `id` creates a task; an `id` updates one.
68
- *
69
- * `blockedBy` (absolute set) is create-only and `addBlockedBy`/`removeBlockedBy`
70
- * (additive merge) are update-only, matching the split the two former actions
71
- * had. A field used against the wrong kind fails that item rather than being
72
- * silently ignored.
73
- */
74
- interface TaskItemMutation {
75
- id?: number;
76
- ref?: string;
77
- subject?: string;
78
- description?: string;
79
- activeForm?: string;
80
- status?: TaskStatus;
81
- blockedBy?: DepToken[];
82
- addBlockedBy?: DepToken[];
83
- removeBlockedBy?: DepToken[];
84
- owner?: string;
85
- metadata?: Record<string, unknown>;
86
- }
87
- /**
88
- * What one upsert item did. `index` is its position in the request array, so a
89
- * model reading a partial result can tell which entries still need resending.
90
- *
91
- * `message` is unprefixed: the `item[N] failed:` framing belongs to the
92
- * formatter, because the Task Space overlay shows this text on its own.
93
- */
94
- type UpsertItemOutcome = {
95
- index: number;
96
- kind: 'created';
97
- id: number;
98
- subject: string;
99
- status: TaskStatus;
100
- ref?: string;
101
- blockedBy?: number[];
102
- } | {
103
- index: number;
104
- kind: 'updated';
105
- id: number;
106
- fromStatus: TaskStatus;
107
- toStatus: TaskStatus;
108
- } | {
109
- index: number;
110
- kind: 'unchanged';
111
- id: number;
112
- status: TaskStatus;
113
- } | {
114
- index: number;
115
- kind: 'failed';
116
- message: string;
117
- id?: number;
118
- ref?: string;
119
- };
120
- /** Which tasks an upsert touched, so renderResult names them instead of guessing. */
121
- interface UpsertSummary {
122
- /** Ids of applied entries, in request order. A failed entry contributes nothing. */
123
- applied: number[];
124
- failed: number;
125
- }
126
- /**
127
- * Open-shape input bag the reducer accepts. The index signature lets the
128
- * runtime pass a TypeBox `Static<typeof TaskParamsSchema>` through without
129
- * casting each field.
130
- *
131
- * Per-task fields live on `tasks[]`, not here: a top-level `subject` or
132
- * `status` would be ambiguous once one call can carry many tasks.
133
- */
134
- interface TaskMutationParams {
135
- [key: string]: unknown;
136
- tasks?: TaskItemMutation[];
137
- /** `list` filter only. To set a status, upsert the task by id. */
138
- status?: TaskStatus;
139
- /** `get`, `delete`, `assign` and `cancel` only. */
140
- id?: number;
141
- includeDeleted?: boolean;
142
- agent?: string;
143
- inlineAgent?: InlineAgent;
144
- instructions?: string;
145
- /** `assign` only: the context pack the parent hands to the child. */
146
- relevantFiles?: string[];
147
- priorFindings?: string;
148
- model?: string;
149
- context?: 'fresh' | 'fork';
150
- }
151
- /** Snapshot returned under a tool result's `details` for renderResult. */
152
- interface TaskDetails {
153
- action: TaskAction;
154
- params: Record<string, unknown>;
155
- tasks: Task[];
156
- nextId: number;
157
- rev: number;
158
- error?: string;
159
- upsert?: UpsertSummary;
160
- }
161
- /** A delegation is "live" while the owning run may still produce a response. */
162
- declare function isDelegationActive(task: Task): boolean;
163
- //#endregion
164
- export { DELETED_STATUS, DelegationResult, DelegationState, DepToken, STORE_SCHEMA_VERSION, Task, TaskAction, TaskDelegation, TaskDetails, TaskDocument, TaskItemMutation, TaskMutationParams, TaskStatus, UpsertItemOutcome, UpsertSummary, emptyDocument, isDelegationActive };
165
- //# sourceMappingURL=types.d.mts.map
1
+ import { AssignmentSummary, DELETED_STATUS, DelegationResult, DelegationState, DepToken, STORE_SCHEMA_VERSION, Task, TaskAction, TaskAssignment, TaskDelegation, TaskDetails, TaskDocument, TaskItemMutation, TaskMutationParams, TaskStatus, UpsertItemOutcome, UpsertSummary, emptyDocument, isDelegationActive } from "../services/store/types.mjs";
2
+ export { AssignmentSummary, DELETED_STATUS, DelegationResult, DelegationState, DepToken, STORE_SCHEMA_VERSION, Task, TaskAction, TaskAssignment, TaskDelegation, TaskDetails, TaskDocument, TaskItemMutation, TaskMutationParams, TaskStatus, UpsertItemOutcome, UpsertSummary, emptyDocument, isDelegationActive };
@@ -1,2 +1 @@
1
- const e=`deleted`,t=1;function n(){return{version:1,rev:0,nextId:1,tasks:[]}}function r(e){let t=e.delegation?.state;return t===`requested`||t===`running`}export{e as DELETED_STATUS,t as STORE_SCHEMA_VERSION,n as emptyDocument,r as isDelegationActive};
2
- //# sourceMappingURL=types.mjs.map
1
+ import{DELETED_STATUS as e,STORE_SCHEMA_VERSION as t,emptyDocument as n,isDelegationActive as r}from"../services/store/types.mjs";export{e as DELETED_STATUS,t as STORE_SCHEMA_VERSION,n as emptyDocument,r as isDelegationActive};
@@ -1,2 +1 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=["Use `task` for work with 3+ steps, when the user gives you a list of tasks, or immediately after receiving new instructions to capture requirements. Skip it for single trivial tasks and purely conversational requests.",`Capture a whole plan in one call: {"action":"upsert","tasks":[{"subject":"Research existing tool"},{"subject":"Write the reducer"},{"subject":"Add tests"}]}. Batch whenever you are writing the plan down — the initial list, a revised plan, or wiring dependencies across several tasks — because one call keeps ids and blockers consistent and shows the user the whole plan at once.`,`Do not batch progress. Mark a task in_progress with its own call BEFORE beginning work, and completed with its own call IMMEDIATELY when it is done. upsert accepts many tasks, but a batch of completions sent at the end of a turn is still wrong: batching is for writing a plan down, single calls are for reporting progress, and the user watches the task list to see where you are. Exactly one task should be in_progress for your own work; delegated tasks run in parallel and do not count against that.`,`Never mark a task completed if tests are failing, the implementation is partial, or you hit unresolved errors, use status "failed" or keep it in_progress and add a new task for the blocker in the same upsert.`,`When every non-deleted task is completed, review the full task list once more and call task {"action":"clear"} to close it. Do not leave an all-completed list open.`,`Status is a state machine: pending → in_progress → completed, plus failed (recoverable, can go back to pending or in_progress) and deleted as a tombstone. Pass activeForm (present-continuous, e.g. 'writing tests') when marking in_progress.`,`One call does both: an entry with an id changes that task, an entry without an id creates one. To change status, upsert the task by id, e.g. {"action":"upsert","tasks":[{"id":3,"status":"completed"}]}. Never omit the id when you meant to change an existing task — an entry with no id creates a new one instead. An entry that carries an id and no other field is rejected.`,`Use blockedBy for dependencies (A is blocked by B). On an entry with no id pass blockedBy as the initial set; on an entry with an id use addBlockedBy / removeBlockedBy (additive merge, do not resend the full array). To depend on a task created earlier in the SAME call, give that earlier entry a "ref" and list the ref string in place of an id: [{"ref":"api","subject":"Design the API"},{"subject":"Implement the API","blockedBy":["api"]}]. A ref must be declared before it is used. Cycles are rejected.`,`upsert applies each entry independently: the entries that pass are committed and the failures are reported with their array index. A failed entry changed nothing, so resend only the corrected failures — never resend the whole call, because an already-applied entry with no id would create a duplicate task.`,`Before assigning work, call subagent with {"action":"agents"} and match each task to an exact discovered agent name. Prefer a discovered general-purpose write-capable agent such as delegate or worker when no specialist fits. Use a focused inlineAgent only for read-only work.`,`Assign every unblocked pending task with task {"action":"assign","id":3,"agent":"reviewer"}, including implementation tasks. Do not use a direct subagent run for work already represented in the shared task list. Use task assign so ownership and terminal results stay visible.`,`Hand over what you already know when you assign. Pass relevantFiles with the paths you have actually read or located for that task, and priorFindings with the facts you established: symbol names, call sites, the approach you picked, what you ruled out. A fresh-context child starts with none of your context and will otherwise spend most of its run re-reading the repo. It treats this verified pack as satisfying initial context exploration, reads known paths directly, and widens discovery only for a concrete missing dependency. Send at most a dozen files and only ones you really opened — a guessed path costs the child more than an omitted one — and keep priorFindings to a few lines of facts, not directives.`,`After assigning work, continue non-overlapping parent work or end the turn and wait. Do not poll or duplicate delegated scope.`,`When a delegated task completes and unblocks another task, repeat agent discovery if needed and assign that newly eligible task promptly. Do not poll in a loop. Completion notifications wake the parent session.`,`If a child asks for a decision through intercom, or an assignment fails to start for another concrete issue, respond, rescope, or retry explicitly. Do not silently leave the task pending.`,`assign refuses tasks that are blocked, already delegated, or completed. Resolve blockers first. Use {"action":"cancel","id":3} to stop a running delegation; the task returns to pending.`,`Doom Task records delegated lifecycle and results on the shared task. The child does not update task status directly. Read the completion or failure result before deciding what to do next.`,`The task list is scoped to this session tree: delegated subagents share it, while unrelated sessions start empty. It persists for later inspection until retention cleanup.`,`Subject must be short and imperative (e.g. 'Research existing tool'); description is long-form detail written when you plan the task, and the delegated brief is that description plus the assign-time instructions, relevantFiles and priorFindings. Put durable scope in description and what you learned while exploring in the assign-time pack — do not repeat one in the other.`];exports.DEFAULT_PROMPT_GUIDELINES=e;
2
- //# sourceMappingURL=promptGuidelines.cjs.map
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../commands/task/promptGuidelines.cjs");exports.DEFAULT_PROMPT_GUIDELINES=e.DEFAULT_PROMPT_GUIDELINES;
@@ -1,5 +1,2 @@
1
- //#region src/tool/promptGuidelines.d.ts
2
- declare const DEFAULT_PROMPT_GUIDELINES: string[];
3
- //#endregion
4
- export { DEFAULT_PROMPT_GUIDELINES };
5
- //# sourceMappingURL=promptGuidelines.d.cts.map
1
+ import { DEFAULT_PROMPT_GUIDELINES } from "../commands/task/promptGuidelines.cjs";
2
+ export { DEFAULT_PROMPT_GUIDELINES };
@@ -1,5 +1,2 @@
1
- //#region src/tool/promptGuidelines.d.ts
2
- declare const DEFAULT_PROMPT_GUIDELINES: string[];
3
- //#endregion
4
- export { DEFAULT_PROMPT_GUIDELINES };
5
- //# sourceMappingURL=promptGuidelines.d.mts.map
1
+ import { DEFAULT_PROMPT_GUIDELINES } from "../commands/task/promptGuidelines.mjs";
2
+ export { DEFAULT_PROMPT_GUIDELINES };
@@ -1,2 +1 @@
1
- const e=["Use `task` for work with 3+ steps, when the user gives you a list of tasks, or immediately after receiving new instructions to capture requirements. Skip it for single trivial tasks and purely conversational requests.",`Capture a whole plan in one call: {"action":"upsert","tasks":[{"subject":"Research existing tool"},{"subject":"Write the reducer"},{"subject":"Add tests"}]}. Batch whenever you are writing the plan down — the initial list, a revised plan, or wiring dependencies across several tasks — because one call keeps ids and blockers consistent and shows the user the whole plan at once.`,`Do not batch progress. Mark a task in_progress with its own call BEFORE beginning work, and completed with its own call IMMEDIATELY when it is done. upsert accepts many tasks, but a batch of completions sent at the end of a turn is still wrong: batching is for writing a plan down, single calls are for reporting progress, and the user watches the task list to see where you are. Exactly one task should be in_progress for your own work; delegated tasks run in parallel and do not count against that.`,`Never mark a task completed if tests are failing, the implementation is partial, or you hit unresolved errors, use status "failed" or keep it in_progress and add a new task for the blocker in the same upsert.`,`When every non-deleted task is completed, review the full task list once more and call task {"action":"clear"} to close it. Do not leave an all-completed list open.`,`Status is a state machine: pending → in_progress → completed, plus failed (recoverable, can go back to pending or in_progress) and deleted as a tombstone. Pass activeForm (present-continuous, e.g. 'writing tests') when marking in_progress.`,`One call does both: an entry with an id changes that task, an entry without an id creates one. To change status, upsert the task by id, e.g. {"action":"upsert","tasks":[{"id":3,"status":"completed"}]}. Never omit the id when you meant to change an existing task — an entry with no id creates a new one instead. An entry that carries an id and no other field is rejected.`,`Use blockedBy for dependencies (A is blocked by B). On an entry with no id pass blockedBy as the initial set; on an entry with an id use addBlockedBy / removeBlockedBy (additive merge, do not resend the full array). To depend on a task created earlier in the SAME call, give that earlier entry a "ref" and list the ref string in place of an id: [{"ref":"api","subject":"Design the API"},{"subject":"Implement the API","blockedBy":["api"]}]. A ref must be declared before it is used. Cycles are rejected.`,`upsert applies each entry independently: the entries that pass are committed and the failures are reported with their array index. A failed entry changed nothing, so resend only the corrected failures — never resend the whole call, because an already-applied entry with no id would create a duplicate task.`,`Before assigning work, call subagent with {"action":"agents"} and match each task to an exact discovered agent name. Prefer a discovered general-purpose write-capable agent such as delegate or worker when no specialist fits. Use a focused inlineAgent only for read-only work.`,`Assign every unblocked pending task with task {"action":"assign","id":3,"agent":"reviewer"}, including implementation tasks. Do not use a direct subagent run for work already represented in the shared task list. Use task assign so ownership and terminal results stay visible.`,`Hand over what you already know when you assign. Pass relevantFiles with the paths you have actually read or located for that task, and priorFindings with the facts you established: symbol names, call sites, the approach you picked, what you ruled out. A fresh-context child starts with none of your context and will otherwise spend most of its run re-reading the repo. It treats this verified pack as satisfying initial context exploration, reads known paths directly, and widens discovery only for a concrete missing dependency. Send at most a dozen files and only ones you really opened — a guessed path costs the child more than an omitted one — and keep priorFindings to a few lines of facts, not directives.`,`After assigning work, continue non-overlapping parent work or end the turn and wait. Do not poll or duplicate delegated scope.`,`When a delegated task completes and unblocks another task, repeat agent discovery if needed and assign that newly eligible task promptly. Do not poll in a loop. Completion notifications wake the parent session.`,`If a child asks for a decision through intercom, or an assignment fails to start for another concrete issue, respond, rescope, or retry explicitly. Do not silently leave the task pending.`,`assign refuses tasks that are blocked, already delegated, or completed. Resolve blockers first. Use {"action":"cancel","id":3} to stop a running delegation; the task returns to pending.`,`Doom Task records delegated lifecycle and results on the shared task. The child does not update task status directly. Read the completion or failure result before deciding what to do next.`,`The task list is scoped to this session tree: delegated subagents share it, while unrelated sessions start empty. It persists for later inspection until retention cleanup.`,`Subject must be short and imperative (e.g. 'Research existing tool'); description is long-form detail written when you plan the task, and the delegated brief is that description plus the assign-time instructions, relevantFiles and priorFindings. Put durable scope in description and what you learned while exploring in the assign-time pack — do not repeat one in the other.`];export{e as DEFAULT_PROMPT_GUIDELINES};
2
- //# sourceMappingURL=promptGuidelines.mjs.map
1
+ import{DEFAULT_PROMPT_GUIDELINES as e}from"../commands/task/promptGuidelines.mjs";export{e as DEFAULT_PROMPT_GUIDELINES};
@@ -1,6 +1 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../store/taskGraph.cjs"),t=`All tasks are completed. Review the full task list once more, then close it with task {"action":"clear"}.`,n=`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.`,r=`No task changed, so the whole call can be resent once corrected.`;function i(e){let t=e.blockedBy?.length?` ⛓ ${e.blockedBy.map(e=>`#${e}`).join(`,`)}`:``,n=e.status===`in_progress`&&e.activeForm?` (${e.activeForm})`:``,r=e.delegation&&e.delegation.state!==`cancelled`?` [${e.delegation.agent}]`:``;return`[${e.status}] #${e.id} ${e.subject}${n}${r}${t}`}function a(e){let t=e.delegation;if(!t)return[];let n=[` delegated to: ${t.agent} (${t.state})`];return t.model&&n.push(` model: ${t.model}`),t.result?.error&&n.push(` error: ${t.result.error}`),t.result?.outputPath&&n.push(` output file: ${t.result.outputPath}`),t.result?.output&&n.push(` output: ${t.result.output}`),n}function o(t,n){let r=e.deriveBlocks(n.tasks).get(t.id)??[],i=[`#${t.id} [${t.status}] ${t.subject}`];return t.description&&i.push(` description: ${t.description}`),t.activeForm&&i.push(` activeForm: ${t.activeForm}`),t.blockedBy?.length&&i.push(` blockedBy: ${t.blockedBy.map(e=>`#${e}`).join(`, `)}`),r.length&&i.push(` blocks: ${r.map(e=>`#${e}`).join(`, `)}`),t.owner&&i.push(` owner: ${t.owner}`),i.push(...a(t)),i.join(`
2
- `)}function s(e){switch(e.kind){case`created`:{let t=e.ref?` (ref "${e.ref}")`:``,n=e.blockedBy?.length?` — blocked by ${e.blockedBy.map(e=>`#${e}`).join(`, `)}`:``;return`Created #${e.id}${t}: ${e.subject} (${e.status})${n}`}case`updated`:{let t=e.fromStatus===e.toStatus?``:` (${e.fromStatus} -> ${e.toStatus})`;return`Updated #${e.id}${t}`}case`unchanged`:return`No change: #${e.id} already matches the requested values (status: ${e.status})`;case`failed`:return`Failed${e.id===void 0?``:` #${e.id}`}: ${e.message}`}}function c(e){return e.items.length===1?e.items[0].kind===`failed`?e.items[0].message:`no entry was applied`:[`no entry was applied.`,...e.items.map(e=>`- [${e.index}] ${s(e)}`),r].join(`
3
- `)}function l(r,a){switch(r.kind){case`upsert`:{let i=r.items.length===1?[s(r.items[0])]:[`Upsert applied ${r.applied}/${r.items.length} entries${r.failed>0?`; ${r.failed} failed`:``}.`,...r.items.map(e=>`- [${e.index}] ${s(e)}`),...r.failed>0?[``,n]:[]];return r.applied>0&&e.isTaskListComplete(a.tasks)&&i.push(t),i.join(`
4
- `)}case`delete`:return`Deleted #${r.id}: ${r.subject}`;case`clear`:return`Closed task list (cleared ${r.count} tasks)`;case`list`:{let e=a.tasks;return r.includeDeleted||(e=e.filter(e=>e.status!==`deleted`)),r.statusFilter&&(e=e.filter(e=>e.status===r.statusFilter)),e.length===0?`No tasks`:e.map(i).join(`
5
- `)}case`get`:return o(r.task,a);case`error`:return`Error: ${r.message}`}}function u(e,t,n,r){return{content:[{type:`text`,text:l(r,n)}],details:{action:e,params:t,tasks:n.tasks,nextId:n.nextId,rev:n.rev,...r.kind===`error`?{error:r.message}:{},...r.kind===`upsert`?{upsert:{applied:r.items.flatMap(e=>e.kind===`failed`?[]:[e.id]),failed:r.failed}}:{}}}}function d(e,t,n,r,i){return{content:[{type:`text`,text:i?`Error: ${i}`:r}],details:{action:e,params:t,tasks:n.tasks,nextId:n.nextId,rev:n.rev,...i?{error:i}:{}}}}exports.MSG_ALL_COMPLETE_CLEAR=t,exports.MSG_UPSERT_NONE_APPLIED=r,exports.MSG_UPSERT_PARTIAL=n,exports.buildTextResult=d,exports.buildToolResult=u,exports.formatContent=l,exports.formatUpsertFailureText=c;
6
- //# sourceMappingURL=responseEnvelope.cjs.map
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../commands/task/responseEnvelope.cjs");exports.MSG_ALL_COMPLETE_CLEAR=e.MSG_ALL_COMPLETE_CLEAR,exports.MSG_ASSIGN_PARTIAL=e.MSG_ASSIGN_PARTIAL,exports.MSG_UPSERT_NONE_APPLIED=e.MSG_UPSERT_NONE_APPLIED,exports.MSG_UPSERT_PARTIAL=e.MSG_UPSERT_PARTIAL,exports.buildAssignmentResult=e.buildAssignmentResult,exports.buildTextResult=e.buildTextResult,exports.buildToolResult=e.buildToolResult,exports.formatAssignmentResults=e.formatAssignmentResults,exports.formatContent=e.formatContent,exports.formatUpsertFailureText=e.formatUpsertFailureText;
@@ -1,39 +1,2 @@
1
- import { TaskAction, TaskDetails, TaskDocument, TaskMutationParams } from "../store/types.cjs";
2
- import { Op } from "../store/reducer.cjs";
3
- //#region src/tool/responseEnvelope.d.ts
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
- /**
6
- * Steering for a mixed batch. Unlike a batch of spawned subagents, a failed
7
- * entry here had no side effect at all, so retrying the failures is the safe
8
- * move and the model must be told so or it will do nothing. The hazard is the
9
- * other half: resending an applied create would make a second task.
10
- */
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
- declare const MSG_UPSERT_NONE_APPLIED = "No task changed, so the whole call can be resent once corrected.";
13
- /**
14
- * The thrown message when an upsert applied nothing. Kept separate from
15
- * `formatContent` because the caller wraps it in the actionable Options block
16
- * rather than returning it as a successful result.
17
- */
18
- declare function formatUpsertFailureText(op: Extract<Op, {
19
- kind: 'upsert';
20
- }>): string;
21
- /**
22
- * Pure formatter: `(op, document) -> string`. The switch is closed over `Op`,
23
- * so a new reducer variant fails to compile until it is handled here.
24
- */
25
- declare function formatContent(op: Op, document: TaskDocument): string;
26
- interface ToolResult {
27
- content: Array<{
28
- type: 'text';
29
- text: string;
30
- }>;
31
- details: TaskDetails;
32
- }
33
- /** Build the LLM-facing envelope. `details` carries the post-mutation snapshot. */
34
- declare function buildToolResult(action: TaskAction, params: TaskMutationParams, document: TaskDocument, op: Op): ToolResult;
35
- /** Envelope for delegation actions, which do not flow through the reducer. */
36
- declare function buildTextResult(action: TaskAction, params: TaskMutationParams, document: TaskDocument, text: string, error?: string): ToolResult;
37
- //#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
1
+ import { AssignmentItemResult, MSG_ALL_COMPLETE_CLEAR, MSG_ASSIGN_PARTIAL, MSG_UPSERT_NONE_APPLIED, MSG_UPSERT_PARTIAL, ToolResult, buildAssignmentResult, buildTextResult, buildToolResult, formatAssignmentResults, formatContent, formatUpsertFailureText } from "../commands/task/responseEnvelope.cjs";
2
+ export { AssignmentItemResult, MSG_ALL_COMPLETE_CLEAR, MSG_ASSIGN_PARTIAL, MSG_UPSERT_NONE_APPLIED, MSG_UPSERT_PARTIAL, ToolResult, buildAssignmentResult, buildTextResult, buildToolResult, formatAssignmentResults, formatContent, formatUpsertFailureText };
@@ -1,39 +1,2 @@
1
- import { TaskAction, TaskDetails, TaskDocument, TaskMutationParams } from "../store/types.mjs";
2
- import { Op } from "../store/reducer.mjs";
3
- //#region src/tool/responseEnvelope.d.ts
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
- /**
6
- * Steering for a mixed batch. Unlike a batch of spawned subagents, a failed
7
- * entry here had no side effect at all, so retrying the failures is the safe
8
- * move and the model must be told so or it will do nothing. The hazard is the
9
- * other half: resending an applied create would make a second task.
10
- */
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
- declare const MSG_UPSERT_NONE_APPLIED = "No task changed, so the whole call can be resent once corrected.";
13
- /**
14
- * The thrown message when an upsert applied nothing. Kept separate from
15
- * `formatContent` because the caller wraps it in the actionable Options block
16
- * rather than returning it as a successful result.
17
- */
18
- declare function formatUpsertFailureText(op: Extract<Op, {
19
- kind: 'upsert';
20
- }>): string;
21
- /**
22
- * Pure formatter: `(op, document) -> string`. The switch is closed over `Op`,
23
- * so a new reducer variant fails to compile until it is handled here.
24
- */
25
- declare function formatContent(op: Op, document: TaskDocument): string;
26
- interface ToolResult {
27
- content: Array<{
28
- type: 'text';
29
- text: string;
30
- }>;
31
- details: TaskDetails;
32
- }
33
- /** Build the LLM-facing envelope. `details` carries the post-mutation snapshot. */
34
- declare function buildToolResult(action: TaskAction, params: TaskMutationParams, document: TaskDocument, op: Op): ToolResult;
35
- /** Envelope for delegation actions, which do not flow through the reducer. */
36
- declare function buildTextResult(action: TaskAction, params: TaskMutationParams, document: TaskDocument, text: string, error?: string): ToolResult;
37
- //#endregion
38
- export { MSG_ALL_COMPLETE_CLEAR, MSG_UPSERT_NONE_APPLIED, MSG_UPSERT_PARTIAL, ToolResult, buildTextResult, buildToolResult, formatContent, formatUpsertFailureText };
39
- //# sourceMappingURL=responseEnvelope.d.mts.map
1
+ import { AssignmentItemResult, MSG_ALL_COMPLETE_CLEAR, MSG_ASSIGN_PARTIAL, MSG_UPSERT_NONE_APPLIED, MSG_UPSERT_PARTIAL, ToolResult, buildAssignmentResult, buildTextResult, buildToolResult, formatAssignmentResults, formatContent, formatUpsertFailureText } from "../commands/task/responseEnvelope.mjs";
2
+ export { AssignmentItemResult, MSG_ALL_COMPLETE_CLEAR, MSG_ASSIGN_PARTIAL, MSG_UPSERT_NONE_APPLIED, MSG_UPSERT_PARTIAL, ToolResult, buildAssignmentResult, buildTextResult, buildToolResult, formatAssignmentResults, formatContent, formatUpsertFailureText };
@@ -1,6 +1 @@
1
- import{deriveBlocks as e,isTaskListComplete as t}from"../store/taskGraph.mjs";const n=`All tasks are completed. Review the full task list once more, then close it with task {"action":"clear"}.`,r=`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.`,i=`No task changed, so the whole call can be resent once corrected.`;function a(e){let t=e.blockedBy?.length?` ⛓ ${e.blockedBy.map(e=>`#${e}`).join(`,`)}`:``,n=e.status===`in_progress`&&e.activeForm?` (${e.activeForm})`:``,r=e.delegation&&e.delegation.state!==`cancelled`?` [${e.delegation.agent}]`:``;return`[${e.status}] #${e.id} ${e.subject}${n}${r}${t}`}function o(e){let t=e.delegation;if(!t)return[];let n=[` delegated to: ${t.agent} (${t.state})`];return t.model&&n.push(` model: ${t.model}`),t.result?.error&&n.push(` error: ${t.result.error}`),t.result?.outputPath&&n.push(` output file: ${t.result.outputPath}`),t.result?.output&&n.push(` output: ${t.result.output}`),n}function s(t,n){let r=e(n.tasks).get(t.id)??[],i=[`#${t.id} [${t.status}] ${t.subject}`];return t.description&&i.push(` description: ${t.description}`),t.activeForm&&i.push(` activeForm: ${t.activeForm}`),t.blockedBy?.length&&i.push(` blockedBy: ${t.blockedBy.map(e=>`#${e}`).join(`, `)}`),r.length&&i.push(` blocks: ${r.map(e=>`#${e}`).join(`, `)}`),t.owner&&i.push(` owner: ${t.owner}`),i.push(...o(t)),i.join(`
2
- `)}function c(e){switch(e.kind){case`created`:{let t=e.ref?` (ref "${e.ref}")`:``,n=e.blockedBy?.length?` — blocked by ${e.blockedBy.map(e=>`#${e}`).join(`, `)}`:``;return`Created #${e.id}${t}: ${e.subject} (${e.status})${n}`}case`updated`:{let t=e.fromStatus===e.toStatus?``:` (${e.fromStatus} -> ${e.toStatus})`;return`Updated #${e.id}${t}`}case`unchanged`:return`No change: #${e.id} already matches the requested values (status: ${e.status})`;case`failed`:return`Failed${e.id===void 0?``:` #${e.id}`}: ${e.message}`}}function l(e){return e.items.length===1?e.items[0].kind===`failed`?e.items[0].message:`no entry was applied`:[`no entry was applied.`,...e.items.map(e=>`- [${e.index}] ${c(e)}`),i].join(`
3
- `)}function u(e,i){switch(e.kind){case`upsert`:{let a=e.items.length===1?[c(e.items[0])]:[`Upsert applied ${e.applied}/${e.items.length} entries${e.failed>0?`; ${e.failed} failed`:``}.`,...e.items.map(e=>`- [${e.index}] ${c(e)}`),...e.failed>0?[``,r]:[]];return e.applied>0&&t(i.tasks)&&a.push(n),a.join(`
4
- `)}case`delete`:return`Deleted #${e.id}: ${e.subject}`;case`clear`:return`Closed task list (cleared ${e.count} tasks)`;case`list`:{let t=i.tasks;return e.includeDeleted||(t=t.filter(e=>e.status!==`deleted`)),e.statusFilter&&(t=t.filter(t=>t.status===e.statusFilter)),t.length===0?`No tasks`:t.map(a).join(`
5
- `)}case`get`:return s(e.task,i);case`error`:return`Error: ${e.message}`}}function d(e,t,n,r){return{content:[{type:`text`,text:u(r,n)}],details:{action:e,params:t,tasks:n.tasks,nextId:n.nextId,rev:n.rev,...r.kind===`error`?{error:r.message}:{},...r.kind===`upsert`?{upsert:{applied:r.items.flatMap(e=>e.kind===`failed`?[]:[e.id]),failed:r.failed}}:{}}}}function f(e,t,n,r,i){return{content:[{type:`text`,text:i?`Error: ${i}`:r}],details:{action:e,params:t,tasks:n.tasks,nextId:n.nextId,rev:n.rev,...i?{error:i}:{}}}}export{n as MSG_ALL_COMPLETE_CLEAR,i as MSG_UPSERT_NONE_APPLIED,r as MSG_UPSERT_PARTIAL,f as buildTextResult,d as buildToolResult,u as formatContent,l as formatUpsertFailureText};
6
- //# sourceMappingURL=responseEnvelope.mjs.map
1
+ import{MSG_ALL_COMPLETE_CLEAR as e,MSG_ASSIGN_PARTIAL as t,MSG_UPSERT_NONE_APPLIED as n,MSG_UPSERT_PARTIAL as r,buildAssignmentResult as i,buildTextResult as a,buildToolResult as o,formatAssignmentResults as s,formatContent as c,formatUpsertFailureText as l}from"../commands/task/responseEnvelope.mjs";export{e as MSG_ALL_COMPLETE_CLEAR,t as MSG_ASSIGN_PARTIAL,n as MSG_UPSERT_NONE_APPLIED,r as MSG_UPSERT_PARTIAL,i as buildAssignmentResult,a as buildTextResult,o as buildToolResult,s as formatAssignmentResults,c as formatContent,l as formatUpsertFailureText};
@@ -1,2 +1 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require("../delegation/manager.cjs");let e=require("@agimon-ai/doompi-extension-contracts/subagent-tool"),t=require("typebox");const n=[`upsert`,`list`,`get`,`delete`,`clear`,`assign`,`cancel`],r=[`pending`,`in_progress`,`completed`,`failed`,`deleted`],i=[`fresh`,`fork`],a={upsert:[`action`,`tasks`],list:[`action`,`status`,`includeDeleted`],get:[`action`,`id`],delete:[`action`,`id`],clear:[`action`],assign:[`action`,`id`,`agent`,`inlineAgent`,`instructions`,`relevantFiles`,`priorFindings`,`model`,`context`],cancel:[`action`,`id`]};function o(e,t){return a[e].includes(t)}const s=t.Type.Union([t.Type.Integer(),t.Type.String()]),c=t.Type.Object({id:t.Type.Optional(t.Type.Integer({description:`Existing task id to change. Omit to create a new task. An entry with an id never creates: if the id is unknown, only that entry fails.`})),ref:t.Type.Optional(t.Type.String({description:`Temporary name for a task created by this entry, so a LATER entry in the same tasks[] can list it in blockedBy before its real id exists. Must start with a letter. Scoped to this one call and never stored; the response reports which real id it became.`})),subject:t.Type.Optional(t.Type.String({description:`Short imperative subject line (e.g. 'Research existing tool'). Required when the entry has no id; on an entry with an id it renames the task.`})),description:t.Type.Optional(t.Type.String({description:`Long-form task detail. This becomes the brief handed to the subagent when the task is assigned.`})),activeForm:t.Type.Optional(t.Type.String({description:`Present-continuous spinner label shown while status is in_progress (e.g. 'writing tests')`})),status:t.Type.Optional(t.Type.String({enum:[...r],description:`Starting status for a new entry (default pending; deleted is rejected), or the target status for an entry with an id, where the transition must be legal.`})),blockedBy:t.Type.Optional(t.Type.Array(s,{description:`Dependencies for a NEW entry (one with no id): this task is blocked by each target. A number is an existing task id; a string is the ref of a task created by an EARLIER entry in this same array. Use addBlockedBy / removeBlockedBy on an entry that has an id.`})),addBlockedBy:t.Type.Optional(t.Type.Array(s,{description:`Dependencies to add, for an entry with an id. Task ids, or refs declared by an earlier entry. Additive merge — do not resend the full array.`})),removeBlockedBy:t.Type.Optional(t.Type.Array(s,{description:`Dependencies to remove, for an entry with an id. Additive merge — do not resend the full array.`})),owner:t.Type.Optional(t.Type.String({description:`Owner label for this task. assign sets this to the subagent name automatically.`})),metadata:t.Type.Optional(t.Type.Record(t.Type.String(),t.Type.Unknown(),{description:`Arbitrary metadata merged into the task; pass null as a value to delete that key`}))},{additionalProperties:!1}),l=t.Type.Object({action:t.Type.String({enum:[...n],description:`upsert (create new tasks and change existing ones, one or many per call), list, get, delete (tombstone), clear (close/reset the list), assign (delegate to a subagent), cancel (stop a delegated run)`}),tasks:t.Type.Optional(t.Type.Array(c,{minItems:1,description:`upsert only. One entry per task: an entry with an id changes that task, an entry without an id creates one. Entries apply in array order, so a later entry can depend on an earlier one by ref. Each entry succeeds or fails on its own: the ones that succeed are committed and the ones that fail are reported by their array index.`})),id:t.Type.Optional(t.Type.Integer({description:`Task id, for get, delete, assign and cancel. upsert does not accept this field — put the id inside the tasks[] entry you want to change.`})),status:t.Type.Optional(t.Type.String({enum:[...r],description:`list only: return just the tasks in this status. To SET a status, use upsert with the task id inside tasks[].`})),includeDeleted:t.Type.Optional(t.Type.Boolean({description:`If true, list returns deleted (tombstoned) tasks as well. Default: false.`})),agent:t.Type.Optional(t.Type.String({description:`Name of the subagent to delegate this task to (required for assign)`})),inlineAgent:t.Type.Optional(e.InlineAgentSchema),instructions:t.Type.Optional(t.Type.String({description:`Extra instructions appended to the delegated brief (assign only)`})),relevantFiles:t.Type.Optional(t.Type.Array(t.Type.String(),{description:`Files you have ALREADY read or located that the subagent should open first (assign only). Paths relative to the working directory. A child starts with none of your context and otherwise spends most of its run rediscovering the repo. Send only files you actually looked at — a guessed path costs the child more than an omitted one. At most 12; extras are dropped.`})),priorFindings:t.Type.Optional(t.Type.String({description:`What you already established about this task and the subagent should not re-derive (assign only): symbol names, call sites, the approach you chose, what you already ruled out. Facts you discovered, not directives — put directives in instructions. Keep it to a few lines; it is truncated past ~1500 characters.`})),model:t.Type.Optional(t.Type.String({description:`Model override for the delegated run (assign only)`})),context:t.Type.Optional(t.Type.String({enum:[...i],description:`Subagent starting context (assign only): 'fresh' starts clean, 'fork' inherits this conversation. If omitted, uses the agent default, then fresh.`}))});exports.COMMAND_NAME=`tasks`,exports.ERR_REQUIRES_INTERACTIVE=`/tasks requires interactive mode`,exports.MSG_NO_TASKS=`No tasks yet. Ask the agent to add some!`,exports.MSG_UPSERT_FIELD_MISPLACED=`Per-task fields belong inside each tasks[] entry, not at the top level: {"action":"upsert","tasks":[{"id":3,"status":"completed"}]}.`,exports.TASK_ACTIONS=n,exports.TASK_ACTION_FIELDS=a,exports.TASK_CONTEXTS=i,exports.TASK_STATUSES=r,exports.TOOL_LABEL=`Task`,exports.TOOL_NAME=`task`,exports.TaskItemSchema=c,exports.TaskParamsSchema=l,exports.taskActionAcceptsField=o;
2
- //# sourceMappingURL=schema.cjs.map
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../schemas/task.cjs");exports.COMMAND_NAME=e.COMMAND_NAME,exports.ERR_REQUIRES_INTERACTIVE=e.ERR_REQUIRES_INTERACTIVE,exports.MSG_NO_TASKS=e.MSG_NO_TASKS,exports.MSG_UPSERT_FIELD_MISPLACED=e.MSG_UPSERT_FIELD_MISPLACED,exports.TASK_ACTIONS=e.TASK_ACTIONS,exports.TASK_ACTION_FIELDS=e.TASK_ACTION_FIELDS,exports.TASK_CONTEXTS=e.TASK_CONTEXTS,exports.TASK_STATUSES=e.TASK_STATUSES,exports.TOOL_LABEL=e.TOOL_LABEL,exports.TOOL_NAME=e.TOOL_NAME,exports.TaskAssignmentSchema=e.TaskAssignmentSchema,exports.TaskItemSchema=e.TaskItemSchema,exports.TaskParamsSchema=e.TaskParamsSchema,exports.taskActionAcceptsField=e.taskActionAcceptsField;
@@ -1,86 +1,2 @@
1
- import { TaskAction } from "../store/types.cjs";
2
- import { Static, Type } from "typebox";
3
- //#region src/tool/schema.d.ts
4
- declare const TASK_ACTIONS: readonly ["upsert", "list", "get", "delete", "clear", "assign", "cancel"];
5
- declare const TASK_STATUSES: readonly ["pending", "in_progress", "completed", "failed", "deleted"];
6
- declare const TASK_CONTEXTS: readonly ["fresh", "fork"];
7
- declare const TOOL_NAME = "task";
8
- declare const TOOL_LABEL = "Task";
9
- declare const COMMAND_NAME = "tasks";
10
- declare const ERR_REQUIRES_INTERACTIVE = "/tasks requires interactive mode";
11
- declare const MSG_NO_TASKS = "No tasks yet. Ask the agent to add some!";
12
- /**
13
- * Which top-level fields each action accepts.
14
- *
15
- * The params object is flat and shared across every action, so the schema alone
16
- * cannot express "upsert has no top-level id". That gap matters: a call like
17
- * `{"action":"upsert","id":3,"tasks":[{"status":"completed"}]}` would otherwise
18
- * silently create a duplicate task, because the entry itself carries no id.
19
- */
20
- declare const TASK_ACTION_FIELDS: {
21
- readonly upsert: readonly ["action", "tasks"];
22
- readonly list: readonly ["action", "status", "includeDeleted"];
23
- readonly get: readonly ["action", "id"];
24
- readonly delete: readonly ["action", "id"];
25
- readonly clear: readonly ["action"];
26
- readonly assign: readonly ["action", "id", "agent", "inlineAgent", "instructions", "relevantFiles", "priorFindings", "model", "context"];
27
- readonly cancel: readonly ["action", "id"];
28
- };
29
- declare function taskActionAcceptsField(action: TaskAction, field: string): boolean;
30
- /** Correction hint appended when a per-task field lands at the top level. */
31
- declare const MSG_UPSERT_FIELD_MISPLACED = "Per-task fields belong inside each tasks[] entry, not at the top level: {\"action\":\"upsert\",\"tasks\":[{\"id\":3,\"status\":\"completed\"}]}.";
32
- /**
33
- * One entry of an upsert. `additionalProperties: false` is load-bearing: pi
34
- * validates tool arguments against this schema before `execute` runs, so a
35
- * stray `{"action":"update"}` inside an entry is rejected at the boundary.
36
- */
37
- declare const TaskItemSchema: Type.TObject<{
38
- id: Type.TOptional<Type.TInteger>;
39
- ref: Type.TOptional<Type.TString>;
40
- subject: Type.TOptional<Type.TString>;
41
- description: Type.TOptional<Type.TString>;
42
- activeForm: Type.TOptional<Type.TString>;
43
- status: Type.TOptional<Type.TString>;
44
- blockedBy: Type.TOptional<Type.TArray<Type.TUnion<[Type.TInteger, Type.TString]>>>;
45
- addBlockedBy: Type.TOptional<Type.TArray<Type.TUnion<[Type.TInteger, Type.TString]>>>;
46
- removeBlockedBy: Type.TOptional<Type.TArray<Type.TUnion<[Type.TInteger, Type.TString]>>>;
47
- owner: Type.TOptional<Type.TString>;
48
- metadata: Type.TOptional<Type.TRecord<"^.*$", Type.TUnknown>>;
49
- }>;
50
- /**
51
- * Tool parameters. Every `description` doubles as LLM-facing prompt copy, so
52
- * wording changes here change model behaviour.
53
- */
54
- declare const TaskParamsSchema: Type.TObject<{
55
- action: Type.TString;
56
- tasks: Type.TOptional<Type.TArray<Type.TObject<{
57
- id: Type.TOptional<Type.TInteger>;
58
- ref: Type.TOptional<Type.TString>;
59
- subject: Type.TOptional<Type.TString>;
60
- description: Type.TOptional<Type.TString>;
61
- activeForm: Type.TOptional<Type.TString>;
62
- status: Type.TOptional<Type.TString>;
63
- blockedBy: Type.TOptional<Type.TArray<Type.TUnion<[Type.TInteger, Type.TString]>>>;
64
- addBlockedBy: Type.TOptional<Type.TArray<Type.TUnion<[Type.TInteger, Type.TString]>>>;
65
- removeBlockedBy: Type.TOptional<Type.TArray<Type.TUnion<[Type.TInteger, Type.TString]>>>;
66
- owner: Type.TOptional<Type.TString>;
67
- metadata: Type.TOptional<Type.TRecord<"^.*$", Type.TUnknown>>;
68
- }>>>;
69
- id: Type.TOptional<Type.TInteger>;
70
- status: Type.TOptional<Type.TString>;
71
- includeDeleted: Type.TOptional<Type.TBoolean>;
72
- agent: Type.TOptional<Type.TString>;
73
- inlineAgent: Type.TOptional<Type.TObject<{
74
- systemPrompt: Type.TString;
75
- }>>;
76
- instructions: Type.TOptional<Type.TString>;
77
- relevantFiles: Type.TOptional<Type.TArray<Type.TString>>;
78
- priorFindings: Type.TOptional<Type.TString>;
79
- model: Type.TOptional<Type.TString>;
80
- context: Type.TOptional<Type.TString>;
81
- }>;
82
- type TaskItemParams = Static<typeof TaskItemSchema>;
83
- type TaskParams = Static<typeof TaskParamsSchema>;
84
- //#endregion
85
- export { 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 };
86
- //# sourceMappingURL=schema.d.cts.map
1
+ 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, TaskAssignmentParams, TaskAssignmentSchema, TaskItemParams, TaskItemSchema, TaskParams, TaskParamsSchema, taskActionAcceptsField } from "../schemas/task.cjs";
2
+ export { 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, TaskAssignmentParams, TaskAssignmentSchema, TaskItemParams, TaskItemSchema, TaskParams, TaskParamsSchema, taskActionAcceptsField };