@nuvin/agent-core 0.2.0-rc.1 → 0.2.0-rc.3

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.
Files changed (42) hide show
  1. package/dist/VERSION +2 -2
  2. package/dist/agent/index.js +1 -1
  3. package/dist/agent/metrics.d.ts +8 -0
  4. package/dist/chunk-D5IVWJHX.js +1 -1
  5. package/dist/chunk-FFIZ6TKW.js +1 -1
  6. package/dist/chunk-IUZALP6K.js +1 -0
  7. package/dist/chunk-LIE76IJA.js +1 -0
  8. package/dist/chunk-QKOKWD5Y.js +1 -0
  9. package/dist/chunk-X7VAACWY.js +1 -1
  10. package/dist/chunk-YNOIG4FD.js +1 -0
  11. package/dist/formats/index.js +1 -1
  12. package/dist/hooks/index.js +1 -1
  13. package/dist/models/chat-model.d.ts +1 -0
  14. package/dist/models/index.d.ts +2 -0
  15. package/dist/models/index.js +1 -1
  16. package/dist/models/mock-model.d.ts +2 -0
  17. package/dist/models/model-cost.d.ts +5 -0
  18. package/dist/models/model-pricing-generator.d.ts +9 -0
  19. package/dist/models/model-pricing-products.d.ts +45 -0
  20. package/dist/models/model-pricing-types.d.ts +33 -0
  21. package/dist/models/model-pricing.d.ts +13 -0
  22. package/dist/models/model-pricing.generated.d.ts +23147 -0
  23. package/dist/models/model-registry.d.ts +8 -0
  24. package/dist/models/openai-surfaces.d.ts +4 -1
  25. package/dist/models/routed-model.d.ts +3 -0
  26. package/dist/shared/index.js +1 -1
  27. package/dist/shared/reasoning-config.d.ts +3 -4
  28. package/dist/shared/types.d.ts +49 -17
  29. package/dist/tools/index.d.ts +3 -0
  30. package/dist/tools/index.js +1 -1
  31. package/dist/tools/mcp-connection-generation.d.ts +59 -0
  32. package/dist/tools/mcp-safe-error-provenance.d.ts +4 -0
  33. package/dist/tools/mcp-safe-error.d.ts +14 -0
  34. package/dist/tools/mcp-server-manager.d.ts +3 -47
  35. package/dist/tools/mcp-tool-adapter.d.ts +26 -1
  36. package/dist/tools/runtime-manager-tools.d.ts +11 -0
  37. package/dist/tools/tools.d.ts +4 -1
  38. package/package.json +2 -2
  39. package/dist/chunk-E4R6CEFK.js +0 -1
  40. package/dist/chunk-NYZR4XKO.js +0 -1
  41. package/dist/chunk-RABU4RC2.js +0 -1
  42. package/dist/chunk-RTDLM6FU.js +0 -1
@@ -0,0 +1,59 @@
1
+ import type { MCPServerConfig } from "@nuvin/config";
2
+ import type { AnyToolDefinition, ToolDefinitionLifecycle, ToolPermissionClass } from "../shared/types.ts";
3
+ import { type McpServerToolInfo, type McpToolClient, type McpToolDescriptor } from "./mcp-tool-adapter.ts";
4
+ export interface McpTimeoutSource {
5
+ get(): number;
6
+ set(timeoutMs: number): void;
7
+ }
8
+ export declare function createMcpTimeoutSource(initialTimeoutMs: number): McpTimeoutSource;
9
+ export declare function resolveMcpTimeoutMs(server: MCPServerConfig, defaultTimeoutMs: number | undefined): number;
10
+ export type McpTerminalTransportError = {
11
+ readonly code: "mcp-transport-error";
12
+ readonly cause: unknown;
13
+ };
14
+ export interface ConnectedMcpClient extends McpToolClient {
15
+ listTools(options?: {
16
+ signal?: AbortSignal;
17
+ }): Promise<{
18
+ tools: McpToolDescriptor[];
19
+ }>;
20
+ onTerminalError?(listener: (event: McpTerminalTransportError) => void): () => void;
21
+ close(): Promise<void>;
22
+ }
23
+ export interface McpConnectionOptions {
24
+ signal?: AbortSignal;
25
+ oauth?: {
26
+ storageDir: string;
27
+ callbackUrl: string;
28
+ onRedirect(serverName: string, url: URL): void | Promise<void>;
29
+ };
30
+ timeoutSource?: McpTimeoutSource;
31
+ }
32
+ export type McpConnector = (serverName: string, config: MCPServerConfig, options?: McpConnectionOptions) => Promise<ConnectedMcpClient>;
33
+ export interface McpConnectionGeneration {
34
+ readonly client: ConnectedMcpClient;
35
+ readonly descriptors: readonly McpToolDescriptor[];
36
+ readonly lifecycle: ToolDefinitionLifecycle;
37
+ projectTools(input: {
38
+ serverName: string;
39
+ prefix?: string;
40
+ allowedTools?: Record<string, boolean>;
41
+ toolPermissions?: Record<string, ToolPermissionClass>;
42
+ }): {
43
+ tools: AnyToolDefinition[];
44
+ descriptors: McpServerToolInfo[];
45
+ };
46
+ onTerminalError(listener: (event: McpTerminalTransportError) => void): () => void;
47
+ retire(): Promise<void>;
48
+ }
49
+ export declare function buildMcpHttpHeaders(config: MCPServerConfig): Record<string, string> | undefined;
50
+ export declare function connectMcpServer(serverName: string, config: MCPServerConfig, options?: McpConnectionOptions): Promise<ConnectedMcpClient>;
51
+ export declare function createMcpConnectionGeneration(input: {
52
+ serverName: string;
53
+ config: MCPServerConfig;
54
+ timeoutSource: McpTimeoutSource;
55
+ signal?: AbortSignal;
56
+ connection?: McpConnectionOptions;
57
+ connect?: McpConnector;
58
+ }): Promise<McpConnectionGeneration>;
59
+ //# sourceMappingURL=mcp-connection-generation.d.ts.map
@@ -0,0 +1,4 @@
1
+ import { type McpSafeError, toMcpSafeError } from "./mcp-safe-error.ts";
2
+ export declare function createOwnedMcpSafeError(input: Parameters<typeof toMcpSafeError>[0]): McpSafeError;
3
+ export declare function extractOwnedMcpSafeError(error: unknown): McpSafeError | undefined;
4
+ //# sourceMappingURL=mcp-safe-error-provenance.d.ts.map
@@ -0,0 +1,14 @@
1
+ export type McpSafeErrorCode = "mcp-auth-required" | "mcp-close-failed" | "mcp-connect-failed" | "mcp-discovery-failed" | "mcp-request-timeout" | "mcp-tool-call-failed";
2
+ export type McpSafeError = {
3
+ code: McpSafeErrorCode;
4
+ message: string;
5
+ };
6
+ type McpOperation = "close" | "connect" | "discover" | "toolCall";
7
+ export declare function toMcpSafeError(input: {
8
+ serverName: string;
9
+ operation: McpOperation;
10
+ error: unknown;
11
+ }): McpSafeError;
12
+ export declare function redactMcpDiagnostic(text: string, secrets: readonly string[]): string;
13
+ export {};
14
+ //# sourceMappingURL=mcp-safe-error.d.ts.map
@@ -1,11 +1,6 @@
1
- import type { ListToolsResult } from "@modelcontextprotocol/sdk/types.js";
2
- import type { MCPServerConfig } from "@nuvin/config";
3
- import type { AnyToolDefinition, JsonValue } from "../shared/types.ts";
4
- import { type McpToolClient } from "./mcp-tool-adapter.ts";
5
- interface ConnectedMcpClient extends McpToolClient {
6
- listTools(): Promise<ListToolsResult>;
7
- close(): Promise<void>;
8
- }
1
+ export type { ConnectedMcpClient, McpConnectionOptions, McpConnector, } from "./mcp-connection-generation.ts";
2
+ export { buildMcpHttpHeaders, connectMcpServer, } from "./mcp-connection-generation.ts";
3
+ export type { McpServerToolInfo } from "./mcp-tool-adapter.ts";
9
4
  export type McpServerConnectionStatus = {
10
5
  status: "connected";
11
6
  toolCount: number;
@@ -18,43 +13,4 @@ export type McpServerConnectionStatus = {
18
13
  status: "error";
19
14
  message: string;
20
15
  };
21
- /**
22
- * One MCP tool's user-facing descriptor, grouped per server. Populated only for
23
- * connected tools so the Ctrl+P MCP tab can render enabled and disabled tools
24
- * without a second round-trip (the flat {@link McpToolBundle.tools} array
25
- * contains only callable tools and carries no per-server bucketing).
26
- */
27
- export type McpServerToolInfo = {
28
- name: string;
29
- description?: string;
30
- inputSchema?: JsonValue;
31
- };
32
- export interface McpToolBundle {
33
- tools: AnyToolDefinition[];
34
- servers: Record<string, McpServerConnectionStatus>;
35
- /**
36
- * Per-server descriptors for every discovered tool (server name →
37
- * descriptors), including tools filtered from the callable array. Optional so
38
- * existing bundle literals stay valid; consumers default to `{}`.
39
- */
40
- serverTools?: Record<string, McpServerToolInfo[]>;
41
- close(): Promise<void>;
42
- }
43
- export interface McpConnectionOptions {
44
- oauth?: {
45
- storageDir: string;
46
- callbackUrl: string;
47
- onRedirect(serverName: string, url: URL): void | Promise<void>;
48
- };
49
- }
50
- export type McpConnector = (serverName: string, config: MCPServerConfig, options?: McpConnectionOptions) => Promise<ConnectedMcpClient>;
51
- export declare function buildMcpHttpHeaders(config: MCPServerConfig): Record<string, string> | undefined;
52
- export declare function connectMcpServer(serverName: string, config: MCPServerConfig, options?: McpConnectionOptions): Promise<ConnectedMcpClient>;
53
- export declare function createMcpToolsFromServers(options: {
54
- servers?: Record<string, MCPServerConfig>;
55
- allowedTools?: Record<string, Record<string, boolean>>;
56
- connection?: McpConnectionOptions;
57
- connect?: McpConnector;
58
- }): Promise<McpToolBundle>;
59
- export {};
60
16
  //# sourceMappingURL=mcp-server-manager.d.ts.map
@@ -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 { AnyToolDefinition, JsonObject, JsonSchema, JsonSchemaObject, JsonValue, 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: {
@@ -11,12 +14,34 @@ export interface McpToolClient {
11
14
  arguments?: JsonObject;
12
15
  }): Promise<CallToolResult>;
13
16
  }
17
+ export interface McpServerToolInfo {
18
+ name: string;
19
+ description?: string;
20
+ inputSchema?: JsonValue;
21
+ permissionClass: ToolPermissionClass;
22
+ permissionConfigured: boolean;
23
+ suggestedPermissionClass?: "read" | "write";
24
+ }
25
+ export declare function projectMcpTools(input: {
26
+ serverName: string;
27
+ prefix?: string;
28
+ descriptors: readonly McpToolDescriptor[];
29
+ client: McpToolClient;
30
+ lifecycle: ToolDefinitionLifecycle;
31
+ allowedTools?: Record<string, boolean>;
32
+ toolPermissions?: Record<string, ToolPermissionClass>;
33
+ }): {
34
+ tools: AnyToolDefinition[];
35
+ descriptors: McpServerToolInfo[];
36
+ };
14
37
  export declare function createMcpToolName(serverName: string, toolName: string): string;
15
38
  export declare function toNuvinToolSchema(inputSchema: unknown): JsonSchemaObject;
16
39
  export declare function createMcpTool(options: {
17
40
  serverName: string;
18
41
  tool: McpToolDescriptor;
19
42
  client: McpToolClient;
43
+ permissionClass: ToolPermissionClass;
44
+ internalLifecycle?: ToolDefinitionLifecycle;
20
45
  }): import("../shared/types.ts").ToolDefinition<{
21
46
  [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
47
  [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[];
@@ -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.2.0-rc.1",
3
+ "version": "0.2.0-rc.3",
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.2.1-rc.2"
55
+ "@nuvin/config": "0.3.0-rc.4"
56
56
  },
57
57
  "dependencies": {
58
58
  "@anthropic-ai/sdk": "^0.82.0",
@@ -1 +0,0 @@
1
- (function(_0x473145,_0x40f261){const _0x59a18d={_0x44a8c0:0x2e2,_0x1138d1:0x2e1,_0x2fd951:0x2f6,_0x18b35c:0x1f4,_0x37c991:0x1f0,_0x277ed6:0x2f5,_0x575e2c:0x2f1,_0x32952a:0x2fb,_0x1934a5:0x2db,_0x35cf0b:0x211,_0x9119a2:0x234,_0xcbefe:0x233,_0x5e1eed:0x316,_0x202027:0x32d,_0x58d793:0x332,_0x3afe4c:0x30d,_0x1812ec:0x2e0,_0x99da:0x1f3,_0xfd13cd:0x1f4,_0x3dc103:0x316,_0x1a2b69:0x303,_0x5866da:0x31d,_0x25e470:0x1ee,_0x559a57:0x1ef,_0xbec542:0x1e3,_0x5548df:0x2db,_0x520315:0x2d9},_0x4d420f={_0x5a4368:0x42};function _0x22f351(_0x534da0,_0x4d3b65,_0x1fa1c9,_0x5f3a70){return _0x2af4(_0x4d3b65-_0x4d420f._0x5a4368,_0x534da0);}const _0x74c036=_0x473145();function _0x4c809d(_0x39a9c3,_0x18b48a,_0x924308,_0x4bd773){return _0x2af4(_0x39a9c3-0x144,_0x18b48a);}while(!![]){try{const _0x278544=parseInt(_0x4c809d(_0x59a18d._0x44a8c0,_0x59a18d._0x1138d1,_0x59a18d._0x2fd951,0x2c1))/0x1*(-parseInt(_0x22f351(0x1da,0x1f8,_0x59a18d._0x18b35c,_0x59a18d._0x37c991))/0x2)+parseInt(_0x4c809d(0x2fc,_0x59a18d._0x277ed6,_0x59a18d._0x575e2c,0x2fd))/0x3*(-parseInt(_0x4c809d(_0x59a18d._0x32952a,0x2f9,_0x59a18d._0x1934a5,0x2e8))/0x4)+-parseInt(_0x22f351(0x1f4,_0x59a18d._0x35cf0b,_0x59a18d._0x9119a2,_0x59a18d._0xcbefe))/0x5+parseInt(_0x4c809d(_0x59a18d._0x5e1eed,_0x59a18d._0x202027,0x335,_0x59a18d._0x58d793))/0x6*(parseInt(_0x4c809d(0x2f6,_0x59a18d._0x3afe4c,_0x59a18d._0x1812ec,0x2d9))/0x7)+parseInt(_0x22f351(0x1eb,_0x59a18d._0x99da,_0x59a18d._0xfd13cd,0x1f9))/0x8*(-parseInt(_0x4c809d(0x30c,_0x59a18d._0x3dc103,_0x59a18d._0x1a2b69,_0x59a18d._0x5866da))/0x9)+parseInt(_0x22f351(0x1e1,_0x59a18d._0x25e470,0x1fe,0x1e4))/0xa*(-parseInt(_0x22f351(0x1f2,_0x59a18d._0x559a57,0x1f4,_0x59a18d._0xbec542))/0xb)+parseInt(_0x4c809d(0x2f7,_0x59a18d._0x1138d1,_0x59a18d._0x5548df,_0x59a18d._0x520315))/0xc;if(_0x278544===_0x40f261)break;else _0x74c036['push'](_0x74c036['shift']());}catch(_0x4e1008){_0x74c036['push'](_0x74c036['shift']());}}}(_0x1a51,0x1a5e3));import{resolveOpenAiReasoningConfig}from'./chunk-NYZR4XKO.js';import{isProviderStateCompatible,normalizeContent}from'./chunk-RABU4RC2.js';function systemToInstructions(_0x4f8ca7){function _0x4cc6ca(_0xea19e5,_0x50b746,_0x4a33f8,_0x35fddc){return _0x2af4(_0xea19e5-0x1d4,_0x50b746);}function _0x64301b(_0x1ee076,_0x247ad7,_0x3618cc,_0x366061){return _0x2af4(_0x366061- -0x8e,_0x3618cc);}return normalizeContent(_0x4f8ca7)['filter'](_0x48190b=>_0x48190b[_0x64301b(0x126,0x14c,0x123,0x140)]==='text')[_0x4cc6ca(0x36a,0x35a,0x38d,0x35d)](_0x128ec2=>_0x128ec2['text'])['join']('\x0a\x0a');}function pushUserContentMessage(_0x4be613,_0x44f504,_0x25b925){const _0x156e67={_0x5b3bf4:0x57d,_0x5885b3:0x57c,_0x284ed5:0x583};function _0x300ae2(_0x539051,_0x2fa1c8,_0x14fb75,_0x442dfd){return _0x2af4(_0x539051- -0xdf,_0x14fb75);}function _0x3f418c(_0x1f7e34,_0xda1e69,_0x240124,_0x320ea6){return _0x2af4(_0x1f7e34-0x3e3,_0x320ea6);}if(_0x25b925[_0x300ae2(0xe5,0xcd,0xcd,0xfc)]===0x0)return;_0x4be613[_0x3f418c(_0x156e67._0x5b3bf4,0x567,0x59d,0x59b)]({'type':_0x3f418c(_0x156e67._0x5885b3,_0x156e67._0x284ed5,0x575,0x56a),'role':_0x44f504,'content':_0x25b925});}function _0x2af4(_0x55ba9d,_0x443282){_0x55ba9d=_0x55ba9d-0x192;const _0x1a51fd=_0x1a51();let _0x2af421=_0x1a51fd[_0x55ba9d];if(_0x2af4['TjIHEg']===undefined){var _0x3bf494=function(_0x2aa00c){const _0x4ac27b='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x4f8ca7='',_0x48190b='';for(let _0x128ec2=0x0,_0x4be613,_0x44f504,_0x25b925=0x0;_0x44f504=_0x2aa00c['charAt'](_0x25b925++);~_0x44f504&&(_0x4be613=_0x128ec2%0x4?_0x4be613*0x40+_0x44f504:_0x44f504,_0x128ec2++%0x4)?_0x4f8ca7+=String['fromCharCode'](0xff&_0x4be613>>(-0x2*_0x128ec2&0x6)):0x0){_0x44f504=_0x4ac27b['indexOf'](_0x44f504);}for(let _0xab0d66=0x0,_0x2e67ee=_0x4f8ca7['length'];_0xab0d66<_0x2e67ee;_0xab0d66++){_0x48190b+='%'+('00'+_0x4f8ca7['charCodeAt'](_0xab0d66)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x48190b);};_0x2af4['UMqmNh']=_0x3bf494,_0x2af4['ipeafu']={},_0x2af4['TjIHEg']=!![];}const _0x5326a7=_0x1a51fd[0x0],_0x318c38=_0x55ba9d+_0x5326a7,_0x380147=_0x2af4['ipeafu'][_0x318c38];return!_0x380147?(_0x2af421=_0x2af4['UMqmNh'](_0x2af421),_0x2af4['ipeafu'][_0x318c38]=_0x2af421):_0x2af421=_0x380147,_0x2af421;}function hasSerializableToolUse(_0xab0d66){const _0x1077d9={_0x5865de:0x4a,_0x1cef0b:0x62,_0x5dc187:0x69,_0x277fe1:0x2ba,_0xc9b126:0x2ce,_0x410257:0x61,_0x3d2ff3:0x6f},_0x1e2ecb={_0x5242e1:0x143};function _0x45eaf3(_0xd08ab0,_0x288102,_0x39ff2d,_0x723cad){return _0x2af4(_0x723cad-_0x1e2ecb._0x5242e1,_0x39ff2d);}function _0x53e06f(_0x35e0b8,_0x5b6c5f,_0x1ac822,_0x50ae85){return _0x2af4(_0x1ac822- -0x15a,_0x5b6c5f);}return _0xab0d66['id'][_0x53e06f(_0x1077d9._0x5865de,0x62,_0x1077d9._0x1cef0b,_0x1077d9._0x5dc187)]()['length']>0x0&&_0xab0d66[_0x45eaf3(0x2be,_0x1077d9._0x277fe1,_0x1077d9._0xc9b126,0x2d5)]['trim']()[_0x53e06f(_0x1077d9._0x410257,0x6a,0x6a,_0x1077d9._0x3d2ff3)]>0x0;}function hasSerializableToolResult(_0x2e67ee){const _0x50e43b={_0x58746b:0xa3,_0x4de459:0x95,_0x2ab457:0xb0};function _0x55d942(_0xab5d64,_0x4a04ec,_0x1e629f,_0x3d8ffe){return _0x2af4(_0x3d8ffe- -0x10c,_0xab5d64);}return _0x2e67ee['tool_use_id'][_0x55d942(_0x50e43b._0x58746b,0xc4,_0x50e43b._0x4de459,_0x50e43b._0x2ab457)]()['length']>0x0;}function isResponseInputObject(_0x5c5aaa){const _0x51a78c={_0x2bf7a5:0x523,_0x13d7a0:0x53c,_0x4d1d20:0x33d,_0x511211:0x341,_0x4650ac:0x541,_0x37b116:0x34a,_0x2262c7:0x346},_0x239d2a={_0x4588ed:0x356};if(typeof _0x5c5aaa!==_0x4b2fda(0x509,_0x51a78c._0x2bf7a5,0x511,_0x51a78c._0x13d7a0)||_0x5c5aaa===null||Array[_0x255e27(_0x51a78c._0x4d1d20,_0x51a78c._0x511211,0x340,0x363)](_0x5c5aaa))return![];const _0x209fc5=_0x5c5aaa;function _0x4b2fda(_0x3d36e6,_0x302e22,_0x4113d0,_0x51b88d){return _0x2af4(_0x302e22-_0x239d2a._0x4588ed,_0x3d36e6);}function _0x255e27(_0x535db0,_0x1230b5,_0x4a93be,_0x7d53a1){return _0x2af4(_0x1230b5-0x17e,_0x535db0);}return typeof _0x209fc5[_0x4b2fda(0x53f,0x524,0x52c,_0x51a78c._0x4650ac)]===_0x255e27(0x33d,_0x51a78c._0x37b116,0x33e,_0x51a78c._0x2262c7);}function isImageToolResultBlock(_0x5d145f){const _0x597b88={_0x1024ac:0x4ce,_0x4ecd60:0x4ad,_0x4070a2:0x4d0,_0x37d6db:0x4c4,_0x298e1c:0x4d2,_0x5b77f3:0x4e0,_0x2226aa:0x4bf,_0x49bae9:0x47c,_0x1580fd:0x4a6,_0x178a80:0x498,_0x372bae:0x4ac,_0x3f0302:0x4c0,_0x5d7ebf:0x4d8,_0x3f2b5e:0x4a7,_0x45d6da:0x48c,_0x475bbd:0x4cc,_0x2d1243:0x4bf,_0x3b386f:0x4a2,_0x1b46d8:0x46a,_0x2c4652:0x49c,_0x4ffb1f:0x4be,_0x58f5e0:0x4bd},_0x1284b5={_0x12a381:0x2f2};if(typeof _0x5d145f!==_0x4fae50(_0x597b88._0x1024ac,_0x597b88._0x4ecd60,_0x597b88._0x4070a2,0x4c1)||_0x5d145f===null||Array[_0x4fae50(_0x597b88._0x37d6db,_0x597b88._0x298e1c,_0x597b88._0x5b77f3,_0x597b88._0x2226aa)](_0x5d145f))return![];const _0x1fa33b=_0x5d145f;function _0x47582c(_0x4c5c14,_0x5ef068,_0x50d7b8,_0x54eb50){return _0x2af4(_0x5ef068-_0x1284b5._0x12a381,_0x54eb50);}function _0x4fae50(_0x50a4e4,_0x16e098,_0x41187a,_0x5c3922){return _0x2af4(_0x50a4e4-0x301,_0x41187a);}return _0x1fa33b['type']==='image'&&_0x1fa33b[_0x47582c(_0x597b88._0x49bae9,0x493,_0x597b88._0x1580fd,_0x597b88._0x178a80)]?.[_0x47582c(_0x597b88._0x372bae,_0x597b88._0x3f0302,0x4d3,_0x597b88._0x5d7ebf)]===_0x47582c(_0x597b88._0x3f2b5e,0x491,_0x597b88._0x45d6da,0x4b1)&&typeof _0x1fa33b[_0x47582c(0x488,0x493,0x4b5,0x4ab)][_0x4fae50(_0x597b88._0x475bbd,0x4d8,_0x597b88._0x2d1243,_0x597b88._0x4ecd60)]==='string'&&typeof _0x1fa33b[_0x4fae50(_0x597b88._0x3b386f,0x49d,0x4aa,0x484)][_0x47582c(0x495,0x487,_0x597b88._0x1b46d8,0x481)]===_0x47582c(_0x597b88._0x2c4652,_0x597b88._0x4ffb1f,_0x597b88._0x58f5e0,_0x597b88._0x3f2b5e);}function getToolResultText(_0x5822a1){const _0x1c795f={_0xafb7cb:0xee,_0x581329:0xaa,_0x30b36e:0x559,_0x3503f5:0xac,_0x3b6e1f:0xad,_0x482101:0xc9,_0x25ee90:0xd4},_0x17511a={_0x2a950e:0xde},_0xab71e3={_0x3ff97e:0x1d,_0x488f05:0x38,_0x9698de:0x21,_0x1ad54f:0x5,_0x40ffd2:0x1b},_0x386714={_0x33584a:0x3c3};if(typeof _0x5822a1===_0x5cc0d4(0xf0,_0x1c795f._0xafb7cb,0x100,0xd0))return _0x5822a1;function _0x3060c1(_0x5a8659,_0x5d041e,_0x391c81,_0x5d72d3){return _0x2af4(_0x5a8659-_0x386714._0x33584a,_0x5d041e);}const _0x2d5924=_0x5822a1[_0x5cc0d4(0xc3,0xca,_0x1c795f._0x581329,0xcf)](_0x455d62=>{const _0x5cce49={_0x245a8d:0x73},_0x558883={_0x435a07:0x172,_0x363ba8:0x289,_0x38128c:0x93};function _0x27c0b1(_0x3e0799,_0x21e96d,_0x2436c1,_0x3a623a){return _0x5cc0d4(_0x3e0799-_0x558883._0x435a07,_0x21e96d- -_0x558883._0x363ba8,_0x3e0799,_0x3a623a-_0x558883._0x38128c);}function _0x155514(_0x5d487d,_0x55a974,_0x52cdee,_0x33ca00){return _0x5cc0d4(_0x5d487d-0x115,_0x5d487d- -0xd2,_0x33ca00,_0x33ca00-_0x5cce49._0x245a8d);}return typeof _0x455d62===_0x155514(_0xab71e3._0x3ff97e,_0xab71e3._0x488f05,_0xab71e3._0x9698de,0x32)&&_0x455d62!==null&&_0x455d62[_0x155514(0x1e,0x15,0x3f,0x5)]===_0x155514(-0x5,0x9,-_0xab71e3._0x1ad54f,-_0xab71e3._0x40ffd2);})[_0x3060c1(_0x1c795f._0x30b36e,0x552,0x54b,0x55f)](_0x13746c=>_0x13746c[_0x5cc0d4(0xc3,0xcd,0xbb,0xb5)])[_0x5cc0d4(_0x1c795f._0x3503f5,0xc9,_0x1c795f._0x3b6e1f,0xc7)]('\x0a\x0a')[_0x3060c1(0x57f,0x575,0x594,0x586)]();function _0x5cc0d4(_0x3bcfe6,_0x2c79a4,_0x5ebc00,_0x5b533e){return _0x2af4(_0x2c79a4- -_0x17511a._0x2a950e,_0x5ebc00);}return _0x2d5924[_0x5cc0d4(_0x1c795f._0x482101,0xe6,0xe1,_0x1c795f._0x25ee90)]>0x0?_0x2d5924:_0x3060c1(0x58d,0x57c,0x58b,0x587);}function _0x1a51(){const _0x1a0a2a=['C3LZDgvT','BMfTzq','y29UDgvUDa','Dg9VBhm','zgf0yq','BwfW','B3v0Chv0rM9YBwf0','A2v5CW','BwvZC2fNzq','ChvZAa','Bw9KzwW','yxnZAxn0yw50','Dg9VBf91C2vFAwq','mtuXodncDufOtfu','yMfZzty0','C3vTBwfYEq','C291CMnL','zNvUy3rPB24','DxnLCI12AxnPyMXL','Aw1Hz2u','C2nOzw1H','Dg9VBf91C2u','AM9PBG','zMLSDgvY','ChjVDMLKzxjtDgf0zq','Aw5WDxrFDgv4Da','Dgv4Da','nJeWrhneAw1f','mtm3ntb3zeTeDxK','Bwf4vg9Rzw5Z','CM9Szq','DMLZAwjPBgL0Eq','mtyWsunUDLnr','mJHyqMDStem','odCXnZa4ohnwthv1qG','yxv0BW','C3rYDwn0DxjLzf9VDxrWDxq','mJH1uvfzAu8','ntq4wKv5uvrt','mtm4ow5kB2r0vG','Aw5WDxq','B3bLBMfPuMvZCg9UC2vZt3v0Chv0','o2jHC2u2ncW','DhjPBq','sw1Hz2uGCMv0DxjUzwqGyNKGvMLLD0zPBguGzM9YihrVB2WGCMvZDwX0ia','Aw5WDxrFAw1Hz2u','Aw5WDxrFC2nOzw1H','zwzMB3j0','C3rHDhvZ','ANnVBL9Zy2HLBwe','AxnbCNjHEq','BgvUz3rO','DxnLCG','zgf0ytO','C3rYAw5NAwz5','odiWmtDQDuPzv0O','B3v0Chv0x3rLEhq','vg9VBcbYzxr1CM5LzcbPBwfNzsbJB250zw50lG','BwvKAwfFDhLWzq','C3rYAw5N','B2jQzwn0','DhLWzq','oti5mZCWquPtteTT','C3bSAwnL','CMvHC29UAw5NlMvUy3j5ChrLzf9JB250zw50','mtuYotm0veTxtM94','zNvUy3rPB25Fy2fSBf9VDxrWDxq','Dg9VBf9Yzxn1Bhq','CMvHC29UAw5N'];_0x1a51=function(){return _0x1a0a2a;};return _0x1a51();}function getToolResultImages(_0x2e06d1){const _0x4f6bf7={_0x1b730a:0x378,_0x509532:0x360},_0x42070f={_0x22d419:0x1be};function _0x288b21(_0x4876c5,_0x106f40,_0x2245ca,_0x2ad7cf){return _0x2af4(_0x4876c5-_0x42070f._0x22d419,_0x2245ca);}return Array[_0x288b21(0x381,_0x4f6bf7._0x1b730a,0x374,_0x4f6bf7._0x509532)](_0x2e06d1)?_0x2e06d1['filter'](isImageToolResultBlock):[];}function resolveReasoningVisibility(_0x282430){const _0x3e5f27={_0x316b8d:0x2a3,_0x3a6f7a:0x29f,_0x2d0e5a:0x2a8},_0x25bce2={_0x33f3da:0xf3},_0x31cc27={_0x2e8cdf:0xf7};function _0x48f45c(_0x5aaf20,_0x4b0c00,_0x112f8f,_0x1faa57){return _0x2af4(_0x5aaf20-_0x31cc27._0x2e8cdf,_0x4b0c00);}function _0x31c112(_0x22f5a9,_0xae4a31,_0x489328,_0x504030){return _0x2af4(_0x489328-_0x25bce2._0x33f3da,_0x22f5a9);}return _0x282430['reasoning']?.[_0x31c112(0x28a,0x2b3,_0x3e5f27._0x316b8d,_0x3e5f27._0x3a6f7a)]??_0x48f45c(0x29a,0x27a,_0x3e5f27._0x2d0e5a,0x295);}function createOpenAiResponsesReasoning(_0x4a7319){const _0x301ff1={_0x5aa738:0x395,_0x7785db:0x3a0,_0x5884aa:0x38b,_0x22d76c:0x1ca,_0x488741:0x1d8,_0x4b54dc:0x1d8,_0x5db7f6:0x1df,_0x5880ba:0x370,_0x20d21f:0x390,_0x21a422:0x38b,_0x2cacc1:0x200,_0x41b5db:0x1e1,_0xa2f167:0x1f4},_0x2596a7={_0x537398:0x1bf},_0x4dd466=resolveOpenAiReasoningConfig(_0x4a7319[_0x20500d(0x372,0x394,0x37d,0x37f)]);if(!_0x4dd466)return{};const _0x36dfc9={};function _0x20500d(_0x53e82e,_0x4b96e4,_0x51945b,_0x27f730){return _0x2af4(_0x4b96e4-_0x2596a7._0x537398,_0x51945b);}function _0x425be0(_0x2d63f6,_0x5c7ee6,_0x5d8656,_0x585ebd){return _0x2af4(_0x2d63f6- -0x398,_0x585ebd);}const _0x552640=_0x4dd466['summary']??(resolveReasoningVisibility(_0x4a7319)==='user-visible'?_0x20500d(_0x301ff1._0x5aa738,0x373,0x392,0x358):void 0x0);return _0x4dd466[_0x20500d(_0x301ff1._0x7785db,0x37f,0x37f,_0x301ff1._0x5884aa)]&&(_0x36dfc9[_0x425be0(-0x1d8,-_0x301ff1._0x22d76c,-_0x301ff1._0x488741,-0x1ef)]=_0x4dd466[_0x425be0(-_0x301ff1._0x4b54dc,-0x1ed,-0x1bc,-_0x301ff1._0x5db7f6)]),_0x552640&&(_0x36dfc9['summary']=_0x552640),{..._0x4dd466['includeEncryptedContent']===![]?{}:{'include':[_0x20500d(_0x301ff1._0x5880ba,_0x301ff1._0x20d21f,_0x301ff1._0x5880ba,_0x301ff1._0x21a422)]},...Object[_0x425be0(-_0x301ff1._0x2cacc1,-0x1f0,-_0x301ff1._0x41b5db,-_0x301ff1._0xa2f167)](_0x36dfc9)[_0x425be0(-0x1d4,-0x1f0,-0x1ce,-0x1c1)]>0x0?{'reasoning':_0x36dfc9}:{}};}function pushAssistantProviderState(_0x498c68,_0x44f0aa,_0xeefb0a){const _0x4e6775={_0x2c0326:0x1da,_0x17b1f7:0x1c7,_0x4d68b5:0x1a4,_0x2e20e9:0x1d0,_0x517cbc:0x2ac,_0x2e5903:0x28b,_0x514811:0x293,_0xa887c6:0x292,_0x46148d:0x2a4,_0x5587f2:0x1ef,_0x5338f4:0x1fc,_0x1441d5:0x2bf,_0x205033:0x2cd,_0x1ea318:0x2aa,_0x130b05:0x2b8,_0x1f3ca3:0x200,_0x2b87db:0x1e7,_0x3407a4:0x28a,_0x2c3e62:0x1cb,_0x26638a:0x1e0,_0x53d1e7:0x1d5,_0x2c7189:0x1bd};if(_0x44f0aa[_0x53054a(_0x4e6775._0x2c0326,0x1d2,_0x4e6775._0x2c0326,0x1e6)]!==_0x53054a(_0x4e6775._0x17b1f7,_0x4e6775._0x4d68b5,_0x4e6775._0x2e20e9,0x1e0))return![];if(!isProviderStateCompatible(_0x44f0aa,_0xeefb0a))return![];function _0x53054a(_0x2b4bbc,_0x4e06f8,_0x2575bf,_0x2019e3){return _0x2af4(_0x2b4bbc-0x2b,_0x2019e3);}function _0x12b277(_0x344581,_0x5934d0,_0xced41,_0x19024d){return _0x2af4(_0x19024d-0xea,_0x5934d0);}const _0x7fd68d=_0x44f0aa[_0x12b277(_0x4e6775._0x517cbc,0x291,_0x4e6775._0x2e5903,_0x4e6775._0x514811)]?.[_0x12b277(0x2bc,_0x4e6775._0xa887c6,_0x4e6775._0x46148d,0x2a4)]??[];if(_0x7fd68d[_0x53054a(0x1ef,0x1d8,_0x4e6775._0x5587f2,_0x4e6775._0x5338f4)]===0x0)return![];for(const _0xc3eaee of _0x7fd68d){if(isResponseInputObject(_0xc3eaee)){const _0x148fd2=structuredClone(_0xc3eaee);delete _0x148fd2[_0x12b277(_0x4e6775._0x1441d5,0x2b9,0x2af,0x2ab)],_0x148fd2[_0x12b277(_0x4e6775._0x205033,_0x4e6775._0x1ea318,0x2a4,_0x4e6775._0x130b05)]===_0x53054a(_0x4e6775._0x1f3ca3,0x1f7,0x219,_0x4e6775._0x2b87db)&&!Array[_0x12b277(0x2ca,0x2b7,0x2a5,0x2ad)](_0x148fd2[_0x12b277(0x279,0x288,0x276,_0x4e6775._0x3407a4)])&&(_0x148fd2[_0x53054a(_0x4e6775._0x2c3e62,_0x4e6775._0x26638a,_0x4e6775._0x53d1e7,_0x4e6775._0x2c7189)]=[]),_0x498c68['push'](_0x148fd2);}}return!![];}function toOpenAiResponsesRequest(_0x2eb6d4){const _0x3e11b7={_0x532831:0x81,_0x32c616:0x5f,_0x3c79c9:0x57,_0x47021e:0x134,_0x2dea25:0x105,_0x7f3479:0x114,_0x250535:0x48,_0x521619:0x52,_0x49bf2e:0xed,_0x47b15a:0x119,_0x5332ab:0x10a,_0x413cba:0x66,_0x3ca751:0x3b,_0x12bf5b:0x128,_0x1a07b0:0x117,_0x3bb1ee:0xf7,_0x16f059:0x134,_0x29c807:0x110,_0x5c3d42:0x51,_0x100e63:0x69,_0x24c228:0x46,_0x4f1049:0x54,_0x332ae7:0x6a,_0x3187e7:0x82,_0x470233:0x72,_0x183417:0x63,_0xe9846d:0x6b,_0x4ea099:0x12c,_0x4eff50:0x93,_0x3b90c4:0x58,_0x28fd39:0x67,_0xb6a115:0x4d,_0x19767a:0x144,_0x15c1f4:0x145,_0x1dc981:0x122,_0x3a3724:0x41,_0x5865cd:0x4f,_0xb1f7b2:0x61,_0x4ac4fb:0x5b,_0x518d7b:0x6f,_0x199071:0x101,_0x34d098:0xd4,_0x30cdae:0x7e,_0x34a1c2:0x121,_0x5620eb:0x11d,_0x248226:0x13c,_0x5f591a:0x129,_0x332ae1:0x137,_0x1aab07:0x73,_0x1fbf8b:0x6a,_0x473415:0x71,_0x477fb0:0x43,_0x5c15dc:0x10d,_0xe6572e:0x103,_0x5d37ca:0xf5,_0x2165ea:0x104,_0x2f11cf:0xd5,_0x22f0c3:0xef,_0x19709d:0x129,_0x1ab11d:0x10c,_0x37932a:0xf0,_0x5a92e6:0x36,_0x5dbd4a:0x38,_0x121a5e:0x49,_0x1691e9:0x12e,_0x37c647:0x139,_0x497c8c:0x130,_0x425870:0xdf,_0x180f20:0x100,_0x5cfa51:0x14c,_0x14907c:0xec,_0x5c31b9:0x41,_0x340327:0x10d,_0xe69c28:0x106,_0x2b38ea:0x59,_0x2af506:0x4b,_0x26266c:0x2c,_0xae9619:0x39,_0x52506a:0x13d,_0x39aab6:0x126,_0x3ffebb:0x128,_0x1628b1:0xd5,_0x1bcebd:0xed,_0x241ce3:0x107,_0x46d961:0x115,_0x55d502:0xfc,_0x4cfc6f:0x122,_0x28c6e6:0x12b,_0x11deff:0x14a,_0x78a330:0x12f,_0x1f5c36:0x42,_0x410bb0:0x35,_0x482a4e:0x23,_0x16d5ce:0x6e,_0x1a3ffe:0x5c,_0x4276c8:0x7f,_0x320ad7:0x131,_0x4b7060:0x12c,_0x169699:0x104,_0x2a66e7:0x10e,_0x28f292:0x51,_0xb63e3e:0x4f},_0x6871a2={_0x133890:0x258,_0x523555:0x24d,_0xd473d1:0x135,_0x51ed52:0x168,_0x3f9aee:0x266,_0x4e2dc0:0x275},_0x51a0a2={_0x456009:0x20a,_0xdffcd6:0x3d},_0x149202={_0x51db73:0x154},_0x4c0bb7={_0x52f68c:0x2c3},_0x59e7c0=[];function _0x195559(_0x12ee6d,_0x22b786,_0x42ed7c,_0x5b7855){return _0x2af4(_0x5b7855- -_0x4c0bb7._0x52f68c,_0x12ee6d);}function _0x207012(_0x45a266,_0x47048e,_0x376fbc,_0x2ff392){return _0x2af4(_0x45a266- -_0x149202._0x51db73,_0x2ff392);}for(const _0x5e7ab1 of _0x2eb6d4['messages']){if(pushAssistantProviderState(_0x59e7c0,_0x5e7ab1,_0x2eb6d4))continue;const _0x26f615=[];for(const _0x198464 of normalizeContent(_0x5e7ab1['content'])){if(_0x198464[_0x207012(0x7a,_0x3e11b7._0x532831,_0x3e11b7._0x32c616,0x8a)]===_0x207012(_0x3e11b7._0x3c79c9,0x4d,0x45,0x4b)){_0x26f615[_0x195559(-_0x3e11b7._0x47021e,-0x13d,-0x109,-0x129)](_0x5e7ab1[_0x195559(-0x110,-0x120,-_0x3e11b7._0x2dea25,-_0x3e11b7._0x7f3479)]===_0x207012(_0x3e11b7._0x250535,0x50,0x54,_0x3e11b7._0x521619)?{'type':_0x195559(-_0x3e11b7._0x49bf2e,-_0x3e11b7._0x47b15a,-_0x3e11b7._0x5332ab,-0xfa),'text':_0x198464[_0x207012(0x57,0x43,_0x3e11b7._0x413cba,_0x3e11b7._0x3ca751)]}:{'type':_0x195559(-_0x3e11b7._0x12bf5b,-_0x3e11b7._0x1a07b0,-0x117,-0x119),'text':_0x198464[_0x195559(-_0x3e11b7._0x3bb1ee,-_0x3e11b7._0x16f059,-_0x3e11b7._0x29c807,-0x118)]});continue;}if(_0x198464['type']===_0x207012(0x50,_0x3e11b7._0x5c3d42,0x5e,_0x3e11b7._0x100e63)){_0x26f615[_0x207012(_0x3e11b7._0x24c228,0x40,0x3a,_0x3e11b7._0x4f1049)]({'type':_0x207012(_0x3e11b7._0x332ae7,0x89,0x60,_0x3e11b7._0x3187e7),'image_url':_0x207012(_0x3e11b7._0x470233,0x7c,_0x3e11b7._0x183417,_0x3e11b7._0xe9846d)+_0x198464[_0x195559(-0x134,-_0x3e11b7._0x4ea099,-0x11f,-0x122)][_0x207012(0x77,_0x3e11b7._0x4eff50,_0x3e11b7._0x3b90c4,0x73)]+_0x207012(_0x3e11b7._0x28fd39,0x68,_0x3e11b7._0xb6a115,_0x3e11b7._0x250535)+_0x198464[_0x195559(-_0x3e11b7._0x19767a,-_0x3e11b7._0x29c807,-_0x3e11b7._0x15c1f4,-_0x3e11b7._0x1dc981)][_0x207012(_0x3e11b7._0x3a3724,_0x3e11b7._0x5865cd,0x41,_0x3e11b7._0xb1f7b2)]});continue;}pushUserContentMessage(_0x59e7c0,_0x5e7ab1[_0x207012(_0x3e11b7._0x4ac4fb,0x41,0x55,_0x3e11b7._0x518d7b)],_0x26f615[_0x195559(-0xea,-_0x3e11b7._0x199071,-_0x3e11b7._0x34d098,-0xf3)](0x0));if(_0x198464[_0x207012(0x7a,0x5a,_0x3e11b7._0x30cdae,0x7e)]===_0x195559(-_0x3e11b7._0x34a1c2,-0x116,-0x127,-_0x3e11b7._0x5620eb)){if(!hasSerializableToolUse(_0x198464))continue;_0x59e7c0[_0x195559(-0x123,-_0x3e11b7._0x248226,-_0x3e11b7._0x7f3479,-_0x3e11b7._0x5f591a)]({'type':'function_call','call_id':_0x198464['id'],'name':_0x198464[_0x195559(-0x12b,-0x11d,-_0x3e11b7._0x332ae1,-0x131)],'arguments':JSON[_0x207012(_0x3e11b7._0x1aab07,_0x3e11b7._0x1fbf8b,_0x3e11b7._0xb1f7b2,_0x3e11b7._0x473415)](_0x198464[_0x207012(0x65,0x5c,_0x3e11b7._0x477fb0,0x6c)]??{})});continue;}if(_0x198464[_0x195559(-0xd9,-_0x3e11b7._0x5c15dc,-_0x3e11b7._0xe6572e,-_0x3e11b7._0x5d37ca)]===_0x195559(-_0x3e11b7._0x2165ea,-_0x3e11b7._0x2f11cf,-0x10f,-_0x3e11b7._0x22f0c3)){if(!hasSerializableToolResult(_0x198464))continue;const _0x2227cd=getToolResultText(_0x198464['content']);_0x59e7c0[_0x195559(-_0x3e11b7._0x19709d,-0x126,-_0x3e11b7._0x29c807,-_0x3e11b7._0x19709d)]({'type':_0x195559(-0x10b,-_0x3e11b7._0x1ab11d,-0x109,-_0x3e11b7._0x37932a),'call_id':_0x198464[_0x207012(0x49,_0x3e11b7._0x5a92e6,_0x3e11b7._0x5dbd4a,_0x3e11b7._0x121a5e)],'output':_0x2227cd});const _0x5e3575=getToolResultImages(_0x198464[_0x195559(-0x137,-_0x3e11b7._0x1691e9,-_0x3e11b7._0x37c647,-_0x3e11b7._0x497c8c)]);_0x5e3575[_0x195559(-0xe5,-_0x3e11b7._0x425870,-_0x3e11b7._0x180f20,-0xff)]>0x0&&_0x59e7c0[_0x195559(-0x134,-_0x3e11b7._0x5cfa51,-0x149,-0x129)]({'type':'message','role':_0x195559(-0xfe,-0x108,-_0x3e11b7._0x14907c,-0xfe),'content':[{'type':_0x207012(0x56,0x71,0x4b,_0x3e11b7._0x5c31b9),'text':_0x195559(-0xeb,-0x125,-_0x3e11b7._0x340327,-_0x3e11b7._0xe69c28)+_0x198464[_0x207012(0x49,_0x3e11b7._0x2b38ea,0x47,_0x3e11b7._0x2af506)]+'.'},..._0x5e3575[_0x207012(0x42,_0x3e11b7._0x26266c,0x51,_0x3e11b7._0xae9619)](_0x2c8778=>({'type':_0x207012(0x6a,0x54,0x83,0x53),'image_url':_0x195559(-0x113,-0xed,-0x101,-0xfd)+_0x2c8778[_0x195559(-0x102,-0x12e,-0x128,-0x122)][_0x207012(0x77,0x65,0x57,0x5f)]+';base64,'+_0x2c8778[_0x195559(-0x10c,-0x13c,-0x121,-0x122)][_0x207012(0x41,0x46,0x50,0x35)]}))]});}}pushUserContentMessage(_0x59e7c0,_0x5e7ab1[_0x207012(0x5b,0x59,0x5d,0x4d)],_0x26f615);}return{...createOpenAiResponsesReasoning(_0x2eb6d4),'model':_0x2eb6d4[_0x195559(-_0x3e11b7._0x52506a,-_0x3e11b7._0x39aab6,-0x10f,-_0x3e11b7._0x3ffebb)],'instructions':systemToInstructions(_0x2eb6d4[_0x195559(-0xf2,-_0x3e11b7._0x1628b1,-0xdb,-_0x3e11b7._0x1bcebd)]),'input':_0x59e7c0,..._0x2eb6d4[_0x195559(-_0x3e11b7._0x241ce3,-0x112,-0x106,-_0x3e11b7._0x46d961)]!==void 0x0?{'max_output_tokens':_0x2eb6d4[_0x195559(-_0x3e11b7._0x55d502,-0x125,-_0x3e11b7._0x4cfc6f,-0x115)]}:{},'tools':_0x2eb6d4[_0x195559(-_0x3e11b7._0x28c6e6,-0x144,-_0x3e11b7._0x11deff,-_0x3e11b7._0x78a330)][_0x207012(_0x3e11b7._0x1f5c36,_0x3e11b7._0x3ca751,_0x3e11b7._0x410bb0,0x43)](_0x21b189=>{const _0x42a113={_0x5f5798:0xeb};function _0x56040f(_0x486cfe,_0x4d73b9,_0x41ae5a,_0xf61703){return _0x207012(_0x41ae5a-_0x51a0a2._0x456009,_0x4d73b9-_0x51a0a2._0xdffcd6,_0x41ae5a-0x166,_0x4d73b9);}function _0x164743(_0x54c77a,_0x437443,_0x36934d,_0x17312d){return _0x207012(_0x36934d-0x108,_0x437443-_0x42a113._0x5f5798,_0x36934d-0x6c,_0x17312d);}return{'type':_0x56040f(0x235,0x236,_0x6871a2._0x133890,_0x6871a2._0x523555),'name':_0x21b189[_0x164743(_0x6871a2._0xd473d1,_0x6871a2._0x51ed52,0x146,0x127)],'description':_0x21b189['description'],'parameters':_0x21b189[_0x56040f(_0x6871a2._0x3f9aee,0x257,_0x6871a2._0x4e2dc0,0x284)]};}),..._0x2eb6d4[_0x207012(0x43,_0x3e11b7._0x482a4e,_0x3e11b7._0x1f5c36,_0x3e11b7._0xae9619)]?{'text':{'format':{'type':_0x207012(_0x3e11b7._0x16d5ce,_0x3e11b7._0x1a3ffe,_0x3e11b7._0x4276c8,0x6b),'name':_0x2eb6d4[_0x195559(-_0x3e11b7._0x320ad7,-0x129,-0x147,-_0x3e11b7._0x4b7060)]['name']??_0x195559(-0xf1,-0xf2,-_0x3e11b7._0x169699,-_0x3e11b7._0x2a66e7),'schema':_0x2eb6d4[_0x195559(-0x12e,-0x135,-0x143,-_0x3e11b7._0x4b7060)][_0x207012(_0x3e11b7._0x28f292,0x50,0x70,0x5a)],'strict':_0x2eb6d4[_0x207012(_0x3e11b7._0x477fb0,0x4a,0x66,_0x3e11b7._0xb63e3e)]['strict']??!![]}}}:{}};}export{toOpenAiResponsesRequest};
@@ -1 +0,0 @@
1
- (function(_0x20b5da,_0x37e9d6){var _0x6a2051={_0x3ece8a:0x2fa,_0x1029f9:0x2f6,_0x6d7be4:0xaa,_0x33fffa:0xaf,_0x3e1f89:0xb0,_0x518fa2:0x308,_0x246125:0x308,_0x30b8b0:0x2f3,_0x1a7a7a:0x2fb,_0x48b9b3:0xb5,_0xdcf545:0xae,_0xefd377:0x2ff,_0xe34a23:0x2fe,_0x3dd38e:0x301,_0x4374ab:0x308,_0xdb440a:0x304,_0x2ef961:0xa5,_0x1bdd2f:0xb4};function _0x3ed818(_0x1b48ae,_0x513968,_0x31ca3d,_0x360b0e){return _0x4c0a(_0x31ca3d-0x204,_0x360b0e);}function _0x6e586b(_0x5af31d,_0x3f1304,_0x197b65,_0x175ddd){return _0x4c0a(_0x3f1304- -0x1aa,_0x5af31d);}var _0x43c116=_0x20b5da();while(!![]){try{var _0x853a6e=-parseInt(_0x3ed818(_0x6a2051._0x3ece8a,0x2fe,_0x6a2051._0x1029f9,0x2f2))/0x1*(parseInt(_0x6e586b(-_0x6a2051._0x6d7be4,-_0x6a2051._0x33fffa,-_0x6a2051._0x3e1f89,-0xae))/0x2)+-parseInt(_0x3ed818(_0x6a2051._0x518fa2,0x307,0x305,_0x6a2051._0x246125))/0x3*(parseInt(_0x3ed818(_0x6a2051._0x30b8b0,0x300,_0x6a2051._0x1a7a7a,0x303))/0x4)+-parseInt(_0x6e586b(-0xae,-0xb4,-0xb9,-0xb5))/0x5+parseInt(_0x6e586b(-_0x6a2051._0x48b9b3,-_0x6a2051._0xdcf545,-0xab,-_0x6a2051._0x3e1f89))/0x6+parseInt(_0x6e586b(-0xba,-0xb5,-0xb5,-0xad))/0x7*(-parseInt(_0x3ed818(_0x6a2051._0xefd377,0x305,_0x6a2051._0xe34a23,_0x6a2051._0xefd377))/0x8)+parseInt(_0x3ed818(0x2f6,0x2fd,0x2fc,_0x6a2051._0x3dd38e))/0x9*(-parseInt(_0x3ed818(0x309,_0x6a2051._0x4374ab,_0x6a2051._0xdb440a,0x300))/0xa)+parseInt(_0x6e586b(-_0x6a2051._0x2ef961,-0xac,-_0x6a2051._0x1bdd2f,-0xb1))/0xb;if(_0x853a6e===_0x37e9d6)break;else _0x43c116['push'](_0x43c116['shift']());}catch(_0x3f5fd6){_0x43c116['push'](_0x43c116['shift']());}}}(_0x40e6,0x40def));var ANTHROPIC_AUTO_BUDGET_TOKENS={'low':0x400,'medium':0x800,'high':0x1000};function mapAutoReasoningEffortToBudgetTokens(_0x108a57){return ANTHROPIC_AUTO_BUDGET_TOKENS[_0x108a57];}function _0x40e6(){var _0x55cec8=['mtKYodi0A3fvvKzH','mMjXvxfRyq','mJK4nZK2neTmrurPvW','B3bLBMfP','mtCYmtC1ntjbsg13B3C','zw5HyMXLza','mJb4Aen3zLG','mJfUzuvHy0G','mJyXotqZwLzwCxnJ','yxv0BW','yw50AhjVCgLJ','ndLgrNLeywK','mJmZmde3mej6Eu9iCq','mJq4mZK2r3DKshvp','mJa5nZu1ogjMrKjxDG','zwzMB3j0'];_0x40e6=function(){return _0x55cec8;};return _0x40e6();}function resolveAnthropicThinkingConfig(_0x451590){var _0x1b42a6={_0x796ef6:0x144,_0x440321:0x1e1,_0x19c064:0x1df,_0x4b1a2f:0x1de,_0x141e1d:0x1e5,_0x9ea60b:0x1eb,_0x21539e:0x1ed,_0x228d09:0x14a,_0x1a2814:0x13c,_0x5ea913:0x13f},_0x3fadad={_0x19ad51:0x4b};if(!_0x451590)return void 0x0;if(_0x451590[_0x48f6f6(0x145,_0x1b42a6._0x796ef6,0x13f,0x141)])return structuredClone(_0x451590['anthropic']);function _0x48f6f6(_0x3f23f2,_0x2ab24a,_0x5368a9,_0x3087d1){return _0x4c0a(_0x5368a9-_0x3fadad._0x19ad51,_0x3f23f2);}if(!_0x451590[_0x2d77d4(_0x1b42a6._0x440321,_0x1b42a6._0x19c064,_0x1b42a6._0x4b1a2f,_0x1b42a6._0x141e1d)])return void 0x0;function _0x2d77d4(_0x5e0317,_0x390a0d,_0xca607f,_0x5cd4a2){return _0x4c0a(_0x390a0d-0xec,_0x5cd4a2);}return{'type':_0x2d77d4(0x1ec,_0x1b42a6._0x9ea60b,_0x1b42a6._0x21539e,0x1e8),'budgetTokens':mapAutoReasoningEffortToBudgetTokens(_0x451590['auto'][_0x48f6f6(_0x1b42a6._0x228d09,_0x1b42a6._0x1a2814,0x144,_0x1b42a6._0x5ea913)])};}function resolveOpenAiReasoningConfig(_0x3c715){var _0x292501={_0x19e956:0x110,_0x1536c2:0x104,_0x4cbcb3:0x11a,_0x4d6691:0x115};if(!_0x3c715)return void 0x0;const _0x158d8b=_0x3c715['auto']?{'effort':_0x3c715[_0xb5e427(_0x292501._0x19e956,0x10d,0x10b,_0x292501._0x1536c2)]['effort']}:void 0x0;function _0xb5e427(_0x19a375,_0x302c2e,_0x1932c4,_0x941549){return _0x4c0a(_0x1932c4-0x18,_0x19a375);}if(!_0x3c715['openai'])return _0x158d8b;function _0x31509d(_0x209883,_0x118955,_0x30a198,_0x57491b){return _0x4c0a(_0x209883- -0x34c,_0x30a198);}return{..._0x158d8b??{},...structuredClone(_0x3c715[_0xb5e427(0x110,_0x292501._0x4cbcb3,_0x292501._0x4d6691,0x116)])};}function _0x4c0a(_0x1d464a,_0xa09cac){_0x1d464a=_0x1d464a-0xf2;var _0x40e6dc=_0x40e6();var _0x4c0ab9=_0x40e6dc[_0x1d464a];if(_0x4c0a['jfNiCr']===undefined){var _0x226fee=function(_0xb3232e){var _0x5e2ba5='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';var _0x108a57='',_0x451590='';for(var _0x3c715=0x0,_0x158d8b,_0x119131,_0x182fe6=0x0;_0x119131=_0xb3232e['charAt'](_0x182fe6++);~_0x119131&&(_0x158d8b=_0x3c715%0x4?_0x158d8b*0x40+_0x119131:_0x119131,_0x3c715++%0x4)?_0x108a57+=String['fromCharCode'](0xff&_0x158d8b>>(-0x2*_0x3c715&0x6)):0x0){_0x119131=_0x5e2ba5['indexOf'](_0x119131);}for(var _0x8b0238=0x0,_0x5e04de=_0x108a57['length'];_0x8b0238<_0x5e04de;_0x8b0238++){_0x451590+='%'+('00'+_0x108a57['charCodeAt'](_0x8b0238)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x451590);};_0x4c0a['IupyNF']=_0x226fee,_0x4c0a['LUvbvc']={},_0x4c0a['jfNiCr']=!![];}var _0x42c4ca=_0x40e6dc[0x0],_0x13ac8d=_0x1d464a+_0x42c4ca,_0x37ea53=_0x4c0a['LUvbvc'][_0x13ac8d];return!_0x37ea53?(_0x4c0ab9=_0x4c0a['IupyNF'](_0x4c0ab9),_0x4c0a['LUvbvc'][_0x13ac8d]=_0x4c0ab9):_0x4c0ab9=_0x37ea53,_0x4c0ab9;}export{mapAutoReasoningEffortToBudgetTokens,resolveAnthropicThinkingConfig,resolveOpenAiReasoningConfig};
@@ -1 +0,0 @@
1
- (function(_0x12de68,_0x1d3b72){const _0x249d2d={_0x405150:0x49c,_0x5bd1ba:0x491,_0x23b2e2:0x4af,_0xa96ed7:0x4ca,_0x1a7043:0x4c0,_0xed3e48:0x1b9,_0xb7af16:0x19b,_0x225097:0x1ad,_0x284d9f:0x195,_0x24d964:0x1c2,_0x55a739:0x1a8,_0x32b6ec:0x1a1,_0xb16c3d:0x46f,_0x5d84c8:0x48e,_0x475951:0x4a7,_0x306e4b:0x480,_0x1e6abb:0x47f,_0x356968:0x4a0,_0x1275e7:0x48a,_0x26005f:0x49e,_0x501971:0x47e};function _0x41ef3d(_0x5e5a5a,_0xeec072,_0x2670bc,_0x1ad1bd){return _0x2e87(_0x5e5a5a-0x324,_0x2670bc);}function _0x3c9986(_0x1acde5,_0x257c21,_0x3fe4ce,_0x1c9605){return _0x2e87(_0x3fe4ce-0x32,_0x257c21);}const _0x5470e5=_0x12de68();while(!![]){try{const _0x407274=parseInt(_0x41ef3d(_0x249d2d._0x405150,0x4a3,0x48e,_0x249d2d._0x5bd1ba))/0x1+parseInt(_0x41ef3d(_0x249d2d._0x23b2e2,0x4ab,_0x249d2d._0xa96ed7,_0x249d2d._0x1a7043))/0x2*(-parseInt(_0x3c9986(0x19f,0x1a6,0x1b6,_0x249d2d._0xed3e48))/0x3)+parseInt(_0x3c9986(_0x249d2d._0xb7af16,0x1c7,_0x249d2d._0x225097,_0x249d2d._0x284d9f))/0x4+-parseInt(_0x3c9986(_0x249d2d._0x24d964,0x1b6,_0x249d2d._0x55a739,_0x249d2d._0x32b6ec))/0x5+-parseInt(_0x41ef3d(0x487,_0x249d2d._0xb16c3d,_0x249d2d._0x5d84c8,0x48a))/0x6+parseInt(_0x41ef3d(0x495,_0x249d2d._0x475951,_0x249d2d._0x306e4b,_0x249d2d._0x1e6abb))/0x7+parseInt(_0x41ef3d(_0x249d2d._0x356968,_0x249d2d._0x1275e7,_0x249d2d._0x26005f,0x497))/0x8*(parseInt(_0x41ef3d(_0x249d2d._0x501971,_0x249d2d._0x501971,0x471,0x45f))/0x9);if(_0x407274===_0x1d3b72)break;else _0x5470e5['push'](_0x5470e5['shift']());}catch(_0x1c54ff){_0x5470e5['push'](_0x5470e5['shift']());}}}(_0x4998,0x43d3b));function createTextBlock(_0x2dbf9c){const _0x23d409={_0x4ebb99:0x1ff,_0x2ae580:0x1f4,_0x400d7c:0x1ed},_0xfca666={_0x34a217:0x67};function _0x3a69ec(_0x26a029,_0x587db3,_0x1ac5ac,_0x4b3bd2){return _0x2e87(_0x4b3bd2-_0xfca666._0x34a217,_0x587db3);}return{'type':_0x3a69ec(_0x23d409._0x4ebb99,0x202,_0x23d409._0x2ae580,_0x23d409._0x400d7c),'text':_0x2dbf9c};}function _0x2e87(_0x1a069d,_0xdc5d80){_0x1a069d=_0x1a069d-0x157;const _0x499837=_0x4998();let _0x2e87ec=_0x499837[_0x1a069d];if(_0x2e87['EmPund']===undefined){var _0x271516=function(_0x3bee63){const _0x1d47af='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x2dbf9c='',_0x165792='';for(let _0x3cc96e=0x0,_0x5c1279,_0x1f753f,_0x13655e=0x0;_0x1f753f=_0x3bee63['charAt'](_0x13655e++);~_0x1f753f&&(_0x5c1279=_0x3cc96e%0x4?_0x5c1279*0x40+_0x1f753f:_0x1f753f,_0x3cc96e++%0x4)?_0x2dbf9c+=String['fromCharCode'](0xff&_0x5c1279>>(-0x2*_0x3cc96e&0x6)):0x0){_0x1f753f=_0x1d47af['indexOf'](_0x1f753f);}for(let _0x4bd052=0x0,_0x388456=_0x2dbf9c['length'];_0x4bd052<_0x388456;_0x4bd052++){_0x165792+='%'+('00'+_0x2dbf9c['charCodeAt'](_0x4bd052)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x165792);};_0x2e87['KbNwMT']=_0x271516,_0x2e87['SbRtVF']={},_0x2e87['EmPund']=!![];}const _0x24b31c=_0x499837[0x0],_0x1ad654=_0x1a069d+_0x24b31c,_0x3b77d9=_0x2e87['SbRtVF'][_0x1ad654];return!_0x3b77d9?(_0x2e87ec=_0x2e87['KbNwMT'](_0x2e87ec),_0x2e87['SbRtVF'][_0x1ad654]=_0x2e87ec):_0x2e87ec=_0x3b77d9,_0x2e87ec;}function normalizeTextBlock(_0x165792){const _0x475cbf={_0x47713d:0x2f6,_0x5e5666:0x2d2},_0x523ae3={_0x3baa1f:0x169};function _0x35ebd7(_0x292daa,_0xd0a2d1,_0x5d35c9,_0xbfd050){return _0x2e87(_0x292daa-_0x523ae3._0x3baa1f,_0xd0a2d1);}return createTextBlock(_0x165792[_0x35ebd7(0x2ef,_0x475cbf._0x47713d,_0x475cbf._0x5e5666,0x2d9)]??'');}function normalizeContent(_0x3cc96e){const _0x4e8cbb={_0x559aa7:0x312,_0x4729b1:0x322},_0x3bbb33={_0x46c115:0x86,_0x5d7657:0x80},_0x25dca1={_0x5618db:0x3ab},_0x21be0b={_0x385e16:0x1a5};function _0x27488f(_0x5e3086,_0x52bbe3,_0x5cb7e4,_0x58ffba){return _0x2e87(_0x58ffba-_0x21be0b._0x385e16,_0x52bbe3);}if(typeof _0x3cc96e==='string')return[createTextBlock(_0x3cc96e)];function _0x426537(_0x1455af,_0x3760d6,_0x1812e0,_0x4fa05f){return _0x2e87(_0x4fa05f-0x166,_0x3760d6);}if(!Array[_0x426537(0x311,_0x4e8cbb._0x559aa7,0x2ea,0x2f2)](_0x3cc96e))return[];return _0x3cc96e[_0x27488f(0x31c,0x315,_0x4e8cbb._0x4729b1,0x333)](_0x5c1279=>{function _0x58ffda(_0x5e41b5,_0x45958a,_0x2e9271,_0xc878b){return _0x27488f(_0x5e41b5-0xa1,_0xc878b,_0x2e9271-0x1e3,_0x2e9271- -_0x25dca1._0x5618db);}if(_0x5c1279['type']===_0x58ffda(-0x8d,-_0x3bbb33._0x46c115,-_0x3bbb33._0x5d7657,-0x6a))return normalizeTextBlock(_0x5c1279);return structuredClone(_0x5c1279);});}function _0x4998(){const _0x589cb9=['B3v0Chv0rM9YBwf0','mtGXmJe4nM9YuNzyua','C3rHDhvZ','DhLWzq','CMvHC29UAw5Nx3rVA2vUCW','C3vTBwfYEq','C3rYAw5N','Bw9KzwXFAwrLBNrPDhK','ChjVDMLKzxjtDgf0zq','zw5JCNLWDgvKq29UDgvUDa','ywrK','Bwv0ywrHDge','C3rVCfjLyxnVBG','kgvUy3j5ChrLzcbYzwfZB25PBMCP','Bwf4x3rVA2vUCW','nJC0ote5sLzrALHW','C2vZC2LVBL9Pza','Dg9VBf9Yzxn1Bhq','yw50AhjVCgLJx3jLzgfJDgvKx3rOAw5RAw5N','B3bLBMfPx3jLyxnVBMLUzW','mJqWodm4nw1RquDowa','B3v0Chv0','ntm2mdi0z1HSBw5Y','C2vZC2LVBKLK','BgvUz3rO','otKXntuYsuL5tvzi','mJGWD3bqzwnL','DxnHz2u','Bwf4vg9Rzw5Z','zxjYB3i','DhjPBq','zMLSDgvY','DxnLCG','Aw5WDxrFDg9Rzw5Z','mJqWovHfy3HsyG','AM9PBG','Dgv4Da','Dg9VBhm','Bw9KzwW','B3v0Chv0vg9Rzw5Z','Bw9KzwXjzgvUDgL0Eq','mtaXohbHsMvfyq','AxnbCNjHEq','CMvHC29UAw5Nvg9Rzw5Z','BwfW','Dg9VBf91C2u','khjLzgfJDgvKihjLyxnVBMLUzYK','DhvYBKLK','DhvYBL9Pza','y2XHDwrLlxnVBM5LDc00ltiWmJuWnte0','yw50AhjVCgLJx3rOAw5RAw5N','CMvHC29UAw5N','yxnZAxn0yw50','C3LZDgvT','ChvZAa','mtuXnJK1wLLqrwfp','Aw5WDxruB2TLBNm','DgHPBMTPBMC','vg9VBcbLEgvJDxrPB24GD2fZigLUDgvYCNvWDgvKigjLzM9YzsbJB21WBgv0Aw9UigfUzcbWCM9KDwnLzcbUBYbYzxn1BhqU','zMXHDe1HCa','B3v0Chv0x3rVA2vUCW','BwvZC2fNzxm','y29UDgvUDa'];_0x4998=function(){return _0x589cb9;};return _0x4998();}function normalizeSystem(_0x1f753f=[]){const _0x435594={_0x1801f2:0x460,_0x58589a:0x463},_0x2069ed={_0x1887f1:0x2df};function _0x384311(_0x903692,_0x39acdc,_0x21b994,_0x1be0d6){return _0x2e87(_0x39acdc- -0x3cb,_0x903692);}function _0x195252(_0x39e25b,_0x5f0356,_0x123dde,_0x2b8259){return _0x2e87(_0x39e25b-_0x2069ed._0x1887f1,_0x123dde);}return normalizeContent(_0x1f753f)[_0x195252(_0x435594._0x1801f2,0x452,0x477,_0x435594._0x58589a)](_0x13655e=>_0x13655e[_0x195252(0x444,0x446,0x447,0x45e)]===_0x195252(0x465,0x45b,0x478,0x476));}function isProviderStateCompatible(_0x4bd052,_0x388456){const _0x3d2ec4={_0x1872c7:0x305,_0x5eb6f9:0x2ef,_0x244f5c:0x2dd,_0x4269c8:0x24c,_0x2da535:0x24c,_0x23a404:0x235},_0x2be3e4=_0x4bd052[_0x44e0f1(0x30d,0x30b,_0x3d2ec4._0x1872c7,_0x3d2ec4._0x5eb6f9)]?.['originModelIdentity'];function _0x2e929f(_0x42f2a8,_0x563f19,_0x3d4e16,_0x2f922f){return _0x2e87(_0x3d4e16- -0x3d6,_0x42f2a8);}function _0x44e0f1(_0x42c683,_0x39c2da,_0x288ab6,_0x4ea111){return _0x2e87(_0x4ea111-0x185,_0x288ab6);}return _0x2be3e4===void 0x0||_0x2be3e4===_0x388456[_0x44e0f1(0x30c,_0x3d2ec4._0x244f5c,0x2dd,0x2f2)][_0x2e929f(-_0x3d2ec4._0x4269c8,-0x248,-_0x3d2ec4._0x2da535,-_0x3d2ec4._0x23a404)]||_0x2be3e4===_0x388456[_0x2e929f(-0x244,-0x239,-0x24e,-0x240)];}function normalizeMessage(_0x2aa13f){const _0x5f545b={_0x15727b:0x469,_0x3b5174:0x477,_0x20e104:0x175,_0x18dc12:0x155,_0x501166:0x171,_0x4f5669:0x46f,_0x1e4213:0x487,_0x1a9041:0x47e},_0x3d931f={_0x2e2075:0x2ba};function _0x15dbe1(_0x4b0e53,_0x35bbfb,_0x5abe43,_0x34780e){return _0x2e87(_0x4b0e53- -_0x3d931f._0x2e2075,_0x34780e);}function _0x3b6ce5(_0x3cf4cc,_0x4b792d,_0x54d185,_0x186323){return _0x2e87(_0x54d185-0x305,_0x3cf4cc);}return{...typeof _0x2aa13f['id']===_0x3b6ce5(0x486,_0x5f545b._0x15727b,0x46d,_0x5f545b._0x3b5174)?{'id':_0x2aa13f['id']}:{},'role':_0x2aa13f['role'],'content':normalizeContent(_0x2aa13f[_0x15dbe1(-0x159,-_0x5f545b._0x20e104,-_0x5f545b._0x18dc12,-_0x5f545b._0x501166)]),..._0x2aa13f[_0x3b6ce5(0x47a,0x47d,_0x5f545b._0x4f5669,_0x5f545b._0x1e4213)]?{'providerState':structuredClone(_0x2aa13f[_0x3b6ce5(0x44f,_0x5f545b._0x1a9041,0x46f,0x450)])}:{}};}function compileRequest(_0x4af3f1){const _0x5afe13={_0x42abe5:0x104,_0xb43435:0xef,_0x12045c:0x4a3,_0x56c681:0x498,_0x4e849f:0x4ae,_0x4d7311:0xea,_0xcbcf01:0x108,_0x5df437:0xdd,_0x5bb733:0xf4,_0x27eb69:0xd6,_0x2890f2:0x142,_0x220c91:0x131,_0x182f32:0x146,_0x13da05:0x14d,_0x3a535c:0x44d,_0x11261b:0x47b,_0x4a4d91:0x465,_0x12bc21:0x471,_0x56d46e:0xf8,_0x1c59c1:0xf9,_0xcaa74d:0xfc,_0x361507:0x128,_0x5b2a1c:0x105,_0x214c49:0x110,_0x355490:0x4b0,_0x22bdcf:0x480,_0x5f0e70:0x496},_0x4706b1={_0x4f9543:0x305},_0x410ab7={_0x305075:0x289};function _0x5d2ad2(_0x516a12,_0x13478a,_0x5805da,_0xc3f3e0){return _0x2e87(_0x13478a- -_0x410ab7._0x305075,_0xc3f3e0);}function _0x141114(_0x533736,_0x363f1b,_0x1ca839,_0x44a447){return _0x2e87(_0x1ca839-_0x4706b1._0x4f9543,_0x533736);}return{'model':_0x4af3f1[_0x5d2ad2(-_0x5afe13._0x42abe5,-0x101,-0xe6,-_0x5afe13._0xb43435)]??_0x141114(0x49a,_0x5afe13._0x12045c,_0x5afe13._0x56c681,_0x5afe13._0x4e849f),..._0x4af3f1['max_tokens']!==void 0x0?{'max_tokens':_0x4af3f1['max_tokens']}:{},..._0x4af3f1[_0x5d2ad2(-_0x5afe13._0x4d7311,-0xf4,-_0x5afe13._0xcbcf01,-0x111)]?{'reasoning':structuredClone(_0x4af3f1[_0x5d2ad2(-_0x5afe13._0x5df437,-_0x5afe13._0x5bb733,-0x110,-_0x5afe13._0x27eb69)])}:{},'system':normalizeSystem(_0x4af3f1[_0x5d2ad2(-_0x5afe13._0x2890f2,-_0x5afe13._0x220c91,-_0x5afe13._0x182f32,-_0x5afe13._0x13da05)]),'messages':_0x4af3f1[_0x141114(_0x5afe13._0x3a535c,_0x5afe13._0x11261b,_0x5afe13._0x4a4d91,_0x5afe13._0x12bc21)][_0x5d2ad2(-_0x5afe13._0x56d46e,-0xfb,-_0x5afe13._0x1c59c1,-_0x5afe13._0xcaa74d)](normalizeMessage),'tools':structuredClone(_0x4af3f1['tools']??[]),'metadata':{'session_id':_0x4af3f1[_0x5d2ad2(-_0x5afe13._0x361507,-0x110,-_0x5afe13._0x5b2a1c,-_0x5afe13._0x214c49)],'turn_id':_0x4af3f1[_0x141114(_0x5afe13._0x355490,_0x5afe13._0x22bdcf,_0x5afe13._0x5f0e70,0x486)]}};}function toChatRequest(_0x279ac4){const _0x11a172={_0x1aae89:0xff,_0x181b95:0xe0,_0x452240:0xfd,_0xb7c404:0x169,_0x389376:0x19a,_0x3aef42:0xc5,_0x34f415:0xbd,_0x33b91d:0xd3,_0x313d99:0x170,_0x1526d1:0xe6,_0x2e21ae:0xe1,_0x4fd7b3:0xec,_0x3e515f:0xdc,_0x46254b:0xfb,_0x595516:0xde,_0x92747b:0x188,_0x505f9e:0x18a,_0x473ae1:0x199,_0x52effe:0xff,_0x978ebe:0x175,_0x12a4db:0x15d};function _0x495ea3(_0x203864,_0x2a1d3f,_0xe4d03,_0x58033d){return _0x2e87(_0x2a1d3f-0x13,_0x58033d);}function _0xe8e25e(_0x23b3a7,_0x24d78e,_0x3877b3,_0x2bc3a1){return _0x2e87(_0x24d78e- -0x268,_0x3877b3);}return{'model':_0x279ac4[_0xe8e25e(-_0x11a172._0x1aae89,-_0x11a172._0x181b95,-0xf6,-_0x11a172._0x452240)],..._0x279ac4['max_tokens']!==void 0x0?{'maxTokens':_0x279ac4[_0x495ea3(_0x11a172._0xb7c404,0x183,_0x11a172._0x389376,0x164)]}:{},..._0x279ac4[_0xe8e25e(-_0x11a172._0x3aef42,-0xd3,-0xb4,-0xdd)]?{'reasoning':structuredClone(_0x279ac4[_0xe8e25e(-0xda,-0xd3,-_0x11a172._0x34f415,-_0x11a172._0x33b91d)])}:{},'system':structuredClone(_0x279ac4['system']),'messages':structuredClone(_0x279ac4[_0x495ea3(_0x11a172._0x313d99,0x173,0x183,0x17c)]),'tools':structuredClone(_0x279ac4[_0xe8e25e(-_0x11a172._0x1526d1,-_0x11a172._0x2e21ae,-0xf3,-0xd8)]),'metadata':{'sessionId':_0x279ac4[_0xe8e25e(-_0x11a172._0x2e21ae,-0xfb,-0xdc,-_0x11a172._0x4fd7b3)][_0xe8e25e(-0x107,-0xf6,-0x105,-_0x11a172._0x3e515f)],'turnId':_0x279ac4[_0xe8e25e(-0x106,-_0x11a172._0x46254b,-_0x11a172._0x595516,-0xef)][_0x495ea3(_0x11a172._0x92747b,0x1a5,0x1bd,0x189)],..._0x279ac4[_0x495ea3(0x16d,0x180,_0x11a172._0x505f9e,_0x11a172._0x473ae1)]['model_identity']!==void 0x0?{'modelIdentity':_0x279ac4['metadata'][_0xe8e25e(-0x108,-_0x11a172._0x52effe,-_0x11a172._0x46254b,-0xe8)]}:{}},..._0x279ac4[_0x495ea3(0x15b,_0x11a172._0x978ebe,_0x11a172._0x12a4db,0x18d)]?{'outputFormat':structuredClone(_0x279ac4['outputFormat'])}:{}};}function _0x167871(_0x57110f,_0x2ad636,_0x53ae35,_0xd8b795){const _0x512df8={_0x3555b5:0x183};return _0x2e87(_0x53ae35-_0x512df8._0x3555b5,_0x2ad636);}function toModelRequest(_0x12a5c8){const _0xbc4c97={_0x2ac81:0x1a,_0x12ef61:0x2d,_0xcb45e3:0x9,_0x3caefe:0x14,_0x1a2b25:0xc,_0x1954e7:0x27,_0x21a08f:0x2b,_0xdee76a:0x544,_0x2090b1:0x543,_0x5076b8:0x54a,_0x2f5c48:0x536,_0x246849:0x539,_0x352909:0x541,_0x3aa9cd:0x53a,_0x34ca87:0x542,_0x4b2720:0x548,_0x3cf470:0x559,_0x255be3:0x559,_0x35dee5:0x2,_0x4e0e0a:0x10,_0x4e8f90:0xd,_0x4ec87d:0x52b};function _0x3fa9b9(_0x4bf823,_0x49a35f,_0x48d913,_0x2e9e71){return _0x2e87(_0x4bf823- -0x164,_0x2e9e71);}function _0xd6f902(_0x1f6d2d,_0x22992b,_0x4d0f27,_0x465e85){return _0x2e87(_0x465e85-0x3c9,_0x22992b);}return{'model':_0x12a5c8['model'],..._0x12a5c8[_0x3fa9b9(_0xbc4c97._0x2ac81,0x34,_0xbc4c97._0x12ef61,0xf)]!==void 0x0?{'max_tokens':_0x12a5c8[_0x3fa9b9(0x1a,_0xbc4c97._0xcb45e3,0x2f,_0xbc4c97._0x3caefe)]}:{},..._0x12a5c8['reasoning']?{'reasoning':structuredClone(_0x12a5c8['reasoning'])}:{},'system':structuredClone(_0x12a5c8[_0x3fa9b9(-_0xbc4c97._0x1a2b25,-_0xbc4c97._0x1954e7,-_0xbc4c97._0x21a08f,0xa)]),'messages':structuredClone(_0x12a5c8['messages']),'tools':structuredClone(_0x12a5c8[_0xd6f902(0x55c,_0xbc4c97._0xdee76a,_0xbc4c97._0x2090b1,0x550)]),'metadata':{'session_id':_0x12a5c8[_0xd6f902(0x53d,0x518,_0xbc4c97._0x5076b8,_0xbc4c97._0x2f5c48)][_0xd6f902(_0xbc4c97._0x246849,_0xbc4c97._0x352909,_0xbc4c97._0x3aa9cd,_0xbc4c97._0x34ca87)],'turn_id':_0x12a5c8[_0xd6f902(0x529,_0xbc4c97._0x2090b1,_0xbc4c97._0x4b2720,_0xbc4c97._0x2f5c48)]['turnId'],..._0x12a5c8['metadata'][_0xd6f902(_0xbc4c97._0x3cf470,0x555,_0xbc4c97._0x255be3,0x553)]!==void 0x0?{'model_identity':_0x12a5c8['metadata']['modelIdentity']}:{}},..._0x12a5c8[_0x3fa9b9(-_0xbc4c97._0x35dee5,_0xbc4c97._0x4e0e0a,-_0xbc4c97._0x2ac81,-_0xbc4c97._0x4e8f90)]?{'outputFormat':structuredClone(_0x12a5c8[_0xd6f902(0x540,0x540,0x525,_0xbc4c97._0x4ec87d)])}:{}};}function toProviderModelRequest(_0x3428e9){const _0x162968={_0xd50de4:0x14c,_0x4c4b68:0x18b,_0xba9613:0x19b,_0x2690ba:0x195,_0x13fdf7:0x10a,_0x18da39:0x13d,_0x422459:0x138,_0xfcbac5:0x131},_0x3492e1={_0x59db81:0x1};function _0x3fd545(_0x39aec0,_0x4a2d31,_0x260f49,_0x5f17d2){return _0x2e87(_0x39aec0-_0x3492e1._0x59db81,_0x260f49);}function _0x3c670d(_0x228948,_0x264a36,_0x226685,_0x4045f2){return _0x2e87(_0x226685- -0x56,_0x4045f2);}return{'model':_0x3428e9[_0x3c670d(0x12a,0x137,0x132,_0x162968._0xd50de4)],..._0x3428e9[_0x3fd545(0x17f,_0x162968._0x4c4b68,_0x162968._0xba9613,_0x162968._0x2690ba)]!==void 0x0?{'max_tokens':_0x3428e9['maxTokens']}:{},'system':structuredClone(_0x3428e9['system']),'messages':structuredClone(_0x3428e9[_0x3c670d(0xf3,0x118,_0x162968._0x13fdf7,0x121)]),'tools':structuredClone(_0x3428e9[_0x3c670d(_0x162968._0x18da39,_0x162968._0x422459,_0x162968._0xfcbac5,0x130)])};}function toChatResponse(_0xb3eda7){const _0x45afa2={_0x5c5d95:0x412,_0x59c5e5:0x44a,_0x174e06:0x469,_0x4e90ac:0x2b8,_0x6fdca4:0x2c3,_0x13dd93:0x2a5,_0x334f61:0x295,_0x538e55:0x2b2,_0x34e811:0x29f,_0x45295e:0x278,_0x3e91b0:0x294,_0x2a6a37:0x2ad,_0xa65342:0x287,_0x30722f:0x27e,_0x1d4d2c:0x29b,_0x323b46:0x433,_0x879ac:0x29d,_0x2891aa:0x298,_0x406e11:0x422,_0x195713:0x44b},_0x1815dd={_0x571830:0x135},_0x39c3ff={_0x2b1826:0x2cd};function _0x333b4e(_0x38f673,_0x562cdf,_0x4e3f72,_0x3088bd){return _0x2e87(_0x4e3f72-_0x39c3ff._0x2b1826,_0x38f673);}function _0x4e88a1(_0x162acd,_0x5098ff,_0x3987a8,_0x1afaf9){return _0x2e87(_0x5098ff-_0x1815dd._0x571830,_0x162acd);}return{'id':_0xb3eda7['id'],'content':structuredClone(_0xb3eda7[_0x333b4e(_0x45afa2._0x5c5d95,0x42a,0x42e,0x427)]),'stopReason':_0xb3eda7['stop_reason'],'usage':{'inputTokens':_0xb3eda7[_0x333b4e(0x457,0x465,_0x45afa2._0x59c5e5,_0x45afa2._0x174e06)][_0x4e88a1(0x2c3,_0x45afa2._0x4e90ac,_0x45afa2._0x6fdca4,_0x45afa2._0x13dd93)],'outputTokens':_0xb3eda7[_0x4e88a1(_0x45afa2._0x334f61,_0x45afa2._0x538e55,_0x45afa2._0x34e811,0x2b3)][_0x4e88a1(_0x45afa2._0x45295e,_0x45afa2._0x3e91b0,_0x45afa2._0x2a6a37,_0x45afa2._0xa65342)],..._0xb3eda7['usage'][_0x4e88a1(_0x45afa2._0x30722f,_0x45afa2._0x1d4d2c,0x291,0x2ba)]!==void 0x0?{'reasoningTokens':_0xb3eda7['usage'][_0x333b4e(0x436,0x451,_0x45afa2._0x323b46,0x446)]}:{}},..._0xb3eda7[_0x4e88a1(_0x45afa2._0x879ac,0x29f,0x286,_0x45afa2._0x2891aa)]?{'providerState':structuredClone(_0xb3eda7[_0x333b4e(_0x45afa2._0x406e11,_0x45afa2._0x195713,0x437,0x453)])}:{}};}function toModelResponse(_0x2687e8){const _0x401759={_0x418bc9:0xc0,_0x5d5f4:0x88,_0x1ffbc6:0x495,_0x22ad93:0x8b,_0x3413dd:0x88,_0x2c0d70:0x90,_0x2d8080:0x7c,_0x51e2f6:0x5e,_0x267080:0x70,_0x3fecdc:0x77,_0x13a478:0x68,_0x4ab2b5:0x58,_0x31da08:0x75,_0x32afb7:0x7f,_0x47e5af:0x4b1,_0x25094c:0x48b},_0x22b3e4={_0x221add:0x1f9};function _0x15c07e(_0x1f25e6,_0x163ecf,_0x4f1554,_0x19c0cd){return _0x2e87(_0x163ecf-0x337,_0x19c0cd);}function _0x5ef5f5(_0x2b63d8,_0x553b58,_0xf28346,_0x224045){return _0x2e87(_0x2b63d8- -_0x22b3e4._0x221add,_0xf28346);}return{'id':_0x2687e8['id'],'type':'message','role':_0x5ef5f5(-0xa2,-0xa6,-_0x401759._0x418bc9,-_0x401759._0x5d5f4),'content':structuredClone(_0x2687e8[_0x15c07e(0x47d,0x498,0x484,_0x401759._0x1ffbc6)]),'stop_reason':_0x2687e8[_0x5ef5f5(-_0x401759._0x22ad93,-0x7f,-0x9a,-0x97)],'stop_sequence':null,'usage':{'input_tokens':_0x2687e8['usage'][_0x5ef5f5(-0x9e,-_0x401759._0x3413dd,-0xac,-_0x401759._0x2c0d70)],'output_tokens':_0x2687e8[_0x5ef5f5(-_0x401759._0x2d8080,-0x6d,-_0x401759._0x51e2f6,-0x74)][_0x5ef5f5(-_0x401759._0x267080,-_0x401759._0x3fecdc,-0x65,-0x5a)],..._0x2687e8[_0x5ef5f5(-0x7c,-0x74,-_0x401759._0x13a478,-0x78)][_0x5ef5f5(-0x6c,-0x6d,-0x7d,-_0x401759._0x4ab2b5)]!==void 0x0?{'reasoning_tokens':_0x2687e8[_0x5ef5f5(-_0x401759._0x2d8080,-_0x401759._0x31da08,-0x7f,-_0x401759._0x32afb7)][_0x15c07e(_0x401759._0x47e5af,0x4c4,0x4d8,0x4d1)]}:{}},..._0x2687e8['providerState']?{'providerState':structuredClone(_0x2687e8[_0x15c07e(_0x401759._0x25094c,0x4a1,0x49b,0x496)])}:{}};}function responseToAssistantMessage(_0x2fb23b){const _0x27756f={_0x49d1d4:0x347,_0x5b26ba:0x366,_0x2816ef:0x35a,_0x686b6:0x369,_0x4e846d:0x355,_0x47f318:0x369},_0x87825e={_0x794396:0x38d},_0x49bd11={_0x452839:0x1f0};function _0x2b66d5(_0x22487e,_0x2a6cdc,_0x2f9b7b,_0x51b3da){return _0x2e87(_0x22487e-_0x49bd11._0x452839,_0x51b3da);}function _0x489dd9(_0x3b35fb,_0x30c0a2,_0x50d2ed,_0x2b5061){return _0x2e87(_0x2b5061-_0x87825e._0x794396,_0x50d2ed);}return{'role':_0x2b66d5(_0x27756f._0x49d1d4,0x336,0x33c,0x328),'content':normalizeContent(_0x2fb23b['content']),..._0x2fb23b[_0x2b66d5(0x35a,0x379,0x35a,_0x27756f._0x5b26ba)]?{'providerState':structuredClone(_0x2fb23b[_0x2b66d5(_0x27756f._0x2816ef,_0x27756f._0x686b6,_0x27756f._0x4e846d,_0x27756f._0x47f318)])}:{}};}function createReasoningMessage(_0x17ea83){const _0x1f9499={_0x120953:0x351,_0x1183cf:0x342,_0x4a06ae:0x35a,_0x2f3033:0x355,_0x14103f:0x350,_0x5914d5:0x350,_0x3a570b:0xa3,_0xfa5325:0x95,_0x386a78:0xab,_0x5e1c7a:0xb8},_0x4edb0f={_0x1bcdbe:0x20f},_0x314190={_0x6ea7af:0x92,_0x5321a5:0xac,_0x51d0e7:0xba,_0x1fbb5a:0xa1,_0x5264ff:0xc0,_0x316341:0x99,_0x12f312:0xef,_0x25cfa5:0xf9,_0x2470f6:0xda,_0x1eedbb:0x31,_0x55e402:0x2d,_0x54ac01:0x15,_0x337381:0x18},_0x3157a5=normalizeContent(_0x17ea83?.[_0xfffe93(_0x1f9499._0x120953,0x335,0x332,_0x1f9499._0x1183cf)])[_0xfffe93(_0x1f9499._0x4a06ae,_0x1f9499._0x2f3033,_0x1f9499._0x14103f,_0x1f9499._0x5914d5)](_0x3b3686=>{const _0x35cf89={_0x2c0f0a:0xbb},_0x221f9e={_0x54c092:0x10c,_0x52e80b:0x1a3};function _0xfa2d0c(_0x34ae88,_0x2f7f28,_0x3e3631,_0x20f792){return _0xfffe93(_0x34ae88-_0x221f9e._0x54c092,_0x20f792- -0x351,_0x3e3631-_0x221f9e._0x52e80b,_0x34ae88);}function _0x14076d(_0xab4fea,_0x46be92,_0x1c3e9e,_0x48b9bf){return _0xd64870(_0xab4fea-_0x35cf89._0x2c0f0a,_0x46be92-0x16b,_0x48b9bf-0x155,_0xab4fea);}return _0x3b3686[_0x14076d(0x8c,0xb5,_0x314190._0x6ea7af,0xab)]===_0x14076d(0xa5,_0x314190._0x5321a5,_0x314190._0x5321a5,_0x314190._0x51d0e7)||_0x3b3686[_0x14076d(_0x314190._0x1fbb5a,_0x314190._0x5264ff,_0x314190._0x316341,0xab)]===_0x14076d(0xc7,_0x314190._0x12f312,_0x314190._0x25cfa5,_0x314190._0x2470f6)||_0x3b3686[_0xfa2d0c(-_0x314190._0x1eedbb,-_0x314190._0x55e402,-_0x314190._0x54ac01,-_0x314190._0x337381)]==='openai_reasoning';});function _0xd64870(_0x442f18,_0x2d1f6d,_0x36a841,_0x1c55e2){return _0x2e87(_0x36a841- -_0x4edb0f._0x1bcdbe,_0x1c55e2);}if(_0x3157a5[_0xd64870(-0xaf,-_0x1f9499._0x3a570b,-_0x1f9499._0xfa5325,-_0x1f9499._0x386a78)]===0x0)return void 0x0;function _0xfffe93(_0x5aa52b,_0x203cfd,_0xf84f3f,_0x57e548){return _0x2e87(_0x203cfd-0x1d4,_0x57e548);}return{'role':_0xd64870(-0xd6,-0xa8,-_0x1f9499._0x5e1c7a,-0xcf),'content':_0x3157a5};}function createAssistantTextMessage(_0x3ae2d8){const _0x168656={_0xeb9666:0x48,_0x437232:0x53,_0x30b2e5:0x3bf,_0x3015e6:0x80,_0x1a0df9:0x69},_0x3b8804={_0x655b5b:0xbe,_0x578144:0x484,_0x1b87fa:0x474},_0x2d2a5f={_0xaeaa7b:0x66},_0x46f43b=normalizeContent(_0x3ae2d8?.['content'])[_0x42b081(-0x56,-_0x168656._0xeb9666,-_0x168656._0x437232,-0x3d)](_0x208f30=>{const _0x2e8fe6={_0x772bcb:0x13b,_0x1f9a8c:0x1bf};function _0x4c77a6(_0x7d4687,_0x4e7090,_0x59a699,_0x1aaaff){return _0x42b081(_0x1aaaff-_0x2e8fe6._0x772bcb,_0x4e7090,_0x59a699-_0x2e8fe6._0x1f9a8c,_0x1aaaff-0x1e2);}function _0x1f133f(_0x3a8aca,_0x417784,_0x3774ca,_0x51cba1){return _0x42b081(_0x417784-0x4c5,_0x3774ca,_0x3774ca-0xa4,_0x51cba1-_0x2d2a5f._0xaeaa7b);}return _0x208f30[_0x4c77a6(_0x3b8804._0x655b5b,0xe0,0xd4,0xc9)]===_0x1f133f(_0x3b8804._0x578144,_0x3b8804._0x1b87fa,0x45d,0x461);});function _0x418fda(_0x147015,_0x220837,_0x5217da,_0x5097b1){return _0x2e87(_0x147015-0x263,_0x5097b1);}if(_0x46f43b[_0x418fda(0x3dd,_0x168656._0x30b2e5,0x3e3,0x3e1)]===0x0)return void 0x0;function _0x42b081(_0x4146ef,_0xb45a8a,_0x4f63cb,_0x140860){return _0x2e87(_0x4146ef- -0x1d7,_0xb45a8a);}return{'role':_0x42b081(-_0x168656._0x3015e6,-0x9c,-_0x168656._0x1a0df9,-0x66),'content':_0x46f43b};}function createToolUseMessage(_0x206dfc){const _0x558b26={_0x1df6b7:0x1ca,_0x3e4e03:0x193,_0x4f034e:0x1e0,_0x325f40:0x1ce,_0x2a213e:0x1e6,_0x163912:0x36,_0x4a29fb:0x1a7},_0x24f07e={_0x441b66:0x6d,_0x684fa4:0x77,_0x7e4c95:0x74,_0x3bb290:0x3b1,_0x1de9a0:0x3ce,_0x4dd024:0x3b2},_0x537b24={_0x96b6db:0x86,_0x2c8546:0x22,_0x319219:0x16a};function _0x4ad117(_0x164899,_0xddf17e,_0x1330a2,_0x5b2073){return _0x2e87(_0x1330a2- -0x1b0,_0x164899);}const _0x4843b7=normalizeContent(_0x206dfc?.[_0x373465(0x1ba,_0x558b26._0x1df6b7,0x1ae,_0x558b26._0x3e4e03)])[_0x373465(_0x558b26._0x4f034e,0x1bb,_0x558b26._0x325f40,_0x558b26._0x2a213e)](_0x23e2a4=>{const _0x89baf1={_0x2aec3e:0x42,_0x53333b:0xe4};function _0x14695e(_0x23cf4a,_0x2eb12d,_0x3bcf4b,_0x592b95){return _0x4ad117(_0x2eb12d,_0x2eb12d-_0x537b24._0x96b6db,_0x23cf4a- -_0x537b24._0x2c8546,_0x592b95-_0x537b24._0x319219);}function _0x323590(_0x52f08d,_0x43feb3,_0x4d1f1e,_0x369ebe){return _0x4ad117(_0x43feb3,_0x43feb3-_0x89baf1._0x2aec3e,_0x52f08d-0x3d2,_0x369ebe-_0x89baf1._0x53333b);}return _0x23e2a4[_0x14695e(-_0x24f07e._0x441b66,-0x7a,-_0x24f07e._0x684fa4,-_0x24f07e._0x7e4c95)]===_0x323590(_0x24f07e._0x3bb290,0x3bc,_0x24f07e._0x1de9a0,_0x24f07e._0x4dd024);});function _0x373465(_0x2edf71,_0x45dc44,_0x2a989b,_0x2831ee){return _0x2e87(_0x2a989b-0x4d,_0x45dc44);}if(_0x4843b7[_0x4ad117(-_0x558b26._0x163912,-0x3b,-_0x558b26._0x163912,-0x2b)]===0x0)return void 0x0;return{'role':_0x373465(_0x558b26._0x4a29fb,0x1c2,0x1a4,0x190),'content':_0x4843b7};}function getTextFromMessage(_0x300b0b){const _0x5ebe74={_0x498b97:0x164,_0x380b1c:0x178,_0x43810d:0x150,_0x49ef2b:0x145,_0x2f6699:0x134,_0x436647:0x116,_0x481264:0x147,_0x50e2be:0x141,_0x157055:0x125},_0x2620f6={_0x3b7a97:0x2c2},_0x218a5c={_0x539ace:0x2c6};function _0x82fc05(_0x1cbddd,_0x23d051,_0x1c2dcd,_0x3da971){return _0x2e87(_0x1c2dcd- -_0x218a5c._0x539ace,_0x3da971);}function _0x2bdc7f(_0xffa8ce,_0x24be1f,_0x5a43c5,_0x5f0149){return _0x2e87(_0xffa8ce- -_0x2620f6._0x3b7a97,_0x5f0149);}return normalizeContent(_0x300b0b?.[_0x82fc05(-_0x5ebe74._0x498b97,-_0x5ebe74._0x380b1c,-0x165,-_0x5ebe74._0x43810d)])[_0x2bdc7f(-0x141,-0x13c,-0x153,-_0x5ebe74._0x49ef2b)](_0x2687d3=>_0x2687d3[_0x82fc05(-0x160,-0x16b,-0x161,-0x152)]===_0x2bdc7f(-0x13c,-0x13a,-0x138,-0x129))[_0x2bdc7f(-_0x5ebe74._0x2f6699,-0x128,-_0x5ebe74._0x436647,-_0x5ebe74._0x481264)](_0x57a5d0=>_0x57a5d0[_0x82fc05(-0x14b,-0x126,-0x140,-0x15b)])[_0x2bdc7f(-0x13d,-_0x5ebe74._0x50e2be,-0x14f,-_0x5ebe74._0x157055)]('\x0a');}function getReasoningTextFromMessage(_0xf68583){const _0x53cd33={_0x14c44b:0x1ec,_0x2062d4:0x1f2,_0x5bcbff:0x1f0,_0x88658a:0x1ee,_0x242d06:0x206,_0x383ca9:0x1d4,_0x233dee:0x22f,_0x96d3ab:0x22e},_0x517eb3={_0x5cebbb:0x220,_0x47e6be:0x242,_0x269aee:0x131,_0x4d5735:0x11b,_0x10679a:0x242,_0x3f6b9e:0x238,_0x518a66:0x23d,_0x569800:0x21a,_0x20557f:0x22f,_0x3162ab:0x215,_0x573c08:0x240,_0xef7a06:0x234,_0x4f04b1:0x1ec,_0x167c67:0x1fe,_0x20ef8c:0x1e6,_0xd105f5:0x121,_0x279d2e:0x120,_0x4a0c89:0x14d,_0x97926d:0x12e,_0x2f042b:0x11c,_0x2e1ad2:0x12c,_0xcc8071:0x1f1,_0xa71f1d:0x206,_0x1f6e03:0x114,_0x351589:0xf9,_0x1058e2:0x12e,_0x1d1a30:0xfd,_0x3d070a:0x10e,_0x18c0b3:0x1fb,_0x57a36d:0x20e,_0x59e5f5:0x21d,_0x2dec34:0x224,_0x18773f:0x223,_0x6ccccf:0x1ff,_0x467e0d:0x203,_0x521ec6:0x214,_0x27f452:0x1fe,_0x153ccd:0x11b,_0x36244e:0x102,_0x4c636c:0x116,_0x2b8b79:0x10f,_0x2073c2:0x104,_0x2fef54:0x112,_0x2cde82:0x12a,_0x41fd1a:0x126},_0x514345={_0x949b86:0x575},_0x3d2cdd={_0x563795:0x2e0};function _0x30def4(_0x3f801b,_0x7f9305,_0x1f92e4,_0x544266){return _0x2e87(_0x1f92e4-0x8f,_0x7f9305);}function _0x2b0935(_0x52e317,_0x4ad0c0,_0x5290ce,_0x892bb8){return _0x2e87(_0x892bb8-_0x3d2cdd._0x563795,_0x52e317);}return normalizeContent(_0xf68583?.[_0x30def4(_0x53cd33._0x14c44b,_0x53cd33._0x2062d4,_0x53cd33._0x5bcbff,_0x53cd33._0x88658a)])[_0x30def4(_0x53cd33._0x242d06,_0x53cd33._0x383ca9,0x1ed,0x1dc)](_0x20cff8=>{const _0x50889b={_0x39721c:0x10a,_0x59020f:0x423,_0x3aa76b:0xbe};if(_0x20cff8[_0x16ec4b(-0x13e,-0x130,-0x137,-0x11b)]==='anthropic_thinking')return _0x20cff8[_0x45f00a(-_0x517eb3._0x5cebbb,-0x228,-0x238,-_0x517eb3._0x47e6be)][_0x16ec4b(-_0x517eb3._0x269aee,-0x115,-0x108,-0x123)]()[_0x16ec4b(-0x106,-_0x517eb3._0x4d5735,-0x124,-0x135)]>0x0?[_0x20cff8[_0x45f00a(-0x219,-_0x517eb3._0x10679a,-_0x517eb3._0x3f6b9e,-0x249)]]:[];function _0x45f00a(_0xdd0085,_0x1d0f4d,_0x3b09ca,_0x504435){return _0x30def4(_0xdd0085-_0x50889b._0x39721c,_0xdd0085,_0x3b09ca- -_0x50889b._0x59020f,_0x504435-_0x50889b._0x3aa76b);}if(_0x20cff8[_0x45f00a(-_0x517eb3._0x518a66,-_0x517eb3._0x569800,-_0x517eb3._0x20557f,-_0x517eb3._0x3162ab)]===_0x45f00a(-_0x517eb3._0x573c08,-0x234,-0x220,-_0x517eb3._0xef7a06))return[_0x45f00a(-_0x517eb3._0x4f04b1,-_0x517eb3._0x167c67,-0x204,-_0x517eb3._0x20ef8c)];if(_0x20cff8['type']!==_0x16ec4b(-_0x517eb3._0xd105f5,-_0x517eb3._0x279d2e,-0x134,-0x133))return[];const _0x2a2ab2=_0x20cff8[_0x16ec4b(-_0x517eb3._0x4a0c89,-_0x517eb3._0x97926d,-_0x517eb3._0x2f042b,-_0x517eb3._0x2e1ad2)][_0x45f00a(-0x1f8,-_0x517eb3._0xcc8071,-_0x517eb3._0xa71f1d,-0x219)](_0x3cd3c5=>_0x3cd3c5[_0x45f00a(-0x1f0,-0x1fc,-0x20e,-0x214)])[_0x16ec4b(-0x123,-_0x517eb3._0x1f6e03,-0x125,-_0x517eb3._0x351589)](_0x240baf=>_0x240baf[_0x16ec4b(-0x132,-0x115,-0x125,-0x12a)]()[_0x45f00a(-0x216,-0x236,-0x21a,-0x21c)]>0x0)[_0x16ec4b(-0x10a,-0x110,-0xf1,-0x107)]('\x0a\x0a');if(_0x2a2ab2[_0x16ec4b(-_0x517eb3._0x1058e2,-0x11b,-_0x517eb3._0x1d1a30,-_0x517eb3._0x3d070a)]>0x0)return[_0x2a2ab2];function _0x16ec4b(_0x5d9ee7,_0x21e197,_0x3a7faf,_0x5b1fad){return _0x2b0935(_0x5d9ee7,_0x21e197-0xa4,_0x3a7faf-0x8d,_0x21e197- -_0x514345._0x949b86);}if(_0x20cff8[_0x45f00a(-0x203,-_0x517eb3._0x18c0b3,-_0x517eb3._0x57a36d,-_0x517eb3._0x59e5f5)]&&_0x20cff8[_0x45f00a(-_0x517eb3._0x2dec34,-_0x517eb3._0x18773f,-0x20e,-_0x517eb3._0x6ccccf)][_0x45f00a(-0x203,-_0x517eb3._0x467e0d,-_0x517eb3._0x521ec6,-_0x517eb3._0x27f452)]()[_0x16ec4b(-0x103,-_0x517eb3._0x153ccd,-_0x517eb3._0x36244e,-_0x517eb3._0x4c636c)]>0x0)return[_0x20cff8[_0x16ec4b(-0x101,-_0x517eb3._0x2b8b79,-_0x517eb3._0x2073c2,-_0x517eb3._0x2fef54)]];return _0x20cff8[_0x16ec4b(-0x13b,-_0x517eb3._0x2cde82,-_0x517eb3._0x41fd1a,-_0x517eb3._0xd105f5)]?[_0x45f00a(-0x230,-0x22f,-0x225,-0x20c)]:[];})[_0x30def4(0x21e,_0x53cd33._0x233dee,0x214,_0x53cd33._0x96d3ab)]('\x0a\x0a');}function getToolUseBlocks(_0x5eb7ce){const _0x4797d1={_0x17cb1e:0x4f5,_0x2c6f35:0x48,_0x3425c1:0x68},_0x4b2a71={_0x39b04c:0x394};function _0x44dc04(_0x5bb408,_0x2755d4,_0x59993c,_0x2e41d4){return _0x2e87(_0x5bb408-_0x4b2a71._0x39b04c,_0x59993c);}function _0x1edc58(_0x5d4458,_0x1eba25,_0x203da1,_0x4dae50){return _0x2e87(_0x1eba25- -0x1db,_0x4dae50);}return normalizeContent(_0x5eb7ce?.[_0x44dc04(_0x4797d1._0x17cb1e,0x4f7,0x4eb,0x4eb)])[_0x1edc58(-0x4f,-0x5a,-_0x4797d1._0x2c6f35,-_0x4797d1._0x3425c1)](_0x155aa4=>_0x155aa4[_0x1edc58(-0x83,-0x76,-0x76,-0x58)]===_0x44dc04(0x523,0x50f,0x53a,0x510));}function getToolResultBlocks(_0x15af6b){const _0x545126={_0x459a2b:0x3ad,_0xffce7b:0x3c8,_0x234f28:0x3cd,_0x19b355:0x3ae},_0x4328eb={_0xcc0938:0x1ae},_0xd14562={_0x281fc1:0x24c};function _0x536eac(_0x282850,_0x69fc3e,_0x3e669c,_0x35b4ee){return _0x2e87(_0x3e669c-_0xd14562._0x281fc1,_0x69fc3e);}function _0x537703(_0xf972e,_0x3e658e,_0x37cfe8,_0x376bd5){return _0x2e87(_0x3e658e- -_0x4328eb._0xcc0938,_0xf972e);}return normalizeContent(_0x15af6b?.[_0x536eac(0x3a1,0x3a0,_0x545126._0x459a2b,_0x545126._0xffce7b)])[_0x536eac(0x3c9,0x3ec,_0x545126._0x234f28,_0x545126._0x19b355)](_0x51a40e=>_0x51a40e[_0x537703(-0x2f,-0x49,-0x52,-0x37)]===_0x537703(-0x42,-0x3b,-0x44,-0x31));}function createToolResultUserMessage(_0x4f5636){const _0x4ef1fe={_0x425d16:0xc0,_0x58b708:0xe9,_0x1d790d:0xc9},_0x1ba137={_0x930230:0x283,_0x419999:0x282,_0x104432:0x299,_0x55f87f:0x54c,_0x5e1272:0x560,_0x4999de:0x575},_0x309d0e={_0x46016b:0xb9};function _0x55b370(_0x4663bf,_0x27d7b3,_0x88203f,_0x1ba91b){return _0x2e87(_0x1ba91b- -_0x309d0e._0x46016b,_0x4663bf);}return{'role':_0x55b370(_0x4ef1fe._0x425d16,0xd2,_0x4ef1fe._0x58b708,_0x4ef1fe._0x1d790d),'content':_0x4f5636['map'](_0x32b3ed=>{const _0x16e7c8={_0xdcc952:0x13b,_0x421321:0x132,_0x87298e:0x1d8};function _0x52778f(_0xfa1bcd,_0x446916,_0x3f5ac8,_0x4da839){return _0x55b370(_0xfa1bcd,_0x446916-_0x16e7c8._0xdcc952,_0x3f5ac8-_0x16e7c8._0x421321,_0x3f5ac8-_0x16e7c8._0x87298e);}function _0x4223b8(_0x379317,_0x1a2fbe,_0x25ac08,_0xd026d8){return _0x55b370(_0x25ac08,_0x1a2fbe-0x1c9,_0x25ac08-0xea,_0x1a2fbe-0x498);}return{'type':'tool_result','tool_use_id':_0x32b3ed['callId'],'content':_0x32b3ed['content']??_0x32b3ed[_0x52778f(_0x1ba137._0x930230,_0x1ba137._0x419999,0x296,0x294)],'is_error':_0x32b3ed[_0x52778f(0x270,_0x1ba137._0x104432,_0x1ba137._0x930230,0x278)]===_0x4223b8(_0x1ba137._0x55f87f,0x55e,_0x1ba137._0x5e1272,_0x1ba137._0x4999de)};})};}var INTERRUPTED_TOOL_RESULT_TEXT=_0x167871(0x2e9,0x2d8,0x2e0,0x2fe);function synthesizeMissingToolResults(_0x55106a){const _0x478787={_0x1a7317:0xe9,_0x50a7c2:0x113,_0x1a1e5d:0x125,_0x26da97:0xf8,_0x4bdabc:0x134,_0xd06e58:0x100,_0x467110:0x140,_0x2a86ab:0xfd,_0x49225b:0x12a,_0x36eff3:0x10b},_0x651675={_0x19d0ef:0x1f1},_0x1fb581={_0x235014:0x412,_0x40050a:0x179},_0x5cab70=new Set();for(const _0x53bdb8 of _0x55106a){for(const _0x144fa1 of getToolResultBlocks(_0x53bdb8)){_0x5cab70[_0x1e53de(0xf0,0xfe,_0x478787._0x1a7317,_0x478787._0x1a7317)](_0x144fa1['tool_use_id']);}}const _0x486402=[];function _0x44f0cb(_0x20c21,_0xd02f24,_0x38aebb,_0x143ac8){return _0x167871(_0x20c21-0x1a1,_0xd02f24,_0x143ac8- -_0x1fb581._0x235014,_0x143ac8-_0x1fb581._0x40050a);}for(const _0x9b49aa of _0x55106a){_0x486402['push'](_0x9b49aa);const _0x7e1f36=getToolUseBlocks(_0x9b49aa)[_0x1e53de(0x104,_0x478787._0x50a7c2,_0x478787._0x1a1e5d,0xf6)](_0x17358a=>!_0x5cab70['has'](_0x17358a['id']));if(_0x7e1f36[_0x44f0cb(-_0x478787._0x26da97,-_0x478787._0x4bdabc,-_0x478787._0xd06e58,-0x115)]===0x0)continue;_0x486402[_0x44f0cb(-_0x478787._0x467110,-_0x478787._0x1a1e5d,-0x120,-0x136)]({'role':_0x1e53de(0x103,0x114,0x130,_0x478787._0x2a86ab),'content':_0x7e1f36[_0x1e53de(0x135,0x120,0x127,_0x478787._0x49225b)](_0x45594e=>({'type':_0x1e53de(0xf3,0x105,0xfa,0xeb),'tool_use_id':_0x45594e['id'],'content':INTERRUPTED_TOOL_RESULT_TEXT,'is_error':!![]}))});for(const _0x46f0be of _0x7e1f36){_0x5cab70[_0x1e53de(_0x478787._0x36eff3,0xfe,0x106,0x104)](_0x46f0be['id']);}}function _0x1e53de(_0x1d4f6f,_0x1f62e1,_0x2bd47d,_0x400f25){return _0x167871(_0x1d4f6f-0x36,_0x2bd47d,_0x1f62e1- -_0x651675._0x19d0ef,_0x400f25-0xea);}return _0x486402;}export{createTextBlock,normalizeTextBlock,normalizeContent,normalizeSystem,isProviderStateCompatible,normalizeMessage,compileRequest,toChatRequest,toModelRequest,toProviderModelRequest,toChatResponse,toModelResponse,responseToAssistantMessage,createReasoningMessage,createAssistantTextMessage,createToolUseMessage,getTextFromMessage,getReasoningTextFromMessage,getToolUseBlocks,getToolResultBlocks,createToolResultUserMessage,INTERRUPTED_TOOL_RESULT_TEXT,synthesizeMissingToolResults};