pybao-cli 1.4.48 → 1.4.49

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 (145) hide show
  1. package/dist/REPL-PRQAXE32.js +47 -0
  2. package/dist/{acp-IFGE4F3A.js → acp-FGRNDOS5.js} +29 -29
  3. package/dist/{agentsValidate-2S7TS6FM.js → agentsValidate-7CRDPNQ6.js} +7 -7
  4. package/dist/{ask-VZHW54MU.js → ask-IR5W5M66.js} +28 -28
  5. package/dist/{autoUpdater-IW4TGS72.js → autoUpdater-MAEQZPST.js} +3 -3
  6. package/dist/{chunk-M3DAKW3P.js → chunk-2U747SA5.js} +3 -3
  7. package/dist/{chunk-HOGGCP42.js → chunk-3P2EGWMK.js} +2 -2
  8. package/dist/{chunk-XKZBVJG3.js → chunk-4Z6CCSED.js} +3 -3
  9. package/dist/{chunk-G4BAHYY3.js → chunk-55QJI7OQ.js} +1 -1
  10. package/dist/{chunk-GDVJR5KL.js → chunk-6GOKZQDV.js} +2 -2
  11. package/dist/{chunk-AXERAVMI.js → chunk-6Y4OSP3J.js} +28 -314
  12. package/dist/{chunk-AXERAVMI.js.map → chunk-6Y4OSP3J.js.map} +3 -3
  13. package/dist/{chunk-V6A2GMFH.js → chunk-72SGZIMD.js} +3 -3
  14. package/dist/{chunk-OWL5HCIC.js → chunk-7FNDFUQH.js} +1 -1
  15. package/dist/{chunk-SIA5QI6F.js → chunk-A7VN6YXZ.js} +1 -1
  16. package/dist/{chunk-BICKBBO7.js → chunk-AWML3QPK.js} +4 -4
  17. package/dist/{chunk-AIG7PATQ.js → chunk-D3Q32IUW.js} +3 -3
  18. package/dist/{chunk-JKU3KNYS.js → chunk-DEQQW4H6.js} +3 -3
  19. package/dist/{chunk-Z7WZHT6F.js → chunk-EXEPX5H2.js} +4 -4
  20. package/dist/{chunk-JBCUC2AT.js → chunk-GFDV6FUG.js} +3 -3
  21. package/dist/{chunk-3VMXYFIT.js → chunk-HFL2SOFQ.js} +1 -1
  22. package/dist/{chunk-ZJBXTNDU.js → chunk-I5H5PGD5.js} +36 -36
  23. package/dist/{chunk-ZJBXTNDU.js.map → chunk-I5H5PGD5.js.map} +1 -1
  24. package/dist/{chunk-J4C7YKYJ.js → chunk-IQ3KORSP.js} +4 -4
  25. package/dist/{chunk-4YDELOUA.js → chunk-JF4AMPKU.js} +2 -2
  26. package/dist/{chunk-ZHRGZQNR.js → chunk-LZT5LZKG.js} +2 -2
  27. package/dist/{chunk-GW5WTOG5.js → chunk-MCP52ZSD.js} +3 -9
  28. package/dist/{chunk-GW5WTOG5.js.map → chunk-MCP52ZSD.js.map} +1 -1
  29. package/dist/{chunk-ISCMKZNN.js → chunk-MLCISJKM.js} +3 -3
  30. package/dist/{chunk-BEXPBQFR.js → chunk-NZTVG7YS.js} +4 -4
  31. package/dist/{chunk-IFEDWTG7.js → chunk-PSI4PJ2H.js} +1 -1
  32. package/dist/{chunk-AXKISGZM.js → chunk-QW4VX3FW.js} +2 -2
  33. package/dist/{chunk-BOKBAA24.js → chunk-S2AJAM6R.js} +2 -2
  34. package/dist/{chunk-TZAXVFEM.js → chunk-SHIPHOMT.js} +1 -1
  35. package/dist/{chunk-XLEWRQCY.js → chunk-UUGWQSET.js} +1 -1
  36. package/dist/{chunk-5NESTZE6.js → chunk-XHGUMYRL.js} +1 -1
  37. package/dist/{chunk-EZ6FYX4C.js → chunk-XZNXY65J.js} +1 -1
  38. package/dist/{chunk-PZE5YBBF.js → chunk-YFBIVUDT.js} +1 -1
  39. package/dist/{chunk-PZE5YBBF.js.map → chunk-YFBIVUDT.js.map} +1 -1
  40. package/dist/{cli-ZRCAZYTQ.js → cli-PCLH664O.js} +87 -87
  41. package/dist/commands-Y7GVRV66.js +51 -0
  42. package/dist/{config-PLU4OP3T.js → config-EBW7GI65.js} +4 -4
  43. package/dist/{context-VS2RH2QQ.js → context-4BILE3LL.js} +6 -6
  44. package/dist/{customCommands-PO7TJK6W.js → customCommands-GDDHYRJR.js} +4 -4
  45. package/dist/{env-RWUREWKB.js → env-7V57CD26.js} +2 -2
  46. package/dist/{file-TJXZCSD6.js → file-3W4M7RXM.js} +4 -4
  47. package/dist/index.js +3 -3
  48. package/dist/{llm-SIFMXQZG.js → llm-PIRKDSMO.js} +29 -29
  49. package/dist/{llmLazy-NVYTF3ED.js → llmLazy-HWKMKZ5M.js} +1 -1
  50. package/dist/{loader-TESSLYD7.js → loader-GYFX3MOO.js} +4 -4
  51. package/dist/{lsp-B7C53VFK.js → lsp-BDQVEVFK.js} +6 -6
  52. package/dist/{lspAnchor-R6O24XMA.js → lspAnchor-S45W3FAI.js} +6 -6
  53. package/dist/{mcp-3K4SUF5X.js → mcp-ZHLSRCM5.js} +7 -7
  54. package/dist/{mentionProcessor-W562Z5O2.js → mentionProcessor-GOS6BB64.js} +6 -6
  55. package/dist/{messages-SSISEZIC.js → messages-AX4MWPK5.js} +1 -1
  56. package/dist/{model-GDYIDBOL.js → model-QDQAUOQ6.js} +5 -5
  57. package/dist/{openai-AWGHPGXZ.js → openai-IBJPYBTX.js} +5 -5
  58. package/dist/{outputStyles-XA3O4VXB.js → outputStyles-UNAE3KVB.js} +4 -4
  59. package/dist/{pluginRuntime-YAAKDIEX.js → pluginRuntime-QP6HTJ6Y.js} +6 -6
  60. package/dist/{pluginValidation-XADMM3ML.js → pluginValidation-C66MGV4E.js} +6 -6
  61. package/dist/prompts-LNJ2SJQ7.js +53 -0
  62. package/dist/{pybAgentSessionLoad-5ZQ4HRJA.js → pybAgentSessionLoad-GJQQFHVS.js} +4 -4
  63. package/dist/{pybAgentSessionResume-4RVMH3GJ.js → pybAgentSessionResume-2ZNOOEVX.js} +4 -4
  64. package/dist/{pybAgentStreamJsonSession-EX6CPLCM.js → pybAgentStreamJsonSession-PE2K75QJ.js} +1 -1
  65. package/dist/{pybHooks-LULFTS4Q.js → pybHooks-22R4DOTT.js} +4 -4
  66. package/dist/query-2ZFLZTV6.js +55 -0
  67. package/dist/{registry-7PDNLUXI.js → registry-ES4KTNF7.js} +5 -5
  68. package/dist/{ripgrep-WHJWB2CA.js → ripgrep-7BPG53S4.js} +3 -3
  69. package/dist/{skillMarketplace-KN775I76.js → skillMarketplace-O5TAM4G6.js} +3 -3
  70. package/dist/{state-3ATZNQCD.js → state-3OM3WWZ2.js} +2 -2
  71. package/dist/{theme-7LEARTTQ.js → theme-7MFSQQ5Z.js} +5 -5
  72. package/dist/{toolPermissionSettings-AKADQAEF.js → toolPermissionSettings-KKMWAVTJ.js} +6 -6
  73. package/dist/tools-ME4EX5CM.js +52 -0
  74. package/dist/{userInput-WB5USVP7.js → userInput-3BYMTC52.js} +30 -30
  75. package/package.json +1 -1
  76. package/dist/REPL-U456S3ZD.js +0 -47
  77. package/dist/commands-TFMEUD4X.js +0 -51
  78. package/dist/prompts-HOWNPK7S.js +0 -53
  79. package/dist/query-ZTFONAXX.js +0 -55
  80. package/dist/tools-4Y3EFQJW.js +0 -52
  81. /package/dist/{REPL-U456S3ZD.js.map → REPL-PRQAXE32.js.map} +0 -0
  82. /package/dist/{acp-IFGE4F3A.js.map → acp-FGRNDOS5.js.map} +0 -0
  83. /package/dist/{agentsValidate-2S7TS6FM.js.map → agentsValidate-7CRDPNQ6.js.map} +0 -0
  84. /package/dist/{ask-VZHW54MU.js.map → ask-IR5W5M66.js.map} +0 -0
  85. /package/dist/{autoUpdater-IW4TGS72.js.map → autoUpdater-MAEQZPST.js.map} +0 -0
  86. /package/dist/{chunk-M3DAKW3P.js.map → chunk-2U747SA5.js.map} +0 -0
  87. /package/dist/{chunk-HOGGCP42.js.map → chunk-3P2EGWMK.js.map} +0 -0
  88. /package/dist/{chunk-XKZBVJG3.js.map → chunk-4Z6CCSED.js.map} +0 -0
  89. /package/dist/{chunk-G4BAHYY3.js.map → chunk-55QJI7OQ.js.map} +0 -0
  90. /package/dist/{chunk-GDVJR5KL.js.map → chunk-6GOKZQDV.js.map} +0 -0
  91. /package/dist/{chunk-V6A2GMFH.js.map → chunk-72SGZIMD.js.map} +0 -0
  92. /package/dist/{chunk-OWL5HCIC.js.map → chunk-7FNDFUQH.js.map} +0 -0
  93. /package/dist/{chunk-SIA5QI6F.js.map → chunk-A7VN6YXZ.js.map} +0 -0
  94. /package/dist/{chunk-BICKBBO7.js.map → chunk-AWML3QPK.js.map} +0 -0
  95. /package/dist/{chunk-AIG7PATQ.js.map → chunk-D3Q32IUW.js.map} +0 -0
  96. /package/dist/{chunk-JKU3KNYS.js.map → chunk-DEQQW4H6.js.map} +0 -0
  97. /package/dist/{chunk-Z7WZHT6F.js.map → chunk-EXEPX5H2.js.map} +0 -0
  98. /package/dist/{chunk-JBCUC2AT.js.map → chunk-GFDV6FUG.js.map} +0 -0
  99. /package/dist/{chunk-3VMXYFIT.js.map → chunk-HFL2SOFQ.js.map} +0 -0
  100. /package/dist/{chunk-J4C7YKYJ.js.map → chunk-IQ3KORSP.js.map} +0 -0
  101. /package/dist/{chunk-4YDELOUA.js.map → chunk-JF4AMPKU.js.map} +0 -0
  102. /package/dist/{chunk-ZHRGZQNR.js.map → chunk-LZT5LZKG.js.map} +0 -0
  103. /package/dist/{chunk-ISCMKZNN.js.map → chunk-MLCISJKM.js.map} +0 -0
  104. /package/dist/{chunk-BEXPBQFR.js.map → chunk-NZTVG7YS.js.map} +0 -0
  105. /package/dist/{chunk-IFEDWTG7.js.map → chunk-PSI4PJ2H.js.map} +0 -0
  106. /package/dist/{chunk-AXKISGZM.js.map → chunk-QW4VX3FW.js.map} +0 -0
  107. /package/dist/{chunk-BOKBAA24.js.map → chunk-S2AJAM6R.js.map} +0 -0
  108. /package/dist/{chunk-TZAXVFEM.js.map → chunk-SHIPHOMT.js.map} +0 -0
  109. /package/dist/{chunk-XLEWRQCY.js.map → chunk-UUGWQSET.js.map} +0 -0
  110. /package/dist/{chunk-5NESTZE6.js.map → chunk-XHGUMYRL.js.map} +0 -0
  111. /package/dist/{chunk-EZ6FYX4C.js.map → chunk-XZNXY65J.js.map} +0 -0
  112. /package/dist/{cli-ZRCAZYTQ.js.map → cli-PCLH664O.js.map} +0 -0
  113. /package/dist/{commands-TFMEUD4X.js.map → commands-Y7GVRV66.js.map} +0 -0
  114. /package/dist/{config-PLU4OP3T.js.map → config-EBW7GI65.js.map} +0 -0
  115. /package/dist/{context-VS2RH2QQ.js.map → context-4BILE3LL.js.map} +0 -0
  116. /package/dist/{customCommands-PO7TJK6W.js.map → customCommands-GDDHYRJR.js.map} +0 -0
  117. /package/dist/{env-RWUREWKB.js.map → env-7V57CD26.js.map} +0 -0
  118. /package/dist/{file-TJXZCSD6.js.map → file-3W4M7RXM.js.map} +0 -0
  119. /package/dist/{llm-SIFMXQZG.js.map → llm-PIRKDSMO.js.map} +0 -0
  120. /package/dist/{llmLazy-NVYTF3ED.js.map → llmLazy-HWKMKZ5M.js.map} +0 -0
  121. /package/dist/{loader-TESSLYD7.js.map → loader-GYFX3MOO.js.map} +0 -0
  122. /package/dist/{lsp-B7C53VFK.js.map → lsp-BDQVEVFK.js.map} +0 -0
  123. /package/dist/{lspAnchor-R6O24XMA.js.map → lspAnchor-S45W3FAI.js.map} +0 -0
  124. /package/dist/{mcp-3K4SUF5X.js.map → mcp-ZHLSRCM5.js.map} +0 -0
  125. /package/dist/{mentionProcessor-W562Z5O2.js.map → mentionProcessor-GOS6BB64.js.map} +0 -0
  126. /package/dist/{messages-SSISEZIC.js.map → messages-AX4MWPK5.js.map} +0 -0
  127. /package/dist/{model-GDYIDBOL.js.map → model-QDQAUOQ6.js.map} +0 -0
  128. /package/dist/{openai-AWGHPGXZ.js.map → openai-IBJPYBTX.js.map} +0 -0
  129. /package/dist/{outputStyles-XA3O4VXB.js.map → outputStyles-UNAE3KVB.js.map} +0 -0
  130. /package/dist/{pluginRuntime-YAAKDIEX.js.map → pluginRuntime-QP6HTJ6Y.js.map} +0 -0
  131. /package/dist/{pluginValidation-XADMM3ML.js.map → pluginValidation-C66MGV4E.js.map} +0 -0
  132. /package/dist/{prompts-HOWNPK7S.js.map → prompts-LNJ2SJQ7.js.map} +0 -0
  133. /package/dist/{pybAgentSessionLoad-5ZQ4HRJA.js.map → pybAgentSessionLoad-GJQQFHVS.js.map} +0 -0
  134. /package/dist/{pybAgentSessionResume-4RVMH3GJ.js.map → pybAgentSessionResume-2ZNOOEVX.js.map} +0 -0
  135. /package/dist/{pybAgentStreamJsonSession-EX6CPLCM.js.map → pybAgentStreamJsonSession-PE2K75QJ.js.map} +0 -0
  136. /package/dist/{pybHooks-LULFTS4Q.js.map → pybHooks-22R4DOTT.js.map} +0 -0
  137. /package/dist/{query-ZTFONAXX.js.map → query-2ZFLZTV6.js.map} +0 -0
  138. /package/dist/{registry-7PDNLUXI.js.map → registry-ES4KTNF7.js.map} +0 -0
  139. /package/dist/{ripgrep-WHJWB2CA.js.map → ripgrep-7BPG53S4.js.map} +0 -0
  140. /package/dist/{skillMarketplace-KN775I76.js.map → skillMarketplace-O5TAM4G6.js.map} +0 -0
  141. /package/dist/{state-3ATZNQCD.js.map → state-3OM3WWZ2.js.map} +0 -0
  142. /package/dist/{theme-7LEARTTQ.js.map → theme-7MFSQQ5Z.js.map} +0 -0
  143. /package/dist/{toolPermissionSettings-AKADQAEF.js.map → toolPermissionSettings-KKMWAVTJ.js.map} +0 -0
  144. /package/dist/{tools-4Y3EFQJW.js.map → tools-ME4EX5CM.js.map} +0 -0
  145. /package/dist/{userInput-WB5USVP7.js.map → userInput-3BYMTC52.js.map} +0 -0
@@ -29,16 +29,16 @@ import {
29
29
  hasReadPermission,
30
30
  hasWritePermission,
31
31
  query
32
- } from "./chunk-ZJBXTNDU.js";
32
+ } from "./chunk-I5H5PGD5.js";
33
33
  import {
34
34
  queryLLM
35
- } from "./chunk-Z7WZHT6F.js";
35
+ } from "./chunk-EXEPX5H2.js";
36
36
  import {
37
37
  FallbackToolUseRejectedMessage,
38
38
  MCPTool,
39
39
  getClients,
40
40
  getMCPTools
41
- } from "./chunk-BICKBBO7.js";
41
+ } from "./chunk-AWML3QPK.js";
42
42
  import {
43
43
  TaskStoreConflictError,
44
44
  createTask,
@@ -46,48 +46,47 @@ import {
46
46
  generateAgentId,
47
47
  getTask,
48
48
  getTaskListPaths,
49
- getTaskNextId,
50
49
  listTasks,
51
50
  updateTask
52
- } from "./chunk-GW5WTOG5.js";
51
+ } from "./chunk-MCP52ZSD.js";
53
52
  import {
54
53
  getActiveAgents,
55
54
  getAgentByType,
56
55
  getAvailableAgentTypes
57
- } from "./chunk-ZHRGZQNR.js";
56
+ } from "./chunk-LZT5LZKG.js";
58
57
  import {
59
58
  INTERRUPT_MESSAGE,
60
59
  createAssistantMessage,
61
60
  createUserMessage,
62
61
  getLastAssistantMessageId
63
- } from "./chunk-TZAXVFEM.js";
62
+ } from "./chunk-SHIPHOMT.js";
64
63
  import {
65
64
  formatDuration,
66
65
  formatNumber
67
66
  } from "./chunk-OUXHGDLH.js";
68
67
  import {
69
68
  getAbsolutePath
70
- } from "./chunk-AXKISGZM.js";
69
+ } from "./chunk-QW4VX3FW.js";
71
70
  import {
72
71
  LspFacade,
73
72
  formatDiagnosticsPretty
74
- } from "./chunk-J4C7YKYJ.js";
73
+ } from "./chunk-IQ3KORSP.js";
75
74
  import {
76
75
  getModelManager
77
- } from "./chunk-JBCUC2AT.js";
76
+ } from "./chunk-GFDV6FUG.js";
78
77
  import {
79
78
  getContext
80
- } from "./chunk-BEXPBQFR.js";
79
+ } from "./chunk-NZTVG7YS.js";
81
80
  import {
82
81
  filesToTree,
83
82
  ripGrepWithStatus
84
- } from "./chunk-EZ6FYX4C.js";
83
+ } from "./chunk-XZNXY65J.js";
85
84
  import {
86
85
  getTheme
87
- } from "./chunk-G4BAHYY3.js";
86
+ } from "./chunk-55QJI7OQ.js";
88
87
  import {
89
88
  debug
90
- } from "./chunk-5NESTZE6.js";
89
+ } from "./chunk-XHGUMYRL.js";
91
90
  import {
92
91
  BunShell,
93
92
  getCwd,
@@ -98,7 +97,7 @@ import {
98
97
  overwriteLog,
99
98
  readTaskOutput,
100
99
  resolveXdgDataPath
101
- } from "./chunk-XLEWRQCY.js";
100
+ } from "./chunk-UUGWQSET.js";
102
101
 
103
102
  // src/tools/index.ts
104
103
  import { memoize as memoize2 } from "lodash-es";
@@ -777,7 +776,7 @@ async function analyzeOutputWithLsp(output, exitCode) {
777
776
  if (exitCode !== 0 || errorCount > 0 || warningCount > 0) {
778
777
  try {
779
778
  const { isAbsolute: isAbsolute3, resolve: resolve4 } = await import("path");
780
- const { getSessionRoot: getSessionRoot2 } = await import("./state-3ATZNQCD.js");
779
+ const { getSessionRoot: getSessionRoot2 } = await import("./state-3OM3WWZ2.js");
781
780
  const lines = output.split("\n");
782
781
  const uniqueFiles = /* @__PURE__ */ new Set();
783
782
  const lspSuggestions = [];
@@ -1150,7 +1149,7 @@ var DeleteTool = {
1150
1149
  }
1151
1150
  if (!force) {
1152
1151
  try {
1153
- const { LspFacade: LspFacade2 } = await import("./lsp-B7C53VFK.js");
1152
+ const { LspFacade: LspFacade2 } = await import("./lsp-BDQVEVFK.js");
1154
1153
  const referenceDetail = await LspFacade2.checkFileReferences(fullPath);
1155
1154
  if (referenceDetail) {
1156
1155
  failedItems.push(
@@ -3043,7 +3042,7 @@ function createTaskToolError(params) {
3043
3042
  }
3044
3043
 
3045
3044
  // src/tools/interaction/TaskCreateTool/prompt.ts
3046
- var DESCRIPTION6 = "Create a new task in the task list with optional status and dependencies.";
3045
+ var DESCRIPTION6 = "Create a new task in the task list with optional status.";
3047
3046
  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.
3048
3047
 
3049
3048
  ## When to Use This Tool
@@ -3065,11 +3064,10 @@ NOTE that you should not use this tool if you are only updating status or detail
3065
3064
  ## Input Notes
3066
3065
  - subject is required.
3067
3066
  - listId is optional; omit to use the default list.
3068
- - Dependencies are validated for cycles; invalid cycles will be rejected.
3069
- - For multi-step plans, you need to create structured task list without blockedBy and add dependencies later via TaskUpdate.
3067
+ - TaskCreate only supports single-task creation; create multiple tasks one by one.
3068
+ - For multi-step plans, create the structured task list without dependencies and add blockedBy later via TaskUpdate.
3070
3069
  - status can be pending, in_progress, blocked, done, or archived.
3071
3070
  - activeForm is required and must not equal subject.
3072
- - activeForm is required for each batch task.
3073
3071
  - blockedBy is always stored as an array (empty when not used).
3074
3072
  - description and blockedBy are kept separate in JSON; any joining is only for terminal rendering.
3075
3073
  - Task ordering relies on task id; do not use priority fields.
@@ -3091,25 +3089,6 @@ Preferred single-task template:
3091
3089
  "activeForm": "Clarifying requirements and defining scope"
3092
3090
  }
3093
3091
 
3094
- ## Batch Input Notes
3095
- - Use tasks: [...] to create multiple tasks in one call.
3096
- - Do not mix tasks with single-task fields like subject/description.
3097
- - Auto dependency chaining only applies to batch creation when enabled and blockedBy is omitted.
3098
- Batch example (auto chain enabled, blockedBy omitted):
3099
- {
3100
- "tasks": [
3101
- { "subject": "Design schema", "activeForm": "Designing schema" },
3102
- { "subject": "Implement API", "activeForm": "Implementing API" }
3103
- ]
3104
- }
3105
- Batch example (explicit blockedBy, no override):
3106
- {
3107
- "tasks": [
3108
- { "subject": "Migrate data", "activeForm": "Migrating data" },
3109
- { "subject": "Backfill indexes", "activeForm": "Backfilling indexes", "blockedBy": ["1"] }
3110
- ]
3111
- }
3112
-
3113
3092
  ## Status Notes
3114
3093
  - Use blocked when dependencies prevent work and fill blockedBy.
3115
3094
 
@@ -3117,7 +3096,7 @@ Batch example (explicit blockedBy, no override):
3117
3096
 
3118
3097
  <example>
3119
3098
  User: I need to implement user registration, product catalog, and checkout.
3120
- Assistant: I will create tasks for each feature.
3099
+ Assistant: I will create tasks for each feature one by one.
3121
3100
  *Creates tasks:*
3122
3101
  1. User registration
3123
3102
  2. Product catalog
@@ -3135,22 +3114,8 @@ Assistant: I'll seed tasks for the refactor and verification steps.
3135
3114
 
3136
3115
  <example>
3137
3116
  User: The API task depends on database schema changes.
3138
- Assistant: I'll create tasks with dependencies.
3139
- *Creates tasks:*
3140
- 1. Update database schema
3141
- 2. Implement API endpoints (blockedBy: schema task)
3142
- </example>
3143
-
3144
- <example>
3145
- User: Create a two-step plan in one call.
3146
- Assistant: I'll create tasks in batch with a dependency chain.
3147
- *Creates tasks with tasks array, where the second task is blockedBy the first*
3148
- </example>
3149
-
3150
- <example>
3151
- User: Create three tasks at once, but I will specify blockedBy myself.
3152
- Assistant: I'll create tasks in batch and keep your blockedBy values.
3153
- *Creates tasks with tasks array and explicit blockedBy fields*
3117
+ Assistant: I'll create the tasks first, then add blockedBy using TaskUpdate.
3118
+ *Creates tasks without dependencies, then updates blockedBy*
3154
3119
  </example>
3155
3120
 
3156
3121
  <example>
@@ -3167,22 +3132,16 @@ Assistant: I'll create a single task.
3167
3132
  `;
3168
3133
 
3169
3134
  // src/tools/interaction/TaskCreateTool/TaskCreateTool.tsx
3170
- var shouldAutoChainDependencies = () => {
3171
- const value = process.env.PYB_TASK_AUTOCHAIN?.toLowerCase();
3172
- return value === "true" || value === "1";
3173
- };
3174
- var getMissingBlockedBy = (blockedBy, ids) => (blockedBy ?? []).filter((id) => !ids.has(id));
3175
- var taskInputSchema = z9.strictObject({
3135
+ var inputSchema9 = z9.strictObject({
3136
+ listId: z9.string().optional(),
3176
3137
  subject: z9.string().min(1),
3177
3138
  description: z9.string().optional(),
3178
- activeForm: z9.string().min(1),
3139
+ activeForm: z9.string({ required_error: "activeForm is required" }).min(1),
3179
3140
  status: z9.enum(["pending", "in_progress", "blocked", "done", "archived"]).optional(),
3180
3141
  tags: z9.array(z9.string()).optional(),
3181
3142
  assignee: z9.string().optional(),
3182
3143
  metadata: z9.record(z9.string()).optional(),
3183
3144
  archived: z9.boolean().optional(),
3184
- blocks: z9.array(z9.string()).optional(),
3185
- blockedBy: z9.array(z9.string()).optional(),
3186
3145
  parent: z9.string().optional(),
3187
3146
  related: z9.array(z9.string()).optional(),
3188
3147
  legacyTodoId: z9.string().optional()
@@ -3194,79 +3153,6 @@ var taskInputSchema = z9.strictObject({
3194
3153
  });
3195
3154
  }
3196
3155
  });
3197
- var inputSchema9 = z9.strictObject({
3198
- listId: z9.string().optional(),
3199
- tasks: z9.array(taskInputSchema).min(1).optional(),
3200
- subject: z9.string().min(1).optional(),
3201
- description: z9.string().optional(),
3202
- activeForm: z9.string().optional(),
3203
- status: z9.enum(["pending", "in_progress", "blocked", "done", "archived"]).optional(),
3204
- tags: z9.array(z9.string()).optional(),
3205
- assignee: z9.string().optional(),
3206
- metadata: z9.record(z9.string()).optional(),
3207
- archived: z9.boolean().optional(),
3208
- blocks: z9.array(z9.string()).optional(),
3209
- blockedBy: z9.array(z9.string()).optional(),
3210
- parent: z9.string().optional(),
3211
- related: z9.array(z9.string()).optional(),
3212
- legacyTodoId: z9.string().optional()
3213
- }).superRefine((value, ctx) => {
3214
- const hasTasks = Array.isArray(value.tasks);
3215
- const hasSubject = typeof value.subject === "string" && value.subject.length > 0;
3216
- if (hasTasks && hasSubject) {
3217
- ctx.addIssue({
3218
- code: z9.ZodIssueCode.custom,
3219
- message: "Use either tasks or subject, not both"
3220
- });
3221
- return;
3222
- }
3223
- if (!hasTasks && !hasSubject) {
3224
- ctx.addIssue({
3225
- code: z9.ZodIssueCode.custom,
3226
- message: "Either tasks or subject is required"
3227
- });
3228
- return;
3229
- }
3230
- if (hasTasks) {
3231
- const singleKeys = [
3232
- "subject",
3233
- "description",
3234
- "activeForm",
3235
- "status",
3236
- "tags",
3237
- "assignee",
3238
- "metadata",
3239
- "archived",
3240
- "blocks",
3241
- "blockedBy",
3242
- "parent",
3243
- "related",
3244
- "legacyTodoId"
3245
- ];
3246
- const hasSingleFields = singleKeys.some((key) => value[key] !== void 0);
3247
- if (hasSingleFields) {
3248
- ctx.addIssue({
3249
- code: z9.ZodIssueCode.custom,
3250
- message: "Do not mix batch tasks with single-task fields"
3251
- });
3252
- }
3253
- }
3254
- if (hasSubject) {
3255
- if (!value.activeForm || value.activeForm.length === 0) {
3256
- ctx.addIssue({
3257
- code: z9.ZodIssueCode.custom,
3258
- message: "activeForm is required"
3259
- });
3260
- return;
3261
- }
3262
- if (value.activeForm === value.subject) {
3263
- ctx.addIssue({
3264
- code: z9.ZodIssueCode.custom,
3265
- message: "activeForm \u4E0D\u5F97\u4E0E subject \u76F8\u540C"
3266
- });
3267
- }
3268
- }
3269
- });
3270
3156
  var TaskCreateTool = {
3271
3157
  name: "TaskCreate",
3272
3158
  cachedDescription: DESCRIPTION6,
@@ -3306,178 +3192,7 @@ var TaskCreateTool = {
3306
3192
  },
3307
3193
  async *call(input) {
3308
3194
  try {
3309
- const tasks = listTasks({ listId: input.listId });
3310
- if (input.tasks) {
3311
- const autoChain = shouldAutoChainDependencies();
3312
- const startId = getTaskNextId({ listId: input.listId });
3313
- const now2 = Date.now();
3314
- const candidateTasks2 = [...tasks];
3315
- const candidateBatch = input.tasks.map((entry, index) => {
3316
- const autoBlockedBy = entry.blockedBy === void 0 && autoChain && input.tasks.length > 1 && index > 0 ? [String(startId + index - 1)] : entry.blockedBy;
3317
- const candidate = {
3318
- id: String(startId + index),
3319
- subject: entry.subject,
3320
- description: entry.description,
3321
- activeForm: entry.activeForm,
3322
- status: entry.status ?? "pending",
3323
- tags: entry.tags,
3324
- assignee: entry.assignee,
3325
- metadata: entry.metadata,
3326
- archived: entry.archived,
3327
- blocks: [],
3328
- blockedBy: autoBlockedBy,
3329
- parent: entry.parent,
3330
- related: entry.related,
3331
- createdAt: now2,
3332
- updatedAt: now2,
3333
- baseVersion: 1,
3334
- version: 1,
3335
- legacyTodoId: entry.legacyTodoId
3336
- };
3337
- candidateTasks2.push(candidate);
3338
- return candidate;
3339
- });
3340
- const { listId: listId2 } = getTaskListPaths(input.listId);
3341
- for (let index = 0; index < candidateBatch.length; index += 1) {
3342
- if (candidateBatch.length > 1 && index > 0 && (candidateBatch[index].blockedBy?.length ?? 0) === 0) {
3343
- emitReminderEvent("task.dependency_chain_missing", {
3344
- listId: listId2,
3345
- taskId: candidateBatch[index].id,
3346
- blockedBy: candidateBatch[index].blockedBy ?? [],
3347
- timestamp: Date.now()
3348
- });
3349
- }
3350
- }
3351
- const candidateIds2 = new Set(candidateTasks2.map((task2) => task2.id));
3352
- for (const task2 of candidateBatch) {
3353
- const missing2 = getMissingBlockedBy(task2.blockedBy, candidateIds2);
3354
- if (missing2.length > 0) {
3355
- yield {
3356
- type: "result",
3357
- data: createTaskToolError({
3358
- type: "validation",
3359
- code: "TASK_BLOCKEDBY_NOT_FOUND",
3360
- message: "BlockedBy tasks must exist in the same list",
3361
- details: { taskId: task2.id, listId: listId2, missingBlockedBy: missing2 }
3362
- })
3363
- };
3364
- return;
3365
- }
3366
- }
3367
- const cycles2 = findTaskCycles(buildTaskGraph(candidateTasks2));
3368
- if (cycles2.length > 0) {
3369
- yield {
3370
- type: "result",
3371
- data: createTaskToolError({
3372
- type: "validation",
3373
- code: "TASK_CYCLE_DETECTED",
3374
- message: "Task dependency cycle detected",
3375
- details: { cycles: cycles2 }
3376
- })
3377
- };
3378
- return;
3379
- }
3380
- const createdItems = [];
3381
- for (let index = 0; index < input.tasks.length; index += 1) {
3382
- const entry = input.tasks[index];
3383
- const task2 = createTask(
3384
- {
3385
- subject: entry.subject,
3386
- description: entry.description,
3387
- activeForm: entry.activeForm,
3388
- status: entry.status,
3389
- tags: entry.tags,
3390
- assignee: entry.assignee,
3391
- metadata: entry.metadata,
3392
- archived: entry.archived,
3393
- blockedBy: candidateBatch[index].blockedBy,
3394
- parent: entry.parent,
3395
- related: entry.related,
3396
- legacyTodoId: entry.legacyTodoId
3397
- },
3398
- { listId: input.listId }
3399
- );
3400
- emitReminderEvent("task.created", {
3401
- listId: listId2,
3402
- taskId: task2.id,
3403
- task: task2,
3404
- timestamp: Date.now()
3405
- });
3406
- createdItems.push(toTaskDetail(task2));
3407
- }
3408
- yield {
3409
- type: "result",
3410
- data: {
3411
- listId: listId2,
3412
- items: createdItems
3413
- }
3414
- };
3415
- return;
3416
- }
3417
3195
  const subject = input.subject;
3418
- const nextId = Math.max(
3419
- 0,
3420
- ...tasks.map((task2) => Number(task2.id)).filter((value) => !Number.isNaN(value))
3421
- ) + 1;
3422
- const now = Date.now();
3423
- const candidateTask = {
3424
- id: String(nextId),
3425
- subject,
3426
- description: input.description,
3427
- activeForm: input.activeForm,
3428
- status: input.status ?? "pending",
3429
- tags: input.tags,
3430
- assignee: input.assignee,
3431
- metadata: input.metadata,
3432
- archived: input.archived,
3433
- blocks: [],
3434
- blockedBy: input.blockedBy,
3435
- parent: input.parent,
3436
- related: input.related,
3437
- createdAt: now,
3438
- updatedAt: now,
3439
- baseVersion: 1,
3440
- version: 1,
3441
- legacyTodoId: input.legacyTodoId
3442
- };
3443
- if (tasks.length > 0 && (input.blockedBy?.length ?? 0) === 0) {
3444
- const { listId: listId2 } = getTaskListPaths(input.listId);
3445
- emitReminderEvent("task.dependency_chain_missing", {
3446
- listId: listId2,
3447
- taskId: candidateTask.id,
3448
- blockedBy: candidateTask.blockedBy ?? [],
3449
- timestamp: Date.now()
3450
- });
3451
- }
3452
- const candidateTasks = [...tasks, candidateTask];
3453
- const candidateIds = new Set(candidateTasks.map((task2) => task2.id));
3454
- const missing = getMissingBlockedBy(candidateTask.blockedBy, candidateIds);
3455
- if (missing.length > 0) {
3456
- const { listId: listId2 } = getTaskListPaths(input.listId);
3457
- yield {
3458
- type: "result",
3459
- data: createTaskToolError({
3460
- type: "validation",
3461
- code: "TASK_BLOCKEDBY_NOT_FOUND",
3462
- message: "BlockedBy tasks must exist in the same list",
3463
- details: { taskId: candidateTask.id, listId: listId2, missingBlockedBy: missing }
3464
- })
3465
- };
3466
- return;
3467
- }
3468
- const cycles = findTaskCycles(buildTaskGraph(candidateTasks));
3469
- if (cycles.length > 0) {
3470
- yield {
3471
- type: "result",
3472
- data: createTaskToolError({
3473
- type: "validation",
3474
- code: "TASK_CYCLE_DETECTED",
3475
- message: "Task dependency cycle detected",
3476
- details: { cycles }
3477
- })
3478
- };
3479
- return;
3480
- }
3481
3196
  const task = createTask(
3482
3197
  {
3483
3198
  subject,
@@ -3488,7 +3203,6 @@ var TaskCreateTool = {
3488
3203
  assignee: input.assignee,
3489
3204
  metadata: input.metadata,
3490
3205
  archived: input.archived,
3491
- blockedBy: input.blockedBy,
3492
3206
  parent: input.parent,
3493
3207
  related: input.related,
3494
3208
  legacyTodoId: input.legacyTodoId
@@ -3846,7 +3560,7 @@ var getDepsSnapshot = (task) => ({
3846
3560
  parent: task.parent,
3847
3561
  related: task.related ?? []
3848
3562
  });
3849
- var getMissingBlockedBy2 = (blockedBy, ids) => (blockedBy ?? []).filter((id) => !ids.has(id));
3563
+ var getMissingBlockedBy = (blockedBy, ids) => (blockedBy ?? []).filter((id) => !ids.has(id));
3850
3564
  var isPlanFinalized = (metadata) => metadata?.planFinalized === "true";
3851
3565
  var compareTaskId = (left, right) => {
3852
3566
  const leftValue = Number(left.id);
@@ -3961,7 +3675,7 @@ var TaskUpdateTool = {
3961
3675
  });
3962
3676
  }
3963
3677
  if (input.blockedBy) {
3964
- const missing = getMissingBlockedBy2(updatedTask.blockedBy, candidateIds);
3678
+ const missing = getMissingBlockedBy(updatedTask.blockedBy, candidateIds);
3965
3679
  if (missing.length > 0) {
3966
3680
  yield {
3967
3681
  type: "result",
@@ -3994,7 +3708,7 @@ var TaskUpdateTool = {
3994
3708
  const ordered = [...activeTasks].sort(compareTaskId);
3995
3709
  const firstTaskId = ordered[0]?.id;
3996
3710
  for (const task of activeTasks) {
3997
- const missing = getMissingBlockedBy2(task.blockedBy, candidateIds);
3711
+ const missing = getMissingBlockedBy(task.blockedBy, candidateIds);
3998
3712
  if (missing.length > 0) {
3999
3713
  yield {
4000
3714
  type: "result",