@nuvin/agent-core 0.0.0-rc.6 → 0.0.0-rc.7
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/VERSION +2 -2
- package/dist/agent/index.d.ts +33 -3
- package/dist/agent/index.js +1 -1
- package/dist/chunk-4DNIDCX7.js +1 -1
- package/dist/chunk-G2FR4UGO.js +1 -1
- package/dist/chunk-KVFXQ7HW.js +1 -0
- package/dist/chunk-NYZR4XKO.js +1 -1
- package/dist/chunk-X7VAACWY.js +1 -1
- package/dist/formats/index.d.ts +2 -2
- package/dist/formats/index.js +1 -1
- package/dist/models/index.d.ts +9 -4
- package/dist/models/index.js +1 -1
- package/dist/{provider-adapters-aW7frG5B.d.ts → provider-adapters-CdnzlH4Y.d.ts} +1 -1
- package/dist/shared/index.d.ts +2 -2
- package/dist/shared/index.js +1 -1
- package/dist/tools/index.d.ts +131 -3
- package/dist/tools/index.js +1 -1
- package/dist/{types-BS0Io2Vs.d.ts → types-Dpf5wjPw.d.ts} +40 -17
- package/package.json +2 -2
- package/dist/chunk-P54V754C.js +0 -1
|
@@ -193,6 +193,8 @@ interface ChatResponse {
|
|
|
193
193
|
inputTokens: number;
|
|
194
194
|
outputTokens: number;
|
|
195
195
|
reasoningTokens?: number;
|
|
196
|
+
cacheReadInputTokens?: number;
|
|
197
|
+
cacheCreationInputTokens?: number;
|
|
196
198
|
};
|
|
197
199
|
providerState?: MessageProviderState;
|
|
198
200
|
}
|
|
@@ -232,22 +234,20 @@ interface OpenAiReasoningSummaryDeltaChunk {
|
|
|
232
234
|
outputIndex: number;
|
|
233
235
|
summaryIndex: number;
|
|
234
236
|
}
|
|
235
|
-
interface
|
|
236
|
-
type: "
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
name?: string;
|
|
248
|
-
id?: string;
|
|
249
|
-
response?: ChatResponse;
|
|
237
|
+
interface ProviderRetryChunk {
|
|
238
|
+
type: "provider_retry";
|
|
239
|
+
attempt: number;
|
|
240
|
+
maxAttempts: number;
|
|
241
|
+
error: string;
|
|
242
|
+
delayMs: number;
|
|
243
|
+
reason: "http_status" | "stream_error" | "transport_error";
|
|
244
|
+
status?: number;
|
|
245
|
+
}
|
|
246
|
+
interface DoneChunk {
|
|
247
|
+
type: "done";
|
|
248
|
+
response: ChatResponse;
|
|
250
249
|
}
|
|
250
|
+
type ChatResponseChunk = AnthropicSignatureDeltaChunk | AnthropicThinkingDeltaChunk | ContentDeltaChunk | DoneChunk | OpenAiReasoningDeltaChunk | OpenAiReasoningSummaryDeltaChunk | ProviderRetryChunk | ToolUseDeltaChunk;
|
|
251
251
|
interface ModelLimits {
|
|
252
252
|
contextWindow?: number;
|
|
253
253
|
maxOutput?: number;
|
|
@@ -345,6 +345,7 @@ interface ChatModel {
|
|
|
345
345
|
complete(request: ModelRequest): Promise<ModelResponse>;
|
|
346
346
|
}
|
|
347
347
|
interface ModelExecutionOptions {
|
|
348
|
+
onProviderRetry?: (event: ProviderRetryChunk) => Promise<void> | void;
|
|
348
349
|
signal?: AbortSignal;
|
|
349
350
|
}
|
|
350
351
|
interface EngineChatModel {
|
|
@@ -366,9 +367,26 @@ interface AgentEventContext {
|
|
|
366
367
|
turnId: string;
|
|
367
368
|
state: TurnState;
|
|
368
369
|
}
|
|
370
|
+
type AskUserOption = {
|
|
371
|
+
label: string;
|
|
372
|
+
description: string;
|
|
373
|
+
};
|
|
374
|
+
type AskUserQuestion = {
|
|
375
|
+
id: string;
|
|
376
|
+
question: string;
|
|
377
|
+
header: string;
|
|
378
|
+
options: AskUserOption[];
|
|
379
|
+
multiSelect: boolean;
|
|
380
|
+
};
|
|
381
|
+
type AskUserAnswers = Record<string, string | string[]>;
|
|
382
|
+
type AskUserQuestionRequest = {
|
|
383
|
+
questionId: string;
|
|
384
|
+
questions: AskUserQuestion[];
|
|
385
|
+
};
|
|
369
386
|
interface ToolExecutionContext extends AgentEventContext {
|
|
370
387
|
signal: AbortSignal;
|
|
371
388
|
toolCallId?: string;
|
|
389
|
+
askUser?: (request: AskUserQuestionRequest) => Promise<AskUserAnswers>;
|
|
372
390
|
}
|
|
373
391
|
interface ToolRuntimeStartedEvent {
|
|
374
392
|
type: "tool_started";
|
|
@@ -453,7 +471,9 @@ interface AgentTurnCompleteEvent {
|
|
|
453
471
|
type: "turn_complete";
|
|
454
472
|
state: TurnState;
|
|
455
473
|
}
|
|
456
|
-
|
|
474
|
+
interface AgentProviderRetryEvent extends ProviderRetryChunk {
|
|
475
|
+
}
|
|
476
|
+
type AgentLifecycleEvent = AgentAssistantChunkEvent | AgentAssistantMessageEvent | AgentFinalMessageEvent | AgentModelRequestEvent | AgentModelResponseEvent | AgentProviderRetryEvent | AgentReasoningChunkEvent | AgentReasoningMessageEvent | AgentToolCallEvent | AgentToolUseChunkEvent | AgentToolUseMessageEvent | AgentToolResultEvent | AgentToolResultMessageEvent | AgentTurnCompleteEvent | AgentUserMessageEvent;
|
|
457
477
|
type AgentEvent = AgentLifecycleEvent | ToolRuntimeEvent;
|
|
458
478
|
type ToolRuntimeDispatchDecision = {
|
|
459
479
|
action: "reject";
|
|
@@ -537,6 +557,7 @@ interface RunTurnDeps {
|
|
|
537
557
|
registry: ExtensionRegistry;
|
|
538
558
|
chatModel: EngineChatModel;
|
|
539
559
|
toolRuntime: ToolRuntime;
|
|
560
|
+
askUser?: (request: AskUserQuestionRequest) => Promise<AskUserAnswers>;
|
|
540
561
|
onEvent?: AgentEventHandler;
|
|
541
562
|
}
|
|
542
563
|
type AgentInput = MessageInput | string;
|
|
@@ -555,6 +576,8 @@ interface AgentOptions {
|
|
|
555
576
|
extensions?: AnyExtensionRegistration[];
|
|
556
577
|
chatModel?: EngineChatModel;
|
|
557
578
|
tools?: AnyToolDefinition[];
|
|
579
|
+
askUser?: (request: AskUserQuestionRequest) => Promise<AskUserAnswers>;
|
|
580
|
+
getContextWindowLimit?: (request: ChatRequest) => number | undefined;
|
|
558
581
|
}
|
|
559
582
|
interface AgentDefinitionFactoryContext {
|
|
560
583
|
agentId: string;
|
|
@@ -692,4 +715,4 @@ interface OpenAiResponsesRequest {
|
|
|
692
715
|
tools: OpenAiFunctionTool[];
|
|
693
716
|
}
|
|
694
717
|
|
|
695
|
-
export type {
|
|
718
|
+
export type { ToolResultContentBlock as $, AgentEvent as A, BaseChatModelOptions as B, ChatRequest as C, ProviderCredentialKind as D, ExtensionRegistry as E, ProviderEndpoints as F, AutoReasoningEffort as G, AnthropicThinkingConfig as H, OpenAiReasoningConfig as I, JsonPrimitive as J, JsonObject as K, JsonValue as L, Message as M, JsonSchemaType as N, OpenAiResponsesRequest as O, ProviderSessionResolver as P, JsonSchemaString as Q, RunTurnDeps as R, SystemInput as S, TurnResult as T, JsonSchemaNumber as U, JsonSchemaBoolean as V, JsonSchemaArray as W, JsonSchemaObject as X, JsonSchema as Y, ImageMediaType as Z, ImageBlock as _, AgentOptions as a, AgentLifecycleEvent as a$, ToolResultContent as a0, AnthropicThinkingBlock as a1, AnthropicRedactedThinkingBlock as a2, OpenAiReasoningSummaryText as a3, OpenAiReasoningBlock as a4, AnthropicThinkingWireBlock as a5, AnthropicRedactedThinkingWireBlock as a6, AnthropicAssistantContentBlock as a7, ReasoningVisibility as a8, AutoReasoningConfig as a9, ChatModel as aA, AgentEventContext as aB, AskUserOption as aC, AskUserQuestion as aD, AskUserAnswers as aE, AskUserQuestionRequest as aF, ToolExecutionContext as aG, ToolRuntimeStartedEvent as aH, ToolRuntimeOutputChunkEvent as aI, ToolRuntimeCompletedEvent as aJ, ToolRuntimeRejectedEvent as aK, ToolRuntimeEvent as aL, AgentUserMessageEvent as aM, AgentModelRequestEvent as aN, AgentModelResponseEvent as aO, AgentAssistantMessageEvent as aP, AgentAssistantChunkEvent as aQ, AgentToolUseMessageEvent as aR, AgentToolUseChunkEvent as aS, AgentReasoningMessageEvent as aT, AgentReasoningChunkEvent as aU, AgentToolCallEvent as aV, AgentToolResultEvent as aW, AgentToolResultMessageEvent as aX, AgentFinalMessageEvent as aY, AgentTurnCompleteEvent as aZ, AgentProviderRetryEvent as a_, AnthropicThinkingDisplay as aa, AnthropicThinkingEffort as ab, AnthropicEnabledThinkingConfig as ac, AnthropicAdaptiveThinkingConfig as ad, AnthropicDisabledThinkingConfig as ae, OpenAiReasoningEffort as af, OpenAiReasoningSummary as ag, MessageProviderState as ah, AssistantContentBlock as ai, MessageRole as aj, IdentifiedMessage as ak, ToolSchema as al, Usage as am, ContentDeltaChunk as an, ToolUseDeltaChunk as ao, AnthropicThinkingDeltaChunk as ap, AnthropicSignatureDeltaChunk as aq, OpenAiReasoningDeltaChunk as ar, OpenAiReasoningSummaryDeltaChunk as as, ProviderRetryChunk as at, DoneChunk as au, ToolResultMeta as av, ToolResultChunk as aw, ToolOutputEnvelope as ax, TurnResultStatus as ay, PrepareRequestInput as az, AgentInput as b, ToolRuntimeDispatchDecision as b0, ToolRuntimeToolCallHandler as b1, ToolRuntimeEventHandler as b2, AgentEventHandler as b3, ToolRuntime as b4, InferJsonSchema as b5, ToolOutputValue as b6, ToolGenerator as b7, ToolDefinition as b8, AnyToolDefinition as b9, OpenAiOutputMessage as bA, OpenAiReasoningOutputItem as bB, OpenAiResponsesOutputItem as bC, OpenAiResponsesReasoningParam as bD, OpenAiFunctionTool as bE, Stage as ba, PayloadByStage as bb, ExtensionContext as bc, Transformer as bd, Observer as be, TransformerExtensionRegistration as bf, ObserverExtensionRegistration as bg, ExtensionRegistration as bh, AnyExtensionRegistration as bi, AgentDefinitionFactoryContext as bj, AgentDefinition as bk, ManagedRunStatus as bl, ManagedRunError as bm, ManagedAgentRun as bn, ManagedAgentRunHandle as bo, ManagedRunEvent as bp, ManagedRunEventHandler as bq, RuntimeManagerOptions as br, CreateManagedRunInput as bs, OpenAiInputText as bt, OpenAiInputImage as bu, OpenAiInputMessage as bv, OpenAiFunctionCall as bw, OpenAiFunctionCallOutput as bx, OpenAiOutputTextPart as by, OpenAiRefusalPart as bz, AgentSendOptions as c, TurnInput as d, TurnState as e, ContentBlock as f, TextBlock as g, ContentInput as h, MessageInput as i, CompileRequestInput as j, ModelRequest as k, ModelResponse as l, ChatResponse as m, ToolUseBlock as n, ToolResultBlock as o, ToolResult as p, ResolvedProviderSession as q, ProviderRequestMutator as r, PreparedRequest as s, ProviderCredential as t, EngineChatModel as u, ReasoningConfig as v, ChatResponseChunk as w, ModelExecutionOptions as x, ModelInfo as y, ModelLimits as z };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nuvin/agent-core",
|
|
3
|
-
"version": "0.0.0-rc.
|
|
3
|
+
"version": "0.0.0-rc.7",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Core agent, model, format, and tool primitives for Nuvin",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
"tsup": "^8.5.1",
|
|
49
49
|
"typescript": "^6.0.2",
|
|
50
50
|
"vitest": "^4.1.2",
|
|
51
|
-
"@nuvin/config": "0.1.0-rc.
|
|
51
|
+
"@nuvin/config": "0.1.0-rc.2"
|
|
52
52
|
},
|
|
53
53
|
"dependencies": {
|
|
54
54
|
"@anthropic-ai/sdk": "^0.82.0",
|
package/dist/chunk-P54V754C.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(function(_0xe2c0f8,_0x1bcb7e){const _0x2691dd={_0x3b6d4e:0x214,_0x1ca7d5:0x1d,_0x1e90c2:0x38,_0x5bab94:0x21,_0x1aab46:0x235,_0x21a5bf:0x218,_0x55ce11:0x3f,_0x297ddc:0x56,_0x5ad7b6:0x1dd,_0x231c60:0x262,_0x33ead6:0x218,_0x5a6730:0x231,_0x2e17c8:0x254,_0x2d36af:0xa7,_0x502b86:0xab},_0x3b6b95={_0x3f0b06:0x18c};function _0x6bca69(_0x2191d7,_0x34026f,_0x3305f6,_0x526644){return _0x593e(_0x526644- -_0x3b6b95._0x3f0b06,_0x34026f);}function _0x255583(_0x39dc17,_0x18f923,_0x2415d0,_0x510e04){return _0x593e(_0x510e04- -0x358,_0x2415d0);}const _0x5d8cae=_0xe2c0f8();while(!![]){try{const _0x3d583b=parseInt(_0x255583(-0x1c0,-_0x2691dd._0x3b6d4e,-0x1fa,-0x20e))/0x1*(parseInt(_0x6bca69(_0x2691dd._0x1ca7d5,-_0x2691dd._0x1e90c2,_0x2691dd._0x5bab94,-0xc))/0x2)+parseInt(_0x6bca69(-0x69,-0x99,-0xa5,-0x61))/0x3+-parseInt(_0x255583(-_0x2691dd._0x1aab46,-_0x2691dd._0x21a5bf,-0x212,-0x239))/0x4+parseInt(_0x6bca69(-0x3f,-_0x2691dd._0x55ce11,-0x2e,-_0x2691dd._0x297ddc))/0x5*(parseInt(_0x255583(-_0x2691dd._0x5ad7b6,-0x213,-0x241,-0x21e))/0x6)+-parseInt(_0x255583(-0x27d,-_0x2691dd._0x231c60,-0x211,-0x255))/0x7*(parseInt(_0x255583(-0x1fe,-0x267,-0x204,-0x21a))/0x8)+-parseInt(_0x255583(-_0x2691dd._0x33ead6,-0x22b,-0x220,-_0x2691dd._0x5a6730))/0x9*(-parseInt(_0x6bca69(-0x24,-0x3d,-0x50,-0x38))/0xa)+-parseInt(_0x255583(-0x25d,-0x21b,-0x210,-_0x2691dd._0x2e17c8))/0xb*(parseInt(_0x6bca69(-0x5d,-_0x2691dd._0x2d36af,-_0x2691dd._0x502b86,-0x86))/0xc);if(_0x3d583b===_0x1bcb7e)break;else _0x5d8cae['push'](_0x5d8cae['shift']());}catch(_0x47632f){_0x5d8cae['push'](_0x5d8cae['shift']());}}}(_0x1797,0xe9ea9));import{createAssistantTextMessage,createReasoningMessage,createToolResultUserMessage,createToolUseMessage,getToolUseBlocks,normalizeMessage,normalizeSystem,responseToAssistantMessage}from'./chunk-G2FR4UGO.js';import{addAbortListener,isAbortError,throwIfAborted,toAbortError}from'./chunk-X7VAACWY.js';function isJsonObject(_0x4cb1e6){const _0x41df3a={_0x994b98:0xa7,_0x51da9f:0xb1,_0x2391ef:0xb8,_0x14190b:0xc2},_0x4f2e14={_0x1e6fc1:0x20d};function _0x3755f0(_0x3c0d38,_0x594563,_0x40d468,_0x22c2ba){return _0x593e(_0x40d468- -_0x4f2e14._0x1e6fc1,_0x3c0d38);}function _0x1f9255(_0x169480,_0x34437f,_0x199f35,_0x27e2c9){return _0x593e(_0x169480- -0xb0,_0x199f35);}return typeof _0x4cb1e6===_0x1f9255(_0x41df3a._0x994b98,0x82,0x6f,_0x41df3a._0x51da9f)&&_0x4cb1e6!==null&&!Array[_0x3755f0(-0xcf,-_0x41df3a._0x2391ef,-_0x41df3a._0x14190b,-0xb8)](_0x4cb1e6);}function isToolOutputEnvelope(_0x2bf202){const _0x40a9f0={_0x4b4c69:0x388,_0x4b0e32:0x329,_0x4b234a:0x363,_0x3b9e69:0x359,_0x4fa273:0x32a},_0x5987d1={_0x3f1214:0x244};if(typeof _0x2bf202!==_0x48cb91(0x3ad,0x3e1,0x3a3,_0x40a9f0._0x4b4c69)||_0x2bf202===null||Array['isArray'](_0x2bf202))return![];function _0x48cb91(_0x2a9497,_0x357ee6,_0x379000,_0x35e9ab){return _0x593e(_0x2a9497-0x256,_0x357ee6);}function _0xdf487d(_0x51de57,_0xe88062,_0xdfd8ff,_0x3b9c9f){return _0x593e(_0xdfd8ff-_0x5987d1._0x3f1214,_0xe88062);}if(typeof _0x2bf202[_0xdf487d(0x396,0x376,0x35b,_0x40a9f0._0x4b0e32)]!==_0x48cb91(_0x40a9f0._0x4b234a,_0x40a9f0._0x3b9e69,_0x40a9f0._0x4fa273,0x337))return![];const _0x2e70d4=_0x2bf202['structured'];return _0x2e70d4===void 0x0||isJsonObject(_0x2e70d4);}function validateAgainstSchema(_0xec2d28,_0x203ce7,_0x1209c3){const _0x210c2d={_0x145e62:0x410,_0x46330b:0x436,_0x32bd02:0x459,_0xe998dd:0x431,_0x4ab2df:0x22d,_0xfd58bf:0x27b,_0x38c2c5:0x210,_0x164855:0x46f,_0x42cb89:0x47f,_0x268702:0x458,_0x2de36c:0x41d,_0x321244:0x405,_0x3bd220:0x232,_0x384fb8:0x24a,_0x1046a5:0x24f,_0x222a32:0x47c,_0x4d0b71:0x448,_0x5a48ee:0x435,_0x2b9c1b:0x497,_0x1174e9:0x4ae,_0x561ecf:0x46a,_0x174b94:0x471,_0x211e77:0x483,_0x46c735:0x440,_0x31f085:0x45a,_0x5d5e2a:0x1b6,_0x3384be:0x1e8,_0x4baf85:0x219,_0x2170a5:0x1b3,_0x1bbce3:0x41f,_0x417093:0x42d,_0x17ab23:0x3d3},_0x4bab5f={_0x562a2a:0x3e,_0x5781cc:0x18,_0x55f91f:0x9},_0x2cadfc={_0x57abe8:0x19},_0x24b27f={_0x3aa5cb:0xb4},_0x4330ec={_0x2206b1:0x313};function _0x3fe787(_0x5abb8d,_0x47b03d,_0x60c160,_0xea3bf1){return _0x593e(_0x47b03d-_0x4330ec._0x2206b1,_0x60c160);}function _0x1b35a6(_0xe5d401,_0x5b4fcb,_0x1eadde,_0x5b91f4){return _0x593e(_0x5b4fcb-_0x24b27f._0x3aa5cb,_0x5b91f4);}switch(_0x1209c3[_0x3fe787(_0x210c2d._0x145e62,_0x210c2d._0x46330b,0x45e,_0x210c2d._0x32bd02)]){case'string':if(typeof _0x203ce7!=='string')throw new Error(_0x3fe787(0x47e,0x47f,0x44b,_0x210c2d._0xe998dd)+_0xec2d28+':\x20expected\x20string');return;case'number':if(typeof _0x203ce7!==_0x1b35a6(_0x210c2d._0x4ab2df,0x23e,_0x210c2d._0xfd58bf,_0x210c2d._0x38c2c5))throw new Error(_0x3fe787(_0x210c2d._0x164855,_0x210c2d._0x42cb89,_0x210c2d._0x268702,0x447)+_0xec2d28+_0x3fe787(0x3e3,_0x210c2d._0x2de36c,_0x210c2d._0x321244,0x3cf));return;case _0x1b35a6(0x25d,_0x210c2d._0x3bd220,_0x210c2d._0x384fb8,0x227):if(typeof _0x203ce7!==_0x1b35a6(0x26c,_0x210c2d._0x3bd220,_0x210c2d._0x1046a5,0x240))throw new Error('Invalid\x20tool\x20input\x20at\x20'+_0xec2d28+':\x20expected\x20boolean');return;case _0x3fe787(0x42d,0x456,0x42d,_0x210c2d._0x222a32):if(!Array[_0x3fe787(_0x210c2d._0x4d0b71,0x45e,0x410,_0x210c2d._0x5a48ee)](_0x203ce7))throw new Error(_0x3fe787(0x46a,0x47f,0x4a8,0x447)+_0xec2d28+_0x3fe787(_0x210c2d._0x2b9c1b,_0x210c2d._0x1174e9,0x489,0x471));_0x203ce7['forEach']((_0x38fe10,_0xd0c41b)=>{function _0xdc019f(_0x5c242d,_0x4038ca,_0x538a05,_0x289943){return _0x3fe787(_0x5c242d-_0x2cadfc._0x57abe8,_0x4038ca- -0x42b,_0x289943,_0x289943-0x130);}validateAgainstSchema(_0xec2d28+'['+_0xd0c41b+']',_0x38fe10,_0x1209c3[_0xdc019f(_0x4bab5f._0x562a2a,_0x4bab5f._0x5781cc,_0x4bab5f._0x55f91f,-0x2e)]);});return;case _0x3fe787(0x454,_0x210c2d._0x561ecf,0x4a4,0x48b):if(!isJsonObject(_0x203ce7))throw new Error('Invalid\x20tool\x20input\x20at\x20'+_0xec2d28+':\x20expected\x20object');for(const _0x2dfded of _0x1209c3[_0x3fe787(_0x210c2d._0x174b94,0x454,0x43a,0x45e)]??[]){if(!(_0x2dfded in _0x203ce7))throw new Error('Invalid\x20tool\x20input\x20at\x20'+_0xec2d28+_0x3fe787(_0x210c2d._0x211e77,_0x210c2d._0x46c735,0x40f,_0x210c2d._0x31f085)+_0x2dfded+'\x22');}for(const [_0x182c80,_0x55a1f3]of Object[_0x1b35a6(_0x210c2d._0x5d5e2a,_0x210c2d._0x3384be,_0x210c2d._0x4baf85,_0x210c2d._0x2170a5)](_0x1209c3[_0x3fe787(0x3e5,_0x210c2d._0x1bbce3,_0x210c2d._0x417093,_0x210c2d._0x17ab23)])){_0x182c80 in _0x203ce7&&validateAgainstSchema(_0xec2d28+'.'+_0x182c80,_0x203ce7[_0x182c80],_0x55a1f3);}}}function normalizeToolOutputValue(_0x17ab8e){const _0x1d4fe6={_0x47e4f4:0x10b,_0x5a58d0:0x105,_0x43ce9d:0xbf,_0x195c6c:0x1fb,_0x2deb04:0x282,_0x26a6df:0x26d,_0x18af1d:0x264,_0xcd669f:0x27d,_0x3b703e:0x109,_0x2ebe4a:0x8f,_0x2fa330:0xbb,_0x1ac824:0xd2,_0x178c61:0x81,_0x380577:0xb5,_0x524dc9:0xfe,_0x1d961c:0xb2},_0x499918={_0x5bb160:0x12b};if(isToolOutputEnvelope(_0x17ab8e))return{'output':_0x17ab8e[_0x3ae51d(_0x1d4fe6._0x47e4f4,_0x1d4fe6._0x5a58d0,0x10a,_0x1d4fe6._0x43ce9d)],'structured':_0x17ab8e[_0x3ae51d(0x164,0x114,0x11c,0x116)]??{'value':_0x17ab8e[_0xfad603(_0x1d4fe6._0x195c6c,0x242,_0x1d4fe6._0x2deb04,_0x1d4fe6._0x26a6df)]},..._0x17ab8e[_0xfad603(_0x1d4fe6._0x18af1d,0x23e,_0x1d4fe6._0xcd669f,0x1f8)]!==void 0x0?{'content':_0x17ab8e[_0x3ae51d(_0x1d4fe6._0x3b703e,_0x1d4fe6._0x2ebe4a,0x106,_0x1d4fe6._0x2fa330)]}:{}};if(typeof _0x17ab8e===_0x3ae51d(_0x1d4fe6._0x1ac824,_0x1d4fe6._0x178c61,0xb7,_0x1d4fe6._0x380577))return{'output':_0x17ab8e,'structured':{'value':_0x17ab8e}};function _0xfad603(_0x2b4d13,_0x113021,_0x321a2e,_0x3396d3){return _0x593e(_0x113021-_0x499918._0x5bb160,_0x3396d3);}if(typeof _0x17ab8e==='object'&&_0x17ab8e!==null&&!Array[_0x3ae51d(_0x1d4fe6._0x524dc9,0xb5,_0x1d4fe6._0x1d961c,0xf3)](_0x17ab8e))return{'output':JSON['stringify'](_0x17ab8e,null,0x2),'structured':_0x17ab8e};function _0x3ae51d(_0x96d14d,_0x52543f,_0x4be7e0,_0xa94cde){return _0x593e(_0xa94cde- -0x58,_0x52543f);}return{'output':JSON['stringify'](_0x17ab8e,null,0x2),'structured':{'value':_0x17ab8e}};}function createToolOutput(_0x4171c6,_0x124987={'value':_0x4171c6},_0xeba360){return{'output':_0x4171c6,'structured':_0x124987,..._0xeba360!==void 0x0?{'content':_0xeba360}:{}};}var ToolExecutionError=class extends Error{[_0x304c30(0x192,0x172,0x134,0x14e)];constructor(_0x55cc55,_0xa18eeb={}){const _0x25ea91={_0x3443ed:0x495,_0x3828ee:0x4ae,_0x8cb371:0x483,_0x1cfe4a:0x4ab,_0x425593:0x4b8},_0xc77a4d={_0x20f034:0x59,_0x2d20af:0x17,_0x3ff095:0x36a},_0x4b7b7f={_0x62072:0x178,_0xe7d9cc:0x1cb};function _0x55c555(_0x141427,_0x515da8,_0x53ed24,_0x2d3f81){return _0x304c30(_0x141427-_0x4b7b7f._0x62072,_0x141427,_0x53ed24-0x36,_0x515da8- -_0x4b7b7f._0xe7d9cc);}function _0x156a56(_0x179a53,_0x1c2155,_0x775e7d,_0x2637c4){return _0x304c30(_0x179a53-_0xc77a4d._0x20f034,_0x1c2155,_0x775e7d-_0xc77a4d._0x2d20af,_0x2637c4-_0xc77a4d._0x3ff095);}super(_0x55cc55),this[_0x156a56(_0x25ea91._0x3443ed,0x4c9,0x479,_0x25ea91._0x3828ee)]=_0x55c555(-0xf4,-0xe4,-0xf3,-0xfd),this[_0x156a56(0x470,_0x25ea91._0x8cb371,_0x25ea91._0x1cfe4a,_0x25ea91._0x425593)]=_0xa18eeb;}};function defineTool(_0x52c772){return _0x52c772;}var ToolRegistry=class{[_0x31a615(-0x20d,-0x1d3,-0x20d,-0x249)]=new Map();constructor(_0x70715f=[]){const _0x1de2ea={_0x4e3647:0x23b,_0x57d275:0x277},_0x119e9d={_0x3e8c6d:0xc7,_0x237e62:0xb4,_0x1789dc:0x381};function _0x189024(_0x2db063,_0x431756,_0x3832c8,_0x56b455){return _0x304c30(_0x2db063-_0x119e9d._0x3e8c6d,_0x3832c8,_0x3832c8-_0x119e9d._0x237e62,_0x56b455- -_0x119e9d._0x1789dc);}for(const _0x4f2917 of _0x70715f){this[_0x189024(-0x262,-0x26d,-_0x1de2ea._0x4e3647,-_0x1de2ea._0x57d275)](_0x4f2917);}}[_0x31a615(-0x24d,-0x28b,-0x295,-0x23b)](_0x1e3647){const _0x2164ee={_0x17ff2c:0x31,_0x35ddc0:0x54,_0xdf5d98:0x3f,_0x10055e:0x0},_0x597091={_0x173410:0x252,_0x3f3cd1:0x120},_0x42c693={_0x230dbf:0x102};function _0x41a811(_0x394493,_0x5d53e3,_0x5ab100,_0x4beb4d){return _0x304c30(_0x394493-0x1a6,_0x5d53e3,_0x5ab100-_0x42c693._0x230dbf,_0x4beb4d-0x3a6);}function _0x505517(_0x31a772,_0x3747db,_0x45e72,_0x5f2c90){return _0x31a615(_0x3747db-_0x597091._0x173410,_0x3747db-_0x597091._0x3f3cd1,_0x5f2c90,_0x5f2c90-0x76);}this['toolsByName'][_0x505517(0xd,0x9,-_0x2164ee._0x17ff2c,_0x2164ee._0x35ddc0)](_0x1e3647[_0x505517(0x1c,_0x2164ee._0xdf5d98,0x52,_0x2164ee._0x10055e)],_0x1e3647);}['get'](_0x399bb7){const _0x3cf6ec={_0x34411b:0x4cc,_0x6514f0:0x4fb,_0x23434c:0x4a8,_0x5b2dfc:0x479},_0x18dcf8={_0x53ce42:0x1d1};function _0x1f73fb(_0x38cfee,_0x4c11da,_0x43980c,_0x230f48){return _0x304c30(_0x38cfee-0x1b3,_0x38cfee,_0x43980c-_0x18dcf8._0x53ce42,_0x43980c-0x3a4);}function _0x1a299c(_0x3bc813,_0x5c952a,_0x21c0bb,_0x58b65d){return _0x31a615(_0x21c0bb-0x203,_0x5c952a-0x194,_0x3bc813,_0x58b65d-0x1b1);}return this[_0x1f73fb(0x51e,_0x3cf6ec._0x34411b,0x4ee,_0x3cf6ec._0x6514f0)][_0x1f73fb(0x4c2,0x45e,_0x3cf6ec._0x23434c,_0x3cf6ec._0x5b2dfc)](_0x399bb7);}[_0x31a615(-0x242,-0x27e,-0x21d,-0x237)](){const _0x553f6={_0x122a1b:0x370,_0x588f21:0x351,_0x5dfd29:0x367,_0x2d3d08:0x369,_0x9db56d:0x349,_0x5d9cab:0x36b,_0x15aa98:0x37e},_0x44b43f={_0x20f86d:0x3},_0x4b4f55={_0x8a1c2f:0x1ef};function _0x5f5982(_0x6acd7d,_0x120e91,_0x245a79,_0x3aca2c){return _0x304c30(_0x6acd7d-0x53,_0x6acd7d,_0x245a79-_0x4b4f55._0x8a1c2f,_0x120e91-0x207);}function _0x348ded(_0x397331,_0x22acda,_0x35226f,_0x11e848){return _0x304c30(_0x397331-_0x44b43f._0x20f86d,_0x22acda,_0x35226f-0xd6,_0x35226f- -0x3a7);}return[...this[_0x5f5982(_0x553f6._0x122a1b,_0x553f6._0x588f21,_0x553f6._0x5dfd29,0x313)][_0x5f5982(_0x553f6._0x2d3d08,_0x553f6._0x9db56d,_0x553f6._0x5d9cab,_0x553f6._0x15aa98)]()];}[_0x31a615(-0x226,-0x20a,-0x1ee,-0x224)](){const _0x5304e8={_0x3f9ba5:0x296,_0x769b93:0x22b,_0x32d30f:0x267,_0x22a27b:0x211,_0xf97e8d:0x23b},_0x28e952={_0x520cdc:0x1f7,_0x325875:0x271,_0x6812c:0x223,_0x1360ce:0x1fe,_0x2392b6:0x1d7,_0x4c0ad:0x224},_0x541c25={_0xd28554:0x222},_0x29e645={_0x28cfcf:0x1a9},_0x5d1d8c={_0x368abb:0x1dc,_0x23ddfd:0x1c},_0x1192c1={_0x3c8136:0x66,_0x28263e:0x130};function _0x15038b(_0x102c55,_0x7ee9ff,_0x224dc7,_0xe5460e){return _0x304c30(_0x102c55-0x12f,_0xe5460e,_0x224dc7-_0x1192c1._0x3c8136,_0x224dc7- -_0x1192c1._0x28263e);}function _0x37998c(_0x5b2058,_0x37ced5,_0xe5b095,_0x5bbe81){return _0x31a615(_0x5bbe81- -0x25,_0x37ced5-_0x5d1d8c._0x368abb,_0x37ced5,_0x5bbe81-_0x5d1d8c._0x23ddfd);}return this[_0x37998c(-0x27c,-_0x5304e8._0x3f9ba5,-_0x5304e8._0x769b93,-_0x5304e8._0x32d30f)]()[_0x37998c(-0x284,-_0x5304e8._0x22a27b,-0x249,-_0x5304e8._0xf97e8d)](_0x174953=>{function _0x29653f(_0x26bb19,_0x2daa10,_0x266d4f,_0x3cdf27){return _0x37998c(_0x26bb19-0x113,_0x3cdf27,_0x266d4f-_0x29e645._0x28cfcf,_0x2daa10-0x3c6);}function _0xc3aaee(_0x3a2422,_0x1ec974,_0x267295,_0x1728b1){return _0x15038b(_0x3a2422-0xed,_0x1ec974-0x12f,_0x3a2422- -_0x541c25._0xd28554,_0x267295);}return{'name':_0x174953[_0xc3aaee(-0x20e,-_0x28e952._0x520cdc,-0x1e3,-0x241)],'description':_0x174953[_0xc3aaee(-_0x28e952._0x325875,-0x231,-_0x28e952._0x6812c,-0x286)],'input_schema':_0x174953[_0xc3aaee(-0x1d6,-_0x28e952._0x1360ce,-_0x28e952._0x2392b6,-_0x28e952._0x4c0ad)]};});}};function validateToolInput(_0x25b10d,_0x360033){const _0x4c124d={_0x4d139c:0xac,_0x1837eb:0xa6,_0x4a46e1:0xf0},_0x41d31f={_0x579af0:0x97};validateAgainstSchema(_0x3b77d3(0x71,_0x4c124d._0x4d139c,_0x4c124d._0x1837eb,_0x4c124d._0x4a46e1),_0x25b10d,_0x360033);function _0x3b77d3(_0x277f9c,_0x6d7248,_0x56d73f,_0x3074c9){return _0x304c30(_0x277f9c-0xb1,_0x3074c9,_0x56d73f-0x12c,_0x56d73f- -_0x41d31f._0x579af0);}return _0x25b10d;}function deriveFinalToolOutput(_0x4546ca){const _0x2c392a={_0x2b79bf:0x190,_0x4ab4d1:0x1bd,_0x4a3b6f:0x43d,_0x21e128:0x41e,_0x1d2434:0x421,_0x1f1d86:0x49d,_0xd6bce9:0x4d3,_0x4de9d0:0x4c4,_0x174269:0x48b,_0x77e185:0x4b3,_0x233bde:0x484,_0x233703:0x49a,_0x53cfd1:0x4c3,_0x40892b:0x45b,_0x6e1d07:0x4c2,_0x5e024d:0x4b2,_0x49e6dc:0x19d,_0x378bac:0x197},_0x3e06df={_0x2d1b08:0x151},_0x1b5f9d={_0x4c3cb3:0x106};if(_0x4546ca['length']===0x0)return{'output':'','structured':{}};function _0x30fa15(_0x533347,_0x48e456,_0x563be3,_0x548ecc){return _0x31a615(_0x548ecc-0x3c6,_0x48e456-0x11,_0x48e456,_0x548ecc-_0x1b5f9d._0x4c3cb3);}if(_0x4546ca['length']===0x1)return{'output':_0x4546ca[0x0]['output'],'structured':_0x4546ca[0x0][_0x30fa15(0x18d,_0x2c392a._0x2b79bf,0x19e,_0x2c392a._0x4ab4d1)],..._0x4546ca[0x0]['content']!==void 0x0?{'content':_0x4546ca[0x0][_0x94838a(_0x2c392a._0x4a3b6f,0x3fc,_0x2c392a._0x21e128,_0x2c392a._0x1d2434)]}:{}};function _0x94838a(_0x2de096,_0x3b3be5,_0x5dfa8d,_0x19e2e5){return _0x304c30(_0x2de096-0x1ea,_0x3b3be5,_0x5dfa8d-_0x3e06df._0x2d1b08,_0x2de096-0x34a);}const _0x5cdfe7=_0x4546ca[_0x94838a(_0x2c392a._0x1f1d86,_0x2c392a._0xd6bce9,_0x2c392a._0x4de9d0,0x454)](_0x2976b0=>_0x2976b0['content']!==void 0x0);return{'output':_0x4546ca[_0x94838a(_0x2c392a._0x174269,0x47d,0x4a1,_0x2c392a._0x77e185)](_0x25c0ff=>_0x25c0ff[_0x30fa15(0x128,0x11e,0x18d,0x166)])[_0x94838a(_0x2c392a._0x233bde,_0x2c392a._0x233703,_0x2c392a._0x53cfd1,0x4a6)](''),'structured':{'chunks':_0x4546ca[_0x94838a(_0x2c392a._0x174269,_0x2c392a._0x40892b,_0x2c392a._0x6e1d07,0x471)](_0x3208c9=>_0x3208c9[_0x94838a(0x498,0x466,0x4e3,0x456)])},..._0x5cdfe7[_0x94838a(_0x2c392a._0x5e024d,0x496,0x4b4,0x4d5)]===0x1?{'content':_0x5cdfe7[0x0][_0x30fa15(0x1a2,_0x2c392a._0x49e6dc,_0x2c392a._0x378bac,0x162)]}:{}};}function createToolMeta(){return{'transforms':[]};}function createErrorToolResult(_0x55100f,_0x563152,_0x2e8a2f,_0x3360f2=[]){const _0x2505b1={_0xe2d7fe:0x4d3,_0x107c12:0x4d1,_0x3e2c2f:0x4f2,_0x185694:0x252,_0x3fc5c6:0x295,_0x2e3e7a:0x29d},_0x58f949={_0x5b5cfc:0x162,_0x19d09e:0x369},_0x1f25bc={_0x44fb1e:0xce,_0x5bcc81:0x38f};function _0x49de88(_0x174698,_0x27af59,_0x41c502,_0x1e9ab7){return _0x304c30(_0x174698-0xae,_0x27af59,_0x41c502-_0x1f25bc._0x44fb1e,_0x174698-_0x1f25bc._0x5bcc81);}function _0x3aaec4(_0x157b4d,_0x5aea7c,_0x33e4ff,_0x41040b){return _0x304c30(_0x157b4d-0x1ab,_0x33e4ff,_0x33e4ff-_0x58f949._0x5b5cfc,_0x157b4d- -_0x58f949._0x19d09e);}return{'callId':_0x55100f['id'],'toolName':_0x55100f[_0x49de88(_0x2505b1._0xe2d7fe,_0x2505b1._0x107c12,0x4c8,_0x2505b1._0x3e2c2f)],'status':_0x3aaec4(-_0x2505b1._0x185694,-_0x2505b1._0x3fc5c6,-0x24b,-_0x2505b1._0x2e3e7a),'output':_0x563152,'structured':_0x2e8a2f,'chunks':_0x3360f2,'meta':createToolMeta()};}function createRejectedToolResult(_0x53600d,_0x28aa70){const _0x4a182e={_0x340439:0x98,_0x430e64:0x70,_0x28bc4d:0xb8,_0x302e15:0x17b,_0x316f13:0xae},_0x405201={_0x3700cb:0x3e},_0x3adaac={_0x4ef6c8:0x18a,_0x598393:0x179},_0x26acc8=_0x28aa70?.[_0x4d08c4(_0x4a182e._0x340439,_0x4a182e._0x430e64,0xcf,_0x4a182e._0x28bc4d)]()[_0x4d08c4(0xd0,0xdf,0x85,0xae)]?_0x28aa70:'Tool\x20execution\x20rejected\x20for\x20'+_0x53600d['name'];function _0x4d08c4(_0x2025d4,_0x2ae0ba,_0x5aecab,_0x2eb89d){return _0x31a615(_0x2eb89d-0x29d,_0x2ae0ba-_0x3adaac._0x4ef6c8,_0x2ae0ba,_0x2eb89d-_0x3adaac._0x598393);}function _0x55f82b(_0x4b36b9,_0x2f2c4a,_0xef93a8,_0x1a7e0e){return _0x31a615(_0x1a7e0e-0xcb,_0x2f2c4a-0x92,_0xef93a8,_0x1a7e0e-_0x405201._0x3700cb);}return createErrorToolResult(_0x53600d,_0x26acc8,{'error':_0x55f82b(-0x180,-_0x4a182e._0x302e15,-0x18e,-0x186),..._0x28aa70?.['trim']()[_0x4d08c4(0xca,0xd7,0x9c,_0x4a182e._0x316f13)]?{'reason':_0x28aa70}:{}});}function createAbortedToolResult(_0xd960e9,_0x28df2a,_0x3a21b9=[]){const _0x1c7d2f={_0xe0949f:0x59c,_0x411572:0x531,_0x30ccda:0x51d},_0x289372={_0x2c5f20:0x718},_0x4a4b07={_0x598107:0x737,_0x4c23fe:0x96};function _0x10f563(_0x41c219,_0x224abc,_0x1822cd,_0x1fc405){return _0x31a615(_0x1822cd-_0x4a4b07._0x598107,_0x224abc-0x1b0,_0x41c219,_0x1fc405-_0x4a4b07._0x4c23fe);}const _0x58483b=toAbortError(_0x28df2a);function _0x5830fb(_0x35900d,_0x295236,_0x3a1929,_0x457218){return _0x31a615(_0x295236-_0x289372._0x2c5f20,_0x295236-0x6c,_0x457218,_0x457218-0x18);}return createErrorToolResult(_0xd960e9,_0x58483b[_0x10f563(_0x1c7d2f._0xe0949f,_0x1c7d2f._0x411572,0x555,0x538)],{'error':_0x58483b[_0x5830fb(_0x1c7d2f._0x30ccda,0x536,0x4f5,0x584)],'aborted':!![]},_0x3a21b9);}function createSuccessToolResult(_0x72e6ac,_0x54fb0a,_0x2a62ee){const _0x3d3088={_0x6bac1e:0x121,_0x53a3e2:0x153,_0x44bb89:0x162,_0x18234e:0x11f,_0x276fc7:0x13d,_0x1e55ee:0xfa,_0x571fb7:0x14b,_0x360b5d:0xe6},_0x13656d={_0x28f2a5:0x375},_0x5328b7={_0x51abce:0x1a2,_0x16bf5e:0x230};function _0x1b014e(_0x39e18d,_0x3a14c5,_0x4add95,_0x35c090){return _0x304c30(_0x39e18d-_0x5328b7._0x51abce,_0x4add95,_0x4add95-0xd2,_0x3a14c5- -_0x5328b7._0x16bf5e);}function _0x16e9c3(_0x3a5ea6,_0x452f2c,_0x5d82ca,_0x31f35c){return _0x31a615(_0x31f35c-_0x13656d._0x28f2a5,_0x452f2c-0xaf,_0x5d82ca,_0x31f35c-0x36);}return{'callId':_0x72e6ac['id'],'toolName':_0x72e6ac[_0x16e9c3(0x141,_0x3d3088._0x6bac1e,_0x3d3088._0x53a3e2,_0x3d3088._0x44bb89)],'status':'ok','output':_0x54fb0a[_0x16e9c3(0xe8,_0x3d3088._0x18234e,0xe5,0x115)],'structured':_0x54fb0a[_0x1b014e(-0xbf,-0xe2,-0x116,-0x12d)],..._0x54fb0a[_0x1b014e(-0xfe,-_0x3d3088._0x276fc7,-_0x3d3088._0x1e55ee,-_0x3d3088._0x571fb7)]!==void 0x0?{'content':_0x54fb0a[_0x16e9c3(0x102,_0x3d3088._0x360b5d,0xfb,0x111)]}:{},'chunks':_0x2a62ee,'meta':createToolMeta()};}function createUnknownToolResult(_0x4a9f8c){const _0x25a3b3={_0x47350a:0x179,_0x3126a1:0x15f,_0x5708da:0x149,_0x55b01d:0x167,_0x1d453b:0x62,_0x3177ed:0x2,_0x148695:0xd1,_0x541078:0x136,_0x113f29:0x115},_0x1cfc69={_0x4156b9:0x141,_0x13320a:0x231},_0x35a62e={_0x2225da:0x1c1};function _0x5a4567(_0x4f40a4,_0x3ee3a4,_0x4c84f8,_0x1e3e11){return _0x304c30(_0x4f40a4-_0x35a62e._0x2225da,_0x4f40a4,_0x4c84f8-0xd2,_0x3ee3a4- -0x182);}function _0x1117ca(_0x9b3a8c,_0x1d7a43,_0xdbb469,_0x34b5c5){return _0x304c30(_0x9b3a8c-_0x1cfc69._0x4156b9,_0x34b5c5,_0xdbb469-0xf8,_0xdbb469- -_0x1cfc69._0x13320a);}return createErrorToolResult(_0x4a9f8c,_0x1117ca(-_0x25a3b3._0x47350a,-_0x25a3b3._0x3126a1,-_0x25a3b3._0x5708da,-_0x25a3b3._0x55b01d)+_0x4a9f8c[_0x5a4567(-_0x25a3b3._0x1d453b,-0x3e,-0x5f,_0x25a3b3._0x3177ed)],{'error':_0x1117ca(-_0x25a3b3._0x148695,-_0x25a3b3._0x541078,-_0x25a3b3._0x113f29,-0x10a)});}function isDispatchDecision(_0x58324c){const _0x417076={_0x4892e5:0x1,_0x65d08c:0x3d,_0x3cb4e6:0x4,_0x43a27:0x6,_0x569279:0x4af,_0x3c72b8:0x473,_0x2b5ebe:0x4bc,_0x3d8efb:0x4c7},_0x4b8333={_0x37343e:0xd6,_0x5d6812:0x53},_0x5ae328={_0x220b09:0x1db,_0x392d94:0x11e};if(typeof _0x58324c!==_0x24b697(-_0x417076._0x4892e5,_0x417076._0x65d08c,-_0x417076._0x3cb4e6,-_0x417076._0x43a27)||_0x58324c===null)return![];function _0x1782b4(_0x30e9f3,_0x4eca85,_0x439ced,_0x1d0165){return _0x304c30(_0x30e9f3-_0x5ae328._0x220b09,_0x4eca85,_0x439ced-_0x5ae328._0x392d94,_0x30e9f3-0x34a);}function _0x24b697(_0x2ba48f,_0x440577,_0x3d1012,_0x3b52a2){return _0x304c30(_0x2ba48f-_0x4b8333._0x37343e,_0x3b52a2,_0x3d1012-_0x4b8333._0x5d6812,_0x2ba48f- -0x138);}return _0x58324c[_0x24b697(0x2d,0x1f,0x2f,-0x20)]==='reject'||_0x58324c[_0x1782b4(_0x417076._0x569279,_0x417076._0x3c72b8,0x4f9,_0x417076._0x2b5ebe)]===_0x1782b4(0x48d,_0x417076._0x3d8efb,0x4ae,0x451);}function normalizeExecutionError(_0x418ca9){const _0x20466e={_0x548027:0x87,_0x368ad2:0xb7,_0x51e56d:0xe9,_0x85f97d:0x367,_0x56d007:0x3b3},_0x4f3cb7={_0x1f5224:0x180},_0x90d8fd={_0x4f687e:0x1d};if(_0x418ca9 instanceof ToolExecutionError)return{'errorMessage':_0x418ca9[_0x259c2f(-_0x20466e._0x548027,-0xfd,-_0x20466e._0x368ad2,-_0x20466e._0x51e56d)],'structured':{'error':_0x418ca9['message'],..._0x418ca9['structured']}};function _0x259c2f(_0x4f22a9,_0x5c3bb3,_0x3a8d8a,_0x3dc68c){return _0x31a615(_0x3a8d8a-0x12b,_0x5c3bb3-0x178,_0x4f22a9,_0x3dc68c-_0x90d8fd._0x4f687e);}if(_0x418ca9 instanceof Error)return{'errorMessage':_0x418ca9[_0x5bb346(_0x20466e._0x85f97d,0x38d,_0x20466e._0x56d007,0x368)],'structured':{'error':_0x418ca9['message']}};const _0x269e13=String(_0x418ca9);function _0x5bb346(_0x3520a6,_0xb94930,_0x499363,_0xd8a3b3){return _0x31a615(_0xb94930-0x56f,_0xb94930-_0x4f3cb7._0x1f5224,_0x499363,_0xd8a3b3-0x2);}return{'errorMessage':_0x269e13,'structured':{'error':_0x269e13}};}async function emitEvent(_0x399fdd,_0x40bd10,_0xf0cb0e){await _0x399fdd?.(_0x40bd10,_0xf0cb0e);}async function resolveDispatchDecision(_0x599f19,_0x24523a,_0x25e46a){const _0xdb5bb={_0x7995ea:0x303,_0x13997e:0x36c,_0x39c3bd:0x396,_0xe25d32:0x35e,_0x4b48ac:0x34b,_0x39aa85:0x335,_0x13d5a7:0x339,_0x4935b8:0x306,_0x2bf545:0x346,_0x464458:0x2f9,_0x12608d:0x339,_0x13f937:0x2c6,_0x45ccee:0x314,_0x25cd56:0x353,_0x458bb3:0x2d3},_0x2d5800={_0x3a1952:0xc0,_0x20bbc5:0x147,_0x492ce5:0x1fb},_0x3827bf={_0x54b561:0x327,_0x481bcc:0x120,_0x302839:0x155,_0x4162d6:0x163,_0x4d5a10:0x34a,_0x237d62:0x312,_0x43bd74:0x31f,_0x2cd88f:0x12d,_0x25c28a:0x130,_0x1cbf4c:0x141},_0x2db5c4={_0x4653a4:0x153,_0x5ea435:0x61},_0xce008a={_0x1bca25:0x170,_0x49a73c:0xdc};if(!_0x599f19)return{'action':_0x17d061(0x35c,0x314,_0xdb5bb._0x7995ea,0x2e3)};function _0x17d061(_0x5239df,_0x4b0baf,_0x18a1f4,_0x5daa70){return _0x304c30(_0x5239df-_0xce008a._0x1bca25,_0x5239df,_0x18a1f4-_0xce008a._0x49a73c,_0x4b0baf-0x1d1);}const _0x2526a9=Promise[_0x4343c4(0x333,_0xdb5bb._0x13997e,0x395,0x35a)]()[_0x4343c4(0x330,_0xdb5bb._0x39c3bd,_0xdb5bb._0xe25d32,0x34d)](()=>_0x599f19(_0x24523a,_0x25e46a));if(!_0x25e46a[_0x17d061(0x342,_0xdb5bb._0x4b48ac,_0xdb5bb._0x39aa85,_0xdb5bb._0x13d5a7)]){const _0x565246=await _0x2526a9;return isDispatchDecision(_0x565246)?_0x565246:{'action':_0x17d061(_0xdb5bb._0x4935b8,0x314,0x32f,_0xdb5bb._0x2bf545)};}const _0x57cf97=new Promise((_0x5e4eb2,_0x50177c)=>{const _0x470fc9={_0x12b080:0x4,_0xd41fc0:0x1,_0x45cf5e:0x45,_0x46b4c6:0x10,_0x5cf07e:0xd,_0x18c819:0x19f,_0x2c3361:0x17d,_0x5d173:0x199,_0xbd782f:0x167,_0xa2353e:0x48,_0x1d3592:0x5a},_0x5dbaa6={_0x4a0ce5:0x174};function _0x2ed578(_0x509185,_0x49b942,_0x16e255,_0x25709e){return _0x4343c4(_0x509185-_0x5dbaa6._0x4a0ce5,_0x49b942-0x1c8,_0x16e255,_0x49b942- -0x495);}function _0x260c7b(_0x2d3e7a,_0x2697ac,_0x523247,_0x31f5d2){return _0x4343c4(_0x2d3e7a-_0x2db5c4._0x4653a4,_0x2697ac-_0x2db5c4._0x5ea435,_0x31f5d2,_0x2d3e7a-0x6);}const _0x788c5f=()=>{const _0x9f7fde={_0x4fd859:0x1a0},_0x401f60={_0x2d6f99:0x1d};function _0x4fa1ed(_0xdde60c,_0x473649,_0x501dfc,_0x462eda){return _0x593e(_0x473649- -_0x401f60._0x2d6f99,_0xdde60c);}function _0x277f6b(_0xf45115,_0x417069,_0x383882,_0x5d8684){return _0x593e(_0x383882- -_0x9f7fde._0x4fd859,_0x417069);}_0x25e46a['signal']?.[_0x277f6b(-_0x470fc9._0x12b080,-_0x470fc9._0xd41fc0,-_0x470fc9._0x45cf5e,-0x4b)](_0x277f6b(-0x46,0x36,-_0x470fc9._0x46b4c6,-_0x470fc9._0x5cf07e),_0x788c5f),_0x50177c(toAbortError(_0x25e46a[_0x4fa1ed(_0x470fc9._0x18c819,_0x470fc9._0x2c3361,_0x470fc9._0x5d173,_0x470fc9._0xbd782f)]?.[_0x277f6b(-_0x470fc9._0xa2353e,-0x16,-_0x470fc9._0x1d3592,-0x39)]));};if(_0x25e46a['signal']?.['aborted']){_0x50177c(toAbortError(_0x25e46a['signal'][_0x260c7b(0x327,0x2dc,_0x3827bf._0x54b561,0x309)]));return;}_0x25e46a[_0x2ed578(-0x14d,-_0x3827bf._0x481bcc,-_0x3827bf._0x302839,-_0x3827bf._0x4162d6)]?.[_0x260c7b(_0x3827bf._0x4d5a10,_0x3827bf._0x237d62,_0x3827bf._0x43bd74,0x34a)](_0x2ed578(-_0x3827bf._0x2cd88f,-0x12a,-_0x3827bf._0x25c28a,-_0x3827bf._0x1cbf4c),_0x788c5f,{'once':!![]});}),_0x28eee0=await Promise[_0x17d061(0x323,_0xdb5bb._0x464458,_0xdb5bb._0x12608d,0x2c1)]([_0x2526a9,_0x57cf97]);function _0x4343c4(_0x44518b,_0x13cf18,_0xb4819b,_0x3c3521){return _0x304c30(_0x44518b-_0x2d5800._0x3a1952,_0xb4819b,_0xb4819b-_0x2d5800._0x20bbc5,_0x3c3521-_0x2d5800._0x492ce5);}return isDispatchDecision(_0x28eee0)?_0x28eee0:{'action':_0x17d061(_0xdb5bb._0x13f937,_0xdb5bb._0x45ccee,_0xdb5bb._0x25cd56,_0xdb5bb._0x458bb3)};}async function executeToolCall(_0x447e95,_0x16ede9,_0x1c9e2b,_0x2d41ee,_0x3ff600){const _0x396aaf={_0x532d22:0x20c,_0x3b7939:0x210,_0x149884:0x22e,_0x4d3173:0x20c,_0x321e04:0x22f,_0x990490:0x242,_0x3c8584:0x229,_0x21f71d:0x1d6,_0x2063c1:0x1c4,_0x2e1484:0x201,_0x51ebfe:0x199,_0x162958:0x1a6,_0x145f9b:0x1c6,_0x15f07d:0x1bd,_0x61e1fb:0x4fa,_0x842484:0x4ba,_0x2987a5:0x47c,_0x3c93fb:0x52a,_0x3b6905:0x529,_0x48284a:0x548,_0x83590f:0x52a,_0x3faa3c:0x535,_0x1eedef:0x547,_0x45cd90:0x50b,_0x4460a7:0x243,_0x21d703:0x228,_0x1eba19:0x51b,_0x2a77ee:0x4ae,_0x23afcb:0x4ed,_0x35a803:0x4f6,_0x447420:0x56a,_0x48f9e7:0x534,_0x9695f:0x47b,_0x231490:0x464,_0x1c0357:0x479,_0x158a4e:0x20c,_0x4aa40e:0x254,_0x3de458:0x1ca,_0x47a779:0x218,_0x409f49:0x1dc,_0x596137:0x182,_0x5b3b1d:0x1af,_0x5c4907:0x20c,_0xeb27a7:0x1f9,_0x12199d:0x1f4,_0x5c87f3:0x4ba,_0x415953:0x4bb,_0x3c97a7:0x499,_0x96b201:0x471,_0x1df1d7:0x1d8,_0x55ea64:0x197,_0x4997d2:0x1b2,_0x5f1d29:0x20b,_0x31dc27:0x1e8,_0x52cca4:0x235,_0xd7ea94:0x50d,_0x149dcb:0x4fc},_0x4f1ff9={_0x56e71b:0x3ff},_0x4f3f53={_0x3c3188:0xa8,_0x25f20f:0x1d5,_0x71798c:0x1d3},_0x55363e={_0x406411:0x114,_0x30af82:0x89},_0x1ded22={_0x40d502:0x13,_0x1e7cfd:0x92},_0xf95092={_0xe04de8:0x13e,_0xe6b3bc:0x1be},_0x551db7={..._0x1c9e2b,'toolCallId':_0x16ede9['id']};function _0x3fc0d4(_0x5669e1,_0x588fe9,_0x4d29e8,_0x5eb551){return _0x31a615(_0x4d29e8-0x707,_0x588fe9-_0xf95092._0xe04de8,_0x5eb551,_0x5eb551-_0xf95092._0xe6b3bc);}throwIfAborted(_0x551db7[_0x4de54d(_0x396aaf._0x532d22,_0x396aaf._0x3b7939,0x1d1,_0x396aaf._0x149884)]);const _0x34fbc4=await resolveDispatchDecision(_0x2d41ee,_0x16ede9,_0x551db7);function _0x4de54d(_0x1f2b73,_0x4be842,_0x2ac0aa,_0x2a55bf){return _0x304c30(_0x1f2b73-0xcb,_0x2a55bf,_0x2ac0aa-_0x1ded22._0x40d502,_0x1f2b73-_0x1ded22._0x1e7cfd);}throwIfAborted(_0x551db7[_0x4de54d(_0x396aaf._0x4d3173,_0x396aaf._0x321e04,0x22c,_0x396aaf._0x990490)]);if(_0x34fbc4[_0x4de54d(0x1f7,_0x396aaf._0x3c8584,0x229,_0x396aaf._0x21f71d)]===_0x4de54d(0x1f3,0x1c6,_0x396aaf._0x2063c1,_0x396aaf._0x2e1484)){const _0x277828=createRejectedToolResult(_0x16ede9,_0x34fbc4[_0x4de54d(0x1b8,0x1e4,_0x396aaf._0x51ebfe,_0x396aaf._0x162958)]);return await emitEvent(_0x3ff600,{'type':_0x4de54d(0x198,_0x396aaf._0x145f9b,0x1be,_0x396aaf._0x15f07d),'toolCall':_0x16ede9,'result':_0x277828},_0x551db7),_0x277828;}const _0x2053c9=_0x447e95[_0x3fc0d4(_0x396aaf._0x61e1fb,_0x396aaf._0x842484,0x4b4,_0x396aaf._0x2987a5)](_0x16ede9['name']);if(!_0x2053c9){const _0x548167=createUnknownToolResult(_0x16ede9);return await emitEvent(_0x3ff600,{'type':_0x3fc0d4(0x505,_0x396aaf._0x3c93fb,_0x396aaf._0x3b6905,0x51c),'toolCall':_0x16ede9,'result':_0x548167},_0x551db7),_0x548167;}throwIfAborted(_0x551db7[_0x3fc0d4(_0x396aaf._0x48284a,0x4fc,_0x396aaf._0x83590f,0x531)]),await emitEvent(_0x3ff600,{'type':_0x3fc0d4(_0x396aaf._0x3faa3c,_0x396aaf._0x1eedef,_0x396aaf._0x45cd90,0x50f),'toolCall':_0x16ede9},_0x551db7);try{throwIfAborted(_0x551db7[_0x4de54d(0x20c,_0x396aaf._0x4460a7,_0x396aaf._0x21d703,0x1fc)]);const _0x27b453=validateToolInput(_0x16ede9[_0x3fc0d4(_0x396aaf._0x1eba19,_0x396aaf._0x2a77ee,_0x396aaf._0x23afcb,_0x396aaf._0x35a803)],_0x2053c9[_0x3fc0d4(0x4e8,_0x396aaf._0x447420,0x52c,_0x396aaf._0x48f9e7)]),_0x34996b=await _0x2053c9[_0x4de54d(0x1da,0x1e5,0x1e6,0x1c1)](_0x27b453,_0x551db7),_0x15a07d=[],_0x33abeb=addAbortListener(_0x551db7['signal'],()=>{function _0x38e4d7(_0x44ab32,_0x1e4334,_0xac6821,_0x136b2c){return _0x4de54d(_0x136b2c-0x284,_0x1e4334-_0x55363e._0x406411,_0xac6821-_0x55363e._0x30af82,_0x1e4334);}function _0x69a0a3(_0x55f893,_0x545bd4,_0x44825e,_0xf27d30){return _0x4de54d(_0x44825e- -_0x4f3f53._0x3c3188,_0x545bd4-_0x4f3f53._0x25f20f,_0x44825e-_0x4f3f53._0x71798c,_0x55f893);}void _0x34996b[_0x38e4d7(0x3df,_0x4f1ff9._0x56e71b,0x41b,0x416)](void 0x0)[_0x38e4d7(0x468,0x437,0x43b,0x422)](()=>{});});try{throwIfAborted(_0x551db7['signal']);let _0x5370e9=await _0x34996b['next']();while(!_0x5370e9[_0x3fc0d4(_0x396aaf._0x9695f,_0x396aaf._0x231490,0x4aa,_0x396aaf._0x1c0357)]){throwIfAborted(_0x551db7[_0x4de54d(_0x396aaf._0x158a4e,0x1d3,_0x396aaf._0x4aa40e,0x1c0)]);const _0x4e06f8=normalizeToolOutputValue(_0x5370e9[_0x4de54d(0x1d8,_0x396aaf._0x3de458,_0x396aaf._0x47a779,0x1eb)]);_0x15a07d[_0x4de54d(_0x396aaf._0x3de458,0x196,_0x396aaf._0x409f49,_0x396aaf._0x596137)](_0x4e06f8),await emitEvent(_0x3ff600,{'type':_0x4de54d(0x1b2,_0x396aaf._0x5b3b1d,0x1ff,0x1b0),'toolCall':_0x16ede9,'chunk':_0x4e06f8},_0x551db7),throwIfAborted(_0x551db7[_0x4de54d(_0x396aaf._0x5c4907,0x206,_0x396aaf._0xeb27a7,_0x396aaf._0x12199d)]),_0x5370e9=await _0x34996b[_0x3fc0d4(_0x396aaf._0x5c87f3,_0x396aaf._0x415953,_0x396aaf._0x3c97a7,_0x396aaf._0x96b201)]();}throwIfAborted(_0x551db7['signal']);const _0x41691f=_0x5370e9['value']===void 0x0?deriveFinalToolOutput(_0x15a07d):normalizeToolOutputValue(_0x5370e9[_0x4de54d(_0x396aaf._0x1df1d7,0x1c7,_0x396aaf._0x55ea64,_0x396aaf._0x4997d2)]),_0x226acf=createSuccessToolResult(_0x16ede9,_0x41691f,_0x15a07d);return await emitEvent(_0x3ff600,{'type':_0x4de54d(_0x396aaf._0x5f1d29,0x1c3,0x1ec,_0x396aaf._0x31dc27),'toolCall':_0x16ede9,'result':_0x226acf},_0x551db7),_0x226acf;}catch(_0x4a788a){if(isAbortError(_0x4a788a)){const _0x4ca72d=createAbortedToolResult(_0x16ede9,_0x4a788a,_0x15a07d);return await emitEvent(_0x3ff600,{'type':'tool_completed','toolCall':_0x16ede9,'result':_0x4ca72d},_0x551db7),_0x4ca72d;}const {errorMessage:_0x459c0c,structured:_0xa4c077}=normalizeExecutionError(_0x4a788a),_0xb18885=createErrorToolResult(_0x16ede9,_0x459c0c,_0xa4c077,_0x15a07d);return await emitEvent(_0x3ff600,{'type':_0x4de54d(0x20b,0x237,0x1f0,_0x396aaf._0x52cca4),'toolCall':_0x16ede9,'result':_0xb18885},_0x551db7),_0xb18885;}finally{_0x33abeb();}}catch(_0x2df330){if(isAbortError(_0x2df330)){const _0x3cf427=createAbortedToolResult(_0x16ede9,_0x2df330);return await emitEvent(_0x3ff600,{'type':_0x3fc0d4(0x4ec,_0x396aaf._0xd7ea94,0x529,_0x396aaf._0x149dcb),'toolCall':_0x16ede9,'result':_0x3cf427},_0x551db7),_0x3cf427;}const {errorMessage:_0x14faad,structured:_0x4b0000}=normalizeExecutionError(_0x2df330),_0x127c73=createErrorToolResult(_0x16ede9,_0x14faad,_0x4b0000);return await emitEvent(_0x3ff600,{'type':'tool_completed','toolCall':_0x16ede9,'result':_0x127c73},_0x551db7),_0x127c73;}}function createInternalToolRuntime(_0x460901=[],_0x5cb3dd={}){const _0x9d5dda={_0x34b681:0x21d,_0x1a68cf:0x22e},_0x4f639f={_0x324ccf:0x1f6,_0x15f934:0x20a,_0x346a70:0x205,_0x166005:0x200,_0x231c8f:0x22d},_0x50d8cc={_0x48d2ec:0x113,_0xe56a4a:0x15f,_0x570f86:0x18c},_0x129b96={_0x70f550:0x2b3},_0x34729f={_0x38a94a:0x133,_0x4372eb:0xf5,_0x517044:0x179,_0x258a65:0x106};let _0x50189e=new ToolRegistry(_0x460901);return{'listToolSchemas'(){function _0xc344d2(_0x461d60,_0xaf825c,_0x44783d,_0xaf7ba9){return _0x593e(_0x461d60- -0x284,_0xaf825c);}return _0x50189e[_0xc344d2(-_0x34729f._0x38a94a,-_0x34729f._0x4372eb,-_0x34729f._0x517044,-_0x34729f._0x258a65)]();},'setTools'(_0x1d7e54){_0x50189e=new ToolRegistry(_0x1d7e54);},async 'executeCalls'(_0x10b57c,_0x1583a8){const _0x4d9ae3={_0x11bd63:0x1d4},_0x4df333={_0x1f7b42:0x26c,_0x26e0a7:0x14b,_0x3dac43:0xd7};function _0x14a0eb(_0x39060b,_0x49c8dc,_0x42d5f8,_0x37c746){return _0x593e(_0x49c8dc-_0x129b96._0x70f550,_0x39060b);}function _0x3d07e1(_0x67bdbd,_0x3a397f,_0x22921c,_0x2ebf92){return _0x593e(_0x2ebf92-0xcc,_0x67bdbd);}return await Promise[_0x3d07e1(_0x4f639f._0x324ccf,0x217,_0x4f639f._0x15f934,0x221)](_0x10b57c[_0x3d07e1(_0x4f639f._0x346a70,0x202,_0x4f639f._0x166005,_0x4f639f._0x231c8f)](async _0x1c5d43=>{function _0x1dbcad(_0x56b805,_0x1a6a3b,_0xe1abb6,_0x4b4966){return _0x14a0eb(_0x1a6a3b,_0x4b4966- -_0x4df333._0x1f7b42,_0xe1abb6-_0x4df333._0x26e0a7,_0x4b4966-_0x4df333._0x3dac43);}function _0x1a6768(_0x4b8f8d,_0x2e6840,_0x3b2d8a,_0x1fc1f3){return _0x14a0eb(_0x4b8f8d,_0x1fc1f3- -0x3dc,_0x3b2d8a-_0x4d9ae3._0x11bd63,_0x1fc1f3-0x85);}return await executeToolCall(_0x50189e,_0x1c5d43,_0x1583a8,_0x5cb3dd[_0x1dbcad(0x19e,0x175,_0x50d8cc._0x48d2ec,_0x50d8cc._0xe56a4a)],_0x5cb3dd[_0x1dbcad(0x1d2,_0x50d8cc._0x570f86,0x223,0x1d8)]);}));},async 'execute'(_0x10e76a,_0x5ebc8f){const _0x21f778={_0x22919d:0xe1},[_0x3f36d6]=await this[_0x5d8c34(0x233,0x20a,_0x9d5dda._0x34b681,_0x9d5dda._0x1a68cf)]([_0x10e76a],_0x5ebc8f);function _0x5d8c34(_0x447f5f,_0x188f49,_0x4fc386,_0x2700e3){return _0x593e(_0x2700e3-_0x21f778._0x22919d,_0x447f5f);}return _0x3f36d6;}};}function getOrderedObserverExtensions(_0x5db757,_0x33d302){const _0x482843={_0x21f9fd:0x141,_0x6b2b83:0x11a,_0x5c622d:0x11d},_0x52a8e8={_0x231eda:0x1be,_0x590a9e:0x184,_0x28b5d9:0x1ae,_0x389760:0x188,_0x3ff897:0x17e,_0x3a3e9a:0x157,_0x1f8565:0x17d,_0x383c99:0x1b9},_0xab4bc8={_0x5611be:0x385},_0x568e93={_0x2c029b:0x13b,_0x320713:0x381};function _0x3778fe(_0x1f01af,_0x142057,_0x1e643f,_0x19140a){return _0x304c30(_0x1f01af-_0x568e93._0x2c029b,_0x19140a,_0x1e643f-0x13,_0x142057- -_0x568e93._0x320713);}function _0x31ebfe(_0x20ddb6,_0x16ca06,_0x130ee3,_0x292c5e){return _0x31a615(_0x20ddb6-_0xab4bc8._0x5611be,_0x16ca06-0x15a,_0x292c5e,_0x292c5e-0x5f);}return _0x5db757['filter'](_0x523d35=>{const _0x26a503={_0xd19a00:0x30b};function _0x2244a7(_0x5436d4,_0x52d628,_0x19293a,_0x14e606){return _0x593e(_0x5436d4- -_0x26a503._0xd19a00,_0x14e606);}function _0x436b3e(_0xc914fe,_0x488c91,_0x1474be,_0x2700da){return _0x593e(_0x488c91- -0x155,_0x1474be);}return _0x523d35[_0x2244a7(-0x17d,-_0x52a8e8._0x231eda,-0x167,-0x151)]!==![]&&_0x523d35['stage']===_0x33d302&&_0x523d35[_0x2244a7(-_0x52a8e8._0x590a9e,-_0x52a8e8._0x28b5d9,-0x143,-_0x52a8e8._0x389760)]===_0x2244a7(-_0x52a8e8._0x3ff897,-_0x52a8e8._0x3a3e9a,-_0x52a8e8._0x1f8565,-_0x52a8e8._0x383c99);})[_0x31ebfe(0x147,_0x482843._0x21f9fd,_0x482843._0x6b2b83,_0x482843._0x5c622d)]((_0x3632ed,_0x5c3379)=>_0x3632ed[_0x3778fe(-0x235,-0x255,-0x25e,-0x258)]-_0x5c3379[_0x3778fe(-0x2a3,-0x255,-0x20c,-0x228)]);}function getOrderedTransformerExtensions(_0x4da3d9,_0x11c815){const _0x3519a8={_0x2c1a77:0x12d,_0x4841e4:0x465},_0x405b6c={_0x36fceb:0x1e0,_0x46daee:0x204,_0x59906f:0x298,_0x35a9f7:0x24a,_0x4e411a:0x202,_0x14242e:0x24c},_0x492f76={_0x55fee7:0x6b7,_0x1111b7:0x1d6,_0x55e724:0x1a},_0x2ef732={_0x103444:0x70};function _0x298d21(_0x12f220,_0x269d62,_0x55214c,_0x1e2166){return _0x31a615(_0x55214c-0x330,_0x269d62-0x2d,_0x1e2166,_0x1e2166-_0x2ef732._0x103444);}function _0x2740be(_0x16d2ca,_0x56e9fa,_0x265bd8,_0x56f186){return _0x31a615(_0x56e9fa-_0x492f76._0x55fee7,_0x56e9fa-_0x492f76._0x1111b7,_0x16d2ca,_0x56f186-_0x492f76._0x55e724);}return _0x4da3d9[_0x298d21(0xe4,0xe2,0x12c,_0x3519a8._0x2c1a77)](_0x2fc821=>{const _0x48157c={_0x3e1038:0x1cb,_0x422ace:0x169};function _0x52bddb(_0x49cdf5,_0xf58623,_0x5b3827,_0x4dee0d){return _0x298d21(_0x49cdf5-0x184,_0xf58623-0x1eb,_0x5b3827-0x12d,_0x49cdf5);}function _0x467b1f(_0x1556f4,_0x563a1c,_0x4b8996,_0x46f8d4){return _0x298d21(_0x1556f4-_0x48157c._0x3e1038,_0x563a1c-_0x48157c._0x422ace,_0x1556f4-0xf5,_0x563a1c);}return _0x2fc821['enabled']!==![]&&_0x2fc821[_0x467b1f(_0x405b6c._0x36fceb,_0x405b6c._0x46daee,0x203,0x217)]===_0x11c815&&_0x2fc821[_0x52bddb(0x275,_0x405b6c._0x59906f,0x26d,_0x405b6c._0x35a9f7)]===_0x467b1f(0x201,_0x405b6c._0x4e411a,0x1ea,_0x405b6c._0x14242e);})[_0x2740be(0x46c,0x479,0x46e,_0x3519a8._0x4841e4)]((_0x1fbdca,_0x475fde)=>_0x1fbdca[_0x2740be(0x4b9,0x48c,0x4d0,0x4b1)]-_0x475fde['order']);}function createExtensionRegistry(){const _0x31221d={_0x319722:0xae,_0x25f27d:0xde},_0x3b3a6b={_0x2c1791:0x236},_0x5cc839={_0x1288db:0x185,_0x4598d3:0x1c5},_0x4e1f01={_0x4aa5cb:0x459,_0x169eeb:0x487},_0x29384e=[];return{'register'(_0x57b04d){const _0x3f207e={_0x1c0fc2:0x32f};function _0x22e0d3(_0x458e63,_0x426cc8,_0x5534a3,_0x268370){return _0x593e(_0x5534a3-_0x3f207e._0x1c0fc2,_0x458e63);}_0x29384e[_0x22e0d3(0x453,_0x4e1f01._0x4aa5cb,_0x4e1f01._0x169eeb,0x4ae)](_0x57b04d);},async 'runTransformers'(_0x5158e2,_0x3e85d4,_0x34f2f0){let _0xf573fb=_0x3e85d4;for(const _0x5bfd7a of getOrderedTransformerExtensions(_0x29384e,_0x5158e2)){_0xf573fb=await _0x5bfd7a[_0x37bf1c(-_0x5cc839._0x1288db,-_0x5cc839._0x4598d3,-0x168,-0x1a5)](_0xf573fb,_0x34f2f0);}function _0x37bf1c(_0x19e180,_0x1e5923,_0x1f65e9,_0x1e8a67){return _0x593e(_0x19e180- -0x2e8,_0x1e8a67);}return _0xf573fb;},async 'runObservers'(_0x357fce,_0xd6eb4d,_0x226963){function _0x5a75f7(_0x265081,_0x321075,_0xdee9d2,_0x4bcd05){return _0x593e(_0x321075- -_0x3b3a6b._0x2c1791,_0x4bcd05);}for(const _0x1cea95 of getOrderedObserverExtensions(_0x29384e,_0x357fce)){await _0x1cea95[_0x5a75f7(-_0x31221d._0x319722,-0xd3,-0xb2,-_0x31221d._0x25f27d)](_0xd6eb4d,_0x226963);}}};}function makeExtensionContext(_0x1fad27){return{'state':_0x1fad27};}async function runStage(_0x950340,_0x2a434f,_0x3d8e4b,_0x40a992){const _0x30dc4c={_0x5c02b8:0xb0,_0x21f6b8:0x57,_0x205f61:0x96,_0x44e25a:0x2dc,_0x4a1eb5:0x2e7};function _0x3c154c(_0x75db38,_0x442ce0,_0x789dcd,_0x3fea94){return _0x31a615(_0x789dcd-0x2f4,_0x442ce0-0x33,_0x3fea94,_0x3fea94-0x1b8);}const _0x473479=await _0x950340[_0x3c154c(_0x30dc4c._0x5c02b8,_0x30dc4c._0x21f6b8,_0x30dc4c._0x205f61,0x50)](_0x2a434f,_0x3d8e4b,_0x40a992);await _0x950340[_0x472c37(0x313,_0x30dc4c._0x44e25a,0x301,_0x30dc4c._0x4a1eb5)](_0x2a434f,_0x473479,_0x40a992);function _0x472c37(_0x5c50a2,_0x5e58e2,_0x509da2,_0x2b6245){return _0x31a615(_0x509da2-0x4ff,_0x5e58e2-0xa9,_0x2b6245,_0x2b6245-0x123);}return _0x473479;}async function emitEvent2(_0x496269,_0x52e127,_0x4bdfca){await _0x496269?.(_0x52e127,_0x4bdfca);}function replaceToolUseBlocks(_0x12f18b,_0x11d23a){const _0x339baa={_0x564f2a:0x356,_0x1f0901:0x374},_0x392552={_0x59e003:0x232};let _0x41b985=0x0;return{..._0x12f18b,'content':_0x12f18b['content']['map'](_0x105945=>{function _0x474476(_0x2a482f,_0x482d27,_0x4d8ca5,_0x3e661c){return _0x593e(_0x482d27-_0x392552._0x59e003,_0x3e661c);}if(_0x105945['type']!==_0x474476(0x335,0x344,_0x339baa._0x564f2a,_0x339baa._0x1f0901))return _0x105945;const _0x199462=_0x11d23a[_0x41b985];return _0x41b985+=0x1,structuredClone(_0x199462);})};}function _0x31a615(_0x53e982,_0x2480ef,_0x379a2b,_0x55a4a8){return _0x593e(_0x53e982- -0x377,_0x379a2b);}function createAssistantMessageId(_0x5ca458,_0x166e1e){const _0xe93567={_0x1a16c2:0x43},_0x2d741c={_0x4e7187:0x20d};function _0x2a72ba(_0x52e85b,_0xd1987e,_0x11509b,_0x4ff885){return _0x31a615(_0xd1987e-_0x2d741c._0x4e7187,_0xd1987e-0x168,_0x4ff885,_0x4ff885-0xea);}return _0x5ca458+_0x2a72ba(_0xe93567._0x1a16c2,0x2a,0x4f,-0xb)+_0x166e1e;}function createReasoningMessageId(_0x680bcf){const _0x4306b9={_0x2461f6:0x22c,_0x2ec690:0x21e},_0x26d787={_0x23e833:0x49,_0x3560a3:0x14,_0x10c1be:0x12e};function _0x239f13(_0x58707d,_0x46886d,_0x43c3b0,_0x452ce8){return _0x304c30(_0x58707d-_0x26d787._0x23e833,_0x43c3b0,_0x43c3b0-_0x26d787._0x3560a3,_0x46886d-_0x26d787._0x10c1be);}return _0x680bcf+_0x239f13(_0x4306b9._0x2461f6,_0x4306b9._0x2ec690,0x25d,0x259);}function withMessageId(_0x9deca8,_0x25dbad){if(_0x9deca8['id']===_0x25dbad)return _0x9deca8;return{..._0x9deca8,'id':_0x25dbad};}function createAssistantChunkEvent(_0x2fd750,_0x14830a){const _0x3ac9aa={_0x175239:0x15b,_0x58f1d0:0xf7,_0x425dc0:0x143,_0x59c861:0x126,_0x1488f3:0x156,_0x2f8389:0x14a,_0x133b3e:0x174,_0x108402:0x146,_0x143c8b:0xf5,_0x19f9be:0x10c,_0x120626:0x10a},_0x27496a={_0x378569:0x32a,_0x5098bb:0x1e},_0x35bfff={_0x39e219:0x3,_0x5a4e0b:0x11,_0x340850:0x2a9};if(_0x2fd750['type']!=='content_delta')return void 0x0;function _0x2cc6dd(_0x375cfd,_0x203fb1,_0x3105a2,_0xf64cd2){return _0x304c30(_0x375cfd-_0x35bfff._0x39e219,_0x203fb1,_0x3105a2-_0x35bfff._0x5a4e0b,_0xf64cd2- -_0x35bfff._0x340850);}function _0x1fe13c(_0x5e9658,_0x45cbd9,_0x2e91dc,_0x19147b){return _0x31a615(_0x5e9658-_0x27496a._0x378569,_0x45cbd9-_0x27496a._0x5098bb,_0x2e91dc,_0x19147b-0x177);}if(_0x2fd750[_0x2cc6dd(-_0x3ac9aa._0x175239,-_0x3ac9aa._0x58f1d0,-0x101,-_0x3ac9aa._0x425dc0)]===void 0x0)return void 0x0;return{'type':_0x1fe13c(0x149,0x111,0x156,_0x3ac9aa._0x59c861),'index':_0x2fd750[_0x2cc6dd(-_0x3ac9aa._0x1488f3,-_0x3ac9aa._0x2f8389,-_0x3ac9aa._0x133b3e,-_0x3ac9aa._0x108402)]??0x0,'messageId':_0x14830a,'chunk':{'type':_0x1fe13c(_0x3ac9aa._0x143c8b,0x120,_0x3ac9aa._0x19f9be,_0x3ac9aa._0x120626),'index':_0x2fd750[_0x2cc6dd(-0x13d,-0x155,-0x11e,-0x146)]??0x0,'text':_0x2fd750['text']}};}function createToolUseChunkEvent(_0x2dd57e,_0x960a69){const _0x39d5bd={_0x489860:0x19c,_0x348660:0x59,_0x5c8b2d:0x82,_0x50bb34:0x71,_0x580fd7:0x4a,_0x3a9226:0x6e,_0x168919:0x78,_0x421589:0x123,_0x51e0e6:0x19a,_0x791439:0x18b,_0x4fa50a:0x1a,_0x5aa951:0x43,_0x4b54e0:0x27,_0x365f45:0x141,_0x809460:0x4c,_0x2ff9de:0x18c,_0x4aa426:0x17c,_0x1273f5:0x123},_0x523355={_0x5451cc:0xd2,_0x4c569d:0xfb},_0x7e505b={_0x5cd403:0x6,_0x2507cb:0x3f};function _0x241420(_0x161794,_0x56f9bc,_0x2dca60,_0x3a3065){return _0x31a615(_0x3a3065-0x1ad,_0x56f9bc-_0x7e505b._0x5cd403,_0x2dca60,_0x3a3065-_0x7e505b._0x2507cb);}function _0x42d72a(_0x2893a3,_0x51e7de,_0x32fbcc,_0x115e17){return _0x31a615(_0x51e7de-_0x523355._0x5451cc,_0x51e7de-0xe8,_0x115e17,_0x115e17-_0x523355._0x4c569d);}if(_0x2dd57e[_0x42d72a(-0x16e,-0x182,-_0x39d5bd._0x489860,-0x1aa)]!==_0x241420(-_0x39d5bd._0x348660,-0x30,-_0x39d5bd._0x5c8b2d,-_0x39d5bd._0x50bb34))return void 0x0;return{'type':_0x241420(-0x47,-_0x39d5bd._0x580fd7,-_0x39d5bd._0x3a9226,-_0x39d5bd._0x168919),'index':_0x2dd57e['index']??0x0,'messageId':_0x960a69,'chunk':{'type':_0x42d72a(-_0x39d5bd._0x421589,-0x14c,-_0x39d5bd._0x51e0e6,-_0x39d5bd._0x791439),'id':_0x2dd57e['id']??'','index':_0x2dd57e[_0x241420(-_0x39d5bd._0x4fa50a,-_0x39d5bd._0x5aa951,-_0x39d5bd._0x4b54e0,-0x47)]??0x0,..._0x2dd57e[_0x42d72a(-0x117,-_0x39d5bd._0x365f45,-0x12a,-0x140)]!==void 0x0?{'name':_0x2dd57e[_0x241420(-0x52,-_0x39d5bd._0x809460,-0x22,-0x66)]}:{},..._0x2dd57e[_0x42d72a(-_0x39d5bd._0x2ff9de,-0x166,-0x118,-0x168)]!==void 0x0?{'inputDelta':_0x2dd57e[_0x42d72a(-_0x39d5bd._0x4aa426,-0x166,-_0x39d5bd._0x1273f5,-0x17e)]}:{}}};}function _0x304c30(_0x6bbeab,_0x20fee2,_0x4ddb65,_0x4a607e){return _0x593e(_0x4a607e- -0x20,_0x20fee2);}function resolveReasoningEventIndex(_0x3057f7){const _0x1f36a5={_0x2f4b61:0x2a4,_0x453c6a:0x32e,_0x3e3c79:0x319,_0x159d0e:0x2bb,_0x3bb40f:0x2e8,_0x116c69:0x2e9,_0x22417d:0x2ec},_0x33bdf6={_0x15d5d:0x81},_0x338dea={_0x502a72:0x527,_0x208697:0x10b};function _0x1798a7(_0x18e6fd,_0x1a67e8,_0xeb0b40,_0x32d82c){return _0x31a615(_0x1a67e8-_0x338dea._0x502a72,_0x1a67e8-_0x338dea._0x208697,_0x18e6fd,_0x32d82c-0x13f);}function _0x14fa51(_0x59cef3,_0x5a6c3c,_0x36aa89,_0x1c1435){return _0x31a615(_0x5a6c3c-0x492,_0x5a6c3c-_0x33bdf6._0x15d5d,_0x36aa89,_0x1c1435-0x17d);}return _0x3057f7[_0x14fa51(0x2a8,0x29e,_0x1f36a5._0x2f4b61,0x298)]??_0x3057f7[_0x1798a7(_0x1f36a5._0x453c6a,0x33c,_0x1f36a5._0x3e3c79,0x354)]??_0x3057f7[_0x1798a7(_0x1f36a5._0x159d0e,_0x1f36a5._0x3bb40f,_0x1f36a5._0x116c69,0x2b2)]??_0x3057f7[_0x1798a7(_0x1f36a5._0x22417d,0x32d,0x368,0x31a)]??0x0;}function createReasoningChunkEvent(_0x452272,_0x295a16){const _0x1e9b1e={_0x14b861:0x480,_0x5cb273:0x46f,_0x1b2a8d:0x12,_0x59992f:0x4a,_0x57c36b:0xd,_0x2375a4:0x5,_0x287528:0x18,_0x24d905:0x29,_0x394e3c:0x470,_0x4d1a5f:0x8a,_0xc84eb7:0xb8,_0x58b0fe:0x3d,_0xf9ccd0:0x488,_0x390381:0x455,_0x118736:0x45c,_0x43a9b4:0x46d,_0xe20fe1:0x451,_0x5a59b5:0x45,_0x5104d9:0x3a,_0x57ba0f:0x5f,_0x1a6958:0x435,_0x5de0ad:0x455,_0x561bba:0x442,_0xe8088f:0x469},_0x36cc98={_0x2ff82a:0x1eb,_0x585591:0x141,_0x29f798:0xb7},_0x219801={_0x33ca04:0xd,_0x196746:0x3a};function _0x778da(_0x3d80c6,_0x154ba7,_0x4176bf,_0x35af73){return _0x304c30(_0x3d80c6-_0x219801._0x33ca04,_0x4176bf,_0x4176bf-_0x219801._0x196746,_0x154ba7-0x338);}function _0x5ee823(_0x17741b,_0x9186f3,_0xf2345b,_0x29e0cf){return _0x31a615(_0x9186f3-_0x36cc98._0x2ff82a,_0x9186f3-_0x36cc98._0x585591,_0x17741b,_0x29e0cf-_0x36cc98._0x29f798);}switch(_0x452272[_0x778da(0x3f9,0x43b,_0x1e9b1e._0x14b861,_0x1e9b1e._0x5cb273)]){case'anthropic_thinking_delta':return{'type':_0x5ee823(-0x3d,-0x43,-_0x1e9b1e._0x1b2a8d,-_0x1e9b1e._0x59992f),'index':resolveReasoningEventIndex(_0x452272),'messageId':_0x295a16,'chunk':{'type':_0x5ee823(-0x10,-0x3d,-0x47,-0x47),'index':_0x452272[_0x5ee823(_0x1e9b1e._0x57c36b,-0x9,0xc,-0x22)]??0x0,'thinking':_0x452272[_0x5ee823(_0x1e9b1e._0x2375a4,-_0x1e9b1e._0x287528,_0x1e9b1e._0x24d905,-0x7)]??''},'text':_0x452272['thinking']??''};case'openai_reasoning_delta':return{'type':_0x778da(0x440,0x461,_0x1e9b1e._0x394e3c,0x47d),'index':resolveReasoningEventIndex(_0x452272),'messageId':_0x295a16,'chunk':{'type':_0x5ee823(-_0x1e9b1e._0x4d1a5f,-0x6a,-0x80,-_0x1e9b1e._0xc84eb7),'contentIndex':_0x452272[_0x5ee823(-_0x1e9b1e._0x58b0fe,0x0,-0x4c,0x43)]??0x0,'delta':_0x452272['delta']??'','itemId':_0x452272[_0x778da(_0x1e9b1e._0xf9ccd0,_0x1e9b1e._0x390381,_0x1e9b1e._0x118736,0x49c)]??'','outputIndex':_0x452272[_0x778da(_0x1e9b1e._0x43a9b4,0x495,_0x1e9b1e._0xe20fe1,0x4ae)]??0x0},'text':_0x452272[_0x5ee823(0x45,-0x3,_0x1e9b1e._0x5a59b5,-0x27)]??''};case _0x5ee823(-0x48,-0x3e,-_0x1e9b1e._0x5104d9,-_0x1e9b1e._0x57ba0f):return{'type':'reasoning_chunk','index':resolveReasoningEventIndex(_0x452272),'messageId':_0x295a16,'chunk':{'type':_0x5ee823(-0x8c,-0x3e,-0x7,-0x4e),'delta':_0x452272['delta']??'','itemId':_0x452272[_0x778da(_0x1e9b1e._0x1a6958,_0x1e9b1e._0x5de0ad,0x466,_0x1e9b1e._0x561bba)]??'','outputIndex':_0x452272[_0x5ee823(0x2a,-0xf,0x2c,0x37)]??0x0,'summaryIndex':_0x452272[_0x778da(0x487,0x450,_0x1e9b1e._0xe8088f,0x498)]??0x0},'text':_0x452272[_0x5ee823(-0xa,-0x3,0x0,-0x5)]??''};default:return void 0x0;}}function isAbortedToolResult(_0x3a32cb){const _0x35cbec={_0x576995:0x10,_0x13cb3e:0x1f9,_0x927148:0x246,_0x4379c9:0x1d7},_0x523341={_0x2a998c:0x10b,_0xc4c91f:0x182,_0x3841e8:0xb4},_0x336fa2={_0x1f075f:0x171,_0x504da0:0xc7,_0x49fbae:0x13c};function _0x24cc06(_0x204072,_0x4b9847,_0x3a0ffc,_0x5b7800){return _0x304c30(_0x204072-_0x336fa2._0x1f075f,_0x5b7800,_0x3a0ffc-_0x336fa2._0x504da0,_0x204072- -_0x336fa2._0x49fbae);}function _0x2b36b3(_0x252b22,_0x1b1810,_0x7ad33b,_0x545889){return _0x304c30(_0x252b22-_0x523341._0x2a998c,_0x545889,_0x7ad33b-_0x523341._0xc4c91f,_0x252b22-_0x523341._0x3841e8);}return _0x3a32cb[_0x2b36b3(0x1b9,0x17d,0x194,0x1c7)]==='error'&&_0x3a32cb[_0x24cc06(0x12,0x1a,-0x17,_0x35cbec._0x576995)][_0x2b36b3(_0x35cbec._0x13cb3e,_0x35cbec._0x927148,0x245,_0x35cbec._0x4379c9)]===!![];}async function executeModelRequest(_0x5d2ca6,_0x339355,_0x3c250b,_0xad1a2c,_0x48a395){const _0x29df43={_0x22db91:0x1a,_0x37f4ff:0x3ef,_0x58c876:0x3a7,_0x5ab3bd:0x3bd,_0x427241:0x98,_0x360d07:0x2f7,_0x8602ff:0x343,_0x448f66:0x332,_0x3ef23c:0x2f6,_0x57fd5a:0x304,_0x3636de:0x3aa,_0x47ba6c:0x3aa,_0x11dc54:0x98,_0x2896df:0xc0,_0x36f4dc:0x7e,_0x142c51:0xa6,_0x2c6f2c:0x1a,_0x56dbab:0x2f,_0x94eedb:0x28,_0x276a5c:0x10,_0x317129:0x3a1,_0x418c74:0xc5,_0x29cdad:0x8d,_0x15eaf8:0x3e,_0x51f9d7:0x1c,_0x3ce3e8:0x6f,_0x715fc4:0x89,_0x4a6d66:0x376,_0xe7a462:0x2ee,_0x5b261a:0x39e,_0x47eb09:0x358,_0x44850d:0x398,_0x233457:0x39b,_0x5e680b:0x35b,_0x1b1b06:0x37f,_0x1041f3:0x34e,_0x30d2c9:0x397,_0xd3a4cb:0x45,_0x59e5dc:0x6e,_0x538d7e:0x361,_0x22fcf9:0x3bf,_0xfbbd26:0x2fe,_0x1039b4:0x31e},_0x23be07={_0x52d77d:0x587,_0x44ec7c:0x111},_0x3bbcbd={_0x5da870:0x84};function _0x1c33e3(_0x249817,_0x58035d,_0x40776c,_0x3a4416){return _0x304c30(_0x249817-_0x3bbcbd._0x5da870,_0x3a4416,_0x40776c-0x146,_0x249817- -0x194);}throwIfAborted(_0x339355[_0x1c33e3(-_0x29df43._0x22db91,-0x1,0x19,-0x2f)]);function _0xad316f(_0x45d38e,_0x424a8e,_0x11e0b6,_0x5946ba){return _0x31a615(_0x424a8e-_0x23be07._0x52d77d,_0x424a8e-0x104,_0x45d38e,_0x5946ba-_0x23be07._0x44ec7c);}if(!_0x339355[_0xad316f(_0x29df43._0x37f4ff,_0x29df43._0x58c876,_0x29df43._0x5ab3bd,0x386)]||!_0x3c250b[_0x1c33e3(-_0x29df43._0x427241,-0x8a,-0x79,-0xb0)][_0xad316f(_0x29df43._0x360d07,_0x29df43._0x8602ff,_0x29df43._0x448f66,_0x29df43._0x3ef23c)])return await _0x3c250b['chatModel'][_0xad316f(_0x29df43._0x57fd5a,0x325,0x317,0x33b)](_0x5d2ca6,{'signal':_0x339355[_0xad316f(0x3d0,_0x29df43._0x3636de,_0x29df43._0x47ba6c,0x3b7)]});let _0x2a9c2a;for await(const _0xdd0e28 of _0x3c250b[_0x1c33e3(-_0x29df43._0x11dc54,-_0x29df43._0x2896df,-_0x29df43._0x36f4dc,-_0x29df43._0x142c51)]['stream'](_0x5d2ca6,{'signal':_0x339355[_0x1c33e3(-_0x29df43._0x2c6f2c,_0x29df43._0x56dbab,-_0x29df43._0x94eedb,-_0x29df43._0x276a5c)]})){throwIfAborted(_0x339355[_0xad316f(_0x29df43._0x317129,0x3aa,0x3d8,0x377)]);if(_0xdd0e28[_0x1c33e3(-0x91,-0xc1,-0x49,-_0x29df43._0x418c74)]===_0x1c33e3(-0x9a,-0x79,-0xe0,-_0x29df43._0x29cdad)){_0x2a9c2a=_0xdd0e28[_0x1c33e3(-_0x29df43._0x15eaf8,0x6,-_0x29df43._0x51f9d7,-0x76)];continue;}const _0x8d344e=createReasoningChunkEvent(_0xdd0e28,_0x48a395[_0x1c33e3(-_0x29df43._0x3ce3e8,-0x59,-_0x29df43._0x715fc4,-0x34)]);if(_0x8d344e&&_0x8d344e[_0xad316f(0x339,0x333,_0x29df43._0x4a6d66,_0x29df43._0xe7a462)]===_0xad316f(_0x29df43._0x5b261a,0x359,_0x29df43._0x47eb09,0x37e)&&_0x8d344e['text'][_0xad316f(0x354,_0x29df43._0x44850d,_0x29df43._0x5ab3bd,0x35f)]>0x0){await emitEvent2(_0x3c250b[_0xad316f(0x3bf,0x3a1,_0x29df43._0x233457,0x388)],_0x8d344e,_0xad1a2c);continue;}const _0x643427=createAssistantChunkEvent(_0xdd0e28,_0x48a395[_0xad316f(_0x29df43._0x5e680b,_0x29df43._0x1b1b06,_0x29df43._0x1041f3,_0x29df43._0x30d2c9)]);if(_0x643427){await emitEvent2(_0x3c250b['onEvent'],_0x643427,_0xad1a2c);continue;}const _0x3f3269=createToolUseChunkEvent(_0xdd0e28,_0x48a395[_0x1c33e3(-_0x29df43._0xd3a4cb,-0x80,-_0x29df43._0x59e5dc,-0x74)]);_0x3f3269&&await emitEvent2(_0x3c250b[_0xad316f(_0x29df43._0x538d7e,0x3a1,0x3e9,_0x29df43._0x22fcf9)],_0x3f3269,_0xad1a2c);}if(!_0x2a9c2a)throw new Error(_0xad316f(_0x29df43._0xfbbd26,_0x29df43._0x1039b4,0x2d9,0x368));return _0x2a9c2a;}function makeTurnGuards(_0x5b2b0b,_0x37b1b0,_0x4f0582,_0xb14845,_0x52c648){return{async 'stage'(_0x2423e7,_0x587466){return throwIfAborted(_0x5b2b0b),await runStage(_0x37b1b0,_0x2423e7,_0x587466,_0xb14845);},async 'emit'(_0x3a620a){throwIfAborted(_0x5b2b0b),await emitEvent2(_0x4f0582,_0x3a620a,_0x52c648);},async 'stageUnchecked'(_0x5ed69b,_0x2d15c6){return await runStage(_0x37b1b0,_0x5ed69b,_0x2d15c6,_0xb14845);},async 'emitUnchecked'(_0x8ebfd1){await emitEvent2(_0x4f0582,_0x8ebfd1,_0x52c648);}};}async function runTurn(_0xf44532,_0x46f986){const _0x4dabdc={_0x39c440:0x3d3,_0x30a150:0x3d7,_0x3cb4b1:0x415,_0x49f63e:0x3f2,_0x2aec5a:0x435,_0x3f6f5c:0x434,_0x5e05e9:0x37d,_0x26b398:0x340,_0x49a80d:0x35a,_0x505d23:0x3d1,_0x449181:0x392,_0x2a280b:0x39a,_0x5e3846:0x31c,_0x4d31b8:0x460,_0x119beb:0x48e,_0xd97b93:0x456,_0x358d39:0x346,_0x7248bb:0x355,_0x2b9df5:0x319,_0x26f80d:0x3d2,_0x2f895c:0x40c,_0x22159b:0x3dd,_0x363033:0x47e,_0x70af9a:0x475,_0x54113c:0x454,_0x2cbff5:0x417,_0x418073:0x34a,_0x288e42:0x3b8,_0x1870ed:0x445,_0xa6dcbb:0x44a,_0x1f269d:0x36f,_0x1bfee9:0x3e9,_0x3b4a26:0x3a6,_0x33b13c:0x3ac,_0x3a3473:0x3b5,_0x402b5c:0x3ba,_0x53262d:0x408,_0x5cad:0x3cc,_0x41f403:0x40e,_0x310a4a:0x3f3,_0x4e26f2:0x419,_0x3e64b3:0x461,_0x543af7:0x35e,_0x5a6e8d:0x400,_0x3d6e4c:0x3d4,_0x40b866:0x454,_0x3d6119:0x464,_0xcbf193:0x41f,_0x214795:0x3e3,_0x22f83c:0x3ea,_0xc1c2a8:0x361,_0x4bd78c:0x428,_0x3657b0:0x404,_0x16d8ea:0x348,_0xc1de8f:0x368,_0x3503e4:0x371,_0x423567:0x387,_0x1bba79:0x370,_0x542175:0x45e,_0x3e118d:0x3e8,_0x2cc3ab:0x3d8,_0x2098fd:0x310,_0x5a205c:0x33b,_0x59b17c:0x342,_0x413ae4:0x316,_0x2a4a66:0x3f0,_0x383843:0x3d3},_0x13d2eb={_0x449190:0x58},_0x3a4b4d=_0xf44532['signal']??new AbortController()[_0xd2afc2(0x3d1,_0x4dabdc._0x39c440,_0x4dabdc._0x30a150,_0x4dabdc._0x3cb4b1)],_0x270841={'sessionId':_0xf44532[_0x54699b(0x403,_0x4dabdc._0x49f63e,_0x4dabdc._0x2aec5a,_0x4dabdc._0x3f6f5c)],'turnId':_0xf44532[_0xd2afc2(0x33b,_0x4dabdc._0x5e05e9,_0x4dabdc._0x26b398,_0x4dabdc._0x49a80d)],'system':normalizeSystem(_0xf44532[_0xd2afc2(0x3dc,_0x4dabdc._0x505d23,_0x4dabdc._0x449181,0x39f)]),'messages':(_0xf44532['messages']??[])[_0xd2afc2(_0x4dabdc._0x39c440,_0x4dabdc._0x2a280b,0x34e,0x36c)](normalizeMessage),'lastResponse':void 0x0,'toolResults':[],'finalMessage':void 0x0},_0x305bbe=makeExtensionContext(_0x270841),_0x3cfc33={'sessionId':_0x270841['sessionId'],'turnId':_0x270841['turnId'],'state':_0x270841,'signal':_0x3a4b4d};function _0x54699b(_0xaec850,_0x89d55,_0x122d9f,_0x14b166){return _0x304c30(_0xaec850-0x1aa,_0x122d9f,_0x122d9f-0x17c,_0x89d55-0x2e1);}function _0xd2afc2(_0xd970c2,_0x1bb278,_0x5ea3f0,_0x12e0d5){return _0x31a615(_0x1bb278-0x5b0,_0x1bb278-0x10a,_0x5ea3f0,_0x12e0d5-_0x13d2eb._0x449190);}const {stage:_0x55579c,emit:_0x5cceea,stageUnchecked:_0x472015,emitUnchecked:_0x37e259}=makeTurnGuards(_0x3a4b4d,_0x46f986[_0xd2afc2(0x36a,0x361,0x350,_0x4dabdc._0x5e3846)],_0x46f986[_0x54699b(_0x4dabdc._0x4d31b8,0x452,0x405,_0x4dabdc._0x119beb)],_0x305bbe,_0x3cfc33);let _0xf447f4=0x0;try{const _0x5cfc69=await _0x55579c('onUserMessage',normalizeMessage(_0xf44532[_0x54699b(0x47a,_0x4dabdc._0xd97b93,0x447,0x458)]));_0x270841['messages']['push'](_0x5cfc69),await _0x5cceea({'type':'user_message','message':_0x5cfc69});while(!![]){throwIfAborted(_0x3a4b4d),_0xf447f4+=0x1;const _0x375348=createAssistantMessageId(_0x270841[_0xd2afc2(_0x4dabdc._0x358d39,0x37d,0x3ca,0x38b)],_0xf447f4),_0x2bd0cb=createReasoningMessageId(_0x375348);let _0x4b4956={'model':_0x46f986[_0xd2afc2(0x352,_0x4dabdc._0x7248bb,_0x4dabdc._0x2b9df5,0x387)][_0x54699b(0x3fd,_0x4dabdc._0x26f80d,0x396,0x39c)],'maxTokens':_0x46f986[_0x54699b(_0x4dabdc._0x2f895c,_0x4dabdc._0x22159b,0x3bc,0x3c2)]['maxTokens']??0x4000,'system':structuredClone(_0x270841[_0x54699b(0x499,0x459,0x48c,_0x4dabdc._0x363033)]),'messages':structuredClone(_0x270841[_0x54699b(_0x4dabdc._0x70af9a,_0x4dabdc._0x54113c,_0x4dabdc._0x2cbff5,0x426)]),'tools':_0x46f986[_0x54699b(0x458,0x42e,0x42a,0x439)][_0xd2afc2(_0x4dabdc._0x418073,0x38a,0x383,_0x4dabdc._0x288e42)](),'metadata':{'sessionId':_0x270841['sessionId'],'turnId':_0x270841[_0xd2afc2(0x395,0x37d,0x356,0x378)]}};_0x4b4956=await _0x55579c('beforeModelRequest',_0x4b4956),await _0x5cceea({'type':'model_request','request':_0x4b4956});let _0x23c119=await executeModelRequest(_0x4b4956,_0xf44532,_0x46f986,_0x3cfc33,{'assistantMessageId':_0x375348,'reasoningMessageId':_0x2bd0cb});_0x23c119=await _0x55579c('afterModelResponse',_0x23c119),await _0x5cceea({'type':_0x54699b(0x411,_0x4dabdc._0x1870ed,_0x4dabdc._0xa6dcbb,_0x4dabdc._0x119beb),'response':_0x23c119}),_0x270841[_0x54699b(0x3f9,0x3f0,0x3bf,0x3d7)]=_0x23c119;let _0x4ee593=await _0x55579c('beforeAssistantAppend',withMessageId(responseToAssistantMessage(_0x23c119),_0x375348));_0x4ee593=withMessageId(_0x4ee593,_0x375348);const _0xd84df8=getToolUseBlocks(_0x4ee593),_0x5b4acc=await Promise['all'](_0xd84df8[_0xd2afc2(0x381,0x39a,_0x4dabdc._0x1f269d,0x35d)](_0x473f6f=>_0x55579c(_0xd2afc2(0x369,0x399,0x37e,0x3d5),_0x473f6f)));_0x5b4acc[_0xd2afc2(_0x4dabdc._0x1bfee9,0x3c1,0x3f2,0x401)]>0x0&&(_0x4ee593=replaceToolUseBlocks(_0x4ee593,_0x5b4acc));const _0x34778c=withMessageId(_0x4ee593,_0x375348);_0x4ee593=_0x34778c;const _0x424d1b=createReasoningMessage(_0x4ee593),_0x2ca0fe=createAssistantTextMessage(_0x4ee593),_0x4206f8=createToolUseMessage(_0x4ee593);_0x424d1b&&await _0x5cceea({'type':_0x54699b(0x3da,0x3d5,_0x4dabdc._0x3b4a26,_0x4dabdc._0x33b13c),'message':withMessageId(_0x424d1b,_0x2bd0cb)});_0x2ca0fe&&await _0x5cceea({'type':'assistant_message','message':withMessageId(_0x2ca0fe,_0x375348)});_0x4206f8&&await _0x5cceea({'type':_0x54699b(_0x4dabdc._0x3a3473,0x3c6,_0x4dabdc._0x402b5c,0x396),'message':withMessageId(_0x4206f8,_0x375348)});_0x270841[_0xd2afc2(_0x4dabdc._0x53262d,_0x4dabdc._0x5cad,_0x4dabdc._0x41f403,_0x4dabdc._0x310a4a)][_0x54699b(0x45f,_0x4dabdc._0x4e26f2,0x3e3,_0x4dabdc._0x3e64b3)](_0x34778c);for(const _0x4b2d5a of _0x5b4acc){await _0x5cceea({'type':_0xd2afc2(0x367,0x389,_0x4dabdc._0x543af7,0x370),'toolCall':_0x4b2d5a});}if(_0x5b4acc['length']===0x0){const _0x356f90=await _0x55579c(_0xd2afc2(0x392,0x3aa,0x36e,0x360),_0x4ee593),_0x247715=withMessageId(_0x356f90,_0x375348);return _0x270841[_0xd2afc2(_0x4dabdc._0x5a6e8d,0x3b5,_0x4dabdc._0x3d6e4c,0x37d)]=_0x247715,_0x270841[_0x54699b(_0x4dabdc._0x363033,_0x4dabdc._0x40b866,0x45d,0x45d)][_0x270841[_0x54699b(_0x4dabdc._0x3d6119,0x454,_0x4dabdc._0xcbf193,0x498)]['length']-0x1]=_0x247715,await _0x5cceea({'type':_0x54699b(_0x4dabdc._0x214795,_0x4dabdc._0x22f83c,0x42a,0x3a0),'message':_0x247715}),throwIfAborted(_0x3a4b4d),await _0x46f986[_0xd2afc2(_0x4dabdc._0xc1c2a8,0x361,0x350,0x365)][_0x54699b(0x3fe,0x43a,_0x4dabdc._0x4bd78c,_0x4dabdc._0x3657b0)]('afterTurnComplete',_0x270841,_0x305bbe),await _0x5cceea({'type':_0xd2afc2(0x378,_0x4dabdc._0x16d8ea,_0x4dabdc._0xc1de8f,_0x4dabdc._0x3503e4),'state':_0x270841}),{'status':_0xd2afc2(0x3bb,0x380,_0x4dabdc._0x423567,_0x4dabdc._0x1bba79),'finalMessage':_0x247715,'state':_0x270841};}let _0x29e7a3=await _0x46f986['toolRuntime']['executeCalls'](_0x5b4acc,_0x3cfc33);const _0x1460b9=_0x29e7a3['some'](isAbortedToolResult),_0x22a182=_0x1460b9?_0x472015:_0x55579c,_0x52e7c9=_0x1460b9?_0x37e259:_0x5cceea;_0x29e7a3=await Promise['all'](_0x29e7a3[_0x54699b(0x432,0x422,_0x4dabdc._0x542175,0x3f9)](_0x45ae90=>_0x22a182('afterToolResult',_0x45ae90))),_0x270841['toolResults']['push'](..._0x29e7a3);for(const _0x4c73ec of _0x29e7a3){await _0x52e7c9({'type':_0x54699b(_0x4dabdc._0x3e118d,_0x4dabdc._0x5cad,0x404,_0x4dabdc._0x2cc3ab),'result':_0x4c73ec});}const _0xe9ed5e=await _0x22a182(_0xd2afc2(_0x4dabdc._0x2098fd,_0x4dabdc._0x5a205c,0x388,_0x4dabdc._0x26b398),createToolResultUserMessage(_0x29e7a3));await _0x52e7c9({'type':_0xd2afc2(_0x4dabdc._0x59b17c,0x357,0x399,_0x4dabdc._0x413ae4),'message':_0xe9ed5e}),_0x270841['messages']['push'](_0xe9ed5e);if(_0x1460b9)return{'status':_0x54699b(_0x4dabdc._0x2a4a66,0x426,0x474,0x457),'state':_0x270841};}}catch(_0x39b66b){if(!_0x3a4b4d['aborted'])throw _0x39b66b;return{'status':_0xd2afc2(_0x4dabdc._0x383843,0x39e,0x396,0x3d1),'state':_0x270841};}}function createSessionId(){const _0x49a524={_0x33b3fd:0x2b1,_0x17e924:0x297,_0x4dd9d7:0x2a0,_0x151962:0x25d,_0x153086:0x4b6,_0x49c781:0x206,_0x36f15a:0x247,_0x19cfb8:0x214,_0x15aaf0:0x267,_0x54dc02:0x290,_0x44e118:0x272},_0x26230d={_0x52417a:0x18d};function _0x5c6062(_0x33d777,_0xf32581,_0xc59f44,_0x1d5cb8){return _0x31a615(_0x1d5cb8-0x729,_0xf32581-0x2b,_0xc59f44,_0x1d5cb8-0xf2);}function _0x5028b9(_0x4f5530,_0x333370,_0x1678fe,_0x198335){return _0x304c30(_0x4f5530-_0x26230d._0x52417a,_0x4f5530,_0x1678fe-0x87,_0x333370- -0x38d);}return _0x5028b9(-_0x49a524._0x33b3fd,-_0x49a524._0x17e924,-_0x49a524._0x4dd9d7,-_0x49a524._0x151962)+Date[_0x5c6062(0x502,0x4e1,_0x49a524._0x153086,0x4d3)]()+'-'+Math['random']()[_0x5028b9(-_0x49a524._0x49c781,-0x222,-_0x49a524._0x36f15a,-_0x49a524._0x19cfb8)](0x10)[_0x5028b9(-_0x49a524._0x15aaf0,-_0x49a524._0x54dc02,-0x29f,-_0x49a524._0x44e118)](0x2,0xa);}function createTurnId(_0x5c7a40){return'turn-'+_0x5c7a40;}function createDefaultMessage(_0x391cbc){if(_0x391cbc===void 0x0)return void 0x0;return normalizeUserInput(_0x391cbc);}function _0x593e(_0x1ee0c5,_0x63a674){_0x1ee0c5=_0x1ee0c5-0x101;const _0x1797f4=_0x1797();let _0x593ef2=_0x1797f4[_0x1ee0c5];if(_0x593e['WRQEVI']===undefined){var _0x42813e=function(_0xd1cb78){const _0x5fd40f='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x4cb1e6='',_0x2bf202='';for(let _0x2e70d4=0x0,_0xec2d28,_0x203ce7,_0x1209c3=0x0;_0x203ce7=_0xd1cb78['charAt'](_0x1209c3++);~_0x203ce7&&(_0xec2d28=_0x2e70d4%0x4?_0xec2d28*0x40+_0x203ce7:_0x203ce7,_0x2e70d4++%0x4)?_0x4cb1e6+=String['fromCharCode'](0xff&_0xec2d28>>(-0x2*_0x2e70d4&0x6)):0x0){_0x203ce7=_0x5fd40f['indexOf'](_0x203ce7);}for(let _0x38fe10=0x0,_0xd0c41b=_0x4cb1e6['length'];_0x38fe10<_0xd0c41b;_0x38fe10++){_0x2bf202+='%'+('00'+_0x4cb1e6['charCodeAt'](_0x38fe10)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x2bf202);};_0x593e['tElvdx']=_0x42813e,_0x593e['KrEqEH']={},_0x593e['WRQEVI']=!![];}const _0x548d98=_0x1797f4[0x0],_0x3aa37e=_0x1ee0c5+_0x548d98,_0x193f3f=_0x593e['KrEqEH'][_0x3aa37e];return!_0x193f3f?(_0x593ef2=_0x593e['tElvdx'](_0x593ef2),_0x593e['KrEqEH'][_0x3aa37e]=_0x593ef2):_0x593ef2=_0x193f3f,_0x593ef2;}function normalizeUserInput(_0x35f388){const _0x1ac79e={_0x5a2566:0x2a3,_0x1adac0:0x2ae,_0x30b7ac:0x2ca,_0x4c2224:0x2f2,_0x5b70a8:0x32f,_0x5f11d7:0x31c,_0x5b8cdb:0x2d7},_0x3940ec={_0x893fa8:0x57,_0x2dbd6a:0x169},_0x2a9ec1={_0x5e9daa:0x1e7};if(typeof _0x35f388===_0x3c72da(_0x1ac79e._0x5a2566,_0x1ac79e._0x1adac0,_0x1ac79e._0x30b7ac,0x2b1))return{'role':_0x3c72da(_0x1ac79e._0x4c2224,_0x1ac79e._0x5b70a8,0x33f,0x30a),'content':[{'type':_0x3c72da(_0x1ac79e._0x5f11d7,0x33d,0x301,_0x1ac79e._0x5b8cdb),'text':_0x35f388}]};function _0x3c72da(_0x3d256e,_0x59af68,_0x172c22,_0x1df56a){return _0x31a615(_0x3d256e-0x50d,_0x59af68-0x8b,_0x1df56a,_0x1df56a-_0x2a9ec1._0x5e9daa);}function _0x4bafce(_0xe34f70,_0x44cedc,_0x5b120b,_0x408dfe){return _0x304c30(_0xe34f70-_0x3940ec._0x893fa8,_0x408dfe,_0x5b120b-_0x3940ec._0x2dbd6a,_0xe34f70- -0x178);}return normalizeMessage(_0x35f388);}function resolveChatModel(_0x466e0e){const _0x10310b={_0x5b45e1:0x2f6,_0x5582ae:0x2ae,_0x4c03a3:0x335,_0x16ec24:0xe2};if(!_0x466e0e['chatModel'])throw new Error(_0x505fd8(_0x10310b._0x5b45e1,_0x10310b._0x5582ae,0x2d2,_0x10310b._0x4c03a3));function _0x505fd8(_0x2355bc,_0x359d10,_0x3357eb,_0x780a61){return _0x304c30(_0x2355bc-0x1ef,_0x359d10,_0x3357eb-0x51,_0x2355bc-0x19c);}function _0x2d6e8b(_0x209836,_0x2c811b,_0x2416cc,_0x5ec99d){return _0x304c30(_0x209836-0x9c,_0x5ec99d,_0x2416cc-0xf1,_0x2c811b- -0x1f6);}return _0x466e0e[_0x2d6e8b(-0xe0,-0xfa,-_0x10310b._0x16ec24,-0xb2)];}function createRegistry(_0x1d180c){const _0x30c21d={_0x94dcdb:0x3b6,_0x43b5bf:0x3ca,_0x407dbc:0x1ee,_0x3b8c81:0x1e5,_0x1c9493:0x3e8,_0x451c25:0x3cc},_0x35d119={_0x3463ce:0x6a};if(_0x1d180c[_0x14a3dc(0x414,0x3a5,_0x30c21d._0x94dcdb,_0x30c21d._0x43b5bf)])return _0x1d180c[_0x556b45(-_0x30c21d._0x407dbc,-_0x30c21d._0x3b8c81,-0x205,-0x1b4)];function _0x556b45(_0x1383f2,_0x28155f,_0x54604e,_0x5f4344){return _0x31a615(_0x28155f-_0x35d119._0x3463ce,_0x28155f-0x181,_0x5f4344,_0x5f4344-0x104);}function _0x14a3dc(_0x550931,_0x3b5a55,_0x2cca7e,_0x6ddfdc){return _0x31a615(_0x6ddfdc-0x619,_0x3b5a55-0xde,_0x3b5a55,_0x6ddfdc-0x13f);}const _0x580583=createExtensionRegistry(),_0x1567fe=_0x1d180c['extensions']??[];for(const _0x42d590 of _0x1567fe){_0x580583[_0x14a3dc(0x3d9,_0x30c21d._0x1c9493,0x3e5,_0x30c21d._0x451c25)](_0x42d590);}return _0x580583;}var Agent=class{['_systemPrompt'];[_0x304c30(0x17a,0x19f,0x12b,0x158)];['sessionId'];[_0x31a615(-0x1e4,-0x218,-0x202,-0x1e6)];['defaultMessage'];['turnIndex'];constructor(_0x3cdd1f={}){const _0xe8c255={_0x59af24:0x220,_0x2042f3:0x22d,_0x508ff6:0x2a9,_0x2af232:0x228,_0xec1c3d:0x265,_0x561afa:0x1b9,_0x4b3795:0x1e4,_0x462b40:0x1f7,_0x17aabd:0x1f5,_0x33c733:0x1fc,_0x533e5c:0x296,_0xe2839b:0x24e,_0x4c70cc:0x215,_0x50b699:0x1f7,_0x908574:0x1eb,_0x22b019:0x21c,_0xd27bd0:0x286,_0x4fadb7:0x29e,_0x26f178:0x2f7,_0x949a59:0x24b,_0x31190d:0x23a,_0x63ef67:0x242,_0x2d2796:0x1c4,_0x104c78:0x1d8,_0x31a15b:0x1eb,_0x2b3cf0:0x1f4,_0xbfa29:0x2a5,_0x2450f4:0x2f8,_0x5b446c:0x2bb},_0x436d10={_0x4e7330:0xb,_0x32ac21:0x60},_0x163cbd={_0x8b9569:0x4a1,_0x50bcfd:0x176};this[_0x126d7c(0x28d,0x25d,_0xe8c255._0x59af24,0x25b)]=_0x3cdd1f[_0x126d7c(_0xe8c255._0x2042f3,0x296,0x28c,0x25b)]??createSessionId(),this[_0x126d7c(_0xe8c255._0x508ff6,0x278,_0xe8c255._0x2af232,_0xe8c255._0xec1c3d)]=0x0,this[_0x427a94(-0x232,-_0xe8c255._0x561afa,-_0xe8c255._0x4b3795,-_0xe8c255._0x462b40)]=_0x3cdd1f[_0x427a94(-0x21f,-0x1e5,-_0xe8c255._0x17aabd,-_0xe8c255._0x33c733)]??'',this['messages']=(_0x3cdd1f['messages']??[])[_0x126d7c(_0xe8c255._0x533e5c,0x25c,_0xe8c255._0xe2839b,0x28b)](normalizeMessage);function _0x126d7c(_0x2fc24c,_0x2595e9,_0xb9e6d7,_0x59e289){return _0x31a615(_0x59e289-_0x163cbd._0x8b9569,_0x2595e9-_0x163cbd._0x50bcfd,_0x2595e9,_0x59e289-0xdd);}this['defaultMessage']=createDefaultMessage(_0x3cdd1f[_0x427a94(-0x1b5,-_0xe8c255._0x4c70cc,-_0xe8c255._0x50b699,-0x1d7)]);function _0x427a94(_0x3c9464,_0x2e3319,_0x4e2290,_0x2e98a7){return _0x31a615(_0x2e98a7-_0x436d10._0x4e7330,_0x2e3319-_0x436d10._0x32ac21,_0x2e3319,_0x2e98a7-0x52);}const _0x2e5cc3=createInternalToolRuntime(_0x3cdd1f[_0x427a94(-_0xe8c255._0x908574,-0x22a,-_0xe8c255._0x22b019,-0x201)]??[],{'onEvent':_0x3cdd1f[_0x126d7c(_0xe8c255._0xd27bd0,_0xe8c255._0x4fadb7,_0xe8c255._0x26f178,0x2bb)],'onToolCall':_0x3cdd1f[_0x126d7c(_0xe8c255._0x949a59,_0xe8c255._0x31190d,0x228,_0xe8c255._0x63ef67)]});this[_0x427a94(-_0xe8c255._0x2d2796,-_0xe8c255._0x104c78,-_0xe8c255._0x31a15b,-_0xe8c255._0x2b3cf0)]={'registry':createRegistry(_0x3cdd1f),'chatModel':resolveChatModel(_0x3cdd1f),'toolRuntime':_0x2e5cc3,'onEvent':_0x3cdd1f[_0x126d7c(_0xe8c255._0xbfa29,_0xe8c255._0x2450f4,0x2e0,_0xe8c255._0x5b446c)]};}get[_0x31a615(-0x207,-0x1c2,-0x1ea,-0x209)](){const _0x4c05fa={_0x184817:0x1de,_0x5dad94:0x200},_0x5bdd84={_0x5f1fab:0xbe};function _0x2f3e0e(_0x270129,_0x5d286f,_0x310a3e,_0x4d1081){return _0x31a615(_0x310a3e-0x3ce,_0x5d286f-0x18c,_0x270129,_0x4d1081-_0x5bdd84._0x5f1fab);}return this[_0x2f3e0e(0x1ae,_0x4c05fa._0x184817,0x1cc,_0x4c05fa._0x5dad94)];}[_0x31a615(-0x221,-0x22f,-0x215,-0x1de)](_0x43378e=[]){const _0x2b59f2={_0x116eb7:0x90},_0x419db5={_0x5afbae:0x2f2},_0x517192={_0x202666:0x43};function _0xb7e92c(_0x2ca425,_0x4484d3,_0x2fb694,_0x34254e){return _0x304c30(_0x2ca425-_0x517192._0x202666,_0x2fb694,_0x2fb694-0x1ee,_0x4484d3-0x3eb);}function _0x3f897b(_0x5e1661,_0x233acc,_0x206076,_0x3bcedb){return _0x31a615(_0x206076-_0x419db5._0x5afbae,_0x233acc-0x14b,_0x5e1661,_0x3bcedb-0x1a3);}this[_0x3f897b(0x11f,0x115,0xf3,0x127)]['toolRuntime'][_0x3f897b(_0x2b59f2._0x116eb7,0xe7,0xd1,0xd1)](_0x43378e);}[_0x31a615(-0x25c,-0x276,-0x291,-0x22a)](_0x236b1e,_0x14160b={}){const _0x4b76d4={_0x4f5f80:0x4d6,_0x4a85f1:0x4c1,_0x3dd5e9:0x4e3,_0x5aacd6:0x518,_0x40c58d:0x538,_0x5a3691:0x411,_0x4269fa:0x43a},_0x531518={_0x1bdaec:0x14,_0x2f2b7b:0x1ef},_0x5cd2ad={_0x396735:0x15b};this[_0x2ec5be(_0x4b76d4._0x4f5f80,0x4ab,0x4ad,_0x4b76d4._0x4a85f1)]=_0x236b1e;function _0x3d2169(_0x1f6693,_0x2345f2,_0x560618,_0x220910){return _0x31a615(_0x2345f2-0x65a,_0x2345f2-0x1c,_0x560618,_0x220910-_0x5cd2ad._0x396735);}function _0x2ec5be(_0x37aee2,_0x437490,_0x392438,_0x20676f){return _0x31a615(_0x37aee2-0x6d8,_0x437490-_0x531518._0x1bdaec,_0x392438,_0x20676f-_0x531518._0x2f2b7b);}_0x14160b[_0x2ec5be(_0x4b76d4._0x3dd5e9,0x4dd,_0x4b76d4._0x5aacd6,0x515)]===!![]&&(this[_0x2ec5be(0x4f4,_0x4b76d4._0x40c58d,0x528,0x4e1)]=[],this[_0x3d2169(0x3e4,0x41e,_0x4b76d4._0x5a3691,_0x4b76d4._0x4269fa)]=0x0);}[_0x304c30(0x11e,0x15a,0x194,0x147)](_0x2f3404){const _0xe1b11b={_0x283710:0x2bd,_0x248208:0x2a4},_0x409962={_0x57fa6c:0x524,_0x36bd21:0x1c2};function _0x2ae650(_0x55151f,_0x37ae9d,_0xb756fb,_0x2a7229){return _0x31a615(_0x37ae9d-_0x409962._0x57fa6c,_0x37ae9d-_0x409962._0x36bd21,_0x55151f,_0x2a7229-0xfa);}this[_0x2ae650(_0xe1b11b._0x283710,0x2de,0x2de,_0xe1b11b._0x248208)]=_0x2f3404;}[_0x31a615(-0x1e8,-0x1a7,-0x1bd,-0x1da)](_0x491f2c){const _0x27924e={_0x1c5a41:0x19d,_0x42538e:0x168,_0x5727b8:0x123,_0x2c0521:0x179,_0x5b7a4c:0x1c4,_0x210949:0x1b9},_0x1ecc1e={_0x1579b8:0x2c0},_0x5cc088={_0x85eea1:0x1a2,_0x49070f:0x3e};function _0x1bd5f5(_0x458020,_0x4de339,_0x1a82f3,_0x2c6834){return _0x304c30(_0x458020-_0x5cc088._0x85eea1,_0x1a82f3,_0x1a82f3-_0x5cc088._0x49070f,_0x2c6834- -0x37);}function _0x2e1240(_0x44874b,_0xced20f,_0x2a3060,_0x210523){return _0x304c30(_0x44874b-0x11,_0x2a3060,_0x2a3060-0x8c,_0xced20f- -_0x1ecc1e._0x1579b8);}this[_0x2e1240(-_0x27924e._0x1c5a41,-_0x27924e._0x42538e,-0x136,-_0x27924e._0x5727b8)][_0x2e1240(-_0x27924e._0x2c0521,-_0x27924e._0x5b7a4c,-_0x27924e._0x210949,-0x18e)]=_0x491f2c;}async[_0x31a615(-0x200,-0x208,-0x247,-0x209)](_0x3af120=this['defaultMessage'],_0x5d6501={}){const _0x70b77a={_0x20e57b:0x23a,_0x432042:0x25d,_0x40d7fa:0x268,_0x97a49d:0x228,_0x53fbf2:0x25b,_0x26f05e:0x2,_0x577160:0x1b,_0x4e2fea:0xf,_0x5343f0:0x1bd,_0x321e:0x22b,_0x3a0d91:0x41,_0x2d1720:0x256,_0x2466cd:0x239,_0x5c887b:0x233,_0x268845:0x250,_0x1c5843:0x73,_0x5c4ecb:0x99,_0x1e2ed8:0x45},_0x5b17fe={_0x566d9b:0x1cf,_0x4fa748:0x378},_0x783c1f={_0xde4080:0x20};if(!_0x3af120)throw new Error(_0x3863d0(-_0x70b77a._0x20e57b,-0x216,-0x26d,-0x234));function _0x2dbba8(_0x85ada9,_0x141ed6,_0x23d31b,_0x4f932e){return _0x31a615(_0x23d31b-0x257,_0x141ed6-0x168,_0x4f932e,_0x4f932e-_0x783c1f._0xde4080);}this[_0x3863d0(-_0x70b77a._0x432042,-_0x70b77a._0x40d7fa,-_0x70b77a._0x97a49d,-_0x70b77a._0x53fbf2)]+=0x1;const _0x3050b0=await runTurn({'sessionId':this['sessionId'],'turnId':createTurnId(this[_0x2dbba8(_0x70b77a._0x26f05e,-0x1a,_0x70b77a._0x577160,_0x70b77a._0x4e2fea)]),'streaming':_0x5d6501[_0x3863d0(-0x201,-0x22e,-0x207,-_0x70b77a._0x5343f0)],'signal':_0x5d6501[_0x3863d0(-0x1fe,-0x24c,-0x1db,-_0x70b77a._0x321e)],'system':this[_0x2dbba8(0xb,_0x70b77a._0x3a0d91,0x50,0x53)],'messages':this['messages'],'message':normalizeUserInput(_0x3af120)},this[_0x3863d0(-0x220,-_0x70b77a._0x2d1720,-0x1ea,-0x1dc)]);this['messages']=_0x3050b0[_0x3863d0(-_0x70b77a._0x2466cd,-_0x70b77a._0x5c887b,-_0x70b77a._0x268845,-0x22d)][_0x2dbba8(0x7a,0x26,_0x70b77a._0x1c5843,_0x70b77a._0x5c4ecb)][_0x2dbba8(0x37,0x63,0x41,_0x70b77a._0x1e2ed8)](normalizeMessage);function _0x3863d0(_0x50da85,_0x38e21e,_0x37f9e3,_0x459931){return _0x304c30(_0x50da85-0x1b5,_0x37f9e3,_0x37f9e3-_0x5b17fe._0x566d9b,_0x50da85- -_0x5b17fe._0x4fa748);}return _0x3050b0;}};function _0x1797(){const _0x45334b=['C2XPy2u','Dg9VBf9Yzxn1BhrFBwvZC2fNzq','mtG5mtG4mefMvhDgzG','CMv0DxjU','BM93','B3bLBMfPx3jLyxnVBMLUz19KzwX0yq','DhLWzq','z2v0','C3rHDhvZ','Dg9VBf9YzwPLy3rLza','mta1mdyWodDwEwLRBwG','CMvNAxn0CNK','zMLUywXFBwvZC2fNzq','CMvNAxn0zxi','mZa1mty5m2PWA2fMBW','y2f0y2G','oIbTAxnZAw5NihjLCxvPCMvKigzPzwXKici','C2v0','BgfZDfjLC3bVBNnL','AxrLBxm','C2vZC2LVBKLK','C3rHz2u','C3rYzwfT','zw50CMLLCW','BgLZDa','ntC2otG1ugrkzgjn','zxjYB3i','C3vTBwfYEuLUzgv4','C29YDa','mZzdD0nZBMK','DhvYBKLUzgv4','Dw5RBM93BL90B29S','AxrLBuLK','mJa2nJeYogLWDurODq','Aw5WDxrezwX0yq','Dg9VBf9VDxrWDxrFy2H1BMS','CMvXDwLYzwq','y29UDgvUDf9KzwX0yq','yxjYyxK','DhvYBKLK','CMvHC29UAw5NtwvZC2fNzuLK','CMvHC29U','y29TCgXLDgvK','CMfJzq','CMvHC29UAw5Nx2nODw5R','mu9gBeHeBa','AxnbCNjHEq','B3jKzxi','zxHLy3v0zunHBgXZ','B3bLBMfPx3jLyxnVBMLUz19ZDw1Tyxj5x2rLBhrH','yw50AhjVCgLJx3rOAw5RAw5Nx2rLBhrH','Dg9VBf9JywXS','BgLZDfrVB2Xty2HLBwfZ','Dg9VBf91C2vFy2H1BMS','DhjHBNnMB3jTzxi','mtbfugvuv1q','ywXS','C2v0vg9VBhm','B2jQzwn0','ChvZAa','Dg9VBf91C2vFzgvSDge','AM9PBG','CMvTB3zLrxzLBNrmAxn0zw5LCG','DxnLCG','Aw5WDxq','qwDLBNqUC2vUzcbYzxf1AxjLCYbHig1LC3nHz2uGD2HLBIbUBYbKzwzHDwX0ig1LC3nHz2uGAxmGy29UzMLNDxjLza','C3rHDgu','yMvMB3jLvg9VBev4zwn1DgLVBG','BwfW','DMfSDwvZ','CNvU','BMfTzq','ywjVCNrLza','DMfSDwu','C2v0u2vZC2LVBKLK','zxHLy3v0zq','ywrKrxzLBNrmAxn0zw5LCG','Dg9VBhncEu5HBwu','Dg9VBhm','sw52ywXPzcb0B29SigLUChv0igf0ia','Dg9VBfj1BNrPBwu','C3rYDwn0DxjLza','yxnZAxn0yw50twvZC2fNzuLK','C3LZDgvTuhjVBxb0','yMvMB3jLrMLUywXpDxrWDxq','DgHLBG','zMLSDgvY','DgHPBMTPBMC','x3n5C3rLBvbYB21WDa','CMvZCg9UC2u','C2vUza','zgvWCW','CNvUt2jZzxj2zxjZ','qwDLBNqGCMvXDwLYzxmGysbJAgf0tw9KzwW','Dg9VBf9ZDgfYDgvK','zMLUywXnzxnZywDL','B3v0Chv0sw5KzxG','yM9VBgvHBG','CMvZB2X2zq','otyWnJq4uxHgzvjx','CMvQzwn0','CMvZzxrnzxnZywDLCW','Aw5KzxG','Bw9KzwXFCMvZCg9UC2u','ywn0Aw9U','Dgv4Da','A2LUza','BgvUz3rO','zgvSDge','BNvTyMvY','Dg9tDhjPBMC','y29UDgvUDeLUzgv4','B2jZzxj2zxi','zw5HyMXLza','C2v0q2HHDe1VzgvS','ywjVCNq','B25fDMvUDa','DhjPBq','BwvZC2fNzxm','oMfZC2LZDgfUDdO','BwvZC2fNzq','yxnZAxn0yw50x2nODw5R','C3rYzwfTAw5N','C3LZDgvT','Dg9VBf9JB21WBgv0zwq','C2LNBMfS','oIbLEhbLy3rLzcbHCNjHEq','Aw5WDxrty2HLBwe','zgvZy3jPChrPB24','yMvMB3jLvg9VBfjLC3vSDefWCgvUza','n2DXy0jSrq','odeYovH6AfzyzG','Dg9VBf91C2vFBwvZC2fNzq','mJCWodrivLLMsu0','vg9VBev4zwn1DgLVBKvYCM9Y','vw5RBM93BIb0B29SoIa','BMv4Da','oIbLEhbLy3rLzcbUDw1Izxi','Dg9VBf9Yzxn1Bhq','ChjVCgvYDgLLCW','C3rYAw5N','tw9KzwWGC3rYzwfTigvUzgvKihDPDgHVDxqGysbMAw5HBcbYzxnWB25Zzq','DhvYBL9JB21WBgv0zq','oNjLyxnVBMLUzW','Bw9KzwW','Dg9VBf91C2u','y29UDgvUDa','CMvHC29UAw5Nx21LC3nHz2u','y29TCgXLDgu','C2vZC2LVBI0','B3v0Chv0','B25uB29Sq2fSBa','CNvUvhjHBNnMB3jTzxjZ','zg9Uzq','C2v0u3LZDgvTuhjVBxb0','y2HHDe1VzgvS'];_0x1797=function(){return _0x45334b;};return _0x1797();}export{normalizeToolOutputValue,createToolOutput,ToolExecutionError,defineTool,ToolRegistry,validateToolInput,deriveFinalToolOutput,createInternalToolRuntime,createExtensionRegistry,runTurn,Agent};
|