@nuvin/agent-core 0.0.0-rc.8 → 0.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/VERSION +2 -2
- package/dist/agent/agent.d.ts +28 -0
- package/dist/agent/context-compactor.d.ts +8 -0
- package/dist/agent/extension-registry.d.ts +3 -0
- package/dist/agent/index.d.ts +8 -68
- package/dist/agent/index.js +1 -1
- package/dist/agent/messages-to-text.d.ts +3 -0
- package/dist/agent/metrics.d.ts +30 -0
- package/dist/agent/topic-reminder-extension.d.ts +32 -0
- package/dist/agent/turn-engine.d.ts +3 -0
- package/dist/chunk-FFIZ6TKW.js +1 -0
- package/dist/chunk-HRU363DY.js +1 -0
- package/dist/chunk-NHBKADBW.js +1 -0
- package/dist/chunk-NYZR4XKO.js +1 -1
- package/dist/chunk-QDOE7NWO.js +1 -0
- package/dist/chunk-X7VAACWY.js +1 -1
- package/dist/formats/base64-image-content.d.ts +4 -0
- package/dist/formats/index.d.ts +4 -28
- package/dist/formats/index.js +1 -1
- package/dist/formats/message-format.d.ts +33 -0
- package/dist/formats/provider-adapters.d.ts +3 -0
- package/dist/hooks/executor.d.ts +3 -0
- package/dist/hooks/extensions.d.ts +28 -0
- package/dist/hooks/index.d.ts +7 -0
- package/dist/hooks/index.js +1 -0
- package/dist/hooks/registry.d.ts +8 -0
- package/dist/hooks/types.d.ts +40 -0
- package/dist/lsp/client.d.ts +11 -0
- package/dist/lsp/index.d.ts +24 -0
- package/dist/lsp/installer.d.ts +11 -0
- package/dist/lsp/language.d.ts +2 -0
- package/dist/lsp/server.d.ts +6 -0
- package/dist/lsp/types.d.ts +68 -0
- package/dist/models/anthropic-model.d.ts +27 -0
- package/dist/models/anthropic-surface.d.ts +5 -0
- package/dist/models/chat-model.d.ts +31 -0
- package/dist/models/github-model.d.ts +32 -0
- package/dist/models/http-transport.d.ts +10 -0
- package/dist/models/index.d.ts +16 -348
- package/dist/models/index.js +1 -1
- package/dist/models/mock-model.d.ts +15 -0
- package/dist/models/model-errors.d.ts +16 -0
- package/dist/models/model-limits.d.ts +7 -0
- package/dist/models/model-registry.d.ts +44 -0
- package/dist/models/model-surface-router.d.ts +19 -0
- package/dist/models/model-transports.d.ts +17 -0
- package/dist/models/openai-model.d.ts +67 -0
- package/dist/models/openai-surfaces.d.ts +74 -0
- package/dist/models/provider-adapter.d.ts +23 -0
- package/dist/models/provider-session.d.ts +16 -0
- package/dist/models/routed-model.d.ts +90 -0
- package/dist/shared/abort.d.ts +9 -0
- package/dist/shared/index.d.ts +5 -17
- package/dist/shared/index.js +1 -1
- package/dist/shared/reasoning-config.d.ts +5 -0
- package/dist/shared/turn-failed.d.ts +6 -0
- package/dist/{types-mpqTRf_e.d.ts → shared/types.d.ts} +186 -167
- package/dist/tools/ask-user-tool.d.ts +55 -0
- package/dist/tools/bash-tool.d.ts +63 -0
- package/dist/tools/command-tool.d.ts +23 -0
- package/dist/tools/file-edit-tool.d.ts +29 -0
- package/dist/tools/file-new-tool.d.ts +21 -0
- package/dist/tools/file-read-tool.d.ts +27 -0
- package/dist/tools/glob-tool.d.ts +26 -0
- package/dist/tools/grep-tool.d.ts +34 -0
- package/dist/tools/index.d.ts +28 -773
- package/dist/tools/index.js +1 -1
- package/dist/tools/internal-tool-runtime.d.ts +8 -0
- package/dist/tools/ls-tool.d.ts +20 -0
- package/dist/tools/lsp-tool.d.ts +36 -0
- package/dist/tools/mcp-oauth-provider.d.ts +11 -0
- package/dist/tools/mcp-server-manager.d.ts +43 -0
- package/dist/tools/mcp-tool-adapter.d.ts +47 -0
- package/dist/tools/mock-tool-runtime.d.ts +3 -0
- package/dist/tools/ripgrep.d.ts +20 -0
- package/dist/tools/runtime-manager-tools.d.ts +58 -0
- package/dist/tools/safe-fetch.d.ts +36 -0
- package/dist/tools/skill-tool.d.ts +33 -0
- package/dist/tools/todo-write-tool.d.ts +66 -0
- package/dist/tools/tool-output-offload.d.ts +12 -0
- package/dist/tools/tools.d.ts +24 -0
- package/dist/tools/update-topic-tool.d.ts +12 -0
- package/dist/tools/view-file-tool.d.ts +22 -0
- package/dist/tools/web-fetch-tool.d.ts +23 -0
- package/dist/tools/web-search-tool.d.ts +75 -0
- package/dist/tools/workspace-paths.d.ts +5 -0
- package/package.json +6 -2
- package/dist/chunk-4DNIDCX7.js +0 -1
- package/dist/chunk-G2FR4UGO.js +0 -1
- package/dist/chunk-KVFXQ7HW.js +0 -1
- package/dist/provider-adapters-BGVEzrOK.d.ts +0 -5
package/dist/chunk-4DNIDCX7.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(function(_0x5c4391,_0x3c2056){const _0x557f82={_0x1151bb:0x2b4,_0x1b2190:0x2c9,_0x1e299c:0x2b6,_0x34524c:0x2c2,_0x1b3f8c:0x2d1,_0x714d3:0x2d6,_0x52f647:0x2c4,_0x2cacd3:0x2e5,_0x3e25c3:0xa8,_0x4b3587:0xa2,_0x39d34c:0x8e,_0x2ae60f:0x76,_0x183911:0x74,_0x336331:0x64,_0x44a875:0xa4,_0x1a797f:0x9b,_0x1bb7a7:0x91,_0x544913:0x2b7,_0xdd4a47:0x2b2,_0xc15ea1:0x2cd,_0x2189ac:0x2c5,_0x236dc7:0x2ec,_0x3a2c34:0xcc,_0x2f817c:0x8f,_0x26b5ba:0x92,_0x5144d4:0x82,_0x2c705d:0x81},_0x40f62e=_0x5c4391();function _0x218ec3(_0xb951e8,_0x271f64,_0x14860b,_0xffa460){return _0x43c4(_0x271f64- -0x1b2,_0x14860b);}function _0x6d52f6(_0x3836f0,_0x254546,_0x5a02df,_0xe7d175){return _0x43c4(_0x3836f0-0x1b9,_0x254546);}while(!![]){try{const _0xf4522d=parseInt(_0x6d52f6(0x2b8,0x2cc,_0x557f82._0x1151bb,0x2c8))/0x1+parseInt(_0x6d52f6(_0x557f82._0x1b2190,_0x557f82._0x1e299c,_0x557f82._0x34524c,_0x557f82._0x1b3f8c))/0x2*(-parseInt(_0x6d52f6(0x2ce,_0x557f82._0x714d3,_0x557f82._0x52f647,_0x557f82._0x2cacd3))/0x3)+-parseInt(_0x218ec3(-0x89,-0xa3,-_0x557f82._0x3e25c3,-0x8f))/0x4*(-parseInt(_0x218ec3(-_0x557f82._0x4b3587,-0x88,-_0x557f82._0x39d34c,-_0x557f82._0x2ae60f))/0x5)+parseInt(_0x218ec3(-0x74,-0x81,-_0x557f82._0x183911,-_0x557f82._0x336331))/0x6*(parseInt(_0x218ec3(-_0x557f82._0x44a875,-_0x557f82._0x1a797f,-_0x557f82._0x1bb7a7,-0xa2))/0x7)+parseInt(_0x6d52f6(_0x557f82._0x544913,_0x557f82._0xdd4a47,_0x557f82._0xc15ea1,0x299))/0x8+-parseInt(_0x6d52f6(0x2d3,0x2bd,_0x557f82._0x2189ac,_0x557f82._0x236dc7))/0x9*(parseInt(_0x218ec3(-_0x557f82._0x3a2c34,-0xb1,-0xb9,-0xba))/0xa)+-parseInt(_0x218ec3(-0x8a,-_0x557f82._0x2f817c,-0x84,-0x78))/0xb*(parseInt(_0x218ec3(-_0x557f82._0x26b5ba,-0x80,-_0x557f82._0x5144d4,-_0x557f82._0x2c705d))/0xc);if(_0xf4522d===_0x3c2056)break;else _0x40f62e['push'](_0x40f62e['shift']());}catch(_0x437f23){_0x40f62e['push'](_0x40f62e['shift']());}}}(_0x1f0f,0xc2a99));import{resolveOpenAiReasoningConfig}from'./chunk-NYZR4XKO.js';function _0x1f0f(){const _0x7c9552=['Dgv4Da','zNvUy3rPB25Fy2fSBf9VDxrWDxq','vg9VBcbYzxr1CM5LzcbPBwfNzsbJB250zw50lG','Aw5JBhvKzuvUy3j5ChrLzenVBNrLBNq','zMLSDgvY','odGWng1SB0zHEa','ndjuz0Psv1m','C3bSAwnL','y29UDgvUDa','zwzMB3j0','zNvUy3rPB24','nda0mdDmCxvuBhK','AM9PBG','ndq1ntG3og9qyMn4rW','C3vTBwfYEq','Aw5WDxrFC2nOzw1H','mJqYmvHxwKXHBG','ChjVDMLKzxjtDgf0zq','Aw5WDxq','Aw5WDxrFAw1Hz2u','o2jHC2u2ncW','BgvUz3rO','BwvZC2fNzq','DxnLCI12AxnPyMXL','Aw5WDxrFDgv4Da','nZD1r2fhsKq','DxnLCG','yxv0BW','DhjPBq','BwfW','A2v5CW','ChvZAa','mJG1nvPSzhvgAa','CM9Szq','DhLWzq','BwvKAwfFDhLWzq','C291CMnL','yxnZAxn0yw50','Dg9VBf91C2u','mtjHqKDWDuS','mZy2ndG2mhPlrMHKDa','DMLZAwjPBgL0Eq','sw1Hz2uGCMv0DxjUzwqGyNKGvMLLD0zPBguGzM9YihrVB2WGCMvZDwX0ia','B3bLBMfPuMvZCg9UC2vZt3v0Chv0','C3LZDgvT','BMfTzq','Dg9VBf9Yzxn1Bhq','zgf0yq','ndaZndrMvvfvB2i','mtm5mJq1mKnqDwT2uW','yMfZzty0','mJyZnZb4zhfKB3m','B2jQzwn0','CMvHC29UAw5N','Aw1Hz2u','C3rYAw5N','AxnbCNjHEq','Bw9KzwW','Dg9VBhm','Dg9VBf91C2vFAwq'];_0x1f0f=function(){return _0x7c9552;};return _0x1f0f();}import{normalizeContent}from'./chunk-G2FR4UGO.js';function systemToInstructions(_0x28b838){const _0x40daea={_0x3f66c2:0x38d,_0xe43d5a:0x394,_0x2855a3:0x3a6,_0x2fc16f:0x47f,_0xb1fa01:0x452},_0x5e6314={_0x1ec421:0x26d};function _0x27f6e7(_0x2035be,_0x828105,_0x118086,_0x12e64f){return _0x43c4(_0x12e64f-0x352,_0x118086);}function _0x154a96(_0x4dcef0,_0x4892af,_0x540cc0,_0x2ee151){return _0x43c4(_0x4892af-_0x5e6314._0x1ec421,_0x2ee151);}return normalizeContent(_0x28b838)['filter'](_0x1f1efb=>_0x1f1efb[_0x27f6e7(0x487,0x472,0x460,0x47e)]==='text')[_0x154a96(_0x40daea._0x3f66c2,_0x40daea._0xe43d5a,_0x40daea._0x2855a3,0x37b)](_0x12c25b=>_0x12c25b[_0x154a96(0x386,0x377,0x38e,0x38e)])[_0x27f6e7(0x46e,_0x40daea._0x2fc16f,_0x40daea._0xb1fa01,0x468)]('\x0a\x0a');}function _0x43c4(_0x29fc0c,_0x291a19){_0x29fc0c=_0x29fc0c-0xfb;const _0x1f0f33=_0x1f0f();let _0x43c455=_0x1f0f33[_0x29fc0c];if(_0x43c4['GBlbXH']===undefined){var _0x170d33=function(_0xdd3131){const _0x42b9b1='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x28b838='',_0x1f1efb='';for(let _0x12c25b=0x0,_0x5ecbac,_0x1b144f,_0x3d95cb=0x0;_0x1b144f=_0xdd3131['charAt'](_0x3d95cb++);~_0x1b144f&&(_0x5ecbac=_0x12c25b%0x4?_0x5ecbac*0x40+_0x1b144f:_0x1b144f,_0x12c25b++%0x4)?_0x28b838+=String['fromCharCode'](0xff&_0x5ecbac>>(-0x2*_0x12c25b&0x6)):0x0){_0x1b144f=_0x42b9b1['indexOf'](_0x1b144f);}for(let _0x50a464=0x0,_0x39d3dd=_0x28b838['length'];_0x50a464<_0x39d3dd;_0x50a464++){_0x1f1efb+='%'+('00'+_0x28b838['charCodeAt'](_0x50a464)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x1f1efb);};_0x43c4['VaWnBb']=_0x170d33,_0x43c4['zxMOjx']={},_0x43c4['GBlbXH']=!![];}const _0x13014d=_0x1f0f33[0x0],_0x4a8cbc=_0x29fc0c+_0x13014d,_0x282231=_0x43c4['zxMOjx'][_0x4a8cbc];return!_0x282231?(_0x43c455=_0x43c4['VaWnBb'](_0x43c455),_0x43c4['zxMOjx'][_0x4a8cbc]=_0x43c455):_0x43c455=_0x282231,_0x43c455;}function pushUserContentMessage(_0x5ecbac,_0x1b144f,_0x3d95cb){if(_0x3d95cb['length']===0x0)return;_0x5ecbac['push']({'type':'message','role':_0x1b144f,'content':_0x3d95cb});}function hasSerializableToolUse(_0x50a464){const _0x44e821={_0x5daf2c:0x2b8,_0x5d4216:0x17e,_0xba555c:0x174,_0x44f91d:0x16d,_0x49c21a:0x2f8,_0x2834a5:0x2e5,_0xf77d39:0x2c0,_0x4aaddf:0x2b0,_0x2927c8:0x2c1},_0x4b78df={_0x557da4:0x3e0};function _0x7f229a(_0x2e3b36,_0x44b01a,_0x178f69,_0x2ccb15){return _0x43c4(_0x2ccb15- -_0x4b78df._0x557da4,_0x44b01a);}function _0x2e8360(_0x52ed56,_0x29e9f0,_0x43313e,_0x49820d){return _0x43c4(_0x52ed56- -0x29d,_0x49820d);}return _0x50a464['id'][_0x7f229a(-0x2c5,-_0x44e821._0x5daf2c,-0x2c9,-0x2ba)]()[_0x2e8360(-_0x44e821._0x5d4216,-_0x44e821._0xba555c,-_0x44e821._0x44f91d,-0x19a)]>0x0&&_0x50a464[_0x7f229a(-_0x44e821._0x49c21a,-0x302,-0x2ff,-_0x44e821._0x2834a5)]['trim']()[_0x7f229a(-0x2ca,-_0x44e821._0xf77d39,-_0x44e821._0x4aaddf,-_0x44e821._0x2927c8)]>0x0;}function hasSerializableToolResult(_0x39d3dd){const _0x4b88db={_0x7cdba3:0x23c,_0x2d4648:0x228};function _0x2082f1(_0x46a336,_0x11594d,_0x59c27e,_0x6bde28){return _0x43c4(_0x46a336-0x18b,_0x6bde28);}function _0x9e6d5e(_0x5b3810,_0x1d45dc,_0x4db843,_0x13a65f){return _0x43c4(_0x5b3810-0x133,_0x1d45dc);}return _0x39d3dd[_0x9e6d5e(_0x4b88db._0x7cdba3,_0x4b88db._0x2d4648,0x24e,0x22c)][_0x2082f1(0x2b1,0x29d,0x2bd,0x2b2)]()['length']>0x0;}function isResponseInputObject(_0x3f98f9){const _0x588dc9={_0x2a5ece:0x3d1,_0x462255:0x19d,_0x6fcf8b:0x19c},_0x1a72c0={_0x4843f1:0x2cf};if(typeof _0x3f98f9!==_0x44e265(0x3e9,0x3b5,0x3cb,_0x588dc9._0x2a5ece)||_0x3f98f9===null||Array['isArray'](_0x3f98f9))return![];function _0x2214ae(_0x33dc1a,_0x2f0798,_0x558b97,_0x4386a3){return _0x43c4(_0x4386a3-0x6c,_0x558b97);}const _0x2fdf8b=_0x3f98f9;function _0x44e265(_0xf0d463,_0x47cd75,_0xaf22fc,_0x2acbd2){return _0x43c4(_0x2acbd2-_0x1a72c0._0x4843f1,_0xf0d463);}return typeof _0x2fdf8b[_0x2214ae(_0x588dc9._0x462255,0x17c,_0x588dc9._0x6fcf8b,0x198)]===_0x2214ae(0x15e,0x163,0x18f,0x171);}function isImageToolResultBlock(_0x9771d2){const _0x551560={_0x4774b5:0x268,_0x404004:0x252,_0x8ca1ff:0x264,_0x317e03:0x253,_0x4ecc67:0x250,_0x2a3f11:0x233,_0x28d560:0x273,_0x1dd8cf:0x267,_0x2fb6d9:0x285,_0xcea1e:0x271,_0x4ab75d:0x250,_0x5339e0:0x254,_0x45130a:0x239,_0x3f06d5:0x27a,_0x17b32f:0x27b,_0xba6a11:0x277,_0x2a0552:0x279,_0x43ca0d:0x28e,_0x4604e2:0x24a,_0x235b48:0x251,_0x1c0848:0x248,_0xaadad5:0x26a,_0x4a1489:0x267,_0x218f12:0x22c,_0x122469:0x234,_0x6e39c7:0x247,_0x4f5632:0x24c,_0x44cfc8:0x221,_0x1e56d2:0x23e},_0x1f01ef={_0x356359:0x139};function _0x1e1805(_0x48fe13,_0x1e488f,_0x2d63c2,_0x120f94){return _0x43c4(_0x120f94-_0x1f01ef._0x356359,_0x2d63c2);}if(typeof _0x9771d2!=='object'||_0x9771d2===null||Array[_0x63a48f(_0x551560._0x4774b5,_0x551560._0x404004,_0x551560._0x8ca1ff,_0x551560._0x317e03)](_0x9771d2))return![];function _0x63a48f(_0x23979c,_0x49c31a,_0xab086b,_0x4e9906){return _0x43c4(_0x49c31a-0x14c,_0x23979c);}const _0x19e219=_0x9771d2;return _0x19e219[_0x63a48f(0x27c,0x278,0x262,0x292)]===_0x63a48f(0x234,_0x551560._0x4ecc67,0x265,_0x551560._0x2a3f11)&&_0x19e219[_0x1e1805(_0x551560._0x28d560,0x263,0x27f,_0x551560._0x1dd8cf)]?.[_0x63a48f(0x295,0x278,_0x551560._0x2fb6d9,_0x551560._0xcea1e)]===_0x1e1805(0x226,_0x551560._0x4ab75d,_0x551560._0x5339e0,_0x551560._0x45130a)&&typeof _0x19e219[_0x63a48f(0x285,_0x551560._0x3f06d5,0x292,_0x551560._0x17b32f)][_0x63a48f(_0x551560._0xba6a11,_0x551560._0x2a0552,_0x551560._0x43ca0d,0x26c)]===_0x63a48f(_0x551560._0x4604e2,_0x551560._0x235b48,0x265,_0x551560._0x1c0848)&&typeof _0x19e219[_0x1e1805(0x276,_0x551560._0x4ecc67,_0x551560._0xaadad5,_0x551560._0x4a1489)][_0x63a48f(_0x551560._0x218f12,0x249,_0x551560._0x122469,0x259)]===_0x1e1805(_0x551560._0x6e39c7,_0x551560._0x4f5632,_0x551560._0x44cfc8,_0x551560._0x1e56d2);}function getToolResultText(_0x48bcd2){const _0x35bd7d={_0x14529c:0xb9,_0x889517:0x8d,_0x2d26d7:0x29d,_0xb6899b:0x2a9,_0x3662f7:0x2c6,_0x8a68d8:0x28a,_0x221450:0x280,_0x3d091a:0x289,_0x473454:0x2a9,_0x4103b3:0x28f,_0x4b1069:0x2a0,_0x5da4ec:0x283,_0x3ec050:0x99,_0x3bde0b:0x95,_0x28b00a:0xae,_0x60532d:0x7d,_0x62c963:0x79},_0x37818d={_0x3dd648:0x13b,_0x4db0e2:0x13f,_0x11a5c3:0x9b,_0x51bf7c:0xac,_0x1436f2:0xb1},_0x4c3d78={_0x52c9bf:0x168,_0x437630:0x200},_0x344e42={_0x310a05:0x1cb},_0x2a0757={_0x5efc18:0x1a1},_0x4e36b3={_0x4158dd:0x3b6};function _0xb0bf69(_0x398183,_0xe87b06,_0x1c95ea,_0x3c29e5){return _0x43c4(_0x1c95ea- -_0x4e36b3._0x4158dd,_0x3c29e5);}if(typeof _0x48bcd2===_0x142cbe(-0x9c,-_0x35bd7d._0x14529c,-_0x35bd7d._0x889517,-0x91))return _0x48bcd2;function _0x142cbe(_0xd5e20,_0x404950,_0x5bfb22,_0x4c791d){return _0x43c4(_0xd5e20- -_0x2a0757._0x5efc18,_0x5bfb22);}const _0x790114=_0x48bcd2[_0xb0bf69(-_0x35bd7d._0x2d26d7,-_0x35bd7d._0xb6899b,-0x2a8,-_0x35bd7d._0x3662f7)](_0x3526e4=>{function _0x290dce(_0x10a7b7,_0x40b19d,_0x313c62,_0x2229bd){return _0x142cbe(_0x40b19d-_0x344e42._0x310a05,_0x40b19d-0x21,_0x10a7b7,_0x2229bd-0xba);}function _0x10fa3e(_0x216c6c,_0x365061,_0x249088,_0x39a122){return _0xb0bf69(_0x216c6c-0x151,_0x365061-_0x4c3d78._0x52c9bf,_0x365061-_0x4c3d78._0x437630,_0x39a122);}return typeof _0x3526e4===_0x290dce(0x118,0x12c,_0x37818d._0x3dd648,0x144)&&_0x3526e4!==null&&_0x3526e4[_0x290dce(_0x37818d._0x4db0e2,0x156,0x152,0x15c)]===_0x10fa3e(-_0x37818d._0x11a5c3,-_0x37818d._0x51bf7c,-0xac,-_0x37818d._0x1436f2);})[_0xb0bf69(-_0x35bd7d._0x8a68d8,-_0x35bd7d._0x221450,-0x28f,-_0x35bd7d._0x3d091a)](_0x2316ee=>_0x2316ee[_0xb0bf69(-0x2a8,-0x297,-0x2ac,-0x2b6)])[_0xb0bf69(-_0x35bd7d._0x473454,-_0x35bd7d._0x4103b3,-_0x35bd7d._0x4b1069,-_0x35bd7d._0x5da4ec)]('\x0a\x0a')[_0x142cbe(-0x7b,-0x71,-_0x35bd7d._0x3ec050,-0x7b)]();return _0x790114['length']>0x0?_0x790114:_0x142cbe(-_0x35bd7d._0x3bde0b,-_0x35bd7d._0x28b00a,-_0x35bd7d._0x60532d,-_0x35bd7d._0x62c963);}function getToolResultImages(_0x5b7494){const _0x101b4d={_0x4dabee:0x4d6,_0x55ce01:0x4f9,_0x555d20:0x4cc,_0x37b65b:0x4df};function _0x219565(_0x572b63,_0x1ce9c5,_0xdf0096,_0x592701){return _0x43c4(_0x592701-0x3d1,_0x572b63);}return Array['isArray'](_0x5b7494)?_0x5b7494[_0x219565(_0x101b4d._0x4dabee,_0x101b4d._0x55ce01,_0x101b4d._0x555d20,_0x101b4d._0x37b65b)](isImageToolResultBlock):[];}function resolveReasoningVisibility(_0x5b02a6){const _0x19b6c0={_0x2677e3:0x55,_0x22133f:0x75,_0x19f39c:0x69,_0x53bb13:0xac,_0x2c7964:0x9a,_0x30cdb5:0x42},_0x5b6285={_0x5555da:0x1cd};function _0xc07f8b(_0x18774b,_0x41e760,_0x5b446a,_0x56840e){return _0x43c4(_0x5b446a- -_0x5b6285._0x5555da,_0x18774b);}function _0x3332e6(_0x208d3c,_0x334207,_0x14122e,_0x52034e){return _0x43c4(_0x14122e- -0x16c,_0x52034e);}return _0x5b02a6[_0x3332e6(-_0x19b6c0._0x2677e3,-_0x19b6c0._0x22133f,-_0x19b6c0._0x19f39c,-0x4d)]?.[_0xc07f8b(-0xa8,-_0x19b6c0._0x53bb13,-_0x19b6c0._0x2c7964,-0xa2)]??_0x3332e6(-0x42,-_0x19b6c0._0x30cdb5,-0x4b,-0x5c);}function createOpenAiResponsesReasoning(_0x5a23d4){const _0x184d98={_0x1f6ce8:0x2ca,_0x259867:0x2c3,_0x506cbf:0x29a,_0x3cf58a:0x2c1,_0x4a3daa:0x2b6,_0x3810e7:0x2a6,_0x276a15:0x290,_0x9f10c2:0x162,_0xa41e6:0x2a7,_0x18f895:0x2c8,_0x1b8b23:0x291,_0x5968f7:0x2a8,_0x1d6ebc:0x2af,_0x2c5cf2:0x299,_0x1f1657:0x2ba,_0x5f4bd5:0x2c5,_0x5d1c47:0x29f,_0x46f0fe:0x29f},_0x175eaa=resolveOpenAiReasoningConfig(_0x5a23d4[_0x1ec062(-_0x184d98._0x1f6ce8,-0x2c2,-0x2c4,-_0x184d98._0x259867)]);if(!_0x175eaa)return{};function _0x1ec062(_0x567f2c,_0x337ed4,_0x32146b,_0x55d4a4){return _0x43c4(_0x32146b- -0x3c7,_0x567f2c);}const _0x19290e={},_0x3230e1=_0x175eaa[_0x1ec062(-0x2c7,-_0x184d98._0x506cbf,-0x2af,-0x296)]??(resolveReasoningVisibility(_0x5a23d4)===_0x1ec062(-_0x184d98._0x3cf58a,-_0x184d98._0x4a3daa,-_0x184d98._0x3810e7,-_0x184d98._0x276a15)?_0x41ed4f(-_0x184d98._0x9f10c2,-0x16b,-0x181,-0x150):void 0x0);_0x175eaa['effort']&&(_0x19290e[_0x1ec062(-_0x184d98._0xa41e6,-0x297,-0x2b4,-0x29a)]=_0x175eaa[_0x1ec062(-0x297,-0x2b5,-0x2b4,-_0x184d98._0x18f895)]);_0x3230e1&&(_0x19290e[_0x1ec062(-_0x184d98._0x1b8b23,-_0x184d98._0x5968f7,-_0x184d98._0x1d6ebc,-_0x184d98._0x2c5cf2)]=_0x3230e1);function _0x41ed4f(_0x14c3ec,_0x117096,_0x29817e,_0x30b298){return _0x43c4(_0x117096- -0x290,_0x14c3ec);}return{..._0x175eaa[_0x1ec062(-_0x184d98._0x4a3daa,-0x2cf,-_0x184d98._0x1f1657,-_0x184d98._0x5f4bd5)]===![]?{}:{'include':['reasoning.encrypted_content']},...Object[_0x1ec062(-0x2a3,-_0x184d98._0x5d1c47,-_0x184d98._0x46f0fe,-0x286)](_0x19290e)['length']>0x0?{'reasoning':_0x19290e}:{}};}function pushAssistantProviderState(_0x1b462b,_0x225be0){const _0x5785d6={_0x36d415:0x3b9,_0x4503bc:0x3b9,_0x324436:0x3b5,_0x2a598c:0x3bd,_0x2d8fdc:0x3d8,_0x52b19e:0x3da,_0x123e0b:0x496,_0x5e688a:0x4ac,_0x5419d9:0x3c3,_0x2f74df:0x3cc,_0xb3daf0:0x3c8,_0x2183f5:0x394,_0x2fb008:0x3b7,_0x480299:0x3b4,_0x13a7ab:0x3a6};function _0x200bb1(_0x43435c,_0x5b5b9c,_0x28bf19,_0xa54ed5){return _0x43c4(_0x43435c-0x28e,_0x5b5b9c);}if(_0x225be0[_0x200bb1(_0x5785d6._0x36d415,_0x5785d6._0x4503bc,_0x5785d6._0x324436,0x3c1)]!==_0x200bb1(_0x5785d6._0x2a598c,_0x5785d6._0x2d8fdc,0x3bc,_0x5785d6._0x52b19e))return![];function _0x5d5d95(_0x5f2449,_0xfe1cd1,_0x1d3d7d,_0x3aeb19){return _0x43c4(_0x5f2449-0x37c,_0x1d3d7d);}const _0x4ac8a1=_0x225be0[_0x5d5d95(0x497,_0x5785d6._0x123e0b,0x47c,_0x5785d6._0x5e688a)]?.[_0x200bb1(_0x5785d6._0x5419d9,_0x5785d6._0x2f74df,_0x5785d6._0xb3daf0,0x3a5)]??[];if(_0x4ac8a1[_0x200bb1(0x3ad,0x3af,_0x5785d6._0x2183f5,0x395)]===0x0)return![];for(const _0x27c8ea of _0x4ac8a1){isResponseInputObject(_0x27c8ea)&&_0x1b462b[_0x200bb1(_0x5785d6._0x2fb008,_0x5785d6._0x480299,0x3c7,_0x5785d6._0x13a7ab)](structuredClone(_0x27c8ea));}return!![];}function toOpenAiResponsesRequest(_0x4d5053){const _0x4f1307={_0x45cae5:0x16,_0x5a4610:0x2d,_0x12a5b1:0x15,_0x21a8fe:0x289,_0x19796e:0x293,_0x53213e:0x29d,_0xb49b76:0x2a0,_0x5fd075:0x26,_0x343ff3:0x24,_0x4c6c90:0x292,_0x465c2e:0x2a8,_0x2d69a2:0x2b8,_0x22c79a:0x280,_0x244cb3:0x3b,_0xb002ed:0x21,_0x57a854:0x11,_0xd70be8:0x32,_0xb95c53:0x14,_0x287a90:0x27e,_0x29f25d:0x26c,_0x13a239:0x9,_0x82a438:0x1b,_0x40c81f:0x27e,_0x43f988:0x285,_0x122b86:0x1c,_0x17016a:0x4,_0x487c2f:0x22,_0x5f4d6d:0x34,_0x318db5:0x23,_0x2c37af:0x2b9,_0x40f44d:0x2bb,_0x23452d:0x290,_0x10ed8c:0x27d,_0x3f24a6:0x28d,_0x181576:0x288,_0x45c202:0x2b0,_0x3289e3:0x2be,_0x5ef257:0x2c1,_0x1ea5d8:0x16,_0x51d974:0x1,_0x406306:0x21,_0x5ed6f5:0x31,_0xb6668c:0x5,_0x5b8279:0x3,_0x3d8467:0x26,_0x4b4dea:0x2a3,_0x474f8d:0x2b4,_0x275047:0x2bd,_0x30b920:0x17,_0x100949:0xd,_0x3d44a4:0x28,_0x480094:0xa,_0x139608:0x28b,_0x347c64:0x25b,_0x540d4f:0x297,_0x88b4c9:0x287,_0x50c2a2:0x285,_0x158d1e:0x4,_0x38453e:0x25c,_0x4edf86:0x9,_0x18f4aa:0xe,_0x5a084a:0x2b},_0x6c2035={_0x331fb6:0x136,_0x4826cc:0x109,_0x2d7a5f:0x109,_0x472c98:0x18a,_0x2202e1:0x173},_0x34df72={_0x3d8c38:0x198,_0x3ffcce:0x10a,_0x118887:0x1c0},_0x29f1c8={_0x228308:0x3ac},_0x596972={_0x16bae7:0xfc},_0x286ae6=[];for(const _0x71b2d8 of _0x4d5053['messages']){if(pushAssistantProviderState(_0x286ae6,_0x71b2d8))continue;const _0x1a2f21=[];for(const _0x33b9a0 of normalizeContent(_0x71b2d8[_0x4e0bde(-0x1,0x6,_0x4f1307._0x45cae5,_0x4f1307._0x5a4610)])){if(_0x33b9a0[_0x4e0bde(_0x4f1307._0x12a5b1,0x4e,0x30,0x40)]===_0x4f63cf(-0x2a2,-_0x4f1307._0x21a8fe,-_0x4f1307._0x19796e,-_0x4f1307._0x53213e)){_0x1a2f21[_0x4f63cf(-0x283,-_0x4f1307._0xb49b76,-0x284,-0x28a)]({'type':_0x4e0bde(0x25,0x18,_0x4f1307._0x5fd075,_0x4f1307._0x343ff3),'text':_0x33b9a0[_0x4f63cf(-0x2a2,-0x284,-_0x4f1307._0x4c6c90,-0x29a)]});continue;}if(_0x33b9a0['type']===_0x4f63cf(-_0x4f1307._0x465c2e,-_0x4f1307._0x2d69a2,-0x28b,-0x28e)){_0x1a2f21[_0x4f63cf(-0x283,-0x29d,-0x280,-_0x4f1307._0x22c79a)]({'type':_0x4e0bde(0x1b,_0x4f1307._0x244cb3,_0x4f1307._0xb002ed,_0x4f1307._0x57a854),'image_url':'data:'+_0x33b9a0[_0x4e0bde(0x25,0x45,_0x4f1307._0xd70be8,0x45)][_0x4e0bde(_0x4f1307._0xb95c53,0x45,0x31,0x28)]+';base64,'+_0x33b9a0[_0x4f63cf(-_0x4f1307._0x287a90,-_0x4f1307._0x29f25d,-0x27e,-0x265)][_0x4e0bde(_0x4f1307._0x13a239,0x1b,0x1,_0x4f1307._0x82a438)]});continue;}pushUserContentMessage(_0x286ae6,_0x71b2d8[_0x4f63cf(-0x281,-_0x4f1307._0x40c81f,-0x263,-_0x4f1307._0x43f988)],_0x1a2f21[_0x4e0bde(0x0,_0x4f1307._0x122b86,0x15,-_0x4f1307._0x17016a)](0x0));if(_0x33b9a0['type']===_0x4e0bde(0x45,_0x4f1307._0x487c2f,_0x4f1307._0x5f4d6d,_0x4f1307._0x318db5)){if(!hasSerializableToolUse(_0x33b9a0))continue;_0x286ae6['push']({'type':'function_call','call_id':_0x33b9a0['id'],'name':_0x33b9a0[_0x4f63cf(-0x2b1,-_0x4f1307._0x2c37af,-_0x4f1307._0x40f44d,-0x2b8)],'arguments':JSON['stringify'](_0x33b9a0[_0x4f63cf(-_0x4f1307._0x23452d,-_0x4f1307._0x10ed8c,-0x293,-_0x4f1307._0x287a90)]??{})});continue;}if(_0x33b9a0[_0x4f63cf(-0x280,-0x26d,-_0x4f1307._0x3f24a6,-_0x4f1307._0x181576)]===_0x4f63cf(-_0x4f1307._0x45c202,-_0x4f1307._0x3289e3,-_0x4f1307._0x5ef257,-0x2a8)){if(!hasSerializableToolResult(_0x33b9a0))continue;const _0xd9e25=getToolResultText(_0x33b9a0[_0x4e0bde(0x29,-0x1,_0x4f1307._0x1ea5d8,-_0x4f1307._0x51d974)]);_0x286ae6[_0x4e0bde(0x21,_0x4f1307._0x406306,0x2d,_0x4f1307._0x5ed6f5)]({'type':_0x4e0bde(_0x4f1307._0xb6668c,-_0x4f1307._0x5b8279,0xf,_0x4f1307._0x3d8467),'call_id':_0x33b9a0[_0x4f63cf(-_0x4f1307._0x4b4dea,-_0x4f1307._0x474f8d,-_0x4f1307._0x275047,-0x2b5)],'output':_0xd9e25});const _0x21b16e=getToolResultImages(_0x33b9a0[_0x4e0bde(_0x4f1307._0x30b920,0x13,0x16,_0x4f1307._0x487c2f)]);_0x21b16e['length']>0x0&&_0x286ae6['push']({'type':_0x4e0bde(0x27,_0x4f1307._0x100949,0x24,0x1d),'role':_0x4e0bde(0x37,0xe,_0x4f1307._0x3d44a4,_0x4f1307._0x480094),'content':[{'type':_0x4f63cf(-0x28a,-0x289,-0x2a2,-0x281),'text':_0x4f63cf(-0x278,-0x25d,-_0x4f1307._0x139608,-_0x4f1307._0x347c64)+_0x33b9a0[_0x4f63cf(-0x2a3,-0x2a7,-_0x4f1307._0x540d4f,-_0x4f1307._0x88b4c9)]+'.'},..._0x21b16e['map'](_0x12229e=>({'type':_0x4f63cf(-0x28f,-0x290,-0x280,-0x29f),'image_url':'data:'+_0x12229e[_0x4f63cf(-0x27e,-0x269,-0x265,-0x28d)]['media_type']+_0x4f63cf(-0x28e,-0x287,-0x2a8,-0x279)+_0x12229e[_0x4e0bde(0x23,0x2c,0x32,0x1a)]['data']}))]});}}pushUserContentMessage(_0x286ae6,_0x71b2d8[_0x4f63cf(-0x281,-_0x4f1307._0x43f988,-0x27d,-_0x4f1307._0x50c2a2)],_0x1a2f21);}function _0x4e0bde(_0x5c76f3,_0xfb14fe,_0x2a8af4,_0x1c5840){return _0x43c4(_0x2a8af4- -_0x596972._0x16bae7,_0x5c76f3);}function _0x4f63cf(_0x4f7603,_0xef96f6,_0x4324e9,_0x2f768e){return _0x43c4(_0x4f7603- -_0x29f1c8._0x228308,_0x4324e9);}return{...createOpenAiResponsesReasoning(_0x4d5053),'model':_0x4d5053[_0x4e0bde(_0x4f1307._0x158d1e,0x17,0xb,0x25)],'instructions':systemToInstructions(_0x4d5053[_0x4f63cf(-0x276,-0x262,-_0x4f1307._0x38453e,-0x259)]),'input':_0x286ae6,'max_output_tokens':_0x4d5053['maxTokens'],'tools':_0x4d5053[_0x4e0bde(_0x4f1307._0x4edf86,-_0x4f1307._0x18f4aa,0xc,0x12)][_0x4e0bde(_0x4f1307._0x5a084a,_0x4f1307._0xb95c53,0x2b,0x47)](_0x3929ed=>{const _0x3ff613={_0x2b66e5:0x39,_0x408568:0x10};function _0x14b7ec(_0x1db9bc,_0x544634,_0x12d5c7,_0x253c22){return _0x4f63cf(_0x1db9bc-0x109,_0x544634-_0x3ff613._0x2b66e5,_0x544634,_0x253c22-_0x3ff613._0x408568);}function _0x26dad8(_0x10fa18,_0xf5f51f,_0x5774cb,_0x579a57){return _0x4e0bde(_0x579a57,_0xf5f51f-_0x34df72._0x3d8c38,_0xf5f51f-_0x34df72._0x3ffcce,_0x579a57-_0x34df72._0x118887);}return{'type':_0x26dad8(_0x6c2035._0x331fb6,0x122,0x135,_0x6c2035._0x4826cc),'name':_0x3929ed[_0x26dad8(0x120,_0x6c2035._0x2d7a5f,0x125,0x118)],'description':_0x3929ed['description'],'parameters':_0x3929ed[_0x14b7ec(-_0x6c2035._0x472c98,-0x17d,-0x191,-_0x6c2035._0x2202e1)]};})};}export{toOpenAiResponsesRequest};
|
package/dist/chunk-G2FR4UGO.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(function(_0x3c388d,_0xf0cbf5){const _0x100a71={_0xf54a8a:0x239,_0x2533b9:0x22d,_0x5999b4:0x230,_0x4d71b3:0xa,_0x528707:0x2f,_0x432e9c:0x240,_0x317c0c:0x239,_0x19d2cb:0x23e,_0x591680:0x251,_0x331d86:0x251,_0x2d9566:0x15,_0x5e4ae8:0x25,_0x5ebad5:0x37,_0xef0c33:0x30,_0x5a1bc6:0x29,_0x22311c:0x238,_0x5ecd44:0x24f,_0x5b2a52:0x24e,_0x211f72:0x257,_0x144a93:0x229,_0x37157a:0x229,_0x2af85e:0x5e,_0x3c7884:0x241},_0x21d85f={_0x42bca6:0x12e};function _0xb2d9e1(_0x415773,_0x32274e,_0x45062c,_0x7bccdf){return _0x584d(_0x415773-0xd9,_0x7bccdf);}const _0x42c202=_0x3c388d();function _0x5ab78b(_0x1fe330,_0x10d2c3,_0x3ca648,_0x262fc7){return _0x584d(_0x3ca648- -_0x21d85f._0x42bca6,_0x262fc7);}while(!![]){try{const _0x2ccd3b=-parseInt(_0xb2d9e1(_0x100a71._0xf54a8a,_0x100a71._0x2533b9,_0x100a71._0x5999b4,0x21c))/0x1+parseInt(_0x5ab78b(0x36,_0x100a71._0x4d71b3,0x1f,_0x100a71._0x528707))/0x2+-parseInt(_0xb2d9e1(_0x100a71._0x432e9c,0x258,_0x100a71._0x317c0c,_0x100a71._0x19d2cb))/0x3*(-parseInt(_0xb2d9e1(_0x100a71._0x591680,_0x100a71._0x331d86,0x252,0x26c))/0x4)+parseInt(_0x5ab78b(0x2c,_0x100a71._0x2d9566,_0x100a71._0x5e4ae8,0x36))/0x5*(parseInt(_0x5ab78b(_0x100a71._0x5ebad5,0x39,_0x100a71._0xef0c33,_0x100a71._0x5a1bc6))/0x6)+-parseInt(_0x5ab78b(0x44,0x2d,0x2d,0x3f))/0x7*(parseInt(_0xb2d9e1(_0x100a71._0x22311c,0x22e,_0x100a71._0x5ecd44,0x252))/0x8)+parseInt(_0xb2d9e1(_0x100a71._0x5b2a52,_0x100a71._0x22311c,0x24d,_0x100a71._0x211f72))/0x9*(parseInt(_0xb2d9e1(0x223,0x233,_0x100a71._0x144a93,_0x100a71._0x37157a))/0xa)+-parseInt(_0x5ab78b(0x2e,_0x100a71._0x2af85e,0x43,0x2d))/0xb*(parseInt(_0xb2d9e1(_0x100a71._0x3c7884,0x24d,0x258,0x244))/0xc);if(_0x2ccd3b===_0xf0cbf5)break;else _0x42c202['push'](_0x42c202['shift']());}catch(_0x581b60){_0x42c202['push'](_0x42c202['shift']());}}}(_0xb23c,0xcc446));function createTextBlock(_0x277879){const _0xe58c6a={_0x4e4e46:0x178};function _0x498295(_0x5dfb94,_0x51881b,_0x56d105,_0x51300f){return _0x584d(_0x5dfb94- -0x2d6,_0x51881b);}return{'type':_0x498295(-0x187,-0x1a2,-_0xe58c6a._0x4e4e46,-0x193),'text':_0x277879};}function normalizeTextBlock(_0x4f83eb){return createTextBlock(_0x4f83eb['text']??'');}function normalizeContent(_0x4aa6d1){const _0x1c0240={_0x435544:0x2bd,_0x5433d6:0x2b0,_0x2a5285:0x2c6,_0x1f15db:0x2eb,_0x1e48b9:0x2d3,_0x56c978:0x2bf,_0x18189a:0x2b9},_0x2fb2a0={_0x4ed5e2:0x12d};function _0x324407(_0x5a6a31,_0x3bc22d,_0x3835ee,_0x149ec8){return _0x584d(_0x149ec8-0x15f,_0x5a6a31);}function _0x32b5b5(_0x294928,_0x57e2c5,_0x55ee03,_0x466453){return _0x584d(_0x294928-_0x2fb2a0._0x4ed5e2,_0x57e2c5);}if(typeof _0x4aa6d1===_0x324407(_0x1c0240._0x435544,0x2c1,0x2c2,_0x1c0240._0x5433d6))return[createTextBlock(_0x4aa6d1)];if(!Array[_0x324407(0x2ed,_0x1c0240._0x2a5285,_0x1c0240._0x1f15db,_0x1c0240._0x1e48b9)](_0x4aa6d1))return[];return _0x4aa6d1[_0x324407(0x2df,_0x1c0240._0x56c978,_0x1c0240._0x18189a,0x2c4)](_0x30f8fe=>{if(_0x30f8fe['type']==='text')return normalizeTextBlock(_0x30f8fe);return structuredClone(_0x30f8fe);});}function normalizeSystem(_0x9a9d23=[]){return normalizeContent(_0x9a9d23)['filter'](_0x3cdeda=>_0x3cdeda['type']==='text');}function _0xb23c(){const _0x2e495c=['mtyXntG0mtbltgvhq3O','Bw9KzwW','Aw5WDxruB2TLBNm','mJe1nZa1nMDnsxvLEq','CMvHC29UAw5Nvg9Rzw5Z','Dgv4Da','C3rVCf9YzwfZB24','C3rYAw5N','Bwv0ywrHDge','mtvlDxzeu0G','y29UDgvUDa','zw5JCNLWDgvKq29UDgvUDa','DhLWzq','DhvYBL9Pza','C2vZC2LVBKLK','DhvYBKLK','BgvUz3rO','nty5mdKZwvzswKn4','ChjVDMLKzxjtDgf0zq','zMXHDe1HCa','oty3mJu0y05RDgPv','ndbSvgjQqNG','nZqZnJDnsKzfBeO','yxnZAxn0yw50','C3LZDgvT','Aw5WDxrFDg9Rzw5Z','DgHPBMTPBMC','BwfW','B3bLBMfPx3jLyxnVBMLUzW','m3HgqKnTDq','mta0mJHyDxz3vxO','Dg9VBf91C2u','CM9Szq','DxnLCG','DhjPBq','yw50AhjVCgLJx3jLzgfJDgvKx3rOAw5RAw5N','zMLSDgvY','y2XHDwrLlxnVBM5LDc00ltiWmJuWnte0','CMvHC29UAw5N','ndm4mZvjyLPyDva','AM9PBG','C3vTBwfYEq','AxnbCNjHEq','ou9MD3rIsq','B3v0Chv0','DxnHz2u','nJqXmdaZnMvjwKfKwG','yw50AhjVCgLJx3rOAw5RAw5N','kgvUy3j5ChrLzcbYzwfZB25PBMCP','Bwf4vg9Rzw5Z','Dg9VBf9Yzxn1Bhq','B3v0Chv0x3rVA2vUCW','Dg9VBhm','Bwf4x3rVA2vUCW','B3v0Chv0vg9Rzw5Z','CMvHC29UAw5Nx3rVA2vUCW','BwvZC2fNzxm'];_0xb23c=function(){return _0x2e495c;};return _0xb23c();}function normalizeMessage(_0x3af569){const _0x567487={_0x2cbcc6:0x2c,_0x2e5767:0x42,_0x2d4244:0x42,_0x46c356:0xa1},_0x39df90={_0x104b93:0x128},_0x2f7e2c={_0x1c76c4:0xc4};function _0x1befd4(_0x25a906,_0x49faa7,_0x173f11,_0x23f9ae){return _0x584d(_0x173f11- -_0x2f7e2c._0x1c76c4,_0x49faa7);}function _0x126da0(_0x484a04,_0x56341b,_0xd2f0e1,_0x18c099){return _0x584d(_0xd2f0e1- -_0x39df90._0x104b93,_0x18c099);}return{...typeof _0x3af569['id']===_0x1befd4(0x76,0xa0,0x8d,0xa1)?{'id':_0x3af569['id']}:{},'role':_0x3af569[_0x126da0(_0x567487._0x2cbcc6,0x4f,_0x567487._0x2e5767,_0x567487._0x2d4244)],'content':normalizeContent(_0x3af569[_0x1befd4(0x84,0xa8,0x90,0x94)]),..._0x3af569[_0x1befd4(0xa5,0x94,0x98,_0x567487._0x46c356)]?{'providerState':structuredClone(_0x3af569['providerState'])}:{}};}function compileRequest(_0x464715){const _0x4b51d8={_0x2c65b9:0x8b,_0x4cb73e:0x82,_0x2fd9a3:0x1d7,_0x574483:0x6c,_0x28878f:0x71,_0x15f918:0x5f,_0x463105:0x7d,_0x2420a7:0x79,_0x55bfe8:0x61,_0x1bfac4:0x4a,_0x2c2ba8:0x1cb,_0x1d0b5b:0x1f7,_0x3135c1:0x88,_0x5230d0:0x72},_0xcbb241={_0x148084:0x1c6},_0x1fdbbc={_0x47a4ad:0x32a};function _0x2ab1f4(_0x4f4ba1,_0xc557a1,_0x343a17,_0x18a726){return _0x584d(_0xc557a1- -_0x1fdbbc._0x47a4ad,_0x18a726);}function _0x5c7357(_0x2d8162,_0x216a8f,_0x12ebd5,_0x283c7e){return _0x584d(_0x216a8f- -_0xcbb241._0x148084,_0x283c7e);}return{'model':_0x464715[_0x5c7357(-_0x4b51d8._0x2c65b9,-0x7b,-_0x4b51d8._0x4cb73e,-0x65)]??_0x2ab1f4(-_0x4b51d8._0x2fd9a3,-0x1bb,-0x1ae,-0x1c3),'max_tokens':_0x464715['max_tokens']??0x400,..._0x464715[_0x2ab1f4(-0x1b3,-0x1ba,-0x1a4,-0x1aa)]?{'reasoning':structuredClone(_0x464715[_0x5c7357(-0x3c,-0x56,-_0x4b51d8._0x574483,-_0x4b51d8._0x28878f)])}:{},'system':normalizeSystem(_0x464715[_0x5c7357(-0x63,-0x64,-_0x4b51d8._0x15f918,-0x51)]),'messages':_0x464715[_0x5c7357(-0x62,-_0x4b51d8._0x463105,-_0x4b51d8._0x2420a7,-0x71)][_0x5c7357(-0x7a,-_0x4b51d8._0x55bfe8,-_0x4b51d8._0x1bfac4,-0x45)](normalizeMessage),'tools':structuredClone(_0x464715[_0x2ab1f4(-_0x4b51d8._0x2c2ba8,-0x1e5,-0x200,-_0x4b51d8._0x1d0b5b)]??[]),'metadata':{'session_id':_0x464715[_0x5c7357(-_0x4b51d8._0x574483,-0x6e,-_0x4b51d8._0x3135c1,-_0x4b51d8._0x5230d0)],'turn_id':_0x464715[_0x2ab1f4(-0x1e0,-0x1d1,-0x1e1,-0x1c3)]}};}function toChatRequest(_0x48a86c){const _0x2fc74a={_0x3612e4:0x2be,_0x4c79f2:0x2b5,_0x510516:0x2a5,_0x169bee:0x2a0,_0x1320f2:0x2d0,_0xfb44f1:0x12d,_0xcf8da7:0x2a2,_0x5cf790:0x2a3,_0x250a61:0x29f,_0xa7fec2:0x2ac,_0x3261a1:0x13b},_0x13d9e2={_0x507764:0x28f};function _0x200b2c(_0x3f0515,_0x16a4c4,_0x1ec174,_0x1660a0){return _0x584d(_0x1660a0- -_0x13d9e2._0x507764,_0x1ec174);}function _0x5c82e2(_0x4dfe53,_0xb6786b,_0x5d6f80,_0x344f65){return _0x584d(_0x5d6f80-0x15a,_0xb6786b);}return{'model':_0x48a86c[_0x5c82e2(_0x2fc74a._0x3612e4,_0x2fc74a._0x4c79f2,_0x2fc74a._0x510516,0x2bc)],'maxTokens':_0x48a86c[_0x5c82e2(0x2a7,0x289,_0x2fc74a._0x169bee,0x287)],..._0x48a86c[_0x5c82e2(_0x2fc74a._0x1320f2,0x2ce,0x2ca,0x2ba)]?{'reasoning':structuredClone(_0x48a86c['reasoning'])}:{},'system':structuredClone(_0x48a86c[_0x200b2c(-0x134,-0x129,-0x138,-_0x2fc74a._0xfb44f1)]),'messages':structuredClone(_0x48a86c[_0x5c82e2(0x28d,_0x2fc74a._0xcf8da7,_0x2fc74a._0x5cf790,0x2b1)]),'tools':structuredClone(_0x48a86c['tools']),'metadata':{'sessionId':_0x48a86c[_0x5c82e2(0x2bd,_0x2fc74a._0x250a61,_0x2fc74a._0xa7fec2,0x2c7)]['session_id'],'turnId':_0x48a86c[_0x5c82e2(0x291,0x2b4,0x2ac,0x2b2)][_0x200b2c(-0x141,-0x11d,-_0x2fc74a._0x3261a1,-0x138)]}};}function toModelRequest(_0x27a80f){const _0x1da2a1={_0x171664:0x461,_0xc056d7:0x477,_0x469e7c:0x45e,_0x170afb:0x146,_0x2c02cc:0x149,_0x49b27a:0x466,_0x36f18b:0x475,_0x426185:0x468,_0x44fa43:0x467,_0x318818:0x491,_0x502691:0x474,_0x382977:0x44a,_0x2d7339:0x45c,_0x3663de:0x44c,_0x4206de:0x46f,_0x32b842:0x13e,_0x125280:0x151,_0xd2646e:0x13e,_0x40531d:0x137,_0x341900:0x163},_0x2db9cd={_0x28a6ee:0x313};function _0x2f3e2e(_0x529290,_0x387fe4,_0x142de3,_0x25a1c2){return _0x584d(_0x25a1c2-_0x2db9cd._0x28a6ee,_0x142de3);}function _0x57692a(_0x26da86,_0x41f760,_0x204a2b,_0x31916c){return _0x584d(_0x31916c- -0x11,_0x41f760);}return{'model':_0x27a80f[_0x2f3e2e(_0x1da2a1._0x171664,_0x1da2a1._0xc056d7,0x453,_0x1da2a1._0x469e7c)],'max_tokens':_0x27a80f['maxTokens'],..._0x27a80f[_0x57692a(_0x1da2a1._0x170afb,_0x1da2a1._0x2c02cc,0x14a,0x15f)]?{'reasoning':structuredClone(_0x27a80f[_0x2f3e2e(_0x1da2a1._0x49b27a,_0x1da2a1._0x36f18b,_0x1da2a1._0x426185,0x483)])}:{},'system':structuredClone(_0x27a80f[_0x2f3e2e(_0x1da2a1._0x44fa43,_0x1da2a1._0x318818,0x479,0x475)]),'messages':structuredClone(_0x27a80f[_0x2f3e2e(0x442,_0x1da2a1._0x502691,_0x1da2a1._0x382977,_0x1da2a1._0x2d7339)]),'tools':structuredClone(_0x27a80f[_0x2f3e2e(0x457,_0x1da2a1._0x3663de,_0x1da2a1._0x4206de,0x458)]),'metadata':{'session_id':_0x27a80f['metadata']['sessionId'],'turn_id':_0x27a80f[_0x57692a(_0x1da2a1._0x32b842,_0x1da2a1._0x125280,0x12b,0x141)][_0x57692a(_0x1da2a1._0xd2646e,_0x1da2a1._0x40531d,_0x1da2a1._0x341900,0x148)]}};}function toProviderModelRequest(_0x36a04c){const _0x2d6ec0={_0x6041cc:0x8a,_0x30a84a:0x76,_0x3561e5:0x92,_0x5ed121:0x4d3,_0x27defe:0x4dd,_0x366156:0x4bc,_0x434e5c:0x4d7,_0x2b5fc:0x4d2,_0x12d48b:0x4a3,_0x4babd9:0x49f},_0x2e3f28={_0x57479f:0xb9},_0x257fdf={_0x6559ac:0x35a};function _0x2319d2(_0x2bf5ca,_0x3b85af,_0x592edb,_0x2e6acc){return _0x584d(_0x2bf5ca-_0x257fdf._0x6559ac,_0x3b85af);}function _0xd3bb04(_0x88cbb8,_0x3f9dd5,_0x1c5a04,_0x548b7e){return _0x584d(_0x1c5a04- -_0x2e3f28._0x57479f,_0x88cbb8);}return{'model':_0x36a04c[_0xd3bb04(_0x2d6ec0._0x6041cc,_0x2d6ec0._0x30a84a,0x92,_0x2d6ec0._0x3561e5)],'max_tokens':_0x36a04c[_0x2319d2(0x4d5,0x4bf,_0x2d6ec0._0x5ed121,_0x2d6ec0._0x27defe)],'system':structuredClone(_0x36a04c[_0x2319d2(_0x2d6ec0._0x366156,_0x2d6ec0._0x434e5c,0x4ce,_0x2d6ec0._0x2b5fc)]),'messages':structuredClone(_0x36a04c[_0x2319d2(_0x2d6ec0._0x12d48b,_0x2d6ec0._0x4babd9,0x4bf,0x4b1)]),'tools':structuredClone(_0x36a04c['tools'])};}function _0x584d(_0x2b6cec,_0x56553b){_0x2b6cec=_0x2b6cec-0x145;const _0xb23cd6=_0xb23c();let _0x584d52=_0xb23cd6[_0x2b6cec];if(_0x584d['mITLGV']===undefined){var _0x20277a=function(_0x2c8344){const _0x2a2935='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x277879='',_0x4f83eb='';for(let _0x4aa6d1=0x0,_0x30f8fe,_0x9a9d23,_0x3cdeda=0x0;_0x9a9d23=_0x2c8344['charAt'](_0x3cdeda++);~_0x9a9d23&&(_0x30f8fe=_0x4aa6d1%0x4?_0x30f8fe*0x40+_0x9a9d23:_0x9a9d23,_0x4aa6d1++%0x4)?_0x277879+=String['fromCharCode'](0xff&_0x30f8fe>>(-0x2*_0x4aa6d1&0x6)):0x0){_0x9a9d23=_0x2a2935['indexOf'](_0x9a9d23);}for(let _0x3af569=0x0,_0x464715=_0x277879['length'];_0x3af569<_0x464715;_0x3af569++){_0x4f83eb+='%'+('00'+_0x277879['charCodeAt'](_0x3af569)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x4f83eb);};_0x584d['zlWWdQ']=_0x20277a,_0x584d['knQPZC']={},_0x584d['mITLGV']=!![];}const _0x721de9=_0xb23cd6[0x0],_0x2bc0d6=_0x2b6cec+_0x721de9,_0x383dc0=_0x584d['knQPZC'][_0x2bc0d6];return!_0x383dc0?(_0x584d52=_0x584d['zlWWdQ'](_0x584d52),_0x584d['knQPZC'][_0x2bc0d6]=_0x584d52):_0x584d52=_0x383dc0,_0x584d52;}function toChatResponse(_0x27d2b4){const _0x1208ad={_0x8cbaa9:0x92,_0x2ea807:0x98,_0x244ce3:0x198,_0x5b5fd4:0x184,_0x43ec21:0x18a,_0x5bcc4e:0x1c2,_0x4b8022:0x1b2,_0x4d6d86:0x71,_0x44a35d:0xa2,_0x5c99de:0x89,_0x15576d:0x1c9,_0x3a3c0f:0x78,_0x3ad87d:0x6f,_0x55ae75:0x1a9,_0x4b5d1d:0x1bf,_0x1e791d:0x1b1,_0xbdc0ac:0x8c,_0x4fdf4a:0xa5,_0x4adff6:0xbf,_0x977581:0x1c8,_0x3dfb72:0x1b4,_0x1e6d09:0x1a8,_0x4c8ab1:0x1ab,_0x3a0492:0x196},_0x36d1e0={_0x1c95f0:0x1ec},_0x53e1f4={_0x362bba:0x3a};function _0x9b1e33(_0x439eea,_0x28aa51,_0x52d761,_0x5602e3){return _0x584d(_0x5602e3-_0x53e1f4._0x362bba,_0x52d761);}function _0x32507b(_0x47bc34,_0x57ff13,_0x697ee7,_0x129e6a){return _0x584d(_0x129e6a- -_0x36d1e0._0x1c95f0,_0x47bc34);}return{'id':_0x27d2b4['id'],'content':structuredClone(_0x27d2b4[_0x32507b(-0x7f,-_0x1208ad._0x8cbaa9,-0xac,-_0x1208ad._0x2ea807)]),'stopReason':_0x27d2b4[_0x9b1e33(0x18d,_0x1208ad._0x244ce3,_0x1208ad._0x5b5fd4,_0x1208ad._0x43ec21)],'usage':{'inputTokens':_0x27d2b4[_0x9b1e33(_0x1208ad._0x5bcc4e,0x19c,_0x1208ad._0x4b8022,0x1b1)][_0x32507b(-0x7c,-_0x1208ad._0x4d6d86,-_0x1208ad._0x44a35d,-_0x1208ad._0x5c99de)],'outputTokens':_0x27d2b4[_0x9b1e33(0x1ab,_0x1208ad._0x15576d,0x1ad,0x1b1)][_0x32507b(-0x5f,-_0x1208ad._0x3a3c0f,-0x6f,-_0x1208ad._0x3ad87d)],..._0x27d2b4[_0x9b1e33(0x1c9,_0x1208ad._0x55ae75,_0x1208ad._0x4b5d1d,_0x1208ad._0x1e791d)][_0x32507b(-_0x1208ad._0xbdc0ac,-_0x1208ad._0x4fdf4a,-_0x1208ad._0x4adff6,-0xa4)]!==void 0x0?{'reasoningTokens':_0x27d2b4[_0x9b1e33(_0x1208ad._0x977581,_0x1208ad._0x3dfb72,_0x1208ad._0x1e6d09,0x1b1)]['reasoning_tokens']}:{}},..._0x27d2b4['providerState']?{'providerState':structuredClone(_0x27d2b4[_0x9b1e33(_0x1208ad._0x4c8ab1,0x18f,0x183,_0x1208ad._0x3a0492)])}:{}};}function toModelResponse(_0xed8b65){const _0x37691d={_0x4ffa48:0x199,_0x18a0b2:0x193,_0x27f920:0x16f,_0x2433b7:0x186,_0x54a16c:0x191,_0x1fd5c6:0x1f0,_0x220e3d:0x1f4,_0x3e1fcd:0x176,_0x279722:0x18f,_0x3220fa:0x174,_0x1c8c98:0x17a,_0x16c8e9:0x169,_0x12a2a7:0x15f,_0x5988a6:0x1a9,_0x481bd4:0x18e,_0x2fef63:0x1de,_0x183e31:0x18e,_0x199083:0x177,_0x534c59:0x182};function _0x3e44dc(_0x1ea491,_0x3a212f,_0x5aa17d,_0x54da5f){return _0x584d(_0x3a212f-0x1b,_0x54da5f);}function _0x226ded(_0x4eac7a,_0x427ade,_0xa0672e,_0x15aae8){return _0x584d(_0x4eac7a- -0x325,_0x15aae8);}return{'id':_0xed8b65['id'],'type':'message','role':_0x3e44dc(_0x37691d._0x4ffa48,0x17c,0x160,_0x37691d._0x18a0b2),'content':structuredClone(_0xed8b65[_0x3e44dc(0x17f,_0x37691d._0x27f920,_0x37691d._0x2433b7,0x189)]),'stop_reason':_0xed8b65['stopReason'],'stop_sequence':null,'usage':{'input_tokens':_0xed8b65[_0x226ded(-0x1ae,-_0x37691d._0x54a16c,-0x1a7,-0x195)][_0x226ded(-0x1d9,-_0x37691d._0x1fd5c6,-_0x37691d._0x220e3d,-_0x37691d._0x220e3d)],'output_tokens':_0xed8b65[_0x3e44dc(_0x37691d._0x3e1fcd,0x192,_0x37691d._0x279722,0x183)][_0x3e44dc(_0x37691d._0x3220fa,0x162,_0x37691d._0x1c8c98,0x149)],..._0xed8b65['usage'][_0x3e44dc(0x172,_0x37691d._0x16c8e9,_0x37691d._0x12a2a7,0x17c)]!==void 0x0?{'reasoning_tokens':_0xed8b65[_0x3e44dc(_0x37691d._0x5988a6,0x192,0x185,_0x37691d._0x481bd4)][_0x226ded(-0x1d7,-0x1de,-_0x37691d._0x2fef63,-0x1d9)]}:{}},..._0xed8b65[_0x3e44dc(0x190,0x177,_0x37691d._0x2433b7,0x18d)]?{'providerState':structuredClone(_0xed8b65[_0x3e44dc(_0x37691d._0x183e31,_0x37691d._0x199083,0x16d,_0x37691d._0x534c59)])}:{}};}function responseToAssistantMessage(_0x20345d){const _0x4b3232={_0x3466dd:0x14a,_0x3f5f6a:0x445,_0xd29464:0x439,_0x8652cc:0x433,_0x1e2c22:0x434,_0x5d1e54:0x42c,_0x2bbbe7:0x43f},_0x371cd3={_0x78fb8:0x2e0},_0x4d2722={_0x2c6f75:0x297};function _0x49f1ce(_0x18ff1f,_0x37692c,_0x1b703e,_0x11e6f9){return _0x584d(_0x11e6f9- -_0x4d2722._0x2c6f75,_0x37692c);}function _0x5b25a6(_0x458f80,_0x2adfc6,_0x4fb84e,_0x45a903){return _0x584d(_0x45a903-_0x371cd3._0x78fb8,_0x2adfc6);}return{'role':_0x49f1ce(-0x143,-_0x4b3232._0x3466dd,-0x11e,-0x136),'content':normalizeContent(_0x20345d[_0x5b25a6(_0x4b3232._0x3f5f6a,_0x4b3232._0xd29464,_0x4b3232._0x8652cc,_0x4b3232._0x1e2c22)]),..._0x20345d['providerState']?{'providerState':structuredClone(_0x20345d[_0x5b25a6(_0x4b3232._0x5d1e54,_0x4b3232._0x2bbbe7,0x429,0x43c)])}:{}};}function createReasoningMessage(_0x188a84){const _0x183896={_0x5309b4:0x2ff,_0x166fdf:0x1ba,_0x17e4e5:0x2f5,_0x7ebfb1:0x2d8},_0x35105c={_0x3b99c7:0x60},_0x8dceaf={_0x3fe04d:0xd6,_0x39fff5:0x225,_0x252e0b:0xd9,_0x36d1e4:0xdd,_0x3c20e3:0xff,_0x2a8fe5:0xde,_0x228216:0xfa,_0x137e79:0x229,_0x6caa76:0x20c},_0x14f67f={_0xda6d09:0x1cf,_0x2ec209:0x5d,_0x356da8:0xd9},_0x2e705d={_0x32790f:0xb7,_0x24373c:0xb1},_0x46900c=normalizeContent(_0x188a84?.['content'])[_0x1e2d18(0x2e4,0x2ed,_0x183896._0x5309b4,0x2ff)](_0xc557f7=>{function _0x383b81(_0x5137b3,_0x2ad8a6,_0x533363,_0x4955a3){return _0x1e2d18(_0x5137b3-_0x2e705d._0x32790f,_0x2ad8a6-_0x2e705d._0x24373c,_0x5137b3- -0x211,_0x4955a3);}function _0x15ead8(_0x141552,_0x177a7a,_0x25f621,_0x323ac5){return _0x1e2d18(_0x141552-_0x14f67f._0xda6d09,_0x177a7a-_0x14f67f._0x2ec209,_0x141552- -_0x14f67f._0x356da8,_0x25f621);}return _0xc557f7[_0x383b81(_0x8dceaf._0x3fe04d,0xc6,0xed,0xba)]===_0x15ead8(_0x8dceaf._0x39fff5,0x232,0x22a,0x213)||_0xc557f7[_0x383b81(0xd6,_0x8dceaf._0x252e0b,0xbf,_0x8dceaf._0x36d1e4)]===_0x383b81(0xf9,_0x8dceaf._0x3c20e3,_0x8dceaf._0x2a8fe5,_0x8dceaf._0x228216)||_0xc557f7['type']===_0x15ead8(0x21e,0x224,_0x8dceaf._0x137e79,_0x8dceaf._0x6caa76);});if(_0x46900c[_0x406f08(0x1d6,0x1cd,_0x183896._0x166fdf,0x1d3)]===0x0)return void 0x0;function _0x406f08(_0x46a283,_0xd2a659,_0x36900b,_0x24d024){return _0x584d(_0x36900b-_0x35105c._0x3b99c7,_0xd2a659);}function _0x1e2d18(_0x5f4062,_0x23013c,_0x275da2,_0x317e9f){return _0x584d(_0x275da2-0x191,_0x317e9f);}return{'role':_0x1e2d18(_0x183896._0x17e4e5,_0x183896._0x7ebfb1,0x2f2,0x2e9),'content':_0x46900c};}function createAssistantTextMessage(_0xeb046d){const _0x312fa5={_0x49d963:0x71,_0x3911c8:0x85,_0x4d8d62:0x58,_0x193ac5:0x6b,_0x413f5d:0x70},_0x1491bd={_0x448c5a:0x3d3,_0x1b1a0b:0x3d3,_0x507288:0x3d5,_0x29ee4b:0x3d6};function _0x5232c6(_0x417640,_0x5717a9,_0x3d7005,_0x43230e){return _0x584d(_0x417640- -0x1c5,_0x3d7005);}const _0x1f900a=normalizeContent(_0xeb046d?.[_0x5232c6(-_0x312fa5._0x49d963,-_0x312fa5._0x3911c8,-0x69,-_0x312fa5._0x4d8d62)])['filter'](_0x2cadb9=>{const _0x251bd8={_0x43eb8d:0x2f1,_0x262415:0x4};function _0x594917(_0x3c77eb,_0x3866c3,_0x184a1b,_0x169fa1){return _0x5232c6(_0x3c77eb-0x449,_0x3866c3-0x60,_0x3866c3,_0x169fa1-0x1eb);}function _0x174963(_0x540389,_0x395961,_0x365604,_0x339cb7){return _0x5232c6(_0x365604-_0x251bd8._0x43eb8d,_0x395961-0x110,_0x339cb7,_0x339cb7-_0x251bd8._0x262415);}return _0x2cadb9[_0x594917(0x3da,_0x1491bd._0x448c5a,0x3f1,0x3c2)]===_0x594917(_0x1491bd._0x1b1a0b,0x3ba,_0x1491bd._0x507288,_0x1491bd._0x29ee4b);});if(_0x1f900a[_0x5232c6(-_0x312fa5._0x193ac5,-0x7e,-0x51,-_0x312fa5._0x413f5d)]===0x0)return void 0x0;function _0x3cd8f0(_0x33ede7,_0x37e6e3,_0x11c123,_0x420a39){return _0x584d(_0x33ede7-0x1d8,_0x37e6e3);}return{'role':'assistant','content':_0x1f900a};}function createToolUseMessage(_0x4cf754){const _0x44f6ba={_0x36f438:0x324,_0x52a01e:0x31d,_0x1375e0:0x319},_0x1ee9c1={_0x55a9d8:0x18f,_0x5f3ac8:0x1a7,_0x53be50:0x19c,_0x2d2f1d:0x195};function _0x4f1581(_0x35b07f,_0x407e1b,_0x28e8d5,_0x3d65ba){return _0x584d(_0x407e1b-0x1bf,_0x35b07f);}function _0x307678(_0xd06853,_0x1f5246,_0x312e2a,_0x48f1b6){return _0x584d(_0xd06853- -0x7,_0x48f1b6);}const _0x440836=normalizeContent(_0x4cf754?.[_0x4f1581(0x30d,0x313,0x32d,_0x44f6ba._0x36f438)])[_0x4f1581(0x32e,0x32d,0x325,0x327)](_0x529696=>{const _0x47c195={_0x14f902:0x2d};function _0x41bc7b(_0x97008c,_0x3173dc,_0x1db6d2,_0x4afee0){return _0x307678(_0x97008c-_0x47c195._0x14f902,_0x3173dc-0x2c,_0x1db6d2-0x14e,_0x1db6d2);}return _0x529696['type']===_0x41bc7b(_0x1ee9c1._0x55a9d8,_0x1ee9c1._0x5f3ac8,_0x1ee9c1._0x53be50,_0x1ee9c1._0x2d2f1d);});if(_0x440836[_0x4f1581(_0x44f6ba._0x52a01e,_0x44f6ba._0x1375e0,0x331,0x314)]===0x0)return void 0x0;return{'role':'assistant','content':_0x440836};}function getTextFromMessage(_0x2dd5cf){const _0x262b1a={_0x13ef60:0x1ee,_0x7a5a4:0x161,_0x3cb99f:0x1fd,_0x165be1:0x21a,_0x11205a:0x21a,_0x37cfa0:0x206,_0x346610:0x20c,_0x4eb95f:0x20d},_0x357aa6={_0x4705f3:0x2de};function _0x20afd4(_0x1d420b,_0x907e15,_0x304a6c,_0x55ae21){return _0x584d(_0x1d420b- -_0x357aa6._0x4705f3,_0x907e15);}function _0x4c0f33(_0x550afd,_0x461fa9,_0x5ce302,_0x478eea){return _0x584d(_0x550afd-0xa8,_0x461fa9);}return normalizeContent(_0x2dd5cf?.[_0x4c0f33(0x1fc,0x1f3,_0x262b1a._0x13ef60,0x1f7)])[_0x20afd4(-0x170,-0x18b,-_0x262b1a._0x7a5a4,-0x178)](_0x486564=>_0x486564['type']==='text')[_0x4c0f33(0x20d,_0x262b1a._0x3cb99f,0x1f2,_0x262b1a._0x165be1)](_0x5097f1=>_0x5097f1['text'])[_0x4c0f33(_0x262b1a._0x11205a,_0x262b1a._0x37cfa0,_0x262b1a._0x346610,_0x262b1a._0x4eb95f)]('\x0a');}function getReasoningTextFromMessage(_0x3158c6){const _0x2ab697={_0x4d03c0:0x16c,_0x1fcb7f:0x182,_0x436ae9:0x188,_0x564845:0x192,_0x22c6b1:0x158,_0x22a0c5:0x164},_0x2b52c8={_0xdb7e11:0x2c2,_0x4f1c15:0x2d0,_0x1c7975:0x14c,_0x4520fb:0x13b,_0x3f1ee0:0x132,_0x2f47de:0x2b8,_0x45c51b:0x2d4,_0x3502b0:0x14c,_0x42b5ba:0x141,_0x4ed8d8:0x162,_0x33b7d4:0x155,_0x27fa2a:0x15b,_0x15624c:0x14f,_0xe8e623:0x171,_0x62d597:0x141,_0x469722:0x15c,_0x270f27:0x130,_0x2637d1:0x150,_0x202a65:0x2fc,_0xe07e46:0x2e8,_0x2145b8:0x15a,_0x593dbb:0x170,_0x5c1cc6:0x168,_0x26cbe8:0x2c9,_0x971b27:0x2bb,_0x221c7a:0x137,_0x2e894f:0x13d,_0x4aa764:0x154,_0x5b08a5:0x14e,_0x4b4dbe:0x163,_0x3c4ad8:0x171,_0x1720c7:0x2b7,_0x2b4109:0x2c5,_0x4e2b9f:0x2c1,_0x301121:0x2bc,_0x4c535c:0x13d,_0x14b6ad:0x146,_0x4be76b:0x125,_0x818bad:0x12c,_0xe1c39e:0x168},_0xd15b0a={_0x28875a:0x12b};function _0x747d4b(_0x1998b4,_0xac73bd,_0x10746c,_0x57537f){return _0x584d(_0x57537f- -0x2d6,_0xac73bd);}function _0x5367b2(_0x32b3d2,_0x514e27,_0x2f7350,_0x120340){return _0x584d(_0x120340- -0x222,_0x32b3d2);}return normalizeContent(_0x3158c6?.[_0x747d4b(-0x185,-0x17a,-_0x2ab697._0x4d03c0,-_0x2ab697._0x1fcb7f)])[_0x747d4b(-_0x2ab697._0x436ae9,-_0x2ab697._0x564845,-0x190,-0x179)](_0x26c3e1=>{const _0x50455d={_0x2ac0e8:0x57};if(_0x26c3e1[_0x434549(0x2c9,_0x2b52c8._0xdb7e11,_0x2b52c8._0x4f1c15,0x2ea)]==='anthropic_thinking')return _0x26c3e1[_0x271b7e(_0x2b52c8._0x1c7975,0x130,_0x2b52c8._0x4520fb,_0x2b52c8._0x3f1ee0)]['trim']()[_0x434549(0x2d6,_0x2b52c8._0x2f47de,_0x2b52c8._0x45c51b,0x2ee)]>0x0?[_0x26c3e1[_0x271b7e(_0x2b52c8._0x3502b0,_0x2b52c8._0x42b5ba,0x135,_0x2b52c8._0x4ed8d8)]]:[];function _0x434549(_0x2a3dad,_0x4cd665,_0x173b1a,_0x32aedc){return _0x747d4b(_0x2a3dad-0x1ad,_0x32aedc,_0x173b1a-_0xd15b0a._0x28875a,_0x173b1a-0x450);}if(_0x26c3e1['type']===_0x271b7e(_0x2b52c8._0x33b7d4,0x152,0x139,0x159))return['(redacted\x20reasoning)'];function _0x271b7e(_0x3f9dd4,_0x22b942,_0xc5a57c,_0x4fbda2){return _0x5367b2(_0x22b942,_0x22b942-_0x50455d._0x2ac0e8,_0xc5a57c-0xae,_0x3f9dd4-0x20a);}if(_0x26c3e1['type']!=='openai_reasoning')return[];const _0x2d0590=_0x26c3e1[_0x271b7e(_0x2b52c8._0x27fa2a,_0x2b52c8._0x15624c,_0x2b52c8._0xe8e623,_0x2b52c8._0x62d597)][_0x271b7e(0x14d,_0x2b52c8._0x469722,_0x2b52c8._0x270f27,_0x2b52c8._0x2637d1)](_0x2c32ba=>_0x2c32ba[_0x271b7e(0x137,0x150,0x125,0x120)])[_0x434549(0x2e9,_0x2b52c8._0x202a65,_0x2b52c8._0xe07e46,0x2dc)](_0x53e2ad=>_0x53e2ad[_0x434549(0x2cd,0x2df,0x2e6,0x2ca)]()[_0x434549(0x2cb,0x2e3,0x2d4,0x2ba)]>0x0)[_0x271b7e(_0x2b52c8._0x2145b8,_0x2b52c8._0x593dbb,_0x2b52c8._0x5c1cc6,0x172)]('\x0a\x0a');if(_0x2d0590['length']>0x0)return[_0x2d0590];if(_0x26c3e1[_0x434549(0x2db,0x2d8,_0x2b52c8._0x26cbe8,_0x2b52c8._0x971b27)]&&_0x26c3e1[_0x271b7e(_0x2b52c8._0x221c7a,0x14d,_0x2b52c8._0x62d597,_0x2b52c8._0x2e894f)][_0x271b7e(_0x2b52c8._0x4aa764,_0x2b52c8._0x5b08a5,_0x2b52c8._0x4b4dbe,_0x2b52c8._0x3c4ad8)]()[_0x434549(_0x2b52c8._0x1720c7,0x2bc,0x2d4,_0x2b52c8._0x2b4109)]>0x0)return[_0x26c3e1[_0x434549(_0x2b52c8._0x4e2b9f,0x2c7,_0x2b52c8._0x26cbe8,_0x2b52c8._0x301121)]];return _0x26c3e1[_0x271b7e(_0x2b52c8._0x4c535c,_0x2b52c8._0x14b6ad,_0x2b52c8._0x4be76b,_0x2b52c8._0x818bad)]?[_0x271b7e(_0x2b52c8._0x4ed8d8,0x16b,_0x2b52c8._0xe1c39e,0x160)]:[];})[_0x747d4b(-0x162,-0x177,-_0x2ab697._0x22c6b1,-_0x2ab697._0x22a0c5)]('\x0a\x0a');}function getToolUseBlocks(_0x3fd58e){const _0x38aeb0={_0x3d08a4:0xc,_0x4be692:0x11,_0x510c67:0x0};function _0x27ead1(_0x5a28f7,_0x5b5423,_0x471954,_0x4c9262){return _0x584d(_0x471954- -0x155,_0x5b5423);}function _0x243bf6(_0x4febf3,_0x19ffd3,_0x47112f,_0x1c69ac){return _0x584d(_0x47112f-0x57,_0x1c69ac);}return normalizeContent(_0x3fd58e?.[_0x27ead1(_0x38aeb0._0x3d08a4,-_0x38aeb0._0x4be692,-0x1,_0x38aeb0._0x510c67)])['filter'](_0x43a8b0=>_0x43a8b0[_0x243bf6(0x199,0x19c,0x1ad,0x19a)]===_0x27ead1(0x24,0xa,0x14,0x1c));}function getToolResultBlocks(_0x122d59){const _0x545047={_0x2413dd:0x496};function _0x2bb74d(_0x3e85f6,_0x294894,_0x19c72e,_0x3609e2){return _0x584d(_0x19c72e-0x157,_0x294894);}function _0x3bcf58(_0xff21c,_0x23bc20,_0x47e9ff,_0x5af808){return _0x584d(_0x23bc20-0x32e,_0x47e9ff);}return normalizeContent(_0x122d59?.['content'])[_0x3bcf58(0x485,0x49c,_0x545047._0x2413dd,0x4a1)](_0x3b105c=>_0x3b105c[_0x3bcf58(0x479,0x484,0x495,0x48b)]===_0x3bcf58(0x49b,0x4aa,0x4a8,0x490));}function createToolResultUserMessage(_0x341942){const _0x35e07b={_0x1cab50:0x297,_0x57c5b0:0x286,_0x5ef652:0x106},_0x87fd3={_0x1ac722:0x17b,_0x3eb076:0x1ab,_0x42099a:0x193,_0x478a7f:0x1bf,_0x3cd472:0x1d6,_0x466555:0x1bb,_0x16381d:0x1ec,_0x18a3a2:0x1e1,_0x2ebb6b:0x1d2},_0x146c98={_0x12cd70:0xdf,_0x58ca01:0x102};function _0x56edc6(_0x15e482,_0x1f0081,_0x200ffe,_0x3f1a68){return _0x584d(_0x15e482- -0x77,_0x1f0081);}function _0x424cc9(_0x342c6e,_0x3f70d4,_0x2a6c66,_0x46f851){return _0x584d(_0x342c6e-0x114,_0x2a6c66);}return{'role':_0x424cc9(0x27f,_0x35e07b._0x1cab50,0x28e,_0x35e07b._0x57c5b0),'content':_0x341942[_0x56edc6(0xee,0xeb,_0x35e07b._0x5ef652,0xfe)](_0x38df49=>{const _0x1c915f={_0xade38b:0x423,_0x4b9f7f:0x30};function _0x373832(_0x3f5c99,_0x32802f,_0x262fd9,_0x3f8824){return _0x56edc6(_0x262fd9-_0x146c98._0x12cd70,_0x32802f,_0x262fd9-0x108,_0x3f8824-_0x146c98._0x58ca01);}function _0x355cec(_0x367b12,_0x5d3eba,_0x49985c,_0x1d18ac){return _0x424cc9(_0x1d18ac- -_0x1c915f._0xade38b,_0x5d3eba-_0x1c915f._0x4b9f7f,_0x49985c,_0x1d18ac-0x171);}return{'type':_0x355cec(-_0x87fd3._0x1ac722,-_0x87fd3._0x3eb076,-0x17c,-_0x87fd3._0x42099a),'tool_use_id':_0x38df49['callId'],'content':_0x38df49[_0x355cec(-0x1af,-_0x87fd3._0x478a7f,-_0x87fd3._0x3cd472,-_0x87fd3._0x466555)]??_0x38df49[_0x373832(_0x87fd3._0x16381d,_0x87fd3._0x18a3a2,0x1de,_0x87fd3._0x2ebb6b)],'is_error':_0x38df49['status']==='error'};})};}export{createTextBlock,normalizeTextBlock,normalizeContent,normalizeSystem,normalizeMessage,compileRequest,toChatRequest,toModelRequest,toProviderModelRequest,toChatResponse,toModelResponse,responseToAssistantMessage,createReasoningMessage,createAssistantTextMessage,createToolUseMessage,getTextFromMessage,getReasoningTextFromMessage,getToolUseBlocks,getToolResultBlocks,createToolResultUserMessage};
|
package/dist/chunk-KVFXQ7HW.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(function(_0x15dece,_0x426fb8){const _0x454855={_0x23ff2c:0x1e9,_0x1d1b47:0x250,_0x31beb7:0x1e3,_0x1b2723:0x199,_0xa18f7e:0x527,_0x1cce08:0x566,_0x2017e1:0x5b4,_0x25ccd1:0x5c3,_0x36ecdb:0x1fb,_0x46a93a:0x207,_0x4bfe55:0x60d,_0x1f1d15:0x5c4,_0x76bad9:0x5d9,_0x5bdce4:0x1d9,_0x51fe3a:0x1d9,_0x1897a4:0x565,_0x572a87:0x541,_0x381846:0x563,_0x4d7406:0x538,_0x2fc7f5:0x20e,_0x1c8ea8:0x243},_0x36823f={_0xd13a94:0x3bc};function _0x4dc36c(_0x2ee685,_0x1579bf,_0xa7351f,_0x1d37ed){return _0x53d6(_0x1d37ed- -_0x36823f._0xd13a94,_0xa7351f);}function _0x37d0d7(_0x1043f8,_0x24a26e,_0x4667c4,_0x33e2f8){return _0x53d6(_0x4667c4-0x3b6,_0x24a26e);}const _0x56e662=_0x15dece();while(!![]){try{const _0x177548=parseInt(_0x4dc36c(-0x20f,-0x1cb,-0x19b,-_0x454855._0x23ff2c))/0x1*(-parseInt(_0x4dc36c(-0x1c3,-_0x454855._0x1d1b47,-0x1e7,-0x1ff))/0x2)+parseInt(_0x4dc36c(-_0x454855._0x31beb7,-0x1e8,-_0x454855._0x1b2723,-0x1b4))/0x3+-parseInt(_0x37d0d7(0x53b,_0x454855._0xa18f7e,_0x454855._0x1cce08,0x538))/0x4+-parseInt(_0x37d0d7(_0x454855._0x2017e1,0x5bf,0x584,_0x454855._0x25ccd1))/0x5*(-parseInt(_0x4dc36c(-_0x454855._0x36ecdb,-0x231,-0x1cc,-_0x454855._0x46a93a))/0x6)+parseInt(_0x37d0d7(_0x454855._0x4bfe55,0x5a3,_0x454855._0x1f1d15,_0x454855._0x76bad9))/0x7+parseInt(_0x4dc36c(-_0x454855._0x5bdce4,-0x1cc,-0x1a5,-_0x454855._0x51fe3a))/0x8+parseInt(_0x37d0d7(_0x454855._0x1897a4,_0x454855._0x572a87,_0x454855._0x381846,_0x454855._0x4d7406))/0x9*(parseInt(_0x4dc36c(-_0x454855._0x2fc7f5,-0x251,-_0x454855._0x1c8ea8,-0x214))/0xa);if(_0x177548===_0x426fb8)break;else _0x56e662['push'](_0x56e662['shift']());}catch(_0x36be5b){_0x56e662['push'](_0x56e662['shift']());}}}(_0x2fd8,0x5e79c));import{createAssistantTextMessage,createReasoningMessage,createToolResultUserMessage,createToolUseMessage,getToolUseBlocks,normalizeMessage,normalizeSystem,responseToAssistantMessage}from'./chunk-G2FR4UGO.js';import{addAbortListener,isAbortError,throwIfAborted,toAbortError}from'./chunk-X7VAACWY.js';function isJsonObject(_0x1e44a6){const _0x1aad28={_0x3d3c8b:0x33b,_0x7bbd70:0x34c,_0x350c7c:0x30c,_0x3fe52e:0x2cb},_0x36a696={_0x111026:0x1e3};function _0x24d41d(_0x453b91,_0x390b3e,_0x5cb2ae,_0x5c0fc3){return _0x53d6(_0x390b3e-0x12a,_0x453b91);}function _0x4834e6(_0x3e6ab1,_0x445ef9,_0x6c7551,_0x360a58){return _0x53d6(_0x445ef9-_0x36a696._0x111026,_0x3e6ab1);}return typeof _0x1e44a6===_0x24d41d(_0x1aad28._0x3d3c8b,_0x1aad28._0x7bbd70,0x335,_0x1aad28._0x350c7c)&&_0x1e44a6!==null&&!Array[_0x24d41d(0x292,0x2cf,0x2fc,_0x1aad28._0x3fe52e)](_0x1e44a6);}function isToolOutputEnvelope(_0x439f51){const _0x317058={_0x481b7e:0x3c7,_0x3f907e:0x412,_0x43380c:0x42a,_0x10b1d3:0x3cf,_0x28bb93:0x3da,_0x23844d:0x3cd,_0x525a2b:0x3e5,_0x5ec185:0x411,_0x575d50:0x3ad,_0x50c1be:0x3f5,_0x55d68f:0x442,_0x84542:0x3fc,_0x33e1ed:0x427},_0x59a380={_0xc989b1:0x1f0};if(typeof _0x439f51!==_0x3fa36a(_0x317058._0x481b7e,0x3fd,_0x317058._0x3f907e,_0x317058._0x43380c)||_0x439f51===null||Array['isArray'](_0x439f51))return![];if(typeof _0x439f51[_0x3fa36a(_0x317058._0x10b1d3,_0x317058._0x28bb93,_0x317058._0x23844d,0x3d6)]!==_0x3fa36a(_0x317058._0x525a2b,_0x317058._0x5ec185,0x3c1,_0x317058._0x575d50))return![];function _0x3fa36a(_0x3b670e,_0x3f51d5,_0x5158cc,_0x219315){return _0x53d6(_0x5158cc-_0x59a380._0xc989b1,_0x219315);}function _0xfce146(_0x29f2e6,_0x431fe5,_0x62d016,_0x15f179){return _0x53d6(_0x431fe5- -0x185,_0x29f2e6);}const _0x420752=_0x439f51[_0x3fa36a(_0x317058._0x50c1be,_0x317058._0x55d68f,_0x317058._0x84542,_0x317058._0x33e1ed)];return _0x420752===void 0x0||isJsonObject(_0x420752);}function validateAgainstSchema(_0x2b6cae,_0xbc0f50,_0x2f676b){const _0x1ed441={_0x413985:0x43c,_0x3eeace:0x48b,_0x5e4958:0x2aa,_0x4c02fc:0x2ee,_0x175441:0x31e,_0x3daac8:0x348,_0x268bc1:0x329,_0x18a577:0x331,_0x36387b:0x311,_0x42027c:0x2b6,_0x4ae252:0x2d5,_0x14e743:0x2d2,_0x4c96e7:0x482,_0x383b09:0x4c5,_0x216c02:0x378,_0x5c3881:0x33e,_0x3b5953:0x33b,_0xe56bf3:0x49b,_0x110530:0x487,_0x12bc89:0x46c,_0x102a9c:0x43a,_0x4c993e:0x33f,_0x2e51d1:0x4da,_0x1af1fb:0x4ad,_0x246151:0x461,_0x37ac0a:0x49d,_0x181847:0x3f3,_0x5bf206:0x430,_0x1dc05b:0x42a,_0x467920:0x435,_0x358f06:0x44b,_0x4e4871:0x480,_0xad19c5:0x4aa,_0x55d3d3:0x4de,_0x4135a8:0x4b2,_0x272e11:0x4f0,_0x62387f:0x31b,_0x7fd317:0x47c,_0x3289ec:0x44a,_0x5b0e75:0x2de,_0x66bbae:0x30d,_0x1f2252:0x35f,_0x3be3e5:0x2d8,_0x4638d:0x2da,_0x5317d8:0x2a2,_0x54ef64:0x2ff,_0xc96e3b:0x2e7},_0x52e6ea={_0x2c48f4:0x231,_0x4cc61f:0x209,_0x26adb2:0x1e5};function _0x13b4ee(_0x19d23f,_0x5975cb,_0x57efa5,_0xe56b59){return _0x53d6(_0x57efa5-0x290,_0xe56b59);}function _0x2e6746(_0x29c3c0,_0xef1cd,_0x228315,_0xc32e2d){return _0x53d6(_0x228315-0x11d,_0xc32e2d);}switch(_0x2f676b[_0x13b4ee(0x42c,0x488,_0x1ed441._0x413985,_0x1ed441._0x3eeace)]){case'string':if(typeof _0xbc0f50!==_0x2e6746(0x2ec,_0x1ed441._0x5e4958,_0x1ed441._0x4c02fc,_0x1ed441._0x175441))throw new Error(_0x2e6746(_0x1ed441._0x3daac8,0x2d5,0x324,_0x1ed441._0x268bc1)+_0x2b6cae+_0x2e6746(_0x1ed441._0x18a577,_0x1ed441._0x36387b,0x306,_0x1ed441._0x42027c));return;case'number':if(typeof _0xbc0f50!==_0x2e6746(_0x1ed441._0x4ae252,0x31a,0x2f7,_0x1ed441._0x14e743))throw new Error(_0x13b4ee(_0x1ed441._0x4c96e7,0x449,0x497,_0x1ed441._0x383b09)+_0x2b6cae+_0x2e6746(_0x1ed441._0x216c02,_0x1ed441._0x5c3881,_0x1ed441._0x3b5953,0x2fc));return;case _0x13b4ee(_0x1ed441._0xe56bf3,_0x1ed441._0x110530,_0x1ed441._0x12bc89,_0x1ed441._0x102a9c):if(typeof _0xbc0f50!==_0x2e6746(_0x1ed441._0x4c993e,0x334,0x2f9,0x2be))throw new Error(_0x13b4ee(0x497,0x46d,0x497,_0x1ed441._0x2e51d1)+_0x2b6cae+_0x13b4ee(_0x1ed441._0x1af1fb,_0x1ed441._0x246151,0x47d,_0x1ed441._0x37ac0a));return;case _0x13b4ee(_0x1ed441._0x181847,0x430,0x42b,_0x1ed441._0x5bf206):if(!Array[_0x13b4ee(_0x1ed441._0x1dc05b,0x41e,_0x1ed441._0x467920,0x459)](_0xbc0f50))throw new Error('Invalid\x20tool\x20input\x20at\x20'+_0x2b6cae+_0x13b4ee(0x4d2,_0x1ed441._0x358f06,0x480,_0x1ed441._0x4e4871));_0xbc0f50['forEach']((_0x2752b3,_0x36eb63)=>{const _0x425f9b={_0x3950f9:0xaf};function _0xad6481(_0x482bb7,_0x285f8e,_0x294e87,_0x24fc0e){return _0x2e6746(_0x482bb7-_0x425f9b._0x3950f9,_0x285f8e-0x3f,_0x294e87- -0x9e,_0x482bb7);}validateAgainstSchema(_0x2b6cae+'['+_0x36eb63+']',_0x2752b3,_0x2f676b[_0xad6481(_0x52e6ea._0x2c48f4,0x221,_0x52e6ea._0x4cc61f,_0x52e6ea._0x26adb2)]);});return;case _0x13b4ee(_0x1ed441._0xad19c5,_0x1ed441._0x55d3d3,_0x1ed441._0x4135a8,_0x1ed441._0x272e11):if(!isJsonObject(_0xbc0f50))throw new Error(_0x2e6746(0x301,0x30a,0x324,_0x1ed441._0x62387f)+_0x2b6cae+_0x13b4ee(0x486,_0x1ed441._0x7fd317,_0x1ed441._0x3289ec,0x476));for(const _0x18768e of _0x2f676b['required']??[]){if(!(_0x18768e in _0xbc0f50))throw new Error(_0x2e6746(_0x1ed441._0x5b0e75,_0x1ed441._0x66bbae,0x324,_0x1ed441._0x1f2252)+_0x2b6cae+_0x2e6746(_0x1ed441._0x3be3e5,0x310,0x31a,_0x1ed441._0x4638d)+_0x18768e+'\x22');}for(const [_0x3e4357,_0x188061]of Object[_0x2e6746(_0x1ed441._0x5317d8,_0x1ed441._0x54ef64,_0x1ed441._0xc96e3b,_0x1ed441._0x14e743)](_0x2f676b['properties'])){_0x3e4357 in _0xbc0f50&&validateAgainstSchema(_0x2b6cae+'.'+_0x3e4357,_0xbc0f50[_0x3e4357],_0x188061);}}}function normalizeToolOutputValue(_0x2c7a91){const _0x1b5614={_0xac89a2:0x471,_0x26b3e1:0x4a0,_0x59b6c6:0x5f3,_0x13aecc:0x5e3,_0x5b5dee:0x5d2,_0x39f807:0x5d3,_0x1efc9f:0x5df,_0x45751f:0x5ba,_0xeaa176:0x495},_0x33d576={_0x15d05d:0x3bd};if(isToolOutputEnvelope(_0x2c7a91))return{'output':_0x2c7a91[_0x620e3c(_0x1b5614._0xac89a2,_0x1b5614._0x26b3e1,0x499,0x4df)],'structured':_0x2c7a91[_0x1ed1f8(0x5c9,_0x1b5614._0x59b6c6,0x5ad,_0x1b5614._0x13aecc)]??{'value':_0x2c7a91['output']},..._0x2c7a91['content']!==void 0x0?{'content':_0x2c7a91[_0x1ed1f8(_0x1b5614._0x5b5dee,0x5ea,0x591,_0x1b5614._0x39f807)]}:{}};if(typeof _0x2c7a91===_0x1ed1f8(0x58e,0x5de,0x569,0x573))return{'output':_0x2c7a91,'structured':{'value':_0x2c7a91}};function _0x1ed1f8(_0x592bb3,_0x4e5d44,_0x318802,_0x48f183){return _0x53d6(_0x592bb3-_0x33d576._0x15d05d,_0x4e5d44);}function _0x620e3c(_0x579a15,_0xa13381,_0x374b35,_0x31c83a){return _0x53d6(_0xa13381-0x2c3,_0x374b35);}if(typeof _0x2c7a91===_0x1ed1f8(_0x1b5614._0x1efc9f,0x5dc,_0x1b5614._0x45751f,0x5f8)&&_0x2c7a91!==null&&!Array['isArray'](_0x2c7a91))return{'output':JSON[_0x620e3c(_0x1b5614._0xeaa176,0x4e3,0x4a2,0x4cd)](_0x2c7a91,null,0x2),'structured':_0x2c7a91};return{'output':JSON['stringify'](_0x2c7a91,null,0x2),'structured':{'value':_0x2c7a91}};}function _0x2fd8(){const _0x205fc2=['AxrLBxm','BgLZDa','DgHLBG','zMLUywXFBwvZC2fNzq','Bwv0CMLJCW','zMLUywXnzxnZywDL','Dg9VBhncEu5HBwu','CNvUvhjHBNnMB3jTzxjZ','Dg9VBf9ZDgfYDgvK','z2v0q29UDgv4DfDPBMrVD0XPBwL0','Bw9KzwXFCMvXDwvZDa','Aw5WDxq','yxnZAxn0yw50x2nODw5R','B25fDMvUDa','Dg9VBf91C2u','z2v0','C3rYzwfTAw5N','yxjYyxK','Dg90ywXuB2TLBNm','yMvMB3jLvg9VBfjLC3vSDefWCgvUza','BwvZC2fNzq','Dg9VBhm','A2LUza','Bw9KzwXFCMvZCg9UC2u','y2HHDe1VzgvS','CMfJzq','Dg9VBfj1BNrPBwu','AxnbCNjHEq','yw50AhjVCgLJx3rOAw5RAw5Nx2rLBhrH','C29Tzq','mtbXsxbct1K','B3v0Chv0sw5KzxG','Dg9VBf9VDxrWDxrFy2H1BMS','x3n5C3rLBvbYB21WDa','DhLWzq','ndaWmJmWovPVCvzrqq','C2XPy2u','CMvZzxrnzxnZywDLCW','mJK2mJCXnNviCKfTuG','DgHPBMTPBMC','zxH0zw5ZAw9UCW','CMvXDwvZDenVDw50','Dg9VBf91C2vFzgvSDge','mJaXntuXnhnmy01hua','DxnLCL9TzxnZywDL','zxHLy3v0zunHBgXZ','C2v0u3LZDgvTuhjVBxb0','Dg9VBf9JywXS','oIbLEhbLy3rLzcbVyMPLy3q','B25vC2vYtwvZC2fNzq','CMv0DxjU','mZi3ngzPseHQyG','yMvMB3jLtw9KzwXszxf1zxn0','CMvZCg9UC2u','ywrK','ChjVDMLKzxjFCMv0CNK','Aw5KzxG','Dg9VBf9JB21WBgv0zwq','zg9Uzq','BwvZC2fNzxm','y29TCgXLDgvK','C29YDa','y29UDgvUDf9KzwX0yq','CMvQzwn0','zw50CMLLCW','y29UDgv4DfDPBMrVD0XPBwL0','zgvWCW','ywjVCNq','mtbgswvIyuy','DMfSDwu','yxnZAxn0yw50twvZC2fNzuLK','C3rYAw5N','Bw9KzwW','mJyYCvLRCg5s','tw9KzwWGC3rYzwfTigvUzgvKihDPDgHVDxqGysbMAw5HBcbYzxnWB25Zzq','zxHLy3v0zq','CMvHC29U','C3LZDgvT','ywjVCNrLza','y29UDgvUDeLUzgv4','BNvTyMvY','Dg9VBf9Yzxn1BhrFBwvZC2fNzq','yM9VBgvHBG','B3v0Chv0','CMvTB3zLrxzLBNrmAxn0zw5LCG','Aw5WDxrezwX0yq','CMvNAxn0CNK','C2LNBMfS','C3LZDgvTuhjVBxb0','mZCWndHpvwHIBNq','Dgv4Da','BMfTzq','C2v0vg9VBhm','Dw5RBM93BL90B29S','B3bLBMfPx3jLyxnVBMLUz19ZDw1Tyxj5x2rLBhrH','oIbLEhbLy3rLzcbZDhjPBMC','DhvYBI0','oNjLyxnVBMLUzW','zgvMyxvSDe1LC3nHz2u','oIbLEhbLy3rLzcbIB29SzwfU','DhjHBNnMB3jTzxi','oMfZC2LZDgfUDdO','oIbLEhbLy3rLzcbHCNjHEq','DMfSDwvZ','zw5HyMXLza','vg9VBcbLEgvJDxrPB24GCMvQzwn0zwqGzM9Yia','BgfZDfjLC3bVBNnL','Dg9VBf9YzwPLy3rLza','C2vZC2LVBKLK','zgvSzxrL','DhvYBKLK','DxnHz2u','Aw5WDxruB2TLBNm','Aw5WDxrty2HLBwe','y29TCgXLDgu','oIbTAxnZAw5NihjLCxvPCMvKigzPzwXKici','CNvUt2jZzxj2zxjZ','BgLZDfrVB2Xty2HLBwfZ','C3rHz2u','C2v0q2HHDe1VzgvS','zxjYB3i','zMLSDgvY','ywXS','DhjPBq','ChvZAa','sw52ywXPzcb0B29SigLUChv0igf0ia','otu3mJe5BKfXDKLr','CMvHC29UAw5Nx2nODw5R','C2v0','Dg9VBf9Yzxn1Bhq','C3rYDwn0DxjLza','y2f0y2G','ode0mte0r3bzswXq','qwDLBNqUC2vUzcbYzxf1AxjLCYbHig1LC3nHz2uGD2HLBIbUBYbKzwzHDwX0ig1LC3nHz2uGAxmGy29UzMLNDxjLza','C3rHDhvZ','ywrKrxzLBNrmAxn0zw5LCG','BgvUz3rO','vg9VBev4zwn1DgLVBKvYCM9Y','zgvZy3jPChrPB24','y29UDgvUDa','ywn0Aw9U','BMv4Da','B2jZzxj2zxi','yMvMB3jLvg9VBev4zwn1DgLVBG','zgvSDge','ywz0zxjuB29SuMvZDwX0','BwfW','C3vTBwfYEuLUzgv4','oIbLEhbLy3rLzcbUDw1Izxi','B3jKzxi','C3rYAw5NAwz5','yxnRvxnLCG','B2jQzwn0','DhvYBL9JB21WBgv0zq','Dg90ywXpDxrWDxruB2TLBNm','B25uB29Sq2fSBa','DhvYBKLUzgv4','BM93','C3rYzwfT','CMvZB2X2zq','yMvMB3jLrMLUywXpDxrWDxq','CMfUzg9T','Dg9VBenHBgXdB3vUDa'];_0x2fd8=function(){return _0x205fc2;};return _0x2fd8();}function createToolOutput(_0x1514d3,_0x1d8ff3={'value':_0x1514d3},_0x279c4d){return{'output':_0x1514d3,'structured':_0x1d8ff3,..._0x279c4d!==void 0x0?{'content':_0x279c4d}:{}};}var ToolExecutionError=class extends Error{['structured'];constructor(_0x1a2959,_0x3a90bd={}){const _0x2297c3={_0x24c077:0x365,_0x1c3895:0x3e0,_0x243b56:0x3c5,_0x31f76e:0x3f5};function _0x37c475(_0x471597,_0x1866cb,_0x54851b,_0xe6d3a4){return _0x53d6(_0x54851b- -0x1cb,_0x1866cb);}super(_0x1a2959);function _0x2682bd(_0x123e54,_0x2da836,_0x4c2bf0,_0x503b65){return _0x53d6(_0x123e54-0x1b2,_0x503b65);}this[_0x2682bd(0x397,0x3e1,_0x2297c3._0x24c077,_0x2297c3._0x1c3895)]=_0x2682bd(_0x2297c3._0x243b56,_0x2297c3._0x31f76e,0x390,0x375),this['structured']=_0x3a90bd;}};function defineTool(_0x1a5f9e){return _0x1a5f9e;}var ToolRegistry=class{[_0x1a8375(-0x45,-0x32,-0x6c,-0x6)]=new Map();constructor(_0x37cd0b=[]){for(const _0x3f773d of _0x37cd0b){this['register'](_0x3f773d);}}['register'](_0x1bfd0c){const _0x61c057={_0x191755:0x3e3,_0x4f5ae7:0x39d,_0x1d1ec1:0x3a6,_0x9d6355:0x3c2,_0x437c78:0x1f,_0x3d1cbf:0x60},_0x25be08={_0x1a927b:0x40},_0x1fc4e6={_0x2567a2:0x16,_0x4d2bae:0x9b,_0x282dfe:0x1a5};function _0x449de5(_0xe752a9,_0xa8bbad,_0x33e0c7,_0x542ecb){return _0x1a8375(_0xa8bbad- -_0x1fc4e6._0x2567a2,_0xa8bbad-_0x1fc4e6._0x4d2bae,_0x33e0c7-_0x1fc4e6._0x282dfe,_0xe752a9);}function _0x23d6e2(_0x18262a,_0x44a707,_0x47c24a,_0x55f292){return _0x1a8375(_0x47c24a-0x3eb,_0x44a707-0x1cd,_0x47c24a-_0x25be08._0x1a927b,_0x18262a);}this[_0x23d6e2(_0x61c057._0x191755,_0x61c057._0x4f5ae7,_0x61c057._0x1d1ec1,_0x61c057._0x9d6355)][_0x449de5(_0x61c057._0x437c78,0x1f,_0x61c057._0x3d1cbf,-0x1f)](_0x1bfd0c['name'],_0x1bfd0c);}['get'](_0x38298e){return this['toolsByName']['get'](_0x38298e);}[_0x1a8375(-0x4a,-0x50,-0x8,-0x40)](){const _0x188bf0={_0x3a4202:0x21a,_0x4f7697:0x1d5,_0x536040:0x1f0,_0x39b57e:0x1e3,_0x2e010d:0x1fa},_0x2d2b18={_0x3d7a76:0xfb},_0x19a461={_0x53c459:0xf5,_0x57d977:0xd0};function _0x4f1743(_0xba2bda,_0x50aaac,_0x45d48e,_0x59b421){return _0x1a8375(_0x50aaac-0x21a,_0x50aaac-_0x19a461._0x53c459,_0x45d48e-_0x19a461._0x57d977,_0x45d48e);}function _0x2ec1d0(_0x58a56b,_0x3deb0a,_0x1da9b0,_0x1853cd){return _0x10e4b8(_0x58a56b-_0x2d2b18._0x3d7a76,_0x1da9b0,_0x1853cd- -0x431,_0x1853cd-0xd9);}return[...this[_0x4f1743(_0x188bf0._0x3a4202,_0x188bf0._0x4f7697,_0x188bf0._0x536040,_0x188bf0._0x39b57e)][_0x4f1743(_0x188bf0._0x2e010d,0x236,0x226,0x1ed)]()];}[_0x1a8375(0x2a,-0x10,-0x4,0x6e)](){const _0x236fd4={_0x3f9edc:0x128,_0x58a0c0:0x11c,_0x328744:0xbe,_0x2f561b:0x62},_0x328c99={_0x2d2abf:0x58e,_0x2c0803:0x5e4},_0x1ab7a5={_0x1db4cb:0xc1,_0x13138f:0x432},_0x3879c9={_0x72f5dc:0x13e},_0x57abeb={_0xafc21e:0xa5,_0x4fdb1f:0x39};function _0x205c3d(_0x21a099,_0x2ee10c,_0x10c3d4,_0x17ed66){return _0x1a8375(_0x10c3d4- -_0x57abeb._0xafc21e,_0x2ee10c-0x1d6,_0x10c3d4-_0x57abeb._0x4fdb1f,_0x21a099);}function _0x4523fa(_0x1fe6f4,_0x39a64b,_0x312774,_0x9c5839){return _0x10e4b8(_0x1fe6f4-0x1ab,_0x312774,_0x1fe6f4- -0x2e2,_0x9c5839-_0x3879c9._0x72f5dc);}return this[_0x205c3d(-_0x236fd4._0x3f9edc,-_0x236fd4._0x58a0c0,-0xef,-_0x236fd4._0x328744)]()[_0x4523fa(0x73,0x53,0xc4,_0x236fd4._0x2f561b)](_0x2efbed=>{const _0x20bb21={_0x20530b:0x4f};function _0x52361b(_0x46f4f8,_0x50e6b1,_0x10292f,_0x147a7c){return _0x4523fa(_0x50e6b1-0x564,_0x50e6b1-0x1df,_0x147a7c,_0x147a7c-_0x20bb21._0x20530b);}function _0x313ec0(_0x128c79,_0x590f71,_0x82383f,_0x1c4ae5){return _0x205c3d(_0x82383f,_0x590f71-_0x1ab7a5._0x1db4cb,_0x128c79-_0x1ab7a5._0x13138f,_0x1c4ae5-0xbe);}return{'name':_0x2efbed['name'],'description':_0x2efbed[_0x52361b(0x5b1,0x5cf,_0x328c99._0x2d2abf,0x60f)],'input_schema':_0x2efbed[_0x52361b(_0x328c99._0x2c0803,0x5b6,0x583,0x567)]};});}};function validateToolInput(_0x2da258,_0x2c1c3a){const _0x1d1793={_0x301102:0x459,_0x2e47bf:0x49c,_0x1d1846:0x439},_0x4bc016={_0x1466d6:0x18b};validateAgainstSchema(_0x22a5ea(0x490,_0x1d1793._0x301102,_0x1d1793._0x2e47bf,_0x1d1793._0x1d1846),_0x2da258,_0x2c1c3a);function _0x22a5ea(_0x496142,_0x5c96ca,_0x24b77f,_0x1f048d){return _0x10e4b8(_0x496142-0x65,_0x496142,_0x5c96ca-_0x4bc016._0x1466d6,_0x1f048d-0x10f);}return _0x2da258;}function deriveFinalToolOutput(_0x25f970){const _0x1000a6={_0x423fab:0x3c0,_0x391259:0x3a8,_0x1e90f5:0x3fb,_0x55f3e1:0x3c8,_0x250cf7:0x407,_0x380693:0x3d4,_0x505a1f:0x42c,_0xa13a61:0x396,_0x54ca2b:0x394,_0x2aed6c:0x39b,_0x473cbb:0x368,_0x3012a9:0x3b1,_0x20e873:0x3ca,_0x4de39d:0x3de,_0x4e92a1:0x39b,_0x4c7d21:0x3e1,_0xef1f45:0x422},_0x40e3a7={_0x187ec5:0x383,_0x27eb2d:0x52},_0x969bc7={_0x1f3759:0xd2};if(_0x25f970['length']===0x0)return{'output':'','structured':{}};if(_0x25f970[_0xd3362f(0x397,0x381,0x3c9,_0x1000a6._0x423fab)]===0x1)return{'output':_0x25f970[0x0][_0x7c54c1(0x3a9,0x3c2,_0x1000a6._0x391259,_0x1000a6._0x1e90f5)],'structured':_0x25f970[0x0][_0x7c54c1(0x3d8,0x409,_0x1000a6._0x55f3e1,_0x1000a6._0x250cf7)],..._0x25f970[0x0][_0x7c54c1(0x3e1,_0x1000a6._0x380693,_0x1000a6._0x505a1f,0x40a)]!==void 0x0?{'content':_0x25f970[0x0][_0xd3362f(_0x1000a6._0xa13a61,_0x1000a6._0x54ca2b,_0x1000a6._0x2aed6c,0x3c3)]}:{}};function _0x7c54c1(_0x13307d,_0x378efa,_0x37b552,_0x488147){return _0x10e4b8(_0x13307d-_0x969bc7._0x1f3759,_0x488147,_0x13307d-0x93,_0x488147-0xbe);}const _0xd44d4b=_0x25f970[_0xd3362f(_0x1000a6._0x473cbb,_0x1000a6._0x1e90f5,_0x1000a6._0x3012a9,0x3b1)](_0x12fb03=>_0x12fb03['content']!==void 0x0);function _0xd3362f(_0x2c6bcb,_0x2a69ad,_0x9d2b8,_0x4f5290){return _0x1a8375(_0x4f5290-_0x40e3a7._0x187ec5,_0x2a69ad-_0x40e3a7._0x27eb2d,_0x9d2b8-0x1ac,_0x2a69ad);}return{'output':_0x25f970[_0xd3362f(0x3d0,0x393,0x383,_0x1000a6._0x20e873)](_0xa8c5e2=>_0xa8c5e2[_0x7c54c1(0x3a9,0x393,0x3d6,0x3ba)])['join'](''),'structured':{'chunks':_0x25f970['map'](_0x113e18=>_0x113e18[_0x7c54c1(0x3d8,0x389,0x3b9,0x3cb)])},..._0xd44d4b[_0x7c54c1(_0x1000a6._0x4de39d,0x391,0x3bd,_0x1000a6._0x4e92a1)]===0x1?{'content':_0xd44d4b[0x0][_0x7c54c1(_0x1000a6._0x4c7d21,_0x1000a6._0xef1f45,0x3ed,0x41d)]}:{}};}function createToolMeta(){return{'transforms':[]};}function createErrorToolResult(_0xdc37d8,_0x5f2c75,_0x322bfd,_0x5d4d7b=[]){const _0x8c506={_0x5a6142:0xa9,_0x43f3f9:0xaa,_0xd4cb1:0x7c,_0x42f1d1:0x217},_0x5a042a={_0x55378c:0x155,_0x1a901a:0x1b},_0x51969={_0x576cab:0x8c,_0x5aa558:0xf2,_0x35a709:0x4d};function _0x40670f(_0x203f5d,_0x28ffd2,_0x4a9655,_0xe3f688){return _0x1a8375(_0xe3f688- -_0x51969._0x576cab,_0x28ffd2-_0x51969._0x5aa558,_0x4a9655-_0x51969._0x35a709,_0x203f5d);}function _0x4f3ad6(_0x41d736,_0x5acd01,_0x3c5225,_0x410b8a){return _0x10e4b8(_0x41d736-0xc0,_0x41d736,_0x410b8a- -_0x5a042a._0x55378c,_0x410b8a-_0x5a042a._0x1a901a);}return{'callId':_0xdc37d8['id'],'toolName':_0xdc37d8[_0x40670f(-_0x8c506._0x5a6142,-0x57,-_0x8c506._0x43f3f9,-_0x8c506._0xd4cb1)],'status':_0x4f3ad6(0x1f4,0x220,_0x8c506._0x42f1d1,0x1e6),'output':_0x5f2c75,'structured':_0x322bfd,'chunks':_0x5d4d7b,'meta':createToolMeta()};}function createRejectedToolResult(_0x101561,_0x2bb7e1){const _0x46af06={_0x473827:0xc1,_0x33d6e2:0x89,_0x5794be:0x86,_0x358a65:0x8b,_0x45b794:0x79},_0x4c0e71={_0x4486a9:0xc,_0x590daf:0x2ca,_0x1effe3:0x111},_0x279ad5={_0x43063d:0x59,_0x27d08f:0x3b7,_0x9fe9a:0x7b};function _0x4db913(_0x2f62d2,_0x3e8a7f,_0xf6e1e6,_0x5638c8){return _0x10e4b8(_0x2f62d2-_0x279ad5._0x43063d,_0x2f62d2,_0x5638c8- -_0x279ad5._0x27d08f,_0x5638c8-_0x279ad5._0x9fe9a);}function _0x1e5aad(_0x566bdd,_0x4ad57b,_0xa3f242,_0x1531ec){return _0x10e4b8(_0x566bdd-_0x4c0e71._0x4486a9,_0x1531ec,_0x4ad57b- -_0x4c0e71._0x590daf,_0x1531ec-_0x4c0e71._0x1effe3);}const _0x322428=_0x2bb7e1?.[_0x4db913(-0x40,-0x89,-_0x46af06._0x473827,-0x79)]()[_0x4db913(-0xba,-0x68,-0x40,-0x6c)]?_0x2bb7e1:_0x4db913(-_0x46af06._0x33d6e2,-0x57,-_0x46af06._0x5794be,-_0x46af06._0x358a65)+_0x101561['name'];return createErrorToolResult(_0x101561,_0x322428,{'error':'tool_rejected',..._0x2bb7e1?.[_0x4db913(-0xae,-0x49,-0x7c,-_0x46af06._0x45b794)]()[_0x4db913(-0x97,-0x32,-0x3f,-0x6c)]?{'reason':_0x2bb7e1}:{}});}function createAbortedToolResult(_0x231006,_0x2e400b,_0x45f99b=[]){const _0x4f6433={_0x3a4b74:0x3e0,_0x40bc31:0x418,_0x399f71:0x45e,_0x5121a9:0x1e,_0x2db589:0xe,_0xe709fe:0xa5},_0x3df6a6={_0x539175:0x69,_0x7e83de:0x330,_0x469210:0x119},_0x321255={_0x1f8ecb:0x44f,_0x25daeb:0x6d},_0x3ef89b=toAbortError(_0x2e400b);function _0x9ea535(_0x48afb8,_0x5bef96,_0x323cfe,_0x1de5a3){return _0x1a8375(_0x323cfe-_0x321255._0x1f8ecb,_0x5bef96-0xbf,_0x323cfe-_0x321255._0x25daeb,_0x1de5a3);}function _0x38b479(_0x2f24ec,_0x327b7b,_0x15a73f,_0x2446d2){return _0x10e4b8(_0x2f24ec-_0x3df6a6._0x539175,_0x15a73f,_0x327b7b- -_0x3df6a6._0x7e83de,_0x2446d2-_0x3df6a6._0x469210);}return createErrorToolResult(_0x231006,_0x3ef89b[_0x9ea535(0x423,_0x4f6433._0x3a4b74,_0x4f6433._0x40bc31,_0x4f6433._0x399f71)],{'error':_0x3ef89b[_0x38b479(-_0x4f6433._0x5121a9,-0x59,-_0x4f6433._0x2db589,-_0x4f6433._0xe709fe)],'aborted':!![]},_0x45f99b);}function createSuccessToolResult(_0x361d3c,_0x1fe7fa,_0x518571){const _0x4b0cf5={_0x439d50:0x4fc,_0x3b9189:0x528,_0x445657:0x570,_0x5ca6fc:0x54f,_0xfcc8ff:0x58f,_0x51bbc8:0x56e,_0x42739a:0x54f,_0x39555a:0x18c,_0x229ac1:0x1d7,_0x2a7480:0x1a0,_0x246d0d:0x1d1,_0x5ade72:0x18c},_0x415b8f={_0x17451a:0xa7},_0x25c8fb={_0x16e661:0x1bc,_0x22bed0:0x1d1};function _0x3ced59(_0x3915b5,_0xc6acfa,_0x4b0dd0,_0x2bda97){return _0x10e4b8(_0x3915b5-_0x25c8fb._0x16e661,_0xc6acfa,_0x2bda97- -0x1c2,_0x2bda97-_0x25c8fb._0x22bed0);}function _0x47e19d(_0x2c0bfd,_0x5c4692,_0x1e35f3,_0x6e7af0){return _0x1a8375(_0x6e7af0-0x518,_0x5c4692-_0x415b8f._0x17451a,_0x1e35f3-0x3d,_0x1e35f3);}return{'callId':_0x361d3c['id'],'toolName':_0x361d3c[_0x47e19d(_0x4b0cf5._0x439d50,0x4e2,0x4f7,_0x4b0cf5._0x3b9189)],'status':'ok','output':_0x1fe7fa[_0x47e19d(0x507,_0x4b0cf5._0x445657,_0x4b0cf5._0x5ca6fc,0x520)],'structured':_0x1fe7fa[_0x47e19d(_0x4b0cf5._0xfcc8ff,_0x4b0cf5._0x51bbc8,0x55f,_0x4b0cf5._0x42739a)],..._0x1fe7fa[_0x3ced59(0x16f,0x148,0x193,_0x4b0cf5._0x39555a)]!==void 0x0?{'content':_0x1fe7fa[_0x3ced59(_0x4b0cf5._0x229ac1,_0x4b0cf5._0x2a7480,_0x4b0cf5._0x246d0d,_0x4b0cf5._0x5ade72)]}:{},'chunks':_0x518571,'meta':createToolMeta()};}function createUnknownToolResult(_0xeebb29){const _0x57b589={_0x55a32e:0x108,_0x2ee0cc:0x82,_0x47502a:0xba,_0x283054:0x90,_0x26aeb4:0x9d},_0x3ba253={_0x226eb6:0xaa,_0x3004a9:0xa1,_0xc6e337:0xdf};function _0x12441d(_0x4105e4,_0x27ffc5,_0x48f151,_0x557679){return _0x1a8375(_0x48f151-0xab,_0x27ffc5-0x10a,_0x48f151-0xec,_0x557679);}function _0x4e3462(_0x15ae86,_0xfa38c9,_0x2175be,_0x856bc1){return _0x1a8375(_0x2175be-_0x3ba253._0x226eb6,_0xfa38c9-_0x3ba253._0x3004a9,_0x2175be-_0x3ba253._0xc6e337,_0x856bc1);}return createErrorToolResult(_0xeebb29,'Unknown\x20tool:\x20'+_0xeebb29[_0x4e3462(_0x57b589._0x55a32e,_0x57b589._0x2ee0cc,_0x57b589._0x47502a,0x9e)],{'error':_0x4e3462(_0x57b589._0x283054,0xfd,0xbc,_0x57b589._0x26aeb4)});}function isDispatchDecision(_0x5ebea4){const _0x806f9e={_0x541797:0x2bf,_0x64d9dd:0x30a,_0xa28de9:0x2ce,_0x109f08:0x49},_0x172841={_0x15281a:0x1d1,_0xdee6ba:0x43,_0x489e85:0x15b},_0x50c136={_0x184cf6:0x124};if(typeof _0x5ebea4!=='object'||_0x5ebea4===null)return![];function _0x58f067(_0x3d207a,_0x2e6846,_0x2a1753,_0x4edb14){return _0x1a8375(_0x2a1753-0x4f,_0x2e6846-_0x50c136._0x184cf6,_0x2a1753-0x14c,_0x4edb14);}function _0x242586(_0x2425e3,_0x23e4e4,_0xffc23d,_0x238257){return _0x10e4b8(_0x2425e3-_0x172841._0x15281a,_0x2425e3,_0x23e4e4- -_0x172841._0xdee6ba,_0x238257-_0x172841._0x489e85);}return _0x5ebea4['action']===_0x242586(0x2a5,_0x806f9e._0x541797,_0x806f9e._0x64d9dd,_0x806f9e._0xa28de9)||_0x5ebea4[_0x58f067(0x84,_0x806f9e._0x109f08,0x90,0x4a)]==='run';}function _0x10e4b8(_0x217e48,_0x37f945,_0x31a6aa,_0x5ce899){const _0x5ba7fc={_0x20573e:0x139};return _0x53d6(_0x31a6aa-_0x5ba7fc._0x20573e,_0x37f945);}function normalizeExecutionError(_0x36ac02){const _0x32f22d={_0x1a7813:0x1d7,_0x4fd323:0x225,_0x2a461f:0x223,_0x34421e:0x293,_0x131a81:0x2e3,_0x24aca0:0x275},_0x1658a8={_0x4d9118:0x7b},_0x3f87a9={_0x543070:0x15f,_0xd2fc4c:0x154};if(_0x36ac02 instanceof ToolExecutionError)return{'errorMessage':_0x36ac02[_0x5e036a(_0x32f22d._0x1a7813,0x240,_0x32f22d._0x4fd323,0x1dc)],'structured':{'error':_0x36ac02[_0x9fe414(-0x21c,-0x23b,-0x1e2,-_0x32f22d._0x2a461f)],..._0x36ac02[_0x5e036a(0x29c,0x28b,_0x32f22d._0x34421e,_0x32f22d._0x131a81)]}};if(_0x36ac02 instanceof Error)return{'errorMessage':_0x36ac02['message'],'structured':{'error':_0x36ac02[_0x5e036a(_0x32f22d._0x24aca0,0x26f,0x225,0x227)]}};function _0x9fe414(_0x16edeb,_0x4c9026,_0x15363e,_0x5a165c){return _0x1a8375(_0x16edeb- -0x1e5,_0x4c9026-_0x3f87a9._0x543070,_0x15363e-_0x3f87a9._0xd2fc4c,_0x4c9026);}const _0x1b9102=String(_0x36ac02);function _0x5e036a(_0x44b18e,_0x195942,_0x1a1494,_0x453221){return _0x10e4b8(_0x44b18e-0x1e7,_0x44b18e,_0x1a1494- -0xb2,_0x453221-_0x1658a8._0x4d9118);}return{'errorMessage':_0x1b9102,'structured':{'error':_0x1b9102}};}async function emitEvent(_0x421f6c,_0x30cb02,_0x1345ea){await _0x421f6c?.(_0x30cb02,_0x1345ea);}async function resolveDispatchDecision(_0x562ad4,_0x4c485f,_0x485dff){const _0x5635f0={_0x566064:0xbd,_0x32eb30:0xda,_0x4b57de:0xa9,_0xe8f085:0x9e,_0x201c7b:0x9d},_0x57c263={_0x3fe63c:0x10c,_0x473a48:0x39},_0x232401={_0x49af7a:0x2d4,_0x3638e2:0x2dd,_0x53aac6:0x3bf,_0x35422d:0x432,_0x1f667e:0x3fa,_0x3263f7:0x3e4,_0x1e28cd:0x29e,_0x17a7ed:0x2ea,_0x4981a2:0x2de,_0x241082:0x3a0},_0x58206b={_0x1c261c:0x196,_0x4bbf1f:0x140},_0x29bfc9={_0x42b8fe:0x23c,_0x335f51:0x40,_0x430dde:0x20,_0x5571f0:0x1fd,_0x43b685:0x26f,_0x1f354c:0x246,_0x40bb4b:0x22c,_0x3d449c:0x24e};if(!_0x562ad4)return{'action':'run'};function _0x5a94b1(_0x400eb5,_0x5ea610,_0x4354fe,_0x2cd85d){return _0x10e4b8(_0x400eb5-0x90,_0x4354fe,_0x400eb5-0x151,_0x2cd85d-0x1ad);}const _0xd2d2cb=Promise[_0x565152(_0x5635f0._0x566064,0xc9,0x6c,0xad)]()[_0x5a94b1(0x416,0x423,0x41e,0x43a)](()=>_0x562ad4(_0x4c485f,_0x485dff));if(!_0x485dff['signal']){const _0x4ab216=await _0xd2d2cb;return isDispatchDecision(_0x4ab216)?_0x4ab216:{'action':'run'};}const _0x7adc6c=new Promise((_0x251f40,_0x3976ba)=>{const _0xc2bf9f={_0x525fad:0x2e2,_0x45eb22:0x1e5},_0x5d21a3=()=>{function _0x340d25(_0x203d2f,_0x1ab929,_0x582eb2,_0x5d233b){return _0x53d6(_0x1ab929- -0x1fb,_0x203d2f);}function _0x3cd380(_0x4468ce,_0x2a4a60,_0x52e411,_0x23caeb){return _0x53d6(_0x52e411-0x56,_0x23caeb);}_0x485dff[_0x3cd380(_0x29bfc9._0x42b8fe,0x285,0x237,0x20f)]?.[_0x340d25(-0x21,-0x1d,-_0x29bfc9._0x335f51,-_0x29bfc9._0x430dde)](_0x3cd380(_0x29bfc9._0x5571f0,0x1f4,0x223,0x225),_0x5d21a3),_0x3976ba(toAbortError(_0x485dff['signal']?.[_0x3cd380(_0x29bfc9._0x43b685,_0x29bfc9._0x1f354c,_0x29bfc9._0x40bb4b,_0x29bfc9._0x3d449c)]));};function _0x7c688(_0x2ab749,_0x20da85,_0x4667bc,_0x3621f4){return _0x565152(_0x3621f4-_0x58206b._0x1c261c,_0x4667bc,_0x4667bc-_0x58206b._0x4bbf1f,_0x3621f4-0x5a);}function _0x51597c(_0x63c7cb,_0x5a72fb,_0x3efe16,_0x2a202f){return _0x565152(_0x3efe16-_0xc2bf9f._0x525fad,_0x5a72fb,_0x3efe16-_0xc2bf9f._0x45eb22,_0x2a202f-0x12f);}if(_0x485dff[_0x7c688(_0x232401._0x49af7a,_0x232401._0x3638e2,0x2cc,0x2ae)]?.['aborted']){_0x3976ba(toAbortError(_0x485dff[_0x51597c(_0x232401._0x53aac6,_0x232401._0x35422d,_0x232401._0x1f667e,0x3e6)]['reason']));return;}_0x485dff[_0x51597c(0x428,_0x232401._0x3263f7,_0x232401._0x1f667e,0x443)]?.[_0x7c688(_0x232401._0x1e28cd,0x2b6,_0x232401._0x17a7ed,_0x232401._0x4981a2)](_0x51597c(0x436,_0x232401._0x241082,0x3e6,0x41e),_0x5d21a3,{'once':!![]});});function _0x565152(_0x373a3b,_0x2cad15,_0x2ddf24,_0x4bc5ed){return _0x1a8375(_0x373a3b-_0x57c263._0x3fe63c,_0x2cad15-_0x57c263._0x473a48,_0x2ddf24-0x8c,_0x2cad15);}const _0x45b917=await Promise[_0x565152(_0x5635f0._0x32eb30,_0x5635f0._0x4b57de,_0x5635f0._0xe8f085,_0x5635f0._0x201c7b)]([_0xd2d2cb,_0x7adc6c]);return isDispatchDecision(_0x45b917)?_0x45b917:{'action':'run'};}async function executeToolCall(_0x1ba6a1,_0x4dca8c,_0x15b42f,_0x493aa7,_0x1f348f){const _0x5a9d99={_0x42f8ff:0x257,_0x10ae4f:0x3b3,_0x22b413:0x3e9,_0x5f09b1:0x28c,_0x1524e4:0x23f,_0x5447b9:0x255,_0x14bff9:0x1ff,_0x796715:0x23f,_0x4a428b:0x20f,_0x1ef7d4:0x220,_0x420569:0x3b8,_0x207d2a:0x39a,_0x2301e6:0x399,_0x1d4ddc:0x3b7,_0x13aa1a:0x403,_0x227b05:0x1ea,_0x5d4e8e:0x3fd,_0x431b35:0x3d6,_0x3a3274:0x3c8,_0x10341e:0x3a8,_0x9f2fac:0x2a6,_0xce58c0:0x26e,_0x579f1e:0x240,_0x3e5365:0x28d,_0x4d6ece:0x271,_0x1890d2:0x236,_0x385703:0x277,_0x1ba287:0x21b,_0x40b7f4:0x403,_0x1cbb66:0x3bd,_0x101c95:0x28b,_0x2365ba:0x215,_0x3fea1d:0x262,_0x224e01:0x39f,_0x3f4026:0x3c6,_0x2341d6:0x3d6,_0x154b65:0x387,_0x4c798a:0x39b,_0x3584fd:0x239,_0x3235c1:0x3a9,_0x158743:0x381,_0x1473b9:0x3bc,_0xfdcbd6:0x3fa,_0x483047:0x3ef},_0x58bb68={_0x2eadf8:0xb2,_0x11f838:0x80,_0x5dd408:0x2db},_0x46b02d={_0x205de7:0x15a,_0x5dc111:0x1d3},_0x289ace={_0x239349:0x166,_0x6bbc8b:0x40},_0x2cd8e5={_0x451339:0xbc},_0x1b385b={_0xd3286:0x0},_0x11c952={..._0x15b42f,'toolCallId':_0x4dca8c['id']};throwIfAborted(_0x11c952[_0x16945c(0x289,_0x5a9d99._0x42f8ff,0x251,0x291)]);const _0x2db8a0=await resolveDispatchDecision(_0x493aa7,_0x4dca8c,_0x11c952);throwIfAborted(_0x11c952[_0x4515f9(_0x5a9d99._0x10ae4f,0x3d6,0x40b,_0x5a9d99._0x22b413)]);function _0x16945c(_0x4be6f8,_0x158377,_0x286e10,_0x16d87e){return _0x1a8375(_0x158377-0x24b,_0x158377-_0x1b385b._0xd3286,_0x286e10-0x1e6,_0x16d87e);}if(_0x2db8a0[_0x16945c(0x2ca,_0x5a9d99._0x5f09b1,_0x5a9d99._0x1524e4,_0x5a9d99._0x5447b9)]===_0x16945c(_0x5a9d99._0x14bff9,_0x5a9d99._0x796715,0x28b,0x1f7)){const _0xd96372=createRejectedToolResult(_0x4dca8c,_0x2db8a0['reason']);return await emitEvent(_0x1f348f,{'type':_0x16945c(0x296,0x26b,0x29b,0x245),'toolCall':_0x4dca8c,'result':_0xd96372},_0x11c952),_0xd96372;}const _0x613822=_0x1ba6a1[_0x16945c(0x234,_0x5a9d99._0x4a428b,0x1dc,_0x5a9d99._0x1ef7d4)](_0x4dca8c['name']);if(!_0x613822){const _0x174f5b=createUnknownToolResult(_0x4dca8c);return await emitEvent(_0x1f348f,{'type':_0x4515f9(0x396,_0x5a9d99._0x420569,_0x5a9d99._0x207d2a,0x3fd),'toolCall':_0x4dca8c,'result':_0x174f5b},_0x11c952),_0x174f5b;}throwIfAborted(_0x11c952[_0x4515f9(_0x5a9d99._0x2301e6,0x3d6,_0x5a9d99._0x1d4ddc,_0x5a9d99._0x13aa1a)]);function _0x4515f9(_0x54ce07,_0x3db152,_0x16c8f8,_0x2023a6){return _0x10e4b8(_0x54ce07-0x18d,_0x16c8f8,_0x3db152-_0x2cd8e5._0x451339,_0x2023a6-0x1a8);}await emitEvent(_0x1f348f,{'type':_0x16945c(0x24d,0x208,_0x5a9d99._0x227b05,0x1bc),'toolCall':_0x4dca8c},_0x11c952);try{throwIfAborted(_0x11c952[_0x4515f9(_0x5a9d99._0x5d4e8e,_0x5a9d99._0x431b35,0x41c,0x3a4)]);const _0x146816=validateToolInput(_0x4dca8c[_0x4515f9(0x359,0x38a,_0x5a9d99._0x3a3274,_0x5a9d99._0x10341e)],_0x613822[_0x16945c(_0x5a9d99._0x9f2fac,0x271,_0x5a9d99._0xce58c0,_0x5a9d99._0x579f1e)]),_0x187af1=await _0x613822[_0x16945c(0x223,0x24b,0x225,0x27d)](_0x146816,_0x11c952),_0x2a6d68=[],_0x43976e=addAbortListener(_0x11c952[_0x16945c(0x27d,0x257,_0x5a9d99._0x3e5365,0x256)],()=>{function _0x17a6d6(_0x1aa3a8,_0x4d4ac4,_0x1315e7,_0x2d7e25){return _0x16945c(_0x1aa3a8-0xa2,_0x4d4ac4- -_0x289ace._0x239349,_0x1315e7-_0x289ace._0x6bbc8b,_0x1315e7);}function _0x140a66(_0x278546,_0x3cdcd6,_0x39091c,_0x2cc05d){return _0x4515f9(_0x278546-0x151,_0x278546- -_0x46b02d._0x205de7,_0x3cdcd6,_0x2cc05d-_0x46b02d._0x5dc111);}void _0x187af1[_0x17a6d6(_0x58bb68._0x2eadf8,0xcc,_0x58bb68._0x11f838,0xd5)](void 0x0)[_0x140a66(0x2a8,_0x58bb68._0x5dd408,0x26c,0x275)](()=>{});});try{throwIfAborted(_0x11c952[_0x16945c(0x24a,_0x5a9d99._0x42f8ff,0x261,0x28b)]);let _0x553a46=await _0x187af1[_0x16945c(_0x5a9d99._0x4d6ece,_0x5a9d99._0x3e5365,0x270,0x29e)]();while(!_0x553a46[_0x16945c(_0x5a9d99._0x1890d2,0x23a,_0x5a9d99._0x385703,_0x5a9d99._0x1ba287)]){throwIfAborted(_0x11c952[_0x4515f9(_0x5a9d99._0x40b7f4,0x3d6,0x3ba,_0x5a9d99._0x1cbb66)]);const _0x577b9e=normalizeToolOutputValue(_0x553a46[_0x16945c(_0x5a9d99._0x101c95,0x245,_0x5a9d99._0x2365ba,0x1f9)]);_0x2a6d68[_0x16945c(0x258,0x27c,0x279,_0x5a9d99._0x3fea1d)](_0x577b9e),await emitEvent(_0x1f348f,{'type':_0x4515f9(0x3cf,_0x5a9d99._0x224e01,_0x5a9d99._0x2301e6,_0x5a9d99._0x3f4026),'toolCall':_0x4dca8c,'chunk':_0x577b9e},_0x11c952),throwIfAborted(_0x11c952[_0x4515f9(0x3cc,_0x5a9d99._0x2341d6,_0x5a9d99._0x154b65,_0x5a9d99._0x4c798a)]),_0x553a46=await _0x187af1['next']();}throwIfAborted(_0x11c952[_0x16945c(0x219,0x257,0x245,0x235)]);const _0xea8945=_0x553a46['value']===void 0x0?deriveFinalToolOutput(_0x2a6d68):normalizeToolOutputValue(_0x553a46['value']),_0x39e373=createSuccessToolResult(_0x4dca8c,_0xea8945,_0x2a6d68);return await emitEvent(_0x1f348f,{'type':_0x16945c(0x226,_0x5a9d99._0x3584fd,0x1f6,0x1e8),'toolCall':_0x4dca8c,'result':_0x39e373},_0x11c952),_0x39e373;}catch(_0x122e6d){if(isAbortError(_0x122e6d)){const _0x3741bd=createAbortedToolResult(_0x4dca8c,_0x122e6d,_0x2a6d68);return await emitEvent(_0x1f348f,{'type':_0x4515f9(0x373,0x3b8,_0x5a9d99._0x3235c1,0x379),'toolCall':_0x4dca8c,'result':_0x3741bd},_0x11c952),_0x3741bd;}const {errorMessage:_0x1c104f,structured:_0x43ccf9}=normalizeExecutionError(_0x122e6d),_0xc9b61d=createErrorToolResult(_0x4dca8c,_0x1c104f,_0x43ccf9,_0x2a6d68);return await emitEvent(_0x1f348f,{'type':'tool_completed','toolCall':_0x4dca8c,'result':_0xc9b61d},_0x11c952),_0xc9b61d;}finally{_0x43976e();}}catch(_0x2f9ab8){if(isAbortError(_0x2f9ab8)){const _0x30947a=createAbortedToolResult(_0x4dca8c,_0x2f9ab8);return await emitEvent(_0x1f348f,{'type':_0x4515f9(_0x5a9d99._0x158743,0x3b8,0x3b1,_0x5a9d99._0x1473b9),'toolCall':_0x4dca8c,'result':_0x30947a},_0x11c952),_0x30947a;}const {errorMessage:_0xed3927,structured:_0xc7df77}=normalizeExecutionError(_0x2f9ab8),_0x3a36d4=createErrorToolResult(_0x4dca8c,_0xed3927,_0xc7df77);return await emitEvent(_0x1f348f,{'type':_0x4515f9(_0x5a9d99._0xfdcbd6,_0x5a9d99._0x420569,_0x5a9d99._0x483047,0x3d4),'toolCall':_0x4dca8c,'result':_0x3a36d4},_0x11c952),_0x3a36d4;}}function createInternalToolRuntime(_0x4d06a2=[],_0x225507={}){const _0x2c1ccb={_0x377464:0xfb,_0x22daa1:0xd6,_0x177728:0x88},_0x49d3a8={_0x466f83:0x44a,_0x27b3e5:0x454},_0x1bb5d1={_0x2fc484:0x246};let _0x5e45ee=new ToolRegistry(_0x4d06a2);return{'listToolSchemas'(){function _0x1966ca(_0x48b752,_0x18a4c3,_0x526467,_0x2253f1){return _0x53d6(_0x526467- -0xaf,_0x2253f1);}return _0x5e45ee[_0x1966ca(0x161,0x103,0x150,0x103)]();},'setTools'(_0x1b2ac5){_0x5e45ee=new ToolRegistry(_0x1b2ac5);},async 'executeCalls'(_0x124e48,_0x1d963a){const _0x6b0a61={_0x15ec43:0x208,_0x100956:0x1d8},_0x494463={_0x2d465e:0x198};function _0x1274e0(_0x28c2a5,_0x426308,_0x2c5ed9,_0x3e0494){return _0x53d6(_0x28c2a5- -_0x494463._0x2d465e,_0x426308);}function _0x1b60fc(_0x204f38,_0x1976b5,_0x58ac97,_0x54ecb9){return _0x53d6(_0x1976b5-_0x1bb5d1._0x2fc484,_0x204f38);}return await Promise[_0x1b60fc(0x440,_0x49d3a8._0x466f83,0x485,_0x49d3a8._0x27b3e5)](_0x124e48[_0x1274e0(0x84,0x46,0x79,0x52)](async _0x3ff5c6=>{const _0x5405f5={_0x5d0784:0x17b,_0x5477ee:0x1e9};function _0x55ced8(_0x21a87b,_0x4c6f86,_0x1cddb8,_0x280181){return _0x1274e0(_0x280181-0x1c9,_0x4c6f86,_0x1cddb8-0x1c0,_0x280181-0x17);}function _0x1ef6af(_0x3a3281,_0x54d568,_0x4310aa,_0x426a86){return _0x1274e0(_0x4310aa-_0x5405f5._0x5d0784,_0x3a3281,_0x4310aa-_0x5405f5._0x5477ee,_0x426a86-0x113);}return await executeToolCall(_0x5e45ee,_0x3ff5c6,_0x1d963a,_0x225507[_0x55ced8(0x2a5,_0x6b0a61._0x15ec43,0x26a,0x256)],_0x225507[_0x55ced8(_0x6b0a61._0x100956,0x216,0x1d0,0x1c8)]);}));},async 'execute'(_0x4e0e4c,_0x4290e0){const [_0x542a1e]=await this[_0x169078(_0x2c1ccb._0x377464,_0x2c1ccb._0x22daa1,0xc8,_0x2c1ccb._0x177728)]([_0x4e0e4c],_0x4290e0);function _0x169078(_0x470eb8,_0x2a7e57,_0x1e2cfe,_0x480501){return _0x53d6(_0x1e2cfe- -0xef,_0x470eb8);}return _0x542a1e;}};}function getOrderedObserverExtensions(_0x504006,_0x47b466){const _0x43286b={_0x267b8f:0x10d,_0x486a8b:0x115,_0x11ad42:0xcc,_0x113fd5:0x151,_0x44fb72:0x111},_0xa615e2={_0x244888:0x48d,_0x4b8989:0x45a,_0x9971ab:0x472,_0x1b91b9:0x48b,_0x11460a:0x468,_0x826a83:0x437,_0x481a44:0x4ad,_0x203e43:0x94,_0x4094c9:0x5e,_0x4b38e6:0xe4,_0x3d31fb:0x1c,_0x442e9b:0xa,_0x13b872:0x35},_0x2c900a={_0x58f153:0x1aa},_0x131863={_0x448638:0xe7},_0x2827c5={_0x5f0ad3:0x9a},_0xce647e={_0x89ee6b:0x502,_0x15a98c:0xce,_0x4c5296:0x40};function _0x86b10e(_0x48b7c5,_0x18fd46,_0xacee14,_0x4c6381){return _0x1a8375(_0x4c6381-_0xce647e._0x89ee6b,_0x18fd46-_0xce647e._0x15a98c,_0xacee14-_0xce647e._0x4c5296,_0xacee14);}function _0x5697e6(_0x1085ea,_0x274164,_0x4c1f42,_0x49e268){return _0x1a8375(_0x4c1f42- -0x143,_0x274164-0x14,_0x4c1f42-_0x2827c5._0x5f0ad3,_0x1085ea);}return _0x504006[_0x5697e6(-_0x43286b._0x267b8f,-0x102,-_0x43286b._0x486a8b,-_0x43286b._0x11ad42)](_0x198780=>{function _0x1e1393(_0x57216d,_0x31fbc2,_0x54de3f,_0x11c3a3){return _0x5697e6(_0x11c3a3,_0x31fbc2-_0x131863._0x448638,_0x57216d-0xe4,_0x11c3a3-0x1e1);}function _0x337983(_0x1244b3,_0x236bcb,_0x33c915,_0x35ba7d){return _0x5697e6(_0x33c915,_0x236bcb-0x17e,_0x236bcb-0x580,_0x35ba7d-_0x2c900a._0x58f153);}return _0x198780[_0x337983(_0xa615e2._0x244888,_0xa615e2._0x4b8989,_0xa615e2._0x9971ab,_0xa615e2._0x1b91b9)]!==![]&&_0x198780[_0x337983(0x48d,_0xa615e2._0x11460a,_0xa615e2._0x826a83,_0xa615e2._0x481a44)]===_0x47b466&&_0x198780[_0x1e1393(-_0xa615e2._0x203e43,-_0xa615e2._0x4094c9,-0xcb,-_0xa615e2._0x4b38e6)]===_0x1e1393(-_0xa615e2._0x3d31fb,0x26,_0xa615e2._0x442e9b,_0xa615e2._0x13b872);})[_0x5697e6(-0x195,-0x147,-_0x43286b._0x113fd5,-_0x43286b._0x44fb72)]((_0x55d102,_0x29c6fd)=>_0x55d102[_0x5697e6(-0x135,-0x10e,-0xf9,-0xe0)]-_0x29c6fd[_0x86b10e(0x4fd,0x54f,0x510,0x54c)]);}function getOrderedTransformerExtensions(_0x32bf86,_0x10a8d1){const _0x34cb8f={_0x3ca337:0x6f,_0x247e55:0x32,_0x348def:0x5b7,_0x154020:0x569,_0x2aa450:0x549,_0x410d52:0x569},_0x27d5b4={_0x5f7531:0x1d5,_0x132c28:0x1ff,_0x1ed1b0:0x4cf,_0xd5ca2e:0x483,_0x4f87f1:0x41e,_0x4c538a:0x4bf},_0x55b0ba={_0x594e4b:0x1e0};function _0x511cdc(_0xf0e82c,_0x69ed97,_0x2b77ee,_0x567a50){return _0x1a8375(_0x567a50-0x577,_0x69ed97-0x155,_0x2b77ee-0xcd,_0x69ed97);}function _0xeac127(_0x49fdab,_0x129cca,_0x542187,_0x1edccc){return _0x1a8375(_0x129cca- -0x9d,_0x129cca-_0x55b0ba._0x594e4b,_0x542187-0x2e,_0x542187);}return _0x32bf86[_0xeac127(-0xaf,-_0x34cb8f._0x3ca337,-0xc0,-_0x34cb8f._0x247e55)](_0x409861=>{const _0x13228d={_0x4484d3:0x24},_0x5b2e0d={_0x3a95f1:0x4f5};function _0x538ed9(_0x27889c,_0x21c300,_0xc80d44,_0x177273){return _0xeac127(_0x27889c-0x28,_0x177273-_0x5b2e0d._0x3a95f1,_0x27889c,_0x177273-0x16f);}function _0x4077a5(_0x644d39,_0x33ee7e,_0x4392bd,_0x51e4a2){return _0xeac127(_0x644d39-_0x13228d._0x4484d3,_0x4392bd-0x296,_0x644d39,_0x51e4a2-0x1a1);}return _0x409861[_0x4077a5(_0x27d5b4._0x5f7531,_0x27d5b4._0x132c28,0x216,0x1eb)]!==![]&&_0x409861[_0x538ed9(_0x27d5b4._0x1ed1b0,0x454,0x4c8,_0x27d5b4._0xd5ca2e)]===_0x10a8d1&&_0x409861[_0x538ed9(0x42a,0x3f2,_0x27d5b4._0x4f87f1,0x423)]===_0x538ed9(0x45d,0x42f,_0x27d5b4._0x4c538a,0x471);})[_0x511cdc(_0x34cb8f._0x348def,_0x34cb8f._0x154020,_0x34cb8f._0x2aa450,_0x34cb8f._0x410d52)]((_0x2ac4e1,_0x24d172)=>_0x2ac4e1[_0x511cdc(0x5b5,0x5e2,0x5f9,0x5c1)]-_0x24d172[_0xeac127(-0x96,-0x53,-0x1e,-0x9)]);}function createExtensionRegistry(){const _0x188192={_0x3cc641:0x34,_0x1d74bb:0x8b},_0x293c04=[];return{'register'(_0x3abb38){function _0x56e674(_0x383ad5,_0x487b56,_0x456079,_0x514fe2){return _0x53d6(_0x456079- -0x240,_0x487b56);}_0x293c04[_0x56e674(-0x80,-_0x188192._0x3cc641,-0x3a,-_0x188192._0x1d74bb)](_0x3abb38);},async 'runTransformers'(_0x13220e,_0x1c55c6,_0x2540dd){let _0x445d4c=_0x1c55c6;for(const _0x389028 of getOrderedTransformerExtensions(_0x293c04,_0x13220e)){_0x445d4c=await _0x389028['run'](_0x445d4c,_0x2540dd);}return _0x445d4c;},async 'runObservers'(_0x1646ef,_0x4abd43,_0x177aa6){for(const _0xe2aa0 of getOrderedObserverExtensions(_0x293c04,_0x1646ef)){await _0xe2aa0['run'](_0x4abd43,_0x177aa6);}}};}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(_0x2f7d3f={}){const _0x507dc8={_0x4dae59:0xfb,_0x36e552:0x128,_0x430417:0x119},_0x201c3b={_0x39f604:0x2eb,_0x552ad6:0x355,_0x198d64:0x30a,_0x3eb41e:0x2dc,_0x33becc:0x28b,_0x4c8ae2:0x281,_0x21bb2d:0x2cd,_0x20d201:0x28f,_0x2f46a6:0x2e1,_0x456d40:0x2ce,_0x287d9c:0x2e7,_0x53887d:0x2e4,_0x16cfc6:0x2e8,_0x55789b:0x2db,_0x2af122:0x2cf,_0x539d27:0x2df,_0x604d3c:0x36f,_0x46338e:0x326,_0x170bbc:0x275,_0x198777:0x29e,_0x54e1a2:0x2b1,_0x124c76:0x2e6,_0x45dc70:0x354,_0x10d89d:0x396,_0x3ddbcb:0x312,_0xc521ef:0x353,_0x5e7f72:0x312,_0x19edc1:0x362,_0x49cb37:0x2c7,_0x50cf75:0x2f7,_0x1e402c:0x341,_0x17ddef:0x374,_0x49b83a:0x32f,_0x325c14:0x36b,_0x2ea910:0x336,_0x35c8a3:0x312,_0x34f804:0x25f,_0x4fa6e2:0x293,_0x1f894:0x2b4,_0x34bc37:0x310,_0x55f12f:0x308,_0x5ed6a7:0x361,_0x5e7b70:0x2a1,_0x163f70:0x28a,_0x519007:0x266};let _0x50d000=createEmptySnapshot();const _0x235015=new Set();let _0x40f8aa;const _0x1676df=()=>{const _0x5f5532={..._0x50d000};for(const _0x4382de of _0x235015)_0x4382de(_0x5f5532);};return{'getSnapshot'(){return{..._0x50d000};},'recordEvent'(_0x2886c7){if(_0x2886c7[_0x3d8898(0x322,_0x201c3b._0x39f604,0x2df,_0x201c3b._0x552ad6)]===_0x3d8898(_0x201c3b._0x198d64,_0x201c3b._0x3eb41e,0x2b9,0x2f8)){_0x40f8aa=Date['now']();const _0x2e751e=_0x2f7d3f[_0x26b08a(0x281,_0x201c3b._0x33becc,_0x201c3b._0x4c8ae2,0x283)]?.(_0x2886c7['request']);_0x2e751e!==void 0x0&&(_0x50d000={..._0x50d000,'contextWindowLimit':_0x2e751e},_0x1676df());return;}function _0x26b08a(_0x2b4205,_0x462689,_0x547ee9,_0x3857c7){return _0x53d6(_0x2b4205-0xee,_0x462689);}function _0x3d8898(_0x431bce,_0x4722d1,_0x26b835,_0x3ee7a8){return _0x53d6(_0x431bce-0x176,_0x4722d1);}if(_0x2886c7[_0x26b08a(0x29a,_0x201c3b._0x21bb2d,0x2b6,0x2b3)]===_0x26b08a(_0x201c3b._0x20d201,_0x201c3b._0x2f46a6,_0x201c3b._0x456d40,0x277)){const _0x5394e=_0x2886c7['response'][_0x26b08a(_0x201c3b._0x287d9c,_0x201c3b._0x53887d,0x2b9,0x308)][_0x26b08a(_0x201c3b._0x16cfc6,0x311,_0x201c3b._0x55789b,_0x201c3b._0x2af122)],_0x1998a8=_0x2886c7[_0x26b08a(0x2ad,0x2cb,0x2ee,_0x201c3b._0x539d27)][_0x3d8898(_0x201c3b._0x604d3c,_0x201c3b._0x46338e,0x3bf,0x3a1)]['outputTokens'],_0x79861d=_0x2886c7[_0x26b08a(0x2ad,0x2cc,_0x201c3b._0x170bbc,_0x201c3b._0x198777)][_0x26b08a(_0x201c3b._0x287d9c,_0x201c3b._0x54e1a2,0x2fd,_0x201c3b._0x124c76)]['reasoningTokens']??0x0,_0x41aeb4=_0x5394e+_0x1998a8,_0x299d4f=_0x40f8aa===void 0x0?0x0:Date[_0x3d8898(0x39d,0x3d7,_0x201c3b._0x45dc70,_0x201c3b._0x10d89d)]()-_0x40f8aa;_0x40f8aa=void 0x0,_0x50d000={..._0x50d000,'totalTokens':_0x50d000[_0x3d8898(_0x201c3b._0x3ddbcb,_0x201c3b._0xc521ef,0x33d,0x2f9)]+_0x41aeb4,'totalInputTokens':_0x50d000['totalInputTokens']+_0x5394e,'totalOutputTokens':_0x50d000[_0x26b08a(_0x201c3b._0x5e7f72,0x358,_0x201c3b._0x19edc1,_0x201c3b._0x49cb37)]+_0x1998a8,'totalReasoningTokens':_0x50d000['totalReasoningTokens']+_0x79861d,'modelCallCount':_0x50d000['modelCallCount']+0x1,'totalModelTimeMs':_0x50d000['totalModelTimeMs']+_0x299d4f,'currentTokens':_0x41aeb4,'currentInputTokens':_0x5394e,'currentOutputTokens':_0x1998a8,'currentReasoningTokens':_0x79861d,'currentModelTimeMs':_0x299d4f,..._0x50d000[_0x26b08a(0x2b9,0x304,_0x201c3b._0x50cf75,0x26e)]&&_0x41aeb4>0x0?{'contextWindowUsage':_0x41aeb4/_0x50d000[_0x3d8898(_0x201c3b._0x1e402c,_0x201c3b._0x17ddef,0x33f,_0x201c3b._0x49b83a)]}:{}},_0x1676df();return;}if(_0x2886c7['type']===_0x3d8898(_0x201c3b._0x49b83a,_0x201c3b._0x325c14,_0x201c3b._0x2ea910,_0x201c3b._0x35c8a3)){_0x50d000={..._0x50d000,'toolCallCount':_0x50d000[_0x26b08a(0x277,_0x201c3b._0x34f804,_0x201c3b._0x4fa6e2,_0x201c3b._0x1f894)]+0x1},_0x1676df();return;}_0x2886c7[_0x26b08a(0x29a,0x296,0x2e9,0x289)]===_0x26b08a(0x311,_0x201c3b._0x34bc37,_0x201c3b._0x55f12f,_0x201c3b._0x5ed6a7)&&(_0x50d000={..._0x50d000,'requestCount':_0x50d000[_0x26b08a(_0x201c3b._0x5e7b70,_0x201c3b._0x163f70,_0x201c3b._0x519007,0x275)]+0x1},_0x1676df());},'reset'(){_0x50d000=createEmptySnapshot(),_0x40f8aa=void 0x0,_0x1676df();},'subscribe'(_0x487c06){const _0x243d5a={_0x4f9166:0x198,_0x10cbd4:0x1ce};_0x235015[_0x427f8a(-0x15e,-_0x507dc8._0x4dae59,-_0x507dc8._0x36e552,-_0x507dc8._0x430417)](_0x487c06);function _0x427f8a(_0x56374c,_0x5b3e33,_0x22bd9c,_0x1f541d){return _0x53d6(_0x1f541d- -0x2d9,_0x5b3e33);}return()=>{const _0x447a9f={_0x71544d:0xec,_0x3c6276:0xb6};function _0x3a4570(_0x22b567,_0xc38460,_0x43fea3,_0x59d264){return _0x427f8a(_0x22b567-0xab,_0x59d264,_0x43fea3-_0x447a9f._0x71544d,_0x22b567- -_0x447a9f._0x3c6276);}_0x235015[_0x3a4570(-_0x243d5a._0x4f9166,-0x193,-0x19a,-_0x243d5a._0x10cbd4)](_0x487c06);};}};}function makeExtensionContext(_0x25052f){return{'state':_0x25052f};}function _0x53d6(_0x41f676,_0x55e587){_0x41f676=_0x41f676-0x186;const _0x2fd88e=_0x2fd8();let _0x53d60c=_0x2fd88e[_0x41f676];if(_0x53d6['fiRgPt']===undefined){var _0x57e178=function(_0x197f1a){const _0x486e88='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x1e44a6='',_0x439f51='';for(let _0x420752=0x0,_0x2b6cae,_0xbc0f50,_0x2f676b=0x0;_0xbc0f50=_0x197f1a['charAt'](_0x2f676b++);~_0xbc0f50&&(_0x2b6cae=_0x420752%0x4?_0x2b6cae*0x40+_0xbc0f50:_0xbc0f50,_0x420752++%0x4)?_0x1e44a6+=String['fromCharCode'](0xff&_0x2b6cae>>(-0x2*_0x420752&0x6)):0x0){_0xbc0f50=_0x486e88['indexOf'](_0xbc0f50);}for(let _0x2752b3=0x0,_0x36eb63=_0x1e44a6['length'];_0x2752b3<_0x36eb63;_0x2752b3++){_0x439f51+='%'+('00'+_0x1e44a6['charCodeAt'](_0x2752b3)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x439f51);};_0x53d6['yAYXkX']=_0x57e178,_0x53d6['swMEaS']={},_0x53d6['fiRgPt']=!![];}const _0x5da483=_0x2fd88e[0x0],_0x2b1943=_0x41f676+_0x5da483,_0x111194=_0x53d6['swMEaS'][_0x2b1943];return!_0x111194?(_0x53d60c=_0x53d6['yAYXkX'](_0x53d60c),_0x53d6['swMEaS'][_0x2b1943]=_0x53d60c):_0x53d60c=_0x111194,_0x53d60c;}async function runStage(_0x30897d,_0x3516c6,_0x5db53d,_0x1f5a1b){const _0x24abdb={_0x756349:0x2e9,_0x864d76:0x2c5,_0x4bf577:0x327,_0xd96203:0x35c},_0x3e44b9={_0x168a77:0x185,_0x3dea19:0x251},_0x3cf8af={_0x1600e0:0x25},_0x36bc31=await _0x30897d[_0x3da27e(_0x24abdb._0x756349,_0x24abdb._0x864d76,0x315,0x2ef)](_0x3516c6,_0x5db53d,_0x1f5a1b);function _0x3da27e(_0x459262,_0x3a53c1,_0x563ff7,_0x1e9cbb){return _0x10e4b8(_0x459262-0x4a,_0x563ff7,_0x1e9cbb-_0x3cf8af._0x1600e0,_0x1e9cbb-0x113);}await _0x30897d[_0x3da27e(0x3a3,0x37b,_0x24abdb._0x4bf577,_0x24abdb._0xd96203)](_0x3516c6,_0x36bc31,_0x1f5a1b);function _0x15a1da(_0x469b33,_0x1a4680,_0x3c29d3,_0x451c4f){return _0x10e4b8(_0x469b33-_0x3e44b9._0x168a77,_0x469b33,_0x451c4f- -_0x3e44b9._0x3dea19,_0x451c4f-0x144);}return _0x36bc31;}async function emitEvent2(_0x1c00a2,_0x1e755b,_0x1fcfeb){await _0x1c00a2?.(_0x1e755b,_0x1fcfeb);}function replaceToolUseBlocks(_0x29565d,_0x3e71b4){const _0x14d11c={_0x253ea0:0x2d0,_0x4a6c1f:0x29d,_0x159b01:0x27d},_0x164e6b={_0x19378a:0xfd},_0x1ee836={_0x3597d2:0x2a,_0x51ca86:0x23},_0x5df9e5={_0x3e53de:0x6,_0x3496a2:0x10a},_0x1b5f69={_0x354a87:0x1c0,_0x592075:0x1cd},_0x4e72ca={_0x577f10:0x256,_0x4636c6:0x5d,_0x1b2396:0xcd};let _0x18edd0=0x0;function _0x20ed9e(_0x275efb,_0x180fbb,_0x5e1c35,_0x5be2f1){return _0x1a8375(_0x180fbb-_0x4e72ca._0x577f10,_0x180fbb-_0x4e72ca._0x4636c6,_0x5e1c35-_0x4e72ca._0x1b2396,_0x5be2f1);}function _0x21625a(_0x4367fd,_0x4628a4,_0x53b0a8,_0x518b9c){return _0x10e4b8(_0x4367fd-_0x1b5f69._0x354a87,_0x4628a4,_0x518b9c- -_0x1b5f69._0x592075,_0x518b9c-0x1a3);}return{..._0x29565d,'content':_0x29565d[_0x21625a(0x17a,0x177,0x19a,0x181)][_0x20ed9e(_0x14d11c._0x253ea0,_0x14d11c._0x4a6c1f,0x2d7,_0x14d11c._0x159b01)](_0x1d2a4b=>{function _0x2c0578(_0x4f9980,_0x211e30,_0x42404e,_0x24bd5f){return _0x20ed9e(_0x4f9980-_0x5df9e5._0x3e53de,_0x42404e-_0x5df9e5._0x3496a2,_0x42404e-0x101,_0x211e30);}if(_0x1d2a4b[_0x5777af(0xf5,0xf2,0xe2,0x122)]!==_0x5777af(0xe1,0x10e,_0x164e6b._0x19378a,0xa5))return _0x1d2a4b;function _0x5777af(_0x22db10,_0x54270d,_0x5a7bb7,_0x19b8e5){return _0x21625a(_0x22db10-0x10,_0x5a7bb7,_0x5a7bb7-_0x1ee836._0x3597d2,_0x22db10- -_0x1ee836._0x51ca86);}const _0x5de514=_0x3e71b4[_0x18edd0];return _0x18edd0+=0x1,structuredClone(_0x5de514);})};}function createAssistantMessageId(_0x3b3c6a,_0x476445){const _0x44001d={_0x2b896c:0xb9,_0x4e9139:0xd5},_0x23ee01={_0x206c87:0xef};function _0x2bb875(_0x28f08d,_0x14b2a1,_0x255d23,_0x1145e3){return _0x1a8375(_0x14b2a1- -_0x23ee01._0x206c87,_0x14b2a1-0x4e,_0x255d23-0xa6,_0x255d23);}return _0x3b3c6a+_0x2bb875(-_0x44001d._0x2b896c,-_0x44001d._0x4e9139,-0xdf,-0xdf)+_0x476445;}function createReasoningMessageId(_0x5ace7d){const _0x5ad67a={_0x368d5f:0xba,_0x299ef4:0x7a};function _0xb7abef(_0x20ab80,_0x2148bf,_0x5b4ea4,_0x5dedef){return _0x10e4b8(_0x20ab80-0x17c,_0x5b4ea4,_0x20ab80- -0x3de,_0x5dedef-0x134);}return _0x5ace7d+_0xb7abef(-_0x5ad67a._0x368d5f,-0xbb,-0x80,-_0x5ad67a._0x299ef4);}function withMessageId(_0x11d399,_0x5c3a7d){if(_0x11d399['id']===_0x5c3a7d)return _0x11d399;return{..._0x11d399,'id':_0x5c3a7d};}function createAssistantChunkEvent(_0x133aaf,_0x17bdcf){const _0xec3afa={_0x48fce0:0x3b3,_0x55fe14:0x3cf,_0x52ae32:0x3b4,_0x5141a3:0x64,_0x5c83f0:0x89,_0x168a94:0x3d7,_0x2ced9e:0x5,_0x4b64c3:0x3eb,_0x3f672c:0x42a,_0x25920f:0x3c4},_0x5a9dce={_0x28606f:0xce};if(_0x133aaf[_0x4347cd(0x3a7,_0xec3afa._0x48fce0,0x3c1,0x3ab)]!==_0x4347cd(0x3ae,_0xec3afa._0x55fe14,0x410,_0xec3afa._0x52ae32))return void 0x0;function _0x423f0a(_0x404049,_0x50a7a5,_0x310a20,_0x57c3b5){return _0x10e4b8(_0x404049-0x86,_0x57c3b5,_0x404049- -0x2b9,_0x57c3b5-0x15c);}function _0x4347cd(_0x3c39af,_0x1a5c9e,_0x21ea6e,_0x59f281){return _0x10e4b8(_0x3c39af-0x37,_0x21ea6e,_0x1a5c9e-_0x5a9dce._0x28606f,_0x59f281-0x12a);}if(_0x133aaf[_0x423f0a(_0xec3afa._0x5141a3,0xa9,0x70,_0xec3afa._0x5c83f0)]===void 0x0)return void 0x0;return{'type':_0x4347cd(0x39c,0x39d,_0xec3afa._0x168a94,0x3b5),'index':_0x133aaf[_0x423f0a(0x42,0x54,0x11,_0xec3afa._0x2ced9e)]??0x0,'messageId':_0x17bdcf,'chunk':{'type':'content_delta','index':_0x133aaf['index']??0x0,'text':_0x133aaf[_0x4347cd(0x3fd,_0xec3afa._0x4b64c3,_0xec3afa._0x3f672c,_0xec3afa._0x25920f)]}};}function createToolUseChunkEvent(_0xb56219,_0x78c24d){const _0x546c48={_0x5c8174:0x2b8,_0x5d1aa4:0x2a2,_0x3faa16:0x218,_0x517f03:0x2dc,_0x46c38a:0x319,_0x15334d:0x205,_0x490f97:0x1ff,_0x4e61cc:0x1e0,_0x4b50f0:0x1d5,_0xc2667:0x1d3,_0x443d38:0x307,_0x197f74:0x2fc},_0xc2c72e={_0x43dc90:0x1a8,_0x2d2df3:0x11},_0x2fbdd6={_0x1c830e:0xfc};if(_0xb56219[_0x360643(_0x546c48._0x5c8174,0x2d4,_0x546c48._0x5d1aa4,0x2c9)]!==_0x12fa7a(0x23a,0x1f1,0x1f6,0x20c))return void 0x0;function _0x12fa7a(_0x8c8dcf,_0x21c221,_0x49b2fe,_0xcf8dbb){return _0x10e4b8(_0x8c8dcf-0x14f,_0x49b2fe,_0x21c221- -_0x2fbdd6._0x1c830e,_0xcf8dbb-0x87);}function _0x360643(_0x396229,_0x2d6a81,_0x45e39b,_0x2a4824){return _0x10e4b8(_0x396229-_0xc2c72e._0x43dc90,_0x396229,_0x2d6a81- -_0xc2c72e._0x2d2df3,_0x2a4824-0xdf);}return{'type':'tool_use_chunk','index':_0xb56219[_0x12fa7a(0x223,0x1ff,0x1fb,_0x546c48._0x3faa16)]??0x0,'messageId':_0x78c24d,'chunk':{'type':_0x360643(0x294,_0x546c48._0x517f03,_0x546c48._0x46c38a,0x31c),'id':_0xb56219['id']??'','index':_0xb56219[_0x12fa7a(_0x546c48._0x15334d,_0x546c48._0x490f97,_0x546c48._0x4e61cc,0x235)]??0x0,..._0xb56219['name']!==void 0x0?{'name':_0xb56219[_0x12fa7a(0x213,0x222,_0x546c48._0x4b50f0,0x265)]}:{},..._0xb56219[_0x12fa7a(_0x546c48._0xc2667,0x21c,0x213,0x1e2)]!==void 0x0?{'inputDelta':_0xb56219[_0x360643(0x324,_0x546c48._0x443d38,_0x546c48._0x197f74,0x2d1)]}:{}}};}function _0x1a8375(_0x39421d,_0x530b98,_0x38b2cf,_0x24e52d){const _0x19675c={_0x25bd40:0x1d5};return _0x53d6(_0x39421d- -_0x19675c._0x25bd40,_0x24e52d);}function createReasoningChunkEvent(_0x572433,_0x31e74f){const _0x51d107={_0x2e4aaf:0x135,_0x24e9a0:0x12b,_0x183474:0x16b,_0x3e3b20:0x218,_0x9227ae:0x215,_0x271f45:0x2cc,_0x2d1c2a:0x2b6,_0x5e4e35:0x27b,_0x4cd440:0x19d,_0x2a8b9a:0x171,_0x17c3dc:0x183,_0x269351:0x269,_0x2801bc:0x14f,_0x545b2d:0x2b2,_0x4c8512:0x2e5,_0x26b7c1:0x137,_0x164727:0x16e,_0x1a7d15:0x294,_0x50d100:0x2ca,_0x1099ef:0x26d,_0x10eea4:0x262,_0x40676d:0x244,_0x54f29f:0x12c,_0x4d2d12:0x10e,_0x38fd3c:0x130,_0x4b872c:0xfa,_0x385eef:0xea,_0x2e89b1:0x121,_0x1cc46a:0x292,_0x3fdc95:0x27e,_0x4719a8:0xc2},_0x17762e={_0x26a1bc:0xbf,_0x6e9c42:0xc3},_0x1e00e3={_0x59373b:0x142,_0x55aa8d:0x137};function _0x49c902(_0x5c0030,_0x444e39,_0x24945a,_0x464b80){return _0x1a8375(_0x464b80- -_0x1e00e3._0x59373b,_0x444e39-_0x1e00e3._0x55aa8d,_0x24945a-0x17a,_0x444e39);}function _0x2215ff(_0x23495a,_0x1f8fee,_0x3e3d37,_0x54b25c){return _0x10e4b8(_0x23495a-0x139,_0x54b25c,_0x1f8fee- -_0x17762e._0x26a1bc,_0x54b25c-_0x17762e._0x6e9c42);}switch(_0x572433[_0x49c902(-_0x51d107._0x2e4aaf,-0x137,-_0x51d107._0x24e9a0,-_0x51d107._0x183474)]){case _0x2215ff(_0x51d107._0x3e3b20,0x220,_0x51d107._0x9227ae,0x20d):return{'type':_0x2215ff(_0x51d107._0x271f45,0x283,_0x51d107._0x2d1c2a,_0x51d107._0x5e4e35),'index':_0x572433['index'],'messageId':_0x31e74f,'chunk':{'type':_0x49c902(-0x195,-0x178,-_0x51d107._0x4cd440,-_0x51d107._0x2a8b9a),'index':_0x572433[_0x49c902(-0x12d,-_0x51d107._0x17c3dc,-0x182,-0x155)]??0x0,'thinking':_0x572433[_0x2215ff(0x267,0x22b,0x246,_0x51d107._0x269351)]??''},'text':_0x572433[_0x49c902(-0x1a3,-0x13b,-0x1b4,-0x166)]??''};case'openai_reasoning_delta':return{'type':_0x2215ff(0x253,0x283,0x271,0x29f),'index':_0x572433[_0x49c902(-0xf4,-_0x51d107._0x2801bc,-0x114,-0x13e)],'messageId':_0x31e74f,'chunk':{'type':'openai_reasoning_delta','contentIndex':_0x572433['contentIndex']??0x0,'delta':_0x572433[_0x2215ff(_0x51d107._0x545b2d,0x294,_0x51d107._0x4c8512,0x2d4)]??'','itemId':_0x572433['itemId']??'','outputIndex':_0x572433[_0x49c902(-0x12f,-_0x51d107._0x26b7c1,-0x126,-_0x51d107._0x164727)]??0x0},'text':_0x572433[_0x2215ff(0x2a7,_0x51d107._0x1a7d15,_0x51d107._0x50d100,0x2c6)]??''};case _0x2215ff(_0x51d107._0x1099ef,_0x51d107._0x10eea4,0x275,_0x51d107._0x40676d):return{'type':_0x49c902(-0xf1,-_0x51d107._0x54f29f,-0x12e,-_0x51d107._0x4d2d12),'index':_0x572433[_0x49c902(-0x11d,-0x10f,-_0x51d107._0x38fd3c,-_0x51d107._0x4b872c)],'messageId':_0x31e74f,'chunk':{'type':_0x49c902(-_0x51d107._0x385eef,-_0x51d107._0x2e89b1,-0x164,-0x12f),'delta':_0x572433[_0x2215ff(_0x51d107._0x1cc46a,_0x51d107._0x1a7d15,0x29a,_0x51d107._0x3fdc95)]??'','itemId':_0x572433['itemId']??'','outputIndex':_0x572433['outputIndex']??0x0,'summaryIndex':_0x572433[_0x49c902(-_0x51d107._0x4719a8,-0xca,-0xc7,-0xfa)]??0x0},'text':_0x572433['delta']??''};default:return void 0x0;}}function isAbortedToolResult(_0x927dbf){const _0x76b253={_0x3606c2:0x3c,_0x3cc4aa:0x18,_0x25ab64:0x6e,_0xb3faf4:0x4b,_0x6cfc9d:0x6e,_0x1af5e5:0x47,_0x44718a:0x13},_0x3839ca={_0x33fc85:0x2fe},_0x2e31e8={_0x2e74db:0x3de,_0x4ba977:0x153};function _0x28b5c6(_0x57fda7,_0x4f4735,_0x32be0b,_0x4bcfe9){return _0x10e4b8(_0x57fda7-0xae,_0x57fda7,_0x32be0b- -_0x2e31e8._0x2e74db,_0x4bcfe9-_0x2e31e8._0x4ba977);}function _0x262258(_0x18078c,_0x11f66f,_0x4b9ceb,_0x316e4b){return _0x10e4b8(_0x18078c-0x16e,_0x4b9ceb,_0x316e4b- -_0x3839ca._0x33fc85,_0x316e4b-0x91);}return _0x927dbf[_0x262258(_0x76b253._0x3606c2,_0x76b253._0x3cc4aa,_0x76b253._0x25ab64,_0x76b253._0xb3faf4)]===_0x262258(0x69,0x6e,0x2b,0x3d)&&_0x927dbf[_0x262258(_0x76b253._0x6cfc9d,0x11,0x5d,_0x76b253._0x1af5e5)][_0x262258(0x4f,0x56,0x18,_0x76b253._0x44718a)]===!![];}async function executeModelRequest(_0x4f50ab,_0x39d055,_0x8d9c0d,_0x51add7,_0x3ddf73){const _0x27b96b={_0x134fd1:0x23e,_0x132635:0x21c,_0x38a1d1:0x207,_0x8f02cf:0x154,_0x164957:0x1c4,_0x425725:0x1ef,_0x98b5f1:0x18b,_0xe35c22:0x1a5,_0x17778a:0x1d5,_0x27f6fb:0x202,_0x2f8d09:0x1a7,_0x4d44f9:0x1a5,_0x11633e:0x1ba,_0x146b8e:0x179,_0x344397:0x120,_0x3f90ee:0x12a,_0x17189c:0x1ae,_0x232137:0x17a,_0x186d13:0x1ff,_0x47243c:0x1f5,_0x3c895d:0x21d,_0x46d571:0x1aa,_0x3bdfb8:0x1d1,_0x3665c4:0x1dd,_0x3d2f76:0x164,_0x10f081:0x187,_0x282003:0x198,_0x5ab7de:0x1a4,_0x258f4a:0x23d,_0x4a757d:0x1c7,_0x228b6a:0x20b,_0x1089cd:0x14d,_0x4035bd:0x172,_0xb46763:0x134,_0x5f2806:0x1d0,_0x17f29c:0x1de,_0x1a6e6b:0x1f2,_0x30413e:0x17d,_0x10c55f:0x1e2,_0x5aac99:0x18d,_0x476884:0x176,_0x1bee41:0x1ce,_0x38f2b5:0x171,_0x90d675:0x190,_0x531c2d:0x172},_0x5dd446={_0x3086f8:0xa3},_0x494b46={_0x4088ec:0x171,_0x561c71:0xa1},_0x508c42={_0x10be3f:0x32b,_0x561ac4:0x352,_0x28913f:0x22};throwIfAborted(_0x39d055['signal']);const _0x562416=async _0x5484b6=>{if(_0x5484b6[_0x325d22(0x30d,_0x508c42._0x10be3f,_0x508c42._0x561ac4,0x2fc)]!==_0x3a5c84(-0x3f,-0x1,-_0x508c42._0x28913f,-0x46))return;function _0x3a5c84(_0x1ded28,_0x229a1d,_0x5ab00a,_0x10187e){return _0x53d6(_0x10187e- -0x207,_0x229a1d);}function _0x325d22(_0x18258c,_0x1f7164,_0x56d792,_0x398406){return _0x53d6(_0x1f7164-0x17f,_0x18258c);}await emitEvent2(_0x8d9c0d['onEvent'],_0x5484b6,_0x51add7);};if(!_0x39d055[_0x44753e(-_0x27b96b._0x134fd1,-_0x27b96b._0x132635,-0x255,-_0x27b96b._0x38a1d1)]||!_0x8d9c0d[_0x48cb19(-0x1d4,-0x1e6,-_0x27b96b._0x8f02cf,-0x1a4)][_0x48cb19(-0xfd,-0x111,-0x103,-0x11e)])return await _0x8d9c0d[_0x44753e(-0x22a,-0x1e9,-0x215,-0x1ff)][_0x44753e(-_0x27b96b._0x164957,-_0x27b96b._0x425725,-_0x27b96b._0x98b5f1,-_0x27b96b._0xe35c22)](_0x4f50ab,{'onProviderRetry':_0x562416,'signal':_0x39d055['signal']});function _0x48cb19(_0x173f2e,_0x1bb719,_0x471bc5,_0x787679){return _0x1a8375(_0x787679- -_0x494b46._0x4088ec,_0x1bb719-0x148,_0x471bc5-_0x494b46._0x561c71,_0x1bb719);}let _0x3ca98a;for await(const _0x49b509 of _0x8d9c0d[_0x44753e(-_0x27b96b._0x17778a,-0x224,-_0x27b96b._0x27f6fb,-0x1ff)][_0x44753e(-_0x27b96b._0x2f8d09,-_0x27b96b._0x4d44f9,-_0x27b96b._0x11633e,-_0x27b96b._0x146b8e)](_0x4f50ab,{'onProviderRetry':_0x562416,'signal':_0x39d055[_0x48cb19(-_0x27b96b._0x344397,-_0x27b96b._0x3f90ee,-_0x27b96b._0x17189c,-0x165)]})){throwIfAborted(_0x39d055[_0x48cb19(-0x1aa,-_0x27b96b._0x232137,-0x16a,-0x165)]);if(_0x49b509[_0x44753e(-0x23a,-0x1ec,-_0x27b96b._0x186d13,-_0x27b96b._0x47243c)]===_0x44753e(-_0x27b96b._0x3c895d,-_0x27b96b._0x46d571,-_0x27b96b._0x3bdfb8,-_0x27b96b._0x3665c4)){_0x3ca98a=_0x49b509[_0x48cb19(-_0x27b96b._0x3d2f76,-0x144,-0x179,-_0x27b96b._0x10f081)];continue;}if(_0x49b509[_0x48cb19(-_0x27b96b._0x282003,-0x180,-0x16f,-0x19a)]===_0x44753e(-0x1b8,-0x201,-_0x27b96b._0x5ab7de,-0x1e0)){await emitEvent2(_0x8d9c0d[_0x44753e(-0x238,-0x1d1,-_0x27b96b._0x258f4a,-0x20a)],_0x49b509,_0x51add7);continue;}const _0x10f16f=createReasoningChunkEvent(_0x49b509,_0x3ddf73['reasoningMessageId']);if(_0x10f16f&&_0x10f16f[_0x48cb19(-_0x27b96b._0x4a757d,-0x1a6,-0x1e7,-0x19a)]==='reasoning_chunk'&&_0x10f16f[_0x44753e(-_0x27b96b._0x228b6a,-0x19e,-0x1d9,-0x1bd)][_0x48cb19(-_0x27b96b._0x1089cd,-_0x27b96b._0x4035bd,-0xf8,-_0x27b96b._0xb46763)]>0x0){await emitEvent2(_0x8d9c0d['onEvent'],_0x10f16f,_0x51add7);continue;}const _0x4c7d8e=createAssistantChunkEvent(_0x49b509,_0x3ddf73[_0x44753e(-_0x27b96b._0x5f2806,-_0x27b96b._0x17f29c,-0x1f2,-_0x27b96b._0x3bdfb8)]);if(_0x4c7d8e){await emitEvent2(_0x8d9c0d[_0x48cb19(-_0x27b96b._0x1a6e6b,-_0x27b96b._0x30413e,-_0x27b96b._0x10c55f,-0x1af)],_0x4c7d8e,_0x51add7);continue;}const _0x235f06=createToolUseChunkEvent(_0x49b509,_0x3ddf73[_0x48cb19(-_0x27b96b._0x5aac99,-0x161,-0x142,-_0x27b96b._0x476884)]);_0x235f06&&await emitEvent2(_0x8d9c0d[_0x48cb19(-0x171,-_0x27b96b._0x1bee41,-_0x27b96b._0x38f2b5,-0x1af)],_0x235f06,_0x51add7);}function _0x44753e(_0x28f86f,_0x2449b1,_0x627e94,_0x58cdf4){return _0x10e4b8(_0x28f86f-_0x5dd446._0x3086f8,_0x28f86f,_0x58cdf4- -0x4da,_0x58cdf4-0x91);}if(!_0x3ca98a)throw new Error(_0x48cb19(-0x164,-_0x27b96b._0x90d675,-0x154,-_0x27b96b._0x531c2d));return _0x3ca98a;}function makeTurnGuards(_0x441da9,_0x238a30,_0x4c1c4d,_0x370121,_0x3726a7){return{async 'stage'(_0x1825b0,_0x39aa22){return throwIfAborted(_0x441da9),await runStage(_0x238a30,_0x1825b0,_0x39aa22,_0x370121);},async 'emit'(_0x3160e1){throwIfAborted(_0x441da9),await emitEvent2(_0x4c1c4d,_0x3160e1,_0x3726a7);},async 'stageUnchecked'(_0x4a9385,_0x15083f){return await runStage(_0x238a30,_0x4a9385,_0x15083f,_0x370121);},async 'emitUnchecked'(_0x21bd3a){await emitEvent2(_0x4c1c4d,_0x21bd3a,_0x3726a7);}};}async function runTurn(_0x2a6d51,_0x36a70e){const _0xf3b28={_0x28ec6c:0x1e2,_0x135acf:0x1aa,_0x376a39:0x1ad,_0x124092:0x198,_0x31f1db:0x1a5,_0x39daa3:0x193,_0x338b99:0x1a,_0x47fd34:0x84,_0x170c0b:0x53,_0x4c7713:0x60,_0x3612ae:0x14,_0x5346e1:0x9d,_0x52bfcb:0x191,_0x588892:0x157,_0x169019:0x149,_0x41a36c:0x183,_0x24f0b7:0x1d4,_0x1ae209:0x124,_0x38b9d3:0x16a,_0x34befa:0x1b9,_0x554865:0x4f,_0x43a159:0x24,_0x669b4c:0x1d1,_0xaad489:0x1cb,_0x23ee72:0x137,_0xcb8817:0x15a,_0x26d165:0x7a,_0x214d05:0x193,_0x12840a:0x1e3,_0x254007:0x45,_0x2441c8:0x38,_0x398f96:0x19f,_0x3d495f:0x1e2,_0x338505:0x1b4,_0x1d5abc:0x1c1,_0x1b287d:0x1ab,_0x10550c:0x1a4,_0x562f05:0xc,_0x151005:0x26,_0x4608be:0x3b,_0x20e02b:0x72,_0x39ec46:0x1a3,_0x3b7c07:0x1a1,_0x67b254:0x21c,_0x27f9fe:0x206,_0x551409:0x1f7,_0x159e3d:0x21a,_0x18c8ba:0x66,_0x12b541:0x22,_0x467c1b:0x1d,_0x512e74:0x88,_0x5a0b4d:0x9e,_0x560b5f:0xa6,_0x13c625:0x80,_0x5c495d:0x98,_0x4bfdf3:0x6c,_0x1c68e8:0x1c6,_0x4a5f83:0x1a7,_0x446507:0x204,_0xa82423:0x1f6,_0x220a1d:0x4,_0x165f15:0x41,_0x17ff7c:0x172,_0x36005a:0x1c5,_0x9cecb2:0x1f4,_0x51240b:0x1bc,_0x143edb:0x1cf,_0x4b014c:0x200,_0x3c3798:0x1e7,_0x31e6cb:0x1e4,_0xe5f6e8:0x1a8,_0x4554ab:0x187,_0x33aee5:0x62,_0x186aa:0x94,_0x5a8703:0xc3,_0x554122:0x180,_0x5d8173:0x1ee,_0x472eb4:0x5d,_0xf1841e:0x86,_0x1743f7:0x57,_0x50f4c7:0x4c,_0xa82336:0x62,_0x314187:0x54,_0xc95e4d:0x1bd,_0x22e523:0x1d6,_0x394bb0:0x1b3,_0x1ac201:0x17c},_0x5de620={_0x39ff4c:0x51},_0x44f097={_0x300024:0x1b6,_0x1c851f:0x193,_0x2f4d67:0x16a},_0x173627=_0x2a6d51['signal']??new AbortController()[_0x4856a5(-0x1c3,-_0xf3b28._0x28ec6c,-_0xf3b28._0x135acf,-0x1fc)],_0x59e8aa={'sessionId':_0x2a6d51[_0x4856a5(-_0xf3b28._0x376a39,-_0xf3b28._0x124092,-0x195,-0x1c7)],'turnId':_0x2a6d51[_0x4856a5(-0x146,-_0xf3b28._0x31f1db,-_0xf3b28._0x39daa3,-0x1c7)],'system':normalizeSystem(_0x2a6d51[_0xd03b9e(_0xf3b28._0x338b99,_0xf3b28._0x47fd34,_0xf3b28._0x338b99,_0xf3b28._0x170c0b)]),'messages':(_0x2a6d51[_0xd03b9e(0x14,_0xf3b28._0x4c7713,_0xf3b28._0x3612ae,0x41)]??[])[_0xd03b9e(0x6a,0x8a,_0xf3b28._0x5346e1,0x98)](normalizeMessage),'lastResponse':void 0x0,'toolResults':[],'finalMessage':void 0x0},_0x354019=makeExtensionContext(_0x59e8aa),_0x5e7613={'sessionId':_0x59e8aa[_0x4856a5(-_0xf3b28._0x52bfcb,-0x1ab,-0x195,-_0xf3b28._0x588892)],'turnId':_0x59e8aa[_0x4856a5(-_0xf3b28._0x169019,-_0xf3b28._0x41a36c,-0x193,-_0xf3b28._0x24f0b7)],'state':_0x59e8aa,'signal':_0x173627,..._0x36a70e['askUser']?{'askUser':_0x36a70e[_0x4856a5(-_0xf3b28._0x1ae209,-0x1b6,-_0xf3b28._0x38b9d3,-_0xf3b28._0x34befa)]}:{}},{stage:_0x52252f,emit:_0x23ed3b,stageUnchecked:_0x4a95f1,emitUnchecked:_0x54504f}=makeTurnGuards(_0x173627,_0x36a70e['registry'],_0x36a70e['onEvent'],_0x354019,_0x5e7613);function _0x4856a5(_0x3226aa,_0x9cdb6a,_0x4dc926,_0x3e841c){return _0x1a8375(_0x4dc926- -_0x44f097._0x300024,_0x9cdb6a-_0x44f097._0x1c851f,_0x4dc926-_0x44f097._0x2f4d67,_0x3e841c);}function _0xd03b9e(_0x1b126f,_0x4a5de8,_0x1efdf7,_0x29b156){return _0x1a8375(_0x29b156-_0x5de620._0x39ff4c,_0x4a5de8-0x1d6,_0x1efdf7-0x8d,_0x1b126f);}let _0x19f1af=0x0;try{const _0xf7af81=await _0x52252f(_0xd03b9e(_0xf3b28._0x554865,0x17,_0xf3b28._0x43a159,0x37),normalizeMessage(_0x2a6d51['message']));_0x59e8aa[_0x4856a5(-_0xf3b28._0x669b4c,-0x1f6,-0x1c6,-_0xf3b28._0xaad489)][_0x4856a5(-0x1ca,-_0xf3b28._0x23ee72,-0x185,-_0xf3b28._0xcb8817)](_0xf7af81),await _0x23ed3b({'type':_0xd03b9e(_0xf3b28._0x3612ae,_0xf3b28._0x26d165,0x61,0x32),'message':_0xf7af81});while(!![]){throwIfAborted(_0x173627),_0x19f1af+=0x1;const _0x4f1b76=createAssistantMessageId(_0x59e8aa[_0x4856a5(-0x19c,-0x168,-_0xf3b28._0x214d05,-_0xf3b28._0x12840a)],_0x19f1af),_0xa59d92=createReasoningMessageId(_0x4f1b76);let _0x5bf303={'model':_0x36a70e[_0xd03b9e(-0x2b,_0xf3b28._0x254007,_0xf3b28._0x2441c8,0x1e)][_0x4856a5(-0x179,-0x1d1,-0x1b9,-_0xf3b28._0x398f96)],'maxTokens':_0x36a70e[_0x4856a5(-0x232,-_0xf3b28._0x3d495f,-0x1e9,-0x1e2)]['maxTokens']??0x4000,'system':structuredClone(_0x59e8aa[_0x4856a5(-0x16c,-0x1aa,-_0xf3b28._0x338505,-_0xf3b28._0x1d5abc)]),'messages':structuredClone(_0x59e8aa[_0x4856a5(-0x17d,-_0xf3b28._0x1b287d,-0x1c6,-_0xf3b28._0x10550c)]),'tools':_0x36a70e[_0xd03b9e(_0xf3b28._0x562f05,_0xf3b28._0x151005,0x5a,0x20)]['listToolSchemas'](),'metadata':{'sessionId':_0x59e8aa[_0xd03b9e(_0xf3b28._0x4608be,0x81,0x3d,_0xf3b28._0x20e02b)],'turnId':_0x59e8aa[_0x4856a5(-0x1c2,-0x18a,-0x193,-0x146)]}};_0x5bf303=await _0x52252f(_0x4856a5(-_0xf3b28._0x39ec46,-_0xf3b28._0x3b7c07,-0x1cd,-_0xf3b28._0x67b254),_0x5bf303),await _0x23ed3b({'type':_0x4856a5(-_0xf3b28._0x27f9fe,-0x219,-_0xf3b28._0x551409,-_0xf3b28._0x159e3d),'request':_0x5bf303});let _0x1125cc=await executeModelRequest(_0x5bf303,_0x2a6d51,_0x36a70e,_0x5e7613,{'assistantMessageId':_0x4f1b76,'reasoningMessageId':_0xa59d92});_0x1125cc=await _0x52252f('afterModelResponse',_0x1125cc),await _0x23ed3b({'type':_0xd03b9e(-0x29,_0xf3b28._0x18c8ba,-_0xf3b28._0x12b541,_0xf3b28._0x467c1b),'response':_0x1125cc}),_0x59e8aa[_0xd03b9e(_0xf3b28._0x512e74,_0xf3b28._0x5a0b4d,0x6e,0x70)]=_0x1125cc;let _0x185e4a=await _0x52252f('beforeAssistantAppend',withMessageId(responseToAssistantMessage(_0x1125cc),_0x4f1b76));_0x185e4a=withMessageId(_0x185e4a,_0x4f1b76);const _0x434ebc=getToolUseBlocks(_0x185e4a),_0x597d8f=await Promise[_0xd03b9e(0x41,0xb3,_0xf3b28._0x560b5f,_0xf3b28._0x13c625)](_0x434ebc[_0xd03b9e(0xdf,0x81,0xbc,_0xf3b28._0x5c495d)](_0x29d472=>_0x52252f(_0xd03b9e(0x78,0x68,0xc2,0x95),_0x29d472)));_0x597d8f[_0xd03b9e(0xd0,0x65,_0xf3b28._0x4bfdf3,0x8e)]>0x0&&(_0x185e4a=replaceToolUseBlocks(_0x185e4a,_0x597d8f));const _0x4e7934=withMessageId(_0x185e4a,_0x4f1b76);_0x185e4a=_0x4e7934;const _0x37670b=createReasoningMessage(_0x185e4a),_0x2693bb=createAssistantTextMessage(_0x185e4a),_0x167c3a=createToolUseMessage(_0x185e4a);_0x37670b&&await _0x23ed3b({'type':'reasoning_message','message':withMessageId(_0x37670b,_0xa59d92)});_0x2693bb&&await _0x23ed3b({'type':'assistant_message','message':withMessageId(_0x2693bb,_0x4f1b76)});_0x167c3a&&await _0x23ed3b({'type':'tool_use_message','message':withMessageId(_0x167c3a,_0x4f1b76)});_0x59e8aa[_0x4856a5(-0x183,-0x17a,-_0xf3b28._0x1c68e8,-_0xf3b28._0x4a5f83)]['push'](_0x4e7934);for(const _0x1dfc75 of _0x597d8f){await _0x23ed3b({'type':_0x4856a5(-0x193,-0x20d,-0x1d2,-0x1a0),'toolCall':_0x1dfc75});}if(_0x597d8f['length']===0x0){const _0x31e4a2=await _0x52252f(_0x4856a5(-0x213,-0x1f1,-_0xf3b28._0x446507,-_0xf3b28._0xa82423),_0x185e4a),_0x896de7=withMessageId(_0x31e4a2,_0x4f1b76);return _0x59e8aa[_0xd03b9e(0x52,_0xf3b28._0x220a1d,0x1e,0xb)]=_0x896de7,_0x59e8aa[_0x4856a5(-0x207,-0x190,-0x1c6,-0x19e)][_0x59e8aa[_0xd03b9e(0x93,0x75,0x5c,_0xf3b28._0x165f15)][_0x4856a5(-0x1b2,-_0xf3b28._0x17ff7c,-0x179,-0x1a9)]-0x1]=_0x896de7,await _0x23ed3b({'type':_0x4856a5(-_0xf3b28._0x36005a,-_0xf3b28._0x9cecb2,-0x1fe,-_0xf3b28._0x51240b),'message':_0x896de7}),throwIfAborted(_0x173627),await _0x36a70e[_0xd03b9e(0x4c,0x35,_0xf3b28._0x170c0b,0x5c)]['runObservers']('afterTurnComplete',_0x59e8aa,_0x354019),await _0x23ed3b({'type':'turn_complete','state':_0x59e8aa}),{'status':_0x4856a5(-0x1b0,-0x1dc,-_0xf3b28._0x36005a,-_0xf3b28._0x143edb),'finalMessage':_0x896de7,'state':_0x59e8aa};}let _0xda4fd9=await _0x36a70e[_0x4856a5(-_0xf3b28._0x4b014c,-_0xf3b28._0x1c68e8,-_0xf3b28._0x3c3798,-0x199)]['executeCalls'](_0x597d8f,_0x5e7613);const _0x58dce5=_0xda4fd9[_0x4856a5(-0x222,-_0xf3b28._0x28ec6c,-_0xf3b28._0x31e6cb,-_0xf3b28._0xe5f6e8)](isAbortedToolResult),_0xac27c6=_0x58dce5?_0x4a95f1:_0x52252f,_0x46f887=_0x58dce5?_0x54504f:_0x23ed3b;_0xda4fd9=await Promise[_0x4856a5(-0x15b,-0x1d0,-_0xf3b28._0x4554ab,-0x145)](_0xda4fd9[_0xd03b9e(0x62,_0xf3b28._0x33aee5,_0xf3b28._0x186aa,0x98)](_0x4e53ba=>_0xac27c6(_0xd03b9e(0x70,0x5a,0xdf,0x97),_0x4e53ba))),_0x59e8aa['toolResults'][_0xd03b9e(0x93,_0xf3b28._0x5a8703,0x7d,0x82)](..._0xda4fd9);for(const _0x268c4f of _0xda4fd9){await _0x46f887({'type':_0x4856a5(-0x137,-0x195,-_0xf3b28._0x554122,-0x1c3),'result':_0x268c4f});}const _0x52fd46=await _0xac27c6(_0x4856a5(-0x1ef,-0x222,-_0xf3b28._0x5d8173,-0x20f),createToolResultUserMessage(_0xda4fd9));await _0x46f887({'type':_0xd03b9e(0x2f,_0xf3b28._0x472eb4,_0xf3b28._0xf1841e,_0xf3b28._0x1743f7),'message':_0x52fd46}),_0x59e8aa[_0xd03b9e(_0xf3b28._0x50f4c7,0x45,-0xd,0x41)][_0xd03b9e(_0xf3b28._0xa82336,0x84,_0xf3b28._0x4608be,0x82)](_0x52fd46);if(_0x58dce5)return{'status':_0xd03b9e(0x7a,0xa,0x3b,_0xf3b28._0x314187),'state':_0x59e8aa};}}catch(_0x518d7d){if(!_0x173627['aborted'])throw _0x518d7d;return{'status':_0x4856a5(-_0xf3b28._0xc95e4d,-_0xf3b28._0x22e523,-_0xf3b28._0x394bb0,-_0xf3b28._0x1ac201),'state':_0x59e8aa};}}function createSessionId(){const _0x3e871a={_0x4a1b7c:0x2c,_0x4f87a5:0x59,_0x3f4bcf:0x20,_0x27efc7:0x177,_0x4d512f:0x146,_0x1d9437:0x145,_0x92b3db:0x7c},_0x54a5c9={_0xbd47f2:0x10e,_0x8e9734:0x380,_0x3d5201:0xa4},_0x2e3ef1={_0x3cc0b6:0xba,_0x568b64:0x1d};function _0x36e82f(_0x327106,_0x54e7be,_0xf517e6,_0x407db1){return _0x10e4b8(_0x327106-_0x2e3ef1._0x3cc0b6,_0xf517e6,_0x54e7be- -0x14a,_0x407db1-_0x2e3ef1._0x568b64);}function _0x5509f9(_0x255c13,_0x6c4e2c,_0x53923b,_0x4e1e6c){return _0x10e4b8(_0x255c13-_0x54a5c9._0xbd47f2,_0x255c13,_0x4e1e6c- -_0x54a5c9._0x8e9734,_0x4e1e6c-_0x54a5c9._0x3d5201);}return'session-'+Date[_0x5509f9(-_0x3e871a._0x4a1b7c,0x20,-_0x3e871a._0x4f87a5,-_0x3e871a._0x3f4bcf)]()+'-'+Math[_0x36e82f(0x18b,_0x3e871a._0x27efc7,_0x3e871a._0x4d512f,_0x3e871a._0x1d9437)]()['toString'](0x10)[_0x5509f9(-_0x3e871a._0x92b3db,-0xbb,-0xa3,-0x99)](0x2,0xa);}function createTurnId(_0x1d328a){const _0x6a7439={_0x539441:0x3bf,_0x17ce3c:0x38d},_0x42c79d={_0x2ca2ed:0x9c};function _0x3e95b2(_0x27d16b,_0x4cc98a,_0x4d11d4,_0x2ace0){return _0x10e4b8(_0x27d16b-0x195,_0x4cc98a,_0x4d11d4-_0x42c79d._0x2ca2ed,_0x2ace0-0x13a);}return _0x3e95b2(0x402,0x3d7,_0x6a7439._0x539441,_0x6a7439._0x17ce3c)+_0x1d328a;}function createDefaultMessage(_0x59db39){if(_0x59db39===void 0x0)return void 0x0;return normalizeUserInput(_0x59db39);}function normalizeUserInput(_0x18b1e2){const _0x1a3976={_0x3f09aa:0x3d4,_0x213409:0x398,_0x431abb:0x2c7},_0xe98cd={_0x4eedaf:0x3c5,_0xdcbad0:0x199,_0x508d53:0x16c},_0x1a42d4={_0x132c83:0x2b8,_0x270667:0xda};function _0x4f2841(_0x12b506,_0x2baa46,_0x5aac7a,_0x300bed){return _0x1a8375(_0x5aac7a-_0x1a42d4._0x132c83,_0x2baa46-_0x1a42d4._0x270667,_0x5aac7a-0x125,_0x12b506);}function _0x195e62(_0x1cf72b,_0x1afdf2,_0x1be0e1,_0x7d798a){return _0x1a8375(_0x1cf72b-_0xe98cd._0x4eedaf,_0x1afdf2-_0xe98cd._0xdcbad0,_0x1be0e1-_0xe98cd._0x508d53,_0x7d798a);}if(typeof _0x18b1e2===_0x195e62(0x3c1,_0x1a3976._0x3f09aa,_0x1a3976._0x213409,0x40b))return{'role':'user','content':[{'type':_0x4f2841(0x311,0x304,_0x1a3976._0x431abb,0x284),'text':_0x18b1e2}]};return normalizeMessage(_0x18b1e2);}function resolveChatModel(_0x2f18a6){if(!_0x2f18a6['chatModel'])throw new Error('Agent\x20requires\x20a\x20chatModel');return _0x2f18a6['chatModel'];}function createRegistry(_0x59b0ad){const _0x5e6e21={_0x3d60bc:0x170,_0x43a601:0x191,_0x477a59:0x15a,_0x1b40ad:0x1ac,_0x14eec7:0x1bf,_0x58b819:0x1f4},_0xbfd8e2={_0x2f6dc3:0x10a},_0x575319={_0x2625d4:0x19c,_0x2d4346:0xa};if(_0x59b0ad[_0x2ac612(-0x191,-0x159,-_0x5e6e21._0x3d60bc,-0x144)])return _0x59b0ad[_0x2ac612(-_0x5e6e21._0x43a601,-0x1d3,-_0x5e6e21._0x477a59,-_0x5e6e21._0x1b40ad)];const _0x1dd962=createExtensionRegistry(),_0x9de21c=_0x59b0ad[_0x2ac612(-_0x5e6e21._0x14eec7,-0x1c9,-0x19c,-_0x5e6e21._0x58b819)]??[];function _0x2ac612(_0x2f5e00,_0x1e325f,_0x24907b,_0x3e9b78){return _0x1a8375(_0x2f5e00- -_0x575319._0x2625d4,_0x1e325f-0x3b,_0x24907b-_0x575319._0x2d4346,_0x1e325f);}function _0x26cf34(_0x133d1c,_0x4cd284,_0x5485bf,_0x446084){return _0x1a8375(_0x133d1c-0x502,_0x4cd284-0x133,_0x5485bf-_0xbfd8e2._0x2f6dc3,_0x4cd284);}for(const _0x5c021b of _0x9de21c){_0x1dd962['register'](_0x5c021b);}return _0x1dd962;}var Agent=class{['_systemPrompt'];[_0x10e4b8(0x304,0x329,0x305,0x2bf)];[_0x10e4b8(0x319,0x293,0x2c7,0x27b)];[_0x1a8375(0x21,0x4,0x58,0x43)];[_0x10e4b8(0x341,0x333,0x2fe,0x2d9)];[_0x1a8375(0x17,0x1a,0x2d,0x2a)];[_0x1a8375(0x51,0x5d,0x16,0x9)];constructor(_0x36d097={}){const _0x91afa1={_0x320873:0x38e,_0x118195:0x335,_0x4b320f:0x390,_0x5eff25:0x3dc,_0x320064:0x3b8,_0x2c84e7:0x373,_0x1e8e3a:0x3aa,_0x292b93:0x3f5,_0x505c63:0x389,_0x392813:0x36c,_0x5012ba:0x33f,_0x8ae9d8:0x31e,_0x462fff:0x310,_0x413592:0x321,_0x2ae5d3:0x365,_0x2ddd20:0x32a,_0x14f998:0x304,_0x1bb07b:0x371,_0x39a20b:0x3b3,_0x2c51ae:0x3e7,_0x1b2c08:0x36d,_0x1f56f1:0x35a,_0x41351d:0x351},_0x3ec924={_0x113c7b:0x1bb,_0x2df0d6:0x1a5,_0x24c40a:0x1c3},_0x3074a4={_0x5f0d2a:0x112,_0x59d597:0x159,_0x3edd09:0xad},_0x485a4d={_0x1ec237:0x47,_0x564380:0xf1},_0x13f1b2={_0xf67869:0x186,_0x4b3392:0xf1};this[_0x217fb3(0x3c1,0x376,_0x91afa1._0x320873,_0x91afa1._0x118195)]=_0x36d097['sessionId']??createSessionId(),this[_0x217fb3(_0x91afa1._0x4b320f,0x3a6,_0x91afa1._0x5eff25,_0x91afa1._0x320064)]=0x0;function _0x175586(_0xde6019,_0x184dd0,_0x1db3dc,_0x51e39b){return _0x10e4b8(_0xde6019-_0x13f1b2._0xf67869,_0x1db3dc,_0x184dd0-0x55,_0x51e39b-_0x13f1b2._0x4b3392);}this['_systemPrompt']=_0x36d097[_0x217fb3(_0x91afa1._0x2c84e7,0x362,0x39d,0x316)]??'',this['messages']=(_0x36d097['messages']??[])[_0x175586(0x38c,_0x91afa1._0x1e8e3a,_0x91afa1._0x292b93,_0x91afa1._0x505c63)](normalizeMessage),this[_0x217fb3(0x351,_0x91afa1._0x392813,0x3ae,_0x91afa1._0x5012ba)]=createDefaultMessage(_0x36d097[_0x217fb3(0x344,_0x91afa1._0x8ae9d8,0x2df,_0x91afa1._0x462fff)]);function _0x217fb3(_0x5690ff,_0x5e8d4d,_0x5609a9,_0xb4d847){return _0x10e4b8(_0x5690ff-0x14a,_0xb4d847,_0x5e8d4d-_0x485a4d._0x1ec237,_0xb4d847-_0x485a4d._0x564380);}this[_0x217fb3(0x324,0x30e,0x31c,0x343)]=createAgentMetrics({'getContextWindowLimit':_0x36d097[_0x175586(0x36a,_0x91afa1._0x413592,_0x91afa1._0x2ae5d3,0x349)]});const _0x52f266=_0x36d097['onEvent'],_0x52b8b1=async(_0x51660c,_0x47a35e)=>{this[_0x339685(_0x3ec924._0x113c7b,_0x3ec924._0x2df0d6,_0x3ec924._0x24c40a,0x1ab)]['recordEvent'](_0x51660c);function _0x339685(_0x4fa4b0,_0x4c7c03,_0x4c8c2a,_0x511df6){return _0x175586(_0x4fa4b0-_0x3074a4._0x5f0d2a,_0x4c8c2a- -_0x3074a4._0x59d597,_0x511df6,_0x511df6-_0x3074a4._0x3edd09);}await _0x52f266?.(_0x51660c,_0x47a35e);},_0x16be1c=createInternalToolRuntime(_0x36d097[_0x217fb3(0x349,0x31f,_0x91afa1._0x2ddd20,_0x91afa1._0x14f998)]??[],{'onEvent':_0x52b8b1,'onToolCall':_0x36d097[_0x175586(_0x91afa1._0x1bb07b,_0x91afa1._0x39a20b,_0x91afa1._0x2c51ae,_0x91afa1._0x1b2c08)]});this[_0x175586(0x366,_0x91afa1._0x1f56f1,0x363,_0x91afa1._0x41351d)]={'registry':createRegistry(_0x36d097),'chatModel':resolveChatModel(_0x36d097),'toolRuntime':_0x16be1c,'askUser':_0x36d097[_0x217fb3(0x3d2,0x3a1,0x3a7,0x39c)],'onEvent':_0x52b8b1};}get[_0x1a8375(0xd,0x22,-0x14,0x3b)](){const _0x1a0779={_0x3f281a:0x33f,_0x1104f5:0x328},_0x45f1d3={_0x8f76de:0x123};function _0x145ee6(_0x512919,_0x1b53e5,_0x1629b0,_0x5dcd65){return _0x1a8375(_0x1629b0-0x352,_0x1b53e5-0x1cc,_0x1629b0-_0x45f1d3._0x8f76de,_0x512919);}return this[_0x145ee6(_0x1a0779._0x3f281a,0x31a,_0x1a0779._0x1104f5,0x368)];}[_0x10e4b8(0x30c,0x368,0x31f,0x2cd)](_0x2e5157=[]){const _0x4bdb19={_0x4d0084:0x218,_0x3a742e:0x1fe,_0x4dc9a3:0x246},_0x2fe4ae={_0x253b32:0x22d};function _0x3ee852(_0x196c88,_0x5d6841,_0x38ca7d,_0x932809){return _0x1a8375(_0x5d6841-_0x2fe4ae._0x253b32,_0x5d6841-0x1b3,_0x38ca7d-0x20,_0x196c88);}function _0x29365a(_0x1f1597,_0x4a654a,_0x56fff6,_0x43297e){return _0x1a8375(_0x43297e-0x407,_0x4a654a-0xfb,_0x56fff6-0xca,_0x1f1597);}this[_0x3ee852(0x238,0x224,_0x4bdb19._0x4d0084,0x24a)][_0x3ee852(0x231,0x1fc,0x1c7,_0x4bdb19._0x3a742e)][_0x3ee852(0x27b,0x23e,_0x4bdb19._0x4dc9a3,0x1ff)](_0x2e5157);}[_0x1a8375(-0x1d,0x1c,-0xf,-0x18)](_0xbe637,_0x5ca392={}){const _0x54c25d={_0x513fee:0x2b9,_0x3bb5c5:0x2d0,_0x3de8d9:0x316,_0x3cafee:0x334,_0x12897c:0x303,_0x85bc05:0x2e6,_0x2d5d0b:0x366,_0x395890:0x325,_0x127e20:0x350},_0x3b75ba={_0x118f06:0x2f6,_0x471f12:0x89},_0x2a0d93={_0x5a7c9b:0xf5};this[_0x303ee3(0x290,0x298,_0x54c25d._0x513fee,0x2cc)]=_0xbe637;function _0x23c05d(_0x5ef987,_0x534c9f,_0x21e6aa,_0x3eea5f){return _0x1a8375(_0x3eea5f- -_0x2a0d93._0x5a7c9b,_0x534c9f-0xd4,_0x21e6aa-0xa6,_0x21e6aa);}function _0x303ee3(_0x1d5c43,_0x508a5a,_0x193d30,_0x46809e){return _0x1a8375(_0x46809e-_0x3b75ba._0x118f06,_0x508a5a-0xa3,_0x193d30-_0x3b75ba._0x471f12,_0x1d5c43);}_0x5ca392[_0x303ee3(0x2f5,0x2a0,0x2ab,_0x54c25d._0x3bb5c5)]===!![]&&(this[_0x303ee3(_0x54c25d._0x3de8d9,_0x54c25d._0x3cafee,_0x54c25d._0x12897c,_0x54c25d._0x85bc05)]=[],this[_0x303ee3(_0x54c25d._0x2d5d0b,_0x54c25d._0x395890,_0x54c25d._0x127e20,0x347)]=0x0);}['setSessionId'](_0x4cd97d){const _0x1ac43c={_0x427de3:0x67,_0x2730f3:0xc5,_0x2eb951:0x8e},_0x2f2ceb={_0x32729c:0x3bd};function _0x4192a8(_0x369502,_0x47c640,_0xb9509a,_0x49eba0){return _0x10e4b8(_0x369502-0x1c5,_0xb9509a,_0x49eba0- -_0x2f2ceb._0x32729c,_0x49eba0-0xcd);}this[_0x4192a8(-_0x1ac43c._0x427de3,-_0x1ac43c._0x2730f3,-0xbc,-_0x1ac43c._0x2eb951)]=_0x4cd97d;}[_0x1a8375(0x2c,0x9,0x47,0x61)](_0xb6b242){const _0x1643eb={_0x48d9f4:0x17},_0x1a6f65={_0x49bec2:0x20,_0x637902:0x1e5};function _0x46cff1(_0x517ce0,_0x4f30c2,_0x33e90d,_0x1c7b94){return _0x1a8375(_0x517ce0-_0x1a6f65._0x49bec2,_0x4f30c2-_0x1a6f65._0x637902,_0x33e90d-0xd5,_0x4f30c2);}this[_0x46cff1(0x17,-0x23,_0x1643eb._0x48d9f4,0x69)]['chatModel']=_0xb6b242;}async['send'](_0x351ff0=this['defaultMessage'],_0x476f28={}){const _0xb3a558={_0x17be57:0x251,_0x4d8f8d:0x2e8,_0x25f123:0x486,_0x350c86:0x47a,_0x53ba3a:0x498,_0x2c4295:0x26b,_0x27b9a0:0x478,_0x2cc20f:0x4d4,_0x160a39:0x4f9,_0xc21b81:0x4ac,_0x925907:0x480,_0xc5f6e8:0x46f},_0x5c3466={_0x492e49:0x184};function _0x3c5cb3(_0x1f4e97,_0x4d5c92,_0x1836b0,_0x310e2e){return _0x10e4b8(_0x1f4e97-0x1d4,_0x1836b0,_0x4d5c92-0x1a7,_0x310e2e-0x13e);}if(!_0x351ff0)throw new Error(_0x2b92ea(_0xb3a558._0x17be57,0x25a,0x299,0x27c));function _0x2b92ea(_0xff234e,_0x15fea6,_0x282ece,_0x524d50){return _0x10e4b8(_0xff234e-_0x5c3466._0x492e49,_0x15fea6,_0x282ece- -0xaf,_0x524d50-0x85);}this[_0x2b92ea(_0xb3a558._0x4d8f8d,0x2a8,0x2b0,0x2e6)]+=0x1;const _0x1e58f1=await runTurn({'sessionId':this['sessionId'],'turnId':createTurnId(this['turnIndex']),'streaming':_0x476f28[_0x3c5cb3(_0xb3a558._0x25f123,_0xb3a558._0x350c86,_0xb3a558._0x53ba3a,0x459)],'signal':_0x476f28[_0x2b92ea(0x24b,0x2a2,_0xb3a558._0x2c4295,0x233)],'system':this[_0x3c5cb3(_0xb3a558._0x27b9a0,0x4c2,_0xb3a558._0x2cc20f,0x4b5)],'messages':this['messages'],'message':normalizeUserInput(_0x351ff0)},this[_0x3c5cb3(_0xb3a558._0x160a39,_0xb3a558._0xc21b81,_0xb3a558._0x925907,_0xb3a558._0xc5f6e8)]);return this['messages']=_0x1e58f1['state']['messages']['map'](normalizeMessage),_0x1e58f1;}};export{normalizeToolOutputValue,createToolOutput,ToolExecutionError,defineTool,ToolRegistry,validateToolInput,deriveFinalToolOutput,createInternalToolRuntime,createExtensionRegistry,createAgentMetrics,runTurn,Agent};
|