@wirecat/tg-cli 0.103.0 → 0.104.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/README.md +1 -0
- package/dist/bin/tg.js +2 -2
- package/dist/bundle/{adapter-QG3YFFOY.js → adapter-QTAHA2JC.js} +37 -37
- package/dist/bundle/{all-profiles-ECXH3TBF.js → all-profiles-7CXBVRFU.js} +5 -5
- package/dist/bundle/{anthropic-5MKO3QX7.js → anthropic-FWBQ7JHT.js} +3 -3
- package/dist/bundle/app-server-XF4GY2Y6.js +222 -0
- package/dist/bundle/{bot-api-4DQPIOMK.js → bot-api-XDMMWRYI.js} +38 -38
- package/dist/bundle/{bot-history-UN74XXLU.js → bot-history-TU2X7RNN.js} +10 -10
- package/dist/bundle/{bun-PS73VF2C.js → bun-6GSDPKNZ.js} +2 -2
- package/dist/bundle/{bun-sqlite-RAWGPH23.js → bun-sqlite-AO27E35V.js} +2 -2
- package/dist/bundle/{chunk-ZHXSRYJ5.js → chunk-3GGU65YR.js} +7 -5
- package/dist/bundle/{chunk-SSV37M5T.js → chunk-3XZQQGCB.js} +46 -46
- package/dist/bundle/{chunk-VZN5LD26.js → chunk-54RJDS3X.js} +2 -2
- package/dist/bundle/{chunk-SSALGKMJ.js → chunk-5K7E36ND.js} +2 -2
- package/dist/bundle/{chunk-RKQIEJFR.js → chunk-6K4QGBXU.js} +1 -1
- package/dist/bundle/{chunk-DLF3H6NP.js → chunk-6YUFPSSE.js} +4 -4
- package/dist/bundle/{chunk-TEO2KP52.js → chunk-7WHM3KNI.js} +1 -1
- package/dist/bundle/{chunk-57XGUIXA.js → chunk-ADMV4WGV.js} +4 -4
- package/dist/bundle/{chunk-RD7SSY7H.js → chunk-B7TTM75D.js} +1 -1
- package/dist/bundle/{chunk-BV4N333Y.js → chunk-BI2AXVHY.js} +2 -2
- package/dist/bundle/{chunk-F27OI4J2.js → chunk-BIWJK5YU.js} +1 -1
- package/dist/bundle/{chunk-Q2LBOPKO.js → chunk-BKVJNPA6.js} +25 -14
- package/dist/bundle/{chunk-3CP7RK5R.js → chunk-C5N7G6UH.js} +1 -1
- package/dist/bundle/{chunk-QF7VVIF4.js → chunk-DANCAYRP.js} +11 -6
- package/dist/bundle/{chunk-EMC57SOZ.js → chunk-FRZHF2X6.js} +9 -7
- package/dist/bundle/{chunk-NIVZHTN4.js → chunk-FUWSIEYY.js} +9 -9
- package/dist/bundle/{chunk-EQHQ2AX3.js → chunk-GE22MYA6.js} +57 -48
- package/dist/bundle/{chunk-KCVDWZWS.js → chunk-GZ5CR5QB.js} +7 -7
- package/dist/bundle/{chunk-OGVBRRWY.js → chunk-HOR7DS3P.js} +20 -20
- package/dist/bundle/{chunk-6N25NZOE.js → chunk-KRLCUBII.js} +5 -5
- package/dist/bundle/{chunk-RMC2S3F4.js → chunk-LJCGQMGN.js} +4 -4
- package/dist/bundle/{chunk-YI72UVTJ.js → chunk-LOFG3Q35.js} +1 -1
- package/dist/bundle/{chunk-Z2DPNTSU.js → chunk-LSQUNABH.js} +1 -1
- package/dist/bundle/{chunk-537O7OVE.js → chunk-MB3PCNRL.js} +2 -2
- package/dist/bundle/{chunk-LAYPLF7G.js → chunk-MCD2GANK.js} +5 -5
- package/dist/bundle/{chunk-5HPAPVCB.js → chunk-MR4LW4EC.js} +2140 -1907
- package/dist/bundle/{chunk-AUKAZRF6.js → chunk-N6VHHMSZ.js} +1 -1
- package/dist/bundle/{chunk-MHHDVR4G.js → chunk-P3WU6UYJ.js} +193 -193
- package/dist/bundle/{chunk-3QX6SOEO.js → chunk-PHQTSF44.js} +4 -4
- package/dist/bundle/{chunk-GO354DJ5.js → chunk-PWIE7VBL.js} +1 -1
- package/dist/bundle/{chunk-KQ5BUI5T.js → chunk-QVTCOBN5.js} +257 -243
- package/dist/bundle/{chunk-NKN54EDN.js → chunk-QY7MW7HK.js} +2 -2
- package/dist/bundle/{chunk-HCDZWFXO.js → chunk-RRWMYR2H.js} +10 -9
- package/dist/bundle/{chunk-AAMJZJYC.js → chunk-RTAV5XNT.js} +8 -8
- package/dist/bundle/{server-6XYURULQ.js → chunk-SZE6425L.js} +46 -62
- package/dist/bundle/{chunk-FSPDODVT.js → chunk-TJR37WKA.js} +10 -10
- package/dist/bundle/{chunk-COZ74WW4.js → chunk-U2AK4QXY.js} +20 -2
- package/dist/bundle/{chunk-DWQ4QT6X.js → chunk-UDXRDFHN.js} +92 -91
- package/dist/bundle/{chunk-CMQ34EZL.js → chunk-UT6G2X7T.js} +4 -3
- package/dist/bundle/{chunk-S5M4HFOZ.js → chunk-UTVANQN5.js} +1 -1
- package/dist/bundle/{chunk-H2UTBYFC.js → chunk-UVYY5EIS.js} +1 -1
- package/dist/bundle/{chunk-G5IMOOPB.js → chunk-Y3VNNLUT.js} +1 -1
- package/dist/bundle/{chunk-TPFLD4OM.js → chunk-Y5PJQPMQ.js} +1 -1
- package/dist/bundle/{chunk-WULARSC4.js → chunk-YBQ753RP.js} +20 -20
- package/dist/bundle/{chunk-3IXKDIPH.js → chunk-YD6ZQ6LM.js} +44 -42
- package/dist/bundle/{chunk-BYYSVINK.js → chunk-ZBH7Z6WX.js} +2 -2
- package/dist/bundle/{command-contract-ZGFJTLB2.js → command-contract-RICU4OWW.js} +12 -12
- package/dist/bundle/{echarts-UEQDIHVQ.js → echarts-2YP32GX5.js} +2 -2
- package/dist/bundle/{embed-5DPZKRW5.js → embed-QNWVBCL5.js} +3 -3
- package/dist/bundle/{embedder-NBQXDXAO.js → embedder-ENS7ARPP.js} +6 -6
- package/dist/bundle/{entry-EE6YRAP4.js → entry-MPYSQPZO.js} +3 -3
- package/dist/bundle/{first-run-OSEVVWNT.js → first-run-YLB7RNGP.js} +5 -5
- package/dist/bundle/{first-screen-753THOU6.js → first-screen-AYOE4JFC.js} +13 -13
- package/dist/bundle/{identity-LNH33PN3.js → identity-XQLO7NYW.js} +1 -1
- package/dist/bundle/{instructions-PYGVIT7I.js → instructions-5F4XG3B6.js} +3 -1
- package/dist/bundle/{node-3OBKCX6M.js → node-JOUDFPFN.js} +2 -2
- package/dist/bundle/{node-sqlite-DMMTDRFB.js → node-sqlite-ZY6ZFFXS.js} +2 -2
- package/dist/bundle/{oauth-FX5DDCRS.js → oauth-KOR3ZNTA.js} +4 -4
- package/dist/bundle/{open-G6QRQAAL.js → open-JACXAGY5.js} +1 -1
- package/dist/bundle/{process-47MMIFIJ.js → process-7W3X5VME.js} +1 -1
- package/dist/bundle/{program-LBHBWRK5.js → program-NSZWGHNJ.js} +40 -40
- package/dist/bundle/{prompt-CJ6Y4JYC.js → prompt-CRRG5UB6.js} +2 -2
- package/dist/bundle/{recognize-7BLTOI45.js → recognize-ASXEB45M.js} +3 -3
- package/dist/bundle/{remote-Q4A4JY6U.js → remote-CB3GAXGJ.js} +4 -4
- package/dist/bundle/{rerank-CQAR46L3.js → rerank-PDD5BPID.js} +4 -4
- package/dist/bundle/{serve-2UO2YMMG.js → serve-M4XFAYUM.js} +6 -6
- package/dist/bundle/{server-FMKC4RLL.js → server-IN673OYO.js} +26 -26
- package/dist/bundle/server-ISWPSKQ6.js +55 -0
- package/dist/bundle/{state-RNWN2RDY.js → state-626GOOVZ.js} +3 -3
- package/dist/bundle/{store-BBHTR477.js → store-6JM4HJU5.js} +7 -7
- package/dist/bundle/store-maintenance-command-DI2UX4V3.js +44 -0
- package/dist/bundle/tg.js +2 -2
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +2 -2
- package/skills/tg-cli/SKILL.md +1 -0
- package/dist/bundle/store-maintenance-command-GD6OLRXH.js +0 -44
|
@@ -7,20 +7,20 @@ import {
|
|
|
7
7
|
agentJson,
|
|
8
8
|
commandAvailability,
|
|
9
9
|
failureContext
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-RRWMYR2H.js";
|
|
11
11
|
import {
|
|
12
12
|
callerOf
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-5K7E36ND.js";
|
|
14
14
|
import {
|
|
15
15
|
lentConnection,
|
|
16
16
|
onlineDeps,
|
|
17
17
|
refuseLacking,
|
|
18
18
|
servicesFor,
|
|
19
19
|
storeModeDeps
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-P3WU6UYJ.js";
|
|
21
21
|
import {
|
|
22
22
|
ENTITIES
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-UDXRDFHN.js";
|
|
24
24
|
import {
|
|
25
25
|
DEFAULT_OUTPUT_BYTES,
|
|
26
26
|
LOCAL_WRITE,
|
|
@@ -29,6 +29,7 @@ import {
|
|
|
29
29
|
authorityAllowed,
|
|
30
30
|
botApiAllowed,
|
|
31
31
|
changesMessenger,
|
|
32
|
+
enclosingTraceId,
|
|
32
33
|
flatten,
|
|
33
34
|
inRun,
|
|
34
35
|
judgedAnswer,
|
|
@@ -40,17 +41,18 @@ import {
|
|
|
40
41
|
readKeysForCommand,
|
|
41
42
|
refuseStoreChange,
|
|
42
43
|
sealed,
|
|
43
|
-
startRecording
|
|
44
|
-
|
|
44
|
+
startRecording,
|
|
45
|
+
traceOf
|
|
46
|
+
} from "./chunk-GE22MYA6.js";
|
|
45
47
|
import {
|
|
46
48
|
currentCaller,
|
|
47
49
|
keepsSuccess,
|
|
48
50
|
runContextOf,
|
|
49
51
|
withCaller
|
|
50
|
-
} from "./chunk-
|
|
52
|
+
} from "./chunk-FRZHF2X6.js";
|
|
51
53
|
import {
|
|
52
54
|
MAX_BUFFERED_INPUT
|
|
53
|
-
} from "./chunk-
|
|
55
|
+
} from "./chunk-7WHM3KNI.js";
|
|
54
56
|
import {
|
|
55
57
|
captureStreams,
|
|
56
58
|
errorObjectOf,
|
|
@@ -99,7 +101,7 @@ import {
|
|
|
99
101
|
__name
|
|
100
102
|
} from "./chunk-ZVVMGPBJ.js";
|
|
101
103
|
|
|
102
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
104
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.473.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._b1c2181cd33bddb10eb51dd3b7fa80c8/node_modules/@wirecat/cli-core/dist/mcp/agent.js
|
|
103
105
|
import { Readable } from "node:stream";
|
|
104
106
|
|
|
105
107
|
// node_modules/.pnpm/@wirecat+cli-base@0.65.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
|
|
@@ -2747,7 +2749,7 @@ var VOCABULARY = defineVocabulary({
|
|
|
2747
2749
|
flags: [...HOW_FLAGS, ...WHAT_FLAGS, ...CALENDAR_FLAGS]
|
|
2748
2750
|
});
|
|
2749
2751
|
|
|
2750
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
2752
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.473.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._b1c2181cd33bddb10eb51dd3b7fa80c8/node_modules/@wirecat/cli-core/dist/mcp/agent.js
|
|
2751
2753
|
var TYPES = new Map(VOCABULARY.flags.map((flag) => [flag.name, flag.type]));
|
|
2752
2754
|
var snake = /* @__PURE__ */ __name((name) => name.replaceAll("|", "_or_").replace(/[^a-z0-9]+/gi, "_"), "snake");
|
|
2753
2755
|
var longOf = /* @__PURE__ */ __name((option) => option.flags.match(/--[a-z0-9][a-z0-9-]*/)?.[0], "longOf");
|
|
@@ -2916,7 +2918,16 @@ var runCommandForAgent = /* @__PURE__ */ __name(async (program, path, input, ctx
|
|
|
2916
2918
|
let result;
|
|
2917
2919
|
let failure;
|
|
2918
2920
|
const streams = captureStreams();
|
|
2919
|
-
const
|
|
2921
|
+
const command = `mcp ${path.join(" ")}`;
|
|
2922
|
+
const traceId = enclosingTraceId() ?? traceOf(ctx.env ?? {}).traceId;
|
|
2923
|
+
const scope = {
|
|
2924
|
+
runId: newRunId(/* @__PURE__ */ new Date(), command),
|
|
2925
|
+
command,
|
|
2926
|
+
startedAt: Date.now(),
|
|
2927
|
+
profile: ctx.profile,
|
|
2928
|
+
...traceId === void 0 ? {} : { traceId }
|
|
2929
|
+
};
|
|
2930
|
+
const code = await inRun(scope, () => program.run(argv, {
|
|
2920
2931
|
...ctx.environment,
|
|
2921
2932
|
streams,
|
|
2922
2933
|
tty: false,
|
|
@@ -2944,7 +2955,7 @@ var runCommandForAgent = /* @__PURE__ */ __name(async (program, path, input, ctx
|
|
|
2944
2955
|
connection: /* @__PURE__ */ __name(() => borrowed ??= lend().then((adapter) => lentConnection(adapter)), "connection")
|
|
2945
2956
|
}
|
|
2946
2957
|
} : {}
|
|
2947
|
-
});
|
|
2958
|
+
}));
|
|
2948
2959
|
if (failure)
|
|
2949
2960
|
return { error: failure };
|
|
2950
2961
|
if (answered2)
|
|
@@ -2959,7 +2970,7 @@ var runCommandForAgent = /* @__PURE__ */ __name(async (program, path, input, ctx
|
|
|
2959
2970
|
}
|
|
2960
2971
|
}, "runCommandForAgent");
|
|
2961
2972
|
|
|
2962
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
2973
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.473.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._b1c2181cd33bddb10eb51dd3b7fa80c8/node_modules/@wirecat/cli-core/dist/mcp/tool.js
|
|
2963
2974
|
var limit = optional(pipe(number(), integer(), minValue(1), maxValue(100), description("how many")));
|
|
2964
2975
|
var page = optional(pipe(number(), integer(), minValue(1), description("which page, from 1")));
|
|
2965
2976
|
var message = pipe(
|
|
@@ -3218,7 +3229,7 @@ var failed = /* @__PURE__ */ __name((error, errors, effects) => {
|
|
|
3218
3229
|
return mcpErrorResult(JSON.parse(agentJson(errorObjectOf(error, context))));
|
|
3219
3230
|
}, "failed");
|
|
3220
3231
|
|
|
3221
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
3232
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.473.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._b1c2181cd33bddb10eb51dd3b7fa80c8/node_modules/@wirecat/cli-core/dist/mcp/surface.js
|
|
3222
3233
|
import { randomUUID } from "node:crypto";
|
|
3223
3234
|
var MATCHES = 8;
|
|
3224
3235
|
var ANSWER = answerSchema();
|
|
@@ -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.473.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._b1c2181cd33bddb10eb51dd3b7fa80c8/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
|
commandPathOf,
|
|
8
8
|
findCommand,
|
|
9
9
|
outputOf
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-ADMV4WGV.js";
|
|
11
11
|
import {
|
|
12
12
|
Command,
|
|
13
13
|
Help,
|
|
@@ -18,7 +18,7 @@ import {
|
|
|
18
18
|
environmentOf,
|
|
19
19
|
metaOf,
|
|
20
20
|
takesProfile
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-GE22MYA6.js";
|
|
22
22
|
import {
|
|
23
23
|
CliError,
|
|
24
24
|
writes
|
|
@@ -27,7 +27,7 @@ import {
|
|
|
27
27
|
__name
|
|
28
28
|
} from "./chunk-ZVVMGPBJ.js";
|
|
29
29
|
|
|
30
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.473.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._b1c2181cd33bddb10eb51dd3b7fa80c8/node_modules/@wirecat/cli-core/dist/cli/help/sections.js
|
|
31
31
|
var SECTIONS = {
|
|
32
32
|
read: "Read",
|
|
33
33
|
write: "Write",
|
|
@@ -92,7 +92,7 @@ var CORE_SECTIONS = {
|
|
|
92
92
|
upgrade: "setup"
|
|
93
93
|
};
|
|
94
94
|
|
|
95
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
95
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.473.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._b1c2181cd33bddb10eb51dd3b7fa80c8/node_modules/@wirecat/cli-core/dist/cli/help/commands-text.js
|
|
96
96
|
var DESCRIPTION = 90;
|
|
97
97
|
var COLUMN = 52;
|
|
98
98
|
var short = /* @__PURE__ */ __name((text) => {
|
|
@@ -131,7 +131,7 @@ var commandsText = /* @__PURE__ */ __name((root, commands, scope) => {
|
|
|
131
131
|
`;
|
|
132
132
|
}, "commandsText");
|
|
133
133
|
|
|
134
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
134
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.473.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._b1c2181cd33bddb10eb51dd3b7fa80c8/node_modules/@wirecat/cli-core/dist/cli/help/command-help.js
|
|
135
135
|
var ARGUMENT_KINDS = {
|
|
136
136
|
chat: "chat",
|
|
137
137
|
chats: "chat",
|
|
@@ -321,7 +321,7 @@ var installCommandHelp = /* @__PURE__ */ __name((program, { profile = true } = {
|
|
|
321
321
|
command.addHelpText("after", () => commandHelpText(command));
|
|
322
322
|
}, "installCommandHelp");
|
|
323
323
|
|
|
324
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
324
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.473.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._b1c2181cd33bddb10eb51dd3b7fa80c8/node_modules/@wirecat/cli-core/dist/cli/help/first-screen.js
|
|
325
325
|
var WIRECAT_TOOLS = [
|
|
326
326
|
{
|
|
327
327
|
command: "tg",
|
|
@@ -353,6 +353,11 @@ var WIRECAT_TOOLS = [
|
|
|
353
353
|
package: "@wirecat/cli-memo",
|
|
354
354
|
shown: "memo context <person>",
|
|
355
355
|
does: "one person across messengers, mail, notes and meetings"
|
|
356
|
+
},
|
|
357
|
+
{
|
|
358
|
+
command: "mail",
|
|
359
|
+
package: "@wirecat/mail-cli",
|
|
360
|
+
does: "IMAP mail in the same local store: search your mailbox offline, next to your other WireCat data"
|
|
356
361
|
}
|
|
357
362
|
];
|
|
358
363
|
var WIDTH = 100;
|
|
@@ -8,14 +8,14 @@ import {
|
|
|
8
8
|
__name
|
|
9
9
|
} from "./chunk-ZVVMGPBJ.js";
|
|
10
10
|
|
|
11
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
11
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.473.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._b1c2181cd33bddb10eb51dd3b7fa80c8/node_modules/@wirecat/cli-core/dist/runs/run-context.js
|
|
12
12
|
import { AsyncLocalStorage } from "node:async_hooks";
|
|
13
13
|
import { createHash } from "node:crypto";
|
|
14
14
|
|
|
15
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
15
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.473.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._b1c2181cd33bddb10eb51dd3b7fa80c8/node_modules/@wirecat/cli-core/dist/runs/error-detail.js
|
|
16
16
|
import { homedir } from "node:os";
|
|
17
17
|
|
|
18
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.473.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._b1c2181cd33bddb10eb51dd3b7fa80c8/node_modules/@wirecat/cli-core/dist/errors/failures.js
|
|
19
19
|
var isCliFailure = /* @__PURE__ */ __name((value) => value instanceof Error && value.name === "CliError" && errorCodes.includes(value.code), "isCliFailure");
|
|
20
20
|
var isCommanderFailure = /* @__PURE__ */ __name((value) => {
|
|
21
21
|
const { code, exitCode } = value ?? {};
|
|
@@ -23,7 +23,7 @@ var isCommanderFailure = /* @__PURE__ */ __name((value) => {
|
|
|
23
23
|
}, "isCommanderFailure");
|
|
24
24
|
var failureKey = /* @__PURE__ */ __name((error) => isCliFailure(error) ? error.code : error instanceof Error ? error.name : "error", "failureKey");
|
|
25
25
|
|
|
26
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.473.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._b1c2181cd33bddb10eb51dd3b7fa80c8/node_modules/@wirecat/cli-core/dist/runs/events.js
|
|
27
27
|
var providerErrorKey = /* @__PURE__ */ __name((value) => typeof value === "string" && /^[A-Za-z][A-Za-z0-9._-]{0,63}$/.test(value) ? value : void 0, "providerErrorKey");
|
|
28
28
|
var renderEvent = /* @__PURE__ */ __name((event) => {
|
|
29
29
|
if (event.event === "warning") {
|
|
@@ -71,7 +71,7 @@ var MARK = { request: "\u2192", response: "\u2190", cache: "\u2022", warning: "!
|
|
|
71
71
|
var age = /* @__PURE__ */ __name((ms) => ms < 1e3 ? `${ms}ms` : `${Math.round(ms / 1e3)}s`, "age");
|
|
72
72
|
var size = /* @__PURE__ */ __name((bytes) => bytes < 1e3 ? `${bytes} B` : `${(bytes / 1e3).toFixed(1)} kB`, "size");
|
|
73
73
|
|
|
74
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
74
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.473.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._b1c2181cd33bddb10eb51dd3b7fa80c8/node_modules/@wirecat/cli-core/dist/runs/secrets.js
|
|
75
75
|
var SECRET_WORDS = /* @__PURE__ */ new Set([
|
|
76
76
|
"authorization",
|
|
77
77
|
"cookie",
|
|
@@ -152,7 +152,7 @@ var withoutSecrets = /* @__PURE__ */ __name((text, mark = "[redacted]") => text.
|
|
|
152
152
|
var RUN = /(?<![A-Za-z0-9_+/-])[A-Za-z0-9_+/-]{20,}/g;
|
|
153
153
|
var HEX = /(?<![A-Za-z0-9])(?=[0-9]*[a-f])[0-9a-f]{20,}(?![A-Za-z0-9])/g;
|
|
154
154
|
|
|
155
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
155
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.473.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._b1c2181cd33bddb10eb51dd3b7fa80c8/node_modules/@wirecat/cli-core/dist/runs/error-detail.js
|
|
156
156
|
var MESSAGE_AT_MOST = 500;
|
|
157
157
|
var CAUSES_AT_MOST = 5;
|
|
158
158
|
var FRAMES_AT_MOST = 15;
|
|
@@ -161,6 +161,7 @@ var errorDetailOf = /* @__PURE__ */ __name((error, response) => {
|
|
|
161
161
|
const thrown = error instanceof Error ? error : void 0;
|
|
162
162
|
const code = isCliFailure(error) ? error.code : codeOf(error);
|
|
163
163
|
const reason = typeof details.reason === "string" ? details.reason : void 0;
|
|
164
|
+
const causeCode = typeof details.cause_code === "string" && /^[A-Za-z0-9_.-]{1,40}$/.test(details.cause_code) ? details.cause_code : void 0;
|
|
164
165
|
const message = thrown ? redactText(thrown.message) : void 0;
|
|
165
166
|
const operation = stringOf(details.operation) ?? response?.operation;
|
|
166
167
|
const status = numberOf(details.status) ?? response?.status;
|
|
@@ -179,6 +180,7 @@ var errorDetailOf = /* @__PURE__ */ __name((error, response) => {
|
|
|
179
180
|
class: classOf(error),
|
|
180
181
|
...code === void 0 ? {} : { code },
|
|
181
182
|
...reason === void 0 ? {} : { reason },
|
|
183
|
+
...causeCode === void 0 ? {} : { cause_code: causeCode },
|
|
182
184
|
...message ? { message } : {},
|
|
183
185
|
...operation === void 0 ? {} : { operation },
|
|
184
186
|
...http ? { http } : {},
|
|
@@ -258,7 +260,7 @@ var redactText = /* @__PURE__ */ __name((text) => {
|
|
|
258
260
|
return out.length > MESSAGE_AT_MOST ? `${out.slice(0, MESSAGE_AT_MOST)}\u2026` : out;
|
|
259
261
|
}, "redactText");
|
|
260
262
|
|
|
261
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
263
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.473.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._b1c2181cd33bddb10eb51dd3b7fa80c8/node_modules/@wirecat/cli-core/dist/runs/run-context.js
|
|
262
264
|
var REDACTED = "[redacted]";
|
|
263
265
|
var keepsSuccess = /* @__PURE__ */ __name(({ record, fromFlag, env, caller, persistent = false }) => {
|
|
264
266
|
if (!record)
|
|
@@ -3,11 +3,11 @@ const require = __bundleRequire(import.meta.url);
|
|
|
3
3
|
import {
|
|
4
4
|
envName,
|
|
5
5
|
readOnlyLockOf
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-N6VHHMSZ.js";
|
|
7
7
|
import {
|
|
8
8
|
CAPABILITY_STATEMENTS,
|
|
9
9
|
storeCapable
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-KRLCUBII.js";
|
|
11
11
|
import {
|
|
12
12
|
catchCrashes
|
|
13
13
|
} from "./chunk-T4SDOYPY.js";
|
|
@@ -21,10 +21,10 @@ 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.473.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._b1c2181cd33bddb10eb51dd3b7fa80c8/node_modules/@wirecat/cli-core/dist/cli/entry.js
|
|
25
25
|
import { spawn as spawn2 } from "node:child_process";
|
|
26
26
|
|
|
27
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.473.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._b1c2181cd33bddb10eb51dd3b7fa80c8/node_modules/@wirecat/cli-core/dist/sqlite-runtime.js
|
|
28
28
|
import { spawn, spawnSync } from "node:child_process";
|
|
29
29
|
import { readFileSync } from "node:fs";
|
|
30
30
|
import { dirname } from "node:path";
|
|
@@ -112,7 +112,7 @@ var relay = /* @__PURE__ */ __name((child, host = process) => new Promise(() =>
|
|
|
112
112
|
});
|
|
113
113
|
}), "relay");
|
|
114
114
|
|
|
115
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
115
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.473.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._b1c2181cd33bddb10eb51dd3b7fa80c8/node_modules/@wirecat/cli-core/dist/cli/argv-log.js
|
|
116
116
|
import { appendFileSync } from "node:fs";
|
|
117
117
|
var logParsedArgv = /* @__PURE__ */ __name((file, action) => {
|
|
118
118
|
const words = [];
|
|
@@ -136,7 +136,7 @@ var logVersion = /* @__PURE__ */ __name((file) => {
|
|
|
136
136
|
`);
|
|
137
137
|
}, "logVersion");
|
|
138
138
|
|
|
139
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
139
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.473.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._b1c2181cd33bddb10eb51dd3b7fa80c8/node_modules/@wirecat/cli-core/dist/cli/entry.js
|
|
140
140
|
var processIo = /* @__PURE__ */ __name(() => ({
|
|
141
141
|
argv: process.argv,
|
|
142
142
|
env: process.env,
|
|
@@ -190,8 +190,8 @@ var startCli = /* @__PURE__ */ __name(async (entry) => {
|
|
|
190
190
|
if (command.optsWithGlobals().dryRun === true)
|
|
191
191
|
return;
|
|
192
192
|
const [{ setupAtStart }, { commandPathOf }] = await Promise.all([
|
|
193
|
-
import("./first-run-
|
|
194
|
-
import("./command-contract-
|
|
193
|
+
import("./first-run-YLB7RNGP.js"),
|
|
194
|
+
import("./command-contract-RICU4OWW.js")
|
|
195
195
|
]);
|
|
196
196
|
await setupAtStart({
|
|
197
197
|
command: entry.app.command,
|
|
@@ -206,7 +206,7 @@ var startCli = /* @__PURE__ */ __name(async (entry) => {
|
|
|
206
206
|
ask: /* @__PURE__ */ __name(async (question, command) => {
|
|
207
207
|
if (headless(command) || io.stdin.isTTY !== true)
|
|
208
208
|
return false;
|
|
209
|
-
const { readSecret } = await import("./prompt-
|
|
209
|
+
const { readSecret } = await import("./prompt-CRRG5UB6.js");
|
|
210
210
|
const answer = await readSecret(`${question} [y/N] `, {
|
|
211
211
|
input: io.stdin,
|
|
212
212
|
output: io.stderr,
|