@wirecat/mail-cli 0.1.1 → 0.3.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 +51 -0
- package/README.md +4 -3
- package/dist/bin/mail.js +2 -2
- package/dist/bundle/{all-profiles-TKMBELRZ.js → all-profiles-52LCOKSL.js} +5 -5
- package/dist/bundle/{anthropic-7LMUAEIZ.js → anthropic-HPW7PLTT.js} +3 -3
- package/dist/bundle/{app-server-JGMIJDD4.js → app-server-Y7XSPVHJ.js} +39 -39
- package/dist/bundle/{bun-XRO6XJHQ.js → bun-B7YXDIMT.js} +2 -2
- package/dist/bundle/{bun-sqlite-Z54LEHVM.js → bun-sqlite-TTTKY7H2.js} +2 -2
- package/dist/bundle/{chunk-52F5DWS5.js → chunk-37MSU5O6.js} +1 -1
- package/dist/bundle/{chunk-5NYMNSSO.js → chunk-3RDTVH3H.js} +3 -3
- package/dist/bundle/{chunk-4E7BN3TC.js → chunk-4PXWXI2U.js} +2 -2
- package/dist/bundle/{chunk-GN62YOT5.js → chunk-4UOEUEZZ.js} +4 -4
- package/dist/bundle/{chunk-TQFCPUIM.js → chunk-5LY3OS7U.js} +1 -1
- package/dist/bundle/{chunk-QLEUNU6G.js → chunk-5SSFYIFF.js} +4 -4
- package/dist/bundle/{chunk-IK5TH3O7.js → chunk-732GKOLO.js} +10 -10
- package/dist/bundle/{chunk-UH4DDRHA.js → chunk-C2THROZU.js} +42 -42
- package/dist/bundle/{chunk-OTUOZ33L.js → chunk-C6E3VFUX.js} +2 -2
- package/dist/bundle/{chunk-YPQQ5J4X.js → chunk-DKKCQMDM.js} +16 -16
- package/dist/bundle/{chunk-6MAZWSC3.js → chunk-FGNTGLWA.js} +3 -3
- package/dist/bundle/{chunk-GQQJOH7A.js → chunk-FUXSKWWJ.js} +58 -46
- package/dist/bundle/{chunk-3KEVLSNN.js → chunk-FX77WAQL.js} +46 -8
- package/dist/bundle/{chunk-VEIZZRQ5.js → chunk-GX2M3AOO.js} +12 -3
- package/dist/bundle/{chunk-CEW6KIFA.js → chunk-H2JVXO5V.js} +32 -22
- package/dist/bundle/{chunk-ZANYM66S.js → chunk-HS25KDT3.js} +1 -1
- package/dist/bundle/{chunk-KM7Q67Z3.js → chunk-I2ARI6FI.js} +1 -1
- package/dist/bundle/{chunk-TWPDVUBR.js → chunk-IXHLMSHV.js} +2 -2
- package/dist/bundle/{chunk-BTQX2ZSZ.js → chunk-JDOOPGKW.js} +2 -2
- package/dist/bundle/{chunk-GK4M2SUP.js → chunk-JHNLU42I.js} +1 -1
- package/dist/bundle/{chunk-KHTO2Q6E.js → chunk-JXYFIUVX.js} +4 -4
- package/dist/bundle/{chunk-F6D6PJ34.js → chunk-K6SIGXRS.js} +5 -5
- package/dist/bundle/{chunk-QQB7WT7R.js → chunk-KALDYMKJ.js} +3 -3
- package/dist/bundle/{chunk-NK7EB63L.js → chunk-KXVZ373I.js} +960 -496
- package/dist/bundle/{chunk-GAH7N7HO.js → chunk-LCA5KC34.js} +44 -44
- package/dist/bundle/{chunk-TVREDYX4.js → chunk-LJDOPCPW.js} +100 -91
- package/dist/bundle/{chunk-3KOA73LS.js → chunk-MHNEMDH3.js} +14 -14
- package/dist/bundle/{chunk-MS53RALV.js → chunk-MXUUQXMA.js} +5 -5
- package/dist/bundle/{chunk-YO4CUH5E.js → chunk-N5WIUNOT.js} +1 -1
- package/dist/bundle/{chunk-EOEDICIE.js → chunk-O2F54PUO.js} +1 -1
- package/dist/bundle/{chunk-2LLNPNMB.js → chunk-O3DRPTWF.js} +1 -1
- package/dist/bundle/{chunk-FZ5FXIG6.js → chunk-PL6UPJIL.js} +1 -1
- package/dist/bundle/{chunk-75CWWETH.js → chunk-PYIJCWCH.js} +11 -11
- package/dist/bundle/{chunk-GWDCKUBI.js → chunk-QTWIZKUI.js} +30 -29
- package/dist/bundle/{chunk-7SXGLT6T.js → chunk-RMYYKBFW.js} +9 -8
- package/dist/bundle/{chunk-JVMVLITS.js → chunk-RORC2FW7.js} +4 -2
- package/dist/bundle/{chunk-K4FVKPDQ.js → chunk-RVIMMCHF.js} +9 -9
- package/dist/bundle/{chunk-T6464KYA.js → chunk-RZCFEASJ.js} +205 -204
- package/dist/bundle/{chunk-Z34ICZA3.js → chunk-SRMJ6LLC.js} +5 -5
- package/dist/bundle/{chunk-TWTATDM7.js → chunk-TL7PE6JU.js} +6 -6
- package/dist/bundle/{chunk-4FEMINO2.js → chunk-TLZWUADZ.js} +5 -5
- package/dist/bundle/{chunk-3E3WA2L6.js → chunk-TNQOKGJS.js} +21 -21
- package/dist/bundle/{chunk-MNOIRJEO.js → chunk-V7NZTJKU.js} +7 -7
- package/dist/bundle/{chunk-TE5U5OAM.js → chunk-VTJDEWMB.js} +2 -2
- package/dist/bundle/{chunk-J6MSJLIW.js → chunk-X7TFD5SX.js} +1 -1
- package/dist/bundle/{chunk-FDCGTODC.js → chunk-XD3TL4BK.js} +1 -1
- package/dist/bundle/{chunk-WLFLBWNH.js → chunk-XQVGIW4R.js} +2 -2
- package/dist/bundle/{chunk-JBBZCTTF.js → chunk-Y2HGQK7A.js} +1 -1
- package/dist/bundle/{chunk-WXAXYJJ7.js → chunk-YVIX7FHL.js} +5 -5
- package/dist/bundle/{chunk-CH6RXYAX.js → chunk-ZIJJNH47.js} +1 -1
- package/dist/bundle/{command-contract-WU434ZUL.js → command-contract-3HA7CZEQ.js} +13 -13
- package/dist/bundle/{decode-YB3ZDTES.js → decode-VLI3MAXE.js} +2 -2
- package/dist/bundle/{dist-A6GKSKFC.js → dist-C7LAAMNF.js} +14 -14
- package/dist/bundle/{echarts-YNGCOYHW.js → echarts-POTU3SHN.js} +2 -2
- package/dist/bundle/{embed-LWNHIRBQ.js → embed-J2DEEEUF.js} +3 -3
- package/dist/bundle/{embedder-2LYD3U37.js → embedder-5N56V7YJ.js} +6 -6
- package/dist/bundle/{first-run-N3HJKGU7.js → first-run-XILZE4PI.js} +5 -5
- package/dist/bundle/{first-screen-4U2DMV3G.js → first-screen-43VLEDWZ.js} +14 -14
- package/dist/bundle/{instructions-GJHHFV64.js → instructions-B7AUZXPL.js} +1 -1
- package/dist/bundle/mail.js +2 -2
- package/dist/bundle/{node-GFOH6FKP.js → node-SZAO6HTA.js} +2 -2
- package/dist/bundle/{node-sqlite-NBXQXBIU.js → node-sqlite-O34FFLRV.js} +2 -2
- package/dist/bundle/{oauth-56EFO5AQ.js → oauth-YYTLIPJT.js} +4 -4
- package/dist/bundle/{open-2V7QZQJP.js → open-SWJGI6H4.js} +1 -1
- package/dist/bundle/{openai-V3SVACVL.js → openai-GYXWCQOV.js} +10 -10
- package/dist/bundle/{process-XVDX4SPD.js → process-GLVWCUMK.js} +1 -1
- package/dist/bundle/{program-JTJB26P3.js → program-HW73TGIF.js} +1725 -1467
- package/dist/bundle/{prompt-YKWAI222.js → prompt-OZLHHGCD.js} +2 -2
- package/dist/bundle/{recognize-PAR66KVM.js → recognize-RDQSGHC5.js} +1 -1
- package/dist/bundle/{remote-CE43TKXC.js → remote-BKU5P3GK.js} +4 -4
- package/dist/bundle/{rerank-M7S7P2TW.js → rerank-EQIXYHKB.js} +4 -4
- package/dist/bundle/{serve-ENPMIV6J.js → serve-S6K5HKWG.js} +6 -6
- package/dist/bundle/{server-MBEZLVKZ.js → server-4VRVHPQC.js} +31 -31
- package/dist/bundle/server-WK6DRJX2.js +63 -0
- package/dist/bundle/{sqlite-runtime-HVGDHBJJ.js → sqlite-runtime-OOE455YM.js} +2 -2
- package/dist/bundle/{state-QZSOSKBD.js → state-OLPOJ2TY.js} +3 -3
- package/dist/bundle/{store-2BUX6LVX.js → store-6AVCPLH4.js} +9 -9
- package/dist/bundle/{store-UJ7SNKXI.js → store-WFV26CWY.js} +30 -12
- package/dist/bundle/store-maintenance-command-S6235I3W.js +52 -0
- package/dist/commands/account.d.ts.map +1 -1
- package/dist/commands/account.js +6 -5
- package/dist/commands/account.js.map +1 -1
- package/dist/commands/context.d.ts +19 -8
- package/dist/commands/context.d.ts.map +1 -1
- package/dist/commands/context.js +14 -10
- package/dist/commands/context.js.map +1 -1
- package/dist/commands/folders.js +4 -4
- package/dist/commands/folders.js.map +1 -1
- package/dist/commands/login.d.ts +2 -2
- package/dist/commands/login.d.ts.map +1 -1
- package/dist/commands/login.js +3 -5
- package/dist/commands/login.js.map +1 -1
- package/dist/commands/mailbox.d.ts +2 -1
- package/dist/commands/mailbox.d.ts.map +1 -1
- package/dist/commands/mailbox.js.map +1 -1
- package/dist/commands/session-start.d.ts +3 -0
- package/dist/commands/session-start.d.ts.map +1 -0
- package/dist/commands/session-start.js +117 -0
- package/dist/commands/session-start.js.map +1 -0
- package/dist/commands/session.d.ts.map +1 -1
- package/dist/commands/session.js +9 -117
- package/dist/commands/session.js.map +1 -1
- package/dist/commands/status.d.ts.map +1 -1
- package/dist/commands/status.js +8 -20
- package/dist/commands/status.js.map +1 -1
- package/dist/commands/sync.d.ts.map +1 -1
- package/dist/commands/sync.js +49 -26
- package/dist/commands/sync.js.map +1 -1
- package/dist/config.d.ts +2 -0
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +4 -0
- package/dist/config.js.map +1 -1
- package/dist/discovery.d.ts +4 -15
- package/dist/discovery.d.ts.map +1 -1
- package/dist/discovery.js +19 -92
- package/dist/discovery.js.map +1 -1
- package/dist/mail/backend.d.ts +36 -0
- package/dist/mail/backend.d.ts.map +1 -0
- package/dist/mail/backend.js +2 -0
- package/dist/mail/backend.js.map +1 -0
- package/dist/mail/imap/account.d.ts +5 -0
- package/dist/mail/imap/account.d.ts.map +1 -0
- package/dist/mail/imap/account.js +41 -0
- package/dist/mail/imap/account.js.map +1 -0
- package/dist/mail/imap/connection.d.ts +62 -0
- package/dist/mail/imap/connection.d.ts.map +1 -0
- package/dist/mail/imap/connection.js +188 -0
- package/dist/mail/imap/connection.js.map +1 -0
- package/dist/mail/{imap-errors.d.ts → imap/errors.d.ts} +1 -1
- package/dist/mail/imap/errors.d.ts.map +1 -0
- package/dist/mail/{imap-errors.js → imap/errors.js} +1 -1
- package/dist/mail/imap/errors.js.map +1 -0
- package/dist/mail/imap/index.d.ts +7 -0
- package/dist/mail/imap/index.d.ts.map +1 -0
- package/dist/mail/imap/index.js +11 -0
- package/dist/mail/imap/index.js.map +1 -0
- package/dist/mail/{imap-messages.d.ts → imap/messages.d.ts} +9 -9
- package/dist/mail/imap/messages.d.ts.map +1 -0
- package/dist/mail/imap/messages.js +66 -0
- package/dist/mail/imap/messages.js.map +1 -0
- package/dist/mail/imap/read.d.ts +7 -0
- package/dist/mail/imap/read.d.ts.map +1 -0
- package/dist/mail/imap/read.js +164 -0
- package/dist/mail/imap/read.js.map +1 -0
- package/dist/mail/rethread.d.ts +15 -0
- package/dist/mail/rethread.d.ts.map +1 -0
- package/dist/mail/rethread.js +52 -0
- package/dist/mail/rethread.js.map +1 -0
- package/dist/profile.d.ts +2 -1
- package/dist/profile.d.ts.map +1 -1
- package/dist/profile.js +1 -0
- package/dist/profile.js.map +1 -1
- package/dist/program.d.ts.map +1 -1
- package/dist/program.js +8 -1
- package/dist/program.js.map +1 -1
- package/dist/providers.d.ts +126 -26
- package/dist/providers.d.ts.map +1 -1
- package/dist/providers.js +141 -72
- package/dist/providers.js.map +1 -1
- package/dist/secret.d.ts +2 -1
- package/dist/secret.d.ts.map +1 -1
- package/dist/secret.js +1 -0
- package/dist/secret.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +3 -2
- package/skills/mail-cli/SKILL.md +8 -0
- package/dist/bundle/server-JRTHUCVY.js +0 -63
- package/dist/bundle/store-maintenance-command-I7V5C44K.js +0 -52
- package/dist/mail/imap-errors.d.ts.map +0 -1
- package/dist/mail/imap-errors.js.map +0 -1
- package/dist/mail/imap-messages.d.ts.map +0 -1
- package/dist/mail/imap-messages.js +0 -66
- package/dist/mail/imap-messages.js.map +0 -1
- package/dist/mail/imap.d.ts +0 -67
- package/dist/mail/imap.d.ts.map +0 -1
- package/dist/mail/imap.js +0 -348
- package/dist/mail/imap.js.map +0 -1
|
@@ -6,26 +6,26 @@ import {
|
|
|
6
6
|
agentArguments,
|
|
7
7
|
agentJson,
|
|
8
8
|
commandAvailability
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-RVIMMCHF.js";
|
|
10
10
|
import {
|
|
11
11
|
failureContext
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-RORC2FW7.js";
|
|
13
13
|
import {
|
|
14
14
|
callerOf
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-GX2M3AOO.js";
|
|
16
16
|
import {
|
|
17
17
|
lentConnection,
|
|
18
18
|
onlineDeps,
|
|
19
19
|
refuseLacking,
|
|
20
20
|
servicesFor,
|
|
21
21
|
storeModeDeps
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-RZCFEASJ.js";
|
|
23
23
|
import {
|
|
24
24
|
MAX_BUFFERED_INPUT
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-ZIJJNH47.js";
|
|
26
26
|
import {
|
|
27
27
|
ENTITIES
|
|
28
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-LJDOPCPW.js";
|
|
29
29
|
import {
|
|
30
30
|
DEFAULT_OUTPUT_BYTES,
|
|
31
31
|
LOCAL_WRITE,
|
|
@@ -43,20 +43,20 @@ import {
|
|
|
43
43
|
sealed,
|
|
44
44
|
startRecording,
|
|
45
45
|
traceOf
|
|
46
|
-
} from "./chunk-
|
|
46
|
+
} from "./chunk-FUXSKWWJ.js";
|
|
47
47
|
import {
|
|
48
48
|
authorityAllowed,
|
|
49
49
|
botApiAllowed,
|
|
50
50
|
keyForCommand,
|
|
51
51
|
levelFor,
|
|
52
52
|
readKeysForCommand
|
|
53
|
-
} from "./chunk-
|
|
53
|
+
} from "./chunk-5SSFYIFF.js";
|
|
54
54
|
import {
|
|
55
55
|
currentCaller,
|
|
56
56
|
keepsSuccess,
|
|
57
57
|
runContextOf,
|
|
58
58
|
withCaller
|
|
59
|
-
} from "./chunk-
|
|
59
|
+
} from "./chunk-RMYYKBFW.js";
|
|
60
60
|
import {
|
|
61
61
|
captureStreams,
|
|
62
62
|
traceIdOf
|
|
@@ -107,7 +107,7 @@ import {
|
|
|
107
107
|
__name
|
|
108
108
|
} from "./chunk-ZVVMGPBJ.js";
|
|
109
109
|
|
|
110
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
110
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.519.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_3a77a7242330d89656a32c8be893f1d1/node_modules/@wirecat/cli-core/dist/mcp/agent.js
|
|
111
111
|
import { Readable } from "node:stream";
|
|
112
112
|
|
|
113
113
|
// node_modules/.pnpm/@wirecat+cli-base@0.68.1_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
|
|
@@ -2773,7 +2773,7 @@ var VOCABULARY = defineVocabulary({
|
|
|
2773
2773
|
flags: [...HOW_FLAGS, ...WHAT_FLAGS, ...CALENDAR_FLAGS]
|
|
2774
2774
|
});
|
|
2775
2775
|
|
|
2776
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
2776
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.519.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_3a77a7242330d89656a32c8be893f1d1/node_modules/@wirecat/cli-core/dist/mcp/agent.js
|
|
2777
2777
|
var TYPES = new Map(VOCABULARY.flags.map((flag) => [flag.name, flag.type]));
|
|
2778
2778
|
var snake = /* @__PURE__ */ __name((name) => name.replaceAll("|", "_or_").replace(/[^a-z0-9]+/gi, "_"), "snake");
|
|
2779
2779
|
var longOf = /* @__PURE__ */ __name((option) => option.flags.match(/--[a-z0-9][a-z0-9-]*/)?.[0], "longOf");
|
|
@@ -2994,7 +2994,7 @@ var runCommandForAgent = /* @__PURE__ */ __name(async (program, path, input, ctx
|
|
|
2994
2994
|
}
|
|
2995
2995
|
}, "runCommandForAgent");
|
|
2996
2996
|
|
|
2997
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
2997
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.519.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_3a77a7242330d89656a32c8be893f1d1/node_modules/@wirecat/cli-core/dist/mcp/tool.js
|
|
2998
2998
|
var limit = optional(pipe(number(), integer(), minValue(1), maxValue(100), description("how many")));
|
|
2999
2999
|
var page = optional(pipe(number(), integer(), minValue(1), description("which page, from 1")));
|
|
3000
3000
|
var message = pipe(
|
|
@@ -3108,7 +3108,7 @@ var entryRunner = /* @__PURE__ */ __name((registration) => {
|
|
|
3108
3108
|
...outcomeOf(result),
|
|
3109
3109
|
startedAt,
|
|
3110
3110
|
finishedAt: Date.now()
|
|
3111
|
-
})?.catch(() => void 0);
|
|
3111
|
+
}, caller)?.catch(() => void 0);
|
|
3112
3112
|
return result;
|
|
3113
3113
|
};
|
|
3114
3114
|
}, "entryRunner");
|
|
@@ -3253,7 +3253,7 @@ var failed = /* @__PURE__ */ __name((error, errors, effects) => {
|
|
|
3253
3253
|
return mcpErrorResult(JSON.parse(agentJson(errorObjectOf(error, context))));
|
|
3254
3254
|
}, "failed");
|
|
3255
3255
|
|
|
3256
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
3256
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.519.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_3a77a7242330d89656a32c8be893f1d1/node_modules/@wirecat/cli-core/dist/mcp/surface.js
|
|
3257
3257
|
import { randomUUID } from "node:crypto";
|
|
3258
3258
|
var MATCHES = 8;
|
|
3259
3259
|
var ANSWER = answerSchema();
|
|
@@ -2,16 +2,16 @@ import { createRequire as __bundleRequire } from "node:module";
|
|
|
2
2
|
const require = __bundleRequire(import.meta.url);
|
|
3
3
|
import {
|
|
4
4
|
ENTITIES
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-LJDOPCPW.js";
|
|
6
6
|
import {
|
|
7
7
|
annotate,
|
|
8
8
|
answerSchema,
|
|
9
9
|
describeOptions,
|
|
10
10
|
metaOf
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-FUXSKWWJ.js";
|
|
12
12
|
import {
|
|
13
13
|
keyForCommand
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-5SSFYIFF.js";
|
|
15
15
|
import {
|
|
16
16
|
jsonSchemaOf
|
|
17
17
|
} from "./chunk-LQ37ALDJ.js";
|
|
@@ -22,7 +22,7 @@ import {
|
|
|
22
22
|
__name
|
|
23
23
|
} from "./chunk-ZVVMGPBJ.js";
|
|
24
24
|
|
|
25
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.519.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_3a77a7242330d89656a32c8be893f1d1/node_modules/@wirecat/cli-core/dist/cli/answer-entity.js
|
|
26
26
|
var schemas = /* @__PURE__ */ new WeakMap();
|
|
27
27
|
var answerEntity = /* @__PURE__ */ __name((command, name, schema, options = {}) => {
|
|
28
28
|
if (Object.hasOwn(ENTITIES, name))
|
|
@@ -52,7 +52,7 @@ var answerProjectionSchema = /* @__PURE__ */ __name((command) => {
|
|
|
52
52
|
return own && metaOf(command).output?.entity === own.name ? own.project : void 0;
|
|
53
53
|
}, "answerProjectionSchema");
|
|
54
54
|
|
|
55
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
55
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.519.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_3a77a7242330d89656a32c8be893f1d1/node_modules/@wirecat/cli-core/dist/cli/command-contract.js
|
|
56
56
|
var SCHEMA_DIALECT = "https://json-schema.org/draft/2020-12/schema";
|
|
57
57
|
var outputOf = /* @__PURE__ */ __name((command) => {
|
|
58
58
|
const entity = answerEntitySchema(command);
|
|
@@ -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.519.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_3a77a7242330d89656a32c8be893f1d1/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) {
|
|
@@ -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.519.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_3a77a7242330d89656a32c8be893f1d1/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.519.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_3a77a7242330d89656a32c8be893f1d1/node_modules/@wirecat/cli-core/dist/mcp/bot/instructions.js
|
|
8
8
|
var botInstructions = /* @__PURE__ */ __name(({ command, name, profile, writes, skill }) => [
|
|
9
9
|
`The owner's ${name} bot "${profile}", through the official Bot API \u2014 not the owner's personal account. What it writes, people see as the bot.`,
|
|
10
10
|
"Use these tools to read the chats this bot is in, find a message or a person, and \u2014 when the profile allows \u2014 write as the bot.",
|
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
__name
|
|
8
8
|
} from "./chunk-ZVVMGPBJ.js";
|
|
9
9
|
|
|
10
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.519.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_3a77a7242330d89656a32c8be893f1d1/node_modules/@wirecat/cli-core/dist/store/path.js
|
|
11
11
|
import { join } from "node:path";
|
|
12
12
|
var wirecatDirectory = /* @__PURE__ */ __name((env = process.env, platform) => resolvePaths({ appName: "WireCat", prefix: "WIRECAT", env, ...platform ? { platform } : {} }).state, "wirecatDirectory");
|
|
13
13
|
var storePath = /* @__PURE__ */ __name((env = process.env) => env.MESSAGING_STORE ?? join(wirecatDirectory(env), "wirecat.db"), "storePath");
|
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
__name
|
|
8
8
|
} from "./chunk-ZVVMGPBJ.js";
|
|
9
9
|
|
|
10
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.519.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_3a77a7242330d89656a32c8be893f1d1/node_modules/@wirecat/cli-core/dist/files/ordinary-file.js
|
|
11
11
|
import { constants } from "node:fs";
|
|
12
12
|
import { lstat, open } from "node:fs/promises";
|
|
13
13
|
var deviceOf = /* @__PURE__ */ __name((dev) => process.platform === "win32" ? BigInt.asUintN(32, dev) : dev, "deviceOf");
|
|
@@ -73,7 +73,7 @@ var syncDirectory = /* @__PURE__ */ __name(async (path) => {
|
|
|
73
73
|
}
|
|
74
74
|
}, "syncDirectory");
|
|
75
75
|
|
|
76
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
76
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.519.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_3a77a7242330d89656a32c8be893f1d1/node_modules/@wirecat/cli-core/dist/files/atomic-write.js
|
|
77
77
|
import { randomUUID } from "node:crypto";
|
|
78
78
|
import { constants as constants2 } from "node:fs";
|
|
79
79
|
import { link, open as open2, realpath, rename, unlink } from "node:fs/promises";
|
|
@@ -111,7 +111,7 @@ var writeFileAtomic = /* @__PURE__ */ __name(async (path, content, { mode = 384,
|
|
|
111
111
|
}
|
|
112
112
|
}, "writeFileAtomic");
|
|
113
113
|
|
|
114
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
114
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.519.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_3a77a7242330d89656a32c8be893f1d1/node_modules/@wirecat/cli-core/dist/files/bounded-utf8.js
|
|
115
115
|
var readBoundedUtf8File = /* @__PURE__ */ __name(async (path, { maxBytes }) => {
|
|
116
116
|
if (!Number.isSafeInteger(maxBytes) || maxBytes < 1 || maxBytes > 16 * 1024 * 1024)
|
|
117
117
|
throw new CliError("validation_error", "file maxBytes takes 1\u201316777216 bytes");
|
|
@@ -140,21 +140,21 @@ var readBoundedUtf8File = /* @__PURE__ */ __name(async (path, { maxBytes }) => {
|
|
|
140
140
|
}
|
|
141
141
|
}, "readBoundedUtf8File");
|
|
142
142
|
|
|
143
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
143
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.519.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_3a77a7242330d89656a32c8be893f1d1/node_modules/@wirecat/cli-core/dist/files/lock.js
|
|
144
144
|
import { mkdir as mkdir2 } from "node:fs/promises";
|
|
145
145
|
import { basename as basename2, dirname as dirname2 } from "node:path";
|
|
146
146
|
|
|
147
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
147
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.519.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_3a77a7242330d89656a32c8be893f1d1/node_modules/@wirecat/cli-core/dist/files/native-writer-lease.js
|
|
148
148
|
import { randomUUID as randomUUID2 } from "node:crypto";
|
|
149
149
|
import { lstat as lstat3, mkdir, open as open3, realpath as realpath3, rmdir as rmdir2, unlink as unlink4 } from "node:fs/promises";
|
|
150
150
|
import { hostname as hostname2 } from "node:os";
|
|
151
151
|
import { join as join3 } from "node:path";
|
|
152
152
|
|
|
153
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
153
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.519.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_3a77a7242330d89656a32c8be893f1d1/node_modules/@wirecat/cli-core/dist/files/native-lease-inspection.js
|
|
154
154
|
import { lstat as lstat2, readdir, realpath as realpath2, unlink as unlink2 } from "node:fs/promises";
|
|
155
155
|
import { join as join2 } from "node:path";
|
|
156
156
|
|
|
157
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
157
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.519.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_3a77a7242330d89656a32c8be893f1d1/node_modules/@wirecat/cli-core/dist/files/native-lease-owner.js
|
|
158
158
|
import { hostname } from "node:os";
|
|
159
159
|
var missingLeaseFile = /* @__PURE__ */ __name((error) => typeof error === "object" && error !== null && "code" in error && error.code === "ENOENT", "missingLeaseFile");
|
|
160
160
|
var readLeaseOwner = /* @__PURE__ */ __name(async (path, name, signal) => {
|
|
@@ -199,7 +199,7 @@ var leaseOwnerStatus = /* @__PURE__ */ __name((owner) => {
|
|
|
199
199
|
}
|
|
200
200
|
}, "leaseOwnerStatus");
|
|
201
201
|
|
|
202
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
202
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.519.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_3a77a7242330d89656a32c8be893f1d1/node_modules/@wirecat/cli-core/dist/files/native-lease-inspection.js
|
|
203
203
|
var leaseInspection = /* @__PURE__ */ __name((markerDirectory) => {
|
|
204
204
|
const inspect = /* @__PURE__ */ __name(async (destination, options = {}) => {
|
|
205
205
|
options.signal?.throwIfAborted();
|
|
@@ -258,7 +258,7 @@ var leaseInspection = /* @__PURE__ */ __name((markerDirectory) => {
|
|
|
258
258
|
return { inspect, recover };
|
|
259
259
|
}, "leaseInspection");
|
|
260
260
|
|
|
261
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
261
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.519.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_3a77a7242330d89656a32c8be893f1d1/node_modules/@wirecat/cli-core/dist/files/native-lease-release.js
|
|
262
262
|
import { rmdir, unlink as unlink3 } from "node:fs/promises";
|
|
263
263
|
var ownedNativeLease = /* @__PURE__ */ __name((path, name, owner, folder, identity) => {
|
|
264
264
|
let releasing;
|
|
@@ -283,7 +283,7 @@ var ownedNativeLease = /* @__PURE__ */ __name((path, name, owner, folder, identi
|
|
|
283
283
|
};
|
|
284
284
|
}, "ownedNativeLease");
|
|
285
285
|
|
|
286
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
286
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.519.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_3a77a7242330d89656a32c8be893f1d1/node_modules/@wirecat/cli-core/dist/files/native-writer-lease.js
|
|
287
287
|
var validName = /* @__PURE__ */ __name((value) => typeof value === "string" && value.length > 0 && value !== "." && value !== ".." && !/[\\/\0:]/.test(value), "validName");
|
|
288
288
|
var nativeWriterLeaseStore = /* @__PURE__ */ __name((layout) => {
|
|
289
289
|
const { markerDirectory, legacyMarker } = layout;
|
|
@@ -354,7 +354,7 @@ var nativeWriterLeaseStore = /* @__PURE__ */ __name((layout) => {
|
|
|
354
354
|
};
|
|
355
355
|
}, "nativeWriterLeaseStore");
|
|
356
356
|
|
|
357
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
357
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.519.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_3a77a7242330d89656a32c8be893f1d1/node_modules/@wirecat/cli-core/dist/files/lock.js
|
|
358
358
|
var acquireLock = /* @__PURE__ */ __name(async (path, { signal } = {}) => {
|
|
359
359
|
const folder = dirname2(path);
|
|
360
360
|
await mkdir2(folder, { recursive: true, mode: 448 });
|
|
@@ -20,7 +20,7 @@ import {
|
|
|
20
20
|
tool,
|
|
21
21
|
toolKey,
|
|
22
22
|
toolsFromCommands
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-MHNEMDH3.js";
|
|
24
24
|
import {
|
|
25
25
|
CHART_KINDS,
|
|
26
26
|
CHART_SIZE,
|
|
@@ -34,22 +34,23 @@ import {
|
|
|
34
34
|
registerPrompts,
|
|
35
35
|
stdinFieldOf,
|
|
36
36
|
syncsFirst
|
|
37
|
-
} from "./chunk-
|
|
37
|
+
} from "./chunk-H2JVXO5V.js";
|
|
38
38
|
import {
|
|
39
39
|
agentJson,
|
|
40
40
|
skillResource
|
|
41
|
-
} from "./chunk-
|
|
41
|
+
} from "./chunk-RVIMMCHF.js";
|
|
42
42
|
import {
|
|
43
43
|
instructions
|
|
44
|
-
} from "./chunk-
|
|
44
|
+
} from "./chunk-5LY3OS7U.js";
|
|
45
45
|
import {
|
|
46
46
|
answeredWire
|
|
47
|
-
} from "./chunk-
|
|
47
|
+
} from "./chunk-Y2HGQK7A.js";
|
|
48
48
|
import {
|
|
49
49
|
StdioServerTransport,
|
|
50
50
|
callerOf,
|
|
51
|
+
callingAgent,
|
|
51
52
|
serveStdio
|
|
52
|
-
} from "./chunk-
|
|
53
|
+
} from "./chunk-GX2M3AOO.js";
|
|
53
54
|
import {
|
|
54
55
|
McpServer,
|
|
55
56
|
ResourceTemplate
|
|
@@ -57,7 +58,7 @@ import {
|
|
|
57
58
|
import {
|
|
58
59
|
connectedFor,
|
|
59
60
|
guardFor
|
|
60
|
-
} from "./chunk-
|
|
61
|
+
} from "./chunk-TNQOKGJS.js";
|
|
61
62
|
import {
|
|
62
63
|
capability,
|
|
63
64
|
dateWindow,
|
|
@@ -66,10 +67,10 @@ import {
|
|
|
66
67
|
servicesFor,
|
|
67
68
|
storedDeps,
|
|
68
69
|
wholeList
|
|
69
|
-
} from "./chunk-
|
|
70
|
+
} from "./chunk-RZCFEASJ.js";
|
|
70
71
|
import {
|
|
71
72
|
findCommand
|
|
72
|
-
} from "./chunk-
|
|
73
|
+
} from "./chunk-MXUUQXMA.js";
|
|
73
74
|
import {
|
|
74
75
|
DEFAULT_OUTPUT_BYTES,
|
|
75
76
|
changesAuthorityAt,
|
|
@@ -84,28 +85,28 @@ import {
|
|
|
84
85
|
sealed,
|
|
85
86
|
snakeKeys,
|
|
86
87
|
typedCommand
|
|
87
|
-
} from "./chunk-
|
|
88
|
+
} from "./chunk-FUXSKWWJ.js";
|
|
88
89
|
import {
|
|
89
90
|
levelFor,
|
|
90
91
|
readKeysForCommand
|
|
91
|
-
} from "./chunk-
|
|
92
|
+
} from "./chunk-5SSFYIFF.js";
|
|
92
93
|
import {
|
|
93
94
|
isCliFailure,
|
|
94
95
|
withCaller
|
|
95
|
-
} from "./chunk-
|
|
96
|
+
} from "./chunk-RMYYKBFW.js";
|
|
96
97
|
import {
|
|
97
98
|
mcpHttpMarker
|
|
98
|
-
} from "./chunk-
|
|
99
|
+
} from "./chunk-4UOEUEZZ.js";
|
|
99
100
|
import {
|
|
100
101
|
openStore,
|
|
101
102
|
pdfPreviewLimits
|
|
102
|
-
} from "./chunk-
|
|
103
|
+
} from "./chunk-KXVZ373I.js";
|
|
103
104
|
import {
|
|
104
105
|
timezoneOf
|
|
105
|
-
} from "./chunk-
|
|
106
|
+
} from "./chunk-C2THROZU.js";
|
|
106
107
|
import {
|
|
107
108
|
warmEmbedders
|
|
108
|
-
} from "./chunk-
|
|
109
|
+
} from "./chunk-SRMJ6LLC.js";
|
|
109
110
|
import {
|
|
110
111
|
description,
|
|
111
112
|
integer,
|
|
@@ -130,10 +131,10 @@ import {
|
|
|
130
131
|
__name
|
|
131
132
|
} from "./chunk-ZVVMGPBJ.js";
|
|
132
133
|
|
|
133
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
134
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.519.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_3a77a7242330d89656a32c8be893f1d1/node_modules/@wirecat/cli-core/dist/mcp/server.js
|
|
134
135
|
import { randomUUID } from "node:crypto";
|
|
135
136
|
|
|
136
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
137
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.519.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_3a77a7242330d89656a32c8be893f1d1/node_modules/@wirecat/cli-core/dist/mcp/agent-log.js
|
|
137
138
|
var agentLog = /* @__PURE__ */ __name((open) => {
|
|
138
139
|
let held;
|
|
139
140
|
return {
|
|
@@ -152,7 +153,7 @@ var agentLog = /* @__PURE__ */ __name((open) => {
|
|
|
152
153
|
};
|
|
153
154
|
}, "agentLog");
|
|
154
155
|
|
|
155
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
156
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.519.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_3a77a7242330d89656a32c8be893f1d1/node_modules/@wirecat/cli-core/dist/mcp/resources.js
|
|
156
157
|
var LISTED = 100;
|
|
157
158
|
var registerResources = /* @__PURE__ */ __name((server, session, { command, name, limit, recorded, withStore, messenger, guard, assertRead }) => {
|
|
158
159
|
server.registerResource("chat", new ResourceTemplate(`${command}://chat/{id}`, {
|
|
@@ -190,7 +191,7 @@ var registerResources = /* @__PURE__ */ __name((server, session, { command, name
|
|
|
190
191
|
});
|
|
191
192
|
}, "registerResources");
|
|
192
193
|
|
|
193
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
194
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.519.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_3a77a7242330d89656a32c8be893f1d1/node_modules/@wirecat/cli-core/dist/mcp/session.js
|
|
194
195
|
var HARMLESS = /* @__PURE__ */ new Set(["validation_error", "not_found", "permission_error", "confirmation_required", "rate_limited"]);
|
|
195
196
|
var harmless = /* @__PURE__ */ __name((code) => HARMLESS.has(code), "harmless");
|
|
196
197
|
var MessengerSession = class {
|
|
@@ -265,7 +266,7 @@ var MessengerSession = class {
|
|
|
265
266
|
}
|
|
266
267
|
};
|
|
267
268
|
|
|
268
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
269
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.519.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_3a77a7242330d89656a32c8be893f1d1/node_modules/@wirecat/cli-core/dist/mcp/tools/attachments.js
|
|
269
270
|
var attachmentsTools = /* @__PURE__ */ __name((messenger) => {
|
|
270
271
|
const _command = messenger.app.command;
|
|
271
272
|
return {
|
|
@@ -319,7 +320,7 @@ var attachmentsTools = /* @__PURE__ */ __name((messenger) => {
|
|
|
319
320
|
};
|
|
320
321
|
}, "attachmentsTools");
|
|
321
322
|
|
|
322
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
323
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.519.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_3a77a7242330d89656a32c8be893f1d1/node_modules/@wirecat/cli-core/dist/mcp/tools/messages-photo.js
|
|
323
324
|
var PHOTO_LIMIT = 512 * 1024;
|
|
324
325
|
var IMAGE_TYPES = [
|
|
325
326
|
["image/jpeg", (b) => b[0] === 255 && b[1] === 216 && b[2] === 255],
|
|
@@ -373,7 +374,7 @@ var readUpTo = /* @__PURE__ */ __name(async (file, limit, saveIt) => {
|
|
|
373
374
|
return new Uint8Array(Buffer.concat(chunks));
|
|
374
375
|
}, "readUpTo");
|
|
375
376
|
|
|
376
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
377
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.519.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_3a77a7242330d89656a32c8be893f1d1/node_modules/@wirecat/cli-core/dist/mcp/tools/stats.js
|
|
377
378
|
var statsTools = /* @__PURE__ */ __name((messenger) => ({
|
|
378
379
|
stats_charts: tool({
|
|
379
380
|
title: "A chart from a chat's statistics",
|
|
@@ -410,14 +411,14 @@ var statsTools = /* @__PURE__ */ __name((messenger) => ({
|
|
|
410
411
|
})
|
|
411
412
|
}), "statsTools");
|
|
412
413
|
|
|
413
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
414
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.519.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_3a77a7242330d89656a32c8be893f1d1/node_modules/@wirecat/cli-core/dist/mcp/tools.js
|
|
414
415
|
var pictureTools = /* @__PURE__ */ __name((messenger) => Object.fromEntries(Object.entries({
|
|
415
416
|
...messagesPhotoTools(messenger),
|
|
416
417
|
...attachmentsTools(messenger),
|
|
417
418
|
...statsTools(messenger)
|
|
418
419
|
}).map(([name, definition]) => [name, { ...definition, input: strictObject(definition.input.entries) }])), "pictureTools");
|
|
419
420
|
|
|
420
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
421
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.519.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_3a77a7242330d89656a32c8be893f1d1/node_modules/@wirecat/cli-core/dist/mcp/server.js
|
|
421
422
|
var PER_RUN = /* @__PURE__ */ new Set([
|
|
422
423
|
"streams",
|
|
423
424
|
"stdin",
|
|
@@ -535,10 +536,10 @@ var createServer = /* @__PURE__ */ __name((command, context, messenger, sessionO
|
|
|
535
536
|
});
|
|
536
537
|
const skill = messenger.skill ? skillResource(app, messenger.skill) : void 0;
|
|
537
538
|
const log = agentLog(() => openStore({ env: context.env, command: app.command, version: app.version }));
|
|
538
|
-
const audit = /* @__PURE__ */ __name(async (call) => {
|
|
539
|
+
const audit = /* @__PURE__ */ __name(async (call, caller) => {
|
|
539
540
|
if (!recalledAccount(app, provider, settings.profile, context.env))
|
|
540
541
|
return;
|
|
541
|
-
await log.record({ actor: { bot: `${app.command}-mcp
|
|
542
|
+
await log.record({ actor: { bot: callingAgent(`${app.command}-mcp`, caller) }, ...call });
|
|
542
543
|
}, "audit");
|
|
543
544
|
const targets = judgedTargets(root);
|
|
544
545
|
const passed = Object.fromEntries(Object.entries(environment).filter(([key]) => !PER_RUN.has(key)));
|
|
@@ -610,7 +611,7 @@ var createServer = /* @__PURE__ */ __name((command, context, messenger, sessionO
|
|
|
610
611
|
...outcomeOf(result),
|
|
611
612
|
startedAt,
|
|
612
613
|
finishedAt: Date.now()
|
|
613
|
-
}).catch(() => void 0);
|
|
614
|
+
}, caller).catch(() => void 0);
|
|
614
615
|
return result;
|
|
615
616
|
}, "run")
|
|
616
617
|
}), "asCommand");
|
|
@@ -741,7 +742,7 @@ var serveOverStdio = /* @__PURE__ */ __name(async (command, context, messenger,
|
|
|
741
742
|
}, "serveOverStdio");
|
|
742
743
|
var serveOverHttpUntilStopped = /* @__PURE__ */ __name(async (command, context, messenger, options, http) => {
|
|
743
744
|
const { session, embedders, build, log } = createServer(command, context, messenger, options);
|
|
744
|
-
const { serveOverHttp } = await import("./serve-
|
|
745
|
+
const { serveOverHttp } = await import("./serve-S6K5HKWG.js");
|
|
745
746
|
const appName = messenger.app.command;
|
|
746
747
|
const appEnvPrefix = messenger.app.envPrefix;
|
|
747
748
|
const listening = await serveOverHttp(build, {
|
|
@@ -10,14 +10,14 @@ import {
|
|
|
10
10
|
__name
|
|
11
11
|
} from "./chunk-ZVVMGPBJ.js";
|
|
12
12
|
|
|
13
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
13
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.519.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_3a77a7242330d89656a32c8be893f1d1/node_modules/@wirecat/cli-core/dist/runs/run-context.js
|
|
14
14
|
import { AsyncLocalStorage } from "node:async_hooks";
|
|
15
15
|
import { createHash } from "node:crypto";
|
|
16
16
|
|
|
17
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.519.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_3a77a7242330d89656a32c8be893f1d1/node_modules/@wirecat/cli-core/dist/runs/error-detail.js
|
|
18
18
|
import { homedir } from "node:os";
|
|
19
19
|
|
|
20
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.519.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_3a77a7242330d89656a32c8be893f1d1/node_modules/@wirecat/cli-core/dist/errors/failures.js
|
|
21
21
|
var isCliFailure = /* @__PURE__ */ __name((value) => value instanceof Error && value.name === "CliError" && errorCodes.includes(value.code), "isCliFailure");
|
|
22
22
|
var isCommanderFailure = /* @__PURE__ */ __name((value) => {
|
|
23
23
|
const { code, exitCode } = value ?? {};
|
|
@@ -25,7 +25,7 @@ var isCommanderFailure = /* @__PURE__ */ __name((value) => {
|
|
|
25
25
|
}, "isCommanderFailure");
|
|
26
26
|
var failureKey = /* @__PURE__ */ __name((error) => isCliFailure(error) ? error.code : error instanceof Error ? error.name : "error", "failureKey");
|
|
27
27
|
|
|
28
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.519.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_3a77a7242330d89656a32c8be893f1d1/node_modules/@wirecat/cli-core/dist/runs/events.js
|
|
29
29
|
var providerErrorKey = /* @__PURE__ */ __name((value) => typeof value === "string" && /^[A-Za-z][A-Za-z0-9._-]{0,63}$/.test(value) ? value : void 0, "providerErrorKey");
|
|
30
30
|
var renderEvent = /* @__PURE__ */ __name((event) => {
|
|
31
31
|
if (event.event === "warning") {
|
|
@@ -73,7 +73,7 @@ var MARK = { request: "\u2192", response: "\u2190", cache: "\u2022", warning: "!
|
|
|
73
73
|
var age = /* @__PURE__ */ __name((ms) => ms < 1e3 ? `${ms}ms` : `${Math.round(ms / 1e3)}s`, "age");
|
|
74
74
|
var size = /* @__PURE__ */ __name((bytes) => bytes < 1e3 ? `${bytes} B` : `${(bytes / 1e3).toFixed(1)} kB`, "size");
|
|
75
75
|
|
|
76
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
76
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.519.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_3a77a7242330d89656a32c8be893f1d1/node_modules/@wirecat/cli-core/dist/runs/secrets.js
|
|
77
77
|
var SECRET_WORDS = /* @__PURE__ */ new Set([
|
|
78
78
|
"authorization",
|
|
79
79
|
"cookie",
|
|
@@ -154,7 +154,7 @@ var withoutSecrets = /* @__PURE__ */ __name((text, mark = "[redacted]") => text.
|
|
|
154
154
|
var RUN = /(?<![A-Za-z0-9_+/-])[A-Za-z0-9_+/-]{20,}/g;
|
|
155
155
|
var HEX = /(?<![A-Za-z0-9])(?=[0-9]*[a-f])[0-9a-f]{20,}(?![A-Za-z0-9])/g;
|
|
156
156
|
|
|
157
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
157
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.519.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_3a77a7242330d89656a32c8be893f1d1/node_modules/@wirecat/cli-core/dist/runs/error-detail.js
|
|
158
158
|
var MESSAGE_AT_MOST = 500;
|
|
159
159
|
var CAUSES_AT_MOST = 5;
|
|
160
160
|
var FRAMES_AT_MOST = 15;
|
|
@@ -255,14 +255,15 @@ var endpointTemplate = /* @__PURE__ */ __name((raw) => {
|
|
|
255
255
|
}, "endpointTemplate");
|
|
256
256
|
var INTERNATIONAL_PHONE = /\+\d[\d\s()-]{6,}\d/.source;
|
|
257
257
|
var BARE_PHONE = /(^|[^\w-])\d{11,15}\b/.source;
|
|
258
|
+
var MESSENGER_ID = /\b\d+(?:-\d+)?(?::\d+)?@(?:s\.whatsapp\.net|g\.us|c\.us|lid|broadcast|newsletter)\b/g;
|
|
258
259
|
var redactText = /* @__PURE__ */ __name((text) => {
|
|
259
260
|
const home = homedir();
|
|
260
261
|
let out = home && home !== "/" ? text.split(home).join("~") : text;
|
|
261
|
-
out = withoutSecrets(out.replace(/"[^"\n]*"|“[^”\n]*”|«[^»\n]*»/g, '"[redacted]"')).replace(/\b(bearer|basic|token|key|password|secret)(\s*[:=]\s*|\s+)[^\s'"]+/gi, "$1$2[redacted]").replace(/[\w.+-]+@[\w-]+\.[\w.-]+/g, "[email]").replace(new RegExp(INTERNATIONAL_PHONE, "g"), "[number]").replace(new RegExp(BARE_PHONE, "g"), "$1[number]").replace(/\bbot\d+:[\w-]+/g, "bot[token]").replace(/\b\d{6,}:[\w-]{20,}\b/g, "[token]").replace(/(\?|&)[^\s#]*/g, "$1[redacted]").replace(/\b[A-Za-z0-9_-]{40,}\b/g, "[redacted]");
|
|
262
|
+
out = withoutSecrets(out.replace(/"[^"\n]*"|“[^”\n]*”|«[^»\n]*»/g, '"[redacted]"')).replace(/\b(bearer|basic|token|key|password|secret)(\s*[:=]\s*|\s+)[^\s'"]+/gi, "$1$2[redacted]").replace(MESSENGER_ID, "[id]").replace(/[\w.+-]+@[\w-]+\.[\w.-]+/g, "[email]").replace(new RegExp(INTERNATIONAL_PHONE, "g"), "[number]").replace(new RegExp(BARE_PHONE, "g"), "$1[number]").replace(/\bbot\d+:[\w-]+/g, "bot[token]").replace(/\b\d{6,}:[\w-]{20,}\b/g, "[token]").replace(/(\?|&)[^\s#]*/g, "$1[redacted]").replace(/\b[A-Za-z0-9_-]{40,}\b/g, "[redacted]");
|
|
262
263
|
return out.length > MESSAGE_AT_MOST ? `${out.slice(0, MESSAGE_AT_MOST)}\u2026` : out;
|
|
263
264
|
}, "redactText");
|
|
264
265
|
|
|
265
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
266
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.519.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_3a77a7242330d89656a32c8be893f1d1/node_modules/@wirecat/cli-core/dist/runs/run-context.js
|
|
266
267
|
var REDACTED = "[redacted]";
|
|
267
268
|
var keepsSuccess = /* @__PURE__ */ __name(({ record, fromFlag, env, caller, persistent = false }) => {
|
|
268
269
|
if (!record)
|
|
@@ -2,7 +2,7 @@ import { createRequire as __bundleRequire } from "node:module";
|
|
|
2
2
|
const require = __bundleRequire(import.meta.url);
|
|
3
3
|
import {
|
|
4
4
|
QUERY_REASONS
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-C2THROZU.js";
|
|
6
6
|
import {
|
|
7
7
|
defineReasons
|
|
8
8
|
} from "./chunk-LQ37ALDJ.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.
|
|
13
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.519.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_3a77a7242330d89656a32c8be893f1d1/node_modules/@wirecat/cli-core/dist/errors/reasons.js
|
|
14
14
|
var validation = /* @__PURE__ */ __name((reason, message) => [reason, "validation_error", message], "validation");
|
|
15
15
|
var QUERY = [
|
|
16
16
|
["query.aborted", "the search was stopped before it finished"],
|
|
@@ -130,6 +130,8 @@ var OTHERS = [
|
|
|
130
130
|
validation("task.category-unknown", "the category is not in the task category list"),
|
|
131
131
|
validation("task.claimed", "someone else holds the task"),
|
|
132
132
|
validation("task.closed", "the task is already closed"),
|
|
133
|
+
["task.stale", "configuration_error", "the task changed since it was read; read it again"],
|
|
134
|
+
validation("task.column", "the task beside which it moves is in another column than the status asked for"),
|
|
133
135
|
validation("task.dependency-cycle", "the task would depend on itself"),
|
|
134
136
|
validation("task.duplicate-candidates", "open tasks may be the same job: attach to one, or add it as new"),
|
|
135
137
|
validation("task.certainty-required", "an agent closes a task with its certainty, 0 to 1"),
|