@wirecat/zoom-cli 0.72.0 → 0.74.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 (199) hide show
  1. package/contracts/wirecat.json +1478 -0
  2. package/dist/account-removal.d.ts.map +1 -1
  3. package/dist/account-removal.js +0 -2
  4. package/dist/account-removal.js.map +1 -1
  5. package/dist/answers.d.ts +1 -3
  6. package/dist/answers.d.ts.map +1 -1
  7. package/dist/answers.js +0 -3
  8. package/dist/answers.js.map +1 -1
  9. package/dist/bin/main.js +13 -5
  10. package/dist/bin/main.js.map +1 -1
  11. package/dist/bin/zm.js +2 -2
  12. package/dist/bundle/{all-profiles-XFIPF4GF.js → all-profiles-SDOAABLC.js} +12 -12
  13. package/dist/bundle/answer-policy-RHS74QYY.js +110 -0
  14. package/dist/bundle/{anthropic-SSUBR3BC.js → anthropic-HCVY2PIN.js} +7 -7
  15. package/dist/bundle/{app-server-7DJHHF2F.js → app-server-V64VS6KN.js} +65 -61
  16. package/dist/bundle/{bun-6HBYWQIX.js → bun-EBQHHLKR.js} +2 -2
  17. package/dist/bundle/{bun-sqlite-4L3Q55NB.js → bun-sqlite-PVMXO2JB.js} +7 -7
  18. package/dist/bundle/chunk-2PNG76LV.js +707 -0
  19. package/dist/bundle/chunk-2PYZTRRC.js +84 -0
  20. package/dist/bundle/{chunk-63QXCE5Z.js → chunk-3HTJBGNP.js} +10 -10
  21. package/dist/bundle/{chunk-5X4IY5JH.js → chunk-3ROL6MBJ.js} +1763 -762
  22. package/dist/bundle/{chunk-N4QNYWWG.js → chunk-3TYNBHBK.js} +2 -2
  23. package/dist/bundle/{chunk-7SUWPMZG.js → chunk-4ELLWJT4.js} +8 -8
  24. package/dist/bundle/{chunk-PJWSGXOB.js → chunk-4EZKR6Q4.js} +7 -7
  25. package/dist/bundle/{chunk-UVZLK3M4.js → chunk-4RJL32PF.js} +25 -10
  26. package/dist/bundle/{chunk-LTWJM3ED.js → chunk-5KDBLEUF.js} +17 -17
  27. package/dist/bundle/{chunk-7IFO43Q5.js → chunk-5R6EBM5Z.js} +2 -2
  28. package/dist/bundle/{chunk-OHCLQJOV.js → chunk-6EMOZGSN.js} +3 -3
  29. package/dist/bundle/{chunk-D24OQAHM.js → chunk-6GPBDVQ2.js} +4 -4
  30. package/dist/bundle/chunk-7NE3LB7A.js +25 -0
  31. package/dist/bundle/{chunk-VIV64MQM.js → chunk-7R4UU65O.js} +26 -17
  32. package/dist/bundle/{chunk-4XQWF3U2.js → chunk-7W23N2YW.js} +6 -6
  33. package/dist/bundle/{chunk-RN5SU2RN.js → chunk-AFUHT7F7.js} +6 -6
  34. package/dist/bundle/{chunk-SXZGCD6E.js → chunk-APLV37JA.js} +3 -3
  35. package/dist/bundle/{chunk-LLUNHAZ7.js → chunk-BKMC4ETU.js} +4 -4
  36. package/dist/bundle/{chunk-IACWKZWS.js → chunk-BOGGQOVO.js} +1 -1
  37. package/dist/bundle/{chunk-U3NJBGLA.js → chunk-DSRG5NRF.js} +185 -34
  38. package/dist/bundle/{chunk-X2MP634F.js → chunk-DXZN3DU6.js} +4 -4
  39. package/dist/bundle/{chunk-ELJUBPY4.js → chunk-EA2OB75T.js} +1 -1
  40. package/dist/bundle/{chunk-ZVFYGTGJ.js → chunk-F6PUM6ZK.js} +17 -17
  41. package/dist/bundle/{chunk-MCPOZNWG.js → chunk-FIVFP53N.js} +1 -1
  42. package/dist/bundle/{chunk-WOAYHCM2.js → chunk-FL2TKSZY.js} +1 -1
  43. package/dist/bundle/{chunk-RZUJMAMK.js → chunk-FT7X74RT.js} +4 -4
  44. package/dist/bundle/{chunk-ADLS6FVG.js → chunk-FXBHOCJK.js} +1 -1
  45. package/dist/bundle/{chunk-I7CUMZD6.js → chunk-FY2X6U6O.js} +3 -3
  46. package/dist/bundle/{chunk-W3YTVEWV.js → chunk-GPGIU3OG.js} +9 -9
  47. package/dist/bundle/{chunk-6DCLZLGX.js → chunk-HCZYJMBP.js} +1 -1
  48. package/dist/bundle/{chunk-IU4DUUB3.js → chunk-HGUYJUNO.js} +325 -14
  49. package/dist/bundle/{chunk-S7SXSHRC.js → chunk-HNWDEDMU.js} +61 -30
  50. package/dist/bundle/{chunk-NMZQTYKJ.js → chunk-HZUUVNWC.js} +1 -1
  51. package/dist/bundle/{chunk-7S4D5SM2.js → chunk-I2D4ZZOD.js} +31 -32
  52. package/dist/bundle/{chunk-XPWZSW6Y.js → chunk-IJCUAKR5.js} +4 -4
  53. package/dist/bundle/{chunk-QQUY4MZY.js → chunk-IJONJTST.js} +1 -1
  54. package/dist/bundle/chunk-IS6FUZCP.js +73 -0
  55. package/dist/bundle/{chunk-ZW5KHKMA.js → chunk-IZUOL4Q6.js} +5 -5
  56. package/dist/bundle/{chunk-H53WFZBN.js → chunk-KBRIMLVN.js} +12 -12
  57. package/dist/bundle/{chunk-2MIBRVSV.js → chunk-KCPRTZBZ.js} +2 -2
  58. package/dist/bundle/chunk-KYL5FYOW.js +13 -0
  59. package/dist/bundle/{chunk-4SY67IUA.js → chunk-LHPYSVGP.js} +26 -35
  60. package/dist/bundle/{chunk-JG4MNYG2.js → chunk-LN2LWPN2.js} +1 -1
  61. package/dist/bundle/{chunk-CW46FWKW.js → chunk-LQR4V5EY.js} +14 -12
  62. package/dist/bundle/{chunk-B3SILJBU.js → chunk-LUBG5GKK.js} +30 -22
  63. package/dist/bundle/{chunk-3KRTEX5M.js → chunk-LZ4AVHBS.js} +3 -2
  64. package/dist/bundle/{chunk-RX5CJ55S.js → chunk-M4OP5ASJ.js} +1 -1
  65. package/dist/bundle/{chunk-FSCPQQS5.js → chunk-MAE5UGRQ.js} +150 -93
  66. package/dist/bundle/{chunk-KPIQXFNB.js → chunk-N7KCNMKL.js} +16 -15
  67. package/dist/bundle/{chunk-RLCVPECY.js → chunk-NKBMLSWK.js} +110 -64
  68. package/dist/bundle/{chunk-T27IMG6X.js → chunk-NV2REPY6.js} +1 -1
  69. package/dist/bundle/{chunk-EFF2XBHP.js → chunk-OP6HK2QL.js} +2 -2
  70. package/dist/bundle/{chunk-WLVG4RBZ.js → chunk-OPUGV7VW.js} +15 -2
  71. package/dist/bundle/{chunk-5AELTC52.js → chunk-P53CLAXD.js} +103 -102
  72. package/dist/bundle/{chunk-KWURWGGB.js → chunk-PKM2UKAZ.js} +32 -9
  73. package/dist/bundle/{chunk-7JYMGXLI.js → chunk-PMHMKZEJ.js} +47 -43
  74. package/dist/bundle/{chunk-23J2ANZ7.js → chunk-QAGSAOYS.js} +2 -2
  75. package/dist/bundle/{chunk-JZ4XNNL7.js → chunk-QLKCKTM4.js} +1 -1
  76. package/dist/bundle/{chunk-OP5PGE2N.js → chunk-QSWR7VDA.js} +4 -4
  77. package/dist/bundle/{chunk-LA6QUVGQ.js → chunk-R35YGFKQ.js} +163 -16
  78. package/dist/bundle/{chunk-CANRIRNZ.js → chunk-R4J4DLJV.js} +1792 -1205
  79. package/dist/bundle/{chunk-QW7YTRV2.js → chunk-RJJ4OYNH.js} +3 -3
  80. package/dist/bundle/{chunk-DOCVEKP2.js → chunk-RQJ2RXFO.js} +37 -35
  81. package/dist/bundle/{chunk-TF2WKPNW.js → chunk-RRW54FK6.js} +17 -17
  82. package/dist/bundle/{chunk-KFZL67JP.js → chunk-SKDQNYKA.js} +129 -48
  83. package/dist/bundle/{chunk-7GLJSJ7M.js → chunk-SPWKGRTO.js} +1 -1
  84. package/dist/bundle/{chunk-MSQHSW4C.js → chunk-SY4MIIWF.js} +2 -2
  85. package/dist/bundle/{chunk-ZHA56THL.js → chunk-TKPIDOW5.js} +927 -904
  86. package/dist/bundle/{chunk-WXTYYWZI.js → chunk-TLNZUPGU.js} +115 -113
  87. package/dist/bundle/{chunk-WZGKHTA4.js → chunk-TMCXUWTY.js} +8 -2
  88. package/dist/bundle/{chunk-7OD3522V.js → chunk-TN2YUZBF.js} +1192 -496
  89. package/dist/bundle/{chunk-JFPUYQSP.js → chunk-UGLNVUFX.js} +5 -5
  90. package/dist/bundle/{chunk-IFBIXU6C.js → chunk-UVWNUY3W.js} +2 -2
  91. package/dist/bundle/{chunk-5MGICK47.js → chunk-UW3BB2XW.js} +26 -26
  92. package/dist/bundle/{chunk-24OFZNRC.js → chunk-UXSTXFZQ.js} +5168 -4245
  93. package/dist/bundle/{chunk-U32VL3MA.js → chunk-WRRGO246.js} +3 -2
  94. package/dist/bundle/{chunk-QA6KIL7Q.js → chunk-WYV5IITK.js} +11 -8
  95. package/dist/bundle/{chunk-D5EUMWD5.js → chunk-X2FILY5F.js} +3 -3
  96. package/dist/bundle/{chunk-4YIGXTBP.js → chunk-XCC7R47Z.js} +3 -3
  97. package/dist/bundle/{chunk-37NF5CBJ.js → chunk-XFT3YIHU.js} +6 -8
  98. package/dist/bundle/{chunk-IXO4SCKE.js → chunk-XGEPAJBY.js} +1 -1
  99. package/dist/bundle/chunk-XWBPP2HX.js +2 -0
  100. package/dist/bundle/{chunk-RJTGENHZ.js → chunk-Y4KWWPIO.js} +4 -7
  101. package/dist/bundle/{chunk-DEPXZJ2V.js → chunk-YFLTHGB3.js} +17 -13
  102. package/dist/bundle/{chunk-JRCH4YZP.js → chunk-YM6ZATEK.js} +17 -121
  103. package/dist/bundle/{chunk-ADKMBXY4.js → chunk-YNI57LTZ.js} +1 -1
  104. package/dist/bundle/{chunk-ERJYJ36F.js → chunk-ZMHZ6CQS.js} +2 -2
  105. package/dist/bundle/{chunk-M3DMXDX6.js → chunk-ZYMTS3CI.js} +6 -6
  106. package/dist/bundle/{cli-IYYI7GAM.js → cli-5ALOQCAC.js} +152 -123
  107. package/dist/bundle/command-contract-WO5QJVLZ.js +41 -0
  108. package/dist/bundle/{command-server-entry-FXX4LJWF.js → command-server-entry-ICOMIJIH.js} +33 -33
  109. package/dist/bundle/config-YQA5TJ7Y.js +97 -0
  110. package/dist/bundle/{decode-SRGOOGBW.js → decode-7LFOROWF.js} +6 -6
  111. package/dist/bundle/{dispatch-OUHRPFUL.js → dispatch-EU67WGME.js} +9 -9
  112. package/dist/bundle/{dist-UZLNLAIO.js → dist-KJOOYNCP.js} +25 -22
  113. package/dist/bundle/{echarts-7CM2MCMW.js → echarts-EJXBKCJT.js} +2 -2
  114. package/dist/bundle/{embed-VEE56BOB.js → embed-TOZCKRRO.js} +7 -7
  115. package/dist/bundle/{embedder-SZFYR543.js → embedder-QKEKUCS5.js} +10 -10
  116. package/dist/bundle/{failure-MZBNM7M5.js → failure-CTJLEB2R.js} +3 -3
  117. package/dist/bundle/first-run-S7CQVGK6.js +29 -0
  118. package/dist/bundle/first-screen-6GW6FD6S.js +39 -0
  119. package/dist/bundle/folders-MSBTAPAG.js +24 -0
  120. package/dist/bundle/{instructions-R7OHVAWH.js → instructions-Z7GVGWXS.js} +1 -1
  121. package/dist/bundle/{main-EFUN2O3K.js → main-RL3GC4OX.js} +39 -26
  122. package/dist/bundle/{mcp-7KQUJNFN.js → mcp-TDKGDB4V.js} +2 -2
  123. package/dist/bundle/{meetings-5I2BDNTA.js → meetings-JCMLE5AO.js} +9 -7
  124. package/dist/bundle/{node-P4E63KXA.js → node-KM3CUABH.js} +9 -9
  125. package/dist/bundle/{node-3N2JGZ7V.js → node-L2PVEW3N.js} +2 -2
  126. package/dist/bundle/{node-sqlite-2UVEE2WM.js → node-sqlite-4YW3W4XI.js} +10 -10
  127. package/dist/bundle/{oauth-AYGD7UU3.js → oauth-NNHWAT6A.js} +8 -8
  128. package/dist/bundle/{open-3GUVDLGD.js → open-PF2JHJIY.js} +6 -6
  129. package/dist/bundle/openai-C72ADYMD.js +28 -0
  130. package/dist/bundle/{output-file-72JFXVHQ.js → output-file-VDOCYH2G.js} +6 -6
  131. package/dist/bundle/{process-YAHHUFR5.js → process-MNZTQ2DA.js} +1 -1
  132. package/dist/bundle/{program-OSZROCTK.js → program-FOCBZZZS.js} +146 -151
  133. package/dist/bundle/{prompt-HMCW4XQJ.js → prompt-RBSUKMV7.js} +6 -6
  134. package/dist/bundle/{recognize-VF5CA7EM.js → recognize-RM6TQKK3.js} +5 -5
  135. package/dist/bundle/{remote-5C6VTPR2.js → remote-UKHTU3YR.js} +11 -10
  136. package/dist/bundle/{rerank-ER7NEDOI.js → rerank-3LBRVESU.js} +8 -8
  137. package/dist/bundle/run-log-UXINNGKA.js +124 -0
  138. package/dist/bundle/{serve-QJWXJOM7.js → serve-OOZFTW3W.js} +10 -10
  139. package/dist/bundle/server-DM5ZPFZB.js +75 -0
  140. package/dist/bundle/{server-KCIK3Y2P.js → server-YNQPNIJD.js} +52 -50
  141. package/dist/bundle/{services-LQMYJQG3.js → services-SLEOMN4B.js} +61 -44
  142. package/dist/bundle/{speech-74GJQNQH.js → speech-FZZ6QVGU.js} +20 -20
  143. package/dist/bundle/sqlite-runtime-WUR4PWYB.js +20 -0
  144. package/dist/bundle/{state-4XDGCHDF.js → state-ET36L4TY.js} +7 -7
  145. package/dist/bundle/{store-5Y5HK2L2.js → store-DI6OUBXA.js} +20 -20
  146. package/dist/bundle/{store-Y56AHJ2Y.js → store-SQB2DOVJ.js} +34 -28
  147. package/dist/bundle/store-connection-M6LVRAZ5.js +90 -0
  148. package/dist/bundle/store-maintenance-command-B66KWG6K.js +65 -0
  149. package/dist/bundle/{streaming-E5CR6HSR.js → streaming-PQEXKTE5.js} +7 -7
  150. package/dist/bundle/tokens-SUHRRQ25.js +24 -0
  151. package/dist/bundle/zm.js +9 -9
  152. package/dist/bundle/{zoom-app-NVL7HEAX.js → zoom-app-GE4SSHOP.js} +9 -8
  153. package/dist/folders.d.ts +12 -2
  154. package/dist/folders.d.ts.map +1 -1
  155. package/dist/folders.js +81 -3
  156. package/dist/folders.js.map +1 -1
  157. package/dist/identity.d.ts +5 -0
  158. package/dist/identity.d.ts.map +1 -1
  159. package/dist/identity.js +14 -0
  160. package/dist/identity.js.map +1 -1
  161. package/dist/recording-schedule-setup.d.ts.map +1 -1
  162. package/dist/recording-schedule-setup.js +4 -7
  163. package/dist/recording-schedule-setup.js.map +1 -1
  164. package/dist/remote-http.d.ts +1 -1
  165. package/dist/remote-http.d.ts.map +1 -1
  166. package/dist/remote-http.js +21 -23
  167. package/dist/remote-http.js.map +1 -1
  168. package/dist/setup-commands.d.ts.map +1 -1
  169. package/dist/setup-commands.js +2 -4
  170. package/dist/setup-commands.js.map +1 -1
  171. package/dist/tokens.d.ts +17 -2
  172. package/dist/tokens.d.ts.map +1 -1
  173. package/dist/tokens.js +109 -29
  174. package/dist/tokens.js.map +1 -1
  175. package/dist/version.d.ts +1 -1
  176. package/dist/version.js +1 -1
  177. package/dist/wcat.d.ts +3 -0
  178. package/dist/wcat.d.ts.map +1 -0
  179. package/dist/wcat.js +4 -0
  180. package/dist/wcat.js.map +1 -0
  181. package/package.json +15 -14
  182. package/dist/bundle/answer-policy-AT6CDEE5.js +0 -110
  183. package/dist/bundle/chunk-EG25AY4L.js +0 -17
  184. package/dist/bundle/chunk-JAEPK457.js +0 -997
  185. package/dist/bundle/chunk-K6HR6HCO.js +0 -32
  186. package/dist/bundle/chunk-OY6N2ABP.js +0 -1239
  187. package/dist/bundle/chunk-YVVJ6Y5C.js +0 -153
  188. package/dist/bundle/command-contract-TX7NSUBM.js +0 -42
  189. package/dist/bundle/config-YKNM33J7.js +0 -96
  190. package/dist/bundle/first-run-KWC7RKF2.js +0 -29
  191. package/dist/bundle/first-screen-DWKMNSEI.js +0 -40
  192. package/dist/bundle/folders-UQXRSDJJ.js +0 -16
  193. package/dist/bundle/openai-NHCDLWWY.js +0 -28
  194. package/dist/bundle/run-log-JKTLKXSK.js +0 -124
  195. package/dist/bundle/server-LLGFDLLJ.js +0 -75
  196. package/dist/bundle/store-connection-4WI32AYU.js +0 -89
  197. package/dist/bundle/store-maintenance-command-PCXO5AH4.js +0 -65
  198. package/dist/bundle/tokens-E2QNVC4F.js +0 -20
  199. /package/dist/bundle/{chunk-YVNHQFLC.js → chunk-7O7XM37N.js} +0 -0
@@ -1,99 +1,20 @@
1
1
  import { createRequire as __bundleRequire } from "node:module";
2
2
  const require = __bundleRequire(import.meta.url);
3
+ import {
4
+ DEFAULT_RETRY,
5
+ backoffMs,
6
+ realSleep,
7
+ wallClock
8
+ } from "./chunk-HNWDEDMU.js";
3
9
  import {
4
10
  CliError,
5
11
  isCliError
6
- } from "./chunk-ELJUBPY4.js";
12
+ } from "./chunk-EA2OB75T.js";
7
13
  import {
8
14
  __name
9
15
  } from "./chunk-ZVVMGPBJ.js";
10
16
 
11
- // node_modules/.pnpm/@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/http/body.js
12
- var interrupted = /* @__PURE__ */ __name((signal) => isCliError(signal.reason) ? signal.reason : new CliError(signal.reason instanceof Error && signal.reason.name === "TimeoutError" ? "timeout" : "cancelled", "HTTP response read was interrupted"), "interrupted");
13
- var checked = /* @__PURE__ */ __name((signal) => {
14
- if (signal?.aborted)
15
- throw interrupted(signal);
16
- }, "checked");
17
- var abortable = /* @__PURE__ */ __name(async (pending, signal) => {
18
- if (!signal)
19
- return pending;
20
- let abort = /* @__PURE__ */ __name(() => {
21
- }, "abort");
22
- const stopped = new Promise((_, reject) => {
23
- abort = /* @__PURE__ */ __name(() => reject(interrupted(signal)), "abort");
24
- signal.addEventListener("abort", abort, { once: true });
25
- if (signal.aborted)
26
- abort();
27
- });
28
- try {
29
- return await Promise.race([pending, stopped]);
30
- } finally {
31
- signal.removeEventListener("abort", abort);
32
- }
33
- }, "abortable");
34
- var readJsonResponse = /* @__PURE__ */ __name(async (response, options) => {
35
- const { maxBytes, signal } = options ?? {};
36
- if (!Number.isSafeInteger(maxBytes) || maxBytes < 1)
37
- throw new CliError("validation_error", "maxBytes must be a positive safe integer");
38
- if (signal !== void 0 && !(signal instanceof AbortSignal))
39
- throw new CliError("validation_error", "signal must be an AbortSignal");
40
- if (signal?.aborted) {
41
- void response.body?.cancel().catch(() => {
42
- });
43
- throw interrupted(signal);
44
- }
45
- const length = response.headers.get("content-length");
46
- if (length !== null && (!/^\d+$/.test(length) || Number(length) > maxBytes)) {
47
- void response.body?.cancel().catch(() => {
48
- });
49
- throw new CliError("invalid_response", "HTTP response exceeds the byte budget");
50
- }
51
- if (!response.body)
52
- throw new CliError("invalid_response", "HTTP response has no body");
53
- if (response.body.locked)
54
- throw new CliError("invalid_response", "HTTP response body is already in use");
55
- const reader = response.body.getReader();
56
- const chunks = [];
57
- let bytes = 0;
58
- try {
59
- for (; ; ) {
60
- checked(signal);
61
- const part = await abortable(reader.read(), signal);
62
- checked(signal);
63
- if (part.done)
64
- break;
65
- if (!(part.value instanceof Uint8Array))
66
- throw new CliError("invalid_response", "HTTP response is not bytes");
67
- bytes += part.value.byteLength;
68
- if (bytes > maxBytes)
69
- throw new CliError("invalid_response", "HTTP response exceeds the byte budget");
70
- if (part.value.byteLength)
71
- chunks.push(new Uint8Array(part.value));
72
- }
73
- const body = new Uint8Array(bytes);
74
- let offset = 0;
75
- for (const chunk of chunks) {
76
- body.set(chunk, offset);
77
- offset += chunk.byteLength;
78
- }
79
- try {
80
- return JSON.parse(new TextDecoder("utf-8", { fatal: true }).decode(body));
81
- } catch {
82
- throw new CliError("invalid_response", "HTTP response is not valid UTF-8 JSON");
83
- }
84
- } catch (error) {
85
- checked(signal);
86
- if (isCliError(error))
87
- throw error;
88
- throw new CliError("network_error", "HTTP response could not be read");
89
- } finally {
90
- void reader.cancel().catch(() => {
91
- });
92
- reader.releaseLock();
93
- }
94
- }, "readJsonResponse");
95
-
96
- // node_modules/.pnpm/@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/http/hosts.js
17
+ // node_modules/.pnpm/@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/http/hosts.js
97
18
  var LABEL = "[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?";
98
19
  var HOST_PATTERN = new RegExp(`^(?:${LABEL}(?:\\.${LABEL})*|\\*\\.${LABEL}(?:\\.${LABEL})+)$`);
99
20
  var hostProblems = /* @__PURE__ */ __name((hosts) => [
@@ -105,7 +26,7 @@ var hostCovered = /* @__PURE__ */ __name((hostname, hosts) => {
105
26
  return hosts.some((host) => host.startsWith("*.") ? name.endsWith(host.slice(1)) : name === host);
106
27
  }, "hostCovered");
107
28
 
108
- // node_modules/.pnpm/@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/http/fetch.js
29
+ // node_modules/.pnpm/@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/http/fetch.js
109
30
  var HOST_FETCH_TIMEOUT_MS = 3e4;
110
31
  var REDIRECTS = 5;
111
32
  var REDIRECT_STATUSES = /* @__PURE__ */ new Set([301, 302, 303, 307, 308]);
@@ -131,7 +52,7 @@ var released = /* @__PURE__ */ __name((response, clear) => {
131
52
  return Object.defineProperties(wrapped, { url: { value: url }, redirected: { value: redirected } });
132
53
  }, "released");
133
54
  var undeclared = /* @__PURE__ */ __name((url) => new CliError("configuration_error", `${url.hostname} is not a host this CLI declares: add "${url.hostname}" to \`hosts\` in its WCAT identity and run cli-dev manifest`, { reason: "network.host-undeclared", sent: false }), "undeclared");
134
- var checked2 = /* @__PURE__ */ __name((url, hosts) => {
55
+ var checked = /* @__PURE__ */ __name((url, hosts) => {
135
56
  if (url.protocol !== "https:" && url.protocol !== "http:")
136
57
  throw new CliError("validation_error", `only http and https are fetched, not ${url.protocol.replace(/:$/, "")}`, {
137
58
  sent: false
@@ -147,7 +68,7 @@ var hostFetch = /* @__PURE__ */ __name((options) => {
147
68
  const { hosts, fetch: send = globalThis.fetch, timeoutMs = HOST_FETCH_TIMEOUT_MS, redirects = REDIRECTS } = options;
148
69
  return async (input, init = {}) => {
149
70
  const request = input instanceof Request ? input : void 0;
150
- let url = checked2(new URL(request?.url ?? String(input)), hosts);
71
+ let url = checked(new URL(request?.url ?? String(input)), hosts);
151
72
  const caller = init.signal ?? request?.signal;
152
73
  const timeout = deadline(timeoutMs);
153
74
  const signal = caller ? AbortSignal.any([caller, timeout.signal]) : timeout.signal;
@@ -165,7 +86,7 @@ var hostFetch = /* @__PURE__ */ __name((options) => {
165
86
  throw new CliError("invalid_response", `more than ${redirects} redirects from ${url.hostname}`);
166
87
  void response.body?.cancel().catch(() => {
167
88
  });
168
- const next = checked2(new URL(location, url), hosts);
89
+ const next = checked(new URL(location, url), hosts);
169
90
  if (response.status === 303 || (response.status === 301 || response.status === 302) && method === "POST") {
170
91
  method = method === "HEAD" ? "HEAD" : "GET";
171
92
  body = void 0;
@@ -193,7 +114,92 @@ var hostFetch = /* @__PURE__ */ __name((options) => {
193
114
  };
194
115
  }, "hostFetch");
195
116
 
196
- // node_modules/.pnpm/@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/http/index.js
117
+ // node_modules/.pnpm/@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/http/body.js
118
+ var interrupted = /* @__PURE__ */ __name((signal) => isCliError(signal.reason) ? signal.reason : new CliError(signal.reason instanceof Error && signal.reason.name === "TimeoutError" ? "timeout" : "cancelled", "HTTP response read was interrupted"), "interrupted");
119
+ var checked2 = /* @__PURE__ */ __name((signal) => {
120
+ if (signal?.aborted)
121
+ throw interrupted(signal);
122
+ }, "checked");
123
+ var abortable = /* @__PURE__ */ __name(async (pending, signal) => {
124
+ if (!signal)
125
+ return pending;
126
+ let abort = /* @__PURE__ */ __name(() => {
127
+ }, "abort");
128
+ const stopped = new Promise((_, reject) => {
129
+ abort = /* @__PURE__ */ __name(() => reject(interrupted(signal)), "abort");
130
+ signal.addEventListener("abort", abort, { once: true });
131
+ if (signal.aborted)
132
+ abort();
133
+ });
134
+ try {
135
+ return await Promise.race([pending, stopped]);
136
+ } finally {
137
+ signal.removeEventListener("abort", abort);
138
+ }
139
+ }, "abortable");
140
+ var readJsonResponse = /* @__PURE__ */ __name(async (response, options) => {
141
+ const { maxBytes, signal } = options ?? {};
142
+ if (!Number.isSafeInteger(maxBytes) || maxBytes < 1)
143
+ throw new CliError("validation_error", "maxBytes must be a positive safe integer");
144
+ if (signal !== void 0 && !(signal instanceof AbortSignal))
145
+ throw new CliError("validation_error", "signal must be an AbortSignal");
146
+ if (signal?.aborted) {
147
+ void response.body?.cancel().catch(() => {
148
+ });
149
+ throw interrupted(signal);
150
+ }
151
+ const length = response.headers.get("content-length");
152
+ if (length !== null && (!/^\d+$/.test(length) || Number(length) > maxBytes)) {
153
+ void response.body?.cancel().catch(() => {
154
+ });
155
+ throw new CliError("invalid_response", "HTTP response exceeds the byte budget");
156
+ }
157
+ if (!response.body)
158
+ throw new CliError("invalid_response", "HTTP response has no body");
159
+ if (response.body.locked)
160
+ throw new CliError("invalid_response", "HTTP response body is already in use");
161
+ const reader = response.body.getReader();
162
+ const chunks = [];
163
+ let bytes = 0;
164
+ try {
165
+ for (; ; ) {
166
+ checked2(signal);
167
+ const part = await abortable(reader.read(), signal);
168
+ checked2(signal);
169
+ if (part.done)
170
+ break;
171
+ if (!(part.value instanceof Uint8Array))
172
+ throw new CliError("invalid_response", "HTTP response is not bytes");
173
+ bytes += part.value.byteLength;
174
+ if (bytes > maxBytes)
175
+ throw new CliError("invalid_response", "HTTP response exceeds the byte budget");
176
+ if (part.value.byteLength)
177
+ chunks.push(new Uint8Array(part.value));
178
+ }
179
+ const body = new Uint8Array(bytes);
180
+ let offset = 0;
181
+ for (const chunk of chunks) {
182
+ body.set(chunk, offset);
183
+ offset += chunk.byteLength;
184
+ }
185
+ try {
186
+ return JSON.parse(new TextDecoder("utf-8", { fatal: true }).decode(body));
187
+ } catch {
188
+ throw new CliError("invalid_response", "HTTP response is not valid UTF-8 JSON");
189
+ }
190
+ } catch (error) {
191
+ checked2(signal);
192
+ if (isCliError(error))
193
+ throw error;
194
+ throw new CliError("network_error", "HTTP response could not be read");
195
+ } finally {
196
+ void reader.cancel().catch(() => {
197
+ });
198
+ reader.releaseLock();
199
+ }
200
+ }, "readJsonResponse");
201
+
202
+ // node_modules/.pnpm/@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/http/index.js
197
203
  var parseRetryAfter = /* @__PURE__ */ __name((header, now) => {
198
204
  if (!header)
199
205
  return void 0;
@@ -234,11 +240,62 @@ var statusToCode = /* @__PURE__ */ __name((status) => {
234
240
  return "provider_unavailable";
235
241
  return "provider_error";
236
242
  }, "statusToCode");
243
+ var SAFE = /* @__PURE__ */ new Set(["GET", "HEAD", "OPTIONS"]);
244
+ var retrying = /* @__PURE__ */ __name((send, options = {}) => {
245
+ const { retry = DEFAULT_RETRY, reads = /* @__PURE__ */ __name((method) => SAFE.has(method), "reads"), pacer, budget = Number.POSITIVE_INFINITY, sleep = realSleep, now = wallClock, random = Math.random } = options;
246
+ return async (input, init = {}) => {
247
+ const request = input instanceof Request ? input : void 0;
248
+ const method = (init.method ?? request?.method ?? "GET").toUpperCase();
249
+ const read = reads(method, new URL(request?.url ?? String(input)));
250
+ const signal = init.signal ?? request?.signal ?? void 0;
251
+ const once = init.body instanceof ReadableStream;
252
+ let waited = 0;
253
+ const pause = /* @__PURE__ */ __name(async (ms) => {
254
+ waited += ms;
255
+ await sleep(ms, signal, "retry");
256
+ }, "pause");
257
+ for (let attempt = 1; ; attempt++) {
258
+ if (pacer) {
259
+ const wait = await pacer.reserve() - now().getTime();
260
+ if (wait > 0) {
261
+ if (waited + wait > budget)
262
+ throw new CliError("rate_limited", `the provider's pace needs a ${wait} ms wait, more than this run allows`, {
263
+ retry_after_ms: wait,
264
+ sent: false
265
+ });
266
+ await pause(wait);
267
+ }
268
+ }
269
+ const last = once || attempt > retry.retries;
270
+ try {
271
+ const response = await send(request && !last ? request.clone() : input, init);
272
+ if (last || !retryableStatus(response.status) || !(read || response.status === 429))
273
+ return response;
274
+ const wait = providerWaitMs(response.headers, now) ?? backoffMs(attempt, retry, random);
275
+ if (wait > retry.maxRetryAfterMs || waited + wait > budget)
276
+ return response;
277
+ await response.body?.cancel().catch(() => {
278
+ });
279
+ if (response.status === 429)
280
+ await pacer?.holdFor(wait);
281
+ await pause(wait);
282
+ } catch (error) {
283
+ if (last || !read || signal?.aborted || !isCliError(error) || error.details.retryable !== true)
284
+ throw error;
285
+ const wait = backoffMs(attempt, retry, random);
286
+ if (waited + wait > budget)
287
+ throw error;
288
+ await pause(wait);
289
+ }
290
+ }
291
+ };
292
+ }, "retrying");
237
293
 
238
294
  export {
239
295
  readJsonResponse,
240
296
  hostFetch,
241
297
  providerWaitMs,
242
298
  retryableStatus,
243
- statusToCode
299
+ statusToCode,
300
+ retrying
244
301
  };
@@ -2,31 +2,31 @@ import { createRequire as __bundleRequire } from "node:module";
2
2
  const require = __bundleRequire(import.meta.url);
3
3
  import {
4
4
  validateFormattedText
5
- } from "./chunk-H53WFZBN.js";
5
+ } from "./chunk-KBRIMLVN.js";
6
6
  import {
7
7
  inputPolicy
8
- } from "./chunk-EFF2XBHP.js";
8
+ } from "./chunk-OP6HK2QL.js";
9
9
  import {
10
10
  RECORDS_SCHEMA_VERSION,
11
11
  RECORD_TYPES,
12
12
  pointerOf
13
- } from "./chunk-ZHA56THL.js";
13
+ } from "./chunk-TKPIDOW5.js";
14
14
  import {
15
15
  indent
16
- } from "./chunk-S7SXSHRC.js";
16
+ } from "./chunk-HNWDEDMU.js";
17
17
  import {
18
18
  CliError
19
- } from "./chunk-ELJUBPY4.js";
19
+ } from "./chunk-EA2OB75T.js";
20
20
  import {
21
21
  __name
22
22
  } from "./chunk-ZVVMGPBJ.js";
23
23
 
24
- // node_modules/.pnpm/@wirecat+cli-core@0.647.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_a46df5420a4458268e3f15f3e8c41b99/node_modules/@wirecat/cli-core/dist/domain/checks.js
24
+ // node_modules/.pnpm/@wirecat+cli-core@0.659.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_2476fb045fb1ee08e5e46f4aab8c07fa/node_modules/@wirecat/cli-core/dist/domain/checks.js
25
25
  var spelled = /* @__PURE__ */ __name((check, args) => `${check.replaceAll(".", " ")}${args === void 0 ? "" : ` ${args}`}`, "spelled");
26
26
  var bareCheck = /* @__PURE__ */ __name((check, args) => `\`${spelled(check, args)}\``, "bareCheck");
27
27
  var checkWords = /* @__PURE__ */ __name((command, profile) => (check, args) => `\`${command} ${profile === void 0 ? "" : `${profile} `}${spelled(check, args)}\``, "checkWords");
28
28
 
29
- // node_modules/.pnpm/@wirecat+cli-core@0.647.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_a46df5420a4458268e3f15f3e8c41b99/node_modules/@wirecat/cli-core/dist/domain/markdown.js
29
+ // node_modules/.pnpm/@wirecat+cli-core@0.659.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_2476fb045fb1ee08e5e46f4aab8c07fa/node_modules/@wirecat/cli-core/dist/domain/markdown.js
30
30
  var MARKERS = [
31
31
  ["**", "bold"],
32
32
  ["~~", "strike"],
@@ -72,7 +72,7 @@ var closing = /* @__PURE__ */ __name((input, open, marker) => {
72
72
  return end;
73
73
  }, "closing");
74
74
 
75
- // node_modules/.pnpm/@wirecat+cli-core@0.647.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_a46df5420a4458268e3f15f3e8c41b99/node_modules/@wirecat/cli-core/dist/domain/markdown-spans.js
75
+ // node_modules/.pnpm/@wirecat+cli-core@0.659.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_2476fb045fb1ee08e5e46f4aab8c07fa/node_modules/@wirecat/cli-core/dist/domain/markdown-spans.js
76
76
  var STYLES = [
77
77
  ["**", "bold"],
78
78
  ["__", "underline"],
@@ -232,7 +232,7 @@ var parseMarkdownSpans = /* @__PURE__ */ __name((input) => {
232
232
  return validateFormattedText(result);
233
233
  }, "parseMarkdownSpans");
234
234
 
235
- // node_modules/.pnpm/@wirecat+cli-core@0.647.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_a46df5420a4458268e3f15f3e8c41b99/node_modules/@wirecat/cli-core/dist/domain/polls.js
235
+ // node_modules/.pnpm/@wirecat+cli-core@0.659.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_2476fb045fb1ee08e5e46f4aab8c07fa/node_modules/@wirecat/cli-core/dist/domain/polls.js
236
236
  var countedPoll = /* @__PURE__ */ __name((poll, votes, self) => {
237
237
  const cast = votes.filter((vote) => vote.answers.length > 0);
238
238
  const mine = self === null ? void 0 : votes.find((vote) => vote.person.id === self);
@@ -247,8 +247,8 @@ var countedPoll = /* @__PURE__ */ __name((poll, votes, self) => {
247
247
  };
248
248
  }, "countedPoll");
249
249
 
250
- // node_modules/.pnpm/@wirecat+cli-core@0.647.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_a46df5420a4458268e3f15f3e8c41b99/node_modules/@wirecat/cli-core/dist/domain/records-table.js
251
- var TABLE_RECORD_TYPES = Object.keys(RECORD_TYPES).filter((type) => !RECORD_TYPES[type].importOnly);
250
+ // node_modules/.pnpm/@wirecat+cli-core@0.659.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_2476fb045fb1ee08e5e46f4aab8c07fa/node_modules/@wirecat/cli-core/dist/domain/records-table.js
251
+ var TABLE_RECORD_TYPES = Object.keys(RECORD_TYPES).filter((type) => RECORD_TYPES[type].sheet !== false);
252
252
  var TableError = class extends Error {
253
253
  static {
254
254
  __name(this, "TableError");
@@ -310,7 +310,7 @@ var roleColumn = /* @__PURE__ */ __name((name, role) => ({
310
310
  }), "roleColumn");
311
311
  var recordColumns = /* @__PURE__ */ __name((type) => {
312
312
  const spec = specOf(type);
313
- if (!spec || spec.importOnly)
313
+ if (!spec || spec.sheet === false)
314
314
  return [];
315
315
  const fields = spec.fields.properties ?? {};
316
316
  const required = spec.fields.required ?? [];
@@ -374,7 +374,8 @@ var recordTemplate = /* @__PURE__ */ __name((type, format, { source, separator =
374
374
  const envelope = {
375
375
  schema_version: RECORDS_SCHEMA_VERSION,
376
376
  source: {
377
- provider: source?.provider ?? "sheet",
377
+ // An import-only type is refused under a sheet's provider: `import` is the one any folder or export may use.
378
+ provider: source?.provider ?? (specOf(type)?.importOnly ? "import" : "sheet"),
378
379
  account: source?.account ?? "main",
379
380
  batch_id: source?.batch_id ?? "first-import"
380
381
  },
@@ -2236,7 +2237,7 @@ var createDataURL = /* @__PURE__ */ __name(function(width, height, getPixel) {
2236
2237
  var qrcode_default = qrcode;
2237
2238
  var stringToBytes = qrcode.stringToBytes;
2238
2239
 
2239
- // node_modules/.pnpm/@wirecat+cli-core@0.647.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_a46df5420a4458268e3f15f3e8c41b99/node_modules/@wirecat/cli-core/dist/terminal/qr.js
2240
+ // node_modules/.pnpm/@wirecat+cli-core@0.659.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_2476fb045fb1ee08e5e46f4aab8c07fa/node_modules/@wirecat/cli-core/dist/terminal/qr.js
2240
2241
  var QUIET_ZONE = 4;
2241
2242
  var BLACK_ON_WHITE = "\x1B[30;107m";
2242
2243
  var RESET = "\x1B[0m";
@@ -2283,7 +2284,7 @@ var plainQr = /* @__PURE__ */ __name((link) => {
2283
2284
  return lines.join("\n");
2284
2285
  }, "plainQr");
2285
2286
 
2286
- // node_modules/.pnpm/@wirecat+cli-core@0.647.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_a46df5420a4458268e3f15f3e8c41b99/node_modules/@wirecat/cli-core/dist/terminal/login-qr.js
2287
+ // node_modules/.pnpm/@wirecat+cli-core@0.659.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_2476fb045fb1ee08e5e46f4aab8c07fa/node_modules/@wirecat/cli-core/dist/terminal/login-qr.js
2287
2288
  var MARGIN = 2;
2288
2289
  var atTerminal = /* @__PURE__ */ __name((input) => input.isTTY === true && !inputPolicy(input).noInput, "atTerminal");
2289
2290
  var PASTE_QR = "agents: paste the QR code above into the chat as a code block, exactly as printed; when a new one is printed, paste it and say the old one expired";