@wirecat/drive-cli 0.43.0 → 0.45.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 +1 -1
  2. package/dist/bin/drive.js +35 -40
  3. package/dist/bundle/all-profiles-LTHNCWQW.js +26 -0
  4. package/dist/bundle/anthropic-NOJEF3V2.js +71 -0
  5. package/dist/bundle/bun-ADJVI4HY.js +169 -0
  6. package/dist/bundle/bun-sqlite-GNXLBF2A.js +70 -0
  7. package/dist/bundle/chunk-2FTZBZOB.js +2315 -0
  8. package/dist/bundle/chunk-2YU3CXFD.js +3391 -0
  9. package/dist/bundle/chunk-35GRI4DI.js +375 -0
  10. package/dist/bundle/chunk-37MAA6F2.js +5624 -0
  11. package/dist/bundle/chunk-3V6NPZY7.js +2352 -0
  12. package/dist/bundle/chunk-4TIC23D2.js +9 -0
  13. package/dist/bundle/chunk-4TQSNQVV.js +1071 -0
  14. package/dist/bundle/chunk-4UE7AVHZ.js +150 -0
  15. package/dist/bundle/chunk-5DPV7X27.js +663 -0
  16. package/dist/bundle/chunk-5FONRUG6.js +24805 -0
  17. package/dist/bundle/chunk-5ZVLM6YR.js +19 -0
  18. package/dist/bundle/chunk-64WJYT2F.js +3954 -0
  19. package/dist/bundle/chunk-65GGKAQ7.js +82 -0
  20. package/dist/bundle/chunk-66N2DGGC.js +515 -0
  21. package/dist/bundle/chunk-6KFA6HOM.js +2941 -0
  22. package/dist/bundle/chunk-6Y2BYFXQ.js +65 -0
  23. package/dist/bundle/chunk-7NCG2SHR.js +74 -0
  24. package/dist/bundle/chunk-7PVNJAQ2.js +73 -0
  25. package/dist/bundle/chunk-7XWUOCGW.js +190 -0
  26. package/dist/bundle/chunk-A6ZKTNTZ.js +168 -0
  27. package/dist/bundle/chunk-ADLS6FVG.js +24600 -0
  28. package/dist/bundle/chunk-AH3SNVCV.js +498 -0
  29. package/dist/bundle/chunk-AN3GVZTU.js +76 -0
  30. package/dist/bundle/chunk-BPBIBVFH.js +166 -0
  31. package/dist/bundle/chunk-C4XP5T73.js +264 -0
  32. package/dist/bundle/chunk-C6SMAEED.js +18102 -0
  33. package/dist/bundle/chunk-CDI67JSB.js +1092 -0
  34. package/dist/bundle/chunk-CEO5HPRL.js +25 -0
  35. package/dist/bundle/chunk-CFT7UHF6.js +15572 -0
  36. package/dist/bundle/chunk-DC4T3FNP.js +1913 -0
  37. package/dist/bundle/chunk-DCTXOMOR.js +35 -0
  38. package/dist/bundle/chunk-DFDN6AUB.js +21 -0
  39. package/dist/bundle/chunk-EVWXODYV.js +754 -0
  40. package/dist/bundle/chunk-GKHM6I64.js +2356 -0
  41. package/dist/bundle/chunk-GNI7INK6.js +18 -0
  42. package/dist/bundle/chunk-GTYY6BIE.js +58 -0
  43. package/dist/bundle/chunk-GX4WEMAG.js +164 -0
  44. package/dist/bundle/chunk-HA3WCVGY.js +8179 -0
  45. package/dist/bundle/chunk-HLONHTSG.js +281 -0
  46. package/dist/bundle/chunk-HOIUIKWS.js +236 -0
  47. package/dist/bundle/chunk-HTQTIKWP.js +928 -0
  48. package/dist/bundle/chunk-I5EJHKNC.js +111 -0
  49. package/dist/bundle/chunk-ICKNJIGE.js +31 -0
  50. package/dist/bundle/chunk-IGB5CJCA.js +62 -0
  51. package/dist/bundle/chunk-IP4OK7RQ.js +24 -0
  52. package/dist/bundle/chunk-IVQ6342B.js +2 -0
  53. package/dist/bundle/chunk-K4N2DKE5.js +17 -0
  54. package/dist/bundle/chunk-LNB7BIZL.js +844 -0
  55. package/dist/bundle/chunk-LVDHWNJF.js +193 -0
  56. package/dist/bundle/chunk-LW2G4U6W.js +570 -0
  57. package/dist/bundle/chunk-LWT55XC5.js +60 -0
  58. package/dist/bundle/chunk-LY26NW3I.js +6848 -0
  59. package/dist/bundle/chunk-MJR2OTO4.js +1714 -0
  60. package/dist/bundle/chunk-MWUITL6N.js +42 -0
  61. package/dist/bundle/chunk-N47CYWEM.js +454 -0
  62. package/dist/bundle/chunk-NKZ6V4JW.js +263 -0
  63. package/dist/bundle/chunk-NQ6LLDDC.js +161 -0
  64. package/dist/bundle/chunk-NZIHPYY5.js +215 -0
  65. package/dist/bundle/chunk-OECPFZLP.js +3541 -0
  66. package/dist/bundle/chunk-P5KGFT7U.js +18 -0
  67. package/dist/bundle/chunk-PDH2QQQV.js +484 -0
  68. package/dist/bundle/chunk-PIN5RZ3D.js +63 -0
  69. package/dist/bundle/chunk-PJDO7AFZ.js +421 -0
  70. package/dist/bundle/chunk-PWKXHDBQ.js +18078 -0
  71. package/dist/bundle/chunk-QLZGLPJL.js +100 -0
  72. package/dist/bundle/chunk-SBZB7HMU.js +1055 -0
  73. package/dist/bundle/chunk-SGOPYPVW.js +835 -0
  74. package/dist/bundle/chunk-TDC6JGDA.js +630 -0
  75. package/dist/bundle/chunk-TOYPN2XX.js +288 -0
  76. package/dist/bundle/chunk-UC44ZMQV.js +78 -0
  77. package/dist/bundle/chunk-V7GN5BI7.js +99 -0
  78. package/dist/bundle/chunk-VO4KOLQZ.js +119 -0
  79. package/dist/bundle/chunk-WPGCDWPU.js +1855 -0
  80. package/dist/bundle/chunk-WQMVSQPP.js +886 -0
  81. package/dist/bundle/chunk-WZUJKUBK.js +384 -0
  82. package/dist/bundle/chunk-X5DFDGWS.js +2 -0
  83. package/dist/bundle/chunk-XFLCVHSQ.js +50 -0
  84. package/dist/bundle/chunk-XPEWOPJR.js +431 -0
  85. package/dist/bundle/chunk-Y5E2WNWB.js +35 -0
  86. package/dist/bundle/chunk-Y5EJSZXV.js +220 -0
  87. package/dist/bundle/chunk-YE3J6DLY.js +106 -0
  88. package/dist/bundle/chunk-YFLKH3NZ.js +48 -0
  89. package/dist/bundle/chunk-YJX4X564.js +138 -0
  90. package/dist/bundle/chunk-YJZBJ2TM.js +71 -0
  91. package/dist/bundle/chunk-Z4O6C7WR.js +1973 -0
  92. package/dist/bundle/chunk-ZIHLE7LG.js +15992 -0
  93. package/dist/bundle/chunk-ZPMLLONT.js +1054 -0
  94. package/dist/bundle/chunk-ZQNXKWUY.js +35584 -0
  95. package/dist/bundle/chunk-ZS635F4O.js +45 -0
  96. package/dist/bundle/chunk-ZU732VCC.js +122 -0
  97. package/dist/bundle/chunk-ZVVMGPBJ.js +50 -0
  98. package/dist/bundle/command-contract-HX35D7KV.js +38 -0
  99. package/dist/bundle/dist-MWTMOYWT.js +7577 -0
  100. package/dist/bundle/dist-PY3MVR3G.js +21 -0
  101. package/dist/bundle/drive.js +50 -0
  102. package/dist/bundle/echarts-RFTK737T.js +42501 -0
  103. package/dist/bundle/embed-5NAGJUMD.js +37 -0
  104. package/dist/bundle/embedder-EWXLIGBY.js +110 -0
  105. package/dist/bundle/entry-YCPJ6H6U.js +15 -0
  106. package/dist/bundle/failure-XBWHHBEW.js +37 -0
  107. package/dist/bundle/first-run-LNAZDBB4.js +24 -0
  108. package/dist/bundle/first-screen-P5NNFJD7.js +36 -0
  109. package/dist/bundle/google-5FFKRHHC.js +32 -0
  110. package/dist/bundle/google-api-TJCFOOAP.js +82 -0
  111. package/dist/bundle/identity-53ZMPL2O.js +10 -0
  112. package/dist/bundle/instructions-FHNL7CMW.js +9 -0
  113. package/dist/bundle/login-VXXZZR6G.js +158 -0
  114. package/dist/bundle/mcp-2CJCJXSW.js +95 -0
  115. package/dist/bundle/mcp-F4XZO76F.js +507 -0
  116. package/dist/bundle/mcp-IXFC2VVR.js +165 -0
  117. package/dist/bundle/mdast-util-from-markdown-FXEPSNER.js +1958 -0
  118. package/dist/bundle/mdast-util-gfm-SZM5GBDF.js +2103 -0
  119. package/dist/bundle/micromark-extension-gfm-GRL24TU6.js +1838 -0
  120. package/dist/bundle/node-P4E63KXA.js +2340 -0
  121. package/dist/bundle/node-TLZSIHIJ.js +21 -0
  122. package/dist/bundle/node-ZMCACJVS.js +176 -0
  123. package/dist/bundle/node-sqlite-QJQ5S7KS.js +46 -0
  124. package/dist/bundle/oauth-TZFDPAFE.js +18 -0
  125. package/dist/bundle/open-IYM25QTL.js +20 -0
  126. package/dist/bundle/process-ZPTLNVQS.js +91 -0
  127. package/dist/bundle/program-YX7DZMPR.js +24100 -0
  128. package/dist/bundle/prompt-TGWTVIEK.js +13 -0
  129. package/dist/bundle/reasons-Q5LOQESQ.js +11 -0
  130. package/dist/bundle/recognize-AGPMWKIY.js +191 -0
  131. package/dist/bundle/remote-QV7QSLAK.js +28 -0
  132. package/dist/bundle/rerank-HZKJJCS4.js +51 -0
  133. package/dist/bundle/serve-NRJQOVT4.js +20 -0
  134. package/dist/bundle/server-2UQDEWTS.js +818 -0
  135. package/dist/bundle/server-R4JUHFSW.js +56 -0
  136. package/dist/bundle/services-NZQWVMOE.js +333 -0
  137. package/dist/bundle/sqlite-runtime-6MXHTYYU.js +17 -0
  138. package/dist/bundle/state-IF2FLTSY.js +34 -0
  139. package/dist/bundle/store-HBD54IRL.js +142 -0
  140. package/dist/bundle/store-HVIBXOXS.js +125 -0
  141. package/dist/bundle/store-maintenance-command-U3F4RGJB.js +57 -0
  142. package/dist/bundle/terminal-TFCTWLOS.js +11 -0
  143. package/dist/bundle/tokens-5D5YUA2Q.js +103 -0
  144. package/dist/commands/config.js +1 -1
  145. package/dist/commands/config.js.map +1 -1
  146. package/dist/commands/mcp.d.ts.map +1 -1
  147. package/dist/commands/mcp.js +106 -54
  148. package/dist/commands/mcp.js.map +1 -1
  149. package/dist/config.d.ts +3 -1
  150. package/dist/config.d.ts.map +1 -1
  151. package/dist/config.js +3 -1
  152. package/dist/config.js.map +1 -1
  153. package/dist/contract-overrides.d.ts.map +1 -1
  154. package/dist/contract-overrides.js +123 -83
  155. package/dist/contract-overrides.js.map +1 -1
  156. package/dist/mcp.d.ts +14 -6
  157. package/dist/mcp.d.ts.map +1 -1
  158. package/dist/mcp.js +26 -12
  159. package/dist/mcp.js.map +1 -1
  160. package/dist/program.d.ts.map +1 -1
  161. package/dist/program.js +7 -5
  162. package/dist/program.js.map +1 -1
  163. package/dist/reasons.d.ts.map +1 -1
  164. package/dist/reasons.js +0 -1
  165. package/dist/reasons.js.map +1 -1
  166. package/dist/registry.d.ts +2 -2
  167. package/dist/registry.d.ts.map +1 -1
  168. package/dist/registry.js +8 -2
  169. package/dist/registry.js.map +1 -1
  170. package/dist/state.d.ts +6 -3
  171. package/dist/state.d.ts.map +1 -1
  172. package/dist/state.js +6 -3
  173. package/dist/state.js.map +1 -1
  174. package/dist/tokens.d.ts +4 -1
  175. package/dist/tokens.d.ts.map +1 -1
  176. package/dist/tokens.js +44 -8
  177. package/dist/tokens.js.map +1 -1
  178. package/dist/version.d.ts +1 -1
  179. package/dist/version.js +1 -1
  180. package/package.json +7 -5
  181. package/scenarios/agent-access.md +2 -2
  182. package/skills/drive-cli/SKILL.md +2 -1
@@ -0,0 +1,754 @@
1
+ import { createRequire as __bundleRequire } from "node:module";
2
+ const require = __bundleRequire(import.meta.url);
3
+ import {
4
+ activeProfile,
5
+ paths
6
+ } from "./chunk-Y5EJSZXV.js";
7
+ import {
8
+ READ_SCOPE,
9
+ WRITE_SCOPE,
10
+ providerRequest
11
+ } from "./chunk-ZIHLE7LG.js";
12
+ import {
13
+ googleError
14
+ } from "./chunk-IGB5CJCA.js";
15
+ import {
16
+ acquireLock
17
+ } from "./chunk-C6SMAEED.js";
18
+ import {
19
+ Credentials,
20
+ keyringService,
21
+ pathsAreOverridden,
22
+ systemKeyring
23
+ } from "./chunk-6KFA6HOM.js";
24
+ import {
25
+ CliError,
26
+ isCliError,
27
+ minLength,
28
+ nullable,
29
+ number,
30
+ object,
31
+ optional,
32
+ pipe,
33
+ safeParse,
34
+ string
35
+ } from "./chunk-GKHM6I64.js";
36
+ import {
37
+ __name
38
+ } from "./chunk-ZVVMGPBJ.js";
39
+
40
+ // node_modules/.pnpm/@wirecat+cli-core@0.469.0_@wirecat+cli-base@0.65.0_commander@15.0.0_typescript@7.0.2_vi_80b586dbc8b099637a6e461856c2ee6b/node_modules/@wirecat/cli-core/dist/oauth/authorize.js
41
+ import { createHash, randomBytes } from "node:crypto";
42
+ import { createServer } from "node:http";
43
+ var DEFAULT_TIMEOUT_MS = 3e5;
44
+ var pkce = /* @__PURE__ */ __name(() => {
45
+ const codeVerifier = randomBytes(48).toString("base64url");
46
+ return { codeVerifier, codeChallenge: createHash("sha256").update(codeVerifier).digest("base64url") };
47
+ }, "pkce");
48
+ var queryOf = /* @__PURE__ */ __name((text2) => {
49
+ const trimmed = text2.trim();
50
+ const start = trimmed.indexOf("?");
51
+ return new URLSearchParams(start >= 0 ? trimmed.slice(start + 1).split("#")[0] : trimmed);
52
+ }, "queryOf");
53
+ var authorize = /* @__PURE__ */ __name(async (options) => {
54
+ const { provider } = options;
55
+ const cancelled = /* @__PURE__ */ __name(() => isCliError(options.signal?.reason) ? options.signal.reason : new CliError("cancelled", `${provider.name} sign-in was cancelled`), "cancelled");
56
+ if (options.signal?.aborted)
57
+ throw cancelled();
58
+ const { codeVerifier, codeChallenge } = pkce();
59
+ const paste = new AbortController();
60
+ let state = "";
61
+ let settled = false;
62
+ let accept = /* @__PURE__ */ __name(() => {
63
+ }, "accept");
64
+ let fail = /* @__PURE__ */ __name(() => {
65
+ }, "fail");
66
+ const code = new Promise((resolve, reject) => {
67
+ accept = /* @__PURE__ */ __name((value) => {
68
+ settled = true;
69
+ resolve(value);
70
+ }, "accept");
71
+ fail = /* @__PURE__ */ __name((error) => {
72
+ settled = true;
73
+ reject(error);
74
+ }, "fail");
75
+ });
76
+ void code.catch(() => {
77
+ });
78
+ const settle = /* @__PURE__ */ __name((query) => {
79
+ const value = query.get("code");
80
+ if (value)
81
+ accept(value);
82
+ else
83
+ fail(new CliError("authentication_error", `${provider.name} sign-in was declined`, { reason: "oauth.declined" }));
84
+ }, "settle");
85
+ const server = createServer((request, response) => {
86
+ let url;
87
+ try {
88
+ url = new URL(request.url ?? "/", "http://127.0.0.1");
89
+ } catch {
90
+ response.writeHead(400).end();
91
+ return;
92
+ }
93
+ if (request.method !== "GET" || url.pathname !== "/callback") {
94
+ response.writeHead(404).end();
95
+ return;
96
+ }
97
+ if (settled || !state || url.searchParams.get("state") !== state) {
98
+ response.writeHead(400).end("This sign-in link does not belong to the waiting sign-in");
99
+ return;
100
+ }
101
+ if (!url.searchParams.get("code") && !url.searchParams.get("error")) {
102
+ response.writeHead(400).end("Missing sign-in result");
103
+ return;
104
+ }
105
+ response.end("Sign-in received; you can close this tab");
106
+ settle(url.searchParams);
107
+ });
108
+ const onAbort = /* @__PURE__ */ __name(() => fail(cancelled()), "onAbort");
109
+ options.signal?.addEventListener("abort", onAbort, { once: true });
110
+ const timer = setTimeout(() => fail(new CliError("timeout", `${provider.name} sign-in timed out`, { reason: "oauth.timeout" })), options.timeoutMs ?? DEFAULT_TIMEOUT_MS);
111
+ try {
112
+ await new Promise((resolve, reject) => {
113
+ server.once("error", reject);
114
+ server.listen(0, "127.0.0.1", resolve);
115
+ });
116
+ const address = server.address();
117
+ if (!address || typeof address === "string")
118
+ throw new CliError("configuration_error", "could not start the local sign-in listener");
119
+ const random = randomBytes(32).toString("base64url");
120
+ const relay = provider.redirect.kind === "relay";
121
+ state = relay ? `${address.port}.${random}` : random;
122
+ const redirectUri = provider.redirect.kind === "relay" ? provider.redirect.url : `http://127.0.0.1:${address.port}/callback`;
123
+ const url = new URL(provider.authorizeUrl);
124
+ for (const [key, value] of Object.entries({
125
+ ...provider.authorizeParams,
126
+ response_type: "code",
127
+ client_id: provider.client.clientId,
128
+ redirect_uri: redirectUri,
129
+ ...options.scopes.length ? { scope: options.scopes.join(" ") } : {},
130
+ state,
131
+ code_challenge: codeChallenge,
132
+ code_challenge_method: "S256"
133
+ }))
134
+ url.searchParams.set(key, value);
135
+ options.showUrl?.(url.toString());
136
+ options.readPaste?.(paste.signal).then((text2) => {
137
+ if (settled)
138
+ return;
139
+ const query = queryOf(text2);
140
+ if (query.get("state") !== state || !query.get("code") && !query.get("error"))
141
+ fail(new CliError("authentication_error", "the pasted sign-in result does not match this sign-in", {
142
+ reason: "oauth.mismatch"
143
+ }));
144
+ else
145
+ settle(query);
146
+ }).catch(() => {
147
+ });
148
+ void Promise.resolve().then(() => options.openBrowser(url.toString())).catch(() => {
149
+ if (!options.readPaste && !options.showUrl)
150
+ fail(new CliError("configuration_error", "could not open the browser, and no sign-in link can be shown"));
151
+ });
152
+ return { code: await code, redirectUri, codeVerifier };
153
+ } finally {
154
+ clearTimeout(timer);
155
+ options.signal?.removeEventListener("abort", onAbort);
156
+ paste.abort();
157
+ server.closeAllConnections();
158
+ await new Promise((resolve) => server.close(() => resolve()));
159
+ }
160
+ }, "authorize");
161
+
162
+ // node_modules/.pnpm/@wirecat+cli-core@0.469.0_@wirecat+cli-base@0.65.0_commander@15.0.0_typescript@7.0.2_vi_80b586dbc8b099637a6e461856c2ee6b/node_modules/@wirecat/cli-core/dist/oauth/keeper.js
163
+ import { createHash as createHash2 } from "node:crypto";
164
+ import { join } from "node:path";
165
+ import { setTimeout as delay } from "node:timers/promises";
166
+
167
+ // node_modules/.pnpm/@wirecat+cli-core@0.469.0_@wirecat+cli-base@0.65.0_commander@15.0.0_typescript@7.0.2_vi_80b586dbc8b099637a6e461856c2ee6b/node_modules/@wirecat/cli-core/dist/oauth/requests.js
168
+ var REQUEST_LIMIT_MS = 3e4;
169
+ var TOKEN_LOG_EVENT = "oauth.token";
170
+ var object2 = /* @__PURE__ */ __name((value) => {
171
+ if (typeof value !== "object" || value === null || Array.isArray(value))
172
+ throw new Error("not an object");
173
+ return value;
174
+ }, "object");
175
+ var requestSignal = /* @__PURE__ */ __name((signal) => signal ? AbortSignal.any([signal, AbortSignal.timeout(REQUEST_LIMIT_MS)]) : AbortSignal.timeout(REQUEST_LIMIT_MS), "requestSignal");
176
+ var cancelledBy = /* @__PURE__ */ __name((signal) => {
177
+ if (!signal?.aborted)
178
+ return;
179
+ throw isCliError(signal.reason) ? signal.reason : new CliError("cancelled", "sign-in was cancelled");
180
+ }, "cancelledBy");
181
+ var post = /* @__PURE__ */ __name(async (url, body, context) => {
182
+ cancelledBy(context.signal);
183
+ try {
184
+ return await context.fetch(url, {
185
+ method: "POST",
186
+ headers: { "content-type": "application/x-www-form-urlencoded", accept: "application/json" },
187
+ body,
188
+ signal: requestSignal(context.signal),
189
+ redirect: "error"
190
+ });
191
+ } catch {
192
+ cancelledBy(context.signal);
193
+ return void 0;
194
+ }
195
+ }, "post");
196
+ var clientFields = /* @__PURE__ */ __name(({ client }) => ({
197
+ client_id: client.clientId,
198
+ ...client.clientSecret ? { client_secret: client.clientSecret } : {}
199
+ }), "clientFields");
200
+ var requestTokens = /* @__PURE__ */ __name(async (provider, params, context) => {
201
+ const operation = params.grant_type ?? "unknown";
202
+ const record = /* @__PURE__ */ __name((level, fields) => context.log?.[level]({ event: TOKEN_LOG_EVENT, provider: provider.id, operation, pid: process.pid, ...fields }), "record");
203
+ const again = `run ${context.signInCommand} again`;
204
+ const response = await post(provider.tokenUrl, new URLSearchParams({ ...params, ...clientFields(context) }), context);
205
+ if (!response) {
206
+ record("warn", { outcome: "no_response" });
207
+ throw new CliError("outcome_unknown", `${provider.name} token request did not finish; ${again} if it keeps failing`, {
208
+ reason: "oauth.no-response"
209
+ });
210
+ }
211
+ if (!response.ok) {
212
+ record("warn", { outcome: "rejected", status: response.status });
213
+ if (response.status === 429 || response.status >= 500)
214
+ throw new CliError("provider_unavailable", `${provider.name} token request failed (HTTP ${response.status})`, {
215
+ status: response.status,
216
+ retryable: true,
217
+ reason: "oauth.unavailable"
218
+ });
219
+ throw new CliError("authentication_error", `${provider.name} sign-in was refused (HTTP ${response.status}); ${again}`, {
220
+ status: response.status,
221
+ reason: "oauth.expired"
222
+ });
223
+ }
224
+ let body;
225
+ try {
226
+ body = object2(await response.json());
227
+ } catch {
228
+ record("error", { outcome: "unreadable_response", status: response.status });
229
+ throw new CliError("invalid_response", `${provider.name} returned an unreadable token response; ${again}`, {
230
+ reason: "oauth.invalid-response"
231
+ });
232
+ }
233
+ const previous = context.previous;
234
+ const refreshToken = typeof body.refresh_token === "string" && body.refresh_token ? body.refresh_token : previous?.refreshToken;
235
+ const expiresIn = body.expires_in;
236
+ if (typeof body.access_token !== "string" || !body.access_token || expiresIn !== void 0 && (typeof expiresIn !== "number" || !Number.isFinite(expiresIn) || expiresIn <= 0) || body.scope !== void 0 && typeof body.scope !== "string" || body.token_type !== void 0 && typeof body.token_type !== "string") {
237
+ record("error", { outcome: "invalid_response", status: response.status });
238
+ throw new CliError("invalid_response", `${provider.name} returned an invalid token response; ${again}`, {
239
+ reason: "oauth.invalid-response"
240
+ });
241
+ }
242
+ if (!refreshToken) {
243
+ record("error", { outcome: "no_refresh_token", status: response.status });
244
+ throw new CliError("authentication_error", `${provider.name} returned no offline refresh token; ${again}`, {
245
+ reason: "oauth.failed"
246
+ });
247
+ }
248
+ const scopes = typeof body.scope === "string" ? body.scope.split(/\s+/).filter(Boolean) : previous?.scopes ?? [];
249
+ const tokenType = typeof body.token_type === "string" ? body.token_type : previous?.tokenType;
250
+ record("info", {
251
+ outcome: "received",
252
+ status: response.status,
253
+ ...previous ? { rotated: refreshToken !== previous.refreshToken } : {}
254
+ });
255
+ return {
256
+ accessToken: body.access_token,
257
+ refreshToken,
258
+ ...typeof expiresIn === "number" ? { expiresAt: context.now() + expiresIn * 1e3 } : {},
259
+ scopes,
260
+ ...tokenType ? { tokenType } : {}
261
+ };
262
+ }, "requestTokens");
263
+ var revokeToken = /* @__PURE__ */ __name(async (provider, tokens, context) => {
264
+ if (provider.revoke)
265
+ return provider.revoke(tokens, context);
266
+ if (!provider.revokeUrl)
267
+ throw new CliError("validation_error", `${provider.name} declares no way to revoke a sign-in`);
268
+ const response = await post(provider.revokeUrl, new URLSearchParams({ token: tokens.refreshToken, ...clientFields(context) }), context);
269
+ context.log?.[response?.ok ? "info" : "warn"]({
270
+ event: TOKEN_LOG_EVENT,
271
+ provider: provider.id,
272
+ operation: "revoke",
273
+ pid: process.pid,
274
+ outcome: response?.ok ? "revoked" : response ? "rejected" : "no_response",
275
+ ...response ? { status: response.status } : {}
276
+ });
277
+ if (!response?.ok)
278
+ throw new CliError("outcome_unknown", `${provider.name} did not confirm the revoke`, {
279
+ reason: "oauth.revoke-failed",
280
+ ...response ? { status: response.status } : {}
281
+ });
282
+ }, "revokeToken");
283
+
284
+ // node_modules/.pnpm/@wirecat+cli-core@0.469.0_@wirecat+cli-base@0.65.0_commander@15.0.0_typescript@7.0.2_vi_80b586dbc8b099637a6e461856c2ee6b/node_modules/@wirecat/cli-core/dist/oauth/keeper.js
285
+ var inFlight = /* @__PURE__ */ new Map();
286
+ var tokenKeeper = /* @__PURE__ */ __name((options) => {
287
+ const { provider, storage, signal, log } = options;
288
+ const now = options.now ?? Date.now;
289
+ const fresh = /* @__PURE__ */ __name((tokens2) => Boolean(tokens2.accessToken) && tokens2.expiresAt !== void 0 && tokens2.expiresAt > now() + (options.freshForMs ?? 6e4), "fresh");
290
+ const lockPath = join(options.lockDir, `oauth-${createHash2("sha256").update(storage.key).digest("hex").slice(0, 16)}.lock`);
291
+ const clientOf = /* @__PURE__ */ __name((stored) => {
292
+ const saved = stored?.client;
293
+ if (!saved || saved.clientSecret || saved.clientId !== provider.client.clientId)
294
+ return saved ?? provider.client;
295
+ return provider.client;
296
+ }, "clientOf");
297
+ const context = /* @__PURE__ */ __name((client, previous) => ({
298
+ fetch: options.fetch,
299
+ client,
300
+ now,
301
+ signInCommand: options.signInCommand,
302
+ ...signal ? { signal } : {},
303
+ ...log ? { log } : {},
304
+ ...previous ? { previous } : {}
305
+ }), "context");
306
+ const exchange = /* @__PURE__ */ __name((params, ctx) => provider.exchange ? provider.exchange(params, ctx) : requestTokens(provider, params, ctx), "exchange");
307
+ const notSignedIn = /* @__PURE__ */ __name(() => new CliError("authentication_error", `not signed in to ${provider.name}; run ${options.signInCommand}`, {
308
+ reason: "oauth.missing"
309
+ }), "notSignedIn");
310
+ const busy = /* @__PURE__ */ __name((error) => isCliError(error) && error.details.reason === "file.locked", "busy");
311
+ const acquire = /* @__PURE__ */ __name(async () => {
312
+ const started = performance.now();
313
+ let waiting = false;
314
+ for (; ; ) {
315
+ try {
316
+ return await acquireLock(lockPath, signal ? { signal } : {});
317
+ } catch (error) {
318
+ if (!busy(error))
319
+ throw error;
320
+ if (!waiting) {
321
+ waiting = true;
322
+ log?.info({
323
+ event: TOKEN_LOG_EVENT,
324
+ provider: provider.id,
325
+ operation: "lock",
326
+ outcome: "waiting",
327
+ pid: process.pid
328
+ });
329
+ }
330
+ if (performance.now() - started > (options.lockWaitMs ?? 45e3))
331
+ throw new CliError("provider_unavailable", `another process holds this ${provider.name} sign-in; retry`, {
332
+ reason: "oauth.locked",
333
+ retryable: true
334
+ });
335
+ await delay(options.lockRetryMs ?? 50, void 0, signal ? { signal } : {}).catch(() => {
336
+ throw new CliError("cancelled", `${provider.name} sign-in was cancelled`);
337
+ });
338
+ }
339
+ }
340
+ }, "acquire");
341
+ const locked = /* @__PURE__ */ __name(async (work) => {
342
+ const lock = await acquire();
343
+ try {
344
+ return await work();
345
+ } finally {
346
+ await lock.release().catch(() => {
347
+ });
348
+ }
349
+ }, "locked");
350
+ const shared = /* @__PURE__ */ __name((work) => {
351
+ const running = inFlight.get(lockPath);
352
+ if (running)
353
+ return running;
354
+ const started = locked(work).finally(() => inFlight.delete(lockPath));
355
+ inFlight.set(lockPath, started);
356
+ return started;
357
+ }, "shared");
358
+ const tokens = /* @__PURE__ */ __name(async () => {
359
+ const seen = storage.read();
360
+ if (!seen)
361
+ throw notSignedIn();
362
+ if (fresh(seen.tokens))
363
+ return seen.tokens;
364
+ return shared(async () => {
365
+ const current = storage.read();
366
+ if (!current)
367
+ throw notSignedIn();
368
+ if (fresh(current.tokens) || current.tokens.refreshToken !== seen.tokens.refreshToken)
369
+ return current.tokens;
370
+ const client = clientOf(current);
371
+ const refreshed = await exchange({ grant_type: "refresh_token", refresh_token: current.tokens.refreshToken }, context(client, current.tokens));
372
+ storage.write({ tokens: refreshed, client });
373
+ return refreshed;
374
+ });
375
+ }, "tokens");
376
+ return {
377
+ tokens,
378
+ accessToken: /* @__PURE__ */ __name(async () => {
379
+ const current = await tokens();
380
+ if (!current.accessToken)
381
+ throw notSignedIn();
382
+ return current.accessToken;
383
+ }, "accessToken"),
384
+ signIn: /* @__PURE__ */ __name(async ({ accept, ...authorizeOptions }) => {
385
+ storage.probe();
386
+ const authorization = await authorize({ ...authorizeOptions, provider, ...signal ? { signal } : {} });
387
+ const client = provider.client;
388
+ const received = await exchange({
389
+ grant_type: "authorization_code",
390
+ code: authorization.code,
391
+ redirect_uri: authorization.redirectUri,
392
+ code_verifier: authorization.codeVerifier
393
+ }, context(client));
394
+ const extra = await accept?.(received) ?? void 0;
395
+ await locked(async () => storage.write({ tokens: received, client, ...extra ? { extra } : {} }));
396
+ return { scopes: received.scopes };
397
+ }, "signIn"),
398
+ save: /* @__PURE__ */ __name((saved, extra) => locked(async () => storage.write({ tokens: saved, client: clientOf(storage.read()), ...extra ? { extra } : {} })), "save"),
399
+ signOut: /* @__PURE__ */ __name(({ revoke = false } = {}) => locked(async () => {
400
+ const current = storage.read();
401
+ let revoked = false;
402
+ if (revoke && current) {
403
+ await revokeToken(provider, current.tokens, context(clientOf(current)));
404
+ revoked = true;
405
+ }
406
+ return { revoked, removed: storage.remove() };
407
+ }), "signOut")
408
+ };
409
+ }, "tokenKeeper");
410
+
411
+ // node_modules/.pnpm/@wirecat+cli-core@0.469.0_@wirecat+cli-base@0.65.0_commander@15.0.0_typescript@7.0.2_vi_80b586dbc8b099637a6e461856c2ee6b/node_modules/@wirecat/cli-core/dist/oauth/storage.js
412
+ var invalid = /* @__PURE__ */ __name(() => new CliError("authentication_error", "the saved sign-in cannot be read; sign in again", { reason: "oauth.invalid" }), "invalid");
413
+ var parse = /* @__PURE__ */ __name((raw) => {
414
+ let value;
415
+ try {
416
+ value = JSON.parse(raw);
417
+ } catch {
418
+ throw invalid();
419
+ }
420
+ if (typeof value !== "object" || value === null || Array.isArray(value))
421
+ throw invalid();
422
+ return value;
423
+ }, "parse");
424
+ var text = /* @__PURE__ */ __name((value) => typeof value === "string" && value ? value : void 0, "text");
425
+ var finite = /* @__PURE__ */ __name((value) => typeof value === "number" && Number.isFinite(value) ? value : void 0, "finite");
426
+ var previousOf = /* @__PURE__ */ __name((raw) => {
427
+ if (raw === void 0)
428
+ return {};
429
+ try {
430
+ return parse(raw);
431
+ } catch {
432
+ return {};
433
+ }
434
+ }, "previousOf");
435
+ var defined = /* @__PURE__ */ __name((value) => Object.fromEntries(Object.entries(value).filter(([, field]) => field !== void 0)), "defined");
436
+ var driveSessionCodec = {
437
+ decode: /* @__PURE__ */ __name((raw) => {
438
+ const value = parse(raw);
439
+ const tokens = value.tokens;
440
+ if (typeof tokens !== "object" || tokens === null || Array.isArray(tokens))
441
+ throw invalid();
442
+ const fields = tokens;
443
+ const refreshToken = text(fields.refresh_token);
444
+ const clientId = text(value.clientId);
445
+ if (!refreshToken || !clientId || typeof value.principal !== "string")
446
+ throw invalid();
447
+ return {
448
+ client: defined({ clientId, clientSecret: text(value.clientSecret) }),
449
+ tokens: defined({
450
+ accessToken: text(fields.access_token),
451
+ refreshToken,
452
+ expiresAt: finite(fields.expiry_date),
453
+ scopes: typeof fields.scope === "string" ? fields.scope.split(/\s+/).filter(Boolean) : [],
454
+ tokenType: text(fields.token_type)
455
+ })
456
+ };
457
+ }, "decode"),
458
+ encode: /* @__PURE__ */ __name(({ tokens, client, previous, extra }) => {
459
+ const before = previousOf(previous);
460
+ const oldTokens = typeof before.tokens === "object" && before.tokens !== null ? before.tokens : {};
461
+ const session = {
462
+ ...before,
463
+ ...extra,
464
+ clientId: client.clientId,
465
+ ...client.clientSecret ? { clientSecret: client.clientSecret } : {},
466
+ tokens: defined({
467
+ ...oldTokens,
468
+ access_token: tokens.accessToken,
469
+ refresh_token: tokens.refreshToken,
470
+ expiry_date: tokens.expiresAt,
471
+ ...tokens.scopes.length ? { scope: tokens.scopes.join(" ") } : {},
472
+ token_type: tokens.tokenType
473
+ })
474
+ };
475
+ if (typeof session.principal !== "string")
476
+ throw new CliError("configuration_error", "drive's sign-in entry needs the account's principal");
477
+ return JSON.stringify(session);
478
+ }, "encode")
479
+ };
480
+ var keyringFailure = /* @__PURE__ */ __name(() => new CliError("configuration_error", "could not reach the saved sign-in; use an available keyring or file storage", {
481
+ reason: "oauth.not-saved"
482
+ }), "keyringFailure");
483
+ var credentialStorage = /* @__PURE__ */ __name((options) => {
484
+ if (!options.credentials.keyring)
485
+ throw new CliError("configuration_error", "a sign-in store needs its keyring passed in, never a default");
486
+ const credentials2 = new Credentials(options.credentials);
487
+ const { account, codec } = options;
488
+ const service = keyringService(options.credentials.service, options.credentials.configDir, options.credentials.isolated);
489
+ const raw = /* @__PURE__ */ __name((name) => {
490
+ try {
491
+ return credentials2.read(name)?.secret;
492
+ } catch {
493
+ throw keyringFailure();
494
+ }
495
+ }, "raw");
496
+ const save = /* @__PURE__ */ __name((value) => {
497
+ try {
498
+ credentials2.write(account, value);
499
+ } catch {
500
+ throw keyringFailure();
501
+ }
502
+ }, "save");
503
+ const current = /* @__PURE__ */ __name(() => {
504
+ const own = raw(account);
505
+ if (own !== void 0)
506
+ return own;
507
+ for (const legacy of options.legacyAccounts ?? []) {
508
+ const found = raw(legacy);
509
+ if (found === void 0)
510
+ continue;
511
+ codec.decode(found);
512
+ save(found);
513
+ return found;
514
+ }
515
+ return void 0;
516
+ }, "current");
517
+ return {
518
+ key: `${service}\0${account}`,
519
+ probe: /* @__PURE__ */ __name(() => {
520
+ raw(account);
521
+ }, "probe"),
522
+ read: /* @__PURE__ */ __name(() => {
523
+ const value = current();
524
+ return value === void 0 ? void 0 : codec.decode(value);
525
+ }, "read"),
526
+ write: /* @__PURE__ */ __name((input) => save(codec.encode({ ...input, previous: raw(account) })), "write"),
527
+ remove: /* @__PURE__ */ __name(() => {
528
+ try {
529
+ return credentials2.remove(account);
530
+ } catch {
531
+ throw keyringFailure();
532
+ }
533
+ }, "remove")
534
+ };
535
+ }, "credentialStorage");
536
+
537
+ // dist/tokens.js
538
+ import { OAuth2Client } from "google-auth-library";
539
+ var Session = object({
540
+ principal: string(),
541
+ clientId: string(),
542
+ clientSecret: optional(string()),
543
+ tokens: object({
544
+ access_token: optional(nullable(string())),
545
+ refresh_token: pipe(string(), minLength(1)),
546
+ expiry_date: optional(nullable(number())),
547
+ scope: optional(string()),
548
+ token_type: optional(nullable(string()))
549
+ })
550
+ });
551
+ var credentialOptions = /* @__PURE__ */ __name((env, storage, keyring) => ({
552
+ configDir: paths(env).config,
553
+ service: "drive-cli",
554
+ storage,
555
+ env,
556
+ isolated: pathsAreOverridden({ appName: "drive-cli", prefix: "DRIVE", env }),
557
+ ...keyring ? { keyring } : {}
558
+ }), "credentialOptions");
559
+ var credentials = /* @__PURE__ */ __name((env, storage, keyring) => new Credentials(credentialOptions(env, storage, keyring)), "credentials");
560
+ var notSaved = /* @__PURE__ */ __name(() => new CliError("configuration_error", "could not save Google sign-in; use an available keyring or explicitly choose --credential-storage file", { reason: "sign-in.not-saved" }), "notSaved");
561
+ var checkSessionStorage = /* @__PURE__ */ __name((env, name, storage, keyring) => {
562
+ if (storage === "file")
563
+ return;
564
+ try {
565
+ credentials(env, storage, keyring).read(name);
566
+ } catch {
567
+ throw notSaved();
568
+ }
569
+ }, "checkSessionStorage");
570
+ var saveSession = /* @__PURE__ */ __name((env, name, session, storage, keyring) => {
571
+ try {
572
+ credentials(env, storage, keyring).write(name, JSON.stringify(session));
573
+ } catch {
574
+ throw notSaved();
575
+ }
576
+ }, "saveSession");
577
+ var googleProvider = /* @__PURE__ */ __name((client) => ({
578
+ id: "google",
579
+ name: "Google",
580
+ authorizeUrl: "https://accounts.google.com/o/oauth2/v2/auth",
581
+ tokenUrl: "https://oauth2.googleapis.com/token",
582
+ revokeUrl: "https://oauth2.googleapis.com/revoke",
583
+ client,
584
+ redirect: { kind: "loopback" },
585
+ // Without offline access Google returns no refresh token; without consent it does not return one again.
586
+ authorizeParams: { access_type: "offline", prompt: "select_account consent" }
587
+ }), "googleProvider");
588
+ var sessionKeeper = /* @__PURE__ */ __name((options) => tokenKeeper({
589
+ provider: googleProvider(options.client),
590
+ storage: credentialStorage({
591
+ credentials: { ...credentialOptions(options.env, options.storage), keyring: options.keyring ?? systemKeyring },
592
+ account: options.name,
593
+ codec: driveSessionCodec
594
+ }),
595
+ lockDir: paths(options.env).config,
596
+ fetch: options.fetch ?? globalThis.fetch,
597
+ signInCommand: `drive ${options.name} session start`,
598
+ // Above the client's own 5-minute early refresh, so a token it asks to replace is replaced.
599
+ freshForMs: 6 * 6e4,
600
+ ...options.signal ? { signal: options.signal } : {}
601
+ }), "sessionKeeper");
602
+ var authorizedClient = /* @__PURE__ */ __name((env, name, keyring, signal) => {
603
+ const profile = activeProfile(env, name);
604
+ let parsed;
605
+ try {
606
+ const secret = credentials(env, profile.storage, keyring).read(name)?.secret;
607
+ if (!secret)
608
+ throw new Error("missing login");
609
+ parsed = safeParse(Session, JSON.parse(secret));
610
+ } catch {
611
+ throw new CliError("authentication_error", `could not load Google sign-in \u2014 run drive ${name} session start again`, {
612
+ reason: "sign-in.expired"
613
+ });
614
+ }
615
+ if (!parsed.success || parsed.output.principal !== profile.principal)
616
+ throw new CliError("authentication_error", "saved sign-in is invalid or belongs to another account", {
617
+ reason: "sign-in.expired"
618
+ });
619
+ const session = parsed.output;
620
+ const keeper = sessionKeeper({
621
+ env,
622
+ name,
623
+ storage: profile.storage,
624
+ client: { clientId: session.clientId, ...session.clientSecret ? { clientSecret: session.clientSecret } : {} },
625
+ ...keyring ? { keyring } : {},
626
+ ...signal ? { signal } : {}
627
+ });
628
+ const client = new OAuth2Client({
629
+ clientId: session.clientId,
630
+ clientSecret: session.clientSecret,
631
+ transporterOptions: { timeout: 3e4, ...signal ? { signal } : {} }
632
+ });
633
+ client.refreshHandler = async () => {
634
+ try {
635
+ const tokens = await keeper.tokens();
636
+ if (!tokens.accessToken || tokens.expiresAt === void 0)
637
+ throw new Error("no access token");
638
+ return { access_token: tokens.accessToken, expiry_date: tokens.expiresAt };
639
+ } catch (error) {
640
+ if (isCliError(error) && error.code !== "authentication_error")
641
+ throw error;
642
+ throw new CliError("authentication_error", `Google sign-in expired \u2014 run drive ${name} session start again`, {
643
+ reason: "sign-in.expired"
644
+ });
645
+ }
646
+ };
647
+ const { refresh_token: _refresh, ...current } = session.tokens;
648
+ client.setCredentials(current);
649
+ return observeRequests(client);
650
+ }, "authorizedClient");
651
+ var covers = /* @__PURE__ */ __name((granted, required) => granted.includes(required) || required === READ_SCOPE && granted.includes(WRITE_SCOPE), "covers");
652
+ var grantedScopes = /* @__PURE__ */ __name((env, name, keyring) => {
653
+ try {
654
+ const secret = credentials(env, activeProfile(env, name).storage, keyring).read(name)?.secret;
655
+ const parsed = secret ? safeParse(Session, JSON.parse(secret)) : void 0;
656
+ if (!parsed?.success)
657
+ return [];
658
+ return parsed.output.tokens.scope?.split(/\s+/).filter(Boolean);
659
+ } catch {
660
+ return [];
661
+ }
662
+ }, "grantedScopes");
663
+ var checkAuthorization = /* @__PURE__ */ __name(async (client, required = READ_SCOPE) => {
664
+ try {
665
+ const { token } = await client.getAccessToken();
666
+ if (!token)
667
+ throw new CliError("authentication_error", "Google returned no access token");
668
+ const info = await client.getTokenInfo(token);
669
+ if (!covers(info.scopes, required))
670
+ throw new CliError("permission_error", "sign-in lacks the required permission; run drive <profile> session start --grant write, activity or apps when needed", { reason: "sign-in.scope-missing" });
671
+ } catch (error) {
672
+ throw googleError(error);
673
+ }
674
+ }, "checkAuthorization");
675
+ var WORD = /^[a-z][a-z_]{0,23}$/;
676
+ var VERB = /^[a-z][A-Za-z]{0,31}$/;
677
+ var segment = /* @__PURE__ */ __name((part) => {
678
+ if (/^v\d+$/.test(part) || WORD.test(part))
679
+ return part;
680
+ const verb = part.split(":")[1];
681
+ return verb !== void 0 && VERB.test(verb) ? `:id:${verb}` : ":id";
682
+ }, "segment");
683
+ var operationOf = /* @__PURE__ */ __name((method, url) => {
684
+ let path = "";
685
+ try {
686
+ path = new URL(String(url ?? "")).pathname;
687
+ } catch {
688
+ }
689
+ const template = path.split("/").filter(Boolean).map((part) => segment(decodeURIComponent(part))).join("/");
690
+ return `${(method ?? "GET").toUpperCase()} /${template}`;
691
+ }, "operationOf");
692
+ var reasonOf = /* @__PURE__ */ __name((data) => {
693
+ const error = data?.error;
694
+ const reason = error?.errors?.[0]?.reason ?? error?.status;
695
+ return typeof reason === "string" ? reason : void 0;
696
+ }, "reasonOf");
697
+ var observeRequests = /* @__PURE__ */ __name((client) => {
698
+ const transporter = client.transporter;
699
+ const request = transporter.request.bind(transporter);
700
+ transporter.request = (async (options) => {
701
+ const method = (options.method ?? "GET").toUpperCase();
702
+ const operation = operationOf(method, options.url);
703
+ const call = { method, endpointTemplate: operation.slice(method.length + 1), transport: "http" };
704
+ let ended;
705
+ const adapter = /* @__PURE__ */ __name(async (prepared, next) => {
706
+ const attempt = (prepared.retryConfig?.currentRetryAttempt ?? 0) + 1;
707
+ const waitMs = ended === void 0 ? void 0 : Math.round(performance.now() - ended);
708
+ const answered = providerRequest(operation, void 0, {
709
+ ...call,
710
+ attempt,
711
+ ...waitMs === void 0 ? {} : { waitMs }
712
+ });
713
+ try {
714
+ const response = await (options.adapter ? options.adapter(prepared, next) : next(prepared));
715
+ const failed = !(prepared.validateStatus?.(response.status) ?? response.status < 400);
716
+ const providerError = failed ? reasonOf(response.data) : void 0;
717
+ answered({
718
+ status: response.status,
719
+ ...failed ? { errorCode: "provider_error" } : {},
720
+ ...providerError ? { providerError } : {}
721
+ });
722
+ return response;
723
+ } catch (error) {
724
+ answered({ error, errorCode: googleError(error).code });
725
+ throw error;
726
+ } finally {
727
+ ended = performance.now();
728
+ }
729
+ }, "adapter");
730
+ try {
731
+ return await request({ ...options, adapter });
732
+ } catch (error) {
733
+ if (ended === void 0)
734
+ providerRequest(operation, void 0, { ...call, attempt: 1 })({ error, errorCode: googleError(error).code });
735
+ throw error;
736
+ }
737
+ });
738
+ return client;
739
+ }, "observeRequests");
740
+
741
+ export {
742
+ credentials,
743
+ notSaved,
744
+ checkSessionStorage,
745
+ saveSession,
746
+ googleProvider,
747
+ sessionKeeper,
748
+ authorizedClient,
749
+ covers,
750
+ grantedScopes,
751
+ checkAuthorization,
752
+ operationOf,
753
+ observeRequests
754
+ };