@wirecat/bitrix24-cli 0.4.0 → 0.5.0

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 (248) hide show
  1. package/CHANGELOG.md +78 -0
  2. package/README.md +84 -9
  3. package/dist/api-keys.d.ts +18 -13
  4. package/dist/api-keys.d.ts.map +1 -1
  5. package/dist/api-keys.js +79 -22
  6. package/dist/api-keys.js.map +1 -1
  7. package/dist/bin/b24.js +2 -2
  8. package/dist/bitrix/errors.js +1 -1
  9. package/dist/bitrix/errors.js.map +1 -1
  10. package/dist/bitrix/transport.d.ts +1 -1
  11. package/dist/bitrix/transport.d.ts.map +1 -1
  12. package/dist/bitrix/transport.js +20 -6
  13. package/dist/bitrix/transport.js.map +1 -1
  14. package/dist/body.d.ts +14 -0
  15. package/dist/body.d.ts.map +1 -0
  16. package/dist/body.js +44 -0
  17. package/dist/body.js.map +1 -0
  18. package/dist/bundle/{chunk-JAS3OZSP.js → all-profiles-CANIDIDS.js} +12 -7
  19. package/dist/bundle/{anthropic-QCYLKSJJ.js → anthropic-JUJB4DCF.js} +5 -5
  20. package/dist/bundle/{app-server-FSLZ2Y6N.js → app-server-3V5Z4PTK.js} +68 -54
  21. package/dist/bundle/b24.js +18 -12
  22. package/dist/bundle/{bun-UYRQXF33.js → bun-LKMV5TY7.js} +2 -2
  23. package/dist/bundle/{bun-sqlite-GXME7EMT.js → bun-sqlite-S56EF74S.js} +3 -3
  24. package/dist/bundle/{chunk-D2IRPC5I.js → chunk-2I4KWS3H.js} +6 -6
  25. package/dist/bundle/chunk-36PO5NWY.js +147 -0
  26. package/dist/bundle/{chunk-COOOXDKZ.js → chunk-42F7Q7V6.js} +3 -3
  27. package/dist/bundle/{chunk-POUSZWMP.js → chunk-4D3K6GZW.js} +18 -4
  28. package/dist/bundle/chunk-5D4MJQ6X.js +22 -0
  29. package/dist/bundle/chunk-5JOPERVF.js +84 -0
  30. package/dist/bundle/chunk-6A4UPWDC.js +15 -0
  31. package/dist/bundle/{chunk-O7FVOICH.js → chunk-6MGWIZG4.js} +1 -1
  32. package/dist/bundle/{chunk-B252WFK7.js → chunk-6YJTNZ7U.js} +13 -13
  33. package/dist/bundle/{chunk-2D5W4LWL.js → chunk-7FBFJ6B4.js} +4 -2
  34. package/dist/bundle/chunk-7VCMOTQP.js +55 -0
  35. package/dist/bundle/{chunk-6BLVBGRK.js → chunk-A5IMMGYU.js} +36 -34
  36. package/dist/bundle/{chunk-66QLBRIT.js → chunk-ASEHTBNK.js} +1 -1
  37. package/dist/bundle/{chunk-MY6FAZRA.js → chunk-B6LPJYPQ.js} +2 -2
  38. package/dist/bundle/{chunk-EQLWU6ZB.js → chunk-BHEE2K6C.js} +7 -7
  39. package/dist/bundle/chunk-BYZQBE63.js +971 -0
  40. package/dist/bundle/{chunk-J7OMY6EO.js → chunk-COKGNTDQ.js} +1477 -723
  41. package/dist/bundle/{chunk-QVZSLBR6.js → chunk-DVFYRQGE.js} +1 -1
  42. package/dist/bundle/{chunk-Q7Z5IMVY.js → chunk-DVSIBZ3G.js} +1 -1
  43. package/dist/bundle/chunk-EJEIXC6Y.js +273 -0
  44. package/dist/bundle/chunk-EYTGCM44.js +130 -0
  45. package/dist/bundle/{chunk-SBW2Y7AZ.js → chunk-EYYOKT23.js} +26 -26
  46. package/dist/bundle/{chunk-Y5PPMGCS.js → chunk-FCWPIWSR.js} +2 -2
  47. package/dist/bundle/{chunk-AOUNT22U.js → chunk-FSWRMQWX.js} +2 -2
  48. package/dist/bundle/{chunk-ADLS6FVG.js → chunk-FXBHOCJK.js} +1 -1
  49. package/dist/bundle/chunk-G5MW6RCM.js +723 -0
  50. package/dist/bundle/{chunk-4OVK5XW2.js → chunk-GLTKRLFT.js} +8 -8
  51. package/dist/bundle/chunk-GUUZQ7NE.js +581 -0
  52. package/dist/bundle/{chunk-XOPMSWFC.js → chunk-H6RIPOOI.js} +36 -3
  53. package/dist/bundle/{chunk-GTMCLOYY.js → chunk-HGFNC4CR.js} +1447 -430
  54. package/dist/bundle/{chunk-IF27EQN6.js → chunk-IERYD2N2.js} +6 -6
  55. package/dist/bundle/{chunk-Q4ILKTV4.js → chunk-IGCLMEMB.js} +3 -3
  56. package/dist/bundle/{chunk-2IZ6GGU2.js → chunk-J7WCSZ2Q.js} +410 -918
  57. package/dist/bundle/{chunk-CR3TLGM4.js → chunk-JZYHQ4HB.js} +3 -3
  58. package/dist/bundle/{chunk-XR5SUCAC.js → chunk-K4QM3X5F.js} +4 -4
  59. package/dist/bundle/{chunk-OWILUBCI.js → chunk-KFSMY7SZ.js} +2 -2
  60. package/dist/bundle/{chunk-AMVRNYD6.js → chunk-KPEDH5T4.js} +1 -1
  61. package/dist/bundle/{chunk-NEK7LKC6.js → chunk-KUY7LII2.js} +4 -4
  62. package/dist/bundle/{chunk-NDSOBIR3.js → chunk-LFXDHLFR.js} +3 -3
  63. package/dist/bundle/{chunk-ZU4HXKEW.js → chunk-LGLT4JB6.js} +3 -3
  64. package/dist/bundle/{chunk-EIGPMMGC.js → chunk-LM4OOBAW.js} +3 -3
  65. package/dist/bundle/chunk-M74BSKMA.js +234 -0
  66. package/dist/bundle/{chunk-MPI2FDJ4.js → chunk-MMMT6ORT.js} +11 -11
  67. package/dist/bundle/{chunk-F5NH3UJQ.js → chunk-NGYD6QTE.js} +2 -2
  68. package/dist/bundle/{chunk-6ERX33NC.js → chunk-NO6QOPVT.js} +10 -19
  69. package/dist/bundle/chunk-O6XC7DZI.js +804 -0
  70. package/dist/bundle/chunk-OE3NFB53.js +64 -0
  71. package/dist/bundle/{chunk-VTIUWHZ3.js → chunk-OUMFNB34.js} +13 -149
  72. package/dist/bundle/{chunk-VMQL4GNH.js → chunk-P2RQTNVJ.js} +806 -850
  73. package/dist/bundle/{chunk-XKQZLR2X.js → chunk-PBIBGIZ7.js} +1 -1
  74. package/dist/bundle/{chunk-YFZXI3NN.js → chunk-Q6VQHTRW.js} +2 -2
  75. package/dist/bundle/{chunk-OKDC6CLH.js → chunk-QHBCNVUG.js} +5 -5
  76. package/dist/bundle/{chunk-WJRBX5QB.js → chunk-QNOXAQ6Y.js} +4 -4
  77. package/dist/bundle/{chunk-GTFRSYYJ.js → chunk-R5F2O5GX.js} +7 -269
  78. package/dist/bundle/{chunk-OCRCVLZQ.js → chunk-R5PBSKJL.js} +1 -1
  79. package/dist/bundle/{chunk-JB7OXYAU.js → chunk-RS2BARUU.js} +4 -4
  80. package/dist/bundle/chunk-TG3DSPT5.js +14 -0
  81. package/dist/bundle/{chunk-UH56WLDS.js → chunk-U22JMKUO.js} +6 -125
  82. package/dist/bundle/chunk-U66Q5TVK.js +106 -0
  83. package/dist/bundle/{chunk-NWKXMMON.js → chunk-UCHMQWON.js} +136 -33
  84. package/dist/bundle/{chunk-DQIQIZQS.js → chunk-VMJS7FJZ.js} +451 -433
  85. package/dist/bundle/{chunk-IWEWDVZ6.js → chunk-VMVAQHDC.js} +77 -615
  86. package/dist/bundle/{chunk-M5XMAUGZ.js → chunk-WWMCJFMT.js} +2 -2
  87. package/dist/bundle/{chunk-OYLJHX74.js → chunk-XTA5TN3H.js} +1 -1
  88. package/dist/bundle/{chunk-ELBOQHJA.js → chunk-XUHHBEA7.js} +652 -131
  89. package/dist/bundle/{chunk-BHZ5VDDY.js → chunk-YDZHO4LT.js} +13 -13
  90. package/dist/bundle/{chunk-NKLLI4B2.js → chunk-ZKINZFIT.js} +6 -6
  91. package/dist/bundle/{chunk-GTDOUP6L.js → chunk-ZSQXSIFQ.js} +85 -38
  92. package/dist/bundle/{chunk-LAYH344Y.js → chunk-ZZEHDIEG.js} +58 -54
  93. package/dist/bundle/command-contract-OQV6H7SR.js +36 -0
  94. package/dist/bundle/{decode-IF2F2SFC.js → decode-QSTBX4MG.js} +3 -3
  95. package/dist/bundle/{echarts-WDDVEJO2.js → echarts-JZELFH2N.js} +2 -2
  96. package/dist/bundle/{embed-VDUGYEAR.js → embed-4RIW2LVH.js} +4 -4
  97. package/dist/bundle/{embedder-DUN62H3Z.js → embedder-SW7DTWSL.js} +7 -7
  98. package/dist/bundle/{first-run-NDGYBQEN.js → first-run-7AISOSOM.js} +8 -8
  99. package/dist/bundle/first-screen-NMHNFZ2B.js +34 -0
  100. package/dist/bundle/{instructions-JIIKWS7X.js → instructions-BZE5YUGG.js} +1 -1
  101. package/dist/bundle/{mcp-33JX6KP4.js → mcp-SDWHDJTY.js} +2 -2
  102. package/dist/bundle/{node-P4E63KXA.js → node-KM3CUABH.js} +9 -9
  103. package/dist/bundle/{node-K57WT42O.js → node-LTKZIO4U.js} +2 -2
  104. package/dist/bundle/{node-sqlite-KS6ORRIG.js → node-sqlite-HQ5PN2RH.js} +4 -4
  105. package/dist/bundle/{oauth-SLSANN37.js → oauth-UH6FOZQL.js} +5 -5
  106. package/dist/bundle/{open-WJPHADEX.js → open-TSUP3XGL.js} +3 -3
  107. package/dist/bundle/{openai-HXB3GTOD.js → openai-GVEE52E3.js} +14 -14
  108. package/dist/bundle/{process-P73TFAXT.js → process-AGXY76ZE.js} +1 -1
  109. package/dist/bundle/{program-7BMG5NIN.js → program-BI4A4HFJ.js} +1045 -1048
  110. package/dist/bundle/{prompt-WDPV37R4.js → prompt-NRSUY7FA.js} +3 -3
  111. package/dist/bundle/{recognize-CXIFL6IV.js → recognize-NPDPQ6PJ.js} +2 -2
  112. package/dist/bundle/{remote-Q4VJ4OQW.js → remote-HFASMVLB.js} +5 -5
  113. package/dist/bundle/{rerank-SUFYK63I.js → rerank-TL6Z6F7K.js} +5 -5
  114. package/dist/bundle/{chunk-XG6QKS7L.js → serve-VB4DHDZQ.js} +8 -6
  115. package/dist/bundle/server-T5EDRPJI.js +68 -0
  116. package/dist/bundle/{chunk-K7XWCZF6.js → server-Z6MW6C37.js} +50 -14
  117. package/dist/bundle/source-4IGO5J7E.js +237 -0
  118. package/dist/bundle/sqlite-runtime-YS4POY3W.js +17 -0
  119. package/dist/bundle/{state-EZCCXQV7.js → state-ISZVVZGR.js} +4 -4
  120. package/dist/bundle/store-IZJBAKJV.js +58 -0
  121. package/dist/bundle/{store-MZ7JBYR6.js → store-L76MSQC3.js} +17 -12
  122. package/dist/bundle/store-PBTIB7BD.js +207 -0
  123. package/dist/bundle/store-maintenance-command-YFKII7TF.js +58 -0
  124. package/dist/bundle/writer-3O5EYMFE.js +214 -0
  125. package/dist/commands/api.d.ts.map +1 -1
  126. package/dist/commands/api.js +34 -33
  127. package/dist/commands/api.js.map +1 -1
  128. package/dist/commands/crm-shared.d.ts +4 -0
  129. package/dist/commands/crm-shared.d.ts.map +1 -0
  130. package/dist/commands/crm-shared.js +94 -0
  131. package/dist/commands/crm-shared.js.map +1 -0
  132. package/dist/commands/crm-writes.d.ts +0 -1
  133. package/dist/commands/crm-writes.d.ts.map +1 -1
  134. package/dist/commands/crm-writes.js +31 -92
  135. package/dist/commands/crm-writes.js.map +1 -1
  136. package/dist/commands/crm.d.ts.map +1 -1
  137. package/dist/commands/crm.js +1 -45
  138. package/dist/commands/crm.js.map +1 -1
  139. package/dist/commands/session.d.ts.map +1 -1
  140. package/dist/commands/session.js +1 -0
  141. package/dist/commands/session.js.map +1 -1
  142. package/dist/commands/write.d.ts +1 -6
  143. package/dist/commands/write.d.ts.map +1 -1
  144. package/dist/commands/write.js +7 -16
  145. package/dist/commands/write.js.map +1 -1
  146. package/dist/config.d.ts +0 -5
  147. package/dist/config.d.ts.map +1 -1
  148. package/dist/config.js +6 -9
  149. package/dist/config.js.map +1 -1
  150. package/dist/crm/capabilities.d.ts +7 -0
  151. package/dist/crm/capabilities.d.ts.map +1 -0
  152. package/dist/crm/capabilities.js +7 -0
  153. package/dist/crm/capabilities.js.map +1 -0
  154. package/dist/crm/conditions.d.ts +1 -1
  155. package/dist/crm/conditions.d.ts.map +1 -1
  156. package/dist/crm/conditions.js +3 -5
  157. package/dist/crm/conditions.js.map +1 -1
  158. package/dist/crm/custom-query.d.ts +1 -1
  159. package/dist/crm/custom-query.d.ts.map +1 -1
  160. package/dist/crm/custom-query.js +2 -2
  161. package/dist/crm/custom-query.js.map +1 -1
  162. package/dist/crm/deal.d.ts +4 -28
  163. package/dist/crm/deal.d.ts.map +1 -1
  164. package/dist/crm/deal.js +15 -48
  165. package/dist/crm/deal.js.map +1 -1
  166. package/dist/crm/fields.d.ts +2 -26
  167. package/dist/crm/fields.d.ts.map +1 -1
  168. package/dist/crm/fields.js +2 -67
  169. package/dist/crm/fields.js.map +1 -1
  170. package/dist/crm/items.d.ts.map +1 -1
  171. package/dist/crm/items.js +6 -5
  172. package/dist/crm/items.js.map +1 -1
  173. package/dist/crm/lead.d.ts +5 -37
  174. package/dist/crm/lead.d.ts.map +1 -1
  175. package/dist/crm/lead.js +15 -61
  176. package/dist/crm/lead.js.map +1 -1
  177. package/dist/crm/pipelines.d.ts +5 -0
  178. package/dist/crm/pipelines.d.ts.map +1 -0
  179. package/dist/crm/pipelines.js +54 -0
  180. package/dist/crm/pipelines.js.map +1 -0
  181. package/dist/crm/product.d.ts.map +1 -1
  182. package/dist/crm/product.js +2 -2
  183. package/dist/crm/product.js.map +1 -1
  184. package/dist/crm/rest3-fields.d.ts +3 -0
  185. package/dist/crm/rest3-fields.d.ts.map +1 -0
  186. package/dist/crm/rest3-fields.js +38 -0
  187. package/dist/crm/rest3-fields.js.map +1 -0
  188. package/dist/crm/source.d.ts +15 -0
  189. package/dist/crm/source.d.ts.map +1 -0
  190. package/dist/crm/source.js +122 -0
  191. package/dist/crm/source.js.map +1 -0
  192. package/dist/crm/user.d.ts.map +1 -1
  193. package/dist/crm/user.js +2 -2
  194. package/dist/crm/user.js.map +1 -1
  195. package/dist/crm/values.d.ts +19 -4
  196. package/dist/crm/values.d.ts.map +1 -1
  197. package/dist/crm/values.js +28 -2
  198. package/dist/crm/values.js.map +1 -1
  199. package/dist/crm/writer.d.ts +9 -0
  200. package/dist/crm/writer.d.ts.map +1 -0
  201. package/dist/crm/writer.js +119 -0
  202. package/dist/crm/writer.js.map +1 -0
  203. package/dist/program.d.ts.map +1 -1
  204. package/dist/program.js +51 -6
  205. package/dist/program.js.map +1 -1
  206. package/dist/store.d.ts +15 -0
  207. package/dist/store.d.ts.map +1 -0
  208. package/dist/store.js +33 -0
  209. package/dist/store.js.map +1 -0
  210. package/dist/version.d.ts +1 -1
  211. package/dist/version.js +1 -1
  212. package/package.json +4 -6
  213. package/skills/bitrix24-cli/SKILL.md +16 -15
  214. package/dist/bundle/all-profiles-MBQZCOVK.js +0 -24
  215. package/dist/bundle/chunk-UCLWWSQK.js +0 -48
  216. package/dist/bundle/command-contract-UON4EIC4.js +0 -30
  217. package/dist/bundle/first-screen-QAVKP5RF.js +0 -28
  218. package/dist/bundle/mcp-57EQ6QJO.js +0 -171
  219. package/dist/bundle/mcp-PFJER2DE.js +0 -87
  220. package/dist/bundle/serve-B7PGFOC2.js +0 -19
  221. package/dist/bundle/server-4DBNJWW6.js +0 -58
  222. package/dist/bundle/server-OKE7SXJ2.js +0 -45
  223. package/dist/bundle/store-maintenance-command-T5QZMENJ.js +0 -47
  224. package/dist/commands/doctor.d.ts +0 -77
  225. package/dist/commands/doctor.d.ts.map +0 -1
  226. package/dist/commands/doctor.js +0 -74
  227. package/dist/commands/doctor.js.map +0 -1
  228. package/dist/commands/fields.d.ts +0 -3
  229. package/dist/commands/fields.d.ts.map +0 -1
  230. package/dist/commands/fields.js +0 -45
  231. package/dist/commands/fields.js.map +0 -1
  232. package/dist/commands/mcp.d.ts +0 -3
  233. package/dist/commands/mcp.d.ts.map +0 -1
  234. package/dist/commands/mcp.js +0 -97
  235. package/dist/commands/mcp.js.map +0 -1
  236. package/dist/crm/pipeline.d.ts +0 -17
  237. package/dist/crm/pipeline.d.ts.map +0 -1
  238. package/dist/crm/pipeline.js +0 -42
  239. package/dist/crm/pipeline.js.map +0 -1
  240. package/dist/crm/stage.d.ts +0 -20
  241. package/dist/crm/stage.d.ts.map +0 -1
  242. package/dist/crm/stage.js +0 -65
  243. package/dist/crm/stage.js.map +0 -1
  244. package/dist/mcp.d.ts +0 -29
  245. package/dist/mcp.d.ts.map +0 -1
  246. package/dist/mcp.js +0 -102
  247. package/dist/mcp.js.map +0 -1
  248. /package/dist/bundle/{chunk-NDTJE6JQ.js → chunk-ZQ3GWKDQ.js} +0 -0
@@ -0,0 +1,106 @@
1
+ import { createRequire as __bundleRequire } from "node:module";
2
+ const require = __bundleRequire(import.meta.url);
3
+ import {
4
+ CAPABILITY_STATEMENTS,
5
+ storeCapable
6
+ } from "./chunk-2I4KWS3H.js";
7
+ import {
8
+ importFrom
9
+ } from "./chunk-Y5E2WNWB.js";
10
+ import {
11
+ __name
12
+ } from "./chunk-ZVVMGPBJ.js";
13
+
14
+ // node_modules/.pnpm/@wirecat+cli-core@0.601.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4fddd50439ae4e4f952967ea26554e7b/node_modules/@wirecat/cli-core/dist/sqlite-runtime.js
15
+ import { spawn, spawnSync } from "node:child_process";
16
+ import { readFileSync } from "node:fs";
17
+ import { dirname } from "node:path";
18
+ var RESTARTED = "CLI_MESSAGING_SQLITE_RESTARTED";
19
+ var USER_LIBRARY_PATH = "CLI_MESSAGING_USER_LD_LIBRARY_PATH";
20
+ var FORWARDED = ["SIGTERM", "SIGHUP", "SIGQUIT"];
21
+ var ensureSqlite = /* @__PURE__ */ __name(async (runtime = nodeRuntime()) => {
22
+ const { env } = runtime;
23
+ if (env[RESTARTED]) {
24
+ if (env[USER_LIBRARY_PATH] === void 0)
25
+ delete env.LD_LIBRARY_PATH;
26
+ else
27
+ env.LD_LIBRARY_PATH = env[USER_LIBRARY_PATH];
28
+ delete env[USER_LIBRARY_PATH];
29
+ delete env[RESTARTED];
30
+ return;
31
+ }
32
+ if (runtime.bun || runtime.platform !== "linux")
33
+ return;
34
+ const maps = runtime.maps();
35
+ if (!maps.includes("libsqlite3"))
36
+ return;
37
+ if (await runtime.capable())
38
+ return;
39
+ const library = await runtime.library(maps.includes("ld-musl"));
40
+ if (!library)
41
+ return;
42
+ const restarted = {
43
+ ...env,
44
+ LD_LIBRARY_PATH: [dirname(library.path), env.LD_LIBRARY_PATH].filter(Boolean).join(":"),
45
+ [RESTARTED]: "1"
46
+ };
47
+ if (env.LD_LIBRARY_PATH !== void 0)
48
+ restarted[USER_LIBRARY_PATH] = env.LD_LIBRARY_PATH;
49
+ if (!runtime.works(restarted, library.version))
50
+ return;
51
+ await runtime.restart(restarted);
52
+ }, "ensureSqlite");
53
+ var trialScript = /* @__PURE__ */ __name((version) => `
54
+ const { DatabaseSync } = await import("node:sqlite")
55
+ const database = new DatabaseSync(":memory:")
56
+ if (database.prepare("SELECT sqlite_version() AS v").get().v !== ${JSON.stringify(version)}) process.exit(1)
57
+ for (const statement of ${JSON.stringify(CAPABILITY_STATEMENTS)}) database.exec(statement)
58
+ `, "trialScript");
59
+ var nodeRuntime = /* @__PURE__ */ __name(() => ({
60
+ env: process.env,
61
+ platform: process.platform,
62
+ bun: "Bun" in globalThis,
63
+ maps: /* @__PURE__ */ __name(() => {
64
+ try {
65
+ return readFileSync("/proc/self/maps", "utf8");
66
+ } catch {
67
+ return "";
68
+ }
69
+ }, "maps"),
70
+ capable: /* @__PURE__ */ __name(() => storeCapable().then(() => true, () => false), "capable"),
71
+ library: /* @__PURE__ */ __name(async (musl) => {
72
+ try {
73
+ const { libraryFor, SQLITE_VERSION } = await importFrom(new URL("sqlite-runtime.js", import.meta.resolve("@wirecat/cli-core")).href, "@wirecat/cli-core-sqlite");
74
+ const path = libraryFor({ musl });
75
+ return path === void 0 ? void 0 : { path, version: SQLITE_VERSION };
76
+ } catch {
77
+ return void 0;
78
+ }
79
+ }, "library"),
80
+ works: /* @__PURE__ */ __name((env, version) => spawnSync(process.execPath, ["--no-warnings", "--input-type=module", "-e", trialScript(version)], {
81
+ env,
82
+ stdio: "ignore",
83
+ timeout: 1e4
84
+ }).status === 0, "works"),
85
+ restart: /* @__PURE__ */ __name((env) => relay(spawn(process.execPath, [...process.execArgv, ...process.argv.slice(1)], { env, stdio: "inherit" })), "restart")
86
+ }), "nodeRuntime");
87
+ var relay = /* @__PURE__ */ __name((child, host = process) => new Promise(() => {
88
+ for (const signal of FORWARDED)
89
+ host.on(signal, () => child.kill(signal));
90
+ host.on("SIGINT", () => {
91
+ });
92
+ child.on("error", () => host.exit(1));
93
+ child.on("exit", (code, signal) => {
94
+ if (signal) {
95
+ host.removeAllListeners(signal);
96
+ host.kill(host.pid, signal);
97
+ } else
98
+ host.exit(code ?? 1);
99
+ });
100
+ }), "relay");
101
+
102
+ export {
103
+ ensureSqlite,
104
+ nodeRuntime,
105
+ relay
106
+ };
@@ -6,10 +6,10 @@ import {
6
6
  agentArguments,
7
7
  agentJson,
8
8
  commandAvailability
9
- } from "./chunk-BHZ5VDDY.js";
9
+ } from "./chunk-YDZHO4LT.js";
10
10
  import {
11
11
  callerOf
12
- } from "./chunk-IF27EQN6.js";
12
+ } from "./chunk-IERYD2N2.js";
13
13
  import {
14
14
  QUERY_ARGUMENT,
15
15
  lentConnection,
@@ -17,7 +17,7 @@ import {
17
17
  refuseLacking,
18
18
  servicesFor,
19
19
  storeModeDeps
20
- } from "./chunk-DQIQIZQS.js";
20
+ } from "./chunk-VMJS7FJZ.js";
21
21
  import {
22
22
  DEFAULT_OUTPUT_BYTES,
23
23
  ENTITIES,
@@ -25,40 +25,42 @@ import {
25
25
  REMOTE_WRITE,
26
26
  answerSchema,
27
27
  changesMessenger,
28
- enclosingTraceId,
29
28
  flatten,
30
- inRun,
31
29
  judgedAnswer,
32
30
  judgedEffects,
33
31
  listOf,
34
- newRunId,
35
32
  refuseStoreChange,
36
33
  sealed,
37
- startRecording,
34
+ startRecording
35
+ } from "./chunk-J7WCSZ2Q.js";
36
+ import {
37
+ enclosingTraceId,
38
+ inRun,
39
+ newRunId,
38
40
  traceOf
39
- } from "./chunk-2IZ6GGU2.js";
41
+ } from "./chunk-G5MW6RCM.js";
40
42
  import {
41
43
  currentCaller,
42
44
  keepsSuccess,
43
45
  runContextOf,
44
46
  withCaller
45
- } from "./chunk-6ERX33NC.js";
47
+ } from "./chunk-NO6QOPVT.js";
46
48
  import {
47
49
  failureContext
48
- } from "./chunk-XOPMSWFC.js";
50
+ } from "./chunk-H6RIPOOI.js";
49
51
  import {
50
52
  authorityAllowed,
51
53
  botApiAllowed,
52
54
  keyForCommand,
53
55
  levelFor,
54
56
  readKeysForCommand
55
- } from "./chunk-VTIUWHZ3.js";
57
+ } from "./chunk-OUMFNB34.js";
56
58
  import {
57
59
  MAX_BUFFERED_INPUT
58
- } from "./chunk-YFZXI3NN.js";
60
+ } from "./chunk-Q6VQHTRW.js";
59
61
  import {
60
62
  queryDescription
61
- } from "./chunk-VMQL4GNH.js";
63
+ } from "./chunk-P2RQTNVJ.js";
62
64
  import {
63
65
  COMPACT_FLAG,
64
66
  CliError,
@@ -101,15 +103,15 @@ import {
101
103
  unknown,
102
104
  word,
103
105
  writes
104
- } from "./chunk-SBW2Y7AZ.js";
106
+ } from "./chunk-EYYOKT23.js";
105
107
  import {
106
108
  __name
107
109
  } from "./chunk-ZVVMGPBJ.js";
108
110
 
109
- // node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.80.1_commander@15.0.0_esbuild@0.28.2_type_4c7167080feb2ba6356a64767981f5fd/node_modules/@wirecat/cli-core/dist/mcp/agent.js
111
+ // node_modules/.pnpm/@wirecat+cli-core@0.601.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4fddd50439ae4e4f952967ea26554e7b/node_modules/@wirecat/cli-core/dist/mcp/agent.js
110
112
  import { Readable } from "node:stream";
111
113
 
112
- // node_modules/.pnpm/@wirecat+cli-base@0.80.1_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/standards/lint.js
114
+ // node_modules/.pnpm/@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/standards/lint.js
113
115
  var LINT_SEVERITIES = ["high", "medium", "low"];
114
116
  var lintRuleSchema = strictObject({
115
117
  id: word,
@@ -237,7 +239,7 @@ var overrideSchema = strictObject({
237
239
  });
238
240
  var overridesSchema = array(overrideSchema);
239
241
 
240
- // node_modules/.pnpm/@wirecat+cli-base@0.80.1_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/standards/audit.js
242
+ // node_modules/.pnpm/@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/standards/audit.js
241
243
  var auditRuleSchema = strictObject({ id: word, severity: picklist(LINT_SEVERITIES), summary: text });
242
244
  var defineAuditRules = /* @__PURE__ */ __name((input) => parseRegistry("audit rules", array(auditRuleSchema), input, (rules) => duplicates(rules.map((rule) => rule.id)).map((id) => `"${id}" is listed twice`)), "defineAuditRules");
243
245
  var AUDIT_RULES = defineAuditRules([
@@ -282,11 +284,13 @@ var parityGroupSchema = strictObject({
282
284
  /** Permanent differences, each with its reason; they count against the override budget of the group. */
283
285
  differences: array(strictObject({
284
286
  rule: word,
285
- /** `<clis> <path> <flag>`; with `absent`, only `<path> <flag>`: the CLI list is whoever else has it. */
287
+ /** `<clis> <path> <flag>`; with `absent` or `only`, only `<path> <flag>`: the CLI list is whoever else was compared. */
286
288
  target: text,
287
289
  expected: optional(text),
288
290
  /** The CLI that lacks the path or flag by design; the rest must agree, so other CLIs joining do not stale it. */
289
291
  absent: optional(word),
292
+ /** The one CLI that has the path or flag by design; every other CLI compared must lack it. */
293
+ only: optional(word),
290
294
  reason: pipe(text, minLength(10, "say why, in a sentence"))
291
295
  }))
292
296
  });
@@ -294,7 +298,8 @@ var defineParityGroups = /* @__PURE__ */ __name((input) => parseRegistry("parity
294
298
  ...duplicates(groups.map((group) => group.name)).map((name) => `"${name}" is listed twice`),
295
299
  ...groups.flatMap((group) => [
296
300
  ...duplicates(group.differences.map((entry) => `${entry.rule} ${entry.target}`)).map((both) => `${group.name}: "${both}" is listed twice`),
297
- ...group.differences.filter((entry) => entry.absent && entry.expected).map((entry) => `${group.name}: "${entry.target}" has \`absent\`, which measures the values itself; drop \`expected\``)
301
+ ...group.differences.filter((entry) => (entry.absent || entry.only) && entry.expected).map((entry) => `${group.name}: "${entry.target}" has \`${entry.absent ? "absent" : "only"}\`, which measures the values itself; drop \`expected\``),
302
+ ...group.differences.filter((entry) => entry.absent && entry.only).map((entry) => `${group.name}: "${entry.target}" has both \`absent\` and \`only\`; keep one`)
298
303
  ])
299
304
  ]), "defineParityGroups");
300
305
  var MEMO_HAS_NO_PROFILES = [
@@ -309,13 +314,19 @@ var MEMO_HAS_NO_PROFILES = [
309
314
  absent: "memo",
310
315
  reason: "memo has no profiles: it reads other CLIs' stores and selects their accounts with --source and --account (https://github.com/WireCatLabs/cli-base/issues/390)"
311
316
  }));
317
+ var MEMO_DOCTOR_DEEP = {
318
+ rule: "same-path-contract",
319
+ target: "doctor --deep",
320
+ only: "memo",
321
+ reason: "memo's doctor --deep also checks its own store (cli-memo #672); cli-core's shared doctor leaves --deep to each CLI, and no other CLI has one"
322
+ };
312
323
  var PARITY_GROUPS = defineParityGroups([
313
324
  { name: "messengers", members: ["tg", "max"], covers: "tree", differences: [] },
314
325
  {
315
326
  name: "all",
316
327
  members: ["tg", "max", "memo", "drive", "zm", "wa"],
317
328
  covers: ["commands", "doctor", "skill", "mcp", "upgrade", "search", "notes", "meetings"],
318
- differences: MEMO_HAS_NO_PROFILES
329
+ differences: [...MEMO_HAS_NO_PROFILES, MEMO_DOCTOR_DEEP]
319
330
  },
320
331
  // mail's `search messages` is cli-core's mail search, not the messengers' command: --complete took their 20-odd
321
332
  // differences as inherited (https://github.com/WireCatLabs/cli-base/issues/390). mail is compared everywhere else
@@ -324,7 +335,7 @@ var PARITY_GROUPS = defineParityGroups([
324
335
  name: "mail-shared",
325
336
  members: ["tg", "max", "memo", "drive", "zm", "wa", "mail"],
326
337
  covers: ["commands", "doctor", "skill", "mcp", "upgrade", "notes", "meetings"],
327
- differences: MEMO_HAS_NO_PROFILES
338
+ differences: [...MEMO_HAS_NO_PROFILES, MEMO_DOCTOR_DEEP]
328
339
  },
329
340
  // gcal is compared on what it already shares with every CLI; doctor, mcp, search and skill wait until the published
330
341
  // CLIs agree there (https://github.com/WireCatLabs/cli-base/issues/390), then gcal moves back into "all".
@@ -333,6 +344,14 @@ var PARITY_GROUPS = defineParityGroups([
333
344
  members: ["tg", "max", "memo", "drive", "zm", "wa", "gcal"],
334
345
  covers: ["commands", "upgrade", "notes", "meetings"],
335
346
  differences: []
347
+ },
348
+ // bitrix24-cli's search is cli-core's CRM `search all`, and beeline-cli's meetings take call recordings, not
349
+ // zoom-cli's: both are compared on the root commands every CLI shares, the way gcal and mail are on theirs.
350
+ {
351
+ name: "shared-roots",
352
+ members: ["tg", "max", "memo", "drive", "zm", "wa", "b24", "beeline"],
353
+ covers: ["commands", "doctor", "skill", "mcp", "upgrade"],
354
+ differences: [...MEMO_HAS_NO_PROFILES, MEMO_DOCTOR_DEEP]
336
355
  }
337
356
  ]);
338
357
  var requiredRootSchema = strictObject({ path: pipe(array(segment), minLength(1)), meaning: text });
@@ -346,7 +365,7 @@ var REQUIRED_ROOTS = defineRequiredRoots([
346
365
  { path: ["upgrade"], meaning: "updates the CLI" }
347
366
  ]);
348
367
 
349
- // node_modules/.pnpm/@wirecat+cli-base@0.80.1_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/standards/fields.js
368
+ // node_modules/.pnpm/@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/standards/fields.js
350
369
  var fieldRuleSchema = strictObject({ id: word, rule: text });
351
370
  var defineFieldRules = /* @__PURE__ */ __name((input) => parseRegistry("output field rules", array(fieldRuleSchema), input, (rules) => duplicates(rules.map((rule) => rule.id)).map((id) => `"${id}" is listed twice`)), "defineFieldRules");
352
371
  var FIELD_RULES = defineFieldRules([
@@ -362,7 +381,7 @@ var FIELD_RULES = defineFieldRules([
362
381
  }
363
382
  ]);
364
383
 
365
- // node_modules/.pnpm/@wirecat+cli-base@0.80.1_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/standards/identifiers.js
384
+ // node_modules/.pnpm/@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/standards/identifiers.js
366
385
  var key = pipe(string(), regex(SNAKE_CASE, "a snake_case key"));
367
386
  var identifierSchema = strictObject({ key, meaning: text, replaces: optional(array(key)) });
368
387
  var defineIdentifiers = /* @__PURE__ */ __name((input) => parseRegistry("identifiers", array(identifierSchema), input, (identifiers) => {
@@ -384,7 +403,7 @@ var IDENTIFIERS = defineIdentifiers([
384
403
  { key: "trace_id", meaning: "the distributed trace a run belongs to, from `traceparent`" }
385
404
  ]);
386
405
 
387
- // node_modules/.pnpm/@wirecat+cli-base@0.80.1_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/standards/flags-calendar.js
406
+ // node_modules/.pnpm/@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/standards/flags-calendar.js
388
407
  var CALENDAR_FLAGS = [
389
408
  { name: "--end-time", value: "<time>", role: "value", type: "time", meaning: "when it ends" },
390
409
  {
@@ -458,7 +477,47 @@ var CALENDAR_FLAGS = [
458
477
  }
459
478
  ];
460
479
 
461
- // node_modules/.pnpm/@wirecat+cli-base@0.80.1_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/standards/flags-how.js
480
+ // node_modules/.pnpm/@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/standards/flags-crm.js
481
+ var CRM_FLAGS = [
482
+ {
483
+ name: "--pipeline",
484
+ value: "<pipeline>",
485
+ role: "value",
486
+ type: "string",
487
+ meaning: "a CRM pipeline: pipeline:<id>, or a name only one pipeline has"
488
+ },
489
+ {
490
+ name: "--stage",
491
+ value: "<stage>",
492
+ role: "value",
493
+ type: "string",
494
+ meaning: "a stage of the record's pipeline, by the CRM's id or its name"
495
+ },
496
+ {
497
+ name: "--amount",
498
+ value: "<decimal>",
499
+ role: "value",
500
+ type: "string",
501
+ meaning: "a sum of money as a decimal, such as 1500.50, in --currency"
502
+ },
503
+ { name: "--currency", value: "<code>", role: "value", type: "string", meaning: "an ISO 4217 code, such as EUR" },
504
+ {
505
+ name: "--close-date",
506
+ value: "<date>",
507
+ role: "value",
508
+ type: "time",
509
+ meaning: "the day a deal or lead is expected to close, YYYY-MM-DD"
510
+ },
511
+ {
512
+ name: "--owner",
513
+ value: "<user>",
514
+ role: "value",
515
+ type: "id",
516
+ meaning: "the CRM user a record is assigned to, by the CRM's id"
517
+ }
518
+ ];
519
+
520
+ // node_modules/.pnpm/@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/standards/flags-how.js
462
521
  var HOW_FLAGS = [
463
522
  {
464
523
  name: "--limit",
@@ -783,6 +842,7 @@ var HOW_FLAGS = [
783
842
  meaning: "tell the people it concerns about it: the chat's members, or an event's attendees"
784
843
  },
785
844
  { name: "--no-notify", role: "mode", type: "switch", meaning: "tell nobody about it" },
845
+ { name: "--open-new", role: "mode", type: "switch", meaning: "a read again for tasks also opens new tasks" },
786
846
  { name: "--offline", role: "mode", type: "switch", meaning: "answer from what was recorded and never connect" },
787
847
  {
788
848
  name: "--operation-id",
@@ -1452,7 +1512,7 @@ var HOW_FLAGS = [
1452
1512
  }
1453
1513
  ];
1454
1514
 
1455
- // node_modules/.pnpm/@wirecat+cli-base@0.80.1_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/standards/flags-mail.js
1515
+ // node_modules/.pnpm/@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/standards/flags-mail.js
1456
1516
  var MAIL_FLAGS = [
1457
1517
  {
1458
1518
  name: "--cc",
@@ -1482,7 +1542,7 @@ var MAIL_FLAGS = [
1482
1542
  }
1483
1543
  ];
1484
1544
 
1485
- // node_modules/.pnpm/@wirecat+cli-base@0.80.1_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/standards/flags-privacy.js
1545
+ // node_modules/.pnpm/@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/standards/flags-privacy.js
1486
1546
  var PRIVACY_FLAGS = [
1487
1547
  {
1488
1548
  name: "--about-text",
@@ -1543,7 +1603,33 @@ var PRIVACY_FLAGS = [
1543
1603
  { name: "--read-receipts", value: "<on|off>", role: "value", type: "choice", meaning: "send read receipts" }
1544
1604
  ];
1545
1605
 
1546
- // node_modules/.pnpm/@wirecat+cli-base@0.80.1_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/standards/flags-what.js
1606
+ // node_modules/.pnpm/@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/standards/flags-schedule.js
1607
+ var SCHEDULE_FLAGS = [
1608
+ {
1609
+ name: "--notify-on",
1610
+ value: "<when>",
1611
+ role: "value",
1612
+ type: "choice",
1613
+ meaning: "when a scheduled run tells the owner: always, failures or never"
1614
+ },
1615
+ {
1616
+ name: "--deliver-to",
1617
+ value: "<route>",
1618
+ role: "value",
1619
+ type: "string",
1620
+ meaning: "where a scheduled run's result also goes, by the owner's own CLI: telegram-bot:<profile>/<chat> or email:<profile>/<address>; repeat it for more. Not --to, which names who a message is for"
1621
+ },
1622
+ {
1623
+ name: "--max-cost-per-day",
1624
+ value: "<usd>",
1625
+ role: "budget",
1626
+ type: "number",
1627
+ meaning: "start no run for the rest of the day once the day's runs cost this much; 0 for no cap",
1628
+ unit: "US dollars"
1629
+ }
1630
+ ];
1631
+
1632
+ // node_modules/.pnpm/@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/standards/flags-what.js
1547
1633
  var WHAT_FLAGS = [
1548
1634
  {
1549
1635
  name: "--analysis-provider",
@@ -1966,6 +2052,13 @@ var WHAT_FLAGS = [
1966
2052
  meaning: "look again from this day, for what arrived late"
1967
2053
  },
1968
2054
  { name: "--run", value: "<id>", role: "target", type: "id", meaning: "the run it is about" },
2055
+ {
2056
+ name: "--who",
2057
+ value: "<side>",
2058
+ role: "target",
2059
+ type: "choice",
2060
+ meaning: "whose replies are measured: me (the owner's) or others (the other side's)"
2061
+ },
1969
2062
  {
1970
2063
  name: "--write",
1971
2064
  value: "<id>",
@@ -2498,7 +2591,7 @@ var WHAT_FLAGS = [
2498
2591
  }
2499
2592
  ];
2500
2593
 
2501
- // node_modules/.pnpm/@wirecat+cli-base@0.80.1_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/standards/vocabulary.js
2594
+ // node_modules/.pnpm/@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/standards/vocabulary.js
2502
2595
  var FLAG_TYPES = [
2503
2596
  "switch",
2504
2597
  "count",
@@ -2848,6 +2941,7 @@ var views = [
2848
2941
  ["newcomers", "members observed joining during the selected time window"],
2849
2942
  ["retention", "whether members of a selected cohort remain or return over time"],
2850
2943
  ["responses", "observed replies between participants and the time taken to answer"],
2944
+ ["waiting", "chats whose newest message waits on the owner's reply"],
2851
2945
  ["discussion", "source posts compared by known views and observed discussion replies"],
2852
2946
  ["unanswered", "questions without an observed qualifying answer"],
2853
2947
  ["me", "the account a profile's token belongs to"],
@@ -2862,6 +2956,7 @@ var roots = [
2862
2956
  ["serve", "the long-running process"],
2863
2957
  ["setup", "the guided first run: log in or link the account, then install the agent skill"],
2864
2958
  ["doctor", "check this machine's setup"],
2959
+ ["recover", "repair a damaged store: what it would do, then its run subcommand does it"],
2865
2960
  ["upgrade", "install a newer version of this tool"],
2866
2961
  ["commands", "the command tree as data"],
2867
2962
  ["guide", "scenarios: the commands for a common task, in order, and why each"],
@@ -2883,10 +2978,18 @@ var VOCABULARY = defineVocabulary({
2883
2978
  ],
2884
2979
  views: views.map(([entry, meaning]) => ({ word: entry, meaning })),
2885
2980
  roots: roots.map(([entry, meaning]) => ({ word: entry, meaning })),
2886
- flags: [...HOW_FLAGS, ...WHAT_FLAGS, ...PRIVACY_FLAGS, ...CALENDAR_FLAGS, ...MAIL_FLAGS]
2981
+ flags: [
2982
+ ...HOW_FLAGS,
2983
+ ...WHAT_FLAGS,
2984
+ ...PRIVACY_FLAGS,
2985
+ ...CALENDAR_FLAGS,
2986
+ ...MAIL_FLAGS,
2987
+ ...CRM_FLAGS,
2988
+ ...SCHEDULE_FLAGS
2989
+ ]
2887
2990
  });
2888
2991
 
2889
- // node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.80.1_commander@15.0.0_esbuild@0.28.2_type_4c7167080feb2ba6356a64767981f5fd/node_modules/@wirecat/cli-core/dist/mcp/agent.js
2992
+ // node_modules/.pnpm/@wirecat+cli-core@0.601.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4fddd50439ae4e4f952967ea26554e7b/node_modules/@wirecat/cli-core/dist/mcp/agent.js
2890
2993
  var TYPES = new Map(VOCABULARY.flags.map((flag) => [flag.name, flag.type]));
2891
2994
  var snake = /* @__PURE__ */ __name((name) => name.replaceAll("|", "_or_").replace(/[^a-z0-9]+/gi, "_"), "snake");
2892
2995
  var longOf = /* @__PURE__ */ __name((option) => option.flags.match(/--[a-z0-9][a-z0-9-]*/)?.[0], "longOf");
@@ -3109,7 +3212,7 @@ var runCommandForAgent = /* @__PURE__ */ __name(async (program, path, input, ctx
3109
3212
  }
3110
3213
  }, "runCommandForAgent");
3111
3214
 
3112
- // node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.80.1_commander@15.0.0_esbuild@0.28.2_type_4c7167080feb2ba6356a64767981f5fd/node_modules/@wirecat/cli-core/dist/mcp/tool.js
3215
+ // node_modules/.pnpm/@wirecat+cli-core@0.601.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4fddd50439ae4e4f952967ea26554e7b/node_modules/@wirecat/cli-core/dist/mcp/tool.js
3113
3216
  var limit = optional(pipe(number(), integer(), minValue(1), maxValue(100), description("how many")));
3114
3217
  var page = optional(pipe(number(), integer(), minValue(1), description("which page, from 1")));
3115
3218
  var message = pipe(
@@ -3368,7 +3471,7 @@ var failed = /* @__PURE__ */ __name((error, errors, effects) => {
3368
3471
  return mcpErrorResult(JSON.parse(agentJson(errorObjectOf(error, context))));
3369
3472
  }, "failed");
3370
3473
 
3371
- // node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.80.1_commander@15.0.0_esbuild@0.28.2_type_4c7167080feb2ba6356a64767981f5fd/node_modules/@wirecat/cli-core/dist/mcp/surface.js
3474
+ // node_modules/.pnpm/@wirecat+cli-core@0.601.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4fddd50439ae4e4f952967ea26554e7b/node_modules/@wirecat/cli-core/dist/mcp/surface.js
3372
3475
  import { randomUUID } from "node:crypto";
3373
3476
  var MATCHES = 8;
3374
3477
  var ANSWER = answerSchema();