@wirecat/drive-cli 0.60.0 → 0.62.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 +4 -5
- package/dist/bin/drive.js +2 -2
- package/dist/browse.d.ts +20 -0
- package/dist/browse.d.ts.map +1 -0
- package/dist/browse.js +146 -0
- package/dist/browse.js.map +1 -0
- package/dist/bundle/{all-profiles-537I27Z4.js → all-profiles-CKD2DWUK.js} +14 -14
- package/dist/bundle/{anthropic-X4NWVHDF.js → anthropic-E3T4USLA.js} +9 -9
- package/dist/bundle/{app-server-KSHJKKS7.js → app-server-JB2AEWWL.js} +58 -55
- package/dist/bundle/{bun-WTBGGCUC.js → bun-CC44AAND.js} +2 -2
- package/dist/bundle/{bun-sqlite-T7Y3JFFD.js → bun-sqlite-AUMFKYVR.js} +8 -8
- package/dist/bundle/{chunk-2AXA5SKP.js → chunk-27YUUGXQ.js} +1 -1
- package/dist/bundle/{chunk-HIP43OGZ.js → chunk-2HF2MRXI.js} +1 -1
- package/dist/bundle/{chunk-AXWXQNTC.js → chunk-2KN35F32.js} +10 -10
- package/dist/bundle/{chunk-EBLA7GXY.js → chunk-4OSSOWDM.js} +2 -1
- package/dist/bundle/{chunk-XFXRGQXJ.js → chunk-4SIZEJ3M.js} +2 -2
- package/dist/bundle/{chunk-LQSRVQ3V.js → chunk-67ZQCWBV.js} +3 -3
- package/dist/bundle/{chunk-FO4TCH6P.js → chunk-6EY46GAN.js} +2 -2
- package/dist/bundle/{chunk-4XZXH2NM.js → chunk-7W5HYGVW.js} +4 -2
- package/dist/bundle/{chunk-FZOCQQ66.js → chunk-7ZXIWZQ6.js} +12 -12
- package/dist/bundle/{chunk-YGG7UA3C.js → chunk-AH5C3D3D.js} +5 -5
- package/dist/bundle/{chunk-YDN2RH5S.js → chunk-AQVUEZEP.js} +2 -2
- package/dist/bundle/{chunk-N7S2UPF3.js → chunk-CJHY5YIF.js} +494 -227
- package/dist/bundle/{chunk-MXP35VPO.js → chunk-CZ2GJHLL.js} +2 -2
- package/dist/bundle/{chunk-HQVIK6PM.js → chunk-DJOAMGF4.js} +262 -368
- package/dist/bundle/{chunk-HCJG7ENG.js → chunk-DRZZBN3V.js} +3 -3
- package/dist/bundle/{chunk-TXMTMEHW.js → chunk-DWJHL6DV.js} +4 -4
- package/dist/bundle/{chunk-S36HRPNS.js → chunk-E43ENLJJ.js} +1 -1
- package/dist/bundle/{chunk-4VHBDVY2.js → chunk-EOOGWUTP.js} +14 -10
- package/dist/bundle/{chunk-5XHLQZAG.js → chunk-EW7PKB4M.js} +58 -49
- package/dist/bundle/{chunk-TKW4QWCY.js → chunk-FEZF3TII.js} +12 -6
- package/dist/bundle/{chunk-KEXTTZJM.js → chunk-FNWIJ6EJ.js} +2 -2
- package/dist/bundle/{chunk-OYNUBWD2.js → chunk-FUITWY7O.js} +1 -1
- package/dist/bundle/{chunk-TVQDMP2F.js → chunk-HCNQT3QE.js} +1440 -771
- package/dist/bundle/{chunk-FTZNUZO7.js → chunk-HG6CAYJH.js} +3 -3
- package/dist/bundle/{chunk-SZXI4OXX.js → chunk-IR4SQLBR.js} +2 -2
- package/dist/bundle/{chunk-UTFATA4K.js → chunk-JK3U25QZ.js} +1 -1
- package/dist/bundle/{chunk-SBHSNOU4.js → chunk-JN5TVEEL.js} +96 -27
- package/dist/bundle/{chunk-IXN7Y6JA.js → chunk-KLFSRKHB.js} +1 -1
- package/dist/bundle/{chunk-57QVQGBE.js → chunk-L7K2MOIC.js} +22 -22
- package/dist/bundle/{chunk-JGUJJNGZ.js → chunk-LQKD257P.js} +582 -424
- package/dist/bundle/{chunk-GVRS5AIH.js → chunk-LWE4JGRN.js} +2 -2
- package/dist/bundle/{chunk-D6WIWOQC.js → chunk-MN4VXU3M.js} +4 -4
- package/dist/bundle/{chunk-QIJWSKZL.js → chunk-N7OZPKU7.js} +4 -4
- package/dist/bundle/{chunk-W62CON5K.js → chunk-O2XOX4HB.js} +34 -10
- package/dist/bundle/{chunk-PDYHEWKG.js → chunk-O7ALBI2I.js} +5 -5
- package/dist/bundle/{chunk-PETFPXLU.js → chunk-OBH5BA62.js} +3 -3
- package/dist/bundle/{chunk-246P2DCT.js → chunk-OD4U7GUY.js} +113 -51
- package/dist/bundle/{chunk-67QXMO2G.js → chunk-ONP2IBHY.js} +26 -26
- package/dist/bundle/{chunk-JQLIM6BH.js → chunk-OTROVC4E.js} +1 -1
- package/dist/bundle/{chunk-73TTP6ET.js → chunk-PEQA6LA5.js} +617 -243
- package/dist/bundle/{chunk-ALWTUDZF.js → chunk-Q2LRPOKL.js} +22 -14
- package/dist/bundle/{chunk-CKGHRWVR.js → chunk-QCKZ3GAA.js} +4 -4
- package/dist/bundle/chunk-QCX6XZLA.js +415 -0
- package/dist/bundle/{chunk-UVLSWLPZ.js → chunk-QH7DOVO3.js} +204 -58
- package/dist/bundle/{chunk-OMKUBCNN.js → chunk-QTI6IVHZ.js} +8 -8
- package/dist/bundle/{chunk-6HTKB4WC.js → chunk-R347FPYU.js} +1 -1
- package/dist/bundle/chunk-RIDQNVZM.js +64 -0
- package/dist/bundle/{chunk-ZPQS7XJA.js → chunk-RPMKG63Z.js} +18 -4
- package/dist/bundle/{chunk-XDIEQ2CE.js → chunk-RWSXVCSG.js} +3 -3
- package/dist/bundle/{chunk-3TQHIHZI.js → chunk-SVPCHFKI.js} +2 -2
- package/dist/bundle/{chunk-V2VMBM7O.js → chunk-SW4I5BR7.js} +2 -2
- package/dist/bundle/{chunk-EHAI773E.js → chunk-T5NWWXS2.js} +2 -2
- package/dist/bundle/{chunk-4CBZEAQ7.js → chunk-T7X53FCJ.js} +34 -34
- package/dist/bundle/{chunk-77C5XRH3.js → chunk-TDX4GZFO.js} +7 -7
- package/dist/bundle/{chunk-PPL5ASW2.js → chunk-U2BFYSQV.js} +14158 -2039
- package/dist/bundle/{chunk-DQDKLZAK.js → chunk-UGXN5D7U.js} +719 -128
- package/dist/bundle/{chunk-UNJE63JK.js → chunk-UOXOLGNG.js} +2 -2
- package/dist/bundle/{chunk-LJ77Y3TK.js → chunk-UQLWMGSD.js} +6 -5
- package/dist/bundle/{chunk-HFGR33KD.js → chunk-VAYB52HF.js} +33 -31
- package/dist/bundle/{chunk-GD6TQ6U4.js → chunk-VQDD64A4.js} +8 -8
- package/dist/bundle/{chunk-22ATLSNK.js → chunk-W4RTIL7S.js} +5 -5
- package/dist/bundle/{chunk-UVYVIHEA.js → chunk-WZKEU7WR.js} +4 -2
- package/dist/bundle/{chunk-5AMRCBMP.js → chunk-XEW2EN6F.js} +51 -37
- package/dist/bundle/{chunk-O37ESNAP.js → chunk-XFRRKZHQ.js} +242 -90
- package/dist/bundle/{chunk-K6XVRA6U.js → chunk-XS5POQST.js} +1 -1
- package/dist/bundle/{chunk-IRZ7OF3F.js → chunk-XZUS7XRO.js} +1 -1
- package/dist/bundle/{chunk-V7QMHMR3.js → chunk-YALI4C7C.js} +6 -6
- package/dist/bundle/{chunk-73MNUSP3.js → chunk-YMWENGKH.js} +1 -1
- package/dist/bundle/{chunk-MVNPE5FZ.js → chunk-YOJDGAPT.js} +8 -8
- package/dist/bundle/{chunk-DMHGWL5D.js → chunk-YPFUYQDP.js} +13 -13
- package/dist/bundle/{chunk-VVCZS42A.js → chunk-YUWPNG7B.js} +1 -1
- package/dist/bundle/{chunk-VRW6ZDTH.js → chunk-YXYTY4GF.js} +39 -26
- package/dist/bundle/{chunk-ZYCLPJ7U.js → chunk-ZMOUUOT2.js} +1 -1
- package/dist/bundle/command-contract-OB5BRABN.js +39 -0
- package/dist/bundle/{decode-35N57AFW.js → decode-WIIX3Y2X.js} +8 -8
- package/dist/bundle/{dispatch-CWXZW3PL.js → dispatch-GEFIXA6X.js} +9 -9
- package/dist/bundle/drive.js +11 -11
- package/dist/bundle/{echarts-3P3QZWMU.js → echarts-OYINM4C4.js} +2 -2
- package/dist/bundle/{embed-Q6Q5IOJQ.js → embed-DWZIYMBX.js} +9 -9
- package/dist/bundle/{embedder-D44JDTAA.js → embedder-ILWH7ZRM.js} +12 -12
- package/dist/bundle/entry-V5V3TOTY.js +22 -0
- package/dist/bundle/{failure-GRMMSDCZ.js → failure-GV77W3CD.js} +4 -4
- package/dist/bundle/first-run-V3VVLQF4.js +30 -0
- package/dist/bundle/first-screen-Y3RIN7FU.js +37 -0
- package/dist/bundle/{google-6ZZDKFBN.js → google-KLZSUAVY.js} +13 -13
- package/dist/bundle/{google-api-E6MOJ4ZD.js → google-api-HZQ5R4ZO.js} +83 -64
- package/dist/bundle/grants-L7XLHLUT.js +105 -0
- package/dist/bundle/{identity-TID7S5NE.js → identity-J2DON4IO.js} +6 -6
- package/dist/bundle/{instructions-ANJN4HV3.js → instructions-HGOJ23AJ.js} +1 -1
- package/dist/bundle/{login-BGMK2ABH.js → login-BD2TS4GY.js} +64 -64
- package/dist/bundle/{mcp-WBHKX5E3.js → mcp-GWDA3HOA.js} +2 -2
- package/dist/bundle/{node-VOB45ES2.js → node-CPKTDPH7.js} +2 -2
- package/dist/bundle/{node-sqlite-TSX6XQY2.js → node-sqlite-IXDCRLSX.js} +9 -9
- package/dist/bundle/oauth-HOGY4YBB.js +22 -0
- package/dist/bundle/{open-3USWHGNR.js → open-O7P3ZV3Y.js} +8 -8
- package/dist/bundle/{openai-YZ5VGPIP.js → openai-RCFQKCXC.js} +17 -17
- package/dist/bundle/{process-44JS2W7L.js → process-KXDRJO22.js} +1 -1
- package/dist/bundle/{program-TZLAFKJV.js → program-UCHFC7JQ.js} +266 -104
- package/dist/bundle/prompt-EVPPBN5W.js +17 -0
- package/dist/bundle/{reasons-ZK3U3CIN.js → reasons-57J2D77K.js} +5 -5
- package/dist/bundle/{recognize-OFW7HWTM.js → recognize-MRCYGP2J.js} +7 -7
- package/dist/bundle/{remote-YBDRZQZ5.js → remote-L3L4PHKF.js} +10 -10
- package/dist/bundle/{rerank-TQQNS5FJ.js → rerank-PSOE6XFT.js} +10 -10
- package/dist/bundle/{serve-OPZXMVLH.js → serve-72OGS3BF.js} +12 -12
- package/dist/bundle/server-C5TGNFXW.js +70 -0
- package/dist/bundle/{server-2D6DDIK5.js → server-SCXKYHBO.js} +44 -44
- package/dist/bundle/{services-34WKT3NN.js → services-YAFTELBI.js} +42 -32
- package/dist/bundle/{sqlite-runtime-WPUMKLUV.js → sqlite-runtime-DLK4SU33.js} +9 -9
- package/dist/bundle/{start-ZXUJZ4JV.js → start-AFFA3LKM.js} +9 -7
- package/dist/bundle/{state-AV2RB3AQ.js → state-T5VNAJSZ.js} +9 -9
- package/dist/bundle/{store-YKV4GAMS.js → store-4OFK7PKQ.js} +48 -28
- package/dist/bundle/{store-3M7N2Q5T.js → store-R6MSY2IM.js} +20 -18
- package/dist/bundle/store-maintenance-command-QDMCXGV6.js +60 -0
- package/dist/bundle/tokens-HIG36RNS.js +103 -0
- package/dist/commands/config.js +1 -1
- package/dist/commands/config.js.map +1 -1
- package/dist/commands/folders.d.ts +2 -1
- package/dist/commands/folders.d.ts.map +1 -1
- package/dist/commands/folders.js +16 -3
- package/dist/commands/folders.js.map +1 -1
- package/dist/commands/session.d.ts.map +1 -1
- package/dist/commands/session.js +10 -2
- package/dist/commands/session.js.map +1 -1
- package/dist/config.d.ts +16 -5
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +11 -17
- package/dist/config.js.map +1 -1
- package/dist/download.d.ts +3 -2
- package/dist/download.d.ts.map +1 -1
- package/dist/download.js +21 -9
- package/dist/download.js.map +1 -1
- package/dist/google-api.d.ts +3 -1
- package/dist/google-api.d.ts.map +1 -1
- package/dist/google-api.js +27 -7
- package/dist/google-api.js.map +1 -1
- package/dist/login.js +1 -1
- package/dist/login.js.map +1 -1
- package/dist/program.d.ts.map +1 -1
- package/dist/program.js +7 -7
- package/dist/program.js.map +1 -1
- package/dist/tokens.d.ts.map +1 -1
- package/dist/tokens.js +15 -6
- package/dist/tokens.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +3 -3
- package/dist/bundle/chunk-77YTRBL6.js +0 -249
- package/dist/bundle/chunk-YYHKVOVK.js +0 -132
- package/dist/bundle/command-contract-NUIWUVYB.js +0 -39
- package/dist/bundle/entry-ZHCNI7XO.js +0 -22
- package/dist/bundle/first-run-3DC2SDWM.js +0 -30
- package/dist/bundle/first-screen-YJF4YODC.js +0 -37
- package/dist/bundle/grants-GWXDH5GM.js +0 -105
- package/dist/bundle/oauth-CEOYXW6C.js +0 -22
- package/dist/bundle/prompt-SG7LAOXW.js +0 -17
- package/dist/bundle/server-R6G2O772.js +0 -70
- package/dist/bundle/store-maintenance-command-WDXNY4ZF.js +0 -60
- package/dist/bundle/tokens-F63RXXEF.js +0 -103
- package/dist/oauth-application.d.ts +0 -5
- package/dist/oauth-application.d.ts.map +0 -1
- package/dist/oauth-application.js +0 -9
- package/dist/oauth-application.js.map +0 -1
- /package/dist/bundle/{chunk-LK2E2ELG.js → chunk-ZQ3GWKDQ.js} +0 -0
|
@@ -29,7 +29,7 @@ import {
|
|
|
29
29
|
agentOf,
|
|
30
30
|
clientHash,
|
|
31
31
|
currentCaller
|
|
32
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-VQDD64A4.js";
|
|
33
33
|
import {
|
|
34
34
|
__name
|
|
35
35
|
} from "./chunk-ZVVMGPBJ.js";
|
|
@@ -541,7 +541,7 @@ function toError(value) {
|
|
|
541
541
|
}
|
|
542
542
|
__name(toError, "toError");
|
|
543
543
|
|
|
544
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
544
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/mcp/caller.js
|
|
545
545
|
var callingAgent = /* @__PURE__ */ __name((fallback, caller = currentCaller()) => {
|
|
546
546
|
const client = caller?.agent?.client?.name;
|
|
547
547
|
if (client && client !== "unknown")
|
|
@@ -4,18 +4,18 @@ import {
|
|
|
4
4
|
readSharedSection,
|
|
5
5
|
sharedConfigPath,
|
|
6
6
|
writeSharedSection
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-TDX4GZFO.js";
|
|
8
8
|
import {
|
|
9
9
|
storePath
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-FNWIJ6EJ.js";
|
|
11
11
|
import {
|
|
12
12
|
CliError
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-4OSSOWDM.js";
|
|
14
14
|
import {
|
|
15
15
|
__name
|
|
16
16
|
} from "./chunk-ZVVMGPBJ.js";
|
|
17
17
|
|
|
18
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/cli/setup-answers.js
|
|
19
19
|
var PERMISSION_ANSWERS = ["readonly", "allow"];
|
|
20
20
|
var QUESTIONS = ["languages", "tools", "permissions"];
|
|
21
21
|
var SECTION = "setup";
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
checkApiParameter,
|
|
12
12
|
operations,
|
|
13
13
|
parseApiJson
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-HCNQT3QE.js";
|
|
15
15
|
import {
|
|
16
16
|
array,
|
|
17
17
|
boolean,
|
|
@@ -27,15 +27,15 @@ import {
|
|
|
27
27
|
string,
|
|
28
28
|
transform,
|
|
29
29
|
unknown
|
|
30
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-FEZF3TII.js";
|
|
31
31
|
import {
|
|
32
32
|
CliError
|
|
33
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-4OSSOWDM.js";
|
|
34
34
|
import {
|
|
35
35
|
__name
|
|
36
36
|
} from "./chunk-ZVVMGPBJ.js";
|
|
37
37
|
|
|
38
|
-
// node_modules/.pnpm/@wirecat+cli-base@0.
|
|
38
|
+
// node_modules/.pnpm/@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/codegen/runtime.js
|
|
39
39
|
var isLossless = /* @__PURE__ */ __name((input) => typeof input === "object" && input !== null && input.isLosslessNumber === true && typeof input.value === "string", "isLossless");
|
|
40
40
|
var INTEGER = /^-?\d+$/;
|
|
41
41
|
var INT64_MIN = -(2n ** 63n);
|
|
@@ -2,12 +2,12 @@ import { createRequire as __bundleRequire } from "node:module";
|
|
|
2
2
|
const require = __bundleRequire(import.meta.url);
|
|
3
3
|
import {
|
|
4
4
|
singleLine
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-2HF2MRXI.js";
|
|
6
6
|
import {
|
|
7
7
|
__name
|
|
8
8
|
} from "./chunk-ZVVMGPBJ.js";
|
|
9
9
|
|
|
10
|
-
// node_modules/.pnpm/@wirecat+cli-base@0.
|
|
10
|
+
// node_modules/.pnpm/@wirecat+cli-base@0.80.9_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
11
|
var DESCRIBE_FORMAT = 1;
|
|
12
12
|
var describeAnswer = /* @__PURE__ */ __name((tool) => ({
|
|
13
13
|
wcat_describe: DESCRIBE_FORMAT,
|
|
@@ -36,7 +36,7 @@ var parseDescribe = /* @__PURE__ */ __name((text) => {
|
|
|
36
36
|
};
|
|
37
37
|
}, "parseDescribe");
|
|
38
38
|
|
|
39
|
-
// node_modules/.pnpm/@wirecat+cli-base@0.
|
|
39
|
+
// node_modules/.pnpm/@wirecat+cli-base@0.80.9_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
40
|
var FIRST_PARTY_TOOLS = [
|
|
41
41
|
{ name: "tg", package: "@wirecat/tg-cli" },
|
|
42
42
|
{ name: "max", package: "@wirecat/max-cli" },
|
|
@@ -59,16 +59,38 @@ var PROGRAM_PREFIX = "wcat-";
|
|
|
59
59
|
var DESCRIBE_FLAG = "--wcat-describe";
|
|
60
60
|
var DISPATCH_FLAG = "--wcat-dispatch";
|
|
61
61
|
|
|
62
|
-
// node_modules/.pnpm/@wirecat+cli-base@0.
|
|
62
|
+
// node_modules/.pnpm/@wirecat+cli-base@0.80.9_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
63
|
import { lstatSync, readFileSync, renameSync, rmSync, statSync, writeFileSync } from "node:fs";
|
|
64
64
|
import { join } from "node:path";
|
|
65
|
-
var SHIM_FORMAT =
|
|
65
|
+
var SHIM_FORMAT = 2;
|
|
66
66
|
var MARK = /^(?:#|REM) wirecat-shim (\d+) (launcher|shortcut) (\S+)\r?$/m;
|
|
67
67
|
var NOTE = {
|
|
68
68
|
launcher: "Written by @wirecat/cli-base. Any WireCat tool rewrites it when it breaks; it is safe to delete.",
|
|
69
69
|
shortcut: "Made by `wcat shortcuts add`; `wcat shortcuts remove` takes it out."
|
|
70
70
|
};
|
|
71
71
|
var shellQuote = /* @__PURE__ */ __name((text) => `'${text.replaceAll("'", `'\\''`)}'`, "shellQuote");
|
|
72
|
+
var launcherBody = /* @__PURE__ */ __name((dir, target, name) => [
|
|
73
|
+
'ok() { [ -f "$1" ] && [ -x "$1" ]; }',
|
|
74
|
+
`dir=${shellQuote(dir)}`,
|
|
75
|
+
`target=${shellQuote(join(dir, target))}`,
|
|
76
|
+
'if ! ok "$target"; then',
|
|
77
|
+
' for t in "$dir"/wcat-*; do',
|
|
78
|
+
' if ok "$t"; then target=$t; break; fi',
|
|
79
|
+
" done",
|
|
80
|
+
"fi",
|
|
81
|
+
`if ok "$target"; then exec "$target" ${DISPATCH_FLAG} "$@"; fi`,
|
|
82
|
+
'if [ -z "$WIRECAT_LAUNCHER_SKIP" ]; then',
|
|
83
|
+
" WIRECAT_LAUNCHER_SKIP=1; export WIRECAT_LAUNCHER_SKIP",
|
|
84
|
+
" set -f; oldifs=$IFS; IFS=:",
|
|
85
|
+
" for d in $PATH; do",
|
|
86
|
+
` if [ -n "$d" ] && [ "$d" != "$dir" ] && ok "$d/${name}"; then IFS=$oldifs; exec "$d/${name}" "$@"; fi`,
|
|
87
|
+
" done",
|
|
88
|
+
" IFS=$oldifs; set +f",
|
|
89
|
+
"fi",
|
|
90
|
+
`printf '%s\\n' "${name}: $target is missing and no other ${name}-* program was found in $dir or on PATH." \\`,
|
|
91
|
+
` "This launcher is safe to delete: $dir/${name}" >&2`,
|
|
92
|
+
"exit 127"
|
|
93
|
+
], "launcherBody");
|
|
72
94
|
var shimFiles = /* @__PURE__ */ __name((kind, { dir, name, target, platform }) => {
|
|
73
95
|
const mark = `wirecat-shim ${SHIM_FORMAT} ${kind} ${target}`;
|
|
74
96
|
const extra = kind === "launcher" ? ` ${DISPATCH_FLAG}` : "";
|
|
@@ -76,11 +98,13 @@ var shimFiles = /* @__PURE__ */ __name((kind, { dir, name, target, platform }) =
|
|
|
76
98
|
return [
|
|
77
99
|
{
|
|
78
100
|
path: join(dir, name),
|
|
79
|
-
text:
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
`
|
|
101
|
+
text: [
|
|
102
|
+
"#!/bin/sh",
|
|
103
|
+
`# ${mark}`,
|
|
104
|
+
`# ${NOTE[kind]}`,
|
|
105
|
+
...kind === "launcher" ? launcherBody(dir, target, name) : [`exec ${shellQuote(join(dir, target))} "$@"`],
|
|
106
|
+
""
|
|
107
|
+
].join("\n")
|
|
84
108
|
}
|
|
85
109
|
];
|
|
86
110
|
return [
|
|
@@ -6,21 +6,21 @@ import {
|
|
|
6
6
|
answerSchema,
|
|
7
7
|
describeOptions,
|
|
8
8
|
metaOf
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-PEQA6LA5.js";
|
|
10
10
|
import {
|
|
11
11
|
keyForCommand
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-VAYB52HF.js";
|
|
13
13
|
import {
|
|
14
14
|
jsonSchemaOf
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-FEZF3TII.js";
|
|
16
16
|
import {
|
|
17
17
|
CliError
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-4OSSOWDM.js";
|
|
19
19
|
import {
|
|
20
20
|
__name
|
|
21
21
|
} from "./chunk-ZVVMGPBJ.js";
|
|
22
22
|
|
|
23
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/cli/command-contract.js
|
|
24
24
|
var SCHEMA_DIALECT = "https://json-schema.org/draft/2020-12/schema";
|
|
25
25
|
var outputOf = /* @__PURE__ */ __name((command) => {
|
|
26
26
|
const entity = answerEntitySchema(command);
|
|
@@ -2,15 +2,15 @@ import { createRequire as __bundleRequire } from "node:module";
|
|
|
2
2
|
const require = __bundleRequire(import.meta.url);
|
|
3
3
|
import {
|
|
4
4
|
unit
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-AH5C3D3D.js";
|
|
6
6
|
import {
|
|
7
7
|
CliError
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-4OSSOWDM.js";
|
|
9
9
|
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.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/embeddings/remote.js
|
|
14
14
|
import { setTimeout } from "node:timers/promises";
|
|
15
15
|
var OPENAI_URL = "https://api.openai.com/v1";
|
|
16
16
|
var OPENAI_MODELS = {
|
|
@@ -2,21 +2,25 @@ import { createRequire as __bundleRequire } from "node:module";
|
|
|
2
2
|
const require = __bundleRequire(import.meta.url);
|
|
3
3
|
import {
|
|
4
4
|
errorObjectOf
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-UQLWMGSD.js";
|
|
6
6
|
import {
|
|
7
7
|
visibleControls
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-2HF2MRXI.js";
|
|
9
9
|
import {
|
|
10
10
|
LOG_ATTRIBUTE_KEYS,
|
|
11
11
|
isContentKey
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-6EY46GAN.js";
|
|
13
13
|
import {
|
|
14
14
|
getDotPath,
|
|
15
|
-
|
|
16
|
-
|
|
15
|
+
object,
|
|
16
|
+
record,
|
|
17
|
+
safeParse,
|
|
18
|
+
string,
|
|
19
|
+
unknown
|
|
20
|
+
} from "./chunk-FEZF3TII.js";
|
|
17
21
|
import {
|
|
18
22
|
CliError
|
|
19
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-4OSSOWDM.js";
|
|
20
24
|
import {
|
|
21
25
|
__commonJS,
|
|
22
26
|
__name,
|
|
@@ -70,7 +74,7 @@ var require_strip_ansi = __commonJS({
|
|
|
70
74
|
"node_modules/.pnpm/strip-ansi@6.0.1/node_modules/strip-ansi/index.js"(exports, module) {
|
|
71
75
|
"use strict";
|
|
72
76
|
var ansiRegex = require_ansi_regex();
|
|
73
|
-
module.exports = (
|
|
77
|
+
module.exports = (string2) => typeof string2 === "string" ? string2.replace(ansiRegex(), "") : string2;
|
|
74
78
|
}
|
|
75
79
|
});
|
|
76
80
|
|
|
@@ -124,18 +128,18 @@ var require_string_width = __commonJS({
|
|
|
124
128
|
var stripAnsi = require_strip_ansi();
|
|
125
129
|
var isFullwidthCodePoint = require_is_fullwidth_code_point();
|
|
126
130
|
var emojiRegex = require_emoji_regex();
|
|
127
|
-
var stringWidth = /* @__PURE__ */ __name((
|
|
128
|
-
if (typeof
|
|
131
|
+
var stringWidth = /* @__PURE__ */ __name((string2) => {
|
|
132
|
+
if (typeof string2 !== "string" || string2.length === 0) {
|
|
129
133
|
return 0;
|
|
130
134
|
}
|
|
131
|
-
|
|
132
|
-
if (
|
|
135
|
+
string2 = stripAnsi(string2);
|
|
136
|
+
if (string2.length === 0) {
|
|
133
137
|
return 0;
|
|
134
138
|
}
|
|
135
|
-
|
|
139
|
+
string2 = string2.replace(emojiRegex(), " ");
|
|
136
140
|
let width = 0;
|
|
137
|
-
for (let i = 0; i <
|
|
138
|
-
const code =
|
|
141
|
+
for (let i = 0; i < string2.length; i++) {
|
|
142
|
+
const code = string2.codePointAt(i);
|
|
139
143
|
if (code <= 31 || code >= 127 && code <= 159) {
|
|
140
144
|
continue;
|
|
141
145
|
}
|
|
@@ -1889,7 +1893,7 @@ var require_cli_table3 = __commonJS({
|
|
|
1889
1893
|
}
|
|
1890
1894
|
});
|
|
1891
1895
|
|
|
1892
|
-
// node_modules/.pnpm/@wirecat+cli-base@0.
|
|
1896
|
+
// node_modules/.pnpm/@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/keyring.js
|
|
1893
1897
|
import { createRequire } from "node:module";
|
|
1894
1898
|
var ENTRY_OPTIONS = { linux: { store: "secret-service" } };
|
|
1895
1899
|
var require2 = createRequire(new URL("keyring.js", import.meta.resolve("@wirecat/cli-base")).href);
|
|
@@ -1909,7 +1913,7 @@ var systemKeyring = {
|
|
|
1909
1913
|
delete: /* @__PURE__ */ __name((service, account) => entry(service, account).deletePassword(), "delete")
|
|
1910
1914
|
};
|
|
1911
1915
|
|
|
1912
|
-
// node_modules/.pnpm/@wirecat+cli-base@0.
|
|
1916
|
+
// node_modules/.pnpm/@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/paths.js
|
|
1913
1917
|
import { homedir, userInfo } from "node:os";
|
|
1914
1918
|
import { join, posix, win32 } from "node:path";
|
|
1915
1919
|
var PATH_KINDS = ["config", "state", "cache"];
|
|
@@ -1961,11 +1965,11 @@ var homeIsMoved = /* @__PURE__ */ __name(({ env = process.env, platform = proces
|
|
|
1961
1965
|
var isMovedRun = /* @__PURE__ */ __name((options) => pathsAreOverridden(options) || homeIsMoved(options), "isMovedRun");
|
|
1962
1966
|
var configFilePath = /* @__PURE__ */ __name((configDir, fileName = "config.json") => join(configDir, fileName), "configFilePath");
|
|
1963
1967
|
|
|
1964
|
-
// node_modules/.pnpm/@wirecat+cli-base@0.
|
|
1968
|
+
// node_modules/.pnpm/@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/credentials.js
|
|
1965
1969
|
import { readFileSync as readFileSync2 } from "node:fs";
|
|
1966
1970
|
import { join as join3, resolve } from "node:path";
|
|
1967
1971
|
|
|
1968
|
-
// node_modules/.pnpm/@wirecat+cli-base@0.
|
|
1972
|
+
// node_modules/.pnpm/@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/config.js
|
|
1969
1973
|
import { randomBytes } from "node:crypto";
|
|
1970
1974
|
import { mkdirSync, readFileSync, renameSync, rmSync, writeFileSync } from "node:fs";
|
|
1971
1975
|
import { dirname, join as join2 } from "node:path";
|
|
@@ -2009,7 +2013,7 @@ var saveConfigFile = /* @__PURE__ */ __name((path, config) => {
|
|
|
2009
2013
|
`, 384);
|
|
2010
2014
|
}, "saveConfigFile");
|
|
2011
2015
|
|
|
2012
|
-
// node_modules/.pnpm/@wirecat+cli-base@0.
|
|
2016
|
+
// node_modules/.pnpm/@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/credentials.js
|
|
2013
2017
|
var keyringService = /* @__PURE__ */ __name((service, _configDir, _isolated) => service, "keyringService");
|
|
2014
2018
|
var movedRunService = /* @__PURE__ */ __name((service, configDir) => `${service}:${resolve(configDir)}`, "movedRunService");
|
|
2015
2019
|
var warnedRuns = /* @__PURE__ */ new WeakSet();
|
|
@@ -2145,7 +2149,7 @@ var Credentials = class {
|
|
|
2145
2149
|
}
|
|
2146
2150
|
};
|
|
2147
2151
|
|
|
2148
|
-
// node_modules/.pnpm/@wirecat+cli-base@0.
|
|
2152
|
+
// node_modules/.pnpm/@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/drain.js
|
|
2149
2153
|
var waitForDrain = /* @__PURE__ */ __name((stream, signal) => {
|
|
2150
2154
|
if (signal?.aborted)
|
|
2151
2155
|
return Promise.reject(signal.reason);
|
|
@@ -2173,7 +2177,7 @@ var waitForDrain = /* @__PURE__ */ __name((stream, signal) => {
|
|
|
2173
2177
|
});
|
|
2174
2178
|
}, "waitForDrain");
|
|
2175
2179
|
|
|
2176
|
-
// node_modules/.pnpm/@wirecat+cli-base@0.
|
|
2180
|
+
// node_modules/.pnpm/@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/streams.js
|
|
2177
2181
|
var processStreams = {
|
|
2178
2182
|
drain: /* @__PURE__ */ __name(async (signal) => {
|
|
2179
2183
|
await Promise.all([waitForDrain(process.stdout, signal), waitForDrain(process.stderr, signal)]);
|
|
@@ -2202,7 +2206,7 @@ var captureStreams = /* @__PURE__ */ __name(() => {
|
|
|
2202
2206
|
};
|
|
2203
2207
|
}, "captureStreams");
|
|
2204
2208
|
|
|
2205
|
-
// node_modules/.pnpm/@wirecat+cli-base@0.
|
|
2209
|
+
// node_modules/.pnpm/@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/retry.js
|
|
2206
2210
|
var DEFAULT_RETRY = {
|
|
2207
2211
|
retries: 1,
|
|
2208
2212
|
baseDelayMs: 250,
|
|
@@ -2214,7 +2218,7 @@ var backoffMs = /* @__PURE__ */ __name((attempt, config, random) => {
|
|
|
2214
2218
|
return Math.round(random() * ceiling);
|
|
2215
2219
|
}, "backoffMs");
|
|
2216
2220
|
|
|
2217
|
-
// node_modules/.pnpm/@wirecat+cli-base@0.
|
|
2221
|
+
// node_modules/.pnpm/@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/result-fields.js
|
|
2218
2222
|
var forbidden = /* @__PURE__ */ new Set(["__proto__", "prototype", "constructor"]);
|
|
2219
2223
|
var validate = /* @__PURE__ */ __name((paths) => {
|
|
2220
2224
|
if (paths.length === 0 || paths.length > 128 || paths.some((path) => path.length > 256 || !/^[A-Za-z][A-Za-z0-9_]*(?:\.[A-Za-z][A-Za-z0-9_]*)*$/.test(path) || path.split(".").some((part) => forbidden.has(part))))
|
|
@@ -2225,14 +2229,14 @@ var fieldsOf = /* @__PURE__ */ __name((value) => {
|
|
|
2225
2229
|
validate(paths);
|
|
2226
2230
|
return [...new Set(paths)];
|
|
2227
2231
|
}, "fieldsOf");
|
|
2228
|
-
var
|
|
2232
|
+
var object2 = /* @__PURE__ */ __name((value) => value !== null && typeof value === "object" && !Array.isArray(value), "object");
|
|
2229
2233
|
var retained = /* @__PURE__ */ new Set(["operation_id", "page", "next", "missing", "meta", "coverage"]);
|
|
2230
2234
|
var itemPaths = /* @__PURE__ */ __name((paths) => paths.map((path) => path.startsWith("items.") ? path.slice(6) : path), "itemPaths");
|
|
2231
2235
|
var onePaths = /* @__PURE__ */ __name((paths) => paths.map((path) => path.startsWith("item.") ? path.slice(5) : path), "onePaths");
|
|
2232
2236
|
var select = /* @__PURE__ */ __name((value, paths) => {
|
|
2233
2237
|
if (Array.isArray(value))
|
|
2234
2238
|
return value.map((item) => select(item, paths));
|
|
2235
|
-
if (!
|
|
2239
|
+
if (!object2(value))
|
|
2236
2240
|
return value;
|
|
2237
2241
|
const result = {};
|
|
2238
2242
|
const groups = /* @__PURE__ */ new Map();
|
|
@@ -2250,9 +2254,9 @@ var select = /* @__PURE__ */ __name((value, paths) => {
|
|
|
2250
2254
|
const found = value[key];
|
|
2251
2255
|
if (children.includes(""))
|
|
2252
2256
|
result[key] = found;
|
|
2253
|
-
else if (
|
|
2257
|
+
else if (object2(found) || Array.isArray(found)) {
|
|
2254
2258
|
const selected = select(found, children);
|
|
2255
|
-
if (Array.isArray(selected) ||
|
|
2259
|
+
if (Array.isArray(selected) || object2(selected) && Object.keys(selected).length > 0)
|
|
2256
2260
|
result[key] = selected;
|
|
2257
2261
|
}
|
|
2258
2262
|
}
|
|
@@ -2264,29 +2268,29 @@ var select = /* @__PURE__ */ __name((value, paths) => {
|
|
|
2264
2268
|
var project = /* @__PURE__ */ __name((value, fields) => {
|
|
2265
2269
|
if (Array.isArray(value))
|
|
2266
2270
|
return value.map((item) => select(item, itemPaths(fields)));
|
|
2267
|
-
if (
|
|
2271
|
+
if (object2(value) && Object.hasOwn(value, "type") && value.type === "item" && Object.hasOwn(value, "data") && Object.keys(value).every((key) => ["type", "data"].includes(key)))
|
|
2268
2272
|
return { ...value, data: project(value.data, fields) };
|
|
2269
|
-
if (
|
|
2273
|
+
if (object2(value) && Object.hasOwn(value, "type") && value.type === "end" && Object.hasOwn(value, "complete") && typeof value.complete === "boolean")
|
|
2270
2274
|
return value;
|
|
2271
|
-
if (
|
|
2275
|
+
if (object2(value) && Object.hasOwn(value, "item") && (Object.hasOwn(value, "meta") || Object.keys(value).every((key) => ["item", "next", "missing"].includes(key))))
|
|
2272
2276
|
return { ...value, item: project(value.item, onePaths(fields)) };
|
|
2273
|
-
if (
|
|
2277
|
+
if (object2(value) && Array.isArray(value.items))
|
|
2274
2278
|
return { ...value, items: value.items.map((item) => select(item, itemPaths(fields))) };
|
|
2275
|
-
return select(value,
|
|
2279
|
+
return select(value, object2(value) && !Object.hasOwn(value, "items") ? itemPaths(fields) : fields);
|
|
2276
2280
|
}, "project");
|
|
2277
2281
|
var projectFields = /* @__PURE__ */ __name((value, fields) => {
|
|
2278
2282
|
validate(fields);
|
|
2279
2283
|
return project(value, fields);
|
|
2280
2284
|
}, "projectFields");
|
|
2281
2285
|
|
|
2282
|
-
// node_modules/.pnpm/@wirecat+cli-base@0.
|
|
2286
|
+
// node_modules/.pnpm/@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/batch.js
|
|
2283
2287
|
var BATCH_LIMITS = Object.freeze({
|
|
2284
2288
|
requests: 32,
|
|
2285
2289
|
input_bytes: 262144,
|
|
2286
2290
|
read_bytes: 67108864,
|
|
2287
2291
|
output_bytes: 4194304
|
|
2288
2292
|
});
|
|
2289
|
-
var
|
|
2293
|
+
var record2 = /* @__PURE__ */ __name((value) => value !== null && typeof value === "object" && !Array.isArray(value), "record");
|
|
2290
2294
|
function invalid(message) {
|
|
2291
2295
|
throw new CliError("validation_error", message);
|
|
2292
2296
|
}
|
|
@@ -2308,14 +2312,14 @@ var prepareBatch = /* @__PURE__ */ __name((input, handlers) => {
|
|
|
2308
2312
|
} catch {
|
|
2309
2313
|
invalid("batch input must be a JSON object with requests");
|
|
2310
2314
|
}
|
|
2311
|
-
if (!
|
|
2315
|
+
if (!record2(value) || Object.keys(value).some((key) => key !== "requests") || !Array.isArray(value.requests))
|
|
2312
2316
|
invalid("batch input must contain only a requests array");
|
|
2313
2317
|
const requests = value.requests;
|
|
2314
2318
|
if (requests.length < 1 || requests.length > BATCH_LIMITS.requests)
|
|
2315
2319
|
invalid("batch takes 1\u201332 requests");
|
|
2316
2320
|
const ids = /* @__PURE__ */ new Set();
|
|
2317
2321
|
return requests.map((request) => {
|
|
2318
|
-
if (!
|
|
2322
|
+
if (!record2(request) || Object.keys(request).some((key) => !["id", "command", "args"].includes(key)) || typeof request.id !== "string" || !/^[A-Za-z0-9][A-Za-z0-9_.:-]{0,63}$/.test(request.id) || ids.has(request.id) || !Array.isArray(request.command) || request.command.length < 1 || request.command.length > 8 || request.command.some((word) => typeof word !== "string" || !/^[a-z][a-z0-9-]{0,63}$/.test(word)) || !Array.isArray(request.args) || request.args.length > 128 || request.args.some((arg) => typeof arg !== "string" || arg.includes("\0")))
|
|
2319
2323
|
invalid("each batch request needs a unique id, registered command path and string args array");
|
|
2320
2324
|
const id = request.id;
|
|
2321
2325
|
const command = [...request.command];
|
|
@@ -2337,10 +2341,10 @@ var runBatch = /* @__PURE__ */ __name(async (requests, options = {}) => {
|
|
|
2337
2341
|
if (maxOutputBytes < 8192 + requests.length * 2048)
|
|
2338
2342
|
invalid("batch output budget cannot hold its result framing");
|
|
2339
2343
|
const errorOf = /* @__PURE__ */ __name((error) => {
|
|
2340
|
-
const
|
|
2344
|
+
const object3 = errorObjectOf(error, options.failureContext).error;
|
|
2341
2345
|
try {
|
|
2342
|
-
if (Buffer.byteLength(JSON.stringify(
|
|
2343
|
-
return
|
|
2346
|
+
if (Buffer.byteLength(JSON.stringify(object3), "utf8") <= 512)
|
|
2347
|
+
return object3;
|
|
2344
2348
|
} catch {
|
|
2345
2349
|
}
|
|
2346
2350
|
const fallback = errorObjectOf(error).error;
|
|
@@ -2385,11 +2389,11 @@ var runBatch = /* @__PURE__ */ __name(async (requests, options = {}) => {
|
|
|
2385
2389
|
}
|
|
2386
2390
|
} catch (error) {
|
|
2387
2391
|
options.signal?.throwIfAborted();
|
|
2388
|
-
const
|
|
2392
|
+
const object3 = errorOf(error);
|
|
2389
2393
|
result = {
|
|
2390
2394
|
...framing,
|
|
2391
|
-
status:
|
|
2392
|
-
error:
|
|
2395
|
+
status: object3.reason === "batch.read-budget" ? "not_run" : "error",
|
|
2396
|
+
error: object3,
|
|
2393
2397
|
complete: false
|
|
2394
2398
|
};
|
|
2395
2399
|
}
|
|
@@ -2406,7 +2410,62 @@ var runBatch = /* @__PURE__ */ __name(async (requests, options = {}) => {
|
|
|
2406
2410
|
};
|
|
2407
2411
|
}, "runBatch");
|
|
2408
2412
|
|
|
2409
|
-
// node_modules/.pnpm/@wirecat+cli-base@0.
|
|
2413
|
+
// node_modules/.pnpm/@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/constants.js
|
|
2414
|
+
import { fileURLToPath } from "node:url";
|
|
2415
|
+
var BASE_CONSTANTS = new URL("../constants.json", new URL("constants.js", import.meta.resolve("@wirecat/cli-base")).href);
|
|
2416
|
+
var baseConstantsSchema = object({});
|
|
2417
|
+
var LayerSchema = record(string(), unknown());
|
|
2418
|
+
var isPlainObject = /* @__PURE__ */ __name((value) => typeof value === "object" && value !== null && !Array.isArray(value), "isPlainObject");
|
|
2419
|
+
var merge = /* @__PURE__ */ __name((into, from, file, setBy, prefix = "") => {
|
|
2420
|
+
const out = { ...into };
|
|
2421
|
+
for (const [key, value] of Object.entries(from)) {
|
|
2422
|
+
const path = prefix ? `${prefix}.${key}` : key;
|
|
2423
|
+
const current = out[key];
|
|
2424
|
+
if (isPlainObject(current) && isPlainObject(value)) {
|
|
2425
|
+
out[key] = merge(current, value, file, setBy, path);
|
|
2426
|
+
} else {
|
|
2427
|
+
out[key] = value;
|
|
2428
|
+
setBy.set(path, file);
|
|
2429
|
+
}
|
|
2430
|
+
}
|
|
2431
|
+
return out;
|
|
2432
|
+
}, "merge");
|
|
2433
|
+
var deepFreeze = /* @__PURE__ */ __name((value) => {
|
|
2434
|
+
if (typeof value === "object" && value !== null && !Object.isFrozen(value)) {
|
|
2435
|
+
for (const child of Object.values(value))
|
|
2436
|
+
deepFreeze(child);
|
|
2437
|
+
Object.freeze(value);
|
|
2438
|
+
}
|
|
2439
|
+
return value;
|
|
2440
|
+
}, "deepFreeze");
|
|
2441
|
+
var fileOf = /* @__PURE__ */ __name((path, setBy, files) => {
|
|
2442
|
+
for (let at = path.split("."); at.length > 0; at = at.slice(0, -1)) {
|
|
2443
|
+
const file = setBy.get(at.join("."));
|
|
2444
|
+
if (file)
|
|
2445
|
+
return `set in ${file}`;
|
|
2446
|
+
}
|
|
2447
|
+
return `not set in ${files.join(", ")}`;
|
|
2448
|
+
}, "fileOf");
|
|
2449
|
+
var loadConstants = /* @__PURE__ */ __name((layers, schema) => {
|
|
2450
|
+
const files = layers.map((layer) => fileURLToPath(layer));
|
|
2451
|
+
const setBy = /* @__PURE__ */ new Map();
|
|
2452
|
+
let merged = {};
|
|
2453
|
+
for (const file of files) {
|
|
2454
|
+
merged = merge(merged, loadConfigFile(file, LayerSchema, () => ({})), file, setBy);
|
|
2455
|
+
}
|
|
2456
|
+
const result = safeParse(schema, merged);
|
|
2457
|
+
if (!result.success) {
|
|
2458
|
+
const problems = result.issues.map((issue) => {
|
|
2459
|
+
const path = getDotPath(issue) ?? "(root)";
|
|
2460
|
+
return `${path}: ${issue.message} (${fileOf(path, setBy, files)})`;
|
|
2461
|
+
});
|
|
2462
|
+
throw new Error(`the packaged constants are not valid:
|
|
2463
|
+
${problems.join("\n ")}`);
|
|
2464
|
+
}
|
|
2465
|
+
return deepFreeze(result.output);
|
|
2466
|
+
}, "loadConstants");
|
|
2467
|
+
|
|
2468
|
+
// node_modules/.pnpm/@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/time.js
|
|
2410
2469
|
var abortError = /* @__PURE__ */ __name(() => new DOMException("The operation was aborted.", "AbortError"), "abortError");
|
|
2411
2470
|
var realSleep = /* @__PURE__ */ __name((ms, signal) => new Promise((resolve2, reject) => {
|
|
2412
2471
|
if (signal?.aborted) {
|
|
@@ -2420,7 +2479,7 @@ var realSleep = /* @__PURE__ */ __name((ms, signal) => new Promise((resolve2, re
|
|
|
2420
2479
|
}, { once: true });
|
|
2421
2480
|
}), "realSleep");
|
|
2422
2481
|
|
|
2423
|
-
// node_modules/.pnpm/@wirecat+cli-base@0.
|
|
2482
|
+
// node_modules/.pnpm/@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/logging.js
|
|
2424
2483
|
import { appendFileSync } from "node:fs";
|
|
2425
2484
|
var REDACTED_FIELDS = [
|
|
2426
2485
|
"authorization",
|
|
@@ -2476,7 +2535,7 @@ var createRecordLog = /* @__PURE__ */ __name(({ to, runId, command, resource, tr
|
|
|
2476
2535
|
const at = /* @__PURE__ */ __name((severity) => (
|
|
2477
2536
|
// A message is a sentence, and a sentence can quote content; the record names its event instead.
|
|
2478
2537
|
(event, _message) => {
|
|
2479
|
-
const
|
|
2538
|
+
const record3 = logRecordOf({
|
|
2480
2539
|
severity,
|
|
2481
2540
|
event,
|
|
2482
2541
|
time: now().toISOString(),
|
|
@@ -2487,7 +2546,7 @@ var createRecordLog = /* @__PURE__ */ __name(({ to, runId, command, resource, tr
|
|
|
2487
2546
|
allow,
|
|
2488
2547
|
redact
|
|
2489
2548
|
});
|
|
2490
|
-
write(`${JSON.stringify(
|
|
2549
|
+
write(`${JSON.stringify(record3)}
|
|
2491
2550
|
`);
|
|
2492
2551
|
}
|
|
2493
2552
|
), "at");
|
|
@@ -2515,7 +2574,7 @@ var silent = {
|
|
|
2515
2574
|
}, "error")
|
|
2516
2575
|
};
|
|
2517
2576
|
|
|
2518
|
-
// node_modules/.pnpm/@wirecat+cli-base@0.
|
|
2577
|
+
// node_modules/.pnpm/@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/pretty.js
|
|
2519
2578
|
var import_cli_table3 = __toESM(require_cli_table3(), 1);
|
|
2520
2579
|
import { styleText } from "node:util";
|
|
2521
2580
|
var renderPretty = /* @__PURE__ */ __name((value, options) => {
|
|
@@ -2525,7 +2584,7 @@ var renderPretty = /* @__PURE__ */ __name((value, options) => {
|
|
|
2525
2584
|
return paint2.dim("(nothing)");
|
|
2526
2585
|
return isRowLike(value) ? renderTable(value, paint2) : renderJson(value);
|
|
2527
2586
|
}
|
|
2528
|
-
if (
|
|
2587
|
+
if (isPlainObject2(value)) {
|
|
2529
2588
|
const listKey = Object.keys(value).find((key) => Array.isArray(value[key]) && isRowLike(value[key]));
|
|
2530
2589
|
if (listKey) {
|
|
2531
2590
|
const rest = Object.fromEntries(Object.entries(value).filter(([key]) => key !== listKey));
|
|
@@ -2544,8 +2603,8 @@ var palette = /* @__PURE__ */ __name((color) => ({
|
|
|
2544
2603
|
bold: paint("bold", color),
|
|
2545
2604
|
label: paint("cyan", color)
|
|
2546
2605
|
}), "palette");
|
|
2547
|
-
var
|
|
2548
|
-
var isRowLike = /* @__PURE__ */ __name((value) => value.length > 0 && value.every((item) =>
|
|
2606
|
+
var isPlainObject2 = /* @__PURE__ */ __name((value) => typeof value === "object" && value !== null && !Array.isArray(value), "isPlainObject");
|
|
2607
|
+
var isRowLike = /* @__PURE__ */ __name((value) => value.length > 0 && value.every((item) => isPlainObject2(item)) && value.length <= 500, "isRowLike");
|
|
2549
2608
|
var renderTable = /* @__PURE__ */ __name((rows, paint2) => {
|
|
2550
2609
|
const columns = [...new Set(rows.flatMap((row) => Object.keys(row)))];
|
|
2551
2610
|
const table = new import_cli_table3.default({
|
|
@@ -2589,7 +2648,7 @@ var BORDERLESS = {
|
|
|
2589
2648
|
middle: ""
|
|
2590
2649
|
};
|
|
2591
2650
|
|
|
2592
|
-
// node_modules/.pnpm/@wirecat+cli-base@0.
|
|
2651
|
+
// node_modules/.pnpm/@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/renderer.js
|
|
2593
2652
|
var createRenderer = /* @__PURE__ */ __name(({ format, color, streams = processStreams, quiet = false }) => {
|
|
2594
2653
|
const mark = /* @__PURE__ */ __name((symbol, message) => format === "pretty" ? `${symbol} ${visibleControls(message)}` : visibleControls(message), "mark");
|
|
2595
2654
|
const say = /* @__PURE__ */ __name((symbol) => (message) => {
|
|
@@ -2635,6 +2694,9 @@ export {
|
|
|
2635
2694
|
writeSecurely,
|
|
2636
2695
|
loadConfigFile,
|
|
2637
2696
|
saveConfigFile,
|
|
2697
|
+
BASE_CONSTANTS,
|
|
2698
|
+
baseConstantsSchema,
|
|
2699
|
+
loadConstants,
|
|
2638
2700
|
systemKeyring,
|
|
2639
2701
|
resolvePaths,
|
|
2640
2702
|
pathsAreOverridden,
|