@tangle-network/sandbox 0.0.0-develop.20260601225751.b012f8a → 0.0.0-develop.20260608051700.e0cc708
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/agent/index.d.ts +2 -2
- package/dist/agent/index.js +1 -1
- package/dist/auth/index.js +1 -1
- package/dist/client-BYIDON4d.js +1 -0
- package/dist/{client-luMZjrob.d.ts → client-DMkVWoYk.d.ts} +13 -2
- package/dist/collaboration/index.js +1 -1
- package/dist/collaboration-CRyb5e8F.js +1 -1
- package/dist/core.d.ts +2 -2
- package/dist/core.js +1 -1
- package/dist/errors-CljiGR__.js +1 -1
- package/dist/{index-CEuQ9dBO.d.ts → index-C-XX8Q_j.d.ts} +1 -1
- package/dist/index.d.ts +3 -3
- package/dist/index.js +1 -1
- package/dist/intelligence/index.d.ts +292 -0
- package/dist/intelligence/index.js +1 -0
- package/dist/openai/index.js +1 -1
- package/dist/sandbox-B4HyvZga.js +1 -0
- package/dist/{sandbox-0XVWuuJR.d.ts → sandbox-Dyf07Ckv.d.ts} +36 -1
- package/dist/session-gateway/index.js +1 -1
- package/dist/tangle/index.d.ts +1 -1
- package/dist/tangle/index.js +1 -1
- package/dist/tangle-DvKC4_jP.js +1 -0
- package/package.json +7 -1
- package/dist/client-AnMAORoV.js +0 -1
- package/dist/sandbox-Ckh48QOL.js +0 -1
- package/dist/tangle-DmrMT7Hu.js +0 -1
|
@@ -0,0 +1,292 @@
|
|
|
1
|
+
//#region src/intelligence/index.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* `@tangle-network/sandbox/intelligence` — browser-safe typed client for the
|
|
4
|
+
* hosted trace-read surface on Tangle Intelligence
|
|
5
|
+
* (`https://intelligence.tangle.tools`, default port 3030).
|
|
6
|
+
*
|
|
7
|
+
* This is a SEPARATE host from the Sandbox API. The SDK's `IntelligenceClient`
|
|
8
|
+
* (exposed as `client.intelligence`) routes intelligence-*report* calls through
|
|
9
|
+
* `SandboxClient.fetch` against the **sandbox** `baseUrl` — that is the
|
|
10
|
+
* sandbox-api intelligence-report surface, a different service. The trace-read
|
|
11
|
+
* routes (`/v1/traces`, `/v1/runs*`, `/v1/sessions*`) live on intelligence-api
|
|
12
|
+
* and are tenant-scoped by the customer key, so this client does NOT reuse
|
|
13
|
+
* `SandboxClient.fetch`; it carries its own intelligence-host base URL.
|
|
14
|
+
*
|
|
15
|
+
* Auth is the customer key (`sk-tan-*`) sent as `Authorization: Bearer ...`;
|
|
16
|
+
* the platform resolves it to the caller's tenant and filters `tenant_id`
|
|
17
|
+
* first and unconditionally on every route, so a cross-tenant id returns an
|
|
18
|
+
* empty result or 404, never the row.
|
|
19
|
+
*
|
|
20
|
+
* Nothing here uses a Node API — `globalThis.fetch` only — so it runs in the
|
|
21
|
+
* browser, Cloudflare Workers, Deno, and Node 20+ unchanged. The base URL must
|
|
22
|
+
* be supplied by the caller (e.g. from `TANGLE_INTELLIGENCE_BASE_URL`) or it
|
|
23
|
+
* falls back to the production host.
|
|
24
|
+
*
|
|
25
|
+
* @example
|
|
26
|
+
* ```typescript
|
|
27
|
+
* import { createIntelligenceClient } from "@tangle-network/sandbox/intelligence";
|
|
28
|
+
*
|
|
29
|
+
* const intel = createIntelligenceClient({
|
|
30
|
+
* apiKey: process.env.TANGLE_API_KEY!,
|
|
31
|
+
* baseUrl: process.env.TANGLE_INTELLIGENCE_BASE_URL,
|
|
32
|
+
* });
|
|
33
|
+
*
|
|
34
|
+
* const { items } = await intel.listTraces({ status: "ERROR", limit: 20 });
|
|
35
|
+
* for await (const span of intel.iterateTraceSpans(items[0].traceId)) {
|
|
36
|
+
* console.log(span.name, span.durationMs);
|
|
37
|
+
* }
|
|
38
|
+
* ```
|
|
39
|
+
*
|
|
40
|
+
* @packageDocumentation
|
|
41
|
+
*/
|
|
42
|
+
/**
|
|
43
|
+
* Production intelligence-api host. Mirrors the api-side
|
|
44
|
+
* `DEFAULT_INTELLIGENCE_BASE_URL` so the SDK default and the server default
|
|
45
|
+
* never drift.
|
|
46
|
+
*/
|
|
47
|
+
declare const DEFAULT_INTELLIGENCE_BASE_URL = "https://intelligence.tangle.tools";
|
|
48
|
+
interface IntelligenceClientConfig {
|
|
49
|
+
/** Tangle customer API key (`sk-tan-*`). Sent as `Authorization: Bearer ...`. */
|
|
50
|
+
apiKey: string;
|
|
51
|
+
/**
|
|
52
|
+
* Intelligence-api base URL. Defaults to {@link DEFAULT_INTELLIGENCE_BASE_URL}.
|
|
53
|
+
* Pass `TANGLE_INTELLIGENCE_BASE_URL` here to point at a non-prod host; do NOT
|
|
54
|
+
* pass the sandbox `baseUrl` — these routes live on a different service.
|
|
55
|
+
*/
|
|
56
|
+
baseUrl?: string;
|
|
57
|
+
/** Per-request timeout. Default: 30000 (30s). */
|
|
58
|
+
timeoutMs?: number;
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* A bigint nanosecond timestamp rendered as a decimal string — JSON cannot
|
|
62
|
+
* carry a bigint, so the wire format is the same OTLP-JSON decimal-string
|
|
63
|
+
* convention the service accepts on ingest.
|
|
64
|
+
*/
|
|
65
|
+
type NanoString = string;
|
|
66
|
+
/** Trace status filter: `ERROR` = the trace has ≥1 error span; `OK` = none. */
|
|
67
|
+
type TraceStatus = "ERROR" | "OK";
|
|
68
|
+
/** One row of the tenant-wide trace explorer (`GET /v1/traces`). */
|
|
69
|
+
interface TraceSummary {
|
|
70
|
+
traceId: string;
|
|
71
|
+
spanCount: number;
|
|
72
|
+
startUnixNano: NanoString;
|
|
73
|
+
endUnixNano: NanoString;
|
|
74
|
+
/** `(maxEnd - minStart) / 1e6`. */
|
|
75
|
+
durationMs: number;
|
|
76
|
+
errorCount: number;
|
|
77
|
+
/** Null (never 0) when no span in the trace was priced. */
|
|
78
|
+
costUsd: number | null;
|
|
79
|
+
inputTokens: number | null;
|
|
80
|
+
outputTokens: number | null;
|
|
81
|
+
/** Name of the earliest span by `start_unix_nano`. */
|
|
82
|
+
rootName: string | null;
|
|
83
|
+
/** Model of the earliest span by `start_unix_nano`. */
|
|
84
|
+
model: string | null;
|
|
85
|
+
runId: string | null;
|
|
86
|
+
}
|
|
87
|
+
/** A page of trace summaries plus the keyset cursor for the next page. */
|
|
88
|
+
interface TraceSummaryList {
|
|
89
|
+
items: TraceSummary[];
|
|
90
|
+
/** Opaque cursor for the next page; `null` at the end of the stream. */
|
|
91
|
+
nextCursor: string | null;
|
|
92
|
+
}
|
|
93
|
+
/**
|
|
94
|
+
* One trace-span row on the wire — every stored column passed through, the two
|
|
95
|
+
* bigint nano columns rendered as decimal strings. Already redacted at ingest.
|
|
96
|
+
*/
|
|
97
|
+
interface SerializedSpan {
|
|
98
|
+
/** Span PK, `<traceId>:<spanId>`. */
|
|
99
|
+
id: string;
|
|
100
|
+
tenantId: string;
|
|
101
|
+
traceId: string;
|
|
102
|
+
parentSpanId: string | null;
|
|
103
|
+
name: string;
|
|
104
|
+
startUnixNano: NanoString;
|
|
105
|
+
endUnixNano: NanoString;
|
|
106
|
+
/** Redacted-at-ingest span attribute bag. */
|
|
107
|
+
attributes: Record<string, unknown>;
|
|
108
|
+
events: Array<Record<string, unknown>> | null;
|
|
109
|
+
statusCode: string | null;
|
|
110
|
+
statusMessage: string | null;
|
|
111
|
+
redactionVersion: string | null;
|
|
112
|
+
model: string | null;
|
|
113
|
+
inputTokens: number | null;
|
|
114
|
+
outputTokens: number | null;
|
|
115
|
+
/** `numeric(12,6)` as a string; `null` when the model is unpriced. */
|
|
116
|
+
costUsd: string | null;
|
|
117
|
+
runId: string | null;
|
|
118
|
+
scenarioId: string | null;
|
|
119
|
+
generation: number | null;
|
|
120
|
+
cellId: string | null;
|
|
121
|
+
sessionId: string | null;
|
|
122
|
+
threadId: string | null;
|
|
123
|
+
userId: string | null;
|
|
124
|
+
receivedAt: string;
|
|
125
|
+
}
|
|
126
|
+
/** A keyset page of one trace's spans plus its full span count. */
|
|
127
|
+
interface SpanPage {
|
|
128
|
+
items: SerializedSpan[];
|
|
129
|
+
/** True when the trace's total span count exceeds one page. */
|
|
130
|
+
truncated: boolean;
|
|
131
|
+
/** The trace's full span count, independent of the page. */
|
|
132
|
+
total: number;
|
|
133
|
+
/** Opaque cursor for the next page; `null` at the end of the trace. */
|
|
134
|
+
nextCursor: string | null;
|
|
135
|
+
}
|
|
136
|
+
/** A bounded window of a run's spans (run-pivoted reads are not paginated). */
|
|
137
|
+
interface RunSpanWindow {
|
|
138
|
+
items: SerializedSpan[];
|
|
139
|
+
truncated: boolean;
|
|
140
|
+
total: number;
|
|
141
|
+
}
|
|
142
|
+
/**
|
|
143
|
+
* An eval-run row. Numeric metrics are numeric columns rendered as strings.
|
|
144
|
+
* `additionalProperties` on the wire — the row carries more columns than the
|
|
145
|
+
* documented core, so the type is open.
|
|
146
|
+
*/
|
|
147
|
+
interface Run {
|
|
148
|
+
id: string;
|
|
149
|
+
tenantId: string;
|
|
150
|
+
runDir: string | null;
|
|
151
|
+
status: string;
|
|
152
|
+
gateDecision: string | null;
|
|
153
|
+
totalCostUsd: string | null;
|
|
154
|
+
totalDurationMs: number | null;
|
|
155
|
+
holdoutLift: string | null;
|
|
156
|
+
labels: Record<string, unknown> | null;
|
|
157
|
+
receivedAt: string;
|
|
158
|
+
[key: string]: unknown;
|
|
159
|
+
}
|
|
160
|
+
/** A page of eval-runs. Offset is legacy; follow `nextCursor` to paginate. */
|
|
161
|
+
interface RunList {
|
|
162
|
+
items: Run[];
|
|
163
|
+
limit: number;
|
|
164
|
+
offset: number;
|
|
165
|
+
nextCursor: string | null;
|
|
166
|
+
}
|
|
167
|
+
/** One row of the tenant-wide session explorer (`GET /v1/sessions`). */
|
|
168
|
+
interface SessionSummary {
|
|
169
|
+
sessionId: string;
|
|
170
|
+
traceCount: number;
|
|
171
|
+
spanCount: number;
|
|
172
|
+
firstSeen: string;
|
|
173
|
+
lastSeen: string;
|
|
174
|
+
/** Null (never 0) when no span in the session was priced. */
|
|
175
|
+
totalCostUsd: number | null;
|
|
176
|
+
errorCount: number;
|
|
177
|
+
userId: string | null;
|
|
178
|
+
}
|
|
179
|
+
/** A page of session summaries plus the keyset cursor for the next page. */
|
|
180
|
+
interface SessionSummaryList {
|
|
181
|
+
items: SessionSummary[];
|
|
182
|
+
nextCursor: string | null;
|
|
183
|
+
}
|
|
184
|
+
/** Query params for {@link IntelligenceClient.listTraces}. */
|
|
185
|
+
interface ListTracesParams {
|
|
186
|
+
/** Page size, clamped server-side to `[1, 200]` (default 50). */
|
|
187
|
+
limit?: number;
|
|
188
|
+
/** ISO-8601 lower bound on `received_at` (inclusive). */
|
|
189
|
+
from?: string;
|
|
190
|
+
/** ISO-8601 upper bound on `received_at` (inclusive). */
|
|
191
|
+
to?: string;
|
|
192
|
+
/** Case-insensitive substring over span name (matches if ANY span matches). */
|
|
193
|
+
q?: string;
|
|
194
|
+
/** Exact model match (matches if any span carried this model). */
|
|
195
|
+
model?: string;
|
|
196
|
+
/** Exact `run_id` match. */
|
|
197
|
+
runId?: string;
|
|
198
|
+
/** `ERROR` = ≥1 error span; `OK` = no error span anywhere in the trace. */
|
|
199
|
+
status?: TraceStatus;
|
|
200
|
+
/** Opaque cursor from the prior response's `nextCursor`. */
|
|
201
|
+
cursor?: string;
|
|
202
|
+
}
|
|
203
|
+
/** Query params for {@link IntelligenceClient.getTraceSpans}. */
|
|
204
|
+
interface GetTraceSpansParams {
|
|
205
|
+
/** Page size, clamped server-side to `INTELLIGENCE_TRACE_SPAN_LIMIT`. */
|
|
206
|
+
limit?: number;
|
|
207
|
+
/** Opaque cursor over `(start_unix_nano, span id)` from the prior page. */
|
|
208
|
+
cursor?: string;
|
|
209
|
+
}
|
|
210
|
+
/** Query params for {@link IntelligenceClient.listRuns}. */
|
|
211
|
+
interface ListRunsParams {
|
|
212
|
+
limit?: number;
|
|
213
|
+
/** Legacy offset pagination; ignored once `cursor` is supplied. */
|
|
214
|
+
offset?: number;
|
|
215
|
+
status?: "started" | "baseline-complete" | "generation-complete" | "gate-decided" | "finished" | "errored";
|
|
216
|
+
gate?: "ship" | "hold" | "need_more_work" | "model_ceiling" | "arch_ceiling";
|
|
217
|
+
/** Case-insensitive substring over `run_dir`. */
|
|
218
|
+
q?: string;
|
|
219
|
+
from?: string;
|
|
220
|
+
to?: string;
|
|
221
|
+
/** `key:value` over the run's labels jsonb. */
|
|
222
|
+
label?: string;
|
|
223
|
+
cursor?: string;
|
|
224
|
+
}
|
|
225
|
+
/** Query params for {@link IntelligenceClient.listSessions}. */
|
|
226
|
+
interface ListSessionsParams {
|
|
227
|
+
limit?: number;
|
|
228
|
+
from?: string;
|
|
229
|
+
to?: string;
|
|
230
|
+
/** Case-insensitive substring over `session_id`. */
|
|
231
|
+
q?: string;
|
|
232
|
+
/** Exact end-user match (`user_id` span column). */
|
|
233
|
+
userId?: string;
|
|
234
|
+
cursor?: string;
|
|
235
|
+
}
|
|
236
|
+
/** Query params for {@link IntelligenceClient.getSessionTraces}. */
|
|
237
|
+
interface GetSessionTracesParams {
|
|
238
|
+
limit?: number;
|
|
239
|
+
cursor?: string;
|
|
240
|
+
}
|
|
241
|
+
/**
|
|
242
|
+
* Browser-safe typed client for the Tangle Intelligence trace-read surface.
|
|
243
|
+
* Construct via {@link createIntelligenceClient}.
|
|
244
|
+
*/
|
|
245
|
+
interface IntelligenceClient {
|
|
246
|
+
/** List tenant-wide trace summaries (one row per trace), newest first. */
|
|
247
|
+
listTraces(params?: ListTracesParams): Promise<TraceSummaryList>;
|
|
248
|
+
/** List one trace's spans, keyset-paginated. */
|
|
249
|
+
getTraceSpans(traceId: string, params?: GetTraceSpansParams): Promise<SpanPage>;
|
|
250
|
+
/**
|
|
251
|
+
* Stream the FULL span set of one trace as NDJSON. The returned
|
|
252
|
+
* `ReadableStream` yields the raw bytes (one JSON span per line); decode it
|
|
253
|
+
* yourself, or use {@link iterateTraceSpans} to walk parsed spans page by
|
|
254
|
+
* page without the bulk endpoint.
|
|
255
|
+
*/
|
|
256
|
+
exportTraceSpansNdjson(traceId: string): Promise<ReadableStream<Uint8Array>>;
|
|
257
|
+
/** List the tenant's eval-runs, newest first. */
|
|
258
|
+
listRuns(params?: ListRunsParams): Promise<RunList>;
|
|
259
|
+
/** Fetch a single eval-run. */
|
|
260
|
+
getRun(runId: string): Promise<Run>;
|
|
261
|
+
/** List the spans pivoted to this run (by `run_id`), bounded window. */
|
|
262
|
+
getRunTraces(runId: string): Promise<RunSpanWindow>;
|
|
263
|
+
/** List tenant-wide session summaries (one row per session), newest first. */
|
|
264
|
+
listSessions(params?: ListSessionsParams): Promise<SessionSummaryList>;
|
|
265
|
+
/** List one session's traces as the trace-summary shape, keyset-paginated. */
|
|
266
|
+
getSessionTraces(sessionId: string, params?: GetSessionTracesParams): Promise<TraceSummaryList>;
|
|
267
|
+
/**
|
|
268
|
+
* Async iterator over the spans of one trace, following the keyset cursor
|
|
269
|
+
* page by page so a trace larger than one page is walkable end-to-end
|
|
270
|
+
* without the NDJSON bulk endpoint.
|
|
271
|
+
*/
|
|
272
|
+
iterateTraceSpans(traceId: string, params?: GetTraceSpansParams): AsyncGenerator<SerializedSpan, void, unknown>;
|
|
273
|
+
/**
|
|
274
|
+
* Async iterator over every trace summary, following `nextCursor` page by
|
|
275
|
+
* page until the stream ends.
|
|
276
|
+
*/
|
|
277
|
+
iterateTraces(params?: ListTracesParams): AsyncGenerator<TraceSummary, void, unknown>;
|
|
278
|
+
/**
|
|
279
|
+
* Async iterator over every session summary, following `nextCursor` page by
|
|
280
|
+
* page until the stream ends.
|
|
281
|
+
*/
|
|
282
|
+
iterateSessions(params?: ListSessionsParams): AsyncGenerator<SessionSummary, void, unknown>;
|
|
283
|
+
}
|
|
284
|
+
/**
|
|
285
|
+
* Create a browser-safe client for the Tangle Intelligence trace-read surface.
|
|
286
|
+
*
|
|
287
|
+
* @param config.apiKey Customer key (`sk-tan-*`) — Bearer auth, resolved to a tenant.
|
|
288
|
+
* @param config.baseUrl Intelligence-api host; defaults to {@link DEFAULT_INTELLIGENCE_BASE_URL}.
|
|
289
|
+
*/
|
|
290
|
+
declare function createIntelligenceClient(config: IntelligenceClientConfig): IntelligenceClient;
|
|
291
|
+
//#endregion
|
|
292
|
+
export { DEFAULT_INTELLIGENCE_BASE_URL, GetSessionTracesParams, GetTraceSpansParams, IntelligenceClient, IntelligenceClientConfig, ListRunsParams, ListSessionsParams, ListTracesParams, NanoString, Run, RunList, RunSpanWindow, SerializedSpan, SessionSummary, SessionSummaryList, SpanPage, TraceStatus, TraceSummary, TraceSummaryList, createIntelligenceClient };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const a0_0x2d41d5=a0_0x1af2;(function(_0x2c17a7,_0x375ee8){const _0x4be447=a0_0x1af2,_0x2d6df7=_0x2c17a7();while(!![]){try{const _0x2b4092=parseInt(_0x4be447(0xfa))/0x1*(-parseInt(_0x4be447(0xee))/0x2)+-parseInt(_0x4be447(0xe8))/0x3+parseInt(_0x4be447(0x111))/0x4*(parseInt(_0x4be447(0xfc))/0x5)+-parseInt(_0x4be447(0x10f))/0x6*(-parseInt(_0x4be447(0xec))/0x7)+parseInt(_0x4be447(0x103))/0x8+-parseInt(_0x4be447(0x10c))/0x9+-parseInt(_0x4be447(0xd8))/0xa*(-parseInt(_0x4be447(0x10b))/0xb);if(_0x2b4092===_0x375ee8)break;else _0x2d6df7['push'](_0x2d6df7['shift']());}catch(_0x419bc4){_0x2d6df7['push'](_0x2d6df7['shift']());}}}(a0_0x534a,0x5343e));import{f as a0_0x3a3095,r as a0_0x2a631c,u as a0_0x11640f}from'\x2e\x2e\x2f\x65\x72\x72\x6f\x72\x73\x2d\x43\x6c\x6a\x69\x47\x52\x5f\x5f\x2e\x6a\x73';const DEFAULT_INTELLIGENCE_BASE_URL=a0_0x2d41d5(0x10d),DEFAULT_TIMEOUT_MS=0x7530;function a0_0x1af2(_0x24d5e8,_0x11aa88){_0x24d5e8=_0x24d5e8-0xd1;const _0x534ad6=a0_0x534a();let _0x1af2bf=_0x534ad6[_0x24d5e8];if(a0_0x1af2['\x4a\x65\x75\x78\x69\x7a']===undefined){var _0x4bb306=function(_0x420179){const _0xcee705='\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 _0x3add54='',_0x58d905='';for(let _0x34762e=0x0,_0x302835,_0x39d75b,_0x53f03b=0x0;_0x39d75b=_0x420179['\x63\x68\x61\x72\x41\x74'](_0x53f03b++);~_0x39d75b&&(_0x302835=_0x34762e%0x4?_0x302835*0x40+_0x39d75b:_0x39d75b,_0x34762e++%0x4)?_0x3add54+=String['\x66\x72\x6f\x6d\x43\x68\x61\x72\x43\x6f\x64\x65'](0xff&_0x302835>>(-0x2*_0x34762e&0x6)):0x0){_0x39d75b=_0xcee705['\x69\x6e\x64\x65\x78\x4f\x66'](_0x39d75b);}for(let _0x4a6c20=0x0,_0x41a361=_0x3add54['\x6c\x65\x6e\x67\x74\x68'];_0x4a6c20<_0x41a361;_0x4a6c20++){_0x58d905+='\x25'+('\x30\x30'+_0x3add54['\x63\x68\x61\x72\x43\x6f\x64\x65\x41\x74'](_0x4a6c20)['\x74\x6f\x53\x74\x72\x69\x6e\x67'](0x10))['\x73\x6c\x69\x63\x65'](-0x2);}return decodeURIComponent(_0x58d905);};a0_0x1af2['\x70\x77\x5a\x78\x72\x69']=_0x4bb306,a0_0x1af2['\x52\x4e\x55\x63\x41\x6d']={},a0_0x1af2['\x4a\x65\x75\x78\x69\x7a']=!![];}const _0x393d7f=_0x534ad6[0x0],_0x33e590=_0x24d5e8+_0x393d7f,_0x20dcf6=a0_0x1af2['\x52\x4e\x55\x63\x41\x6d'][_0x33e590];return!_0x20dcf6?(_0x1af2bf=a0_0x1af2['\x70\x77\x5a\x78\x72\x69'](_0x1af2bf),a0_0x1af2['\x52\x4e\x55\x63\x41\x6d'][_0x33e590]=_0x1af2bf):_0x1af2bf=_0x20dcf6,_0x1af2bf;}function appendParam(_0x9fb716,_0x5498d1,_0x267d5d){const _0x5cd55d=a0_0x2d41d5;if(_0x267d5d===void 0x0)return;_0x9fb716[_0x5cd55d(0xf5)](_0x5498d1,String(_0x267d5d));}function createIntelligenceClient(_0x142a20){const _0x19a46c=a0_0x2d41d5,_0x2b21a4={'\x6f\x67\x4b\x59\x45':function(_0x1d19cb,_0x4c8e2d){return _0x1d19cb===_0x4c8e2d;},'\x57\x78\x6f\x68\x48':function(_0x27cbd8,_0x523adf){return _0x27cbd8 instanceof _0x523adf;},'\x49\x53\x4f\x73\x73':function(_0x3a2d14,_0x5e1b5b){return _0x3a2d14(_0x5e1b5b);},'\x61\x48\x74\x46\x76':function(_0x9d0ed5,_0x11af6e,_0x2e1dd6,_0x4d9c39){return _0x9d0ed5(_0x11af6e,_0x2e1dd6,_0x4d9c39);},'\x69\x7a\x7a\x68\x76':_0x19a46c(0xd2),'\x68\x51\x63\x6b\x48':function(_0x47c231,_0x37ed86,_0x1d2f5e,_0x379b54){return _0x47c231(_0x37ed86,_0x1d2f5e,_0x379b54);},'\x54\x56\x74\x59\x6e':function(_0x1f5aa6,_0x2633dd,_0x21603a,_0x50904e){return _0x1f5aa6(_0x2633dd,_0x21603a,_0x50904e);},'\x6e\x69\x61\x64\x47':function(_0x5baf73,_0x1d66ce,_0x3ba494,_0x3f491d){return _0x5baf73(_0x1d66ce,_0x3ba494,_0x3f491d);},'\x52\x59\x5a\x78\x47':'\x6c\x69\x6d\x69\x74','\x56\x6f\x6b\x56\x46':function(_0x56ec42,_0x21d996){return _0x56ec42>_0x21d996;},'\x48\x43\x75\x59\x6b':function(_0x5dc6a0,_0x5c34a0){return _0x5dc6a0(_0x5c34a0);},'\x45\x5a\x4d\x4d\x5a':function(_0x524347,_0x13ac25,_0x20b54f,_0x588c00){return _0x524347(_0x13ac25,_0x20b54f,_0x588c00);},'\x4d\x6a\x72\x50\x54':_0x19a46c(0xd1),'\x72\x47\x73\x42\x63':_0x19a46c(0x10a),'\x67\x6a\x6e\x52\x7a':_0x19a46c(0xeb),'\x59\x76\x41\x73\x48':function(_0x470d4c,_0x4ce2d6,_0x4113fb,_0x35ab4a){return _0x470d4c(_0x4ce2d6,_0x4113fb,_0x35ab4a);},'\x51\x74\x46\x6f\x6f':function(_0x32a519,_0x452da6,_0x54bbc7,_0x2a70f1){return _0x32a519(_0x452da6,_0x54bbc7,_0x2a70f1);},'\x41\x6b\x64\x48\x4f':function(_0x26d564,_0x3de544,_0x407bb4,_0x3c0bd0){return _0x26d564(_0x3de544,_0x407bb4,_0x3c0bd0);},'\x79\x54\x52\x47\x4d':'\x63\x75\x72\x73\x6f\x72','\x56\x6f\x44\x79\x63':function(_0xd6e01f,_0x3b8ea1){return _0xd6e01f(_0x3b8ea1);}};if(!_0x142a20['\x61\x70\x69\x4b\x65\x79'])throw new Error(_0x19a46c(0xe1));const _0x2df47d=_0x142a20[_0x19a46c(0x112)],_0x65cf48=(_0x142a20[_0x19a46c(0xe9)]??_0x19a46c(0x10d))['\x72\x65\x70\x6c\x61\x63\x65'](/\/$/,''),_0x4a2ede=_0x142a20[_0x19a46c(0x102)]??DEFAULT_TIMEOUT_MS;async function _0x367406(_0x1c47ae){const _0x386327=_0x19a46c,_0x4d0796=''+_0x65cf48+_0x1c47ae,_0x4db8de=new AbortController(),_0x483a23=setTimeout(()=>_0x4db8de[_0x386327(0x109)](),_0x4a2ede);try{return await globalThis[_0x386327(0xd3)](_0x4d0796,{'\x68\x65\x61\x64\x65\x72\x73':{'\x41\x75\x74\x68\x6f\x72\x69\x7a\x61\x74\x69\x6f\x6e':_0x386327(0xd5)+_0x2df47d,'\x41\x63\x63\x65\x70\x74':_0x386327(0xfe)},'\x73\x69\x67\x6e\x61\x6c':_0x4db8de[_0x386327(0xf1)]});}catch(_0x183aa1){if(_0x183aa1 instanceof Error&&_0x2b21a4[_0x386327(0x107)](_0x183aa1[_0x386327(0xd7)],_0x386327(0xf2)))throw new a0_0x11640f(_0x4a2ede);throw new a0_0x2a631c(_0x386327(0x113)+(_0x2b21a4[_0x386327(0xde)](_0x183aa1,Error)?_0x183aa1[_0x386327(0x106)]:_0x2b21a4[_0x386327(0xd4)](String,_0x183aa1)),_0x2b21a4[_0x386327(0xde)](_0x183aa1,Error)?_0x183aa1:void 0x0,{'\x65\x6e\x64\x70\x6f\x69\x6e\x74':_0x1c47ae,'\x6f\x72\x69\x67\x69\x6e':_0x386327(0x110)});}finally{clearTimeout(_0x483a23);}}async function _0xf61e5c(_0x3fff6c){const _0x4b311b=_0x19a46c,_0x3e796b=await _0x367406(_0x3fff6c),_0x1bfe45=await _0x3e796b[_0x4b311b(0xdd)]();if(!_0x3e796b['\x6f\x6b'])throw a0_0x3a3095(_0x3e796b[_0x4b311b(0xd1)],_0x1bfe45,{'\x6d\x65\x74\x68\x6f\x64':_0x4b311b(0xf9),'\x70\x61\x74\x68':_0x3fff6c},_0x3e796b['\x68\x65\x61\x64\x65\x72\x73']);return JSON[_0x4b311b(0xda)](_0x1bfe45);}async function _0x25a343(_0x320325={}){const _0x12322c=_0x19a46c,_0x1e279e=new URLSearchParams();return appendParam(_0x1e279e,'\x6c\x69\x6d\x69\x74',_0x320325[_0x12322c(0xe2)]),appendParam(_0x1e279e,'\x66\x72\x6f\x6d',_0x320325[_0x12322c(0x10a)]),appendParam(_0x1e279e,'\x74\x6f',_0x320325['\x74\x6f']),appendParam(_0x1e279e,'\x71',_0x320325['\x71']),_0x2b21a4['\x61\x48\x74\x46\x76'](appendParam,_0x1e279e,_0x2b21a4['\x69\x7a\x7a\x68\x76'],_0x320325[_0x12322c(0xd2)]),_0x2b21a4[_0x12322c(0xd6)](appendParam,_0x1e279e,_0x12322c(0xe6),_0x320325[_0x12322c(0xe6)]),_0x2b21a4['\x54\x56\x74\x59\x6e'](appendParam,_0x1e279e,_0x12322c(0xd1),_0x320325[_0x12322c(0xd1)]),appendParam(_0x1e279e,_0x12322c(0x100),_0x320325[_0x12322c(0x100)]),_0x2b21a4[_0x12322c(0xd4)](_0xf61e5c,_0x12322c(0xd9)+(_0x1e279e[_0x12322c(0x10e)]>0x0?'\x3f'+_0x1e279e:''));}async function _0x463f37(_0x395830,_0x4330a8={}){const _0x17cce2=_0x19a46c,_0x55eb9f=new URLSearchParams();_0x2b21a4[_0x17cce2(0xdf)](appendParam,_0x55eb9f,_0x2b21a4['\x52\x59\x5a\x78\x47'],_0x4330a8[_0x17cce2(0xe2)]),appendParam(_0x55eb9f,_0x17cce2(0x100),_0x4330a8['\x63\x75\x72\x73\x6f\x72']);const _0x19a37a=_0x2b21a4[_0x17cce2(0xf3)](_0x55eb9f[_0x17cce2(0x10e)],0x0)?'\x3f'+_0x55eb9f:'';return _0xf61e5c(_0x17cce2(0xf0)+_0x2b21a4['\x48\x43\x75\x59\x6b'](encodeURIComponent,_0x395830)+_0x17cce2(0xe5)+_0x19a37a);}async function _0x450037(_0x5a8355){const _0x4367ee=_0x19a46c,_0x35a3ed=_0x4367ee(0xf0)+encodeURIComponent(_0x5a8355)+_0x4367ee(0xe7),_0x526ee0=await _0x367406(_0x35a3ed);if(!_0x526ee0['\x6f\x6b']){const _0x83e24b=await _0x526ee0['\x74\x65\x78\x74']();throw a0_0x3a3095(_0x526ee0['\x73\x74\x61\x74\x75\x73'],_0x83e24b,{'\x6d\x65\x74\x68\x6f\x64':_0x4367ee(0xf9),'\x70\x61\x74\x68':_0x35a3ed},_0x526ee0['\x68\x65\x61\x64\x65\x72\x73']);}if(!_0x526ee0[_0x4367ee(0xe4)])throw new a0_0x2a631c('\x49\x6e\x74\x65\x6c\x6c\x69\x67\x65\x6e\x63\x65\x20\x41\x50\x49\x20\x72\x65\x74\x75\x72\x6e\x65\x64\x20\x61\x6e\x20\x4e\x44\x4a\x53\x4f\x4e\x20\x65\x78\x70\x6f\x72\x74\x20\x77\x69\x74\x68\x20\x6e\x6f\x20\x62\x6f\x64\x79\x20\x73\x74\x72\x65\x61\x6d',{'\x65\x6e\x64\x70\x6f\x69\x6e\x74':_0x35a3ed,'\x6f\x72\x69\x67\x69\x6e':'\x73\x61\x6e\x64\x62\x6f\x78\x2d\x61\x70\x69'});return _0x526ee0[_0x4367ee(0xe4)];}async function _0x38a516(_0x386b85={}){const _0x40a7f9=_0x19a46c,_0xd313d8=new URLSearchParams();return _0x2b21a4[_0x40a7f9(0xd6)](appendParam,_0xd313d8,_0x2b21a4['\x52\x59\x5a\x78\x47'],_0x386b85[_0x40a7f9(0xe2)]),_0x2b21a4[_0x40a7f9(0x108)](appendParam,_0xd313d8,'\x6f\x66\x66\x73\x65\x74',_0x386b85[_0x40a7f9(0xdc)]),appendParam(_0xd313d8,_0x2b21a4[_0x40a7f9(0xfd)],_0x386b85[_0x40a7f9(0xd1)]),appendParam(_0xd313d8,'\x67\x61\x74\x65',_0x386b85[_0x40a7f9(0xf7)]),appendParam(_0xd313d8,'\x71',_0x386b85['\x71']),_0x2b21a4[_0x40a7f9(0xdf)](appendParam,_0xd313d8,_0x2b21a4[_0x40a7f9(0x101)],_0x386b85[_0x40a7f9(0x10a)]),appendParam(_0xd313d8,'\x74\x6f',_0x386b85['\x74\x6f']),appendParam(_0xd313d8,_0x2b21a4[_0x40a7f9(0xff)],_0x386b85[_0x40a7f9(0xeb)]),_0x2b21a4['\x59\x76\x41\x73\x48'](appendParam,_0xd313d8,_0x40a7f9(0x100),_0x386b85[_0x40a7f9(0x100)]),_0xf61e5c(_0x40a7f9(0xe3)+(_0x2b21a4[_0x40a7f9(0xf3)](_0xd313d8['\x73\x69\x7a\x65'],0x0)?'\x3f'+_0xd313d8:''));}async function _0x29bb3f(_0x33b02){const _0x399d7b=_0x19a46c;return _0xf61e5c(_0x399d7b(0xe0)+encodeURIComponent(_0x33b02));}async function _0x35056f(_0x5dc2a6){const _0x312c77=_0x19a46c;return _0xf61e5c('\x2f\x76\x31\x2f\x72\x75\x6e\x73\x2f'+_0x2b21a4['\x49\x53\x4f\x73\x73'](encodeURIComponent,_0x5dc2a6)+_0x312c77(0x105));}async function _0x25b0d3(_0x326f87={}){const _0xfe1e98=_0x19a46c,_0x4ef967=new URLSearchParams();return appendParam(_0x4ef967,'\x6c\x69\x6d\x69\x74',_0x326f87[_0xfe1e98(0xe2)]),_0x2b21a4[_0xfe1e98(0xdb)](appendParam,_0x4ef967,_0x2b21a4[_0xfe1e98(0x101)],_0x326f87[_0xfe1e98(0x10a)]),_0x2b21a4[_0xfe1e98(0xf4)](appendParam,_0x4ef967,'\x74\x6f',_0x326f87['\x74\x6f']),_0x2b21a4[_0xfe1e98(0xf8)](appendParam,_0x4ef967,'\x71',_0x326f87['\x71']),_0x2b21a4[_0xfe1e98(0xea)](appendParam,_0x4ef967,'\x75\x73\x65\x72\x49\x64',_0x326f87['\x75\x73\x65\x72\x49\x64']),appendParam(_0x4ef967,_0xfe1e98(0x100),_0x326f87['\x63\x75\x72\x73\x6f\x72']),_0xf61e5c(_0xfe1e98(0xf6)+(_0x4ef967['\x73\x69\x7a\x65']>0x0?'\x3f'+_0x4ef967:''));}async function _0x484c3e(_0x24b1d4,_0x2ecdf0={}){const _0x21f924=_0x19a46c,_0x5b251c=new URLSearchParams();appendParam(_0x5b251c,_0x2b21a4[_0x21f924(0xef)],_0x2ecdf0['\x6c\x69\x6d\x69\x74']),appendParam(_0x5b251c,_0x2b21a4[_0x21f924(0xed)],_0x2ecdf0[_0x21f924(0x100)]);const _0x482eae=_0x5b251c[_0x21f924(0x10e)]>0x0?'\x3f'+_0x5b251c:'';return _0x2b21a4[_0x21f924(0xd4)](_0xf61e5c,_0x21f924(0x104)+_0x2b21a4['\x56\x6f\x44\x79\x63'](encodeURIComponent,_0x24b1d4)+_0x21f924(0x105)+_0x482eae);}async function*_0x27df5f(_0x57320e,_0x5077ab={}){const _0x519122=_0x19a46c;let _0x3b65bf=_0x5077ab[_0x519122(0x100)];for(;;){const _0x1d7b32=await _0x463f37(_0x57320e,{..._0x5077ab,'\x63\x75\x72\x73\x6f\x72':_0x3b65bf});for(const _0x35fcf7 of _0x1d7b32['\x69\x74\x65\x6d\x73'])yield _0x35fcf7;if(!_0x1d7b32[_0x519122(0xfb)])return;_0x3b65bf=_0x1d7b32[_0x519122(0xfb)];}}async function*_0x457095(_0x307ac1={}){const _0x451026=_0x19a46c;let _0x3d5292=_0x307ac1[_0x451026(0x100)];for(;;){const _0x44ee65=await _0x25a343({..._0x307ac1,'\x63\x75\x72\x73\x6f\x72':_0x3d5292});for(const _0xcb1da4 of _0x44ee65['\x69\x74\x65\x6d\x73'])yield _0xcb1da4;if(!_0x44ee65[_0x451026(0xfb)])return;_0x3d5292=_0x44ee65[_0x451026(0xfb)];}}async function*_0x4f97f7(_0x269d1f={}){const _0x3a746e=_0x19a46c;let _0x4051ce=_0x269d1f[_0x3a746e(0x100)];for(;;){const _0xaa61c0=await _0x25b0d3({..._0x269d1f,'\x63\x75\x72\x73\x6f\x72':_0x4051ce});for(const _0x4da2a8 of _0xaa61c0['\x69\x74\x65\x6d\x73'])yield _0x4da2a8;if(!_0xaa61c0[_0x3a746e(0xfb)])return;_0x4051ce=_0xaa61c0[_0x3a746e(0xfb)];}}return{'\x6c\x69\x73\x74\x54\x72\x61\x63\x65\x73':_0x25a343,'\x67\x65\x74\x54\x72\x61\x63\x65\x53\x70\x61\x6e\x73':_0x463f37,'\x65\x78\x70\x6f\x72\x74\x54\x72\x61\x63\x65\x53\x70\x61\x6e\x73\x4e\x64\x6a\x73\x6f\x6e':_0x450037,'\x6c\x69\x73\x74\x52\x75\x6e\x73':_0x38a516,'\x67\x65\x74\x52\x75\x6e':_0x29bb3f,'\x67\x65\x74\x52\x75\x6e\x54\x72\x61\x63\x65\x73':_0x35056f,'\x6c\x69\x73\x74\x53\x65\x73\x73\x69\x6f\x6e\x73':_0x25b0d3,'\x67\x65\x74\x53\x65\x73\x73\x69\x6f\x6e\x54\x72\x61\x63\x65\x73':_0x484c3e,'\x69\x74\x65\x72\x61\x74\x65\x54\x72\x61\x63\x65\x53\x70\x61\x6e\x73':_0x27df5f,'\x69\x74\x65\x72\x61\x74\x65\x54\x72\x61\x63\x65\x73':_0x457095,'\x69\x74\x65\x72\x61\x74\x65\x53\x65\x73\x73\x69\x6f\x6e\x73':_0x4f97f7};}export{DEFAULT_INTELLIGENCE_BASE_URL,createIntelligenceClient};function a0_0x534a(){const _0x152515=['\x43\x32\x76\x30','\x6c\x33\x79\x58\x6c\x33\x6e\x4c\x43\x33\x6e\x50\x42\x32\x35\x5a','\x7a\x32\x66\x30\x7a\x71','\x71\x77\x54\x4b\x73\x65\x38','\x72\x30\x76\x75','\x6e\x4a\x43\x58\x6f\x66\x66\x7a\x77\x67\x54\x57\x41\x71','\x42\x4d\x76\x34\x44\x65\x6e\x31\x43\x4e\x6e\x56\x43\x47','\x6d\x4a\x43\x35\x6d\x4a\x65\x57\x6e\x75\x39\x33\x7a\x77\x54\x49\x74\x71','\x74\x77\x50\x59\x75\x66\x71','\x79\x78\x62\x57\x42\x67\x4c\x4a\x79\x78\x72\x50\x42\x32\x34\x56\x41\x4e\x6e\x56\x42\x47','\x7a\x32\x50\x55\x75\x4e\x4f','\x79\x33\x76\x59\x43\x32\x39\x59','\x43\x4b\x44\x5a\x71\x4d\x6d','\x44\x67\x4c\x54\x7a\x77\x39\x31\x44\x65\x31\x5a','\x6d\x4a\x61\x59\x6e\x74\x6d\x58\x6d\x4b\x54\x57\x74\x31\x72\x77\x44\x57','\x6c\x33\x79\x58\x6c\x33\x6e\x4c\x43\x33\x6e\x50\x42\x32\x35\x5a\x6c\x57','\x6c\x33\x72\x59\x79\x77\x6e\x4c\x43\x57','\x42\x77\x76\x5a\x43\x32\x66\x4e\x7a\x71','\x42\x32\x44\x6c\x77\x75\x75','\x72\x76\x50\x6e\x74\x76\x4f','\x79\x77\x6a\x56\x43\x4e\x71','\x7a\x4e\x6a\x56\x42\x71','\x6d\x74\x71\x5a\x6d\x65\x4c\x6e\x76\x4d\x6e\x6a\x74\x71','\x6d\x5a\x65\x32\x6f\x74\x79\x57\x6d\x4c\x7a\x6c\x76\x30\x39\x70\x74\x71','\x41\x68\x72\x30\x43\x68\x6d\x36\x6c\x59\x39\x50\x42\x4e\x72\x4c\x42\x67\x58\x50\x7a\x32\x76\x55\x79\x32\x75\x55\x44\x67\x66\x55\x7a\x32\x58\x4c\x6c\x4e\x72\x56\x42\x32\x58\x5a','\x43\x32\x4c\x36\x7a\x71','\x6d\x74\x71\x30\x6e\x64\x65\x35\x6e\x67\x35\x51\x77\x66\x50\x4d\x73\x61','\x43\x32\x66\x55\x7a\x67\x6a\x56\x45\x63\x31\x48\x43\x67\x4b','\x6e\x67\x6a\x49\x45\x4e\x72\x57\x7a\x47','\x79\x78\x62\x50\x73\x32\x76\x35','\x72\x4d\x66\x50\x42\x67\x76\x4b\x69\x68\x72\x56\x69\x67\x6e\x56\x42\x4d\x35\x4c\x79\x33\x71\x47\x44\x67\x38\x47\x73\x77\x35\x30\x7a\x77\x58\x53\x41\x77\x44\x4c\x42\x4d\x6e\x4c\x69\x65\x66\x71\x73\x74\x4f\x47','\x43\x33\x72\x48\x44\x68\x76\x5a','\x42\x77\x39\x4b\x7a\x77\x57','\x7a\x4d\x76\x30\x79\x32\x47','\x73\x76\x6e\x70\x43\x33\x6d','\x71\x4d\x76\x48\x43\x4d\x76\x59\x69\x61','\x41\x66\x66\x4a\x41\x30\x47','\x42\x4d\x66\x54\x7a\x71','\x6f\x64\x61\x5a\x6d\x65\x72\x53\x41\x76\x44\x54\x74\x71','\x6c\x33\x79\x58\x6c\x33\x72\x59\x79\x77\x6e\x4c\x43\x57','\x43\x67\x66\x59\x43\x32\x75','\x79\x75\x48\x30\x72\x4e\x79','\x42\x32\x7a\x4d\x43\x32\x76\x30','\x44\x67\x76\x34\x44\x61','\x76\x33\x48\x56\x41\x65\x47','\x42\x4d\x4c\x48\x7a\x65\x43','\x6c\x33\x79\x58\x6c\x33\x6a\x31\x42\x4e\x6d\x56','\x79\x33\x6a\x4c\x79\x78\x72\x4c\x73\x77\x35\x30\x7a\x77\x58\x53\x41\x77\x44\x4c\x42\x4d\x6e\x4c\x71\x32\x58\x50\x7a\x77\x35\x30\x6f\x49\x62\x48\x43\x67\x4c\x6c\x7a\x78\x4b\x47\x41\x78\x6d\x47\x43\x4d\x76\x58\x44\x77\x4c\x59\x7a\x77\x71','\x42\x67\x4c\x54\x41\x78\x71','\x6c\x33\x79\x58\x6c\x33\x6a\x31\x42\x4e\x6d','\x79\x4d\x39\x4b\x45\x71','\x6c\x33\x6e\x57\x79\x77\x35\x5a','\x43\x4e\x76\x55\x73\x77\x71','\x6c\x33\x6e\x57\x79\x77\x35\x5a\x6c\x4d\x35\x4b\x41\x4e\x6e\x56\x42\x47','\x6e\x74\x79\x30\x6d\x64\x65\x59\x44\x67\x4c\x6b\x43\x33\x50\x54','\x79\x4d\x66\x5a\x7a\x76\x76\x59\x42\x61','\x77\x78\x7a\x62\x43\x30\x47','\x42\x67\x66\x49\x7a\x77\x57','\x6e\x30\x4c\x73\x74\x65\x50\x6b\x72\x61','\x45\x76\x72\x73\x72\x30\x30','\x6f\x64\x6a\x73\x75\x32\x48\x6c\x7a\x77\x75','\x75\x4c\x4c\x41\x45\x65\x43','\x6c\x33\x79\x58\x6c\x33\x72\x59\x79\x77\x6e\x4c\x43\x59\x38','\x43\x32\x4c\x4e\x42\x4d\x66\x53','\x71\x77\x6a\x56\x43\x4e\x72\x66\x43\x4e\x6a\x56\x43\x47','\x76\x4d\x39\x52\x76\x4b\x79','\x75\x78\x72\x67\x42\x32\x38'];a0_0x534a=function(){return _0x152515;};return a0_0x534a();}
|