@wirecat/drive-cli 0.60.0 → 0.62.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -5
- package/dist/bin/drive.js +2 -2
- package/dist/browse.d.ts +20 -0
- package/dist/browse.d.ts.map +1 -0
- package/dist/browse.js +146 -0
- package/dist/browse.js.map +1 -0
- package/dist/bundle/{all-profiles-537I27Z4.js → all-profiles-CKD2DWUK.js} +14 -14
- package/dist/bundle/{anthropic-X4NWVHDF.js → anthropic-E3T4USLA.js} +9 -9
- package/dist/bundle/{app-server-KSHJKKS7.js → app-server-JB2AEWWL.js} +58 -55
- package/dist/bundle/{bun-WTBGGCUC.js → bun-CC44AAND.js} +2 -2
- package/dist/bundle/{bun-sqlite-T7Y3JFFD.js → bun-sqlite-AUMFKYVR.js} +8 -8
- package/dist/bundle/{chunk-2AXA5SKP.js → chunk-27YUUGXQ.js} +1 -1
- package/dist/bundle/{chunk-HIP43OGZ.js → chunk-2HF2MRXI.js} +1 -1
- package/dist/bundle/{chunk-AXWXQNTC.js → chunk-2KN35F32.js} +10 -10
- package/dist/bundle/{chunk-EBLA7GXY.js → chunk-4OSSOWDM.js} +2 -1
- package/dist/bundle/{chunk-XFXRGQXJ.js → chunk-4SIZEJ3M.js} +2 -2
- package/dist/bundle/{chunk-LQSRVQ3V.js → chunk-67ZQCWBV.js} +3 -3
- package/dist/bundle/{chunk-FO4TCH6P.js → chunk-6EY46GAN.js} +2 -2
- package/dist/bundle/{chunk-4XZXH2NM.js → chunk-7W5HYGVW.js} +4 -2
- package/dist/bundle/{chunk-FZOCQQ66.js → chunk-7ZXIWZQ6.js} +12 -12
- package/dist/bundle/{chunk-YGG7UA3C.js → chunk-AH5C3D3D.js} +5 -5
- package/dist/bundle/{chunk-YDN2RH5S.js → chunk-AQVUEZEP.js} +2 -2
- package/dist/bundle/{chunk-N7S2UPF3.js → chunk-CJHY5YIF.js} +494 -227
- package/dist/bundle/{chunk-MXP35VPO.js → chunk-CZ2GJHLL.js} +2 -2
- package/dist/bundle/{chunk-HQVIK6PM.js → chunk-DJOAMGF4.js} +262 -368
- package/dist/bundle/{chunk-HCJG7ENG.js → chunk-DRZZBN3V.js} +3 -3
- package/dist/bundle/{chunk-TXMTMEHW.js → chunk-DWJHL6DV.js} +4 -4
- package/dist/bundle/{chunk-S36HRPNS.js → chunk-E43ENLJJ.js} +1 -1
- package/dist/bundle/{chunk-4VHBDVY2.js → chunk-EOOGWUTP.js} +14 -10
- package/dist/bundle/{chunk-5XHLQZAG.js → chunk-EW7PKB4M.js} +58 -49
- package/dist/bundle/{chunk-TKW4QWCY.js → chunk-FEZF3TII.js} +12 -6
- package/dist/bundle/{chunk-KEXTTZJM.js → chunk-FNWIJ6EJ.js} +2 -2
- package/dist/bundle/{chunk-OYNUBWD2.js → chunk-FUITWY7O.js} +1 -1
- package/dist/bundle/{chunk-TVQDMP2F.js → chunk-HCNQT3QE.js} +1440 -771
- package/dist/bundle/{chunk-FTZNUZO7.js → chunk-HG6CAYJH.js} +3 -3
- package/dist/bundle/{chunk-SZXI4OXX.js → chunk-IR4SQLBR.js} +2 -2
- package/dist/bundle/{chunk-UTFATA4K.js → chunk-JK3U25QZ.js} +1 -1
- package/dist/bundle/{chunk-SBHSNOU4.js → chunk-JN5TVEEL.js} +96 -27
- package/dist/bundle/{chunk-IXN7Y6JA.js → chunk-KLFSRKHB.js} +1 -1
- package/dist/bundle/{chunk-57QVQGBE.js → chunk-L7K2MOIC.js} +22 -22
- package/dist/bundle/{chunk-JGUJJNGZ.js → chunk-LQKD257P.js} +582 -424
- package/dist/bundle/{chunk-GVRS5AIH.js → chunk-LWE4JGRN.js} +2 -2
- package/dist/bundle/{chunk-D6WIWOQC.js → chunk-MN4VXU3M.js} +4 -4
- package/dist/bundle/{chunk-QIJWSKZL.js → chunk-N7OZPKU7.js} +4 -4
- package/dist/bundle/{chunk-W62CON5K.js → chunk-O2XOX4HB.js} +34 -10
- package/dist/bundle/{chunk-PDYHEWKG.js → chunk-O7ALBI2I.js} +5 -5
- package/dist/bundle/{chunk-PETFPXLU.js → chunk-OBH5BA62.js} +3 -3
- package/dist/bundle/{chunk-246P2DCT.js → chunk-OD4U7GUY.js} +113 -51
- package/dist/bundle/{chunk-67QXMO2G.js → chunk-ONP2IBHY.js} +26 -26
- package/dist/bundle/{chunk-JQLIM6BH.js → chunk-OTROVC4E.js} +1 -1
- package/dist/bundle/{chunk-73TTP6ET.js → chunk-PEQA6LA5.js} +617 -243
- package/dist/bundle/{chunk-ALWTUDZF.js → chunk-Q2LRPOKL.js} +22 -14
- package/dist/bundle/{chunk-CKGHRWVR.js → chunk-QCKZ3GAA.js} +4 -4
- package/dist/bundle/chunk-QCX6XZLA.js +415 -0
- package/dist/bundle/{chunk-UVLSWLPZ.js → chunk-QH7DOVO3.js} +204 -58
- package/dist/bundle/{chunk-OMKUBCNN.js → chunk-QTI6IVHZ.js} +8 -8
- package/dist/bundle/{chunk-6HTKB4WC.js → chunk-R347FPYU.js} +1 -1
- package/dist/bundle/chunk-RIDQNVZM.js +64 -0
- package/dist/bundle/{chunk-ZPQS7XJA.js → chunk-RPMKG63Z.js} +18 -4
- package/dist/bundle/{chunk-XDIEQ2CE.js → chunk-RWSXVCSG.js} +3 -3
- package/dist/bundle/{chunk-3TQHIHZI.js → chunk-SVPCHFKI.js} +2 -2
- package/dist/bundle/{chunk-V2VMBM7O.js → chunk-SW4I5BR7.js} +2 -2
- package/dist/bundle/{chunk-EHAI773E.js → chunk-T5NWWXS2.js} +2 -2
- package/dist/bundle/{chunk-4CBZEAQ7.js → chunk-T7X53FCJ.js} +34 -34
- package/dist/bundle/{chunk-77C5XRH3.js → chunk-TDX4GZFO.js} +7 -7
- package/dist/bundle/{chunk-PPL5ASW2.js → chunk-U2BFYSQV.js} +14158 -2039
- package/dist/bundle/{chunk-DQDKLZAK.js → chunk-UGXN5D7U.js} +719 -128
- package/dist/bundle/{chunk-UNJE63JK.js → chunk-UOXOLGNG.js} +2 -2
- package/dist/bundle/{chunk-LJ77Y3TK.js → chunk-UQLWMGSD.js} +6 -5
- package/dist/bundle/{chunk-HFGR33KD.js → chunk-VAYB52HF.js} +33 -31
- package/dist/bundle/{chunk-GD6TQ6U4.js → chunk-VQDD64A4.js} +8 -8
- package/dist/bundle/{chunk-22ATLSNK.js → chunk-W4RTIL7S.js} +5 -5
- package/dist/bundle/{chunk-UVYVIHEA.js → chunk-WZKEU7WR.js} +4 -2
- package/dist/bundle/{chunk-5AMRCBMP.js → chunk-XEW2EN6F.js} +51 -37
- package/dist/bundle/{chunk-O37ESNAP.js → chunk-XFRRKZHQ.js} +242 -90
- package/dist/bundle/{chunk-K6XVRA6U.js → chunk-XS5POQST.js} +1 -1
- package/dist/bundle/{chunk-IRZ7OF3F.js → chunk-XZUS7XRO.js} +1 -1
- package/dist/bundle/{chunk-V7QMHMR3.js → chunk-YALI4C7C.js} +6 -6
- package/dist/bundle/{chunk-73MNUSP3.js → chunk-YMWENGKH.js} +1 -1
- package/dist/bundle/{chunk-MVNPE5FZ.js → chunk-YOJDGAPT.js} +8 -8
- package/dist/bundle/{chunk-DMHGWL5D.js → chunk-YPFUYQDP.js} +13 -13
- package/dist/bundle/{chunk-VVCZS42A.js → chunk-YUWPNG7B.js} +1 -1
- package/dist/bundle/{chunk-VRW6ZDTH.js → chunk-YXYTY4GF.js} +39 -26
- package/dist/bundle/{chunk-ZYCLPJ7U.js → chunk-ZMOUUOT2.js} +1 -1
- package/dist/bundle/command-contract-OB5BRABN.js +39 -0
- package/dist/bundle/{decode-35N57AFW.js → decode-WIIX3Y2X.js} +8 -8
- package/dist/bundle/{dispatch-CWXZW3PL.js → dispatch-GEFIXA6X.js} +9 -9
- package/dist/bundle/drive.js +11 -11
- package/dist/bundle/{echarts-3P3QZWMU.js → echarts-OYINM4C4.js} +2 -2
- package/dist/bundle/{embed-Q6Q5IOJQ.js → embed-DWZIYMBX.js} +9 -9
- package/dist/bundle/{embedder-D44JDTAA.js → embedder-ILWH7ZRM.js} +12 -12
- package/dist/bundle/entry-V5V3TOTY.js +22 -0
- package/dist/bundle/{failure-GRMMSDCZ.js → failure-GV77W3CD.js} +4 -4
- package/dist/bundle/first-run-V3VVLQF4.js +30 -0
- package/dist/bundle/first-screen-Y3RIN7FU.js +37 -0
- package/dist/bundle/{google-6ZZDKFBN.js → google-KLZSUAVY.js} +13 -13
- package/dist/bundle/{google-api-E6MOJ4ZD.js → google-api-HZQ5R4ZO.js} +83 -64
- package/dist/bundle/grants-L7XLHLUT.js +105 -0
- package/dist/bundle/{identity-TID7S5NE.js → identity-J2DON4IO.js} +6 -6
- package/dist/bundle/{instructions-ANJN4HV3.js → instructions-HGOJ23AJ.js} +1 -1
- package/dist/bundle/{login-BGMK2ABH.js → login-BD2TS4GY.js} +64 -64
- package/dist/bundle/{mcp-WBHKX5E3.js → mcp-GWDA3HOA.js} +2 -2
- package/dist/bundle/{node-VOB45ES2.js → node-CPKTDPH7.js} +2 -2
- package/dist/bundle/{node-sqlite-TSX6XQY2.js → node-sqlite-IXDCRLSX.js} +9 -9
- package/dist/bundle/oauth-HOGY4YBB.js +22 -0
- package/dist/bundle/{open-3USWHGNR.js → open-O7P3ZV3Y.js} +8 -8
- package/dist/bundle/{openai-YZ5VGPIP.js → openai-RCFQKCXC.js} +17 -17
- package/dist/bundle/{process-44JS2W7L.js → process-KXDRJO22.js} +1 -1
- package/dist/bundle/{program-TZLAFKJV.js → program-UCHFC7JQ.js} +266 -104
- package/dist/bundle/prompt-EVPPBN5W.js +17 -0
- package/dist/bundle/{reasons-ZK3U3CIN.js → reasons-57J2D77K.js} +5 -5
- package/dist/bundle/{recognize-OFW7HWTM.js → recognize-MRCYGP2J.js} +7 -7
- package/dist/bundle/{remote-YBDRZQZ5.js → remote-L3L4PHKF.js} +10 -10
- package/dist/bundle/{rerank-TQQNS5FJ.js → rerank-PSOE6XFT.js} +10 -10
- package/dist/bundle/{serve-OPZXMVLH.js → serve-72OGS3BF.js} +12 -12
- package/dist/bundle/server-C5TGNFXW.js +70 -0
- package/dist/bundle/{server-2D6DDIK5.js → server-SCXKYHBO.js} +44 -44
- package/dist/bundle/{services-34WKT3NN.js → services-YAFTELBI.js} +42 -32
- package/dist/bundle/{sqlite-runtime-WPUMKLUV.js → sqlite-runtime-DLK4SU33.js} +9 -9
- package/dist/bundle/{start-ZXUJZ4JV.js → start-AFFA3LKM.js} +9 -7
- package/dist/bundle/{state-AV2RB3AQ.js → state-T5VNAJSZ.js} +9 -9
- package/dist/bundle/{store-YKV4GAMS.js → store-4OFK7PKQ.js} +48 -28
- package/dist/bundle/{store-3M7N2Q5T.js → store-R6MSY2IM.js} +20 -18
- package/dist/bundle/store-maintenance-command-QDMCXGV6.js +60 -0
- package/dist/bundle/tokens-HIG36RNS.js +103 -0
- package/dist/commands/config.js +1 -1
- package/dist/commands/config.js.map +1 -1
- package/dist/commands/folders.d.ts +2 -1
- package/dist/commands/folders.d.ts.map +1 -1
- package/dist/commands/folders.js +16 -3
- package/dist/commands/folders.js.map +1 -1
- package/dist/commands/session.d.ts.map +1 -1
- package/dist/commands/session.js +10 -2
- package/dist/commands/session.js.map +1 -1
- package/dist/config.d.ts +16 -5
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +11 -17
- package/dist/config.js.map +1 -1
- package/dist/download.d.ts +3 -2
- package/dist/download.d.ts.map +1 -1
- package/dist/download.js +21 -9
- package/dist/download.js.map +1 -1
- package/dist/google-api.d.ts +3 -1
- package/dist/google-api.d.ts.map +1 -1
- package/dist/google-api.js +27 -7
- package/dist/google-api.js.map +1 -1
- package/dist/login.js +1 -1
- package/dist/login.js.map +1 -1
- package/dist/program.d.ts.map +1 -1
- package/dist/program.js +7 -7
- package/dist/program.js.map +1 -1
- package/dist/tokens.d.ts.map +1 -1
- package/dist/tokens.js +15 -6
- package/dist/tokens.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +3 -3
- package/dist/bundle/chunk-77YTRBL6.js +0 -249
- package/dist/bundle/chunk-YYHKVOVK.js +0 -132
- package/dist/bundle/command-contract-NUIWUVYB.js +0 -39
- package/dist/bundle/entry-ZHCNI7XO.js +0 -22
- package/dist/bundle/first-run-3DC2SDWM.js +0 -30
- package/dist/bundle/first-screen-YJF4YODC.js +0 -37
- package/dist/bundle/grants-GWXDH5GM.js +0 -105
- package/dist/bundle/oauth-CEOYXW6C.js +0 -22
- package/dist/bundle/prompt-SG7LAOXW.js +0 -17
- package/dist/bundle/server-R6G2O772.js +0 -70
- package/dist/bundle/store-maintenance-command-WDXNY4ZF.js +0 -60
- package/dist/bundle/tokens-F63RXXEF.js +0 -103
- package/dist/oauth-application.d.ts +0 -5
- package/dist/oauth-application.d.ts.map +0 -1
- package/dist/oauth-application.js +0 -9
- package/dist/oauth-application.js.map +0 -1
- /package/dist/bundle/{chunk-LK2E2ELG.js → chunk-ZQ3GWKDQ.js} +0 -0
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
metadataJson,
|
|
9
9
|
supported,
|
|
10
10
|
tooManyEntries
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-YUWPNG7B.js";
|
|
12
12
|
import {
|
|
13
13
|
ACCOUNT_FREE_COMMANDS,
|
|
14
14
|
ANY_PROFILE_COMMANDS,
|
|
@@ -19,7 +19,7 @@ import {
|
|
|
19
19
|
describeDriveProgram,
|
|
20
20
|
examples,
|
|
21
21
|
markProfileFree
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-67ZQCWBV.js";
|
|
23
23
|
import {
|
|
24
24
|
DEFAULTS_ONLY,
|
|
25
25
|
DEFAULT_LEVELS,
|
|
@@ -33,8 +33,10 @@ import {
|
|
|
33
33
|
configuredMirrors,
|
|
34
34
|
configuredSessions,
|
|
35
35
|
fileId,
|
|
36
|
+
googleAppOf,
|
|
36
37
|
inspectConfig,
|
|
37
38
|
methodPolicyKeys,
|
|
39
|
+
oauthClientReport,
|
|
38
40
|
paths,
|
|
39
41
|
permissionKeys,
|
|
40
42
|
permissionNames,
|
|
@@ -47,7 +49,7 @@ import {
|
|
|
47
49
|
unknownProfile,
|
|
48
50
|
withDefaults,
|
|
49
51
|
writeConfig
|
|
50
|
-
} from "./chunk-
|
|
52
|
+
} from "./chunk-QCX6XZLA.js";
|
|
51
53
|
import {
|
|
52
54
|
blockKey,
|
|
53
55
|
blocksMarkdown,
|
|
@@ -66,7 +68,7 @@ import {
|
|
|
66
68
|
syncDocuments,
|
|
67
69
|
syncMirrors,
|
|
68
70
|
watchMirrors
|
|
69
|
-
} from "./chunk-
|
|
71
|
+
} from "./chunk-L7K2MOIC.js";
|
|
70
72
|
import {
|
|
71
73
|
apiMethod,
|
|
72
74
|
apiMethods,
|
|
@@ -75,7 +77,7 @@ import {
|
|
|
75
77
|
schemas,
|
|
76
78
|
validateApiParams,
|
|
77
79
|
validateRequest
|
|
78
|
-
} from "./chunk-
|
|
80
|
+
} from "./chunk-N7OZPKU7.js";
|
|
79
81
|
import {
|
|
80
82
|
DISCOVERY_DESCRIPTIONS,
|
|
81
83
|
MEMO_SCENARIOS,
|
|
@@ -105,24 +107,24 @@ import {
|
|
|
105
107
|
skillCommand,
|
|
106
108
|
suggest,
|
|
107
109
|
upgradeCommand
|
|
108
|
-
} from "./chunk-
|
|
110
|
+
} from "./chunk-HCNQT3QE.js";
|
|
109
111
|
import {
|
|
110
112
|
googleError
|
|
111
|
-
} from "./chunk-
|
|
112
|
-
import "./chunk-
|
|
113
|
+
} from "./chunk-OTROVC4E.js";
|
|
114
|
+
import "./chunk-KLFSRKHB.js";
|
|
113
115
|
import "./chunk-SBZB7HMU.js";
|
|
114
|
-
import "./chunk-
|
|
115
|
-
import "./chunk-
|
|
116
|
-
import "./chunk-
|
|
116
|
+
import "./chunk-XZUS7XRO.js";
|
|
117
|
+
import "./chunk-XEW2EN6F.js";
|
|
118
|
+
import "./chunk-JN5TVEEL.js";
|
|
117
119
|
import {
|
|
118
120
|
modelGateway,
|
|
119
121
|
storeInfo
|
|
120
|
-
} from "./chunk-
|
|
122
|
+
} from "./chunk-UGXN5D7U.js";
|
|
121
123
|
import {
|
|
122
124
|
RecipientList,
|
|
123
125
|
SendJournal,
|
|
124
126
|
sendGuard
|
|
125
|
-
} from "./chunk-
|
|
127
|
+
} from "./chunk-EW7PKB4M.js";
|
|
126
128
|
import {
|
|
127
129
|
LIST_QUERY_GUIDE,
|
|
128
130
|
listQuery,
|
|
@@ -133,13 +135,13 @@ import {
|
|
|
133
135
|
typedQuery,
|
|
134
136
|
unfilteredQuery,
|
|
135
137
|
withQuery
|
|
136
|
-
} from "./chunk-
|
|
138
|
+
} from "./chunk-YXYTY4GF.js";
|
|
137
139
|
import {
|
|
138
140
|
commandsText,
|
|
139
141
|
inSection
|
|
140
|
-
} from "./chunk-
|
|
142
|
+
} from "./chunk-QTI6IVHZ.js";
|
|
141
143
|
import "./chunk-HTQTIKWP.js";
|
|
142
|
-
import "./chunk-
|
|
144
|
+
import "./chunk-O7ALBI2I.js";
|
|
143
145
|
import {
|
|
144
146
|
FETCH,
|
|
145
147
|
InvalidArgumentError,
|
|
@@ -171,29 +173,29 @@ import {
|
|
|
171
173
|
rootOf,
|
|
172
174
|
settingRows,
|
|
173
175
|
snakeKeys
|
|
174
|
-
} from "./chunk-
|
|
175
|
-
import "./chunk-
|
|
176
|
-
import "./chunk-
|
|
176
|
+
} from "./chunk-PEQA6LA5.js";
|
|
177
|
+
import "./chunk-VQDD64A4.js";
|
|
178
|
+
import "./chunk-7ZXIWZQ6.js";
|
|
177
179
|
import {
|
|
178
180
|
setupPermissionCeiling
|
|
179
|
-
} from "./chunk-
|
|
180
|
-
import "./chunk-
|
|
181
|
+
} from "./chunk-MN4VXU3M.js";
|
|
182
|
+
import "./chunk-2KN35F32.js";
|
|
181
183
|
import {
|
|
182
184
|
readOnlyLockOf,
|
|
183
185
|
readOnlyRefusal
|
|
184
|
-
} from "./chunk-
|
|
185
|
-
import "./chunk-
|
|
186
|
-
import "./chunk-
|
|
187
|
-
import "./chunk-
|
|
188
|
-
import "./chunk-
|
|
186
|
+
} from "./chunk-7W5HYGVW.js";
|
|
187
|
+
import "./chunk-DWJHL6DV.js";
|
|
188
|
+
import "./chunk-HG6CAYJH.js";
|
|
189
|
+
import "./chunk-YMWENGKH.js";
|
|
190
|
+
import "./chunk-DRZZBN3V.js";
|
|
189
191
|
import {
|
|
190
192
|
newOperationId
|
|
191
|
-
} from "./chunk-
|
|
193
|
+
} from "./chunk-LQKD257P.js";
|
|
192
194
|
import {
|
|
193
195
|
columnName,
|
|
194
196
|
readSpreadsheet
|
|
195
|
-
} from "./chunk-
|
|
196
|
-
import "./chunk-
|
|
197
|
+
} from "./chunk-ONP2IBHY.js";
|
|
198
|
+
import "./chunk-YPFUYQDP.js";
|
|
197
199
|
import {
|
|
198
200
|
CEILING_KEY,
|
|
199
201
|
LEVELS,
|
|
@@ -202,40 +204,40 @@ import {
|
|
|
202
204
|
layerPermissions,
|
|
203
205
|
levelFor,
|
|
204
206
|
parseDuration
|
|
205
|
-
} from "./chunk-
|
|
206
|
-
import "./chunk-
|
|
207
|
+
} from "./chunk-VAYB52HF.js";
|
|
208
|
+
import "./chunk-AQVUEZEP.js";
|
|
207
209
|
import {
|
|
208
210
|
latestVersion,
|
|
209
211
|
runUpdate,
|
|
210
212
|
updateNotice
|
|
211
|
-
} from "./chunk-
|
|
212
|
-
import "./chunk-
|
|
213
|
-
import "./chunk-
|
|
214
|
-
import "./chunk-
|
|
215
|
-
import "./chunk-
|
|
213
|
+
} from "./chunk-QCKZ3GAA.js";
|
|
214
|
+
import "./chunk-ZMOUUOT2.js";
|
|
215
|
+
import "./chunk-T5NWWXS2.js";
|
|
216
|
+
import "./chunk-OBH5BA62.js";
|
|
217
|
+
import "./chunk-AH5C3D3D.js";
|
|
216
218
|
import "./chunk-5DPV7X27.js";
|
|
217
|
-
import "./chunk-
|
|
219
|
+
import "./chunk-Q2LRPOKL.js";
|
|
218
220
|
import {
|
|
219
221
|
applyDocumentTransfer,
|
|
220
222
|
previewDocumentTransfer
|
|
221
|
-
} from "./chunk-
|
|
223
|
+
} from "./chunk-QH7DOVO3.js";
|
|
222
224
|
import {
|
|
223
225
|
note
|
|
224
|
-
} from "./chunk-
|
|
225
|
-
import "./chunk-
|
|
226
|
+
} from "./chunk-RIDQNVZM.js";
|
|
227
|
+
import "./chunk-SVPCHFKI.js";
|
|
226
228
|
import {
|
|
227
229
|
CATALOG_QUERY,
|
|
228
230
|
IMPORTED_DOCUMENT_QUERY,
|
|
229
231
|
openStore
|
|
230
|
-
} from "./chunk-
|
|
231
|
-
import "./chunk-
|
|
232
|
+
} from "./chunk-U2BFYSQV.js";
|
|
233
|
+
import "./chunk-UOXOLGNG.js";
|
|
232
234
|
import {
|
|
233
235
|
FACT_STATUSES,
|
|
234
236
|
FACT_TYPES,
|
|
235
237
|
MEMORY_KINDS,
|
|
236
238
|
MEMORY_SCOPES,
|
|
237
239
|
MEMORY_STATUSES
|
|
238
|
-
} from "./chunk-
|
|
240
|
+
} from "./chunk-CJHY5YIF.js";
|
|
239
241
|
import {
|
|
240
242
|
dateRange,
|
|
241
243
|
defineQuery,
|
|
@@ -245,40 +247,40 @@ import {
|
|
|
245
247
|
timezoneOf,
|
|
246
248
|
validateQuery,
|
|
247
249
|
zonedMoment
|
|
248
|
-
} from "./chunk-
|
|
249
|
-
import "./chunk-
|
|
250
|
-
import "./chunk-
|
|
251
|
-
import "./chunk-
|
|
250
|
+
} from "./chunk-EOOGWUTP.js";
|
|
251
|
+
import "./chunk-JK3U25QZ.js";
|
|
252
|
+
import "./chunk-YOJDGAPT.js";
|
|
253
|
+
import "./chunk-TDX4GZFO.js";
|
|
252
254
|
import {
|
|
253
255
|
storePath
|
|
254
|
-
} from "./chunk-
|
|
255
|
-
import "./chunk-
|
|
256
|
-
import "./chunk-
|
|
257
|
-
import "./chunk-
|
|
258
|
-
import "./chunk-
|
|
256
|
+
} from "./chunk-FNWIJ6EJ.js";
|
|
257
|
+
import "./chunk-YALI4C7C.js";
|
|
258
|
+
import "./chunk-XS5POQST.js";
|
|
259
|
+
import "./chunk-RWSXVCSG.js";
|
|
260
|
+
import "./chunk-IR4SQLBR.js";
|
|
259
261
|
import "./chunk-D72URWJE.js";
|
|
260
262
|
import {
|
|
261
263
|
installerOf
|
|
262
|
-
} from "./chunk-
|
|
264
|
+
} from "./chunk-27YUUGXQ.js";
|
|
263
265
|
import {
|
|
264
266
|
DRIVE_APP,
|
|
265
267
|
PACKAGE,
|
|
266
268
|
VERSION
|
|
267
|
-
} from "./chunk-
|
|
269
|
+
} from "./chunk-4SIZEJ3M.js";
|
|
268
270
|
import {
|
|
269
271
|
REASONS
|
|
270
|
-
} from "./chunk-
|
|
271
|
-
import "./chunk-
|
|
272
|
-
import "./chunk-
|
|
272
|
+
} from "./chunk-FUITWY7O.js";
|
|
273
|
+
import "./chunk-ZQ3GWKDQ.js";
|
|
274
|
+
import "./chunk-WZKEU7WR.js";
|
|
273
275
|
import {
|
|
274
276
|
processStreams,
|
|
275
277
|
saveConfigFile,
|
|
276
278
|
writeSecurely
|
|
277
|
-
} from "./chunk-
|
|
278
|
-
import "./chunk-
|
|
279
|
+
} from "./chunk-OD4U7GUY.js";
|
|
280
|
+
import "./chunk-UQLWMGSD.js";
|
|
279
281
|
import "./chunk-Y5E2WNWB.js";
|
|
280
|
-
import "./chunk-
|
|
281
|
-
import "./chunk-
|
|
282
|
+
import "./chunk-2HF2MRXI.js";
|
|
283
|
+
import "./chunk-6EY46GAN.js";
|
|
282
284
|
import {
|
|
283
285
|
array,
|
|
284
286
|
boolean,
|
|
@@ -302,11 +304,11 @@ import {
|
|
|
302
304
|
string,
|
|
303
305
|
unknown,
|
|
304
306
|
writes
|
|
305
|
-
} from "./chunk-
|
|
307
|
+
} from "./chunk-FEZF3TII.js";
|
|
306
308
|
import {
|
|
307
309
|
CliError,
|
|
308
310
|
isCliError
|
|
309
|
-
} from "./chunk-
|
|
311
|
+
} from "./chunk-4OSSOWDM.js";
|
|
310
312
|
import {
|
|
311
313
|
__commonJS,
|
|
312
314
|
__name,
|
|
@@ -825,7 +827,7 @@ var require_graceful_fs = __commonJS({
|
|
|
825
827
|
polyfills(fs2);
|
|
826
828
|
fs2.gracefulify = patch;
|
|
827
829
|
fs2.createReadStream = createReadStream2;
|
|
828
|
-
fs2.createWriteStream =
|
|
830
|
+
fs2.createWriteStream = createWriteStream2;
|
|
829
831
|
var fs$readFile = fs2.readFile;
|
|
830
832
|
fs2.readFile = readFile;
|
|
831
833
|
function readFile(path, options, cb) {
|
|
@@ -1052,10 +1054,10 @@ var require_graceful_fs = __commonJS({
|
|
|
1052
1054
|
return new fs2.ReadStream(path, options);
|
|
1053
1055
|
}
|
|
1054
1056
|
__name(createReadStream2, "createReadStream");
|
|
1055
|
-
function
|
|
1057
|
+
function createWriteStream2(path, options) {
|
|
1056
1058
|
return new fs2.WriteStream(path, options);
|
|
1057
1059
|
}
|
|
1058
|
-
__name(
|
|
1060
|
+
__name(createWriteStream2, "createWriteStream");
|
|
1059
1061
|
var fs$open = fs2.open;
|
|
1060
1062
|
fs2.open = open2;
|
|
1061
1063
|
function open2(path, flags, mode, cb) {
|
|
@@ -1989,7 +1991,7 @@ var catalogInput = /* @__PURE__ */ __name((file) => ({
|
|
|
1989
1991
|
lastModifiedBy: file.lastModifiedBy ?? null
|
|
1990
1992
|
}
|
|
1991
1993
|
}), "catalogInput");
|
|
1992
|
-
var catalogTree = /* @__PURE__ */ __name((entries,
|
|
1994
|
+
var catalogTree = /* @__PURE__ */ __name((entries, roots2, depth) => {
|
|
1993
1995
|
if (!Number.isSafeInteger(depth) || depth < 0 || depth > 50)
|
|
1994
1996
|
throw new CliError("validation_error", "tree depth must be between 0 and 50", { reason: "catalog.depth-invalid" });
|
|
1995
1997
|
const byId = new Map(entries.map((entry) => [entry.externalId, entry]));
|
|
@@ -2023,7 +2025,7 @@ var catalogTree = /* @__PURE__ */ __name((entries, roots, depth) => {
|
|
|
2023
2025
|
truncated: level >= depth && found.length > 0
|
|
2024
2026
|
};
|
|
2025
2027
|
}, "node");
|
|
2026
|
-
return
|
|
2028
|
+
return roots2.map((id) => {
|
|
2027
2029
|
const entry = byId.get(id);
|
|
2028
2030
|
if (entry?.kind !== "folder")
|
|
2029
2031
|
throw new CliError("not_found", "folder is not in the active local catalog; run catalog import or sync", {
|
|
@@ -2442,8 +2444,8 @@ var installCatalogCommands = /* @__PURE__ */ __name((program, helpers) => {
|
|
|
2442
2444
|
if (!page.hasMore)
|
|
2443
2445
|
break;
|
|
2444
2446
|
}
|
|
2445
|
-
const
|
|
2446
|
-
return allOf(catalogTree(items,
|
|
2447
|
+
const roots2 = id ? [fileId(id)] : activeProfile(env, selected()).roots;
|
|
2448
|
+
return allOf(catalogTree(items, roots2.map((root) => `${root}.md`), args.depth));
|
|
2447
2449
|
})));
|
|
2448
2450
|
const tags = local(catalog.command("tags")).description("add owner tags to cached files or folders");
|
|
2449
2451
|
for (const action of ["list", "add", "remove"]) {
|
|
@@ -2631,7 +2633,7 @@ var installConfigCommands = /* @__PURE__ */ __name((program, { env, selected, ou
|
|
|
2631
2633
|
"drive personal config set max_text_chars 100000",
|
|
2632
2634
|
`drive personal config set permissions.files '"readonly"' --defaults`,
|
|
2633
2635
|
"drive personal config set record true --defaults"
|
|
2634
|
-
]).argument("<key>", "max_text_chars, picture_search, record, record_input, keep_runs_for_days, keep_successful_runs_for_days, runs_size_limit_mb, shared AI settings, permissions.<key> or models.<purpose>.<field>").argument("<json-value>", "the new value, as JSON").option("--defaults", "change the defaults instead of this profile").action((key, raw, args) => {
|
|
2636
|
+
]).argument("<key>", "max_text_chars, picture_search, google_client_id, record, record_input, keep_runs_for_days, keep_successful_runs_for_days, runs_size_limit_mb, shared AI settings, permissions.<key> or models.<purpose>.<field>").argument("<json-value>", "the new value, as JSON").option("--defaults", "change the defaults instead of this profile").action((key, raw, args) => {
|
|
2635
2637
|
const file = editable();
|
|
2636
2638
|
const { at: scope, scope: name } = scopeOf(file, args.defaults);
|
|
2637
2639
|
const setting = settingAt(key);
|
|
@@ -2730,7 +2732,7 @@ var installModelCommands = /* @__PURE__ */ __name((program, { env, output, strea
|
|
|
2730
2732
|
throw new CliError("permission_error", "downloading a model needs the network; --offline was requested", {
|
|
2731
2733
|
reason: "offline.refused"
|
|
2732
2734
|
});
|
|
2733
|
-
const { downloadImageModel, downloadTextModel } = await import("./services-
|
|
2735
|
+
const { downloadImageModel, downloadTextModel } = await import("./services-YAFTELBI.js");
|
|
2734
2736
|
const progress = /* @__PURE__ */ __name((line) => {
|
|
2735
2737
|
if (!program.opts().quiet)
|
|
2736
2738
|
streams.diagnostic(line);
|
|
@@ -3657,8 +3659,142 @@ var installDocumentCommands = /* @__PURE__ */ __name((program, context) => {
|
|
|
3657
3659
|
});
|
|
3658
3660
|
}, "installDocumentCommands");
|
|
3659
3661
|
|
|
3662
|
+
// dist/browse.js
|
|
3663
|
+
var SHARED_WITH_ME = "shared-with-me";
|
|
3664
|
+
var browseRow = strictObject({
|
|
3665
|
+
id: string(),
|
|
3666
|
+
name: string(),
|
|
3667
|
+
kind: picklist(["my_drive", "shared_with_me", "shared_drive", "folder"]),
|
|
3668
|
+
parent: nullable(string()),
|
|
3669
|
+
location: picklist(["my_drive", "shared_with_me", "shared_drive"]),
|
|
3670
|
+
drive_id: nullable(string()),
|
|
3671
|
+
child_folders: nullable(number()),
|
|
3672
|
+
added: boolean()
|
|
3673
|
+
});
|
|
3674
|
+
var BROWSE_HELP = `
|
|
3675
|
+
Each item, one level of the tree (--json prints them under "items"):
|
|
3676
|
+
id folder id to pass to --parent or to folders add; shared-with-me at the top level
|
|
3677
|
+
name folder name as Google shows it
|
|
3678
|
+
kind my_drive, shared_with_me or shared_drive (the top level), folder (below it)
|
|
3679
|
+
parent the --parent given, or null at the top level
|
|
3680
|
+
location where the folder lives: my_drive, shared_with_me or shared_drive
|
|
3681
|
+
drive_id the shared drive's id, or null
|
|
3682
|
+
child_folders folders directly inside it, or null when not counted (Shared with me, a level of over 1000 folders)
|
|
3683
|
+
added whether sync already imports this folder (folders add)
|
|
3684
|
+
Folders are listed by name. Only folders are listed; files inside them are not.
|
|
3685
|
+
Failures carry error.reason: oauth.missing (not signed in), oauth.expired (sign in again),
|
|
3686
|
+
provider.rate-limited (retry later), not_found code (no such folder).`;
|
|
3687
|
+
var PAGE_BOUND = 1e3;
|
|
3688
|
+
var COUNTED_LEVEL = 1e3;
|
|
3689
|
+
var COUNT_CHUNK = 50;
|
|
3690
|
+
var SAFE_ID = /^[A-Za-z0-9_-]{1,200}$/;
|
|
3691
|
+
var NOT_TRASHED_FOLDER = `mimeType = '${FOLDER}' and trashed = false`;
|
|
3692
|
+
var ACROSS_DRIVES = { supportsAllDrives: true, includeItemsFromAllDrives: true };
|
|
3693
|
+
var everyPage = /* @__PURE__ */ __name(async (call, method, params, key) => {
|
|
3694
|
+
const rows = [];
|
|
3695
|
+
const seen = /* @__PURE__ */ new Set();
|
|
3696
|
+
let incomplete = false;
|
|
3697
|
+
let pageToken;
|
|
3698
|
+
for (let page = 0; page < PAGE_BOUND; page++) {
|
|
3699
|
+
const data = await call(method, { ...params, ...pageToken ? { pageToken } : {} }) ?? {};
|
|
3700
|
+
for (const row of data[key] ?? [])
|
|
3701
|
+
rows.push(row);
|
|
3702
|
+
if (data.incompleteSearch)
|
|
3703
|
+
incomplete = true;
|
|
3704
|
+
if (rows.length > MAX_ENTRIES)
|
|
3705
|
+
throw new CliError("provider_error", `this level holds more than ${MAX_ENTRIES} folders; drive lists at most that`, {
|
|
3706
|
+
reason: "listing.too-large"
|
|
3707
|
+
});
|
|
3708
|
+
if (!data.nextPageToken)
|
|
3709
|
+
return { rows, incomplete };
|
|
3710
|
+
if (seen.has(data.nextPageToken))
|
|
3711
|
+
throw new CliError("invalid_response", "Google repeated a folder page token");
|
|
3712
|
+
seen.add(data.nextPageToken);
|
|
3713
|
+
pageToken = data.nextPageToken;
|
|
3714
|
+
}
|
|
3715
|
+
throw new CliError("provider_error", "folder pagination exceeded its bound", { reason: "listing.too-large" });
|
|
3716
|
+
}, "everyPage");
|
|
3717
|
+
var childCounts = /* @__PURE__ */ __name(async (call, ids) => {
|
|
3718
|
+
const counted = ids.filter((id) => SAFE_ID.test(id));
|
|
3719
|
+
if (counted.length > COUNTED_LEVEL)
|
|
3720
|
+
return void 0;
|
|
3721
|
+
const counts = new Map(counted.map((id) => [id, 0]));
|
|
3722
|
+
for (let start = 0; start < counted.length; start += COUNT_CHUNK) {
|
|
3723
|
+
const chunk = counted.slice(start, start + COUNT_CHUNK);
|
|
3724
|
+
const { rows, incomplete } = await everyPage(call, "drive.files.list", {
|
|
3725
|
+
q: `${NOT_TRASHED_FOLDER} and (${chunk.map((id) => `'${id}' in parents`).join(" or ")})`,
|
|
3726
|
+
fields: "nextPageToken,incompleteSearch,files(parents)",
|
|
3727
|
+
pageSize: 1e3,
|
|
3728
|
+
...ACROSS_DRIVES
|
|
3729
|
+
}, "files");
|
|
3730
|
+
if (incomplete)
|
|
3731
|
+
return void 0;
|
|
3732
|
+
for (const row of rows)
|
|
3733
|
+
for (const parent of row.parents ?? []) {
|
|
3734
|
+
const count = counts.get(parent);
|
|
3735
|
+
if (count !== void 0)
|
|
3736
|
+
counts.set(parent, count + 1);
|
|
3737
|
+
}
|
|
3738
|
+
}
|
|
3739
|
+
return counts;
|
|
3740
|
+
}, "childCounts");
|
|
3741
|
+
var byName = /* @__PURE__ */ __name((a, b) => a.name.localeCompare(b.name, void 0, { sensitivity: "base", numeric: true }) || a.id.localeCompare(b.id), "byName");
|
|
3742
|
+
var listed = /* @__PURE__ */ __name((items, incomplete) => listOf("", {
|
|
3743
|
+
items,
|
|
3744
|
+
limit: Math.max(1, items.length),
|
|
3745
|
+
has_more: false,
|
|
3746
|
+
...incomplete ? { missing: [{ field: "items", why: "Google searched only some of the drives; some folders may be missing" }] } : {}
|
|
3747
|
+
}), "listed");
|
|
3748
|
+
var roots = /* @__PURE__ */ __name(async (call, added) => {
|
|
3749
|
+
const myDrive = await call("drive.files.get", { fileId: "root", fields: "id" }) ?? {};
|
|
3750
|
+
if (!myDrive.id)
|
|
3751
|
+
throw new CliError("invalid_response", "Google did not return the My Drive folder");
|
|
3752
|
+
const { rows: drives } = await everyPage(call, "drive.drives.list", { pageSize: 100, fields: "nextPageToken,drives(id,name)" }, "drives");
|
|
3753
|
+
const shared = drives.flatMap((drive) => drive.id ? [{ id: drive.id, name: drive.name ?? "" }] : []);
|
|
3754
|
+
const counts = await childCounts(call, [myDrive.id, ...shared.map((drive) => drive.id)]);
|
|
3755
|
+
const top = /* @__PURE__ */ __name((id, name, kind) => ({
|
|
3756
|
+
id,
|
|
3757
|
+
name,
|
|
3758
|
+
kind,
|
|
3759
|
+
parent: null,
|
|
3760
|
+
location: kind,
|
|
3761
|
+
drive_id: kind === "shared_drive" ? id : null,
|
|
3762
|
+
child_folders: kind === "shared_with_me" ? null : counts?.get(id) ?? null,
|
|
3763
|
+
added: added(id) || kind === "my_drive" && added("root")
|
|
3764
|
+
}), "top");
|
|
3765
|
+
return listed([
|
|
3766
|
+
top(myDrive.id, "My Drive", "my_drive"),
|
|
3767
|
+
top(SHARED_WITH_ME, "Shared with me", "shared_with_me"),
|
|
3768
|
+
...shared.map((drive) => top(drive.id, drive.name, "shared_drive")).sort(byName)
|
|
3769
|
+
], false);
|
|
3770
|
+
}, "roots");
|
|
3771
|
+
var browseFolders = /* @__PURE__ */ __name(async (call, parent, selected) => {
|
|
3772
|
+
const added = /* @__PURE__ */ __name((id) => selected.includes(id), "added");
|
|
3773
|
+
if (parent === void 0)
|
|
3774
|
+
return roots(call, added);
|
|
3775
|
+
const { rows, incomplete } = await everyPage(call, "drive.files.list", {
|
|
3776
|
+
q: parent === SHARED_WITH_ME ? `sharedWithMe = true and ${NOT_TRASHED_FOLDER}` : `'${parent}' in parents and ${NOT_TRASHED_FOLDER}`,
|
|
3777
|
+
fields: "nextPageToken,incompleteSearch,files(id,name,driveId,ownedByMe)",
|
|
3778
|
+
pageSize: 1e3,
|
|
3779
|
+
...ACROSS_DRIVES
|
|
3780
|
+
}, "files");
|
|
3781
|
+
const folders = rows.filter((row) => Boolean(row.id));
|
|
3782
|
+
const counts = await childCounts(call, folders.map((folder) => folder.id));
|
|
3783
|
+
const items = folders.map((folder) => ({
|
|
3784
|
+
id: folder.id,
|
|
3785
|
+
name: folder.name ?? "",
|
|
3786
|
+
kind: "folder",
|
|
3787
|
+
parent,
|
|
3788
|
+
location: folder.driveId ? "shared_drive" : folder.ownedByMe === false ? "shared_with_me" : "my_drive",
|
|
3789
|
+
drive_id: folder.driveId ?? null,
|
|
3790
|
+
child_folders: counts?.get(folder.id) ?? null,
|
|
3791
|
+
added: added(folder.id)
|
|
3792
|
+
}));
|
|
3793
|
+
return listed(items.sort(byName), incomplete);
|
|
3794
|
+
}, "browseFolders");
|
|
3795
|
+
|
|
3660
3796
|
// dist/commands/folders.js
|
|
3661
|
-
var installFolderCommands = /* @__PURE__ */ __name((program, context) => {
|
|
3797
|
+
var installFolderCommands = /* @__PURE__ */ __name((program, context, call) => {
|
|
3662
3798
|
const { env, selected, output, source } = context;
|
|
3663
3799
|
const folders = annotate(program.command("folders"), { effects: LOCAL_READ }).description("choose the Google Drive folders that sync imports");
|
|
3664
3800
|
const folderArgument = "folder id or Google Drive URL";
|
|
@@ -3680,6 +3816,15 @@ var installFolderCommands = /* @__PURE__ */ __name((program, context) => {
|
|
|
3680
3816
|
const filter = termsOf(words, FOLDERS_QUERY, "folders list");
|
|
3681
3817
|
output(allOf(selectedFolders(env, selected(), filter)));
|
|
3682
3818
|
});
|
|
3819
|
+
examples(answerEntity(annotate(folders.command("browse"), { effects: GOOGLE_READ }).description("list Google Drive folders one level at a time, to choose one for folders add"), "drive_remote_folder", browseRow), [
|
|
3820
|
+
"drive personal folders browse",
|
|
3821
|
+
"drive personal folders browse --parent FOLDER_ID --json",
|
|
3822
|
+
`drive personal folders browse --parent ${SHARED_WITH_ME}`
|
|
3823
|
+
]).option("--parent <id>", `folder id or URL to list inside, or ${SHARED_WITH_ME}; the top level without it`).addHelpText("after", BROWSE_HELP).action(async (args) => {
|
|
3824
|
+
const parent = args.parent === void 0 || args.parent === SHARED_WITH_ME ? args.parent : fileId(args.parent);
|
|
3825
|
+
const roots2 = activeProfile(env, selected()).roots;
|
|
3826
|
+
output(await browseFolders(call, parent, roots2));
|
|
3827
|
+
});
|
|
3683
3828
|
examples(annotate(folders.command("remove"), { effects: LOCAL_WRITE }).argument("<folder>", folderArgument).description("stop importing a folder; the next sync drops its documents"), ["drive personal folders remove FOLDER_ID"]).action((input) => {
|
|
3684
3829
|
const id = fileId(input);
|
|
3685
3830
|
const config = readConfig(env);
|
|
@@ -4880,8 +5025,9 @@ var describeCycle = /* @__PURE__ */ __name((cycle) => {
|
|
|
4880
5025
|
|
|
4881
5026
|
// dist/download.js
|
|
4882
5027
|
import { randomUUID } from "node:crypto";
|
|
4883
|
-
import { closeSync, linkSync, lstatSync, mkdirSync as mkdirSync2, openSync, renameSync, rmSync, writeFileSync as writeFileSync2 } from "node:fs";
|
|
5028
|
+
import { closeSync, createWriteStream, linkSync, lstatSync, mkdirSync as mkdirSync2, openSync, renameSync, rmSync, writeFileSync as writeFileSync2 } from "node:fs";
|
|
4884
5029
|
import { dirname, join as join5 } from "node:path";
|
|
5030
|
+
import { pipeline } from "node:stream/promises";
|
|
4885
5031
|
var EXPORT_FORMATS = {
|
|
4886
5032
|
pdf: "application/pdf",
|
|
4887
5033
|
docx: "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
|
|
@@ -4902,18 +5048,28 @@ var saveDownload = /* @__PURE__ */ __name(async (path, overwrite, read, createDi
|
|
|
4902
5048
|
throw error;
|
|
4903
5049
|
}
|
|
4904
5050
|
}
|
|
4905
|
-
const
|
|
5051
|
+
const source = await read();
|
|
4906
5052
|
if (createDirectory)
|
|
4907
5053
|
mkdirSync2(dirname(path), { recursive: true, mode: 448 });
|
|
4908
5054
|
const temp = join5(dirname(path), `.${randomUUID()}.tmp`);
|
|
4909
5055
|
let created = false;
|
|
5056
|
+
let size2 = 0;
|
|
4910
5057
|
try {
|
|
4911
|
-
|
|
4912
|
-
|
|
4913
|
-
|
|
4914
|
-
|
|
4915
|
-
|
|
4916
|
-
|
|
5058
|
+
if (source instanceof Uint8Array) {
|
|
5059
|
+
const fd = openSync(temp, "wx", 384);
|
|
5060
|
+
created = true;
|
|
5061
|
+
try {
|
|
5062
|
+
writeFileSync2(fd, source);
|
|
5063
|
+
} finally {
|
|
5064
|
+
closeSync(fd);
|
|
5065
|
+
}
|
|
5066
|
+
size2 = source.byteLength;
|
|
5067
|
+
} else {
|
|
5068
|
+
created = true;
|
|
5069
|
+
source.on("data", (chunk) => {
|
|
5070
|
+
size2 += chunk.length;
|
|
5071
|
+
});
|
|
5072
|
+
await pipeline(source, createWriteStream(temp, { flags: "wx", mode: 384 }));
|
|
4917
5073
|
}
|
|
4918
5074
|
if (overwrite)
|
|
4919
5075
|
renameSync(temp, path);
|
|
@@ -4927,7 +5083,7 @@ var saveDownload = /* @__PURE__ */ __name(async (path, overwrite, read, createDi
|
|
|
4927
5083
|
if (created)
|
|
4928
5084
|
rmSync(temp, { force: true });
|
|
4929
5085
|
}
|
|
4930
|
-
return
|
|
5086
|
+
return size2;
|
|
4931
5087
|
}, "saveDownload");
|
|
4932
5088
|
|
|
4933
5089
|
// dist/generated/definitions.js
|
|
@@ -22549,7 +22705,11 @@ var grants = /* @__PURE__ */ __name((raw) => {
|
|
|
22549
22705
|
var installSessionCommands = /* @__PURE__ */ __name((program, context) => {
|
|
22550
22706
|
const { env, streams, options, selected, output, policyFlags } = context;
|
|
22551
22707
|
const session = annotate(program.command("session"), { effects: LOCAL_READ }).description("sign in to Google and manage local profiles");
|
|
22552
|
-
examples(annotate(session.command("start"), { mcp: false, effects: REMOTE_WRITE }).description("sign in to Google in the browser; read-only unless you pass --grant write"), [
|
|
22708
|
+
examples(annotate(session.command("start"), { mcp: false, effects: REMOTE_WRITE }).description("sign in to Google in the browser; read-only unless you pass --grant write"), [
|
|
22709
|
+
"drive personal session start",
|
|
22710
|
+
"drive work session start --grant write,activity",
|
|
22711
|
+
"drive work session start --client-id 1234-abc.apps.googleusercontent.com"
|
|
22712
|
+
]).option("--client-file <file>", "path to your own Desktop OAuth client JSON, used instead of WireCat's").option("--client-id <id>", "your own Desktop OAuth client ID, used instead of WireCat's; its secret comes from DRIVE_GOOGLE_CLIENT_SECRET").option("--credential-storage <storage>", "where the sign-in is kept: keyring (the default, which falls back to a private file by itself when no keyring works), or file, not recommended", "keyring").option("--no-browser", "print the sign-in URL instead of opening a browser").option("--grant <scopes>", "also ask for these permissions, comma-separated: write (change Drive files and Docs), activity (read Drive Activity history), apps (see installed Drive apps)", grants).action(async (args, command) => {
|
|
22553
22713
|
if (args.credentialStorage !== "keyring" && args.credentialStorage !== "file")
|
|
22554
22714
|
throw new CliError("validation_error", "credential storage is keyring or file");
|
|
22555
22715
|
const signal = context.signal();
|
|
@@ -22559,11 +22719,14 @@ var installSessionCommands = /* @__PURE__ */ __name((program, context) => {
|
|
|
22559
22719
|
json: json === true || jsonl === true || !process.stdout.isTTY,
|
|
22560
22720
|
answers: false
|
|
22561
22721
|
});
|
|
22562
|
-
const {
|
|
22722
|
+
const app = application(env, { file: args.clientFile, clientId: args.clientId, profile: selected() });
|
|
22723
|
+
if (!app.clientSecret)
|
|
22724
|
+
streams.diagnostic("your Google app has no secret here, and Google refuses a Desktop app without one: set DRIVE_GOOGLE_CLIENT_SECRET\n");
|
|
22725
|
+
const { login } = await import("./login-BD2TS4GY.js");
|
|
22563
22726
|
output(itemOf(await login({
|
|
22564
22727
|
env,
|
|
22565
22728
|
profile: selected(),
|
|
22566
|
-
application:
|
|
22729
|
+
application: app,
|
|
22567
22730
|
storage: args.credentialStorage,
|
|
22568
22731
|
...Object.fromEntries([...args.grant ?? []].map((grant) => [grant, true])),
|
|
22569
22732
|
...options.keyring ? { keyring: options.keyring } : {},
|
|
@@ -22590,7 +22753,7 @@ var installSessionCommands = /* @__PURE__ */ __name((program, context) => {
|
|
|
22590
22753
|
const name = selected();
|
|
22591
22754
|
const config = readConfig(env);
|
|
22592
22755
|
const profile = activeProfile(env, name);
|
|
22593
|
-
const { credentials } = await import("./tokens-
|
|
22756
|
+
const { credentials } = await import("./tokens-HIG36RNS.js");
|
|
22594
22757
|
const store = credentials(env, profile.storage, options.keyring);
|
|
22595
22758
|
store.remove(name);
|
|
22596
22759
|
writeConfig(env, config);
|
|
@@ -22637,7 +22800,7 @@ var selection = /* @__PURE__ */ __name((env, name, source) => {
|
|
|
22637
22800
|
return { profile, state, options: { source, destination, collection: `google-drive:${profile.principal}`, env } };
|
|
22638
22801
|
}, "selection");
|
|
22639
22802
|
var checkStoreImport = /* @__PURE__ */ __name(async (env, name, source, bindings) => {
|
|
22640
|
-
const { ensureSqlite } = await import("./sqlite-runtime-
|
|
22803
|
+
const { ensureSqlite } = await import("./sqlite-runtime-DLK4SU33.js");
|
|
22641
22804
|
await ensureSqlite();
|
|
22642
22805
|
const { state, options } = selection(env, name, source);
|
|
22643
22806
|
const preview = await previewDocumentTransfer({ ...options, bindings });
|
|
@@ -22811,7 +22974,7 @@ var installSyncCommands = /* @__PURE__ */ __name((program, context) => {
|
|
|
22811
22974
|
// dist/commands/upgrade.js
|
|
22812
22975
|
import { join as join7 } from "node:path";
|
|
22813
22976
|
|
|
22814
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22977
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/update/index.js
|
|
22815
22978
|
import { realpathSync } from "node:fs";
|
|
22816
22979
|
import { fileURLToPath } from "node:url";
|
|
22817
22980
|
var QUIET_WORDS = [
|
|
@@ -23230,9 +23393,9 @@ var DRIVE_PROVIDER = {
|
|
|
23230
23393
|
var openIndex = /* @__PURE__ */ __name(async (env, name, rescan = false) => {
|
|
23231
23394
|
if (name)
|
|
23232
23395
|
activeProfile(env, name);
|
|
23233
|
-
const { ensureSqlite } = await import("./sqlite-runtime-
|
|
23396
|
+
const { ensureSqlite } = await import("./sqlite-runtime-DLK4SU33.js");
|
|
23234
23397
|
await ensureSqlite();
|
|
23235
|
-
const { openStore: openStore2, storePath: storePath2 } = await import("./store-
|
|
23398
|
+
const { openStore: openStore2, storePath: storePath2 } = await import("./store-4OFK7PKQ.js");
|
|
23236
23399
|
if (env.DRIVE_STORE)
|
|
23237
23400
|
throw new CliError("configuration_error", "DRIVE_STORE has been retired; use MESSAGING_STORE to select the shared database", { reason: "store.override-retired" });
|
|
23238
23401
|
const store = await openStore2({ path: storePath2(env), env, command: "drive", version: VERSION });
|
|
@@ -23277,7 +23440,7 @@ var indexOver = /* @__PURE__ */ __name((store, env, pictureEmbedder) => {
|
|
|
23277
23440
|
linkMessages: /* @__PURE__ */ __name((documents, since) => store.notes.linkMessages({ documents, ...since ? { since } : {} }), "linkMessages"),
|
|
23278
23441
|
knowledge: documentKnowledge2(store, async (principal) => (await folder(principal, false))?.id),
|
|
23279
23442
|
openPictures: /* @__PURE__ */ __name(async () => {
|
|
23280
|
-
const { openPictureEmbedderFor, savePicture } = await import("./services-
|
|
23443
|
+
const { openPictureEmbedderFor, savePicture } = await import("./services-YAFTELBI.js");
|
|
23281
23444
|
const embedder = pictureEmbedder ?? await openPictureEmbedderFor({ env, command: "drive" });
|
|
23282
23445
|
return {
|
|
23283
23446
|
save: /* @__PURE__ */ __name((reference, bytes) => savePicture(store, { ref: reference }, bytes, { embedder }), "save"),
|
|
@@ -23296,7 +23459,7 @@ var indexOver = /* @__PURE__ */ __name((store, env, pictureEmbedder) => {
|
|
|
23296
23459
|
has_more: false,
|
|
23297
23460
|
meaning_skipped: "this Google account has no imported sources"
|
|
23298
23461
|
};
|
|
23299
|
-
const { searchNotes } = await import("./services-
|
|
23462
|
+
const { searchNotes } = await import("./services-YAFTELBI.js");
|
|
23300
23463
|
const result = await searchNotes(store, query, {
|
|
23301
23464
|
...options,
|
|
23302
23465
|
folderIds: selected ? [selected.id] : [],
|
|
@@ -23327,7 +23490,7 @@ var indexOver = /* @__PURE__ */ __name((store, env, pictureEmbedder) => {
|
|
|
23327
23490
|
};
|
|
23328
23491
|
}, "search"),
|
|
23329
23492
|
embed: /* @__PURE__ */ __name(async (max) => {
|
|
23330
|
-
const { embedNotes } = await import("./services-
|
|
23493
|
+
const { embedNotes } = await import("./services-YAFTELBI.js");
|
|
23331
23494
|
return embedNotes(store, { maxChunks: max, env, command: "drive" });
|
|
23332
23495
|
}, "embed"),
|
|
23333
23496
|
close: /* @__PURE__ */ __name(() => store.close(), "close")
|
|
@@ -23614,7 +23777,7 @@ var installDrive = /* @__PURE__ */ __name((program) => {
|
|
|
23614
23777
|
}, "output");
|
|
23615
23778
|
const signal = /* @__PURE__ */ __name(() => environment().signal, "signal");
|
|
23616
23779
|
const signedIn = /* @__PURE__ */ __name(async (name, scope2) => {
|
|
23617
|
-
const { authorizedClient, checkAuthorization } = await import("./tokens-
|
|
23780
|
+
const { authorizedClient, checkAuthorization } = await import("./tokens-HIG36RNS.js");
|
|
23618
23781
|
const client = authorizedClient(env, name, environment().keyring, signal());
|
|
23619
23782
|
await checkAuthorization(client, scope2);
|
|
23620
23783
|
return client;
|
|
@@ -23624,7 +23787,7 @@ var installDrive = /* @__PURE__ */ __name((program) => {
|
|
|
23624
23787
|
const fake = environment().source;
|
|
23625
23788
|
if (fake)
|
|
23626
23789
|
return fake(name);
|
|
23627
|
-
const [{ googleSource }, client] = await Promise.all([import("./google-
|
|
23790
|
+
const [{ googleSource }, client] = await Promise.all([import("./google-KLZSUAVY.js"), signedIn(name)]);
|
|
23628
23791
|
return googleSource(client);
|
|
23629
23792
|
}, "source");
|
|
23630
23793
|
const withIndex = /* @__PURE__ */ __name(async (fn) => {
|
|
@@ -23690,7 +23853,7 @@ var installDrive = /* @__PURE__ */ __name((program) => {
|
|
|
23690
23853
|
runsOf.set(program, runs);
|
|
23691
23854
|
const imported = importedDocument(context);
|
|
23692
23855
|
installSessionCommands(program, context);
|
|
23693
|
-
installFolderCommands(program, context);
|
|
23856
|
+
installFolderCommands(program, context, (method, params) => remote.call(method, params));
|
|
23694
23857
|
installSyncCommands(program, context);
|
|
23695
23858
|
installStoreCommands(program, context);
|
|
23696
23859
|
installDocumentCommands(program, context);
|
|
@@ -23766,7 +23929,7 @@ var installDrive = /* @__PURE__ */ __name((program) => {
|
|
|
23766
23929
|
if (fake)
|
|
23767
23930
|
return await fake.call(method, params, body);
|
|
23768
23931
|
const [{ googleApi }, client] = await Promise.all([
|
|
23769
|
-
import("./google-api-
|
|
23932
|
+
import("./google-api-HZQ5R4ZO.js"),
|
|
23770
23933
|
signedIn(selected(), descriptor.scope)
|
|
23771
23934
|
]);
|
|
23772
23935
|
return await googleApi(client).call(method, params, body);
|
|
@@ -23792,7 +23955,7 @@ var installDrive = /* @__PURE__ */ __name((program) => {
|
|
|
23792
23955
|
if (fake)
|
|
23793
23956
|
return fake(id, mime);
|
|
23794
23957
|
const [{ googleDownload }, client] = await Promise.all([
|
|
23795
|
-
import("./google-api-
|
|
23958
|
+
import("./google-api-HZQ5R4ZO.js"),
|
|
23796
23959
|
signedIn(selected(), apiMethod(method).scope)
|
|
23797
23960
|
]);
|
|
23798
23961
|
return googleDownload(client)(id, mime);
|
|
@@ -23810,7 +23973,7 @@ var installDrive = /* @__PURE__ */ __name((program) => {
|
|
|
23810
23973
|
let request = environment().uploadRequest;
|
|
23811
23974
|
if (!request) {
|
|
23812
23975
|
const [{ googleUploadRequest }, client] = await Promise.all([
|
|
23813
|
-
import("./google-api-
|
|
23976
|
+
import("./google-api-HZQ5R4ZO.js"),
|
|
23814
23977
|
signedIn(selected(), apiMethod(method).scope)
|
|
23815
23978
|
]);
|
|
23816
23979
|
request = googleUploadRequest(client);
|
|
@@ -23927,6 +24090,8 @@ Availability: unavailable \u2014 ${availability.reason}
|
|
|
23927
24090
|
const key2 = action.args[0] ?? "";
|
|
23928
24091
|
if (key2 === "permissions" || key2.startsWith("permissions.mcp"))
|
|
23929
24092
|
throw new CliError("permission_error", "an agent cannot change its own authority or read-only settings");
|
|
24093
|
+
if (key2 === "google_client_id")
|
|
24094
|
+
throw new CliError("permission_error", "only the owner, at a terminal, chooses the Google app to sign in with");
|
|
23930
24095
|
}
|
|
23931
24096
|
}
|
|
23932
24097
|
const flags = policyFlags();
|
|
@@ -23990,10 +24155,7 @@ Availability: unavailable \u2014 ${availability.reason}
|
|
|
23990
24155
|
errors: { reasons: REASONS }
|
|
23991
24156
|
});
|
|
23992
24157
|
}, "installDrive");
|
|
23993
|
-
var oauthClient = /* @__PURE__ */ __name((env) =>
|
|
23994
|
-
application(env);
|
|
23995
|
-
return { client: env.DRIVE_GOOGLE_CLIENT_ID ? "own" : "wirecat" };
|
|
23996
|
-
}, "oauthClient");
|
|
24158
|
+
var oauthClient = /* @__PURE__ */ __name((env) => oauthClientReport(googleAppOf(env)), "oauthClient");
|
|
23997
24159
|
var mcpCommand = /* @__PURE__ */ __name(() => {
|
|
23998
24160
|
let availability;
|
|
23999
24161
|
const mcp = appMcpCommand(DRIVE_APP, configuration, {
|
|
@@ -24015,7 +24177,7 @@ var mcpCommand = /* @__PURE__ */ __name(() => {
|
|
|
24015
24177
|
const environment = environmentOf(action);
|
|
24016
24178
|
if (environment.api)
|
|
24017
24179
|
return;
|
|
24018
|
-
const { grantAvailability } = await import("./grants-
|
|
24180
|
+
const { grantAvailability } = await import("./grants-L7XLHLUT.js");
|
|
24019
24181
|
availability = grantAvailability(rootOf(root), environment.env ?? process.env, environment.keyring);
|
|
24020
24182
|
});
|
|
24021
24183
|
}, "mcpCommand");
|