@wirecat/tg-cli 0.127.0 → 0.129.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 (126) hide show
  1. package/contracts/wirecat.json +26 -0
  2. package/dist/bin/tg.js +2 -2
  3. package/dist/bundle/{adapter-EZFS2UR6.js → adapter-2XFPXBTA.js} +60 -52
  4. package/dist/bundle/{all-profiles-TNIUBQK6.js → all-profiles-GXFPZLYU.js} +20 -30
  5. package/dist/bundle/{anthropic-NGIS5LTL.js → anthropic-FHS5XNK5.js} +5 -5
  6. package/dist/bundle/{app-server-RPU76G7D.js → app-server-IZMFSFP2.js} +56 -63
  7. package/dist/bundle/{bot-api-QJ6U6BLG.js → bot-api-LQP75V5I.js} +61 -53
  8. package/dist/bundle/{bot-history-THULK2C6.js → bot-history-EJQOD4AQ.js} +22 -18
  9. package/dist/bundle/{bun-QLSLLP27.js → bun-GBAZFRCV.js} +2 -2
  10. package/dist/bundle/{bun-sqlite-SH5245ZY.js → bun-sqlite-JB4BX6X7.js} +6 -6
  11. package/dist/bundle/chunk-2JZJPVBH.js +334 -0
  12. package/dist/bundle/{chunk-DNNYE6PS.js → chunk-2LPODKIF.js} +18 -15
  13. package/dist/bundle/chunk-3KZG63EH.js +170 -0
  14. package/dist/bundle/chunk-3XMUP55N.js +372 -0
  15. package/dist/bundle/{chunk-BWHVHPAQ.js → chunk-4BJAQNJ5.js} +9 -9
  16. package/dist/bundle/{chunk-M4OP5ASJ.js → chunk-66PL7P4C.js} +1 -1
  17. package/dist/bundle/{chunk-JWEKUAVZ.js → chunk-66UG67CE.js} +12 -12
  18. package/dist/bundle/{chunk-R52ZZZKZ.js → chunk-6JBRQ6PM.js} +55 -22
  19. package/dist/bundle/{chunk-Y7UA7HGL.js → chunk-6M3FAHPS.js} +3 -3
  20. package/dist/bundle/{chunk-TGKTIDYS.js → chunk-7F3LOHRB.js} +290 -504
  21. package/dist/bundle/{chunk-XS5C5TQ7.js → chunk-AUNNJDVD.js} +25 -8
  22. package/dist/bundle/{chunk-ERUB3KU3.js → chunk-B5RGPZDZ.js} +7 -7
  23. package/dist/bundle/{chunk-YRZXOQOB.js → chunk-B6NQJAUC.js} +2 -2
  24. package/dist/bundle/{chunk-4FFKCC7Y.js → chunk-BMSS3PCY.js} +62 -36
  25. package/dist/bundle/{chunk-VMV5CMLH.js → chunk-C4ALE7CH.js} +1 -1
  26. package/dist/bundle/{chunk-K4VO7S6Q.js → chunk-CKJ73EF3.js} +1 -1
  27. package/dist/bundle/{chunk-IX3GUNGV.js → chunk-CLG2ISQH.js} +4 -4
  28. package/dist/bundle/{chunk-MTU3UP5U.js → chunk-EB2JE722.js} +1 -1
  29. package/dist/bundle/{chunk-EGNQSWPH.js → chunk-EUL7HMUL.js} +2 -2
  30. package/dist/bundle/{chunk-2R6ZSE3O.js → chunk-F6CV4KUN.js} +2 -2
  31. package/dist/bundle/{chunk-7KCBPAQS.js → chunk-F6MLJ3V5.js} +2 -2
  32. package/dist/bundle/{chunk-ZSS3BH6Z.js → chunk-FH4YIBBH.js} +4 -4
  33. package/dist/bundle/chunk-FIO5NMK3.js +771 -0
  34. package/dist/bundle/{chunk-FSDLSEZA.js → chunk-G2SMVYBU.js} +2 -2
  35. package/dist/bundle/{chunk-FIVFP53N.js → chunk-GA3URWIF.js} +1 -1
  36. package/dist/bundle/{chunk-4CQ3PV3V.js → chunk-GGGBPWUS.js} +10 -15
  37. package/dist/bundle/{chunk-3CV5TBBR.js → chunk-GSHTLLCJ.js} +2 -2
  38. package/dist/bundle/{chunk-IWJ5OLU6.js → chunk-GYCKRIRK.js} +3 -3
  39. package/dist/bundle/{chunk-H7GAFD4N.js → chunk-HHUK3XO5.js} +1 -1
  40. package/dist/bundle/{chunk-NM5GBJME.js → chunk-HT6OFANN.js} +19 -19
  41. package/dist/bundle/{chunk-GHVRCLJI.js → chunk-I5PILOTU.js} +1 -1
  42. package/dist/bundle/chunk-IBSHQWIJ.js +29 -0
  43. package/dist/bundle/{chunk-5SN6KFPC.js → chunk-IRWSZJYL.js} +65 -60
  44. package/dist/bundle/{chunk-3I3TGKVG.js → chunk-IV6SIKVH.js} +4 -4
  45. package/dist/bundle/{chunk-URFBZNLU.js → chunk-JUFLELQ7.js} +2 -2
  46. package/dist/bundle/{chunk-5FDYMMEQ.js → chunk-KY3JLXW2.js} +4 -4
  47. package/dist/bundle/{chunk-YZGIQY2R.js → chunk-LPT5T6PU.js} +37 -28
  48. package/dist/bundle/chunk-LQPZDDDP.js +259 -0
  49. package/dist/bundle/{chunk-CXWAKV2O.js → chunk-M327UNS6.js} +6 -6
  50. package/dist/bundle/{chunk-4MKRKW6V.js → chunk-MS6YEIG5.js} +13 -13
  51. package/dist/bundle/{chunk-UY2TRFYN.js → chunk-MVFSWKTM.js} +12 -12
  52. package/dist/bundle/{chunk-45URY64S.js → chunk-NRCY3WBC.js} +2 -2
  53. package/dist/bundle/{chunk-SN52ZGFN.js → chunk-O2ULG7OO.js} +3 -3
  54. package/dist/bundle/{chunk-JF7D2Y4K.js → chunk-OJMDKWWL.js} +670 -519
  55. package/dist/bundle/{chunk-UW34Z7J3.js → chunk-OKTRB4ZQ.js} +1 -1
  56. package/dist/bundle/{chunk-7GE6KMLB.js → chunk-OOQVHMCS.js} +15 -15
  57. package/dist/bundle/{chunk-P5NJECXX.js → chunk-OWVQMK7G.js} +939 -909
  58. package/dist/bundle/{chunk-YIPOWJPN.js → chunk-P4FZJO5F.js} +2 -2
  59. package/dist/bundle/{chunk-LD42OGKK.js → chunk-PS7ZS5HD.js} +4 -4
  60. package/dist/bundle/{chunk-J6FHZXNS.js → chunk-PWQKGFS2.js} +49 -55
  61. package/dist/bundle/{chunk-APSMQIA4.js → chunk-QBNEWEJC.js} +3 -3
  62. package/dist/bundle/{chunk-Y65BQJOY.js → chunk-QDEP2QOA.js} +3 -3
  63. package/dist/bundle/{chunk-FD44T7HC.js → chunk-QFVIHBLD.js} +1 -1
  64. package/dist/bundle/{chunk-5KZKVKWU.js → chunk-QJDHRBXL.js} +7 -7
  65. package/dist/bundle/{chunk-LOG65WHO.js → chunk-QJLCEOAP.js} +1 -1
  66. package/dist/bundle/{chunk-XUAVZ6YX.js → chunk-RAFK5KXU.js} +9 -9
  67. package/dist/bundle/{chunk-UIQMBOXU.js → chunk-RPWYTOLI.js} +5 -5
  68. package/dist/bundle/{chunk-QPVCFSVU.js → chunk-RZPMFVWM.js} +6 -6
  69. package/dist/bundle/chunk-S5UTBEV3.js +1974 -0
  70. package/dist/bundle/{chunk-X4ECHJNG.js → chunk-SYZXOEHY.js} +98 -6
  71. package/dist/bundle/{chunk-BNM6KNUQ.js → chunk-SZB5WRMI.js} +2 -2
  72. package/dist/bundle/{chunk-5AOFOJQA.js → chunk-TGRB4SSZ.js} +4 -4
  73. package/dist/bundle/{chunk-Y62I2T36.js → chunk-VSPSHBAC.js} +2 -2
  74. package/dist/bundle/{chunk-JFQZ6BWI.js → chunk-VTJ3AOTT.js} +17 -17
  75. package/dist/bundle/{chunk-HPM47WO3.js → chunk-VXWDQDRU.js} +6130 -6675
  76. package/dist/bundle/{chunk-S3XUJPPL.js → chunk-X5H5NERR.js} +6 -6
  77. package/dist/bundle/{chunk-3WI53AA4.js → chunk-XHX5D5VE.js} +1174 -2636
  78. package/dist/bundle/chunk-XXW6PFAX.js +16 -0
  79. package/dist/bundle/{chunk-NBN5OYXH.js → chunk-ZRQQOGAZ.js} +4 -4
  80. package/dist/bundle/command-contract-G752BLKA.js +37 -0
  81. package/dist/bundle/{command-server-entry-UG2CLYXI.js → command-server-entry-YR6ONDWO.js} +27 -24
  82. package/dist/bundle/decode-VUKGWFSW.js +296 -0
  83. package/dist/bundle/{dispatch-PRAIGIFS.js → dispatch-ST5FK2KI.js} +8 -8
  84. package/dist/bundle/{echarts-CN6ZVAJZ.js → echarts-GOV5M733.js} +2 -2
  85. package/dist/bundle/{embed-M4EHIKA5.js → embed-2IVIYNAJ.js} +6 -6
  86. package/dist/bundle/{embedder-K2XL2UB4.js → embedder-2HU7JYZK.js} +9 -9
  87. package/dist/bundle/{entry-6M55YL2H.js → entry-CSTCXYI5.js} +9 -9
  88. package/dist/bundle/{failure-7Y34AUJT.js → failure-GMUQKQ5K.js} +2 -2
  89. package/dist/bundle/{first-run-TLJILIOF.js → first-run-3IZGXZT5.js} +12 -11
  90. package/dist/bundle/first-screen-7QSNCZIK.js +35 -0
  91. package/dist/bundle/{instructions-QLC2AXAB.js → instructions-YSXV6FAC.js} +1 -1
  92. package/dist/bundle/{mcp-TDKGDB4V.js → mcp-VFIOZDVY.js} +2 -2
  93. package/dist/bundle/meeting-combined-X4E3LSIJ.js +23 -0
  94. package/dist/bundle/meeting-model-FQBDHGRU.js +24 -0
  95. package/dist/bundle/meeting-semantic-ONNEOJX5.js +21 -0
  96. package/dist/bundle/{node-BAA3T4CH.js → node-FMQWCZRS.js} +2 -2
  97. package/dist/bundle/{node-sqlite-FNYVHQCO.js → node-sqlite-YN5OKOC6.js} +7 -7
  98. package/dist/bundle/{oauth-32T5KL5E.js → oauth-EW7PTZVT.js} +7 -7
  99. package/dist/bundle/{open-4VQ6FUEI.js → open-Q2RDY344.js} +5 -5
  100. package/dist/bundle/{openai-HDOKCN3Z.js → openai-STON6G3O.js} +28 -26
  101. package/dist/bundle/{process-GOUBIWKC.js → process-OQUC2TW3.js} +1 -1
  102. package/dist/bundle/{program-QFXJL2R5.js → program-7JJHTZ25.js} +66 -57
  103. package/dist/bundle/{prompt-YYODWYFO.js → prompt-WHVF7UTW.js} +5 -5
  104. package/dist/bundle/{proxy-transport-DP7SIMIC.js → proxy-transport-A4MRO3PF.js} +5 -5
  105. package/dist/bundle/{recognize-7ZULX5HL.js → recognize-YDQWMXNI.js} +4 -4
  106. package/dist/bundle/{remote-TUG7M5Y5.js → remote-477LQHP6.js} +9 -9
  107. package/dist/bundle/{rerank-D2EZWG66.js → rerank-4YPB26FG.js} +7 -7
  108. package/dist/bundle/{serve-MP3GA2XX.js → serve-FXJNUOTS.js} +9 -9
  109. package/dist/bundle/{server-D277L3H3.js → server-2S6HFBGR.js} +52 -42
  110. package/dist/bundle/server-UOSUTZNE.js +69 -0
  111. package/dist/bundle/{sqlite-runtime-XHZXEOLY.js → sqlite-runtime-RXYNJYMC.js} +6 -6
  112. package/dist/bundle/{state-YI3W6HGO.js → state-I2GGYGRL.js} +6 -6
  113. package/dist/bundle/{store-CIZPJFWE.js → store-KX3AAQZH.js} +25 -20
  114. package/dist/bundle/{store-C4RFPYPK.js → store-VQXIB6KV.js} +17 -13
  115. package/dist/bundle/store-maintenance-command-LW2MMDLY.js +60 -0
  116. package/dist/bundle/tg.js +13 -13
  117. package/dist/version.d.ts +1 -1
  118. package/dist/version.js +1 -1
  119. package/package.json +3 -3
  120. package/dist/bundle/chunk-ZIPUVOGT.js +0 -76
  121. package/dist/bundle/command-contract-DY6Y4TES.js +0 -34
  122. package/dist/bundle/decode-3NEUZJ2N.js +0 -162
  123. package/dist/bundle/first-screen-WME7ILW2.js +0 -32
  124. package/dist/bundle/server-GEP7QXGI.js +0 -62
  125. package/dist/bundle/store-maintenance-command-JNDYWFD2.js +0 -52
  126. /package/dist/bundle/{chunk-XWBPP2HX.js → chunk-ZI3YTXSF.js} +0 -0
@@ -2,7 +2,7 @@ import { createRequire as __bundleRequire } from "node:module";
2
2
  const require = __bundleRequire(import.meta.url);
3
3
  import {
4
4
  defineReasons
5
- } from "./chunk-XS5C5TQ7.js";
5
+ } from "./chunk-AUNNJDVD.js";
6
6
 
7
7
  // dist/reasons.js
8
8
  var REASONS = defineReasons([
@@ -26,7 +26,7 @@ var REASONS = defineReasons([
26
26
  ].map(([reason, code, message]) => ({ reason, code, message, details: [] })));
27
27
 
28
28
  // dist/version.js
29
- var VERSION = "0.127.0";
29
+ var VERSION = "0.129.0";
30
30
 
31
31
  // dist/identity.js
32
32
  var TG = {
@@ -3,26 +3,26 @@ const require = __bundleRequire(import.meta.url);
3
3
  import {
4
4
  executableEnvironment,
5
5
  executableOnPath
6
- } from "./chunk-FIVFP53N.js";
6
+ } from "./chunk-GA3URWIF.js";
7
7
  import {
8
8
  require_cross_spawn
9
9
  } from "./chunk-D72URWJE.js";
10
10
  import {
11
11
  loadConfigFile,
12
12
  saveConfigFile
13
- } from "./chunk-NM5GBJME.js";
13
+ } from "./chunk-HT6OFANN.js";
14
14
  import {
15
15
  number,
16
16
  object,
17
17
  optional,
18
18
  string
19
- } from "./chunk-XS5C5TQ7.js";
19
+ } from "./chunk-AUNNJDVD.js";
20
20
  import {
21
21
  __name,
22
22
  __toESM
23
23
  } from "./chunk-ZVVMGPBJ.js";
24
24
 
25
- // node_modules/.pnpm/@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/update/index.js
25
+ // node_modules/.pnpm/@wirecat+cli-base@0.101.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/update/index.js
26
26
  var import_cross_spawn = __toESM(require_cross_spawn(), 1);
27
27
  import { existsSync } from "node:fs";
28
28
  var updateCommand = /* @__PURE__ */ __name((installer, packageName) => {
@@ -12,10 +12,7 @@ import {
12
12
  refuseWriteBeforeConnecting,
13
13
  registerPrompts,
14
14
  syncsFirst
15
- } from "./chunk-YZGIQY2R.js";
16
- import {
17
- answeredWire
18
- } from "./chunk-ZIPUVOGT.js";
15
+ } from "./chunk-LPT5T6PU.js";
19
16
  import {
20
17
  BinaryResource,
21
18
  Picture,
@@ -36,30 +33,25 @@ import {
36
33
  tool,
37
34
  toolKey,
38
35
  toolsFromCommands
39
- } from "./chunk-4FFKCC7Y.js";
36
+ } from "./chunk-BMSS3PCY.js";
40
37
  import {
41
38
  agentJson,
42
39
  skillResource
43
- } from "./chunk-R52ZZZKZ.js";
40
+ } from "./chunk-6JBRQ6PM.js";
44
41
  import {
45
42
  StdioServerTransport,
43
+ answeredWire,
46
44
  callerOf,
47
45
  callingAgent,
48
46
  serveStdio
49
- } from "./chunk-X4ECHJNG.js";
50
- import {
51
- instructions
52
- } from "./chunk-LOG65WHO.js";
47
+ } from "./chunk-SYZXOEHY.js";
53
48
  import {
54
49
  McpServer,
55
50
  ResourceTemplate
56
51
  } from "./chunk-5D4AEUVA.js";
57
- import {
58
- mcpHttpMarker
59
- } from "./chunk-5AOFOJQA.js";
60
52
  import {
61
53
  connectedFor
62
- } from "./chunk-DNNYE6PS.js";
54
+ } from "./chunk-2LPODKIF.js";
63
55
  import {
64
56
  capability,
65
57
  dateWindow,
@@ -69,25 +61,32 @@ import {
69
61
  servicesFor,
70
62
  storedDeps,
71
63
  wholeList
72
- } from "./chunk-P5NJECXX.js";
64
+ } from "./chunk-OWVQMK7G.js";
65
+ import {
66
+ mcpHttpMarker
67
+ } from "./chunk-TGRB4SSZ.js";
68
+ import {
69
+ instructions
70
+ } from "./chunk-QJLCEOAP.js";
73
71
  import {
74
72
  warmEmbedders
75
- } from "./chunk-QPVCFSVU.js";
73
+ } from "./chunk-RZPMFVWM.js";
76
74
  import {
77
75
  stdinFieldOf
78
- } from "./chunk-GHVRCLJI.js";
76
+ } from "./chunk-I5PILOTU.js";
79
77
  import {
80
78
  openStore,
81
79
  pdfPreviewLimits
82
- } from "./chunk-HPM47WO3.js";
80
+ } from "./chunk-VXWDQDRU.js";
83
81
  import {
84
82
  findCommand
85
- } from "./chunk-5FDYMMEQ.js";
83
+ } from "./chunk-KY3JLXW2.js";
86
84
  import {
87
85
  DEFAULT_OUTPUT_BYTES,
88
86
  changesAuthorityAt,
89
87
  describeProgram,
90
88
  environmentOf,
89
+ fetchesAt,
91
90
  fetchesOnlyAt,
92
91
  itemOf,
93
92
  judgedTargets,
@@ -98,22 +97,25 @@ import {
98
97
  rootOf2 as rootOf,
99
98
  sealed,
100
99
  snakeKeys
101
- } from "./chunk-TGKTIDYS.js";
100
+ } from "./chunk-7F3LOHRB.js";
102
101
  import {
103
102
  withCaller
104
- } from "./chunk-5KZKVKWU.js";
103
+ } from "./chunk-QJDHRBXL.js";
105
104
  import {
106
105
  readOnlyLockOf
107
- } from "./chunk-45URY64S.js";
106
+ } from "./chunk-NRCY3WBC.js";
108
107
  import {
109
- timezoneOf,
110
108
  typedCommand
111
- } from "./chunk-3WI53AA4.js";
109
+ } from "./chunk-S5UTBEV3.js";
112
110
  import {
113
111
  isCliFailure
114
- } from "./chunk-APSMQIA4.js";
112
+ } from "./chunk-QBNEWEJC.js";
113
+ import {
114
+ timezoneOf
115
+ } from "./chunk-XHX5D5VE.js";
115
116
  import {
116
117
  description,
118
+ errorObjectOf,
117
119
  integer,
118
120
  maxValue,
119
121
  mcpErrorResult,
@@ -127,19 +129,19 @@ import {
127
129
  regex,
128
130
  strictObject,
129
131
  string
130
- } from "./chunk-XS5C5TQ7.js";
132
+ } from "./chunk-AUNNJDVD.js";
131
133
  import {
132
134
  CliError,
133
135
  visibleControls
134
- } from "./chunk-7KCBPAQS.js";
136
+ } from "./chunk-F6MLJ3V5.js";
135
137
  import {
136
138
  __name
137
139
  } from "./chunk-ZVVMGPBJ.js";
138
140
 
139
- // node_modules/.pnpm/@wirecat+cli-core@0.659.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._7ae9f69690019eb17dc9f8442c19cb73/node_modules/@wirecat/cli-core/dist/mcp/server.js
141
+ // node_modules/.pnpm/@wirecat+cli-core@0.665.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.101.0_commander@15_1712fa6347d2f5f4f52e592cd2c1c3bf/node_modules/@wirecat/cli-core/dist/mcp/server.js
140
142
  import { randomUUID } from "node:crypto";
141
143
 
142
- // node_modules/.pnpm/@wirecat+cli-core@0.659.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._7ae9f69690019eb17dc9f8442c19cb73/node_modules/@wirecat/cli-core/dist/mcp/agent-log.js
144
+ // node_modules/.pnpm/@wirecat+cli-core@0.665.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.101.0_commander@15_1712fa6347d2f5f4f52e592cd2c1c3bf/node_modules/@wirecat/cli-core/dist/mcp/agent-log.js
143
145
  var agentLog = /* @__PURE__ */ __name((open) => {
144
146
  let held;
145
147
  return {
@@ -158,7 +160,7 @@ var agentLog = /* @__PURE__ */ __name((open) => {
158
160
  };
159
161
  }, "agentLog");
160
162
 
161
- // node_modules/.pnpm/@wirecat+cli-core@0.659.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._7ae9f69690019eb17dc9f8442c19cb73/node_modules/@wirecat/cli-core/dist/mcp/resources.js
163
+ // node_modules/.pnpm/@wirecat+cli-core@0.665.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.101.0_commander@15_1712fa6347d2f5f4f52e592cd2c1c3bf/node_modules/@wirecat/cli-core/dist/mcp/resources.js
162
164
  var LISTED = 100;
163
165
  var registerResources = /* @__PURE__ */ __name((server, session, { command, name, limit, recorded, withStore, messenger, guard, assertRead }) => {
164
166
  server.registerResource("chat", new ResourceTemplate(`${command}://chat/{id}`, {
@@ -196,7 +198,7 @@ var registerResources = /* @__PURE__ */ __name((server, session, { command, name
196
198
  });
197
199
  }, "registerResources");
198
200
 
199
- // node_modules/.pnpm/@wirecat+cli-core@0.659.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._7ae9f69690019eb17dc9f8442c19cb73/node_modules/@wirecat/cli-core/dist/mcp/session.js
201
+ // node_modules/.pnpm/@wirecat+cli-core@0.665.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.101.0_commander@15_1712fa6347d2f5f4f52e592cd2c1c3bf/node_modules/@wirecat/cli-core/dist/mcp/session.js
200
202
  var HARMLESS = /* @__PURE__ */ new Set(["validation_error", "not_found", "permission_error", "confirmation_required", "rate_limited"]);
201
203
  var harmless = /* @__PURE__ */ __name((code) => HARMLESS.has(code), "harmless");
202
204
  var MessengerSession = class {
@@ -271,7 +273,7 @@ var MessengerSession = class {
271
273
  }
272
274
  };
273
275
 
274
- // node_modules/.pnpm/@wirecat+cli-core@0.659.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._7ae9f69690019eb17dc9f8442c19cb73/node_modules/@wirecat/cli-core/dist/mcp/tools/attachments.js
276
+ // node_modules/.pnpm/@wirecat+cli-core@0.665.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.101.0_commander@15_1712fa6347d2f5f4f52e592cd2c1c3bf/node_modules/@wirecat/cli-core/dist/mcp/tools/attachments.js
275
277
  var attachmentsTools = /* @__PURE__ */ __name((messenger) => {
276
278
  const _command = messenger.app.command;
277
279
  return {
@@ -325,7 +327,7 @@ var attachmentsTools = /* @__PURE__ */ __name((messenger) => {
325
327
  };
326
328
  }, "attachmentsTools");
327
329
 
328
- // node_modules/.pnpm/@wirecat+cli-core@0.659.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._7ae9f69690019eb17dc9f8442c19cb73/node_modules/@wirecat/cli-core/dist/mcp/tools/messages-photo.js
330
+ // node_modules/.pnpm/@wirecat+cli-core@0.665.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.101.0_commander@15_1712fa6347d2f5f4f52e592cd2c1c3bf/node_modules/@wirecat/cli-core/dist/mcp/tools/messages-photo.js
329
331
  var PHOTO_LIMIT = 512 * 1024;
330
332
  var IMAGE_TYPES = [
331
333
  ["image/jpeg", (b) => b[0] === 255 && b[1] === 216 && b[2] === 255],
@@ -341,14 +343,16 @@ var messagesPhotoTools = /* @__PURE__ */ __name((messenger) => ({
341
343
  input: object({
342
344
  chat: chatOf(messenger),
343
345
  message,
344
- index: optional(pipe(number(), integer(), minValue(0), description("attachment index from 0; omit for the first photo")))
346
+ attachment: optional(pipe(number(), integer(), minValue(1), description("which file of the message, from 1; omit for the first photo")))
345
347
  }),
346
348
  annotations: READ,
347
349
  online: /* @__PURE__ */ __name(async (adapter, args, defaults) => {
348
350
  const { id: chatId } = await adapter.resolve(args.chat);
349
351
  const saveIt = `the owner can save it with \`${typedCommand(messenger.app.command, `messages download ${chatId} ${args.message}`)}\``;
350
352
  const { files } = await capability(adapter, "download", "download attachments")(chatId, args.message);
351
- const photo = args.index === void 0 ? files.find((file) => file.kind === "photo") : files[args.index];
353
+ if (args.attachment !== void 0 && args.attachment > files.length)
354
+ throw new CliError("not_found", `message ${args.message} has ${files.length} file${files.length === 1 ? "" : "s"}, no file ${args.attachment}`);
355
+ const photo = args.attachment === void 0 ? files.find((file) => file.kind === "photo") : files[args.attachment - 1];
352
356
  if (!photo) {
353
357
  const kinds = files.map((file) => file.kind).join(", ");
354
358
  throw new CliError(files.length === 0 ? "not_found" : "validation_error", files.length === 0 ? `message ${args.message} has no photo` : `the message has a ${kinds}, not a photo \u2014 ${saveIt}`);
@@ -379,7 +383,7 @@ var readUpTo = /* @__PURE__ */ __name(async (file, limit, saveIt) => {
379
383
  return new Uint8Array(Buffer.concat(chunks));
380
384
  }, "readUpTo");
381
385
 
382
- // node_modules/.pnpm/@wirecat+cli-core@0.659.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._7ae9f69690019eb17dc9f8442c19cb73/node_modules/@wirecat/cli-core/dist/mcp/tools/stats.js
386
+ // node_modules/.pnpm/@wirecat+cli-core@0.665.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.101.0_commander@15_1712fa6347d2f5f4f52e592cd2c1c3bf/node_modules/@wirecat/cli-core/dist/mcp/tools/stats.js
383
387
  var statsTools = /* @__PURE__ */ __name((messenger) => ({
384
388
  stats_charts: tool({
385
389
  title: "A chart from a chat's statistics",
@@ -416,14 +420,14 @@ var statsTools = /* @__PURE__ */ __name((messenger) => ({
416
420
  })
417
421
  }), "statsTools");
418
422
 
419
- // node_modules/.pnpm/@wirecat+cli-core@0.659.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._7ae9f69690019eb17dc9f8442c19cb73/node_modules/@wirecat/cli-core/dist/mcp/tools.js
423
+ // node_modules/.pnpm/@wirecat+cli-core@0.665.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.101.0_commander@15_1712fa6347d2f5f4f52e592cd2c1c3bf/node_modules/@wirecat/cli-core/dist/mcp/tools.js
420
424
  var pictureTools = /* @__PURE__ */ __name((messenger) => Object.fromEntries(Object.entries({
421
425
  ...messagesPhotoTools(messenger),
422
426
  ...attachmentsTools(messenger),
423
427
  ...statsTools(messenger)
424
428
  }).map(([name, definition]) => [name, { ...definition, input: strictObject(definition.input.entries) }])), "pictureTools");
425
429
 
426
- // node_modules/.pnpm/@wirecat+cli-core@0.659.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._7ae9f69690019eb17dc9f8442c19cb73/node_modules/@wirecat/cli-core/dist/mcp/server.js
430
+ // node_modules/.pnpm/@wirecat+cli-core@0.665.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.101.0_commander@15_1712fa6347d2f5f4f52e592cd2c1c3bf/node_modules/@wirecat/cli-core/dist/mcp/server.js
427
431
  var PER_RUN = /* @__PURE__ */ new Set([
428
432
  "streams",
429
433
  "stdin",
@@ -482,7 +486,7 @@ var createServer = /* @__PURE__ */ __name((command, context, messenger, sessionO
482
486
  return void 0;
483
487
  }
484
488
  }, "stdin");
485
- const syncAllowed = /* @__PURE__ */ __name((path) => syncsFirst(messenger) && levelOf("messages.sync-first") === "allow" && (path[0] !== "stats" || levelOf(`${path.join(".")}.sync-first`) === "allow"), "syncAllowed");
489
+ const syncAllowed = /* @__PURE__ */ __name((path) => syncsFirst(messenger) && fetchesAt(levelOf("messages.sync-first")) && (path[0] !== "stats" || fetchesAt(levelOf(`${path.join(".")}.sync-first`))), "syncAllowed");
486
490
  const generated = toolsFromCommands(program.commands, {
487
491
  includeUnavailable: true,
488
492
  exclude: [["bot"]],
@@ -588,8 +592,8 @@ var createServer = /* @__PURE__ */ __name((command, context, messenger, sessionO
588
592
  });
589
593
  }), "invoke");
590
594
  let queue = Promise.resolve();
591
- const queued = /* @__PURE__ */ __name((one, input, env, caller) => {
592
- const next = queue.then(() => invoke(one, input, env, caller));
595
+ const queued = /* @__PURE__ */ __name((one, input, env, caller, signal) => {
596
+ const next = queue.then(() => signal?.aborted ? { error: errorObjectOf(new CliError("cancelled", `${one.command} was cancelled before it started`)) } : invoke(one, input, env, caller));
593
597
  queue = next.catch(() => void 0);
594
598
  return next;
595
599
  }, "queued");
@@ -605,7 +609,7 @@ var createServer = /* @__PURE__ */ __name((command, context, messenger, sessionO
605
609
  const traceparent = ctx?.mcpReq?._meta?.traceparent;
606
610
  const env = typeof traceparent === "string" ? { ...context.env, TRACEPARENT: traceparent } : context.env;
607
611
  const caller = callerOf(ctx, keyOfCommand(one.command), source);
608
- const answer = await withCaller(caller, () => queued(one, args, env, caller));
612
+ const answer = await withCaller(caller, () => queued(one, args, env, caller, ctx?.mcpReq?.signal));
609
613
  const result = "error" in answer ? mcpErrorResult(JSON.parse(agentJson(answer.error))) : (() => {
610
614
  try {
611
615
  return answered(envelope(one.command, answer.result), DEFAULT_OUTPUT_BYTES, targets);
@@ -661,7 +665,7 @@ var createServer = /* @__PURE__ */ __name((command, context, messenger, sessionO
661
665
  spawnJob: sessionOptions.spawnJob,
662
666
  limit: settings.limit,
663
667
  get syncAllowed() {
664
- return syncsFirst(messenger) && levelOf("messages.sync-first") === "allow";
668
+ return syncsFirst(messenger) && fetchesAt(levelOf("messages.sync-first"));
665
669
  },
666
670
  guard,
667
671
  settings,
@@ -728,18 +732,8 @@ var serveOverStdio = /* @__PURE__ */ __name(async (command, context, messenger,
728
732
  transport: new StdioServerTransport(wire.input, wire.output),
729
733
  onerror: /* @__PURE__ */ __name((error) => context.renderer.note(`mcp: ${error.message}`), "onerror")
730
734
  });
731
- const ended = await new Promise((resolve) => {
732
- wire.ended.then(() => resolve("input"));
733
- if (own)
734
- signal?.addEventListener("abort", () => resolve("stopped"), { once: true });
735
- else {
736
- process.once("SIGINT", () => resolve("stopped"));
737
- process.once("SIGTERM", () => resolve("stopped"));
738
- }
739
- });
735
+ await wire.finished(own ? signal : void 0);
740
736
  try {
741
- if (ended === "input")
742
- await wire.answered();
743
737
  wire.release();
744
738
  await handle.close();
745
739
  await session.close();
@@ -750,7 +744,7 @@ var serveOverStdio = /* @__PURE__ */ __name(async (command, context, messenger,
750
744
  }, "serveOverStdio");
751
745
  var serveOverHttpUntilStopped = /* @__PURE__ */ __name(async (command, context, messenger, options, http) => {
752
746
  const { session, embedders, build, log } = createServer(command, context, messenger, options);
753
- const { serveOverHttp } = await import("./serve-MP3GA2XX.js");
747
+ const { serveOverHttp } = await import("./serve-FXJNUOTS.js");
754
748
  const appName = messenger.app.command;
755
749
  const appEnvPrefix = messenger.app.envPrefix;
756
750
  const listening = await serveOverHttp(build, {
@@ -3,12 +3,12 @@ const require = __bundleRequire(import.meta.url);
3
3
  import {
4
4
  CliError,
5
5
  errorCodes
6
- } from "./chunk-7KCBPAQS.js";
6
+ } from "./chunk-F6MLJ3V5.js";
7
7
  import {
8
8
  __name
9
9
  } from "./chunk-ZVVMGPBJ.js";
10
10
 
11
- // node_modules/.pnpm/@wirecat+cli-core@0.659.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._7ae9f69690019eb17dc9f8442c19cb73/node_modules/@wirecat/cli-core/dist/errors/failures.js
11
+ // node_modules/.pnpm/@wirecat+cli-core@0.665.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.101.0_commander@15_1712fa6347d2f5f4f52e592cd2c1c3bf/node_modules/@wirecat/cli-core/dist/errors/failures.js
12
12
  var isCliFailure = /* @__PURE__ */ __name((value) => value instanceof Error && value.name === "CliError" && errorCodes.includes(value.code), "isCliFailure");
13
13
  var isCommanderFailure = /* @__PURE__ */ __name((value) => {
14
14
  const { code, exitCode } = value ?? {};
@@ -60,7 +60,7 @@ var damagedFile = /* @__PURE__ */ __name(async (files, work) => {
60
60
  }, "damagedFile");
61
61
  var isStoreDamage = /* @__PURE__ */ __name((error) => damageIn(error) !== void 0, "isStoreDamage");
62
62
 
63
- // node_modules/.pnpm/@wirecat+cli-core@0.659.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._7ae9f69690019eb17dc9f8442c19cb73/node_modules/@wirecat/cli-core/dist/runs/secrets.js
63
+ // node_modules/.pnpm/@wirecat+cli-core@0.665.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.101.0_commander@15_1712fa6347d2f5f4f52e592cd2c1c3bf/node_modules/@wirecat/cli-core/dist/runs/secrets.js
64
64
  var SECRET_WORDS = /* @__PURE__ */ new Set([
65
65
  "authorization",
66
66
  "cookie",
@@ -3,15 +3,15 @@ const require = __bundleRequire(import.meta.url);
3
3
  import {
4
4
  readSharedSection,
5
5
  writeSharedSection
6
- } from "./chunk-ERUB3KU3.js";
6
+ } from "./chunk-B5RGPZDZ.js";
7
7
  import {
8
8
  CliError
9
- } from "./chunk-7KCBPAQS.js";
9
+ } from "./chunk-F6MLJ3V5.js";
10
10
  import {
11
11
  __name
12
12
  } from "./chunk-ZVVMGPBJ.js";
13
13
 
14
- // node_modules/.pnpm/@wirecat+cli-core@0.659.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._7ae9f69690019eb17dc9f8442c19cb73/node_modules/@wirecat/cli-core/dist/cli/setup-answers.js
14
+ // node_modules/.pnpm/@wirecat+cli-core@0.665.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.101.0_commander@15_1712fa6347d2f5f4f52e592cd2c1c3bf/node_modules/@wirecat/cli-core/dist/cli/setup-answers.js
15
15
  var PERMISSION_ANSWERS = ["readonly", "allow"];
16
16
  var QUESTIONS = ["languages", "tools", "permissions"];
17
17
  var SECTION = "setup";
@@ -4,7 +4,7 @@ import {
4
4
  __name
5
5
  } from "./chunk-ZVVMGPBJ.js";
6
6
 
7
- // node_modules/.pnpm/@wirecat+cli-core@0.659.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._7ae9f69690019eb17dc9f8442c19cb73/node_modules/@wirecat/cli-core/dist/background/processes.js
7
+ // node_modules/.pnpm/@wirecat+cli-core@0.665.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.101.0_commander@15_1712fa6347d2f5f4f52e592cd2c1c3bf/node_modules/@wirecat/cli-core/dist/background/processes.js
8
8
  import { execFileSync } from "node:child_process";
9
9
  import { readdirSync, readFileSync, readlinkSync } from "node:fs";
10
10
  var alive = /* @__PURE__ */ __name((pid) => {
@@ -4,22 +4,22 @@ import {
4
4
  isCliFailure,
5
5
  secretNamed,
6
6
  withoutSecrets
7
- } from "./chunk-APSMQIA4.js";
7
+ } from "./chunk-QBNEWEJC.js";
8
8
  import {
9
9
  isContentKey
10
- } from "./chunk-NM5GBJME.js";
10
+ } from "./chunk-HT6OFANN.js";
11
11
  import {
12
12
  __name
13
13
  } from "./chunk-ZVVMGPBJ.js";
14
14
 
15
- // node_modules/.pnpm/@wirecat+cli-core@0.659.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._7ae9f69690019eb17dc9f8442c19cb73/node_modules/@wirecat/cli-core/dist/runs/run-context.js
15
+ // node_modules/.pnpm/@wirecat+cli-core@0.665.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.101.0_commander@15_1712fa6347d2f5f4f52e592cd2c1c3bf/node_modules/@wirecat/cli-core/dist/runs/run-context.js
16
16
  import { AsyncLocalStorage } from "node:async_hooks";
17
17
  import { createHash } from "node:crypto";
18
18
 
19
- // node_modules/.pnpm/@wirecat+cli-core@0.659.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._7ae9f69690019eb17dc9f8442c19cb73/node_modules/@wirecat/cli-core/dist/runs/error-detail.js
19
+ // node_modules/.pnpm/@wirecat+cli-core@0.665.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.101.0_commander@15_1712fa6347d2f5f4f52e592cd2c1c3bf/node_modules/@wirecat/cli-core/dist/runs/error-detail.js
20
20
  import { homedir } from "node:os";
21
21
 
22
- // node_modules/.pnpm/@wirecat+cli-core@0.659.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._7ae9f69690019eb17dc9f8442c19cb73/node_modules/@wirecat/cli-core/dist/runs/events.js
22
+ // node_modules/.pnpm/@wirecat+cli-core@0.665.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.101.0_commander@15_1712fa6347d2f5f4f52e592cd2c1c3bf/node_modules/@wirecat/cli-core/dist/runs/events.js
23
23
  var providerErrorKey = /* @__PURE__ */ __name((value) => typeof value === "string" && /^[A-Za-z][A-Za-z0-9._-]{0,63}$/.test(value) ? value : void 0, "providerErrorKey");
24
24
  var renderEvent = /* @__PURE__ */ __name((event) => {
25
25
  if (event.event === "store")
@@ -71,7 +71,7 @@ var MARK = { request: "\u2192", response: "\u2190", cache: "\u2022", warning: "!
71
71
  var age = /* @__PURE__ */ __name((ms) => ms < 1e3 ? `${ms}ms` : `${Math.round(ms / 1e3)}s`, "age");
72
72
  var size = /* @__PURE__ */ __name((bytes) => bytes < 1e3 ? `${bytes} B` : `${(bytes / 1e3).toFixed(1)} kB`, "size");
73
73
 
74
- // node_modules/.pnpm/@wirecat+cli-core@0.659.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._7ae9f69690019eb17dc9f8442c19cb73/node_modules/@wirecat/cli-core/dist/runs/error-detail.js
74
+ // node_modules/.pnpm/@wirecat+cli-core@0.665.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.101.0_commander@15_1712fa6347d2f5f4f52e592cd2c1c3bf/node_modules/@wirecat/cli-core/dist/runs/error-detail.js
75
75
  var MESSAGE_AT_MOST = 500;
76
76
  var CAUSES_AT_MOST = 5;
77
77
  var FRAMES_AT_MOST = 15;
@@ -183,7 +183,7 @@ var redactText = /* @__PURE__ */ __name((text) => {
183
183
  return out.length > MESSAGE_AT_MOST ? `${out.slice(0, MESSAGE_AT_MOST)}\u2026` : out;
184
184
  }, "redactText");
185
185
 
186
- // node_modules/.pnpm/@wirecat+cli-core@0.659.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._7ae9f69690019eb17dc9f8442c19cb73/node_modules/@wirecat/cli-core/dist/runs/run-context.js
186
+ // node_modules/.pnpm/@wirecat+cli-core@0.665.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.101.0_commander@15_1712fa6347d2f5f4f52e592cd2c1c3bf/node_modules/@wirecat/cli-core/dist/runs/run-context.js
187
187
  var REDACTED = "[redacted]";
188
188
  var keepsSuccess = /* @__PURE__ */ __name(({ record, fromFlag, env, caller, persistent = false }) => {
189
189
  if (!record)
@@ -4,7 +4,7 @@ import {
4
4
  __name
5
5
  } from "./chunk-ZVVMGPBJ.js";
6
6
 
7
- // node_modules/.pnpm/@wirecat+cli-core@0.659.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._7ae9f69690019eb17dc9f8442c19cb73/node_modules/@wirecat/cli-core/dist/mcp/instructions.js
7
+ // node_modules/.pnpm/@wirecat+cli-core@0.665.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.101.0_commander@15_1712fa6347d2f5f4f52e592cd2c1c3bf/node_modules/@wirecat/cli-core/dist/mcp/instructions.js
8
8
  var instructions = /* @__PURE__ */ __name(({ command, name, profile, writes, skill }) => {
9
9
  const all = typeof profile !== "string";
10
10
  const offers = /* @__PURE__ */ __name((key) => all || writes.includes(key), "offers");
@@ -2,20 +2,20 @@ import { createRequire as __bundleRequire } from "node:module";
2
2
  const require = __bundleRequire(import.meta.url);
3
3
  import {
4
4
  unit
5
- } from "./chunk-QPVCFSVU.js";
5
+ } from "./chunk-RZPMFVWM.js";
6
6
  import {
7
7
  PLAIN_HTTP_REFUSED,
8
8
  modelAddressAllowed,
9
9
  onThisComputer
10
- } from "./chunk-UIQMBOXU.js";
10
+ } from "./chunk-RPWYTOLI.js";
11
11
  import {
12
12
  readSharedSection,
13
13
  sharedConfigPath,
14
14
  writeSharedSection
15
- } from "./chunk-ERUB3KU3.js";
15
+ } from "./chunk-B5RGPZDZ.js";
16
16
  import {
17
17
  storePath
18
- } from "./chunk-Y62I2T36.js";
18
+ } from "./chunk-VSPSHBAC.js";
19
19
  import {
20
20
  boolean,
21
21
  isoTimestamp,
@@ -23,18 +23,18 @@ import {
23
23
  safeParse,
24
24
  strictObject,
25
25
  string
26
- } from "./chunk-XS5C5TQ7.js";
26
+ } from "./chunk-AUNNJDVD.js";
27
27
  import {
28
28
  CliError
29
- } from "./chunk-7KCBPAQS.js";
29
+ } from "./chunk-F6MLJ3V5.js";
30
30
  import {
31
31
  __name
32
32
  } from "./chunk-ZVVMGPBJ.js";
33
33
 
34
- // node_modules/.pnpm/@wirecat+cli-core@0.659.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._7ae9f69690019eb17dc9f8442c19cb73/node_modules/@wirecat/cli-core/dist/embeddings/remote.js
34
+ // node_modules/.pnpm/@wirecat+cli-core@0.665.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.101.0_commander@15_1712fa6347d2f5f4f52e592cd2c1c3bf/node_modules/@wirecat/cli-core/dist/embeddings/remote.js
35
35
  import { setTimeout } from "node:timers/promises";
36
36
 
37
- // node_modules/.pnpm/@wirecat+cli-core@0.659.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._7ae9f69690019eb17dc9f8442c19cb73/node_modules/@wirecat/cli-core/dist/models/local-only.js
37
+ // node_modules/.pnpm/@wirecat+cli-core@0.665.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.101.0_commander@15_1712fa6347d2f5f4f52e592cd2c1c3bf/node_modules/@wirecat/cli-core/dist/models/local-only.js
38
38
  var SECTION = "local_only";
39
39
  var Setting = strictObject({
40
40
  on: boolean(),
@@ -68,7 +68,7 @@ var refuseModelAddress = /* @__PURE__ */ __name((env, address, what) => {
68
68
  refuseOffComputer(env, address, what);
69
69
  }, "refuseModelAddress");
70
70
 
71
- // node_modules/.pnpm/@wirecat+cli-core@0.659.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._7ae9f69690019eb17dc9f8442c19cb73/node_modules/@wirecat/cli-core/dist/embeddings/remote.js
71
+ // node_modules/.pnpm/@wirecat+cli-core@0.665.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.101.0_commander@15_1712fa6347d2f5f4f52e592cd2c1c3bf/node_modules/@wirecat/cli-core/dist/embeddings/remote.js
72
72
  var OPENAI_URL = "https://api.openai.com/v1";
73
73
  var OPENAI_MODELS = {
74
74
  "text-embedding-3-small": { dims: 1536, perMillion: 0.02 },
@@ -3,12 +3,12 @@ const require = __bundleRequire(import.meta.url);
3
3
  import {
4
4
  CliError,
5
5
  isCliError
6
- } from "./chunk-7KCBPAQS.js";
6
+ } from "./chunk-F6MLJ3V5.js";
7
7
  import {
8
8
  __name
9
9
  } from "./chunk-ZVVMGPBJ.js";
10
10
 
11
- // node_modules/.pnpm/@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/http/hosts.js
11
+ // node_modules/.pnpm/@wirecat+cli-base@0.101.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/http/hosts.js
12
12
  var LABEL = "[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?";
13
13
  var HOST_PATTERN = new RegExp(`^(?:${LABEL}(?:\\.${LABEL})*|\\*\\.${LABEL}(?:\\.${LABEL})+)$`);
14
14
  var hostProblems = /* @__PURE__ */ __name((hosts) => [
@@ -20,7 +20,7 @@ var hostCovered = /* @__PURE__ */ __name((hostname, hosts) => {
20
20
  return hosts.some((host) => host.startsWith("*.") ? name.endsWith(host.slice(1)) : name === host);
21
21
  }, "hostCovered");
22
22
 
23
- // node_modules/.pnpm/@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/http/fetch.js
23
+ // node_modules/.pnpm/@wirecat+cli-base@0.101.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/http/fetch.js
24
24
  var HOST_FETCH_TIMEOUT_MS = 3e4;
25
25
  var REDIRECTS = 5;
26
26
  var REDIRECT_STATUSES = /* @__PURE__ */ new Set([301, 302, 303, 307, 308]);
@@ -108,7 +108,7 @@ var hostFetch = /* @__PURE__ */ __name((options) => {
108
108
  };
109
109
  }, "hostFetch");
110
110
 
111
- // node_modules/.pnpm/@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/http/index.js
111
+ // node_modules/.pnpm/@wirecat+cli-base@0.101.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/http/index.js
112
112
  var parseRetryAfter = /* @__PURE__ */ __name((header, now) => {
113
113
  if (!header)
114
114
  return void 0;
@@ -132,7 +132,7 @@ var parseRateLimitReset = /* @__PURE__ */ __name((header, now) => {
132
132
  }, "parseRateLimitReset");
133
133
  var providerWaitMs = /* @__PURE__ */ __name((headers, now) => parseRetryAfter(headers.get("retry-after"), now) ?? parseRateLimitReset(headers.get("x-ratelimit-reset"), now), "providerWaitMs");
134
134
 
135
- // node_modules/.pnpm/@wirecat+cli-core@0.659.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._7ae9f69690019eb17dc9f8442c19cb73/node_modules/@wirecat/cli-core/dist/models/endpoint.js
135
+ // node_modules/.pnpm/@wirecat+cli-core@0.665.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.101.0_commander@15_1712fa6347d2f5f4f52e592cd2c1c3bf/node_modules/@wirecat/cli-core/dist/models/endpoint.js
136
136
  var endpoint = /* @__PURE__ */ __name((value) => {
137
137
  try {
138
138
  const url = new URL(value);
@@ -5,23 +5,23 @@ import {
5
5
  installFiles,
6
6
  megabytes,
7
7
  sharedModelsDirectory
8
- } from "./chunk-3I3TGKVG.js";
8
+ } from "./chunk-IV6SIKVH.js";
9
9
  import {
10
10
  importFrom
11
11
  } from "./chunk-Y5E2WNWB.js";
12
12
  import {
13
13
  CliError
14
- } from "./chunk-7KCBPAQS.js";
14
+ } from "./chunk-F6MLJ3V5.js";
15
15
  import {
16
16
  __name
17
17
  } from "./chunk-ZVVMGPBJ.js";
18
18
 
19
- // node_modules/.pnpm/@wirecat+cli-core@0.659.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._7ae9f69690019eb17dc9f8442c19cb73/node_modules/@wirecat/cli-core/dist/embeddings/embed.js
19
+ // node_modules/.pnpm/@wirecat+cli-core@0.665.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.101.0_commander@15_1712fa6347d2f5f4f52e592cd2c1c3bf/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.659.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._7ae9f69690019eb17dc9f8442c19cb73/node_modules/@wirecat/cli-core/dist/embeddings/onnx-runtime.js
24
+ // node_modules/.pnpm/@wirecat+cli-core@0.665.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.101.0_commander@15_1712fa6347d2f5f4f52e592cd2c1c3bf/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,7 +678,7 @@ var Unzip = /* @__PURE__ */ (function() {
678
678
  return Unzip2;
679
679
  })();
680
680
 
681
- // node_modules/.pnpm/@wirecat+cli-core@0.659.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._7ae9f69690019eb17dc9f8442c19cb73/node_modules/@wirecat/cli-core/dist/embeddings/onnx-runtime.js
681
+ // node_modules/.pnpm/@wirecat+cli-core@0.665.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.101.0_commander@15_1712fa6347d2f5f4f52e592cd2c1c3bf/node_modules/@wirecat/cli-core/dist/embeddings/onnx-runtime.js
682
682
  var ONNX_RUNTIME_VERSION = "1.30.0";
683
683
  var release = /* @__PURE__ */ __name((name, sha256, bytes) => ({
684
684
  name,
@@ -858,7 +858,7 @@ var openSession = /* @__PURE__ */ __name(async (bytes, threads, options = {}) =>
858
858
  return { ort, session: await ort.InferenceSession.create(bytes, options) };
859
859
  }, "openSession");
860
860
 
861
- // node_modules/.pnpm/@wirecat+cli-core@0.659.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._7ae9f69690019eb17dc9f8442c19cb73/node_modules/@wirecat/cli-core/dist/embeddings/embed.js
861
+ // node_modules/.pnpm/@wirecat+cli-core@0.665.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.101.0_commander@15_1712fa6347d2f5f4f52e592cd2c1c3bf/node_modules/@wirecat/cli-core/dist/embeddings/embed.js
862
862
  var textModelsDirectory = /* @__PURE__ */ __name((env = process.env) => sharedModelsDirectory("text", env), "textModelsDirectory");
863
863
  var placedText = /* @__PURE__ */ __name((model, directory) => model.files.map((file) => [file, join2(directory, model.id, file.name)]), "placedText");
864
864
  var isTextModelInstalled = /* @__PURE__ */ __name((model, directory) => filesPresent(placedText(model, directory)), "isTextModelInstalled");