@nuvin/agent-core 0.1.0-rc.3 → 0.1.0-rc.5

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 CHANGED
@@ -1,4 +1,4 @@
1
1
  {
2
- "version": "0.1.0-rc.3",
3
- "commit": "55884e5"
2
+ "version": "0.1.0-rc.5",
3
+ "commit": "bc46471"
4
4
  }
@@ -1 +1 @@
1
- (function(_0xf0cc15,_0x178539){const _0x45fae6={_0x510dd3:0x22c,_0x34db51:0x25,_0x2512bb:0x3b,_0x5409c7:0x36,_0x7af76f:0x29,_0x132e1b:0x33,_0x5adbc4:0x2a,_0x51f5b5:0x27,_0x30a510:0x34,_0x1b3fba:0x3d,_0x35d6b9:0x225,_0x481cda:0x31,_0x157402:0x21,_0x24d67b:0x19,_0x2a11f5:0x11,_0x1b9ade:0xe,_0x37872e:0x1d,_0x50f2ae:0x22,_0x360e15:0x1c,_0x21d4ec:0x33,_0x259430:0x26,_0x3bcdfc:0x252,_0x5d8b60:0x246},_0x156f76=_0xf0cc15();function _0x5e3499(_0x303a45,_0x59051c,_0x2e0b37,_0xa661f9){return _0x3925(_0x2e0b37-0xfa,_0x303a45);}function _0x1d8715(_0x251fbe,_0x46e7b9,_0x5e22ce,_0x1245cd){return _0x3925(_0x5e22ce- -0x171,_0x251fbe);}while(!![]){try{const _0x335c3e=parseInt(_0x5e3499(0x23a,0x224,0x232,_0x45fae6._0x510dd3))/0x1*(parseInt(_0x1d8715(-_0x45fae6._0x34db51,-_0x45fae6._0x2512bb,-_0x45fae6._0x5409c7,-0x2d))/0x2)+-parseInt(_0x1d8715(-0x43,-_0x45fae6._0x7af76f,-_0x45fae6._0x132e1b,-0x3f))/0x3+-parseInt(_0x1d8715(-_0x45fae6._0x5adbc4,-0x2a,-_0x45fae6._0x7af76f,-_0x45fae6._0x51f5b5))/0x4+-parseInt(_0x1d8715(-_0x45fae6._0x30a510,-_0x45fae6._0x1b3fba,-0x34,-0x2f))/0x5*(parseInt(_0x5e3499(_0x45fae6._0x35d6b9,0x22f,0x234,0x23a))/0x6)+parseInt(_0x1d8715(-0x1e,-_0x45fae6._0x481cda,-0x21,-_0x45fae6._0x157402))/0x7*(parseInt(_0x1d8715(-_0x45fae6._0x24d67b,-_0x45fae6._0x2a11f5,-0x1c,-_0x45fae6._0x1b9ade))/0x8)+parseInt(_0x1d8715(-_0x45fae6._0x37872e,-_0x45fae6._0x132e1b,-0x24,-_0x45fae6._0x50f2ae))/0x9*(parseInt(_0x1d8715(-_0x45fae6._0x360e15,-_0x45fae6._0x21d4ec,-_0x45fae6._0x259430,-0x23))/0xa)+-parseInt(_0x5e3499(_0x45fae6._0x3bcdfc,0x23b,_0x45fae6._0x5d8b60,0x247))/0xb;if(_0x335c3e===_0x178539)break;else _0x156f76['push'](_0x156f76['shift']());}catch(_0xf9b720){_0x156f76['push'](_0x156f76['shift']());}}}(_0x79ea,0x55bae));import{Agent,createAgentMetrics,createExtensionRegistry,runTurn}from'../chunk-FKZ3QQWZ.js';import{getTextFromMessage}from'../chunk-QDOE7NWO.js';import'../chunk-FFIZ6TKW.js';function _0x218a12(_0x192635,_0xfa4709,_0x4575ac,_0x4ae25e){const _0x5e9d41={_0xccbde1:0xb6};return _0x3925(_0x4575ac-_0x5e9d41._0xccbde1,_0xfa4709);}import'../chunk-X7VAACWY.js';function roleLabel(_0x33351e){const _0xc664f3={_0x511a2b:0x12,_0x1507fa:0x13,_0x1260b5:0x16,_0x5227f5:0x1c,_0x1807b8:0x45d,_0x239fca:0x465,_0x4d60de:0x45e,_0x5d2172:0x462,_0x944c5a:0x460,_0x52a93b:0x466},_0x10b28f={_0x22bec6:0x313};if(_0x33351e===_0x45d635(-_0xc664f3._0x511a2b,-_0xc664f3._0x1507fa,-_0xc664f3._0x1260b5,-_0xc664f3._0x5227f5))return _0x5b1541(_0xc664f3._0x1807b8,_0xc664f3._0x239fca,_0xc664f3._0x4d60de,_0xc664f3._0x5d2172);function _0x5b1541(_0x357542,_0x4c3f14,_0xaba980,_0x39b672){return _0x3925(_0x357542-_0x10b28f._0x22bec6,_0x4c3f14);}function _0x45d635(_0x106e14,_0x2980f4,_0x2c75d9,_0x4b4227){return _0x3925(_0x106e14- -0x161,_0x2980f4);}if(_0x33351e==='assistant')return'Assistant';return _0x5b1541(0x465,_0xc664f3._0x944c5a,0x46f,_0xc664f3._0x52a93b);}function messagesToText(_0x589876){const _0x330c17={_0x2875ed:0x276,_0x85dfe5:0x268,_0x5d6cac:0x269,_0x569bfa:0x25c,_0x1b598e:0x25b,_0x5a5dea:0x284,_0x1c13d8:0x27b},_0x347527={_0x120a02:0xe9,_0x1b8e4a:0xf8,_0x487681:0xd8,_0x36625d:0xea,_0x4858a7:0xf2},_0x1e4f81={_0x318447:0x3b8};function _0x28e124(_0x351de0,_0x3418c2,_0x1581a8,_0x2a783a){return _0x3925(_0x3418c2- -0x3b6,_0x1581a8);}function _0x29ee5c(_0x3a8806,_0x498888,_0x2eb127,_0x14693f){return _0x3925(_0x2eb127- -_0x1e4f81._0x318447,_0x3a8806);}return _0x589876[_0x28e124(-_0x330c17._0x2875ed,-_0x330c17._0x85dfe5,-0x26b,-0x279)](_0x4a0488=>{const _0xe6ce72={_0x43213f:0x16c};function _0x18787e(_0x46858b,_0x18a3e,_0x41ec38,_0x7f658d){return _0x28e124(_0x46858b-0x63,_0x41ec38-0x175,_0x7f658d,_0x7f658d-_0xe6ce72._0x43213f);}const _0x342393=getTextFromMessage(_0x4a0488)[_0x18787e(-_0x347527._0x120a02,-0xf3,-_0x347527._0x1b8e4a,-0x107)]();function _0x4a1e92(_0x1624f8,_0x46fc48,_0x3f77d8,_0x450eb8){return _0x28e124(_0x1624f8-0x1,_0x450eb8-0x4d0,_0x1624f8,_0x450eb8-0xb0);}return _0x342393?roleLabel(_0x4a0488[_0x18787e(-0xeb,-_0x347527._0x487681,-_0x347527._0x36625d,-_0x347527._0x4858a7)])+':\x20'+_0x342393:'';})[_0x28e124(-_0x330c17._0x5d6cac,-0x25d,-_0x330c17._0x569bfa,-_0x330c17._0x1b598e)](_0x411397=>_0x411397[_0x29ee5c(-0x269,-0x26d,-0x278,-0x27a)]>0x0)[_0x29ee5c(-_0x330c17._0x5a5dea,-_0x330c17._0x1c13d8,-0x275,-0x284)]('\x0a\x0a');}function _0x3925(_0x2d59a5,_0x4060db){_0x2d59a5=_0x2d59a5-0x137;const _0x79ea9d=_0x79ea();let _0x392575=_0x79ea9d[_0x2d59a5];if(_0x3925['uNsila']===undefined){var _0x3488db=function(_0x1948f0){const _0x23f081='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x33351e='',_0x589876='';for(let _0x4a0488=0x0,_0x342393,_0x411397,_0x41f2c6=0x0;_0x411397=_0x1948f0['charAt'](_0x41f2c6++);~_0x411397&&(_0x342393=_0x4a0488%0x4?_0x342393*0x40+_0x411397:_0x411397,_0x4a0488++%0x4)?_0x33351e+=String['fromCharCode'](0xff&_0x342393>>(-0x2*_0x4a0488&0x6)):0x0){_0x411397=_0x23f081['indexOf'](_0x411397);}for(let _0x295ff6=0x0,_0x1fe7be=_0x33351e['length'];_0x295ff6<_0x1fe7be;_0x295ff6++){_0x589876+='%'+('00'+_0x33351e['charCodeAt'](_0x295ff6)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x589876);};_0x3925['hCKIZy']=_0x3488db,_0x3925['dYlPFL']={},_0x3925['uNsila']=!![];}const _0x6773c2=_0x79ea9d[0x0],_0x2599f0=_0x2d59a5+_0x6773c2,_0x2c057d=_0x3925['dYlPFL'][_0x2599f0];return!_0x2c057d?(_0x392575=_0x3925['hCKIZy'](_0x392575),_0x3925['dYlPFL'][_0x2599f0]=_0x392575):_0x392575=_0x2c057d,_0x392575;}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=_0x218a12(0x20c,0x1ff,0x1fc,0x1ed),SUMMARY_MESSAGE_PREFIX='Previous\x20conversation\x20summary:';async function summarizeMessages(_0x41f2c6,_0x295ff6,_0x1fe7be={}){const _0x4de1b4={_0x5ba861:0x4a7,_0x3ca229:0x4b7,_0x68cb7:0x3d4,_0x31b444:0x4b1,_0x205ab0:0x4c5,_0x29ed44:0x4c4,_0x2ade71:0x3ca,_0x5b7147:0x3bf,_0x548c67:0x3d0,_0xbf9666:0x3cf,_0x280cba:0x4be,_0x820267:0x4c3,_0x22e73f:0x4bc,_0x1c8cab:0x4b7,_0x24232a:0x3d6,_0x417f9f:0x3ef},_0x403be9={_0xd1413b:0x190},_0x2f5c98={_0x25b32d:0x1e0,_0x1c36bf:0xf0};if(_0x41f2c6[_0x50b674(_0x4de1b4._0x5ba861,0x4a2,_0x4de1b4._0x3ca229,0x4b1)]===0x0)return NO_HISTORY;const _0x1ef54c=messagesToText(_0x41f2c6),_0x47e033={'model':_0x295ff6[_0x6ded8b(0x3e5,0x3e9,0x3d8,_0x4de1b4._0x68cb7)],'maxTokens':_0x295ff6[_0x50b674(_0x4de1b4._0x31b444,0x4b8,0x4b2,0x4b0)]??0x1000,'system':[{'type':'text','text':SUMMARY_SYSTEM_PROMPT}],'messages':[{'role':'user','content':[{'type':_0x50b674(0x4c0,0x4cc,_0x4de1b4._0x205ab0,_0x4de1b4._0x29ed44),'text':_0x1ef54c}]}],'tools':[],'metadata':{'sessionId':_0x6ded8b(_0x4de1b4._0x2ade71,_0x4de1b4._0x5b7147,0x3cd,_0x4de1b4._0x548c67),'turnId':_0x6ded8b(0x3dc,_0x4de1b4._0xbf9666,0x3cd,0x3ce)}},_0x2c95bc=await _0x295ff6[_0x6ded8b(0x3c0,0x3df,0x3d2,0x3d1)](_0x47e033,{'signal':_0x1fe7be[_0x50b674(0x4d6,_0x4de1b4._0x280cba,0x4d3,0x4c5)]});function _0x6ded8b(_0x5c494b,_0x1d4665,_0x1ca4eb,_0x55aa4d){return _0x218a12(_0x5c494b-0x1de,_0x55aa4d,_0x1ca4eb-_0x2f5c98._0x25b32d,_0x55aa4d-_0x2f5c98._0x1c36bf);}function _0x50b674(_0x490ab5,_0x44bb1a,_0x30901c,_0x40a2d4){return _0x218a12(_0x490ab5-_0x403be9._0xd1413b,_0x490ab5,_0x40a2d4-0x2bb,_0x40a2d4-0x112);}return _0x2c95bc[_0x50b674(_0x4de1b4._0x820267,0x4b9,_0x4de1b4._0x22e73f,0x4b5)]['filter'](_0x26d383=>_0x26d383[_0x6ded8b(0x3d6,0x3e0,0x3d7,0x3cb)]===_0x50b674(0x4bd,0x4c6,0x4c5,0x4c4))['map'](_0xa89b35=>_0xa89b35['text'])[_0x50b674(_0x4de1b4._0x1c8cab,0x4b9,0x4b6,0x4b4)]('')[_0x6ded8b(_0x4de1b4._0x24232a,_0x4de1b4._0x24232a,0x3df,_0x4de1b4._0x417f9f)]();}function buildSummaryMessage(_0x37a132){const _0x58af41={_0x511e43:0xc3,_0x3291ac:0xc2,_0x168d86:0xc5},_0x5224fe={_0x14873f:0x2c2,_0x1fb641:0x181};function _0x5c36c8(_0x47f88e,_0x58f9b0,_0x29bbba,_0x24582f){return _0x218a12(_0x47f88e-0x78,_0x24582f,_0x58f9b0- -_0x5224fe._0x14873f,_0x24582f-_0x5224fe._0x1fb641);}return{'role':'user','content':[{'type':_0x5c36c8(-_0x58af41._0x511e43,-0xb9,-_0x58af41._0x3291ac,-_0x58af41._0x168d86),'text':SUMMARY_MESSAGE_PREFIX+'\x0a\x0a'+_0x37a132}]};}function buildTopicReminderText(_0x57acf6){const _0x159646={_0x203454:0x38d,_0x2bc36d:0x395,_0x5173c7:0x39e,_0x33c45b:0x3a8},_0x12fcf1={_0x2c6bcb:0x19a},_0x31c5fe={_0x1f7e41:0x69,_0x2261b5:0x283};function _0x1b62a4(_0x13afc8,_0x4a1e72,_0x42b294,_0x402265){return _0x218a12(_0x13afc8-_0x31c5fe._0x1f7e41,_0x42b294,_0x4a1e72-_0x31c5fe._0x2261b5,_0x402265-0x18b);}function _0x4b612b(_0x112448,_0x25acad,_0x402236,_0x26c821){return _0x218a12(_0x112448-0x1f1,_0x112448,_0x402236-_0x12fcf1._0x2c6bcb,_0x26c821-0x3e);}return _0x4b612b(0x39e,_0x159646._0x203454,_0x159646._0x2bc36d,0x393)+_0x57acf6+_0x4b612b(0x3b0,_0x159646._0x5173c7,0x3a6,_0x159646._0x33c45b);}function _0x79ea(){const _0x13c7c3=['y29UDgvUDa','phn5C3rLBs1Yzw1PBMrLCJ4kvgHLign1CNjLBNqGC2vZC2LVBIb0B3bPyYbPCYaI','tM8Gy29UDMvYC2f0Aw9UigHPC3rVCNKGDg8GC3vTBwfYAxPLlG','BM90ihLLDcbZzxq','mtKWode2ogfbCgn5zG','DhjPBq','vxnLCG','ndbqCuvNvg0','mZyZnJe0ouPQqKDWCG','mtq3mtuXohrfChbqDa','BwfW','DxnLCG','n1Phy1fNuq','DhjHBNnMB3jTzxi','vg9VBa','Dgv4Da','C2LNBMfS','mZy0mte5mNvhyvvxDW','iI4GswyGDgHLihvZzxiNCYbSyxrLC3qGBwvZC2fNzsbZDgfYDhmGysbJBgvHCMX5igrPzMzLCMvUDcb0B3bPyYWGy2fSBcb1CgrHDgvuB3bPyYb3AxrOigeGy29Uy2LZzsbUzxCGDg9WAwmGkdmTnIb3B3jKCYKUie90AgvYD2LZzsbKBYbUB3qGy2fSBcbPDc4kpc9ZExn0zw0TCMvTAw5Kzxi+','CM9Szq','C3LZDgvT','zMLSDgvY','C3vTBwfYEq','otm0m2fcwMPqzG','yMvMB3jLtw9KzwXszxf1zxn0','nJzhvwjXAgq','mtqYwwz4vKH6','y29TCgXLDgu','ndaWnZb5sejKwNy','mtu3nJGXnvzrs0z0Ea','Bwf4vg9Rzw5Z','BgvUz3rO','DhLWzq','Bw9KzwW','AM9PBG'];_0x79ea=function(){return _0x13c7c3;};return _0x79ea();}function createTopicReminderExtension(_0x34a4b7){const _0x59bee5={_0x45a7ff:0x19a,_0x2ce387:0x199,_0x24443f:0x187},_0x43c748={_0x380412:0x36,_0x154e8f:0x30,_0x4feae8:0x29,_0x21befd:0x261,_0x436e30:0x262,_0xedba81:0x266},_0x3bdcaa={_0x3b05bd:0x3ea,_0xc92721:0x16a},_0x43c0d2={_0x427914:0x3f},_0x4b32c4={_0x5b24fa:0x391,_0x189354:0xf5},{getTopic:_0x3ee05e}=_0x34a4b7;function _0x14ad05(_0x17ecc9,_0x3aad0a,_0x12ce3c,_0x5d9517){return _0x218a12(_0x17ecc9-0x15c,_0x12ce3c,_0x17ecc9- -_0x4b32c4._0x5b24fa,_0x5d9517-_0x4b32c4._0x189354);}function _0x72359f(_0x290609,_0x39d56b,_0x32e228,_0x5c7cb0){return _0x218a12(_0x290609-0x13c,_0x32e228,_0x39d56b- -0x3f1,_0x5c7cb0-_0x43c0d2._0x427914);}return{'id':'topic-reminder-before-model-request','stage':_0x14ad05(-0x1a2,-_0x59bee5._0x45a7ff,-_0x59bee5._0x2ce387,-0x19b),'kind':_0x14ad05(-0x18a,-0x183,-0x178,-_0x59bee5._0x24443f),'order':0xbb8,'enabled':!![],'run'(_0x53493b){const _0x1abcf4={_0x580ddd:0x10e};function _0x28003(_0x19b844,_0x15b7a1,_0x24cd7d,_0x4f3f62){return _0x14ad05(_0x4f3f62-0x1bd,_0x15b7a1-0xe8,_0x24cd7d,_0x4f3f62-_0x1abcf4._0x580ddd);}function _0x1ddcdb(_0x2e785a,_0x3bb8f3,_0x2f5377,_0x2ec4dd){return _0x14ad05(_0x3bb8f3-_0x3bdcaa._0x3b05bd,_0x3bb8f3-_0x3bdcaa._0xc92721,_0x2ec4dd,_0x2ec4dd-0xde);}const _0x4271b4=_0x3ee05e()??_0x28003(_0x43c748._0x380412,_0x43c748._0x154e8f,0x2b,_0x43c748._0x4feae8),_0x344142={'type':_0x1ddcdb(_0x43c748._0x21befd,_0x43c748._0x436e30,0x266,0x266),'text':buildTopicReminderText(_0x4271b4)};return{..._0x53493b,'system':[..._0x53493b[_0x1ddcdb(_0x43c748._0xedba81,0x267,0x263,0x268)],_0x344142]};}};}export{Agent,SUMMARY_MESSAGE_PREFIX,SUMMARY_SYSTEM_PROMPT,buildSummaryMessage,buildTopicReminderText,createAgentMetrics,createExtensionRegistry,createTopicReminderExtension,runTurn,summarizeMessages};
1
+ function _0x3066f6(_0x2f537f,_0xc658a7,_0x402678,_0x128958){const _0x45875a={_0x29fa56:0x15d};return _0xcee2(_0x402678- -_0x45875a._0x29fa56,_0x128958);}(function(_0x6eb2f5,_0x525f8d){const _0x21d77a={_0xa67948:0x15f,_0xed4a1b:0x153,_0x47621b:0x320,_0x2b3a2a:0x32d,_0x43356a:0x30f,_0xe88277:0x311,_0x4ac8e7:0x324,_0x23c152:0x325,_0x16e346:0x317,_0x233c8f:0x328,_0x513f49:0x328,_0x1af205:0x30d,_0x59ea8f:0x14a,_0x996d32:0x15d,_0x50e39c:0x31a,_0x5c1ff9:0x31d},_0x5bf904={_0x1626fd:0x210};function _0x50bf58(_0x38dba3,_0x30bea3,_0x34740d,_0x40a20a){return _0xcee2(_0x34740d-_0x5bf904._0x1626fd,_0x40a20a);}function _0x5581ee(_0x29a36d,_0x5b3c6e,_0x227fef,_0x21f177){return _0xcee2(_0x5b3c6e-0x43,_0x21f177);}const _0x2b0ffd=_0x6eb2f5();while(!![]){try{const _0x26b406=-parseInt(_0x5581ee(_0x21d77a._0xa67948,0x15a,_0x21d77a._0xed4a1b,0x166))/0x1+parseInt(_0x50bf58(0x315,_0x21d77a._0x47621b,0x326,_0x21d77a._0x2b3a2a))/0x2+-parseInt(_0x50bf58(0x300,_0x21d77a._0x43356a,0x30c,_0x21d77a._0xe88277))/0x3*(-parseInt(_0x50bf58(0x335,_0x21d77a._0x4ac8e7,_0x21d77a._0x23c152,_0x21d77a._0x16e346))/0x4)+parseInt(_0x50bf58(0x314,_0x21d77a._0x233c8f,0x316,_0x21d77a._0x513f49))/0x5+parseInt(_0x50bf58(_0x21d77a._0x1af205,0x303,0x314,0x30a))/0x6+-parseInt(_0x5581ee(0x151,0x14f,0x143,0x14d))/0x7*(parseInt(_0x5581ee(_0x21d77a._0x59ea8f,0x156,_0x21d77a._0x996d32,0x148))/0x8)+parseInt(_0x50bf58(_0x21d77a._0x50e39c,0x32f,0x324,_0x21d77a._0x5c1ff9))/0x9*(-parseInt(_0x50bf58(0x30c,0x325,0x313,0x310))/0xa);if(_0x26b406===_0x525f8d)break;else _0x2b0ffd['push'](_0x2b0ffd['shift']());}catch(_0x5b6cd4){_0x2b0ffd['push'](_0x2b0ffd['shift']());}}}(_0x44c6,0x1978e));function _0x44c6(){const _0x5c815e=['ww91igfYzsbHihnLC3nPB24Ty29UDgLUDwL0EsbZDw1TyxjPEMvYigzVCIbHienmssbJB2rPBMCGyxnZAxn0yw50lIbuAguGy29UDMvYC2f0Aw9UihLVDsbHCMuGC3vTBwfYAxPPBMCGAxmGyw4GAw4TChjVz3jLC3mGy29KAw5NihnLC3nPB24GDgHHDcb3yxmGAw50zxjYDxb0zwqGyMvJyxvZzsb0AguGy29UDgv4Dcb3Aw5KB3CGAxmGzNvSBc4Gww91CIbZDw1Tyxj5ihDPBgWGyMuGAw5Qzwn0zwqGAw50BYbHigzYzxnOihnLC3nPB24GC28GDgHLigfZC2LZDgfUDcbJyw4GCMvZDw1LihDVCMSGD2L0Ag91DcbSB3nPBMCGChjVz3jLC3mUcGPqCM9KDwnLigeGC3rYDwn0DxjLzcbZDw1Tyxj5ihvZAw5NihrOzsbMB2XSB3DPBMCGC2vJDgLVBNmUie9TAxqGyw55ihnLy3rPB24GDgHHDcbOyxmGBM8GCMvSzxzHBNqGy29UDgvUDc4kcImJiYbtzxnZAw9UieDVywWku3rHDguGDgHLihvZzxiNCYbVCMLNAw5HBcbYzxf1zxn0ig9Yig9IAMvJDgL2zsbPBIaXltiGC2vUDgvUy2vZlGOkiYmJifDVCMSGq29TCgXLDgvKcKXPC3qGD2HHDcbOyxmGywXYzwfKEsbIzwvUigrVBMuSihDPDgGGC3bLy2LMAwnZoGOTiezPBgvZignYzwf0zwqSig1VzgLMAwvKlcbVCIbKzwXLDgvKicHPBMnSDwrLihbHDgHZkqOTieTLEsbPBxbSzw1LBNrHDgLVBIbKzwnPC2LVBNmGBwfKzsbHBMqGDgHLAxiGCMf0Aw9UywXLcI0Gq29TBwfUzhmGCNvUigfUzcb0AgvPCIbVDxrJB21LCYaOCgfZCY9MywLSkqOTifrLC3rZihDYAxr0zw4GB3iGzxHLy3v0zwqGyw5KihrOzwLYihjLC3vSDhmkcImJiYbdDxjYzw50ifn0yxrLcKrLC2nYAwjLihDOzxjLihrOAw5NCYbZDgfUzcbYAwDODcbUB3C6cI0Gv2HHDcb3yxmGDgHLigfZC2LZDgfUDcbKB2LUzYb3AgvUihrOzsbZzxnZAw9UigvUzgvKpWOTiefUEsbPBI1WCM9NCMvZCYbMAwXLigvKAxrZig9YihbHCNrPywXSEsbJB21WBgv0zwqGC3rLChmklsbfCNjVCIbTzxnZywDLCYWGzMfPBgLUzYb0zxn0CYWGB3iGyMXVy2TLCNmGzw5JB3vUDgvYzwqklsbuAguGy3vYCMvUDcbICMfUy2GSihDVCMTPBMCGzgLYzwn0B3j5lcbVCIbLBNzPCM9UBwvUDcbZDgf0zsbPzIbTzw50Aw9UzwqkcImJiYbszw1HAw5PBMCGv29YAWPmAxn0ihDOyxqGC3rPBgWGBMvLzhmGDg8GyMuGzg9Uzsb0BYbJB21WBgv0zsb0AguGB3jPz2LUywWGz29HBdOklsbtCgvJAwzPyYbUzxH0ihn0zxbZlcbPBIbVCMrLCIbPzIbZzxf1zw5JzsbTyxr0zxjZcI0Gs25VD24GAxnZDwvZig9YigvKz2uGy2fZzxmGC3rPBgWGDw5HzgrYzxnZzwqklsbbBNKGCgvUzgLUzYb1C2vYigrLy2LZAw9UCYbVCIbXDwvZDgLVBNmGDgHHDcb3zxjLihvUyw5ZD2vYzwqkcImJiYblzxKGq29UDgv4DaPqCMvZzxj2zsbJCML0AwnHBcbKzxrHAwXZihrOyxqGD291BgqGyMuGzxHWzw5ZAxzLihrVihjLlwrLCML2ztOklsbbCMnOAxrLy3r1CMuGB3iGzgvZAwDUihbHDhrLCM5ZigjLAw5NigzVBgXVD2vKcI0Gsw1WB3j0yw50ihzHCMLHyMXLig5HBwvZlcbMDw5JDgLVBIbZAwDUyxr1CMvZlcbVCIbbueKGC2HHCgvZcI0GrMLSzsbWyxrOCYbHBMqGBgLUzsbUDw1IzxjZihjLzMvYzw5JzwqGCMvWzwf0zwrSEqOTienVBNn0CMfPBNrZig9YihjLCxvPCMvTzw50CYb0AguGDxnLCIbZCgvJAwzPzwqklsbuB2rVigXPC3qGAxrLBxmGyw5KihrOzwLYihn0yxr1CYaOCgvUzgLUzY9PBL9WCM9NCMvZCY9JB21WBgv0zwqPcGPsDwXLCZOklsbczsbWCMvJAxnLigfUzcbZCgvJAwzPyY4GvxnLigv4ywn0igzPBguGCgf0AhmSigz1BMn0Aw9Uig5HBwvZlcbHBMqGzxjYB3iGBwvZC2fNzxmG4Ocuig5VDcb2ywD1zsbYzwzLCMvUy2vZlGOTierVie5pvcbPBMnSDwrLignVBNzLCNnHDgLVBMfSihbSzwfZyw50CMLLCYWGCMvWzwf0zwqGyMfJAY1HBMqTzM9YDgGSig9Yigv4CgXVCMf0B3j5igrLywqGzw5KCYb0Agf0ihDLCMuGywjHBMrVBMvKlGOTierVie5pvcbZDw1TyxjPEMuGDg9VBcbJywXSCYb2zxjIyxrPBs4Gq2fWDhvYzsb0AgvPCIbVDxrJB21LCYbHBMqGzgvJAxnPB25ZlcbUB3qGDgHLig1Ly2HHBMLJCY4klsblzwvWihrOzsb0B3rHBcbZDw1Tyxj5ihvUzgvYide1mdaGDg9Rzw5ZlIbqCMLVCML0AxPLigfJDgLVBMfIBguGC3rHDguGB3zLCIbUyxjYyxrPDMuUcI0Gv3jPDguGzM9YigeGy29KAw5NigfNzw50ihrOyxqGD2LSBcbYzwfKihrOAxmGC3vTBwfYEsbHBMqGAw1TzwrPyxrLBhKGCMvZDw1LihDVCMSSig5VDcbMB3iGysbODw1HBIbYzwfKzxiU','DxnLCG','AM9PBG','BgvUz3rO','odKWD05bB1zM','ndeYnZe2wwPhuNfQ','phn5C3rLBs1Yzw1PBMrLCJ4kvgHLign1CNjLBNqGC2vZC2LVBIb0B3bPyYbPCYaI','ndaWndiWtNvQrK1l','BM90ihLLDcbZzxq','vxnLCG','Bw9KzwW','C2LNBMfS','Dg9WAwmTCMvTAw5KzxiTyMvMB3jLlw1VzgvSlxjLCxvLC3q','ndK3vevjs3Hf','C3vTBwfYEq','DhLWzq','DhjHBNnMB3jTzxi','C3LZDgvT','y29TCgXLDgu','BwfW','mtaZntjKz1vVtw0','mJq5mdneEMHwvM4','mJmYmZzRreXPuha','mZqYmtC0tufnzfDX','ntC1nJvjAgr4EeO','CM9Szq','qxnZAxn0yw50','DhjPBq','uhjLDMLVDxmGy29UDMvYC2f0Aw9Uihn1Bw1HCNK6','yMvMB3jLtw9KzwXszxf1zxn0','Dgv4Da','zMLSDgvY','vg9VBa','otneEwvTDuS','Bwf4vg9Rzw5Z','iI4GswyGDgHLihvZzxiNCYbSyxrLC3qGBwvZC2fNzsbZDgfYDhmGysbJBgvHCMX5igrPzMzLCMvUDcb0B3bPyYWGy2fSBcbvCgrHDgvuB3bPyYb3AxrOigeGy29Uy2LZzsbUzxCGDg9WAwmGkdmTnIb3B3jKCYKUie90AgvYD2LZzsbKBYbUB3qGy2fSBcbPDc4kpc9ZExn0zw0TCMvTAw5Kzxi+'];_0x44c6=function(){return _0x5c815e;};return _0x44c6();}import{Agent,createAgentMetrics,createExtensionRegistry,runTurn}from'../chunk-FKZ3QQWZ.js';import{getTextFromMessage}from'../chunk-QDOE7NWO.js';import'../chunk-FFIZ6TKW.js';import'../chunk-X7VAACWY.js';function roleLabel(_0x3b8f64){const _0x113c5d={_0xfe9de1:0x66,_0x11818f:0x5c,_0xb892d1:0x65,_0x3322e2:0x64,_0x488a31:0x40,_0x5486b9:0x61},_0x2d77b3={_0x86a194:0xac};if(_0x3b8f64===_0x43a88c(0x54,0x61,_0x113c5d._0xfe9de1,0x4e))return _0x43a88c(_0x113c5d._0x11818f,0x61,_0x113c5d._0xb892d1,0x67);function _0x43a88c(_0x59f439,_0x4c128f,_0x2a9ab9,_0x134118){return _0xcee2(_0x59f439- -_0x2d77b3._0x86a194,_0x4c128f);}if(_0x3b8f64==='assistant')return _0x43a88c(0x6d,0x65,0x68,_0x113c5d._0x3322e2);function _0x3b9f7b(_0x1c036e,_0x3f617c,_0x5793b8,_0x590f18){return _0xcee2(_0x3f617c-0xa6,_0x590f18);}return _0x43a88c(0x4f,_0x113c5d._0x488a31,0x5e,_0x113c5d._0x5486b9);}function messagesToText(_0x36993b){const _0x13d43e={_0x4ca002:0x25d,_0x538186:0x269,_0x218181:0x25a,_0x5997a1:0x317,_0x298080:0x320},_0x1aaf11={_0x2cdcbe:0x313,_0x4afea0:0x31b,_0x3c97ac:0x318,_0x221aa5:0x31e},_0x377ed7={_0x460599:0xb0,_0x48d73c:0x8c},_0x9a7729={_0x1d841e:0x21f};function _0x42098b(_0x1e2468,_0x1bc495,_0x178e27,_0x7c62f3){return _0xcee2(_0x1e2468-_0x9a7729._0x1d841e,_0x178e27);}function _0x1de31a(_0x1528db,_0x56146a,_0x2c7a8b,_0x11f2f2){return _0xcee2(_0x1528db-0x14b,_0x11f2f2);}return _0x36993b[_0x1de31a(_0x13d43e._0x4ca002,0x26b,_0x13d43e._0x538186,_0x13d43e._0x218181)](_0x415469=>{function _0xcbeb90(_0x260f98,_0x47f407,_0xf21ed4,_0x20d99a){return _0x1de31a(_0x260f98-_0x377ed7._0x460599,_0x47f407-_0x377ed7._0x48d73c,_0xf21ed4-0x118,_0x20d99a);}const _0x1eb0df=getTextFromMessage(_0x415469)['trim']();return _0x1eb0df?roleLabel(_0x415469[_0xcbeb90(_0x1aaf11._0x2cdcbe,_0x1aaf11._0x4afea0,_0x1aaf11._0x3c97ac,_0x1aaf11._0x221aa5)])+':\x20'+_0x1eb0df:'';})[_0x42098b(0x319,0x329,0x311,_0x13d43e._0x5997a1)](_0x22a781=>_0x22a781['length']>0x0)[_0x42098b(_0x13d43e._0x298080,0x315,0x32b,0x30f)]('\x0a\x0a');}var SUMMARY_SYSTEM_PROMPT=_0x3066f6(-0x5c,-0x55,-0x5e,-0x67),NO_HISTORY='No\x20conversation\x20history\x20to\x20summarize.',SUMMARY_MESSAGE_PREFIX=_0x5b07b2(0xa2,0x91,0x9d,0xb2);async function summarizeMessages(_0x4254d2,_0x1428b2,_0x137dcb={}){const _0x28e4a4={_0x13585a:0x2ee,_0x2cf686:0x2e4,_0x40b9cd:0x2f5,_0x66e3d1:0x2ed,_0x57c991:0x2ee,_0x3a0127:0x2f9,_0x1864dc:0x2ec,_0x1eba25:0x2e1,_0x9f3b6a:0x2e9,_0x5181b6:0xd,_0x507953:0x6,_0xbb6219:0x10,_0x41857b:0x2f9,_0x4c30bc:0x21,_0x252b4a:0x17,_0x250032:0x16,_0x456239:0x25,_0x3870da:0x2f6,_0x1ef0d3:0x306,_0x1dfb3b:0x2e5,_0x13b3b0:0x2f6,_0xf1dbee:0x20,_0x479368:0xd,_0x5d7cea:0x7,_0x3b0a90:0xa,_0x4f53f1:0x4,_0x4b0152:0xe,_0x1a5cc0:0x9},_0x22b5c4={_0x504430:0x241,_0x556aec:0x1dc};if(_0x4254d2[_0x22036a(_0x28e4a4._0x13585a,_0x28e4a4._0x2cf686,0x2e0,0x2f3)]===0x0)return NO_HISTORY;function _0x22036a(_0x4642b9,_0xe04fd5,_0x5d27fe,_0x18234a){return _0x5b07b2(_0x4642b9-_0x22b5c4._0x504430,_0xe04fd5-0xd8,_0x5d27fe-_0x22b5c4._0x556aec,_0x5d27fe);}const _0x1f0fe8=messagesToText(_0x4254d2),_0x114b9e={'model':_0x1428b2[_0x22036a(_0x28e4a4._0x40b9cd,0x2f0,0x2fa,_0x28e4a4._0x66e3d1)],'maxTokens':_0x1428b2[_0x22036a(0x2e9,_0x28e4a4._0x57c991,_0x28e4a4._0x3a0127,_0x28e4a4._0x3a0127)]??0x1000,'system':[{'type':'text','text':SUMMARY_SYSTEM_PROMPT}],'messages':[{'role':_0x22036a(_0x28e4a4._0x1864dc,_0x28e4a4._0x1eba25,_0x28e4a4._0x9f3b6a,0x2eb),'content':[{'type':_0x12569b(-0x1,-_0x28e4a4._0x5181b6,-_0x28e4a4._0x507953,_0x28e4a4._0xbb6219),'text':_0x1f0fe8}]}],'tools':[],'metadata':{'sessionId':_0x22036a(_0x28e4a4._0x41857b,0x2fd,0x2f4,0x2f7),'turnId':_0x12569b(0x13,0x25,_0x28e4a4._0x4c30bc,0x3)}},_0x420a05=await _0x1428b2[_0x12569b(_0x28e4a4._0x252b4a,_0x28e4a4._0x250032,0x12,_0x28e4a4._0x456239)](_0x114b9e,{'signal':_0x137dcb[_0x22036a(_0x28e4a4._0x3870da,_0x28e4a4._0x1ef0d3,_0x28e4a4._0x1dfb3b,_0x28e4a4._0x13b3b0)]});function _0x12569b(_0x2ac12d,_0x4a41f7,_0x1d338a,_0x448ada){return _0x5b07b2(_0x2ac12d- -0xa5,_0x4a41f7-0xd8,_0x1d338a-0x11,_0x448ada);}return _0x420a05['content']['filter'](_0x333b8c=>_0x333b8c[_0x12569b(0x14,0xe,0x7,0x11)]===_0x12569b(-0x1,0xa,0x4,0x9))[_0x12569b(0x18,0x1b,_0x28e4a4._0xf1dbee,_0x28e4a4._0x479368)](_0x2fc39f=>_0x2fc39f[_0x22036a(0x2e5,0x2d3,0x2d9,0x2db)])[_0x12569b(_0x28e4a4._0x5d7cea,0x2,_0x28e4a4._0x3b0a90,-0xb)]('')[_0x12569b(-_0x28e4a4._0x4f53f1,-_0x28e4a4._0x4b0152,0xb,_0x28e4a4._0x1a5cc0)]();}function buildSummaryMessage(_0x1f4232){const _0x4ba358={_0x9d4f40:0x8a},_0x658720={_0x1f0550:0x2a};function _0x50183e(_0x4472e2,_0x3e4cf9,_0x307a6c,_0x3cd449){return _0x5b07b2(_0x4472e2- -_0x658720._0x1f0550,_0x3e4cf9-0x110,_0x307a6c-0x1c1,_0x307a6c);}return{'role':_0x50183e(0x81,0x90,0x82,_0x4ba358._0x9d4f40),'content':[{'type':'text','text':SUMMARY_MESSAGE_PREFIX+'\x0a\x0a'+_0x1f4232}]};}function buildTopicReminderText(_0xeced76){const _0x3d8f48={_0x344b68:0x12b,_0x53bb12:0x127,_0x11f4cf:0x12c,_0x350e71:0x12d},_0x4de4e4={_0x1aab23:0x40},_0x225816={_0x104f70:0x2ab};function _0x5dba16(_0xb7db3c,_0x48f64b,_0x3d891f,_0x42b129){return _0x3066f6(_0xb7db3c-0xc7,_0x48f64b-0x15e,_0x42b129-_0x225816._0x104f70,_0x48f64b);}function _0x56d9ff(_0x482247,_0x30bbc1,_0x39fe4a,_0x315589){return _0x3066f6(_0x482247-_0x4de4e4._0x1aab23,_0x30bbc1-0xb6,_0x315589- -0xcf,_0x482247);}return _0x56d9ff(-0x117,-0x125,-_0x3d8f48._0x344b68,-_0x3d8f48._0x53bb12)+_0xeced76+_0x56d9ff(-0x124,-_0x3d8f48._0x11f4cf,-_0x3d8f48._0x350e71,-0x12e);}function _0xcee2(_0x382604,_0x5ae7e3){_0x382604=_0x382604-0xf6;const _0x44c676=_0x44c6();let _0xcee2f5=_0x44c676[_0x382604];if(_0xcee2['wpsGaj']===undefined){var _0x35ac4c=function(_0x33d1b4){const _0x26c073='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x3b8f64='',_0x36993b='';for(let _0x415469=0x0,_0x1eb0df,_0x22a781,_0x4254d2=0x0;_0x22a781=_0x33d1b4['charAt'](_0x4254d2++);~_0x22a781&&(_0x1eb0df=_0x415469%0x4?_0x1eb0df*0x40+_0x22a781:_0x22a781,_0x415469++%0x4)?_0x3b8f64+=String['fromCharCode'](0xff&_0x1eb0df>>(-0x2*_0x415469&0x6)):0x0){_0x22a781=_0x26c073['indexOf'](_0x22a781);}for(let _0x1428b2=0x0,_0x137dcb=_0x3b8f64['length'];_0x1428b2<_0x137dcb;_0x1428b2++){_0x36993b+='%'+('00'+_0x3b8f64['charCodeAt'](_0x1428b2)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x36993b);};_0xcee2['yhFvqg']=_0x35ac4c,_0xcee2['jvnyrJ']={},_0xcee2['wpsGaj']=!![];}const _0x47ae9f=_0x44c676[0x0],_0x17f11f=_0x382604+_0x47ae9f,_0x110464=_0xcee2['jvnyrJ'][_0x17f11f];return!_0x110464?(_0xcee2f5=_0xcee2['yhFvqg'](_0xcee2f5),_0xcee2['jvnyrJ'][_0x17f11f]=_0xcee2f5):_0xcee2f5=_0x110464,_0xcee2f5;}function _0x5b07b2(_0x3306e6,_0x5c88f3,_0x36c6a4,_0x5a4684){return _0xcee2(_0x3306e6- -0x55,_0x5a4684);}function createTopicReminderExtension(_0x3caf8c){const _0x4c9823={_0x2eeebf:0x3f,_0x523868:0x5b,_0x522ce8:0x56,_0x24046c:0x53,_0x1e809f:0x51,_0x323ba5:0x169,_0x359c94:0x163,_0x52bd42:0x15e},_0x5a1f61={_0x26632e:0x4c8,_0x3b35f7:0x4cf,_0x227576:0x4ba},_0x4fc17b={_0x18070f:0x440,_0x44f32d:0xba,_0x1253a4:0x14b},_0x43a994={_0x4d3414:0xf4},_0x3d34f4={_0x3d9684:0x169,_0x25db6e:0x1b7};function _0x129650(_0x464557,_0x2ca24f,_0x164cf4,_0x58c357){return _0x3066f6(_0x464557-_0x3d34f4._0x3d9684,_0x2ca24f-0x48,_0x464557-_0x3d34f4._0x25db6e,_0x164cf4);}function _0x5deb7b(_0x4e2375,_0x4a12af,_0x12010c,_0x562cc7){return _0x5b07b2(_0x562cc7- -_0x43a994._0x4d3414,_0x4a12af-0x1a6,_0x12010c-0x142,_0x12010c);}const {getTopic:_0x339661}=_0x3caf8c;return{'id':_0x5deb7b(-0x50,-0x35,-_0x4c9823._0x2eeebf,-0x3e),'stage':_0x5deb7b(-_0x4c9823._0x523868,-_0x4c9823._0x522ce8,-_0x4c9823._0x24046c,-_0x4c9823._0x1e809f),'kind':_0x129650(_0x4c9823._0x323ba5,_0x4c9823._0x359c94,_0x4c9823._0x52bd42,0x165),'order':0xbb8,'enabled':!![],'run'(_0x4808ea){function _0x29cea2(_0x4d6a47,_0x4f0049,_0x29e424,_0x2dfdf3){return _0x5deb7b(_0x4d6a47-0x19,_0x4f0049-0x166,_0x2dfdf3,_0x4d6a47-0x501);}const _0x4c1383=_0x339661()??_0x29cea2(0x4bf,_0x5a1f61._0x26632e,_0x5a1f61._0x3b35f7,0x4bc),_0x48bf20={'type':'text','text':buildTopicReminderText(_0x4c1383)};function _0x557a5a(_0x49538d,_0xa310d0,_0x41b4c9,_0x2d8b0b){return _0x129650(_0xa310d0- -_0x4fc17b._0x18070f,_0xa310d0-_0x4fc17b._0x44f32d,_0x49538d,_0x2d8b0b-_0x4fc17b._0x1253a4);}return{..._0x4808ea,'system':[..._0x4808ea[_0x29cea2(0x4c8,0x4be,0x4d2,_0x5a1f61._0x227576)],_0x48bf20]};}};}export{Agent,SUMMARY_MESSAGE_PREFIX,SUMMARY_SYSTEM_PROMPT,buildSummaryMessage,buildTopicReminderText,createAgentMetrics,createExtensionRegistry,createTopicReminderExtension,runTurn,summarizeMessages};
@@ -10,13 +10,13 @@ export interface TopicReminderExtensionOptions {
10
10
  }
11
11
  /**
12
12
  * Build the `<system-reminder>` text that instructs the agent whether to call
13
- * `updateTopic`. Exported for unit testing.
13
+ * `UpdateTopic`. Exported for unit testing.
14
14
  */
15
15
  export declare function buildTopicReminderText(topic: string): string;
16
16
  /**
17
17
  * Creates a `beforeModelRequest` transformer that appends a `<system-reminder>`
18
18
  * TextBlock to every model request, informing the agent of the current session
19
- * topic and nudging it to call `updateTopic` only when the topic truly changes.
19
+ * topic and nudging it to call `UpdateTopic` only when the topic truly changes.
20
20
  *
21
21
  * - Reads `getTopic()` **live** on each run so the reminder always reflects the
22
22
  * most recent topic, even across tool calls within a single turn.
@@ -1 +1 @@
1
- (function(_0x4106bb,_0x33aab7){var _0x3037c3={_0x57bc3f:0x218,_0x2eb2c7:0x21c,_0x464255:0x21a,_0x5e54dd:0x220,_0x305134:0x1c0,_0x2d4f16:0x1c6,_0x52c58a:0x1bd,_0x55cb8f:0x1be,_0x3f0023:0x1b8,_0x5090f6:0x1bf,_0x1a9524:0x1bc,_0x54e1c3:0x222,_0x172fa4:0x21d,_0x1b75a6:0x1bf,_0x3a7093:0x1b6,_0x50e4cc:0x1bb,_0x192bed:0x1b7,_0x599f11:0x223,_0x4ad111:0x21e},_0x2e0599={_0x1e1000:0x382},_0x5347a6=_0x4106bb();function _0x3398ca(_0x42948d,_0x4a3688,_0x3137e5,_0x3b06cb){return _0x1a13(_0x4a3688-0x57,_0x3b06cb);}function _0x16c2c5(_0x4cbfa5,_0x282107,_0x5bf563,_0x246641){return _0x1a13(_0x282107- -_0x2e0599._0x1e1000,_0x246641);}while(!![]){try{var _0x55cfed=-parseInt(_0x16c2c5(-_0x3037c3._0x57bc3f,-_0x3037c3._0x2eb2c7,-_0x3037c3._0x464255,-_0x3037c3._0x5e54dd))/0x1*(parseInt(_0x3398ca(_0x3037c3._0x305134,0x1c1,_0x3037c3._0x2d4f16,_0x3037c3._0x52c58a))/0x2)+-parseInt(_0x3398ca(_0x3037c3._0x55cb8f,_0x3037c3._0x3f0023,0x1be,0x1b6))/0x3+-parseInt(_0x3398ca(_0x3037c3._0x5090f6,_0x3037c3._0x305134,_0x3037c3._0x1a9524,0x1c2))/0x4+parseInt(_0x16c2c5(-_0x3037c3._0x54e1c3,-_0x3037c3._0x172fa4,-0x21a,-0x21d))/0x5+parseInt(_0x3398ca(0x1b9,0x1ba,0x1b4,0x1b5))/0x6+parseInt(_0x3398ca(0x1bb,0x1b9,_0x3037c3._0x1b75a6,_0x3037c3._0x3a7093))/0x7*(parseInt(_0x3398ca(_0x3037c3._0x50e4cc,_0x3037c3._0x192bed,0x1b9,0x1b9))/0x8)+parseInt(_0x16c2c5(-_0x3037c3._0x599f11,-0x21e,-0x223,-_0x3037c3._0x4ad111))/0x9;if(_0x55cfed===_0x33aab7)break;else _0x5347a6['push'](_0x5347a6['shift']());}catch(_0x11b425){_0x5347a6['push'](_0x5347a6['shift']());}}}(_0xa73e,0x58459));function _0x1a13(_0x4f2c35,_0x474840){_0x4f2c35=_0x4f2c35-0x15f;var _0xa73e8f=_0xa73e();var _0x1a134b=_0xa73e8f[_0x4f2c35];if(_0x1a13['GAStGz']===undefined){var _0x72eb36=function(_0x82e0a4){var _0x1088eb='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';var _0x1ecb82='',_0x4025a7='';for(var _0x1bb905=0x0,_0x27d421,_0x72594c,_0x1d924d=0x0;_0x72594c=_0x82e0a4['charAt'](_0x1d924d++);~_0x72594c&&(_0x27d421=_0x1bb905%0x4?_0x27d421*0x40+_0x72594c:_0x72594c,_0x1bb905++%0x4)?_0x1ecb82+=String['fromCharCode'](0xff&_0x27d421>>(-0x2*_0x1bb905&0x6)):0x0){_0x72594c=_0x1088eb['indexOf'](_0x72594c);}for(var _0x417022=0x0,_0x49af39=_0x1ecb82['length'];_0x417022<_0x49af39;_0x417022++){_0x4025a7+='%'+('00'+_0x1ecb82['charCodeAt'](_0x417022)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x4025a7);};_0x1a13['hcTXlG']=_0x72eb36,_0x1a13['WMrVwe']={},_0x1a13['GAStGz']=!![];}var _0xe99005=_0xa73e8f[0x0],_0x304fd7=_0x4f2c35+_0xe99005,_0x1b7577=_0x1a13['WMrVwe'][_0x304fd7];return!_0x1b7577?(_0x1a134b=_0x1a13['hcTXlG'](_0x1a134b),_0x1a13['WMrVwe'][_0x304fd7]=_0x1a134b):_0x1a134b=_0x1b7577,_0x1a134b;}var TurnFailedError=class extends Error{['state'];constructor(_0x1ecb82,_0x4025a7){var _0x53282f={_0x49496f:0x123,_0x503ca4:0x489,_0x1aa3d3:0x48e,_0xac02d6:0x127,_0x152e3f:0x12f},_0x5cbb82={_0x121079:0x326};function _0x50f486(_0xeeffc8,_0x4dddbc,_0x5b4a34,_0x588308){return _0x1a13(_0x4dddbc-_0x5cbb82._0x121079,_0x5b4a34);}function _0x7c148d(_0x4d8a4c,_0x33aece,_0x4bb11f,_0x4698c2){return _0x1a13(_0x4698c2- -0x3c,_0x4d8a4c);}super(_0x1ecb82 instanceof Error?_0x1ecb82[_0x7c148d(0x11e,0x11d,0x11d,_0x53282f._0x49496f)]:_0x50f486(_0x53282f._0x503ca4,_0x53282f._0x1aa3d3,0x48b,0x48a),{'cause':_0x1ecb82}),this[_0x7c148d(0x127,_0x53282f._0xac02d6,_0x53282f._0x152e3f,0x12b)]='TurnFailedError',this['state']=_0x4025a7;}};function _0xa73e(){var _0x26f76c=['mte5mJa2uM9uC2vQ','BMfTzq','vhvYBIbMywLSzwq','mta5ota4nhbSt1bnBa','mLfPuNvguq','BwvZC2fNzq','mZqWndbyrejuvee','mtG0ndyYnuDyqw1vzq','mta3ohDgDxbHDG','mJm2ntyWoe5IDMjOzq','ndy1mdKZCuPnvK5g','mtm0ntK5mgrkDwvoEq'];_0xa73e=function(){return _0x26f76c;};return _0xa73e();}export{TurnFailedError};
1
+ (function(_0x381fb8,_0x13fcf3){var _0x5bdaad={_0x361753:0x4b6,_0x228164:0x4b4,_0x31c336:0x4bc,_0x49f497:0x4c2,_0x13d198:0x4bd,_0x3e4731:0x5ac,_0x1c9c70:0x4b7,_0x5ad1ab:0x4bb,_0x449e32:0x5b2,_0x5c99f0:0x5b4,_0x5199a2:0x5b1,_0x48a67e:0x5b7,_0x2f2b3e:0x4bd,_0x2c966e:0x5a9,_0x4244c3:0x5aa,_0x302db6:0x5a5,_0x4c71c3:0x5a8,_0x4587d9:0x5b0,_0x497df7:0x5a6,_0x9ef22f:0x4b9,_0xdcafea:0x4b9,_0x3ef1f6:0x4b6,_0x115dda:0x4bc};function _0x2f911c(_0x3e04b2,_0x1e188b,_0x2a3ea2,_0x248a76){return _0x2bc6(_0x248a76-0x2db,_0x3e04b2);}var _0x2b4925=_0x381fb8();function _0x3fa492(_0x44d87c,_0x140a0e,_0x183134,_0x2cc24f){return _0x2bc6(_0x44d87c-0x3d5,_0x183134);}while(!![]){try{var _0x26b291=-parseInt(_0x2f911c(_0x5bdaad._0x361753,0x4ae,0x4b0,_0x5bdaad._0x228164))/0x1*(parseInt(_0x2f911c(_0x5bdaad._0x31c336,_0x5bdaad._0x49f497,_0x5bdaad._0x13d198,0x4be))/0x2)+parseInt(_0x3fa492(_0x5bdaad._0x3e4731,0x5a7,0x5ad,0x5b1))/0x3*(parseInt(_0x2f911c(_0x5bdaad._0x1c9c70,0x4b0,_0x5bdaad._0x5ad1ab,0x4b3))/0x4)+-parseInt(_0x3fa492(_0x5bdaad._0x449e32,_0x5bdaad._0x5c99f0,_0x5bdaad._0x5199a2,_0x5bdaad._0x48a67e))/0x5*(parseInt(_0x2f911c(0x4b8,0x4b6,0x4bf,_0x5bdaad._0x2f2b3e))/0x6)+-parseInt(_0x3fa492(_0x5bdaad._0x5199a2,0x5b3,_0x5bdaad._0x2c966e,0x5b7))/0x7+-parseInt(_0x3fa492(_0x5bdaad._0x4244c3,_0x5bdaad._0x302db6,_0x5bdaad._0x4c71c3,0x5b0))/0x8+parseInt(_0x3fa492(0x5af,_0x5bdaad._0x449e32,_0x5bdaad._0x4587d9,0x5b1))/0x9*(-parseInt(_0x3fa492(0x5a9,0x5ae,0x5ac,_0x5bdaad._0x497df7))/0xa)+parseInt(_0x2f911c(_0x5bdaad._0x9ef22f,_0x5bdaad._0xdcafea,_0x5bdaad._0x3ef1f6,_0x5bdaad._0x115dda))/0xb;if(_0x26b291===_0x13fcf3)break;else _0x2b4925['push'](_0x2b4925['shift']());}catch(_0x1aab87){_0x2b4925['push'](_0x2b4925['shift']());}}}(_0xec6a,0xce0b4));var TurnFailedError=class extends Error{[_0x5b6226(0x2e2,0x2ed,0x2e1,0x2e8)];constructor(_0x219b44,_0x3ce96b){var _0x1cad65={_0x3ee1d8:0xed,_0x3b6507:0xe7,_0x279cf1:0xeb,_0x17283a:0xea,_0x81ce6b:0xe5,_0x533dd5:0xe3,_0x1d4742:0xe9,_0xa8e4c4:0xe8},_0x22fcc9={_0x31c879:0x1b3,_0x305c99:0xde,_0x1e4175:0x1c6},_0x2e73f6={_0x5ee504:0x8e,_0x11af38:0x15f,_0x482956:0x200};function _0x214230(_0x24e507,_0x37411f,_0x505896,_0x15e202){return _0x5b6226(_0x24e507-_0x2e73f6._0x5ee504,_0x15e202,_0x505896-_0x2e73f6._0x11af38,_0x505896- -_0x2e73f6._0x482956);}super(_0x219b44 instanceof Error?_0x219b44[_0x214230(_0x1cad65._0x3ee1d8,0xe6,_0x1cad65._0x3b6507,0xea)]:_0x214230(0xdc,_0x1cad65._0x279cf1,0xe4,_0x1cad65._0x17283a),{'cause':_0x219b44}),this[_0x214230(_0x1cad65._0x81ce6b,0xde,0xdf,_0x1cad65._0x533dd5)]=_0x214230(0xed,0xe7,_0x1cad65._0x1d4742,_0x1cad65._0xa8e4c4);function _0x5a080d(_0x3de047,_0x162c46,_0x39e431,_0x2d201a){return _0x5b6226(_0x3de047-_0x22fcc9._0x31c879,_0x162c46,_0x39e431-_0x22fcc9._0x305c99,_0x2d201a- -_0x22fcc9._0x1e4175);}this['state']=_0x3ce96b;}};function _0xec6a(){var _0x293a14=['m2XrD3f3vq','mtq3nJKYmenABunZyq','otuXmJeYA3HfyvHH','mZyXmtG5oeDeA09gsq','vhvYBIbMywLSzwq','mZuYodGZm3fbDe5rva','nujyuKXUva','BwvZC2fNzq','C3rHDgu','vhvYBKzHAwXLzevYCM9Y','nte0ndyXmdL6vvL3sMy','ntKWntaXneTtChPMzq','mK5ovvfIzW','mJbnweTzBMm','nZy4mdm5mKPgqurquG','BMfTzq'];_0xec6a=function(){return _0x293a14;};return _0xec6a();}function _0x2bc6(_0x1ef714,_0x355699){_0x1ef714=_0x1ef714-0x1d4;var _0xec6acf=_0xec6a();var _0x2bc690=_0xec6acf[_0x1ef714];if(_0x2bc6['SPPbDU']===undefined){var _0x5496fc=function(_0x580c5c){var _0x5aca1d='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';var _0x219b44='',_0x3ce96b='';for(var _0x4ed585=0x0,_0x14d1bf,_0x3a1e44,_0x13e36c=0x0;_0x3a1e44=_0x580c5c['charAt'](_0x13e36c++);~_0x3a1e44&&(_0x14d1bf=_0x4ed585%0x4?_0x14d1bf*0x40+_0x3a1e44:_0x3a1e44,_0x4ed585++%0x4)?_0x219b44+=String['fromCharCode'](0xff&_0x14d1bf>>(-0x2*_0x4ed585&0x6)):0x0){_0x3a1e44=_0x5aca1d['indexOf'](_0x3a1e44);}for(var _0x2172d0=0x0,_0x1491d9=_0x219b44['length'];_0x2172d0<_0x1491d9;_0x2172d0++){_0x3ce96b+='%'+('00'+_0x219b44['charCodeAt'](_0x2172d0)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x3ce96b);};_0x2bc6['oAEeGV']=_0x5496fc,_0x2bc6['goooGe']={},_0x2bc6['SPPbDU']=!![];}var _0x13ae86=_0xec6acf[0x0],_0x59e1f1=_0x1ef714+_0x13ae86,_0x36ea40=_0x2bc6['goooGe'][_0x59e1f1];return!_0x36ea40?(_0x2bc690=_0x2bc6['oAEeGV'](_0x2bc690),_0x2bc6['goooGe'][_0x59e1f1]=_0x2bc690):_0x2bc690=_0x36ea40,_0x2bc690;}function _0x5b6226(_0x589fd3,_0x2c5ce0,_0x207710,_0x3fe7db){return _0x2bc6(_0x3fe7db-0x109,_0x2c5ce0);}export{TurnFailedError};
@@ -1 +1 @@
1
- (function(_0x51b4f9,_0x3eab68){const _0x3190e1={_0x76f28d:0x226,_0x2d99b6:0x1f1,_0x4ae747:0x22f,_0x415a05:0x257,_0x524981:0x1ec,_0x97bf5f:0x1ed,_0x166c1c:0x1fe,_0x2cfc99:0x271,_0x4de01b:0x32,_0x355504:0x6a,_0x487a3d:0x29f,_0x58da16:0x237,_0x2b17e8:0x25b,_0x1fc089:0x93,_0x789157:0x4e,_0x5b3fe8:0x82,_0x50ebc7:0x1db,_0x20c5cc:0x21c,_0xfcfb99:0x1cf,_0x5873bb:0x1f8},_0xf6d67b={_0x6018ed:0x2ef},_0x4a716d=_0x51b4f9();function _0x192c90(_0x5c70fd,_0x3c44a5,_0x36fa2c,_0x473314){return _0x2d0e(_0x473314- -0x91,_0x5c70fd);}function _0x1b859d(_0x22a4c6,_0x531b6f,_0x55b137,_0x8b4a07){return _0x2d0e(_0x55b137- -_0xf6d67b._0x6018ed,_0x22a4c6);}while(!![]){try{const _0x2add0e=parseInt(_0x1b859d(-0x232,-_0x3190e1._0x76f28d,-0x211,-_0x3190e1._0x2d99b6))/0x1*(-parseInt(_0x1b859d(-_0x3190e1._0x4ae747,-0x25f,-_0x3190e1._0x415a05,-0x268))/0x2)+-parseInt(_0x1b859d(-0x1c8,-_0x3190e1._0x524981,-_0x3190e1._0x97bf5f,-0x1e0))/0x3*(parseInt(_0x1b859d(-_0x3190e1._0x166c1c,-_0x3190e1._0x2cfc99,-0x21f,-0x269))/0x4)+parseInt(_0x192c90(0xbc,_0x3190e1._0x4de01b,0x72,_0x3190e1._0x355504))/0x5+parseInt(_0x1b859d(-_0x3190e1._0x487a3d,-_0x3190e1._0x58da16,-0x251,-_0x3190e1._0x2b17e8))/0x6+-parseInt(_0x192c90(0x68,0x4a,0x8f,0x5c))/0x7+-parseInt(_0x192c90(_0x3190e1._0x1fc089,0x5a,_0x3190e1._0x789157,_0x3190e1._0x5b3fe8))/0x8+-parseInt(_0x1b859d(-0x1b1,-_0x3190e1._0x50ebc7,-0x1d5,-_0x3190e1._0x20c5cc))/0x9*(-parseInt(_0x1b859d(-0x1db,-0x1fe,-_0x3190e1._0xfcfb99,-_0x3190e1._0x5873bb))/0xa);if(_0x2add0e===_0x3eab68)break;else _0x4a716d['push'](_0x4a716d['shift']());}catch(_0x5b75d0){_0x4a716d['push'](_0x4a716d['shift']());}}}(_0x20b1,0xd9b8f));function _0x139f3f(_0x17439f,_0x40b031,_0x40b66a,_0x3170ad){const _0x349526={_0x43a0ef:0x2c3};return _0x2d0e(_0x17439f-_0x349526._0x43a0ef,_0x40b66a);}import{createAssistantTextMessage,createReasoningMessage,createToolResultUserMessage,createToolUseMessage,getToolUseBlocks,normalizeMessage,normalizeSystem,responseToAssistantMessage,synthesizeMissingToolResults}from'./chunk-QDOE7NWO.js';import{TurnFailedError}from'./chunk-FFIZ6TKW.js';import{addAbortListener,isAbortError,throwIfAborted,toAbortError}from'./chunk-X7VAACWY.js';function isJsonObject(_0x17c0b8){const _0x1dc04f={_0x3dfdb0:0x75,_0xb3dcb5:0x64,_0x44118a:0xe5},_0x409d7c={_0x1c519a:0x34};function _0x469ab0(_0x34ff50,_0x2e4408,_0xbb8d47,_0x5bacb3){return _0x2d0e(_0x34ff50- -0x24f,_0x2e4408);}function _0x42f6cf(_0x4edf52,_0x58116b,_0x3f8d3c,_0x4b0dbd){return _0x2d0e(_0x3f8d3c- -_0x409d7c._0x1c519a,_0x4edf52);}return typeof _0x17c0b8===_0x42f6cf(_0x1dc04f._0x3dfdb0,0xbd,0x83,_0x1dc04f._0xb3dcb5)&&_0x17c0b8!==null&&!Array[_0x42f6cf(0xc4,0xaa,_0x1dc04f._0x44118a,0x96)](_0x17c0b8);}function isToolOutputEnvelope(_0x20de48){const _0x3cced2={_0xbc04c8:0x22c,_0x3d9c38:0x1fd,_0x3f2d03:0x1eb,_0x4aeb21:0x27,_0x1ae9f6:0x20,_0x11b4e2:0x2c,_0x21899e:0x30,_0x4fb043:0xa,_0x2a3208:0x7e},_0xc9b8aa={_0x58f056:0x2b4};function _0x4b189e(_0x337578,_0x2345d9,_0x38644e,_0x4c4688){return _0x2d0e(_0x2345d9- -0xe7,_0x337578);}if(typeof _0x20de48!==_0x312206(-_0x3cced2._0xbc04c8,-0x24a,-_0x3cced2._0x3d9c38,-_0x3cced2._0x3f2d03)||_0x20de48===null||Array['isArray'](_0x20de48))return![];if(typeof _0x20de48[_0x4b189e(-0x27,_0x3cced2._0x4aeb21,_0x3cced2._0x1ae9f6,-_0x3cced2._0x11b4e2)]!==_0x4b189e(_0x3cced2._0x21899e,0x3b,_0x3cced2._0x4fb043,_0x3cced2._0x2a3208))return![];const _0x564ed1=_0x20de48['structured'];function _0x312206(_0x5435b9,_0x36a7b3,_0x3468ff,_0x73c430){return _0x2d0e(_0x3468ff- -_0xc9b8aa._0x58f056,_0x73c430);}return _0x564ed1===void 0x0||isJsonObject(_0x564ed1);}function validateAgainstSchema(_0x1ff869,_0xedcc2,_0x100cc0){const _0x2461e7={_0x1d8139:0x76,_0x43439b:0x6e,_0x3d48f2:0xbe,_0x2d4d85:0x7,_0x4a8e3a:0x42,_0x239a44:0x27,_0x37a494:0x21,_0x5e3980:0x75,_0x32a097:0x2b3,_0x5f15a1:0x2d5,_0x414ecb:0x1f,_0x16886c:0x22,_0x528295:0x233,_0x3d2a22:0x291,_0x15db85:0x2d3,_0xcd3018:0x2da,_0x375a1e:0x294,_0x407985:0x282,_0x415658:0x2e8,_0x197808:0x279,_0x5c79d9:0x25a,_0x4bb90e:0x3d,_0x3c8499:0x22f,_0x1188cd:0x26e,_0x3c229c:0x53,_0xb2ef31:0x1e,_0x5edac0:0x9,_0x49dc20:0x3,_0x2eac73:0x25e,_0x31a794:0x264,_0x50a690:0x2a6,_0x4aa7e5:0xe,_0x9891f4:0x4d,_0x48617c:0x2b8,_0x4b6e06:0x29f,_0x41c3be:0x29f,_0x3b4aab:0x37,_0x1160c2:0x2b,_0x4cde81:0x77},_0x3b0be9={_0x2da70a:0x1f8,_0x154c53:0x21d,_0x2180f1:0x23b,_0x52e8aa:0x20b};function _0x125ea0(_0x419455,_0x24d310,_0x36bb0d,_0x26431a){return _0x2d0e(_0x36bb0d-0x1b7,_0x24d310);}function _0x5478ff(_0x42d7b0,_0x47a3a2,_0x44e9e3,_0x3a997f){return _0x2d0e(_0x47a3a2- -0x129,_0x3a997f);}switch(_0x100cc0[_0x5478ff(-0x54,-_0x2461e7._0x1d8139,-_0x2461e7._0x43439b,-_0x2461e7._0x3d48f2)]){case _0x5478ff(-0x11,-_0x2461e7._0x2d4d85,-0x3a,-_0x2461e7._0x4a8e3a):if(typeof _0xedcc2!=='string')throw new Error(_0x5478ff(-_0x2461e7._0x3d48f2,-0x86,-0xbb,-0x8a)+_0x1ff869+':\x20expected\x20string');return;case _0x5478ff(-_0x2461e7._0x239a44,-_0x2461e7._0x37a494,-_0x2461e7._0x5e3980,-0x7b):if(typeof _0xedcc2!==_0x125ea0(0x2cf,_0x2461e7._0x32a097,0x2bf,_0x2461e7._0x5f15a1))throw new Error('Invalid\x20tool\x20input\x20at\x20'+_0x1ff869+_0x5478ff(-0x27,-_0x2461e7._0x414ecb,0x13,-_0x2461e7._0x16886c));return;case _0x5478ff(-_0x2461e7._0x3d48f2,-0x8d,-0x8c,-0xe6):if(typeof _0xedcc2!=='boolean')throw new Error(_0x125ea0(_0x2461e7._0x528295,_0x2461e7._0x3d2a22,0x25a,0x20e)+_0x1ff869+_0x125ea0(_0x2461e7._0x15db85,_0x2461e7._0xcd3018,_0x2461e7._0x375a1e,0x246));return;case _0x125ea0(0x28f,0x1fd,0x243,0x26b):if(!Array[_0x125ea0(_0x2461e7._0x407985,_0x2461e7._0x415658,0x2d0,_0x2461e7._0x197808)](_0xedcc2))throw new Error(_0x125ea0(0x252,0x290,_0x2461e7._0x5c79d9,0x23a)+_0x1ff869+':\x20expected\x20array');_0xedcc2[_0x5478ff(-0x1f,-_0x2461e7._0x4bb90e,-0x1a,-0x45)]((_0x54b681,_0x3cded1)=>{const _0x14b318={_0x4c2de8:0x1ec,_0x521807:0x1d8};function _0x3fab1c(_0x34ec56,_0x5b5da7,_0xcbc3,_0x4cdf9a){return _0x5478ff(_0x34ec56-0xe2,_0xcbc3- -_0x14b318._0x4c2de8,_0xcbc3-_0x14b318._0x521807,_0x4cdf9a);}validateAgainstSchema(_0x1ff869+'['+_0x3cded1+']',_0x54b681,_0x100cc0[_0x3fab1c(-_0x3b0be9._0x2da70a,-_0x3b0be9._0x154c53,-_0x3b0be9._0x2180f1,-_0x3b0be9._0x52e8aa)]);});return;case _0x125ea0(0x25c,_0x2461e7._0x3c8499,_0x2461e7._0x1188cd,0x24c):if(!isJsonObject(_0xedcc2))throw new Error('Invalid\x20tool\x20input\x20at\x20'+_0x1ff869+_0x5478ff(-_0x2461e7._0x3c229c,-_0x2461e7._0xb2ef31,_0x2461e7._0x5edac0,-_0x2461e7._0x49dc20));for(const _0x43fa80 of _0x100cc0['required']??[]){if(!(_0x43fa80 in _0xedcc2))throw new Error(_0x125ea0(_0x2461e7._0x2eac73,_0x2461e7._0x31a794,_0x2461e7._0x5c79d9,_0x2461e7._0x50a690)+_0x1ff869+_0x5478ff(-0x5,-_0x2461e7._0x4aa7e5,-_0x2461e7._0x9891f4,0xf)+_0x43fa80+'\x22');}for(const [_0x43db4a,_0x7ab515]of Object[_0x125ea0(_0x2461e7._0x48617c,_0x2461e7._0x4b6e06,0x2a8,_0x2461e7._0x41c3be)](_0x100cc0[_0x5478ff(-_0x2461e7._0x3b4aab,-0x20,-_0x2461e7._0x1160c2,-_0x2461e7._0x4cde81)])){_0x43db4a in _0xedcc2&&validateAgainstSchema(_0x1ff869+'.'+_0x43db4a,_0xedcc2[_0x43db4a],_0x7ab515);}}}function normalizeToolOutputValue(_0x37e63f){const _0x171abc={_0x59c39e:0xd8,_0x1fe1c8:0x1ca,_0x43e687:0x1f2,_0x1b46b2:0x1bb,_0x46de4e:0x1d6,_0x538216:0x185,_0x5a8f1d:0x16b,_0x5f13c8:0x18e,_0x5a0cf9:0x21c,_0x37b7db:0x208,_0x435b0d:0x250,_0x413dca:0xe7,_0x235e84:0x139,_0x4aa657:0x167},_0x3784b5={_0x27cfbf:0x2a7};if(isToolOutputEnvelope(_0x37e63f))return{'output':_0x37e63f['output'],'structured':_0x37e63f['structured']??{'value':_0x37e63f[_0x2de1bb(-_0x171abc._0x59c39e,-0xca,-0x108,-0xf4)]},..._0x37e63f[_0x372227(-_0x171abc._0x1fe1c8,-0x192,-0x1dd,-0x1ef)]!==void 0x0?{'content':_0x37e63f[_0x372227(-_0x171abc._0x43e687,-0x1e6,-0x1dd,-0x212)]}:{}};if(typeof _0x37e63f===_0x372227(-_0x171abc._0x1b46b2,-_0x171abc._0x46de4e,-_0x171abc._0x538216,-0x174))return{'output':_0x37e63f,'structured':{'value':_0x37e63f}};function _0x2de1bb(_0x49ffbd,_0x2658b8,_0xa5e53a,_0x26d74d){return _0x2d0e(_0x2658b8- -0x1d8,_0xa5e53a);}function _0x372227(_0x5a0a85,_0x1043e5,_0x3ae228,_0x1b4364){return _0x2d0e(_0x3ae228- -_0x3784b5._0x27cfbf,_0x1b4364);}if(typeof _0x37e63f===_0x2de1bb(-0x167,-0x121,-0xef,-_0x171abc._0x5a8f1d)&&_0x37e63f!==null&&!Array[_0x372227(-0x171,-0x1a1,-_0x171abc._0x5f13c8,-0x1ba)](_0x37e63f))return{'output':JSON[_0x372227(-0x1c4,-_0x171abc._0x5a0cf9,-_0x171abc._0x37b7db,-_0x171abc._0x435b0d)](_0x37e63f,null,0x2),'structured':_0x37e63f};return{'output':JSON[_0x2de1bb(-_0x171abc._0x413dca,-_0x171abc._0x235e84,-_0x171abc._0x4aa657,-0x12f)](_0x37e63f,null,0x2),'structured':{'value':_0x37e63f}};}function createToolOutput(_0x3389b3,_0x44c78d={'value':_0x3389b3},_0x7c1eab){return{'output':_0x3389b3,'structured':_0x44c78d,..._0x7c1eab!==void 0x0?{'content':_0x7c1eab}:{}};}var ToolExecutionError=class extends Error{[_0xb702f5(0x4b6,0x47f,0x4a1,0x487)];constructor(_0x5e11c1,_0xc9563b={}){const _0x1bae18={_0x48872c:0x274,_0x42acd0:0x286,_0x5d274f:0x1ba,_0x521fa6:0x26a,_0x201776:0x22f,_0xd6270b:0x248},_0x43429d={_0x3eba5b:0x6bd,_0x3c03ad:0xb9,_0x2c2916:0xf},_0x32d7fc={_0xc8f6c:0x22,_0x1a805a:0x92};function _0x2b4564(_0x53d09e,_0x5ebc20,_0x4b1fa5,_0xfb1c14){return _0xb702f5(_0x5ebc20,_0x53d09e- -0x5f5,_0x4b1fa5-_0x32d7fc._0xc8f6c,_0xfb1c14-_0x32d7fc._0x1a805a);}function _0x3ee1cf(_0x5b8684,_0x1e4ba2,_0x22919f,_0x1ba8fa){return _0xb702f5(_0x1ba8fa,_0x1e4ba2- -_0x43429d._0x3eba5b,_0x22919f-_0x43429d._0x3c03ad,_0x1ba8fa-_0x43429d._0x2c2916);}super(_0x5e11c1),this[_0x3ee1cf(-0x1de,-0x230,-_0x1bae18._0x48872c,-_0x1bae18._0x42acd0)]=_0x2b4564(-_0x1bae18._0x5d274f,-0x1fe,-0x1a7,-0x1ed),this[_0x3ee1cf(-_0x1bae18._0x521fa6,-0x23e,-_0x1bae18._0x201776,-_0x1bae18._0xd6270b)]=_0xc9563b;}};function defineTool(_0x517a62){return _0x517a62;}var ToolRegistry=class{[_0x139f3f(0x369,0x365,0x38c,0x361)]=new Map();constructor(_0x570385=[]){for(const _0x551ab7 of _0x570385){this['register'](_0x551ab7);}}[_0x139f3f(0x3b9,0x39e,0x3b0,0x3b3)](_0x113e12){const _0x4b0fc0={_0x49d916:0xbe,_0x52cb28:0x89,_0x12f681:0x261,_0x4498dc:0x271},_0x5257aa={_0x5244dc:0x13c,_0x28e9f7:0x147},_0x318c0c={_0x1c2af6:0xa0};function _0x402aa5(_0x43a4d4,_0x4fab30,_0xebc1e0,_0x3b5a1b){return _0xb702f5(_0x3b5a1b,_0x4fab30- -0x4c3,_0xebc1e0-0x68,_0x3b5a1b-_0x318c0c._0x1c2af6);}function _0x5586d6(_0x149030,_0x879fc9,_0x3f3420,_0x46b352){return _0xb702f5(_0x149030,_0x46b352- -0x6fe,_0x3f3420-_0x5257aa._0x5244dc,_0x46b352-_0x5257aa._0x28e9f7);}this[_0x402aa5(-0xd2,-0xb4,-_0x4b0fc0._0x49d916,-_0x4b0fc0._0x52cb28)]['set'](_0x113e12[_0x5586d6(-_0x4b0fc0._0x12f681,-0x26e,-0x269,-_0x4b0fc0._0x4498dc)],_0x113e12);}[_0xb702f5(0x41b,0x415,0x450,0x3d1)](_0xe3d7f5){const _0x22752f={_0x37eb5b:0x47e,_0x203f64:0x484,_0xb7c1e8:0x497},_0x34c66c={_0x4a208a:0x4c6,_0x21f17b:0x1b9,_0x2ddea2:0x1e0},_0x1f3690={_0x26f2cd:0x10c};function _0x3979a4(_0x4a2531,_0x56b8f9,_0x3be61d,_0x542989){return _0x139f3f(_0x3be61d-0x115,_0x56b8f9-0xd,_0x56b8f9,_0x542989-_0x1f3690._0x26f2cd);}function _0x3490ee(_0x3d969e,_0x30d5c1,_0x5760d5,_0x55e0d7){return _0xb702f5(_0x3d969e,_0x30d5c1- -_0x34c66c._0x4a208a,_0x5760d5-_0x34c66c._0x21f17b,_0x55e0d7-_0x34c66c._0x2ddea2);}return this[_0x3979a4(0x496,0x430,_0x22752f._0x37eb5b,0x478)][_0x3979a4(0x4d8,0x473,_0x22752f._0x203f64,_0x22752f._0xb7c1e8)](_0xe3d7f5);}[_0x139f3f(0x35e,0x38d,0x333,0x306)](){const _0x4b9e08={_0x27cfca:0x2f0,_0x249f51:0x26e,_0xb6ae31:0x2a1},_0x5d026d={_0x1bf9e1:0x6b0,_0x1cfc4b:0xe5};function _0x216678(_0x183f0f,_0x2446b2,_0x1a784e,_0x59dada){return _0xb702f5(_0x2446b2,_0x59dada- -_0x5d026d._0x1bf9e1,_0x1a784e-0x1dd,_0x59dada-_0x5d026d._0x1cfc4b);}return[...this[_0x216678(-_0x4b9e08._0x27cfca,-_0x4b9e08._0x249f51,-0x2ef,-_0x4b9e08._0xb6ae31)]['values']()];}[_0x139f3f(0x3e2,0x3a2,0x427,0x392)](){const _0x12ee7b={_0x254cc4:0xb8,_0x1efc46:0x137,_0x216560:0x59,_0x4c6d0c:0x63,_0x43381d:0x5f},_0x15abbc={_0x2865f4:0x15e,_0x7d0730:0x4c4},_0xe781f8={_0x22bab0:0x11f,_0x23043f:0x19b,_0x4a49ac:0x24},_0x48c70c={_0x3582f4:0x435},_0x28408e={_0x1400eb:0x4fb,_0x4554ec:0x1b5};function _0x2c96ee(_0x28041e,_0x4a9da7,_0x2ab4ee,_0x56a499){return _0xb702f5(_0x4a9da7,_0x2ab4ee- -_0x28408e._0x1400eb,_0x2ab4ee-_0x28408e._0x4554ec,_0x56a499-0x6f);}function _0x3e0109(_0x50ceb7,_0x2ae08b,_0x4c6f1e,_0x56bb7f){return _0x139f3f(_0x4c6f1e- -_0x48c70c._0x3582f4,_0x2ae08b-0x61,_0x50ceb7,_0x56bb7f-0x34);}return this[_0x2c96ee(-_0x12ee7b._0x254cc4,-_0x12ee7b._0x1efc46,-0xf7,-0x11b)]()[_0x3e0109(-0x4f,-_0x12ee7b._0x216560,-_0x12ee7b._0x4c6d0c,-_0x12ee7b._0x43381d)](_0x4af502=>{function _0x8832a7(_0x41a6ff,_0x58ed63,_0xe4739b,_0x4155e2){return _0x2c96ee(_0x41a6ff-0x2,_0x41a6ff,_0x58ed63-0x53f,_0x4155e2-0x63);}function _0x35e3f0(_0x50b8ea,_0x5c6687,_0x16f4ab,_0x41318e){return _0x3e0109(_0x5c6687,_0x5c6687-_0xe781f8._0x22bab0,_0x50b8ea-_0xe781f8._0x23043f,_0x41318e-_0xe781f8._0x4a49ac);}return{'name':_0x4af502[_0x35e3f0(0x14d,_0x15abbc._0x2865f4,0x1a4,0x14f)],'description':_0x4af502['description'],'input_schema':_0x4af502[_0x8832a7(_0x15abbc._0x7d0730,0x4b3,0x46c,0x4f6)]};});}};function validateToolInput(_0x342396,_0x3cabcf){const _0x44396a={_0x54df13:0x1d3},_0xb619e0={_0xff381d:0x5cf,_0x4ef2e4:0x113,_0x8370c7:0x18f};validateAgainstSchema(_0x5110bf(-0x224,-_0x44396a._0x54df13,-0x1d7,-0x222),_0x342396,_0x3cabcf);function _0x5110bf(_0x5ab103,_0x2d5a04,_0x2909a8,_0x1cdc80){return _0x139f3f(_0x5ab103- -_0xb619e0._0xff381d,_0x2d5a04-_0xb619e0._0x4ef2e4,_0x1cdc80,_0x1cdc80-_0xb619e0._0x8370c7);}return _0x342396;}function deriveFinalToolOutput(_0x5805fb){const _0x3d0619={_0x1cff58:0x2e6,_0x368423:0x2e5,_0x110c06:0x2e2,_0x1d8206:0x337,_0x535b43:0x168,_0x5dad89:0x2c4,_0x3322a0:0x10b,_0xd4e488:0x16c,_0x15d697:0x2cd,_0x438258:0x256,_0x34e5a8:0x2bd,_0x364e1d:0x2bb,_0x6975b3:0xa0,_0x57c55e:0xe6},_0x9063d2={_0x86fc03:0x175,_0x3a0e65:0x7f},_0x439224={_0x59e137:0x271,_0x41d88c:0xb6,_0x333310:0x130};function _0x2b2f78(_0x42c599,_0x48b951,_0x504a24,_0x7beacd){return _0x139f3f(_0x7beacd- -_0x439224._0x59e137,_0x48b951-_0x439224._0x41d88c,_0x42c599,_0x7beacd-_0x439224._0x333310);}function _0x6ca13c(_0x18b68c,_0x3317c5,_0x518af7,_0x2bc05f){return _0xb702f5(_0x18b68c,_0x3317c5- -0x6f6,_0x518af7-_0x9063d2._0x86fc03,_0x2bc05f-_0x9063d2._0x3a0e65);}if(_0x5805fb[_0x6ca13c(-_0x3d0619._0x1cff58,-0x2f9,-0x2f1,-_0x3d0619._0x368423)]===0x0)return{'output':'','structured':{}};if(_0x5805fb[_0x6ca13c(-_0x3d0619._0x110c06,-0x2f9,-0x32a,-_0x3d0619._0x1d8206)]===0x1)return{'output':_0x5805fb[0x0]['output'],'structured':_0x5805fb[0x0][_0x2b2f78(0x135,0x141,0x197,_0x3d0619._0x535b43)],..._0x5805fb[0x0][_0x6ca13c(-_0x3d0619._0x5dad89,-0x2c3,-0x316,-0x2e2)]!==void 0x0?{'content':_0x5805fb[0x0][_0x2b2f78(0x113,_0x3d0619._0x3322a0,_0x3d0619._0xd4e488,0x11c)]}:{}};const _0x47fa82=_0x5805fb['filter'](_0x2bd1df=>_0x2bd1df['content']!==void 0x0);return{'output':_0x5805fb[_0x6ca13c(-0x241,-0x27e,-_0x3d0619._0x15d697,-_0x3d0619._0x438258)](_0xc2c4fd=>_0xc2c4fd['output'])['join'](''),'structured':{'chunks':_0x5805fb[_0x6ca13c(-_0x3d0619._0x34e5a8,-0x27e,-_0x3d0619._0x5dad89,-_0x3d0619._0x364e1d)](_0x1f8e63=>_0x1f8e63[_0x2b2f78(0x15a,0x11b,0x165,0x168)])},..._0x47fa82[_0x2b2f78(0x97,0xc9,_0x3d0619._0x6975b3,_0x3d0619._0x57c55e)]===0x1?{'content':_0x47fa82[0x0][_0x2b2f78(0x105,0x100,0x14c,0x11c)]}:{}};}function createToolMeta(){return{'transforms':[]};}function createErrorToolResult(_0x2c0105,_0x92d2d7,_0x2b3051,_0x4f7dae=[]){const _0x2fcf47={_0x5240a3:0x40a,_0x4c8c73:0x45c},_0x734399={_0x1563e0:0x72};function _0x3ed6ed(_0x33763d,_0x2f37a7,_0x8afd71,_0x4e6264){return _0x139f3f(_0x2f37a7-0x23,_0x2f37a7-0x5f,_0x8afd71,_0x4e6264-_0x734399._0x1563e0);}return{'callId':_0x2c0105['id'],'toolName':_0x2c0105[_0x3ed6ed(0x42f,_0x2fcf47._0x5240a3,_0x2fcf47._0x4c8c73,0x44c)],'status':'error','output':_0x92d2d7,'structured':_0x2b3051,'chunks':_0x4f7dae,'meta':createToolMeta()};}function createRejectedToolResult(_0x2a3229,_0x25e509){const _0x1dc613={_0x1b96d7:0x1c9,_0x58afd4:0x20b,_0x19bedd:0x227,_0x596c4c:0x292,_0x3bb2e3:0x263,_0xbc74e:0x2cd,_0x2b33e8:0x23d,_0x113fa4:0x154,_0x2c7ce4:0x160,_0x4c8d0f:0x1a7,_0x8f0190:0x23b,_0x39115e:0x22e,_0x828bb8:0x219,_0x38eb4b:0x28e},_0x5c1d84={_0x41822d:0x7b},_0x237406={_0x53e200:0x639,_0x48dba4:0x9d};function _0x4a0b39(_0x20a77f,_0x40bc5b,_0x454e1b,_0xadd934){return _0xb702f5(_0xadd934,_0x454e1b- -_0x237406._0x53e200,_0x454e1b-0x130,_0xadd934-_0x237406._0x48dba4);}function _0xc15468(_0x72d854,_0x307b0e,_0x4671c2,_0x3b9004){return _0x139f3f(_0x72d854- -0x155,_0x307b0e-_0x5c1d84._0x41822d,_0x3b9004,_0x3b9004-0x4f);}const _0x672503=_0x25e509?.[_0x4a0b39(-0x1c0,-0x24d,-0x20b,-_0x1dc613._0x1b96d7)]()['length']?_0x25e509:_0xc15468(0x251,_0x1dc613._0x58afd4,_0x1dc613._0x19bedd,0x1f9)+_0x2a3229[_0xc15468(_0x1dc613._0x596c4c,_0x1dc613._0x3bb2e3,_0x1dc613._0xbc74e,_0x1dc613._0x2b33e8)];return createErrorToolResult(_0x2a3229,_0x672503,{'error':_0x4a0b39(-_0x1dc613._0x113fa4,-_0x1dc613._0x2c7ce4,-_0x1dc613._0x4c8d0f,-0x1ef),..._0x25e509?.[_0x4a0b39(-_0x1dc613._0x8f0190,-0x234,-0x20b,-0x22b)]()[_0x4a0b39(-_0x1dc613._0x39115e,-_0x1dc613._0x828bb8,-0x23c,-_0x1dc613._0x38eb4b)]?{'reason':_0x25e509}:{}});}function createAbortedToolResult(_0x4d582e,_0xaa3d1b,_0x41808f=[]){const _0x4c02d7={_0x14d50c:0x269,_0x4ea385:0x1ce,_0x1ba85f:0x191},_0x45e3ee={_0x5a7273:0x114,_0x296449:0xc5},_0x3dbbc1={_0x2dc763:0x62a},_0x2c4afc=toAbortError(_0xaa3d1b);function _0x2cbcd0(_0x270b34,_0x432802,_0x4e54e3,_0x14a7a6){return _0x139f3f(_0x4e54e3- -_0x3dbbc1._0x2dc763,_0x432802-0x112,_0x270b34,_0x14a7a6-0x2a);}function _0x58d55f(_0x18587a,_0x204d6d,_0x43064a,_0x4a03e8){return _0xb702f5(_0x18587a,_0x204d6d- -0x250,_0x43064a-_0x45e3ee._0x5a7273,_0x4a03e8-_0x45e3ee._0x296449);}return createErrorToolResult(_0x4d582e,_0x2c4afc[_0x2cbcd0(-0x2e7,-_0x4c02d7._0x14d50c,-0x2b2,-0x2c2)],{'error':_0x2c4afc[_0x58d55f(0x19f,_0x4c02d7._0x4ea385,0x1b2,_0x4c02d7._0x1ba85f)],'aborted':!![]},_0x41808f);}function createSuccessToolResult(_0x463899,_0x225b0b,_0x236062){const _0x85f479={_0x3c4648:0x455,_0x151f12:0x43a,_0x2d116d:0x425,_0x479e1f:0x42c,_0xc4bdf:0x3e0,_0x1540a8:0x3f6},_0x5bd6a8={_0x23896c:0x3b},_0x4548d3={_0x25fab7:0x3ed,_0x5866bb:0x8e};function _0x21c594(_0x108a0b,_0x1d4570,_0x50f521,_0xcce397){return _0xb702f5(_0x1d4570,_0x50f521- -_0x4548d3._0x25fab7,_0x50f521-_0x4548d3._0x5866bb,_0xcce397-0x14d);}function _0xb2362d(_0xcdbbd,_0x3b6b36,_0x2fd76d,_0x1b666a){return _0x139f3f(_0x1b666a-0x53,_0x3b6b36-0x1ba,_0xcdbbd,_0x1b666a-_0x5bd6a8._0x23896c);}return{'callId':_0x463899['id'],'toolName':_0x463899[_0xb2362d(0x46c,0x48a,_0x85f479._0x3c4648,_0x85f479._0x151f12)],'status':'ok','output':_0x225b0b['output'],'structured':_0x225b0b[_0xb2362d(0x43b,_0x85f479._0x2d116d,0x477,_0x85f479._0x479e1f)],..._0x225b0b['content']!==void 0x0?{'content':_0x225b0b[_0xb2362d(_0x85f479._0xc4bdf,_0x85f479._0x1540a8,0x39d,0x3e0)]}:{},'chunks':_0x236062,'meta':createToolMeta()};}function _0x2d0e(_0x28d546,_0x53d7ca){_0x28d546=_0x28d546-0x75;const _0x20b18b=_0x20b1();let _0x2d0eb9=_0x20b18b[_0x28d546];if(_0x2d0e['UuVjko']===undefined){var _0x24da60=function(_0x5cc477){const _0x4ea244='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x17c0b8='',_0x20de48='';for(let _0x564ed1=0x0,_0x1ff869,_0xedcc2,_0x100cc0=0x0;_0xedcc2=_0x5cc477['charAt'](_0x100cc0++);~_0xedcc2&&(_0x1ff869=_0x564ed1%0x4?_0x1ff869*0x40+_0xedcc2:_0xedcc2,_0x564ed1++%0x4)?_0x17c0b8+=String['fromCharCode'](0xff&_0x1ff869>>(-0x2*_0x564ed1&0x6)):0x0){_0xedcc2=_0x4ea244['indexOf'](_0xedcc2);}for(let _0x54b681=0x0,_0x3cded1=_0x17c0b8['length'];_0x54b681<_0x3cded1;_0x54b681++){_0x20de48+='%'+('00'+_0x17c0b8['charCodeAt'](_0x54b681)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x20de48);};_0x2d0e['jnydrx']=_0x24da60,_0x2d0e['VTLTvu']={},_0x2d0e['UuVjko']=!![];}const _0x27d6ec=_0x20b18b[0x0],_0x231827=_0x28d546+_0x27d6ec,_0x2e975e=_0x2d0e['VTLTvu'][_0x231827];return!_0x2e975e?(_0x2d0eb9=_0x2d0e['jnydrx'](_0x2d0eb9),_0x2d0e['VTLTvu'][_0x231827]=_0x2d0eb9):_0x2d0eb9=_0x2e975e,_0x2d0eb9;}function createUnknownToolResult(_0x4e6321){const _0x3b75b5={_0x30a89b:0x17f,_0x567aa4:0x1ca,_0x1d4cff:0x1ea},_0x1a7d23={_0x286da1:0x20e};function _0x4c1519(_0x485401,_0xf5d467,_0x5b9e1b,_0x3907f1){return _0xb702f5(_0x3907f1,_0x5b9e1b- -0x6bc,_0x5b9e1b-0x129,_0x3907f1-0x134);}function _0x16608c(_0x161a90,_0x1bf16b,_0xe25a5a,_0x9d528a){return _0x139f3f(_0x9d528a- -_0x1a7d23._0x286da1,_0x1bf16b-0x141,_0x1bf16b,_0x9d528a-0x123);}return createErrorToolResult(_0x4e6321,_0x16608c(_0x3b75b5._0x30a89b,0x201,0x1ab,0x1b1)+_0x4e6321[_0x16608c(_0x3b75b5._0x567aa4,_0x3b75b5._0x1d4cff,0x1dd,0x1d9)],{'error':'unknown_tool'});}function isDispatchDecision(_0xe0d4c){const _0xe952b4={_0x2a046c:0x285,_0x9a3b87:0x258,_0x86c572:0x12b,_0x4cc0da:0x186,_0x9ab0ce:0x14f},_0x49f702={_0x3ad4f4:0x5c5},_0x5b3b5b={_0x5587cb:0x21e,_0x25606d:0x114,_0x9eacc5:0x1ee};function _0x11f239(_0x235fe6,_0x1498c7,_0x101c95,_0x1997e0){return _0x139f3f(_0x235fe6- -_0x5b3b5b._0x5587cb,_0x1498c7-_0x5b3b5b._0x25606d,_0x101c95,_0x1997e0-_0x5b3b5b._0x9eacc5);}function _0x2e2ad4(_0x2a59fa,_0x434f03,_0x14061a,_0x225637){return _0x139f3f(_0x14061a- -_0x49f702._0x3ad4f4,_0x434f03-0x145,_0x434f03,_0x225637-0x8c);}if(typeof _0xe0d4c!=='object'||_0xe0d4c===null)return![];return _0xe0d4c[_0x2e2ad4(-_0xe952b4._0x2a046c,-0x256,-_0xe952b4._0x9a3b87,-0x20d)]===_0x11f239(_0xe952b4._0x86c572,_0xe952b4._0x4cc0da,0xe5,0x11a)||_0xe0d4c[_0x11f239(_0xe952b4._0x9ab0ce,0x11b,0x128,0x198)]==='run';}function normalizeExecutionError(_0x357225){const _0x5f0923={_0x472575:0x232,_0x3ed090:0x210,_0x35a549:0x214,_0x4c4606:0x208,_0xcbdc7d:0x22c,_0x5468ee:0x231,_0x5ad85f:0x1b1},_0x4db5e5={_0x44e487:0x26b,_0x56f3ac:0x40},_0x147b18={_0x2db394:0x580};function _0x52bec5(_0x45c802,_0x14140f,_0x34a3d9,_0x338240){return _0x139f3f(_0x45c802- -_0x147b18._0x2db394,_0x14140f-0x37,_0x34a3d9,_0x338240-0x88);}if(_0x357225 instanceof ToolExecutionError)return{'errorMessage':_0x357225['message'],'structured':{'error':_0x357225['message'],..._0x357225[_0x1c9c6c(_0x5f0923._0x472575,_0x5f0923._0x3ed090,_0x5f0923._0x35a549,0x1c9)]}};if(_0x357225 instanceof Error)return{'errorMessage':_0x357225[_0x52bec5(-_0x5f0923._0x4c4606,-0x1d6,-_0x5f0923._0xcbdc7d,-_0x5f0923._0x5468ee)],'structured':{'error':_0x357225[_0x1c9c6c(_0x5f0923._0x5ad85f,0x164,0x1b3,0x17a)]}};const _0x4ffa9d=String(_0x357225);function _0x1c9c6c(_0x51bd7d,_0x47dfef,_0x4e5f89,_0x35ed68){return _0xb702f5(_0x51bd7d,_0x4e5f89- -_0x4db5e5._0x44e487,_0x4e5f89-_0x4db5e5._0x56f3ac,_0x35ed68-0x42);}return{'errorMessage':_0x4ffa9d,'structured':{'error':_0x4ffa9d}};}async function emitEvent(_0x5c2858,_0x3efbaf,_0x48b984){await _0x5c2858?.(_0x3efbaf,_0x48b984);}async function resolveDispatchDecision(_0x565193,_0x3ddc9e,_0x3ee46d){const _0x1f8cba={_0x1c46c1:0x134,_0x313f21:0x119,_0xe542fc:0x194,_0x504e17:0x199,_0xfedac9:0x1a7,_0x307cd9:0x19b,_0x5aa601:0x1bd,_0x5e6f4e:0x19f},_0x4041d7={_0x159dde:0xd8,_0x2ca301:0x105,_0x244bea:0xe7,_0x425a59:0xf0,_0x236579:0x97,_0x4325dd:0x10,_0x4f06e8:0xc,_0x1dcfd5:0x13,_0x3f80e5:0x51,_0x446770:0x33},_0x2e0ba6={_0x1f0dc8:0xf4,_0x2a1b70:0x14c,_0x226de7:0x11d,_0x29a8c7:0x149,_0x302f9b:0x143,_0x11d95c:0x43,_0x2771d:0x17,_0x37b8de:0x80,_0x5e4ccc:0x4f,_0x576f61:0x98},_0x32c3fd={_0x1b307b:0x1dc,_0xf82b50:0xa1,_0x1a3c77:0x1b7};if(!_0x565193)return{'action':_0x22ee5b(0x102,_0x1f8cba._0x1c46c1,_0x1f8cba._0x313f21,0x17e)};function _0x1870e4(_0x3832ec,_0x2c6385,_0xf45bc7,_0xc2eaf0){return _0x139f3f(_0xf45bc7- -_0x32c3fd._0x1b307b,_0x2c6385-_0x32c3fd._0xf82b50,_0x2c6385,_0xc2eaf0-_0x32c3fd._0x1a3c77);}const _0x46a990=Promise[_0x1870e4(0x192,_0x1f8cba._0xe542fc,0x16a,_0x1f8cba._0x504e17)]()[_0x1870e4(0x1d2,0x1d7,0x1fe,0x1b6)](()=>_0x565193(_0x3ddc9e,_0x3ee46d));if(!_0x3ee46d['signal']){const _0x3edb33=await _0x46a990;return isDispatchDecision(_0x3edb33)?_0x3edb33:{'action':_0x1870e4(0x13f,0x189,0x16b,0x148)};}function _0x22ee5b(_0x350253,_0x180d25,_0x105af5,_0x2b85af){return _0x139f3f(_0x180d25- -0x213,_0x180d25-0xa9,_0x105af5,_0x2b85af-0x84);}const _0x503e1d=new Promise((_0x151589,_0x51bd2f)=>{function _0x33d4f7(_0x3cdaa,_0x708d19,_0x50a752,_0x3f2f7b){return _0x22ee5b(_0x3cdaa-0x1c8,_0x708d19- -0x187,_0x50a752,_0x3f2f7b-0xd6);}function _0x4b3b10(_0x38f86d,_0x807445,_0x35839c,_0x5abb09){return _0x22ee5b(_0x38f86d-0x109,_0x807445- -0x277,_0x5abb09,_0x5abb09-0x1f3);}const _0x68bae7=()=>{const _0x10ffb9={_0x5615c2:0x7b};function _0x107186(_0xae2e59,_0x5d5755,_0x40529c,_0x5130f8){return _0x2d0e(_0x5130f8-_0x10ffb9._0x5615c2,_0x5d5755);}function _0x286354(_0x4ea351,_0x331d22,_0x117ed2,_0x2c1ebc){return _0x2d0e(_0x4ea351- -0x94,_0x2c1ebc);}_0x3ee46d['signal']?.[_0x107186(_0x2e0ba6._0x1f0dc8,0x155,_0x2e0ba6._0x2a1b70,0x144)](_0x107186(_0x2e0ba6._0x226de7,_0x2e0ba6._0x29a8c7,0xef,_0x2e0ba6._0x302f9b),_0x68bae7),_0x51bd2f(toAbortError(_0x3ee46d[_0x286354(0x14,-_0x2e0ba6._0x11d95c,-_0x2e0ba6._0x2771d,-0x36)]?.[_0x286354(0x5b,_0x2e0ba6._0x37b8de,_0x2e0ba6._0x5e4ccc,_0x2e0ba6._0x576f61)]));};if(_0x3ee46d[_0x4b3b10(-_0x4041d7._0x159dde,-0x11f,-_0x4041d7._0x2ca301,-_0x4041d7._0x244bea)]?.[_0x4b3b10(-0xbb,-0xdc,-_0x4041d7._0x425a59,-_0x4041d7._0x236579)]){_0x51bd2f(toAbortError(_0x3ee46d[_0x33d4f7(_0x4041d7._0x4325dd,-0x2f,-_0x4041d7._0x4f06e8,-_0x4041d7._0x1dcfd5)][_0x33d4f7(-0x12,0x18,_0x4041d7._0x3f80e5,_0x4041d7._0x446770)]));return;}_0x3ee46d['signal']?.['addEventListener']('abort',_0x68bae7,{'once':!![]});}),_0x37956a=await Promise[_0x1870e4(_0x1f8cba._0xfedac9,_0x1f8cba._0x307cd9,_0x1f8cba._0x5aa601,_0x1f8cba._0x5e6f4e)]([_0x46a990,_0x503e1d]);return isDispatchDecision(_0x37956a)?_0x37956a:{'action':_0x1870e4(0x162,0x144,0x16b,0x1bc)};}async function executeToolCall(_0xe4d36f,_0x573343,_0x18cec1,_0x482188,_0x438878){const _0x569b40={_0x12ca16:0x189,_0x39e8b6:0x1b8,_0x10a6c7:0x1a4,_0x5c79b2:0x222,_0x510d40:0x1f6,_0x2887db:0x235,_0x6d3c88:0x201,_0x39d6e3:0x1ff,_0x3448c7:0x28a,_0x55d9f5:0x229,_0x516587:0x28a,_0x5247d0:0x1b8,_0x28fbc6:0x243,_0x2da697:0x1db,_0x352c20:0x1b3,_0x4900a5:0x1d0,_0x5183da:0x259,_0x40e999:0x213,_0x4c0f8f:0x29c,_0x1f712a:0x26a,_0x29b82d:0x1d5,_0x5a6fce:0x25a,_0x552061:0x264,_0xa6e8a9:0x23d,_0x5cecad:0x22c,_0x397626:0x1c8,_0xfca7f1:0x25c,_0x3badb2:0x28d,_0x2c2d82:0x1f0,_0x3be824:0x1cb,_0x419088:0x223,_0x1adb15:0x223,_0x353fe1:0x224,_0xaa59c4:0x152,_0x302b66:0x1eb,_0xfa8611:0x1f8},_0x1bf19d={_0x176066:0x44b,_0x5d6a1d:0x443,_0x357512:0x469,_0x430d51:0x1ec},_0x343fdd={_0x4bf507:0x273},_0x21f301={_0x5ed870:0x1b3},_0x59a09a={_0x5e932b:0x8a,_0x297825:0x55},_0x4f174b={..._0x18cec1,'toolCallId':_0x573343['id']};throwIfAborted(_0x4f174b[_0xc84225(_0x569b40._0x12ca16,0x210,_0x569b40._0x39e8b6,0x16e)]);function _0x1d6596(_0x378c4c,_0x5837fb,_0x4e60c1,_0xc2ea5f){return _0xb702f5(_0x4e60c1,_0xc2ea5f- -0x1ee,_0x4e60c1-_0x59a09a._0x5e932b,_0xc2ea5f-_0x59a09a._0x297825);}let _0x5f4447;try{_0x5f4447=await resolveDispatchDecision(_0x482188,_0x573343,_0x4f174b);}catch(_0x58e61c){if(isAbortError(_0x58e61c)){const _0x1485c7=createAbortedToolResult(_0x573343,_0x58e61c);return await emitEvent(_0x438878,{'type':_0x1d6596(0x1fa,_0x569b40._0x10a6c7,0x21a,0x1f6),'toolCall':_0x573343,'result':_0x1485c7},_0x4f174b),_0x1485c7;}const {errorMessage:_0x3ffa18,structured:_0x376337}=normalizeExecutionError(_0x58e61c),_0x2fe805=createErrorToolResult(_0x573343,_0x3ffa18,_0x376337);return await emitEvent(_0x438878,{'type':_0x1d6596(_0x569b40._0x5c79b2,0x214,0x240,_0x569b40._0x510d40),'toolCall':_0x573343,'result':_0x2fe805},_0x4f174b),_0x2fe805;}throwIfAborted(_0x4f174b[_0xc84225(0x16d,0x17a,0x1b8,0x160)]);if(_0x5f4447[_0x1d6596(_0x569b40._0x2887db,0x1cf,0x200,0x225)]===_0x1d6596(0x20a,0x226,0x202,_0x569b40._0x6d3c88)){const _0x139363=createRejectedToolResult(_0x573343,_0x5f4447[_0xc84225(0x205,0x1c3,_0x569b40._0x39d6e3,0x221)]);return await emitEvent(_0x438878,{'type':_0xc84225(_0x569b40._0x3448c7,0x281,0x239,_0x569b40._0x55d9f5),'toolCall':_0x573343,'result':_0x139363},_0x4f174b),_0x139363;}function _0xc84225(_0x34238c,_0x536332,_0x2f72a0,_0x1c2cac){return _0x139f3f(_0x2f72a0- -_0x21f301._0x5ed870,_0x536332-0x1a6,_0x536332,_0x1c2cac-0x21);}const _0xf9823b=_0xe4d36f['get'](_0x573343[_0x1d6596(0x2bd,_0x569b40._0x516587,0x2b9,0x29f)]);if(!_0xf9823b){const _0x460ec8=createUnknownToolResult(_0x573343);return await emitEvent(_0x438878,{'type':'tool_completed','toolCall':_0x573343,'result':_0x460ec8},_0x4f174b),_0x460ec8;}throwIfAborted(_0x4f174b[_0xc84225(0x1ef,0x19e,_0x569b40._0x5247d0,0x199)]),await emitEvent(_0x438878,{'type':'tool_started','toolCall':_0x573343},_0x4f174b);try{throwIfAborted(_0x4f174b[_0x1d6596(0x26d,_0x569b40._0x28fbc6,0x230,0x223)]);const _0x52c26a=validateToolInput(_0x573343[_0xc84225(_0x569b40._0x2da697,_0x569b40._0x352c20,0x1f8,0x244)],_0xf9823b[_0xc84225(_0x569b40._0x4900a5,_0x569b40._0x5183da,0x216,_0x569b40._0x40e999)]),_0xc98840=await _0xf9823b[_0x1d6596(0x250,0x26a,0x2a8,_0x569b40._0x4c0f8f)](_0x52c26a,_0x4f174b),_0x37d69c=[],_0xf10377=addAbortListener(_0x4f174b[_0x1d6596(_0x569b40._0x1f712a,_0x569b40._0x29b82d,0x251,0x223)],()=>{const _0x527718={_0x4f405f:0x76,_0x2d8660:0x185,_0x1dc324:0x10};function _0x3e98eb(_0x540473,_0xe1590c,_0x5642ba,_0x141dcb){return _0x1d6596(_0x540473-_0x527718._0x4f405f,_0xe1590c-_0x527718._0x2d8660,_0x540473,_0x141dcb- -_0x527718._0x1dc324);}function _0x235d4b(_0x3f8428,_0x3bbd2f,_0x1e6f79,_0x4509e8){return _0xc84225(_0x3f8428-0xa4,_0x3bbd2f,_0x4509e8-_0x343fdd._0x4bf507,_0x4509e8-0x2);}void _0xc98840[_0x235d4b(0x48a,_0x1bf19d._0x176066,_0x1bf19d._0x5d6a1d,_0x1bf19d._0x357512)](void 0x0)[_0x3e98eb(0x1a0,0x1ed,0x1c3,_0x1bf19d._0x430d51)](()=>{});});try{throwIfAborted(_0x4f174b[_0x1d6596(0x224,_0x569b40._0x5a6fce,0x224,0x223)]);let _0x4dda74=await _0xc98840[_0x1d6596(0x2c9,0x290,0x261,0x27c)]();while(!_0x4dda74['done']){throwIfAborted(_0x4f174b[_0x1d6596(_0x569b40._0x552061,0x25a,_0x569b40._0xa6e8a9,0x223)]);const _0x20294a=normalizeToolOutputValue(_0x4dda74[_0x1d6596(0x1ef,_0x569b40._0x5cecad,_0x569b40._0x397626,_0x569b40._0x5c79b2)]);_0x37d69c['push'](_0x20294a),await emitEvent(_0x438878,{'type':_0x1d6596(_0x569b40._0xfca7f1,0x238,0x247,_0x569b40._0x3badb2),'toolCall':_0x573343,'chunk':_0x20294a},_0x4f174b),throwIfAborted(_0x4f174b[_0x1d6596(_0x569b40._0x2c2d82,_0x569b40._0x3be824,0x1f4,_0x569b40._0x419088)]),_0x4dda74=await _0xc98840['next']();}throwIfAborted(_0x4f174b[_0x1d6596(0x1db,0x1e4,0x203,_0x569b40._0x1adb15)]);const _0x563f90=_0x4dda74[_0x1d6596(0x231,0x258,_0x569b40._0x353fe1,0x222)]===void 0x0?deriveFinalToolOutput(_0x37d69c):normalizeToolOutputValue(_0x4dda74['value']),_0x217a70=createSuccessToolResult(_0x573343,_0x563f90,_0x37d69c);return await emitEvent(_0x438878,{'type':_0xc84225(0x140,_0x569b40._0xaa59c4,0x18b,_0x569b40._0x3be824),'toolCall':_0x573343,'result':_0x217a70},_0x4f174b),_0x217a70;}catch(_0x3b5604){if(isAbortError(_0x3b5604)){const _0x757cbf=createAbortedToolResult(_0x573343,_0x3b5604,_0x37d69c);return await emitEvent(_0x438878,{'type':'tool_completed','toolCall':_0x573343,'result':_0x757cbf},_0x4f174b),_0x757cbf;}const {errorMessage:_0x4163a0,structured:_0x3efdb8}=normalizeExecutionError(_0x3b5604),_0x5d81fe=createErrorToolResult(_0x573343,_0x4163a0,_0x3efdb8,_0x37d69c);return await emitEvent(_0x438878,{'type':_0x1d6596(_0x569b40._0x302b66,0x1d6,_0x569b40._0xfa8611,0x1f6),'toolCall':_0x573343,'result':_0x5d81fe},_0x4f174b),_0x5d81fe;}finally{_0xf10377();}}catch(_0x497207){if(isAbortError(_0x497207)){const _0x3c69de=createAbortedToolResult(_0x573343,_0x497207);return await emitEvent(_0x438878,{'type':_0x1d6596(0x245,0x1a0,0x23c,_0x569b40._0x510d40),'toolCall':_0x573343,'result':_0x3c69de},_0x4f174b),_0x3c69de;}const {errorMessage:_0x1766fc,structured:_0x4252b5}=normalizeExecutionError(_0x497207),_0x2d2fe6=createErrorToolResult(_0x573343,_0x1766fc,_0x4252b5);return await emitEvent(_0x438878,{'type':'tool_completed','toolCall':_0x573343,'result':_0x2d2fe6},_0x4f174b),_0x2d2fe6;}}function _0x20b1(){const _0x2ba9ce=['BM93','BgLZDa','yM9VBgvHBG','BwvZC2fNzxm','odu5nZKXnMrzvKrusq','C3rYAw5NAwz5','C2v0q2HHDe1VzgvS','B3v0Chv0vg9Rzw5Z','zgvWCW','sw52ywXPzcb0B29SigLUChv0igf0ia','C3LZDgvT','DxnHz2u','Dg9VBhncEu5HBwu','DMfSDwu','C2LNBMfS','zxHLy3v0zunHBgXZ','ywn0Aw9U','zMLSDgvY','z2v0','C3vTBwfYEuLUzgv4','y29UDgvUDf9KzwX0yq','CMvHC29UAw5Nx2nODw5R','CMvZzxrnzxnZywDLCW','Dg90ywXjBNb1DfrVA2vUCW','CMfUzg9T','DhLWzq','CMvHC29UAw5Nu3rHCNrLzef0','BwvZC2fNzq','C3LZDgvTuhjVBxb0','B2jQzwn0','B2jZzxj2zxi','yxnZAxn0yw50x2nODw5R','B25fDMvUDa','yxnZAxn0yw50twvZC2fNzuLK','zg9Uzq','B3bLBMfPx3jLyxnVBMLUz19KzwX0yq','yw50AhjVCgLJx3rOAw5RAw5Nx2rLBhrH','Bw9KzwXFCMvZCg9UC2u','Dg9tDhjPBMC','yMvMB3jLvg9VBev4zwn1DgLVBG','zxjYB3i','ywXS','C2vZC2LVBKLK','DhjPBq','Bwf4vg9Rzw5Z','ChjVDMLKzxi','ywjVCNq','CMvTB3zLrxzLBNrmAxn0zw5LCG','y29UDgvUDa','C2v0u3LZDgvTuhjVBxb0','yMvMB3jLvg9VBfjLC3vSDefWCgvUza','Aw5WDxruB2TLBNm','zgvSzxrL','C2v0vg9VBhm','mtC2otzIvffQCwO','qwDLBNqGCMvXDwLYzxmGysbJAgf0tw9KzwW','vg9VBev4zwn1DgLVBKvYCM9Y','zgvSDge','Dg9VBf91C2vFzgvSDge','DhjHBNnMB3jTzxi','CMfJzq','Dg90ywXpDxrWDxruB2TLBNm','Bwv0CMLJCW','B3v0Chv0sw5KzxG','AxrLBxm','yMvMB3jLqxnZAxn0yw50qxbWzw5K','y29UDgvUDeLUzgv4','oIbLEhbLy3rLzcbIB29SzwfU','mte3D2rytMjM','B25uB29Sq2fSBa','x3n5C3rLBvbYB21WDa','y2HHDe1VzgvS','C2vZC2LVBKrPCG','vg9VBcbLEgvJDxrPB24GCMvQzwn0zwqGzM9Yia','DgHPBMTPBMC','A2LUza','CMv0DxjU','Dgv4Da','Aw5WDxq','CNvUvhjHBNnMB3jTzxjZ','zw5HyMXLza','ywjVCNrLza','zM9YrwfJAa','odqYntK0ouDYENPyuW','C3rHDhvZ','CMvHC29U','Aw5WDxrezwX0yq','zw50CMLLCW','Aw5KzxG','Dg9VBfj1BNrPBwu','DhvYBLn0yxj0zwrbDa','C2v0u2vZC2LVBKLK','CMvNAxn0zxi','oNjLyxnVBMLUzW','Bw9KzwXdywXSq291BNq','C3rHz2u','Dg9VBf91C2vFBwvZC2fNzq','mJu4mtu4nujyvLLuEa','vw5RBM93BIb0B29SoIa','DhvYBL9JB21WBgv0zq','CMvNAxn0CNK','C3rYzwfT','C2v0vg9WAwm','BMv4Da','mta3nePTCgfeqW','C2XPy2u','C2vZC2LVBI0','CMvHC29UAw5Nx21LC3nHz2u','Aw5WDxrty2HLBwe','B3jKzxi','BNvTyMvY','ChjVCgvYDgLLCW','oIbLEhbLy3rLzcbUDw1Izxi','oIbLEhbLy3rLzcbVyMPLy3q','C29YDa','CMvHC29UAw5Nvg9Rzw5Z','B3v0Chv0','BwfW','y29TCgXLDgvK','AxrLBuLK','Dg9VBf9VDxrWDxrFy2H1BMS','nZeXmtGWofnxvfzOAa','y29TCgXLDgu','ywz0zxjuB29SuMvZDwX0','C3rYDwn0DxjLza','DgHLBG','C29Tzq','AxnbCNjHEq','mtyZnZq4n1rvBfzyrW','oIbTAxnZAw5NihjLCxvPCMvKigzPzwXKici','CMvHC29UAw5NtwvZC2fNzuLK','Dg90ywXszwfZB25PBMDuB2TLBNm','C3rYzwfTAw5N','BgLZDfrVB2Xty2HLBwfZ','mtKWEurtwMPH','zxHLy3v0zq','C3rYAw5N','CNvUt2jZzxj2zxjZ','BMfTzq','Bw9KzwW','C3rHDgu','CMvXDwvZDa','C2vUza','Dg9VBf9YzwPLy3rLza','ChvZAa','zgvMyxvSDe1LC3nHz2u','B3bLBMfPx3jLyxnVBMLUz19ZDw1Tyxj5x2rLBhrH','ChjVDMLKzxjFCMv0CNK','tw9KzwWGC3rYzwfTigvUzgvKihDPDgHVDxqGysbMAw5HBcbYzxnWB25Zzq','yxnRvxnLCG','Dg9VBf9JB21WBgv0zwq','Bwv0yq','Dg9VBf9JywXS','DhvYBKLUzgv4','z2v0vg9VBhm','B3v0Chv0rM9YBwf0','y2f0y2G','yxnZAxn0yw50x21LC3nHz2u','CMvZB2X2zq','CNvU','CMvXDwvZDenVDw50','CMvQzwn0','Dg9VBfjLC3vSDhm','DxnLCG','Dg9VBhm','CMvHC29UAw5Nq29TCgXLDgvKqxq','ywz0zxjuDxjUq29TCgXLDgu','yxjYyxK','CMvZCg9UC2u','yMvMB3jLtw9KzwXszxf1zxn0','DhvYBKLK','DhvYBKnVBxbSzxrLzef0','BgfZDfjLC3bVBNnL','Bw9KzwXFCMvXDwvZDa','y29UDgv4DfDPBMrVD0XPBwL0','BgvUz3rO','Dg9VBf9Yzxn1Bhq','z2v0q29UDgv4DfDPBMrVD0XPBwL0','yMvMB3jLrMLUywXpDxrWDxq','mtqZmJrbt2PqEwC','zNvUy3rPB24'];_0x20b1=function(){return _0x2ba9ce;};return _0x20b1();}function createInternalToolRuntime(_0x1004e8=[],_0x599734={}){const _0x506ec9={_0x2a2870:0x5b,_0x31c0aa:0x55,_0x460e7b:0x13,_0x520dec:0xa4,_0x55a3c4:0x9f},_0x52c8eb={_0x2614bd:0xb0},_0x153700={_0x175849:0x59},_0x5d0c6c={_0x5244b8:0xfd,_0x3ccd58:0x100};let _0x5a5f2b=new ToolRegistry(_0x1004e8);return{'listToolSchemas'(){const _0x384a51={_0x40f835:0x9};function _0x29d615(_0x20e67d,_0x33f534,_0x192b52,_0x29b574){return _0x2d0e(_0x29b574-_0x384a51._0x40f835,_0x20e67d);}return _0x5a5f2b[_0x29d615(_0x5d0c6c._0x5244b8,_0x5d0c6c._0x3ccd58,0x114,0x128)]();},'setTools'(_0x3ff38a){_0x5a5f2b=new ToolRegistry(_0x3ff38a);},async 'executeCalls'(_0x591f4f,_0x20e1e7){const _0x49e528={_0x1e274b:0x2e6};function _0x529fa5(_0x247a14,_0x59f70a,_0x15d739,_0x21a1c1){return _0x2d0e(_0x247a14- -_0x153700._0x175849,_0x59f70a);}function _0x41157b(_0x4c6203,_0x390a54,_0x194122,_0x25d920){return _0x2d0e(_0x194122- -_0x52c8eb._0x2614bd,_0x4c6203);}return await Promise[_0x41157b(_0x506ec9._0x2a2870,_0x506ec9._0x31c0aa,_0x506ec9._0x460e7b,-0x19)](_0x591f4f[_0x529fa5(0xb6,0xb9,_0x506ec9._0x520dec,_0x506ec9._0x55a3c4)](async _0x2d785b=>{function _0x3ccb8d(_0x1c4758,_0x35b394,_0x439a81,_0x4da7be){return _0x41157b(_0x439a81,_0x35b394-0x107,_0x4da7be- -_0x49e528._0x1e274b,_0x4da7be-0xba);}return await executeToolCall(_0x5a5f2b,_0x2d785b,_0x20e1e7,_0x599734[_0x3ccb8d(-0x29f,-0x270,-0x26d,-0x2b7)],_0x599734['onEvent']);}));},async 'execute'(_0x70c20b,_0x133380){const [_0x517e3a]=await this['executeCalls']([_0x70c20b],_0x133380);return _0x517e3a;}};}function getOrderedObserverExtensions(_0x2f4190,_0x5498fd){const _0x468a27={_0x5ebf80:0x175,_0x1ae429:0x11b,_0x578b84:0x14e},_0x34cbb0={_0x1a136f:0x11a,_0x29ce61:0xf1,_0x366a9a:0xdd,_0x22c226:0x145,_0x5294a8:0x115,_0xbfe91f:0x1e4,_0x34f8b5:0x1c3,_0x37c47c:0x1dd},_0x41f103={_0x43e64d:0x29f,_0xe7e323:0x16},_0xe20928={_0x2580a0:0x1c9};function _0x5ae76c(_0x3853e9,_0x4db91d,_0x3f182c,_0x27b651){return _0xb702f5(_0x27b651,_0x3f182c- -_0xe20928._0x2580a0,_0x3f182c-0x85,_0x27b651-0x13a);}function _0x26d045(_0x45148f,_0x30a830,_0x4df0b3,_0xb27710){return _0xb702f5(_0x4df0b3,_0x30a830- -_0x41f103._0x43e64d,_0x4df0b3-_0x41f103._0xe7e323,_0xb27710-0x27);}return _0x2f4190[_0x26d045(0x173,_0x468a27._0x5ebf80,_0x468a27._0x1ae429,_0x468a27._0x578b84)](_0x1089d2=>{const _0x4b864b={_0x280e84:0x9a,_0x679bac:0x1bc};function _0x1f18b3(_0x335027,_0x45c967,_0xb8ddf5,_0x2edf3a){return _0x26d045(_0x335027-0x179,_0x335027- -_0x4b864b._0x280e84,_0xb8ddf5,_0x2edf3a-_0x4b864b._0x679bac);}function _0x145f09(_0xd3cbb0,_0x62d2de,_0x770230,_0x4373cc){return _0x26d045(_0xd3cbb0-0x99,_0x4373cc-0x5b,_0x62d2de,_0x4373cc-0x186);}return _0x1089d2[_0x1f18b3(_0x34cbb0._0x1a136f,0x16e,0x12b,_0x34cbb0._0x29ce61)]!==![]&&_0x1089d2[_0x1f18b3(0x129,0xdd,_0x34cbb0._0x366a9a,_0x34cbb0._0x22c226)]===_0x5498fd&&_0x1089d2[_0x1f18b3(_0x34cbb0._0x5294a8,_0x34cbb0._0x1a136f,0xe1,0x131)]===_0x145f09(_0x34cbb0._0xbfe91f,_0x34cbb0._0x34f8b5,0x22e,_0x34cbb0._0x37c47c);})['sort']((_0xd17312,_0x10c599)=>_0xd17312[_0x26d045(0x1e8,0x1d1,0x20c,0x205)]-_0x10c599[_0x26d045(0x227,0x1d1,0x17f,0x197)]);}function getOrderedTransformerExtensions(_0x46e98f,_0x17b4e4){const _0x1b9187={_0x1bd9de:0x299},_0x41c1ee={_0x52c03c:0x115,_0x4f46bb:0x11a,_0x30b9fc:0x427,_0x4d386b:0x455},_0x226494={_0x2736d7:0x63,_0x5a259e:0x186},_0x430345={_0x29e217:0x336,_0x4818af:0x29,_0x4bf125:0xb5},_0x5c709a={_0x1f82ca:0x197};function _0xaef715(_0x43862d,_0x20df6b,_0x2453c3,_0x20efe9){return _0x139f3f(_0x2453c3- -0x147,_0x20df6b-_0x5c709a._0x1f82ca,_0x20efe9,_0x20efe9-0x163);}function _0x4178c0(_0x2071ed,_0x1f2474,_0x5f0ce8,_0xa1a702){return _0xb702f5(_0x5f0ce8,_0x1f2474- -_0x430345._0x29e217,_0x5f0ce8-_0x430345._0x4818af,_0xa1a702-_0x430345._0x4bf125);}return _0x46e98f[_0xaef715(0x257,0x1d3,0x227,0x1f0)](_0x6efd77=>{const _0x5dffd4={_0x774057:0x1b4,_0xf503e1:0x360};function _0x3a7990(_0x3045ea,_0x593702,_0x50f1ae,_0x171f1c){return _0xaef715(_0x3045ea-_0x226494._0x2736d7,_0x593702-_0x226494._0x5a259e,_0x593702-0x1d6,_0x50f1ae);}function _0x45308c(_0x36ea79,_0x27d5df,_0x24908b,_0x4b65d7){return _0xaef715(_0x36ea79-_0x5dffd4._0x774057,_0x27d5df-0x1cc,_0x24908b- -_0x5dffd4._0xf503e1,_0x27d5df);}return _0x6efd77['enabled']!==![]&&_0x6efd77['stage']===_0x17b4e4&&_0x6efd77[_0x45308c(-_0x41c1ee._0x52c03c,-_0x41c1ee._0x4f46bb,-0xff,-0xd3)]===_0x3a7990(0x44a,_0x41c1ee._0x30b9fc,_0x41c1ee._0x4d386b,0x3e8);})[_0xaef715(0x26f,_0x1b9187._0x1bd9de,0x288,0x26d)]((_0x18383f,_0x2e5d9d)=>_0x18383f[_0x4178c0(0x10f,0x13a,0x13f,0x142)]-_0x2e5d9d[_0x4178c0(0x14f,0x13a,0x125,0x144)]);}function createExtensionRegistry(){const _0x5c6d49={_0x4c6217:0x30,_0x35843d:0x54},_0x26b3bf={_0x15211d:0x256,_0xe6e9b5:0x252},_0x17394a=[];return{'register'(_0x27278){_0x17394a['push'](_0x27278);},async 'runTransformers'(_0x4dfd98,_0x183f63,_0x1ea663){const _0x4f0d50={_0xe589bc:0x21b};function _0x31cdf9(_0xef7a7c,_0x4e985b,_0x3d087e,_0x5164ee){return _0x2d0e(_0xef7a7c-_0x4f0d50._0xe589bc,_0x4e985b);}let _0x2b981f=_0x183f63;for(const _0x179ed2 of getOrderedTransformerExtensions(_0x17394a,_0x4dfd98)){_0x2b981f=await _0x179ed2[_0x31cdf9(0x29f,0x267,_0x26b3bf._0x15211d,_0x26b3bf._0xe6e9b5)](_0x2b981f,_0x1ea663);}return _0x2b981f;},async 'runObservers'(_0x23f6cc,_0x4d716d,_0x572c12){function _0x37090b(_0xac60c0,_0x343189,_0x184186,_0x41ac37){return _0x2d0e(_0x343189- -0x30,_0xac60c0);}for(const _0xbe59b0 of getOrderedObserverExtensions(_0x17394a,_0x23f6cc)){await _0xbe59b0[_0x37090b(_0x5c6d49._0x4c6217,_0x5c6d49._0x35843d,0x9d,0x9a)](_0x4d716d,_0x572c12);}}};}function _0xb702f5(_0x37351e,_0x4b093a,_0x1a2b85,_0x17a1d2){const _0x297bd4={_0x462875:0x369};return _0x2d0e(_0x4b093a-_0x297bd4._0x462875,_0x37351e);}function createEmptySnapshot(){return{'totalTokens':0x0,'totalInputTokens':0x0,'totalOutputTokens':0x0,'totalReasoningTokens':0x0,'requestCount':0x0,'modelCallCount':0x0,'toolCallCount':0x0,'totalModelTimeMs':0x0,'currentTokens':0x0,'currentInputTokens':0x0,'currentOutputTokens':0x0,'currentReasoningTokens':0x0,'currentModelTimeMs':0x0};}function createAgentMetrics(_0x58cb4b={}){const _0x3614d5={_0x39c18f:0x50,_0x22f822:0x8,_0x433b84:0xa6,_0xabd601:0x60,_0x23806c:0xc4,_0x446395:0x7a,_0x3202a4:0xc1,_0x4c91a4:0x144,_0x24f4c1:0x107,_0x58a84f:0x5e,_0x3bce1d:0x66,_0x28432d:0xd6,_0x320e94:0xb6,_0x3da2ae:0x3d,_0x165625:0x6d,_0x2cf49c:0x85,_0x1bf832:0x25,_0x3d048d:0x49,_0xefb36b:0x26,_0x4b24f6:0x6d,_0x260721:0x42,_0x41296b:0x2d,_0x2e77dd:0x27,_0x12b726:0x76,_0x4098cb:0x9a,_0x159554:0x1c,_0x3b9085:0xae,_0x5dcba7:0x70,_0x44086c:0xa,_0xb52de1:0x52,_0x29b41b:0x1d,_0x10e3b3:0x84,_0x5288de:0x2c,_0x331771:0xe,_0x357d6f:0x39,_0x17d01e:0xfa,_0x554c2a:0x124,_0x199e9c:0xd8,_0x4ee42f:0xc5,_0x35b9e2:0x73,_0xa56689:0x50,_0x1f4c6b:0x45,_0x315229:0xde,_0x5c5ebe:0x7e,_0x318e3d:0xab},_0x557146={_0x2d2f72:0x103};let _0x4843a2=createEmptySnapshot();const _0x66f180=new Set();let _0x217074;const _0x1ade44=()=>{const _0x3a1675={..._0x4843a2};for(const _0x2272e0 of _0x66f180)_0x2272e0(_0x3a1675);};return{'getSnapshot'(){return{..._0x4843a2};},'recordEvent'(_0x9a04){if(_0x9a04[_0x2e2c28(-_0x3614d5._0x39c18f,_0x3614d5._0x22f822,-0x34,-0xa3)]===_0x2e2c28(-0x71,-0x41,-0x19,-_0x3614d5._0x433b84)){_0x217074=Date[_0x48a7b5(_0x3614d5._0xabd601,_0x3614d5._0x23806c,0x2a,_0x3614d5._0x446395)]();const _0x279593=_0x58cb4b[_0x2e2c28(-0x6d,-_0x3614d5._0x3202a4,-0x5b,-0x62)]?.(_0x9a04[_0x48a7b5(0xc5,0x13b,_0x3614d5._0x4c91a4,_0x3614d5._0x24f4c1)]);_0x279593!==void 0x0&&(_0x4843a2={..._0x4843a2,'contextWindowLimit':_0x279593},_0x1ade44());return;}if(_0x9a04[_0x2e2c28(-_0x3614d5._0x39c18f,-_0x3614d5._0x58a84f,-_0x3614d5._0x3bce1d,-0x16)]===_0x48a7b5(0x90,_0x3614d5._0x28432d,_0x3614d5._0x320e94,0x9f)){const _0x1c895a=_0x9a04[_0x48a7b5(0x1b,0x32,_0x3614d5._0x3da2ae,_0x3614d5._0x165625)][_0x48a7b5(0xa3,0x95,0xbf,_0x3614d5._0x2cf49c)][_0x2e2c28(-0x36,-0x2f,-_0x3614d5._0x1bf832,-_0x3614d5._0x3d048d)],_0x10d85f=_0x9a04[_0x48a7b5(0x6b,_0x3614d5._0xefb36b,0x56,_0x3614d5._0x4b24f6)][_0x2e2c28(-0x5e,-0xb7,-0x61,-_0x3614d5._0x260721)][_0x48a7b5(0x2b,_0x3614d5._0x41296b,_0x3614d5._0x2e77dd,0x81)],_0x55d2ca=_0x9a04[_0x2e2c28(-_0x3614d5._0x12b726,-_0x3614d5._0x4098cb,-_0x3614d5._0x159554,-0x57)][_0x2e2c28(-0x5e,-_0x3614d5._0x3b9085,-0x84,-_0x3614d5._0x5dcba7)][_0x2e2c28(_0x3614d5._0x44086c,-0x1e,0x1,0x3a)]??0x0,_0x34f414=_0x1c895a+_0x10d85f,_0x157f1a=_0x217074===void 0x0?0x0:Date['now']()-_0x217074;_0x217074=void 0x0,_0x4843a2={..._0x4843a2,'totalTokens':_0x4843a2['totalTokens']+_0x34f414,'totalInputTokens':_0x4843a2[_0x2e2c28(-_0x3614d5._0xb52de1,-_0x3614d5._0x29b41b,-0x3d,-_0x3614d5._0x10e3b3)]+_0x1c895a,'totalOutputTokens':_0x4843a2[_0x2e2c28(-_0x3614d5._0x5288de,-0x57,-_0x3614d5._0x331771,-0x13)]+_0x10d85f,'totalReasoningTokens':_0x4843a2[_0x2e2c28(0x1a,0x1d,0x4,-_0x3614d5._0x357d6f)]+_0x55d2ca,'modelCallCount':_0x4843a2[_0x48a7b5(0xf6,_0x3614d5._0x17d01e,_0x3614d5._0x554c2a,_0x3614d5._0x199e9c)]+0x1,'totalModelTimeMs':_0x4843a2['totalModelTimeMs']+_0x157f1a,'currentTokens':_0x34f414,'currentInputTokens':_0x1c895a,'currentOutputTokens':_0x10d85f,'currentReasoningTokens':_0x55d2ca,'currentModelTimeMs':_0x157f1a,..._0x4843a2[_0x48a7b5(0x5f,_0x3614d5._0x4ee42f,_0x3614d5._0x23806c,_0x3614d5._0x35b9e2)]&&_0x34f414>0x0?{'contextWindowUsage':_0x34f414/_0x4843a2['contextWindowLimit']}:{}},_0x1ade44();return;}function _0x2e2c28(_0x1f4406,_0x216418,_0x52e013,_0x379c66){return _0x2d0e(_0x1f4406- -_0x557146._0x2d2f72,_0x216418);}function _0x48a7b5(_0x29c461,_0x474ee7,_0x28b2ca,_0x27b444){return _0x2d0e(_0x27b444- -0x20,_0x29c461);}if(_0x9a04[_0x2e2c28(-_0x3614d5._0xa56689,-0x44,-0x8b,-0x81)]==='tool_call'){_0x4843a2={..._0x4843a2,'toolCallCount':_0x4843a2['toolCallCount']+0x1},_0x1ade44();return;}_0x9a04[_0x2e2c28(-_0x3614d5._0x39c18f,-0x34,0x2,-_0x3614d5._0x1f4c6b)]===_0x48a7b5(0x11c,_0x3614d5._0x315229,0x134,0xdd)&&(_0x4843a2={..._0x4843a2,'requestCount':_0x4843a2[_0x2e2c28(-_0x3614d5._0x5c5ebe,-0xa7,-_0x3614d5._0x318e3d,-0x77)]+0x1},_0x1ade44());},'reset'(){_0x4843a2=createEmptySnapshot(),_0x217074=void 0x0,_0x1ade44();},'subscribe'(_0x281d14){const _0xbcce90={_0x6c8db3:0x224,_0x15b187:0x1f0,_0x182ade:0x20c};return _0x66f180['add'](_0x281d14),()=>{function _0x475735(_0x579651,_0x38d134,_0x54eddb,_0x3c047d){return _0x2d0e(_0x54eddb- -0x2be,_0x3c047d);}_0x66f180[_0x475735(-_0xbcce90._0x6c8db3,-0x1d6,-_0xbcce90._0x15b187,-_0xbcce90._0x182ade)](_0x281d14);};}};}function makeExtensionContext(_0x1daba8){return{'state':_0x1daba8};}async function runStage(_0x5ceaf7,_0x139fcf,_0x14f6a4,_0x4fa88f){const _0x107afd={_0x43bda7:0x331,_0xc76b56:0x37a,_0x5086ed:0x354,_0x485451:0x321},_0x4bbf39={_0x18863f:0x1c0},_0x219f7f={_0x5f247a:0x7b};function _0x323c0f(_0xee3478,_0x298251,_0x2ab15f,_0x437a9b){return _0x139f3f(_0xee3478- -_0x219f7f._0x5f247a,_0x298251-0x1e1,_0x437a9b,_0x437a9b-0x12e);}const _0x1fa2cf=await _0x5ceaf7[_0x323c0f(_0x107afd._0x43bda7,_0x107afd._0xc76b56,0x2e5,_0x107afd._0x5086ed)](_0x139fcf,_0x14f6a4,_0x4fa88f);await _0x5ceaf7[_0x323c0f(0x36b,0x378,_0x107afd._0x485451,0x367)](_0x139fcf,_0x1fa2cf,_0x4fa88f);function _0x4d3387(_0xb0722d,_0x39c8fb,_0x231316,_0x1e5016){return _0x139f3f(_0x231316- -0x2cb,_0x39c8fb-_0x4bbf39._0x18863f,_0x39c8fb,_0x1e5016-0x19a);}return _0x1fa2cf;}async function emitEvent2(_0x2d671b,_0x3d7462,_0x941d2b){await _0x2d671b?.(_0x3d7462,_0x941d2b);}function replaceToolUseBlocks(_0x24eb0d,_0x4c096f){const _0xbb920b={_0xe56377:0x43d,_0x1234e5:0x403,_0x27234f:0x23,_0x30fa5f:0x1d},_0xdb6be0={_0x55a3ed:0x47},_0x2ac310={_0x3dc328:0x3b5,_0x285293:0xb9,_0x136dfa:0x1f1},_0x56aba3={_0x162104:0x6b,_0x314be9:0x1f2};let _0x3b8bfa=0x0;function _0x5edb30(_0x38e08c,_0x4f969d,_0x528851,_0x3a86b9){return _0xb702f5(_0x4f969d,_0x528851- -0x30,_0x528851-_0x56aba3._0x162104,_0x3a86b9-_0x56aba3._0x314be9);}function _0xadbfa5(_0x3e88a2,_0x80bebc,_0x208865,_0x58897d){return _0x139f3f(_0x58897d- -_0x2ac310._0x3dc328,_0x80bebc-_0x2ac310._0x285293,_0x3e88a2,_0x58897d-_0x2ac310._0x136dfa);}return{..._0x24eb0d,'content':_0x24eb0d[_0x5edb30(0x3f0,_0xbb920b._0xe56377,_0xbb920b._0x1234e5,0x418)][_0xadbfa5(-0x24,-0x1c,_0xbb920b._0x27234f,_0xbb920b._0x30fa5f)](_0x57d859=>{const _0x3c64ad={_0x4fda8d:0x8,_0x4c55fc:0x1b1};function _0x1d317e(_0x5de470,_0x32f35a,_0x2f9d68,_0x49bb16){return _0x5edb30(_0x5de470-_0x3c64ad._0x4fda8d,_0x32f35a,_0x5de470- -0x436,_0x49bb16-_0x3c64ad._0x4c55fc);}if(_0x57d859[_0x1d317e(-0x4a,-0x2e,-0x4e,-_0xdb6be0._0x55a3ed)]!=='tool_use')return _0x57d859;const _0x308c5f=_0x4c096f[_0x3b8bfa];return _0x3b8bfa+=0x1,structuredClone(_0x308c5f);})};}function createAssistantMessageId(_0x2c701d,_0x2e391b){return _0x2c701d+':assistant:'+_0x2e391b;}function createReasoningMessageId(_0x5f0a34){const _0x4c10a6={_0x26e357:0x304};function _0x4ba559(_0x54d2e1,_0x330b81,_0xc830a4,_0x1ab320){return _0x139f3f(_0xc830a4- -0xb6,_0x330b81-0xf,_0x1ab320,_0x1ab320-0x113);}return _0x5f0a34+_0x4ba559(0x345,0x2dc,_0x4c10a6._0x26e357,0x301);}function withMessageId(_0x429f16,_0x36e867){if(_0x429f16['id']===_0x36e867)return _0x429f16;return{..._0x429f16,'id':_0x36e867};}function createAssistantChunkEvent(_0x41c670,_0x2a8be5){const _0x3be830={_0x3d5f2a:0x10f,_0x3c0863:0xd1,_0x2b0c62:0xd4,_0x4f7737:0xcc,_0x4af3fa:0xc1,_0x42fe7c:0x139,_0x54bb8d:0xa9,_0x428670:0xb8,_0x1174dc:0x105},_0x1bdd00={_0xa182f2:0x4e},_0x18d1ed={_0xbf3ad6:0xd9};function _0x49aba4(_0xcb4e4,_0x274d0e,_0x37e3ae,_0x14dd85){return _0x139f3f(_0xcb4e4- -0x2d3,_0x274d0e-0xd8,_0x37e3ae,_0x14dd85-_0x18d1ed._0xbf3ad6);}if(_0x41c670[_0x37850e(_0x3be830._0x3d5f2a,0xda,0x114,_0x3be830._0x3c0863)]!==_0x37850e(_0x3be830._0x2b0c62,0xa7,0xfb,_0x3be830._0x4f7737))return void 0x0;function _0x37850e(_0x168a40,_0x179e9e,_0x279a41,_0x496c17){return _0x139f3f(_0x496c17- -0x2a5,_0x179e9e-_0x1bdd00._0xa182f2,_0x279a41,_0x496c17-0xd1);}if(_0x41c670[_0x37850e(_0x3be830._0x4af3fa,_0x3be830._0x42fe7c,0xea,0x105)]===void 0x0)return void 0x0;return{'type':_0x49aba4(0xa9,0x73,_0x3be830._0x54bb8d,0xf1),'index':_0x41c670['index']??0x0,'messageId':_0x2a8be5,'chunk':{'type':_0x37850e(0x123,0x8d,0xea,0xcc),'index':_0x41c670['index']??0x0,'text':_0x41c670[_0x37850e(_0x3be830._0x428670,0xb0,0xd8,_0x3be830._0x1174dc)]}};}function createToolUseChunkEvent(_0x59bdb3,_0x5616de){const _0x4cc0b8={_0xbab437:0x40,_0x55c473:0x51,_0x37f998:0x0,_0x3d11b4:0x49,_0x1ca2c2:0x6e,_0x26bd30:0x14,_0x4f6b0d:0x98,_0x2fc47f:0x55,_0x3a7617:0x66,_0x836977:0x50,_0x25db3e:0x76,_0x127c9c:0x80,_0x27ffe0:0x8e,_0x12ddcb:0xba},_0x2916b1={_0x4c222f:0x3cb,_0x23e066:0x11};if(_0x59bdb3['type']!==_0x2d3195(0x22,-0x10,0x0,0x8))return void 0x0;function _0x2d3195(_0x1bb056,_0x4c0e94,_0x41b6ed,_0x5eb80a){return _0x139f3f(_0x41b6ed- -0x397,_0x4c0e94-0x3d,_0x4c0e94,_0x5eb80a-0xca);}function _0x56a191(_0x2ff3bd,_0x12da3b,_0x3e81f1,_0x51a421){return _0xb702f5(_0x2ff3bd,_0x12da3b- -_0x2916b1._0x4c222f,_0x3e81f1-0x192,_0x51a421-_0x2916b1._0x23e066);}return{'type':'tool_use_chunk','index':_0x59bdb3[_0x56a191(_0x4cc0b8._0xbab437,0x90,0xce,0xb1)]??0x0,'messageId':_0x5616de,'chunk':{'type':_0x2d3195(_0x4cc0b8._0x55c473,-0x57,_0x4cc0b8._0x37f998,_0x4cc0b8._0x3d11b4),'id':_0x59bdb3['id']??'','index':_0x59bdb3[_0x56a191(0xa7,0x90,0x5d,_0x4cc0b8._0x1ca2c2)]??0x0,..._0x59bdb3[_0x2d3195(_0x4cc0b8._0x26bd30,_0x4cc0b8._0x4f6b0d,0x50,0x6c)]!==void 0x0?{'name':_0x59bdb3[_0x2d3195(_0x4cc0b8._0x2fc47f,_0x4cc0b8._0x3a7617,_0x4cc0b8._0x836977,_0x4cc0b8._0x25db3e)]}:{},..._0x59bdb3['inputDelta']!==void 0x0?{'inputDelta':_0x59bdb3[_0x56a191(_0x4cc0b8._0x127c9c,_0x4cc0b8._0x27ffe0,0xa6,_0x4cc0b8._0x12ddcb)]}:{}}};}function createReasoningChunkEvent(_0x271d59,_0x3a5519){const _0x2177e4={_0x5e8bf8:0x1b8,_0x57f459:0x167,_0x38c7ea:0x159,_0x87362c:0x173,_0x4b5d7b:0x10c,_0x2fc688:0x2fe,_0x1f63e0:0x308,_0x370366:0x2be,_0x2e991b:0x1a0,_0xe2890f:0x15c,_0x4ba628:0x12f,_0x36d16b:0x16c,_0xb0a47e:0x169,_0x1bd0a8:0x32b,_0x14e653:0x33f,_0x2f4de4:0x306,_0x36aa83:0x32c,_0x23b37b:0x2f2,_0x38c3cd:0x30d,_0x35cad1:0x2f3,_0x346a81:0x2f2,_0x64a01:0x336,_0x537af3:0x2b8,_0x4b893b:0x147,_0xbcb2d0:0x17a,_0xa90f2a:0x28d,_0x40366b:0x274,_0x118ad1:0x1b8,_0x1b7403:0x19d,_0x39f358:0x34d,_0x16a660:0x326,_0x3503d9:0x15b,_0x2005b3:0x189,_0x11a538:0x197},_0x44c3d0={_0x3f6d2b:0xad};function _0x510d1d(_0x487baa,_0x350d55,_0x1a5af3,_0x12e963){return _0x139f3f(_0x1a5af3- -_0x44c3d0._0x3f6d2b,_0x350d55-0x1bf,_0x487baa,_0x12e963-0x1e1);}function _0x4f09c0(_0x9ff3f1,_0x2b817b,_0x47d3e3,_0x5cbcfe){return _0xb702f5(_0x9ff3f1,_0x47d3e3- -0x583,_0x47d3e3-0x113,_0x5cbcfe-0x18a);}switch(_0x271d59[_0x4f09c0(-0x14e,-_0x2177e4._0x5e8bf8,-_0x2177e4._0x57f459,-_0x2177e4._0x38c7ea)]){case _0x4f09c0(-_0x2177e4._0x87362c,-0x147,-0x15c,-_0x2177e4._0x4b5d7b):return{'type':'reasoning_chunk','index':_0x271d59[_0x510d1d(_0x2177e4._0x2fc688,0x347,_0x2177e4._0x1f63e0,_0x2177e4._0x370366)],'messageId':_0x3a5519,'chunk':{'type':_0x4f09c0(-_0x2177e4._0x2e991b,-0x1b5,-_0x2177e4._0xe2890f,-0x14e),'index':_0x271d59['index']??0x0,'thinking':_0x271d59[_0x4f09c0(-_0x2177e4._0x4ba628,-_0x2177e4._0x36d16b,-0x136,-_0x2177e4._0xb0a47e)]??''},'text':_0x271d59[_0x510d1d(_0x2177e4._0x1bd0a8,_0x2177e4._0x14e653,0x2fa,_0x2177e4._0x2f4de4)]??''};case _0x510d1d(0x294,0x329,0x2d3,0x288):return{'type':'reasoning_chunk','index':_0x271d59[_0x510d1d(_0x2177e4._0x36aa83,0x303,_0x2177e4._0x23b37b,_0x2177e4._0x38c3cd)],'messageId':_0x3a5519,'chunk':{'type':'openai_reasoning_delta','contentIndex':_0x271d59[_0x510d1d(0x2d6,_0x2177e4._0x35cad1,_0x2177e4._0x346a81,_0x2177e4._0x64a01)]??0x0,'delta':_0x271d59[_0x510d1d(_0x2177e4._0x537af3,_0x2177e4._0x2fc688,0x2e9,0x2a1)]??'','itemId':_0x271d59['itemId']??'','outputIndex':_0x271d59['outputIndex']??0x0},'text':_0x271d59[_0x4f09c0(-0x168,-0x15e,-_0x2177e4._0x4b893b,-_0x2177e4._0xbcb2d0)]??''};case _0x510d1d(0x2e0,0x283,_0x2177e4._0xa90f2a,0x2b4):return{'type':'reasoning_chunk','index':_0x271d59[_0x510d1d(0x2b9,_0x2177e4._0x40366b,0x2c3,0x309)],'messageId':_0x3a5519,'chunk':{'type':_0x4f09c0(-0x19d,-_0x2177e4._0x118ad1,-0x1a3,-_0x2177e4._0x1b7403),'delta':_0x271d59[_0x4f09c0(-0x10b,-0x12d,-0x147,-0xf6)]??'','itemId':_0x271d59[_0x510d1d(_0x2177e4._0x39f358,0x361,0x327,_0x2177e4._0x16a660)]??'','outputIndex':_0x271d59[_0x4f09c0(-_0x2177e4._0x3503d9,-_0x2177e4._0x2005b3,-0x141,-_0x2177e4._0x11a538)]??0x0,'summaryIndex':_0x271d59[_0x510d1d(0x2d7,0x2fa,0x2c3,0x307)]??0x0},'text':_0x271d59['delta']??''};default:return void 0x0;}}function isAbortedToolResult(_0x16e101){const _0x3b7557={_0x3adca1:0x379,_0x1a0965:0x286,_0xf9a501:0x23b,_0x5170a6:0x24c,_0x3eb206:0x1ae,_0x33348a:0x1f8,_0x4833bf:0x1ef,_0x1cc02e:0x3a1},_0x843f3e={_0x2de848:0xab},_0x4d1b93={_0x3f7b89:0x13b};function _0x4a4352(_0x29eef7,_0x2aaab6,_0x30396f,_0x2d3a5d){return _0xb702f5(_0x2aaab6,_0x30396f- -0x677,_0x30396f-_0x4d1b93._0x3f7b89,_0x2d3a5d-0x3a);}function _0x9ac96(_0x3ed9c9,_0x14087f,_0x36ba2b,_0x829a0b){return _0xb702f5(_0x829a0b,_0x14087f- -_0x843f3e._0x2de848,_0x36ba2b-0x1b9,_0x829a0b-0x150);}return _0x16e101[_0x9ac96(0x356,0x3ac,0x377,_0x3b7557._0x3adca1)]===_0x4a4352(-_0x3b7557._0x1a0965,-_0x3b7557._0xf9a501,-_0x3b7557._0x5170a6,-0x26e)&&_0x16e101[_0x4a4352(-0x1b2,-_0x3b7557._0x3eb206,-_0x3b7557._0x33348a,-_0x3b7557._0x4833bf)][_0x9ac96(_0x3b7557._0x1cc02e,0x3a9,0x3f1,0x359)]===!![];}async function executeModelRequest(_0x16cdd9,_0x1ed3f7,_0x15cc1b,_0x3e096d,_0x82d79c){const _0x5903f9={_0x5e8626:0x3e0,_0x2cd314:0x3ce,_0x36d6c8:0x7f,_0x571766:0x61,_0x3f54f1:0x94,_0x5830e9:0x3f8,_0x1e40a8:0x42f,_0x144ea9:0x418,_0x45b6eb:0x414,_0xa80e36:0xd,_0x1e3f4b:0x30,_0x1defb3:0x1b,_0x3085d1:0x6f,_0x467cdb:0x48,_0x5bf7ce:0x3a0,_0x35ac1a:0x39,_0x1c40b7:0x2a,_0x3402b3:0x4c,_0x20095e:0x4,_0x231bb2:0x35a,_0x4c777d:0x377,_0x36ae92:0x366,_0x42a1f6:0x3d9,_0x28852b:0x3c8,_0x3702a7:0x63,_0x4cc795:0x2a,_0x28b8f9:0x1a,_0x3052c9:0x1c,_0x2e378f:0x397,_0x276e6c:0x384,_0x4cf36f:0x3c8,_0x41c0fb:0x5,_0x959802:0x8,_0x400675:0x429,_0x32ba7c:0x431,_0x162b01:0x3c8,_0x94e1a7:0x3cd,_0x3b96ec:0x3fc,_0x201264:0x438,_0x1be46e:0x49,_0xacad2b:0x13,_0x5e1dc6:0x14,_0x1e6547:0x3a7,_0x580de5:0x354,_0x191d8d:0x3e1,_0xe7f834:0x1e,_0x58199e:0x2d,_0x26ff4c:0x1,_0x572d22:0x3a,_0x35c065:0x3b,_0x4b7e0f:0x350,_0x2d4423:0x37d,_0x25c69c:0x3ee,_0x45a6d6:0x3f6,_0x3b7b82:0x3c9,_0x574854:0x3ed,_0x1de08b:0x348,_0x23196c:0x391,_0x277302:0x3cb,_0xd63c53:0x3bf,_0x476444:0x39f,_0x3ed9bd:0x39c,_0xa1ba4d:0x360,_0x3b9e65:0x2c,_0x41f135:0x3a,_0x2900dc:0x29,_0x44ce0f:0x3cf,_0x5b820d:0x390,_0x167bcc:0x3ce,_0x13a0d9:0x37c},_0xb331c0={_0x451cdc:0x18},_0x1fb693={_0x133022:0x54,_0x2e542c:0x15d};function _0x4bafba(_0x2a4ab9,_0x220b04,_0x4d5921,_0x24df67){return _0xb702f5(_0x220b04,_0x4d5921- -_0x1fb693._0x133022,_0x4d5921-_0x1fb693._0x2e542c,_0x24df67-0x1e3);}throwIfAborted(_0x1ed3f7[_0x4bafba(0x38b,_0x5903f9._0x5e8626,0x3bd,_0x5903f9._0x2cd314)]);if(!_0x1ed3f7['streaming']||!_0x15cc1b['chatModel'][_0x56786a(0xcc,0x93,0x8c,_0x5903f9._0x36d6c8)])return await _0x15cc1b['chatModel'][_0x56786a(0xce,0x7d,_0x5903f9._0x571766,_0x5903f9._0x3f54f1)](_0x16cdd9,{'signal':_0x1ed3f7['signal']});let _0x2bdaeb;for await(const _0x30bf1d of _0x15cc1b[_0x4bafba(0x436,_0x5903f9._0x5830e9,0x3f6,_0x5903f9._0x1e40a8)][_0x4bafba(_0x5903f9._0x144ea9,0x43a,_0x5903f9._0x45b6eb,0x3c2)](_0x16cdd9,{'signal':_0x1ed3f7[_0x56786a(0x45,-_0x5903f9._0xa80e36,_0x5903f9._0x1e3f4b,0x28)]})){throwIfAborted(_0x1ed3f7[_0x56786a(_0x5903f9._0x1defb3,-0x2b,0x26,0x28)]);if(_0x30bf1d[_0x56786a(0x24,_0x5903f9._0x3085d1,0x1c,0x33)]===_0x56786a(0x71,-0x4,_0x5903f9._0x467cdb,0x3c)){_0x82d79c[_0x4bafba(0x360,_0x5903f9._0x5bf7ce,0x391,0x3d6)][_0x56786a(-0x1c,_0x5903f9._0x35ac1a,0x3e,0x34)]!==void 0x0&&_0x82d79c[_0x56786a(_0x5903f9._0x1c40b7,0x14,_0x5903f9._0x3402b3,-_0x5903f9._0x20095e)][_0x4bafba(0x35d,0x3ce,0x39f,0x34d)]===void 0x0&&(_0x82d79c[_0x4bafba(_0x5903f9._0x231bb2,_0x5903f9._0x4c777d,0x391,_0x5903f9._0x36ae92)][_0x4bafba(_0x5903f9._0x42a1f6,0x3c4,0x39f,_0x5903f9._0x28852b)]=Date[_0x56786a(_0x5903f9._0x3702a7,-0x1b,_0x5903f9._0x4cc795,_0x5903f9._0x28b8f9)]());_0x2bdaeb=_0x30bf1d[_0x56786a(-_0x5903f9._0x3052c9,-0x4b,0x58,0xd)];continue;}if(_0x30bf1d[_0x4bafba(_0x5903f9._0x2e378f,_0x5903f9._0x276e6c,_0x5903f9._0x4cf36f,0x3f6)]===_0x56786a(0x47,0x26,-_0x5903f9._0x41c0fb,-_0x5903f9._0x959802)){await emitEvent2(_0x15cc1b['onEvent'],_0x30bf1d,_0x3e096d);continue;}const _0x5bbf0e=createReasoningChunkEvent(_0x30bf1d,_0x82d79c[_0x4bafba(_0x5903f9._0x400675,0x40c,_0x5903f9._0x32ba7c,0x462)]);if(_0x5bbf0e&&_0x5bbf0e[_0x4bafba(0x3fa,0x3cc,_0x5903f9._0x162b01,0x36f)]===_0x4bafba(0x3f0,0x418,0x3c4,0x370)&&_0x5bbf0e[_0x4bafba(0x3f5,_0x5903f9._0x94e1a7,_0x5903f9._0x3b96ec,_0x5903f9._0x201264)][_0x56786a(-0x1a,_0x5903f9._0x1be46e,_0x5903f9._0xacad2b,_0x5903f9._0x5e1dc6)]>0x0){_0x82d79c[_0x4bafba(_0x5903f9._0x1e6547,_0x5903f9._0x580de5,0x391,0x39b)]['reasoningStartedAt']===void 0x0&&(_0x82d79c[_0x4bafba(0x3b1,0x3a1,0x391,_0x5903f9._0x191d8d)]['reasoningStartedAt']=Date[_0x56786a(_0x5903f9._0xe7f834,-0xb,0x40,0x1a)]());await emitEvent2(_0x15cc1b[_0x56786a(_0x5903f9._0x58199e,0x8f,-_0x5903f9._0x26ff4c,_0x5903f9._0x572d22)],_0x5bbf0e,_0x3e096d);continue;}const _0x3f1f9f=createAssistantChunkEvent(_0x30bf1d,_0x82d79c[_0x56786a(_0x5903f9._0xacad2b,0x5,0x4f,_0x5903f9._0x35c065)]);if(_0x3f1f9f){_0x82d79c[_0x4bafba(0x3b9,_0x5903f9._0x4b7e0f,0x391,_0x5903f9._0x2d4423)][_0x4bafba(_0x5903f9._0x25c69c,_0x5903f9._0x45a6d6,_0x5903f9._0x3b7b82,_0x5903f9._0x574854)]!==void 0x0&&_0x82d79c[_0x4bafba(0x3bb,_0x5903f9._0x1de08b,_0x5903f9._0x23196c,0x366)][_0x4bafba(_0x5903f9._0x277302,_0x5903f9._0xd63c53,_0x5903f9._0x476444,_0x5903f9._0x3ed9bd)]===void 0x0&&(_0x82d79c['meta'][_0x4bafba(_0x5903f9._0xa1ba4d,0x39b,0x39f,0x35e)]=Date[_0x4bafba(0x399,0x365,0x3af,0x3eb)]());await emitEvent2(_0x15cc1b[_0x56786a(0x38,0x7e,_0x5903f9._0x3b9e65,_0x5903f9._0x41f135)],_0x3f1f9f,_0x3e096d);continue;}const _0x24ef62=createToolUseChunkEvent(_0x30bf1d,_0x82d79c[_0x56786a(0x44,_0x5903f9._0x2900dc,0x6f,0x3b)]);_0x24ef62&&await emitEvent2(_0x15cc1b[_0x4bafba(0x428,0x3a8,_0x5903f9._0x44ce0f,0x3f7)],_0x24ef62,_0x3e096d);}function _0x56786a(_0x352db1,_0xd22c26,_0x4d7587,_0x587c2d){return _0xb702f5(_0x4d7587,_0x587c2d- -0x3e9,_0x4d7587-_0xb331c0._0x451cdc,_0x587c2d-0xc9);}if(!_0x2bdaeb)throw new Error(_0x4bafba(_0x5903f9._0x5b820d,_0x5903f9._0x167bcc,0x38e,_0x5903f9._0x13a0d9));return _0x2bdaeb;}function makeTurnGuards(_0xc96985,_0x10c69b,_0x149037,_0x54948e,_0x41efc3){return{async 'stage'(_0x483514,_0x1195c3){return throwIfAborted(_0xc96985),await runStage(_0x10c69b,_0x483514,_0x1195c3,_0x54948e);},async 'emit'(_0x344c9d){throwIfAborted(_0xc96985),await emitEvent2(_0x149037,_0x344c9d,_0x41efc3);},async 'stageUnchecked'(_0x4abc44,_0xd1d180){return await runStage(_0x10c69b,_0x4abc44,_0xd1d180,_0x54948e);},async 'emitUnchecked'(_0x5f4e75){await emitEvent2(_0x149037,_0x5f4e75,_0x41efc3);}};}async function runTurn(_0x5ad63a,_0x18fdc9){const _0x127b53={_0x5c6e4e:0x2b,_0x2e0161:0x23,_0x2fcd99:0x75,_0x52ebbf:0x51,_0x559b22:0x67,_0x1d2445:0x9,_0x3e8866:0x15,_0x36494a:0x8e,_0x343124:0x55,_0x148a94:0x30,_0x55012e:0xcd,_0x2d4c19:0x76,_0x3822c6:0xa6,_0x3d935e:0xb1,_0x44d245:0xee,_0x3eafa0:0xe,_0x10382f:0x20,_0x5de278:0x76,_0xb9e115:0x29,_0x108704:0x7,_0x26615e:0x7f,_0x134f0b:0xaf,_0x2a179b:0xc6,_0x5ad3ef:0x2c,_0x5b92ea:0xbd,_0x196551:0x4,_0x3313e9:0x39,_0x24730d:0x99,_0x5c48c4:0x46,_0x32cfc7:0x61,_0x4e3402:0x7c,_0x377f86:0xa4,_0x4d9d09:0xfa,_0x46be04:0x95,_0x278f49:0xae,_0x4bdc44:0xa,_0xed6a44:0x38,_0x2d95ec:0xa7,_0x5ec0d1:0xb9,_0x31dd6f:0x78,_0x390f4c:0x25,_0x128a4f:0x48,_0x3b3b23:0x66,_0x4c7a08:0x1,_0x22fda0:0x42,_0x30ac3b:0x7f,_0x4083d1:0x11,_0x411477:0x43,_0x12e8b3:0x4e,_0x35e392:0x4c,_0x104e4b:0x31,_0x15e575:0x1c,_0xb84c15:0x1a,_0x42253e:0x8f,_0x494dcc:0x42,_0x17e198:0x37,_0x2b8580:0xc3,_0x4e3ee4:0x47,_0x1e3396:0xbf,_0xcc45ed:0x34,_0x611284:0xae,_0x1ae6e1:0x53,_0x41936a:0xe3,_0x446c6a:0x6,_0x425361:0x21,_0x2d5c7e:0xc,_0x3be683:0x61,_0x2462d0:0x89,_0x1df4d1:0x13,_0x119152:0x14,_0x3448f4:0x4c,_0x131863:0x4b,_0x363ae2:0x5f,_0x5264df:0x1d,_0x3de18c:0x6d,_0x3d3423:0x25,_0x15ad5a:0x40,_0x5d0239:0x44,_0xb103bf:0x7d,_0x4bb337:0x56,_0x33c2a6:0x6c,_0x1b10bd:0xd6,_0x14e79b:0x7a,_0x34066e:0xc4,_0x4c7340:0x28,_0xe33998:0xcc,_0x2babe9:0x7e,_0x47c4f1:0x7c,_0x558626:0x77,_0x578658:0x3b,_0x180701:0x6a,_0x2b7268:0x5c,_0x5b161a:0x4e,_0x341328:0x5d,_0x513253:0x45,_0x5bf7b3:0x33,_0x534f62:0x60,_0x273bf1:0x4,_0x5e8960:0x74,_0x3834f8:0x80,_0x14769f:0xc7,_0x1cab71:0xc0,_0x1febc7:0xa1,_0x2cb629:0x3f,_0x2430b8:0xe5,_0x235b5e:0x11,_0xd6501d:0x6c},_0x4f67b5={_0x1da000:0x10a},_0x4f33aa={_0x60ab1e:0x4a5,_0x48e183:0x479},_0x8179b4={_0x460d08:0x30f,_0x25b7f4:0x1ae},_0xe1d2e1=_0x5ad63a[_0x1c898d(0x27,0x3,-0x2f,_0x127b53._0x5c6e4e)]??new AbortController()['signal'];function _0x84a501(_0x52ba7f,_0x3f07b8,_0x1a738d,_0x4b8e09){return _0x139f3f(_0x52ba7f- -_0x8179b4._0x460d08,_0x3f07b8-_0x8179b4._0x25b7f4,_0x3f07b8,_0x4b8e09-0x178);}const _0x465dea={'sessionId':_0x5ad63a['sessionId'],'turnId':_0x5ad63a['turnId'],'system':normalizeSystem(_0x5ad63a[_0x1c898d(_0x127b53._0x2e0161,_0x127b53._0x2fcd99,0x62,-0x32)]),'messages':(_0x5ad63a[_0x84a501(_0x127b53._0x52ebbf,_0x127b53._0x559b22,-_0x127b53._0x1d2445,_0x127b53._0x3e8866)]??[])[_0x1c898d(_0x127b53._0x36494a,0x6c,_0x127b53._0x343124,0x5c)](normalizeMessage),'lastResponse':void 0x0,'toolResults':[],'finalMessage':void 0x0,'sessionDir':typeof _0x18fdc9[_0x84a501(0x96,0x6c,0x9d,0x96)]===_0x1c898d(0x18,0x2a,_0x127b53._0x148a94,-0x29)?_0x18fdc9[_0x84a501(0x96,_0x127b53._0x55012e,_0x127b53._0x2d4c19,0x92)]():_0x18fdc9[_0x84a501(0x96,_0x127b53._0x3822c6,_0x127b53._0x3d935e,_0x127b53._0x44d245)]},_0x5881ba=makeExtensionContext(_0x465dea),_0x3d9ce1={'sessionId':_0x465dea['sessionId'],'turnId':_0x465dea[_0x1c898d(_0x127b53._0x3eafa0,0x25,_0x127b53._0x10382f,0x33)],'state':_0x465dea,'signal':_0xe1d2e1,..._0x18fdc9[_0x84a501(0x2e,_0x127b53._0x5de278,-_0x127b53._0xb9e115,0x1c)]?{'askUser':_0x18fdc9[_0x1c898d(-_0x127b53._0x108704,0x31,-0x1c,-0x16)]}:{},..._0x18fdc9[_0x1c898d(_0x127b53._0x26615e,_0x127b53._0x134f0b,_0x127b53._0x2a179b,_0x127b53._0x5ad3ef)]?{'setTopic':_0x18fdc9['setTopic']}:{}},{stage:_0x320048,emit:_0x4e3100,stageUnchecked:_0x1fd0c9,emitUnchecked:_0x196297}=makeTurnGuards(_0xe1d2e1,_0x18fdc9[_0x84a501(0xb2,_0x127b53._0x5b92ea,0xef,0xee)],_0x18fdc9['onEvent'],_0x5881ba,_0x3d9ce1),_0x423194=async(_0x3c30a6,_0x1a6227)=>{const _0x585691={_0x49c079:0x1a0};function _0x496793(_0x142796,_0x243596,_0x3988d5,_0x2972f7){return _0x84a501(_0x3988d5-0x39a,_0x243596,_0x3988d5-_0x585691._0x49c079,_0x2972f7-0xc3);}const _0x359c1d=_0x1a6227?{..._0x5881ba,'turnMeta':_0x1a6227}:_0x5881ba;await _0x18fdc9['registry'][_0x496793(_0x4f33aa._0x60ab1e,_0x4f33aa._0x48e183,0x471,0x42d)]('afterMessageAppend',structuredClone(_0x3c30a6),_0x359c1d);};let _0x241bdc=0x0;function _0x1c898d(_0x2dfc4a,_0x274df2,_0x35a249,_0x4af8c4){return _0xb702f5(_0x4af8c4,_0x2dfc4a- -0x3ea,_0x35a249-0x5a,_0x4af8c4-_0x4f67b5._0x1da000);}try{const _0x43f774=await _0x320048('onUserMessage',normalizeMessage(_0x5ad63a['message']));_0x465dea['messages'][_0x84a501(0x29,0x67,-0x25,-0x24)](_0x43f774),await _0x423194(_0x43f774),await _0x4e3100({'type':'user_message','message':_0x43f774});while(!![]){throwIfAborted(_0xe1d2e1),_0x241bdc+=0x1;const _0x5a63d2=createAssistantMessageId(_0x465dea[_0x1c898d(_0x127b53._0x3eafa0,0x62,_0x127b53._0x196551,-_0x127b53._0x3313e9)],_0x241bdc),_0x421408=createReasoningMessageId(_0x5a63d2),_0x3c53ca={'model':_0x18fdc9['chatModel'][_0x1c898d(0xa4,0xc3,0xc6,_0x127b53._0x24730d)],..._0x18fdc9['chatModel'][_0x1c898d(_0x127b53._0x5c48c4,_0x127b53._0x32cfc7,-0xc,0x89)]?{'provider':_0x18fdc9[_0x84a501(0x95,_0x127b53._0x4e3402,0x51,0xee)]['provider']}:{}};let _0x3e10f={'model':_0x18fdc9['chatModel'][_0x1c898d(0xa4,0xec,_0x127b53._0x377f86,_0x127b53._0x4d9d09)],'maxTokens':_0x18fdc9[_0x84a501(_0x127b53._0x46be04,0xe9,_0x127b53._0x278f49,_0x127b53._0x5b92ea)][_0x1c898d(0x45,0x79,-_0x127b53._0x4bdc44,0x26)]??0x4000,'system':structuredClone(_0x465dea[_0x1c898d(0x23,_0x127b53._0xed6a44,0x62,-0x2c)]),'messages':structuredClone(_0x465dea['messages']),'tools':_0x18fdc9[_0x84a501(_0x127b53._0x2d95ec,0xbd,_0x127b53._0x5ec0d1,0xf3)]['listToolSchemas'](),'metadata':{'sessionId':_0x465dea[_0x84a501(_0x127b53._0x31dd6f,_0x127b53._0x390f4c,_0x127b53._0x2a179b,_0x127b53._0x128a4f)],'turnId':_0x465dea[_0x84a501(0x43,0x91,0x9a,_0x127b53._0x3b3b23)]},..._0x18fdc9[_0x1c898d(-_0x127b53._0x4c7a08,0x7,0x27,-0x17)]?{'outputFormat':_0x18fdc9['outputFormat']}:{}};_0x3e10f=await _0x320048(_0x84a501(_0x127b53._0x22fda0,0x27,0x2e,_0x127b53._0x30ac3b),_0x3e10f),await _0x4e3100({'type':_0x1c898d(_0x127b53._0x4083d1,-0x31,0xe,-_0x127b53._0x411477),'request':_0x3e10f}),_0x3c53ca[_0x84a501(0xa8,0xa7,0xa9,0x52)]=Date[_0x84a501(_0x127b53._0x12e8b3,_0x127b53._0x35e392,0x5f,0x19)]();let _0x11f5a8=await executeModelRequest(_0x3e10f,_0x5ad63a,_0x18fdc9,_0x3d9ce1,{'assistantMessageId':_0x5a63d2,'reasoningMessageId':_0x421408,'meta':_0x3c53ca});_0x3c53ca[_0x1c898d(0xf,0x59,-0x30,-_0x127b53._0x104e4b)]=Date[_0x1c898d(0x19,-_0x127b53._0x15e575,0x2d,0x4)](),_0x11f5a8=await _0x320048('afterModelResponse',_0x11f5a8),await _0x4e3100({'type':'model_response','response':_0x11f5a8}),_0x465dea[_0x1c898d(0x10,0xa,_0x127b53._0xb84c15,0x4e)]=_0x11f5a8;let _0xccf415=await _0x320048(_0x84a501(_0x127b53._0x42253e,0x3a,0x79,0xa9),withMessageId(responseToAssistantMessage(_0x11f5a8),_0x5a63d2));_0xccf415=withMessageId(_0xccf415,_0x5a63d2);const _0x22c8ff=getToolUseBlocks(_0xccf415),_0x1987b5=await Promise[_0x1c898d(0x42,_0x127b53._0x494dcc,_0x127b53._0x17e198,0x35)](_0x22c8ff[_0x84a501(_0x127b53._0x2b8580,0x88,0x9e,0xdf)](_0xcad46=>_0x320048(_0x84a501(0x75,0x8c,0x2d,0xa4),_0xcad46)));_0x1987b5[_0x84a501(_0x127b53._0x128a4f,-0x8,_0x127b53._0x343124,_0x127b53._0x4e3ee4)]>0x0&&(_0xccf415=replaceToolUseBlocks(_0xccf415,_0x1987b5));const _0x56425c=withMessageId(_0xccf415,_0x5a63d2);_0xccf415=_0x56425c;const _0x38379b=createReasoningMessage(_0xccf415),_0x39e952=createAssistantTextMessage(_0xccf415),_0x5643fd=createToolUseMessage(_0xccf415);_0x38379b&&await _0x4e3100({'type':_0x1c898d(0x84,0xa4,0x7a,_0x127b53._0x1e3396),'message':withMessageId(_0x38379b,_0x421408)});_0x39e952&&await _0x4e3100({'type':_0x1c898d(0x1,-0x47,_0x127b53._0xcc45ed,_0x127b53._0xed6a44),'message':withMessageId(_0x39e952,_0x5a63d2)});_0x5643fd&&await _0x4e3100({'type':_0x84a501(_0x127b53._0x611284,0x61,_0x127b53._0x1ae6e1,_0x127b53._0x41936a),'message':withMessageId(_0x5643fd,_0x5a63d2)});_0x465dea[_0x1c898d(0x1c,_0x127b53._0x446c6a,-0x19,-_0x127b53._0x425361)][_0x1c898d(-_0x127b53._0x2d5c7e,0x12,-0x4,-_0x127b53._0x3be683)](_0x56425c);_0x1987b5['length']>0x0&&await _0x423194(_0x56425c,_0x3c53ca);for(const _0x3109f4 of _0x1987b5){await _0x4e3100({'type':_0x84a501(0x31,-0x16,-0x25,_0x127b53._0x2462d0),'toolCall':_0x3109f4});}if(_0x1987b5[_0x1c898d(_0x127b53._0x1df4d1,-_0x127b53._0x119152,_0x127b53._0x1d2445,_0x127b53._0x3448f4)]===0x0){const _0x8d8d57=await _0x320048(_0x84a501(_0x127b53._0x131863,0x9f,0x3d,-0xe),_0xccf415),_0x38c8aa=withMessageId(_0x8d8d57,_0x5a63d2);return _0x465dea['finalMessage']=_0x38c8aa,_0x465dea['messages'][_0x465dea[_0x1c898d(_0x127b53._0x15e575,_0x127b53._0x363ae2,-_0x127b53._0x5264df,_0x127b53._0x3de18c)][_0x1c898d(0x13,-_0x127b53._0x3d3423,_0x127b53._0x15ad5a,-_0x127b53._0x5d0239)]-0x1]=_0x38c8aa,await _0x423194(_0x38c8aa,_0x3c53ca),await _0x4e3100({'type':'final_message','message':_0x38c8aa}),throwIfAborted(_0xe1d2e1),await _0x18fdc9[_0x1c898d(_0x127b53._0xb103bf,_0x127b53._0x4bb337,0x25,_0x127b53._0x33c2a6)][_0x1c898d(0xa2,0xf8,_0x127b53._0x1b10bd,0xdc)](_0x84a501(0x3f,0x2f,_0x127b53._0x14e79b,0x4b),_0x465dea,_0x5881ba),await _0x4e3100({'type':'turn_complete','state':_0x465dea}),{'status':_0x84a501(_0x127b53._0x34066e,0x8f,0xd6,0xe0),'finalMessage':_0x38c8aa,'state':_0x465dea};}let _0x27057a=await _0x18fdc9[_0x84a501(0xa7,0x90,_0x127b53._0x3be683,0x74)][_0x1c898d(_0x127b53._0x4c7340,0x14,0x68,-0x15)](_0x1987b5,_0x3d9ce1);const _0x5158d1=_0x27057a[_0x84a501(_0x127b53._0xe33998,_0x127b53._0x2babe9,_0x127b53._0x47c4f1,0x92)](isAbortedToolResult),_0x3a2266=_0x5158d1?_0x1fd0c9:_0x320048,_0x5706aa=_0x5158d1?_0x196297:_0x4e3100;_0x27057a=await Promise[_0x84a501(_0x127b53._0x558626,_0x127b53._0x578658,0x9c,_0x127b53._0x180701)](_0x27057a[_0x1c898d(0x8e,_0x127b53._0x2b7268,_0x127b53._0x5b161a,_0x127b53._0x341328)](_0x501b86=>_0x3a2266(_0x84a501(0xc9,0x103,0xb7,0xce),_0x501b86))),_0x465dea[_0x84a501(0x3b,0x72,_0x127b53._0x513253,0x30)][_0x84a501(0x29,_0x127b53._0xcc45ed,0x3c,_0x127b53._0x5bf7b3)](..._0x27057a);for(const _0x14d36f of _0x27057a){await _0x5706aa({'type':_0x84a501(0x49,_0x127b53._0x534f62,-_0x127b53._0x273bf1,_0x127b53._0x5e8960),'result':_0x14d36f});}const _0x402f0b=await _0x3a2266(_0x84a501(_0x127b53._0x3834f8,_0x127b53._0x14769f,_0x127b53._0x1cab71,_0x127b53._0x1febc7),createToolResultUserMessage(_0x27057a));await _0x5706aa({'type':'tool_result_message','message':_0x402f0b}),_0x465dea[_0x1c898d(0x1c,-_0x127b53._0x4c7a08,0x63,-_0x127b53._0x2cb629)]['push'](_0x402f0b),await _0x423194(_0x402f0b);if(_0x5158d1)return{'status':_0x84a501(0x9f,_0x127b53._0x2430b8,0xa1,0xe1),'state':_0x465dea};}}catch(_0x290872){if(!_0xe1d2e1[_0x1c898d(0x6a,_0x127b53._0x235b5e,_0x127b53._0xd6501d,0x64)])throw new TurnFailedError(_0x290872,_0x465dea);return{'status':_0x1c898d(0x6a,_0x127b53._0x36494a,0xa4,0xc0),'state':_0x465dea};}}function createSessionId(){const _0x58c516={_0x4b748e:0x201,_0x54d4b5:0x2fd,_0x10b337:0x29f,_0x4a5d9b:0x2ef,_0xc178c:0x2b8,_0x4de01d:0x24c,_0x2f8a0e:0x26e},_0x43fd5d={_0x44dab0:0x216,_0x566f54:0x9a},_0x101852={_0x3d9f0f:0x1a1};function _0x192392(_0x454dc6,_0x3dfef3,_0x4483bf,_0x4ee371){return _0xb702f5(_0x3dfef3,_0x4483bf- -0x718,_0x4483bf-_0x101852._0x3d9f0f,_0x4ee371-0x8c);}function _0x9cd3a4(_0x48bb6d,_0x297e45,_0x32cc51,_0x4cc7ac){return _0xb702f5(_0x4cc7ac,_0x48bb6d- -_0x43fd5d._0x44dab0,_0x32cc51-_0x43fd5d._0x566f54,_0x4cc7ac-0x12f);}return _0x9cd3a4(0x257,_0x58c516._0x4b748e,0x263,0x233)+Date['now']()+'-'+Math[_0x192392(-0x305,-0x32c,-_0x58c516._0x54d4b5,-0x2e2)]()[_0x192392(-_0x58c516._0x10b337,-0x2d4,-_0x58c516._0x4a5d9b,-_0x58c516._0xc178c)](0x10)[_0x9cd3a4(0x256,0x290,_0x58c516._0x4de01d,_0x58c516._0x2f8a0e)](0x2,0xa);}function createTurnId(_0x28f804){return'turn-'+_0x28f804;}function createDefaultMessage(_0xdcfdf3){if(_0xdcfdf3===void 0x0)return void 0x0;return normalizeUserInput(_0xdcfdf3);}function normalizeUserInput(_0x2f2ed6){const _0x56fd84={_0x222176:0x10e,_0x460e2c:0x157,_0x2b792e:0x276,_0x4b44a6:0x23d,_0x27a70b:0x10a},_0x11589a={_0x365f6f:0x62e,_0x585dcd:0x56,_0x2c9e44:0x18e},_0x1ec945={_0x3f60a3:0x96,_0x3709b7:0x23};function _0x37b2b3(_0x221d05,_0x5b1adc,_0x43abb6,_0x4d2c43){return _0xb702f5(_0x4d2c43,_0x5b1adc- -0x346,_0x43abb6-_0x1ec945._0x3f60a3,_0x4d2c43-_0x1ec945._0x3709b7);}if(typeof _0x2f2ed6===_0x37b2b3(0x190,0x145,_0x56fd84._0x222176,_0x56fd84._0x460e2c))return{'role':_0x4139c3(-0x208,-_0x56fd84._0x2b792e,-0x242,-_0x56fd84._0x4b44a6),'content':[{'type':_0x37b2b3(0x104,_0x56fd84._0x27a70b,0xb0,0x112),'text':_0x2f2ed6}]};function _0x4139c3(_0x110336,_0x5c38d1,_0x9a3f31,_0x658f59){return _0xb702f5(_0x5c38d1,_0x658f59- -_0x11589a._0x365f6f,_0x9a3f31-_0x11589a._0x585dcd,_0x658f59-_0x11589a._0x2c9e44);}return normalizeMessage(_0x2f2ed6);}function resolveChatModel(_0x8fdde8){const _0x159bb5={_0x5403f3:0x7c,_0x4cc1b8:0xae,_0x2e2656:0x92,_0x371e46:0x6f,_0x5923ca:0x39,_0x3f22fc:0x87},_0xd19f5c={_0x290d08:0xb},_0x5ea315={_0x3997d7:0xc9};if(!_0x8fdde8[_0x22ede1(_0x159bb5._0x5403f3,_0x159bb5._0x4cc1b8,0xce,_0x159bb5._0x2e2656)])throw new Error(_0x22ede1(0x82,0x3f,_0x159bb5._0x371e46,0x82));function _0x22ede1(_0x414619,_0x2e590b,_0xaf5d59,_0x54d70e){return _0x139f3f(_0x54d70e- -0x312,_0x2e590b-_0x5ea315._0x3997d7,_0x2e590b,_0x54d70e-0xb9);}function _0x3d7477(_0x92232,_0x29f89b,_0x46596e,_0x921ba6){return _0xb702f5(_0x92232,_0x46596e- -0x4ad,_0x46596e-0x5c,_0x921ba6-_0xd19f5c._0x290d08);}return _0x8fdde8[_0x22ede1(0x86,_0x159bb5._0x5923ca,_0x159bb5._0x3f22fc,0x92)];}function createRegistry(_0x40167c){const _0x41e32f={_0x5bdf11:0x1eb,_0xc7b18b:0x240,_0x9f72fb:0x1d6,_0x1eb883:0x1be,_0x27e487:0x1d1,_0x5c880a:0x1f5,_0x303b7b:0x243},_0x5aa1a2={_0x525794:0x40},_0x840ed8={_0x38106e:0x1ea,_0x2695b0:0x100};function _0x24e7fa(_0x38d675,_0x5ee741,_0x5a0195,_0x460d9b){return _0xb702f5(_0x5ee741,_0x5a0195- -0x25c,_0x5a0195-_0x840ed8._0x38106e,_0x460d9b-_0x840ed8._0x2695b0);}if(_0x40167c[_0x12c6b7(-_0x41e32f._0x5bdf11,-0x247,-0x1ed,-0x1f9)])return _0x40167c[_0x12c6b7(-0x1ab,-_0x41e32f._0xc7b18b,-0x1ed,-_0x41e32f._0x9f72fb)];const _0x27a114=createExtensionRegistry(),_0x43f687=_0x40167c['extensions']??[];function _0x12c6b7(_0x4a47d2,_0x36e7f2,_0x29a26c,_0x475ffa){return _0x139f3f(_0x29a26c- -0x5ae,_0x36e7f2-_0x5aa1a2._0x525794,_0x36e7f2,_0x475ffa-0xe3);}for(const _0x4e7975 of _0x43f687){_0x27a114[_0x12c6b7(-_0x41e32f._0x1eb883,-_0x41e32f._0x27e487,-_0x41e32f._0x5c880a,-_0x41e32f._0x303b7b)](_0x4e7975);}return _0x27a114;}var Agent=class{[_0x139f3f(0x3a3,0x3fd,0x3c0,0x3d3)];[_0x139f3f(0x365,0x358,0x361,0x33b)];[_0x139f3f(0x39b,0x352,0x359,0x39e)];[_0xb702f5(0x3ea,0x42d,0x482,0x41c)];[_0x139f3f(0x360,0x37f,0x309,0x386)];[_0xb702f5(0x3e3,0x3df,0x429,0x437)];[_0x139f3f(0x341,0x353,0x30f,0x34b)];constructor(_0x323a92={}){const _0x1c41c0={_0x599c22:0x126,_0x359071:0x13b,_0x36eb90:0x126,_0x5714e7:0xde,_0x168c97:0x177,_0x19e975:0x141,_0x456fea:0x12f,_0x4a7cdc:0x121,_0x12fbe8:0xda,_0x4c487d:0x1c4,_0x3c4cd7:0x204,_0x46d6a3:0xd2,_0x1c9be6:0xaf,_0x357b11:0xdd,_0xaeb66e:0xcc,_0x2b9551:0xff,_0x26f235:0xd5,_0x122709:0x163,_0x5e6321:0x1e7,_0x1dfe30:0x233,_0x940a3c:0x1d2,_0x39a19e:0x24c,_0x23ebac:0x1cc,_0x2aa5bd:0x240,_0x321585:0x227,_0x41af15:0x108},_0x3cc37d={_0x4ea8d8:0x196};this[_0x2300ce(-_0x1c41c0._0x599c22,-0xce,-_0x1c41c0._0x359071,-0x133)]=_0x323a92[_0x2300ce(-_0x1c41c0._0x36eb90,-_0x1c41c0._0x5714e7,-0x122,-0x140)]??createSessionId(),this[_0x2300ce(-0x16c,-_0x1c41c0._0x168c97,-_0x1c41c0._0x19e975,-0x198)]=0x0,this[_0x2300ce(-0x10a,-_0x1c41c0._0x456fea,-0x10f,-_0x1c41c0._0x4a7cdc)]=_0x323a92[_0x2300ce(-0x134,-0x10c,-0x108,-_0x1c41c0._0x12fbe8)]??'',this['messages']=(_0x323a92[_0x21a94e(-0x1f7,-_0x1c41c0._0x4c487d,-_0x1c41c0._0x3c4cd7,-0x1b5)]??[])[_0x2300ce(-0xdb,-_0x1c41c0._0x46d6a3,-_0x1c41c0._0x1c9be6,-_0x1c41c0._0x357b11)](normalizeMessage),this[_0x21a94e(-0x233,-0x1f5,-0x22b,-0x1d9)]=createDefaultMessage(_0x323a92[_0x2300ce(-0x135,-0x150,-0xde,-0x129)]);function _0x2300ce(_0x12d3cb,_0x50da00,_0x3f3331,_0x2ad771){return _0x139f3f(_0x12d3cb- -0x4ad,_0x50da00-_0x3cc37d._0x4ea8d8,_0x3f3331,_0x2ad771-0xb1);}function _0x21a94e(_0x330ec9,_0x354fee,_0x4db23e,_0x5de19f){return _0xb702f5(_0x5de19f,_0x4db23e- -0x60a,_0x4db23e-0x3d,_0x5de19f-0x25);}this[_0x2300ce(-0x112,-_0x1c41c0._0xaeb66e,-_0x1c41c0._0x2b9551,-_0x1c41c0._0x26f235)]=createAgentMetrics({'getContextWindowLimit':_0x323a92[_0x2300ce(-0x154,-0x18a,-0x149,-_0x1c41c0._0x122709)]});const _0x14c6d1=_0x323a92[_0x21a94e(-0x1d0,-0x19d,-_0x1c41c0._0x5e6321,-_0x1c41c0._0x1dfe30)],_0xe1e6b4=async(_0x286ba7,_0x472ece)=>{this['metrics']['recordEvent'](_0x286ba7),await _0x14c6d1?.(_0x286ba7,_0x472ece);},_0x4ba391=createInternalToolRuntime(_0x323a92[_0x21a94e(-_0x1c41c0._0x940a3c,-0x207,-0x218,-_0x1c41c0._0x39a19e)]??[],{'onEvent':_0xe1e6b4,'onToolCall':_0x323a92['onToolCall']});this[_0x21a94e(-_0x1c41c0._0x23ebac,-_0x1c41c0._0x2aa5bd,-0x1ff,-0x212)]={'registry':createRegistry(_0x323a92),'chatModel':resolveChatModel(_0x323a92),'toolRuntime':_0x4ba391,'askUser':_0x323a92[_0x21a94e(-0x1e4,-0x230,-_0x1c41c0._0x321585,-0x204)],'setTopic':_0x323a92['setTopic'],'onEvent':_0xe1e6b4,'sessionDir':_0x323a92[_0x2300ce(-_0x1c41c0._0x41af15,-0x126,-0xb3,-0xb5)],'outputFormat':_0x323a92['outputFormat']};}get[_0xb702f5(0x435,0x41f,0x424,0x41b)](){return this['_systemPrompt'];}[_0xb702f5(0x470,0x438,0x419,0x3f1)](_0x5ae1f1=[]){const _0x209c92={_0x3f26d1:0x25c,_0x1dc584:0x21d,_0x5f2b5d:0x1e6},_0x5862c9={_0x36e1a2:0x3e0,_0x1732c4:0x14c};function _0x1ac7e1(_0x13d7d9,_0x3caa92,_0x119d2d,_0x5ed15e){return _0x139f3f(_0x3caa92- -_0x5862c9._0x36e1a2,_0x3caa92-_0x5862c9._0x1732c4,_0x119d2d,_0x5ed15e-0x1f);}function _0x213e24(_0x4e1bb1,_0x3faf49,_0x4e1d52,_0x4f9890){return _0x139f3f(_0x4e1d52- -0x199,_0x3faf49-0x18a,_0x4e1bb1,_0x4f9890-0x8d);}this['deps'][_0x213e24(_0x209c92._0x3f26d1,0x1fe,_0x209c92._0x1dc584,_0x209c92._0x5f2b5d)][_0x213e24(0x230,0x241,0x1f9,0x1ce)](_0x5ae1f1);}[_0x139f3f(0x342,0x363,0x322,0x320)](){const _0x121d86={_0x4c5dc4:0x3d5,_0x28d4e9:0x3d9,_0x428f1d:0x456,_0x49c315:0x430},_0x175452={_0x1f167c:0x15};function _0x5343fe(_0x30e7be,_0x3a914a,_0x4b65b5,_0x428e37){return _0xb702f5(_0x428e37,_0x4b65b5- -0x5ff,_0x4b65b5-0x36,_0x428e37-0x10e);}function _0x515076(_0x342e92,_0x1e110,_0x17cd29,_0x454da5){return _0xb702f5(_0x454da5,_0x17cd29- -0x58,_0x17cd29-0xfd,_0x454da5-_0x175452._0x1f167c);}return this['deps'][_0x515076(_0x121d86._0x4c5dc4,_0x121d86._0x28d4e9,0x404,0x410)][_0x515076(0x3e9,_0x121d86._0x428f1d,_0x121d86._0x49c315,0x41c)]();}[_0xb702f5(0x412,0x434,0x47c,0x43c)](_0x6d979,_0xd467ad={}){const _0x344597={_0x30f177:0x1b8,_0x2cedce:0x18f,_0x2b9dd8:0x256,_0x22efce:0x24e},_0x35e325={_0x3f7848:0x55b,_0x88e46b:0x1c9,_0x3cb292:0x194},_0x42b65a={_0x1ea685:0x667,_0x24f742:0x1d1};this[_0x353b47(-0x211,-_0x344597._0x30f177,-0x178,-_0x344597._0x2cedce)]=_0x6d979;function _0x5240d3(_0x103b9a,_0x564d31,_0x4fa8a3,_0x5cf800){return _0xb702f5(_0x4fa8a3,_0x564d31- -_0x42b65a._0x1ea685,_0x4fa8a3-0xd8,_0x5cf800-_0x42b65a._0x24f742);}function _0x353b47(_0x4f0477,_0x18a9f7,_0x1d18eb,_0x15e598){return _0x139f3f(_0x18a9f7- -_0x35e325._0x3f7848,_0x18a9f7-_0x35e325._0x88e46b,_0x4f0477,_0x15e598-_0x35e325._0x3cb292);}_0xd467ad[_0x5240d3(-_0x344597._0x2b9dd8,-_0x344597._0x22efce,-0x2a3,-0x1f9)]===!![]&&(this['messages']=[],this['turnIndex']=0x0);}[_0x139f3f(0x3b8,0x3a9,0x3c8,0x3f8)](_0x2a2369){this['sessionId']=_0x2a2369;}[_0x139f3f(0x363,0x343,0x34b,0x3ac)](_0x359207){const _0x455caa={_0x45a5f3:0x358,_0x4d0d84:0x30d,_0x312fa9:0x3a6,_0x1189ee:0x36c,_0x56077:0x34c},_0x2b2987={_0x2c2866:0xd0,_0x1aed60:0x1e,_0x106b5e:0xd4},_0xa20662={_0x32eb69:0x58,_0x1bf945:0xa8};function _0x1dca60(_0xd7c233,_0x2565bc,_0x593aa3,_0x1902c9){return _0x139f3f(_0x593aa3- -_0xa20662._0x32eb69,_0x2565bc-_0xa20662._0x1bf945,_0xd7c233,_0x1902c9-0x1f2);}function _0xcbbeeb(_0x108b5c,_0x4ba4a9,_0x38f906,_0x388318){return _0x139f3f(_0x388318- -_0x2b2987._0x2c2866,_0x4ba4a9-_0x2b2987._0x1aed60,_0x108b5c,_0x388318-_0x2b2987._0x106b5e);}this[_0x1dca60(0x2d8,_0x455caa._0x45a5f3,_0x455caa._0x4d0d84,0x307)][_0x1dca60(_0x455caa._0x312fa9,_0x455caa._0x1189ee,_0x455caa._0x56077,0x3a2)]=_0x359207;}async[_0xb702f5(0x4dc,0x491,0x485,0x44c)](_0x47d08d=this[_0xb702f5(0x39a,0x3df,0x38b,0x38e)],_0x69205d={}){const _0x59ec76={_0x441857:0x15a,_0x35ee7d:0x1c8,_0x4a2470:0x1d0,_0x162bb9:0x22b,_0x136bb9:0x1dc,_0x32c7d1:0x20c,_0x40c2da:0x156,_0x4a4258:0x141,_0x1fd478:0x1e0,_0x448167:0x1b2,_0xe9f4fc:0x178,_0x45d686:0x1d7,_0x4371bb:0x17e,_0x51f587:0x1e4,_0x21c3c5:0x1b8,_0x11f918:0x19d,_0x5cf956:0x1bd,_0x12f134:0x14b,_0x3e060e:0x184,_0x722c0:0x1bd,_0x22f773:0x174,_0x18a88f:0x128,_0x1ada4d:0x134,_0x3a7618:0x12a,_0x5b60d2:0x168},_0x1a0264={_0x70f05a:0x51d,_0x27e622:0x19e,_0x231c3f:0xe7},_0xb3a3f5={_0x454e6b:0x522};if(!_0x47d08d)throw new Error('Agent.send\x20requires\x20a\x20message\x20when\x20no\x20default\x20message\x20is\x20configured');function _0x6f1129(_0xf45da2,_0x98b635,_0x3c2ab3,_0x4bf86e){return _0x139f3f(_0x4bf86e- -_0xb3a3f5._0x454e6b,_0x98b635-0x125,_0xf45da2,_0x4bf86e-0x19f);}this['turnIndex']+=0x1;function _0x200437(_0x1d4c84,_0x4897aa,_0x28954a,_0xd26cad){return _0x139f3f(_0x28954a- -_0x1a0264._0x70f05a,_0x4897aa-_0x1a0264._0x27e622,_0x1d4c84,_0xd26cad-_0x1a0264._0x231c3f);}try{const _0x3a60be=await runTurn({'sessionId':this[_0x6f1129(-_0x59ec76._0x441857,-_0x59ec76._0x35ee7d,-0x165,-0x19b)],'turnId':createTurnId(this[_0x200437(-_0x59ec76._0x4a2470,-_0x59ec76._0x162bb9,-_0x59ec76._0x136bb9,-_0x59ec76._0x32c7d1)]),'streaming':_0x69205d[_0x6f1129(-_0x59ec76._0x40c2da,-0x13a,-0x164,-_0x59ec76._0x4a4258)],'signal':_0x69205d[_0x200437(-_0x59ec76._0x1fd478,-0x1d9,-_0x59ec76._0x448167,-0x1cc)],'system':this['systemPrompt'],'messages':this[_0x6f1129(-_0x59ec76._0xe9f4fc,-_0x59ec76._0x45d686,-_0x59ec76._0x4371bb,-0x1c2)],'message':normalizeUserInput(_0x47d08d)},this[_0x200437(-_0x59ec76._0x51f587,-0x1c7,-_0x59ec76._0x21c3c5,-0x172)]);return this[_0x200437(-0x172,-_0x59ec76._0x11f918,-0x1bd,-0x169)]=_0x3a60be['state'][_0x200437(-0x19f,-0x1a2,-_0x59ec76._0x5cf956,-0x173)][_0x200437(-0xfd,-0x102,-_0x59ec76._0x12f134,-0x14a)](normalizeMessage),_0x3a60be;}catch(_0x43d296){if(_0x43d296 instanceof TurnFailedError){this[_0x200437(-0x168,-_0x59ec76._0x3e060e,-_0x59ec76._0x722c0,-_0x59ec76._0x22f773)]=synthesizeMissingToolResults(_0x43d296[_0x200437(-0x184,-_0x59ec76._0x18a88f,-_0x59ec76._0x1ada4d,-0x149)]['messages'][_0x200437(-0x16b,-_0x59ec76._0x3a7618,-_0x59ec76._0x12f134,-_0x59ec76._0x5b60d2)](normalizeMessage));throw _0x43d296['cause'];}throw _0x43d296;}}};export{normalizeToolOutputValue,createToolOutput,ToolExecutionError,defineTool,ToolRegistry,validateToolInput,deriveFinalToolOutput,createInternalToolRuntime,createExtensionRegistry,createAgentMetrics,runTurn,Agent};
1
+ (function(_0x5b625b,_0x720b85){const _0x27817d={_0x39866d:0x212,_0x43c2f6:0x75,_0x9db8d6:0x3,_0x178535:0x60,_0x1c722e:0xd,_0x282302:0x29,_0x26fd5a:0x84,_0x40e60a:0x1e1,_0x44a738:0x1e6,_0x4fe09a:0x211,_0x3dcbdb:0x50,_0x5f39a8:0x1b9,_0x1db3ae:0x1c4,_0x58418e:0x174,_0x270967:0x195,_0x578129:0x18,_0x281bff:0x66},_0x5cd447={_0x4c026e:0x17};function _0x1fbb91(_0x21bbc2,_0x46cfe6,_0x584715,_0x52bd62){return _0x54d5(_0x21bbc2- -0x224,_0x584715);}function _0x1cb690(_0xe3cf65,_0x1e2e28,_0x26c312,_0x95bdcb){return _0x54d5(_0x26c312- -_0x5cd447._0x4c026e,_0xe3cf65);}const _0x1decd8=_0x5b625b();while(!![]){try{const _0x5081ea=parseInt(_0x1cb690(0x1ff,0x241,_0x27817d._0x39866d,0x22d))/0x1+parseInt(_0x1fbb91(-0x46,-_0x27817d._0x43c2f6,0x10,-_0x27817d._0x9db8d6))/0x2+-parseInt(_0x1fbb91(-0x37,-_0x27817d._0x178535,_0x27817d._0x1c722e,-0x91))/0x3+-parseInt(_0x1cb690(0x17a,0x1b3,0x1d5,0x1e5))/0x4*(-parseInt(_0x1fbb91(_0x27817d._0x282302,0x6f,0x3f,_0x27817d._0x26fd5a))/0x5)+-parseInt(_0x1cb690(_0x27817d._0x40e60a,_0x27817d._0x44a738,_0x27817d._0x4fe09a,0x1cf))/0x6*(-parseInt(_0x1fbb91(-0x47,-_0x27817d._0x3dcbdb,-0x15,-_0x27817d._0x9db8d6))/0x7)+-parseInt(_0x1cb690(0x205,_0x27817d._0x5f39a8,_0x27817d._0x1db3ae,0x1b8))/0x8*(parseInt(_0x1cb690(_0x27817d._0x58418e,_0x27817d._0x270967,0x1be,0x1b1))/0x9)+parseInt(_0x1fbb91(_0x27817d._0x578129,0x51,_0x27817d._0x281bff,0x37))/0xa;if(_0x5081ea===_0x720b85)break;else _0x1decd8['push'](_0x1decd8['shift']());}catch(_0x59251c){_0x1decd8['push'](_0x1decd8['shift']());}}}(_0x5299,0x203be));import{createAssistantTextMessage,createReasoningMessage,createToolResultUserMessage,createToolUseMessage,getToolUseBlocks,normalizeMessage,normalizeSystem,responseToAssistantMessage,synthesizeMissingToolResults}from'./chunk-QDOE7NWO.js';import{TurnFailedError}from'./chunk-FFIZ6TKW.js';import{addAbortListener,isAbortError,throwIfAborted,toAbortError}from'./chunk-X7VAACWY.js';function isJsonObject(_0x40e9f){const _0x13fb5b={_0x511c05:0x58f};function _0x19ad4e(_0x3b4896,_0x5da1c2,_0x498fa6,_0x26048c){return _0x54d5(_0x498fa6-0x333,_0x3b4896);}return typeof _0x40e9f===_0x19ad4e(0x5eb,0x549,0x59b,_0x13fb5b._0x511c05)&&_0x40e9f!==null&&!Array['isArray'](_0x40e9f);}function isToolOutputEnvelope(_0xc75e4d){const _0x454450={_0x1bdab4:0x41c,_0x4eb7a3:0x3c3,_0x3d8163:0x3ba,_0x4643c4:0x190};function _0x14665e(_0x26bfaf,_0x1980d6,_0x48e65c,_0x8c113b){return _0x54d5(_0x1980d6-0x177,_0x26bfaf);}if(typeof _0xc75e4d!==_0x14665e(_0x454450._0x1bdab4,0x3df,_0x454450._0x4eb7a3,_0x454450._0x4eb7a3)||_0xc75e4d===null||Array['isArray'](_0xc75e4d))return![];function _0x2b6aef(_0x3eb1b1,_0x3023cf,_0x518f3b,_0x5b627b){return _0x54d5(_0x5b627b- -0xef,_0x3eb1b1);}if(typeof _0xc75e4d[_0x14665e(0x414,0x3c5,0x3ed,_0x454450._0x3d8163)]!==_0x2b6aef(0x199,_0x454450._0x4643c4,0x140,0x15a))return![];const _0x412f6b=_0xc75e4d['structured'];return _0x412f6b===void 0x0||isJsonObject(_0x412f6b);}function validateAgainstSchema(_0x5e8df3,_0x2e1c09,_0x1be977){const _0xd85ce0={_0x447419:0x58,_0x2cc4df:0x50,_0x1ff104:0x10,_0x3fa987:0xc,_0x2bd013:0x70,_0x4d5d9f:0x4c,_0x4efe2a:0x8b,_0x5d6dd5:0x53,_0x3b81eb:0x18,_0x592ce4:0x51,_0x56f66d:0x7c,_0x24a758:0x37,_0x271f51:0x84,_0xc55126:0x2c,_0x2c3790:0x5c,_0x5a9c25:0x39,_0x16a14e:0x4f,_0xdd8c37:0x4,_0x41a5d7:0x7e,_0x5a685d:0xd1,_0x147c5d:0x4f,_0x41ba53:0x43,_0x2dbcb5:0x51,_0x423e0b:0x78,_0x249a56:0x2f,_0x2a06d1:0x7b,_0x16e760:0x84,_0x2cb021:0x31,_0x339225:0x7d,_0x1e6646:0x40,_0x3eaf1f:0x15,_0x3961a8:0x4b,_0x14931f:0x49,_0x326619:0x1e,_0x3e0b89:0x26,_0x535e94:0x1b,_0x4610c4:0x62,_0x13cfce:0x1d,_0x1601f9:0x69},_0x3234bc={_0x3b3b21:0x79};function _0x84ba25(_0x296f8c,_0x87b281,_0x2f78dc,_0x5e311d){return _0x54d5(_0x5e311d- -0x1e4,_0x2f78dc);}function _0x189bb2(_0x44fd9c,_0x42c6e1,_0x51f9be,_0x156753){return _0x54d5(_0x44fd9c- -0x204,_0x156753);}switch(_0x1be977[_0x84ba25(_0xd85ce0._0x447419,_0xd85ce0._0x2cc4df,_0xd85ce0._0x1ff104,_0xd85ce0._0x3fa987)]){case'string':if(typeof _0x2e1c09!==_0x189bb2(0x45,_0xd85ce0._0x2bd013,_0xd85ce0._0x4d5d9f,0x99))throw new Error(_0x84ba25(_0xd85ce0._0x4efe2a,_0xd85ce0._0x5d6dd5,_0xd85ce0._0x3b81eb,_0xd85ce0._0x592ce4)+_0x5e8df3+_0x84ba25(0x49,_0xd85ce0._0x56f66d,_0xd85ce0._0x4d5d9f,_0xd85ce0._0x24a758));return;case'number':if(typeof _0x2e1c09!==_0x189bb2(0x63,0x98,0x36,_0xd85ce0._0x271f51))throw new Error(_0x189bb2(0x31,_0xd85ce0._0xc55126,0x2e,0xc)+_0x5e8df3+_0x189bb2(-0x12,-_0xd85ce0._0x2c3790,-_0xd85ce0._0x5a9c25,-_0xd85ce0._0x16a14e));return;case'boolean':if(typeof _0x2e1c09!==_0x189bb2(-_0xd85ce0._0xdd8c37,-0x4,-0x3e,0x34))throw new Error(_0x84ba25(0x96,0x3d,_0xd85ce0._0x2c3790,0x51)+_0x5e8df3+':\x20expected\x20boolean');return;case _0x189bb2(_0xd85ce0._0x41a5d7,_0xd85ce0._0x5a685d,0x4a,0x3c):if(!Array[_0x189bb2(-0x10,-_0xd85ce0._0x147c5d,-0x62,-_0xd85ce0._0x41ba53)](_0x2e1c09))throw new Error(_0x84ba25(-0x4,-0x9,0x85,_0xd85ce0._0x2dbcb5)+_0x5e8df3+_0x189bb2(0x2f,-0x15,_0xd85ce0._0x423e0b,-0x19));_0x2e1c09[_0x189bb2(0x2,-0x44,0xb,-_0xd85ce0._0x249a56)]((_0x4ba1ec,_0x5cc074)=>{function _0x1e4bdc(_0x1275bf,_0x5b5b3c,_0x15504d,_0x49f0e5){return _0x189bb2(_0x15504d- -0x39,_0x5b5b3c-0x11,_0x15504d-0x190,_0x1275bf);}validateAgainstSchema(_0x5e8df3+'['+_0x5cc074+']',_0x4ba1ec,_0x1be977[_0x1e4bdc(-0x1a,-_0x3234bc._0x3b3b21,-0x64,-0x4a)]);});return;case _0x84ba25(_0xd85ce0._0x2c3790,0xdb,_0xd85ce0._0x2a06d1,_0xd85ce0._0x16e760):if(!isJsonObject(_0x2e1c09))throw new Error(_0x189bb2(_0xd85ce0._0x2cb021,0x34,-0x15,0xf)+_0x5e8df3+_0x189bb2(_0xd85ce0._0x339225,0x3f,_0xd85ce0._0x1e6646,0x40));for(const _0x183ade of _0x1be977[_0x189bb2(0xf,-_0xd85ce0._0x3eaf1f,-_0xd85ce0._0x3961a8,-_0xd85ce0._0x14931f)]??[]){if(!(_0x183ade in _0x2e1c09))throw new Error('Invalid\x20tool\x20input\x20at\x20'+_0x5e8df3+':\x20missing\x20required\x20field\x20\x22'+_0x183ade+'\x22');}for(const [_0x280c92,_0x5a260c]of Object[_0x189bb2(_0xd85ce0._0x326619,_0xd85ce0._0x3e0b89,_0xd85ce0._0x535e94,_0xd85ce0._0x2c3790)](_0x1be977[_0x189bb2(_0xd85ce0._0xc55126,_0xd85ce0._0x4610c4,_0xd85ce0._0x13cfce,_0xd85ce0._0x1601f9)])){_0x280c92 in _0x2e1c09&&validateAgainstSchema(_0x5e8df3+'.'+_0x280c92,_0x2e1c09[_0x280c92],_0x5a260c);}}}function normalizeToolOutputValue(_0x2e7573){const _0x1d9587={_0x21e07b:0xe2,_0x419e64:0xdd,_0x124916:0x74,_0x309e62:0x66,_0x2a4b24:0x2d8,_0x580e9c:0x328,_0x2b0556:0x379,_0x4a327d:0x27,_0x216c89:0xe,_0x113a62:0x36,_0x42465e:0x79,_0x32e8e8:0xa2,_0x39fd81:0xbf,_0x4d6861:0xc9,_0x14fafc:0xcf};if(isToolOutputEnvelope(_0x2e7573))return{'output':_0x2e7573[_0x53f8ef(_0x1d9587._0x21e07b,0x5c,_0x1d9587._0x419e64,0x90)],'structured':_0x2e7573['structured']??{'value':_0x2e7573['output']},..._0x2e7573[_0x53f8ef(0x66,_0x1d9587._0x124916,_0x1d9587._0x309e62,0x4c)]!==void 0x0?{'content':_0x2e7573['content']}:{}};if(typeof _0x2e7573==='string')return{'output':_0x2e7573,'structured':{'value':_0x2e7573}};if(typeof _0x2e7573===_0x44121f(_0x1d9587._0x2a4b24,_0x1d9587._0x580e9c,_0x1d9587._0x2b0556,0x314)&&_0x2e7573!==null&&!Array[_0x53f8ef(_0x1d9587._0x4a327d,-0x12,-_0x1d9587._0x216c89,_0x1d9587._0x113a62)](_0x2e7573))return{'output':JSON[_0x53f8ef(_0x1d9587._0x42465e,0xeb,0xbc,_0x1d9587._0x32e8e8)](_0x2e7573,null,0x2),'structured':_0x2e7573};function _0x53f8ef(_0x274962,_0x37df10,_0x5c7f09,_0x2a1f5e){return _0x54d5(_0x2a1f5e- -0x1be,_0x37df10);}function _0x44121f(_0x4a82d8,_0x4e66fb,_0x3ecdaf,_0x9a34aa){return _0x54d5(_0x4e66fb-0xc0,_0x9a34aa);}return{'output':JSON[_0x53f8ef(_0x1d9587._0x39fd81,_0x1d9587._0x4d6861,_0x1d9587._0x14fafc,0xa2)](_0x2e7573,null,0x2),'structured':{'value':_0x2e7573}};}function createToolOutput(_0x5b7c6b,_0x3a43d0={'value':_0x5b7c6b},_0x216593){return{'output':_0x5b7c6b,'structured':_0x3a43d0,..._0x216593!==void 0x0?{'content':_0x216593}:{}};}var ToolExecutionError=class extends Error{['structured'];constructor(_0xc981f2,_0x46579c={}){const _0x805974={_0x11d96e:0x152,_0xc9476d:0x506,_0x520caf:0x4ff},_0x2d1b14={_0x19a5ef:0x373},_0x121ac1={_0x147b09:0x31c};function _0x320088(_0x215360,_0x5e159b,_0x38366b,_0x52bc78){return _0x54d5(_0x38366b-_0x121ac1._0x147b09,_0x215360);}super(_0xc981f2);function _0xe8a327(_0x5d9cfc,_0x562729,_0x5cd58a,_0x4d3773){return _0x54d5(_0x5d9cfc- -_0x2d1b14._0x19a5ef,_0x5cd58a);}this[_0xe8a327(-0x18f,-0x18e,-_0x805974._0x11d96e,-0x1e4)]=_0x320088(0x4e8,_0x805974._0xc9476d,0x50f,_0x805974._0x520caf),this[_0x320088(0x572,0x560,0x530,0x57b)]=_0x46579c;}};function defineTool(_0x1770c3){return _0x1770c3;}var ToolRegistry=class{['toolsByName']=new Map();constructor(_0x4275f8=[]){for(const _0x5dba20 of _0x4275f8){this['register'](_0x5dba20);}}[_0x2c6ea8(0x19,0x17,-0x2f,-0x4a)](_0x2bf459){const _0x249492={_0xb12ede:0x68,_0x4a9c04:0x17,_0x83f767:0x98,_0x182d56:0x78},_0x48d720={_0x5801be:0x61},_0x345af8={_0x169cd9:0x18d};function _0x2857ce(_0x90bd05,_0x220b7c,_0x38f847,_0x5e99d9){return _0x2c6ea8(_0x90bd05-0x3f,_0x38f847,_0x5e99d9-0x4ca,_0x5e99d9-_0x345af8._0x169cd9);}function _0x3a669f(_0xd24054,_0x3d0ac8,_0x2c9034,_0x1f3df7){return _0x2c6ea8(_0xd24054-0x122,_0x3d0ac8,_0xd24054-_0x48d720._0x5801be,_0x1f3df7-0x1a5);}this[_0x3a669f(-_0x249492._0xb12ede,-_0x249492._0x4a9c04,-0x4f,-0xb2)]['set'](_0x2bf459[_0x3a669f(-0x6d,-0x2c,-_0x249492._0x83f767,-_0x249492._0x182d56)],_0x2bf459);}[_0x2c6ea8(-0x5b,-0xd1,-0x95,-0x59)](_0xb65f1d){const _0x6b1b84={_0x48381c:0x3e8,_0x5ab271:0x40c,_0x566b0c:0x440,_0x5597bc:0x461},_0x33dc73={_0x22418e:0x1aa},_0x4c8d64={_0x40fb76:0x4d5};function _0x4d5190(_0x416fd7,_0x536141,_0x544d4f,_0x593544){return _0x2c6ea8(_0x416fd7-0x1bf,_0x416fd7,_0x536141-_0x4c8d64._0x40fb76,_0x593544-0x13a);}function _0x3fe3f9(_0x59c2d7,_0x3366cd,_0x951b29,_0x2bd5f5){return _0x2c6ea8(_0x59c2d7-_0x33dc73._0x22418e,_0x2bd5f5,_0x59c2d7- -0xc2,_0x2bd5f5-0x3);}return this[_0x4d5190(_0x6b1b84._0x48381c,_0x6b1b84._0x5ab271,0x422,_0x6b1b84._0x566b0c)][_0x4d5190(0x46c,0x440,_0x6b1b84._0x5597bc,0x3f4)](_0xb65f1d);}[_0x2c6ea8(-0xcc,-0x5f,-0xa1,-0xd4)](){const _0x1e646a={_0xdb7445:0x355},_0x3aed5c={_0x5e54f0:0x10a,_0x2970f7:0x3bb,_0x124e7d:0xa2};function _0x20a63e(_0x30b139,_0x323918,_0x1a797c,_0x35b5ba){return _0x2c6ea8(_0x30b139-_0x3aed5c._0x5e54f0,_0x35b5ba,_0x1a797c-_0x3aed5c._0x2970f7,_0x35b5ba-_0x3aed5c._0x124e7d);}return[...this['toolsByName'][_0x20a63e(_0x1e646a._0xdb7445,0x2ac,0x2ff,0x2a7)]()];}[_0x7bf43b(0x13c,0x156,0x1af,0x16e)](){const _0x3d15f3={_0x253982:0x130},_0x55db9f={_0xadecb7:0xc8,_0xb20add:0xc2,_0x32c06a:0x152,_0x5e9a25:0x14b},_0x5c2979={_0x190edb:0x77},_0x2735b4={_0x5e245d:0x1dc,_0x196dd3:0x176};function _0x309205(_0x4289d6,_0x8941d8,_0x3c3d52,_0x448582){return _0x7bf43b(_0x4289d6-0xa4,_0x8941d8,_0x3c3d52-0x6f,_0x448582-0x45);}return this['list']()[_0x309205(_0x3d15f3._0x253982,0xed,0xe9,0x13b)](_0x5034b8=>{function _0x490e94(_0x1ce15f,_0x286f9c,_0x349eba,_0x17965c){return _0x309205(_0x1ce15f-_0x2735b4._0x5e245d,_0x286f9c,_0x349eba-_0x2735b4._0x196dd3,_0x349eba- -0x12d);}function _0x5cd86e(_0x2bed41,_0x309f48,_0x488c9c,_0x33de76){return _0x309205(_0x2bed41-0x189,_0x2bed41,_0x488c9c-0x19d,_0x33de76- -_0x5c2979._0x190edb);}return{'name':_0x5034b8[_0x5cd86e(0x7d,0xa5,_0x55db9f._0xadecb7,_0x55db9f._0xb20add)],'description':_0x5034b8['description'],'input_schema':_0x5034b8[_0x5cd86e(0x162,0x108,_0x55db9f._0x32c06a,_0x55db9f._0x5e9a25)]};});}};function validateToolInput(_0x28ca99,_0x469ec9){const _0x27eb2b={_0x56903e:0x688,_0x347097:0x633},_0x53d3d1={_0x2eaf86:0x1c3,_0x5672ee:0x1d};validateAgainstSchema(_0x322391(0x63f,_0x27eb2b._0x56903e,0x657,_0x27eb2b._0x347097),_0x28ca99,_0x469ec9);function _0x322391(_0x31f857,_0x27f623,_0x4a494a,_0x9f0fb0){return _0x7bf43b(_0x31f857-_0x53d3d1._0x2eaf86,_0x9f0fb0,_0x4a494a-_0x53d3d1._0x5672ee,_0x31f857-0x4af);}return _0x28ca99;}function deriveFinalToolOutput(_0x56b5b1){const _0x23bcfe={_0x3b6a37:0x598,_0x1f8432:0x5d0,_0x88e9b1:0x557,_0x5d6545:0x55f,_0x258e78:0x598,_0xf9f3d1:0x5c7,_0x238c65:0xcb,_0x1efc41:0x136,_0xd56999:0x58c,_0x3baf58:0x578,_0x7c0911:0x545,_0x53e071:0x4eb,_0x2f51ec:0x7b,_0x12c47a:0x82,_0x163b96:0x558,_0x4d301f:0x544,_0x14a9e1:0x5cf,_0x1ef649:0x521,_0x680f06:0x50b,_0x5ae5a5:0x55a},_0x36ac45={_0x21369c:0x140,_0x5e457a:0x159},_0x489c14={_0x37c6c8:0x1e5};if(_0x56b5b1[_0x102f4(0x54c,_0x23bcfe._0x3b6a37,_0x23bcfe._0x1f8432,_0x23bcfe._0x88e9b1)]===0x0)return{'output':'','structured':{}};function _0x102f4(_0x3b091d,_0x410a11,_0x54b1fa,_0x297d90){return _0x7bf43b(_0x3b091d-_0x489c14._0x37c6c8,_0x54b1fa,_0x54b1fa-0x35,_0x410a11-0x42b);}if(_0x56b5b1[_0x102f4(_0x23bcfe._0x5d6545,_0x23bcfe._0x258e78,_0x23bcfe._0xf9f3d1,0x5a5)]===0x1)return{'output':_0x56b5b1[0x0][_0x28d535(0x9a,0xf1,_0x23bcfe._0x238c65,_0x23bcfe._0x1efc41)],'structured':_0x56b5b1[0x0][_0x102f4(0x581,0x54f,_0x23bcfe._0xd56999,0x52f)],..._0x56b5b1[0x0][_0x102f4(_0x23bcfe._0x3baf58,_0x23bcfe._0x7c0911,_0x23bcfe._0x53e071,0x530)]!==void 0x0?{'content':_0x56b5b1[0x0]['content']}:{}};const _0x5999b3=_0x56b5b1['filter'](_0x4efd71=>_0x4efd71[_0x102f4(0x577,0x545,0x579,0x537)]!==void 0x0);function _0x28d535(_0x57f485,_0x8a3216,_0x108cb4,_0x16b6cc){return _0x7bf43b(_0x57f485-_0x36ac45._0x21369c,_0x16b6cc,_0x108cb4-_0x36ac45._0x5e457a,_0x8a3216- -0x6d);}return{'output':_0x56b5b1[_0x28d535(_0x23bcfe._0x2f51ec,0x89,_0x23bcfe._0x12c47a,0x47)](_0x3caf29=>_0x3caf29[_0x28d535(0x142,0xf1,0xc1,0x147)])[_0x102f4(_0x23bcfe._0x163b96,0x59d,_0x23bcfe._0x4d301f,_0x23bcfe._0x14a9e1)](''),'structured':{'chunks':_0x56b5b1[_0x102f4(0x4c5,_0x23bcfe._0x1ef649,_0x23bcfe._0x680f06,0x51f)](_0xf518a5=>_0xf518a5[_0x102f4(0x529,0x54f,0x514,0x59d)])},..._0x5999b3['length']===0x1?{'content':_0x5999b3[0x0][_0x102f4(_0x23bcfe._0x5ae5a5,0x545,0x56c,0x510)]}:{}};}function createToolMeta(){return{'transforms':[]};}function createErrorToolResult(_0x10d2b2,_0x138d9a,_0x434f5b,_0x8e42dc=[]){const _0xe12ded={_0x368246:0x2b6,_0x35d85e:0x2b2,_0x3824bc:0x260},_0x4a88f7={_0x14dc5d:0x153,_0x104721:0x1c2},_0x399367={_0x26348d:0x1b4};function _0x1db796(_0x4c8130,_0x4753d8,_0x375afe,_0x55d27c){return _0x2c6ea8(_0x4c8130-0x43,_0x4753d8,_0x55d27c- -0x23,_0x55d27c-_0x399367._0x26348d);}function _0x3510ab(_0x578e88,_0x331c74,_0xa1b3a8,_0x4fe5a7){return _0x7bf43b(_0x578e88-0x114,_0x4fe5a7,_0xa1b3a8-_0x4a88f7._0x14dc5d,_0xa1b3a8-_0x4a88f7._0x104721);}return{'callId':_0x10d2b2['id'],'toolName':_0x10d2b2[_0x3510ab(0x2b3,0x2e6,_0xe12ded._0x368246,_0xe12ded._0x35d85e)],'status':_0x3510ab(0x277,0x2ad,0x2ac,_0xe12ded._0x3824bc),'output':_0x138d9a,'structured':_0x434f5b,'chunks':_0x8e42dc,'meta':createToolMeta()};}function createRejectedToolResult(_0x132512,_0x29c558){const _0x719089={_0x27c56e:0x1c,_0x4694a0:0x66,_0x30f46d:0x52b,_0x552117:0x538,_0xbd447a:0x4f1,_0x225dea:0x4ec,_0x29efa1:0x550,_0x4fbef3:0xb7},_0x3527a2={_0x5a9dc3:0x606,_0xb10b65:0x198},_0x4d9e2c={_0x441e1c:0x0,_0x4e1002:0x122},_0x5e1ecb=_0x29c558?.[_0x4ce11e(_0x719089._0x27c56e,_0x719089._0x4694a0,0x1a,0x6c)]()['length']?_0x29c558:_0x507b0c(0x526,0x55d,0x541,_0x719089._0x30f46d)+_0x132512[_0x507b0c(0x582,_0x719089._0x552117,_0x719089._0xbd447a,_0x719089._0x225dea)];function _0x4ce11e(_0x1da96d,_0x5f3081,_0x387729,_0x5a81cf){return _0x2c6ea8(_0x1da96d-_0x4d9e2c._0x441e1c,_0x1da96d,_0x5a81cf-_0x4d9e2c._0x4e1002,_0x5a81cf-0x11);}function _0x507b0c(_0x5b0024,_0x566c39,_0x461e0f,_0x3882c1){return _0x2c6ea8(_0x5b0024-0x1e9,_0x461e0f,_0x566c39-_0x3527a2._0x5a9dc3,_0x3882c1-_0x3527a2._0xb10b65);}return createErrorToolResult(_0x132512,_0x5e1ecb,{'error':'tool_rejected',..._0x29c558?.[_0x507b0c(0x501,_0x719089._0x29efa1,0x537,0x503)]()[_0x4ce11e(0x125,0x127,_0x719089._0x4fbef3,0xcd)]?{'reason':_0x29c558}:{}});}function createAbortedToolResult(_0x3021b7,_0x11828d,_0x3e3ff8=[]){const _0x35328b={_0x3a1181:0xa8,_0x38650c:0x38,_0x5f377d:0x379,_0x225c84:0x3ae,_0x46ed6b:0x3a9},_0x2aa2ea={_0x5a3dfb:0x1ed,_0x5b6426:0x45e,_0x5383be:0x1f0},_0x4839b9={_0x146207:0x89,_0x2043b5:0x116};function _0x4595b4(_0x389dca,_0x5e3ca1,_0x15710b,_0x52ff9d){return _0x2c6ea8(_0x389dca-_0x4839b9._0x146207,_0x389dca,_0x5e3ca1-_0x4839b9._0x2043b5,_0x52ff9d-0x133);}function _0x3ddff2(_0x55cfb9,_0x2f2f9c,_0x2c81a1,_0x3ff429){return _0x2c6ea8(_0x55cfb9-_0x2aa2ea._0x5a3dfb,_0x2f2f9c,_0x2c81a1-_0x2aa2ea._0x5b6426,_0x3ff429-_0x2aa2ea._0x5383be);}const _0x3040ef=toAbortError(_0x11828d);return createErrorToolResult(_0x3021b7,_0x3040ef[_0x4595b4(_0x35328b._0x3a1181,0x66,_0x35328b._0x38650c,0x57)],{'error':_0x3040ef[_0x3ddff2(_0x35328b._0x5f377d,0x356,_0x35328b._0x225c84,_0x35328b._0x46ed6b)],'aborted':!![]},_0x3e3ff8);}function createSuccessToolResult(_0x1eb93c,_0x1be0f4,_0x5241c8){const _0x538b9f={_0x403123:0x12e,_0x1b0280:0xc9,_0x4a3b46:0x2c4,_0x571b86:0x144},_0x5694c7={_0x2a5e16:0xc3},_0x3f19a2={_0x45fffa:0x73,_0x40ba05:0x325};function _0x5e55f8(_0x5efb87,_0x194bf5,_0x5696b7,_0x32dc66){return _0x2c6ea8(_0x5efb87-_0x3f19a2._0x45fffa,_0x5696b7,_0x32dc66-_0x3f19a2._0x40ba05,_0x32dc66-0x1f1);}function _0x37992f(_0x1d2cfc,_0x24b32a,_0x5db8fd,_0x3a3d1){return _0x7bf43b(_0x1d2cfc-_0x5694c7._0x2a5e16,_0x24b32a,_0x5db8fd-0xaa,_0x3a3d1- -0x1c);}return{'callId':_0x1eb93c['id'],'toolName':_0x1eb93c[_0x37992f(0xc5,0xa2,_0x538b9f._0x403123,0xd8)],'status':'ok','output':_0x1be0f4['output'],'structured':_0x1be0f4[_0x37992f(0xdc,0xbe,_0x538b9f._0x1b0280,0x108)],..._0x1be0f4[_0x5e55f8(0x2b7,0x2c2,_0x538b9f._0x4a3b46,0x27d)]!==void 0x0?{'content':_0x1be0f4[_0x37992f(0xca,_0x538b9f._0x571b86,0x14a,0xfe)]}:{},'chunks':_0x5241c8,'meta':createToolMeta()};}function createUnknownToolResult(_0x2c0da8){const _0x4dab9b={_0x2e00f5:0x31b,_0x298546:0x29d,_0x91bdf:0x2db,_0x45372e:0x224,_0x5a28b3:0x21b,_0xbfba51:0x26a,_0x126435:0xbc},_0x4547de={_0x2d5e34:0xb5},_0x5e098d={_0x2092c7:0x89,_0x1bcf52:0x176};function _0x36a89d(_0x3e53f0,_0x2f2d1f,_0x41f3fe,_0x172524){return _0x7bf43b(_0x3e53f0-0x66,_0x41f3fe,_0x41f3fe-_0x5e098d._0x2092c7,_0x172524-_0x5e098d._0x1bcf52);}function _0x39d994(_0x48d41d,_0x155e59,_0x541490,_0x249419){return _0x2c6ea8(_0x48d41d-_0x4547de._0x2d5e34,_0x155e59,_0x48d41d- -0x86,_0x249419-0x1b3);}return createErrorToolResult(_0x2c0da8,_0x36a89d(0x2c3,_0x4dab9b._0x2e00f5,_0x4dab9b._0x298546,_0x4dab9b._0x91bdf)+_0x2c0da8[_0x36a89d(0x218,_0x4dab9b._0x45372e,_0x4dab9b._0x5a28b3,_0x4dab9b._0xbfba51)],{'error':_0x39d994(-_0x4dab9b._0x126435,-0x7a,-0x9d,-0x6d)});}function isDispatchDecision(_0x3ef578){const _0x1bccff={_0x33901a:0x525,_0x1daea9:0x55f,_0x56c910:0x4da,_0x9cafd4:0x4e2,_0x39da37:0x585,_0x17c928:0x530,_0x316d76:0x45e,_0x23020a:0x4ba,_0x41005b:0x45d,_0x1c5646:0x4a1},_0x482c52={_0x2f997b:0x144,_0x50675d:0x3e8},_0x386aca={_0x18ed5c:0x141,_0x326ee1:0x54e,_0x27f68c:0x17e};function _0x24412e(_0x5174f4,_0x2ca111,_0x5161d5,_0x41e7a3){return _0x2c6ea8(_0x5174f4-_0x386aca._0x18ed5c,_0x41e7a3,_0x5161d5-_0x386aca._0x326ee1,_0x41e7a3-_0x386aca._0x27f68c);}if(typeof _0x3ef578!==_0x4894c3(_0x1bccff._0x33901a,_0x1bccff._0x1daea9,0x5b3,0x560)||_0x3ef578===null)return![];function _0x4894c3(_0x420d27,_0x470143,_0x3a98dd,_0x5a8c64){return _0x7bf43b(_0x420d27-0x8c,_0x3a98dd,_0x3a98dd-_0x482c52._0x2f997b,_0x5a8c64-_0x482c52._0x50675d);}return _0x3ef578[_0x4894c3(0x49e,0x511,0x485,_0x1bccff._0x56c910)]===_0x4894c3(_0x1bccff._0x9cafd4,0x583,_0x1bccff._0x39da37,_0x1bccff._0x17c928)||_0x3ef578[_0x24412e(_0x1bccff._0x316d76,0x47f,0x47e,0x4c3)]===_0x24412e(_0x1bccff._0x23020a,_0x1bccff._0x41005b,_0x1bccff._0x1c5646,0x46d);}function normalizeExecutionError(_0x17d623){const _0x3ceb9b={_0x1d042e:0x1c4,_0x45c397:0x1c6,_0x53384d:0x1ab,_0x22ab10:0x1a5,_0x83261a:0x2e7,_0x3f6dce:0x324,_0x2650e1:0x2f2},_0x477f98={_0xb046c6:0x86,_0x16e668:0x3a2,_0x4a3283:0x99},_0xe8f26f={_0x259fec:0xf5};if(_0x17d623 instanceof ToolExecutionError)return{'errorMessage':_0x17d623[_0x33f367(-0x177,-_0x3ceb9b._0x1d042e,-0x1a5,-0x1e3)],'structured':{'error':_0x17d623[_0x33f367(-_0x3ceb9b._0x45c397,-_0x3ceb9b._0x53384d,-_0x3ceb9b._0x22ab10,-0x18a)],..._0x17d623[_0x2b2184(_0x3ceb9b._0x83261a,0x340,0x34f,0x304)]}};function _0x33f367(_0x30732d,_0x268299,_0x415288,_0x2c5592){return _0x2c6ea8(_0x30732d-0x128,_0x30732d,_0x415288- -_0xe8f26f._0x259fec,_0x2c5592-0x1a8);}function _0x2b2184(_0x4c745f,_0x273435,_0x343ceb,_0x470605){return _0x2c6ea8(_0x4c745f-_0x477f98._0xb046c6,_0x343ceb,_0x470605-_0x477f98._0x16e668,_0x470605-_0x477f98._0x4a3283);}if(_0x17d623 instanceof Error)return{'errorMessage':_0x17d623['message'],'structured':{'error':_0x17d623[_0x2b2184(_0x3ceb9b._0x3f6dce,0x343,0x2c1,_0x3ceb9b._0x2650e1)]}};const _0x231dae=String(_0x17d623);return{'errorMessage':_0x231dae,'structured':{'error':_0x231dae}};}async function emitEvent(_0xf83611,_0x5d4020,_0x4259c0){await _0xf83611?.(_0x5d4020,_0x4259c0);}async function resolveDispatchDecision(_0x52ecdf,_0xcf915a,_0x35da72){const _0x2fcb08={_0x583ff1:0x3ff,_0x236ed5:0x3b5,_0x21213a:0x45c,_0x2741b2:0x44b,_0x40e15c:0x3f2,_0x13ddb6:0x3b1,_0x5446df:0x473,_0x79a702:0x482,_0x1adb80:0x444},_0x5948f0={_0x13a97:0x1e4},_0x28527f={_0xc3f398:0x22d,_0x131229:0x1ed,_0x34c905:0x248,_0x233d71:0x2a1,_0x18de4b:0x229,_0xc37a19:0x41e,_0x2d6545:0x3f0,_0x37b56e:0x259,_0x4b9302:0x228,_0x2e4c24:0x285,_0x55c34e:0x442,_0x4a0007:0x433},_0x15d35f={_0x3c1f23:0x12,_0x8c0b7c:0x135,_0x292932:0x181},_0x1cd824={_0x16f7b2:0x2dd};if(!_0x52ecdf)return{'action':'run'};function _0x4a64b0(_0x2f5c45,_0x41d715,_0x2fecda,_0x526a06){return _0x7bf43b(_0x2f5c45-0xb6,_0x2f5c45,_0x2fecda-0xc2,_0x41d715-_0x1cd824._0x16f7b2);}const _0x58255f=Promise[_0x4a64b0(_0x2fcb08._0x583ff1,0x3fa,0x433,_0x2fcb08._0x236ed5)]()[_0x4a64b0(0x483,0x463,_0x2fcb08._0x21213a,_0x2fcb08._0x2741b2)](()=>_0x52ecdf(_0xcf915a,_0x35da72));if(!_0x35da72['signal']){const _0x49197e=await _0x58255f;return isDispatchDecision(_0x49197e)?_0x49197e:{'action':_0x4a64b0(0x402,_0x2fcb08._0x40e15c,_0x2fcb08._0x13ddb6,0x43b)};}const _0x36b351=new Promise((_0x27a2b7,_0xe90766)=>{const _0x37cea5={_0x15b732:0xe5,_0xd18320:0xd5,_0x3341c6:0x99,_0x3dc736:0xf6,_0xe0c2bc:0x95},_0x509257=()=>{function _0x4cb33(_0x11df93,_0x56dd69,_0x49bab9,_0x58d4f3){return _0x54d5(_0x49bab9- -0x304,_0x11df93);}function _0x5db46e(_0x1ee2ff,_0x2cfe55,_0x1d5242,_0x56ca64){return _0x54d5(_0x56ca64- -0x72,_0x2cfe55);}_0x35da72[_0x4cb33(-0x13b,-0xaf,-_0x37cea5._0x15b732,-0x8a)]?.[_0x4cb33(-_0x37cea5._0xd18320,-0x136,-0x12e,-0x164)](_0x4cb33(-0xd8,-0x73,-0xc1,-_0x37cea5._0x3341c6),_0x509257),_0xe90766(toAbortError(_0x35da72[_0x4cb33(-0x134,-0xd3,-_0x37cea5._0x15b732,-_0x37cea5._0x3dc736)]?.[_0x4cb33(-_0x37cea5._0xe0c2bc,-0x45,-0x9e,-0xad)]));};if(_0x35da72[_0x3f74d2(0x44a,0x41e,0x3df,0x467)]?.[_0xd7b8fe(_0x28527f._0xc3f398,0x1ea,0x20a,_0x28527f._0x131229)]){_0xe90766(toAbortError(_0x35da72[_0xd7b8fe(0x201,0x1bc,0x1e1,0x1af)][_0xd7b8fe(_0x28527f._0x34c905,_0x28527f._0x233d71,_0x28527f._0x18de4b,0x243)]));return;}function _0xd7b8fe(_0x246c6d,_0x55bba8,_0x44c39c,_0x231421){return _0x50ffdc(_0x246c6d-0x150,_0x55bba8-0x2f,_0x44c39c-0x155,_0x55bba8);}function _0x3f74d2(_0x1f9af5,_0x66d4b6,_0x1f1ff9,_0x4a49ce){return _0x4a64b0(_0x1f9af5,_0x66d4b6-_0x15d35f._0x3c1f23,_0x1f1ff9-_0x15d35f._0x8c0b7c,_0x4a49ce-_0x15d35f._0x292932);}_0x35da72[_0x3f74d2(0x3d6,_0x28527f._0xc37a19,0x405,_0x28527f._0x2d6545)]?.[_0xd7b8fe(_0x28527f._0x37b56e,0x27b,_0x28527f._0x4b9302,_0x28527f._0x2e4c24)](_0x3f74d2(0x487,_0x28527f._0x55c34e,0x42e,_0x28527f._0x4a0007),_0x509257,{'once':!![]});});function _0x50ffdc(_0x575a72,_0x1ad743,_0x56caf9,_0x4eb7f6){return _0x2c6ea8(_0x575a72-0x52,_0x4eb7f6,_0x575a72-0x144,_0x4eb7f6-_0x5948f0._0x13a97);}const _0xbb92d4=await Promise[_0x4a64b0(_0x2fcb08._0x5446df,0x437,_0x2fcb08._0x79a702,_0x2fcb08._0x1adb80)]([_0x58255f,_0x36b351]);return isDispatchDecision(_0xbb92d4)?_0xbb92d4:{'action':'run'};}async function executeToolCall(_0xc83bb,_0x386388,_0x3f5264,_0xd101f6,_0xe22657){const _0x10c814={_0xd3d35f:0x47f,_0x430521:0x42b,_0x34db56:0x53f,_0x5c69dd:0x53e,_0x40075b:0x4f8,_0x4a1f33:0x51a,_0x451a0e:0x4f1,_0x39e821:0x442,_0xf56a75:0x3f0,_0x1d05e6:0x454,_0x20728e:0x5a2,_0x25fca9:0x575,_0x539079:0x585,_0x3c2f2b:0x578,_0x24a711:0x562,_0x2bc040:0x422,_0x181c48:0x47d,_0xd022de:0x4d4,_0x14635e:0x49f,_0x2c1bfd:0x468,_0x1500da:0x45d,_0x5af45c:0x59f,_0x259b61:0x489,_0x430a89:0x474,_0x3d95b0:0x444,_0x5e7d45:0x4f0,_0x51882e:0x4cd,_0x31e701:0x4e4,_0x2bc021:0x555,_0x39cfd7:0x51f,_0x95befc:0x515,_0x55d444:0x455,_0x57706e:0x46e,_0x3481e5:0x461,_0x397329:0x56a,_0x5d464e:0x4f2,_0x1d15c3:0x51b,_0x30e4cb:0x557,_0x291aee:0x55b,_0x55df80:0x43f,_0xcc0207:0x472,_0x5e90ce:0x45a,_0x2f0825:0x497,_0x51034d:0x44b,_0xa2dd57:0x56f,_0xddf917:0x520,_0x3433de:0x559,_0x5ba89f:0x46b,_0x4c75b0:0x4b9,_0x8e6fd5:0x485,_0x3a3641:0x4ba,_0x17fc4d:0x4da,_0x4b0850:0x48f,_0x2525ed:0x443,_0x11aad0:0x502,_0x1e2327:0x569},_0x35bf26={_0x5139e6:0x4ff,_0x15c203:0x468,_0x2bab84:0x19,_0x6a08f2:0x2d},_0x5638fb={_0x1b8fbb:0x350},_0x44589e={..._0x3f5264,'toolCallId':_0x386388['id']};throwIfAborted(_0x44589e[_0x5763d3(0x4bb,_0x10c814._0xd3d35f,_0x10c814._0x430521,0x4d9)]);let _0x16a419;try{_0x16a419=await resolveDispatchDecision(_0xd101f6,_0x386388,_0x44589e);}catch(_0x2fb6d9){if(isAbortError(_0x2fb6d9)){const _0x1aa520=createAbortedToolResult(_0x386388,_0x2fb6d9);return await emitEvent(_0xe22657,{'type':'tool_completed','toolCall':_0x386388,'result':_0x1aa520},_0x44589e),_0x1aa520;}const {errorMessage:_0x275041,structured:_0x2eadc9}=normalizeExecutionError(_0x2fb6d9),_0x518469=createErrorToolResult(_0x386388,_0x275041,_0x2eadc9);return await emitEvent(_0xe22657,{'type':_0x1d9c27(_0x10c814._0x34db56,_0x10c814._0x5c69dd,_0x10c814._0x40075b,_0x10c814._0x4a1f33),'toolCall':_0x386388,'result':_0x518469},_0x44589e),_0x518469;}throwIfAborted(_0x44589e[_0x1d9c27(_0x10c814._0x451a0e,0x52e,0x4d4,0x534)]);function _0x5763d3(_0x61171,_0x32b507,_0x7c1bb6,_0x2eb24e){return _0x7bf43b(_0x61171-0x1a4,_0x61171,_0x7c1bb6-0x127,_0x32b507-_0x5638fb._0x1b8fbb);}if(_0x16a419[_0x5763d3(0x448,_0x10c814._0x39e821,_0x10c814._0xf56a75,_0x10c814._0x1d05e6)]===_0x1d9c27(0x520,0x547,0x506,_0x10c814._0x20728e)){const _0x2eb984=createRejectedToolResult(_0x386388,_0x16a419[_0x1d9c27(0x565,_0x10c814._0x25fca9,_0x10c814._0x539079,_0x10c814._0x3c2f2b)]);return await emitEvent(_0xe22657,{'type':_0x1d9c27(0x51b,_0x10c814._0x24a711,0x53b,0x568),'toolCall':_0x386388,'result':_0x2eb984},_0x44589e),_0x2eb984;}const _0x2dcd02=_0xc83bb[_0x5763d3(_0x10c814._0x2bc040,_0x10c814._0x181c48,_0x10c814._0xd022de,_0x10c814._0x14635e)](_0x386388[_0x5763d3(_0x10c814._0x2c1bfd,0x444,_0x10c814._0x1500da,0x42b)]);if(!_0x2dcd02){const _0x68729d=createUnknownToolResult(_0x386388);return await emitEvent(_0xe22657,{'type':'tool_completed','toolCall':_0x386388,'result':_0x68729d},_0x44589e),_0x68729d;}function _0x1d9c27(_0x383624,_0x24f203,_0x44de91,_0x46b3a1){return _0x7bf43b(_0x383624-0x1ce,_0x46b3a1,_0x44de91-0x1a3,_0x24f203-0x3ff);}throwIfAborted(_0x44589e['signal']),await emitEvent(_0xe22657,{'type':_0x1d9c27(0x577,0x55b,_0x10c814._0x5af45c,0x52f),'toolCall':_0x386388},_0x44589e);try{throwIfAborted(_0x44589e[_0x5763d3(_0x10c814._0x259b61,0x47f,_0x10c814._0x430a89,_0x10c814._0x3d95b0)]);const _0x2925df=validateToolInput(_0x386388['input'],_0x2dcd02[_0x5763d3(_0x10c814._0x5e7d45,_0x10c814._0x51882e,0x50f,_0x10c814._0x31e701)]),_0xde0f17=await _0x2dcd02[_0x1d9c27(0x526,_0x10c814._0x2bc021,0x54c,_0x10c814._0x39cfd7)](_0x2925df,_0x44589e),_0x36e97a=[],_0x299973=addAbortListener(_0x44589e['signal'],()=>{const _0x2f5685={_0x5cfd04:0x26};function _0x198976(_0x2f28de,_0x4336a5,_0x3a28b1,_0x506973){return _0x5763d3(_0x2f28de,_0x506973- -0x453,_0x3a28b1-0xd6,_0x506973-0x21);}function _0x21a6c1(_0x232de4,_0x556b5a,_0x57c84a,_0x4a1d9d){return _0x5763d3(_0x232de4,_0x4a1d9d- -_0x2f5685._0x5cfd04,_0x57c84a-0x6f,_0x4a1d9d-0xbd);}void _0xde0f17[_0x21a6c1(_0x35bf26._0x5139e6,0x4ca,_0x35bf26._0x15c203,0x4c1)](void 0x0)[_0x198976(_0x35bf26._0x2bab84,0x55,-0x22,_0x35bf26._0x6a08f2)](()=>{});});try{throwIfAborted(_0x44589e[_0x1d9c27(0x57e,0x52e,_0x10c814._0x95befc,0x4df)]);let _0x176cf2=await _0xde0f17['next']();while(!_0x176cf2[_0x5763d3(0x40a,_0x10c814._0x55d444,0x459,_0x10c814._0x57706e)]){throwIfAborted(_0x44589e[_0x5763d3(_0x10c814._0x3481e5,_0x10c814._0xd3d35f,0x4b9,0x4b4)]);const _0x405fc0=normalizeToolOutputValue(_0x176cf2[_0x1d9c27(_0x10c814._0x397329,0x51a,0x4c8,_0x10c814._0x5d464e)]);_0x36e97a[_0x1d9c27(0x574,_0x10c814._0x1d15c3,_0x10c814._0x30e4cb,_0x10c814._0x291aee)](_0x405fc0),await emitEvent(_0xe22657,{'type':'tool_output_chunk','toolCall':_0x386388,'chunk':_0x405fc0},_0x44589e),throwIfAborted(_0x44589e[_0x5763d3(_0x10c814._0x55df80,0x47f,_0x10c814._0xcc0207,0x4be)]),_0x176cf2=await _0xde0f17[_0x5763d3(0x441,_0x10c814._0x5e90ce,_0x10c814._0x2f0825,_0x10c814._0x51034d)]();}throwIfAborted(_0x44589e['signal']);const _0x5be9ac=_0x176cf2[_0x1d9c27(_0x10c814._0xa2dd57,_0x10c814._0x4a1f33,_0x10c814._0xddf917,_0x10c814._0x3433de)]===void 0x0?deriveFinalToolOutput(_0x36e97a):normalizeToolOutputValue(_0x176cf2[_0x5763d3(0x45b,_0x10c814._0x5ba89f,_0x10c814._0x4c75b0,_0x10c814._0x8e6fd5)]),_0x5de228=createSuccessToolResult(_0x386388,_0x5be9ac,_0x36e97a);return await emitEvent(_0xe22657,{'type':_0x5763d3(0x460,0x48f,0x4e8,_0x10c814._0x3a3641),'toolCall':_0x386388,'result':_0x5de228},_0x44589e),_0x5de228;}catch(_0x5e92f5){if(isAbortError(_0x5e92f5)){const _0x2d4b19=createAbortedToolResult(_0x386388,_0x5e92f5,_0x36e97a);return await emitEvent(_0xe22657,{'type':_0x5763d3(_0x10c814._0x17fc4d,_0x10c814._0x4b0850,_0x10c814._0x2525ed,0x4ad),'toolCall':_0x386388,'result':_0x2d4b19},_0x44589e),_0x2d4b19;}const {errorMessage:_0x37ca96,structured:_0x5654d5}=normalizeExecutionError(_0x5e92f5),_0x155250=createErrorToolResult(_0x386388,_0x37ca96,_0x5654d5,_0x36e97a);return await emitEvent(_0xe22657,{'type':'tool_completed','toolCall':_0x386388,'result':_0x155250},_0x44589e),_0x155250;}finally{_0x299973();}}catch(_0x536a67){if(isAbortError(_0x536a67)){const _0x3a9e62=createAbortedToolResult(_0x386388,_0x536a67);return await emitEvent(_0xe22657,{'type':_0x1d9c27(_0x10c814._0x11aad0,0x53e,_0x10c814._0x1e2327,0x518),'toolCall':_0x386388,'result':_0x3a9e62},_0x44589e),_0x3a9e62;}const {errorMessage:_0x5eb58f,structured:_0x29b9f5}=normalizeExecutionError(_0x536a67),_0x1cd5cd=createErrorToolResult(_0x386388,_0x5eb58f,_0x29b9f5);return await emitEvent(_0xe22657,{'type':_0x5763d3(0x4a1,_0x10c814._0x4b0850,0x44e,0x460),'toolCall':_0x386388,'result':_0x1cd5cd},_0x44589e),_0x1cd5cd;}}function createInternalToolRuntime(_0xd841b4=[],_0x2fa8f2={}){const _0x40e9b1={_0x39c5e1:0x15a,_0x36d467:0x11e},_0x4430f2={_0x5bfbd3:0x53d,_0x1c58f1:0x5b7,_0x49d340:0x496,_0x221358:0x45f},_0x382f08={_0x2e1753:0x324},_0xb5bbd3={_0x406755:0xf8,_0x1ed01c:0xaf};let _0x1934dc=new ToolRegistry(_0xd841b4);return{'listToolSchemas'(){function _0x159c46(_0x518cbb,_0xf38dc,_0x4428fb,_0x19c30d){return _0x54d5(_0x518cbb- -0x166,_0xf38dc);}return _0x1934dc[_0x159c46(_0xb5bbd3._0x406755,0xda,_0xb5bbd3._0x1ed01c,0xcb)]();},'setTools'(_0x8d7eaa){_0x1934dc=new ToolRegistry(_0x8d7eaa);},async 'executeCalls'(_0x13b9e7,_0x465a5a){const _0x2154a0={_0x213734:0x144,_0x5622fb:0x114,_0x50bc30:0x132,_0x59f27d:0x182};function _0x1ec5f0(_0x401684,_0x25aa54,_0x2daea1,_0x350e87){return _0x54d5(_0x2daea1-_0x382f08._0x2e1753,_0x350e87);}function _0x3349a3(_0x5b8acd,_0x59b079,_0x7fbef1,_0x44bc77){return _0x54d5(_0x59b079-0x279,_0x5b8acd);}return await Promise[_0x1ec5f0(_0x4430f2._0x5bfbd3,0x57c,0x58f,_0x4430f2._0x1c58f1)](_0x13b9e7[_0x3349a3(_0x4430f2._0x49d340,_0x4430f2._0x221358,_0x4430f2._0x221358,0x43c)](async _0xe706c1=>{const _0xb20571={_0x320e2a:0x134,_0x10cc95:0x7a};function _0x7239dc(_0x305b4e,_0x417613,_0x50622f,_0x3e2645){return _0x3349a3(_0x305b4e,_0x3e2645- -0x61c,_0x50622f-_0xb20571._0x320e2a,_0x3e2645-_0xb20571._0x10cc95);}function _0xcfe779(_0x4434ba,_0x25735d,_0x1e03ad,_0x2935e1){return _0x1ec5f0(_0x4434ba-0x50,_0x25735d-0xed,_0x25735d- -0x110,_0x4434ba);}return await executeToolCall(_0x1934dc,_0xe706c1,_0x465a5a,_0x2fa8f2[_0x7239dc(-_0x2154a0._0x213734,-0x10e,-_0x2154a0._0x5622fb,-_0x2154a0._0x50bc30)],_0x2fa8f2[_0x7239dc(-_0x2154a0._0x59f27d,-0x16b,-0x10e,-0x13f)]);}));},async 'execute'(_0x3e6c04,_0x47218e){const _0x27acf3={_0x2d4999:0x397},[_0x2346de]=await this[_0x438570(-_0x40e9b1._0x39c5e1,-_0x40e9b1._0x36d467,-0x13a,-0x134)]([_0x3e6c04],_0x47218e);function _0x438570(_0x59f2b5,_0x32e62e,_0x23fc9b,_0x1fe666){return _0x54d5(_0x1fe666- -_0x27acf3._0x2d4999,_0x23fc9b);}return _0x2346de;}};}function getOrderedObserverExtensions(_0x2b784f,_0x280f11){const _0x3b009c={_0x430405:0x3b7},_0x4a453e={_0x464f56:0x1b1,_0x5aaa22:0x170,_0x2b3e2e:0x111,_0xf47aa6:0x15a,_0xbf9f59:0x1b5,_0x45ff2c:0x179,_0x5b3b73:0x187,_0x49fb55:0x143,_0x4641c6:0x15e},_0x27ffe2={_0x1cd27a:0x0},_0x426880={_0x28408f:0x113};function _0xc17d5d(_0x43c45b,_0x424b04,_0x2992a8,_0x522fc5){return _0x7bf43b(_0x43c45b-0x1d6,_0x43c45b,_0x2992a8-_0x426880._0x28408f,_0x522fc5-0xe9);}function _0x5d2f4c(_0x4d5271,_0x157cc1,_0x873f5a,_0x9f13ac){return _0x2c6ea8(_0x4d5271-0x18c,_0x157cc1,_0x4d5271-0x3ff,_0x9f13ac-_0x27ffe2._0x1cd27a);}return _0x2b784f['filter'](_0x38fd37=>{const _0x168cc3={_0x53b7ba:0x376},_0x23a3f7={_0x47f6e5:0xd0};function _0x31fd62(_0x3b49a5,_0xbdf8fb,_0x2a6251,_0x1e933a){return _0x54d5(_0x2a6251- -_0x23a3f7._0x47f6e5,_0x3b49a5);}function _0x51dc22(_0x3041f7,_0x566a8b,_0x3d7c15,_0x1abf8f){return _0x54d5(_0x566a8b- -_0x168cc3._0x53b7ba,_0x1abf8f);}return _0x38fd37['enabled']!==![]&&_0x38fd37[_0x31fd62(_0x4a453e._0x464f56,0x182,0x181,_0x4a453e._0x5aaa22)]===_0x280f11&&_0x38fd37[_0x31fd62(0x103,_0x4a453e._0x2b3e2e,_0x4a453e._0xf47aa6,_0x4a453e._0xbf9f59)]===_0x51dc22(-_0x4a453e._0x45ff2c,-_0x4a453e._0x5b3b73,-_0x4a453e._0x49fb55,-_0x4a453e._0x4641c6);})[_0x5d2f4c(0x394,0x345,_0x3b009c._0x430405,0x38b)]((_0x27addb,_0x1a6f89)=>_0x27addb['order']-_0x1a6f89[_0x5d2f4c(0x31f,0x311,0x304,0x2f9)]);}function _0x54d5(_0x4d8cc1,_0x57fbb5){_0x4d8cc1=_0x4d8cc1-0x1d1;const _0x5299cc=_0x5299();let _0x54d547=_0x5299cc[_0x4d8cc1];if(_0x54d5['opSYoF']===undefined){var _0x1002e4=function(_0x1bbeba){const _0xaba046='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x40e9f='',_0xc75e4d='';for(let _0x412f6b=0x0,_0x5e8df3,_0x2e1c09,_0x1be977=0x0;_0x2e1c09=_0x1bbeba['charAt'](_0x1be977++);~_0x2e1c09&&(_0x5e8df3=_0x412f6b%0x4?_0x5e8df3*0x40+_0x2e1c09:_0x2e1c09,_0x412f6b++%0x4)?_0x40e9f+=String['fromCharCode'](0xff&_0x5e8df3>>(-0x2*_0x412f6b&0x6)):0x0){_0x2e1c09=_0xaba046['indexOf'](_0x2e1c09);}for(let _0x4ba1ec=0x0,_0x5cc074=_0x40e9f['length'];_0x4ba1ec<_0x5cc074;_0x4ba1ec++){_0xc75e4d+='%'+('00'+_0x40e9f['charCodeAt'](_0x4ba1ec)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0xc75e4d);};_0x54d5['UQXHCl']=_0x1002e4,_0x54d5['bAPAaV']={},_0x54d5['opSYoF']=!![];}const _0xb17667=_0x5299cc[0x0],_0x1333cf=_0x4d8cc1+_0xb17667,_0x4d9901=_0x54d5['bAPAaV'][_0x1333cf];return!_0x4d9901?(_0x54d547=_0x54d5['UQXHCl'](_0x54d547),_0x54d5['bAPAaV'][_0x1333cf]=_0x54d547):_0x54d547=_0x4d9901,_0x54d547;}function getOrderedTransformerExtensions(_0x12005e,_0x423e7c){const _0x57a6c6={_0x4b7314:0x17f,_0x487dab:0x1db,_0x33eaf6:0x1d0},_0x40736f={_0x40cbe3:0x17f,_0xf37bd0:0x1aa,_0x3911c1:0x1b2},_0x1da2e8={_0x47ef11:0x105},_0xbc0fa0={_0x1a7cbf:0x1e0,_0x3343ea:0x42,_0x4fe755:0x35},_0x48dda8={_0x1838e9:0x23e,_0x141fa0:0x16c};function _0x1ad134(_0x229142,_0xe9e024,_0x431ee9,_0x2ebf87){return _0x2c6ea8(_0x229142-0x70,_0xe9e024,_0x229142-_0x48dda8._0x1838e9,_0x2ebf87-_0x48dda8._0x141fa0);}function _0x4897b8(_0x49404a,_0x17aa9e,_0x8fabce,_0x2c9ff7){return _0x7bf43b(_0x49404a-_0xbc0fa0._0x1a7cbf,_0x17aa9e,_0x8fabce-_0xbc0fa0._0x3343ea,_0x8fabce-_0xbc0fa0._0x4fe755);}return _0x12005e[_0x4897b8(_0x57a6c6._0x4b7314,_0x57a6c6._0x487dab,0x1bd,_0x57a6c6._0x33eaf6)](_0x512e63=>{function _0x35e47d(_0xb96bdf,_0x13900c,_0x281da9,_0x3bf9bf){return _0x4897b8(_0xb96bdf-0x1b2,_0x13900c,_0x281da9-0x3b,_0x3bf9bf-_0x1da2e8._0x47ef11);}return _0x512e63['enabled']!==![]&&_0x512e63['stage']===_0x423e7c&&_0x512e63[_0x35e47d(0x1c8,_0x40736f._0x40cbe3,_0x40736f._0xf37bd0,_0x40736f._0x3911c1)]==='transformer';})[_0x1ad134(0x1d3,0x190,0x1ba,0x201)]((_0xb59761,_0x3c9135)=>_0xb59761[_0x4897b8(0x12c,0xc8,0x117,0x15f)]-_0x3c9135[_0x1ad134(0x15e,0x15c,0x133,0x12d)]);}function createExtensionRegistry(){const _0x5c3810={_0x49026f:0xe9,_0x2a1c29:0x92},_0x7db0ae={_0x22f954:0x296},_0xe30ef9={_0x5d1896:0x33b,_0x2919f9:0x3a8},_0x3575f5={_0x1d9e57:0x177},_0x5c87ae={_0x2a76bf:0x566,_0x5befd9:0x51f},_0x17b9f8=[];return{'register'(_0x561288){function _0x4ea96e(_0x401a0b,_0x5c2468,_0x4a4cfc,_0x2f1922){return _0x54d5(_0x4a4cfc-0x35a,_0x5c2468);}_0x17b9f8[_0x4ea96e(0x51a,0x525,_0x5c87ae._0x2a76bf,_0x5c87ae._0x5befd9)](_0x561288);},async 'runTransformers'(_0x1ccef4,_0xa0826f,_0x26c7a5){let _0x12df2e=_0xa0826f;function _0x4584c0(_0x2f5ee0,_0x436a8d,_0x42c18c,_0x5aa498){return _0x54d5(_0x42c18c-_0x3575f5._0x1d9e57,_0x2f5ee0);}for(const _0x5e657f of getOrderedTransformerExtensions(_0x17b9f8,_0x1ccef4)){_0x12df2e=await _0x5e657f[_0x4584c0(0x3a2,_0xe30ef9._0x5d1896,0x37c,_0xe30ef9._0x2919f9)](_0x12df2e,_0x26c7a5);}return _0x12df2e;},async 'runObservers'(_0x15a70e,_0x1fec68,_0x510a68){function _0x415edf(_0x29c03e,_0x5c3a4f,_0x1f79a8,_0x385695){return _0x54d5(_0x385695- -_0x7db0ae._0x22f954,_0x1f79a8);}for(const _0x389da2 of getOrderedObserverExtensions(_0x17b9f8,_0x15a70e)){await _0x389da2[_0x415edf(-_0x5c3810._0x49026f,-0x70,-_0x5c3810._0x2a1c29,-0x91)](_0x1fec68,_0x510a68);}}};}function createEmptySnapshot(){return{'totalTokens':0x0,'totalInputTokens':0x0,'totalOutputTokens':0x0,'totalReasoningTokens':0x0,'requestCount':0x0,'modelCallCount':0x0,'toolCallCount':0x0,'totalModelTimeMs':0x0,'currentTokens':0x0,'currentInputTokens':0x0,'currentOutputTokens':0x0,'currentReasoningTokens':0x0,'currentModelTimeMs':0x0};}function createAgentMetrics(_0x26b972={}){const _0x189ae9={_0xb4d093:0x1f6,_0x45d6a1:0x177,_0x1e07e4:0x1ba,_0x2b8917:0x2b1,_0x48b1ea:0x31f,_0x564264:0x309,_0x3fab07:0x1b3,_0x55394c:0x186,_0x3ce872:0x1e9,_0x6071cd:0x2ba,_0x38ae2a:0x271,_0x1fe4a4:0x302,_0x35d46c:0x19f,_0x4847dc:0x179,_0x4a5067:0x338,_0x32ca32:0x2ed,_0x131eda:0x172,_0x1b4a05:0x13e,_0x4e666c:0x2d4,_0x547a32:0x32f,_0x34f7b7:0x2cc,_0x11cfe2:0x2f2,_0x295f69:0x2df,_0x366a3d:0x2be,_0x4e5edc:0x16d,_0x393fa2:0x1ab,_0x23e8bd:0x29b,_0x229c35:0x2b4,_0x5ae4ca:0x2b2,_0x3376ad:0x28f,_0x21fcd0:0x258,_0x319d72:0x190,_0x71bbe6:0x1cb,_0x3c7b22:0x37a,_0x57f86e:0x329,_0x32b4cd:0x179,_0x2fad00:0x2a7,_0x5afdd7:0x25e};let _0x41061f=createEmptySnapshot();const _0x546e8a=new Set();let _0x13b71a;const _0xd32cb6=()=>{const _0xd22e63={..._0x41061f};for(const _0x44f71b of _0x546e8a)_0x44f71b(_0xd22e63);};return{'getSnapshot'(){return{..._0x41061f};},'recordEvent'(_0x7a746a){const _0x485c00={_0x333a9a:0x3aa};function _0x11cf19(_0x11c74a,_0x1446f1,_0x394f16,_0x303e95){return _0x54d5(_0x303e95-0xb7,_0x394f16);}if(_0x7a746a[_0x3d90f2(-_0x189ae9._0xb4d093,-_0x189ae9._0x45d6a1,-_0x189ae9._0x1e07e4,-0x18a)]===_0x11cf19(_0x189ae9._0x2b8917,_0x189ae9._0x48b1ea,0x2f7,_0x189ae9._0x564264)){_0x13b71a=Date[_0x3d90f2(-0x1e3,-0x16f,-_0x189ae9._0x3fab07,-0x1e6)]();const _0x48592c=_0x26b972[_0x3d90f2(-_0x189ae9._0x55394c,-0x19c,-0x1b1,-_0x189ae9._0x3ce872)]?.(_0x7a746a['request']);_0x48592c!==void 0x0&&(_0x41061f={..._0x41061f,'contextWindowLimit':_0x48592c},_0xd32cb6());return;}if(_0x7a746a[_0x11cf19(_0x189ae9._0x6071cd,_0x189ae9._0x38ae2a,_0x189ae9._0x1fe4a4,0x2a7)]===_0x11cf19(0x367,0x36d,0x342,0x32a)){const _0x1fbd40=_0x7a746a[_0x3d90f2(-0x13e,-_0x189ae9._0x35d46c,-0x145,-0x116)]['usage'][_0x3d90f2(-0x1a8,-_0x189ae9._0x4847dc,-0x185,-0x1dd)],_0x44e1ec=_0x7a746a['response'][_0x11cf19(_0x189ae9._0x4a5067,_0x189ae9._0x32ca32,0x2ed,0x2f2)][_0x3d90f2(-0x181,-_0x189ae9._0x131eda,-0x168,-_0x189ae9._0x1b4a05)],_0xa494de=_0x7a746a['response'][_0x11cf19(_0x189ae9._0x4e666c,_0x189ae9._0x547a32,_0x189ae9._0x34f7b7,_0x189ae9._0x11cfe2)][_0x11cf19(_0x189ae9._0x295f69,_0x189ae9._0x366a3d,0x285,0x2a8)]??0x0,_0x3e39af=_0x1fbd40+_0x44e1ec,_0x1f1474=_0x13b71a===void 0x0?0x0:Date['now']()-_0x13b71a;_0x13b71a=void 0x0,_0x41061f={..._0x41061f,'totalTokens':_0x41061f['totalTokens']+_0x3e39af,'totalInputTokens':_0x41061f['totalInputTokens']+_0x1fbd40,'totalOutputTokens':_0x41061f['totalOutputTokens']+_0x44e1ec,'totalReasoningTokens':_0x41061f[_0x3d90f2(-_0x189ae9._0x4e5edc,-0x167,-_0x189ae9._0x393fa2,-0x1e5)]+_0xa494de,'modelCallCount':_0x41061f[_0x11cf19(0x2c2,_0x189ae9._0x23e8bd,_0x189ae9._0x229c35,0x2ed)]+0x1,'totalModelTimeMs':_0x41061f['totalModelTimeMs']+_0x1f1474,'currentTokens':_0x3e39af,'currentInputTokens':_0x1fbd40,'currentOutputTokens':_0x44e1ec,'currentReasoningTokens':_0xa494de,'currentModelTimeMs':_0x1f1474,..._0x41061f[_0x11cf19(0x2a5,_0x189ae9._0x5ae4ca,0x23a,_0x189ae9._0x3376ad)]&&_0x3e39af>0x0?{'contextWindowUsage':_0x3e39af/_0x41061f[_0x11cf19(0x258,0x259,_0x189ae9._0x21fcd0,_0x189ae9._0x3376ad)]}:{}},_0xd32cb6();return;}function _0x3d90f2(_0x3807ec,_0x2e086c,_0x7413c8,_0x5317bc){return _0x54d5(_0x7413c8- -_0x485c00._0x333a9a,_0x5317bc);}if(_0x7a746a[_0x3d90f2(-0x167,-_0x189ae9._0x319d72,-0x1ba,-_0x189ae9._0x71bbe6)]===_0x11cf19(0x30e,0x324,_0x189ae9._0x3c7b22,_0x189ae9._0x57f86e)){_0x41061f={..._0x41061f,'toolCallCount':_0x41061f[_0x3d90f2(-0x135,-_0x189ae9._0x45d6a1,-_0x189ae9._0x32b4cd,-0x172)]+0x1},_0xd32cb6();return;}_0x7a746a[_0x11cf19(0x270,0x265,0x28c,_0x189ae9._0x2fad00)]==='turn_complete'&&(_0x41061f={..._0x41061f,'requestCount':_0x41061f[_0x11cf19(_0x189ae9._0x5afdd7,0x267,0x27b,0x2a2)]+0x1},_0xd32cb6());},'reset'(){_0x41061f=createEmptySnapshot(),_0x13b71a=void 0x0,_0xd32cb6();},'subscribe'(_0x2db928){const _0x34c897={_0x410adc:0x149};return _0x546e8a['add'](_0x2db928),()=>{function _0x318f73(_0x2fc675,_0x58cb4e,_0x381e1b,_0x20cdf2){return _0x54d5(_0x2fc675- -0x3c2,_0x58cb4e);}_0x546e8a[_0x318f73(-0x189,-0x16c,-_0x34c897._0x410adc,-0x1a1)](_0x2db928);};}};}function makeExtensionContext(_0xec32d6){return{'state':_0xec32d6};}function _0x7bf43b(_0x3c5d1d,_0x271d5a,_0x4b5165,_0x50a405){return _0x54d5(_0x50a405- -0xf0,_0x271d5a);}async function runStage(_0x551511,_0x26f533,_0x5b71ee,_0x504e0f){const _0x61fd86={_0x2a751e:0x3ce,_0x7d243e:0x3d5,_0x151b1f:0x5f},_0x9a447b={_0x4ac5c3:0x5e},_0x57ea33={_0x256f60:0x132,_0x1b4d76:0x49b},_0x40748a=await _0x551511[_0x1a8310(0x426,_0x61fd86._0x2a751e,0x402,_0x61fd86._0x7d243e)](_0x26f533,_0x5b71ee,_0x504e0f);await _0x551511[_0x5dc387(0x6f,0x40,_0x61fd86._0x151b1f,0xb4)](_0x26f533,_0x40748a,_0x504e0f);function _0x1a8310(_0x260ad6,_0x1080d6,_0x232c1e,_0x445e97){return _0x2c6ea8(_0x260ad6-_0x57ea33._0x256f60,_0x1080d6,_0x260ad6-_0x57ea33._0x1b4d76,_0x445e97-0x49);}function _0x5dc387(_0x446c4f,_0xdb63ed,_0x5602e7,_0x46ad5c){return _0x2c6ea8(_0x446c4f-0xfe,_0x446c4f,_0x5602e7-0xed,_0x46ad5c-_0x9a447b._0x4ac5c3);}return _0x40748a;}async function emitEvent2(_0x58703c,_0x2ec08e,_0x4f9a27){await _0x58703c?.(_0x2ec08e,_0x4f9a27);}function replaceToolUseBlocks(_0xe87862,_0x21c652){const _0x16ecc2={_0x556880:0x208,_0x221bc2:0x1db,_0x3bde42:0x1c5,_0x79045:0x146,_0x34d6d7:0x1dd,_0x2c8ec7:0x1a1,_0x25f8c8:0x1a5},_0x1082d8={_0x53e413:0x261,_0x4a12d9:0x29a,_0x2e6bf5:0x47f,_0x37fc21:0x4bb},_0x1e666b={_0x213a60:0x1c1,_0x415709:0x26d},_0x186469={_0x478d49:0x52};function _0x57c4b7(_0x292459,_0x15d5a4,_0x9f8ba1,_0x411f88){return _0x7bf43b(_0x292459-_0x186469._0x478d49,_0x9f8ba1,_0x9f8ba1-0x1d9,_0x15d5a4- -0x116);}function _0x2fc8bd(_0x4a1c8a,_0x1c29b9,_0x1a88f1,_0x581e94){return _0x2c6ea8(_0x4a1c8a-_0x1e666b._0x213a60,_0x581e94,_0x1a88f1-_0x1e666b._0x415709,_0x581e94-0x1ed);}let _0x522a4d=0x0;return{..._0xe87862,'content':_0xe87862[_0x2fc8bd(_0x16ecc2._0x556880,_0x16ecc2._0x221bc2,_0x16ecc2._0x3bde42,0x1cb)][_0x2fc8bd(_0x16ecc2._0x79045,_0x16ecc2._0x34d6d7,_0x16ecc2._0x2c8ec7,_0x16ecc2._0x25f8c8)](_0x1eebba=>{function _0x3c222a(_0x31118e,_0x4f078e,_0x47146b,_0x1d6c83){return _0x2fc8bd(_0x31118e-0x81,_0x4f078e-0x12c,_0x47146b-0xc9,_0x4f078e);}if(_0x1eebba[_0x3c222a(_0x1082d8._0x53e413,_0x1082d8._0x4a12d9,0x274,0x2a3)]!==_0x1cdf8f(_0x1082d8._0x2e6bf5,0x46f,0x47f,_0x1082d8._0x37fc21))return _0x1eebba;function _0x1cdf8f(_0x46c485,_0x59bfb8,_0x865ea4,_0x18b380){return _0x57c4b7(_0x46c485-0xed,_0x18b380-0x472,_0x865ea4,_0x18b380-0x31);}const _0x4fcede=_0x21c652[_0x522a4d];return _0x522a4d+=0x1,structuredClone(_0x4fcede);})};}function createAssistantMessageId(_0x4435dc,_0x2ae5c3){const _0x375de7={_0x273020:0x5de,_0x305b2a:0x63d,_0xf8cc0e:0x5d8},_0x1bb0c3={_0x1c23ba:0x135,_0x406d85:0x696,_0x1b3f2a:0x185};function _0x2ce089(_0x21854e,_0x1a1dbc,_0x4ac4b0,_0x1473c1){return _0x2c6ea8(_0x21854e-_0x1bb0c3._0x1c23ba,_0x21854e,_0x1473c1-_0x1bb0c3._0x406d85,_0x1473c1-_0x1bb0c3._0x1b3f2a);}return _0x4435dc+_0x2ce089(_0x375de7._0x273020,_0x375de7._0x305b2a,_0x375de7._0xf8cc0e,0x610)+_0x2ae5c3;}function _0x2c6ea8(_0x3c3ebb,_0x2d25d8,_0x3cd9ff,_0x14f74a){const _0x45b662={_0x21f39c:0x2b2};return _0x54d5(_0x3cd9ff- -_0x45b662._0x21f39c,_0x2d25d8);}function createReasoningMessageId(_0x492bd0){const _0x181be8={_0x4da282:0xfb,_0x2e1326:0xab},_0x2057c2={_0x54a6bd:0x1d6,_0x382d6f:0x1c5};function _0xf4e5c7(_0x38a99d,_0x398a0a,_0x32099c,_0xf5f937){return _0x2c6ea8(_0x38a99d-_0x2057c2._0x54a6bd,_0x38a99d,_0x398a0a-_0x2057c2._0x382d6f,_0xf5f937-0x1a0);}return _0x492bd0+_0xf4e5c7(0x148,_0x181be8._0x4da282,_0x181be8._0x2e1326,0xdc);}function withMessageId(_0x383858,_0x552da8){if(_0x383858['id']===_0x552da8)return _0x383858;return{..._0x383858,'id':_0x552da8};}function _0x5299(){const _0x44a895=['DxnHz2u','mJeZmJG2mgr5B1nKyW','CNvUvhjHBNnMB3jTzxjZ','DhvYBKLUzgv4','CMvHC29UAw5Nx2nODw5R','zgvWCW','B3v0Chv0sw5KzxG','B3v0Chv0vg9Rzw5Z','ywjVCNq','DxnLCG','CMvNAxn0CNK','zxHLy3v0zq','C29YDa','C3LZDgvT','C3rYAw5N','CMfJzq','ywjVCNrLza','Dg9VBf9ZDgfYDgvK','ntu1odKWBwX5zuHK','B3v0Chv0','Dg9VBf91C2u','C2vZC2LVBI0','C3rHz2u','Bw9KzwXFCMvXDwvZDa','Dg9VBf9YzwPLy3rLza','Aw5WDxrezwX0yq','vw5RBM93BIb0B29SoIa','ywz0zxjuDxjUq29TCgXLDgu','B25vC2vYtwvZC2fNzq','tw9KzwWGC3rYzwfTigvUzgvKihDPDgHVDxqGysbMAw5HBcbYzxnWB25Zzq','Aw5KzxG','CMvHC29UAw5Nx21LC3nHz2u','C3rHDgu','C2v0u2vZC2LVBKLK','BgvUz3rO','BgLZDfrVB2Xty2HLBwfZ','zgvMyxvSDe1LC3nHz2u','C3rYAw5NAwz5','Dg9VBf9Yzxn1BhrFBwvZC2fNzq','AM9PBG','zxHLy3v0zunHBgXZ','B25fDMvUDa','CMvZCg9UC2u','CMvHC29U','BNvTyMvY','B2jQzwn0','yMvMB3jLvg9VBfjLC3vSDefWCgvUza','AxrLBuLK','ywXS','y29TCgXLDgu','Aw5WDxrty2HLBwe','Dgv4Da','CMvZzxrnzxnZywDLCW','ywz0zxjuB29SuMvZDwX0','B25uB29Sq2fSBa','Dg9VBf9JywXS','Bw9KzwXFCMvZCg9UC2u','C2XPy2u','y29UDgvUDeLUzgv4','DgHLBG','ywrKrxzLBNrmAxn0zw5LCG','zMLSDgvY','C2v0vg9WAwm','C2v0u3LZDgvTuhjVBxb0','C2v0vg9VBhm','Dw5RBM93BL90B29S','yxnZAxn0yw50x21LC3nHz2u','ywz0zxjnzxnZywDLqxbWzw5K','yxnRvxnLCG','Aw5WDxq','oIbLEhbLy3rLzcbVyMPLy3q','yxjYyxK','CMvNAxn0zxi','zgvSDge','B3bLBMfPx3jLyxnVBMLUz19KzwX0yq','zMLUywXFBwvZC2fNzq','CMv0DxjU','C3rYzwfT','B3jKzxi','C3LZDgvTuhjVBxb0','CMvJB3jKrxzLBNq','mJDQzuDOyKm','CMvTB3zLrxzLBNrmAxn0zw5LCG','Bwv0yq','y29UDgv4DfDPBMrVD0XPBwL0','AxrLBxm','zxjYB3i','mZC0mtzvBfjwD3q','CMvHC29UAw5Nu3rHCNrLzef0','mJu2ou1KC2nRCG','odi3nJrcuvPmsey','ChjVDMLKzxi','C29Tzq','DhvYBKLK','ywn0Aw9U','BgfZDfjLC3bVBNnL','BMfTzq','Dg9tDhjPBMC','BwfW','DhvYBI0','oNjLyxnVBMLUzW','Dg9VBhncEu5HBwu','Dg9VBf91C2vFzgvSDge','CMvXDwvZDenVDw50','ngfkz1Lqrq','nZe4otu2s2j3CuLy','Bwv0CMLJCW','B2jZzxj2zxi','DhLWzq','CMvHC29UAw5Nvg9Rzw5Z','oIbLEhbLy3rLzcbUDw1Izxi','vg9VBev4zwn1DgLVBKvYCM9Y','AxnbCNjHEq','zg9Uzq','DMfSDwvZ','BM93','CMvHC29UAw5NtwvZC2fNzuLK','z2v0q29UDgv4DfDPBMrVD0XPBwL0','BMv4Da','y29UDgvUDf9KzwX0yq','DhjPBq','z2v0vg9VBhm','Dg9VBf91C2vFy2H1BMS','Dg90ywXszwfZB25PBMDuB2TLBNm','yM9VBgvHBG','y2HHDe1VzgvS','BwvZC2fNzq','C2vZC2LVBKLK','qwDLBNqUC2vUzcbYzxf1AxjLCYbHig1LC3nHz2uGD2HLBIbUBYbKzwzHDwX0ig1LC3nHz2uGAxmGy29UzMLNDxjLza','CNvU','zM9YrwfJAa','yMvMB3jLqxnZAxn0yw50qxbWzw5K','C2v0q2HHDe1VzgvS','vg9VBcbLEgvJDxrPB24GCMvQzwn0zwqGzM9Yia','y29UDgvUDa','DMfSDwu','ChvZAa','CMvZB2X2zq','x3n5C3rLBvbYB21WDa','CMvHC29UAw5Nq29TCgXLDgvKqxq','Dg9VBhm','BgLZDa','C3rYzwfTAw5N','CMvXDwLYzwq','C3rYDwn0DxjLza','yxnZAxn0yw50twvZC2fNzuLK','y29TCgXLDgvK','Bwf4vg9Rzw5Z','B3bLBMfPx3jLyxnVBMLUz19ZDw1Tyxj5x2rLBhrH','ChjVDMLKzxjFCMv0CNK','B3v0Chv0rM9YBwf0','oIbLEhbLy3rLzcbZDhjPBMC','qwDLBNqGCMvXDwLYzxmGysbJAgf0tw9KzwW','z2v0','C2vZC2LVBKrPCG','C2LNBMfS','y2f0y2G','C2vUza','zw50CMLLCW','BwvZC2fNzxm','CNvUt2jZzxj2zxjZ','Aw5WDxruB2TLBNm','DhvYBL9JB21WBgv0zq','DgHPBMTPBMC','mZzVEu1ns2O','mtC2nJvjrvrgwuS','A2LUza','yw50AhjVCgLJx3rOAw5RAw5Nx2rLBhrH','oMfZC2LZDgfUDdO','DxnLCL9TzxnZywDL','Dg9VBfj1BNrPBwu','Dg9VBf9JB21WBgv0zwq','ChjVCgvYDgLLCW','Dg9VBenHBgXdB3vUDa','zMLUywXnzxnZywDL','oIbLEhbLy3rLzcbHCNjHEq','zNvUy3rPB24','sw52ywXPzcb0B29SigLUChv0igf0ia','Bw9KzwXdywXSq291BNq','yMvMB3jLtw9KzwXszxf1zxn0','CMvQzwn0','zgvSzxrL','Dg9VBf9Yzxn1Bhq'];_0x5299=function(){return _0x44a895;};return _0x5299();}function createAssistantChunkEvent(_0x41addb,_0x4d225f){const _0x1ef027={_0x5e5dd3:0x362,_0x216930:0x31b,_0x53be29:0x398,_0x5b37ad:0x639,_0x569827:0x633,_0x56a3c3:0x409,_0x1d60c0:0x5c0,_0x2e3535:0x59c,_0xc795bc:0x38d,_0x397591:0x3cb,_0x3a9b11:0x3b2,_0x1dfb2b:0x41d,_0x334693:0x437,_0x4c6b15:0x3be},_0x5b662a={_0x20a34c:0x677,_0x12dbaa:0xd9},_0x131c1c={_0xc2d291:0x10c,_0x2a43ea:0x424,_0x1723ca:0x14b};function _0x3faf7d(_0x36ddcf,_0x4e229e,_0x2f745f,_0xa1a0ba){return _0x2c6ea8(_0x36ddcf-_0x131c1c._0xc2d291,_0x2f745f,_0x4e229e-_0x131c1c._0x2a43ea,_0xa1a0ba-_0x131c1c._0x1723ca);}function _0x59ae67(_0x614189,_0x374119,_0x3a6c8b,_0x49f251){return _0x2c6ea8(_0x614189-0xb3,_0x49f251,_0x3a6c8b-_0x5b662a._0x20a34c,_0x49f251-_0x5b662a._0x12dbaa);}if(_0x41addb[_0x3faf7d(0x377,_0x1ef027._0x5e5dd3,_0x1ef027._0x216930,_0x1ef027._0x53be29)]!=='content_delta')return void 0x0;if(_0x41addb[_0x59ae67(_0x1ef027._0x5b37ad,0x606,_0x1ef027._0x569827,0x654)]===void 0x0)return void 0x0;return{'type':'assistant_chunk','index':_0x41addb[_0x3faf7d(_0x1ef027._0x56a3c3,0x3cb,0x38d,0x3bc)]??0x0,'messageId':_0x4d225f,'chunk':{'type':_0x59ae67(0x606,0x5f8,_0x1ef027._0x1d60c0,_0x1ef027._0x2e3535),'index':_0x41addb[_0x3faf7d(_0x1ef027._0xc795bc,_0x1ef027._0x397591,_0x1ef027._0x3a9b11,_0x1ef027._0x1dfb2b)]??0x0,'text':_0x41addb[_0x3faf7d(_0x1ef027._0x334693,0x3e0,0x3d7,_0x1ef027._0x4c6b15)]}};}function createToolUseChunkEvent(_0x2ec799,_0x16e71c){const _0x88ac8e={_0x5688df:0x3dd,_0x3d78db:0x427,_0x3e39e3:0x3fc,_0x1741b9:0x440,_0x447d05:0x39f,_0x1c4a62:0x42a,_0xb18cc7:0x3f9,_0x3e667d:0x401,_0x338d88:0x3d1,_0x5ef0cc:0x3e7,_0x4f69e1:0x59f,_0x5ac2fa:0x586,_0x3c5283:0x615,_0x2067ff:0x5fb,_0x4a0c2e:0x3ee,_0x309cdc:0x452},_0x29d4e8={_0x30067d:0xe5,_0x16836c:0x49f},_0x19c8e2={_0x49d917:0x654};function _0x128ef6(_0x245130,_0x2e61b1,_0x7eb46c,_0x465e13){return _0x2c6ea8(_0x245130-0x71,_0x2e61b1,_0x7eb46c-_0x19c8e2._0x49d917,_0x465e13-0x23);}if(_0x2ec799[_0x1c554e(0x3ad,_0x88ac8e._0x5688df,_0x88ac8e._0x3d78db,0x3e5)]!==_0x1c554e(0x3b2,0x3d7,0x407,_0x88ac8e._0x3e39e3))return void 0x0;function _0x1c554e(_0x2580bc,_0x4353a7,_0x3ae3fe,_0x192957){return _0x2c6ea8(_0x2580bc-_0x29d4e8._0x30067d,_0x2580bc,_0x4353a7-_0x29d4e8._0x16836c,_0x192957-0x64);}return{'type':_0x1c554e(_0x88ac8e._0x1741b9,0x3eb,_0x88ac8e._0x447d05,0x3c6),'index':_0x2ec799[_0x1c554e(_0x88ac8e._0x1c4a62,0x446,_0x88ac8e._0xb18cc7,0x466)]??0x0,'messageId':_0x16e71c,'chunk':{'type':_0x1c554e(0x42f,0x3d7,_0x88ac8e._0x3e667d,0x3c8),'id':_0x2ec799['id']??'','index':_0x2ec799['index']??0x0,..._0x2ec799[_0x1c554e(0x417,_0x88ac8e._0x338d88,_0x88ac8e._0x5ef0cc,0x424)]!==void 0x0?{'name':_0x2ec799[_0x128ef6(0x580,_0x88ac8e._0x4f69e1,_0x88ac8e._0x5ac2fa,0x5c1)]}:{},..._0x2ec799[_0x128ef6(_0x88ac8e._0x3c5283,_0x88ac8e._0x2067ff,0x5f6,0x59d)]!==void 0x0?{'inputDelta':_0x2ec799[_0x1c554e(_0x88ac8e._0x4a0c2e,0x441,0x46c,_0x88ac8e._0x309cdc)]}:{}}};}function createReasoningChunkEvent(_0x518a11,_0x4c8094){const _0x3850ff={_0x3cfef3:0x49,_0x4524da:0x2,_0x5610ab:0x3e,_0x39a09e:0x27,_0x4934f4:0x3d,_0x20ba09:0xc0,_0x24a0c5:0x64,_0x33e6a7:0x6b,_0x3f66b0:0x4e,_0xb16271:0x26,_0x16fc00:0xf1,_0x2f29dc:0x38,_0x13a0f4:0xe,_0x5c8214:0x6,_0x354fd2:0x90,_0x362870:0x39,_0x5ad6a8:0xd1,_0x48c7cd:0xbf,_0x11ef4f:0x97,_0x57a1bf:0xa2,_0x12978c:0xa9,_0xfaf421:0x51,_0x5e1b16:0xaa,_0x3390ca:0xcb,_0x31b641:0xba,_0x1c7895:0xca,_0x4d698d:0x6a,_0x3ea148:0x96,_0x465e9e:0x58,_0x469974:0x3d,_0x3d9513:0xc7,_0x3d2db2:0x36,_0x36348b:0x81,_0x40c908:0x85,_0x98aa5e:0x2a,_0x193a26:0x1,_0x35ee75:0x79,_0x1ee981:0x6b,_0x4be460:0x42,_0x1567b2:0xc1,_0x43c05c:0x81,_0x1f18f0:0x95,_0x12979e:0xbd,_0x5af89a:0x6c,_0x167f2e:0x71,_0x2ce3f7:0x56,_0x187163:0x5c,_0x32c7a3:0x5d,_0x38afdf:0x96},_0x4adc49={_0x3778c8:0x15b,_0x1bbe3f:0xbd},_0x24cc82={_0x3dcd76:0x151,_0x10c6ec:0x1a0};function _0x5ea7d7(_0x11e38c,_0x5188bd,_0x1ded79,_0x176253){return _0x7bf43b(_0x11e38c-_0x24cc82._0x3dcd76,_0x5188bd,_0x1ded79-_0x24cc82._0x10c6ec,_0x176253- -0xfe);}function _0x1dade0(_0x15e771,_0x4e7c12,_0x50b749,_0x2cd81e){return _0x7bf43b(_0x15e771-_0x4adc49._0x3778c8,_0x50b749,_0x50b749-0x67,_0x4e7c12- -_0x4adc49._0x1bbe3f);}switch(_0x518a11[_0x5ea7d7(-_0x3850ff._0x3cfef3,-0x59,-0x29,_0x3850ff._0x4524da)]){case _0x5ea7d7(_0x3850ff._0x5610ab,0x7a,_0x3850ff._0x39a09e,_0x3850ff._0x4934f4):return{'type':_0x1dade0(_0x3850ff._0x20ba09,0x92,0x6b,0x74),'index':_0x518a11[_0x5ea7d7(0x36,0xa7,_0x3850ff._0x24a0c5,_0x3850ff._0x33e6a7)],'messageId':_0x4c8094,'chunk':{'type':_0x5ea7d7(_0x3850ff._0x3f66b0,0x29,_0x3850ff._0xb16271,_0x3850ff._0x4934f4),'index':_0x518a11[_0x1dade0(0xf7,0xac,0xae,_0x3850ff._0x16fc00)]??0x0,'thinking':_0x518a11[_0x5ea7d7(_0x3850ff._0x2f29dc,_0x3850ff._0x13a0f4,-_0x3850ff._0x5c8214,0x39)]??''},'text':_0x518a11[_0x5ea7d7(0x75,_0x3850ff._0x354fd2,0x30,_0x3850ff._0x362870)]??''};case _0x5ea7d7(_0x3850ff._0x5ad6a8,0xec,_0x3850ff._0x48c7cd,_0x3850ff._0x11ef4f):return{'type':_0x5ea7d7(0x2d,_0x3850ff._0x57a1bf,_0x3850ff._0x12978c,_0x3850ff._0xfaf421),'index':_0x518a11[_0x1dade0(0xfd,0xc8,0x87,_0x3850ff._0x5e1b16)],'messageId':_0x4c8094,'chunk':{'type':'openai_reasoning_delta','contentIndex':_0x518a11[_0x5ea7d7(0xd7,0x97,_0x3850ff._0x3390ca,0x87)]??0x0,'delta':_0x518a11[_0x5ea7d7(_0x3850ff._0x31b641,_0x3850ff._0x1c7895,_0x3850ff._0x4d698d,_0x3850ff._0x3ea148)]??'','itemId':_0x518a11['itemId']??'','outputIndex':_0x518a11[_0x1dade0(_0x3850ff._0x465e9e,0x94,_0x3850ff._0x469974,_0x3850ff._0x3d9513)]??0x0},'text':_0x518a11['delta']??''};case _0x5ea7d7(_0x3850ff._0x3d2db2,_0x3850ff._0x36348b,_0x3850ff._0x40c908,_0x3850ff._0x98aa5e):return{'type':_0x5ea7d7(_0x3850ff._0x193a26,_0x3850ff._0x35ee75,0x9d,_0x3850ff._0xfaf421),'index':_0x518a11['summaryIndex'],'messageId':_0x4c8094,'chunk':{'type':_0x1dade0(0x19,_0x3850ff._0x1ee981,_0x3850ff._0x4be460,_0x3850ff._0x1567b2),'delta':_0x518a11[_0x5ea7d7(0xb1,0xba,_0x3850ff._0x43c05c,0x96)]??'','itemId':_0x518a11[_0x1dade0(_0x3850ff._0x1f18f0,_0x3850ff._0x12979e,_0x3850ff._0x5af89a,_0x3850ff._0x167f2e)]??'','outputIndex':_0x518a11[_0x1dade0(_0x3850ff._0x2ce3f7,0x94,_0x3850ff._0x187163,0x81)]??0x0,'summaryIndex':_0x518a11['summaryIndex']??0x0},'text':_0x518a11[_0x5ea7d7(0xe2,_0x3850ff._0x32c7a3,0xac,_0x3850ff._0x38afdf)]??''};default:return void 0x0;}}function isAbortedToolResult(_0x3a33d1){const _0x25cd39={_0x47367c:0x536,_0x16cd8e:0x5a9,_0xf7aead:0x52d,_0x5f3c28:0x591},_0x37b007={_0x1b347f:0xb7,_0x5d26d7:0x46d},_0x410602={_0x5e0e6e:0x22,_0x26d17d:0x4ea};function _0xb3bdcd(_0x1d369c,_0x17966a,_0x249c32,_0x2fd17a){return _0x2c6ea8(_0x1d369c-_0x410602._0x5e0e6e,_0x2fd17a,_0x249c32-_0x410602._0x26d17d,_0x2fd17a-0x97);}function _0x5d5c5e(_0x24418c,_0x3b3ac9,_0x3d86ec,_0x401b12){return _0x7bf43b(_0x24418c-_0x37b007._0x1b347f,_0x401b12,_0x3d86ec-0x1ad,_0x24418c-_0x37b007._0x5d26d7);}return _0x3a33d1['status']===_0x5d5c5e(0x557,_0x25cd39._0x47367c,_0x25cd39._0x16cd8e,_0x25cd39._0xf7aead)&&_0x3a33d1[_0x5d5c5e(_0x25cd39._0x5f3c28,0x583,0x59e,0x59d)][_0xb3bdcd(0x45c,0x46c,0x483,0x454)]===!![];}async function executeModelRequest(_0x428b7c,_0x5eb5fc,_0x16f60a,_0x43f7be,_0x7faff1){const _0x5d3ed7={_0x182d48:0xed,_0x45173a:0x112,_0x23ca84:0x107,_0x33b0f2:0x163,_0x157ecc:0xae,_0x481148:0xd3,_0xaf63a7:0x12c,_0x774608:0x76,_0x36dfdd:0xbb,_0x2deb3e:0x9b,_0x57b624:0x5,_0x4dfa87:0x46,_0x50323b:0x58,_0x19a414:0x2,_0x4f0365:0x5b,_0x3b8f9c:0xb,_0x39d78a:0x11f,_0x2210c9:0x15c,_0x45d0cf:0x150,_0x38bf6e:0x12,_0x14e2f1:0x4,_0x5b9e4a:0x6d,_0x4c15c1:0xcb,_0xdb36a3:0x51,_0x454e46:0x16,_0x32d361:0x28,_0x3cba03:0x52,_0x58c79d:0x111,_0x346c29:0xdc,_0x412027:0x8e,_0x1da95f:0xfe,_0xacf055:0xa4,_0x2ede42:0x70,_0x58d805:0x51,_0x4338e0:0x34,_0x4dc285:0x10,_0x112ad9:0x6b,_0x3dd7d7:0x2c,_0x2642b9:0x87,_0x322f6c:0x35,_0x44ba00:0x50,_0x25df8a:0x11d,_0x4bc2db:0x12a,_0xa42a40:0x119,_0x424ae9:0x161,_0x1cfd61:0x7d,_0x339a1e:0xa,_0x5e2323:0x8,_0x1fcba7:0x3f,_0x520a09:0x18,_0x10aac7:0x54,_0x12ee11:0x27,_0xab3610:0x20,_0x560ceb:0x7d,_0x7c4305:0xf6,_0x25fa85:0x1c,_0x5665d9:0x69,_0x41df30:0x113,_0x3e56ee:0xf7,_0x21c482:0xba,_0x16af20:0x13c,_0x1c87ed:0x121,_0x41d293:0xcc,_0x47e01b:0x2a,_0x93b4e1:0x10d,_0x3f2a62:0x93,_0x3650b3:0x156,_0xee4968:0x10f,_0x429451:0xd9,_0x4ed5dd:0xe9,_0x215165:0x1a,_0x1b3c3a:0x5,_0x18cdbe:0x3e,_0x32d6ad:0x1d,_0x2af3a1:0x2e,_0x8ef5e:0x19,_0x14f454:0x23,_0x591abc:0x14e,_0xb25f4d:0x158,_0x5c2925:0x17a,_0xfa02f7:0x114},_0x31ed09={_0x58eec3:0x1e0,_0x78028b:0x10};function _0x321f84(_0x13e764,_0x37d2ff,_0x34085b,_0x2104ab){return _0x2c6ea8(_0x13e764-0x3e,_0x34085b,_0x37d2ff-0x6b,_0x2104ab-0xf6);}throwIfAborted(_0x5eb5fc[_0xa6e808(0x143,0x11f,_0x5d3ed7._0x182d48,0x16d)]);if(!_0x5eb5fc[_0xa6e808(0x157,_0x5d3ed7._0x45173a,_0x5d3ed7._0x23ca84,_0x5d3ed7._0x33b0f2)]||!_0x16f60a[_0xa6e808(_0x5d3ed7._0x157ecc,0x101,_0x5d3ed7._0x481148,_0x5d3ed7._0xaf63a7)][_0x321f84(-0x8a,-_0x5d3ed7._0x774608,-_0x5d3ed7._0x36dfdd,-_0x5d3ed7._0x2deb3e)])return await _0x16f60a[_0x321f84(_0x5d3ed7._0x57b624,-_0x5d3ed7._0x4dfa87,-_0x5d3ed7._0x50323b,-_0x5d3ed7._0x19a414)][_0x321f84(_0x5d3ed7._0x4f0365,0x25,_0x5d3ed7._0x3b8f9c,-0x27)](_0x428b7c,{'signal':_0x5eb5fc[_0xa6e808(0xf7,_0x5d3ed7._0x39d78a,_0x5d3ed7._0x2210c9,_0x5d3ed7._0x45d0cf)]});let _0x30027f;for await(const _0x56d5c7 of _0x16f60a[_0x321f84(-_0x5d3ed7._0x38bf6e,-0x46,-_0x5d3ed7._0x57b624,-_0x5d3ed7._0x14e2f1)][_0x321f84(-_0x5d3ed7._0x5b9e4a,-_0x5d3ed7._0x774608,-_0x5d3ed7._0x4c15c1,-_0x5d3ed7._0xdb36a3)](_0x428b7c,{'signal':_0x5eb5fc[_0x321f84(-_0x5d3ed7._0x454e46,-_0x5d3ed7._0x32d361,-_0x5d3ed7._0x3cba03,-0x35)]})){throwIfAborted(_0x5eb5fc['signal']);if(_0x56d5c7['type']==='done'){_0x7faff1['meta'][_0xa6e808(_0x5d3ed7._0x58c79d,_0x5d3ed7._0x346c29,_0x5d3ed7._0x412027,_0x5d3ed7._0x1da95f)]!==void 0x0&&_0x7faff1[_0x321f84(-_0x5d3ed7._0xacf055,-_0x5d3ed7._0x2ede42,-_0x5d3ed7._0x58d805,-_0x5d3ed7._0x4338e0)][_0x321f84(_0x5d3ed7._0x4dc285,-0x38,-_0x5d3ed7._0x112ad9,-_0x5d3ed7._0x3dd7d7)]===void 0x0&&(_0x7faff1['meta'][_0x321f84(_0x5d3ed7._0x57b624,-0x38,-_0x5d3ed7._0x2642b9,-0x76)]=Date[_0x321f84(-_0x5d3ed7._0x322f6c,-_0x5d3ed7._0x44ba00,-0x87,-0x3a)]());_0x30027f=_0x56d5c7['response'];continue;}if(_0x56d5c7[_0xa6e808(0xdc,0xf0,_0x5d3ed7._0x25df8a,_0x5d3ed7._0x4bc2db)]===_0xa6e808(0x121,_0x5d3ed7._0xa42a40,0x14f,_0x5d3ed7._0x424ae9)){await emitEvent2(_0x16f60a['onEvent'],_0x56d5c7,_0x43f7be);continue;}const _0x16290=createReasoningChunkEvent(_0x56d5c7,_0x7faff1[_0x321f84(-0x9,-0x4f,-_0x5d3ed7._0x1cfd61,-0x87)]);if(_0x16290&&_0x16290['type']===_0x321f84(-_0x5d3ed7._0x339a1e,-_0x5d3ed7._0x5e2323,-_0x5d3ed7._0x1fcba7,-_0x5d3ed7._0x520a09)&&_0x16290[_0x321f84(_0x5d3ed7._0x10aac7,_0x5d3ed7._0x12ee11,-_0x5d3ed7._0xab3610,-0x11)]['length']>0x0){_0x7faff1[_0x321f84(-0x3a,-_0x5d3ed7._0x2ede42,-_0x5d3ed7._0x560ceb,-0x5e)][_0xa6e808(0xec,0xdc,0x12f,_0x5d3ed7._0x7c4305)]===void 0x0&&(_0x7faff1['meta'][_0x321f84(-0x25,-0x6b,-_0x5d3ed7._0x25fa85,-_0x5d3ed7._0x5665d9)]=Date[_0xa6e808(_0x5d3ed7._0x41df30,_0x5d3ed7._0x3e56ee,0x144,0xe1)]());await emitEvent2(_0x16f60a['onEvent'],_0x16290,_0x43f7be);continue;}const _0x1c70ae=createAssistantChunkEvent(_0x56d5c7,_0x7faff1[_0xa6e808(_0x5d3ed7._0x21c482,0x115,_0x5d3ed7._0x16af20,0x125)]);if(_0x1c70ae){_0x7faff1[_0xa6e808(_0x5d3ed7._0x1c87ed,0xd7,_0x5d3ed7._0x41d293,0xa1)][_0x321f84(-0x4d,-0x6b,-_0x5d3ed7._0x47e01b,-0x32)]!==void 0x0&&_0x7faff1[_0xa6e808(_0x5d3ed7._0x93b4e1,0xd7,_0x5d3ed7._0x3f2a62,0xbd)][_0xa6e808(_0x5d3ed7._0x3650b3,_0x5d3ed7._0xee4968,_0x5d3ed7._0x429451,_0x5d3ed7._0x4ed5dd)]===void 0x0&&(_0x7faff1['meta'][_0x321f84(-_0x5d3ed7._0x215165,-0x38,_0x5d3ed7._0x1b3c3a,-0x3a)]=Date[_0x321f84(-0xab,-_0x5d3ed7._0x44ba00,-0x60,-0x4d)]());await emitEvent2(_0x16f60a[_0x321f84(-_0x5d3ed7._0x18cdbe,_0x5d3ed7._0x32d6ad,0x3,0x69)],_0x1c70ae,_0x43f7be);continue;}const _0x2cd0c1=createToolUseChunkEvent(_0x56d5c7,_0x7faff1[_0x321f84(-_0x5d3ed7._0x2af3a1,-0x32,-_0x5d3ed7._0x8ef5e,-_0x5d3ed7._0x14f454)]);_0x2cd0c1&&await emitEvent2(_0x16f60a['onEvent'],_0x2cd0c1,_0x43f7be);}function _0xa6e808(_0x523d25,_0x5652b2,_0x52b340,_0x1c3b6c){return _0x7bf43b(_0x523d25-0xc4,_0x523d25,_0x52b340-_0x31ed09._0x58eec3,_0x5652b2- -_0x31ed09._0x78028b);}if(!_0x30027f)throw new Error(_0xa6e808(_0x5d3ed7._0x591abc,_0x5d3ed7._0xb25f4d,_0x5d3ed7._0x5c2925,_0x5d3ed7._0xfa02f7));return _0x30027f;}function makeTurnGuards(_0xd4cc17,_0xe45868,_0x294f86,_0x2432f3,_0x17fd8d){return{async 'stage'(_0x4e1cfc,_0x4135ea){return throwIfAborted(_0xd4cc17),await runStage(_0xe45868,_0x4e1cfc,_0x4135ea,_0x2432f3);},async 'emit'(_0x4b50b1){throwIfAborted(_0xd4cc17),await emitEvent2(_0x294f86,_0x4b50b1,_0x17fd8d);},async 'stageUnchecked'(_0x4b6283,_0x1cc046){return await runStage(_0xe45868,_0x4b6283,_0x1cc046,_0x2432f3);},async 'emitUnchecked'(_0x41bd2e){await emitEvent2(_0x294f86,_0x41bd2e,_0x17fd8d);}};}async function runTurn(_0x180af4,_0x4409e1){const _0x59451e={_0x2195ca:0x549,_0x4faa4d:0x42f,_0x54d0b1:0x484,_0x519c34:0x462,_0x12a941:0x4c5,_0x40cd63:0x4f4,_0x3fb1fb:0x474,_0x476ffa:0x4c7,_0xd511a5:0x435,_0x268da8:0x448,_0x22512d:0x412,_0x156987:0x45d,_0x14bb7d:0x3e9,_0x4b82e3:0x465,_0x468240:0x437,_0x33a482:0x46a,_0x2d052f:0x4b9,_0x4d9aa4:0x528,_0x58ffcf:0x548,_0x463e8f:0x42f,_0x1e6a5d:0x477,_0x303e9a:0x547,_0x1eafca:0x46c,_0x50da53:0x4f6,_0x18a67d:0x432,_0xa08eba:0x56d,_0x47f077:0x530,_0x461bb9:0x4f5,_0x263b78:0x52c,_0x5a4b24:0x4ed,_0x57dc38:0x56c,_0x6c6242:0x4fe,_0x48677d:0x438,_0x1908db:0x458,_0x396358:0x42a,_0x1313b0:0x46b,_0xce24a9:0x483,_0x4a3ac6:0x485,_0x3146de:0x518,_0x45787a:0x52b,_0x2a8eae:0x40b,_0x52155e:0x3d9,_0x107d6d:0x461,_0x48afed:0x554,_0x9e1e91:0x4f1,_0x13ae8e:0x547,_0x2869a0:0x42d,_0x40f22d:0x3dd,_0x5e7c7e:0x405,_0x3d77af:0x443,_0x2fcfb5:0x45d,_0x2c6a8b:0x547,_0x3c9f3e:0x569,_0x393b60:0x48a,_0x2e8867:0x410,_0x4cb6d7:0x408,_0x168cc0:0x558,_0x1b647a:0x509,_0x4d1204:0x48a,_0x164c39:0x462,_0x339600:0x44a,_0x29e9b2:0x445,_0xb51cf:0x4f4,_0x18916b:0x50b,_0x4bbf09:0x53c,_0x31cb49:0x446,_0x22a507:0x3fb,_0x30e595:0x56e,_0x4f4abc:0x54f,_0x257632:0x544,_0x5ab6d0:0x5a3,_0x4517ee:0x58a,_0x14a619:0x4c2,_0x1e4fb0:0x567,_0x2fe191:0x559,_0x35b3e8:0x51d,_0x41a6ef:0x543,_0x3d2ca5:0x588,_0x10868c:0x5e6,_0x45ae3:0x575,_0x39a5d4:0x3e9,_0x3a5c92:0x53e,_0x5d9807:0x54f,_0x298f1:0x4a9,_0x59d52b:0x4f4,_0x3c8e1f:0x4a1,_0x4dd021:0x578,_0x2010b2:0x54d,_0x5a69de:0x597,_0x4d3350:0x491,_0x2367e2:0x489,_0x2a009d:0x4a2,_0x1a9abc:0x479,_0x5e4a33:0x587,_0x5390e2:0x5a5,_0x3ecf6a:0x523,_0x120e41:0x55c,_0xe2d56d:0x422,_0x2a820c:0x45a,_0x5ae552:0x56f,_0x25fc6f:0x531,_0x56ff2:0x587,_0x53737f:0x4b2,_0x2c35ac:0x4af,_0x1c94a4:0x489,_0x249596:0x56f,_0x3beafe:0x49f,_0x2d18c3:0x447,_0x14d94d:0x461,_0x3b3fed:0x453,_0x2c1bfb:0x4a2,_0x539aaa:0x5aa,_0x3f4227:0x540,_0x1fe871:0x576,_0x4e8db9:0x545,_0x4dfa53:0x517,_0xdd621a:0x4c5,_0x2bf9fa:0x496,_0x2a8983:0x4c4,_0x337281:0x40c,_0x2489a6:0x497,_0x34a06c:0x49e,_0x39e464:0x4bf,_0x269afc:0x510,_0x53643a:0x536,_0x25a99b:0x574,_0x2e64a9:0x521,_0x587af3:0x545,_0x487f7d:0x593,_0x20e1aa:0x48d,_0x47ffe7:0x493,_0x3ac017:0x44b,_0x53643b:0x4bf,_0x37750c:0x55d,_0x1159ca:0x59a,_0x30b5a8:0x51d,_0x4ec6df:0x4ac,_0x28588e:0x420,_0x4353be:0x575,_0x1e9bee:0x543,_0x439855:0x5d1,_0x3da6af:0x54a},_0x2c67c1={_0xa5fefb:0xc,_0x23be22:0x50,_0x13beb1:0x1a,_0x27194c:0x58,_0x463cde:0x5b,_0xd3051e:0x38,_0x286951:0x7b,_0x5c78b0:0x99,_0x1e86ea:0x53},_0x5c1b96={_0x5d9562:0x5dc,_0x37c983:0xcd},_0x110b24={_0x414d09:0x17f,_0x103501:0x16d},_0x189f54=_0x180af4['signal']??new AbortController()[_0x41f1cb(0x500,0x57b,_0x59451e._0x2195ca,0x553)],_0x32cbc2={'sessionId':_0x180af4[_0x107612(_0x59451e._0x4faa4d,_0x59451e._0x54d0b1,0x45c,_0x59451e._0x519c34)],'turnId':_0x180af4[_0x41f1cb(_0x59451e._0x12a941,_0x59451e._0x40cd63,0x50b,0x4c9)],'system':normalizeSystem(_0x180af4[_0x107612(_0x59451e._0x3fb1fb,_0x59451e._0x476ffa,_0x59451e._0xd511a5,_0x59451e._0x268da8)]),'messages':(_0x180af4[_0x41f1cb(0x59c,0x57d,0x54d,0x52d)]??[])[_0x107612(_0x59451e._0x22512d,_0x59451e._0x156987,_0x59451e._0x14bb7d,_0x59451e._0x4b82e3)](normalizeMessage),'lastResponse':void 0x0,'toolResults':[],'finalMessage':void 0x0,'sessionDir':typeof _0x4409e1[_0x41f1cb(0x525,0x4fe,0x548,0x5a1)]===_0x107612(0x460,_0x59451e._0x468240,_0x59451e._0x33a482,_0x59451e._0x2d052f)?_0x4409e1[_0x41f1cb(0x536,_0x59451e._0x4d9aa4,_0x59451e._0x58ffcf,0x556)]():_0x4409e1['sessionDir']},_0xa04b18=makeExtensionContext(_0x32cbc2);function _0x107612(_0xe5f385,_0x6c24f5,_0x1b715b,_0x420f18){return _0x2c6ea8(_0xe5f385-_0x110b24._0x414d09,_0x6c24f5,_0xe5f385-0x4de,_0x420f18-_0x110b24._0x103501);}function _0x41f1cb(_0x1211df,_0x37f995,_0x55599a,_0x2e6e77){return _0x2c6ea8(_0x1211df-0x4a,_0x2e6e77,_0x55599a-_0x5c1b96._0x5d9562,_0x2e6e77-_0x5c1b96._0x37c983);}const _0x37a508={'sessionId':_0x32cbc2[_0x107612(_0x59451e._0x463e8f,0x43e,_0x59451e._0x1e6a5d,0x403)],'turnId':_0x32cbc2[_0x41f1cb(_0x59451e._0x303e9a,0x4e4,0x50b,0x4c8)],'state':_0x32cbc2,'signal':_0x189f54,..._0x4409e1['askUser']?{'askUser':_0x4409e1[_0x107612(0x4ab,_0x59451e._0x1eafca,0x4f6,0x4b4)]}:{},..._0x4409e1[_0x107612(0x4a5,0x4a2,0x470,_0x59451e._0x50da53)]?{'setTopic':_0x4409e1['setTopic']}:{}},{stage:_0xbf05c7,emit:_0x3a9ad0,stageUnchecked:_0x5d1d12,emitUnchecked:_0x46cff8}=makeTurnGuards(_0x189f54,_0x4409e1[_0x107612(0x471,0x4c5,0x41e,_0x59451e._0x18a67d)],_0x4409e1[_0x41f1cb(0x5a5,0x5d8,0x58e,0x571)],_0xa04b18,_0x37a508),_0x590c9f=async(_0x370ec5,_0x28a131)=>{const _0x2f62fb={_0x286347:0x68,_0x19cc74:0xf1},_0x3fd7ce={_0x3d7bf3:0x66,_0x52d84c:0x18f,_0x59e4b5:0x555};function _0x23db52(_0x3d951b,_0x2411ee,_0x14f507,_0x281e92){return _0x41f1cb(_0x3d951b-_0x3fd7ce._0x3d7bf3,_0x2411ee-_0x3fd7ce._0x52d84c,_0x281e92- -_0x3fd7ce._0x59e4b5,_0x3d951b);}const _0x4c22f9=_0x28a131?{..._0xa04b18,'turnMeta':_0x28a131}:_0xa04b18;function _0x4c0224(_0x1fc3b0,_0x34b6e4,_0x3e84ba,_0x463652){return _0x107612(_0x1fc3b0-_0x2f62fb._0x286347,_0x34b6e4,_0x3e84ba-_0x2f62fb._0x19cc74,_0x463652-0x166);}await _0x4409e1[_0x23db52(-_0x2c67c1._0xa5fefb,0x71,_0x2c67c1._0x23be22,_0x2c67c1._0x13beb1)][_0x23db52(-_0x2c67c1._0x27194c,-_0x2c67c1._0x463cde,_0x2c67c1._0xd3051e,-0x7)](_0x23db52(_0x2c67c1._0x13beb1,_0x2c67c1._0x286951,_0x2c67c1._0x5c78b0,_0x2c67c1._0x1e86ea),structuredClone(_0x370ec5),_0x4c22f9);};let _0x1f36d5=0x0;try{const _0x26c7c2=await _0xbf05c7(_0x41f1cb(0x55d,0x5c7,0x581,_0x59451e._0xa08eba),normalizeMessage(_0x180af4[_0x41f1cb(_0x59451e._0x47f077,_0x59451e._0x461bb9,_0x59451e._0x263b78,_0x59451e._0x5a4b24)]));_0x32cbc2[_0x41f1cb(0x597,_0x59451e._0x57dc38,0x54d,_0x59451e._0x6c6242)][_0x107612(_0x59451e._0x48677d,_0x59451e._0x1908db,_0x59451e._0x396358,_0x59451e._0x1313b0)](_0x26c7c2),await _0x590c9f(_0x26c7c2),await _0x3a9ad0({'type':_0x107612(0x459,_0x59451e._0xce24a9,0x45d,_0x59451e._0x4a3ac6),'message':_0x26c7c2});while(!![]){throwIfAborted(_0x189f54),_0x1f36d5+=0x1;const _0x40c094=createAssistantMessageId(_0x32cbc2[_0x41f1cb(_0x59451e._0x3146de,0x4ce,0x50b,0x530)],_0x1f36d5),_0x423484=createReasoningMessageId(_0x40c094),_0x1152e3={'model':_0x4409e1['chatModel']['model'],..._0x4409e1[_0x41f1cb(0x507,0x4f9,_0x59451e._0x45787a,0x4d6)][_0x107612(_0x59451e._0x2a8eae,0x449,_0x59451e._0x52155e,0x40a)]?{'provider':_0x4409e1[_0x107612(0x42d,0x458,_0x59451e._0x107d6d,_0x59451e._0x18a67d)][_0x41f1cb(_0x59451e._0x48afed,_0x59451e._0x9e1e91,0x509,_0x59451e._0x13ae8e)]}:{}};let _0xa3f5a9={'model':_0x4409e1['chatModel']['model'],'maxTokens':_0x4409e1[_0x107612(_0x59451e._0x2869a0,0x3d1,_0x59451e._0x40f22d,_0x59451e._0x5e7c7e)][_0x107612(_0x59451e._0x3d77af,0x40a,0x406,_0x59451e._0x2fcfb5)]??0x4000,'system':structuredClone(_0x32cbc2[_0x41f1cb(_0x59451e._0x2c6a8b,_0x59451e._0x3c9f3e,0x572,0x529)]),'messages':structuredClone(_0x32cbc2[_0x107612(0x44f,_0x59451e._0x393b60,_0x59451e._0x2e8867,_0x59451e._0x4cb6d7)]),'tools':_0x4409e1[_0x41f1cb(_0x59451e._0x58ffcf,0x5ab,_0x59451e._0x168cc0,_0x59451e._0x1b647a)][_0x107612(_0x59451e._0x4d1204,0x490,0x48f,_0x59451e._0x164c39)](),'metadata':{'sessionId':_0x32cbc2[_0x107612(_0x59451e._0x4faa4d,_0x59451e._0x339600,_0x59451e._0x29e9b2,0x488)],'turnId':_0x32cbc2[_0x41f1cb(_0x59451e._0xb51cf,0x52e,_0x59451e._0x18916b,_0x59451e._0x4bbf09)]},..._0x4409e1[_0x107612(_0x59451e._0x31cb49,0x461,0x480,_0x59451e._0x22a507)]?{'outputFormat':_0x4409e1[_0x41f1cb(_0x59451e._0x30e595,_0x59451e._0x4f4abc,_0x59451e._0x257632,0x580)]}:{}};_0xa3f5a9=await _0xbf05c7(_0x41f1cb(_0x59451e._0x5ab6d0,_0x59451e._0x4517ee,0x561,0x512),_0xa3f5a9),await _0x3a9ad0({'type':_0x107612(0x47e,0x425,0x4b3,0x456),'request':_0xa3f5a9}),_0x1152e3['turnStartedAt']=Date[_0x107612(0x423,0x442,0x426,0x41f)]();let _0x484a25=await executeModelRequest(_0xa3f5a9,_0x180af4,_0x4409e1,_0x37a508,{'assistantMessageId':_0x40c094,'reasoningMessageId':_0x423484,'meta':_0x1152e3});_0x1152e3['turnCompletedAt']=Date['now'](),_0x484a25=await _0xbf05c7('afterModelResponse',_0x484a25),await _0x3a9ad0({'type':'model_response','response':_0x484a25}),_0x32cbc2[_0x41f1cb(_0x59451e._0x14a619,_0x59451e._0x1e4fb0,0x50d,_0x59451e._0x2fe191)]=_0x484a25;let _0x4c5296=await _0xbf05c7(_0x41f1cb(_0x59451e._0x35b3e8,_0x59451e._0x41a6ef,0x531,0x537),withMessageId(responseToAssistantMessage(_0x484a25),_0x40c094));_0x4c5296=withMessageId(_0x4c5296,_0x40c094);const _0x1cbac1=getToolUseBlocks(_0x4c5296),_0x3320c1=await Promise[_0x41f1cb(_0x59451e._0x3d2ca5,_0x59451e._0x10868c,0x595,_0x59451e._0x45ae3)](_0x1cbac1[_0x107612(_0x59451e._0x22512d,0x3c4,_0x59451e._0x39a5d4,0x3fa)](_0xc4841c=>_0xbf05c7('beforeToolExecution',_0xc4841c)));_0x3320c1['length']>0x0&&(_0x4c5296=replaceToolUseBlocks(_0x4c5296,_0x3320c1));const _0x1e8163=withMessageId(_0x4c5296,_0x40c094);_0x4c5296=_0x1e8163;const _0x509247=createReasoningMessage(_0x4c5296),_0x1625a7=createAssistantTextMessage(_0x4c5296),_0x127e4e=createToolUseMessage(_0x4c5296);_0x509247&&await _0x3a9ad0({'type':_0x41f1cb(0x540,_0x59451e._0x3a5c92,0x584,_0x59451e._0x5d9807),'message':withMessageId(_0x509247,_0x423484)});_0x1625a7&&await _0x3a9ad0({'type':_0x107612(_0x59451e._0x298f1,0x4b8,_0x59451e._0x59d52b,_0x59451e._0x3c8e1f),'message':withMessageId(_0x1625a7,_0x40c094)});_0x127e4e&&await _0x3a9ad0({'type':'tool_use_message','message':withMessageId(_0x127e4e,_0x40c094)});_0x32cbc2[_0x41f1cb(_0x59451e._0x4dd021,0x559,_0x59451e._0x2010b2,_0x59451e._0x5a69de)][_0x107612(_0x59451e._0x48677d,0x462,0x438,_0x59451e._0x4d3350)](_0x1e8163);_0x3320c1[_0x107612(_0x59451e._0x2367e2,0x4ba,0x49d,_0x59451e._0x2a009d)]>0x0&&await _0x590c9f(_0x1e8163,_0x1152e3);for(const _0x563c9c of _0x3320c1){await _0x3a9ad0({'type':_0x107612(0x49e,0x4dc,0x44f,_0x59451e._0x1a9abc),'toolCall':_0x563c9c});}if(_0x3320c1[_0x41f1cb(0x532,_0x59451e._0x2010b2,_0x59451e._0x5e4a33,_0x59451e._0x5390e2)]===0x0){const _0x4baa17=await _0xbf05c7('beforeFinalOutput',_0x4c5296),_0x4e870e=withMessageId(_0x4baa17,_0x40c094);return _0x32cbc2[_0x41f1cb(_0x59451e._0x3ecf6a,0x567,_0x59451e._0x120e41,0x585)]=_0x4e870e,_0x32cbc2[_0x107612(0x44f,_0x59451e._0xe2d56d,0x46c,_0x59451e._0x2a820c)][_0x32cbc2[_0x41f1cb(0x59a,0x53a,0x54d,_0x59451e._0x5ae552)][_0x41f1cb(_0x59451e._0x25fc6f,_0x59451e._0x57dc38,_0x59451e._0x56ff2,0x5b1)]-0x1]=_0x4e870e,await _0x590c9f(_0x4e870e,_0x1152e3),await _0x3a9ad0({'type':_0x107612(_0x59451e._0x53737f,_0x59451e._0x2c35ac,0x48c,_0x59451e._0x1c94a4),'message':_0x4e870e}),throwIfAborted(_0x189f54),await _0x4409e1[_0x41f1cb(0x5b6,0x575,_0x59451e._0x249596,0x59c)][_0x107612(0x450,0x423,_0x59451e._0x3beafe,_0x59451e._0x2d18c3)](_0x107612(0x482,_0x59451e._0x14d94d,_0x59451e._0x3b3fed,_0x59451e._0x2c1bfb),_0x32cbc2,_0xa04b18),await _0x3a9ad0({'type':_0x41f1cb(0x509,_0x59451e._0x539aaa,0x550,0x520),'state':_0x32cbc2}),{'status':_0x41f1cb(0x52f,0x4f1,_0x59451e._0x3f4227,0x599),'finalMessage':_0x4e870e,'state':_0x32cbc2};}let _0x576bb7=await _0x4409e1[_0x41f1cb(_0x59451e._0x1fe871,_0x59451e._0x4e8db9,_0x59451e._0x168cc0,_0x59451e._0x4dfa53)][_0x107612(0x48f,_0x59451e._0xdd621a,_0x59451e._0x2bf9fa,_0x59451e._0x2a8983)](_0x3320c1,_0x37a508);const _0x12f7d7=_0x576bb7[_0x107612(_0x59451e._0x337281,0x42c,0x3df,0x429)](isAbortedToolResult),_0x2922ee=_0x12f7d7?_0x5d1d12:_0xbf05c7,_0x4cbe12=_0x12f7d7?_0x46cff8:_0x3a9ad0;_0x576bb7=await Promise[_0x107612(_0x59451e._0x2489a6,_0x59451e._0x34a06c,_0x59451e._0x39e464,0x43f)](_0x576bb7[_0x41f1cb(0x511,0x4c4,_0x59451e._0x269afc,0x4e3)](_0x35d56f=>_0x2922ee(_0x41f1cb(0x5ae,0x569,0x59a,0x551),_0x35d56f))),_0x32cbc2['toolResults'][_0x41f1cb(_0x59451e._0x3146de,0x546,_0x59451e._0x53643a,_0x59451e._0x25a99b)](..._0x576bb7);for(const _0x1be32c of _0x576bb7){await _0x4cbe12({'type':_0x41f1cb(_0x59451e._0x2e64a9,_0x59451e._0x587af3,0x564,0x570),'result':_0x1be32c});}const _0x5ee387=await _0x2922ee(_0x41f1cb(_0x59451e._0x487f7d,0x5bb,0x593,0x551),createToolResultUserMessage(_0x576bb7));await _0x4cbe12({'type':_0x107612(_0x59451e._0x20e1aa,_0x59451e._0x47ffe7,_0x59451e._0x3ac017,_0x59451e._0x53643b),'message':_0x5ee387}),_0x32cbc2[_0x41f1cb(_0x59451e._0x37750c,_0x59451e._0x1159ca,0x54d,_0x59451e._0x30b5a8)]['push'](_0x5ee387),await _0x590c9f(_0x5ee387);if(_0x12f7d7)return{'status':_0x107612(0x477,_0x59451e._0x4ec6df,_0x59451e._0x28588e,0x44e),'state':_0x32cbc2};}}catch(_0x32b505){if(!_0x189f54[_0x41f1cb(0x5b0,0x592,_0x59451e._0x4353be,0x51c)])throw new TurnFailedError(_0x32b505,_0x32cbc2);return{'status':_0x41f1cb(_0x59451e._0x1e9bee,_0x59451e._0x439855,0x575,_0x59451e._0x3da6af),'state':_0x32cbc2};}}function createSessionId(){const _0x3910e1={_0x170007:0x1f5,_0x13c78f:0x1b6,_0x59f4a3:0x1aa,_0x21bf1a:0x13f,_0x2143c8:0x17e},_0x146c32={_0x917fc:0x122,_0x258c5a:0xb8},_0x34563f={_0x409d36:0xb6};function _0x5024be(_0x62b8e8,_0x381399,_0x3d9a98,_0x3eff0f){return _0x7bf43b(_0x62b8e8-_0x34563f._0x409d36,_0x62b8e8,_0x3d9a98-0xe9,_0x3d9a98-0xf0);}function _0xc7738f(_0x3ec17d,_0x40ab1b,_0x298e7b,_0x1eddaf){return _0x2c6ea8(_0x3ec17d-_0x146c32._0x917fc,_0x298e7b,_0x1eddaf-0x20c,_0x1eddaf-_0x146c32._0x258c5a);}return _0xc7738f(_0x3910e1._0x170007,0x1d1,_0x3910e1._0x13c78f,_0x3910e1._0x59f4a3)+Date[_0xc7738f(0x14f,0x10b,0x175,0x151)]()+'-'+Math['random']()[_0xc7738f(0x182,0x15e,0x128,_0x3910e1._0x21bf1a)](0x10)[_0xc7738f(_0x3910e1._0x2143c8,0x181,0x1b9,0x1ce)](0x2,0xa);}function createTurnId(_0x40d386){const _0x370693={_0x24e1dd:0x1a9,_0x5c9269:0x1c4},_0x55e4b={_0xeaa43b:0x1e2,_0xb636ad:0x2a0};function _0x314449(_0x27e3b2,_0x119fa6,_0x5e4729,_0x4c93e6){return _0x7bf43b(_0x27e3b2-_0x55e4b._0xeaa43b,_0x5e4729,_0x5e4729-0x9d,_0x119fa6- -_0x55e4b._0xb636ad);}return _0x314449(-0x175,-_0x370693._0x24e1dd,-_0x370693._0x5c9269,-0x204)+_0x40d386;}function createDefaultMessage(_0x6488b5){if(_0x6488b5===void 0x0)return void 0x0;return normalizeUserInput(_0x6488b5);}function normalizeUserInput(_0x4bfd65){const _0x4caf26={_0x33e609:0x439,_0x27e817:0x412,_0x4eab77:0x434},_0x14f151={_0x36ba72:0x4a2},_0xc18ba0={_0x5bfd61:0x86};function _0xfeb255(_0x1b2edf,_0x2009a2,_0x521a70,_0x5305a5){return _0x2c6ea8(_0x1b2edf-0x55,_0x1b2edf,_0x521a70- -0x135,_0x5305a5-_0xc18ba0._0x5bfd61);}if(typeof _0x4bfd65===_0x3871db(0x477,0x401,_0x4caf26._0x33e609,0x464))return{'role':_0x3871db(0x43a,_0x4caf26._0x27e817,_0x4caf26._0x4eab77,0x490),'content':[{'type':'text','text':_0x4bfd65}]};function _0x3871db(_0x1b1b61,_0x309431,_0xdf1faf,_0x216a9c){return _0x2c6ea8(_0x1b1b61-0xec,_0x309431,_0xdf1faf-_0x14f151._0x36ba72,_0x216a9c-0x164);}return normalizeMessage(_0x4bfd65);}function resolveChatModel(_0x19f298){const _0x523d86={_0x5f3441:0x318,_0x48a52d:0x38e,_0x8e1f67:0x363,_0x18b464:0x3b5,_0x5cba09:0x37d,_0x21f1b8:0x369},_0xdced23={_0x49abd3:0x60},_0x2d9510={_0x4c9957:0x72,_0x4bfbda:0x3f};function _0x316932(_0xf5d995,_0x587aee,_0x2b0ffc,_0x17890f){return _0x2c6ea8(_0xf5d995-_0x2d9510._0x4c9957,_0xf5d995,_0x17890f-0x3ff,_0x17890f-_0x2d9510._0x4bfbda);}function _0x259fe5(_0x5e855f,_0x4bcbb3,_0xb6ca25,_0x37c628){return _0x7bf43b(_0x5e855f-0xac,_0xb6ca25,_0xb6ca25-_0xdced23._0x49abd3,_0x5e855f-0x490);}if(!_0x19f298[_0x316932(_0x523d86._0x5f3441,_0x523d86._0x48a52d,_0x523d86._0x8e1f67,0x34e)])throw new Error(_0x316932(_0x523d86._0x18b464,_0x523d86._0x5cba09,0x33f,_0x523d86._0x21f1b8));return _0x19f298['chatModel'];}function createRegistry(_0x3e536c){const _0x2368c4={_0x395e90:0xce,_0x5a30a8:0xb6,_0x1cd4e7:0xcd,_0x1f34b3:0xce,_0x3cd8f3:0xee,_0x1c7826:0x78,_0x532188:0x90,_0x140aca:0xae,_0x514869:0xd6},_0x59050a={_0xe030a:0x72};if(_0x3e536c[_0x284c3f(-_0x2368c4._0x395e90,-_0x2368c4._0x5a30a8,-_0x2368c4._0x1cd4e7,-0xa8)])return _0x3e536c[_0x284c3f(-_0x2368c4._0x1f34b3,-0xd0,-_0x2368c4._0x3cd8f3,-_0x2368c4._0x1c7826)];const _0x2cfa07=createExtensionRegistry(),_0x155f51=_0x3e536c['extensions']??[];function _0x284c3f(_0x483b0a,_0x4a4053,_0x110326,_0x376ff2){return _0x7bf43b(_0x483b0a-0x7a,_0x376ff2,_0x110326-0x1a1,_0x483b0a- -0x223);}function _0xe8fff0(_0x3de306,_0xe5a255,_0x3cf70a,_0x4e578a){return _0x2c6ea8(_0x3de306-0x18f,_0x4e578a,_0xe5a255-0x633,_0x4e578a-_0x59050a._0xe030a);}for(const _0x11d755 of _0x155f51){_0x2cfa07[_0x284c3f(-_0x2368c4._0x532188,-0xc8,-_0x2368c4._0x140aca,-_0x2368c4._0x514869)](_0x11d755);}return _0x2cfa07;}var Agent=class{[_0x2c6ea8(-0x73,-0x98,-0xa4,-0xfc)];[_0x2c6ea8(-0xa1,-0x5d,-0x72,-0x19)];[_0x2c6ea8(-0x6c,-0xdb,-0xc4,-0xd0)];[_0x2c6ea8(-0x94,-0xf9,-0xaf,-0xb4)];[_0x7bf43b(0x188,0xed,0x183,0x133)];[_0x2c6ea8(-0xf,-0x9,-0x53,0x1)];[_0x2c6ea8(-0x41,-0x90,-0x74,-0x65)];constructor(_0x213e40={}){const _0x5b1fbe={_0x565b18:0x3bc,_0x233281:0x388,_0x222a79:0xd9,_0x5eec1d:0xd3,_0x39528c:0x3a2,_0x27c3cb:0x3dd,_0x4a9e25:0xb3,_0x555857:0x73,_0x10945f:0xda,_0xc273f3:0x67,_0xe09a08:0x35c,_0x4fe9fb:0x3a6,_0x1e76da:0x37e,_0x3b39ee:0xa3,_0x57eb6c:0x52,_0x4f24a2:0x57,_0x2c1fb6:0x33b,_0x5bc199:0x36b,_0x179dbe:0x0,_0xd943a2:0x2c,_0xd8b576:0x7f,_0x497468:0x53,_0x3a8f6b:0x42,_0x45d984:0x3c5,_0x2c67fc:0x3af,_0xdb5a7c:0x430,_0x4e0ff0:0x417,_0x56fa64:0x368},_0x26c723={_0x5402a3:0x37,_0x539374:0x4f,_0x17958f:0x275},_0x505277={_0x19565d:0x57c,_0x3e239b:0x565,_0x5d5b8f:0x344,_0x373a48:0x3e2},_0x1350a2={_0x4b5a9c:0x1bd,_0x3801da:0x44},_0x235a1c={_0xae39e5:0x137,_0x1b8e71:0x605},_0xf81b32={_0x29c7b7:0x1df};this[_0x262226(0x3cc,_0x5b1fbe._0x565b18,0x3c9,_0x5b1fbe._0x233281)]=_0x213e40[_0x56057e(-_0x5b1fbe._0x222a79,-0x7b,-_0x5b1fbe._0x5eec1d,-0x7e)]??createSessionId(),this[_0x262226(_0x5b1fbe._0x39528c,_0x5b1fbe._0x27c3cb,0x3cb,0x3c3)]=0x0,this[_0x56057e(-_0x5b1fbe._0x4a9e25,-0x71,-0xaa,-_0x5b1fbe._0x555857)]=_0x213e40[_0x56057e(-_0x5b1fbe._0x10945f,-0xa2,-_0x5b1fbe._0xc273f3,-0xae)]??'',this[_0x262226(_0x5b1fbe._0xe09a08,_0x5b1fbe._0x4fe9fb,_0x5b1fbe._0x1e76da,0x3a8)]=(_0x213e40[_0x56057e(-_0x5b1fbe._0x3b39ee,-_0x5b1fbe._0x57eb6c,-_0x5b1fbe._0x4f24a2,-0x5e)]??[])[_0x262226(0x378,0x385,_0x5b1fbe._0x2c1fb6,_0x5b1fbe._0x5bc199)](normalizeMessage);function _0x56057e(_0x1ba0b7,_0x5c47c6,_0x39831e,_0x24742c){return _0x7bf43b(_0x1ba0b7-0x1c7,_0x5c47c6,_0x39831e-_0xf81b32._0x29c7b7,_0x24742c- -0x191);}this[_0x56057e(-0x1d,0xa,_0x5b1fbe._0x179dbe,-0x22)]=createDefaultMessage(_0x213e40[_0x56057e(-0x9c,-_0x5b1fbe._0xd943a2,-0xd8,-_0x5b1fbe._0xd8b576)]),this[_0x262226(0x396,0x352,0x3b6,0x373)]=createAgentMetrics({'getContextWindowLimit':_0x213e40[_0x56057e(-_0x5b1fbe._0x497468,-0x5d,-_0x5b1fbe._0x3a8f6b,-0x88)]});const _0x38c45b=_0x213e40['onEvent'],_0x438d56=async(_0x29c516,_0x17b59c)=>{this[_0x56a0d2(_0x505277._0x19565d,0x531,0x572,_0x505277._0x3e239b)][_0x569fac(0x39d,_0x505277._0x5d5b8f,_0x505277._0x373a48,0x3a8)](_0x29c516);function _0x56a0d2(_0xac6a41,_0x85b2f4,_0x3f86f4,_0xf6a1e4){return _0x56057e(_0xac6a41-0x75,_0x85b2f4,_0x3f86f4-_0x235a1c._0xae39e5,_0x3f86f4-_0x235a1c._0x1b8e71);}function _0x569fac(_0x34605a,_0x171660,_0x3a5c55,_0x1de35b){return _0x262226(_0x34605a-0x1d0,_0x3a5c55,_0x3a5c55-_0x1350a2._0x4b5a9c,_0x34605a-_0x1350a2._0x3801da);}await _0x38c45b?.(_0x29c516,_0x17b59c);};function _0x262226(_0x426fb4,_0x3c8dfa,_0x3a157d,_0x4a8af0){return _0x7bf43b(_0x426fb4-_0x26c723._0x5402a3,_0x3c8dfa,_0x3a157d-_0x26c723._0x539374,_0x4a8af0-_0x26c723._0x17958f);}const _0x512ace=createInternalToolRuntime(_0x213e40[_0x262226(0x3a9,0x3dc,_0x5b1fbe._0x45d984,0x395)]??[],{'onEvent':_0x438d56,'onToolCall':_0x213e40[_0x262226(_0x5b1fbe._0x2c67fc,0x3c0,0x431,0x3f6)]});this['deps']={'registry':createRegistry(_0x213e40),'chatModel':resolveChatModel(_0x213e40),'toolRuntime':_0x512ace,'askUser':_0x213e40['askUser'],'setTopic':_0x213e40[_0x262226(0x3d0,_0x5b1fbe._0xdb5a7c,_0x5b1fbe._0x4e0ff0,0x3fe)],'onEvent':_0x438d56,'sessionDir':_0x213e40[_0x262226(0x3a4,0x35f,0x38d,0x3a3)],'outputFormat':_0x213e40[_0x262226(_0x5b1fbe._0x56fa64,0x39a,0x3e1,0x39f)]};}get['systemPrompt'](){const _0x1df393={_0xbe61c1:0x337,_0x106a3c:0x2dd},_0xf051a8={_0x176142:0x1e8,_0x24d1f8:0x1c};function _0x23af1d(_0x3f5c07,_0x5e320a,_0xefb451,_0x22596b){return _0x2c6ea8(_0x3f5c07-_0xf051a8._0x176142,_0xefb451,_0x22596b-0x383,_0x22596b-_0xf051a8._0x24d1f8);}return this[_0x23af1d(_0x1df393._0xbe61c1,0x2b4,_0x1df393._0x106a3c,0x2df)];}['setTools'](_0x5ec8d0=[]){const _0x26830f={_0x1b03ce:0x29,_0x5b98f2:0x1c},_0xf1bfd3={_0x263098:0x9b},_0x50a201={_0x4bc715:0x29c};function _0x56c085(_0x37f10f,_0xea219d,_0x196169,_0x49920a){return _0x7bf43b(_0x37f10f-0xa0,_0xea219d,_0x196169-0x19a,_0x49920a-_0x50a201._0x4bc715);}function _0xf67c12(_0x3293cd,_0x24bcdd,_0x3d21b3,_0x3a15fd){return _0x2c6ea8(_0x3293cd-0xf7,_0x3d21b3,_0x24bcdd-_0xf1bfd3._0x263098,_0x3a15fd-0x1a3);}this[_0xf67c12(0x1b,_0x26830f._0x1b03ce,-_0x26830f._0x5b98f2,0x2d)]['toolRuntime'][_0x56c085(0x43e,0x402,0x445,0x427)](_0x5ec8d0);}[_0x7bf43b(0x147,0x129,0xb8,0x10d)](){const _0x1247c4={_0xc5131:0x636},_0x362044={_0x3af917:0x175,_0x4cd649:0x5,_0x53a50e:0x4c8};function _0x22fb21(_0x551b4a,_0x3c4d1d,_0x29281f,_0x2e80c0){return _0x7bf43b(_0x551b4a-_0x362044._0x3af917,_0x2e80c0,_0x29281f-_0x362044._0x4cd649,_0x551b4a-_0x362044._0x53a50e);}return this['deps']['toolRuntime'][_0x22fb21(_0x1247c4._0xc5131,0x637,0x688,0x64a)]();}[_0x2c6ea8(-0x85,0x5,-0x38,-0x53)](_0x1d7a2e,_0x1137c3={}){const _0x5ce69b={_0x526ac0:0x494,_0x45e3fa:0x44e,_0x5982ac:0x4c7,_0x1dfe0e:0x4f5,_0x1f8472:0x49d,_0x3a012f:0x4f5},_0x4a9d2c={_0x54389d:0x89,_0x5ac9bb:0x376},_0x3399b1={_0x2d0e93:0xfb,_0x5c20c7:0x13e};function _0x3f7733(_0x5ea2ca,_0x35b86c,_0x58dd24,_0x51b32f){return _0x7bf43b(_0x5ea2ca-0xaf,_0x35b86c,_0x58dd24-_0x3399b1._0x2d0e93,_0x51b32f-_0x3399b1._0x5c20c7);}this[_0x593eca(0x4a5,_0x5ce69b._0x526ac0,0x482,_0x5ce69b._0x45e3fa)]=_0x1d7a2e;function _0x593eca(_0x4a8803,_0x301788,_0x320885,_0x5c20f0){return _0x7bf43b(_0x4a8803-0xf5,_0x320885,_0x320885-_0x4a9d2c._0x54389d,_0x301788-_0x4a9d2c._0x5ac9bb);}_0x1137c3[_0x593eca(_0x5ce69b._0x5982ac,_0x5ce69b._0x1dfe0e,0x52f,0x4e7)]===!![]&&(this['messages']=[],this[_0x593eca(0x4ed,0x4c4,_0x5ce69b._0x1f8472,_0x5ce69b._0x3a012f)]=0x0);}[_0x2c6ea8(-0xd,-0x33,-0x56,-0x1d)](_0x43a5db){this['sessionId']=_0x43a5db;}[_0x2c6ea8(-0x7a,-0xaf,-0xaa,-0xda)](_0x197772){const _0x376772={_0x2eea78:0x16f},_0x5b006c={_0x2c7a4d:0x32,_0x4a5427:0x74,_0x27bd6f:0x11};function _0x142d47(_0xd3eb8b,_0x5474ff,_0x11fb9b,_0xa21322){return _0x7bf43b(_0xd3eb8b-_0x5b006c._0x2c7a4d,_0x11fb9b,_0x11fb9b-_0x5b006c._0x4a5427,_0xd3eb8b-_0x5b006c._0x27bd6f);}this['deps'][_0x142d47(0x122,_0x376772._0x2eea78,0xdd,0x10b)]=_0x197772;}async[_0x2c6ea8(-0x88,-0xca,-0x91,-0xb4)](_0x194515=this[_0x2c6ea8(-0xa,-0x74,-0x53,-0x31)],_0x1917a2={}){const _0x5d2a23={_0x119dde:0x47e,_0x1b296a:0x480,_0x1e9460:0x4a5,_0x4a4dd7:0x4b7,_0x4c58e7:0x44d,_0x28c7e6:0x4a9,_0x5afbb5:0x486,_0x57050a:0x47f,_0xe1bbe6:0x460,_0x16a16d:0x43a,_0x59ad44:0x471,_0x5b53a2:0x489,_0x1ce595:0x541,_0xfdd72c:0x524,_0x699e7d:0x4eb,_0x123908:0x491,_0x24c47c:0x4c2,_0x4f5950:0x486,_0x3b80a8:0x48a,_0x165053:0x4f6,_0x46bfe9:0x49c,_0xba5f7b:0x555,_0x21fd8d:0x450},_0x8709e9={_0x520334:0xf3},_0x2fb14b={_0xa855c:0x19b};function _0x5b0e9a(_0x20c29b,_0x41826b,_0x1d809a,_0x55a2d3){return _0x7bf43b(_0x20c29b-_0x2fb14b._0xa855c,_0x1d809a,_0x1d809a-0x13f,_0x20c29b-0x3f1);}function _0x577395(_0x140ec5,_0x528b63,_0x29bd53,_0xc16be8){return _0x2c6ea8(_0x140ec5-0x1ec,_0x140ec5,_0xc16be8-0x519,_0xc16be8-_0x8709e9._0x520334);}if(!_0x194515)throw new Error(_0x5b0e9a(0x505,0x4be,0x4e3,0x4fa));this[_0x577395(_0x5d2a23._0x119dde,0x456,_0x5d2a23._0x1b296a,_0x5d2a23._0x1e9460)]+=0x1;try{const _0x27c302=await runTurn({'sessionId':this[_0x577395(0x427,0x4c2,0x4c3,0x46a)],'turnId':createTurnId(this['turnIndex']),'streaming':_0x1917a2[_0x577395(_0x5d2a23._0x4a4dd7,_0x5d2a23._0x4c58e7,_0x5d2a23._0x28c7e6,0x479)],'signal':_0x1917a2[_0x577395(0x4a7,_0x5d2a23._0x5afbb5,_0x5d2a23._0x57050a,0x486)],'system':this[_0x577395(0x423,_0x5d2a23._0xe1bbe6,0x474,_0x5d2a23._0x16a16d)],'messages':this[_0x577395(_0x5d2a23._0x59ad44,_0x5d2a23._0x5b53a2,0x4bb,0x48a)],'message':normalizeUserInput(_0x194515)},this[_0x5b0e9a(_0x5d2a23._0x1ce595,0x51d,0x51f,0x580)]);return this[_0x5b0e9a(_0x5d2a23._0xfdd72c,0x507,0x55d,_0x5d2a23._0x699e7d)]=_0x27c302[_0x577395(0x47c,0x4b0,_0x5d2a23._0x123908,_0x5d2a23._0x24c47c)][_0x577395(_0x5d2a23._0x4f5950,0x457,0x4d2,_0x5d2a23._0x3b80a8)]['map'](normalizeMessage),_0x27c302;}catch(_0x10a250){if(_0x10a250 instanceof TurnFailedError){this[_0x5b0e9a(_0x5d2a23._0xfdd72c,0x556,0x4d0,0x4cd)]=synthesizeMissingToolResults(_0x10a250[_0x577395(_0x5d2a23._0x165053,_0x5d2a23._0x46bfe9,0x4f1,_0x5d2a23._0x24c47c)][_0x5b0e9a(0x524,0x4e3,_0x5d2a23._0xba5f7b,0x533)][_0x577395(_0x5d2a23._0x21fd8d,0x46d,0x427,0x44d)](normalizeMessage));throw _0x10a250['cause'];}throw _0x10a250;}}};export{normalizeToolOutputValue,createToolOutput,ToolExecutionError,defineTool,ToolRegistry,validateToolInput,deriveFinalToolOutput,createInternalToolRuntime,createExtensionRegistry,createAgentMetrics,runTurn,Agent};