@wirecat/tg-cli 0.120.0 → 0.121.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 (94) hide show
  1. package/contracts/wirecat.json +25 -3
  2. package/dist/bin/tg.js +2 -2
  3. package/dist/bundle/{adapter-OJKHXGBC.js → adapter-GVSBFSBY.js} +53 -49
  4. package/dist/bundle/{all-profiles-URIWNL23.js → all-profiles-CTOGU4XR.js} +6 -6
  5. package/dist/bundle/{anthropic-YUKNB63B.js → anthropic-7472H6ES.js} +13 -4
  6. package/dist/bundle/{app-server-H5QNHGH4.js → app-server-GZWV4NPR.js} +43 -42
  7. package/dist/bundle/{bot-api-27GN4Y3D.js → bot-api-PPVAKICN.js} +47 -44
  8. package/dist/bundle/{bot-history-VVSWLVZM.js → bot-history-7YY7MCR4.js} +12 -12
  9. package/dist/bundle/{bun-PAAJX3GU.js → bun-KCN62RMD.js} +2 -2
  10. package/dist/bundle/{bun-sqlite-TPEBWFZH.js → bun-sqlite-2BNE56MY.js} +2 -2
  11. package/dist/bundle/{chunk-FPWXG53C.js → chunk-24DWSW6H.js} +35 -120
  12. package/dist/bundle/{chunk-DDKFAUQD.js → chunk-3E35VJME.js} +1 -1
  13. package/dist/bundle/{chunk-KP26Y5OA.js → chunk-3EGVR7OF.js} +4883 -4825
  14. package/dist/bundle/{chunk-CYWV2RLN.js → chunk-3HNI6GI7.js} +4 -4
  15. package/dist/bundle/{chunk-U2TPRUWK.js → chunk-4HJCWFPN.js} +81 -81
  16. package/dist/bundle/{chunk-KW6JZGG3.js → chunk-4J34T6IQ.js} +1 -1
  17. package/dist/bundle/{chunk-MMPISXSU.js → chunk-54KFRAHF.js} +1 -1
  18. package/dist/bundle/{chunk-ZRRZTPSB.js → chunk-5P43K3GL.js} +1418 -742
  19. package/dist/bundle/{chunk-3GLLWDM6.js → chunk-6LRKWXCS.js} +16 -16
  20. package/dist/bundle/{chunk-3FPFRDG2.js → chunk-6SQAE7NM.js} +6 -6
  21. package/dist/bundle/{chunk-WLBPNLDF.js → chunk-7MXRFFIT.js} +2 -2
  22. package/dist/bundle/{chunk-KRCMKFUV.js → chunk-7UIMMQOV.js} +1 -1
  23. package/dist/bundle/{chunk-DH7VKHTZ.js → chunk-AYDLA27G.js} +3 -3
  24. package/dist/bundle/{chunk-7N4IUEX3.js → chunk-BJTJBNR7.js} +6 -6
  25. package/dist/bundle/{chunk-JJY3TQTM.js → chunk-CLMRF6XR.js} +2 -2
  26. package/dist/bundle/{chunk-JQLGS3SG.js → chunk-CMEWPXKU.js} +1 -1
  27. package/dist/bundle/{chunk-THJHYMFR.js → chunk-CPDYPZIG.js} +3599 -3595
  28. package/dist/bundle/{chunk-WQ55F4Y3.js → chunk-DAK2J3FG.js} +7 -7
  29. package/dist/bundle/{chunk-YDROJG2Y.js → chunk-DG44ORQ3.js} +4 -4
  30. package/dist/bundle/{chunk-D2WNQJUQ.js → chunk-ESLV57MC.js} +1 -1
  31. package/dist/bundle/{chunk-CLTMVPGT.js → chunk-FERGNQYA.js} +12 -12
  32. package/dist/bundle/{chunk-KTV5Y5EX.js → chunk-GB55EDOF.js} +1 -1
  33. package/dist/bundle/chunk-GNGYV5NX.js +116 -0
  34. package/dist/bundle/{chunk-4OWY7QBE.js → chunk-KKD5ZPGD.js} +5 -5
  35. package/dist/bundle/{chunk-4JATS2J5.js → chunk-KPAUPIC3.js} +2 -2
  36. package/dist/bundle/chunk-KVW7LCZK.js +109 -0
  37. package/dist/bundle/{chunk-LLCGOZ44.js → chunk-LTAHG7BO.js} +2 -2
  38. package/dist/bundle/{chunk-DE7QIEUP.js → chunk-M47CXY5J.js} +30 -49
  39. package/dist/bundle/{chunk-DQTQO6PB.js → chunk-M73VM67N.js} +1209 -851
  40. package/dist/bundle/{chunk-6XHZV7AQ.js → chunk-MAPJUOTD.js} +3 -3
  41. package/dist/bundle/{chunk-S6OC367D.js → chunk-MKAKM3V7.js} +2 -2
  42. package/dist/bundle/{chunk-LS72R7DN.js → chunk-NR7PGYPO.js} +37 -35
  43. package/dist/bundle/chunk-PLBEUSZP.js +18 -0
  44. package/dist/bundle/{chunk-B7B65ZLU.js → chunk-QMNUQTA2.js} +1 -1
  45. package/dist/bundle/{chunk-3SANNNWS.js → chunk-QNNUNGPL.js} +2 -2
  46. package/dist/bundle/{chunk-YQKEPT22.js → chunk-QQ264PXQ.js} +1 -1
  47. package/dist/bundle/{chunk-JSEIT2WO.js → chunk-R6KXHBMW.js} +1 -1
  48. package/dist/bundle/{chunk-YBOVL25O.js → chunk-RPBO5XL3.js} +16 -16
  49. package/dist/bundle/{chunk-VUUR2SRS.js → chunk-RZX7RDXY.js} +33 -16
  50. package/dist/bundle/{chunk-7VNV426X.js → chunk-S7P5X23R.js} +26 -22
  51. package/dist/bundle/{chunk-HDSKBXAF.js → chunk-SHIHW2YN.js} +2 -2
  52. package/dist/bundle/{chunk-7WS3ULOO.js → chunk-SQWTUENZ.js} +1155 -800
  53. package/dist/bundle/{chunk-34DSPJNN.js → chunk-T7ONSJAA.js} +2 -2
  54. package/dist/bundle/{chunk-HIBYYKGO.js → chunk-TEMCXODM.js} +1 -1
  55. package/dist/bundle/{chunk-MTD6WZKV.js → chunk-VAAZL6OD.js} +6 -6
  56. package/dist/bundle/{chunk-PDYTNTQI.js → chunk-VPNLTNQD.js} +5 -5
  57. package/dist/bundle/{chunk-ZON7K5QE.js → chunk-W77WC6ZK.js} +2 -2
  58. package/dist/bundle/{chunk-KLHOQ6XQ.js → chunk-Y4CSR5RP.js} +3 -1
  59. package/dist/bundle/{chunk-CGUDXNJE.js → chunk-YMJKHMHX.js} +1 -1
  60. package/dist/bundle/{chunk-CLURRDNU.js → chunk-YRY752BB.js} +4 -4
  61. package/dist/bundle/{chunk-H5XC2WYO.js → chunk-ZSW7LN7T.js} +22 -22
  62. package/dist/bundle/{command-contract-KW6FNOJO.js → command-contract-3W73W27G.js} +12 -12
  63. package/dist/bundle/command-server-entry-37PKBJ5A.js +146 -0
  64. package/dist/bundle/{decode-RVWSCZW4.js → decode-F7KC7WT4.js} +2 -2
  65. package/dist/bundle/{echarts-6VNUD3JF.js → echarts-4VYG66GX.js} +2 -2
  66. package/dist/bundle/{embed-LWLCQKIK.js → embed-ENZ6R4HF.js} +3 -3
  67. package/dist/bundle/{embedder-CXKHLRJT.js → embedder-4CBICMFO.js} +6 -6
  68. package/dist/bundle/{entry-HV4NSX3Z.js → entry-XQ562EDO.js} +7 -4
  69. package/dist/bundle/{first-run-OPI6NIWQ.js → first-run-PPXOC6ID.js} +5 -5
  70. package/dist/bundle/{first-screen-BVQLF4LN.js → first-screen-JC6BYZYD.js} +13 -13
  71. package/dist/bundle/{instructions-TK4HXL3A.js → instructions-XLCMJ5PJ.js} +1 -1
  72. package/dist/bundle/{node-WFPNBUCU.js → node-SSAC67R5.js} +2 -2
  73. package/dist/bundle/{node-sqlite-L5BRGJLK.js → node-sqlite-SUUUSYSZ.js} +3 -3
  74. package/dist/bundle/{oauth-CGVWL35B.js → oauth-2ZNHMPEX.js} +4 -4
  75. package/dist/bundle/{open-HLL55C5S.js → open-EFNT7V2Q.js} +2 -2
  76. package/dist/bundle/{openai-YFCNXIJ4.js → openai-7STFVJXA.js} +13 -13
  77. package/dist/bundle/{process-4A5JP5LO.js → process-63F4PNWH.js} +1 -1
  78. package/dist/bundle/{program-IFGQGSUF.js → program-C2E3TQNK.js} +63 -60
  79. package/dist/bundle/{prompt-B5FYE2DQ.js → prompt-QPO7EKD5.js} +2 -2
  80. package/dist/bundle/{recognize-ZHMHGIV3.js → recognize-MLXEHFYL.js} +1 -1
  81. package/dist/bundle/{remote-A3W5HE52.js → remote-DO7FLJEF.js} +4 -4
  82. package/dist/bundle/{rerank-HWJAQOZM.js → rerank-W3WSBDAM.js} +4 -4
  83. package/dist/bundle/{serve-PP326Q2F.js → serve-Z3TOTEMQ.js} +11 -11
  84. package/dist/bundle/{server-MV6CL63L.js → server-BYSOJCUA.js} +32 -32
  85. package/dist/bundle/server-IRUVLXD4.js +61 -0
  86. package/dist/bundle/{state-Y3RJ7ZXB.js → state-PKRPBCMY.js} +3 -3
  87. package/dist/bundle/{store-EVNI2MHZ.js → store-Y4G7CNJT.js} +9 -9
  88. package/dist/bundle/store-maintenance-command-PHK43OSM.js +49 -0
  89. package/dist/bundle/tg.js +4 -4
  90. package/dist/version.d.ts +1 -1
  91. package/dist/version.js +1 -1
  92. package/package.json +2 -2
  93. package/dist/bundle/server-TZGGOJ26.js +0 -60
  94. package/dist/bundle/store-maintenance-command-XPQE47RE.js +0 -49
@@ -10,10 +10,10 @@ import {
10
10
  __name
11
11
  } from "./chunk-ZVVMGPBJ.js";
12
12
 
13
- // node_modules/.pnpm/@wirecat+cli-core@0.619.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._3343d636b3fedf7ef3285e4c7a47096e/node_modules/@wirecat/cli-core/dist/speech/recognize.js
13
+ // node_modules/.pnpm/@wirecat+cli-core@0.624.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._325ff8c9daf4b8769887d5253d3c1255/node_modules/@wirecat/cli-core/dist/speech/recognize.js
14
14
  import { createRequire } from "node:module";
15
15
 
16
- // node_modules/.pnpm/@wirecat+cli-core@0.619.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._3343d636b3fedf7ef3285e4c7a47096e/node_modules/@wirecat/cli-core/dist/speech/ogg-limit.js
16
+ // node_modules/.pnpm/@wirecat+cli-core@0.624.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._325ff8c9daf4b8769887d5253d3c1255/node_modules/@wirecat/cli-core/dist/speech/ogg-limit.js
17
17
  var invalid = /* @__PURE__ */ __name(() => new CliError("validation_error", "local transcription needs a complete mono or stereo Ogg Opus recording"), "invalid");
18
18
  var checkOggDuration = /* @__PURE__ */ __name((bytes) => {
19
19
  const view = new DataView(bytes.buffer, bytes.byteOffset, bytes.byteLength);
@@ -70,7 +70,7 @@ var checkOggDuration = /* @__PURE__ */ __name((bytes) => {
70
70
  throw invalid();
71
71
  }, "checkOggDuration");
72
72
 
73
- // node_modules/.pnpm/@wirecat+cli-core@0.619.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._3343d636b3fedf7ef3285e4c7a47096e/node_modules/@wirecat/cli-core/dist/speech/recognize.js
73
+ // node_modules/.pnpm/@wirecat+cli-core@0.624.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._325ff8c9daf4b8769887d5253d3c1255/node_modules/@wirecat/cli-core/dist/speech/recognize.js
74
74
  var SAMPLE_RATE = 16e3;
75
75
  var LEAD = SAMPLE_RATE / 2;
76
76
  var toModelRate = /* @__PURE__ */ __name((samples, rate) => {
@@ -17,7 +17,7 @@ import {
17
17
  __name
18
18
  } from "./chunk-ZVVMGPBJ.js";
19
19
 
20
- // node_modules/.pnpm/@wirecat+cli-core@0.619.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._3343d636b3fedf7ef3285e4c7a47096e/node_modules/@wirecat/cli-core/dist/models/options.js
20
+ // node_modules/.pnpm/@wirecat+cli-core@0.624.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._325ff8c9daf4b8769887d5253d3c1255/node_modules/@wirecat/cli-core/dist/models/options.js
21
21
  var checkedOptions = /* @__PURE__ */ __name((provider, schema, options) => {
22
22
  const parsed = safeParse(schema, options);
23
23
  if (!parsed.success) {
@@ -27,7 +27,7 @@ var checkedOptions = /* @__PURE__ */ __name((provider, schema, options) => {
27
27
  }, "checkedOptions");
28
28
  var range = /* @__PURE__ */ __name((min, max) => optional(pipe(number(), finite(), minValue(min), maxValue(max))), "range");
29
29
 
30
- // node_modules/.pnpm/@wirecat+cli-core@0.619.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._3343d636b3fedf7ef3285e4c7a47096e/node_modules/@wirecat/cli-core/dist/models/types.js
30
+ // node_modules/.pnpm/@wirecat+cli-core@0.624.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._325ff8c9daf4b8769887d5253d3c1255/node_modules/@wirecat/cli-core/dist/models/types.js
31
31
  var MAX_MODEL_IMAGE_BYTES = 4 * 1024 * 1024;
32
32
  var validateImages = /* @__PURE__ */ __name((images) => {
33
33
  if (images === void 0)
@@ -20,7 +20,7 @@ import {
20
20
  tool,
21
21
  toolKey,
22
22
  toolsFromCommands
23
- } from "./chunk-VUUR2SRS.js";
23
+ } from "./chunk-RZX7RDXY.js";
24
24
  import {
25
25
  CHART_KINDS,
26
26
  CHART_SIZE,
@@ -32,32 +32,34 @@ import {
32
32
  mcpUrlOf,
33
33
  refuseWriteBeforeConnecting,
34
34
  registerPrompts,
35
- stdinFieldOf,
36
35
  syncsFirst
37
- } from "./chunk-DE7QIEUP.js";
36
+ } from "./chunk-M47CXY5J.js";
38
37
  import {
39
38
  agentJson,
40
39
  skillResource
41
- } from "./chunk-7VNV426X.js";
40
+ } from "./chunk-S7P5X23R.js";
42
41
  import {
43
42
  instructions
44
- } from "./chunk-YQKEPT22.js";
43
+ } from "./chunk-QQ264PXQ.js";
44
+ import {
45
+ mcpHttpMarker
46
+ } from "./chunk-3HNI6GI7.js";
45
47
  import {
46
48
  answeredWire
47
- } from "./chunk-JSEIT2WO.js";
49
+ } from "./chunk-R6KXHBMW.js";
48
50
  import {
49
51
  StdioServerTransport,
50
52
  callerOf,
51
53
  callingAgent,
52
54
  serveStdio
53
- } from "./chunk-34DSPJNN.js";
55
+ } from "./chunk-T7ONSJAA.js";
54
56
  import {
55
57
  McpServer,
56
58
  ResourceTemplate
57
59
  } from "./chunk-5D4AEUVA.js";
58
60
  import {
59
61
  connectedFor
60
- } from "./chunk-H5XC2WYO.js";
62
+ } from "./chunk-ZSW7LN7T.js";
61
63
  import {
62
64
  capability,
63
65
  dateWindow,
@@ -67,10 +69,20 @@ import {
67
69
  servicesFor,
68
70
  storedDeps,
69
71
  wholeList
70
- } from "./chunk-7WS3ULOO.js";
72
+ } from "./chunk-SQWTUENZ.js";
73
+ import {
74
+ openStore,
75
+ pdfPreviewLimits
76
+ } from "./chunk-5P43K3GL.js";
77
+ import {
78
+ warmEmbedders
79
+ } from "./chunk-KKD5ZPGD.js";
80
+ import {
81
+ stdinFieldOf
82
+ } from "./chunk-PLBEUSZP.js";
71
83
  import {
72
84
  findCommand
73
- } from "./chunk-LLCGOZ44.js";
85
+ } from "./chunk-LTAHG7BO.js";
74
86
  import {
75
87
  DEFAULT_OUTPUT_BYTES,
76
88
  changesAuthorityAt,
@@ -85,30 +97,20 @@ import {
85
97
  rootOf2 as rootOf,
86
98
  sealed,
87
99
  snakeKeys
88
- } from "./chunk-THJHYMFR.js";
100
+ } from "./chunk-CPDYPZIG.js";
89
101
  import {
90
102
  withCaller
91
- } from "./chunk-3FPFRDG2.js";
103
+ } from "./chunk-6SQAE7NM.js";
92
104
  import {
93
105
  readOnlyLockOf
94
- } from "./chunk-DDKFAUQD.js";
95
- import {
96
- mcpHttpMarker
97
- } from "./chunk-CYWV2RLN.js";
98
- import {
99
- openStore,
100
- pdfPreviewLimits
101
- } from "./chunk-ZRRZTPSB.js";
106
+ } from "./chunk-3E35VJME.js";
102
107
  import {
103
108
  timezoneOf,
104
109
  typedCommand
105
- } from "./chunk-KP26Y5OA.js";
110
+ } from "./chunk-3EGVR7OF.js";
106
111
  import {
107
112
  isCliFailure
108
- } from "./chunk-WLBPNLDF.js";
109
- import {
110
- warmEmbedders
111
- } from "./chunk-4OWY7QBE.js";
113
+ } from "./chunk-7MXRFFIT.js";
112
114
  import {
113
115
  description,
114
116
  integer,
@@ -133,10 +135,10 @@ import {
133
135
  __name
134
136
  } from "./chunk-ZVVMGPBJ.js";
135
137
 
136
- // node_modules/.pnpm/@wirecat+cli-core@0.619.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._3343d636b3fedf7ef3285e4c7a47096e/node_modules/@wirecat/cli-core/dist/mcp/server.js
138
+ // node_modules/.pnpm/@wirecat+cli-core@0.624.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._325ff8c9daf4b8769887d5253d3c1255/node_modules/@wirecat/cli-core/dist/mcp/server.js
137
139
  import { randomUUID } from "node:crypto";
138
140
 
139
- // node_modules/.pnpm/@wirecat+cli-core@0.619.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._3343d636b3fedf7ef3285e4c7a47096e/node_modules/@wirecat/cli-core/dist/mcp/agent-log.js
141
+ // node_modules/.pnpm/@wirecat+cli-core@0.624.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._325ff8c9daf4b8769887d5253d3c1255/node_modules/@wirecat/cli-core/dist/mcp/agent-log.js
140
142
  var agentLog = /* @__PURE__ */ __name((open) => {
141
143
  let held;
142
144
  return {
@@ -155,7 +157,7 @@ var agentLog = /* @__PURE__ */ __name((open) => {
155
157
  };
156
158
  }, "agentLog");
157
159
 
158
- // node_modules/.pnpm/@wirecat+cli-core@0.619.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._3343d636b3fedf7ef3285e4c7a47096e/node_modules/@wirecat/cli-core/dist/mcp/resources.js
160
+ // node_modules/.pnpm/@wirecat+cli-core@0.624.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._325ff8c9daf4b8769887d5253d3c1255/node_modules/@wirecat/cli-core/dist/mcp/resources.js
159
161
  var LISTED = 100;
160
162
  var registerResources = /* @__PURE__ */ __name((server, session, { command, name, limit, recorded, withStore, messenger, guard, assertRead }) => {
161
163
  server.registerResource("chat", new ResourceTemplate(`${command}://chat/{id}`, {
@@ -193,7 +195,7 @@ var registerResources = /* @__PURE__ */ __name((server, session, { command, name
193
195
  });
194
196
  }, "registerResources");
195
197
 
196
- // node_modules/.pnpm/@wirecat+cli-core@0.619.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._3343d636b3fedf7ef3285e4c7a47096e/node_modules/@wirecat/cli-core/dist/mcp/session.js
198
+ // node_modules/.pnpm/@wirecat+cli-core@0.624.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._325ff8c9daf4b8769887d5253d3c1255/node_modules/@wirecat/cli-core/dist/mcp/session.js
197
199
  var HARMLESS = /* @__PURE__ */ new Set(["validation_error", "not_found", "permission_error", "confirmation_required", "rate_limited"]);
198
200
  var harmless = /* @__PURE__ */ __name((code) => HARMLESS.has(code), "harmless");
199
201
  var MessengerSession = class {
@@ -268,7 +270,7 @@ var MessengerSession = class {
268
270
  }
269
271
  };
270
272
 
271
- // node_modules/.pnpm/@wirecat+cli-core@0.619.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._3343d636b3fedf7ef3285e4c7a47096e/node_modules/@wirecat/cli-core/dist/mcp/tools/attachments.js
273
+ // node_modules/.pnpm/@wirecat+cli-core@0.624.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._325ff8c9daf4b8769887d5253d3c1255/node_modules/@wirecat/cli-core/dist/mcp/tools/attachments.js
272
274
  var attachmentsTools = /* @__PURE__ */ __name((messenger) => {
273
275
  const _command = messenger.app.command;
274
276
  return {
@@ -322,7 +324,7 @@ var attachmentsTools = /* @__PURE__ */ __name((messenger) => {
322
324
  };
323
325
  }, "attachmentsTools");
324
326
 
325
- // node_modules/.pnpm/@wirecat+cli-core@0.619.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._3343d636b3fedf7ef3285e4c7a47096e/node_modules/@wirecat/cli-core/dist/mcp/tools/messages-photo.js
327
+ // node_modules/.pnpm/@wirecat+cli-core@0.624.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._325ff8c9daf4b8769887d5253d3c1255/node_modules/@wirecat/cli-core/dist/mcp/tools/messages-photo.js
326
328
  var PHOTO_LIMIT = 512 * 1024;
327
329
  var IMAGE_TYPES = [
328
330
  ["image/jpeg", (b) => b[0] === 255 && b[1] === 216 && b[2] === 255],
@@ -376,7 +378,7 @@ var readUpTo = /* @__PURE__ */ __name(async (file, limit, saveIt) => {
376
378
  return new Uint8Array(Buffer.concat(chunks));
377
379
  }, "readUpTo");
378
380
 
379
- // node_modules/.pnpm/@wirecat+cli-core@0.619.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._3343d636b3fedf7ef3285e4c7a47096e/node_modules/@wirecat/cli-core/dist/mcp/tools/stats.js
381
+ // node_modules/.pnpm/@wirecat+cli-core@0.624.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._325ff8c9daf4b8769887d5253d3c1255/node_modules/@wirecat/cli-core/dist/mcp/tools/stats.js
380
382
  var statsTools = /* @__PURE__ */ __name((messenger) => ({
381
383
  stats_charts: tool({
382
384
  title: "A chart from a chat's statistics",
@@ -413,14 +415,14 @@ var statsTools = /* @__PURE__ */ __name((messenger) => ({
413
415
  })
414
416
  }), "statsTools");
415
417
 
416
- // node_modules/.pnpm/@wirecat+cli-core@0.619.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._3343d636b3fedf7ef3285e4c7a47096e/node_modules/@wirecat/cli-core/dist/mcp/tools.js
418
+ // node_modules/.pnpm/@wirecat+cli-core@0.624.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._325ff8c9daf4b8769887d5253d3c1255/node_modules/@wirecat/cli-core/dist/mcp/tools.js
417
419
  var pictureTools = /* @__PURE__ */ __name((messenger) => Object.fromEntries(Object.entries({
418
420
  ...messagesPhotoTools(messenger),
419
421
  ...attachmentsTools(messenger),
420
422
  ...statsTools(messenger)
421
423
  }).map(([name, definition]) => [name, { ...definition, input: strictObject(definition.input.entries) }])), "pictureTools");
422
424
 
423
- // node_modules/.pnpm/@wirecat+cli-core@0.619.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._3343d636b3fedf7ef3285e4c7a47096e/node_modules/@wirecat/cli-core/dist/mcp/server.js
425
+ // node_modules/.pnpm/@wirecat+cli-core@0.624.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._325ff8c9daf4b8769887d5253d3c1255/node_modules/@wirecat/cli-core/dist/mcp/server.js
424
426
  var PER_RUN = /* @__PURE__ */ new Set([
425
427
  "streams",
426
428
  "stdin",
@@ -744,7 +746,7 @@ var serveOverStdio = /* @__PURE__ */ __name(async (command, context, messenger,
744
746
  }, "serveOverStdio");
745
747
  var serveOverHttpUntilStopped = /* @__PURE__ */ __name(async (command, context, messenger, options, http) => {
746
748
  const { session, embedders, build, log } = createServer(command, context, messenger, options);
747
- const { serveOverHttp } = await import("./serve-PP326Q2F.js");
749
+ const { serveOverHttp } = await import("./serve-Z3TOTEMQ.js");
748
750
  const appName = messenger.app.command;
749
751
  const appEnvPrefix = messenger.app.envPrefix;
750
752
  const listening = await serveOverHttp(build, {
@@ -0,0 +1,18 @@
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/@wirecat+cli-core@0.624.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._325ff8c9daf4b8769887d5253d3c1255/node_modules/@wirecat/cli-core/dist/cli/stdin-field.js
8
+ var fields = /* @__PURE__ */ new WeakMap();
9
+ var readsStdin = /* @__PURE__ */ __name((command, field) => {
10
+ fields.set(command, field);
11
+ return command;
12
+ }, "readsStdin");
13
+ var stdinFieldOf = /* @__PURE__ */ __name((command) => fields.get(command), "stdinFieldOf");
14
+
15
+ export {
16
+ readsStdin,
17
+ stdinFieldOf
18
+ };
@@ -2,7 +2,7 @@ import { createRequire as __bundleRequire } from "node:module";
2
2
  const require = __bundleRequire(import.meta.url);
3
3
  import {
4
4
  openCache
5
- } from "./chunk-PDYTNTQI.js";
5
+ } from "./chunk-VPNLTNQD.js";
6
6
  import {
7
7
  CliError,
8
8
  isCliError
@@ -2,7 +2,7 @@ import { createRequire as __bundleRequire } from "node:module";
2
2
  const require = __bundleRequire(import.meta.url);
3
3
  import {
4
4
  unit
5
- } from "./chunk-4OWY7QBE.js";
5
+ } from "./chunk-KKD5ZPGD.js";
6
6
  import {
7
7
  CliError
8
8
  } from "./chunk-VUBZFMGP.js";
@@ -10,7 +10,7 @@ import {
10
10
  __name
11
11
  } from "./chunk-ZVVMGPBJ.js";
12
12
 
13
- // node_modules/.pnpm/@wirecat+cli-core@0.619.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._3343d636b3fedf7ef3285e4c7a47096e/node_modules/@wirecat/cli-core/dist/embeddings/remote.js
13
+ // node_modules/.pnpm/@wirecat+cli-core@0.624.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._325ff8c9daf4b8769887d5253d3c1255/node_modules/@wirecat/cli-core/dist/embeddings/remote.js
14
14
  import { setTimeout } from "node:timers/promises";
15
15
  var OPENAI_URL = "https://api.openai.com/v1";
16
16
  var OPENAI_MODELS = {
@@ -4,7 +4,7 @@ import {
4
4
  __name
5
5
  } from "./chunk-ZVVMGPBJ.js";
6
6
 
7
- // node_modules/.pnpm/@wirecat+cli-core@0.619.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._3343d636b3fedf7ef3285e4c7a47096e/node_modules/@wirecat/cli-core/dist/mcp/instructions.js
7
+ // node_modules/.pnpm/@wirecat+cli-core@0.624.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._325ff8c9daf4b8769887d5253d3c1255/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");
@@ -4,7 +4,7 @@ import {
4
4
  __name
5
5
  } from "./chunk-ZVVMGPBJ.js";
6
6
 
7
- // node_modules/.pnpm/@wirecat+cli-core@0.619.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._3343d636b3fedf7ef3285e4c7a47096e/node_modules/@wirecat/cli-core/dist/mcp/stdio-wire.js
7
+ // node_modules/.pnpm/@wirecat+cli-core@0.624.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._325ff8c9daf4b8769887d5253d3c1255/node_modules/@wirecat/cli-core/dist/mcp/stdio-wire.js
8
8
  import { PassThrough, Writable } from "node:stream";
9
9
  var lineReader = /* @__PURE__ */ __name((onMessage) => {
10
10
  let rest = "";
@@ -1,8 +1,5 @@
1
1
  import { createRequire as __bundleRequire } from "node:module";
2
2
  const require = __bundleRequire(import.meta.url);
3
- import {
4
- hostFetch
5
- } from "./chunk-LVGX7VTD.js";
6
3
  import {
7
4
  ADMIN_RIGHTS,
8
5
  BotTokenStore,
@@ -16,7 +13,10 @@ import {
16
13
  privateFiles,
17
14
  providerRequest,
18
15
  withSqliteSidecars
19
- } from "./chunk-DQTQO6PB.js";
16
+ } from "./chunk-M73VM67N.js";
17
+ import {
18
+ hostFetch
19
+ } from "./chunk-LVGX7VTD.js";
20
20
  import {
21
21
  parseProxy,
22
22
  proxyAddress,
@@ -26,23 +26,23 @@ import {
26
26
  } from "./chunk-FATTEYZH.js";
27
27
  import {
28
28
  messengerContext
29
- } from "./chunk-H5XC2WYO.js";
29
+ } from "./chunk-ZSW7LN7T.js";
30
30
  import {
31
31
  uploadBlob
32
- } from "./chunk-7WS3ULOO.js";
32
+ } from "./chunk-SQWTUENZ.js";
33
+ import {
34
+ DESKTOP,
35
+ TG
36
+ } from "./chunk-7UIMMQOV.js";
33
37
  import {
34
38
  asFirstWord,
35
39
  environmentOf,
36
40
  fromFile,
37
41
  settingsFor
38
- } from "./chunk-THJHYMFR.js";
42
+ } from "./chunk-CPDYPZIG.js";
39
43
  import {
40
44
  currentAttempt
41
- } from "./chunk-KP26Y5OA.js";
42
- import {
43
- DESKTOP,
44
- TG
45
- } from "./chunk-KRCMKFUV.js";
45
+ } from "./chunk-3EGVR7OF.js";
46
46
  import {
47
47
  Credentials,
48
48
  pathsAreOverridden,
@@ -173,7 +173,7 @@ var logOut = /* @__PURE__ */ __name(async (profile, sessionPath, context) => {
173
173
  checks: checkWords("tg", profile),
174
174
  ...keyring ? { keyring } : {}
175
175
  });
176
- const { TelegramAdapter } = await import("./adapter-OJKHXGBC.js");
176
+ const { TelegramAdapter } = await import("./adapter-GVSBFSBY.js");
177
177
  const adapter = await TelegramAdapter.open({ credentials, sessionPath, ...through ? { proxy: through.proxy } : {} });
178
178
  try {
179
179
  await adapter.logout();
@@ -236,7 +236,7 @@ var telegramOf = /* @__PURE__ */ __name((command, base) => {
236
236
  throw new CliError(temporary ? "provider_unavailable" : "authentication_error", loggedIn ? `no Telegram app credentials found for profile "${profile}", although it has logged in on this machine \u2014 the keyring is probably out of reach (cron, ssh, an MCP client that trims the environment: set XDG_RUNTIME_DIR); \`tg ${asFirstWord(profile)}doctor\` shows it. Log in again only if they were removed` : `no Telegram app credentials for profile "${profile}" \u2014 run ${setup} in a local terminal first, or sign in from ${desktop}; agents: read \`tg skill show\``, temporary ? { reason: "credentials.unreachable" } : {});
237
237
  }
238
238
  const options = { credentials: resolved, sessionPath, ...connecting };
239
- return environment.adapter ? await environment.adapter(options) : await (await import("./adapter-OJKHXGBC.js")).TelegramAdapter.open({
239
+ return environment.adapter ? await environment.adapter(options) : await (await import("./adapter-GVSBFSBY.js")).TelegramAdapter.open({
240
240
  ...options,
241
241
  ...proxyOption(proxy()),
242
242
  diagnostic: /* @__PURE__ */ __name((line) => base.streams.diagnostic(line), "diagnostic"),
@@ -961,7 +961,7 @@ var TELEGRAM_BOT = {
961
961
  const botId = token.split(":", 1)[0] ?? "";
962
962
  if (!/^\d+$/.test(botId))
963
963
  throw new CliError("authentication_error", "the bot token has no valid bot id");
964
- const reader = await (environment.botHistory ?? (await import("./bot-history-VVSWLVZM.js")).openBotHistory)({
964
+ const reader = await (environment.botHistory ?? (await import("./bot-history-7YY7MCR4.js")).openBotHistory)({
965
965
  credentials,
966
966
  sessionPath: botSessionFile(profile, botId, env),
967
967
  token,
@@ -981,7 +981,7 @@ var TELEGRAM_BOT = {
981
981
  return void 0;
982
982
  let personal;
983
983
  try {
984
- personal = environment.adapter ? await environment.adapter({ credentials, sessionPath: personalPath }) : await (await import("./adapter-OJKHXGBC.js")).TelegramAdapter.open({
984
+ personal = environment.adapter ? await environment.adapter({ credentials, sessionPath: personalPath }) : await (await import("./adapter-GVSBFSBY.js")).TelegramAdapter.open({
985
985
  credentials,
986
986
  sessionPath: personalPath,
987
987
  checks: words,
@@ -7,10 +7,10 @@ import {
7
7
  agentJson,
8
8
  commandAvailability,
9
9
  failureContext
10
- } from "./chunk-7VNV426X.js";
10
+ } from "./chunk-S7P5X23R.js";
11
11
  import {
12
12
  callerOf
13
- } from "./chunk-34DSPJNN.js";
13
+ } from "./chunk-T7ONSJAA.js";
14
14
  import {
15
15
  QUERY_ARGUMENT,
16
16
  lentConnection,
@@ -18,7 +18,10 @@ import {
18
18
  refuseLacking,
19
19
  servicesFor,
20
20
  storeModeDeps
21
- } from "./chunk-7WS3ULOO.js";
21
+ } from "./chunk-SQWTUENZ.js";
22
+ import {
23
+ MAX_BUFFERED_INPUT
24
+ } from "./chunk-GB55EDOF.js";
22
25
  import {
23
26
  DEFAULT_OUTPUT_BYTES,
24
27
  ENTITIES,
@@ -38,26 +41,23 @@ import {
38
41
  refuseStoreChange,
39
42
  sealed,
40
43
  startRecording
41
- } from "./chunk-THJHYMFR.js";
44
+ } from "./chunk-CPDYPZIG.js";
42
45
  import {
43
46
  currentCaller,
44
47
  keepsSuccess,
45
48
  runContextOf,
46
49
  withCaller
47
- } from "./chunk-3FPFRDG2.js";
50
+ } from "./chunk-6SQAE7NM.js";
48
51
  import {
49
52
  enclosingTraceId,
50
53
  inRun,
51
54
  newRunId,
52
55
  queryDescription,
53
56
  traceOf
54
- } from "./chunk-KP26Y5OA.js";
57
+ } from "./chunk-3EGVR7OF.js";
55
58
  import {
56
59
  storeDamaged
57
- } from "./chunk-WLBPNLDF.js";
58
- import {
59
- MAX_BUFFERED_INPUT
60
- } from "./chunk-KTV5Y5EX.js";
60
+ } from "./chunk-7MXRFFIT.js";
61
61
  import {
62
62
  captureStreams,
63
63
  traceIdOf
@@ -109,7 +109,7 @@ import {
109
109
  __name
110
110
  } from "./chunk-ZVVMGPBJ.js";
111
111
 
112
- // node_modules/.pnpm/@wirecat+cli-core@0.619.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._3343d636b3fedf7ef3285e4c7a47096e/node_modules/@wirecat/cli-core/dist/mcp/agent.js
112
+ // node_modules/.pnpm/@wirecat+cli-core@0.624.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._325ff8c9daf4b8769887d5253d3c1255/node_modules/@wirecat/cli-core/dist/mcp/agent.js
113
113
  import { Readable } from "node:stream";
114
114
 
115
115
  // node_modules/.pnpm/@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/standards/lint.js
@@ -3200,7 +3200,7 @@ var VOCABULARY = defineVocabulary({
3200
3200
  ]
3201
3201
  });
3202
3202
 
3203
- // node_modules/.pnpm/@wirecat+cli-core@0.619.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._3343d636b3fedf7ef3285e4c7a47096e/node_modules/@wirecat/cli-core/dist/mcp/agent.js
3203
+ // node_modules/.pnpm/@wirecat+cli-core@0.624.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._325ff8c9daf4b8769887d5253d3c1255/node_modules/@wirecat/cli-core/dist/mcp/agent.js
3204
3204
  var TYPES = new Map(VOCABULARY.flags.map((flag) => [flag.name, flag.type]));
3205
3205
  var snake = /* @__PURE__ */ __name((name) => name.replaceAll("|", "_or_").replace(/[^a-z0-9]+/gi, "_"), "snake");
3206
3206
  var longOf = /* @__PURE__ */ __name((option) => option.flags.match(/--[a-z0-9][a-z0-9-]*/)?.[0], "longOf");
@@ -3423,7 +3423,7 @@ var runCommandForAgent = /* @__PURE__ */ __name(async (program, path, input, ctx
3423
3423
  }
3424
3424
  }, "runCommandForAgent");
3425
3425
 
3426
- // node_modules/.pnpm/@wirecat+cli-core@0.619.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._3343d636b3fedf7ef3285e4c7a47096e/node_modules/@wirecat/cli-core/dist/mcp/tool.js
3426
+ // node_modules/.pnpm/@wirecat+cli-core@0.624.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._325ff8c9daf4b8769887d5253d3c1255/node_modules/@wirecat/cli-core/dist/mcp/tool.js
3427
3427
  var limit = optional(pipe(number(), integer(), minValue(1), maxValue(100), description("how many")));
3428
3428
  var page = optional(pipe(number(), integer(), minValue(1), description("which page, from 1")));
3429
3429
  var message = pipe(
@@ -3682,10 +3682,27 @@ var failed = /* @__PURE__ */ __name((error, errors, effects) => {
3682
3682
  return mcpErrorResult(JSON.parse(agentJson(errorObjectOf(storeDamaged(error), context))));
3683
3683
  }, "failed");
3684
3684
 
3685
- // node_modules/.pnpm/@wirecat+cli-core@0.619.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._3343d636b3fedf7ef3285e4c7a47096e/node_modules/@wirecat/cli-core/dist/mcp/surface.js
3685
+ // node_modules/.pnpm/@wirecat+cli-core@0.624.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._325ff8c9daf4b8769887d5253d3c1255/node_modules/@wirecat/cli-core/dist/mcp/surface.js
3686
3686
  import { randomUUID } from "node:crypto";
3687
3687
  var MATCHES = 8;
3688
3688
  var ANSWER = answerSchema();
3689
+ var agentAnswer = /* @__PURE__ */ __name((prefix, writes2) => {
3690
+ const meta = pipe(looseObject({}), description(`run facts; ${prefix}_tools_search shows the full answer`));
3691
+ const next = optional(pipe(array(looseObject({})), description("steps to run next: command and args")));
3692
+ return looseObject(writes2 ? { item: optional(unknown()), next, meta } : {
3693
+ items: optional(array(unknown())),
3694
+ item: optional(unknown()),
3695
+ page: optional(looseObject({ has_more: boolean() })),
3696
+ next,
3697
+ missing: optional(array(looseObject({ field: string(), why: string() }))),
3698
+ meta
3699
+ });
3700
+ }, "agentAnswer");
3701
+ var listedAs = /* @__PURE__ */ __name((prefix, writes2) => {
3702
+ const checked = toStandardJsonSchema(ANSWER);
3703
+ const shown = toStandardJsonSchema(agentAnswer(prefix, writes2))["~standard"].jsonSchema;
3704
+ return { "~standard": { ...checked["~standard"], jsonSchema: shown } };
3705
+ }, "listedAs");
3689
3706
  var normal = /* @__PURE__ */ __name((command) => command.trim().toLowerCase().split(/[\s_-]+/).join(" "), "normal");
3690
3707
  var haystack = /* @__PURE__ */ __name((command, one) => [command, one.title, one.description, ...Object.keys(one.input.entries)].join(" ").toLowerCase(), "haystack");
3691
3708
  var search = /* @__PURE__ */ __name((commands, query) => {
@@ -3790,7 +3807,7 @@ var registerCommands = /* @__PURE__ */ __name((server, prefix, commands, errors,
3790
3807
  arguments: optional(pipe(record(string(), unknown()), description("that command's arguments")))
3791
3808
  });
3792
3809
  server.registerTool(`${prefix}_read`, {
3793
- outputSchema: toStandardJsonSchema(ANSWER),
3810
+ outputSchema: listedAs(prefix, false),
3794
3811
  title: "Run a reading command",
3795
3812
  description: `Run one command that only reads, with the arguments ${prefix}_tools_search showed. ${untrusted}`,
3796
3813
  inputSchema: toStandardJsonSchema(call),
@@ -3798,7 +3815,7 @@ var registerCommands = /* @__PURE__ */ __name((server, prefix, commands, errors,
3798
3815
  }, runner(false));
3799
3816
  if (Object.values(commands).some((one) => one.writes))
3800
3817
  server.registerTool(`${prefix}_write`, {
3801
- outputSchema: toStandardJsonSchema(ANSWER),
3818
+ outputSchema: listedAs(prefix, true),
3802
3819
  title: "Run a writing command",
3803
3820
  description: `Run one command that changes something \u2014 ${messenger ? "sends, edits, deletes, joins" : "creates, edits, deletes"} \u2014 with the arguments ${prefix}_tools_search showed. ${untrusted}`,
3804
3821
  inputSchema: toStandardJsonSchema(call),