@wirecat/mail-cli 0.30.0 → 0.32.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.
- package/CHANGELOG.md +27 -0
- package/dist/bin/mail.js +2 -2
- package/dist/bundle/{all-profiles-523GLORJ.js → all-profiles-OTCWJSJS.js} +19 -29
- package/dist/bundle/{anthropic-KKYGROQR.js → anthropic-GUXHDK32.js} +2 -2
- package/dist/bundle/{app-server-RJR7U5NT.js → app-server-GX7DOE4O.js} +45 -60
- package/dist/bundle/{bun-EBQHHLKR.js → bun-V5QLYBZU.js} +2 -2
- package/dist/bundle/{bun-sqlite-LTG2RRSL.js → bun-sqlite-AXD5CCO3.js} +3 -3
- package/dist/bundle/{chunk-L2D5QYI3.js → chunk-2IYAZRTC.js} +2 -2
- package/dist/bundle/{chunk-ONA3UI3R.js → chunk-2UMEZY6D.js} +2 -2
- package/dist/bundle/{chunk-XGEPAJBY.js → chunk-3URYKAJP.js} +1 -1
- package/dist/bundle/{chunk-SPWKGRTO.js → chunk-4YNUQGDP.js} +1 -1
- package/dist/bundle/{chunk-MVDP7VL6.js → chunk-6SJ7HHAE.js} +1 -1
- package/dist/bundle/{chunk-T7A6HSBF.js → chunk-6TRKNME5.js} +1 -1
- package/dist/bundle/{chunk-YNI57LTZ.js → chunk-6XNTELM5.js} +1 -1
- package/dist/bundle/{chunk-NMN7RTX5.js → chunk-7GW4D3OW.js} +19 -18
- package/dist/bundle/{chunk-3HCEKXXB.js → chunk-AJY2IT25.js} +6 -6
- package/dist/bundle/{chunk-KE2RQUQO.js → chunk-ANYADN3S.js} +17 -17
- package/dist/bundle/{chunk-FL2TKSZY.js → chunk-CAQ5GW3A.js} +1 -1
- package/dist/bundle/{chunk-SNZFQ5SS.js → chunk-CD3TAITM.js} +14 -2
- package/dist/bundle/{chunk-54JKDFOV.js → chunk-FA3B2DHZ.js} +1 -1
- package/dist/bundle/{chunk-Q23EEGPC.js → chunk-GDDCKTBR.js} +1 -1
- package/dist/bundle/{chunk-HVJ2WQI7.js → chunk-GPOTPA3S.js} +10 -10
- package/dist/bundle/{chunk-S2KKQA7O.js → chunk-GSXCMQWV.js} +41 -49
- package/dist/bundle/{chunk-GXKFRZUP.js → chunk-HFA6AZWA.js} +3 -3
- package/dist/bundle/{chunk-DBI22GQL.js → chunk-HUWQ7LXZ.js} +506 -338
- package/dist/bundle/{chunk-5X5A3CAX.js → chunk-IBCGCYRU.js} +1 -1
- package/dist/bundle/{chunk-4F7WQHDO.js → chunk-IVD3JTN5.js} +1 -1
- package/dist/bundle/{chunk-IIV43UIC.js → chunk-JRGPPS6H.js} +12 -12
- package/dist/bundle/{chunk-3ECFSRLQ.js → chunk-JUS4Y4BW.js} +3 -3
- package/dist/bundle/{chunk-F22PLRCG.js → chunk-KLFF54AF.js} +7 -7
- package/dist/bundle/{chunk-J5PUHGK2.js → chunk-KLGZX6QT.js} +1 -1
- package/dist/bundle/{chunk-CWAA73PJ.js → chunk-LVFI3TCG.js} +5 -5
- package/dist/bundle/{chunk-GDFJKUMK.js → chunk-LVJWN2PR.js} +6 -6
- package/dist/bundle/{chunk-E2SL7HIZ.js → chunk-MENP3FF5.js} +11 -12
- package/dist/bundle/{chunk-HZUUVNWC.js → chunk-MHXZ62CU.js} +1 -1
- package/dist/bundle/{chunk-B3NXAN6J.js → chunk-MSK7RNOM.js} +149 -148
- package/dist/bundle/{chunk-D3J4T5OZ.js → chunk-MT2WDBG2.js} +12 -12
- package/dist/bundle/{chunk-2M7PPII5.js → chunk-MVMNZ3Q3.js} +745 -336
- package/dist/bundle/{chunk-ZG2XBWFT.js → chunk-NMN5JUYL.js} +3 -3
- package/dist/bundle/{chunk-JKWNPRZD.js → chunk-O7OP5NQO.js} +1 -1
- package/dist/bundle/{chunk-NV2REPY6.js → chunk-OUM4ZO53.js} +1 -1
- package/dist/bundle/{chunk-KIZYN3NG.js → chunk-PALY5PGE.js} +5 -5
- package/dist/bundle/{chunk-LM4K6K2R.js → chunk-PCMQYGEM.js} +4 -4
- package/dist/bundle/{chunk-GCSFZTRI.js → chunk-PCWAZVAD.js} +30 -5
- package/dist/bundle/{chunk-6C7SA4LD.js → chunk-QHXOXYAT.js} +57 -54
- package/dist/bundle/{chunk-WXQK5RO5.js → chunk-RNBG75HW.js} +33 -23
- package/dist/bundle/{chunk-TIMBTN5Z.js → chunk-SDAYOJLL.js} +5 -5
- package/dist/bundle/{chunk-LN2LWPN2.js → chunk-SEJBS7SI.js} +1 -1
- package/dist/bundle/{chunk-U7VYDTXN.js → chunk-SWXKS7JK.js} +16 -16
- package/dist/bundle/{chunk-R3IFRHZ2.js → chunk-SZZJOSIS.js} +2 -2
- package/dist/bundle/{chunk-WHS3CTTM.js → chunk-T577U52I.js} +7 -7
- package/dist/bundle/{chunk-SN5V6CKH.js → chunk-TDTCCHAI.js} +98 -6
- package/dist/bundle/{chunk-FYXGD6R6.js → chunk-TWHIZJAZ.js} +2 -2
- package/dist/bundle/{chunk-K5FTIIYR.js → chunk-U346WBJ5.js} +4 -4
- package/dist/bundle/{chunk-MP572GP7.js → chunk-U57QRUP7.js} +2 -2
- package/dist/bundle/{chunk-YMJXGIYG.js → chunk-U7RLFLTM.js} +23 -23
- package/dist/bundle/{chunk-ENKZEQ4Y.js → chunk-WNGMI6AZ.js} +2 -2
- package/dist/bundle/{chunk-BOGGQOVO.js → chunk-WQOGHND4.js} +1 -1
- package/dist/bundle/{chunk-A3YXTDTP.js → chunk-XXXVVNGI.js} +18 -15
- package/dist/bundle/{chunk-RLPWLGP6.js → chunk-Z6OKVD3R.js} +7 -7
- package/dist/bundle/{chunk-QGIQ62KV.js → chunk-ZAD7K4TI.js} +382 -366
- package/dist/bundle/{chunk-26H2HVJD.js → chunk-ZDP6A2VL.js} +2 -2
- package/dist/bundle/{command-contract-ETECA2AC.js → command-contract-DZ6XRIOI.js} +15 -15
- package/dist/bundle/{command-server-entry-BFXRYTBC.js → command-server-entry-BVXOPKXH.js} +21 -21
- package/dist/bundle/{decode-4QRYNPD5.js → decode-STN3EHT7.js} +2 -2
- package/dist/bundle/{dist-MHJPECI4.js → dist-B2JWWTNN.js} +15 -11
- package/dist/bundle/{echarts-EJXBKCJT.js → echarts-QIXLXS3G.js} +2 -2
- package/dist/bundle/{embed-46WZZMUQ.js → embed-4NC4ELYP.js} +3 -3
- package/dist/bundle/{embedder-56WHJKJE.js → embedder-HBRDIFQC.js} +6 -6
- package/dist/bundle/{first-run-CATDBOBV.js → first-run-6QF67AAZ.js} +6 -6
- package/dist/bundle/first-screen-LXSZMK2P.js +34 -0
- package/dist/bundle/{instructions-Z7GVGWXS.js → instructions-MD2RZT5Z.js} +1 -1
- package/dist/bundle/mail.js +2 -2
- package/dist/bundle/{node-L2PVEW3N.js → node-IEVT2FSJ.js} +2 -2
- package/dist/bundle/{node-sqlite-RIGII7U7.js → node-sqlite-EOTTDMOG.js} +4 -4
- package/dist/bundle/{oauth-OWT6NYRS.js → oauth-A5BEFGCI.js} +4 -4
- package/dist/bundle/{open-D3SPYL7O.js → open-HWN2EZYG.js} +2 -2
- package/dist/bundle/{openai-IPTZDMFD.js → openai-PJKJ4CIU.js} +12 -12
- package/dist/bundle/{process-MNZTQ2DA.js → process-6Q23D3TO.js} +1 -1
- package/dist/bundle/{program-QCHTCOCR.js → program-WR43NPAV.js} +523 -454
- package/dist/bundle/{prompt-BN6AKRWN.js → prompt-E7Q2662O.js} +2 -2
- package/dist/bundle/{recognize-I5TH7OEW.js → recognize-4F4PIL4B.js} +1 -1
- package/dist/bundle/{remote-R324LAUL.js → remote-RGJXO7XK.js} +6 -6
- package/dist/bundle/{rerank-ZMGZCUJV.js → rerank-EDY7PHMG.js} +4 -4
- package/dist/bundle/{serve-YUFZSNJC.js → serve-Q4XF6ID2.js} +6 -6
- package/dist/bundle/server-2Y5NSP2U.js +67 -0
- package/dist/bundle/{server-54ULZ3RA.js → server-5I72DSDF.js} +43 -41
- package/dist/bundle/{sqlite-runtime-AYQTUQXM.js → sqlite-runtime-PU3Z2H7C.js} +3 -3
- package/dist/bundle/{state-PHEBOYYI.js → state-CWSXJBU2.js} +3 -3
- package/dist/bundle/{store-NGX3A5XT.js → store-KQPKS3PX.js} +15 -15
- package/dist/bundle/{store-4PHDSXEV.js → store-ZAMKKM2A.js} +13 -13
- package/dist/bundle/store-maintenance-command-PMTTDR6J.js +58 -0
- package/dist/commands/rules.d.ts.map +1 -1
- package/dist/commands/rules.js +73 -22
- package/dist/commands/rules.js.map +1 -1
- package/dist/mail/rules/apply.d.ts.map +1 -1
- package/dist/mail/rules/apply.js +1 -9
- package/dist/mail/rules/apply.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +2 -2
- package/dist/bundle/chunk-IJONJTST.js +0 -76
- package/dist/bundle/first-screen-WCDR3QUR.js +0 -34
- package/dist/bundle/server-UD75CYDG.js +0 -68
- package/dist/bundle/store-maintenance-command-WHBIV6HC.js +0 -58
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,33 @@
|
|
|
2
2
|
|
|
3
3
|
Notable changes to `@wirecat/mail-cli`. One section per version, newest first.
|
|
4
4
|
|
|
5
|
+
## 0.32.0 — 14.11.2026
|
|
6
|
+
|
|
7
|
+
### Changed — may break callers
|
|
8
|
+
|
|
9
|
+
- **A `readonly` level no longer stops `mail sync`** (cli-core 0.662.0, was 0.661.0). A command that only fetches
|
|
10
|
+
mail into the local store runs at `readonly`; `deny` still refuses it. Commands
|
|
11
|
+
that write the owner's files or call another service stay blocked by `readonly`. A profile that used `readonly`
|
|
12
|
+
to stop syncing sets the key to `deny`.
|
|
13
|
+
|
|
14
|
+
## 0.31.0 — 14.11.2026
|
|
15
|
+
|
|
16
|
+
### Fixed
|
|
17
|
+
|
|
18
|
+
- **`rules import --format gmail` takes `--yes` over MCP.** An agent could only preview the rules Gmail's filters
|
|
19
|
+
suggest: the tool offered only the command's own options, and `--yes` was the program's.
|
|
20
|
+
- **`rules export` answers over MCP.** The call failed with "the command printed its answer instead of handing it
|
|
21
|
+
over". An agent now gets the rules file as the answer; in a terminal and in a pipe it still prints the file itself,
|
|
22
|
+
so `rules export > rules.json` imports back.
|
|
23
|
+
- **`rules apply` no longer offers a run that read nothing to run again under the same time limit.** Over MCP the
|
|
24
|
+
step said to pass a longer `--timeout`, which an agent cannot, and was marked safe to run unasked, so a resumed run
|
|
25
|
+
could repeat with no progress. Over MCP it now tells the owner to give the server a longer `MAIL_TIMEOUT` or to run
|
|
26
|
+
it in a terminal; in a terminal the step adds `--timeout 30m` and waits for the owner.
|
|
27
|
+
- **`messages delete --rules` keeps mail from a sender the owner wrote to.** It judged senders from the stored mail,
|
|
28
|
+
where the owner's own mail from an IMAP Sent folder looked received. So an envelope from someone the owner
|
|
29
|
+
answered could be offered for Trash, and a preset rule could still catch that sender. cli-core now labels the
|
|
30
|
+
owner's stored mail Sent, and the cleanup's "replied" and "sent" reasons hold for IMAP mailboxes too.
|
|
31
|
+
|
|
5
32
|
## 0.30.0 — 14.11.2026
|
|
6
33
|
|
|
7
34
|
### Changed — may break callers
|
package/dist/bin/mail.js
CHANGED
|
@@ -9,7 +9,7 @@ if (
|
|
|
9
9
|
(words[0] === "--version" || words[0] === "-V") &&
|
|
10
10
|
!Object.keys(process.env).some((key) => key.endsWith("_TEST_ARGV_LOG"))
|
|
11
11
|
) {
|
|
12
|
-
process.stdout.write("0.
|
|
12
|
+
process.stdout.write("0.32.0\n")
|
|
13
13
|
} else {
|
|
14
14
|
// Before the bundle compiles: the bundle's own call comes after its chunks.
|
|
15
15
|
module.enableCompileCache()
|
|
@@ -28,7 +28,7 @@ if (
|
|
|
28
28
|
: next(specifier, context),
|
|
29
29
|
})
|
|
30
30
|
}
|
|
31
|
-
const chunks = ["../bundle/all-profiles-
|
|
31
|
+
const chunks = ["../bundle/all-profiles-OTCWJSJS.js","../bundle/anthropic-GUXHDK32.js","../bundle/app-server-GX7DOE4O.js","../bundle/bun-V5QLYBZU.js","../bundle/bun-sqlite-AXD5CCO3.js","../bundle/decode-STN3EHT7.js","../bundle/dispatch-DSVN7MNG.js","../bundle/dist-B2JWWTNN.js","../bundle/dist-HFUVURJG.js","../bundle/echarts-QIXLXS3G.js","../bundle/embed-4NC4ELYP.js","../bundle/embedder-HBRDIFQC.js","../bundle/failure-COTPFUP4.js","../bundle/first-screen-LXSZMK2P.js","../bundle/instructions-MD2RZT5Z.js","../bundle/mcp-TDKGDB4V.js","../bundle/node-IEVT2FSJ.js","../bundle/node-KM3CUABH.js","../bundle/node-TLZSIHIJ.js","../bundle/node-sqlite-EOTTDMOG.js","../bundle/oauth-A5BEFGCI.js","../bundle/open-HWN2EZYG.js","../bundle/openai-PJKJ4CIU.js","../bundle/process-6Q23D3TO.js","../bundle/program-WR43NPAV.js","../bundle/prompt-E7Q2662O.js","../bundle/recognize-4F4PIL4B.js","../bundle/remote-RGJXO7XK.js","../bundle/rerank-EDY7PHMG.js","../bundle/serve-Q4XF6ID2.js","../bundle/server-2Y5NSP2U.js","../bundle/server-5I72DSDF.js","../bundle/sqlite-runtime-PU3Z2H7C.js","../bundle/state-CWSXJBU2.js","../bundle/store-KQPKS3PX.js","../bundle/store-ZAMKKM2A.js","../bundle/store-maintenance-command-PMTTDR6J.js"]
|
|
32
32
|
if (((words) => words
|
|
33
33
|
.filter((word) => !word.startsWith("-"))
|
|
34
34
|
.slice(0, 2)
|
|
@@ -1,31 +1,34 @@
|
|
|
1
1
|
import { createRequire as __bundleRequire } from "node:module";
|
|
2
2
|
const require = __bundleRequire(import.meta.url);
|
|
3
|
-
import {
|
|
4
|
-
answeredWire
|
|
5
|
-
} from "./chunk-IJONJTST.js";
|
|
6
3
|
import {
|
|
7
4
|
CALLER_META_KEY,
|
|
8
5
|
PROXY_CLIENT_NAME,
|
|
9
6
|
StdioServerTransport,
|
|
7
|
+
answeredWire,
|
|
10
8
|
callerOf,
|
|
11
9
|
serveStdio
|
|
12
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-TDTCCHAI.js";
|
|
13
11
|
import {
|
|
14
12
|
McpServer
|
|
15
13
|
} from "./chunk-5D4AEUVA.js";
|
|
16
|
-
import "./chunk-
|
|
17
|
-
import "./chunk-
|
|
18
|
-
import "./chunk-
|
|
14
|
+
import "./chunk-Z6OKVD3R.js";
|
|
15
|
+
import "./chunk-O7OP5NQO.js";
|
|
16
|
+
import "./chunk-6SJ7HHAE.js";
|
|
19
17
|
import "./chunk-XWBPP2HX.js";
|
|
20
18
|
import "./chunk-7MEVD5PI.js";
|
|
21
|
-
import
|
|
19
|
+
import {
|
|
20
|
+
errorObjectOf,
|
|
21
|
+
mcpErrorResult
|
|
22
|
+
} from "./chunk-ECZSYLSL.js";
|
|
22
23
|
import "./chunk-Y5E2WNWB.js";
|
|
23
|
-
import
|
|
24
|
+
import {
|
|
25
|
+
CliError
|
|
26
|
+
} from "./chunk-7KCBPAQS.js";
|
|
24
27
|
import {
|
|
25
28
|
__name
|
|
26
29
|
} from "./chunk-ZVVMGPBJ.js";
|
|
27
30
|
|
|
28
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/mcp/all-profiles.js
|
|
29
32
|
import { spawn } from "node:child_process";
|
|
30
33
|
import { randomUUID } from "node:crypto";
|
|
31
34
|
var PROTOCOL = "2025-06-18";
|
|
@@ -181,10 +184,7 @@ var withProfile = /* @__PURE__ */ __name((tool, profiles, name, signedIn = () =>
|
|
|
181
184
|
}
|
|
182
185
|
};
|
|
183
186
|
}, "withProfile");
|
|
184
|
-
var refusal = /* @__PURE__ */ __name((text) => ({
|
|
185
|
-
isError: true,
|
|
186
|
-
content: [{ type: "text", text }]
|
|
187
|
-
}), "refusal");
|
|
187
|
+
var refusal = /* @__PURE__ */ __name((code, text, details) => mcpErrorResult(errorObjectOf(new CliError(code, text, details), { effects: { remote: "none", local: "none" } })), "refusal");
|
|
188
188
|
var allProfilesServer = /* @__PURE__ */ __name((options) => {
|
|
189
189
|
const children = pool(options);
|
|
190
190
|
let listed;
|
|
@@ -211,9 +211,9 @@ var allProfilesServer = /* @__PURE__ */ __name((options) => {
|
|
|
211
211
|
const { name, arguments: given = {}, _meta } = request.params;
|
|
212
212
|
const { profile, ...rest } = given;
|
|
213
213
|
if (typeof profile !== "string" || !profiles.includes(profile))
|
|
214
|
-
return refusal(`${name} needs "profile", one of: ${profiles.join(", ")}. If the owner did not say which account, ask.`);
|
|
214
|
+
return refusal("validation_error", `${name} needs "profile", one of: ${profiles.join(", ")}. If the owner did not say which account, ask.`);
|
|
215
215
|
if (!signedIn(profile))
|
|
216
|
-
return refusal(options.signIn?.(profile) ?? `profile ${profile} is not signed in.`);
|
|
216
|
+
return refusal("authentication_error", options.signIn?.(profile) ?? `profile ${profile} is not signed in.`);
|
|
217
217
|
try {
|
|
218
218
|
return await children.use(profile, (child) => (
|
|
219
219
|
// Children are shared by every session, so each call names its own caller.
|
|
@@ -224,7 +224,7 @@ var allProfilesServer = /* @__PURE__ */ __name((options) => {
|
|
|
224
224
|
})
|
|
225
225
|
));
|
|
226
226
|
} catch (error) {
|
|
227
|
-
return refusal(`profile ${profile}: ${error instanceof Error ? error.message : String(error)}`);
|
|
227
|
+
return refusal("outcome_unknown", `profile ${profile}: ${error instanceof Error ? error.message : String(error)}`);
|
|
228
228
|
}
|
|
229
229
|
});
|
|
230
230
|
return server;
|
|
@@ -239,18 +239,8 @@ var serveAllProfilesOverStdio = /* @__PURE__ */ __name(async (options, io = {})
|
|
|
239
239
|
transport: new StdioServerTransport(wire.input, wire.output),
|
|
240
240
|
onerror: /* @__PURE__ */ __name((error) => options.note?.(`mcp: ${error.message}`), "onerror")
|
|
241
241
|
});
|
|
242
|
-
|
|
243
|
-
wire.ended.then(() => resolve("input"));
|
|
244
|
-
if (own)
|
|
245
|
-
io.signal?.addEventListener("abort", () => resolve("stopped"), { once: true });
|
|
246
|
-
else {
|
|
247
|
-
process.once("SIGINT", () => resolve("stopped"));
|
|
248
|
-
process.once("SIGTERM", () => resolve("stopped"));
|
|
249
|
-
}
|
|
250
|
-
});
|
|
242
|
+
await wire.finished(own ? io.signal : void 0);
|
|
251
243
|
try {
|
|
252
|
-
if (ended === "input")
|
|
253
|
-
await wire.answered();
|
|
254
244
|
wire.release();
|
|
255
245
|
await handle.close();
|
|
256
246
|
} finally {
|
|
@@ -259,7 +249,7 @@ var serveAllProfilesOverStdio = /* @__PURE__ */ __name(async (options, io = {})
|
|
|
259
249
|
}, "serveAllProfilesOverStdio");
|
|
260
250
|
var serveAllProfilesOverHttp = /* @__PURE__ */ __name(async (options, http) => {
|
|
261
251
|
const { build, close } = allProfilesServer(options);
|
|
262
|
-
const { serveOverHttp } = await import("./serve-
|
|
252
|
+
const { serveOverHttp } = await import("./serve-Q4XF6ID2.js");
|
|
263
253
|
const listening = await serveOverHttp(build, {
|
|
264
254
|
...http,
|
|
265
255
|
appName: options.command,
|
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
checkedOptions,
|
|
9
9
|
messagesFor,
|
|
10
10
|
systemFor
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-ZDP6A2VL.js";
|
|
12
12
|
import "./chunk-7MEVD5PI.js";
|
|
13
13
|
import {
|
|
14
14
|
array,
|
|
@@ -26,7 +26,7 @@ import {
|
|
|
26
26
|
__name
|
|
27
27
|
} from "./chunk-ZVVMGPBJ.js";
|
|
28
28
|
|
|
29
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/models/anthropic.js
|
|
30
30
|
var options = strictObject({
|
|
31
31
|
stop_sequences: optional(array(string())),
|
|
32
32
|
thinking: optional(strictObject({ type: picklist(["disabled", "adaptive"]) })),
|
|
@@ -3,47 +3,45 @@ const require = __bundleRequire(import.meta.url);
|
|
|
3
3
|
import {
|
|
4
4
|
PER_RUN,
|
|
5
5
|
envelope
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-GSXCMQWV.js";
|
|
7
7
|
import {
|
|
8
8
|
mcpUrlOf
|
|
9
|
-
} from "./chunk-
|
|
10
|
-
import "./chunk-
|
|
9
|
+
} from "./chunk-RNBG75HW.js";
|
|
10
|
+
import "./chunk-MHXZ62CU.js";
|
|
11
11
|
import {
|
|
12
12
|
answered,
|
|
13
13
|
failed,
|
|
14
14
|
registerCommands,
|
|
15
15
|
runCommandForAgent,
|
|
16
16
|
toolsFromCommands
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-7GW4D3OW.js";
|
|
18
18
|
import {
|
|
19
19
|
agentJson,
|
|
20
20
|
skillResource
|
|
21
|
-
} from "./chunk-
|
|
22
|
-
import "./chunk-
|
|
21
|
+
} from "./chunk-MENP3FF5.js";
|
|
22
|
+
import "./chunk-CD3TAITM.js";
|
|
23
23
|
import {
|
|
24
24
|
appInstructions
|
|
25
|
-
} from "./chunk-
|
|
26
|
-
import {
|
|
27
|
-
answeredWire
|
|
28
|
-
} from "./chunk-IJONJTST.js";
|
|
25
|
+
} from "./chunk-CAQ5GW3A.js";
|
|
29
26
|
import {
|
|
30
27
|
StdioServerTransport,
|
|
28
|
+
answeredWire,
|
|
31
29
|
serveStdio
|
|
32
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-TDTCCHAI.js";
|
|
33
31
|
import {
|
|
34
32
|
McpServer
|
|
35
33
|
} from "./chunk-5D4AEUVA.js";
|
|
36
34
|
import {
|
|
37
35
|
mcpHttpMarker
|
|
38
|
-
} from "./chunk-
|
|
39
|
-
import "./chunk-
|
|
40
|
-
import "./chunk-
|
|
41
|
-
import "./chunk-
|
|
42
|
-
import "./chunk-
|
|
43
|
-
import "./chunk-
|
|
44
|
-
import "./chunk-
|
|
45
|
-
import "./chunk-
|
|
46
|
-
import "./chunk-
|
|
36
|
+
} from "./chunk-U346WBJ5.js";
|
|
37
|
+
import "./chunk-XXXVVNGI.js";
|
|
38
|
+
import "./chunk-HUWQ7LXZ.js";
|
|
39
|
+
import "./chunk-JRGPPS6H.js";
|
|
40
|
+
import "./chunk-LVJWN2PR.js";
|
|
41
|
+
import "./chunk-ZDP6A2VL.js";
|
|
42
|
+
import "./chunk-2UMEZY6D.js";
|
|
43
|
+
import "./chunk-IVD3JTN5.js";
|
|
44
|
+
import "./chunk-NMN5JUYL.js";
|
|
47
45
|
import {
|
|
48
46
|
DEFAULT_OUTPUT_BYTES,
|
|
49
47
|
changesAuthorityAt,
|
|
@@ -54,34 +52,34 @@ import {
|
|
|
54
52
|
readOnlyLockOf,
|
|
55
53
|
readsOverMcpAt,
|
|
56
54
|
rootOf2 as rootOf
|
|
57
|
-
} from "./chunk-
|
|
58
|
-
import "./chunk-
|
|
59
|
-
import "./chunk-
|
|
60
|
-
import "./chunk-
|
|
55
|
+
} from "./chunk-MSK7RNOM.js";
|
|
56
|
+
import "./chunk-PCWAZVAD.js";
|
|
57
|
+
import "./chunk-Z6OKVD3R.js";
|
|
58
|
+
import "./chunk-WQOGHND4.js";
|
|
61
59
|
import "./chunk-7C6FGWDH.js";
|
|
62
60
|
import "./chunk-FIVFP53N.js";
|
|
63
|
-
import "./chunk-
|
|
64
|
-
import "./chunk-
|
|
65
|
-
import "./chunk-
|
|
66
|
-
import "./chunk-
|
|
67
|
-
import "./chunk-
|
|
68
|
-
import "./chunk-
|
|
69
|
-
import "./chunk-
|
|
70
|
-
import "./chunk-
|
|
71
|
-
import "./chunk-
|
|
72
|
-
import "./chunk-
|
|
73
|
-
import "./chunk-
|
|
74
|
-
import "./chunk-
|
|
75
|
-
import "./chunk-
|
|
76
|
-
import "./chunk-
|
|
77
|
-
import "./chunk-
|
|
78
|
-
import "./chunk-
|
|
61
|
+
import "./chunk-U57QRUP7.js";
|
|
62
|
+
import "./chunk-SWXKS7JK.js";
|
|
63
|
+
import "./chunk-WNGMI6AZ.js";
|
|
64
|
+
import "./chunk-ZAD7K4TI.js";
|
|
65
|
+
import "./chunk-ANYADN3S.js";
|
|
66
|
+
import "./chunk-U7RLFLTM.js";
|
|
67
|
+
import "./chunk-MVMNZ3Q3.js";
|
|
68
|
+
import "./chunk-O7OP5NQO.js";
|
|
69
|
+
import "./chunk-6SJ7HHAE.js";
|
|
70
|
+
import "./chunk-KLFF54AF.js";
|
|
71
|
+
import "./chunk-4YNUQGDP.js";
|
|
72
|
+
import "./chunk-T577U52I.js";
|
|
73
|
+
import "./chunk-GDDCKTBR.js";
|
|
74
|
+
import "./chunk-PALY5PGE.js";
|
|
75
|
+
import "./chunk-LVFI3TCG.js";
|
|
76
|
+
import "./chunk-JUS4Y4BW.js";
|
|
79
77
|
import "./chunk-M4OP5ASJ.js";
|
|
80
78
|
import "./chunk-XWBPP2HX.js";
|
|
81
79
|
import "./chunk-D72URWJE.js";
|
|
82
|
-
import "./chunk-
|
|
83
|
-
import "./chunk-
|
|
84
|
-
import "./chunk-
|
|
80
|
+
import "./chunk-FA3B2DHZ.js";
|
|
81
|
+
import "./chunk-SDAYOJLL.js";
|
|
82
|
+
import "./chunk-OUM4ZO53.js";
|
|
85
83
|
import "./chunk-7MEVD5PI.js";
|
|
86
84
|
import {
|
|
87
85
|
mcpErrorResult
|
|
@@ -90,12 +88,12 @@ import "./chunk-Y5E2WNWB.js";
|
|
|
90
88
|
import {
|
|
91
89
|
CliError
|
|
92
90
|
} from "./chunk-7KCBPAQS.js";
|
|
93
|
-
import "./chunk-
|
|
91
|
+
import "./chunk-3URYKAJP.js";
|
|
94
92
|
import {
|
|
95
93
|
__name
|
|
96
94
|
} from "./chunk-ZVVMGPBJ.js";
|
|
97
95
|
|
|
98
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
96
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/mcp/app-server.js
|
|
99
97
|
var EXCLUDED = [["mcp"]];
|
|
100
98
|
var aliasesOf = /* @__PURE__ */ __name((root, path) => {
|
|
101
99
|
let at = root;
|
|
@@ -205,27 +203,14 @@ var serveAppOverStdio = /* @__PURE__ */ __name(async (command, context, options)
|
|
|
205
203
|
transport: new StdioServerTransport(wire.input, wire.output),
|
|
206
204
|
onerror: /* @__PURE__ */ __name((error) => context.renderer.note(`mcp: ${error.message}`), "onerror")
|
|
207
205
|
});
|
|
208
|
-
|
|
209
|
-
wire.ended.then(() => resolve("input"));
|
|
210
|
-
if (own) {
|
|
211
|
-
if (signal?.aborted)
|
|
212
|
-
resolve("stopped");
|
|
213
|
-
else
|
|
214
|
-
signal?.addEventListener("abort", () => resolve("stopped"), { once: true });
|
|
215
|
-
} else {
|
|
216
|
-
process.once("SIGINT", () => resolve("stopped"));
|
|
217
|
-
process.once("SIGTERM", () => resolve("stopped"));
|
|
218
|
-
}
|
|
219
|
-
});
|
|
220
|
-
if (ended === "input")
|
|
221
|
-
await wire.answered();
|
|
206
|
+
await wire.finished(own ? signal : void 0);
|
|
222
207
|
wire.release();
|
|
223
208
|
await handle.close();
|
|
224
209
|
}, "serveAppOverStdio");
|
|
225
210
|
var serveAppOverHttp = /* @__PURE__ */ __name(async (command, context, options, http) => {
|
|
226
211
|
const { app } = options;
|
|
227
212
|
const { build } = createAppServer(command, context, options);
|
|
228
|
-
const { serveOverHttp } = await import("./serve-
|
|
213
|
+
const { serveOverHttp } = await import("./serve-Q4XF6ID2.js");
|
|
229
214
|
const listening = await serveOverHttp(build, {
|
|
230
215
|
...http,
|
|
231
216
|
appName: app.command,
|
|
@@ -18,12 +18,12 @@ import {
|
|
|
18
18
|
jitCompatCheck,
|
|
19
19
|
refineSqliteCodecs,
|
|
20
20
|
sql
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-3URYKAJP.js";
|
|
22
22
|
import {
|
|
23
23
|
__name
|
|
24
24
|
} from "./chunk-ZVVMGPBJ.js";
|
|
25
25
|
|
|
26
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/drizzle/bun.js
|
|
27
27
|
import { Database } from "bun:sqlite";
|
|
28
28
|
var bunSQLiteCodecs = refineSqliteCodecs({
|
|
29
29
|
"integer:boolean": { normalize: booleanFromInteger },
|
|
@@ -3,10 +3,10 @@ const require = __bundleRequire(import.meta.url);
|
|
|
3
3
|
import {
|
|
4
4
|
loadVectorExtension,
|
|
5
5
|
vectorExtension
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-IBCGCYRU.js";
|
|
7
7
|
import {
|
|
8
8
|
refuseOwnerStoreInTests
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-FA3B2DHZ.js";
|
|
10
10
|
import "./chunk-7MEVD5PI.js";
|
|
11
11
|
import "./chunk-ECZSYLSL.js";
|
|
12
12
|
import {
|
|
@@ -17,7 +17,7 @@ import {
|
|
|
17
17
|
__name
|
|
18
18
|
} from "./chunk-ZVVMGPBJ.js";
|
|
19
19
|
|
|
20
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/drivers/bun-sqlite.js
|
|
21
21
|
var customised = false;
|
|
22
22
|
var ownLibrary = /* @__PURE__ */ __name(async () => {
|
|
23
23
|
try {
|
|
@@ -8,12 +8,12 @@ import {
|
|
|
8
8
|
ACCESS_SECONDS,
|
|
9
9
|
REFRESH_SECONDS,
|
|
10
10
|
readStored
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-U346WBJ5.js";
|
|
12
12
|
import {
|
|
13
13
|
__name
|
|
14
14
|
} from "./chunk-ZVVMGPBJ.js";
|
|
15
15
|
|
|
16
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
16
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/mcp/http/oauth.js
|
|
17
17
|
import { createHash, randomBytes, randomInt, timingSafeEqual } from "node:crypto";
|
|
18
18
|
import { chmodSync, mkdirSync, renameSync, rmSync, writeFileSync } from "node:fs";
|
|
19
19
|
import { dirname } from "node:path";
|
|
@@ -2,7 +2,7 @@ import { createRequire as __bundleRequire } from "node:module";
|
|
|
2
2
|
const require = __bundleRequire(import.meta.url);
|
|
3
3
|
import {
|
|
4
4
|
alive
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-WQOGHND4.js";
|
|
6
6
|
import {
|
|
7
7
|
resolvePaths,
|
|
8
8
|
writeSecurely
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
__name
|
|
12
12
|
} from "./chunk-ZVVMGPBJ.js";
|
|
13
13
|
|
|
14
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
14
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/background/lock.js
|
|
15
15
|
import { existsSync, linkSync, mkdirSync, readdirSync, readFileSync, rmSync, writeFileSync } from "node:fs";
|
|
16
16
|
import { dirname, join } from "node:path";
|
|
17
17
|
var lockPath = /* @__PURE__ */ __name((app, profile, env) => join(resolvePaths({ appName: app.appName, prefix: app.envPrefix, env }).state, "serve", `${profile}.lock`), "lockPath");
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
__name
|
|
5
5
|
} from "./chunk-ZVVMGPBJ.js";
|
|
6
6
|
|
|
7
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/drizzle/shared-55XJMTPA.js
|
|
8
8
|
var entityKind = /* @__PURE__ */ Symbol.for("drizzle:entityKind");
|
|
9
9
|
var kindsByConstructor = /* @__PURE__ */ new WeakMap();
|
|
10
10
|
function collectKinds(ctor) {
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
__name
|
|
5
5
|
} from "./chunk-ZVVMGPBJ.js";
|
|
6
6
|
|
|
7
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/normalize.js
|
|
8
8
|
var NORMALIZER_VERSION = 1;
|
|
9
9
|
var fold = /* @__PURE__ */ __name((text) => text.normalize("NFKD").replace(new RegExp("\\p{M}+", "gu"), "").normalize("NFC").toLowerCase(), "fold");
|
|
10
10
|
var normalize = /* @__PURE__ */ __name((text) => fold(text).replace(new RegExp("\\p{Cc}", "gu"), " ").replace(/\s+/gu, " ").trim(), "normalize");
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
__name
|
|
5
5
|
} from "./chunk-ZVVMGPBJ.js";
|
|
6
6
|
|
|
7
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/runs/secrets.js
|
|
8
8
|
var SECRET_WORDS = /* @__PURE__ */ new Set([
|
|
9
9
|
"authorization",
|
|
10
10
|
"cookie",
|
|
@@ -58,7 +58,7 @@ var ENTRIES = [
|
|
|
58
58
|
var REASONS = defineReasons(ENTRIES.map(([reason, code, message]) => ({ reason, code, message, details: [] })));
|
|
59
59
|
|
|
60
60
|
// dist/version.js
|
|
61
|
-
var VERSION = "0.
|
|
61
|
+
var VERSION = "0.32.0";
|
|
62
62
|
|
|
63
63
|
// dist/identity.js
|
|
64
64
|
var PACKAGE = "@wirecat/mail-cli";
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
__name
|
|
5
5
|
} from "./chunk-ZVVMGPBJ.js";
|
|
6
6
|
|
|
7
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/http/listen.js
|
|
8
8
|
import { createServer } from "node:http";
|
|
9
9
|
import { Readable } from "node:stream";
|
|
10
10
|
var MAX_BODY = 4 * 1024 * 1024;
|
|
@@ -6,13 +6,13 @@ import {
|
|
|
6
6
|
agentArguments,
|
|
7
7
|
agentJson,
|
|
8
8
|
commandAvailability
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-MENP3FF5.js";
|
|
10
10
|
import {
|
|
11
11
|
failureContext
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-CD3TAITM.js";
|
|
13
13
|
import {
|
|
14
14
|
callerOf
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-TDTCCHAI.js";
|
|
16
16
|
import {
|
|
17
17
|
QUERY_ARGUMENT,
|
|
18
18
|
lentConnection,
|
|
@@ -20,10 +20,10 @@ import {
|
|
|
20
20
|
refuseLacking,
|
|
21
21
|
servicesFor,
|
|
22
22
|
storeModeDeps
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-HUWQ7LXZ.js";
|
|
24
24
|
import {
|
|
25
25
|
MAX_BUFFERED_INPUT
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-IVD3JTN5.js";
|
|
27
27
|
import {
|
|
28
28
|
DEFAULT_OUTPUT_BYTES,
|
|
29
29
|
ENTITIES,
|
|
@@ -38,32 +38,33 @@ import {
|
|
|
38
38
|
refuseStoreChange,
|
|
39
39
|
sealed,
|
|
40
40
|
startRecording
|
|
41
|
-
} from "./chunk-
|
|
41
|
+
} from "./chunk-MSK7RNOM.js";
|
|
42
42
|
import {
|
|
43
43
|
authorityAllowed,
|
|
44
44
|
botApiAllowed,
|
|
45
|
+
fetchesAt,
|
|
45
46
|
keyForCommand,
|
|
46
47
|
levelFor,
|
|
47
48
|
readKeysForCommand
|
|
48
|
-
} from "./chunk-
|
|
49
|
+
} from "./chunk-PCWAZVAD.js";
|
|
49
50
|
import {
|
|
50
51
|
currentCaller,
|
|
51
52
|
keepsSuccess,
|
|
52
53
|
runContextOf,
|
|
53
54
|
withCaller
|
|
54
|
-
} from "./chunk-
|
|
55
|
+
} from "./chunk-Z6OKVD3R.js";
|
|
55
56
|
import {
|
|
56
57
|
enclosingTraceId,
|
|
57
58
|
inRun,
|
|
58
59
|
newRunId,
|
|
59
60
|
traceOf
|
|
60
|
-
} from "./chunk-
|
|
61
|
+
} from "./chunk-U7RLFLTM.js";
|
|
61
62
|
import {
|
|
62
63
|
queryDescription
|
|
63
|
-
} from "./chunk-
|
|
64
|
+
} from "./chunk-MVMNZ3Q3.js";
|
|
64
65
|
import {
|
|
65
66
|
storeDamaged
|
|
66
|
-
} from "./chunk-
|
|
67
|
+
} from "./chunk-O7OP5NQO.js";
|
|
67
68
|
import {
|
|
68
69
|
captureStreams,
|
|
69
70
|
traceIdOf
|
|
@@ -115,7 +116,7 @@ import {
|
|
|
115
116
|
__name
|
|
116
117
|
} from "./chunk-ZVVMGPBJ.js";
|
|
117
118
|
|
|
118
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
119
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/mcp/agent.js
|
|
119
120
|
import { Readable } from "node:stream";
|
|
120
121
|
|
|
121
122
|
// 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/standards/lint.js
|
|
@@ -3287,7 +3288,7 @@ var VOCABULARY = defineVocabulary({
|
|
|
3287
3288
|
]
|
|
3288
3289
|
});
|
|
3289
3290
|
|
|
3290
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
3291
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/mcp/agent.js
|
|
3291
3292
|
var TYPES = new Map(VOCABULARY.flags.map((flag) => [flag.name, flag.type]));
|
|
3292
3293
|
var snake = /* @__PURE__ */ __name((name) => name.replaceAll("|", "_or_").replace(/[^a-z0-9]+/gi, "_"), "snake");
|
|
3293
3294
|
var longOf = /* @__PURE__ */ __name((option) => option.flags.match(/--[a-z0-9][a-z0-9-]*/)?.[0], "longOf");
|
|
@@ -3514,7 +3515,7 @@ var runCommandForAgent = /* @__PURE__ */ __name(async (program, path, input, ctx
|
|
|
3514
3515
|
}
|
|
3515
3516
|
}, "runCommandForAgent");
|
|
3516
3517
|
|
|
3517
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
3518
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/mcp/tool.js
|
|
3518
3519
|
var limit = optional(pipe(number(), integer(), minValue(1), maxValue(100), description("how many")));
|
|
3519
3520
|
var page = optional(pipe(number(), integer(), minValue(1), description("which page, from 1")));
|
|
3520
3521
|
var message = pipe(
|
|
@@ -3568,8 +3569,8 @@ var toolKey = /* @__PURE__ */ __name((name, definition) => definition.key !== vo
|
|
|
3568
3569
|
var inputOf = /* @__PURE__ */ __name((definition, syncAllowed) => strictObject(syncAllowed || !("sync_first" in definition.input.entries) ? definition.input.entries : Object.fromEntries(Object.entries(definition.input.entries).filter(([name]) => !["sync_first", "sync_time", "max_chats", "max_messages"].includes(name)))), "inputOf");
|
|
3569
3570
|
var syncAllowedFor = /* @__PURE__ */ __name((key2, defaults) => {
|
|
3570
3571
|
const permissions = defaults.settings.permissions ?? {};
|
|
3571
|
-
const shared = defaults.syncAllowed ?? levelFor(permissions, "messages.sync-first").level
|
|
3572
|
-
return shared && (!key2.startsWith("stats_") || levelFor(permissions, `${key2.replaceAll("_", ".")}.sync-first`).level
|
|
3572
|
+
const shared = defaults.syncAllowed ?? fetchesAt(levelFor(permissions, "messages.sync-first").level);
|
|
3573
|
+
return shared && (!key2.startsWith("stats_") || fetchesAt(levelFor(permissions, `${key2.replaceAll("_", ".")}.sync-first`).level));
|
|
3573
3574
|
}, "syncAllowedFor");
|
|
3574
3575
|
var entryRunner = /* @__PURE__ */ __name((registration) => {
|
|
3575
3576
|
const run = callRunner(registration);
|
|
@@ -3732,7 +3733,7 @@ var BinaryResource = class {
|
|
|
3732
3733
|
};
|
|
3733
3734
|
var answered = /* @__PURE__ */ __name((answer, maxBytes = DEFAULT_OUTPUT_BYTES, targets) => {
|
|
3734
3735
|
const bounded = /* @__PURE__ */ __name((result) => {
|
|
3735
|
-
if (maxBytes !== 0 && Buffer.byteLength(JSON.stringify(result)) > maxBytes)
|
|
3736
|
+
if (maxBytes !== 0 && Buffer.byteLength(JSON.stringify(result.content)) > maxBytes)
|
|
3736
3737
|
throw new CliError("invalid_response", "tool output exceeds its byte limit \u2014 reduce limit or use a narrower request", { reason: "output.too-large", max_bytes: maxBytes, retryable: false });
|
|
3737
3738
|
return result;
|
|
3738
3739
|
}, "bounded");
|
|
@@ -3773,7 +3774,7 @@ var failed = /* @__PURE__ */ __name((error, errors, effects) => {
|
|
|
3773
3774
|
return mcpErrorResult(JSON.parse(agentJson(errorObjectOf(storeDamaged(error), context))));
|
|
3774
3775
|
}, "failed");
|
|
3775
3776
|
|
|
3776
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
3777
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/mcp/surface.js
|
|
3777
3778
|
import { randomUUID } from "node:crypto";
|
|
3778
3779
|
var MATCHES = 8;
|
|
3779
3780
|
var ANSWER = answerSchema();
|
|
@@ -2,14 +2,14 @@ import { createRequire as __bundleRequire } from "node:module";
|
|
|
2
2
|
const require = __bundleRequire(import.meta.url);
|
|
3
3
|
import {
|
|
4
4
|
stdinFieldOf
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-MHXZ62CU.js";
|
|
6
6
|
import {
|
|
7
7
|
commandPathOf
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-NMN5JUYL.js";
|
|
9
9
|
import {
|
|
10
10
|
commandServerRequest,
|
|
11
11
|
metaOf
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-MSK7RNOM.js";
|
|
13
13
|
import {
|
|
14
14
|
errorObjectOf,
|
|
15
15
|
renderError
|
|
@@ -21,14 +21,14 @@ import {
|
|
|
21
21
|
__name
|
|
22
22
|
} from "./chunk-ZVVMGPBJ.js";
|
|
23
23
|
|
|
24
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/cli/command-server.js
|
|
25
25
|
import { createInterface } from "node:readline";
|
|
26
26
|
|
|
27
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/cli/command-server-argv.js
|
|
28
28
|
var COMMAND_SERVER_ARGV = ["commands", "--serve"];
|
|
29
29
|
var isCommandServer = /* @__PURE__ */ __name((args) => args.length === COMMAND_SERVER_ARGV.length && COMMAND_SERVER_ARGV.every((word, at) => args[at] === word), "isCommandServer");
|
|
30
30
|
|
|
31
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/cli/command-server.js
|
|
32
32
|
var COMMAND_SERVER_PROTOCOL = 1;
|
|
33
33
|
var COMMAND_SERVER_IDLE_MS = 10 * 6e4;
|
|
34
34
|
var COMMAND_SERVER_CONCURRENT = 8;
|