@wirecat/drive-cli 0.69.0 → 0.70.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 (217) hide show
  1. package/contracts/wirecat.json +14 -13
  2. package/dist/age.d.ts +0 -36
  3. package/dist/age.d.ts.map +1 -1
  4. package/dist/age.js +0 -22
  5. package/dist/age.js.map +1 -1
  6. package/dist/bin/drive.js +2 -2
  7. package/dist/bundle/{all-profiles-B4A737YW.js → all-profiles-FW3GK3QO.js} +13 -13
  8. package/dist/bundle/{anthropic-RZGPDESM.js → anthropic-QVKJT3II.js} +8 -8
  9. package/dist/bundle/{app-server-OWEW7DY5.js → app-server-QU73RD5R.js} +66 -58
  10. package/dist/bundle/{bun-V5QLYBZU.js → bun-5XCD5CBB.js} +2 -2
  11. package/dist/bundle/{bun-sqlite-KHLHXXGH.js → bun-sqlite-TIGSVNSV.js} +9 -9
  12. package/dist/bundle/{chunk-GK6KXBL6.js → chunk-2SBC4DVV.js} +4 -4
  13. package/dist/bundle/{chunk-E7URRFBB.js → chunk-3AHBZP33.js} +10 -15
  14. package/dist/bundle/{chunk-V4FMN5A6.js → chunk-3CHW7JGR.js} +17 -17
  15. package/dist/bundle/chunk-3TCMANIM.js +387 -0
  16. package/dist/bundle/{chunk-6EL5AVXX.js → chunk-3UWRAIWA.js} +4 -4
  17. package/dist/bundle/{chunk-2DS2TDGW.js → chunk-3UZ4OH22.js} +18 -18
  18. package/dist/bundle/{chunk-WQOGHND4.js → chunk-4WK26MPY.js} +1 -1
  19. package/dist/bundle/{chunk-AD7VI3XU.js → chunk-54BQWRJL.js} +7 -7
  20. package/dist/bundle/{chunk-EA2OB75T.js → chunk-54NDYVZA.js} +1 -1
  21. package/dist/bundle/{chunk-4YECZ6CN.js → chunk-5JTB4URG.js} +12 -12
  22. package/dist/bundle/{chunk-M4OP5ASJ.js → chunk-66PL7P4C.js} +1 -1
  23. package/dist/bundle/{chunk-BVVXYZSU.js → chunk-6BMTW5A6.js} +9 -9
  24. package/dist/bundle/{chunk-6D44YQ5X.js → chunk-6DPOWBKA.js} +6 -6
  25. package/dist/bundle/{chunk-AMQGKMLZ.js → chunk-7C5KENNU.js} +3 -3
  26. package/dist/bundle/chunk-7DJNURKV.js +823 -0
  27. package/dist/bundle/{chunk-5TK2YQCO.js → chunk-7IBENBCK.js} +2 -2
  28. package/dist/bundle/chunk-7QSRODXM.js +259 -0
  29. package/dist/bundle/{chunk-HCZYJMBP.js → chunk-ABZ2NYDT.js} +1 -1
  30. package/dist/bundle/{chunk-RLGQMMYE.js → chunk-AV5UKJZM.js} +35 -13
  31. package/dist/bundle/{chunk-533XOW74.js → chunk-BBFXQPKD.js} +3 -3
  32. package/dist/bundle/{chunk-ZUG67442.js → chunk-BBRMDMIR.js} +3 -3
  33. package/dist/bundle/{chunk-LRCSDAYK.js → chunk-BD2K2ONK.js} +4 -4
  34. package/dist/bundle/{chunk-CAQ5GW3A.js → chunk-BFKFKDPC.js} +1 -1
  35. package/dist/bundle/{chunk-OOIAJRKQ.js → chunk-BXPC5TFG.js} +2 -2
  36. package/dist/bundle/chunk-DHX27E5M.js +31 -0
  37. package/dist/bundle/{chunk-L342KHIZ.js → chunk-DR57KDAY.js} +6 -6
  38. package/dist/bundle/{chunk-XUHQ7DVT.js → chunk-DVI72ZQG.js} +1 -1
  39. package/dist/bundle/{chunk-N4ACIIQB.js → chunk-DVVUJ254.js} +2 -2
  40. package/dist/bundle/{chunk-MHXZ62CU.js → chunk-EDO5LZVF.js} +1 -1
  41. package/dist/bundle/{chunk-LUZRVBQR.js → chunk-EG62WVR2.js} +6 -6
  42. package/dist/bundle/{chunk-WNMPIRRF.js → chunk-F5KJWRF5.js} +3 -3
  43. package/dist/bundle/{chunk-U3RXH6RY.js → chunk-FADAOLGB.js} +4 -4
  44. package/dist/bundle/{chunk-4ZFO2CVH.js → chunk-FCSHWUMW.js} +5 -5
  45. package/dist/bundle/{chunk-GHFBT2ZM.js → chunk-FN3RXBO7.js} +6 -6
  46. package/dist/bundle/{chunk-GTDCP5OG.js → chunk-FONIFRYI.js} +4 -4
  47. package/dist/bundle/{chunk-IQ2QU2X6.js → chunk-FVTKFIQH.js} +981 -589
  48. package/dist/bundle/{chunk-F5UUJU6R.js → chunk-FYPW7NMH.js} +4 -4
  49. package/dist/bundle/{chunk-FIVFP53N.js → chunk-GA3URWIF.js} +1 -1
  50. package/dist/bundle/{chunk-HEBZCKMU.js → chunk-GAHIHE4K.js} +1778 -2232
  51. package/dist/bundle/{chunk-4J5GJJ2I.js → chunk-GJZSVSV3.js} +2 -2
  52. package/dist/bundle/{chunk-VUPWDCYV.js → chunk-GK3BJMGK.js} +1 -1
  53. package/dist/bundle/{chunk-6XNTELM5.js → chunk-GPDPEHYX.js} +1 -1
  54. package/dist/bundle/{chunk-CU6RATZH.js → chunk-GV5DGHSA.js} +4 -4
  55. package/dist/bundle/{chunk-JRFKCYMW.js → chunk-HHAZ6DCY.js} +23 -6
  56. package/dist/bundle/{chunk-OUM4ZO53.js → chunk-HK225DAG.js} +1 -1
  57. package/dist/bundle/{chunk-5SJZDEIO.js → chunk-HRATXUFH.js} +20 -20
  58. package/dist/bundle/{chunk-TZ75K6R7.js → chunk-HWUPU6WX.js} +8 -8
  59. package/dist/bundle/{chunk-3RLRJHAI.js → chunk-HYXXMSVD.js} +7688 -8301
  60. package/dist/bundle/{chunk-EL2E3ABX.js → chunk-I7YSHUPW.js} +13 -13
  61. package/dist/bundle/{chunk-EWUQIUTB.js → chunk-IFTX7AQU.js} +5 -5
  62. package/dist/bundle/{chunk-BBJVV4E2.js → chunk-IGNIUDI3.js} +61 -38
  63. package/dist/bundle/{chunk-7JKECODO.js → chunk-ILAQIBEO.js} +1 -11
  64. package/dist/bundle/{chunk-SY2HLH5R.js → chunk-KSJAFMU5.js} +57 -23
  65. package/dist/bundle/{chunk-PB6NWKH3.js → chunk-LINBDWJK.js} +2 -2
  66. package/dist/bundle/{chunk-CZ4UEXCE.js → chunk-LMJBQFW6.js} +6 -6
  67. package/dist/bundle/{chunk-IJCUAKR5.js → chunk-ML3R2UHV.js} +4 -4
  68. package/dist/bundle/{chunk-2Q4CB4EI.js → chunk-MXNQZAJQ.js} +2 -2
  69. package/dist/bundle/{chunk-WOUIHZRI.js → chunk-NP7LJATI.js} +15 -67
  70. package/dist/bundle/chunk-OY7TNUEC.js +16 -0
  71. package/dist/bundle/{chunk-2VFAXC6O.js → chunk-P77FL6RY.js} +18 -18
  72. package/dist/bundle/{chunk-I55XYREN.js → chunk-P7PLKNPX.js} +993 -2512
  73. package/dist/bundle/{chunk-3URYKAJP.js → chunk-PAPY6Q6H.js} +1 -1
  74. package/dist/bundle/{chunk-5B5NOAIA.js → chunk-PN4JYURZ.js} +45 -45
  75. package/dist/bundle/{chunk-ZBYKCVSV.js → chunk-PR7XD2DI.js} +2 -2
  76. package/dist/bundle/{chunk-UPCEHSIZ.js → chunk-Q5C6YKAY.js} +21 -16
  77. package/dist/bundle/{chunk-SEJBS7SI.js → chunk-QBAOIMVB.js} +1 -1
  78. package/dist/bundle/{chunk-KUQDBWPU.js → chunk-RCTOWLCD.js} +31 -32
  79. package/dist/bundle/{chunk-22SH77TG.js → chunk-REM5WHHQ.js} +64 -64
  80. package/dist/bundle/{chunk-Y2QVNVHK.js → chunk-RHSBXOQM.js} +1 -1
  81. package/dist/bundle/{chunk-3YKAFLXY.js → chunk-RLNZ7NX5.js} +2 -2
  82. package/dist/bundle/chunk-RQNRYF6D.js +170 -0
  83. package/dist/bundle/{chunk-PV3AWPHR.js → chunk-SONPLYV7.js} +5 -5
  84. package/dist/bundle/{chunk-RWQ7T4Y5.js → chunk-T5D4OGDC.js} +2 -2
  85. package/dist/bundle/{chunk-25FT44S3.js → chunk-TGS5VPJD.js} +282 -525
  86. package/dist/bundle/chunk-TNKQDS5A.js +335 -0
  87. package/dist/bundle/{chunk-NVDR72GP.js → chunk-VVN6GHAZ.js} +60 -81
  88. package/dist/bundle/{chunk-CDSB7WVG.js → chunk-WJK6KTCS.js} +8 -8
  89. package/dist/bundle/{chunk-T6X6EZ5N.js → chunk-WWE5GO6G.js} +3 -3
  90. package/dist/bundle/{chunk-SYUXKV2E.js → chunk-XOL346TJ.js} +2 -2
  91. package/dist/bundle/{chunk-T4FMXDDV.js → chunk-XZBA6FVH.js} +3 -3
  92. package/dist/bundle/chunk-YCL3SK4T.js +1978 -0
  93. package/dist/bundle/{chunk-XVH3WZSZ.js → chunk-YRUR3E3E.js} +53 -53
  94. package/dist/bundle/{chunk-QJGFQRTL.js → chunk-YZPE72GE.js} +12 -12
  95. package/dist/bundle/{chunk-O6PD7RZY.js → chunk-ZCXWV4XO.js} +4 -4
  96. package/dist/bundle/{chunk-376ZGVUZ.js → chunk-ZHZYGY5R.js} +4 -4
  97. package/dist/bundle/{cli-BS4L3HAP.js → cli-K4D4DIGQ.js} +88 -69
  98. package/dist/bundle/command-contract-V3F452QI.js +43 -0
  99. package/dist/bundle/{command-server-entry-CJ2CV7ZV.js → command-server-entry-WREK3QBB.js} +33 -30
  100. package/dist/bundle/decode-SEETPKBH.js +299 -0
  101. package/dist/bundle/{dispatch-WBEOHZDV.js → dispatch-SQCEURVK.js} +9 -9
  102. package/dist/bundle/drive.js +11 -11
  103. package/dist/bundle/{echarts-QIXLXS3G.js → echarts-WZ5RKFCX.js} +2 -2
  104. package/dist/bundle/{embed-YNZW5X6M.js → embed-B2UCRZZR.js} +9 -9
  105. package/dist/bundle/{embedder-LRC2PKTS.js → embedder-4R6Z7G7L.js} +12 -12
  106. package/dist/bundle/entry-ORZYRJ5N.js +25 -0
  107. package/dist/bundle/{failure-X6PSLVSO.js → failure-CYNXH3RQ.js} +4 -4
  108. package/dist/bundle/first-run-KAKA6KBY.js +31 -0
  109. package/dist/bundle/first-screen-R645UHRH.js +41 -0
  110. package/dist/bundle/google-BSO3YB7N.js +45 -0
  111. package/dist/bundle/{google-api-7JDZDCWE.js → google-api-SAND2F7L.js} +70 -62
  112. package/dist/bundle/grants-PLNFYARD.js +118 -0
  113. package/dist/bundle/{identity-E43WKN5F.js → identity-JVVGS4U6.js} +6 -6
  114. package/dist/bundle/{instructions-MD2RZT5Z.js → instructions-JSMTSB22.js} +1 -1
  115. package/dist/bundle/{login-RBDJPQAG.js → login-6WG3YBDU.js} +78 -70
  116. package/dist/bundle/{mcp-TDKGDB4V.js → mcp-VFIOZDVY.js} +2 -2
  117. package/dist/bundle/meeting-combined-SUKMFK3F.js +27 -0
  118. package/dist/bundle/meeting-model-S4YGKIFI.js +29 -0
  119. package/dist/bundle/meeting-semantic-5U7JQCFF.js +25 -0
  120. package/dist/bundle/{node-IEVT2FSJ.js → node-VJMVHOWD.js} +2 -2
  121. package/dist/bundle/{node-sqlite-IENH4TRX.js → node-sqlite-DCNT3HVE.js} +10 -10
  122. package/dist/bundle/oauth-KCMNQ3ZP.js +22 -0
  123. package/dist/bundle/{open-TZ5H7NYM.js → open-NFOEHVW7.js} +8 -8
  124. package/dist/bundle/{openai-XF2KB7W2.js → openai-D47WY7EC.js} +32 -30
  125. package/dist/bundle/{process-6Q23D3TO.js → process-Q2FRU5VA.js} +1 -1
  126. package/dist/bundle/{program-D5XWOHV5.js → program-T2AJJQEM.js} +1332 -1331
  127. package/dist/bundle/{prompt-KUC5D4GX.js → prompt-YJSDABXN.js} +8 -8
  128. package/dist/bundle/{reasons-KSYP5VDJ.js → reasons-WEHPCSJX.js} +5 -5
  129. package/dist/bundle/{recognize-DPFW7HO3.js → recognize-6OBEIEB3.js} +7 -7
  130. package/dist/bundle/{remote-MODTSUNH.js → remote-3SL2QJ7T.js} +13 -13
  131. package/dist/bundle/{rerank-JK7SERLE.js → rerank-L6F5SLIB.js} +10 -10
  132. package/dist/bundle/{serve-BV2WHZLW.js → serve-GYSWIWH4.js} +12 -12
  133. package/dist/bundle/server-BI46BSRE.js +80 -0
  134. package/dist/bundle/{server-N3WPEU7Z.js → server-GWWP3RIT.js} +54 -46
  135. package/dist/bundle/{services-SV6CFUCS.js → services-BDQBRXT5.js} +79 -54
  136. package/dist/bundle/{sqlite-runtime-RZ5PLZVQ.js → sqlite-runtime-ZSZGAUYB.js} +9 -9
  137. package/dist/bundle/{start-C6EXYXAL.js → start-BJ275RUK.js} +7 -7
  138. package/dist/bundle/{state-RAZIREVG.js → state-HLNGFI2T.js} +9 -9
  139. package/dist/bundle/{store-2DLGLYS6.js → store-I43KZNJW.js} +31 -26
  140. package/dist/bundle/{store-DQKJKX2G.js → store-OSRTGYGI.js} +23 -19
  141. package/dist/bundle/store-maintenance-command-FO7LEVSL.js +72 -0
  142. package/dist/bundle/tokens-DB7O7QNB.js +118 -0
  143. package/dist/catalog.d.ts +0 -28
  144. package/dist/catalog.d.ts.map +1 -1
  145. package/dist/catalog.js +0 -82
  146. package/dist/catalog.js.map +1 -1
  147. package/dist/commands/catalog.d.ts +3 -8
  148. package/dist/commands/catalog.d.ts.map +1 -1
  149. package/dist/commands/catalog.js +36 -109
  150. package/dist/commands/catalog.js.map +1 -1
  151. package/dist/commands/context.d.ts +3 -0
  152. package/dist/commands/context.d.ts.map +1 -1
  153. package/dist/commands/context.js +20 -0
  154. package/dist/commands/context.js.map +1 -1
  155. package/dist/commands/documents.d.ts.map +1 -1
  156. package/dist/commands/documents.js +30 -72
  157. package/dist/commands/documents.js.map +1 -1
  158. package/dist/commands/folders.d.ts +1 -1
  159. package/dist/commands/folders.d.ts.map +1 -1
  160. package/dist/commands/folders.js +45 -48
  161. package/dist/commands/folders.js.map +1 -1
  162. package/dist/commands/knowledge.d.ts +4 -21
  163. package/dist/commands/knowledge.d.ts.map +1 -1
  164. package/dist/commands/knowledge.js +3 -241
  165. package/dist/commands/knowledge.js.map +1 -1
  166. package/dist/commands/mirrors.d.ts +2 -2
  167. package/dist/commands/mirrors.d.ts.map +1 -1
  168. package/dist/commands/mirrors.js +46 -202
  169. package/dist/commands/mirrors.js.map +1 -1
  170. package/dist/commands/search.d.ts +1 -3
  171. package/dist/commands/search.d.ts.map +1 -1
  172. package/dist/commands/search.js +20 -42
  173. package/dist/commands/search.js.map +1 -1
  174. package/dist/commands/sync.d.ts.map +1 -1
  175. package/dist/commands/sync.js +36 -53
  176. package/dist/commands/sync.js.map +1 -1
  177. package/dist/contract-overrides.d.ts +0 -2
  178. package/dist/contract-overrides.d.ts.map +1 -1
  179. package/dist/contract-overrides.js +0 -317
  180. package/dist/contract-overrides.js.map +1 -1
  181. package/dist/knowledge.d.ts +1 -1
  182. package/dist/knowledge.d.ts.map +1 -1
  183. package/dist/knowledge.js +4 -3
  184. package/dist/knowledge.js.map +1 -1
  185. package/dist/list-queries.d.ts +0 -31
  186. package/dist/list-queries.d.ts.map +1 -1
  187. package/dist/list-queries.js +0 -36
  188. package/dist/list-queries.js.map +1 -1
  189. package/dist/program.d.ts.map +1 -1
  190. package/dist/program.js +2 -3
  191. package/dist/program.js.map +1 -1
  192. package/dist/provider-json.d.ts.map +1 -1
  193. package/dist/provider-json.js +5 -5
  194. package/dist/provider-json.js.map +1 -1
  195. package/dist/reasons.d.ts.map +1 -1
  196. package/dist/reasons.js +0 -10
  197. package/dist/reasons.js.map +1 -1
  198. package/dist/version.d.ts +1 -1
  199. package/dist/version.js +1 -1
  200. package/package.json +3 -3
  201. package/dist/bundle/command-contract-HYURWSD6.js +0 -40
  202. package/dist/bundle/decode-E2NM5SSM.js +0 -165
  203. package/dist/bundle/entry-2IMSWRJU.js +0 -25
  204. package/dist/bundle/first-run-7CPHQDM5.js +0 -30
  205. package/dist/bundle/first-screen-OKZ7GMFR.js +0 -38
  206. package/dist/bundle/google-WDKDBDD4.js +0 -45
  207. package/dist/bundle/grants-AU25GWKF.js +0 -110
  208. package/dist/bundle/oauth-3JGSN47Z.js +0 -22
  209. package/dist/bundle/server-6YDI4Y36.js +0 -72
  210. package/dist/bundle/store-maintenance-command-UJ5F5L4H.js +0 -64
  211. package/dist/bundle/tokens-LY3WML55.js +0 -110
  212. package/dist/knowledge-query.d.ts +0 -77
  213. package/dist/knowledge-query.d.ts.map +0 -1
  214. package/dist/knowledge-query.js +0 -104
  215. package/dist/knowledge-query.js.map +0 -1
  216. package/dist/bundle/{chunk-XWBPP2HX.js → chunk-ZI3YTXSF.js} +0 -0
  217. package/dist/bundle/{mdast-util-from-markdown-CE73EWJ2.js → mdast-util-from-markdown-FXEPSNER.js} +3 -3
@@ -15,12 +15,12 @@ import {
15
15
  string,
16
16
  text,
17
17
  unknown
18
- } from "./chunk-JRFKCYMW.js";
18
+ } from "./chunk-HHAZ6DCY.js";
19
19
  import {
20
20
  __name
21
21
  } from "./chunk-ZVVMGPBJ.js";
22
22
 
23
- // 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/standards/log.js
23
+ // node_modules/.pnpm/@wirecat+cli-base@0.101.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
24
24
  var LOG_SEVERITIES = ["trace", "debug", "info", "warn", "error", "fatal"];
25
25
  var logRecordSchema = strictObject({
26
26
  time: isoTime,
@@ -0,0 +1,259 @@
1
+ import { createRequire as __bundleRequire } from "node:module";
2
+ const require = __bundleRequire(import.meta.url);
3
+ import {
4
+ OPENAI_URL,
5
+ openRemote,
6
+ remoteKey,
7
+ remoteModel
8
+ } from "./chunk-FCSHWUMW.js";
9
+ import {
10
+ isTextModelInstalled,
11
+ openEmbedder,
12
+ textModelsDirectory
13
+ } from "./chunk-IFTX7AQU.js";
14
+ import {
15
+ textModel,
16
+ vectorModelKey
17
+ } from "./chunk-TNKQDS5A.js";
18
+ import {
19
+ endpointFetch
20
+ } from "./chunk-DR57KDAY.js";
21
+ import {
22
+ CliError
23
+ } from "./chunk-54NDYVZA.js";
24
+ import {
25
+ __name
26
+ } from "./chunk-ZVVMGPBJ.js";
27
+
28
+ // node_modules/.pnpm/@wirecat+cli-core@0.666.0_@wirecat+cli-base@0.101.0_commander@15.0.0_esbuild@0.28.2_typ_02b130a271480a962759fcca79b3d7ec/node_modules/@wirecat/cli-core/dist/services/meeting-model.js
29
+ var integer = /* @__PURE__ */ __name((value, name, max) => {
30
+ if (!Number.isSafeInteger(value) || value < 1 || value > max)
31
+ throw new CliError("validation_error", `Invalid ${name}`);
32
+ return value;
33
+ }, "integer");
34
+ var cancelled = /* @__PURE__ */ __name((signal) => {
35
+ if (signal?.aborted)
36
+ throw new CliError("cancelled", "Meeting embedding was cancelled");
37
+ }, "cancelled");
38
+ var validatedRemote = /* @__PURE__ */ __name((remote) => {
39
+ let url;
40
+ try {
41
+ url = new URL(remote.baseUrl);
42
+ } catch {
43
+ throw new CliError("validation_error", "Invalid embedding endpoint");
44
+ }
45
+ if (!["http:", "https:"].includes(url.protocol) || url.username || url.password || url.search || url.hash)
46
+ throw new CliError("validation_error", "Embedding endpoint requires HTTP/S without credentials, query or fragment");
47
+ if (typeof remote.model !== "string" || !/^[\w./:-]{1,200}$/.test(remote.model))
48
+ throw new CliError("validation_error", "Invalid embedding model name");
49
+ const dims = integer(remote.dims, "embedding dimensions", 8192);
50
+ const baseUrl = remote.baseUrl.replace(/\/+$/, "");
51
+ const result = remoteModel({ model: remote.model, dims, ...baseUrl === OPENAI_URL ? {} : { baseUrl } });
52
+ return result;
53
+ }, "validatedRemote");
54
+ var meetingEmbeddingModel = /* @__PURE__ */ __name((choice, env) => {
55
+ if (typeof choice === "string") {
56
+ const model = textModel(choice, env);
57
+ return { key: vectorModelKey(model), dims: model.dims, kind: "local", model: model.id };
58
+ }
59
+ if (!choice || typeof choice !== "object" || !choice.remote)
60
+ throw new CliError("validation_error", "An explicit embedding model is required");
61
+ const remote = validatedRemote(choice.remote);
62
+ if (choice.concurrency !== void 0 && choice.concurrency !== 1)
63
+ throw new CliError("validation_error", "Meeting embedding supports one remote request worker");
64
+ return { key: remoteKey(remote), dims: remote.dims, kind: "remote", model: remote.model };
65
+ }, "meetingEmbeddingModel");
66
+ var createMeetingRemoteModel = /* @__PURE__ */ __name((input) => {
67
+ try {
68
+ return validatedRemote(remoteModel(input));
69
+ } catch (error) {
70
+ if (error instanceof CliError)
71
+ throw error;
72
+ throw new CliError("validation_error", "Invalid embedding endpoint");
73
+ }
74
+ }, "createMeetingRemoteModel");
75
+ var withAbort = /* @__PURE__ */ __name(async (pending, signal) => {
76
+ cancelled(signal);
77
+ if (!signal)
78
+ return pending;
79
+ let onAbort = /* @__PURE__ */ __name(() => {
80
+ }, "onAbort");
81
+ const interrupted = new Promise((_, reject) => {
82
+ onAbort = /* @__PURE__ */ __name(() => reject(new CliError("cancelled", "Meeting embedding was cancelled")), "onAbort");
83
+ signal.addEventListener("abort", onAbort, { once: true });
84
+ });
85
+ try {
86
+ return await Promise.race([pending, interrupted]);
87
+ } finally {
88
+ signal.removeEventListener("abort", onAbort);
89
+ }
90
+ }, "withAbort");
91
+ var boundedResponse = /* @__PURE__ */ __name(async (response, maxBytes, signal) => {
92
+ const length = response.headers.get("content-length");
93
+ if (length !== null && (!/^\d+$/.test(length) || Number(length) > maxBytes)) {
94
+ void response.body?.cancel().catch(() => {
95
+ });
96
+ throw new CliError("invalid_response", "Embedding response exceeds the byte budget");
97
+ }
98
+ if (!response.body)
99
+ throw new CliError("invalid_response", "Embedding response has no body");
100
+ const reader = response.body.getReader();
101
+ const chunks = [];
102
+ let bytes = 0;
103
+ try {
104
+ for (; ; ) {
105
+ cancelled(signal);
106
+ const part = await withAbort(reader.read(), signal);
107
+ cancelled(signal);
108
+ if (part.done)
109
+ break;
110
+ bytes += part.value.byteLength;
111
+ if (bytes > maxBytes)
112
+ throw new CliError("invalid_response", "Embedding response exceeds the byte budget");
113
+ chunks.push(part.value);
114
+ }
115
+ const body = Buffer.concat(chunks, bytes).toString("utf8");
116
+ try {
117
+ return JSON.parse(body);
118
+ } catch {
119
+ throw new CliError("invalid_response", "Embedding response is not JSON");
120
+ }
121
+ } finally {
122
+ void reader.cancel().catch(() => {
123
+ });
124
+ reader.releaseLock();
125
+ }
126
+ }, "boundedResponse");
127
+ var openMeetingEmbedder = /* @__PURE__ */ __name(async (choice, options = {}) => {
128
+ const descriptor = meetingEmbeddingModel(choice, options.env);
129
+ const { signal } = options;
130
+ cancelled(signal);
131
+ const maxInputBytes = integer(options.maxInputBytes ?? 1024 * 1024, "input byte budget", 16 * 1024 * 1024);
132
+ const maxResponseBytes = integer(options.maxResponseBytes ?? 8 * 1024 * 1024, "response byte budget", 64 * 1024 * 1024);
133
+ if (options.threads !== void 0)
134
+ integer(options.threads, "embedding threads", 128);
135
+ let engine;
136
+ let remoteFailure;
137
+ if (typeof choice === "string") {
138
+ const model = textModel(choice, options.env);
139
+ const directory = options.directory ?? textModelsDirectory(options.env);
140
+ if (!isTextModelInstalled(model, directory))
141
+ throw new CliError("configuration_error", "The explicit local embedding model is not installed");
142
+ engine = await openEmbedder(model, directory, {
143
+ ...options.threads === void 0 ? {} : { threads: options.threads }
144
+ });
145
+ } else {
146
+ const remote = validatedRemote(choice.remote);
147
+ const key = choice.apiKey ?? (remote.provider === "openai" ? (options.env ?? process.env).OPENAI_API_KEY : void 0);
148
+ if (remote.provider === "openai" && !key)
149
+ throw new CliError("authentication_error", "The explicit remote embedding model requires an API key");
150
+ const post = options.fetch ?? endpointFetch(remote.baseUrl, 12e4);
151
+ const guarded = /* @__PURE__ */ __name(async (url, init) => {
152
+ try {
153
+ cancelled(signal);
154
+ const responseTask = post(url, { ...init, redirect: "manual", ...signal ? { signal } : {} }).then((response2) => {
155
+ if (signal?.aborted) {
156
+ void response2.body?.cancel().catch(() => {
157
+ });
158
+ cancelled(signal);
159
+ }
160
+ return response2;
161
+ });
162
+ const response = await withAbort(responseTask, signal);
163
+ if (signal?.aborted) {
164
+ void response.body?.cancel().catch(() => {
165
+ });
166
+ cancelled(signal);
167
+ }
168
+ if (response.status >= 300 && response.status < 400) {
169
+ void response.body?.cancel().catch(() => {
170
+ });
171
+ throw new CliError("invalid_response", "Embedding redirects are refused");
172
+ }
173
+ if (!response.ok) {
174
+ void response.body?.cancel().catch(() => {
175
+ });
176
+ return new Response("{}", { status: response.status });
177
+ }
178
+ const body = await boundedResponse(response, maxResponseBytes, signal);
179
+ if (!body || typeof body !== "object" || !("data" in body) || !Array.isArray(body.data) || body.data.length > 256)
180
+ throw new CliError("invalid_response", "Embedding response lacks vector data");
181
+ for (const entry of body.data) {
182
+ if (!entry || typeof entry !== "object" || !Number.isSafeInteger(entry.index) || entry.index < 0 || !Array.isArray(entry.embedding) || entry.embedding.length !== remote.dims || entry.embedding.some((value) => typeof value !== "number" || !Number.isFinite(value) || !Number.isFinite(Math.fround(value))))
183
+ throw new CliError("invalid_response", "Embedding response contains invalid vectors");
184
+ }
185
+ const indices = body.data.map((entry) => entry.index).sort((a, b) => a - b);
186
+ if (indices.some((index, position) => index !== position))
187
+ throw new CliError("invalid_response", "Embedding response contains invalid vector indices");
188
+ return new Response(JSON.stringify({ data: body.data.map((entry) => ({ index: entry.index, embedding: entry.embedding })) }), { status: response.status });
189
+ } catch (error) {
190
+ remoteFailure = error;
191
+ throw error;
192
+ }
193
+ }, "guarded");
194
+ engine = openRemote(remote, key, { concurrency: 1, fetch: guarded, tries: 1, env: options.env ?? process.env });
195
+ }
196
+ if (signal?.aborted) {
197
+ await engine.close();
198
+ cancelled(signal);
199
+ }
200
+ let closed = false;
201
+ let running = false;
202
+ let active = null;
203
+ let closing = null;
204
+ return {
205
+ ...descriptor,
206
+ async embed(texts, kind) {
207
+ cancelled(signal);
208
+ if (closed)
209
+ throw new CliError("configuration_error", "Meeting embedder is closed");
210
+ if (!Array.isArray(texts) || texts.length > 1e3 || texts.some((text) => typeof text !== "string") || !["query", "passage"].includes(kind))
211
+ throw new CliError("validation_error", "Invalid meeting embedding inputs");
212
+ if (Buffer.byteLength(JSON.stringify(texts), "utf8") > maxInputBytes || texts.length * descriptor.dims * 4 > maxResponseBytes)
213
+ throw new CliError("validation_error", "Meeting embedding input or vector payload exceeds its byte budget");
214
+ if (running)
215
+ throw new CliError("validation_error", "A meeting embedding request is already running");
216
+ running = true;
217
+ let settled = /* @__PURE__ */ __name(() => {
218
+ }, "settled");
219
+ active = new Promise((resolve) => {
220
+ settled = resolve;
221
+ });
222
+ remoteFailure = void 0;
223
+ try {
224
+ const vectors = await engine.embed([...texts], kind);
225
+ cancelled(signal);
226
+ if (vectors.length !== texts.length || vectors.some((vector) => vector.length !== descriptor.dims || !vector.some((value) => value !== 0) || [...vector].some((value) => !Number.isFinite(value))))
227
+ throw new CliError("invalid_response", "Meeting embedder returned invalid vectors");
228
+ return vectors;
229
+ } catch (error) {
230
+ cancelled(signal);
231
+ if (remoteFailure instanceof CliError)
232
+ throw remoteFailure;
233
+ if (error instanceof CliError)
234
+ throw error;
235
+ throw new CliError("provider_error", "Meeting embedding failed");
236
+ } finally {
237
+ running = false;
238
+ settled();
239
+ active = null;
240
+ }
241
+ },
242
+ async close() {
243
+ if (!closing) {
244
+ closed = true;
245
+ closing = (async () => {
246
+ await active;
247
+ await engine.close();
248
+ })();
249
+ }
250
+ await closing;
251
+ }
252
+ };
253
+ }, "openMeetingEmbedder");
254
+
255
+ export {
256
+ meetingEmbeddingModel,
257
+ createMeetingRemoteModel,
258
+ openMeetingEmbedder
259
+ };
@@ -4,7 +4,7 @@ import {
4
4
  __name
5
5
  } from "./chunk-ZVVMGPBJ.js";
6
6
 
7
- // 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/sanitize.js
7
+ // node_modules/.pnpm/@wirecat+cli-base@0.101.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
8
8
  var CONTROL = (
9
9
  // biome-ignore lint/suspicious/noControlCharactersInRegex: matching them is the whole point
10
10
  /[\u0000-\u0008\u000B-\u001F\u007F-\u009F\u200B\u200E\u200F\u202A-\u202E\u2066-\u2069\uFEFF\u{E0000}-\u{E007F}]/gu
@@ -5,24 +5,26 @@ import {
5
5
  LIST_QUERY_GUIDE,
6
6
  nativeTerms,
7
7
  throughWrapper
8
- } from "./chunk-HEBZCKMU.js";
8
+ } from "./chunk-GAHIHE4K.js";
9
9
  import {
10
+ DEFAULT_CONFIG,
10
11
  environmentOf,
11
12
  itemOf,
12
13
  listOf,
13
14
  nextStep,
14
15
  renderAnswer,
15
- snakeKeys
16
- } from "./chunk-25FT44S3.js";
16
+ snakeKeys,
17
+ withAgentLevels
18
+ } from "./chunk-TGS5VPJD.js";
17
19
  import {
18
20
  readOnlyLockOf
19
- } from "./chunk-ZBYKCVSV.js";
21
+ } from "./chunk-PR7XD2DI.js";
20
22
  import {
21
23
  formatReference
22
- } from "./chunk-I55XYREN.js";
24
+ } from "./chunk-YCL3SK4T.js";
23
25
  import {
24
26
  queryError
25
- } from "./chunk-UPCEHSIZ.js";
27
+ } from "./chunk-Q5C6YKAY.js";
26
28
  import {
27
29
  array,
28
30
  boolean,
@@ -32,15 +34,15 @@ import {
32
34
  safeParse,
33
35
  strictObject,
34
36
  string
35
- } from "./chunk-JRFKCYMW.js";
37
+ } from "./chunk-HHAZ6DCY.js";
36
38
  import {
37
39
  CliError
38
- } from "./chunk-EA2OB75T.js";
40
+ } from "./chunk-54NDYVZA.js";
39
41
  import {
40
42
  __name
41
43
  } from "./chunk-ZVVMGPBJ.js";
42
44
 
43
- // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/cli/messenger/lacks.js
45
+ // node_modules/.pnpm/@wirecat+cli-core@0.666.0_@wirecat+cli-base@0.101.0_commander@15.0.0_esbuild@0.28.2_typ_02b130a271480a962759fcca79b3d7ec/node_modules/@wirecat/cli-core/dist/cli/messenger/lacks.js
44
46
  var COMMAND_NEEDS = {
45
47
  "account update": ["updateProfile", "change the profile"],
46
48
  "account sessions list": ["sessions", "list the account's sessions"],
@@ -90,16 +92,34 @@ var hideNever = /* @__PURE__ */ __name((messenger, group) => {
90
92
  return group;
91
93
  }, "hideNever");
92
94
 
93
- // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/cli/paging.js
95
+ // node_modules/.pnpm/@wirecat+cli-core@0.666.0_@wirecat+cli-base@0.101.0_commander@15.0.0_esbuild@0.28.2_typ_02b130a271480a962759fcca79b3d7ec/node_modules/@wirecat/cli-core/dist/cli/paging.js
94
96
  var positiveCount = /* @__PURE__ */ __name((flag) => (value) => {
95
97
  if (!/^\d+$/.test(value.trim()) || Number(value) < 1)
96
98
  throw new CliError("validation_error", `${flag} takes a whole number from 1 upwards, not "${value}"`);
97
99
  return Number(value);
98
100
  }, "positiveCount");
101
+ var configuredLimit = /* @__PURE__ */ __name((command, most = Number.POSITIVE_INFINITY) => {
102
+ const { resolveSettings, env } = environmentOf(command);
103
+ const { limit: _typed, ...flags } = command.optsWithGlobals();
104
+ const configured = resolveSettings?.(flags, { needsProfile: false, ...env ? { env } : {} }).limit ?? DEFAULT_CONFIG.defaults.limit;
105
+ return Math.min(configured, most);
106
+ }, "configuredLimit");
99
107
  var withPaging = /* @__PURE__ */ __name((command) => command.option("--limit <n>", "how many to show", positiveCount("--limit")).option("--page <n>", "which page, starting at 1", positiveCount("--page")).option("--all", "every row, no paging"), "withPaging");
100
108
  var window = /* @__PURE__ */ __name(({ limit, page, all }) => all ? { offset: 0 } : { limit, offset: (page - 1) * limit }, "window");
109
+ var pagingOf = /* @__PURE__ */ __name((command) => {
110
+ const environment = environmentOf(command);
111
+ const flags = command.optsWithGlobals();
112
+ if (!environment.resolveSettings)
113
+ return { limit: flags.limit ?? DEFAULT_CONFIG.defaults.limit, page: flags.page ?? 1 };
114
+ const { limit, page } = environment.resolveSettings(withAgentLevels(command, command.optsWithGlobals()), {
115
+ env: environment.env ?? process.env,
116
+ needsProfile: false,
117
+ readOnly: true
118
+ });
119
+ return { limit: limit ?? DEFAULT_CONFIG.defaults.limit, page: page ?? 1 };
120
+ }, "pagingOf");
101
121
 
102
- // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/cli/messenger/chat-answers.js
122
+ // node_modules/.pnpm/@wirecat+cli-core@0.666.0_@wirecat+cli-base@0.101.0_commander@15.0.0_esbuild@0.28.2_typ_02b130a271480a962759fcca79b3d7ec/node_modules/@wirecat/cli-core/dist/cli/messenger/chat-answers.js
103
123
  var defined = /* @__PURE__ */ __name((record2) => Object.fromEntries(Object.entries(record2).filter(([, value]) => value !== void 0)), "defined");
104
124
  var chatRef = /* @__PURE__ */ __name((account, chat) => formatReference({ type: "chat", provider: account.provider, account: account.account, chat }), "chatRef");
105
125
  var settingsOf = /* @__PURE__ */ __name((settings) => defined({
@@ -361,7 +381,7 @@ var sessionAnswer = /* @__PURE__ */ __name(({ current, client, device, location,
361
381
  ...createdAt === void 0 ? {} : { created_at: createdAt }
362
382
  }), "sessionAnswer");
363
383
 
364
- // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/background/relay.js
384
+ // node_modules/.pnpm/@wirecat+cli-core@0.666.0_@wirecat+cli-base@0.101.0_commander@15.0.0_esbuild@0.28.2_typ_02b130a271480a962759fcca79b3d7ec/node_modules/@wirecat/cli-core/dist/background/relay.js
365
385
  import { createHash } from "node:crypto";
366
386
  import { chmodSync, lstatSync, mkdirSync, rmSync } from "node:fs";
367
387
  import { createConnection, createServer } from "node:net";
@@ -582,7 +602,7 @@ var relayCommand = /* @__PURE__ */ __name((path, request, options) => new Promis
582
602
  }, () => finish({ error: stopped() }));
583
603
  }), "relayCommand");
584
604
 
585
- // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/cli/messenger/serve-relay.js
605
+ // node_modules/.pnpm/@wirecat+cli-core@0.666.0_@wirecat+cli-base@0.101.0_commander@15.0.0_esbuild@0.28.2_typ_02b130a271480a962759fcca79b3d7ec/node_modules/@wirecat/cli-core/dist/cli/messenger/serve-relay.js
586
606
  var lentConnection = /* @__PURE__ */ __name((connection, watchers) => throughWrapper(connection, {
587
607
  close: /* @__PURE__ */ __name(async () => {
588
608
  }, "close"),
@@ -677,8 +697,10 @@ export {
677
697
  lentConnection,
678
698
  serveRelay,
679
699
  positiveCount,
700
+ configuredLimit,
680
701
  withPaging,
681
702
  window,
703
+ pagingOf,
682
704
  chatRef,
683
705
  chatAnswer,
684
706
  memberAnswer,
@@ -5,7 +5,7 @@ import {
5
5
  id,
6
6
  text,
7
7
  time
8
- } from "./chunk-I55XYREN.js";
8
+ } from "./chunk-YCL3SK4T.js";
9
9
  import {
10
10
  array,
11
11
  nullable,
@@ -16,9 +16,9 @@ import {
16
16
  strictObject,
17
17
  string,
18
18
  unknown
19
- } from "./chunk-JRFKCYMW.js";
19
+ } from "./chunk-HHAZ6DCY.js";
20
20
 
21
- // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/entities/note.js
21
+ // node_modules/.pnpm/@wirecat+cli-core@0.666.0_@wirecat+cli-base@0.101.0_commander@15.0.0_esbuild@0.28.2_typ_02b130a271480a962759fcca79b3d7ec/node_modules/@wirecat/cli-core/dist/entities/note.js
22
22
  var link = {
23
23
  target_text: nullable(text),
24
24
  kind: text,
@@ -2,12 +2,12 @@ import { createRequire as __bundleRequire } from "node:module";
2
2
  const require = __bundleRequire(import.meta.url);
3
3
  import {
4
4
  CliError
5
- } from "./chunk-EA2OB75T.js";
5
+ } from "./chunk-54NDYVZA.js";
6
6
  import {
7
7
  __name
8
8
  } from "./chunk-ZVVMGPBJ.js";
9
9
 
10
- // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/attachments/limits.js
10
+ // node_modules/.pnpm/@wirecat+cli-core@0.666.0_@wirecat+cli-base@0.101.0_commander@15.0.0_esbuild@0.28.2_typ_02b130a271480a962759fcca79b3d7ec/node_modules/@wirecat/cli-core/dist/attachments/limits.js
11
11
  var MAX_FILE_BYTES = 50 * 1024 * 1024;
12
12
  var MAX_TEXT_CHARS = 2e6;
13
13
  var ATTACHMENT_LIMIT_ENV = [
@@ -33,7 +33,7 @@ var pdfPreviewLimits = /* @__PURE__ */ __name((env = process.env) => {
33
33
  return { pixels, bytes: positive(env, "MESSAGING_PDF_PREVIEW_MAX_MIB", 8 * 1024 * 1024, 1024 * 1024) };
34
34
  }, "pdfPreviewLimits");
35
35
 
36
- // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/domain/google-documents.js
36
+ // node_modules/.pnpm/@wirecat+cli-core@0.666.0_@wirecat+cli-base@0.101.0_commander@15.0.0_esbuild@0.28.2_typ_02b130a271480a962759fcca79b3d7ec/node_modules/@wirecat/cli-core/dist/domain/google-documents.js
37
37
  var LINK = /https?:\/\/(?:(?:docs|drive|sheets|slides)\.google\.com|forms\.gle)(?:[/?#][^\s<>"'`]*)?/gi;
38
38
  var ID = /^[\w-]{10,}$/;
39
39
  var trimUrl = /* @__PURE__ */ __name((url) => {
@@ -5,15 +5,15 @@ import {
5
5
  } from "./chunk-Y5E2WNWB.js";
6
6
  import {
7
7
  CliError
8
- } from "./chunk-EA2OB75T.js";
8
+ } from "./chunk-54NDYVZA.js";
9
9
  import {
10
10
  __name
11
11
  } from "./chunk-ZVVMGPBJ.js";
12
12
 
13
- // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/speech/recognize.js
13
+ // node_modules/.pnpm/@wirecat+cli-core@0.666.0_@wirecat+cli-base@0.101.0_commander@15.0.0_esbuild@0.28.2_typ_02b130a271480a962759fcca79b3d7ec/node_modules/@wirecat/cli-core/dist/speech/recognize.js
14
14
  import { createRequire } from "node:module";
15
15
 
16
- // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/speech/ogg-limit.js
16
+ // node_modules/.pnpm/@wirecat+cli-core@0.666.0_@wirecat+cli-base@0.101.0_commander@15.0.0_esbuild@0.28.2_typ_02b130a271480a962759fcca79b3d7ec/node_modules/@wirecat/cli-core/dist/speech/ogg-limit.js
17
17
  var invalid = /* @__PURE__ */ __name(() => new CliError("validation_error", "local transcription needs a complete mono or stereo Ogg Opus recording"), "invalid");
18
18
  var checkOggDuration = /* @__PURE__ */ __name((bytes) => {
19
19
  const view = new DataView(bytes.buffer, bytes.byteOffset, bytes.byteLength);
@@ -70,7 +70,7 @@ var checkOggDuration = /* @__PURE__ */ __name((bytes) => {
70
70
  throw invalid();
71
71
  }, "checkOggDuration");
72
72
 
73
- // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/speech/recognize.js
73
+ // node_modules/.pnpm/@wirecat+cli-core@0.666.0_@wirecat+cli-base@0.101.0_commander@15.0.0_esbuild@0.28.2_typ_02b130a271480a962759fcca79b3d7ec/node_modules/@wirecat/cli-core/dist/speech/recognize.js
74
74
  var SAMPLE_RATE = 16e3;
75
75
  var LEAD = SAMPLE_RATE / 2;
76
76
  var toModelRate = /* @__PURE__ */ __name((samples, rate) => {
@@ -4,7 +4,7 @@ import {
4
4
  __name
5
5
  } from "./chunk-ZVVMGPBJ.js";
6
6
 
7
- // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/mcp/instructions.js
7
+ // node_modules/.pnpm/@wirecat+cli-core@0.666.0_@wirecat+cli-base@0.101.0_commander@15.0.0_esbuild@0.28.2_typ_02b130a271480a962759fcca79b3d7ec/node_modules/@wirecat/cli-core/dist/mcp/instructions.js
8
8
  var instructions = /* @__PURE__ */ __name(({ command, name, profile, writes, skill }) => {
9
9
  const all = typeof profile !== "string";
10
10
  const offers = /* @__PURE__ */ __name((key) => all || writes.includes(key), "offers");
@@ -3,10 +3,10 @@ const require = __bundleRequire(import.meta.url);
3
3
  import {
4
4
  DOC,
5
5
  SHEET
6
- } from "./chunk-NVDR72GP.js";
6
+ } from "./chunk-VVN6GHAZ.js";
7
7
  import {
8
8
  CliError
9
- } from "./chunk-EA2OB75T.js";
9
+ } from "./chunk-54NDYVZA.js";
10
10
  import {
11
11
  __name
12
12
  } from "./chunk-ZVVMGPBJ.js";
@@ -0,0 +1,31 @@
1
+ import { createRequire as __bundleRequire } from "node:module";
2
+ const require = __bundleRequire(import.meta.url);
3
+ import {
4
+ singleLine
5
+ } from "./chunk-ABZ2NYDT.js";
6
+ import {
7
+ CliError
8
+ } from "./chunk-54NDYVZA.js";
9
+ import {
10
+ __name
11
+ } from "./chunk-ZVVMGPBJ.js";
12
+
13
+ // node_modules/.pnpm/@wirecat+cli-core@0.666.0_@wirecat+cli-base@0.101.0_commander@15.0.0_esbuild@0.28.2_typ_02b130a271480a962759fcca79b3d7ec/node_modules/@wirecat/cli-core/dist/domain/tags.js
14
+ var TAG_TYPES = ["chat", "contact", "message", "task"];
15
+ var TAG = /^[a-z0-9-]{1,32}$/;
16
+ var tagOf = /* @__PURE__ */ __name((value) => {
17
+ const tag = value.trim().toLowerCase();
18
+ return TAG.test(tag) ? tag : void 0;
19
+ }, "tagOf");
20
+ var normalizeTag = /* @__PURE__ */ __name((value) => {
21
+ const tag = tagOf(value);
22
+ if (tag === void 0)
23
+ throw new CliError("validation_error", `"${singleLine(value)}" is not a tag \u2014 use 1\u201332 letters a\u2013z, digits and hyphens`, { reason: "tag.invalid" });
24
+ return tag;
25
+ }, "normalizeTag");
26
+
27
+ export {
28
+ TAG_TYPES,
29
+ tagOf,
30
+ normalizeTag
31
+ };
@@ -3,12 +3,12 @@ const require = __bundleRequire(import.meta.url);
3
3
  import {
4
4
  CliError,
5
5
  isCliError
6
- } from "./chunk-EA2OB75T.js";
6
+ } from "./chunk-54NDYVZA.js";
7
7
  import {
8
8
  __name
9
9
  } from "./chunk-ZVVMGPBJ.js";
10
10
 
11
- // 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
11
+ // node_modules/.pnpm/@wirecat+cli-base@0.101.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
12
12
  var LABEL = "[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?";
13
13
  var HOST_PATTERN = new RegExp(`^(?:${LABEL}(?:\\.${LABEL})*|\\*\\.${LABEL}(?:\\.${LABEL})+)$`);
14
14
  var hostProblems = /* @__PURE__ */ __name((hosts) => [
@@ -20,7 +20,7 @@ var hostCovered = /* @__PURE__ */ __name((hostname, hosts) => {
20
20
  return hosts.some((host) => host.startsWith("*.") ? name.endsWith(host.slice(1)) : name === host);
21
21
  }, "hostCovered");
22
22
 
23
- // 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
23
+ // node_modules/.pnpm/@wirecat+cli-base@0.101.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
24
24
  var HOST_FETCH_TIMEOUT_MS = 3e4;
25
25
  var REDIRECTS = 5;
26
26
  var REDIRECT_STATUSES = /* @__PURE__ */ new Set([301, 302, 303, 307, 308]);
@@ -108,7 +108,7 @@ var hostFetch = /* @__PURE__ */ __name((options) => {
108
108
  };
109
109
  }, "hostFetch");
110
110
 
111
- // 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
111
+ // node_modules/.pnpm/@wirecat+cli-base@0.101.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
112
112
  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");
113
113
  var checked2 = /* @__PURE__ */ __name((signal) => {
114
114
  if (signal?.aborted)
@@ -193,7 +193,7 @@ var readJsonResponse = /* @__PURE__ */ __name(async (response, options) => {
193
193
  }
194
194
  }, "readJsonResponse");
195
195
 
196
- // 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
196
+ // node_modules/.pnpm/@wirecat+cli-base@0.101.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
197
  var parseRetryAfter = /* @__PURE__ */ __name((header, now) => {
198
198
  if (!header)
199
199
  return void 0;
@@ -234,7 +234,7 @@ var statusToCode = /* @__PURE__ */ __name((status) => {
234
234
  return "provider_error";
235
235
  }, "statusToCode");
236
236
 
237
- // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/models/endpoint.js
237
+ // node_modules/.pnpm/@wirecat+cli-core@0.666.0_@wirecat+cli-base@0.101.0_commander@15.0.0_esbuild@0.28.2_typ_02b130a271480a962759fcca79b3d7ec/node_modules/@wirecat/cli-core/dist/models/endpoint.js
238
238
  var endpoint = /* @__PURE__ */ __name((value) => {
239
239
  try {
240
240
  const url = new URL(value);
@@ -4,7 +4,7 @@ import {
4
4
  __name
5
5
  } from "./chunk-ZVVMGPBJ.js";
6
6
 
7
- // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/cli/command-server-argv.js
7
+ // node_modules/.pnpm/@wirecat+cli-core@0.666.0_@wirecat+cli-base@0.101.0_commander@15.0.0_esbuild@0.28.2_typ_02b130a271480a962759fcca79b3d7ec/node_modules/@wirecat/cli-core/dist/cli/command-server-argv.js
8
8
  var COMMAND_SERVER_ARGV = ["commands", "--serve"];
9
9
  var isCommandServer = /* @__PURE__ */ __name((args) => args.length === COMMAND_SERVER_ARGV.length && COMMAND_SERVER_ARGV.every((word, at) => args[at] === word), "isCommandServer");
10
10
 
@@ -8,12 +8,12 @@ import {
8
8
  ACCESS_SECONDS,
9
9
  REFRESH_SECONDS,
10
10
  readStored
11
- } from "./chunk-376ZGVUZ.js";
11
+ } from "./chunk-ZHZYGY5R.js";
12
12
  import {
13
13
  __name
14
14
  } from "./chunk-ZVVMGPBJ.js";
15
15
 
16
- // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/mcp/http/oauth.js
16
+ // node_modules/.pnpm/@wirecat+cli-core@0.666.0_@wirecat+cli-base@0.101.0_commander@15.0.0_esbuild@0.28.2_typ_02b130a271480a962759fcca79b3d7ec/node_modules/@wirecat/cli-core/dist/mcp/http/oauth.js
17
17
  import { createHash, randomBytes, randomInt, timingSafeEqual } from "node:crypto";
18
18
  import { chmodSync, mkdirSync, renameSync, rmSync, writeFileSync } from "node:fs";
19
19
  import { dirname } from "node:path";
@@ -4,7 +4,7 @@ import {
4
4
  __name
5
5
  } from "./chunk-ZVVMGPBJ.js";
6
6
 
7
- // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/cli/stdin-field.js
7
+ // node_modules/.pnpm/@wirecat+cli-core@0.666.0_@wirecat+cli-base@0.101.0_commander@15.0.0_esbuild@0.28.2_typ_02b130a271480a962759fcca79b3d7ec/node_modules/@wirecat/cli-core/dist/cli/stdin-field.js
8
8
  var fields = /* @__PURE__ */ new WeakMap();
9
9
  var readsStdin = /* @__PURE__ */ __name((command, field) => {
10
10
  fields.set(command, field);