@nuvin/agent-core 0.1.1-rc.0 → 0.2.0-rc.2
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.js +1 -1
- package/dist/agent/metrics.d.ts +8 -0
- package/dist/chunk-D5IVWJHX.js +1 -1
- package/dist/chunk-FFIZ6TKW.js +1 -1
- package/dist/chunk-JQLCZGQ7.js +1 -0
- package/dist/chunk-NYZR4XKO.js +1 -1
- package/dist/chunk-WDPOWIJR.js +1 -0
- package/dist/chunk-X7VAACWY.js +1 -1
- package/dist/chunk-YNOIG4FD.js +1 -0
- package/dist/formats/index.js +1 -1
- package/dist/formats/message-format.d.ts +1 -0
- package/dist/hooks/index.js +1 -1
- package/dist/models/chat-model.d.ts +1 -0
- package/dist/models/github-model.d.ts +2 -0
- package/dist/models/index.d.ts +2 -0
- package/dist/models/index.js +1 -1
- package/dist/models/mock-model.d.ts +2 -0
- package/dist/models/model-cost.d.ts +5 -0
- package/dist/models/model-pricing-generator.d.ts +9 -0
- package/dist/models/model-pricing-products.d.ts +45 -0
- package/dist/models/model-pricing-types.d.ts +33 -0
- package/dist/models/model-pricing.d.ts +13 -0
- package/dist/models/model-pricing.generated.d.ts +23147 -0
- package/dist/models/openai-surfaces.d.ts +3 -0
- package/dist/models/routed-model.d.ts +3 -0
- package/dist/shared/index.js +1 -1
- package/dist/shared/types.d.ts +38 -7
- package/dist/tools/index.js +1 -1
- package/dist/tools/mcp-server-manager.d.ts +9 -4
- package/dist/tools/mcp-tool-adapter.d.ts +6 -1
- package/dist/tools/runtime-manager-tools.d.ts +11 -0
- package/dist/tools/tools.d.ts +4 -1
- package/package.json +2 -2
- package/dist/chunk-BLGBVFVX.js +0 -1
- package/dist/chunk-UIXQPCSN.js +0 -1
- package/dist/chunk-YWQXXHHU.js +0 -1
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import type { ListToolsResult } from "@modelcontextprotocol/sdk/types.js";
|
|
2
1
|
import type { MCPServerConfig } from "@nuvin/config";
|
|
3
|
-
import type { AnyToolDefinition, JsonValue } from "../shared/types.ts";
|
|
4
|
-
import { type McpToolClient } from "./mcp-tool-adapter.ts";
|
|
2
|
+
import type { AnyToolDefinition, JsonValue, ToolPermissionClass } from "../shared/types.ts";
|
|
3
|
+
import { type McpToolClient, type McpToolDescriptor } from "./mcp-tool-adapter.ts";
|
|
5
4
|
interface ConnectedMcpClient extends McpToolClient {
|
|
6
|
-
listTools(): Promise<
|
|
5
|
+
listTools(): Promise<{
|
|
6
|
+
tools: McpToolDescriptor[];
|
|
7
|
+
}>;
|
|
7
8
|
close(): Promise<void>;
|
|
8
9
|
}
|
|
9
10
|
export type McpServerConnectionStatus = {
|
|
@@ -28,6 +29,9 @@ export type McpServerToolInfo = {
|
|
|
28
29
|
name: string;
|
|
29
30
|
description?: string;
|
|
30
31
|
inputSchema?: JsonValue;
|
|
32
|
+
permissionClass: ToolPermissionClass;
|
|
33
|
+
permissionConfigured: boolean;
|
|
34
|
+
suggestedPermissionClass?: "read" | "write";
|
|
31
35
|
};
|
|
32
36
|
export interface McpToolBundle {
|
|
33
37
|
tools: AnyToolDefinition[];
|
|
@@ -53,6 +57,7 @@ export declare function connectMcpServer(serverName: string, config: MCPServerCo
|
|
|
53
57
|
export declare function createMcpToolsFromServers(options: {
|
|
54
58
|
servers?: Record<string, MCPServerConfig>;
|
|
55
59
|
allowedTools?: Record<string, Record<string, boolean>>;
|
|
60
|
+
toolPermissions?: Record<string, Record<string, ToolPermissionClass>>;
|
|
56
61
|
connection?: McpConnectionOptions;
|
|
57
62
|
connect?: McpConnector;
|
|
58
63
|
}): Promise<McpToolBundle>;
|
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
import type { CallToolResult } from "@modelcontextprotocol/sdk/types.js";
|
|
2
|
-
import type { JsonObject, JsonSchema, JsonSchemaObject } from "../shared/types.ts";
|
|
2
|
+
import type { JsonObject, JsonSchema, JsonSchemaObject, ToolDefinitionLifecycle, ToolPermissionClass } from "../shared/types.ts";
|
|
3
3
|
export interface McpToolDescriptor {
|
|
4
4
|
name: string;
|
|
5
5
|
description?: string;
|
|
6
6
|
inputSchema?: unknown;
|
|
7
|
+
annotations?: {
|
|
8
|
+
readOnlyHint?: unknown;
|
|
9
|
+
};
|
|
7
10
|
}
|
|
8
11
|
export interface McpToolClient {
|
|
9
12
|
callTool(input: {
|
|
@@ -17,6 +20,8 @@ export declare function createMcpTool(options: {
|
|
|
17
20
|
serverName: string;
|
|
18
21
|
tool: McpToolDescriptor;
|
|
19
22
|
client: McpToolClient;
|
|
23
|
+
permissionClass: ToolPermissionClass;
|
|
24
|
+
internalLifecycle?: ToolDefinitionLifecycle;
|
|
20
25
|
}): import("../shared/types.ts").ToolDefinition<{
|
|
21
26
|
[x: string]: string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | /*elided*/ any | {
|
|
22
27
|
[x: string]: string | number | boolean | /*elided*/ any | /*elided*/ any;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { Agent } from "../agent/agent.ts";
|
|
1
2
|
import type { AgentDefinitionFactoryContext, AgentOptions } from "../shared/types.ts";
|
|
2
3
|
export interface DelegatedAgentFactoryContext extends AgentDefinitionFactoryContext {
|
|
3
4
|
parentSessionId: string;
|
|
@@ -6,6 +7,8 @@ export interface DelegatedAgentFactoryContext extends AgentDefinitionFactoryCont
|
|
|
6
7
|
export type DelegatedAgentDefinition = AgentOptions | ((ctx: DelegatedAgentFactoryContext) => AgentOptions | Promise<AgentOptions>);
|
|
7
8
|
export interface CreateDelegationToolsOptions {
|
|
8
9
|
agents?: Record<string, DelegatedAgentDefinition>;
|
|
10
|
+
/** Register an active child for shared tool refresh; returns its cleanup callback. */
|
|
11
|
+
registerActiveAgent?: (agent: Agent) => () => void;
|
|
9
12
|
}
|
|
10
13
|
export declare function resolveDelegatedAgentOptions(definition: DelegatedAgentDefinition, ctx: DelegatedAgentFactoryContext): Promise<AgentOptions>;
|
|
11
14
|
export declare function createAssignTaskTool(options: CreateDelegationToolsOptions): import("../shared/types.ts").ToolDefinition<{
|
|
@@ -18,15 +21,19 @@ export declare function createAssignTaskTool(options: CreateDelegationToolsOptio
|
|
|
18
21
|
properties: {
|
|
19
22
|
agentId: {
|
|
20
23
|
type: "string";
|
|
24
|
+
description: string;
|
|
21
25
|
};
|
|
22
26
|
description: {
|
|
23
27
|
type: "string";
|
|
28
|
+
description: string;
|
|
24
29
|
};
|
|
25
30
|
nickname: {
|
|
26
31
|
type: "string";
|
|
32
|
+
description: string;
|
|
27
33
|
};
|
|
28
34
|
task: {
|
|
29
35
|
type: "string";
|
|
36
|
+
description: string;
|
|
30
37
|
};
|
|
31
38
|
};
|
|
32
39
|
required: string[];
|
|
@@ -42,15 +49,19 @@ export declare function createDelegationTools(options: CreateDelegationToolsOpti
|
|
|
42
49
|
properties: {
|
|
43
50
|
agentId: {
|
|
44
51
|
type: "string";
|
|
52
|
+
description: string;
|
|
45
53
|
};
|
|
46
54
|
description: {
|
|
47
55
|
type: "string";
|
|
56
|
+
description: string;
|
|
48
57
|
};
|
|
49
58
|
nickname: {
|
|
50
59
|
type: "string";
|
|
60
|
+
description: string;
|
|
51
61
|
};
|
|
52
62
|
task: {
|
|
53
63
|
type: "string";
|
|
64
|
+
description: string;
|
|
54
65
|
};
|
|
55
66
|
};
|
|
56
67
|
required: string[];
|
package/dist/tools/tools.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { AnyToolDefinition, InferJsonSchema, JsonObject, JsonSchemaObject, JsonValue, ToolDefinition, ToolExecutionContext, ToolOutputEnvelope, ToolOutputValue, ToolResultChunk, ToolResultContent, ToolSchema } from "../shared/types.ts";
|
|
1
|
+
import type { AnyToolDefinition, InferJsonSchema, JsonObject, JsonSchemaObject, JsonValue, ToolDefinition, ToolDefinitionLifecycle, ToolExecutionContext, ToolOutputEnvelope, ToolOutputValue, ToolPermissionClass, ToolResultChunk, ToolResultContent, ToolSchema } from "../shared/types.ts";
|
|
2
2
|
export declare function normalizeToolOutputValue(output: ToolOutputValue): ToolResultChunk;
|
|
3
3
|
export declare function createToolOutput(output: string, structured?: JsonObject, content?: ToolResultContent): ToolOutputEnvelope;
|
|
4
4
|
export declare class ToolExecutionError extends Error {
|
|
@@ -9,8 +9,11 @@ export declare function defineTool<TSchema extends JsonSchemaObject, TYield exte
|
|
|
9
9
|
name: string;
|
|
10
10
|
description: string;
|
|
11
11
|
inputSchema: TSchema;
|
|
12
|
+
permissionClass: ToolPermissionClass;
|
|
13
|
+
internalLifecycle?: ToolDefinitionLifecycle;
|
|
12
14
|
execute(input: InferJsonSchema<TSchema>, ctx: ToolExecutionContext): AsyncGenerator<TYield, TReturn, void>;
|
|
13
15
|
}): ToolDefinition<InferJsonSchema<TSchema>, TYield, TReturn, TSchema>;
|
|
16
|
+
export declare function resolveToolPermissionClass(tool: AnyToolDefinition | undefined): ToolPermissionClass;
|
|
14
17
|
export declare class ToolRegistry {
|
|
15
18
|
private readonly toolsByName;
|
|
16
19
|
constructor(tools?: AnyToolDefinition[]);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nuvin/agent-core",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0-rc.2",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Core agent, model, format, and tool primitives for Nuvin",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
"tsup": "^8.5.1",
|
|
53
53
|
"typescript": "^6.0.2",
|
|
54
54
|
"vitest": "^4.1.2",
|
|
55
|
-
"@nuvin/config": "0.
|
|
55
|
+
"@nuvin/config": "0.3.0-rc.3"
|
|
56
56
|
},
|
|
57
57
|
"dependencies": {
|
|
58
58
|
"@anthropic-ai/sdk": "^0.82.0",
|
package/dist/chunk-BLGBVFVX.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(function(_0x4cdc7c,_0x56cda1){const _0x29a90f={_0xadaf83:0x2f0,_0x11a458:0x2d4,_0x39ccd9:0x2e8,_0x7a4e26:0x2db,_0x17ea86:0x2e2,_0x199774:0x2db,_0x66681e:0x2d9,_0x2ab4c0:0x1a6,_0x156f17:0x197,_0x2cc4d5:0x192,_0xb78c22:0x193,_0x5c27aa:0x19a,_0x30b681:0x18c,_0x54e5f4:0x1a2,_0x2c18cd:0x2de,_0x16a993:0x2f4,_0x5b07b8:0x2f5},_0x57bddc={_0x5aa6fa:0x84};function _0x5eca81(_0x335c0b,_0x5e7d50,_0x455117,_0x109a74){return _0x5098(_0x5e7d50-_0x57bddc._0x5aa6fa,_0x455117);}const _0x29ba54=_0x4cdc7c();function _0x43c6db(_0x4a7909,_0x3064d9,_0x4162d7,_0x29bb03){return _0x5098(_0x4a7909-0x1d2,_0x29bb03);}while(!![]){try{const _0x46804a=-parseInt(_0x43c6db(0x2ed,0x302,_0x29a90f._0xadaf83,0x2f7))/0x1+parseInt(_0x43c6db(_0x29a90f._0x11a458,_0x29a90f._0x39ccd9,_0x29a90f._0x7a4e26,_0x29a90f._0x17ea86))/0x2+parseInt(_0x43c6db(0x2ee,_0x29a90f._0x39ccd9,_0x29a90f._0x199774,_0x29a90f._0x66681e))/0x3*(parseInt(_0x5eca81(_0x29a90f._0x2ab4c0,0x1ad,_0x29a90f._0x156f17,0x194))/0x4)+parseInt(_0x5eca81(_0x29a90f._0x2cc4d5,0x185,0x17a,_0x29a90f._0xb78c22))/0x5+-parseInt(_0x5eca81(_0x29a90f._0x5c27aa,0x198,0x180,0x198))/0x6+-parseInt(_0x5eca81(0x197,_0x29a90f._0x30b681,0x1a4,_0x29a90f._0x54e5f4))/0x7+-parseInt(_0x43c6db(_0x29a90f._0x2c18cd,_0x29a90f._0x16a993,_0x29a90f._0x5b07b8,0x2c1))/0x8;if(_0x46804a===_0x56cda1)break;else _0x29ba54['push'](_0x29ba54['shift']());}catch(_0x28e134){_0x29ba54['push'](_0x29ba54['shift']());}}}(_0x3ea6,0x8b4bd));import{resolveOpenAiReasoningConfig}from'./chunk-NYZR4XKO.js';import{normalizeContent}from'./chunk-YWQXXHHU.js';function systemToInstructions(_0x9ccbda){const _0x4b8742={_0x297e57:0x2be,_0xc9ed8a:0x2bd},_0x5d8e2a={_0x5d45d2:0x2f5},_0x2cfa28={_0x1dd6f1:0x190};function _0x28ca56(_0x1e1236,_0x4727c5,_0x2b655b,_0x3520c4){return _0x5098(_0x2b655b-_0x2cfa28._0x1dd6f1,_0x1e1236);}function _0x216d8a(_0x3ef77e,_0x215020,_0x314b7b,_0xc17308){return _0x5098(_0xc17308- -_0x5d8e2a._0x5d45d2,_0x3ef77e);}return normalizeContent(_0x9ccbda)['filter'](_0x35a76b=>_0x35a76b[_0x28ca56(0x2a0,0x29b,0x2a8,0x2c7)]===_0x216d8a(-0x1ce,-0x1ea,-0x1f6,-0x1d7))[_0x28ca56(0x2d6,_0x4b8742._0x297e57,0x2c0,_0x4b8742._0xc9ed8a)](_0x597ce1=>_0x597ce1[_0x216d8a(-0x1c1,-0x1f5,-0x1ee,-0x1d7)])[_0x28ca56(0x29a,0x289,0x2a3,0x289)]('\x0a\x0a');}function pushUserContentMessage(_0x5781d1,_0x4e9b2c,_0x1d8255){const _0xbbb68b={_0x45fbe9:0x78,_0x339524:0x73,_0x45222e:0xa6,_0x335c66:0xa6,_0x33a1b4:0xbf,_0x5bb078:0xaf},_0x11a0fa={_0xb817b0:0x1cd},_0x57a60a={_0x4ec993:0x2bf};function _0x208b95(_0x4dc62e,_0x46b007,_0x38e735,_0x24f0ef){return _0x5098(_0x4dc62e- -_0x57a60a._0x4ec993,_0x24f0ef);}function _0x22ee6d(_0x1f5e94,_0x20e9a5,_0x2a7648,_0x37dba9){return _0x5098(_0x20e9a5- -_0x11a0fa._0xb817b0,_0x37dba9);}if(_0x1d8255[_0x22ee6d(-0x88,-0x91,-_0xbbb68b._0x45fbe9,-_0xbbb68b._0x339524)]===0x0)return;_0x5781d1[_0x22ee6d(-_0xbbb68b._0x45222e,-_0xbbb68b._0x335c66,-_0xbbb68b._0x33a1b4,-_0xbbb68b._0x5bb078)]({'type':'message','role':_0x4e9b2c,'content':_0x1d8255});}function hasSerializableToolUse(_0x4399c8){const _0x318a8f={_0x545eda:0x2c5,_0x5b2132:0x2cf,_0x12e158:0x279,_0x28f46e:0x283,_0x43bba5:0x2d2,_0x567179:0x2b9,_0x5b4e56:0x2a8,_0x428389:0x177,_0x32fb69:0x273,_0x340107:0x2a1},_0x26294e={_0x252538:0x3bf};function _0x553263(_0x21f4e8,_0x1cbfc7,_0x340ba7,_0xe7edd4){return _0x5098(_0x1cbfc7- -_0x26294e._0x252538,_0x21f4e8);}function _0x177efd(_0x32797a,_0x5806b6,_0x9d9b14,_0xdc4231){return _0x5098(_0x9d9b14- -0x286,_0xdc4231);}return _0x4399c8['id'][_0x553263(-_0x318a8f._0x545eda,-0x2b0,-_0x318a8f._0x5b2132,-0x29f)]()[_0x553263(-_0x318a8f._0x12e158,-_0x318a8f._0x28f46e,-0x28f,-0x29a)]>0x0&&_0x4399c8[_0x553263(-_0x318a8f._0x43bba5,-_0x318a8f._0x567179,-0x2b3,-_0x318a8f._0x5b4e56)][_0x177efd(-0x15a,-0x168,-_0x318a8f._0x428389,-0x181)]()[_0x553263(-_0x318a8f._0x32fb69,-0x283,-_0x318a8f._0x340107,-0x2a1)]>0x0;}function _0x3ea6(){const _0x46e6e0=['mZq4mJGWmKjSsMvrBW','B3v0Chv0rM9YBwf0','ANnVBL9Zy2HLBwe','Bwf4vg9Rzw5Z','DhLWzq','Dg9VBf91C2u','Dg9VBhm','mZGXndmZu01jshzm','mJm3nJi5nhDhCMvcAW','BwvKAwfFDhLWzq','Dgv4Da','sw1Hz2uGCMv0DxjUzwqGyNKGvMLLD0zPBguGzM9YihrVB2WGCMvZDwX0ia','Dg9VBf9Yzxn1Bhq','yxnZAxn0yw50','C2nOzw1H','C3rYAw5N','C3rYAwn0','yMfZzty0','Aw5JBhvKzuvUy3j5ChrLzenVBNrLBNq','ChvZAa','BwvZC2fNzq','neT2veftBq','CMvHC29UAw5NlMvUy3j5ChrLzf9JB250zw50','Dg9VBf91C2vFAwq','B2jQzwn0','CMvHC29UAw5N','CM9Szq','zgvZy3jPChrPB24','BwfW','vg9VBcbYzxr1CM5LzcbPBwfNzsbJB250zw50lG','DxnLCG','zNvUy3rPB25Fy2fSBf9VDxrWDxq','B3v0Chv0x3rLEhq','zNvUy3rPB25Fy2fSBa','zMLSDgvY','zgf0yq','B3bLBMfPuMvZCg9UC2vZt3v0Chv0','Aw5WDxrFC2nOzw1H','ChjVDMLKzxjtDgf0zq','DMLZAwjPBgL0Eq','BgvUz3rO','AxnbCNjHEq','A2v5CW','ntm3nZeWnu50DfLNsG','mJiZntqWng9uAMD4rq','zgf0ytO','C3bSAwnL','C291CMnL','BMfTzq','Aw1Hz2u','nJuWmda4oeX0Afjhva','y29UDgvUDa','C3vTBwfYEq','DxnLCI12AxnPyMXL','nde5mZq0mef4DerrBa','C3rYDwn0DxjLzf9VDxrWDxq','Bw9KzwW','DhjPBq','Aw5WDxrFAw1Hz2u','o2jHC2u2ncW','Aw5WDxrFDgv4Da','AM9PBG'];_0x3ea6=function(){return _0x46e6e0;};return _0x3ea6();}function hasSerializableToolResult(_0x2434ca){const _0x4ac3f4={_0x4c12b1:0x286,_0xf3bc30:0x258,_0xc80781:0x23a},_0x15463a={_0x203dd5:0x149},_0x216a6b={_0x20b406:0x11a};function _0x88b080(_0x204b18,_0x467f0a,_0x50db1a,_0x137d38){return _0x5098(_0x467f0a-_0x216a6b._0x20b406,_0x50db1a);}function _0x13b697(_0x4b6900,_0x241bf9,_0x75ebdd,_0x230901){return _0x5098(_0x241bf9-_0x15463a._0x203dd5,_0x75ebdd);}return _0x2434ca[_0x13b697(_0x4ac3f4._0x4c12b1,0x274,0x292,0x27e)][_0x13b697(0x277,_0x4ac3f4._0xf3bc30,0x24b,_0x4ac3f4._0xc80781)]()['length']>0x0;}function isResponseInputObject(_0x563b6b){const _0x349ee6={_0x4bf9bd:0xb3,_0x1d9a46:0xbb,_0xd0d038:0xa4,_0x99206f:0x22,_0x415b4b:0x6,_0x606358:0x9,_0x15ed62:0x13,_0x848751:0xb1,_0x15a5c6:0xad},_0x30eecb={_0x1a51c6:0x143};function _0x3f319c(_0x3d9b88,_0x5ca76f,_0x41d183,_0x55c53e){return _0x5098(_0x5ca76f- -_0x30eecb._0x1a51c6,_0x41d183);}if(typeof _0x563b6b!==_0x582876(-_0x349ee6._0x4bf9bd,-_0x349ee6._0x1d9a46,-0xb8,-_0x349ee6._0xd0d038)||_0x563b6b===null||Array[_0x3f319c(-_0x349ee6._0x99206f,-_0x349ee6._0x415b4b,-_0x349ee6._0x606358,-_0x349ee6._0x15ed62)](_0x563b6b))return![];function _0x582876(_0x47d071,_0x29efbc,_0x180d78,_0x42a8a4){return _0x5098(_0x42a8a4- -0x1d0,_0x180d78);}const _0x372b50=_0x563b6b;return typeof _0x372b50['type']===_0x582876(-0xcb,-_0x349ee6._0x848751,-0xbe,-_0x349ee6._0x15a5c6);}function isImageToolResultBlock(_0x12d6b3){const _0x481dd0={_0x17ff65:0x45e,_0x559f5f:0x50,_0x3332f1:0x66,_0x333a5f:0x67,_0x5be03e:0x42a,_0x1dba15:0x434,_0x2ee065:0x73,_0x2885fc:0x76,_0x6ee024:0x7c,_0x485715:0x44,_0x35289e:0x3c,_0x2cdb67:0x55,_0xb60b2c:0x5e,_0x17ea9f:0x6c,_0x597b3f:0x413,_0x34f531:0x43,_0x508c28:0x44,_0x274bab:0x38,_0x34507c:0x52,_0x2d1249:0x4a},_0x340e8e={_0x15e6f7:0x17b};if(typeof _0x12d6b3!==_0xf8678b(0x440,_0x481dd0._0x17ff65,0x45a,0x448)||_0x12d6b3===null||Array[_0x529145(-0x40,-0x34,-0x3e,-_0x481dd0._0x559f5f)](_0x12d6b3))return![];const _0x254757=_0x12d6b3;function _0x529145(_0x284339,_0x59b0a9,_0x48e178,_0x4b24ca){return _0x5098(_0x48e178- -_0x340e8e._0x15e6f7,_0x4b24ca);}function _0xf8678b(_0x2b3623,_0x230648,_0x177ea6,_0x3a598e){return _0x5098(_0x2b3623-0x314,_0x177ea6);}return _0x254757[_0x529145(-_0x481dd0._0x3332f1,-_0x481dd0._0x333a5f,-0x63,-0x7e)]===_0xf8678b(0x41b,0x403,_0x481dd0._0x5be03e,_0x481dd0._0x1dba15)&&_0x254757[_0x529145(-_0x481dd0._0x2ee065,-0x5a,-_0x481dd0._0x2885fc,-_0x481dd0._0x6ee024)]?.[_0x529145(-0x72,-_0x481dd0._0x485715,-0x63,-0x6c)]===_0x529145(-0x70,-_0x481dd0._0x35289e,-0x56,-0x5a)&&typeof _0x254757['source'][_0x529145(-0x5e,-_0x481dd0._0x2cdb67,-_0x481dd0._0xb60b2c,-0x63)]===_0x529145(-0x71,-_0x481dd0._0x17ea9f,-0x58,-0x57)&&typeof _0x254757[_0xf8678b(0x419,0x417,_0x481dd0._0x597b3f,0x408)][_0x529145(-_0x481dd0._0x34f531,-0x4f,-_0x481dd0._0x508c28,-_0x481dd0._0x274bab)]===_0x529145(-_0x481dd0._0x34507c,-0x47,-0x58,-_0x481dd0._0x2d1249);}function getToolResultText(_0xa4a47a){const _0x46b860={_0x7898aa:0x1e,_0x91996b:0xd,_0x1393c7:0x15,_0x2bd9b3:0x2b8,_0x14416a:0x2d9,_0x2c6394:0x2b5,_0x265b3e:0x2b3,_0x3229e6:0x2a0},_0x403746={_0x3f7856:0x1e,_0x20dd68:0x16,_0x334b29:0x3e,_0x43ab09:0x2d},_0x2a7301={_0x335190:0x1be},_0x3adf7a={_0x29c1fa:0x138},_0x27a74b={_0x443652:0x182};function _0x4ff08c(_0x103a02,_0x52c873,_0x14735a,_0x447f8c){return _0x5098(_0x52c873-_0x27a74b._0x443652,_0x103a02);}function _0x3f1123(_0x2dd4cf,_0x3804ad,_0x4854d2,_0xfbdfbe){return _0x5098(_0xfbdfbe- -_0x3adf7a._0x29c1fa,_0x3804ad);}if(typeof _0xa4a47a===_0x3f1123(-0x23,-_0x46b860._0x7898aa,-_0x46b860._0x91996b,-_0x46b860._0x1393c7))return _0xa4a47a;const _0x396168=_0xa4a47a[_0x4ff08c(0x2bf,_0x46b860._0x2bd9b3,0x2ac,0x2d2)](_0x54d007=>{const _0x59ac00={_0x112958:0x19d,_0x2e2882:0xa};function _0xdc9d93(_0xf51fef,_0x24a043,_0x2ab23b,_0xbf33ac){return _0x3f1123(_0xf51fef-_0x59ac00._0x112958,_0x2ab23b,_0x2ab23b-0xa3,_0x24a043- -_0x59ac00._0x2e2882);}function _0x38dad3(_0x7cd709,_0x3622b5,_0x2e4fb3,_0x5d96f1){return _0x4ff08c(_0x3622b5,_0x7cd709-0x80,_0x2e4fb3-0xd,_0x5d96f1-_0x2a7301._0x335190);}return typeof _0x54d007===_0xdc9d93(-_0x403746._0x3f7856,-_0x403746._0x20dd68,0x7,-0xe)&&_0x54d007!==null&&_0x54d007[_0xdc9d93(-_0x403746._0x334b29,-0x2a,-0xb,-_0x403746._0x43ab09)]==='text';})['map'](_0x525e91=>_0x525e91[_0x4ff08c(0x286,0x2a0,0x289,0x2b4)])['join']('\x0a\x0a')['trim']();return _0x396168[_0x4ff08c(0x2dc,0x2be,0x2a3,_0x46b860._0x14416a)]>0x0?_0x396168:_0x4ff08c(_0x46b860._0x2c6394,_0x46b860._0x265b3e,_0x46b860._0x3229e6,0x2c4);}function _0x5098(_0x9c2774,_0x4bea97){_0x9c2774=_0x9c2774-0x100;const _0x3ea631=_0x3ea6();let _0x50984e=_0x3ea631[_0x9c2774];if(_0x5098['liURcx']===undefined){var _0x4fc67e=function(_0x2a1428){const _0xa2a8f7='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x9ccbda='',_0x35a76b='';for(let _0x597ce1=0x0,_0x5781d1,_0x4e9b2c,_0x1d8255=0x0;_0x4e9b2c=_0x2a1428['charAt'](_0x1d8255++);~_0x4e9b2c&&(_0x5781d1=_0x597ce1%0x4?_0x5781d1*0x40+_0x4e9b2c:_0x4e9b2c,_0x597ce1++%0x4)?_0x9ccbda+=String['fromCharCode'](0xff&_0x5781d1>>(-0x2*_0x597ce1&0x6)):0x0){_0x4e9b2c=_0xa2a8f7['indexOf'](_0x4e9b2c);}for(let _0x4399c8=0x0,_0x2434ca=_0x9ccbda['length'];_0x4399c8<_0x2434ca;_0x4399c8++){_0x35a76b+='%'+('00'+_0x9ccbda['charCodeAt'](_0x4399c8)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x35a76b);};_0x5098['AcxOAP']=_0x4fc67e,_0x5098['GneHdG']={},_0x5098['liURcx']=!![];}const _0xec0801=_0x3ea631[0x0],_0x113ec3=_0x9c2774+_0xec0801,_0x5c0123=_0x5098['GneHdG'][_0x113ec3];return!_0x5c0123?(_0x50984e=_0x5098['AcxOAP'](_0x50984e),_0x5098['GneHdG'][_0x113ec3]=_0x50984e):_0x50984e=_0x5c0123,_0x50984e;}function getToolResultImages(_0x46eb89){const _0x28e45c={_0x3144e4:0x1a3,_0x305fbb:0x1cd,_0x4fc5c8:0x1c4,_0x1bce67:0x1b5},_0x3fa47b={_0x5279bb:0x2fa};function _0x3a8b75(_0x2e7dd4,_0x3bcf6f,_0x44cbe7,_0x1b9e7b){return _0x5098(_0x1b9e7b-0x114,_0x44cbe7);}function _0x36eae9(_0x499b12,_0x288e7b,_0x31cdba,_0x382951){return _0x5098(_0x499b12- -_0x3fa47b._0x5279bb,_0x382951);}return Array[_0x36eae9(-0x1bd,-0x1d4,-_0x28e45c._0x3144e4,-_0x28e45c._0x305fbb)](_0x46eb89)?_0x46eb89[_0x36eae9(-_0x28e45c._0x4fc5c8,-0x1d3,-0x1bb,-_0x28e45c._0x1bce67)](isImageToolResultBlock):[];}function resolveReasoningVisibility(_0x44117a){const _0xfaf69a={_0x3637fb:0x4f4,_0x214ebd:0x50a,_0x58663a:0x4da,_0x276be6:0x4fe,_0x489e1c:0x4b7},_0x2a962a={_0x4c71ed:0x3c7};function _0x54391e(_0x3a646a,_0x1af51e,_0x1900db,_0x34fb3f){return _0x5098(_0x3a646a-_0x2a962a._0x4c71ed,_0x34fb3f);}function _0x15dd2f(_0x2277cf,_0x6870ae,_0x4e0042,_0x35b945){return _0x5098(_0x35b945-0x5a,_0x2277cf);}return _0x44117a[_0x54391e(_0xfaf69a._0x3637fb,_0xfaf69a._0x214ebd,_0xfaf69a._0x58663a,0x512)]?.[_0x54391e(0x502,_0xfaf69a._0x276be6,0x4fb,0x4ee)]??_0x54391e(0x4d2,0x4d8,_0xfaf69a._0x489e1c,0x4c3);}function createOpenAiResponsesReasoning(_0x35ec40){const _0x49e4a7={_0x1c4596:0x1ad,_0x561c84:0x1a7,_0x47726c:0x131,_0x344523:0x119,_0x2cde4a:0x127,_0x10490f:0x1eb,_0x322e32:0x1d2,_0x4b471b:0x186,_0x547a5a:0x196,_0x784726:0x1a7,_0xa0726c:0x191},_0x355507={_0x4c9cc7:0x2cd};function _0x15f923(_0x47c455,_0x377a65,_0x551ac3,_0x5c93b3){return _0x5098(_0x5c93b3- -0x23d,_0x551ac3);}function _0x5551b2(_0x344f5c,_0x42e693,_0xe03477,_0x32eaa4){return _0x5098(_0x32eaa4- -_0x355507._0x4c9cc7,_0xe03477);}const _0x57425e=resolveOpenAiReasoningConfig(_0x35ec40['reasoning']);if(!_0x57425e)return{};const _0x3c9179={},_0x156cc8=_0x57425e['summary']??(resolveReasoningVisibility(_0x35ec40)===_0x5551b2(-0x1cc,-0x1df,-0x1d3,-0x1c2)?'auto':void 0x0);return _0x57425e['effort']&&(_0x3c9179['effort']=_0x57425e['effort']),_0x156cc8&&(_0x3c9179[_0x5551b2(-0x1b8,-0x1ce,-0x1c5,-0x1c3)]=_0x156cc8),{..._0x57425e[_0x5551b2(-_0x49e4a7._0x1c4596,-0x1a0,-0x196,-_0x49e4a7._0x561c84)]===![]?{}:{'include':[_0x15f923(-_0x49e4a7._0x47726c,-_0x49e4a7._0x344523,-_0x49e4a7._0x2cde4a,-0x113)]},...Object[_0x5551b2(-0x1d3,-_0x49e4a7._0x10490f,-_0x49e4a7._0x322e32,-0x1cd)](_0x3c9179)[_0x5551b2(-_0x49e4a7._0x4b471b,-_0x49e4a7._0x547a5a,-_0x49e4a7._0x784726,-_0x49e4a7._0xa0726c)]>0x0?{'reasoning':_0x3c9179}:{}};}function pushAssistantProviderState(_0x45e483,_0x4dec60){const _0x4cbc83={_0x2f4a14:0x2e1,_0x1e9767:0x2d8,_0x5090d8:0x2cc,_0x4f26a2:0x2af,_0x5749f6:0x79,_0x2b6293:0x5e,_0xc7d9c6:0x90,_0xa86643:0x7d},_0xa51f2b={_0x1b3c0d:0x19a},_0x165bd9={_0x289e90:0x192};if(_0x4dec60[_0x4a1c42(-0x6c,-0x60,-0x60,-0x71)]!=='assistant')return![];function _0x2698fb(_0x2f7ad0,_0x5c9990,_0x2b769b,_0x4e1785){return _0x5098(_0x4e1785-_0x165bd9._0x289e90,_0x5c9990);}const _0xa58fc3=_0x4dec60[_0x2698fb(0x2df,_0x4cbc83._0x2f4a14,_0x4cbc83._0x1e9767,_0x4cbc83._0x5090d8)]?.[_0x2698fb(_0x4cbc83._0x4f26a2,0x2b3,0x2b4,0x2ca)]??[];function _0x4a1c42(_0x1e489a,_0xc7eff8,_0x58ff44,_0x599c97){return _0x5098(_0x1e489a- -_0xa51f2b._0x1b3c0d,_0xc7eff8);}if(_0xa58fc3['length']===0x0)return![];for(const _0x34c032 of _0xa58fc3){if(isResponseInputObject(_0x34c032)){const _0x4b0ca6=structuredClone(_0x34c032);_0x4b0ca6['type']===_0x4a1c42(-0x6d,-_0x4cbc83._0x5749f6,-0x67,-_0x4cbc83._0x2b6293)&&!Array['isArray'](_0x4b0ca6[_0x4a1c42(-_0x4cbc83._0xc7d9c6,-0x95,-0x74,-0x99)])&&(_0x4b0ca6[_0x4a1c42(-_0x4cbc83._0xc7d9c6,-0x9c,-0xa6,-_0x4cbc83._0xa86643)]=[]),_0x45e483['push'](_0x4b0ca6);}}return!![];}function toOpenAiResponsesRequest(_0x3ec979){const _0x2ddcd6={_0x398e1d:0x2ea,_0x1f0ba4:0x2c5,_0x369a10:0x2e4,_0xc39e1a:0x2d6,_0x323fc4:0x152,_0x5a8f85:0x16d,_0x5a84d8:0x2fa,_0x3830d4:0x2ed,_0x51e838:0x14c,_0x5c19a5:0x15e,_0x1d113d:0x2df,_0x18f21b:0x2d6,_0x1de2b4:0x305,_0x3ff3ab:0x2d9,_0x349a9a:0x2de,_0x129ebc:0x2f1,_0x23d4a4:0x2fe,_0xae2ac5:0x2da,_0x357cbd:0x2d3,_0x31f890:0x159,_0x3217c1:0x157,_0x3feed6:0x18a,_0x2ab1b1:0x18a,_0x4c9295:0x197,_0x361654:0x192,_0x10aeb0:0x18d,_0x2c4f71:0x17b,_0x30eedc:0x153,_0x371628:0x2d1,_0xc6f530:0x13c,_0x2cc37b:0x149,_0x2b1bd4:0x139,_0x352edc:0x138,_0x5f57ae:0x13e,_0x2242ea:0x16e,_0x78aa06:0x17c,_0x1efa8d:0x18f,_0x2ec0bc:0x16a,_0x69ed1c:0x152,_0x426168:0x2c8,_0x76b54:0x2e5,_0x392414:0x165,_0x1b62af:0x2cd,_0x102f43:0x2d2,_0x5a0687:0x2ee,_0x24a431:0x2f9,_0x46a614:0x2e0,_0x57693a:0x2e1,_0x524707:0x2e1,_0x460e74:0x2bf,_0x442714:0x310,_0x5d529f:0x2f7,_0x30a3d0:0x30c,_0x38dda1:0x2e3,_0x3f0fa6:0x2cb,_0x1173ae:0x2d5,_0x53ee76:0x2e0,_0x717730:0x304,_0x4d0ba3:0x308,_0x3ceab1:0x302,_0x57e0b2:0x166,_0x491952:0x15d,_0x4b04dc:0x2f4,_0x1045d1:0x14b,_0x3c6b90:0x151,_0x3bb312:0x2fc,_0x3fea04:0x2f2,_0x519a59:0x2f6,_0x297ac3:0x2fc,_0x662f63:0x172,_0x5622b8:0x159,_0x373c38:0x2dc,_0xa2bd19:0x2d8,_0x1aa71b:0x15d,_0x1b9141:0x185,_0x555e3e:0x164,_0x42d691:0x2f8,_0x3ea6db:0x2f4,_0x360e83:0x189,_0x293e8f:0x17e,_0x2d7ad9:0x15b,_0x3a0b9e:0x173,_0x36e927:0x16f,_0x3c57af:0x2d7,_0x36771a:0x2e1,_0x1c9c93:0x168,_0x5d6444:0x306,_0x508165:0x2d7},_0x1064fe={_0x50ebe5:0x13f,_0x1c22f4:0x3dd,_0x45b006:0x411,_0x4014b1:0x3f9},_0xcae6dd={_0x1ab8cd:0x280},_0x33496a={_0x1fae4f:0x1cc};function _0x229fe4(_0x553f98,_0x53e282,_0xdd8066,_0x176e27){return _0x5098(_0xdd8066-_0x33496a._0x1fae4f,_0x53e282);}const _0x114c29=[];for(const _0x53b011 of _0x3ec979['messages']){if(pushAssistantProviderState(_0x114c29,_0x53b011))continue;const _0x4fed92=[];for(const _0x82c937 of normalizeContent(_0x53b011[_0x229fe4(0x2d7,0x2b6,0x2d5,_0x2ddcd6._0x398e1d)])){if(_0x82c937[_0x229fe4(_0x2ddcd6._0x1f0ba4,0x2e5,_0x2ddcd6._0x369a10,0x2ec)]===_0x229fe4(0x2d1,_0x2ddcd6._0xc39e1a,0x2ea,0x2eb)){_0x4fed92[_0x6a9da8(-0x171,-0x149,-0x159,-0x160)](_0x53b011[_0x6a9da8(-0x134,-0x13b,-_0x2ddcd6._0x323fc4,-_0x2ddcd6._0x5a8f85)]===_0x229fe4(_0x2ddcd6._0x5a84d8,0x2f7,_0x2ddcd6._0x3830d4,0x2ff)?{'type':_0x6a9da8(-0x138,-0x144,-_0x2ddcd6._0x51e838,-_0x2ddcd6._0x5c19a5),'text':_0x82c937[_0x229fe4(_0x2ddcd6._0x1d113d,_0x2ddcd6._0x18f21b,_0x2ddcd6._0x398e1d,_0x2ddcd6._0x1de2b4)]}:{'type':_0x229fe4(0x2c8,_0x2ddcd6._0x3ff3ab,_0x2ddcd6._0x349a9a,_0x2ddcd6._0x129ebc),'text':_0x82c937['text']});continue;}if(_0x82c937[_0x229fe4(0x2db,_0x2ddcd6._0x23d4a4,0x2e4,0x2ce)]===_0x229fe4(0x2ed,_0x2ddcd6._0xae2ac5,_0x2ddcd6._0x357cbd,0x2cf)){_0x4fed92[_0x6a9da8(-0x177,-0x170,-_0x2ddcd6._0x31f890,-_0x2ddcd6._0x3217c1)]({'type':_0x6a9da8(-_0x2ddcd6._0x3feed6,-0x170,-0x170,-_0x2ddcd6._0x2ab1b1),'image_url':_0x6a9da8(-0x182,-0x19a,-0x17d,-_0x2ddcd6._0x4c9295)+_0x82c937[_0x6a9da8(-_0x2ddcd6._0x361654,-_0x2ddcd6._0x10aeb0,-_0x2ddcd6._0x2c4f71,-0x196)]['media_type']+_0x6a9da8(-0x15b,-0x18c,-0x16f,-_0x2ddcd6._0x30eedc)+_0x82c937[_0x229fe4(0x2c2,0x2e0,_0x2ddcd6._0x371628,0x2d8)][_0x6a9da8(-_0x2ddcd6._0xc6f530,-0x14e,-_0x2ddcd6._0x2cc37b,-_0x2ddcd6._0x2b1bd4)]});continue;}pushUserContentMessage(_0x114c29,_0x53b011[_0x6a9da8(-0x167,-_0x2ddcd6._0x352edc,-_0x2ddcd6._0x323fc4,-_0x2ddcd6._0x5f57ae)],_0x4fed92[_0x6a9da8(-0x191,-_0x2ddcd6._0x2242ea,-_0x2ddcd6._0x78aa06,-_0x2ddcd6._0x1efa8d)](0x0));if(_0x82c937[_0x6a9da8(-_0x2ddcd6._0x2ec0bc,-_0x2ddcd6._0x69ed1c,-0x168,-0x163)]===_0x229fe4(0x2e1,_0x2ddcd6._0x426168,_0x2ddcd6._0x76b54,0x2c7)){if(!hasSerializableToolUse(_0x82c937))continue;_0x114c29['push']({'type':_0x6a9da8(-0x14d,-_0x2ddcd6._0x392414,-0x14b,-0x132),'call_id':_0x82c937['id'],'name':_0x82c937[_0x229fe4(_0x2ddcd6._0x1b62af,0x2e1,_0x2ddcd6._0x102f43,_0x2ddcd6._0x5a0687)],'arguments':JSON['stringify'](_0x82c937['input']??{})});continue;}if(_0x82c937[_0x229fe4(0x2f2,_0x2ddcd6._0x24a431,_0x2ddcd6._0x369a10,0x2d1)]===_0x229fe4(_0x2ddcd6._0x46a614,_0x2ddcd6._0x57693a,0x2ec,0x2ea)){if(!hasSerializableToolResult(_0x82c937))continue;const _0x1eb5f7=getToolResultText(_0x82c937[_0x229fe4(0x2f3,_0x2ddcd6._0x524707,0x2d5,_0x2ddcd6._0x460e74)]);_0x114c29['push']({'type':_0x229fe4(_0x2ddcd6._0x442714,_0x2ddcd6._0x5d529f,0x2ff,0x309),'call_id':_0x82c937[_0x229fe4(_0x2ddcd6._0x30a3d0,0x315,0x2f7,_0x2ddcd6._0x38dda1)],'output':_0x1eb5f7});const _0x13a1d9=getToolResultImages(_0x82c937[_0x229fe4(_0x2ddcd6._0xae2ac5,_0x2ddcd6._0x3f0fa6,_0x2ddcd6._0x1173ae,_0x2ddcd6._0x53ee76)]);_0x13a1d9[_0x229fe4(0x2fe,_0x2ddcd6._0x717730,_0x2ddcd6._0x4d0ba3,_0x2ddcd6._0x3ceab1)]>0x0&&_0x114c29[_0x6a9da8(-_0x2ddcd6._0x57e0b2,-0x15d,-0x159,-_0x2ddcd6._0x491952)]({'type':_0x229fe4(0x2fd,0x310,_0x2ddcd6._0x4b04dc,0x2e9),'role':_0x6a9da8(-_0x2ddcd6._0x1045d1,-0x16c,-0x14e,-_0x2ddcd6._0x3c6b90),'content':[{'type':'input_text','text':_0x229fe4(_0x2ddcd6._0x3bb312,0x2f3,0x2eb,_0x2ddcd6._0x371628)+_0x82c937[_0x6a9da8(-0x13c,-0x165,-0x155,-0x14f)]+'.'},..._0x13a1d9[_0x229fe4(_0x2ddcd6._0x3fea04,_0x2ddcd6._0x519a59,_0x2ddcd6._0x297ac3,0x315)](_0x9801b8=>({'type':_0x6a9da8(-0x172,-0x164,-0x170,-0x18d),'image_url':_0x229fe4(0x2eb,0x2cf,0x2cf,0x2ec)+_0x9801b8[_0x229fe4(0x2ef,0x2e6,0x2d1,0x2d4)][_0x6a9da8(-0x162,-0x169,-0x163,-0x166)]+';base64,'+_0x9801b8[_0x6a9da8(-0x188,-0x17d,-0x17b,-0x177)][_0x229fe4(0x321,0x2ee,0x303,0x2f2)]}))]});}}pushUserContentMessage(_0x114c29,_0x53b011['role'],_0x4fed92);}function _0x6a9da8(_0x22d35b,_0x1b3499,_0x18cb76,_0x1ab8d4){return _0x5098(_0x18cb76- -_0xcae6dd._0x1ab8cd,_0x1ab8d4);}return{...createOpenAiResponsesReasoning(_0x3ec979),'model':_0x3ec979[_0x6a9da8(-0x165,-0x162,-_0x2ddcd6._0x662f63,-_0x2ddcd6._0x5622b8)],'instructions':systemToInstructions(_0x3ec979['system']),'input':_0x114c29,..._0x3ec979[_0x229fe4(0x2ea,0x2ef,0x2e3,_0x2ddcd6._0x373c38)]!==void 0x0?{'max_output_tokens':_0x3ec979[_0x229fe4(_0x2ddcd6._0xa2bd19,_0x2ddcd6._0x426168,_0x2ddcd6._0x38dda1,_0x2ddcd6._0x3ceab1)]}:{},'tools':_0x3ec979[_0x6a9da8(-0x17f,-_0x2ddcd6._0x1aa71b,-0x166,-_0x2ddcd6._0x1b9141)][_0x6a9da8(-_0x2ddcd6._0x57e0b2,-0x166,-0x150,-_0x2ddcd6._0x555e3e)](_0x1165e6=>{function _0x278889(_0x2500b3,_0x217104,_0xc1b305,_0xaa438c){return _0x229fe4(_0x2500b3-0x3a,_0x217104,_0xaa438c-0xfc,_0xaa438c-0xd8);}function _0x5fb539(_0x48dce1,_0x3aef1b,_0x9c7b17,_0x4580c8){return _0x229fe4(_0x48dce1-0x1c9,_0x3aef1b,_0x48dce1- -0x176,_0x4580c8-0x3c);}return{'type':'function','name':_0x1165e6[_0x5fb539(0x15c,0x16f,_0x1064fe._0x50ebe5,0x159)],'description':_0x1165e6[_0x278889(0x3e2,0x40b,_0x1064fe._0x1c22f4,0x3f7)],'parameters':_0x1165e6[_0x278889(_0x1064fe._0x45b006,_0x1064fe._0x4014b1,0x401,0x401)]};}),..._0x3ec979[_0x229fe4(_0x2ddcd6._0x42d691,_0x2ddcd6._0x373c38,0x2e1,0x2ff)]?{'text':{'format':{'type':_0x229fe4(_0x2ddcd6._0x3ea6db,0x2de,0x2e2,0x2ef),'name':_0x3ec979[_0x6a9da8(-_0x2ddcd6._0x360e83,-_0x2ddcd6._0x293e8f,-0x16b,-_0x2ddcd6._0x2d7ad9)][_0x229fe4(_0x2ddcd6._0x1d113d,0x2e6,0x2d2,0x2c9)]??_0x6a9da8(-0x15a,-0x184,-_0x2ddcd6._0x3a0b9e,-_0x2ddcd6._0x36e927),'schema':_0x3ec979[_0x229fe4(0x2f9,_0x2ddcd6._0x3c57af,_0x2ddcd6._0x36771a,0x2f7)][_0x6a9da8(-_0x2ddcd6._0x1c9c93,-0x159,-_0x2ddcd6._0x5c19a5,-0x17d)],'strict':_0x3ec979['outputFormat'][_0x229fe4(0x2f9,_0x2ddcd6._0x5d6444,0x2f0,_0x2ddcd6._0x508165)]??!![]}}}:{}};}export{toOpenAiResponsesRequest};
|
package/dist/chunk-UIXQPCSN.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(function(_0x394d30,_0x531ef6){const _0xb50829={_0x2478a3:0x295,_0x42555e:0x272,_0x4d447f:0x291,_0xcdf0c2:0x24d,_0x4901fc:0x213,_0x59b75f:0x2e7,_0x54840e:0x2b0,_0x40cafc:0x207,_0x4b7cab:0x25c,_0x384f72:0x205,_0x398fc5:0x24e,_0x223b5f:0x2a4,_0x4cf696:0x27d,_0xb492f8:0x318,_0xcd4961:0x248,_0x384407:0x28c,_0x55eed9:0x244,_0x26281e:0x242,_0x3309a5:0x1e6,_0x35ab58:0x1f3,_0x557c44:0x1d6,_0x455baf:0x2b2,_0x4396d2:0x2b0},_0x3f1277={_0x474f46:0x151};function _0x4ddeb1(_0x516d29,_0x25c76f,_0x415b37,_0xac9ec0){return _0x45e0(_0x415b37-_0x3f1277._0x474f46,_0x516d29);}const _0x54fb95=_0x394d30();function _0x592434(_0x5912d0,_0x3fdc5c,_0x5a648e,_0x4750ae){return _0x45e0(_0x5a648e-0xce,_0x4750ae);}while(!![]){try{const _0x460bbc=-parseInt(_0x592434(_0xb50829._0x2478a3,_0xb50829._0x42555e,0x273,0x271))/0x1+parseInt(_0x592434(0x246,_0xb50829._0x4d447f,_0xb50829._0xcdf0c2,_0xb50829._0x4901fc))/0x2*(parseInt(_0x4ddeb1(0x2fa,_0xb50829._0x59b75f,_0xb50829._0x54840e,0x2b5))/0x3)+parseInt(_0x592434(0x256,0x21f,_0xb50829._0x40cafc,0x21b))/0x4+parseInt(_0x4ddeb1(_0xb50829._0x4b7cab,_0xb50829._0x384f72,_0xb50829._0x398fc5,_0xb50829._0x223b5f))/0x5*(parseInt(_0x4ddeb1(_0xb50829._0x4cf696,0x2d3,0x2d1,_0xb50829._0xb492f8))/0x6)+-parseInt(_0x4ddeb1(0x247,_0xb50829._0xcd4961,0x273,_0xb50829._0x384407))/0x7*(parseInt(_0x592434(0x230,0x20d,0x216,_0xb50829._0x55eed9))/0x8)+parseInt(_0x4ddeb1(_0xb50829._0x398fc5,0x256,0x279,_0xb50829._0x26281e))/0x9*(parseInt(_0x592434(_0xb50829._0x3309a5,_0xb50829._0x35ab58,0x21f,_0xb50829._0x557c44))/0xa)+parseInt(_0x592434(_0xb50829._0x455baf,_0xb50829._0x4396d2,0x263,0x238))/0xb*(-parseInt(_0x592434(0x247,0x23d,0x1f1,0x1d0))/0xc);if(_0x460bbc===_0x531ef6)break;else _0x54fb95['push'](_0x54fb95['shift']());}catch(_0x58f621){_0x54fb95['push'](_0x54fb95['shift']());}}}(_0x462c,0xdd882));import{createAssistantTextMessage,createReasoningMessage,createToolResultUserMessage,createToolUseMessage,getToolUseBlocks,normalizeMessage,normalizeSystem,responseToAssistantMessage,synthesizeMissingToolResults}from'./chunk-YWQXXHHU.js';import{TurnFailedError}from'./chunk-FFIZ6TKW.js';import{addAbortListener,isAbortError,throwIfAborted,toAbortError}from'./chunk-X7VAACWY.js';function isJsonObject(_0x3fd3bb){const _0x17d80b={_0x15b8b1:0x56,_0x1503f3:0x9e,_0x11497e:0xa2,_0x42dbaa:0x41b};function _0x5d8a1e(_0x7885d8,_0x1d03df,_0x2fe73e,_0x398acd){return _0x45e0(_0x1d03df-0x2da,_0x398acd);}function _0x13ba0e(_0x1659a0,_0x3c0bb6,_0x54d5ee,_0xe2d051){return _0x45e0(_0x54d5ee- -0xcf,_0xe2d051);}return typeof _0x3fd3bb===_0x13ba0e(_0x17d80b._0x15b8b1,_0x17d80b._0x1503f3,_0x17d80b._0x11497e,0xdd)&&_0x3fd3bb!==null&&!Array[_0x5d8a1e(0x46e,0x450,0x448,_0x17d80b._0x42dbaa)](_0x3fd3bb);}function isToolOutputEnvelope(_0x315d82){const _0xab2ad7={_0x4ca3b9:0x366,_0x1d0a99:0x511,_0x577047:0x4d5,_0x2bded6:0x4f1,_0x4f4659:0x53a,_0x502251:0x4e8,_0x5ca93b:0x2d5,_0x30e884:0x34e,_0x45f264:0x301,_0x23d68e:0x493,_0x2628ba:0x4cf,_0x7ff904:0x4e0},_0x270932={_0x358e95:0x358};if(typeof _0x315d82!==_0x17f99b(0x381,0x397,_0xab2ad7._0x4ca3b9,0x336)||_0x315d82===null||Array[_0x19f480(0x49b,0x4ce,_0xab2ad7._0x1d0a99,_0xab2ad7._0x577047)](_0x315d82))return![];if(typeof _0x315d82[_0x19f480(_0xab2ad7._0x2bded6,0x4e7,_0xab2ad7._0x4f4659,_0xab2ad7._0x502251)]!==_0x17f99b(_0xab2ad7._0x5ca93b,_0xab2ad7._0x30e884,0x313,_0xab2ad7._0x45f264))return![];function _0x17f99b(_0x32cbfc,_0x7a3798,_0x8b1640,_0x1088f4){return _0x45e0(_0x8b1640-0x1f5,_0x32cbfc);}function _0x19f480(_0x2baac2,_0x3c5a81,_0xc30ec1,_0x102efc){return _0x45e0(_0x3c5a81-_0x270932._0x358e95,_0x102efc);}const _0x1cc322=_0x315d82[_0x19f480(_0xab2ad7._0x23d68e,_0xab2ad7._0x2628ba,0x48a,_0xab2ad7._0x7ff904)];return _0x1cc322===void 0x0||isJsonObject(_0x1cc322);}function validateAgainstSchema(_0x4669ea,_0x13dd65,_0x5db079){const _0xd0f412={_0xbbf3a0:0x35d,_0x4e953e:0x367,_0x372958:0x325,_0x8412bd:0x3a1,_0x331d58:0x3cb,_0xa11956:0x3b3,_0x2a6b0a:0x383,_0xac0b15:0x355,_0x36c3b7:0x145,_0x341b03:0x11a,_0x367e15:0x169,_0x3b0db2:0x172,_0x2667b6:0x177,_0x145b06:0x192,_0x363671:0x35f,_0x30eada:0x3a2,_0x3b43f3:0x393,_0x27dbd9:0x398,_0x13a3bd:0x177,_0x484432:0x174,_0x4e138d:0x1be,_0x20c1f8:0x1ce,_0x4c62ec:0x178,_0x3464fb:0x14a,_0x4f3b97:0x1b9,_0x574718:0x175,_0x131aeb:0x354,_0x53ae5f:0x3e2,_0x50e170:0x183,_0x390a7a:0x169,_0x39762e:0x189,_0x2ae3fa:0x1c0,_0x39a013:0x210,_0x462b96:0x208,_0x463bbd:0x1d4,_0x2987f0:0x189,_0x414879:0x3e0,_0x2c0d3f:0x3b0},_0x53c9c2={_0x4d9852:0x108},_0xc4bcca={_0x1b317f:0x2eb};function _0x3fb5de(_0x4b4c72,_0x499a37,_0x20e060,_0x56e396){return _0x45e0(_0x20e060- -_0xc4bcca._0x1b317f,_0x499a37);}function _0x381948(_0x3dd857,_0x11d9dd,_0x3d9df3,_0x4602f8){return _0x45e0(_0x11d9dd-0x249,_0x4602f8);}switch(_0x5db079[_0x381948(0x37e,_0xd0f412._0xbbf3a0,0x35b,0x390)]){case _0x381948(0x3a6,_0xd0f412._0x4e953e,_0xd0f412._0x372958,_0xd0f412._0x8412bd):if(typeof _0x13dd65!=='string')throw new Error(_0x381948(0x3c2,_0xd0f412._0x331d58,_0xd0f412._0xa11956,0x393)+_0x4669ea+_0x381948(0x3d5,_0xd0f412._0x2a6b0a,_0xd0f412._0xac0b15,0x366));return;case'number':if(typeof _0x13dd65!==_0x3fb5de(-0x143,-0x16c,-_0xd0f412._0x36c3b7,-_0xd0f412._0x341b03))throw new Error(_0x3fb5de(-0x198,-0x1ba,-_0xd0f412._0x367e15,-0x18f)+_0x4669ea+_0x3fb5de(-0x1cf,-0x1f1,-0x1ae,-0x163));return;case _0x3fb5de(-_0xd0f412._0x3b0db2,-_0xd0f412._0x2667b6,-_0xd0f412._0x145b06,-0x1be):if(typeof _0x13dd65!==_0x381948(_0xd0f412._0x363671,_0xd0f412._0x30eada,_0xd0f412._0x3b43f3,_0xd0f412._0x27dbd9))throw new Error(_0x3fb5de(-0x1a1,-0x1b7,-0x169,-_0xd0f412._0x13a3bd)+_0x4669ea+_0x3fb5de(-_0xd0f412._0x484432,-0x134,-0x170,-_0xd0f412._0x4e138d));return;case _0x3fb5de(-0x16a,-_0xd0f412._0x20c1f8,-_0xd0f412._0x4c62ec,-_0xd0f412._0x3464fb):if(!Array[_0x3fb5de(-_0xd0f412._0x4f3b97,-0x151,-_0xd0f412._0x574718,-0x176)](_0x13dd65))throw new Error(_0x3fb5de(-0x13d,-0x166,-_0xd0f412._0x367e15,-0x12b)+_0x4669ea+_0x381948(0x34a,0x38b,0x338,_0xd0f412._0x131aeb));_0x13dd65['forEach']((_0x47afe4,_0x29b376)=>{const _0x339d98={_0x19916c:0x1,_0x343fac:0x28f};function _0x5ce786(_0x907615,_0x5e7a49,_0x566481,_0x9aaff5){return _0x381948(_0x907615-_0x339d98._0x19916c,_0x907615- -_0x339d98._0x343fac,_0x566481-0x17c,_0x9aaff5);}validateAgainstSchema(_0x4669ea+'['+_0x29b376+']',_0x47afe4,_0x5db079[_0x5ce786(0x15d,0x140,_0x53c9c2._0x4d9852,0x1a0)]);});return;case _0x381948(0x3f3,0x3ba,0x3ab,_0xd0f412._0x53ae5f):if(!isJsonObject(_0x13dd65))throw new Error(_0x381948(0x40b,0x3cb,0x3a0,0x3e1)+_0x4669ea+':\x20expected\x20object');for(const _0x34ee1d of _0x5db079['required']??[]){if(!(_0x34ee1d in _0x13dd65))throw new Error(_0x3fb5de(-0x15e,-_0xd0f412._0x50e170,-_0xd0f412._0x390a7a,-_0xd0f412._0x39762e)+_0x4669ea+_0x3fb5de(-_0xd0f412._0x2ae3fa,-_0xd0f412._0x39a013,-0x1b9,-_0xd0f412._0x462b96)+_0x34ee1d+'\x22');}for(const [_0x19b19b,_0x54c523]of Object[_0x3fb5de(-0x191,-_0xd0f412._0x463bbd,-_0xd0f412._0x2987f0,-0x1a0)](_0x5db079[_0x381948(0x38a,_0xd0f412._0x414879,0x3e3,_0xd0f412._0x2c0d3f)])){_0x19b19b in _0x13dd65&&validateAgainstSchema(_0x4669ea+'.'+_0x19b19b,_0x13dd65[_0x19b19b],_0x54c523);}}}function normalizeToolOutputValue(_0x1abef5){const _0x2f2c7b={_0x1fbf89:0x2c9,_0x45f195:0x314,_0xed422e:0x2cd,_0x5898d3:0x2d1,_0x5e4da7:0x2c9,_0x5526c5:0x27c,_0x677d94:0x278,_0x47b6ed:0x2fc,_0x186c12:0xf3,_0xbba65b:0xe7,_0x4a6ea0:0x10d,_0xc7e4c:0x11c,_0x4e84e6:0xc6,_0x3f668f:0xa3,_0x4717aa:0xf9,_0x25e990:0xf8,_0x577320:0xc9,_0x15ed30:0xa3,_0x3d3988:0xc8,_0x372b94:0xb7,_0x2c9b5d:0x113},_0x1785c6={_0x355751:0x58};function _0x459b1f(_0x575bfc,_0x5cafe0,_0x16b66b,_0x1a06fe){return _0x45e0(_0x5cafe0- -_0x1785c6._0x355751,_0x575bfc);}if(isToolOutputEnvelope(_0x1abef5))return{'output':_0x1abef5[_0x4d5480(_0x2f2c7b._0x1fbf89,_0x2f2c7b._0x45f195,_0x2f2c7b._0xed422e,_0x2f2c7b._0x5898d3)],'structured':_0x1abef5['structured']??{'value':_0x1abef5[_0x4d5480(_0x2f2c7b._0x5e4da7,_0x2f2c7b._0x5526c5,_0x2f2c7b._0x677d94,_0x2f2c7b._0x47b6ed)]},..._0x1abef5[_0x459b1f(_0x2f2c7b._0x186c12,0xe7,0xcc,0xe5)]!==void 0x0?{'content':_0x1abef5[_0x459b1f(0xe4,_0x2f2c7b._0xbba65b,_0x2f2c7b._0x4a6ea0,_0x2f2c7b._0xc7e4c)]}:{}};if(typeof _0x1abef5===_0x459b1f(0xca,_0x2f2c7b._0x4e84e6,0xe7,_0x2f2c7b._0x3f668f))return{'output':_0x1abef5,'structured':{'value':_0x1abef5}};function _0x4d5480(_0x2ffc82,_0x3522c7,_0x58cd27,_0x57bc05){return _0x45e0(_0x2ffc82-0x13a,_0x57bc05);}if(typeof _0x1abef5===_0x459b1f(_0x2f2c7b._0x4717aa,0x119,_0x2f2c7b._0x25e990,_0x2f2c7b._0x577320)&&_0x1abef5!==null&&!Array[_0x459b1f(0x14c,0x11e,0xf6,0xfd)](_0x1abef5))return{'output':JSON['stringify'](_0x1abef5,null,0x2),'structured':_0x1abef5};return{'output':JSON[_0x459b1f(_0x2f2c7b._0x15ed30,_0x2f2c7b._0x3d3988,_0x2f2c7b._0x372b94,_0x2f2c7b._0x2c9b5d)](_0x1abef5,null,0x2),'structured':{'value':_0x1abef5}};}function createToolOutput(_0x4c419a,_0x5c198e={'value':_0x4c419a},_0x5178f5){return{'output':_0x4c419a,'structured':_0x5c198e,..._0x5178f5!==void 0x0?{'content':_0x5178f5}:{}};}var ToolExecutionError=class extends Error{[_0xaba6e0(0x12b,0x16c,0x132,0x160)];constructor(_0x1f7ea7,_0x539322={}){const _0x3d245e={_0x39b9c0:0x262,_0x3cc869:0x253,_0x22a673:0x26d},_0x459f98={_0x31366c:0x14b};super(_0x1f7ea7);function _0x338137(_0x195b34,_0x4d7400,_0x194fe3,_0x25fcbd){return _0xaba6e0(_0x195b34-0x1d5,_0x25fcbd,_0x195b34- -0x38c,_0x25fcbd-_0x459f98._0x31366c);}this[_0x338137(-_0x3d245e._0x39b9c0,-_0x3d245e._0x3cc869,-0x24c,-_0x3d245e._0x22a673)]='ToolExecutionError',this['structured']=_0x539322;}};function defineTool(_0x40cb91){return _0x40cb91;}var ToolRegistry=class{[_0xaba6e0(0x104,0xfa,0x129,0xe7)]=new Map();constructor(_0x284f03=[]){const _0x13f72e={_0x13a612:0x2b2},_0x3d2dc3={_0x230255:0x29f};function _0x281204(_0x209b23,_0x4c5409,_0x34549f,_0x3e8232){return _0x50a2ac(_0x209b23,_0x3e8232- -_0x3d2dc3._0x230255,_0x34549f-0x5a,_0x3e8232-0x12);}for(const _0x1bec11 of _0x284f03){this[_0x281204(0x2d2,0x2df,_0x13f72e._0x13a612,0x29d)](_0x1bec11);}}[_0xaba6e0(0xec,0x143,0x12d,0x13f)](_0x57ca3f){const _0x292e17={_0x425652:0x404,_0x20e323:0x429,_0x5f5759:0x16f},_0x597db3={_0x12f512:0x2db},_0x1c0b97={_0x370c68:0x9e};function _0x3de08d(_0x5e8ce6,_0x1f37e8,_0x2af9fe,_0x367f39){return _0xaba6e0(_0x5e8ce6-0xe6,_0x1f37e8,_0x5e8ce6-0x7f,_0x367f39-_0x1c0b97._0x370c68);}function _0x238a38(_0x1ce008,_0x51b0f9,_0x29b282,_0x3b3474){return _0xaba6e0(_0x1ce008-0x2f,_0x51b0f9,_0x29b282-_0x597db3._0x12f512,_0x3b3474-0x34);}this[_0x238a38(0x408,0x437,_0x292e17._0x425652,_0x292e17._0x20e323)][_0x3de08d(0x148,0x181,_0x292e17._0x5f5759,0x140)](_0x57ca3f['name'],_0x57ca3f);}['get'](_0x3fb8cd){const _0x1e80a1={_0x2f31fe:0x4c1,_0x17e3ba:0x424},_0x830eec={_0x1c0346:0x1ab};function _0x86fd7e(_0x3b78e9,_0x24d588,_0xa85fc2,_0x524ac3){return _0xaba6e0(_0x3b78e9-0x1d3,_0xa85fc2,_0x24d588- -0x3b,_0x524ac3-0x193);}function _0x571d6b(_0x51f720,_0x49e959,_0x10211c,_0xf2d161){return _0xaba6e0(_0x51f720-_0x830eec._0x1c0346,_0xf2d161,_0x10211c-0x38e,_0xf2d161-0xb9);}return this[_0x571d6b(0x4f4,_0x1e80a1._0x2f31fe,0x4b7,0x4eb)][_0x571d6b(0x47c,0x42d,0x472,_0x1e80a1._0x17e3ba)](_0x3fb8cd);}[_0xaba6e0(0xe8,0x147,0x11b,0xc6)](){const _0x52a438={_0xe13ab0:0xd8,_0x44ad43:0x122,_0x1c2775:0xfe,_0x8b902b:0x1b0,_0x5836b1:0x12d,_0x1e2cf7:0x15a},_0x4b0d41={_0xfd3e6:0x610,_0x5e1b5b:0x12f},_0x5c485f={_0xa5fc18:0x687};function _0xab4e10(_0x58691f,_0x595b50,_0x3c671e,_0x2416ee){return _0x50a2ac(_0x58691f,_0x2416ee- -_0x5c485f._0xa5fc18,_0x3c671e-0x166,_0x2416ee-0xf5);}function _0x1fb982(_0x58a817,_0x469d35,_0x1c3307,_0x1ac5c0){return _0x50a2ac(_0x1ac5c0,_0x58a817- -_0x4b0d41._0xfd3e6,_0x1c3307-0x161,_0x1ac5c0-_0x4b0d41._0x5e1b5b);}return[...this[_0x1fb982(-_0x52a438._0xe13ab0,-0x10a,-_0x52a438._0x44ad43,-_0x52a438._0x1c2775)][_0xab4e10(-_0x52a438._0x8b902b,-_0x52a438._0x5836b1,-0x11c,-_0x52a438._0x1e2cf7)]()];}[_0xaba6e0(0x120,0x13b,0x140,0x16c)](){const _0x1e28f5={_0x5cfbc6:0x8,_0xd49756:0x3b,_0x54bdef:0x43,_0x35b3d3:0xd,_0x56cf8d:0x3a},_0x10cea9={_0x555d80:0x22f,_0x41a5c4:0x1ee,_0x164e7c:0x230,_0x4bf35a:0x224,_0x178037:0x251,_0x15f8b6:0x1fc},_0x36cac0={_0x2f7ab4:0x1},_0x10db96={_0x4f2810:0xd0},_0x4134d5={_0x41693f:0xce,_0x4f945b:0x113},_0x1da282={_0x3c59ed:0x13,_0x518176:0x1f};function _0x5f3b2d(_0x735c28,_0x5f4730,_0x39f1ef,_0x1b4057){return _0xaba6e0(_0x735c28-_0x1da282._0x3c59ed,_0x39f1ef,_0x735c28-0x280,_0x1b4057-_0x1da282._0x518176);}function _0x134814(_0x108b63,_0x1217bc,_0x72818d,_0x3dc381){return _0x50a2ac(_0x108b63,_0x3dc381- -0x56d,_0x72818d-_0x4134d5._0x41693f,_0x3dc381-_0x4134d5._0x4f945b);}return this[_0x134814(-_0x1e28f5._0x5cfbc6,-0x14,-_0x1e28f5._0xd49756,-_0x1e28f5._0x54bdef)]()[_0x134814(-_0x1e28f5._0x35b3d3,-0x8c,-0x3c,-_0x1e28f5._0x56cf8d)](_0x221dd5=>{function _0x58e743(_0x38c62e,_0x2eb375,_0x204256,_0xebe3c8){return _0x134814(_0x204256,_0x2eb375-_0x10db96._0x4f2810,_0x204256-0x12b,_0x38c62e-0x263);}function _0x2f2e3f(_0x4f0aaf,_0xaa5fe6,_0x378c59,_0x334f08){return _0x134814(_0x334f08,_0xaa5fe6-0x115,_0x378c59-_0x36cac0._0x2f7ab4,_0x378c59-0x10b);}return{'name':_0x221dd5[_0x58e743(_0x10cea9._0x555d80,_0x10cea9._0x41a5c4,0x26b,_0x10cea9._0x164e7c)],'description':_0x221dd5[_0x58e743(_0x10cea9._0x4bf35a,0x1fc,_0x10cea9._0x555d80,0x1fb)],'input_schema':_0x221dd5[_0x58e743(0x228,_0x10cea9._0x178037,_0x10cea9._0x15f8b6,0x205)]};});}};function validateToolInput(_0x1f11e5,_0xaefa5b){const _0xb53217={_0xed1cb3:0x3c4},_0x3955e4={_0x332817:0x107};validateAgainstSchema(_0x7abd62(_0xb53217._0xed1cb3,0x444,0x416,0x45f),_0x1f11e5,_0xaefa5b);function _0x7abd62(_0x305dc5,_0x39133e,_0x21e40f,_0x4db51c){return _0x50a2ac(_0x4db51c,_0x21e40f- -_0x3955e4._0x332817,_0x21e40f-0xb1,_0x4db51c-0x2a);}return _0x1f11e5;}function deriveFinalToolOutput(_0xffd13c){const _0x48c8db={_0x212a61:0x243,_0x4c33b3:0x238,_0x5c0d05:0xf5,_0x1beaf3:0xf9,_0x45d10e:0xa6,_0x54428c:0xb1,_0x23a35f:0xad,_0x5ed4d8:0x20f,_0x53d6c5:0x1ef,_0x4864ec:0x22d,_0x529159:0x10a,_0x40564a:0x14e,_0xa22f2a:0x138,_0xb0435d:0x254,_0x35ec07:0x220,_0x4828d1:0x12b,_0x154f50:0xc4},_0x2376bd={_0x12956f:0x5ff,_0x146e68:0x76},_0x296eb9={_0x54e24d:0x2df,_0xfa442d:0xb2};if(_0xffd13c[_0xf6151c(0x22b,0x23e,_0x48c8db._0x212a61,_0x48c8db._0x4c33b3)]===0x0)return{'output':'','structured':{}};if(_0xffd13c[_0x235d77(-_0x48c8db._0x5c0d05,-0xc2,-_0x48c8db._0x1beaf3,-0x13e)]===0x1)return{'output':_0xffd13c[0x0][_0x235d77(-0xa6,-_0x48c8db._0x45d10e,-_0x48c8db._0x54428c,-_0x48c8db._0x23a35f)],'structured':_0xffd13c[0x0]['structured'],..._0xffd13c[0x0][_0xf6151c(0x22a,_0x48c8db._0x5ed4d8,_0x48c8db._0x53d6c5,_0x48c8db._0x4864ec)]!==void 0x0?{'content':_0xffd13c[0x0]['content']}:{}};function _0xf6151c(_0xcfb63d,_0x36cbdd,_0x3976c9,_0x203bbb){return _0x50a2ac(_0x3976c9,_0xcfb63d- -_0x296eb9._0x54e24d,_0x3976c9-_0x296eb9._0xfa442d,_0x203bbb-0x8d);}function _0x235d77(_0x258bbd,_0x4f0743,_0x35f096,_0x131fda){return _0x50a2ac(_0x4f0743,_0x258bbd- -_0x2376bd._0x12956f,_0x35f096-0x8c,_0x131fda-_0x2376bd._0x146e68);}const _0x1f828a=_0xffd13c[_0x235d77(-_0x48c8db._0x529159,-_0x48c8db._0x40564a,-_0x48c8db._0xa22f2a,-0x148)](_0x4786c6=>_0x4786c6[_0x235d77(-0xf6,-0xdf,-0x117,-0x129)]!==void 0x0);return{'output':_0xffd13c[_0xf6151c(_0x48c8db._0xb0435d,0x20d,_0x48c8db._0x35ec07,0x26e)](_0x386ce7=>_0x386ce7[_0x235d77(-0xa6,-0x8c,-0x96,-0x5b)])['join'](''),'structured':{'chunks':_0xffd13c['map'](_0x33a3c1=>_0x33a3c1['structured'])},..._0x1f828a[_0x235d77(-0xf5,-_0x48c8db._0x4828d1,-0x142,-_0x48c8db._0x154f50)]===0x1?{'content':_0x1f828a[0x0][_0x235d77(-0xf6,-0xb0,-0xa8,-0xa2)]}:{}};}function _0x45e0(_0x3c4d00,_0x5a6fdf){_0x3c4d00=_0x3c4d00-0xfd;const _0x462cde=_0x462c();let _0x45e0e4=_0x462cde[_0x3c4d00];if(_0x45e0['lyugAF']===undefined){var _0x5cb3ea=function(_0x538024){const _0x30bb68='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x3fd3bb='',_0x315d82='';for(let _0x1cc322=0x0,_0x4669ea,_0x13dd65,_0x5db079=0x0;_0x13dd65=_0x538024['charAt'](_0x5db079++);~_0x13dd65&&(_0x4669ea=_0x1cc322%0x4?_0x4669ea*0x40+_0x13dd65:_0x13dd65,_0x1cc322++%0x4)?_0x3fd3bb+=String['fromCharCode'](0xff&_0x4669ea>>(-0x2*_0x1cc322&0x6)):0x0){_0x13dd65=_0x30bb68['indexOf'](_0x13dd65);}for(let _0x47afe4=0x0,_0x29b376=_0x3fd3bb['length'];_0x47afe4<_0x29b376;_0x47afe4++){_0x315d82+='%'+('00'+_0x3fd3bb['charCodeAt'](_0x47afe4)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x315d82);};_0x45e0['nKtqvr']=_0x5cb3ea,_0x45e0['iHjMhL']={},_0x45e0['lyugAF']=!![];}const _0x3655d0=_0x462cde[0x0],_0x56c2bd=_0x3c4d00+_0x3655d0,_0x32c3e1=_0x45e0['iHjMhL'][_0x56c2bd];return!_0x32c3e1?(_0x45e0e4=_0x45e0['nKtqvr'](_0x45e0e4),_0x45e0['iHjMhL'][_0x56c2bd]=_0x45e0e4):_0x45e0e4=_0x32c3e1,_0x45e0e4;}function createToolMeta(){return{'transforms':[]};}function createErrorToolResult(_0x153edb,_0xe30286,_0x21908a,_0x22df14=[]){const _0x182504={_0x4dd4d4:0xe,_0x2980f4:0x32,_0x3b7164:0x2a},_0x52505b={_0x2fd28f:0x52b,_0x495b09:0x111};function _0x472d0f(_0x570b27,_0xa95e85,_0x21fb70,_0x232954){return _0x50a2ac(_0x21fb70,_0x570b27- -_0x52505b._0x2fd28f,_0x21fb70-0x13d,_0x232954-_0x52505b._0x495b09);}return{'callId':_0x153edb['id'],'toolName':_0x153edb[_0x472d0f(_0x182504._0x4dd4d4,_0x182504._0x2980f4,_0x182504._0x3b7164,-0x48)],'status':'error','output':_0xe30286,'structured':_0x21908a,'chunks':_0x22df14,'meta':createToolMeta()};}function createRejectedToolResult(_0x4007c0,_0x2b9f77){const _0x5c29f2={_0x10157d:0x63,_0x4c2bbb:0x7c,_0x3592f3:0x70,_0x5d8993:0x58,_0xd6daf3:0x34,_0x597c98:0x65,_0x1da3f6:0x20c},_0x2bb55e={_0x540e43:0x160},_0x3e3c6a={_0x9e5020:0x2b0};function _0x486e36(_0x519db9,_0x3db764,_0x1e62cd,_0x2269da){return _0x50a2ac(_0x519db9,_0x3db764- -_0x3e3c6a._0x9e5020,_0x1e62cd-0x14b,_0x2269da-0x180);}function _0x367cec(_0x51e29a,_0x238a9f,_0x1a6260,_0x1a123e){return _0x50a2ac(_0x51e29a,_0x238a9f- -0x56d,_0x1a6260-0x49,_0x1a123e-_0x2bb55e._0x540e43);}const _0x3f1e24=_0x2b9f77?.['trim']()[_0x367cec(-0x92,-_0x5c29f2._0x10157d,-_0x5c29f2._0x4c2bbb,-0x70)]?_0x2b9f77:_0x367cec(-0x9f,-_0x5c29f2._0x3592f3,-_0x5c29f2._0x5d8993,-0xb0)+_0x4007c0[_0x367cec(-0x24,-_0x5c29f2._0xd6daf3,-_0x5c29f2._0x597c98,-0x53)];return createErrorToolResult(_0x4007c0,_0x3f1e24,{'error':'tool_rejected',..._0x2b9f77?.['trim']()[_0x486e36(0x22a,0x25a,_0x5c29f2._0x1da3f6,0x294)]?{'reason':_0x2b9f77}:{}});}function createAbortedToolResult(_0xc864b1,_0x364c1d,_0x5ed37c=[]){const _0x3dbc07={_0x18e577:0x44b,_0x403f6d:0x4a0,_0xe5429e:0x47b,_0x26a93a:0x427},_0x362edf={_0x34c2aa:0x81},_0x5c9e0e={_0x51a87d:0x64};function _0x2c357e(_0xd745f8,_0x3d8739,_0x1b4de9,_0x2dff4a){return _0x50a2ac(_0xd745f8,_0x2dff4a- -0x144,_0x1b4de9-0xce,_0x2dff4a-_0x5c9e0e._0x51a87d);}function _0x1deb36(_0x38143a,_0x264f61,_0x49dd7c,_0x1858a2){return _0x50a2ac(_0x49dd7c,_0x1858a2- -0xec,_0x49dd7c-_0x362edf._0x34c2aa,_0x1858a2-0x8b);}const _0x560ba3=toAbortError(_0x364c1d);return createErrorToolResult(_0xc864b1,_0x560ba3[_0x1deb36(0x490,_0x3dbc07._0x18e577,_0x3dbc07._0x403f6d,_0x3dbc07._0xe5429e)],{'error':_0x560ba3[_0x1deb36(_0x3dbc07._0x26a93a,0x4d0,0x438,0x47b)],'aborted':!![]},_0x5ed37c);}function createSuccessToolResult(_0x3369d5,_0x41c9f5,_0x2c02b5){const _0x2a5e36={_0x28a4d4:0x18f,_0x57a8c:0x1b1,_0x4eff20:0x1e0,_0x3b613d:0x1d1,_0xe5ac1a:0x224,_0x58aad8:0x19b,_0x13bd30:0x208,_0x326813:0x21c,_0x5eff7c:0x1d7},_0x4b5d07={_0x393b71:0x72,_0x282005:0xf4},_0x38ecae={_0x5e5629:0x57,_0x46b405:0xd5};function _0x2dfc82(_0x314aaa,_0x2a40fa,_0x355837,_0x4f6593){return _0xaba6e0(_0x314aaa-_0x38ecae._0x5e5629,_0x355837,_0x314aaa-_0x38ecae._0x46b405,_0x4f6593-0x19f);}function _0x549b14(_0x56b669,_0x48ee2c,_0x3c3440,_0x3ca317){return _0x50a2ac(_0x56b669,_0x48ee2c- -0x388,_0x3c3440-_0x4b5d07._0x393b71,_0x3ca317-_0x4b5d07._0x282005);}return{'callId':_0x3369d5['id'],'toolName':_0x3369d5[_0x549b14(_0x2a5e36._0x28a4d4,_0x2a5e36._0x57a8c,0x1c8,_0x2a5e36._0x4eff20)],'status':'ok','output':_0x41c9f5[_0x549b14(0x1ca,_0x2a5e36._0x3b613d,_0x2a5e36._0xe5ac1a,_0x2a5e36._0x58aad8)],'structured':_0x41c9f5[_0x2dfc82(0x207,_0x2a5e36._0x13bd30,0x1c4,_0x2a5e36._0x326813)],..._0x41c9f5[_0x2dfc82(0x1cf,0x1a1,0x20d,_0x2a5e36._0x5eff7c)]!==void 0x0?{'content':_0x41c9f5['content']}:{},'chunks':_0x2c02b5,'meta':createToolMeta()};}function createUnknownToolResult(_0x476e39){const _0x1516d2={_0x44ff59:0x23,_0x49e7b7:0x4c,_0x46ba4f:0x2a,_0x383839:0x27,_0x2aeff6:0x58,_0x211147:0x6c,_0x5e6fde:0x7,_0x20acda:0x5},_0x5b1047={_0x312a54:0xb0},_0x363e17={_0x380a56:0xfb,_0x339a13:0x154};function _0x3ccaa3(_0x5e67c8,_0x4286ae,_0x5a8458,_0xbf0fd6){return _0xaba6e0(_0x5e67c8-_0x363e17._0x380a56,_0xbf0fd6,_0x5e67c8- -_0x363e17._0x339a13,_0xbf0fd6-0x51);}function _0x5b40ac(_0x5793d1,_0x496337,_0x329bc8,_0x568f08){return _0x50a2ac(_0x5793d1,_0x329bc8- -0x573,_0x329bc8-0x36,_0x568f08-_0x5b1047._0x312a54);}return createErrorToolResult(_0x476e39,_0x3ccaa3(-0x7,0x14,-_0x1516d2._0x44ff59,-_0x1516d2._0x49e7b7)+_0x476e39[_0x3ccaa3(-_0x1516d2._0x46ba4f,_0x1516d2._0x383839,-_0x1516d2._0x2aeff6,-_0x1516d2._0x211147)],{'error':_0x5b40ac(_0x1516d2._0x5e6fde,0x4c,-_0x1516d2._0x20acda,_0x1516d2._0x20acda)});}function isDispatchDecision(_0x3d0234){const _0x9b325a={_0xb02c1d:0x42c,_0x4a1e90:0x538,_0x5c3b00:0x529,_0x400896:0x588,_0x12d77a:0x565,_0x472214:0x573};function _0x4b0c40(_0x3a61a1,_0x72f300,_0x1a5337,_0x2bfc4c){return _0xaba6e0(_0x3a61a1-0x144,_0x72f300,_0x2bfc4c-0x2f4,_0x2bfc4c-0x1f4);}if(typeof _0x3d0234!==_0x4b0c40(0x433,_0x9b325a._0xb02c1d,0x477,0x420)||_0x3d0234===null)return![];function _0x4a0cc2(_0x5c5565,_0x27197e,_0x372c82,_0x1f5b3a){return _0xaba6e0(_0x5c5565-0xc0,_0x27197e,_0x1f5b3a-0x41a,_0x1f5b3a-0xba);}return _0x3d0234['action']===_0x4a0cc2(0x4fb,_0x9b325a._0x4a1e90,0x4ee,_0x9b325a._0x5c3b00)||_0x3d0234['action']===_0x4a0cc2(_0x9b325a._0x400896,_0x9b325a._0x12d77a,_0x9b325a._0x472214,0x57c);}function normalizeExecutionError(_0x2888bc){const _0x4103d8={_0x25490c:0x3a3,_0x4f871a:0x1b8,_0x250c8a:0x1a4,_0x42ae34:0x1d3,_0x437fca:0x3a6,_0x19f96b:0x3a7,_0x55a767:0x3a4,_0x40166c:0x361},_0x2089e1={_0x421bb0:0x6e5,_0x3a564d:0x24},_0x18ef2b={_0x488f77:0x186,_0x374b89:0x18d};if(_0x2888bc instanceof ToolExecutionError)return{'errorMessage':_0x2888bc[_0x30f91c(0x32f,0x37a,0x361,_0x4103d8._0x25490c)],'structured':{'error':_0x2888bc['message'],..._0x2888bc[_0x285620(-_0x4103d8._0x4f871a,-_0x4103d8._0x250c8a,-0x180,-_0x4103d8._0x42ae34)]}};function _0x30f91c(_0x79cb0a,_0x11c659,_0x50371e,_0x13c276){return _0x50a2ac(_0x13c276,_0x50371e- -0x206,_0x50371e-_0x18ef2b._0x488f77,_0x13c276-_0x18ef2b._0x374b89);}function _0x285620(_0x39f35b,_0xddc621,_0x330080,_0x10928e){return _0x50a2ac(_0x10928e,_0xddc621- -_0x2089e1._0x421bb0,_0x330080-_0x2089e1._0x3a564d,_0x10928e-0x82);}if(_0x2888bc instanceof Error)return{'errorMessage':_0x2888bc[_0x30f91c(_0x4103d8._0x437fca,_0x4103d8._0x19f96b,0x361,0x36f)],'structured':{'error':_0x2888bc[_0x30f91c(_0x4103d8._0x55a767,0x34e,_0x4103d8._0x40166c,0x37b)]}};const _0x4cd3ff=String(_0x2888bc);return{'errorMessage':_0x4cd3ff,'structured':{'error':_0x4cd3ff}};}async function emitEvent(_0x221aaf,_0x28ba14,_0x5da1cc){await _0x221aaf?.(_0x28ba14,_0x5da1cc);}async function resolveDispatchDecision(_0x1f188e,_0x2c40c3,_0x26359b){const _0x59a2e2={_0x10a84e:0x9e,_0xdee230:0x11d,_0x433c2e:0x102,_0x5329f6:0xd9,_0x393924:0x14c},_0x337c52={_0x5bef03:0x197,_0x329978:0x113},_0x18254f={_0x57e894:0x1f4,_0x580306:0x228,_0x25b8c9:0x277,_0x44af6b:0x201,_0xb72937:0x23d,_0x1438d6:0x167,_0x138dce:0x197,_0x4704ad:0x2b3,_0x2431f5:0x231,_0x24f169:0x271,_0x29e358:0x254},_0x3277da={_0x5be2a7:0x1b6,_0x2f3834:0x294},_0xc8e627={_0x2fb1b2:0x381,_0x250884:0x5f},_0x58c6c2={_0x147d92:0x207,_0x277657:0xc1};if(!_0x1f188e)return{'action':_0x395709(-0x61,-0xa5,-0x98,-_0x59a2e2._0x10a84e)};function _0x395709(_0x1ad7b0,_0x4bbe87,_0x453dc2,_0x1eaeb7){return _0xaba6e0(_0x1ad7b0-0x197,_0x453dc2,_0x4bbe87- -_0x58c6c2._0x147d92,_0x1eaeb7-_0x58c6c2._0x277657);}const _0x574564=Promise[_0x395709(-_0x59a2e2._0xdee230,-_0x59a2e2._0x433c2e,-0xbe,-_0x59a2e2._0x5329f6)]()[_0x395709(-0x138,-0x14b,-_0x59a2e2._0x393924,-0x13f)](()=>_0x1f188e(_0x2c40c3,_0x26359b));if(!_0x26359b['signal']){const _0x37e684=await _0x574564;return isDispatchDecision(_0x37e684)?_0x37e684:{'action':'run'};}const _0x49d702=new Promise((_0x52a797,_0x5dd7c4)=>{const _0xa11715={_0x5e3cb9:0x160,_0x79f852:0x11d,_0x329acc:0x13f,_0x54ec77:0x275,_0x11ca7f:0x198,_0x430a0e:0x142},_0x1d35f4={_0x5b8ea2:0x155},_0x539baa={_0x102eff:0x2d8},_0x219a63=()=>{_0x26359b['signal']?.[_0x4a78c0(-_0xa11715._0x5e3cb9,-_0xa11715._0x79f852,-0x12b,-_0xa11715._0x329acc)](_0x4a78c0(-0x1aa,-0x13a,-0x148,-0x172),_0x219a63);function _0x4a78c0(_0x12c167,_0x2c115f,_0x5ee2e1,_0x3a46a7){return _0x45e0(_0x3a46a7- -_0x539baa._0x102eff,_0x2c115f);}function _0x4079d4(_0xa7f59,_0x540050,_0xd1fe41,_0x534cc3){return _0x45e0(_0x534cc3-_0x1d35f4._0x5b8ea2,_0xd1fe41);}_0x5dd7c4(toAbortError(_0x26359b[_0x4079d4(_0xa11715._0x54ec77,0x285,0x29c,0x29a)]?.[_0x4a78c0(-0x15b,-_0xa11715._0x11ca7f,-_0xa11715._0x430a0e,-0x17d)]));};if(_0x26359b[_0xe03fae(_0x18254f._0x57e894,_0x18254f._0x580306,0x1ff,0x233)]?.[_0xe03fae(_0x18254f._0x25b8c9,0x22a,_0x18254f._0x44af6b,_0x18254f._0xb72937)]){_0x5dd7c4(toAbortError(_0x26359b['signal']['reason']));return;}function _0xe03fae(_0x3c3921,_0x50feb6,_0x581dd2,_0x211e5d){return _0x42718d(_0x581dd2,_0x50feb6-0x79,_0x211e5d-_0xc8e627._0x2fb1b2,_0x211e5d-_0xc8e627._0x250884);}function _0x3cad66(_0x20ea48,_0x1a1db1,_0xfedff,_0x6c91bd){return _0x42718d(_0x1a1db1,_0x1a1db1-_0x3277da._0x5be2a7,_0x6c91bd-_0x3277da._0x2f3834,_0x6c91bd-0x15b);}_0x26359b[_0x3cad66(_0x18254f._0x1438d6,0xf5,_0x18254f._0x138dce,0x146)]?.[_0xe03fae(0x227,_0x18254f._0x4704ad,_0x18254f._0x2431f5,_0x18254f._0x24f169)](_0xe03fae(0x258,_0x18254f._0x580306,0x24d,_0x18254f._0x29e358),_0x219a63,{'once':!![]});}),_0x2a8806=await Promise[_0x42718d(-0x156,-0x142,-0xff,-0xe2)]([_0x574564,_0x49d702]);function _0x42718d(_0x3ff0b1,_0x41bf31,_0x58ca68,_0x1c5b4c){return _0x50a2ac(_0x3ff0b1,_0x58ca68- -0x65d,_0x58ca68-_0x337c52._0x5bef03,_0x1c5b4c-_0x337c52._0x329978);}return isDispatchDecision(_0x2a8806)?_0x2a8806:{'action':'run'};}async function executeToolCall(_0x614db0,_0x102b10,_0x236b2c,_0x1a04d9,_0x59800c){const _0xb196ea={_0x4e0e67:0x92,_0x144cbf:0x98,_0x4ed85a:0x80,_0x2f59bf:0xdd,_0x14e6f1:0xb2,_0x34666d:0x98,_0x340f7d:0xf2,_0x4cef3b:0x195,_0x17f95d:0x1b4,_0x4b932d:0xcb,_0x9b5eff:0xf3,_0x441253:0xc2,_0x1f4e8e:0xbf,_0x13c859:0x1fd,_0x212521:0x271,_0x4d1da2:0x251,_0x1f80aa:0x17b,_0x130360:0x1d0,_0x24b19e:0x1d2,_0x35e538:0x55,_0x48f001:0xbe,_0x1b351c:0x1ce,_0x374311:0x1f3,_0x17a673:0x1f5,_0xe02187:0x9f,_0x48d62e:0x13c,_0x4ade43:0x1f9,_0x370b43:0x198,_0x17904e:0xcb,_0x34518c:0xb1,_0x1350e7:0x5c,_0x2a6901:0x98,_0xfe1b16:0x1c6,_0x53646a:0x95,_0x58e6b8:0x5e,_0x4f0bdb:0x43,_0x1b0db1:0x72,_0xd9701d:0x6f,_0x21a6a4:0x8e,_0xe5f054:0xd1,_0x41e3a3:0x231,_0x16eb57:0x250,_0x17c8fa:0x209,_0x280893:0x243,_0x5e4f78:0x8a,_0xfc6d1f:0xa1},_0x4d9125={_0x51cf57:0x281,_0xff9336:0x122,_0x297812:0xfd,_0x35365d:0x15e},_0x539050={_0xa597:0xd0,_0x63b2d1:0x86},_0x156c2f={_0x541daf:0x6d},_0x6db510={_0xb15ef8:0x33f,_0x4067f9:0x1a7},_0x540ae4={_0x2fa088:0x167},_0x1c3f17={..._0x236b2c,'toolCallId':_0x102b10['id']};throwIfAborted(_0x1c3f17[_0x87eb5a(_0xb196ea._0x4e0e67,0x43,0x65,_0xb196ea._0x144cbf)]);function _0x87eb5a(_0x2ffcc9,_0x801150,_0x3b857a,_0x134ab5){return _0x50a2ac(_0x801150,_0x134ab5- -0x477,_0x3b857a-_0x540ae4._0x2fa088,_0x134ab5-0x4f);}let _0x4d6021;try{_0x4d6021=await resolveDispatchDecision(_0x1a04d9,_0x102b10,_0x1c3f17);}catch(_0x1097d4){if(isAbortError(_0x1097d4)){const _0x1de561=createAbortedToolResult(_0x102b10,_0x1097d4);return await emitEvent(_0x59800c,{'type':'tool_completed','toolCall':_0x102b10,'result':_0x1de561},_0x1c3f17),_0x1de561;}const {errorMessage:_0x10b4b1,structured:_0x207dfa}=normalizeExecutionError(_0x1097d4),_0x5e3bdb=createErrorToolResult(_0x102b10,_0x10b4b1,_0x207dfa);return await emitEvent(_0x59800c,{'type':_0x87eb5a(0x123,_0xb196ea._0x4ed85a,_0xb196ea._0x2f59bf,0xd1),'toolCall':_0x102b10,'result':_0x5e3bdb},_0x1c3f17),_0x5e3bdb;}throwIfAborted(_0x1c3f17[_0x87eb5a(0xc9,0xab,_0xb196ea._0x14e6f1,_0xb196ea._0x34666d)]);if(_0x4d6021['action']===_0x87eb5a(_0xb196ea._0x340f7d,0xd6,0x89,0xa7)){const _0x1fd3b1=createRejectedToolResult(_0x102b10,_0x4d6021[_0x213d52(_0xb196ea._0x4cef3b,0x1e5,0x1e6,0x22e)]);return await emitEvent(_0x59800c,{'type':'tool_rejected','toolCall':_0x102b10,'result':_0x1fd3b1},_0x1c3f17),_0x1fd3b1;}const _0x37e994=_0x614db0[_0x213d52(0x204,0x168,_0xb196ea._0x17f95d,0x1c2)](_0x102b10[_0x87eb5a(0x117,_0xb196ea._0x4b932d,_0xb196ea._0x9b5eff,_0xb196ea._0x441253)]);function _0x213d52(_0x30e0e3,_0x26ad0e,_0x5ddd55,_0x5be99a){return _0x50a2ac(_0x26ad0e,_0x5ddd55- -_0x6db510._0xb15ef8,_0x5ddd55-_0x6db510._0x4067f9,_0x5be99a-0x7d);}if(!_0x37e994){const _0x4dec16=createUnknownToolResult(_0x102b10);return await emitEvent(_0x59800c,{'type':_0x87eb5a(0x10f,0x10a,_0xb196ea._0x1f4e8e,0xd1),'toolCall':_0x102b10,'result':_0x4dec16},_0x1c3f17),_0x4dec16;}throwIfAborted(_0x1c3f17[_0x213d52(0x1a9,0x1c0,0x1d0,0x1d6)]),await emitEvent(_0x59800c,{'type':_0x213d52(_0xb196ea._0x13c859,_0xb196ea._0x212521,0x22c,_0xb196ea._0x4d1da2),'toolCall':_0x102b10},_0x1c3f17);try{throwIfAborted(_0x1c3f17[_0x213d52(0x205,_0xb196ea._0x1f80aa,_0xb196ea._0x130360,_0xb196ea._0x24b19e)]);const _0x518b01=validateToolInput(_0x102b10[_0x87eb5a(_0xb196ea._0x35e538,0xb5,_0xb196ea._0x48f001,0xa6)],_0x37e994[_0x213d52(_0xb196ea._0x1b351c,0x1e5,_0xb196ea._0x374311,_0xb196ea._0x17a673)]),_0x171974=await _0x37e994[_0x87eb5a(_0xb196ea._0xe02187,0x12c,_0xb196ea._0x48d62e,0xef)](_0x518b01,_0x1c3f17),_0x58d025=[],_0x25c9a2=addAbortListener(_0x1c3f17[_0x213d52(_0xb196ea._0x4ade43,_0xb196ea._0x370b43,0x1d0,0x17a)],()=>{function _0x4c3865(_0x33c84d,_0x42f5f3,_0x4989cc,_0x23cd75){return _0x213d52(_0x33c84d-0x17b,_0x4989cc,_0x33c84d- -0x2ca,_0x23cd75-_0x156c2f._0x541daf);}function _0x4af5e5(_0x484d94,_0x427559,_0x135916,_0x40b1cc){return _0x87eb5a(_0x484d94-_0x539050._0xa597,_0x484d94,_0x135916-_0x539050._0x63b2d1,_0x427559-0x226);}void _0x171974[_0x4af5e5(0x2c2,0x2ad,_0x4d9125._0x51cf57,0x2c4)](void 0x0)[_0x4c3865(-_0x4d9125._0xff9336,-_0x4d9125._0x297812,-_0x4d9125._0x35365d,-0x101)](()=>{});});try{throwIfAborted(_0x1c3f17['signal']);let _0x5286fe=await _0x171974[_0x87eb5a(0x95,_0xb196ea._0x17904e,_0xb196ea._0x34518c,0xc0)]();while(!_0x5286fe['done']){throwIfAborted(_0x1c3f17[_0x87eb5a(_0xb196ea._0x1350e7,0x4e,_0xb196ea._0x34518c,_0xb196ea._0x2a6901)]);const _0x3420bb=normalizeToolOutputValue(_0x5286fe[_0x213d52(0x202,0x1b8,_0xb196ea._0xfe1b16,0x1ab)]);_0x58d025[_0x87eb5a(0x93,0x38,_0xb196ea._0x53646a,_0xb196ea._0x58e6b8)](_0x3420bb),await emitEvent(_0x59800c,{'type':_0x87eb5a(0x62,0xe2,0xd7,0x9f),'toolCall':_0x102b10,'chunk':_0x3420bb},_0x1c3f17),throwIfAborted(_0x1c3f17['signal']),_0x5286fe=await _0x171974['next']();}throwIfAborted(_0x1c3f17['signal']);const _0x59c292=_0x5286fe[_0x87eb5a(0x91,_0xb196ea._0x4f0bdb,_0xb196ea._0x1b0db1,0x8e)]===void 0x0?deriveFinalToolOutput(_0x58d025):normalizeToolOutputValue(_0x5286fe[_0x87eb5a(0xbb,0x80,_0xb196ea._0xd9701d,_0xb196ea._0x21a6a4)]),_0x230104=createSuccessToolResult(_0x102b10,_0x59c292,_0x58d025);return await emitEvent(_0x59800c,{'type':_0x87eb5a(0xa1,0xa6,0xf7,_0xb196ea._0xe5f054),'toolCall':_0x102b10,'result':_0x230104},_0x1c3f17),_0x230104;}catch(_0x5a5f7a){if(isAbortError(_0x5a5f7a)){const _0x442055=createAbortedToolResult(_0x102b10,_0x5a5f7a,_0x58d025);return await emitEvent(_0x59800c,{'type':_0x213d52(_0xb196ea._0x41e3a3,_0xb196ea._0x16eb57,_0xb196ea._0x17c8fa,_0xb196ea._0x280893),'toolCall':_0x102b10,'result':_0x442055},_0x1c3f17),_0x442055;}const {errorMessage:_0x3603ae,structured:_0x72e031}=normalizeExecutionError(_0x5a5f7a),_0x196c6b=createErrorToolResult(_0x102b10,_0x3603ae,_0x72e031,_0x58d025);return await emitEvent(_0x59800c,{'type':_0x87eb5a(_0xb196ea._0x5e4f78,_0xb196ea._0xfc6d1f,0xd3,0xd1),'toolCall':_0x102b10,'result':_0x196c6b},_0x1c3f17),_0x196c6b;}finally{_0x25c9a2();}}catch(_0x2292da){if(isAbortError(_0x2292da)){const _0x4ec353=createAbortedToolResult(_0x102b10,_0x2292da);return await emitEvent(_0x59800c,{'type':_0x87eb5a(0xd0,0xe6,0xf5,_0xb196ea._0xe5f054),'toolCall':_0x102b10,'result':_0x4ec353},_0x1c3f17),_0x4ec353;}const {errorMessage:_0x165c30,structured:_0x92b60d}=normalizeExecutionError(_0x2292da),_0x180e47=createErrorToolResult(_0x102b10,_0x165c30,_0x92b60d);return await emitEvent(_0x59800c,{'type':'tool_completed','toolCall':_0x102b10,'result':_0x180e47},_0x1c3f17),_0x180e47;}}function createInternalToolRuntime(_0xa68b21=[],_0x215f1d={}){const _0x2238b0={_0x240c60:0x171,_0x151a9b:0x12c},_0x31a960={_0x60983c:0x247},_0x3e7e83={_0x592960:0xe1,_0x17bef1:0x54};let _0x1da5f0=new ToolRegistry(_0xa68b21);return{'listToolSchemas'(){return _0x1da5f0['listToolSchemas']();},'setTools'(_0x554253){_0x1da5f0=new ToolRegistry(_0x554253);},async 'executeCalls'(_0xcaa01f,_0x44a112){const _0x34487a={_0x5392dc:0x362};function _0x11d172(_0x4379de,_0x497bc0,_0x3ab621,_0x3f17ba){return _0x45e0(_0x3ab621- -_0x34487a._0x5392dc,_0x3f17ba);}return await Promise['all'](_0xcaa01f[_0x11d172(-0x1d1,-_0x31a960._0x60983c,-0x1f9,-0x1aa)](async _0x54e13e=>{const _0x3f0182={_0x28dd66:0x15d,_0x3c10ad:0x1ab,_0x318b59:0x2a0};function _0x2d9bce(_0x9a7556,_0x9d8ac5,_0xc9eeea,_0x18d1d1){return _0x11d172(_0x9a7556-_0x3f0182._0x28dd66,_0x9d8ac5-_0x3f0182._0x3c10ad,_0x9a7556-_0x3f0182._0x318b59,_0x18d1d1);}function _0x5d2e7c(_0x946edf,_0x225f09,_0x2cd8ed,_0x8c2464){return _0x11d172(_0x946edf-0x129,_0x225f09-0x5c,_0x225f09-0x17d,_0x2cd8ed);}return await executeToolCall(_0x1da5f0,_0x54e13e,_0x44a112,_0x215f1d[_0x5d2e7c(-0x1b,-0x55,-0x37,-0xa4)],_0x215f1d[_0x2d9bce(0x94,_0x3e7e83._0x592960,0xa7,_0x3e7e83._0x17bef1)]);}));},async 'execute'(_0x2e3382,_0x18c6d0){const _0x61186b={_0x141c3a:0x2d},[_0x5eca62]=await this[_0x25f66b(0x1a8,0x1c6,_0x2238b0._0x240c60,_0x2238b0._0x151a9b)]([_0x2e3382],_0x18c6d0);function _0x25f66b(_0x5325c5,_0x2159dd,_0x2762a5,_0x536f14){return _0x45e0(_0x2762a5- -_0x61186b._0x141c3a,_0x536f14);}return _0x5eca62;}};}function getOrderedObserverExtensions(_0x3f2055,_0x18481a){const _0x5e27a1={_0x3d9528:0xae},_0x3d0c08={_0x37ed45:0x395,_0x40e7cf:0x3ac},_0x12ed03={_0x199bd0:0x46d};function _0x3f2289(_0x28bdb7,_0xc87202,_0x54c51a,_0x4c14e7){return _0x50a2ac(_0x54c51a,_0x28bdb7- -0x32a,_0x54c51a-0x13,_0x4c14e7-0x25);}function _0x4f5c1d(_0x5220b1,_0x4fed51,_0x290a61,_0x42be13){return _0x50a2ac(_0x4fed51,_0x290a61- -_0x12ed03._0x199bd0,_0x290a61-0x1f3,_0x42be13-0xa5);}return _0x3f2055['filter'](_0x566642=>{function _0x39b2dc(_0x383336,_0x5388f0,_0x1a1f71,_0x563273){return _0x45e0(_0x383336-0x22d,_0x5388f0);}return _0x566642[_0x39b2dc(0x37a,0x370,_0x3d0c08._0x37ed45,_0x3d0c08._0x40e7cf)]!==![]&&_0x566642['stage']===_0x18481a&&_0x566642['kind']==='observer';})[_0x4f5c1d(0x58,_0x5e27a1._0x3d9528,0x84,0xc8)]((_0xdb1236,_0x108e4b)=>_0xdb1236[_0x4f5c1d(0xeb,0xd0,0xad,0x71)]-_0x108e4b['order']);}function getOrderedTransformerExtensions(_0x5979a3,_0x329b6e){const _0xe33daf={_0x2a21dc:0x15b,_0xdeb327:0x16f,_0x1485f6:0x148,_0x22d65d:0x117,_0x419a85:0x18a,_0x234b5d:0x31c,_0xddba06:0x319,_0x43b365:0x2f8,_0x89c1fb:0x2a3},_0x244a09={_0x48ce6a:0x1c5,_0x2fadb2:0x57};function _0x961056(_0x265cf2,_0x5d8302,_0x33388b,_0x3e46a7){return _0xaba6e0(_0x265cf2-_0x244a09._0x48ce6a,_0x33388b,_0x3e46a7-_0x244a09._0x2fadb2,_0x3e46a7-0x6f);}return _0x5979a3['filter'](_0x3536e2=>{function _0x1ae3ff(_0x4fdfb0,_0x1f116b,_0x23b969,_0x3dc112){return _0x45e0(_0x4fdfb0- -0x2a8,_0x1f116b);}function _0x1cadbb(_0x10863e,_0x2428a0,_0x661a74,_0x1e4800){return _0x45e0(_0x1e4800-0x1bb,_0x10863e);}return _0x3536e2[_0x1ae3ff(-_0xe33daf._0x2a21dc,-_0xe33daf._0xdeb327,-0x183,-_0xe33daf._0x1485f6)]!==![]&&_0x3536e2[_0x1ae3ff(-0x164,-_0xe33daf._0x22d65d,-0x1b5,-_0xe33daf._0x419a85)]===_0x329b6e&&_0x3536e2[_0x1cadbb(0x2ac,_0xe33daf._0x234b5d,_0xe33daf._0xddba06,0x2f7)]===_0x1cadbb(_0xe33daf._0x43b365,_0xe33daf._0x89c1fb,0x2eb,0x2f0);})['sort']((_0x3ec19e,_0x414fe0)=>_0x3ec19e[_0x961056(0x10d,0x13a,0x1a2,0x162)]-_0x414fe0['order']);}function createExtensionRegistry(){const _0x3ff996={_0x2522bf:0x68},_0x47b27f=[];return{'register'(_0x533274){function _0xf45b17(_0x675a75,_0x4d6d52,_0x122156,_0x3b1449){return _0x45e0(_0x122156- -0x181,_0x3b1449);}_0x47b27f[_0xf45b17(-0x55,-_0x3ff996._0x2522bf,-0x76,-0x6a)](_0x533274);},async 'runTransformers'(_0x4c05b8,_0x11f51e,_0x5c941a){let _0xa0c682=_0x11f51e;for(const _0x12ae1d of getOrderedTransformerExtensions(_0x47b27f,_0x4c05b8)){_0xa0c682=await _0x12ae1d['run'](_0xa0c682,_0x5c941a);}return _0xa0c682;},async 'runObservers'(_0x19e454,_0x5ef226,_0x466ec1){for(const _0x37ec53 of getOrderedObserverExtensions(_0x47b27f,_0x19e454)){await _0x37ec53['run'](_0x5ef226,_0x466ec1);}}};}function createEmptySnapshot(){return{'totalTokens':0x0,'totalInputTokens':0x0,'totalOutputTokens':0x0,'totalReasoningTokens':0x0,'requestCount':0x0,'modelCallCount':0x0,'toolCallCount':0x0,'totalModelTimeMs':0x0,'currentTokens':0x0,'currentInputTokens':0x0,'currentOutputTokens':0x0,'currentReasoningTokens':0x0,'currentModelTimeMs':0x0};}function createAgentMetrics(_0x209c7a={}){const _0x37262b={_0x423c6e:0x131},_0x2e8db0={_0x1b81d2:0x2ad},_0x3a11c8={_0x4030a2:0x186,_0x179792:0x1c7,_0x569b3c:0x14a,_0x11dac2:0x11c,_0x36f66e:0x111,_0x2862dc:0x153,_0x125b55:0x365,_0x206498:0x354,_0x3aea5d:0x32b,_0x8b93fd:0xfe,_0x2cce10:0x147,_0x73ee26:0x36b,_0x5419ac:0x363,_0x4cf52c:0x35d,_0x145daf:0x177,_0x51a8a1:0x3c5,_0x27eca6:0x378,_0x11bee1:0x3e2,_0x48e6f6:0x38e,_0x220352:0x3ee,_0xa89829:0x404,_0x1f4318:0x135,_0x5b562f:0x176,_0x1909d8:0x1b0,_0xa5e525:0x158,_0x1a9f17:0x191,_0x1ee27c:0x14c,_0x2f4191:0x3b2,_0x3a090a:0x3fb,_0x3a6dae:0xef,_0x683888:0x329,_0x51c467:0x3a3,_0x22b0ec:0x151,_0x44577f:0x188,_0xcc8b73:0x186,_0x2d582c:0x414,_0x298326:0x17e,_0xb10869:0x193,_0x127ed4:0x1bf,_0x380141:0x37e,_0x5eb900:0x35f},_0x1667ad={_0x335d5d:0x251};let _0x297b0b=createEmptySnapshot();const _0x5b4578=new Set();let _0x3df515;const _0xb7a770=()=>{const _0x44871d={..._0x297b0b};for(const _0xef8b08 of _0x5b4578)_0xef8b08(_0x44871d);};return{'getSnapshot'(){return{..._0x297b0b};},'recordEvent'(_0x867fcc){function _0x22b860(_0x354d11,_0x3247e2,_0x2f7979,_0x5b0b1a){return _0x45e0(_0x3247e2- -0x2a7,_0x354d11);}function _0x18378c(_0x5dedd2,_0x197f36,_0x49bc07,_0x5e26e7){return _0x45e0(_0x5dedd2-_0x1667ad._0x335d5d,_0x49bc07);}if(_0x867fcc['type']==='model_request'){_0x3df515=Date[_0x22b860(-0x1a3,-_0x3a11c8._0x4030a2,-_0x3a11c8._0x179792,-_0x3a11c8._0x569b3c)]();const _0x4a9275=_0x209c7a[_0x22b860(-_0x3a11c8._0x11dac2,-_0x3a11c8._0x36f66e,-_0x3a11c8._0x2862dc,-0x11c)]?.(_0x867fcc['request']);_0x4a9275!==void 0x0&&(_0x297b0b={..._0x297b0b,'contextWindowLimit':_0x4a9275},_0xb7a770());return;}if(_0x867fcc[_0x18378c(_0x3a11c8._0x125b55,_0x3a11c8._0x206498,_0x3a11c8._0x3aea5d,0x32d)]==='model_response'){const _0x5a5636=_0x867fcc[_0x22b860(-0xdd,-0x12b,-_0x3a11c8._0x8b93fd,-_0x3a11c8._0x2cce10)][_0x18378c(0x392,0x359,_0x3a11c8._0x73ee26,_0x3a11c8._0x5419ac)]['inputTokens'],_0x371167=_0x867fcc['response']['usage'][_0x22b860(-0x177,-0x1a3,-0x154,-0x167)],_0x2fc614=_0x867fcc['response'][_0x18378c(0x392,0x385,0x3d6,_0x3a11c8._0x4cf52c)][_0x22b860(-0x169,-_0x3a11c8._0x145daf,-0x12b,-0x189)]??0x0,_0x25c3b4=_0x5a5636+_0x371167,_0xdad3ce=_0x3df515===void 0x0?0x0:Date['now']()-_0x3df515;_0x3df515=void 0x0,_0x297b0b={..._0x297b0b,'totalTokens':_0x297b0b['totalTokens']+_0x25c3b4,'totalInputTokens':_0x297b0b['totalInputTokens']+_0x5a5636,'totalOutputTokens':_0x297b0b[_0x18378c(_0x3a11c8._0x51a8a1,0x3fa,_0x3a11c8._0x27eca6,0x36f)]+_0x371167,'totalReasoningTokens':_0x297b0b[_0x18378c(_0x3a11c8._0x11bee1,_0x3a11c8._0x48e6f6,_0x3a11c8._0x220352,_0x3a11c8._0xa89829)]+_0x2fc614,'modelCallCount':_0x297b0b[_0x22b860(-_0x3a11c8._0x1f4318,-_0x3a11c8._0x5b562f,-_0x3a11c8._0x1909d8,-_0x3a11c8._0xa5e525)]+0x1,'totalModelTimeMs':_0x297b0b[_0x22b860(-0x198,-_0x3a11c8._0x1a9f17,-_0x3a11c8._0x1ee27c,-0x1ab)]+_0xdad3ce,'currentTokens':_0x25c3b4,'currentInputTokens':_0x5a5636,'currentOutputTokens':_0x371167,'currentReasoningTokens':_0x2fc614,'currentModelTimeMs':_0xdad3ce,..._0x297b0b[_0x18378c(_0x3a11c8._0x2f4191,0x3f7,_0x3a11c8._0x3a090a,0x374)]&&_0x25c3b4>0x0?{'contextWindowUsage':_0x25c3b4/_0x297b0b[_0x22b860(-_0x3a11c8._0x1f4318,-0x146,-_0x3a11c8._0x36f66e,-_0x3a11c8._0x3a6dae)]}:{}},_0xb7a770();return;}if(_0x867fcc[_0x18378c(0x365,_0x3a11c8._0x683888,_0x3a11c8._0x51c467,0x327)]===_0x22b860(-_0x3a11c8._0x22b0ec,-_0x3a11c8._0x44577f,-0x1d6,-_0x3a11c8._0xcc8b73)){_0x297b0b={..._0x297b0b,'toolCallCount':_0x297b0b[_0x18378c(0x3df,0x415,_0x3a11c8._0x2d582c,0x3ee)]+0x1},_0xb7a770();return;}_0x867fcc[_0x22b860(-_0x3a11c8._0x298326,-_0x3a11c8._0xb10869,-0x199,-_0x3a11c8._0x127ed4)]==='turn_complete'&&(_0x297b0b={..._0x297b0b,'requestCount':_0x297b0b[_0x18378c(_0x3a11c8._0x380141,0x39a,_0x3a11c8._0x5eb900,0x349)]+0x1},_0xb7a770());},'reset'(){_0x297b0b=createEmptySnapshot(),_0x3df515=void 0x0,_0xb7a770();},'subscribe'(_0x1b6a9b){const _0x19cd21={_0x2ef790:0x15e,_0x566515:0x1ae},_0x363d5c={_0x3da2fc:0x8a};_0x5b4578[_0x100e02(-_0x37262b._0x423c6e,-0x125,-0x108,-0x13a)](_0x1b6a9b);function _0x100e02(_0x3388cd,_0x16ce0c,_0x1fb9dc,_0x4a01a4){return _0x45e0(_0x16ce0c- -_0x2e8db0._0x1b81d2,_0x1fb9dc);}return()=>{function _0x4fb825(_0x35355b,_0x3f90cc,_0x5310b8,_0x5953fb){return _0x100e02(_0x35355b-_0x363d5c._0x3da2fc,_0x5310b8-0x2ef,_0x3f90cc,_0x5953fb-0x6d);}_0x5b4578[_0x4fb825(0x15e,_0x19cd21._0x2ef790,_0x19cd21._0x566515,0x1cf)](_0x1b6a9b);};}};}function makeExtensionContext(_0x4128ad){return{'state':_0x4128ad};}async function runStage(_0x3ae304,_0x578691,_0x443bf0,_0xd3ded9){const _0x1b3d8f={_0x2aa3dd:0x55a,_0x3b9b25:0x404},_0x283cc2={_0x38bea3:0x8c},_0x179f56={_0x84eeae:0xcb},_0x52bab7=await _0x3ae304[_0x376e21(0x505,_0x1b3d8f._0x2aa3dd,0x594,0x543)](_0x578691,_0x443bf0,_0xd3ded9);function _0xd2f9c(_0x240c3d,_0x34d536,_0x3058d3,_0x481ebd){return _0x50a2ac(_0x481ebd,_0x34d536- -0xcc,_0x3058d3-0x58,_0x481ebd-_0x179f56._0x84eeae);}function _0x376e21(_0x5877c0,_0x3908b6,_0x4364c3,_0x4eb6ff){return _0xaba6e0(_0x5877c0-_0x283cc2._0x38bea3,_0x3908b6,_0x4eb6ff-0x418,_0x4eb6ff-0x11f);}return await _0x3ae304[_0xd2f9c(0x3fc,_0x1b3d8f._0x3b9b25,0x424,0x3b8)](_0x578691,_0x52bab7,_0xd3ded9),_0x52bab7;}async function emitEvent2(_0x33fc2d,_0x4accce,_0x2e0fc6){await _0x33fc2d?.(_0x4accce,_0x2e0fc6);}function replaceToolUseBlocks(_0x1eb928,_0x503a62){const _0xb6fff1={_0x129b4f:0x19e},_0x19cdbc={_0x574bc2:0xc,_0x4c1693:0x47},_0x1314eb={_0x18f46e:0x1b0};let _0x2a8b30=0x0;function _0x179bd1(_0x5c6dc4,_0xaeb51b,_0xda9c4b,_0x4cca05){return _0xaba6e0(_0x5c6dc4-0x86,_0x4cca05,_0xaeb51b- -0x2b5,_0x4cca05-_0x1314eb._0x18f46e);}return{..._0x1eb928,'content':_0x1eb928[_0x179bd1(-_0xb6fff1._0x129b4f,-0x1bb,-0x1a7,-0x185)]['map'](_0x334075=>{const _0x583ef2={_0x10a095:0x4a};if(_0x334075[_0x4a3dd4(-_0x19cdbc._0x574bc2,0x39,0x6d,_0x19cdbc._0x4c1693)]!=='tool_use')return _0x334075;function _0x4a3dd4(_0x3e9012,_0x48a8d6,_0x50990a,_0x53bd69){return _0x179bd1(_0x3e9012-_0x583ef2._0x10a095,_0x48a8d6-0x21f,_0x50990a-0x195,_0x3e9012);}const _0x1d9a70=_0x503a62[_0x2a8b30];return _0x2a8b30+=0x1,structuredClone(_0x1d9a70);})};}function createAssistantMessageId(_0x546212,_0x509e9b){const _0x576ff2={_0x2e1912:0xc1,_0x467632:0x9f},_0x418e15={_0x2516ee:0x424};function _0x3a6e3e(_0x3d603f,_0x26e979,_0x13ac28,_0x25c5c3){return _0x50a2ac(_0x26e979,_0x25c5c3- -_0x418e15._0x2516ee,_0x13ac28-0x97,_0x25c5c3-0x14a);}return _0x546212+_0x3a6e3e(_0x576ff2._0x2e1912,_0x576ff2._0x467632,0x8c,0xd5)+_0x509e9b;}function createReasoningMessageId(_0x2f2f9c){return _0x2f2f9c+':reasoning';}function withMessageId(_0x9aa478,_0x245da9){if(_0x9aa478['id']===_0x245da9)return _0x9aa478;return{..._0x9aa478,'id':_0x245da9};}function createAssistantChunkEvent(_0x2af746,_0x3ed1f3){const _0x2542ba={_0x48f4e9:0x301,_0x4f8d96:0x2d5,_0x53698e:0x2b5,_0x458a25:0x325,_0x462e15:0x360,_0x2a735c:0x35b,_0x5770d2:0x369,_0x5dd425:0x34e,_0x31aedc:0x2e6,_0x5916d6:0x2cc,_0x116374:0x315},_0x570cf1={_0x46d4a3:0x1e6,_0x40bfb0:0x20e},_0x366dc4={_0x35e5a9:0xd4,_0x2dad39:0x171};function _0x4dd584(_0x35b7eb,_0x4e53d8,_0x1a5d09,_0x3d4fe6){return _0xaba6e0(_0x35b7eb-_0x366dc4._0x35e5a9,_0x1a5d09,_0x4e53d8-_0x366dc4._0x2dad39,_0x3d4fe6-0x130);}if(_0x2af746[_0x55bca7(0x2dd,_0x2542ba._0x48f4e9,0x2ad,0x28d)]!==_0x4dd584(0x2e5,_0x2542ba._0x4f8d96,_0x2542ba._0x53698e,0x29b))return void 0x0;if(_0x2af746[_0x55bca7(_0x2542ba._0x458a25,0x306,_0x2542ba._0x462e15,_0x2542ba._0x2a735c)]===void 0x0)return void 0x0;function _0x55bca7(_0x480159,_0xf6527f,_0xc0530f,_0x416632){return _0xaba6e0(_0x480159-_0x570cf1._0x46d4a3,_0xc0530f,_0x480159-_0x570cf1._0x40bfb0,_0x416632-0x87);}return{'type':'assistant_chunk','index':_0x2af746[_0x55bca7(_0x2542ba._0x5770d2,0x35f,_0x2542ba._0x5dd425,0x35b)]??0x0,'messageId':_0x3ed1f3,'chunk':{'type':_0x4dd584(0x2ca,0x2d5,0x2a3,_0x2542ba._0x31aedc),'index':_0x2af746[_0x4dd584(0x289,_0x2542ba._0x5916d6,0x310,0x275)]??0x0,'text':_0x2af746[_0x55bca7(0x325,0x341,_0x2542ba._0x116374,0x37a)]}};}function createToolUseChunkEvent(_0x32d08c,_0x3a493d){const _0x29ec93={_0xf6d9bd:0x324,_0x6b0c29:0x2dc,_0x259d4e:0x2e0,_0x345c75:0x28d,_0x4920a3:0x21c,_0x338380:0x1fe,_0xd8c24a:0x244,_0x58a2e0:0x2ad,_0x15548a:0x2e0,_0x113467:0x2dc,_0x24836a:0x36c,_0x479f70:0x275,_0x2d3831:0x2c8,_0x296932:0x266},_0x2b88b={_0x28da98:0x39f,_0x3a3f65:0xf8},_0x2c3563={_0x3efca7:0x55,_0x3685cf:0x84};function _0x5eadb1(_0x1f0e60,_0x2b2c3e,_0x2e154c,_0x3d9994){return _0x50a2ac(_0x3d9994,_0x2b2c3e- -0x1fb,_0x2e154c-_0x2c3563._0x3efca7,_0x3d9994-_0x2c3563._0x3685cf);}if(_0x32d08c[_0x5eadb1(0x31a,0x2e3,0x32b,0x2ff)]!==_0x2ba784(-_0x29ec93._0xf6d9bd,-0x2e8,-0x2fa,-_0x29ec93._0x6b0c29))return void 0x0;function _0x2ba784(_0x1e0576,_0x169ac8,_0x53c5aa,_0x42fbaf){return _0xaba6e0(_0x1e0576-0x199,_0x53c5aa,_0x42fbaf- -_0x2b88b._0x28da98,_0x42fbaf-_0x2b88b._0x3a3f65);}return{'type':_0x5eadb1(0x29c,_0x29ec93._0x259d4e,_0x29ec93._0x345c75,0x31c),'index':_0x32d08c[_0x2ba784(-_0x29ec93._0x4920a3,-0x225,-_0x29ec93._0x338380,-_0x29ec93._0xd8c24a)]??0x0,'messageId':_0x3a493d,'chunk':{'type':_0x2ba784(-_0x29ec93._0x58a2e0,-0x2e6,-_0x29ec93._0x15548a,-_0x29ec93._0x113467),'id':_0x32d08c['id']??'','index':_0x32d08c[_0x5eadb1(_0x29ec93._0x24836a,0x36f,0x319,0x361)]??0x0,..._0x32d08c[_0x2ba784(-0x245,-0x257,-0x237,-_0x29ec93._0x479f70)]!==void 0x0?{'name':_0x32d08c['name']}:{},..._0x32d08c['inputDelta']!==void 0x0?{'inputDelta':_0x32d08c[_0x2ba784(-0x23f,-_0x29ec93._0x2d3831,-_0x29ec93._0x296932,-0x27d)]}:{}}};}function createReasoningChunkEvent(_0x1796bd,_0x5ab81f){const _0x2b9dd1={_0x53d225:0xda,_0x45178a:0x14c,_0x4c9ddf:0x29a,_0x410556:0x275,_0x3f8b26:0x226,_0x18fcd5:0x27d,_0x26e60d:0x25e,_0x3472db:0x277,_0x5a138c:0x10a,_0x2b0230:0xd1,_0x4e3702:0x106,_0x3e0f94:0x12e,_0x6273cb:0xb3,_0xf18517:0x2bf,_0x3543e2:0x112,_0x1a9a0b:0x128,_0x18c7cb:0x10b,_0x88de08:0x2b4,_0x90ef0f:0x2d3,_0x1dd838:0x239,_0x45272c:0x2a0,_0x3fdd99:0x102,_0x5eae43:0xd0,_0x39b554:0x2bc,_0x1c4a1b:0x2a4},_0x5571e1={_0x292148:0x1cc,_0x251cec:0xee},_0x1864e4={_0x517c06:0xae};function _0x147ab2(_0x55cc01,_0x2615e1,_0x3b698e,_0x1923ef){return _0xaba6e0(_0x55cc01-_0x1864e4._0x517c06,_0x2615e1,_0x55cc01- -0x381,_0x1923ef-0x8c);}function _0xbd4b15(_0x1a7e46,_0x44d20e,_0x3af4b6,_0x847468){return _0xaba6e0(_0x1a7e46-_0x5571e1._0x292148,_0x44d20e,_0x3af4b6- -0x1f9,_0x847468-_0x5571e1._0x251cec);}switch(_0x1796bd['type']){case _0xbd4b15(-_0x2b9dd1._0x53d225,-0x12a,-0x112,-_0x2b9dd1._0x45178a):return{'type':'reasoning_chunk','index':_0x1796bd['index'],'messageId':_0x5ab81f,'chunk':{'type':_0x147ab2(-_0x2b9dd1._0x4c9ddf,-0x2cf,-0x2d4,-_0x2b9dd1._0x410556),'index':_0x1796bd[_0x147ab2(-_0x2b9dd1._0x3f8b26,-0x1ff,-0x237,-0x1ee)]??0x0,'thinking':_0x1796bd[_0x147ab2(-_0x2b9dd1._0x18fcd5,-0x25b,-0x257,-_0x2b9dd1._0x26e60d)]??''},'text':_0x1796bd[_0x147ab2(-0x27d,-_0x2b9dd1._0x3472db,-0x24e,-0x2d4)]??''};case _0xbd4b15(-_0x2b9dd1._0x5a138c,-_0x2b9dd1._0x2b0230,-_0x2b9dd1._0x4e3702,-_0x2b9dd1._0x3e0f94):return{'type':_0x147ab2(-0x2b4,-0x2d2,-0x285,-0x30a),'index':_0x1796bd['contentIndex'],'messageId':_0x5ab81f,'chunk':{'type':_0xbd4b15(-_0x2b9dd1._0x6273cb,-0xbf,-0x106,-0x103),'contentIndex':_0x1796bd[_0x147ab2(-0x2ba,-0x29f,-0x2af,-_0x2b9dd1._0xf18517)]??0x0,'delta':_0x1796bd[_0xbd4b15(-_0x2b9dd1._0x3543e2,-0xde,-0x134,-0x165)]??'','itemId':_0x1796bd['itemId']??'','outputIndex':_0x1796bd['outputIndex']??0x0},'text':_0x1796bd[_0xbd4b15(-_0x2b9dd1._0x1a9a0b,-0x12f,-0x134,-_0x2b9dd1._0x18c7cb)]??''};case'openai_reasoning_summary_delta':return{'type':_0x147ab2(-_0x2b9dd1._0x88de08,-0x2a7,-_0x2b9dd1._0x90ef0f,-0x273),'index':_0x1796bd['summaryIndex'],'messageId':_0x5ab81f,'chunk':{'type':_0x147ab2(-0x26f,-_0x2b9dd1._0x1dd838,-_0x2b9dd1._0x45272c,-0x269),'delta':_0x1796bd['delta']??'','itemId':_0x1796bd[_0xbd4b15(-_0x2b9dd1._0x3fdd99,-0xdc,-0xc4,-0xc7)]??'','outputIndex':_0x1796bd[_0xbd4b15(-_0x2b9dd1._0x5eae43,-0x8b,-0xc5,-0xc5)]??0x0,'summaryIndex':_0x1796bd['summaryIndex']??0x0},'text':_0x1796bd[_0x147ab2(-_0x2b9dd1._0x39b554,-0x2e5,-_0x2b9dd1._0x1c4a1b,-0x303)]??''};default:return void 0x0;}}function _0xaba6e0(_0x350834,_0x44042c,_0x549a96,_0x2d7267){return _0x45e0(_0x549a96- -0x45,_0x44042c);}function isAbortedToolResult(_0x5e7856){const _0x6f906d={_0x13070f:0x1a7,_0xa0ff3f:0x1ab,_0xfdddec:0x373,_0x2c8ad0:0x376,_0x383cff:0x315,_0x2ce7a6:0x34e,_0x5d3634:0x345,_0x1f34c9:0x356},_0x1aa9e8={_0x1797ae:0x195},_0x4cb96c={_0x114327:0x1cb,_0x384e6a:0xf5};function _0x418788(_0x40fc7e,_0x49fd6d,_0x13dc73,_0x576592){return _0x50a2ac(_0x13dc73,_0x49fd6d- -_0x4cb96c._0x114327,_0x13dc73-_0x4cb96c._0x384e6a,_0x576592-0x1c6);}function _0x346c80(_0x35624a,_0xef33b,_0xef6677,_0x37b0db){return _0x50a2ac(_0xef6677,_0xef33b- -0x6c6,_0xef6677-0x2b,_0x37b0db-_0x1aa9e8._0x1797ae);}return _0x5e7856['status']===_0x346c80(-0x197,-_0x6f906d._0x13070f,-0x1af,-_0x6f906d._0xa0ff3f)&&_0x5e7856[_0x418788(_0x6f906d._0xfdddec,_0x6f906d._0x2c8ad0,0x337,0x3a3)][_0x418788(_0x6f906d._0x383cff,_0x6f906d._0x2ce7a6,_0x6f906d._0x5d3634,_0x6f906d._0x1f34c9)]===!![];}async function executeModelRequest(_0x119a08,_0x13fc70,_0x167ff9,_0x4ab364,_0x195162,_0x98a601){const _0x16eb7a={_0x2d1230:0x2f8,_0x3fc692:0x368,_0x165f9d:0x328,_0x6ddd47:0x35f,_0x404548:0x3d2,_0x894aac:0x353,_0x15b390:0x3b9,_0x410459:0x4a2,_0x4b7d95:0x43d,_0x3b8812:0x3e8,_0x1bc5a6:0x47a,_0x650645:0x439,_0x1d9bdf:0x4dd,_0x2fc2fe:0x471,_0x13b53c:0x434,_0x1790b1:0x477,_0x1339d0:0x496,_0x2b430d:0x4ac,_0x339144:0x490,_0x599f3f:0x2fb,_0xa1cb31:0x367,_0x5edf8f:0x39e,_0xcf9f5a:0x469,_0x320063:0x47b,_0xfb99d8:0x372,_0xa452ab:0x389,_0x15c9dd:0x365,_0x2e526c:0x36d,_0x57c294:0x465,_0x436b7a:0x45b,_0xde3477:0x479,_0x3680a4:0x354,_0x43b0d8:0x373,_0x444c0d:0x364,_0x3ae046:0x447,_0x141e18:0x34e,_0x2ee00d:0x2fb,_0x1be37d:0x342,_0x5b9695:0x335,_0x5ae296:0x454,_0x110dcd:0x46d,_0x4295ab:0x4be,_0x4bc221:0x43f,_0xbe8050:0x40c,_0x3d65fa:0x3fe,_0x303731:0x422,_0xdfaec:0x458,_0x3cea3a:0x44f,_0xc7f557:0x32a,_0x3a632d:0x307,_0x360b51:0x4f7,_0x24ae73:0x502,_0x1ad643:0x4b8},_0x4f452b={_0x1b3175:0x80,_0x1e47bd:0x266},_0x342e47={_0x3e17d9:0x1dd};throwIfAborted(_0x13fc70['signal']);if(!_0x13fc70[_0x576a03(_0x16eb7a._0x2d1230,_0x16eb7a._0x3fc692,0x346,0x325)]||!_0x167ff9[_0x576a03(0x313,0x344,_0x16eb7a._0x165f9d,0x2fe)])return await _0x167ff9[_0x576a03(_0x16eb7a._0x6ddd47,0x375,0x37b,_0x16eb7a._0x404548)](_0x119a08,{'signal':_0x13fc70['signal']});let _0x4cf3ad;function _0x72b685(_0x350a6e,_0x281567,_0x4b0c7a,_0x82d3c8){return _0x50a2ac(_0x4b0c7a,_0x82d3c8- -0xa5,_0x4b0c7a-_0x342e47._0x3e17d9,_0x82d3c8-0x1e0);}for await(const _0x270ffc of _0x167ff9[_0x576a03(0x2df,0x302,_0x16eb7a._0x165f9d,0x316)](_0x119a08,{'signal':_0x13fc70[_0x576a03(_0x16eb7a._0x894aac,_0x16eb7a._0x15b390,0x366,0x312)]})){throwIfAborted(_0x13fc70[_0x72b685(_0x16eb7a._0x410459,_0x16eb7a._0x4b7d95,0x41e,0x46a)]);if(_0x270ffc[_0x72b685(0x483,_0x16eb7a._0x3b8812,_0x16eb7a._0x1bc5a6,_0x16eb7a._0x650645)]==='done'){_0x98a601[_0x72b685(_0x16eb7a._0x1d9bdf,0x473,_0x16eb7a._0x2fc2fe,0x490)][_0x72b685(0x45a,0x448,_0x16eb7a._0x13b53c,_0x16eb7a._0x1790b1)]!==void 0x0&&_0x98a601[_0x72b685(_0x16eb7a._0x1339d0,0x494,_0x16eb7a._0x2b430d,_0x16eb7a._0x339144)]['reasoningCompletedAt']===void 0x0&&(_0x98a601['meta'][_0x576a03(_0x16eb7a._0x599f3f,0x315,0x34b,_0x16eb7a._0xa1cb31)]=Date['now']());_0x4cf3ad=_0x270ffc['response'];continue;}if(_0x270ffc['type']===_0x576a03(0x392,0x390,_0x16eb7a._0x5edf8f,0x3d6)){await emitEvent2(_0x4ab364[_0x72b685(_0x16eb7a._0xcf9f5a,0x4c2,0x425,_0x16eb7a._0x320063)],_0x270ffc,_0x195162);continue;}const _0x319505=createReasoningChunkEvent(_0x270ffc,_0x98a601[_0x576a03(0x35d,_0x16eb7a._0xfb99d8,0x35f,_0x16eb7a._0xa452ab)]);if(_0x319505&&_0x319505[_0x576a03(_0x16eb7a._0x15c9dd,0x33c,0x335,0x333)]===_0x576a03(0x30e,0x33c,0x333,_0x16eb7a._0x2e526c)&&_0x319505['text'][_0x72b685(0x49c,0x44d,0x491,_0x16eb7a._0x57c294)]>0x0){_0x98a601[_0x72b685(0x46f,_0x16eb7a._0x436b7a,_0x16eb7a._0xde3477,0x490)][_0x576a03(0x36b,_0x16eb7a._0x3680a4,_0x16eb7a._0x43b0d8,_0x16eb7a._0x444c0d)]===void 0x0&&(_0x98a601[_0x72b685(0x4ca,_0x16eb7a._0x3ae046,0x47b,_0x16eb7a._0x339144)][_0x576a03(0x363,_0x16eb7a._0x141e18,_0x16eb7a._0x43b0d8,0x373)]=Date[_0x576a03(0x37b,_0x16eb7a._0x2ee00d,_0x16eb7a._0x1be37d,_0x16eb7a._0x5b9695)]());await emitEvent2(_0x4ab364[_0x72b685(_0x16eb7a._0x5ae296,_0x16eb7a._0x110dcd,0x4d1,0x47b)],_0x319505,_0x195162);continue;}const _0x4aa267=createAssistantChunkEvent(_0x270ffc,_0x98a601['assistantMessageId']);if(_0x4aa267){_0x98a601[_0x72b685(0x444,_0x16eb7a._0x4295ab,0x441,0x490)][_0x72b685(0x457,0x46c,_0x16eb7a._0x4bc221,_0x16eb7a._0x1790b1)]!==void 0x0&&_0x98a601['meta'][_0x72b685(0x49b,0x44a,_0x16eb7a._0xbe8050,0x44f)]===void 0x0&&(_0x98a601['meta'][_0x72b685(_0x16eb7a._0x3d65fa,_0x16eb7a._0x303731,_0x16eb7a._0xdfaec,_0x16eb7a._0x3cea3a)]=Date[_0x576a03(_0x16eb7a._0xc7f557,0x395,_0x16eb7a._0x1be37d,_0x16eb7a._0x3a632d)]());await emitEvent2(_0x4ab364['onEvent'],_0x4aa267,_0x195162);continue;}const _0x3e0426=createToolUseChunkEvent(_0x270ffc,_0x98a601['assistantMessageId']);_0x3e0426&&await emitEvent2(_0x4ab364['onEvent'],_0x3e0426,_0x195162);}function _0x576a03(_0x5ab1f3,_0x154583,_0x254a89,_0x3fdb41){return _0xaba6e0(_0x5ab1f3-_0x4f452b._0x1b3175,_0x3fdb41,_0x254a89-_0x4f452b._0x1e47bd,_0x3fdb41-0x132);}if(!_0x4cf3ad)throw new Error(_0x72b685(_0x16eb7a._0x360b51,_0x16eb7a._0x24ae73,0x4cd,_0x16eb7a._0x1ad643));return _0x4cf3ad;}function makeTurnGuards(_0x15bb2b,_0x49869c,_0x27c660,_0x46a393,_0xbb86e4){return{async 'stage'(_0x67c9e5,_0x5bd662){return throwIfAborted(_0x15bb2b),await runStage(_0x49869c,_0x67c9e5,_0x5bd662,_0x46a393);},async 'emit'(_0x30e754){throwIfAborted(_0x15bb2b),await emitEvent2(_0x27c660,_0x30e754,_0xbb86e4);},async 'stageUnchecked'(_0x4e0b6f,_0x51d646){return await runStage(_0x49869c,_0x4e0b6f,_0x51d646,_0x46a393);},async 'emitUnchecked'(_0x463234){await emitEvent2(_0x27c660,_0x463234,_0xbb86e4);}};}async function runTurn(_0x26c7ea,_0xf03793){const _0x53ef17={_0x526dcf:0x144,_0x7eb881:0x123,_0x1849ba:0xef,_0x4779bb:0x150,_0x163ee8:0x14b,_0x648370:0x12c,_0x12f42c:0x10b,_0xc64f00:0x178,_0x128e5a:0x163,_0x27751d:0x114,_0x16da5c:0xf2,_0x58ee3d:0x165,_0x526aa6:0xee,_0xed6f5c:0x39f,_0x2ec25d:0x3d3,_0x45dad1:0x3d0,_0x2bc1c9:0x3e2,_0x38ea32:0x3df,_0x14aaf0:0x440,_0x562575:0x134,_0x156c7d:0x147,_0x3216e5:0x125,_0x522052:0x148,_0x33d4c7:0xfe,_0x44b4c2:0x3a3,_0x5e5a7f:0x37f,_0x25d1c2:0x3c5,_0x3c0a01:0x45d,_0x5d36fd:0x3d9,_0x59fa1f:0x3f5,_0x4a9939:0x3f6,_0x294328:0x3a4,_0x2e622c:0x414,_0x4e237d:0x38f,_0x28f826:0x15d,_0x10ec34:0x123,_0x4384b1:0x176,_0x1d7ca1:0x3b3,_0x2b7488:0x45a,_0x3c2164:0x407,_0x1b9f7f:0x14b,_0x25f300:0x15c,_0x5ab411:0x178,_0x149914:0x133,_0x4824f5:0x169,_0xb83831:0x198,_0x3987d8:0x14f,_0x319da4:0x168,_0xcc12d2:0x192,_0x21e24c:0x164,_0x1dc426:0xe1,_0x3e4b5c:0x1d3,_0x4af172:0x199,_0x2bfc1f:0x3f6,_0x64f323:0x48c,_0x50ccb2:0x401,_0x1d4329:0x167,_0x8e57e1:0x16b,_0x2c5fa0:0x137,_0x881289:0x44e,_0x3da8d6:0x48f,_0x3cc756:0x442,_0x2cc276:0x151,_0x38b4aa:0x10d,_0x35c80b:0xce,_0x34de7f:0xed,_0x5ed97d:0xe7,_0x205788:0x10c,_0x38697b:0x437,_0x157180:0x418,_0x3c6c19:0xf1,_0x4e7896:0xdb,_0x2bff6b:0x17b,_0x2d28ab:0x1df,_0x121f60:0x188,_0x17de72:0x165,_0x32e230:0x1ba,_0x36a2c1:0xe9,_0x29b356:0x111,_0x363530:0x457,_0x16f418:0x400,_0x285699:0x3a4,_0x2905dd:0x428,_0x1d1f7c:0x3b4,_0x40cd97:0x44c,_0xe686c0:0x3c1,_0x477d6f:0x440,_0x29c7d3:0x122,_0x313f5c:0xf9,_0x22367f:0x3ce,_0x150ddf:0x3da,_0x352fe8:0x3c3,_0x31b8f7:0x41c,_0x2b20cc:0x41b,_0x848ad3:0x400,_0x5687fc:0x3c8,_0x21df93:0x3a6,_0x488b24:0x421,_0x108d87:0x482,_0x5f58ae:0x48c,_0x1beda6:0x45f,_0x28ece8:0x190,_0x5ad129:0x1c3,_0x387dc1:0x149,_0x5551fa:0x459,_0x4df2a2:0x443,_0x3d95a5:0x40b,_0x26c699:0x3cc,_0x5aba19:0x41b,_0x148573:0x3cb,_0xd9b12f:0x417,_0x51e8ac:0x441,_0x2e6f89:0x3de,_0x64896e:0x12e,_0x707db1:0x10b,_0x4b832e:0x3bb,_0x3df7d5:0x39e,_0x2c810d:0x3ad,_0x56f75f:0x455,_0x1e66c7:0x3f9,_0x434dc3:0x101,_0x39797e:0x12d},_0x5c53a0={_0x539185:0xe3,_0xc799c8:0x466,_0xea388a:0x424,_0x2424a3:0x44e,_0x26bc03:0x44d},_0x526d58={_0x3e4051:0x3d},_0x4fbe5c={_0x4832c5:0x180,_0xa98bdc:0x1d1},_0x12f27a=_0xf03793['chatModel'],_0x5cf600=_0x26c7ea[_0x4a6f10(0x128,_0x53ef17._0x526dcf,_0x53ef17._0x7eb881,_0x53ef17._0x1849ba)]??new AbortController()['signal'],_0x66415={'sessionId':_0x26c7ea[_0x4a6f10(_0x53ef17._0x4779bb,_0x53ef17._0x163ee8,_0x53ef17._0x648370,0x12d)],'turnId':_0x26c7ea[_0x4a6f10(_0x53ef17._0x12f42c,_0x53ef17._0xc64f00,0x125,0xd3)],'system':normalizeSystem(_0x26c7ea[_0x4a6f10(_0x53ef17._0x7eb881,_0x53ef17._0x128e5a,_0x53ef17._0x27751d,_0x53ef17._0x16da5c)]),'messages':(_0x26c7ea['messages']??[])[_0x4a6f10(_0x53ef17._0x58ee3d,0x194,0x147,0x105)](normalizeMessage),'lastResponse':void 0x0,'toolResults':[],'finalMessage':void 0x0,'sessionDir':typeof _0xf03793[_0x4a6f10(0xe2,0xae,_0x53ef17._0x526aa6,0x10a)]==='function'?_0xf03793['sessionDir']():_0xf03793[_0x10b388(0x3d9,_0x53ef17._0xed6f5c,_0x53ef17._0x2ec25d,_0x53ef17._0x45dad1)]};function _0x10b388(_0x35bd81,_0x295a8f,_0x4d8971,_0x4d56c1){return _0x50a2ac(_0x295a8f,_0x4d56c1- -0x10a,_0x4d8971-_0x4fbe5c._0x4832c5,_0x4d56c1-_0x4fbe5c._0xa98bdc);}function _0x4a6f10(_0x49da70,_0x56b9a5,_0x1187b0,_0x25fbe6){return _0x50a2ac(_0x56b9a5,_0x1187b0- -0x3ec,_0x1187b0-_0x526d58._0x3e4051,_0x25fbe6-0x101);}const _0x5580bc=makeExtensionContext(_0x66415),_0x4f5eb8={'sessionId':_0x66415[_0x10b388(_0x53ef17._0x2bc1c9,_0x53ef17._0x38ea32,_0x53ef17._0x14aaf0,0x40e)],'turnId':_0x66415[_0x4a6f10(_0x53ef17._0x562575,_0x53ef17._0x156c7d,_0x53ef17._0x3216e5,_0x53ef17._0x522052)],'state':_0x66415,'signal':_0x5cf600,..._0xf03793[_0x4a6f10(0x108,0x9b,0xeb,_0x53ef17._0x33d4c7)]?{'askUser':_0xf03793['askUser']}:{},..._0xf03793['setTopic']?{'setTopic':_0xf03793[_0x10b388(0x38c,_0x53ef17._0x44b4c2,_0x53ef17._0x5e5a7f,_0x53ef17._0x25d1c2)]}:{}},{stage:_0x57c497,emit:_0x5412ce,stageUnchecked:_0xb074f8,emitUnchecked:_0x417326}=makeTurnGuards(_0x5cf600,_0xf03793['registry'],_0xf03793[_0x4a6f10(0xf5,0x140,_0x53ef17._0x562575,0x14f)],_0x5580bc,_0x4f5eb8),_0x251808=async(_0x507c5e,_0x211040)=>{const _0x53059a={_0x4e9852:0x4,_0x35e4c3:0x75};function _0x15ca3a(_0x278ceb,_0x534e2b,_0x39b21a,_0xf2471e){return _0x10b388(_0x278ceb-_0x53059a._0x4e9852,_0x534e2b,_0x39b21a-_0x53059a._0x35e4c3,_0x278ceb-0xa0);}const _0x2886fa=_0x211040?{..._0x5580bc,'turnMeta':_0x211040}:_0x5580bc;function _0x2d81d6(_0x475361,_0x19beac,_0x1b8910,_0x16c84b){return _0x4a6f10(_0x475361-0x19a,_0x19beac,_0x475361- -0x22e,_0x16c84b-0x158);}await _0xf03793[_0x2d81d6(-0xf2,-_0x5c53a0._0x539185,-0x131,-0xbe)][_0x15ca3a(_0x5c53a0._0xc799c8,_0x5c53a0._0xea388a,_0x5c53a0._0x2424a3,_0x5c53a0._0x26bc03)]('afterMessageAppend',structuredClone(_0x507c5e),_0x2886fa);};let _0xf6850a=0x0;try{const _0x10bca8=await _0x57c497(_0x10b388(0x3fa,0x3fa,0x40d,0x441),normalizeMessage(_0x26c7ea[_0x10b388(0x464,0x442,0x464,_0x53ef17._0x3c0a01)]));_0x66415[_0x10b388(_0x53ef17._0x5d36fd,_0x53ef17._0x59fa1f,_0x53ef17._0x4a9939,0x3c3)][_0x10b388(_0x53ef17._0x294328,_0x53ef17._0x2e622c,_0x53ef17._0x4e237d,0x3cb)](_0x10bca8),await _0x251808(_0x10bca8),await _0x5412ce({'type':_0x4a6f10(_0x53ef17._0x28f826,_0x53ef17._0x10ec34,_0x53ef17._0x4384b1,0x19a),'message':_0x10bca8});while(!![]){throwIfAborted(_0x5cf600),_0xf6850a+=0x1;const _0x194508=createAssistantMessageId(_0x66415[_0x10b388(0x440,_0x53ef17._0x1d7ca1,_0x53ef17._0x2b7488,_0x53ef17._0x3c2164)],_0xf6850a),_0x4868fa=createReasoningMessageId(_0x194508),_0x372bfa={'model':_0x12f27a[_0x4a6f10(_0x53ef17._0x1b9f7f,_0x53ef17._0x25f300,_0x53ef17._0x5ab411,0x17f)],..._0x12f27a[_0x4a6f10(_0x53ef17._0x562575,_0x53ef17._0x149914,_0x53ef17._0x4824f5,0x142)]?{'provider':_0x12f27a[_0x4a6f10(0x162,_0x53ef17._0xb83831,0x169,_0x53ef17._0x3987d8)]}:{}};let _0x511e76={'model':_0x12f27a[_0x4a6f10(0x198,0x12d,_0x53ef17._0xc64f00,_0x53ef17._0x522052)],..._0x12f27a[_0x4a6f10(_0x53ef17._0x319da4,_0x53ef17._0xcc12d2,_0x53ef17._0x21e24c,0x131)]!==void 0x0?{'maxTokens':_0x12f27a['maxTokens']}:{},'system':structuredClone(_0x66415['system']),'messages':structuredClone(_0x66415[_0x4a6f10(0xed,0xc4,_0x53ef17._0x1dc426,0x133)]),'tools':_0xf03793[_0x4a6f10(0x1b6,_0x53ef17._0x3e4b5c,0x17d,_0x53ef17._0x4af172)][_0x10b388(_0x53ef17._0x2bfc1f,_0x53ef17._0x64f323,_0x53ef17._0x50ccb2,0x445)](),'metadata':{'sessionId':_0x66415[_0x4a6f10(0x14a,_0x53ef17._0x1d4329,0x12c,0xd6)],'turnId':_0x66415['turnId']},..._0xf03793[_0x4a6f10(0x146,0x19f,_0x53ef17._0x8e57e1,_0x53ef17._0x2c5fa0)]?{'outputFormat':_0xf03793[_0x10b388(_0x53ef17._0x881289,_0x53ef17._0x3da8d6,_0x53ef17._0x3cc756,0x44d)]}:{}};_0x511e76=await _0x57c497(_0x4a6f10(_0x53ef17._0x2cc276,0x100,0x102,_0x53ef17._0x38b4aa),_0x511e76),await _0x5412ce({'type':_0x4a6f10(_0x53ef17._0x35c80b,_0x53ef17._0x34de7f,0xe0,_0x53ef17._0x149914),'request':_0x511e76}),_0x372bfa[_0x4a6f10(_0x53ef17._0x5ed97d,0xba,_0x53ef17._0x205788,0xd3)]=Date[_0x10b388(_0x53ef17._0x38697b,_0x53ef17._0x157180,0x38f,0x3e1)]();let _0x125a9e=await executeModelRequest(_0x511e76,_0x26c7ea,_0x12f27a,_0xf03793,_0x4f5eb8,{'assistantMessageId':_0x194508,'reasoningMessageId':_0x4868fa,'meta':_0x372bfa});_0x372bfa['turnCompletedAt']=Date['now'](),_0x125a9e=await _0x57c497('afterModelResponse',_0x125a9e),await _0x5412ce({'type':'model_response','response':_0x125a9e}),_0x66415['lastResponse']=_0x125a9e;let _0x1febba=await _0x57c497(_0x4a6f10(0x101,_0x53ef17._0x3c6c19,0xf8,_0x53ef17._0x4e7896),withMessageId(responseToAssistantMessage(_0x125a9e),_0x194508));_0x1febba=withMessageId(_0x1febba,_0x194508);const _0x4d1f32=getToolUseBlocks(_0x1febba),_0xce3ff5=await Promise['all'](_0x4d1f32[_0x4a6f10(_0x53ef17._0x2bff6b,0x187,0x147,0x184)](_0x5c102a=>_0x57c497(_0x4a6f10(0x109,0xc0,0xf6,0xb5),_0x5c102a)));_0xce3ff5['length']>0x0&&(_0x1febba=replaceToolUseBlocks(_0x1febba,_0xce3ff5));const _0x35413e=withMessageId(_0x1febba,_0x194508);_0x1febba=_0x35413e;const _0x407a13=createReasoningMessage(_0x1febba),_0x414148=createAssistantTextMessage(_0x1febba),_0x10d8e3=createToolUseMessage(_0x1febba);_0x407a13&&await _0x5412ce({'type':'reasoning_message','message':withMessageId(_0x407a13,_0x4868fa)});_0x414148&&await _0x5412ce({'type':_0x4a6f10(_0x53ef17._0x2d28ab,0x16e,_0x53ef17._0x121f60,_0x53ef17._0x1d4329),'message':withMessageId(_0x414148,_0x194508)});_0x10d8e3&&await _0x5412ce({'type':_0x4a6f10(0x196,_0x53ef17._0x17de72,0x186,_0x53ef17._0x32e230),'message':withMessageId(_0x10d8e3,_0x194508)});_0x66415['messages'][_0x4a6f10(0xc4,0xed,_0x53ef17._0x36a2c1,_0x53ef17._0x29b356)](_0x35413e);_0xce3ff5[_0x10b388(0x40f,_0x53ef17._0x363530,0x445,_0x53ef17._0x16f418)]>0x0&&await _0x251808(_0x35413e,_0x372bfa);for(const _0x3112aa of _0xce3ff5){await _0x5412ce({'type':_0x10b388(_0x53ef17._0x285699,_0x53ef17._0x2905dd,0x41a,0x3df),'toolCall':_0x3112aa});}if(_0xce3ff5[_0x10b388(0x3c2,_0x53ef17._0x1d1f7c,0x413,0x400)]===0x0){const _0x3f9f64=await _0x57c497(_0x10b388(_0x53ef17._0x40cd97,_0x53ef17._0xe686c0,_0x53ef17._0x477d6f,_0x53ef17._0x157180),_0x1febba),_0x4e4640=withMessageId(_0x3f9f64,_0x194508);return _0x66415[_0x4a6f10(_0x53ef17._0x319da4,_0x53ef17._0x29c7d3,0x148,_0x53ef17._0x313f5c)]=_0x4e4640,_0x66415[_0x10b388(_0x53ef17._0x22367f,_0x53ef17._0x150ddf,0x394,_0x53ef17._0x352fe8)][_0x66415['messages'][_0x10b388(_0x53ef17._0x31b8f7,0x443,_0x53ef17._0x2b20cc,_0x53ef17._0x848ad3)]-0x1]=_0x4e4640,await _0x251808(_0x4e4640,_0x372bfa),await _0x5412ce({'type':_0x10b388(0x440,_0x53ef17._0x5687fc,_0x53ef17._0x21df93,0x3f7),'message':_0x4e4640}),throwIfAborted(_0x5cf600),await _0xf03793[_0x4a6f10(0x146,0x18b,0x13c,0x16e)]['runObservers']('afterTurnComplete',_0x66415,_0x5580bc),await _0x5412ce({'type':_0x10b388(_0x53ef17._0x1d1f7c,0x3f2,_0x53ef17._0x488b24,0x3d3),'state':_0x66415}),{'status':_0x10b388(0x3e4,0x3c7,0x3d2,0x3cf),'finalMessage':_0x4e4640,'state':_0x66415};}let _0x11651a=await _0xf03793[_0x10b388(_0x53ef17._0x108d87,_0x53ef17._0x5f58ae,0x427,_0x53ef17._0x1beda6)][_0x4a6f10(_0x53ef17._0x28ece8,_0x53ef17._0x5ad129,0x17c,_0x53ef17._0x387dc1)](_0xce3ff5,_0x4f5eb8);const _0x579499=_0x11651a['some'](isAbortedToolResult),_0x4a7f6f=_0x579499?_0xb074f8:_0x57c497,_0x583697=_0x579499?_0x417326:_0x5412ce;_0x11651a=await Promise[_0x10b388(_0x53ef17._0x5551fa,0x413,_0x53ef17._0x4df2a2,_0x53ef17._0x3d95a5)](_0x11651a[_0x10b388(0x46c,0x41a,0x3f6,0x429)](_0x15e417=>_0x4a7f6f(_0x4a6f10(0x10b,0x107,0xf9,0xfd),_0x15e417))),_0x66415['toolResults'][_0x10b388(0x398,_0x53ef17._0x26c699,_0x53ef17._0x5aba19,_0x53ef17._0x148573)](..._0x11651a);for(const _0x19d4bb of _0x11651a){await _0x583697({'type':'tool_result','result':_0x19d4bb});}const _0x2301ec=await _0x4a7f6f(_0x10b388(_0x53ef17._0xd9b12f,_0x53ef17._0x51e8ac,_0x53ef17._0x2e6f89,0x435),createToolResultUserMessage(_0x11651a));await _0x583697({'type':_0x4a6f10(0x1a7,0x165,0x156,_0x53ef17._0x64896e),'message':_0x2301ec}),_0x66415[_0x4a6f10(_0x53ef17._0x707db1,0xb6,0xe1,0x11e)][_0x10b388(_0x53ef17._0x4b832e,_0x53ef17._0x3df7d5,_0x53ef17._0x2c810d,0x3cb)](_0x2301ec),await _0x251808(_0x2301ec);if(_0x579499)return{'status':_0x10b388(_0x53ef17._0x56f75f,0x3f0,_0x53ef17._0x1e66c7,0x40f),'state':_0x66415};}}catch(_0x185ce3){if(!_0x5cf600[_0x4a6f10(0xe3,_0x53ef17._0x434dc3,_0x53ef17._0x39797e,0xf9)])throw new TurnFailedError(_0x185ce3,_0x66415);return{'status':'aborted','state':_0x66415};}}function _0x462c(){const _0x13cfbf=['zgvWCW','ywjVCNq','Aw5WDxrezwX0yq','Aw5WDxrty2HLBwe','BwfW','zMLUywXnzxnZywDL','Bwv0yq','zgvSzxrL','BMv4Da','Dg9VBhncEu5HBwu','BMfTzq','CNvUvhjHBNnMB3jTzxjZ','B2jQzwn0','CMvNAxn0zxi','yxjYyxK','Dg90ywXpDxrWDxruB2TLBNm','yMvMB3jLvg9VBfjLC3vSDefWCgvUza','AxnbCNjHEq','C3rYDwn0DxjLza','Dg9VBf9Yzxn1BhrFBwvZC2fNzq','B3v0Chv0sw5KzxG','AxrLBuLK','oIbLEhbLy3rLzcbIB29SzwfU','CMvZCg9UC2u','ChjVDMLKzxjFCMv0CNK','Dg9VBf9JB21WBgv0zwq','nZeYnJy2C1rTthrI','odm3nde4mK1PvhPnsa','B25vC2vYtwvZC2fNzq','sw52ywXPzcb0B29SigLUChv0igf0ia','ywrKrxzLBNrmAxn0zw5LCG','C2v0u2vZC2LVBKLK','BgLZDfrVB2Xty2HLBwfZ','Bwf4vg9Rzw5Z','zxH0zw5ZAw9UCW','ywrK','C2v0vg9VBhm','CMfUzg9T','ChjVDMLKzxi','DhvYBKLUzgv4','B3v0Chv0rM9YBwf0','Dg9VBenHBgXdB3vUDa','B3v0Chv0','B25uB29Sq2fSBa','Dg90ywXszwfZB25PBMDuB2TLBNm','vw5RBM93BIb0B29SoIa','tw9KzwWGC3rYzwfTigvUzgvKihDPDgHVDxqGysbMAw5HBcbYzxnWB25Zzq','CMfJzq','mtKZotqZmMzQDwnIqW','z2v0q29UDgv4DfDPBMrVD0XPBwL0','ChjVCgvYDgLLCW','DxnLCL9TzxnZywDL','CMvTB3zLrxzLBNrmAxn0zw5LCG','Bw9KzwW','C3LZDgvTuhjVBxb0','zxHLy3v0zq','BwvZC2fNzq','zxHLy3v0zunHBgXZ','Dg9VBfj1BNrPBwu','Aw5KzxG','Dg9VBf9ZDgfYDgvK','C2v0q2HHDe1VzgvS','AxrLBxm','Dw5RBM93BL90B29S','mZqWoty5BffiwwnQ','BNvTyMvY','CNvU','Dg9VBf91C2vFBwvZC2fNzq','y29UDgvUDf9KzwX0yq','yxnZAxn0yw50x21LC3nHz2u','nw5qv2jkva','x3n5C3rLBvbYB21WDa','Bwv0CMLJCW','y2f1C2u','DgHLBG','Bw9KzwXFCMvXDwvZDa','BwvZC2fNzxm','B3v0Chv0vg9Rzw5Z','C2v0vg9WAwm','CNvUt2jZzxj2zxjZ','C3rYzwfT','Dg9VBf91C2vFzgvSDge','C2vUza','zgvSDge','ChvZAa','y29UDgvUDeLUzgv4','yxnRvxnLCG','C2v0','y29TCgXLDgvK','C2vZC2LVBKrPCG','Dg9VBf91C2vFy2H1BMS','CMvHC29UAw5Nx2nODw5R','DhvYBL9JB21WBgv0zq','DhLWzq','C2XPy2u','Dg90ywXnB2rLBfrPBwvnCW','DhvYBI0','yMvMB3jLvg9VBev4zwn1DgLVBG','zgvMyxvSDe1LC3nHz2u','yMvMB3jLqxnZAxn0yw50qxbWzw5K','ywz0zxjuB29SuMvZDwX0','qwDLBNqGCMvXDwLYzxmGysbJAgf0tw9KzwW','y2f0y2G','C3rYAw5N','Dg9VBf9JywXS','C3rYAw5NAwz5','BM93','mZuYmtDUCxbJA2m','mZi0t2zvzMPT','yMvMB3jLtw9KzwXszxf1zxn0','C3rYzwfTAw5N','Dg9VBhm','C29YDa','owDhALHpyq','z2v0','CMvHC29UAw5Nq29TCgXLDgvKqxq','zMLSDgvY','yw50AhjVCgLJx3rOAw5RAw5Nx2rLBhrH','CMvXDwvZDenVDw50','DhvYBLn0yxj0zwrbDa','oMfZC2LZDgfUDdO','CMvHC29UAw5Nvg9Rzw5Z','Bw9KzwXdywXSq291BNq','oIbTAxnZAw5NihjLCxvPCMvKigzPzwXKici','vg9VBcbLEgvJDxrPB24GCMvQzwn0zwqGzM9Yia','CMv0DxjU','DhjHBNnMB3jTzxi','C3LZDgvT','zMLUywXFBwvZC2fNzq','B3bLBMfPx3jLyxnVBMLUz19KzwX0yq','ntuZotGYnhvctNLvsG','oIbLEhbLy3rLzcbZDhjPBMC','DMfSDwu','A2LUza','oIbLEhbLy3rLzcbUDw1Izxi','CMvHC29UAw5NtwvZC2fNzuLK','y29UDgvUDa','BgvUz3rO','DxnHz2u','oIbLEhbLy3rLzcbHCNjHEq','y2HHDe1VzgvS','C3rHz2u','C2LNBMfS','C3rHDgu','DhvYBKLK','mteYqLnnALDR','DgHPBMTPBMC','CMvZB2X2zq','ywXS','Dg9VBf9VDxrWDxrFy2H1BMS','zw5HyMXLza','C2vZC2LVBKLK','ywjVCNrLza','B3jKzxi','mtuXnJKWmZb4Dgfuvxe','CMvHC29UAw5Nu3rHCNrLzef0','Aw5WDxq','CMvQzwn0','zxjYB3i','B25fDMvUDa','B3bLBMfPx3jLyxnVBMLUz19ZDw1Tyxj5x2rLBhrH','yMvMB3jLrMLUywXpDxrWDxq','yM9VBgvHBG','y29TCgXLDgu','CMvHC29U','Dgv4Da','CMvZzxrnzxnZywDLCW','CMvNAxn0CNK','mtv4rePvs3m','BgLZDa','y29UDgv4DfDPBMrVD0XPBwL0','zw50CMLLCW','DMfSDwvZ','zgvZy3jPChrPB24'];_0x462c=function(){return _0x13cfbf;};return _0x462c();}function createSessionId(){const _0x3f877d={_0x3d4028:0x30e,_0x112911:0x239,_0x368c55:0x25b,_0x106681:0x2e8,_0x7f9d3b:0x2c9,_0x5eb929:0x2a3},_0x2a9899={_0x40c8ab:0x216},_0x4dec1b={_0x1ce297:0x149,_0x540a35:0x366};function _0xccf198(_0x1aca42,_0x3f5c61,_0x4e9423,_0x400b4f){return _0xaba6e0(_0x1aca42-_0x4dec1b._0x1ce297,_0x3f5c61,_0x1aca42- -_0x4dec1b._0x540a35,_0x400b4f-0x174);}function _0xe8ec73(_0x28a953,_0x44c644,_0x105d87,_0x5e2fb9){return _0xaba6e0(_0x28a953-0xd,_0x105d87,_0x44c644-_0x2a9899._0x40c8ab,_0x5e2fb9-0xa7);}return'session-'+Date[_0xe8ec73(0x2c3,0x2f2,_0x3f877d._0x3d4028,0x2dc)]()+'-'+Math[_0xccf198(-0x221,-_0x3f877d._0x112911,-0x23c,-_0x3f877d._0x368c55)]()['toString'](0x10)[_0xccf198(-0x296,-_0x3f877d._0x106681,-_0x3f877d._0x7f9d3b,-_0x3f877d._0x5eb929)](0x2,0xa);}function createTurnId(_0x452fc6){const _0x39b135={_0x2225f5:0x24,_0x460b9a:0x147};function _0xd98c5f(_0x18242c,_0x2a08cf,_0x42eec1,_0x2f940a){return _0x50a2ac(_0x18242c,_0x42eec1- -0x48a,_0x42eec1-_0x39b135._0x2225f5,_0x2f940a-_0x39b135._0x460b9a);}return _0xd98c5f(0xac,0x7b,0x57,0x52)+_0x452fc6;}function _0x50a2ac(_0x4a340d,_0x3b42eb,_0x4c4342,_0x163eee){const _0x20338c={_0x4c1875:0x3ca};return _0x45e0(_0x3b42eb-_0x20338c._0x4c1875,_0x4a340d);}function createDefaultMessage(_0x6393f8){if(_0x6393f8===void 0x0)return void 0x0;return normalizeUserInput(_0x6393f8);}function normalizeUserInput(_0x4f3336){const _0x68fdc3={_0x4904f3:0x38f,_0xc8d3d5:0x39e},_0x448c88={_0x143035:0x64,_0x52b5f2:0x278,_0x3af1e4:0xeb},_0xdd4547={_0x3b1ab5:0x455};function _0x39a4da(_0x5f4b89,_0x309609,_0x340f3d,_0x32dbdd){return _0x50a2ac(_0x340f3d,_0x32dbdd- -_0xdd4547._0x3b1ab5,_0x340f3d-0x1cc,_0x32dbdd-0x161);}function _0x1d9cad(_0x7ce99f,_0x1e7115,_0x24784d,_0x3926d2){return _0xaba6e0(_0x7ce99f-_0x448c88._0x143035,_0x1e7115,_0x24784d-_0x448c88._0x52b5f2,_0x3926d2-_0x448c88._0x3af1e4);}if(typeof _0x4f3336===_0x1d9cad(0x2fe,0x390,0x351,0x31a))return{'role':'user','content':[{'type':_0x1d9cad(0x3bc,0x3be,_0x68fdc3._0x4904f3,_0x68fdc3._0xc8d3d5),'text':_0x4f3336}]};return normalizeMessage(_0x4f3336);}function resolveChatModel(_0x581461){const _0x54687d={_0x59959d:0x3e8,_0x34ed4d:0x3e0,_0x197710:0x2e9},_0x25263a={_0x1774cc:0x2ea},_0x4178cc={_0x11a538:0x1cb,_0x3eafd2:0xa};if(!_0x581461[_0x356b60(0x433,_0x54687d._0x59959d,0x402,_0x54687d._0x34ed4d)])throw new Error(_0xf93dfa(0x2fa,0x2d3,0x2e9,_0x54687d._0x197710));function _0xf93dfa(_0x333df4,_0x4d6a86,_0x455060,_0x2468f7){return _0x50a2ac(_0x2468f7,_0x455060- -0x1fd,_0x455060-_0x4178cc._0x11a538,_0x2468f7-_0x4178cc._0x3eafd2);}function _0x356b60(_0x3f3cdf,_0x2fbe0b,_0x588502,_0x22dc9d){return _0xaba6e0(_0x3f3cdf-0xc6,_0x22dc9d,_0x2fbe0b-_0x25263a._0x1774cc,_0x22dc9d-0xaf);}return _0x581461['chatModel'];}function createRegistry(_0x30d7a1){const _0x211be6={_0x1be1c4:0x12f,_0x407b12:0x172,_0xc2ba1b:0x171,_0x101b3d:0x172,_0x20df0f:0x1c1},_0x104af4={_0x239c49:0x164,_0x108870:0x1f4},_0x32d053={_0x32ff2d:0x1de};if(_0x30d7a1[_0x25ba3d(0x1c9,_0x211be6._0x1be1c4,_0x211be6._0x407b12,_0x211be6._0xc2ba1b)])return _0x30d7a1[_0x25ba3d(0x12b,0x1c2,_0x211be6._0x101b3d,_0x211be6._0x20df0f)];function _0x18f3b9(_0x537407,_0x531647,_0x532590,_0x28f83c){return _0x50a2ac(_0x537407,_0x532590- -0x44a,_0x532590-0x1,_0x28f83c-_0x32d053._0x32ff2d);}const _0x167d73=createExtensionRegistry(),_0x3bb8f5=_0x30d7a1[_0x18f3b9(0x135,0x148,0x107,0x105)]??[];function _0x25ba3d(_0x52387d,_0x9803b8,_0x1be7c4,_0x10081b){return _0xaba6e0(_0x52387d-_0x104af4._0x239c49,_0x9803b8,_0x1be7c4-0x59,_0x10081b-_0x104af4._0x108870);}for(const _0x14ce03 of _0x3bb8f5){_0x167d73[_0x18f3b9(0x13e,0xcf,0xf2,0xaf)](_0x14ce03);}return _0x167d73;}var Agent=class{[_0x50a2ac(0x4c4,0x4c8,0x49a,0x50e)];[_0xaba6e0(0x12e,0x113,0x120,0x12f)];[_0x50a2ac(0x4e3,0x4c9,0x4d5,0x505)];['sessionId'];[_0x50a2ac(0x4f1,0x4cd,0x51b,0x48f)];['defaultMessage'];['turnIndex'];constructor(_0x120705={}){const _0x26e3d6={_0x1ed019:0x485,_0x2b1b75:0x457,_0x2d702e:0x43f,_0xc358a1:0x42e,_0x453f39:0x158,_0x4150a5:0x1a7,_0x346f91:0x124,_0x3c1d00:0x158,_0x1ce6e8:0x229,_0x55c885:0x1f0,_0x1cba4f:0xf8,_0x2e06fc:0xf5,_0x48ad44:0x3c6,_0x389c8a:0x3ed,_0x4c8e4d:0x40a,_0x5da2f5:0x461,_0x3d8d39:0x3e5,_0x31ee42:0x45b,_0x2250e5:0x185,_0x7b0fb9:0x15a,_0x19a15c:0x447,_0x37356f:0x3f1,_0x1e5646:0x154,_0x472e8a:0x181,_0x2b11ce:0x180,_0x301e37:0x17f,_0xd12662:0x1d0,_0x197637:0x1ab,_0x7c45b0:0x3fe,_0x38cd19:0x44c,_0x15885b:0x411,_0x1ce42b:0x3e7},_0x3e2e29={_0x44c83e:0xd9,_0x481850:0xea},_0x48c338={_0x3828a0:0x29f,_0x312939:0x5f};this[_0x1a3a6a(0x43f,_0x26e3d6._0x1ed019,0x480,_0x26e3d6._0x2b1b75)]=_0x120705[_0x1a3a6a(_0x26e3d6._0x2d702e,_0x26e3d6._0xc358a1,0x464,0x472)]??createSessionId(),this[_0x1471eb(-_0x26e3d6._0x453f39,-_0x26e3d6._0x4150a5,-_0x26e3d6._0x346f91,-_0x26e3d6._0x3c1d00)]=0x0;function _0x1471eb(_0x4b4af2,_0x25fc8b,_0x3d51d0,_0x21956e){return _0xaba6e0(_0x4b4af2-0x1bf,_0x25fc8b,_0x4b4af2- -_0x48c338._0x3828a0,_0x21956e-_0x48c338._0x312939);}function _0x1a3a6a(_0x191b0c,_0x21b867,_0x79721f,_0x50fbc0){return _0x50a2ac(_0x79721f,_0x191b0c- -_0x3e2e29._0x44c83e,_0x79721f-_0x3e2e29._0x481850,_0x50fbc0-0x1a2);}this[_0x1471eb(-0x1e6,-_0x26e3d6._0x1ce6e8,-_0x26e3d6._0x55c885,-0x217)]=_0x120705[_0x1471eb(-0x149,-0x15b,-_0x26e3d6._0x1cba4f,-_0x26e3d6._0x2e06fc)]??'',this[_0x1a3a6a(0x3f4,0x3f6,_0x26e3d6._0x48ad44,_0x26e3d6._0x389c8a)]=(_0x120705[_0x1a3a6a(0x3f4,0x3d1,0x44a,0x439)]??[])['map'](normalizeMessage),this[_0x1a3a6a(_0x26e3d6._0x4c8e4d,_0x26e3d6._0x5da2f5,_0x26e3d6._0x3d8d39,_0x26e3d6._0x31ee42)]=createDefaultMessage(_0x120705[_0x1471eb(-0x147,-0x13a,-_0x26e3d6._0x2250e5,-_0x26e3d6._0x7b0fb9)]),this[_0x1471eb(-0x1e5,-0x19e,-0x197,-0x1c7)]=createAgentMetrics({'getContextWindowLimit':_0x120705[_0x1471eb(-0x14e,-0x157,-0x12c,-0x18d)]});const _0x5d49b0=_0x120705[_0x1a3a6a(_0x26e3d6._0x19a15c,0x3f5,_0x26e3d6._0x37356f,0x464)],_0x5bb0d4=async(_0x2b5cbe,_0xee22fe)=>{this['metrics']['recordEvent'](_0x2b5cbe),await _0x5d49b0?.(_0x2b5cbe,_0xee22fe);},_0x5a75a2=createInternalToolRuntime(_0x120705[_0x1471eb(-0x1be,-0x1ea,-0x18c,-0x1e1)]??[],{'onEvent':_0x5bb0d4,'onToolCall':_0x120705[_0x1471eb(-_0x26e3d6._0x1e5646,-_0x26e3d6._0x472e8a,-_0x26e3d6._0x2b11ce,-0x145)]});this[_0x1471eb(-_0x26e3d6._0x301e37,-_0x26e3d6._0xd12662,-0x1c4,-_0x26e3d6._0x197637)]={'registry':createRegistry(_0x120705),'chatModel':resolveChatModel(_0x120705),'toolRuntime':_0x5a75a2,'askUser':_0x120705[_0x1a3a6a(_0x26e3d6._0x7c45b0,0x42b,_0x26e3d6._0x38cd19,_0x26e3d6._0x15885b)],'setTopic':_0x120705[_0x1a3a6a(0x3f6,0x3bd,0x3d9,_0x26e3d6._0x1ce42b)],'onEvent':_0x5bb0d4,'sessionDir':_0x120705['sessionDir'],'outputFormat':_0x120705['outputFormat']};}get[_0xaba6e0(0x10f,0x136,0x156,0x177)](){const _0x54c1b0={_0x156e6:0x67,_0x5a69b2:0x11},_0x4f4940={_0x268c94:0x7a,_0x59a20a:0x162};function _0x1ed6e0(_0x276ff5,_0x250e76,_0x3ff858,_0x1ba431){return _0xaba6e0(_0x276ff5-_0x4f4940._0x268c94,_0x250e76,_0x3ff858- -0xa8,_0x1ba431-_0x4f4940._0x59a20a);}return this[_0x1ed6e0(0x66,_0x54c1b0._0x156e6,_0x54c1b0._0x5a69b2,-0x23)];}[_0xaba6e0(0x12c,0x108,0x144,0x192)](_0xe67ba2=[]){const _0x16e017={_0xad2979:0x4bc,_0x80090e:0x4fc,_0x9b0311:0x2ff,_0xc57e79:0x2fd,_0x41f9aa:0x2bc,_0x2b7890:0x28c,_0x3e4122:0x268},_0x2fd048={_0x9f273f:0x6c,_0x45a9fa:0x39c,_0x341ed2:0x76};function _0x5593ee(_0x420d59,_0x48f3dd,_0x230a57,_0x10f395){return _0xaba6e0(_0x420d59-_0x2fd048._0x9f273f,_0x10f395,_0x420d59-_0x2fd048._0x45a9fa,_0x10f395-_0x2fd048._0x341ed2);}function _0x371aba(_0x410a76,_0x1681ee,_0x2261ac,_0x3f871a){return _0x50a2ac(_0x1681ee,_0x3f871a- -0x2bb,_0x2261ac-0x22,_0x3f871a-0xee);}this[_0x5593ee(_0x16e017._0xad2979,0x4a7,0x481,_0x16e017._0x80090e)][_0x371aba(0x2aa,_0x16e017._0x9b0311,_0x16e017._0xc57e79,0x2ae)][_0x371aba(_0x16e017._0x41f9aa,_0x16e017._0x2b7890,_0x16e017._0x3e4122,0x298)](_0xe67ba2);}['getTools'](){const _0x2a63c5={_0x143d1a:0x24,_0x13f3f0:0x7b,_0x5efb9a:0x1d1,_0x13d24e:0x19b},_0x5be8d2={_0x1bb7e1:0x72,_0x4e3e08:0x99,_0x26fe44:0xa1},_0xc491a1={_0x2f6974:0x17e,_0x4d2d18:0x14d};function _0x238181(_0x3ed8b8,_0xb0a85c,_0x4b7d0d,_0x171200){return _0xaba6e0(_0x3ed8b8-0x194,_0x3ed8b8,_0xb0a85c- -_0xc491a1._0x2f6974,_0x171200-_0xc491a1._0x4d2d18);}function _0x1fa805(_0x513306,_0x425e8d,_0x1f4320,_0x10d0fb){return _0xaba6e0(_0x513306-_0x5be8d2._0x1bb7e1,_0x513306,_0x10d0fb-_0x5be8d2._0x4e3e08,_0x10d0fb-_0x5be8d2._0x26fe44);}return this['deps'][_0x238181(-0x22,-_0x2a63c5._0x143d1a,-0x14,-_0x2a63c5._0x13f3f0)][_0x1fa805(_0x2a63c5._0x5efb9a,_0x2a63c5._0x13d24e,0x22a,0x1d9)]();}['setSystemPrompt'](_0x51674a,_0x248bba={}){const _0x4dd5fe={_0x3156bb:0x1a5,_0x3bf64a:0x247},_0x1eae18={_0x400698:0x71e,_0x1a8f8e:0x188};function _0x215f51(_0x233845,_0xfcb91b,_0x26c7cd,_0x27f0d7){return _0x50a2ac(_0x27f0d7,_0x233845- -0x61a,_0x26c7cd-0x1a9,_0x27f0d7-0x5e);}this['_systemPrompt']=_0x51674a;function _0x37cc4e(_0x162759,_0x1ec0ac,_0x540a91,_0xa36cc8){return _0x50a2ac(_0x1ec0ac,_0xa36cc8- -_0x1eae18._0x400698,_0x540a91-0x142,_0xa36cc8-_0x1eae18._0x1a8f8e);}_0x248bba[_0x37cc4e(-_0x4dd5fe._0x3156bb,-0x1b6,-0x1c1,-0x1f7)]===!![]&&(this[_0x37cc4e(-0x22e,-_0x4dd5fe._0x3bf64a,-0x282,-0x251)]=[],this['turnIndex']=0x0);}[_0x50a2ac(0x57c,0x54e,0x556,0x561)](_0x3243e3){this['sessionId']=_0x3243e3;}[_0x50a2ac(0x589,0x56c,0x520,0x541)](_0x27b796){const _0x1c6fe1={_0x2822da:0x4e1,_0x4c56a4:0x543},_0x545550={_0x56ecb3:0xc7};function _0x3bfd2a(_0x2ca760,_0x577c6f,_0x25bc24,_0x5759a6){return _0x50a2ac(_0x577c6f,_0x2ca760- -0x19,_0x25bc24-_0x545550._0x56ecb3,_0x5759a6-0x2a);}this[_0x3bfd2a(0x516,_0x1c6fe1._0x2822da,0x4c8,_0x1c6fe1._0x4c56a4)]['chatModel']=_0x27b796;}async[_0x50a2ac(0x4d2,0x4d3,0x522,0x514)](_0x281dd8=this[_0xaba6e0(0x124,0xba,0xd4,0xc7)],_0x507a1c={}){const _0x55a08d={_0x17b76f:0x1df,_0xd3012d:0x241,_0x3eba5d:0x378,_0x25094b:0x374,_0x11a001:0x30d,_0x27ab71:0x20e,_0x5bedb8:0x255,_0x3e7223:0x1e7,_0x564498:0x1bd,_0x4cad50:0x176,_0x440b18:0x344,_0x2f08dd:0x371,_0x43d4aa:0x1b9,_0x84208d:0x176,_0x2be6be:0x19a,_0x3c7859:0x181,_0x15f460:0x363,_0x24e679:0x35f,_0x21746d:0x15b,_0x1b925b:0x14a,_0x101c37:0x185},_0x5c7bb9={_0x10c28f:0xcc},_0x377818={_0x11c53f:0x44,_0x5572a8:0x6f};if(!_0x281dd8)throw new Error('Agent.send\x20requires\x20a\x20message\x20when\x20no\x20default\x20message\x20is\x20configured');function _0x53cabe(_0x33be1b,_0x5947bf,_0x3b50b0,_0x1bffac){return _0x50a2ac(_0x5947bf,_0x1bffac- -0x1be,_0x3b50b0-_0x377818._0x11c53f,_0x1bffac-_0x377818._0x5572a8);}this[_0x27a452(0x1d1,0x1ff,_0x55a08d._0x17b76f,_0x55a08d._0xd3012d)]+=0x1;function _0x27a452(_0x3c892b,_0x32cdea,_0x3cb137,_0x255b8a){return _0xaba6e0(_0x3c892b-0x17b,_0x3c892b,_0x32cdea-0xb8,_0x255b8a-_0x5c7bb9._0x10c28f);}try{const _0x405a83=await runTurn({'sessionId':this[_0x53cabe(_0x55a08d._0x3eba5d,0x322,0x380,0x35a)],'turnId':createTurnId(this['turnIndex']),'streaming':_0x507a1c[_0x53cabe(_0x55a08d._0x25094b,0x2db,_0x55a08d._0x11a001,0x331)],'signal':_0x507a1c['signal'],'system':this[_0x27a452(0x1e0,_0x55a08d._0x27ab71,_0x55a08d._0x5bedb8,_0x55a08d._0x3e7223)],'messages':this[_0x27a452(_0x55a08d._0x564498,_0x55a08d._0x4cad50,0x152,0x15a)],'message':normalizeUserInput(_0x281dd8)},this[_0x53cabe(0x33f,0x38d,_0x55a08d._0x440b18,_0x55a08d._0x2f08dd)]);return this['messages']=_0x405a83['state'][_0x27a452(_0x55a08d._0x43d4aa,_0x55a08d._0x84208d,_0x55a08d._0x2be6be,0x16d)]['map'](normalizeMessage),_0x405a83;}catch(_0x27dfab){if(_0x27dfab instanceof TurnFailedError){this[_0x27a452(0x1c7,0x176,0x17a,0x171)]=synthesizeMissingToolResults(_0x27dfab[_0x27a452(_0x55a08d._0x3c7859,_0x55a08d._0x43d4aa,0x176,0x200)][_0x53cabe(0x32f,_0x55a08d._0x15f460,0x314,0x30f)][_0x53cabe(_0x55a08d._0x24e679,0x348,0x362,0x375)](normalizeMessage));throw _0x27dfab[_0x27a452(_0x55a08d._0x21746d,0x173,_0x55a08d._0x1b925b,_0x55a08d._0x101c37)];}throw _0x27dfab;}}};export{normalizeToolOutputValue,createToolOutput,ToolExecutionError,defineTool,ToolRegistry,validateToolInput,deriveFinalToolOutput,createInternalToolRuntime,createExtensionRegistry,createAgentMetrics,runTurn,Agent};
|
package/dist/chunk-YWQXXHHU.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
function _0x21e26b(_0x152f20,_0x14423f,_0x3819c1,_0x414c1f){return _0x41a9(_0x152f20- -0x1d5,_0x14423f);}function _0xd345(){const _0x5658db=['B3v0Chv0x3rVA2vUCW','CM9Szq','C3rYAw5N','CMvHC29UAw5Nvg9Rzw5Z','mtq1odm2De10we5Q','mte3mJC4nuDnuwTlsa','ChvZAa','DxnHz2u','BwvZC2fNzxm','Dg9VBf91C2vFAwq','ChjVDMLKzxjtDgf0zq','B3bLBMfPx3jLyxnVBMLUzW','mtCWne5UDxnRva','C3vTBwfYEq','DhjPBq','ody1mJC0D0n4vfbp','zMXHDe1HCa','B3v0Chv0','vg9VBcbLEgvJDxrPB24GD2fZigLUDgvYCNvWDgvKigjLzM9YzsbJB21WBgv0Aw9UigfUzcbWCM9KDwnLzcbUBYbYzxn1BhqU','otmWm1H0uu5ysa','DhvYBL9Pza','BgvUz3rO','Bwf4vg9Rzw5Z','zxjYB3i','C3rHDhvZ','DhLWzq','ndG4u2Tmuwni','mZjfCNL1rMm','C2vZC2LVBKLK','mtuYnJe0swrwrgPi','mZiXmJaWvLP5BLPQ','ywrK','DgHPBMTPBMC','mZb1uxfZDwS','Dg9VBhm','B3v0Chv0rM9YBwf0','BwfW','AxnbCNjHEq','zw5JCNLWDgvKq29UDgvUDa','Bwf4x3rVA2vUCW','Bw9KzwW','nJCZmZfYv3LXzhG','khjLzgfJDgvKihjLyxnVBMLUzYK','Bwv0ywrHDge','Dgv4Da','C3LZDgvT','yxnZAxn0yw50','DhvYBKLK','zMLSDgvY','yw50AhjVCgLJx3rOAw5RAw5N','kgvUy3j5ChrLzcbYzwfZB25PBMCP','C2vZC2LVBL9Pza','CMvHC29UAw5Nx3rVA2vUCW','y2XHDwrLlxnVBM5LDc00ltiWmJuWnte0','DxnLCG','AM9PBG','y29UDgvUDa','Dg9VBf91C2u','CMvHC29UAw5N','ntKWsNLxqKn5','y2fSBeLK'];_0xd345=function(){return _0x5658db;};return _0xd345();}(function(_0x3e43e7,_0x7ac3a3){const _0x40103d={_0x100d42:0x1d7,_0x5a3ea1:0x350,_0x4c0d19:0x351,_0x473567:0x327,_0x97973:0x339,_0x50eea1:0x340,_0x4abdaf:0x2fd,_0x2733f3:0x316,_0xe56971:0x1d7,_0xdda99e:0x30a,_0x3520b4:0x30c,_0x43eb1a:0x225,_0x302efe:0x218,_0x5bd952:0x205,_0x362aef:0x1ff,_0x2a51a3:0x225,_0x4777fa:0x215,_0x420abc:0x20b,_0x5b38c6:0x1ef,_0x3c27e1:0x204,_0x1f8345:0x1e7,_0x4715a4:0x1f5,_0x425bac:0x1ed,_0x3842c0:0x1f2,_0x5debd8:0x1ea,_0x138868:0x1d3},_0x3be734={_0xcd365d:0x33d};function _0x25265f(_0x3b5a0c,_0x39efec,_0x214fe3,_0x282218){return _0x41a9(_0x39efec-0x1dc,_0x214fe3);}function _0x2f4ba1(_0x5d977f,_0xf91e94,_0x57cadc,_0x3c487d){return _0x41a9(_0x3c487d- -_0x3be734._0xcd365d,_0x57cadc);}const _0x419a30=_0x3e43e7();while(!![]){try{const _0x4292b5=-parseInt(_0x2f4ba1(-0x1d9,-0x1d7,-_0x40103d._0x100d42,-0x1e4))/0x1+-parseInt(_0x25265f(0x350,0x340,_0x40103d._0x5a3ea1,_0x40103d._0x4c0d19))/0x2*(-parseInt(_0x25265f(_0x40103d._0x473567,_0x40103d._0x97973,_0x40103d._0x50eea1,0x32e))/0x3)+-parseInt(_0x25265f(_0x40103d._0x4abdaf,0x307,_0x40103d._0x2733f3,0x30e))/0x4+parseInt(_0x2f4ba1(-_0x40103d._0xe56971,-0x1f6,-0x1f9,-0x1ee))/0x5*(parseInt(_0x25265f(0x31b,_0x40103d._0xdda99e,0x306,_0x40103d._0x3520b4))/0x6)+-parseInt(_0x2f4ba1(-_0x40103d._0x43eb1a,-_0x40103d._0x302efe,-0x21e,-0x213))/0x7*(-parseInt(_0x2f4ba1(-_0x40103d._0x5bd952,-_0x40103d._0x362aef,-_0x40103d._0x2a51a3,-_0x40103d._0x4777fa))/0x8)+-parseInt(_0x2f4ba1(-0x1f7,-_0x40103d._0x420abc,-0x20d,-_0x40103d._0x5b38c6))/0x9*(parseInt(_0x2f4ba1(-_0x40103d._0x3c27e1,-0x1f2,-_0x40103d._0x1f8345,-_0x40103d._0x4715a4))/0xa)+parseInt(_0x2f4ba1(-_0x40103d._0x425bac,-_0x40103d._0x3842c0,-0x1ef,-0x207))/0xb*(parseInt(_0x2f4ba1(-_0x40103d._0x5debd8,-_0x40103d._0x138868,-0x1f5,-0x1e7))/0xc);if(_0x4292b5===_0x7ac3a3)break;else _0x419a30['push'](_0x419a30['shift']());}catch(_0x117aed){_0x419a30['push'](_0x419a30['shift']());}}}(_0xd345,0xf0491));function createTextBlock(_0x7665d7){const _0xb8d73c={_0x3cb3c5:0x18f,_0x1e3801:0x17e};function _0x857138(_0xed5b8f,_0x2254a2,_0x46c06d,_0x3b5810){return _0x41a9(_0x3b5810- -0x2c5,_0xed5b8f);}return{'type':_0x857138(-_0xb8d73c._0x3cb3c5,-0x19c,-_0xb8d73c._0x1e3801,-0x18c),'text':_0x7665d7};}function _0x41a9(_0x12db1b,_0x4308e9){_0x12db1b=_0x12db1b-0x128;const _0xd3456f=_0xd345();let _0x41a979=_0xd3456f[_0x12db1b];if(_0x41a9['vCGwVq']===undefined){var _0x551547=function(_0x8b0cb0){const _0x30afed='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x7665d7='',_0x12b849='';for(let _0x5251c4=0x0,_0x2a8ebe,_0x47eda1,_0x214952=0x0;_0x47eda1=_0x8b0cb0['charAt'](_0x214952++);~_0x47eda1&&(_0x2a8ebe=_0x5251c4%0x4?_0x2a8ebe*0x40+_0x47eda1:_0x47eda1,_0x5251c4++%0x4)?_0x7665d7+=String['fromCharCode'](0xff&_0x2a8ebe>>(-0x2*_0x5251c4&0x6)):0x0){_0x47eda1=_0x30afed['indexOf'](_0x47eda1);}for(let _0x929e8e=0x0,_0x1e5c28=_0x7665d7['length'];_0x929e8e<_0x1e5c28;_0x929e8e++){_0x12b849+='%'+('00'+_0x7665d7['charCodeAt'](_0x929e8e)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x12b849);};_0x41a9['HjNmFT']=_0x551547,_0x41a9['fFxMIR']={},_0x41a9['vCGwVq']=!![];}const _0x22fcdf=_0xd3456f[0x0],_0x5a8173=_0x12db1b+_0x22fcdf,_0x25b7f7=_0x41a9['fFxMIR'][_0x5a8173];return!_0x25b7f7?(_0x41a979=_0x41a9['HjNmFT'](_0x41a979),_0x41a9['fFxMIR'][_0x5a8173]=_0x41a979):_0x41a979=_0x25b7f7,_0x41a979;}function normalizeTextBlock(_0x12b849){const _0x1d8ad1={_0x228e3a:0x9b,_0x59eceb:0x87},_0x3f96f5={_0x48d5a:0x9f};function _0x187dd2(_0x48770a,_0x24ca0e,_0xe26ee9,_0x347524){return _0x41a9(_0x347524- -_0x3f96f5._0x48d5a,_0xe26ee9);}return createTextBlock(_0x12b849[_0x187dd2(0x83,_0x1d8ad1._0x228e3a,_0x1d8ad1._0x59eceb,0x9a)]??'');}function normalizeContent(_0x5251c4){const _0x198035={_0x1efb39:0x28a,_0xfee0e3:0x26f,_0x572251:0x48d,_0x36bb65:0x473,_0x35d6d5:0x47b},_0xea208f={_0x21785e:0x3d6};if(typeof _0x5251c4===_0xb295a8(-_0x198035._0x1efb39,-0x279,-0x2a7,-_0x198035._0xfee0e3))return[createTextBlock(_0x5251c4)];if(!Array[_0x5bfd9d(_0x198035._0x572251,_0x198035._0x36bb65,0x474,_0x198035._0x35d6d5)](_0x5251c4))return[];function _0xb295a8(_0x44a6dd,_0x4bf9e2,_0x9a8152,_0x3ca5ef){return _0x41a9(_0x44a6dd- -_0xea208f._0x21785e,_0x9a8152);}function _0x5bfd9d(_0x253459,_0x17092d,_0x5eb14b,_0x7da203){return _0x41a9(_0x5eb14b-0x342,_0x17092d);}return _0x5251c4['map'](_0x2a8ebe=>{if(_0x2a8ebe[_0x1ba81f(0x44,0x50,0x56,0x59)]==='text')return normalizeTextBlock(_0x2a8ebe);function _0x1ba81f(_0x1f5b85,_0x43d934,_0x1302c7,_0x1cea73){return _0xb295a8(_0x1302c7-0x2c9,_0x43d934-0x5,_0x1cea73,_0x1cea73-0x14f);}return structuredClone(_0x2a8ebe);});}function normalizeSystem(_0x47eda1=[]){return normalizeContent(_0x47eda1)['filter'](_0x214952=>_0x214952['type']==='text');}function normalizeMessage(_0x929e8e){const _0x58e133={_0x5736e2:0x202,_0x3385f4:0x20c,_0x30ac92:0x111,_0x3945e7:0x12f,_0x29040d:0x149,_0x23c6ca:0x130,_0x12520f:0x129,_0x6d3ed8:0x10d,_0x30f6c2:0x143,_0x3d8ca9:0x219,_0x2e34e0:0x1fd,_0x15973e:0x21a,_0x4b8e43:0x229,_0x25410f:0x21a},_0x1e33f0={_0xbab960:0xc6};function _0x5a3149(_0x53c290,_0x17b567,_0x1215b1,_0xf21d81){return _0x41a9(_0x17b567- -0x1c,_0x53c290);}function _0x22c831(_0x5902c4,_0x465899,_0x33675a,_0x266a47){return _0x41a9(_0x266a47-_0x1e33f0._0xbab960,_0x33675a);}return{...typeof _0x929e8e['id']===_0x22c831(_0x58e133._0x5736e2,_0x58e133._0x3385f4,0x229,0x212)?{'id':_0x929e8e['id']}:{},'role':_0x929e8e[_0x5a3149(_0x58e133._0x30ac92,_0x58e133._0x3945e7,_0x58e133._0x29040d,0x143)],'content':normalizeContent(_0x929e8e[_0x5a3149(_0x58e133._0x23c6ca,_0x58e133._0x12520f,_0x58e133._0x6d3ed8,_0x58e133._0x30f6c2)]),..._0x929e8e[_0x22c831(_0x58e133._0x3d8ca9,_0x58e133._0x2e34e0,0x22e,_0x58e133._0x15973e)]?{'providerState':structuredClone(_0x929e8e[_0x22c831(_0x58e133._0x4b8e43,0x20b,0x20c,_0x58e133._0x25410f)])}:{}};}function compileRequest(_0x1e5c28){const _0x181ccf={_0x4e0506:0x1a,_0x895083:0x4,_0x57c63c:0x3e,_0x250778:0x13,_0x55b012:0x11b,_0x5c1da1:0x123,_0x201166:0x11b,_0x362552:0x2c,_0x4c15d2:0x19,_0x4a298b:0x2d,_0x125bea:0x11d,_0x4d7149:0x138,_0x33e657:0x128,_0x231fe7:0x124,_0x189543:0x21,_0x279660:0x7},_0x1d28a2={_0x448f9b:0x24f};function _0x3c588c(_0x8233bf,_0x50bb12,_0x2df68d,_0x4a7e21){return _0x41a9(_0x50bb12- -_0x1d28a2._0x448f9b,_0x4a7e21);}function _0x251fff(_0x1886d2,_0x319ff0,_0x4b2fa5,_0x2e963d){return _0x41a9(_0x1886d2- -0x11b,_0x2e963d);}return{'model':_0x1e5c28[_0x251fff(_0x181ccf._0x4e0506,0x22,0x39,_0x181ccf._0x895083)]??_0x251fff(0x27,0x33,_0x181ccf._0x57c63c,_0x181ccf._0x250778),..._0x1e5c28[_0x3c588c(-0x130,-_0x181ccf._0x55b012,-_0x181ccf._0x5c1da1,-0x102)]!==void 0x0?{'max_tokens':_0x1e5c28[_0x3c588c(-0x11d,-_0x181ccf._0x201166,-0x128,-0x11f)]}:{},..._0x1e5c28[_0x251fff(_0x181ccf._0x362552,0x38,_0x181ccf._0x4c15d2,0x27)]?{'reasoning':structuredClone(_0x1e5c28['reasoning'])}:{},'system':normalizeSystem(_0x1e5c28['system']),'messages':_0x1e5c28['messages'][_0x251fff(0x16,0xf,_0x181ccf._0x4a298b,0x23)](normalizeMessage),'tools':structuredClone(_0x1e5c28[_0x3c588c(-_0x181ccf._0x125bea,-0x120,-_0x181ccf._0x4d7149,-0x120)]??[]),'metadata':{'session_id':_0x1e5c28[_0x3c588c(-_0x181ccf._0x33e657,-0x126,-_0x181ccf._0x231fe7,-0x10f)],'turn_id':_0x1e5c28[_0x251fff(_0x181ccf._0x189543,0x29,0x24,_0x181ccf._0x279660)]}};}function toChatRequest(_0x554228){const _0x2baaa={_0x2d3ed3:0x2ea,_0x4fdbec:0x2d5,_0x378f26:0x2fc,_0x3afcf9:0x311,_0x2f0c76:0x2ed,_0x4ff2a3:0x31a,_0x19d50b:0x2e1,_0x1453f9:0x2f0,_0xa17aa7:0x23a,_0x962691:0x236,_0x51d41e:0x22b,_0x30c95a:0x239,_0x19fd12:0x24b,_0x4e77ea:0x2ed,_0xd45cf4:0x2d6,_0x3e05fe:0x313,_0x3f1ba2:0x331,_0x546f89:0x2e6},_0x14f362={_0x5a10f7:0x10b},_0x25a897={_0x5018bc:0x1b5};function _0x2c94ce(_0x404953,_0x54ae3e,_0x482ad2,_0x18138d){return _0x41a9(_0x404953-_0x25a897._0x5018bc,_0x54ae3e);}function _0x2a58f1(_0x3af117,_0x60dcc9,_0x4ada9b,_0x610393){return _0x41a9(_0x60dcc9-_0x14f362._0x5a10f7,_0x4ada9b);}return{'model':_0x554228[_0x2c94ce(_0x2baaa._0x2d3ed3,_0x2baaa._0x4fdbec,0x2cc,0x2cc)],..._0x554228['max_tokens']!==void 0x0?{'maxTokens':_0x554228['max_tokens']}:{},..._0x554228[_0x2c94ce(_0x2baaa._0x378f26,_0x2baaa._0x3afcf9,_0x2baaa._0x2f0c76,_0x2baaa._0x4ff2a3)]?{'reasoning':structuredClone(_0x554228['reasoning'])}:{},'system':structuredClone(_0x554228[_0x2c94ce(0x2ef,_0x2baaa._0x19d50b,_0x2baaa._0x1453f9,0x2ed)]),'messages':structuredClone(_0x554228['messages']),'tools':structuredClone(_0x554228[_0x2a58f1(0x258,_0x2baaa._0xa17aa7,_0x2baaa._0x962691,_0x2baaa._0x51d41e)]),'metadata':{'sessionId':_0x554228['metadata'][_0x2a58f1(_0x2baaa._0x30c95a,_0x2baaa._0x19fd12,0x22d,0x24a)],'turnId':_0x554228[_0x2c94ce(_0x2baaa._0x4e77ea,_0x2baaa._0xd45cf4,0x2ec,0x30c)][_0x2c94ce(_0x2baaa._0x3e05fe,0x2fa,_0x2baaa._0x3f1ba2,0x32b)]},..._0x554228['outputFormat']?{'outputFormat':structuredClone(_0x554228[_0x2c94ce(0x2e5,0x2ca,_0x2baaa._0x546f89,0x2e2)])}:{}};}function toModelRequest(_0x3ba16a){const _0x17e4a7={_0x5aaefc:0x234,_0x269e0e:0x207,_0xbee841:0x1ea,_0x3a7f28:0x212,_0x2809be:0x202,_0x152fd6:0x1f8,_0x1537a6:0x1f4,_0x37ff98:0x1ef,_0x3e219a:0x1d6,_0x3fd981:0x1fc,_0x5b2366:0x1de,_0x549b56:0x1f8,_0x520b19:0x1f7,_0x1d03e9:0x218,_0x36f1b3:0x1ee,_0xb02e89:0x1ec,_0x1a54ad:0x1f1};function _0x3a5f11(_0x1e26ab,_0x2c9a99,_0x398b90,_0xfe9e7){return _0x41a9(_0x398b90-0xc0,_0xfe9e7);}function _0x294908(_0x5d06c6,_0x45d907,_0x14ed4a,_0x4a3346){return _0x41a9(_0x45d907-0xb7,_0x4a3346);}return{'model':_0x3ba16a['model'],..._0x3ba16a['maxTokens']!==void 0x0?{'max_tokens':_0x3ba16a[_0x294908(_0x17e4a7._0x5aaefc,0x217,0x223,0x20a)]}:{},..._0x3ba16a[_0x3a5f11(0x1f4,0x21d,_0x17e4a7._0x269e0e,_0x17e4a7._0xbee841)]?{'reasoning':structuredClone(_0x3ba16a[_0x3a5f11(0x222,0x21a,0x207,_0x17e4a7._0x3a7f28)])}:{},'system':structuredClone(_0x3ba16a[_0x3a5f11(0x1f1,0x1eb,0x1fa,_0x17e4a7._0x2809be)]),'messages':structuredClone(_0x3ba16a[_0x294908(_0x17e4a7._0x152fd6,0x209,_0x17e4a7._0x1537a6,_0x17e4a7._0x37ff98)]),'tools':structuredClone(_0x3ba16a[_0x3a5f11(0x1d8,_0x17e4a7._0x3e219a,_0x17e4a7._0x37ff98,_0x17e4a7._0x3fd981)]),'metadata':{'session_id':_0x3ba16a[_0x3a5f11(_0x17e4a7._0x5b2366,0x1fe,0x1f8,0x1e6)]['sessionId'],'turn_id':_0x3ba16a[_0x3a5f11(0x1f2,0x202,_0x17e4a7._0x549b56,_0x17e4a7._0x520b19)][_0x3a5f11(_0x17e4a7._0x1d03e9,_0x17e4a7._0x36f1b3,0x1fc,_0x17e4a7._0xb02e89)]},..._0x3ba16a[_0x3a5f11(_0x17e4a7._0x1a54ad,0x1d3,0x1f0,0x202)]?{'outputFormat':structuredClone(_0x3ba16a['outputFormat'])}:{}};}function toProviderModelRequest(_0x1ea401){const _0x5952d2={_0x2728bc:0x203,_0x48014b:0xc4,_0x8fdee5:0xba,_0x219057:0xd4,_0x3acf95:0xbd,_0x691065:0xfb,_0x55ecab:0xef},_0x4d37ee={_0xb7e6e:0x37a},_0x40c32e={_0x2df3be:0x226};function _0x57c858(_0x19c8cf,_0x30b9e5,_0x179482,_0x1fa9cf){return _0x41a9(_0x179482- -_0x40c32e._0x2df3be,_0x19c8cf);}function _0x11ff46(_0x1380eb,_0x21f84e,_0x264450,_0x5df551){return _0x41a9(_0x5df551- -_0x4d37ee._0xb7e6e,_0x264450);}return{'model':_0x1ea401['model'],..._0x1ea401['maxTokens']!==void 0x0?{'max_tokens':_0x1ea401[_0x11ff46(-0x224,-0x221,-_0x5952d2._0x2728bc,-0x21a)]}:{},'system':structuredClone(_0x1ea401['system']),'messages':structuredClone(_0x1ea401[_0x57c858(-_0x5952d2._0x48014b,-_0x5952d2._0x8fdee5,-_0x5952d2._0x219057,-_0x5952d2._0x3acf95)]),'tools':structuredClone(_0x1ea401[_0x57c858(-_0x5952d2._0x691065,-0xe9,-0xf7,-_0x5952d2._0x55ecab)])};}function toChatResponse(_0x2d160e){const _0xa7427c={_0x3890af:0x4f4,_0x40f308:0x4f6,_0x1d27c4:0x4f9,_0x5ae82d:0x4f2,_0x39b9f2:0x504,_0x476284:0x517,_0x3611ca:0x4eb,_0x1fe1a2:0x500,_0x2e9ad7:0x4e3,_0x1065bc:0x51e,_0x657688:0x503,_0x48f75f:0x4f9,_0x2fa019:0x4e6};function _0x24948d(_0x2af9af,_0x338fde,_0x5af275,_0x4353f7){return _0x41a9(_0x4353f7- -0xdc,_0x2af9af);}function _0x1ee138(_0x486f4f,_0x16ceff,_0x28219b,_0x11ed73){return _0x41a9(_0x486f4f-0x3af,_0x16ceff);}return{'id':_0x2d160e['id'],'content':structuredClone(_0x2d160e[_0x1ee138(_0xa7427c._0x3890af,0x4f9,_0xa7427c._0x40f308,0x4f4)]),'stopReason':_0x2d160e['stop_reason'],'usage':{'inputTokens':_0x2d160e['usage']['input_tokens'],'outputTokens':_0x2d160e['usage'][_0x1ee138(_0xa7427c._0x1d27c4,0x506,_0xa7427c._0x5ae82d,_0xa7427c._0x39b9f2)],..._0x2d160e[_0x1ee138(0x500,0x51c,_0xa7427c._0x476284,_0xa7427c._0x3611ca)]['reasoning_tokens']!==void 0x0?{'reasoningTokens':_0x2d160e[_0x1ee138(_0xa7427c._0x1fe1a2,_0xa7427c._0x2e9ad7,0x51d,_0xa7427c._0x1065bc)][_0x1ee138(0x4f0,0x501,0x4fd,0x4fa)]}:{}},..._0x2d160e['providerState']?{'providerState':structuredClone(_0x2d160e[_0x1ee138(_0xa7427c._0x657688,_0xa7427c._0x48f75f,_0xa7427c._0x2fa019,0x4ee)])}:{}};}function toModelResponse(_0x5b8043){const _0x143636={_0x5e2899:0x133,_0x33979d:0x120,_0x172090:0x135,_0xb2cf3d:0x146,_0x29c44c:0x133,_0x127d6f:0x12e,_0x21ba49:0x12f,_0x560324:0x11f,_0x2a8981:0x129,_0x43da0c:0x3cb,_0x388210:0x3b2,_0x4eb61c:0x3cd,_0x2e2d6b:0x3c3,_0x52f3a6:0x3c7,_0x1a0031:0xff};function _0x43e26b(_0x270dc,_0x2172dc,_0x426bc0,_0xd4907){return _0x41a9(_0x270dc-0x27a,_0x426bc0);}function _0x2b36f0(_0x493b99,_0x56c8e5,_0x5c310e,_0x4bf098){return _0x41a9(_0x5c310e- -0x270,_0x493b99);}return{'id':_0x5b8043['id'],'type':'message','role':_0x2b36f0(-_0x143636._0x5e2899,-_0x143636._0x33979d,-_0x143636._0x172090,-_0x143636._0xb2cf3d),'content':structuredClone(_0x5b8043['content']),'stop_reason':_0x5b8043['stopReason'],'stop_sequence':null,'usage':{'input_tokens':_0x5b8043[_0x2b36f0(-0x105,-0x117,-0x11f,-_0x143636._0x29c44c)]['inputTokens'],'output_tokens':_0x5b8043[_0x2b36f0(-_0x143636._0x127d6f,-_0x143636._0x21ba49,-_0x143636._0x560324,-_0x143636._0x2a8981)]['outputTokens'],..._0x5b8043[_0x43e26b(_0x143636._0x43da0c,0x3df,0x3c2,0x3b4)][_0x43e26b(0x3c7,0x3ad,0x3b2,_0x143636._0x388210)]!==void 0x0?{'reasoning_tokens':_0x5b8043[_0x43e26b(0x3cb,0x3c6,_0x143636._0x4eb61c,_0x143636._0x2e2d6b)][_0x43e26b(_0x143636._0x52f3a6,0x3da,0x3dc,0x3bc)]}:{}},..._0x5b8043[_0x2b36f0(-_0x143636._0x1a0031,-0x130,-0x11c,-0x138)]?{'providerState':structuredClone(_0x5b8043['providerState'])}:{}};}function responseToAssistantMessage(_0x3405fe){const _0x137dad={_0x227474:0x12f,_0x4605fb:0x137,_0x35c826:0x13e,_0x49e7b8:0x148},_0x15717b={_0x3c758b:0x36d},_0x239108={_0x57f29b:0x1c};function _0x582205(_0x4a4b91,_0x1149a1,_0x3afac5,_0x57c10e){return _0x41a9(_0x1149a1- -_0x239108._0x57f29b,_0x3afac5);}function _0x22e185(_0x43c78b,_0x243638,_0x121452,_0x4241b9){return _0x41a9(_0x43c78b- -_0x15717b._0x3c758b,_0x243638);}return{'role':_0x582205(_0x137dad._0x227474,0x11f,_0x137dad._0x4605fb,0x11e),'content':normalizeContent(_0x3405fe['content']),..._0x3405fe[_0x582205(0x13c,0x138,_0x137dad._0x35c826,0x122)]?{'providerState':structuredClone(_0x3405fe[_0x582205(_0x137dad._0x49e7b8,0x138,0x11a,0x11b)])}:{}};}function createReasoningMessage(_0xff614b){const _0x5dc435={_0xda9a4c:0x221,_0x4fe82e:0x204},_0x62d0a2={_0x1cc3b9:0xe6},_0x388738={_0x202491:0x292},_0x35a031={_0x459b6a:0x241,_0x1c6ba0:0x216,_0x493756:0x234,_0x21cfdc:0x22d,_0x276bde:0x333,_0x158d9c:0x332,_0x32d249:0x229,_0x347d97:0x209,_0x48d575:0x23e},_0x43124a=normalizeContent(_0xff614b?.['content'])[_0x18850f(0x215,0x223,0x214,0x218)](_0x3a7cb6=>{const _0x1f6096={_0x561e2f:0xea,_0x1fe27e:0x1ab};function _0x59c0e1(_0x50f658,_0x5a2572,_0x19e7a4,_0x2e114c){return _0x18850f(_0x50f658-0x6d,_0x2e114c- -0x1c,_0x5a2572,_0x2e114c-0x43);}function _0x57cbad(_0x153325,_0x3dfa98,_0x2676b9,_0x4e8165){return _0x18850f(_0x153325-0xeb,_0x153325-_0x1f6096._0x561e2f,_0x2676b9,_0x4e8165-_0x1f6096._0x1fe27e);}return _0x3a7cb6['type']==='anthropic_redacted_thinking'||_0x3a7cb6[_0x59c0e1(_0x35a031._0x459b6a,_0x35a031._0x1c6ba0,_0x35a031._0x493756,_0x35a031._0x21cfdc)]==='anthropic_thinking'||_0x3a7cb6[_0x57cbad(_0x35a031._0x276bde,0x317,_0x35a031._0x158d9c,0x352)]===_0x59c0e1(_0x35a031._0x32d249,_0x35a031._0x347d97,_0x35a031._0x48d575,0x21f);});function _0x166773(_0x458602,_0x2d2356,_0x2b6c4,_0x20b5ae){return _0x41a9(_0x2b6c4- -_0x388738._0x202491,_0x2d2356);}function _0x18850f(_0x1406ac,_0x632fc3,_0x55d0ab,_0x261e69){return _0x41a9(_0x632fc3-_0x62d0a2._0x1cc3b9,_0x55d0ab);}if(_0x43124a['length']===0x0)return void 0x0;return{'role':_0x18850f(0x212,_0x5dc435._0xda9a4c,0x211,_0x5dc435._0x4fe82e),'content':_0x43124a};}function createAssistantTextMessage(_0x442029){const _0x48a5fa={_0x40c123:0x412,_0x803c7e:0x3f2,_0x25d14:0x41c,_0x5d2635:0x407,_0x2ed08c:0x1c2,_0xb58475:0x1aa},_0x3b3d25={_0x39acad:0x2fd},_0x506340={_0x31a163:0x16f,_0x3a65c2:0x160,_0x4cd8a9:0x125,_0x311e9e:0x12d},_0x5150a3={_0x513834:0xf3,_0x25f9c1:0x2cd},_0x42f47f=normalizeContent(_0x442029?.[_0x4ba435(-0x1b5,-0x1c5,-0x1b8,-0x1ce)])[_0x3a3d21(_0x48a5fa._0x40c123,_0x48a5fa._0x803c7e,_0x48a5fa._0x25d14,_0x48a5fa._0x5d2635)](_0x598eb3=>{const _0x2247e8={_0x568037:0x1d7,_0x3d56a3:0x695};function _0x3e9ea0(_0x114455,_0x5bf301,_0x30c9ba,_0x4f1ee5){return _0x3a3d21(_0x114455-0x12a,_0x5bf301-_0x2247e8._0x568037,_0x114455,_0x30c9ba- -_0x2247e8._0x3d56a3);}function _0x8520f(_0x3d2a4b,_0x3812bc,_0x1a2bbc,_0xee5d6c){return _0x3a3d21(_0x3d2a4b-0xc9,_0x3812bc-_0x5150a3._0x513834,_0x3812bc,_0x1a2bbc- -_0x5150a3._0x25f9c1);}return _0x598eb3[_0x8520f(_0x506340._0x31a163,0x158,_0x506340._0x3a65c2,0x156)]===_0x8520f(_0x506340._0x4cd8a9,0x14d,0x136,_0x506340._0x311e9e);});function _0x3a3d21(_0x126c5f,_0x227851,_0x2376aa,_0x1d130f){return _0x41a9(_0x1d130f-0x2ca,_0x2376aa);}function _0x4ba435(_0x4daef4,_0x2ec458,_0x408c9d,_0x3e7567){return _0x41a9(_0x408c9d- -_0x3b3d25._0x39acad,_0x3e7567);}if(_0x42f47f['length']===0x0)return void 0x0;return{'role':_0x4ba435(-0x1a9,-0x1b2,-_0x48a5fa._0x2ed08c,-_0x48a5fa._0xb58475),'content':_0x42f47f};}function createToolUseMessage(_0x20d521){const _0x4d426b={_0x3754a6:0x401,_0x31f8d7:0x3e4,_0x50ca90:0x3ed,_0x422575:0x3dc,_0x17cf81:0x3e3},_0x2ed3af={_0x2a0956:0x427,_0x42b618:0x40a,_0x18bbb4:0x415},_0x25f3a5={_0x26d77d:0x29f};function _0xd13674(_0x3f4b53,_0x293d1f,_0xe1b476,_0x44450d){return _0x41a9(_0x44450d-_0x25f3a5._0x26d77d,_0xe1b476);}const _0x3d6b1b=normalizeContent(_0x20d521?.[_0xd13674(0x402,0x3ce,_0x4d426b._0x3754a6,_0x4d426b._0x31f8d7)])[_0xd13674(_0x4d426b._0x50ca90,0x3e8,0x3c7,_0x4d426b._0x422575)](_0x22f961=>{function _0xf0554c(_0x6f6d03,_0x5a7add,_0x770f41,_0x5b0d52){return _0x1f6a06(_0x5a7add-0x108,_0x5a7add-0x2,_0x6f6d03,_0x5b0d52-0xe);}return _0x22f961['type']===_0xf0554c(_0x2ed3af._0x2a0956,_0x2ed3af._0x42b618,_0x2ed3af._0x18bbb4,0x414);});if(_0x3d6b1b['length']===0x0)return void 0x0;function _0x1f6a06(_0x41274f,_0x3c001a,_0x5bb713,_0x3e180d){return _0x41a9(_0x41274f-0x1bc,_0x5bb713);}return{'role':_0xd13674(0x3ee,0x3d9,_0x4d426b._0x17cf81,0x3da),'content':_0x3d6b1b};}function getTextFromMessage(_0x85a3c7){const _0x1d7226={_0x41ac1d:0x248,_0x41c5ec:0x421,_0x440cbb:0x430,_0x43e7de:0x424,_0x225209:0x425,_0xea6f7f:0x42c},_0x278ceb={_0x11ab5d:0xfe},_0x1c0443={_0x232f6f:0x2e7};function _0x3351ba(_0x478b75,_0x3281e7,_0x151125,_0x3206e3){return _0x41a9(_0x3206e3-_0x1c0443._0x232f6f,_0x3281e7);}function _0x5d0dd3(_0x53571b,_0x464efc,_0x5c1e23,_0x27a0f2){return _0x41a9(_0x53571b-_0x278ceb._0x11ab5d,_0x464efc);}return normalizeContent(_0x85a3c7?.[_0x5d0dd3(0x243,_0x1d7226._0x41ac1d,0x231,_0x1d7226._0x41ac1d)])[_0x3351ba(_0x1d7226._0x41c5ec,_0x1d7226._0x440cbb,0x437,_0x1d7226._0x43e7de)](_0x27e5ab=>_0x27e5ab[_0x5d0dd3(0x261,0x247,0x24d,0x267)]==='text')[_0x3351ba(_0x1d7226._0x440cbb,0x406,_0x1d7226._0x225209,0x418)](_0x49f0a3=>_0x49f0a3[_0x5d0dd3(0x237,0x24a,0x22d,0x249)])[_0x3351ba(0x427,_0x1d7226._0xea6f7f,0x429,0x42b)]('\x0a');}function getReasoningTextFromMessage(_0x1c6533){const _0x44009f={_0x191501:0x526,_0x201986:0x51c,_0x562c5e:0x557,_0x1366c6:0x556},_0x2929e1={_0x264ebe:0x1d2,_0x5f1df1:0x1dd,_0x50c00a:0x139,_0x439f7e:0x116,_0x5bf1f8:0x13e,_0x4a3e6b:0x108,_0x574b59:0x13b,_0x31db4d:0x147,_0x8b7401:0x11f,_0x2e9e73:0x120,_0x4e6a4c:0x116,_0x13e81a:0x109,_0x2a5a28:0x114,_0x1893fc:0x10e,_0x354ed2:0x203,_0x40ea7f:0x1d2,_0x1df70f:0x1c1,_0x299587:0x1cb,_0x995b65:0x1f1,_0x5f54b1:0x1f4,_0x38b37a:0x130,_0x334d12:0x117,_0x33372d:0x11b,_0x5cee81:0x137,_0x3bedc6:0x131,_0x162fb8:0x141,_0x42e70b:0x111,_0x1c69d0:0x12e,_0x50973d:0x112,_0x477ba3:0x207,_0x1bb78a:0x1f7,_0x4975fa:0x1de,_0x1178b7:0x205},_0x390700={_0x5a24e6:0x3df};function _0x54dc47(_0x1462c5,_0x2f8ff1,_0x2e2309,_0x5f2bcd){return _0x41a9(_0x1462c5-_0x390700._0x5a24e6,_0x5f2bcd);}function _0xbe932f(_0x22f1d3,_0x408a73,_0x483442,_0x206536){return _0x41a9(_0x408a73-0x3cb,_0x22f1d3);}return normalizeContent(_0x1c6533?.[_0x54dc47(0x524,_0x44009f._0x191501,0x53f,_0x44009f._0x201986)])[_0x54dc47(0x539,_0x44009f._0x562c5e,_0x44009f._0x1366c6,0x51d)](_0x4a355a=>{const _0x48565f={_0x57e313:0xae},_0x2693a2={_0x1b1f90:0x709};if(_0x4a355a['type']===_0x120f14(-_0x2929e1._0x264ebe,-_0x2929e1._0x5f1df1,-0x1ec,-0x1fa))return _0x4a355a[_0x120f14(-0x1e2,-0x205,-0x1fd,-0x217)][_0x39af29(0x130,0x141,_0x2929e1._0x50c00a,_0x2929e1._0x439f7e)]()[_0x39af29(0x137,0x124,0x120,_0x2929e1._0x5bf1f8)]>0x0?[_0x4a355a[_0x39af29(0x105,0xee,_0x2929e1._0x4a3e6b,0x112)]]:[];function _0x120f14(_0x5d9e8e,_0x4fe24e,_0x45207a,_0x1b2cfb){return _0x54dc47(_0x45207a- -_0x2693a2._0x1b1f90,_0x4fe24e-0x73,_0x45207a-0x173,_0x5d9e8e);}if(_0x4a355a[_0x39af29(_0x2929e1._0x574b59,_0x2929e1._0x31db4d,0x132,0x136)]==='anthropic_redacted_thinking')return[_0x39af29(0x10f,_0x2929e1._0x8b7401,0x10c,0xf8)];if(_0x4a355a[_0x120f14(-0x1ca,-0x1ac,-0x1c7,-0x1d0)]!==_0x39af29(0x12d,0x134,0x119,0x142))return[];const _0x2cd787=_0x4a355a[_0x39af29(0x12f,0x111,_0x2929e1._0x2e9e73,_0x2929e1._0x4e6a4c)][_0x39af29(_0x2929e1._0x13e81a,_0x2929e1._0x2a5a28,_0x2929e1._0x1893fc,0x107)](_0x3d9ef2=>_0x3d9ef2[_0x39af29(0x111,0x104,0x11d,0x118)])[_0x120f14(-0x1df,-_0x2929e1._0x354ed2,-0x1ed,-_0x2929e1._0x40ea7f)](_0x2ad4a8=>_0x2ad4a8['trim']()['length']>0x0)['join']('\x0a\x0a');if(_0x2cd787[_0x120f14(-_0x2929e1._0x1df70f,-0x1b6,-_0x2929e1._0x299587,-0x1db)]>0x0)return[_0x2cd787];if(_0x4a355a[_0x120f14(-0x208,-0x1fc,-_0x2929e1._0x995b65,-_0x2929e1._0x5f54b1)]&&_0x4a355a['text'][_0x39af29(_0x2929e1._0x38b37a,_0x2929e1._0x334d12,0x144,_0x2929e1._0x33372d)]()[_0x39af29(_0x2929e1._0x5cee81,_0x2929e1._0x3bedc6,0x14c,_0x2929e1._0x162fb8)]>0x0)return[_0x4a355a[_0x39af29(_0x2929e1._0x42e70b,0xf8,_0x2929e1._0x1c69d0,_0x2929e1._0x50973d)]];function _0x39af29(_0x236056,_0x4ca505,_0x5e0d93,_0x53b69b){return _0xbe932f(_0x4ca505,_0x236056- -0x3f3,_0x5e0d93-_0x48565f._0x57e313,_0x53b69b-0x182);}return _0x4a355a[_0x120f14(-0x20e,-_0x2929e1._0x477ba3,-_0x2929e1._0x1bb78a,-_0x2929e1._0x4975fa)]?[_0x120f14(-_0x2929e1._0x1178b7,-0x1cf,-0x1eb,-0x207)]:[];})['join']('\x0a\x0a');}function getToolUseBlocks(_0x66ca42){const _0x56c316={_0x1c7106:0x10b,_0x368d31:0x122,_0x4e6263:0xf4},_0x266cee={_0x5c222e:0x250},_0xb8f01={_0x3493f7:0x5f};function _0x53c9c4(_0x54be7d,_0x2e9e4d,_0x46b214,_0x22bd82){return _0x41a9(_0x46b214-_0xb8f01._0x3493f7,_0x2e9e4d);}function _0x470168(_0x48714f,_0x45331f,_0x52c3bb,_0x2507cd){return _0x41a9(_0x48714f- -_0x266cee._0x5c222e,_0x2507cd);}return normalizeContent(_0x66ca42?.[_0x470168(-_0x56c316._0x1c7106,-_0x56c316._0x368d31,-_0x56c316._0x4e6263,-0xfc)])['filter'](_0x2e9ab8=>_0x2e9ab8[_0x53c9c4(0x1c2,0x1ce,0x1c2,0x1c9)]===_0x53c9c4(0x1b3,0x1c3,0x1a5,0x1b6));}function getToolResultBlocks(_0x51af64){const _0x3f5833={_0x204622:0x203,_0x208443:0x1ff,_0x3cf078:0x1e0};function _0x23c5a3(_0x5516cc,_0x6d7ef9,_0xd1c427,_0x3ac9d6){return _0x41a9(_0x6d7ef9-0xba,_0xd1c427);}return normalizeContent(_0x51af64?.[_0x23c5a3(_0x3f5833._0x204622,_0x3f5833._0x208443,_0x3f5833._0x3cf078,0x204)])['filter'](_0x1f98e9=>_0x1f98e9['type']==='tool_result');}function createToolResultUserMessage(_0x2718ba){const _0x317ee4={_0x6c0530:0x86,_0x175cb7:0x71},_0xe59497={_0x4511ee:0x149,_0x2d3e02:0x12b,_0x2e2f21:0x11f,_0x302488:0x12e,_0x18c7cf:0x120,_0x950156:0x15c,_0x3313ab:0x13d,_0x53eda9:0x128,_0x5d42b8:0x12d,_0x369fef:0x114,_0x20b616:0x12a,_0x26a2bc:0x142,_0xbd7d76:0x129},_0x5246d6={_0x50a36c:0x11a,_0x59926c:0x17f},_0x33a92f={_0x4474f0:0x1b4};function _0x1adefc(_0x3bbacb,_0x20f132,_0x327a26,_0x153d39){return _0x41a9(_0x153d39- -_0x33a92f._0x4474f0,_0x3bbacb);}return{'role':_0x1adefc(-0x59,-_0x317ee4._0x6c0530,-0x83,-_0x317ee4._0x175cb7),'content':_0x2718ba['map'](_0x10d1bb=>{const _0x4ae2bc={_0x143a8a:0x1d2,_0x2c4b16:0x87};function _0x252230(_0x135566,_0x4cbb59,_0x59624b,_0x4a3e16){return _0x1adefc(_0x4a3e16,_0x4cbb59-0x176,_0x59624b-_0x5246d6._0x50a36c,_0x135566-_0x5246d6._0x59926c);}function _0x3cece3(_0x565222,_0x30603d,_0x1982ab,_0x456cd7){return _0x1adefc(_0x456cd7,_0x30603d-_0x4ae2bc._0x143a8a,_0x1982ab-_0x4ae2bc._0x2c4b16,_0x1982ab-0x196);}return{'type':'tool_result','tool_use_id':_0x10d1bb[_0x3cece3(0x13a,_0xe59497._0x4511ee,_0xe59497._0x2d3e02,_0xe59497._0x2e2f21)],'content':_0x10d1bb[_0x3cece3(0x124,_0xe59497._0x302488,0x127,_0xe59497._0x18c7cf)]??_0x10d1bb[_0x3cece3(0x13e,_0xe59497._0x950156,_0xe59497._0x3313ab,_0xe59497._0x53eda9)],'is_error':_0x10d1bb[_0x252230(_0xe59497._0x5d42b8,_0xe59497._0x369fef,_0xe59497._0x20b616,_0xe59497._0x26a2bc)]===_0x252230(0x12c,0x10d,0x144,_0xe59497._0xbd7d76)};})};}var INTERRUPTED_TOOL_RESULT_TEXT=_0x21e26b(-0x79,-0x7b,-0x8c,-0x86);function synthesizeMissingToolResults(_0x1c49a3){const _0x2fdd33={_0x1f7ac6:0x373,_0x13b187:0xbc,_0x1be53c:0xb5,_0x1c50f9:0xb4,_0x4f2716:0xd1,_0x2d7963:0xdd,_0x190492:0xec,_0x2c679e:0xad,_0x4c4575:0xab,_0x394002:0xa0,_0x28f1d2:0x95,_0x30fcf7:0xbc,_0x3c9038:0xb5,_0x88e75b:0xae,_0x26552b:0xc9,_0x1da9e4:0xca,_0x107c9a:0x36f,_0x582e36:0x34e,_0x457766:0x353},_0x439d69={_0x422286:0x3fc,_0x9d900b:0xc6},_0x451fdb={_0x1151fc:0x120,_0x3a70c0:0x11b},_0x4af278=new Set();for(const _0x5dd16a of _0x1c49a3){for(const _0x12ef3e of getToolResultBlocks(_0x5dd16a)){_0x4af278['add'](_0x12ef3e[_0x21f981(_0x2fdd33._0x1f7ac6,0x36f,0x35c,0x37a)]);}}const _0x4deea6=[];function _0x38d24e(_0x4821ff,_0x4f909b,_0x26b8dd,_0x56e3a3){return _0x21e26b(_0x4821ff- -0x37,_0x4f909b,_0x26b8dd-_0x451fdb._0x1151fc,_0x56e3a3-_0x451fdb._0x3a70c0);}function _0x21f981(_0x161ba1,_0x12cbdd,_0x47cf36,_0x255dbf){return _0x21e26b(_0x255dbf-_0x439d69._0x422286,_0x12cbdd,_0x47cf36-_0x439d69._0x9d900b,_0x255dbf-0x81);}for(const _0x4a1fc7 of _0x1c49a3){_0x4deea6[_0x38d24e(-_0x2fdd33._0x13b187,-_0x2fdd33._0x1be53c,-_0x2fdd33._0x1c50f9,-_0x2fdd33._0x4f2716)](_0x4a1fc7);const _0x2965bf=getToolUseBlocks(_0x4a1fc7)[_0x38d24e(-0xcf,-_0x2fdd33._0x2d7963,-_0x2fdd33._0x190492,-0xdd)](_0x1d3283=>!_0x4af278['has'](_0x1d3283['id']));if(_0x2965bf[_0x38d24e(-_0x2fdd33._0x2c679e,-_0x2fdd33._0x4c4575,-_0x2fdd33._0x394002,-_0x2fdd33._0x28f1d2)]===0x0)continue;_0x4deea6[_0x38d24e(-_0x2fdd33._0x30fcf7,-0xd6,-_0x2fdd33._0x3c9038,-_0x2fdd33._0x88e75b)]({'role':_0x38d24e(-_0x2fdd33._0x26552b,-0xd4,-_0x2fdd33._0x2d7963,-_0x2fdd33._0x1da9e4),'content':_0x2965bf['map'](_0x3798c1=>({'type':'tool_result','tool_use_id':_0x3798c1['id'],'content':INTERRUPTED_TOOL_RESULT_TEXT,'is_error':!![]}))});for(const _0x23f901 of _0x2965bf){_0x4af278[_0x21f981(_0x2fdd33._0x107c9a,0x367,_0x2fdd33._0x582e36,_0x2fdd33._0x457766)](_0x23f901['id']);}}return _0x4deea6;}export{createTextBlock,normalizeTextBlock,normalizeContent,normalizeSystem,normalizeMessage,compileRequest,toChatRequest,toModelRequest,toProviderModelRequest,toChatResponse,toModelResponse,responseToAssistantMessage,createReasoningMessage,createAssistantTextMessage,createToolUseMessage,getTextFromMessage,getReasoningTextFromMessage,getToolUseBlocks,getToolResultBlocks,createToolResultUserMessage,INTERRUPTED_TOOL_RESULT_TEXT,synthesizeMissingToolResults};
|