@wirecat/zoom-cli 0.76.0 → 0.77.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 (212) hide show
  1. package/README.md +12 -11
  2. package/contracts/wirecat.json +53 -105
  3. package/dist/answer-entities.d.ts +1 -141
  4. package/dist/answer-entities.d.ts.map +1 -1
  5. package/dist/answer-entities.js +0 -31
  6. package/dist/answer-entities.js.map +1 -1
  7. package/dist/api.d.ts +18 -1
  8. package/dist/api.d.ts.map +1 -1
  9. package/dist/api.js +179 -54
  10. package/dist/api.js.map +1 -1
  11. package/dist/archive-commands.d.ts +0 -3
  12. package/dist/archive-commands.d.ts.map +1 -1
  13. package/dist/archive-commands.js +1 -54
  14. package/dist/archive-commands.js.map +1 -1
  15. package/dist/bin/zm.js +2 -2
  16. package/dist/bundle/{all-profiles-AAMFP7IN.js → all-profiles-PMCFNDMA.js} +11 -11
  17. package/dist/bundle/answer-policy-XU7KEW2V.js +121 -0
  18. package/dist/bundle/{anthropic-6KIS53QB.js → anthropic-TGJOKLUS.js} +6 -6
  19. package/dist/bundle/{app-server-6QYNNYEU.js → app-server-OAODUFM3.js} +73 -63
  20. package/dist/bundle/{bun-QVVCH4MJ.js → bun-HJHVHJJV.js} +2 -2
  21. package/dist/bundle/{bun-sqlite-Y2ZFMNQ3.js → bun-sqlite-PLBOY6FP.js} +7 -7
  22. package/dist/bundle/{chunk-OWZETMRE.js → chunk-2QDD6S2R.js} +8 -8
  23. package/dist/bundle/{chunk-FGRFIXG2.js → chunk-2QRGJSKO.js} +2 -2
  24. package/dist/bundle/{chunk-D2TGXSHQ.js → chunk-36SI35XZ.js} +5 -5
  25. package/dist/bundle/{chunk-4JPOELCT.js → chunk-375BH5OD.js} +4 -4
  26. package/dist/bundle/{chunk-OFODCJ2A.js → chunk-3TLQF3DN.js} +3 -3
  27. package/dist/bundle/{chunk-K3K3WKDB.js → chunk-4QNW4NK6.js} +1 -1
  28. package/dist/bundle/{chunk-YEBWRWE3.js → chunk-4Z4VOQRR.js} +17 -17
  29. package/dist/bundle/{chunk-LGBLYFKI.js → chunk-5A5W322G.js} +6 -2
  30. package/dist/bundle/chunk-5C5UEKUJ.js +170 -0
  31. package/dist/bundle/chunk-5C6CRSEM.js +389 -0
  32. package/dist/bundle/{chunk-VG63EXRC.js → chunk-5KHCFIWI.js} +2 -2
  33. package/dist/bundle/{chunk-LEVOI6Z3.js → chunk-635GRAO5.js} +12 -12
  34. package/dist/bundle/{chunk-Y2BGABXP.js → chunk-6JRBMNRN.js} +3 -3
  35. package/dist/bundle/{chunk-XC4V6YCS.js → chunk-6YCFDDRO.js} +1 -1
  36. package/dist/bundle/{chunk-VRA4RVQU.js → chunk-77JQIY2V.js} +3 -3
  37. package/dist/bundle/{chunk-CPOFLYPU.js → chunk-7AFYZOHU.js} +29 -29
  38. package/dist/bundle/{chunk-IXPBSDKB.js → chunk-7CMYNW3W.js} +4 -4
  39. package/dist/bundle/chunk-7DTU7QZP.js +72 -0
  40. package/dist/bundle/chunk-7ILGYNWX.js +773 -0
  41. package/dist/bundle/{chunk-Y4WEAWU7.js → chunk-7S3N5CTA.js} +1 -1
  42. package/dist/bundle/chunk-7SNU7RFU.js +229 -0
  43. package/dist/bundle/{chunk-TK77DCE5.js → chunk-A6LK2W5J.js} +1 -1
  44. package/dist/bundle/{chunk-UAV74EY4.js → chunk-ADJIYY33.js} +1 -1
  45. package/dist/bundle/{chunk-JWMOHEDL.js → chunk-B7XFDMFV.js} +10 -10
  46. package/dist/bundle/{chunk-GYTAHH5Y.js → chunk-BOJCRTQW.js} +2 -2
  47. package/dist/bundle/{chunk-HUHH25AG.js → chunk-CJL5GHTQ.js} +913 -544
  48. package/dist/bundle/{chunk-T2QVWRJF.js → chunk-CL6QAZGT.js} +39 -67
  49. package/dist/bundle/{chunk-NQ356ERO.js → chunk-CUJJZJ4R.js} +44 -8
  50. package/dist/bundle/{chunk-OINDAHXC.js → chunk-CZ6OO66B.js} +4 -4
  51. package/dist/bundle/chunk-DCEQIKFD.js +259 -0
  52. package/dist/bundle/{chunk-55SWKR6Y.js → chunk-DDUNPLET.js} +256 -588
  53. package/dist/bundle/{chunk-6VCQ4CTK.js → chunk-DYIRJINE.js} +1 -1
  54. package/dist/bundle/{chunk-WKT5RPSY.js → chunk-E3UPMPUV.js} +8 -8
  55. package/dist/bundle/{chunk-5T7TBK5Y.js → chunk-ECRFXQHA.js} +1 -1
  56. package/dist/bundle/{chunk-LOEK6IFQ.js → chunk-F4ROWGLU.js} +57 -35
  57. package/dist/bundle/{chunk-UYZDH5LK.js → chunk-FDQE2CLT.js} +1 -1
  58. package/dist/bundle/{chunk-M7WYBGQT.js → chunk-FRC5QIPQ.js} +8 -8
  59. package/dist/bundle/{chunk-3D5PETD2.js → chunk-FS5HPXQN.js} +9 -9
  60. package/dist/bundle/{chunk-QY6GE7CL.js → chunk-GHBDYYPO.js} +2 -2
  61. package/dist/bundle/{chunk-OOYIPK4F.js → chunk-H2EVYY5Z.js} +1 -1
  62. package/dist/bundle/{chunk-PFLJJQWW.js → chunk-I3QMPQYD.js} +49 -49
  63. package/dist/bundle/{chunk-XWQKRKMT.js → chunk-ICZVSVTW.js} +71 -252
  64. package/dist/bundle/{chunk-R47GYLNN.js → chunk-IJTBB23F.js} +29 -27
  65. package/dist/bundle/{chunk-WZJ7ZYR4.js → chunk-IS6MUPN2.js} +4 -4
  66. package/dist/bundle/{chunk-ORM73DZO.js → chunk-IUOKIZZN.js} +2 -2
  67. package/dist/bundle/{chunk-FMJ4QSSU.js → chunk-IZMRQ3MV.js} +10 -10
  68. package/dist/bundle/{chunk-HWYSJ4SL.js → chunk-JFVZVPRW.js} +3 -3
  69. package/dist/bundle/{chunk-7RORMNKP.js → chunk-JMU3E2WA.js} +2 -2
  70. package/dist/bundle/{chunk-6SXCGS3A.js → chunk-JQUYHPQD.js} +7 -7
  71. package/dist/bundle/{chunk-MDTEAKA5.js → chunk-KHBSQROH.js} +5 -5
  72. package/dist/bundle/{chunk-EPPE6ZTS.js → chunk-KYKW2W6X.js} +1 -1
  73. package/dist/bundle/chunk-LMZUC4CS.js +101 -0
  74. package/dist/bundle/{chunk-X73YEFQE.js → chunk-LUAS73NT.js} +18 -18
  75. package/dist/bundle/{chunk-25GMFXPF.js → chunk-LWMDLXEO.js} +2032 -2657
  76. package/dist/bundle/{chunk-GPIQY4YB.js → chunk-LYVHQ6DJ.js} +14 -14
  77. package/dist/bundle/{chunk-CXHUOPN5.js → chunk-MCLZ74II.js} +7 -7
  78. package/dist/bundle/chunk-MIG4RLDB.js +555 -0
  79. package/dist/bundle/{chunk-JADBHKBP.js → chunk-MMAZUJBO.js} +1 -1
  80. package/dist/bundle/{chunk-VABYJQYE.js → chunk-MTH3JJHF.js} +24 -22
  81. package/dist/bundle/{chunk-EZXW3ZCR.js → chunk-NJJEUG4C.js} +12 -12
  82. package/dist/bundle/{chunk-GZYICXO4.js → chunk-NKKVVPL5.js} +1 -1
  83. package/dist/bundle/{chunk-QLUU3BV2.js → chunk-NOF6LABG.js} +6 -6
  84. package/dist/bundle/{chunk-KEFDP6NL.js → chunk-NPDPD2H3.js} +12 -12
  85. package/dist/bundle/{chunk-5EII5RIL.js → chunk-NPIVV52M.js} +1 -1
  86. package/dist/bundle/{chunk-UG2QDGAH.js → chunk-OOIU36FA.js} +1 -1
  87. package/dist/bundle/{chunk-IUSY4ZJK.js → chunk-OXXJW3A5.js} +806 -1523
  88. package/dist/bundle/chunk-PM3MB3E7.js +295 -0
  89. package/dist/bundle/{chunk-EBIK5Q73.js → chunk-PO4RZ4XZ.js} +1 -1
  90. package/dist/bundle/{chunk-EZJSAYWZ.js → chunk-Q7ZW7XAX.js} +31 -87
  91. package/dist/bundle/{chunk-CS62FET6.js → chunk-QAGECFHL.js} +22 -22
  92. package/dist/bundle/{chunk-WNXC42IU.js → chunk-QE4L2QQZ.js} +9 -9
  93. package/dist/bundle/{chunk-YESHGC3M.js → chunk-QKNO3JTG.js} +2 -2
  94. package/dist/bundle/{chunk-TYAFL66K.js → chunk-QUGESVOE.js} +15 -31
  95. package/dist/bundle/{chunk-DQHS336B.js → chunk-RQS3W4P6.js} +7 -6
  96. package/dist/bundle/{chunk-XHVFX74L.js → chunk-SFPUSEOT.js} +2 -2
  97. package/dist/bundle/{chunk-YGKM2ZWF.js → chunk-SP5OMHOO.js} +3 -3
  98. package/dist/bundle/chunk-STNZQBY4.js +335 -0
  99. package/dist/bundle/{chunk-RJK5ADMH.js → chunk-SVJQRG5N.js} +16 -16
  100. package/dist/bundle/{chunk-B7ZREOBD.js → chunk-SY5NGYKA.js} +12 -12
  101. package/dist/bundle/{chunk-GB5LI5RM.js → chunk-T4CI3YXW.js} +6 -6
  102. package/dist/bundle/{chunk-ELW3LMJZ.js → chunk-T6RSYDFA.js} +342 -154
  103. package/dist/bundle/{chunk-ZETM63M6.js → chunk-TY4FFK2P.js} +6 -6
  104. package/dist/bundle/chunk-UGRGYLEI.js +224 -0
  105. package/dist/bundle/{chunk-4ERYXY4Y.js → chunk-VGERRRDC.js} +1 -1
  106. package/dist/bundle/{chunk-XRH2NKW4.js → chunk-VJ2TLU7R.js} +6 -6
  107. package/dist/bundle/{chunk-2HKUQ7DR.js → chunk-W7UCN7MF.js} +3 -3
  108. package/dist/bundle/{chunk-IVFNHIU4.js → chunk-WD5OL5JB.js} +81 -5
  109. package/dist/bundle/{chunk-CE5Y7PQU.js → chunk-XC3MWABM.js} +4 -4
  110. package/dist/bundle/{chunk-ZFYNJERV.js → chunk-XCA5N63N.js} +6 -6
  111. package/dist/bundle/chunk-XVHDT4CO.js +31 -0
  112. package/dist/bundle/{chunk-65VRWNDP.js → chunk-YFN5A7OP.js} +4 -4
  113. package/dist/bundle/{chunk-VCFSUGPE.js → chunk-YJIGGUPI.js} +4 -4
  114. package/dist/bundle/{chunk-RXUVXAMM.js → chunk-YVI5SQPY.js} +1 -1
  115. package/dist/bundle/{chunk-FBVJGJDM.js → chunk-ZRNNMBPC.js} +27 -574
  116. package/dist/bundle/{chunk-VJANMYEC.js → chunk-ZUMKZOHR.js} +3 -3
  117. package/dist/bundle/{chunk-35AH33VJ.js → chunk-ZZ32DXTH.js} +1 -1
  118. package/dist/bundle/{cli-FHMLYHUZ.js → cli-Y27PHKBV.js} +101 -84
  119. package/dist/bundle/command-contract-GB7YA3KW.js +45 -0
  120. package/dist/bundle/{command-server-entry-YEZM52R5.js → command-server-entry-AXQSW2X6.js} +35 -31
  121. package/dist/bundle/config-2OOABHR7.js +108 -0
  122. package/dist/bundle/{decode-SIYRMJOK.js → decode-ZRNOOTUZ.js} +16 -8
  123. package/dist/bundle/{dispatch-SMER3WDX.js → dispatch-2GHGPAYH.js} +9 -9
  124. package/dist/bundle/{dist-BSJETSFE.js → dist-MUFVAMKB.js} +25 -22
  125. package/dist/bundle/{echarts-UZJ6AREV.js → echarts-F4PHDYET.js} +2 -2
  126. package/dist/bundle/{embed-A7DSHVI7.js → embed-KWHCKPCV.js} +7 -7
  127. package/dist/bundle/{embedder-WQBR4UGS.js → embedder-U3R3RY54.js} +10 -10
  128. package/dist/bundle/{failure-73UQXQTW.js → failure-S2YXEN4A.js} +3 -3
  129. package/dist/bundle/first-run-F4YR2E2C.js +29 -0
  130. package/dist/bundle/first-screen-HPRHD3VK.js +43 -0
  131. package/dist/bundle/{folders-BH4SV6SI.js → folders-DVTRFQKW.js} +5 -5
  132. package/dist/bundle/{instructions-SDDUBGH4.js → instructions-JU4YW6QY.js} +1 -1
  133. package/dist/bundle/{main-KL4FN5F3.js → main-5UCRPACH.js} +24 -24
  134. package/dist/bundle/{mcp-GN4FTJX5.js → mcp-O6ACR2DX.js} +2 -2
  135. package/dist/bundle/meeting-combined-IWU5SPAH.js +26 -0
  136. package/dist/bundle/meeting-model-ILIUJECZ.js +26 -0
  137. package/dist/bundle/meeting-semantic-5DKRGZFS.js +23 -0
  138. package/dist/bundle/{meetings-URPXBHV7.js → meetings-T2UY35DV.js} +25 -7
  139. package/dist/bundle/{node-ELCNUOCE.js → node-MAVRAF4M.js} +2 -2
  140. package/dist/bundle/{node-sqlite-QLSNHZBM.js → node-sqlite-TFBQ5NDI.js} +8 -8
  141. package/dist/bundle/{oauth-LZ64S7Y3.js → oauth-7IG5HWSY.js} +8 -8
  142. package/dist/bundle/{open-WB4HUPQT.js → open-3R3N7L3X.js} +6 -6
  143. package/dist/bundle/openai-DD5I3DWC.js +28 -0
  144. package/dist/bundle/{output-file-AHPQA5LR.js → output-file-KKHHAYWF.js} +6 -6
  145. package/dist/bundle/{process-67DAKAAQ.js → process-OIO254NR.js} +1 -1
  146. package/dist/bundle/{program-CIMACIBE.js → program-IBYRU76H.js} +423 -251
  147. package/dist/bundle/{prompt-GG53UBDJ.js → prompt-LNEOO7PN.js} +6 -6
  148. package/dist/bundle/{recognize-CFJ3CAEH.js → recognize-2WYLT3PC.js} +5 -5
  149. package/dist/bundle/{remote-BLEM7C3Q.js → remote-7EAJEIV7.js} +11 -11
  150. package/dist/bundle/{rerank-ERN6PC66.js → rerank-DZBZ744F.js} +8 -8
  151. package/dist/bundle/run-log-CCIVRSHP.js +135 -0
  152. package/dist/bundle/{serve-FJPPTJXH.js → serve-T3KQV5SS.js} +15 -15
  153. package/dist/bundle/{server-FLUSDUGM.js → server-2QQAQZ2J.js} +59 -49
  154. package/dist/bundle/server-OJQMPF2R.js +84 -0
  155. package/dist/bundle/{services-LXC6DVUQ.js → services-DETAKMC3.js} +78 -54
  156. package/dist/bundle/{speech-WFEZTKXA.js → speech-HD57JNTK.js} +34 -18
  157. package/dist/bundle/{sqlite-runtime-KN33VSP7.js → sqlite-runtime-OCETZSEZ.js} +7 -7
  158. package/dist/bundle/{state-TXS4ZHIT.js → state-ZKVQ4DBI.js} +7 -7
  159. package/dist/bundle/{store-ZUREZYZB.js → store-7IZ2WMHF.js} +24 -20
  160. package/dist/bundle/{store-MUOXLVL4.js → store-GEAQ7V5R.js} +26 -22
  161. package/dist/bundle/store-connection-BALCZW7P.js +101 -0
  162. package/dist/bundle/store-maintenance-command-SBT4LDSI.js +76 -0
  163. package/dist/bundle/{streaming-ZSCHRC5S.js → streaming-CLBAO3MG.js} +7 -7
  164. package/dist/bundle/{tokens-YVDOY4EV.js → tokens-WH73ZWFI.js} +10 -10
  165. package/dist/bundle/zm.js +9 -9
  166. package/dist/bundle/{zoom-app-O6GIMB7Y.js → zoom-app-ZDTYMJET.js} +8 -8
  167. package/dist/commands.d.ts.map +1 -1
  168. package/dist/commands.js +3 -0
  169. package/dist/commands.js.map +1 -1
  170. package/dist/first-screen.d.ts.map +1 -1
  171. package/dist/first-screen.js +3 -5
  172. package/dist/first-screen.js.map +1 -1
  173. package/dist/meeting-integration-commands.d.ts.map +1 -1
  174. package/dist/meeting-integration-commands.js +46 -28
  175. package/dist/meeting-integration-commands.js.map +1 -1
  176. package/dist/meeting-source.d.ts.map +1 -1
  177. package/dist/meeting-source.js +15 -1
  178. package/dist/meeting-source.js.map +1 -1
  179. package/dist/permissions.d.ts +8 -4
  180. package/dist/permissions.d.ts.map +1 -1
  181. package/dist/permissions.js +25 -24
  182. package/dist/permissions.js.map +1 -1
  183. package/dist/program-bindings.d.ts.map +1 -1
  184. package/dist/program-bindings.js +8 -5
  185. package/dist/program-bindings.js.map +1 -1
  186. package/dist/program.d.ts +2 -1
  187. package/dist/program.d.ts.map +1 -1
  188. package/dist/program.js.map +1 -1
  189. package/dist/remote-meetings.d.ts +38 -8
  190. package/dist/remote-meetings.d.ts.map +1 -1
  191. package/dist/remote-meetings.js +52 -29
  192. package/dist/remote-meetings.js.map +1 -1
  193. package/dist/run.js +1 -1
  194. package/dist/version.d.ts +1 -1
  195. package/dist/version.js +1 -1
  196. package/dist/zoom-app.d.ts.map +1 -1
  197. package/dist/zoom-app.js +1 -0
  198. package/dist/zoom-app.js.map +1 -1
  199. package/package.json +3 -3
  200. package/skills/zoom-cli/SKILL.md +2 -2
  201. package/dist/bundle/answer-policy-ETAELI4A.js +0 -110
  202. package/dist/bundle/chunk-64N7MY3I.js +0 -161
  203. package/dist/bundle/command-contract-HUZ4I23S.js +0 -41
  204. package/dist/bundle/config-KVTWN7QZ.js +0 -97
  205. package/dist/bundle/first-run-SY6XSUZ3.js +0 -29
  206. package/dist/bundle/first-screen-ZDMODGWS.js +0 -39
  207. package/dist/bundle/openai-KN6JE4QU.js +0 -28
  208. package/dist/bundle/run-log-S67YPJF6.js +0 -124
  209. package/dist/bundle/server-UNJY3TSJ.js +0 -74
  210. package/dist/bundle/store-connection-NRNEBUPU.js +0 -90
  211. package/dist/bundle/store-maintenance-command-OBOPYFZ5.js +0 -65
  212. /package/dist/bundle/{chunk-BDCC2J2Z.js → chunk-VKE77B3F.js} +0 -0
@@ -6,7 +6,7 @@ import {
6
6
  import {
7
7
  commandPathOf,
8
8
  outputOf
9
- } from "./chunk-D2TGXSHQ.js";
9
+ } from "./chunk-36SI35XZ.js";
10
10
  import {
11
11
  Command,
12
12
  Help,
@@ -17,18 +17,18 @@ import {
17
17
  environmentOf,
18
18
  metaOf,
19
19
  takesProfile
20
- } from "./chunk-55SWKR6Y.js";
20
+ } from "./chunk-DDUNPLET.js";
21
21
  import {
22
22
  writes
23
- } from "./chunk-3D5PETD2.js";
23
+ } from "./chunk-FS5HPXQN.js";
24
24
  import {
25
25
  CliError
26
- } from "./chunk-K3K3WKDB.js";
26
+ } from "./chunk-4QNW4NK6.js";
27
27
  import {
28
28
  __name
29
29
  } from "./chunk-ZVVMGPBJ.js";
30
30
 
31
- // node_modules/.pnpm/@wirecat+cli-core@0.663.0_@wirecat+cli-base@0.100.0_commander@15.0.0_esbuild@0.28.2_typ_3651938dd4032f987ce713acb104c9b9/node_modules/@wirecat/cli-core/dist/cli/help/command-help.js
31
+ // node_modules/.pnpm/@wirecat+cli-core@0.667.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_0b2555be96e01c2163d7c05aae2e84c1/node_modules/@wirecat/cli-core/dist/cli/help/command-help.js
32
32
  var ARGUMENT_KINDS = {
33
33
  chat: "chat",
34
34
  chats: "chat",
@@ -250,7 +250,7 @@ var exampleReport = /* @__PURE__ */ __name((program) => {
250
250
  return { written, generated, text };
251
251
  }, "exampleReport");
252
252
 
253
- // node_modules/.pnpm/@wirecat+cli-core@0.663.0_@wirecat+cli-base@0.100.0_commander@15.0.0_esbuild@0.28.2_typ_3651938dd4032f987ce713acb104c9b9/node_modules/@wirecat/cli-core/dist/cli/help/first-screen.js
253
+ // node_modules/.pnpm/@wirecat+cli-core@0.667.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_0b2555be96e01c2163d7c05aae2e84c1/node_modules/@wirecat/cli-core/dist/cli/help/first-screen.js
254
254
  var WIRECAT_TOOLS = [
255
255
  {
256
256
  command: "tg",
@@ -0,0 +1,224 @@
1
+ import { createRequire as __bundleRequire } from "node:module";
2
+ const require = __bundleRequire(import.meta.url);
3
+ import {
4
+ embeddingKeys,
5
+ endpointKeyName,
6
+ modelGateway
7
+ } from "./chunk-7SNU7RFU.js";
8
+ import {
9
+ modelAddressAllowed,
10
+ onThisComputer
11
+ } from "./chunk-SP5OMHOO.js";
12
+ import {
13
+ readSharedSection,
14
+ sharedConfigPath,
15
+ writeSharedSection
16
+ } from "./chunk-E3UPMPUV.js";
17
+ import {
18
+ storePath
19
+ } from "./chunk-SFPUSEOT.js";
20
+ import {
21
+ Credentials,
22
+ isMovedRun,
23
+ resolvePaths
24
+ } from "./chunk-QAGECFHL.js";
25
+ import {
26
+ check,
27
+ getDotPath,
28
+ maxLength,
29
+ minLength,
30
+ optional,
31
+ picklist,
32
+ pipe,
33
+ safeParse,
34
+ strictObject,
35
+ string,
36
+ trim
37
+ } from "./chunk-FS5HPXQN.js";
38
+ import {
39
+ CliError
40
+ } from "./chunk-4QNW4NK6.js";
41
+ import {
42
+ __name
43
+ } from "./chunk-ZVVMGPBJ.js";
44
+
45
+ // node_modules/.pnpm/@wirecat+cli-core@0.667.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_0b2555be96e01c2163d7c05aae2e84c1/node_modules/@wirecat/cli-core/dist/models/ai.js
46
+ var AI_PROVIDERS = ["anthropic", "openai", "ollama"];
47
+ var DEFAULT_BASE_URL = {
48
+ anthropic: "https://api.anthropic.com",
49
+ openai: "https://api.openai.com/v1",
50
+ ollama: "http://127.0.0.1:11434/v1"
51
+ };
52
+ var OFFICIAL = {
53
+ "https://api.openai.com": "openai",
54
+ "https://api.anthropic.com": "anthropic"
55
+ };
56
+ var SECTION = "ai";
57
+ var aiAddressAllowed = modelAddressAllowed;
58
+ var consentShape = strictObject({
59
+ origin: string(),
60
+ model: string(),
61
+ at: string()
62
+ });
63
+ var settingShape = strictObject({
64
+ provider: picklist(AI_PROVIDERS),
65
+ model: pipe(string(), trim(), minLength(1), maxLength(200)),
66
+ base_url: optional(pipe(string(), check(aiAddressAllowed, "use https, or http only on this computer"))),
67
+ images: optional(consentShape)
68
+ });
69
+ var aiSettingPath = /* @__PURE__ */ __name((env) => sharedConfigPath(storePath(env), env), "aiSettingPath");
70
+ var readAiSetting = /* @__PURE__ */ __name((path) => {
71
+ const section = readSharedSection(path, SECTION);
72
+ if (section === void 0)
73
+ return void 0;
74
+ const checked = safeParse(settingShape, section);
75
+ if (!checked.success)
76
+ throw new CliError("configuration_error", `${path}: ai.${getDotPath(checked.issues[0]) ?? "setting"} is invalid`, {
77
+ reason: "ai.setting-invalid"
78
+ });
79
+ return checked.output;
80
+ }, "readAiSetting");
81
+ var writeAiSetting = /* @__PURE__ */ __name((path, setting) => writeSharedSection(path, SECTION, setting), "writeAiSetting");
82
+ var aiSettingOf = /* @__PURE__ */ __name((given) => {
83
+ const draft = {
84
+ provider: given.provider,
85
+ model: given.model,
86
+ ...given.baseUrl?.trim() ? { base_url: given.baseUrl.trim().replace(/\/+$/, "") } : {}
87
+ };
88
+ const checked = safeParse(settingShape, draft);
89
+ if (!checked.success) {
90
+ const field = getDotPath(checked.issues[0]);
91
+ throw new CliError("validation_error", field === "provider" ? `the provider is one of ${AI_PROVIDERS.join(", ")}` : field === "base_url" ? "this address is not allowed: use https, or http only on this computer" : "name the model, 1 to 200 characters", { reason: field === "base_url" ? "model.address-refused" : "ai.setting-invalid" });
92
+ }
93
+ if (checked.output.provider === "ollama" && !onThisComputer(aiBaseUrl(checked.output)))
94
+ throw new CliError("validation_error", "Ollama is read only on this computer", { reason: "model.address-refused" });
95
+ return given.allowImages ? {
96
+ ...checked.output,
97
+ images: { origin: aiOrigin(checked.output), model: checked.output.model, at: (/* @__PURE__ */ new Date()).toISOString() }
98
+ } : checked.output;
99
+ }, "aiSettingOf");
100
+ var aiBaseUrl = /* @__PURE__ */ __name((setting) => setting.base_url ?? DEFAULT_BASE_URL[setting.provider], "aiBaseUrl");
101
+ var aiOrigin = /* @__PURE__ */ __name((setting) => new URL(aiBaseUrl(setting)).origin, "aiOrigin");
102
+ var aiTarget = /* @__PURE__ */ __name((setting) => ({
103
+ provider: setting.provider === "anthropic" ? "anthropic" : "openai",
104
+ model: setting.model,
105
+ baseUrl: aiBaseUrl(setting)
106
+ }), "aiTarget");
107
+ var aiImagesAllowed = /* @__PURE__ */ __name((setting) => setting.images?.origin === aiOrigin(setting) && setting.images.model === setting.model, "aiImagesAllowed");
108
+ var aiKeys = /* @__PURE__ */ __name((app, env, keyring) => {
109
+ const where = { appName: "WireCat", prefix: "WIRECAT", env };
110
+ const credentials = new Credentials({
111
+ configDir: resolvePaths(where).config,
112
+ service: "WireCat",
113
+ // A tool run with its own folders moved (MEMO_CONFIG_DIR…) is a test or a sandbox, not the owner.
114
+ isolated: isMovedRun(where) || isMovedRun({ appName: app.appName, prefix: app.envPrefix, env }),
115
+ env,
116
+ ...keyring ? { keyring } : {},
117
+ warn: /* @__PURE__ */ __name((message) => process.stderr.write(`${message}
118
+ `), "warn")
119
+ });
120
+ const account = /* @__PURE__ */ __name((origin) => `ai:${origin}`, "account");
121
+ return {
122
+ read: /* @__PURE__ */ __name((origin) => {
123
+ const stored = credentials.read(account(origin));
124
+ if (stored)
125
+ return { key: stored.secret, source: stored.source };
126
+ const official = OFFICIAL[origin];
127
+ const legacy = official ?? (origin.startsWith("https://") ? endpointKeyName(origin) : void 0);
128
+ const found = legacy === void 0 ? void 0 : embeddingKeys(app, env, keyring).read(legacy);
129
+ return found ? { key: found.key, source: found.source === "env" ? "environment" : found.source } : void 0;
130
+ }, "read"),
131
+ write: /* @__PURE__ */ __name((origin, key) => credentials.write(account(origin), key, { signIn: true }), "write"),
132
+ remove: /* @__PURE__ */ __name((origin) => credentials.remove(account(origin)), "remove")
133
+ };
134
+ }, "aiKeys");
135
+ var aiNeedsKey = /* @__PURE__ */ __name((setting) => aiLeavesComputer(setting), "aiNeedsKey");
136
+ var aiTakesKey = /* @__PURE__ */ __name((setting) => setting.provider !== "ollama", "aiTakesKey");
137
+ var keyFor = /* @__PURE__ */ __name((setting, deps) => aiTakesKey(setting) ? aiKeys(deps.app, deps.env, deps.keyring).read(aiOrigin(setting))?.key : void 0, "keyFor");
138
+ var gatewayFor = /* @__PURE__ */ __name((setting, deps, key) => modelGateway({
139
+ resolve: /* @__PURE__ */ __name(() => aiTarget(setting), "resolve"),
140
+ consent: /* @__PURE__ */ __name(() => true, "consent"),
141
+ key: /* @__PURE__ */ __name(() => key, "key"),
142
+ env: deps.env,
143
+ ...deps.fetch ? { fetch: deps.fetch } : {},
144
+ ...deps.signal ? { signal: deps.signal } : {}
145
+ }), "gatewayFor");
146
+ var aiLeavesComputer = /* @__PURE__ */ __name((setting) => !onThisComputer(aiBaseUrl(setting)), "aiLeavesComputer");
147
+ var sharedModel = /* @__PURE__ */ __name((deps) => {
148
+ const setting = readAiSetting(aiSettingPath(deps.env));
149
+ if (!setting)
150
+ return void 0;
151
+ return { target: { ...aiTarget(setting), baseUrl: aiBaseUrl(setting) }, key: keyFor(setting, deps), setting };
152
+ }, "sharedModel");
153
+ var aiTextReader = /* @__PURE__ */ __name((deps) => {
154
+ const setting = readAiSetting(aiSettingPath(deps.env));
155
+ if (!setting)
156
+ return { refused: "ai.not-set" };
157
+ const key = keyFor(setting, deps);
158
+ if (aiNeedsKey(setting) && !key)
159
+ return { refused: "ai.key-missing" };
160
+ const gateway = gatewayFor(setting, deps, key);
161
+ return {
162
+ by: `${setting.provider}/${setting.model}`,
163
+ leavesComputer: aiLeavesComputer(setting),
164
+ complete: /* @__PURE__ */ __name(async (request) => (await gateway.complete(request)).text, "complete")
165
+ };
166
+ }, "aiTextReader");
167
+ var reasonOf = /* @__PURE__ */ __name((error) => {
168
+ if (!(error instanceof CliError))
169
+ return "ai.failed";
170
+ if (error.code === "rate_limited")
171
+ return "ai.rate-limited";
172
+ const { reason, status } = error.details;
173
+ if (reason === "model.key-rejected")
174
+ return "ai.key-rejected";
175
+ if (reason === "model.unreachable")
176
+ return "ai.unreachable";
177
+ if (reason === "model.empty-answer")
178
+ return "ai.empty-answer";
179
+ if (status === 402)
180
+ return "ai.no-credit";
181
+ if (status === 404)
182
+ return "ai.model-unknown";
183
+ if (typeof status === "number" && status >= 500)
184
+ return "ai.provider-error";
185
+ return "ai.failed";
186
+ }, "reasonOf");
187
+ var checkAi = /* @__PURE__ */ __name(async (deps) => {
188
+ const setting = readAiSetting(aiSettingPath(deps.env));
189
+ if (!setting)
190
+ return { ok: false, reason: "ai.not-set", ms: null };
191
+ const key = keyFor(setting, deps);
192
+ if (aiNeedsKey(setting) && !key)
193
+ return { ok: false, reason: "ai.key-missing", ms: null };
194
+ const started = Date.now();
195
+ try {
196
+ await gatewayFor(setting, deps, key).complete({
197
+ purpose: "check",
198
+ system: "Reply with the word OK.",
199
+ prompt: "OK?",
200
+ // Reasoning models spend tokens before they answer; too low a cap reads as a broken setup.
201
+ maxTokens: 2048
202
+ });
203
+ return { ok: true, reason: "ai.ok", ms: Date.now() - started };
204
+ } catch (error) {
205
+ return { ok: false, reason: reasonOf(error), ms: null };
206
+ }
207
+ }, "checkAi");
208
+
209
+ export {
210
+ AI_PROVIDERS,
211
+ aiSettingPath,
212
+ readAiSetting,
213
+ writeAiSetting,
214
+ aiSettingOf,
215
+ aiBaseUrl,
216
+ aiOrigin,
217
+ aiImagesAllowed,
218
+ aiKeys,
219
+ aiTakesKey,
220
+ aiLeavesComputer,
221
+ sharedModel,
222
+ aiTextReader,
223
+ checkAi
224
+ };
@@ -4,7 +4,7 @@ import {
4
4
  __name
5
5
  } from "./chunk-ZVVMGPBJ.js";
6
6
 
7
- // node_modules/.pnpm/@wirecat+cli-core@0.663.0_@wirecat+cli-base@0.100.0_commander@15.0.0_esbuild@0.28.2_typ_3651938dd4032f987ce713acb104c9b9/node_modules/@wirecat/cli-core/dist/cli/messenger/private-files.js
7
+ // node_modules/.pnpm/@wirecat+cli-core@0.667.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_0b2555be96e01c2163d7c05aae2e84c1/node_modules/@wirecat/cli-core/dist/cli/messenger/private-files.js
8
8
  import { existsSync, statSync } from "node:fs";
9
9
  var shellQuoted = /* @__PURE__ */ __name((path) => `'${path.replaceAll("'", `'\\''`)}'`, "shellQuoted");
10
10
  var privateFiles = /* @__PURE__ */ __name(({ files, dirs }, platform = process.platform) => {
@@ -2,15 +2,15 @@ import { createRequire as __bundleRequire } from "node:module";
2
2
  const require = __bundleRequire(import.meta.url);
3
3
  import {
4
4
  PRAGMAS
5
- } from "./chunk-OOYIPK4F.js";
5
+ } from "./chunk-H2EVYY5Z.js";
6
6
  import {
7
7
  CliError
8
- } from "./chunk-K3K3WKDB.js";
8
+ } from "./chunk-4QNW4NK6.js";
9
9
  import {
10
10
  __name
11
11
  } from "./chunk-ZVVMGPBJ.js";
12
12
 
13
- // node_modules/.pnpm/@wirecat+cli-core@0.663.0_@wirecat+cli-base@0.100.0_commander@15.0.0_esbuild@0.28.2_typ_3651938dd4032f987ce713acb104c9b9/node_modules/@wirecat/cli-core/dist/store/sqlite-warning.js
13
+ // node_modules/.pnpm/@wirecat+cli-core@0.667.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_0b2555be96e01c2163d7c05aae2e84c1/node_modules/@wirecat/cli-core/dist/store/sqlite-warning.js
14
14
  var SQLITE_WARNING = "SQLite is an experimental feature";
15
15
  var quieted = /* @__PURE__ */ new WeakSet();
16
16
  var quietSqliteWarning = /* @__PURE__ */ __name((host = process) => {
@@ -31,7 +31,7 @@ var isSqliteWarning = /* @__PURE__ */ __name((warning, options) => {
31
31
  return name === "ExperimentalWarning" && message.startsWith(SQLITE_WARNING);
32
32
  }, "isSqliteWarning");
33
33
 
34
- // node_modules/.pnpm/@wirecat+cli-core@0.663.0_@wirecat+cli-base@0.100.0_commander@15.0.0_esbuild@0.28.2_typ_3651938dd4032f987ce713acb104c9b9/node_modules/@wirecat/cli-core/dist/store/open.js
34
+ // node_modules/.pnpm/@wirecat+cli-core@0.667.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_0b2555be96e01c2163d7c05aae2e84c1/node_modules/@wirecat/cli-core/dist/store/open.js
35
35
  var openCache = /* @__PURE__ */ __name(async (path) => {
36
36
  const database = await openFile(path);
37
37
  try {
@@ -44,12 +44,12 @@ var openCache = /* @__PURE__ */ __name(async (path) => {
44
44
  }, "openCache");
45
45
  var openFile = /* @__PURE__ */ __name((path) => "Bun" in globalThis ? openUnderBun(path) : openUnderNode(path), "openFile");
46
46
  var openUnderBun = /* @__PURE__ */ __name(async (path) => {
47
- const { openWithBunSqlite } = await import("./bun-sqlite-Y2ZFMNQ3.js");
47
+ const { openWithBunSqlite } = await import("./bun-sqlite-PLBOY6FP.js");
48
48
  return await openWithBunSqlite(path);
49
49
  }, "openUnderBun");
50
50
  var openUnderNode = /* @__PURE__ */ __name(async (path) => {
51
51
  quietSqliteWarning();
52
- const { openWithNodeSqlite } = await import("./node-sqlite-QLSNHZBM.js");
52
+ const { openWithNodeSqlite } = await import("./node-sqlite-TFBQ5NDI.js");
53
53
  return openWithNodeSqlite(path);
54
54
  }, "openUnderNode");
55
55
  var runtime = /* @__PURE__ */ __name(() => {
@@ -2,16 +2,16 @@ import { createRequire as __bundleRequire } from "node:module";
2
2
  const require = __bundleRequire(import.meta.url);
3
3
  import {
4
4
  alive
5
- } from "./chunk-UG2QDGAH.js";
5
+ } from "./chunk-OOIU36FA.js";
6
6
  import {
7
7
  resolvePaths,
8
8
  writeSecurely
9
- } from "./chunk-CS62FET6.js";
9
+ } from "./chunk-QAGECFHL.js";
10
10
  import {
11
11
  __name
12
12
  } from "./chunk-ZVVMGPBJ.js";
13
13
 
14
- // node_modules/.pnpm/@wirecat+cli-core@0.663.0_@wirecat+cli-base@0.100.0_commander@15.0.0_esbuild@0.28.2_typ_3651938dd4032f987ce713acb104c9b9/node_modules/@wirecat/cli-core/dist/background/lock.js
14
+ // node_modules/.pnpm/@wirecat+cli-core@0.667.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_0b2555be96e01c2163d7c05aae2e84c1/node_modules/@wirecat/cli-core/dist/background/lock.js
15
15
  import { existsSync, linkSync, mkdirSync, readdirSync, readFileSync, rmSync, writeFileSync } from "node:fs";
16
16
  import { dirname, join } from "node:path";
17
17
  var lockPath = /* @__PURE__ */ __name((app, profile, env) => join(resolvePaths({ appName: app.appName, prefix: app.envPrefix, env }).state, "serve", `${profile}.lock`), "lockPath");
@@ -1,21 +1,96 @@
1
1
  import { createRequire as __bundleRequire } from "node:module";
2
2
  const require = __bundleRequire(import.meta.url);
3
3
  import {
4
+ aiKeys,
5
+ aiOrigin,
6
+ aiSettingPath,
7
+ readAiSetting
8
+ } from "./chunk-UGRGYLEI.js";
9
+ import {
10
+ OPENAI_URL,
11
+ localOnly,
12
+ localOnlyRefusal
13
+ } from "./chunk-QE4L2QQZ.js";
14
+ import {
15
+ readOnlyLockOf,
16
+ readOnlyRefusal
17
+ } from "./chunk-GHBDYYPO.js";
18
+ import {
19
+ onThisComputer
20
+ } from "./chunk-SP5OMHOO.js";
21
+ import {
22
+ OPENAI_TRANSCRIBE_MODEL,
4
23
  VAD,
5
24
  isInstalled,
6
25
  modelPath,
7
26
  modelsDirectory,
8
27
  speechModel,
9
28
  vadPath
10
- } from "./chunk-OINDAHXC.js";
29
+ } from "./chunk-CZ6OO66B.js";
30
+ import {
31
+ typedCommand
32
+ } from "./chunk-MIG4RLDB.js";
11
33
  import {
12
34
  CliError
13
- } from "./chunk-K3K3WKDB.js";
35
+ } from "./chunk-4QNW4NK6.js";
14
36
  import {
15
37
  __name
16
38
  } from "./chunk-ZVVMGPBJ.js";
17
39
 
18
- // node_modules/.pnpm/@wirecat+cli-core@0.663.0_@wirecat+cli-base@0.100.0_commander@15.0.0_esbuild@0.28.2_typ_3651938dd4032f987ce713acb104c9b9/node_modules/@wirecat/cli-core/dist/speech/local.js
40
+ // node_modules/.pnpm/@wirecat+cli-core@0.667.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_0b2555be96e01c2163d7c05aae2e84c1/node_modules/@wirecat/cli-core/dist/speech/cloud.js
41
+ var addressOf = /* @__PURE__ */ __name((env) => {
42
+ const setting = readAiSetting(aiSettingPath(env));
43
+ return setting?.provider === "openai" && setting.base_url ? setting.base_url : OPENAI_URL;
44
+ }, "addressOf");
45
+ var cloudSpeech = /* @__PURE__ */ __name((deps) => {
46
+ if (deps.settings.configured.transcribeWith !== "openai")
47
+ return null;
48
+ const baseUrl = addressOf(deps.env);
49
+ const origin = aiOrigin({ provider: "openai", base_url: baseUrl });
50
+ const host = new URL(origin).host;
51
+ const official = origin === "https://api.openai.com";
52
+ const leavesComputer = !onThisComputer(baseUrl);
53
+ const lock = readOnlyLockOf(deps.app, deps.env);
54
+ if (lock && leavesComputer)
55
+ throw readOnlyRefusal(lock, `send audio to ${host}`);
56
+ if (leavesComputer && localOnly(deps.env))
57
+ throw localOnlyRefusal("the recordings", host);
58
+ const apiKey = aiKeys(deps.app, deps.env, deps.keyring).read(origin)?.key;
59
+ const setKey = typedCommand(deps.app.command, official ? "models ai set openai --model <model> --secret-stdin" : `models ai set openai --base-url ${baseUrl} --secret-stdin`);
60
+ if (!apiKey && leavesComputer)
61
+ throw new CliError("authentication_error", `no key for ${host} \u2014 \`${setKey}\`${official ? ", or OPENAI_API_KEY" : ""}`, {
62
+ reason: "transcription.no-key"
63
+ });
64
+ const configuredModel = deps.settings.configured.transcribeModel;
65
+ const model = typeof configuredModel === "string" && configuredModel.trim() ? configuredModel.trim() : OPENAI_TRANSCRIBE_MODEL;
66
+ let told = false;
67
+ return {
68
+ baseUrl,
69
+ leavesComputer,
70
+ recognition: { engine: official ? "openai" : host, model },
71
+ recognize: /* @__PURE__ */ __name(async (audio, options = {}) => {
72
+ if (!told) {
73
+ told = true;
74
+ deps.notify(leavesComputer ? `the recordings' audio leaves this computer: it goes to ${host} (${model}) to be transcribed` : `the recordings' audio goes to ${host} on this computer (${model}) to be transcribed`);
75
+ }
76
+ const { transcribeOpenAI: transcribeOpenAI2 } = await import("./openai-DD5I3DWC.js");
77
+ return transcribeOpenAI2(audio, {
78
+ apiKey: apiKey ?? "",
79
+ model,
80
+ baseUrl,
81
+ label: official ? "OpenAI" : host,
82
+ keyHint: setKey,
83
+ env: deps.env,
84
+ ...options.bundle ? { bundle: true } : {},
85
+ ...deps.vadModel ? { vadModel: deps.vadModel } : {},
86
+ ...deps.fetch ? { fetch: deps.fetch } : {},
87
+ ...deps.signal ? { signal: deps.signal } : {}
88
+ });
89
+ }, "recognize")
90
+ };
91
+ }, "cloudSpeech");
92
+
93
+ // node_modules/.pnpm/@wirecat+cli-core@0.667.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_0b2555be96e01c2163d7c05aae2e84c1/node_modules/@wirecat/cli-core/dist/speech/local.js
19
94
  import { createHash } from "node:crypto";
20
95
  import { isAbsolute } from "node:path";
21
96
  import { setImmediate } from "node:timers/promises";
@@ -50,7 +125,7 @@ var recognizeLocalPieces = /* @__PURE__ */ __name(async (id, audio, options = {}
50
125
  const directory = options.directory ?? modelsDirectory(options.env);
51
126
  if (!isInstalled(model, directory))
52
127
  throw notInstalled(model.id);
53
- const { openRecognizer, toModelRate } = await import("./recognize-CFJ3CAEH.js");
128
+ const { openRecognizer, toModelRate } = await import("./recognize-2WYLT3PC.js");
54
129
  const engine = (options.open ?? openRecognizer)(model, modelPath(directory, model), vadPath(directory));
55
130
  try {
56
131
  if (!engine.pieces)
@@ -81,7 +156,7 @@ var openLocalSpeechRecognizer = /* @__PURE__ */ __name(async (id, input = {}) =>
81
156
  cancelled(options.signal);
82
157
  if (!isInstalled(model, directory))
83
158
  throw notInstalled(description.model);
84
- const { openRecognizer, toModelRate } = await import("./recognize-CFJ3CAEH.js");
159
+ const { openRecognizer, toModelRate } = await import("./recognize-2WYLT3PC.js");
85
160
  cancelled(options.signal);
86
161
  const engine = (options.open ?? openRecognizer)(model, modelPath(directory, model), vadPath(directory));
87
162
  let closing = false;
@@ -128,6 +203,7 @@ var openLocalSpeechRecognizer = /* @__PURE__ */ __name(async (id, input = {}) =>
128
203
  }, "openLocalSpeechRecognizer");
129
204
 
130
205
  export {
206
+ cloudSpeech,
131
207
  localSpeechRecognitionModel,
132
208
  recognizeLocalPieces,
133
209
  openLocalSpeechRecognizer
@@ -5,15 +5,15 @@ import {
5
5
  } from "./chunk-Y5E2WNWB.js";
6
6
  import {
7
7
  CliError
8
- } from "./chunk-K3K3WKDB.js";
8
+ } from "./chunk-4QNW4NK6.js";
9
9
  import {
10
10
  __name
11
11
  } from "./chunk-ZVVMGPBJ.js";
12
12
 
13
- // node_modules/.pnpm/@wirecat+cli-core@0.663.0_@wirecat+cli-base@0.100.0_commander@15.0.0_esbuild@0.28.2_typ_3651938dd4032f987ce713acb104c9b9/node_modules/@wirecat/cli-core/dist/speech/recognize.js
13
+ // node_modules/.pnpm/@wirecat+cli-core@0.667.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_0b2555be96e01c2163d7c05aae2e84c1/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.663.0_@wirecat+cli-base@0.100.0_commander@15.0.0_esbuild@0.28.2_typ_3651938dd4032f987ce713acb104c9b9/node_modules/@wirecat/cli-core/dist/speech/ogg-limit.js
16
+ // node_modules/.pnpm/@wirecat+cli-core@0.667.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_0b2555be96e01c2163d7c05aae2e84c1/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.663.0_@wirecat+cli-base@0.100.0_commander@15.0.0_esbuild@0.28.2_typ_3651938dd4032f987ce713acb104c9b9/node_modules/@wirecat/cli-core/dist/speech/recognize.js
73
+ // node_modules/.pnpm/@wirecat+cli-core@0.667.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_0b2555be96e01c2163d7c05aae2e84c1/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) => {
@@ -5,16 +5,16 @@ import {
5
5
  backoffMs,
6
6
  realSleep,
7
7
  wallClock
8
- } from "./chunk-CS62FET6.js";
8
+ } from "./chunk-QAGECFHL.js";
9
9
  import {
10
10
  CliError,
11
11
  isCliError
12
- } from "./chunk-K3K3WKDB.js";
12
+ } from "./chunk-4QNW4NK6.js";
13
13
  import {
14
14
  __name
15
15
  } from "./chunk-ZVVMGPBJ.js";
16
16
 
17
- // node_modules/.pnpm/@wirecat+cli-base@0.100.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.102.1_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
18
18
  var LABEL = "[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?";
19
19
  var HOST_PATTERN = new RegExp(`^(?:${LABEL}(?:\\.${LABEL})*|\\*\\.${LABEL}(?:\\.${LABEL})+)$`);
20
20
  var hostProblems = /* @__PURE__ */ __name((hosts) => [
@@ -26,7 +26,7 @@ var hostCovered = /* @__PURE__ */ __name((hostname, hosts) => {
26
26
  return hosts.some((host) => host.startsWith("*.") ? name.endsWith(host.slice(1)) : name === host);
27
27
  }, "hostCovered");
28
28
 
29
- // node_modules/.pnpm/@wirecat+cli-base@0.100.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.102.1_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
30
30
  var HOST_FETCH_TIMEOUT_MS = 3e4;
31
31
  var REDIRECTS = 5;
32
32
  var REDIRECT_STATUSES = /* @__PURE__ */ new Set([301, 302, 303, 307, 308]);
@@ -114,7 +114,7 @@ var hostFetch = /* @__PURE__ */ __name((options) => {
114
114
  };
115
115
  }, "hostFetch");
116
116
 
117
- // node_modules/.pnpm/@wirecat+cli-base@0.100.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
117
+ // node_modules/.pnpm/@wirecat+cli-base@0.102.1_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
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
119
  var checked2 = /* @__PURE__ */ __name((signal) => {
120
120
  if (signal?.aborted)
@@ -199,7 +199,7 @@ var readJsonResponse = /* @__PURE__ */ __name(async (response, options) => {
199
199
  }
200
200
  }, "readJsonResponse");
201
201
 
202
- // node_modules/.pnpm/@wirecat+cli-base@0.100.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
202
+ // node_modules/.pnpm/@wirecat+cli-base@0.102.1_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
203
203
  var parseRetryAfter = /* @__PURE__ */ __name((header, now) => {
204
204
  if (!header)
205
205
  return void 0;
@@ -0,0 +1,31 @@
1
+ import { createRequire as __bundleRequire } from "node:module";
2
+ const require = __bundleRequire(import.meta.url);
3
+ import {
4
+ CliError
5
+ } from "./chunk-4QNW4NK6.js";
6
+ import {
7
+ singleLine
8
+ } from "./chunk-KYKW2W6X.js";
9
+ import {
10
+ __name
11
+ } from "./chunk-ZVVMGPBJ.js";
12
+
13
+ // node_modules/.pnpm/@wirecat+cli-core@0.667.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_0b2555be96e01c2163d7c05aae2e84c1/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
+ };
@@ -9,15 +9,15 @@ import {
9
9
  optional,
10
10
  pipe,
11
11
  safeParse
12
- } from "./chunk-3D5PETD2.js";
12
+ } from "./chunk-FS5HPXQN.js";
13
13
  import {
14
14
  CliError
15
- } from "./chunk-K3K3WKDB.js";
15
+ } from "./chunk-4QNW4NK6.js";
16
16
  import {
17
17
  __name
18
18
  } from "./chunk-ZVVMGPBJ.js";
19
19
 
20
- // node_modules/.pnpm/@wirecat+cli-core@0.663.0_@wirecat+cli-base@0.100.0_commander@15.0.0_esbuild@0.28.2_typ_3651938dd4032f987ce713acb104c9b9/node_modules/@wirecat/cli-core/dist/models/options.js
20
+ // node_modules/.pnpm/@wirecat+cli-core@0.667.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_0b2555be96e01c2163d7c05aae2e84c1/node_modules/@wirecat/cli-core/dist/models/options.js
21
21
  var checkedOptions = /* @__PURE__ */ __name((provider, schema, options) => {
22
22
  const parsed = safeParse(schema, options);
23
23
  if (!parsed.success) {
@@ -27,7 +27,7 @@ var checkedOptions = /* @__PURE__ */ __name((provider, schema, options) => {
27
27
  }, "checkedOptions");
28
28
  var range = /* @__PURE__ */ __name((min, max) => optional(pipe(number(), finite(), minValue(min), maxValue(max))), "range");
29
29
 
30
- // node_modules/.pnpm/@wirecat+cli-core@0.663.0_@wirecat+cli-base@0.100.0_commander@15.0.0_esbuild@0.28.2_typ_3651938dd4032f987ce713acb104c9b9/node_modules/@wirecat/cli-core/dist/models/types.js
30
+ // node_modules/.pnpm/@wirecat+cli-core@0.667.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_0b2555be96e01c2163d7c05aae2e84c1/node_modules/@wirecat/cli-core/dist/models/types.js
31
31
  var MAX_MODEL_IMAGE_BYTES = 4 * 1024 * 1024;
32
32
  var validateImages = /* @__PURE__ */ __name((images) => {
33
33
  if (images === void 0)
@@ -2,12 +2,12 @@ import { createRequire as __bundleRequire } from "node:module";
2
2
  const require = __bundleRequire(import.meta.url);
3
3
  import {
4
4
  singleLine
5
- } from "./chunk-EPPE6ZTS.js";
5
+ } from "./chunk-KYKW2W6X.js";
6
6
  import {
7
7
  __name
8
8
  } from "./chunk-ZVVMGPBJ.js";
9
9
 
10
- // node_modules/.pnpm/@wirecat+cli-base@0.100.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/wcat/names.js
10
+ // node_modules/.pnpm/@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/wcat/names.js
11
11
  var FIRST_PARTY_TOOLS = [
12
12
  { name: "tg", package: "@wirecat/tg-cli" },
13
13
  { name: "max", package: "@wirecat/max-cli" },
@@ -31,7 +31,7 @@ var DESCRIBE_FLAG = "--wcat-describe";
31
31
  var DESCRIBE_MAX_BYTES = 64 * 1024;
32
32
  var DISPATCH_FLAG = "--wcat-dispatch";
33
33
 
34
- // node_modules/.pnpm/@wirecat+cli-base@0.100.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/wcat/describe.js
34
+ // node_modules/.pnpm/@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/wcat/describe.js
35
35
  var DESCRIBE_FORMAT = 1;
36
36
  var DESCRIBE_MANIFEST_FORMAT = 2;
37
37
  var describeAnswer = /* @__PURE__ */ __name((tool, manifest) => {
@@ -74,7 +74,7 @@ var parseDescribe = /* @__PURE__ */ __name((text) => {
74
74
  };
75
75
  }, "parseDescribe");
76
76
 
77
- // node_modules/.pnpm/@wirecat+cli-base@0.100.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/wcat/shim.js
77
+ // node_modules/.pnpm/@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/wcat/shim.js
78
78
  import { lstatSync, readFileSync, renameSync, rmSync, statSync, writeFileSync } from "node:fs";
79
79
  import { join } from "node:path";
80
80
  var SHIM_FORMAT = 2;
@@ -4,7 +4,7 @@ import {
4
4
  __name
5
5
  } from "./chunk-ZVVMGPBJ.js";
6
6
 
7
- // node_modules/.pnpm/@wirecat+cli-base@0.100.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/executable.js
7
+ // node_modules/.pnpm/@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/executable.js
8
8
  import { existsSync } from "node:fs";
9
9
  import { win32 } from "node:path";
10
10
  var variable = /* @__PURE__ */ __name((env, name) => Object.entries(env).find(([key]) => key.toUpperCase() === name)?.[1], "variable");