@mmmbuto/qwen-code-termux 0.16.1-termux → 0.18.0-termux

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 (185) hide show
  1. package/README.md +79 -109
  2. package/bundled/new-app/SKILL.md +22 -0
  3. package/bundled/qc-helper/SKILL.md +29 -24
  4. package/bundled/qc-helper/docs/_meta.ts +1 -0
  5. package/bundled/qc-helper/docs/configuration/_meta.ts +0 -3
  6. package/bundled/qc-helper/docs/configuration/settings.md +37 -31
  7. package/bundled/qc-helper/docs/configuration/themes.md +39 -0
  8. package/bundled/qc-helper/docs/features/_meta.ts +1 -3
  9. package/bundled/qc-helper/docs/features/approval-mode.md +35 -35
  10. package/bundled/qc-helper/docs/features/auto-mode.md +54 -9
  11. package/bundled/qc-helper/docs/features/channels/_meta.ts +1 -0
  12. package/bundled/qc-helper/docs/features/channels/feishu.md +170 -0
  13. package/bundled/qc-helper/docs/features/commands.md +115 -35
  14. package/bundled/qc-helper/docs/features/followup-suggestions.md +2 -2
  15. package/bundled/qc-helper/docs/features/headless.md +32 -0
  16. package/bundled/qc-helper/docs/features/markdown-rendering.md +21 -1
  17. package/bundled/qc-helper/docs/features/memory.md +22 -5
  18. package/bundled/qc-helper/docs/features/scheduled-tasks.md +1 -1
  19. package/bundled/qc-helper/docs/features/status-line.md +168 -32
  20. package/bundled/qc-helper/docs/features/sub-agents.md +60 -0
  21. package/bundled/qc-helper/docs/features/worktree.md +345 -0
  22. package/bundled/qc-helper/docs/overview.md +4 -4
  23. package/bundled/qc-helper/docs/quickstart.md +4 -4
  24. package/bundled/qc-helper/docs/qwen-serve-deploy-local.md +221 -0
  25. package/bundled/qc-helper/docs/qwen-serve.md +234 -24
  26. package/bundled/qc-helper/docs/reference/keyboard-shortcuts.md +16 -0
  27. package/bundled/qc-helper/docs/support/Uninstall.md +19 -1
  28. package/bundled/qc-helper/docs/support/troubleshooting.md +2 -1
  29. package/bundled/simplify/SKILL.md +123 -0
  30. package/chunks/agent-IDS4HMOX.js +56 -0
  31. package/chunks/agent-headless-5Q2EUSPS.js +50 -0
  32. package/chunks/{anthropicContentGenerator-SSGKR6DO.js → anthropicContentGenerator-2HBRNQ3B.js} +52 -9
  33. package/chunks/{askUserQuestion-PJWUUXKN.js → askUserQuestion-75TDJVK2.js} +45 -3
  34. package/chunks/{ca-UZ7BANMN.js → ca-BARBRL6N.js} +89 -5
  35. package/chunks/{chunk-GGNTZ2NH.js → chunk-2Y5SYSD3.js} +368 -597
  36. package/chunks/{chunk-2LA2TREA.js → chunk-3AA2DK35.js} +1448 -207
  37. package/chunks/{chunk-I2V5WXHJ.js → chunk-3AUHFMSK.js} +80 -38
  38. package/chunks/chunk-3DHXZ6EV.js +241 -0
  39. package/chunks/{chunk-PR4T27R7.js → chunk-3HTIVKZE.js} +42 -8
  40. package/chunks/chunk-3HX5LZ6R.js +1798 -0
  41. package/chunks/chunk-3PJXIDKI.js +2517 -0
  42. package/chunks/{chunk-MYAKAFEC.js → chunk-55ZMG67I.js} +7451 -3517
  43. package/chunks/{chunk-66CXYE4B.js → chunk-5IFG2VC4.js} +293 -242
  44. package/chunks/chunk-64WXLC72.js +98 -0
  45. package/chunks/{chunk-C6WMLUNB.js → chunk-72LDN5PP.js} +1 -1
  46. package/chunks/{chunk-F23NCRJ2.js → chunk-A7B4ISQP.js} +1 -1
  47. package/chunks/chunk-B7HXHOHU.js +393 -0
  48. package/chunks/{chunk-XEGHDASV.js → chunk-D3RHSPAS.js} +435 -540
  49. package/chunks/{chunk-XKS5KBFJ.js → chunk-EYENRK4D.js} +694 -384
  50. package/chunks/chunk-H6BD2ELD.js +36 -0
  51. package/chunks/{chunk-XP27SJMH.js → chunk-HR7SV7AY.js} +79 -48
  52. package/chunks/{chunk-D5NTAHYL.js → chunk-IDX6COTE.js} +7 -2
  53. package/chunks/{chunk-SHT4VJWU.js → chunk-IWKSG2AR.js} +2 -2
  54. package/chunks/chunk-J37FGIOA.js +1623 -0
  55. package/chunks/chunk-J5MDQKJL.js +2230 -0
  56. package/chunks/{chunk-USE2VQ5P.js → chunk-JTQAQBTV.js} +21 -0
  57. package/chunks/{chunk-NCTLV2NB.js → chunk-KQJMQJPI.js} +1 -1
  58. package/chunks/{chunk-5FBA5XC2.js → chunk-KRIHGKNA.js} +1 -1
  59. package/chunks/chunk-LD2XBG6Z.js +102 -0
  60. package/chunks/{chunk-MAY32HXD.js → chunk-M6VTDSVR.js} +3 -1
  61. package/chunks/chunk-MRO43B25.js +30 -0
  62. package/chunks/{chunk-N4WOREMD.js → chunk-NVFMZBX2.js} +43 -3
  63. package/chunks/chunk-OHEGWO4L.js +264 -0
  64. package/chunks/{chunk-K6O2NBMF.js → chunk-OQ7NJIY7.js} +4604 -6397
  65. package/chunks/chunk-QQDPRDVW.js +25 -0
  66. package/chunks/{chunk-KXZ4TJB4.js → chunk-SEGYWKIH.js} +1 -1
  67. package/chunks/chunk-SKBPNJEW.js +45 -0
  68. package/chunks/{chunk-4AOCVI6J.js → chunk-SNGELLWX.js} +52 -6
  69. package/chunks/{chunk-3OCRHZA3.js → chunk-TD4OPI4T.js} +56742 -44104
  70. package/chunks/{chunk-DQ4QTG7E.js → chunk-VV4F63BD.js} +11 -11
  71. package/chunks/chunk-XBY7E2FX.js +605 -0
  72. package/chunks/{chunk-JKMBWLFB.js → chunk-YILFYI5W.js} +48 -26
  73. package/chunks/chunk-YOGAOMYB.js +159 -0
  74. package/chunks/{chunk-QWSRH265.js → chunk-Z2Z3GUXZ.js} +777 -776
  75. package/chunks/{chunk-SDHRQFOS.js → chunk-ZTZ4DDQE.js} +2 -2
  76. package/chunks/computer-use-W2TYQNEE.js +825 -0
  77. package/chunks/contextCommand-6FGX3A7J.js +52 -0
  78. package/chunks/{cron-create-3ZBBN7WB.js → cron-create-APL5LU6I.js} +3 -3
  79. package/chunks/{cron-delete-NAGKKIIG.js → cron-delete-4SBJSCN4.js} +3 -3
  80. package/chunks/{cron-list-PAGRXNAI.js → cron-list-2AMGOMVO.js} +3 -3
  81. package/chunks/{de-V4IE2OOZ.js → de-YGKK2BC4.js} +89 -5
  82. package/chunks/{devtools-TWVXEJQB.js → devtools-FM6GJPYG.js} +2 -1
  83. package/chunks/{dist-4L54HRX2.js → dist-4LXD6L6X.js} +24 -5
  84. package/chunks/dist-H6ONXVLG.js +94146 -0
  85. package/chunks/{dist-XKWIWPWQ.js → dist-KAZ3SEBX.js} +1083 -3856
  86. package/chunks/{dist-BXDUQ2QY.js → dist-PK7DFCAW.js} +1 -1
  87. package/chunks/{edit-NVO3FOAK.js → edit-ZCEZC264.js} +30 -22
  88. package/chunks/{en-HGJ2SPLM.js → en-DHGYHIHX.js} +127 -6
  89. package/chunks/{enter-worktree-UEBG4WFC.js → enter-worktree-BBHCFCHG.js} +30 -20
  90. package/chunks/enterPlanMode-3M6KTD3B.js +158 -0
  91. package/chunks/{exit-worktree-UZ3MAQZN.js → exit-worktree-73YPIEQO.js} +27 -19
  92. package/chunks/exitPlanMode-TYZM6BAE.js +703 -0
  93. package/chunks/{fr-CJULI7ZX.js → fr-JXBKPJKQ.js} +89 -5
  94. package/chunks/{geminiContentGenerator-3UZFXGNT.js → geminiContentGenerator-7N2V3VW2.js} +8 -6
  95. package/chunks/{getMachineId-bsd-JXOSIJV2.js → getMachineId-bsd-4CASPIU4.js} +4 -4
  96. package/chunks/{getMachineId-darwin-TE4QRR42.js → getMachineId-darwin-HPQPEMZR.js} +4 -4
  97. package/chunks/{getMachineId-linux-S3OL52XK.js → getMachineId-linux-AUARKYHL.js} +3 -3
  98. package/chunks/{getMachineId-unsupported-DWUSBAPX.js → getMachineId-unsupported-S32ZDA2T.js} +3 -3
  99. package/chunks/{getMachineId-win-AAC5P3AP.js → getMachineId-win-4EFLHYIJ.js} +4 -4
  100. package/chunks/{glob-KNHSFFFG.js → glob-5XBCPQ2A.js} +27 -19
  101. package/chunks/{grep-LACWDZW4.js → grep-VIUU3A7X.js} +30 -19
  102. package/chunks/{ja-L7CHRQEW.js → ja-TGPZSP2B.js} +89 -5
  103. package/chunks/{keychain-token-storage-335UOLJ6.js → keychain-token-storage-6IU6ORQN.js} +3 -3
  104. package/chunks/{ls-AGXQOKSG.js → ls-JRGYIGLY.js} +4 -4
  105. package/chunks/{lsp-UDMUHNPA.js → lsp-SHMKFOAC.js} +3 -3
  106. package/chunks/{monitor-ETKWPJEH.js → monitor-6R4LIJL5.js} +40 -25
  107. package/chunks/{multipart-parser-3QWGTLK3.js → multipart-parser-AJ4WASWR.js} +2 -2
  108. package/chunks/{notebook-edit-QJJLPNYT.js → notebook-edit-5E7ULDVQ.js} +28 -20
  109. package/chunks/{openaiContentGenerator-CNNN424U.js → openaiContentGenerator-ZVHFKM3O.js} +17 -14
  110. package/chunks/{pt-M6JULLEQ.js → pt-TIBG6BIO.js} +89 -5
  111. package/chunks/{qwenContentGenerator-BOLCGK3R.js → qwenContentGenerator-B2VTVSPJ.js} +31 -23
  112. package/chunks/{qwenOAuth2-EEJGROP7.js → qwenOAuth2-2KCKWDCF.js} +6 -4
  113. package/chunks/read-file-GIT7BCDR.js +27 -0
  114. package/chunks/ripGrep-MWKFVYMS.js +48 -0
  115. package/chunks/{ru-QILM4HBC.js → ru-JBCHCK4L.js} +89 -5
  116. package/chunks/scheduler-5VOOYGBH.js +308 -0
  117. package/chunks/send-message-4QNWQJF4.js +244 -0
  118. package/chunks/{serve-OLSI7WSR.js → serve-MN6HZBWN.js} +14262 -7414
  119. package/chunks/shell-NQZQGFM2.js +56 -0
  120. package/chunks/{skill-D6YRHTTI.js → skill-WCFW4644.js} +145 -119
  121. package/chunks/{src-TMOD5X6F.js → src-7XL4G4DC.js} +88 -46
  122. package/chunks/{src-4QH4FZ6I.js → src-IHA6DTUV.js} +452 -62
  123. package/chunks/{syntheticOutput-5PVFDDJ4.js → syntheticOutput-YTYS2ZMQ.js} +4 -4
  124. package/chunks/task-create-MPORPYN6.js +19 -0
  125. package/chunks/task-list-R2YDYPZT.js +151 -0
  126. package/chunks/{task-stop-AJKPSR6R.js → task-stop-SYWJYBCM.js} +3 -3
  127. package/chunks/task-update-E4NSLKMQ.js +408 -0
  128. package/chunks/team-create-7R7KA5IP.js +314 -0
  129. package/chunks/team-delete-25OIWUPN.js +116 -0
  130. package/chunks/{todoWrite-VLAUG4CA.js → todoWrite-4YHMIF4X.js} +16 -5
  131. package/chunks/{tool-search-MZGHUUKD.js → tool-search-YBRVZCLI.js} +29 -11
  132. package/chunks/{tts-notification-K3X7X7MN.js → tts-notification-7SOEMQK4.js} +5 -4
  133. package/chunks/{web-fetch-OILB464A.js → web-fetch-MFIRHIHI.js} +5 -5
  134. package/chunks/workflow-5RIKVCIE.js +960 -0
  135. package/chunks/{write-file-BIQAA57V.js → write-file-DMQTJZOM.js} +32 -24
  136. package/chunks/{zh-PWL2NKY3.js → zh-7H5OQC4I.js} +135 -11
  137. package/chunks/{zh-TW-S3YGWICZ.js → zh-TW-P4IDHD3M.js} +128 -11
  138. package/cli.js +45402 -20570
  139. package/examples/agent/agents/diary.md +86 -0
  140. package/examples/agent/qwen-extension.json +5 -0
  141. package/examples/commands/commands/fs/grep-code.md +3 -0
  142. package/examples/commands/qwen-extension.json +5 -0
  143. package/examples/context/QWEN.md +8 -0
  144. package/examples/context/qwen-extension.json +5 -0
  145. package/examples/mcp-server/example.ts +60 -0
  146. package/examples/mcp-server/package.json +18 -0
  147. package/examples/mcp-server/qwen-extension.json +12 -0
  148. package/examples/mcp-server/tsconfig.json +13 -0
  149. package/examples/skills/qwen-extension.json +5 -0
  150. package/examples/skills/skills/synonyms/SKILL.md +48 -0
  151. package/examples/starter/QWEN.md +30 -0
  152. package/examples/starter/README.md +59 -0
  153. package/examples/starter/agents/diary.md +86 -0
  154. package/examples/starter/commands/writing/polish.md +13 -0
  155. package/examples/starter/example.ts +64 -0
  156. package/examples/starter/package.json +18 -0
  157. package/examples/starter/qwen-extension.json +12 -0
  158. package/examples/starter/skills/synonyms/SKILL.md +48 -0
  159. package/examples/starter/tsconfig.json +13 -0
  160. package/fzfWorker.js +1083 -0
  161. package/locales/ca.js +118 -5
  162. package/locales/de.js +117 -5
  163. package/locales/en.js +169 -7
  164. package/locales/fr.js +119 -5
  165. package/locales/ja.js +114 -5
  166. package/locales/pt.js +117 -5
  167. package/locales/ru.js +116 -5
  168. package/locales/zh-TW.js +161 -12
  169. package/locales/zh.js +169 -12
  170. package/package.json +4 -2
  171. package/scripts/postinstall.cjs +2 -1
  172. package/bundled/qc-helper/docs/features/checkpointing.md +0 -77
  173. package/chunks/agent-7ZN3CRHR.js +0 -48
  174. package/chunks/chunk-6PCB2DEF.js +0 -434
  175. package/chunks/chunk-EM6ETG2K.js +0 -60
  176. package/chunks/chunk-G7YTSRES.js +0 -150
  177. package/chunks/contextCommand-7IBASARL.js +0 -44
  178. package/chunks/exitPlanMode-PZAMWIRW.js +0 -227
  179. package/chunks/multipart-parser-IXGBIOIN.js +0 -384
  180. package/chunks/read-file-CCUEUFG2.js +0 -24
  181. package/chunks/ripGrep-TADOH2HK.js +0 -40
  182. package/chunks/send-message-YL44UZFC.js +0 -151
  183. package/chunks/shell-7KKKC5G7.js +0 -48
  184. package/chunks/src-IPWIHNMI.js +0 -1406
  185. package/chunks/undici-F6ZOXSS5.js +0 -8
@@ -0,0 +1,314 @@
1
+ // Force strict mode and setup for ESM
2
+ "use strict";
3
+ import {
4
+ InProcessBackend,
5
+ TeamManager
6
+ } from "./chunk-TD4OPI4T.js";
7
+ import "./chunk-K5PGHDBN.js";
8
+ import {
9
+ resetTaskList
10
+ } from "./chunk-XBY7E2FX.js";
11
+ import "./chunk-SKBPNJEW.js";
12
+ import "./chunk-NVFMZBX2.js";
13
+ import "./chunk-O4PICXES.js";
14
+ import "./chunk-TW522KN6.js";
15
+ import {
16
+ clearAllInboxes
17
+ } from "./chunk-3DHXZ6EV.js";
18
+ import {
19
+ createTeamFile,
20
+ formatAgentId,
21
+ getTasksDir,
22
+ getTeamDir,
23
+ sanitizeName,
24
+ tryReclaimStaleTeam
25
+ } from "./chunk-J5MDQKJL.js";
26
+ import "./chunk-MLZQVCF3.js";
27
+ import {
28
+ LEADER_NAME,
29
+ MAX_TEAMMATES
30
+ } from "./chunk-LD2XBG6Z.js";
31
+ import "./chunk-OHEGWO4L.js";
32
+ import "./chunk-SNGELLWX.js";
33
+ import "./chunk-77WXWU44.js";
34
+ import "./chunk-A7B4ISQP.js";
35
+ import "./chunk-OQ7NJIY7.js";
36
+ import "./chunk-3PJXIDKI.js";
37
+ import "./chunk-UWCTAVOD.js";
38
+ import "./chunk-OFEVLU4C.js";
39
+ import "./chunk-3HTIVKZE.js";
40
+ import "./chunk-IDX6COTE.js";
41
+ import "./chunk-KQJMQJPI.js";
42
+ import {
43
+ BaseDeclarativeTool,
44
+ BaseToolInvocation,
45
+ ToolDisplayNames,
46
+ ToolNames
47
+ } from "./chunk-D3RHSPAS.js";
48
+ import "./chunk-2Y5SYSD3.js";
49
+ import "./chunk-SEGYWKIH.js";
50
+ import "./chunk-64WXLC72.js";
51
+ import "./chunk-B7HXHOHU.js";
52
+ import "./chunk-EYENRK4D.js";
53
+ import "./chunk-M6VTDSVR.js";
54
+ import "./chunk-55ZMG67I.js";
55
+ import "./chunk-H6BD2ELD.js";
56
+ import "./chunk-5IFG2VC4.js";
57
+ import {
58
+ isNodeError
59
+ } from "./chunk-HR7SV7AY.js";
60
+ import "./chunk-ZERZSAZL.js";
61
+ import "./chunk-QN5NZ3UQ.js";
62
+ import "./chunk-BR4QREVK.js";
63
+ import "./chunk-Z2Z3GUXZ.js";
64
+ import {
65
+ init_esbuild_shims
66
+ } from "./chunk-A4BMJM77.js";
67
+ import {
68
+ __name
69
+ } from "./chunk-J2S4EL5Y.js";
70
+
71
+ // packages/core/src/tools/team-create.ts
72
+ init_esbuild_shims();
73
+ var TeamCreateInvocation = class extends BaseToolInvocation {
74
+ constructor(config, params) {
75
+ super(params);
76
+ this.config = config;
77
+ }
78
+ static {
79
+ __name(this, "TeamCreateInvocation");
80
+ }
81
+ getDescription() {
82
+ return `Create team "${this.params.team_name}"`;
83
+ }
84
+ async execute() {
85
+ const teamName = sanitizeName(this.params.team_name);
86
+ if (!teamName) {
87
+ const msg = "Team name is required.";
88
+ return {
89
+ llmContent: msg,
90
+ returnDisplay: msg,
91
+ error: { message: msg }
92
+ };
93
+ }
94
+ if (this.config.getArenaManager()) {
95
+ const msg = "Cannot create a team while an Arena session is active. End the Arena session first.";
96
+ return {
97
+ llmContent: msg,
98
+ returnDisplay: msg,
99
+ error: { message: msg }
100
+ };
101
+ }
102
+ if (this.config.getTeamManager()) {
103
+ const msg = "A team is already active. Delete it before creating a new one.";
104
+ return {
105
+ llmContent: msg,
106
+ returnDisplay: msg,
107
+ error: { message: msg }
108
+ };
109
+ }
110
+ const leadAgentId = formatAgentId(LEADER_NAME, teamName);
111
+ const teamFile = {
112
+ name: teamName,
113
+ description: this.params.description,
114
+ createdAt: Date.now(),
115
+ leadAgentId,
116
+ leadSessionId: this.config.getSessionId(),
117
+ leadPid: process.pid,
118
+ members: []
119
+ };
120
+ try {
121
+ await createTeamFile(teamName, teamFile);
122
+ } catch (err) {
123
+ if (isNodeError(err) && err.code === "EEXIST") {
124
+ const reclaimed = await tryReclaimStaleTeam(teamName);
125
+ if (!reclaimed) {
126
+ const msg = `Team "${teamName}" already exists and appears to be owned by a live qwen-code session. Pick a different name, or \u2014 if you're sure no other session is using it \u2014 remove the on-disk artifacts manually:
127
+ rm -rf "${getTeamDir(teamName)}" "${getTasksDir(teamName)}"`;
128
+ return {
129
+ llmContent: msg,
130
+ returnDisplay: msg,
131
+ error: { message: msg }
132
+ };
133
+ }
134
+ await createTeamFile(teamName, teamFile);
135
+ } else {
136
+ throw err;
137
+ }
138
+ }
139
+ await resetTaskList(teamName);
140
+ await clearAllInboxes(teamName);
141
+ const backend = new InProcessBackend(this.config);
142
+ await backend.init();
143
+ const manager = new TeamManager(
144
+ backend,
145
+ teamFile,
146
+ this.config.getSubagentManager(),
147
+ {
148
+ maxTeammates: this.config.getAgentsSettings().team?.maxTeammates
149
+ }
150
+ );
151
+ this.config.setTeamManager(manager);
152
+ const ctx = {
153
+ teamName,
154
+ leadAgentId,
155
+ teammates: {}
156
+ };
157
+ this.config.setTeamContext(ctx);
158
+ const display = {
159
+ type: "team_result",
160
+ teamName,
161
+ action: "created"
162
+ };
163
+ const llmContent = `Team "${teamName}" created.` + (this.params.description ? ` Description: ${this.params.description}` : "");
164
+ return { llmContent, returnDisplay: display };
165
+ }
166
+ };
167
+ var TeamCreateTool = class _TeamCreateTool extends BaseDeclarativeTool {
168
+ constructor(config) {
169
+ super(
170
+ _TeamCreateTool.Name,
171
+ ToolDisplayNames.TEAM_CREATE,
172
+ `# TeamCreate
173
+
174
+ ## When to Use
175
+
176
+ Use this tool proactively whenever:
177
+ - The user explicitly asks to use a team, swarm, or group of agents
178
+ - The user mentions wanting agents to work together, coordinate, or collaborate
179
+ - A task is complex enough that it would benefit from parallel work by multiple agents (e.g., building a full-stack feature with frontend and backend work, refactoring a codebase while keeping tests passing, implementing a multi-step project with research, planning, and coding phases)
180
+
181
+ When in doubt about whether a task warrants a team, prefer spawning a team.
182
+
183
+ ## Choosing Agent Types for Teammates
184
+
185
+ When spawning teammates via the Agent tool, choose the \`subagent_type\` based on what tools the agent needs for its task. Each agent type has a different set of available tools \u2014 match the agent to the work:
186
+
187
+ - **Read-only agents** (e.g., Explore, Plan) cannot edit or write files. Only assign them research, search, or planning tasks. Never assign them implementation work.
188
+ - **Full-capability agents** (e.g., general-purpose) have access to all tools including file editing, writing, and bash. Use these for tasks that require making changes.
189
+ - **Custom agents** defined in \`.qwen/agents/\` may have their own tool restrictions. Check their descriptions to understand what they can and cannot do.
190
+
191
+ Always review the agent type descriptions and their available tools listed in the Agent tool prompt before selecting a \`subagent_type\` for a teammate.
192
+
193
+ Create a new team to coordinate multiple agents working on a project. Teams have a 1:1 correspondence with task lists (Team = TaskList).
194
+
195
+ \`\`\`
196
+ {
197
+ "team_name": "my-project",
198
+ "description": "Working on feature X"
199
+ }
200
+ \`\`\`
201
+
202
+ This creates:
203
+ - A team file at \`~/.qwen/teams/{team-name}/config.json\`
204
+ - A corresponding task list directory at \`~/.qwen/tasks/{team-name}/\`
205
+
206
+ ## Team Workflow
207
+
208
+ 1. **Create a team** with TeamCreate - this creates both the team and its task list
209
+ 2. **Create tasks** using the Task tools (TaskCreate, TaskList, etc.) - they automatically use the team's task list
210
+ 3. **Spawn teammates** using the Agent tool with the \`name\` parameter to create teammates that join the active team (max ${config.getAgentsSettings().team?.maxTeammates ?? MAX_TEAMMATES} teammates per team)
211
+ 4. **Assign tasks** using TaskUpdate with \`owner\` to give tasks to idle teammates
212
+ 5. **Teammates work on assigned tasks** and mark them completed via TaskUpdate
213
+ 6. **Teammates go idle between turns** - after each turn, teammates automatically go idle and send a notification. IMPORTANT: Be patient with idle teammates! Don't comment on their idleness until it actually impacts your work.
214
+ 7. **Shutdown your team** - when the task is completed, gracefully shut down your teammates via SendMessage with \`type: "shutdown_request"\` (a top-level parameter alongside \`to\` and \`message\`).
215
+
216
+ ## Task Ownership
217
+
218
+ Tasks are assigned using TaskUpdate with the \`owner\` parameter. Any agent can set or change task ownership via TaskUpdate.
219
+
220
+ ## Automatic Message Delivery
221
+
222
+ **IMPORTANT**: Messages from teammates are automatically delivered to you. You do NOT need to manually check your inbox.
223
+
224
+ When you spawn teammates:
225
+ - They will send you messages when they complete tasks or need help
226
+ - These messages appear automatically as new conversation turns (like user messages)
227
+ - If you're busy (mid-turn), messages are queued and delivered when your turn ends
228
+ - The UI shows a brief notification with the sender's name when messages are waiting
229
+
230
+ Messages will be delivered automatically.
231
+
232
+ When reporting on teammate messages, you do NOT need to quote the original message\u2014it's already rendered to the user.
233
+
234
+ ## Teammate Idle State
235
+
236
+ Teammates go idle after every turn\u2014this is completely normal and expected. A teammate going idle immediately after sending you a message does NOT mean they are done or unavailable. Idle simply means they are waiting for input.
237
+
238
+ - **Idle teammates can receive messages.** Sending a message to an idle teammate wakes them up and they will process it normally.
239
+ - **Idle notifications are automatic.** The system sends an idle notification whenever a teammate's turn ends. You do not need to react to idle notifications unless you want to assign new work or send a follow-up message.
240
+ - **Do not treat idle as an error.** A teammate sending a message and then going idle is the normal flow\u2014they sent their message and are now waiting for a response.
241
+ - **Peer DM visibility.** When a teammate sends a DM to another teammate, a brief summary is included in their idle notification. This gives you visibility into peer collaboration without the full message content. You do not need to respond to these summaries \u2014 they are informational.
242
+
243
+ ## Discovering Team Members
244
+
245
+ Teammates can read the team config file to discover other team members:
246
+ - **Team config location**: \`~/.qwen/teams/{team-name}/config.json\`
247
+
248
+ The config file contains a \`members\` array with each teammate's:
249
+ - \`name\`: Human-readable name (**always use this** for messaging and task assignment)
250
+ - \`agentId\`: Unique identifier (for reference only - do not use for communication)
251
+ - \`agentType\`: Role/type of the agent
252
+
253
+ **IMPORTANT**: Always refer to teammates by their NAME (e.g., "team-lead", "researcher", "tester"). Names are used for:
254
+ - \`to\` when sending messages
255
+ - Identifying task owners
256
+
257
+ Example of reading team config:
258
+ \`\`\`
259
+ Use the Read tool to read ~/.qwen/teams/{team-name}/config.json
260
+ \`\`\`
261
+
262
+ ## Task List Coordination
263
+
264
+ Teams share a task list that all teammates can access at \`~/.qwen/tasks/{team-name}/\`.
265
+
266
+ Teammates should:
267
+ 1. Check TaskList periodically, **especially after completing each task**, to find available work or see newly unblocked tasks
268
+ 2. Claim unassigned, unblocked tasks with TaskUpdate (set \`owner\` to your name). **Prefer tasks in ID order** (lowest ID first) when multiple tasks are available, as earlier tasks often set up context for later ones
269
+ 3. Create new tasks with \`TaskCreate\` when identifying additional work
270
+ 4. Mark tasks as completed with \`TaskUpdate\` when done, then check TaskList for next work
271
+ 5. Coordinate with other teammates by reading the task list status
272
+ 6. If all available tasks are blocked, notify the team lead or help resolve blocking tasks
273
+
274
+ **IMPORTANT notes for communication with your team**:
275
+ - Do not use terminal tools to view your team's activity; always send a message to your teammates (and remember, refer to them by name).
276
+ - Your team cannot hear you if you do not use the SendMessage tool. Always send a message to your teammates if you are responding to them.
277
+ - Do NOT send structured JSON status messages like \`{"type":"idle",...}\` or \`{"type":"task_completed",...}\`. Just communicate in plain text when you need to message teammates.
278
+ - Use TaskUpdate to mark tasks completed.
279
+ - If you are an agent in the team, the system will automatically send idle notifications to the team lead when you stop.`,
280
+ "other" /* Other */,
281
+ {
282
+ type: "object",
283
+ properties: {
284
+ team_name: {
285
+ type: "string",
286
+ description: "Name for the team (alphanumeric and hyphens)."
287
+ },
288
+ description: {
289
+ type: "string",
290
+ description: "Optional description of the team."
291
+ }
292
+ },
293
+ required: ["team_name"],
294
+ additionalProperties: false
295
+ }
296
+ );
297
+ this.config = config;
298
+ }
299
+ static {
300
+ __name(this, "TeamCreateTool");
301
+ }
302
+ static Name = ToolNames.TEAM_CREATE;
303
+ createInvocation(params) {
304
+ return new TeamCreateInvocation(this.config, params);
305
+ }
306
+ };
307
+ export {
308
+ TeamCreateTool
309
+ };
310
+ /**
311
+ * @license
312
+ * Copyright 2025 Qwen
313
+ * SPDX-License-Identifier: Apache-2.0
314
+ */
@@ -0,0 +1,116 @@
1
+ // Force strict mode and setup for ESM
2
+ "use strict";
3
+ import {
4
+ disposeInboxLocks,
5
+ unregisterLeader
6
+ } from "./chunk-3DHXZ6EV.js";
7
+ import {
8
+ deleteTeamDirs
9
+ } from "./chunk-J5MDQKJL.js";
10
+ import {
11
+ isTeammate
12
+ } from "./chunk-LD2XBG6Z.js";
13
+ import {
14
+ BaseDeclarativeTool,
15
+ BaseToolInvocation,
16
+ ToolDisplayNames,
17
+ ToolNames
18
+ } from "./chunk-D3RHSPAS.js";
19
+ import "./chunk-B7HXHOHU.js";
20
+ import {
21
+ createDebugLogger
22
+ } from "./chunk-HR7SV7AY.js";
23
+ import "./chunk-Z2Z3GUXZ.js";
24
+ import {
25
+ init_esbuild_shims
26
+ } from "./chunk-A4BMJM77.js";
27
+ import {
28
+ __name
29
+ } from "./chunk-J2S4EL5Y.js";
30
+
31
+ // packages/core/src/tools/team-delete.ts
32
+ init_esbuild_shims();
33
+ var debug = createDebugLogger("TEAM_DELETE");
34
+ var TeamDeleteInvocation = class extends BaseToolInvocation {
35
+ constructor(config, params) {
36
+ super(params);
37
+ this.config = config;
38
+ }
39
+ static {
40
+ __name(this, "TeamDeleteInvocation");
41
+ }
42
+ getDescription() {
43
+ return "Delete current team";
44
+ }
45
+ async execute() {
46
+ if (isTeammate()) {
47
+ const msg2 = "Only the team leader can delete the team.";
48
+ return {
49
+ llmContent: msg2,
50
+ returnDisplay: msg2,
51
+ error: { message: msg2 }
52
+ };
53
+ }
54
+ const manager = this.config.getTeamManager();
55
+ if (!manager) {
56
+ const msg2 = "No active team to delete.";
57
+ return {
58
+ llmContent: msg2,
59
+ returnDisplay: msg2,
60
+ error: { message: msg2 }
61
+ };
62
+ }
63
+ const teamFile = manager.getTeamFile();
64
+ const teamName = teamFile.name;
65
+ try {
66
+ await manager.cleanup();
67
+ } catch (err) {
68
+ debug.warn("Team cleanup failed; resetting team state anyway:", err);
69
+ }
70
+ await deleteTeamDirs(teamName);
71
+ await new Promise((r) => setTimeout(r, 250));
72
+ await deleteTeamDirs(teamName);
73
+ disposeInboxLocks(teamName);
74
+ this.config.setTeamManager(null);
75
+ this.config.setTeamContext(null);
76
+ unregisterLeader();
77
+ const display = {
78
+ type: "team_result",
79
+ teamName,
80
+ action: "deleted"
81
+ };
82
+ const msg = `Team "${teamName}" deleted.`;
83
+ return { llmContent: msg, returnDisplay: display };
84
+ }
85
+ };
86
+ var TeamDeleteTool = class _TeamDeleteTool extends BaseDeclarativeTool {
87
+ constructor(config) {
88
+ super(
89
+ _TeamDeleteTool.Name,
90
+ ToolDisplayNames.TEAM_DELETE,
91
+ "Delete the current team. Stops all teammates, cleans up team files, tasks, and inboxes. Only the team leader can use this.",
92
+ "delete" /* Delete */,
93
+ {
94
+ type: "object",
95
+ properties: {},
96
+ additionalProperties: false
97
+ }
98
+ );
99
+ this.config = config;
100
+ }
101
+ static {
102
+ __name(this, "TeamDeleteTool");
103
+ }
104
+ static Name = ToolNames.TEAM_DELETE;
105
+ createInvocation(params) {
106
+ return new TeamDeleteInvocation(this.config, params);
107
+ }
108
+ };
109
+ export {
110
+ TeamDeleteTool
111
+ };
112
+ /**
113
+ * @license
114
+ * Copyright 2025 Qwen
115
+ * SPDX-License-Identifier: Apache-2.0
116
+ */
@@ -2,18 +2,21 @@
2
2
  "use strict";
3
3
  import {
4
4
  detectTodoChanges
5
- } from "./chunk-4AOCVI6J.js";
5
+ } from "./chunk-SNGELLWX.js";
6
6
  import {
7
7
  BaseDeclarativeTool,
8
8
  BaseToolInvocation,
9
9
  ToolDisplayNames,
10
10
  ToolNames
11
- } from "./chunk-XEGHDASV.js";
11
+ } from "./chunk-D3RHSPAS.js";
12
+ import {
13
+ atomicWriteFile
14
+ } from "./chunk-B7HXHOHU.js";
12
15
  import {
13
16
  Storage,
14
17
  createDebugLogger
15
- } from "./chunk-XP27SJMH.js";
16
- import "./chunk-QWSRH265.js";
18
+ } from "./chunk-HR7SV7AY.js";
19
+ import "./chunk-Z2Z3GUXZ.js";
17
20
  import {
18
21
  init_esbuild_shims
19
22
  } from "./chunk-A4BMJM77.js";
@@ -206,6 +209,12 @@ The assistant did not use the todo list because this is a single command executi
206
209
  </reasoning>
207
210
  </example>
208
211
 
212
+ ## Planning with Todos
213
+
214
+ Before breaking work into low-level edits, use the todo list to reflect the overall approach at a meaningful level (for example: investigate, design, implement, verify). This helps maintain a global view of the task instead of jumping between isolated local changes.
215
+
216
+ When new information changes your understanding of the task, update the todo structure to reflect the revised plan rather than only appending isolated follow-up items. The todo list should continue to represent the current overall strategy.
217
+
209
218
  ## Task States and Management
210
219
 
211
220
  1. **Task States**: Use these states to track progress:
@@ -267,7 +276,9 @@ async function writeTodosToFile(todos, sessionId) {
267
276
  todos,
268
277
  sessionId: sessionId || "default"
269
278
  };
270
- await fs.writeFile(todoFilePath, JSON.stringify(data, null, 2), "utf-8");
279
+ await atomicWriteFile(todoFilePath, JSON.stringify(data, null, 2), {
280
+ encoding: "utf-8"
281
+ });
271
282
  }
272
283
  __name(writeTodosToFile, "writeTodosToFile");
273
284
  function createBlockedTodoResult(message, systemMessage) {
@@ -2,28 +2,31 @@
2
2
  "use strict";
3
3
  import {
4
4
  DiscoveredMCPTool
5
- } from "./chunk-K6O2NBMF.js";
5
+ } from "./chunk-OQ7NJIY7.js";
6
+ import "./chunk-3PJXIDKI.js";
6
7
  import "./chunk-UWCTAVOD.js";
7
8
  import "./chunk-OFEVLU4C.js";
8
- import "./chunk-PR4T27R7.js";
9
- import "./chunk-MAY32HXD.js";
10
- import "./chunk-D5NTAHYL.js";
11
- import "./chunk-MYAKAFEC.js";
12
- import "./chunk-66CXYE4B.js";
13
- import "./chunk-NCTLV2NB.js";
9
+ import "./chunk-3HTIVKZE.js";
10
+ import "./chunk-IDX6COTE.js";
11
+ import "./chunk-KQJMQJPI.js";
14
12
  import {
15
13
  BaseDeclarativeTool,
16
14
  BaseToolInvocation,
17
15
  ToolDisplayNames,
18
16
  ToolNames
19
- } from "./chunk-XEGHDASV.js";
17
+ } from "./chunk-D3RHSPAS.js";
18
+ import "./chunk-B7HXHOHU.js";
19
+ import "./chunk-M6VTDSVR.js";
20
+ import "./chunk-55ZMG67I.js";
21
+ import "./chunk-H6BD2ELD.js";
22
+ import "./chunk-5IFG2VC4.js";
20
23
  import {
21
24
  createDebugLogger
22
- } from "./chunk-XP27SJMH.js";
25
+ } from "./chunk-HR7SV7AY.js";
23
26
  import "./chunk-ZERZSAZL.js";
24
27
  import "./chunk-QN5NZ3UQ.js";
25
28
  import "./chunk-BR4QREVK.js";
26
- import "./chunk-QWSRH265.js";
29
+ import "./chunk-Z2Z3GUXZ.js";
27
30
  import {
28
31
  init_esbuild_shims
29
32
  } from "./chunk-A4BMJM77.js";
@@ -44,7 +47,7 @@ var SCORE_NAME_EXACT_MCP = 12;
44
47
  var SCORE_NAME_SUBSTR_MCP = 6;
45
48
  var toolSearchDescription = `Fetches function declarations for deferred tools and registers them with the active session so subsequent turns can call them.
46
49
 
47
- Deferred tools appear by name in the "Deferred Tools" section of the system prompt. Until fetched, only the name is known \u2014 there is no parameter schema, so the tool cannot be invoked. This tool takes a query, matches it against the deferred tool list, and returns the matched tools' function declarations (name + description + parameter schema) inside a <functions> block.
50
+ Deferred tools appear by name in the deferred-tools startup reminder. Until fetched, only the name is known \u2014 there is no parameter schema, so the tool cannot be invoked. This tool takes a query, matches it against the deferred tool list, and returns the matched tools' function declarations (name + description + parameter schema) inside a <functions> block.
48
51
 
49
52
  The returned <functions> block is informational \u2014 it shows what the schema looks like. Calling the tool itself happens via the model's normal function-call mechanism on the NEXT turn, after the active session's declaration list has been updated. Tools fetched here remain available for the rest of the session.
50
53
 
@@ -210,6 +213,21 @@ var ToolSearchInvocation = class extends BaseToolInvocation {
210
213
  `
211
214
  );
212
215
  }
216
+ if (!setToolsError) {
217
+ try {
218
+ await geminiClient.refreshStartupContextReminder();
219
+ } catch (err) {
220
+ const refreshError = err instanceof Error ? err.message : String(err);
221
+ debugLogger.warn(
222
+ "refreshStartupContextReminder() failed after revealing deferred tools:",
223
+ err
224
+ );
225
+ process.stderr.write(
226
+ `[ToolSearch] refreshStartupContextReminder() failed after revealing deferred tools: ${refreshError}
227
+ `
228
+ );
229
+ }
230
+ }
213
231
  }
214
232
  if (setToolsError) {
215
233
  for (const name of newlyRevealed) {
@@ -5,11 +5,11 @@ import {
5
5
  BaseToolInvocation,
6
6
  ToolDisplayNames,
7
7
  ToolNames
8
- } from "./chunk-XEGHDASV.js";
8
+ } from "./chunk-D3RHSPAS.js";
9
9
  import {
10
10
  createDebugLogger
11
- } from "./chunk-XP27SJMH.js";
12
- import "./chunk-QWSRH265.js";
11
+ } from "./chunk-HR7SV7AY.js";
12
+ import "./chunk-Z2Z3GUXZ.js";
13
13
  import {
14
14
  init_esbuild_shims
15
15
  } from "./chunk-A4BMJM77.js";
@@ -110,6 +110,7 @@ export {
110
110
  };
111
111
  /**
112
112
  * @license
113
- * Copyright 2025 Google LLC
113
+ * Copyright 2026 Qwen
114
+ * Copyright 2026 Davide A. Guglielmi (Termux porting patches)
114
115
  * SPDX-License-Identifier: Apache-2.0
115
116
  */
@@ -2,22 +2,22 @@
2
2
  "use strict";
3
3
  import {
4
4
  runSideQuery
5
- } from "./chunk-N4WOREMD.js";
5
+ } from "./chunk-NVFMZBX2.js";
6
6
  import "./chunk-OFEVLU4C.js";
7
7
  import {
8
8
  BaseDeclarativeTool,
9
9
  BaseToolInvocation,
10
10
  ToolDisplayNames,
11
11
  ToolNames
12
- } from "./chunk-XEGHDASV.js";
12
+ } from "./chunk-D3RHSPAS.js";
13
13
  import {
14
14
  fetchWithTimeout,
15
15
  isPrivateIp
16
- } from "./chunk-KXZ4TJB4.js";
16
+ } from "./chunk-SEGYWKIH.js";
17
17
  import {
18
18
  createDebugLogger
19
- } from "./chunk-XP27SJMH.js";
20
- import "./chunk-QWSRH265.js";
19
+ } from "./chunk-HR7SV7AY.js";
20
+ import "./chunk-Z2Z3GUXZ.js";
21
21
  import {
22
22
  init_esbuild_shims
23
23
  } from "./chunk-A4BMJM77.js";