@wirecat/zoom-cli 0.80.0 → 0.82.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 (201) hide show
  1. package/contracts/wirecat.json +71 -3
  2. package/dist/answers.d.ts +100 -0
  3. package/dist/answers.d.ts.map +1 -1
  4. package/dist/bin/zm.js +2 -2
  5. package/dist/bundle/agent-F4TRJWWS.js +46 -0
  6. package/dist/bundle/{all-profiles-5GOKWOT4.js → all-profiles-RULEKTDQ.js} +64 -22
  7. package/dist/bundle/answer-policy-6XC57AEZ.js +131 -0
  8. package/dist/bundle/{anthropic-NHXMOFYS.js → anthropic-4NAQBZFL.js} +6 -6
  9. package/dist/bundle/{app-server-HFW5Z5PI.js → app-server-VLR42U5L.js} +92 -80
  10. package/dist/bundle/{bun-M5IGY2TG.js → bun-OPDGMZZQ.js} +2 -2
  11. package/dist/bundle/{bun-sqlite-MTP5JJQ2.js → bun-sqlite-HC6X4AOX.js} +7 -7
  12. package/dist/bundle/{chunk-TNL3YQ33.js → chunk-274SLQNW.js} +2 -2
  13. package/dist/bundle/{chunk-5CJ6AAUI.js → chunk-2CI2OEZQ.js} +4 -4
  14. package/dist/bundle/{chunk-GVKZZT7E.js → chunk-2DBF2IIC.js} +7 -78
  15. package/dist/bundle/{chunk-NRVMK5H3.js → chunk-2GP573Q4.js} +15748 -11939
  16. package/dist/bundle/{chunk-4OAR7BGU.js → chunk-2JHVQMVC.js} +1 -1
  17. package/dist/bundle/{chunk-XKLU5KV2.js → chunk-2SWKQ7C4.js} +1 -1
  18. package/dist/bundle/{chunk-W3GZ7JUO.js → chunk-2XBDILVW.js} +1 -1
  19. package/dist/bundle/{chunk-3UONR5HW.js → chunk-3HC5F3P7.js} +1 -1
  20. package/dist/bundle/{chunk-VN7TKMOW.js → chunk-3YM4B2GT.js} +1 -1
  21. package/dist/bundle/{chunk-PCPOO5FS.js → chunk-434YFJAE.js} +2 -2
  22. package/dist/bundle/{chunk-CW6CPQHI.js → chunk-4HLQ2JGK.js} +4 -4
  23. package/dist/bundle/{chunk-RT7C3SSJ.js → chunk-4N7PP76S.js} +1 -1
  24. package/dist/bundle/{chunk-JJX4HKDV.js → chunk-52Y4ETKU.js} +4 -4
  25. package/dist/bundle/{chunk-BIKHHFD2.js → chunk-5HAUK3I4.js} +2166 -2760
  26. package/dist/bundle/{chunk-W2QDYMAM.js → chunk-5KYQ53EF.js} +13 -9
  27. package/dist/bundle/{chunk-BW5JEOBE.js → chunk-5TU7Y5UW.js} +12 -12
  28. package/dist/bundle/{chunk-P2JTVRGU.js → chunk-66ALX4ZI.js} +168 -168
  29. package/dist/bundle/{chunk-EPIA2UUM.js → chunk-676C2LE6.js} +12 -12
  30. package/dist/bundle/{chunk-BNEJKGG7.js → chunk-6CWL5BKG.js} +78 -76
  31. package/dist/bundle/{chunk-TDBVM2SS.js → chunk-6QYZP4E2.js} +3 -3
  32. package/dist/bundle/{chunk-JXSEH64A.js → chunk-6VK332XS.js} +3 -3
  33. package/dist/bundle/{chunk-W7M4JYEE.js → chunk-73MOMNLL.js} +1 -1
  34. package/dist/bundle/{chunk-K672XJ2P.js → chunk-7QPIUMUG.js} +12 -12
  35. package/dist/bundle/{chunk-CWCDCNXA.js → chunk-7UVDPRFK.js} +6 -6
  36. package/dist/bundle/{chunk-RMX2WPWS.js → chunk-A6EZK5RG.js} +4 -4
  37. package/dist/bundle/{chunk-ONJPUFLX.js → chunk-AC6VJNMJ.js} +1 -1
  38. package/dist/bundle/{chunk-QIK2IBJ4.js → chunk-ACI4YIEH.js} +23 -7
  39. package/dist/bundle/{chunk-UX4JZMA4.js → chunk-AIKFOBDO.js} +278 -59
  40. package/dist/bundle/{chunk-GCPO7T2X.js → chunk-ASBDFXLS.js} +3 -3
  41. package/dist/bundle/{chunk-O4ZBFATF.js → chunk-B32KZRQM.js} +12 -12
  42. package/dist/bundle/{chunk-5RVXXDN7.js → chunk-BBGJQMRI.js} +1 -1
  43. package/dist/bundle/chunk-BDKVOU3I.js +52 -0
  44. package/dist/bundle/{chunk-GCUOZ2OA.js → chunk-BP4FYANF.js} +6 -6
  45. package/dist/bundle/{chunk-XTCAWNBP.js → chunk-DCYFT3FR.js} +4 -4
  46. package/dist/bundle/{chunk-FPUGMDJV.js → chunk-DNCLQPOM.js} +1 -1
  47. package/dist/bundle/{chunk-PKW3TPNP.js → chunk-DSZYABYL.js} +38 -19
  48. package/dist/bundle/{chunk-6MDL2LZA.js → chunk-E745WZKY.js} +8 -8
  49. package/dist/bundle/chunk-EGTCQKHV.js +340 -0
  50. package/dist/bundle/chunk-EQG3PIH2.js +108 -0
  51. package/dist/bundle/{chunk-ZPZT46O6.js → chunk-ESN3W2MZ.js} +48 -12
  52. package/dist/bundle/{chunk-7U5X37TE.js → chunk-G46WJ7YO.js} +6 -6
  53. package/dist/bundle/{chunk-L6FM5RQY.js → chunk-G6PETRMV.js} +3 -3
  54. package/dist/bundle/chunk-GBHMT2IU.js +755 -0
  55. package/dist/bundle/{chunk-6QCBTBDA.js → chunk-GGMAIIVE.js} +1 -1
  56. package/dist/bundle/{chunk-6I4C4ZFT.js → chunk-GTKPMYK7.js} +2 -2
  57. package/dist/bundle/{chunk-N5YUHN6S.js → chunk-GWGHH56B.js} +12 -12
  58. package/dist/bundle/{chunk-5XO2AY6D.js → chunk-HC6VN5CO.js} +10 -10
  59. package/dist/bundle/{chunk-ARL2TTPZ.js → chunk-HP7A2ZOP.js} +9 -9
  60. package/dist/bundle/chunk-HZENBDW2.js +209 -0
  61. package/dist/bundle/{chunk-ST3ZB7LS.js → chunk-IANKXHSE.js} +1 -1
  62. package/dist/bundle/{chunk-GGKEQQME.js → chunk-ICPJT672.js} +13 -9
  63. package/dist/bundle/chunk-JQ54DYAQ.js +80 -0
  64. package/dist/bundle/chunk-K5JGJIV2.js +640 -0
  65. package/dist/bundle/{chunk-DYRISFHZ.js → chunk-KJ6USQDZ.js} +19 -9
  66. package/dist/bundle/{chunk-TMYZKDQ7.js → chunk-KKFY23AK.js} +65 -65
  67. package/dist/bundle/chunk-KQPUVXKX.js +84 -0
  68. package/dist/bundle/{chunk-BPSURRAD.js → chunk-KVJ3I7UL.js} +43 -64
  69. package/dist/bundle/{chunk-NXFKZFTC.js → chunk-KWU46LNK.js} +3 -3
  70. package/dist/bundle/chunk-KXJ3JEDH.js +2 -0
  71. package/dist/bundle/{chunk-YAA2D6RP.js → chunk-L75SMSJR.js} +5 -5
  72. package/dist/bundle/{chunk-OXPHJEJ2.js → chunk-LAYYO4WD.js} +3 -3
  73. package/dist/bundle/{chunk-6PIXP5IH.js → chunk-LEKKTJKK.js} +40 -26
  74. package/dist/bundle/{chunk-3AOESMW6.js → chunk-M7H4MCAX.js} +18 -259
  75. package/dist/bundle/{chunk-DZ6H3YJH.js → chunk-MAJJ4PG3.js} +19 -16
  76. package/dist/bundle/{chunk-G5VH4WUF.js → chunk-MQLPZBMQ.js} +2 -2
  77. package/dist/bundle/{chunk-3Z7CFQTI.js → chunk-N3JLO63O.js} +1 -1
  78. package/dist/bundle/{chunk-NMETTKCV.js → chunk-N46F72AF.js} +14 -14
  79. package/dist/bundle/{chunk-A3TUG2DP.js → chunk-NB7EOAUZ.js} +36 -1
  80. package/dist/bundle/{chunk-BRMV33MO.js → chunk-NEMX3UNN.js} +4 -4
  81. package/dist/bundle/{chunk-6CDMGT6Q.js → chunk-OBXQLFT5.js} +2 -2
  82. package/dist/bundle/{chunk-HH7GR6TN.js → chunk-OGNO35A2.js} +6 -6
  83. package/dist/bundle/{chunk-Q6MISDKJ.js → chunk-OIPYBF43.js} +3 -3
  84. package/dist/bundle/{chunk-6LY4LBSD.js → chunk-OO4TRVPB.js} +7 -7
  85. package/dist/bundle/{chunk-CHEHK6IW.js → chunk-OQFQ77AY.js} +214 -118
  86. package/dist/bundle/{chunk-5D4AEUVA.js → chunk-PL5P7UKW.js} +434 -1
  87. package/dist/bundle/{chunk-Q5LUGY2V.js → chunk-PMUPN6JW.js} +9 -9
  88. package/dist/bundle/chunk-PSKTMMCO.js +561 -0
  89. package/dist/bundle/{chunk-U5N2PKKM.js → chunk-PWVJUIDQ.js} +2 -2
  90. package/dist/bundle/{chunk-475P3LWG.js → chunk-Q7ICVP25.js} +1 -1
  91. package/dist/bundle/{chunk-JGSVWLL2.js → chunk-QG6PILDO.js} +2 -2
  92. package/dist/bundle/{chunk-5K54M6RD.js → chunk-QPHBK63S.js} +1 -1
  93. package/dist/bundle/{chunk-RFXJLG5V.js → chunk-QVSL5WJ7.js} +5173 -3077
  94. package/dist/bundle/{chunk-IQWBGMCR.js → chunk-QVYAV7F2.js} +4 -4
  95. package/dist/bundle/{chunk-XIHENZW6.js → chunk-R2B6PUVI.js} +4 -4
  96. package/dist/bundle/{chunk-MH4L5LL6.js → chunk-RQOZBTNI.js} +16 -3
  97. package/dist/bundle/{chunk-FSLR2YGR.js → chunk-T7IAWEBU.js} +7 -7
  98. package/dist/bundle/{chunk-D4HKTC2T.js → chunk-TKNM22OH.js} +2 -2
  99. package/dist/bundle/{chunk-EI37UXDR.js → chunk-TKVBFJ5C.js} +1 -1
  100. package/dist/bundle/{chunk-O3DYRCIT.js → chunk-TXDR6YSF.js} +1 -1
  101. package/dist/bundle/{chunk-CWXOXIWS.js → chunk-TY7NDMFY.js} +1 -1
  102. package/dist/bundle/{chunk-Z3CPZ4I4.js → chunk-UAWSINMC.js} +306 -306
  103. package/dist/bundle/{chunk-4F7Q5CET.js → chunk-UKAAAOPC.js} +31 -180
  104. package/dist/bundle/{chunk-XL4ND7CZ.js → chunk-UL2PXLKT.js} +26 -26
  105. package/dist/bundle/{chunk-GRYXOSN6.js → chunk-UQCTXZEP.js} +10 -10
  106. package/dist/bundle/{chunk-E3JVLVVB.js → chunk-UR5DBODY.js} +37 -30
  107. package/dist/bundle/{chunk-SUG6YGAF.js → chunk-V5EJSF2B.js} +237 -167
  108. package/dist/bundle/{chunk-HGSBLY6M.js → chunk-VB72LTSZ.js} +12 -12
  109. package/dist/bundle/{chunk-2XZ2YKW4.js → chunk-VB7FZOYX.js} +2 -100
  110. package/dist/bundle/{chunk-PMO2Z6DQ.js → chunk-VS6WURLX.js} +3 -3
  111. package/dist/bundle/{chunk-5QXQIZJY.js → chunk-VZ5PPYDG.js} +3 -4
  112. package/dist/bundle/{chunk-YR5TRWT2.js → chunk-W5QHB53X.js} +287 -580
  113. package/dist/bundle/{chunk-2P6MQH4V.js → chunk-WMANRJR5.js} +6 -6
  114. package/dist/bundle/chunk-WOPVBRPV.js +29 -0
  115. package/dist/bundle/{chunk-W32HK7KG.js → chunk-XQ2WL3HB.js} +2 -2
  116. package/dist/bundle/{chunk-FIJREKLA.js → chunk-XQQVMECZ.js} +3 -3
  117. package/dist/bundle/{chunk-75JW7X2W.js → chunk-Y6PVS55U.js} +71 -61
  118. package/dist/bundle/{chunk-EMYRUJCV.js → chunk-YJXJJ2XP.js} +8 -8
  119. package/dist/bundle/{chunk-L2TURFT6.js → chunk-YY7XKHDY.js} +10 -3
  120. package/dist/bundle/chunk-ZED2CJW5.js +353 -0
  121. package/dist/bundle/chunk-ZOYOXWJB.js +746 -0
  122. package/dist/bundle/{cli-QNBYDOKV.js → cli-U4O5XB7J.js} +171 -124
  123. package/dist/bundle/command-contract-FBTK6GQX.js +45 -0
  124. package/dist/bundle/{command-server-entry-WMA4SWJ5.js → command-server-entry-KKH6ZWJV.js} +35 -35
  125. package/dist/bundle/config-FRJSIZNN.js +118 -0
  126. package/dist/bundle/{decode-7PXUXNIP.js → decode-TPCNXEK4.js} +6 -6
  127. package/dist/bundle/{dispatch-AWDROXWN.js → dispatch-FKMIPCPQ.js} +9 -9
  128. package/dist/bundle/{dist-TSBH4FOU.js → dist-7CLBCYZN.js} +23 -21
  129. package/dist/bundle/dist-PAKDDIBT.js +191 -0
  130. package/dist/bundle/{echarts-WIDIUEO6.js → echarts-O3TNDAXJ.js} +2 -2
  131. package/dist/bundle/{embed-EIRVQF5E.js → embed-WCJSFVSK.js} +7 -7
  132. package/dist/bundle/{embedder-MXPM6OXK.js → embedder-TBBUPXBX.js} +10 -10
  133. package/dist/bundle/{failure-JZW73RP7.js → failure-XTWBYI2A.js} +3 -3
  134. package/dist/bundle/first-run-ELEMFW42.js +29 -0
  135. package/dist/bundle/first-screen-DIOBWMKP.js +46 -0
  136. package/dist/bundle/{folders-TGFOE7DY.js → folders-LXOL4N4S.js} +5 -5
  137. package/dist/bundle/{instructions-D5LNE6NJ.js → instructions-AMH5RWVJ.js} +1 -1
  138. package/dist/bundle/{main-OHW5Z56X.js → main-YAA7WQ23.js} +24 -24
  139. package/dist/bundle/{mcp-RGNRW77S.js → mcp-5HFPWC3W.js} +2 -2
  140. package/dist/bundle/meeting-combined-UXCF4SJ3.js +26 -0
  141. package/dist/bundle/meeting-model-3BZJ3EQP.js +26 -0
  142. package/dist/bundle/{meeting-semantic-FYOVY4S2.js → meeting-semantic-3HU7I2SJ.js} +8 -8
  143. package/dist/bundle/{meetings-WI4SXPBJ.js → meetings-XWMB6FOH.js} +7 -7
  144. package/dist/bundle/{node-UEWUFR7N.js → node-EGMCBAO7.js} +2 -2
  145. package/dist/bundle/{node-sqlite-FJWKJHYU.js → node-sqlite-IJBWENFX.js} +8 -8
  146. package/dist/bundle/oauth-SZDDAP7A.js +20 -0
  147. package/dist/bundle/{open-EFYTWUGC.js → open-NS3TMKZX.js} +6 -6
  148. package/dist/bundle/openai-4DN6WI3B.js +28 -0
  149. package/dist/bundle/{output-file-J4SU6X4I.js → output-file-2UB5JP3R.js} +6 -6
  150. package/dist/bundle/{process-U5PLNIDC.js → process-SGHEN6MQ.js} +1 -1
  151. package/dist/bundle/{program-3JICCSA6.js → program-GVCGZP27.js} +170 -160
  152. package/dist/bundle/{prompt-YPDMSOKC.js → prompt-HJFMPFVC.js} +6 -6
  153. package/dist/bundle/public-C2ZB2AGQ.js +198 -0
  154. package/dist/bundle/{recognize-Z2SSWUKH.js → recognize-2SEI5PPM.js} +5 -5
  155. package/dist/bundle/{remote-R5HMDHOG.js → remote-2DMS74XE.js} +11 -11
  156. package/dist/bundle/{rerank-6NGBEMQ2.js → rerank-H6GCYVIA.js} +8 -8
  157. package/dist/bundle/run-log-QU26SUZP.js +145 -0
  158. package/dist/bundle/{serve-CU3RMWU7.js → serve-ODVRPFJO.js} +11 -11
  159. package/dist/bundle/server-NBPF6IDZ.js +95 -0
  160. package/dist/bundle/{server-SOQSVX2Q.js → server-PCLIO24L.js} +82 -69
  161. package/dist/bundle/{services-LROZ3RDT.js → services-4QAPXBLO.js} +60 -54
  162. package/dist/bundle/{speech-AS77HFIF.js → speech-MA6ZT3WE.js} +28 -28
  163. package/dist/bundle/{sqlite-runtime-U25NS6BK.js → sqlite-runtime-PVMAUXRN.js} +7 -7
  164. package/dist/bundle/{state-CPEVKK66.js → state-QFMTYUME.js} +7 -7
  165. package/dist/bundle/{store-6CHRMJM7.js → store-25OTAQC3.js} +31 -24
  166. package/dist/bundle/{store-QKHCZOYR.js → store-F724QIKJ.js} +34 -26
  167. package/dist/bundle/store-connection-OGPXANGB.js +111 -0
  168. package/dist/bundle/store-maintenance-command-2CM7LLNQ.js +83 -0
  169. package/dist/bundle/{streaming-VDJOYGMO.js → streaming-S22C4DG5.js} +7 -7
  170. package/dist/bundle/surface-7PXHWCF6.js +81 -0
  171. package/dist/bundle/{tokens-JBN2OHQB.js → tokens-NLUHA2DW.js} +11 -10
  172. package/dist/bundle/zm.js +9 -9
  173. package/dist/bundle/{zoom-app-Q4IKYNG3.js → zoom-app-YWFB367P.js} +8 -8
  174. package/dist/commands.d.ts +1 -0
  175. package/dist/commands.d.ts.map +1 -1
  176. package/dist/commands.js +8 -2
  177. package/dist/commands.js.map +1 -1
  178. package/dist/setup-commands.d.ts +1 -1
  179. package/dist/setup-commands.d.ts.map +1 -1
  180. package/dist/setup-commands.js +31 -5
  181. package/dist/setup-commands.js.map +1 -1
  182. package/dist/version.d.ts +1 -1
  183. package/dist/version.js +1 -1
  184. package/dist/zoom-api/types.d.ts +5 -0
  185. package/dist/zoom-api/types.d.ts.map +1 -1
  186. package/package.json +3 -3
  187. package/dist/bundle/answer-policy-7PYXHK2I.js +0 -122
  188. package/dist/bundle/chunk-3BTRJYIT.js +0 -729
  189. package/dist/bundle/chunk-M4LAF627.js +0 -719
  190. package/dist/bundle/command-contract-CT6MV6YG.js +0 -45
  191. package/dist/bundle/config-ZFQFDEVL.js +0 -109
  192. package/dist/bundle/first-run-K6EHRAIM.js +0 -29
  193. package/dist/bundle/first-screen-C6AF4KT4.js +0 -45
  194. package/dist/bundle/meeting-combined-3OKFXZNA.js +0 -26
  195. package/dist/bundle/meeting-model-4XNF725D.js +0 -26
  196. package/dist/bundle/oauth-KOONTGLW.js +0 -20
  197. package/dist/bundle/openai-6Y2JRDNY.js +0 -28
  198. package/dist/bundle/run-log-LG3TI3WI.js +0 -136
  199. package/dist/bundle/server-X7JYRMKX.js +0 -85
  200. package/dist/bundle/store-connection-FCDVOPWB.js +0 -102
  201. package/dist/bundle/store-maintenance-command-6HVOAHOZ.js +0 -77
@@ -0,0 +1,340 @@
1
+ import { createRequire as __bundleRequire } from "node:module";
2
+ const require = __bundleRequire(import.meta.url);
3
+ import {
4
+ throughWrapper
5
+ } from "./chunk-GBHMT2IU.js";
6
+ import {
7
+ environmentOf
8
+ } from "./chunk-V5EJSF2B.js";
9
+ import {
10
+ readOnlyLockOf
11
+ } from "./chunk-TKNM22OH.js";
12
+ import {
13
+ array,
14
+ boolean,
15
+ check,
16
+ pipe,
17
+ record,
18
+ safeParse,
19
+ strictObject,
20
+ string
21
+ } from "./chunk-ESN3W2MZ.js";
22
+ import {
23
+ CliError
24
+ } from "./chunk-IANKXHSE.js";
25
+ import {
26
+ __name
27
+ } from "./chunk-ZVVMGPBJ.js";
28
+
29
+ // node_modules/.pnpm/@wirecat+cli-core@1.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_dd5172c52281f8f1e2dd1d4e9555d5c3/node_modules/@wirecat/cli-core/dist/background/relay.js
30
+ import { createHash } from "node:crypto";
31
+ import { chmodSync, lstatSync, mkdirSync, rmSync } from "node:fs";
32
+ import { createConnection, createServer } from "node:net";
33
+ import { tmpdir } from "node:os";
34
+ import { dirname, isAbsolute, join } from "node:path";
35
+ import { PassThrough, Writable } from "node:stream";
36
+ var RELAY_PROTOCOL = 1;
37
+ var requestSchema = strictObject({
38
+ argv: array(string()),
39
+ env: record(string(), string()),
40
+ cwd: pipe(string(), check((path) => isAbsolute(path))),
41
+ tty: boolean(),
42
+ stdinTty: boolean()
43
+ });
44
+ var MAX_CLIENT_LINE = 1024 * 1024;
45
+ var MAX_SERVE_LINE = 64 * 1024 * 1024;
46
+ var MAX_SOCKET_PATH = 100;
47
+ var relayPath = /* @__PURE__ */ __name((lockPath) => {
48
+ const beside = lockPath.replace(/\.lock$/, ".sock");
49
+ if (beside.length <= MAX_SOCKET_PATH)
50
+ return beside;
51
+ const hash = createHash("sha256").update(beside).digest("hex").slice(0, 16);
52
+ const name = join(`wirecat-relay-${process.getuid?.() ?? "user"}`, `${hash}.sock`);
53
+ const temporary = join(tmpdir(), name);
54
+ if (temporary.length <= MAX_SOCKET_PATH || process.platform === "win32")
55
+ return temporary;
56
+ return join("/tmp", name);
57
+ }, "relayPath");
58
+ var privateDirectory = /* @__PURE__ */ __name((dir) => {
59
+ mkdirSync(dir, { recursive: true, mode: 448 });
60
+ const stat = lstatSync(dir);
61
+ const mine = process.getuid === void 0 || stat.uid === process.getuid();
62
+ if (!stat.isDirectory() || !mine || (stat.mode & 63) !== 0) {
63
+ throw new CliError("permission_error", `${dir} is not a private directory, so serve does not listen there`);
64
+ }
65
+ }, "privateDirectory");
66
+ var lines = /* @__PURE__ */ __name((socket, max, onLine, onTooLong) => {
67
+ let buffered = "";
68
+ socket.setEncoding("utf8");
69
+ socket.on("data", (chunk) => {
70
+ buffered += chunk;
71
+ for (let end = buffered.indexOf("\n"); end >= 0; end = buffered.indexOf("\n")) {
72
+ const line = buffered.slice(0, end);
73
+ buffered = buffered.slice(end + 1);
74
+ if (line)
75
+ onLine(line);
76
+ }
77
+ if (buffered.length > max)
78
+ onTooLong();
79
+ });
80
+ }, "lines");
81
+ var frame = /* @__PURE__ */ __name((socket, value) => {
82
+ if (!socket.destroyed)
83
+ socket.write(`${JSON.stringify(value)}
84
+ `);
85
+ }, "frame");
86
+ var listenRelay = /* @__PURE__ */ __name(async (path, run) => {
87
+ privateDirectory(dirname(path));
88
+ rmSync(path, { force: true });
89
+ const open = /* @__PURE__ */ new Set();
90
+ const running = /* @__PURE__ */ new Set();
91
+ const server = createServer((socket) => {
92
+ open.add(socket);
93
+ const stop = new AbortController();
94
+ const stdin = new PassThrough();
95
+ let started = false;
96
+ socket.on("error", () => {
97
+ });
98
+ socket.on("close", () => {
99
+ open.delete(socket);
100
+ stop.abort(new CliError("cancelled", "the client went away", { retryable: false }));
101
+ if (!stdin.writableEnded)
102
+ stdin.end();
103
+ });
104
+ lines(socket, MAX_CLIENT_LINE, (line) => {
105
+ let message;
106
+ try {
107
+ message = JSON.parse(line);
108
+ } catch {
109
+ socket.destroy();
110
+ return;
111
+ }
112
+ if (!started) {
113
+ started = true;
114
+ if (message.v !== RELAY_PROTOCOL) {
115
+ frame(socket, { diagnostic: `serve speaks relay protocol ${RELAY_PROTOCOL}; restart it`, exit: 1 });
116
+ socket.end();
117
+ return;
118
+ }
119
+ const parsed = safeParse(requestSchema, message.run);
120
+ if (!parsed.success) {
121
+ socket.destroy();
122
+ return;
123
+ }
124
+ stdin.isTTY = parsed.output.stdinTty;
125
+ if (parsed.output.stdinTty)
126
+ stdin.end();
127
+ const job = serve(socket, parsed.output, stdin, stop.signal, run);
128
+ running.add(job);
129
+ void job.then(() => running.delete(job), () => running.delete(job));
130
+ return;
131
+ }
132
+ if (typeof message.stdin === "string" && !stdin.writableEnded)
133
+ stdin.write(Buffer.from(message.stdin, "base64"));
134
+ if (message.stdinEnd === true && !stdin.writableEnded)
135
+ stdin.end();
136
+ }, () => socket.destroy());
137
+ });
138
+ await new Promise((resolve, reject) => {
139
+ server.once("error", reject);
140
+ server.listen(path, () => {
141
+ server.off("error", reject);
142
+ resolve();
143
+ });
144
+ });
145
+ chmodSync(path, 384);
146
+ return {
147
+ close: /* @__PURE__ */ __name(async () => {
148
+ for (const socket of open)
149
+ socket.destroy();
150
+ await new Promise((resolve) => server.close(() => resolve()));
151
+ await Promise.allSettled(running);
152
+ rmSync(path, { force: true });
153
+ }, "close")
154
+ };
155
+ }, "listenRelay");
156
+ var serve = /* @__PURE__ */ __name(async (socket, request, stdin, signal, run) => {
157
+ const streams = {
158
+ data: /* @__PURE__ */ __name((text) => frame(socket, { data: text }), "data"),
159
+ diagnostic: /* @__PURE__ */ __name((text) => frame(socket, { diagnostic: text }), "diagnostic"),
160
+ progress: /* @__PURE__ */ __name((text) => frame(socket, { progress: text }), "progress")
161
+ };
162
+ const stdout = new Writable({
163
+ write: /* @__PURE__ */ __name((chunk, _encoding, done) => {
164
+ frame(socket, { raw: Buffer.from(chunk).toString("base64") });
165
+ done();
166
+ }, "write")
167
+ });
168
+ let code = 1;
169
+ try {
170
+ code = await run(request, { streams, stdin, stdout, signal });
171
+ } finally {
172
+ frame(socket, { exit: code });
173
+ socket.end();
174
+ }
175
+ }, "serve");
176
+ var relayCommand = /* @__PURE__ */ __name((path, request, options) => new Promise((resolve, reject) => {
177
+ const { streams, stdin, stdout, signal, deadlineMs, writes, holder, listens = false } = options;
178
+ const socket = createConnection(path);
179
+ let connected = false;
180
+ let settled = false;
181
+ let timer;
182
+ const forward = /* @__PURE__ */ __name((chunk) => frame(socket, { stdin: Buffer.from(chunk).toString("base64") }), "forward");
183
+ const ended = /* @__PURE__ */ __name(() => frame(socket, { stdinEnd: true }), "ended");
184
+ const brokenPipe = /* @__PURE__ */ __name((error) => {
185
+ if (error.code === "EPIPE")
186
+ finish({ code: 0 });
187
+ }, "brokenPipe");
188
+ const finish = /* @__PURE__ */ __name((outcome) => {
189
+ if (settled)
190
+ return;
191
+ settled = true;
192
+ if (timer)
193
+ clearTimeout(timer);
194
+ stdout.off("error", brokenPipe);
195
+ signal.removeEventListener("abort", aborted);
196
+ stdin.off("data", forward).off("end", ended);
197
+ stdin.pause();
198
+ socket.destroy();
199
+ if ("code" in outcome)
200
+ resolve(outcome.code);
201
+ else
202
+ reject(outcome.error);
203
+ }, "finish");
204
+ const stopped = /* @__PURE__ */ __name(() => writes ? new CliError("outcome_unknown", `${holder} stopped before the command finished; it may have run \u2014 check before repeating it`, { retryable: false }) : new CliError("provider_unavailable", `${holder} stopped before the command finished`, { retryable: true }), "stopped");
205
+ const aborted = /* @__PURE__ */ __name(() => finish(listens ? { code: 0 } : { error: signal.reason }), "aborted");
206
+ if (signal.aborted)
207
+ return aborted();
208
+ signal.addEventListener("abort", aborted, { once: true });
209
+ stdout.on("error", brokenPipe);
210
+ if (deadlineMs !== void 0)
211
+ timer = setTimeout(() => finish({ error: stopped() }), deadlineMs);
212
+ socket.on("connect", () => {
213
+ connected = true;
214
+ frame(socket, { v: RELAY_PROTOCOL, run: request });
215
+ if (request.stdinTty)
216
+ ended();
217
+ else {
218
+ stdin.on("data", forward).once("end", ended);
219
+ stdin.resume();
220
+ }
221
+ });
222
+ socket.on("error", (error) => {
223
+ if (connected)
224
+ return finish({ error: stopped() });
225
+ finish({
226
+ error: new CliError("provider_unavailable", `${holder} holds the connection but does not answer its relay (${error.code ?? error.message}) \u2014 restart it`, { retryable: false, sent: false })
227
+ });
228
+ });
229
+ socket.on("close", () => finish({ error: stopped() }));
230
+ lines(socket, MAX_SERVE_LINE, (line) => {
231
+ let message;
232
+ try {
233
+ message = JSON.parse(line);
234
+ } catch {
235
+ return finish({ error: stopped() });
236
+ }
237
+ if (typeof message.data === "string")
238
+ streams.data(message.data);
239
+ if (typeof message.diagnostic === "string")
240
+ streams.diagnostic(message.diagnostic);
241
+ if (typeof message.progress === "string")
242
+ streams.progress?.(message.progress);
243
+ if (typeof message.raw === "string")
244
+ stdout.write(Buffer.from(message.raw, "base64"));
245
+ if (typeof message.exit === "number")
246
+ finish({ code: message.exit });
247
+ }, () => finish({ error: stopped() }));
248
+ }), "relayCommand");
249
+
250
+ // node_modules/.pnpm/@wirecat+cli-core@1.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_dd5172c52281f8f1e2dd1d4e9555d5c3/node_modules/@wirecat/cli-core/dist/cli/messenger/serve-relay.js
251
+ var lentConnection = /* @__PURE__ */ __name((connection, watchers) => throughWrapper(connection, {
252
+ close: /* @__PURE__ */ __name(async () => {
253
+ }, "close"),
254
+ feed: void 0,
255
+ storedChats: void 0,
256
+ listen: void 0,
257
+ listenHistory: void 0,
258
+ ...connection.watch && watchers ? {
259
+ // A watcher that throws (its output limit, a closed reader) ends its own watch, never serve's.
260
+ watch: /* @__PURE__ */ __name(async (onEvent, signal, onReady) => {
261
+ let watcher;
262
+ try {
263
+ await new Promise((resolve, reject) => {
264
+ watcher = /* @__PURE__ */ __name((event) => {
265
+ try {
266
+ onEvent(event);
267
+ } catch (error) {
268
+ reject(error);
269
+ }
270
+ }, "watcher");
271
+ watchers.add(watcher);
272
+ signal.addEventListener("abort", () => resolve(), { once: true });
273
+ onReady?.();
274
+ if (signal.aborted)
275
+ resolve();
276
+ });
277
+ } finally {
278
+ if (watcher)
279
+ watchers.delete(watcher);
280
+ }
281
+ }, "watch")
282
+ } : { watch: void 0 }
283
+ }), "lentConnection");
284
+ var serveRelay = /* @__PURE__ */ __name((command, messenger) => {
285
+ let held;
286
+ let relay;
287
+ const watchers = /* @__PURE__ */ new Set();
288
+ const borrowed = /* @__PURE__ */ __name(() => {
289
+ const connection = held;
290
+ if (!connection)
291
+ throw new CliError("provider_unavailable", "serve is not connected yet", { retryable: true });
292
+ return lentConnection(connection, watchers);
293
+ }, "borrowed");
294
+ return {
295
+ messenger: {
296
+ ...messenger,
297
+ connect: /* @__PURE__ */ __name(async (...args) => {
298
+ held = await messenger.connect(...args);
299
+ return held;
300
+ }, "connect")
301
+ },
302
+ arrived: /* @__PURE__ */ __name((event) => {
303
+ for (const watcher of watchers)
304
+ watcher(event);
305
+ }, "arrived"),
306
+ /** Listens beside the lock; the address goes into it, which is how a client finds it. */
307
+ open: /* @__PURE__ */ __name(async (lockPath, profile) => {
308
+ const environment = environmentOf(command);
309
+ const runCommand = environment.runCommand;
310
+ if (!runCommand)
311
+ return void 0;
312
+ const readOnly = readOnlyLockOf(messenger.app, environment.env ?? process.env);
313
+ const path = relayPath(lockPath);
314
+ relay = await listenRelay(path, (request, io) => runCommand(request.argv, {
315
+ env: {
316
+ ...request.env,
317
+ ...readOnly ? { [`${messenger.app.envPrefix}_READ_ONLY`]: "1" } : {}
318
+ },
319
+ streams: io.streams,
320
+ stdin: io.stdin,
321
+ stdout: io.stdout,
322
+ tty: request.tty,
323
+ signal: io.signal,
324
+ answer: /* @__PURE__ */ __name(() => null, "answer"),
325
+ relayed: { profile, cwd: request.cwd, connection: borrowed }
326
+ }));
327
+ return { path, protocol: RELAY_PROTOCOL };
328
+ }, "open"),
329
+ close: /* @__PURE__ */ __name(async () => {
330
+ await relay?.close();
331
+ }, "close")
332
+ };
333
+ }, "serveRelay");
334
+
335
+ export {
336
+ RELAY_PROTOCOL,
337
+ relayCommand,
338
+ lentConnection,
339
+ serveRelay
340
+ };
@@ -0,0 +1,108 @@
1
+ import { createRequire as __bundleRequire } from "node:module";
2
+ const require = __bundleRequire(import.meta.url);
3
+ import {
4
+ CLIENT_INFO_META_KEY
5
+ } from "./chunk-PL5P7UKW.js";
6
+ import {
7
+ agentOf,
8
+ clientHash,
9
+ currentCaller
10
+ } from "./chunk-T7IAWEBU.js";
11
+ import {
12
+ __name
13
+ } from "./chunk-ZVVMGPBJ.js";
14
+
15
+ // node_modules/.pnpm/@wirecat+cli-core@1.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_dd5172c52281f8f1e2dd1d4e9555d5c3/node_modules/@wirecat/cli-core/dist/mcp/caller.js
16
+ var callingAgent = /* @__PURE__ */ __name((fallback, caller = currentCaller()) => {
17
+ const client = caller?.agent?.client?.name;
18
+ if (client && client !== "unknown")
19
+ return client;
20
+ const kind = caller?.agent?.kind;
21
+ return kind && kind !== "mcp-client" ? kind : fallback;
22
+ }, "callingAgent");
23
+ var CALLER_META_KEY = "wirecat.dev/caller";
24
+ var PROXY_CLIENT_NAME = "all-profiles";
25
+ var NAME = /^[\w .@()/+-]{1,64}$/;
26
+ var plain = /* @__PURE__ */ __name((value) => typeof value === "string" && NAME.test(value.trim()) ? value.trim() : void 0, "plain");
27
+ var clientFrom = /* @__PURE__ */ __name((value) => {
28
+ if (!value || typeof value !== "object")
29
+ return void 0;
30
+ const { name, version } = value;
31
+ const named = plain(name);
32
+ if (!named)
33
+ return void 0;
34
+ const versioned = plain(version);
35
+ return { name: named, ...versioned ? { version: versioned } : {} };
36
+ }, "clientFrom");
37
+ var callerOf = /* @__PURE__ */ __name((ctx, tool, source) => {
38
+ const meta = ctx?.mcpReq?._meta;
39
+ const requestId = ctx?.mcpReq?.id;
40
+ const initialized = source.client?.();
41
+ const proxied = initialized?.name === PROXY_CLIENT_NAME && !ctx?.http ? passedOn(meta?.[CALLER_META_KEY], tool) : void 0;
42
+ if (proxied)
43
+ return proxied;
44
+ const client = clientFrom(meta?.[CLIENT_INFO_META_KEY]) ?? clientFrom(initialized);
45
+ const mcp = /* @__PURE__ */ __name((connection) => ({
46
+ tool,
47
+ ...requestId === void 0 ? {} : { request_id: String(requestId) },
48
+ ...connection ? { connection_id: connection } : {}
49
+ }), "mcp");
50
+ const auth = ctx?.http?.authInfo;
51
+ if (auth) {
52
+ const registered = plain(auth.extra?.clientName);
53
+ return {
54
+ via: "mcp-http",
55
+ agent: {
56
+ kind: "mcp-client",
57
+ session_id: ctx?.sessionId ?? null,
58
+ client: {
59
+ name: registered ?? client?.name ?? "unknown",
60
+ ...client?.version ? { version: client.version } : {},
61
+ id: clientHash(auth.clientId)
62
+ }
63
+ },
64
+ mcp: mcp(ctx?.sessionId)
65
+ };
66
+ }
67
+ const agent = agentOf(source.env) ?? { kind: "mcp-client", session_id: null };
68
+ return { via: "mcp-stdio", agent: { ...agent, ...client ? { client } : {} }, mcp: mcp(source.connectionId) };
69
+ }, "callerOf");
70
+ var passedOn = /* @__PURE__ */ __name((value, tool) => {
71
+ if (!value || typeof value !== "object")
72
+ return void 0;
73
+ const { via, agent, mcp } = value;
74
+ if (via !== "mcp-stdio" && via !== "mcp-http")
75
+ return void 0;
76
+ const a = agent && typeof agent === "object" ? agent : void 0;
77
+ const kind = plain(a?.kind);
78
+ const session = typeof a?.session_id === "string" && /^[A-Za-z0-9._:-]{1,128}$/.test(a.session_id) ? a.session_id : null;
79
+ const client = clientFrom(a?.client);
80
+ const id = a?.client && typeof a.client === "object" ? a.client.id : void 0;
81
+ const m = mcp && typeof mcp === "object" ? mcp : {};
82
+ const request = plain(m.request_id);
83
+ const connection = typeof m.connection_id === "string" && /^[\w-]{1,128}$/.test(m.connection_id) ? m.connection_id : void 0;
84
+ return {
85
+ via,
86
+ ...kind ? {
87
+ agent: {
88
+ kind,
89
+ session_id: session,
90
+ ...a?.from_chat === true ? { from_chat: true } : {},
91
+ ...client ? { client: { ...client, ...typeof id === "string" && /^[0-9a-f]{8}$/.test(id) ? { id } : {} } } : {}
92
+ }
93
+ } : {},
94
+ mcp: {
95
+ tool,
96
+ ...request ? { request_id: request } : {},
97
+ ...connection ? { connection_id: connection } : {},
98
+ proxied: true
99
+ }
100
+ };
101
+ }, "passedOn");
102
+
103
+ export {
104
+ callingAgent,
105
+ CALLER_META_KEY,
106
+ PROXY_CLIENT_NAME,
107
+ callerOf
108
+ };
@@ -3,15 +3,15 @@ const require = __bundleRequire(import.meta.url);
3
3
  import {
4
4
  errorCodes,
5
5
  isCliError
6
- } from "./chunk-ST3ZB7LS.js";
6
+ } from "./chunk-IANKXHSE.js";
7
7
  import {
8
8
  visibleControls
9
- } from "./chunk-5RVXXDN7.js";
9
+ } from "./chunk-BBGJQMRI.js";
10
10
  import {
11
11
  __name
12
12
  } from "./chunk-ZVVMGPBJ.js";
13
13
 
14
- // node_modules/.pnpm/@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/exit-codes.js
14
+ // node_modules/.pnpm/@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/exit-codes.js
15
15
  var EXIT_CODES = {
16
16
  validation_error: 2,
17
17
  configuration_error: 3,
@@ -284,8 +284,8 @@ function maxEntries(requirement, message$1) {
284
284
  message: message$1,
285
285
  "~run"(dataset, config$1) {
286
286
  if (!dataset.typed) return dataset;
287
- const count = Object.keys(dataset.value).length;
288
- if (dataset.typed && count > this.requirement) _addIssue(this, "entries", dataset, config$1, { received: `${count}` });
287
+ const count2 = Object.keys(dataset.value).length;
288
+ if (dataset.typed && count2 > this.requirement) _addIssue(this, "entries", dataset, config$1, { received: `${count2}` });
289
289
  return dataset;
290
290
  }
291
291
  };
@@ -620,6 +620,23 @@ function exactOptional(wrapped, default_) {
620
620
  }
621
621
  __name(exactOptional, "exactOptional");
622
622
  // @__NO_SIDE_EFFECTS__
623
+ function function_(message$1) {
624
+ return _standardSchema({
625
+ kind: "schema",
626
+ type: "function",
627
+ reference: function_,
628
+ expects: "Function",
629
+ async: false,
630
+ message: message$1,
631
+ "~run"(dataset, config$1) {
632
+ if (typeof dataset.value === "function") dataset.typed = true;
633
+ else _addIssue(this, "type", dataset, config$1);
634
+ return dataset;
635
+ }
636
+ });
637
+ }
638
+ __name(function_, "function_");
639
+ // @__NO_SIDE_EFFECTS__
623
640
  function lazy(getter) {
624
641
  return _standardSchema({
625
642
  kind: "schema",
@@ -1366,7 +1383,7 @@ function unwrap(schema) {
1366
1383
  }
1367
1384
  __name(unwrap, "unwrap");
1368
1385
 
1369
- // node_modules/.pnpm/@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/standards/effects.js
1386
+ // node_modules/.pnpm/@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/standards/effects.js
1370
1387
  var EFFECT_LEVELS = ["none", "read", "write"];
1371
1388
  var effectsSchema = strictObject({
1372
1389
  remote: picklist(EFFECT_LEVELS),
@@ -2003,7 +2020,7 @@ function toStandardJsonSchema(schema) {
2003
2020
  }
2004
2021
  __name(toStandardJsonSchema, "toStandardJsonSchema");
2005
2022
 
2006
- // node_modules/.pnpm/@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/standards/registry.js
2023
+ // node_modules/.pnpm/@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/standards/registry.js
2007
2024
  var word = pipe(string(), regex(/^[a-z][a-z0-9]*(-[a-z0-9]+)*$/, "a lower-case word, words joined by -"));
2008
2025
  var SNAKE_CASE = /^[a-z][a-z0-9]*(_[a-z0-9]+)*$/;
2009
2026
  var text = pipe(string(), regex(/\S/, "must not be empty"));
@@ -2045,7 +2062,7 @@ var fill = /* @__PURE__ */ __name((template, values) => template.replace(PLACEHO
2045
2062
  return String(value);
2046
2063
  }), "fill");
2047
2064
 
2048
- // node_modules/.pnpm/@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/standards/output.js
2065
+ // node_modules/.pnpm/@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/standards/output.js
2049
2066
  var MAX_NEXT_STEPS = 2;
2050
2067
  var COMPACT_FLAG = "--compact";
2051
2068
  var isoTime = pipe(string(), isoTimestamp("an ISO 8601 time in UTC"), endsWith("Z", "an ISO 8601 time in UTC, ending in `Z`"));
@@ -2122,6 +2139,22 @@ var rankingSchema = strictObject({
2122
2139
  })),
2123
2140
  ms: pipe(number(), integer(), minValue(0))
2124
2141
  });
2142
+ var count = pipe(number(), integer(), minValue(0));
2143
+ var modelRunSchema = strictObject({
2144
+ provider: text,
2145
+ model: text,
2146
+ endpoint: text,
2147
+ sent: count,
2148
+ done: count,
2149
+ left: count,
2150
+ usage: optional(strictObject({ input: count, output: count })),
2151
+ cost_usd: nullable(pipe(number(), minValue(0))),
2152
+ ms: count
2153
+ });
2154
+ var querySchema = strictObject({
2155
+ chat: optional(strictObject({ word: text, chat_id: text, title: nullable(text) })),
2156
+ respelled: optional(array(strictObject({ word: text, tried: pipe(array(text), minLength(1)) })))
2157
+ });
2125
2158
  var metaSchema = strictObject({
2126
2159
  run_id: text,
2127
2160
  duration_ms: pipe(number(), integer(), minValue(0)),
@@ -2134,7 +2167,9 @@ var metaSchema = strictObject({
2134
2167
  now: optional(isoTime),
2135
2168
  now_local: optional(localTime),
2136
2169
  window: optional(strictObject({ since: optional(isoTime), until: optional(isoTime) })),
2137
- ranking: optional(rankingSchema)
2170
+ ranking: optional(rankingSchema),
2171
+ model_run: optional(modelRunSchema),
2172
+ query: optional(querySchema)
2138
2173
  });
2139
2174
  var offsetOf = /* @__PURE__ */ __name((at, zone) => {
2140
2175
  const name = new Intl.DateTimeFormat("en-US", { timeZone: zone, timeZoneName: "longOffset" }).formatToParts(at).find((part) => part.type === "timeZoneName")?.value ?? "GMT";
@@ -2172,7 +2207,7 @@ var jsonlOf = /* @__PURE__ */ __name(({ items, page, meta }) => [
2172
2207
  JSON.stringify({ type: "end", complete: meta.complete, ...meta.issues ? { issues: meta.issues } : {}, page })
2173
2208
  ].join("\n"), "jsonlOf");
2174
2209
 
2175
- // node_modules/.pnpm/@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/standards/errors.js
2210
+ // node_modules/.pnpm/@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/standards/errors.js
2176
2211
  var CRASH_CODE = "internal_error";
2177
2212
  var CRASH_REASON = "command.crashed";
2178
2213
  var errorObjectSchema = strictObject({
@@ -2271,7 +2306,7 @@ var BASE_REASONS = defineReasons([
2271
2306
  { reason: CRASH_REASON, code: CRASH_CODE, message: "the command failed; this is a bug", details: [] }
2272
2307
  ]);
2273
2308
 
2274
- // node_modules/.pnpm/@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/standards/steps.js
2309
+ // node_modules/.pnpm/@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/standards/steps.js
2275
2310
  var SAME_COMMAND = "*";
2276
2311
  var commandPath = pipe(string(), regex(/^[a-z][a-z0-9-]*( [a-z][a-z0-9-]*)*$/, "a command path such as `messages sync`"));
2277
2312
  var stepSchema = union([
@@ -2350,7 +2385,7 @@ var STEPS = defineSteps([
2350
2385
  }
2351
2386
  ]);
2352
2387
 
2353
- // node_modules/.pnpm/@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/failure.js
2388
+ // node_modules/.pnpm/@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/failure.js
2354
2389
  var recognise = /* @__PURE__ */ __name((failure) => {
2355
2390
  if (isCliError(failure))
2356
2391
  return failure;
@@ -2525,6 +2560,7 @@ export {
2525
2560
  boolean,
2526
2561
  custom,
2527
2562
  exactOptional,
2563
+ function_,
2528
2564
  lazy,
2529
2565
  literal,
2530
2566
  looseObject,
@@ -2,15 +2,15 @@ import { createRequire as __bundleRequire } from "node:module";
2
2
  const require = __bundleRequire(import.meta.url);
3
3
  import {
4
4
  PRAGMAS
5
- } from "./chunk-6QCBTBDA.js";
5
+ } from "./chunk-GGMAIIVE.js";
6
6
  import {
7
7
  CliError
8
- } from "./chunk-ST3ZB7LS.js";
8
+ } from "./chunk-IANKXHSE.js";
9
9
  import {
10
10
  __name
11
11
  } from "./chunk-ZVVMGPBJ.js";
12
12
 
13
- // node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/sqlite-warning.js
13
+ // node_modules/.pnpm/@wirecat+cli-core@1.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_dd5172c52281f8f1e2dd1d4e9555d5c3/node_modules/@wirecat/cli-core/dist/store/sqlite-warning.js
14
14
  var SQLITE_WARNING = "SQLite is an experimental feature";
15
15
  var quieted = /* @__PURE__ */ new WeakSet();
16
16
  var quietSqliteWarning = /* @__PURE__ */ __name((host = process) => {
@@ -31,7 +31,7 @@ var isSqliteWarning = /* @__PURE__ */ __name((warning, options) => {
31
31
  return name === "ExperimentalWarning" && message.startsWith(SQLITE_WARNING);
32
32
  }, "isSqliteWarning");
33
33
 
34
- // node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/store/open.js
34
+ // node_modules/.pnpm/@wirecat+cli-core@1.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_dd5172c52281f8f1e2dd1d4e9555d5c3/node_modules/@wirecat/cli-core/dist/store/open.js
35
35
  var openCache = /* @__PURE__ */ __name(async (path) => {
36
36
  const database = await openFile(path);
37
37
  try {
@@ -44,12 +44,12 @@ var openCache = /* @__PURE__ */ __name(async (path) => {
44
44
  }, "openCache");
45
45
  var openFile = /* @__PURE__ */ __name((path) => "Bun" in globalThis ? openUnderBun(path) : openUnderNode(path), "openFile");
46
46
  var openUnderBun = /* @__PURE__ */ __name(async (path) => {
47
- const { openWithBunSqlite } = await import("./bun-sqlite-MTP5JJQ2.js");
47
+ const { openWithBunSqlite } = await import("./bun-sqlite-HC6X4AOX.js");
48
48
  return await openWithBunSqlite(path);
49
49
  }, "openUnderBun");
50
50
  var openUnderNode = /* @__PURE__ */ __name(async (path) => {
51
51
  quietSqliteWarning();
52
- const { openWithNodeSqlite } = await import("./node-sqlite-FJWKJHYU.js");
52
+ const { openWithNodeSqlite } = await import("./node-sqlite-IJBWENFX.js");
53
53
  return openWithNodeSqlite(path);
54
54
  }, "openUnderNode");
55
55
  var runtime = /* @__PURE__ */ __name(() => {
@@ -5,7 +5,7 @@ import {
5
5
  id,
6
6
  text,
7
7
  time
8
- } from "./chunk-M4LAF627.js";
8
+ } from "./chunk-ZOYOXWJB.js";
9
9
  import {
10
10
  array,
11
11
  nullable,
@@ -16,9 +16,9 @@ import {
16
16
  strictObject,
17
17
  string,
18
18
  unknown
19
- } from "./chunk-ZPZT46O6.js";
19
+ } from "./chunk-ESN3W2MZ.js";
20
20
 
21
- // node_modules/.pnpm/@wirecat+cli-core@0.691.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_d368e4a5540cfb6719e97dbe530c5868/node_modules/@wirecat/cli-core/dist/entities/note.js
21
+ // node_modules/.pnpm/@wirecat+cli-core@1.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_dd5172c52281f8f1e2dd1d4e9555d5c3/node_modules/@wirecat/cli-core/dist/entities/note.js
22
22
  var link = {
23
23
  target_text: nullable(text),
24
24
  kind: text,