@wirecat/drive-cli 0.58.0 → 0.60.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 +6 -2
- package/dist/bin/drive.js.map +1 -1
- package/dist/bundle/{all-profiles-ANDWOJDL.js → all-profiles-537I27Z4.js} +14 -13
- package/dist/bundle/{anthropic-EZPZUWGS.js → anthropic-X4NWVHDF.js} +9 -9
- package/dist/bundle/{app-server-67WL423B.js → app-server-KSHJKKS7.js} +53 -51
- package/dist/bundle/{bun-NIIYUR5F.js → bun-WTBGGCUC.js} +2 -2
- package/dist/bundle/{bun-sqlite-A5ZKTIYC.js → bun-sqlite-T7Y3JFFD.js} +8 -8
- package/dist/bundle/{chunk-5NPFHWLP.js → chunk-22ATLSNK.js} +5 -5
- package/dist/bundle/{chunk-ALTG7BZQ.js → chunk-246P2DCT.js} +19 -19
- package/dist/bundle/{chunk-NYINLKWT.js → chunk-2AXA5SKP.js} +1 -1
- package/dist/bundle/{chunk-BAEIAQWH.js → chunk-3TQHIHZI.js} +2 -2
- package/dist/bundle/{chunk-MBNKNWOG.js → chunk-4CBZEAQ7.js} +35 -34
- package/dist/bundle/{chunk-SWFA36F3.js → chunk-4VHBDVY2.js} +20 -14
- package/dist/bundle/{chunk-Z5GDNCTJ.js → chunk-4XZXH2NM.js} +2 -2
- package/dist/bundle/{chunk-A4DHPOFQ.js → chunk-57QVQGBE.js} +53 -39
- package/dist/bundle/{chunk-SPVPKHBQ.js → chunk-5AMRCBMP.js} +78 -40
- package/dist/bundle/{chunk-ED5JNYN5.js → chunk-5XHLQZAG.js} +30 -28
- package/dist/bundle/{chunk-BLJVCJZU.js → chunk-67QXMO2G.js} +26 -26
- package/dist/bundle/{chunk-EFEI724Z.js → chunk-6HTKB4WC.js} +1 -1
- package/dist/bundle/{chunk-U2RSVKR5.js → chunk-73MNUSP3.js} +1 -1
- package/dist/bundle/{chunk-4UU4ONKY.js → chunk-73TTP6ET.js} +5326 -636
- package/dist/bundle/{chunk-4ICWGMHN.js → chunk-77C5XRH3.js} +7 -7
- package/dist/bundle/{chunk-W6KMNO3C.js → chunk-77YTRBL6.js} +11 -11
- package/dist/bundle/{chunk-YHRJUZ3O.js → chunk-ALWTUDZF.js} +6 -4
- package/dist/bundle/{chunk-ESF2B22R.js → chunk-AXWXQNTC.js} +14 -11
- package/dist/bundle/{chunk-FD7A6745.js → chunk-CKGHRWVR.js} +4 -4
- package/dist/bundle/{chunk-X4F3M6L6.js → chunk-D6WIWOQC.js} +4 -4
- package/dist/bundle/{chunk-TCJRJ3TE.js → chunk-DMHGWL5D.js} +13 -13
- package/dist/bundle/{chunk-AFZ33AC7.js → chunk-DQDKLZAK.js} +179 -50
- package/dist/bundle/{chunk-ITD7WI23.js → chunk-EBLA7GXY.js} +1 -1
- package/dist/bundle/{chunk-UTDL7MKT.js → chunk-EHAI773E.js} +2 -2
- package/dist/bundle/{chunk-RRHC5SBB.js → chunk-FO4TCH6P.js} +2 -2
- package/dist/bundle/{chunk-7VFD3UJQ.js → chunk-FTZNUZO7.js} +3 -3
- package/dist/bundle/{chunk-JEMKSWVI.js → chunk-FZOCQQ66.js} +12 -12
- package/dist/bundle/{chunk-P5MCZ635.js → chunk-GD6TQ6U4.js} +11 -88
- package/dist/bundle/{chunk-PYPLD7JO.js → chunk-GVRS5AIH.js} +2 -2
- package/dist/bundle/{chunk-2TASMYGM.js → chunk-HCJG7ENG.js} +3 -3
- package/dist/bundle/{chunk-TIXIB32T.js → chunk-HFGR33KD.js} +153 -101
- package/dist/bundle/{chunk-ASPIEEXN.js → chunk-HIP43OGZ.js} +1 -1
- package/dist/bundle/{chunk-IBJOO5FG.js → chunk-HQVIK6PM.js} +37 -19
- package/dist/bundle/{chunk-AL7MY7MW.js → chunk-IRZ7OF3F.js} +1 -1
- package/dist/bundle/{chunk-OOR6PEHV.js → chunk-IXN7Y6JA.js} +1 -1
- package/dist/bundle/{chunk-4EEOJ54H.js → chunk-JGUJJNGZ.js} +5930 -3061
- package/dist/bundle/{chunk-6THTUYPT.js → chunk-JQLIM6BH.js} +5 -5
- package/dist/bundle/{chunk-LSSIVBQI.js → chunk-K6XVRA6U.js} +1 -1
- package/dist/bundle/chunk-KEXTTZJM.js +35 -0
- package/dist/bundle/{chunk-3RG27IWA.js → chunk-LJ77Y3TK.js} +5 -5
- package/dist/bundle/{chunk-I4VUHZSD.js → chunk-LQSRVQ3V.js} +4 -3
- package/dist/bundle/{chunk-NKL5XXOM.js → chunk-MVNPE5FZ.js} +8 -8
- package/dist/bundle/{chunk-6SARLV3Z.js → chunk-MXP35VPO.js} +4 -4
- package/dist/bundle/{chunk-J36Z6BDZ.js → chunk-N7S2UPF3.js} +652 -373
- package/dist/bundle/{chunk-4GZLX2ME.js → chunk-O37ESNAP.js} +40 -33
- package/dist/bundle/{chunk-OZEJA67C.js → chunk-OMKUBCNN.js} +8 -8
- package/dist/bundle/{chunk-XQMMB6ST.js → chunk-OYNUBWD2.js} +2 -22
- package/dist/bundle/{chunk-OUQVZTF5.js → chunk-PDYHEWKG.js} +7 -42
- package/dist/bundle/{chunk-QVIJMV22.js → chunk-PETFPXLU.js} +3 -3
- package/dist/bundle/{chunk-TNX77VPM.js → chunk-PPL5ASW2.js} +4908 -1588
- package/dist/bundle/{chunk-GDRO4YMH.js → chunk-QIJWSKZL.js} +4 -4
- package/dist/bundle/{chunk-EFX6FIDM.js → chunk-S36HRPNS.js} +1 -1
- package/dist/bundle/{chunk-WICYDOVL.js → chunk-SBHSNOU4.js} +91 -23
- package/dist/bundle/{chunk-7YUZAEBG.js → chunk-SZXI4OXX.js} +2 -2
- package/dist/bundle/{chunk-O3K46QRL.js → chunk-TKW4QWCY.js} +20 -6
- package/dist/bundle/{chunk-UBZ2LH7N.js → chunk-TVQDMP2F.js} +1533 -602
- package/dist/bundle/{chunk-7AL57FCK.js → chunk-TXMTMEHW.js} +4 -4
- package/dist/bundle/{chunk-X5XWUQNU.js → chunk-UNJE63JK.js} +2 -2
- package/dist/bundle/chunk-UTFATA4K.js +93 -0
- package/dist/bundle/{chunk-34XHR5FL.js → chunk-UVLSWLPZ.js} +16 -16
- package/dist/bundle/chunk-UVYVIHEA.js +34 -0
- package/dist/bundle/{chunk-IH4UCM5K.js → chunk-V2VMBM7O.js} +2 -2
- package/dist/bundle/{chunk-KCBHOYNZ.js → chunk-V7QMHMR3.js} +8 -13
- package/dist/bundle/{chunk-IXXQZCNK.js → chunk-VRW6ZDTH.js} +32 -19
- package/dist/bundle/{chunk-VXI67T7U.js → chunk-VVCZS42A.js} +1 -1
- package/dist/bundle/{chunk-A7FMNTCK.js → chunk-W62CON5K.js} +4 -4
- package/dist/bundle/{chunk-BKM2CGG2.js → chunk-XDIEQ2CE.js} +3 -3
- package/dist/bundle/{chunk-OG5ERX4S.js → chunk-XFXRGQXJ.js} +2 -2
- package/dist/bundle/{chunk-UMJLXAJI.js → chunk-YDN2RH5S.js} +2 -2
- package/dist/bundle/{chunk-TMW526H3.js → chunk-YGG7UA3C.js} +5 -5
- package/dist/bundle/{chunk-D72FL3L3.js → chunk-YYHKVOVK.js} +35 -35
- package/dist/bundle/{chunk-3GXNODTB.js → chunk-ZPQS7XJA.js} +4 -4
- package/dist/bundle/{chunk-JZ67M3HR.js → chunk-ZYCLPJ7U.js} +1 -1
- package/dist/bundle/command-contract-NUIWUVYB.js +39 -0
- package/dist/bundle/{decode-2R6DTGRX.js → decode-35N57AFW.js} +8 -8
- package/dist/bundle/{dispatch-DEXAEMIN.js → dispatch-CWXZW3PL.js} +9 -9
- package/dist/bundle/drive.js +12 -12
- package/dist/bundle/{echarts-CLB22SZS.js → echarts-3P3QZWMU.js} +2 -2
- package/dist/bundle/{embed-RJJWOLKN.js → embed-Q6Q5IOJQ.js} +9 -9
- package/dist/bundle/{embedder-DWYS5JYJ.js → embedder-D44JDTAA.js} +12 -12
- package/dist/bundle/entry-ZHCNI7XO.js +22 -0
- package/dist/bundle/{failure-GBZ4L5QO.js → failure-GRMMSDCZ.js} +4 -4
- package/dist/bundle/first-run-3DC2SDWM.js +30 -0
- package/dist/bundle/first-screen-YJF4YODC.js +37 -0
- package/dist/bundle/{google-L776ETP4.js → google-6ZZDKFBN.js} +13 -13
- package/dist/bundle/{google-api-AI5ZJJ2M.js → google-api-E6MOJ4ZD.js} +57 -56
- package/dist/bundle/grants-GWXDH5GM.js +105 -0
- package/dist/bundle/{identity-MDLWK2TX.js → identity-TID7S5NE.js} +6 -6
- package/dist/bundle/{instructions-BXZZNAMS.js → instructions-ANJN4HV3.js} +1 -1
- package/dist/bundle/{login-6HHQLRHY.js → login-BGMK2ABH.js} +65 -66
- package/dist/bundle/{mcp-ZZUYI44D.js → mcp-WBHKX5E3.js} +2 -2
- package/dist/bundle/{node-R6ZNQ3NT.js → node-VOB45ES2.js} +2 -2
- package/dist/bundle/{node-sqlite-AVNHGMVL.js → node-sqlite-TSX6XQY2.js} +14 -8
- package/dist/bundle/oauth-CEOYXW6C.js +22 -0
- package/dist/bundle/{open-BXPLXJC2.js → open-3USWHGNR.js} +8 -7
- package/dist/bundle/{openai-CRO5GDBY.js → openai-YZ5VGPIP.js} +17 -17
- package/dist/bundle/{process-P36JP33R.js → process-44JS2W7L.js} +1 -1
- package/dist/bundle/{program-4DWVWSGQ.js → program-TZLAFKJV.js} +158 -103
- package/dist/bundle/prompt-SG7LAOXW.js +17 -0
- package/dist/bundle/{reasons-IHPNUP5W.js → reasons-ZK3U3CIN.js} +5 -5
- package/dist/bundle/{recognize-NAISVA56.js → recognize-OFW7HWTM.js} +7 -7
- package/dist/bundle/{remote-KCUHG5HV.js → remote-YBDRZQZ5.js} +10 -10
- package/dist/bundle/{rerank-Q3POCDSK.js → rerank-TQQNS5FJ.js} +10 -10
- package/dist/bundle/{serve-5CUOYLSG.js → serve-OPZXMVLH.js} +14 -13
- package/dist/bundle/{server-FXW3GARV.js → server-2D6DDIK5.js} +44 -43
- package/dist/bundle/server-R6G2O772.js +70 -0
- package/dist/bundle/{services-PEYBXZ3R.js → services-34WKT3NN.js} +101 -31
- package/dist/bundle/{sqlite-runtime-YMPWN5PM.js → sqlite-runtime-WPUMKLUV.js} +9 -8
- package/dist/bundle/{start-PFWEF44R.js → start-ZXUJZ4JV.js} +7 -7
- package/dist/bundle/{state-5TQ7IOJH.js → state-AV2RB3AQ.js} +9 -9
- package/dist/bundle/{store-P4OYYFW5.js → store-3M7N2Q5T.js} +20 -16
- package/dist/bundle/{store-E2VWY4O6.js → store-YKV4GAMS.js} +49 -22
- package/dist/bundle/store-maintenance-command-WDXNY4ZF.js +60 -0
- package/dist/bundle/tokens-F63RXXEF.js +103 -0
- package/dist/commands/config.d.ts.map +1 -1
- package/dist/commands/config.js +14 -5
- package/dist/commands/config.js.map +1 -1
- package/dist/commands/context.d.ts +4 -2
- package/dist/commands/context.d.ts.map +1 -1
- package/dist/commands/context.js.map +1 -1
- package/dist/commands/documents.d.ts +1 -0
- package/dist/commands/documents.d.ts.map +1 -1
- package/dist/commands/documents.js +14 -1
- package/dist/commands/documents.js.map +1 -1
- package/dist/commands/knowledge.d.ts +4 -0
- package/dist/commands/knowledge.d.ts.map +1 -1
- package/dist/commands/knowledge.js +8 -7
- package/dist/commands/knowledge.js.map +1 -1
- package/dist/commands/session.d.ts.map +1 -1
- package/dist/commands/session.js +5 -2
- package/dist/commands/session.js.map +1 -1
- package/dist/config.d.ts +7 -0
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +22 -3
- package/dist/config.js.map +1 -1
- package/dist/contract-overrides.js +5 -5
- package/dist/contract-overrides.js.map +1 -1
- package/dist/errors.js +4 -4
- package/dist/errors.js.map +1 -1
- package/dist/knowledge-query.d.ts +2 -0
- package/dist/knowledge-query.d.ts.map +1 -1
- package/dist/login.d.ts.map +1 -1
- package/dist/login.js +3 -5
- package/dist/login.js.map +1 -1
- package/dist/program.d.ts.map +1 -1
- package/dist/program.js +13 -4
- package/dist/program.js.map +1 -1
- package/dist/provider-json.d.ts +2 -0
- package/dist/provider-json.d.ts.map +1 -1
- package/dist/provider-json.js +13 -0
- package/dist/provider-json.js.map +1 -1
- package/dist/reasons.d.ts +1 -1
- package/dist/reasons.d.ts.map +1 -1
- package/dist/reasons.js +2 -22
- package/dist/reasons.js.map +1 -1
- package/dist/registry.d.ts +1 -1
- package/dist/registry.d.ts.map +1 -1
- package/dist/registry.js +2 -1
- package/dist/registry.js.map +1 -1
- package/dist/store.d.ts +2 -0
- package/dist/store.d.ts.map +1 -1
- package/dist/store.js +9 -0
- package/dist/store.js.map +1 -1
- package/dist/tokens.js +5 -5
- package/dist/tokens.js.map +1 -1
- package/dist/upload.js +1 -1
- package/dist/upload.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +3 -3
- package/skills/drive-cli/SKILL.md +2 -1
- package/dist/bundle/chunk-7VUHY5LP.js +0 -18
- package/dist/bundle/chunk-Y6M2G7JK.js +0 -3609
- package/dist/bundle/command-contract-ZCXFT764.js +0 -39
- package/dist/bundle/entry-E6H7IUPV.js +0 -21
- package/dist/bundle/first-run-DI2JIG44.js +0 -30
- package/dist/bundle/first-screen-X5N4TCKD.js +0 -37
- package/dist/bundle/grants-HKGYAWL6.js +0 -104
- package/dist/bundle/oauth-UVU52X57.js +0 -22
- package/dist/bundle/prompt-AFWVGRDG.js +0 -17
- package/dist/bundle/server-FTLPSLRU.js +0 -69
- package/dist/bundle/store-maintenance-command-MWVERNK7.js +0 -58
- package/dist/bundle/tokens-OVG4CJO4.js +0 -102
- /package/dist/bundle/{chunk-HPXYN7F3.js → chunk-LK2E2ELG.js} +0 -0
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
metadataJson,
|
|
9
9
|
supported,
|
|
10
10
|
tooManyEntries
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-VVCZS42A.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-LQSRVQ3V.js";
|
|
23
23
|
import {
|
|
24
24
|
DEFAULTS_ONLY,
|
|
25
25
|
DEFAULT_LEVELS,
|
|
@@ -28,6 +28,7 @@ import {
|
|
|
28
28
|
application,
|
|
29
29
|
checkTextLimit,
|
|
30
30
|
configIssues,
|
|
31
|
+
configPath,
|
|
31
32
|
configuration,
|
|
32
33
|
configuredMirrors,
|
|
33
34
|
configuredSessions,
|
|
@@ -44,8 +45,9 @@ import {
|
|
|
44
45
|
selectedFolders,
|
|
45
46
|
textLimit,
|
|
46
47
|
unknownProfile,
|
|
48
|
+
withDefaults,
|
|
47
49
|
writeConfig
|
|
48
|
-
} from "./chunk-
|
|
50
|
+
} from "./chunk-HQVIK6PM.js";
|
|
49
51
|
import {
|
|
50
52
|
blockKey,
|
|
51
53
|
blocksMarkdown,
|
|
@@ -64,7 +66,7 @@ import {
|
|
|
64
66
|
syncDocuments,
|
|
65
67
|
syncMirrors,
|
|
66
68
|
watchMirrors
|
|
67
|
-
} from "./chunk-
|
|
69
|
+
} from "./chunk-57QVQGBE.js";
|
|
68
70
|
import {
|
|
69
71
|
apiMethod,
|
|
70
72
|
apiMethods,
|
|
@@ -73,7 +75,7 @@ import {
|
|
|
73
75
|
schemas,
|
|
74
76
|
validateApiParams,
|
|
75
77
|
validateRequest
|
|
76
|
-
} from "./chunk-
|
|
78
|
+
} from "./chunk-QIJWSKZL.js";
|
|
77
79
|
import {
|
|
78
80
|
DISCOVERY_DESCRIPTIONS,
|
|
79
81
|
MEMO_SCENARIOS,
|
|
@@ -103,24 +105,24 @@ import {
|
|
|
103
105
|
skillCommand,
|
|
104
106
|
suggest,
|
|
105
107
|
upgradeCommand
|
|
106
|
-
} from "./chunk-
|
|
108
|
+
} from "./chunk-TVQDMP2F.js";
|
|
107
109
|
import {
|
|
108
110
|
googleError
|
|
109
|
-
} from "./chunk-
|
|
110
|
-
import "./chunk-
|
|
111
|
+
} from "./chunk-JQLIM6BH.js";
|
|
112
|
+
import "./chunk-IXN7Y6JA.js";
|
|
111
113
|
import "./chunk-SBZB7HMU.js";
|
|
112
|
-
import "./chunk-
|
|
113
|
-
import "./chunk-
|
|
114
|
-
import "./chunk-
|
|
114
|
+
import "./chunk-IRZ7OF3F.js";
|
|
115
|
+
import "./chunk-5AMRCBMP.js";
|
|
116
|
+
import "./chunk-SBHSNOU4.js";
|
|
115
117
|
import {
|
|
116
118
|
modelGateway,
|
|
117
119
|
storeInfo
|
|
118
|
-
} from "./chunk-
|
|
120
|
+
} from "./chunk-DQDKLZAK.js";
|
|
119
121
|
import {
|
|
120
122
|
RecipientList,
|
|
121
123
|
SendJournal,
|
|
122
124
|
sendGuard
|
|
123
|
-
} from "./chunk-
|
|
125
|
+
} from "./chunk-5XHLQZAG.js";
|
|
124
126
|
import {
|
|
125
127
|
LIST_QUERY_GUIDE,
|
|
126
128
|
listQuery,
|
|
@@ -131,16 +133,13 @@ import {
|
|
|
131
133
|
typedQuery,
|
|
132
134
|
unfilteredQuery,
|
|
133
135
|
withQuery
|
|
134
|
-
} from "./chunk-
|
|
136
|
+
} from "./chunk-VRW6ZDTH.js";
|
|
135
137
|
import {
|
|
136
138
|
commandsText,
|
|
137
139
|
inSection
|
|
138
|
-
} from "./chunk-
|
|
140
|
+
} from "./chunk-OMKUBCNN.js";
|
|
139
141
|
import "./chunk-HTQTIKWP.js";
|
|
140
|
-
import
|
|
141
|
-
answerEntity
|
|
142
|
-
} from "./chunk-OUQVZTF5.js";
|
|
143
|
-
import "./chunk-Y6M2G7JK.js";
|
|
142
|
+
import "./chunk-PDYHEWKG.js";
|
|
144
143
|
import {
|
|
145
144
|
FETCH,
|
|
146
145
|
InvalidArgumentError,
|
|
@@ -150,6 +149,7 @@ import {
|
|
|
150
149
|
Option,
|
|
151
150
|
REMOTE_WRITE,
|
|
152
151
|
annotate,
|
|
152
|
+
answerEntity,
|
|
153
153
|
changesAuthority,
|
|
154
154
|
commandWords,
|
|
155
155
|
customizeSharedCommand,
|
|
@@ -169,30 +169,31 @@ import {
|
|
|
169
169
|
renderAnswer,
|
|
170
170
|
resolveAISettings,
|
|
171
171
|
rootOf,
|
|
172
|
+
settingRows,
|
|
172
173
|
snakeKeys
|
|
173
|
-
} from "./chunk-
|
|
174
|
-
import "./chunk-
|
|
175
|
-
import "./chunk-
|
|
174
|
+
} from "./chunk-73TTP6ET.js";
|
|
175
|
+
import "./chunk-GD6TQ6U4.js";
|
|
176
|
+
import "./chunk-FZOCQQ66.js";
|
|
176
177
|
import {
|
|
177
178
|
setupPermissionCeiling
|
|
178
|
-
} from "./chunk-
|
|
179
|
-
import "./chunk-
|
|
179
|
+
} from "./chunk-D6WIWOQC.js";
|
|
180
|
+
import "./chunk-AXWXQNTC.js";
|
|
180
181
|
import {
|
|
181
182
|
readOnlyLockOf,
|
|
182
183
|
readOnlyRefusal
|
|
183
|
-
} from "./chunk-
|
|
184
|
-
import "./chunk-
|
|
185
|
-
import "./chunk-
|
|
186
|
-
import "./chunk-
|
|
187
|
-
import "./chunk-
|
|
184
|
+
} from "./chunk-4XZXH2NM.js";
|
|
185
|
+
import "./chunk-TXMTMEHW.js";
|
|
186
|
+
import "./chunk-FTZNUZO7.js";
|
|
187
|
+
import "./chunk-73MNUSP3.js";
|
|
188
|
+
import "./chunk-HCJG7ENG.js";
|
|
188
189
|
import {
|
|
189
190
|
newOperationId
|
|
190
|
-
} from "./chunk-
|
|
191
|
+
} from "./chunk-JGUJJNGZ.js";
|
|
191
192
|
import {
|
|
192
193
|
columnName,
|
|
193
194
|
readSpreadsheet
|
|
194
|
-
} from "./chunk-
|
|
195
|
-
import "./chunk-
|
|
195
|
+
} from "./chunk-67QXMO2G.js";
|
|
196
|
+
import "./chunk-DMHGWL5D.js";
|
|
196
197
|
import {
|
|
197
198
|
CEILING_KEY,
|
|
198
199
|
LEVELS,
|
|
@@ -201,40 +202,40 @@ import {
|
|
|
201
202
|
layerPermissions,
|
|
202
203
|
levelFor,
|
|
203
204
|
parseDuration
|
|
204
|
-
} from "./chunk-
|
|
205
|
-
import "./chunk-
|
|
205
|
+
} from "./chunk-HFGR33KD.js";
|
|
206
|
+
import "./chunk-YDN2RH5S.js";
|
|
206
207
|
import {
|
|
207
208
|
latestVersion,
|
|
208
209
|
runUpdate,
|
|
209
210
|
updateNotice
|
|
210
|
-
} from "./chunk-
|
|
211
|
-
import "./chunk-
|
|
212
|
-
import "./chunk-
|
|
213
|
-
import "./chunk-
|
|
214
|
-
import "./chunk-
|
|
211
|
+
} from "./chunk-CKGHRWVR.js";
|
|
212
|
+
import "./chunk-ZYCLPJ7U.js";
|
|
213
|
+
import "./chunk-EHAI773E.js";
|
|
214
|
+
import "./chunk-PETFPXLU.js";
|
|
215
|
+
import "./chunk-YGG7UA3C.js";
|
|
215
216
|
import "./chunk-5DPV7X27.js";
|
|
216
|
-
import "./chunk-
|
|
217
|
+
import "./chunk-ALWTUDZF.js";
|
|
217
218
|
import {
|
|
218
219
|
applyDocumentTransfer,
|
|
219
220
|
previewDocumentTransfer
|
|
220
|
-
} from "./chunk-
|
|
221
|
+
} from "./chunk-UVLSWLPZ.js";
|
|
221
222
|
import {
|
|
222
223
|
note
|
|
223
|
-
} from "./chunk-
|
|
224
|
-
import "./chunk-
|
|
224
|
+
} from "./chunk-YYHKVOVK.js";
|
|
225
|
+
import "./chunk-3TQHIHZI.js";
|
|
225
226
|
import {
|
|
226
227
|
CATALOG_QUERY,
|
|
227
228
|
IMPORTED_DOCUMENT_QUERY,
|
|
228
229
|
openStore
|
|
229
|
-
} from "./chunk-
|
|
230
|
-
import "./chunk-
|
|
230
|
+
} from "./chunk-PPL5ASW2.js";
|
|
231
|
+
import "./chunk-UNJE63JK.js";
|
|
231
232
|
import {
|
|
232
233
|
FACT_STATUSES,
|
|
233
234
|
FACT_TYPES,
|
|
234
235
|
MEMORY_KINDS,
|
|
235
236
|
MEMORY_SCOPES,
|
|
236
237
|
MEMORY_STATUSES
|
|
237
|
-
} from "./chunk-
|
|
238
|
+
} from "./chunk-N7S2UPF3.js";
|
|
238
239
|
import {
|
|
239
240
|
dateRange,
|
|
240
241
|
defineQuery,
|
|
@@ -244,38 +245,40 @@ import {
|
|
|
244
245
|
timezoneOf,
|
|
245
246
|
validateQuery,
|
|
246
247
|
zonedMoment
|
|
247
|
-
} from "./chunk-
|
|
248
|
-
import "./chunk-
|
|
249
|
-
import "./chunk-
|
|
248
|
+
} from "./chunk-4VHBDVY2.js";
|
|
249
|
+
import "./chunk-UTFATA4K.js";
|
|
250
|
+
import "./chunk-MVNPE5FZ.js";
|
|
251
|
+
import "./chunk-77C5XRH3.js";
|
|
250
252
|
import {
|
|
251
253
|
storePath
|
|
252
|
-
} from "./chunk-
|
|
253
|
-
import "./chunk-
|
|
254
|
-
import "./chunk-
|
|
255
|
-
import "./chunk-
|
|
256
|
-
import "./chunk-
|
|
254
|
+
} from "./chunk-KEXTTZJM.js";
|
|
255
|
+
import "./chunk-V7QMHMR3.js";
|
|
256
|
+
import "./chunk-K6XVRA6U.js";
|
|
257
|
+
import "./chunk-XDIEQ2CE.js";
|
|
258
|
+
import "./chunk-SZXI4OXX.js";
|
|
257
259
|
import "./chunk-D72URWJE.js";
|
|
258
260
|
import {
|
|
259
261
|
installerOf
|
|
260
|
-
} from "./chunk-
|
|
262
|
+
} from "./chunk-2AXA5SKP.js";
|
|
261
263
|
import {
|
|
262
264
|
DRIVE_APP,
|
|
263
265
|
PACKAGE,
|
|
264
266
|
VERSION
|
|
265
|
-
} from "./chunk-
|
|
267
|
+
} from "./chunk-XFXRGQXJ.js";
|
|
266
268
|
import {
|
|
267
269
|
REASONS
|
|
268
|
-
} from "./chunk-
|
|
269
|
-
import "./chunk-
|
|
270
|
+
} from "./chunk-OYNUBWD2.js";
|
|
271
|
+
import "./chunk-LK2E2ELG.js";
|
|
272
|
+
import "./chunk-UVYVIHEA.js";
|
|
270
273
|
import {
|
|
271
274
|
processStreams,
|
|
272
275
|
saveConfigFile,
|
|
273
276
|
writeSecurely
|
|
274
|
-
} from "./chunk-
|
|
275
|
-
import "./chunk-
|
|
277
|
+
} from "./chunk-246P2DCT.js";
|
|
278
|
+
import "./chunk-LJ77Y3TK.js";
|
|
276
279
|
import "./chunk-Y5E2WNWB.js";
|
|
277
|
-
import "./chunk-
|
|
278
|
-
import "./chunk-
|
|
280
|
+
import "./chunk-HIP43OGZ.js";
|
|
281
|
+
import "./chunk-FO4TCH6P.js";
|
|
279
282
|
import {
|
|
280
283
|
array,
|
|
281
284
|
boolean,
|
|
@@ -299,11 +302,11 @@ import {
|
|
|
299
302
|
string,
|
|
300
303
|
unknown,
|
|
301
304
|
writes
|
|
302
|
-
} from "./chunk-
|
|
305
|
+
} from "./chunk-TKW4QWCY.js";
|
|
303
306
|
import {
|
|
304
307
|
CliError,
|
|
305
308
|
isCliError
|
|
306
|
-
} from "./chunk-
|
|
309
|
+
} from "./chunk-EBLA7GXY.js";
|
|
307
310
|
import {
|
|
308
311
|
__commonJS,
|
|
309
312
|
__name,
|
|
@@ -2617,7 +2620,10 @@ var installConfigCommands = /* @__PURE__ */ __name((program, { env, selected, ou
|
|
|
2617
2620
|
const config = annotate(program.command("config"), { effects: LOCAL_READ }).description("read and change settings; credentials are kept apart");
|
|
2618
2621
|
examples(annotate(config.command("show"), { effects: LOCAL_READ }).description("show the defaults and every profile's settings"), ["drive config show"]).action(() => {
|
|
2619
2622
|
const file = inspectConfig(env, known());
|
|
2620
|
-
output(itemOf(
|
|
2623
|
+
output(itemOf({
|
|
2624
|
+
...knownOnly(file.config, known()),
|
|
2625
|
+
settings: settingRows(file.raw, configuration.declaredSettings)
|
|
2626
|
+
}));
|
|
2621
2627
|
for (const issue of file.issues)
|
|
2622
2628
|
streams.diagnostic(`${issue.what}, so it is left out${issue.fix ? ` \u2014 \`${issue.fix}\` removes it` : ""}`);
|
|
2623
2629
|
});
|
|
@@ -2663,7 +2669,7 @@ var installConfigCommands = /* @__PURE__ */ __name((program, { env, selected, ou
|
|
|
2663
2669
|
const added = issuesOf(next).filter((issue) => !before.has(JSON.stringify(issue)) || !elsewhere.has(JSON.stringify(issue)));
|
|
2664
2670
|
if (added.length)
|
|
2665
2671
|
throw refusal(added);
|
|
2666
|
-
saveConfigFile(file.path, next);
|
|
2672
|
+
saveConfigFile(file.path, withDefaults(next));
|
|
2667
2673
|
output(itemOf({ key, updated: true, scope: name }));
|
|
2668
2674
|
});
|
|
2669
2675
|
examples(annotate(grantsAuthority(config.command("unset")), { effects: LOCAL_WRITE }).description("remove one setting from this profile, the defaults or the top of the file"), ["drive personal config unset max_text_chars", "drive personal config unset permissions.files --defaults"]).argument("<key>", "the setting, permissions.<key> or models.<purpose>.<field>; any key, known or not").option("--defaults", "change the defaults instead of this profile").action((key, args) => {
|
|
@@ -2694,10 +2700,16 @@ var installConfigCommands = /* @__PURE__ */ __name((program, { env, selected, ou
|
|
|
2694
2700
|
break;
|
|
2695
2701
|
delete holder[section];
|
|
2696
2702
|
}
|
|
2697
|
-
saveConfigFile(file.path, next);
|
|
2703
|
+
saveConfigFile(file.path, withDefaults(next, [at.join(".")]));
|
|
2698
2704
|
}
|
|
2699
2705
|
output(itemOf({ key, removed, scope: name }));
|
|
2700
2706
|
});
|
|
2707
|
+
examples(annotate(grantsAuthority(config.command("migrate")), { effects: LOCAL_WRITE }).description("write each setting the file lacks at its default, keeping yours"), ["drive config migrate"]).action(() => {
|
|
2708
|
+
const path = configPath(env);
|
|
2709
|
+
const added = configuration.migrate(path);
|
|
2710
|
+
output(itemOf({ config_file: path, added }));
|
|
2711
|
+
streams.diagnostic(added.length > 0 ? `added ${added.join(", ")} to ${path}` : `${path} already has every setting`);
|
|
2712
|
+
});
|
|
2701
2713
|
}, "installConfigCommands");
|
|
2702
2714
|
var installModelCommands = /* @__PURE__ */ __name((program, { env, output, streams, policyFlags }) => {
|
|
2703
2715
|
const models = annotate(program.command("models"), { effects: LOCAL_READ }).description("choose the memory model and download the search model");
|
|
@@ -2718,7 +2730,7 @@ var installModelCommands = /* @__PURE__ */ __name((program, { env, output, strea
|
|
|
2718
2730
|
throw new CliError("permission_error", "downloading a model needs the network; --offline was requested", {
|
|
2719
2731
|
reason: "offline.refused"
|
|
2720
2732
|
});
|
|
2721
|
-
const { downloadImageModel, downloadTextModel } = await import("./services-
|
|
2733
|
+
const { downloadImageModel, downloadTextModel } = await import("./services-34WKT3NN.js");
|
|
2722
2734
|
const progress = /* @__PURE__ */ __name((line) => {
|
|
2723
2735
|
if (!program.opts().quiet)
|
|
2724
2736
|
streams.diagnostic(line);
|
|
@@ -2818,7 +2830,7 @@ var SHELL_OVERRIDES = {
|
|
|
2818
2830
|
name: "document",
|
|
2819
2831
|
required: true,
|
|
2820
2832
|
variadic: false,
|
|
2821
|
-
description: "Google file or folder id or URL in the local catalog"
|
|
2833
|
+
description: "Google file or folder id or URL in the local catalog, or a document:<n> ref"
|
|
2822
2834
|
},
|
|
2823
2835
|
{
|
|
2824
2836
|
name: "text",
|
|
@@ -3144,7 +3156,7 @@ var SHELL_OVERRIDES = {
|
|
|
3144
3156
|
name: "document",
|
|
3145
3157
|
required: true,
|
|
3146
3158
|
variadic: false,
|
|
3147
|
-
description: "Google file or folder id or URL in the local catalog"
|
|
3159
|
+
description: "Google file or folder id or URL in the local catalog, or a document:<n> ref"
|
|
3148
3160
|
},
|
|
3149
3161
|
{
|
|
3150
3162
|
name: "query",
|
|
@@ -3200,7 +3212,7 @@ var SHELL_OVERRIDES = {
|
|
|
3200
3212
|
name: "document",
|
|
3201
3213
|
required: true,
|
|
3202
3214
|
variadic: false,
|
|
3203
|
-
description: "Google file or folder id or URL in the local catalog"
|
|
3215
|
+
description: "Google file or folder id or URL in the local catalog, or a document:<n> ref"
|
|
3204
3216
|
},
|
|
3205
3217
|
{
|
|
3206
3218
|
name: "note",
|
|
@@ -3247,7 +3259,7 @@ var SHELL_OVERRIDES = {
|
|
|
3247
3259
|
name: "document",
|
|
3248
3260
|
required: true,
|
|
3249
3261
|
variadic: false,
|
|
3250
|
-
description: "Google file or folder id or URL in the local catalog"
|
|
3262
|
+
description: "Google file or folder id or URL in the local catalog, or a document:<n> ref"
|
|
3251
3263
|
},
|
|
3252
3264
|
{
|
|
3253
3265
|
name: "note",
|
|
@@ -3308,7 +3320,7 @@ var SHELL_OVERRIDES = {
|
|
|
3308
3320
|
name: "document",
|
|
3309
3321
|
required: true,
|
|
3310
3322
|
variadic: false,
|
|
3311
|
-
description: "Google file or folder id or URL in the local catalog"
|
|
3323
|
+
description: "Google file or folder id or URL in the local catalog, or a document:<n> ref"
|
|
3312
3324
|
},
|
|
3313
3325
|
{
|
|
3314
3326
|
name: "note",
|
|
@@ -3555,10 +3567,21 @@ var changedCopy = /* @__PURE__ */ __name(({ changed, local_modified_at }) => {
|
|
|
3555
3567
|
|
|
3556
3568
|
// dist/commands/documents.js
|
|
3557
3569
|
var DOCUMENT_REF = /^document:[1-9]\d*$/;
|
|
3570
|
+
var isDocumentRef = /* @__PURE__ */ __name((input) => DOCUMENT_REF.test(input), "isDocumentRef");
|
|
3571
|
+
var refuseBareNumber = /* @__PURE__ */ __name((input, documents) => {
|
|
3572
|
+
if (!/^\d+$/.test(input))
|
|
3573
|
+
return;
|
|
3574
|
+
const ref = `document:${input}`;
|
|
3575
|
+
if (Object.values(documents).some((doc) => doc.reference === ref))
|
|
3576
|
+
throw new CliError("validation_error", `${input} is a bare number; name the document as ${ref}`, {
|
|
3577
|
+
reason: "ref.bare-number"
|
|
3578
|
+
});
|
|
3579
|
+
}, "refuseBareNumber");
|
|
3558
3580
|
var storedDocument = /* @__PURE__ */ __name(({ env, selected }) => (input) => {
|
|
3559
3581
|
const profile = activeProfile(env, selected());
|
|
3560
3582
|
const documents = readState(env, selected(), profile.principal).documents;
|
|
3561
|
-
|
|
3583
|
+
refuseBareNumber(input, documents);
|
|
3584
|
+
const id = isDocumentRef(input) ? Object.entries(documents).find(([, doc2]) => doc2.reference === input)?.[0] ?? "" : fileId(input);
|
|
3562
3585
|
const doc = documents[id];
|
|
3563
3586
|
if (!doc)
|
|
3564
3587
|
throw new CliError("not_found", "this source is not imported in the selected profile", {
|
|
@@ -3767,8 +3790,8 @@ var memorySearch = /* @__PURE__ */ __name((words) => {
|
|
|
3767
3790
|
|
|
3768
3791
|
// dist/commands/knowledge.js
|
|
3769
3792
|
var installKnowledgeCommandsDefinition = /* @__PURE__ */ __name((program, helpers) => {
|
|
3770
|
-
const { run: run3, output, positive: positive2 } = helpers;
|
|
3771
|
-
const documentArgument = "Google file or folder id or URL in the local catalog";
|
|
3793
|
+
const { run: run3, output, positive: positive2, author, decider } = helpers;
|
|
3794
|
+
const documentArgument = "Google file or folder id or URL in the local catalog, or a document:<n> ref";
|
|
3772
3795
|
const scopes = ["personal", "work"];
|
|
3773
3796
|
const documents = program.commands.find((command) => command.name() === "documents");
|
|
3774
3797
|
examples(annotate(documents.command("context"), { effects: LOCAL_READ }).argument("<document>", documentArgument).description("show a document with its tags, relationships, notes, memories and editors"), ["drive personal documents context DOC_ID"]).action(async (doc) => output(itemOf(await run3(doc, (k, p, ref) => k.context(p, ref)))));
|
|
@@ -3791,8 +3814,8 @@ var installKnowledgeCommandsDefinition = /* @__PURE__ */ __name((program, helper
|
|
|
3791
3814
|
examples(annotate(relationships.command("add"), { effects: LOCAL_WRITE }).description("connect a document to another reference"), [
|
|
3792
3815
|
"drive personal relationships add DOC_ID project:PROJECT_ID --kind about",
|
|
3793
3816
|
"drive personal relationships add DOC_ID person:PERSON_UID --kind assigned-to --role reviewer"
|
|
3794
|
-
]).argument("<document>", documentArgument).argument("<reference>", "what it connects to, such as person:<uid>, project:<id> or note:<id>").addOption(new Option("--kind <kind>", "how the two relate").choices(["links-to", "about", "evidence", "created-from", "related-to", "assigned-to"]).default("related-to")).option("--role <role>", "the part the reference plays, in a word or two").option("--reason <text>", "why the two are connected").action(async (doc, to, { reason, ...args }) => output(itemOf(await run3(doc, (k, p, ref) => k.addLink(p, ref, { to, ...args, ...reason ? { evidence: reason } : {} })))));
|
|
3795
|
-
examples(annotate(relationships.command("remove"), { effects: LOCAL_WRITE }).description("remove one of a document's relationships"), ["drive personal relationships remove DOC_ID LINK_ID"]).argument("<document>", documentArgument).argument("<relationship-id>", "id, as relationships list prints it").action(async (doc, id) => output(itemOf(await run3(doc, (k, p, ref) => k.removeLink(p, ref, id)))));
|
|
3817
|
+
]).argument("<document>", documentArgument).argument("<reference>", "what it connects to, such as person:<uid>, project:<id> or note:<id>").addOption(new Option("--kind <kind>", "how the two relate").choices(["links-to", "about", "evidence", "created-from", "related-to", "assigned-to"]).default("related-to")).option("--role <role>", "the part the reference plays, in a word or two").option("--reason <text>", "why the two are connected").action(async (doc, to, { reason, ...args }) => output(itemOf(await run3(doc, (k, p, ref) => k.addLink(p, ref, { to, ...args, by: decider(), ...reason ? { evidence: reason } : {} })))));
|
|
3818
|
+
examples(annotate(relationships.command("remove"), { effects: LOCAL_WRITE }).description("remove one of a document's relationships"), ["drive personal relationships remove DOC_ID LINK_ID"]).argument("<document>", documentArgument).argument("<relationship-id>", "id, as relationships list prints it").action(async (doc, id) => output(itemOf(await run3(doc, (k, p, ref) => k.removeLink(p, ref, id, decider())))));
|
|
3796
3819
|
const notes = annotate(program.command("notes"), { effects: LOCAL_READ }).description("write notes about an imported document");
|
|
3797
3820
|
const noteArgument = "note:<id> reference, as notes list prints it";
|
|
3798
3821
|
examples(annotate(notes.command("add"), {
|
|
@@ -3826,7 +3849,7 @@ var installKnowledgeCommandsDefinition = /* @__PURE__ */ __name((program, helper
|
|
|
3826
3849
|
const memories = annotate(program.command("memories"), { effects: LOCAL_READ }).description("keep what was learned from a document, with evidence; an agent's stay proposed");
|
|
3827
3850
|
const memoryArgument = "memory:<id> reference, as memories list prints it";
|
|
3828
3851
|
const scope = /* @__PURE__ */ __name((description) => new Option("--scope <scope>", description).choices(scopes), "scope");
|
|
3829
|
-
examples(annotate(memories.command("add"), { effects: LOCAL_WRITE }).description("record a memory about a document"), [`drive personal memories add DOC_ID "The team prefers async reviews" --scope work --kind preference`]).argument("<document>", documentArgument).argument("<text>", "what to remember").addOption(scope("whose memory it is: personal or work").makeOptionMandatory()).addOption(new Option("--kind <kind>", "what kind of memory it is").choices(MEMORY_KINDS).default("summary")).option("--supersedes <ref>", "a memory:<id> about the same document that this one replaces").action(async (doc, body, args) => output(itemOf(memoryItem(await run3(doc, (k, p, ref) => k.addMemory(p, ref, { body, ...args, status: "proposed" }))))));
|
|
3852
|
+
examples(annotate(memories.command("add"), { effects: LOCAL_WRITE }).description("record a memory about a document"), [`drive personal memories add DOC_ID "The team prefers async reviews" --scope work --kind preference`]).argument("<document>", documentArgument).argument("<text>", "what to remember").addOption(scope("whose memory it is: personal or work").makeOptionMandatory()).addOption(new Option("--kind <kind>", "what kind of memory it is").choices(MEMORY_KINDS).default("summary")).option("--supersedes <ref>", "a memory:<id> about the same document that this one replaces").action(async (doc, body, args) => output(itemOf(memoryItem(await run3(doc, (k, p, ref) => k.addMemory(p, ref, { body, ...args, status: "proposed", author: author() }))))));
|
|
3830
3853
|
withQuery(examples(annotate(memories.command("list"), { effects: LOCAL_READ }).description("list a document's memories"), [
|
|
3831
3854
|
"drive personal memories list DOC_ID scope:work",
|
|
3832
3855
|
"drive personal memories list DOC_ID kind:preference status:confirmed"
|
|
@@ -3845,7 +3868,7 @@ var installKnowledgeCommandsDefinition = /* @__PURE__ */ __name((program, helper
|
|
|
3845
3868
|
stale: "mark a memory as out of date"
|
|
3846
3869
|
};
|
|
3847
3870
|
for (const [action, description] of Object.entries(memoryActions))
|
|
3848
|
-
examples(annotate(memories.command(action), { effects: action === "show" ? LOCAL_READ : LOCAL_WRITE }).description(description), [`drive personal memories ${action} DOC_ID memory:MEMORY_ID`]).argument("<document>", documentArgument).argument("<memory>", memoryArgument).action(async (doc, memoryRef) => output(itemOf(memoryItem(await run3(doc, (k, p, ref) => k.memory(p, ref, memoryRef, action))))));
|
|
3871
|
+
examples(annotate(memories.command(action), { effects: action === "show" ? LOCAL_READ : LOCAL_WRITE }).description(description), [`drive personal memories ${action} DOC_ID memory:MEMORY_ID`]).argument("<document>", documentArgument).argument("<memory>", memoryArgument).action(async (doc, memoryRef) => output(itemOf(memoryItem(await run3(doc, (k, p, ref) => action === "show" ? k.memory(p, ref, memoryRef) : k.memory(p, ref, memoryRef, action, decider()))))));
|
|
3849
3872
|
const search = examples(annotate(memories.command("search"), { effects: LOCAL_READ }).description("search a document's memories by words"), [
|
|
3850
3873
|
"drive personal memories search DOC_ID reviews scope:work",
|
|
3851
3874
|
`drive personal memories search DOC_ID "async reviews"`
|
|
@@ -3882,6 +3905,7 @@ var installKnowledgeCommandsDefinition = /* @__PURE__ */ __name((program, helper
|
|
|
3882
3905
|
]).argument("<document>", documentArgument).argument("<statement>", "the fact, in one sentence").addOption(new Option("--type <type>", "what kind of fact it is").choices(FACT_TYPES).default("fact")).addOption(scope("whose fact it is: personal or work")).option("--supersedes <ref>", "a decision only: the decision this one replaces").option("--occurred-time <time>", "when it happened, as the evidence shows, ISO 8601; a time without a zone is read in this computer's zone, a date alone as its midnight").action(async (doc, statement, { occurredTime, ...args }) => output(itemOf(factItem(await run3(doc, (k, p, ref) => k.addFact(p, ref, {
|
|
3883
3906
|
statement,
|
|
3884
3907
|
...args,
|
|
3908
|
+
by: author(),
|
|
3885
3909
|
...occurredTime === void 0 ? {} : { occurredAt: occurredTime }
|
|
3886
3910
|
}))))));
|
|
3887
3911
|
withQuery(examples(annotate(facts.command("list"), { effects: LOCAL_READ }).description("list a document's facts"), [
|
|
@@ -3901,7 +3925,7 @@ var installKnowledgeCommandsDefinition = /* @__PURE__ */ __name((program, helper
|
|
|
3901
3925
|
reverse: "an accepted decision no longer holds, and nothing replaced it"
|
|
3902
3926
|
};
|
|
3903
3927
|
for (const [action, description] of Object.entries(factActions))
|
|
3904
|
-
examples(annotate(facts.command(action), { effects: action === "show" ? LOCAL_READ : LOCAL_WRITE }).description(description), [`drive personal facts ${action} DOC_ID fact:FACT_ID`]).argument("<document>", documentArgument).argument("<fact>", factArgument).action(async (doc, factRef) => output(itemOf(factItem(await run3(doc, (k, p, ref) => k.fact(p, ref, factRef, action))))));
|
|
3928
|
+
examples(annotate(facts.command(action), { effects: action === "show" ? LOCAL_READ : LOCAL_WRITE }).description(description), [`drive personal facts ${action} DOC_ID fact:FACT_ID`]).argument("<document>", documentArgument).argument("<fact>", factArgument).action(async (doc, factRef) => output(itemOf(factItem(await run3(doc, (k, p, ref) => action === "show" ? k.fact(p, ref, factRef) : k.fact(p, ref, factRef, action, decider()))))));
|
|
3905
3929
|
const identities = annotate(program.command("identities"), { effects: LOCAL_READ }).description("the Google accounts seen on a document, and the people they belong to");
|
|
3906
3930
|
bindQuery(examples(annotate(identities.command("list"), { effects: LOCAL_READ }).description("list the owners and last editor Google shows for a document"), ["drive personal identities list DOC_ID"]).argument("<document>", documentArgument), IDENTITIES_QUERY, identityRow).action(async (doc, words) => {
|
|
3907
3931
|
const filter = termsOf(words, IDENTITIES_QUERY, "identities list");
|
|
@@ -22525,7 +22549,7 @@ var grants = /* @__PURE__ */ __name((raw) => {
|
|
|
22525
22549
|
var installSessionCommands = /* @__PURE__ */ __name((program, context) => {
|
|
22526
22550
|
const { env, streams, options, selected, output, policyFlags } = context;
|
|
22527
22551
|
const session = annotate(program.command("session"), { effects: LOCAL_READ }).description("sign in to Google and manage local profiles");
|
|
22528
|
-
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"), ["drive personal session start", "drive work session start --grant write,activity"]).option("--client-file <file>", "path to your own Desktop OAuth client JSON, used instead of WireCat's").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) => {
|
|
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"), ["drive personal session start", "drive work session start --grant write,activity"]).option("--client-file <file>", "path to your own Desktop OAuth client JSON, used instead of WireCat's").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) => {
|
|
22529
22553
|
if (args.credentialStorage !== "keyring" && args.credentialStorage !== "file")
|
|
22530
22554
|
throw new CliError("validation_error", "credential storage is keyring or file");
|
|
22531
22555
|
const signal = context.signal();
|
|
@@ -22535,7 +22559,7 @@ var installSessionCommands = /* @__PURE__ */ __name((program, context) => {
|
|
|
22535
22559
|
json: json === true || jsonl === true || !process.stdout.isTTY,
|
|
22536
22560
|
answers: false
|
|
22537
22561
|
});
|
|
22538
|
-
const { login } = await import("./login-
|
|
22562
|
+
const { login } = await import("./login-BGMK2ABH.js");
|
|
22539
22563
|
output(itemOf(await login({
|
|
22540
22564
|
env,
|
|
22541
22565
|
profile: selected(),
|
|
@@ -22544,9 +22568,10 @@ var installSessionCommands = /* @__PURE__ */ __name((program, context) => {
|
|
|
22544
22568
|
...Object.fromEntries([...args.grant ?? []].map((grant) => [grant, true])),
|
|
22545
22569
|
...options.keyring ? { keyring: options.keyring } : {},
|
|
22546
22570
|
...signal ? { signal } : {},
|
|
22547
|
-
openBrowser:
|
|
22548
|
-
|
|
22549
|
-
|
|
22571
|
+
openBrowser: /* @__PURE__ */ __name(async (url) => {
|
|
22572
|
+
if (args.browser)
|
|
22573
|
+
await options.openBrowser?.(url, command);
|
|
22574
|
+
}, "openBrowser"),
|
|
22550
22575
|
showUrl: /* @__PURE__ */ __name((url) => {
|
|
22551
22576
|
steps.openUrl(url, "Choose the Google account and allow access to Drive");
|
|
22552
22577
|
streams.diagnostic(`Open Google sign-in: ${url}
|
|
@@ -22565,7 +22590,7 @@ var installSessionCommands = /* @__PURE__ */ __name((program, context) => {
|
|
|
22565
22590
|
const name = selected();
|
|
22566
22591
|
const config = readConfig(env);
|
|
22567
22592
|
const profile = activeProfile(env, name);
|
|
22568
|
-
const { credentials } = await import("./tokens-
|
|
22593
|
+
const { credentials } = await import("./tokens-F63RXXEF.js");
|
|
22569
22594
|
const store = credentials(env, profile.storage, options.keyring);
|
|
22570
22595
|
store.remove(name);
|
|
22571
22596
|
writeConfig(env, config);
|
|
@@ -22612,7 +22637,7 @@ var selection = /* @__PURE__ */ __name((env, name, source) => {
|
|
|
22612
22637
|
return { profile, state, options: { source, destination, collection: `google-drive:${profile.principal}`, env } };
|
|
22613
22638
|
}, "selection");
|
|
22614
22639
|
var checkStoreImport = /* @__PURE__ */ __name(async (env, name, source, bindings) => {
|
|
22615
|
-
const { ensureSqlite } = await import("./sqlite-runtime-
|
|
22640
|
+
const { ensureSqlite } = await import("./sqlite-runtime-WPUMKLUV.js");
|
|
22616
22641
|
await ensureSqlite();
|
|
22617
22642
|
const { state, options } = selection(env, name, source);
|
|
22618
22643
|
const preview = await previewDocumentTransfer({ ...options, bindings });
|
|
@@ -22786,7 +22811,7 @@ var installSyncCommands = /* @__PURE__ */ __name((program, context) => {
|
|
|
22786
22811
|
// dist/commands/upgrade.js
|
|
22787
22812
|
import { join as join7 } from "node:path";
|
|
22788
22813
|
|
|
22789
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22814
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.565.0_@wirecat+cli-base@0.75.2_commander@15.0.0_esbuild@0.28.2_type_ff8e334310c9524b6cc272472a342b2f/node_modules/@wirecat/cli-core/dist/update/index.js
|
|
22790
22815
|
import { realpathSync } from "node:fs";
|
|
22791
22816
|
import { fileURLToPath } from "node:url";
|
|
22792
22817
|
var QUIET_WORDS = [
|
|
@@ -22961,6 +22986,19 @@ var providerJsonFields = entityFields({
|
|
|
22961
22986
|
"document.drive_catalog": CATALOG_FIELDS,
|
|
22962
22987
|
drive_document: DOCUMENT_LIST_FIELDS
|
|
22963
22988
|
});
|
|
22989
|
+
var DRIVE_ROWS = {
|
|
22990
|
+
drive_document: {
|
|
22991
|
+
columns: [
|
|
22992
|
+
{ field: "reference" },
|
|
22993
|
+
{ field: "name" },
|
|
22994
|
+
{ field: "modified_at", as: "time" },
|
|
22995
|
+
{ field: "age_days", as: "count", tag: "days since sync" }
|
|
22996
|
+
]
|
|
22997
|
+
},
|
|
22998
|
+
"document.drive_catalog": {
|
|
22999
|
+
columns: [{ field: "ref" }, { field: "name" }, { field: "kind" }, { field: "modified_at", as: "time" }]
|
|
23000
|
+
}
|
|
23001
|
+
};
|
|
22964
23002
|
var checkProviderJson = /* @__PURE__ */ __name((command, request, terminal) => {
|
|
22965
23003
|
checkJson(command, request, terminal, providerJsonFields);
|
|
22966
23004
|
if (request.fields && writes(metaOf(command).effects) && !answerFields(command, providerJsonFields))
|
|
@@ -23182,17 +23220,25 @@ var prepareStore = /* @__PURE__ */ __name(async (index, env, name, rescan = fals
|
|
|
23182
23220
|
}, "prepareStore");
|
|
23183
23221
|
|
|
23184
23222
|
// dist/store.js
|
|
23223
|
+
var DRIVE_PROVIDER = {
|
|
23224
|
+
name: "google-drive",
|
|
23225
|
+
kind: "documents",
|
|
23226
|
+
aliases: [],
|
|
23227
|
+
command: "drive",
|
|
23228
|
+
opens: { document: "documents show" }
|
|
23229
|
+
};
|
|
23185
23230
|
var openIndex = /* @__PURE__ */ __name(async (env, name, rescan = false) => {
|
|
23186
23231
|
if (name)
|
|
23187
23232
|
activeProfile(env, name);
|
|
23188
|
-
const { ensureSqlite } = await import("./sqlite-runtime-
|
|
23233
|
+
const { ensureSqlite } = await import("./sqlite-runtime-WPUMKLUV.js");
|
|
23189
23234
|
await ensureSqlite();
|
|
23190
|
-
const { openStore: openStore2, storePath: storePath2 } = await import("./store-
|
|
23235
|
+
const { openStore: openStore2, storePath: storePath2 } = await import("./store-YKV4GAMS.js");
|
|
23191
23236
|
if (env.DRIVE_STORE)
|
|
23192
23237
|
throw new CliError("configuration_error", "DRIVE_STORE has been retired; use MESSAGING_STORE to select the shared database", { reason: "store.override-retired" });
|
|
23193
23238
|
const store = await openStore2({ path: storePath2(env), env, command: "drive", version: VERSION });
|
|
23194
23239
|
const index = indexOver(store, env);
|
|
23195
23240
|
try {
|
|
23241
|
+
await store.accounts.registerProvider(DRIVE_PROVIDER);
|
|
23196
23242
|
if (name)
|
|
23197
23243
|
await prepareStore(index, env, name, rescan);
|
|
23198
23244
|
return index;
|
|
@@ -23231,7 +23277,7 @@ var indexOver = /* @__PURE__ */ __name((store, env, pictureEmbedder) => {
|
|
|
23231
23277
|
linkMessages: /* @__PURE__ */ __name((documents, since) => store.notes.linkMessages({ documents, ...since ? { since } : {} }), "linkMessages"),
|
|
23232
23278
|
knowledge: documentKnowledge2(store, async (principal) => (await folder(principal, false))?.id),
|
|
23233
23279
|
openPictures: /* @__PURE__ */ __name(async () => {
|
|
23234
|
-
const { openPictureEmbedderFor, savePicture } = await import("./services-
|
|
23280
|
+
const { openPictureEmbedderFor, savePicture } = await import("./services-34WKT3NN.js");
|
|
23235
23281
|
const embedder = pictureEmbedder ?? await openPictureEmbedderFor({ env, command: "drive" });
|
|
23236
23282
|
return {
|
|
23237
23283
|
save: /* @__PURE__ */ __name((reference, bytes) => savePicture(store, { ref: reference }, bytes, { embedder }), "save"),
|
|
@@ -23250,7 +23296,7 @@ var indexOver = /* @__PURE__ */ __name((store, env, pictureEmbedder) => {
|
|
|
23250
23296
|
has_more: false,
|
|
23251
23297
|
meaning_skipped: "this Google account has no imported sources"
|
|
23252
23298
|
};
|
|
23253
|
-
const { searchNotes } = await import("./services-
|
|
23299
|
+
const { searchNotes } = await import("./services-34WKT3NN.js");
|
|
23254
23300
|
const result = await searchNotes(store, query, {
|
|
23255
23301
|
...options,
|
|
23256
23302
|
folderIds: selected ? [selected.id] : [],
|
|
@@ -23281,7 +23327,7 @@ var indexOver = /* @__PURE__ */ __name((store, env, pictureEmbedder) => {
|
|
|
23281
23327
|
};
|
|
23282
23328
|
}, "search"),
|
|
23283
23329
|
embed: /* @__PURE__ */ __name(async (max) => {
|
|
23284
|
-
const { embedNotes } = await import("./services-
|
|
23330
|
+
const { embedNotes } = await import("./services-34WKT3NN.js");
|
|
23285
23331
|
return embedNotes(store, { maxChunks: max, env, command: "drive" });
|
|
23286
23332
|
}, "embed"),
|
|
23287
23333
|
close: /* @__PURE__ */ __name(() => store.close(), "close")
|
|
@@ -23315,7 +23361,7 @@ var uploadFile = /* @__PURE__ */ __name(async (input) => {
|
|
|
23315
23361
|
throw new CliError("validation_error", "the file to upload could not be read", { reason: "file.unreadable" });
|
|
23316
23362
|
}
|
|
23317
23363
|
if (!stat.isFile())
|
|
23318
|
-
throw new CliError("validation_error", "upload takes one file, not a folder", { reason: "file.not-file" });
|
|
23364
|
+
throw new CliError("validation_error", "upload takes one file, not a folder", { reason: "file.not-a-file" });
|
|
23319
23365
|
const size2 = stat.size;
|
|
23320
23366
|
const name = input.name ?? basename(path);
|
|
23321
23367
|
const chunk = input.chunkBytes ?? CHUNK_BYTES;
|
|
@@ -23467,6 +23513,7 @@ var Preview = class extends Error {
|
|
|
23467
23513
|
}
|
|
23468
23514
|
};
|
|
23469
23515
|
var EXPORTS = /* @__PURE__ */ new Set(["documents export", "files download", "files export"]);
|
|
23516
|
+
var MCP_AGENT = "drive-mcp";
|
|
23470
23517
|
var googleOnly = /* @__PURE__ */ __name((effects) => effects?.local === "none" && effects.remote !== "none", "googleOnly");
|
|
23471
23518
|
var lateEnv = /* @__PURE__ */ __name((environment) => {
|
|
23472
23519
|
const current = /* @__PURE__ */ __name(() => environment().env ?? process.env, "current");
|
|
@@ -23498,7 +23545,7 @@ var installDrive = /* @__PURE__ */ __name((program) => {
|
|
|
23498
23545
|
if (lock !== void 0) {
|
|
23499
23546
|
profileName(lock);
|
|
23500
23547
|
if (named !== void 0 && profileName(named) !== lock)
|
|
23501
|
-
throw new CliError("permission_error", `this process is locked to profile ${lock} (DRIVE_PROFILE_LOCK) \u2014 profile ${named} is refused`, { reason: "profile.
|
|
23548
|
+
throw new CliError("permission_error", `this process is locked to profile ${lock} (DRIVE_PROFILE_LOCK) \u2014 profile ${named} is refused`, { reason: "profile.locked" });
|
|
23502
23549
|
return lock;
|
|
23503
23550
|
}
|
|
23504
23551
|
if (named)
|
|
@@ -23567,7 +23614,7 @@ var installDrive = /* @__PURE__ */ __name((program) => {
|
|
|
23567
23614
|
}, "output");
|
|
23568
23615
|
const signal = /* @__PURE__ */ __name(() => environment().signal, "signal");
|
|
23569
23616
|
const signedIn = /* @__PURE__ */ __name(async (name, scope2) => {
|
|
23570
|
-
const { authorizedClient, checkAuthorization } = await import("./tokens-
|
|
23617
|
+
const { authorizedClient, checkAuthorization } = await import("./tokens-F63RXXEF.js");
|
|
23571
23618
|
const client = authorizedClient(env, name, environment().keyring, signal());
|
|
23572
23619
|
await checkAuthorization(client, scope2);
|
|
23573
23620
|
return client;
|
|
@@ -23577,7 +23624,7 @@ var installDrive = /* @__PURE__ */ __name((program) => {
|
|
|
23577
23624
|
const fake = environment().source;
|
|
23578
23625
|
if (fake)
|
|
23579
23626
|
return fake(name);
|
|
23580
|
-
const [{ googleSource }, client] = await Promise.all([import("./google-
|
|
23627
|
+
const [{ googleSource }, client] = await Promise.all([import("./google-6ZZDKFBN.js"), signedIn(name)]);
|
|
23581
23628
|
return googleSource(client);
|
|
23582
23629
|
}, "source");
|
|
23583
23630
|
const withIndex = /* @__PURE__ */ __name(async (fn) => {
|
|
@@ -23654,6 +23701,8 @@ var installDrive = /* @__PURE__ */ __name((program) => {
|
|
|
23654
23701
|
output,
|
|
23655
23702
|
positive,
|
|
23656
23703
|
complete: /* @__PURE__ */ __name(() => environment().complete ?? memoryModel(env, selected(), signal()), "complete"),
|
|
23704
|
+
author: /* @__PURE__ */ __name(() => agent() ? { bot: MCP_AGENT, kind: "agent" } : "owner", "author"),
|
|
23705
|
+
decider: /* @__PURE__ */ __name(() => agent() ? { bot: MCP_AGENT, reason: "asked over drive's MCP server" } : "owner", "decider"),
|
|
23657
23706
|
run: /* @__PURE__ */ __name(async (input, fn) => withIndex(async (index) => {
|
|
23658
23707
|
const lock = await lockProfile(env, selected());
|
|
23659
23708
|
try {
|
|
@@ -23661,7 +23710,8 @@ var installDrive = /* @__PURE__ */ __name((program) => {
|
|
|
23661
23710
|
if (!index.knowledge)
|
|
23662
23711
|
throw new CliError("configuration_error", "index has no shared knowledge adapter");
|
|
23663
23712
|
const principal = activeProfile(env, selected()).principal;
|
|
23664
|
-
const
|
|
23713
|
+
const local2 = isDocumentRef(input) || /^\d+$/.test(input);
|
|
23714
|
+
const found = local2 ? void 0 : await index.catalog?.get(principal, fileId(input));
|
|
23665
23715
|
const ref = found?.ref ?? imported(input).ref;
|
|
23666
23716
|
const result = await fn(index.knowledge, principal, ref);
|
|
23667
23717
|
lock.assertHeld();
|
|
@@ -23716,7 +23766,7 @@ var installDrive = /* @__PURE__ */ __name((program) => {
|
|
|
23716
23766
|
if (fake)
|
|
23717
23767
|
return await fake.call(method, params, body);
|
|
23718
23768
|
const [{ googleApi }, client] = await Promise.all([
|
|
23719
|
-
import("./google-api-
|
|
23769
|
+
import("./google-api-E6MOJ4ZD.js"),
|
|
23720
23770
|
signedIn(selected(), descriptor.scope)
|
|
23721
23771
|
]);
|
|
23722
23772
|
return await googleApi(client).call(method, params, body);
|
|
@@ -23742,7 +23792,7 @@ var installDrive = /* @__PURE__ */ __name((program) => {
|
|
|
23742
23792
|
if (fake)
|
|
23743
23793
|
return fake(id, mime);
|
|
23744
23794
|
const [{ googleDownload }, client] = await Promise.all([
|
|
23745
|
-
import("./google-api-
|
|
23795
|
+
import("./google-api-E6MOJ4ZD.js"),
|
|
23746
23796
|
signedIn(selected(), apiMethod(method).scope)
|
|
23747
23797
|
]);
|
|
23748
23798
|
return googleDownload(client)(id, mime);
|
|
@@ -23760,7 +23810,7 @@ var installDrive = /* @__PURE__ */ __name((program) => {
|
|
|
23760
23810
|
let request = environment().uploadRequest;
|
|
23761
23811
|
if (!request) {
|
|
23762
23812
|
const [{ googleUploadRequest }, client] = await Promise.all([
|
|
23763
|
-
import("./google-api-
|
|
23813
|
+
import("./google-api-E6MOJ4ZD.js"),
|
|
23764
23814
|
signedIn(selected(), apiMethod(method).scope)
|
|
23765
23815
|
]);
|
|
23766
23816
|
request = googleUploadRequest(client);
|
|
@@ -23831,6 +23881,10 @@ Availability: unavailable \u2014 ${availability.reason}
|
|
|
23831
23881
|
}, "previewWrite");
|
|
23832
23882
|
if (ACCOUNT_FREE_COMMANDS.has(words) && !agent())
|
|
23833
23883
|
return previewWrite();
|
|
23884
|
+
if (words === "config migrate") {
|
|
23885
|
+
refuseUnderReadOnly(env, "change a setting");
|
|
23886
|
+
previewWrite();
|
|
23887
|
+
}
|
|
23834
23888
|
if (ANY_PROFILE_COMMANDS.has(words)) {
|
|
23835
23889
|
if (profileWord() ?? env.DRIVE_PROFILE ?? env.DRIVE_PROFILE_LOCK)
|
|
23836
23890
|
selected();
|
|
@@ -23961,7 +24015,7 @@ var mcpCommand = /* @__PURE__ */ __name(() => {
|
|
|
23961
24015
|
const environment = environmentOf(action);
|
|
23962
24016
|
if (environment.api)
|
|
23963
24017
|
return;
|
|
23964
|
-
const { grantAvailability } = await import("./grants-
|
|
24018
|
+
const { grantAvailability } = await import("./grants-GWXDH5GM.js");
|
|
23965
24019
|
availability = grantAvailability(rootOf(root), environment.env ?? process.env, environment.keyring);
|
|
23966
24020
|
});
|
|
23967
24021
|
}, "mcpCommand");
|
|
@@ -23969,6 +24023,7 @@ var definition = /* @__PURE__ */ __name(() => ({
|
|
|
23969
24023
|
app: DRIVE_APP,
|
|
23970
24024
|
configuration,
|
|
23971
24025
|
firstScreen: FIRST_SCREEN,
|
|
24026
|
+
rows: DRIVE_ROWS,
|
|
23972
24027
|
commands: /* @__PURE__ */ __name(() => [
|
|
23973
24028
|
appDoctorCommand(DRIVE_APP, configuration, { oauthClient, packageName: PACKAGE }),
|
|
23974
24029
|
skillCommand(DRIVE_APP, SKILL),
|