@wirecat/notion-cli 0.5.0 → 0.7.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 (241) hide show
  1. package/CHANGELOG.md +47 -0
  2. package/README.md +5 -0
  3. package/contracts/wirecat.json +55 -2
  4. package/dist/bin/notion.js +2 -2
  5. package/dist/bundle/agent-AILW4JPO.js +42 -0
  6. package/dist/bundle/{all-profiles-V37KCXH3.js → all-profiles-CKOACXTW.js} +64 -21
  7. package/dist/bundle/{anthropic-Q4S3BYXD.js → anthropic-DWBBVTU3.js} +6 -6
  8. package/dist/bundle/{app-server-43SR3ACI.js → app-server-BHFYNCDE.js} +86 -65
  9. package/dist/bundle/{bun-M3J2QTR3.js → bun-ICK2XT7J.js} +2 -2
  10. package/dist/bundle/{bun-sqlite-EJ3W2PSV.js → bun-sqlite-LU5V5Y4A.js} +7 -7
  11. package/dist/bundle/{chunk-KHWOLBHQ.js → chunk-2OZVCNU5.js} +2 -2
  12. package/dist/bundle/{chunk-O5YB7FQD.js → chunk-2RNJ2JP3.js} +4 -4
  13. package/dist/bundle/{chunk-TP7GDWVF.js → chunk-364ET7LV.js} +1 -1
  14. package/dist/bundle/{chunk-TDNURSU6.js → chunk-3AKMIKND.js} +19 -19
  15. package/dist/bundle/{chunk-O3DYRCIT.js → chunk-3DGHBXH2.js} +1 -1
  16. package/dist/bundle/chunk-3KOJNZH3.js +80 -0
  17. package/dist/bundle/{chunk-DSP36YHQ.js → chunk-3T3OAYL4.js} +2 -2
  18. package/dist/bundle/{chunk-W7HM2VGO.js → chunk-3YXYA6HB.js} +1 -1
  19. package/dist/bundle/chunk-3ZSUVFR7.js +398 -0
  20. package/dist/bundle/{chunk-GCZ6MAEN.js → chunk-46JBCXLI.js} +43 -64
  21. package/dist/bundle/{chunk-DB2XKHI4.js → chunk-4FHKSSXQ.js} +2 -2
  22. package/dist/bundle/chunk-4HP6KGBI.js +32 -0
  23. package/dist/bundle/chunk-4ZAQMDLD.js +1308 -0
  24. package/dist/bundle/chunk-4ZTB7LS3.js +87 -0
  25. package/dist/bundle/{chunk-BNEE35WD.js → chunk-5NFIUY2P.js} +4 -4
  26. package/dist/bundle/{chunk-E5WLE7BM.js → chunk-63SW4UXG.js} +3 -4
  27. package/dist/bundle/{chunk-NHHJHXMQ.js → chunk-64IK7JFO.js} +2 -2
  28. package/dist/bundle/{chunk-HZRQLAHO.js → chunk-6MQSBWWF.js} +1 -1
  29. package/dist/bundle/{chunk-2FJNMADN.js → chunk-6UZ5D2WP.js} +10 -10
  30. package/dist/bundle/chunk-6VPC5Z56.js +2145 -0
  31. package/dist/bundle/chunk-7COTHS6G.js +388 -0
  32. package/dist/bundle/{chunk-TOSCB4SO.js → chunk-A3RJ6FD5.js} +29 -10
  33. package/dist/bundle/chunk-ADCAWRRX.js +2366 -0
  34. package/dist/bundle/{chunk-PPHBRESD.js → chunk-ALAPDLCP.js} +2 -2
  35. package/dist/bundle/{chunk-ONZVPE24.js → chunk-B6DJQBZI.js} +6 -6
  36. package/dist/bundle/{chunk-N2XADGL4.js → chunk-BFCRGLOF.js} +4 -4
  37. package/dist/bundle/{chunk-5P5TXU2K.js → chunk-BFHPT67P.js} +9581 -10764
  38. package/dist/bundle/{chunk-NA6QLHBZ.js → chunk-BQ6CXCLP.js} +10 -8
  39. package/dist/bundle/{chunk-JCKWQGCD.js → chunk-BXXHUO7Y.js} +110 -862
  40. package/dist/bundle/chunk-DCSPCOPB.js +221 -0
  41. package/dist/bundle/chunk-DQSOYH6N.js +20 -0
  42. package/dist/bundle/chunk-ECYOTDJM.js +14 -0
  43. package/dist/bundle/chunk-EMIJVLOA.js +30 -0
  44. package/dist/bundle/{chunk-DFCHHR5M.js → chunk-EUF5JNPG.js} +1 -1
  45. package/dist/bundle/{chunk-RIGE67FR.js → chunk-EWXMIKZN.js} +43 -33
  46. package/dist/bundle/chunk-F4BX7TH2.js +15 -0
  47. package/dist/bundle/{chunk-QYXWRKNA.js → chunk-FHYV4VWY.js} +16 -9
  48. package/dist/bundle/{chunk-WE4UFASG.js → chunk-FNESLLZS.js} +29 -1
  49. package/dist/bundle/chunk-FO3XY2Y2.js +108 -0
  50. package/dist/bundle/chunk-HJDQTM3T.js +353 -0
  51. package/dist/bundle/chunk-HOO53OYK.js +561 -0
  52. package/dist/bundle/{chunk-KHZ2RGXI.js → chunk-HSVKU4OJ.js} +153 -572
  53. package/dist/bundle/{chunk-CDK5E45T.js → chunk-IEY7KS6Q.js} +2 -100
  54. package/dist/bundle/{chunk-RJMQGG3P.js → chunk-ITW26OBI.js} +65 -49
  55. package/dist/bundle/{chunk-FBZI4Z3Z.js → chunk-ITWINZ6R.js} +13 -26
  56. package/dist/bundle/{chunk-J3NKZ6MO.js → chunk-IYZWHCZJ.js} +155 -435
  57. package/dist/bundle/{chunk-W53EJOFQ.js → chunk-J3DZVB67.js} +1 -1
  58. package/dist/bundle/{chunk-FKA7DOCK.js → chunk-JEZJFQQW.js} +1 -1
  59. package/dist/bundle/chunk-JPGN473W.js +50 -0
  60. package/dist/bundle/{chunk-NTG657MI.js → chunk-JVRBW5LH.js} +7 -64
  61. package/dist/bundle/chunk-KBY42GKW.js +785 -0
  62. package/dist/bundle/{chunk-DO7BLXO3.js → chunk-KWBLDSRV.js} +16 -3
  63. package/dist/bundle/chunk-L7P3LUDQ.js +286 -0
  64. package/dist/bundle/{chunk-PWRRDDMZ.js → chunk-LBRTLZHI.js} +249 -555
  65. package/dist/bundle/{chunk-B3FSLAIU.js → chunk-LEPPRULN.js} +20 -6
  66. package/dist/bundle/{chunk-WPP76PSX.js → chunk-LVAFTQ45.js} +32 -24
  67. package/dist/bundle/{chunk-PAW6RRCW.js → chunk-MB4HXDBT.js} +8 -210
  68. package/dist/bundle/chunk-MEYYH47C.js +25 -0
  69. package/dist/bundle/{chunk-UZSBGECU.js → chunk-N3NJPHZB.js} +1 -65
  70. package/dist/bundle/{chunk-BWLBSQSU.js → chunk-NCCRLAAI.js} +4 -4
  71. package/dist/bundle/chunk-NMQRSEZM.js +37 -0
  72. package/dist/bundle/{chunk-H3E2PZ5Y.js → chunk-NV7NNL5T.js} +7 -7
  73. package/dist/bundle/chunk-OALFRUMI.js +67 -0
  74. package/dist/bundle/{chunk-CWXOXIWS.js → chunk-OCGNOJYD.js} +1 -1
  75. package/dist/bundle/chunk-OFMCU3BH.js +72 -0
  76. package/dist/bundle/{chunk-MGUEZYFA.js → chunk-OLAGFJDM.js} +13 -2143
  77. package/dist/bundle/{chunk-E2AFUJDR.js → chunk-OP2BH55P.js} +3 -3
  78. package/dist/bundle/{chunk-P5BHKKBI.js → chunk-OS4WPXPZ.js} +4 -4
  79. package/dist/bundle/{chunk-XUPN2EHR.js → chunk-OW5HW3TD.js} +23 -7
  80. package/dist/bundle/{chunk-ECC2UX7X.js → chunk-PDVXG3T3.js} +6 -6
  81. package/dist/bundle/{chunk-5D4AEUVA.js → chunk-PL5P7UKW.js} +434 -1
  82. package/dist/bundle/{chunk-G2MJYXZG.js → chunk-PSMRUOII.js} +4 -4
  83. package/dist/bundle/{chunk-DBEQI5YM.js → chunk-QK52ARAU.js} +3 -3
  84. package/dist/bundle/{chunk-QWYMXFKM.js → chunk-QMNEDK7Z.js} +3 -3
  85. package/dist/bundle/chunk-R4JV3VLU.js +714 -0
  86. package/dist/bundle/{chunk-C32AKHTY.js → chunk-REOBWSGV.js} +35 -12
  87. package/dist/bundle/{chunk-X2M6NIQG.js → chunk-RNVYNPXT.js} +1 -1
  88. package/dist/bundle/{chunk-HHVFIXDO.js → chunk-RXGX2CZX.js} +399 -399
  89. package/dist/bundle/{chunk-W5JZMXGW.js → chunk-S35UJBFZ.js} +75 -75
  90. package/dist/bundle/{chunk-MVA5HVKL.js → chunk-S4UUN6LD.js} +18 -0
  91. package/dist/bundle/chunk-S5P7THM5.js +72 -0
  92. package/dist/bundle/{chunk-NE43YXKL.js → chunk-SRVTGI3M.js} +3 -3
  93. package/dist/bundle/chunk-TRYYWV7J.js +291 -0
  94. package/dist/bundle/chunk-TWY543BS.js +39 -0
  95. package/dist/bundle/{chunk-KFVDL2QS.js → chunk-UC7JLE6J.js} +1 -89
  96. package/dist/bundle/{chunk-3RL2MIUF.js → chunk-UO4O6WQ4.js} +8 -8
  97. package/dist/bundle/chunk-UPL474OW.js +94 -0
  98. package/dist/bundle/chunk-UQVUXG7H.js +594 -0
  99. package/dist/bundle/chunk-UYEDQGMI.js +340 -0
  100. package/dist/bundle/chunk-VNWF4I7E.js +34 -0
  101. package/dist/bundle/{chunk-FPUGMDJV.js → chunk-VRBEYOJL.js} +1 -1
  102. package/dist/bundle/{chunk-BBSFQ3PU.js → chunk-VXKD533R.js} +1646 -1337
  103. package/dist/bundle/{chunk-ECEZOLOD.js → chunk-VYZ2J7DT.js} +4 -4
  104. package/dist/bundle/{chunk-TD2JZ25O.js → chunk-WJFQMOVM.js} +113 -80
  105. package/dist/bundle/{chunk-MNRMKWCN.js → chunk-WUNEJRLJ.js} +6 -6
  106. package/dist/bundle/chunk-WVN2KTNS.js +52 -0
  107. package/dist/bundle/{chunk-GTY6N5KZ.js → chunk-X5LUHN62.js} +2 -2
  108. package/dist/bundle/{chunk-LBYGJKXW.js → chunk-X737FHZP.js} +4 -4
  109. package/dist/bundle/chunk-YHWFF6DN.js +39 -0
  110. package/dist/bundle/chunk-YSF5JBRA.js +36 -0
  111. package/dist/bundle/{chunk-QIG55MZH.js → chunk-ZGUUP2T3.js} +12 -12
  112. package/dist/bundle/{chunk-AT5I34AN.js → chunk-ZMKAI3F3.js} +3 -3
  113. package/dist/bundle/command-contract-C2CF4QAH.js +41 -0
  114. package/dist/bundle/{command-server-entry-LJ627ZUA.js → command-server-entry-F3B2KSPO.js} +30 -27
  115. package/dist/bundle/{decode-PX2LZ5Y2.js → decode-FDHFF7GC.js} +6 -6
  116. package/dist/bundle/{definitions-M3U4UYHN.js → definitions-MB65223J.js} +72 -18
  117. package/dist/bundle/{dispatch-KOISQ5QJ.js → dispatch-IXKG5Z5Y.js} +8 -8
  118. package/dist/bundle/dist-PAKDDIBT.js +191 -0
  119. package/dist/bundle/{echarts-FVTUDXDU.js → echarts-PGJPVPA4.js} +2 -2
  120. package/dist/bundle/{embed-CCSDK43I.js → embed-U6X7CNNK.js} +7 -7
  121. package/dist/bundle/{embedder-VHI4DHB7.js → embedder-3ROL6ROQ.js} +10 -10
  122. package/dist/bundle/{failure-FZ6VYKEQ.js → failure-IYMRXM2X.js} +3 -3
  123. package/dist/bundle/first-run-PNVNHGR7.js +29 -0
  124. package/dist/bundle/first-screen-DEDD64YH.js +41 -0
  125. package/dist/bundle/hast-util-from-html-X2DCPS3T.js +10531 -0
  126. package/dist/bundle/hast-util-to-html-IIFHILP5.js +998 -0
  127. package/dist/bundle/hast-util-to-mdast-3CSMIWK2.js +2272 -0
  128. package/dist/bundle/{instructions-HET7BCYK.js → instructions-MJQWRI2D.js} +1 -1
  129. package/dist/bundle/{mcp-RGNRW77S.js → mcp-JNHOSK4L.js} +2 -2
  130. package/dist/bundle/{mdast-util-from-markdown-R66F4HZA.js → mdast-util-from-markdown-XCR5KW5S.js} +138 -195
  131. package/dist/bundle/{mdast-util-gfm-LN2ELINH.js → mdast-util-gfm-JO7PHUIB.js} +28 -357
  132. package/dist/bundle/mdast-util-to-hast-AYJV7KAE.js +879 -0
  133. package/dist/bundle/mdast-util-to-markdown-DOXGHRI7.js +1854 -0
  134. package/dist/bundle/meeting-combined-HEC25QPY.js +25 -0
  135. package/dist/bundle/meeting-model-R7QPDNZZ.js +27 -0
  136. package/dist/bundle/{meeting-semantic-UD26T37N.js → meeting-semantic-7WPLMBNT.js} +7 -7
  137. package/dist/bundle/{micromark-extension-gfm-5X7YT43T.js → micromark-extension-gfm-PQ7DWZM7.js} +12 -78
  138. package/dist/bundle/{node-CXZIFHZC.js → node-3UXNV3CD.js} +2 -2
  139. package/dist/bundle/{node-sqlite-ME7KMORI.js → node-sqlite-ULWDWM3I.js} +8 -8
  140. package/dist/bundle/notes-search-7PE3E3C7.js +64 -0
  141. package/dist/bundle/notion.js +14 -14
  142. package/dist/bundle/oauth-LNUZMA72.js +20 -0
  143. package/dist/bundle/{open-HA6D3SXR.js → open-HGHC35M4.js} +6 -6
  144. package/dist/bundle/{openai-H5AJPZBX.js → openai-ISSP57MV.js} +21 -18
  145. package/dist/bundle/{process-5RUXWGYS.js → process-PB2WCOR2.js} +1 -1
  146. package/dist/bundle/{program-F3NBTZ7J.js → program-GASBJRMG.js} +7574 -7047
  147. package/dist/bundle/{prompt-6XSUOLHK.js → prompt-3VGQVX2B.js} +6 -6
  148. package/dist/bundle/{recognize-2Y7AUVGG.js → recognize-7Q2P3NME.js} +5 -5
  149. package/dist/bundle/{remote-KCABPXQ3.js → remote-BBAWKVIT.js} +12 -11
  150. package/dist/bundle/{rerank-BTN7LUVA.js → rerank-H4PUS4HV.js} +8 -8
  151. package/dist/bundle/{schemas-VVLTLMXS.js → schemas-TTVUADHT.js} +39 -60
  152. package/dist/bundle/{serve-CYEMVRFC.js → serve-FZNSKY7R.js} +11 -11
  153. package/dist/bundle/{server-WFIICGMI.js → server-BRRNDW6L.js} +78 -56
  154. package/dist/bundle/server-CQJ4LKAZ.js +90 -0
  155. package/dist/bundle/{services-L4W6ZWDG.js → services-PEU557KZ.js} +103 -88
  156. package/dist/bundle/{sqlite-runtime-IKMYLRQC.js → sqlite-runtime-4IZJ4YUM.js} +7 -7
  157. package/dist/bundle/{state-LMUP636P.js → state-MX3JVT5Q.js} +7 -7
  158. package/dist/bundle/{store-W2JC2JP4.js → store-JUT34REM.js} +24 -20
  159. package/dist/bundle/{store-A2QZFBOX.js → store-PP4BPADZ.js} +30 -18
  160. package/dist/bundle/store-maintenance-command-GRFTJBSB.js +77 -0
  161. package/dist/bundle/surface-FPWES3NY.js +76 -0
  162. package/dist/commands/account.d.ts +3 -0
  163. package/dist/commands/account.d.ts.map +1 -0
  164. package/dist/commands/account.js +22 -0
  165. package/dist/commands/account.js.map +1 -0
  166. package/dist/commands/api.d.ts +7 -2
  167. package/dist/commands/api.d.ts.map +1 -1
  168. package/dist/commands/api.js +19 -141
  169. package/dist/commands/api.js.map +1 -1
  170. package/dist/commands/library.d.ts.map +1 -1
  171. package/dist/commands/library.js +14 -6
  172. package/dist/commands/library.js.map +1 -1
  173. package/dist/config.d.ts +11 -13
  174. package/dist/config.d.ts.map +1 -1
  175. package/dist/config.js +63 -54
  176. package/dist/config.js.map +1 -1
  177. package/dist/context.d.ts +11 -3
  178. package/dist/context.d.ts.map +1 -1
  179. package/dist/context.js +20 -7
  180. package/dist/context.js.map +1 -1
  181. package/dist/generated/definitions.d.ts.map +1 -1
  182. package/dist/generated/definitions.js +72 -18
  183. package/dist/generated/definitions.js.map +1 -1
  184. package/dist/generated/manifest.d.ts.map +1 -1
  185. package/dist/generated/manifest.js +49 -0
  186. package/dist/generated/manifest.js.map +1 -1
  187. package/dist/generated/schemas.d.ts.map +1 -1
  188. package/dist/generated/schemas.js +32 -32
  189. package/dist/generated/schemas.js.map +1 -1
  190. package/dist/generated/types.d.ts +125 -25
  191. package/dist/generated/types.d.ts.map +1 -1
  192. package/dist/generated/wirecat-config.d.ts +13 -0
  193. package/dist/generated/wirecat-config.d.ts.map +1 -0
  194. package/dist/generated/wirecat-config.js +82 -0
  195. package/dist/generated/wirecat-config.js.map +1 -0
  196. package/dist/library.d.ts +3 -0
  197. package/dist/library.d.ts.map +1 -1
  198. package/dist/library.js +11 -1
  199. package/dist/library.js.map +1 -1
  200. package/dist/notion/client.d.ts +2 -6
  201. package/dist/notion/client.d.ts.map +1 -1
  202. package/dist/notion/client.js +7 -8
  203. package/dist/notion/client.js.map +1 -1
  204. package/dist/notion/errors.d.ts +5 -0
  205. package/dist/notion/errors.d.ts.map +1 -1
  206. package/dist/notion/errors.js +21 -1
  207. package/dist/notion/errors.js.map +1 -1
  208. package/dist/notion/port.d.ts +10 -0
  209. package/dist/notion/port.d.ts.map +1 -1
  210. package/dist/notion/port.js +19 -0
  211. package/dist/notion/port.js.map +1 -1
  212. package/dist/program.d.ts.map +1 -1
  213. package/dist/program.js +2 -0
  214. package/dist/program.js.map +1 -1
  215. package/dist/sync/files.d.ts +12 -0
  216. package/dist/sync/files.d.ts.map +1 -1
  217. package/dist/sync/files.js.map +1 -1
  218. package/dist/sync/from-config.d.ts +13 -0
  219. package/dist/sync/from-config.d.ts.map +1 -0
  220. package/dist/sync/from-config.js +32 -0
  221. package/dist/sync/from-config.js.map +1 -0
  222. package/dist/sync/source.d.ts +2 -1
  223. package/dist/sync/source.d.ts.map +1 -1
  224. package/dist/sync/source.js +48 -48
  225. package/dist/sync/source.js.map +1 -1
  226. package/dist/sync/users.d.ts +4 -1
  227. package/dist/sync/users.d.ts.map +1 -1
  228. package/dist/sync/users.js +3 -1
  229. package/dist/sync/users.js.map +1 -1
  230. package/dist/version.d.ts +1 -1
  231. package/dist/version.js +1 -1
  232. package/package.json +8 -8
  233. package/dist/bundle/chunk-6EOZTUHT.js +0 -726
  234. package/dist/bundle/command-contract-TVRFW2IX.js +0 -38
  235. package/dist/bundle/first-run-7JKE5AHN.js +0 -29
  236. package/dist/bundle/first-screen-ZROHOEYJ.js +0 -38
  237. package/dist/bundle/meeting-combined-SSTOJUIJ.js +0 -24
  238. package/dist/bundle/meeting-model-K7TPS4S5.js +0 -26
  239. package/dist/bundle/oauth-XBTROXHB.js +0 -20
  240. package/dist/bundle/server-UC2FNNXX.js +0 -72
  241. package/dist/bundle/store-maintenance-command-LRGQJPSZ.js +0 -63
@@ -0,0 +1,398 @@
1
+ import { createRequire as __bundleRequire } from "node:module";
2
+ const require = __bundleRequire(import.meta.url);
3
+ import {
4
+ endpoint
5
+ } from "./chunk-OP2BH55P.js";
6
+ import {
7
+ filesPresent,
8
+ sharedModelsDirectory
9
+ } from "./chunk-5NFIUY2P.js";
10
+ import {
11
+ check,
12
+ getDotPath,
13
+ maxLength,
14
+ minLength,
15
+ optional,
16
+ picklist,
17
+ pipe,
18
+ record,
19
+ regex,
20
+ safeParse,
21
+ strictObject,
22
+ string,
23
+ trim
24
+ } from "./chunk-S4UUN6LD.js";
25
+ import {
26
+ CliError,
27
+ isCliError
28
+ } from "./chunk-4FHKSSXQ.js";
29
+ import {
30
+ __name
31
+ } from "./chunk-ZVVMGPBJ.js";
32
+
33
+ // node_modules/.pnpm/@wirecat+cli-core@0.718.0_@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typ_cfff6f86942c54bd7564e982a7834a83/node_modules/@wirecat/cli-core/dist/ports/app.js
34
+ import { readFileSync } from "node:fs";
35
+ var envName = /* @__PURE__ */ __name((app, name) => `${app.envPrefix}_${name}`, "envName");
36
+ var locking = /* @__PURE__ */ __name((value) => value !== void 0 && value.trim() !== "" && value !== "0", "locking");
37
+ var ancestries = /* @__PURE__ */ new Map();
38
+ var readable = /* @__PURE__ */ __name((read, path) => {
39
+ try {
40
+ return read(path);
41
+ } catch (error) {
42
+ if (error.code === "EACCES")
43
+ return void 0;
44
+ throw error;
45
+ }
46
+ }, "readable");
47
+ var ancestorEnvironments = /* @__PURE__ */ __name(({ read = /* @__PURE__ */ __name((path) => readFileSync(path, "utf8"), "read"), from = process.ppid, uid = process.getuid?.() ?? -1, cache = ancestries } = {}) => {
48
+ if (process.platform !== "linux")
49
+ return [];
50
+ const key = `${from}:${uid}`;
51
+ const known = cache.get(key);
52
+ if (known !== void 0)
53
+ return known;
54
+ let found = [];
55
+ try {
56
+ for (let pid = from, depth = 0; pid >= 1 && depth < 64; depth++) {
57
+ const status = read(`/proc/${pid}/status`);
58
+ const field = /* @__PURE__ */ __name((name) => new RegExp(`^${name}:\\s*(\\d+)`, "m").exec(status)?.[1], "field");
59
+ if (Number(field("Uid")) !== uid)
60
+ break;
61
+ const environ = readable(read, `/proc/${pid}/environ`);
62
+ if (environ === void 0)
63
+ break;
64
+ found.push(environ.split("\0"));
65
+ pid = Number(field("PPid"));
66
+ }
67
+ } catch {
68
+ found = null;
69
+ }
70
+ cache.set(key, found);
71
+ return found;
72
+ }, "ancestorEnvironments");
73
+ var valuesOf = /* @__PURE__ */ __name((environments, name) => environments.flatMap((environ) => environ.filter((entry) => entry.startsWith(`${name}=`)).map((entry) => entry.slice(name.length + 1))), "valuesOf");
74
+ var lockedByAncestor = /* @__PURE__ */ __name((name, ancestry = {}) => {
75
+ const environments = ancestorEnvironments(ancestry);
76
+ return environments === null || valuesOf(environments, name).some(locking);
77
+ }, "lockedByAncestor");
78
+ var ancestorValue = /* @__PURE__ */ __name((name, env, ancestry = {}) => valuesOf(ancestorEnvironments(ancestry) ?? [], name).at(-1) ?? env[name], "ancestorValue");
79
+ var readOnlyLockOf = /* @__PURE__ */ __name((app, env) => {
80
+ const name = envName(app, "READ_ONLY");
81
+ return locking(env[name]) || lockedByAncestor(name) ? name : void 0;
82
+ }, "readOnlyLockOf");
83
+ var mailHolderVariable = /* @__PURE__ */ __name((app) => envName(app, "MAIL_HOLDER"), "mailHolderVariable");
84
+ var MESSENGER_CHANGE_REFUSAL = "send, react, change chats or change the account";
85
+ var readOnlyRefusal = /* @__PURE__ */ __name((lock, what) => new CliError("permission_error", `this process is read-only (${lock}) \u2014 it cannot ${what}`), "readOnlyRefusal");
86
+
87
+ // node_modules/.pnpm/@wirecat+cli-core@0.718.0_@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typ_cfff6f86942c54bd7564e982a7834a83/node_modules/@wirecat/cli-core/dist/background/budget.js
88
+ var DEADLINE_MARGIN_MS = 5e3;
89
+ var DEADLINE_MARGIN_SHARE = 0.15;
90
+ var DEFAULT_REQUEST_MS = 2e3;
91
+ var ANSWER_RESERVE_MS = 500;
92
+ var oneMoreFits = /* @__PURE__ */ __name((deadline, at, requestMs = DEFAULT_REQUEST_MS) => deadline !== void 0 && at + requestMs + ANSWER_RESERVE_MS < deadline.endsAt, "oneMoreFits");
93
+ var deadlineMargin = /* @__PURE__ */ __name((deadline) => Math.max(DEADLINE_MARGIN_MS, deadline.ms * DEADLINE_MARGIN_SHARE), "deadlineMargin");
94
+ var requestsFor = /* @__PURE__ */ __name((deadline, requestMs = DEFAULT_REQUEST_MS) => deadline === void 0 ? null : Math.max(1, Math.floor((deadline.ms - deadlineMargin(deadline)) / requestMs)), "requestsFor");
95
+ var runBudget = /* @__PURE__ */ __name(({ requests, deadline, requestMs, signal, now = Date.now } = {}) => {
96
+ const fits = requestsFor(deadline, requestMs);
97
+ const limit = fits === null ? requests ?? null : Math.min(fits, requests ?? fits);
98
+ const margin = deadline ? deadlineMargin(deadline) : 0;
99
+ let used = 0;
100
+ let granted = false;
101
+ let stopped2 = null;
102
+ let last;
103
+ let slowest = 0;
104
+ return {
105
+ take() {
106
+ if (stopped2)
107
+ return stopped2;
108
+ const at = now();
109
+ if (last !== void 0)
110
+ slowest = Math.max(slowest, at - last);
111
+ if (signal?.aborted)
112
+ stopped2 = "cancelled";
113
+ else if (limit !== null && used >= limit)
114
+ stopped2 = "requests";
115
+ else if (deadline && at + margin + slowest >= deadline.endsAt)
116
+ stopped2 = "deadline";
117
+ if (stopped2)
118
+ return stopped2;
119
+ used += 1;
120
+ last = at;
121
+ return null;
122
+ },
123
+ first() {
124
+ if (granted || used > 0 || stopped2 !== "deadline")
125
+ return false;
126
+ const at = now();
127
+ if (!oneMoreFits(deadline, at, Math.max(requestMs ?? DEFAULT_REQUEST_MS, slowest)))
128
+ return false;
129
+ granted = true;
130
+ used += 1;
131
+ last = at;
132
+ return true;
133
+ },
134
+ get used() {
135
+ return used;
136
+ },
137
+ limit,
138
+ get stopped() {
139
+ return stopped2;
140
+ }
141
+ };
142
+ }, "runBudget");
143
+
144
+ // node_modules/.pnpm/@wirecat+cli-core@0.718.0_@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typ_cfff6f86942c54bd7564e982a7834a83/node_modules/@wirecat/cli-core/dist/images/picture/models.js
145
+ import { join } from "node:path";
146
+ var clip = /* @__PURE__ */ __name((name) => `https://huggingface.co/Xenova/clip-vit-base-patch32/resolve/d15189d7028b43f1d3e65039190477f6af591c2a/${name}`, "clip");
147
+ var IMAGE_MODELS = [
148
+ {
149
+ id: "clip-b32",
150
+ title: "CLIP ViT-B/32, 8-bit",
151
+ languages: "English only: translate a query before searching",
152
+ licence: "MIT",
153
+ dims: 512,
154
+ key: "local:clip-b32:512",
155
+ maxTokens: 77,
156
+ vision: "onnx/vision_model_quantized.onnx",
157
+ text: "onnx/text_model_quantized.onnx",
158
+ files: [
159
+ {
160
+ name: "onnx/vision_model_quantized.onnx",
161
+ url: clip("onnx/vision_model_quantized.onnx"),
162
+ sha256: "583fd1110a514667812fee7d684952aaf82a99b959760c8d7dca7e0ab9839299",
163
+ bytes: 89117001
164
+ },
165
+ {
166
+ name: "onnx/text_model_quantized.onnx",
167
+ url: clip("onnx/text_model_quantized.onnx"),
168
+ sha256: "73baab855d406190da9faa498cfedf65f15cf309f4cc7385b7b032e6d08e5c3a",
169
+ bytes: 64504507
170
+ },
171
+ {
172
+ name: "tokenizer.json",
173
+ url: clip("tokenizer.json"),
174
+ sha256: "f7f3b7af117d467b58374797691a6438d3e6b9e9cef800dfd5dced7f697a90cd",
175
+ bytes: 2224119
176
+ },
177
+ {
178
+ name: "tokenizer_config.json",
179
+ url: clip("tokenizer_config.json"),
180
+ sha256: "60ba2912bc6344c94bc16bbdec27fa1209409167b6f2fdf3cfe9e65462ea3967",
181
+ bytes: 775
182
+ }
183
+ ]
184
+ }
185
+ ];
186
+ var DEFAULT_IMAGE_MODEL = "clip-b32";
187
+ var imageModel = /* @__PURE__ */ __name((id) => {
188
+ const found = IMAGE_MODELS.find((model) => model.id === id);
189
+ if (!found) {
190
+ throw new CliError("validation_error", `no image model ${id} \u2014 one of: ${IMAGE_MODELS.map((model) => model.id).join(", ")}`);
191
+ }
192
+ return found;
193
+ }, "imageModel");
194
+ var imageModelsDirectory = /* @__PURE__ */ __name((env = process.env) => sharedModelsDirectory("image", env), "imageModelsDirectory");
195
+ var placedImage = /* @__PURE__ */ __name((model, directory) => model.files.map((file) => [file, join(directory, model.id, file.name)]), "placedImage");
196
+ var isImageModelInstalled = /* @__PURE__ */ __name((model, directory) => filesPresent(placedImage(model, directory)), "isImageModelInstalled");
197
+
198
+ // node_modules/.pnpm/@wirecat+cli-core@0.718.0_@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typ_cfff6f86942c54bd7564e982a7834a83/node_modules/@wirecat/cli-core/dist/models/settings.js
199
+ var MODEL_FIELDS = ["provider", "model", "base_url"];
200
+ var modelSettingsShape = record(pipe(string(), regex(/^[a-z][a-z0-9-]*$/)), strictObject({
201
+ provider: optional(picklist(["off", "openai", "anthropic"])),
202
+ model: optional(pipe(string(), trim(), minLength(1), maxLength(200))),
203
+ base_url: optional(pipe(string(), check((value) => endpoint(value), "use an HTTP/S endpoint without credentials, query or fragment")))
204
+ }));
205
+ var resolveModelSettings = /* @__PURE__ */ __name((prefix, layers, env) => {
206
+ const configured = layers.map(([from, scope]) => [from, scope?.models ?? {}]);
207
+ const purposes = /* @__PURE__ */ new Set([
208
+ "default",
209
+ "analysis",
210
+ "replies",
211
+ ...configured.flatMap(([, models2]) => Object.keys(models2))
212
+ ]);
213
+ for (const name of Object.keys(env)) {
214
+ const match = new RegExp(`^${prefix}_MODELS_([A-Z][A-Z0-9_]*)_(PROVIDER|MODEL|BASE_URL)$`).exec(name);
215
+ if (match?.[1])
216
+ purposes.add(match[1].toLowerCase().replaceAll("_", "-"));
217
+ }
218
+ const models = {};
219
+ const sources = {};
220
+ for (const purpose of purposes) {
221
+ const resolved = {};
222
+ for (const field of MODEL_FIELDS) {
223
+ const variable = `${prefix}_MODELS_${purpose.replaceAll("-", "_").toUpperCase()}_${field.toUpperCase()}`;
224
+ const candidates = [
225
+ [variable, env[variable]?.trim() || void 0],
226
+ ...configured.map(([from, model]) => [
227
+ `${from}: models.${purpose}.${field}`,
228
+ model[purpose]?.[field]
229
+ ]),
230
+ ...purpose === "default" ? [] : [
231
+ [
232
+ `${prefix}_MODELS_DEFAULT_${field.toUpperCase()}`,
233
+ env[`${prefix}_MODELS_DEFAULT_${field.toUpperCase()}`]?.trim() || void 0
234
+ ],
235
+ ...configured.map(([from, model]) => [
236
+ `${from}: models.default.${field}`,
237
+ model.default?.[field]
238
+ ])
239
+ ]
240
+ ];
241
+ const selected = candidates.find(([, value]) => value !== void 0);
242
+ if (selected)
243
+ resolved[field] = selected[1];
244
+ sources[`models.${purpose}.${field}`] = selected?.[0] ?? "default";
245
+ }
246
+ if (Object.keys(resolved).length)
247
+ models[purpose] = resolved;
248
+ }
249
+ const checked = safeParse(modelSettingsShape, models);
250
+ if (!checked.success)
251
+ throw new CliError("configuration_error", `models.${getDotPath(checked.issues[0]) ?? "settings"} is invalid`);
252
+ return { models: checked.output, sources };
253
+ }, "resolveModelSettings");
254
+ var modelTarget = /* @__PURE__ */ __name((settings, purpose) => {
255
+ const configured = { ...settings.models?.default, ...settings.models?.[purpose] };
256
+ if (configured.provider === void 0 || configured.provider === "off")
257
+ return void 0;
258
+ if (!configured.model)
259
+ throw new CliError("configuration_error", `set models.${purpose}.model before calling its provider`);
260
+ return {
261
+ provider: configured.provider,
262
+ model: configured.model,
263
+ ...configured.base_url === void 0 ? {} : { baseUrl: configured.base_url }
264
+ };
265
+ }, "modelTarget");
266
+
267
+ // node_modules/.pnpm/@wirecat+cli-core@0.718.0_@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typ_cfff6f86942c54bd7564e982a7834a83/node_modules/@wirecat/cli-core/dist/sends/guarded.js
268
+ import { AsyncLocalStorage } from "node:async_hooks";
269
+ var sentIds = /* @__PURE__ */ __name((typed, message) => ({
270
+ messageId: message.id,
271
+ ...message.chatId && message.chatId !== typed ? { resultChatId: message.chatId } : {}
272
+ }), "sentIds");
273
+ var current = new AsyncLocalStorage();
274
+ var writesInFlight = new AsyncLocalStorage();
275
+ var parents = /* @__PURE__ */ new WeakMap();
276
+ var stopped = /* @__PURE__ */ new WeakMap();
277
+ var scopesFor = /* @__PURE__ */ __name((scope = writesInFlight.getStore()) => {
278
+ const result = [];
279
+ for (let at = scope; at; at = parents.get(at))
280
+ result.push(at);
281
+ return result;
282
+ }, "scopesFor");
283
+ var withWriteScope = /* @__PURE__ */ __name((scope, body) => {
284
+ const parent = writesInFlight.getStore();
285
+ if (parent && parent !== scope)
286
+ parents.set(scope, parent);
287
+ return writesInFlight.run(scope, body);
288
+ }, "withWriteScope");
289
+ var stopWrites = /* @__PURE__ */ __name((scope, reason) => {
290
+ stopped.set(scope, reason);
291
+ for (const write of scope)
292
+ write.cut();
293
+ }, "stopWrites");
294
+ var refuseStopped = /* @__PURE__ */ __name((scopes) => {
295
+ for (const scope of scopes)
296
+ if (stopped.has(scope))
297
+ throw stopped.get(scope);
298
+ }, "refuseStopped");
299
+ var currentOperation = /* @__PURE__ */ __name(() => current.getStore(), "currentOperation");
300
+ var guardedWrite = /* @__PURE__ */ __name(async (guard, attempt, act, settled = () => ({}), prepare) => {
301
+ const scopes = scopesFor();
302
+ refuseStopped(scopes);
303
+ try {
304
+ await guard.ask?.(attempt);
305
+ refuseStopped(scopes);
306
+ if (guard.reserve) {
307
+ guard.check(attempt, { reserve: false });
308
+ await guard.reserve(attempt);
309
+ } else
310
+ guard.check(attempt);
311
+ } catch (error) {
312
+ guard.record({ ...attempt, outcome: "refused", errorCode: codeOf(error) });
313
+ throw error;
314
+ }
315
+ try {
316
+ refuseStopped(scopes);
317
+ } catch (error) {
318
+ guard.record({ ...attempt, outcome: "failed", errorCode: codeOf(error) });
319
+ throw error;
320
+ }
321
+ let recorded = false;
322
+ const once = /* @__PURE__ */ __name((entry) => {
323
+ if (recorded)
324
+ return;
325
+ recorded = true;
326
+ guard.record(entry);
327
+ }, "once");
328
+ let cancelled = false;
329
+ const flight = {
330
+ operationId: attempt.operationId,
331
+ preparing: prepare !== void 0,
332
+ cut: /* @__PURE__ */ __name(() => {
333
+ cancelled = true;
334
+ once({
335
+ ...attempt,
336
+ outcome: flight.preparing ? "failed" : "outcome_unknown",
337
+ errorCode: flight.preparing ? "timeout" : "outcome_unknown"
338
+ });
339
+ }, "cut")
340
+ };
341
+ for (const scope of scopes)
342
+ scope.add(flight);
343
+ try {
344
+ if (prepare !== void 0)
345
+ await prepare();
346
+ if (cancelled)
347
+ throw new CliError("timeout", "the command ended before sending; nothing was sent", { sent: false });
348
+ flight.preparing = false;
349
+ const done = await current.run(attempt.operationId, act);
350
+ if (cancelled)
351
+ throw new CliError("outcome_unknown", "the command ended with a write in flight; check its result before continuing", { operation_id: attempt.operationId });
352
+ once({ ...attempt, ...settled(done), outcome: "sent" });
353
+ return done;
354
+ } catch (error) {
355
+ const code = codeOf(error);
356
+ once({ ...attempt, outcome: code === "outcome_unknown" ? "outcome_unknown" : "failed", errorCode: code });
357
+ if (code === "outcome_unknown" && error instanceof Error)
358
+ throw new CliError("outcome_unknown", error.message, {
359
+ ...error.details,
360
+ operation_id: attempt.operationId,
361
+ retryable: false
362
+ });
363
+ if (flight.preparing && isCliError(error) && error.details.sent === void 0)
364
+ throw new CliError(error.code, error.message, { ...error.details, sent: false });
365
+ throw error;
366
+ } finally {
367
+ for (const scope of scopes)
368
+ scope.delete(flight);
369
+ }
370
+ }, "guardedWrite");
371
+ var codeOf = /* @__PURE__ */ __name((error) => typeof error?.code === "string" ? error.code : "unknown", "codeOf");
372
+
373
+ export {
374
+ modelSettingsShape,
375
+ resolveModelSettings,
376
+ modelTarget,
377
+ envName,
378
+ ancestorValue,
379
+ readOnlyLockOf,
380
+ mailHolderVariable,
381
+ MESSENGER_CHANGE_REFUSAL,
382
+ readOnlyRefusal,
383
+ ANSWER_RESERVE_MS,
384
+ deadlineMargin,
385
+ runBudget,
386
+ sentIds,
387
+ withWriteScope,
388
+ stopWrites,
389
+ currentOperation,
390
+ guardedWrite,
391
+ codeOf,
392
+ IMAGE_MODELS,
393
+ DEFAULT_IMAGE_MODEL,
394
+ imageModel,
395
+ imageModelsDirectory,
396
+ placedImage,
397
+ isImageModelInstalled
398
+ };
@@ -5,23 +5,23 @@ import {
5
5
  installFiles,
6
6
  megabytes,
7
7
  sharedModelsDirectory
8
- } from "./chunk-BNEE35WD.js";
8
+ } from "./chunk-5NFIUY2P.js";
9
9
  import {
10
10
  importFrom
11
11
  } from "./chunk-Y5E2WNWB.js";
12
12
  import {
13
13
  CliError
14
- } from "./chunk-DB2XKHI4.js";
14
+ } from "./chunk-4FHKSSXQ.js";
15
15
  import {
16
16
  __name
17
17
  } from "./chunk-ZVVMGPBJ.js";
18
18
 
19
- // node_modules/.pnpm/@wirecat+cli-core@0.687.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_3e6248e31e5b79d53006284373ddef70/node_modules/@wirecat/cli-core/dist/embeddings/embed.js
19
+ // node_modules/.pnpm/@wirecat+cli-core@0.718.0_@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typ_cfff6f86942c54bd7564e982a7834a83/node_modules/@wirecat/cli-core/dist/embeddings/embed.js
20
20
  import { readFileSync as readFileSync2 } from "node:fs";
21
21
  import { availableParallelism } from "node:os";
22
22
  import { basename, join as join2 } from "node:path";
23
23
 
24
- // node_modules/.pnpm/@wirecat+cli-core@0.687.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_3e6248e31e5b79d53006284373ddef70/node_modules/@wirecat/cli-core/dist/embeddings/onnx-runtime.js
24
+ // node_modules/.pnpm/@wirecat+cli-core@0.718.0_@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typ_cfff6f86942c54bd7564e982a7834a83/node_modules/@wirecat/cli-core/dist/embeddings/onnx-runtime.js
25
25
  import { createHash } from "node:crypto";
26
26
  import { copyFileSync, mkdirSync, mkdtempSync, readFileSync, renameSync, rmSync, statSync, writeFileSync } from "node:fs";
27
27
  import { join } from "node:path";
@@ -678,66 +678,45 @@ var Unzip = /* @__PURE__ */ (function() {
678
678
  return Unzip2;
679
679
  })();
680
680
 
681
- // node_modules/.pnpm/@wirecat+cli-core@0.687.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_3e6248e31e5b79d53006284373ddef70/node_modules/@wirecat/cli-core/dist/embeddings/onnx-runtime.js
681
+ // node_modules/.pnpm/@wirecat+cli-core@0.718.0_@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typ_cfff6f86942c54bd7564e982a7834a83/node_modules/@wirecat/cli-core/dist/embeddings/onnx-runtime.js
682
682
  var ONNX_RUNTIME_VERSION = "1.30.0";
683
- var release = /* @__PURE__ */ __name((name, sha256, bytes) => ({
684
- name,
685
- url: `https://github.com/microsoft/onnxruntime/releases/download/v${ONNX_RUNTIME_VERSION}/${name}`,
686
- sha256,
687
- bytes
688
- }), "release");
689
- var npmTarball = {
690
- name: `onnxruntime-node-${ONNX_RUNTIME_VERSION}.tgz`,
691
- url: `https://registry.npmjs.org/onnxruntime-node/-/onnxruntime-node-${ONNX_RUNTIME_VERSION}.tgz`,
692
- sha256: "6e3390d6b783e7be946fad629292799da28d0b42f84856e50d2c1b0383291e75",
693
- bytes: 113507888
694
- };
695
- var NATIVE = {
696
- "linux-x64": {
697
- archive: release("onnxruntime-linux-x64-1.30.0.tgz", "a5ed5a3cac51fbb2e90da632ae43d19212faaa20e76484e62bcb7c23ddb3b3fd", 11306877),
698
- member: "onnxruntime-linux-x64-1.30.0/lib/libonnxruntime.so.1.30.0",
699
- library: {
700
- name: "libonnxruntime.so.1",
701
- sha256: "245a6f8c38127551057a1cd1ffd59f0a186a227ade4f3492dea2494eb565542e",
702
- bytes: 28985152
703
- }
704
- },
705
- "linux-arm64": {
706
- archive: release("onnxruntime-linux-aarch64-1.30.0.tgz", "e16a27a8ed330bbc698df7330b0cf56e722f354e3bcc92118682c74ef3c3e3da", 10269495),
707
- member: "onnxruntime-linux-aarch64-1.30.0/lib/libonnxruntime.so.1.30.0",
708
- library: {
709
- name: "libonnxruntime.so.1",
710
- sha256: "64e903a43a041240fd6bcffe0ac6d4fea47ef87bf24b9d097801bd00a9612a4b",
711
- bytes: 25135496
712
- }
713
- },
714
- "darwin-arm64": {
715
- archive: release("onnxruntime-osx-arm64-1.30.0.tgz", "6ebb5062a934537c352937821f9fe9718e7de1a2db1122a93dd363ffd53a7012", 42373116),
716
- member: "onnxruntime-osx-arm64-1.30.0/lib/libonnxruntime.1.30.0.dylib",
717
- library: {
718
- name: "libonnxruntime.1.dylib",
719
- sha256: "bcc9110f9d638a119de2db7afb3ba9a1da8085f0cb3401e1c48ae1caf450b6fa",
720
- bytes: 43879424
721
- }
722
- },
723
- "win32-x64": {
724
- archive: npmTarball,
725
- member: "package/bin/napi-v6/win32/x64/onnxruntime.dll",
726
- library: {
727
- name: "onnxruntime.dll",
728
- sha256: "508c362f5673483dd3a086379c392795b2e42d10d5e6f3f90ebd7ac21c97af67",
729
- bytes: 28754232
730
- }
683
+ var REGISTRY = "https://registry.npmjs.org";
684
+ var wirecat = /* @__PURE__ */ __name((target, sha256, bytes, library) => ({
685
+ archive: {
686
+ name: `onnxruntime-${target}-${ONNX_RUNTIME_VERSION}.tgz`,
687
+ url: `${REGISTRY}/@wirecat/onnxruntime-${target}/-/onnxruntime-${target}-${ONNX_RUNTIME_VERSION}.tgz`,
688
+ sha256,
689
+ bytes
731
690
  },
732
- "win32-arm64": {
733
- archive: npmTarball,
734
- member: "package/bin/napi-v6/win32/arm64/onnxruntime.dll",
735
- library: {
736
- name: "onnxruntime.dll",
737
- sha256: "6c3a2abf5c6aca11c48a0d338a91af309f2266f25ce2e4084e6a87bbcb0fbfd0",
738
- bytes: 29815136
739
- }
740
- }
691
+ member: `package/${library.name}`,
692
+ library
693
+ }), "wirecat");
694
+ var NATIVE = {
695
+ "linux-x64": wirecat("linux-x64", "9c12e88ae495ae04e28802e52c2524a7a9c31aa715a67eeb636c85efcb08e5d9", 11305384, {
696
+ name: "libonnxruntime.so.1",
697
+ sha256: "245a6f8c38127551057a1cd1ffd59f0a186a227ade4f3492dea2494eb565542e",
698
+ bytes: 28985152
699
+ }),
700
+ "linux-arm64": wirecat("linux-arm64", "4ec23a63f0e7f49edb63590f4bc8b0e8526bff5b3a2b19d768112f37dc50d09c", 10386392, {
701
+ name: "libonnxruntime.so.1",
702
+ sha256: "64e903a43a041240fd6bcffe0ac6d4fea47ef87bf24b9d097801bd00a9612a4b",
703
+ bytes: 25135496
704
+ }),
705
+ "darwin-arm64": wirecat("darwin-arm64", "0e543a584a048b301ff96b81af4b001288e048577ce0f0b4a5a9c2df97979615", 12921423, {
706
+ name: "libonnxruntime.1.dylib",
707
+ sha256: "bffaa6ef856dba2c26f09c7c0e7018fd1562625f3485292c7ad28b83748c6879",
708
+ bytes: 43879424
709
+ }),
710
+ "win32-x64": wirecat("win32-x64", "55924c8e4c3f975d131e943712c5fac6e5423fb2b0c356c96230f2ad18dc2792", 10652326, {
711
+ name: "onnxruntime.dll",
712
+ sha256: "508c362f5673483dd3a086379c392795b2e42d10d5e6f3f90ebd7ac21c97af67",
713
+ bytes: 28754232
714
+ }),
715
+ "win32-arm64": wirecat("win32-arm64", "77e43743e580d6641e49b7cdeed57fd11f21a8cf27a186dd33a3db817b3ff7f2", 10778591, {
716
+ name: "onnxruntime.dll",
717
+ sha256: "6c3a2abf5c6aca11c48a0d338a91af309f2266f25ce2e4084e6a87bbcb0fbfd0",
718
+ bytes: 29815136
719
+ })
741
720
  };
742
721
  var onMusl = /* @__PURE__ */ __name(() => {
743
722
  try {
@@ -771,7 +750,7 @@ var installNativeRuntime = /* @__PURE__ */ __name(async ({ env = process.env, pr
771
750
  const folder = runtimeFolder(runtime, env);
772
751
  if (isInstalled(runtime, folder))
773
752
  return folder;
774
- progress(`ONNX Runtime ${ONNX_RUNTIME_VERSION} for ${runtime.target}: ${megabytes(runtime.archive.bytes)} from Microsoft`);
753
+ progress(`ONNX Runtime ${ONNX_RUNTIME_VERSION} for ${runtime.target}: ${megabytes(runtime.archive.bytes)} from npm`);
775
754
  const parent = sharedModelsDirectory("runtime", env);
776
755
  mkdirSync(parent, { recursive: true, mode: 448 });
777
756
  const staging = mkdtempSync(join(parent, ".onnxruntime-"));
@@ -858,7 +837,7 @@ var openSession = /* @__PURE__ */ __name(async (bytes, threads, options = {}) =>
858
837
  return { ort, session: await ort.InferenceSession.create(bytes, options) };
859
838
  }, "openSession");
860
839
 
861
- // node_modules/.pnpm/@wirecat+cli-core@0.687.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_3e6248e31e5b79d53006284373ddef70/node_modules/@wirecat/cli-core/dist/embeddings/embed.js
840
+ // node_modules/.pnpm/@wirecat+cli-core@0.718.0_@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typ_cfff6f86942c54bd7564e982a7834a83/node_modules/@wirecat/cli-core/dist/embeddings/embed.js
862
841
  var textModelsDirectory = /* @__PURE__ */ __name((env = process.env) => sharedModelsDirectory("text", env), "textModelsDirectory");
863
842
  var placedText = /* @__PURE__ */ __name((model, directory) => model.files.map((file) => [file, join2(directory, model.id, file.name)]), "placedText");
864
843
  var isTextModelInstalled = /* @__PURE__ */ __name((model, directory) => filesPresent(placedText(model, directory)), "isTextModelInstalled");
@@ -4,7 +4,7 @@ import {
4
4
  __name
5
5
  } from "./chunk-ZVVMGPBJ.js";
6
6
 
7
- // node_modules/.pnpm/@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/errors.js
7
+ // node_modules/.pnpm/@wirecat+cli-base@0.125.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/errors.js
8
8
  var errorCodes = [
9
9
  "validation_error",
10
10
  "configuration_error",
@@ -39,7 +39,7 @@ var CliError = class extends Error {
39
39
  };
40
40
  var isCliError = /* @__PURE__ */ __name((value) => typeof value === "object" && value !== null && value[BRAND] === true, "isCliError");
41
41
 
42
- // node_modules/.pnpm/@wirecat+cli-base@0.109.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
42
+ // node_modules/.pnpm/@wirecat+cli-base@0.125.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
43
43
  var CONTROL = (
44
44
  // biome-ignore lint/suspicious/noControlCharactersInRegex: matching them is the whole point
45
45
  /[\u0000-\u0008\u000B-\u001F\u007F-\u009F\u200B\u200E\u200F\u202A-\u202E\u2066-\u2069\uFEFF\u{E0000}-\u{E007F}]/gu
@@ -0,0 +1,32 @@
1
+ import { createRequire as __bundleRequire } from "node:module";
2
+ const require = __bundleRequire(import.meta.url);
3
+ import {
4
+ __name
5
+ } from "./chunk-ZVVMGPBJ.js";
6
+
7
+ // node_modules/.pnpm/zwitch@2.0.4/node_modules/zwitch/index.js
8
+ var own = {}.hasOwnProperty;
9
+ function zwitch(key, options) {
10
+ const settings = options || {};
11
+ function one(value, ...parameters) {
12
+ let fn = one.invalid;
13
+ const handlers = one.handlers;
14
+ if (value && own.call(value, key)) {
15
+ const id = String(value[key]);
16
+ fn = own.call(handlers, id) ? handlers[id] : one.unknown;
17
+ }
18
+ if (fn) {
19
+ return fn.call(this, value, ...parameters);
20
+ }
21
+ }
22
+ __name(one, "one");
23
+ one.handlers = settings.handlers || {};
24
+ one.invalid = settings.invalid;
25
+ one.unknown = settings.unknown;
26
+ return one;
27
+ }
28
+ __name(zwitch, "zwitch");
29
+
30
+ export {
31
+ zwitch
32
+ };