@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
@@ -1872,7 +1872,7 @@ var require_cli_table3 = __commonJS({
1872
1872
  }
1873
1873
  });
1874
1874
 
1875
- // node_modules/.pnpm/@wirecat+cli-base@0.65.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/errors.js
1875
+ // node_modules/.pnpm/@wirecat+cli-base@0.67.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/errors.js
1876
1876
  var errorCodes = [
1877
1877
  "validation_error",
1878
1878
  "configuration_error",
@@ -1906,30 +1906,6 @@ var CliError = class extends Error {
1906
1906
  };
1907
1907
  var isCliError = /* @__PURE__ */ __name((value) => typeof value === "object" && value !== null && value[BRAND] === true, "isCliError");
1908
1908
 
1909
- // node_modules/.pnpm/@wirecat+cli-base@0.65.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/sanitize.js
1910
- var CONTROL = (
1911
- // biome-ignore lint/suspicious/noControlCharactersInRegex: matching them is the whole point
1912
- /[\u0000-\u0008\u000B-\u001F\u007F-\u009F\u200B\u200E\u200F\u202A-\u202E\u2066-\u2069\uFEFF\u{E0000}-\u{E007F}]/gu
1913
- );
1914
- var SUBDIVISION_FLAG = /\u{1F3F4}[\u{E0061}-\u{E007A}]{2}[\u{E0030}-\u{E0039}\u{E0061}-\u{E007A}]{1,3}\u{E007F}/gu;
1915
- var LINE_BREAKS = /[\t\n\u2028\u2029]/g;
1916
- var escaped = /* @__PURE__ */ __name((c) => {
1917
- const code = c.codePointAt(0) ?? 0;
1918
- if (code > 65535)
1919
- return `\\u{${code.toString(16)}}`;
1920
- return code > 255 ? `\\u${code.toString(16).padStart(4, "0")}` : `\\x${code.toString(16).padStart(2, "0")}`;
1921
- }, "escaped");
1922
- var visibleControls = /* @__PURE__ */ __name((text2) => {
1923
- let at = 0;
1924
- let result = "";
1925
- for (const flag of text2.matchAll(SUBDIVISION_FLAG)) {
1926
- result += text2.slice(at, flag.index).replace(CONTROL, escaped) + flag[0];
1927
- at = flag.index + flag[0].length;
1928
- }
1929
- return result + text2.slice(at).replace(CONTROL, escaped);
1930
- }, "visibleControls");
1931
- var singleLine = /* @__PURE__ */ __name((text2) => visibleControls(text2).replace(LINE_BREAKS, escaped), "singleLine");
1932
-
1933
1909
  // node_modules/.pnpm/valibot@1.5.0_typescript@7.0.2/node_modules/valibot/dist/index.mjs
1934
1910
  var store$4;
1935
1911
  var DEFAULT_CONFIG = {
@@ -3793,7 +3769,7 @@ function toStandardJsonSchema(schema) {
3793
3769
  }
3794
3770
  __name(toStandardJsonSchema, "toStandardJsonSchema");
3795
3771
 
3796
- // node_modules/.pnpm/@wirecat+cli-base@0.65.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
3772
+ // node_modules/.pnpm/@wirecat+cli-base@0.67.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
3797
3773
  var word = pipe(string(), regex(/^[a-z][a-z0-9]*(-[a-z0-9]+)*$/, "a lower-case word, words joined by -"));
3798
3774
  var SNAKE_CASE = /^[a-z][a-z0-9]*(_[a-z0-9]+)*$/;
3799
3775
  var text = pipe(string(), regex(/\S/, "must not be empty"));
@@ -3835,7 +3811,7 @@ var fill = /* @__PURE__ */ __name((template, values) => template.replace(PLACEHO
3835
3811
  return String(value);
3836
3812
  }), "fill");
3837
3813
 
3838
- // node_modules/.pnpm/@wirecat+cli-base@0.65.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
3814
+ // node_modules/.pnpm/@wirecat+cli-base@0.67.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
3839
3815
  var EXIT_CODES = {
3840
3816
  validation_error: 2,
3841
3817
  configuration_error: 3,
@@ -3855,7 +3831,31 @@ var EXIT_CODES = {
3855
3831
  var exitCodeFor = /* @__PURE__ */ __name((code) => EXIT_CODES[code], "exitCodeFor");
3856
3832
  var GENERIC_FAILURE = 1;
3857
3833
 
3858
- // node_modules/.pnpm/@wirecat+cli-base@0.65.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
3834
+ // node_modules/.pnpm/@wirecat+cli-base@0.67.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/sanitize.js
3835
+ var CONTROL = (
3836
+ // biome-ignore lint/suspicious/noControlCharactersInRegex: matching them is the whole point
3837
+ /[\u0000-\u0008\u000B-\u001F\u007F-\u009F\u200B\u200E\u200F\u202A-\u202E\u2066-\u2069\uFEFF\u{E0000}-\u{E007F}]/gu
3838
+ );
3839
+ var SUBDIVISION_FLAG = /\u{1F3F4}[\u{E0061}-\u{E007A}]{2}[\u{E0030}-\u{E0039}\u{E0061}-\u{E007A}]{1,3}\u{E007F}/gu;
3840
+ var LINE_BREAKS = /[\t\n\u2028\u2029]/g;
3841
+ var escaped = /* @__PURE__ */ __name((c) => {
3842
+ const code = c.codePointAt(0) ?? 0;
3843
+ if (code > 65535)
3844
+ return `\\u{${code.toString(16)}}`;
3845
+ return code > 255 ? `\\u${code.toString(16).padStart(4, "0")}` : `\\x${code.toString(16).padStart(2, "0")}`;
3846
+ }, "escaped");
3847
+ var visibleControls = /* @__PURE__ */ __name((text2) => {
3848
+ let at = 0;
3849
+ let result = "";
3850
+ for (const flag of text2.matchAll(SUBDIVISION_FLAG)) {
3851
+ result += text2.slice(at, flag.index).replace(CONTROL, escaped) + flag[0];
3852
+ at = flag.index + flag[0].length;
3853
+ }
3854
+ return result + text2.slice(at).replace(CONTROL, escaped);
3855
+ }, "visibleControls");
3856
+ var singleLine = /* @__PURE__ */ __name((text2) => visibleControls(text2).replace(LINE_BREAKS, escaped), "singleLine");
3857
+
3858
+ // node_modules/.pnpm/@wirecat+cli-base@0.67.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
3859
3859
  var EFFECT_LEVELS = ["none", "read", "write"];
3860
3860
  var effectsSchema = strictObject({
3861
3861
  remote: picklist(EFFECT_LEVELS),
@@ -3863,7 +3863,7 @@ var effectsSchema = strictObject({
3863
3863
  });
3864
3864
  var writes = /* @__PURE__ */ __name((effects) => effects === void 0 || effects.remote === "write" || effects.local === "write", "writes");
3865
3865
 
3866
- // node_modules/.pnpm/@wirecat+cli-base@0.65.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
3866
+ // node_modules/.pnpm/@wirecat+cli-base@0.67.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
3867
3867
  var MAX_NEXT_STEPS = 2;
3868
3868
  var isoTime = pipe(string(), isoTimestamp("an ISO 8601 time in UTC"), endsWith("Z", "an ISO 8601 time in UTC, ending in `Z`"));
3869
3869
  var reference = pipe(string(), regex(/^[a-z]+:\S+$/, "a reference such as `note:42`"));
@@ -3898,14 +3898,25 @@ var missingSchema = strictObject({
3898
3898
  step: optional(dottedId)
3899
3899
  });
3900
3900
  var limit = pipe(number(), integer(), minValue(1));
3901
+ var totalSchema = strictObject({
3902
+ value: pipe(number(), integer(), minValue(0)),
3903
+ relation: picklist(["eq", "gte"])
3904
+ });
3901
3905
  var pageSchema = variant("mode", [
3902
3906
  strictObject({
3903
3907
  mode: literal("page"),
3904
3908
  limit,
3905
3909
  has_more: boolean(),
3906
- next_page: optional(pipe(number(), integer(), minValue(2)))
3910
+ next_page: optional(pipe(number(), integer(), minValue(2))),
3911
+ total: optional(totalSchema)
3907
3912
  }),
3908
- strictObject({ mode: literal("cursor"), limit, has_more: boolean(), next_cursor: optional(text) })
3913
+ strictObject({
3914
+ mode: literal("cursor"),
3915
+ limit,
3916
+ has_more: boolean(),
3917
+ next_cursor: optional(text),
3918
+ total: optional(totalSchema)
3919
+ })
3909
3920
  ]);
3910
3921
  var issueSchema = strictObject({
3911
3922
  code: picklist(errorCodes),
@@ -3948,7 +3959,7 @@ var jsonlOf = /* @__PURE__ */ __name(({ items, page, meta }) => [
3948
3959
  JSON.stringify({ type: "end", complete: meta.complete, ...meta.issues ? { issues: meta.issues } : {}, page })
3949
3960
  ].join("\n"), "jsonlOf");
3950
3961
 
3951
- // node_modules/.pnpm/@wirecat+cli-base@0.65.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
3962
+ // node_modules/.pnpm/@wirecat+cli-base@0.67.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
3952
3963
  var CRASH_CODE = "internal_error";
3953
3964
  var CRASH_REASON = "command.crashed";
3954
3965
  var errorObjectSchema = strictObject({
@@ -3995,6 +4006,12 @@ var BASE_REASONS = defineReasons([
3995
4006
  { reason: "auth.failed", code: "authentication_error", message: "the sign-in did not work", details: [] },
3996
4007
  { reason: "access.denied", code: "permission_error", message: "this account may not do that", details: [] },
3997
4008
  { reason: "item.not-found", code: "not_found", message: "nothing found by that name", details: [] },
4009
+ {
4010
+ reason: "tool.not-installed",
4011
+ code: "not_found",
4012
+ message: "no wcat-<name> program by that name is on PATH",
4013
+ details: ["tool", "installed"]
4014
+ },
3998
4015
  {
3999
4016
  reason: "confirmation.required",
4000
4017
  code: "confirmation_required",
@@ -4029,7 +4046,7 @@ var BASE_REASONS = defineReasons([
4029
4046
  { reason: CRASH_REASON, code: CRASH_CODE, message: "the command failed; this is a bug", details: [] }
4030
4047
  ]);
4031
4048
 
4032
- // node_modules/.pnpm/@wirecat+cli-base@0.65.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
4049
+ // node_modules/.pnpm/@wirecat+cli-base@0.67.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
4033
4050
  var SAME_COMMAND = "*";
4034
4051
  var commandPath = pipe(string(), regex(/^[a-z][a-z0-9-]*( [a-z][a-z0-9-]*)*$/, "a command path such as `messages sync`"));
4035
4052
  var stepSchema = union([
@@ -4108,7 +4125,7 @@ var STEPS = defineSteps([
4108
4125
  }
4109
4126
  ]);
4110
4127
 
4111
- // node_modules/.pnpm/@wirecat+cli-base@0.65.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
4128
+ // node_modules/.pnpm/@wirecat+cli-base@0.67.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
4112
4129
  var recognise = /* @__PURE__ */ __name((failure) => {
4113
4130
  if (isCliError(failure))
4114
4131
  return failure;
@@ -4255,7 +4272,7 @@ var catchCrashes = /* @__PURE__ */ __name((options) => {
4255
4272
  };
4256
4273
  }, "catchCrashes");
4257
4274
 
4258
- // node_modules/.pnpm/@wirecat+cli-base@0.65.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/result-fields.js
4275
+ // node_modules/.pnpm/@wirecat+cli-base@0.67.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/result-fields.js
4259
4276
  var forbidden = /* @__PURE__ */ new Set(["__proto__", "prototype", "constructor"]);
4260
4277
  var validate = /* @__PURE__ */ __name((paths) => {
4261
4278
  if (paths.length === 0 || paths.length > 128 || paths.some((path) => path.length > 256 || !/^[A-Za-z][A-Za-z0-9_]*(?:\.[A-Za-z][A-Za-z0-9_]*)*$/.test(path) || path.split(".").some((part) => forbidden.has(part))))
@@ -4320,7 +4337,7 @@ var projectFields = /* @__PURE__ */ __name((value, fields) => {
4320
4337
  return project(value, fields);
4321
4338
  }, "projectFields");
4322
4339
 
4323
- // node_modules/.pnpm/@wirecat+cli-base@0.65.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/batch.js
4340
+ // node_modules/.pnpm/@wirecat+cli-base@0.67.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/batch.js
4324
4341
  var BATCH_LIMITS = Object.freeze({
4325
4342
  requests: 32,
4326
4343
  input_bytes: 262144,
@@ -4467,7 +4484,7 @@ var runBatch = /* @__PURE__ */ __name(async (requests, options = {}) => {
4467
4484
  };
4468
4485
  }, "runBatch");
4469
4486
 
4470
- // node_modules/.pnpm/@wirecat+cli-base@0.65.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/config.js
4487
+ // node_modules/.pnpm/@wirecat+cli-base@0.67.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/config.js
4471
4488
  import { randomBytes } from "node:crypto";
4472
4489
  import { mkdirSync, readFileSync, renameSync, rmSync, writeFileSync } from "node:fs";
4473
4490
  import { dirname, join } from "node:path";
@@ -4511,7 +4528,7 @@ var saveConfigFile = /* @__PURE__ */ __name((path, config) => {
4511
4528
  `, 384);
4512
4529
  }, "saveConfigFile");
4513
4530
 
4514
- // node_modules/.pnpm/@wirecat+cli-base@0.65.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/keyring.js
4531
+ // node_modules/.pnpm/@wirecat+cli-base@0.67.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/keyring.js
4515
4532
  import { createRequire } from "node:module";
4516
4533
  var ENTRY_OPTIONS = { linux: { store: "secret-service" } };
4517
4534
  var require2 = createRequire(new URL("keyring.js", import.meta.resolve("@wirecat/cli-base")).href);
@@ -4531,10 +4548,188 @@ var systemKeyring = {
4531
4548
  delete: /* @__PURE__ */ __name((service, account) => entry(service, account).deletePassword(), "delete")
4532
4549
  };
4533
4550
 
4534
- // node_modules/.pnpm/@wirecat+cli-base@0.65.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/logging.js
4551
+ // node_modules/.pnpm/@wirecat+cli-base@0.67.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/paths.js
4552
+ import { homedir, userInfo } from "node:os";
4553
+ import { join as join2, posix, win32 } from "node:path";
4554
+ var PATH_KINDS = ["config", "state", "cache"];
4555
+ var OVERRIDES = { config: "CONFIG_DIR", state: "STATE_DIR", cache: "CACHE_DIR" };
4556
+ var overrideName = /* @__PURE__ */ __name((appName, prefix, kind) => `${prefix ?? appName.toUpperCase().replace(/[^A-Z0-9]/g, "_")}_${OVERRIDES[kind]}`, "overrideName");
4557
+ var defaultPaths = /* @__PURE__ */ __name(({ appName, env = process.env, platform = process.platform }) => {
4558
+ if (platform === "win32") {
4559
+ const home2 = env.USERPROFILE || homedir();
4560
+ const roaming = env.APPDATA || win32.join(home2, "AppData", "Roaming");
4561
+ const local = env.LOCALAPPDATA || win32.join(home2, "AppData", "Local");
4562
+ return {
4563
+ config: win32.join(roaming, appName, "Config"),
4564
+ state: win32.join(local, appName, "Data"),
4565
+ cache: win32.join(local, appName, "Cache")
4566
+ };
4567
+ }
4568
+ const home = env.HOME || homedir();
4569
+ return {
4570
+ config: posix.join(env.XDG_CONFIG_HOME || posix.join(home, ".config"), appName),
4571
+ state: posix.join(env.XDG_DATA_HOME || posix.join(home, ".local", "share"), appName),
4572
+ cache: posix.join(env.XDG_CACHE_HOME || posix.join(home, ".cache"), appName)
4573
+ };
4574
+ }, "defaultPaths");
4575
+ var resolvePaths = /* @__PURE__ */ __name((options) => {
4576
+ const { appName, prefix, env = process.env } = options;
4577
+ const base = defaultPaths(options);
4578
+ return {
4579
+ config: env[overrideName(appName, prefix, "config")] ?? base.config,
4580
+ state: env[overrideName(appName, prefix, "state")] ?? base.state,
4581
+ cache: env[overrideName(appName, prefix, "cache")] ?? base.cache
4582
+ };
4583
+ }, "resolvePaths");
4584
+ var pathsAreOverridden = /* @__PURE__ */ __name(({ appName, prefix, env = process.env }) => PATH_KINDS.some((kind) => env[overrideName(appName, prefix, kind)] !== void 0), "pathsAreOverridden");
4585
+ var accountHome = /* @__PURE__ */ __name(() => {
4586
+ try {
4587
+ return userInfo().homedir;
4588
+ } catch {
4589
+ return void 0;
4590
+ }
4591
+ }, "accountHome");
4592
+ var homeIsMoved = /* @__PURE__ */ __name(({ env = process.env, platform = process.platform, home = accountHome() } = {}) => {
4593
+ if (home === void 0)
4594
+ return true;
4595
+ const appName = "app";
4596
+ const actual = defaultPaths({ appName, env, platform });
4597
+ const owners = defaultPaths({ appName, env: { HOME: home, USERPROFILE: home }, platform });
4598
+ return PATH_KINDS.some((kind) => actual[kind] !== owners[kind]);
4599
+ }, "homeIsMoved");
4600
+ var configFilePath = /* @__PURE__ */ __name((configDir, fileName = "config.json") => join2(configDir, fileName), "configFilePath");
4601
+
4602
+ // node_modules/.pnpm/@wirecat+cli-base@0.67.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/credentials.js
4603
+ import { readFileSync as readFileSync2 } from "node:fs";
4604
+ import { join as join3, resolve } from "node:path";
4605
+ var movedRunService = /* @__PURE__ */ __name((service, configDir) => `${service}:${resolve(configDir)}`, "movedRunService");
4606
+ var Credentials = class {
4607
+ static {
4608
+ __name(this, "Credentials");
4609
+ }
4610
+ #configDir;
4611
+ #storage;
4612
+ #keyring;
4613
+ #env;
4614
+ #service;
4615
+ #envVar;
4616
+ #fileName;
4617
+ #warn;
4618
+ /** Set only for a moved run with the system keyring. */
4619
+ #temporaryService;
4620
+ #warned = false;
4621
+ constructor(options) {
4622
+ this.#configDir = options.configDir;
4623
+ this.#storage = options.storage ?? "auto";
4624
+ this.#keyring = options.keyring ?? systemKeyring;
4625
+ this.#env = options.env ?? process.env;
4626
+ this.#envVar = options.envVar;
4627
+ this.#fileName = options.fileName ?? "credentials.json";
4628
+ this.#warn = options.warn ?? ((message) => process.stderr.write(`${message}
4629
+ `));
4630
+ this.#service = options.service;
4631
+ const moved = this.#keyring === systemKeyring && (options.isolated === true || homeIsMoved({ env: this.#env }));
4632
+ this.#temporaryService = moved ? movedRunService(options.service, options.configDir) : void 0;
4633
+ }
4634
+ read(account) {
4635
+ const fromEnv = this.#envVar ? this.#env[this.#envVar]?.trim() : void 0;
4636
+ if (fromEnv)
4637
+ return { secret: fromEnv, source: "environment" };
4638
+ if (this.#storage !== "file") {
4639
+ const temporary = this.#temporaryService;
4640
+ const fromKeyring = this.#tryKeyring(() => temporary && this.#keyring.get(temporary, account) || this.#keyring.get(this.#service, account));
4641
+ if (fromKeyring)
4642
+ return { secret: fromKeyring, source: "keyring" };
4643
+ }
4644
+ const secret = this.#readFile()?.[account]?.secret;
4645
+ return secret ? { secret, source: "file" } : void 0;
4646
+ }
4647
+ write(account, secret) {
4648
+ if (this.#storage !== "file") {
4649
+ const stored = this.#tryKeyring(() => {
4650
+ this.#keyring.set(this.#temporaryService ?? this.#service, account, secret);
4651
+ return true;
4652
+ });
4653
+ if (stored)
4654
+ return "keyring";
4655
+ }
4656
+ const store2 = this.#readFile();
4657
+ if (!store2) {
4658
+ throw new CliError("configuration_error", `${this.#path()} cannot be read as a credentials file; storing now would replace every secret in it. Fix the file or move it aside, then try again.`);
4659
+ }
4660
+ store2[account] = { secret };
4661
+ this.#writeFile(store2);
4662
+ return "file";
4663
+ }
4664
+ remove(account) {
4665
+ const removed = [];
4666
+ if (this.#storage !== "file") {
4667
+ if (this.#tryKeyring(() => this.#keyring.delete(this.#temporaryService ?? this.#service, account))) {
4668
+ removed.push("keyring");
4669
+ }
4670
+ if (this.#temporaryService && this.#ownersEntryExists(account)) {
4671
+ this.#warn(removed.includes("keyring") ? `removed this run's own sign-in of ${account} from the OS keyring and kept the owner's: a run with moved folders never removes it` : `kept ${account} in the OS keyring: it is the owner's sign-in, shared with every run, and a run with moved folders never removes it`);
4672
+ }
4673
+ }
4674
+ const store2 = this.#readFile();
4675
+ if (store2?.[account] !== void 0) {
4676
+ delete store2[account];
4677
+ this.#writeFile(store2);
4678
+ removed.push("file");
4679
+ }
4680
+ return removed;
4681
+ }
4682
+ /** Only for the warning: a keyring that fails here must not fail a removal that already happened. */
4683
+ #ownersEntryExists(account) {
4684
+ try {
4685
+ return this.#keyring.get(this.#service, account) !== null;
4686
+ } catch {
4687
+ return false;
4688
+ }
4689
+ }
4690
+ #path() {
4691
+ return join3(this.#configDir, this.#fileName);
4692
+ }
4693
+ /** `undefined` when the file exists but is not a store: writing would replace what it holds. */
4694
+ #readFile() {
4695
+ let text2;
4696
+ try {
4697
+ text2 = readFileSync2(this.#path(), "utf8");
4698
+ } catch (error) {
4699
+ if (error.code === "ENOENT")
4700
+ return {};
4701
+ return void 0;
4702
+ }
4703
+ try {
4704
+ const parsed = JSON.parse(text2);
4705
+ return typeof parsed === "object" && parsed !== null && !Array.isArray(parsed) ? parsed : void 0;
4706
+ } catch {
4707
+ return void 0;
4708
+ }
4709
+ }
4710
+ #writeFile(store2) {
4711
+ writeSecurely(this.#path(), `${JSON.stringify(store2, null, 2)}
4712
+ `, 384);
4713
+ }
4714
+ #tryKeyring(operation) {
4715
+ if (this.#storage === "keyring")
4716
+ return operation();
4717
+ try {
4718
+ return operation();
4719
+ } catch (error) {
4720
+ if (!this.#warned) {
4721
+ this.#warned = true;
4722
+ this.#warn(`could not reach the OS keyring \u2014 it may be locked, or no keyring service is running (${error instanceof Error ? error.message : String(error)}); using ${this.#path()} instead, readable only by you`);
4723
+ }
4724
+ return void 0;
4725
+ }
4726
+ }
4727
+ };
4728
+
4729
+ // node_modules/.pnpm/@wirecat+cli-base@0.67.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/logging.js
4535
4730
  import { appendFileSync } from "node:fs";
4536
4731
 
4537
- // node_modules/.pnpm/@wirecat+cli-base@0.65.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/standards/log.js
4732
+ // node_modules/.pnpm/@wirecat+cli-base@0.67.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/standards/log.js
4538
4733
  var LOG_SEVERITIES = ["trace", "debug", "info", "warn", "error", "fatal"];
4539
4734
  var logRecordSchema = strictObject({
4540
4735
  time: isoTime,
@@ -4612,7 +4807,7 @@ var traceIdOf = /* @__PURE__ */ __name((traceparent) => {
4612
4807
  return traceId;
4613
4808
  }, "traceIdOf");
4614
4809
 
4615
- // node_modules/.pnpm/@wirecat+cli-base@0.65.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/logging.js
4810
+ // node_modules/.pnpm/@wirecat+cli-base@0.67.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/logging.js
4616
4811
  var REDACTED_FIELDS = [
4617
4812
  "authorization",
4618
4813
  "Authorization",
@@ -4706,7 +4901,7 @@ var silent = {
4706
4901
  }, "error")
4707
4902
  };
4708
4903
 
4709
- // node_modules/.pnpm/@wirecat+cli-base@0.65.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/output-buffer.js
4904
+ // node_modules/.pnpm/@wirecat+cli-base@0.67.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/output-buffer.js
4710
4905
  var createOutputBuffer = /* @__PURE__ */ __name(({ maxOutputBytes = 4 * 1024 * 1024, fields, format } = {}) => {
4711
4906
  if (!Number.isSafeInteger(maxOutputBytes) || maxOutputBytes < 0)
4712
4907
  throw new CliError("validation_error", "maxOutputBytes must be a nonnegative whole byte count");
@@ -4767,166 +4962,33 @@ var createOutputBuffer = /* @__PURE__ */ __name(({ maxOutputBytes = 4 * 1024 * 1
4767
4962
  };
4768
4963
  }, "createOutputBuffer");
4769
4964
 
4770
- // node_modules/.pnpm/@wirecat+cli-base@0.65.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/paths.js
4771
- import { homedir } from "node:os";
4772
- import { join as join2, posix, win32 } from "node:path";
4773
- var PATH_KINDS = ["config", "state", "cache"];
4774
- var OVERRIDES = { config: "CONFIG_DIR", state: "STATE_DIR", cache: "CACHE_DIR" };
4775
- var overrideName = /* @__PURE__ */ __name((appName, prefix, kind) => `${prefix ?? appName.toUpperCase().replace(/[^A-Z0-9]/g, "_")}_${OVERRIDES[kind]}`, "overrideName");
4776
- var defaultPaths = /* @__PURE__ */ __name(({ appName, env = process.env, platform = process.platform }) => {
4777
- if (platform === "win32") {
4778
- const home2 = env.USERPROFILE || homedir();
4779
- const roaming = env.APPDATA || win32.join(home2, "AppData", "Roaming");
4780
- const local = env.LOCALAPPDATA || win32.join(home2, "AppData", "Local");
4781
- return {
4782
- config: win32.join(roaming, appName, "Config"),
4783
- state: win32.join(local, appName, "Data"),
4784
- cache: win32.join(local, appName, "Cache")
4785
- };
4786
- }
4787
- const home = env.HOME || homedir();
4788
- return {
4789
- config: posix.join(env.XDG_CONFIG_HOME || posix.join(home, ".config"), appName),
4790
- state: posix.join(env.XDG_DATA_HOME || posix.join(home, ".local", "share"), appName),
4791
- cache: posix.join(env.XDG_CACHE_HOME || posix.join(home, ".cache"), appName)
4792
- };
4793
- }, "defaultPaths");
4794
- var resolvePaths = /* @__PURE__ */ __name((options) => {
4795
- const { appName, prefix, env = process.env } = options;
4796
- const base = defaultPaths(options);
4797
- return {
4798
- config: env[overrideName(appName, prefix, "config")] ?? base.config,
4799
- state: env[overrideName(appName, prefix, "state")] ?? base.state,
4800
- cache: env[overrideName(appName, prefix, "cache")] ?? base.cache
4801
- };
4802
- }, "resolvePaths");
4803
- var pathsAreOverridden = /* @__PURE__ */ __name(({ appName, prefix, env = process.env }) => PATH_KINDS.some((kind) => env[overrideName(appName, prefix, kind)] !== void 0), "pathsAreOverridden");
4804
- var configFilePath = /* @__PURE__ */ __name((configDir, fileName = "config.json") => join2(configDir, fileName), "configFilePath");
4805
-
4806
- // node_modules/.pnpm/@wirecat+cli-base@0.65.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/credentials.js
4807
- import { readFileSync as readFileSync2 } from "node:fs";
4808
- import { join as join3 } from "node:path";
4809
- var keyringService = /* @__PURE__ */ __name((service, configDir, isolated = false) => isolated ? `${service}:${configDir}` : service, "keyringService");
4810
- var Credentials = class {
4811
- static {
4812
- __name(this, "Credentials");
4813
- }
4814
- #configDir;
4815
- #storage;
4816
- #keyring;
4817
- #env;
4818
- #service;
4819
- #envVar;
4820
- #fileName;
4821
- #warn;
4822
- #warned = false;
4823
- constructor(options) {
4824
- this.#configDir = options.configDir;
4825
- this.#storage = options.storage ?? "auto";
4826
- this.#keyring = options.keyring ?? systemKeyring;
4827
- this.#env = options.env ?? process.env;
4828
- this.#envVar = options.envVar;
4829
- this.#fileName = options.fileName ?? "credentials.json";
4830
- this.#warn = options.warn ?? ((message) => process.stderr.write(`${message}
4831
- `));
4832
- this.#service = keyringService(options.service, options.configDir, options.isolated);
4833
- }
4834
- read(account) {
4835
- const fromEnv = this.#envVar ? this.#env[this.#envVar]?.trim() : void 0;
4836
- if (fromEnv)
4837
- return { secret: fromEnv, source: "environment" };
4838
- if (this.#storage !== "file") {
4839
- const fromKeyring = this.#tryKeyring(() => this.#keyring.get(this.#service, account));
4840
- if (fromKeyring)
4841
- return { secret: fromKeyring, source: "keyring" };
4842
- }
4843
- const fromFile = this.#readFile()?.[account]?.secret;
4844
- return fromFile ? { secret: fromFile, source: "file" } : void 0;
4845
- }
4846
- write(account, secret) {
4847
- if (this.#storage !== "file") {
4848
- const stored = this.#tryKeyring(() => {
4849
- this.#keyring.set(this.#service, account, secret);
4850
- return true;
4851
- });
4852
- if (stored)
4853
- return "keyring";
4854
- }
4855
- const store2 = this.#readFile();
4856
- if (!store2) {
4857
- throw new CliError("configuration_error", `${this.#path()} cannot be read as a credentials file; storing now would replace every secret in it. Fix the file or move it aside, then try again.`);
4858
- }
4859
- store2[account] = { secret };
4860
- this.#writeFile(store2);
4861
- return "file";
4862
- }
4863
- remove(account) {
4864
- const removed = [];
4865
- if (this.#storage !== "file" && this.#tryKeyring(() => this.#keyring.delete(this.#service, account))) {
4866
- removed.push("keyring");
4867
- }
4868
- const store2 = this.#readFile();
4869
- if (store2?.[account] !== void 0) {
4870
- delete store2[account];
4871
- this.#writeFile(store2);
4872
- removed.push("file");
4873
- }
4874
- return removed;
4875
- }
4876
- #path() {
4877
- return join3(this.#configDir, this.#fileName);
4878
- }
4879
- /** `undefined` when the file exists but is not a store: writing would replace what it holds. */
4880
- #readFile() {
4881
- let text2;
4882
- try {
4883
- text2 = readFileSync2(this.#path(), "utf8");
4884
- } catch (error) {
4885
- if (error.code === "ENOENT")
4886
- return {};
4887
- return void 0;
4888
- }
4889
- try {
4890
- const parsed = JSON.parse(text2);
4891
- return typeof parsed === "object" && parsed !== null && !Array.isArray(parsed) ? parsed : void 0;
4892
- } catch {
4893
- return void 0;
4894
- }
4895
- }
4896
- #writeFile(store2) {
4897
- writeSecurely(this.#path(), `${JSON.stringify(store2, null, 2)}
4898
- `, 384);
4899
- }
4900
- #tryKeyring(operation) {
4901
- if (this.#storage === "keyring")
4902
- return operation();
4903
- try {
4904
- return operation();
4905
- } catch (error) {
4906
- if (!this.#warned) {
4907
- this.#warned = true;
4908
- this.#warn(`could not reach the OS keyring \u2014 it may be locked, or no keyring service is running (${error instanceof Error ? error.message : String(error)}); using ${this.#path()} instead, readable only by you`);
4909
- }
4910
- return void 0;
4911
- }
4912
- }
4965
+ // node_modules/.pnpm/@wirecat+cli-base@0.67.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/retry.js
4966
+ var DEFAULT_RETRY = {
4967
+ retries: 1,
4968
+ baseDelayMs: 250,
4969
+ maxDelayMs: 1e4,
4970
+ maxRetryAfterMs: 3e4
4913
4971
  };
4972
+ var backoffMs = /* @__PURE__ */ __name((attempt, config, random) => {
4973
+ const ceiling = Math.min(config.maxDelayMs, config.baseDelayMs * 2 ** (attempt - 1));
4974
+ return Math.round(random() * ceiling);
4975
+ }, "backoffMs");
4914
4976
 
4915
- // node_modules/.pnpm/@wirecat+cli-base@0.65.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/time.js
4977
+ // node_modules/.pnpm/@wirecat+cli-base@0.67.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/time.js
4916
4978
  var abortError = /* @__PURE__ */ __name(() => new DOMException("The operation was aborted.", "AbortError"), "abortError");
4917
- var realSleep = /* @__PURE__ */ __name((ms, signal) => new Promise((resolve, reject) => {
4979
+ var realSleep = /* @__PURE__ */ __name((ms, signal) => new Promise((resolve2, reject) => {
4918
4980
  if (signal?.aborted) {
4919
4981
  reject(abortError());
4920
4982
  return;
4921
4983
  }
4922
- const timer = setTimeout(resolve, ms);
4984
+ const timer = setTimeout(resolve2, ms);
4923
4985
  signal?.addEventListener("abort", () => {
4924
4986
  clearTimeout(timer);
4925
4987
  reject(abortError());
4926
4988
  }, { once: true });
4927
4989
  }), "realSleep");
4928
4990
 
4929
- // node_modules/.pnpm/@wirecat+cli-base@0.65.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/deadline.js
4991
+ // node_modules/.pnpm/@wirecat+cli-base@0.67.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/deadline.js
4930
4992
  var createDeadline = /* @__PURE__ */ __name(({ timeoutMs, signal, sleep = realSleep } = {}) => {
4931
4993
  if (timeoutMs !== void 0 && (!Number.isSafeInteger(timeoutMs) || timeoutMs < 0 || timeoutMs > 2147483647))
4932
4994
  throw new CliError("validation_error", "timeoutMs must be an integer from zero through 2147483647");
@@ -5010,7 +5072,7 @@ var createDeadline = /* @__PURE__ */ __name(({ timeoutMs, signal, sleep = realSl
5010
5072
  };
5011
5073
  }, "createDeadline");
5012
5074
 
5013
- // node_modules/.pnpm/@wirecat+cli-base@0.65.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/pretty.js
5075
+ // node_modules/.pnpm/@wirecat+cli-base@0.67.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/pretty.js
5014
5076
  var import_cli_table3 = __toESM(require_cli_table3(), 1);
5015
5077
  import { styleText } from "node:util";
5016
5078
  var renderPretty = /* @__PURE__ */ __name((value, options) => {
@@ -5085,7 +5147,7 @@ var BORDERLESS = {
5085
5147
  middle: ""
5086
5148
  };
5087
5149
 
5088
- // node_modules/.pnpm/@wirecat+cli-base@0.65.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/drain.js
5150
+ // node_modules/.pnpm/@wirecat+cli-base@0.67.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/drain.js
5089
5151
  var waitForDrain = /* @__PURE__ */ __name((stream, signal) => {
5090
5152
  if (signal?.aborted)
5091
5153
  return Promise.reject(signal.reason);
@@ -5093,14 +5155,14 @@ var waitForDrain = /* @__PURE__ */ __name((stream, signal) => {
5093
5155
  return Promise.reject(new Error("output stream closed"));
5094
5156
  if (!stream.writableNeedDrain)
5095
5157
  return Promise.resolve();
5096
- return new Promise((resolve, reject) => {
5158
+ return new Promise((resolve2, reject) => {
5097
5159
  const cleanup = /* @__PURE__ */ __name(() => {
5098
5160
  stream.off("drain", drained).off("error", failed).off("close", closed);
5099
5161
  signal?.removeEventListener("abort", aborted);
5100
5162
  }, "cleanup");
5101
5163
  const drained = /* @__PURE__ */ __name(() => {
5102
5164
  cleanup();
5103
- resolve();
5165
+ resolve2();
5104
5166
  }, "drained");
5105
5167
  const failed = /* @__PURE__ */ __name((error) => {
5106
5168
  cleanup();
@@ -5113,7 +5175,7 @@ var waitForDrain = /* @__PURE__ */ __name((stream, signal) => {
5113
5175
  });
5114
5176
  }, "waitForDrain");
5115
5177
 
5116
- // node_modules/.pnpm/@wirecat+cli-base@0.65.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/streams.js
5178
+ // node_modules/.pnpm/@wirecat+cli-base@0.67.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/streams.js
5117
5179
  var processStreams = {
5118
5180
  drain: /* @__PURE__ */ __name(async (signal) => {
5119
5181
  await Promise.all([waitForDrain(process.stdout, signal), waitForDrain(process.stderr, signal)]);
@@ -5142,7 +5204,7 @@ var captureStreams = /* @__PURE__ */ __name(() => {
5142
5204
  };
5143
5205
  }, "captureStreams");
5144
5206
 
5145
- // node_modules/.pnpm/@wirecat+cli-base@0.65.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/renderer.js
5207
+ // node_modules/.pnpm/@wirecat+cli-base@0.67.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/renderer.js
5146
5208
  var createRenderer = /* @__PURE__ */ __name(({ format, color, streams = processStreams, quiet = false }) => {
5147
5209
  const mark = /* @__PURE__ */ __name((symbol, message) => format === "pretty" ? `${symbol} ${visibleControls(message)}` : visibleControls(message), "mark");
5148
5210
  const say = /* @__PURE__ */ __name((symbol) => (message) => {
@@ -5273,6 +5335,9 @@ export {
5273
5335
  loadConfigFile,
5274
5336
  saveConfigFile,
5275
5337
  systemKeyring,
5338
+ resolvePaths,
5339
+ pathsAreOverridden,
5340
+ configFilePath,
5276
5341
  Credentials,
5277
5342
  realSleep,
5278
5343
  createDeadline,
@@ -5282,11 +5347,10 @@ export {
5282
5347
  logRecordOf,
5283
5348
  createRecordLog,
5284
5349
  createOutputBuffer,
5285
- resolvePaths,
5286
- pathsAreOverridden,
5287
- configFilePath,
5288
5350
  indent,
5289
5351
  processStreams,
5290
5352
  captureStreams,
5291
- createRenderer
5353
+ createRenderer,
5354
+ DEFAULT_RETRY,
5355
+ backoffMs
5292
5356
  };