@acosmi/sdk-ts 2.19.4 → 2.19.6

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
@@ -148,6 +148,14 @@ var init_types = __esm({
148
148
  });
149
149
 
150
150
  // src/shared/errors.ts
151
+ function finiteNonNegative(value) {
152
+ return typeof value === "number" && Number.isFinite(value) && value >= 0 ? value : void 0;
153
+ }
154
+ function isStreamError(err) {
155
+ if (err == null || typeof err !== "object") return false;
156
+ const e = err;
157
+ return e.name === "StreamError" && typeof e.errorCode === "string";
158
+ }
151
159
  function nullableID(value) {
152
160
  return value === null || typeof value === "string";
153
161
  }
@@ -357,8 +365,23 @@ var init_errors = __esm({
357
365
  userMessage;
358
366
  /** gateway 原始 error 字符串 */
359
367
  rawError;
360
- /** 客户端是否值得重试 */
368
+ /** 客户端是否值得重试 (= 服务端 `retryable` **且** `requestDisposition === 'not_accepted'`) */
361
369
  retryable;
370
+ /**
371
+ * 服务端在帧上声明的 `retryable` **原值** (2.19.5 起) —— 不与 requestDisposition 合取,
372
+ * 缺席即 undefined。
373
+ *
374
+ * 为什么要并列存一份: 上面的 `retryable` 是两个判据的合取, 网关的流内错误帧并不总是
375
+ * 下发 `requestDisposition`, 于是"服务端明说可重试"会被合取成 false —— 两端各自正确,
376
+ * 合起来恒否。消费方要区分**「服务端明说不可重试」**(false, 一票否决) 与**「服务端没说」**
377
+ * (undefined, 回落到自己的本地分类表) 时, 只能读这个原值; 读 `retryable` 两种情形不可分。
378
+ */
379
+ serverRetryable;
380
+ /**
381
+ * 服务端建议的等待秒数 (2.19.5 起)。**有限非负数**才收, 其余 (null / 负数 /
382
+ * NaN / Infinity / 非数字) 一律 undefined —— 宁可不给, 绝不编造等待时间。
383
+ */
384
+ retryAfterSecs;
362
385
  errorContractVersion;
363
386
  faultDomain;
364
387
  requestDisposition;
@@ -381,6 +404,8 @@ var init_errors = __esm({
381
404
  this.userMessage = userMessage;
382
405
  this.rawError = rawError;
383
406
  this.retryable = retryable;
407
+ this.serverRetryable = opts.retryable;
408
+ this.retryAfterSecs = finiteNonNegative(opts.retryAfterSecs);
384
409
  this.errorContractVersion = opts.errorContractVersion;
385
410
  this.faultDomain = opts.faultDomain;
386
411
  this.requestDisposition = opts.requestDisposition;
@@ -2195,7 +2220,10 @@ var FileTokenStore = class {
2195
2220
  /**
2196
2221
  * 跨进程临界区. 用 sidecar `<path>.lock` 文件 + O_EXCL 创建语义实现互斥:
2197
2222
  * - 创建成功 = 持有锁; 写入 pid+timestamp 便于诊断
2198
- * - 创建失败 (EEXIST) = 别的进程持锁, backoff 重试
2223
+ * - 创建失败 (EEXIST) = 别的进程持锁, stale 检测后 backoff 重试
2224
+ * - 创建失败 (Windows 的 EPERM / EBUSY) = 前一持有者的 unlink 处于 delete-pending,
2225
+ * 同属争用; 跳过 stale 检测直接 backoff 重试 (见 catch 内注释)。EACCES 不在其中 —
2226
+ * 它是真权限错误, 立即抛
2199
2227
  * - 锁文件 mtime > staleMs = 进程崩溃残留, unlink 后重试
2200
2228
  * - acquireTimeoutMs 超时 = 抛错 (caller 应作为 transient error 处理, 上层 retry)
2201
2229
  *
@@ -2224,25 +2252,29 @@ ${Date.now()}
2224
2252
  release = async () => {
2225
2253
  try {
2226
2254
  await fs.unlink(lockPath);
2227
- } catch {
2255
+ } catch (e) {
2256
+ warnLockCleanupFailed("release", lockPath, e);
2228
2257
  }
2229
2258
  };
2230
2259
  break;
2231
2260
  } catch (e) {
2232
- if (!isAlreadyExistsError(e)) throw e;
2233
- let stale = false;
2234
- try {
2235
- const st = await fs.stat(lockPath);
2236
- if (Date.now() - st.mtimeMs > fileLockDefaults.staleMs) stale = true;
2237
- } catch {
2238
- continue;
2239
- }
2240
- if (stale) {
2261
+ if (!isLockContendedError(e)) throw e;
2262
+ if (!isWindowsLockBusyError(e)) {
2263
+ let stale = false;
2241
2264
  try {
2242
- await fs.unlink(lockPath);
2265
+ const st = await fs.stat(lockPath);
2266
+ if (Date.now() - st.mtimeMs > fileLockDefaults.staleMs) stale = true;
2243
2267
  } catch {
2268
+ continue;
2269
+ }
2270
+ if (stale) {
2271
+ try {
2272
+ await fs.unlink(lockPath);
2273
+ } catch (e2) {
2274
+ warnLockCleanupFailed("stale-break", lockPath, e2);
2275
+ }
2276
+ continue;
2244
2277
  }
2245
- continue;
2246
2278
  }
2247
2279
  if (Date.now() - startMs > fileLockDefaults.acquireTimeoutMs) {
2248
2280
  throw new Error(
@@ -2342,12 +2374,27 @@ ${Date.now()}
2342
2374
  });
2343
2375
  }
2344
2376
  };
2377
+ function warnLockCleanupFailed(stage, lockPath, e) {
2378
+ if (isNotExistError(e)) return;
2379
+ console.warn(
2380
+ `[acosmi-sdk] warning: unlink token file lock (${stage}) failed: ${lockPath}: ${e instanceof Error ? e.message : String(e)}`
2381
+ );
2382
+ }
2345
2383
  function isNotExistError(e) {
2346
2384
  if (typeof e === "object" && e !== null && "code" in e) {
2347
2385
  return e.code === "ENOENT";
2348
2386
  }
2349
2387
  return false;
2350
2388
  }
2389
+ function isWindowsLockBusyError(e) {
2390
+ if (typeof process === "undefined" || process.platform !== "win32") return false;
2391
+ if (typeof e !== "object" || e === null || !("code" in e)) return false;
2392
+ const code = e.code;
2393
+ return code === "EPERM" || code === "EBUSY";
2394
+ }
2395
+ function isLockContendedError(e) {
2396
+ return isAlreadyExistsError(e) || isWindowsLockBusyError(e);
2397
+ }
2351
2398
  function isAlreadyExistsError(e) {
2352
2399
  if (typeof e === "object" && e !== null && "code" in e) {
2353
2400
  return e.code === "EEXIST";
@@ -2941,7 +2988,7 @@ function parseStreamError(data) {
2941
2988
  let code = payload.errorCode ?? "";
2942
2989
  const stage = payload.stage ?? "";
2943
2990
  let message = payload.message ?? "";
2944
- const retryable = payload.retryable ?? false;
2991
+ const retryable = payload.retryable;
2945
2992
  let rawError = "";
2946
2993
  if (payload.error != null) {
2947
2994
  if (typeof payload.error === "string") {
@@ -2959,6 +3006,7 @@ function parseStreamError(data) {
2959
3006
  message,
2960
3007
  rawError,
2961
3008
  retryable,
3009
+ retryAfterSecs: payload.retryAfterSecs,
2962
3010
  errorContractVersion: payload.errorContractVersion,
2963
3011
  faultDomain: payload.faultDomain,
2964
3012
  requestDisposition: payload.requestDisposition,
@@ -3169,6 +3217,25 @@ function notifyGatewayRequestID(cb, headers) {
3169
3217
  } catch {
3170
3218
  }
3171
3219
  }
3220
+ function notifyResponseHeaders(cb, headers) {
3221
+ if (!cb) return;
3222
+ try {
3223
+ cb(headers);
3224
+ } catch {
3225
+ }
3226
+ }
3227
+ function armStreamRequestTimeout(opts, parent) {
3228
+ const ms = opts?.requestTimeoutMs;
3229
+ if (typeof ms !== "number" || !Number.isFinite(ms) || ms <= 0) return void 0;
3230
+ return withRequestTimeout(ms, parent);
3231
+ }
3232
+ async function* disposeTimeoutWhenSettled(inner, ctl) {
3233
+ try {
3234
+ yield* inner;
3235
+ } finally {
3236
+ ctl.dispose();
3237
+ }
3238
+ }
3172
3239
  var DEFAULT_API_TIMEOUT_MS = 6e4;
3173
3240
  function newDeferred() {
3174
3241
  let resolve;
@@ -4302,10 +4369,23 @@ var Client = class _Client {
4302
4369
  *
4303
4370
  * @param onUpstreamActivity 见 {@link UpstreamActivityCallback}
4304
4371
  * @param onGatewayRequestID 见 {@link GatewayRequestIDCallback}
4372
+ * @param opts 见 {@link ChatStreamOptions} (2.19.5 起)
4305
4373
  */
4306
- chatStream(modelID, req, signal, onUpstreamActivity, onGatewayRequestID) {
4374
+ chatStream(modelID, req, signal, onUpstreamActivity, onGatewayRequestID, opts) {
4307
4375
  return {
4308
- [Symbol.asyncIterator]: () => this.chatStreamGen(modelID, req, signal, false, onUpstreamActivity, onGatewayRequestID)
4376
+ [Symbol.asyncIterator]: () => {
4377
+ const ctl = armStreamRequestTimeout(opts, signal);
4378
+ const inner = this.chatStreamGen(
4379
+ modelID,
4380
+ req,
4381
+ ctl?.signal ?? signal,
4382
+ false,
4383
+ onUpstreamActivity,
4384
+ onGatewayRequestID,
4385
+ opts?.onResponseHeaders
4386
+ );
4387
+ return ctl ? disposeTimeoutWhenSettled(inner, ctl) : inner;
4388
+ }
4309
4389
  };
4310
4390
  }
4311
4391
  /**
@@ -4315,13 +4395,26 @@ var Client = class _Client {
4315
4395
  *
4316
4396
  * @param onUpstreamActivity 见 {@link UpstreamActivityCallback}
4317
4397
  * @param onGatewayRequestID 见 {@link GatewayRequestIDCallback}
4398
+ * @param opts 见 {@link ChatStreamOptions} (2.19.5 起)
4318
4399
  */
4319
- chatMessagesStream(modelID, req, signal, onUpstreamActivity, onGatewayRequestID) {
4400
+ chatMessagesStream(modelID, req, signal, onUpstreamActivity, onGatewayRequestID, opts) {
4320
4401
  return {
4321
- [Symbol.asyncIterator]: () => this.chatMessagesStreamGen(modelID, req, signal, false, onUpstreamActivity, onGatewayRequestID)
4402
+ [Symbol.asyncIterator]: () => {
4403
+ const ctl = armStreamRequestTimeout(opts, signal);
4404
+ const inner = this.chatMessagesStreamGen(
4405
+ modelID,
4406
+ req,
4407
+ ctl?.signal ?? signal,
4408
+ false,
4409
+ onUpstreamActivity,
4410
+ onGatewayRequestID,
4411
+ opts?.onResponseHeaders
4412
+ );
4413
+ return ctl ? disposeTimeoutWhenSettled(inner, ctl) : inner;
4414
+ }
4322
4415
  };
4323
4416
  }
4324
- async *chatStreamGen(modelID, req, signal, retried, onUpstreamActivity, onGatewayRequestID) {
4417
+ async *chatStreamGen(modelID, req, signal, retried, onUpstreamActivity, onGatewayRequestID, onResponseHeaders) {
4325
4418
  const r = { ...req, stream: true };
4326
4419
  const { body, adapter } = await this.buildChatRequest(modelID, r, signal);
4327
4420
  const token = await this.ensureToken(signal);
@@ -4353,10 +4446,11 @@ var Client = class _Client {
4353
4446
  `stream: unauthorized and refresh failed: ${refreshErr instanceof Error ? refreshErr.message : String(refreshErr)}`
4354
4447
  );
4355
4448
  }
4356
- yield* this.chatStreamGen(modelID, req, signal, true, onUpstreamActivity, onGatewayRequestID);
4449
+ yield* this.chatStreamGen(modelID, req, signal, true, onUpstreamActivity, onGatewayRequestID, onResponseHeaders);
4357
4450
  return;
4358
4451
  }
4359
4452
  notifyGatewayRequestID(onGatewayRequestID, resp.headers);
4453
+ notifyResponseHeaders(onResponseHeaders, resp.headers);
4360
4454
  if (!resp.ok) {
4361
4455
  const bodyBytes = await readLimited(resp.body, maxErrorBodySize);
4362
4456
  throw parseHTTPErrorWithHeader(resp.status, bodyBytes, resp.headers);
@@ -4391,7 +4485,7 @@ var Client = class _Client {
4391
4485
  }
4392
4486
  }
4393
4487
  }
4394
- async *chatMessagesStreamGen(modelID, req, signal, retried, onUpstreamActivity, onGatewayRequestID) {
4488
+ async *chatMessagesStreamGen(modelID, req, signal, retried, onUpstreamActivity, onGatewayRequestID, onResponseHeaders) {
4395
4489
  const r = { ...req, stream: true };
4396
4490
  const { body, adapter } = await this.buildChatRequest(modelID, r, signal);
4397
4491
  const token = await this.ensureToken(signal);
@@ -4423,10 +4517,11 @@ var Client = class _Client {
4423
4517
  `messages stream: unauthorized and refresh failed: ${refreshErr instanceof Error ? refreshErr.message : String(refreshErr)}`
4424
4518
  );
4425
4519
  }
4426
- yield* this.chatMessagesStreamGen(modelID, req, signal, true, onUpstreamActivity, onGatewayRequestID);
4520
+ yield* this.chatMessagesStreamGen(modelID, req, signal, true, onUpstreamActivity, onGatewayRequestID, onResponseHeaders);
4427
4521
  return;
4428
4522
  }
4429
4523
  notifyGatewayRequestID(onGatewayRequestID, resp.headers);
4524
+ notifyResponseHeaders(onResponseHeaders, resp.headers);
4430
4525
  if (!resp.ok) {
4431
4526
  const bodyBytes = await readLimited(resp.body, maxErrorBodySize);
4432
4527
  throw parseHTTPErrorWithHeader(resp.status, bodyBytes, resp.headers);
@@ -8962,6 +9057,6 @@ function brandCredential(c) {
8962
9057
  return c;
8963
9058
  }
8964
9059
 
8965
- export { AGENT_RUN_META_TITLE, AGENT_RUN_META_WORKSPACE, ALL_INTEGRATION_STATUS, ALL_PLATFORMS, ALL_REGIONS, AgentRunStreamError, AgentRunsClient, AnthropicAdapter, AudienceEnum, BillingModeEnum, BucketClassCommercial, BucketClassGeneric, BusinessError, CHAT_REQUEST_TIMEOUT_MS, ChatBridgeClient, Client, ComplianceClient, CompliancePollError, CrabCodeByokClient, DEFAULT_API_TIMEOUT_MS, DEFAULT_GATEWAY_BASE_URL, DefaultRetryPolicy, ErrAuthDenied, ErrBillingCallbackCannotCommit, ErrBillingCommitRequiresLocalVerify, ErrBillingS2sForbidden, ErrBrowserOpen, ErrComplianceStepUpRequired, ErrDiscovery, ErrEnvelopeGateClosed, ErrOAuthCORSBlocked, ErrProviderNotConfigured, ErrProviderUnknownNoRetry, ErrRefreshProxyFailed, ErrRegistration, ErrSSLProxy, ErrSealApprovalContractHashMismatch, ErrSealApprovalExpired, ErrSealApprovalLocationMismatch, ErrSealApprovalNonceUsed, ErrSealApprovalNotApproved, ErrSealApprovalSealMismatch, ErrSealApprovalTransactorMismatch, ErrSealUseAlreadyConsumed, ErrStateMismatch, ErrTimeout, ErrTokenExchange, ErrTokenExpired, EventAuthURL, EventComplete, EventError, FileTokenStore, FilterStatusAdminBypass, FilterStatusDisabledByFlag, FilterStatusFallbackMissingUser, FilterStatusFallbackNoBuckets, FilterStatusFallbackTkdistError, FilterStatusFallbackTkdistSkew, FilterStatusInternalBypass, FilterStatusOK, FilterStatusUnknown, GATEWAY_REQUEST_ID_HEADER, HTTPError, IdempotencyKeyHeader, InMemoryTokenStore, LocalStorageTokenStore, ModelNotFoundError, NetworkError, OAuthTokenEndpointError, OpenAIAdapter, OrderTerminalError, ProductFamilyEnum, ProviderFormat, RETRY_ADVICE_REASONS, RateLimitError, RegionScopeEnum, ScopeAI, ScopeAccount, ScopeAgentAccessManage, ScopeChatBridge, ScopeChatBridgeRead, ScopeChatBridgeRotate, ScopeChatBridgeWrite, ScopeComplianceContractSigningRead, ScopeComplianceContractSigningWrite, ScopeComplianceContractTemplateRead, ScopeComplianceContractTemplateWrite, ScopeComplianceEvidenceRead, ScopeComplianceEvidenceWrite, ScopeComplianceReportsPublish, ScopeComplianceReportsRead, ScopeComplianceReportsWrite, ScopeComplianceSealApprovalApprove, ScopeComplianceSealApprovalRequest, ScopeComplianceSealManage, ScopeComplianceSealUseExecute, ScopeComplianceTimestampIssue, ScopeComplianceTimestampVerify, ScopeEntitlements, ScopeModels, ScopeModelsChat, ScopeProfile, ScopeRemoteControl, ScopeRemoteControlAgentRun, ScopeRemoteControlPermissionResponse, ScopeRemoteControlSessionControl, ScopeSkillStore, ScopeSkills, ScopeTokenPackages, ScopeTools, ScopeToolsExecute, ScopeWallet, ScopeWalletReadonly, ServerToolTypeWebSearch, StreamError, ThinkingHigh, ThinkingHighMinMaxTokens, ThinkingLow, ThinkingMax, ThinkingMaxFallbackMaxTokens, ThinkingOff, agentAccessScopes, allScopes, anthropicResponseTextContent, anthropicResponseThinkingContent, anthropicResponseToolUseBlocks, apiResponseBusinessError, apiResponseGetMessage, asCredentialRef, authorize, bucketInfoIsCommercial, bucketRowIsCommercial, buildBetas, chatBridgeScopes, classifyComplianceError, classifySourcesEvent, commerceScopes, completeWebAuthorizationRequest, complianceErrorToRetryAdvice, complianceScopes, computeBackoff, createWebAuthorizationRequest, defaultRetryable, defaultSafeToRetry, discover, discoverWebOAuthMetadata, discoverWithProfile, effectivePolicy, exchangeCode, extractAnthropicBlockMeta, fileLockDefaults, findDesktopVisualUnderstandingModel, findFirstModelByInputModality, generateState, getAdapter, getAdapterForModel, getWindowLimitStreamDetails, isBillingConfirmable, isChannelInboundEvent, isComplianceBusinessError, isComplianceTerminalError, isContinuableWindowLimitError, isIntegrationStatus, isInvalidGrantError, isPlatform, isRegion, isSSECommentLine, isSSLError, isTerminalRemoteEvent, isUserAccessTokenRejected, isValidTokenSet, isWindowLimitError, isWindowLimitStreamError, maxEndUserIdLength, modelScopes, modelSupportsImageInput, modelSupportsInputModality, newFileTokenStore, newThinkingConfig, newTokenSet, newWebSearchTool, normalizeGatewayBaseURL, normalizeOverrideBaseURL, parseNotificationEvent, parseRemoteControlEvent, parseSettlement, parseSourcesEvent, readGatewayErrorContract, refreshToken, register, registerWebOAuthClient, remoteControlScopes, retryReasonForComplianceKey, retryReasonForOAuthError, revokeToken, sanitize_exports as sanitize, skillScopes, tokenSetIsExpired, uniqueMerge, validateEndUserId };
9060
+ export { AGENT_RUN_META_TITLE, AGENT_RUN_META_WORKSPACE, ALL_INTEGRATION_STATUS, ALL_PLATFORMS, ALL_REGIONS, AgentRunStreamError, AgentRunsClient, AnthropicAdapter, AudienceEnum, BillingModeEnum, BucketClassCommercial, BucketClassGeneric, BusinessError, CHAT_REQUEST_TIMEOUT_MS, ChatBridgeClient, Client, ComplianceClient, CompliancePollError, CrabCodeByokClient, DEFAULT_API_TIMEOUT_MS, DEFAULT_GATEWAY_BASE_URL, DefaultRetryPolicy, ErrAuthDenied, ErrBillingCallbackCannotCommit, ErrBillingCommitRequiresLocalVerify, ErrBillingS2sForbidden, ErrBrowserOpen, ErrComplianceStepUpRequired, ErrDiscovery, ErrEnvelopeGateClosed, ErrOAuthCORSBlocked, ErrProviderNotConfigured, ErrProviderUnknownNoRetry, ErrRefreshProxyFailed, ErrRegistration, ErrSSLProxy, ErrSealApprovalContractHashMismatch, ErrSealApprovalExpired, ErrSealApprovalLocationMismatch, ErrSealApprovalNonceUsed, ErrSealApprovalNotApproved, ErrSealApprovalSealMismatch, ErrSealApprovalTransactorMismatch, ErrSealUseAlreadyConsumed, ErrStateMismatch, ErrTimeout, ErrTokenExchange, ErrTokenExpired, EventAuthURL, EventComplete, EventError, FileTokenStore, FilterStatusAdminBypass, FilterStatusDisabledByFlag, FilterStatusFallbackMissingUser, FilterStatusFallbackNoBuckets, FilterStatusFallbackTkdistError, FilterStatusFallbackTkdistSkew, FilterStatusInternalBypass, FilterStatusOK, FilterStatusUnknown, GATEWAY_REQUEST_ID_HEADER, HTTPError, IdempotencyKeyHeader, InMemoryTokenStore, LocalStorageTokenStore, ModelNotFoundError, NetworkError, OAuthTokenEndpointError, OpenAIAdapter, OrderTerminalError, ProductFamilyEnum, ProviderFormat, RETRY_ADVICE_REASONS, RateLimitError, RegionScopeEnum, ScopeAI, ScopeAccount, ScopeAgentAccessManage, ScopeChatBridge, ScopeChatBridgeRead, ScopeChatBridgeRotate, ScopeChatBridgeWrite, ScopeComplianceContractSigningRead, ScopeComplianceContractSigningWrite, ScopeComplianceContractTemplateRead, ScopeComplianceContractTemplateWrite, ScopeComplianceEvidenceRead, ScopeComplianceEvidenceWrite, ScopeComplianceReportsPublish, ScopeComplianceReportsRead, ScopeComplianceReportsWrite, ScopeComplianceSealApprovalApprove, ScopeComplianceSealApprovalRequest, ScopeComplianceSealManage, ScopeComplianceSealUseExecute, ScopeComplianceTimestampIssue, ScopeComplianceTimestampVerify, ScopeEntitlements, ScopeModels, ScopeModelsChat, ScopeProfile, ScopeRemoteControl, ScopeRemoteControlAgentRun, ScopeRemoteControlPermissionResponse, ScopeRemoteControlSessionControl, ScopeSkillStore, ScopeSkills, ScopeTokenPackages, ScopeTools, ScopeToolsExecute, ScopeWallet, ScopeWalletReadonly, ServerToolTypeWebSearch, StreamError, ThinkingHigh, ThinkingHighMinMaxTokens, ThinkingLow, ThinkingMax, ThinkingMaxFallbackMaxTokens, ThinkingOff, agentAccessScopes, allScopes, anthropicResponseTextContent, anthropicResponseThinkingContent, anthropicResponseToolUseBlocks, apiResponseBusinessError, apiResponseGetMessage, asCredentialRef, authorize, bucketInfoIsCommercial, bucketRowIsCommercial, buildBetas, chatBridgeScopes, classifyComplianceError, classifySourcesEvent, commerceScopes, completeWebAuthorizationRequest, complianceErrorToRetryAdvice, complianceScopes, computeBackoff, createWebAuthorizationRequest, defaultRetryable, defaultSafeToRetry, discover, discoverWebOAuthMetadata, discoverWithProfile, effectivePolicy, exchangeCode, extractAnthropicBlockMeta, fileLockDefaults, findDesktopVisualUnderstandingModel, findFirstModelByInputModality, generateState, getAdapter, getAdapterForModel, getWindowLimitStreamDetails, isBillingConfirmable, isChannelInboundEvent, isComplianceBusinessError, isComplianceTerminalError, isContinuableWindowLimitError, isIntegrationStatus, isInvalidGrantError, isPlatform, isRegion, isSSECommentLine, isSSLError, isStreamError, isTerminalRemoteEvent, isUserAccessTokenRejected, isValidTokenSet, isWindowLimitError, isWindowLimitStreamError, maxEndUserIdLength, modelScopes, modelSupportsImageInput, modelSupportsInputModality, newFileTokenStore, newThinkingConfig, newTokenSet, newWebSearchTool, normalizeGatewayBaseURL, normalizeOverrideBaseURL, parseNotificationEvent, parseRemoteControlEvent, parseSettlement, parseSourcesEvent, readGatewayErrorContract, refreshToken, register, registerWebOAuthClient, remoteControlScopes, retryReasonForComplianceKey, retryReasonForOAuthError, revokeToken, sanitize_exports as sanitize, skillScopes, tokenSetIsExpired, uniqueMerge, validateEndUserId };
8966
9061
  //# sourceMappingURL=index.mjs.map
8967
9062
  //# sourceMappingURL=index.mjs.map