@wirecat/drive-cli 0.58.0 → 0.59.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.
Files changed (163) hide show
  1. package/dist/bin/drive.js +6 -2
  2. package/dist/bundle/{all-profiles-ANDWOJDL.js → all-profiles-CVISDGMF.js} +14 -13
  3. package/dist/bundle/{anthropic-EZPZUWGS.js → anthropic-WLNQC23G.js} +9 -9
  4. package/dist/bundle/{app-server-67WL423B.js → app-server-P2VOONXF.js} +53 -51
  5. package/dist/bundle/{bun-NIIYUR5F.js → bun-CDFBNTKV.js} +2 -2
  6. package/dist/bundle/{bun-sqlite-A5ZKTIYC.js → bun-sqlite-MNZICITP.js} +8 -8
  7. package/dist/bundle/{chunk-NYINLKWT.js → chunk-2AXA5SKP.js} +1 -1
  8. package/dist/bundle/{chunk-EFEI724Z.js → chunk-36B7AIGP.js} +1 -1
  9. package/dist/bundle/{chunk-4GZLX2ME.js → chunk-3KJTJDDT.js} +40 -33
  10. package/dist/bundle/{chunk-4UU4ONKY.js → chunk-3KNZADHJ.js} +5086 -640
  11. package/dist/bundle/{chunk-O3K46QRL.js → chunk-3U22QTU6.js} +8 -6
  12. package/dist/bundle/chunk-3VSUT6BD.js +35 -0
  13. package/dist/bundle/{chunk-U2RSVKR5.js → chunk-5C7K6XIT.js} +1 -1
  14. package/dist/bundle/{chunk-JEMKSWVI.js → chunk-6C6255U6.js} +12 -12
  15. package/dist/bundle/{chunk-UBZ2LH7N.js → chunk-6CQO2FIN.js} +1403 -581
  16. package/dist/bundle/{chunk-4EEOJ54H.js → chunk-7QTVIZII.js} +5400 -2996
  17. package/dist/bundle/{chunk-TCJRJ3TE.js → chunk-A6EG7ZDS.js} +13 -13
  18. package/dist/bundle/{chunk-SPVPKHBQ.js → chunk-A6SLYOP2.js} +35 -30
  19. package/dist/bundle/{chunk-TIXIB32T.js → chunk-AD62XJKO.js} +153 -101
  20. package/dist/bundle/{chunk-GDRO4YMH.js → chunk-B5GBJ35N.js} +4 -4
  21. package/dist/bundle/{chunk-LSSIVBQI.js → chunk-BSGOM3BD.js} +1 -1
  22. package/dist/bundle/{chunk-ALTG7BZQ.js → chunk-CBM2XAEZ.js} +19 -19
  23. package/dist/bundle/{chunk-2TASMYGM.js → chunk-DI5Z4SH5.js} +3 -3
  24. package/dist/bundle/{chunk-ITD7WI23.js → chunk-EBLA7GXY.js} +1 -1
  25. package/dist/bundle/{chunk-P5MCZ635.js → chunk-EHEZSV6I.js} +11 -88
  26. package/dist/bundle/{chunk-QVIJMV22.js → chunk-EORMZCVF.js} +3 -3
  27. package/dist/bundle/{chunk-OZEJA67C.js → chunk-EVETU3TF.js} +8 -8
  28. package/dist/bundle/{chunk-7YUZAEBG.js → chunk-F3FOL42A.js} +2 -2
  29. package/dist/bundle/{chunk-AFZ33AC7.js → chunk-FICVPYE4.js} +179 -50
  30. package/dist/bundle/{chunk-6THTUYPT.js → chunk-FVQCM7IQ.js} +1 -1
  31. package/dist/bundle/{chunk-TNX77VPM.js → chunk-GI5JBGXH.js} +4589 -1510
  32. package/dist/bundle/{chunk-7VFD3UJQ.js → chunk-GJ4ZCIOP.js} +3 -3
  33. package/dist/bundle/{chunk-7AL57FCK.js → chunk-GT5KTGCN.js} +4 -4
  34. package/dist/bundle/{chunk-BAEIAQWH.js → chunk-H2BKXPBL.js} +2 -2
  35. package/dist/bundle/chunk-HIOJRPCT.js +93 -0
  36. package/dist/bundle/{chunk-ASPIEEXN.js → chunk-HIP43OGZ.js} +1 -1
  37. package/dist/bundle/{chunk-UMJLXAJI.js → chunk-HMZAMHKN.js} +2 -2
  38. package/dist/bundle/{chunk-ESF2B22R.js → chunk-HWLLVLAB.js} +10 -10
  39. package/dist/bundle/{chunk-X5XWUQNU.js → chunk-IADOBOKB.js} +2 -2
  40. package/dist/bundle/{chunk-4ICWGMHN.js → chunk-IBZ3IBO4.js} +7 -7
  41. package/dist/bundle/{chunk-MBNKNWOG.js → chunk-IGF6EXBR.js} +35 -34
  42. package/dist/bundle/{chunk-I4VUHZSD.js → chunk-II7LST64.js} +3 -3
  43. package/dist/bundle/{chunk-Z5GDNCTJ.js → chunk-IIP43FQJ.js} +2 -2
  44. package/dist/bundle/{chunk-UTDL7MKT.js → chunk-JSDVK3JA.js} +2 -2
  45. package/dist/bundle/{chunk-X4F3M6L6.js → chunk-JW2CVCUH.js} +4 -4
  46. package/dist/bundle/{chunk-IBJOO5FG.js → chunk-K4LXGZTE.js} +16 -16
  47. package/dist/bundle/{chunk-WICYDOVL.js → chunk-KFZUODXB.js} +70 -18
  48. package/dist/bundle/chunk-KPRGTTJH.js +34 -0
  49. package/dist/bundle/{chunk-SWFA36F3.js → chunk-L5SE2XZP.js} +20 -14
  50. package/dist/bundle/{chunk-OOR6PEHV.js → chunk-LJ7E4HLQ.js} +1 -1
  51. package/dist/bundle/{chunk-34XHR5FL.js → chunk-LPHMAQJQ.js} +16 -16
  52. package/dist/bundle/{chunk-6SARLV3Z.js → chunk-M6I2SQN7.js} +4 -4
  53. package/dist/bundle/{chunk-OG5ERX4S.js → chunk-MEAPA4EZ.js} +2 -2
  54. package/dist/bundle/{chunk-IH4UCM5K.js → chunk-MKCNUI72.js} +2 -2
  55. package/dist/bundle/{chunk-XQMMB6ST.js → chunk-MUUHUHWC.js} +2 -1
  56. package/dist/bundle/{chunk-NKL5XXOM.js → chunk-OKXSTWKW.js} +8 -8
  57. package/dist/bundle/{chunk-BKM2CGG2.js → chunk-OMMEQJOB.js} +3 -3
  58. package/dist/bundle/{chunk-EFX6FIDM.js → chunk-OZH4ALTI.js} +1 -1
  59. package/dist/bundle/{chunk-TMW526H3.js → chunk-P3ZTW2ZM.js} +5 -5
  60. package/dist/bundle/{chunk-FD7A6745.js → chunk-P7WPYKSB.js} +4 -4
  61. package/dist/bundle/{chunk-OUQVZTF5.js → chunk-PAEVBAM3.js} +7 -42
  62. package/dist/bundle/{chunk-W6KMNO3C.js → chunk-PGKIOSN3.js} +6 -6
  63. package/dist/bundle/{chunk-KCBHOYNZ.js → chunk-QTM7USFA.js} +8 -13
  64. package/dist/bundle/{chunk-IXXQZCNK.js → chunk-TFH5X46A.js} +32 -19
  65. package/dist/bundle/{chunk-YHRJUZ3O.js → chunk-TI55J3BA.js} +6 -4
  66. package/dist/bundle/{chunk-J36Z6BDZ.js → chunk-TJXPJ3A5.js} +570 -366
  67. package/dist/bundle/{chunk-RRHC5SBB.js → chunk-UQPKAY6I.js} +2 -2
  68. package/dist/bundle/{chunk-A4DHPOFQ.js → chunk-UWVNRPT7.js} +53 -39
  69. package/dist/bundle/{chunk-3RG27IWA.js → chunk-V36RIXFA.js} +5 -5
  70. package/dist/bundle/{chunk-3GXNODTB.js → chunk-V42KAPU3.js} +4 -4
  71. package/dist/bundle/{chunk-D72FL3L3.js → chunk-VT6GZAF4.js} +35 -35
  72. package/dist/bundle/{chunk-VXI67T7U.js → chunk-VVCZS42A.js} +1 -1
  73. package/dist/bundle/{chunk-A7FMNTCK.js → chunk-W62CON5K.js} +4 -4
  74. package/dist/bundle/{chunk-PYPLD7JO.js → chunk-XCOCPXCM.js} +2 -2
  75. package/dist/bundle/{chunk-BLJVCJZU.js → chunk-YADXWQHV.js} +26 -26
  76. package/dist/bundle/{chunk-AL7MY7MW.js → chunk-YU3PTU3D.js} +1 -1
  77. package/dist/bundle/{chunk-5NPFHWLP.js → chunk-YV4ABH6J.js} +5 -5
  78. package/dist/bundle/{chunk-ED5JNYN5.js → chunk-ZSMCJKGP.js} +27 -26
  79. package/dist/bundle/{chunk-JZ67M3HR.js → chunk-ZYCLPJ7U.js} +1 -1
  80. package/dist/bundle/command-contract-LQDNHZJU.js +39 -0
  81. package/dist/bundle/{decode-2R6DTGRX.js → decode-XTOMXMGN.js} +8 -8
  82. package/dist/bundle/{dispatch-DEXAEMIN.js → dispatch-T6TW2JJB.js} +9 -9
  83. package/dist/bundle/drive.js +11 -11
  84. package/dist/bundle/{echarts-CLB22SZS.js → echarts-RKKIOYVV.js} +2 -2
  85. package/dist/bundle/{embed-RJJWOLKN.js → embed-STHKKA6G.js} +9 -9
  86. package/dist/bundle/{embedder-DWYS5JYJ.js → embedder-3XZEWHRO.js} +12 -12
  87. package/dist/bundle/entry-CNOYSSSD.js +22 -0
  88. package/dist/bundle/{failure-GBZ4L5QO.js → failure-DNQYXP2T.js} +4 -4
  89. package/dist/bundle/first-run-F2SI24PK.js +30 -0
  90. package/dist/bundle/first-screen-TYYF6VXY.js +37 -0
  91. package/dist/bundle/{google-L776ETP4.js → google-BYNSAIQI.js} +13 -13
  92. package/dist/bundle/{google-api-AI5ZJJ2M.js → google-api-4VTZH7OP.js} +57 -56
  93. package/dist/bundle/grants-EUQXSICG.js +105 -0
  94. package/dist/bundle/{identity-MDLWK2TX.js → identity-ARDPFYV5.js} +6 -6
  95. package/dist/bundle/{instructions-BXZZNAMS.js → instructions-N3OH5X2Y.js} +1 -1
  96. package/dist/bundle/{login-6HHQLRHY.js → login-4VQEC7VI.js} +63 -62
  97. package/dist/bundle/{mcp-ZZUYI44D.js → mcp-WBHKX5E3.js} +2 -2
  98. package/dist/bundle/{node-R6ZNQ3NT.js → node-YU5JBNAA.js} +2 -2
  99. package/dist/bundle/{node-sqlite-AVNHGMVL.js → node-sqlite-3C6PSBIW.js} +14 -8
  100. package/dist/bundle/oauth-D6NJFPYU.js +22 -0
  101. package/dist/bundle/{open-BXPLXJC2.js → open-M2V2VYXO.js} +8 -7
  102. package/dist/bundle/{openai-CRO5GDBY.js → openai-ST2IWNUX.js} +17 -17
  103. package/dist/bundle/{process-P36JP33R.js → process-PYNNBBTV.js} +1 -1
  104. package/dist/bundle/{program-4DWVWSGQ.js → program-Q4VWV2MR.js} +132 -94
  105. package/dist/bundle/prompt-MFIOJMAF.js +17 -0
  106. package/dist/bundle/{reasons-IHPNUP5W.js → reasons-LOQ5J73F.js} +5 -5
  107. package/dist/bundle/{recognize-NAISVA56.js → recognize-FBLMWXNE.js} +7 -7
  108. package/dist/bundle/{remote-KCUHG5HV.js → remote-XC3OXE4T.js} +10 -10
  109. package/dist/bundle/{rerank-Q3POCDSK.js → rerank-2XMKKF4S.js} +10 -10
  110. package/dist/bundle/{serve-5CUOYLSG.js → serve-Q2BQHNZB.js} +14 -13
  111. package/dist/bundle/{server-FXW3GARV.js → server-42HPV3AH.js} +44 -43
  112. package/dist/bundle/server-EWZYN323.js +70 -0
  113. package/dist/bundle/{services-PEYBXZ3R.js → services-WU22S2MU.js} +99 -31
  114. package/dist/bundle/{sqlite-runtime-YMPWN5PM.js → sqlite-runtime-CSO6K6B2.js} +9 -8
  115. package/dist/bundle/{start-PFWEF44R.js → start-TZWKM4AH.js} +7 -7
  116. package/dist/bundle/{state-5TQ7IOJH.js → state-FLUT7U7R.js} +9 -9
  117. package/dist/bundle/{store-E2VWY4O6.js → store-HDWMJ44E.js} +42 -21
  118. package/dist/bundle/{store-P4OYYFW5.js → store-TG6622NG.js} +20 -16
  119. package/dist/bundle/store-maintenance-command-RHWRUREJ.js +60 -0
  120. package/dist/bundle/tokens-TXYURU4S.js +103 -0
  121. package/dist/commands/documents.d.ts +1 -0
  122. package/dist/commands/documents.d.ts.map +1 -1
  123. package/dist/commands/documents.js +14 -1
  124. package/dist/commands/documents.js.map +1 -1
  125. package/dist/commands/knowledge.d.ts +4 -0
  126. package/dist/commands/knowledge.d.ts.map +1 -1
  127. package/dist/commands/knowledge.js +8 -7
  128. package/dist/commands/knowledge.js.map +1 -1
  129. package/dist/contract-overrides.js +5 -5
  130. package/dist/contract-overrides.js.map +1 -1
  131. package/dist/knowledge-query.d.ts +2 -0
  132. package/dist/knowledge-query.d.ts.map +1 -1
  133. package/dist/program.d.ts.map +1 -1
  134. package/dist/program.js +8 -3
  135. package/dist/program.js.map +1 -1
  136. package/dist/provider-json.d.ts +2 -0
  137. package/dist/provider-json.d.ts.map +1 -1
  138. package/dist/provider-json.js +13 -0
  139. package/dist/provider-json.js.map +1 -1
  140. package/dist/reasons.d.ts.map +1 -1
  141. package/dist/reasons.js +1 -0
  142. package/dist/reasons.js.map +1 -1
  143. package/dist/store.d.ts +2 -0
  144. package/dist/store.d.ts.map +1 -1
  145. package/dist/store.js +9 -0
  146. package/dist/store.js.map +1 -1
  147. package/dist/version.d.ts +1 -1
  148. package/dist/version.js +1 -1
  149. package/package.json +3 -3
  150. package/skills/drive-cli/SKILL.md +2 -1
  151. package/dist/bundle/chunk-7VUHY5LP.js +0 -18
  152. package/dist/bundle/chunk-Y6M2G7JK.js +0 -3609
  153. package/dist/bundle/command-contract-ZCXFT764.js +0 -39
  154. package/dist/bundle/entry-E6H7IUPV.js +0 -21
  155. package/dist/bundle/first-run-DI2JIG44.js +0 -30
  156. package/dist/bundle/first-screen-X5N4TCKD.js +0 -37
  157. package/dist/bundle/grants-HKGYAWL6.js +0 -104
  158. package/dist/bundle/oauth-UVU52X57.js +0 -22
  159. package/dist/bundle/prompt-AFWVGRDG.js +0 -17
  160. package/dist/bundle/server-FTLPSLRU.js +0 -69
  161. package/dist/bundle/store-maintenance-command-MWVERNK7.js +0 -58
  162. package/dist/bundle/tokens-OVG4CJO4.js +0 -102
  163. /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-VXI67T7U.js";
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-I4VUHZSD.js";
22
+ } from "./chunk-II7LST64.js";
23
23
  import {
24
24
  DEFAULTS_ONLY,
25
25
  DEFAULT_LEVELS,
@@ -45,7 +45,7 @@ import {
45
45
  textLimit,
46
46
  unknownProfile,
47
47
  writeConfig
48
- } from "./chunk-IBJOO5FG.js";
48
+ } from "./chunk-K4LXGZTE.js";
49
49
  import {
50
50
  blockKey,
51
51
  blocksMarkdown,
@@ -64,7 +64,7 @@ import {
64
64
  syncDocuments,
65
65
  syncMirrors,
66
66
  watchMirrors
67
- } from "./chunk-A4DHPOFQ.js";
67
+ } from "./chunk-UWVNRPT7.js";
68
68
  import {
69
69
  apiMethod,
70
70
  apiMethods,
@@ -73,7 +73,7 @@ import {
73
73
  schemas,
74
74
  validateApiParams,
75
75
  validateRequest
76
- } from "./chunk-GDRO4YMH.js";
76
+ } from "./chunk-B5GBJ35N.js";
77
77
  import {
78
78
  DISCOVERY_DESCRIPTIONS,
79
79
  MEMO_SCENARIOS,
@@ -103,24 +103,24 @@ import {
103
103
  skillCommand,
104
104
  suggest,
105
105
  upgradeCommand
106
- } from "./chunk-UBZ2LH7N.js";
106
+ } from "./chunk-6CQO2FIN.js";
107
107
  import {
108
108
  googleError
109
- } from "./chunk-6THTUYPT.js";
110
- import "./chunk-OOR6PEHV.js";
109
+ } from "./chunk-FVQCM7IQ.js";
110
+ import "./chunk-LJ7E4HLQ.js";
111
111
  import "./chunk-SBZB7HMU.js";
112
- import "./chunk-AL7MY7MW.js";
113
- import "./chunk-SPVPKHBQ.js";
114
- import "./chunk-WICYDOVL.js";
112
+ import "./chunk-YU3PTU3D.js";
113
+ import "./chunk-A6SLYOP2.js";
114
+ import "./chunk-KFZUODXB.js";
115
115
  import {
116
116
  modelGateway,
117
117
  storeInfo
118
- } from "./chunk-AFZ33AC7.js";
118
+ } from "./chunk-FICVPYE4.js";
119
119
  import {
120
120
  RecipientList,
121
121
  SendJournal,
122
122
  sendGuard
123
- } from "./chunk-ED5JNYN5.js";
123
+ } from "./chunk-ZSMCJKGP.js";
124
124
  import {
125
125
  LIST_QUERY_GUIDE,
126
126
  listQuery,
@@ -131,16 +131,13 @@ import {
131
131
  typedQuery,
132
132
  unfilteredQuery,
133
133
  withQuery
134
- } from "./chunk-IXXQZCNK.js";
134
+ } from "./chunk-TFH5X46A.js";
135
135
  import {
136
136
  commandsText,
137
137
  inSection
138
- } from "./chunk-OZEJA67C.js";
138
+ } from "./chunk-EVETU3TF.js";
139
139
  import "./chunk-HTQTIKWP.js";
140
- import {
141
- answerEntity
142
- } from "./chunk-OUQVZTF5.js";
143
- import "./chunk-Y6M2G7JK.js";
140
+ import "./chunk-PAEVBAM3.js";
144
141
  import {
145
142
  FETCH,
146
143
  InvalidArgumentError,
@@ -150,6 +147,7 @@ import {
150
147
  Option,
151
148
  REMOTE_WRITE,
152
149
  annotate,
150
+ answerEntity,
153
151
  changesAuthority,
154
152
  commandWords,
155
153
  customizeSharedCommand,
@@ -170,29 +168,29 @@ import {
170
168
  resolveAISettings,
171
169
  rootOf,
172
170
  snakeKeys
173
- } from "./chunk-4UU4ONKY.js";
174
- import "./chunk-P5MCZ635.js";
175
- import "./chunk-JEMKSWVI.js";
171
+ } from "./chunk-3KNZADHJ.js";
172
+ import "./chunk-EHEZSV6I.js";
173
+ import "./chunk-6C6255U6.js";
176
174
  import {
177
175
  setupPermissionCeiling
178
- } from "./chunk-X4F3M6L6.js";
179
- import "./chunk-ESF2B22R.js";
176
+ } from "./chunk-JW2CVCUH.js";
177
+ import "./chunk-HWLLVLAB.js";
180
178
  import {
181
179
  readOnlyLockOf,
182
180
  readOnlyRefusal
183
- } from "./chunk-Z5GDNCTJ.js";
184
- import "./chunk-7AL57FCK.js";
185
- import "./chunk-7VFD3UJQ.js";
186
- import "./chunk-U2RSVKR5.js";
187
- import "./chunk-2TASMYGM.js";
181
+ } from "./chunk-IIP43FQJ.js";
182
+ import "./chunk-GT5KTGCN.js";
183
+ import "./chunk-GJ4ZCIOP.js";
184
+ import "./chunk-5C7K6XIT.js";
185
+ import "./chunk-DI5Z4SH5.js";
188
186
  import {
189
187
  newOperationId
190
- } from "./chunk-4EEOJ54H.js";
188
+ } from "./chunk-7QTVIZII.js";
191
189
  import {
192
190
  columnName,
193
191
  readSpreadsheet
194
- } from "./chunk-BLJVCJZU.js";
195
- import "./chunk-TCJRJ3TE.js";
192
+ } from "./chunk-YADXWQHV.js";
193
+ import "./chunk-A6EG7ZDS.js";
196
194
  import {
197
195
  CEILING_KEY,
198
196
  LEVELS,
@@ -201,40 +199,40 @@ import {
201
199
  layerPermissions,
202
200
  levelFor,
203
201
  parseDuration
204
- } from "./chunk-TIXIB32T.js";
205
- import "./chunk-UMJLXAJI.js";
202
+ } from "./chunk-AD62XJKO.js";
203
+ import "./chunk-HMZAMHKN.js";
206
204
  import {
207
205
  latestVersion,
208
206
  runUpdate,
209
207
  updateNotice
210
- } from "./chunk-FD7A6745.js";
211
- import "./chunk-JZ67M3HR.js";
212
- import "./chunk-UTDL7MKT.js";
213
- import "./chunk-QVIJMV22.js";
214
- import "./chunk-TMW526H3.js";
208
+ } from "./chunk-P7WPYKSB.js";
209
+ import "./chunk-ZYCLPJ7U.js";
210
+ import "./chunk-JSDVK3JA.js";
211
+ import "./chunk-EORMZCVF.js";
212
+ import "./chunk-P3ZTW2ZM.js";
215
213
  import "./chunk-5DPV7X27.js";
216
- import "./chunk-YHRJUZ3O.js";
214
+ import "./chunk-TI55J3BA.js";
217
215
  import {
218
216
  applyDocumentTransfer,
219
217
  previewDocumentTransfer
220
- } from "./chunk-34XHR5FL.js";
218
+ } from "./chunk-LPHMAQJQ.js";
221
219
  import {
222
220
  note
223
- } from "./chunk-D72FL3L3.js";
224
- import "./chunk-BAEIAQWH.js";
221
+ } from "./chunk-VT6GZAF4.js";
222
+ import "./chunk-H2BKXPBL.js";
225
223
  import {
226
224
  CATALOG_QUERY,
227
225
  IMPORTED_DOCUMENT_QUERY,
228
226
  openStore
229
- } from "./chunk-TNX77VPM.js";
230
- import "./chunk-X5XWUQNU.js";
227
+ } from "./chunk-GI5JBGXH.js";
228
+ import "./chunk-IADOBOKB.js";
231
229
  import {
232
230
  FACT_STATUSES,
233
231
  FACT_TYPES,
234
232
  MEMORY_KINDS,
235
233
  MEMORY_SCOPES,
236
234
  MEMORY_STATUSES
237
- } from "./chunk-J36Z6BDZ.js";
235
+ } from "./chunk-TJXPJ3A5.js";
238
236
  import {
239
237
  dateRange,
240
238
  defineQuery,
@@ -244,38 +242,40 @@ import {
244
242
  timezoneOf,
245
243
  validateQuery,
246
244
  zonedMoment
247
- } from "./chunk-SWFA36F3.js";
248
- import "./chunk-NKL5XXOM.js";
249
- import "./chunk-4ICWGMHN.js";
245
+ } from "./chunk-L5SE2XZP.js";
246
+ import "./chunk-HIOJRPCT.js";
247
+ import "./chunk-OKXSTWKW.js";
248
+ import "./chunk-IBZ3IBO4.js";
250
249
  import {
251
250
  storePath
252
- } from "./chunk-7VUHY5LP.js";
253
- import "./chunk-KCBHOYNZ.js";
254
- import "./chunk-LSSIVBQI.js";
255
- import "./chunk-BKM2CGG2.js";
256
- import "./chunk-7YUZAEBG.js";
251
+ } from "./chunk-3VSUT6BD.js";
252
+ import "./chunk-QTM7USFA.js";
253
+ import "./chunk-BSGOM3BD.js";
254
+ import "./chunk-OMMEQJOB.js";
255
+ import "./chunk-F3FOL42A.js";
257
256
  import "./chunk-D72URWJE.js";
258
257
  import {
259
258
  installerOf
260
- } from "./chunk-NYINLKWT.js";
259
+ } from "./chunk-2AXA5SKP.js";
261
260
  import {
262
261
  DRIVE_APP,
263
262
  PACKAGE,
264
263
  VERSION
265
- } from "./chunk-OG5ERX4S.js";
264
+ } from "./chunk-MEAPA4EZ.js";
266
265
  import {
267
266
  REASONS
268
- } from "./chunk-XQMMB6ST.js";
269
- import "./chunk-HPXYN7F3.js";
267
+ } from "./chunk-MUUHUHWC.js";
268
+ import "./chunk-LK2E2ELG.js";
269
+ import "./chunk-KPRGTTJH.js";
270
270
  import {
271
271
  processStreams,
272
272
  saveConfigFile,
273
273
  writeSecurely
274
- } from "./chunk-ALTG7BZQ.js";
275
- import "./chunk-3RG27IWA.js";
274
+ } from "./chunk-CBM2XAEZ.js";
275
+ import "./chunk-V36RIXFA.js";
276
276
  import "./chunk-Y5E2WNWB.js";
277
- import "./chunk-ASPIEEXN.js";
278
- import "./chunk-RRHC5SBB.js";
277
+ import "./chunk-HIP43OGZ.js";
278
+ import "./chunk-UQPKAY6I.js";
279
279
  import {
280
280
  array,
281
281
  boolean,
@@ -299,11 +299,11 @@ import {
299
299
  string,
300
300
  unknown,
301
301
  writes
302
- } from "./chunk-O3K46QRL.js";
302
+ } from "./chunk-3U22QTU6.js";
303
303
  import {
304
304
  CliError,
305
305
  isCliError
306
- } from "./chunk-ITD7WI23.js";
306
+ } from "./chunk-EBLA7GXY.js";
307
307
  import {
308
308
  __commonJS,
309
309
  __name,
@@ -2718,7 +2718,7 @@ var installModelCommands = /* @__PURE__ */ __name((program, { env, output, strea
2718
2718
  throw new CliError("permission_error", "downloading a model needs the network; --offline was requested", {
2719
2719
  reason: "offline.refused"
2720
2720
  });
2721
- const { downloadImageModel, downloadTextModel } = await import("./services-PEYBXZ3R.js");
2721
+ const { downloadImageModel, downloadTextModel } = await import("./services-WU22S2MU.js");
2722
2722
  const progress = /* @__PURE__ */ __name((line) => {
2723
2723
  if (!program.opts().quiet)
2724
2724
  streams.diagnostic(line);
@@ -2818,7 +2818,7 @@ var SHELL_OVERRIDES = {
2818
2818
  name: "document",
2819
2819
  required: true,
2820
2820
  variadic: false,
2821
- description: "Google file or folder id or URL in the local catalog"
2821
+ description: "Google file or folder id or URL in the local catalog, or a document:<n> ref"
2822
2822
  },
2823
2823
  {
2824
2824
  name: "text",
@@ -3144,7 +3144,7 @@ var SHELL_OVERRIDES = {
3144
3144
  name: "document",
3145
3145
  required: true,
3146
3146
  variadic: false,
3147
- description: "Google file or folder id or URL in the local catalog"
3147
+ description: "Google file or folder id or URL in the local catalog, or a document:<n> ref"
3148
3148
  },
3149
3149
  {
3150
3150
  name: "query",
@@ -3200,7 +3200,7 @@ var SHELL_OVERRIDES = {
3200
3200
  name: "document",
3201
3201
  required: true,
3202
3202
  variadic: false,
3203
- description: "Google file or folder id or URL in the local catalog"
3203
+ description: "Google file or folder id or URL in the local catalog, or a document:<n> ref"
3204
3204
  },
3205
3205
  {
3206
3206
  name: "note",
@@ -3247,7 +3247,7 @@ var SHELL_OVERRIDES = {
3247
3247
  name: "document",
3248
3248
  required: true,
3249
3249
  variadic: false,
3250
- description: "Google file or folder id or URL in the local catalog"
3250
+ description: "Google file or folder id or URL in the local catalog, or a document:<n> ref"
3251
3251
  },
3252
3252
  {
3253
3253
  name: "note",
@@ -3308,7 +3308,7 @@ var SHELL_OVERRIDES = {
3308
3308
  name: "document",
3309
3309
  required: true,
3310
3310
  variadic: false,
3311
- description: "Google file or folder id or URL in the local catalog"
3311
+ description: "Google file or folder id or URL in the local catalog, or a document:<n> ref"
3312
3312
  },
3313
3313
  {
3314
3314
  name: "note",
@@ -3555,10 +3555,21 @@ var changedCopy = /* @__PURE__ */ __name(({ changed, local_modified_at }) => {
3555
3555
 
3556
3556
  // dist/commands/documents.js
3557
3557
  var DOCUMENT_REF = /^document:[1-9]\d*$/;
3558
+ var isDocumentRef = /* @__PURE__ */ __name((input) => DOCUMENT_REF.test(input), "isDocumentRef");
3559
+ var refuseBareNumber = /* @__PURE__ */ __name((input, documents) => {
3560
+ if (!/^\d+$/.test(input))
3561
+ return;
3562
+ const ref = `document:${input}`;
3563
+ if (Object.values(documents).some((doc) => doc.reference === ref))
3564
+ throw new CliError("validation_error", `${input} is a bare number; name the document as ${ref}`, {
3565
+ reason: "ref.bare-number"
3566
+ });
3567
+ }, "refuseBareNumber");
3558
3568
  var storedDocument = /* @__PURE__ */ __name(({ env, selected }) => (input) => {
3559
3569
  const profile = activeProfile(env, selected());
3560
3570
  const documents = readState(env, selected(), profile.principal).documents;
3561
- const id = DOCUMENT_REF.test(input) ? Object.entries(documents).find(([, doc2]) => doc2.reference === input)?.[0] ?? "" : fileId(input);
3571
+ refuseBareNumber(input, documents);
3572
+ const id = isDocumentRef(input) ? Object.entries(documents).find(([, doc2]) => doc2.reference === input)?.[0] ?? "" : fileId(input);
3562
3573
  const doc = documents[id];
3563
3574
  if (!doc)
3564
3575
  throw new CliError("not_found", "this source is not imported in the selected profile", {
@@ -3767,8 +3778,8 @@ var memorySearch = /* @__PURE__ */ __name((words) => {
3767
3778
 
3768
3779
  // dist/commands/knowledge.js
3769
3780
  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";
3781
+ const { run: run3, output, positive: positive2, author, decider } = helpers;
3782
+ const documentArgument = "Google file or folder id or URL in the local catalog, or a document:<n> ref";
3772
3783
  const scopes = ["personal", "work"];
3773
3784
  const documents = program.commands.find((command) => command.name() === "documents");
3774
3785
  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 +3802,8 @@ var installKnowledgeCommandsDefinition = /* @__PURE__ */ __name((program, helper
3791
3802
  examples(annotate(relationships.command("add"), { effects: LOCAL_WRITE }).description("connect a document to another reference"), [
3792
3803
  "drive personal relationships add DOC_ID project:PROJECT_ID --kind about",
3793
3804
  "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)))));
3805
+ ]).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 } : {} })))));
3806
+ 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
3807
  const notes = annotate(program.command("notes"), { effects: LOCAL_READ }).description("write notes about an imported document");
3797
3808
  const noteArgument = "note:<id> reference, as notes list prints it";
3798
3809
  examples(annotate(notes.command("add"), {
@@ -3826,7 +3837,7 @@ var installKnowledgeCommandsDefinition = /* @__PURE__ */ __name((program, helper
3826
3837
  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
3838
  const memoryArgument = "memory:<id> reference, as memories list prints it";
3828
3839
  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" }))))));
3840
+ 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
3841
  withQuery(examples(annotate(memories.command("list"), { effects: LOCAL_READ }).description("list a document's memories"), [
3831
3842
  "drive personal memories list DOC_ID scope:work",
3832
3843
  "drive personal memories list DOC_ID kind:preference status:confirmed"
@@ -3845,7 +3856,7 @@ var installKnowledgeCommandsDefinition = /* @__PURE__ */ __name((program, helper
3845
3856
  stale: "mark a memory as out of date"
3846
3857
  };
3847
3858
  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))))));
3859
+ 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
3860
  const search = examples(annotate(memories.command("search"), { effects: LOCAL_READ }).description("search a document's memories by words"), [
3850
3861
  "drive personal memories search DOC_ID reviews scope:work",
3851
3862
  `drive personal memories search DOC_ID "async reviews"`
@@ -3882,6 +3893,7 @@ var installKnowledgeCommandsDefinition = /* @__PURE__ */ __name((program, helper
3882
3893
  ]).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
3894
  statement,
3884
3895
  ...args,
3896
+ by: author(),
3885
3897
  ...occurredTime === void 0 ? {} : { occurredAt: occurredTime }
3886
3898
  }))))));
3887
3899
  withQuery(examples(annotate(facts.command("list"), { effects: LOCAL_READ }).description("list a document's facts"), [
@@ -3901,7 +3913,7 @@ var installKnowledgeCommandsDefinition = /* @__PURE__ */ __name((program, helper
3901
3913
  reverse: "an accepted decision no longer holds, and nothing replaced it"
3902
3914
  };
3903
3915
  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))))));
3916
+ 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
3917
  const identities = annotate(program.command("identities"), { effects: LOCAL_READ }).description("the Google accounts seen on a document, and the people they belong to");
3906
3918
  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
3919
  const filter = termsOf(words, IDENTITIES_QUERY, "identities list");
@@ -22535,7 +22547,7 @@ var installSessionCommands = /* @__PURE__ */ __name((program, context) => {
22535
22547
  json: json === true || jsonl === true || !process.stdout.isTTY,
22536
22548
  answers: false
22537
22549
  });
22538
- const { login } = await import("./login-6HHQLRHY.js");
22550
+ const { login } = await import("./login-4VQEC7VI.js");
22539
22551
  output(itemOf(await login({
22540
22552
  env,
22541
22553
  profile: selected(),
@@ -22565,7 +22577,7 @@ var installSessionCommands = /* @__PURE__ */ __name((program, context) => {
22565
22577
  const name = selected();
22566
22578
  const config = readConfig(env);
22567
22579
  const profile = activeProfile(env, name);
22568
- const { credentials } = await import("./tokens-OVG4CJO4.js");
22580
+ const { credentials } = await import("./tokens-TXYURU4S.js");
22569
22581
  const store = credentials(env, profile.storage, options.keyring);
22570
22582
  store.remove(name);
22571
22583
  writeConfig(env, config);
@@ -22612,7 +22624,7 @@ var selection = /* @__PURE__ */ __name((env, name, source) => {
22612
22624
  return { profile, state, options: { source, destination, collection: `google-drive:${profile.principal}`, env } };
22613
22625
  }, "selection");
22614
22626
  var checkStoreImport = /* @__PURE__ */ __name(async (env, name, source, bindings) => {
22615
- const { ensureSqlite } = await import("./sqlite-runtime-YMPWN5PM.js");
22627
+ const { ensureSqlite } = await import("./sqlite-runtime-CSO6K6B2.js");
22616
22628
  await ensureSqlite();
22617
22629
  const { state, options } = selection(env, name, source);
22618
22630
  const preview = await previewDocumentTransfer({ ...options, bindings });
@@ -22786,7 +22798,7 @@ var installSyncCommands = /* @__PURE__ */ __name((program, context) => {
22786
22798
  // dist/commands/upgrade.js
22787
22799
  import { join as join7 } from "node:path";
22788
22800
 
22789
- // node_modules/.pnpm/@wirecat+cli-core@0.546.0_@wirecat+cli-base@0.73.0_commander@15.0.0_esbuild@0.28.2_type_6245070bff0a7c29971e74a96fde145c/node_modules/@wirecat/cli-core/dist/update/index.js
22801
+ // node_modules/.pnpm/@wirecat+cli-core@0.561.0_@wirecat+cli-base@0.75.2_commander@15.0.0_esbuild@0.28.2_type_ef328e5cd047e3c19bb2231542618c08/node_modules/@wirecat/cli-core/dist/update/index.js
22790
22802
  import { realpathSync } from "node:fs";
22791
22803
  import { fileURLToPath } from "node:url";
22792
22804
  var QUIET_WORDS = [
@@ -22961,6 +22973,19 @@ var providerJsonFields = entityFields({
22961
22973
  "document.drive_catalog": CATALOG_FIELDS,
22962
22974
  drive_document: DOCUMENT_LIST_FIELDS
22963
22975
  });
22976
+ var DRIVE_ROWS = {
22977
+ drive_document: {
22978
+ columns: [
22979
+ { field: "reference" },
22980
+ { field: "name" },
22981
+ { field: "modified_at", as: "time" },
22982
+ { field: "age_days", as: "count", tag: "days since sync" }
22983
+ ]
22984
+ },
22985
+ "document.drive_catalog": {
22986
+ columns: [{ field: "ref" }, { field: "name" }, { field: "kind" }, { field: "modified_at", as: "time" }]
22987
+ }
22988
+ };
22964
22989
  var checkProviderJson = /* @__PURE__ */ __name((command, request, terminal) => {
22965
22990
  checkJson(command, request, terminal, providerJsonFields);
22966
22991
  if (request.fields && writes(metaOf(command).effects) && !answerFields(command, providerJsonFields))
@@ -23182,17 +23207,25 @@ var prepareStore = /* @__PURE__ */ __name(async (index, env, name, rescan = fals
23182
23207
  }, "prepareStore");
23183
23208
 
23184
23209
  // dist/store.js
23210
+ var DRIVE_PROVIDER = {
23211
+ name: "google-drive",
23212
+ kind: "documents",
23213
+ aliases: [],
23214
+ command: "drive",
23215
+ opens: { document: "documents show" }
23216
+ };
23185
23217
  var openIndex = /* @__PURE__ */ __name(async (env, name, rescan = false) => {
23186
23218
  if (name)
23187
23219
  activeProfile(env, name);
23188
- const { ensureSqlite } = await import("./sqlite-runtime-YMPWN5PM.js");
23220
+ const { ensureSqlite } = await import("./sqlite-runtime-CSO6K6B2.js");
23189
23221
  await ensureSqlite();
23190
- const { openStore: openStore2, storePath: storePath2 } = await import("./store-E2VWY4O6.js");
23222
+ const { openStore: openStore2, storePath: storePath2 } = await import("./store-HDWMJ44E.js");
23191
23223
  if (env.DRIVE_STORE)
23192
23224
  throw new CliError("configuration_error", "DRIVE_STORE has been retired; use MESSAGING_STORE to select the shared database", { reason: "store.override-retired" });
23193
23225
  const store = await openStore2({ path: storePath2(env), env, command: "drive", version: VERSION });
23194
23226
  const index = indexOver(store, env);
23195
23227
  try {
23228
+ await store.accounts.registerProvider(DRIVE_PROVIDER);
23196
23229
  if (name)
23197
23230
  await prepareStore(index, env, name, rescan);
23198
23231
  return index;
@@ -23231,7 +23264,7 @@ var indexOver = /* @__PURE__ */ __name((store, env, pictureEmbedder) => {
23231
23264
  linkMessages: /* @__PURE__ */ __name((documents, since) => store.notes.linkMessages({ documents, ...since ? { since } : {} }), "linkMessages"),
23232
23265
  knowledge: documentKnowledge2(store, async (principal) => (await folder(principal, false))?.id),
23233
23266
  openPictures: /* @__PURE__ */ __name(async () => {
23234
- const { openPictureEmbedderFor, savePicture } = await import("./services-PEYBXZ3R.js");
23267
+ const { openPictureEmbedderFor, savePicture } = await import("./services-WU22S2MU.js");
23235
23268
  const embedder = pictureEmbedder ?? await openPictureEmbedderFor({ env, command: "drive" });
23236
23269
  return {
23237
23270
  save: /* @__PURE__ */ __name((reference, bytes) => savePicture(store, { ref: reference }, bytes, { embedder }), "save"),
@@ -23250,7 +23283,7 @@ var indexOver = /* @__PURE__ */ __name((store, env, pictureEmbedder) => {
23250
23283
  has_more: false,
23251
23284
  meaning_skipped: "this Google account has no imported sources"
23252
23285
  };
23253
- const { searchNotes } = await import("./services-PEYBXZ3R.js");
23286
+ const { searchNotes } = await import("./services-WU22S2MU.js");
23254
23287
  const result = await searchNotes(store, query, {
23255
23288
  ...options,
23256
23289
  folderIds: selected ? [selected.id] : [],
@@ -23281,7 +23314,7 @@ var indexOver = /* @__PURE__ */ __name((store, env, pictureEmbedder) => {
23281
23314
  };
23282
23315
  }, "search"),
23283
23316
  embed: /* @__PURE__ */ __name(async (max) => {
23284
- const { embedNotes } = await import("./services-PEYBXZ3R.js");
23317
+ const { embedNotes } = await import("./services-WU22S2MU.js");
23285
23318
  return embedNotes(store, { maxChunks: max, env, command: "drive" });
23286
23319
  }, "embed"),
23287
23320
  close: /* @__PURE__ */ __name(() => store.close(), "close")
@@ -23467,6 +23500,7 @@ var Preview = class extends Error {
23467
23500
  }
23468
23501
  };
23469
23502
  var EXPORTS = /* @__PURE__ */ new Set(["documents export", "files download", "files export"]);
23503
+ var MCP_AGENT = "drive-mcp";
23470
23504
  var googleOnly = /* @__PURE__ */ __name((effects) => effects?.local === "none" && effects.remote !== "none", "googleOnly");
23471
23505
  var lateEnv = /* @__PURE__ */ __name((environment) => {
23472
23506
  const current = /* @__PURE__ */ __name(() => environment().env ?? process.env, "current");
@@ -23567,7 +23601,7 @@ var installDrive = /* @__PURE__ */ __name((program) => {
23567
23601
  }, "output");
23568
23602
  const signal = /* @__PURE__ */ __name(() => environment().signal, "signal");
23569
23603
  const signedIn = /* @__PURE__ */ __name(async (name, scope2) => {
23570
- const { authorizedClient, checkAuthorization } = await import("./tokens-OVG4CJO4.js");
23604
+ const { authorizedClient, checkAuthorization } = await import("./tokens-TXYURU4S.js");
23571
23605
  const client = authorizedClient(env, name, environment().keyring, signal());
23572
23606
  await checkAuthorization(client, scope2);
23573
23607
  return client;
@@ -23577,7 +23611,7 @@ var installDrive = /* @__PURE__ */ __name((program) => {
23577
23611
  const fake = environment().source;
23578
23612
  if (fake)
23579
23613
  return fake(name);
23580
- const [{ googleSource }, client] = await Promise.all([import("./google-L776ETP4.js"), signedIn(name)]);
23614
+ const [{ googleSource }, client] = await Promise.all([import("./google-BYNSAIQI.js"), signedIn(name)]);
23581
23615
  return googleSource(client);
23582
23616
  }, "source");
23583
23617
  const withIndex = /* @__PURE__ */ __name(async (fn) => {
@@ -23654,6 +23688,8 @@ var installDrive = /* @__PURE__ */ __name((program) => {
23654
23688
  output,
23655
23689
  positive,
23656
23690
  complete: /* @__PURE__ */ __name(() => environment().complete ?? memoryModel(env, selected(), signal()), "complete"),
23691
+ author: /* @__PURE__ */ __name(() => agent() ? { bot: MCP_AGENT, kind: "agent" } : "owner", "author"),
23692
+ decider: /* @__PURE__ */ __name(() => agent() ? { bot: MCP_AGENT, reason: "asked over drive's MCP server" } : "owner", "decider"),
23657
23693
  run: /* @__PURE__ */ __name(async (input, fn) => withIndex(async (index) => {
23658
23694
  const lock = await lockProfile(env, selected());
23659
23695
  try {
@@ -23661,7 +23697,8 @@ var installDrive = /* @__PURE__ */ __name((program) => {
23661
23697
  if (!index.knowledge)
23662
23698
  throw new CliError("configuration_error", "index has no shared knowledge adapter");
23663
23699
  const principal = activeProfile(env, selected()).principal;
23664
- const found = await index.catalog?.get(principal, fileId(input));
23700
+ const local2 = isDocumentRef(input) || /^\d+$/.test(input);
23701
+ const found = local2 ? void 0 : await index.catalog?.get(principal, fileId(input));
23665
23702
  const ref = found?.ref ?? imported(input).ref;
23666
23703
  const result = await fn(index.knowledge, principal, ref);
23667
23704
  lock.assertHeld();
@@ -23716,7 +23753,7 @@ var installDrive = /* @__PURE__ */ __name((program) => {
23716
23753
  if (fake)
23717
23754
  return await fake.call(method, params, body);
23718
23755
  const [{ googleApi }, client] = await Promise.all([
23719
- import("./google-api-AI5ZJJ2M.js"),
23756
+ import("./google-api-4VTZH7OP.js"),
23720
23757
  signedIn(selected(), descriptor.scope)
23721
23758
  ]);
23722
23759
  return await googleApi(client).call(method, params, body);
@@ -23742,7 +23779,7 @@ var installDrive = /* @__PURE__ */ __name((program) => {
23742
23779
  if (fake)
23743
23780
  return fake(id, mime);
23744
23781
  const [{ googleDownload }, client] = await Promise.all([
23745
- import("./google-api-AI5ZJJ2M.js"),
23782
+ import("./google-api-4VTZH7OP.js"),
23746
23783
  signedIn(selected(), apiMethod(method).scope)
23747
23784
  ]);
23748
23785
  return googleDownload(client)(id, mime);
@@ -23760,7 +23797,7 @@ var installDrive = /* @__PURE__ */ __name((program) => {
23760
23797
  let request = environment().uploadRequest;
23761
23798
  if (!request) {
23762
23799
  const [{ googleUploadRequest }, client] = await Promise.all([
23763
- import("./google-api-AI5ZJJ2M.js"),
23800
+ import("./google-api-4VTZH7OP.js"),
23764
23801
  signedIn(selected(), apiMethod(method).scope)
23765
23802
  ]);
23766
23803
  request = googleUploadRequest(client);
@@ -23961,7 +23998,7 @@ var mcpCommand = /* @__PURE__ */ __name(() => {
23961
23998
  const environment = environmentOf(action);
23962
23999
  if (environment.api)
23963
24000
  return;
23964
- const { grantAvailability } = await import("./grants-HKGYAWL6.js");
24001
+ const { grantAvailability } = await import("./grants-EUQXSICG.js");
23965
24002
  availability = grantAvailability(rootOf(root), environment.env ?? process.env, environment.keyring);
23966
24003
  });
23967
24004
  }, "mcpCommand");
@@ -23969,6 +24006,7 @@ var definition = /* @__PURE__ */ __name(() => ({
23969
24006
  app: DRIVE_APP,
23970
24007
  configuration,
23971
24008
  firstScreen: FIRST_SCREEN,
24009
+ rows: DRIVE_ROWS,
23972
24010
  commands: /* @__PURE__ */ __name(() => [
23973
24011
  appDoctorCommand(DRIVE_APP, configuration, { oauthClient, packageName: PACKAGE }),
23974
24012
  skillCommand(DRIVE_APP, SKILL),
@@ -0,0 +1,17 @@
1
+ import { createRequire as __bundleRequire } from "node:module";
2
+ const require = __bundleRequire(import.meta.url);
3
+ import {
4
+ readSecret
5
+ } from "./chunk-OMMEQJOB.js";
6
+ import "./chunk-F3FOL42A.js";
7
+ import "./chunk-CBM2XAEZ.js";
8
+ import "./chunk-V36RIXFA.js";
9
+ import "./chunk-Y5E2WNWB.js";
10
+ import "./chunk-HIP43OGZ.js";
11
+ import "./chunk-UQPKAY6I.js";
12
+ import "./chunk-3U22QTU6.js";
13
+ import "./chunk-EBLA7GXY.js";
14
+ import "./chunk-ZVVMGPBJ.js";
15
+ export {
16
+ readSecret
17
+ };
@@ -2,11 +2,11 @@ import { createRequire as __bundleRequire } from "node:module";
2
2
  const require = __bundleRequire(import.meta.url);
3
3
  import {
4
4
  REASONS
5
- } from "./chunk-XQMMB6ST.js";
6
- import "./chunk-HPXYN7F3.js";
7
- import "./chunk-RRHC5SBB.js";
8
- import "./chunk-O3K46QRL.js";
9
- import "./chunk-ITD7WI23.js";
5
+ } from "./chunk-MUUHUHWC.js";
6
+ import "./chunk-LK2E2ELG.js";
7
+ import "./chunk-UQPKAY6I.js";
8
+ import "./chunk-3U22QTU6.js";
9
+ import "./chunk-EBLA7GXY.js";
10
10
  import "./chunk-ZVVMGPBJ.js";
11
11
  export {
12
12
  REASONS