@tangle-network/sandbox 0.2.1 → 0.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/LICENSE +11 -0
- package/README.md +71 -0
- package/dist/agent/index.d.ts +433 -0
- package/dist/agent/index.js +1 -0
- package/dist/auth/index.d.ts +1 -1
- package/dist/auth/index.js +1 -271
- package/dist/client-CygjzF3v.js +1 -0
- package/dist/{errors-BI75IXOM.d.ts → client-DM2pIli7.d.ts} +2 -129
- package/dist/collaboration/index.d.ts +1 -1
- package/dist/collaboration/index.js +1 -2
- package/dist/collaboration-CRyb5e8F.js +1 -201
- package/dist/core.d.ts +3 -2
- package/dist/core.js +1 -4
- package/dist/errors-1Se5ATyZ.d.ts +128 -0
- package/dist/errors-CljiGR__.js +1 -262
- package/dist/{index-DhNGZ0h4.d.ts → index-CTj81tF9.d.ts} +1 -1
- package/dist/index.d.ts +256 -7
- package/dist/index.js +1 -825
- package/dist/openai/index.d.ts +21 -6
- package/dist/openai/index.js +1 -1721
- package/dist/{sandbox-aBpWqler.d.ts → sandbox-CBmfYqMQ.d.ts} +291 -117
- package/dist/sandbox-DTup2jzz.js +1 -0
- package/dist/session-gateway/index.js +1 -667
- package/dist/tangle/index.d.ts +1 -1
- package/dist/tangle/index.js +1 -2
- package/dist/tangle-CnYnTRi6.js +1 -0
- package/package.json +50 -78
- package/dist/client-Uve6A5C6.js +0 -2280
- package/dist/platform-integrations.d.ts +0 -2
- package/dist/platform-integrations.js +0 -2
- package/dist/sandbox-ksXTNlo-.js +0 -3394
- package/dist/tangle-DQ05paN7.js +0 -826
- /package/dist/{index-Dpj1oB5i.d.ts → index-D-2pH_70.d.ts} +0 -0
- /package/dist/{index-CCsA3S0D.d.ts → index-D7bwmNs8.d.ts} +0 -0
package/dist/errors-CljiGR__.js
CHANGED
|
@@ -1,262 +1 @@
|
|
|
1
|
-
//#region src/errors.ts
|
|
2
|
-
/**
|
|
3
|
-
* Sandbox SDK Errors
|
|
4
|
-
*
|
|
5
|
-
* Error classes for the Sandbox client SDK.
|
|
6
|
-
*/
|
|
7
|
-
/**
|
|
8
|
-
* Base error class for all Sandbox SDK errors.
|
|
9
|
-
*/
|
|
10
|
-
var SandboxError = class extends Error {
|
|
11
|
-
/** HTTP status code if applicable */
|
|
12
|
-
status;
|
|
13
|
-
/** Error code for programmatic handling */
|
|
14
|
-
code;
|
|
15
|
-
/** Best-effort origin of the failing request */
|
|
16
|
-
origin;
|
|
17
|
-
/** Request path or endpoint when known */
|
|
18
|
-
endpoint;
|
|
19
|
-
/** Retry-after duration in ms when surfaced by the upstream */
|
|
20
|
-
retryAfterMs;
|
|
21
|
-
/** Sidecar version when the runtime emitted it */
|
|
22
|
-
sidecarVersion;
|
|
23
|
-
/** Sidecar image/tag/sha when the runtime emitted it */
|
|
24
|
-
containerImage;
|
|
25
|
-
constructor(message, code, status, metadata) {
|
|
26
|
-
super(message);
|
|
27
|
-
this.name = "SandboxError";
|
|
28
|
-
this.code = code;
|
|
29
|
-
this.status = status;
|
|
30
|
-
this.origin = metadata?.origin;
|
|
31
|
-
this.endpoint = metadata?.endpoint;
|
|
32
|
-
this.retryAfterMs = metadata?.retryAfterMs;
|
|
33
|
-
this.sidecarVersion = metadata?.sidecarVersion;
|
|
34
|
-
this.containerImage = metadata?.containerImage;
|
|
35
|
-
}
|
|
36
|
-
};
|
|
37
|
-
/**
|
|
38
|
-
* Authentication failed or API key is invalid.
|
|
39
|
-
*/
|
|
40
|
-
var AuthError = class extends SandboxError {
|
|
41
|
-
constructor(message = "Authentication failed", metadata) {
|
|
42
|
-
super(message, "AUTH_ERROR", 401, metadata);
|
|
43
|
-
this.name = "AuthError";
|
|
44
|
-
}
|
|
45
|
-
};
|
|
46
|
-
/**
|
|
47
|
-
* The requested resource was not found.
|
|
48
|
-
*/
|
|
49
|
-
var NotFoundError = class extends SandboxError {
|
|
50
|
-
/** The resource type that was not found */
|
|
51
|
-
resourceType;
|
|
52
|
-
/** The resource ID that was not found */
|
|
53
|
-
resourceId;
|
|
54
|
-
constructor(resourceType, resourceId, metadata) {
|
|
55
|
-
super(`${resourceType} not found: ${resourceId}`, "NOT_FOUND", 404, metadata);
|
|
56
|
-
this.name = "NotFoundError";
|
|
57
|
-
this.resourceType = resourceType;
|
|
58
|
-
this.resourceId = resourceId;
|
|
59
|
-
}
|
|
60
|
-
};
|
|
61
|
-
/**
|
|
62
|
-
* Account quota or rate limit exceeded.
|
|
63
|
-
*/
|
|
64
|
-
var QuotaError = class extends SandboxError {
|
|
65
|
-
/** The type of quota that was exceeded */
|
|
66
|
-
quotaType;
|
|
67
|
-
/** Current usage */
|
|
68
|
-
current;
|
|
69
|
-
/** Maximum allowed */
|
|
70
|
-
limit;
|
|
71
|
-
/** Suggested retry-after duration in ms */
|
|
72
|
-
retryAfterMs;
|
|
73
|
-
constructor(quotaType, message, current, limit, metadata, status = 429) {
|
|
74
|
-
super(message ?? `Quota exceeded: ${quotaType}`, "QUOTA_EXCEEDED", status, metadata);
|
|
75
|
-
this.name = "QuotaError";
|
|
76
|
-
this.quotaType = quotaType;
|
|
77
|
-
this.current = current;
|
|
78
|
-
this.limit = limit;
|
|
79
|
-
this.retryAfterMs = metadata?.retryAfterMs;
|
|
80
|
-
}
|
|
81
|
-
};
|
|
82
|
-
/**
|
|
83
|
-
* The requested capability is unavailable for the account, driver, or sandbox.
|
|
84
|
-
*/
|
|
85
|
-
var CapabilityError = class extends SandboxError {
|
|
86
|
-
/** Capability or feature that was rejected when known */
|
|
87
|
-
capability;
|
|
88
|
-
constructor(message, code = "CAPABILITY_UNSUPPORTED", status = 400, metadata, capability) {
|
|
89
|
-
super(message, code, status, metadata);
|
|
90
|
-
this.name = "CapabilityError";
|
|
91
|
-
this.capability = capability;
|
|
92
|
-
}
|
|
93
|
-
};
|
|
94
|
-
/**
|
|
95
|
-
* A multi-resource operation failed for one or more branches.
|
|
96
|
-
*/
|
|
97
|
-
var PartialFailureError = class extends SandboxError {
|
|
98
|
-
/** Per-resource failures returned by the API when available */
|
|
99
|
-
failures;
|
|
100
|
-
constructor(message, code = "PARTIAL_FAILURE", status = 502, metadata, failures) {
|
|
101
|
-
super(message, code, status, metadata);
|
|
102
|
-
this.name = "PartialFailureError";
|
|
103
|
-
this.failures = failures;
|
|
104
|
-
}
|
|
105
|
-
};
|
|
106
|
-
/**
|
|
107
|
-
* The request was invalid or malformed.
|
|
108
|
-
*/
|
|
109
|
-
var ValidationError = class extends SandboxError {
|
|
110
|
-
/** Field-level validation errors */
|
|
111
|
-
fields;
|
|
112
|
-
constructor(message, fields, metadata) {
|
|
113
|
-
super(message, "VALIDATION_ERROR", 400, metadata);
|
|
114
|
-
this.name = "ValidationError";
|
|
115
|
-
this.fields = fields;
|
|
116
|
-
}
|
|
117
|
-
};
|
|
118
|
-
/**
|
|
119
|
-
* The sandbox is not in a valid state for the requested operation.
|
|
120
|
-
*/
|
|
121
|
-
var StateError = class extends SandboxError {
|
|
122
|
-
/** Current state of the sandbox */
|
|
123
|
-
currentState;
|
|
124
|
-
/** Required state for the operation */
|
|
125
|
-
requiredState;
|
|
126
|
-
constructor(message, currentState, requiredState, metadata) {
|
|
127
|
-
super(message, "INVALID_STATE", 409, metadata);
|
|
128
|
-
this.name = "StateError";
|
|
129
|
-
this.currentState = currentState;
|
|
130
|
-
this.requiredState = requiredState;
|
|
131
|
-
}
|
|
132
|
-
};
|
|
133
|
-
/**
|
|
134
|
-
* The request timed out.
|
|
135
|
-
*/
|
|
136
|
-
var TimeoutError = class extends SandboxError {
|
|
137
|
-
/** Timeout duration in milliseconds */
|
|
138
|
-
timeoutMs;
|
|
139
|
-
constructor(timeoutMs, message, metadata) {
|
|
140
|
-
super(message ?? `Request timed out after ${timeoutMs}ms`, "TIMEOUT", 408, metadata);
|
|
141
|
-
this.name = "TimeoutError";
|
|
142
|
-
this.timeoutMs = timeoutMs;
|
|
143
|
-
}
|
|
144
|
-
};
|
|
145
|
-
/**
|
|
146
|
-
* A network or connection error occurred.
|
|
147
|
-
*/
|
|
148
|
-
var NetworkError = class extends SandboxError {
|
|
149
|
-
/** The underlying error */
|
|
150
|
-
cause;
|
|
151
|
-
constructor(message, causeOrMetadata, metadata) {
|
|
152
|
-
const cause = causeOrMetadata instanceof Error ? causeOrMetadata : void 0;
|
|
153
|
-
const resolvedMetadata = causeOrMetadata instanceof Error ? metadata : causeOrMetadata ?? metadata;
|
|
154
|
-
super(message, "NETWORK_ERROR", void 0, resolvedMetadata);
|
|
155
|
-
this.name = "NetworkError";
|
|
156
|
-
this.cause = cause;
|
|
157
|
-
}
|
|
158
|
-
};
|
|
159
|
-
/**
|
|
160
|
-
* The server returned an unexpected error.
|
|
161
|
-
*/
|
|
162
|
-
var ServerError = class extends SandboxError {
|
|
163
|
-
constructor(message, status = 500, metadata) {
|
|
164
|
-
super(message, "SERVER_ERROR", status, metadata);
|
|
165
|
-
this.name = "ServerError";
|
|
166
|
-
}
|
|
167
|
-
};
|
|
168
|
-
function parseRetryAfterMs(rawValue, data) {
|
|
169
|
-
if (typeof data.retryAfterMs === "number" && Number.isFinite(data.retryAfterMs)) return Math.max(0, data.retryAfterMs);
|
|
170
|
-
if (!rawValue) return void 0;
|
|
171
|
-
const trimmed = rawValue.trim();
|
|
172
|
-
if (!trimmed) return void 0;
|
|
173
|
-
const seconds = Number(trimmed);
|
|
174
|
-
if (Number.isFinite(seconds)) return Math.max(0, seconds) * 1e3;
|
|
175
|
-
const targetTs = Date.parse(trimmed);
|
|
176
|
-
if (!Number.isNaN(targetTs)) return Math.max(0, targetTs - Date.now());
|
|
177
|
-
}
|
|
178
|
-
function inferOrigin(headers, context) {
|
|
179
|
-
const derivedPath = context?.path ?? headers?.get("x-tangle-request-path") ?? void 0;
|
|
180
|
-
if (!headers) return context?.path ? "sandbox-api" : void 0;
|
|
181
|
-
if (headers.has("x-sidecar-version") || headers.has("x-sidecar-image") || headers.has("x-sidecar-image-tag")) return "sidecar";
|
|
182
|
-
if (headers.has("x-orchestrator-version")) return "control-plane";
|
|
183
|
-
if (derivedPath?.startsWith("/v1/")) return "sandbox-api";
|
|
184
|
-
if (derivedPath) {
|
|
185
|
-
if (derivedPath.startsWith("/projects") || derivedPath.startsWith("/sidecars") || derivedPath.startsWith("/instances")) return "control-plane";
|
|
186
|
-
return "runtime";
|
|
187
|
-
}
|
|
188
|
-
return "unknown";
|
|
189
|
-
}
|
|
190
|
-
function isQuotaCode(code) {
|
|
191
|
-
return code === "QUOTA_EXCEEDED" || code?.endsWith("_QUOTA_EXCEEDED") === true;
|
|
192
|
-
}
|
|
193
|
-
function isCapabilityCode(code) {
|
|
194
|
-
return code === "CAPABILITY_NOT_ENABLED" || code === "CAPABILITY_UNSUPPORTED" || code === "UNSUPPORTED_CAPABILITY" || code === "FLEET_SHARED_WORKSPACE_UNSUPPORTED" || code === "SHARED_WORKSPACE_UNSUPPORTED";
|
|
195
|
-
}
|
|
196
|
-
function isPartialFailureCode(code) {
|
|
197
|
-
return code === "PARTIAL_FAILURE" || code === "FLEET_PARTIAL_FAILURE" || code === "FLEET_DISPATCH_PARTIAL_FAILURE" || code === "FLEET_DEPROVISION_FAILED";
|
|
198
|
-
}
|
|
199
|
-
function asString(value) {
|
|
200
|
-
return typeof value === "string" && value.trim().length > 0 ? value : void 0;
|
|
201
|
-
}
|
|
202
|
-
function isFailureDetail(value) {
|
|
203
|
-
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
204
|
-
}
|
|
205
|
-
function readCapability(data, errorObj) {
|
|
206
|
-
const nested = typeof errorObj === "object" && errorObj !== null ? asString(errorObj.capability) : void 0;
|
|
207
|
-
return asString(data.capability) ?? nested;
|
|
208
|
-
}
|
|
209
|
-
function readFailures(data, errorObj) {
|
|
210
|
-
if (Array.isArray(data.failures)) return data.failures.filter(isFailureDetail);
|
|
211
|
-
if (Array.isArray(data.results)) {
|
|
212
|
-
const failures = data.results.filter((result) => typeof result === "object" && result !== null && result.ok === false);
|
|
213
|
-
if (failures.length > 0) return failures.filter(isFailureDetail);
|
|
214
|
-
}
|
|
215
|
-
if (typeof errorObj === "object" && errorObj !== null && Array.isArray(errorObj.failures)) return errorObj.failures.filter(isFailureDetail);
|
|
216
|
-
}
|
|
217
|
-
/**
|
|
218
|
-
* Parse an error response from the API.
|
|
219
|
-
* @param status - HTTP status code
|
|
220
|
-
* @param body - Response body text
|
|
221
|
-
* @param context - Optional request context for better error messages
|
|
222
|
-
*/
|
|
223
|
-
function parseErrorResponse(status, body, context, headers) {
|
|
224
|
-
let data;
|
|
225
|
-
try {
|
|
226
|
-
data = JSON.parse(body);
|
|
227
|
-
} catch {
|
|
228
|
-
data = { message: body };
|
|
229
|
-
}
|
|
230
|
-
const errorObj = data.error;
|
|
231
|
-
const nestedMessage = typeof errorObj === "object" && errorObj !== null ? errorObj.message : void 0;
|
|
232
|
-
const nestedCode = typeof errorObj === "object" && errorObj !== null ? errorObj.code : void 0;
|
|
233
|
-
const baseMessage = data.message || nestedMessage || (typeof errorObj === "string" ? errorObj : void 0) || body || "Unknown error";
|
|
234
|
-
const details = typeof data.details === "string" && data.details.trim().length > 0 ? data.details.trim() : void 0;
|
|
235
|
-
const shouldAppendDetails = !!details && details !== baseMessage && (baseMessage === "Unknown error" || /^failed\b/i.test(baseMessage) || /^provision failed\b/i.test(baseMessage) || /^deprovision failed\b/i.test(baseMessage));
|
|
236
|
-
const code = data.code || nestedCode;
|
|
237
|
-
const message = `${context ? `${context.method ?? "REQUEST"} ${context.path ?? ""}: ` : ""}${shouldAppendDetails ? `${baseMessage}: ${details}` : baseMessage}`;
|
|
238
|
-
const metadata = {
|
|
239
|
-
origin: inferOrigin(headers, context),
|
|
240
|
-
endpoint: context?.path ?? headers?.get("x-tangle-request-path") ?? void 0,
|
|
241
|
-
retryAfterMs: parseRetryAfterMs(headers?.get("retry-after") ?? void 0, data),
|
|
242
|
-
sidecarVersion: headers?.get("x-sidecar-version") ?? void 0,
|
|
243
|
-
containerImage: headers?.get("x-sidecar-image") ?? headers?.get("x-sidecar-image-tag") ?? void 0
|
|
244
|
-
};
|
|
245
|
-
if (isQuotaCode(code)) return new QuotaError(data.quotaType || "rate_limit", message, data.current, data.limit, metadata, status);
|
|
246
|
-
if (isCapabilityCode(code)) return new CapabilityError(message, code, status, metadata, readCapability(data, errorObj));
|
|
247
|
-
if (isPartialFailureCode(code)) return new PartialFailureError(message, code, status, metadata, readFailures(data, errorObj));
|
|
248
|
-
switch (status) {
|
|
249
|
-
case 400: return new ValidationError(message, data.fields, metadata);
|
|
250
|
-
case 401: return new AuthError(message, metadata);
|
|
251
|
-
case 404: return new NotFoundError(data.resourceType || "Resource", data.resourceId || "unknown", metadata);
|
|
252
|
-
case 408: return new TimeoutError(data.timeoutMs || 3e4, message, metadata);
|
|
253
|
-
case 409: return new StateError(message, data.currentState || "unknown", data.requiredState, metadata);
|
|
254
|
-
case 429: return new QuotaError(data.quotaType || "rate_limit", message, data.current, data.limit, metadata);
|
|
255
|
-
case 501: return new SandboxError(message, code || "NOT_IMPLEMENTED", status, metadata);
|
|
256
|
-
default:
|
|
257
|
-
if (status >= 500) return new ServerError(message, status, metadata);
|
|
258
|
-
return new SandboxError(message, code || "UNKNOWN_ERROR", status, metadata);
|
|
259
|
-
}
|
|
260
|
-
}
|
|
261
|
-
//#endregion
|
|
262
|
-
export { PartialFailureError as a, ServerError as c, ValidationError as d, parseErrorResponse as f, NotFoundError as i, StateError as l, CapabilityError as n, QuotaError as o, NetworkError as r, SandboxError as s, AuthError as t, TimeoutError as u };
|
|
1
|
+
function a0_0x896d(_0x3e5f6d,_0x2a4e56){_0x3e5f6d=_0x3e5f6d-0x18f;const _0x40f5e7=a0_0x40f5();let _0x896d04=_0x40f5e7[_0x3e5f6d];if(a0_0x896d['\x73\x73\x47\x51\x79\x79']===undefined){var _0x3960f7=function(_0x39af59){const _0x59185e='\x61\x62\x63\x64\x65\x66\x67\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f\x70\x71\x72\x73\x74\x75\x76\x77\x78\x79\x7a\x41\x42\x43\x44\x45\x46\x47\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f\x50\x51\x52\x53\x54\x55\x56\x57\x58\x59\x5a\x30\x31\x32\x33\x34\x35\x36\x37\x38\x39\x2b\x2f\x3d';let _0x31731d='',_0x203004='';for(let _0x3b687d=0x0,_0xff74ad,_0x3d2679,_0x1fdddc=0x0;_0x3d2679=_0x39af59['\x63\x68\x61\x72\x41\x74'](_0x1fdddc++);~_0x3d2679&&(_0xff74ad=_0x3b687d%0x4?_0xff74ad*0x40+_0x3d2679:_0x3d2679,_0x3b687d++%0x4)?_0x31731d+=String['\x66\x72\x6f\x6d\x43\x68\x61\x72\x43\x6f\x64\x65'](0xff&_0xff74ad>>(-0x2*_0x3b687d&0x6)):0x0){_0x3d2679=_0x59185e['\x69\x6e\x64\x65\x78\x4f\x66'](_0x3d2679);}for(let _0xffad03=0x0,_0x2f179d=_0x31731d['\x6c\x65\x6e\x67\x74\x68'];_0xffad03<_0x2f179d;_0xffad03++){_0x203004+='\x25'+('\x30\x30'+_0x31731d['\x63\x68\x61\x72\x43\x6f\x64\x65\x41\x74'](_0xffad03)['\x74\x6f\x53\x74\x72\x69\x6e\x67'](0x10))['\x73\x6c\x69\x63\x65'](-0x2);}return decodeURIComponent(_0x203004);};a0_0x896d['\x55\x42\x76\x5a\x6b\x51']=_0x3960f7,a0_0x896d['\x76\x52\x68\x64\x51\x62']={},a0_0x896d['\x73\x73\x47\x51\x79\x79']=!![];}const _0x54654c=_0x40f5e7[0x0],_0xc83455=_0x3e5f6d+_0x54654c,_0x448390=a0_0x896d['\x76\x52\x68\x64\x51\x62'][_0xc83455];return!_0x448390?(_0x896d04=a0_0x896d['\x55\x42\x76\x5a\x6b\x51'](_0x896d04),a0_0x896d['\x76\x52\x68\x64\x51\x62'][_0xc83455]=_0x896d04):_0x896d04=_0x448390,_0x896d04;}const a0_0xef2167=a0_0x896d;(function(_0x3a5c38,_0x1e33b7){const _0x254854=a0_0x896d,_0x1989b8=_0x3a5c38();while(!![]){try{const _0x333907=parseInt(_0x254854(0x1f3))/0x1*(parseInt(_0x254854(0x1e5))/0x2)+-parseInt(_0x254854(0x1af))/0x3+parseInt(_0x254854(0x201))/0x4+-parseInt(_0x254854(0x1f0))/0x5*(parseInt(_0x254854(0x1c1))/0x6)+-parseInt(_0x254854(0x1e8))/0x7*(parseInt(_0x254854(0x1b0))/0x8)+parseInt(_0x254854(0x1a0))/0x9+parseInt(_0x254854(0x19b))/0xa;if(_0x333907===_0x1e33b7)break;else _0x1989b8['push'](_0x1989b8['shift']());}catch(_0x179b81){_0x1989b8['push'](_0x1989b8['shift']());}}}(a0_0x40f5,0x4cfe8));var SandboxError=class extends Error{['\x73\x74\x61\x74\x75\x73'];[a0_0xef2167(0x1c8)];[a0_0xef2167(0x206)];['\x65\x6e\x64\x70\x6f\x69\x6e\x74'];[a0_0xef2167(0x1cc)];[a0_0xef2167(0x1bf)];[a0_0xef2167(0x196)];constructor(_0x40b74e,_0x3f577d,_0x25d54e,_0x271d84){const _0x518bcf=a0_0xef2167,_0x2b67a8={'\x75\x72\x55\x46\x6c':_0x518bcf(0x1b3)};super(_0x40b74e),this[_0x518bcf(0x1c5)]=_0x2b67a8[_0x518bcf(0x20d)],this[_0x518bcf(0x1c8)]=_0x3f577d,this[_0x518bcf(0x192)]=_0x25d54e,this['\x6f\x72\x69\x67\x69\x6e']=_0x271d84?.[_0x518bcf(0x206)],this[_0x518bcf(0x1b7)]=_0x271d84?.['\x65\x6e\x64\x70\x6f\x69\x6e\x74'],this[_0x518bcf(0x1cc)]=_0x271d84?.[_0x518bcf(0x1cc)],this[_0x518bcf(0x1bf)]=_0x271d84?.['\x73\x69\x64\x65\x63\x61\x72\x56\x65\x72\x73\x69\x6f\x6e'],this[_0x518bcf(0x196)]=_0x271d84?.[_0x518bcf(0x196)];}},AuthError=class extends SandboxError{constructor(_0x26510b=a0_0xef2167(0x195),_0x256b86){const _0x40f449=a0_0xef2167,_0x2e8210={'\x6b\x4e\x70\x71\x6e':_0x40f449(0x1ef),'\x68\x61\x6d\x6b\x55':_0x40f449(0x202)};super(_0x26510b,_0x2e8210[_0x40f449(0x210)],0x191,_0x256b86),this[_0x40f449(0x1c5)]=_0x2e8210[_0x40f449(0x19c)];}},NotFoundError=class extends SandboxError{[a0_0xef2167(0x193)];['\x72\x65\x73\x6f\x75\x72\x63\x65\x49\x64'];constructor(_0x4a5cbe,_0x287f40,_0x5c8cb5){const _0x22efc6=a0_0xef2167,_0x65f90c={'\x4f\x5a\x41\x76\x43':_0x22efc6(0x1df)};super(_0x4a5cbe+_0x22efc6(0x1cd)+_0x287f40,_0x22efc6(0x1ea),0x194,_0x5c8cb5),this[_0x22efc6(0x1c5)]=_0x65f90c[_0x22efc6(0x1a4)],this[_0x22efc6(0x193)]=_0x4a5cbe,this['\x72\x65\x73\x6f\x75\x72\x63\x65\x49\x64']=_0x287f40;}},QuotaError=class extends SandboxError{['\x71\x75\x6f\x74\x61\x54\x79\x70\x65'];['\x63\x75\x72\x72\x65\x6e\x74'];[a0_0xef2167(0x1fe)];['\x72\x65\x74\x72\x79\x41\x66\x74\x65\x72\x4d\x73'];constructor(_0x25f37c,_0x3113d3,_0x551d66,_0x252161,_0x3913ce,_0x5662ea=0x1ad){const _0x27c4bd=a0_0xef2167,_0x5a8845={'\x56\x58\x50\x76\x75':'\x51\x75\x6f\x74\x61\x45\x72\x72\x6f\x72'};super(_0x3113d3??'\x51\x75\x6f\x74\x61\x20\x65\x78\x63\x65\x65\x64\x65\x64\x3a\x20'+_0x25f37c,'\x51\x55\x4f\x54\x41\x5f\x45\x58\x43\x45\x45\x44\x45\x44',_0x5662ea,_0x3913ce),this[_0x27c4bd(0x1c5)]=_0x5a8845[_0x27c4bd(0x1d4)],this[_0x27c4bd(0x1f9)]=_0x25f37c,this[_0x27c4bd(0x19e)]=_0x551d66,this[_0x27c4bd(0x1fe)]=_0x252161,this[_0x27c4bd(0x1cc)]=_0x3913ce?.[_0x27c4bd(0x1cc)];}},CapabilityError=class extends SandboxError{[a0_0xef2167(0x1d9)];constructor(_0x2f3773,_0x252e76=a0_0xef2167(0x1bc),_0x589283=0x190,_0x4aa9cc,_0x11831c){const _0x161659=a0_0xef2167;super(_0x2f3773,_0x252e76,_0x589283,_0x4aa9cc),this[_0x161659(0x1c5)]='\x43\x61\x70\x61\x62\x69\x6c\x69\x74\x79\x45\x72\x72\x6f\x72',this[_0x161659(0x1d9)]=_0x11831c;}},PartialFailureError=class extends SandboxError{[a0_0xef2167(0x1c6)];constructor(_0x26c053,_0x5de76d=a0_0xef2167(0x1ce),_0x58c24d=0x1f6,_0xf1bb39,_0x5d5dfd){const _0x2bf842=a0_0xef2167;super(_0x26c053,_0x5de76d,_0x58c24d,_0xf1bb39),this['\x6e\x61\x6d\x65']=_0x2bf842(0x1dc),this[_0x2bf842(0x1c6)]=_0x5d5dfd;}},ValidationError=class extends SandboxError{[a0_0xef2167(0x1ca)];constructor(_0x35f736,_0x3e825d,_0x2463cf){const _0x3898f9=a0_0xef2167,_0x1e204a={'\x48\x58\x45\x68\x6b':_0x3898f9(0x1ab)};super(_0x35f736,_0x1e204a[_0x3898f9(0x1d7)],0x190,_0x2463cf),this[_0x3898f9(0x1c5)]='\x56\x61\x6c\x69\x64\x61\x74\x69\x6f\x6e\x45\x72\x72\x6f\x72',this[_0x3898f9(0x1ca)]=_0x3e825d;}},StateError=class extends SandboxError{[a0_0xef2167(0x20a)];[a0_0xef2167(0x1cb)];constructor(_0x40bda3,_0x5416bb,_0x324fed,_0x184e5e){const _0x4ad3bd=a0_0xef2167,_0x578ae3={'\x72\x45\x6c\x66\x45':_0x4ad3bd(0x1f6)};super(_0x40bda3,_0x4ad3bd(0x207),0x199,_0x184e5e),this[_0x4ad3bd(0x1c5)]=_0x578ae3['\x72\x45\x6c\x66\x45'],this[_0x4ad3bd(0x20a)]=_0x5416bb,this[_0x4ad3bd(0x1cb)]=_0x324fed;}},TimeoutError=class extends SandboxError{[a0_0xef2167(0x19d)];constructor(_0x12e4a8,_0xee96e7,_0xd20ddc){const _0x45afa6=a0_0xef2167,_0x36287f={'\x78\x41\x72\x6b\x53':_0x45afa6(0x1bb)};super(_0xee96e7??_0x45afa6(0x211)+_0x12e4a8+'\x6d\x73',_0x45afa6(0x19a),0x198,_0xd20ddc),this[_0x45afa6(0x1c5)]=_0x36287f['\x78\x41\x72\x6b\x53'],this['\x74\x69\x6d\x65\x6f\x75\x74\x4d\x73']=_0x12e4a8;}},NetworkError=class extends SandboxError{[a0_0xef2167(0x212)];constructor(_0x254b59,_0x161cc6,_0x5398ed){const _0x54c289=a0_0xef2167,_0x3b91a6={'\x71\x4e\x55\x79\x61':function(_0x4aa690,_0x58b120){return _0x4aa690 instanceof _0x58b120;},'\x69\x6e\x63\x6d\x4f':function(_0x5b8199,_0x2bda08){return _0x5b8199??_0x2bda08;},'\x68\x70\x4f\x77\x42':_0x54c289(0x208)},_0x51e7da=_0x3b91a6[_0x54c289(0x1da)](_0x161cc6,Error)?_0x161cc6:void 0x0,_0x2fbe0a=_0x3b91a6[_0x54c289(0x1da)](_0x161cc6,Error)?_0x5398ed:_0x3b91a6['\x69\x6e\x63\x6d\x4f'](_0x161cc6,_0x5398ed);super(_0x254b59,_0x54c289(0x1be),void 0x0,_0x2fbe0a),this['\x6e\x61\x6d\x65']=_0x3b91a6[_0x54c289(0x1e9)],this['\x63\x61\x75\x73\x65']=_0x51e7da;}},ServerError=class extends SandboxError{constructor(_0xe432cb,_0x271544=0x1f4,_0xe96779){const _0x5bf2c3=a0_0xef2167,_0x31962a={'\x6d\x69\x42\x42\x6c':_0x5bf2c3(0x20e)};super(_0xe432cb,_0x31962a[_0x5bf2c3(0x209)],_0x271544,_0xe96779),this[_0x5bf2c3(0x1c5)]=_0x5bf2c3(0x215);}};function parseRetryAfterMs(_0x1ab514,_0x1d576e){const _0x45a0d2=a0_0xef2167,_0xa6e44a={'\x6a\x4b\x44\x4f\x4c':_0x45a0d2(0x1fd)};if(typeof _0x1d576e['\x72\x65\x74\x72\x79\x41\x66\x74\x65\x72\x4d\x73']===_0xa6e44a[_0x45a0d2(0x204)]&&Number[_0x45a0d2(0x1f2)](_0x1d576e[_0x45a0d2(0x1cc)]))return Math['\x6d\x61\x78'](0x0,_0x1d576e[_0x45a0d2(0x1cc)]);if(!_0x1ab514)return void 0x0;const _0x549b50=_0x1ab514[_0x45a0d2(0x1f8)]();if(!_0x549b50)return void 0x0;const _0x305179=Number(_0x549b50);if(Number[_0x45a0d2(0x1f2)](_0x305179))return Math[_0x45a0d2(0x1ed)](0x0,_0x305179)*0x3e8;const _0x39ddd3=Date[_0x45a0d2(0x1ac)](_0x549b50);if(!Number[_0x45a0d2(0x1de)](_0x39ddd3))return Math['\x6d\x61\x78'](0x0,_0x39ddd3-Date['\x6e\x6f\x77']());}function inferOrigin(_0x40d0bd,_0x2a9552){const _0x44a1c9=a0_0xef2167,_0x4296ea={'\x57\x41\x4d\x46\x4f':_0x44a1c9(0x1db),'\x43\x67\x4a\x67\x75':_0x44a1c9(0x1b9),'\x45\x69\x4e\x6b\x63':_0x44a1c9(0x1bd),'\x68\x6c\x48\x61\x66':_0x44a1c9(0x1e6),'\x6d\x4d\x49\x43\x62':'\x2f\x69\x6e\x73\x74\x61\x6e\x63\x65\x73'},_0x592a1b=_0x2a9552?.['\x70\x61\x74\x68']??_0x40d0bd?.[_0x44a1c9(0x1e7)](_0x44a1c9(0x1b8))??void 0x0;if(!_0x40d0bd)return _0x2a9552?.[_0x44a1c9(0x1d0)]?_0x4296ea[_0x44a1c9(0x1a2)]:void 0x0;if(_0x40d0bd[_0x44a1c9(0x1ee)](_0x44a1c9(0x1b4))||_0x40d0bd[_0x44a1c9(0x1ee)](_0x44a1c9(0x190))||_0x40d0bd[_0x44a1c9(0x1ee)](_0x4296ea[_0x44a1c9(0x1d5)]))return _0x44a1c9(0x1f1);if(_0x40d0bd[_0x44a1c9(0x1ee)](_0x44a1c9(0x1c3)))return _0x4296ea[_0x44a1c9(0x1d8)];if(_0x592a1b?.[_0x44a1c9(0x1ec)](_0x4296ea['\x68\x6c\x48\x61\x66']))return _0x44a1c9(0x1db);if(_0x592a1b){if(_0x592a1b[_0x44a1c9(0x1ec)](_0x44a1c9(0x20c))||_0x592a1b['\x73\x74\x61\x72\x74\x73\x57\x69\x74\x68']('\x2f\x73\x69\x64\x65\x63\x61\x72\x73')||_0x592a1b[_0x44a1c9(0x1ec)](_0x4296ea[_0x44a1c9(0x1dd)]))return _0x44a1c9(0x1bd);return _0x44a1c9(0x1d6);}return'\x75\x6e\x6b\x6e\x6f\x77\x6e';}function isQuotaCode(_0x50dcb4){const _0x137f7f=a0_0xef2167,_0x57cc32={'\x4b\x71\x69\x74\x48':function(_0x4a2377,_0x2f589b){return _0x4a2377===_0x2f589b;},'\x49\x56\x44\x61\x62':_0x137f7f(0x200)};return _0x57cc32[_0x137f7f(0x1e1)](_0x50dcb4,_0x57cc32[_0x137f7f(0x1a9)])||_0x50dcb4?.[_0x137f7f(0x19f)](_0x137f7f(0x1a8))===!![];}function isCapabilityCode(_0x3b921b){const _0x4883ea=a0_0xef2167,_0x2e508e={'\x70\x50\x49\x41\x54':function(_0x462da2,_0x240be6){return _0x462da2===_0x240be6;},'\x48\x56\x6b\x6e\x6b':_0x4883ea(0x198)};return _0x3b921b==='\x43\x41\x50\x41\x42\x49\x4c\x49\x54\x59\x5f\x4e\x4f\x54\x5f\x45\x4e\x41\x42\x4c\x45\x44'||_0x3b921b===_0x4883ea(0x1bc)||_0x2e508e[_0x4883ea(0x1d1)](_0x3b921b,'\x55\x4e\x53\x55\x50\x50\x4f\x52\x54\x45\x44\x5f\x43\x41\x50\x41\x42\x49\x4c\x49\x54\x59')||_0x3b921b===_0x2e508e[_0x4883ea(0x1a6)]||_0x3b921b==='\x53\x48\x41\x52\x45\x44\x5f\x57\x4f\x52\x4b\x53\x50\x41\x43\x45\x5f\x55\x4e\x53\x55\x50\x50\x4f\x52\x54\x45\x44';}function isPartialFailureCode(_0x4cdc8f){const _0x37bbc4=a0_0xef2167,_0x29933c={'\x73\x53\x42\x58\x71':function(_0x30f8eb,_0x5349fc){return _0x30f8eb===_0x5349fc;},'\x74\x64\x59\x44\x78':_0x37bbc4(0x1ce),'\x4c\x72\x6e\x65\x62':_0x37bbc4(0x1f5)};return _0x29933c[_0x37bbc4(0x213)](_0x4cdc8f,_0x29933c[_0x37bbc4(0x1e4)])||_0x29933c[_0x37bbc4(0x213)](_0x4cdc8f,_0x37bbc4(0x205))||_0x4cdc8f===_0x37bbc4(0x18f)||_0x29933c[_0x37bbc4(0x213)](_0x4cdc8f,_0x29933c[_0x37bbc4(0x1b2)]);}function asString(_0xeb7701){const _0x6b1057=a0_0xef2167,_0xfa9ac4={'\x43\x6e\x4f\x66\x76':function(_0x43d826,_0x370686){return _0x43d826===_0x370686;},'\x4a\x76\x57\x79\x63':_0x6b1057(0x1a1)};return _0xfa9ac4[_0x6b1057(0x1b5)](typeof _0xeb7701,_0xfa9ac4[_0x6b1057(0x1b1)])&&_0xeb7701[_0x6b1057(0x1f8)]()[_0x6b1057(0x191)]>0x0?_0xeb7701:void 0x0;}function a0_0x40f5(){const _0x13c750=['\x7a\x4d\x4c\x53\x44\x67\x76\x59','\x76\x4b\x66\x6d\x73\x75\x72\x62\x76\x65\x4c\x70\x74\x4c\x39\x66\x75\x4c\x6a\x70\x75\x47','\x43\x67\x66\x59\x43\x32\x75','\x44\x67\x76\x5a\x44\x61','\x74\x4b\x39\x75\x78\x30\x4c\x6e\x75\x65\x58\x66\x74\x75\x76\x6f\x76\x65\x76\x65','\x6d\x74\x69\x32\x6e\x5a\x79\x59\x6d\x67\x54\x78\x7a\x33\x76\x6e\x72\x47','\x6d\x4a\x75\x59\x6d\x64\x4b\x30\x6e\x68\x44\x51\x79\x30\x6e\x58\x74\x71','\x73\x4e\x7a\x78\x45\x77\x6d','\x74\x68\x6a\x55\x7a\x77\x69','\x75\x32\x66\x55\x7a\x67\x6a\x56\x45\x65\x76\x59\x43\x4d\x39\x59','\x45\x63\x31\x5a\x41\x77\x72\x4c\x79\x32\x66\x59\x6c\x78\x7a\x4c\x43\x4e\x6e\x50\x42\x32\x34','\x71\x32\x35\x70\x7a\x4e\x79','\x74\x33\x7a\x31\x73\x4c\x47','\x7a\x77\x35\x4b\x43\x67\x39\x50\x42\x4e\x71','\x45\x63\x31\x30\x79\x77\x35\x4e\x42\x67\x75\x54\x43\x4d\x76\x58\x44\x77\x76\x5a\x44\x63\x31\x57\x79\x78\x72\x4f','\x45\x63\x31\x5a\x41\x77\x72\x4c\x79\x32\x66\x59\x6c\x77\x4c\x54\x79\x77\x44\x4c\x6c\x78\x72\x48\x7a\x57','\x43\x4d\x76\x30\x43\x4e\x4b\x54\x79\x77\x7a\x30\x7a\x78\x69','\x76\x67\x4c\x54\x7a\x77\x39\x31\x44\x65\x76\x59\x43\x4d\x39\x59','\x71\x30\x66\x71\x71\x75\x6a\x6a\x74\x65\x4c\x75\x77\x76\x39\x76\x74\x4c\x6e\x76\x75\x66\x62\x70\x75\x4c\x72\x66\x72\x61','\x79\x32\x39\x55\x44\x68\x6a\x56\x42\x63\x31\x57\x42\x67\x66\x55\x7a\x71','\x74\x4b\x76\x75\x76\x30\x39\x73\x73\x31\x39\x66\x75\x4c\x6a\x70\x75\x47','\x43\x32\x4c\x4b\x7a\x77\x6e\x48\x43\x4c\x7a\x4c\x43\x4e\x6e\x50\x42\x32\x34','\x45\x67\x72\x6b\x72\x4b\x69','\x6e\x4c\x44\x30\x7a\x4c\x48\x5a\x43\x57','\x45\x68\x44\x70\x71\x4e\x6d','\x45\x63\x31\x56\x43\x4d\x6e\x4f\x7a\x78\x6e\x30\x43\x4d\x66\x30\x42\x33\x69\x54\x44\x4d\x76\x59\x43\x32\x4c\x56\x42\x47','\x41\x78\x6e\x62\x43\x4e\x6a\x48\x45\x71','\x42\x4d\x66\x54\x7a\x71','\x7a\x4d\x66\x50\x42\x68\x76\x59\x7a\x78\x6d','\x72\x30\x31\x51\x42\x66\x43','\x79\x32\x39\x4b\x7a\x71','\x42\x77\x76\x30\x41\x67\x39\x4b','\x7a\x4d\x4c\x4c\x42\x67\x72\x5a','\x43\x4d\x76\x58\x44\x77\x4c\x59\x7a\x77\x72\x74\x44\x67\x66\x30\x7a\x71','\x43\x4d\x76\x30\x43\x4e\x4c\x62\x7a\x4e\x72\x4c\x43\x4b\x31\x5a','\x69\x67\x35\x56\x44\x63\x62\x4d\x42\x33\x76\x55\x7a\x64\x4f\x47','\x75\x65\x66\x73\x76\x65\x4c\x62\x74\x66\x39\x67\x71\x75\x4c\x6d\x76\x76\x6a\x66','\x43\x67\x76\x69\x44\x68\x4f','\x43\x67\x66\x30\x41\x61','\x43\x66\x62\x6a\x71\x76\x71','\x73\x4c\x50\x6d\x77\x67\x34','\x7a\x78\x6a\x59\x42\x33\x69','\x76\x4c\x48\x71\x44\x4e\x75','\x71\x32\x44\x6b\x7a\x33\x75','\x43\x4e\x76\x55\x44\x67\x4c\x54\x7a\x71','\x73\x66\x48\x66\x41\x67\x53','\x72\x77\x4c\x6f\x41\x32\x6d','\x79\x32\x66\x57\x79\x77\x6a\x50\x42\x67\x4c\x30\x45\x71','\x43\x75\x35\x76\x45\x77\x65','\x43\x32\x66\x55\x7a\x67\x6a\x56\x45\x63\x31\x48\x43\x67\x4b','\x75\x67\x66\x59\x44\x67\x4c\x48\x42\x65\x7a\x48\x41\x77\x58\x31\x43\x4d\x76\x66\x43\x4e\x6a\x56\x43\x47','\x42\x75\x31\x6a\x71\x32\x69','\x41\x78\x6e\x6f\x79\x75\x34','\x74\x4d\x39\x30\x72\x4d\x39\x31\x42\x4d\x72\x66\x43\x4e\x6a\x56\x43\x47','\x75\x4e\x62\x6f\x7a\x67\x57','\x73\x33\x66\x50\x44\x65\x47','\x44\x67\x6a\x5a\x79\x4d\x34','\x75\x4c\x44\x30\x79\x4b\x43','\x44\x67\x72\x7a\x72\x68\x47','\x6e\x4a\x43\x57\x77\x66\x50\x6a\x45\x77\x66\x32','\x6c\x33\x79\x58\x6c\x57','\x7a\x32\x76\x30','\x6d\x74\x72\x6c\x74\x4c\x66\x59\x74\x32\x30','\x41\x68\x62\x70\x44\x30\x69','\x74\x4b\x39\x75\x78\x30\x7a\x70\x76\x75\x35\x65','\x43\x67\x72\x5a\x72\x68\x75','\x43\x33\x72\x48\x43\x4e\x72\x5a\x76\x32\x4c\x30\x41\x61','\x42\x77\x66\x34','\x41\x67\x66\x5a','\x71\x76\x76\x75\x73\x66\x39\x66\x75\x4c\x6a\x70\x75\x47','\x6d\x74\x6d\x34\x6e\x5a\x43\x5a\x6e\x77\x6e\x49\x72\x4e\x76\x69\x71\x71','\x43\x32\x4c\x4b\x7a\x77\x6e\x48\x43\x47','\x41\x78\x6e\x67\x41\x77\x35\x50\x44\x67\x75','\x6d\x74\x75\x59\x6d\x65\x31\x66\x41\x65\x6e\x4f\x7a\x71','\x45\x66\x50\x70\x45\x76\x4b','\x72\x4b\x58\x66\x72\x76\x72\x46\x72\x65\x76\x71\x75\x4b\x39\x77\x73\x76\x6e\x6a\x74\x30\x35\x46\x72\x4b\x66\x6a\x74\x65\x76\x65','\x75\x33\x72\x48\x44\x67\x76\x66\x43\x4e\x6a\x56\x43\x47','\x43\x4d\x66\x30\x7a\x76\x39\x53\x41\x77\x31\x50\x44\x61','\x44\x68\x6a\x50\x42\x71','\x43\x78\x76\x56\x44\x67\x66\x75\x45\x78\x62\x4c','\x43\x4d\x76\x5a\x42\x33\x76\x59\x79\x32\x76\x6a\x7a\x61','\x7a\x4e\x7a\x31\x75\x75\x71','\x43\x4d\x76\x5a\x44\x77\x58\x30\x43\x57','\x42\x4e\x76\x54\x79\x4d\x76\x59','\x42\x67\x4c\x54\x41\x78\x71','\x44\x31\x6e\x64\x72\x4e\x47','\x75\x76\x76\x70\x76\x65\x66\x46\x72\x76\x48\x64\x72\x75\x76\x65\x72\x75\x71','\x6d\x4a\x65\x58\x6d\x74\x65\x59\x6f\x67\x39\x52\x75\x68\x72\x4a\x74\x71','\x71\x78\x76\x30\x41\x65\x76\x59\x43\x4d\x39\x59','\x42\x77\x76\x5a\x43\x32\x66\x4e\x7a\x71','\x41\x4b\x54\x65\x74\x30\x57','\x72\x4b\x58\x66\x72\x76\x72\x46\x75\x65\x66\x73\x76\x65\x4c\x62\x74\x66\x39\x67\x71\x75\x4c\x6d\x76\x76\x6a\x66','\x42\x33\x6a\x50\x7a\x32\x4c\x55','\x73\x75\x35\x77\x71\x75\x58\x6a\x72\x66\x39\x74\x76\x65\x66\x75\x72\x71','\x74\x4d\x76\x30\x44\x32\x39\x59\x41\x30\x76\x59\x43\x4d\x39\x59','\x42\x77\x4c\x63\x71\x4d\x57','\x79\x33\x76\x59\x43\x4d\x76\x55\x44\x66\x6e\x30\x79\x78\x72\x4c','\x79\x33\x76\x50\x77\x4c\x61','\x6c\x33\x62\x59\x42\x32\x50\x4c\x79\x33\x72\x5a','\x44\x78\x6a\x76\x72\x4d\x57','\x75\x30\x76\x73\x76\x4b\x76\x73\x78\x30\x76\x73\x75\x4b\x39\x73','\x44\x77\x35\x52\x42\x4d\x39\x33\x42\x47','\x41\x30\x35\x57\x43\x77\x34','\x75\x4d\x76\x58\x44\x77\x76\x5a\x44\x63\x62\x30\x41\x77\x31\x4c\x7a\x63\x62\x56\x44\x78\x71\x47\x79\x77\x7a\x30\x7a\x78\x69\x47','\x79\x32\x66\x31\x43\x32\x75','\x43\x31\x6e\x63\x77\x68\x65','\x71\x76\x50\x32\x72\x4b\x38','\x75\x32\x76\x59\x44\x4d\x76\x59\x72\x78\x6a\x59\x42\x33\x69','\x72\x4b\x58\x66\x72\x76\x72\x46\x72\x65\x4c\x74\x75\x65\x66\x75\x71\x30\x48\x46\x75\x65\x66\x73\x76\x65\x4c\x62\x74\x66\x39\x67\x71\x75\x4c\x6d\x76\x76\x6a\x66','\x45\x63\x31\x5a\x41\x77\x72\x4c\x79\x32\x66\x59\x6c\x77\x4c\x54\x79\x77\x44\x4c','\x42\x67\x76\x55\x7a\x33\x72\x4f','\x43\x33\x72\x48\x44\x68\x76\x5a','\x43\x4d\x76\x5a\x42\x33\x76\x59\x79\x32\x76\x75\x45\x78\x62\x4c','\x75\x4d\x76\x5a\x42\x33\x76\x59\x79\x32\x75','\x71\x78\x76\x30\x41\x67\x76\x55\x44\x67\x4c\x4a\x79\x78\x72\x50\x42\x32\x34\x47\x7a\x4d\x66\x50\x42\x67\x76\x4b','\x79\x32\x39\x55\x44\x67\x66\x50\x42\x4d\x76\x59\x73\x77\x31\x48\x7a\x32\x75','\x76\x77\x35\x52\x42\x4d\x39\x33\x42\x49\x62\x4c\x43\x4e\x6a\x56\x43\x47','\x72\x4b\x58\x66\x72\x76\x72\x46\x75\x30\x48\x62\x75\x4b\x76\x65\x78\x31\x44\x70\x75\x4b\x54\x74\x75\x65\x66\x64\x72\x76\x39\x76\x74\x4c\x6e\x76\x75\x66\x62\x70\x75\x4c\x72\x66\x72\x61','\x7a\x67\x76\x30\x79\x77\x4c\x53\x43\x57','\x76\x65\x4c\x6e\x72\x75\x39\x76\x76\x61','\x6d\x5a\x65\x58\x6e\x64\x43\x5a\x6d\x65\x6e\x52\x7a\x76\x76\x6a\x42\x71','\x41\x67\x66\x54\x41\x31\x75','\x44\x67\x4c\x54\x7a\x77\x39\x31\x44\x65\x31\x5a','\x79\x33\x76\x59\x43\x4d\x76\x55\x44\x61','\x7a\x77\x35\x4b\x43\x31\x44\x50\x44\x67\x47','\x6d\x4a\x79\x33\x6e\x74\x65\x59\x6e\x68\x76\x6d\x76\x76\x4c\x70\x42\x61','\x43\x33\x72\x59\x41\x77\x35\x4e','\x76\x30\x66\x6e\x72\x4b\x38','\x41\x65\x4c\x51\x7a\x30\x69','\x74\x31\x50\x62\x44\x4b\x6d','\x75\x4b\x76\x72\x76\x75\x76\x74\x76\x61','\x73\x66\x7a\x52\x42\x4d\x53','\x42\x32\x6a\x51\x7a\x77\x6e\x30','\x78\x31\x66\x76\x74\x31\x72\x62\x78\x30\x76\x79\x71\x30\x76\x66\x72\x65\x76\x65','\x73\x76\x7a\x65\x79\x77\x69'];a0_0x40f5=function(){return _0x13c750;};return a0_0x40f5();}function isFailureDetail(_0x344281){const _0x54f46d=a0_0xef2167;return typeof _0x344281===_0x54f46d(0x1a7)&&_0x344281!==null&&!Array[_0x54f46d(0x1c4)](_0x344281);}function readCapability(_0x56c137,_0x431f26){const _0x53a258=a0_0xef2167,_0x5eaa91={'\x43\x70\x67\x58\x73':function(_0x17933a,_0x2ddd83){return _0x17933a===_0x2ddd83;},'\x70\x64\x73\x44\x75':function(_0xf1cca9,_0x35cb09){return _0xf1cca9!==_0x35cb09;}},_0x56da29=_0x5eaa91['\x43\x70\x67\x58\x73'](typeof _0x431f26,_0x53a258(0x1a7))&&_0x5eaa91[_0x53a258(0x1eb)](_0x431f26,null)?asString(_0x431f26['\x63\x61\x70\x61\x62\x69\x6c\x69\x74\x79']):void 0x0;return asString(_0x56c137[_0x53a258(0x1d9)])??_0x56da29;}function readFailures(_0x4f7e7e,_0x5c419e){const _0x3bc3b5=a0_0xef2167,_0x1dc3b4={'\x52\x57\x74\x62\x47':function(_0x5c52a7,_0x393055){return _0x5c52a7>_0x393055;},'\x78\x5a\x4f\x79\x59':_0x3bc3b5(0x1a7)};if(Array['\x69\x73\x41\x72\x72\x61\x79'](_0x4f7e7e[_0x3bc3b5(0x1c6)]))return _0x4f7e7e[_0x3bc3b5(0x1c6)][_0x3bc3b5(0x1aa)](isFailureDetail);if(Array[_0x3bc3b5(0x1c4)](_0x4f7e7e['\x72\x65\x73\x75\x6c\x74\x73'])){const _0x3be24d=_0x4f7e7e[_0x3bc3b5(0x1fc)][_0x3bc3b5(0x1aa)](_0x158d47=>typeof _0x158d47==='\x6f\x62\x6a\x65\x63\x74'&&_0x158d47!==null&&_0x158d47['\x6f\x6b']===![]);if(_0x1dc3b4[_0x3bc3b5(0x1e3)](_0x3be24d[_0x3bc3b5(0x191)],0x0))return _0x3be24d['\x66\x69\x6c\x74\x65\x72'](isFailureDetail);}if(typeof _0x5c419e===_0x1dc3b4[_0x3bc3b5(0x1f4)]&&_0x5c419e!==null&&Array['\x69\x73\x41\x72\x72\x61\x79'](_0x5c419e[_0x3bc3b5(0x1c6)]))return _0x5c419e[_0x3bc3b5(0x1c6)][_0x3bc3b5(0x1aa)](isFailureDetail);}function parseErrorResponse(_0x532724,_0x3a36e7,_0x3829b6,_0x3e2695){const _0x4a73e8=a0_0xef2167,_0x5f2f40={'\x4f\x76\x75\x4a\x58':'\x6f\x62\x6a\x65\x63\x74','\x74\x62\x73\x62\x6e':function(_0x4f5fd4,_0x234614){return _0x4f5fd4===_0x234614;},'\x68\x49\x6a\x67\x42':function(_0x3647f1,_0x4c89d3){return _0x3647f1!==_0x4c89d3;},'\x78\x77\x4f\x42\x73':_0x4a73e8(0x197),'\x63\x75\x69\x5a\x50':function(_0x566538,_0x3c559f,_0x3e1771){return _0x566538(_0x3c559f,_0x3e1771);},'\x77\x53\x43\x46\x78':_0x4a73e8(0x1b4),'\x4a\x5a\x4c\x58\x6e':_0x4a73e8(0x1b9),'\x41\x5a\x76\x46\x4f':function(_0x1d3ba5,_0x366279){return _0x1d3ba5(_0x366279);},'\x70\x65\x48\x74\x7a':'\x72\x61\x74\x65\x5f\x6c\x69\x6d\x69\x74','\x47\x4d\x6a\x6c\x57':function(_0x13df00,_0x26c1ed,_0x39a312){return _0x13df00(_0x26c1ed,_0x39a312);},'\x52\x70\x4e\x64\x6c':_0x4a73e8(0x20f),'\x66\x76\x75\x51\x44':function(_0x77b1fe,_0xfd5ccb){return _0x77b1fe||_0xfd5ccb;},'\x78\x64\x4a\x46\x42':'\x55\x4e\x4b\x4e\x4f\x57\x4e\x5f\x45\x52\x52\x4f\x52'};let _0x5429e9;try{_0x5429e9=JSON[_0x4a73e8(0x1ac)](_0x3a36e7);}catch{_0x5429e9={'\x6d\x65\x73\x73\x61\x67\x65':_0x3a36e7};}const _0x197917=_0x5429e9[_0x4a73e8(0x1d3)],_0x5b4689=typeof _0x197917===_0x5f2f40[_0x4a73e8(0x1b6)]&&_0x197917!==null?_0x197917[_0x4a73e8(0x203)]:void 0x0,_0x499061=_0x5f2f40[_0x4a73e8(0x1e2)](typeof _0x197917,_0x4a73e8(0x1a7))&&_0x197917!==null?_0x197917['\x63\x6f\x64\x65']:void 0x0,_0x31ea13=_0x5429e9[_0x4a73e8(0x203)]||_0x5b4689||(typeof _0x197917===_0x4a73e8(0x1a1)?_0x197917:void 0x0)||_0x3a36e7||_0x4a73e8(0x197),_0x5f2602=typeof _0x5429e9[_0x4a73e8(0x199)]===_0x4a73e8(0x1a1)&&_0x5429e9[_0x4a73e8(0x199)][_0x4a73e8(0x1f8)]()[_0x4a73e8(0x191)]>0x0?_0x5429e9['\x64\x65\x74\x61\x69\x6c\x73'][_0x4a73e8(0x1f8)]():void 0x0,_0x38a407=!!_0x5f2602&&_0x5f2f40[_0x4a73e8(0x1a3)](_0x5f2602,_0x31ea13)&&(_0x31ea13===_0x5f2f40[_0x4a73e8(0x1c2)]||/^failed\b/i['\x74\x65\x73\x74'](_0x31ea13)||/^provision failed\b/i[_0x4a73e8(0x1ad)](_0x31ea13)||/^deprovision failed\b/i[_0x4a73e8(0x1ad)](_0x31ea13)),_0x186146=_0x5429e9[_0x4a73e8(0x1c8)]||_0x499061,_0x7ef95=''+(_0x3829b6?(_0x3829b6[_0x4a73e8(0x1c9)]??_0x4a73e8(0x1a5))+'\x20'+(_0x3829b6[_0x4a73e8(0x1d0)]??'')+'\x3a\x20':'')+(_0x38a407?_0x31ea13+'\x3a\x20'+_0x5f2602:_0x31ea13),_0xde5a35={'\x6f\x72\x69\x67\x69\x6e':inferOrigin(_0x3e2695,_0x3829b6),'\x65\x6e\x64\x70\x6f\x69\x6e\x74':_0x3829b6?.['\x70\x61\x74\x68']??_0x3e2695?.[_0x4a73e8(0x1e7)](_0x4a73e8(0x1b8))??void 0x0,'\x72\x65\x74\x72\x79\x41\x66\x74\x65\x72\x4d\x73':_0x5f2f40[_0x4a73e8(0x20b)](parseRetryAfterMs,_0x3e2695?.[_0x4a73e8(0x1e7)](_0x4a73e8(0x1ba))??void 0x0,_0x5429e9),'\x73\x69\x64\x65\x63\x61\x72\x56\x65\x72\x73\x69\x6f\x6e':_0x3e2695?.[_0x4a73e8(0x1e7)](_0x5f2f40[_0x4a73e8(0x1ff)])??void 0x0,'\x63\x6f\x6e\x74\x61\x69\x6e\x65\x72\x49\x6d\x61\x67\x65':_0x3e2695?.[_0x4a73e8(0x1e7)](_0x4a73e8(0x190))??_0x3e2695?.[_0x4a73e8(0x1e7)](_0x5f2f40[_0x4a73e8(0x1d2)])??void 0x0};if(_0x5f2f40['\x41\x5a\x76\x46\x4f'](isQuotaCode,_0x186146))return new QuotaError(_0x5429e9['\x71\x75\x6f\x74\x61\x54\x79\x70\x65']||_0x5f2f40[_0x4a73e8(0x1cf)],_0x7ef95,_0x5429e9['\x63\x75\x72\x72\x65\x6e\x74'],_0x5429e9['\x6c\x69\x6d\x69\x74'],_0xde5a35,_0x532724);if(_0x5f2f40[_0x4a73e8(0x214)](isCapabilityCode,_0x186146))return new CapabilityError(_0x7ef95,_0x186146,_0x532724,_0xde5a35,readCapability(_0x5429e9,_0x197917));if(isPartialFailureCode(_0x186146))return new PartialFailureError(_0x7ef95,_0x186146,_0x532724,_0xde5a35,_0x5f2f40[_0x4a73e8(0x1c7)](readFailures,_0x5429e9,_0x197917));switch(_0x532724){case 0x190:return new ValidationError(_0x7ef95,_0x5429e9[_0x4a73e8(0x1ca)],_0xde5a35);case 0x191:return new AuthError(_0x7ef95,_0xde5a35);case 0x194:return new NotFoundError(_0x5429e9['\x72\x65\x73\x6f\x75\x72\x63\x65\x54\x79\x70\x65']||_0x4a73e8(0x194),_0x5429e9[_0x4a73e8(0x1fa)]||_0x5f2f40[_0x4a73e8(0x1e0)],_0xde5a35);case 0x198:return new TimeoutError(_0x5429e9[_0x4a73e8(0x19d)]||0x7530,_0x7ef95,_0xde5a35);case 0x199:return new StateError(_0x7ef95,_0x5429e9['\x63\x75\x72\x72\x65\x6e\x74\x53\x74\x61\x74\x65']||_0x4a73e8(0x20f),_0x5429e9[_0x4a73e8(0x1cb)],_0xde5a35);case 0x1ad:return new QuotaError(_0x5429e9[_0x4a73e8(0x1f9)]||_0x4a73e8(0x1f7),_0x7ef95,_0x5429e9[_0x4a73e8(0x19e)],_0x5429e9['\x6c\x69\x6d\x69\x74'],_0xde5a35);case 0x1f5:return new SandboxError(_0x7ef95,_0x186146||_0x4a73e8(0x1ae),_0x532724,_0xde5a35);default:if(_0x532724>=0x1f4)return new ServerError(_0x7ef95,_0x532724,_0xde5a35);return new SandboxError(_0x7ef95,_0x5f2f40[_0x4a73e8(0x1fb)](_0x186146,_0x5f2f40[_0x4a73e8(0x1c0)]),_0x532724,_0xde5a35);}}export{PartialFailureError as a,ServerError as c,ValidationError as d,parseErrorResponse as f,NotFoundError as i,StateError as l,CapabilityError as n,QuotaError as o,NetworkError as r,SandboxError as s,AuthError as t,TimeoutError as u};
|
package/dist/index.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { d as
|
|
2
|
-
import { _ as
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import { s as TangleSandboxClientConfig, t as TangleSandboxClient } from "./index-
|
|
1
|
+
import { $ as DriverInfo, $n as SandboxTraceOptions, $t as ProvisionEvent, A as BatchTask, An as SandboxFleetMachineSpec, Ar as UsageInfo, At as ListMessagesOptions, B as CompletedTurnResult, Bn as SandboxFleetUsage, Br as AgentProfileResourceRef, Bt as PermissionsManager, C as BackendInfo, Cn as SandboxFleetDriverCapability, Cr as TeePublicKey, Ct as GpuType, D as BatchEvent, Dn as SandboxFleetMachine, Dr as UpdateUserOptions, Dt as IntelligenceReportCompareTo, E as BackendType, En as SandboxFleetIntelligenceEnvelope, Er as ToolsConfig, Et as IntelligenceReportBudget, Fn as SandboxFleetToken, Fr as AgentProfileFileMount, Ft as MintScopedTokenOptions, G as CreateSandboxOptions, Gn as SandboxInfo, Gr as defineAgentProfile, Gt as ProcessLogEntry, H as CreateSandboxFleetOptions, Hn as SandboxFleetWorkspaceReconcileResult, Hr as AgentProfileValidationIssue, Ht as PreviewLinkManager, In as SandboxFleetTraceBundle, Ir as AgentProfileMcpServer, It as MkdirOptions, J as DispatchPromptOptions, Jn as SandboxResources, Jr as mergeAgentProfiles, Jt as ProcessSpawnOptions, K as DeleteOptions, Kn as SandboxIntelligenceEnvelope, Kr as defineGitHubResource, Kt as ProcessManager, Ln as SandboxFleetTraceEvent, Lr as AgentProfileModelHints, Lt as NetworkConfig, M as CheckpointInfo, Mn as SandboxFleetManifestMachine, Mr as AgentProfile, Mt as ListSandboxFleetOptions, N as CheckpointOptions, Nn as SandboxFleetOperationsSummary, Nr as AgentProfileCapabilities, Nt as ListSandboxOptions, O as BatchOptions, On as SandboxFleetMachineMeteredUsage, Or as UploadOptions, Ot as IntelligenceReportSubjectType, P as CheckpointResult, Pn as SandboxFleetPolicy, Pr as AgentProfileConfidential, Pt as McpServerConfig, Q as DriverConfig, Qn as SandboxTraceExport, Qt as PromptResult, R as CodeResult, Rn as SandboxFleetTraceExport, Rr as AgentProfilePermissionValue, Rt as NetworkManager, S as BackendConfig, Sn as SandboxFleetDispatchResponse, Sr as TeeAttestationResponse, St as GitStatus, T as BackendStatus, Tn as SandboxFleetInfo, Tr as TokenRefreshHandler, Tt as IntelligenceReport, Un as SandboxFleetWorkspaceRestoreResult, Ur as AgentProfileValidationResult, Ut as Process, V as CreateIntelligenceReportOptions, Vn as SandboxFleetWorkspace, Vr as AgentProfileResources, Vt as PreviewLinkInfo, W as CreateSandboxFleetWithCoordinatorOptions, Wn as SandboxFleetWorkspaceSnapshotResult, Wr as AgentSubagentProfile, Wt as ProcessInfo, X as DownloadOptions, Xn as SandboxTraceBundle, Y as DispatchedSession, Yn as SandboxStatus, Yt as ProcessStatus, Z as DownloadProgress, Zn as SandboxTraceEvent, Zt as PromptOptions, _ as AcceleratorKind, _n as SandboxEvent, _r as SubscriptionInfo, _t as GitAuth, a as TraceExportSink, an as PublishPublicTemplateOptions, ar as SecretInfo, at as FileSystem, b as AttachSandboxFleetMachineOptions, bn as SandboxFleetCostEstimate, br as TeeAttestationOptions, bt as GitConfig, c as otelTraceIdForTangleTrace, cn as ReapExpiredSandboxFleetsResult, cr as SessionInfo, ct as FleetDispatchResultBufferOptions, d as BuildSandboxMcpConfigOptions, dn as RunCodeOptions, dr as SessionStatus, en as ProvisionResult, er as SandboxUser, et as DriverType, f as SANDBOX_MCP_SERVER_NAME, fn as SSHCommandDescriptor, fr as SnapshotInfo, ft as FleetMachineId, g as buildSandboxMcpConfig, gn as SandboxEnvironment, gr as StorageConfig, gt as ForkResult, h as SandboxMcpServerEntry, hn as SandboxConnection, ht as ForkOptions, i as TraceExportResult, in as PublicTemplateVersionInfo, ir as SearchOptions, it as FileInfo, j as BatchTaskResult, jn as SandboxFleetManifest, jr as WaitForOptions, jt as ListOptions, k as BatchResult, kn as SandboxFleetMachineRecord, kr as UploadProgress, kt as IntelligenceReportWindow, l as toOtelJson, ln as ReconcileSandboxFleetsOptions, lr as SessionListOptions, lt as FleetDispatchStreamOptions, m as SandboxMcpEndpoint, mn as SandboxClientConfig, mr as SnapshotResult, n as SandboxInstance, nn as ProvisionStep, nr as ScopedTokenScope, nt as ExecOptions, o as buildTraceExportPayload, on as PublishPublicTemplateVersionOptions, or as SecretsManager, ot as FleetDispatchCancelResult, p as SandboxMcpConfig, pn as SSHCredentials, pr as SnapshotOptions, pt as FleetPromptDispatchOptions, q as DirectoryPermission, qn as SandboxPermissionsConfig, qr as defineInlineResource, qt as ProcessSignal, r as TraceExportFormat, rn as PublicTemplateInfo, rr as SearchMatch, rt as ExecResult, s as exportTraceBundle, sn as ReapExpiredSandboxFleetsOptions, sr as SessionEventStreamOptions, st as FleetDispatchResultBuffer, tn as ProvisionStatus, tr as ScopedToken, tt as EventStreamOptions, u as SandboxSession, un as ReconcileSandboxFleetsResult, ur as SessionMessage, ut as FleetExecDispatchOptions, v as AccessPolicyRule, vn as SandboxFleetArtifact, vr as TaskOptions, vt as GitBranch, w as BackendManager, wn as SandboxFleetDriverTimings, wr as TeePublicKeyResponse, wt as InstalledTool, x as BackendCapabilities, xn as SandboxFleetDispatchFailureClass, xr as TeeAttestationReport, xt as GitDiff, y as AddUserOptions, yn as SandboxFleetArtifactSpec, yr as TaskResult, yt as GitCommit, zn as SandboxFleetTraceOptions, zr as AgentProfilePrompt, zt as PermissionLevel } from "./sandbox-CBmfYqMQ.js";
|
|
2
|
+
import { A as SandboxFleetClient, C as IntegrationVerificationKind, D as TriggerRun, E as TriggerInfo, M as ParsedSSEEvent, N as parseSSEStream, O as TriggerWithSecret, S as IntegrationScope, T as RecipeManifest, _ as IntegrationAction, a as Team, b as IntegrationPrincipalType, c as AutomationInfo, d as CreateEndpointInput, f as CreateTriggerInput, g as InstallRecipeInput, h as EndpointWithSecret, i as SandboxClient, j as ParseSSEStreamOptions, k as SandboxFleet, l as ConnectionInfo, m as EndpointInfo, n as IntelligenceClient, o as TeamInvitation, p as DeliveryAttempt, r as InviteTeamMemberOptions, s as TeamMember, t as CreateTeamOptions, u as CreateAutomationInput, v as IntegrationActionKind, w as IntegrationsManager, x as IntegrationProvider, y as IntegrationDeliveryStatus } from "./client-DM2pIli7.js";
|
|
3
|
+
import { d as AnyTokenPayload, h as IssueCollaborationTokenOptions, m as CollaborationTokenPayload, p as CollaborationAccess } from "./index-D-2pH_70.js";
|
|
4
|
+
import { _ as CollaborationTransportConfig, a as CollaborationClient, c as CollaborationClientConfig, d as CollaborationDocumentRef, f as CollaborationFileBridgeOptions, g as CollaborationTokenRefreshResponse, h as CollaborationTokenRefreshRequest, i as parseCollaborationDocumentId, l as CollaborationDocumentAdapter, m as CollaborationPermissions, n as buildCollaborationDocumentId, o as CollaborationBootstrapRequest, p as CollaborationFileEvent, r as normalizeCollaborationPath, s as CollaborationBootstrapResponse, t as CollaborationFileBridge, u as CollaborationDocumentChange, v as SaveCollaborationSnapshotRequest, y as SaveCollaborationSnapshotResponse } from "./index-D7bwmNs8.js";
|
|
5
|
+
import { a as PartialFailureError, c as SandboxErrorJson, d as StateError, f as TimeoutError, i as NotFoundError, l as SandboxFailureDetail, n as CapabilityError, o as QuotaError, p as ValidationError, r as NetworkError, s as SandboxError, t as AuthError, u as ServerError } from "./errors-1Se5ATyZ.js";
|
|
6
|
+
import { s as TangleSandboxClientConfig, t as TangleSandboxClient } from "./index-CTj81tF9.js";
|
|
7
7
|
|
|
8
8
|
//#region src/attestation-heartbeat.d.ts
|
|
9
9
|
interface TeeAttestationHeartbeatSample {
|
|
@@ -552,4 +552,253 @@ declare const MANAGE_SANDBOXES_PARAMETERS: {
|
|
|
552
552
|
};
|
|
553
553
|
};
|
|
554
554
|
//#endregion
|
|
555
|
-
|
|
555
|
+
//#region src/router-search.d.ts
|
|
556
|
+
type TangleSearchProvider = "you" | "brave" | "exa" | "parallel" | "tavily" | "perplexity";
|
|
557
|
+
interface RouterSearchConfigOptions {
|
|
558
|
+
routerUrl?: string;
|
|
559
|
+
provider?: TangleSearchProvider;
|
|
560
|
+
apiKeyEnv?: string;
|
|
561
|
+
model?: string;
|
|
562
|
+
fetchImpl?: typeof fetch;
|
|
563
|
+
}
|
|
564
|
+
interface RouterSearchConfig {
|
|
565
|
+
object: "search.config";
|
|
566
|
+
default_provider: TangleSearchProvider;
|
|
567
|
+
env?: Record<string, string>;
|
|
568
|
+
endpoint: {
|
|
569
|
+
url: string;
|
|
570
|
+
};
|
|
571
|
+
mcp: {
|
|
572
|
+
streamable_http_url: string;
|
|
573
|
+
headers?: Record<string, string>;
|
|
574
|
+
};
|
|
575
|
+
tcloud: {
|
|
576
|
+
sandboxBackend: {
|
|
577
|
+
model: {
|
|
578
|
+
provider: string;
|
|
579
|
+
baseUrl: string;
|
|
580
|
+
apiKeyEnv: string;
|
|
581
|
+
model: string;
|
|
582
|
+
providerOptions?: Record<string, unknown>;
|
|
583
|
+
};
|
|
584
|
+
};
|
|
585
|
+
};
|
|
586
|
+
harness_env?: Record<string, string>;
|
|
587
|
+
openrouter_compat?: {
|
|
588
|
+
chat_completions?: {
|
|
589
|
+
url: string;
|
|
590
|
+
body: Record<string, unknown>;
|
|
591
|
+
};
|
|
592
|
+
responses?: {
|
|
593
|
+
url: string;
|
|
594
|
+
body: Record<string, unknown>;
|
|
595
|
+
};
|
|
596
|
+
};
|
|
597
|
+
eval_matrix: {
|
|
598
|
+
url: string;
|
|
599
|
+
body_template: Record<string, unknown>;
|
|
600
|
+
};
|
|
601
|
+
}
|
|
602
|
+
declare function fetchTangleRouterSearchConfig(options?: RouterSearchConfigOptions): Promise<RouterSearchConfig>;
|
|
603
|
+
declare function buildTangleRouterSearchProfile(config: RouterSearchConfig, options?: {
|
|
604
|
+
name?: string;
|
|
605
|
+
model?: string;
|
|
606
|
+
}): AgentProfile;
|
|
607
|
+
declare function buildTangleRouterSearchBackend(config: RouterSearchConfig, options?: {
|
|
608
|
+
type?: BackendConfig["type"];
|
|
609
|
+
apiKey?: string;
|
|
610
|
+
profile?: AgentProfile;
|
|
611
|
+
}): BackendConfig;
|
|
612
|
+
declare function buildTangleRouterEvalMatrixRequest(config: RouterSearchConfig, overrides?: Record<string, unknown>): {
|
|
613
|
+
url: string;
|
|
614
|
+
body: Record<string, unknown>;
|
|
615
|
+
};
|
|
616
|
+
declare function buildTangleRouterResponsesWebSearchRequest(config: RouterSearchConfig, overrides?: Record<string, unknown>): {
|
|
617
|
+
url: string;
|
|
618
|
+
body: Record<string, unknown>;
|
|
619
|
+
};
|
|
620
|
+
//#endregion
|
|
621
|
+
//#region src/router-eval-matrix-runner.d.ts
|
|
622
|
+
interface RouterEvalMatrixScenario {
|
|
623
|
+
id: string;
|
|
624
|
+
prompt: string;
|
|
625
|
+
profile?: string;
|
|
626
|
+
harness?: string;
|
|
627
|
+
benchmark?: {
|
|
628
|
+
profileId?: string;
|
|
629
|
+
harnessId?: string;
|
|
630
|
+
transport?: string;
|
|
631
|
+
searchProvider?: string;
|
|
632
|
+
artifacts?: Record<string, string>;
|
|
633
|
+
};
|
|
634
|
+
sandbox?: {
|
|
635
|
+
image?: string;
|
|
636
|
+
testCommand?: string;
|
|
637
|
+
};
|
|
638
|
+
}
|
|
639
|
+
interface RouterEvalMatrixAgentProfile {
|
|
640
|
+
id: string;
|
|
641
|
+
name?: string;
|
|
642
|
+
model: string;
|
|
643
|
+
providerOptions?: {
|
|
644
|
+
gateway?: {
|
|
645
|
+
webSearch?: boolean | {
|
|
646
|
+
provider?: string;
|
|
647
|
+
};
|
|
648
|
+
};
|
|
649
|
+
};
|
|
650
|
+
}
|
|
651
|
+
interface RouterEvalMatrixHarness {
|
|
652
|
+
id: string;
|
|
653
|
+
image: string;
|
|
654
|
+
transport?: string;
|
|
655
|
+
testCommand?: string;
|
|
656
|
+
envVars?: Record<string, string>;
|
|
657
|
+
gitRepo?: string;
|
|
658
|
+
gitBranch?: string;
|
|
659
|
+
timeout?: number;
|
|
660
|
+
}
|
|
661
|
+
interface RouterEvalMatrixPayload {
|
|
662
|
+
models: string[];
|
|
663
|
+
scenarios: RouterEvalMatrixScenario[];
|
|
664
|
+
agentProfiles: RouterEvalMatrixAgentProfile[];
|
|
665
|
+
harnesses: RouterEvalMatrixHarness[];
|
|
666
|
+
iterations?: number;
|
|
667
|
+
}
|
|
668
|
+
interface RouterEvalMatrixSuiteResponse {
|
|
669
|
+
suite: {
|
|
670
|
+
id: string;
|
|
671
|
+
[key: string]: unknown;
|
|
672
|
+
};
|
|
673
|
+
matrix: RouterEvalMatrixPayload;
|
|
674
|
+
}
|
|
675
|
+
interface RouterImportedRunResponse {
|
|
676
|
+
run: {
|
|
677
|
+
id: string;
|
|
678
|
+
status: string;
|
|
679
|
+
[key: string]: unknown;
|
|
680
|
+
};
|
|
681
|
+
results: unknown[];
|
|
682
|
+
benchmark?: RouterEvalMatrixBenchmarkCell[];
|
|
683
|
+
regression: unknown;
|
|
684
|
+
}
|
|
685
|
+
interface RouterEvalMatrixBenchmarkCell {
|
|
686
|
+
model: string;
|
|
687
|
+
profile_id?: string;
|
|
688
|
+
harness_id?: string;
|
|
689
|
+
transport: string;
|
|
690
|
+
search_provider: string;
|
|
691
|
+
cases: number;
|
|
692
|
+
passed: number;
|
|
693
|
+
pass_rate: number;
|
|
694
|
+
avg_latency_ms: number;
|
|
695
|
+
p95_latency_ms: number;
|
|
696
|
+
total_cost: number;
|
|
697
|
+
input_tokens: number;
|
|
698
|
+
output_tokens: number;
|
|
699
|
+
reasoning_tokens: number;
|
|
700
|
+
total_tokens: number;
|
|
701
|
+
output_tokens_per_second: number;
|
|
702
|
+
total_tokens_per_second: number;
|
|
703
|
+
search_requests: number;
|
|
704
|
+
cached_tokens: number;
|
|
705
|
+
avg_cached_tokens: number;
|
|
706
|
+
avg_citations: number;
|
|
707
|
+
tool_calls: number;
|
|
708
|
+
successful_tool_calls: number;
|
|
709
|
+
tool_success_rate: number | null;
|
|
710
|
+
assertions: number;
|
|
711
|
+
assertion_pass_rate: number | null;
|
|
712
|
+
sandbox_tests: number;
|
|
713
|
+
sandbox_tests_passed: number;
|
|
714
|
+
sandbox_test_pass_rate: number | null;
|
|
715
|
+
errors: number;
|
|
716
|
+
}
|
|
717
|
+
interface RouterEvalMatrixSandboxClient {
|
|
718
|
+
create(options?: CreateSandboxOptions): Promise<RouterEvalMatrixSandboxBox>;
|
|
719
|
+
}
|
|
720
|
+
interface RouterEvalMatrixSandboxBox {
|
|
721
|
+
id: string;
|
|
722
|
+
dispatchPrompt(message: string, options: {
|
|
723
|
+
sessionId: string;
|
|
724
|
+
}): Promise<{
|
|
725
|
+
sessionId: string;
|
|
726
|
+
alreadyExisted?: boolean;
|
|
727
|
+
}>;
|
|
728
|
+
session(id: string): {
|
|
729
|
+
result(): Promise<PromptResult>;
|
|
730
|
+
};
|
|
731
|
+
exec?(command: string, options?: {
|
|
732
|
+
sessionId?: string;
|
|
733
|
+
timeoutMs?: number;
|
|
734
|
+
}): Promise<{
|
|
735
|
+
exitCode: number;
|
|
736
|
+
stdout: string;
|
|
737
|
+
stderr: string;
|
|
738
|
+
}>;
|
|
739
|
+
delete?(): Promise<void>;
|
|
740
|
+
destroy?(): Promise<void>;
|
|
741
|
+
}
|
|
742
|
+
interface RunTangleRouterEvalMatrixInSandboxOptions {
|
|
743
|
+
config: RouterSearchConfig;
|
|
744
|
+
apiKey: string;
|
|
745
|
+
sandboxClient: RouterEvalMatrixSandboxClient;
|
|
746
|
+
inputOverrides?: Record<string, unknown>;
|
|
747
|
+
baseline?: boolean;
|
|
748
|
+
concurrency?: number;
|
|
749
|
+
fetchImpl?: typeof fetch;
|
|
750
|
+
sessionIdPrefix?: string;
|
|
751
|
+
}
|
|
752
|
+
interface RunTangleRouterEvalMatrixInSandboxResult {
|
|
753
|
+
suite: RouterEvalMatrixSuiteResponse["suite"];
|
|
754
|
+
matrix: RouterEvalMatrixPayload;
|
|
755
|
+
cases: RouterEvalMatrixCaseResult[];
|
|
756
|
+
benchmark: RouterEvalMatrixBenchmarkCell[];
|
|
757
|
+
importResult: RouterImportedRunResponse;
|
|
758
|
+
}
|
|
759
|
+
interface RouterEvalMatrixCaseResult {
|
|
760
|
+
scenarioId: string;
|
|
761
|
+
prompt: string;
|
|
762
|
+
model: string;
|
|
763
|
+
response: string;
|
|
764
|
+
timing: {
|
|
765
|
+
totalMs: number;
|
|
766
|
+
};
|
|
767
|
+
tokens: {
|
|
768
|
+
input: number;
|
|
769
|
+
output: number;
|
|
770
|
+
cached: number;
|
|
771
|
+
reasoning: number;
|
|
772
|
+
};
|
|
773
|
+
cost: number;
|
|
774
|
+
judgeCost: number;
|
|
775
|
+
score: number;
|
|
776
|
+
judgeReasoning: string;
|
|
777
|
+
passed: boolean;
|
|
778
|
+
toolCalls: unknown[];
|
|
779
|
+
assertions: Array<{
|
|
780
|
+
check: string;
|
|
781
|
+
passed: boolean;
|
|
782
|
+
}>;
|
|
783
|
+
generationId?: string;
|
|
784
|
+
benchmark: {
|
|
785
|
+
profileId?: string;
|
|
786
|
+
harnessId?: string;
|
|
787
|
+
transport: string;
|
|
788
|
+
searchProvider: string;
|
|
789
|
+
searchRequests: number;
|
|
790
|
+
citationCount: number;
|
|
791
|
+
artifacts: Record<string, string>;
|
|
792
|
+
};
|
|
793
|
+
iteration: number;
|
|
794
|
+
error?: string;
|
|
795
|
+
sandboxResult?: {
|
|
796
|
+
exitCode: number;
|
|
797
|
+
stdout: string;
|
|
798
|
+
stderr: string;
|
|
799
|
+
testsPassed: boolean;
|
|
800
|
+
};
|
|
801
|
+
}
|
|
802
|
+
declare function runTangleRouterEvalMatrixInSandbox(options: RunTangleRouterEvalMatrixInSandboxOptions): Promise<RunTangleRouterEvalMatrixInSandboxResult>;
|
|
803
|
+
//#endregion
|
|
804
|
+
export { type AcceleratorKind, type AccessPolicyRule, type AddUserOptions, type AgentProfile, type AgentProfileCapabilities, type AgentProfileFileMount, type AgentProfileMcpServer, type AgentProfileModelHints, type AgentProfilePermissionValue, type AgentProfilePrompt, type AgentProfileResourceRef, type AgentProfileResources, type AgentProfileValidationIssue, type AgentProfileValidationResult, type AgentSubagentProfile, type AnyTokenPayload, type AttachSandboxFleetMachineOptions, AuthError, type AutomationInfo, type BackendCapabilities, type BackendConfig, type BackendInfo, type BackendManager, type BackendStatus, type BackendType, type BatchEvent, type BatchOptions, type BatchResult, type BatchTask, type BatchTaskResult, type BuildProgressEvent, type BuildSandboxMcpConfigOptions, CapabilityError, type CheckpointInfo, type CheckpointOptions, type CheckpointResult, type CodeResult, type CollaborationAccess, type CollaborationBootstrapRequest, type CollaborationBootstrapResponse, CollaborationClient, type CollaborationClientConfig, type CollaborationDocumentAdapter, type CollaborationDocumentChange, type CollaborationDocumentRef, CollaborationFileBridge, type CollaborationFileBridgeOptions, type CollaborationFileEvent, type CollaborationPermissions, type CollaborationTokenPayload, type CollaborationTokenRefreshRequest, type CollaborationTokenRefreshResponse, type CollaborationTransportConfig, type CompletedTurnResult, type ConfidentialSandboxResult, type ConfidentialTeeType, type ConnectionInfo, type CreateAutomationInput, type CreateConfidentialSandboxOptions, type CreateEndpointInput, type CreateIntelligenceReportOptions, type CreateSandboxFleetOptions, type CreateSandboxFleetWithCoordinatorOptions, type CreateSandboxOptions, type CreateTeamOptions, type CreateTriggerInput, type DeleteOptions, type DeliveryAttempt, type DirectoryPermission, type DispatchPromptOptions, type DispatchedSession, type DownloadOptions, type DownloadProgress, type DriverConfig, type DriverInfo, type DriverType, type EndpointInfo, type EndpointWithSecret, type EventStreamOptions, type ExecOptions, type ExecResult, type FileInfo, type FileSystem, type FleetDispatchCancelResult, type FleetDispatchResultBuffer, type FleetDispatchResultBufferOptions, type FleetDispatchStreamOptions, type FleetExecDispatchOptions, type FleetMachineId, type FleetPromptDispatchOptions, type ForkOptions, type ForkResult, type GitAuth, type GitBranch, type GitCommit, type GitConfig, type GitDiff, type GitStatus, type GpuType, Image, type ImageBuildOptions, type ImageBuildResult, ImageBuilder, type ImageSpec, type InstallRecipeInput, type InstalledTool, type IntegrationAction, type IntegrationActionKind, type IntegrationDeliveryStatus, type IntegrationPrincipalType, type IntegrationProvider, type IntegrationScope, type IntegrationVerificationKind, IntegrationsManager, type RecipeManifest as IntegrationsRecipeManifest, IntelligenceClient, type IntelligenceReport, type IntelligenceReportBudget, type IntelligenceReportCompareTo, type IntelligenceReportSubjectType, type IntelligenceReportWindow, type InviteTeamMemberOptions, type IssueCollaborationTokenOptions, type ListMessagesOptions, type ListOptions, type ListSandboxFleetOptions, type ListSandboxOptions, MANAGE_SANDBOXES_PARAMETERS, MANAGE_SANDBOXES_TOOL_NAME, type ManageSandboxesInput, type ManageSandboxesTool, type ManageSandboxesToolOptions, type McpServerConfig, type MintScopedTokenOptions, type MkdirOptions, type NetworkConfig, NetworkError, type NetworkManager, NotFoundError, type ParseSSEStreamOptions, type ParsedSSEEvent, PartialFailureError, type PermissionLevel, type PermissionsManager, type PreviewLinkInfo, type PreviewLinkManager, type Process, type ProcessInfo, type ProcessLogEntry, type ProcessManager, type ProcessSignal, type ProcessSpawnOptions, type ProcessStatus, type PromptOptions, type PromptResult, type ProvisionEvent, type ProvisionResult, type ProvisionStatus, type ProvisionStep, type PublicTemplateInfo, type PublicTemplateVersionInfo, type PublishPublicTemplateOptions, type PublishPublicTemplateVersionOptions, QuotaError, type ReapExpiredSandboxFleetsOptions, type ReapExpiredSandboxFleetsResult, type ReconcileSandboxFleetsOptions, type ReconcileSandboxFleetsResult, type RouterEvalMatrixAgentProfile, type RouterEvalMatrixCaseResult, type RouterEvalMatrixHarness, type RouterEvalMatrixPayload, type RouterEvalMatrixSandboxBox, type RouterEvalMatrixSandboxClient, type RouterEvalMatrixScenario, type RouterEvalMatrixSuiteResponse, type RouterImportedRunResponse, type RouterSearchConfig, type RouterSearchConfigOptions, type RunCodeOptions, type RunTangleRouterEvalMatrixInSandboxOptions, type RunTangleRouterEvalMatrixInSandboxResult, SANDBOX_MCP_SERVER_NAME, type SSHCommandDescriptor, type SSHCredentials, SandboxClient as Sandbox, SandboxClient, type SandboxClientConfig, type SandboxConnection, type SandboxEnvironment, SandboxError, type SandboxErrorJson, type SandboxEvent, type SandboxFailureDetail, SandboxFleet, type SandboxFleetArtifact, type SandboxFleetArtifactSpec, SandboxFleetClient, type SandboxFleetCostEstimate, type SandboxFleetDispatchFailureClass, type SandboxFleetDispatchResponse, type SandboxFleetDriverCapability, type SandboxFleetDriverTimings, type SandboxFleetInfo, type SandboxFleetIntelligenceEnvelope, type SandboxFleetMachine, type SandboxFleetMachineMeteredUsage, type SandboxFleetMachineRecord, type SandboxFleetMachineSpec, type SandboxFleetManifest, type SandboxFleetManifestMachine, type SandboxFleetOperationsSummary, type SandboxFleetPolicy, type SandboxFleetToken, type SandboxFleetTraceBundle, type SandboxFleetTraceEvent, type SandboxFleetTraceExport, type SandboxFleetTraceOptions, type SandboxFleetUsage, type SandboxFleetWorkspace, type SandboxFleetWorkspaceReconcileResult, type SandboxFleetWorkspaceRestoreResult, type SandboxFleetWorkspaceSnapshotResult, type SandboxInfo, SandboxInstance, type SandboxIntelligenceEnvelope, type SandboxMcpConfig, type SandboxMcpEndpoint, type SandboxMcpServerEntry, type SandboxPermissionsConfig, type SandboxResources, SandboxSession, type SandboxStatus, type SandboxTraceBundle, type SandboxTraceEvent, type SandboxTraceExport, type SandboxTraceOptions, type SandboxUser, type SaveCollaborationSnapshotRequest, type SaveCollaborationSnapshotResponse, type ScopedToken, type ScopedTokenScope, type SearchMatch, type SearchOptions, type SecretInfo, type SecretsManager, ServerError, type SessionEventStreamOptions, type SessionInfo, type SessionListOptions, type SessionMessage, type SessionStatus, type SnapshotInfo, type SnapshotOptions, type SnapshotResult, StateError, type StorageConfig, type SubscriptionInfo, TangleSandboxClient, type TangleSandboxClientConfig, type TangleSearchProvider, type TaskOptions, type TaskResult, type Team, type TeamInvitation, type TeamMember, type TeeAttestationHeartbeat, type TeeAttestationHeartbeatOptions, type TeeAttestationHeartbeatSample, type TeeAttestationOptions, type TeeAttestationReport, type TeeAttestationResponse, type TeePublicKey, type TeePublicKeyResponse, TimeoutError, type TokenRefreshHandler, type ToolsConfig, type TraceExportFormat, type TraceExportResult, type TraceExportSink, type TriggerInfo, type TriggerRun, type TriggerWithSecret, type UpdateUserOptions, type UploadOptions, type UploadProgress, type UsageInfo, ValidationError, type WaitForOptions, buildCollaborationDocumentId, buildSandboxMcpConfig, buildTangleRouterEvalMatrixRequest, buildTangleRouterResponsesWebSearchRequest, buildTangleRouterSearchBackend, buildTangleRouterSearchProfile, buildTraceExportPayload, createConfidentialSandbox, createManageSandboxesTool, defineAgentProfile, defineGitHubResource, defineInlineResource, exportTraceBundle, fetchTangleRouterSearchConfig, generateAttestationNonce, generateDockerfile, mergeAgentProfiles, normalizeCollaborationPath, otelTraceIdForTangleTrace, parseCollaborationDocumentId, parseSSEStream, runTangleRouterEvalMatrixInSandbox, startTeeAttestationHeartbeat, toOtelJson };
|