@acosmi/sdk-ts 1.3.1 → 1.4.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.
package/dist/index.mjs CHANGED
@@ -1056,7 +1056,7 @@ init_adapters();
1056
1056
 
1057
1057
  // src/auth.ts
1058
1058
  var authTimeoutMs = 3e4;
1059
- async function discover(serverURL, signal) {
1059
+ async function discoverWithProfile(serverURL, profile, signal) {
1060
1060
  let parsed;
1061
1061
  try {
1062
1062
  parsed = new URL(serverURL.replace(/\/+$/, ""));
@@ -1064,7 +1064,7 @@ async function discover(serverURL, signal) {
1064
1064
  throw new Error(`discover: invalid server URL: ${e instanceof Error ? e.message : String(e)}`);
1065
1065
  }
1066
1066
  const origin = `${parsed.protocol}//${parsed.host}`;
1067
- const endpoint = `${origin}/.well-known/oauth-authorization-server/desktop`;
1067
+ const endpoint = `${origin}/.well-known/oauth-authorization-server/${profile}`;
1068
1068
  const ctl = withTimeout(authTimeoutMs, signal);
1069
1069
  let resp;
1070
1070
  try {
@@ -1090,6 +1090,12 @@ async function discover(serverURL, signal) {
1090
1090
  }
1091
1091
  return meta;
1092
1092
  }
1093
+ async function discover(serverURL, signal) {
1094
+ return discoverWithProfile(serverURL, "desktop", signal);
1095
+ }
1096
+ async function discoverWebOAuthMetadata(serverURL, signal) {
1097
+ return discoverWithProfile(serverURL, "web", signal);
1098
+ }
1093
1099
  async function register(meta, appName, signal) {
1094
1100
  const regReq = {
1095
1101
  client_name: appName,
@@ -1121,12 +1127,50 @@ async function register(meta, appName, signal) {
1121
1127
  throw new Error(`register: decode: ${e instanceof Error ? e.message : String(e)}`);
1122
1128
  }
1123
1129
  }
1124
- async function generateCodeVerifier() {
1130
+ async function registerWebOAuthClient(meta, opts, signal) {
1131
+ const regReq = {
1132
+ client_name: opts.clientName,
1133
+ token_endpoint_auth_method: "none",
1134
+ grant_types: ["authorization_code", "refresh_token"],
1135
+ redirect_uris: opts.redirectURIs,
1136
+ response_types: ["code"],
1137
+ ...opts.scopes ? { scope: opts.scopes.join(" ") } : {}
1138
+ };
1139
+ const ctl = withTimeout(authTimeoutMs, signal);
1140
+ let resp;
1141
+ try {
1142
+ resp = await fetch(meta.registration_endpoint, {
1143
+ method: "POST",
1144
+ headers: { "Content-Type": "application/json" },
1145
+ body: JSON.stringify(regReq),
1146
+ signal: ctl.signal
1147
+ });
1148
+ } catch (e) {
1149
+ throw new Error(`register: ${e instanceof Error ? e.message : String(e)}`);
1150
+ } finally {
1151
+ ctl.dispose();
1152
+ }
1153
+ if (resp.status !== 200 && resp.status !== 201) {
1154
+ throw new Error(`register: HTTP ${resp.status}`);
1155
+ }
1156
+ try {
1157
+ return await resp.json();
1158
+ } catch (e) {
1159
+ throw new Error(`register: decode: ${e instanceof Error ? e.message : String(e)}`);
1160
+ }
1161
+ }
1162
+ async function randomBase64Url32() {
1125
1163
  const c = await getCrypto();
1126
1164
  const b = new Uint8Array(32);
1127
1165
  c.getRandomValues(b);
1128
1166
  return base64urlNoPad(b);
1129
1167
  }
1168
+ async function generateCodeVerifier() {
1169
+ return randomBase64Url32();
1170
+ }
1171
+ async function generateState() {
1172
+ return randomBase64Url32();
1173
+ }
1130
1174
  async function codeChallenge(verifier) {
1131
1175
  const c = await getCrypto();
1132
1176
  const buf = await c.subtle.digest("SHA-256", new TextEncoder().encode(verifier));
@@ -1160,6 +1204,7 @@ var ErrAuthDenied = "auth_denied";
1160
1204
  var ErrTimeout = "auth_timeout";
1161
1205
  var ErrTokenExchange = "token_exchange_failed";
1162
1206
  var ErrSSLProxy = "ssl_proxy_detected";
1207
+ var ErrStateMismatch = "state_mismatch";
1163
1208
  function isSSLError(err) {
1164
1209
  const msg = err instanceof Error ? err.message : String(err);
1165
1210
  return msg.includes("tls:") || msg.includes("x509:") || msg.includes("certificate");
@@ -1273,6 +1318,51 @@ async function authorize(meta, clientID, scopes, opts = {}) {
1273
1318
  function htmlEscape(s) {
1274
1319
  return s.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&#39;");
1275
1320
  }
1321
+ async function createWebAuthorizationRequest(meta, opts) {
1322
+ const verifier = await generateCodeVerifier();
1323
+ const challenge = await codeChallenge(verifier);
1324
+ const state = await generateState();
1325
+ const authURL = new URL(meta.authorization_endpoint);
1326
+ authURL.searchParams.set("response_type", "code");
1327
+ authURL.searchParams.set("client_id", opts.clientID);
1328
+ authURL.searchParams.set("redirect_uri", opts.redirectURI);
1329
+ authURL.searchParams.set("code_challenge", challenge);
1330
+ authURL.searchParams.set("code_challenge_method", "S256");
1331
+ authURL.searchParams.set("state", state);
1332
+ authURL.searchParams.set("scope", opts.scopes.join(" "));
1333
+ if (opts.loginHint) {
1334
+ authURL.searchParams.set("login_hint", opts.loginHint);
1335
+ }
1336
+ return {
1337
+ authUrl: authURL.toString(),
1338
+ state,
1339
+ verifier,
1340
+ clientID: opts.clientID,
1341
+ redirectURI: opts.redirectURI,
1342
+ serverURL: opts.serverURL,
1343
+ createdAt: Date.now()
1344
+ };
1345
+ }
1346
+ async function completeWebAuthorizationRequest(pending, params, signal) {
1347
+ if (!params.code) {
1348
+ throw new Error("completeWebAuthorizationRequest: missing authorization code");
1349
+ }
1350
+ if (params.state !== pending.state) {
1351
+ throw new Error(
1352
+ `completeWebAuthorizationRequest: ${ErrStateMismatch}: callback state does not match pending state (possible CSRF)`
1353
+ );
1354
+ }
1355
+ const meta = await discoverWebOAuthMetadata(pending.serverURL, signal);
1356
+ const resp = await exchangeCode(
1357
+ meta,
1358
+ pending.clientID,
1359
+ params.code,
1360
+ pending.redirectURI,
1361
+ pending.verifier,
1362
+ signal
1363
+ );
1364
+ return newTokenSet(resp, pending.clientID, pending.serverURL);
1365
+ }
1276
1366
  async function exchangeCode(meta, clientID, code, redirectURI, codeVerifier, signal) {
1277
1367
  const data = new URLSearchParams({
1278
1368
  grant_type: "authorization_code",
@@ -1439,6 +1529,7 @@ var ScopeComplianceSealApprovalRequest = "compliance:seal_approval:request";
1439
1529
  var ScopeComplianceSealApprovalApprove = "compliance:seal_approval:approve";
1440
1530
  var ScopeComplianceSealUseExecute = "compliance:seal_use:execute";
1441
1531
  var ScopeComplianceReportsRead = "compliance:reports:read";
1532
+ var ScopeComplianceReportsWrite = "compliance:reports:write";
1442
1533
  var ScopeComplianceReportsPublish = "compliance:reports:publish";
1443
1534
  function allScopes() {
1444
1535
  return [ScopeAI, ScopeSkills, ScopeAccount];
@@ -1456,6 +1547,7 @@ function complianceScopes() {
1456
1547
  ScopeComplianceSealApprovalApprove,
1457
1548
  ScopeComplianceSealUseExecute,
1458
1549
  ScopeComplianceReportsRead,
1550
+ ScopeComplianceReportsWrite,
1459
1551
  ScopeComplianceReportsPublish
1460
1552
  ];
1461
1553
  }
@@ -2163,6 +2255,8 @@ var Client = class _Client {
2163
2255
  serverURL;
2164
2256
  /** Compliance API 根地址 (已 trim 尾随 /); null = 走默认 ${serverURL}/admin-api */
2165
2257
  complianceBaseURL;
2258
+ /** OAuth metadata profile — 刷新 token 时发现 metadata 用 (默认 'desktop') */
2259
+ oauthMetadataProfile;
2166
2260
  /** OAuth metadata (lazy loaded) */
2167
2261
  meta = null;
2168
2262
  /** 当前 token (内存) */
@@ -2197,6 +2291,7 @@ var Client = class _Client {
2197
2291
  constructor(cfg = {}) {
2198
2292
  this.serverURL = (cfg.serverURL ?? "https://acosmi.com").replace(/\/+$/, "");
2199
2293
  this.complianceBaseURL = cfg.complianceBaseURL ? cfg.complianceBaseURL.replace(/\/+$/, "") : null;
2294
+ this.oauthMetadataProfile = cfg.oauthMetadataProfile ?? "desktop";
2200
2295
  this.store = cfg.store ?? defaultTokenStore();
2201
2296
  this.fetchImpl = cfg.fetchImpl ?? globalThis.fetch.bind(globalThis);
2202
2297
  this.retryPolicy = effectivePolicy(cfg.retryPolicy ?? null);
@@ -2371,7 +2466,7 @@ var Client = class _Client {
2371
2466
  if (tokens) {
2372
2467
  if (!meta) {
2373
2468
  try {
2374
- meta = await discover(this.serverURL, signal);
2469
+ meta = await discoverWithProfile(this.serverURL, this.oauthMetadataProfile, signal);
2375
2470
  } catch (e) {
2376
2471
  console.warn(`[acosmi-sdk] warning: discover for revocation failed: ${e instanceof Error ? e.message : String(e)}`);
2377
2472
  }
@@ -2442,7 +2537,7 @@ var Client = class _Client {
2442
2537
  }
2443
2538
  if (this.meta == null) {
2444
2539
  try {
2445
- this.meta = await discover(this.serverURL, signal);
2540
+ this.meta = await discoverWithProfile(this.serverURL, this.oauthMetadataProfile, signal);
2446
2541
  } catch (e) {
2447
2542
  throw new Error(
2448
2543
  `discover for refresh: ${e instanceof Error ? e.message : String(e)}`
@@ -2474,7 +2569,7 @@ var Client = class _Client {
2474
2569
  throw new Error("no tokens to refresh");
2475
2570
  }
2476
2571
  if (this.meta == null) {
2477
- this.meta = await discover(this.serverURL, signal);
2572
+ this.meta = await discoverWithProfile(this.serverURL, this.oauthMetadataProfile, signal);
2478
2573
  }
2479
2574
  const tokenResp = await refreshToken(
2480
2575
  this.meta,
@@ -3326,17 +3421,20 @@ var ComplianceClient = class {
3326
3421
  }
3327
3422
  /**
3328
3423
  * 公开 verify。隐私边界:返回字段不含 PII / 合同原文 / storage / provider raw。
3329
- * 服务端不要求 compliance scope(公开端点);但 SDK 仍带上 token 以便审计。
3424
+ *
3425
+ * 匿名可调用:未 login 时走匿名请求,不会抛 `not authorized, call login() first`。
3426
+ * 已 login / 已持有 token 时附带 `Authorization` 以保留审计上下文。public 端点不
3427
+ * 应要求认证 — 收到 401 直接抛 HTTPError,不触发 `forceRefresh`,也不做 refresh
3428
+ * replay。
3330
3429
  */
3331
3430
  verifyEvidencePublic(params, signal) {
3332
3431
  const q = new URLSearchParams();
3333
3432
  if (params.evidenceNo) q.set("evidenceNo", params.evidenceNo);
3334
3433
  if (params.publicVerifyCode) q.set("publicVerifyCode", params.publicVerifyCode);
3335
3434
  const qs = q.toString();
3336
- return this.read(
3435
+ return this.publicRead(
3337
3436
  "GET",
3338
3437
  `/compliance/evidence/verify${qs ? "?" + qs : ""}`,
3339
- null,
3340
3438
  signal
3341
3439
  );
3342
3440
  }
@@ -3420,9 +3518,10 @@ var ComplianceClient = class {
3420
3518
  /**
3421
3519
  * 发布报告(写,step-up 必须)。
3422
3520
  *
3423
- * 缺少 step-up 时服务端会返回 `COMPLIANCE_STEP_UP_REQUIRED`(数值码
3424
- * 1031000013)。SDK 不会自动重试;调用方需要引导用户重新做 OAuth introspection 或
3425
- * 重新登录后再次调用本方法(使用同一 idempotency-key)。
3521
+ * `@status gated` — step-up 闸门未闭合前服务端会一致返回
3522
+ * `COMPLIANCE_STEP_UP_REQUIRED`(数值码 1031000013)。SDK 不会自动重试、不伪成功;
3523
+ * 调用方需要引导用户重新做 OAuth introspection 或重新登录后再次调用本方法
3524
+ *(使用同一 idempotency-key)。方法状态分级见 `docs/compliance.md` Method Status。
3426
3525
  */
3427
3526
  publishReport(id, opts = {}) {
3428
3527
  return this.write(
@@ -3469,7 +3568,7 @@ var ComplianceClient = class {
3469
3568
  /**
3470
3569
  * 正式签署(写,step-up 必须)。
3471
3570
  *
3472
- * 服务端闸门关闭时会一致返回 `ENVELOPE_GATE_CLOSED` (1031004004)。
3571
+ * `@status gated` — 服务端闸门关闭时会一致返回 `ENVELOPE_GATE_CLOSED` (1031004004)。
3473
3572
  * SDK 不重试、不伪成功;调用方应该将该错误展示为"功能未开放"。
3474
3573
  */
3475
3574
  signEnvelope(envelopeId, req, opts = {}) {
@@ -3483,7 +3582,7 @@ var ComplianceClient = class {
3483
3582
  /**
3484
3583
  * 创建 H5 签署短链(写,step-up 必须)。
3485
3584
  *
3486
- * 同上:服务端闸门关闭时 SDK 不重试。
3585
+ * `@status gated` — 同 {@link signEnvelope}:服务端闸门关闭时 SDK 不重试、不伪成功。
3487
3586
  */
3488
3587
  createH5SigningUrl(envelopeId, req, opts = {}) {
3489
3588
  return this.write(
@@ -3505,6 +3604,13 @@ var ComplianceClient = class {
3505
3604
  // =========================================================================
3506
3605
  // Seal Approval
3507
3606
  // =========================================================================
3607
+ /**
3608
+ * 提交用印审批申请(写)。
3609
+ *
3610
+ * `@status production-ready` — 服务端以 `Idempotency-Key` + 业务请求指纹做重放保护:
3611
+ * 同 key + 同请求 → 返回原审批 id;同 key + 不同请求 → 拒绝复用幂等键。强烈建议调用方
3612
+ * 持久化 `idempotencyKey`,网络重试 / 任务恢复时复用,避免重复创建审批单。
3613
+ */
3508
3614
  submitSealApproval(req, opts = {}) {
3509
3615
  return this.write(
3510
3616
  "POST",
@@ -3513,6 +3619,12 @@ var ComplianceClient = class {
3513
3619
  writeCtx(opts)
3514
3620
  );
3515
3621
  }
3622
+ /**
3623
+ * 审批通过用印申请(写,step-up 必须)。
3624
+ *
3625
+ * `@status gated` — step-up 未闭合前服务端会返回 `COMPLIANCE_STEP_UP_REQUIRED`。
3626
+ * SDK 不重试、不伪成功。方法状态分级见 `docs/compliance.md` Method Status。
3627
+ */
3516
3628
  approveSealApproval(id, query, opts = {}) {
3517
3629
  const q = new URLSearchParams();
3518
3630
  if (query.expiresAt) q.set("expiresAt", query.expiresAt);
@@ -3610,6 +3722,38 @@ var ComplianceClient = class {
3610
3722
  extraHeaders
3611
3723
  });
3612
3724
  }
3725
+ /**
3726
+ * 公开读路径:public verify。
3727
+ *
3728
+ * 与 {@link read} 的区别 — public 端点不应要求认证:
3729
+ * - 无 token 时匿名请求:ensureToken 抛 `not authorized` 会被吞掉,继续匿名发送。
3730
+ * - 有 token 时附带 `Authorization`,保留后端审计上下文。
3731
+ * - 不做 401 refresh replay:401 直接抛 HTTPError,不触发 `forceRefresh`。
3732
+ *
3733
+ * URL 仍走 `client.complianceURL(path)`,不复用 `/api/v4`;底层复用
3734
+ * `client.doRequest`,不新增 fetch/axios 直连。
3735
+ */
3736
+ async publicRead(method, path, signal) {
3737
+ let token = "";
3738
+ try {
3739
+ token = await this.client.ensureToken(signal);
3740
+ } catch {
3741
+ }
3742
+ const url = this.client.complianceURL(path);
3743
+ const headers = { Accept: "application/json" };
3744
+ if (token) headers.Authorization = `Bearer ${token}`;
3745
+ const resp = await this.client.doRequest({ method, url, headers }, signal);
3746
+ if (resp.status < 200 || resp.status >= 300) {
3747
+ const bodyBytes = resp.body ? await readLimited(resp.body, maxErrorBodySize) : new Uint8Array();
3748
+ throw parseHTTPErrorWithHeader(resp.status, bodyBytes, resp.headers);
3749
+ }
3750
+ const text = await resp.text();
3751
+ if (!text) return void 0;
3752
+ const parsed = JSON.parse(text);
3753
+ const bizErr = apiResponseBusinessError(parsed);
3754
+ if (bizErr) throw bizErr;
3755
+ return parsed.data;
3756
+ }
3613
3757
  /**
3614
3758
  * 写路径:POST。
3615
3759
  * - 发送前 ensureToken 一次确保 token fresh。
@@ -5318,6 +5462,6 @@ Client.prototype.getBugReport = async function(bugID, signal) {
5318
5462
  return resp.data;
5319
5463
  };
5320
5464
 
5321
- export { AgentRunStreamError, AgentRunsClient, AnthropicAdapter, BucketClassCommercial, BucketClassGeneric, BusinessError, Client, ComplianceClient, CompliancePollError, DefaultRetryPolicy, ErrAuthDenied, ErrBillingCallbackCannotCommit, ErrBillingCommitRequiresLocalVerify, ErrBillingS2sForbidden, ErrBrowserOpen, ErrComplianceStepUpRequired, ErrDiscovery, ErrEnvelopeGateClosed, ErrProviderNotConfigured, ErrProviderUnknownNoRetry, ErrRegistration, ErrSSLProxy, ErrSealApprovalContractHashMismatch, ErrSealApprovalExpired, ErrSealApprovalLocationMismatch, ErrSealApprovalNonceUsed, ErrSealApprovalNotApproved, ErrSealApprovalSealMismatch, ErrSealApprovalTransactorMismatch, ErrSealUseAlreadyConsumed, ErrTimeout, ErrTokenExchange, EventAuthURL, EventComplete, EventError, FileTokenStore, FilterStatusAdminBypass, FilterStatusDisabledByFlag, FilterStatusFallbackMissingUser, FilterStatusFallbackNoBuckets, FilterStatusFallbackTkdistError, FilterStatusFallbackTkdistSkew, FilterStatusInternalBypass, FilterStatusOK, FilterStatusUnknown, HTTPError, InMemoryTokenStore, LocalStorageTokenStore, ModelNotFoundError, NetworkError, OpenAIAdapter, OrderTerminalError, ProviderFormat, RateLimitError, ScopeAI, ScopeAccount, ScopeComplianceContractSigningRead, ScopeComplianceContractSigningWrite, ScopeComplianceEvidenceRead, ScopeComplianceEvidenceWrite, ScopeComplianceReportsPublish, ScopeComplianceReportsRead, ScopeComplianceSealApprovalApprove, ScopeComplianceSealApprovalRequest, ScopeComplianceSealManage, ScopeComplianceSealUseExecute, ScopeComplianceTimestampIssue, ScopeComplianceTimestampVerify, ScopeEntitlements, ScopeModels, ScopeModelsChat, ScopeProfile, ScopeSkillStore, ScopeSkills, ScopeTokenPackages, ScopeTools, ScopeToolsExecute, ScopeWallet, ScopeWalletReadonly, ServerToolTypeWebSearch, StreamError, ThinkingHigh, ThinkingHighMinMaxTokens, ThinkingMax, ThinkingMaxFallbackMaxTokens, ThinkingOff, allScopes, anthropicResponseTextContent, anthropicResponseThinkingContent, anthropicResponseToolUseBlocks, apiResponseBusinessError, apiResponseGetMessage, authorize, bucketInfoIsCommercial, bucketRowIsCommercial, buildBetas, classifyComplianceError, commerceScopes, complianceScopes, computeBackoff, defaultRetryable, defaultSafeToRetry, discover, effectivePolicy, exchangeCode, extractAnthropicBlockMeta, fileLockDefaults, findDesktopVisualUnderstandingModel, findFirstModelByInputModality, getAdapter, getAdapterForModel, isBillingConfirmable, isComplianceBusinessError, isComplianceTerminalError, isSSLError, modelScopes, modelSupportsImageInput, modelSupportsInputModality, newFileTokenStore, newThinkingConfig, newTokenSet, newWebSearchTool, parseNotificationEvent, parseSettlement, parseSourcesEvent, refreshToken, register, revokeToken, sanitize_exports as sanitize, skillScopes, tokenSetIsExpired, uniqueMerge };
5465
+ export { AgentRunStreamError, AgentRunsClient, AnthropicAdapter, BucketClassCommercial, BucketClassGeneric, BusinessError, Client, ComplianceClient, CompliancePollError, DefaultRetryPolicy, ErrAuthDenied, ErrBillingCallbackCannotCommit, ErrBillingCommitRequiresLocalVerify, ErrBillingS2sForbidden, ErrBrowserOpen, ErrComplianceStepUpRequired, ErrDiscovery, ErrEnvelopeGateClosed, ErrProviderNotConfigured, ErrProviderUnknownNoRetry, ErrRegistration, ErrSSLProxy, ErrSealApprovalContractHashMismatch, ErrSealApprovalExpired, ErrSealApprovalLocationMismatch, ErrSealApprovalNonceUsed, ErrSealApprovalNotApproved, ErrSealApprovalSealMismatch, ErrSealApprovalTransactorMismatch, ErrSealUseAlreadyConsumed, ErrStateMismatch, ErrTimeout, ErrTokenExchange, EventAuthURL, EventComplete, EventError, FileTokenStore, FilterStatusAdminBypass, FilterStatusDisabledByFlag, FilterStatusFallbackMissingUser, FilterStatusFallbackNoBuckets, FilterStatusFallbackTkdistError, FilterStatusFallbackTkdistSkew, FilterStatusInternalBypass, FilterStatusOK, FilterStatusUnknown, HTTPError, InMemoryTokenStore, LocalStorageTokenStore, ModelNotFoundError, NetworkError, OpenAIAdapter, OrderTerminalError, ProviderFormat, RateLimitError, ScopeAI, ScopeAccount, ScopeComplianceContractSigningRead, ScopeComplianceContractSigningWrite, ScopeComplianceEvidenceRead, ScopeComplianceEvidenceWrite, ScopeComplianceReportsPublish, ScopeComplianceReportsRead, ScopeComplianceReportsWrite, ScopeComplianceSealApprovalApprove, ScopeComplianceSealApprovalRequest, ScopeComplianceSealManage, ScopeComplianceSealUseExecute, ScopeComplianceTimestampIssue, ScopeComplianceTimestampVerify, ScopeEntitlements, ScopeModels, ScopeModelsChat, ScopeProfile, ScopeSkillStore, ScopeSkills, ScopeTokenPackages, ScopeTools, ScopeToolsExecute, ScopeWallet, ScopeWalletReadonly, ServerToolTypeWebSearch, StreamError, ThinkingHigh, ThinkingHighMinMaxTokens, ThinkingMax, ThinkingMaxFallbackMaxTokens, ThinkingOff, allScopes, anthropicResponseTextContent, anthropicResponseThinkingContent, anthropicResponseToolUseBlocks, apiResponseBusinessError, apiResponseGetMessage, authorize, bucketInfoIsCommercial, bucketRowIsCommercial, buildBetas, classifyComplianceError, commerceScopes, completeWebAuthorizationRequest, complianceScopes, computeBackoff, createWebAuthorizationRequest, defaultRetryable, defaultSafeToRetry, discover, discoverWebOAuthMetadata, discoverWithProfile, effectivePolicy, exchangeCode, extractAnthropicBlockMeta, fileLockDefaults, findDesktopVisualUnderstandingModel, findFirstModelByInputModality, generateState, getAdapter, getAdapterForModel, isBillingConfirmable, isComplianceBusinessError, isComplianceTerminalError, isSSLError, modelScopes, modelSupportsImageInput, modelSupportsInputModality, newFileTokenStore, newThinkingConfig, newTokenSet, newWebSearchTool, parseNotificationEvent, parseSettlement, parseSourcesEvent, refreshToken, register, registerWebOAuthClient, revokeToken, sanitize_exports as sanitize, skillScopes, tokenSetIsExpired, uniqueMerge };
5322
5466
  //# sourceMappingURL=index.mjs.map
5323
5467
  //# sourceMappingURL=index.mjs.map