@wirecat/drive-cli 0.52.1 → 0.53.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bin/drive.js +2 -2
- package/dist/bin/drive.js.map +1 -1
- package/dist/bundle/{chunk-ZWSG7OCA.js → all-profiles-WRN35CUF.js} +11 -6
- package/dist/bundle/{anthropic-KW6KU36Y.js → anthropic-DZASXWG3.js} +1 -1
- package/dist/bundle/{app-server-TCJZ333E.js → app-server-4VHT7QZN.js} +33 -41
- package/dist/bundle/{bun-sqlite-RI7DR6RZ.js → bun-sqlite-2GOM5PM3.js} +1 -1
- package/dist/bundle/{chunk-LONV6HIK.js → chunk-2HHOMN2G.js} +440 -25
- package/dist/bundle/{chunk-NYOPEHEU.js → chunk-2PVDFLJJ.js} +8 -3
- package/dist/bundle/{chunk-725OHXKR.js → chunk-3RYX7IB6.js} +2218 -30
- package/dist/bundle/{chunk-CB7SBYLO.js → chunk-54BYJQ77.js} +41 -21
- package/dist/bundle/{chunk-5FONRUG6.js → chunk-5D4AEUVA.js} +1 -23
- package/dist/bundle/{chunk-RNSP57TC.js → chunk-6BNALDGA.js} +1 -1
- package/dist/bundle/{chunk-H47W2J6S.js → chunk-6XYGTRMQ.js} +812 -381
- package/dist/bundle/{chunk-UR32UWTQ.js → chunk-7IUMHMTP.js} +11 -0
- package/dist/bundle/{chunk-W7IK7E4B.js → chunk-BEL4XZ3M.js} +5 -7
- package/dist/bundle/{chunk-43QVYW3K.js → chunk-CL4GVCXS.js} +230 -56
- package/dist/bundle/{chunk-PQYVPCJ2.js → chunk-CNKILAWA.js} +18 -24
- package/dist/bundle/chunk-DOZOLBXE.js +110 -0
- package/dist/bundle/{chunk-2AUXBJRX.js → chunk-DT2YCB2V.js} +84 -11
- package/dist/bundle/{chunk-HQVJK5E7.js → chunk-DZMK255Y.js} +210 -357
- package/dist/bundle/{chunk-G6QF5KWF.js → chunk-E6XDFMRZ.js} +22 -28
- package/dist/bundle/{chunk-54O62JWP.js → chunk-F3KHUJEE.js} +24 -5
- package/dist/bundle/{chunk-I7UH5CTA.js → chunk-FXWBUTR7.js} +7 -9
- package/dist/bundle/{chunk-ZNZUZGSV.js → chunk-GE4DP24O.js} +131 -4
- package/dist/bundle/{chunk-PEOCBV2Z.js → chunk-GPJEYW2J.js} +1 -1
- package/dist/bundle/{chunk-A4UNTWAX.js → chunk-HM352LJR.js} +84 -15
- package/dist/bundle/{chunk-KYVXMEBC.js → chunk-IAQ4L6SM.js} +1 -1
- package/dist/bundle/{chunk-PQJYM5ES.js → chunk-IJFZKQC4.js} +1 -1
- package/dist/bundle/{chunk-O6IOL6RX.js → chunk-KPBCGUJC.js} +1 -1
- package/dist/bundle/{chunk-XOLQSCMF.js → chunk-KXMJE3XC.js} +2 -2
- package/dist/bundle/{chunk-33NVQGUY.js → chunk-LSGAJYVN.js} +2 -2
- package/dist/bundle/{chunk-2UIMEMWU.js → chunk-MK3N7WX7.js} +1 -1
- package/dist/bundle/{chunk-IDUNJCFO.js → chunk-OQMK6WXQ.js} +1 -1
- package/dist/bundle/{chunk-CM7GAXGD.js → chunk-PC4UA6UN.js} +1 -1
- package/dist/bundle/{chunk-YNFELLNQ.js → chunk-PIMMF67N.js} +2 -2
- package/dist/bundle/{chunk-WBTVGFXI.js → chunk-PR3DA7KA.js} +9 -9
- package/dist/bundle/{chunk-VJZST5RD.js → chunk-QXYGK6G5.js} +1 -1
- package/dist/bundle/{chunk-WQJBAWQP.js → chunk-R4TE4ZSD.js} +549 -224
- package/dist/bundle/{chunk-BSSCTWWK.js → chunk-RNIHKIQP.js} +1 -1
- package/dist/bundle/{chunk-PAXKALHV.js → chunk-SIWBUGBU.js} +116 -5
- package/dist/bundle/{chunk-2623YE5I.js → chunk-SQHPJBNO.js} +6 -8
- package/dist/bundle/chunk-SVTYS36O.js +5305 -0
- package/dist/bundle/{chunk-WLFUBNFX.js → chunk-T334CFU4.js} +2 -2
- package/dist/bundle/{chunk-IEXPOEEO.js → chunk-TZLO3ZZF.js} +3 -3
- package/dist/bundle/{chunk-5PLJKSG4.js → chunk-UFWK3L5Z.js} +4 -6
- package/dist/bundle/{chunk-FCJAHD4R.js → chunk-VTWADVEQ.js} +2 -2
- package/dist/bundle/{chunk-HX7Y2ASG.js → chunk-WJRJBQIM.js} +26040 -15126
- package/dist/bundle/{chunk-VSOLLTYT.js → chunk-YLKQSVLI.js} +5 -0
- package/dist/bundle/{chunk-IWFBAWZK.js → chunk-YQOVVCIA.js} +282 -10
- package/dist/bundle/{chunk-7YMDL4JQ.js → chunk-ZG6X24ON.js} +4 -1
- package/dist/bundle/{command-contract-I2YB5IXI.js → command-contract-D4UG3D33.js} +12 -15
- package/dist/bundle/{decode-EDN2ARXZ.js → decode-WAPM2VBH.js} +1 -1
- package/dist/bundle/drive.js +9 -20
- package/dist/bundle/{embed-3GSQIQXE.js → embed-HW3N3KNP.js} +4 -4
- package/dist/bundle/{embedder-6ULWRG3R.js → embedder-7WNFXYYP.js} +4 -4
- package/dist/bundle/{entry-IPRJLFHO.js → entry-J7YIRDPD.js} +4 -4
- package/dist/bundle/{first-run-FGHGWHC2.js → first-run-53CL2IYH.js} +6 -6
- package/dist/bundle/{first-screen-M62KTPZG.js → first-screen-2KT7HM2K.js} +13 -16
- package/dist/bundle/{google-BD3ZNFVJ.js → google-5NNVARNR.js} +2 -2
- package/dist/bundle/{chunk-GR5GGZKH.js → google-api-EQQH53QD.js} +60 -4
- package/dist/bundle/grants-4NETZ4MR.js +98 -0
- package/dist/bundle/{identity-U7IHZEMR.js → identity-LBTXDMTA.js} +4 -2
- package/dist/bundle/{login-7HRYPZMM.js → login-Y6ENYKC3.js} +44 -50
- package/dist/bundle/{node-sqlite-J3OODPYK.js → node-sqlite-FSQIKGED.js} +1 -1
- package/dist/bundle/{oauth-L4VTCBLF.js → oauth-HF5USWXY.js} +5 -5
- package/dist/bundle/{open-SGUN7ZVF.js → open-NHGJENCX.js} +2 -2
- package/dist/bundle/{openai-RLVISEDH.js → openai-3JCJYKNX.js} +6 -6
- package/dist/bundle/{program-YVLXSKZV.js → program-QAJ66K3Z.js} +713 -902
- package/dist/bundle/{prompt-AUWTBLO7.js → prompt-LQJBCCUF.js} +3 -3
- package/dist/bundle/{recognize-ORX2UBQW.js → recognize-QM3LN4ZF.js} +1 -1
- package/dist/bundle/{remote-AGIJY73X.js → remote-WREGEZJQ.js} +5 -5
- package/dist/bundle/{rerank-R6PE44M5.js → rerank-YFUB6J6M.js} +4 -4
- package/dist/bundle/{chunk-G7DCVJ4F.js → serve-7NFEZ564.js} +7 -4
- package/dist/bundle/{chunk-F7UUZATI.js → server-KBCFZ2AU.js} +38 -11
- package/dist/bundle/server-UYVL2CFI.js +63 -0
- package/dist/bundle/{services-HZFTTZSF.js → services-C3XWRA2W.js} +16 -21
- package/dist/bundle/{sqlite-runtime-DTGPR2T2.js → sqlite-runtime-H3TSAMIN.js} +3 -3
- package/dist/bundle/{state-WG3JKJM3.js → state-S2Q53L6L.js} +3 -3
- package/dist/bundle/{store-33VHIMEO.js → store-H345VQHP.js} +6 -8
- package/dist/bundle/{store-EV72MT5U.js → store-I27LAJPU.js} +7 -9
- package/dist/bundle/store-maintenance-command-3XA73XMC.js +52 -0
- package/dist/bundle/{chunk-GNI7INK6.js → terminal-DHJ4D3BC.js} +2 -3
- package/dist/bundle/tokens-7MUGKFEM.js +96 -0
- package/dist/commands/context.d.ts +14 -13
- package/dist/commands/context.d.ts.map +1 -1
- package/dist/commands/context.js.map +1 -1
- package/dist/commands/documents.d.ts.map +1 -1
- package/dist/commands/documents.js +1 -4
- package/dist/commands/documents.js.map +1 -1
- package/dist/commands/mirrors.d.ts.map +1 -1
- package/dist/commands/mirrors.js +1 -2
- package/dist/commands/mirrors.js.map +1 -1
- package/dist/commands/upgrade.d.ts +1 -1
- package/dist/commands/upgrade.d.ts.map +1 -1
- package/dist/commands/upgrade.js +4 -9
- package/dist/commands/upgrade.js.map +1 -1
- package/dist/config.d.ts +182 -0
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +38 -3
- package/dist/config.js.map +1 -1
- package/dist/contract-overrides.d.ts +0 -3
- package/dist/contract-overrides.d.ts.map +1 -1
- package/dist/contract-overrides.js +0 -234
- package/dist/contract-overrides.js.map +1 -1
- package/dist/first-screen.d.ts +3 -2
- package/dist/first-screen.d.ts.map +1 -1
- package/dist/first-screen.js +17 -22
- package/dist/first-screen.js.map +1 -1
- package/dist/grants.d.ts +9 -0
- package/dist/grants.d.ts.map +1 -0
- package/dist/grants.js +30 -0
- package/dist/grants.js.map +1 -0
- package/dist/identity.d.ts.map +1 -1
- package/dist/identity.js +2 -0
- package/dist/identity.js.map +1 -1
- package/dist/policy-keys.d.ts +12 -0
- package/dist/policy-keys.d.ts.map +1 -0
- package/dist/policy-keys.js +107 -0
- package/dist/policy-keys.js.map +1 -0
- package/dist/policy.d.ts +1 -8
- package/dist/policy.d.ts.map +1 -1
- package/dist/policy.js +2 -105
- package/dist/policy.js.map +1 -1
- package/dist/program.d.ts +8 -4
- package/dist/program.d.ts.map +1 -1
- package/dist/program.js +251 -222
- package/dist/program.js.map +1 -1
- package/dist/testing/mcp.d.ts +28 -0
- package/dist/testing/mcp.d.ts.map +1 -0
- package/dist/testing/mcp.js +56 -0
- package/dist/testing/mcp.js.map +1 -0
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +4 -3
- package/scenarios/agent-access.md +4 -2
- package/dist/bundle/all-profiles-CYW6XBBS.js +0 -26
- package/dist/bundle/chunk-234MHU76.js +0 -384
- package/dist/bundle/chunk-BBYD2FA3.js +0 -9
- package/dist/bundle/chunk-DO4PDQY5.js +0 -48
- package/dist/bundle/chunk-FDWYPONW.js +0 -1988
- package/dist/bundle/chunk-FQRJWVEB.js +0 -2
- package/dist/bundle/chunk-GJN5B5JK.js +0 -522
- package/dist/bundle/chunk-NPSZPUK6.js +0 -193
- package/dist/bundle/chunk-PDGECM5D.js +0 -138
- package/dist/bundle/chunk-Q765VPZY.js +0 -421
- package/dist/bundle/chunk-QYUHS6DE.js +0 -1714
- package/dist/bundle/chunk-WQRGA75U.js +0 -256
- package/dist/bundle/chunk-YVPHJHIL.js +0 -15572
- package/dist/bundle/chunk-Z47LOJUS.js +0 -484
- package/dist/bundle/failure-IXS2ZHA5.js +0 -37
- package/dist/bundle/google-api-BDUWZMRV.js +0 -83
- package/dist/bundle/mcp-F67RATLF.js +0 -502
- package/dist/bundle/mcp-JZSYPQA4.js +0 -96
- package/dist/bundle/serve-VOBAQHAQ.js +0 -20
- package/dist/bundle/server-24PS4M7U.js +0 -70
- package/dist/bundle/server-G6HFZ2CK.js +0 -57
- package/dist/bundle/store-maintenance-command-ZTUEI4EC.js +0 -58
- package/dist/bundle/terminal-TFCTWLOS.js +0 -11
- package/dist/bundle/tokens-XMOGQFI6.js +0 -102
- package/dist/commands/doctor.d.ts +0 -56
- package/dist/commands/doctor.d.ts.map +0 -1
- package/dist/commands/doctor.js +0 -75
- package/dist/commands/doctor.js.map +0 -1
- package/dist/commands/mcp.d.ts +0 -6
- package/dist/commands/mcp.d.ts.map +0 -1
- package/dist/commands/mcp.js +0 -156
- package/dist/commands/mcp.js.map +0 -1
- package/dist/commands/skill.d.ts +0 -6
- package/dist/commands/skill.d.ts.map +0 -1
- package/dist/commands/skill.js +0 -34
- package/dist/commands/skill.js.map +0 -1
- package/dist/failure.d.ts +0 -88
- package/dist/failure.d.ts.map +0 -1
- package/dist/failure.js +0 -60
- package/dist/failure.js.map +0 -1
- package/dist/mcp.d.ts +0 -175
- package/dist/mcp.d.ts.map +0 -1
- package/dist/mcp.js +0 -412
- package/dist/mcp.js.map +0 -1
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
import { createRequire as __bundleRequire } from "node:module";
|
|
2
|
-
const require = __bundleRequire(import.meta.url);
|
|
3
|
-
import {
|
|
4
|
-
createBotServer,
|
|
5
|
-
serveBotOverStdio
|
|
6
|
-
} from "./chunk-F7UUZATI.js";
|
|
7
|
-
import "./chunk-PSNHPFSK.js";
|
|
8
|
-
import "./chunk-PQYVPCJ2.js";
|
|
9
|
-
import "./chunk-IWFBAWZK.js";
|
|
10
|
-
import "./chunk-FCJAHD4R.js";
|
|
11
|
-
import "./chunk-WQRGA75U.js";
|
|
12
|
-
import "./chunk-5FONRUG6.js";
|
|
13
|
-
import "./chunk-2AUXBJRX.js";
|
|
14
|
-
import "./chunk-H47W2J6S.js";
|
|
15
|
-
import "./chunk-WUX7AUOQ.js";
|
|
16
|
-
import "./chunk-7SH4JHYW.js";
|
|
17
|
-
import "./chunk-Z47LOJUS.js";
|
|
18
|
-
import "./chunk-W7IK7E4B.js";
|
|
19
|
-
import "./chunk-2623YE5I.js";
|
|
20
|
-
import "./chunk-FDWYPONW.js";
|
|
21
|
-
import "./chunk-PEOCBV2Z.js";
|
|
22
|
-
import "./chunk-725OHXKR.js";
|
|
23
|
-
import "./chunk-NSIFQ5OP.js";
|
|
24
|
-
import "./chunk-LONV6HIK.js";
|
|
25
|
-
import "./chunk-VSOLLTYT.js";
|
|
26
|
-
import "./chunk-Q765VPZY.js";
|
|
27
|
-
import "./chunk-GVCN3GLZ.js";
|
|
28
|
-
import "./chunk-7YMDL4JQ.js";
|
|
29
|
-
import "./chunk-DLAFGSTN.js";
|
|
30
|
-
import "./chunk-WLFUBNFX.js";
|
|
31
|
-
import "./chunk-ZDLIO76S.js";
|
|
32
|
-
import "./chunk-UR32UWTQ.js";
|
|
33
|
-
import "./chunk-VZ2I62HN.js";
|
|
34
|
-
import "./chunk-2UIMEMWU.js";
|
|
35
|
-
import "./chunk-CM7GAXGD.js";
|
|
36
|
-
import "./chunk-5DPV7X27.js";
|
|
37
|
-
import "./chunk-BSSCTWWK.js";
|
|
38
|
-
import "./chunk-WQJBAWQP.js";
|
|
39
|
-
import "./chunk-JEOYFKUK.js";
|
|
40
|
-
import "./chunk-234MHU76.js";
|
|
41
|
-
import "./chunk-PDGECM5D.js";
|
|
42
|
-
import "./chunk-ZNZUZGSV.js";
|
|
43
|
-
import "./chunk-NHBUTCNR.js";
|
|
44
|
-
import "./chunk-62EDJKGP.js";
|
|
45
|
-
import "./chunk-7XKAVMCF.js";
|
|
46
|
-
import "./chunk-XOLQSCMF.js";
|
|
47
|
-
import "./chunk-VJZST5RD.js";
|
|
48
|
-
import "./chunk-33NVQGUY.js";
|
|
49
|
-
import "./chunk-HQVJK5E7.js";
|
|
50
|
-
import "./chunk-YKZ4IPLB.js";
|
|
51
|
-
import "./chunk-Y5E2WNWB.js";
|
|
52
|
-
import "./chunk-ALJWBGD5.js";
|
|
53
|
-
import "./chunk-ZVVMGPBJ.js";
|
|
54
|
-
export {
|
|
55
|
-
createBotServer,
|
|
56
|
-
serveBotOverStdio
|
|
57
|
-
};
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
import { createRequire as __bundleRequire } from "node:module";
|
|
2
|
-
const require = __bundleRequire(import.meta.url);
|
|
3
|
-
import {
|
|
4
|
-
buildStems,
|
|
5
|
-
storeMaintenanceCommands,
|
|
6
|
-
storeSummary
|
|
7
|
-
} from "./chunk-43QVYW3K.js";
|
|
8
|
-
import "./chunk-CB7SBYLO.js";
|
|
9
|
-
import "./chunk-2AUXBJRX.js";
|
|
10
|
-
import "./chunk-NPSZPUK6.js";
|
|
11
|
-
import "./chunk-KYVXMEBC.js";
|
|
12
|
-
import "./chunk-H47W2J6S.js";
|
|
13
|
-
import "./chunk-WUX7AUOQ.js";
|
|
14
|
-
import "./chunk-7SH4JHYW.js";
|
|
15
|
-
import "./chunk-Z47LOJUS.js";
|
|
16
|
-
import "./chunk-W7IK7E4B.js";
|
|
17
|
-
import "./chunk-HTQTIKWP.js";
|
|
18
|
-
import "./chunk-FDWYPONW.js";
|
|
19
|
-
import "./chunk-PEOCBV2Z.js";
|
|
20
|
-
import "./chunk-725OHXKR.js";
|
|
21
|
-
import "./chunk-NSIFQ5OP.js";
|
|
22
|
-
import "./chunk-LONV6HIK.js";
|
|
23
|
-
import "./chunk-VSOLLTYT.js";
|
|
24
|
-
import "./chunk-Q765VPZY.js";
|
|
25
|
-
import "./chunk-GVCN3GLZ.js";
|
|
26
|
-
import "./chunk-7YMDL4JQ.js";
|
|
27
|
-
import "./chunk-DLAFGSTN.js";
|
|
28
|
-
import "./chunk-WLFUBNFX.js";
|
|
29
|
-
import "./chunk-ZDLIO76S.js";
|
|
30
|
-
import "./chunk-PQJYM5ES.js";
|
|
31
|
-
import "./chunk-UR32UWTQ.js";
|
|
32
|
-
import "./chunk-LJAX6YCF.js";
|
|
33
|
-
import "./chunk-VZ2I62HN.js";
|
|
34
|
-
import "./chunk-2UIMEMWU.js";
|
|
35
|
-
import "./chunk-CM7GAXGD.js";
|
|
36
|
-
import "./chunk-5DPV7X27.js";
|
|
37
|
-
import "./chunk-BSSCTWWK.js";
|
|
38
|
-
import "./chunk-WQJBAWQP.js";
|
|
39
|
-
import "./chunk-JEOYFKUK.js";
|
|
40
|
-
import "./chunk-234MHU76.js";
|
|
41
|
-
import "./chunk-PDGECM5D.js";
|
|
42
|
-
import "./chunk-ZNZUZGSV.js";
|
|
43
|
-
import "./chunk-NHBUTCNR.js";
|
|
44
|
-
import "./chunk-62EDJKGP.js";
|
|
45
|
-
import "./chunk-7XKAVMCF.js";
|
|
46
|
-
import "./chunk-XOLQSCMF.js";
|
|
47
|
-
import "./chunk-VJZST5RD.js";
|
|
48
|
-
import "./chunk-33NVQGUY.js";
|
|
49
|
-
import "./chunk-HQVJK5E7.js";
|
|
50
|
-
import "./chunk-YKZ4IPLB.js";
|
|
51
|
-
import "./chunk-Y5E2WNWB.js";
|
|
52
|
-
import "./chunk-ALJWBGD5.js";
|
|
53
|
-
import "./chunk-ZVVMGPBJ.js";
|
|
54
|
-
export {
|
|
55
|
-
buildStems,
|
|
56
|
-
storeMaintenanceCommands,
|
|
57
|
-
storeSummary
|
|
58
|
-
};
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { createRequire as __bundleRequire } from "node:module";
|
|
2
|
-
const require = __bundleRequire(import.meta.url);
|
|
3
|
-
import {
|
|
4
|
-
interactiveOf,
|
|
5
|
-
optionsOf
|
|
6
|
-
} from "./chunk-GNI7INK6.js";
|
|
7
|
-
import "./chunk-ZVVMGPBJ.js";
|
|
8
|
-
export {
|
|
9
|
-
interactiveOf,
|
|
10
|
-
optionsOf
|
|
11
|
-
};
|
|
@@ -1,102 +0,0 @@
|
|
|
1
|
-
import { createRequire as __bundleRequire } from "node:module";
|
|
2
|
-
const require = __bundleRequire(import.meta.url);
|
|
3
|
-
import {
|
|
4
|
-
authorizedClient,
|
|
5
|
-
checkAuthorization,
|
|
6
|
-
covers,
|
|
7
|
-
credentials,
|
|
8
|
-
googleProvider,
|
|
9
|
-
grantedScopes,
|
|
10
|
-
notSaved,
|
|
11
|
-
observeRequests,
|
|
12
|
-
operationOf,
|
|
13
|
-
saveSession,
|
|
14
|
-
sessionKeeper
|
|
15
|
-
} from "./chunk-IEXPOEEO.js";
|
|
16
|
-
import "./chunk-PAXKALHV.js";
|
|
17
|
-
import "./chunk-O6IOL6RX.js";
|
|
18
|
-
import {
|
|
19
|
-
ACTIVITY_SCOPE,
|
|
20
|
-
APPS_SCOPE,
|
|
21
|
-
READ_SCOPE,
|
|
22
|
-
WRITE_SCOPE
|
|
23
|
-
} from "./chunk-HX7Y2ASG.js";
|
|
24
|
-
import "./chunk-R276546S.js";
|
|
25
|
-
import "./chunk-6DHQTUB2.js";
|
|
26
|
-
import "./chunk-A4UNTWAX.js";
|
|
27
|
-
import "./chunk-DO4PDQY5.js";
|
|
28
|
-
import "./chunk-PSNHPFSK.js";
|
|
29
|
-
import "./chunk-IWFBAWZK.js";
|
|
30
|
-
import "./chunk-SBZB7HMU.js";
|
|
31
|
-
import "./chunk-WQRGA75U.js";
|
|
32
|
-
import "./chunk-RNSP57TC.js";
|
|
33
|
-
import "./chunk-43QVYW3K.js";
|
|
34
|
-
import "./chunk-CB7SBYLO.js";
|
|
35
|
-
import "./chunk-2AUXBJRX.js";
|
|
36
|
-
import "./chunk-NPSZPUK6.js";
|
|
37
|
-
import "./chunk-KYVXMEBC.js";
|
|
38
|
-
import "./chunk-H47W2J6S.js";
|
|
39
|
-
import "./chunk-WUX7AUOQ.js";
|
|
40
|
-
import "./chunk-7SH4JHYW.js";
|
|
41
|
-
import "./chunk-Z47LOJUS.js";
|
|
42
|
-
import "./chunk-W7IK7E4B.js";
|
|
43
|
-
import "./chunk-I7UH5CTA.js";
|
|
44
|
-
import "./chunk-HTQTIKWP.js";
|
|
45
|
-
import "./chunk-5PLJKSG4.js";
|
|
46
|
-
import "./chunk-2623YE5I.js";
|
|
47
|
-
import "./chunk-FDWYPONW.js";
|
|
48
|
-
import "./chunk-PEOCBV2Z.js";
|
|
49
|
-
import "./chunk-725OHXKR.js";
|
|
50
|
-
import "./chunk-NSIFQ5OP.js";
|
|
51
|
-
import "./chunk-LONV6HIK.js";
|
|
52
|
-
import "./chunk-VSOLLTYT.js";
|
|
53
|
-
import "./chunk-Q765VPZY.js";
|
|
54
|
-
import "./chunk-GVCN3GLZ.js";
|
|
55
|
-
import "./chunk-WBTVGFXI.js";
|
|
56
|
-
import "./chunk-7YMDL4JQ.js";
|
|
57
|
-
import "./chunk-DLAFGSTN.js";
|
|
58
|
-
import "./chunk-WLFUBNFX.js";
|
|
59
|
-
import "./chunk-54O62JWP.js";
|
|
60
|
-
import "./chunk-ZDLIO76S.js";
|
|
61
|
-
import "./chunk-PQJYM5ES.js";
|
|
62
|
-
import "./chunk-UR32UWTQ.js";
|
|
63
|
-
import "./chunk-LJAX6YCF.js";
|
|
64
|
-
import "./chunk-VZ2I62HN.js";
|
|
65
|
-
import "./chunk-2UIMEMWU.js";
|
|
66
|
-
import "./chunk-CM7GAXGD.js";
|
|
67
|
-
import "./chunk-5DPV7X27.js";
|
|
68
|
-
import "./chunk-BSSCTWWK.js";
|
|
69
|
-
import "./chunk-IDUNJCFO.js";
|
|
70
|
-
import "./chunk-WQJBAWQP.js";
|
|
71
|
-
import "./chunk-JEOYFKUK.js";
|
|
72
|
-
import "./chunk-234MHU76.js";
|
|
73
|
-
import "./chunk-PDGECM5D.js";
|
|
74
|
-
import "./chunk-ZNZUZGSV.js";
|
|
75
|
-
import "./chunk-NHBUTCNR.js";
|
|
76
|
-
import "./chunk-62EDJKGP.js";
|
|
77
|
-
import "./chunk-7XKAVMCF.js";
|
|
78
|
-
import "./chunk-XOLQSCMF.js";
|
|
79
|
-
import "./chunk-VJZST5RD.js";
|
|
80
|
-
import "./chunk-33NVQGUY.js";
|
|
81
|
-
import "./chunk-HQVJK5E7.js";
|
|
82
|
-
import "./chunk-YKZ4IPLB.js";
|
|
83
|
-
import "./chunk-Y5E2WNWB.js";
|
|
84
|
-
import "./chunk-ALJWBGD5.js";
|
|
85
|
-
import "./chunk-ZVVMGPBJ.js";
|
|
86
|
-
export {
|
|
87
|
-
ACTIVITY_SCOPE,
|
|
88
|
-
APPS_SCOPE,
|
|
89
|
-
READ_SCOPE,
|
|
90
|
-
WRITE_SCOPE,
|
|
91
|
-
authorizedClient,
|
|
92
|
-
checkAuthorization,
|
|
93
|
-
covers,
|
|
94
|
-
credentials,
|
|
95
|
-
googleProvider,
|
|
96
|
-
grantedScopes,
|
|
97
|
-
notSaved,
|
|
98
|
-
observeRequests,
|
|
99
|
-
operationOf,
|
|
100
|
-
saveSession,
|
|
101
|
-
sessionKeeper
|
|
102
|
-
};
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
import type { Command } from "commander";
|
|
2
|
-
import type { CommandContext } from "./context.js";
|
|
3
|
-
/**
|
|
4
|
-
* Answers when everything else is broken, since that is when it is run: an unreadable config or OAuth setting is a
|
|
5
|
-
* field, never an exception. It reads no keyring and opens no database, because either can hang or prompt.
|
|
6
|
-
*/
|
|
7
|
-
export declare const doctorReport: (env: NodeJS.ProcessEnv, permissionKeys: ReadonlySet<string>) => {
|
|
8
|
-
version: string;
|
|
9
|
-
runtime: {
|
|
10
|
-
node: string;
|
|
11
|
-
platform: NodeJS.Platform;
|
|
12
|
-
};
|
|
13
|
-
paths: {
|
|
14
|
-
config: string;
|
|
15
|
-
state: string;
|
|
16
|
-
cache: string;
|
|
17
|
-
};
|
|
18
|
-
config: {
|
|
19
|
-
path: string;
|
|
20
|
-
found: boolean;
|
|
21
|
-
issues: import("@wirecat/cli-core/cli").ConfigIssue[];
|
|
22
|
-
};
|
|
23
|
-
profiles: {
|
|
24
|
-
profile: string;
|
|
25
|
-
selected_folders: number;
|
|
26
|
-
storage: "file" | "keyring";
|
|
27
|
-
}[];
|
|
28
|
-
oauth_application: {
|
|
29
|
-
client: "wirecat" | "own";
|
|
30
|
-
error?: string;
|
|
31
|
-
};
|
|
32
|
-
store: {
|
|
33
|
-
path: string;
|
|
34
|
-
exists: boolean;
|
|
35
|
-
};
|
|
36
|
-
read_only: string | null;
|
|
37
|
-
profile_lock: string | null;
|
|
38
|
-
login: string;
|
|
39
|
-
files: {
|
|
40
|
-
checked: false;
|
|
41
|
-
reason: string;
|
|
42
|
-
} | {
|
|
43
|
-
checked: true;
|
|
44
|
-
ok: boolean;
|
|
45
|
-
problems: {
|
|
46
|
-
path: string;
|
|
47
|
-
mode: string;
|
|
48
|
-
want: string;
|
|
49
|
-
}[];
|
|
50
|
-
};
|
|
51
|
-
fixes: string[];
|
|
52
|
-
};
|
|
53
|
-
declare const installDoctorCommandDefinition: (program: Command, { env, output, streams, policyFlags }: CommandContext) => void;
|
|
54
|
-
export declare const installDoctorCommand: (...args: Parameters<typeof installDoctorCommandDefinition>) => void;
|
|
55
|
-
export {};
|
|
56
|
-
//# sourceMappingURL=doctor.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"doctor.d.ts","sourceRoot":"","sources":["../../src/commands/doctor.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AAMxC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,cAAc,CAAA;AAOlD;;;GAGG;AACH,eAAO,MAAM,YAAY,QAAS,MAAM,CAAC,UAAU,kBAAkB,WAAW,CAAC,MAAM,CAAC;;;QAqBzE,IAAI;QAAyB,QAAQ;;;QACvC,MAAM;QAAgB,KAAK;QAAe,KAAK;;;;;;;;;;;;;gBAbrC,SAAS,GAAG,KAAK;gBAAU,MAAM;;;QAiB3C,IAAI;QAAS,MAAM;;;;;;;;;;;;;;;;;;CAS/B,CAAA;AAED,QAAA,MAAM,8BAA8B,YAAa,OAAO,yCAAyC,cAAc,SAW9G,CAAA;AAED,eAAO,MAAM,oBAAoB,YAAa,UAAU,CAAC,OAAO,8BAA8B,CAAC,SAY9F,CAAA"}
|
package/dist/commands/doctor.js
DELETED
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
import { existsSync } from "node:fs";
|
|
2
|
-
import { resolve } from "node:path";
|
|
3
|
-
import { CliError } from "@wirecat/cli-base";
|
|
4
|
-
import { annotate, customizeSharedCommand } from "@wirecat/cli-base/commands";
|
|
5
|
-
import { itemOf, LOCAL_READ, privateFiles, sharedCommandTemplate } from "@wirecat/cli-core/cli";
|
|
6
|
-
import { storePath } from "@wirecat/cli-core/store";
|
|
7
|
-
import { application, inspectConfig, paths } from "../config.js";
|
|
8
|
-
import { SHELL_OVERRIDES } from "../contract-overrides.js";
|
|
9
|
-
import { DRIVE_APP, permissionNames } from "../policy.js";
|
|
10
|
-
import { examples } from "../registry.js";
|
|
11
|
-
import { VERSION } from "../version.js";
|
|
12
|
-
const failure = (error) => {
|
|
13
|
-
if (error instanceof CliError)
|
|
14
|
-
return error.message;
|
|
15
|
-
throw error;
|
|
16
|
-
};
|
|
17
|
-
/**
|
|
18
|
-
* Answers when everything else is broken, since that is when it is run: an unreadable config or OAuth setting is a
|
|
19
|
-
* field, never an exception. It reads no keyring and opens no database, because either can hang or prompt.
|
|
20
|
-
*/
|
|
21
|
-
export const doctorReport = (env, permissionKeys) => {
|
|
22
|
-
const where = paths(env);
|
|
23
|
-
const file = inspectConfig(env, permissionNames(permissionKeys));
|
|
24
|
-
const config = { path: file.path, found: file.found, issues: file.issues };
|
|
25
|
-
const profiles = Object.entries(file.config.profiles).map(([name, profile]) => ({
|
|
26
|
-
profile: name,
|
|
27
|
-
selected_folders: profile.roots.length,
|
|
28
|
-
storage: profile.storage,
|
|
29
|
-
}));
|
|
30
|
-
let oauth;
|
|
31
|
-
try {
|
|
32
|
-
application(env);
|
|
33
|
-
oauth = { client: env.DRIVE_GOOGLE_CLIENT_ID ? "own" : "wirecat" };
|
|
34
|
-
}
|
|
35
|
-
catch (error) {
|
|
36
|
-
oauth = { client: "own", error: failure(error) };
|
|
37
|
-
}
|
|
38
|
-
const store = resolve(storePath(env));
|
|
39
|
-
// The credential file of `--credential-storage file` sits in this folder, so the folder keeps it private too.
|
|
40
|
-
const files = privateFiles({ files: [file.path], dirs: [where.config] });
|
|
41
|
-
return {
|
|
42
|
-
version: VERSION,
|
|
43
|
-
runtime: { node: process.versions.node, platform: process.platform },
|
|
44
|
-
paths: { config: where.config, state: where.state, cache: where.cache },
|
|
45
|
-
config,
|
|
46
|
-
profiles,
|
|
47
|
-
oauth_application: oauth,
|
|
48
|
-
store: { path: store, exists: existsSync(store) },
|
|
49
|
-
read_only: env.DRIVE_READ_ONLY && env.DRIVE_READ_ONLY !== "0" ? "DRIVE_READ_ONLY" : null,
|
|
50
|
-
profile_lock: env.DRIVE_PROFILE_LOCK || null,
|
|
51
|
-
login: "not checked",
|
|
52
|
-
files: files.checked
|
|
53
|
-
? { ...files, problems: files.problems.map(({ path, mode, want }) => ({ path, mode, want })) }
|
|
54
|
-
: files,
|
|
55
|
-
fixes: files.checked ? files.problems.map((problem) => problem.fix) : [],
|
|
56
|
-
};
|
|
57
|
-
};
|
|
58
|
-
const installDoctorCommandDefinition = (program, { env, output, streams, policyFlags }) => {
|
|
59
|
-
examples(annotate(program.command("doctor"), { effects: LOCAL_READ }).description("check this installation: config, profiles, paths; no keyring, store or network"), ["drive doctor", "drive doctor --json"]).action(() => {
|
|
60
|
-
const { fixes, ...report } = doctorReport(env, policyFlags().permissionKeys ?? new Set());
|
|
61
|
-
output(itemOf(report));
|
|
62
|
-
for (const fix of fixes)
|
|
63
|
-
streams.diagnostic(`to make it private: ${fix}`);
|
|
64
|
-
});
|
|
65
|
-
};
|
|
66
|
-
export const installDoctorCommand = (...args) => {
|
|
67
|
-
customizeSharedCommand(sharedCommandTemplate(DRIVE_APP, "doctor"), "Drive diagnoses public OAuth configuration and local paths without opening a keyring, database or Google connection.", () => {
|
|
68
|
-
installDoctorCommandDefinition(...args);
|
|
69
|
-
const command = args[0].commands.find((command) => command.name() === "doctor");
|
|
70
|
-
if (!command)
|
|
71
|
-
throw new Error("doctor builder did not install its command");
|
|
72
|
-
return command;
|
|
73
|
-
}, SHELL_OVERRIDES.doctor);
|
|
74
|
-
};
|
|
75
|
-
//# sourceMappingURL=doctor.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"doctor.js","sourceRoot":"","sources":["../../src/commands/doctor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAA;AACpC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AACnC,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAA;AAC5C,OAAO,EAAE,QAAQ,EAAE,sBAAsB,EAAE,MAAM,4BAA4B,CAAA;AAC7E,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,YAAY,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAA;AAC/F,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAA;AAEnD,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,KAAK,EAAE,MAAM,cAAc,CAAA;AAChE,OAAO,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAA;AAC1D,OAAO,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,cAAc,CAAA;AACzD,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAA;AACzC,OAAO,EAAE,OAAO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M,CACvB,CAAA;AACH,CAAC,CAAA"}
|
package/dist/commands/mcp.d.ts
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import type { Command } from "commander";
|
|
2
|
-
import type { CommandContext, ProgramOptions } from "./context.js";
|
|
3
|
-
declare const installMcpCommandDefinition: (program: Command, { env, streams, options, selected, output, policyFlags, signal, profileWord }: CommandContext, createProgram: (options: ProgramOptions) => Command) => void;
|
|
4
|
-
export declare const installMcpCommand: (...args: Parameters<typeof installMcpCommandDefinition>) => Command;
|
|
5
|
-
export {};
|
|
6
|
-
//# sourceMappingURL=mcp.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"mcp.d.ts","sourceRoot":"","sources":["../../src/commands/mcp.ts"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AAOxC,OAAO,KAAK,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,cAAc,CAAA;AASlE,QAAA,MAAM,2BAA2B,YACtB,OAAO,iFAC+D,cAAc,iBAC9E,CAAC,OAAO,EAAE,cAAc,KAAK,OAAO,SA6MpD,CAAA;AAED,eAAO,MAAM,iBAAiB,YAAa,UAAU,CAAC,OAAO,2BAA2B,CAAC,YAWtF,CAAA"}
|
package/dist/commands/mcp.js
DELETED
|
@@ -1,156 +0,0 @@
|
|
|
1
|
-
import { CliError } from "@wirecat/cli-base";
|
|
2
|
-
import { annotate, customizeSharedCommand } from "@wirecat/cli-base/commands";
|
|
3
|
-
import { writes } from "@wirecat/cli-base/standards";
|
|
4
|
-
import { itemOf, LOCAL_READ, LOCAL_WRITE, mcpServerCommand, REMOTE_WRITE, readOnlyRefusal, sharedCommandTemplate, } from "@wirecat/cli-core/cli";
|
|
5
|
-
import { readConfig } from "../config.js";
|
|
6
|
-
import { SHELL_OVERRIDES } from "../contract-overrides.js";
|
|
7
|
-
import { allOf } from "../output.js";
|
|
8
|
-
import { DRIVE_APP, permissionNames, refuseUnderReadOnly } from "../policy.js";
|
|
9
|
-
import { examples } from "../registry.js";
|
|
10
|
-
import { httpTokenFile, profileSetLabel, profileSetTokenFile } from "../state.js";
|
|
11
|
-
const DEFAULT_PORT = 8765;
|
|
12
|
-
const SERVER_PURPOSE = {
|
|
13
|
-
stop: "whose server to stop",
|
|
14
|
-
status: "whose server to check",
|
|
15
|
-
};
|
|
16
|
-
const installMcpCommandDefinition = (program, { env, streams, options, selected, output, policyFlags, signal, profileWord }, createProgram) => {
|
|
17
|
-
const profiles = () => Object.keys(readConfig(env, permissionNames(policyFlags().permissionKeys ?? new Set())).profiles).sort();
|
|
18
|
-
// The handbook rule WC-MCP-9: the profiles a server serves are always named, as cli-core's `servedProfiles` does.
|
|
19
|
-
const served = (given, words, purpose = "to serve") => {
|
|
20
|
-
const word = profileWord();
|
|
21
|
-
const listed = () => `profiles here: ${profiles().join(", ") || "none"}`;
|
|
22
|
-
if (given === undefined && (word ?? env.DRIVE_PROFILE ?? env.DRIVE_PROFILE_LOCK))
|
|
23
|
-
return { profile: selected() };
|
|
24
|
-
if (given !== undefined && word !== undefined)
|
|
25
|
-
throw new CliError("validation_error", `name one profile or --profiles, not both: \`drive ${word} ${words}\` or \`drive ${words} --profiles ${given}\``, { profiles: profiles() });
|
|
26
|
-
if (given === undefined) {
|
|
27
|
-
if (profiles().length === 0)
|
|
28
|
-
throw new CliError("configuration_error", "no drive profile here yet; create one with drive personal session start (any name in place of personal)");
|
|
29
|
-
throw new CliError("validation_error", `name the profiles ${purpose}: \`drive <profile> ${words}\`, or \`drive ${words} --profiles <a,b>\` or ` +
|
|
30
|
-
`\`--profiles all\` — ${listed()}`, { profiles: profiles() });
|
|
31
|
-
}
|
|
32
|
-
const names = [...new Set(given.split(",").map((one) => one.trim()))].filter(Boolean).sort();
|
|
33
|
-
const lock = env.DRIVE_PROFILE_LOCK?.trim();
|
|
34
|
-
if (lock && names.some((one) => one !== lock))
|
|
35
|
-
throw new CliError("permission_error", `this process is locked to profile ${lock} (DRIVE_PROFILE_LOCK) — --profiles may name only ${lock}`, { reason: "profile.lock-refused" });
|
|
36
|
-
if (lock)
|
|
37
|
-
return { set: { option: lock, profiles: () => [lock] } };
|
|
38
|
-
if (names.length === 1 && names[0] === "all")
|
|
39
|
-
return { set: { option: "all", profiles } };
|
|
40
|
-
if (names.length === 0 || names.includes("all"))
|
|
41
|
-
throw new CliError("validation_error", "--profiles takes profile names, comma-separated, or `all` alone for every profile — a profile named all " +
|
|
42
|
-
`is served as \`drive all ${words}\`; ${listed()}`, { profiles: profiles() });
|
|
43
|
-
const unknown = names.filter((one) => !profiles().includes(one));
|
|
44
|
-
if (unknown.length > 0)
|
|
45
|
-
throw new CliError("validation_error", `no profile named ${unknown.map((one) => `"${one}"`).join(", ")} — ${listed()}`, { profiles: profiles() });
|
|
46
|
-
return { set: { option: names.join(","), profiles: () => names } };
|
|
47
|
-
};
|
|
48
|
-
const withProfiles = (command) => command.option("--profiles <names|all>", "serve several profiles from one server instead of one: names, comma-separated, or all for every profile");
|
|
49
|
-
const group = annotate(program.command("mcp"), { effects: LOCAL_READ, mcp: false })
|
|
50
|
-
.summary("serve this profile's commands to an AI agent, and set that up")
|
|
51
|
-
.description("serve this profile to an agent over MCP and set it up — `claude mcp add drive -- drive <profile> mcp serve`");
|
|
52
|
-
const serve = examples(annotate(group.command("serve"), { effects: REMOTE_WRITE, lifetime: "persistent", mcp: false })
|
|
53
|
-
.summary("serve this profile's commands to an AI agent")
|
|
54
|
-
.description("serve this profile to an agent over MCP, on stdin and stdout — `claude mcp add drive -- drive <profile> mcp serve`; `drive mcp serve --profiles a,b` or `--profiles all` serves those profiles from one server and each tool asks which"), [
|
|
55
|
-
"drive personal mcp serve --tools",
|
|
56
|
-
"drive personal mcp serve",
|
|
57
|
-
"drive personal mcp serve --http --public-url https://laptop.example.ts.net",
|
|
58
|
-
])
|
|
59
|
-
.option("--tools", "list the commands the server offers instead of starting it")
|
|
60
|
-
.option("--http", "serve over HTTP on 127.0.0.1 for ChatGPT and Claude in the browser, behind your tunnel; the profile's permissions decide")
|
|
61
|
-
.option("--port <port>", `the local port for --http (default ${DEFAULT_PORT})`)
|
|
62
|
-
.option("--public-url <url>", "the tunnel's https address the browser apps use, e.g. https://<name>.ts.net or https://<name>.ts.net/drive");
|
|
63
|
-
withProfiles(serve).action(async (args) => {
|
|
64
|
-
const { mcpTools, serveMcp, serveMcpOverHttp, serveProfiles } = await import("../mcp.js");
|
|
65
|
-
const { portOf, publicUrlOf } = await import("@wirecat/cli-core/mcp");
|
|
66
|
-
const tunnel = () => publicUrlOf(args.publicUrl, { missing: "--http", reaches: "the browser apps reach drive", path: true });
|
|
67
|
-
const one = served(args.profiles, "mcp serve");
|
|
68
|
-
if ("set" in one) {
|
|
69
|
-
if (args.tools)
|
|
70
|
-
throw new CliError("validation_error", "--tools lists one profile's commands: `drive <profile> mcp serve --tools`");
|
|
71
|
-
const active = signal();
|
|
72
|
-
await serveProfiles({
|
|
73
|
-
env,
|
|
74
|
-
set: one.set,
|
|
75
|
-
permissions: policyFlags().permission ?? [],
|
|
76
|
-
note: (text) => streams.diagnostic(text),
|
|
77
|
-
...(active ? { signal: active } : {}),
|
|
78
|
-
...(args.http ? { http: { publicUrl: tunnel(), port: portOf(args.port, DEFAULT_PORT) } } : {}),
|
|
79
|
-
});
|
|
80
|
-
}
|
|
81
|
-
else if (args.http) {
|
|
82
|
-
const active = signal();
|
|
83
|
-
await serveMcpOverHttp(createProgram, { ...options, env, ...(active ? { signal: active } : {}) }, one.profile, policyFlags(), {
|
|
84
|
-
publicUrl: tunnel(),
|
|
85
|
-
port: portOf(args.port, DEFAULT_PORT),
|
|
86
|
-
note: (text) => streams.diagnostic(text),
|
|
87
|
-
});
|
|
88
|
-
}
|
|
89
|
-
else if (args.tools)
|
|
90
|
-
output(allOf(mcpTools(createProgram, { ...options, env }, one.profile, policyFlags()).map(({ schema, command, availability }) => ({
|
|
91
|
-
command: command.path.join(" "),
|
|
92
|
-
writes: writes(command.effects),
|
|
93
|
-
input_schema: schema,
|
|
94
|
-
effects: command.effects,
|
|
95
|
-
availability: availability?.() ?? { available: true },
|
|
96
|
-
}))));
|
|
97
|
-
else {
|
|
98
|
-
const active = signal();
|
|
99
|
-
await serveMcp(createProgram, { ...options, env, ...(active ? { signal: active } : {}) }, one.profile, policyFlags());
|
|
100
|
-
}
|
|
101
|
-
});
|
|
102
|
-
withProfiles(examples(annotate(group.command("revoke"), { effects: LOCAL_WRITE, mcp: false })
|
|
103
|
-
.summary("forget every login given to a browser app")
|
|
104
|
-
.description("forget every login `mcp serve --http` gave a browser app, of this profile or of the server `--profiles` names; each app must log in again"), ["drive personal mcp revoke"])).action(async (args) => {
|
|
105
|
-
refuseUnderReadOnly(env, "forget the browser logins");
|
|
106
|
-
if (policyFlags().readOnly)
|
|
107
|
-
throw readOnlyRefusal("--read-only", "forget the browser logins");
|
|
108
|
-
const { revokeAll } = await import("@wirecat/cli-core/mcp");
|
|
109
|
-
const one = served(args.profiles, "mcp revoke", "whose browser logins to forget");
|
|
110
|
-
if ("set" in one) {
|
|
111
|
-
revokeAll(profileSetTokenFile(env, one.set.option));
|
|
112
|
-
output(itemOf({ revoked: true, profile: null, profiles: one.set.option }));
|
|
113
|
-
}
|
|
114
|
-
else {
|
|
115
|
-
revokeAll(httpTokenFile(env, one.profile));
|
|
116
|
-
output(itemOf({ revoked: true, profile: one.profile }));
|
|
117
|
-
}
|
|
118
|
-
});
|
|
119
|
-
const server = mcpServerCommand({
|
|
120
|
-
example: "drive personal",
|
|
121
|
-
profiles: true,
|
|
122
|
-
target: (self) => {
|
|
123
|
-
const one = served(self.opts().profiles, `mcp server ${self.name()}`, SERVER_PURPOSE[self.name()]);
|
|
124
|
-
if ("set" in one)
|
|
125
|
-
return {
|
|
126
|
-
invocation: "drive",
|
|
127
|
-
// drive 0.45 marked every set's server "default"; a new key would leave those servers unstoppable.
|
|
128
|
-
profiles: { option: one.set.option, key: "default", label: profileSetLabel(one.set) },
|
|
129
|
-
envPrefix: DRIVE_APP.envPrefix,
|
|
130
|
-
env,
|
|
131
|
-
tokenFile: profileSetTokenFile(env, one.set.option),
|
|
132
|
-
argv: ["mcp", "serve", "--http", "--profiles", one.set.option],
|
|
133
|
-
version: DRIVE_APP.version,
|
|
134
|
-
};
|
|
135
|
-
return {
|
|
136
|
-
invocation: `drive ${one.profile}`,
|
|
137
|
-
profile: one.profile,
|
|
138
|
-
envPrefix: DRIVE_APP.envPrefix,
|
|
139
|
-
env,
|
|
140
|
-
tokenFile: httpTokenFile(env, one.profile),
|
|
141
|
-
argv: [one.profile, "mcp", "serve", "--http"],
|
|
142
|
-
version: DRIVE_APP.version,
|
|
143
|
-
};
|
|
144
|
-
},
|
|
145
|
-
answer: (_self, item) => output(itemOf(item)),
|
|
146
|
-
});
|
|
147
|
-
group.addCommand(server);
|
|
148
|
-
};
|
|
149
|
-
export const installMcpCommand = (...args) => customizeSharedCommand(sharedCommandTemplate(DRIVE_APP, "mcp"), "Drive exposes Google document tools over stdio and HTTP using OAuth grants and its document permission adapter; its tool listing and command catalogue replace the messenger setup commands.", () => {
|
|
150
|
-
installMcpCommandDefinition(...args);
|
|
151
|
-
const command = args[0].commands.find((command) => command.name() === "mcp");
|
|
152
|
-
if (!command)
|
|
153
|
-
throw new Error("mcp builder did not install its command");
|
|
154
|
-
return command;
|
|
155
|
-
}, SHELL_OVERRIDES.mcp);
|
|
156
|
-
//# sourceMappingURL=mcp.js.map
|
package/dist/commands/mcp.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"mcp.js","sourceRoot":"","sources":["../../src/commands/mcp.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAA;AAC5C,OAAO,EAAE,QAAQ,EAAE,sBAAsB,EAAE,MAAM,4BAA4B,CAAA;AAC7E,OAAO,EAAE,MAAM,EAAE,MAAM,6BAA6B,CAAA;AACpD,OAAO,EACL,MAAM,EACN,UAAU,EACV,WAAW,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C,MAAM,OAAO,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,IAAI,EAAE,KAAK,KAAK,CAAC,CAAA;IAC5E,IAAI,CAAC,OAAO;QAAE,MAAM,IAAI,KAAK,CAAC,yCAAyC,CAAC,CAAA;IACxE,OAAO,OAAO,CAAA;AAChB,CAAC,EACD,eAAe,CAAC,GAAG,CACpB,CAAA"}
|
package/dist/commands/skill.d.ts
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import type { Command } from "commander";
|
|
2
|
-
import type { CommandContext } from "./context.js";
|
|
3
|
-
declare const installSkillCommandDefinition: (program: Command, { env, streams, output }: CommandContext) => void;
|
|
4
|
-
export declare const installSkillCommand: (...args: Parameters<typeof installSkillCommandDefinition>) => void;
|
|
5
|
-
export {};
|
|
6
|
-
//# sourceMappingURL=skill.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"skill.d.ts","sourceRoot":"","sources":["../../src/commands/skill.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AAIxC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,cAAc,CAAA;AAElD,QAAA,MAAM,6BAA6B,YAAa,OAAO,4BAA4B,cAAc,SAqBhG,CAAA;AAED,eAAO,MAAM,mBAAmB,YAAa,UAAU,CAAC,OAAO,6BAA6B,CAAC,SAY5F,CAAA"}
|
package/dist/commands/skill.js
DELETED
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import { createRenderer } from "@wirecat/cli-base";
|
|
2
|
-
import { annotate, customizeSharedCommand } from "@wirecat/cli-base/commands";
|
|
3
|
-
import { skillCommand } from "@wirecat/cli-base/skill";
|
|
4
|
-
import { grantsAuthority, itemOf, LOCAL_WRITE, NO_EFFECTS, skillCommand as sharedSkillCommand, } from "@wirecat/cli-core/cli";
|
|
5
|
-
import { SHELL_OVERRIDES } from "../contract-overrides.js";
|
|
6
|
-
import { DRIVE_APP } from "../policy.js";
|
|
7
|
-
import { VERSION } from "../version.js";
|
|
8
|
-
const installSkillCommandDefinition = (program, { env, streams, output }) => {
|
|
9
|
-
const skill = skillCommand({ command: "drive", appName: "drive-cli", version: VERSION }, new URL("../../skills/drive-cli/SKILL.md", import.meta.url), () => ({
|
|
10
|
-
renderer: {
|
|
11
|
-
...createRenderer({ format: "pretty", color: false, streams, quiet: program.opts().quiet === true }),
|
|
12
|
-
result: (value) => output(itemOf(value)),
|
|
13
|
-
},
|
|
14
|
-
streams,
|
|
15
|
-
env,
|
|
16
|
-
}));
|
|
17
|
-
for (const child of skill.commands) {
|
|
18
|
-
if (child.name() === "install")
|
|
19
|
-
annotate(grantsAuthority(child), { effects: LOCAL_WRITE, examples: ["drive skill install --for all"] }).summary("put SKILL.md for Claude Code, Codex, Gemini CLI, OpenClaw, and Hermes on request");
|
|
20
|
-
if (child.name() === "show")
|
|
21
|
-
annotate(child, { examples: ["drive skill show"] }).summary("print drive's SKILL.md");
|
|
22
|
-
}
|
|
23
|
-
program.addCommand(annotate(skill, { effects: NO_EFFECTS }));
|
|
24
|
-
};
|
|
25
|
-
export const installSkillCommand = (...args) => {
|
|
26
|
-
customizeSharedCommand(sharedSkillCommand(DRIVE_APP, new URL("../../skills/drive-cli/SKILL.md", import.meta.url)), "Drive binds agent installation to its own output renderer and provider skill locations.", () => {
|
|
27
|
-
installSkillCommandDefinition(...args);
|
|
28
|
-
const command = args[0].commands.find((command) => command.name() === "skill");
|
|
29
|
-
if (!command)
|
|
30
|
-
throw new Error("skill builder did not install its command");
|
|
31
|
-
return command;
|
|
32
|
-
}, SHELL_OVERRIDES.skill);
|
|
33
|
-
};
|
|
34
|
-
//# sourceMappingURL=skill.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"skill.js","sourceRoot":"","sources":["../../src/commands/skill.ts"],"names":[],"mappings":"AAA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