@wirecat/drive-cli 0.60.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 (162) hide show
  1. package/README.md +4 -5
  2. package/dist/bin/drive.js +2 -2
  3. package/dist/bundle/{all-profiles-537I27Z4.js → all-profiles-H4L3Z5UM.js} +14 -14
  4. package/dist/bundle/{anthropic-X4NWVHDF.js → anthropic-PPGFISVP.js} +9 -9
  5. package/dist/bundle/{app-server-KSHJKKS7.js → app-server-YXVK2FUZ.js} +52 -52
  6. package/dist/bundle/{bun-WTBGGCUC.js → bun-DKZAL6ML.js} +2 -2
  7. package/dist/bundle/{bun-sqlite-T7Y3JFFD.js → bun-sqlite-MTZY36QK.js} +8 -8
  8. package/dist/bundle/{chunk-VRW6ZDTH.js → chunk-2RJA4BQB.js} +19 -19
  9. package/dist/bundle/{chunk-VVCZS42A.js → chunk-3252WXOL.js} +1 -1
  10. package/dist/bundle/{chunk-3TQHIHZI.js → chunk-36CWGEVX.js} +2 -2
  11. package/dist/bundle/{chunk-AXWXQNTC.js → chunk-3I2D5TK2.js} +10 -10
  12. package/dist/bundle/{chunk-PDYHEWKG.js → chunk-3SJQNS72.js} +5 -5
  13. package/dist/bundle/{chunk-PPL5ASW2.js → chunk-3UPIJ7DW.js} +280 -280
  14. package/dist/bundle/{chunk-PETFPXLU.js → chunk-3WZH3WV3.js} +3 -3
  15. package/dist/bundle/{chunk-5XHLQZAG.js → chunk-5W56YMQS.js} +25 -25
  16. package/dist/bundle/{chunk-IXN7Y6JA.js → chunk-5W7D5H2R.js} +1 -1
  17. package/dist/bundle/{chunk-FZOCQQ66.js → chunk-67HS46KM.js} +12 -12
  18. package/dist/bundle/{chunk-HFGR33KD.js → chunk-6DN4VPA7.js} +25 -25
  19. package/dist/bundle/{chunk-HIP43OGZ.js → chunk-6IBM4Z3V.js} +1 -1
  20. package/dist/bundle/{chunk-V7QMHMR3.js → chunk-6SUGANRJ.js} +6 -6
  21. package/dist/bundle/{chunk-LQSRVQ3V.js → chunk-6Y2FWJZ4.js} +3 -3
  22. package/dist/bundle/{chunk-GVRS5AIH.js → chunk-73WSULMI.js} +2 -2
  23. package/dist/bundle/{chunk-ZPQS7XJA.js → chunk-AM4RIWOZ.js} +4 -4
  24. package/dist/bundle/{chunk-HCJG7ENG.js → chunk-AWN22PJK.js} +3 -3
  25. package/dist/bundle/{chunk-YDN2RH5S.js → chunk-BCWUDTYQ.js} +2 -2
  26. package/dist/bundle/{chunk-GD6TQ6U4.js → chunk-BF6TQMNB.js} +8 -8
  27. package/dist/bundle/chunk-BQMIDYBA.js +415 -0
  28. package/dist/bundle/{chunk-JQLIM6BH.js → chunk-BXR7BKM3.js} +1 -1
  29. package/dist/bundle/{chunk-MVNPE5FZ.js → chunk-CACYL36O.js} +8 -8
  30. package/dist/bundle/{chunk-246P2DCT.js → chunk-DCBFNBEB.js} +113 -51
  31. package/dist/bundle/{chunk-TXMTMEHW.js → chunk-DEPMQHXQ.js} +4 -4
  32. package/dist/bundle/{chunk-O37ESNAP.js → chunk-DXPOVLQC.js} +46 -28
  33. package/dist/bundle/{chunk-CKGHRWVR.js → chunk-E5EXJ2XS.js} +4 -4
  34. package/dist/bundle/{chunk-4CBZEAQ7.js → chunk-E6J5YH2N.js} +34 -34
  35. package/dist/bundle/{chunk-4XZXH2NM.js → chunk-ECEYAQGN.js} +2 -2
  36. package/dist/bundle/{chunk-XDIEQ2CE.js → chunk-EPCJUL6M.js} +3 -3
  37. package/dist/bundle/{chunk-EHAI773E.js → chunk-FE5JJXKA.js} +2 -2
  38. package/dist/bundle/{chunk-DQDKLZAK.js → chunk-HFM653T3.js} +49 -49
  39. package/dist/bundle/{chunk-UVYVIHEA.js → chunk-HGOYQUT7.js} +1 -1
  40. package/dist/bundle/{chunk-KEXTTZJM.js → chunk-I26VL4W7.js} +2 -2
  41. package/dist/bundle/{chunk-LJ77Y3TK.js → chunk-J4HQVHMN.js} +6 -5
  42. package/dist/bundle/{chunk-YGG7UA3C.js → chunk-J5UDQD5S.js} +5 -5
  43. package/dist/bundle/{chunk-73TTP6ET.js → chunk-JVBLXSAA.js} +141 -141
  44. package/dist/bundle/{chunk-N7S2UPF3.js → chunk-K7LS3NGM.js} +55 -55
  45. package/dist/bundle/{chunk-2AXA5SKP.js → chunk-KV4267S4.js} +1 -1
  46. package/dist/bundle/{chunk-IRZ7OF3F.js → chunk-LARQTWIL.js} +1 -1
  47. package/dist/bundle/{chunk-QIJWSKZL.js → chunk-N2RLJTIW.js} +4 -4
  48. package/dist/bundle/{chunk-HQVIK6PM.js → chunk-NIX2MWHZ.js} +242 -362
  49. package/dist/bundle/{chunk-4VHBDVY2.js → chunk-NZ2EIZLX.js} +14 -10
  50. package/dist/bundle/{chunk-SZXI4OXX.js → chunk-O5CUFS7T.js} +2 -2
  51. package/dist/bundle/{chunk-FO4TCH6P.js → chunk-OFFA54TW.js} +2 -2
  52. package/dist/bundle/{chunk-W62CON5K.js → chunk-OGNOQDWB.js} +4 -4
  53. package/dist/bundle/{chunk-OYNUBWD2.js → chunk-OLPJRD4S.js} +1 -1
  54. package/dist/bundle/{chunk-67QXMO2G.js → chunk-PJTX2MOI.js} +26 -26
  55. package/dist/bundle/{chunk-MXP35VPO.js → chunk-PY7LKNOS.js} +2 -2
  56. package/dist/bundle/{chunk-FTZNUZO7.js → chunk-Q4XVBKX4.js} +3 -3
  57. package/dist/bundle/{chunk-5AMRCBMP.js → chunk-QR5VQXQ5.js} +26 -26
  58. package/dist/bundle/{chunk-S36HRPNS.js → chunk-QSGT4ZH4.js} +1 -1
  59. package/dist/bundle/{chunk-57QVQGBE.js → chunk-RFRCOAWS.js} +22 -22
  60. package/dist/bundle/{chunk-DMHGWL5D.js → chunk-S4YK6TTG.js} +13 -13
  61. package/dist/bundle/{chunk-UVLSWLPZ.js → chunk-TKGAYKXW.js} +16 -16
  62. package/dist/bundle/{chunk-SBHSNOU4.js → chunk-UKOYQC5O.js} +19 -18
  63. package/dist/bundle/{chunk-XFXRGQXJ.js → chunk-UO2IUDVK.js} +2 -2
  64. package/dist/bundle/{chunk-UTFATA4K.js → chunk-VPDAH7PJ.js} +1 -1
  65. package/dist/bundle/{chunk-TKW4QWCY.js → chunk-VYXVPYA3.js} +12 -6
  66. package/dist/bundle/{chunk-YYHKVOVK.js → chunk-W767AUNR.js} +4 -4
  67. package/dist/bundle/{chunk-73MNUSP3.js → chunk-WIU733D2.js} +1 -1
  68. package/dist/bundle/{chunk-UNJE63JK.js → chunk-WUP2MJDN.js} +2 -2
  69. package/dist/bundle/{chunk-EBLA7GXY.js → chunk-WZ5XK74U.js} +2 -1
  70. package/dist/bundle/{chunk-77C5XRH3.js → chunk-X2CXW4HM.js} +7 -7
  71. package/dist/bundle/{chunk-D6WIWOQC.js → chunk-XGMDWIUP.js} +4 -4
  72. package/dist/bundle/{chunk-K6XVRA6U.js → chunk-XGNC5OJG.js} +1 -1
  73. package/dist/bundle/{chunk-ALWTUDZF.js → chunk-XLFJLZJL.js} +4 -4
  74. package/dist/bundle/{chunk-JGUJJNGZ.js → chunk-XYCCGGKN.js} +242 -242
  75. package/dist/bundle/{chunk-TVQDMP2F.js → chunk-XZBR2O63.js} +271 -271
  76. package/dist/bundle/{chunk-OMKUBCNN.js → chunk-YMBFZA3H.js} +8 -8
  77. package/dist/bundle/{chunk-ZYCLPJ7U.js → chunk-YPF6OS37.js} +1 -1
  78. package/dist/bundle/{chunk-6HTKB4WC.js → chunk-YWIU4HOT.js} +1 -1
  79. package/dist/bundle/{chunk-V2VMBM7O.js → chunk-ZHYRHERD.js} +2 -2
  80. package/dist/bundle/{chunk-22ATLSNK.js → chunk-ZMNYK3FC.js} +5 -5
  81. package/dist/bundle/command-contract-T3EO5AYD.js +39 -0
  82. package/dist/bundle/{decode-35N57AFW.js → decode-62A3HGPW.js} +8 -8
  83. package/dist/bundle/{dispatch-CWXZW3PL.js → dispatch-IE7PBEQC.js} +9 -9
  84. package/dist/bundle/drive.js +11 -11
  85. package/dist/bundle/{echarts-3P3QZWMU.js → echarts-BGBPRGR5.js} +2 -2
  86. package/dist/bundle/{embed-Q6Q5IOJQ.js → embed-J3IBVV2V.js} +9 -9
  87. package/dist/bundle/{embedder-D44JDTAA.js → embedder-QFPMDRT2.js} +12 -12
  88. package/dist/bundle/entry-YQSYER66.js +22 -0
  89. package/dist/bundle/{failure-GRMMSDCZ.js → failure-BKOGBMIC.js} +4 -4
  90. package/dist/bundle/first-run-ZIFPVZAI.js +30 -0
  91. package/dist/bundle/first-screen-L5U26EY7.js +37 -0
  92. package/dist/bundle/{google-6ZZDKFBN.js → google-RXM2XEPD.js} +13 -13
  93. package/dist/bundle/{google-api-E6MOJ4ZD.js → google-api-NC65BZO4.js} +83 -64
  94. package/dist/bundle/grants-SEWUYYH3.js +105 -0
  95. package/dist/bundle/{identity-TID7S5NE.js → identity-PI6F2GWA.js} +6 -6
  96. package/dist/bundle/{instructions-ANJN4HV3.js → instructions-6LPDSKAD.js} +1 -1
  97. package/dist/bundle/{login-BGMK2ABH.js → login-HTY7GT2S.js} +64 -64
  98. package/dist/bundle/{mcp-WBHKX5E3.js → mcp-PPVOM4SE.js} +2 -2
  99. package/dist/bundle/{node-VOB45ES2.js → node-IB246NCQ.js} +2 -2
  100. package/dist/bundle/{node-sqlite-TSX6XQY2.js → node-sqlite-G2Y5SFJM.js} +9 -9
  101. package/dist/bundle/oauth-MWBKBI4T.js +22 -0
  102. package/dist/bundle/{open-3USWHGNR.js → open-WD4GFSJD.js} +8 -8
  103. package/dist/bundle/{openai-YZ5VGPIP.js → openai-QVM4PMY7.js} +17 -17
  104. package/dist/bundle/{process-44JS2W7L.js → process-SWPJGPQC.js} +1 -1
  105. package/dist/bundle/{program-TZLAFKJV.js → program-WHYFAMXR.js} +117 -98
  106. package/dist/bundle/prompt-OVYCGZB7.js +17 -0
  107. package/dist/bundle/{reasons-ZK3U3CIN.js → reasons-Q34DQWB6.js} +5 -5
  108. package/dist/bundle/{recognize-OFW7HWTM.js → recognize-DM3YWHSE.js} +7 -7
  109. package/dist/bundle/{remote-YBDRZQZ5.js → remote-KXVWRK7J.js} +10 -10
  110. package/dist/bundle/{rerank-TQQNS5FJ.js → rerank-TINXM3MY.js} +10 -10
  111. package/dist/bundle/{serve-OPZXMVLH.js → serve-IY2WL656.js} +12 -12
  112. package/dist/bundle/server-EMWVVT2C.js +70 -0
  113. package/dist/bundle/{server-2D6DDIK5.js → server-VPY3OWPC.js} +44 -44
  114. package/dist/bundle/{services-34WKT3NN.js → services-PXNBOCOC.js} +32 -32
  115. package/dist/bundle/{sqlite-runtime-WPUMKLUV.js → sqlite-runtime-5ZK2CV7Y.js} +9 -9
  116. package/dist/bundle/{start-ZXUJZ4JV.js → start-LDVCN3DK.js} +7 -7
  117. package/dist/bundle/{state-AV2RB3AQ.js → state-3MKTT3VS.js} +9 -9
  118. package/dist/bundle/{store-3M7N2Q5T.js → store-4VQOT5IJ.js} +18 -18
  119. package/dist/bundle/{store-YKV4GAMS.js → store-7M4MSUJV.js} +20 -20
  120. package/dist/bundle/store-maintenance-command-NRATYBWD.js +60 -0
  121. package/dist/bundle/tokens-XUKLM3SL.js +103 -0
  122. package/dist/commands/config.js +1 -1
  123. package/dist/commands/config.js.map +1 -1
  124. package/dist/commands/session.d.ts.map +1 -1
  125. package/dist/commands/session.js +10 -2
  126. package/dist/commands/session.js.map +1 -1
  127. package/dist/config.d.ts +16 -5
  128. package/dist/config.d.ts.map +1 -1
  129. package/dist/config.js +11 -17
  130. package/dist/config.js.map +1 -1
  131. package/dist/download.d.ts +3 -2
  132. package/dist/download.d.ts.map +1 -1
  133. package/dist/download.js +21 -9
  134. package/dist/download.js.map +1 -1
  135. package/dist/google-api.d.ts +3 -1
  136. package/dist/google-api.d.ts.map +1 -1
  137. package/dist/google-api.js +27 -7
  138. package/dist/google-api.js.map +1 -1
  139. package/dist/login.js +1 -1
  140. package/dist/login.js.map +1 -1
  141. package/dist/program.d.ts.map +1 -1
  142. package/dist/program.js +6 -6
  143. package/dist/program.js.map +1 -1
  144. package/dist/version.d.ts +1 -1
  145. package/dist/version.js +1 -1
  146. package/package.json +3 -3
  147. package/dist/bundle/chunk-77YTRBL6.js +0 -249
  148. package/dist/bundle/command-contract-NUIWUVYB.js +0 -39
  149. package/dist/bundle/entry-ZHCNI7XO.js +0 -22
  150. package/dist/bundle/first-run-3DC2SDWM.js +0 -30
  151. package/dist/bundle/first-screen-YJF4YODC.js +0 -37
  152. package/dist/bundle/grants-GWXDH5GM.js +0 -105
  153. package/dist/bundle/oauth-CEOYXW6C.js +0 -22
  154. package/dist/bundle/prompt-SG7LAOXW.js +0 -17
  155. package/dist/bundle/server-R6G2O772.js +0 -70
  156. package/dist/bundle/store-maintenance-command-WDXNY4ZF.js +0 -60
  157. package/dist/bundle/tokens-F63RXXEF.js +0 -103
  158. package/dist/oauth-application.d.ts +0 -5
  159. package/dist/oauth-application.d.ts.map +0 -1
  160. package/dist/oauth-application.js +0 -9
  161. package/dist/oauth-application.js.map +0 -1
  162. /package/dist/bundle/{chunk-LK2E2ELG.js → chunk-LU3WKZBA.js} +0 -0
@@ -3,12 +3,12 @@ const require = __bundleRequire(import.meta.url);
3
3
  import {
4
4
  SAMPLE_RATE,
5
5
  toModelRate
6
- } from "./chunk-ZPQS7XJA.js";
7
- import "./chunk-DMHGWL5D.js";
6
+ } from "./chunk-AM4RIWOZ.js";
7
+ import "./chunk-S4YK6TTG.js";
8
8
  import {
9
9
  OPENAI_URL
10
- } from "./chunk-PETFPXLU.js";
11
- import "./chunk-YGG7UA3C.js";
10
+ } from "./chunk-3WZH3WV3.js";
11
+ import "./chunk-J5UDQD5S.js";
12
12
  import "./chunk-5DPV7X27.js";
13
13
  import {
14
14
  OPENAI_TRANSCRIBE_MODEL,
@@ -16,28 +16,28 @@ import {
16
16
  filesPresent,
17
17
  modelsDirectory,
18
18
  vadPath
19
- } from "./chunk-ALWTUDZF.js";
20
- import "./chunk-KEXTTZJM.js";
19
+ } from "./chunk-XLFJLZJL.js";
20
+ import "./chunk-I26VL4W7.js";
21
21
  import {
22
22
  DEFAULT_RETRY,
23
23
  backoffMs
24
- } from "./chunk-246P2DCT.js";
25
- import "./chunk-LJ77Y3TK.js";
24
+ } from "./chunk-DCBFNBEB.js";
25
+ import "./chunk-J4HQVHMN.js";
26
26
  import "./chunk-Y5E2WNWB.js";
27
- import "./chunk-HIP43OGZ.js";
28
- import "./chunk-FO4TCH6P.js";
29
- import "./chunk-TKW4QWCY.js";
27
+ import "./chunk-6IBM4Z3V.js";
28
+ import "./chunk-OFFA54TW.js";
29
+ import "./chunk-VYXVPYA3.js";
30
30
  import {
31
31
  CliError
32
- } from "./chunk-EBLA7GXY.js";
32
+ } from "./chunk-WZ5XK74U.js";
33
33
  import {
34
34
  __name
35
35
  } from "./chunk-ZVVMGPBJ.js";
36
36
 
37
- // 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/speech/openai.js
37
+ // 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/speech/openai.js
38
38
  import { setTimeout as wait } from "node:timers/promises";
39
39
 
40
- // node_modules/.pnpm/@wirecat+cli-base@0.75.2_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/http/index.js
40
+ // node_modules/.pnpm/@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/http/index.js
41
41
  var parseRetryAfter = /* @__PURE__ */ __name((header, now) => {
42
42
  if (!header)
43
43
  return void 0;
@@ -61,7 +61,7 @@ var parseRateLimitReset = /* @__PURE__ */ __name((header, now) => {
61
61
  }, "parseRateLimitReset");
62
62
  var providerWaitMs = /* @__PURE__ */ __name((headers, now) => parseRetryAfter(headers.get("retry-after"), now) ?? parseRateLimitReset(headers.get("x-ratelimit-reset"), now), "providerWaitMs");
63
63
 
64
- // 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/speech/wav.js
64
+ // 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/speech/wav.js
65
65
  var encodeWav = /* @__PURE__ */ __name((samples, sampleRate = 16e3) => {
66
66
  const bytes = Buffer.alloc(44 + samples.length * 2);
67
67
  bytes.write("RIFF", 0, "ascii");
@@ -82,7 +82,7 @@ var encodeWav = /* @__PURE__ */ __name((samples, sampleRate = 16e3) => {
82
82
  return new Uint8Array(bytes.buffer, bytes.byteOffset, bytes.length);
83
83
  }, "encodeWav");
84
84
 
85
- // 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/speech/openai.js
85
+ // 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/speech/openai.js
86
86
  var LONGEST_REQUEST_SECONDS = 600;
87
87
  var JOINED_SECONDS = 0.2;
88
88
  var PAD_SECONDS = 0.2;
@@ -204,7 +204,7 @@ var piecesOf = /* @__PURE__ */ __name((spans, limit) => {
204
204
  return pieces;
205
205
  }, "piecesOf");
206
206
  var openCutter = /* @__PURE__ */ __name(async (vadModel) => {
207
- const { openSpeechCutter } = await import("./recognize-OFW7HWTM.js");
207
+ const { openSpeechCutter } = await import("./recognize-DM3YWHSE.js");
208
208
  return openSpeechCutter(vadModel);
209
209
  }, "openCutter");
210
210
  var checkKeywords = /* @__PURE__ */ __name((keywords = []) => {
@@ -5,7 +5,7 @@ import {
5
5
  __name
6
6
  } from "./chunk-ZVVMGPBJ.js";
7
7
 
8
- // 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/embeddings/process.js
8
+ // 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/embeddings/process.js
9
9
  import { spawn } from "node:child_process";
10
10
  import { createInterface } from "node:readline";
11
11
  import { fileURLToPath } from "node:url";
@@ -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-LQSRVQ3V.js";
22
+ } from "./chunk-6Y2FWJZ4.js";
23
23
  import {
24
24
  DEFAULTS_ONLY,
25
25
  DEFAULT_LEVELS,
@@ -33,8 +33,10 @@ import {
33
33
  configuredMirrors,
34
34
  configuredSessions,
35
35
  fileId,
36
+ googleAppOf,
36
37
  inspectConfig,
37
38
  methodPolicyKeys,
39
+ oauthClientReport,
38
40
  paths,
39
41
  permissionKeys,
40
42
  permissionNames,
@@ -47,7 +49,7 @@ import {
47
49
  unknownProfile,
48
50
  withDefaults,
49
51
  writeConfig
50
- } from "./chunk-HQVIK6PM.js";
52
+ } from "./chunk-BQMIDYBA.js";
51
53
  import {
52
54
  blockKey,
53
55
  blocksMarkdown,
@@ -66,7 +68,7 @@ import {
66
68
  syncDocuments,
67
69
  syncMirrors,
68
70
  watchMirrors
69
- } from "./chunk-57QVQGBE.js";
71
+ } from "./chunk-RFRCOAWS.js";
70
72
  import {
71
73
  apiMethod,
72
74
  apiMethods,
@@ -75,7 +77,7 @@ import {
75
77
  schemas,
76
78
  validateApiParams,
77
79
  validateRequest
78
- } from "./chunk-QIJWSKZL.js";
80
+ } from "./chunk-N2RLJTIW.js";
79
81
  import {
80
82
  DISCOVERY_DESCRIPTIONS,
81
83
  MEMO_SCENARIOS,
@@ -105,24 +107,24 @@ import {
105
107
  skillCommand,
106
108
  suggest,
107
109
  upgradeCommand
108
- } from "./chunk-TVQDMP2F.js";
110
+ } from "./chunk-XZBR2O63.js";
109
111
  import {
110
112
  googleError
111
- } from "./chunk-JQLIM6BH.js";
112
- import "./chunk-IXN7Y6JA.js";
113
+ } from "./chunk-BXR7BKM3.js";
114
+ import "./chunk-5W7D5H2R.js";
113
115
  import "./chunk-SBZB7HMU.js";
114
- import "./chunk-IRZ7OF3F.js";
115
- import "./chunk-5AMRCBMP.js";
116
- import "./chunk-SBHSNOU4.js";
116
+ import "./chunk-LARQTWIL.js";
117
+ import "./chunk-QR5VQXQ5.js";
118
+ import "./chunk-UKOYQC5O.js";
117
119
  import {
118
120
  modelGateway,
119
121
  storeInfo
120
- } from "./chunk-DQDKLZAK.js";
122
+ } from "./chunk-HFM653T3.js";
121
123
  import {
122
124
  RecipientList,
123
125
  SendJournal,
124
126
  sendGuard
125
- } from "./chunk-5XHLQZAG.js";
127
+ } from "./chunk-5W56YMQS.js";
126
128
  import {
127
129
  LIST_QUERY_GUIDE,
128
130
  listQuery,
@@ -133,13 +135,13 @@ import {
133
135
  typedQuery,
134
136
  unfilteredQuery,
135
137
  withQuery
136
- } from "./chunk-VRW6ZDTH.js";
138
+ } from "./chunk-2RJA4BQB.js";
137
139
  import {
138
140
  commandsText,
139
141
  inSection
140
- } from "./chunk-OMKUBCNN.js";
142
+ } from "./chunk-YMBFZA3H.js";
141
143
  import "./chunk-HTQTIKWP.js";
142
- import "./chunk-PDYHEWKG.js";
144
+ import "./chunk-3SJQNS72.js";
143
145
  import {
144
146
  FETCH,
145
147
  InvalidArgumentError,
@@ -171,29 +173,29 @@ import {
171
173
  rootOf,
172
174
  settingRows,
173
175
  snakeKeys
174
- } from "./chunk-73TTP6ET.js";
175
- import "./chunk-GD6TQ6U4.js";
176
- import "./chunk-FZOCQQ66.js";
176
+ } from "./chunk-JVBLXSAA.js";
177
+ import "./chunk-BF6TQMNB.js";
178
+ import "./chunk-67HS46KM.js";
177
179
  import {
178
180
  setupPermissionCeiling
179
- } from "./chunk-D6WIWOQC.js";
180
- import "./chunk-AXWXQNTC.js";
181
+ } from "./chunk-XGMDWIUP.js";
182
+ import "./chunk-3I2D5TK2.js";
181
183
  import {
182
184
  readOnlyLockOf,
183
185
  readOnlyRefusal
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";
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";
189
191
  import {
190
192
  newOperationId
191
- } from "./chunk-JGUJJNGZ.js";
193
+ } from "./chunk-XYCCGGKN.js";
192
194
  import {
193
195
  columnName,
194
196
  readSpreadsheet
195
- } from "./chunk-67QXMO2G.js";
196
- import "./chunk-DMHGWL5D.js";
197
+ } from "./chunk-PJTX2MOI.js";
198
+ import "./chunk-S4YK6TTG.js";
197
199
  import {
198
200
  CEILING_KEY,
199
201
  LEVELS,
@@ -202,40 +204,40 @@ import {
202
204
  layerPermissions,
203
205
  levelFor,
204
206
  parseDuration
205
- } from "./chunk-HFGR33KD.js";
206
- import "./chunk-YDN2RH5S.js";
207
+ } from "./chunk-6DN4VPA7.js";
208
+ import "./chunk-BCWUDTYQ.js";
207
209
  import {
208
210
  latestVersion,
209
211
  runUpdate,
210
212
  updateNotice
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";
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";
216
218
  import "./chunk-5DPV7X27.js";
217
- import "./chunk-ALWTUDZF.js";
219
+ import "./chunk-XLFJLZJL.js";
218
220
  import {
219
221
  applyDocumentTransfer,
220
222
  previewDocumentTransfer
221
- } from "./chunk-UVLSWLPZ.js";
223
+ } from "./chunk-TKGAYKXW.js";
222
224
  import {
223
225
  note
224
- } from "./chunk-YYHKVOVK.js";
225
- import "./chunk-3TQHIHZI.js";
226
+ } from "./chunk-W767AUNR.js";
227
+ import "./chunk-36CWGEVX.js";
226
228
  import {
227
229
  CATALOG_QUERY,
228
230
  IMPORTED_DOCUMENT_QUERY,
229
231
  openStore
230
- } from "./chunk-PPL5ASW2.js";
231
- import "./chunk-UNJE63JK.js";
232
+ } from "./chunk-3UPIJ7DW.js";
233
+ import "./chunk-WUP2MJDN.js";
232
234
  import {
233
235
  FACT_STATUSES,
234
236
  FACT_TYPES,
235
237
  MEMORY_KINDS,
236
238
  MEMORY_SCOPES,
237
239
  MEMORY_STATUSES
238
- } from "./chunk-N7S2UPF3.js";
240
+ } from "./chunk-K7LS3NGM.js";
239
241
  import {
240
242
  dateRange,
241
243
  defineQuery,
@@ -245,40 +247,40 @@ import {
245
247
  timezoneOf,
246
248
  validateQuery,
247
249
  zonedMoment
248
- } from "./chunk-4VHBDVY2.js";
249
- import "./chunk-UTFATA4K.js";
250
- import "./chunk-MVNPE5FZ.js";
251
- import "./chunk-77C5XRH3.js";
250
+ } from "./chunk-NZ2EIZLX.js";
251
+ import "./chunk-VPDAH7PJ.js";
252
+ import "./chunk-CACYL36O.js";
253
+ import "./chunk-X2CXW4HM.js";
252
254
  import {
253
255
  storePath
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";
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";
259
261
  import "./chunk-D72URWJE.js";
260
262
  import {
261
263
  installerOf
262
- } from "./chunk-2AXA5SKP.js";
264
+ } from "./chunk-KV4267S4.js";
263
265
  import {
264
266
  DRIVE_APP,
265
267
  PACKAGE,
266
268
  VERSION
267
- } from "./chunk-XFXRGQXJ.js";
269
+ } from "./chunk-UO2IUDVK.js";
268
270
  import {
269
271
  REASONS
270
- } from "./chunk-OYNUBWD2.js";
271
- import "./chunk-LK2E2ELG.js";
272
- import "./chunk-UVYVIHEA.js";
272
+ } from "./chunk-OLPJRD4S.js";
273
+ import "./chunk-LU3WKZBA.js";
274
+ import "./chunk-HGOYQUT7.js";
273
275
  import {
274
276
  processStreams,
275
277
  saveConfigFile,
276
278
  writeSecurely
277
- } from "./chunk-246P2DCT.js";
278
- import "./chunk-LJ77Y3TK.js";
279
+ } from "./chunk-DCBFNBEB.js";
280
+ import "./chunk-J4HQVHMN.js";
279
281
  import "./chunk-Y5E2WNWB.js";
280
- import "./chunk-HIP43OGZ.js";
281
- import "./chunk-FO4TCH6P.js";
282
+ import "./chunk-6IBM4Z3V.js";
283
+ import "./chunk-OFFA54TW.js";
282
284
  import {
283
285
  array,
284
286
  boolean,
@@ -302,11 +304,11 @@ import {
302
304
  string,
303
305
  unknown,
304
306
  writes
305
- } from "./chunk-TKW4QWCY.js";
307
+ } from "./chunk-VYXVPYA3.js";
306
308
  import {
307
309
  CliError,
308
310
  isCliError
309
- } from "./chunk-EBLA7GXY.js";
311
+ } from "./chunk-WZ5XK74U.js";
310
312
  import {
311
313
  __commonJS,
312
314
  __name,
@@ -825,7 +827,7 @@ var require_graceful_fs = __commonJS({
825
827
  polyfills(fs2);
826
828
  fs2.gracefulify = patch;
827
829
  fs2.createReadStream = createReadStream2;
828
- fs2.createWriteStream = createWriteStream;
830
+ fs2.createWriteStream = createWriteStream2;
829
831
  var fs$readFile = fs2.readFile;
830
832
  fs2.readFile = readFile;
831
833
  function readFile(path, options, cb) {
@@ -1052,10 +1054,10 @@ var require_graceful_fs = __commonJS({
1052
1054
  return new fs2.ReadStream(path, options);
1053
1055
  }
1054
1056
  __name(createReadStream2, "createReadStream");
1055
- function createWriteStream(path, options) {
1057
+ function createWriteStream2(path, options) {
1056
1058
  return new fs2.WriteStream(path, options);
1057
1059
  }
1058
- __name(createWriteStream, "createWriteStream");
1060
+ __name(createWriteStream2, "createWriteStream");
1059
1061
  var fs$open = fs2.open;
1060
1062
  fs2.open = open2;
1061
1063
  function open2(path, flags, mode, cb) {
@@ -2631,7 +2633,7 @@ var installConfigCommands = /* @__PURE__ */ __name((program, { env, selected, ou
2631
2633
  "drive personal config set max_text_chars 100000",
2632
2634
  `drive personal config set permissions.files '"readonly"' --defaults`,
2633
2635
  "drive personal config set record true --defaults"
2634
- ]).argument("<key>", "max_text_chars, picture_search, record, record_input, keep_runs_for_days, keep_successful_runs_for_days, runs_size_limit_mb, shared AI settings, permissions.<key> or models.<purpose>.<field>").argument("<json-value>", "the new value, as JSON").option("--defaults", "change the defaults instead of this profile").action((key, raw, args) => {
2636
+ ]).argument("<key>", "max_text_chars, picture_search, google_client_id, record, record_input, keep_runs_for_days, keep_successful_runs_for_days, runs_size_limit_mb, shared AI settings, permissions.<key> or models.<purpose>.<field>").argument("<json-value>", "the new value, as JSON").option("--defaults", "change the defaults instead of this profile").action((key, raw, args) => {
2635
2637
  const file = editable();
2636
2638
  const { at: scope, scope: name } = scopeOf(file, args.defaults);
2637
2639
  const setting = settingAt(key);
@@ -2730,7 +2732,7 @@ var installModelCommands = /* @__PURE__ */ __name((program, { env, output, strea
2730
2732
  throw new CliError("permission_error", "downloading a model needs the network; --offline was requested", {
2731
2733
  reason: "offline.refused"
2732
2734
  });
2733
- const { downloadImageModel, downloadTextModel } = await import("./services-34WKT3NN.js");
2735
+ const { downloadImageModel, downloadTextModel } = await import("./services-PXNBOCOC.js");
2734
2736
  const progress = /* @__PURE__ */ __name((line) => {
2735
2737
  if (!program.opts().quiet)
2736
2738
  streams.diagnostic(line);
@@ -4880,8 +4882,9 @@ var describeCycle = /* @__PURE__ */ __name((cycle) => {
4880
4882
 
4881
4883
  // dist/download.js
4882
4884
  import { randomUUID } from "node:crypto";
4883
- 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";
4884
4886
  import { dirname, join as join5 } from "node:path";
4887
+ import { pipeline } from "node:stream/promises";
4885
4888
  var EXPORT_FORMATS = {
4886
4889
  pdf: "application/pdf",
4887
4890
  docx: "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
@@ -4902,18 +4905,28 @@ var saveDownload = /* @__PURE__ */ __name(async (path, overwrite, read, createDi
4902
4905
  throw error;
4903
4906
  }
4904
4907
  }
4905
- const bytes = await read();
4908
+ const source = await read();
4906
4909
  if (createDirectory)
4907
4910
  mkdirSync2(dirname(path), { recursive: true, mode: 448 });
4908
4911
  const temp = join5(dirname(path), `.${randomUUID()}.tmp`);
4909
4912
  let created = false;
4913
+ let size2 = 0;
4910
4914
  try {
4911
- const fd = openSync(temp, "wx", 384);
4912
- created = true;
4913
- try {
4914
- writeFileSync2(fd, bytes);
4915
- } finally {
4916
- 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 }));
4917
4930
  }
4918
4931
  if (overwrite)
4919
4932
  renameSync(temp, path);
@@ -4927,7 +4940,7 @@ var saveDownload = /* @__PURE__ */ __name(async (path, overwrite, read, createDi
4927
4940
  if (created)
4928
4941
  rmSync(temp, { force: true });
4929
4942
  }
4930
- return bytes.byteLength;
4943
+ return size2;
4931
4944
  }, "saveDownload");
4932
4945
 
4933
4946
  // dist/generated/definitions.js
@@ -22549,7 +22562,11 @@ var grants = /* @__PURE__ */ __name((raw) => {
22549
22562
  var installSessionCommands = /* @__PURE__ */ __name((program, context) => {
22550
22563
  const { env, streams, options, selected, output, policyFlags } = context;
22551
22564
  const session = annotate(program.command("session"), { effects: LOCAL_READ }).description("sign in to Google and manage local profiles");
22552
- examples(annotate(session.command("start"), { mcp: false, effects: REMOTE_WRITE }).description("sign in to Google in the browser; read-only unless you pass --grant write"), ["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) => {
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) => {
22553
22570
  if (args.credentialStorage !== "keyring" && args.credentialStorage !== "file")
22554
22571
  throw new CliError("validation_error", "credential storage is keyring or file");
22555
22572
  const signal = context.signal();
@@ -22559,11 +22576,14 @@ var installSessionCommands = /* @__PURE__ */ __name((program, context) => {
22559
22576
  json: json === true || jsonl === true || !process.stdout.isTTY,
22560
22577
  answers: false
22561
22578
  });
22562
- const { login } = await import("./login-BGMK2ABH.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");
22563
22583
  output(itemOf(await login({
22564
22584
  env,
22565
22585
  profile: selected(),
22566
- application: application(env, args.clientFile),
22586
+ application: app,
22567
22587
  storage: args.credentialStorage,
22568
22588
  ...Object.fromEntries([...args.grant ?? []].map((grant) => [grant, true])),
22569
22589
  ...options.keyring ? { keyring: options.keyring } : {},
@@ -22590,7 +22610,7 @@ var installSessionCommands = /* @__PURE__ */ __name((program, context) => {
22590
22610
  const name = selected();
22591
22611
  const config = readConfig(env);
22592
22612
  const profile = activeProfile(env, name);
22593
- const { credentials } = await import("./tokens-F63RXXEF.js");
22613
+ const { credentials } = await import("./tokens-XUKLM3SL.js");
22594
22614
  const store = credentials(env, profile.storage, options.keyring);
22595
22615
  store.remove(name);
22596
22616
  writeConfig(env, config);
@@ -22637,7 +22657,7 @@ var selection = /* @__PURE__ */ __name((env, name, source) => {
22637
22657
  return { profile, state, options: { source, destination, collection: `google-drive:${profile.principal}`, env } };
22638
22658
  }, "selection");
22639
22659
  var checkStoreImport = /* @__PURE__ */ __name(async (env, name, source, bindings) => {
22640
- const { ensureSqlite } = await import("./sqlite-runtime-WPUMKLUV.js");
22660
+ const { ensureSqlite } = await import("./sqlite-runtime-5ZK2CV7Y.js");
22641
22661
  await ensureSqlite();
22642
22662
  const { state, options } = selection(env, name, source);
22643
22663
  const preview = await previewDocumentTransfer({ ...options, bindings });
@@ -22811,7 +22831,7 @@ var installSyncCommands = /* @__PURE__ */ __name((program, context) => {
22811
22831
  // dist/commands/upgrade.js
22812
22832
  import { join as join7 } from "node:path";
22813
22833
 
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
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
22815
22835
  import { realpathSync } from "node:fs";
22816
22836
  import { fileURLToPath } from "node:url";
22817
22837
  var QUIET_WORDS = [
@@ -23230,9 +23250,9 @@ var DRIVE_PROVIDER = {
23230
23250
  var openIndex = /* @__PURE__ */ __name(async (env, name, rescan = false) => {
23231
23251
  if (name)
23232
23252
  activeProfile(env, name);
23233
- const { ensureSqlite } = await import("./sqlite-runtime-WPUMKLUV.js");
23253
+ const { ensureSqlite } = await import("./sqlite-runtime-5ZK2CV7Y.js");
23234
23254
  await ensureSqlite();
23235
- const { openStore: openStore2, storePath: storePath2 } = await import("./store-YKV4GAMS.js");
23255
+ const { openStore: openStore2, storePath: storePath2 } = await import("./store-7M4MSUJV.js");
23236
23256
  if (env.DRIVE_STORE)
23237
23257
  throw new CliError("configuration_error", "DRIVE_STORE has been retired; use MESSAGING_STORE to select the shared database", { reason: "store.override-retired" });
23238
23258
  const store = await openStore2({ path: storePath2(env), env, command: "drive", version: VERSION });
@@ -23277,7 +23297,7 @@ var indexOver = /* @__PURE__ */ __name((store, env, pictureEmbedder) => {
23277
23297
  linkMessages: /* @__PURE__ */ __name((documents, since) => store.notes.linkMessages({ documents, ...since ? { since } : {} }), "linkMessages"),
23278
23298
  knowledge: documentKnowledge2(store, async (principal) => (await folder(principal, false))?.id),
23279
23299
  openPictures: /* @__PURE__ */ __name(async () => {
23280
- const { openPictureEmbedderFor, savePicture } = await import("./services-34WKT3NN.js");
23300
+ const { openPictureEmbedderFor, savePicture } = await import("./services-PXNBOCOC.js");
23281
23301
  const embedder = pictureEmbedder ?? await openPictureEmbedderFor({ env, command: "drive" });
23282
23302
  return {
23283
23303
  save: /* @__PURE__ */ __name((reference, bytes) => savePicture(store, { ref: reference }, bytes, { embedder }), "save"),
@@ -23296,7 +23316,7 @@ var indexOver = /* @__PURE__ */ __name((store, env, pictureEmbedder) => {
23296
23316
  has_more: false,
23297
23317
  meaning_skipped: "this Google account has no imported sources"
23298
23318
  };
23299
- const { searchNotes } = await import("./services-34WKT3NN.js");
23319
+ const { searchNotes } = await import("./services-PXNBOCOC.js");
23300
23320
  const result = await searchNotes(store, query, {
23301
23321
  ...options,
23302
23322
  folderIds: selected ? [selected.id] : [],
@@ -23327,7 +23347,7 @@ var indexOver = /* @__PURE__ */ __name((store, env, pictureEmbedder) => {
23327
23347
  };
23328
23348
  }, "search"),
23329
23349
  embed: /* @__PURE__ */ __name(async (max) => {
23330
- const { embedNotes } = await import("./services-34WKT3NN.js");
23350
+ const { embedNotes } = await import("./services-PXNBOCOC.js");
23331
23351
  return embedNotes(store, { maxChunks: max, env, command: "drive" });
23332
23352
  }, "embed"),
23333
23353
  close: /* @__PURE__ */ __name(() => store.close(), "close")
@@ -23614,7 +23634,7 @@ var installDrive = /* @__PURE__ */ __name((program) => {
23614
23634
  }, "output");
23615
23635
  const signal = /* @__PURE__ */ __name(() => environment().signal, "signal");
23616
23636
  const signedIn = /* @__PURE__ */ __name(async (name, scope2) => {
23617
- const { authorizedClient, checkAuthorization } = await import("./tokens-F63RXXEF.js");
23637
+ const { authorizedClient, checkAuthorization } = await import("./tokens-XUKLM3SL.js");
23618
23638
  const client = authorizedClient(env, name, environment().keyring, signal());
23619
23639
  await checkAuthorization(client, scope2);
23620
23640
  return client;
@@ -23624,7 +23644,7 @@ var installDrive = /* @__PURE__ */ __name((program) => {
23624
23644
  const fake = environment().source;
23625
23645
  if (fake)
23626
23646
  return fake(name);
23627
- const [{ googleSource }, client] = await Promise.all([import("./google-6ZZDKFBN.js"), signedIn(name)]);
23647
+ const [{ googleSource }, client] = await Promise.all([import("./google-RXM2XEPD.js"), signedIn(name)]);
23628
23648
  return googleSource(client);
23629
23649
  }, "source");
23630
23650
  const withIndex = /* @__PURE__ */ __name(async (fn) => {
@@ -23766,7 +23786,7 @@ var installDrive = /* @__PURE__ */ __name((program) => {
23766
23786
  if (fake)
23767
23787
  return await fake.call(method, params, body);
23768
23788
  const [{ googleApi }, client] = await Promise.all([
23769
- import("./google-api-E6MOJ4ZD.js"),
23789
+ import("./google-api-NC65BZO4.js"),
23770
23790
  signedIn(selected(), descriptor.scope)
23771
23791
  ]);
23772
23792
  return await googleApi(client).call(method, params, body);
@@ -23792,7 +23812,7 @@ var installDrive = /* @__PURE__ */ __name((program) => {
23792
23812
  if (fake)
23793
23813
  return fake(id, mime);
23794
23814
  const [{ googleDownload }, client] = await Promise.all([
23795
- import("./google-api-E6MOJ4ZD.js"),
23815
+ import("./google-api-NC65BZO4.js"),
23796
23816
  signedIn(selected(), apiMethod(method).scope)
23797
23817
  ]);
23798
23818
  return googleDownload(client)(id, mime);
@@ -23810,7 +23830,7 @@ var installDrive = /* @__PURE__ */ __name((program) => {
23810
23830
  let request = environment().uploadRequest;
23811
23831
  if (!request) {
23812
23832
  const [{ googleUploadRequest }, client] = await Promise.all([
23813
- import("./google-api-E6MOJ4ZD.js"),
23833
+ import("./google-api-NC65BZO4.js"),
23814
23834
  signedIn(selected(), apiMethod(method).scope)
23815
23835
  ]);
23816
23836
  request = googleUploadRequest(client);
@@ -23927,6 +23947,8 @@ Availability: unavailable \u2014 ${availability.reason}
23927
23947
  const key2 = action.args[0] ?? "";
23928
23948
  if (key2 === "permissions" || key2.startsWith("permissions.mcp"))
23929
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");
23930
23952
  }
23931
23953
  }
23932
23954
  const flags = policyFlags();
@@ -23990,10 +24012,7 @@ Availability: unavailable \u2014 ${availability.reason}
23990
24012
  errors: { reasons: REASONS }
23991
24013
  });
23992
24014
  }, "installDrive");
23993
- var oauthClient = /* @__PURE__ */ __name((env) => {
23994
- application(env);
23995
- return { client: env.DRIVE_GOOGLE_CLIENT_ID ? "own" : "wirecat" };
23996
- }, "oauthClient");
24015
+ var oauthClient = /* @__PURE__ */ __name((env) => oauthClientReport(googleAppOf(env)), "oauthClient");
23997
24016
  var mcpCommand = /* @__PURE__ */ __name(() => {
23998
24017
  let availability;
23999
24018
  const mcp = appMcpCommand(DRIVE_APP, configuration, {
@@ -24015,7 +24034,7 @@ var mcpCommand = /* @__PURE__ */ __name(() => {
24015
24034
  const environment = environmentOf(action);
24016
24035
  if (environment.api)
24017
24036
  return;
24018
- const { grantAvailability } = await import("./grants-GWXDH5GM.js");
24037
+ const { grantAvailability } = await import("./grants-SEWUYYH3.js");
24019
24038
  availability = grantAvailability(rootOf(root), environment.env ?? process.env, environment.keyring);
24020
24039
  });
24021
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
+ };