@wirecat/drive-cli 0.56.0 → 0.58.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/dist/bin/drive.js +2 -2
- package/dist/bin/drive.js.map +1 -1
- package/dist/bundle/{all-profiles-7LSZ3CC3.js → all-profiles-ANDWOJDL.js} +10 -6
- package/dist/bundle/{anthropic-3QRM4QXB.js → anthropic-EZPZUWGS.js} +10 -6
- package/dist/bundle/{app-server-WWNMUHID.js → app-server-67WL423B.js} +57 -51
- package/dist/bundle/{bun-sqlite-GSLSN3OT.js → bun-sqlite-A5ZKTIYC.js} +7 -3
- package/dist/bundle/{chunk-L4BBK7UX.js → chunk-2TASMYGM.js} +4 -2
- package/dist/bundle/{chunk-VTJF2L5E.js → chunk-34XHR5FL.js} +5 -5
- package/dist/bundle/{chunk-JIGMCW4C.js → chunk-3GXNODTB.js} +3 -3
- package/dist/bundle/chunk-3RG27IWA.js +201 -0
- package/dist/bundle/{chunk-KHNDZNQA.js → chunk-4EEOJ54H.js} +40 -36
- package/dist/bundle/{chunk-Q3TMNETS.js → chunk-4GZLX2ME.js} +27 -21
- package/dist/bundle/{chunk-B3TPS7BW.js → chunk-4ICWGMHN.js} +6 -4
- package/dist/bundle/{chunk-4F2VRJZE.js → chunk-4UU4ONKY.js} +31 -23
- package/dist/bundle/{chunk-IJ2S53WJ.js → chunk-5NPFHWLP.js} +7 -7
- package/dist/bundle/{chunk-566W4Q6L.js → chunk-6SARLV3Z.js} +1 -1
- package/dist/bundle/{chunk-AKPFH3KC.js → chunk-6THTUYPT.js} +1 -1
- package/dist/bundle/{chunk-GKHUHRSL.js → chunk-7AL57FCK.js} +1 -1
- package/dist/bundle/{chunk-SRNXTXJN.js → chunk-7VFD3UJQ.js} +1 -1
- package/dist/bundle/{chunk-CGCQNYB3.js → chunk-7VUHY5LP.js} +1 -1
- package/dist/bundle/{chunk-TZHCS5MG.js → chunk-7YUZAEBG.js} +1 -1
- package/dist/bundle/{chunk-JUKVJ7M2.js → chunk-A4DHPOFQ.js} +7 -5
- package/dist/bundle/chunk-A7FMNTCK.js +166 -0
- package/dist/bundle/{chunk-2QLLKDE5.js → chunk-AFZ33AC7.js} +47 -43
- package/dist/bundle/{chunk-XGNADVIA.js → chunk-ALTG7BZQ.js} +14 -215
- package/dist/bundle/chunk-ASPIEEXN.js +34 -0
- package/dist/bundle/{chunk-WJOKTIOJ.js → chunk-BAEIAQWH.js} +1 -1
- package/dist/bundle/{chunk-W6FYYQ2J.js → chunk-BKM2CGG2.js} +2 -2
- package/dist/bundle/{chunk-G34Y5RAC.js → chunk-BLJVCJZU.js} +5 -5
- package/dist/bundle/{chunk-7SNS443B.js → chunk-D72FL3L3.js} +1 -1
- package/dist/bundle/{chunk-OYNSFQ7K.js → chunk-D72URWJE.js} +1 -39
- package/dist/bundle/{chunk-B64EY2SC.js → chunk-ED5JNYN5.js} +27 -27
- package/dist/bundle/{chunk-64E6QXXQ.js → chunk-ESF2B22R.js} +7 -7
- package/dist/bundle/{chunk-5KNIVHP6.js → chunk-FD7A6745.js} +6 -19
- package/dist/bundle/{chunk-ADLS6FVG.js → chunk-FXBHOCJK.js} +1 -1
- package/dist/bundle/{chunk-TKVSJV5P.js → chunk-GDRO4YMH.js} +5 -3
- package/dist/bundle/{chunk-4MJA4MLV.js → chunk-I4VUHZSD.js} +5 -5
- package/dist/bundle/{chunk-NL2KXCFT.js → chunk-IBJOO5FG.js} +18 -16
- package/dist/bundle/{chunk-J2HGHSLX.js → chunk-IH4UCM5K.js} +3 -3
- package/dist/bundle/chunk-ITD7WI23.js +45 -0
- package/dist/bundle/{chunk-EN7OZ5JH.js → chunk-IXXQZCNK.js} +13 -11
- package/dist/bundle/{chunk-R5GJZPRF.js → chunk-J36Z6BDZ.js} +6 -4
- package/dist/bundle/{chunk-6CFSDU56.js → chunk-JEMKSWVI.js} +15 -13
- package/dist/bundle/chunk-JZ67M3HR.js +46 -0
- package/dist/bundle/{chunk-WJPVGXKA.js → chunk-KCBHOYNZ.js} +3 -3
- package/dist/bundle/{chunk-QAT6UXZZ.js → chunk-MBNKNWOG.js} +43 -39
- package/dist/bundle/{chunk-AHBUTDS7.js → chunk-NKL5XXOM.js} +1 -1
- package/dist/bundle/chunk-NYINLKWT.js +23 -0
- package/dist/bundle/{chunk-GIQFBXQN.js → chunk-O3K46QRL.js} +5 -120
- package/dist/bundle/{chunk-DJ75AG3K.js → chunk-OG5ERX4S.js} +2 -2
- package/dist/bundle/{chunk-RAEKC6TV.js → chunk-OUQVZTF5.js} +7 -5
- package/dist/bundle/{chunk-W5FOPSJZ.js → chunk-OZEJA67C.js} +6 -4
- package/dist/bundle/{chunk-4UQLL6RJ.js → chunk-P5MCZ635.js} +2 -2
- package/dist/bundle/{chunk-YZ6SYLDC.js → chunk-PYPLD7JO.js} +1 -1
- package/dist/bundle/{chunk-6ZA4NR5H.js → chunk-QVIJMV22.js} +2 -2
- package/dist/bundle/chunk-RRHC5SBB.js +106 -0
- package/dist/bundle/{chunk-WBYCUBYM.js → chunk-SPVPKHBQ.js} +25 -23
- package/dist/bundle/{chunk-XJVK7ETL.js → chunk-SWFA36F3.js} +5 -3
- package/dist/bundle/{chunk-HNUSPNUQ.js → chunk-TCJRJ3TE.js} +1 -1
- package/dist/bundle/{chunk-TR5656OS.js → chunk-TIXIB32T.js} +16 -12
- package/dist/bundle/{chunk-KM4Y55ZE.js → chunk-TMW526H3.js} +4 -4
- package/dist/bundle/{chunk-WAVJWGUC.js → chunk-TNX77VPM.js} +35 -33
- package/dist/bundle/{chunk-EE7R457T.js → chunk-UBZ2LH7N.js} +229 -221
- package/dist/bundle/{chunk-2ULJW5BA.js → chunk-UMJLXAJI.js} +1 -1
- package/dist/bundle/{chunk-ELIYJXIY.js → chunk-UTDL7MKT.js} +1 -1
- package/dist/bundle/{chunk-ISK4K7UE.js → chunk-VXI67T7U.js} +1 -1
- package/dist/bundle/{chunk-5E67RIXD.js → chunk-W6KMNO3C.js} +9 -7
- package/dist/bundle/{chunk-RB674T6L.js → chunk-WICYDOVL.js} +15 -11
- package/dist/bundle/{chunk-UKMFPBAO.js → chunk-X4F3M6L6.js} +3 -3
- package/dist/bundle/{chunk-373WJIHE.js → chunk-X5XWUQNU.js} +1 -1
- package/dist/bundle/{chunk-CD736BG3.js → chunk-XQMMB6ST.js} +1 -1
- package/dist/bundle/{chunk-3BXSLNWW.js → chunk-Y6M2G7JK.js} +12 -10
- package/dist/bundle/{chunk-OZJMZSFB.js → chunk-YHRJUZ3O.js} +2 -2
- package/dist/bundle/{chunk-JLKNUFL2.js → chunk-Z5GDNCTJ.js} +1 -1
- package/dist/bundle/command-contract-ZCXFT764.js +39 -0
- package/dist/bundle/{decode-5MHMPYKE.js → decode-2R6DTGRX.js} +9 -5
- package/dist/bundle/dispatch-DEXAEMIN.js +412 -0
- package/dist/bundle/drive.js +40 -22
- package/dist/bundle/{embed-TF66ODAR.js → embed-RJJWOLKN.js} +9 -5
- package/dist/bundle/{embedder-EDWOIAC2.js → embedder-DWYS5JYJ.js} +11 -7
- package/dist/bundle/entry-E6H7IUPV.js +21 -0
- package/dist/bundle/failure-GBZ4L5QO.js +26 -0
- package/dist/bundle/first-run-DI2JIG44.js +30 -0
- package/dist/bundle/first-screen-X5N4TCKD.js +37 -0
- package/dist/bundle/{google-A4F2WFO4.js → google-L776ETP4.js} +13 -9
- package/dist/bundle/{google-api-ZXGQOJUI.js → google-api-AI5ZJJ2M.js} +54 -48
- package/dist/bundle/grants-HKGYAWL6.js +104 -0
- package/dist/bundle/{identity-6DGQA6DX.js → identity-MDLWK2TX.js} +5 -3
- package/dist/bundle/{login-OUOGSTPH.js → login-6HHQLRHY.js} +60 -54
- package/dist/bundle/{mcp-VVMPUDSL.js → mcp-ZZUYI44D.js} +4 -2
- package/dist/bundle/{node-P4E63KXA.js → node-KM3CUABH.js} +9 -9
- package/dist/bundle/{node-sqlite-AFQTE4XZ.js → node-sqlite-AVNHGMVL.js} +7 -3
- package/dist/bundle/{oauth-46XBJBML.js → oauth-UVU52X57.js} +9 -5
- package/dist/bundle/{open-WJCRBIP7.js → open-BXPLXJC2.js} +7 -3
- package/dist/bundle/{openai-3TIBDWZA.js → openai-CRO5GDBY.js} +14 -10
- package/dist/bundle/{program-7FRXMZNK.js → program-4DWVWSGQ.js} +135 -127
- package/dist/bundle/prompt-AFWVGRDG.js +17 -0
- package/dist/bundle/{reasons-VHCVYH54.js → reasons-IHPNUP5W.js} +4 -2
- package/dist/bundle/{recognize-4EAKIMON.js → recognize-NAISVA56.js} +7 -3
- package/dist/bundle/{remote-HX3JP4EH.js → remote-KCUHG5HV.js} +10 -6
- package/dist/bundle/{rerank-BW3A4PUU.js → rerank-Q3POCDSK.js} +9 -5
- package/dist/bundle/{serve-YYOOLIBS.js → serve-5CUOYLSG.js} +10 -6
- package/dist/bundle/server-FTLPSLRU.js +69 -0
- package/dist/bundle/{server-G6XTEEFI.js → server-FXW3GARV.js} +42 -36
- package/dist/bundle/{services-OAPILZOW.js → services-PEYBXZ3R.js} +30 -24
- package/dist/bundle/{sqlite-runtime-GTXDK4PE.js → sqlite-runtime-YMPWN5PM.js} +8 -4
- package/dist/bundle/start-PFWEF44R.js +138 -0
- package/dist/bundle/{state-XG335LGZ.js → state-5TQ7IOJH.js} +8 -4
- package/dist/bundle/{store-N53SJOPS.js → store-E2VWY4O6.js} +18 -14
- package/dist/bundle/{store-7KOXJNQP.js → store-P4OYYFW5.js} +15 -11
- package/dist/bundle/store-maintenance-command-MWVERNK7.js +58 -0
- package/dist/bundle/tokens-OVG4CJO4.js +102 -0
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +1 -1
- package/dist/config.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +3 -2
- package/dist/bundle/command-contract-XIACCAZL.js +0 -35
- package/dist/bundle/entry-CWYCQ53A.js +0 -17
- package/dist/bundle/first-run-YIH7EHJI.js +0 -24
- package/dist/bundle/first-screen-THH3XD5Y.js +0 -33
- package/dist/bundle/grants-B3HZRRAQ.js +0 -98
- package/dist/bundle/prompt-FFGBIT4A.js +0 -13
- package/dist/bundle/server-YKYEUIJT.js +0 -63
- package/dist/bundle/store-maintenance-command-W3TI52X2.js +0 -52
- package/dist/bundle/tokens-CG3A5KS4.js +0 -96
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
import { createRequire as __bundleRequire } from "node:module";
|
|
2
|
+
const require = __bundleRequire(import.meta.url);
|
|
3
|
+
import {
|
|
4
|
+
singleLine
|
|
5
|
+
} from "./chunk-ASPIEEXN.js";
|
|
6
|
+
import {
|
|
7
|
+
__name
|
|
8
|
+
} from "./chunk-ZVVMGPBJ.js";
|
|
9
|
+
|
|
10
|
+
// node_modules/.pnpm/@wirecat+cli-base@0.73.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/wcat/describe.js
|
|
11
|
+
var DESCRIBE_FORMAT = 1;
|
|
12
|
+
var describeAnswer = /* @__PURE__ */ __name((tool) => ({
|
|
13
|
+
wcat_describe: DESCRIBE_FORMAT,
|
|
14
|
+
name: tool.command,
|
|
15
|
+
version: tool.version,
|
|
16
|
+
description: tool.description,
|
|
17
|
+
...tool.docs ? { docs_url: tool.docs } : {}
|
|
18
|
+
}), "describeAnswer");
|
|
19
|
+
var MAX_TEXT = 200;
|
|
20
|
+
var clean = /* @__PURE__ */ __name((value) => typeof value === "string" && value.trim() !== "" ? singleLine(value.trim()).slice(0, MAX_TEXT) : void 0, "clean");
|
|
21
|
+
var parseDescribe = /* @__PURE__ */ __name((text) => {
|
|
22
|
+
let answer;
|
|
23
|
+
try {
|
|
24
|
+
answer = JSON.parse(text);
|
|
25
|
+
} catch {
|
|
26
|
+
return void 0;
|
|
27
|
+
}
|
|
28
|
+
if (typeof answer !== "object" || answer === null || !("wcat_describe" in answer))
|
|
29
|
+
return void 0;
|
|
30
|
+
const { version, description, docs_url: docs } = answer;
|
|
31
|
+
const url = clean(docs);
|
|
32
|
+
return {
|
|
33
|
+
version: clean(version) ?? "",
|
|
34
|
+
description: clean(description) ?? "",
|
|
35
|
+
...url && /^https?:\/\//.test(url) ? { docs: url } : {}
|
|
36
|
+
};
|
|
37
|
+
}, "parseDescribe");
|
|
38
|
+
|
|
39
|
+
// node_modules/.pnpm/@wirecat+cli-base@0.73.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/wcat/names.js
|
|
40
|
+
var FIRST_PARTY_TOOLS = [
|
|
41
|
+
{ name: "tg", package: "@wirecat/tg-cli" },
|
|
42
|
+
{ name: "max", package: "@wirecat/max-cli" },
|
|
43
|
+
{ name: "wa", package: "@wirecat/whatsapp-cli" },
|
|
44
|
+
{ name: "zm", package: "@wirecat/zoom-cli" },
|
|
45
|
+
{ name: "drive", package: "@wirecat/drive-cli" },
|
|
46
|
+
{ name: "memo", package: "@wirecat/cli-memo" },
|
|
47
|
+
{ name: "mail", package: "@wirecat/mail-cli" },
|
|
48
|
+
// memo reads email today; the name is held for a tool of its own.
|
|
49
|
+
{ name: "email" }
|
|
50
|
+
];
|
|
51
|
+
var BUILT_IN_COMMANDS = ["help", "version", "shortcuts", "doctor", "update", "upgrade", "app"];
|
|
52
|
+
var RESERVED_NAMES = [
|
|
53
|
+
...FIRST_PARTY_TOOLS.map((tool) => tool.name),
|
|
54
|
+
...BUILT_IN_COMMANDS,
|
|
55
|
+
"wcat"
|
|
56
|
+
];
|
|
57
|
+
var TOOL_NAME = /^[a-z][a-z0-9-]{0,39}$/;
|
|
58
|
+
var PROGRAM_PREFIX = "wcat-";
|
|
59
|
+
var DESCRIBE_FLAG = "--wcat-describe";
|
|
60
|
+
var DISPATCH_FLAG = "--wcat-dispatch";
|
|
61
|
+
|
|
62
|
+
// node_modules/.pnpm/@wirecat+cli-base@0.73.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/wcat/shim.js
|
|
63
|
+
import { lstatSync, readFileSync, renameSync, rmSync, statSync, writeFileSync } from "node:fs";
|
|
64
|
+
import { join } from "node:path";
|
|
65
|
+
var SHIM_FORMAT = 1;
|
|
66
|
+
var MARK = /^(?:#|REM) wirecat-shim (\d+) (launcher|shortcut) (\S+)\r?$/m;
|
|
67
|
+
var NOTE = {
|
|
68
|
+
launcher: "Written by @wirecat/cli-base. Any WireCat tool rewrites it when it breaks; it is safe to delete.",
|
|
69
|
+
shortcut: "Made by `wcat shortcuts add`; `wcat shortcuts remove` takes it out."
|
|
70
|
+
};
|
|
71
|
+
var shellQuote = /* @__PURE__ */ __name((text) => `'${text.replaceAll("'", `'\\''`)}'`, "shellQuote");
|
|
72
|
+
var shimFiles = /* @__PURE__ */ __name((kind, { dir, name, target, platform }) => {
|
|
73
|
+
const mark = `wirecat-shim ${SHIM_FORMAT} ${kind} ${target}`;
|
|
74
|
+
const extra = kind === "launcher" ? ` ${DISPATCH_FLAG}` : "";
|
|
75
|
+
if (platform !== "win32")
|
|
76
|
+
return [
|
|
77
|
+
{
|
|
78
|
+
path: join(dir, name),
|
|
79
|
+
text: `#!/bin/sh
|
|
80
|
+
# ${mark}
|
|
81
|
+
# ${NOTE[kind]}
|
|
82
|
+
exec ${shellQuote(join(dir, target))}${extra} "$@"
|
|
83
|
+
`
|
|
84
|
+
}
|
|
85
|
+
];
|
|
86
|
+
return [
|
|
87
|
+
{
|
|
88
|
+
path: join(dir, `${name}.cmd`),
|
|
89
|
+
text: ["@ECHO off", `REM ${mark}`, `REM ${NOTE[kind]}`, `"%~dp0${target}"${extra} %*`, ""].join("\r\n")
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
path: join(dir, `${name}.ps1`),
|
|
93
|
+
text: [
|
|
94
|
+
`# ${mark}`,
|
|
95
|
+
`# ${NOTE[kind]}`,
|
|
96
|
+
// PowerShell hands a .cmd its arguments unquoted, so `a&b` would run `b`; npm and pnpm write a .ps1 beside
|
|
97
|
+
// their .cmd, and it is started instead whenever it is there.
|
|
98
|
+
`$stem = Join-Path $PSScriptRoot "${target.replace(/\.(cmd|exe|bat)$/i, "")}"`,
|
|
99
|
+
`$target = if (Test-Path -LiteralPath "$stem.ps1") { "$stem.ps1" } else { Join-Path $PSScriptRoot "${target}" }`,
|
|
100
|
+
"if ($MyInvocation.ExpectingInput) {",
|
|
101
|
+
` $input | & $target${extra} @args`,
|
|
102
|
+
"} else {",
|
|
103
|
+
` & $target${extra} @args`,
|
|
104
|
+
"}",
|
|
105
|
+
"exit $LASTEXITCODE",
|
|
106
|
+
""
|
|
107
|
+
].join("\r\n")
|
|
108
|
+
}
|
|
109
|
+
];
|
|
110
|
+
}, "shimFiles");
|
|
111
|
+
var parseShim = /* @__PURE__ */ __name((text) => {
|
|
112
|
+
const found = MARK.exec(text.split("\n", 3).join("\n"));
|
|
113
|
+
if (!found)
|
|
114
|
+
return void 0;
|
|
115
|
+
return { format: Number(found[1]), kind: found[2], target: found[3] };
|
|
116
|
+
}, "parseShim");
|
|
117
|
+
var MAX_SHIM_BYTES = 4096;
|
|
118
|
+
var fileState = /* @__PURE__ */ __name((path) => {
|
|
119
|
+
let stat;
|
|
120
|
+
try {
|
|
121
|
+
stat = lstatSync(path);
|
|
122
|
+
} catch (error) {
|
|
123
|
+
return error.code === "ENOENT" ? { state: "missing" } : { state: "foreign" };
|
|
124
|
+
}
|
|
125
|
+
if (!stat.isFile() || stat.size > MAX_SHIM_BYTES)
|
|
126
|
+
return { state: "foreign" };
|
|
127
|
+
try {
|
|
128
|
+
const text = readFileSync(path, "utf8");
|
|
129
|
+
const mark = parseShim(text);
|
|
130
|
+
return mark ? { state: "ours", mark, text } : { state: "foreign" };
|
|
131
|
+
} catch {
|
|
132
|
+
return { state: "foreign" };
|
|
133
|
+
}
|
|
134
|
+
}, "fileState");
|
|
135
|
+
var exists = /* @__PURE__ */ __name((path) => {
|
|
136
|
+
try {
|
|
137
|
+
return statSync(path).isFile();
|
|
138
|
+
} catch {
|
|
139
|
+
return false;
|
|
140
|
+
}
|
|
141
|
+
}, "exists");
|
|
142
|
+
var writeShim = /* @__PURE__ */ __name(({ path, text }) => {
|
|
143
|
+
const temporary = `${path}.${process.pid}.${Math.random().toString(36).slice(2)}.tmp`;
|
|
144
|
+
try {
|
|
145
|
+
writeFileSync(temporary, text, { mode: 493 });
|
|
146
|
+
renameSync(temporary, path);
|
|
147
|
+
} finally {
|
|
148
|
+
rmSync(temporary, { force: true });
|
|
149
|
+
}
|
|
150
|
+
}, "writeShim");
|
|
151
|
+
|
|
152
|
+
export {
|
|
153
|
+
describeAnswer,
|
|
154
|
+
parseDescribe,
|
|
155
|
+
FIRST_PARTY_TOOLS,
|
|
156
|
+
BUILT_IN_COMMANDS,
|
|
157
|
+
TOOL_NAME,
|
|
158
|
+
PROGRAM_PREFIX,
|
|
159
|
+
DESCRIBE_FLAG,
|
|
160
|
+
DISPATCH_FLAG,
|
|
161
|
+
SHIM_FORMAT,
|
|
162
|
+
shimFiles,
|
|
163
|
+
fileState,
|
|
164
|
+
exists,
|
|
165
|
+
writeShim
|
|
166
|
+
};
|
|
@@ -3,7 +3,7 @@ const require = __bundleRequire(import.meta.url);
|
|
|
3
3
|
import {
|
|
4
4
|
answerOf,
|
|
5
5
|
messengerContext
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-ED5JNYN5.js";
|
|
7
7
|
import {
|
|
8
8
|
chatEventAnswer,
|
|
9
9
|
memberAnswer,
|
|
@@ -12,24 +12,7 @@ import {
|
|
|
12
12
|
serveRelay,
|
|
13
13
|
typedQuery,
|
|
14
14
|
withQuery
|
|
15
|
-
} from "./chunk-
|
|
16
|
-
import {
|
|
17
|
-
holdLock,
|
|
18
|
-
lockPath,
|
|
19
|
-
releaseLock,
|
|
20
|
-
servingProfiles,
|
|
21
|
-
takeLock
|
|
22
|
-
} from "./chunk-SRNXTXJN.js";
|
|
23
|
-
import {
|
|
24
|
-
RULES_VERSION,
|
|
25
|
-
applyTaskRulesOnArrival,
|
|
26
|
-
newSendId,
|
|
27
|
-
onlineDeps,
|
|
28
|
-
openRequestTask,
|
|
29
|
-
senderIsMe,
|
|
30
|
-
servicesFor,
|
|
31
|
-
syncsOneChat
|
|
32
|
-
} from "./chunk-KHNDZNQA.js";
|
|
15
|
+
} from "./chunk-IXXQZCNK.js";
|
|
33
16
|
import {
|
|
34
17
|
stringWidth,
|
|
35
18
|
wrapAnsi
|
|
@@ -57,33 +40,47 @@ import {
|
|
|
57
40
|
snakeKeys,
|
|
58
41
|
storeTable,
|
|
59
42
|
withoutProviderRefs
|
|
60
|
-
} from "./chunk-
|
|
43
|
+
} from "./chunk-4UU4ONKY.js";
|
|
44
|
+
import {
|
|
45
|
+
envName
|
|
46
|
+
} from "./chunk-Z5GDNCTJ.js";
|
|
47
|
+
import {
|
|
48
|
+
holdLock,
|
|
49
|
+
lockPath,
|
|
50
|
+
releaseLock,
|
|
51
|
+
servingProfiles,
|
|
52
|
+
takeLock
|
|
53
|
+
} from "./chunk-7VFD3UJQ.js";
|
|
61
54
|
import {
|
|
62
55
|
holdersOf
|
|
63
56
|
} from "./chunk-U2RSVKR5.js";
|
|
57
|
+
import {
|
|
58
|
+
checkedOptions,
|
|
59
|
+
range
|
|
60
|
+
} from "./chunk-2TASMYGM.js";
|
|
61
|
+
import {
|
|
62
|
+
RULES_VERSION,
|
|
63
|
+
applyTaskRulesOnArrival,
|
|
64
|
+
newSendId,
|
|
65
|
+
onlineDeps,
|
|
66
|
+
openRequestTask,
|
|
67
|
+
senderIsMe,
|
|
68
|
+
servicesFor,
|
|
69
|
+
syncsOneChat
|
|
70
|
+
} from "./chunk-4EEOJ54H.js";
|
|
64
71
|
import {
|
|
65
72
|
codeOf,
|
|
66
73
|
currentRun,
|
|
67
74
|
levelFor
|
|
68
|
-
} from "./chunk-
|
|
75
|
+
} from "./chunk-TIXIB32T.js";
|
|
69
76
|
import {
|
|
70
77
|
failureKey
|
|
71
|
-
} from "./chunk-
|
|
72
|
-
import {
|
|
73
|
-
envName
|
|
74
|
-
} from "./chunk-JLKNUFL2.js";
|
|
75
|
-
import {
|
|
76
|
-
readSecret
|
|
77
|
-
} from "./chunk-W6FYYQ2J.js";
|
|
78
|
-
import {
|
|
79
|
-
checkedOptions,
|
|
80
|
-
range
|
|
81
|
-
} from "./chunk-L4BBK7UX.js";
|
|
78
|
+
} from "./chunk-UMJLXAJI.js";
|
|
82
79
|
import {
|
|
83
80
|
messagesFor,
|
|
84
81
|
systemFor,
|
|
85
82
|
validateImages
|
|
86
|
-
} from "./chunk-
|
|
83
|
+
} from "./chunk-UTDL7MKT.js";
|
|
87
84
|
import {
|
|
88
85
|
MIGRATIONS,
|
|
89
86
|
drainNoteIndex,
|
|
@@ -112,26 +109,30 @@ import {
|
|
|
112
109
|
storeClients,
|
|
113
110
|
storeContents,
|
|
114
111
|
vectorIndexCounts
|
|
115
|
-
} from "./chunk-
|
|
112
|
+
} from "./chunk-TNX77VPM.js";
|
|
116
113
|
import {
|
|
117
114
|
queryFieldsOf
|
|
118
|
-
} from "./chunk-
|
|
115
|
+
} from "./chunk-SWFA36F3.js";
|
|
119
116
|
import {
|
|
120
117
|
storePath
|
|
121
|
-
} from "./chunk-
|
|
118
|
+
} from "./chunk-7VUHY5LP.js";
|
|
122
119
|
import {
|
|
123
120
|
openCache
|
|
124
|
-
} from "./chunk-
|
|
121
|
+
} from "./chunk-KCBHOYNZ.js";
|
|
122
|
+
import {
|
|
123
|
+
readSecret
|
|
124
|
+
} from "./chunk-BKM2CGG2.js";
|
|
125
125
|
import {
|
|
126
126
|
Credentials,
|
|
127
127
|
pathsAreOverridden,
|
|
128
128
|
resolvePaths,
|
|
129
|
-
singleLine,
|
|
130
|
-
visibleControls,
|
|
131
129
|
writeSecurely
|
|
132
|
-
} from "./chunk-
|
|
130
|
+
} from "./chunk-ALTG7BZQ.js";
|
|
131
|
+
import {
|
|
132
|
+
singleLine,
|
|
133
|
+
visibleControls
|
|
134
|
+
} from "./chunk-ASPIEEXN.js";
|
|
133
135
|
import {
|
|
134
|
-
CliError,
|
|
135
136
|
array,
|
|
136
137
|
boolean,
|
|
137
138
|
check,
|
|
@@ -154,7 +155,10 @@ import {
|
|
|
154
155
|
transform,
|
|
155
156
|
trim,
|
|
156
157
|
union
|
|
157
|
-
} from "./chunk-
|
|
158
|
+
} from "./chunk-O3K46QRL.js";
|
|
159
|
+
import {
|
|
160
|
+
CliError
|
|
161
|
+
} from "./chunk-ITD7WI23.js";
|
|
158
162
|
import {
|
|
159
163
|
__commonJS,
|
|
160
164
|
__name,
|
|
@@ -6648,7 +6652,7 @@ var modelGateway = /* @__PURE__ */ __name((deps) => ({
|
|
|
6648
6652
|
if (!adapter && target.provider === "openai")
|
|
6649
6653
|
adapter = openai;
|
|
6650
6654
|
if (!adapter && target.provider === "anthropic")
|
|
6651
|
-
adapter = (await import("./anthropic-
|
|
6655
|
+
adapter = (await import("./anthropic-EZPZUWGS.js")).anthropic;
|
|
6652
6656
|
if (!adapter)
|
|
6653
6657
|
throw new CliError("validation_error", `no model adapter for ${target.provider}`);
|
|
6654
6658
|
if (request.images !== void 0 && adapter.images !== true)
|
|
@@ -1,20 +1,22 @@
|
|
|
1
1
|
import { createRequire as __bundleRequire } from "node:module";
|
|
2
2
|
const require = __bundleRequire(import.meta.url);
|
|
3
3
|
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
4
|
+
errorObjectOf
|
|
5
|
+
} from "./chunk-3RG27IWA.js";
|
|
6
|
+
import {
|
|
7
|
+
visibleControls
|
|
8
|
+
} from "./chunk-ASPIEEXN.js";
|
|
9
|
+
import {
|
|
9
10
|
LOG_ATTRIBUTE_KEYS,
|
|
10
|
-
|
|
11
|
+
isContentKey
|
|
12
|
+
} from "./chunk-RRHC5SBB.js";
|
|
13
|
+
import {
|
|
11
14
|
getDotPath,
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
} from "./chunk-GIQFBXQN.js";
|
|
15
|
+
safeParse
|
|
16
|
+
} from "./chunk-O3K46QRL.js";
|
|
17
|
+
import {
|
|
18
|
+
CliError
|
|
19
|
+
} from "./chunk-ITD7WI23.js";
|
|
18
20
|
import {
|
|
19
21
|
__commonJS,
|
|
20
22
|
__name,
|
|
@@ -1887,197 +1889,6 @@ var require_cli_table3 = __commonJS({
|
|
|
1887
1889
|
}
|
|
1888
1890
|
});
|
|
1889
1891
|
|
|
1890
|
-
// node_modules/.pnpm/@wirecat+cli-base@0.73.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/exit-codes.js
|
|
1891
|
-
var EXIT_CODES = {
|
|
1892
|
-
validation_error: 2,
|
|
1893
|
-
configuration_error: 3,
|
|
1894
|
-
authentication_error: 4,
|
|
1895
|
-
permission_error: 5,
|
|
1896
|
-
not_found: 6,
|
|
1897
|
-
confirmation_required: 7,
|
|
1898
|
-
rate_limited: 8,
|
|
1899
|
-
timeout: 9,
|
|
1900
|
-
network_error: 10,
|
|
1901
|
-
provider_error: 11,
|
|
1902
|
-
provider_unavailable: 12,
|
|
1903
|
-
invalid_response: 13,
|
|
1904
|
-
outcome_unknown: 14,
|
|
1905
|
-
cancelled: 130
|
|
1906
|
-
};
|
|
1907
|
-
var exitCodeFor = /* @__PURE__ */ __name((code) => EXIT_CODES[code], "exitCodeFor");
|
|
1908
|
-
var GENERIC_FAILURE = 1;
|
|
1909
|
-
|
|
1910
|
-
// node_modules/.pnpm/@wirecat+cli-base@0.73.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/sanitize.js
|
|
1911
|
-
var CONTROL = (
|
|
1912
|
-
// biome-ignore lint/suspicious/noControlCharactersInRegex: matching them is the whole point
|
|
1913
|
-
/[\u0000-\u0008\u000B-\u001F\u007F-\u009F\u200B\u200E\u200F\u202A-\u202E\u2066-\u2069\uFEFF\u{E0000}-\u{E007F}]/gu
|
|
1914
|
-
);
|
|
1915
|
-
var SUBDIVISION_FLAG = /\u{1F3F4}[\u{E0061}-\u{E007A}]{2}[\u{E0030}-\u{E0039}\u{E0061}-\u{E007A}]{1,3}\u{E007F}/gu;
|
|
1916
|
-
var LINE_BREAKS = /[\t\n\u2028\u2029]/g;
|
|
1917
|
-
var escaped = /* @__PURE__ */ __name((c) => {
|
|
1918
|
-
const code = c.codePointAt(0) ?? 0;
|
|
1919
|
-
if (code > 65535)
|
|
1920
|
-
return `\\u{${code.toString(16)}}`;
|
|
1921
|
-
return code > 255 ? `\\u${code.toString(16).padStart(4, "0")}` : `\\x${code.toString(16).padStart(2, "0")}`;
|
|
1922
|
-
}, "escaped");
|
|
1923
|
-
var visibleControls = /* @__PURE__ */ __name((text) => {
|
|
1924
|
-
let at = 0;
|
|
1925
|
-
let result = "";
|
|
1926
|
-
for (const flag of text.matchAll(SUBDIVISION_FLAG)) {
|
|
1927
|
-
result += text.slice(at, flag.index).replace(CONTROL, escaped) + flag[0];
|
|
1928
|
-
at = flag.index + flag[0].length;
|
|
1929
|
-
}
|
|
1930
|
-
return result + text.slice(at).replace(CONTROL, escaped);
|
|
1931
|
-
}, "visibleControls");
|
|
1932
|
-
var singleLine = /* @__PURE__ */ __name((text) => visibleControls(text).replace(LINE_BREAKS, escaped), "singleLine");
|
|
1933
|
-
|
|
1934
|
-
// node_modules/.pnpm/@wirecat+cli-base@0.73.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/failure.js
|
|
1935
|
-
var recognise = /* @__PURE__ */ __name((failure) => {
|
|
1936
|
-
if (isCliError(failure))
|
|
1937
|
-
return failure;
|
|
1938
|
-
if (!(failure instanceof Error) || failure.name !== "CliError")
|
|
1939
|
-
return void 0;
|
|
1940
|
-
const { code, details } = failure;
|
|
1941
|
-
if (!errorCodes.includes(code))
|
|
1942
|
-
return void 0;
|
|
1943
|
-
return {
|
|
1944
|
-
code,
|
|
1945
|
-
message: failure.message,
|
|
1946
|
-
details: typeof details === "object" && details !== null ? details : {}
|
|
1947
|
-
};
|
|
1948
|
-
}, "recognise");
|
|
1949
|
-
var reasonFor = /* @__PURE__ */ __name((code, named, reasons) => reasons.find((entry2) => entry2.reason === named && entry2.code === code) ?? BASE_REASONS.find((entry2) => entry2.reason === named && entry2.code === code) ?? // The first base reason for each code is its fallback.
|
|
1950
|
-
BASE_REASONS.find((entry2) => entry2.code === code), "reasonFor");
|
|
1951
|
-
var nextFor = /* @__PURE__ */ __name((reason, details, context) => {
|
|
1952
|
-
const definition = reason.step ? context.steps?.find((step) => step.id === reason.step) : void 0;
|
|
1953
|
-
if (!definition)
|
|
1954
|
-
return [];
|
|
1955
|
-
const known = new Set(definition.kind === "command" ? definition.args.map((arg) => arg.name) : []);
|
|
1956
|
-
const args = Object.fromEntries(Object.entries(details).filter(([key, value]) => known.has(key) && value !== void 0));
|
|
1957
|
-
try {
|
|
1958
|
-
return [stepOf(definition, { args, ...context.targets ? { targets: context.targets } : {} })];
|
|
1959
|
-
} catch {
|
|
1960
|
-
return [];
|
|
1961
|
-
}
|
|
1962
|
-
}, "nextFor");
|
|
1963
|
-
var TRANSIENT = [
|
|
1964
|
-
"rate_limited",
|
|
1965
|
-
"timeout",
|
|
1966
|
-
"network_error",
|
|
1967
|
-
"provider_unavailable"
|
|
1968
|
-
];
|
|
1969
|
-
var retryOf = /* @__PURE__ */ __name((code, details, effects) => {
|
|
1970
|
-
const transient = details.retryable !== false && (TRANSIENT.includes(code) || code === "provider_error" && details.retryable === true);
|
|
1971
|
-
const safe = code !== "outcome_unknown" && transient && (!writes(effects) || details.sent === false);
|
|
1972
|
-
const after = details.retry_after_ms;
|
|
1973
|
-
return safe && typeof after === "number" && Number.isInteger(after) && after >= 0 ? { safe, after_ms: after } : { safe };
|
|
1974
|
-
}, "retryOf");
|
|
1975
|
-
var errorObjectOf = /* @__PURE__ */ __name((failure, context = {}) => {
|
|
1976
|
-
const reasons = context.reasons ?? [];
|
|
1977
|
-
const recognised = recognise(failure);
|
|
1978
|
-
if (!recognised) {
|
|
1979
|
-
const reason2 = reasonFor(CRASH_CODE, CRASH_REASON, reasons);
|
|
1980
|
-
return {
|
|
1981
|
-
error: {
|
|
1982
|
-
code: CRASH_CODE,
|
|
1983
|
-
reason: reason2.reason,
|
|
1984
|
-
message: reason2.message,
|
|
1985
|
-
retry: { safe: false },
|
|
1986
|
-
...context.runId ? { run_id: context.runId } : {}
|
|
1987
|
-
}
|
|
1988
|
-
};
|
|
1989
|
-
}
|
|
1990
|
-
const { code, message, details } = recognised;
|
|
1991
|
-
const reason = reasonFor(code, details.reason, reasons);
|
|
1992
|
-
const allowed = /* @__PURE__ */ new Set([...COMMON_DETAILS, ...context.details ?? [], ...reason.details]);
|
|
1993
|
-
allowed.delete("cause");
|
|
1994
|
-
const kept = Object.fromEntries(Object.entries(details).filter(([key, value]) => allowed.has(key) && value !== void 0));
|
|
1995
|
-
const next = nextFor(reason, details, context);
|
|
1996
|
-
const runId = context.runId ?? (typeof details.run_id === "string" ? details.run_id : void 0);
|
|
1997
|
-
return {
|
|
1998
|
-
error: {
|
|
1999
|
-
code,
|
|
2000
|
-
reason: reason.reason,
|
|
2001
|
-
message,
|
|
2002
|
-
...typeof details.param === "string" ? { param: details.param } : {},
|
|
2003
|
-
...Object.keys(kept).length > 0 ? { details: kept } : {},
|
|
2004
|
-
...next.length > 0 ? { next } : {},
|
|
2005
|
-
retry: retryOf(code, details, context.effects),
|
|
2006
|
-
...runId ? { run_id: runId } : {}
|
|
2007
|
-
}
|
|
2008
|
-
};
|
|
2009
|
-
}, "errorObjectOf");
|
|
2010
|
-
var exitCodeOfError = /* @__PURE__ */ __name(({ error }) => error.code === CRASH_CODE ? GENERIC_FAILURE : EXIT_CODES[error.code], "exitCodeOfError");
|
|
2011
|
-
var exitCodeOfAnswer = /* @__PURE__ */ __name((meta, partial = false) => {
|
|
2012
|
-
if (meta.complete || partial)
|
|
2013
|
-
return 0;
|
|
2014
|
-
const code = meta.issues?.[0]?.code;
|
|
2015
|
-
return code === void 0 ? GENERIC_FAILURE : EXIT_CODES[code];
|
|
2016
|
-
}, "exitCodeOfAnswer");
|
|
2017
|
-
var kebab = /* @__PURE__ */ __name((name) => name.replaceAll("_", "-"), "kebab");
|
|
2018
|
-
var commandLine = /* @__PURE__ */ __name((cli, step) => [
|
|
2019
|
-
cli,
|
|
2020
|
-
step.command,
|
|
2021
|
-
...Object.entries(step.args).map(([name, value]) => value === true ? `--${kebab(name)}` : `--${kebab(name)} ${JSON.stringify(value)}`)
|
|
2022
|
-
].join(" "), "commandLine");
|
|
2023
|
-
var STACK_FRAMES = 10;
|
|
2024
|
-
var errorRecordOf = /* @__PURE__ */ __name((failure, object2, options) => {
|
|
2025
|
-
const thrown = failure instanceof Error ? failure : void 0;
|
|
2026
|
-
const { cause, ...details } = recognise(failure)?.details ?? {};
|
|
2027
|
-
const stack = thrown?.stack?.split("\n").slice(1, STACK_FRAMES + 1).map((line) => visibleControls(line.trim()));
|
|
2028
|
-
const reason = thrown?.cause ?? cause;
|
|
2029
|
-
return {
|
|
2030
|
-
time: (options.time ?? /* @__PURE__ */ new Date()).toISOString(),
|
|
2031
|
-
severity: "error",
|
|
2032
|
-
body: "command.failed",
|
|
2033
|
-
...object2.error.run_id ? { run_id: object2.error.run_id } : {},
|
|
2034
|
-
command: options.command,
|
|
2035
|
-
attributes: {
|
|
2036
|
-
code: object2.error.code,
|
|
2037
|
-
reason: object2.error.reason,
|
|
2038
|
-
message: object2.error.message,
|
|
2039
|
-
...Object.keys(details).length > 0 ? { details } : {},
|
|
2040
|
-
...thrown ? { name: thrown.name, thrown_message: visibleControls(thrown.message) } : { thrown: String(failure) },
|
|
2041
|
-
...reason === void 0 ? {} : { cause: visibleControls(reason instanceof Error ? reason.message : String(reason)) },
|
|
2042
|
-
...stack && stack.length > 0 ? { stack } : {}
|
|
2043
|
-
},
|
|
2044
|
-
resource: { service: options.service, version: options.version }
|
|
2045
|
-
};
|
|
2046
|
-
}, "errorRecordOf");
|
|
2047
|
-
var renderError = /* @__PURE__ */ __name((object2, options) => {
|
|
2048
|
-
if (!options.interactive)
|
|
2049
|
-
return [JSON.stringify(object2), ...options.record ? [JSON.stringify(options.record)] : []].join("\n");
|
|
2050
|
-
const { message, next, run_id: runId } = object2.error;
|
|
2051
|
-
const step = next?.[0];
|
|
2052
|
-
return [
|
|
2053
|
-
`\u2717 ${visibleControls(message)}`,
|
|
2054
|
-
...step?.kind === "command" ? [`\u2192 ${visibleControls(step.why)}: ${visibleControls(step.line ?? commandLine(options.cli, step))}`] : step ? [`\u2192 ${visibleControls(step.why)}`] : [],
|
|
2055
|
-
...options.record ? [JSON.stringify(options.record, null, 2)] : runId ? [`details: ${options.cli} runs show ${runId}`] : []
|
|
2056
|
-
].join("\n");
|
|
2057
|
-
}, "renderError");
|
|
2058
|
-
var mcpErrorResult = /* @__PURE__ */ __name((object2) => ({
|
|
2059
|
-
content: [{ type: "text", text: JSON.stringify(object2) }],
|
|
2060
|
-
structuredContent: object2,
|
|
2061
|
-
isError: true
|
|
2062
|
-
}), "mcpErrorResult");
|
|
2063
|
-
var catchCrashes = /* @__PURE__ */ __name((options) => {
|
|
2064
|
-
const target = options.target ?? process;
|
|
2065
|
-
const write = options.write ?? ((text) => process.stderr.write(`${text}
|
|
2066
|
-
`));
|
|
2067
|
-
const exit = options.exit ?? ((code) => process.exit(code));
|
|
2068
|
-
const crashed = /* @__PURE__ */ __name((failure) => {
|
|
2069
|
-
const object2 = errorObjectOf(failure, options);
|
|
2070
|
-
write(renderError(object2, { cli: options.cli, interactive: options.interactive }));
|
|
2071
|
-
exit(exitCodeOfError(object2));
|
|
2072
|
-
}, "crashed");
|
|
2073
|
-
target.on("uncaughtException", crashed);
|
|
2074
|
-
target.on("unhandledRejection", crashed);
|
|
2075
|
-
return () => {
|
|
2076
|
-
target.off("uncaughtException", crashed);
|
|
2077
|
-
target.off("unhandledRejection", crashed);
|
|
2078
|
-
};
|
|
2079
|
-
}, "catchCrashes");
|
|
2080
|
-
|
|
2081
1892
|
// node_modules/.pnpm/@wirecat+cli-base@0.73.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/keyring.js
|
|
2082
1893
|
import { createRequire } from "node:module";
|
|
2083
1894
|
var ENTRY_OPTIONS = { linux: { store: "secret-service" } };
|
|
@@ -2816,18 +2627,6 @@ var createRenderer = /* @__PURE__ */ __name(({ format, color, streams = processS
|
|
|
2816
2627
|
}, "createRenderer");
|
|
2817
2628
|
|
|
2818
2629
|
export {
|
|
2819
|
-
EXIT_CODES,
|
|
2820
|
-
exitCodeFor,
|
|
2821
|
-
GENERIC_FAILURE,
|
|
2822
|
-
visibleControls,
|
|
2823
|
-
singleLine,
|
|
2824
|
-
errorObjectOf,
|
|
2825
|
-
exitCodeOfError,
|
|
2826
|
-
exitCodeOfAnswer,
|
|
2827
|
-
errorRecordOf,
|
|
2828
|
-
renderError,
|
|
2829
|
-
mcpErrorResult,
|
|
2830
|
-
catchCrashes,
|
|
2831
2630
|
fieldsOf,
|
|
2832
2631
|
projectFields,
|
|
2833
2632
|
BATCH_LIMITS,
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { createRequire as __bundleRequire } from "node:module";
|
|
2
|
+
const require = __bundleRequire(import.meta.url);
|
|
3
|
+
import {
|
|
4
|
+
__name
|
|
5
|
+
} from "./chunk-ZVVMGPBJ.js";
|
|
6
|
+
|
|
7
|
+
// node_modules/.pnpm/@wirecat+cli-base@0.73.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/sanitize.js
|
|
8
|
+
var CONTROL = (
|
|
9
|
+
// biome-ignore lint/suspicious/noControlCharactersInRegex: matching them is the whole point
|
|
10
|
+
/[\u0000-\u0008\u000B-\u001F\u007F-\u009F\u200B\u200E\u200F\u202A-\u202E\u2066-\u2069\uFEFF\u{E0000}-\u{E007F}]/gu
|
|
11
|
+
);
|
|
12
|
+
var SUBDIVISION_FLAG = /\u{1F3F4}[\u{E0061}-\u{E007A}]{2}[\u{E0030}-\u{E0039}\u{E0061}-\u{E007A}]{1,3}\u{E007F}/gu;
|
|
13
|
+
var LINE_BREAKS = /[\t\n\u2028\u2029]/g;
|
|
14
|
+
var escaped = /* @__PURE__ */ __name((c) => {
|
|
15
|
+
const code = c.codePointAt(0) ?? 0;
|
|
16
|
+
if (code > 65535)
|
|
17
|
+
return `\\u{${code.toString(16)}}`;
|
|
18
|
+
return code > 255 ? `\\u${code.toString(16).padStart(4, "0")}` : `\\x${code.toString(16).padStart(2, "0")}`;
|
|
19
|
+
}, "escaped");
|
|
20
|
+
var visibleControls = /* @__PURE__ */ __name((text) => {
|
|
21
|
+
let at = 0;
|
|
22
|
+
let result = "";
|
|
23
|
+
for (const flag of text.matchAll(SUBDIVISION_FLAG)) {
|
|
24
|
+
result += text.slice(at, flag.index).replace(CONTROL, escaped) + flag[0];
|
|
25
|
+
at = flag.index + flag[0].length;
|
|
26
|
+
}
|
|
27
|
+
return result + text.slice(at).replace(CONTROL, escaped);
|
|
28
|
+
}, "visibleControls");
|
|
29
|
+
var singleLine = /* @__PURE__ */ __name((text) => visibleControls(text).replace(LINE_BREAKS, escaped), "singleLine");
|
|
30
|
+
|
|
31
|
+
export {
|
|
32
|
+
visibleControls,
|
|
33
|
+
singleLine
|
|
34
|
+
};
|
|
@@ -4,10 +4,10 @@ import {
|
|
|
4
4
|
MAX_SECRET_INPUT,
|
|
5
5
|
bufferedInput,
|
|
6
6
|
inputPolicy
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-7YUZAEBG.js";
|
|
8
8
|
import {
|
|
9
9
|
CliError
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-ITD7WI23.js";
|
|
11
11
|
import {
|
|
12
12
|
__name
|
|
13
13
|
} from "./chunk-ZVVMGPBJ.js";
|
|
@@ -8,15 +8,15 @@ import {
|
|
|
8
8
|
MAX_FILE_BYTES,
|
|
9
9
|
MAX_TEXT_CHARS,
|
|
10
10
|
attachmentMaxBytes
|
|
11
|
-
} from "./chunk-
|
|
12
|
-
import {
|
|
13
|
-
CliError,
|
|
14
|
-
isCliError
|
|
15
|
-
} from "./chunk-GIQFBXQN.js";
|
|
11
|
+
} from "./chunk-X5XWUQNU.js";
|
|
16
12
|
import {
|
|
17
13
|
importFrom,
|
|
18
14
|
resolveFrom
|
|
19
15
|
} from "./chunk-Y5E2WNWB.js";
|
|
16
|
+
import {
|
|
17
|
+
CliError,
|
|
18
|
+
isCliError
|
|
19
|
+
} from "./chunk-ITD7WI23.js";
|
|
20
20
|
import {
|
|
21
21
|
__commonJS,
|
|
22
22
|
__name,
|
|
@@ -18,7 +18,7 @@ import {
|
|
|
18
18
|
strictObject,
|
|
19
19
|
string,
|
|
20
20
|
unknown
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-O3K46QRL.js";
|
|
22
22
|
|
|
23
23
|
// node_modules/.pnpm/@wirecat+cli-core@0.546.0_@wirecat+cli-base@0.73.0_commander@15.0.0_esbuild@0.28.2_type_6245070bff0a7c29971e74a96fde145c/node_modules/@wirecat/cli-core/dist/entities/fields.js
|
|
24
24
|
var text = string();
|