pybao-cli 1.4.47 → 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-SF2NQMZG.js → acp-FGRNDOS5.js} +29 -29
  3. package/dist/{agentsValidate-GLBXCFYZ.js → agentsValidate-7CRDPNQ6.js} +7 -7
  4. package/dist/{ask-YBV7ODJM.js → ask-IR5W5M66.js} +28 -28
  5. package/dist/{autoUpdater-VYKAJUSN.js → autoUpdater-MAEQZPST.js} +3 -3
  6. package/dist/{chunk-RK3EJLZI.js → chunk-2U747SA5.js} +3 -3
  7. package/dist/{chunk-YORDNUOL.js → chunk-3P2EGWMK.js} +2 -2
  8. package/dist/{chunk-ONLKTCPY.js → chunk-4Z6CCSED.js} +3 -3
  9. package/dist/{chunk-F5RAKG24.js → chunk-55QJI7OQ.js} +1 -1
  10. package/dist/{chunk-4ODM3Y4O.js → chunk-6GOKZQDV.js} +2 -2
  11. package/dist/{chunk-QWQWWAWY.js → chunk-6Y4OSP3J.js} +36 -321
  12. package/dist/{chunk-QWQWWAWY.js.map → chunk-6Y4OSP3J.js.map} +3 -3
  13. package/dist/{chunk-GDBLHUCN.js → chunk-72SGZIMD.js} +3 -3
  14. package/dist/{chunk-UBPJRHFR.js → chunk-7FNDFUQH.js} +1 -1
  15. package/dist/{chunk-OQSN3267.js → chunk-A7VN6YXZ.js} +1 -1
  16. package/dist/{chunk-T65BVES2.js → chunk-AWML3QPK.js} +4 -4
  17. package/dist/{chunk-26VG3M2M.js → chunk-D3Q32IUW.js} +3 -3
  18. package/dist/{chunk-CGGTZGKD.js → chunk-DEQQW4H6.js} +3 -3
  19. package/dist/{chunk-G2M7GOGN.js → chunk-EXEPX5H2.js} +4 -4
  20. package/dist/{chunk-WFAQLNLO.js → chunk-GFDV6FUG.js} +3 -3
  21. package/dist/{chunk-MFG2FDIS.js → chunk-HFL2SOFQ.js} +1 -1
  22. package/dist/{chunk-43NXI3DK.js → chunk-I5H5PGD5.js} +36 -36
  23. package/dist/{chunk-43NXI3DK.js.map → chunk-I5H5PGD5.js.map} +1 -1
  24. package/dist/{chunk-XSCWKXBG.js → chunk-IQ3KORSP.js} +4 -4
  25. package/dist/{chunk-CORLDVAP.js → chunk-JF4AMPKU.js} +2 -2
  26. package/dist/{chunk-BIUZILAD.js → chunk-LZT5LZKG.js} +2 -2
  27. package/dist/{chunk-3SWMMKPJ.js → chunk-MCP52ZSD.js} +3 -9
  28. package/dist/{chunk-3SWMMKPJ.js.map → chunk-MCP52ZSD.js.map} +1 -1
  29. package/dist/{chunk-ITI2LLOZ.js → chunk-MLCISJKM.js} +3 -3
  30. package/dist/{chunk-ZSJFUCVZ.js → chunk-NZTVG7YS.js} +4 -4
  31. package/dist/{chunk-GJFEBAML.js → chunk-PSI4PJ2H.js} +1 -1
  32. package/dist/{chunk-PLCXOKAE.js → chunk-QW4VX3FW.js} +2 -2
  33. package/dist/{chunk-MRPC6G4Y.js → chunk-S2AJAM6R.js} +2 -2
  34. package/dist/{chunk-GVI5S5UP.js → chunk-SHIPHOMT.js} +1 -1
  35. package/dist/{chunk-6K5FVPGV.js → chunk-UUGWQSET.js} +1 -1
  36. package/dist/{chunk-FPGPMXBY.js → chunk-XHGUMYRL.js} +1 -1
  37. package/dist/{chunk-LRSON7AD.js → chunk-XZNXY65J.js} +1 -1
  38. package/dist/{chunk-TZXH2DAK.js → chunk-YFBIVUDT.js} +1 -1
  39. package/dist/{chunk-TZXH2DAK.js.map → chunk-YFBIVUDT.js.map} +1 -1
  40. package/dist/{cli-GZL6NYQC.js → cli-PCLH664O.js} +87 -87
  41. package/dist/commands-Y7GVRV66.js +51 -0
  42. package/dist/{config-S2HRIKN7.js → config-EBW7GI65.js} +4 -4
  43. package/dist/{context-VJ5K3EWH.js → context-4BILE3LL.js} +6 -6
  44. package/dist/{customCommands-MNHSHU35.js → customCommands-GDDHYRJR.js} +4 -4
  45. package/dist/{env-P6FBVAG4.js → env-7V57CD26.js} +2 -2
  46. package/dist/{file-N2DZCGEZ.js → file-3W4M7RXM.js} +4 -4
  47. package/dist/index.js +3 -3
  48. package/dist/{llm-B5NJCISU.js → llm-PIRKDSMO.js} +29 -29
  49. package/dist/{llmLazy-7HY6EBG6.js → llmLazy-HWKMKZ5M.js} +1 -1
  50. package/dist/{loader-U72TGUDO.js → loader-GYFX3MOO.js} +4 -4
  51. package/dist/{lsp-57NKMT4B.js → lsp-BDQVEVFK.js} +6 -6
  52. package/dist/{lspAnchor-JEKPUG57.js → lspAnchor-S45W3FAI.js} +6 -6
  53. package/dist/{mcp-RDPCEZDR.js → mcp-ZHLSRCM5.js} +7 -7
  54. package/dist/{mentionProcessor-OOREAFK4.js → mentionProcessor-GOS6BB64.js} +6 -6
  55. package/dist/{messages-GAAE6FRF.js → messages-AX4MWPK5.js} +1 -1
  56. package/dist/{model-7ZUGNUX3.js → model-QDQAUOQ6.js} +5 -5
  57. package/dist/{openai-Q6N3I7GI.js → openai-IBJPYBTX.js} +5 -5
  58. package/dist/{outputStyles-63XHWDAT.js → outputStyles-UNAE3KVB.js} +4 -4
  59. package/dist/{pluginRuntime-OUNJEEPV.js → pluginRuntime-QP6HTJ6Y.js} +6 -6
  60. package/dist/{pluginValidation-JYRL2VTM.js → pluginValidation-C66MGV4E.js} +6 -6
  61. package/dist/prompts-LNJ2SJQ7.js +53 -0
  62. package/dist/{pybAgentSessionLoad-HSAHNP72.js → pybAgentSessionLoad-GJQQFHVS.js} +4 -4
  63. package/dist/{pybAgentSessionResume-LCDPTAEM.js → pybAgentSessionResume-2ZNOOEVX.js} +4 -4
  64. package/dist/{pybAgentStreamJsonSession-SNBRAO6M.js → pybAgentStreamJsonSession-PE2K75QJ.js} +1 -1
  65. package/dist/{pybHooks-46JCSO72.js → pybHooks-22R4DOTT.js} +4 -4
  66. package/dist/query-2ZFLZTV6.js +55 -0
  67. package/dist/{registry-W6YB5RPP.js → registry-ES4KTNF7.js} +5 -5
  68. package/dist/{ripgrep-NIALNDWU.js → ripgrep-7BPG53S4.js} +3 -3
  69. package/dist/{skillMarketplace-VPNT5VWA.js → skillMarketplace-O5TAM4G6.js} +3 -3
  70. package/dist/{state-LFVIOJ3N.js → state-3OM3WWZ2.js} +2 -2
  71. package/dist/{theme-HPZPU3IQ.js → theme-7MFSQQ5Z.js} +5 -5
  72. package/dist/{toolPermissionSettings-CKJTOIF7.js → toolPermissionSettings-KKMWAVTJ.js} +6 -6
  73. package/dist/tools-ME4EX5CM.js +52 -0
  74. package/dist/{userInput-V5WLF65L.js → userInput-3BYMTC52.js} +30 -30
  75. package/package.json +1 -1
  76. package/dist/REPL-T5MR6VS3.js +0 -47
  77. package/dist/commands-BCPWPRKX.js +0 -51
  78. package/dist/prompts-Y6VJ5BJU.js +0 -53
  79. package/dist/query-7TOLIEE2.js +0 -55
  80. package/dist/tools-SBQHBSYH.js +0 -52
  81. /package/dist/{REPL-T5MR6VS3.js.map → REPL-PRQAXE32.js.map} +0 -0
  82. /package/dist/{acp-SF2NQMZG.js.map → acp-FGRNDOS5.js.map} +0 -0
  83. /package/dist/{agentsValidate-GLBXCFYZ.js.map → agentsValidate-7CRDPNQ6.js.map} +0 -0
  84. /package/dist/{ask-YBV7ODJM.js.map → ask-IR5W5M66.js.map} +0 -0
  85. /package/dist/{autoUpdater-VYKAJUSN.js.map → autoUpdater-MAEQZPST.js.map} +0 -0
  86. /package/dist/{chunk-RK3EJLZI.js.map → chunk-2U747SA5.js.map} +0 -0
  87. /package/dist/{chunk-YORDNUOL.js.map → chunk-3P2EGWMK.js.map} +0 -0
  88. /package/dist/{chunk-ONLKTCPY.js.map → chunk-4Z6CCSED.js.map} +0 -0
  89. /package/dist/{chunk-F5RAKG24.js.map → chunk-55QJI7OQ.js.map} +0 -0
  90. /package/dist/{chunk-4ODM3Y4O.js.map → chunk-6GOKZQDV.js.map} +0 -0
  91. /package/dist/{chunk-GDBLHUCN.js.map → chunk-72SGZIMD.js.map} +0 -0
  92. /package/dist/{chunk-UBPJRHFR.js.map → chunk-7FNDFUQH.js.map} +0 -0
  93. /package/dist/{chunk-OQSN3267.js.map → chunk-A7VN6YXZ.js.map} +0 -0
  94. /package/dist/{chunk-T65BVES2.js.map → chunk-AWML3QPK.js.map} +0 -0
  95. /package/dist/{chunk-26VG3M2M.js.map → chunk-D3Q32IUW.js.map} +0 -0
  96. /package/dist/{chunk-CGGTZGKD.js.map → chunk-DEQQW4H6.js.map} +0 -0
  97. /package/dist/{chunk-G2M7GOGN.js.map → chunk-EXEPX5H2.js.map} +0 -0
  98. /package/dist/{chunk-WFAQLNLO.js.map → chunk-GFDV6FUG.js.map} +0 -0
  99. /package/dist/{chunk-MFG2FDIS.js.map → chunk-HFL2SOFQ.js.map} +0 -0
  100. /package/dist/{chunk-XSCWKXBG.js.map → chunk-IQ3KORSP.js.map} +0 -0
  101. /package/dist/{chunk-CORLDVAP.js.map → chunk-JF4AMPKU.js.map} +0 -0
  102. /package/dist/{chunk-BIUZILAD.js.map → chunk-LZT5LZKG.js.map} +0 -0
  103. /package/dist/{chunk-ITI2LLOZ.js.map → chunk-MLCISJKM.js.map} +0 -0
  104. /package/dist/{chunk-ZSJFUCVZ.js.map → chunk-NZTVG7YS.js.map} +0 -0
  105. /package/dist/{chunk-GJFEBAML.js.map → chunk-PSI4PJ2H.js.map} +0 -0
  106. /package/dist/{chunk-PLCXOKAE.js.map → chunk-QW4VX3FW.js.map} +0 -0
  107. /package/dist/{chunk-MRPC6G4Y.js.map → chunk-S2AJAM6R.js.map} +0 -0
  108. /package/dist/{chunk-GVI5S5UP.js.map → chunk-SHIPHOMT.js.map} +0 -0
  109. /package/dist/{chunk-6K5FVPGV.js.map → chunk-UUGWQSET.js.map} +0 -0
  110. /package/dist/{chunk-FPGPMXBY.js.map → chunk-XHGUMYRL.js.map} +0 -0
  111. /package/dist/{chunk-LRSON7AD.js.map → chunk-XZNXY65J.js.map} +0 -0
  112. /package/dist/{cli-GZL6NYQC.js.map → cli-PCLH664O.js.map} +0 -0
  113. /package/dist/{commands-BCPWPRKX.js.map → commands-Y7GVRV66.js.map} +0 -0
  114. /package/dist/{config-S2HRIKN7.js.map → config-EBW7GI65.js.map} +0 -0
  115. /package/dist/{context-VJ5K3EWH.js.map → context-4BILE3LL.js.map} +0 -0
  116. /package/dist/{customCommands-MNHSHU35.js.map → customCommands-GDDHYRJR.js.map} +0 -0
  117. /package/dist/{env-P6FBVAG4.js.map → env-7V57CD26.js.map} +0 -0
  118. /package/dist/{file-N2DZCGEZ.js.map → file-3W4M7RXM.js.map} +0 -0
  119. /package/dist/{llm-B5NJCISU.js.map → llm-PIRKDSMO.js.map} +0 -0
  120. /package/dist/{llmLazy-7HY6EBG6.js.map → llmLazy-HWKMKZ5M.js.map} +0 -0
  121. /package/dist/{loader-U72TGUDO.js.map → loader-GYFX3MOO.js.map} +0 -0
  122. /package/dist/{lsp-57NKMT4B.js.map → lsp-BDQVEVFK.js.map} +0 -0
  123. /package/dist/{lspAnchor-JEKPUG57.js.map → lspAnchor-S45W3FAI.js.map} +0 -0
  124. /package/dist/{mcp-RDPCEZDR.js.map → mcp-ZHLSRCM5.js.map} +0 -0
  125. /package/dist/{mentionProcessor-OOREAFK4.js.map → mentionProcessor-GOS6BB64.js.map} +0 -0
  126. /package/dist/{messages-GAAE6FRF.js.map → messages-AX4MWPK5.js.map} +0 -0
  127. /package/dist/{model-7ZUGNUX3.js.map → model-QDQAUOQ6.js.map} +0 -0
  128. /package/dist/{openai-Q6N3I7GI.js.map → openai-IBJPYBTX.js.map} +0 -0
  129. /package/dist/{outputStyles-63XHWDAT.js.map → outputStyles-UNAE3KVB.js.map} +0 -0
  130. /package/dist/{pluginRuntime-OUNJEEPV.js.map → pluginRuntime-QP6HTJ6Y.js.map} +0 -0
  131. /package/dist/{pluginValidation-JYRL2VTM.js.map → pluginValidation-C66MGV4E.js.map} +0 -0
  132. /package/dist/{prompts-Y6VJ5BJU.js.map → prompts-LNJ2SJQ7.js.map} +0 -0
  133. /package/dist/{pybAgentSessionLoad-HSAHNP72.js.map → pybAgentSessionLoad-GJQQFHVS.js.map} +0 -0
  134. /package/dist/{pybAgentSessionResume-LCDPTAEM.js.map → pybAgentSessionResume-2ZNOOEVX.js.map} +0 -0
  135. /package/dist/{pybAgentStreamJsonSession-SNBRAO6M.js.map → pybAgentStreamJsonSession-PE2K75QJ.js.map} +0 -0
  136. /package/dist/{pybHooks-46JCSO72.js.map → pybHooks-22R4DOTT.js.map} +0 -0
  137. /package/dist/{query-7TOLIEE2.js.map → query-2ZFLZTV6.js.map} +0 -0
  138. /package/dist/{registry-W6YB5RPP.js.map → registry-ES4KTNF7.js.map} +0 -0
  139. /package/dist/{ripgrep-NIALNDWU.js.map → ripgrep-7BPG53S4.js.map} +0 -0
  140. /package/dist/{skillMarketplace-VPNT5VWA.js.map → skillMarketplace-O5TAM4G6.js.map} +0 -0
  141. /package/dist/{state-LFVIOJ3N.js.map → state-3OM3WWZ2.js.map} +0 -0
  142. /package/dist/{theme-HPZPU3IQ.js.map → theme-7MFSQQ5Z.js.map} +0 -0
  143. /package/dist/{toolPermissionSettings-CKJTOIF7.js.map → toolPermissionSettings-KKMWAVTJ.js.map} +0 -0
  144. /package/dist/{tools-SBQHBSYH.js.map → tools-ME4EX5CM.js.map} +0 -0
  145. /package/dist/{userInput-V5WLF65L.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-43NXI3DK.js";
32
+ } from "./chunk-I5H5PGD5.js";
33
33
  import {
34
34
  queryLLM
35
- } from "./chunk-G2M7GOGN.js";
35
+ } from "./chunk-EXEPX5H2.js";
36
36
  import {
37
37
  FallbackToolUseRejectedMessage,
38
38
  MCPTool,
39
39
  getClients,
40
40
  getMCPTools
41
- } from "./chunk-T65BVES2.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-3SWMMKPJ.js";
51
+ } from "./chunk-MCP52ZSD.js";
53
52
  import {
54
53
  getActiveAgents,
55
54
  getAgentByType,
56
55
  getAvailableAgentTypes
57
- } from "./chunk-BIUZILAD.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-GVI5S5UP.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-PLCXOKAE.js";
69
+ } from "./chunk-QW4VX3FW.js";
71
70
  import {
72
71
  LspFacade,
73
72
  formatDiagnosticsPretty
74
- } from "./chunk-XSCWKXBG.js";
73
+ } from "./chunk-IQ3KORSP.js";
75
74
  import {
76
75
  getModelManager
77
- } from "./chunk-WFAQLNLO.js";
76
+ } from "./chunk-GFDV6FUG.js";
78
77
  import {
79
78
  getContext
80
- } from "./chunk-ZSJFUCVZ.js";
79
+ } from "./chunk-NZTVG7YS.js";
81
80
  import {
82
81
  filesToTree,
83
82
  ripGrepWithStatus
84
- } from "./chunk-LRSON7AD.js";
83
+ } from "./chunk-XZNXY65J.js";
85
84
  import {
86
85
  getTheme
87
- } from "./chunk-F5RAKG24.js";
86
+ } from "./chunk-55QJI7OQ.js";
88
87
  import {
89
88
  debug
90
- } from "./chunk-FPGPMXBY.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-6K5FVPGV.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-LFVIOJ3N.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-57NKMT4B.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.
@@ -3078,35 +3076,17 @@ NOTE that you should not use this tool if you are only updating status or detail
3078
3076
  ## Field Guidance
3079
3077
  - subject: concise task name that reads like a goal.
3080
3078
  - activeForm: short verb phrase that describes the in-progress action, not a full sentence.
3081
- - description: prefer a one-line overview plus bullet points for multi-step tasks; for very simple tasks a short sentence is fine.
3079
+ - description: prefer a one-line overview that introduces the bullets with "Including:" plus bullet points for multi-step tasks; for very simple tasks a short sentence is fine.
3082
3080
 
3083
3081
  Preferred single-task template:
3084
3082
  {
3085
- "subject": "Schema migration plan",
3086
- "description": "Define the migration scope and sequencing.
3087
- - List impacted tables
3088
- - Identify backfill steps
3089
- - Note rollback plan",
3090
- "activeForm": "Planning schema migration"
3091
- }
3092
-
3093
- ## Batch Input Notes
3094
- - Use tasks: [...] to create multiple tasks in one call.
3095
- - Do not mix tasks with single-task fields like subject/description.
3096
- - Auto dependency chaining only applies to batch creation when enabled and blockedBy is omitted.
3097
- Batch example (auto chain enabled, blockedBy omitted):
3098
- {
3099
- "tasks": [
3100
- { "subject": "Design schema", "activeForm": "Designing schema" },
3101
- { "subject": "Implement API", "activeForm": "Implementing API" }
3102
- ]
3103
- }
3104
- Batch example (explicit blockedBy, no override):
3105
- {
3106
- "tasks": [
3107
- { "subject": "Migrate data", "activeForm": "Migrating data" },
3108
- { "subject": "Backfill indexes", "activeForm": "Backfilling indexes", "blockedBy": ["1"] }
3109
- ]
3083
+ "subject": "Requirements clarification and scope definition",
3084
+ "description": "Clarify the business goals, functional scope, and technical boundaries. Including:
3085
+ - Confirm supported languages
3086
+ - Define summary output format and quality bar
3087
+ - Specify performance targets (latency, throughput)
3088
+ - Identify stakeholders and acceptance criteria",
3089
+ "activeForm": "Clarifying requirements and defining scope"
3110
3090
  }
3111
3091
 
3112
3092
  ## Status Notes
@@ -3116,7 +3096,7 @@ Batch example (explicit blockedBy, no override):
3116
3096
 
3117
3097
  <example>
3118
3098
  User: I need to implement user registration, product catalog, and checkout.
3119
- Assistant: I will create tasks for each feature.
3099
+ Assistant: I will create tasks for each feature one by one.
3120
3100
  *Creates tasks:*
3121
3101
  1. User registration
3122
3102
  2. Product catalog
@@ -3134,22 +3114,8 @@ Assistant: I'll seed tasks for the refactor and verification steps.
3134
3114
 
3135
3115
  <example>
3136
3116
  User: The API task depends on database schema changes.
3137
- Assistant: I'll create tasks with dependencies.
3138
- *Creates tasks:*
3139
- 1. Update database schema
3140
- 2. Implement API endpoints (blockedBy: schema task)
3141
- </example>
3142
-
3143
- <example>
3144
- User: Create a two-step plan in one call.
3145
- Assistant: I'll create tasks in batch with a dependency chain.
3146
- *Creates tasks with tasks array, where the second task is blockedBy the first*
3147
- </example>
3148
-
3149
- <example>
3150
- User: Create three tasks at once, but I will specify blockedBy myself.
3151
- Assistant: I'll create tasks in batch and keep your blockedBy values.
3152
- *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*
3153
3119
  </example>
3154
3120
 
3155
3121
  <example>
@@ -3166,22 +3132,16 @@ Assistant: I'll create a single task.
3166
3132
  `;
3167
3133
 
3168
3134
  // src/tools/interaction/TaskCreateTool/TaskCreateTool.tsx
3169
- var shouldAutoChainDependencies = () => {
3170
- const value = process.env.PYB_TASK_AUTOCHAIN?.toLowerCase();
3171
- return value === "true" || value === "1";
3172
- };
3173
- var getMissingBlockedBy = (blockedBy, ids) => (blockedBy ?? []).filter((id) => !ids.has(id));
3174
- var taskInputSchema = z9.strictObject({
3135
+ var inputSchema9 = z9.strictObject({
3136
+ listId: z9.string().optional(),
3175
3137
  subject: z9.string().min(1),
3176
3138
  description: z9.string().optional(),
3177
- activeForm: z9.string().min(1),
3139
+ activeForm: z9.string({ required_error: "activeForm is required" }).min(1),
3178
3140
  status: z9.enum(["pending", "in_progress", "blocked", "done", "archived"]).optional(),
3179
3141
  tags: z9.array(z9.string()).optional(),
3180
3142
  assignee: z9.string().optional(),
3181
3143
  metadata: z9.record(z9.string()).optional(),
3182
3144
  archived: z9.boolean().optional(),
3183
- blocks: z9.array(z9.string()).optional(),
3184
- blockedBy: z9.array(z9.string()).optional(),
3185
3145
  parent: z9.string().optional(),
3186
3146
  related: z9.array(z9.string()).optional(),
3187
3147
  legacyTodoId: z9.string().optional()
@@ -3193,79 +3153,6 @@ var taskInputSchema = z9.strictObject({
3193
3153
  });
3194
3154
  }
3195
3155
  });
3196
- var inputSchema9 = z9.strictObject({
3197
- listId: z9.string().optional(),
3198
- tasks: z9.array(taskInputSchema).min(1).optional(),
3199
- subject: z9.string().min(1).optional(),
3200
- description: z9.string().optional(),
3201
- activeForm: z9.string().optional(),
3202
- status: z9.enum(["pending", "in_progress", "blocked", "done", "archived"]).optional(),
3203
- tags: z9.array(z9.string()).optional(),
3204
- assignee: z9.string().optional(),
3205
- metadata: z9.record(z9.string()).optional(),
3206
- archived: z9.boolean().optional(),
3207
- blocks: z9.array(z9.string()).optional(),
3208
- blockedBy: z9.array(z9.string()).optional(),
3209
- parent: z9.string().optional(),
3210
- related: z9.array(z9.string()).optional(),
3211
- legacyTodoId: z9.string().optional()
3212
- }).superRefine((value, ctx) => {
3213
- const hasTasks = Array.isArray(value.tasks);
3214
- const hasSubject = typeof value.subject === "string" && value.subject.length > 0;
3215
- if (hasTasks && hasSubject) {
3216
- ctx.addIssue({
3217
- code: z9.ZodIssueCode.custom,
3218
- message: "Use either tasks or subject, not both"
3219
- });
3220
- return;
3221
- }
3222
- if (!hasTasks && !hasSubject) {
3223
- ctx.addIssue({
3224
- code: z9.ZodIssueCode.custom,
3225
- message: "Either tasks or subject is required"
3226
- });
3227
- return;
3228
- }
3229
- if (hasTasks) {
3230
- const singleKeys = [
3231
- "subject",
3232
- "description",
3233
- "activeForm",
3234
- "status",
3235
- "tags",
3236
- "assignee",
3237
- "metadata",
3238
- "archived",
3239
- "blocks",
3240
- "blockedBy",
3241
- "parent",
3242
- "related",
3243
- "legacyTodoId"
3244
- ];
3245
- const hasSingleFields = singleKeys.some((key) => value[key] !== void 0);
3246
- if (hasSingleFields) {
3247
- ctx.addIssue({
3248
- code: z9.ZodIssueCode.custom,
3249
- message: "Do not mix batch tasks with single-task fields"
3250
- });
3251
- }
3252
- }
3253
- if (hasSubject) {
3254
- if (!value.activeForm || value.activeForm.length === 0) {
3255
- ctx.addIssue({
3256
- code: z9.ZodIssueCode.custom,
3257
- message: "activeForm is required"
3258
- });
3259
- return;
3260
- }
3261
- if (value.activeForm === value.subject) {
3262
- ctx.addIssue({
3263
- code: z9.ZodIssueCode.custom,
3264
- message: "activeForm \u4E0D\u5F97\u4E0E subject \u76F8\u540C"
3265
- });
3266
- }
3267
- }
3268
- });
3269
3156
  var TaskCreateTool = {
3270
3157
  name: "TaskCreate",
3271
3158
  cachedDescription: DESCRIPTION6,
@@ -3305,178 +3192,7 @@ var TaskCreateTool = {
3305
3192
  },
3306
3193
  async *call(input) {
3307
3194
  try {
3308
- const tasks = listTasks({ listId: input.listId });
3309
- if (input.tasks) {
3310
- const autoChain = shouldAutoChainDependencies();
3311
- const startId = getTaskNextId({ listId: input.listId });
3312
- const now2 = Date.now();
3313
- const candidateTasks2 = [...tasks];
3314
- const candidateBatch = input.tasks.map((entry, index) => {
3315
- const autoBlockedBy = entry.blockedBy === void 0 && autoChain && input.tasks.length > 1 && index > 0 ? [String(startId + index - 1)] : entry.blockedBy;
3316
- const candidate = {
3317
- id: String(startId + index),
3318
- subject: entry.subject,
3319
- description: entry.description,
3320
- activeForm: entry.activeForm,
3321
- status: entry.status ?? "pending",
3322
- tags: entry.tags,
3323
- assignee: entry.assignee,
3324
- metadata: entry.metadata,
3325
- archived: entry.archived,
3326
- blocks: [],
3327
- blockedBy: autoBlockedBy,
3328
- parent: entry.parent,
3329
- related: entry.related,
3330
- createdAt: now2,
3331
- updatedAt: now2,
3332
- baseVersion: 1,
3333
- version: 1,
3334
- legacyTodoId: entry.legacyTodoId
3335
- };
3336
- candidateTasks2.push(candidate);
3337
- return candidate;
3338
- });
3339
- const { listId: listId2 } = getTaskListPaths(input.listId);
3340
- for (let index = 0; index < candidateBatch.length; index += 1) {
3341
- if (candidateBatch.length > 1 && index > 0 && (candidateBatch[index].blockedBy?.length ?? 0) === 0) {
3342
- emitReminderEvent("task.dependency_chain_missing", {
3343
- listId: listId2,
3344
- taskId: candidateBatch[index].id,
3345
- blockedBy: candidateBatch[index].blockedBy ?? [],
3346
- timestamp: Date.now()
3347
- });
3348
- }
3349
- }
3350
- const candidateIds2 = new Set(candidateTasks2.map((task2) => task2.id));
3351
- for (const task2 of candidateBatch) {
3352
- const missing2 = getMissingBlockedBy(task2.blockedBy, candidateIds2);
3353
- if (missing2.length > 0) {
3354
- yield {
3355
- type: "result",
3356
- data: createTaskToolError({
3357
- type: "validation",
3358
- code: "TASK_BLOCKEDBY_NOT_FOUND",
3359
- message: "BlockedBy tasks must exist in the same list",
3360
- details: { taskId: task2.id, listId: listId2, missingBlockedBy: missing2 }
3361
- })
3362
- };
3363
- return;
3364
- }
3365
- }
3366
- const cycles2 = findTaskCycles(buildTaskGraph(candidateTasks2));
3367
- if (cycles2.length > 0) {
3368
- yield {
3369
- type: "result",
3370
- data: createTaskToolError({
3371
- type: "validation",
3372
- code: "TASK_CYCLE_DETECTED",
3373
- message: "Task dependency cycle detected",
3374
- details: { cycles: cycles2 }
3375
- })
3376
- };
3377
- return;
3378
- }
3379
- const createdItems = [];
3380
- for (let index = 0; index < input.tasks.length; index += 1) {
3381
- const entry = input.tasks[index];
3382
- const task2 = createTask(
3383
- {
3384
- subject: entry.subject,
3385
- description: entry.description,
3386
- activeForm: entry.activeForm,
3387
- status: entry.status,
3388
- tags: entry.tags,
3389
- assignee: entry.assignee,
3390
- metadata: entry.metadata,
3391
- archived: entry.archived,
3392
- blockedBy: candidateBatch[index].blockedBy,
3393
- parent: entry.parent,
3394
- related: entry.related,
3395
- legacyTodoId: entry.legacyTodoId
3396
- },
3397
- { listId: input.listId }
3398
- );
3399
- emitReminderEvent("task.created", {
3400
- listId: listId2,
3401
- taskId: task2.id,
3402
- task: task2,
3403
- timestamp: Date.now()
3404
- });
3405
- createdItems.push(toTaskDetail(task2));
3406
- }
3407
- yield {
3408
- type: "result",
3409
- data: {
3410
- listId: listId2,
3411
- items: createdItems
3412
- }
3413
- };
3414
- return;
3415
- }
3416
3195
  const subject = input.subject;
3417
- const nextId = Math.max(
3418
- 0,
3419
- ...tasks.map((task2) => Number(task2.id)).filter((value) => !Number.isNaN(value))
3420
- ) + 1;
3421
- const now = Date.now();
3422
- const candidateTask = {
3423
- id: String(nextId),
3424
- subject,
3425
- description: input.description,
3426
- activeForm: input.activeForm,
3427
- status: input.status ?? "pending",
3428
- tags: input.tags,
3429
- assignee: input.assignee,
3430
- metadata: input.metadata,
3431
- archived: input.archived,
3432
- blocks: [],
3433
- blockedBy: input.blockedBy,
3434
- parent: input.parent,
3435
- related: input.related,
3436
- createdAt: now,
3437
- updatedAt: now,
3438
- baseVersion: 1,
3439
- version: 1,
3440
- legacyTodoId: input.legacyTodoId
3441
- };
3442
- if (tasks.length > 0 && (input.blockedBy?.length ?? 0) === 0) {
3443
- const { listId: listId2 } = getTaskListPaths(input.listId);
3444
- emitReminderEvent("task.dependency_chain_missing", {
3445
- listId: listId2,
3446
- taskId: candidateTask.id,
3447
- blockedBy: candidateTask.blockedBy ?? [],
3448
- timestamp: Date.now()
3449
- });
3450
- }
3451
- const candidateTasks = [...tasks, candidateTask];
3452
- const candidateIds = new Set(candidateTasks.map((task2) => task2.id));
3453
- const missing = getMissingBlockedBy(candidateTask.blockedBy, candidateIds);
3454
- if (missing.length > 0) {
3455
- const { listId: listId2 } = getTaskListPaths(input.listId);
3456
- yield {
3457
- type: "result",
3458
- data: createTaskToolError({
3459
- type: "validation",
3460
- code: "TASK_BLOCKEDBY_NOT_FOUND",
3461
- message: "BlockedBy tasks must exist in the same list",
3462
- details: { taskId: candidateTask.id, listId: listId2, missingBlockedBy: missing }
3463
- })
3464
- };
3465
- return;
3466
- }
3467
- const cycles = findTaskCycles(buildTaskGraph(candidateTasks));
3468
- if (cycles.length > 0) {
3469
- yield {
3470
- type: "result",
3471
- data: createTaskToolError({
3472
- type: "validation",
3473
- code: "TASK_CYCLE_DETECTED",
3474
- message: "Task dependency cycle detected",
3475
- details: { cycles }
3476
- })
3477
- };
3478
- return;
3479
- }
3480
3196
  const task = createTask(
3481
3197
  {
3482
3198
  subject,
@@ -3487,7 +3203,6 @@ var TaskCreateTool = {
3487
3203
  assignee: input.assignee,
3488
3204
  metadata: input.metadata,
3489
3205
  archived: input.archived,
3490
- blockedBy: input.blockedBy,
3491
3206
  parent: input.parent,
3492
3207
  related: input.related,
3493
3208
  legacyTodoId: input.legacyTodoId
@@ -3845,7 +3560,7 @@ var getDepsSnapshot = (task) => ({
3845
3560
  parent: task.parent,
3846
3561
  related: task.related ?? []
3847
3562
  });
3848
- var getMissingBlockedBy2 = (blockedBy, ids) => (blockedBy ?? []).filter((id) => !ids.has(id));
3563
+ var getMissingBlockedBy = (blockedBy, ids) => (blockedBy ?? []).filter((id) => !ids.has(id));
3849
3564
  var isPlanFinalized = (metadata) => metadata?.planFinalized === "true";
3850
3565
  var compareTaskId = (left, right) => {
3851
3566
  const leftValue = Number(left.id);
@@ -3960,7 +3675,7 @@ var TaskUpdateTool = {
3960
3675
  });
3961
3676
  }
3962
3677
  if (input.blockedBy) {
3963
- const missing = getMissingBlockedBy2(updatedTask.blockedBy, candidateIds);
3678
+ const missing = getMissingBlockedBy(updatedTask.blockedBy, candidateIds);
3964
3679
  if (missing.length > 0) {
3965
3680
  yield {
3966
3681
  type: "result",
@@ -3993,7 +3708,7 @@ var TaskUpdateTool = {
3993
3708
  const ordered = [...activeTasks].sort(compareTaskId);
3994
3709
  const firstTaskId = ordered[0]?.id;
3995
3710
  for (const task of activeTasks) {
3996
- const missing = getMissingBlockedBy2(task.blockedBy, candidateIds);
3711
+ const missing = getMissingBlockedBy(task.blockedBy, candidateIds);
3997
3712
  if (missing.length > 0) {
3998
3713
  yield {
3999
3714
  type: "result",