@anthonyhaussman/opencode-agy-auth 1.2.10-alpha.1 → 1.2.10

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.
package/dist/index.js CHANGED
@@ -579,12 +579,6 @@ async function resolveQuotaResetDelay(accessToken, projectId, model, userAgentMo
579
579
  return null;
580
580
  }
581
581
  }
582
- var retryInternals = {
583
- parseRetryDelayValue,
584
- parseRetryDelayFromMessage,
585
- findResetTimeForModel,
586
- resolveQuotaResetDelay
587
- };
588
582
 
589
583
  // src/sdk/retry/helpers.ts
590
584
  var DEFAULT_MAX_ATTEMPTS = 3;
@@ -1581,11 +1575,7 @@ function createOAuthAuthorizeMethod(options) {
1581
1575
  const isHeadless = !!(process.env.SSH_CONNECTION || process.env.SSH_CLIENT || process.env.SSH_TTY || process.env.OPENCODE_HEADLESS);
1582
1576
  const authorization = await authorizeAgy();
1583
1577
  if (!isHeadless) {
1584
- if (options?.openBrowser) {
1585
- options.openBrowser(authorization.url);
1586
- } else {
1587
- openBrowserUrl(authorization.url);
1588
- }
1578
+ openBrowserUrl(authorization.url);
1589
1579
  }
1590
1580
  return {
1591
1581
  url: authorization.url,
@@ -1639,23 +1629,16 @@ function parseOAuthCallbackInput(input) {
1639
1629
  }
1640
1630
  return { code: trimmed };
1641
1631
  }
1642
- function defaultOpenBrowserLauncher(command, args) {
1643
- const child = spawn(command, args, {
1644
- stdio: "ignore",
1645
- detached: true
1646
- });
1647
- child.unref?.();
1648
- }
1649
- var openBrowserLauncher = defaultOpenBrowserLauncher;
1650
1632
  function openBrowserUrl(url2) {
1651
- if ((process.env.NODE_ENV === "test" || process.env.VITEST) && openBrowserLauncher === defaultOpenBrowserLauncher) {
1652
- return;
1653
- }
1654
1633
  try {
1655
1634
  const platform2 = process.platform;
1656
1635
  const command = platform2 === "darwin" ? "open" : platform2 === "win32" ? "rundll32" : "xdg-open";
1657
1636
  const args = platform2 === "win32" ? ["url.dll,FileProtocolHandler", url2] : [url2];
1658
- openBrowserLauncher(command, args);
1637
+ const child = spawn(command, args, {
1638
+ stdio: "ignore",
1639
+ detached: true
1640
+ });
1641
+ child.unref?.();
1659
1642
  } catch {
1660
1643
  }
1661
1644
  }
@@ -15337,12 +15320,6 @@ function formatRelativeResetTime(resetTime) {
15337
15320
 
15338
15321
  // src/plugin/quota.ts
15339
15322
  var AGY_QUOTA_TOOL_NAME = "agy_quota";
15340
- var AGY_V2_QUOTA_COMMAND = "agy-quota";
15341
- var AGY_V2_QUOTA_COMMAND_TEMPLATE = `Retrieve Agy Code Assist quota usage for the current authenticated account.
15342
-
15343
- Immediately call \`${AGY_QUOTA_TOOL_NAME}\` with no arguments and return its output verbatim.
15344
- Do not call other tools.
15345
- `;
15346
15323
  function createAgyQuotaTool({
15347
15324
  client,
15348
15325
  getAuthResolver,
@@ -15582,12 +15559,6 @@ function splitModelVariant(modelId) {
15582
15559
 
15583
15560
  // src/plugin/quota-summary.ts
15584
15561
  var AGY_QUOTA_SUMMARY_TOOL_NAME = "agy_quota_summary";
15585
- var AGY_V2_QUOTA_SUMMARY_COMMAND = "agy-quota-summary";
15586
- var AGY_V2_QUOTA_SUMMARY_COMMAND_TEMPLATE = `Retrieve Agy Code Assist quota summary (weekly and 5-hour limits by model group) for the current authenticated account.
15587
-
15588
- Immediately call \`${AGY_QUOTA_SUMMARY_TOOL_NAME}\` with no arguments and return its output verbatim.
15589
- Do not call other tools.
15590
- `;
15591
15562
  function createAgyQuotaSummaryTool({
15592
15563
  client,
15593
15564
  getAuthResolver,
@@ -19803,14 +19774,9 @@ function normalizeToolSchemaTypes(tools, toolMapper) {
19803
19774
  fn.name = toolMapper ? toolMapper.toGemini(fn.name) : sanitizeToolName(fn.name);
19804
19775
  }
19805
19776
  if (fn) {
19806
- if (!fn.parameters) {
19807
- fn.parameters = fn.parameters_json_schema ?? fn.parametersJsonSchema;
19808
- }
19809
19777
  if (!fn.parameters) {
19810
19778
  fn.parameters = { type: "OBJECT", properties: {} };
19811
19779
  }
19812
- delete fn.parameters_json_schema;
19813
- delete fn.parametersJsonSchema;
19814
19780
  sanitizeSchema(fn.parameters);
19815
19781
  }
19816
19782
  }
@@ -20235,81 +20201,22 @@ var ChatLoggerImpl = class {
20235
20201
  }
20236
20202
  };
20237
20203
 
20238
- // src/plugin/headers.ts
20239
- function getSafeHeader(headers, key) {
20240
- if (!headers) {
20241
- return void 0;
20242
- }
20243
- const targetKey = key.toLowerCase();
20244
- if (typeof headers.get === "function") {
20245
- try {
20246
- return headers.get(targetKey) || void 0;
20247
- } catch {
20248
- }
20249
- }
20250
- if (Array.isArray(headers)) {
20251
- const found = headers.find((item) => {
20252
- if (Array.isArray(item) && typeof item[0] === "string") {
20253
- return item[0].toLowerCase() === targetKey;
20254
- }
20255
- return false;
20256
- });
20257
- return found ? String(found[1]) : void 0;
20258
- }
20259
- if (typeof headers === "object") {
20260
- const foundKey = Object.keys(headers).find((k) => k.toLowerCase() === targetKey);
20261
- return foundKey ? headers[foundKey] !== void 0 ? String(headers[foundKey]) : void 0 : void 0;
20262
- }
20263
- return void 0;
20264
- }
20265
- function setSafeHeaders(initHeaders, newHeaders) {
20266
- if (typeof globalThis.Headers !== "undefined") {
20267
- const headers = new globalThis.Headers(initHeaders ?? {});
20268
- for (const [k, v] of Object.entries(newHeaders)) {
20269
- headers.set(k, v);
20270
- }
20271
- return headers;
20272
- }
20273
- if (Array.isArray(initHeaders)) {
20274
- const nextHeaders2 = [...initHeaders];
20275
- for (const [k, v] of Object.entries(newHeaders)) {
20276
- const idx = nextHeaders2.findIndex((item) => Array.isArray(item) && typeof item[0] === "string" && item[0].toLowerCase() === k.toLowerCase());
20277
- if (idx !== -1) {
20278
- nextHeaders2[idx] = [k, v];
20279
- } else {
20280
- nextHeaders2.push([k, v]);
20281
- }
20282
- }
20283
- return nextHeaders2;
20284
- }
20285
- const nextHeaders = {};
20286
- if (initHeaders && typeof initHeaders === "object") {
20287
- for (const [k, v] of Object.entries(initHeaders)) {
20288
- nextHeaders[k] = String(v);
20289
- }
20290
- }
20291
- for (const [k, v] of Object.entries(newHeaders)) {
20292
- const existingKey = Object.keys(nextHeaders).find((key) => key.toLowerCase() === k.toLowerCase());
20293
- if (existingKey) {
20294
- nextHeaders[existingKey] = v;
20295
- } else {
20296
- nextHeaders[k] = v;
20297
- }
20298
- }
20299
- return nextHeaders;
20300
- }
20301
- function toUrlString(value) {
20302
- if (typeof value === "string") {
20303
- return value;
20304
- }
20305
- const candidate = value.url;
20306
- if (candidate) {
20307
- return candidate;
20308
- }
20309
- return value.toString();
20310
- }
20204
+ // src/plugin.ts
20205
+ var AGY_QUOTA_COMMAND = "agyquota";
20206
+ var AGY_QUOTA_COMMAND_TEMPLATE = `Retrieve Agy Code Assist quota usage for the current authenticated account.
20311
20207
 
20312
- // src/plugin/tier.ts
20208
+ Immediately call \`${AGY_QUOTA_TOOL_NAME}\` with no arguments and return its output verbatim.
20209
+ Do not call other tools.
20210
+ `;
20211
+ var AGY_QUOTA_SUMMARY_COMMAND = "agyquotasummary";
20212
+ var AGY_QUOTA_SUMMARY_COMMAND_TEMPLATE = `Retrieve Agy Code Assist quota summary (weekly and 5-hour limits by model group) for the current authenticated account.
20213
+
20214
+ Immediately call \`${AGY_QUOTA_SUMMARY_TOOL_NAME}\` with no arguments and return its output verbatim.
20215
+ Do not call other tools.
20216
+ `;
20217
+ var latestAgyAuthResolver;
20218
+ var latestAgyConfiguredProjectId;
20219
+ var latestAgyUserAgentModel;
20313
20220
  var STATIC_MODELS_SIMPLE = {
20314
20221
  "gemini-3.8-flash": {
20315
20222
  name: "Gemini 3.8 Flash",
@@ -20397,39 +20304,6 @@ var TIER_MAPPING = {
20397
20304
  high: "gemini-3.1-pro-high"
20398
20305
  }
20399
20306
  };
20400
- function resolveModelTier(baseModelId, headersOrInit) {
20401
- const parts = baseModelId.split("@");
20402
- const base = parts[0] || "";
20403
- const suffixTier = parts[1]?.toLowerCase();
20404
- const mapping = TIER_MAPPING[base];
20405
- if (!mapping) {
20406
- return baseModelId;
20407
- }
20408
- const rawHeaders = headersOrInit && typeof headersOrInit === "object" && "headers" in headersOrInit ? headersOrInit.headers : headersOrInit;
20409
- const headerTier = getSafeHeader(rawHeaders, "x-agy-tier")?.toLowerCase() || null;
20410
- const requestedTier = headerTier || suffixTier;
20411
- if (requestedTier && Object.prototype.hasOwnProperty.call(mapping, requestedTier)) {
20412
- return mapping[requestedTier] || baseModelId;
20413
- }
20414
- return mapping["medium"] ?? mapping["high"] ?? baseModelId;
20415
- }
20416
-
20417
- // src/plugin.ts
20418
- var AGY_QUOTA_COMMAND = "agyquota";
20419
- var AGY_QUOTA_COMMAND_TEMPLATE = `Retrieve Agy Code Assist quota usage for the current authenticated account.
20420
-
20421
- Immediately call \`${AGY_QUOTA_TOOL_NAME}\` with no arguments and return its output verbatim.
20422
- Do not call other tools.
20423
- `;
20424
- var AGY_QUOTA_SUMMARY_COMMAND = "agyquotasummary";
20425
- var AGY_QUOTA_SUMMARY_COMMAND_TEMPLATE = `Retrieve Agy Code Assist quota summary (weekly and 5-hour limits by model group) for the current authenticated account.
20426
-
20427
- Immediately call \`${AGY_QUOTA_SUMMARY_TOOL_NAME}\` with no arguments and return its output verbatim.
20428
- Do not call other tools.
20429
- `;
20430
- var latestAgyAuthResolver;
20431
- var latestAgyConfiguredProjectId;
20432
- var latestAgyUserAgentModel;
20433
20307
  var buildModelFromSimple = (modelId, simple) => {
20434
20308
  const isClaude = modelId.startsWith("claude-");
20435
20309
  const isGpt = modelId.startsWith("gpt-");
@@ -20523,6 +20397,83 @@ var STATIC_MODELS = {};
20523
20397
  for (const [modelId, simple] of Object.entries(STATIC_MODELS_SIMPLE)) {
20524
20398
  STATIC_MODELS[modelId] = buildModelFromSimple(modelId, simple);
20525
20399
  }
20400
+ function getSafeHeader(headers, key) {
20401
+ if (!headers) {
20402
+ return void 0;
20403
+ }
20404
+ const targetKey = key.toLowerCase();
20405
+ if (typeof headers.get === "function") {
20406
+ try {
20407
+ return headers.get(targetKey) || void 0;
20408
+ } catch {
20409
+ }
20410
+ }
20411
+ if (Array.isArray(headers)) {
20412
+ const found = headers.find((item) => {
20413
+ if (Array.isArray(item) && typeof item[0] === "string") {
20414
+ return item[0].toLowerCase() === targetKey;
20415
+ }
20416
+ return false;
20417
+ });
20418
+ return found ? String(found[1]) : void 0;
20419
+ }
20420
+ if (typeof headers === "object") {
20421
+ const foundKey = Object.keys(headers).find((k) => k.toLowerCase() === targetKey);
20422
+ return foundKey ? headers[foundKey] !== void 0 ? String(headers[foundKey]) : void 0 : void 0;
20423
+ }
20424
+ return void 0;
20425
+ }
20426
+ function setSafeHeaders(initHeaders, newHeaders) {
20427
+ if (typeof globalThis.Headers !== "undefined") {
20428
+ const headers = new globalThis.Headers(initHeaders ?? {});
20429
+ for (const [k, v] of Object.entries(newHeaders)) {
20430
+ headers.set(k, v);
20431
+ }
20432
+ return headers;
20433
+ }
20434
+ if (Array.isArray(initHeaders)) {
20435
+ const nextHeaders2 = [...initHeaders];
20436
+ for (const [k, v] of Object.entries(newHeaders)) {
20437
+ const idx = nextHeaders2.findIndex((item) => Array.isArray(item) && typeof item[0] === "string" && item[0].toLowerCase() === k.toLowerCase());
20438
+ if (idx !== -1) {
20439
+ nextHeaders2[idx] = [k, v];
20440
+ } else {
20441
+ nextHeaders2.push([k, v]);
20442
+ }
20443
+ }
20444
+ return nextHeaders2;
20445
+ }
20446
+ const nextHeaders = {};
20447
+ if (initHeaders && typeof initHeaders === "object") {
20448
+ for (const [k, v] of Object.entries(initHeaders)) {
20449
+ nextHeaders[k] = String(v);
20450
+ }
20451
+ }
20452
+ for (const [k, v] of Object.entries(newHeaders)) {
20453
+ const existingKey = Object.keys(nextHeaders).find((key) => key.toLowerCase() === k.toLowerCase());
20454
+ if (existingKey) {
20455
+ nextHeaders[existingKey] = v;
20456
+ } else {
20457
+ nextHeaders[k] = v;
20458
+ }
20459
+ }
20460
+ return nextHeaders;
20461
+ }
20462
+ function resolveModelTier(baseModelId, init) {
20463
+ const parts = baseModelId.split("@");
20464
+ const base = parts[0] || "";
20465
+ const suffixTier = parts[1]?.toLowerCase();
20466
+ const mapping = TIER_MAPPING[base];
20467
+ if (!mapping) {
20468
+ return baseModelId;
20469
+ }
20470
+ const headerTier = getSafeHeader(init?.headers, "x-agy-tier")?.toLowerCase() || null;
20471
+ const requestedTier = headerTier || suffixTier;
20472
+ if (requestedTier && Object.prototype.hasOwnProperty.call(mapping, requestedTier)) {
20473
+ return mapping[requestedTier] || baseModelId;
20474
+ }
20475
+ return mapping["medium"] ?? mapping["high"];
20476
+ }
20526
20477
  var AgyCLIOAuthPlugin = async ({ client }) => {
20527
20478
  let latestConfig;
20528
20479
  updateStaticModelsWithPricing(STATIC_MODELS);
@@ -20850,754 +20801,25 @@ async function ensureProjectContextOrThrow(authRecord, client, configuredProject
20850
20801
  throw error45;
20851
20802
  }
20852
20803
  }
20853
-
20854
- // src/plugin/types.ts
20855
- function defineOpenCodeV2Plugin(def) {
20856
- return def;
20857
- }
20858
-
20859
- // src/plugin/v2-storage.ts
20860
- import { existsSync as existsSync6, mkdirSync as mkdirSync5, readFileSync as readFileSync5, writeFileSync as writeFileSync5 } from "fs";
20861
- import { homedir as homedir4 } from "os";
20862
- import { join as join6 } from "path";
20863
- var storedAuthOverrideForTesting = void 0;
20864
- function loadStoredAuthFromJson() {
20865
- if (storedAuthOverrideForTesting !== void 0) {
20866
- return storedAuthOverrideForTesting;
20867
- }
20868
- const authPath = join6(homedir4(), ".local", "share", "opencode", "auth.json");
20869
- try {
20870
- if (existsSync6(authPath)) {
20871
- const content = readFileSync5(authPath, "utf8");
20872
- const data = JSON.parse(content);
20873
- return data?.[AGY_PROVIDER_ID];
20874
- }
20875
- } catch {
20876
- }
20877
- return void 0;
20878
- }
20879
- function saveStoredAuthToJson(authRecord) {
20880
- if (process.env.NODE_ENV === "test" || process.env.VITEST || storedAuthOverrideForTesting !== void 0) {
20881
- return;
20882
- }
20883
- try {
20884
- const dirPath = join6(homedir4(), ".local", "share", "opencode");
20885
- if (!existsSync6(dirPath)) {
20886
- mkdirSync5(dirPath, { recursive: true });
20887
- }
20888
- const authPath = join6(dirPath, "auth.json");
20889
- let data = {};
20890
- if (existsSync6(authPath)) {
20891
- try {
20892
- data = JSON.parse(readFileSync5(authPath, "utf8")) || {};
20893
- } catch {
20894
- data = {};
20895
- }
20896
- }
20897
- data[AGY_PROVIDER_ID] = {
20898
- type: "oauth",
20899
- refresh: authRecord.refresh,
20900
- access: authRecord.access,
20901
- expires: authRecord.expires
20902
- };
20903
- writeFileSync5(authPath, JSON.stringify(data, null, 2), "utf8");
20904
- } catch {
20905
- }
20906
- }
20907
-
20908
- // src/plugin/v2-fetch.ts
20909
- function createV2FetchInterceptor(getAuthSnapshot) {
20910
- return async function agyV2Fetch(input, init) {
20911
- const isGL = isGenerativeLanguageRequest(input);
20912
- const isInternal = toUrlString(input).includes("cloudcode-pa.googleapis.com");
20913
- if (!isGL && !isInternal) {
20914
- return (globalThis.fetch || fetch)(input, init);
20915
- }
20916
- let rawAuth = getAuthSnapshot ? await getAuthSnapshot() : void 0;
20917
- if (!rawAuth) {
20918
- rawAuth = loadStoredAuthFromJson();
20919
- }
20920
- if (!rawAuth || !isOAuthAuth(rawAuth)) {
20921
- return (globalThis.fetch || fetch)(input, init);
20922
- }
20923
- let authRecord = resolveCachedAuth(rawAuth);
20924
- if (accessTokenExpired(authRecord)) {
20925
- const refreshed = await refreshAccessToken(authRecord, { auth: { set: async () => {
20926
- } } });
20927
- if (refreshed) {
20928
- authRecord = refreshed;
20929
- }
20930
- }
20931
- if (!authRecord.access) {
20932
- return (globalThis.fetch || fetch)(input, init);
20933
- }
20934
- if (isInternal) {
20935
- const hasAuth = getSafeHeader(init?.headers, "Authorization") !== void 0;
20936
- if (hasAuth) {
20937
- return (globalThis.fetch || fetch)(input, init);
20938
- }
20939
- const userAgent = buildAgyCliUserAgent();
20940
- const headers = setSafeHeaders(init?.headers, {
20941
- Authorization: `Bearer ${authRecord.access}`,
20942
- "User-Agent": userAgent
20943
- });
20944
- return (globalThis.fetch || fetch)(input, {
20945
- ...init,
20946
- headers
20947
- });
20948
- }
20949
- const requestTarget = parseGenerativeLanguageRequest(input);
20950
- const requestUserAgentModel = requestTarget?.effectiveModel;
20951
- let projectContext;
20952
- try {
20953
- projectContext = await ensureProjectContext(
20954
- authRecord,
20955
- { auth: { set: async () => {
20956
- } } },
20957
- void 0,
20958
- requestUserAgentModel
20959
- );
20960
- } catch {
20961
- projectContext = {
20962
- effectiveProjectId: parseRefreshParts(authRecord.refresh).projectId || "antigravity",
20963
- auth: authRecord
20964
- };
20965
- }
20966
- const originalRequestedModel = parseGenerativeLanguageRequest(input)?.effectiveModel;
20967
- let modifiedInput = input;
20968
- if (isGL && originalRequestedModel) {
20969
- const originalBase = originalRequestedModel.replace("google-agy/", "");
20970
- const resolvedBase = resolveModelTier(originalBase, init);
20971
- if (originalBase !== resolvedBase) {
20972
- if (typeof modifiedInput === "string") {
20973
- modifiedInput = modifiedInput.replace(`models/${originalBase}`, `models/${resolvedBase}`);
20974
- } else if (typeof Request !== "undefined" && modifiedInput instanceof Request) {
20975
- const newUrl = modifiedInput.url.replace(`models/${originalBase}`, `models/${resolvedBase}`);
20976
- modifiedInput = new Request(newUrl, modifiedInput);
20977
- }
20978
- }
20979
- }
20980
- const transformed = prepareAgyRequest(
20981
- modifiedInput,
20982
- init,
20983
- authRecord.access,
20984
- projectContext.effectiveProjectId,
20985
- void 0
20986
- );
20987
- const chatLogger = createChatLogger();
20988
- if (chatLogger) {
20989
- chatLogger.logRequest(
20990
- toUrlString(transformed.request),
20991
- transformed.init.method || "GET",
20992
- transformed.init.headers,
20993
- transformed.init.body
20994
- );
20995
- }
20996
- const response = await fetchWithRetry(transformed.request, transformed.init);
20997
- return transformAgyResponse(
20998
- response,
20999
- transformed.streaming,
21000
- null,
21001
- transformed.requestedModel,
21002
- transformed.sessionId,
21003
- chatLogger
21004
- );
21005
- };
21006
- }
21007
-
21008
- // src/plugin/v2-session.ts
21009
- function createV2HttpRequestHook(state = {}) {
21010
- return async (event) => {
21011
- if (!event) return;
21012
- const rawUrl = typeof event.url === "string" ? event.url : event.request?.url || "";
21013
- const isGL = isGenerativeLanguageRequest(rawUrl);
21014
- const isInternal = rawUrl.includes("cloudcode-pa.googleapis.com");
21015
- if (!isGL && !isInternal) {
21016
- return;
21017
- }
21018
- event.headers = event.headers || {};
21019
- let modelName;
21020
- let rawAuth = event.auth;
21021
- if (rawAuth && !rawAuth.type) {
21022
- const tokenVal = rawAuth.access || rawAuth.token;
21023
- if (tokenVal || rawAuth.refresh) {
21024
- rawAuth = { type: "oauth", access: tokenVal, ...rawAuth };
21025
- }
21026
- }
21027
- if (!rawAuth || !isOAuthAuth(rawAuth)) {
21028
- rawAuth = loadStoredAuthFromJson();
21029
- }
21030
- let authRecord = rawAuth && isOAuthAuth(rawAuth) ? resolveCachedAuth(rawAuth) : void 0;
21031
- if (authRecord && accessTokenExpired(authRecord)) {
21032
- const refreshed = await refreshAccessToken(authRecord, { auth: { set: async () => {
21033
- } } });
21034
- if (refreshed) {
21035
- authRecord = refreshed;
21036
- saveStoredAuthToJson(refreshed);
21037
- }
21038
- }
21039
- if (isGL) {
21040
- const parsed = parseGenerativeLanguageRequest(rawUrl);
21041
- modelName = parsed?.effectiveModel;
21042
- if (modelName) {
21043
- state.lastInterceptedModel = modelName;
21044
- }
21045
- if (typeof event.headers.delete === "function") {
21046
- event.headers.delete("x-goog-api-key");
21047
- event.headers.delete("api-key");
21048
- } else {
21049
- for (const key of Object.keys(event.headers)) {
21050
- const lower = key.toLowerCase();
21051
- if (lower === "x-goog-api-key" || lower === "api-key") {
21052
- delete event.headers[key];
21053
- }
21054
- }
21055
- }
21056
- if (event.request?.headers) {
21057
- if (typeof event.request.headers.delete === "function") {
21058
- event.request.headers.delete("x-goog-api-key");
21059
- event.request.headers.delete("api-key");
21060
- } else {
21061
- for (const key of Object.keys(event.request.headers)) {
21062
- const lower = key.toLowerCase();
21063
- if (lower === "x-goog-api-key" || lower === "api-key") {
21064
- delete event.request.headers[key];
21065
- }
21066
- }
21067
- }
21068
- }
21069
- let cleanUrl = rawUrl;
21070
- try {
21071
- const parsedUrl = new URL(rawUrl);
21072
- let urlChanged = false;
21073
- for (const param of ["key", "x-goog-api-key", "api-key"]) {
21074
- if (parsedUrl.searchParams.has(param)) {
21075
- parsedUrl.searchParams.delete(param);
21076
- urlChanged = true;
21077
- }
21078
- }
21079
- if (urlChanged) {
21080
- cleanUrl = parsedUrl.toString();
21081
- }
21082
- } catch {
21083
- }
21084
- if (authRecord && authRecord.access) {
21085
- let projectContext;
21086
- try {
21087
- projectContext = await ensureProjectContext(
21088
- authRecord,
21089
- { auth: { set: async () => {
21090
- } } },
21091
- void 0,
21092
- modelName
21093
- );
21094
- } catch {
21095
- projectContext = {
21096
- effectiveProjectId: parseRefreshParts(authRecord.refresh).projectId || "antigravity",
21097
- auth: authRecord
21098
- };
21099
- }
21100
- const originalRequestedModel = modelName;
21101
- let modifiedUrl = cleanUrl;
21102
- if (originalRequestedModel) {
21103
- const originalBase = originalRequestedModel.replace("google-agy/", "");
21104
- const initHeaders = event.headers instanceof Headers ? event.headers : event.request?.headers;
21105
- const resolvedBase = resolveModelTier(originalBase, { headers: initHeaders });
21106
- if (originalBase !== resolvedBase) {
21107
- modifiedUrl = modifiedUrl.replace(`models/${originalBase}`, `models/${resolvedBase}`);
21108
- }
21109
- }
21110
- let bodyPayload = event.body;
21111
- if (bodyPayload === void 0 && event.request) {
21112
- if (typeof event.request.clone === "function") {
21113
- try {
21114
- bodyPayload = await event.request.clone().text();
21115
- } catch {
21116
- }
21117
- } else if (event.request.body !== void 0) {
21118
- bodyPayload = event.request.body;
21119
- }
21120
- }
21121
- let preExistingUserAgent;
21122
- if (typeof event.headers?.get === "function") {
21123
- preExistingUserAgent = event.headers.get("user-agent") || event.headers.get("User-Agent") || void 0;
21124
- } else if (event.headers && typeof event.headers === "object") {
21125
- preExistingUserAgent = event.headers["user-agent"] || event.headers["User-Agent"] || void 0;
21126
- }
21127
- if (!preExistingUserAgent && typeof event.request?.headers?.get === "function") {
21128
- preExistingUserAgent = event.request.headers.get("user-agent") || event.request.headers.get("User-Agent") || void 0;
21129
- } else if (!preExistingUserAgent && event.request?.headers && typeof event.request.headers === "object") {
21130
- preExistingUserAgent = event.request.headers["user-agent"] || event.request.headers["User-Agent"] || void 0;
21131
- }
21132
- const method = event.method || event.request?.method || "POST";
21133
- const requestHeaders = event.headers || event.request?.headers;
21134
- const transformed = prepareAgyRequest(
21135
- modifiedUrl,
21136
- {
21137
- method,
21138
- headers: requestHeaders,
21139
- body: bodyPayload
21140
- },
21141
- authRecord.access,
21142
- projectContext.effectiveProjectId
21143
- );
21144
- const targetUrl = toUrlString(transformed.request);
21145
- if (typeof event.url === "string") {
21146
- event.url = targetUrl;
21147
- }
21148
- if (event.request && typeof event.request === "object") {
21149
- if (typeof Request !== "undefined" && event.request instanceof Request) {
21150
- event.request = new Request(targetUrl, {
21151
- method: transformed.init.method,
21152
- headers: transformed.init.headers,
21153
- body: transformed.init.body
21154
- });
21155
- } else if (typeof event.request.url === "string") {
21156
- try {
21157
- event.request.url = targetUrl;
21158
- } catch {
21159
- }
21160
- }
21161
- }
21162
- const headerEntries = transformed.init.headers instanceof Headers ? Array.from(transformed.init.headers.entries()) : Object.entries(transformed.init.headers || {});
21163
- for (const [k, v] of headerEntries) {
21164
- const lowerK = k.toLowerCase();
21165
- if (lowerK === "user-agent") {
21166
- if (preExistingUserAgent) {
21167
- continue;
21168
- }
21169
- if (typeof event.headers?.set === "function") {
21170
- event.headers.set("User-Agent", v);
21171
- } else if (event.headers) {
21172
- event.headers["User-Agent"] = v;
21173
- }
21174
- if (event.request?.headers && typeof event.request.headers.set === "function") {
21175
- event.request.headers.set("User-Agent", v);
21176
- } else if (event.request?.headers && typeof event.request.headers === "object") {
21177
- event.request.headers["User-Agent"] = v;
21178
- }
21179
- continue;
21180
- }
21181
- if (typeof event.headers?.set === "function") {
21182
- event.headers.set(k, v);
21183
- } else if (event.headers) {
21184
- event.headers[k] = v;
21185
- }
21186
- if (event.request?.headers && typeof event.request.headers.set === "function") {
21187
- event.request.headers.set(k, v);
21188
- } else if (event.request?.headers && typeof event.request.headers === "object") {
21189
- event.request.headers[k] = v;
21190
- }
21191
- }
21192
- if (transformed.init.body !== void 0) {
21193
- event.body = transformed.init.body;
21194
- if (event.request && typeof event.request === "object" && !(event.request instanceof Request)) {
21195
- event.request.body = transformed.init.body;
21196
- }
21197
- }
21198
- } else {
21199
- if (typeof event.url === "string") {
21200
- event.url = cleanUrl;
21201
- }
21202
- if (event.request && typeof event.request === "object") {
21203
- if (typeof Request !== "undefined" && event.request instanceof Request) {
21204
- event.request = new Request(cleanUrl, event.request);
21205
- } else if (typeof event.request.url === "string") {
21206
- try {
21207
- event.request.url = cleanUrl;
21208
- } catch {
21209
- }
21210
- }
21211
- }
21212
- }
21213
- }
21214
- if (authRecord && authRecord.access) {
21215
- if (typeof event.headers?.set === "function") {
21216
- event.headers.set("Authorization", `Bearer ${authRecord.access}`);
21217
- } else if (event.headers) {
21218
- event.headers["Authorization"] = `Bearer ${authRecord.access}`;
21219
- }
21220
- if (event.request?.headers && typeof event.request.headers.set === "function") {
21221
- event.request.headers.set("Authorization", `Bearer ${authRecord.access}`);
21222
- } else if (event.request?.headers && typeof event.request.headers === "object") {
21223
- event.request.headers["Authorization"] = `Bearer ${authRecord.access}`;
21224
- }
21225
- }
21226
- const userAgent = buildAgyCliUserAgent(modelName);
21227
- if (typeof event.headers?.set === "function") {
21228
- if (!event.headers.get("User-Agent") && !event.headers.get("user-agent")) {
21229
- event.headers.set("User-Agent", userAgent);
21230
- }
21231
- } else if (event.headers) {
21232
- if (!event.headers["User-Agent"] && !event.headers["user-agent"]) {
21233
- event.headers["User-Agent"] = userAgent;
21234
- }
21235
- }
21236
- if (event.request?.headers && typeof event.request.headers.set === "function") {
21237
- if (!event.request.headers.get("User-Agent") && !event.request.headers.get("user-agent")) {
21238
- event.request.headers.set("User-Agent", userAgent);
21239
- }
21240
- } else if (event.request?.headers && typeof event.request.headers === "object") {
21241
- if (!event.request.headers["User-Agent"] && !event.request.headers["user-agent"]) {
21242
- event.request.headers["User-Agent"] = userAgent;
21243
- }
21244
- }
21245
- };
21246
- }
21247
- function createV2HttpResponseHook(state = {}) {
21248
- return async (event) => {
21249
- if (!event || !event.response) return;
21250
- const rawUrl = typeof event.url === "string" ? event.url : event.request?.url || "";
21251
- const isInternal = rawUrl.includes("cloudcode-pa.googleapis.com");
21252
- if (isInternal && event.response instanceof Response) {
21253
- const isStreaming = rawUrl.includes(":streamGenerateCode") || event.response.headers.get("content-type")?.includes("text/event-stream");
21254
- const parsedModel = parseGenerativeLanguageRequest(rawUrl)?.effectiveModel || state.lastInterceptedModel;
21255
- const transformed = await transformAgyResponse(
21256
- event.response,
21257
- !!isStreaming,
21258
- null,
21259
- parsedModel,
21260
- void 0,
21261
- void 0
21262
- );
21263
- event.response = transformed;
21264
- }
21265
- };
21266
- }
21267
- function createV2RetryHook() {
21268
- return async (event) => {
21269
- if (!event) return;
21270
- const response = event.response;
21271
- if (response instanceof Response) {
21272
- if (response.status === 429 || response.status === 503) {
21273
- const quota = await classifyQuotaResponse(response);
21274
- if (quota?.retryDelayMs) {
21275
- event.retryDelayMs = quota.retryDelayMs;
21276
- } else {
21277
- event.retryDelayMs = await resolveRetryDelayMs(response, event.attempt || 1);
21278
- }
21279
- }
21280
- } else if (event.details && Array.isArray(event.details)) {
21281
- const retryInfo = event.details.find(
21282
- (d) => d && d["@type"] === "type.googleapis.com/google.rpc.RetryInfo"
21283
- );
21284
- if (retryInfo?.retryDelay) {
21285
- const delayMs = retryInternals.parseRetryDelayValue(retryInfo.retryDelay);
21286
- if (delayMs !== null) {
21287
- event.retryDelayMs = delayMs;
21288
- }
21289
- }
21290
- }
21291
- };
21292
- }
21293
- function registerV2SessionHooks(ctx) {
21294
- const state = {};
21295
- ctx.session.hook("http.request", createV2HttpRequestHook(state), { providerID: AGY_PROVIDER_ID });
21296
- ctx.session.hook("http.response", createV2HttpResponseHook(state), { providerID: AGY_PROVIDER_ID });
21297
- ctx.session.hook("retry", createV2RetryHook(), { providerID: AGY_PROVIDER_ID });
21298
- }
21299
-
21300
- // src/plugin/v2.ts
21301
- async function setupOpenCodeV2(ctx) {
21302
- const resolveVariants = (modelId) => {
21303
- const mapping = TIER_MAPPING[modelId];
21304
- if (!mapping) return void 0;
21305
- const variants = [];
21306
- if (mapping.minimal !== void 0) variants.push({ id: "minimal" });
21307
- if (mapping.low !== void 0) variants.push({ id: "low" });
21308
- if (mapping.medium !== void 0) variants.push({ id: "medium" });
21309
- if (mapping.high !== void 0) variants.push({ id: "high" });
21310
- return variants.length > 0 ? variants : void 0;
21311
- };
21312
- const updateProviderRecord = (p) => {
21313
- p.name = "Antigravity CLI";
21314
- p.activation = "enabled";
21315
- p.package = "aisdk:@ai-sdk/google";
21316
- p.description = "Google Gemini Antigravity Code Assist OAuth provider";
21317
- p.settings = { ...p.settings || {}, apiKey: "dummy" };
21318
- p.integrationID = AGY_PROVIDER_ID;
21319
- };
21320
- const buildModelRecord = (modelId, simple, existingModel) => {
21321
- const isClaude = modelId.startsWith("claude-");
21322
- const isGpt = modelId.startsWith("gpt-");
21323
- const variants = resolveVariants(modelId);
21324
- return {
21325
- id: modelId,
21326
- providerID: AGY_PROVIDER_ID,
21327
- name: simple.name,
21328
- description: simple.description,
21329
- family: modelId.includes("gemini") ? "gemini" : isClaude ? "claude" : isGpt ? "gpt" : "unknown",
21330
- reasoning: simple.reasoning,
21331
- attachment: simple.attachment,
21332
- tool_call: simple.toolCall,
21333
- limit: {
21334
- context: simple.maxTokens,
21335
- output: simple.maxOutputTokens
21336
- },
21337
- cost: simple.cost || { input: 0, output: 0 },
21338
- ...variants ? { variants } : {},
21339
- ...existingModel || {}
21340
- };
21341
- };
21342
- const updateModelRecord = (m, modelId, simple) => {
21343
- m.name = simple.name;
21344
- m.capabilities = {
21345
- tools: true,
21346
- input: ["text", "image"],
21347
- output: ["text"]
21348
- };
21349
- m.limit = {
21350
- context: simple.maxTokens,
21351
- output: simple.maxOutputTokens
21352
- };
21353
- m.family = "gemini";
21354
- if (simple.cost) {
21355
- m.cost = simple.cost;
21356
- }
21357
- const variants = resolveVariants(modelId);
21358
- if (variants) {
21359
- m.variants = variants;
21360
- }
21361
- };
21362
- if (ctx.provider?.transform) {
21363
- ctx.provider.transform(async (editor) => {
21364
- if (!editor) return;
21365
- if (typeof editor.update === "function") {
21366
- editor.update(AGY_PROVIDER_ID, updateProviderRecord);
21367
- } else if (typeof editor.set === "function") {
21368
- const p = { id: AGY_PROVIDER_ID };
21369
- updateProviderRecord(p);
21370
- editor.set(AGY_PROVIDER_ID, p);
21371
- } else if (typeof editor === "object") {
21372
- const p = editor[AGY_PROVIDER_ID] || { id: AGY_PROVIDER_ID };
21373
- updateProviderRecord(p);
21374
- editor[AGY_PROVIDER_ID] = p;
21375
- }
21376
- });
21377
- }
21378
- if (ctx.model?.transform) {
21379
- ctx.model.transform(async (editor) => {
21380
- if (!editor) return;
21381
- if (typeof editor.update === "function") {
21382
- for (const [modelId, simple] of Object.entries(STATIC_MODELS_SIMPLE)) {
21383
- editor.update(AGY_PROVIDER_ID, modelId, (m) => updateModelRecord(m, modelId, simple));
21384
- }
21385
- } else if (typeof editor.set === "function") {
21386
- for (const [modelId, simple] of Object.entries(STATIC_MODELS_SIMPLE)) {
21387
- const m = buildModelRecord(modelId, simple);
21388
- editor.set(`${AGY_PROVIDER_ID}:${modelId}`, m);
21389
- }
21390
- } else if (typeof editor === "object") {
21391
- for (const [modelId, simple] of Object.entries(STATIC_MODELS_SIMPLE)) {
21392
- const key = `${AGY_PROVIDER_ID}:${modelId}`;
21393
- editor[key] = buildModelRecord(modelId, simple, editor[key]);
21394
- }
21395
- }
21396
- });
20804
+ function toUrlString(value) {
20805
+ if (typeof value === "string") {
20806
+ return value;
21397
20807
  }
21398
- if (ctx.catalog?.transform) {
21399
- ctx.catalog.transform(async (editor) => {
21400
- if (!editor) return;
21401
- if (typeof editor?.provider?.update === "function") {
21402
- editor.provider.update(AGY_PROVIDER_ID, updateProviderRecord);
21403
- if (typeof editor?.model?.update === "function") {
21404
- for (const [modelId, simple] of Object.entries(STATIC_MODELS_SIMPLE)) {
21405
- editor.model.update(AGY_PROVIDER_ID, modelId, (m) => updateModelRecord(m, modelId, simple));
21406
- }
21407
- }
21408
- return;
21409
- }
21410
- const catalog = editor;
21411
- catalog.providers = catalog.providers || {};
21412
- catalog.providers[AGY_PROVIDER_ID] = {
21413
- id: AGY_PROVIDER_ID,
21414
- name: "Antigravity CLI",
21415
- npm: "aisdk:@ai-sdk/google",
21416
- settings: { apiKey: "dummy" },
21417
- integrationID: AGY_PROVIDER_ID,
21418
- models: { ...catalog.providers[AGY_PROVIDER_ID]?.models || {} },
21419
- ...catalog.providers[AGY_PROVIDER_ID]
21420
- };
21421
- if (catalog.providers[AGY_PROVIDER_ID].settings) {
21422
- catalog.providers[AGY_PROVIDER_ID].settings = {
21423
- ...catalog.providers[AGY_PROVIDER_ID].settings,
21424
- apiKey: "dummy"
21425
- };
21426
- } else {
21427
- catalog.providers[AGY_PROVIDER_ID].settings = { apiKey: "dummy" };
21428
- }
21429
- catalog.providers[AGY_PROVIDER_ID].integrationID = AGY_PROVIDER_ID;
21430
- const targetModels = catalog.providers[AGY_PROVIDER_ID].models;
21431
- for (const [modelId, simple] of Object.entries(STATIC_MODELS_SIMPLE)) {
21432
- targetModels[modelId] = buildModelRecord(modelId, simple, targetModels[modelId]);
21433
- }
21434
- });
20808
+ const candidate = value.url;
20809
+ if (candidate) {
20810
+ return candidate;
21435
20811
  }
21436
- ctx.tool.transform(async (editor) => {
21437
- if (!editor) return;
21438
- const quotaTool = createAgyQuotaTool({
21439
- client: void 0,
21440
- getAuthResolver: () => void 0,
21441
- getConfiguredProjectId: () => void 0,
21442
- getUserAgentModel: () => void 0
21443
- });
21444
- const quotaSummaryTool = createAgyQuotaSummaryTool({
21445
- client: void 0,
21446
- getAuthResolver: () => void 0,
21447
- getConfiguredProjectId: () => void 0,
21448
- getUserAgentModel: () => void 0
21449
- });
21450
- if (typeof editor.add === "function") {
21451
- editor.add({
21452
- name: AGY_QUOTA_TOOL_NAME,
21453
- description: quotaTool.description,
21454
- input: {},
21455
- execute: async (args, context) => quotaTool.execute(args, context)
21456
- });
21457
- editor.add({
21458
- name: AGY_QUOTA_SUMMARY_TOOL_NAME,
21459
- description: quotaSummaryTool.description,
21460
- input: {},
21461
- execute: async (args, context) => quotaSummaryTool.execute(args, context)
21462
- });
21463
- } else if (typeof editor.set === "function") {
21464
- editor.set(AGY_QUOTA_TOOL_NAME, quotaTool);
21465
- editor.set(AGY_QUOTA_SUMMARY_TOOL_NAME, quotaSummaryTool);
21466
- } else if (editor.tools && typeof editor.tools === "object") {
21467
- editor.tools[AGY_QUOTA_TOOL_NAME] = quotaTool;
21468
- editor.tools[AGY_QUOTA_SUMMARY_TOOL_NAME] = quotaSummaryTool;
21469
- } else if (typeof editor === "object") {
21470
- editor[AGY_QUOTA_TOOL_NAME] = quotaTool;
21471
- editor[AGY_QUOTA_SUMMARY_TOOL_NAME] = quotaSummaryTool;
21472
- }
21473
- });
21474
- ctx.command.transform(async (editor) => {
21475
- if (!editor) return;
21476
- const commands = {
21477
- [AGY_V2_QUOTA_COMMAND]: {
21478
- description: "Show Agy Code Assist quota usage",
21479
- template: AGY_V2_QUOTA_COMMAND_TEMPLATE
21480
- },
21481
- [AGY_V2_QUOTA_SUMMARY_COMMAND]: {
21482
- description: "Show Agy Code Assist quota summary with weekly and 5-hour limits",
21483
- template: AGY_V2_QUOTA_SUMMARY_COMMAND_TEMPLATE
21484
- }
21485
- };
21486
- if (typeof editor.add === "function") {
21487
- editor.add({
21488
- name: AGY_V2_QUOTA_COMMAND,
21489
- description: "Display current Antigravity quota usage",
21490
- template: AGY_V2_QUOTA_COMMAND_TEMPLATE
21491
- });
21492
- editor.add({
21493
- name: AGY_V2_QUOTA_SUMMARY_COMMAND,
21494
- description: "Display Antigravity quota summary grouped by model family",
21495
- template: AGY_V2_QUOTA_SUMMARY_COMMAND_TEMPLATE
21496
- });
21497
- } else if (typeof editor.set === "function") {
21498
- editor.set(AGY_V2_QUOTA_COMMAND, commands[AGY_V2_QUOTA_COMMAND]);
21499
- editor.set(AGY_V2_QUOTA_SUMMARY_COMMAND, commands[AGY_V2_QUOTA_SUMMARY_COMMAND]);
21500
- } else if (editor.commands && typeof editor.commands === "object") {
21501
- editor.commands[AGY_V2_QUOTA_COMMAND] = commands[AGY_V2_QUOTA_COMMAND];
21502
- editor.commands[AGY_V2_QUOTA_SUMMARY_COMMAND] = commands[AGY_V2_QUOTA_SUMMARY_COMMAND];
21503
- } else if (typeof editor === "object") {
21504
- editor[AGY_V2_QUOTA_COMMAND] = commands[AGY_V2_QUOTA_COMMAND];
21505
- editor[AGY_V2_QUOTA_SUMMARY_COMMAND] = commands[AGY_V2_QUOTA_SUMMARY_COMMAND];
21506
- }
21507
- });
21508
- ctx.integration?.transform?.((editor) => {
21509
- if (!editor) return;
21510
- editor.update?.(AGY_PROVIDER_ID, (integration) => {
21511
- integration.name = "Antigravity CLI (plugin)";
21512
- });
21513
- editor.method?.update?.({
21514
- integrationID: AGY_PROVIDER_ID,
21515
- method: {
21516
- id: "oauth",
21517
- type: "oauth",
21518
- label: "Antigravity CLI (OAuth)"
21519
- },
21520
- authorize: async () => {
21521
- const authorization = await authorizeAgy();
21522
- return {
21523
- mode: "code",
21524
- url: authorization.url,
21525
- instructions: "Please complete Google account authorization in your browser. After authorization, copy the full redirect URL or code and paste it below:",
21526
- callback: async (code) => {
21527
- const trimmed = code.trim();
21528
- const parsed = parseOAuthCallbackInput(trimmed);
21529
- const authCode = parsed.code || trimmed;
21530
- if (!authCode) {
21531
- return { type: "failed", error: "Missing authorization code in callback input" };
21532
- }
21533
- if (parsed.state && parsed.state !== authorization.state) {
21534
- return { type: "failed", error: "State mismatch in callback input (possible CSRF attempt)" };
21535
- }
21536
- const exchangeResult = await exchangeAgyWithVerifier(authCode, authorization.verifier);
21537
- if (exchangeResult.type !== "success") {
21538
- return exchangeResult;
21539
- }
21540
- const initialRefresh = formatRefreshParts({
21541
- refreshToken: exchangeResult.refresh
21542
- });
21543
- let authRecord = {
21544
- type: "oauth",
21545
- refresh: initialRefresh,
21546
- access: exchangeResult.access,
21547
- expires: exchangeResult.expires
21548
- };
21549
- try {
21550
- const projectContext = await ensureProjectContext(
21551
- authRecord,
21552
- { auth: { set: async () => {
21553
- } } }
21554
- );
21555
- authRecord = {
21556
- ...authRecord,
21557
- refresh: projectContext.auth.refresh
21558
- };
21559
- } catch {
21560
- }
21561
- saveStoredAuthToJson(authRecord);
21562
- return {
21563
- type: "oauth",
21564
- methodID: "oauth",
21565
- refresh: authRecord.refresh,
21566
- access: authRecord.access,
21567
- expires: authRecord.expires
21568
- };
21569
- }
21570
- };
21571
- }
21572
- });
21573
- });
21574
- ctx.aisdk?.hook("sdk", async (event) => {
21575
- if (!event) return;
21576
- const isMatchingProvider = event.providerID === AGY_PROVIDER_ID || event.model?.providerID === AGY_PROVIDER_ID;
21577
- if (!isMatchingProvider) return;
21578
- event.options = event.options || {};
21579
- event.options.apiKey = "dummy";
21580
- event.options.fetch = createV2FetchInterceptor();
21581
- });
21582
- registerV2SessionHooks(ctx);
20812
+ return value.toString();
21583
20813
  }
21584
- var v2PluginDefinition = defineOpenCodeV2Plugin({
21585
- id: AGY_PROVIDER_ID,
21586
- setup: setupOpenCodeV2
21587
- });
21588
20814
 
21589
20815
  // index.ts
21590
- var dualPlugin = {
21591
- ...v2PluginDefinition,
20816
+ var index_default = {
20817
+ id: "@anthonyhaussman/opencode-agy-auth",
21592
20818
  server: AgyCLIOAuthPlugin
21593
20819
  };
21594
- var index_default = dualPlugin;
21595
20820
  export {
21596
20821
  AgyCLIOAuthPlugin,
21597
20822
  GoogleOAuthPlugin,
21598
- index_default as default,
21599
- defineOpenCodeV2Plugin,
21600
- setupOpenCodeV2,
21601
- v2PluginDefinition
20823
+ index_default as default
21602
20824
  };
21603
20825
  //# sourceMappingURL=index.js.map