@wirecat/drive-cli 0.68.0 → 0.69.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/bundle/{all-profiles-BU6XUFUP.js → all-profiles-B4A737YW.js} +20 -30
- package/dist/bundle/{anthropic-ZP5B7S2Z.js → anthropic-RZGPDESM.js} +3 -3
- package/dist/bundle/{app-server-EB4DH6T7.js → app-server-OWEW7DY5.js} +47 -63
- package/dist/bundle/{bun-PWMM6L45.js → bun-V5QLYBZU.js} +2 -2
- package/dist/bundle/{bun-sqlite-6VPR2SVC.js → bun-sqlite-KHLHXXGH.js} +4 -4
- package/dist/bundle/{chunk-7TNQZKRD.js → chunk-22SH77TG.js} +65 -64
- package/dist/bundle/{chunk-MLSXHTUB.js → chunk-25FT44S3.js} +1480 -464
- package/dist/bundle/{chunk-5G2BY4B6.js → chunk-2DS2TDGW.js} +29 -28
- package/dist/bundle/{chunk-PGPHEC2X.js → chunk-2Q4CB4EI.js} +1 -1
- package/dist/bundle/{chunk-74NCZKRW.js → chunk-2VFAXC6O.js} +13 -13
- package/dist/bundle/{chunk-NV75QPML.js → chunk-376ZGVUZ.js} +4 -4
- package/dist/bundle/{chunk-6WAC2LOS.js → chunk-3RLRJHAI.js} +1558 -928
- package/dist/bundle/{chunk-QVJMFZFW.js → chunk-3URYKAJP.js} +1 -1
- package/dist/bundle/{chunk-UYBLNGZ2.js → chunk-3YKAFLXY.js} +1 -1
- package/dist/bundle/{chunk-CMWFYZ45.js → chunk-4J5GJJ2I.js} +1 -1
- package/dist/bundle/{chunk-QKY24RWV.js → chunk-4YECZ6CN.js} +11 -11
- package/dist/bundle/{chunk-FAMXUI2X.js → chunk-4ZFO2CVH.js} +4 -4
- package/dist/bundle/{chunk-IVOG6T6P.js → chunk-533XOW74.js} +2 -2
- package/dist/bundle/{chunk-Q6BD6RUH.js → chunk-5B5NOAIA.js} +100 -55
- package/dist/bundle/{chunk-MW46BLWH.js → chunk-5SJZDEIO.js} +2 -0
- package/dist/bundle/{chunk-CVAJMRRD.js → chunk-6D44YQ5X.js} +5 -5
- package/dist/bundle/{chunk-EOC7RHJ2.js → chunk-6EL5AVXX.js} +3 -5
- package/dist/bundle/{chunk-TI2OANJZ.js → chunk-6XNTELM5.js} +1 -1
- package/dist/bundle/{chunk-WUFZGPXX.js → chunk-AD7VI3XU.js} +6 -6
- package/dist/bundle/{chunk-YUGTJBV3.js → chunk-AMQGKMLZ.js} +2 -2
- package/dist/bundle/{chunk-SOS4U2RF.js → chunk-BBJVV4E2.js} +24 -25
- package/dist/bundle/{chunk-JMZQBRRZ.js → chunk-BVVXYZSU.js} +5 -5
- package/dist/bundle/{chunk-AIEMFRBU.js → chunk-CAQ5GW3A.js} +1 -1
- package/dist/bundle/{chunk-PWIEOATY.js → chunk-CDSB7WVG.js} +323 -12
- package/dist/bundle/{chunk-KPKIHJIT.js → chunk-CU6RATZH.js} +3 -3
- package/dist/bundle/{chunk-43NEDPXB.js → chunk-CZ4UEXCE.js} +4 -4
- package/dist/bundle/{chunk-UFPRP7MG.js → chunk-E7URRFBB.js} +7 -7
- package/dist/bundle/{chunk-YYIWPH53.js → chunk-EL2E3ABX.js} +12 -12
- package/dist/bundle/{chunk-MWCPKUU4.js → chunk-EWUQIUTB.js} +4 -4
- package/dist/bundle/{chunk-7A77GYCE.js → chunk-F5UUJU6R.js} +2 -2
- package/dist/bundle/{chunk-O7T3WGCV.js → chunk-GHFBT2ZM.js} +4 -4
- package/dist/bundle/{chunk-7BXVI7XF.js → chunk-GK6KXBL6.js} +1 -1
- package/dist/bundle/{chunk-5W65QTYS.js → chunk-GTDCP5OG.js} +3 -3
- package/dist/bundle/{chunk-GTLXBAJV.js → chunk-HEBZCKMU.js} +1669 -662
- package/dist/bundle/{chunk-AXYG2DDY.js → chunk-I55XYREN.js} +636 -227
- package/dist/bundle/{chunk-UUQJVKPB.js → chunk-IQ2QU2X6.js} +1608 -1096
- package/dist/bundle/{chunk-ULNN3LCY.js → chunk-KUQDBWPU.js} +40 -32
- package/dist/bundle/{chunk-6QR7NKMG.js → chunk-L342KHIZ.js} +105 -1
- package/dist/bundle/{chunk-DYLYH7VE.js → chunk-LRCSDAYK.js} +3 -3
- package/dist/bundle/{chunk-QTRYJZL7.js → chunk-LUZRVBQR.js} +4 -4
- package/dist/bundle/{chunk-PJ3FKBXG.js → chunk-MHXZ62CU.js} +1 -1
- package/dist/bundle/{chunk-WGX4DZPW.js → chunk-N4ACIIQB.js} +2 -2
- package/dist/bundle/{chunk-DU23ET2O.js → chunk-NVDR72GP.js} +19 -19
- package/dist/bundle/{chunk-F7KAMSXA.js → chunk-O6PD7RZY.js} +2 -2
- package/dist/bundle/{chunk-JZ3MT7IE.js → chunk-OOIAJRKQ.js} +1 -1
- package/dist/bundle/{chunk-ZVQDOKDY.js → chunk-OUM4ZO53.js} +1 -1
- package/dist/bundle/{chunk-ZSVMZH5O.js → chunk-PB6NWKH3.js} +2 -2
- package/dist/bundle/{chunk-EEE4H2PA.js → chunk-QJGFQRTL.js} +10 -10
- package/dist/bundle/chunk-RLGQMMYE.js +707 -0
- package/dist/bundle/{chunk-CRIEW4FP.js → chunk-RWQ7T4Y5.js} +2 -2
- package/dist/bundle/{chunk-EXWZCI5G.js → chunk-SEJBS7SI.js} +1 -1
- package/dist/bundle/{chunk-CK2SQ2CE.js → chunk-SY2HLH5R.js} +32 -19
- package/dist/bundle/{chunk-6HFZZ2PW.js → chunk-SYUXKV2E.js} +1 -1
- package/dist/bundle/{chunk-ZAIE3G5I.js → chunk-T4FMXDDV.js} +2 -2
- package/dist/bundle/{chunk-U52QE4QV.js → chunk-T6X6EZ5N.js} +3 -3
- package/dist/bundle/{chunk-Z5BMYI2V.js → chunk-TZ75K6R7.js} +6 -6
- package/dist/bundle/{chunk-D4MVEOU2.js → chunk-U3RXH6RY.js} +1 -1
- package/dist/bundle/{chunk-QRSPFCRY.js → chunk-V4FMN5A6.js} +16 -16
- package/dist/bundle/{chunk-QWGEOQHA.js → chunk-VUPWDCYV.js} +1 -1
- package/dist/bundle/{chunk-WCNTDETD.js → chunk-WNMPIRRF.js} +98 -6
- package/dist/bundle/{chunk-RT5NT62B.js → chunk-WOUIHZRI.js} +13 -15
- package/dist/bundle/{chunk-UIKVP23D.js → chunk-WQOGHND4.js} +1 -1
- package/dist/bundle/{chunk-2VYEGKQ3.js → chunk-XUHQ7DVT.js} +1 -1
- package/dist/bundle/{chunk-DIZBJLPM.js → chunk-XVH3WZSZ.js} +45 -55
- package/dist/bundle/{chunk-MOKEB656.js → chunk-ZBYKCVSV.js} +1 -1
- package/dist/bundle/{chunk-BXHFJTU5.js → chunk-ZUG67442.js} +2 -2
- package/dist/bundle/{cli-L7P36YUH.js → cli-BS4L3HAP.js} +100 -70
- package/dist/bundle/{command-contract-EYFGMKIG.js → command-contract-HYURWSD6.js} +16 -17
- package/dist/bundle/{command-server-entry-H3VGPOLJ.js → command-server-entry-CJ2CV7ZV.js} +23 -24
- package/dist/bundle/{decode-JEU6JWCV.js → decode-E2NM5SSM.js} +3 -3
- package/dist/bundle/drive.js +4 -4
- package/dist/bundle/{echarts-SDZA2SWG.js → echarts-QIXLXS3G.js} +2 -2
- package/dist/bundle/{embed-WUKOASQG.js → embed-YNZW5X6M.js} +4 -4
- package/dist/bundle/{embedder-UBRAXRDZ.js → embedder-LRC2PKTS.js} +7 -7
- package/dist/bundle/{entry-C4NUQFTF.js → entry-2IMSWRJU.js} +7 -7
- package/dist/bundle/{first-run-PKHBS7B4.js → first-run-7CPHQDM5.js} +7 -7
- package/dist/bundle/first-screen-OKZ7GMFR.js +38 -0
- package/dist/bundle/{google-XXHSMTVK.js → google-WDKDBDD4.js} +15 -15
- package/dist/bundle/{google-api-SQQ4BSNR.js → google-api-7JDZDCWE.js} +52 -53
- package/dist/bundle/{grants-2U4JVT6O.js → grants-AU25GWKF.js} +57 -58
- package/dist/bundle/{identity-SRL6RSU2.js → identity-E43WKN5F.js} +1 -1
- package/dist/bundle/{instructions-7T6JJIFS.js → instructions-MD2RZT5Z.js} +1 -1
- package/dist/bundle/{login-N243GGEE.js → login-RBDJPQAG.js} +57 -58
- package/dist/bundle/{node-BZDMUFTW.js → node-IEVT2FSJ.js} +2 -2
- package/dist/bundle/{node-sqlite-SZQCCMV2.js → node-sqlite-IENH4TRX.js} +5 -5
- package/dist/bundle/{oauth-CMAFXX6A.js → oauth-3JGSN47Z.js} +5 -5
- package/dist/bundle/{open-RVTPKDA3.js → open-TZ5H7NYM.js} +3 -3
- package/dist/bundle/{openai-6NN63BMH.js → openai-XF2KB7W2.js} +14 -14
- package/dist/bundle/{process-756VBE7E.js → process-6Q23D3TO.js} +1 -1
- package/dist/bundle/{program-B4QBJYB5.js → program-D5XWOHV5.js} +86 -89
- package/dist/bundle/{prompt-HGP2DSRW.js → prompt-KUC5D4GX.js} +3 -3
- package/dist/bundle/{recognize-26SHB7HI.js → recognize-DPFW7HO3.js} +2 -2
- package/dist/bundle/{remote-Z4PWHZ5N.js → remote-MODTSUNH.js} +8 -8
- package/dist/bundle/{rerank-QHJZJK3Q.js → rerank-JK7SERLE.js} +5 -5
- package/dist/bundle/{serve-MYJW5IEM.js → serve-BV2WHZLW.js} +7 -7
- package/dist/bundle/server-6YDI4Y36.js +72 -0
- package/dist/bundle/{server-XFW3V7CR.js → server-N3WPEU7Z.js} +45 -44
- package/dist/bundle/{services-IQG2RVTO.js → services-SV6CFUCS.js} +42 -27
- package/dist/bundle/{sqlite-runtime-X4GB5PBV.js → sqlite-runtime-RZ5PLZVQ.js} +4 -4
- package/dist/bundle/{state-ATQK2X3W.js → state-RAZIREVG.js} +4 -4
- package/dist/bundle/{store-QUBUPK6F.js → store-2DLGLYS6.js} +18 -14
- package/dist/bundle/{store-MEHEUOJH.js → store-DQKJKX2G.js} +12 -12
- package/dist/bundle/store-maintenance-command-UJ5F5L4H.js +64 -0
- package/dist/bundle/tokens-LY3WML55.js +110 -0
- package/dist/policy.d.ts +1 -1
- package/dist/policy.d.ts.map +1 -1
- package/dist/policy.js +3 -3
- package/dist/policy.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +2 -2
- package/dist/bundle/chunk-2UHQVRH2.js +0 -1235
- package/dist/bundle/chunk-J5LXL435.js +0 -1316
- package/dist/bundle/chunk-R5FTCNLJ.js +0 -76
- package/dist/bundle/first-screen-QOVOM4BF.js +0 -39
- package/dist/bundle/server-HBZPIHDX.js +0 -74
- package/dist/bundle/store-maintenance-command-33ULVDWY.js +0 -65
- package/dist/bundle/tokens-A2GP4F34.js +0 -111
|
@@ -2,41 +2,39 @@ import { createRequire as __bundleRequire } from "node:module";
|
|
|
2
2
|
const require = __bundleRequire(import.meta.url);
|
|
3
3
|
import {
|
|
4
4
|
DOC
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-NVDR72GP.js";
|
|
6
6
|
import {
|
|
7
7
|
operations
|
|
8
8
|
} from "./chunk-NYECVHFH.js";
|
|
9
9
|
import {
|
|
10
10
|
privateFiles
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-IQ2QU2X6.js";
|
|
12
12
|
import {
|
|
13
13
|
commandPathKey,
|
|
14
14
|
commandPermissions
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-2DS2TDGW.js";
|
|
16
16
|
import {
|
|
17
17
|
listQuery,
|
|
18
18
|
queryTerms,
|
|
19
19
|
typedQuery,
|
|
20
20
|
withQuery
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-HEBZCKMU.js";
|
|
22
22
|
import {
|
|
23
23
|
AI_ENTRIES,
|
|
24
|
+
LEVELS,
|
|
24
25
|
answerEntity,
|
|
25
26
|
checkConfigText,
|
|
26
27
|
issueMessage,
|
|
27
28
|
settingsFor,
|
|
28
29
|
usableProfileName,
|
|
29
30
|
withSettingDefaults
|
|
30
|
-
} from "./chunk-
|
|
31
|
-
import {
|
|
32
|
-
LEVELS
|
|
33
|
-
} from "./chunk-J5LXL435.js";
|
|
31
|
+
} from "./chunk-25FT44S3.js";
|
|
34
32
|
import {
|
|
35
33
|
note
|
|
36
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-533XOW74.js";
|
|
37
35
|
import {
|
|
38
36
|
MAX_TEXT_CHARS
|
|
39
|
-
} from "./chunk-
|
|
37
|
+
} from "./chunk-ZUG67442.js";
|
|
40
38
|
import {
|
|
41
39
|
dateRange,
|
|
42
40
|
queryError,
|
|
@@ -45,14 +43,14 @@ import {
|
|
|
45
43
|
} from "./chunk-UPCEHSIZ.js";
|
|
46
44
|
import {
|
|
47
45
|
DRIVE_APP
|
|
48
|
-
} from "./chunk-
|
|
46
|
+
} from "./chunk-SYUXKV2E.js";
|
|
49
47
|
import {
|
|
50
48
|
BASE_CONSTANTS,
|
|
51
49
|
baseConstantsSchema,
|
|
52
50
|
loadConstants,
|
|
53
51
|
resolvePaths,
|
|
54
52
|
saveConfigFile
|
|
55
|
-
} from "./chunk-
|
|
53
|
+
} from "./chunk-5SJZDEIO.js";
|
|
56
54
|
import {
|
|
57
55
|
array,
|
|
58
56
|
boolean,
|
|
@@ -88,7 +86,7 @@ import {
|
|
|
88
86
|
__name
|
|
89
87
|
} from "./chunk-ZVVMGPBJ.js";
|
|
90
88
|
|
|
91
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
89
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/oauth/client-file.js
|
|
92
90
|
import { readFileSync } from "node:fs";
|
|
93
91
|
var readClientFile = /* @__PURE__ */ __name((location, options = {}) => {
|
|
94
92
|
if (!options.shipped && typeof location === "string") {
|
|
@@ -109,7 +107,7 @@ var readClientFile = /* @__PURE__ */ __name((location, options = {}) => {
|
|
|
109
107
|
}
|
|
110
108
|
}, "readClientFile");
|
|
111
109
|
|
|
112
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
110
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/constants/obscure.js
|
|
113
111
|
import { createDecipheriv } from "node:crypto";
|
|
114
112
|
var KEY = Buffer.from("d43012779aa2dded3e98092a3dbcf5d8980c564172f5ce0a5fd0574e5f740339", "hex");
|
|
115
113
|
var reveal = /* @__PURE__ */ __name((obscured) => {
|
|
@@ -118,7 +116,7 @@ var reveal = /* @__PURE__ */ __name((obscured) => {
|
|
|
118
116
|
return Buffer.concat([decipher.update(bytes.subarray(16)), decipher.final()]).toString("utf8");
|
|
119
117
|
}, "reveal");
|
|
120
118
|
|
|
121
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
119
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/constants/index.js
|
|
122
120
|
var CORE_CONSTANTS = new URL("../../constants.json", new URL("constants/index.js", import.meta.resolve("@wirecat/cli-core")).href);
|
|
123
121
|
var constantsSchema = object({
|
|
124
122
|
...baseConstantsSchema.entries,
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
__name
|
|
5
5
|
} from "./chunk-ZVVMGPBJ.js";
|
|
6
6
|
|
|
7
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/background/processes.js
|
|
8
8
|
import { execFileSync } from "node:child_process";
|
|
9
9
|
import { readdirSync, readFileSync, readlinkSync } from "node:fs";
|
|
10
10
|
var alive = /* @__PURE__ */ __name((pid) => {
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
__name
|
|
5
5
|
} from "./chunk-ZVVMGPBJ.js";
|
|
6
6
|
|
|
7
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/cli/command-server-argv.js
|
|
8
8
|
var COMMAND_SERVER_ARGV = ["commands", "--serve"];
|
|
9
9
|
var isCommandServer = /* @__PURE__ */ __name((args) => args.length === COMMAND_SERVER_ARGV.length && COMMAND_SERVER_ARGV.every((word, at) => args[at] === word), "isCommandServer");
|
|
10
10
|
|
|
@@ -20,7 +20,7 @@ import {
|
|
|
20
20
|
tool,
|
|
21
21
|
toolKey,
|
|
22
22
|
toolsFromCommands
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-BBJVV4E2.js";
|
|
24
24
|
import {
|
|
25
25
|
CHART_KINDS,
|
|
26
26
|
CHART_SIZE,
|
|
@@ -33,96 +33,94 @@ import {
|
|
|
33
33
|
refuseWriteBeforeConnecting,
|
|
34
34
|
registerPrompts,
|
|
35
35
|
syncsFirst
|
|
36
|
-
} from "./chunk-
|
|
36
|
+
} from "./chunk-KUQDBWPU.js";
|
|
37
37
|
import {
|
|
38
38
|
agentJson,
|
|
39
39
|
skillResource
|
|
40
|
-
} from "./chunk-
|
|
40
|
+
} from "./chunk-SY2HLH5R.js";
|
|
41
41
|
import {
|
|
42
42
|
instructions
|
|
43
|
-
} from "./chunk-
|
|
44
|
-
import {
|
|
45
|
-
answeredWire
|
|
46
|
-
} from "./chunk-R5FTCNLJ.js";
|
|
43
|
+
} from "./chunk-CAQ5GW3A.js";
|
|
47
44
|
import {
|
|
48
45
|
StdioServerTransport,
|
|
46
|
+
answeredWire,
|
|
49
47
|
callerOf,
|
|
50
48
|
callingAgent,
|
|
51
49
|
serveStdio
|
|
52
|
-
} from "./chunk-
|
|
50
|
+
} from "./chunk-WNMPIRRF.js";
|
|
53
51
|
import {
|
|
54
52
|
McpServer,
|
|
55
53
|
ResourceTemplate
|
|
56
54
|
} from "./chunk-5D4AEUVA.js";
|
|
57
55
|
import {
|
|
58
56
|
connectedFor
|
|
59
|
-
} from "./chunk-
|
|
57
|
+
} from "./chunk-2DS2TDGW.js";
|
|
60
58
|
import {
|
|
61
59
|
lackedNeed,
|
|
62
60
|
wholeList
|
|
63
|
-
} from "./chunk-
|
|
61
|
+
} from "./chunk-RLGQMMYE.js";
|
|
64
62
|
import {
|
|
65
63
|
capability,
|
|
66
64
|
dateWindow,
|
|
67
65
|
guardFor,
|
|
68
66
|
servicesFor,
|
|
69
67
|
storedDeps
|
|
70
|
-
} from "./chunk-
|
|
68
|
+
} from "./chunk-HEBZCKMU.js";
|
|
71
69
|
import {
|
|
72
70
|
imageSize
|
|
73
|
-
} from "./chunk-
|
|
71
|
+
} from "./chunk-5B5NOAIA.js";
|
|
74
72
|
import {
|
|
75
73
|
mcpHttpMarker
|
|
76
|
-
} from "./chunk-
|
|
74
|
+
} from "./chunk-376ZGVUZ.js";
|
|
77
75
|
import {
|
|
78
76
|
warmEmbedders
|
|
79
|
-
} from "./chunk-
|
|
77
|
+
} from "./chunk-EWUQIUTB.js";
|
|
80
78
|
import {
|
|
81
79
|
stdinFieldOf
|
|
82
|
-
} from "./chunk-
|
|
80
|
+
} from "./chunk-MHXZ62CU.js";
|
|
83
81
|
import {
|
|
84
82
|
findCommand
|
|
85
|
-
} from "./chunk-
|
|
83
|
+
} from "./chunk-6EL5AVXX.js";
|
|
86
84
|
import {
|
|
87
85
|
DEFAULT_OUTPUT_BYTES,
|
|
88
86
|
changesAuthorityAt,
|
|
89
87
|
describeProgram,
|
|
90
88
|
environmentOf,
|
|
89
|
+
fetchesAt,
|
|
91
90
|
fetchesOnlyAt,
|
|
92
91
|
itemOf,
|
|
93
92
|
judgedTargets,
|
|
93
|
+
levelFor,
|
|
94
|
+
readKeysForCommand,
|
|
94
95
|
readsOverMcpAt,
|
|
95
96
|
recalledAccount,
|
|
96
97
|
rootOf2 as rootOf,
|
|
97
98
|
sealed,
|
|
98
99
|
snakeKeys
|
|
99
|
-
} from "./chunk-
|
|
100
|
+
} from "./chunk-25FT44S3.js";
|
|
100
101
|
import {
|
|
101
102
|
withCaller
|
|
102
|
-
} from "./chunk-
|
|
103
|
-
import {
|
|
104
|
-
levelFor,
|
|
105
|
-
readKeysForCommand
|
|
106
|
-
} from "./chunk-J5LXL435.js";
|
|
103
|
+
} from "./chunk-AD7VI3XU.js";
|
|
107
104
|
import {
|
|
108
105
|
readOnlyLockOf
|
|
109
|
-
} from "./chunk-
|
|
106
|
+
} from "./chunk-ZBYKCVSV.js";
|
|
110
107
|
import {
|
|
111
108
|
openStore
|
|
112
|
-
} from "./chunk-
|
|
109
|
+
} from "./chunk-3RLRJHAI.js";
|
|
113
110
|
import {
|
|
114
111
|
pdfPreviewLimits
|
|
115
|
-
} from "./chunk-
|
|
112
|
+
} from "./chunk-ZUG67442.js";
|
|
116
113
|
import {
|
|
117
114
|
typedCommand
|
|
118
|
-
} from "./chunk-
|
|
115
|
+
} from "./chunk-I55XYREN.js";
|
|
119
116
|
import {
|
|
120
117
|
timezoneOf
|
|
121
118
|
} from "./chunk-UPCEHSIZ.js";
|
|
122
119
|
import {
|
|
123
120
|
isCliFailure
|
|
124
|
-
} from "./chunk-
|
|
121
|
+
} from "./chunk-3YKAFLXY.js";
|
|
125
122
|
import {
|
|
123
|
+
errorObjectOf,
|
|
126
124
|
mcpErrorResult
|
|
127
125
|
} from "./chunk-PV3AWPHR.js";
|
|
128
126
|
import {
|
|
@@ -150,10 +148,10 @@ import {
|
|
|
150
148
|
__name
|
|
151
149
|
} from "./chunk-ZVVMGPBJ.js";
|
|
152
150
|
|
|
153
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
151
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/mcp/server.js
|
|
154
152
|
import { randomUUID } from "node:crypto";
|
|
155
153
|
|
|
156
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
154
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/mcp/agent-log.js
|
|
157
155
|
var agentLog = /* @__PURE__ */ __name((open) => {
|
|
158
156
|
let held;
|
|
159
157
|
return {
|
|
@@ -172,7 +170,7 @@ var agentLog = /* @__PURE__ */ __name((open) => {
|
|
|
172
170
|
};
|
|
173
171
|
}, "agentLog");
|
|
174
172
|
|
|
175
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
173
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/mcp/resources.js
|
|
176
174
|
var LISTED = 100;
|
|
177
175
|
var registerResources = /* @__PURE__ */ __name((server, session, { command, name, limit, recorded, withStore, messenger, guard, assertRead }) => {
|
|
178
176
|
server.registerResource("chat", new ResourceTemplate(`${command}://chat/{id}`, {
|
|
@@ -210,7 +208,7 @@ var registerResources = /* @__PURE__ */ __name((server, session, { command, name
|
|
|
210
208
|
});
|
|
211
209
|
}, "registerResources");
|
|
212
210
|
|
|
213
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
211
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/mcp/session.js
|
|
214
212
|
var HARMLESS = /* @__PURE__ */ new Set(["validation_error", "not_found", "permission_error", "confirmation_required", "rate_limited"]);
|
|
215
213
|
var harmless = /* @__PURE__ */ __name((code) => HARMLESS.has(code), "harmless");
|
|
216
214
|
var MessengerSession = class {
|
|
@@ -285,7 +283,7 @@ var MessengerSession = class {
|
|
|
285
283
|
}
|
|
286
284
|
};
|
|
287
285
|
|
|
288
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
286
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/mcp/tools/attachments.js
|
|
289
287
|
var attachmentsTools = /* @__PURE__ */ __name((messenger) => {
|
|
290
288
|
const _command = messenger.app.command;
|
|
291
289
|
return {
|
|
@@ -339,7 +337,7 @@ var attachmentsTools = /* @__PURE__ */ __name((messenger) => {
|
|
|
339
337
|
};
|
|
340
338
|
}, "attachmentsTools");
|
|
341
339
|
|
|
342
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
340
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/mcp/tools/messages-photo.js
|
|
343
341
|
var PHOTO_LIMIT = 512 * 1024;
|
|
344
342
|
var IMAGE_TYPES = [
|
|
345
343
|
["image/jpeg", (b) => b[0] === 255 && b[1] === 216 && b[2] === 255],
|
|
@@ -355,14 +353,16 @@ var messagesPhotoTools = /* @__PURE__ */ __name((messenger) => ({
|
|
|
355
353
|
input: object({
|
|
356
354
|
chat: chatOf(messenger),
|
|
357
355
|
message,
|
|
358
|
-
|
|
356
|
+
attachment: optional(pipe(number(), integer(), minValue(1), description("which file of the message, from 1; omit for the first photo")))
|
|
359
357
|
}),
|
|
360
358
|
annotations: READ,
|
|
361
359
|
online: /* @__PURE__ */ __name(async (adapter, args, defaults) => {
|
|
362
360
|
const { id: chatId } = await adapter.resolve(args.chat);
|
|
363
361
|
const saveIt = `the owner can save it with \`${typedCommand(messenger.app.command, `messages download ${chatId} ${args.message}`)}\``;
|
|
364
362
|
const { files } = await capability(adapter, "download", "download attachments")(chatId, args.message);
|
|
365
|
-
|
|
363
|
+
if (args.attachment !== void 0 && args.attachment > files.length)
|
|
364
|
+
throw new CliError("not_found", `message ${args.message} has ${files.length} file${files.length === 1 ? "" : "s"}, no file ${args.attachment}`);
|
|
365
|
+
const photo = args.attachment === void 0 ? files.find((file) => file.kind === "photo") : files[args.attachment - 1];
|
|
366
366
|
if (!photo) {
|
|
367
367
|
const kinds = files.map((file) => file.kind).join(", ");
|
|
368
368
|
throw new CliError(files.length === 0 ? "not_found" : "validation_error", files.length === 0 ? `message ${args.message} has no photo` : `the message has a ${kinds}, not a photo \u2014 ${saveIt}`);
|
|
@@ -393,7 +393,7 @@ var readUpTo = /* @__PURE__ */ __name(async (file, limit, saveIt) => {
|
|
|
393
393
|
return new Uint8Array(Buffer.concat(chunks));
|
|
394
394
|
}, "readUpTo");
|
|
395
395
|
|
|
396
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
396
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/mcp/tools/stats.js
|
|
397
397
|
var statsTools = /* @__PURE__ */ __name((messenger) => ({
|
|
398
398
|
stats_charts: tool({
|
|
399
399
|
title: "A chart from a chat's statistics",
|
|
@@ -430,14 +430,14 @@ var statsTools = /* @__PURE__ */ __name((messenger) => ({
|
|
|
430
430
|
})
|
|
431
431
|
}), "statsTools");
|
|
432
432
|
|
|
433
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
433
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/mcp/tools.js
|
|
434
434
|
var pictureTools = /* @__PURE__ */ __name((messenger) => Object.fromEntries(Object.entries({
|
|
435
435
|
...messagesPhotoTools(messenger),
|
|
436
436
|
...attachmentsTools(messenger),
|
|
437
437
|
...statsTools(messenger)
|
|
438
438
|
}).map(([name, definition]) => [name, { ...definition, input: strictObject(definition.input.entries) }])), "pictureTools");
|
|
439
439
|
|
|
440
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
440
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/mcp/server.js
|
|
441
441
|
var PER_RUN = /* @__PURE__ */ new Set([
|
|
442
442
|
"streams",
|
|
443
443
|
"stdin",
|
|
@@ -496,7 +496,7 @@ var createServer = /* @__PURE__ */ __name((command, context, messenger, sessionO
|
|
|
496
496
|
return void 0;
|
|
497
497
|
}
|
|
498
498
|
}, "stdin");
|
|
499
|
-
const syncAllowed = /* @__PURE__ */ __name((path) => syncsFirst(messenger) && levelOf("messages.sync-first")
|
|
499
|
+
const syncAllowed = /* @__PURE__ */ __name((path) => syncsFirst(messenger) && fetchesAt(levelOf("messages.sync-first")) && (path[0] !== "stats" || fetchesAt(levelOf(`${path.join(".")}.sync-first`))), "syncAllowed");
|
|
500
500
|
const generated = toolsFromCommands(program.commands, {
|
|
501
501
|
includeUnavailable: true,
|
|
502
502
|
exclude: [["bot"]],
|
|
@@ -602,8 +602,8 @@ var createServer = /* @__PURE__ */ __name((command, context, messenger, sessionO
|
|
|
602
602
|
});
|
|
603
603
|
}), "invoke");
|
|
604
604
|
let queue = Promise.resolve();
|
|
605
|
-
const queued = /* @__PURE__ */ __name((one, input, env, caller) => {
|
|
606
|
-
const next = queue.then(() => invoke(one, input, env, caller));
|
|
605
|
+
const queued = /* @__PURE__ */ __name((one, input, env, caller, signal) => {
|
|
606
|
+
const next = queue.then(() => signal?.aborted ? { error: errorObjectOf(new CliError("cancelled", `${one.command} was cancelled before it started`)) } : invoke(one, input, env, caller));
|
|
607
607
|
queue = next.catch(() => void 0);
|
|
608
608
|
return next;
|
|
609
609
|
}, "queued");
|
|
@@ -619,7 +619,7 @@ var createServer = /* @__PURE__ */ __name((command, context, messenger, sessionO
|
|
|
619
619
|
const traceparent = ctx?.mcpReq?._meta?.traceparent;
|
|
620
620
|
const env = typeof traceparent === "string" ? { ...context.env, TRACEPARENT: traceparent } : context.env;
|
|
621
621
|
const caller = callerOf(ctx, keyOfCommand(one.command), source);
|
|
622
|
-
const answer = await withCaller(caller, () => queued(one, args, env, caller));
|
|
622
|
+
const answer = await withCaller(caller, () => queued(one, args, env, caller, ctx?.mcpReq?.signal));
|
|
623
623
|
const result = "error" in answer ? mcpErrorResult(JSON.parse(agentJson(answer.error))) : (() => {
|
|
624
624
|
try {
|
|
625
625
|
return answered(envelope(one.command, answer.result), DEFAULT_OUTPUT_BYTES, targets);
|
|
@@ -675,7 +675,7 @@ var createServer = /* @__PURE__ */ __name((command, context, messenger, sessionO
|
|
|
675
675
|
spawnJob: sessionOptions.spawnJob,
|
|
676
676
|
limit: settings.limit,
|
|
677
677
|
get syncAllowed() {
|
|
678
|
-
return syncsFirst(messenger) && levelOf("messages.sync-first")
|
|
678
|
+
return syncsFirst(messenger) && fetchesAt(levelOf("messages.sync-first"));
|
|
679
679
|
},
|
|
680
680
|
guard,
|
|
681
681
|
settings,
|
|
@@ -742,18 +742,8 @@ var serveOverStdio = /* @__PURE__ */ __name(async (command, context, messenger,
|
|
|
742
742
|
transport: new StdioServerTransport(wire.input, wire.output),
|
|
743
743
|
onerror: /* @__PURE__ */ __name((error) => context.renderer.note(`mcp: ${error.message}`), "onerror")
|
|
744
744
|
});
|
|
745
|
-
|
|
746
|
-
wire.ended.then(() => resolve("input"));
|
|
747
|
-
if (own)
|
|
748
|
-
signal?.addEventListener("abort", () => resolve("stopped"), { once: true });
|
|
749
|
-
else {
|
|
750
|
-
process.once("SIGINT", () => resolve("stopped"));
|
|
751
|
-
process.once("SIGTERM", () => resolve("stopped"));
|
|
752
|
-
}
|
|
753
|
-
});
|
|
745
|
+
await wire.finished(own ? signal : void 0);
|
|
754
746
|
try {
|
|
755
|
-
if (ended === "input")
|
|
756
|
-
await wire.answered();
|
|
757
747
|
wire.release();
|
|
758
748
|
await handle.close();
|
|
759
749
|
await session.close();
|
|
@@ -764,7 +754,7 @@ var serveOverStdio = /* @__PURE__ */ __name(async (command, context, messenger,
|
|
|
764
754
|
}, "serveOverStdio");
|
|
765
755
|
var serveOverHttpUntilStopped = /* @__PURE__ */ __name(async (command, context, messenger, options, http) => {
|
|
766
756
|
const { session, embedders, build, log } = createServer(command, context, messenger, options);
|
|
767
|
-
const { serveOverHttp } = await import("./serve-
|
|
757
|
+
const { serveOverHttp } = await import("./serve-BV2WHZLW.js");
|
|
768
758
|
const appName = messenger.app.command;
|
|
769
759
|
const appEnvPrefix = messenger.app.envPrefix;
|
|
770
760
|
const listening = await serveOverHttp(build, {
|
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
__name
|
|
8
8
|
} from "./chunk-ZVVMGPBJ.js";
|
|
9
9
|
|
|
10
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/ports/app.js
|
|
11
11
|
import { readFileSync } from "node:fs";
|
|
12
12
|
var envName = /* @__PURE__ */ __name((app, name) => `${app.envPrefix}_${name}`, "envName");
|
|
13
13
|
var locking = /* @__PURE__ */ __name((value) => value !== void 0 && value.trim() !== "" && value !== "0", "locking");
|
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
__name
|
|
8
8
|
} from "./chunk-ZVVMGPBJ.js";
|
|
9
9
|
|
|
10
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/attachments/limits.js
|
|
11
11
|
var MAX_FILE_BYTES = 50 * 1024 * 1024;
|
|
12
12
|
var MAX_TEXT_CHARS = 2e6;
|
|
13
13
|
var ATTACHMENT_LIMIT_ENV = [
|
|
@@ -33,7 +33,7 @@ var pdfPreviewLimits = /* @__PURE__ */ __name((env = process.env) => {
|
|
|
33
33
|
return { pixels, bytes: positive(env, "MESSAGING_PDF_PREVIEW_MAX_MIB", 8 * 1024 * 1024, 1024 * 1024) };
|
|
34
34
|
}, "pdfPreviewLimits");
|
|
35
35
|
|
|
36
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/domain/google-documents.js
|
|
37
37
|
var LINK = /https?:\/\/(?:(?:docs|drive|sheets|slides)\.google\.com|forms\.gle)(?:[/?#][^\s<>"'`]*)?/gi;
|
|
38
38
|
var ID = /^[\w-]{10,}$/;
|
|
39
39
|
var trimUrl = /* @__PURE__ */ __name((url) => {
|