@wirecat/drive-cli 0.67.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-DVZUVAPQ.js → all-profiles-B4A737YW.js} +20 -30
- package/dist/bundle/{anthropic-Y45C45O2.js → anthropic-RZGPDESM.js} +3 -3
- package/dist/bundle/{app-server-GTXUOUGD.js → app-server-OWEW7DY5.js} +51 -63
- package/dist/bundle/{bun-QVJV76QJ.js → bun-V5QLYBZU.js} +2 -2
- package/dist/bundle/{bun-sqlite-CC7PIAMH.js → bun-sqlite-KHLHXXGH.js} +4 -4
- package/dist/bundle/{chunk-ETAFFY3J.js → chunk-22SH77TG.js} +65 -64
- package/dist/bundle/{chunk-2Y3YBDZX.js → chunk-25FT44S3.js} +1482 -464
- package/dist/bundle/{chunk-YVUAG7RF.js → chunk-2DS2TDGW.js} +29 -28
- package/dist/bundle/{chunk-JJHDV32D.js → chunk-2Q4CB4EI.js} +1 -1
- package/dist/bundle/{chunk-HJF2QGOX.js → chunk-2VFAXC6O.js} +30 -17
- package/dist/bundle/{chunk-ULH3TNUP.js → chunk-376ZGVUZ.js} +4 -4
- package/dist/bundle/{chunk-NWYVOHIX.js → chunk-3RLRJHAI.js} +1646 -976
- package/dist/bundle/{chunk-SXJDCRXE.js → chunk-3URYKAJP.js} +1 -1
- package/dist/bundle/{chunk-7AZCAUST.js → chunk-3YKAFLXY.js} +1 -1
- package/dist/bundle/{chunk-MF46W7PQ.js → chunk-4J5GJJ2I.js} +1 -1
- package/dist/bundle/{chunk-3RG6LL25.js → chunk-4YECZ6CN.js} +11 -11
- package/dist/bundle/{chunk-SJE7UGOW.js → chunk-4ZFO2CVH.js} +4 -4
- package/dist/bundle/{chunk-UFNE57VY.js → chunk-533XOW74.js} +2 -2
- package/dist/bundle/{chunk-6ERQE4FS.js → chunk-5B5NOAIA.js} +100 -55
- package/dist/bundle/{chunk-MW46BLWH.js → chunk-5SJZDEIO.js} +2 -0
- package/dist/bundle/{chunk-RC72RU66.js → chunk-6D44YQ5X.js} +5 -5
- package/dist/bundle/{chunk-2MEVCMBW.js → chunk-6EL5AVXX.js} +3 -5
- package/dist/bundle/{chunk-ZU5VQYNY.js → chunk-6XNTELM5.js} +1 -1
- package/dist/bundle/{chunk-7J2IP3WL.js → chunk-AD7VI3XU.js} +6 -6
- package/dist/bundle/{chunk-Y5WSRG3F.js → chunk-AMQGKMLZ.js} +2 -2
- package/dist/bundle/{chunk-UOAHZV3K.js → chunk-BBJVV4E2.js} +28 -29
- package/dist/bundle/{chunk-XZCF5XU7.js → chunk-BVVXYZSU.js} +5 -5
- package/dist/bundle/{chunk-E3XA56TS.js → chunk-CAQ5GW3A.js} +1 -1
- package/dist/bundle/{chunk-MEQNAZ6R.js → chunk-CDSB7WVG.js} +323 -12
- package/dist/bundle/{chunk-P6A77LMP.js → chunk-CU6RATZH.js} +5 -7
- package/dist/bundle/{chunk-MEY7URZZ.js → chunk-CZ4UEXCE.js} +4 -4
- package/dist/bundle/{chunk-JLUQZZ26.js → chunk-E7URRFBB.js} +7 -7
- package/dist/bundle/{chunk-JCNEPYQZ.js → chunk-EL2E3ABX.js} +12 -12
- package/dist/bundle/{chunk-BHSLMJF7.js → chunk-EWUQIUTB.js} +4 -4
- package/dist/bundle/{chunk-4VH7M2OD.js → chunk-F5UUJU6R.js} +2 -2
- package/dist/bundle/{chunk-CWDC6QJM.js → chunk-GHFBT2ZM.js} +4 -4
- package/dist/bundle/{chunk-2PIA45FC.js → chunk-GK6KXBL6.js} +1 -1
- package/dist/bundle/{chunk-T2VAEDJS.js → chunk-GTDCP5OG.js} +3 -3
- package/dist/bundle/{chunk-IRULPE5M.js → chunk-HEBZCKMU.js} +1695 -672
- package/dist/bundle/{chunk-EXWOOST5.js → chunk-I55XYREN.js} +667 -230
- package/dist/bundle/{chunk-5TSILGTO.js → chunk-IQ2QU2X6.js} +1613 -1101
- package/dist/bundle/{chunk-WKIQKGOF.js → chunk-KUQDBWPU.js} +42 -32
- package/dist/bundle/{chunk-AJ3DFPRT.js → chunk-L342KHIZ.js} +105 -1
- package/dist/bundle/{chunk-JY2GZDJL.js → chunk-LRCSDAYK.js} +3 -3
- package/dist/bundle/{chunk-U2ERT45N.js → chunk-LUZRVBQR.js} +4 -4
- package/dist/bundle/{chunk-AAZPDWRD.js → chunk-MHXZ62CU.js} +1 -1
- package/dist/bundle/{chunk-ZK46UHDP.js → chunk-N4ACIIQB.js} +2 -2
- package/dist/bundle/{chunk-FS2PG2PE.js → chunk-NVDR72GP.js} +19 -19
- package/dist/bundle/{chunk-VZ5KETIX.js → chunk-O6PD7RZY.js} +2 -2
- package/dist/bundle/{chunk-PDHN4GHU.js → chunk-OOIAJRKQ.js} +1 -1
- package/dist/bundle/{chunk-JEMBW6IO.js → chunk-OUM4ZO53.js} +1 -1
- package/dist/bundle/{chunk-QOKPRFHM.js → chunk-PB6NWKH3.js} +2 -2
- package/dist/bundle/{chunk-C72WYRXD.js → chunk-QJGFQRTL.js} +10 -10
- package/dist/bundle/chunk-RLGQMMYE.js +707 -0
- package/dist/bundle/{chunk-4G7WQNG7.js → chunk-RWQ7T4Y5.js} +2 -2
- package/dist/bundle/{chunk-ZH4H5XTA.js → chunk-SEJBS7SI.js} +1 -1
- package/dist/bundle/{chunk-OOBSSU2G.js → chunk-SY2HLH5R.js} +33 -19
- package/dist/bundle/{chunk-LSAIXPAX.js → chunk-SYUXKV2E.js} +1 -1
- package/dist/bundle/{chunk-FOMQ4MG3.js → chunk-T4FMXDDV.js} +2 -2
- package/dist/bundle/{chunk-5DMPGTNR.js → chunk-T6X6EZ5N.js} +3 -3
- package/dist/bundle/{chunk-RLH6BOEG.js → chunk-TZ75K6R7.js} +6 -6
- package/dist/bundle/{chunk-D4MVEOU2.js → chunk-U3RXH6RY.js} +1 -1
- package/dist/bundle/{chunk-ABJQ6IDU.js → chunk-V4FMN5A6.js} +16 -16
- package/dist/bundle/{chunk-WBKYZZQT.js → chunk-VUPWDCYV.js} +1 -1
- package/dist/bundle/{chunk-V7E25BUU.js → chunk-WNMPIRRF.js} +98 -6
- package/dist/bundle/{chunk-DAFKV6DJ.js → chunk-WOUIHZRI.js} +13 -15
- package/dist/bundle/{chunk-WWW7YTFG.js → chunk-WQOGHND4.js} +1 -1
- package/dist/bundle/{chunk-NFIR346J.js → chunk-XUHQ7DVT.js} +1 -1
- package/dist/bundle/{chunk-YI4DXASF.js → chunk-XVH3WZSZ.js} +49 -55
- package/dist/bundle/{chunk-ZEPDEFVT.js → chunk-ZBYKCVSV.js} +1 -1
- package/dist/bundle/{chunk-LXRBTXCZ.js → chunk-ZUG67442.js} +2 -2
- package/dist/bundle/{cli-U4LSBYDV.js → cli-BS4L3HAP.js} +100 -70
- package/dist/bundle/{command-contract-UU5T24ZZ.js → command-contract-HYURWSD6.js} +16 -17
- package/dist/bundle/{command-server-entry-PK6FBUPO.js → command-server-entry-CJ2CV7ZV.js} +23 -24
- package/dist/bundle/{decode-3ZE6NBKV.js → decode-E2NM5SSM.js} +3 -3
- package/dist/bundle/drive.js +4 -4
- package/dist/bundle/{echarts-6FWNCNXK.js → echarts-QIXLXS3G.js} +2 -2
- package/dist/bundle/{embed-DGYBBZUW.js → embed-YNZW5X6M.js} +4 -4
- package/dist/bundle/{embedder-O7A6VMWI.js → embedder-LRC2PKTS.js} +7 -7
- package/dist/bundle/{entry-CDJ2QSU2.js → entry-2IMSWRJU.js} +7 -7
- package/dist/bundle/{first-run-UOQW7DN5.js → first-run-7CPHQDM5.js} +7 -7
- package/dist/bundle/first-screen-OKZ7GMFR.js +38 -0
- package/dist/bundle/{google-HPX52KMC.js → google-WDKDBDD4.js} +15 -15
- package/dist/bundle/{google-api-HIMN4XL5.js → google-api-7JDZDCWE.js} +52 -53
- package/dist/bundle/{grants-RO42I6E4.js → grants-AU25GWKF.js} +57 -58
- package/dist/bundle/{identity-NFGHDPLL.js → identity-E43WKN5F.js} +1 -1
- package/dist/bundle/{instructions-6JAQYCM6.js → instructions-MD2RZT5Z.js} +1 -1
- package/dist/bundle/{login-RZOQN63N.js → login-RBDJPQAG.js} +57 -58
- package/dist/bundle/{node-KSIX3GIH.js → node-IEVT2FSJ.js} +2 -2
- package/dist/bundle/{node-sqlite-4FJ6WJXN.js → node-sqlite-IENH4TRX.js} +5 -5
- package/dist/bundle/{oauth-BKZAMFKK.js → oauth-3JGSN47Z.js} +5 -5
- package/dist/bundle/{open-4AQJGH42.js → open-TZ5H7NYM.js} +3 -3
- package/dist/bundle/{openai-24F2OX55.js → openai-XF2KB7W2.js} +14 -14
- package/dist/bundle/{process-7NOA2T7H.js → process-6Q23D3TO.js} +1 -1
- package/dist/bundle/{program-7JHMLDEX.js → program-D5XWOHV5.js} +88 -88
- package/dist/bundle/{prompt-NM66MAZ4.js → prompt-KUC5D4GX.js} +3 -3
- package/dist/bundle/{recognize-DBKV2JYZ.js → recognize-DPFW7HO3.js} +2 -2
- package/dist/bundle/{remote-ABWUTBVB.js → remote-MODTSUNH.js} +8 -8
- package/dist/bundle/{rerank-FQAU4ENY.js → rerank-JK7SERLE.js} +5 -5
- package/dist/bundle/{serve-QLJG4QZD.js → serve-BV2WHZLW.js} +7 -7
- package/dist/bundle/server-6YDI4Y36.js +72 -0
- package/dist/bundle/{server-VGZNK5XD.js → server-N3WPEU7Z.js} +47 -44
- package/dist/bundle/{services-5KARVUHK.js → services-SV6CFUCS.js} +42 -27
- package/dist/bundle/{sqlite-runtime-ILF6EFQJ.js → sqlite-runtime-RZ5PLZVQ.js} +4 -4
- package/dist/bundle/{state-R2M56GPU.js → state-RAZIREVG.js} +4 -4
- package/dist/bundle/{store-DA4K7HWW.js → store-2DLGLYS6.js} +18 -14
- package/dist/bundle/{store-2OBVMUQL.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 +2 -0
- package/dist/policy.d.ts.map +1 -1
- package/dist/policy.js +2 -1
- package/dist/policy.js.map +1 -1
- package/dist/program.d.ts.map +1 -1
- package/dist/program.js +3 -2
- package/dist/program.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-AZKFZ7J7.js +0 -76
- package/dist/bundle/chunk-JO7BJYAP.js +0 -1235
- package/dist/bundle/chunk-MBLB4TQI.js +0 -1316
- package/dist/bundle/first-screen-SNDV4YKF.js +0 -39
- package/dist/bundle/server-NUBLY5SV.js +0 -74
- package/dist/bundle/store-maintenance-command-KSIPI5B5.js +0 -65
- package/dist/bundle/tokens-VQDGSHRB.js +0 -111
|
@@ -5,11 +5,9 @@ import {
|
|
|
5
5
|
answerProjectionSchema,
|
|
6
6
|
answerSchema,
|
|
7
7
|
describeOptions,
|
|
8
|
+
keyForCommand,
|
|
8
9
|
metaOf
|
|
9
|
-
} from "./chunk-
|
|
10
|
-
import {
|
|
11
|
-
keyForCommand
|
|
12
|
-
} from "./chunk-MBLB4TQI.js";
|
|
10
|
+
} from "./chunk-25FT44S3.js";
|
|
13
11
|
import {
|
|
14
12
|
jsonSchemaOf
|
|
15
13
|
} from "./chunk-JRFKCYMW.js";
|
|
@@ -20,7 +18,7 @@ import {
|
|
|
20
18
|
__name
|
|
21
19
|
} from "./chunk-ZVVMGPBJ.js";
|
|
22
20
|
|
|
23
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21
|
+
// 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-contract.js
|
|
24
22
|
var SCHEMA_DIALECT = "https://json-schema.org/draft/2020-12/schema";
|
|
25
23
|
var outputOf = /* @__PURE__ */ __name((command) => {
|
|
26
24
|
const entity = answerEntitySchema(command);
|
|
@@ -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/http/listen.js
|
|
8
8
|
import { createServer } from "node:http";
|
|
9
9
|
import { Readable } from "node:stream";
|
|
10
10
|
var MAX_BODY = 4 * 1024 * 1024;
|
|
@@ -3,10 +3,10 @@ const require = __bundleRequire(import.meta.url);
|
|
|
3
3
|
import {
|
|
4
4
|
secretNamed,
|
|
5
5
|
withoutSecrets
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-VUPWDCYV.js";
|
|
7
7
|
import {
|
|
8
8
|
isCliFailure
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-3YKAFLXY.js";
|
|
10
10
|
import {
|
|
11
11
|
isContentKey
|
|
12
12
|
} from "./chunk-5TK2YQCO.js";
|
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
__name
|
|
15
15
|
} from "./chunk-ZVVMGPBJ.js";
|
|
16
16
|
|
|
17
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17
|
+
// 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/runs/events.js
|
|
18
18
|
var providerErrorKey = /* @__PURE__ */ __name((value) => typeof value === "string" && /^[A-Za-z][A-Za-z0-9._-]{0,63}$/.test(value) ? value : void 0, "providerErrorKey");
|
|
19
19
|
var renderEvent = /* @__PURE__ */ __name((event) => {
|
|
20
20
|
if (event.event === "store")
|
|
@@ -66,11 +66,11 @@ var MARK = { request: "\u2192", response: "\u2190", cache: "\u2022", warning: "!
|
|
|
66
66
|
var age = /* @__PURE__ */ __name((ms) => ms < 1e3 ? `${ms}ms` : `${Math.round(ms / 1e3)}s`, "age");
|
|
67
67
|
var size = /* @__PURE__ */ __name((bytes) => bytes < 1e3 ? `${bytes} B` : `${(bytes / 1e3).toFixed(1)} kB`, "size");
|
|
68
68
|
|
|
69
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
69
|
+
// 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/runs/run-context.js
|
|
70
70
|
import { AsyncLocalStorage } from "node:async_hooks";
|
|
71
71
|
import { createHash } from "node:crypto";
|
|
72
72
|
|
|
73
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
73
|
+
// 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/runs/error-detail.js
|
|
74
74
|
import { homedir } from "node:os";
|
|
75
75
|
var MESSAGE_AT_MOST = 500;
|
|
76
76
|
var CAUSES_AT_MOST = 5;
|
|
@@ -183,7 +183,7 @@ var redactText = /* @__PURE__ */ __name((text) => {
|
|
|
183
183
|
return out.length > MESSAGE_AT_MOST ? `${out.slice(0, MESSAGE_AT_MOST)}\u2026` : out;
|
|
184
184
|
}, "redactText");
|
|
185
185
|
|
|
186
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
186
|
+
// 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/runs/run-context.js
|
|
187
187
|
var REDACTED = "[redacted]";
|
|
188
188
|
var keepsSuccess = /* @__PURE__ */ __name(({ record, fromFlag, env, caller, persistent = false }) => {
|
|
189
189
|
if (!record)
|
|
@@ -6,10 +6,10 @@ import {
|
|
|
6
6
|
describeProgram,
|
|
7
7
|
flatten,
|
|
8
8
|
profileFree
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-25FT44S3.js";
|
|
10
10
|
import {
|
|
11
11
|
VERSION
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-SYUXKV2E.js";
|
|
13
13
|
import {
|
|
14
14
|
CliError
|
|
15
15
|
} from "./chunk-EA2OB75T.js";
|
|
@@ -7,66 +7,65 @@ import {
|
|
|
7
7
|
agentJson,
|
|
8
8
|
commandAvailability,
|
|
9
9
|
failureContext
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-SY2HLH5R.js";
|
|
11
11
|
import {
|
|
12
12
|
callerOf
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-WNMPIRRF.js";
|
|
14
14
|
import {
|
|
15
|
-
QUERY_ARGUMENT,
|
|
16
15
|
lentConnection,
|
|
17
16
|
refuseLacking
|
|
18
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-RLGQMMYE.js";
|
|
19
18
|
import {
|
|
19
|
+
QUERY_ARGUMENT,
|
|
20
20
|
onlineDeps,
|
|
21
21
|
servicesFor,
|
|
22
22
|
storeModeDeps
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-HEBZCKMU.js";
|
|
24
24
|
import {
|
|
25
25
|
DEFAULT_OUTPUT_BYTES,
|
|
26
26
|
ENTITIES,
|
|
27
27
|
LOCAL_WRITE,
|
|
28
28
|
REMOTE_WRITE,
|
|
29
29
|
answerSchema,
|
|
30
|
+
authorityAllowed,
|
|
31
|
+
botApiAllowed,
|
|
30
32
|
changesMessenger,
|
|
33
|
+
fetchesAt,
|
|
31
34
|
flatten,
|
|
32
35
|
judgedAnswer,
|
|
33
36
|
judgedEffects,
|
|
37
|
+
keyForCommand,
|
|
38
|
+
levelFor,
|
|
34
39
|
listOf,
|
|
40
|
+
readKeysForCommand,
|
|
35
41
|
refuseStoreChange,
|
|
36
42
|
sealed,
|
|
37
43
|
startRecording
|
|
38
|
-
} from "./chunk-
|
|
44
|
+
} from "./chunk-25FT44S3.js";
|
|
39
45
|
import {
|
|
40
46
|
currentCaller,
|
|
41
47
|
keepsSuccess,
|
|
42
48
|
runContextOf,
|
|
43
49
|
withCaller
|
|
44
|
-
} from "./chunk-
|
|
45
|
-
import {
|
|
46
|
-
authorityAllowed,
|
|
47
|
-
botApiAllowed,
|
|
48
|
-
keyForCommand,
|
|
49
|
-
levelFor,
|
|
50
|
-
readKeysForCommand
|
|
51
|
-
} from "./chunk-MBLB4TQI.js";
|
|
50
|
+
} from "./chunk-AD7VI3XU.js";
|
|
52
51
|
import {
|
|
53
52
|
MAX_BUFFERED_INPUT
|
|
54
|
-
} from "./chunk-
|
|
53
|
+
} from "./chunk-2Q4CB4EI.js";
|
|
55
54
|
import {
|
|
56
55
|
enclosingTraceId,
|
|
57
56
|
inRun,
|
|
58
57
|
newRunId,
|
|
59
58
|
traceOf
|
|
60
|
-
} from "./chunk-
|
|
59
|
+
} from "./chunk-I55XYREN.js";
|
|
61
60
|
import {
|
|
62
61
|
queryDescription
|
|
63
62
|
} from "./chunk-UPCEHSIZ.js";
|
|
64
63
|
import {
|
|
65
64
|
storeDamaged
|
|
66
|
-
} from "./chunk-
|
|
65
|
+
} from "./chunk-3YKAFLXY.js";
|
|
67
66
|
import {
|
|
68
67
|
captureStreams
|
|
69
|
-
} from "./chunk-
|
|
68
|
+
} from "./chunk-5SJZDEIO.js";
|
|
70
69
|
import {
|
|
71
70
|
errorObjectOf,
|
|
72
71
|
mcpErrorResult
|
|
@@ -119,7 +118,7 @@ import {
|
|
|
119
118
|
__name
|
|
120
119
|
} from "./chunk-ZVVMGPBJ.js";
|
|
121
120
|
|
|
122
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
121
|
+
// 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.js
|
|
123
122
|
import { Readable } from "node:stream";
|
|
124
123
|
|
|
125
124
|
// node_modules/.pnpm/@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/standards/lint.js
|
|
@@ -3291,7 +3290,7 @@ var VOCABULARY = defineVocabulary({
|
|
|
3291
3290
|
]
|
|
3292
3291
|
});
|
|
3293
3292
|
|
|
3294
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
3293
|
+
// 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.js
|
|
3295
3294
|
var TYPES = new Map(VOCABULARY.flags.map((flag) => [flag.name, flag.type]));
|
|
3296
3295
|
var snake = /* @__PURE__ */ __name((name) => name.replaceAll("|", "_or_").replace(/[^a-z0-9]+/gi, "_"), "snake");
|
|
3297
3296
|
var longOf = /* @__PURE__ */ __name((option) => option.flags.match(/--[a-z0-9][a-z0-9-]*/)?.[0], "longOf");
|
|
@@ -3405,12 +3404,12 @@ var keywordsOf = /* @__PURE__ */ __name((examples) => [
|
|
|
3405
3404
|
...new Set(examples.flatMap((example) => example.split(/\s+/u).filter((word2) => word2 !== "" && !word2.startsWith("-"))))
|
|
3406
3405
|
], "keywordsOf");
|
|
3407
3406
|
var toolsFromCommands = /* @__PURE__ */ __name((commands, options = {}) => {
|
|
3408
|
-
const { root = [], exclude = [], levels, keyOf, authority, readOnly = false, permissions } = options;
|
|
3407
|
+
const { root = [], exclude = [], levels, keyOf, authority, readOnly = false, permissions, fetches } = options;
|
|
3409
3408
|
return flatten(commands).filter((info) => (
|
|
3410
3409
|
// A group is offered only when it runs on its own; without an action it only prints its help.
|
|
3411
|
-
(info.commands.length === 0 || info.runnable === true) && info.path.length > root.length && startsWith(info.path, root) && !exclude.some((skipped) => startsWith(info.path.slice(root.length), skipped)) && info.mcp !== false && info.lifetime === void 0 && (options.includeUnavailable === true || !(readOnly && (changesMessenger(info) || authority?.(info.path))) && (levels === void 0 && !(readOnly && permissions) ? true : commandAvailability(info, levels ?? {}, keyOf, authority, readOnly, true, permissions).available))
|
|
3410
|
+
(info.commands.length === 0 || info.runnable === true) && info.path.length > root.length && startsWith(info.path, root) && !exclude.some((skipped) => startsWith(info.path.slice(root.length), skipped)) && info.mcp !== false && info.lifetime === void 0 && (options.includeUnavailable === true || !(readOnly && (changesMessenger(info) || authority?.(info.path))) && (levels === void 0 && !(readOnly && permissions) ? true : commandAvailability(info, levels ?? {}, keyOf, authority, readOnly, true, permissions, fetches).available))
|
|
3412
3411
|
)).map((info) => ({
|
|
3413
|
-
availability: /* @__PURE__ */ __name(() => commandAvailability(info, options.currentLevels?.() ?? levels ?? {}, keyOf, authority, readOnly, true, permissions), "availability"),
|
|
3412
|
+
availability: /* @__PURE__ */ __name(() => commandAvailability(info, options.currentLevels?.() ?? levels ?? {}, keyOf, authority, readOnly, true, permissions, fetches), "availability"),
|
|
3414
3413
|
command: info.path.slice(root.length).join(" "),
|
|
3415
3414
|
path: info.path,
|
|
3416
3415
|
title: info.summary ?? info.description,
|
|
@@ -3453,7 +3452,7 @@ var runCommandForAgent = /* @__PURE__ */ __name(async (program, path, input, ctx
|
|
|
3453
3452
|
if (info.lifetime)
|
|
3454
3453
|
throw new CliError("validation_error", `"${path.join(" ")}" runs until it is stopped; an agent call must return`);
|
|
3455
3454
|
const levels = ctx.levels?.();
|
|
3456
|
-
const availability = (levels || ctx.readOnly || ctx.permissions) && commandAvailability(info, levels ?? {}, ctx.keyOf, ctx.authority, ctx.readOnly, true, ctx.permissions);
|
|
3455
|
+
const availability = (levels || ctx.readOnly || ctx.permissions) && commandAvailability(info, levels ?? {}, ctx.keyOf, ctx.authority, ctx.readOnly, true, ctx.permissions, ctx.fetches);
|
|
3457
3456
|
if (availability && !availability.available)
|
|
3458
3457
|
throw new CliError("permission_error", `${path.join(" ")}: ${availability.reason}`, {
|
|
3459
3458
|
sent: false,
|
|
@@ -3518,7 +3517,7 @@ var runCommandForAgent = /* @__PURE__ */ __name(async (program, path, input, ctx
|
|
|
3518
3517
|
}
|
|
3519
3518
|
}, "runCommandForAgent");
|
|
3520
3519
|
|
|
3521
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
3520
|
+
// 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/tool.js
|
|
3522
3521
|
var limit = optional(pipe(number(), integer(), minValue(1), maxValue(100), description("how many")));
|
|
3523
3522
|
var page = optional(pipe(number(), integer(), minValue(1), description("which page, from 1")));
|
|
3524
3523
|
var message = pipe(
|
|
@@ -3572,8 +3571,8 @@ var toolKey = /* @__PURE__ */ __name((name, definition) => definition.key !== vo
|
|
|
3572
3571
|
var inputOf = /* @__PURE__ */ __name((definition, syncAllowed) => strictObject(syncAllowed || !("sync_first" in definition.input.entries) ? definition.input.entries : Object.fromEntries(Object.entries(definition.input.entries).filter(([name]) => !["sync_first", "sync_time", "max_chats", "max_messages"].includes(name)))), "inputOf");
|
|
3573
3572
|
var syncAllowedFor = /* @__PURE__ */ __name((key2, defaults) => {
|
|
3574
3573
|
const permissions = defaults.settings.permissions ?? {};
|
|
3575
|
-
const shared = defaults.syncAllowed ?? levelFor(permissions, "messages.sync-first").level
|
|
3576
|
-
return shared && (!key2.startsWith("stats_") || levelFor(permissions, `${key2.replaceAll("_", ".")}.sync-first`).level
|
|
3574
|
+
const shared = defaults.syncAllowed ?? fetchesAt(levelFor(permissions, "messages.sync-first").level);
|
|
3575
|
+
return shared && (!key2.startsWith("stats_") || fetchesAt(levelFor(permissions, `${key2.replaceAll("_", ".")}.sync-first`).level));
|
|
3577
3576
|
}, "syncAllowedFor");
|
|
3578
3577
|
var entryRunner = /* @__PURE__ */ __name((registration) => {
|
|
3579
3578
|
const run = callRunner(registration);
|
|
@@ -3736,7 +3735,7 @@ var BinaryResource = class {
|
|
|
3736
3735
|
};
|
|
3737
3736
|
var answered = /* @__PURE__ */ __name((answer, maxBytes = DEFAULT_OUTPUT_BYTES, targets) => {
|
|
3738
3737
|
const bounded = /* @__PURE__ */ __name((result) => {
|
|
3739
|
-
if (maxBytes !== 0 && Buffer.byteLength(JSON.stringify(result)) > maxBytes)
|
|
3738
|
+
if (maxBytes !== 0 && Buffer.byteLength(JSON.stringify(result.content)) > maxBytes)
|
|
3740
3739
|
throw new CliError("invalid_response", "tool output exceeds its byte limit \u2014 reduce limit or use a narrower request", { reason: "output.too-large", max_bytes: maxBytes, retryable: false });
|
|
3741
3740
|
return result;
|
|
3742
3741
|
}, "bounded");
|
|
@@ -3777,7 +3776,7 @@ var failed = /* @__PURE__ */ __name((error, errors, effects) => {
|
|
|
3777
3776
|
return mcpErrorResult(JSON.parse(agentJson(errorObjectOf(storeDamaged(error), context))));
|
|
3778
3777
|
}, "failed");
|
|
3779
3778
|
|
|
3780
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
3779
|
+
// 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/surface.js
|
|
3781
3780
|
import { randomUUID } from "node:crypto";
|
|
3782
3781
|
var MATCHES = 8;
|
|
3783
3782
|
var ANSWER = answerSchema();
|
|
@@ -2,17 +2,17 @@ import { createRequire as __bundleRequire } from "node:module";
|
|
|
2
2
|
const require = __bundleRequire(import.meta.url);
|
|
3
3
|
import {
|
|
4
4
|
stdinFieldOf
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-MHXZ62CU.js";
|
|
6
6
|
import {
|
|
7
7
|
isCommandServer
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-XUHQ7DVT.js";
|
|
9
9
|
import {
|
|
10
10
|
commandPathOf
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-6EL5AVXX.js";
|
|
12
12
|
import {
|
|
13
13
|
commandServerRequest,
|
|
14
14
|
metaOf
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-25FT44S3.js";
|
|
16
16
|
import {
|
|
17
17
|
errorObjectOf,
|
|
18
18
|
renderError
|
|
@@ -24,7 +24,7 @@ import {
|
|
|
24
24
|
__name
|
|
25
25
|
} from "./chunk-ZVVMGPBJ.js";
|
|
26
26
|
|
|
27
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27
|
+
// 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.js
|
|
28
28
|
import { createInterface } from "node:readline";
|
|
29
29
|
var COMMAND_SERVER_PROTOCOL = 1;
|
|
30
30
|
var COMMAND_SERVER_IDLE_MS = 10 * 6e4;
|
|
@@ -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/mcp/instructions.js
|
|
8
8
|
var instructions = /* @__PURE__ */ __name(({ command, name, profile, writes, skill }) => {
|
|
9
9
|
const all = typeof profile !== "string";
|
|
10
10
|
const offers = /* @__PURE__ */ __name((key) => all || writes.includes(key), "offers");
|