@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
@@ -1,384 +0,0 @@
1
- // Force strict mode and setup for ESM
2
- "use strict";
3
- import {
4
- FormData,
5
- file_default,
6
- init_esm_min,
7
- init_from
8
- } from "./chunk-4CGOWHKM.js";
9
- import "./chunk-2PSWA5ID.js";
10
- import {
11
- init_esbuild_shims
12
- } from "./chunk-A4BMJM77.js";
13
- import {
14
- __esm,
15
- __name
16
- } from "./chunk-J2S4EL5Y.js";
17
-
18
- // packages/cli/node_modules/node-fetch/src/utils/multipart-parser.js
19
- function _fileName(headerValue) {
20
- const m = headerValue.match(/\bfilename=("(.*?)"|([^()<>@,;:\\"/[\]?={}\s\t]+))($|;\s)/i);
21
- if (!m) {
22
- return;
23
- }
24
- const match = m[2] || m[3] || "";
25
- let filename = match.slice(match.lastIndexOf("\\") + 1);
26
- filename = filename.replace(/%22/g, '"');
27
- filename = filename.replace(/&#(\d{4});/g, (m2, code) => {
28
- return String.fromCharCode(code);
29
- });
30
- return filename;
31
- }
32
- async function toFormData(Body, ct) {
33
- if (!/multipart/i.test(ct)) {
34
- throw new TypeError("Failed to fetch");
35
- }
36
- const m = ct.match(/boundary=(?:"([^"]+)"|([^;]+))/i);
37
- if (!m) {
38
- throw new TypeError("no or bad content-type header, no multipart boundary");
39
- }
40
- const parser = new MultipartParser(m[1] || m[2]);
41
- let headerField;
42
- let headerValue;
43
- let entryValue;
44
- let entryName;
45
- let contentType;
46
- let filename;
47
- const entryChunks = [];
48
- const formData = new FormData();
49
- const onPartData = /* @__PURE__ */ __name((ui8a) => {
50
- entryValue += decoder.decode(ui8a, { stream: true });
51
- }, "onPartData");
52
- const appendToFile = /* @__PURE__ */ __name((ui8a) => {
53
- entryChunks.push(ui8a);
54
- }, "appendToFile");
55
- const appendFileToFormData = /* @__PURE__ */ __name(() => {
56
- const file = new file_default(entryChunks, filename, { type: contentType });
57
- formData.append(entryName, file);
58
- }, "appendFileToFormData");
59
- const appendEntryToFormData = /* @__PURE__ */ __name(() => {
60
- formData.append(entryName, entryValue);
61
- }, "appendEntryToFormData");
62
- const decoder = new TextDecoder("utf-8");
63
- decoder.decode();
64
- parser.onPartBegin = function() {
65
- parser.onPartData = onPartData;
66
- parser.onPartEnd = appendEntryToFormData;
67
- headerField = "";
68
- headerValue = "";
69
- entryValue = "";
70
- entryName = "";
71
- contentType = "";
72
- filename = null;
73
- entryChunks.length = 0;
74
- };
75
- parser.onHeaderField = function(ui8a) {
76
- headerField += decoder.decode(ui8a, { stream: true });
77
- };
78
- parser.onHeaderValue = function(ui8a) {
79
- headerValue += decoder.decode(ui8a, { stream: true });
80
- };
81
- parser.onHeaderEnd = function() {
82
- headerValue += decoder.decode();
83
- headerField = headerField.toLowerCase();
84
- if (headerField === "content-disposition") {
85
- const m2 = headerValue.match(/\bname=("([^"]*)"|([^()<>@,;:\\"/[\]?={}\s\t]+))/i);
86
- if (m2) {
87
- entryName = m2[2] || m2[3] || "";
88
- }
89
- filename = _fileName(headerValue);
90
- if (filename) {
91
- parser.onPartData = appendToFile;
92
- parser.onPartEnd = appendFileToFormData;
93
- }
94
- } else if (headerField === "content-type") {
95
- contentType = headerValue;
96
- }
97
- headerValue = "";
98
- headerField = "";
99
- };
100
- for await (const chunk of Body) {
101
- parser.write(chunk);
102
- }
103
- parser.end();
104
- return formData;
105
- }
106
- var s, S, f, F, LF, CR, SPACE, HYPHEN, COLON, A, Z, lower, noop, MultipartParser;
107
- var init_multipart_parser = __esm({
108
- "packages/cli/node_modules/node-fetch/src/utils/multipart-parser.js"() {
109
- init_esbuild_shims();
110
- init_from();
111
- init_esm_min();
112
- s = 0;
113
- S = {
114
- START_BOUNDARY: s++,
115
- HEADER_FIELD_START: s++,
116
- HEADER_FIELD: s++,
117
- HEADER_VALUE_START: s++,
118
- HEADER_VALUE: s++,
119
- HEADER_VALUE_ALMOST_DONE: s++,
120
- HEADERS_ALMOST_DONE: s++,
121
- PART_DATA_START: s++,
122
- PART_DATA: s++,
123
- END: s++
124
- };
125
- f = 1;
126
- F = {
127
- PART_BOUNDARY: f,
128
- LAST_BOUNDARY: f *= 2
129
- };
130
- LF = 10;
131
- CR = 13;
132
- SPACE = 32;
133
- HYPHEN = 45;
134
- COLON = 58;
135
- A = 97;
136
- Z = 122;
137
- lower = /* @__PURE__ */ __name((c) => c | 32, "lower");
138
- noop = /* @__PURE__ */ __name(() => {
139
- }, "noop");
140
- MultipartParser = class {
141
- static {
142
- __name(this, "MultipartParser");
143
- }
144
- /**
145
- * @param {string} boundary
146
- */
147
- constructor(boundary) {
148
- this.index = 0;
149
- this.flags = 0;
150
- this.onHeaderEnd = noop;
151
- this.onHeaderField = noop;
152
- this.onHeadersEnd = noop;
153
- this.onHeaderValue = noop;
154
- this.onPartBegin = noop;
155
- this.onPartData = noop;
156
- this.onPartEnd = noop;
157
- this.boundaryChars = {};
158
- boundary = "\r\n--" + boundary;
159
- const ui8a = new Uint8Array(boundary.length);
160
- for (let i = 0; i < boundary.length; i++) {
161
- ui8a[i] = boundary.charCodeAt(i);
162
- this.boundaryChars[ui8a[i]] = true;
163
- }
164
- this.boundary = ui8a;
165
- this.lookbehind = new Uint8Array(this.boundary.length + 8);
166
- this.state = S.START_BOUNDARY;
167
- }
168
- /**
169
- * @param {Uint8Array} data
170
- */
171
- write(data) {
172
- let i = 0;
173
- const length_ = data.length;
174
- let previousIndex = this.index;
175
- let { lookbehind, boundary, boundaryChars, index, state, flags } = this;
176
- const boundaryLength = this.boundary.length;
177
- const boundaryEnd = boundaryLength - 1;
178
- const bufferLength = data.length;
179
- let c;
180
- let cl;
181
- const mark = /* @__PURE__ */ __name((name) => {
182
- this[name + "Mark"] = i;
183
- }, "mark");
184
- const clear = /* @__PURE__ */ __name((name) => {
185
- delete this[name + "Mark"];
186
- }, "clear");
187
- const callback = /* @__PURE__ */ __name((callbackSymbol, start, end, ui8a) => {
188
- if (start === void 0 || start !== end) {
189
- this[callbackSymbol](ui8a && ui8a.subarray(start, end));
190
- }
191
- }, "callback");
192
- const dataCallback = /* @__PURE__ */ __name((name, clear2) => {
193
- const markSymbol = name + "Mark";
194
- if (!(markSymbol in this)) {
195
- return;
196
- }
197
- if (clear2) {
198
- callback(name, this[markSymbol], i, data);
199
- delete this[markSymbol];
200
- } else {
201
- callback(name, this[markSymbol], data.length, data);
202
- this[markSymbol] = 0;
203
- }
204
- }, "dataCallback");
205
- for (i = 0; i < length_; i++) {
206
- c = data[i];
207
- switch (state) {
208
- case S.START_BOUNDARY:
209
- if (index === boundary.length - 2) {
210
- if (c === HYPHEN) {
211
- flags |= F.LAST_BOUNDARY;
212
- } else if (c !== CR) {
213
- return;
214
- }
215
- index++;
216
- break;
217
- } else if (index - 1 === boundary.length - 2) {
218
- if (flags & F.LAST_BOUNDARY && c === HYPHEN) {
219
- state = S.END;
220
- flags = 0;
221
- } else if (!(flags & F.LAST_BOUNDARY) && c === LF) {
222
- index = 0;
223
- callback("onPartBegin");
224
- state = S.HEADER_FIELD_START;
225
- } else {
226
- return;
227
- }
228
- break;
229
- }
230
- if (c !== boundary[index + 2]) {
231
- index = -2;
232
- }
233
- if (c === boundary[index + 2]) {
234
- index++;
235
- }
236
- break;
237
- case S.HEADER_FIELD_START:
238
- state = S.HEADER_FIELD;
239
- mark("onHeaderField");
240
- index = 0;
241
- // falls through
242
- case S.HEADER_FIELD:
243
- if (c === CR) {
244
- clear("onHeaderField");
245
- state = S.HEADERS_ALMOST_DONE;
246
- break;
247
- }
248
- index++;
249
- if (c === HYPHEN) {
250
- break;
251
- }
252
- if (c === COLON) {
253
- if (index === 1) {
254
- return;
255
- }
256
- dataCallback("onHeaderField", true);
257
- state = S.HEADER_VALUE_START;
258
- break;
259
- }
260
- cl = lower(c);
261
- if (cl < A || cl > Z) {
262
- return;
263
- }
264
- break;
265
- case S.HEADER_VALUE_START:
266
- if (c === SPACE) {
267
- break;
268
- }
269
- mark("onHeaderValue");
270
- state = S.HEADER_VALUE;
271
- // falls through
272
- case S.HEADER_VALUE:
273
- if (c === CR) {
274
- dataCallback("onHeaderValue", true);
275
- callback("onHeaderEnd");
276
- state = S.HEADER_VALUE_ALMOST_DONE;
277
- }
278
- break;
279
- case S.HEADER_VALUE_ALMOST_DONE:
280
- if (c !== LF) {
281
- return;
282
- }
283
- state = S.HEADER_FIELD_START;
284
- break;
285
- case S.HEADERS_ALMOST_DONE:
286
- if (c !== LF) {
287
- return;
288
- }
289
- callback("onHeadersEnd");
290
- state = S.PART_DATA_START;
291
- break;
292
- case S.PART_DATA_START:
293
- state = S.PART_DATA;
294
- mark("onPartData");
295
- // falls through
296
- case S.PART_DATA:
297
- previousIndex = index;
298
- if (index === 0) {
299
- i += boundaryEnd;
300
- while (i < bufferLength && !(data[i] in boundaryChars)) {
301
- i += boundaryLength;
302
- }
303
- i -= boundaryEnd;
304
- c = data[i];
305
- }
306
- if (index < boundary.length) {
307
- if (boundary[index] === c) {
308
- if (index === 0) {
309
- dataCallback("onPartData", true);
310
- }
311
- index++;
312
- } else {
313
- index = 0;
314
- }
315
- } else if (index === boundary.length) {
316
- index++;
317
- if (c === CR) {
318
- flags |= F.PART_BOUNDARY;
319
- } else if (c === HYPHEN) {
320
- flags |= F.LAST_BOUNDARY;
321
- } else {
322
- index = 0;
323
- }
324
- } else if (index - 1 === boundary.length) {
325
- if (flags & F.PART_BOUNDARY) {
326
- index = 0;
327
- if (c === LF) {
328
- flags &= ~F.PART_BOUNDARY;
329
- callback("onPartEnd");
330
- callback("onPartBegin");
331
- state = S.HEADER_FIELD_START;
332
- break;
333
- }
334
- } else if (flags & F.LAST_BOUNDARY) {
335
- if (c === HYPHEN) {
336
- callback("onPartEnd");
337
- state = S.END;
338
- flags = 0;
339
- } else {
340
- index = 0;
341
- }
342
- } else {
343
- index = 0;
344
- }
345
- }
346
- if (index > 0) {
347
- lookbehind[index - 1] = c;
348
- } else if (previousIndex > 0) {
349
- const _lookbehind = new Uint8Array(lookbehind.buffer, lookbehind.byteOffset, lookbehind.byteLength);
350
- callback("onPartData", 0, previousIndex, _lookbehind);
351
- previousIndex = 0;
352
- mark("onPartData");
353
- i--;
354
- }
355
- break;
356
- case S.END:
357
- break;
358
- default:
359
- throw new Error(`Unexpected state entered: ${state}`);
360
- }
361
- }
362
- dataCallback("onHeaderField");
363
- dataCallback("onHeaderValue");
364
- dataCallback("onPartData");
365
- this.index = index;
366
- this.state = state;
367
- this.flags = flags;
368
- }
369
- end() {
370
- if (this.state === S.HEADER_FIELD_START && this.index === 0 || this.state === S.PART_DATA && this.index === this.boundary.length) {
371
- this.onPartEnd();
372
- } else if (this.state !== S.END) {
373
- throw new Error("MultipartParser.end(): stream ended unexpectedly");
374
- }
375
- }
376
- };
377
- __name(_fileName, "_fileName");
378
- __name(toFormData, "toFormData");
379
- }
380
- });
381
- init_multipart_parser();
382
- export {
383
- toFormData
384
- };
@@ -1,24 +0,0 @@
1
- // Force strict mode and setup for ESM
2
- "use strict";
3
- import {
4
- ReadFileTool
5
- } from "./chunk-K6O2NBMF.js";
6
- import "./chunk-UWCTAVOD.js";
7
- 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";
14
- import "./chunk-XEGHDASV.js";
15
- import "./chunk-XP27SJMH.js";
16
- import "./chunk-ZERZSAZL.js";
17
- import "./chunk-QN5NZ3UQ.js";
18
- import "./chunk-BR4QREVK.js";
19
- import "./chunk-QWSRH265.js";
20
- import "./chunk-A4BMJM77.js";
21
- import "./chunk-J2S4EL5Y.js";
22
- export {
23
- ReadFileTool
24
- };
@@ -1,40 +0,0 @@
1
- // Force strict mode and setup for ESM
2
- "use strict";
3
- import {
4
- RipGrepTool,
5
- _resetRipGrepCachesForTest
6
- } from "./chunk-3OCRHZA3.js";
7
- import "./chunk-K5PGHDBN.js";
8
- import "./chunk-N4WOREMD.js";
9
- import "./chunk-O4PICXES.js";
10
- import "./chunk-TW522KN6.js";
11
- import "./chunk-MLZQVCF3.js";
12
- import "./chunk-G7YTSRES.js";
13
- import "./chunk-4AOCVI6J.js";
14
- import "./chunk-77WXWU44.js";
15
- import "./chunk-F23NCRJ2.js";
16
- import "./chunk-6PCB2DEF.js";
17
- import "./chunk-K6O2NBMF.js";
18
- import "./chunk-UWCTAVOD.js";
19
- import "./chunk-OFEVLU4C.js";
20
- import "./chunk-PR4T27R7.js";
21
- import "./chunk-MAY32HXD.js";
22
- import "./chunk-D5NTAHYL.js";
23
- import "./chunk-MYAKAFEC.js";
24
- import "./chunk-66CXYE4B.js";
25
- import "./chunk-NCTLV2NB.js";
26
- import "./chunk-XEGHDASV.js";
27
- import "./chunk-GGNTZ2NH.js";
28
- import "./chunk-KXZ4TJB4.js";
29
- import "./chunk-XP27SJMH.js";
30
- import "./chunk-XKS5KBFJ.js";
31
- import "./chunk-ZERZSAZL.js";
32
- import "./chunk-QN5NZ3UQ.js";
33
- import "./chunk-BR4QREVK.js";
34
- import "./chunk-QWSRH265.js";
35
- import "./chunk-A4BMJM77.js";
36
- import "./chunk-J2S4EL5Y.js";
37
- export {
38
- RipGrepTool,
39
- _resetRipGrepCachesForTest
40
- };
@@ -1,151 +0,0 @@
1
- // Force strict mode and setup for ESM
2
- "use strict";
3
- import {
4
- BaseDeclarativeTool,
5
- BaseToolInvocation,
6
- ToolDisplayNames,
7
- ToolNames
8
- } from "./chunk-XEGHDASV.js";
9
- import "./chunk-XP27SJMH.js";
10
- import "./chunk-QWSRH265.js";
11
- import {
12
- init_esbuild_shims
13
- } from "./chunk-A4BMJM77.js";
14
- import {
15
- __name
16
- } from "./chunk-J2S4EL5Y.js";
17
-
18
- // packages/core/src/tools/send-message.ts
19
- init_esbuild_shims();
20
- var SendMessageInvocation = class extends BaseToolInvocation {
21
- constructor(config, params) {
22
- super(params);
23
- this.config = config;
24
- }
25
- static {
26
- __name(this, "SendMessageInvocation");
27
- }
28
- getDescription() {
29
- return `Send message to task ${this.params.task_id}`;
30
- }
31
- /**
32
- * Send-message routes free-form text into a running background task,
33
- * which will then execute it as a new instruction with full tool
34
- * access. Treat it as a privileged sink — the L4 default must not be
35
- * 'allow', because that would let the scheduler auto-approve in
36
- * AUTO mode (where 'allow' short-circuits the classifier). 'ask' lets
37
- * AUTO route through the classifier so the destination task and
38
- * message text can be inspected.
39
- */
40
- async getDefaultPermission() {
41
- return "ask";
42
- }
43
- async execute(_signal) {
44
- const registry = this.config.getBackgroundTaskRegistry();
45
- const entry = registry.get(this.params.task_id);
46
- if (!entry) {
47
- return {
48
- llmContent: `Error: No background task found with ID "${this.params.task_id}".`,
49
- returnDisplay: "Task not found.",
50
- error: {
51
- message: `Task not found: ${this.params.task_id}`,
52
- type: "send_message_not_found" /* SEND_MESSAGE_NOT_FOUND */
53
- }
54
- };
55
- }
56
- if (entry.status === "paused") {
57
- const resumed = await this.config.resumeBackgroundAgent(
58
- this.params.task_id,
59
- this.params.message
60
- );
61
- if (!resumed) {
62
- return {
63
- llmContent: `Error: Background task "${this.params.task_id}" could not be resumed.`,
64
- returnDisplay: "Task could not be resumed.",
65
- error: {
66
- message: `Task could not be resumed: ${this.params.task_id}`,
67
- type: "send_message_not_running" /* SEND_MESSAGE_NOT_RUNNING */
68
- }
69
- };
70
- }
71
- return {
72
- llmContent: `Background task "${this.params.task_id}" resumed with your message as the first continuation instruction.`,
73
- returnDisplay: `Resumed ${entry.description}`
74
- };
75
- }
76
- if (entry.status !== "running") {
77
- return {
78
- llmContent: `Error: Background task "${this.params.task_id}" is not running (status: ${entry.status}). Cannot send messages to stopped tasks.`,
79
- returnDisplay: `Task not running (${entry.status}).`,
80
- error: {
81
- message: `Task is ${entry.status}: ${this.params.task_id}`,
82
- type: "send_message_not_running" /* SEND_MESSAGE_NOT_RUNNING */
83
- }
84
- };
85
- }
86
- registry.queueMessage(this.params.task_id, this.params.message);
87
- return {
88
- llmContent: `Message queued for delivery to background task "${this.params.task_id}". The task will receive it at the next tool-round boundary.`,
89
- returnDisplay: `Message queued for ${entry.description}`
90
- };
91
- }
92
- };
93
- var SendMessageTool = class _SendMessageTool extends BaseDeclarativeTool {
94
- constructor(config) {
95
- super(
96
- _SendMessageTool.Name,
97
- ToolDisplayNames.SEND_MESSAGE,
98
- "Send a text message to a background task. Running tasks receive it at the next tool-round boundary. Paused recovered tasks are resumed first and use the message as their first continuation instruction.",
99
- "other" /* Other */,
100
- {
101
- type: "object",
102
- properties: {
103
- task_id: {
104
- type: "string",
105
- description: "The ID of the background task (from the launch response or a recovered paused task)."
106
- },
107
- message: {
108
- type: "string",
109
- description: "The text message to send to the task."
110
- }
111
- },
112
- required: ["task_id", "message"],
113
- additionalProperties: false
114
- },
115
- true,
116
- // isOutputMarkdown
117
- false,
118
- // canUpdateOutput
119
- true,
120
- // shouldDefer — sending messages to tasks is infrequent
121
- false,
122
- // alwaysLoad
123
- "send message task communicate notify"
124
- );
125
- this.config = config;
126
- }
127
- static {
128
- __name(this, "SendMessageTool");
129
- }
130
- static Name = ToolNames.SEND_MESSAGE;
131
- createInvocation(params) {
132
- return new SendMessageInvocation(this.config, params);
133
- }
134
- /**
135
- * Forward both fields verbatim to the classifier — `task_id` identifies
136
- * the privileged sink and the `message` itself is the new instruction
137
- * the background task will execute, so the classifier needs the full
138
- * text to evaluate the action's safety.
139
- */
140
- toAutoClassifierInput(params) {
141
- return { task_id: params.task_id, message: params.message };
142
- }
143
- };
144
- export {
145
- SendMessageTool
146
- };
147
- /**
148
- * @license
149
- * Copyright 2025 Qwen
150
- * SPDX-License-Identifier: Apache-2.0
151
- */
@@ -1,48 +0,0 @@
1
- // Force strict mode and setup for ESM
2
- "use strict";
3
- import {
4
- OUTPUT_UPDATE_INTERVAL_MS,
5
- ShellTool,
6
- ShellToolInvocation,
7
- buildLongRunningForegroundHint,
8
- detectBlockedSleepPattern,
9
- parseNumstat
10
- } from "./chunk-3OCRHZA3.js";
11
- import "./chunk-K5PGHDBN.js";
12
- import "./chunk-N4WOREMD.js";
13
- import "./chunk-O4PICXES.js";
14
- import "./chunk-TW522KN6.js";
15
- import "./chunk-MLZQVCF3.js";
16
- import "./chunk-G7YTSRES.js";
17
- import "./chunk-4AOCVI6J.js";
18
- import "./chunk-77WXWU44.js";
19
- import "./chunk-F23NCRJ2.js";
20
- import "./chunk-6PCB2DEF.js";
21
- import "./chunk-K6O2NBMF.js";
22
- import "./chunk-UWCTAVOD.js";
23
- import "./chunk-OFEVLU4C.js";
24
- import "./chunk-PR4T27R7.js";
25
- import "./chunk-MAY32HXD.js";
26
- import "./chunk-D5NTAHYL.js";
27
- import "./chunk-MYAKAFEC.js";
28
- import "./chunk-66CXYE4B.js";
29
- import "./chunk-NCTLV2NB.js";
30
- import "./chunk-XEGHDASV.js";
31
- import "./chunk-GGNTZ2NH.js";
32
- import "./chunk-KXZ4TJB4.js";
33
- import "./chunk-XP27SJMH.js";
34
- import "./chunk-XKS5KBFJ.js";
35
- import "./chunk-ZERZSAZL.js";
36
- import "./chunk-QN5NZ3UQ.js";
37
- import "./chunk-BR4QREVK.js";
38
- import "./chunk-QWSRH265.js";
39
- import "./chunk-A4BMJM77.js";
40
- import "./chunk-J2S4EL5Y.js";
41
- export {
42
- OUTPUT_UPDATE_INTERVAL_MS,
43
- ShellTool,
44
- ShellToolInvocation,
45
- buildLongRunningForegroundHint,
46
- detectBlockedSleepPattern,
47
- parseNumstat
48
- };