@wirecat/drive-cli 0.65.0 → 0.66.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 (204) hide show
  1. package/contracts/wirecat.json +2871 -0
  2. package/dist/bin/drive.js +2 -2
  3. package/dist/bin/drive.js.map +1 -1
  4. package/dist/browse.d.ts +1 -1
  5. package/dist/browse.d.ts.map +1 -1
  6. package/dist/browse.js +1 -1
  7. package/dist/bundle/{all-profiles-PD7GJHFA.js → all-profiles-WCQLIHUG.js} +14 -14
  8. package/dist/bundle/{anthropic-PJKFON5H.js → anthropic-5RJMB6O7.js} +20 -13
  9. package/dist/bundle/{app-server-6ELQA6FJ.js → app-server-3RGYXPKG.js} +67 -56
  10. package/dist/bundle/{bun-P54TGES2.js → bun-L34VEKGG.js} +2 -2
  11. package/dist/bundle/{bun-sqlite-TND5ZRJH.js → bun-sqlite-H6IAXQXI.js} +9 -9
  12. package/dist/bundle/{chunk-VHQYWFWV.js → chunk-2AF77WMH.js} +1 -1
  13. package/dist/bundle/{chunk-CWLL63JD.js → chunk-2S3E2HVV.js} +17 -17
  14. package/dist/bundle/{chunk-I272E6UR.js → chunk-3NYH756U.js} +49 -117
  15. package/dist/bundle/{chunk-UTNRBOEN.js → chunk-3QFUDXMQ.js} +2 -2
  16. package/dist/bundle/{chunk-RNHGQ35R.js → chunk-3SDJIMZB.js} +1 -1
  17. package/dist/bundle/{chunk-NQ5XMSLA.js → chunk-4UHBJSMI.js} +22086 -29123
  18. package/dist/bundle/{chunk-OWMZUWCM.js → chunk-5HVJK3ZJ.js} +6 -14
  19. package/dist/bundle/chunk-5K54RZBK.js +70 -0
  20. package/dist/bundle/{chunk-SIWXYB4E.js → chunk-5PLINHEY.js} +2987 -2717
  21. package/dist/bundle/{chunk-O7ZDCOZE.js → chunk-5VDVGDOC.js} +1 -1
  22. package/dist/bundle/{chunk-B2LPCHQN.js → chunk-5XLU4NN6.js} +4 -4
  23. package/dist/bundle/{chunk-5XSBCMAF.js → chunk-6UJCCOZC.js} +4 -4
  24. package/dist/bundle/{chunk-7AQGVX5O.js → chunk-6X3KUFRQ.js} +60 -29
  25. package/dist/bundle/{chunk-WRMJN6UQ.js → chunk-7EP4AU6A.js} +3 -3
  26. package/dist/bundle/{chunk-GW3LBY3T.js → chunk-7LT2G5BC.js} +146 -133
  27. package/dist/bundle/{chunk-ZILALBYQ.js → chunk-7ZGJRVBH.js} +7 -5
  28. package/dist/bundle/{chunk-PLP5527C.js → chunk-ALE67WRR.js} +5 -5
  29. package/dist/bundle/{chunk-EHU6EYGO.js → chunk-AP4MX247.js} +12 -12
  30. package/dist/bundle/{chunk-NI5PD5KM.js → chunk-BIJW6AYA.js} +14124 -12049
  31. package/dist/bundle/{chunk-54V4H6PM.js → chunk-BQXSE645.js} +12 -12
  32. package/dist/bundle/{chunk-EM7NL5ES.js → chunk-COGWKO2T.js} +3 -3
  33. package/dist/bundle/{chunk-II4S2DBJ.js → chunk-D4MIMH2N.js} +12 -6
  34. package/dist/bundle/{chunk-42G2XNPN.js → chunk-D7KOAPG6.js} +2 -2
  35. package/dist/bundle/{chunk-NQRTKYJB.js → chunk-E2F2XIX6.js} +47 -80
  36. package/dist/bundle/{chunk-VDZY3L7U.js → chunk-FA2TNA5X.js} +1 -1
  37. package/dist/bundle/{chunk-A4QNADEX.js → chunk-FHBTQPA3.js} +49 -49
  38. package/dist/bundle/{chunk-7TAP7Y2E.js → chunk-FKKPVPZR.js} +196 -112
  39. package/dist/bundle/{chunk-2AFI4KGI.js → chunk-G4TNKBDX.js} +7 -7
  40. package/dist/bundle/{chunk-ECEP4SO3.js → chunk-GVA3KTCD.js} +10 -10
  41. package/dist/bundle/{chunk-PHOL2DZM.js → chunk-GY4DAJSK.js} +34 -5
  42. package/dist/bundle/{chunk-Z2ADO6UA.js → chunk-H7XL6WTW.js} +2 -2
  43. package/dist/bundle/{chunk-SE352DBY.js → chunk-HHRJPLFO.js} +1 -1
  44. package/dist/bundle/{chunk-WRAUO5EJ.js → chunk-HPKE2GDP.js} +45 -22
  45. package/dist/bundle/{chunk-D7WB54P7.js → chunk-HPSHQVJU.js} +540 -456
  46. package/dist/bundle/{chunk-4Y5YBFMS.js → chunk-HQBLJLYH.js} +7 -7
  47. package/dist/bundle/{chunk-IMHW7VIV.js → chunk-I5R5CMQR.js} +5 -5
  48. package/dist/bundle/{chunk-ELJUBPY4.js → chunk-IIHZTV6V.js} +1 -1
  49. package/dist/bundle/{chunk-M7ELUGU6.js → chunk-IRNDYNQX.js} +4 -4
  50. package/dist/bundle/{chunk-TTP4NOP3.js → chunk-JCHF7LZT.js} +4 -4
  51. package/dist/bundle/{chunk-3HXNDF6Q.js → chunk-JHMEETXI.js} +2 -2
  52. package/dist/bundle/{chunk-4EDWLR22.js → chunk-JLCR24UM.js} +1 -1
  53. package/dist/bundle/{chunk-6DCLZLGX.js → chunk-JQXK3M5M.js} +1 -1
  54. package/dist/bundle/{chunk-EZ2OLYEK.js → chunk-KOY5HUBY.js} +14 -5
  55. package/dist/bundle/{chunk-IBO23OID.js → chunk-KRG5X5PH.js} +2 -2
  56. package/dist/bundle/{chunk-FA6JNXCC.js → chunk-LVAPSAHF.js} +8 -8
  57. package/dist/bundle/{chunk-ZR2EJPMQ.js → chunk-M7543RUJ.js} +18 -15
  58. package/dist/bundle/{chunk-A27UVLPK.js → chunk-MZWXTJ4O.js} +3 -3
  59. package/dist/bundle/{chunk-XPWZSW6Y.js → chunk-NK4GVFJH.js} +4 -4
  60. package/dist/bundle/chunk-NYECVHFH.js +10283 -0
  61. package/dist/bundle/{chunk-W2XY6C5S.js → chunk-NYZS2LKF.js} +2 -2
  62. package/dist/bundle/{chunk-4AOINPN2.js → chunk-O53WLYX3.js} +8 -2
  63. package/dist/bundle/{chunk-RX5CJ55S.js → chunk-OIF4B526.js} +1 -1
  64. package/dist/bundle/{chunk-SS4LKLD7.js → chunk-OT7SQQJK.js} +371 -362
  65. package/dist/bundle/chunk-OZOQLAWK.js +72 -0
  66. package/dist/bundle/{chunk-DA63E2UM.js → chunk-P7HQFII6.js} +18 -15
  67. package/dist/bundle/{chunk-MCPOZNWG.js → chunk-PJGOQSE5.js} +1 -1
  68. package/dist/bundle/{chunk-F56DRBGY.js → chunk-PKM55ZRR.js} +75 -20
  69. package/dist/bundle/{chunk-SNLSEYJO.js → chunk-PUMDOCAF.js} +1 -1
  70. package/dist/bundle/{chunk-LMKPP2JP.js → chunk-QF7VL4C3.js} +1 -1
  71. package/dist/bundle/{chunk-D6Z43SOG.js → chunk-QJ57PV55.js} +383 -361
  72. package/dist/bundle/{chunk-EU5MD24W.js → chunk-QSELSDWE.js} +13 -13
  73. package/dist/bundle/{chunk-TMHF4BCL.js → chunk-SOOU5WO6.js} +2 -2
  74. package/dist/bundle/{chunk-3ONWN3IA.js → chunk-SZ6JFOL4.js} +137 -45
  75. package/dist/bundle/{chunk-WVJHZIDH.js → chunk-T3ULDA7C.js} +3 -3
  76. package/dist/bundle/{chunk-XYE7XZPB.js → chunk-TAHISPDE.js} +5 -5
  77. package/dist/bundle/{chunk-HP3NT6JJ.js → chunk-TYLEICTX.js} +3 -3
  78. package/dist/bundle/{chunk-Y5PKRITX.js → chunk-UAKX6DP4.js} +5 -5
  79. package/dist/bundle/{chunk-VLXWAH5E.js → chunk-UG3GHFGY.js} +4 -4
  80. package/dist/bundle/{chunk-X7YGGWXI.js → chunk-ULXEW6FT.js} +3 -2
  81. package/dist/bundle/{chunk-JPPPLKAO.js → chunk-UNTIVT47.js} +1 -2
  82. package/dist/bundle/{chunk-SEQWBZYH.js → chunk-UQPW42HF.js} +1 -1
  83. package/dist/bundle/{chunk-JMJIH6JH.js → chunk-V2WXTILT.js} +6 -6
  84. package/dist/bundle/{chunk-TOVWMURV.js → chunk-VQKNKJYL.js} +22 -7
  85. package/dist/bundle/{chunk-OFJXHEFT.js → chunk-VR3YKXHL.js} +93 -31
  86. package/dist/bundle/{chunk-VMAMRFFC.js → chunk-VUUPFDRU.js} +26 -27
  87. package/dist/bundle/{chunk-FBHSWQU7.js → chunk-WYTYHUFH.js} +319 -102
  88. package/dist/bundle/{chunk-ZD4MB7NH.js → chunk-XLGDNI4S.js} +1 -1
  89. package/dist/bundle/{chunk-O6K2E7OA.js → chunk-XVZNFA2P.js} +1507 -1107
  90. package/dist/bundle/chunk-Y5U4HIZS.js +71 -0
  91. package/dist/bundle/chunk-YTIPTHEE.js +47 -0
  92. package/dist/bundle/cli-KW6QQVS5.js +1101 -0
  93. package/dist/bundle/command-contract-CE543JBN.js +41 -0
  94. package/dist/bundle/{command-server-entry-36JXYIJB.js → command-server-entry-OC4E4DED.js} +31 -30
  95. package/dist/bundle/{decode-T5ZW57WZ.js → decode-AH5ZLLDK.js} +8 -8
  96. package/dist/bundle/{dispatch-RMA2XFYA.js → dispatch-CDWZZ54Q.js} +9 -9
  97. package/dist/bundle/drive.js +13 -13
  98. package/dist/bundle/{echarts-KQ44LPSF.js → echarts-VC7MTXWY.js} +2 -2
  99. package/dist/bundle/{embed-Q7XST53J.js → embed-EPSQY6QG.js} +9 -9
  100. package/dist/bundle/{embedder-RWZSBVW2.js → embedder-TK4U4TJR.js} +12 -12
  101. package/dist/bundle/entry-3VN23M7M.js +25 -0
  102. package/dist/bundle/{failure-7NP4QPIN.js → failure-WSVZOPFE.js} +4 -4
  103. package/dist/bundle/first-run-7ZYJ7EB3.js +30 -0
  104. package/dist/bundle/first-screen-CZDH7QY3.js +39 -0
  105. package/dist/bundle/google-OBZMWA7J.js +45 -0
  106. package/dist/bundle/{google-api-P5DRHD7L.js → google-api-AV4X2JH3.js} +68 -63
  107. package/dist/bundle/grants-WTRLN4ZI.js +111 -0
  108. package/dist/bundle/{identity-VDV6CHRW.js → identity-CGHHF7AK.js} +8 -6
  109. package/dist/bundle/{instructions-Q45FVY6H.js → instructions-24PHDBBE.js} +1 -1
  110. package/dist/bundle/{login-XKN3NI6X.js → login-XHFESAFM.js} +73 -70
  111. package/dist/bundle/{mcp-7KQUJNFN.js → mcp-M5YCSWJJ.js} +2 -2
  112. package/dist/bundle/{node-MSW565D3.js → node-GIDULTV5.js} +2 -2
  113. package/dist/bundle/{node-sqlite-S74XVVHL.js → node-sqlite-LINBOAWK.js} +10 -10
  114. package/dist/bundle/oauth-JHUX3KE3.js +22 -0
  115. package/dist/bundle/{open-P7UQG7XJ.js → open-RYFKPNCJ.js} +8 -8
  116. package/dist/bundle/{openai-DDHJ57KZ.js → openai-Q7YYUHJF.js} +28 -21
  117. package/dist/bundle/{process-NMUB5SHK.js → process-VPIZTIJR.js} +1 -1
  118. package/dist/bundle/{program-PJNWP6JW.js → program-IUXFRBZA.js} +213 -555
  119. package/dist/bundle/{prompt-VOSMK4C2.js → prompt-LF4KX3XL.js} +8 -8
  120. package/dist/bundle/{reasons-KDAXOC5S.js → reasons-JPYOU5GV.js} +5 -5
  121. package/dist/bundle/{recognize-GZIY63HS.js → recognize-KEWTJXFH.js} +7 -7
  122. package/dist/bundle/{remote-V3YGN7LN.js → remote-HGGLB76S.js} +13 -10
  123. package/dist/bundle/{rerank-XRU6AVN7.js → rerank-TDUKETFT.js} +10 -10
  124. package/dist/bundle/{serve-NDOAFA57.js → serve-XFYMKW5W.js} +12 -12
  125. package/dist/bundle/server-BDEV3CZJ.js +74 -0
  126. package/dist/bundle/{server-BKGWJYMC.js → server-PXIPSGFP.js} +47 -45
  127. package/dist/bundle/{services-TYDMFQCA.js → services-2BOCGMJU.js} +44 -34
  128. package/dist/bundle/{sqlite-runtime-UAFJKSJR.js → sqlite-runtime-R7M5XUMW.js} +9 -9
  129. package/dist/bundle/{start-2ZLDP2OE.js → start-YRLT4MQZ.js} +7 -7
  130. package/dist/bundle/{state-6SP27J2K.js → state-NZ7WRJWH.js} +9 -9
  131. package/dist/bundle/{store-EJN27MXI.js → store-7LCVDO7G.js} +23 -21
  132. package/dist/bundle/{store-4UUY545Q.js → store-ICDGPSEN.js} +21 -19
  133. package/dist/bundle/store-maintenance-command-SJPLY6IH.js +65 -0
  134. package/dist/bundle/tokens-FGTBE7VW.js +111 -0
  135. package/dist/commands/discovery.d.ts +0 -1
  136. package/dist/commands/discovery.d.ts.map +1 -1
  137. package/dist/commands/discovery.js +6 -26
  138. package/dist/commands/discovery.js.map +1 -1
  139. package/dist/commands/knowledge.d.ts.map +1 -1
  140. package/dist/commands/knowledge.js +7 -6
  141. package/dist/commands/knowledge.js.map +1 -1
  142. package/dist/commands/search.d.ts.map +1 -1
  143. package/dist/commands/search.js +11 -8
  144. package/dist/commands/search.js.map +1 -1
  145. package/dist/config.d.ts +1 -0
  146. package/dist/config.d.ts.map +1 -1
  147. package/dist/config.js +3 -2
  148. package/dist/config.js.map +1 -1
  149. package/dist/contract-overrides.d.ts +16 -4
  150. package/dist/contract-overrides.d.ts.map +1 -1
  151. package/dist/contract-overrides.js +86 -410
  152. package/dist/contract-overrides.js.map +1 -1
  153. package/dist/errors.d.ts.map +1 -1
  154. package/dist/errors.js +4 -0
  155. package/dist/errors.js.map +1 -1
  156. package/dist/google-api.d.ts.map +1 -1
  157. package/dist/google-api.js +4 -1
  158. package/dist/google-api.js.map +1 -1
  159. package/dist/identity.d.ts +4 -0
  160. package/dist/identity.d.ts.map +1 -1
  161. package/dist/identity.js +22 -0
  162. package/dist/identity.js.map +1 -1
  163. package/dist/knowledge.js +2 -2
  164. package/dist/knowledge.js.map +1 -1
  165. package/dist/login.d.ts.map +1 -1
  166. package/dist/login.js +2 -2
  167. package/dist/login.js.map +1 -1
  168. package/dist/program.d.ts.map +1 -1
  169. package/dist/program.js +8 -6
  170. package/dist/program.js.map +1 -1
  171. package/dist/reasons.d.ts.map +1 -1
  172. package/dist/reasons.js +0 -1
  173. package/dist/reasons.js.map +1 -1
  174. package/dist/store-transition.js +2 -2
  175. package/dist/store-transition.js.map +1 -1
  176. package/dist/store.d.ts.map +1 -1
  177. package/dist/store.js +7 -7
  178. package/dist/store.js.map +1 -1
  179. package/dist/tokens.d.ts +9 -2
  180. package/dist/tokens.d.ts.map +1 -1
  181. package/dist/tokens.js +18 -15
  182. package/dist/tokens.js.map +1 -1
  183. package/dist/version.d.ts +1 -1
  184. package/dist/version.js +1 -1
  185. package/dist/wcat.d.ts +3 -0
  186. package/dist/wcat.d.ts.map +1 -0
  187. package/dist/wcat.js +4 -0
  188. package/dist/wcat.js.map +1 -0
  189. package/package.json +7 -7
  190. package/dist/bundle/chunk-CGQRZRTH.js +0 -26
  191. package/dist/bundle/chunk-IKHOIXJR.js +0 -27
  192. package/dist/bundle/chunk-SBZB7HMU.js +0 -1055
  193. package/dist/bundle/command-contract-25E4PYMD.js +0 -40
  194. package/dist/bundle/dist-PY3MVR3G.js +0 -21
  195. package/dist/bundle/entry-HPLW4QL2.js +0 -25
  196. package/dist/bundle/first-run-RL3RKYZW.js +0 -30
  197. package/dist/bundle/first-screen-NX3TM2VJ.js +0 -38
  198. package/dist/bundle/google-DPD5N6AQ.js +0 -42
  199. package/dist/bundle/grants-TX4MHLI4.js +0 -109
  200. package/dist/bundle/oauth-6R7AWAES.js +0 -22
  201. package/dist/bundle/server-QD2MUJJZ.js +0 -72
  202. package/dist/bundle/store-maintenance-command-LETURZDC.js +0 -60
  203. package/dist/bundle/tokens-MTFJPTYT.js +0 -107
  204. /package/dist/bundle/{chunk-YVNHQFLC.js → chunk-HVJJWJYQ.js} +0 -0
@@ -6,21 +6,21 @@ import {
6
6
  answerSchema,
7
7
  describeOptions,
8
8
  metaOf
9
- } from "./chunk-SIWXYB4E.js";
9
+ } from "./chunk-5PLINHEY.js";
10
10
  import {
11
11
  keyForCommand
12
- } from "./chunk-F56DRBGY.js";
12
+ } from "./chunk-PKM55ZRR.js";
13
13
  import {
14
14
  jsonSchemaOf
15
- } from "./chunk-TOVWMURV.js";
15
+ } from "./chunk-VQKNKJYL.js";
16
16
  import {
17
17
  CliError
18
- } from "./chunk-ELJUBPY4.js";
18
+ } from "./chunk-IIHZTV6V.js";
19
19
  import {
20
20
  __name
21
21
  } from "./chunk-ZVVMGPBJ.js";
22
22
 
23
- // node_modules/.pnpm/@wirecat+cli-core@0.634.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_795ed7a67bda78d624888739490b3720/node_modules/@wirecat/cli-core/dist/cli/command-contract.js
23
+ // node_modules/.pnpm/@wirecat+cli-core@0.650.0_@wirecat+cli-base@0.98.0_commander@15.0.0_esbuild@0.28.2_type_7618ae642a1b316105e0e055c769f604/node_modules/@wirecat/cli-core/dist/cli/command-contract.js
24
24
  var SCHEMA_DIALECT = "https://json-schema.org/draft/2020-12/schema";
25
25
  var outputOf = /* @__PURE__ */ __name((command) => {
26
26
  const entity = answerEntitySchema(command);
@@ -4,18 +4,18 @@ import {
4
4
  readSharedSection,
5
5
  sharedConfigPath,
6
6
  writeSharedSection
7
- } from "./chunk-4Y5YBFMS.js";
7
+ } from "./chunk-HQBLJLYH.js";
8
8
  import {
9
9
  storePath
10
- } from "./chunk-UTNRBOEN.js";
10
+ } from "./chunk-3QFUDXMQ.js";
11
11
  import {
12
12
  CliError
13
- } from "./chunk-ELJUBPY4.js";
13
+ } from "./chunk-IIHZTV6V.js";
14
14
  import {
15
15
  __name
16
16
  } from "./chunk-ZVVMGPBJ.js";
17
17
 
18
- // node_modules/.pnpm/@wirecat+cli-core@0.634.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_795ed7a67bda78d624888739490b3720/node_modules/@wirecat/cli-core/dist/cli/setup-answers.js
18
+ // node_modules/.pnpm/@wirecat+cli-core@0.650.0_@wirecat+cli-base@0.98.0_commander@15.0.0_esbuild@0.28.2_type_7618ae642a1b316105e0e055c769f604/node_modules/@wirecat/cli-core/dist/cli/setup-answers.js
19
19
  var PERMISSION_ANSWERS = ["readonly", "allow"];
20
20
  var QUESTIONS = ["languages", "tools", "permissions"];
21
21
  var SECTION = "setup";
@@ -4,7 +4,7 @@ import {
4
4
  __name
5
5
  } from "./chunk-ZVVMGPBJ.js";
6
6
 
7
- // node_modules/.pnpm/@wirecat+cli-core@0.634.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_795ed7a67bda78d624888739490b3720/node_modules/@wirecat/cli-core/dist/runs/secrets.js
7
+ // node_modules/.pnpm/@wirecat+cli-core@0.650.0_@wirecat+cli-base@0.98.0_commander@15.0.0_esbuild@0.28.2_type_7618ae642a1b316105e0e055c769f604/node_modules/@wirecat/cli-core/dist/runs/secrets.js
8
8
  var SECRET_WORDS = /* @__PURE__ */ new Set([
9
9
  "authorization",
10
10
  "cookie",
@@ -47,6 +47,7 @@ var KNOWN_TOKENS = new RegExp(`${[
47
47
  "npm_[A-Za-z0-9]{36}",
48
48
  "eyJ[A-Za-z0-9_-]{5,}\\.eyJ[A-Za-z0-9_-]{5,}\\.[A-Za-z0-9_-]*"
49
49
  ].map((pattern) => `${START}${pattern}${END}`).join("|")}|(?<!\\d)\\d{8,10}:[A-Za-z0-9_-]{35}${END}`, "g");
50
+ var WEBHOOK_PATH = /(\/rest\/\d+\/)[^/\s?#"']+/g;
50
51
  var PRIVATE_KEY = /-----BEGIN[A-Z ]* PRIVATE KEY-----[\s\S]*?(?:-----END[A-Z ]* PRIVATE KEY-----|$)/g;
51
52
  var SCHEME = /(?<![A-Za-z])(Bearer|Basic)(\s+)(?![A-Z]?[a-z]+(?![A-Za-z0-9]))[A-Za-z0-9._~+/=-]{8,}/g;
52
53
  var NAMED_PAIR = /(?<![\p{L}\p{N}])([\p{L}\p{N}_.-]*(?:token|pass|pwd|pin|otp|2fa|secret|credential|cookie|authorization|key|contrase|clave|пароль|пин|код)[\p{L}\p{N}_.-]*)(["']?\s*(?:=>|[:=])\s*["']?|\s+(?![\p{L}]+(?![\p{L}\p{N}])))((?:Bearer\s+|Basic\s+)?)([^\s"'&,;]+)/giu;
@@ -79,7 +80,7 @@ var entropy = /* @__PURE__ */ __name((text) => {
79
80
  bits -= count / text.length * Math.log2(count / text.length);
80
81
  return bits;
81
82
  }, "entropy");
82
- var withoutSecrets = /* @__PURE__ */ __name((text, mark = "[redacted]") => text.replace(PRIVATE_KEY, mark).replace(KNOWN_TOKENS, mark).replace(SCHEME, `$1$2${mark}`).replace(NAMED_PAIR, (whole, name, separator, scheme) => secretNamed(name) ? `${name}${separator}${scheme}${mark}` : whole).replace(/[!-~]{20,}/g, (token) => (
83
+ var withoutSecrets = /* @__PURE__ */ __name((text, mark = "[redacted]") => text.replace(WEBHOOK_PATH, `$1${mark}`).replace(PRIVATE_KEY, mark).replace(KNOWN_TOKENS, mark).replace(SCHEME, `$1$2${mark}`).replace(NAMED_PAIR, (whole, name, separator, scheme) => secretNamed(name) ? `${name}${separator}${scheme}${mark}` : whole).replace(/[!-~]{20,}/g, (token) => (
83
84
  // A URL or a path is somebody's address, not a key; a credential in one is caught by the rules above.
84
85
  token.includes("://") || /^(?:\/|~\/|\.\.?\/)/.test(token) ? token : token.replace(RUN, (run) => looksRandom(run) ? mark : run.replace(HEX, (hex) => entropy(hex) >= 3 ? mark : hex))
85
86
  )), "withoutSecrets");
@@ -2,7 +2,7 @@ import { createRequire as __bundleRequire } from "node:module";
2
2
  const require = __bundleRequire(import.meta.url);
3
3
  import {
4
4
  defineReasons
5
- } from "./chunk-TOVWMURV.js";
5
+ } from "./chunk-VQKNKJYL.js";
6
6
 
7
7
  // dist/reasons.js
8
8
  var ENTRIES = [
@@ -57,7 +57,6 @@ var ENTRIES = [
57
57
  ],
58
58
  ["policy.unknown-key", "configuration_error", "permission {permission} names no drive command", ["permission"]],
59
59
  ["profile.busy", "provider_unavailable", "another drive command holds this profile; retry later"],
60
- ["profile.unknown", "validation_error", "no such profile here; see the profiles listed", ["profiles"]],
61
60
  ["profile.conflict", "validation_error", "name the profiles once: a profile word or --profiles, not both"],
62
61
  ["profile.required", "validation_error", "choose a profile: drive <profile> <command>", ["profiles"]],
63
62
  [
@@ -4,7 +4,7 @@ import {
4
4
  __name
5
5
  } from "./chunk-ZVVMGPBJ.js";
6
6
 
7
- // node_modules/.pnpm/@wirecat+cli-core@0.634.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_795ed7a67bda78d624888739490b3720/node_modules/@wirecat/cli-core/dist/cli/stdin-field.js
7
+ // node_modules/.pnpm/@wirecat+cli-core@0.650.0_@wirecat+cli-base@0.98.0_commander@15.0.0_esbuild@0.28.2_type_7618ae642a1b316105e0e055c769f604/node_modules/@wirecat/cli-core/dist/cli/stdin-field.js
8
8
  var fields = /* @__PURE__ */ new WeakMap();
9
9
  var readsStdin = /* @__PURE__ */ __name((command, field) => {
10
10
  fields.set(command, field);
@@ -2,15 +2,15 @@ import { createRequire as __bundleRequire } from "node:module";
2
2
  const require = __bundleRequire(import.meta.url);
3
3
  import {
4
4
  PRAGMAS
5
- } from "./chunk-VDZY3L7U.js";
5
+ } from "./chunk-FA2TNA5X.js";
6
6
  import {
7
7
  CliError
8
- } from "./chunk-ELJUBPY4.js";
8
+ } from "./chunk-IIHZTV6V.js";
9
9
  import {
10
10
  __name
11
11
  } from "./chunk-ZVVMGPBJ.js";
12
12
 
13
- // node_modules/.pnpm/@wirecat+cli-core@0.634.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_795ed7a67bda78d624888739490b3720/node_modules/@wirecat/cli-core/dist/store/sqlite-warning.js
13
+ // node_modules/.pnpm/@wirecat+cli-core@0.650.0_@wirecat+cli-base@0.98.0_commander@15.0.0_esbuild@0.28.2_type_7618ae642a1b316105e0e055c769f604/node_modules/@wirecat/cli-core/dist/store/sqlite-warning.js
14
14
  var SQLITE_WARNING = "SQLite is an experimental feature";
15
15
  var quieted = /* @__PURE__ */ new WeakSet();
16
16
  var quietSqliteWarning = /* @__PURE__ */ __name((host = process) => {
@@ -31,7 +31,7 @@ var isSqliteWarning = /* @__PURE__ */ __name((warning, options) => {
31
31
  return name === "ExperimentalWarning" && message.startsWith(SQLITE_WARNING);
32
32
  }, "isSqliteWarning");
33
33
 
34
- // node_modules/.pnpm/@wirecat+cli-core@0.634.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_795ed7a67bda78d624888739490b3720/node_modules/@wirecat/cli-core/dist/store/open.js
34
+ // node_modules/.pnpm/@wirecat+cli-core@0.650.0_@wirecat+cli-base@0.98.0_commander@15.0.0_esbuild@0.28.2_type_7618ae642a1b316105e0e055c769f604/node_modules/@wirecat/cli-core/dist/store/open.js
35
35
  var openCache = /* @__PURE__ */ __name(async (path) => {
36
36
  const database = await openFile(path);
37
37
  try {
@@ -44,12 +44,12 @@ var openCache = /* @__PURE__ */ __name(async (path) => {
44
44
  }, "openCache");
45
45
  var openFile = /* @__PURE__ */ __name((path) => "Bun" in globalThis ? openUnderBun(path) : openUnderNode(path), "openFile");
46
46
  var openUnderBun = /* @__PURE__ */ __name(async (path) => {
47
- const { openWithBunSqlite } = await import("./bun-sqlite-TND5ZRJH.js");
47
+ const { openWithBunSqlite } = await import("./bun-sqlite-H6IAXQXI.js");
48
48
  return await openWithBunSqlite(path);
49
49
  }, "openUnderBun");
50
50
  var openUnderNode = /* @__PURE__ */ __name(async (path) => {
51
51
  quietSqliteWarning();
52
- const { openWithNodeSqlite } = await import("./node-sqlite-S74XVVHL.js");
52
+ const { openWithNodeSqlite } = await import("./node-sqlite-LINBOAWK.js");
53
53
  return openWithNodeSqlite(path);
54
54
  }, "openUnderNode");
55
55
  var runtime = /* @__PURE__ */ __name(() => {
@@ -2,7 +2,7 @@ import { createRequire as __bundleRequire } from "node:module";
2
2
  const require = __bundleRequire(import.meta.url);
3
3
  import {
4
4
  errorCodes
5
- } from "./chunk-ELJUBPY4.js";
5
+ } from "./chunk-IIHZTV6V.js";
6
6
  import {
7
7
  __name
8
8
  } from "./chunk-ZVVMGPBJ.js";
@@ -1306,7 +1306,7 @@ function unwrap(schema) {
1306
1306
  }
1307
1307
  __name(unwrap, "unwrap");
1308
1308
 
1309
- // node_modules/.pnpm/@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/standards/effects.js
1309
+ // node_modules/.pnpm/@wirecat+cli-base@0.98.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/standards/effects.js
1310
1310
  var EFFECT_LEVELS = ["none", "read", "write"];
1311
1311
  var effectsSchema = strictObject({
1312
1312
  remote: picklist(EFFECT_LEVELS),
@@ -1943,7 +1943,7 @@ function toStandardJsonSchema(schema) {
1943
1943
  }
1944
1944
  __name(toStandardJsonSchema, "toStandardJsonSchema");
1945
1945
 
1946
- // node_modules/.pnpm/@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/standards/registry.js
1946
+ // node_modules/.pnpm/@wirecat+cli-base@0.98.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/standards/registry.js
1947
1947
  var word = pipe(string(), regex(/^[a-z][a-z0-9]*(-[a-z0-9]+)*$/, "a lower-case word, words joined by -"));
1948
1948
  var SNAKE_CASE = /^[a-z][a-z0-9]*(_[a-z0-9]+)*$/;
1949
1949
  var text = pipe(string(), regex(/\S/, "must not be empty"));
@@ -1985,7 +1985,7 @@ var fill = /* @__PURE__ */ __name((template, values) => template.replace(PLACEHO
1985
1985
  return String(value);
1986
1986
  }), "fill");
1987
1987
 
1988
- // node_modules/.pnpm/@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/standards/output.js
1988
+ // node_modules/.pnpm/@wirecat+cli-base@0.98.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/standards/output.js
1989
1989
  var MAX_NEXT_STEPS = 2;
1990
1990
  var COMPACT_FLAG = "--compact";
1991
1991
  var isoTime = pipe(string(), isoTimestamp("an ISO 8601 time in UTC"), endsWith("Z", "an ISO 8601 time in UTC, ending in `Z`"));
@@ -2048,6 +2048,20 @@ var issueSchema = strictObject({
2048
2048
  /** The account, provider or source that is missing from the answer. */
2049
2049
  source: text
2050
2050
  });
2051
+ var rankingSchema = strictObject({
2052
+ applied: boolean(),
2053
+ reason_id: optional(dottedId),
2054
+ provider: text,
2055
+ model: text,
2056
+ endpoint: text,
2057
+ sent: pipe(number(), integer(), minValue(0)),
2058
+ cost_usd: nullable(pipe(number(), minValue(0))),
2059
+ usage: optional(strictObject({
2060
+ input: pipe(number(), integer(), minValue(0)),
2061
+ output: pipe(number(), integer(), minValue(0))
2062
+ })),
2063
+ ms: pipe(number(), integer(), minValue(0))
2064
+ });
2051
2065
  var metaSchema = strictObject({
2052
2066
  run_id: text,
2053
2067
  duration_ms: pipe(number(), integer(), minValue(0)),
@@ -2059,7 +2073,8 @@ var metaSchema = strictObject({
2059
2073
  /** When the command answered, for an agent that plans from "now" (WC-TIME-7); `timezone` names the zone of `now_local`. */
2060
2074
  now: optional(isoTime),
2061
2075
  now_local: optional(localTime),
2062
- window: optional(strictObject({ since: optional(isoTime), until: optional(isoTime) }))
2076
+ window: optional(strictObject({ since: optional(isoTime), until: optional(isoTime) })),
2077
+ ranking: optional(rankingSchema)
2063
2078
  });
2064
2079
  var offsetOf = /* @__PURE__ */ __name((at, zone) => {
2065
2080
  const name = new Intl.DateTimeFormat("en-US", { timeZone: zone, timeZoneName: "longOffset" }).formatToParts(at).find((part) => part.type === "timeZoneName")?.value ?? "GMT";
@@ -2097,7 +2112,7 @@ var jsonlOf = /* @__PURE__ */ __name(({ items, page, meta }) => [
2097
2112
  JSON.stringify({ type: "end", complete: meta.complete, ...meta.issues ? { issues: meta.issues } : {}, page })
2098
2113
  ].join("\n"), "jsonlOf");
2099
2114
 
2100
- // node_modules/.pnpm/@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/standards/errors.js
2115
+ // node_modules/.pnpm/@wirecat+cli-base@0.98.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/standards/errors.js
2101
2116
  var CRASH_CODE = "internal_error";
2102
2117
  var CRASH_REASON = "command.crashed";
2103
2118
  var errorObjectSchema = strictObject({
@@ -2190,7 +2205,7 @@ var BASE_REASONS = defineReasons([
2190
2205
  { reason: CRASH_REASON, code: CRASH_CODE, message: "the command failed; this is a bug", details: [] }
2191
2206
  ]);
2192
2207
 
2193
- // node_modules/.pnpm/@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/standards/steps.js
2208
+ // node_modules/.pnpm/@wirecat+cli-base@0.98.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/standards/steps.js
2194
2209
  var SAME_COMMAND = "*";
2195
2210
  var commandPath = pipe(string(), regex(/^[a-z][a-z0-9-]*( [a-z][a-z0-9-]*)*$/, "a command path such as `messages sync`"));
2196
2211
  var stepSchema = union([
@@ -3,27 +3,35 @@ const require = __bundleRequire(import.meta.url);
3
3
  import {
4
4
  activeProfile,
5
5
  paths
6
- } from "./chunk-ZR2EJPMQ.js";
6
+ } from "./chunk-M7543RUJ.js";
7
7
  import {
8
8
  READ_SCOPE,
9
- WRITE_SCOPE,
10
- providerRequest
11
- } from "./chunk-NQ5XMSLA.js";
9
+ WRITE_SCOPE
10
+ } from "./chunk-NYECVHFH.js";
12
11
  import {
13
12
  googleError
14
- } from "./chunk-NQRTKYJB.js";
13
+ } from "./chunk-5K54RZBK.js";
14
+ import {
15
+ providerRequest
16
+ } from "./chunk-4UHBJSMI.js";
15
17
  import {
16
18
  withTimeLimit
17
- } from "./chunk-FBHSWQU7.js";
19
+ } from "./chunk-WYTYHUFH.js";
18
20
  import {
19
21
  acquireLock
20
- } from "./chunk-EU5MD24W.js";
22
+ } from "./chunk-QSELSDWE.js";
23
+ import {
24
+ hostFetch
25
+ } from "./chunk-GY4DAJSK.js";
26
+ import {
27
+ DESKTOP
28
+ } from "./chunk-YTIPTHEE.js";
21
29
  import {
22
30
  Credentials,
23
31
  isMovedRun,
24
32
  keyringService,
25
33
  systemKeyring
26
- } from "./chunk-7AQGVX5O.js";
34
+ } from "./chunk-6X3KUFRQ.js";
27
35
  import {
28
36
  minLength,
29
37
  nullable,
@@ -33,16 +41,16 @@ import {
33
41
  pipe,
34
42
  safeParse,
35
43
  string
36
- } from "./chunk-TOVWMURV.js";
44
+ } from "./chunk-VQKNKJYL.js";
37
45
  import {
38
46
  CliError,
39
47
  isCliError
40
- } from "./chunk-ELJUBPY4.js";
48
+ } from "./chunk-IIHZTV6V.js";
41
49
  import {
42
50
  __name
43
51
  } from "./chunk-ZVVMGPBJ.js";
44
52
 
45
- // node_modules/.pnpm/@wirecat+cli-core@0.634.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_795ed7a67bda78d624888739490b3720/node_modules/@wirecat/cli-core/dist/oauth/authorize.js
53
+ // node_modules/.pnpm/@wirecat+cli-core@0.650.0_@wirecat+cli-base@0.98.0_commander@15.0.0_esbuild@0.28.2_type_7618ae642a1b316105e0e055c769f604/node_modules/@wirecat/cli-core/dist/oauth/authorize.js
46
54
  import { createHash, randomBytes } from "node:crypto";
47
55
  import { createServer } from "node:http";
48
56
  var DEFAULT_TIMEOUT_MS = 3e5;
@@ -178,12 +186,12 @@ var authorize = /* @__PURE__ */ __name(async (options) => {
178
186
  }
179
187
  }, "authorize");
180
188
 
181
- // node_modules/.pnpm/@wirecat+cli-core@0.634.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_795ed7a67bda78d624888739490b3720/node_modules/@wirecat/cli-core/dist/oauth/keeper.js
189
+ // node_modules/.pnpm/@wirecat+cli-core@0.650.0_@wirecat+cli-base@0.98.0_commander@15.0.0_esbuild@0.28.2_type_7618ae642a1b316105e0e055c769f604/node_modules/@wirecat/cli-core/dist/oauth/keeper.js
182
190
  import { createHash as createHash2 } from "node:crypto";
183
191
  import { join } from "node:path";
184
192
  import { setTimeout as delay } from "node:timers/promises";
185
193
 
186
- // node_modules/.pnpm/@wirecat+cli-core@0.634.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_795ed7a67bda78d624888739490b3720/node_modules/@wirecat/cli-core/dist/oauth/requests.js
194
+ // node_modules/.pnpm/@wirecat+cli-core@0.650.0_@wirecat+cli-base@0.98.0_commander@15.0.0_esbuild@0.28.2_type_7618ae642a1b316105e0e055c769f604/node_modules/@wirecat/cli-core/dist/oauth/requests.js
187
195
  var REQUEST_LIMIT_MS = 3e4;
188
196
  var TOKEN_LOG_EVENT = "oauth.token";
189
197
  var object2 = /* @__PURE__ */ __name((value) => {
@@ -303,7 +311,7 @@ var revokeToken = /* @__PURE__ */ __name(async (provider, tokens, context) => {
303
311
  });
304
312
  }, "revokeToken");
305
313
 
306
- // node_modules/.pnpm/@wirecat+cli-core@0.634.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_795ed7a67bda78d624888739490b3720/node_modules/@wirecat/cli-core/dist/oauth/keeper.js
314
+ // node_modules/.pnpm/@wirecat+cli-core@0.650.0_@wirecat+cli-base@0.98.0_commander@15.0.0_esbuild@0.28.2_type_7618ae642a1b316105e0e055c769f604/node_modules/@wirecat/cli-core/dist/oauth/keeper.js
307
315
  var inFlight = /* @__PURE__ */ new Map();
308
316
  var refreshedInMemory = /* @__PURE__ */ new Map();
309
317
  var tokenKeeper = /* @__PURE__ */ __name((options) => {
@@ -328,7 +336,7 @@ var tokenKeeper = /* @__PURE__ */ __name((options) => {
328
336
  }), "context");
329
337
  const exchange = /* @__PURE__ */ __name((params, ctx) => provider.exchange ? provider.exchange(params, ctx) : requestTokens(provider, params, ctx), "exchange");
330
338
  const notSignedIn = /* @__PURE__ */ __name(() => new CliError("authentication_error", `not signed in to ${provider.name}; run ${options.signInCommand}`, {
331
- reason: "oauth.missing"
339
+ reason: "session.missing"
332
340
  }), "notSignedIn");
333
341
  const busy = /* @__PURE__ */ __name((error) => isCliError(error) && error.details.reason === "file.locked", "busy");
334
342
  const acquire = /* @__PURE__ */ __name(async () => {
@@ -465,7 +473,24 @@ var tokenKeeper = /* @__PURE__ */ __name((options) => {
465
473
  };
466
474
  }, "tokenKeeper");
467
475
 
468
- // node_modules/.pnpm/@wirecat+cli-core@0.634.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_795ed7a67bda78d624888739490b3720/node_modules/@wirecat/cli-core/dist/oauth/storage.js
476
+ // node_modules/.pnpm/@wirecat+cli-core@0.650.0_@wirecat+cli-base@0.98.0_commander@15.0.0_esbuild@0.28.2_type_7618ae642a1b316105e0e055c769f604/node_modules/@wirecat/cli-core/dist/oauth/provider.js
477
+ var googleProvider = /* @__PURE__ */ __name((client, { loginHint } = {}) => ({
478
+ id: "google",
479
+ name: "Google",
480
+ authorizeUrl: "https://accounts.google.com/o/oauth2/v2/auth",
481
+ tokenUrl: "https://oauth2.googleapis.com/token",
482
+ revokeUrl: "https://oauth2.googleapis.com/revoke",
483
+ client,
484
+ redirect: { kind: "loopback" },
485
+ // Without offline access Google returns no refresh token; without consent it does not return one again.
486
+ authorizeParams: {
487
+ access_type: "offline",
488
+ prompt: "select_account consent",
489
+ ...loginHint ? { login_hint: loginHint } : {}
490
+ }
491
+ }), "googleProvider");
492
+
493
+ // node_modules/.pnpm/@wirecat+cli-core@0.650.0_@wirecat+cli-base@0.98.0_commander@15.0.0_esbuild@0.28.2_type_7618ae642a1b316105e0e055c769f604/node_modules/@wirecat/cli-core/dist/oauth/storage.js
469
494
  var invalid = /* @__PURE__ */ __name(() => new CliError("authentication_error", "the saved sign-in cannot be read; sign in again", { reason: "oauth.invalid" }), "invalid");
470
495
  var parse = /* @__PURE__ */ __name((raw) => {
471
496
  let value;
@@ -490,6 +515,44 @@ var previousOf = /* @__PURE__ */ __name((raw) => {
490
515
  }
491
516
  }, "previousOf");
492
517
  var defined = /* @__PURE__ */ __name((value) => Object.fromEntries(Object.entries(value).filter(([, field]) => field !== void 0)), "defined");
518
+ var standardCodec = /* @__PURE__ */ __name((providerId) => ({
519
+ decode: /* @__PURE__ */ __name((raw) => {
520
+ const value = parse(raw);
521
+ const refreshToken = text(value.refreshToken);
522
+ const clientId = text(value.clientId);
523
+ if (value.version !== 1 || value.provider !== providerId || !refreshToken || !clientId)
524
+ throw invalid();
525
+ if (!Array.isArray(value.scopes) || !value.scopes.every((scope) => typeof scope === "string"))
526
+ throw invalid();
527
+ const source = text(value.clientSource);
528
+ return {
529
+ client: defined({ clientId, clientSecret: text(value.clientSecret), source }),
530
+ tokens: defined({
531
+ accessToken: text(value.accessToken),
532
+ refreshToken,
533
+ expiresAt: finite(value.expiresAt),
534
+ scopes: value.scopes,
535
+ tokenType: text(value.tokenType)
536
+ })
537
+ };
538
+ }, "decode"),
539
+ encode: /* @__PURE__ */ __name(({ tokens, client, previous, extra }) => JSON.stringify(defined({
540
+ ...previousOf(previous),
541
+ ...extra,
542
+ version: 1,
543
+ provider: providerId,
544
+ clientId: client.clientId,
545
+ // Only WireCat's secret, which is public: a later release may ship another default app, and a refresh needs
546
+ // the secret of the app that signed in. An owner's own secret stays where the owner keeps it.
547
+ clientSecret: client.source === "constants" ? client.clientSecret : void 0,
548
+ clientSource: client.source,
549
+ accessToken: tokens.accessToken,
550
+ refreshToken: tokens.refreshToken,
551
+ expiresAt: tokens.expiresAt,
552
+ scopes: tokens.scopes,
553
+ tokenType: tokens.tokenType
554
+ })), "encode")
555
+ }), "standardCodec");
493
556
  var driveSessionCodec = {
494
557
  decode: /* @__PURE__ */ __name((raw) => {
495
558
  const value = parse(raw);
@@ -539,6 +602,7 @@ var driveSessionCodec = {
539
602
  return JSON.stringify(session);
540
603
  }, "encode")
541
604
  };
605
+ var googleStandard = standardCodec("google");
542
606
  var keyringFailure = /* @__PURE__ */ __name((thrown, secret) => {
543
607
  const failure = new CliError("configuration_error", "could not reach the saved sign-in; use an available keyring or file storage", { reason: "oauth.not-saved" });
544
608
  const words = thrown instanceof Error ? thrown.message : String(thrown);
@@ -616,6 +680,14 @@ var Session = object({
616
680
  token_type: optional(nullable(string()))
617
681
  })
618
682
  });
683
+ var viaDeclaredHosts = /* @__PURE__ */ __name((timeoutMs) => (input, init) => hostFetch({ hosts: DESKTOP.hosts, ...timeoutMs ? { timeoutMs } : {} })(input, init), "viaDeclaredHosts");
684
+ var googleFetch = viaDeclaredHosts();
685
+ var sdkFetch = viaDeclaredHosts(24 * 60 * 6e4);
686
+ var transporterOptions = /* @__PURE__ */ __name((signal) => ({
687
+ timeout: 3e4,
688
+ fetchImplementation: sdkFetch,
689
+ ...signal ? { signal } : {}
690
+ }), "transporterOptions");
619
691
  var credentialOptions = /* @__PURE__ */ __name((env, storage, keyring) => ({
620
692
  configDir: paths(env).config,
621
693
  service: "drive-cli",
@@ -634,17 +706,6 @@ var saveSession = /* @__PURE__ */ __name((env, name, session, storage, keyring)
634
706
  throw notSaved();
635
707
  }
636
708
  }, "saveSession");
637
- var googleProvider = /* @__PURE__ */ __name((client) => ({
638
- id: "google",
639
- name: "Google",
640
- authorizeUrl: "https://accounts.google.com/o/oauth2/v2/auth",
641
- tokenUrl: "https://oauth2.googleapis.com/token",
642
- revokeUrl: "https://oauth2.googleapis.com/revoke",
643
- client,
644
- redirect: { kind: "loopback" },
645
- // Without offline access Google returns no refresh token; without consent it does not return one again.
646
- authorizeParams: { access_type: "offline", prompt: "select_account consent" }
647
- }), "googleProvider");
648
709
  var sessionKeeper = /* @__PURE__ */ __name((options) => tokenKeeper({
649
710
  provider: googleProvider(options.client),
650
711
  storage: credentialStorage({
@@ -653,7 +714,7 @@ var sessionKeeper = /* @__PURE__ */ __name((options) => tokenKeeper({
653
714
  codec: driveSessionCodec
654
715
  }),
655
716
  lockDir: paths(options.env).config,
656
- fetch: options.fetch ?? globalThis.fetch,
717
+ fetch: options.fetch ?? googleFetch,
657
718
  signInCommand: `drive ${options.name} session start`,
658
719
  // Above the client's own 5-minute early refresh, so a token it asks to replace is replaced.
659
720
  freshForMs: 6 * 6e4,
@@ -672,7 +733,7 @@ var authorizedClient = /* @__PURE__ */ __name((env, name, keyring, signal) => {
672
733
  }
673
734
  if (!secret)
674
735
  throw new CliError("authentication_error", `this profile has no saved Google sign-in \u2014 run drive ${name} session start`, {
675
- reason: "oauth.missing"
736
+ reason: "session.missing"
676
737
  });
677
738
  let parsed;
678
739
  try {
@@ -696,7 +757,7 @@ var authorizedClient = /* @__PURE__ */ __name((env, name, keyring, signal) => {
696
757
  const client = new OAuth2Client({
697
758
  clientId: session.clientId,
698
759
  clientSecret: session.clientSecret,
699
- transporterOptions: { timeout: 3e4, ...signal ? { signal } : {} }
760
+ transporterOptions: transporterOptions(signal)
700
761
  });
701
762
  client.refreshHandler = async () => {
702
763
  try {
@@ -807,10 +868,11 @@ var observeRequests = /* @__PURE__ */ __name((client) => {
807
868
  }, "observeRequests");
808
869
 
809
870
  export {
871
+ googleFetch,
872
+ transporterOptions,
810
873
  credentials,
811
874
  notSaved,
812
875
  saveSession,
813
- googleProvider,
814
876
  sessionKeeper,
815
877
  authorizedClient,
816
878
  covers,