@wirecat/drive-cli 0.59.0 → 0.61.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 (182) hide show
  1. package/README.md +4 -5
  2. package/dist/bin/drive.js +2 -2
  3. package/dist/bin/drive.js.map +1 -1
  4. package/dist/bundle/{all-profiles-CVISDGMF.js → all-profiles-H4L3Z5UM.js} +14 -14
  5. package/dist/bundle/{anthropic-WLNQC23G.js → anthropic-PPGFISVP.js} +9 -9
  6. package/dist/bundle/{app-server-P2VOONXF.js → app-server-YXVK2FUZ.js} +52 -52
  7. package/dist/bundle/{bun-CDFBNTKV.js → bun-DKZAL6ML.js} +2 -2
  8. package/dist/bundle/{bun-sqlite-MNZICITP.js → bun-sqlite-MTZY36QK.js} +8 -8
  9. package/dist/bundle/{chunk-TFH5X46A.js → chunk-2RJA4BQB.js} +19 -19
  10. package/dist/bundle/{chunk-VVCZS42A.js → chunk-3252WXOL.js} +1 -1
  11. package/dist/bundle/{chunk-H2BKXPBL.js → chunk-36CWGEVX.js} +2 -2
  12. package/dist/bundle/{chunk-HWLLVLAB.js → chunk-3I2D5TK2.js} +14 -11
  13. package/dist/bundle/{chunk-PAEVBAM3.js → chunk-3SJQNS72.js} +5 -5
  14. package/dist/bundle/{chunk-GI5JBGXH.js → chunk-3UPIJ7DW.js} +615 -374
  15. package/dist/bundle/{chunk-EORMZCVF.js → chunk-3WZH3WV3.js} +3 -3
  16. package/dist/bundle/{chunk-ZSMCJKGP.js → chunk-5W56YMQS.js} +28 -27
  17. package/dist/bundle/{chunk-LJ7E4HLQ.js → chunk-5W7D5H2R.js} +1 -1
  18. package/dist/bundle/{chunk-6C6255U6.js → chunk-67HS46KM.js} +12 -12
  19. package/dist/bundle/{chunk-AD62XJKO.js → chunk-6DN4VPA7.js} +25 -25
  20. package/dist/bundle/{chunk-HIP43OGZ.js → chunk-6IBM4Z3V.js} +1 -1
  21. package/dist/bundle/{chunk-QTM7USFA.js → chunk-6SUGANRJ.js} +6 -6
  22. package/dist/bundle/{chunk-II7LST64.js → chunk-6Y2FWJZ4.js} +4 -3
  23. package/dist/bundle/{chunk-XCOCPXCM.js → chunk-73WSULMI.js} +2 -2
  24. package/dist/bundle/{chunk-V42KAPU3.js → chunk-AM4RIWOZ.js} +4 -4
  25. package/dist/bundle/{chunk-DI5Z4SH5.js → chunk-AWN22PJK.js} +3 -3
  26. package/dist/bundle/{chunk-HMZAMHKN.js → chunk-BCWUDTYQ.js} +2 -2
  27. package/dist/bundle/{chunk-EHEZSV6I.js → chunk-BF6TQMNB.js} +8 -8
  28. package/dist/bundle/chunk-BQMIDYBA.js +415 -0
  29. package/dist/bundle/{chunk-FVQCM7IQ.js → chunk-BXR7BKM3.js} +5 -5
  30. package/dist/bundle/{chunk-OKXSTWKW.js → chunk-CACYL36O.js} +8 -8
  31. package/dist/bundle/{chunk-CBM2XAEZ.js → chunk-DCBFNBEB.js} +113 -51
  32. package/dist/bundle/{chunk-GT5KTGCN.js → chunk-DEPMQHXQ.js} +4 -4
  33. package/dist/bundle/{chunk-3KJTJDDT.js → chunk-DXPOVLQC.js} +46 -28
  34. package/dist/bundle/{chunk-P7WPYKSB.js → chunk-E5EXJ2XS.js} +4 -4
  35. package/dist/bundle/{chunk-IGF6EXBR.js → chunk-E6J5YH2N.js} +34 -34
  36. package/dist/bundle/{chunk-IIP43FQJ.js → chunk-ECEYAQGN.js} +2 -2
  37. package/dist/bundle/{chunk-OMMEQJOB.js → chunk-EPCJUL6M.js} +3 -3
  38. package/dist/bundle/{chunk-JSDVK3JA.js → chunk-FE5JJXKA.js} +2 -2
  39. package/dist/bundle/{chunk-FICVPYE4.js → chunk-HFM653T3.js} +49 -49
  40. package/dist/bundle/{chunk-KPRGTTJH.js → chunk-HGOYQUT7.js} +1 -1
  41. package/dist/bundle/{chunk-3VSUT6BD.js → chunk-I26VL4W7.js} +2 -2
  42. package/dist/bundle/{chunk-V36RIXFA.js → chunk-J4HQVHMN.js} +6 -5
  43. package/dist/bundle/{chunk-P3ZTW2ZM.js → chunk-J5UDQD5S.js} +5 -5
  44. package/dist/bundle/{chunk-3KNZADHJ.js → chunk-JVBLXSAA.js} +437 -193
  45. package/dist/bundle/{chunk-TJXPJ3A5.js → chunk-K7LS3NGM.js} +137 -62
  46. package/dist/bundle/{chunk-2AXA5SKP.js → chunk-KV4267S4.js} +1 -1
  47. package/dist/bundle/{chunk-YU3PTU3D.js → chunk-LARQTWIL.js} +1 -1
  48. package/dist/bundle/{chunk-B5GBJ35N.js → chunk-N2RLJTIW.js} +4 -4
  49. package/dist/bundle/{chunk-K4LXGZTE.js → chunk-NIX2MWHZ.js} +242 -344
  50. package/dist/bundle/{chunk-L5SE2XZP.js → chunk-NZ2EIZLX.js} +14 -10
  51. package/dist/bundle/{chunk-F3FOL42A.js → chunk-O5CUFS7T.js} +2 -2
  52. package/dist/bundle/{chunk-UQPKAY6I.js → chunk-OFFA54TW.js} +2 -2
  53. package/dist/bundle/{chunk-W62CON5K.js → chunk-OGNOQDWB.js} +4 -4
  54. package/dist/bundle/{chunk-MUUHUHWC.js → chunk-OLPJRD4S.js} +1 -22
  55. package/dist/bundle/{chunk-YADXWQHV.js → chunk-PJTX2MOI.js} +26 -26
  56. package/dist/bundle/{chunk-M6I2SQN7.js → chunk-PY7LKNOS.js} +2 -2
  57. package/dist/bundle/{chunk-GJ4ZCIOP.js → chunk-Q4XVBKX4.js} +3 -3
  58. package/dist/bundle/{chunk-A6SLYOP2.js → chunk-QR5VQXQ5.js} +69 -36
  59. package/dist/bundle/{chunk-OZH4ALTI.js → chunk-QSGT4ZH4.js} +1 -1
  60. package/dist/bundle/{chunk-UWVNRPT7.js → chunk-RFRCOAWS.js} +22 -22
  61. package/dist/bundle/{chunk-A6EG7ZDS.js → chunk-S4YK6TTG.js} +13 -13
  62. package/dist/bundle/{chunk-LPHMAQJQ.js → chunk-TKGAYKXW.js} +16 -16
  63. package/dist/bundle/{chunk-KFZUODXB.js → chunk-UKOYQC5O.js} +39 -22
  64. package/dist/bundle/{chunk-MEAPA4EZ.js → chunk-UO2IUDVK.js} +2 -2
  65. package/dist/bundle/{chunk-HIOJRPCT.js → chunk-VPDAH7PJ.js} +1 -1
  66. package/dist/bundle/{chunk-3U22QTU6.js → chunk-VYXVPYA3.js} +24 -6
  67. package/dist/bundle/{chunk-VT6GZAF4.js → chunk-W767AUNR.js} +4 -4
  68. package/dist/bundle/{chunk-5C7K6XIT.js → chunk-WIU733D2.js} +1 -1
  69. package/dist/bundle/{chunk-IADOBOKB.js → chunk-WUP2MJDN.js} +2 -2
  70. package/dist/bundle/{chunk-EBLA7GXY.js → chunk-WZ5XK74U.js} +2 -1
  71. package/dist/bundle/{chunk-IBZ3IBO4.js → chunk-X2CXW4HM.js} +7 -7
  72. package/dist/bundle/{chunk-JW2CVCUH.js → chunk-XGMDWIUP.js} +4 -4
  73. package/dist/bundle/{chunk-BSGOM3BD.js → chunk-XGNC5OJG.js} +1 -1
  74. package/dist/bundle/{chunk-TI55J3BA.js → chunk-XLFJLZJL.js} +4 -4
  75. package/dist/bundle/{chunk-7QTVIZII.js → chunk-XYCCGGKN.js} +792 -327
  76. package/dist/bundle/{chunk-6CQO2FIN.js → chunk-XZBR2O63.js} +400 -291
  77. package/dist/bundle/{chunk-EVETU3TF.js → chunk-YMBFZA3H.js} +8 -8
  78. package/dist/bundle/{chunk-ZYCLPJ7U.js → chunk-YPF6OS37.js} +1 -1
  79. package/dist/bundle/{chunk-36B7AIGP.js → chunk-YWIU4HOT.js} +1 -1
  80. package/dist/bundle/{chunk-MKCNUI72.js → chunk-ZHYRHERD.js} +2 -2
  81. package/dist/bundle/{chunk-YV4ABH6J.js → chunk-ZMNYK3FC.js} +5 -5
  82. package/dist/bundle/command-contract-T3EO5AYD.js +39 -0
  83. package/dist/bundle/{decode-XTOMXMGN.js → decode-62A3HGPW.js} +8 -8
  84. package/dist/bundle/{dispatch-T6TW2JJB.js → dispatch-IE7PBEQC.js} +9 -9
  85. package/dist/bundle/drive.js +12 -12
  86. package/dist/bundle/{echarts-RKKIOYVV.js → echarts-BGBPRGR5.js} +2 -2
  87. package/dist/bundle/{embed-STHKKA6G.js → embed-J3IBVV2V.js} +9 -9
  88. package/dist/bundle/{embedder-3XZEWHRO.js → embedder-QFPMDRT2.js} +12 -12
  89. package/dist/bundle/entry-YQSYER66.js +22 -0
  90. package/dist/bundle/{failure-DNQYXP2T.js → failure-BKOGBMIC.js} +4 -4
  91. package/dist/bundle/first-run-ZIFPVZAI.js +30 -0
  92. package/dist/bundle/first-screen-L5U26EY7.js +37 -0
  93. package/dist/bundle/{google-BYNSAIQI.js → google-RXM2XEPD.js} +13 -13
  94. package/dist/bundle/{google-api-4VTZH7OP.js → google-api-NC65BZO4.js} +83 -64
  95. package/dist/bundle/grants-SEWUYYH3.js +105 -0
  96. package/dist/bundle/{identity-ARDPFYV5.js → identity-PI6F2GWA.js} +6 -6
  97. package/dist/bundle/{instructions-N3OH5X2Y.js → instructions-6LPDSKAD.js} +1 -1
  98. package/dist/bundle/{login-4VQEC7VI.js → login-HTY7GT2S.js} +66 -68
  99. package/dist/bundle/{mcp-WBHKX5E3.js → mcp-PPVOM4SE.js} +2 -2
  100. package/dist/bundle/{node-YU5JBNAA.js → node-IB246NCQ.js} +2 -2
  101. package/dist/bundle/{node-sqlite-3C6PSBIW.js → node-sqlite-G2Y5SFJM.js} +9 -9
  102. package/dist/bundle/oauth-MWBKBI4T.js +22 -0
  103. package/dist/bundle/{open-M2V2VYXO.js → open-WD4GFSJD.js} +8 -8
  104. package/dist/bundle/{openai-ST2IWNUX.js → openai-QVM4PMY7.js} +17 -17
  105. package/dist/bundle/{process-PYNNBBTV.js → process-SWPJGPQC.js} +1 -1
  106. package/dist/bundle/{program-Q4VWV2MR.js → program-WHYFAMXR.js} +142 -106
  107. package/dist/bundle/prompt-OVYCGZB7.js +17 -0
  108. package/dist/bundle/{reasons-LOQ5J73F.js → reasons-Q34DQWB6.js} +5 -5
  109. package/dist/bundle/{recognize-FBLMWXNE.js → recognize-DM3YWHSE.js} +7 -7
  110. package/dist/bundle/{remote-XC3OXE4T.js → remote-KXVWRK7J.js} +10 -10
  111. package/dist/bundle/{rerank-2XMKKF4S.js → rerank-TINXM3MY.js} +10 -10
  112. package/dist/bundle/{serve-Q2BQHNZB.js → serve-IY2WL656.js} +12 -12
  113. package/dist/bundle/server-EMWVVT2C.js +70 -0
  114. package/dist/bundle/{server-42HPV3AH.js → server-VPY3OWPC.js} +44 -44
  115. package/dist/bundle/{services-WU22S2MU.js → services-PXNBOCOC.js} +34 -32
  116. package/dist/bundle/{sqlite-runtime-CSO6K6B2.js → sqlite-runtime-5ZK2CV7Y.js} +9 -9
  117. package/dist/bundle/{start-TZWKM4AH.js → start-LDVCN3DK.js} +7 -7
  118. package/dist/bundle/{state-FLUT7U7R.js → state-3MKTT3VS.js} +9 -9
  119. package/dist/bundle/{store-TG6622NG.js → store-4VQOT5IJ.js} +18 -18
  120. package/dist/bundle/{store-HDWMJ44E.js → store-7M4MSUJV.js} +28 -22
  121. package/dist/bundle/store-maintenance-command-NRATYBWD.js +60 -0
  122. package/dist/bundle/tokens-XUKLM3SL.js +103 -0
  123. package/dist/commands/config.d.ts.map +1 -1
  124. package/dist/commands/config.js +15 -6
  125. package/dist/commands/config.js.map +1 -1
  126. package/dist/commands/context.d.ts +4 -2
  127. package/dist/commands/context.d.ts.map +1 -1
  128. package/dist/commands/context.js.map +1 -1
  129. package/dist/commands/session.d.ts.map +1 -1
  130. package/dist/commands/session.js +15 -4
  131. package/dist/commands/session.js.map +1 -1
  132. package/dist/config.d.ts +23 -5
  133. package/dist/config.d.ts.map +1 -1
  134. package/dist/config.js +33 -20
  135. package/dist/config.js.map +1 -1
  136. package/dist/download.d.ts +3 -2
  137. package/dist/download.d.ts.map +1 -1
  138. package/dist/download.js +21 -9
  139. package/dist/download.js.map +1 -1
  140. package/dist/errors.js +4 -4
  141. package/dist/errors.js.map +1 -1
  142. package/dist/google-api.d.ts +3 -1
  143. package/dist/google-api.d.ts.map +1 -1
  144. package/dist/google-api.js +27 -7
  145. package/dist/google-api.js.map +1 -1
  146. package/dist/login.d.ts.map +1 -1
  147. package/dist/login.js +4 -6
  148. package/dist/login.js.map +1 -1
  149. package/dist/program.d.ts.map +1 -1
  150. package/dist/program.js +11 -7
  151. package/dist/program.js.map +1 -1
  152. package/dist/reasons.d.ts +1 -1
  153. package/dist/reasons.d.ts.map +1 -1
  154. package/dist/reasons.js +1 -22
  155. package/dist/reasons.js.map +1 -1
  156. package/dist/registry.d.ts +1 -1
  157. package/dist/registry.d.ts.map +1 -1
  158. package/dist/registry.js +2 -1
  159. package/dist/registry.js.map +1 -1
  160. package/dist/tokens.js +5 -5
  161. package/dist/tokens.js.map +1 -1
  162. package/dist/upload.js +1 -1
  163. package/dist/upload.js.map +1 -1
  164. package/dist/version.d.ts +1 -1
  165. package/dist/version.js +1 -1
  166. package/package.json +3 -3
  167. package/dist/bundle/chunk-PGKIOSN3.js +0 -249
  168. package/dist/bundle/command-contract-LQDNHZJU.js +0 -39
  169. package/dist/bundle/entry-CNOYSSSD.js +0 -22
  170. package/dist/bundle/first-run-F2SI24PK.js +0 -30
  171. package/dist/bundle/first-screen-TYYF6VXY.js +0 -37
  172. package/dist/bundle/grants-EUQXSICG.js +0 -105
  173. package/dist/bundle/oauth-D6NJFPYU.js +0 -22
  174. package/dist/bundle/prompt-MFIOJMAF.js +0 -17
  175. package/dist/bundle/server-EWZYN323.js +0 -70
  176. package/dist/bundle/store-maintenance-command-RHWRUREJ.js +0 -60
  177. package/dist/bundle/tokens-TXYURU4S.js +0 -103
  178. package/dist/oauth-application.d.ts +0 -5
  179. package/dist/oauth-application.d.ts.map +0 -1
  180. package/dist/oauth-application.js +0 -9
  181. package/dist/oauth-application.js.map +0 -1
  182. /package/dist/bundle/{chunk-LK2E2ELG.js → chunk-LU3WKZBA.js} +0 -0
@@ -8,7 +8,7 @@ import {
8
8
  metadataJson,
9
9
  supported,
10
10
  tooManyEntries
11
- } from "./chunk-VVCZS42A.js";
11
+ } from "./chunk-3252WXOL.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-II7LST64.js";
22
+ } from "./chunk-6Y2FWJZ4.js";
23
23
  import {
24
24
  DEFAULTS_ONLY,
25
25
  DEFAULT_LEVELS,
@@ -28,12 +28,15 @@ import {
28
28
  application,
29
29
  checkTextLimit,
30
30
  configIssues,
31
+ configPath,
31
32
  configuration,
32
33
  configuredMirrors,
33
34
  configuredSessions,
34
35
  fileId,
36
+ googleAppOf,
35
37
  inspectConfig,
36
38
  methodPolicyKeys,
39
+ oauthClientReport,
37
40
  paths,
38
41
  permissionKeys,
39
42
  permissionNames,
@@ -44,8 +47,9 @@ import {
44
47
  selectedFolders,
45
48
  textLimit,
46
49
  unknownProfile,
50
+ withDefaults,
47
51
  writeConfig
48
- } from "./chunk-K4LXGZTE.js";
52
+ } from "./chunk-BQMIDYBA.js";
49
53
  import {
50
54
  blockKey,
51
55
  blocksMarkdown,
@@ -64,7 +68,7 @@ import {
64
68
  syncDocuments,
65
69
  syncMirrors,
66
70
  watchMirrors
67
- } from "./chunk-UWVNRPT7.js";
71
+ } from "./chunk-RFRCOAWS.js";
68
72
  import {
69
73
  apiMethod,
70
74
  apiMethods,
@@ -73,7 +77,7 @@ import {
73
77
  schemas,
74
78
  validateApiParams,
75
79
  validateRequest
76
- } from "./chunk-B5GBJ35N.js";
80
+ } from "./chunk-N2RLJTIW.js";
77
81
  import {
78
82
  DISCOVERY_DESCRIPTIONS,
79
83
  MEMO_SCENARIOS,
@@ -103,24 +107,24 @@ import {
103
107
  skillCommand,
104
108
  suggest,
105
109
  upgradeCommand
106
- } from "./chunk-6CQO2FIN.js";
110
+ } from "./chunk-XZBR2O63.js";
107
111
  import {
108
112
  googleError
109
- } from "./chunk-FVQCM7IQ.js";
110
- import "./chunk-LJ7E4HLQ.js";
113
+ } from "./chunk-BXR7BKM3.js";
114
+ import "./chunk-5W7D5H2R.js";
111
115
  import "./chunk-SBZB7HMU.js";
112
- import "./chunk-YU3PTU3D.js";
113
- import "./chunk-A6SLYOP2.js";
114
- import "./chunk-KFZUODXB.js";
116
+ import "./chunk-LARQTWIL.js";
117
+ import "./chunk-QR5VQXQ5.js";
118
+ import "./chunk-UKOYQC5O.js";
115
119
  import {
116
120
  modelGateway,
117
121
  storeInfo
118
- } from "./chunk-FICVPYE4.js";
122
+ } from "./chunk-HFM653T3.js";
119
123
  import {
120
124
  RecipientList,
121
125
  SendJournal,
122
126
  sendGuard
123
- } from "./chunk-ZSMCJKGP.js";
127
+ } from "./chunk-5W56YMQS.js";
124
128
  import {
125
129
  LIST_QUERY_GUIDE,
126
130
  listQuery,
@@ -131,13 +135,13 @@ import {
131
135
  typedQuery,
132
136
  unfilteredQuery,
133
137
  withQuery
134
- } from "./chunk-TFH5X46A.js";
138
+ } from "./chunk-2RJA4BQB.js";
135
139
  import {
136
140
  commandsText,
137
141
  inSection
138
- } from "./chunk-EVETU3TF.js";
142
+ } from "./chunk-YMBFZA3H.js";
139
143
  import "./chunk-HTQTIKWP.js";
140
- import "./chunk-PAEVBAM3.js";
144
+ import "./chunk-3SJQNS72.js";
141
145
  import {
142
146
  FETCH,
143
147
  InvalidArgumentError,
@@ -167,30 +171,31 @@ import {
167
171
  renderAnswer,
168
172
  resolveAISettings,
169
173
  rootOf,
174
+ settingRows,
170
175
  snakeKeys
171
- } from "./chunk-3KNZADHJ.js";
172
- import "./chunk-EHEZSV6I.js";
173
- import "./chunk-6C6255U6.js";
176
+ } from "./chunk-JVBLXSAA.js";
177
+ import "./chunk-BF6TQMNB.js";
178
+ import "./chunk-67HS46KM.js";
174
179
  import {
175
180
  setupPermissionCeiling
176
- } from "./chunk-JW2CVCUH.js";
177
- import "./chunk-HWLLVLAB.js";
181
+ } from "./chunk-XGMDWIUP.js";
182
+ import "./chunk-3I2D5TK2.js";
178
183
  import {
179
184
  readOnlyLockOf,
180
185
  readOnlyRefusal
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";
186
+ } from "./chunk-ECEYAQGN.js";
187
+ import "./chunk-DEPMQHXQ.js";
188
+ import "./chunk-Q4XVBKX4.js";
189
+ import "./chunk-WIU733D2.js";
190
+ import "./chunk-AWN22PJK.js";
186
191
  import {
187
192
  newOperationId
188
- } from "./chunk-7QTVIZII.js";
193
+ } from "./chunk-XYCCGGKN.js";
189
194
  import {
190
195
  columnName,
191
196
  readSpreadsheet
192
- } from "./chunk-YADXWQHV.js";
193
- import "./chunk-A6EG7ZDS.js";
197
+ } from "./chunk-PJTX2MOI.js";
198
+ import "./chunk-S4YK6TTG.js";
194
199
  import {
195
200
  CEILING_KEY,
196
201
  LEVELS,
@@ -199,40 +204,40 @@ import {
199
204
  layerPermissions,
200
205
  levelFor,
201
206
  parseDuration
202
- } from "./chunk-AD62XJKO.js";
203
- import "./chunk-HMZAMHKN.js";
207
+ } from "./chunk-6DN4VPA7.js";
208
+ import "./chunk-BCWUDTYQ.js";
204
209
  import {
205
210
  latestVersion,
206
211
  runUpdate,
207
212
  updateNotice
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";
213
+ } from "./chunk-E5EXJ2XS.js";
214
+ import "./chunk-YPF6OS37.js";
215
+ import "./chunk-FE5JJXKA.js";
216
+ import "./chunk-3WZH3WV3.js";
217
+ import "./chunk-J5UDQD5S.js";
213
218
  import "./chunk-5DPV7X27.js";
214
- import "./chunk-TI55J3BA.js";
219
+ import "./chunk-XLFJLZJL.js";
215
220
  import {
216
221
  applyDocumentTransfer,
217
222
  previewDocumentTransfer
218
- } from "./chunk-LPHMAQJQ.js";
223
+ } from "./chunk-TKGAYKXW.js";
219
224
  import {
220
225
  note
221
- } from "./chunk-VT6GZAF4.js";
222
- import "./chunk-H2BKXPBL.js";
226
+ } from "./chunk-W767AUNR.js";
227
+ import "./chunk-36CWGEVX.js";
223
228
  import {
224
229
  CATALOG_QUERY,
225
230
  IMPORTED_DOCUMENT_QUERY,
226
231
  openStore
227
- } from "./chunk-GI5JBGXH.js";
228
- import "./chunk-IADOBOKB.js";
232
+ } from "./chunk-3UPIJ7DW.js";
233
+ import "./chunk-WUP2MJDN.js";
229
234
  import {
230
235
  FACT_STATUSES,
231
236
  FACT_TYPES,
232
237
  MEMORY_KINDS,
233
238
  MEMORY_SCOPES,
234
239
  MEMORY_STATUSES
235
- } from "./chunk-TJXPJ3A5.js";
240
+ } from "./chunk-K7LS3NGM.js";
236
241
  import {
237
242
  dateRange,
238
243
  defineQuery,
@@ -242,40 +247,40 @@ import {
242
247
  timezoneOf,
243
248
  validateQuery,
244
249
  zonedMoment
245
- } from "./chunk-L5SE2XZP.js";
246
- import "./chunk-HIOJRPCT.js";
247
- import "./chunk-OKXSTWKW.js";
248
- import "./chunk-IBZ3IBO4.js";
250
+ } from "./chunk-NZ2EIZLX.js";
251
+ import "./chunk-VPDAH7PJ.js";
252
+ import "./chunk-CACYL36O.js";
253
+ import "./chunk-X2CXW4HM.js";
249
254
  import {
250
255
  storePath
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";
256
+ } from "./chunk-I26VL4W7.js";
257
+ import "./chunk-6SUGANRJ.js";
258
+ import "./chunk-XGNC5OJG.js";
259
+ import "./chunk-EPCJUL6M.js";
260
+ import "./chunk-O5CUFS7T.js";
256
261
  import "./chunk-D72URWJE.js";
257
262
  import {
258
263
  installerOf
259
- } from "./chunk-2AXA5SKP.js";
264
+ } from "./chunk-KV4267S4.js";
260
265
  import {
261
266
  DRIVE_APP,
262
267
  PACKAGE,
263
268
  VERSION
264
- } from "./chunk-MEAPA4EZ.js";
269
+ } from "./chunk-UO2IUDVK.js";
265
270
  import {
266
271
  REASONS
267
- } from "./chunk-MUUHUHWC.js";
268
- import "./chunk-LK2E2ELG.js";
269
- import "./chunk-KPRGTTJH.js";
272
+ } from "./chunk-OLPJRD4S.js";
273
+ import "./chunk-LU3WKZBA.js";
274
+ import "./chunk-HGOYQUT7.js";
270
275
  import {
271
276
  processStreams,
272
277
  saveConfigFile,
273
278
  writeSecurely
274
- } from "./chunk-CBM2XAEZ.js";
275
- import "./chunk-V36RIXFA.js";
279
+ } from "./chunk-DCBFNBEB.js";
280
+ import "./chunk-J4HQVHMN.js";
276
281
  import "./chunk-Y5E2WNWB.js";
277
- import "./chunk-HIP43OGZ.js";
278
- import "./chunk-UQPKAY6I.js";
282
+ import "./chunk-6IBM4Z3V.js";
283
+ import "./chunk-OFFA54TW.js";
279
284
  import {
280
285
  array,
281
286
  boolean,
@@ -299,11 +304,11 @@ import {
299
304
  string,
300
305
  unknown,
301
306
  writes
302
- } from "./chunk-3U22QTU6.js";
307
+ } from "./chunk-VYXVPYA3.js";
303
308
  import {
304
309
  CliError,
305
310
  isCliError
306
- } from "./chunk-EBLA7GXY.js";
311
+ } from "./chunk-WZ5XK74U.js";
307
312
  import {
308
313
  __commonJS,
309
314
  __name,
@@ -822,7 +827,7 @@ var require_graceful_fs = __commonJS({
822
827
  polyfills(fs2);
823
828
  fs2.gracefulify = patch;
824
829
  fs2.createReadStream = createReadStream2;
825
- fs2.createWriteStream = createWriteStream;
830
+ fs2.createWriteStream = createWriteStream2;
826
831
  var fs$readFile = fs2.readFile;
827
832
  fs2.readFile = readFile;
828
833
  function readFile(path, options, cb) {
@@ -1049,10 +1054,10 @@ var require_graceful_fs = __commonJS({
1049
1054
  return new fs2.ReadStream(path, options);
1050
1055
  }
1051
1056
  __name(createReadStream2, "createReadStream");
1052
- function createWriteStream(path, options) {
1057
+ function createWriteStream2(path, options) {
1053
1058
  return new fs2.WriteStream(path, options);
1054
1059
  }
1055
- __name(createWriteStream, "createWriteStream");
1060
+ __name(createWriteStream2, "createWriteStream");
1056
1061
  var fs$open = fs2.open;
1057
1062
  fs2.open = open2;
1058
1063
  function open2(path, flags, mode, cb) {
@@ -2617,7 +2622,10 @@ var installConfigCommands = /* @__PURE__ */ __name((program, { env, selected, ou
2617
2622
  const config = annotate(program.command("config"), { effects: LOCAL_READ }).description("read and change settings; credentials are kept apart");
2618
2623
  examples(annotate(config.command("show"), { effects: LOCAL_READ }).description("show the defaults and every profile's settings"), ["drive config show"]).action(() => {
2619
2624
  const file = inspectConfig(env, known());
2620
- output(itemOf(knownOnly(file.config, known())));
2625
+ output(itemOf({
2626
+ ...knownOnly(file.config, known()),
2627
+ settings: settingRows(file.raw, configuration.declaredSettings)
2628
+ }));
2621
2629
  for (const issue of file.issues)
2622
2630
  streams.diagnostic(`${issue.what}, so it is left out${issue.fix ? ` \u2014 \`${issue.fix}\` removes it` : ""}`);
2623
2631
  });
@@ -2625,7 +2633,7 @@ var installConfigCommands = /* @__PURE__ */ __name((program, { env, selected, ou
2625
2633
  "drive personal config set max_text_chars 100000",
2626
2634
  `drive personal config set permissions.files '"readonly"' --defaults`,
2627
2635
  "drive personal config set record true --defaults"
2628
- ]).argument("<key>", "max_text_chars, picture_search, record, record_input, keep_runs_for_days, keep_successful_runs_for_days, runs_size_limit_mb, shared AI settings, permissions.<key> or models.<purpose>.<field>").argument("<json-value>", "the new value, as JSON").option("--defaults", "change the defaults instead of this profile").action((key, raw, args) => {
2636
+ ]).argument("<key>", "max_text_chars, picture_search, google_client_id, record, record_input, keep_runs_for_days, keep_successful_runs_for_days, runs_size_limit_mb, shared AI settings, permissions.<key> or models.<purpose>.<field>").argument("<json-value>", "the new value, as JSON").option("--defaults", "change the defaults instead of this profile").action((key, raw, args) => {
2629
2637
  const file = editable();
2630
2638
  const { at: scope, scope: name } = scopeOf(file, args.defaults);
2631
2639
  const setting = settingAt(key);
@@ -2663,7 +2671,7 @@ var installConfigCommands = /* @__PURE__ */ __name((program, { env, selected, ou
2663
2671
  const added = issuesOf(next).filter((issue) => !before.has(JSON.stringify(issue)) || !elsewhere.has(JSON.stringify(issue)));
2664
2672
  if (added.length)
2665
2673
  throw refusal(added);
2666
- saveConfigFile(file.path, next);
2674
+ saveConfigFile(file.path, withDefaults(next));
2667
2675
  output(itemOf({ key, updated: true, scope: name }));
2668
2676
  });
2669
2677
  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 +2702,16 @@ var installConfigCommands = /* @__PURE__ */ __name((program, { env, selected, ou
2694
2702
  break;
2695
2703
  delete holder[section];
2696
2704
  }
2697
- saveConfigFile(file.path, next);
2705
+ saveConfigFile(file.path, withDefaults(next, [at.join(".")]));
2698
2706
  }
2699
2707
  output(itemOf({ key, removed, scope: name }));
2700
2708
  });
2709
+ 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(() => {
2710
+ const path = configPath(env);
2711
+ const added = configuration.migrate(path);
2712
+ output(itemOf({ config_file: path, added }));
2713
+ streams.diagnostic(added.length > 0 ? `added ${added.join(", ")} to ${path}` : `${path} already has every setting`);
2714
+ });
2701
2715
  }, "installConfigCommands");
2702
2716
  var installModelCommands = /* @__PURE__ */ __name((program, { env, output, streams, policyFlags }) => {
2703
2717
  const models = annotate(program.command("models"), { effects: LOCAL_READ }).description("choose the memory model and download the search model");
@@ -2718,7 +2732,7 @@ var installModelCommands = /* @__PURE__ */ __name((program, { env, output, strea
2718
2732
  throw new CliError("permission_error", "downloading a model needs the network; --offline was requested", {
2719
2733
  reason: "offline.refused"
2720
2734
  });
2721
- const { downloadImageModel, downloadTextModel } = await import("./services-WU22S2MU.js");
2735
+ const { downloadImageModel, downloadTextModel } = await import("./services-PXNBOCOC.js");
2722
2736
  const progress = /* @__PURE__ */ __name((line) => {
2723
2737
  if (!program.opts().quiet)
2724
2738
  streams.diagnostic(line);
@@ -4868,8 +4882,9 @@ var describeCycle = /* @__PURE__ */ __name((cycle) => {
4868
4882
 
4869
4883
  // dist/download.js
4870
4884
  import { randomUUID } from "node:crypto";
4871
- import { closeSync, linkSync, lstatSync, mkdirSync as mkdirSync2, openSync, renameSync, rmSync, writeFileSync as writeFileSync2 } from "node:fs";
4885
+ import { closeSync, createWriteStream, linkSync, lstatSync, mkdirSync as mkdirSync2, openSync, renameSync, rmSync, writeFileSync as writeFileSync2 } from "node:fs";
4872
4886
  import { dirname, join as join5 } from "node:path";
4887
+ import { pipeline } from "node:stream/promises";
4873
4888
  var EXPORT_FORMATS = {
4874
4889
  pdf: "application/pdf",
4875
4890
  docx: "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
@@ -4890,18 +4905,28 @@ var saveDownload = /* @__PURE__ */ __name(async (path, overwrite, read, createDi
4890
4905
  throw error;
4891
4906
  }
4892
4907
  }
4893
- const bytes = await read();
4908
+ const source = await read();
4894
4909
  if (createDirectory)
4895
4910
  mkdirSync2(dirname(path), { recursive: true, mode: 448 });
4896
4911
  const temp = join5(dirname(path), `.${randomUUID()}.tmp`);
4897
4912
  let created = false;
4913
+ let size2 = 0;
4898
4914
  try {
4899
- const fd = openSync(temp, "wx", 384);
4900
- created = true;
4901
- try {
4902
- writeFileSync2(fd, bytes);
4903
- } finally {
4904
- closeSync(fd);
4915
+ if (source instanceof Uint8Array) {
4916
+ const fd = openSync(temp, "wx", 384);
4917
+ created = true;
4918
+ try {
4919
+ writeFileSync2(fd, source);
4920
+ } finally {
4921
+ closeSync(fd);
4922
+ }
4923
+ size2 = source.byteLength;
4924
+ } else {
4925
+ created = true;
4926
+ source.on("data", (chunk) => {
4927
+ size2 += chunk.length;
4928
+ });
4929
+ await pipeline(source, createWriteStream(temp, { flags: "wx", mode: 384 }));
4905
4930
  }
4906
4931
  if (overwrite)
4907
4932
  renameSync(temp, path);
@@ -4915,7 +4940,7 @@ var saveDownload = /* @__PURE__ */ __name(async (path, overwrite, read, createDi
4915
4940
  if (created)
4916
4941
  rmSync(temp, { force: true });
4917
4942
  }
4918
- return bytes.byteLength;
4943
+ return size2;
4919
4944
  }, "saveDownload");
4920
4945
 
4921
4946
  // dist/generated/definitions.js
@@ -22537,7 +22562,11 @@ var grants = /* @__PURE__ */ __name((raw) => {
22537
22562
  var installSessionCommands = /* @__PURE__ */ __name((program, context) => {
22538
22563
  const { env, streams, options, selected, output, policyFlags } = context;
22539
22564
  const session = annotate(program.command("session"), { effects: LOCAL_READ }).description("sign in to Google and manage local profiles");
22540
- 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) => {
22565
+ 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"), [
22566
+ "drive personal session start",
22567
+ "drive work session start --grant write,activity",
22568
+ "drive work session start --client-id 1234-abc.apps.googleusercontent.com"
22569
+ ]).option("--client-file <file>", "path to your own Desktop OAuth client JSON, used instead of WireCat's").option("--client-id <id>", "your own Desktop OAuth client ID, used instead of WireCat's; its secret comes from DRIVE_GOOGLE_CLIENT_SECRET").option("--credential-storage <storage>", "where the sign-in is kept: keyring (the default, which falls back to a private file by itself when no keyring works), or file, not recommended", "keyring").option("--no-browser", "print the sign-in URL instead of opening a browser").option("--grant <scopes>", "also ask for these permissions, comma-separated: write (change Drive files and Docs), activity (read Drive Activity history), apps (see installed Drive apps)", grants).action(async (args, command) => {
22541
22570
  if (args.credentialStorage !== "keyring" && args.credentialStorage !== "file")
22542
22571
  throw new CliError("validation_error", "credential storage is keyring or file");
22543
22572
  const signal = context.signal();
@@ -22547,18 +22576,22 @@ var installSessionCommands = /* @__PURE__ */ __name((program, context) => {
22547
22576
  json: json === true || jsonl === true || !process.stdout.isTTY,
22548
22577
  answers: false
22549
22578
  });
22550
- const { login } = await import("./login-4VQEC7VI.js");
22579
+ const app = application(env, { file: args.clientFile, clientId: args.clientId, profile: selected() });
22580
+ if (!app.clientSecret)
22581
+ streams.diagnostic("your Google app has no secret here, and Google refuses a Desktop app without one: set DRIVE_GOOGLE_CLIENT_SECRET\n");
22582
+ const { login } = await import("./login-HTY7GT2S.js");
22551
22583
  output(itemOf(await login({
22552
22584
  env,
22553
22585
  profile: selected(),
22554
- application: application(env, args.clientFile),
22586
+ application: app,
22555
22587
  storage: args.credentialStorage,
22556
22588
  ...Object.fromEntries([...args.grant ?? []].map((grant) => [grant, true])),
22557
22589
  ...options.keyring ? { keyring: options.keyring } : {},
22558
22590
  ...signal ? { signal } : {},
22559
- openBrowser: args.browser ? options.openBrowser ?? (async () => {
22560
- }) : async () => {
22561
- },
22591
+ openBrowser: /* @__PURE__ */ __name(async (url) => {
22592
+ if (args.browser)
22593
+ await options.openBrowser?.(url, command);
22594
+ }, "openBrowser"),
22562
22595
  showUrl: /* @__PURE__ */ __name((url) => {
22563
22596
  steps.openUrl(url, "Choose the Google account and allow access to Drive");
22564
22597
  streams.diagnostic(`Open Google sign-in: ${url}
@@ -22577,7 +22610,7 @@ var installSessionCommands = /* @__PURE__ */ __name((program, context) => {
22577
22610
  const name = selected();
22578
22611
  const config = readConfig(env);
22579
22612
  const profile = activeProfile(env, name);
22580
- const { credentials } = await import("./tokens-TXYURU4S.js");
22613
+ const { credentials } = await import("./tokens-XUKLM3SL.js");
22581
22614
  const store = credentials(env, profile.storage, options.keyring);
22582
22615
  store.remove(name);
22583
22616
  writeConfig(env, config);
@@ -22624,7 +22657,7 @@ var selection = /* @__PURE__ */ __name((env, name, source) => {
22624
22657
  return { profile, state, options: { source, destination, collection: `google-drive:${profile.principal}`, env } };
22625
22658
  }, "selection");
22626
22659
  var checkStoreImport = /* @__PURE__ */ __name(async (env, name, source, bindings) => {
22627
- const { ensureSqlite } = await import("./sqlite-runtime-CSO6K6B2.js");
22660
+ const { ensureSqlite } = await import("./sqlite-runtime-5ZK2CV7Y.js");
22628
22661
  await ensureSqlite();
22629
22662
  const { state, options } = selection(env, name, source);
22630
22663
  const preview = await previewDocumentTransfer({ ...options, bindings });
@@ -22798,7 +22831,7 @@ var installSyncCommands = /* @__PURE__ */ __name((program, context) => {
22798
22831
  // dist/commands/upgrade.js
22799
22832
  import { join as join7 } from "node:path";
22800
22833
 
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
22834
+ // node_modules/.pnpm/@wirecat+cli-core@0.566.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_2c70ab84360472ff0036a7904a884c42/node_modules/@wirecat/cli-core/dist/update/index.js
22802
22835
  import { realpathSync } from "node:fs";
22803
22836
  import { fileURLToPath } from "node:url";
22804
22837
  var QUIET_WORDS = [
@@ -23217,9 +23250,9 @@ var DRIVE_PROVIDER = {
23217
23250
  var openIndex = /* @__PURE__ */ __name(async (env, name, rescan = false) => {
23218
23251
  if (name)
23219
23252
  activeProfile(env, name);
23220
- const { ensureSqlite } = await import("./sqlite-runtime-CSO6K6B2.js");
23253
+ const { ensureSqlite } = await import("./sqlite-runtime-5ZK2CV7Y.js");
23221
23254
  await ensureSqlite();
23222
- const { openStore: openStore2, storePath: storePath2 } = await import("./store-HDWMJ44E.js");
23255
+ const { openStore: openStore2, storePath: storePath2 } = await import("./store-7M4MSUJV.js");
23223
23256
  if (env.DRIVE_STORE)
23224
23257
  throw new CliError("configuration_error", "DRIVE_STORE has been retired; use MESSAGING_STORE to select the shared database", { reason: "store.override-retired" });
23225
23258
  const store = await openStore2({ path: storePath2(env), env, command: "drive", version: VERSION });
@@ -23264,7 +23297,7 @@ var indexOver = /* @__PURE__ */ __name((store, env, pictureEmbedder) => {
23264
23297
  linkMessages: /* @__PURE__ */ __name((documents, since) => store.notes.linkMessages({ documents, ...since ? { since } : {} }), "linkMessages"),
23265
23298
  knowledge: documentKnowledge2(store, async (principal) => (await folder(principal, false))?.id),
23266
23299
  openPictures: /* @__PURE__ */ __name(async () => {
23267
- const { openPictureEmbedderFor, savePicture } = await import("./services-WU22S2MU.js");
23300
+ const { openPictureEmbedderFor, savePicture } = await import("./services-PXNBOCOC.js");
23268
23301
  const embedder = pictureEmbedder ?? await openPictureEmbedderFor({ env, command: "drive" });
23269
23302
  return {
23270
23303
  save: /* @__PURE__ */ __name((reference, bytes) => savePicture(store, { ref: reference }, bytes, { embedder }), "save"),
@@ -23283,7 +23316,7 @@ var indexOver = /* @__PURE__ */ __name((store, env, pictureEmbedder) => {
23283
23316
  has_more: false,
23284
23317
  meaning_skipped: "this Google account has no imported sources"
23285
23318
  };
23286
- const { searchNotes } = await import("./services-WU22S2MU.js");
23319
+ const { searchNotes } = await import("./services-PXNBOCOC.js");
23287
23320
  const result = await searchNotes(store, query, {
23288
23321
  ...options,
23289
23322
  folderIds: selected ? [selected.id] : [],
@@ -23314,7 +23347,7 @@ var indexOver = /* @__PURE__ */ __name((store, env, pictureEmbedder) => {
23314
23347
  };
23315
23348
  }, "search"),
23316
23349
  embed: /* @__PURE__ */ __name(async (max) => {
23317
- const { embedNotes } = await import("./services-WU22S2MU.js");
23350
+ const { embedNotes } = await import("./services-PXNBOCOC.js");
23318
23351
  return embedNotes(store, { maxChunks: max, env, command: "drive" });
23319
23352
  }, "embed"),
23320
23353
  close: /* @__PURE__ */ __name(() => store.close(), "close")
@@ -23348,7 +23381,7 @@ var uploadFile = /* @__PURE__ */ __name(async (input) => {
23348
23381
  throw new CliError("validation_error", "the file to upload could not be read", { reason: "file.unreadable" });
23349
23382
  }
23350
23383
  if (!stat.isFile())
23351
- throw new CliError("validation_error", "upload takes one file, not a folder", { reason: "file.not-file" });
23384
+ throw new CliError("validation_error", "upload takes one file, not a folder", { reason: "file.not-a-file" });
23352
23385
  const size2 = stat.size;
23353
23386
  const name = input.name ?? basename(path);
23354
23387
  const chunk = input.chunkBytes ?? CHUNK_BYTES;
@@ -23532,7 +23565,7 @@ var installDrive = /* @__PURE__ */ __name((program) => {
23532
23565
  if (lock !== void 0) {
23533
23566
  profileName(lock);
23534
23567
  if (named !== void 0 && profileName(named) !== lock)
23535
- throw new CliError("permission_error", `this process is locked to profile ${lock} (DRIVE_PROFILE_LOCK) \u2014 profile ${named} is refused`, { reason: "profile.lock-refused" });
23568
+ throw new CliError("permission_error", `this process is locked to profile ${lock} (DRIVE_PROFILE_LOCK) \u2014 profile ${named} is refused`, { reason: "profile.locked" });
23536
23569
  return lock;
23537
23570
  }
23538
23571
  if (named)
@@ -23601,7 +23634,7 @@ var installDrive = /* @__PURE__ */ __name((program) => {
23601
23634
  }, "output");
23602
23635
  const signal = /* @__PURE__ */ __name(() => environment().signal, "signal");
23603
23636
  const signedIn = /* @__PURE__ */ __name(async (name, scope2) => {
23604
- const { authorizedClient, checkAuthorization } = await import("./tokens-TXYURU4S.js");
23637
+ const { authorizedClient, checkAuthorization } = await import("./tokens-XUKLM3SL.js");
23605
23638
  const client = authorizedClient(env, name, environment().keyring, signal());
23606
23639
  await checkAuthorization(client, scope2);
23607
23640
  return client;
@@ -23611,7 +23644,7 @@ var installDrive = /* @__PURE__ */ __name((program) => {
23611
23644
  const fake = environment().source;
23612
23645
  if (fake)
23613
23646
  return fake(name);
23614
- const [{ googleSource }, client] = await Promise.all([import("./google-BYNSAIQI.js"), signedIn(name)]);
23647
+ const [{ googleSource }, client] = await Promise.all([import("./google-RXM2XEPD.js"), signedIn(name)]);
23615
23648
  return googleSource(client);
23616
23649
  }, "source");
23617
23650
  const withIndex = /* @__PURE__ */ __name(async (fn) => {
@@ -23753,7 +23786,7 @@ var installDrive = /* @__PURE__ */ __name((program) => {
23753
23786
  if (fake)
23754
23787
  return await fake.call(method, params, body);
23755
23788
  const [{ googleApi }, client] = await Promise.all([
23756
- import("./google-api-4VTZH7OP.js"),
23789
+ import("./google-api-NC65BZO4.js"),
23757
23790
  signedIn(selected(), descriptor.scope)
23758
23791
  ]);
23759
23792
  return await googleApi(client).call(method, params, body);
@@ -23779,7 +23812,7 @@ var installDrive = /* @__PURE__ */ __name((program) => {
23779
23812
  if (fake)
23780
23813
  return fake(id, mime);
23781
23814
  const [{ googleDownload }, client] = await Promise.all([
23782
- import("./google-api-4VTZH7OP.js"),
23815
+ import("./google-api-NC65BZO4.js"),
23783
23816
  signedIn(selected(), apiMethod(method).scope)
23784
23817
  ]);
23785
23818
  return googleDownload(client)(id, mime);
@@ -23797,7 +23830,7 @@ var installDrive = /* @__PURE__ */ __name((program) => {
23797
23830
  let request = environment().uploadRequest;
23798
23831
  if (!request) {
23799
23832
  const [{ googleUploadRequest }, client] = await Promise.all([
23800
- import("./google-api-4VTZH7OP.js"),
23833
+ import("./google-api-NC65BZO4.js"),
23801
23834
  signedIn(selected(), apiMethod(method).scope)
23802
23835
  ]);
23803
23836
  request = googleUploadRequest(client);
@@ -23868,6 +23901,10 @@ Availability: unavailable \u2014 ${availability.reason}
23868
23901
  }, "previewWrite");
23869
23902
  if (ACCOUNT_FREE_COMMANDS.has(words) && !agent())
23870
23903
  return previewWrite();
23904
+ if (words === "config migrate") {
23905
+ refuseUnderReadOnly(env, "change a setting");
23906
+ previewWrite();
23907
+ }
23871
23908
  if (ANY_PROFILE_COMMANDS.has(words)) {
23872
23909
  if (profileWord() ?? env.DRIVE_PROFILE ?? env.DRIVE_PROFILE_LOCK)
23873
23910
  selected();
@@ -23910,6 +23947,8 @@ Availability: unavailable \u2014 ${availability.reason}
23910
23947
  const key2 = action.args[0] ?? "";
23911
23948
  if (key2 === "permissions" || key2.startsWith("permissions.mcp"))
23912
23949
  throw new CliError("permission_error", "an agent cannot change its own authority or read-only settings");
23950
+ if (key2 === "google_client_id")
23951
+ throw new CliError("permission_error", "only the owner, at a terminal, chooses the Google app to sign in with");
23913
23952
  }
23914
23953
  }
23915
23954
  const flags = policyFlags();
@@ -23973,10 +24012,7 @@ Availability: unavailable \u2014 ${availability.reason}
23973
24012
  errors: { reasons: REASONS }
23974
24013
  });
23975
24014
  }, "installDrive");
23976
- var oauthClient = /* @__PURE__ */ __name((env) => {
23977
- application(env);
23978
- return { client: env.DRIVE_GOOGLE_CLIENT_ID ? "own" : "wirecat" };
23979
- }, "oauthClient");
24015
+ var oauthClient = /* @__PURE__ */ __name((env) => oauthClientReport(googleAppOf(env)), "oauthClient");
23980
24016
  var mcpCommand = /* @__PURE__ */ __name(() => {
23981
24017
  let availability;
23982
24018
  const mcp = appMcpCommand(DRIVE_APP, configuration, {
@@ -23998,7 +24034,7 @@ var mcpCommand = /* @__PURE__ */ __name(() => {
23998
24034
  const environment = environmentOf(action);
23999
24035
  if (environment.api)
24000
24036
  return;
24001
- const { grantAvailability } = await import("./grants-EUQXSICG.js");
24037
+ const { grantAvailability } = await import("./grants-SEWUYYH3.js");
24002
24038
  availability = grantAvailability(rootOf(root), environment.env ?? process.env, environment.keyring);
24003
24039
  });
24004
24040
  }, "mcpCommand");
@@ -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-EPCJUL6M.js";
6
+ import "./chunk-O5CUFS7T.js";
7
+ import "./chunk-DCBFNBEB.js";
8
+ import "./chunk-J4HQVHMN.js";
9
+ import "./chunk-Y5E2WNWB.js";
10
+ import "./chunk-6IBM4Z3V.js";
11
+ import "./chunk-OFFA54TW.js";
12
+ import "./chunk-VYXVPYA3.js";
13
+ import "./chunk-WZ5XK74U.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-MUUHUHWC.js";
6
- import "./chunk-LK2E2ELG.js";
7
- import "./chunk-UQPKAY6I.js";
8
- import "./chunk-3U22QTU6.js";
9
- import "./chunk-EBLA7GXY.js";
5
+ } from "./chunk-OLPJRD4S.js";
6
+ import "./chunk-LU3WKZBA.js";
7
+ import "./chunk-OFFA54TW.js";
8
+ import "./chunk-VYXVPYA3.js";
9
+ import "./chunk-WZ5XK74U.js";
10
10
  import "./chunk-ZVVMGPBJ.js";
11
11
  export {
12
12
  REASONS