@nuvin/agent-core 0.0.0-rc.15 → 0.0.0-rc.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/VERSION +2 -2
- package/dist/agent/index.d.ts +34 -3
- package/dist/agent/index.js +1 -1
- package/dist/chunk-FFIZ6TKW.js +1 -1
- package/dist/chunk-NYZR4XKO.js +1 -1
- package/dist/chunk-SEP4YYY3.js +1 -1
- package/dist/chunk-T7UKN6FZ.js +1 -1
- package/dist/chunk-WHYFEBOU.js +1 -0
- package/dist/chunk-X7VAACWY.js +1 -1
- package/dist/formats/index.d.ts +2 -2
- package/dist/formats/index.js +1 -1
- package/dist/hooks/index.d.ts +1 -1
- package/dist/hooks/index.js +1 -1
- package/dist/models/index.d.ts +3 -3
- package/dist/models/index.js +1 -1
- package/dist/{provider-adapters-CVC34mwR.d.ts → provider-adapters-Bupd2RBH.d.ts} +1 -1
- package/dist/shared/index.d.ts +2 -2
- package/dist/shared/index.js +1 -1
- package/dist/tools/index.d.ts +14 -2
- package/dist/tools/index.js +1 -1
- package/dist/{types-CSXSwpwn.d.ts → types-3UUDPpJs.d.ts} +4 -1
- package/package.json +2 -2
- package/dist/chunk-WJMBJOVF.js +0 -1
package/dist/VERSION
CHANGED
package/dist/agent/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { A as AgentEvent, C as ChatRequest, R as RunTurnDeps, M as Message, a as AgentOptions, b as AgentInput, c as AgentSendOptions, T as TurnResult, E as EngineChatModel, d as ExtensionRegistry, e as TurnInput } from '../types-
|
|
2
|
-
export {
|
|
1
|
+
import { A as AgentEvent, C as ChatRequest, R as RunTurnDeps, M as Message, a as AgentOptions, b as AgentInput, c as AgentSendOptions, T as TurnResult, E as EngineChatModel, d as ExtensionRegistry, e as TransformerExtensionRegistration, f as TurnInput } from '../types-3UUDPpJs.js';
|
|
2
|
+
export { g as TurnState } from '../types-3UUDPpJs.js';
|
|
3
3
|
|
|
4
4
|
type AgentMetricsSnapshot = {
|
|
5
5
|
totalTokens: number;
|
|
@@ -63,6 +63,37 @@ declare function buildSummaryMessage(summary: string): Message;
|
|
|
63
63
|
|
|
64
64
|
declare function createExtensionRegistry(): ExtensionRegistry;
|
|
65
65
|
|
|
66
|
+
/**
|
|
67
|
+
* Options for {@link createTopicReminderExtension}.
|
|
68
|
+
* The host supplies a live getter so the extension always reflects the
|
|
69
|
+
* most-recently-set topic without holding a stale captured value.
|
|
70
|
+
*/
|
|
71
|
+
interface TopicReminderExtensionOptions {
|
|
72
|
+
/** Return the current session topic, or undefined if not yet set. */
|
|
73
|
+
getTopic: () => string | undefined;
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* Build the `<system-reminder>` text that instructs the agent whether to call
|
|
77
|
+
* `updateTopic`. Exported for unit testing.
|
|
78
|
+
*/
|
|
79
|
+
declare function buildTopicReminderText(topic: string): string;
|
|
80
|
+
/**
|
|
81
|
+
* Creates a `beforeModelRequest` transformer that appends a `<system-reminder>`
|
|
82
|
+
* TextBlock to every model request, informing the agent of the current session
|
|
83
|
+
* topic and nudging it to call `updateTopic` only when the topic truly changes.
|
|
84
|
+
*
|
|
85
|
+
* - Reads `getTopic()` **live** on each run so the reminder always reflects the
|
|
86
|
+
* most recent topic, even across tool calls within a single turn.
|
|
87
|
+
* - When `getTopic()` returns `undefined` the placeholder text `"not yet set"`
|
|
88
|
+
* is used so the agent is still nudged from the very first turn.
|
|
89
|
+
* - Returns a **new** `ChatRequest` with a **new** `system` array; the incoming
|
|
90
|
+
* array is never mutated in place.
|
|
91
|
+
*
|
|
92
|
+
* Order 3000 runs after the context-monitor observer (order 2000) registered in
|
|
93
|
+
* daemon-session-host so the reminder is always the last thing appended.
|
|
94
|
+
*/
|
|
95
|
+
declare function createTopicReminderExtension(options: TopicReminderExtensionOptions): TransformerExtensionRegistration<"beforeModelRequest">;
|
|
96
|
+
|
|
66
97
|
declare function runTurn(input: TurnInput, deps: RunTurnDeps): Promise<TurnResult>;
|
|
67
98
|
|
|
68
|
-
export { Agent, AgentInput, type AgentMetrics, type AgentMetricsChangeHandler, type AgentMetricsOptions, type AgentMetricsSnapshot, AgentOptions, AgentSendOptions, ExtensionRegistry, RunTurnDeps, SUMMARY_MESSAGE_PREFIX, SUMMARY_SYSTEM_PROMPT, TurnInput, TurnResult, buildSummaryMessage, createAgentMetrics, createExtensionRegistry, runTurn, summarizeMessages };
|
|
99
|
+
export { Agent, AgentInput, type AgentMetrics, type AgentMetricsChangeHandler, type AgentMetricsOptions, type AgentMetricsSnapshot, AgentOptions, AgentSendOptions, ExtensionRegistry, RunTurnDeps, SUMMARY_MESSAGE_PREFIX, SUMMARY_SYSTEM_PROMPT, TurnInput, TurnResult, buildSummaryMessage, buildTopicReminderText, createAgentMetrics, createExtensionRegistry, createTopicReminderExtension, runTurn, summarizeMessages };
|
package/dist/agent/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x399631,_0x96e6a6){const _0x39ccdd={_0x44320f:0x29c,_0x40366e:0x296,_0x2325f5:0x2a5,_0xc7cda0:0x2b2,_0x432bda:0x2a8,_0x5152f5:0x128,_0x355907:0x12c,_0xb783e6:0x133,_0x27b6b3:0x11d,_0x5186aa:0x119,_0x1493f2:0x118,_0x30eace:0x10e,_0x1f61de:0x135,_0x402642:0x298,_0x4c872e:0x29f,_0x3b4c9b:0x2a0,_0x12faa3:0x28b,_0x1e30e:0x2b2,_0x93330c:0x117,_0x516607:0x125},_0x3a0c4c={_0x3cfca5:0x46},_0x40ccf1={_0x2a2081:0x1c0};function _0x369878(_0x41d7c2,_0x5582ca,_0x536ffa,_0x2b1597){return _0x525c(_0x41d7c2-_0x40ccf1._0x2a2081,_0x536ffa);}function _0x697f65(_0xa51e5a,_0x36ae30,_0x133fca,_0x11db6f){return _0x525c(_0x36ae30-_0x3a0c4c._0x3cfca5,_0xa51e5a);}const _0x21ae98=_0x399631();while(!![]){try{const _0x152195=-parseInt(_0x369878(_0x39ccdd._0x44320f,0x292,0x2a1,_0x39ccdd._0x40366e))/0x1+parseInt(_0x369878(_0x39ccdd._0x2325f5,_0x39ccdd._0xc7cda0,0x29a,0x2a1))/0x2*(-parseInt(_0x369878(0x29a,0x28c,0x293,0x294))/0x3)+-parseInt(_0x369878(_0x39ccdd._0x432bda,0x2a5,0x2b1,0x29b))/0x4+-parseInt(_0x697f65(_0x39ccdd._0x5152f5,_0x39ccdd._0x355907,_0x39ccdd._0xb783e6,0x121))/0x5*(-parseInt(_0x697f65(_0x39ccdd._0x27b6b3,_0x39ccdd._0x5186aa,_0x39ccdd._0x1493f2,_0x39ccdd._0x30eace))/0x6)+-parseInt(_0x697f65(0x122,0x12f,_0x39ccdd._0x1f61de,0x13d))/0x7+parseInt(_0x369878(_0x39ccdd._0x402642,_0x39ccdd._0x4c872e,_0x39ccdd._0x3b4c9b,0x297))/0x8*(-parseInt(_0x369878(0x295,_0x39ccdd._0x12faa3,0x299,0x2a4))/0x9)+parseInt(_0x369878(0x2a3,0x2a6,0x297,_0x39ccdd._0x1e30e))/0xa*(parseInt(_0x697f65(_0x39ccdd._0x93330c,_0x39ccdd._0x516607,0x129,0x129))/0xb);if(_0x152195===_0x96e6a6)break;else _0x21ae98['push'](_0x21ae98['shift']());}catch(_0x4726b3){_0x21ae98['push'](_0x21ae98['shift']());}}}(_0x5047,0x41b9c));import{Agent,createAgentMetrics,createExtensionRegistry,runTurn}from'../chunk-WJMBJOVF.js';import{getTextFromMessage}from'../chunk-SEP4YYY3.js';import'../chunk-FFIZ6TKW.js';import'../chunk-X7VAACWY.js';function _0x451fe1(_0xa0c61e,_0x1c2983,_0x5d8277,_0x26930f){return _0x525c(_0x5d8277-0x3d8,_0xa0c61e);}function _0x405c35(_0x54fc18,_0x4b084c,_0x4538af,_0x348419){return _0x525c(_0x54fc18- -0x191,_0x4538af);}function _0x5047(){const _0x2235c2=['vxnLCG','mZy3mtq4qwjAAMHL','mJe1nJmWmwjXy0L4sq','zMLSDgvY','uhjLDMLVDxmGy29UDMvYC2f0Aw9Uihn1Bw1HCNK6','AM9PBG','DhjPBq','Dgv4Da','y29UDgvUDa','nMvfz3PHta','BwfW','mZy3mtG1nNHwuvffrq','yxnZAxn0yw50','ww91igfYzsbHihnLC3nPB24Ty29UDgLUDwL0EsbZDw1TyxjPEMvYigzVCIbHienmssbJB2rPBMCGyxnZAxn0yw50lIbuAguGy29UDMvYC2f0Aw9UihLVDsbHCMuGC3vTBwfYAxPPBMCGAxmGyw4GAw4TChjVz3jLC3mGy29KAw5NihnLC3nPB24GDgHHDcb3yxmGAw50zxjYDxb0zwqGyMvJyxvZzsb0AguGy29UDgv4Dcb3Aw5KB3CGAxmGzNvSBc4Gww91CIbZDw1Tyxj5ihDPBgWGyMuGAw5Qzwn0zwqGAw50BYbHigzYzxnOihnLC3nPB24GC28GDgHLigfZC2LZDgfUDcbJyw4GCMvZDw1LihDVCMSGD2L0Ag91DcbSB3nPBMCGChjVz3jLC3mUcGPqCM9KDwnLigeGC3rYDwn0DxjLzcbZDw1Tyxj5ihvZAw5NihrOzsbMB2XSB3DPBMCGC2vJDgLVBNmUie9TAxqGyw55ihnLy3rPB24GDgHHDcbOyxmGBM8GCMvSzxzHBNqGy29UDgvUDc4kcImJiYbtzxnZAw9UieDVywWku3rHDguGDgHLihvZzxiNCYbVCMLNAw5HBcbYzxf1zxn0ig9Yig9IAMvJDgL2zsbPBIaXltiGC2vUDgvUy2vZlGOkiYmJifDVCMSGq29TCgXLDgvKcKXPC3qGD2HHDcbOyxmGywXYzwfKEsbIzwvUigrVBMuSihDPDgGGC3bLy2LMAwnZoGOTiezPBgvZignYzwf0zwqSig1VzgLMAwvKlcbVCIbKzwXLDgvKicHPBMnSDwrLihbHDgHZkqOTieTLEsbPBxbSzw1LBNrHDgLVBIbKzwnPC2LVBNmGBwfKzsbHBMqGDgHLAxiGCMf0Aw9UywXLcI0Gq29TBwfUzhmGCNvUigfUzcb0AgvPCIbVDxrJB21LCYaOCgfZCY9MywLSkqOTifrLC3rZihDYAxr0zw4GB3iGzxHLy3v0zwqGyw5KihrOzwLYihjLC3vSDhmkcImJiYbdDxjYzw50ifn0yxrLcKrLC2nYAwjLihDOzxjLihrOAw5NCYbZDgfUzcbYAwDODcbUB3C6cI0Gv2HHDcb3yxmGDgHLigfZC2LZDgfUDcbKB2LUzYb3AgvUihrOzsbZzxnZAw9UigvUzgvKpWOTiefUEsbPBI1WCM9NCMvZCYbMAwXLigvKAxrZig9YihbHCNrPywXSEsbJB21WBgv0zwqGC3rLChmklsbfCNjVCIbTzxnZywDLCYWGzMfPBgLUzYb0zxn0CYWGB3iGyMXVy2TLCNmGzw5JB3vUDgvYzwqklsbuAguGy3vYCMvUDcbICMfUy2GSihDVCMTPBMCGzgLYzwn0B3j5lcbVCIbLBNzPCM9UBwvUDcbZDgf0zsbPzIbTzw50Aw9UzwqkcImJiYbszw1HAw5PBMCGv29YAWPmAxn0ihDOyxqGC3rPBgWGBMvLzhmGDg8GyMuGzg9Uzsb0BYbJB21WBgv0zsb0AguGB3jPz2LUywWGz29HBdOklsbtCgvJAwzPyYbUzxH0ihn0zxbZlcbPBIbVCMrLCIbPzIbZzxf1zw5JzsbTyxr0zxjZcI0Gs25VD24GAxnZDwvZig9YigvKz2uGy2fZzxmGC3rPBgWGDw5HzgrYzxnZzwqklsbbBNKGCgvUzgLUzYb1C2vYigrLy2LZAw9UCYbVCIbXDwvZDgLVBNmGDgHHDcb3zxjLihvUyw5ZD2vYzwqkcImJiYblzxKGq29UDgv4DaPqCMvZzxj2zsbJCML0AwnHBcbKzxrHAwXZihrOyxqGD291BgqGyMuGzxHWzw5ZAxzLihrVihjLlwrLCML2ztOklsbbCMnOAxrLy3r1CMuGB3iGzgvZAwDUihbHDhrLCM5ZigjLAw5NigzVBgXVD2vKcI0Gsw1WB3j0yw50ihzHCMLHyMXLig5HBwvZlcbMDw5JDgLVBIbZAwDUyxr1CMvZlcbVCIbbueKGC2HHCgvZcI0GrMLSzsbWyxrOCYbHBMqGBgLUzsbUDw1IzxjZihjLzMvYzw5JzwqGCMvWzwf0zwrSEqOTienVBNn0CMfPBNrZig9YihjLCxvPCMvTzw50CYb0AguGDxnLCIbZCgvJAwzPzwqklsbuB2rVigXPC3qGAxrLBxmGyw5KihrOzwLYihn0yxr1CYaOCgvUzgLUzY9PBL9WCM9NCMvZCY9JB21WBgv0zwqPcGPsDwXLCZOklsbczsbWCMvJAxnLigfUzcbZCgvJAwzPyY4GvxnLigv4ywn0igzPBguGCgf0AhmSigz1BMn0Aw9Uig5HBwvZlcbHBMqGzxjYB3iGBwvZC2fNzxmG4Ocuig5VDcb2ywD1zsbYzwzLCMvUy2vZlGOTierVie5pvcbPBMnSDwrLignVBNzLCNnHDgLVBMfSihbSzwfZyw50CMLLCYWGCMvWzwf0zwqGyMfJAY1HBMqTzM9YDgGSig9Yigv4CgXVCMf0B3j5igrLywqGzw5KCYb0Agf0ihDLCMuGywjHBMrVBMvKlGOTierVie5pvcbZDw1TyxjPEMuGDg9VBcbJywXSCYb2zxjIyxrPBs4Gq2fWDhvYzsb0AgvPCIbVDxrJB21LCYbHBMqGzgvJAxnPB25ZlcbUB3qGDgHLig1Ly2HHBMLJCY4klsblzwvWihrOzsb0B3rHBcbZDw1Tyxj5ihvUzgvYide1mdaGDg9Rzw5ZlIbqCMLVCML0AxPLigfJDgLVBMfIBguGC3rHDguGB3zLCIbUyxjYyxrPDMuUcI0Gv3jPDguGzM9YigeGy29KAw5NigfNzw50ihrOyxqGD2LSBcbYzwfKihrOAxmGC3vTBwfYEsbHBMqGAw1TzwrPyxrLBhKGCMvZDw1LihDVCMSSig5VDcbMB3iGysbODw1HBIbYzwfKzxiU','ohn5BuvxCW','vg9VBa','mtm4otqWogHowLHvtq','C2LNBMfS','ntmWotbjrNnXEgq','DxnLCG','BgvUz3rO','mti4mZqZmJDTs1Pnwha','CM9Szq','tM8Gy29UDMvYC2f0Aw9UigHPC3rVCNKGDg8GC3vTBwfYAxPLlG','Bwf4vg9Rzw5Z','mtbeENDAqwe','Bw9KzwW','mMr6q01Krq','mJeZmJq3nxryAurywa'];_0x5047=function(){return _0x2235c2;};return _0x5047();}function roleLabel(_0x16697d){const _0x1d1d6f={_0x1cdf99:0x1cb,_0x3a30f2:0x1d1,_0x4e2a09:0x1d9,_0x308754:0x1df,_0x350f0f:0x1e6,_0x1f707f:0x1e0,_0x3946d8:0x1e7},_0x45aec5={_0x4e03c0:0x37c};if(_0x16697d===_0xaac9d3(0x456,0x459,0x461,0x451))return _0xa2cfde(-_0x1d1d6f._0x1cdf99,-0x1d7,-_0x1d1d6f._0x3a30f2,-_0x1d1d6f._0x4e2a09);if(_0x16697d===_0xa2cfde(-_0x1d1d6f._0x308754,-0x1e1,-0x1ef,-0x1ea))return'Assistant';function _0xa2cfde(_0x1fc243,_0x4899b7,_0x51f69c,_0x4c3338){return _0x525c(_0x4c3338- -0x2c0,_0x51f69c);}function _0xaac9d3(_0x253fc3,_0x103582,_0xa49472,_0x110cf1){return _0x525c(_0x103582-_0x45aec5._0x4e03c0,_0x253fc3);}return _0xa2cfde(-0x1d9,-_0x1d1d6f._0x350f0f,-_0x1d1d6f._0x1f707f,-_0x1d1d6f._0x3946d8);}function messagesToText(_0x1ac45d){const _0x4fa16e={_0x3d8351:0xd6,_0x3dfef8:0xdc,_0x58401f:0xca,_0x11e61e:0xc6},_0x12a359={_0x5a823f:0xe,_0x113ea4:0x1c},_0x9e705d={_0x4f4c3e:0x1b0},_0x4512e4={_0x4563e6:0xd2};function _0xcd178b(_0xd44aaa,_0x469d0d,_0x4896f8,_0x3d0616){return _0x525c(_0x3d0616- -_0x4512e4._0x4563e6,_0xd44aaa);}function _0x3d5656(_0x38faa7,_0x33b2bd,_0x4043fb,_0x5a7fff){return _0x525c(_0x5a7fff- -_0x9e705d._0x4f4c3e,_0x38faa7);}return _0x1ac45d[_0x3d5656(-_0x4fa16e._0x3d8351,-_0x4fa16e._0x3dfef8,-0xdd,-0xdc)](_0x53eec6=>{const _0x46137a={_0x41e19e:0x50,_0x3a8d3f:0xc2};function _0x1a5db0(_0x479683,_0x56d505,_0x40e79d,_0x3f2923){return _0x3d5656(_0x3f2923,_0x56d505-_0x46137a._0x41e19e,_0x40e79d-0x181,_0x56d505-_0x46137a._0x3a8d3f);}const _0x588383=getTextFromMessage(_0x53eec6)['trim']();return _0x588383?roleLabel(_0x53eec6[_0x1a5db0(-0x1b,-_0x12a359._0x5a823f,-_0x12a359._0x113ea4,-0x16)])+':\x20'+_0x588383:'';})[_0x3d5656(-_0x4fa16e._0x58401f,-0xc7,-0xd0,-_0x4fa16e._0x11e61e)](_0x593d2e=>_0x593d2e[_0x3d5656(-0xcd,-0xd5,-0xd4,-0xd2)]>0x0)[_0xcd178b(0x12,0x12,0xd,0x1a)]('\x0a\x0a');}var SUMMARY_SYSTEM_PROMPT=_0x405c35(-0xba,-0xc4,-0xc2,-0xbc),NO_HISTORY=_0x451fe1(0x4b5,0x4ab,0x4b9,0x4b0),SUMMARY_MESSAGE_PREFIX=_0x405c35(-0xa6,-0xac,-0x98,-0x9f);function _0x525c(_0x2b3d3b,_0x493cb3){_0x2b3d3b=_0x2b3d3b-0xd3;const _0x504757=_0x5047();let _0x525cd8=_0x504757[_0x2b3d3b];if(_0x525c['DAhCVC']===undefined){var _0x40b498=function(_0x5beb78){const _0xab340f='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x16697d='',_0x1ac45d='';for(let _0x53eec6=0x0,_0x588383,_0x593d2e,_0x26b10a=0x0;_0x593d2e=_0x5beb78['charAt'](_0x26b10a++);~_0x593d2e&&(_0x588383=_0x53eec6%0x4?_0x588383*0x40+_0x593d2e:_0x593d2e,_0x53eec6++%0x4)?_0x16697d+=String['fromCharCode'](0xff&_0x588383>>(-0x2*_0x53eec6&0x6)):0x0){_0x593d2e=_0xab340f['indexOf'](_0x593d2e);}for(let _0xa46b9c=0x0,_0xe1e386=_0x16697d['length'];_0xa46b9c<_0xe1e386;_0xa46b9c++){_0x1ac45d+='%'+('00'+_0x16697d['charCodeAt'](_0xa46b9c)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x1ac45d);};_0x525c['OrDbuZ']=_0x40b498,_0x525c['yNQupC']={},_0x525c['DAhCVC']=!![];}const _0x20284e=_0x504757[0x0],_0x2f3153=_0x2b3d3b+_0x20284e,_0x1983bf=_0x525c['yNQupC'][_0x2f3153];return!_0x1983bf?(_0x525cd8=_0x525c['OrDbuZ'](_0x525cd8),_0x525c['yNQupC'][_0x2f3153]=_0x525cd8):_0x525cd8=_0x1983bf,_0x525cd8;}async function summarizeMessages(_0x26b10a,_0xa46b9c,_0xe1e386={}){const _0x46cd50={_0x1caaa8:0x282,_0x1dc777:0x270,_0x322dc7:0x267,_0x70a019:0x274,_0x46efb0:0x279,_0x59cd4a:0x2d,_0x26d5b4:0x3e,_0x27e695:0x262,_0x5c0dd8:0x25e,_0x1c75ad:0x44,_0x1f2171:0x40,_0x28ad0e:0x265,_0x45c2a5:0x26f,_0xce1038:0x25,_0x3f5d7d:0x3f,_0x24ca5a:0x31,_0x2fb480:0x27e,_0x23dede:0x286,_0x272e09:0x274,_0xd705f3:0x273,_0xb9fb10:0x262,_0x506522:0x266,_0x42ed72:0x276},_0x516c09={_0x190c21:0x123,_0x459ca0:0xd7};if(_0x26b10a[_0x1096a9(-0x276,-_0x46cd50._0x1caaa8,-0x268,-0x26a)]===0x0)return NO_HISTORY;const _0x3e7223=messagesToText(_0x26b10a),_0x4d0904={'model':_0xa46b9c[_0x1096a9(-_0x46cd50._0x1dc777,-_0x46cd50._0x322dc7,-_0x46cd50._0x322dc7,-0x276)],'maxTokens':_0xa46b9c[_0x1096a9(-0x272,-0x280,-_0x46cd50._0x70a019,-_0x46cd50._0x46efb0)]??0x1000,'system':[{'type':_0x134632(-0x38,-0x37,-_0x46cd50._0x59cd4a,-0x25),'text':SUMMARY_SYSTEM_PROMPT}],'messages':[{'role':_0x134632(-0x3f,-0x32,-_0x46cd50._0x26d5b4,-0x47),'content':[{'type':_0x1096a9(-0x266,-_0x46cd50._0x27e695,-_0x46cd50._0x5c0dd8,-0x273),'text':_0x3e7223}]}],'tools':[],'metadata':{'sessionId':'summary','turnId':'summary'}},_0x5c2465=await _0xa46b9c['complete'](_0x4d0904,{'signal':_0xe1e386[_0x134632(-0x45,-_0x46cd50._0x1c75ad,-_0x46cd50._0x1f2171,-0x35)]});function _0x134632(_0x1f6339,_0xfe5dfe,_0x416ab9,_0x9ba78b){return _0x405c35(_0x416ab9-0x76,_0xfe5dfe-_0x516c09._0x190c21,_0x1f6339,_0x9ba78b-_0x516c09._0x459ca0);}function _0x1096a9(_0x5a0457,_0x1cb588,_0x25aa25,_0x57b629){return _0x451fe1(_0x1cb588,_0x1cb588-0x1f4,_0x5a0457- -0x72c,_0x57b629-0x1da);}return _0x5c2465[_0x1096a9(-_0x46cd50._0x28ad0e,-0x260,-_0x46cd50._0x45c2a5,-0x26a)][_0x134632(-_0x46cd50._0xce1038,-_0x46cd50._0x3f5d7d,-_0x46cd50._0x24ca5a,-0x32)](_0x14537d=>_0x14537d['type']==='text')[_0x1096a9(-0x280,-_0x46cd50._0x2fb480,-_0x46cd50._0x23dede,-_0x46cd50._0x272e09)](_0x10a8e2=>_0x10a8e2[_0x134632(-0x28,-0x2b,-0x2d,-0x32)])[_0x1096a9(-0x268,-_0x46cd50._0xd705f3,-_0x46cd50._0xb9fb10,-0x25c)]('')[_0x1096a9(-0x267,-_0x46cd50._0x506522,-0x260,-_0x46cd50._0x42ed72)]();}function buildSummaryMessage(_0x22600e){const _0x5380f0={_0x16d25b:0x2e7,_0x22a462:0x2e1},_0x384538={_0x2c7cb4:0x1e1};function _0x20b522(_0x3ad68a,_0x56b942,_0x5cd428,_0x104250){return _0x451fe1(_0x104250,_0x56b942-0xf,_0x5cd428- -_0x384538._0x2c7cb4,_0x104250-0x156);}return{'role':'user','content':[{'type':_0x20b522(_0x5380f0._0x16d25b,_0x5380f0._0x22a462,0x2e5,0x2f2),'text':SUMMARY_MESSAGE_PREFIX+'\x0a\x0a'+_0x22600e}]};}export{Agent,SUMMARY_MESSAGE_PREFIX,SUMMARY_SYSTEM_PROMPT,buildSummaryMessage,createAgentMetrics,createExtensionRegistry,runTurn,summarizeMessages};
|
|
1
|
+
function _0x25e2ff(_0x5286fb,_0x5d3859,_0x2164ce,_0x166a9e){const _0xaddfbd={_0x1c1fba:0x18c};return _0x5039(_0x5d3859- -_0xaddfbd._0x1c1fba,_0x166a9e);}(function(_0x4d46f6,_0x302a2e){const _0x4b2028={_0x206f34:0x3fc,_0x42a82e:0x4cc,_0x324ba3:0x4be,_0x4b51f3:0x4c4,_0x3d5447:0x3f4,_0xe54b9d:0x3e4,_0x54f18a:0x3ee,_0x2e9f37:0x4ba,_0x493677:0x4bb,_0x3492d8:0x4b0,_0x3a1599:0x3e1,_0x4e3ca0:0x3d8,_0x1ef73b:0x3e3,_0x33f438:0x3ef,_0x24cae1:0x4af,_0x491300:0x4ac,_0x175a7c:0x4a7,_0x4d78ff:0x4c9},_0x42462a={_0x522868:0x22b},_0x2494dc={_0x270828:0x304};function _0x17aa9a(_0x31fa9c,_0x2cb364,_0x86d887,_0x474060){return _0x5039(_0x86d887-_0x2494dc._0x270828,_0x2cb364);}const _0x39d959=_0x4d46f6();function _0x457532(_0x833f96,_0x5f4183,_0xd434de,_0x141410){return _0x5039(_0xd434de-_0x42462a._0x522868,_0x5f4183);}while(!![]){try{const _0x51ed9d=-parseInt(_0x457532(_0x4b2028._0x206f34,_0x4b2028._0x206f34,0x3ed,0x3f6))/0x1*(parseInt(_0x17aa9a(_0x4b2028._0x42a82e,0x4b7,_0x4b2028._0x324ba3,_0x4b2028._0x4b51f3))/0x2)+parseInt(_0x457532(_0x4b2028._0x3d5447,0x3f2,_0x4b2028._0xe54b9d,_0x4b2028._0x54f18a))/0x3+parseInt(_0x17aa9a(0x4bb,0x4be,_0x4b2028._0x2e9f37,_0x4b2028._0x493677))/0x4+parseInt(_0x17aa9a(0x4c5,_0x4b2028._0x3492d8,0x4b9,0x4bd))/0x5*(-parseInt(_0x457532(_0x4b2028._0x3a1599,_0x4b2028._0x4e3ca0,_0x4b2028._0x1ef73b,_0x4b2028._0x33f438))/0x6)+-parseInt(_0x17aa9a(0x4a5,0x4a1,_0x4b2028._0x24cae1,0x4a2))/0x7+parseInt(_0x17aa9a(0x4ba,0x4b3,0x4c1,0x4bd))/0x8*(-parseInt(_0x17aa9a(_0x4b2028._0x491300,_0x4b2028._0x324ba3,0x4b3,_0x4b2028._0x175a7c))/0x9)+parseInt(_0x17aa9a(_0x4b2028._0x4d78ff,0x4dc,0x4d0,0x4d1))/0xa;if(_0x51ed9d===_0x302a2e)break;else _0x39d959['push'](_0x39d959['shift']());}catch(_0x18fdd6){_0x39d959['push'](_0x39d959['shift']());}}}(_0x5ebf,0x99129));import{Agent,createAgentMetrics,createExtensionRegistry,runTurn}from'../chunk-WHYFEBOU.js';import{getTextFromMessage}from'../chunk-SEP4YYY3.js';import'../chunk-FFIZ6TKW.js';import'../chunk-X7VAACWY.js';function roleLabel(_0x49e20a){const _0x4d4cdc={_0x44f935:0xea,_0x4188e9:0xef,_0x2b8ae8:0xf6,_0x444ead:0xf5,_0xf5216c:0x10d,_0x1fbdc4:0x105,_0x57ec33:0x109};function _0x56c3f3(_0x78d0c1,_0x1139b4,_0x1f5bc3,_0x4ed7f2){return _0x5039(_0x1139b4- -0x2ba,_0x4ed7f2);}if(_0x49e20a===_0x2c3338(0x1f3,0x1f0,0x1fd,0x1ff))return _0x56c3f3(-_0x4d4cdc._0x44f935,-_0x4d4cdc._0x4188e9,-_0x4d4cdc._0x2b8ae8,-0xdf);function _0x2c3338(_0x7db62d,_0x57faaa,_0xe0c828,_0x190a75){return _0x5039(_0x57faaa-0x3e,_0xe0c828);}if(_0x49e20a===_0x56c3f3(-0xeb,-_0x4d4cdc._0x444ead,-0xfe,-0xed))return'Assistant';return _0x56c3f3(-0x103,-_0x4d4cdc._0xf5216c,-_0x4d4cdc._0x1fbdc4,-_0x4d4cdc._0x57ec33);}function messagesToText(_0x23723b){const _0x4f52fc={_0x1d5bd4:0x24a,_0x49d832:0x24f,_0x71a9cf:0x23a,_0x4bbaf5:0x24b,_0x3289f4:0x246,_0x3a351a:0x259},_0x56468e={_0x1faab8:0x22a,_0x3935bf:0x22b,_0x1302b7:0x233},_0x2fcaa5={_0x51bda1:0x121},_0x5d8355={_0x3677b7:0x27b};function _0x382007(_0x3d1316,_0x304023,_0x480269,_0x2c88dd){return _0x5039(_0x3d1316-0x97,_0x2c88dd);}function _0x178c4f(_0x175cfa,_0x4e43a2,_0x496358,_0x174657){return _0x5039(_0x4e43a2- -_0x5d8355._0x3677b7,_0x175cfa);}return _0x23723b[_0x382007(_0x4f52fc._0x1d5bd4,0x255,_0x4f52fc._0x49d832,_0x4f52fc._0x71a9cf)](_0x10f8f5=>{const _0x4bcd46={_0x285cab:0x28};function _0x3f216a(_0x42f7f0,_0x2b1d39,_0x11c5f0,_0x2395ca){return _0x382007(_0x2395ca- -_0x4bcd46._0x285cab,_0x2b1d39-0xb1,_0x11c5f0-0x32,_0x2b1d39);}const _0x1ed50d=getTextFromMessage(_0x10f8f5)[_0x3f216a(0x242,_0x56468e._0x1faab8,_0x56468e._0x3935bf,_0x56468e._0x1302b7)]();function _0xe2ea1e(_0x367c5a,_0x113379,_0x271401,_0x474662){return _0x382007(_0x367c5a-0x110,_0x113379-0x89,_0x271401-_0x2fcaa5._0x51bda1,_0x271401);}return _0x1ed50d?roleLabel(_0x10f8f5[_0x3f216a(0x24b,0x22c,0x24c,0x23c)])+':\x20'+_0x1ed50d:'';})[_0x382007(_0x4f52fc._0x4bbaf5,_0x4f52fc._0x3289f4,0x25c,_0x4f52fc._0x3a351a)](_0x2fd031=>_0x2fd031[_0x178c4f(-0xba,-0xbc,-0xb9,-0xae)]>0x0)['join']('\x0a\x0a');}var SUMMARY_SYSTEM_PROMPT='You\x20are\x20a\x20session-continuity\x20summarizer\x20for\x20a\x20CLI\x20coding\x20assistant.\x20The\x20conversation\x20you\x20are\x20summarizing\x20is\x20an\x20in-progress\x20coding\x20session\x20that\x20was\x20interrupted\x20because\x20the\x20context\x20window\x20is\x20full.\x20Your\x20summary\x20will\x20be\x20injected\x20into\x20a\x20fresh\x20session\x20so\x20the\x20assistant\x20can\x20resume\x20work\x20without\x20losing\x20progress.\x0a\x0aProduce\x20a\x20structured\x20summary\x20using\x20the\x20following\x20sections.\x20Omit\x20any\x20section\x20that\x20has\x20no\x20relevant\x20content.\x0a\x0a###\x20Session\x20Goal\x0aState\x20the\x20user\x27s\x20original\x20request\x20or\x20objective\x20in\x201-2\x20sentences.\x0a\x0a###\x20Work\x20Completed\x0aList\x20what\x20has\x20already\x20been\x20done,\x20with\x20specifics:\x0a-\x20Files\x20created,\x20modified,\x20or\x20deleted\x20(include\x20paths)\x0a-\x20Key\x20implementation\x20decisions\x20made\x20and\x20their\x20rationale\x0a-\x20Commands\x20run\x20and\x20their\x20outcomes\x20(pass/fail)\x0a-\x20Tests\x20written\x20or\x20executed\x20and\x20their\x20results\x0a\x0a###\x20Current\x20State\x0aDescribe\x20where\x20things\x20stand\x20right\x20now:\x0a-\x20What\x20was\x20the\x20assistant\x20doing\x20when\x20the\x20session\x20ended?\x0a-\x20Any\x20in-progress\x20file\x20edits\x20or\x20partially\x20completed\x20steps\x0a-\x20Error\x20messages,\x20failing\x20tests,\x20or\x20blockers\x20encountered\x0a-\x20The\x20current\x20branch,\x20working\x20directory,\x20or\x20environment\x20state\x20if\x20mentioned\x0a\x0a###\x20Remaining\x20Work\x0aList\x20what\x20still\x20needs\x20to\x20be\x20done\x20to\x20complete\x20the\x20original\x20goal:\x0a-\x20Specific\x20next\x20steps,\x20in\x20order\x20if\x20sequence\x20matters\x0a-\x20Known\x20issues\x20or\x20edge\x20cases\x20still\x20unaddressed\x0a-\x20Any\x20pending\x20user\x20decisions\x20or\x20questions\x20that\x20were\x20unanswered\x0a\x0a###\x20Key\x20Context\x0aPreserve\x20critical\x20details\x20that\x20would\x20be\x20expensive\x20to\x20re-derive:\x0a-\x20Architecture\x20or\x20design\x20patterns\x20being\x20followed\x0a-\x20Important\x20variable\x20names,\x20function\x20signatures,\x20or\x20API\x20shapes\x0a-\x20File\x20paths\x20and\x20line\x20numbers\x20referenced\x20repeatedly\x0a-\x20Constraints\x20or\x20requirements\x20the\x20user\x20specified\x0a-\x20Todo\x20list\x20items\x20and\x20their\x20status\x20(pending/in_progress/completed)\x0a\x0aRules:\x0a-\x20Be\x20precise\x20and\x20specific.\x20Use\x20exact\x20file\x20paths,\x20function\x20names,\x20and\x20error\x20messages\x20—\x20not\x20vague\x20references.\x0a-\x20Do\x20NOT\x20include\x20conversational\x20pleasantries,\x20repeated\x20back-and-forth,\x20or\x20exploratory\x20dead\x20ends\x20that\x20were\x20abandoned.\x0a-\x20Do\x20NOT\x20summarize\x20tool\x20calls\x20verbatim.\x20Capture\x20their\x20outcomes\x20and\x20decisions,\x20not\x20the\x20mechanics.\x0a-\x20Keep\x20the\x20total\x20summary\x20under\x201500\x20tokens.\x20Prioritize\x20actionable\x20state\x20over\x20narrative.\x0a-\x20Write\x20for\x20a\x20coding\x20agent\x20that\x20will\x20read\x20this\x20summary\x20and\x20immediately\x20resume\x20work,\x20not\x20for\x20a\x20human\x20reader.',NO_HISTORY=_0x25e2ff(0x3a,0x32,0x21,0x3f),SUMMARY_MESSAGE_PREFIX=_0x6f1eb6(0x2c8,0x2d9,0x2e5,0x2d0);function _0x5039(_0x4eaa97,_0x6aecb8){_0x4eaa97=_0x4eaa97-0x1ab;const _0x5ebf20=_0x5ebf();let _0x50391c=_0x5ebf20[_0x4eaa97];if(_0x5039['ndRXJP']===undefined){var _0x4311cf=function(_0x206bd3){const _0x56882c='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x49e20a='',_0x23723b='';for(let _0x10f8f5=0x0,_0x1ed50d,_0x2fd031,_0x10f9d6=0x0;_0x2fd031=_0x206bd3['charAt'](_0x10f9d6++);~_0x2fd031&&(_0x1ed50d=_0x10f8f5%0x4?_0x1ed50d*0x40+_0x2fd031:_0x2fd031,_0x10f8f5++%0x4)?_0x49e20a+=String['fromCharCode'](0xff&_0x1ed50d>>(-0x2*_0x10f8f5&0x6)):0x0){_0x2fd031=_0x56882c['indexOf'](_0x2fd031);}for(let _0x38b57c=0x0,_0x39a028=_0x49e20a['length'];_0x38b57c<_0x39a028;_0x38b57c++){_0x23723b+='%'+('00'+_0x49e20a['charCodeAt'](_0x38b57c)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x23723b);};_0x5039['vCQgtq']=_0x4311cf,_0x5039['ejRNap']={},_0x5039['ndRXJP']=!![];}const _0x162a88=_0x5ebf20[0x0],_0x2a77d0=_0x4eaa97+_0x162a88,_0x1a1728=_0x5039['ejRNap'][_0x2a77d0];return!_0x1a1728?(_0x50391c=_0x5039['vCQgtq'](_0x50391c),_0x5039['ejRNap'][_0x2a77d0]=_0x50391c):_0x50391c=_0x1a1728,_0x50391c;}function _0x6f1eb6(_0x7a0d6e,_0x313cd0,_0x2bccfd,_0x41be6c){const _0x4f9f5d={_0x1c154d:0x129};return _0x5039(_0x313cd0-_0x4f9f5d._0x1c154d,_0x41be6c);}async function summarizeMessages(_0x10f9d6,_0x38b57c,_0x39a028={}){const _0x4a1f80={_0x247840:0x18c,_0x1f99e0:0x192,_0x228b03:0x53c,_0x5f2d49:0x539,_0xa76c7e:0x545,_0x4da114:0x52b,_0x295ca1:0x535,_0x59e7ba:0x542,_0x2cb183:0x531,_0x19b980:0x182,_0x5dfd6a:0x543,_0x6b8e05:0x542,_0x4725a1:0x54d,_0x399c27:0x53c,_0x32b77f:0x19c,_0x47f365:0x544,_0x340c13:0x189,_0x34ad72:0x1a3,_0x49643f:0x18a,_0x9bc42e:0x193,_0x41ac3e:0x191,_0x45186e:0x19b,_0x2fae5e:0x194,_0x5b89c7:0x19a},_0x8741b5={_0x27dcaf:0x26},_0x585ffc={_0x15014f:0x153,_0x5b2e3d:0xf9};if(_0x10f9d6['length']===0x0)return NO_HISTORY;const _0x4d7957=messagesToText(_0x10f9d6),_0x290fe9={'model':_0x38b57c[_0x288840(0x19c,_0x4a1f80._0x247840,0x193,_0x4a1f80._0x1f99e0)],'maxTokens':_0x38b57c[_0x55b20f(_0x4a1f80._0x228b03,_0x4a1f80._0x5f2d49,0x54b,0x55a)]??0x1000,'system':[{'type':'text','text':SUMMARY_SYSTEM_PROMPT}],'messages':[{'role':_0x55b20f(_0x4a1f80._0xa76c7e,_0x4a1f80._0x4da114,_0x4a1f80._0x295ca1,0x528),'content':[{'type':_0x55b20f(_0x4a1f80._0x59e7ba,0x527,_0x4a1f80._0x2cb183,0x538),'text':_0x4d7957}]}],'tools':[],'metadata':{'sessionId':'summary','turnId':_0x288840(0x18a,0x18d,0x185,_0x4a1f80._0x19b980)}};function _0x288840(_0xc661d1,_0x2c56b5,_0x378869,_0x50437b){return _0x6f1eb6(_0xc661d1-0x62,_0x50437b- -_0x585ffc._0x15014f,_0x378869-_0x585ffc._0x5b2e3d,_0x2c56b5);}const _0x48af71=await _0x38b57c[_0x55b20f(_0x4a1f80._0x5dfd6a,_0x4a1f80._0x6b8e05,_0x4a1f80._0x4725a1,_0x4a1f80._0x399c27)](_0x290fe9,{'signal':_0x39a028[_0x288840(0x1a1,0x1a3,0x194,_0x4a1f80._0x32b77f)]});function _0x55b20f(_0x5fc867,_0x584a33,_0x2e7b45,_0x31fa29){return _0x25e2ff(_0x5fc867-_0x8741b5._0x27dcaf,_0x2e7b45-0x50f,_0x2e7b45-0x198,_0x31fa29);}return _0x48af71[_0x55b20f(0x540,0x53f,_0x4a1f80._0x47f365,0x546)][_0x288840(0x19b,0x18b,_0x4a1f80._0x340c13,0x18a)](_0x3ce861=>_0x3ce861[_0x55b20f(0x552,0x53c,0x54a,0x538)]===_0x55b20f(0x51f,0x525,0x531,0x52a))[_0x55b20f(0x533,0x53f,0x536,0x538)](_0x1bd7eb=>_0x1bd7eb[_0x288840(0x196,0x184,0x18b,0x184)])[_0x288840(_0x4a1f80._0x34ad72,_0x4a1f80._0x49643f,_0x4a1f80._0x9bc42e,_0x4a1f80._0x41ac3e)]('')[_0x288840(_0x4a1f80._0x45186e,_0x4a1f80._0x2fae5e,0x1a1,_0x4a1f80._0x5b89c7)]();}function buildSummaryMessage(_0xd89eed){const _0x172e79={_0x32b8f9:0x2f6},_0x4664ce={_0x51f87e:0x2d0,_0x532c91:0x1b6};function _0x166c45(_0x3a641d,_0x37aa89,_0x4a74bf,_0xca2548){return _0x25e2ff(_0x3a641d-0xae,_0x37aa89-_0x4664ce._0x51f87e,_0x4a74bf-_0x4664ce._0x532c91,_0x4a74bf);}return{'role':_0x166c45(0x2e9,0x2f6,_0x172e79._0x32b8f9,0x304),'content':[{'type':'text','text':SUMMARY_MESSAGE_PREFIX+'\x0a\x0a'+_0xd89eed}]};}function buildTopicReminderText(_0x3193e2){const _0x3a5488={_0xc38880:0x1a,_0x21e1da:0x8,_0x42e3ab:0x17,_0x575be3:0x13},_0xa12b50={_0x282c0e:0x21,_0x1e5148:0x18f},_0x2aaabb={_0x1d6007:0x15e,_0x4f2101:0x14d};function _0xd5ec43(_0x131180,_0x2e156d,_0x32e059,_0xf0c54a){return _0x25e2ff(_0x131180-_0x2aaabb._0x1d6007,_0xf0c54a-0x56f,_0x32e059-_0x2aaabb._0x4f2101,_0x32e059);}function _0x527f78(_0x5453e9,_0x11d2ba,_0x3cb544,_0x43d42b){return _0x25e2ff(_0x5453e9-0xa8,_0x11d2ba- -_0xa12b50._0x282c0e,_0x3cb544-_0xa12b50._0x1e5148,_0x5453e9);}return _0x527f78(_0x3a5488._0xc38880,0x16,0x21,0xf)+_0x3193e2+_0x527f78(_0x3a5488._0x21e1da,0x13,_0x3a5488._0x42e3ab,_0x3a5488._0x575be3);}function createTopicReminderExtension(_0x2dd38b){const _0x4608d8={_0x341120:0xea,_0x4fc7ca:0xf3,_0x4d9fb5:0xf5,_0x191498:0x103,_0x198d7e:0xf9,_0x4c45b9:0x100},_0x5955af={_0x3767c0:0x9},_0x18ac24={_0x179828:0x1a5,_0x9a3a2b:0x18e},_0x4ece81={_0x334d7f:0x18e,_0x51bd83:0x4ee,_0x43a284:0xe7},_0x538878={_0x46e7af:0x11e,_0x55cc5f:0x1de};function _0x4edc71(_0x39d8b5,_0x5c9cda,_0x4d021d,_0x58af29){return _0x25e2ff(_0x39d8b5-0x91,_0x4d021d- -_0x538878._0x46e7af,_0x4d021d-_0x538878._0x55cc5f,_0x39d8b5);}const {getTopic:_0x2a38b4}=_0x2dd38b;function _0x58ff1c(_0x1ba0fa,_0x1e5959,_0xad8749,_0x4170ae){return _0x6f1eb6(_0x1ba0fa-_0x4ece81._0x334d7f,_0x4170ae- -_0x4ece81._0x51bd83,_0xad8749-_0x4ece81._0x43a284,_0x1ba0fa);}return{'id':_0x4edc71(-0xe4,-_0x4608d8._0x341120,-_0x4608d8._0x4fc7ca,-0x101),'stage':'beforeModelRequest','kind':_0x4edc71(-_0x4608d8._0x4d9fb5,-_0x4608d8._0x191498,-_0x4608d8._0x198d7e,-_0x4608d8._0x4c45b9),'order':0xbb8,'enabled':!![],'run'(_0x368307){const _0x19142a=_0x2a38b4()??'not\x20yet\x20set';function _0x1a3d34(_0x388a22,_0x35a8c3,_0x21b8a2,_0x4247b2){return _0x4edc71(_0x21b8a2,_0x35a8c3-_0x18ac24._0x179828,_0x4247b2-0xd8,_0x4247b2-_0x18ac24._0x9a3a2b);}const _0x3fe0e0={'type':'text','text':buildTopicReminderText(_0x19142a)};return{..._0x368307,'system':[..._0x368307[_0x1a3d34(-0x14,_0x5955af._0x3767c0,0x8,-_0x5955af._0x3767c0)],_0x3fe0e0]};}};}function _0x5ebf(){const _0x56930b=['mJmXnZGWmJb4vLDHBwy','CM9Szq','mJm0ndi4nNDYq2DtAG','C3vTBwfYEq','vg9VBa','Dgv4Da','mte3mdi0m3jHD3ncDq','uhjLDMLVDxmGy29UDMvYC2f0Aw9Uihn1Bw1HCNK6','DhjHBNnMB3jTzxi','DxnLCG','BwfW','zMLSDgvY','mZG1vvb4terW','mJe5mtyXnK9wtwPZua','Dg9WAwmTCMvTAw5KzxiTyMvMB3jLlw1VzgvSlxjLCxvLC3q','nta3nZjLDMXKDMu','mJyWmJi3og5cv3ztzG','mKnYDgnluW','AM9PBG','Bw9KzwW','nJrmvKDAzxe','tM8Gy29UDMvYC2f0Aw9UigHPC3rVCNKGDg8GC3vTBwfYAxPLlG','BgvUz3rO','iI4GswyGDgHLihvZzxiNCYbSyxrLC3qGBwvZC2fNzsbZDgfYDhmGysbJBgvHCMX5igrPzMzLCMvUDcb0B3bPyYWGy2fSBcb1CgrHDgvuB3bPyYb3AxrOigeGy29Uy2LZzsbUzxCGDg9WAwmGkdmTnIb3B3jKCYKUie90AgvYD2LZzsbKBYbUB3qGy2fSBcbPDc4kpc9ZExn0zw0TCMvTAw5Kzxi+','y29UDgvUDa','mta3otq1owjuy1fPta','phn5C3rLBs1Yzw1PBMrLCJ4kvgHLign1CNjLBNqGC2vZC2LVBIb0B3bPyYbPCYaI','DhjPBq','yxnZAxn0yw50','C2LNBMfS','DhLWzq','Bwf4vg9Rzw5Z','C3LZDgvT','y29TCgXLDgu','vxnLCG'];_0x5ebf=function(){return _0x56930b;};return _0x5ebf();}export{Agent,SUMMARY_MESSAGE_PREFIX,SUMMARY_SYSTEM_PROMPT,buildSummaryMessage,buildTopicReminderText,createAgentMetrics,createExtensionRegistry,createTopicReminderExtension,runTurn,summarizeMessages};
|
package/dist/chunk-FFIZ6TKW.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x3ddc85,_0x2acc21){var _0x3f7d82={_0x1d5282:0x30d,_0x29d842:0x30f,_0x2afdc0:0x300,_0x2f68ce:0x309,_0x5c8340:0x2bc,_0x24f0de:0x2c7,_0x44c664:0x2bc,_0x20db1a:0x2fd,_0x357ebb:0x2f4,_0x49c5dc:0x2f7,_0x177471:0x302,_0x445c1a:0x303,_0x1f4a68:0x2c5,_0x5b42ba:0x2bf,_0x58a3c7:0x2bf,_0x4c780d:0x2c0,_0x52a8ce:0x2f5,_0x5e6bd:0x2fc,_0x4fab30:0x2bb},_0xf4a030={_0xae43c9:0x3a4},_0x55bd2e={_0x6857a4:0x222};function _0x9db3e3(_0x47d7f9,_0x5076af,_0xdd707b,_0x58263e){return _0x5127(_0x58263e-_0x55bd2e._0x6857a4,_0x5076af);}var _0x32d103=_0x3ddc85();function _0x48c518(_0x57f2a8,_0x20beb9,_0x11e9ed,_0x5bad31){return _0x5127(_0x57f2a8- -_0xf4a030._0xae43c9,_0x11e9ed);}while(!![]){try{var _0x63e757=-parseInt(_0x9db3e3(0x307,_0x3f7d82._0x1d5282,0x308,0x308))/0x1*(parseInt(_0x9db3e3(0x30c,_0x3f7d82._0x29d842,_0x3f7d82._0x2afdc0,_0x3f7d82._0x2f68ce))/0x2)+-parseInt(_0x48c518(-0x2c0,-_0x3f7d82._0x5c8340,-_0x3f7d82._0x24f0de,-_0x3f7d82._0x5c8340))/0x3*(-parseInt(_0x48c518(-_0x3f7d82._0x44c664,-0x2b5,-0x2c4,-0x2bd))/0x4)+-parseInt(_0x9db3e3(_0x3f7d82._0x20db1a,0x30d,0x30c,0x304))/0x5*(parseInt(_0x9db3e3(_0x3f7d82._0x2afdc0,_0x3f7d82._0x2afdc0,_0x3f7d82._0x357ebb,0x2fd))/0x6)+-parseInt(_0x9db3e3(_0x3f7d82._0x49c5dc,0x2f8,_0x3f7d82._0x49c5dc,0x300))/0x7+-parseInt(_0x9db3e3(_0x3f7d82._0x177471,0x2fe,0x308,_0x3f7d82._0x445c1a))/0x8*(-parseInt(_0x48c518(-0x2c1,-_0x3f7d82._0x1f4a68,-0x2ba,-0x2c7))/0x9)+-parseInt(_0x48c518(-_0x3f7d82._0x5b42ba,-_0x3f7d82._0x58a3c7,-0x2c2,-0x2ba))/0xa*(parseInt(_0x48c518(-0x2c8,-0x2d0,-_0x3f7d82._0x4c780d,-0x2c5))/0xb)+-parseInt(_0x9db3e3(0x2f7,0x2fa,_0x3f7d82._0x52a8ce,_0x3f7d82._0x5e6bd))/0xc*(-parseInt(_0x48c518(-_0x3f7d82._0x4fab30,-0x2b4,-0x2c3,-0x2c4))/0xd);if(_0x63e757===_0x2acc21)break;else _0x32d103['push'](_0x32d103['shift']());}catch(_0x512c01){_0x32d103['push'](_0x32d103['shift']());}}}(_0x268c,0xd5a1a));var TurnFailedError=class extends Error{[_0x346fe6(0x4a2,0x49e,0x499,0x49e)];constructor(_0x1c509e,_0x57c338){var _0x51bff3={_0x36915a:0x497,_0x23c722:0x4a5,_0x4ad37e:0x49e,_0x4f2ee6:0x318,_0x26693c:0x31b,_0x5ae314:0x317,_0x26ab4a:0x314,_0x143168:0x49c,_0x30fb03:0x4a4,_0x337783:0x31c},_0x5e267f={_0x510180:0x67,_0xab911d:0x9,_0x24b9f2:0x149},_0x3c517c={_0x5175d9:0x13c};function _0x5b7f8a(_0x58759b,_0x2dab47,_0x365259,_0x2a8e4e){return _0x346fe6(_0x2dab47,_0x2dab47-_0x3c517c._0x5175d9,_0x58759b- -0x17d,_0x2a8e4e-0x12);}super(_0x1c509e instanceof Error?_0x1c509e[_0x3fb2b2(_0x51bff3._0x36915a,_0x51bff3._0x23c722,0x4a5,_0x51bff3._0x4ad37e)]:_0x5b7f8a(0x31f,_0x51bff3._0x4f2ee6,_0x51bff3._0x26693c,0x31a),{'cause':_0x1c509e}),this[_0x5b7f8a(_0x51bff3._0x5ae314,0x310,_0x51bff3._0x26ab4a,0x319)]=_0x3fb2b2(_0x51bff3._0x143168,0x49b,0x4a2,_0x51bff3._0x30fb03);function _0x3fb2b2(_0x3cd3d3,_0x4eb325,_0x291aba,_0x1c28c8){return _0x346fe6(_0x4eb325,_0x4eb325-_0x5e267f._0x510180,_0x1c28c8-_0x5e267f._0xab911d,_0x1c28c8-_0x5e267f._0x24b9f2);}this[_0x5b7f8a(_0x51bff3._0x337783,0x325,0x316,0x323)]=_0x57c338;}};function _0x5127(_0x2064e3,_0x510071){_0x2064e3=_0x2064e3-0xd8;var _0x268c7f=_0x268c();var _0x5127d4=_0x268c7f[_0x2064e3];if(_0x5127['uAhtsV']===undefined){var _0x31b5c2=function(_0x5cde46){var _0x1cec6f='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';var _0x1c509e='',_0x57c338='';for(var _0x522075=0x0,_0xf1bcff,_0x49688d,_0x2110b7=0x0;_0x49688d=_0x5cde46['charAt'](_0x2110b7++);~_0x49688d&&(_0xf1bcff=_0x522075%0x4?_0xf1bcff*0x40+_0x49688d:_0x49688d,_0x522075++%0x4)?_0x1c509e+=String['fromCharCode'](0xff&_0xf1bcff>>(-0x2*_0x522075&0x6)):0x0){_0x49688d=_0x1cec6f['indexOf'](_0x49688d);}for(var _0x1f7e0f=0x0,_0x3c29ce=_0x1c509e['length'];_0x1f7e0f<_0x3c29ce;_0x1f7e0f++){_0x57c338+='%'+('00'+_0x1c509e['charCodeAt'](_0x1f7e0f)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x57c338);};_0x5127['wbwdFi']=_0x31b5c2,_0x5127['PQYfRK']={},_0x5127['uAhtsV']=!![];}var _0x33cfe9=_0x268c7f[0x0],_0x56f22f=_0x2064e3+_0x33cfe9,_0x81ec0d=_0x5127['PQYfRK'][_0x56f22f];return!_0x81ec0d?(_0x5127d4=_0x5127['wbwdFi'](_0x5127d4),_0x5127['PQYfRK'][_0x56f22f]=_0x5127d4):_0x5127d4=_0x81ec0d,_0x5127d4;}function _0x346fe6(_0xbd8b31,_0x44e7e6,_0x5af5fd,_0x3188ee){var _0x221852={_0x59dfd3:0x3bc};return _0x5127(_0x5af5fd-_0x221852._0x59dfd3,_0xbd8b31);}export{TurnFailedError};function _0x268c(){var _0x5e9366=['mte5ntG1mMP4s2jQBq','mMvevhfPvq','mtG1mNvxu1Hrra','mteYmdq5nLDMswnhtq','BMfTzq','BwvZC2fNzq','mJC2yLbkzeTO','mZiYmdq4ogv0CMXtAq','odi1meLqAujyrq','C3rHDgu','nde2mtm2n0HhwKD4EG','vhvYBKzHAwXLzevYCM9Y','vhvYBIbMywLSzwq','mZy2mZeZnKPYA0zsDq','nuf2wgztwG','owrywNbcyq','nJeXn3fwDvHLtq','mJqZmhHJquHrBa'];_0x268c=function(){return _0x5e9366;};return _0x268c();}
|
package/dist/chunk-NYZR4XKO.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x29f86c,_0x4cba8d){var _0x4a195e={_0xab0d13:0x1a1,_0x1274ab:0x134,_0x124b62:0x124,_0x222f2b:0x125,_0x371d11:0x12d,_0x1c4ebd:0x195,_0x3bfc3a:0x18e,_0x4dce0f:0x193,_0x29d0d1:0x197,_0x516501:0x19a,_0x18a56b:0x193,_0x28997e:0x199,_0x5ed9dd:0x127,_0x59a608:0x128,_0xe9b202:0x13f,_0xaefb62:0x198,_0x43fa4a:0x194,_0x4d90df:0x192},_0xd930d5={_0x54dfa3:0x2b2};function _0x38e710(_0x1af164,_0x53e24c,_0x2b62a4,_0x1a69f9){return _0x1121(_0x2b62a4- -0x316,_0x53e24c);}var _0x41a670=_0x29f86c();function _0x398757(_0xccacf5,_0x349664,_0x3e6646,_0x32dbd4){return _0x1121(_0x32dbd4- -_0xd930d5._0x54dfa3,_0xccacf5);}while(!![]){try{var _0x25d2c7=-parseInt(_0x38e710(-_0x4a195e._0xab0d13,-0x1a0,-0x19b,-0x1a2))/0x1*(parseInt(_0x398757(-0x12b,-_0x4a195e._0x1274ab,-_0x4a195e._0x124b62,-0x12b))/0x2)+parseInt(_0x398757(-_0x4a195e._0x222f2b,-0x125,-0x12b,-_0x4a195e._0x371d11))/0x3+-parseInt(_0x38e710(-_0x4a195e._0x1c4ebd,-0x189,-_0x4a195e._0x3bfc3a,-_0x4a195e._0x4dce0f))/0x4*(-parseInt(_0x38e710(-_0x4a195e._0x29d0d1,-0x194,-0x196,-_0x4a195e._0x516501))/0x5)+-parseInt(_0x38e710(-_0x4a195e._0x18a56b,-0x193,-_0x4a195e._0x28997e,-_0x4a195e._0x29d0d1))/0x6*(-parseInt(_0x398757(-_0x4a195e._0x124b62,-_0x4a195e._0x5ed9dd,-0x128,-_0x4a195e._0x59a608))/0x7)+-parseInt(_0x398757(-_0x4a195e._0xe9b202,-0x135,-_0x4a195e._0x1274ab,-0x136))/0x8*(parseInt(_0x38e710(-_0x4a195e._0xaefb62,-0x19e,-_0x4a195e._0x1c4ebd,-0x195))/0x9)+-parseInt(_0x398757(-0x124,-_0x4a195e._0x371d11,-0x128,-0x12c))/0xa*(parseInt(_0x38e710(-0x192,-_0x4a195e._0x43fa4a,-0x18d,-0x194))/0xb)+parseInt(_0x38e710(-_0x4a195e._0x516501,-_0x4a195e._0x4d90df,-0x197,-0x19c))/0xc;if(_0x25d2c7===_0x4cba8d)break;else _0x41a670['push'](_0x41a670['shift']());}catch(_0x27a1cf){_0x41a670['push'](_0x41a670['shift']());}}}(_0x57e7,0x8c647));function _0x57e7(){var _0x1fdead=['yxv0BW','mZC3nJm1qKzKCePi','ntC4mtGWmeHODhnkvq','ndiWuMDhwvrn','B3bLBMfP','mtyYmJu3ntjkqKHLuM4','nxPIwhjZra','owDiywzNyG','yw50AhjVCgLJ','zw5HyMXLza','zwzMB3j0','ota0mtm3yLzZv0LW','nJiWmdyZmg9Ov3bfsG','nNbWBwTVBG','mZK0mJC0mg5WvMHLDq','mtfOuMPuthi','ndeXntnkzwPQvg4'];_0x57e7=function(){return _0x1fdead;};return _0x57e7();}var ANTHROPIC_AUTO_BUDGET_TOKENS={'low':0x400,'medium':0x800,'high':0x1000};function mapAutoReasoningEffortToBudgetTokens(_0x5b8c08){return ANTHROPIC_AUTO_BUDGET_TOKENS[_0x5b8c08];}function resolveAnthropicThinkingConfig(_0x4e7195){var _0x72cb20={_0x221525:0x506,_0x3aaddc:0x502,_0x111324:0x501,_0x15a50a:0x1a3,_0xa2fab8:0x198,_0x5bdd5c:0x1a1,_0x2dcf6c:0x19b,_0x3f59c1:0x50d,_0x1d0c9d:0x50b},_0x20ef76={_0x5cf6f3:0x389};function _0x4d67a5(_0x58b09e,_0x1bd318,_0x4c595a,_0x25d764){return _0x1121(_0x4c595a- -0x31b,_0x58b09e);}function _0x41cbd5(_0x10b2a9,_0x7bd3b6,_0x139e0d,_0x48eaa2){return _0x1121(_0x10b2a9-_0x20ef76._0x5cf6f3,_0x139e0d);}if(!_0x4e7195)return void 0x0;if(_0x4e7195['anthropic'])return structuredClone(_0x4e7195[_0x41cbd5(0x50b,0x50c,_0x72cb20._0x221525,0x50c)]);if(!_0x4e7195[_0x41cbd5(0x503,_0x72cb20._0x3aaddc,0x50b,_0x72cb20._0x111324)])return void 0x0;return{'type':_0x41cbd5(0x50c,0x50b,0x512,0x508),'budgetTokens':mapAutoReasoningEffortToBudgetTokens(_0x4e7195[_0x4d67a5(-_0x72cb20._0x15a50a,-_0x72cb20._0xa2fab8,-_0x72cb20._0x5bdd5c,-_0x72cb20._0x2dcf6c)][_0x41cbd5(_0x72cb20._0x3f59c1,_0x72cb20._0x1d0c9d,0x50d,0x509)])};}function _0x1121(_0x37ab14,_0x1f2c31){_0x37ab14=_0x37ab14-0x17a;var _0x57e7a9=_0x57e7();var _0x1121bd=_0x57e7a9[_0x37ab14];if(_0x1121['xiapVp']===undefined){var _0x2560d4=function(_0x344e6e){var _0x33fb9e='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';var _0x5b8c08='',_0x4e7195='';for(var _0x5355a7=0x0,_0x42ab87,_0x32579e,_0xb8e02=0x0;_0x32579e=_0x344e6e['charAt'](_0xb8e02++);~_0x32579e&&(_0x42ab87=_0x5355a7%0x4?_0x42ab87*0x40+_0x32579e:_0x32579e,_0x5355a7++%0x4)?_0x5b8c08+=String['fromCharCode'](0xff&_0x42ab87>>(-0x2*_0x5355a7&0x6)):0x0){_0x32579e=_0x33fb9e['indexOf'](_0x32579e);}for(var _0x3c2ec1=0x0,_0x588d35=_0x5b8c08['length'];_0x3c2ec1<_0x588d35;_0x3c2ec1++){_0x4e7195+='%'+('00'+_0x5b8c08['charCodeAt'](_0x3c2ec1)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x4e7195);};_0x1121['cQWYBh']=_0x2560d4,_0x1121['jGpoYn']={},_0x1121['xiapVp']=!![];}var _0x3d45ef=_0x57e7a9[0x0],_0x3be105=_0x37ab14+_0x3d45ef,_0x192d7b=_0x1121['jGpoYn'][_0x3be105];return!_0x192d7b?(_0x1121bd=_0x1121['cQWYBh'](_0x1121bd),_0x1121['jGpoYn'][_0x3be105]=_0x1121bd):_0x1121bd=_0x192d7b,_0x1121bd;}function resolveOpenAiReasoningConfig(_0x5355a7){var _0x5015a8={_0x5a1fcd:0x23a,_0x5bb7a3:0x236,_0x55e1b7:0x250,_0x76be7d:0x24f,_0x39c0d5:0x247,_0x8431b0:0x23f,_0x4530e8:0x235,_0x5e25ce:0x231},_0x2b310c={_0xcf9420:0x3c1},_0x458d87={_0x7c7a07:0xbc};function _0x2838fd(_0x5641a2,_0x5a009e,_0x4c0893,_0x46eddf){return _0x1121(_0x46eddf-_0x458d87._0x7c7a07,_0x5a009e);}if(!_0x5355a7)return void 0x0;function _0x1b23b3(_0x1be18d,_0x4989ad,_0x35f616,_0x5478be){return _0x1121(_0x5478be- -_0x2b310c._0xcf9420,_0x35f616);}const _0x42ab87=_0x5355a7[_0x2838fd(_0x5015a8._0x5a1fcd,0x236,0x233,_0x5015a8._0x5bb7a3)]?{'effort':_0x5355a7[_0x1b23b3(-_0x5015a8._0x55e1b7,-0x24e,-_0x5015a8._0x76be7d,-_0x5015a8._0x39c0d5)][_0x2838fd(0x248,_0x5015a8._0x8431b0,0x241,0x240)]}:void 0x0;if(!_0x5355a7[_0x2838fd(_0x5015a8._0x4530e8,0x234,0x243,0x23a)])return _0x42ab87;return{..._0x42ab87??{},...structuredClone(_0x5355a7[_0x2838fd(_0x5015a8._0x5e25ce,0x23e,0x237,_0x5015a8._0x5a1fcd)])};}export{mapAutoReasoningEffortToBudgetTokens,resolveAnthropicThinkingConfig,resolveOpenAiReasoningConfig};
|
package/dist/chunk-SEP4YYY3.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x17f804,_0x5a6e96){const _0x4d2fcd={_0x10309a:0xbf,_0x28e18f:0xe9,_0x491f9a:0xe5,_0x3560d1:0xe6,_0x3a324d:0x43e,_0x32525a:0x43a,_0x2bd3f3:0x437,_0x5d0ccf:0xd6,_0x5db98d:0xdb,_0x293582:0xe3,_0x5daaa2:0xdf,_0x4f8306:0x43d,_0x2b8df7:0x40a,_0x6f2b46:0xf0,_0x2508e7:0x105,_0x3e5704:0xfb,_0x5ca3e0:0x111,_0x30cdda:0x436,_0x918bda:0x43c,_0x542df2:0x44b,_0x54eac5:0xcb,_0x5a4fd6:0xdf,_0x2bdf86:0xcd,_0x5871c4:0xb8},_0x17be9f={_0x2766ec:0x36e};function _0x22e737(_0x190f49,_0x310789,_0x262b2f,_0x355642){return _0x1f7e(_0x262b2f-0x14,_0x190f49);}function _0x5b4580(_0x2887d0,_0x3e271a,_0x9105d3,_0x3e7fc8){return _0x1f7e(_0x3e7fc8-_0x17be9f._0x2766ec,_0x2887d0);}const _0x20d0a4=_0x17f804();while(!![]){try{const _0x2672da=parseInt(_0x22e737(_0x4d2fcd._0x10309a,0xdb,0xd3,0xbd))/0x1*(parseInt(_0x22e737(0x102,_0x4d2fcd._0x28e18f,0xe6,_0x4d2fcd._0x491f9a))/0x2)+parseInt(_0x22e737(_0x4d2fcd._0x3560d1,0xed,0xf2,0xea))/0x3*(parseInt(_0x5b4580(_0x4d2fcd._0x3a324d,_0x4d2fcd._0x32525a,0x42c,_0x4d2fcd._0x2bd3f3))/0x4)+parseInt(_0x22e737(0xe6,0xc7,_0x4d2fcd._0x5d0ccf,0xc9))/0x5*(-parseInt(_0x22e737(_0x4d2fcd._0x5db98d,_0x4d2fcd._0x293582,_0x4d2fcd._0x5daaa2,0xd4))/0x6)+-parseInt(_0x5b4580(_0x4d2fcd._0x4f8306,0x415,0x428,0x428))/0x7+-parseInt(_0x5b4580(0x415,_0x4d2fcd._0x2b8df7,_0x4d2fcd._0x2bd3f3,0x41c))/0x8*(-parseInt(_0x22e737(_0x4d2fcd._0x6f2b46,_0x4d2fcd._0x2508e7,_0x4d2fcd._0x3e5704,_0x4d2fcd._0x5ca3e0))/0x9)+-parseInt(_0x5b4580(0x42c,_0x4d2fcd._0x30cdda,0x458,_0x4d2fcd._0x918bda))/0xa*(parseInt(_0x5b4580(0x435,0x449,0x42e,_0x4d2fcd._0x542df2))/0xb)+-parseInt(_0x22e737(0xb3,0xe9,_0x4d2fcd._0x54eac5,0xbd))/0xc*(-parseInt(_0x22e737(0xd8,_0x4d2fcd._0x5a4fd6,_0x4d2fcd._0x2bdf86,_0x4d2fcd._0x5871c4))/0xd);if(_0x2672da===_0x5a6e96)break;else _0x20d0a4['push'](_0x20d0a4['shift']());}catch(_0x36cbae){_0x20d0a4['push'](_0x20d0a4['shift']());}}}(_0x169f,0xa174d));function createTextBlock(_0x1d70b4){const _0x2e291c={_0x61ace5:0x46a,_0x212818:0x46c};function _0x12cf28(_0xff447,_0x363397,_0x49124f,_0x7b6893){return _0x1f7e(_0xff447-0x3c3,_0x363397);}return{'type':_0x12cf28(0x46f,0x459,_0x2e291c._0x61ace5,_0x2e291c._0x212818),'text':_0x1d70b4};}function normalizeTextBlock(_0x550116){return createTextBlock(_0x550116['text']??'');}function _0x1f7e(_0x58dd81,_0xfb632a){_0x58dd81=_0x58dd81-0xac;const _0x169ffd=_0x169f();let _0x1f7e40=_0x169ffd[_0x58dd81];if(_0x1f7e['ToWtsb']===undefined){var _0x190a8e=function(_0x4c615a){const _0x37dd80='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x1d70b4='',_0x550116='';for(let _0x316df6=0x0,_0xd1efcc,_0x14d685,_0x360b0=0x0;_0x14d685=_0x4c615a['charAt'](_0x360b0++);~_0x14d685&&(_0xd1efcc=_0x316df6%0x4?_0xd1efcc*0x40+_0x14d685:_0x14d685,_0x316df6++%0x4)?_0x1d70b4+=String['fromCharCode'](0xff&_0xd1efcc>>(-0x2*_0x316df6&0x6)):0x0){_0x14d685=_0x37dd80['indexOf'](_0x14d685);}for(let _0x22c4e8=0x0,_0x195d94=_0x1d70b4['length'];_0x22c4e8<_0x195d94;_0x22c4e8++){_0x550116+='%'+('00'+_0x1d70b4['charCodeAt'](_0x22c4e8)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x550116);};_0x1f7e['CFWAEz']=_0x190a8e,_0x1f7e['VCCmxj']={},_0x1f7e['ToWtsb']=!![];}const _0x5dd379=_0x169ffd[0x0],_0x182508=_0x58dd81+_0x5dd379,_0x552d1f=_0x1f7e['VCCmxj'][_0x182508];return!_0x552d1f?(_0x1f7e40=_0x1f7e['CFWAEz'](_0x1f7e40),_0x1f7e['VCCmxj'][_0x182508]=_0x1f7e40):_0x1f7e40=_0x552d1f,_0x1f7e40;}function normalizeContent(_0x316df6){const _0x51b34b={_0x30382a:0x104,_0x13d9d5:0x111,_0x19f380:0xfd,_0x5095d0:0xed,_0x3f3f65:0x116,_0x42074:0xe1,_0x36967b:0xc9,_0x557a2e:0xd1},_0x48c90e={_0x5a883a:0x180,_0x2616b5:0x197},_0x38380a={_0x4c9374:0xc8,_0x2c0df0:0x9};if(typeof _0x316df6===_0x5c1b9a(_0x51b34b._0x30382a,_0x51b34b._0x13d9d5,0x10f,0xeb))return[createTextBlock(_0x316df6)];function _0x221edc(_0x9e0571,_0x329978,_0x5bacf6,_0x10c2e1){return _0x1f7e(_0x329978- -0x6f,_0x10c2e1);}function _0x5c1b9a(_0x2c8eaf,_0x3b5a57,_0x4fe96f,_0x4edfbc){return _0x1f7e(_0x2c8eaf-0x2d,_0x4fe96f);}if(!Array[_0x5c1b9a(_0x51b34b._0x19f380,_0x51b34b._0x5095d0,_0x51b34b._0x3f3f65,_0x51b34b._0x42074)](_0x316df6))return[];return _0x316df6[_0x5c1b9a(0xdc,0xeb,_0x51b34b._0x36967b,_0x51b34b._0x557a2e)](_0xd1efcc=>{function _0x2760f2(_0x406242,_0x2e28ff,_0x476b5b,_0x31d796){return _0x5c1b9a(_0x31d796- -0x27b,_0x2e28ff-_0x38380a._0x4c9374,_0x406242,_0x31d796-_0x38380a._0x2c0df0);}if(_0xd1efcc[_0x2760f2(-_0x48c90e._0x5a883a,-_0x48c90e._0x2616b5,-0x16b,-0x187)]==='text')return normalizeTextBlock(_0xd1efcc);return structuredClone(_0xd1efcc);});}function normalizeSystem(_0x14d685=[]){return normalizeContent(_0x14d685)['filter'](_0x360b0=>_0x360b0['type']==='text');}function normalizeMessage(_0x22c4e8){const _0x4ccd3d={_0x3e34f0:0x3b0,_0x387bfa:0x3ac,_0x2d1e0a:0x3b3,_0x2be856:0x387,_0x5c9c0e:0x396,_0xbf7001:0x2f1,_0x1e46b1:0x2f6,_0x4a350f:0x2ec},_0xc2fec2={_0x5b7bac:0x2d5};function _0x4e54b8(_0x38f157,_0x3a82ae,_0x462659,_0x4a4acc){return _0x1f7e(_0x38f157-0x1f9,_0x462659);}function _0x34eae8(_0x268cd6,_0x46a45f,_0x392958,_0x3263a5){return _0x1f7e(_0x3263a5-_0xc2fec2._0x5b7bac,_0x46a45f);}return{...typeof _0x22c4e8['id']===_0x34eae8(0x39d,0x394,_0x4ccd3d._0x3e34f0,_0x4ccd3d._0x387bfa)?{'id':_0x22c4e8['id']}:{},'role':_0x22c4e8['role'],'content':normalizeContent(_0x22c4e8[_0x34eae8(_0x4ccd3d._0x2d1e0a,0x3b0,_0x4ccd3d._0x2be856,_0x4ccd3d._0x5c9c0e)]),..._0x22c4e8[_0x4e54b8(0x2de,0x2da,_0x4ccd3d._0xbf7001,0x2cc)]?{'providerState':structuredClone(_0x22c4e8[_0x4e54b8(0x2de,_0x4ccd3d._0x1e46b1,_0x4ccd3d._0x4a350f,0x2e9)])}:{}};}function compileRequest(_0x195d94){const _0x5a6413={_0x3804d7:0x2da,_0x1e4e3f:0x2a4,_0x31756b:0x170,_0x35dc0b:0x16d,_0x19156d:0x151,_0x2cdf92:0x16c,_0x3aa0e3:0x14b,_0x99b4b6:0x143,_0x32a2cb:0x2e8,_0x4c96cd:0x2ec,_0x4c8c2c:0x167,_0x5b2195:0x146,_0x158179:0x2b0};function _0x1abbac(_0x113a0a,_0x3165b8,_0x447d43,_0x1a53d0){return _0x1f7e(_0x3165b8-0x97,_0x1a53d0);}function _0xf7b652(_0xb058d,_0x52b193,_0xb53978,_0x396546){return _0x1f7e(_0x396546- -0x387,_0xb058d);}return{'model':_0x195d94[_0xf7b652(-0x2df,-0x2c4,-0x2cf,-_0x5a6413._0x3804d7)]??_0xf7b652(-0x289,-_0x5a6413._0x1e4e3f,-0x293,-0x29f),'max_tokens':_0x195d94[_0x1abbac(0x176,_0x5a6413._0x31756b,0x15a,0x17c)]??0x400,..._0x195d94[_0x1abbac(0x160,_0x5a6413._0x35dc0b,0x17a,_0x5a6413._0x19156d)]?{'reasoning':structuredClone(_0x195d94[_0x1abbac(0x174,0x16d,0x15c,_0x5a6413._0x2cdf92)])}:{},'system':normalizeSystem(_0x195d94[_0x1abbac(0x15f,_0x5a6413._0x3aa0e3,0x12f,_0x5a6413._0x99b4b6)]),'messages':_0x195d94[_0x1abbac(0x167,0x161,0x16d,0x15a)][_0xf7b652(-_0x5a6413._0x32a2cb,-0x2cb,-_0x5a6413._0x4c96cd,-0x2d8)](normalizeMessage),'tools':structuredClone(_0x195d94[_0xf7b652(-_0x5a6413._0x3804d7,-0x2df,-0x2d6,-0x2d4)]??[]),'metadata':{'session_id':_0x195d94[_0x1abbac(_0x5a6413._0x4c8c2c,0x15b,0x168,_0x5a6413._0x5b2195)],'turn_id':_0x195d94[_0xf7b652(-_0x5a6413._0x158179,-0x2d8,-0x2d9,-0x2c4)]}};}function toChatRequest(_0x55ef62){const _0x1527cb={_0x49a084:0xb,_0x51ae08:0x4,_0x1e0fbb:0xd,_0x5d893b:0x9,_0x506472:0x1e,_0x1ee299:0x125,_0x416b18:0x114,_0x322f0a:0x2a,_0x4258da:0x1d,_0x5ec5fb:0x133,_0x5d9f58:0x150,_0x67a0c1:0x43},_0x459256={_0x1f9f5c:0x5b},_0x45d69a={_0xdf8275:0xf9};function _0x479ef2(_0x13b91e,_0x38fdda,_0x12f148,_0x298e93){return _0x1f7e(_0x12f148- -_0x45d69a._0xdf8275,_0x13b91e);}function _0x5ee439(_0x521eb8,_0x8801ff,_0x41cb7e,_0xb2f80e){return _0x1f7e(_0x521eb8-_0x459256._0x1f9f5c,_0x8801ff);}return{'model':_0x55ef62['model'],'maxTokens':_0x55ef62[_0x479ef2(-_0x1527cb._0x49a084,-_0x1527cb._0x51ae08,-0x20,-0x2d)],..._0x55ef62[_0x479ef2(-_0x1527cb._0x1e0fbb,-0x39,-0x23,-0x34)]?{'reasoning':structuredClone(_0x55ef62[_0x479ef2(-_0x1527cb._0x5d893b,-_0x1527cb._0x506472,-0x23,-0xd)])}:{},'system':structuredClone(_0x55ef62['system']),'messages':structuredClone(_0x55ef62[_0x5ee439(_0x1527cb._0x1ee299,_0x1527cb._0x416b18,_0x1527cb._0x1ee299,0x143)]),'tools':structuredClone(_0x55ef62[_0x479ef2(-0x5d,-0x2a,-0x46,-_0x1527cb._0x322f0a)]),'metadata':{'sessionId':_0x55ef62[_0x479ef2(-0x18,-_0x1527cb._0x4258da,-_0x1527cb._0x506472,-0x17)]['session_id'],'turnId':_0x55ef62[_0x5ee439(0x136,_0x1527cb._0x5ec5fb,_0x1527cb._0x5d9f58,_0x1527cb._0x1ee299)][_0x479ef2(-0x5b,-0x49,-_0x1527cb._0x67a0c1,-0x3a)]}};}function toModelRequest(_0x244fe9){const _0x5b7117={_0x1c5f63:0x40a,_0x4abead:0x42e,_0x533c85:0x424,_0x2c5d3b:0x4b4,_0x24f73b:0x4ca,_0x3f22b7:0x4af,_0x4f6f34:0x4c0,_0xbd293d:0x43c,_0x47142f:0x44d,_0x4ee4e1:0x43d,_0x2f1225:0x42a,_0x4c3f0c:0x44a,_0x35c332:0x463,_0x1232dd:0x452,_0xe01560:0x486};function _0x274067(_0x2b9eb2,_0x41b5b7,_0x30f83a,_0xbca92f){return _0x1f7e(_0x41b5b7-0x3e1,_0x30f83a);}function _0x17567f(_0x20e7c7,_0x11fc0d,_0x1dd7f5,_0x299a2e){return _0x1f7e(_0x299a2e-0x377,_0x1dd7f5);}return{'model':_0x244fe9[_0x17567f(0x43e,_0x5b7117._0x1c5f63,_0x5b7117._0x4abead,_0x5b7117._0x533c85)],'max_tokens':_0x244fe9[_0x274067(_0x5b7117._0x2c5d3b,0x4b5,_0x5b7117._0x24f73b,_0x5b7117._0x3f22b7)],..._0x244fe9[_0x274067(0x49d,0x4b7,0x4d3,_0x5b7117._0x4f6f34)]?{'reasoning':structuredClone(_0x244fe9[_0x17567f(0x457,0x453,_0x5b7117._0xbd293d,_0x5b7117._0x47142f)])}:{},'system':structuredClone(_0x244fe9['system']),'messages':structuredClone(_0x244fe9['messages']),'tools':structuredClone(_0x244fe9[_0x17567f(0x43b,_0x5b7117._0x4ee4e1,0x43e,_0x5b7117._0x2f1225)]),'metadata':{'session_id':_0x244fe9['metadata'][_0x274067(0x4c2,0x4a5,0x49f,0x4b4)],'turn_id':_0x244fe9[_0x17567f(_0x5b7117._0x4c3f0c,_0x5b7117._0x35c332,0x470,_0x5b7117._0x1232dd)][_0x274067(0x49a,0x4a4,0x4b7,_0x5b7117._0xe01560)]}};}function toProviderModelRequest(_0x4cc20c){const _0x4f8fd5={_0x38a973:0x3df,_0x3cf002:0x3d6,_0x52b860:0x3c3,_0x2dcfd1:0x3d9},_0x5d418b={_0x2e4190:0x18d},_0x5bbc34={_0x47ec4f:0x316};function _0x17341d(_0x1570b9,_0x1b3fee,_0x52ad9d,_0x3abd61){return _0x1f7e(_0x3abd61-_0x5bbc34._0x47ec4f,_0x52ad9d);}function _0x5b9952(_0x5255a2,_0x36a687,_0x850544,_0x393150){return _0x1f7e(_0x393150- -_0x5d418b._0x2e4190,_0x850544);}return{'model':_0x4cc20c['model'],'max_tokens':_0x4cc20c[_0x17341d(_0x4f8fd5._0x38a973,0x3e1,0x3cc,0x3ea)],'system':structuredClone(_0x4cc20c[_0x17341d(_0x4f8fd5._0x3cf002,0x3d5,_0x4f8fd5._0x52b860,0x3ca)]),'messages':structuredClone(_0x4cc20c[_0x17341d(0x3f8,0x3f7,_0x4f8fd5._0x2dcfd1,0x3e0)]),'tools':structuredClone(_0x4cc20c['tools'])};}function toChatResponse(_0x23fb30){const _0x36a742={_0x2464be:0x47d,_0x30f510:0x490,_0x3789a7:0x47c,_0x4f8e6c:0x1ff,_0x38b881:0x1f1,_0x2a6466:0x1f1,_0x595d29:0x46d,_0x18b1d7:0x46b,_0xbefb49:0x1d4,_0x1ff197:0x200,_0x441282:0x1fa,_0x35e62b:0x21c,_0x552e55:0x476,_0x56d3bc:0x479,_0x53bdfd:0x478,_0x1d9b0f:0x46c,_0x20ea4b:0x461,_0x5365fa:0x46b,_0x13b4ad:0x1ea,_0x6ec64c:0x1bc,_0x511d83:0x207,_0x3677b5:0x1ea,_0x2b6a54:0x495,_0x39ae0e:0x4ae,_0x5f382e:0x49d,_0x5cbcf5:0x1ba,_0x3aac34:0x1c6,_0x1501cb:0x4ad};function _0x1cb268(_0x36cf8f,_0x1221d4,_0x22dde1,_0x8c3f7c){return _0x1f7e(_0x8c3f7c-0x3bb,_0x22dde1);}function _0x34e9fc(_0x148bac,_0x40a14e,_0x3bd536,_0x5a0232){return _0x1f7e(_0x148bac- -0x2b0,_0x40a14e);}return{'id':_0x23fb30['id'],'content':structuredClone(_0x23fb30[_0x1cb268(_0x36a742._0x2464be,_0x36a742._0x30f510,0x47d,_0x36a742._0x3789a7)]),'stopReason':_0x23fb30[_0x34e9fc(-_0x36a742._0x4f8e6c,-0x214,-_0x36a742._0x38b881,-_0x36a742._0x2a6466)],'usage':{'inputTokens':_0x23fb30[_0x1cb268(_0x36a742._0x595d29,0x47c,_0x36a742._0x595d29,_0x36a742._0x18b1d7)][_0x34e9fc(-_0x36a742._0xbefb49,-_0x36a742._0x2a6466,-0x1c1,-0x1e7)],'outputTokens':_0x23fb30[_0x34e9fc(-_0x36a742._0x1ff197,-0x1fa,-_0x36a742._0x441282,-_0x36a742._0x35e62b)][_0x1cb268(_0x36a742._0x552e55,_0x36a742._0x56d3bc,0x490,_0x36a742._0x53bdfd)],..._0x23fb30[_0x1cb268(_0x36a742._0x1d9b0f,0x461,_0x36a742._0x20ea4b,_0x36a742._0x5365fa)][_0x34e9fc(-0x1ce,-_0x36a742._0x13b4ad,-0x1db,-_0x36a742._0x6ec64c)]!==void 0x0?{'reasoningTokens':_0x23fb30[_0x34e9fc(-0x200,-_0x36a742._0x511d83,-0x1ef,-_0x36a742._0x3677b5)][_0x1cb268(_0x36a742._0x2b6a54,0x4b3,_0x36a742._0x39ae0e,_0x36a742._0x5f382e)]}:{}},..._0x23fb30[_0x34e9fc(-0x1cb,-_0x36a742._0x5cbcf5,-_0x36a742._0x3aac34,-0x1d2)]?{'providerState':structuredClone(_0x23fb30[_0x1cb268(0x4bd,0x485,_0x36a742._0x1501cb,0x4a0)])}:{}};}function toModelResponse(_0x42b4e1){const _0xc19b8b={_0x1fcf99:0x2b4,_0x16b797:0x291,_0x259b7b:0x2bd,_0x10677e:0x2ae,_0x563b80:0x2a9,_0x424af5:0x2b7,_0x1593af:0x350,_0x420973:0x351,_0x47291a:0x341,_0x3cb22f:0x2cd,_0x250c2d:0x2ba,_0x4d983f:0x2ce,_0x513252:0x2c1,_0x2642c9:0x2b0,_0x4257b1:0x2ca,_0x1a8fe5:0x36f,_0x3c5e2c:0x361,_0x464dc9:0x375,_0xf8a3c5:0x36b};function _0x4846b3(_0x270b7e,_0x1e7c2e,_0xbd96cd,_0x4c0f4d){return _0x1f7e(_0x1e7c2e- -0x36a,_0x4c0f4d);}function _0xc45e4(_0x3f1a33,_0x42084d,_0x5eac40,_0x4be57b){return _0x1f7e(_0x42084d-0x27c,_0x5eac40);}return{'id':_0x42b4e1['id'],'type':_0x4846b3(-_0xc19b8b._0x1fcf99,-0x2a5,-0x291,-_0xc19b8b._0x16b797),'role':_0x4846b3(-_0xc19b8b._0x259b7b,-_0xc19b8b._0x10677e,-0x29c,-0x2a5),'content':structuredClone(_0x42b4e1[_0x4846b3(-0x2c0,-_0xc19b8b._0x563b80,-_0xc19b8b._0x16b797,-_0xc19b8b._0x424af5)]),'stop_reason':_0x42b4e1[_0xc45e4(_0xc19b8b._0x1593af,_0xc19b8b._0x420973,0x352,_0xc19b8b._0x47291a)],'stop_sequence':null,'usage':{'input_tokens':_0x42b4e1['usage']['inputTokens'],'output_tokens':_0x42b4e1[_0x4846b3(-_0xc19b8b._0x3cb22f,-_0xc19b8b._0x250c2d,-_0xc19b8b._0x4d983f,-0x29d)]['outputTokens'],..._0x42b4e1[_0xc45e4(0x310,0x32c,0x316,0x31e)][_0x4846b3(-_0xc19b8b._0x513252,-0x2b2,-0x2c0,-_0xc19b8b._0x2642c9)]!==void 0x0?{'reasoning_tokens':_0x42b4e1[_0x4846b3(-0x2b6,-0x2ba,-0x2bb,-_0xc19b8b._0x4257b1)]['reasoningTokens']}:{}},..._0x42b4e1[_0x4846b3(-0x296,-0x285,-0x2a1,-0x292)]?{'providerState':structuredClone(_0x42b4e1[_0xc45e4(_0xc19b8b._0x1a8fe5,_0xc19b8b._0x3c5e2c,_0xc19b8b._0x464dc9,_0xc19b8b._0xf8a3c5)])}:{}};}function responseToAssistantMessage(_0x5096a3){const _0x43f84a={_0x483a80:0x2c,_0x72e6a5:0x21,_0x265cc2:0x24},_0x210dc9={_0x198cce:0x106};function _0x556cc1(_0x2a182d,_0x45e4f2,_0x5d8148,_0x2fbbf2){return _0x1f7e(_0x45e4f2- -_0x210dc9._0x198cce,_0x2fbbf2);}function _0x51ca87(_0x4795e3,_0x1ba9ba,_0x30f376,_0x452257){return _0x1f7e(_0x30f376-0x364,_0x1ba9ba);}return{'role':_0x556cc1(-0x51,-0x4a,-0x47,-0x3e),'content':normalizeContent(_0x5096a3['content']),..._0x5096a3[_0x556cc1(-_0x43f84a._0x483a80,-_0x43f84a._0x72e6a5,-_0x43f84a._0x265cc2,-0x35)]?{'providerState':structuredClone(_0x5096a3['providerState'])}:{}};}function _0x169f(){const _0x36a3b1=['zxjYB3i','y29UDgvUDa','mta5otvlBxf3sM0','DhvYBKLK','C2vZC2LVBKLK','BwvZC2fNzq','zMLSDgvY','DhLWzq','B3bLBMfPx3jLyxnVBMLUzW','mti2nJKYv1P5D3H1','BwvZC2fNzxm','mtK4nLj6t3bOyW','B3v0Chv0','yw50AhjVCgLJx3rOAw5RAw5N','ndCYmhf6rfvUsa','Dg9VBf91C2u','AxnbCNjHEq','ChvZAa','mtjYq2vjzLy','DhjPBq','Bwf4vg9Rzw5Z','C3rVCfjLyxnVBG','CMvHC29UAw5N','C3rYAw5N','DxnLCG','Bwf4x3rVA2vUCW','Dg9VBf9Yzxn1Bhq','Bwv0ywrHDge','Aw5WDxrFDg9Rzw5Z','mtuXmdnTuxvYs0e','nLnPzuzRzG','y2fSBeLK','ywrK','AM9PBG','CMvHC29UAw5Nx3rVA2vUCW','DgHPBMTPBMC','zw5JCNLWDgvKq29UDgvUDa','ChjVDMLKzxjtDgf0zq','C3rHDhvZ','mJDlD0TSz0G','y2XHDwrLlxnVBM5LDc00ltiWmJuWnte0','Dgv4Da','Bw9KzwW','mtaWota4me1KC1nMEa','BwfW','DxnHz2u','C3rVCf9YzwfZB24','yw50AhjVCgLJx3jLzgfJDgvKx3rOAw5RAw5N','Dg9VBhm','C3LZDgvT','BgvUz3rO','DhvYBL9Pza','mtjOvvzeC3K','CMvHC29UAw5Nvg9Rzw5Z','mJu0nta3nJnNy25HAwy','nJuXotmZohHirM1gqW','C3vTBwfYEq','yxnZAxn0yw50','B3v0Chv0x3rVA2vUCW','zMXHDe1HCa','otq4ndDqAg9Ur2G'];_0x169f=function(){return _0x36a3b1;};return _0x169f();}function createReasoningMessage(_0x339538){const _0x55e876={_0x5aa37f:0x2d5,_0x28da4e:0x2bd,_0x544b7c:0x331,_0x28f4cc:0x31c,_0x5cf01c:0x308,_0x3fe190:0x322},_0x3a7ef5={_0x4cd781:0x3c,_0x576e0d:0x51,_0x524a7a:0x5b,_0x359b97:0x2e,_0x1c090a:0x48,_0x4fcfed:0x3c,_0x3561ae:0x3b,_0x22aa5a:0x4f,_0x17d68b:0x3c,_0x34981c:0x43,_0x24588b:0x3b},_0x3a489c={_0x3a408b:0x1ed,_0xc8d30f:0x2ff,_0x252129:0x9a},_0x10658f={_0x6f8932:0x256};function _0x5aa33f(_0x1e8a76,_0x3e3d6a,_0x3e6ac0,_0x52d9c4){return _0x1f7e(_0x3e6ac0-0x1fc,_0x1e8a76);}function _0x54607f(_0x39590d,_0x18171b,_0xc5770,_0x132920){return _0x1f7e(_0xc5770-_0x10658f._0x6f8932,_0x18171b);}const _0xe96943=normalizeContent(_0x339538?.[_0x5aa33f(_0x55e876._0x5aa37f,0x2a5,_0x55e876._0x28da4e,0x2b3)])[_0x54607f(0x333,_0x55e876._0x544b7c,_0x55e876._0x28f4cc,0x312)](_0x453310=>{function _0x460d1d(_0x1bbce9,_0x20bb07,_0x2f1846,_0x466889){return _0x54607f(_0x1bbce9-0x12,_0x1bbce9,_0x20bb07- -0x2d8,_0x466889-0x6f);}function _0xd64673(_0x246e3c,_0x4da346,_0x1dd393,_0x48ec0b){return _0x5aa33f(_0x48ec0b,_0x4da346-_0x3a489c._0x3a408b,_0x1dd393- -_0x3a489c._0xc8d30f,_0x48ec0b-_0x3a489c._0x252129);}return _0x453310[_0xd64673(-0x45,-0x2f,-_0x3a7ef5._0x4cd781,-0x2d)]===_0xd64673(-0x44,-0x5a,-_0x3a7ef5._0x576e0d,-_0x3a7ef5._0x524a7a)||_0x453310[_0xd64673(-_0x3a7ef5._0x359b97,-_0x3a7ef5._0x1c090a,-_0x3a7ef5._0x4fcfed,-_0x3a7ef5._0x3561ae)]==='anthropic_thinking'||_0x453310[_0xd64673(-0x2a,-_0x3a7ef5._0x22aa5a,-_0x3a7ef5._0x17d68b,-0x2d)]===_0xd64673(-0x51,-_0x3a7ef5._0x34981c,-_0x3a7ef5._0x24588b,-0x48);});if(_0xe96943[_0x54607f(_0x55e876._0x5cf01c,_0x55e876._0x3fe190,0x30b,0x2f8)]===0x0)return void 0x0;return{'role':'assistant','content':_0xe96943};}function createAssistantTextMessage(_0x3f0753){const _0x2de5b5={_0x2d9fce:0x16c,_0xa44d3:0x160,_0x382f38:0x162},_0x5d9e78={_0x6145b6:0x226},_0x516b8a={_0x1a60da:0x11f,_0x464fd8:0x13c,_0x36e77d:0x134,_0x548024:0x157},_0x575340={_0xbcdf9f:0x17b,_0x92d126:0x2b9},_0x501710={_0x25e893:0xf5,_0x118a1d:0x5d},_0x58535e=normalizeContent(_0x3f0753?.['content'])[_0x46e30b(-_0x2de5b5._0x2d9fce,-_0x2de5b5._0xa44d3,-0x147,-0x16b)](_0x3bb0cd=>{function _0x59f810(_0x32623b,_0x5ba8a2,_0x5341ff,_0x469d46){return _0x46e30b(_0x32623b-_0x501710._0x25e893,_0x469d46-0x2b,_0x32623b,_0x469d46-_0x501710._0x118a1d);}function _0x29e7ae(_0x367030,_0x8b4251,_0x160ddb,_0x468409){return _0x46e30b(_0x367030-_0x575340._0xbcdf9f,_0x468409-_0x575340._0x92d126,_0x8b4251,_0x468409-0x171);}return _0x3bb0cd[_0x59f810(-_0x516b8a._0x1a60da,-_0x516b8a._0x464fd8,-0x148,-_0x516b8a._0x36e77d)]===_0x29e7ae(0x123,_0x516b8a._0x548024,0x154,0x13f);});function _0x2fd95c(_0x44c65e,_0x245de2,_0x4dd936,_0x2ed634){return _0x1f7e(_0x2ed634- -0x18,_0x44c65e);}function _0x46e30b(_0x479d3e,_0x34fc66,_0x1dd348,_0x1290e6){return _0x1f7e(_0x34fc66- -_0x5d9e78._0x6145b6,_0x1dd348);}if(_0x58535e['length']===0x0)return void 0x0;return{'role':_0x46e30b(-0x184,-0x16a,-_0x2de5b5._0x382f38,-0x14c),'content':_0x58535e};}function createToolUseMessage(_0x279fa2){const _0x42452f={_0x5979e2:0x33d,_0x31bf17:0x360,_0x2f4ca6:0x330,_0x4d2b25:0x341,_0x344d6d:0x335,_0xa5496a:0x34b,_0x2e092e:0x35a,_0x3a68d9:0x357,_0x24196a:0x33c},_0x31afa0={_0xc172ec:0x371},_0x3b7cae={_0x4e2c35:0x31,_0x1c2190:0x1bd,_0x787300:0x1aa,_0x3faddb:0x1c6};function _0x15deb4(_0x397cac,_0x36e81e,_0xfff2a,_0x9e1b57){return _0x1f7e(_0x9e1b57-0x280,_0x36e81e);}const _0x2aa9bc=normalizeContent(_0x279fa2?.[_0x15deb4(_0x42452f._0x5979e2,_0x42452f._0x31bf17,_0x42452f._0x2f4ca6,_0x42452f._0x4d2b25)])[_0x15deb4(0x32c,_0x42452f._0x344d6d,_0x42452f._0xa5496a,0x346)](_0x49c81a=>{const _0x39e4b1={_0x3ebcfd:0xf1,_0x5523d5:0x2db,_0x108d43:0x4c};function _0x2d9c22(_0x1de16a,_0x5f4163,_0x1939cb,_0x1345c1){return _0x2fa1e1(_0x1de16a-0x45,_0x1345c1-0xe1,_0x1939cb-0x79,_0x5f4163);}function _0x2d008c(_0x1f7ffa,_0xf21b8b,_0x319a41,_0x2b6866){return _0x2fa1e1(_0x1f7ffa-_0x39e4b1._0x3ebcfd,_0x2b6866-_0x39e4b1._0x5523d5,_0x319a41-_0x39e4b1._0x108d43,_0x1f7ffa);}return _0x49c81a[_0x2d008c(0x4c,0x30,0x4a,_0x3b7cae._0x4e2c35)]===_0x2d9c22(-_0x3b7cae._0x1c2190,-_0x3b7cae._0x787300,-_0x3b7cae._0x3faddb,-0x1c1);});function _0x2fa1e1(_0x50c490,_0x49da7b,_0x33e98c,_0x2597df){return _0x1f7e(_0x49da7b- -_0x31afa0._0xc172ec,_0x2597df);}if(_0x2aa9bc['length']===0x0)return void 0x0;return{'role':_0x15deb4(_0x42452f._0x2e092e,0x320,_0x42452f._0x3a68d9,_0x42452f._0x24196a),'content':_0x2aa9bc};}function getTextFromMessage(_0xb9ce38){const _0x2fc9a2={_0x534528:0x1c5,_0x2d968c:0x5b},_0x171cd6={_0x4775e6:0x6c};function _0x3cc156(_0x4168d3,_0x233972,_0x38bec0,_0x77feda){return _0x1f7e(_0x77feda- -_0x171cd6._0x4775e6,_0x38bec0);}function _0x39c5df(_0x4899c7,_0x2717e3,_0xdf5c4a,_0x35a845){return _0x1f7e(_0x2717e3- -0x265,_0x4899c7);}return normalizeContent(_0xb9ce38?.['content'])['filter'](_0x41c836=>_0x41c836[_0x39c5df(-0x190,-0x19e,-0x1a7,-0x1bc)]==='text')[_0x39c5df(-0x1d4,-0x1b6,-_0x2fc9a2._0x534528,-0x19c)](_0x234a69=>_0x234a69[_0x39c5df(-0x1b7,-0x1b9,-0x1b2,-0x1d6)])[_0x3cc156(0x62,0x65,_0x2fc9a2._0x2d968c,0x75)]('\x0a');}function getReasoningTextFromMessage(_0x16c126){const _0x47ff8a={_0x30c5ab:0x14f,_0x43df52:0x142,_0x2fe134:0x23,_0x18380b:0x27,_0x142765:0x23,_0x1acc00:0x65},_0x5ba86a={_0x6f151c:0x2e6,_0x1083f8:0x2e2,_0x1ed050:0x2da,_0x31c305:0x2f0,_0x1fc0b2:0x309,_0x25e6c5:0x316,_0x4112f8:0x30a,_0x78aae7:0x2f9,_0x322bf4:0x322,_0x4f3a87:0x2fb,_0x84b24c:0x2dc,_0x5969df:0x313,_0x539bb5:0x2e7,_0x1c2e25:0x305,_0x51bac8:0x338,_0x363324:0x322,_0x59b708:0x31f},_0xee0c0e={_0x91cf46:0x203},_0x280cda={_0x2376ce:0x9b};function _0x3e5b0b(_0x5263cd,_0x2b9e44,_0x5b7458,_0x3f082b){return _0x1f7e(_0x3f082b- -_0x280cda._0x2376ce,_0x5b7458);}function _0x2ad57(_0x15e496,_0x1312c9,_0x299b7f,_0x21fd85){return _0x1f7e(_0x21fd85- -_0xee0c0e._0x91cf46,_0x1312c9);}return normalizeContent(_0x16c126?.[_0x2ad57(-_0x47ff8a._0x30c5ab,-0x135,-0x14c,-_0x47ff8a._0x43df52)])[_0x3e5b0b(_0x47ff8a._0x2fe134,0x12,_0x47ff8a._0x18380b,_0x47ff8a._0x142765)](_0x540769=>{const _0x22260d={_0x1c0e53:0xb1,_0x2af12d:0x8a},_0x262263={_0x36c347:0x184,_0x113821:0x1ba};if(_0x540769['type']===_0x1bb5b6(-0x2d6,-0x302,-0x2f0,-0x2d4))return _0x540769[_0x1bb5b6(-_0x5ba86a._0x6f151c,-_0x5ba86a._0x1083f8,-_0x5ba86a._0x1ed050,-0x2d6)]['trim']()[_0x117ffd(0x2d1,0x300,0x2dd,_0x5ba86a._0x31c305)]>0x0?[_0x540769[_0x117ffd(_0x5ba86a._0x1fc0b2,0x331,_0x5ba86a._0x25e6c5,0x31e)]]:[];if(_0x540769[_0x1bb5b6(-0x2f6,-0x306,-0x2f6,-0x308)]==='anthropic_redacted_thinking')return['(redacted\x20reasoning)'];if(_0x540769['type']!==_0x117ffd(0x311,_0x5ba86a._0x4112f8,_0x5ba86a._0x78aae7,0x303))return[];const _0xf74b8=_0x540769[_0x117ffd(0x304,0x30b,0x310,0x2f6)][_0x1bb5b6(-_0x5ba86a._0x322bf4,-0x30f,-0x30e,-0x2f7)](_0x44c4f2=>_0x44c4f2['text'])['filter'](_0x334542=>_0x334542[_0x1bb5b6(-0x2cc,-0x2fc,-0x2ea,-0x2e5)]()[_0x117ffd(0x2d8,0x307,0x307,0x2f0)]>0x0)[_0x1bb5b6(-0x2ce,-_0x5ba86a._0x4f3a87,-_0x5ba86a._0x84b24c,-0x2c5)]('\x0a\x0a');function _0x1bb5b6(_0x35b727,_0x161e99,_0x9f4820,_0x4a5c33){return _0x2ad57(_0x35b727-_0x262263._0x36c347,_0x4a5c33,_0x9f4820-0x55,_0x9f4820- -_0x262263._0x113821);}if(_0xf74b8[_0x1bb5b6(-0x30f,-_0x5ba86a._0x5969df,-0x308,-0x312)]>0x0)return[_0xf74b8];function _0x117ffd(_0x5bd88b,_0x4e9f66,_0xc26503,_0x1024ea){return _0x3e5b0b(_0x5bd88b-_0x22260d._0x1c0e53,_0x4e9f66-_0x22260d._0x2af12d,_0xc26503,_0x1024ea-0x2d6);}if(_0x540769[_0x117ffd(0x2ea,0x2ca,0x2da,_0x5ba86a._0x539bb5)]&&_0x540769['text']['trim']()['length']>0x0)return[_0x540769['text']];return _0x540769[_0x117ffd(_0x5ba86a._0x1c2e25,_0x5ba86a._0x51bac8,_0x5ba86a._0x363324,_0x5ba86a._0x59b708)]?['(encrypted\x20reasoning)']:[];})[_0x3e5b0b(0x4b,_0x47ff8a._0x1acc00,0x36,0x46)]('\x0a\x0a');}function getToolUseBlocks(_0x41263a){const _0x2e6cf4={_0x50fe0d:0xa9,_0x67bb9:0xd8,_0x4f38f0:0xee};function _0x4fd90a(_0x3bf755,_0x5ba84e,_0x3fccb8,_0x4f129a){return _0x1f7e(_0x3fccb8- -0x1b4,_0x4f129a);}function _0x531efb(_0xe57e36,_0x2f9aa8,_0x25adc0,_0x3f8f90){return _0x1f7e(_0x25adc0- -0x16a,_0xe57e36);}return normalizeContent(_0x41263a?.[_0x531efb(-0xbd,-0xbc,-_0x2e6cf4._0x50fe0d,-0x8a)])[_0x4fd90a(-_0x2e6cf4._0x67bb9,-0xeb,-_0x2e6cf4._0x4f38f0,-0x105)](_0x3648ea=>_0x3648ea[_0x4fd90a(-0xee,-0xef,-0xed,-0x10b)]===_0x4fd90a(-0xdb,-0xe0,-0xe5,-0xe4));}function getToolResultBlocks(_0x53d934){const _0x154924={_0x5d85e3:0x14e,_0x4d1ac7:0x13e,_0x37e84f:0x14e,_0x5cabe9:0x13c,_0x3aeeaa:0x11e,_0x58bee3:0x152,_0x29ce0d:0x137},_0x16ff0d={_0x391dec:0x2c5};function _0x21a7a0(_0x1ee32d,_0x118333,_0x334b3a,_0x43df14){return _0x1f7e(_0x43df14- -0x1fd,_0x1ee32d);}function _0x4f5d8e(_0x54db3f,_0x4a0d47,_0xa887b6,_0x499d10){return _0x1f7e(_0x499d10-_0x16ff0d._0x391dec,_0xa887b6);}return normalizeContent(_0x53d934?.[_0x21a7a0(-_0x154924._0x5d85e3,-_0x154924._0x4d1ac7,-_0x154924._0x37e84f,-_0x154924._0x5cabe9)])[_0x21a7a0(-_0x154924._0x3aeeaa,-0x139,-_0x154924._0x58bee3,-_0x154924._0x29ce0d)](_0x4c8662=>_0x4c8662[_0x21a7a0(-0x117,-0x118,-0x142,-0x136)]===_0x21a7a0(-0x116,-0x125,-0x140,-0x123));}function createToolResultUserMessage(_0x335279){const _0x2cdd4b={_0x7bd396:0x230,_0xccfaf1:0x218,_0x4df722:0x416,_0x5f45c3:0x3fd},_0x34e328={_0x206869:0x1e9,_0x40a82a:0x1fa,_0x57050c:0x1e2,_0xcc6d0c:0x1f4,_0x1a026b:0x1ef,_0xda9d81:0x1f5,_0x42c8e4:0x1e6,_0x324c09:0x143,_0x126fc7:0x11a,_0x3906d5:0x136,_0x1c0294:0x14e},_0x41ef99={_0xb4f4c5:0x162,_0x300931:0x4f},_0x476a6b={_0x912a26:0x140};function _0x3f71ec(_0x2ac0a3,_0x5c6298,_0x47b6b0,_0x498d3e){return _0x1f7e(_0x498d3e-_0x476a6b._0x912a26,_0x5c6298);}function _0x299b08(_0x5dcad4,_0x4ed5ac,_0x1a2095,_0x325388){return _0x1f7e(_0x1a2095-0x367,_0x4ed5ac);}return{'role':_0x3f71ec(0x222,0x236,_0x2cdd4b._0x7bd396,_0x2cdd4b._0xccfaf1),'content':_0x335279[_0x299b08(0x3f7,0x42c,_0x2cdd4b._0x4df722,_0x2cdd4b._0x5f45c3)](_0x18d0a2=>{const _0x28b4ba={_0x3e12eb:0x5c,_0x836081:0x59};function _0x244c13(_0x3e3796,_0x2645a4,_0x304b4f,_0xc1fd9b){return _0x3f71ec(_0x3e3796-_0x41ef99._0xb4f4c5,_0x304b4f,_0x304b4f-_0x41ef99._0x300931,_0x2645a4- -0x34e);}function _0x301aeb(_0x2a865e,_0x584437,_0xaaa112,_0x1d27ce){return _0x3f71ec(_0x2a865e-_0x28b4ba._0x3e12eb,_0xaaa112,_0xaaa112-_0x28b4ba._0x836081,_0x584437- -0x403);}return{'type':_0x301aeb(-0x1ff,-_0x34e328._0x206869,-_0x34e328._0x40a82a,-0x1fe),'tool_use_id':_0x18d0a2[_0x301aeb(-_0x34e328._0x57050c,-0x1e4,-0x1ce,-0x1df)],'content':_0x18d0a2[_0x301aeb(-0x1e9,-0x202,-_0x34e328._0xcc6d0c,-_0x34e328._0x1a026b)]??_0x18d0a2[_0x301aeb(-0x1e8,-0x1f7,-_0x34e328._0xda9d81,-_0x34e328._0x42c8e4)],'is_error':_0x18d0a2[_0x244c13(-_0x34e328._0x324c09,-0x128,-_0x34e328._0x126fc7,-_0x34e328._0x3906d5)]===_0x244c13(-0x134,-_0x34e328._0x1c0294,-0x135,-0x138)};})};}var INTERRUPTED_TOOL_RESULT_TEXT='Tool\x20execution\x20was\x20interrupted\x20before\x20completion\x20and\x20produced\x20no\x20result.';function synthesizeMissingToolResults(_0x400a3c){const _0x467e89={_0x3f5b36:0x19,_0x23fc0a:0x13,_0xe2bb59:0xc,_0x681754:0x22,_0x4bfb3b:0x1b,_0x103c9e:0x3a,_0x37d4f9:0x29},_0x5b8562={_0x29e0b7:0xec},_0x4773ed=new Set();function _0x541f3d(_0x5873fa,_0x4593f0,_0x432e3d,_0x5f2c1c){return _0x1f7e(_0x5f2c1c- -_0x5b8562._0x29e0b7,_0x4593f0);}for(const _0x4228bd of _0x400a3c){for(const _0x200d6a of getToolResultBlocks(_0x4228bd)){_0x4773ed[_0x541f3d(-_0x467e89._0x3f5b36,-0x14,-0x16,-0xc)](_0x200d6a['tool_use_id']);}}function _0x27d864(_0x4f5847,_0x4e0d11,_0x4ad3fe,_0x3636ab){return _0x1f7e(_0x4ad3fe- -0xe5,_0x4e0d11);}const _0x15963d=[];for(const _0xab8d9e of _0x400a3c){_0x15963d[_0x541f3d(-0x13,-0x1,-_0x467e89._0x23fc0a,-0x1b)](_0xab8d9e);const _0x24fcba=getToolUseBlocks(_0xab8d9e)['filter'](_0x152c35=>!_0x4773ed['has'](_0x152c35['id']));if(_0x24fcba['length']===0x0)continue;_0x15963d[_0x541f3d(-0x18,-_0x467e89._0xe2bb59,-_0x467e89._0x681754,-_0x467e89._0x4bfb3b)]({'role':'user','content':_0x24fcba[_0x27d864(-0x53,-_0x467e89._0x103c9e,-0x36,-_0x467e89._0x37d4f9)](_0x21e0dc=>({'type':_0x27d864(-0x1d,-0x13,-0xb,-0x22),'tool_use_id':_0x21e0dc['id'],'content':INTERRUPTED_TOOL_RESULT_TEXT,'is_error':!![]}))});for(const _0x2199fa of _0x24fcba){_0x4773ed['add'](_0x2199fa['id']);}}return _0x15963d;}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};
|
|
1
|
+
(function(_0x1e2087,_0x544885){const _0x23b81c={_0x5e8937:0x32e,_0x4e509a:0x336,_0x126814:0x16e,_0x4b0e03:0x187,_0x428055:0x15e,_0x540b2d:0x347,_0x549743:0x33a,_0x5e78c8:0x33e,_0x40309d:0x337,_0xf83e88:0x18a,_0x2ca3dc:0x18d,_0x260233:0x151,_0x1be8a5:0x17e,_0x17e83e:0x335,_0x90dfa3:0x17f,_0xc87955:0x182,_0x16afdd:0x191,_0x2a197c:0x341,_0x4d57e3:0x362,_0x479300:0x324,_0x3bc85a:0x315,_0xb6c418:0x179,_0x407966:0x33c,_0x5b1299:0x326},_0x167fd5={_0x2d5005:0x26a};function _0x6fb191(_0x1dbd83,_0x4c5e1e,_0x3405b,_0x39803c){return _0x36a2(_0x1dbd83-0xac,_0x4c5e1e);}function _0x2629d4(_0x4482de,_0x365452,_0x16777a,_0x57a05f){return _0x36a2(_0x4482de-_0x167fd5._0x2d5005,_0x365452);}const _0x160dab=_0x1e2087();while(!![]){try{const _0x576345=-parseInt(_0x2629d4(_0x23b81c._0x5e8937,0x330,0x33d,_0x23b81c._0x4e509a))/0x1*(parseInt(_0x6fb191(_0x23b81c._0x126814,_0x23b81c._0x4b0e03,_0x23b81c._0x428055,0x160))/0x2)+parseInt(_0x2629d4(_0x23b81c._0x540b2d,_0x23b81c._0x549743,_0x23b81c._0x5e78c8,_0x23b81c._0x40309d))/0x3+-parseInt(_0x6fb191(_0x23b81c._0xf83e88,0x17e,0x178,_0x23b81c._0x2ca3dc))/0x4+-parseInt(_0x6fb191(0x164,_0x23b81c._0x260233,_0x23b81c._0x1be8a5,0x146))/0x5+-parseInt(_0x2629d4(0x320,0x320,_0x23b81c._0x17e83e,0x303))/0x6*(-parseInt(_0x6fb191(_0x23b81c._0x90dfa3,0x166,_0x23b81c._0xc87955,_0x23b81c._0x16afdd))/0x7)+parseInt(_0x2629d4(0x354,_0x23b81c._0x2a197c,_0x23b81c._0x4d57e3,0x367))/0x8*(-parseInt(_0x2629d4(_0x23b81c._0x479300,0x339,_0x23b81c._0x3bc85a,0x331))/0x9)+-parseInt(_0x6fb191(0x174,0x185,_0x23b81c._0xb6c418,0x17a))/0xa*(-parseInt(_0x2629d4(_0x23b81c._0x407966,0x31f,_0x23b81c._0x5b1299,0x33a))/0xb);if(_0x576345===_0x544885)break;else _0x160dab['push'](_0x160dab['shift']());}catch(_0x34cd18){_0x160dab['push'](_0x160dab['shift']());}}}(_0x59b9,0x1ef16));function createTextBlock(_0x19c5c8){const _0x1f0b5b={_0x1aa6b2:0x271,_0x5305a1:0x28a};function _0x5e74a3(_0x170b07,_0x35a51b,_0x510dc9,_0x1798c4){return _0x36a2(_0x170b07- -0x358,_0x35a51b);}return{'type':_0x5e74a3(-_0x1f0b5b._0x1aa6b2,-_0x1f0b5b._0x5305a1,-0x28f,-0x283),'text':_0x19c5c8};}function normalizeTextBlock(_0x2537cd){return createTextBlock(_0x2537cd['text']??'');}function normalizeContent(_0x218062){const _0x468eaf={_0x12be8e:0x2b5,_0x4a998a:0x2ca,_0x147885:0x2bb,_0x3cee30:0x306,_0x10a31d:0x2f8,_0x42274f:0x30d},_0x53b9be={_0x445369:0x3e4,_0x130973:0x40a,_0x3bca58:0x40b},_0x2138cb={_0xaf0c34:0x20a};function _0x1cf246(_0x15ce21,_0x468341,_0x4b0802,_0x4492c6){return _0x36a2(_0x4492c6- -0x225,_0x4b0802);}if(typeof _0x218062==='string')return[createTextBlock(_0x218062)];if(!Array[_0x35f7f3(_0x468eaf._0x12be8e,_0x468eaf._0x4a998a,_0x468eaf._0x147885,0x2b7)](_0x218062))return[];function _0x35f7f3(_0x2adc1b,_0x5d2c0d,_0x341de9,_0x309eb9){return _0x36a2(_0x5d2c0d-_0x2138cb._0xaf0c34,_0x341de9);}return _0x218062[_0x35f7f3(_0x468eaf._0x3cee30,_0x468eaf._0x10a31d,0x2e4,_0x468eaf._0x42274f)](_0x2d27f8=>{const _0xc04cae={_0x5a21a8:0x1f},_0x37218d={_0x2addbe:0x93,_0x3ed829:0x12f,_0x2a4e6a:0xd4};function _0x20f9b3(_0x50dddc,_0x397d98,_0x3d2f81,_0x2d2b35){return _0x35f7f3(_0x50dddc-_0x37218d._0x2addbe,_0x50dddc-_0x37218d._0x3ed829,_0x2d2b35,_0x2d2b35-_0x37218d._0x2a4e6a);}function _0x4281ab(_0x45b12f,_0x5c921c,_0xecf3c7,_0x2de044){return _0x35f7f3(_0x45b12f-0xad,_0xecf3c7-_0xc04cae._0x5a21a8,_0x2de044,_0x2de044-0x14e);}if(_0x2d27f8[_0x20f9b3(0x3f0,_0x53b9be._0x445369,0x3f4,_0x53b9be._0x130973)]===_0x20f9b3(0x420,_0x53b9be._0x3bca58,0x412,0x42e))return normalizeTextBlock(_0x2d27f8);return structuredClone(_0x2d27f8);});}function normalizeSystem(_0xd846e0=[]){const _0x137b60={_0xf72271:0x10c,_0x48a6da:0xf7},_0x197184={_0x164880:0x236};function _0x5d2073(_0x361c1c,_0x597fa4,_0x2248bf,_0x15dcf6){return _0x36a2(_0x15dcf6- -_0x197184._0x164880,_0x597fa4);}function _0x4c1f29(_0x5d282a,_0x4a2dc7,_0x5b9251,_0x5a9a12){return _0x36a2(_0x4a2dc7-0x3b,_0x5a9a12);}return normalizeContent(_0xd846e0)[_0x4c1f29(_0x137b60._0xf72271,_0x137b60._0x48a6da,0xfc,0xe8)](_0x2dda5a=>_0x2dda5a[_0x4c1f29(0xef,0xf2,0xd6,0xfc)]===_0x4c1f29(0x11e,0x122,0x125,0x12b));}function _0x36a2(_0x1084a3,_0xa2318d){_0x1084a3=_0x1084a3-0xb6;const _0x59b9a2=_0x59b9();let _0x36a271=_0x59b9a2[_0x1084a3];if(_0x36a2['ocLmfK']===undefined){var _0x2a5f31=function(_0x14f64f){const _0x10ecb2='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x19c5c8='',_0x2537cd='';for(let _0x218062=0x0,_0x2d27f8,_0xd846e0,_0x2dda5a=0x0;_0xd846e0=_0x14f64f['charAt'](_0x2dda5a++);~_0xd846e0&&(_0x2d27f8=_0x218062%0x4?_0x2d27f8*0x40+_0xd846e0:_0xd846e0,_0x218062++%0x4)?_0x19c5c8+=String['fromCharCode'](0xff&_0x2d27f8>>(-0x2*_0x218062&0x6)):0x0){_0xd846e0=_0x10ecb2['indexOf'](_0xd846e0);}for(let _0x39e440=0x0,_0x532318=_0x19c5c8['length'];_0x39e440<_0x532318;_0x39e440++){_0x2537cd+='%'+('00'+_0x19c5c8['charCodeAt'](_0x39e440)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x2537cd);};_0x36a2['BDqSWa']=_0x2a5f31,_0x36a2['BJhXOv']={},_0x36a2['ocLmfK']=!![];}const _0x27c2e9=_0x59b9a2[0x0],_0x2858b5=_0x1084a3+_0x27c2e9,_0x57a61a=_0x36a2['BJhXOv'][_0x2858b5];return!_0x57a61a?(_0x36a271=_0x36a2['BDqSWa'](_0x36a271),_0x36a2['BJhXOv'][_0x2858b5]=_0x36a271):_0x36a271=_0x57a61a,_0x36a271;}function normalizeMessage(_0x39e440){const _0x3eadb1={_0x43e208:0x2be,_0x4dc5c3:0x2a9,_0x578ee1:0x2a5,_0x4ae766:0x38e,_0x2dba93:0x380,_0x439e6e:0x352,_0x394c73:0x342,_0x4b3753:0x33c,_0x1a50e2:0x350,_0x4e4681:0x28d,_0x641296:0x295,_0x2deb11:0x2a8,_0x494901:0x27a,_0x4e8c3f:0x28d},_0x51c2b7={_0x58ac36:0x293},_0xc9f110={_0x49022d:0x37c};function _0x35ad9a(_0x58c500,_0x28506c,_0x4fc793,_0x76789f){return _0x36a2(_0x58c500- -_0xc9f110._0x49022d,_0x28506c);}function _0xe651f0(_0xff740a,_0x26d085,_0x2461fb,_0x19ca49){return _0x36a2(_0x19ca49-_0x51c2b7._0x58ac36,_0xff740a);}return{...typeof _0x39e440['id']===_0x35ad9a(-_0x3eadb1._0x43e208,-0x2ae,-_0x3eadb1._0x4dc5c3,-_0x3eadb1._0x578ee1)?{'id':_0x39e440['id']}:{},'role':_0x39e440[_0xe651f0(0x37a,_0x3eadb1._0x4ae766,0x366,_0x3eadb1._0x2dba93)],'content':normalizeContent(_0x39e440[_0xe651f0(_0x3eadb1._0x439e6e,_0x3eadb1._0x394c73,_0x3eadb1._0x4b3753,_0x3eadb1._0x1a50e2)]),..._0x39e440[_0x35ad9a(-_0x3eadb1._0x4e4681,-_0x3eadb1._0x641296,-_0x3eadb1._0x2deb11,-_0x3eadb1._0x494901)]?{'providerState':structuredClone(_0x39e440[_0x35ad9a(-_0x3eadb1._0x4e4681,-_0x3eadb1._0x4e8c3f,-0x282,-0x295)])}:{}};}function compileRequest(_0x532318){const _0x2ea852={_0x4995f2:0x1bd,_0x337ac0:0x1d1,_0x476f83:0x1c5,_0x1968a6:0x1c7,_0x51179a:0x1cf,_0x98d716:0x1b6,_0x169e21:0x1cd,_0x753a39:0x20f,_0x58cce3:0x1db,_0x3895ef:0x1ee,_0x3fc6d3:0x1be,_0x372f9e:0x228,_0x5a3289:0x213},_0x2e83bc={_0x29f9ce:0x2a6};function _0x5d00c2(_0x4afa22,_0x916a70,_0x194e7b,_0x373b3c){return _0x36a2(_0x194e7b- -0x2fa,_0x373b3c);}function _0x4bc06f(_0x26106b,_0x27b95d,_0x5d4ffe,_0x33df05){return _0x36a2(_0x27b95d- -_0x2e83bc._0x29f9ce,_0x33df05);}return{'model':_0x532318[_0x5d00c2(-0x227,-0x20d,-0x221,-0x22c)]??_0x4bc06f(-0x1b3,-_0x2ea852._0x4995f2,-_0x2ea852._0x337ac0,-_0x2ea852._0x476f83),'max_tokens':_0x532318[_0x4bc06f(-0x1d6,-0x1d5,-0x1ba,-_0x2ea852._0x1968a6)]??0x400,..._0x532318[_0x4bc06f(-0x1e4,-_0x2ea852._0x51179a,-_0x2ea852._0x98d716,-0x1cb)]?{'reasoning':structuredClone(_0x532318[_0x4bc06f(-_0x2ea852._0x169e21,-0x1cf,-0x1ba,-0x1b6)])}:{},'system':normalizeSystem(_0x532318[_0x5d00c2(-_0x2ea852._0x753a39,-0x213,-0x21b,-0x225)]),'messages':_0x532318[_0x4bc06f(-0x1d8,-_0x2ea852._0x58cce3,-_0x2ea852._0x3895ef,-0x1d6)][_0x4bc06f(-0x1c5,-0x1b8,-0x1bc,-_0x2ea852._0x3fc6d3)](normalizeMessage),'tools':structuredClone(_0x532318['tools']??[]),'metadata':{'session_id':_0x532318[_0x5d00c2(-_0x2ea852._0x372f9e,-_0x2ea852._0x5a3289,-0x225,-0x214)],'turn_id':_0x532318['turnId']}};}function toChatRequest(_0xc6d216){const _0x92283f={_0x5451e7:0x2a6,_0x294fbf:0x295,_0x4664bc:0x297,_0x2edebd:0x1d5,_0x1d3733:0x1b4,_0xacd710:0x1ca,_0xfec370:0x2a8,_0x45690f:0x2af,_0x177286:0x2b7,_0x396ed6:0x288,_0xae4b1:0x2a4,_0x3abbd0:0x299,_0x1fc8b5:0x2ab,_0xdaf3f2:0x1a3,_0x534dd4:0x1ae,_0x30c406:0x1a4,_0x299038:0x2bd,_0xdef16c:0x1c4,_0x45a7ed:0x1cf,_0x395a30:0x1aa},_0x28da81={_0x55f4c8:0xe0};function _0x2ee2ef(_0x62cdd6,_0xc76fb9,_0x96e8d7,_0x5a2fc7){return _0x36a2(_0xc76fb9-_0x28da81._0x55f4c8,_0x5a2fc7);}function _0xa02866(_0x48a405,_0x28350a,_0x4d3183,_0x4966f9){return _0x36a2(_0x28350a- -0x37f,_0x48a405);}return{'model':_0xc6d216[_0xa02866(-0x2ad,-_0x92283f._0x5451e7,-_0x92283f._0x294fbf,-_0x92283f._0x4664bc)],'maxTokens':_0xc6d216['max_tokens'],..._0xc6d216[_0x2ee2ef(_0x92283f._0x2edebd,0x1b7,_0x92283f._0x1d3733,_0x92283f._0xacd710)]?{'reasoning':structuredClone(_0xc6d216[_0xa02866(-0x2b3,-_0x92283f._0xfec370,-_0x92283f._0x45690f,-0x29b)])}:{},'system':structuredClone(_0xc6d216['system']),'messages':structuredClone(_0xc6d216['messages']),'tools':structuredClone(_0xc6d216[_0xa02866(-0x29e,-0x29d,-_0x92283f._0x177286,-0x2a2)]),'metadata':{'sessionId':_0xc6d216[_0xa02866(-_0x92283f._0x396ed6,-_0x92283f._0xae4b1,-_0x92283f._0x3abbd0,-_0x92283f._0x1fc8b5)][_0x2ee2ef(0x198,_0x92283f._0xdaf3f2,_0x92283f._0x534dd4,_0x92283f._0x30c406)],'turnId':_0xc6d216[_0xa02866(-_0x92283f._0x299038,-_0x92283f._0xae4b1,-0x293,-_0x92283f._0x4664bc)][_0x2ee2ef(0x1d6,_0x92283f._0xdef16c,_0x92283f._0x45a7ed,_0x92283f._0x395a30)]}};}function toModelRequest(_0x4f3234){const _0x515a6a={_0x899ca8:0x7e,_0x34a232:0x62,_0x114e97:0x86,_0x1bed45:0x82,_0x3bf3a9:0x7a,_0x528c18:0x6a,_0x32c4b4:0x58,_0x249e46:0x75,_0x3fa1a4:0x68,_0x28b3aa:0x1be},_0x320519={_0x3c1af5:0x277};function _0x18e747(_0x56c11f,_0x1b22b2,_0x2897b4,_0x27af0a){return _0x36a2(_0x27af0a- -_0x320519._0x3c1af5,_0x56c11f);}function _0x46326a(_0x5cc84d,_0x2174bc,_0x386b6f,_0x2e83a0){return _0x36a2(_0x5cc84d- -0x68,_0x2e83a0);}return{'model':_0x4f3234['model'],'max_tokens':_0x4f3234[_0x46326a(0x89,_0x515a6a._0x899ca8,0x6f,0x70)],..._0x4f3234[_0x46326a(0x6f,0x6f,_0x515a6a._0x34a232,0x61)]?{'reasoning':structuredClone(_0x4f3234[_0x46326a(0x6f,_0x515a6a._0x114e97,_0x515a6a._0x1bed45,0x68)])}:{},'system':structuredClone(_0x4f3234['system']),'messages':structuredClone(_0x4f3234[_0x18e747(-0x1a0,-0x19a,-0x18e,-0x1ac)]),'tools':structuredClone(_0x4f3234[_0x46326a(_0x515a6a._0x3bf3a9,_0x515a6a._0x34a232,0x6c,_0x515a6a._0x528c18)]),'metadata':{'session_id':_0x4f3234[_0x46326a(0x73,_0x515a6a._0x32c4b4,0x61,_0x515a6a._0x249e46)]['sessionId'],'turn_id':_0x4f3234[_0x46326a(0x73,0x5f,0x74,_0x515a6a._0x3fa1a4)][_0x18e747(-0x1b4,-0x1bc,-0x1b5,-_0x515a6a._0x28b3aa)]}};}function _0x209649(_0x847714,_0x3c0d44,_0x5372ff,_0x2e0149){const _0x36e533={_0xf406d6:0x207};return _0x36a2(_0x847714- -_0x36e533._0xf406d6,_0x5372ff);}function toProviderModelRequest(_0x26be8c){const _0x567f62={_0x5e39ca:0x322,_0x545a9e:0x30c,_0xffcd1c:0x335},_0x1bfbb9={_0x5e81d4:0x257};function _0x4e63f8(_0x44c8fd,_0x17678f,_0x198c89,_0x34bcd1){return _0x36a2(_0x44c8fd-_0x1bfbb9._0x5e81d4,_0x17678f);}return{'model':_0x26be8c['model'],'max_tokens':_0x26be8c['maxTokens'],'system':structuredClone(_0x26be8c['system']),'messages':structuredClone(_0x26be8c[_0x4e63f8(_0x567f62._0x5e39ca,_0x567f62._0x545a9e,0x337,_0x567f62._0xffcd1c)]),'tools':structuredClone(_0x26be8c['tools'])};}function toChatResponse(_0x1a7b5d){const _0x5868df={_0x2369cb:0xc9,_0x182114:0xd8,_0x36b278:0x216,_0x2a864d:0x22b,_0x16166d:0xdf,_0x23329b:0x254,_0x4f14ed:0x23f,_0x5f1cbf:0xde,_0x439bd3:0xdd,_0x5e5e5e:0xcf,_0x2a51e0:0xea,_0xa48d13:0x233,_0x3cf531:0x220,_0x34af8e:0x211,_0x239ec7:0x21d,_0x1cf544:0xda,_0x47b836:0xb3,_0x1fff57:0xd0,_0x5a5086:0xd3},_0x454809={_0x32aba6:0x1b8};function _0x368391(_0x5529cf,_0x3e79f2,_0x65b2ef,_0x1b96df){return _0x36a2(_0x1b96df- -_0x454809._0x32aba6,_0x5529cf);}function _0x5f6c9f(_0xb02093,_0x5a4118,_0x16774a,_0x57027c){return _0x36a2(_0x57027c-0x14f,_0x5a4118);}return{'id':_0x1a7b5d['id'],'content':structuredClone(_0x1a7b5d['content']),'stopReason':_0x1a7b5d['stop_reason'],'usage':{'inputTokens':_0x1a7b5d[_0x368391(-_0x5868df._0x2369cb,-0xb9,-_0x5868df._0x182114,-0xc8)][_0x5f6c9f(_0x5868df._0x36b278,0x208,0x22d,0x215)],'outputTokens':_0x1a7b5d[_0x5f6c9f(_0x5868df._0x2a864d,0x256,0x234,0x23f)][_0x368391(-0xc3,-_0x5868df._0x16166d,-0xcb,-0xd2)],..._0x1a7b5d[_0x5f6c9f(_0x5868df._0x23329b,0x22f,0x258,_0x5868df._0x4f14ed)][_0x368391(-_0x5868df._0x5f1cbf,-_0x5868df._0x439bd3,-_0x5868df._0x5e5e5e,-_0x5868df._0x2a51e0)]!==void 0x0?{'reasoningTokens':_0x1a7b5d[_0x5f6c9f(0x227,0x24c,_0x5868df._0xa48d13,0x23f)][_0x5f6c9f(_0x5868df._0x3cf531,_0x5868df._0x34af8e,0x21f,_0x5868df._0x239ec7)]}:{}},..._0x1a7b5d[_0x368391(-_0x5868df._0x1cf544,-_0x5868df._0x47b836,-_0x5868df._0x47b836,-_0x5868df._0x2369cb)]?{'providerState':structuredClone(_0x1a7b5d[_0x368391(-_0x5868df._0x1fff57,-_0x5868df._0x5f1cbf,-_0x5868df._0x5a5086,-_0x5868df._0x2369cb)])}:{}};}function toModelResponse(_0x55348b){const _0x404ab8={_0x4c2877:0x24,_0x24aa01:0x18,_0x462e64:0x16,_0x44c053:0xc,_0x567754:0x27,_0x5c7082:0x13,_0x37daa0:0x3,_0x3ae283:0x6,_0x4dce92:0x32,_0x19b5a5:0x1c,_0x25b4fb:0xa,_0x19574f:0x37,_0x328ed8:0x7,_0x32effe:0x22,_0x50d7de:0x53,_0x14a28a:0x4b,_0x482830:0x1c,_0x227454:0x6},_0x51255f={_0x5bf75a:0xe9};function _0xebcf7f(_0x38ee17,_0x56e42d,_0x130662,_0x152dc2){return _0x36a2(_0x130662- -_0x51255f._0x5bf75a,_0x152dc2);}function _0x5c5e97(_0x472240,_0x4613d2,_0x30f03a,_0x3e4eb0){return _0x36a2(_0x472240- -0xa7,_0x3e4eb0);}return{'id':_0x55348b['id'],'type':_0xebcf7f(-_0x404ab8._0x4c2877,-0x37,-0x24,-_0x404ab8._0x24aa01),'role':'assistant','content':structuredClone(_0x55348b[_0x5c5e97(_0x404ab8._0x462e64,_0x404ab8._0x44c053,_0x404ab8._0x567754,_0x404ab8._0x5c7082)]),'stop_reason':_0x55348b['stopReason'],'stop_sequence':null,'usage':{'input_tokens':_0x55348b[_0xebcf7f(0x2,_0x404ab8._0x37daa0,0x7,_0x404ab8._0x3ae283)][_0xebcf7f(-0xa,-_0x404ab8._0x4dce92,-_0x404ab8._0x19b5a5,-_0x404ab8._0x25b4fb)],'output_tokens':_0x55348b['usage'][_0x5c5e97(0x33,_0x404ab8._0x19574f,0x3a,0x2f)],..._0x55348b[_0xebcf7f(_0x404ab8._0x328ed8,_0x404ab8._0x32effe,0x7,_0x404ab8._0x4c2877)]['reasoningTokens']!==void 0x0?{'reasoning_tokens':_0x55348b[_0x5c5e97(0x49,_0x404ab8._0x50d7de,_0x404ab8._0x14a28a,0x48)]['reasoningTokens']}:{}},..._0x55348b['providerState']?{'providerState':structuredClone(_0x55348b[_0xebcf7f(_0x404ab8._0x482830,-0x2,_0x404ab8._0x227454,-0x18)])}:{}};}function responseToAssistantMessage(_0x439bf6){const _0x386b25={_0x5a0b4b:0x273,_0x13bb54:0x26b,_0x1200b8:0x280,_0xe22a0e:0x28c},_0x4af04d={_0x32c7b0:0x1ae},_0x152f20={_0xf4ef70:0x203};function _0x46644e(_0x3d6874,_0x424cbb,_0x126bd4,_0x21ea4b){return _0x36a2(_0x126bd4- -_0x152f20._0xf4ef70,_0x3d6874);}function _0x15c70d(_0x1031a5,_0x21b3b2,_0x1e6325,_0x3de058){return _0x36a2(_0x21b3b2-_0x4af04d._0x32c7b0,_0x1031a5);}return{'role':'assistant','content':normalizeContent(_0x439bf6[_0x15c70d(_0x386b25._0x5a0b4b,_0x386b25._0x13bb54,_0x386b25._0x1200b8,0x268)]),..._0x439bf6['providerState']?{'providerState':structuredClone(_0x439bf6[_0x15c70d(0x28e,0x29d,_0x386b25._0xe22a0e,0x2a2)])}:{}};}function createReasoningMessage(_0x265c56){const _0x1130b6={_0x30878f:0x1de,_0x1b8b0e:0x1fb,_0x27e99d:0x1e6,_0x2f963d:0x1d9,_0x538740:0x1d6,_0x6beb46:0x1fe},_0x752fa1={_0x5bdbf6:0x2a2},_0x4f3d11={_0x128227:0x38a,_0x32a10d:0x36c,_0x3d4ac4:0x1e2,_0x1fd1fc:0x1c1,_0x2b1144:0x1e5,_0x423541:0x1c7,_0x5d74a6:0x1c0,_0x26d986:0x1a7,_0x548616:0x197,_0xdfafca:0x1e8,_0x1df2fb:0x1d3},_0x284b37={_0x13e9d3:0x34d};function _0x58d537(_0x4de8d0,_0x165fdf,_0x519258,_0x5ce747){return _0x36a2(_0x519258- -_0x284b37._0x13e9d3,_0x4de8d0);}const _0x3f1ded=normalizeContent(_0x265c56?.[_0x2aa7ec(-0x1e9,-_0x1130b6._0x30878f,-0x1e5,-0x1d6)])[_0x2aa7ec(-_0x1130b6._0x1b8b0e,-0x1f8,-_0x1130b6._0x27e99d,-_0x1130b6._0x2f963d)](_0x497ccc=>{const _0x43ed73={_0xf5d9bc:0x118},_0x1eb753={_0x180386:0x121,_0x39496f:0x620};function _0x4697ca(_0x78b6bb,_0xfbe35e,_0x3e56e4,_0x4ae630){return _0x58d537(_0x3e56e4,_0xfbe35e-_0x1eb753._0x180386,_0xfbe35e-_0x1eb753._0x39496f,_0x4ae630-0x1da);}function _0x9b5084(_0x4c076a,_0x5b3fcc,_0x3af45e,_0xcdfcf4){return _0x2aa7ec(_0x4c076a-0xa3,_0x5b3fcc-_0x43ed73._0xf5d9bc,_0xcdfcf4-0x389,_0x4c076a);}return _0x497ccc[_0x4697ca(0x375,_0x4f3d11._0x128227,_0x4f3d11._0x32a10d,0x39d)]===_0x9b5084(_0x4f3d11._0x3d4ac4,_0x4f3d11._0x1fd1fc,_0x4f3d11._0x2b1144,_0x4f3d11._0x423541)||_0x497ccc['type']===_0x9b5084(0x1b9,0x1c1,_0x4f3d11._0x5d74a6,0x1b0)||_0x497ccc[_0x9b5084(0x1ad,_0x4f3d11._0x26d986,_0x4f3d11._0x548616,0x19e)]===_0x9b5084(0x1b5,_0x4f3d11._0xdfafca,0x1e0,_0x4f3d11._0x1df2fb);});function _0x2aa7ec(_0x4947ed,_0x14df5f,_0x17e320,_0x3b9722){return _0x36a2(_0x17e320- -_0x752fa1._0x5bdbf6,_0x3b9722);}if(_0x3f1ded[_0x2aa7ec(-0x1c5,-_0x1130b6._0x538740,-0x1ba,-0x1b3)]===0x0)return void 0x0;return{'role':_0x2aa7ec(-_0x1130b6._0x6beb46,-0x1d8,-0x1e1,-_0x1130b6._0x27e99d),'content':_0x3f1ded};}function createAssistantTextMessage(_0x4f2277){const _0x40e468={_0x58cbe0:0x227,_0x59f0cf:0x22b,_0x230f96:0x23f,_0x46093f:0x218,_0x512f19:0x210,_0x305602:0x223},_0x3b3582={_0x4d1707:0x135},_0x3027e6={_0x2933b4:0x8e,_0x510395:0xa0,_0x456a04:0xb8},_0x331f46={_0x19cca3:0x1b5,_0x164f3e:0x28c},_0x51aec8=normalizeContent(_0x4f2277?.[_0x48fc1c(-_0x40e468._0x58cbe0,-0x213,-_0x40e468._0x59f0cf,-0x20e)])[_0x48fc1c(-0x228,-0x236,-0x219,-_0x40e468._0x230f96)](_0x7b9696=>{function _0x5b8f5b(_0x138b39,_0x221459,_0x2f51df,_0x554902){return _0x27bc53(_0x138b39,_0x221459-_0x331f46._0x19cca3,_0x2f51df-0x63,_0x221459- -_0x331f46._0x164f3e);}return _0x7b9696[_0x5b8f5b(-_0x3027e6._0x2933b4,-_0x3027e6._0x510395,-_0x3027e6._0x456a04,-0x97)]==='text';});if(_0x51aec8[_0x27bc53(0x208,_0x40e468._0x46093f,_0x40e468._0x512f19,0x21d)]===0x0)return void 0x0;function _0x48fc1c(_0x4318b2,_0x17138d,_0x5cb837,_0x1b338d){return _0x36a2(_0x4318b2- -0x2e4,_0x17138d);}function _0x27bc53(_0x33f3a2,_0x119936,_0x593b6f,_0x153830){return _0x36a2(_0x153830-_0x3b3582._0x4d1707,_0x33f3a2);}return{'role':_0x48fc1c(-_0x40e468._0x305602,-0x21d,-0x23b,-0x206),'content':_0x51aec8};}function createToolUseMessage(_0x5ecdb1){const _0x2cf8dc={_0x239b40:0x73,_0x499eb6:0x63,_0x3db400:0x4e,_0x57d91d:0x54,_0x397914:0x44,_0x6dd87f:0x38,_0xf5f0ff:0x47,_0x3d99df:0x5e,_0x53bb2a:0x74,_0x4cd98d:0x5f},_0x13e7b4={_0x3e28a7:0x1c6,_0x57140e:0x1c7,_0x4847c8:0x1af,_0x35231e:0x26d};function _0x156b4b(_0x5e3b96,_0x1c1291,_0x24588f,_0x2054c2){return _0x36a2(_0x2054c2- -0x120,_0x1c1291);}const _0x1ed44c=normalizeContent(_0x5ecdb1?.[_0x156b4b(-_0x2cf8dc._0x239b40,-0x78,-0x60,-_0x2cf8dc._0x499eb6)])[_0x156b4b(-0x47,-0x77,-0x5f,-0x64)](_0x16fca0=>{const _0x39cb1b={_0x74d4ea:0xb9},_0x5cbe6a={_0x431ace:0x138};function _0x41a334(_0x1654f8,_0x2c52e,_0xb7a8ba,_0x1506a0){return _0xd6b2f9(_0x1654f8-0x44,_0x2c52e-_0x5cbe6a._0x431ace,_0xb7a8ba- -0x202,_0x2c52e);}function _0x56e4da(_0x4e79c7,_0x24df3a,_0x1852b9,_0x369e34){return _0x156b4b(_0x4e79c7-0x17,_0x369e34,_0x1852b9-_0x39cb1b._0x74d4ea,_0x1852b9-0x2c5);}return _0x16fca0[_0x41a334(_0x13e7b4._0x3e28a7,_0x13e7b4._0x57140e,0x1b8,_0x13e7b4._0x4847c8)]===_0x56e4da(0x28d,0x289,0x27d,_0x13e7b4._0x35231e);});function _0xd6b2f9(_0x5858a5,_0x54e2cb,_0x46523c,_0x634258){return _0x36a2(_0x46523c-0x303,_0x634258);}if(_0x1ed44c[_0x156b4b(-_0x2cf8dc._0x3db400,-_0x2cf8dc._0x57d91d,-_0x2cf8dc._0x397914,-_0x2cf8dc._0x6dd87f)]===0x0)return void 0x0;return{'role':_0x156b4b(-_0x2cf8dc._0xf5f0ff,-_0x2cf8dc._0x3d99df,-_0x2cf8dc._0x53bb2a,-_0x2cf8dc._0x4cd98d),'content':_0x1ed44c};}function getTextFromMessage(_0x3c5467){const _0x30f8b0={_0x1eb88d:0x28b,_0x3a37ee:0x286,_0x527c6c:0x29e,_0x357b34:0x2a6,_0x30f7d5:0x2a7,_0x4706e3:0x160,_0xb87f7b:0x14f,_0x4b899a:0x150},_0x17454f={_0x508350:0x1ce};function _0x4ab3cc(_0x5ebca2,_0x507707,_0x53a6b1,_0x319d9e){return _0x36a2(_0x319d9e-0x86,_0x507707);}function _0x159767(_0x3bbee1,_0x3e988a,_0x53c820,_0xf46ea0){return _0x36a2(_0x3bbee1-_0x17454f._0x508350,_0xf46ea0);}return normalizeContent(_0x3c5467?.[_0x159767(_0x30f8b0._0x1eb88d,_0x30f8b0._0x3a37ee,0x274,_0x30f8b0._0x527c6c)])[_0x159767(0x28a,_0x30f8b0._0x357b34,0x29e,_0x30f8b0._0x30f7d5)](_0x44ddbd=>_0x44ddbd[_0x159767(0x285,0x277,0x29f,0x29b)]===_0x159767(0x2b5,0x2a0,0x2af,0x2ab))[_0x159767(0x2bc,0x2c3,0x2a6,0x2ab)](_0x4b0962=>_0x4b0962[_0x4ab3cc(0x17f,0x15d,0x157,0x16d)])[_0x4ab3cc(0x162,_0x30f8b0._0x4706e3,_0x30f8b0._0xb87f7b,_0x30f8b0._0x4b899a)]('\x0a');}function getReasoningTextFromMessage(_0x5eef3c){const _0xeb54c8={_0x210dfc:0x1b0,_0x38df95:0x14a,_0x45c50d:0x13e},_0x336afe={_0xbc4d84:0x346,_0x41a1fa:0x330,_0x32fad7:0x33b,_0x2070e0:0x345,_0x35d908:0x395,_0x4cf2bf:0x3b1,_0x2f0348:0x348,_0x46aec9:0x352,_0x230cae:0x356,_0x202409:0x355,_0x33d786:0x357,_0x104ce8:0x362,_0x17de9b:0x391,_0x14894d:0x37b,_0x4b165f:0x3ae,_0x40db20:0x3ab,_0x152476:0x368,_0x52d183:0x35d,_0x158a49:0x351,_0x44d90e:0x3b7,_0x26c6b1:0x3a5,_0x13f8d9:0x34a,_0x57af48:0x37a,_0x22e88f:0x38c,_0x19de66:0x39c,_0x144f5c:0x38d,_0x485d9c:0x3a4},_0x213eba={_0x16bd1d:0xc7},_0x40abd1={_0xad9e1f:0x215};function _0x1a0cf5(_0x204d52,_0x409cb8,_0x1d6b49,_0x5b7297){return _0x36a2(_0x409cb8- -_0x40abd1._0xad9e1f,_0x5b7297);}function _0x2f9a85(_0x92be30,_0x51b300,_0x24004a,_0x15bfa0){return _0x36a2(_0x24004a-_0x213eba._0x16bd1d,_0x92be30);}return normalizeContent(_0x5eef3c?.['content'])[_0x2f9a85(0x1b3,_0xeb54c8._0x210dfc,0x1ac,0x1b3)](_0xfcf74c=>{const _0x5f4a54={_0x221413:0x1e8,_0x4864c1:0x1f6,_0x44e474:0x1b3};if(_0xfcf74c[_0x847228(0x335,0x311,0x31a,0x32c)]===_0x847228(_0x336afe._0xbc4d84,0x336,0x32c,0x33e))return _0xfcf74c[_0x847228(0x352,0x34d,0x347,0x34b)][_0x847228(_0x336afe._0x41a1fa,0x350,_0x336afe._0x32fad7,_0x336afe._0x2070e0)]()[_0x4d7979(0x3ba,_0x336afe._0x35d908,_0x336afe._0x4cf2bf,0x3a5)]>0x0?[_0xfcf74c[_0x847228(0x333,0x344,_0x336afe._0x2f0348,0x34b)]]:[];if(_0xfcf74c['type']===_0x847228(_0x336afe._0x46aec9,_0x336afe._0x230cae,0x356,_0x336afe._0x202409))return[_0x847228(0x355,_0x336afe._0x33d786,0x35d,0x360)];if(_0xfcf74c[_0x4d7979(_0x336afe._0x104ce8,_0x336afe._0x17de9b,_0x336afe._0x14894d,0x374)]!==_0x4d7979(0x390,0x3be,0x3a9,0x3a9))return[];function _0x847228(_0x37f095,_0x17cb97,_0x154bf8,_0x52458e){return _0x2f9a85(_0x17cb97,_0x17cb97-0xe3,_0x52458e-0x1ae,_0x52458e-0x92);}const _0xc3142=_0xfcf74c['summary'][_0x4d7979(_0x336afe._0x4b165f,0x38d,0x394,_0x336afe._0x40db20)](_0xce3014=>_0xce3014[_0x4d7979(0x397,0x3b4,0x3b1,0x3a4)])[_0x4d7979(0x386,0x36b,_0x336afe._0x152476,0x379)](_0x2ce1f0=>_0x2ce1f0[_0x4d7979(0x38b,0x396,0x39a,0x38d)]()[_0x847228(0x354,0x34f,0x366,0x35d)]>0x0)[_0x847228(_0x336afe._0x52d183,0x354,_0x336afe._0x158a49,0x33f)]('\x0a\x0a');if(_0xc3142[_0x4d7979(0x397,0x3b5,_0x336afe._0x44d90e,_0x336afe._0x26c6b1)]>0x0)return[_0xc3142];if(_0xfcf74c[_0x847228(_0x336afe._0x13f8d9,0x34b,_0x336afe._0x57af48,0x35c)]&&_0xfcf74c['text'][_0x4d7979(_0x336afe._0x22e88f,_0x336afe._0x19de66,0x3a4,_0x336afe._0x144f5c)]()['length']>0x0)return[_0xfcf74c['text']];function _0x4d7979(_0x457406,_0x1625d1,_0x59e930,_0x15be4a){return _0x2f9a85(_0x59e930,_0x1625d1-_0x5f4a54._0x221413,_0x15be4a-_0x5f4a54._0x4864c1,_0x15be4a-_0x5f4a54._0x44e474);}return _0xfcf74c['encryptedContent']?[_0x4d7979(0x3a7,_0x336afe._0x485d9c,0x39b,0x3a0)]:[];})[_0x1a0cf5(-_0xeb54c8._0x38df95,-0x14b,-0x15c,-_0xeb54c8._0x45c50d)]('\x0a\x0a');}function getToolUseBlocks(_0x4e7296){const _0x57b957={_0x4979b7:0x293,_0x46e5f3:0x286,_0x4eaddb:0x268};function _0x2b7e16(_0x2c232f,_0x1bb046,_0x55a582,_0x290004){return _0x36a2(_0x1bb046- -0x342,_0x2c232f);}return normalizeContent(_0x4e7296?.['content'])[_0x2b7e16(-_0x57b957._0x4979b7,-_0x57b957._0x46e5f3,-_0x57b957._0x4eaddb,-0x28c)](_0x4f8182=>_0x4f8182['type']==='tool_use');}function getToolResultBlocks(_0x21279f){const _0x2fcf40={_0x34c2e3:0x2cf,_0x3756cf:0x2b8},_0x501020={_0x4960e3:0x217};function _0x2cef5e(_0x4e63e9,_0x5693eb,_0x5cceda,_0x577deb){return _0x36a2(_0x4e63e9- -_0x501020._0x4960e3,_0x5693eb);}function _0x3c2d02(_0x51ad57,_0x574a28,_0x131a03,_0x42b19e){return _0x36a2(_0x51ad57- -0x38b,_0x131a03);}return normalizeContent(_0x21279f?.['content'])[_0x3c2d02(-_0x2fcf40._0x34c2e3,-0x2c2,-0x2c4,-_0x2fcf40._0x3756cf)](_0x27e28c=>_0x27e28c[_0x2cef5e(-0x160,-0x14b,-0x17d,-0x157)]===_0x3c2d02(-0x2aa,-0x294,-0x2a8,-0x2ba));}function createToolResultUserMessage(_0x2e6881){const _0xb21e65={_0x42a65c:0x3ea,_0x57b862:0x3f6,_0x480b69:0x3be,_0x20744e:0x3c6,_0x5042fb:0x3d7,_0x3234d5:0x3e9,_0x2eb648:0x3f4},_0x1f16c4={_0x4b6f01:0x31a};return{'role':'user','content':_0x2e6881['map'](_0x136d4c=>{function _0x158984(_0x2003ea,_0x4b16e6,_0x41e745,_0x3caf02){return _0x36a2(_0x41e745-0x304,_0x2003ea);}function _0x5d62b9(_0x1d3b63,_0x3ff217,_0x30a257,_0x13a4e5){return _0x36a2(_0x13a4e5-_0x1f16c4._0x4b6f01,_0x3ff217);}return{'type':_0x5d62b9(0x3e2,_0xb21e65._0x42a65c,_0xb21e65._0x57b862,0x3fb),'tool_use_id':_0x136d4c[_0x5d62b9(0x3d6,0x3f5,0x3d1,0x3e9)],'content':_0x136d4c[_0x5d62b9(0x3df,_0xb21e65._0x480b69,_0xb21e65._0x20744e,_0xb21e65._0x5042fb)]??_0x136d4c['output'],'is_error':_0x136d4c['status']===_0x5d62b9(_0xb21e65._0x3234d5,_0xb21e65._0x2eb648,0x3e5,0x3d9)};})};}var INTERRUPTED_TOOL_RESULT_TEXT=_0x209649(-0x12b,-0x11f,-0x142,-0x149);function _0x59b9(){const _0x3b882a=['Aw5WDxruB2TLBNm','CMvHC29UAw5Nx3rVA2vUCW','y2fSBeLK','DhjPBq','Bwf4x3rVA2vUCW','mtfpvKjKB2i','mZu3u3jKvNbH','ywrK','C2vZC2LVBKLK','DgHPBMTPBMC','CMvHC29UAw5N','Dg9VBf91C2u','Bw9KzwW','B3v0Chv0vg9Rzw5Z','Bwv0ywrHDge','vg9VBcbLEgvJDxrPB24GD2fZigLUDgvYCNvWDgvKigjLzM9YzsbJB21WBgv0Aw9UigfUzcbWCM9KDwnLzcbUBYbYzxn1BhqU','mZu5nJqZr2zJq2Dq','nZC0nJG4vLLqzefK','C3LZDgvT','yw50AhjVCgLJx3jLzgfJDgvKx3rOAw5RAw5N','Dg9VBf9Yzxn1Bhq','Dg9VBhm','kgvUy3j5ChrLzcbYzwfZB25PBMCP','DhvYBL9Pza','zMXHDe1HCa','B3v0Chv0x3rVA2vUCW','Dgv4Da','BgvUz3rO','y2XHDwrLlxnVBM5LDc00ltiWmJuWnte0','mtq5mdC3nMXtzw14tq','khjLzgfJDgvKihjLyxnVBMLUzYK','B3bLBMfPx3jLyxnVBMLUzW','CM9Szq','BwfW','ChjVDMLKzxjtDgf0zq','DxnHz2u','Bwf4vg9Rzw5Z','mJGYmtjWuu1ovfq','DhLWzq','nJi5mtyWELn6Bu1N','DhvYBKLK','ow92quP3ta','Dg9VBf91C2vFAwq','zMLSDgvY','y29UDgvUDa','C3rYAw5N','zxjYB3i','AxnbCNjHEq','yxnZAxn0yw50','nJi2nKXLwLjOra','C2vZC2LVBL9Pza','nZfrzMjlvgG','BwvZC2fNzq','Aw5WDxrFDg9Rzw5Z','AgfZ','ndK1mZuZmfPpweTRDa','yw50AhjVCgLJx3rOAw5RAw5N','AM9PBG','BwvZC2fNzxm','ChvZAa'];_0x59b9=function(){return _0x3b882a;};return _0x59b9();}function synthesizeMissingToolResults(_0x175296){const _0x5e0d08={_0x3b2d0d:0xb9,_0x297068:0xbf,_0x175c43:0xac,_0x5da5a5:0xd8,_0x1291da:0x22d,_0x5b9501:0x242,_0x108ab7:0x243,_0x4943be:0x215,_0xefcd0b:0x216,_0x4da47e:0x24c,_0x1192fc:0x22c,_0xad1632:0x263,_0x593c59:0x264},_0x582f47={_0x505ba6:0x74,_0x480652:0x9},_0x4067fb={_0x3b6d8f:0x58},_0x5a6daa=new Set();for(const _0x98a706 of _0x175296){for(const _0x26dfe4 of getToolResultBlocks(_0x98a706)){_0x5a6daa[_0x3cad74(-_0x5e0d08._0x3b2d0d,-_0x5e0d08._0x297068,-_0x5e0d08._0x175c43,-0xd5)](_0x26dfe4[_0x3cad74(-0xcd,-0xd8,-0xef,-_0x5e0d08._0x5da5a5)]);}}const _0x548e0b=[];function _0x5b3352(_0x195780,_0x43372a,_0x5dbc9c,_0x4035b8){return _0x209649(_0x5dbc9c-0x37d,_0x43372a-0x122,_0x4035b8,_0x4035b8-_0x4067fb._0x3b6d8f);}for(const _0x22968a of _0x175296){_0x548e0b[_0x5b3352(0x245,_0x5e0d08._0x1291da,_0x5e0d08._0x5b9501,_0x5e0d08._0x108ab7)](_0x22968a);const _0x48a242=getToolUseBlocks(_0x22968a)[_0x5b3352(0x234,_0x5e0d08._0x4943be,0x232,_0x5e0d08._0xefcd0b)](_0x2c674a=>!_0x5a6daa[_0x5b3352(0x242,0x22b,0x23d,0x227)](_0x2c674a['id']));if(_0x48a242[_0x5b3352(0x251,0x26b,0x25e,_0x5e0d08._0x5b9501)]===0x0)continue;_0x548e0b[_0x5b3352(0x235,_0x5e0d08._0x4da47e,0x242,_0x5e0d08._0x1192fc)]({'role':'user','content':_0x48a242[_0x5b3352(_0x5e0d08._0xad1632,0x277,_0x5e0d08._0x593c59,0x24b)](_0x322a2a=>({'type':_0x3cad74(-0x9f,-0xb2,-0xc9,-0x99),'tool_use_id':_0x322a2a['id'],'content':INTERRUPTED_TOOL_RESULT_TEXT,'is_error':!![]}))});for(const _0x3c8ca0 of _0x48a242){_0x5a6daa['add'](_0x3c8ca0['id']);}}function _0x3cad74(_0x204781,_0x5a9123,_0x2bc64f,_0x33724f){return _0x209649(_0x5a9123-_0x582f47._0x505ba6,_0x5a9123-_0x582f47._0x480652,_0x2bc64f,_0x33724f-0x120);}return _0x548e0b;}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};
|
package/dist/chunk-T7UKN6FZ.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x5007ca,_0xd39a3c){const _0xc9f2a3={_0x2f75d5:0x7b,_0x35631f:0x7d,_0x1e3a36:0x84,_0x2765e8:0x75,_0x2ba439:0x6c,_0x259ccf:0x546,_0x78daf6:0x55,_0xe869b5:0x69,_0x963f1d:0x542,_0x3fcbb4:0x527,_0x329326:0x545,_0x3ab138:0x57,_0x485d38:0x531,_0x2647a3:0x539,_0x5bd4f5:0x563,_0x1ba105:0x540,_0x276248:0x84,_0x5d2c78:0x7e},_0x18ba6f={_0x2fdd01:0x329},_0x12c54a={_0x5a9b23:0x1a7};function _0x459abc(_0x240638,_0x552e90,_0x3671d0,_0x21c26f){return _0x26dc(_0x3671d0- -_0x12c54a._0x5a9b23,_0x552e90);}function _0x595dc1(_0xc8c5d9,_0x14003c,_0x81ee94,_0xb08174){return _0x26dc(_0xc8c5d9-_0x18ba6f._0x2fdd01,_0xb08174);}const _0x5c40b8=_0x5007ca();while(!![]){try{const _0xa0372b=parseInt(_0x459abc(_0xc9f2a3._0x2f75d5,0x6e,_0xc9f2a3._0x35631f,_0xc9f2a3._0x1e3a36))/0x1+-parseInt(_0x459abc(0x55,0x67,0x60,0x7a))/0x2*(-parseInt(_0x459abc(_0xc9f2a3._0x2765e8,0x88,0x6b,_0xc9f2a3._0x2ba439))/0x3)+parseInt(_0x595dc1(0x538,_0xc9f2a3._0x259ccf,0x539,0x54b))/0x4*(-parseInt(_0x459abc(0x3e,0x40,_0xc9f2a3._0x78daf6,0x5f))/0x5)+-parseInt(_0x459abc(_0xc9f2a3._0xe869b5,0x6b,0x57,0x6f))/0x6+-parseInt(_0x595dc1(_0xc9f2a3._0x963f1d,0x537,_0xc9f2a3._0x3fcbb4,_0xc9f2a3._0x329326))/0x7*(parseInt(_0x459abc(0x51,0x6b,0x66,_0xc9f2a3._0x3ab138))/0x8)+-parseInt(_0x595dc1(_0xc9f2a3._0x485d38,0x518,0x542,_0xc9f2a3._0x2647a3))/0x9*(-parseInt(_0x595dc1(0x553,_0xc9f2a3._0x5bd4f5,0x546,_0xc9f2a3._0x1ba105))/0xa)+parseInt(_0x459abc(_0xc9f2a3._0x276248,_0xc9f2a3._0x5d2c78,_0xc9f2a3._0x5d2c78,0x6f))/0xb;if(_0xa0372b===_0xd39a3c)break;else _0x5c40b8['push'](_0x5c40b8['shift']());}catch(_0x53a389){_0x5c40b8['push'](_0x5c40b8['shift']());}}}(_0x3d70,0x3efa9));import{resolveOpenAiReasoningConfig}from'./chunk-NYZR4XKO.js';import{normalizeContent}from'./chunk-SEP4YYY3.js';function systemToInstructions(_0x3d66d9){const _0x1bc160={_0x49c857:0x424,_0x150e87:0x43f,_0x57ae5d:0x441,_0x2110f2:0x426,_0x30b6da:0x434,_0x38b456:0x42c,_0x3a379c:0x435,_0x38c037:0x447,_0x541c4e:0x416,_0x45ac6f:0x42d};function _0x1eb0ae(_0xb6da3e,_0x17a58f,_0x238c8f,_0x2812a7){return _0x26dc(_0x238c8f-0x238,_0x2812a7);}function _0x970e3b(_0x44f932,_0x2ed90,_0x4cd796,_0xa01d70){return _0x26dc(_0x2ed90- -0x30a,_0xa01d70);}return normalizeContent(_0x3d66d9)[_0x1eb0ae(_0x1bc160._0x49c857,_0x1bc160._0x150e87,_0x1bc160._0x57ae5d,_0x1bc160._0x2110f2)](_0x51d5f3=>_0x51d5f3[_0x1eb0ae(0x44b,0x456,0x459,0x44d)]===_0x970e3b(-0x10c,-0x104,-0x110,-0xf7))[_0x1eb0ae(0x423,_0x1bc160._0x30b6da,_0x1bc160._0x38b456,_0x1bc160._0x3a379c)](_0x5263ab=>_0x5263ab[_0x1eb0ae(0x44c,0x434,0x43e,0x422)])[_0x1eb0ae(_0x1bc160._0x38c037,_0x1bc160._0x541c4e,_0x1bc160._0x45ac6f,_0x1bc160._0x150e87)]('\x0a\x0a');}function pushUserContentMessage(_0x422d66,_0x4649db,_0x411879){const _0x4b8df4={_0x2c2f0b:0x40b,_0x1fefa3:0x3de,_0x4003ee:0x3f9},_0x451505={_0x5bbe5d:0x1e6},_0x4abaf1={_0x5b7f94:0x113};function _0x2cf85a(_0x5d2bda,_0x51234c,_0x4cdfc5,_0x440cdf){return _0x26dc(_0x5d2bda- -_0x4abaf1._0x5b7f94,_0x440cdf);}function _0x36f331(_0xc11f9a,_0x22bf22,_0x5227c5,_0x21ebb7){return _0x26dc(_0x21ebb7-_0x451505._0x5bbe5d,_0x22bf22);}if(_0x411879[_0x2cf85a(0xe8,0xcf,0x104,0xea)]===0x0)return;_0x422d66['push']({'type':_0x36f331(_0x4b8df4._0x2c2f0b,_0x4b8df4._0x1fefa3,0x3dd,_0x4b8df4._0x4003ee),'role':_0x4649db,'content':_0x411879});}function _0x3d70(){const _0x19dc22=['mJy1ndHzzMPfvfC','Bwf4vg9Rzw5Z','C291CMnL','nJC2odG3DhbIwuj4','BwvZC2fNzq','zgf0yq','DxnLCI12AxnPyMXL','ChjVDMLKzxjtDgf0zq','CMvHC29UAw5N','A2v5CW','mJCYm3zbreDesa','BwvKAwfFDhLWzq','o2jHC2u2ncW','y29UDgvUDa','zNvUy3rPB25Fy2fSBa','Bw9KzwW','Dg9VBf9Yzxn1Bhq','zNvUy3rPB25Fy2fSBf9VDxrWDxq','DhLWzq','zwzMB3j0','C3bSAwnL','nZm1ntDtBhH6t3e','otiYmZvewLroExi','C3vTBwfYEq','Aw5WDxrFAw1Hz2u','Dg9VBf91C2u','Dg9VBhm','ndbkEKPIA3u','C3rYAw5N','yMfZzty0','BwfW','AM9PBG','AxnbCNjHEq','Aw5JBhvKzuvUy3j5ChrLzenVBNrLBNq','zgf0ytO','Dg9VBf91C2vFAwq','B3bLBMfPuMvZCg9UC2vZt3v0Chv0','BgvUz3rO','mtbuDw1Yuxq','vg9VBcbYzxr1CM5LzcbPBwfNzsbJB250zw50lG','mJeYnJm0BK9mvvjx','C3LZDgvT','CM9Szq','Aw5WDxrFDgv4Da','ChvZAa','BMfTzq','B2jQzwn0','CMvHC29UAw5NlMvUy3j5ChrLzf9JB250zw50','Dgv4Da','mM9rB25OAG','nJy0mdq3yxDgs3Hb','zMLSDgvY','Aw1Hz2u','B3v0Chv0x3rLEhq','zgvZy3jPChrPB24','nJa4ohrWs1D3zq','DhjPBq'];_0x3d70=function(){return _0x19dc22;};return _0x3d70();}function hasSerializableToolUse(_0x20fc2c){const _0xf4c925={_0x5867af:0x109,_0x50bb9f:0x133,_0x44eab5:0x125,_0x2e47ea:0x5c8},_0x6035d2={_0x9cfa47:0xe9},_0x30e822={_0x217a1c:0x3df};function _0x595920(_0x46813d,_0x339fea,_0x102179,_0x2300b8){return _0x26dc(_0x102179-_0x30e822._0x217a1c,_0x339fea);}function _0x492b85(_0x5e3639,_0x3e990b,_0x1c7bb6,_0x2c35bc){return _0x26dc(_0x2c35bc- -_0x6035d2._0x9cfa47,_0x5e3639);}return _0x20fc2c['id'][_0x492b85(0x12a,_0xf4c925._0x5867af,_0xf4c925._0x50bb9f,_0xf4c925._0x44eab5)]()[_0x595920(_0xf4c925._0x2e47ea,0x5db,0x5da,0x5d9)]>0x0&&_0x20fc2c['name'][_0x492b85(0x13d,0x118,0x135,0x125)]()['length']>0x0;}function hasSerializableToolResult(_0xe40f24){const _0x34501a={_0x1c1a89:0x44b,_0x1025fa:0x43a},_0x3b5309={_0x33b8e7:0xd5};function _0x5cb8c1(_0x3909ae,_0x471284,_0x2a6b0e,_0x5db0f7){return _0x26dc(_0x2a6b0e-_0x3b5309._0x33b8e7,_0x5db0f7);}function _0x33ace7(_0x5120d7,_0x35f9ab,_0x542a18,_0x43ffd9){return _0x26dc(_0x5120d7-0x235,_0x542a18);}return _0xe40f24[_0x33ace7(0x42e,_0x34501a._0x1c1a89,0x433,0x417)][_0x33ace7(0x443,0x458,0x457,0x43b)]()[_0x33ace7(0x430,0x419,_0x34501a._0x1025fa,0x442)]>0x0;}function isResponseInputObject(_0x3d3bf3){const _0x114fa7={_0x31b2c4:0x1ed,_0x3ef7af:0x209,_0x218373:0x1ff},_0x43fc27={_0x4c4037:0x3e};if(typeof _0x3d3bf3!=='object'||_0x3d3bf3===null||Array['isArray'](_0x3d3bf3))return![];const _0x543c78=_0x3d3bf3;function _0x40f46c(_0x24e71f,_0xd7fb21,_0x3bd9aa,_0x188e0e){return _0x26dc(_0x24e71f- -_0x43fc27._0x4c4037,_0xd7fb21);}return typeof _0x543c78['type']===_0x40f46c(_0x114fa7._0x31b2c4,0x1dd,_0x114fa7._0x3ef7af,_0x114fa7._0x218373);}function isImageToolResultBlock(_0x3db7df){const _0x489ee9={_0x1f9614:0x15e,_0x1ca3ba:0x145,_0x195e80:0x172,_0xc00231:0x17b,_0x280bbf:0xdf,_0x1439e8:0xce,_0x310bcc:0xea,_0x3b78bf:0xda,_0x5b6bd2:0xcc,_0x113d0b:0xa6,_0xf317be:0xb8,_0x2c6ae7:0xa2,_0xb3f403:0xbe,_0x2f22a1:0xdc,_0x44b238:0x175,_0x4be7a9:0x178,_0x44b8ff:0x184},_0xf200cd={_0x32881e:0x98};function _0x14698c(_0x1cf703,_0x5e02f8,_0x197697,_0x5adf81){return _0x26dc(_0x1cf703- -_0xf200cd._0x32881e,_0x5adf81);}if(typeof _0x3db7df!=='object'||_0x3db7df===null||Array[_0x14698c(_0x489ee9._0x1f9614,0x156,0x160,_0x489ee9._0x1ca3ba)](_0x3db7df))return![];const _0x1e89a7=_0x3db7df;function _0x447df1(_0x57258c,_0x513a5f,_0x36f468,_0x502458){return _0x26dc(_0x513a5f- -0x2d2,_0x36f468);}return _0x1e89a7[_0x14698c(0x189,0x182,0x1a6,0x199)]===_0x14698c(_0x489ee9._0x195e80,0x163,_0x489ee9._0xc00231,0x18e)&&_0x1e89a7['source']?.['type']===_0x447df1(-0xec,-_0x489ee9._0x280bbf,-_0x489ee9._0x1439e8,-_0x489ee9._0x310bcc)&&typeof _0x1e89a7[_0x447df1(-0xdd,-0xc1,-_0x489ee9._0x3b78bf,-_0x489ee9._0x5b6bd2)][_0x447df1(-_0x489ee9._0x113d0b,-_0x489ee9._0xf317be,-0xd1,-_0x489ee9._0x2c6ae7)]===_0x447df1(-_0x489ee9._0xb3f403,-0xa7,-0xb3,-0x95)&&typeof _0x1e89a7[_0x447df1(-_0x489ee9._0x2f22a1,-0xc1,-0xb7,-0xd8)][_0x14698c(0x17c,_0x489ee9._0x44b238,_0x489ee9._0x4be7a9,_0x489ee9._0x44b8ff)]==='string';}function getToolResultText(_0x44f4b6){const _0xbfd2b3={_0x2361ab:0x1f5,_0x4176d3:0x20d,_0x530b79:0x1f8,_0x29283a:0x1f7,_0x27b765:0x1e7,_0x3a7260:0x1da,_0x376d2d:0x1d5,_0x13c791:0x484,_0xc550ac:0x47a,_0xe96ca1:0x47e,_0x4f1148:0x465,_0x45771b:0x46c,_0x58ecfa:0x471},_0x345e99={_0x5ed7fb:0x27f},_0x27a0ff={_0x46e0e2:0x4aa,_0x159737:0x3ed,_0x1e161c:0x3d9},_0xeefb19={_0x5579a9:0x114};if(typeof _0x44f4b6===_0x4aae16(_0xbfd2b3._0x2361ab,_0xbfd2b3._0x4176d3,_0xbfd2b3._0x530b79,0x228))return _0x44f4b6;const _0x2ed74e=_0x44f4b6[_0x4aae16(_0xbfd2b3._0x29283a,0x1eb,0x1f9,0x201)](_0x3fde22=>{const _0x380afd={_0x5012c3:0x1d3,_0x3dc7d7:0x46,_0x17ce75:0x1d3};function _0xbc0246(_0x240495,_0xc0766b,_0x5c9455,_0x59db5a){return _0x4aae16(_0x59db5a,_0x5c9455-_0x380afd._0x5012c3,_0x5c9455-_0x380afd._0x3dc7d7,_0x59db5a-_0x380afd._0x17ce75);}function _0x4a08e3(_0x2e7a74,_0x229c48,_0x10b178,_0x22a01b){return _0x43d6f7(_0x2e7a74-_0xeefb19._0x5579a9,_0x229c48,_0x22a01b-0x10,_0x22a01b-0xaf);}return typeof _0x3fde22===_0x4a08e3(0x482,0x489,_0x27a0ff._0x46e0e2,0x493)&&_0x3fde22!==null&&_0x3fde22[_0xbc0246(0x3dd,_0x27a0ff._0x159737,0x3d6,_0x27a0ff._0x1e161c)]===_0x4a08e3(0x4b0,0x47a,0x485,0x495);})[_0x43d6f7(0x45e,0x48d,0x473,0x45b)](_0x5796d4=>_0x5796d4[_0x4aae16(0x1e0,0x1e8,0x200,0x1e6)])[_0x4aae16(_0xbfd2b3._0x27b765,0x1d7,_0xbfd2b3._0x3a7260,_0xbfd2b3._0x376d2d)]('\x0a\x0a')['trim']();function _0x43d6f7(_0x357e60,_0x28c540,_0x1bd617,_0x1158d0){return _0x26dc(_0x1bd617-_0x345e99._0x5ed7fb,_0x28c540);}function _0x4aae16(_0x5ed29d,_0x1cf388,_0x38873b,_0x430d64){return _0x26dc(_0x1cf388- -0x1e,_0x5ed29d);}return _0x2ed74e[_0x43d6f7(0x47c,_0xbfd2b3._0x13c791,_0xbfd2b3._0xc550ac,_0xbfd2b3._0xe96ca1)]>0x0?_0x2ed74e:_0x43d6f7(_0xbfd2b3._0x4f1148,_0xbfd2b3._0x45771b,0x47c,_0xbfd2b3._0x58ecfa);}function getToolResultImages(_0x3a5824){const _0x106b39={_0x487ddc:0x58e,_0x114446:0x59c},_0x596a6c={_0x30e440:0x32e};function _0x1e2ee6(_0x16c1f1,_0x5dd35f,_0x3a0d87,_0x5aeb8e){return _0x26dc(_0x5dd35f-_0x596a6c._0x30e440,_0x3a0d87);}function _0x151579(_0x5866d2,_0x9d066d,_0x679bcd,_0x4d878a){return _0x26dc(_0x5866d2-0x3a2,_0x679bcd);}return Array[_0x151579(0x598,_0x106b39._0x487ddc,0x5a8,0x57d)](_0x3a5824)?_0x3a5824[_0x151579(0x5ab,0x5ae,_0x106b39._0x114446,0x5c1)](isImageToolResultBlock):[];}function resolveReasoningVisibility(_0x46c9a9){const _0x95f0ba={_0x2f4504:0x15e,_0x17de12:0x137};function _0x3c8f08(_0x4664a7,_0x4f2550,_0x3af867,_0x14dbe8){return _0x26dc(_0x3af867- -0xcb,_0x4f2550);}return _0x46c9a9[_0x3c8f08(_0x95f0ba._0x2f4504,_0x95f0ba._0x17de12,0x14c,0x141)]?.['visibility']??'user-visible';}function createOpenAiResponsesReasoning(_0x38bf24){const _0x132a7a={_0x22b3cb:0x60c,_0x1554e5:0x5fb,_0x4cd1e7:0x5ef,_0x189b09:0x60d,_0x434073:0x614,_0x411d02:0x5e0,_0x46bcf7:0x5e4,_0x5a1930:0x19f,_0x2347c7:0x1b4,_0x454318:0x1cf,_0x25e453:0x621,_0x13cb2c:0x175,_0x1e117a:0x198,_0x2222c4:0x17a,_0x4353a4:0x5ed,_0x3442d:0x617,_0x1f300e:0x5e2},_0x54dca0={_0x1b566d:0x6e},_0x3c77a2=resolveOpenAiReasoningConfig(_0x38bf24[_0x533ec4(_0x132a7a._0x22b3cb,_0x132a7a._0x1554e5,_0x132a7a._0x4cd1e7,_0x132a7a._0x189b09)]);if(!_0x3c77a2)return{};const _0x10d82b={};function _0x4f271b(_0x40d39d,_0x41e138,_0x2c80ff,_0x1d3df7){return _0x26dc(_0x41e138- -_0x54dca0._0x1b566d,_0x2c80ff);}const _0x4f8422=_0x3c77a2[_0x533ec4(_0x132a7a._0x434073,0x60a,0x604,0x5f4)]??(resolveReasoningVisibility(_0x38bf24)===_0x533ec4(_0x132a7a._0x411d02,0x5f9,0x604,_0x132a7a._0x46bcf7)?'auto':void 0x0);function _0x533ec4(_0x2c644a,_0x3f40ee,_0x3c7163,_0x4e4c58){return _0x26dc(_0x3f40ee-0x3e4,_0x4e4c58);}return _0x3c77a2[_0x4f271b(_0x132a7a._0x5a1930,_0x132a7a._0x2347c7,0x1c3,_0x132a7a._0x454318)]&&(_0x10d82b['effort']=_0x3c77a2[_0x533ec4(_0x132a7a._0x25e453,0x606,0x5ef,0x5ea)]),_0x4f8422&&(_0x10d82b['summary']=_0x4f8422),{..._0x3c77a2[_0x4f271b(_0x132a7a._0x13cb2c,0x189,_0x132a7a._0x1e117a,_0x132a7a._0x2222c4)]===![]?{}:{'include':[_0x533ec4(0x5fb,0x5e9,0x5e3,_0x132a7a._0x4353a4)]},...Object[_0x533ec4(_0x132a7a._0x3442d,0x5fc,_0x132a7a._0x1f300e,0x60f)](_0x10d82b)['length']>0x0?{'reasoning':_0x10d82b}:{}};}function pushAssistantProviderState(_0x38bd3b,_0x3be81d){const _0x3bd48a={_0x22c74c:0x30e,_0x16b300:0x2f8,_0x337776:0x30c,_0x5b53a6:0x311,_0x2747f5:0x308,_0xe58d3e:0x2f1,_0x4b15b8:0x309,_0x5932de:0x300,_0x3d68a2:0x2f7},_0x36aa3a={_0x43361f:0x10e};if(_0x3be81d[_0x162ff6(_0x3bd48a._0x22c74c,0x317,_0x3bd48a._0x16b300,_0x3bd48a._0x337776)]!=='assistant')return![];function _0x533903(_0x21afd5,_0x1e545b,_0x279f23,_0x57eabc){return _0x26dc(_0x57eabc-0x2d7,_0x1e545b);}const _0x3ce293=_0x3be81d[_0x162ff6(0x324,0x321,_0x3bd48a._0x5b53a6,0x32a)]?.[_0x162ff6(_0x3bd48a._0x2747f5,0x313,_0x3bd48a._0xe58d3e,_0x3bd48a._0x4b15b8)]??[];function _0x162ff6(_0x325532,_0x2cfd32,_0x50bf33,_0x7464dc){return _0x26dc(_0x325532-_0x36aa3a._0x43361f,_0x50bf33);}if(_0x3ce293[_0x162ff6(_0x3bd48a._0x4b15b8,0x313,0x320,_0x3bd48a._0x5932de)]===0x0)return![];for(const _0x5e750c of _0x3ce293){isResponseInputObject(_0x5e750c)&&_0x38bd3b[_0x162ff6(0x310,0x326,0x329,_0x3bd48a._0x3d68a2)](structuredClone(_0x5e750c));}return!![];}function _0x26dc(_0x1859f0,_0x661b00){_0x1859f0=_0x1859f0-0x1f3;const _0x3d7083=_0x3d70();let _0x26dca2=_0x3d7083[_0x1859f0];if(_0x26dc['oxWQCx']===undefined){var _0x33ec92=function(_0xfa2c0d){const _0xaddaa3='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x3d66d9='',_0x51d5f3='';for(let _0x5263ab=0x0,_0x422d66,_0x4649db,_0x411879=0x0;_0x4649db=_0xfa2c0d['charAt'](_0x411879++);~_0x4649db&&(_0x422d66=_0x5263ab%0x4?_0x422d66*0x40+_0x4649db:_0x4649db,_0x5263ab++%0x4)?_0x3d66d9+=String['fromCharCode'](0xff&_0x422d66>>(-0x2*_0x5263ab&0x6)):0x0){_0x4649db=_0xaddaa3['indexOf'](_0x4649db);}for(let _0x20fc2c=0x0,_0xe40f24=_0x3d66d9['length'];_0x20fc2c<_0xe40f24;_0x20fc2c++){_0x51d5f3+='%'+('00'+_0x3d66d9['charCodeAt'](_0x20fc2c)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x51d5f3);};_0x26dc['vVoBwb']=_0x33ec92,_0x26dc['hSrVPZ']={},_0x26dc['oxWQCx']=!![];}const _0x1ef4e9=_0x3d7083[0x0],_0x30d555=_0x1859f0+_0x1ef4e9,_0x1e7ac8=_0x26dc['hSrVPZ'][_0x30d555];return!_0x1e7ac8?(_0x26dca2=_0x26dc['vVoBwb'](_0x26dca2),_0x26dc['hSrVPZ'][_0x30d555]=_0x26dca2):_0x26dca2=_0x1e7ac8,_0x26dca2;}function toOpenAiResponsesRequest(_0x235595){const _0x1bce66={_0x2c1700:0xde,_0x480d8f:0xe6,_0x451466:0xf7,_0x28e3dd:0xf0,_0x6c762f:0x1a0,_0x112af8:0x1b4,_0x32411e:0xb8,_0x450534:0x1d1,_0x52d9f3:0xc8,_0x3013fa:0xce,_0x2b75ee:0xe1,_0x21e030:0xb9,_0x5048c8:0xdc,_0x125884:0xcc,_0x20b475:0xc1,_0x2c292a:0xf3,_0xfb3afa:0x105,_0x3b31e2:0xa3,_0x2a3569:0xac,_0xe4e129:0xdc,_0x109caf:0xd4,_0x1e3775:0x199,_0x51d2da:0x197,_0x80418b:0x19b,_0x23f9a5:0x1b4,_0x511287:0x1c1,_0x20ae4b:0x1dd,_0x22c57b:0x1c8,_0xed7679:0x1d5,_0x41b9b0:0xe5,_0x56bd0c:0xdb,_0x540ef1:0xea,_0x2960cd:0xe3,_0xc3ecaa:0xdf,_0x41b77a:0xca,_0x2cc738:0xc5,_0x202780:0xf9,_0x459bda:0xd3,_0x2543b8:0x1da,_0x5dc162:0xe2,_0x3bb4a5:0xc9,_0x57fbc1:0xbb,_0x54e4d8:0xef,_0x594e9c:0x1bf,_0x47e620:0x1c7,_0x21d512:0x1ce,_0x60f74d:0x1ae,_0x130df1:0x1b2,_0x148563:0x1c0,_0x1f76b4:0x1b0,_0x22bcee:0xa9,_0x3afe4b:0xda,_0x41af79:0xcf,_0x25d46a:0x1ab,_0x305efb:0x1c2,_0x1bb7e5:0x1c1,_0x57ad22:0x1d9,_0x5a7a2c:0x1a3,_0xf9a72c:0x19c,_0x4902ed:0x18f,_0x4bc51d:0xd2,_0x5d936c:0xe9,_0x4dee31:0x198,_0x41eb68:0x180,_0x539652:0xba,_0x105686:0xa4},_0x15e8f5={_0x5ebf93:0x4a,_0x1e8385:0x61,_0x5762f3:0x68,_0x51d039:0x35e,_0x32eff4:0x349,_0x395940:0x353},_0x425776={_0xce0092:0x164};function _0x5d40ee(_0x1ec0bd,_0x5e422a,_0x53fed8,_0x35baca){return _0x26dc(_0x1ec0bd- -0x3c1,_0x53fed8);}function _0x57a0f0(_0x47f94e,_0x19a73d,_0x102163,_0x1decf8){return _0x26dc(_0x47f94e- -0x13e,_0x102163);}const _0x3f55fd=[];for(const _0x37868a of _0x235595['messages']){if(pushAssistantProviderState(_0x3f55fd,_0x37868a))continue;const _0x3cbd04=[];for(const _0x2093ad of normalizeContent(_0x37868a[_0x57a0f0(_0x1bce66._0x2c1700,_0x1bce66._0x480d8f,_0x1bce66._0x451466,_0x1bce66._0x28e3dd)])){if(_0x2093ad[_0x5d40ee(-_0x1bce66._0x6c762f,-_0x1bce66._0x112af8,-0x1a9,-0x19d)]===_0x57a0f0(0xc8,0xc1,_0x1bce66._0x32411e,0xaf)){_0x3cbd04[_0x57a0f0(0xc4,0xd0,0xb2,0xba)](_0x37868a[_0x5d40ee(-0x1c1,-_0x1bce66._0x450534,-_0x1bce66._0x450534,-0x1d9)]==='assistant'?{'type':_0x5d40ee(-0x1b6,-0x1a8,-0x19d,-0x1b2),'text':_0x2093ad[_0x57a0f0(_0x1bce66._0x52d9f3,0xc7,_0x1bce66._0x3013fa,0xcf)]}:{'type':'input_text','text':_0x2093ad[_0x57a0f0(_0x1bce66._0x52d9f3,_0x1bce66._0x2b75ee,_0x1bce66._0x21e030,_0x1bce66._0x5048c8)]});continue;}if(_0x2093ad['type']===_0x57a0f0(_0x1bce66._0x125884,_0x1bce66._0x20b475,0xce,0xd8)){_0x3cbd04['push']({'type':_0x57a0f0(0xe9,_0x1bce66._0x2c292a,_0x1bce66._0x2b75ee,_0x1bce66._0xfb3afa),'image_url':_0x57a0f0(0xba,0xb3,_0x1bce66._0x3b31e2,_0x1bce66._0x2a3569)+_0x2093ad['source'][_0x57a0f0(_0x1bce66._0xe4e129,0xdd,_0x1bce66._0x109caf,0xe8)]+_0x5d40ee(-0x1a6,-0x1b9,-_0x1bce66._0x1e3775,-_0x1bce66._0x51d2da)+_0x2093ad['source'][_0x5d40ee(-0x1ad,-_0x1bce66._0x80418b,-_0x1bce66._0x23f9a5,-0x1c4)]});continue;}pushUserContentMessage(_0x3f55fd,_0x37868a[_0x5d40ee(-_0x1bce66._0x511287,-_0x1bce66._0x20ae4b,-_0x1bce66._0x22c57b,-_0x1bce66._0xed7679)],_0x3cbd04[_0x57a0f0(_0x1bce66._0x41b9b0,0xf5,_0x1bce66._0x56bd0c,0xd0)](0x0));if(_0x2093ad['type']===_0x57a0f0(0xea,_0x1bce66._0x540ef1,0xd9,_0x1bce66._0x2960cd)){if(!hasSerializableToolUse(_0x2093ad))continue;_0x3f55fd['push']({'type':_0x57a0f0(_0x1bce66._0xc3ecaa,0xce,0xdd,_0x1bce66._0x41b77a),'call_id':_0x2093ad['id'],'name':_0x2093ad[_0x57a0f0(_0x1bce66._0x2cc738,_0x1bce66._0xe4e129,0xc5,0xab)],'arguments':JSON['stringify'](_0x2093ad['input']??{})});continue;}if(_0x2093ad[_0x57a0f0(_0x1bce66._0x2960cd,_0x1bce66._0x2c292a,_0x1bce66._0x202780,0xf7)]===_0x57a0f0(0xe1,0xc7,0xf6,_0x1bce66._0x459bda)){if(!hasSerializableToolResult(_0x2093ad))continue;const _0x29d18e=getToolResultText(_0x2093ad['content']);_0x3f55fd[_0x5d40ee(-0x1bf,-0x1bb,-0x1d6,-_0x1bce66._0x2543b8)]({'type':_0x57a0f0(_0x1bce66._0x5dc162,_0x1bce66._0x3bb4a5,0xd3,0xd3),'call_id':_0x2093ad[_0x57a0f0(_0x1bce66._0x57fbc1,0xb9,0xbf,0xc3)],'output':_0x29d18e});const _0x31a9db=getToolResultImages(_0x2093ad[_0x57a0f0(_0x1bce66._0x2c1700,0xce,_0x1bce66._0x54e4d8,0xd8)]);_0x31a9db['length']>0x0&&_0x3f55fd[_0x5d40ee(-_0x1bce66._0x594e9c,-0x1a6,-_0x1bce66._0x47e620,-_0x1bce66._0x21d512)]({'type':_0x5d40ee(-_0x1bce66._0x60f74d,-_0x1bce66._0x130df1,-_0x1bce66._0x148563,-_0x1bce66._0x1f76b4),'role':'user','content':[{'type':_0x57a0f0(0xc3,_0x1bce66._0x22bcee,_0x1bce66._0x3afe4b,_0x1bce66._0x41af79),'text':'Image\x20returned\x20by\x20ViewFile\x20for\x20tool\x20result\x20'+_0x2093ad[_0x5d40ee(-_0x1bce66._0x22c57b,-_0x1bce66._0x25d46a,-0x1e3,-_0x1bce66._0x305efb)]+'.'},..._0x31a9db['map'](_0x368c1e=>({'type':_0x5d40ee(-0x19a,-0x184,-0x1a7,-0x1a4),'image_url':_0x57a0f0(0xba,0xb3,0xaa,0xc3)+_0x368c1e[_0x57a0f0(0xd3,0xee,0xc6,0xdd)][_0x57a0f0(0xdc,0xe7,0xcc,0xce)]+_0x57a0f0(0xdd,0xdf,0xee,0xeb)+_0x368c1e[_0x5d40ee(-0x1b0,-0x1a0,-0x1b2,-0x1b7)][_0x5d40ee(-0x1ad,-0x19f,-0x1a5,-0x1c1)]}))]});}}pushUserContentMessage(_0x3f55fd,_0x37868a[_0x5d40ee(-_0x1bce66._0x1bb7e5,-_0x1bce66._0x57ad22,-0x1cc,-0x1da)],_0x3cbd04);}return{...createOpenAiResponsesReasoning(_0x235595),'model':_0x235595[_0x5d40ee(-_0x1bce66._0x5a7a2c,-0x1b3,-_0x1bce66._0xf9a72c,-_0x1bce66._0x4902ed)],'instructions':systemToInstructions(_0x235595[_0x5d40ee(-0x1c2,-0x1b8,-0x1b4,-0x1aa)]),'input':_0x3f55fd,'max_output_tokens':_0x235595[_0x57a0f0(_0x1bce66._0x4bc51d,_0x1bce66._0x5d936c,0xd8,0xbf)],'tools':_0x235595[_0x5d40ee(-_0x1bce66._0x4dee31,-_0x1bce66._0x41eb68,-0x195,-_0x1bce66._0x112af8)][_0x57a0f0(0xb6,0xd0,_0x1bce66._0x539652,_0x1bce66._0x105686)](_0x599c1e=>{function _0x30e5ab(_0x18eb74,_0x4e403c,_0xf2e0f7,_0x4a141b){return _0x5d40ee(_0xf2e0f7-0x21f,_0x4e403c-0x6,_0x18eb74,_0x4a141b-_0x425776._0xce0092);}function _0x126fa4(_0x5cf498,_0x35b829,_0x26127f,_0x1311e3){return _0x57a0f0(_0x35b829-0x290,_0x35b829-0xa0,_0x26127f,_0x1311e3-0x1e9);}return{'type':'function','name':_0x599c1e[_0x30e5ab(0x4b,_0x15e8f5._0x5ebf93,_0x15e8f5._0x1e8385,_0x15e8f5._0x5762f3)],'description':_0x599c1e[_0x126fa4(0x356,_0x15e8f5._0x51d039,_0x15e8f5._0x32eff4,_0x15e8f5._0x395940)],'parameters':_0x599c1e['input_schema']};})};}export{toOpenAiResponsesRequest};
|
|
1
|
+
(function(_0x2bbfdc,_0x48be36){const _0x4338e9={_0x1c9c37:0x45e,_0x3a63bf:0x442,_0x2bbef9:0x45e,_0x1b34b7:0x448,_0x1ee738:0xd3,_0x33a26d:0xc6,_0x4fc84f:0xe2,_0x15054e:0xe5,_0x4433f4:0xdd,_0x219f83:0x43d,_0xf92150:0xb0,_0x5a14c5:0xcd,_0x4c86c2:0xc4,_0x305c41:0xd1,_0x130e1f:0x46f,_0x3ac5bf:0x466,_0x3225a3:0x43c,_0x51d2d1:0x450,_0x433b32:0x47f,_0x977b3a:0x453,_0x241eca:0xf3},_0x4dfe5c={_0x405dd4:0x27b};function _0x57a448(_0x43c3f0,_0x383d20,_0x222325,_0x4e861e){return _0x176a(_0x222325- -0x2bb,_0x4e861e);}const _0x7eb80e=_0x2bbfdc();function _0x34ecfe(_0x4e6b12,_0xee592a,_0x2c99f4,_0xfe0d69){return _0x176a(_0xfe0d69-_0x4dfe5c._0x405dd4,_0x2c99f4);}while(!![]){try{const _0x5db2a6=-parseInt(_0x34ecfe(_0x4338e9._0x1c9c37,_0x4338e9._0x3a63bf,_0x4338e9._0x2bbef9,_0x4338e9._0x1b34b7))/0x1*(parseInt(_0x57a448(-_0x4338e9._0x1ee738,-0xc4,-_0x4338e9._0x33a26d,-_0x4338e9._0x4fc84f))/0x2)+-parseInt(_0x57a448(-0xd8,-_0x4338e9._0x15054e,-0xdc,-_0x4338e9._0x4433f4))/0x3+-parseInt(_0x34ecfe(0x453,0x432,_0x4338e9._0x219f83,0x447))/0x4*(parseInt(_0x57a448(-_0x4338e9._0xf92150,-0xdc,-0xc4,-_0x4338e9._0x5a14c5))/0x5)+parseInt(_0x57a448(-0xd4,-_0x4338e9._0x4c86c2,-_0x4338e9._0x305c41,-0xbc))/0x6+parseInt(_0x34ecfe(0x460,_0x4338e9._0x130e1f,0x478,_0x4338e9._0x3ac5bf))/0x7+-parseInt(_0x34ecfe(_0x4338e9._0x3225a3,0x449,_0x4338e9._0x51d2d1,0x451))/0x8*(parseInt(_0x34ecfe(_0x4338e9._0x433b32,0x472,_0x4338e9._0x977b3a,0x464))/0x9)+parseInt(_0x57a448(-_0x4338e9._0x241eca,-0xd1,-0xe1,-0xfc))/0xa;if(_0x5db2a6===_0x48be36)break;else _0x7eb80e['push'](_0x7eb80e['shift']());}catch(_0x504d53){_0x7eb80e['push'](_0x7eb80e['shift']());}}}(_0x340f,0xb814f));import{resolveOpenAiReasoningConfig}from'./chunk-NYZR4XKO.js';import{normalizeContent}from'./chunk-SEP4YYY3.js';function systemToInstructions(_0x56a2cf){const _0x166222={_0x3cd52a:0x256,_0x5ec42c:0x251,_0x38a4a7:0x23b,_0x3a7598:0x231,_0x1d2d45:0x24d},_0x313967={_0xef5882:0x4e};function _0x3362f1(_0xb52c,_0x1d266d,_0x4c1b8f,_0x5e03da){return _0x176a(_0x4c1b8f- -0x279,_0x5e03da);}function _0xb543d(_0x5554d9,_0x41388a,_0x4ee449,_0x2ef389){return _0x176a(_0x4ee449-_0x313967._0xef5882,_0x2ef389);}return normalizeContent(_0x56a2cf)['filter'](_0xbdb73b=>_0xbdb73b[_0x3362f1(-0xaa,-0x8c,-0x93,-0xa0)]==='text')[_0xb543d(_0x166222._0x3cd52a,_0x166222._0x5ec42c,_0x166222._0x38a4a7,0x222)](_0x46a830=>_0x46a830[_0xb543d(0x202,0x205,0x211,0x211)])[_0xb543d(0x244,0x22b,_0x166222._0x3a7598,_0x166222._0x1d2d45)]('\x0a\x0a');}function pushUserContentMessage(_0x3a434d,_0x21a883,_0x175e1e){const _0x209d7f={_0x31429e:0x3ad,_0x291dce:0x3a6,_0x1137c1:0x8f,_0x45a797:0x8e,_0x3da5c5:0x9f,_0xd18d09:0x9b,_0x21fa39:0xab};function _0x339903(_0x2865d3,_0x53462b,_0x1237c4,_0x4522fe){return _0x176a(_0x1237c4- -0x26a,_0x53462b);}function _0x1e01aa(_0xbfaf23,_0x2d86d8,_0x45a3e4,_0x365d59){return _0x176a(_0x45a3e4-0x1da,_0x2d86d8);}if(_0x175e1e[_0x1e01aa(0x3b5,0x3c0,_0x209d7f._0x31429e,_0x209d7f._0x291dce)]===0x0)return;_0x3a434d[_0x339903(-_0x209d7f._0x1137c1,-0x76,-0x8f,-_0x209d7f._0x45a797)]({'type':_0x339903(-_0x209d7f._0x3da5c5,-_0x209d7f._0xd18d09,-0xaa,-_0x209d7f._0x21fa39),'role':_0x21a883,'content':_0x175e1e});}function _0x340f(){const _0x337532=['mJeWmtqXmgnmA3rHsW','C3rYAw5NAwz5','C3rYAw5N','Aw5WDxrFDgv4Da','AM9PBG','zgf0yq','zMLSDgvY','DhLWzq','yxnZAxn0yw50','Dg9VBf91C2vFAwq','otLpuuTOCfK','ndCXmJuYnLzwwvfztq','otaYodC1nfjQC2fStq','Aw5WDxrFAw1Hz2u','BwfW','sw1Hz2uGCMv0DxjUzwqGyNKGvMLLD0zPBguGzM9YihrVB2WGCMvZDwX0ia','DxnLCG','C291CMnL','Dg9VBhm','yxv0BW','zNvUy3rPB25Fy2fSBa','Bw9KzwW','nLnMDxvXwa','B2jQzwn0','mtaXnvvsD0LztG','C3bSAwnL','AxnbCNjHEq','B3v0Chv0x3rLEhq','BwvZC2fNzq','y29UDgvUDa','DhjPBq','Dgv4Da','vg9VBcbYzxr1CM5LzcbPBwfNzsbJB250zw50lG','C3LZDgvT','CMvHC29UAw5N','Dg9VBf9Yzxn1Bhq','zgf0ytO','DxnLCI12AxnPyMXL','o2jHC2u2ncW','A2v5CW','mZG2meLosKXMqG','mJa3nZKXv0XgEM5H','Aw5WDxq','Dg9VBf91C2u','Aw5JBhvKzuvUy3j5ChrLzenVBNrLBNq','zwzMB3j0','DMLZAwjPBgL0Eq','BgvUz3rO','zNvUy3rPB25Fy2fSBf9VDxrWDxq','B3bLBMfPuMvZCg9UC2vZt3v0Chv0','odyYndHwA2zmCKC','CM9Szq','Aw5WDxrFC2nOzw1H','CMvHC29UAw5NlMvUy3j5ChrLzf9JB250zw50','mZe3mdG1mhHQvKDAsG','ChvZAa','BwvKAwfFDhLWzq','zNvUy3rPB24','Aw1Hz2u'];_0x340f=function(){return _0x337532;};return _0x340f();}function hasSerializableToolUse(_0x3fe1df){const _0x12f71a={_0x9bed1:0x398,_0x28ec6b:0x39b,_0x4a23f9:0x3a7,_0x2690cf:0x39d,_0x4536b0:0x3ac,_0x299ab0:0x47b,_0x56ed1f:0x477,_0x2b9908:0x476,_0x283612:0x476},_0x59df30={_0x3dd92e:0x2a3};function _0x18522d(_0x43fde9,_0x50dc26,_0x448136,_0x3b54b6){return _0x176a(_0x448136-0x1d9,_0x3b54b6);}function _0x5203dc(_0x32becc,_0x46bc6b,_0x369ff5,_0x3db2e5){return _0x176a(_0x46bc6b-_0x59df30._0x3dd92e,_0x369ff5);}return _0x3fe1df['id'][_0x18522d(_0x12f71a._0x9bed1,0x396,_0x12f71a._0x28ec6b,_0x12f71a._0x4a23f9)]()[_0x18522d(0x391,_0x12f71a._0x2690cf,_0x12f71a._0x4536b0,0x3c7)]>0x0&&_0x3fe1df['name'][_0x5203dc(_0x12f71a._0x299ab0,0x465,0x472,_0x12f71a._0x56ed1f)]()[_0x5203dc(0x46a,_0x12f71a._0x2b9908,0x45c,_0x12f71a._0x283612)]>0x0;}function hasSerializableToolResult(_0x2efb90){const _0x5ce68c={_0x475a07:0x1cd,_0x1bbab4:0x1c7},_0x4f9f71={_0x52d52c:0x3c4};function _0xb34e2f(_0x43b5d9,_0x433d5a,_0x447591,_0x2c0f60){return _0x176a(_0x43b5d9- -_0x4f9f71._0x52d52c,_0x2c0f60);}return _0x2efb90[_0xb34e2f(-0x1dc,-_0x5ce68c._0x475a07,-0x1c3,-_0x5ce68c._0x1bbab4)]['trim']()['length']>0x0;}function isResponseInputObject(_0x560202){const _0x334528={_0x41d4cc:0xf9,_0x116471:0x105,_0x5c7339:0x106,_0x1b4a44:0xfc,_0x48bd6e:0x116,_0x1c9db6:0xae},_0x5d3c42={_0x596906:0xfd},_0xdd9705={_0x1cc7fc:0x12b};if(typeof _0x560202!==_0x1d427b(_0x334528._0x41d4cc,0xf8,_0x334528._0x116471,_0x334528._0x5c7339)||_0x560202===null||Array[_0x1d427b(_0x334528._0x1b4a44,_0x334528._0x48bd6e,_0x334528._0x5c7339,0x106)](_0x560202))return![];const _0x810c2e=_0x560202;function _0x5741a7(_0x105d0f,_0x5bc49c,_0x425e13,_0x410ed8){return _0x176a(_0x5bc49c- -_0xdd9705._0x1cc7fc,_0x410ed8);}function _0x1d427b(_0x4fafca,_0x38adf2,_0x76e3f8,_0x1a0363){return _0x176a(_0x4fafca- -_0x5d3c42._0x596906,_0x76e3f8);}return typeof _0x810c2e[_0x5741a7(_0x334528._0x1c9db6,0xbb,0xb6,0x9e)]==='string';}function isImageToolResultBlock(_0x23efd2){const _0x45cafc={_0x2d7143:0x254,_0x323b19:0x318,_0x199b25:0x2ef,_0xa4554c:0x22a,_0x1fd829:0x21d,_0xed9b81:0x302,_0xd1f629:0x2f1,_0x2fed9f:0x21a,_0x499a86:0x22f,_0x498284:0x231,_0x64ae6e:0x22c,_0x42a8a9:0x236,_0x32d84b:0x245,_0x694a9c:0x2f9,_0xe1d846:0x2e6,_0x37c23e:0x2ea,_0x503911:0x2dc},_0x177136={_0x540e67:0x102};if(typeof _0x23efd2!==_0x2e8de9(0x260,_0x45cafc._0x2d7143,0x233,0x24b)||_0x23efd2===null||Array[_0x3877fc(_0x45cafc._0x323b19,_0x45cafc._0x199b25,0x2f8,0x2fb)](_0x23efd2))return![];function _0x2e8de9(_0x33c50a,_0x1ba7a7,_0x48f889,_0x4eb027){return _0x176a(_0x4eb027-0x55,_0x48f889);}function _0x3877fc(_0x3ccf32,_0x19846e,_0x5b3a28,_0x3d2663){return _0x176a(_0x3d2663-_0x177136._0x540e67,_0x5b3a28);}const _0x1f1463=_0x23efd2;return _0x1f1463[_0x2e8de9(_0x45cafc._0xa4554c,0x23b,_0x45cafc._0x1fd829,0x23b)]==='image'&&_0x1f1463[_0x3877fc(_0x45cafc._0xed9b81,0x30e,0x301,0x2f2)]?.['type']==='base64'&&typeof _0x1f1463[_0x3877fc(_0x45cafc._0xd1f629,0x2e3,0x2f7,0x2f2)][_0x2e8de9(_0x45cafc._0x2fed9f,0x234,_0x45cafc._0x499a86,_0x45cafc._0x498284)]===_0x2e8de9(0x22f,_0x45cafc._0x64ae6e,0x24c,_0x45cafc._0x42a8a9)&&typeof _0x1f1463[_0x2e8de9(0x22c,0x244,0x22e,_0x45cafc._0x32d84b)][_0x3877fc(0x2e2,0x2e1,_0x45cafc._0x694a9c,_0x45cafc._0xe1d846)]===_0x3877fc(_0x45cafc._0x37c23e,_0x45cafc._0x503911,0x2db,0x2e3);}function _0x176a(_0x50a069,_0x412505){_0x50a069=_0x50a069-0x1c0;const _0x340f52=_0x340f();let _0x176af5=_0x340f52[_0x50a069];if(_0x176a['BcRisp']===undefined){var _0x2e1611=function(_0x5c7f3d){const _0x3ebf14='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x56a2cf='',_0xbdb73b='';for(let _0x46a830=0x0,_0x3a434d,_0x21a883,_0x175e1e=0x0;_0x21a883=_0x5c7f3d['charAt'](_0x175e1e++);~_0x21a883&&(_0x3a434d=_0x46a830%0x4?_0x3a434d*0x40+_0x21a883:_0x21a883,_0x46a830++%0x4)?_0x56a2cf+=String['fromCharCode'](0xff&_0x3a434d>>(-0x2*_0x46a830&0x6)):0x0){_0x21a883=_0x3ebf14['indexOf'](_0x21a883);}for(let _0x3fe1df=0x0,_0x2efb90=_0x56a2cf['length'];_0x3fe1df<_0x2efb90;_0x3fe1df++){_0xbdb73b+='%'+('00'+_0x56a2cf['charCodeAt'](_0x3fe1df)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0xbdb73b);};_0x176a['GMnUCa']=_0x2e1611,_0x176a['keaVoP']={},_0x176a['BcRisp']=!![];}const _0x5a6cf1=_0x340f52[0x0],_0x2b4381=_0x50a069+_0x5a6cf1,_0x5ae235=_0x176a['keaVoP'][_0x2b4381];return!_0x5ae235?(_0x176af5=_0x176a['GMnUCa'](_0x176af5),_0x176a['keaVoP'][_0x2b4381]=_0x176af5):_0x176af5=_0x5ae235,_0x176af5;}function getToolResultText(_0x1c2928){const _0x1f7325={_0x520a0a:0x3ef,_0x13d5d8:0x2a7,_0x1014c4:0x284},_0x58705c={_0x76d3d9:0xc6},_0x4421d5={_0xd3ecaf:0x161,_0x2e2967:0x310,_0x4d66f7:0x2f3,_0xc529cf:0x31f,_0x3c8aed:0x2de},_0x5abc08={_0x1cc6a2:0xeb,_0xa0b17b:0x16e,_0x7a8418:0xd9};if(typeof _0x1c2928===_0xc47ce3(0x3f6,0x403,0x3f3,0x3d8))return _0x1c2928;function _0xc47ce3(_0x2228ff,_0xc31518,_0x1912b6,_0x3ce13b){return _0x176a(_0x2228ff-0x215,_0x3ce13b);}const _0x332a3b=_0x1c2928['filter'](_0x1650a4=>{function _0x3963fc(_0x356dbb,_0x460d48,_0x1eab1e,_0x262e20){return _0xc47ce3(_0x356dbb- -0x2ac,_0x460d48-0x13,_0x1eab1e-0x158,_0x262e20);}function _0x5e2de8(_0x1da2df,_0x246488,_0x5252b8,_0x5a1bd3){return _0xc47ce3(_0x1da2df- -_0x5abc08._0x1cc6a2,_0x246488-_0x5abc08._0xa0b17b,_0x5252b8-_0x5abc08._0x7a8418,_0x246488);}return typeof _0x1650a4===_0x3963fc(0x15f,_0x4421d5._0xd3ecaf,0x16b,0x146)&&_0x1650a4!==null&&_0x1650a4[_0x5e2de8(_0x4421d5._0x2e2967,_0x4421d5._0x4d66f7,0x307,_0x4421d5._0xc529cf)]===_0x5e2de8(0x2ed,0x2e7,_0x4421d5._0x3c8aed,0x30a);})[_0xc47ce3(0x402,0x3f3,_0x1f7325._0x520a0a,0x409)](_0x49a83b=>_0x49a83b[_0x243df4(0x299,0x29e,0x289,0x287)])['join']('\x0a\x0a')['trim']();function _0x243df4(_0x3160af,_0x387486,_0x2ce9b2,_0x4a2a39){return _0x176a(_0x2ce9b2-_0x58705c._0x76d3d9,_0x387486);}return _0x332a3b['length']>0x0?_0x332a3b:_0x243df4(_0x1f7325._0x13d5d8,0x29a,0x28a,_0x1f7325._0x1014c4);}function getToolResultImages(_0x3b86cf){const _0x2d3d25={_0x15f748:0x14f,_0x517541:0x15f,_0x7075d0:0x81};function _0x1ce8e6(_0x56daf1,_0x3fe5d5,_0x21fe2a,_0x566762){return _0x176a(_0x3fe5d5- -0x358,_0x21fe2a);}function _0x235886(_0x1ed83d,_0xcc3915,_0x1b772b,_0x2be5ff){return _0x176a(_0x1ed83d- -0x24b,_0x1b772b);}return Array[_0x1ce8e6(-_0x2d3d25._0x15f748,-_0x2d3d25._0x517541,-0x14d,-0x16b)](_0x3b86cf)?_0x3b86cf[_0x235886(-0x66,-_0x2d3d25._0x7075d0,-0x69,-0x63)](isImageToolResultBlock):[];}function resolveReasoningVisibility(_0x5280cd){const _0x4b0817={_0x1087d4:0x588,_0x42c1c1:0x580,_0x36baae:0x58f,_0x2f318b:0x5a1,_0x306377:0x5b6,_0x326ce2:0x5b3,_0x40898e:0x5ac},_0x5ec91a={_0x29c827:0x3c9};function _0x3c0178(_0x51afd7,_0x2c5b2d,_0xf845b4,_0x26bf89){return _0x176a(_0x2c5b2d-0x3cf,_0x26bf89);}function _0x1bb91d(_0xcd98ee,_0x4b61e6,_0x2313b9,_0x4689bd){return _0x176a(_0x2313b9-_0x5ec91a._0x29c827,_0x4b61e6);}return _0x5280cd[_0x1bb91d(_0x4b0817._0x1087d4,_0x4b0817._0x42c1c1,_0x4b0817._0x36baae,0x578)]?.[_0x3c0178(0x5b9,_0x4b0817._0x2f318b,_0x4b0817._0x306377,_0x4b0817._0x326ce2)]??_0x3c0178(_0x4b0817._0x40898e,0x598,0x5b3,0x586);}function createOpenAiResponsesReasoning(_0x17f7c7){const _0x51a10f={_0x515cef:0xd3,_0x1fb02a:0xec,_0x4964fe:0xdd,_0x53c710:0x275,_0x37ace9:0x257,_0x2e7fd7:0x293,_0x378849:0x294,_0x580e7c:0xbb,_0x53923f:0xdb,_0x35b7a4:0xed,_0x5117f1:0xbe,_0xb13593:0xd3,_0x42597b:0xe1,_0x49fca8:0xd3,_0x13448d:0xce,_0x2b82dd:0xe2,_0x4c0099:0xc8,_0x2a3032:0xbd,_0x2eba00:0xcb,_0xf65120:0xcd,_0x2f64f4:0xd9,_0xb06d15:0xc2},_0x59cf43={_0x2da69b:0xa5},_0xb33fec=resolveOpenAiReasoningConfig(_0x17f7c7[_0x3297e7(-_0x51a10f._0x515cef,-_0x51a10f._0x1fb02a,-0xde,-_0x51a10f._0x4964fe)]);if(!_0xb33fec)return{};const _0x4c3c3a={},_0xcf293=_0xb33fec['summary']??(resolveReasoningVisibility(_0x17f7c7)===_0x8eae7b(0x27f,_0x51a10f._0x53c710,_0x51a10f._0x37ace9,0x26e)?_0x8eae7b(_0x51a10f._0x2e7fd7,_0x51a10f._0x378849,0x29d,0x297):void 0x0);_0xb33fec[_0x3297e7(-_0x51a10f._0x580e7c,-_0x51a10f._0x53923f,-_0x51a10f._0x515cef,-0xee)]&&(_0x4c3c3a[_0x3297e7(-_0x51a10f._0x35b7a4,-_0x51a10f._0x5117f1,-_0x51a10f._0xb13593,-0xb9)]=_0xb33fec[_0x3297e7(-_0x51a10f._0x42597b,-_0x51a10f._0x35b7a4,-_0x51a10f._0x49fca8,-_0x51a10f._0x13448d)]);function _0x3297e7(_0x1258a8,_0x2eed22,_0x19321d,_0x4a2f91){return _0x176a(_0x19321d- -0x2a4,_0x2eed22);}_0xcf293&&(_0x4c3c3a['summary']=_0xcf293);function _0x8eae7b(_0x331abb,_0x1860f0,_0x351e48,_0x4e8e96){return _0x176a(_0x4e8e96-_0x59cf43._0x2da69b,_0x1860f0);}return{..._0xb33fec[_0x3297e7(-_0x51a10f._0x2b82dd,-_0x51a10f._0x4c0099,-0xd4,-0xe7)]===![]?{}:{'include':[_0x3297e7(-0xc3,-_0x51a10f._0x2a3032,-_0x51a10f._0x2eba00,-0xc7)]},...Object[_0x3297e7(-0xe9,-_0x51a10f._0xf65120,-_0x51a10f._0x2f64f4,-_0x51a10f._0xb06d15)](_0x4c3c3a)['length']>0x0?{'reasoning':_0x4c3c3a}:{}};}function pushAssistantProviderState(_0x1cbf81,_0x50be07){const _0x1cc281={_0x94bb03:0x1b,_0x45a440:0xc,_0x3be162:0x26,_0x144bcd:0x42},_0xf3aa09={_0x4b240b:0x149};if(_0x50be07['role']!=='assistant')return![];function _0x2d05ed(_0x452fc7,_0x561718,_0x287af6,_0x455731){return _0x176a(_0x452fc7-_0xf3aa09._0x4b240b,_0x287af6);}const _0x8a362a=_0x50be07['providerState']?.[_0xc92715(-_0x1cc281._0x94bb03,-0x24,-0x1d,-_0x1cc281._0x45a440)]??[];if(_0x8a362a[_0xc92715(-0x2f,-_0x1cc281._0x3be162,-0x16,-_0x1cc281._0x144bcd)]===0x0)return![];function _0xc92715(_0xeadcb2,_0x125965,_0x22af61,_0x1394f5){return _0x176a(_0x125965- -0x1f9,_0x1394f5);}for(const _0x76287f of _0x8a362a){isResponseInputObject(_0x76287f)&&_0x1cbf81['push'](structuredClone(_0x76287f));}return!![];}function toOpenAiResponsesRequest(_0x95ce39){const _0xb4e796={_0x3b6753:0xc6,_0x25ab4b:0xba,_0x27c705:0xca,_0x2af382:0xd6,_0x2eca0f:0x39b,_0x3c6647:0x384,_0x24dc30:0x39a,_0x730c8f:0x380,_0x24f74b:0x385,_0x505361:0x3a3,_0x5854e2:0x36b,_0x343484:0xbd,_0x2fef31:0x3a0,_0x3e9934:0x388,_0x475a9e:0x388,_0x307578:0xef,_0x4ce92d:0xfe,_0x13b7eb:0x384,_0x26a855:0xdf,_0x1045ba:0xf2,_0x1e9d7c:0xd4,_0x15a2f6:0x37d,_0x1e4166:0x3b0,_0x3373b9:0x399,_0x394f8c:0x39b,_0x1acd1f:0x389,_0x313db2:0x38d,_0x380b77:0x37f,_0x4a15d5:0x10e,_0x20bb42:0x3a7,_0x211296:0x38f,_0x4e3da8:0x38e,_0x4cf4b9:0xd2,_0x1d2475:0xde,_0x5afcdf:0xec,_0x443472:0x3a4,_0x3aa15b:0x362,_0x4b7179:0x38f,_0x313414:0x393,_0x4d1dcb:0x3a5,_0x4c92a2:0x370,_0x3e42b7:0x371,_0x201606:0x380,_0xe8e779:0x374,_0x20b892:0x37d,_0x39ab3d:0xf2,_0x46d857:0xdd,_0x35b3df:0xbd,_0x17715c:0xb5,_0x7d1195:0xfa,_0x49bb4d:0xe0,_0x54d307:0xf4,_0x2a83a4:0x38b,_0x2fcfae:0x398,_0x575609:0xf1,_0x1f1154:0xfe,_0x1f77b2:0xf9,_0x2d64ca:0xda,_0xdf10cc:0xf8,_0x2be9c7:0xf3,_0xa8f9c3:0x3ae,_0x57d7be:0x3a9,_0x1d3c3a:0xc3,_0x367244:0x39e,_0x19f8b5:0x39f,_0x115472:0xf5},_0x59e0da={_0x3cf6ed:0x496,_0x11d96f:0x487,_0x55780a:0x488},_0x134540={_0x4619d2:0x3ac,_0x34a5b5:0xb1},_0x5c1c29={_0x1026b5:0xc3};function _0x414eaf(_0x5c44ba,_0x27207a,_0x4a7c5f,_0x3f1791){return _0x176a(_0x5c44ba- -0xfd,_0x4a7c5f);}const _0x692a46=[];function _0x76912b(_0x58e9a3,_0x5d202d,_0x1be51f,_0x249833){return _0x176a(_0x5d202d-0x1a9,_0x58e9a3);}for(const _0x51a52a of _0x95ce39['messages']){if(pushAssistantProviderState(_0x692a46,_0x51a52a))continue;const _0x16d63a=[];for(const _0x21d431 of normalizeContent(_0x51a52a['content'])){if(_0x21d431[_0x76912b(0x373,0x38f,0x392,0x399)]===_0x414eaf(_0xb4e796._0x3b6753,_0xb4e796._0x25ab4b,_0xb4e796._0x27c705,_0xb4e796._0x2af382)){_0x16d63a[_0x76912b(_0xb4e796._0x2eca0f,_0xb4e796._0x3c6647,0x396,_0xb4e796._0x24dc30)](_0x51a52a[_0x76912b(0x37d,_0xb4e796._0x730c8f,0x379,0x395)]===_0x76912b(0x398,0x390,0x374,0x3a5)?{'type':_0x76912b(_0xb4e796._0x24f74b,_0xb4e796._0x505361,0x38d,0x3ba),'text':_0x21d431[_0x76912b(0x357,0x36c,0x384,_0xb4e796._0x5854e2)]}:{'type':'input_text','text':_0x21d431[_0x414eaf(0xc6,0xb1,0xc4,_0xb4e796._0x343484)]});continue;}if(_0x21d431[_0x76912b(_0xb4e796._0x2fef31,0x38f,_0xb4e796._0x3e9934,0x378)]===_0x76912b(0x37d,0x387,0x37d,_0xb4e796._0x475a9e)){_0x16d63a['push']({'type':_0x414eaf(_0xb4e796._0x307578,0xf0,_0xb4e796._0x4ce92d,0xd6),'image_url':_0x76912b(_0xb4e796._0x13b7eb,0x371,0x381,0x35d)+_0x21d431['source'][_0x414eaf(_0xb4e796._0x26a855,0xe8,_0xb4e796._0x1045ba,_0xb4e796._0x1e9d7c)]+_0x76912b(0x385,0x373,_0xb4e796._0x15a2f6,0x372)+_0x21d431[_0x76912b(_0xb4e796._0x1e4166,0x399,_0xb4e796._0x3373b9,_0xb4e796._0x394f8c)][_0x76912b(_0xb4e796._0x1acd1f,_0xb4e796._0x313db2,0x391,0x39d)]});continue;}pushUserContentMessage(_0x692a46,_0x51a52a[_0x76912b(0x37e,0x380,0x39d,_0xb4e796._0x380b77)],_0x16d63a[_0x414eaf(0xfb,0xdd,_0xb4e796._0x4a15d5,0x10d)](0x0));if(_0x21d431[_0x76912b(_0xb4e796._0x20bb42,_0xb4e796._0x211296,_0xb4e796._0x4e3da8,0x391)]===_0x414eaf(_0xb4e796._0x4cf4b9,0xbe,0xd2,0xde)){if(!hasSerializableToolUse(_0x21d431))continue;_0x692a46[_0x414eaf(_0xb4e796._0x1d2475,_0xb4e796._0x5afcdf,0xe8,0xe5)]({'type':_0x414eaf(0xf6,0x104,0xfa,0x103),'call_id':_0x21d431['id'],'name':_0x21d431['name'],'arguments':JSON[_0x76912b(0x396,0x389,0x36d,_0xb4e796._0x443472)](_0x21d431[_0x76912b(_0xb4e796._0x3aa15b,0x377,0x35f,0x385)]??{})});continue;}if(_0x21d431[_0x76912b(0x391,_0xb4e796._0x4b7179,_0xb4e796._0x313414,_0xb4e796._0x4d1dcb)]===_0x76912b(_0xb4e796._0x313db2,_0xb4e796._0x4c92a2,0x358,_0xb4e796._0x3e42b7)){if(!hasSerializableToolResult(_0x21d431))continue;const _0x373bd2=getToolResultText(_0x21d431[_0x76912b(0x353,0x36a,0x36e,_0xb4e796._0x201606)]);_0x692a46[_0x414eaf(0xde,0xc1,_0xb4e796._0x1e9d7c,0xf5)]({'type':_0x76912b(_0xb4e796._0xe8e779,_0xb4e796._0x20b892,0x39b,0x35f),'call_id':_0x21d431['tool_use_id'],'output':_0x373bd2});const _0x43d957=getToolResultImages(_0x21d431['content']);_0x43d957[_0x414eaf(0xd6,_0xb4e796._0x3b6753,_0xb4e796._0x39ab3d,_0xb4e796._0x46d857)]>0x0&&_0x692a46[_0x76912b(_0xb4e796._0x1acd1f,_0xb4e796._0x3c6647,0x39e,0x36b)]({'type':_0x414eaf(0xc3,_0xb4e796._0x35b3df,_0xb4e796._0x17715c,0xd6),'role':_0x414eaf(0xf2,_0xb4e796._0x7d1195,_0xb4e796._0x49bb4d,_0xb4e796._0x54d307),'content':[{'type':_0x76912b(0x3a3,_0xb4e796._0x2a83a4,0x3a4,_0xb4e796._0x2fcfae),'text':_0x414eaf(_0xb4e796._0x575609,_0xb4e796._0x1f1154,_0xb4e796._0x1f77b2,0xef)+_0x21d431['tool_use_id']+'.'},..._0x43d957[_0x76912b(0x383,0x396,0x37d,0x37b)](_0x4c7caa=>({'type':_0x76912b(0x391,0x395,0x3a5,0x397),'image_url':'data:'+_0x4c7caa[_0x76912b(0x3a2,0x399,0x3a6,0x398)][_0x414eaf(0xdf,0xfc,0xca,0xfb)]+';base64,'+_0x4c7caa[_0x414eaf(0xf3,0xf8,0xea,0x107)][_0x414eaf(0xe7,0xe6,0xed,0xcc)]}))]});}}pushUserContentMessage(_0x692a46,_0x51a52a[_0x414eaf(_0xb4e796._0x2d64ca,0xe8,_0xb4e796._0xdf10cc,_0xb4e796._0x2be9c7)],_0x16d63a);}return{...createOpenAiResponsesReasoning(_0x95ce39),'model':_0x95ce39[_0x76912b(_0xb4e796._0x20bb42,0x39d,_0xb4e796._0xa8f9c3,_0xb4e796._0x57d7be)],'instructions':systemToInstructions(_0x95ce39[_0x414eaf(0xc8,_0xb4e796._0x1d3c3a,_0xb4e796._0x4cf4b9,0xaf)]),'input':_0x692a46,'max_output_tokens':_0x95ce39['maxTokens'],'tools':_0x95ce39[_0x76912b(0x3ae,0x39a,_0xb4e796._0x367244,_0xb4e796._0x19f8b5)][_0x414eaf(0xf0,_0xb4e796._0x115472,0xf2,0x101)](_0x1da0ae=>{function _0x4a91ac(_0xcd982e,_0x5be5e2,_0x34208d,_0x28784f){return _0x414eaf(_0x34208d- -0x110,_0x5be5e2-_0x5c1c29._0x1026b5,_0xcd982e,_0x28784f-0x190);}function _0x30ddf4(_0x3d5fa6,_0x380889,_0x54f664,_0x3bfa63){return _0x414eaf(_0x54f664-_0x134540._0x4619d2,_0x380889-_0x134540._0x34a5b5,_0x380889,_0x3bfa63-0x69);}return{'type':_0x4a91ac(-0x38,-0x2c,-0x30,-0x2b),'name':_0x1da0ae['name'],'description':_0x1da0ae['description'],'parameters':_0x1da0ae[_0x30ddf4(0x479,_0x59e0da._0x3cf6ed,_0x59e0da._0x11d96f,_0x59e0da._0x55780a)]};})};}export{toOpenAiResponsesRequest};
|