@wirecat/zoom-cli 0.71.0 → 0.73.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (199) hide show
  1. package/contracts/wirecat.json +1478 -0
  2. package/dist/account-removal.d.ts.map +1 -1
  3. package/dist/account-removal.js +0 -2
  4. package/dist/account-removal.js.map +1 -1
  5. package/dist/answers.d.ts +57 -3
  6. package/dist/answers.d.ts.map +1 -1
  7. package/dist/answers.js +0 -3
  8. package/dist/answers.js.map +1 -1
  9. package/dist/bin/main.js +13 -5
  10. package/dist/bin/main.js.map +1 -1
  11. package/dist/bin/zm.js +2 -2
  12. package/dist/bundle/{all-profiles-O4YNVPZX.js → all-profiles-V47CUJFK.js} +12 -12
  13. package/dist/bundle/answer-policy-W6H72X2R.js +112 -0
  14. package/dist/bundle/{anthropic-7GGRX3RX.js → anthropic-SID7Z3QN.js} +19 -12
  15. package/dist/bundle/{app-server-CPMKM3HI.js → app-server-KCMUSY4A.js} +75 -57
  16. package/dist/bundle/{bun-POHZKEPV.js → bun-PWMM6L45.js} +2 -2
  17. package/dist/bundle/{bun-sqlite-PGYMBPEL.js → bun-sqlite-3TLKUN5A.js} +10 -6
  18. package/dist/bundle/{chunk-Q3XLZIY3.js → chunk-2BAZRRJP.js} +29 -23
  19. package/dist/bundle/{chunk-OWEBWDHV.js → chunk-2NQPB6MT.js} +103 -9
  20. package/dist/bundle/chunk-2PYZTRRC.js +84 -0
  21. package/dist/bundle/chunk-2VYEGKQ3.js +13 -0
  22. package/dist/bundle/{chunk-I4DFFR7F.js → chunk-35CYSRGJ.js} +14 -5
  23. package/dist/bundle/{chunk-GGS6D4W4.js → chunk-3ADFJ3UP.js} +3 -3
  24. package/dist/bundle/{chunk-EOSVN2ER.js → chunk-3HTJBGNP.js} +242 -242
  25. package/dist/bundle/{chunk-2KESWII5.js → chunk-44YVZIA4.js} +3 -3
  26. package/dist/bundle/{chunk-GXF5HFFP.js → chunk-4LFFDUUW.js} +4 -4
  27. package/dist/bundle/{chunk-WOIHSQAL.js → chunk-4RJL32PF.js} +49 -10
  28. package/dist/bundle/{chunk-7ROXXRGG.js → chunk-6AO2RSYH.js} +7031 -5279
  29. package/dist/bundle/{chunk-DIQLXAAZ.js → chunk-6NI4FE5G.js} +6 -8
  30. package/dist/bundle/{chunk-X277FBTF.js → chunk-6WUTUCKH.js} +3 -3
  31. package/dist/bundle/{chunk-77TCCHMP.js → chunk-AIEMFRBU.js} +1 -1
  32. package/dist/bundle/{chunk-MRI6QMZ3.js → chunk-CIUJEQH4.js} +27 -19
  33. package/dist/bundle/{chunk-CRFOGYDG.js → chunk-CMWFYZ45.js} +2 -2
  34. package/dist/bundle/{chunk-LE7MDAQG.js → chunk-CQBLPBZU.js} +2 -2
  35. package/dist/bundle/{chunk-RQG5VOGH.js → chunk-DPSTOVKC.js} +185 -34
  36. package/dist/bundle/{chunk-4QUFFB2U.js → chunk-DYLYH7VE.js} +4 -4
  37. package/dist/bundle/{chunk-FEM2JQN2.js → chunk-EA2OB75T.js} +1 -1
  38. package/dist/bundle/chunk-ERQRY6WZ.js +54 -0
  39. package/dist/bundle/{chunk-P3XC6EDU.js → chunk-ETQNHS3A.js} +10 -129
  40. package/dist/bundle/{chunk-IAV5BG3I.js → chunk-EXWZCI5G.js} +1 -1
  41. package/dist/bundle/{chunk-VW6BF6M7.js → chunk-FIVFP53N.js} +1 -1
  42. package/dist/bundle/{chunk-DSVZEXYJ.js → chunk-FJMRDRPN.js} +3573 -3347
  43. package/dist/bundle/{chunk-7QC4M4HS.js → chunk-FT7X74RT.js} +4 -4
  44. package/dist/bundle/{chunk-ADLS6FVG.js → chunk-FXBHOCJK.js} +1 -1
  45. package/dist/bundle/{chunk-ZBFL5JPT.js → chunk-FZLJ2G7A.js} +22 -120
  46. package/dist/bundle/{chunk-GL3MYFMX.js → chunk-G2TSDMTA.js} +5 -5
  47. package/dist/bundle/{chunk-2FV5JUQU.js → chunk-G3SIY4MQ.js} +47 -40
  48. package/dist/bundle/{chunk-2U27KIKU.js → chunk-GCZMYDKU.js} +6 -6
  49. package/dist/bundle/{chunk-CKPCVEXU.js → chunk-HAMDPWEZ.js} +6 -6
  50. package/dist/bundle/{chunk-OE7EIP5L.js → chunk-HCZYJMBP.js} +1 -1
  51. package/dist/bundle/{chunk-OORMSM6O.js → chunk-HNWDEDMU.js} +61 -30
  52. package/dist/bundle/{chunk-FSHCAWZS.js → chunk-HO3GBTIT.js} +13464 -10422
  53. package/dist/bundle/chunk-IE7YBRUO.js +25 -0
  54. package/dist/bundle/{chunk-RGJ7OWHU.js → chunk-IJCUAKR5.js} +61 -21
  55. package/dist/bundle/{chunk-ULDXZ6LH.js → chunk-IKNOTHG2.js} +116 -70
  56. package/dist/bundle/{chunk-633QXP57.js → chunk-ILDGZBZD.js} +14 -9
  57. package/dist/bundle/{chunk-CFQF6IGY.js → chunk-JIS34MLC.js} +69 -6
  58. package/dist/bundle/{chunk-DHWBSXG3.js → chunk-JQF4LM3V.js} +415 -66
  59. package/dist/bundle/{chunk-4LAQDZXU.js → chunk-K5JFX5TK.js} +953 -210
  60. package/dist/bundle/{chunk-5LJTU4LY.js → chunk-K7EMVFJ7.js} +115 -113
  61. package/dist/bundle/chunk-KHBZ4OEP.js +16 -0
  62. package/dist/bundle/chunk-KK2IVZUQ.js +185 -0
  63. package/dist/bundle/{chunk-SELXER2Q.js → chunk-KQD4ZVNC.js} +7 -7
  64. package/dist/bundle/{chunk-VJXHIUFP.js → chunk-KSNJK4QM.js} +13 -13
  65. package/dist/bundle/{chunk-X4GWR6GO.js → chunk-KUL7S5Y3.js} +376 -10
  66. package/dist/bundle/{chunk-M76MXMLY.js → chunk-L6YSKCC3.js} +1 -1
  67. package/dist/bundle/chunk-LQYMN36C.js +73 -0
  68. package/dist/bundle/{chunk-USQ23X5V.js → chunk-LSVQCI6V.js} +751 -735
  69. package/dist/bundle/{chunk-DRBQDCDU.js → chunk-LVDTSCIN.js} +39 -122
  70. package/dist/bundle/{chunk-P3ASN72F.js → chunk-M4OP5ASJ.js} +1 -1
  71. package/dist/bundle/chunk-MAE5UGRQ.js +301 -0
  72. package/dist/bundle/{chunk-CT4WVR4N.js → chunk-MG2CCAVG.js} +3 -3
  73. package/dist/bundle/chunk-MOKEB656.js +71 -0
  74. package/dist/bundle/{chunk-BGTEVIW4.js → chunk-N3SOTKXC.js} +6 -6
  75. package/dist/bundle/{chunk-VRH7VRTK.js → chunk-NBA2V6LB.js} +10 -15
  76. package/dist/bundle/{chunk-5J4AMBMM.js → chunk-OFA22L4G.js} +4 -4
  77. package/dist/bundle/chunk-OKOJEBHK.js +106 -0
  78. package/dist/bundle/{chunk-Q5PI72CR.js → chunk-OMLVWOEF.js} +7 -2
  79. package/dist/bundle/{chunk-DK6ICIGL.js → chunk-OU5OXA6Q.js} +2150 -1312
  80. package/dist/bundle/{chunk-QVSLSWAL.js → chunk-P4FU6R3Z.js} +27 -152
  81. package/dist/bundle/{chunk-YPO2U2YB.js → chunk-PACLT6IW.js} +363 -115
  82. package/dist/bundle/{chunk-BBTQIVFP.js → chunk-PGPHEC2X.js} +2 -2
  83. package/dist/bundle/chunk-PJ3FKBXG.js +18 -0
  84. package/dist/bundle/{chunk-X3ZDN3U7.js → chunk-PKON63JH.js} +2 -2
  85. package/dist/bundle/{chunk-Q2SUFGSH.js → chunk-Q43KX56Z.js} +2 -2
  86. package/dist/bundle/{chunk-XI3VIQKW.js → chunk-QS6DWXDB.js} +569 -537
  87. package/dist/bundle/{chunk-INVTDIF6.js → chunk-QVJMFZFW.js} +1 -1
  88. package/dist/bundle/{chunk-QTHIU7CO.js → chunk-QWGEOQHA.js} +3 -2
  89. package/dist/bundle/{chunk-N2FNMION.js → chunk-R5FTCNLJ.js} +1 -1
  90. package/dist/bundle/{chunk-MW4EGDDV.js → chunk-SO52EJ2W.js} +2 -2
  91. package/dist/bundle/{chunk-HB6XJQ3Y.js → chunk-SYIOT45G.js} +5 -5
  92. package/dist/bundle/{chunk-4QPQ7MDA.js → chunk-TI2OANJZ.js} +1 -1
  93. package/dist/bundle/{chunk-ALIT5QFT.js → chunk-UIKVP23D.js} +1 -1
  94. package/dist/bundle/{chunk-OHWMIUCT.js → chunk-USIMMGWS.js} +244 -245
  95. package/dist/bundle/{chunk-MEED7YFG.js → chunk-UYBLNGZ2.js} +8 -2
  96. package/dist/bundle/{chunk-IED3NS7G.js → chunk-V5Q2QKYM.js} +29 -36
  97. package/dist/bundle/{chunk-54YDWBYG.js → chunk-VJVYGTPM.js} +15 -2
  98. package/dist/bundle/{chunk-5K7OGPGA.js → chunk-VPPNYUQM.js} +8 -8
  99. package/dist/bundle/{chunk-ZBKWRYRS.js → chunk-X2FILY5F.js} +3 -3
  100. package/dist/bundle/{chunk-2RUAMDVV.js → chunk-XLY7V2LB.js} +14 -14
  101. package/dist/bundle/chunk-XWBPP2HX.js +2 -0
  102. package/dist/bundle/{chunk-ZVI6TFQR.js → chunk-Y3IH7EZC.js} +17 -17
  103. package/dist/bundle/{chunk-YD2RYVMK.js → chunk-Z5XCU4S7.js} +46 -40
  104. package/dist/bundle/{chunk-RN4EHCC5.js → chunk-ZAIE3G5I.js} +3 -3
  105. package/dist/bundle/{chunk-2U6SER67.js → chunk-ZMHZ6CQS.js} +2 -2
  106. package/dist/bundle/{chunk-64ZHF6PJ.js → chunk-ZVQDOKDY.js} +3 -1
  107. package/dist/bundle/{chunk-TM4JSVGQ.js → chunk-ZX4QWTMQ.js} +42 -43
  108. package/dist/bundle/{cli-KHMEUXNG.js → cli-4ZYJ6OZE.js} +158 -88
  109. package/dist/bundle/command-contract-FJDDCHYP.js +43 -0
  110. package/dist/bundle/command-server-entry-CASONRIJ.js +173 -0
  111. package/dist/bundle/config-4DZHX2WX.js +99 -0
  112. package/dist/bundle/{decode-7RP4HSVE.js → decode-KEFCVGEB.js} +6 -6
  113. package/dist/bundle/{dispatch-IZCAK47P.js → dispatch-EU67WGME.js} +11 -11
  114. package/dist/bundle/{dist-BFT2SUBV.js → dist-GCQ7KCKN.js} +55 -30
  115. package/dist/bundle/{echarts-T2BSQ2YV.js → echarts-SDZA2SWG.js} +2 -2
  116. package/dist/bundle/{embed-BAS6YPDT.js → embed-43VJEPM6.js} +7 -7
  117. package/dist/bundle/{embedder-5XD5FCAO.js → embedder-Q4ZHAGRP.js} +10 -10
  118. package/dist/bundle/{failure-R2OIHCE5.js → failure-CTJLEB2R.js} +3 -3
  119. package/dist/bundle/first-run-CPOLQVNA.js +29 -0
  120. package/dist/bundle/first-screen-XYESRGWW.js +41 -0
  121. package/dist/bundle/folders-MSBTAPAG.js +24 -0
  122. package/dist/bundle/{instructions-XZPROPKY.js → instructions-7T6JJIFS.js} +1 -1
  123. package/dist/bundle/{main-TZXKGL3L.js → main-NA3QVPXS.js} +39 -25
  124. package/dist/bundle/{mcp-M4QN2E7R.js → mcp-TDKGDB4V.js} +2 -2
  125. package/dist/bundle/{meetings-JB2ISPND.js → meetings-7CVIQJTA.js} +9 -7
  126. package/dist/bundle/{node-A3B3MJWX.js → node-BZDMUFTW.js} +2 -2
  127. package/dist/bundle/{node-P4E63KXA.js → node-KM3CUABH.js} +9 -9
  128. package/dist/bundle/{node-sqlite-QVWDLGDX.js → node-sqlite-QHGB23B4.js} +11 -7
  129. package/dist/bundle/{oauth-YA6IYV4O.js → oauth-BMEMCM2I.js} +8 -8
  130. package/dist/bundle/{open-SY7TXJBS.js → open-JGU2NRJP.js} +6 -6
  131. package/dist/bundle/openai-VTXXFNCS.js +28 -0
  132. package/dist/bundle/{output-file-YGQYZCBJ.js → output-file-VDOCYH2G.js} +6 -6
  133. package/dist/bundle/{process-6HNBTJIY.js → process-756VBE7E.js} +1 -1
  134. package/dist/bundle/{program-77BUCJ4H.js → program-XM6CDIJ2.js} +134 -129
  135. package/dist/bundle/{prompt-YDG73YDS.js → prompt-2IPFXJ4B.js} +6 -6
  136. package/dist/bundle/{recognize-ECXDGTB7.js → recognize-672E2RIB.js} +5 -5
  137. package/dist/bundle/{remote-K4JHGBVJ.js → remote-YLHRVPDS.js} +11 -8
  138. package/dist/bundle/{rerank-IU2YYD4T.js → rerank-NBXQG3OS.js} +8 -8
  139. package/dist/bundle/run-log-3WITBT2F.js +126 -0
  140. package/dist/bundle/{serve-3XWIF3HI.js → serve-FNLOUMYP.js} +10 -10
  141. package/dist/bundle/{server-56VYOHWP.js → server-7ZB5AK5H.js} +53 -47
  142. package/dist/bundle/server-GGRGD4SH.js +77 -0
  143. package/dist/bundle/{services-X7IPEGQ5.js → services-Z4UWN64R.js} +56 -37
  144. package/dist/bundle/{speech-E2OBQWYA.js → speech-XSYVCKR3.js} +17 -14
  145. package/dist/bundle/sqlite-runtime-GAPXJNWU.js +20 -0
  146. package/dist/bundle/{state-4GMJYK4H.js → state-QSA53EF5.js} +7 -7
  147. package/dist/bundle/{store-LA4TV4DM.js → store-EKI4OAJH.js} +22 -19
  148. package/dist/bundle/{store-KPI7GB5Y.js → store-NOF5EYUC.js} +38 -21
  149. package/dist/bundle/store-connection-2OZQGEIO.js +92 -0
  150. package/dist/bundle/store-maintenance-command-GNX3SOZ6.js +67 -0
  151. package/dist/bundle/{streaming-EJ3NM2C2.js → streaming-PQEXKTE5.js} +7 -7
  152. package/dist/bundle/tokens-WJQYQ3FK.js +24 -0
  153. package/dist/bundle/zm.js +34 -10
  154. package/dist/bundle/{zoom-app-QEJBTIJ4.js → zoom-app-Y7RMWLVU.js} +9 -8
  155. package/dist/folders.d.ts +12 -2
  156. package/dist/folders.d.ts.map +1 -1
  157. package/dist/folders.js +81 -3
  158. package/dist/folders.js.map +1 -1
  159. package/dist/identity.d.ts +5 -0
  160. package/dist/identity.d.ts.map +1 -1
  161. package/dist/identity.js +14 -0
  162. package/dist/identity.js.map +1 -1
  163. package/dist/recording-schedule-setup.d.ts.map +1 -1
  164. package/dist/recording-schedule-setup.js +4 -7
  165. package/dist/recording-schedule-setup.js.map +1 -1
  166. package/dist/remote-http.d.ts +1 -1
  167. package/dist/remote-http.d.ts.map +1 -1
  168. package/dist/remote-http.js +21 -23
  169. package/dist/remote-http.js.map +1 -1
  170. package/dist/setup-commands.d.ts.map +1 -1
  171. package/dist/setup-commands.js +2 -4
  172. package/dist/setup-commands.js.map +1 -1
  173. package/dist/tokens.d.ts +17 -2
  174. package/dist/tokens.d.ts.map +1 -1
  175. package/dist/tokens.js +109 -29
  176. package/dist/tokens.js.map +1 -1
  177. package/dist/version.d.ts +1 -1
  178. package/dist/version.js +1 -1
  179. package/dist/wcat.d.ts +3 -0
  180. package/dist/wcat.d.ts.map +1 -0
  181. package/dist/wcat.js +4 -0
  182. package/dist/wcat.js.map +1 -0
  183. package/package.json +15 -14
  184. package/dist/bundle/answer-policy-PPSPMCLH.js +0 -104
  185. package/dist/bundle/chunk-KMV7GZB6.js +0 -35
  186. package/dist/bundle/chunk-UG447QY2.js +0 -27
  187. package/dist/bundle/chunk-XRFHQGOD.js +0 -17
  188. package/dist/bundle/command-contract-4K6XXZYE.js +0 -41
  189. package/dist/bundle/config-EEDB632I.js +0 -90
  190. package/dist/bundle/first-run-23WWZ2PW.js +0 -28
  191. package/dist/bundle/first-screen-6HFUYVFR.js +0 -39
  192. package/dist/bundle/folders-ZXTOFY4T.js +0 -16
  193. package/dist/bundle/openai-2AU24NRN.js +0 -25
  194. package/dist/bundle/run-log-LFEXNZ74.js +0 -118
  195. package/dist/bundle/server-YSTMUZ22.js +0 -72
  196. package/dist/bundle/store-connection-AZTIF6IH.js +0 -83
  197. package/dist/bundle/store-maintenance-command-LR572PS4.js +0 -61
  198. package/dist/bundle/tokens-BE6CJMR5.js +0 -20
  199. /package/dist/bundle/{chunk-VOXIGICJ.js → chunk-7O7XM37N.js} +0 -0
@@ -6,13 +6,13 @@ import {
6
6
  meetingResultItem,
7
7
  runsCommand,
8
8
  suggest
9
- } from "./chunk-7ROXXRGG.js";
9
+ } from "./chunk-6AO2RSYH.js";
10
10
  import {
11
11
  checkedClientId
12
- } from "./chunk-2U27KIKU.js";
12
+ } from "./chunk-GCZMYDKU.js";
13
13
  import {
14
14
  sharedStoreCommand
15
- } from "./chunk-YPO2U2YB.js";
15
+ } from "./chunk-PACLT6IW.js";
16
16
  import {
17
17
  NO_EFFECTS,
18
18
  REMOTE_READ,
@@ -37,37 +37,37 @@ import {
37
37
  snakeKeys,
38
38
  usableProfileName,
39
39
  withSettingDefaults
40
- } from "./chunk-DSVZEXYJ.js";
40
+ } from "./chunk-FJMRDRPN.js";
41
41
  import {
42
42
  setupPermissionCeiling
43
- } from "./chunk-DIQLXAAZ.js";
43
+ } from "./chunk-6NI4FE5G.js";
44
44
  import {
45
45
  readOnlyLockOf,
46
46
  readOnlyRefusal
47
- } from "./chunk-UG447QY2.js";
47
+ } from "./chunk-MOKEB656.js";
48
48
  import {
49
49
  CEILING_KEY,
50
50
  DEFAULT_PERMISSIONS,
51
51
  LEVELS,
52
52
  keyForCommand,
53
53
  levelFor
54
- } from "./chunk-Q5PI72CR.js";
54
+ } from "./chunk-OMLVWOEF.js";
55
55
  import {
56
56
  KEEP_RUNS_FOR_DAYS,
57
57
  KEEP_SUCCESSFUL_RUNS_FOR_DAYS,
58
58
  RUNS_SIZE_LIMIT_MB
59
- } from "./chunk-USQ23X5V.js";
59
+ } from "./chunk-LSVQCI6V.js";
60
60
  import {
61
61
  ZM
62
- } from "./chunk-54YDWBYG.js";
62
+ } from "./chunk-VJVYGTPM.js";
63
63
  import {
64
64
  MEETING_RESULT_ENTITIES
65
- } from "./chunk-ULDXZ6LH.js";
65
+ } from "./chunk-IKNOTHG2.js";
66
66
  import {
67
67
  createRenderer,
68
68
  projectFields,
69
69
  saveConfigFile
70
- } from "./chunk-OORMSM6O.js";
70
+ } from "./chunk-HNWDEDMU.js";
71
71
  import {
72
72
  array,
73
73
  boolean,
@@ -92,10 +92,10 @@ import {
92
92
  strictObject,
93
93
  string,
94
94
  union
95
- } from "./chunk-WOIHSQAL.js";
95
+ } from "./chunk-4RJL32PF.js";
96
96
  import {
97
97
  CliError
98
- } from "./chunk-FEM2JQN2.js";
98
+ } from "./chunk-EA2OB75T.js";
99
99
  import {
100
100
  __name
101
101
  } from "./chunk-ZVVMGPBJ.js";
@@ -2,26 +2,31 @@ import { createRequire as __bundleRequire } from "node:module";
2
2
  const require = __bundleRequire(import.meta.url);
3
3
  import {
4
4
  validateFormattedText
5
- } from "./chunk-P3XC6EDU.js";
5
+ } from "./chunk-ETQNHS3A.js";
6
6
  import {
7
7
  inputPolicy
8
- } from "./chunk-BBTQIVFP.js";
8
+ } from "./chunk-PGPHEC2X.js";
9
+ import {
10
+ RECORDS_SCHEMA_VERSION,
11
+ RECORD_TYPES,
12
+ pointerOf
13
+ } from "./chunk-K5JFX5TK.js";
9
14
  import {
10
15
  indent
11
- } from "./chunk-OORMSM6O.js";
16
+ } from "./chunk-HNWDEDMU.js";
12
17
  import {
13
18
  CliError
14
- } from "./chunk-FEM2JQN2.js";
19
+ } from "./chunk-EA2OB75T.js";
15
20
  import {
16
21
  __name
17
22
  } from "./chunk-ZVVMGPBJ.js";
18
23
 
19
- // node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_737712cd0065e7e21fd5896a79d0773d/node_modules/@wirecat/cli-core/dist/domain/checks.js
24
+ // node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/domain/checks.js
20
25
  var spelled = /* @__PURE__ */ __name((check, args) => `${check.replaceAll(".", " ")}${args === void 0 ? "" : ` ${args}`}`, "spelled");
21
26
  var bareCheck = /* @__PURE__ */ __name((check, args) => `\`${spelled(check, args)}\``, "bareCheck");
22
27
  var checkWords = /* @__PURE__ */ __name((command, profile) => (check, args) => `\`${command} ${profile === void 0 ? "" : `${profile} `}${spelled(check, args)}\``, "checkWords");
23
28
 
24
- // node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_737712cd0065e7e21fd5896a79d0773d/node_modules/@wirecat/cli-core/dist/domain/markdown.js
29
+ // node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/domain/markdown.js
25
30
  var MARKERS = [
26
31
  ["**", "bold"],
27
32
  ["~~", "strike"],
@@ -67,7 +72,7 @@ var closing = /* @__PURE__ */ __name((input, open, marker) => {
67
72
  return end;
68
73
  }, "closing");
69
74
 
70
- // node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_737712cd0065e7e21fd5896a79d0773d/node_modules/@wirecat/cli-core/dist/domain/markdown-spans.js
75
+ // node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/domain/markdown-spans.js
71
76
  var STYLES = [
72
77
  ["**", "bold"],
73
78
  ["__", "underline"],
@@ -227,7 +232,7 @@ var parseMarkdownSpans = /* @__PURE__ */ __name((input) => {
227
232
  return validateFormattedText(result);
228
233
  }, "parseMarkdownSpans");
229
234
 
230
- // node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_737712cd0065e7e21fd5896a79d0773d/node_modules/@wirecat/cli-core/dist/domain/polls.js
235
+ // node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/domain/polls.js
231
236
  var countedPoll = /* @__PURE__ */ __name((poll, votes, self) => {
232
237
  const cast = votes.filter((vote) => vote.answers.length > 0);
233
238
  const mine = self === null ? void 0 : votes.find((vote) => vote.person.id === self);
@@ -242,6 +247,362 @@ var countedPoll = /* @__PURE__ */ __name((poll, votes, self) => {
242
247
  };
243
248
  }, "countedPoll");
244
249
 
250
+ // node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/domain/records-table.js
251
+ var TABLE_RECORD_TYPES = Object.keys(RECORD_TYPES).filter((type) => RECORD_TYPES[type].sheet !== false);
252
+ var TableError = class extends Error {
253
+ static {
254
+ __name(this, "TableError");
255
+ }
256
+ errors;
257
+ constructor(errors) {
258
+ super(errors.map((e) => e.message).join("; "));
259
+ this.errors = errors;
260
+ }
261
+ };
262
+ var LIST_SEPARATOR = "|";
263
+ var BOM = "\uFEFF";
264
+ var specOf = /* @__PURE__ */ __name((type) => RECORD_TYPES[type], "specOf");
265
+ var typesOf = /* @__PURE__ */ __name((schema) => schema.type === void 0 ? [] : typeof schema.type === "string" ? [schema.type] : [...schema.type], "typesOf");
266
+ var shapeOf = /* @__PURE__ */ __name((schema) => {
267
+ const types = typesOf(schema);
268
+ if (types.includes("integer"))
269
+ return "integer";
270
+ if (types.includes("boolean"))
271
+ return "boolean";
272
+ if (types.includes("array"))
273
+ return "list";
274
+ if (schema.pattern?.includes("T[0-9]{2}"))
275
+ return "instant";
276
+ if (schema.pattern?.startsWith("^[0-9]{4}-"))
277
+ return "day";
278
+ if (schema.pattern?.includes("[A-Za-z]{3}"))
279
+ return "currency";
280
+ if (schema.pattern?.includes("(\\.[0-9]"))
281
+ return "decimal";
282
+ return "text";
283
+ }, "shapeOf");
284
+ var valuesOf = /* @__PURE__ */ __name((schema) => schema.enum?.filter((v) => v !== null), "valuesOf");
285
+ var flat = /* @__PURE__ */ __name((schema) => {
286
+ const types = typesOf(schema);
287
+ return !types.includes("object") && !(types.includes("array") && schema.items?.type === "object");
288
+ }, "flat");
289
+ var fieldColumn = /* @__PURE__ */ __name((name, schema, required, kind) => {
290
+ const values = valuesOf(schema);
291
+ const shape = shapeOf(schema);
292
+ return {
293
+ name,
294
+ kind,
295
+ required,
296
+ shape,
297
+ description: schema.description ?? "",
298
+ ...values ? { values } : {},
299
+ ...shape === "list" ? { many: true } : {}
300
+ };
301
+ }, "fieldColumn");
302
+ var roleColumn = /* @__PURE__ */ __name((name, role) => ({
303
+ name,
304
+ kind: "role",
305
+ required: role.required === true,
306
+ shape: "text",
307
+ description: role.targets.length === 1 ? `The ${role.targets[0]}'s external id` : `<type>:<external id>, the type one of ${role.targets.join(", ")}`,
308
+ targets: role.targets,
309
+ ...role.many ? { many: true } : {}
310
+ }), "roleColumn");
311
+ var recordColumns = /* @__PURE__ */ __name((type) => {
312
+ const spec = specOf(type);
313
+ if (!spec || spec.sheet === false)
314
+ return [];
315
+ const fields = spec.fields.properties ?? {};
316
+ const required = spec.fields.required ?? [];
317
+ const lists = Object.entries(fields).filter(([, schema]) => !flat(schema));
318
+ return [
319
+ { name: "external_id", kind: "id", required: true, shape: "text", description: "Its id in your system" },
320
+ ...Object.entries(fields).filter(([, schema]) => flat(schema)).map(([name, schema]) => fieldColumn(name, schema, required.includes(name), "field")),
321
+ ...Object.entries(spec.roles).filter(([, role]) => !role.linked).map(([name, role]) => roleColumn(name, role)),
322
+ ...lists.flatMap(([list, schema]) => {
323
+ const item = schema.items ?? {};
324
+ const own = item.required ?? [];
325
+ return Object.entries(item.properties ?? {}).map(([key, s]) => fieldColumn(`${list}.${key}`, s, required.includes(list) && own.includes(key), "item"));
326
+ })
327
+ ];
328
+ }, "recordColumns");
329
+ var csvCell = /* @__PURE__ */ __name((value, separator) => /["\r\n]/.test(value) || value.includes(separator) ? `"${value.replaceAll('"', '""')}"` : value, "csvCell");
330
+ var example = /* @__PURE__ */ __name((column) => {
331
+ if (column.values?.[0])
332
+ return column.values[0];
333
+ switch (column.shape) {
334
+ case "decimal":
335
+ return "100.00";
336
+ case "day":
337
+ return "2026-01-31";
338
+ case "instant":
339
+ return "2026-01-31T09:00:00Z";
340
+ case "currency":
341
+ return "EUR";
342
+ case "integer":
343
+ return 1;
344
+ case "boolean":
345
+ return true;
346
+ case "list":
347
+ return ["\u2026"];
348
+ default:
349
+ return column.description || "\u2026";
350
+ }
351
+ }, "example");
352
+ var exampleRef = /* @__PURE__ */ __name((column) => ({
353
+ role: column.name,
354
+ type: column.targets?.[0] ?? "",
355
+ external_id: `${column.targets?.[0] ?? "record"}-1`
356
+ }), "exampleRef");
357
+ var recordTemplate = /* @__PURE__ */ __name((type, format, { source, separator = "," } = {}) => {
358
+ const columns = recordColumns(type);
359
+ if (columns.length === 0)
360
+ throw new TableError([unknownType(type)]);
361
+ if (format === "csv")
362
+ return `${BOM}${columns.map((c) => csvCell(c.name, separator)).join(separator)}\r
363
+ `;
364
+ const fields = {};
365
+ for (const c of columns.filter((c2) => c2.kind === "field"))
366
+ fields[c.name] = example(c);
367
+ for (const c of columns.filter((c2) => c2.kind === "item")) {
368
+ const [list = "", key = ""] = c.name.split(".");
369
+ fields[list] ??= [{}];
370
+ const [first] = fields[list];
371
+ if (first)
372
+ first[key] = example(c);
373
+ }
374
+ const envelope = {
375
+ schema_version: RECORDS_SCHEMA_VERSION,
376
+ source: {
377
+ // An import-only type is refused under a sheet's provider: `import` is the one any folder or export may use.
378
+ provider: source?.provider ?? (specOf(type)?.importOnly ? "import" : "sheet"),
379
+ account: source?.account ?? "main",
380
+ batch_id: source?.batch_id ?? "first-import"
381
+ },
382
+ records: [
383
+ {
384
+ key: `${type}-1`,
385
+ type,
386
+ external_id: `${type}-1`,
387
+ operation: "upsert",
388
+ fields,
389
+ relations: columns.filter((c) => c.kind === "role").map(exampleRef)
390
+ }
391
+ ]
392
+ };
393
+ return `${JSON.stringify(envelope, null, 2)}
394
+ `;
395
+ }, "recordTemplate");
396
+ var csvRows = /* @__PURE__ */ __name((text, separator) => {
397
+ const rows = [];
398
+ let cells = [];
399
+ let cell = "";
400
+ let quoted = false;
401
+ let line = 1;
402
+ let start = 1;
403
+ const end = /* @__PURE__ */ __name(() => {
404
+ cells.push(cell);
405
+ cell = "";
406
+ }, "end");
407
+ for (let i = 0; i < text.length; i++) {
408
+ const c = text[i];
409
+ if (quoted) {
410
+ if (c === '"' && text[i + 1] === '"') {
411
+ cell += '"';
412
+ i++;
413
+ } else if (c === '"')
414
+ quoted = false;
415
+ else {
416
+ if (c === "\n")
417
+ line++;
418
+ cell += c;
419
+ }
420
+ } else if (c === '"' && cell === "")
421
+ quoted = true;
422
+ else if (c === separator)
423
+ end();
424
+ else if (c === "\n" || c === "\r") {
425
+ if (c === "\r" && text[i + 1] === "\n")
426
+ i++;
427
+ end();
428
+ rows.push({ cells, line: start });
429
+ cells = [];
430
+ line++;
431
+ start = line;
432
+ } else
433
+ cell += c;
434
+ }
435
+ if (cell !== "" || cells.length > 0) {
436
+ end();
437
+ rows.push({ cells, line: start });
438
+ }
439
+ return rows.filter((r) => r.cells.some((c) => c.trim() !== ""));
440
+ }, "csvRows");
441
+ var csvSeparator = /* @__PURE__ */ __name((header) => {
442
+ const count = /* @__PURE__ */ __name((s) => header.split(s).length - 1, "count");
443
+ return [";", " ", ","].reduce((best, s) => count(s) > count(best) ? s : best, ",");
444
+ }, "csvSeparator");
445
+ var DAY_DOTTED = /^(\d{1,2})[./](\d{1,2})[./](\d{4})$/;
446
+ var normalized = /* @__PURE__ */ __name((column, raw) => {
447
+ const value = raw.trim();
448
+ switch (column.shape) {
449
+ case "decimal": {
450
+ const plain = value.replace(/[\s  ]/g, "");
451
+ return /^\d+,\d+$/.test(plain) ? plain.replace(",", ".") : plain;
452
+ }
453
+ case "day": {
454
+ const dotted = DAY_DOTTED.exec(value);
455
+ return dotted ? `${dotted[3]}-${dotted[2]?.padStart(2, "0")}-${dotted[1]?.padStart(2, "0")}` : value;
456
+ }
457
+ case "currency":
458
+ return value.toUpperCase();
459
+ case "integer":
460
+ return /^-?\d+$/.test(value) ? Number(value) : value;
461
+ case "boolean":
462
+ return /^(true|yes|1|да|sí|si)$/i.test(value) ? true : /^(false|no|0|нет)$/i.test(value) ? false : value;
463
+ case "list":
464
+ return value.split(LIST_SEPARATOR).map((v) => v.trim()).filter(Boolean);
465
+ default:
466
+ return column.many ? value.split(LIST_SEPARATOR).map((v) => v.trim()).filter(Boolean) : value;
467
+ }
468
+ }, "normalized");
469
+ var unknownType = /* @__PURE__ */ __name((type) => ({
470
+ pointer: "",
471
+ code: "record.type",
472
+ message: `no table for ${type}: use one of ${TABLE_RECORD_TYPES.join(", ")}`
473
+ }), "unknownType");
474
+ var relationsOf = /* @__PURE__ */ __name((column, raw) => {
475
+ const targets = column.targets ?? [];
476
+ const values = column.many ? raw.split(LIST_SEPARATOR) : [raw];
477
+ const out = [];
478
+ for (const value of values.map((v) => v.trim()).filter(Boolean)) {
479
+ const at = value.indexOf(":");
480
+ const named = at > 0 ? value.slice(0, at) : "";
481
+ if (targets.length === 1 && !targets.includes(named)) {
482
+ out.push({ role: column.name, type: targets[0], external_id: value });
483
+ continue;
484
+ }
485
+ if (!targets.includes(named) || at === value.length - 1)
486
+ return {
487
+ pointer: "",
488
+ code: "record.invalid",
489
+ message: `${column.name} takes <type>:<external id>, the type one of ${targets.join(", ")}: not ${value}`
490
+ };
491
+ out.push({ role: column.name, type: named, external_id: value.slice(at + 1) });
492
+ }
493
+ return out;
494
+ }, "relationsOf");
495
+ var envelopeOfCsv = /* @__PURE__ */ __name((text, { type, source, options }) => {
496
+ const columns = recordColumns(type);
497
+ if (columns.length === 0)
498
+ throw new TableError([unknownType(type)]);
499
+ const body = text.startsWith(BOM) ? text.slice(1) : text;
500
+ const separator = csvSeparator(body.slice(0, body.search(/\r?\n|$/)));
501
+ const [head, ...rows] = csvRows(body, separator);
502
+ if (!head)
503
+ throw new TableError([{ pointer: "", code: "envelope.invalid", message: "the file has no header row" }]);
504
+ const byName = new Map(columns.map((c) => [c.name, c]));
505
+ const header = head.cells.map((name) => name.trim());
506
+ const unknown = header.filter((name) => name !== "" && !byName.has(name));
507
+ if (unknown.length > 0)
508
+ throw new TableError([
509
+ {
510
+ pointer: "",
511
+ code: "envelope.invalid",
512
+ message: `columns ${type} has no field for: ${unknown.join(", ")}. Download the ${type} template for the list`,
513
+ place: { line: 1, column: unknown[0] }
514
+ }
515
+ ]);
516
+ if (!header.includes("external_id"))
517
+ throw new TableError([
518
+ { pointer: "", code: "envelope.invalid", message: "the header has no external_id column", place: { line: 1 } }
519
+ ]);
520
+ const records = [];
521
+ const indexById = /* @__PURE__ */ new Map();
522
+ const places = /* @__PURE__ */ new Map();
523
+ const errors = [];
524
+ for (const row of rows) {
525
+ const cell = /* @__PURE__ */ __name((name) => row.cells[header.indexOf(name)] ?? "", "cell");
526
+ const id = cell("external_id").trim();
527
+ if (!id) {
528
+ errors.push({
529
+ pointer: "",
530
+ code: "record.invalid",
531
+ message: "a row has no external_id",
532
+ place: { line: row.line, column: "external_id" }
533
+ });
534
+ continue;
535
+ }
536
+ const known = indexById.get(id);
537
+ const index = known ?? records.length;
538
+ const record = records[index] ?? {
539
+ key: `${type}:${id}`,
540
+ type,
541
+ external_id: id,
542
+ operation: "upsert",
543
+ fields: {},
544
+ relations: []
545
+ };
546
+ if (known === void 0) {
547
+ records.push(record);
548
+ indexById.set(id, index);
549
+ places.set(pointerOf("records", index), { line: row.line });
550
+ }
551
+ const fields = record.fields;
552
+ const item = {};
553
+ let list = "";
554
+ header.forEach((name, i) => {
555
+ const column = byName.get(name);
556
+ const raw = row.cells[i] ?? "";
557
+ if (!column || column.kind === "id" || raw.trim() === "")
558
+ return;
559
+ const at = { line: row.line, column: name };
560
+ if (column.kind === "field") {
561
+ fields[name] = normalized(column, raw);
562
+ places.set(pointerOf("records", index, "fields", name), at);
563
+ } else if (column.kind === "role") {
564
+ const relations = relationsOf(column, raw);
565
+ if (!Array.isArray(relations)) {
566
+ errors.push({ ...relations, pointer: pointerOf("records", index, "relations"), key: record.key, place: at });
567
+ return;
568
+ }
569
+ record.relations = [...(record.relations ?? []).filter((r) => r.role !== name), ...relations];
570
+ places.set(pointerOf("records", index, "relations"), at);
571
+ } else {
572
+ const [of = "", key = ""] = name.split(".");
573
+ list = of;
574
+ item[key] = normalized(column, raw);
575
+ }
576
+ });
577
+ if (list) {
578
+ fields[list] ??= [];
579
+ const items = fields[list];
580
+ places.set(pointerOf("records", index, "fields", list, items.length), { line: row.line });
581
+ items.push(item);
582
+ }
583
+ }
584
+ if (errors.length > 0)
585
+ throw new TableError(errors);
586
+ const envelope = {
587
+ schema_version: RECORDS_SCHEMA_VERSION,
588
+ source,
589
+ ...options ? { options } : {},
590
+ records
591
+ };
592
+ return {
593
+ envelope,
594
+ placeOf(pointer) {
595
+ const item = /^\/records\/\d+\/fields\/([^/]+)\/\d+\/([^/]+)/.exec(pointer);
596
+ for (let at = pointer; at !== ""; at = at.slice(0, at.lastIndexOf("/"))) {
597
+ const place = places.get(at);
598
+ if (place)
599
+ return item && !place.column ? { ...place, column: `${item[1]}.${item[2]}` } : place;
600
+ }
601
+ return void 0;
602
+ }
603
+ };
604
+ }, "envelopeOfCsv");
605
+
245
606
  // node_modules/.pnpm/qrcode-generator@2.0.4/node_modules/qrcode-generator/dist/qrcode.mjs
246
607
  var qrcode = /* @__PURE__ */ __name(function(typeNumber, errorCorrectionLevel) {
247
608
  const PAD0 = 236;
@@ -1876,7 +2237,7 @@ var createDataURL = /* @__PURE__ */ __name(function(width, height, getPixel) {
1876
2237
  var qrcode_default = qrcode;
1877
2238
  var stringToBytes = qrcode.stringToBytes;
1878
2239
 
1879
- // node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_737712cd0065e7e21fd5896a79d0773d/node_modules/@wirecat/cli-core/dist/terminal/qr.js
2240
+ // node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/terminal/qr.js
1880
2241
  var QUIET_ZONE = 4;
1881
2242
  var BLACK_ON_WHITE = "\x1B[30;107m";
1882
2243
  var RESET = "\x1B[0m";
@@ -1923,7 +2284,7 @@ var plainQr = /* @__PURE__ */ __name((link) => {
1923
2284
  return lines.join("\n");
1924
2285
  }, "plainQr");
1925
2286
 
1926
- // node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_737712cd0065e7e21fd5896a79d0773d/node_modules/@wirecat/cli-core/dist/terminal/login-qr.js
2287
+ // node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/terminal/login-qr.js
1927
2288
  var MARGIN = 2;
1928
2289
  var atTerminal = /* @__PURE__ */ __name((input) => input.isTTY === true && !inputPolicy(input).noInput, "atTerminal");
1929
2290
  var PASTE_QR = "agents: paste the QR code above into the chat as a code block, exactly as printed; when a new one is printed, paste it and say the old one expired";
@@ -1964,6 +2325,11 @@ export {
1964
2325
  parseMarkdown,
1965
2326
  parseMarkdownSpans,
1966
2327
  countedPoll,
2328
+ TABLE_RECORD_TYPES,
2329
+ TableError,
2330
+ recordColumns,
2331
+ recordTemplate,
2332
+ envelopeOfCsv,
1967
2333
  terminalQr,
1968
2334
  plainQr,
1969
2335
  atTerminal,
@@ -4,7 +4,7 @@ import {
4
4
  __name
5
5
  } from "./chunk-ZVVMGPBJ.js";
6
6
 
7
- // node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_737712cd0065e7e21fd5896a79d0773d/node_modules/@wirecat/cli-core/dist/cli/messenger/private-files.js
7
+ // node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/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) => {
@@ -0,0 +1,73 @@
1
+ import { createRequire as __bundleRequire } from "node:module";
2
+ const require = __bundleRequire(import.meta.url);
3
+ import {
4
+ hostFetch
5
+ } from "./chunk-MAE5UGRQ.js";
6
+ import {
7
+ CliError,
8
+ isCliError
9
+ } from "./chunk-EA2OB75T.js";
10
+ import {
11
+ __name
12
+ } from "./chunk-ZVVMGPBJ.js";
13
+
14
+ // node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/models/endpoint.js
15
+ var endpoint = /* @__PURE__ */ __name((value) => {
16
+ try {
17
+ const url = new URL(value);
18
+ return ["https:", "http:"].includes(url.protocol) && !url.username && !url.password && !url.search && !url.hash;
19
+ } catch {
20
+ return false;
21
+ }
22
+ }, "endpoint");
23
+ var loopback = /* @__PURE__ */ __name((hostname) => hostname === "localhost" || hostname === "[::1]" || /^127(\.\d{1,3}){3}$/.test(hostname), "loopback");
24
+ var onThisComputer = /* @__PURE__ */ __name((value) => {
25
+ try {
26
+ return loopback(new URL(value).hostname);
27
+ } catch {
28
+ return false;
29
+ }
30
+ }, "onThisComputer");
31
+ var modelAddressAllowed = /* @__PURE__ */ __name((value) => endpoint(value) && (new URL(value).protocol === "https:" || onThisComputer(value)), "modelAddressAllowed");
32
+ var PLAIN_HTTP_REFUSED = "this address is not allowed: use https, or http only on this computer";
33
+ var literalFetch = /* @__PURE__ */ __name((hostname, timeoutMs) => async (input, init = {}) => {
34
+ const url = new URL(input instanceof Request ? input.url : String(input));
35
+ if (url.hostname !== hostname)
36
+ throw new CliError("configuration_error", `${url.hostname} is not the model address's host, ${hostname}`, {
37
+ reason: "network.host-undeclared",
38
+ sent: false
39
+ });
40
+ const deadline = AbortSignal.timeout(timeoutMs);
41
+ const signal = init.signal ? AbortSignal.any([init.signal, deadline]) : deadline;
42
+ try {
43
+ const response = await fetch(input, { ...init, signal, redirect: "manual" });
44
+ if (response.status >= 300 && response.status < 400) {
45
+ void response.body?.cancel().catch(() => {
46
+ });
47
+ throw new CliError("invalid_response", `${hostname} answered with a redirect, which is not followed`);
48
+ }
49
+ return response;
50
+ } catch (error) {
51
+ if (isCliError(error))
52
+ throw error;
53
+ if (init.signal?.aborted)
54
+ throw new CliError("cancelled", "request cancelled");
55
+ if (deadline.aborted)
56
+ throw new CliError("timeout", `${hostname} did not answer within ${timeoutMs} ms`, { retryable: true });
57
+ throw new CliError("network_error", `${hostname} could not be reached`, { retryable: true });
58
+ }
59
+ }, "literalFetch");
60
+ var endpointFetch = /* @__PURE__ */ __name((address, timeoutMs) => {
61
+ const { hostname } = new URL(address);
62
+ if (hostname === "[::1]")
63
+ return fetch;
64
+ return hostname.startsWith("[") ? literalFetch(hostname, timeoutMs) : hostFetch({ hosts: [hostname], timeoutMs });
65
+ }, "endpointFetch");
66
+
67
+ export {
68
+ endpoint,
69
+ onThisComputer,
70
+ modelAddressAllowed,
71
+ PLAIN_HTTP_REFUSED,
72
+ endpointFetch
73
+ };