@acosmi/sdk-ts 2.19.4 → 2.19.5
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/CHANGELOG.md +8 -0
- package/README.md +27 -2
- package/dist/browser/index.mjs +110 -23
- package/dist/browser/index.mjs.map +1 -1
- package/dist/index.mjs +110 -23
- package/dist/index.mjs.map +1 -1
- package/dist/node/adapters/anthropic.cjs.map +1 -1
- package/dist/node/adapters/anthropic.mjs.map +1 -1
- package/dist/node/adapters/openai.cjs.map +1 -1
- package/dist/node/adapters/openai.mjs.map +1 -1
- package/dist/node/index.cjs +110 -22
- package/dist/node/index.cjs.map +1 -1
- package/dist/node/index.d.cts +80 -8
- package/dist/node/index.d.ts +80 -8
- package/dist/node/index.mjs +110 -23
- package/dist/node/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/node/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
|
*
|
|
@@ -2229,20 +2257,22 @@ ${Date.now()}
|
|
|
2229
2257
|
};
|
|
2230
2258
|
break;
|
|
2231
2259
|
} catch (e) {
|
|
2232
|
-
if (!
|
|
2233
|
-
|
|
2234
|
-
|
|
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) {
|
|
2260
|
+
if (!isLockContendedError(e)) throw e;
|
|
2261
|
+
if (!isWindowsLockBusyError(e)) {
|
|
2262
|
+
let stale = false;
|
|
2241
2263
|
try {
|
|
2242
|
-
await fs.
|
|
2264
|
+
const st = await fs.stat(lockPath);
|
|
2265
|
+
if (Date.now() - st.mtimeMs > fileLockDefaults.staleMs) stale = true;
|
|
2243
2266
|
} catch {
|
|
2267
|
+
continue;
|
|
2268
|
+
}
|
|
2269
|
+
if (stale) {
|
|
2270
|
+
try {
|
|
2271
|
+
await fs.unlink(lockPath);
|
|
2272
|
+
} catch {
|
|
2273
|
+
}
|
|
2274
|
+
continue;
|
|
2244
2275
|
}
|
|
2245
|
-
continue;
|
|
2246
2276
|
}
|
|
2247
2277
|
if (Date.now() - startMs > fileLockDefaults.acquireTimeoutMs) {
|
|
2248
2278
|
throw new Error(
|
|
@@ -2348,6 +2378,15 @@ function isNotExistError(e) {
|
|
|
2348
2378
|
}
|
|
2349
2379
|
return false;
|
|
2350
2380
|
}
|
|
2381
|
+
function isWindowsLockBusyError(e) {
|
|
2382
|
+
if (typeof process === "undefined" || process.platform !== "win32") return false;
|
|
2383
|
+
if (typeof e !== "object" || e === null || !("code" in e)) return false;
|
|
2384
|
+
const code = e.code;
|
|
2385
|
+
return code === "EPERM" || code === "EBUSY";
|
|
2386
|
+
}
|
|
2387
|
+
function isLockContendedError(e) {
|
|
2388
|
+
return isAlreadyExistsError(e) || isWindowsLockBusyError(e);
|
|
2389
|
+
}
|
|
2351
2390
|
function isAlreadyExistsError(e) {
|
|
2352
2391
|
if (typeof e === "object" && e !== null && "code" in e) {
|
|
2353
2392
|
return e.code === "EEXIST";
|
|
@@ -2941,7 +2980,7 @@ function parseStreamError(data) {
|
|
|
2941
2980
|
let code = payload.errorCode ?? "";
|
|
2942
2981
|
const stage = payload.stage ?? "";
|
|
2943
2982
|
let message = payload.message ?? "";
|
|
2944
|
-
const retryable = payload.retryable
|
|
2983
|
+
const retryable = payload.retryable;
|
|
2945
2984
|
let rawError = "";
|
|
2946
2985
|
if (payload.error != null) {
|
|
2947
2986
|
if (typeof payload.error === "string") {
|
|
@@ -2959,6 +2998,7 @@ function parseStreamError(data) {
|
|
|
2959
2998
|
message,
|
|
2960
2999
|
rawError,
|
|
2961
3000
|
retryable,
|
|
3001
|
+
retryAfterSecs: payload.retryAfterSecs,
|
|
2962
3002
|
errorContractVersion: payload.errorContractVersion,
|
|
2963
3003
|
faultDomain: payload.faultDomain,
|
|
2964
3004
|
requestDisposition: payload.requestDisposition,
|
|
@@ -3169,6 +3209,25 @@ function notifyGatewayRequestID(cb, headers) {
|
|
|
3169
3209
|
} catch {
|
|
3170
3210
|
}
|
|
3171
3211
|
}
|
|
3212
|
+
function notifyResponseHeaders(cb, headers) {
|
|
3213
|
+
if (!cb) return;
|
|
3214
|
+
try {
|
|
3215
|
+
cb(headers);
|
|
3216
|
+
} catch {
|
|
3217
|
+
}
|
|
3218
|
+
}
|
|
3219
|
+
function armStreamRequestTimeout(opts, parent) {
|
|
3220
|
+
const ms = opts?.requestTimeoutMs;
|
|
3221
|
+
if (typeof ms !== "number" || !Number.isFinite(ms) || ms <= 0) return void 0;
|
|
3222
|
+
return withRequestTimeout(ms, parent);
|
|
3223
|
+
}
|
|
3224
|
+
async function* disposeTimeoutWhenSettled(inner, ctl) {
|
|
3225
|
+
try {
|
|
3226
|
+
yield* inner;
|
|
3227
|
+
} finally {
|
|
3228
|
+
ctl.dispose();
|
|
3229
|
+
}
|
|
3230
|
+
}
|
|
3172
3231
|
var DEFAULT_API_TIMEOUT_MS = 6e4;
|
|
3173
3232
|
function newDeferred() {
|
|
3174
3233
|
let resolve;
|
|
@@ -4302,10 +4361,23 @@ var Client = class _Client {
|
|
|
4302
4361
|
*
|
|
4303
4362
|
* @param onUpstreamActivity 见 {@link UpstreamActivityCallback}
|
|
4304
4363
|
* @param onGatewayRequestID 见 {@link GatewayRequestIDCallback}
|
|
4364
|
+
* @param opts 见 {@link ChatStreamOptions} (2.19.5 起)
|
|
4305
4365
|
*/
|
|
4306
|
-
chatStream(modelID, req, signal, onUpstreamActivity, onGatewayRequestID) {
|
|
4366
|
+
chatStream(modelID, req, signal, onUpstreamActivity, onGatewayRequestID, opts) {
|
|
4307
4367
|
return {
|
|
4308
|
-
[Symbol.asyncIterator]: () =>
|
|
4368
|
+
[Symbol.asyncIterator]: () => {
|
|
4369
|
+
const ctl = armStreamRequestTimeout(opts, signal);
|
|
4370
|
+
const inner = this.chatStreamGen(
|
|
4371
|
+
modelID,
|
|
4372
|
+
req,
|
|
4373
|
+
ctl?.signal ?? signal,
|
|
4374
|
+
false,
|
|
4375
|
+
onUpstreamActivity,
|
|
4376
|
+
onGatewayRequestID,
|
|
4377
|
+
opts?.onResponseHeaders
|
|
4378
|
+
);
|
|
4379
|
+
return ctl ? disposeTimeoutWhenSettled(inner, ctl) : inner;
|
|
4380
|
+
}
|
|
4309
4381
|
};
|
|
4310
4382
|
}
|
|
4311
4383
|
/**
|
|
@@ -4315,13 +4387,26 @@ var Client = class _Client {
|
|
|
4315
4387
|
*
|
|
4316
4388
|
* @param onUpstreamActivity 见 {@link UpstreamActivityCallback}
|
|
4317
4389
|
* @param onGatewayRequestID 见 {@link GatewayRequestIDCallback}
|
|
4390
|
+
* @param opts 见 {@link ChatStreamOptions} (2.19.5 起)
|
|
4318
4391
|
*/
|
|
4319
|
-
chatMessagesStream(modelID, req, signal, onUpstreamActivity, onGatewayRequestID) {
|
|
4392
|
+
chatMessagesStream(modelID, req, signal, onUpstreamActivity, onGatewayRequestID, opts) {
|
|
4320
4393
|
return {
|
|
4321
|
-
[Symbol.asyncIterator]: () =>
|
|
4394
|
+
[Symbol.asyncIterator]: () => {
|
|
4395
|
+
const ctl = armStreamRequestTimeout(opts, signal);
|
|
4396
|
+
const inner = this.chatMessagesStreamGen(
|
|
4397
|
+
modelID,
|
|
4398
|
+
req,
|
|
4399
|
+
ctl?.signal ?? signal,
|
|
4400
|
+
false,
|
|
4401
|
+
onUpstreamActivity,
|
|
4402
|
+
onGatewayRequestID,
|
|
4403
|
+
opts?.onResponseHeaders
|
|
4404
|
+
);
|
|
4405
|
+
return ctl ? disposeTimeoutWhenSettled(inner, ctl) : inner;
|
|
4406
|
+
}
|
|
4322
4407
|
};
|
|
4323
4408
|
}
|
|
4324
|
-
async *chatStreamGen(modelID, req, signal, retried, onUpstreamActivity, onGatewayRequestID) {
|
|
4409
|
+
async *chatStreamGen(modelID, req, signal, retried, onUpstreamActivity, onGatewayRequestID, onResponseHeaders) {
|
|
4325
4410
|
const r = { ...req, stream: true };
|
|
4326
4411
|
const { body, adapter } = await this.buildChatRequest(modelID, r, signal);
|
|
4327
4412
|
const token = await this.ensureToken(signal);
|
|
@@ -4353,10 +4438,11 @@ var Client = class _Client {
|
|
|
4353
4438
|
`stream: unauthorized and refresh failed: ${refreshErr instanceof Error ? refreshErr.message : String(refreshErr)}`
|
|
4354
4439
|
);
|
|
4355
4440
|
}
|
|
4356
|
-
yield* this.chatStreamGen(modelID, req, signal, true, onUpstreamActivity, onGatewayRequestID);
|
|
4441
|
+
yield* this.chatStreamGen(modelID, req, signal, true, onUpstreamActivity, onGatewayRequestID, onResponseHeaders);
|
|
4357
4442
|
return;
|
|
4358
4443
|
}
|
|
4359
4444
|
notifyGatewayRequestID(onGatewayRequestID, resp.headers);
|
|
4445
|
+
notifyResponseHeaders(onResponseHeaders, resp.headers);
|
|
4360
4446
|
if (!resp.ok) {
|
|
4361
4447
|
const bodyBytes = await readLimited(resp.body, maxErrorBodySize);
|
|
4362
4448
|
throw parseHTTPErrorWithHeader(resp.status, bodyBytes, resp.headers);
|
|
@@ -4391,7 +4477,7 @@ var Client = class _Client {
|
|
|
4391
4477
|
}
|
|
4392
4478
|
}
|
|
4393
4479
|
}
|
|
4394
|
-
async *chatMessagesStreamGen(modelID, req, signal, retried, onUpstreamActivity, onGatewayRequestID) {
|
|
4480
|
+
async *chatMessagesStreamGen(modelID, req, signal, retried, onUpstreamActivity, onGatewayRequestID, onResponseHeaders) {
|
|
4395
4481
|
const r = { ...req, stream: true };
|
|
4396
4482
|
const { body, adapter } = await this.buildChatRequest(modelID, r, signal);
|
|
4397
4483
|
const token = await this.ensureToken(signal);
|
|
@@ -4423,10 +4509,11 @@ var Client = class _Client {
|
|
|
4423
4509
|
`messages stream: unauthorized and refresh failed: ${refreshErr instanceof Error ? refreshErr.message : String(refreshErr)}`
|
|
4424
4510
|
);
|
|
4425
4511
|
}
|
|
4426
|
-
yield* this.chatMessagesStreamGen(modelID, req, signal, true, onUpstreamActivity, onGatewayRequestID);
|
|
4512
|
+
yield* this.chatMessagesStreamGen(modelID, req, signal, true, onUpstreamActivity, onGatewayRequestID, onResponseHeaders);
|
|
4427
4513
|
return;
|
|
4428
4514
|
}
|
|
4429
4515
|
notifyGatewayRequestID(onGatewayRequestID, resp.headers);
|
|
4516
|
+
notifyResponseHeaders(onResponseHeaders, resp.headers);
|
|
4430
4517
|
if (!resp.ok) {
|
|
4431
4518
|
const bodyBytes = await readLimited(resp.body, maxErrorBodySize);
|
|
4432
4519
|
throw parseHTTPErrorWithHeader(resp.status, bodyBytes, resp.headers);
|
|
@@ -8962,6 +9049,6 @@ function brandCredential(c) {
|
|
|
8962
9049
|
return c;
|
|
8963
9050
|
}
|
|
8964
9051
|
|
|
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 };
|
|
9052
|
+
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
9053
|
//# sourceMappingURL=index.mjs.map
|
|
8967
9054
|
//# sourceMappingURL=index.mjs.map
|