pybao-cli 1.4.37 → 1.4.39

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 (149) hide show
  1. package/dist/REPL-N62XVC35.js +47 -0
  2. package/dist/{acp-4DJD7KGT.js → acp-6LBQJVMX.js} +29 -29
  3. package/dist/{agentsValidate-V3NT6CXM.js → agentsValidate-SLBW2ESZ.js} +7 -7
  4. package/dist/{ask-QGVRR66V.js → ask-DB4F3WJG.js} +28 -28
  5. package/dist/{autoUpdater-JM7WBEUQ.js → autoUpdater-CYDJVIEC.js} +3 -3
  6. package/dist/{chunk-BCQJMOSS.js → chunk-3LNPU7WH.js} +3 -3
  7. package/dist/{chunk-5EVKZGDP.js → chunk-4LXZDGCO.js} +3 -3
  8. package/dist/{chunk-CWSAGAMM.js → chunk-6KSM5M7T.js} +1 -1
  9. package/dist/{chunk-42XD5HC6.js → chunk-7TGWBYFN.js} +4 -4
  10. package/dist/{chunk-JBJ6V6LD.js → chunk-7WCSSH3C.js} +3 -3
  11. package/dist/chunk-AI7FJQR4.js +1262 -0
  12. package/dist/chunk-AI7FJQR4.js.map +7 -0
  13. package/dist/{chunk-3PUKLCTC.js → chunk-DEYAAT6H.js} +3 -3
  14. package/dist/{chunk-A6CGJVI5.js → chunk-DLBWS3IW.js} +1 -1
  15. package/dist/{chunk-VLPRSVXT.js → chunk-E5EB22W4.js} +4 -4
  16. package/dist/{chunk-C5PFCHI6.js → chunk-GD43B2GV.js} +1 -1
  17. package/dist/{chunk-U3BHVYM7.js → chunk-GL3ZM7F3.js} +3 -3
  18. package/dist/{chunk-WZFW5MLS.js → chunk-GXHSGPIF.js} +4 -4
  19. package/dist/{chunk-EAYSPMFV.js → chunk-HD4IO3I5.js} +783 -19
  20. package/dist/chunk-HD4IO3I5.js.map +7 -0
  21. package/dist/{chunk-N4AX7MAG.js → chunk-KNLFFHBT.js} +2 -2
  22. package/dist/{chunk-R5K32NWJ.js → chunk-KWPH7MSB.js} +1 -1
  23. package/dist/{chunk-QTT5PAF5.js → chunk-N4GXGPVA.js} +1 -1
  24. package/dist/{chunk-VNOOSZ37.js → chunk-NMJYV37P.js} +2 -2
  25. package/dist/{chunk-N73EEVKP.js → chunk-NNE44UHQ.js} +2 -2
  26. package/dist/{chunk-ADVVJQQL.js → chunk-O5OT26P6.js} +1 -1
  27. package/dist/{chunk-LKVOJGOX.js → chunk-RS2N2KBH.js} +753 -379
  28. package/dist/{chunk-LKVOJGOX.js.map → chunk-RS2N2KBH.js.map} +4 -4
  29. package/dist/{chunk-S2J5L7W6.js → chunk-SBPVAFBQ.js} +2 -2
  30. package/dist/{chunk-AAN4ZB7D.js → chunk-SSKQUKI7.js} +1 -1
  31. package/dist/{chunk-XQQXJDZ6.js → chunk-TNAAGT3Q.js} +3 -3
  32. package/dist/chunk-TNAAGT3Q.js.map +7 -0
  33. package/dist/{chunk-N3P77GAY.js → chunk-UK4IHZU3.js} +2 -2
  34. package/dist/{chunk-T2TNKXYE.js → chunk-UUWI4VWU.js} +1 -1
  35. package/dist/{chunk-T2TNKXYE.js.map → chunk-UUWI4VWU.js.map} +1 -1
  36. package/dist/{chunk-3UUOVYVA.js → chunk-VFQU3JSH.js} +4 -4
  37. package/dist/{chunk-2SXOBJO3.js → chunk-VHTIDAOJ.js} +2 -2
  38. package/dist/{chunk-W3I3SWXY.js → chunk-VXQMCAPS.js} +1 -1
  39. package/dist/{chunk-E7P4TM6T.js → chunk-YJ2WXW2J.js} +3 -3
  40. package/dist/{chunk-YA6QWTQZ.js → chunk-ZGVGFR4C.js} +1 -1
  41. package/dist/{cli-FVTA2UNT.js → cli-FMCSS5QE.js} +87 -87
  42. package/dist/commands-IJTOU4P3.js +51 -0
  43. package/dist/{config-PDX3ENJS.js → config-YRHKZJO6.js} +4 -4
  44. package/dist/{context-QCXL3UHB.js → context-ZZO64MRN.js} +6 -6
  45. package/dist/{customCommands-LIL44EIW.js → customCommands-2S7LYMG7.js} +4 -4
  46. package/dist/{env-JKAUQPAX.js → env-PQDRZBAW.js} +2 -2
  47. package/dist/{file-OKOAVL6I.js → file-X7BE3MNR.js} +4 -4
  48. package/dist/index.js +3 -3
  49. package/dist/{llm-24B7GPL4.js → llm-3KCTIVOM.js} +29 -29
  50. package/dist/{llmLazy-J4YVR6MG.js → llmLazy-HCTXTHRZ.js} +1 -1
  51. package/dist/{loader-GUY3VKKS.js → loader-DKMJSH4V.js} +4 -4
  52. package/dist/{lsp-36PBULHA.js → lsp-IXEAYT4K.js} +6 -6
  53. package/dist/{lspAnchor-VW755MJ7.js → lspAnchor-FKXOKCQZ.js} +6 -6
  54. package/dist/{mcp-5CYKIC44.js → mcp-ZUJD3E4V.js} +7 -7
  55. package/dist/{mentionProcessor-WTPRNMI7.js → mentionProcessor-7GXI47P3.js} +7 -5
  56. package/dist/{mentionProcessor-WTPRNMI7.js.map → mentionProcessor-7GXI47P3.js.map} +1 -1
  57. package/dist/{messages-35GUJR23.js → messages-55HNRTQC.js} +1 -1
  58. package/dist/{model-Z22IGTCI.js → model-R5X6XP7I.js} +5 -5
  59. package/dist/{openai-IFMVI4HW.js → openai-FM7DX3GB.js} +5 -5
  60. package/dist/{outputStyles-GISTOUSR.js → outputStyles-ZLGIDCCJ.js} +4 -4
  61. package/dist/{pluginRuntime-YKAYG7LI.js → pluginRuntime-REF3E5F5.js} +6 -6
  62. package/dist/{pluginValidation-WMUMEOFR.js → pluginValidation-E33USDYW.js} +6 -6
  63. package/dist/prompts-W7TUXY74.js +53 -0
  64. package/dist/{pybAgentSessionLoad-U2PAPG2T.js → pybAgentSessionLoad-PGTH6SZH.js} +4 -4
  65. package/dist/{pybAgentSessionResume-VKO7BF5R.js → pybAgentSessionResume-IVBY65PN.js} +4 -4
  66. package/dist/{pybAgentStreamJsonSession-3B3FBBV2.js → pybAgentStreamJsonSession-N2Q6LQHX.js} +1 -1
  67. package/dist/{pybHooks-PKSWIXQR.js → pybHooks-WIA5KKVN.js} +4 -4
  68. package/dist/query-BTG2T7NV.js +55 -0
  69. package/dist/{registry-ZEALEPQA.js → registry-PT3XVAT6.js} +5 -5
  70. package/dist/{ripgrep-KLZFIFVE.js → ripgrep-2VWCSPH4.js} +3 -3
  71. package/dist/{skillMarketplace-GTMGSI2S.js → skillMarketplace-NHPAPZTS.js} +3 -3
  72. package/dist/{state-A5SI47U2.js → state-4AIVX6VM.js} +2 -2
  73. package/dist/{theme-VS7GUKLU.js → theme-LKZFY5TU.js} +5 -5
  74. package/dist/{toolPermissionSettings-ZF4WVDXG.js → toolPermissionSettings-OVFT6D3R.js} +6 -6
  75. package/dist/tools-6ONPKOSL.js +52 -0
  76. package/dist/{userInput-VZEUNZ4X.js → userInput-RHGZ225B.js} +30 -30
  77. package/package.json +1 -1
  78. package/dist/REPL-XHCMVEGW.js +0 -47
  79. package/dist/chunk-5N7MDY6T.js +0 -517
  80. package/dist/chunk-5N7MDY6T.js.map +0 -7
  81. package/dist/chunk-EAYSPMFV.js.map +0 -7
  82. package/dist/chunk-XQQXJDZ6.js.map +0 -7
  83. package/dist/commands-ZXIPHHLY.js +0 -51
  84. package/dist/prompts-ANODLYMR.js +0 -53
  85. package/dist/query-E6AUJBMK.js +0 -55
  86. package/dist/tools-VTVBSLQ5.js +0 -52
  87. /package/dist/{REPL-XHCMVEGW.js.map → REPL-N62XVC35.js.map} +0 -0
  88. /package/dist/{acp-4DJD7KGT.js.map → acp-6LBQJVMX.js.map} +0 -0
  89. /package/dist/{agentsValidate-V3NT6CXM.js.map → agentsValidate-SLBW2ESZ.js.map} +0 -0
  90. /package/dist/{ask-QGVRR66V.js.map → ask-DB4F3WJG.js.map} +0 -0
  91. /package/dist/{autoUpdater-JM7WBEUQ.js.map → autoUpdater-CYDJVIEC.js.map} +0 -0
  92. /package/dist/{chunk-BCQJMOSS.js.map → chunk-3LNPU7WH.js.map} +0 -0
  93. /package/dist/{chunk-5EVKZGDP.js.map → chunk-4LXZDGCO.js.map} +0 -0
  94. /package/dist/{chunk-CWSAGAMM.js.map → chunk-6KSM5M7T.js.map} +0 -0
  95. /package/dist/{chunk-42XD5HC6.js.map → chunk-7TGWBYFN.js.map} +0 -0
  96. /package/dist/{chunk-JBJ6V6LD.js.map → chunk-7WCSSH3C.js.map} +0 -0
  97. /package/dist/{chunk-3PUKLCTC.js.map → chunk-DEYAAT6H.js.map} +0 -0
  98. /package/dist/{chunk-A6CGJVI5.js.map → chunk-DLBWS3IW.js.map} +0 -0
  99. /package/dist/{chunk-VLPRSVXT.js.map → chunk-E5EB22W4.js.map} +0 -0
  100. /package/dist/{chunk-C5PFCHI6.js.map → chunk-GD43B2GV.js.map} +0 -0
  101. /package/dist/{chunk-U3BHVYM7.js.map → chunk-GL3ZM7F3.js.map} +0 -0
  102. /package/dist/{chunk-WZFW5MLS.js.map → chunk-GXHSGPIF.js.map} +0 -0
  103. /package/dist/{chunk-N4AX7MAG.js.map → chunk-KNLFFHBT.js.map} +0 -0
  104. /package/dist/{chunk-R5K32NWJ.js.map → chunk-KWPH7MSB.js.map} +0 -0
  105. /package/dist/{chunk-QTT5PAF5.js.map → chunk-N4GXGPVA.js.map} +0 -0
  106. /package/dist/{chunk-VNOOSZ37.js.map → chunk-NMJYV37P.js.map} +0 -0
  107. /package/dist/{chunk-N73EEVKP.js.map → chunk-NNE44UHQ.js.map} +0 -0
  108. /package/dist/{chunk-ADVVJQQL.js.map → chunk-O5OT26P6.js.map} +0 -0
  109. /package/dist/{chunk-S2J5L7W6.js.map → chunk-SBPVAFBQ.js.map} +0 -0
  110. /package/dist/{chunk-AAN4ZB7D.js.map → chunk-SSKQUKI7.js.map} +0 -0
  111. /package/dist/{chunk-N3P77GAY.js.map → chunk-UK4IHZU3.js.map} +0 -0
  112. /package/dist/{chunk-3UUOVYVA.js.map → chunk-VFQU3JSH.js.map} +0 -0
  113. /package/dist/{chunk-2SXOBJO3.js.map → chunk-VHTIDAOJ.js.map} +0 -0
  114. /package/dist/{chunk-W3I3SWXY.js.map → chunk-VXQMCAPS.js.map} +0 -0
  115. /package/dist/{chunk-E7P4TM6T.js.map → chunk-YJ2WXW2J.js.map} +0 -0
  116. /package/dist/{chunk-YA6QWTQZ.js.map → chunk-ZGVGFR4C.js.map} +0 -0
  117. /package/dist/{cli-FVTA2UNT.js.map → cli-FMCSS5QE.js.map} +0 -0
  118. /package/dist/{commands-ZXIPHHLY.js.map → commands-IJTOU4P3.js.map} +0 -0
  119. /package/dist/{config-PDX3ENJS.js.map → config-YRHKZJO6.js.map} +0 -0
  120. /package/dist/{context-QCXL3UHB.js.map → context-ZZO64MRN.js.map} +0 -0
  121. /package/dist/{customCommands-LIL44EIW.js.map → customCommands-2S7LYMG7.js.map} +0 -0
  122. /package/dist/{env-JKAUQPAX.js.map → env-PQDRZBAW.js.map} +0 -0
  123. /package/dist/{file-OKOAVL6I.js.map → file-X7BE3MNR.js.map} +0 -0
  124. /package/dist/{llm-24B7GPL4.js.map → llm-3KCTIVOM.js.map} +0 -0
  125. /package/dist/{llmLazy-J4YVR6MG.js.map → llmLazy-HCTXTHRZ.js.map} +0 -0
  126. /package/dist/{loader-GUY3VKKS.js.map → loader-DKMJSH4V.js.map} +0 -0
  127. /package/dist/{lsp-36PBULHA.js.map → lsp-IXEAYT4K.js.map} +0 -0
  128. /package/dist/{lspAnchor-VW755MJ7.js.map → lspAnchor-FKXOKCQZ.js.map} +0 -0
  129. /package/dist/{mcp-5CYKIC44.js.map → mcp-ZUJD3E4V.js.map} +0 -0
  130. /package/dist/{messages-35GUJR23.js.map → messages-55HNRTQC.js.map} +0 -0
  131. /package/dist/{model-Z22IGTCI.js.map → model-R5X6XP7I.js.map} +0 -0
  132. /package/dist/{openai-IFMVI4HW.js.map → openai-FM7DX3GB.js.map} +0 -0
  133. /package/dist/{outputStyles-GISTOUSR.js.map → outputStyles-ZLGIDCCJ.js.map} +0 -0
  134. /package/dist/{pluginRuntime-YKAYG7LI.js.map → pluginRuntime-REF3E5F5.js.map} +0 -0
  135. /package/dist/{pluginValidation-WMUMEOFR.js.map → pluginValidation-E33USDYW.js.map} +0 -0
  136. /package/dist/{prompts-ANODLYMR.js.map → prompts-W7TUXY74.js.map} +0 -0
  137. /package/dist/{pybAgentSessionLoad-U2PAPG2T.js.map → pybAgentSessionLoad-PGTH6SZH.js.map} +0 -0
  138. /package/dist/{pybAgentSessionResume-VKO7BF5R.js.map → pybAgentSessionResume-IVBY65PN.js.map} +0 -0
  139. /package/dist/{pybAgentStreamJsonSession-3B3FBBV2.js.map → pybAgentStreamJsonSession-N2Q6LQHX.js.map} +0 -0
  140. /package/dist/{pybHooks-PKSWIXQR.js.map → pybHooks-WIA5KKVN.js.map} +0 -0
  141. /package/dist/{query-E6AUJBMK.js.map → query-BTG2T7NV.js.map} +0 -0
  142. /package/dist/{registry-ZEALEPQA.js.map → registry-PT3XVAT6.js.map} +0 -0
  143. /package/dist/{ripgrep-KLZFIFVE.js.map → ripgrep-2VWCSPH4.js.map} +0 -0
  144. /package/dist/{skillMarketplace-GTMGSI2S.js.map → skillMarketplace-NHPAPZTS.js.map} +0 -0
  145. /package/dist/{state-A5SI47U2.js.map → state-4AIVX6VM.js.map} +0 -0
  146. /package/dist/{theme-VS7GUKLU.js.map → theme-LKZFY5TU.js.map} +0 -0
  147. /package/dist/{toolPermissionSettings-ZF4WVDXG.js.map → toolPermissionSettings-OVFT6D3R.js.map} +0 -0
  148. /package/dist/{tools-VTVBSLQ5.js.map → tools-6ONPKOSL.js.map} +0 -0
  149. /package/dist/{userInput-VZEUNZ4X.js.map → userInput-RHGZ225B.js.map} +0 -0
@@ -15,68 +15,77 @@ import {
15
15
  NotebookEditTool,
16
16
  SkillTool,
17
17
  SlashCommandTool,
18
- TodoWriteTool,
19
18
  WebFetchTool,
20
19
  WebSearchTool,
21
20
  applyMarkdown,
21
+ buildTaskGraph,
22
+ calculateReadyBlocked,
22
23
  countTokens,
24
+ findTaskCycles,
23
25
  getAgentPrompt,
24
26
  getMaxThinkingTokens,
25
27
  hasPermissionsToUseTool,
26
28
  hasReadPermission,
27
29
  hasWritePermission,
28
30
  query
29
- } from "./chunk-LKVOJGOX.js";
31
+ } from "./chunk-RS2N2KBH.js";
30
32
  import {
31
33
  queryLLM
32
- } from "./chunk-VLPRSVXT.js";
34
+ } from "./chunk-E5EB22W4.js";
33
35
  import {
34
36
  FallbackToolUseRejectedMessage,
35
37
  MCPTool,
36
38
  getClients,
37
39
  getMCPTools
38
- } from "./chunk-3UUOVYVA.js";
40
+ } from "./chunk-VFQU3JSH.js";
39
41
  import {
40
- generateAgentId
41
- } from "./chunk-5N7MDY6T.js";
42
+ TaskStoreConflictError,
43
+ createTask,
44
+ emitReminderEvent,
45
+ generateAgentId,
46
+ getTask,
47
+ getTaskListPaths,
48
+ listTasks,
49
+ updateTask
50
+ } from "./chunk-AI7FJQR4.js";
42
51
  import {
43
52
  getActiveAgents,
44
53
  getAgentByType,
45
54
  getAvailableAgentTypes
46
- } from "./chunk-N4AX7MAG.js";
55
+ } from "./chunk-KNLFFHBT.js";
47
56
  import {
48
57
  INTERRUPT_MESSAGE,
49
58
  createAssistantMessage,
50
59
  createUserMessage,
51
60
  getLastAssistantMessageId
52
- } from "./chunk-A6CGJVI5.js";
61
+ } from "./chunk-DLBWS3IW.js";
53
62
  import {
54
63
  formatDuration,
55
64
  formatNumber
56
65
  } from "./chunk-OUXHGDLH.js";
57
66
  import {
58
67
  getAbsolutePath
59
- } from "./chunk-VNOOSZ37.js";
68
+ } from "./chunk-NMJYV37P.js";
60
69
  import {
61
70
  LspFacade,
62
71
  formatDiagnosticsPretty
63
- } from "./chunk-42XD5HC6.js";
72
+ } from "./chunk-7TGWBYFN.js";
64
73
  import {
65
74
  getModelManager
66
- } from "./chunk-5EVKZGDP.js";
75
+ } from "./chunk-4LXZDGCO.js";
67
76
  import {
68
77
  getContext
69
- } from "./chunk-WZFW5MLS.js";
78
+ } from "./chunk-GXHSGPIF.js";
70
79
  import {
71
80
  filesToTree,
72
81
  ripGrepWithStatus
73
- } from "./chunk-CWSAGAMM.js";
82
+ } from "./chunk-6KSM5M7T.js";
74
83
  import {
75
84
  getTheme
76
- } from "./chunk-C5PFCHI6.js";
85
+ } from "./chunk-GD43B2GV.js";
77
86
  import {
78
87
  debug
79
- } from "./chunk-ADVVJQQL.js";
88
+ } from "./chunk-O5OT26P6.js";
80
89
  import {
81
90
  BunShell,
82
91
  getCwd,
@@ -87,7 +96,7 @@ import {
87
96
  overwriteLog,
88
97
  readTaskOutput,
89
98
  resolveXdgDataPath
90
- } from "./chunk-YA6QWTQZ.js";
99
+ } from "./chunk-ZGVGFR4C.js";
91
100
 
92
101
  // src/tools/index.ts
93
102
  import { memoize as memoize2 } from "lodash-es";
@@ -766,7 +775,7 @@ async function analyzeOutputWithLsp(output, exitCode) {
766
775
  if (exitCode !== 0 || errorCount > 0 || warningCount > 0) {
767
776
  try {
768
777
  const { isAbsolute: isAbsolute3, resolve: resolve4 } = await import("path");
769
- const { getSessionRoot: getSessionRoot2 } = await import("./state-A5SI47U2.js");
778
+ const { getSessionRoot: getSessionRoot2 } = await import("./state-4AIVX6VM.js");
770
779
  const lines = output.split("\n");
771
780
  const uniqueFiles = /* @__PURE__ */ new Set();
772
781
  const lspSuggestions = [];
@@ -1139,7 +1148,7 @@ var DeleteTool = {
1139
1148
  }
1140
1149
  if (!force) {
1141
1150
  try {
1142
- const { LspFacade: LspFacade2 } = await import("./lsp-36PBULHA.js");
1151
+ const { LspFacade: LspFacade2 } = await import("./lsp-IXEAYT4K.js");
1143
1152
  const referenceDetail = await LspFacade2.checkFileReferences(fullPath);
1144
1153
  if (referenceDetail) {
1145
1154
  failedItems.push(
@@ -2988,6 +2997,758 @@ var TaskTool = {
2988
2997
  }
2989
2998
  };
2990
2999
 
3000
+ // src/tools/interaction/TaskCreateTool/TaskCreateTool.tsx
3001
+ import { z as z9 } from "zod";
3002
+
3003
+ // src/utils/session/taskToolUtils.ts
3004
+ function getTaskDependencySummary(task) {
3005
+ return {
3006
+ blocks: task.blocks ?? [],
3007
+ blockedBy: task.blockedBy ?? [],
3008
+ parent: task.parent,
3009
+ related: task.related ?? []
3010
+ };
3011
+ }
3012
+ function toTaskSummary(task) {
3013
+ return {
3014
+ task,
3015
+ deps: getTaskDependencySummary(task)
3016
+ };
3017
+ }
3018
+ function createTaskToolError(params) {
3019
+ return {
3020
+ error: {
3021
+ type: params.type,
3022
+ message: params.message,
3023
+ code: params.code,
3024
+ details: params.details
3025
+ }
3026
+ };
3027
+ }
3028
+
3029
+ // src/tools/interaction/TaskCreateTool/prompt.ts
3030
+ var DESCRIPTION6 = "Create a new task in the task list with optional status and dependencies.";
3031
+ var PROMPT6 = `Use this tool to create a new task in the current task list. It is the entry point for planning multi-step work.
3032
+
3033
+ ## When to Use This Tool
3034
+ Use this tool proactively in these scenarios:
3035
+ 1. You need to add a task with structured fields (subject, status, tags).
3036
+ 2. You want to seed a plan for multi-step work before implementation starts.
3037
+ 3. You need to define dependencies (blocks, blockedBy, parent, related) at creation time.
3038
+ 4. You need to align with a user request to create a task list or plan.
3039
+
3040
+ ## When NOT to Use This Tool
3041
+ - You need to modify an existing task (use TaskUpdate).
3042
+ Skip using this tool when:
3043
+ 1. You only need to read task data (use TaskGet or TaskList).
3044
+ 2. You need to modify an existing task (use TaskUpdate).
3045
+ 3. You are only reporting progress without changing any task fields.
3046
+ - subject is required.
3047
+ NOTE that you should not use this tool if you are only updating status or details of an existing task.
3048
+
3049
+ ## Input Notes
3050
+ - subject is required.
3051
+ - listId is optional; omit to use the default list.
3052
+ - Dependencies are validated for cycles; invalid cycles will be rejected.
3053
+ - baseVersion is set automatically for new tasks.
3054
+ - status can be open, in_progress, blocked, done, or archived.
3055
+ - activeForm will be generated from subject if omitted.
3056
+ - blocks and blockedBy are always stored as arrays (empty when not used).
3057
+ - description and blockedBy are kept separate in JSON; any joining is only for terminal rendering.
3058
+ - Task ordering relies on task id; do not use priority fields.
3059
+
3060
+ ## Status Notes
3061
+ - Use blocked when dependencies prevent work and fill blockedBy.
3062
+
3063
+ ## Examples of When to Use TaskCreate
3064
+
3065
+ <example>
3066
+ User: I need to implement user registration, product catalog, and checkout.
3067
+ Assistant: I will create tasks for each feature.
3068
+ *Creates tasks:*
3069
+ 1. User registration
3070
+ 2. Product catalog
3071
+ 3. Checkout flow
3072
+ </example>
3073
+
3074
+ <example>
3075
+ User: Please add tests and run lint after the refactor.
3076
+ Assistant: I'll seed tasks for the refactor and verification steps.
3077
+ *Creates tasks:*
3078
+ 1. Refactor target module
3079
+ 2. Add tests
3080
+ 3. Run lint and typecheck
3081
+ </example>
3082
+
3083
+ <example>
3084
+ User: The API task depends on database schema changes.
3085
+ Assistant: I'll create tasks with dependencies.
3086
+ *Creates tasks:*
3087
+ 1. Update database schema
3088
+ 2. Implement API endpoints (blockedBy: schema task)
3089
+ </example>
3090
+ `;
3091
+
3092
+ // src/tools/interaction/TaskCreateTool/TaskCreateTool.tsx
3093
+ var inputSchema9 = z9.strictObject({
3094
+ listId: z9.string().optional(),
3095
+ subject: z9.string().min(1),
3096
+ description: z9.string().optional(),
3097
+ activeForm: z9.string().optional(),
3098
+ status: z9.enum(["open", "in_progress", "blocked", "done", "archived"]).optional(),
3099
+ tags: z9.array(z9.string()).optional(),
3100
+ assignee: z9.string().optional(),
3101
+ metadata: z9.record(z9.string()).optional(),
3102
+ archived: z9.boolean().optional(),
3103
+ blocks: z9.array(z9.string()).optional(),
3104
+ blockedBy: z9.array(z9.string()).optional(),
3105
+ parent: z9.string().optional(),
3106
+ related: z9.array(z9.string()).optional(),
3107
+ legacyTodoId: z9.string().optional()
3108
+ });
3109
+ var TaskCreateTool = {
3110
+ name: "TaskCreate",
3111
+ cachedDescription: DESCRIPTION6,
3112
+ async description() {
3113
+ return DESCRIPTION6;
3114
+ },
3115
+ async prompt() {
3116
+ return PROMPT6;
3117
+ },
3118
+ inputSchema: inputSchema9,
3119
+ userFacingName() {
3120
+ return "TaskCreate";
3121
+ },
3122
+ async isEnabled() {
3123
+ return true;
3124
+ },
3125
+ isReadOnly() {
3126
+ return false;
3127
+ },
3128
+ isConcurrencySafe() {
3129
+ return false;
3130
+ },
3131
+ needsPermissions() {
3132
+ return false;
3133
+ },
3134
+ renderResultForAssistant(output) {
3135
+ return JSON.stringify(output, null, 2);
3136
+ },
3137
+ renderToolUseMessage() {
3138
+ return null;
3139
+ },
3140
+ async *call(input) {
3141
+ try {
3142
+ const subject = input.subject;
3143
+ const title = subject;
3144
+ const tasks = listTasks({ listId: input.listId });
3145
+ const nextId = Math.max(
3146
+ 0,
3147
+ ...tasks.map((task2) => Number(task2.id)).filter((value) => !Number.isNaN(value))
3148
+ ) + 1;
3149
+ const now = Date.now();
3150
+ const candidateTask = {
3151
+ id: String(nextId),
3152
+ subject,
3153
+ title,
3154
+ description: input.description,
3155
+ activeForm: input.activeForm,
3156
+ status: input.status ?? "open",
3157
+ tags: input.tags,
3158
+ assignee: input.assignee,
3159
+ metadata: input.metadata,
3160
+ archived: input.archived,
3161
+ blocks: input.blocks,
3162
+ blockedBy: input.blockedBy,
3163
+ parent: input.parent,
3164
+ related: input.related,
3165
+ createdAt: now,
3166
+ updatedAt: now,
3167
+ baseVersion: 1,
3168
+ version: 1,
3169
+ legacyTodoId: input.legacyTodoId
3170
+ };
3171
+ const candidateTasks = [...tasks, candidateTask];
3172
+ const cycles = findTaskCycles(buildTaskGraph(candidateTasks));
3173
+ if (cycles.length > 0) {
3174
+ yield {
3175
+ type: "result",
3176
+ data: createTaskToolError({
3177
+ type: "validation",
3178
+ code: "TASK_CYCLE_DETECTED",
3179
+ message: "Task dependency cycle detected",
3180
+ details: { cycles }
3181
+ })
3182
+ };
3183
+ return;
3184
+ }
3185
+ const task = createTask(
3186
+ {
3187
+ subject,
3188
+ description: input.description,
3189
+ activeForm: input.activeForm,
3190
+ status: input.status,
3191
+ tags: input.tags,
3192
+ assignee: input.assignee,
3193
+ metadata: input.metadata,
3194
+ archived: input.archived,
3195
+ blocks: input.blocks,
3196
+ blockedBy: input.blockedBy,
3197
+ parent: input.parent,
3198
+ related: input.related,
3199
+ legacyTodoId: input.legacyTodoId
3200
+ },
3201
+ { listId: input.listId }
3202
+ );
3203
+ const { listId } = getTaskListPaths(input.listId);
3204
+ emitReminderEvent("task.created", {
3205
+ listId,
3206
+ taskId: task.id,
3207
+ task,
3208
+ timestamp: Date.now()
3209
+ });
3210
+ yield {
3211
+ type: "result",
3212
+ data: {
3213
+ listId,
3214
+ item: toTaskSummary(task)
3215
+ }
3216
+ };
3217
+ } catch (error) {
3218
+ const message = error instanceof Error ? error.message : "Task create failed";
3219
+ yield {
3220
+ type: "result",
3221
+ data: createTaskToolError({
3222
+ type: "unknown",
3223
+ message
3224
+ })
3225
+ };
3226
+ }
3227
+ }
3228
+ };
3229
+
3230
+ // src/tools/interaction/TaskGetTool/TaskGetTool.tsx
3231
+ import { z as z10 } from "zod";
3232
+
3233
+ // src/tools/interaction/TaskGetTool/prompt.ts
3234
+ var DESCRIPTION7 = "Fetch a single task by id from the task list.";
3235
+ var PROMPT7 = `Use this tool to fetch a single task by id.
3236
+
3237
+ ## When to Use This Tool
3238
+ Use this tool proactively in these scenarios:
3239
+
3240
+ 1. You need details for one task to confirm its fields, status, or dependencies.
3241
+ 2. You need the latest version/baseVersion before updating a task.
3242
+
3243
+ ## When NOT to Use This Tool
3244
+
3245
+ Skip using this tool when:
3246
+ 1. You need multiple tasks or readiness info (use TaskList).
3247
+ 2. You need to modify a task (use TaskUpdate) or create one (use TaskCreate).
3248
+
3249
+ NOTE that TaskGet returns a single task only; use TaskList for summaries or readiness.
3250
+
3251
+ ## Input Notes
3252
+ - taskId is required.
3253
+ - listId is optional; omit to use the default list.
3254
+
3255
+ ## Examples of When to Use TaskGet
3256
+
3257
+ <example>
3258
+ User: Can you check the status of task t-17 before updating it?
3259
+ Assistant: I'll fetch the task details first.
3260
+ *Fetches task t-17*
3261
+ </example>
3262
+ `;
3263
+
3264
+ // src/tools/interaction/TaskGetTool/TaskGetTool.tsx
3265
+ var inputSchema10 = z10.strictObject({
3266
+ listId: z10.string().optional(),
3267
+ taskId: z10.string().min(1)
3268
+ });
3269
+ var TaskGetTool = {
3270
+ name: "TaskGet",
3271
+ cachedDescription: DESCRIPTION7,
3272
+ async description() {
3273
+ return DESCRIPTION7;
3274
+ },
3275
+ async prompt() {
3276
+ return PROMPT7;
3277
+ },
3278
+ inputSchema: inputSchema10,
3279
+ userFacingName() {
3280
+ return "TaskGet";
3281
+ },
3282
+ async isEnabled() {
3283
+ return true;
3284
+ },
3285
+ isReadOnly() {
3286
+ return true;
3287
+ },
3288
+ isConcurrencySafe() {
3289
+ return true;
3290
+ },
3291
+ needsPermissions() {
3292
+ return false;
3293
+ },
3294
+ renderResultForAssistant(output) {
3295
+ return JSON.stringify(output, null, 2);
3296
+ },
3297
+ renderToolUseMessage() {
3298
+ return null;
3299
+ },
3300
+ async *call(input) {
3301
+ const { listId } = getTaskListPaths(input.listId);
3302
+ const task = getTask(input.taskId, { listId: input.listId });
3303
+ if (!task) {
3304
+ yield {
3305
+ type: "result",
3306
+ data: createTaskToolError({
3307
+ type: "not_found",
3308
+ code: "TASK_NOT_FOUND",
3309
+ message: `Task ${input.taskId} not found`,
3310
+ details: { taskId: input.taskId, listId }
3311
+ })
3312
+ };
3313
+ return;
3314
+ }
3315
+ yield {
3316
+ type: "result",
3317
+ data: {
3318
+ listId,
3319
+ item: toTaskSummary(task)
3320
+ }
3321
+ };
3322
+ }
3323
+ };
3324
+
3325
+ // src/tools/interaction/TaskListTool/TaskListTool.tsx
3326
+ import { z as z11 } from "zod";
3327
+
3328
+ // src/tools/interaction/TaskListTool/prompt.ts
3329
+ var DESCRIPTION8 = "List tasks in a task list, optionally filtered by status with ready/blocked breakdown.";
3330
+ var PROMPT8 = `Use this tool to list tasks and understand readiness. It returns ready and blocked groupings to help prioritize work.
3331
+
3332
+ ## When to Use This Tool
3333
+ Use this tool proactively in these scenarios:
3334
+
3335
+ 1. You need a list of tasks for a listId (or default list).
3336
+ 2. You need ready/blocked calculations to prioritize work.
3337
+ 3. You need to filter by status.
3338
+ 4. You want a quick summary of what can be started now.
3339
+
3340
+ ## When NOT to Use This Tool
3341
+
3342
+ Skip using this tool when:
3343
+ 1. You need a single task by id (use TaskGet).
3344
+ 2. You need to create or update tasks (use TaskCreate or TaskUpdate).
3345
+
3346
+ NOTE that TaskList is for summaries and readiness; use TaskGet for details.
3347
+
3348
+ ## Input Notes
3349
+ - listId is optional; omit to use the default list.
3350
+ - status filters the returned items; omit to exclude archived tasks by default.
3351
+ - includeBlocked=false returns only ready items.
3352
+
3353
+ ## Examples of When to Use TaskList
3354
+
3355
+ <example>
3356
+ User: What should we work on next?
3357
+ Assistant: I'll list tasks and check readiness.
3358
+ *Lists tasks with ready/blocked breakdown*
3359
+ </example>
3360
+
3361
+ <example>
3362
+ User: Show only in-progress items.
3363
+ Assistant: I'll list tasks filtered by status.
3364
+ *Lists tasks with status filter*
3365
+ </example>
3366
+ `;
3367
+
3368
+ // src/tools/interaction/TaskListTool/TaskListTool.tsx
3369
+ var inputSchema11 = z11.strictObject({
3370
+ listId: z11.string().optional(),
3371
+ status: z11.array(z11.enum(["open", "in_progress", "blocked", "done", "archived"])).optional(),
3372
+ includeBlocked: z11.boolean().optional()
3373
+ });
3374
+ var filterByStatus = (tasks, statuses) => {
3375
+ if (!statuses || statuses.length === 0) {
3376
+ return tasks.filter((item) => item.task.status !== "archived");
3377
+ }
3378
+ const allowed = new Set(statuses);
3379
+ return tasks.filter((item) => allowed.has(item.task.status));
3380
+ };
3381
+ var TaskListTool = {
3382
+ name: "TaskList",
3383
+ cachedDescription: DESCRIPTION8,
3384
+ async description() {
3385
+ return DESCRIPTION8;
3386
+ },
3387
+ async prompt() {
3388
+ return PROMPT8;
3389
+ },
3390
+ inputSchema: inputSchema11,
3391
+ userFacingName() {
3392
+ return "TaskList";
3393
+ },
3394
+ async isEnabled() {
3395
+ return true;
3396
+ },
3397
+ isReadOnly() {
3398
+ return true;
3399
+ },
3400
+ isConcurrencySafe() {
3401
+ return true;
3402
+ },
3403
+ needsPermissions() {
3404
+ return false;
3405
+ },
3406
+ renderResultForAssistant(output) {
3407
+ return JSON.stringify(output, null, 2);
3408
+ },
3409
+ renderToolUseMessage() {
3410
+ return null;
3411
+ },
3412
+ async *call(input) {
3413
+ try {
3414
+ const { listId } = getTaskListPaths(input.listId);
3415
+ const tasks = listTasks({ listId: input.listId });
3416
+ const summaries = tasks.map(toTaskSummary);
3417
+ const filtered = filterByStatus(summaries, input.status);
3418
+ const readyBlocked = calculateReadyBlocked(
3419
+ filtered.map((item) => item.task)
3420
+ );
3421
+ const ready = readyBlocked.ready.map(toTaskSummary);
3422
+ const blocked = readyBlocked.blocked.map(toTaskSummary);
3423
+ const includeBlocked = input.includeBlocked !== false;
3424
+ const items = includeBlocked ? filtered : filtered.filter(
3425
+ (item) => ready.some((entry) => entry.task.id === item.task.id)
3426
+ );
3427
+ yield {
3428
+ type: "result",
3429
+ data: {
3430
+ listId,
3431
+ items,
3432
+ ready,
3433
+ blocked: includeBlocked ? blocked : []
3434
+ }
3435
+ };
3436
+ } catch (error) {
3437
+ const message = error instanceof Error ? error.message : "Task list failed";
3438
+ yield {
3439
+ type: "result",
3440
+ data: createTaskToolError({
3441
+ type: "unknown",
3442
+ message
3443
+ })
3444
+ };
3445
+ }
3446
+ }
3447
+ };
3448
+
3449
+ // src/tools/interaction/TaskUpdateTool/TaskUpdateTool.tsx
3450
+ import { z as z12 } from "zod";
3451
+
3452
+ // src/tools/interaction/TaskUpdateTool/prompt.ts
3453
+ var DESCRIPTION9 = "Update an existing task, including status, metadata, and dependencies with conflict checks.";
3454
+ var PROMPT9 = `Use this tool to update an existing task. It is the primary way to track progress and adjust task details.
3455
+
3456
+ ## When to Use This Tool
3457
+ Use this tool proactively in these scenarios:
3458
+
3459
+ 1. You need to change task fields (subject/description/status/tags).
3460
+ 2. You need to adjust dependencies (blocks, blockedBy, parent, related).
3461
+ 3. You need optimistic concurrency control with baseVersion/version.
3462
+ 4. You are moving a task across states (open \u2192 in_progress \u2192 done).
3463
+
3464
+ ## When NOT to Use This Tool
3465
+
3466
+ Skip using this tool when:
3467
+ 1. You need to create a new task (use TaskCreate).
3468
+ 2. You only need to read tasks (use TaskGet or TaskList).
3469
+
3470
+ NOTE that TaskUpdate requires the correct baseVersion or version when concurrency checks are enabled.
3471
+
3472
+ ## Input Notes
3473
+ - taskId is required.
3474
+ - listId is optional; omit to use the default list.
3475
+ - If you provide status=done/archived and a parent exists, parent must already be completed.
3476
+ - Dependencies are validated for cycles; invalid cycles will be rejected.
3477
+ - Use baseVersion or version for concurrency checks; allowMerge can relax conflicts.
3478
+ - activeForm will be generated from subject if omitted.
3479
+ - blocks and blockedBy are always stored as arrays (empty when not used).
3480
+ - description and blockedBy are kept separate in JSON; any joining is only for terminal rendering.
3481
+ - Task ordering relies on task id; do not use priority fields.
3482
+
3483
+ ## Status Notes
3484
+ - Use in_progress for the task you are actively working on.
3485
+ - Use blocked when dependencies prevent progress and set blockedBy.
3486
+ - Use done or archived only when all child/parent constraints are satisfied.
3487
+
3488
+ ## Examples of When to Use TaskUpdate
3489
+
3490
+ <example>
3491
+ User: Mark the API task as in progress.
3492
+ Assistant: I'll update the task status.
3493
+ *Updates task status to in_progress*
3494
+ </example>
3495
+
3496
+ <example>
3497
+ User: The UI task depends on the API task now.
3498
+ Assistant: I'll update dependencies.
3499
+ *Updates blockedBy to include the API task*
3500
+ </example>
3501
+
3502
+ <example>
3503
+ User: The task update failed due to version conflict.
3504
+ Assistant: I'll refetch the task and retry with the latest baseVersion.
3505
+ *Fetches task, then updates with baseVersion*
3506
+ </example>
3507
+ `;
3508
+
3509
+ // src/tools/interaction/TaskUpdateTool/TaskUpdateTool.tsx
3510
+ var isCompletedStatus = (status) => status === "done" || status === "archived";
3511
+ var normalizeDeps = (items) => [...items ?? []].filter(Boolean).sort();
3512
+ var depsChanged = (prev, next) => {
3513
+ if (prev.parent !== next.parent) return true;
3514
+ const prevBlocks = normalizeDeps(prev.blocks);
3515
+ const nextBlocks = normalizeDeps(next.blocks);
3516
+ if (prevBlocks.length !== nextBlocks.length) return true;
3517
+ for (let i = 0; i < prevBlocks.length; i += 1) {
3518
+ if (prevBlocks[i] !== nextBlocks[i]) return true;
3519
+ }
3520
+ const prevBlockedBy = normalizeDeps(prev.blockedBy);
3521
+ const nextBlockedBy = normalizeDeps(next.blockedBy);
3522
+ if (prevBlockedBy.length !== nextBlockedBy.length) return true;
3523
+ for (let i = 0; i < prevBlockedBy.length; i += 1) {
3524
+ if (prevBlockedBy[i] !== nextBlockedBy[i]) return true;
3525
+ }
3526
+ const prevRelated = normalizeDeps(prev.related);
3527
+ const nextRelated = normalizeDeps(next.related);
3528
+ if (prevRelated.length !== nextRelated.length) return true;
3529
+ for (let i = 0; i < prevRelated.length; i += 1) {
3530
+ if (prevRelated[i] !== nextRelated[i]) return true;
3531
+ }
3532
+ return false;
3533
+ };
3534
+ var getDepsSnapshot = (task) => ({
3535
+ blocks: task.blocks ?? [],
3536
+ blockedBy: task.blockedBy ?? [],
3537
+ parent: task.parent,
3538
+ related: task.related ?? []
3539
+ });
3540
+ var inputSchema12 = z12.strictObject({
3541
+ listId: z12.string().optional(),
3542
+ taskId: z12.string().min(1),
3543
+ subject: z12.string().optional(),
3544
+ description: z12.string().optional(),
3545
+ activeForm: z12.string().optional(),
3546
+ status: z12.enum(["open", "in_progress", "blocked", "done", "archived"]).optional(),
3547
+ tags: z12.array(z12.string()).optional(),
3548
+ assignee: z12.string().optional(),
3549
+ metadata: z12.record(z12.string()).optional(),
3550
+ archived: z12.boolean().optional(),
3551
+ blocks: z12.array(z12.string()).optional(),
3552
+ blockedBy: z12.array(z12.string()).optional(),
3553
+ parent: z12.string().optional(),
3554
+ related: z12.array(z12.string()).optional(),
3555
+ baseVersion: z12.number().optional(),
3556
+ version: z12.number().optional(),
3557
+ allowMerge: z12.boolean().optional(),
3558
+ legacyTodoId: z12.string().optional()
3559
+ });
3560
+ var TaskUpdateTool = {
3561
+ name: "TaskUpdate",
3562
+ cachedDescription: DESCRIPTION9,
3563
+ async description() {
3564
+ return DESCRIPTION9;
3565
+ },
3566
+ async prompt() {
3567
+ return PROMPT9;
3568
+ },
3569
+ inputSchema: inputSchema12,
3570
+ userFacingName() {
3571
+ return "TaskUpdate";
3572
+ },
3573
+ async isEnabled() {
3574
+ return true;
3575
+ },
3576
+ isReadOnly() {
3577
+ return false;
3578
+ },
3579
+ isConcurrencySafe() {
3580
+ return false;
3581
+ },
3582
+ needsPermissions() {
3583
+ return false;
3584
+ },
3585
+ renderResultForAssistant(output) {
3586
+ return JSON.stringify(output, null, 2);
3587
+ },
3588
+ renderToolUseMessage() {
3589
+ return null;
3590
+ },
3591
+ async *call(input) {
3592
+ const { listId } = getTaskListPaths(input.listId);
3593
+ const existing = getTask(input.taskId, { listId: input.listId });
3594
+ if (!existing) {
3595
+ yield {
3596
+ type: "result",
3597
+ data: createTaskToolError({
3598
+ type: "not_found",
3599
+ code: "TASK_NOT_FOUND",
3600
+ message: `Task ${input.taskId} not found`,
3601
+ details: { taskId: input.taskId, listId }
3602
+ })
3603
+ };
3604
+ return;
3605
+ }
3606
+ const tasks = listTasks({ listId: input.listId });
3607
+ const subject = input.subject ?? existing.subject;
3608
+ const title = subject;
3609
+ const updatedTask = {
3610
+ ...existing,
3611
+ subject,
3612
+ title,
3613
+ description: input.description ?? existing.description,
3614
+ activeForm: input.activeForm ?? existing.activeForm,
3615
+ status: input.status ?? existing.status,
3616
+ tags: input.tags ?? existing.tags,
3617
+ assignee: input.assignee ?? existing.assignee,
3618
+ metadata: input.metadata ?? existing.metadata,
3619
+ archived: input.archived ?? existing.archived,
3620
+ blocks: input.blocks ?? existing.blocks,
3621
+ blockedBy: input.blockedBy ?? existing.blockedBy,
3622
+ parent: input.parent ?? existing.parent,
3623
+ related: input.related ?? existing.related,
3624
+ legacyTodoId: input.legacyTodoId ?? existing.legacyTodoId
3625
+ };
3626
+ const candidateTasks = tasks.map(
3627
+ (task) => task.id === existing.id ? updatedTask : task
3628
+ );
3629
+ const cycles = findTaskCycles(buildTaskGraph(candidateTasks));
3630
+ if (cycles.length > 0) {
3631
+ yield {
3632
+ type: "result",
3633
+ data: createTaskToolError({
3634
+ type: "validation",
3635
+ code: "TASK_CYCLE_DETECTED",
3636
+ message: "Task dependency cycle detected",
3637
+ details: { cycles }
3638
+ })
3639
+ };
3640
+ return;
3641
+ }
3642
+ if (input.status && isCompletedStatus(input.status)) {
3643
+ const parentId = updatedTask.parent;
3644
+ if (parentId) {
3645
+ const parentTask = tasks.find((task) => task.id === parentId);
3646
+ if (!parentTask || !isCompletedStatus(parentTask.status)) {
3647
+ yield {
3648
+ type: "result",
3649
+ data: createTaskToolError({
3650
+ type: "validation",
3651
+ code: "TASK_PARENT_INCOMPLETE",
3652
+ message: "Cannot complete task while parent is incomplete",
3653
+ details: {
3654
+ taskId: existing.id,
3655
+ parentId
3656
+ }
3657
+ })
3658
+ };
3659
+ return;
3660
+ }
3661
+ }
3662
+ }
3663
+ try {
3664
+ const baseVersion = input.baseVersion ?? input.version;
3665
+ const result = updateTask(
3666
+ input.taskId,
3667
+ {
3668
+ subject: input.subject,
3669
+ description: input.description,
3670
+ activeForm: input.activeForm,
3671
+ status: input.status,
3672
+ tags: input.tags,
3673
+ assignee: input.assignee,
3674
+ metadata: input.metadata,
3675
+ archived: input.archived,
3676
+ blocks: input.blocks,
3677
+ blockedBy: input.blockedBy,
3678
+ parent: input.parent,
3679
+ related: input.related,
3680
+ baseVersion,
3681
+ legacyTodoId: input.legacyTodoId
3682
+ },
3683
+ { listId: input.listId, allowMerge: input.allowMerge }
3684
+ );
3685
+ emitReminderEvent("task.updated", {
3686
+ listId,
3687
+ taskId: result.task.id,
3688
+ task: result.task,
3689
+ timestamp: Date.now()
3690
+ });
3691
+ if (existing.status !== result.task.status) {
3692
+ emitReminderEvent("task.status_changed", {
3693
+ listId,
3694
+ taskId: result.task.id,
3695
+ previousStatus: existing.status,
3696
+ status: result.task.status,
3697
+ timestamp: Date.now()
3698
+ });
3699
+ }
3700
+ if (depsChanged(existing, result.task)) {
3701
+ emitReminderEvent("task.deps_changed", {
3702
+ listId,
3703
+ taskId: result.task.id,
3704
+ previousDeps: getDepsSnapshot(existing),
3705
+ deps: getDepsSnapshot(result.task),
3706
+ timestamp: Date.now()
3707
+ });
3708
+ }
3709
+ yield {
3710
+ type: "result",
3711
+ data: {
3712
+ listId,
3713
+ item: toTaskSummary(result.task)
3714
+ }
3715
+ };
3716
+ } catch (error) {
3717
+ if (error instanceof TaskStoreConflictError) {
3718
+ emitReminderEvent("task:conflict_detected", {
3719
+ listId,
3720
+ taskId: error.taskId,
3721
+ expected: error.expectedBaseVersion,
3722
+ actual: error.actualBaseVersion,
3723
+ timestamp: Date.now()
3724
+ });
3725
+ yield {
3726
+ type: "result",
3727
+ data: createTaskToolError({
3728
+ type: "conflict",
3729
+ code: error.code,
3730
+ message: error.message,
3731
+ details: {
3732
+ taskId: error.taskId,
3733
+ expected: error.expectedBaseVersion,
3734
+ actual: error.actualBaseVersion
3735
+ }
3736
+ })
3737
+ };
3738
+ return;
3739
+ }
3740
+ const message = error instanceof Error ? error.message : "Task update failed";
3741
+ yield {
3742
+ type: "result",
3743
+ data: createTaskToolError({
3744
+ type: "unknown",
3745
+ message
3746
+ })
3747
+ };
3748
+ }
3749
+ }
3750
+ };
3751
+
2991
3752
  // src/tools/index.ts
2992
3753
  var getAllTools = () => [
2993
3754
  TaskTool,
@@ -3004,7 +3765,10 @@ var getAllTools = () => [
3004
3765
  FileWriteTool,
3005
3766
  DeleteTool,
3006
3767
  NotebookEditTool,
3007
- TodoWriteTool,
3768
+ TaskCreateTool,
3769
+ TaskGetTool,
3770
+ TaskUpdateTool,
3771
+ TaskListTool,
3008
3772
  WebFetchTool,
3009
3773
  WebSearchTool,
3010
3774
  AskUserQuestionTool,