@wirecat/zoom-cli 0.60.0 → 0.61.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 (191) hide show
  1. package/README.md +7 -6
  2. package/dist/answers.d.ts +16 -0
  3. package/dist/answers.d.ts.map +1 -1
  4. package/dist/bin/main.js +1 -0
  5. package/dist/bin/main.js.map +1 -1
  6. package/dist/bin/zm.js +2 -2
  7. package/dist/bundle/{chunk-PUOBYJFI.js → all-profiles-HZLIU6RZ.js} +11 -7
  8. package/dist/bundle/answer-policy-GRODO2DY.js +96 -0
  9. package/dist/bundle/{anthropic-TT2XV74T.js → anthropic-O2YYPCVK.js} +4 -4
  10. package/dist/bundle/{app-server-POMYD6QV.js → app-server-YYCANTUE.js} +50 -50
  11. package/dist/bundle/{bun-JVDJVDHL.js → bun-UEFRULAT.js} +2 -2
  12. package/dist/bundle/{bun-sqlite-BBOPAQVG.js → bun-sqlite-VVYKOY7S.js} +3 -3
  13. package/dist/bundle/{chunk-KVPYI52N.js → chunk-2M2U43IF.js} +2 -2
  14. package/dist/bundle/{chunk-7GVNQOV6.js → chunk-35X6G276.js} +1 -1
  15. package/dist/bundle/{chunk-RH5YXXAB.js → chunk-3TGR4RDD.js} +32 -34
  16. package/dist/bundle/{chunk-YZZ6NBXC.js → chunk-4XI4PDEH.js} +31 -21
  17. package/dist/bundle/{chunk-W5EUHV3J.js → chunk-4XPIOW5L.js} +1 -1
  18. package/dist/bundle/{chunk-PU4FKK5T.js → chunk-5NRBNGR3.js} +2 -2
  19. package/dist/bundle/{chunk-LYZNVNJA.js → chunk-67WW33JB.js} +49 -24
  20. package/dist/bundle/{chunk-3P4LUGXI.js → chunk-6LHTWR3X.js} +2 -2
  21. package/dist/bundle/{chunk-SG3WSP7Y.js → chunk-6RV7KXDF.js} +7 -7
  22. package/dist/bundle/{chunk-VYUSEJE4.js → chunk-6SLGIPLT.js} +2 -2
  23. package/dist/bundle/{chunk-EOZWDEJL.js → chunk-77GJITSU.js} +2 -2
  24. package/dist/bundle/{chunk-72A7CIPL.js → chunk-7ATLKYBN.js} +17 -17
  25. package/dist/bundle/{chunk-YSZQ5SZK.js → chunk-7DMMNCY2.js} +3 -3
  26. package/dist/bundle/chunk-ABCHE4YP.js +217 -0
  27. package/dist/bundle/{chunk-G3MXAGF2.js → chunk-AOSIU5T6.js} +51 -38
  28. package/dist/bundle/{chunk-TAQKNWCD.js → chunk-B3PTSX5D.js} +2 -2
  29. package/dist/bundle/{chunk-J3N2LL37.js → chunk-B45MFBBF.js} +6 -6
  30. package/dist/bundle/{chunk-GNRYFESK.js → chunk-BNUNZTOU.js} +25 -25
  31. package/dist/bundle/{chunk-SK3K2VHF.js → chunk-BPQNTYLN.js} +388 -299
  32. package/dist/bundle/{chunk-LKV3NRCJ.js → chunk-CMG54Q4X.js} +120 -32
  33. package/dist/bundle/{chunk-DP5DX45H.js → chunk-COU66X3X.js} +7 -5
  34. package/dist/bundle/{chunk-NKFRV2LB.js → chunk-CUSGSXSR.js} +2 -2
  35. package/dist/bundle/{chunk-MFS52LTZ.js → chunk-DLAFGSTN.js} +1 -1
  36. package/dist/bundle/{chunk-DKIIKMSE.js → chunk-E4QPLXZT.js} +47 -47
  37. package/dist/bundle/{chunk-MGYFSXI5.js → chunk-E4T7IJJO.js} +26 -26
  38. package/dist/bundle/{chunk-AJA5ZAV6.js → chunk-F32GKBMF.js} +22 -5
  39. package/dist/bundle/{chunk-DN7VHENQ.js → chunk-FAOVUALC.js} +13 -13
  40. package/dist/bundle/{chunk-EF2RCQ3L.js → chunk-FBJC7OCI.js} +1 -1
  41. package/dist/bundle/{chunk-HIAO4MPA.js → chunk-FQ54A7GI.js} +1 -1
  42. package/dist/bundle/{chunk-EXFAA4N3.js → chunk-FXY45HU7.js} +6 -6
  43. package/dist/bundle/{chunk-2EVRKK75.js → chunk-GNHPYQMM.js} +2 -2
  44. package/dist/bundle/{chunk-M5WLBRL7.js → chunk-H5EAHMQN.js} +11 -11
  45. package/dist/bundle/chunk-HF233RN4.js +335 -0
  46. package/dist/bundle/{chunk-24DLFGES.js → chunk-HTGBUE2U.js} +2 -2
  47. package/dist/bundle/{chunk-RSLXLUTS.js → chunk-IKZFR645.js} +10 -10
  48. package/dist/bundle/chunk-JKWYXBGK.js +380 -0
  49. package/dist/bundle/{chunk-DAQXO6SM.js → chunk-KGZHRJ7H.js} +4 -4
  50. package/dist/bundle/{chunk-ZK7Y5K63.js → chunk-KPZIQKOF.js} +1 -1
  51. package/dist/bundle/{chunk-7T3BUWJK.js → chunk-KXYURHVE.js} +118 -95
  52. package/dist/bundle/{chunk-4HZRZDMC.js → chunk-KZGHGU2M.js} +4 -4
  53. package/dist/bundle/{chunk-2TV7UTHK.js → chunk-KZV5GU7G.js} +8 -8
  54. package/dist/bundle/{chunk-YIMI6O7R.js → chunk-L7VIPVHL.js} +263 -199
  55. package/dist/bundle/{chunk-XLJV3ZOH.js → chunk-LPJ3S6GE.js} +1 -1
  56. package/dist/bundle/{chunk-HBYE4EP2.js → chunk-LX6DO44O.js} +1 -1
  57. package/dist/bundle/{chunk-3UMXCNDI.js → chunk-LXOSBFWW.js} +7 -7
  58. package/dist/bundle/{chunk-KUBCUE6T.js → chunk-M3EVVGR6.js} +2 -2
  59. package/dist/bundle/{chunk-WVXAQVLG.js → chunk-MBMDF5EL.js} +6 -6
  60. package/dist/bundle/{chunk-KUBWRI5E.js → chunk-MTAVA2LS.js} +2 -2
  61. package/dist/bundle/{chunk-AQDWGJZT.js → chunk-MVRCLMQL.js} +39 -2
  62. package/dist/bundle/{chunk-UOFOMU3T.js → chunk-NVN4O5IC.js} +14 -10
  63. package/dist/bundle/{chunk-SKENSSY2.js → chunk-O3WVOAT7.js} +408 -420
  64. package/dist/bundle/{chunk-EROQ5SC7.js → chunk-OLZE27RS.js} +2 -2
  65. package/dist/bundle/{chunk-22UBF6U6.js → chunk-OMUX4LSS.js} +4 -4
  66. package/dist/bundle/{chunk-QJCVOVNR.js → chunk-OU46OTTE.js} +3 -3
  67. package/dist/bundle/{chunk-JBGYI5BY.js → chunk-OVVDOVLN.js} +2 -2
  68. package/dist/bundle/{chunk-I45V6AFG.js → chunk-P2NRA7E5.js} +2 -2
  69. package/dist/bundle/{chunk-7PQY4ISY.js → chunk-PCUPOGKR.js} +6 -4
  70. package/dist/bundle/{chunk-4MC4Z45G.js → chunk-QHT2LZRW.js} +6 -6
  71. package/dist/bundle/{decode-UBPIHVNG.js → chunk-RGOBGHWE.js} +21 -18
  72. package/dist/bundle/{chunk-UOL4ILXT.js → chunk-RSXLI5GP.js} +79 -59
  73. package/dist/bundle/{chunk-RNX73QCL.js → chunk-S726LZCH.js} +6 -6
  74. package/dist/bundle/{chunk-TB72GE55.js → chunk-SVBM6F4Z.js} +1 -1
  75. package/dist/bundle/{chunk-GXACHTB2.js → chunk-T7IQMYPW.js} +15 -3
  76. package/dist/bundle/{chunk-Q4NDCDFG.js → chunk-TD4Y5LXG.js} +25 -22
  77. package/dist/bundle/{chunk-V2QOLHPM.js → chunk-U4Y2QQ2D.js} +3 -3
  78. package/dist/bundle/{chunk-ODFIV4OS.js → chunk-UPWHCUVA.js} +617 -380
  79. package/dist/bundle/{chunk-E3AMUYNB.js → chunk-UYAKSUT5.js} +5 -5
  80. package/dist/bundle/{chunk-J5ZVGKSZ.js → chunk-VARX3SBT.js} +1 -1
  81. package/dist/bundle/{chunk-IFXPNXAH.js → chunk-WVYSOV3C.js} +16 -4
  82. package/dist/bundle/{chunk-LZBWU2IA.js → chunk-XOJGXWTK.js} +8 -8
  83. package/dist/bundle/{chunk-4FTPE5SB.js → chunk-XX2PDQ54.js} +31 -211
  84. package/dist/bundle/{chunk-D6L35XQS.js → chunk-XZ4OVTA5.js} +9 -9
  85. package/dist/bundle/{chunk-XAF2LHZG.js → chunk-YESOQEOB.js} +735 -826
  86. package/dist/bundle/{cli-WIMAOCXF.js → cli-O4LAGYXI.js} +60 -54
  87. package/dist/bundle/command-contract-67QKBY6M.js +38 -0
  88. package/dist/bundle/config-ABURZDD2.js +78 -0
  89. package/dist/bundle/decode-WRMZJJCR.js +20 -0
  90. package/dist/bundle/{dist-YYDTME5J.js → dist-SQK4GIJT.js} +14 -14
  91. package/dist/bundle/{echarts-4OQHS575.js → echarts-3DOOJSQR.js} +2 -2
  92. package/dist/bundle/{embed-7JHEPBFD.js → embed-OYRHTMFI.js} +4 -4
  93. package/dist/bundle/{embedder-HTRPWR6T.js → embedder-ZAYCL22W.js} +7 -7
  94. package/dist/bundle/{first-run-I52ADRJ2.js → first-run-QXSPIXOQ.js} +8 -8
  95. package/dist/bundle/first-screen-MD6HWIJW.js +36 -0
  96. package/dist/bundle/{folders-5ZBUQHAM.js → folders-EXQLKXVK.js} +2 -2
  97. package/dist/bundle/{instructions-3QZBKKPF.js → instructions-GFEOB7XJ.js} +1 -1
  98. package/dist/bundle/{main-64VVZ5QG.js → main-RADF3CRI.js} +17 -16
  99. package/dist/bundle/{mcp-OQBZXELQ.js → mcp-WSGVVZWI.js} +2 -2
  100. package/dist/bundle/{meetings-RD3NU6NN.js → meetings-6BIIT42H.js} +4 -4
  101. package/dist/bundle/{node-R2BLYUSB.js → node-A3B2YRQI.js} +2 -2
  102. package/dist/bundle/{node-sqlite-DGEEDBXV.js → node-sqlite-XRP5FUDY.js} +3 -3
  103. package/dist/bundle/{oauth-NRZMCFH3.js → oauth-YICY4AN4.js} +5 -5
  104. package/dist/bundle/{open-SUGCOCAU.js → open-4CNKSQRB.js} +2 -2
  105. package/dist/bundle/openai-YYRO3X7I.js +22 -0
  106. package/dist/bundle/{output-file-SXV2ANW7.js → output-file-7BXYV6OL.js} +3 -3
  107. package/dist/bundle/{process-IX5YWGDP.js → process-A45QXKID.js} +1 -1
  108. package/dist/bundle/{program-WGNTV7NS.js → program-DTP7BRTW.js} +422 -431
  109. package/dist/bundle/{prompt-NICXDWN3.js → prompt-5LMKO7SE.js} +3 -3
  110. package/dist/bundle/{recognize-6DAHO6X6.js → recognize-MB6WRGUD.js} +4 -2
  111. package/dist/bundle/{remote-JZ3TXP6I.js → remote-PD7WMTTS.js} +5 -5
  112. package/dist/bundle/{rerank-YSXWCAGZ.js → rerank-7E6GQ5Y6.js} +5 -5
  113. package/dist/bundle/{run-log-APHZZWC7.js → run-log-TCFK4LEC.js} +53 -53
  114. package/dist/bundle/{chunk-HWZXQLR5.js → serve-JBT2BWHK.js} +8 -6
  115. package/dist/bundle/server-CFIKEPLG.js +66 -0
  116. package/dist/bundle/{chunk-EH6G2LEU.js → server-H2UPGGBI.js} +43 -10
  117. package/dist/bundle/{services-D64U72OE.js → services-SJOTKL5V.js} +33 -26
  118. package/dist/bundle/{speech-QLCQAT4O.js → speech-4SL25GSC.js} +28 -5
  119. package/dist/bundle/{state-KAD3R27T.js → state-FVMTDZ6B.js} +4 -4
  120. package/dist/bundle/{store-7UNPRLZ3.js → store-DNPKBUVO.js} +13 -13
  121. package/dist/bundle/{store-2BHHS77S.js → store-TI77SCNL.js} +15 -15
  122. package/dist/bundle/store-connection-GIFWWMNO.js +76 -0
  123. package/dist/bundle/store-maintenance-command-WBKGF2CZ.js +55 -0
  124. package/dist/bundle/{streaming-AK6Q2ZGQ.js → streaming-UHAHGPH5.js} +4 -4
  125. package/dist/bundle/{tokens-CCM3D4ZT.js → tokens-Y2MX6JBL.js} +4 -4
  126. package/dist/bundle/zm.js +1 -1
  127. package/dist/commands.d.ts +1 -2
  128. package/dist/commands.d.ts.map +1 -1
  129. package/dist/commands.js +3 -16
  130. package/dist/commands.js.map +1 -1
  131. package/dist/contract-overrides.d.ts +0 -2
  132. package/dist/contract-overrides.d.ts.map +1 -1
  133. package/dist/contract-overrides.js +0 -158
  134. package/dist/contract-overrides.js.map +1 -1
  135. package/dist/login.d.ts +1 -0
  136. package/dist/login.d.ts.map +1 -1
  137. package/dist/login.js +1 -1
  138. package/dist/login.js.map +1 -1
  139. package/dist/program-bindings.d.ts +1 -1
  140. package/dist/program-bindings.d.ts.map +1 -1
  141. package/dist/program-bindings.js +16 -18
  142. package/dist/program-bindings.js.map +1 -1
  143. package/dist/program.d.ts +2 -4
  144. package/dist/program.d.ts.map +1 -1
  145. package/dist/program.js.map +1 -1
  146. package/dist/read-only.d.ts.map +1 -1
  147. package/dist/read-only.js +3 -0
  148. package/dist/read-only.js.map +1 -1
  149. package/dist/recording-schedule-setup.d.ts.map +1 -1
  150. package/dist/recording-schedule-setup.js +1 -0
  151. package/dist/recording-schedule-setup.js.map +1 -1
  152. package/dist/run.d.ts.map +1 -1
  153. package/dist/run.js +82 -32
  154. package/dist/run.js.map +1 -1
  155. package/dist/setup-commands.d.ts.map +1 -1
  156. package/dist/setup-commands.js +14 -47
  157. package/dist/setup-commands.js.map +1 -1
  158. package/dist/store-commands.d.ts.map +1 -1
  159. package/dist/store-commands.js +4 -1
  160. package/dist/store-commands.js.map +1 -1
  161. package/dist/tokens.d.ts +15 -0
  162. package/dist/tokens.d.ts.map +1 -1
  163. package/dist/tokens.js +40 -1
  164. package/dist/tokens.js.map +1 -1
  165. package/dist/version.d.ts +1 -1
  166. package/dist/version.js +1 -1
  167. package/package.json +3 -3
  168. package/dist/bundle/all-profiles-7OZPJY76.js +0 -25
  169. package/dist/bundle/answer-policy-PVWMA2QC.js +0 -96
  170. package/dist/bundle/chunk-57LT4A2E.js +0 -48
  171. package/dist/bundle/chunk-XMCVB4Q4.js +0 -390
  172. package/dist/bundle/chunk-YLBNPI7H.js +0 -2
  173. package/dist/bundle/command-contract-J7PDZQMC.js +0 -38
  174. package/dist/bundle/config-G62PBNZF.js +0 -79
  175. package/dist/bundle/first-screen-XNCFWOLC.js +0 -36
  176. package/dist/bundle/mcp-5SJXWEJW.js +0 -92
  177. package/dist/bundle/mcp-ZMIPDB4R.js +0 -189
  178. package/dist/bundle/serve-7VWL475U.js +0 -19
  179. package/dist/bundle/server-7LABFAA5.js +0 -53
  180. package/dist/bundle/server-VFXB5WRG.js +0 -66
  181. package/dist/bundle/store-connection-QTMLZ7LR.js +0 -76
  182. package/dist/bundle/store-maintenance-command-ND6PQCVZ.js +0 -54
  183. package/dist/mcp-command.d.ts +0 -33
  184. package/dist/mcp-command.d.ts.map +0 -1
  185. package/dist/mcp-command.js +0 -143
  186. package/dist/mcp-command.js.map +0 -1
  187. package/dist/mcp.d.ts +0 -30
  188. package/dist/mcp.d.ts.map +0 -1
  189. package/dist/mcp.js +0 -110
  190. package/dist/mcp.js.map +0 -1
  191. /package/dist/bundle/{chunk-O5EHUB2V.js → chunk-62EDJKGP.js} +0 -0
@@ -3,15 +3,15 @@ const require = __bundleRequire(import.meta.url);
3
3
  import {
4
4
  envName,
5
5
  readOnlyLockOf
6
- } from "./chunk-3P4LUGXI.js";
6
+ } from "./chunk-6LHTWR3X.js";
7
7
  import {
8
8
  CAPABILITY_STATEMENTS,
9
9
  storeCapable
10
- } from "./chunk-WVXAQVLG.js";
10
+ } from "./chunk-MBMDF5EL.js";
11
11
  import {
12
12
  CliError,
13
13
  catchCrashes
14
- } from "./chunk-YIMI6O7R.js";
14
+ } from "./chunk-L7VIPVHL.js";
15
15
  import {
16
16
  importFrom
17
17
  } from "./chunk-Y5E2WNWB.js";
@@ -19,10 +19,10 @@ import {
19
19
  __name
20
20
  } from "./chunk-ZVVMGPBJ.js";
21
21
 
22
- // node_modules/.pnpm/@wirecat+cli-core@0.491.0_@wirecat+cli-base@0.65.0_commander@15.0.0_esbuild@0.28.2_type_1193098e908042dfe6f4070222ac0245/node_modules/@wirecat/cli-core/dist/cli/entry.js
22
+ // node_modules/.pnpm/@wirecat+cli-core@0.503.0_@wirecat+cli-base@0.67.0_commander@15.0.0_esbuild@0.28.2_type_e5d4ab9592406842b4a214ba16b749bd/node_modules/@wirecat/cli-core/dist/cli/entry.js
23
23
  import { spawn as spawn2 } from "node:child_process";
24
24
 
25
- // node_modules/.pnpm/@wirecat+cli-core@0.491.0_@wirecat+cli-base@0.65.0_commander@15.0.0_esbuild@0.28.2_type_1193098e908042dfe6f4070222ac0245/node_modules/@wirecat/cli-core/dist/sqlite-runtime.js
25
+ // node_modules/.pnpm/@wirecat+cli-core@0.503.0_@wirecat+cli-base@0.67.0_commander@15.0.0_esbuild@0.28.2_type_e5d4ab9592406842b4a214ba16b749bd/node_modules/@wirecat/cli-core/dist/sqlite-runtime.js
26
26
  import { spawn, spawnSync } from "node:child_process";
27
27
  import { readFileSync } from "node:fs";
28
28
  import { dirname } from "node:path";
@@ -110,7 +110,7 @@ var relay = /* @__PURE__ */ __name((child, host = process) => new Promise(() =>
110
110
  });
111
111
  }), "relay");
112
112
 
113
- // node_modules/.pnpm/@wirecat+cli-core@0.491.0_@wirecat+cli-base@0.65.0_commander@15.0.0_esbuild@0.28.2_type_1193098e908042dfe6f4070222ac0245/node_modules/@wirecat/cli-core/dist/cli/argv-log.js
113
+ // node_modules/.pnpm/@wirecat+cli-core@0.503.0_@wirecat+cli-base@0.67.0_commander@15.0.0_esbuild@0.28.2_type_e5d4ab9592406842b4a214ba16b749bd/node_modules/@wirecat/cli-core/dist/cli/argv-log.js
114
114
  import { appendFileSync } from "node:fs";
115
115
  var logParsedArgv = /* @__PURE__ */ __name((file, action) => {
116
116
  const words = [];
@@ -134,7 +134,7 @@ var logVersion = /* @__PURE__ */ __name((file) => {
134
134
  `);
135
135
  }, "logVersion");
136
136
 
137
- // node_modules/.pnpm/@wirecat+cli-core@0.491.0_@wirecat+cli-base@0.65.0_commander@15.0.0_esbuild@0.28.2_type_1193098e908042dfe6f4070222ac0245/node_modules/@wirecat/cli-core/dist/cli/entry.js
137
+ // node_modules/.pnpm/@wirecat+cli-core@0.503.0_@wirecat+cli-base@0.67.0_commander@15.0.0_esbuild@0.28.2_type_e5d4ab9592406842b4a214ba16b749bd/node_modules/@wirecat/cli-core/dist/cli/entry.js
138
138
  var processIo = /* @__PURE__ */ __name(() => ({
139
139
  argv: process.argv,
140
140
  env: process.env,
@@ -188,8 +188,8 @@ var startCli = /* @__PURE__ */ __name(async (entry) => {
188
188
  if (command.optsWithGlobals().dryRun === true)
189
189
  return;
190
190
  const [{ setupAtStart }, { commandPathOf }] = await Promise.all([
191
- import("./first-run-I52ADRJ2.js"),
192
- import("./command-contract-J7PDZQMC.js")
191
+ import("./first-run-QXSPIXOQ.js"),
192
+ import("./command-contract-67QKBY6M.js")
193
193
  ]);
194
194
  await setupAtStart({
195
195
  command: entry.app.command,
@@ -204,7 +204,7 @@ var startCli = /* @__PURE__ */ __name(async (entry) => {
204
204
  ask: /* @__PURE__ */ __name(async (question, command) => {
205
205
  if (headless(command) || io.stdin.isTTY !== true)
206
206
  return false;
207
- const { readSecret } = await import("./prompt-NICXDWN3.js");
207
+ const { readSecret } = await import("./prompt-5LMKO7SE.js");
208
208
  const answer = await readSecret(`${question} [y/N] `, {
209
209
  input: io.stdin,
210
210
  output: io.stderr,
@@ -0,0 +1,380 @@
1
+ import { createRequire as __bundleRequire } from "node:module";
2
+ const require = __bundleRequire(import.meta.url);
3
+ import {
4
+ CliError
5
+ } from "./chunk-L7VIPVHL.js";
6
+ import {
7
+ __name
8
+ } from "./chunk-ZVVMGPBJ.js";
9
+
10
+ // node_modules/.pnpm/@wirecat+cli-core@0.503.0_@wirecat+cli-base@0.67.0_commander@15.0.0_esbuild@0.28.2_type_e5d4ab9592406842b4a214ba16b749bd/node_modules/@wirecat/cli-core/dist/files/atomic-write.js
11
+ import { randomUUID } from "node:crypto";
12
+ import { constants } from "node:fs";
13
+ import { link, open, realpath, rename, unlink } from "node:fs/promises";
14
+ import { basename, dirname, join } from "node:path";
15
+ var openFolder = /* @__PURE__ */ __name((folder) => process.platform === "win32" ? Promise.resolve(void 0) : open(folder, constants.O_RDONLY | (constants.O_DIRECTORY ?? 0) | (constants.O_NOFOLLOW ?? 0)), "openFolder");
16
+ var writeFileAtomic = /* @__PURE__ */ __name(async (path, content, { mode = 384, overwrite = true, signal, beforePublish } = {}) => {
17
+ signal?.throwIfAborted();
18
+ const folder = await realpath(dirname(path));
19
+ const target = join(folder, basename(path));
20
+ const directory = await openFolder(folder);
21
+ try {
22
+ const temporary = join(folder, `.${basename(path)}.${randomUUID()}.tmp`);
23
+ let handle = await open(temporary, "wx", mode);
24
+ let published = false;
25
+ try {
26
+ await handle.writeFile(content);
27
+ await handle.sync();
28
+ await handle.close();
29
+ handle = void 0;
30
+ signal?.throwIfAborted();
31
+ await beforePublish?.();
32
+ if (overwrite)
33
+ await rename(temporary, target);
34
+ else
35
+ await link(temporary, target);
36
+ published = overwrite;
37
+ await directory?.sync();
38
+ } finally {
39
+ await handle?.close().catch(() => void 0);
40
+ if (!published)
41
+ await unlink(temporary).catch(() => void 0);
42
+ }
43
+ } finally {
44
+ await directory?.close().catch(() => void 0);
45
+ }
46
+ }, "writeFileAtomic");
47
+
48
+ // node_modules/.pnpm/@wirecat+cli-core@0.503.0_@wirecat+cli-base@0.67.0_commander@15.0.0_esbuild@0.28.2_type_e5d4ab9592406842b4a214ba16b749bd/node_modules/@wirecat/cli-core/dist/files/ordinary-file.js
49
+ import { constants as constants2 } from "node:fs";
50
+ import { lstat, open as open2 } from "node:fs/promises";
51
+ var deviceOf = /* @__PURE__ */ __name((dev) => process.platform === "win32" ? BigInt.asUintN(32, dev) : dev, "deviceOf");
52
+ var sameIdentity = /* @__PURE__ */ __name((left, right) => left.ino === right.ino && deviceOf(left.dev) === deviceOf(right.dev), "sameIdentity");
53
+ var openOrdinaryFile = /* @__PURE__ */ __name(async (path, options = {}) => {
54
+ const before = await lstat(path, { bigint: true });
55
+ if (before.isSymbolicLink())
56
+ throw new CliError("validation_error", "archive path must be an ordinary file without a symlink");
57
+ if (!before.isFile())
58
+ throw new CliError("validation_error", "archive path must be an ordinary file");
59
+ const access = options.writable ? constants2.O_RDWR : constants2.O_RDONLY;
60
+ const flags = process.platform === "win32" ? access : access | (constants2.O_NOFOLLOW ?? 0) | (constants2.O_NONBLOCK ?? 0);
61
+ const file = await open2(path, flags);
62
+ try {
63
+ const opened = await file.stat({ bigint: true });
64
+ const after = await lstat(path, { bigint: true });
65
+ if (!opened.isFile() || !after.isFile() || before.ino !== opened.ino || before.ino !== after.ino)
66
+ throw new CliError("validation_error", "archive file changed while opening");
67
+ if (process.platform === "win32" && before.dev === 0n && after.dev === 0n) {
68
+ const witness = await open2(path, flags);
69
+ try {
70
+ const identified = await witness.stat({ bigint: true });
71
+ const final = await lstat(path, { bigint: true });
72
+ if (opened.dev === 0n || !identified.isFile() || !final.isFile() || !sameIdentity(identified, opened) || final.ino !== before.ino || final.dev !== 0n && deviceOf(final.dev) !== deviceOf(opened.dev))
73
+ throw new CliError("validation_error", "archive file changed while opening");
74
+ } finally {
75
+ await witness.close();
76
+ }
77
+ } else if (deviceOf(before.dev) !== deviceOf(opened.dev) || deviceOf(before.dev) !== deviceOf(after.dev)) {
78
+ throw new CliError("validation_error", "archive file changed while opening");
79
+ }
80
+ return file;
81
+ } catch (error) {
82
+ await file.close();
83
+ throw error;
84
+ }
85
+ }, "openOrdinaryFile");
86
+ var sameOrdinaryFile = /* @__PURE__ */ __name(async (path, created) => {
87
+ let file;
88
+ try {
89
+ file = await openOrdinaryFile(path);
90
+ } catch (error) {
91
+ if (error instanceof CliError || typeof error === "object" && error !== null && "code" in error && error.code === "ENOENT")
92
+ return false;
93
+ throw error;
94
+ }
95
+ try {
96
+ return sameIdentity(created, await file.stat({ bigint: true }));
97
+ } finally {
98
+ await file.close();
99
+ }
100
+ }, "sameOrdinaryFile");
101
+ var syncDirectory = /* @__PURE__ */ __name(async (path) => {
102
+ if (process.platform === "win32")
103
+ return;
104
+ const directory = await open2(path, constants2.O_RDONLY | (constants2.O_DIRECTORY ?? 0) | (constants2.O_NOFOLLOW ?? 0));
105
+ try {
106
+ if (!(await directory.stat()).isDirectory())
107
+ throw new CliError("validation_error", "archive publication directory must be ordinary");
108
+ await directory.sync();
109
+ } finally {
110
+ await directory.close();
111
+ }
112
+ }, "syncDirectory");
113
+
114
+ // node_modules/.pnpm/@wirecat+cli-core@0.503.0_@wirecat+cli-base@0.67.0_commander@15.0.0_esbuild@0.28.2_type_e5d4ab9592406842b4a214ba16b749bd/node_modules/@wirecat/cli-core/dist/files/bounded-utf8.js
115
+ var readBoundedUtf8File = /* @__PURE__ */ __name(async (path, { maxBytes }) => {
116
+ if (!Number.isSafeInteger(maxBytes) || maxBytes < 1 || maxBytes > 16 * 1024 * 1024)
117
+ throw new CliError("validation_error", "file maxBytes takes 1\u201316777216 bytes");
118
+ const file = await openOrdinaryFile(path);
119
+ try {
120
+ if ((await file.stat()).size > maxBytes)
121
+ throw new CliError("validation_error", "input file exceeds its byte budget");
122
+ const chunks = [], buffer = Buffer.alloc(Math.min(65536, maxBytes + 1));
123
+ let bytes = 0;
124
+ for (; ; ) {
125
+ const { bytesRead } = await file.read(buffer, 0, Math.min(buffer.length, maxBytes - bytes + 1), null);
126
+ if (bytesRead === 0)
127
+ break;
128
+ bytes += bytesRead;
129
+ if (bytes > maxBytes)
130
+ throw new CliError("validation_error", "input file exceeds its byte budget");
131
+ chunks.push(Buffer.from(buffer.subarray(0, bytesRead)));
132
+ }
133
+ try {
134
+ return new TextDecoder("utf-8", { fatal: true }).decode(Buffer.concat(chunks, bytes));
135
+ } catch {
136
+ throw new CliError("validation_error", "input file must contain valid UTF-8");
137
+ }
138
+ } finally {
139
+ await file.close();
140
+ }
141
+ }, "readBoundedUtf8File");
142
+
143
+ // node_modules/.pnpm/@wirecat+cli-core@0.503.0_@wirecat+cli-base@0.67.0_commander@15.0.0_esbuild@0.28.2_type_e5d4ab9592406842b4a214ba16b749bd/node_modules/@wirecat/cli-core/dist/files/lock.js
144
+ import { mkdir as mkdir2 } from "node:fs/promises";
145
+ import { basename as basename2, dirname as dirname2 } from "node:path";
146
+
147
+ // node_modules/.pnpm/@wirecat+cli-core@0.503.0_@wirecat+cli-base@0.67.0_commander@15.0.0_esbuild@0.28.2_type_e5d4ab9592406842b4a214ba16b749bd/node_modules/@wirecat/cli-core/dist/files/native-writer-lease.js
148
+ import { randomUUID as randomUUID2 } from "node:crypto";
149
+ import { lstat as lstat3, mkdir, open as open3, realpath as realpath3, rmdir as rmdir2, unlink as unlink4 } from "node:fs/promises";
150
+ import { hostname as hostname2 } from "node:os";
151
+ import { join as join3 } from "node:path";
152
+
153
+ // node_modules/.pnpm/@wirecat+cli-core@0.503.0_@wirecat+cli-base@0.67.0_commander@15.0.0_esbuild@0.28.2_type_e5d4ab9592406842b4a214ba16b749bd/node_modules/@wirecat/cli-core/dist/files/native-lease-inspection.js
154
+ import { lstat as lstat2, readdir, realpath as realpath2, unlink as unlink2 } from "node:fs/promises";
155
+ import { join as join2 } from "node:path";
156
+
157
+ // node_modules/.pnpm/@wirecat+cli-core@0.503.0_@wirecat+cli-base@0.67.0_commander@15.0.0_esbuild@0.28.2_type_e5d4ab9592406842b4a214ba16b749bd/node_modules/@wirecat/cli-core/dist/files/native-lease-owner.js
158
+ import { hostname } from "node:os";
159
+ var missingLeaseFile = /* @__PURE__ */ __name((error) => typeof error === "object" && error !== null && "code" in error && error.code === "ENOENT", "missingLeaseFile");
160
+ var readLeaseOwner = /* @__PURE__ */ __name(async (path, name, signal) => {
161
+ signal?.throwIfAborted();
162
+ try {
163
+ const file = await openOrdinaryFile(path);
164
+ try {
165
+ if ((await file.stat()).size > 4096)
166
+ return null;
167
+ const buffer = Buffer.alloc(4097);
168
+ let size = 0;
169
+ while (size < buffer.length) {
170
+ signal?.throwIfAborted();
171
+ const { bytesRead } = await file.read(buffer, size, buffer.length - size, size);
172
+ if (bytesRead === 0)
173
+ break;
174
+ size += bytesRead;
175
+ }
176
+ signal?.throwIfAborted();
177
+ if (size > 4096)
178
+ return null;
179
+ const owner = JSON.parse(buffer.subarray(0, size).toString("utf8"));
180
+ if (owner?.version !== 1 || !Number.isSafeInteger(owner.pid) || owner.pid <= 0 || typeof owner.host !== "string" || !owner.host.trim() || !/^[a-f0-9-]{36}$/.test(owner.nonce) || name !== `${owner.pid}-${owner.nonce}.json`)
181
+ return null;
182
+ return owner;
183
+ } finally {
184
+ await file.close();
185
+ }
186
+ } catch {
187
+ signal?.throwIfAborted();
188
+ return null;
189
+ }
190
+ }, "readLeaseOwner");
191
+ var leaseOwnerStatus = /* @__PURE__ */ __name((owner) => {
192
+ if (owner.host !== hostname())
193
+ return "foreign";
194
+ try {
195
+ process.kill(owner.pid, 0);
196
+ return "active";
197
+ } catch (error) {
198
+ return typeof error === "object" && error !== null && "code" in error && error.code === "ESRCH" ? "stale" : "active";
199
+ }
200
+ }, "leaseOwnerStatus");
201
+
202
+ // node_modules/.pnpm/@wirecat+cli-core@0.503.0_@wirecat+cli-base@0.67.0_commander@15.0.0_esbuild@0.28.2_type_e5d4ab9592406842b4a214ba16b749bd/node_modules/@wirecat/cli-core/dist/files/native-lease-inspection.js
203
+ var leaseInspection = /* @__PURE__ */ __name((markerDirectory) => {
204
+ const inspect = /* @__PURE__ */ __name(async (destination, options = {}) => {
205
+ options.signal?.throwIfAborted();
206
+ const root = await realpath2(destination);
207
+ options.signal?.throwIfAborted();
208
+ const folder = join2(root, markerDirectory);
209
+ let names;
210
+ try {
211
+ if ((await lstat2(folder)).isSymbolicLink())
212
+ throw new Error("symlink");
213
+ names = await readdir(folder);
214
+ } catch (error) {
215
+ options.signal?.throwIfAborted();
216
+ if (missingLeaseFile(error))
217
+ return [];
218
+ throw new CliError("configuration_error", "archive lock directory could not be read");
219
+ }
220
+ options.signal?.throwIfAborted();
221
+ const result = [];
222
+ for (const name of names.sort()) {
223
+ options.signal?.throwIfAborted();
224
+ const owner = await readLeaseOwner(join2(folder, name), name, options.signal);
225
+ result.push({
226
+ name,
227
+ status: owner ? leaseOwnerStatus(owner) : "unrecognized",
228
+ pid: owner?.pid ?? null,
229
+ host: owner?.host ?? null
230
+ });
231
+ }
232
+ return result;
233
+ }, "inspect");
234
+ const recover = /* @__PURE__ */ __name(async (destination, options = {}) => {
235
+ options.signal?.throwIfAborted();
236
+ const root = await realpath2(destination);
237
+ const locks = await inspect(root, options);
238
+ const removed = [];
239
+ if (options.apply)
240
+ for (const lock of locks) {
241
+ options.signal?.throwIfAborted();
242
+ if (lock.status !== "stale")
243
+ continue;
244
+ const path = join2(root, markerDirectory, lock.name);
245
+ const owner = await readLeaseOwner(path, lock.name, options.signal);
246
+ if (!owner || leaseOwnerStatus(owner) !== "stale")
247
+ continue;
248
+ try {
249
+ await unlink2(path);
250
+ removed.push(lock.name);
251
+ } catch (error) {
252
+ if (!missingLeaseFile(error))
253
+ throw new CliError("configuration_error", "stale archive lock could not be removed");
254
+ }
255
+ }
256
+ return { locks, removed };
257
+ }, "recover");
258
+ return { inspect, recover };
259
+ }, "leaseInspection");
260
+
261
+ // node_modules/.pnpm/@wirecat+cli-core@0.503.0_@wirecat+cli-base@0.67.0_commander@15.0.0_esbuild@0.28.2_type_e5d4ab9592406842b4a214ba16b749bd/node_modules/@wirecat/cli-core/dist/files/native-lease-release.js
262
+ import { rmdir, unlink as unlink3 } from "node:fs/promises";
263
+ var ownedNativeLease = /* @__PURE__ */ __name((path, name, owner, folder, identity) => {
264
+ let releasing;
265
+ const held = /* @__PURE__ */ __name(async () => {
266
+ if (!await sameOrdinaryFile(path, identity))
267
+ return false;
268
+ const current = await readLeaseOwner(path, name);
269
+ return current?.host === owner.host && current.pid === owner.pid && current.nonce === owner.nonce;
270
+ }, "held");
271
+ const release = /* @__PURE__ */ __name(async () => {
272
+ if (!await held())
273
+ throw new CliError("configuration_error", "owned archive lock changed before release");
274
+ await unlink3(path);
275
+ await rmdir(folder).catch(() => void 0);
276
+ }, "release");
277
+ return {
278
+ held,
279
+ release: /* @__PURE__ */ __name(() => releasing ??= release().catch((error) => {
280
+ releasing = void 0;
281
+ throw error;
282
+ }), "release")
283
+ };
284
+ }, "ownedNativeLease");
285
+
286
+ // node_modules/.pnpm/@wirecat+cli-core@0.503.0_@wirecat+cli-base@0.67.0_commander@15.0.0_esbuild@0.28.2_type_e5d4ab9592406842b4a214ba16b749bd/node_modules/@wirecat/cli-core/dist/files/native-writer-lease.js
287
+ var validName = /* @__PURE__ */ __name((value) => typeof value === "string" && value.length > 0 && value !== "." && value !== ".." && !/[\\/\0:]/.test(value), "validName");
288
+ var nativeWriterLeaseStore = /* @__PURE__ */ __name((layout) => {
289
+ const { markerDirectory, legacyMarker } = layout;
290
+ if (!validName(markerDirectory) || legacyMarker !== void 0 && (!validName(legacyMarker) || legacyMarker === markerDirectory))
291
+ throw new CliError("validation_error", "archive lock layout requires distinct ordinary entry names");
292
+ const inspection = leaseInspection(markerDirectory);
293
+ return {
294
+ ...inspection,
295
+ acquire: /* @__PURE__ */ __name(async (destination, { signal } = {}) => {
296
+ signal?.throwIfAborted();
297
+ const root = await realpath3(destination);
298
+ signal?.throwIfAborted();
299
+ const folder = join3(root, markerDirectory);
300
+ const owner = { version: 1, pid: process.pid, host: hostname2(), nonce: randomUUID2() };
301
+ const name = `${owner.pid}-${owner.nonce}.json`;
302
+ const path = join3(folder, name);
303
+ const marker = /* @__PURE__ */ __name(async (attempt = 1) => {
304
+ await mkdir(folder, { recursive: true });
305
+ try {
306
+ if ((await lstat3(folder)).isSymbolicLink())
307
+ throw new CliError("validation_error", "archive lock directory must not be a symlink");
308
+ await inspection.recover(root, { apply: true, signal });
309
+ signal?.throwIfAborted();
310
+ return await open3(path, "wx", 384);
311
+ } catch (error) {
312
+ if (attempt < 5 && missingLeaseFile(error))
313
+ return marker(attempt + 1);
314
+ throw error;
315
+ }
316
+ }, "marker");
317
+ const file = await marker();
318
+ let retained = false;
319
+ let identity;
320
+ try {
321
+ identity = await file.stat({ bigint: true });
322
+ await file.writeFile(JSON.stringify(owner));
323
+ await file.sync();
324
+ await file.close();
325
+ signal?.throwIfAborted();
326
+ const inspected = await inspection.inspect(root, { signal });
327
+ const own = inspected.find((lock) => lock.name === name);
328
+ if (own?.status !== "active" || own.pid !== owner.pid || own.host !== owner.host)
329
+ throw new CliError("configuration_error", "archive writer lost its lock before acquisition");
330
+ const locks = inspected.filter((lock) => lock.name !== name);
331
+ if (locks.length)
332
+ return { status: "busy", locks };
333
+ if (legacyMarker) {
334
+ try {
335
+ await lstat3(join3(root, legacyMarker));
336
+ return { status: "legacy" };
337
+ } catch (error) {
338
+ if (!missingLeaseFile(error))
339
+ throw error;
340
+ }
341
+ }
342
+ signal?.throwIfAborted();
343
+ retained = true;
344
+ return { status: "acquired", lease: ownedNativeLease(path, name, owner, folder, identity) };
345
+ } finally {
346
+ await file.close().catch(() => void 0);
347
+ if (!retained) {
348
+ if (identity && await sameOrdinaryFile(path, identity))
349
+ await unlink4(path).catch(() => void 0);
350
+ await rmdir2(folder).catch(() => void 0);
351
+ }
352
+ }
353
+ }, "acquire")
354
+ };
355
+ }, "nativeWriterLeaseStore");
356
+
357
+ // node_modules/.pnpm/@wirecat+cli-core@0.503.0_@wirecat+cli-base@0.67.0_commander@15.0.0_esbuild@0.28.2_type_e5d4ab9592406842b4a214ba16b749bd/node_modules/@wirecat/cli-core/dist/files/lock.js
358
+ var acquireLock = /* @__PURE__ */ __name(async (path, { signal } = {}) => {
359
+ const folder = dirname2(path);
360
+ await mkdir2(folder, { recursive: true, mode: 448 });
361
+ const acquired = await nativeWriterLeaseStore({ markerDirectory: basename2(path) }).acquire(folder, {
362
+ ...signal ? { signal } : {}
363
+ });
364
+ if (acquired.status === "acquired")
365
+ return acquired.lease;
366
+ throw new CliError("validation_error", `${basename2(path)} is locked by another process`, {
367
+ reason: "file.locked",
368
+ ...acquired.status === "busy" ? { holders: acquired.locks } : {}
369
+ });
370
+ }, "acquireLock");
371
+
372
+ export {
373
+ writeFileAtomic,
374
+ openOrdinaryFile,
375
+ sameOrdinaryFile,
376
+ syncDirectory,
377
+ readBoundedUtf8File,
378
+ nativeWriterLeaseStore,
379
+ acquireLock
380
+ };
@@ -7,12 +7,12 @@ import {
7
7
  processStreams,
8
8
  projectFields,
9
9
  singleLine
10
- } from "./chunk-YIMI6O7R.js";
10
+ } from "./chunk-L7VIPVHL.js";
11
11
  import {
12
12
  __name
13
13
  } from "./chunk-ZVVMGPBJ.js";
14
14
 
15
- // node_modules/.pnpm/@wirecat+cli-core@0.491.0_@wirecat+cli-base@0.65.0_commander@15.0.0_esbuild@0.28.2_type_1193098e908042dfe6f4070222ac0245/node_modules/@wirecat/cli-core/dist/cli/result-fields.js
15
+ // node_modules/.pnpm/@wirecat+cli-core@0.503.0_@wirecat+cli-base@0.67.0_commander@15.0.0_esbuild@0.28.2_type_e5d4ab9592406842b4a214ba16b749bd/node_modules/@wirecat/cli-core/dist/cli/result-fields.js
16
16
  var named = /* @__PURE__ */ __name((work) => {
17
17
  try {
18
18
  return work();
@@ -39,7 +39,7 @@ var projectFields2 = /* @__PURE__ */ __name((value, fields) => named(() => {
39
39
  return projectFields(value, fields);
40
40
  }), "projectFields");
41
41
 
42
- // node_modules/.pnpm/@wirecat+cli-core@0.491.0_@wirecat+cli-base@0.65.0_commander@15.0.0_esbuild@0.28.2_type_1193098e908042dfe6f4070222ac0245/node_modules/@wirecat/cli-core/dist/output-detail.js
42
+ // node_modules/.pnpm/@wirecat+cli-core@0.503.0_@wirecat+cli-base@0.67.0_commander@15.0.0_esbuild@0.28.2_type_e5d4ab9592406842b4a214ba16b749bd/node_modules/@wirecat/cli-core/dist/output-detail.js
43
43
  var RARELY_SET = ["editedAt", "replyTo", "forwardedFrom", "reactions"];
44
44
  var BRIEF = ["locator", "chatTitle", "timestamp", "senderName", "excerpt", "score"];
45
45
  var isHit = /* @__PURE__ */ __name((value) => typeof value === "object" && value !== null && typeof value.locator === "string" && typeof value.text === "string", "isHit");
@@ -69,7 +69,7 @@ var atDetail = /* @__PURE__ */ __name((value, detail = "default") => {
69
69
  return value;
70
70
  }, "atDetail");
71
71
 
72
- // node_modules/.pnpm/@wirecat+cli-core@0.491.0_@wirecat+cli-base@0.65.0_commander@15.0.0_esbuild@0.28.2_type_1193098e908042dfe6f4070222ac0245/node_modules/@wirecat/cli-core/dist/output.js
72
+ // node_modules/.pnpm/@wirecat+cli-core@0.503.0_@wirecat+cli-base@0.67.0_commander@15.0.0_esbuild@0.28.2_type_e5d4ab9592406842b4a214ba16b749bd/node_modules/@wirecat/cli-core/dist/output.js
73
73
  var resolveOutput = /* @__PURE__ */ __name(({ json, jsonl, quiet, streams = processStreams, tty, color, fields, hitDetail, env = process.env, capture } = {}) => {
74
74
  const interactive = tty ?? process.stdout.isTTY === true;
75
75
  const format = jsonl ? "jsonl" : json || !interactive ? "json" : "pretty";
@@ -4,7 +4,7 @@ import {
4
4
  __name
5
5
  } from "./chunk-ZVVMGPBJ.js";
6
6
 
7
- // node_modules/.pnpm/@wirecat+cli-core@0.491.0_@wirecat+cli-base@0.65.0_commander@15.0.0_esbuild@0.28.2_type_1193098e908042dfe6f4070222ac0245/node_modules/@wirecat/cli-core/dist/http/listen.js
7
+ // node_modules/.pnpm/@wirecat+cli-core@0.503.0_@wirecat+cli-base@0.67.0_commander@15.0.0_esbuild@0.28.2_type_e5d4ab9592406842b4a214ba16b749bd/node_modules/@wirecat/cli-core/dist/http/listen.js
8
8
  import { createServer } from "node:http";
9
9
  import { Readable } from "node:stream";
10
10
  var MAX_BODY = 4 * 1024 * 1024;