@nuvin/agent-core 0.0.0-rc.17 → 0.0.0-rc.19

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (90) hide show
  1. package/dist/VERSION +2 -2
  2. package/dist/agent/agent.d.ts +28 -0
  3. package/dist/agent/context-compactor.d.ts +8 -0
  4. package/dist/agent/extension-registry.d.ts +3 -0
  5. package/dist/agent/index.d.ts +8 -99
  6. package/dist/agent/index.js +1 -1
  7. package/dist/agent/messages-to-text.d.ts +3 -0
  8. package/dist/agent/metrics.d.ts +30 -0
  9. package/dist/agent/topic-reminder-extension.d.ts +32 -0
  10. package/dist/agent/turn-engine.d.ts +3 -0
  11. package/dist/chunk-FFIZ6TKW.js +1 -1
  12. package/dist/chunk-HRU363DY.js +1 -0
  13. package/dist/chunk-NHBKADBW.js +1 -0
  14. package/dist/chunk-NYZR4XKO.js +1 -1
  15. package/dist/chunk-QDOE7NWO.js +1 -0
  16. package/dist/chunk-X7VAACWY.js +1 -1
  17. package/dist/formats/base64-image-content.d.ts +4 -0
  18. package/dist/formats/index.d.ts +4 -39
  19. package/dist/formats/index.js +1 -1
  20. package/dist/formats/message-format.d.ts +33 -0
  21. package/dist/formats/provider-adapters.d.ts +3 -0
  22. package/dist/hooks/executor.d.ts +3 -0
  23. package/dist/hooks/extensions.d.ts +28 -0
  24. package/dist/hooks/index.d.ts +7 -76
  25. package/dist/hooks/index.js +1 -1
  26. package/dist/hooks/registry.d.ts +8 -0
  27. package/dist/hooks/types.d.ts +40 -0
  28. package/dist/lsp/client.d.ts +11 -0
  29. package/dist/lsp/index.d.ts +24 -0
  30. package/dist/lsp/installer.d.ts +11 -0
  31. package/dist/lsp/language.d.ts +2 -0
  32. package/dist/lsp/server.d.ts +6 -0
  33. package/dist/lsp/types.d.ts +68 -0
  34. package/dist/models/anthropic-model.d.ts +27 -0
  35. package/dist/models/anthropic-surface.d.ts +5 -0
  36. package/dist/models/chat-model.d.ts +31 -0
  37. package/dist/models/github-model.d.ts +32 -0
  38. package/dist/models/http-transport.d.ts +10 -0
  39. package/dist/models/index.d.ts +16 -390
  40. package/dist/models/index.js +1 -1
  41. package/dist/models/mock-model.d.ts +15 -0
  42. package/dist/models/model-errors.d.ts +16 -0
  43. package/dist/models/model-limits.d.ts +7 -0
  44. package/dist/models/model-registry.d.ts +44 -0
  45. package/dist/models/model-surface-router.d.ts +19 -0
  46. package/dist/models/model-transports.d.ts +17 -0
  47. package/dist/models/openai-model.d.ts +60 -0
  48. package/dist/models/openai-surfaces.d.ts +74 -0
  49. package/dist/models/provider-adapter.d.ts +23 -0
  50. package/dist/models/provider-session.d.ts +16 -0
  51. package/dist/models/routed-model.d.ts +90 -0
  52. package/dist/shared/abort.d.ts +9 -0
  53. package/dist/shared/index.d.ts +5 -22
  54. package/dist/shared/index.js +1 -1
  55. package/dist/shared/reasoning-config.d.ts +5 -0
  56. package/dist/shared/turn-failed.d.ts +6 -0
  57. package/dist/{types-3UUDPpJs.d.ts → shared/types.d.ts} +172 -162
  58. package/dist/tools/ask-user-tool.d.ts +55 -0
  59. package/dist/tools/bash-tool.d.ts +63 -0
  60. package/dist/tools/command-tool.d.ts +23 -0
  61. package/dist/tools/file-edit-tool.d.ts +29 -0
  62. package/dist/tools/file-new-tool.d.ts +21 -0
  63. package/dist/tools/file-read-tool.d.ts +27 -0
  64. package/dist/tools/glob-tool.d.ts +26 -0
  65. package/dist/tools/grep-tool.d.ts +34 -0
  66. package/dist/tools/index.d.ts +28 -809
  67. package/dist/tools/index.js +1 -1
  68. package/dist/tools/internal-tool-runtime.d.ts +8 -0
  69. package/dist/tools/ls-tool.d.ts +20 -0
  70. package/dist/tools/lsp-tool.d.ts +36 -0
  71. package/dist/tools/mcp-oauth-provider.d.ts +11 -0
  72. package/dist/tools/mcp-server-manager.d.ts +43 -0
  73. package/dist/tools/mcp-tool-adapter.d.ts +47 -0
  74. package/dist/tools/mock-tool-runtime.d.ts +3 -0
  75. package/dist/tools/ripgrep.d.ts +20 -0
  76. package/dist/tools/runtime-manager-tools.d.ts +58 -0
  77. package/dist/tools/skill-tool.d.ts +33 -0
  78. package/dist/tools/todo-write-tool.d.ts +66 -0
  79. package/dist/tools/tool-output-offload.d.ts +12 -0
  80. package/dist/tools/tools.d.ts +24 -0
  81. package/dist/tools/update-topic-tool.d.ts +12 -0
  82. package/dist/tools/view-file-tool.d.ts +22 -0
  83. package/dist/tools/web-fetch-tool.d.ts +20 -0
  84. package/dist/tools/web-search-tool.d.ts +72 -0
  85. package/dist/tools/workspace-paths.d.ts +5 -0
  86. package/package.json +2 -2
  87. package/dist/chunk-SEP4YYY3.js +0 -1
  88. package/dist/chunk-T7UKN6FZ.js +0 -1
  89. package/dist/chunk-WHYFEBOU.js +0 -1
  90. package/dist/provider-adapters-Bupd2RBH.d.ts +0 -5
@@ -1 +0,0 @@
1
- (function(_0x2bbfdc,_0x48be36){const _0x4338e9={_0x1c9c37:0x45e,_0x3a63bf:0x442,_0x2bbef9:0x45e,_0x1b34b7:0x448,_0x1ee738:0xd3,_0x33a26d:0xc6,_0x4fc84f:0xe2,_0x15054e:0xe5,_0x4433f4:0xdd,_0x219f83:0x43d,_0xf92150:0xb0,_0x5a14c5:0xcd,_0x4c86c2:0xc4,_0x305c41:0xd1,_0x130e1f:0x46f,_0x3ac5bf:0x466,_0x3225a3:0x43c,_0x51d2d1:0x450,_0x433b32:0x47f,_0x977b3a:0x453,_0x241eca:0xf3},_0x4dfe5c={_0x405dd4:0x27b};function _0x57a448(_0x43c3f0,_0x383d20,_0x222325,_0x4e861e){return _0x176a(_0x222325- -0x2bb,_0x4e861e);}const _0x7eb80e=_0x2bbfdc();function _0x34ecfe(_0x4e6b12,_0xee592a,_0x2c99f4,_0xfe0d69){return _0x176a(_0xfe0d69-_0x4dfe5c._0x405dd4,_0x2c99f4);}while(!![]){try{const _0x5db2a6=-parseInt(_0x34ecfe(_0x4338e9._0x1c9c37,_0x4338e9._0x3a63bf,_0x4338e9._0x2bbef9,_0x4338e9._0x1b34b7))/0x1*(parseInt(_0x57a448(-_0x4338e9._0x1ee738,-0xc4,-_0x4338e9._0x33a26d,-_0x4338e9._0x4fc84f))/0x2)+-parseInt(_0x57a448(-0xd8,-_0x4338e9._0x15054e,-0xdc,-_0x4338e9._0x4433f4))/0x3+-parseInt(_0x34ecfe(0x453,0x432,_0x4338e9._0x219f83,0x447))/0x4*(parseInt(_0x57a448(-_0x4338e9._0xf92150,-0xdc,-0xc4,-_0x4338e9._0x5a14c5))/0x5)+parseInt(_0x57a448(-0xd4,-_0x4338e9._0x4c86c2,-_0x4338e9._0x305c41,-0xbc))/0x6+parseInt(_0x34ecfe(0x460,_0x4338e9._0x130e1f,0x478,_0x4338e9._0x3ac5bf))/0x7+-parseInt(_0x34ecfe(_0x4338e9._0x3225a3,0x449,_0x4338e9._0x51d2d1,0x451))/0x8*(parseInt(_0x34ecfe(_0x4338e9._0x433b32,0x472,_0x4338e9._0x977b3a,0x464))/0x9)+parseInt(_0x57a448(-_0x4338e9._0x241eca,-0xd1,-0xe1,-0xfc))/0xa;if(_0x5db2a6===_0x48be36)break;else _0x7eb80e['push'](_0x7eb80e['shift']());}catch(_0x504d53){_0x7eb80e['push'](_0x7eb80e['shift']());}}}(_0x340f,0xb814f));import{resolveOpenAiReasoningConfig}from'./chunk-NYZR4XKO.js';import{normalizeContent}from'./chunk-SEP4YYY3.js';function systemToInstructions(_0x56a2cf){const _0x166222={_0x3cd52a:0x256,_0x5ec42c:0x251,_0x38a4a7:0x23b,_0x3a7598:0x231,_0x1d2d45:0x24d},_0x313967={_0xef5882:0x4e};function _0x3362f1(_0xb52c,_0x1d266d,_0x4c1b8f,_0x5e03da){return _0x176a(_0x4c1b8f- -0x279,_0x5e03da);}function _0xb543d(_0x5554d9,_0x41388a,_0x4ee449,_0x2ef389){return _0x176a(_0x4ee449-_0x313967._0xef5882,_0x2ef389);}return normalizeContent(_0x56a2cf)['filter'](_0xbdb73b=>_0xbdb73b[_0x3362f1(-0xaa,-0x8c,-0x93,-0xa0)]==='text')[_0xb543d(_0x166222._0x3cd52a,_0x166222._0x5ec42c,_0x166222._0x38a4a7,0x222)](_0x46a830=>_0x46a830[_0xb543d(0x202,0x205,0x211,0x211)])[_0xb543d(0x244,0x22b,_0x166222._0x3a7598,_0x166222._0x1d2d45)]('\x0a\x0a');}function pushUserContentMessage(_0x3a434d,_0x21a883,_0x175e1e){const _0x209d7f={_0x31429e:0x3ad,_0x291dce:0x3a6,_0x1137c1:0x8f,_0x45a797:0x8e,_0x3da5c5:0x9f,_0xd18d09:0x9b,_0x21fa39:0xab};function _0x339903(_0x2865d3,_0x53462b,_0x1237c4,_0x4522fe){return _0x176a(_0x1237c4- -0x26a,_0x53462b);}function _0x1e01aa(_0xbfaf23,_0x2d86d8,_0x45a3e4,_0x365d59){return _0x176a(_0x45a3e4-0x1da,_0x2d86d8);}if(_0x175e1e[_0x1e01aa(0x3b5,0x3c0,_0x209d7f._0x31429e,_0x209d7f._0x291dce)]===0x0)return;_0x3a434d[_0x339903(-_0x209d7f._0x1137c1,-0x76,-0x8f,-_0x209d7f._0x45a797)]({'type':_0x339903(-_0x209d7f._0x3da5c5,-_0x209d7f._0xd18d09,-0xaa,-_0x209d7f._0x21fa39),'role':_0x21a883,'content':_0x175e1e});}function _0x340f(){const _0x337532=['mJeWmtqXmgnmA3rHsW','C3rYAw5NAwz5','C3rYAw5N','Aw5WDxrFDgv4Da','AM9PBG','zgf0yq','zMLSDgvY','DhLWzq','yxnZAxn0yw50','Dg9VBf91C2vFAwq','otLpuuTOCfK','ndCXmJuYnLzwwvfztq','otaYodC1nfjQC2fStq','Aw5WDxrFAw1Hz2u','BwfW','sw1Hz2uGCMv0DxjUzwqGyNKGvMLLD0zPBguGzM9YihrVB2WGCMvZDwX0ia','DxnLCG','C291CMnL','Dg9VBhm','yxv0BW','zNvUy3rPB25Fy2fSBa','Bw9KzwW','nLnMDxvXwa','B2jQzwn0','mtaXnvvsD0LztG','C3bSAwnL','AxnbCNjHEq','B3v0Chv0x3rLEhq','BwvZC2fNzq','y29UDgvUDa','DhjPBq','Dgv4Da','vg9VBcbYzxr1CM5LzcbPBwfNzsbJB250zw50lG','C3LZDgvT','CMvHC29UAw5N','Dg9VBf9Yzxn1Bhq','zgf0ytO','DxnLCI12AxnPyMXL','o2jHC2u2ncW','A2v5CW','mZG2meLosKXMqG','mJa3nZKXv0XgEM5H','Aw5WDxq','Dg9VBf91C2u','Aw5JBhvKzuvUy3j5ChrLzenVBNrLBNq','zwzMB3j0','DMLZAwjPBgL0Eq','BgvUz3rO','zNvUy3rPB25Fy2fSBf9VDxrWDxq','B3bLBMfPuMvZCg9UC2vZt3v0Chv0','odyYndHwA2zmCKC','CM9Szq','Aw5WDxrFC2nOzw1H','CMvHC29UAw5NlMvUy3j5ChrLzf9JB250zw50','mZe3mdG1mhHQvKDAsG','ChvZAa','BwvKAwfFDhLWzq','zNvUy3rPB24','Aw1Hz2u'];_0x340f=function(){return _0x337532;};return _0x340f();}function hasSerializableToolUse(_0x3fe1df){const _0x12f71a={_0x9bed1:0x398,_0x28ec6b:0x39b,_0x4a23f9:0x3a7,_0x2690cf:0x39d,_0x4536b0:0x3ac,_0x299ab0:0x47b,_0x56ed1f:0x477,_0x2b9908:0x476,_0x283612:0x476},_0x59df30={_0x3dd92e:0x2a3};function _0x18522d(_0x43fde9,_0x50dc26,_0x448136,_0x3b54b6){return _0x176a(_0x448136-0x1d9,_0x3b54b6);}function _0x5203dc(_0x32becc,_0x46bc6b,_0x369ff5,_0x3db2e5){return _0x176a(_0x46bc6b-_0x59df30._0x3dd92e,_0x369ff5);}return _0x3fe1df['id'][_0x18522d(_0x12f71a._0x9bed1,0x396,_0x12f71a._0x28ec6b,_0x12f71a._0x4a23f9)]()[_0x18522d(0x391,_0x12f71a._0x2690cf,_0x12f71a._0x4536b0,0x3c7)]>0x0&&_0x3fe1df['name'][_0x5203dc(_0x12f71a._0x299ab0,0x465,0x472,_0x12f71a._0x56ed1f)]()[_0x5203dc(0x46a,_0x12f71a._0x2b9908,0x45c,_0x12f71a._0x283612)]>0x0;}function hasSerializableToolResult(_0x2efb90){const _0x5ce68c={_0x475a07:0x1cd,_0x1bbab4:0x1c7},_0x4f9f71={_0x52d52c:0x3c4};function _0xb34e2f(_0x43b5d9,_0x433d5a,_0x447591,_0x2c0f60){return _0x176a(_0x43b5d9- -_0x4f9f71._0x52d52c,_0x2c0f60);}return _0x2efb90[_0xb34e2f(-0x1dc,-_0x5ce68c._0x475a07,-0x1c3,-_0x5ce68c._0x1bbab4)]['trim']()['length']>0x0;}function isResponseInputObject(_0x560202){const _0x334528={_0x41d4cc:0xf9,_0x116471:0x105,_0x5c7339:0x106,_0x1b4a44:0xfc,_0x48bd6e:0x116,_0x1c9db6:0xae},_0x5d3c42={_0x596906:0xfd},_0xdd9705={_0x1cc7fc:0x12b};if(typeof _0x560202!==_0x1d427b(_0x334528._0x41d4cc,0xf8,_0x334528._0x116471,_0x334528._0x5c7339)||_0x560202===null||Array[_0x1d427b(_0x334528._0x1b4a44,_0x334528._0x48bd6e,_0x334528._0x5c7339,0x106)](_0x560202))return![];const _0x810c2e=_0x560202;function _0x5741a7(_0x105d0f,_0x5bc49c,_0x425e13,_0x410ed8){return _0x176a(_0x5bc49c- -_0xdd9705._0x1cc7fc,_0x410ed8);}function _0x1d427b(_0x4fafca,_0x38adf2,_0x76e3f8,_0x1a0363){return _0x176a(_0x4fafca- -_0x5d3c42._0x596906,_0x76e3f8);}return typeof _0x810c2e[_0x5741a7(_0x334528._0x1c9db6,0xbb,0xb6,0x9e)]==='string';}function isImageToolResultBlock(_0x23efd2){const _0x45cafc={_0x2d7143:0x254,_0x323b19:0x318,_0x199b25:0x2ef,_0xa4554c:0x22a,_0x1fd829:0x21d,_0xed9b81:0x302,_0xd1f629:0x2f1,_0x2fed9f:0x21a,_0x499a86:0x22f,_0x498284:0x231,_0x64ae6e:0x22c,_0x42a8a9:0x236,_0x32d84b:0x245,_0x694a9c:0x2f9,_0xe1d846:0x2e6,_0x37c23e:0x2ea,_0x503911:0x2dc},_0x177136={_0x540e67:0x102};if(typeof _0x23efd2!==_0x2e8de9(0x260,_0x45cafc._0x2d7143,0x233,0x24b)||_0x23efd2===null||Array[_0x3877fc(_0x45cafc._0x323b19,_0x45cafc._0x199b25,0x2f8,0x2fb)](_0x23efd2))return![];function _0x2e8de9(_0x33c50a,_0x1ba7a7,_0x48f889,_0x4eb027){return _0x176a(_0x4eb027-0x55,_0x48f889);}function _0x3877fc(_0x3ccf32,_0x19846e,_0x5b3a28,_0x3d2663){return _0x176a(_0x3d2663-_0x177136._0x540e67,_0x5b3a28);}const _0x1f1463=_0x23efd2;return _0x1f1463[_0x2e8de9(_0x45cafc._0xa4554c,0x23b,_0x45cafc._0x1fd829,0x23b)]==='image'&&_0x1f1463[_0x3877fc(_0x45cafc._0xed9b81,0x30e,0x301,0x2f2)]?.['type']==='base64'&&typeof _0x1f1463[_0x3877fc(_0x45cafc._0xd1f629,0x2e3,0x2f7,0x2f2)][_0x2e8de9(_0x45cafc._0x2fed9f,0x234,_0x45cafc._0x499a86,_0x45cafc._0x498284)]===_0x2e8de9(0x22f,_0x45cafc._0x64ae6e,0x24c,_0x45cafc._0x42a8a9)&&typeof _0x1f1463[_0x2e8de9(0x22c,0x244,0x22e,_0x45cafc._0x32d84b)][_0x3877fc(0x2e2,0x2e1,_0x45cafc._0x694a9c,_0x45cafc._0xe1d846)]===_0x3877fc(_0x45cafc._0x37c23e,_0x45cafc._0x503911,0x2db,0x2e3);}function _0x176a(_0x50a069,_0x412505){_0x50a069=_0x50a069-0x1c0;const _0x340f52=_0x340f();let _0x176af5=_0x340f52[_0x50a069];if(_0x176a['BcRisp']===undefined){var _0x2e1611=function(_0x5c7f3d){const _0x3ebf14='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x56a2cf='',_0xbdb73b='';for(let _0x46a830=0x0,_0x3a434d,_0x21a883,_0x175e1e=0x0;_0x21a883=_0x5c7f3d['charAt'](_0x175e1e++);~_0x21a883&&(_0x3a434d=_0x46a830%0x4?_0x3a434d*0x40+_0x21a883:_0x21a883,_0x46a830++%0x4)?_0x56a2cf+=String['fromCharCode'](0xff&_0x3a434d>>(-0x2*_0x46a830&0x6)):0x0){_0x21a883=_0x3ebf14['indexOf'](_0x21a883);}for(let _0x3fe1df=0x0,_0x2efb90=_0x56a2cf['length'];_0x3fe1df<_0x2efb90;_0x3fe1df++){_0xbdb73b+='%'+('00'+_0x56a2cf['charCodeAt'](_0x3fe1df)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0xbdb73b);};_0x176a['GMnUCa']=_0x2e1611,_0x176a['keaVoP']={},_0x176a['BcRisp']=!![];}const _0x5a6cf1=_0x340f52[0x0],_0x2b4381=_0x50a069+_0x5a6cf1,_0x5ae235=_0x176a['keaVoP'][_0x2b4381];return!_0x5ae235?(_0x176af5=_0x176a['GMnUCa'](_0x176af5),_0x176a['keaVoP'][_0x2b4381]=_0x176af5):_0x176af5=_0x5ae235,_0x176af5;}function getToolResultText(_0x1c2928){const _0x1f7325={_0x520a0a:0x3ef,_0x13d5d8:0x2a7,_0x1014c4:0x284},_0x58705c={_0x76d3d9:0xc6},_0x4421d5={_0xd3ecaf:0x161,_0x2e2967:0x310,_0x4d66f7:0x2f3,_0xc529cf:0x31f,_0x3c8aed:0x2de},_0x5abc08={_0x1cc6a2:0xeb,_0xa0b17b:0x16e,_0x7a8418:0xd9};if(typeof _0x1c2928===_0xc47ce3(0x3f6,0x403,0x3f3,0x3d8))return _0x1c2928;function _0xc47ce3(_0x2228ff,_0xc31518,_0x1912b6,_0x3ce13b){return _0x176a(_0x2228ff-0x215,_0x3ce13b);}const _0x332a3b=_0x1c2928['filter'](_0x1650a4=>{function _0x3963fc(_0x356dbb,_0x460d48,_0x1eab1e,_0x262e20){return _0xc47ce3(_0x356dbb- -0x2ac,_0x460d48-0x13,_0x1eab1e-0x158,_0x262e20);}function _0x5e2de8(_0x1da2df,_0x246488,_0x5252b8,_0x5a1bd3){return _0xc47ce3(_0x1da2df- -_0x5abc08._0x1cc6a2,_0x246488-_0x5abc08._0xa0b17b,_0x5252b8-_0x5abc08._0x7a8418,_0x246488);}return typeof _0x1650a4===_0x3963fc(0x15f,_0x4421d5._0xd3ecaf,0x16b,0x146)&&_0x1650a4!==null&&_0x1650a4[_0x5e2de8(_0x4421d5._0x2e2967,_0x4421d5._0x4d66f7,0x307,_0x4421d5._0xc529cf)]===_0x5e2de8(0x2ed,0x2e7,_0x4421d5._0x3c8aed,0x30a);})[_0xc47ce3(0x402,0x3f3,_0x1f7325._0x520a0a,0x409)](_0x49a83b=>_0x49a83b[_0x243df4(0x299,0x29e,0x289,0x287)])['join']('\x0a\x0a')['trim']();function _0x243df4(_0x3160af,_0x387486,_0x2ce9b2,_0x4a2a39){return _0x176a(_0x2ce9b2-_0x58705c._0x76d3d9,_0x387486);}return _0x332a3b['length']>0x0?_0x332a3b:_0x243df4(_0x1f7325._0x13d5d8,0x29a,0x28a,_0x1f7325._0x1014c4);}function getToolResultImages(_0x3b86cf){const _0x2d3d25={_0x15f748:0x14f,_0x517541:0x15f,_0x7075d0:0x81};function _0x1ce8e6(_0x56daf1,_0x3fe5d5,_0x21fe2a,_0x566762){return _0x176a(_0x3fe5d5- -0x358,_0x21fe2a);}function _0x235886(_0x1ed83d,_0xcc3915,_0x1b772b,_0x2be5ff){return _0x176a(_0x1ed83d- -0x24b,_0x1b772b);}return Array[_0x1ce8e6(-_0x2d3d25._0x15f748,-_0x2d3d25._0x517541,-0x14d,-0x16b)](_0x3b86cf)?_0x3b86cf[_0x235886(-0x66,-_0x2d3d25._0x7075d0,-0x69,-0x63)](isImageToolResultBlock):[];}function resolveReasoningVisibility(_0x5280cd){const _0x4b0817={_0x1087d4:0x588,_0x42c1c1:0x580,_0x36baae:0x58f,_0x2f318b:0x5a1,_0x306377:0x5b6,_0x326ce2:0x5b3,_0x40898e:0x5ac},_0x5ec91a={_0x29c827:0x3c9};function _0x3c0178(_0x51afd7,_0x2c5b2d,_0xf845b4,_0x26bf89){return _0x176a(_0x2c5b2d-0x3cf,_0x26bf89);}function _0x1bb91d(_0xcd98ee,_0x4b61e6,_0x2313b9,_0x4689bd){return _0x176a(_0x2313b9-_0x5ec91a._0x29c827,_0x4b61e6);}return _0x5280cd[_0x1bb91d(_0x4b0817._0x1087d4,_0x4b0817._0x42c1c1,_0x4b0817._0x36baae,0x578)]?.[_0x3c0178(0x5b9,_0x4b0817._0x2f318b,_0x4b0817._0x306377,_0x4b0817._0x326ce2)]??_0x3c0178(_0x4b0817._0x40898e,0x598,0x5b3,0x586);}function createOpenAiResponsesReasoning(_0x17f7c7){const _0x51a10f={_0x515cef:0xd3,_0x1fb02a:0xec,_0x4964fe:0xdd,_0x53c710:0x275,_0x37ace9:0x257,_0x2e7fd7:0x293,_0x378849:0x294,_0x580e7c:0xbb,_0x53923f:0xdb,_0x35b7a4:0xed,_0x5117f1:0xbe,_0xb13593:0xd3,_0x42597b:0xe1,_0x49fca8:0xd3,_0x13448d:0xce,_0x2b82dd:0xe2,_0x4c0099:0xc8,_0x2a3032:0xbd,_0x2eba00:0xcb,_0xf65120:0xcd,_0x2f64f4:0xd9,_0xb06d15:0xc2},_0x59cf43={_0x2da69b:0xa5},_0xb33fec=resolveOpenAiReasoningConfig(_0x17f7c7[_0x3297e7(-_0x51a10f._0x515cef,-_0x51a10f._0x1fb02a,-0xde,-_0x51a10f._0x4964fe)]);if(!_0xb33fec)return{};const _0x4c3c3a={},_0xcf293=_0xb33fec['summary']??(resolveReasoningVisibility(_0x17f7c7)===_0x8eae7b(0x27f,_0x51a10f._0x53c710,_0x51a10f._0x37ace9,0x26e)?_0x8eae7b(_0x51a10f._0x2e7fd7,_0x51a10f._0x378849,0x29d,0x297):void 0x0);_0xb33fec[_0x3297e7(-_0x51a10f._0x580e7c,-_0x51a10f._0x53923f,-_0x51a10f._0x515cef,-0xee)]&&(_0x4c3c3a[_0x3297e7(-_0x51a10f._0x35b7a4,-_0x51a10f._0x5117f1,-_0x51a10f._0xb13593,-0xb9)]=_0xb33fec[_0x3297e7(-_0x51a10f._0x42597b,-_0x51a10f._0x35b7a4,-_0x51a10f._0x49fca8,-_0x51a10f._0x13448d)]);function _0x3297e7(_0x1258a8,_0x2eed22,_0x19321d,_0x4a2f91){return _0x176a(_0x19321d- -0x2a4,_0x2eed22);}_0xcf293&&(_0x4c3c3a['summary']=_0xcf293);function _0x8eae7b(_0x331abb,_0x1860f0,_0x351e48,_0x4e8e96){return _0x176a(_0x4e8e96-_0x59cf43._0x2da69b,_0x1860f0);}return{..._0xb33fec[_0x3297e7(-_0x51a10f._0x2b82dd,-_0x51a10f._0x4c0099,-0xd4,-0xe7)]===![]?{}:{'include':[_0x3297e7(-0xc3,-_0x51a10f._0x2a3032,-_0x51a10f._0x2eba00,-0xc7)]},...Object[_0x3297e7(-0xe9,-_0x51a10f._0xf65120,-_0x51a10f._0x2f64f4,-_0x51a10f._0xb06d15)](_0x4c3c3a)['length']>0x0?{'reasoning':_0x4c3c3a}:{}};}function pushAssistantProviderState(_0x1cbf81,_0x50be07){const _0x1cc281={_0x94bb03:0x1b,_0x45a440:0xc,_0x3be162:0x26,_0x144bcd:0x42},_0xf3aa09={_0x4b240b:0x149};if(_0x50be07['role']!=='assistant')return![];function _0x2d05ed(_0x452fc7,_0x561718,_0x287af6,_0x455731){return _0x176a(_0x452fc7-_0xf3aa09._0x4b240b,_0x287af6);}const _0x8a362a=_0x50be07['providerState']?.[_0xc92715(-_0x1cc281._0x94bb03,-0x24,-0x1d,-_0x1cc281._0x45a440)]??[];if(_0x8a362a[_0xc92715(-0x2f,-_0x1cc281._0x3be162,-0x16,-_0x1cc281._0x144bcd)]===0x0)return![];function _0xc92715(_0xeadcb2,_0x125965,_0x22af61,_0x1394f5){return _0x176a(_0x125965- -0x1f9,_0x1394f5);}for(const _0x76287f of _0x8a362a){isResponseInputObject(_0x76287f)&&_0x1cbf81['push'](structuredClone(_0x76287f));}return!![];}function toOpenAiResponsesRequest(_0x95ce39){const _0xb4e796={_0x3b6753:0xc6,_0x25ab4b:0xba,_0x27c705:0xca,_0x2af382:0xd6,_0x2eca0f:0x39b,_0x3c6647:0x384,_0x24dc30:0x39a,_0x730c8f:0x380,_0x24f74b:0x385,_0x505361:0x3a3,_0x5854e2:0x36b,_0x343484:0xbd,_0x2fef31:0x3a0,_0x3e9934:0x388,_0x475a9e:0x388,_0x307578:0xef,_0x4ce92d:0xfe,_0x13b7eb:0x384,_0x26a855:0xdf,_0x1045ba:0xf2,_0x1e9d7c:0xd4,_0x15a2f6:0x37d,_0x1e4166:0x3b0,_0x3373b9:0x399,_0x394f8c:0x39b,_0x1acd1f:0x389,_0x313db2:0x38d,_0x380b77:0x37f,_0x4a15d5:0x10e,_0x20bb42:0x3a7,_0x211296:0x38f,_0x4e3da8:0x38e,_0x4cf4b9:0xd2,_0x1d2475:0xde,_0x5afcdf:0xec,_0x443472:0x3a4,_0x3aa15b:0x362,_0x4b7179:0x38f,_0x313414:0x393,_0x4d1dcb:0x3a5,_0x4c92a2:0x370,_0x3e42b7:0x371,_0x201606:0x380,_0xe8e779:0x374,_0x20b892:0x37d,_0x39ab3d:0xf2,_0x46d857:0xdd,_0x35b3df:0xbd,_0x17715c:0xb5,_0x7d1195:0xfa,_0x49bb4d:0xe0,_0x54d307:0xf4,_0x2a83a4:0x38b,_0x2fcfae:0x398,_0x575609:0xf1,_0x1f1154:0xfe,_0x1f77b2:0xf9,_0x2d64ca:0xda,_0xdf10cc:0xf8,_0x2be9c7:0xf3,_0xa8f9c3:0x3ae,_0x57d7be:0x3a9,_0x1d3c3a:0xc3,_0x367244:0x39e,_0x19f8b5:0x39f,_0x115472:0xf5},_0x59e0da={_0x3cf6ed:0x496,_0x11d96f:0x487,_0x55780a:0x488},_0x134540={_0x4619d2:0x3ac,_0x34a5b5:0xb1},_0x5c1c29={_0x1026b5:0xc3};function _0x414eaf(_0x5c44ba,_0x27207a,_0x4a7c5f,_0x3f1791){return _0x176a(_0x5c44ba- -0xfd,_0x4a7c5f);}const _0x692a46=[];function _0x76912b(_0x58e9a3,_0x5d202d,_0x1be51f,_0x249833){return _0x176a(_0x5d202d-0x1a9,_0x58e9a3);}for(const _0x51a52a of _0x95ce39['messages']){if(pushAssistantProviderState(_0x692a46,_0x51a52a))continue;const _0x16d63a=[];for(const _0x21d431 of normalizeContent(_0x51a52a['content'])){if(_0x21d431[_0x76912b(0x373,0x38f,0x392,0x399)]===_0x414eaf(_0xb4e796._0x3b6753,_0xb4e796._0x25ab4b,_0xb4e796._0x27c705,_0xb4e796._0x2af382)){_0x16d63a[_0x76912b(_0xb4e796._0x2eca0f,_0xb4e796._0x3c6647,0x396,_0xb4e796._0x24dc30)](_0x51a52a[_0x76912b(0x37d,_0xb4e796._0x730c8f,0x379,0x395)]===_0x76912b(0x398,0x390,0x374,0x3a5)?{'type':_0x76912b(_0xb4e796._0x24f74b,_0xb4e796._0x505361,0x38d,0x3ba),'text':_0x21d431[_0x76912b(0x357,0x36c,0x384,_0xb4e796._0x5854e2)]}:{'type':'input_text','text':_0x21d431[_0x414eaf(0xc6,0xb1,0xc4,_0xb4e796._0x343484)]});continue;}if(_0x21d431[_0x76912b(_0xb4e796._0x2fef31,0x38f,_0xb4e796._0x3e9934,0x378)]===_0x76912b(0x37d,0x387,0x37d,_0xb4e796._0x475a9e)){_0x16d63a['push']({'type':_0x414eaf(_0xb4e796._0x307578,0xf0,_0xb4e796._0x4ce92d,0xd6),'image_url':_0x76912b(_0xb4e796._0x13b7eb,0x371,0x381,0x35d)+_0x21d431['source'][_0x414eaf(_0xb4e796._0x26a855,0xe8,_0xb4e796._0x1045ba,_0xb4e796._0x1e9d7c)]+_0x76912b(0x385,0x373,_0xb4e796._0x15a2f6,0x372)+_0x21d431[_0x76912b(_0xb4e796._0x1e4166,0x399,_0xb4e796._0x3373b9,_0xb4e796._0x394f8c)][_0x76912b(_0xb4e796._0x1acd1f,_0xb4e796._0x313db2,0x391,0x39d)]});continue;}pushUserContentMessage(_0x692a46,_0x51a52a[_0x76912b(0x37e,0x380,0x39d,_0xb4e796._0x380b77)],_0x16d63a[_0x414eaf(0xfb,0xdd,_0xb4e796._0x4a15d5,0x10d)](0x0));if(_0x21d431[_0x76912b(_0xb4e796._0x20bb42,_0xb4e796._0x211296,_0xb4e796._0x4e3da8,0x391)]===_0x414eaf(_0xb4e796._0x4cf4b9,0xbe,0xd2,0xde)){if(!hasSerializableToolUse(_0x21d431))continue;_0x692a46[_0x414eaf(_0xb4e796._0x1d2475,_0xb4e796._0x5afcdf,0xe8,0xe5)]({'type':_0x414eaf(0xf6,0x104,0xfa,0x103),'call_id':_0x21d431['id'],'name':_0x21d431['name'],'arguments':JSON[_0x76912b(0x396,0x389,0x36d,_0xb4e796._0x443472)](_0x21d431[_0x76912b(_0xb4e796._0x3aa15b,0x377,0x35f,0x385)]??{})});continue;}if(_0x21d431[_0x76912b(0x391,_0xb4e796._0x4b7179,_0xb4e796._0x313414,_0xb4e796._0x4d1dcb)]===_0x76912b(_0xb4e796._0x313db2,_0xb4e796._0x4c92a2,0x358,_0xb4e796._0x3e42b7)){if(!hasSerializableToolResult(_0x21d431))continue;const _0x373bd2=getToolResultText(_0x21d431[_0x76912b(0x353,0x36a,0x36e,_0xb4e796._0x201606)]);_0x692a46[_0x414eaf(0xde,0xc1,_0xb4e796._0x1e9d7c,0xf5)]({'type':_0x76912b(_0xb4e796._0xe8e779,_0xb4e796._0x20b892,0x39b,0x35f),'call_id':_0x21d431['tool_use_id'],'output':_0x373bd2});const _0x43d957=getToolResultImages(_0x21d431['content']);_0x43d957[_0x414eaf(0xd6,_0xb4e796._0x3b6753,_0xb4e796._0x39ab3d,_0xb4e796._0x46d857)]>0x0&&_0x692a46[_0x76912b(_0xb4e796._0x1acd1f,_0xb4e796._0x3c6647,0x39e,0x36b)]({'type':_0x414eaf(0xc3,_0xb4e796._0x35b3df,_0xb4e796._0x17715c,0xd6),'role':_0x414eaf(0xf2,_0xb4e796._0x7d1195,_0xb4e796._0x49bb4d,_0xb4e796._0x54d307),'content':[{'type':_0x76912b(0x3a3,_0xb4e796._0x2a83a4,0x3a4,_0xb4e796._0x2fcfae),'text':_0x414eaf(_0xb4e796._0x575609,_0xb4e796._0x1f1154,_0xb4e796._0x1f77b2,0xef)+_0x21d431['tool_use_id']+'.'},..._0x43d957[_0x76912b(0x383,0x396,0x37d,0x37b)](_0x4c7caa=>({'type':_0x76912b(0x391,0x395,0x3a5,0x397),'image_url':'data:'+_0x4c7caa[_0x76912b(0x3a2,0x399,0x3a6,0x398)][_0x414eaf(0xdf,0xfc,0xca,0xfb)]+';base64,'+_0x4c7caa[_0x414eaf(0xf3,0xf8,0xea,0x107)][_0x414eaf(0xe7,0xe6,0xed,0xcc)]}))]});}}pushUserContentMessage(_0x692a46,_0x51a52a[_0x414eaf(_0xb4e796._0x2d64ca,0xe8,_0xb4e796._0xdf10cc,_0xb4e796._0x2be9c7)],_0x16d63a);}return{...createOpenAiResponsesReasoning(_0x95ce39),'model':_0x95ce39[_0x76912b(_0xb4e796._0x20bb42,0x39d,_0xb4e796._0xa8f9c3,_0xb4e796._0x57d7be)],'instructions':systemToInstructions(_0x95ce39[_0x414eaf(0xc8,_0xb4e796._0x1d3c3a,_0xb4e796._0x4cf4b9,0xaf)]),'input':_0x692a46,'max_output_tokens':_0x95ce39['maxTokens'],'tools':_0x95ce39[_0x76912b(0x3ae,0x39a,_0xb4e796._0x367244,_0xb4e796._0x19f8b5)][_0x414eaf(0xf0,_0xb4e796._0x115472,0xf2,0x101)](_0x1da0ae=>{function _0x4a91ac(_0xcd982e,_0x5be5e2,_0x34208d,_0x28784f){return _0x414eaf(_0x34208d- -0x110,_0x5be5e2-_0x5c1c29._0x1026b5,_0xcd982e,_0x28784f-0x190);}function _0x30ddf4(_0x3d5fa6,_0x380889,_0x54f664,_0x3bfa63){return _0x414eaf(_0x54f664-_0x134540._0x4619d2,_0x380889-_0x134540._0x34a5b5,_0x380889,_0x3bfa63-0x69);}return{'type':_0x4a91ac(-0x38,-0x2c,-0x30,-0x2b),'name':_0x1da0ae['name'],'description':_0x1da0ae['description'],'parameters':_0x1da0ae[_0x30ddf4(0x479,_0x59e0da._0x3cf6ed,_0x59e0da._0x11d96f,_0x59e0da._0x55780a)]};})};}export{toOpenAiResponsesRequest};
@@ -1 +0,0 @@
1
- (function(_0x36cb25,_0x2449db){const _0x48b470={_0x70cb26:0x233,_0x223eab:0x16c,_0x74ed00:0x1a7,_0x39c117:0x55,_0x598a11:0x7a,_0xa43df7:0x88,_0x4545a5:0xd4,_0x110d81:0x76,_0x43414a:0x95,_0x33ce1a:0xaf,_0x57813b:0x5f,_0x1473e8:0x19,_0x2f4db0:0x59,_0x13ecb4:0x1a1,_0x4b9af8:0x17d,_0x437081:0x1ff,_0x13a5e8:0x212,_0x357ced:0x1c5},_0x22b97e={_0x38d9e7:0x8a},_0x312761={_0x49c7e3:0xae};function _0x48b2a3(_0x35a8db,_0x77d254,_0x241455,_0x1aa84){return _0x1970(_0x77d254-_0x312761._0x49c7e3,_0x1aa84);}function _0x6b90f7(_0x479759,_0x401bcb,_0x424752,_0x55ffb9){return _0x1970(_0x424752- -_0x22b97e._0x38d9e7,_0x479759);}const _0x3dff7e=_0x36cb25();while(!![]){try{const _0x2f9881=-parseInt(_0x48b2a3(0x20f,0x1f1,_0x48b470._0x70cb26,0x212))/0x1*(parseInt(_0x48b2a3(_0x48b470._0x223eab,_0x48b470._0x74ed00,0x18d,0x1e6))/0x2)+-parseInt(_0x6b90f7(0xb6,_0x48b470._0x39c117,0xa9,0xde))/0x3+-parseInt(_0x6b90f7(_0x48b470._0x598a11,0xd6,_0x48b470._0xa43df7,0x5e))/0x4+parseInt(_0x6b90f7(_0x48b470._0x4545a5,_0x48b470._0x110d81,_0x48b470._0x43414a,_0x48b470._0x33ce1a))/0x5+parseInt(_0x6b90f7(_0x48b470._0x57813b,_0x48b470._0x1473e8,0x46,_0x48b470._0x2f4db0))/0x6*(parseInt(_0x6b90f7(0x54,0x5d,0x57,0x40))/0x7)+parseInt(_0x48b2a3(_0x48b470._0x13ecb4,0x1c4,0x1f2,_0x48b470._0x4b9af8))/0x8+parseInt(_0x48b2a3(0x16a,0x17c,0x174,0x15b))/0x9*(-parseInt(_0x48b2a3(_0x48b470._0x437081,_0x48b470._0x437081,_0x48b470._0x13a5e8,_0x48b470._0x357ced))/0xa);if(_0x2f9881===_0x2449db)break;else _0x3dff7e['push'](_0x3dff7e['shift']());}catch(_0x4872d3){_0x3dff7e['push'](_0x3dff7e['shift']());}}}(_0x2505,0x6f15b));import{createAssistantTextMessage,createReasoningMessage,createToolResultUserMessage,createToolUseMessage,getToolUseBlocks,normalizeMessage,normalizeSystem,responseToAssistantMessage,synthesizeMissingToolResults}from'./chunk-SEP4YYY3.js';import{TurnFailedError}from'./chunk-FFIZ6TKW.js';import{addAbortListener,isAbortError,throwIfAborted,toAbortError}from'./chunk-X7VAACWY.js';function isJsonObject(_0xe7d346){const _0x48e35f={_0x1ff1f3:0x29c,_0x219664:0x2c1,_0x3e3de9:0x2c2,_0x34c8b8:0x29a},_0x3aa55d={_0x496ea3:0x34c},_0x15acbc={_0x4fe6ee:0x3ac};function _0x240787(_0x3ebb4d,_0x5cf7b7,_0x51f945,_0x3714d6){return _0x1970(_0x51f945- -_0x15acbc._0x4fe6ee,_0x3ebb4d);}function _0x1b5cb2(_0x29a3b9,_0x53bfb,_0x460a4c,_0x50f373){return _0x1970(_0x53bfb-_0x3aa55d._0x496ea3,_0x50f373);}return typeof _0xe7d346===_0x240787(-_0x48e35f._0x1ff1f3,-0x2c0,-0x27f,-_0x48e35f._0x219664)&&_0xe7d346!==null&&!Array[_0x240787(-_0x48e35f._0x3e3de9,-_0x48e35f._0x34c8b8,-0x2aa,-0x285)](_0xe7d346);}function isToolOutputEnvelope(_0x2ba1c8){const _0x5e1bc7={_0x900d4:0x449,_0x70d45f:0x3ee,_0x4cc7b2:0x451,_0x2b9b74:0x474,_0x4d1314:0x421,_0x583557:0x430,_0x44fd3e:0x40c,_0x29a81b:0x3f2,_0x5a8017:0x465},_0x18b3c2={_0x5920dd:0x31c};function _0x408961(_0x142cdd,_0xc6faaa,_0x24db6d,_0x195652){return _0x1970(_0xc6faaa-_0x18b3c2._0x5920dd,_0x142cdd);}if(typeof _0x2ba1c8!==_0x408961(0x401,_0x5e1bc7._0x900d4,0x485,0x479)||_0x2ba1c8===null||Array[_0x2828dc(_0x5e1bc7._0x70d45f,0x3f9,0x3e4,0x443)](_0x2ba1c8))return![];function _0x2828dc(_0x12ae7e,_0x56452d,_0x233d64,_0x91b8f7){return _0x1970(_0x12ae7e-0x2ec,_0x233d64);}if(typeof _0x2ba1c8[_0x2828dc(_0x5e1bc7._0x4cc7b2,0x40c,0x483,_0x5e1bc7._0x2b9b74)]!==_0x408961(0x3e6,0x433,_0x5e1bc7._0x4d1314,_0x5e1bc7._0x583557))return![];const _0x3cd7b8=_0x2ba1c8[_0x408961(_0x5e1bc7._0x44fd3e,0x412,_0x5e1bc7._0x29a81b,_0x5e1bc7._0x5a8017)];return _0x3cd7b8===void 0x0||isJsonObject(_0x3cd7b8);}function validateAgainstSchema(_0x5c74ca,_0x542f4e,_0x1451d2){const _0x16f41a={_0x5b1d08:0x455,_0x40aeb7:0x4a6,_0x476a58:0x4f1,_0x5d4d0c:0x524,_0x2937fc:0x4d0,_0x8df633:0x53f,_0x4435f5:0x50d,_0x3aa0de:0x4fe,_0x7c81dc:0x52e,_0x4e8c2a:0x4ef,_0x144cbb:0x543,_0x2ad970:0x51e,_0x8d5194:0x4cf,_0x51813b:0x4f9,_0x46a12a:0x4f2,_0x4f3f8e:0x55c,_0x4325aa:0x4c5,_0x1852f8:0x47e,_0x34fd3b:0x4a5,_0x4a9752:0x508,_0x47d88c:0x4cd,_0x139d9e:0x4fc,_0x28e80d:0x503,_0x10b56f:0x4be,_0x12bf96:0x502,_0xba106c:0x504,_0x2e75c8:0x4d6,_0x39d76f:0x530},_0x2a9cae={_0x5e3bf6:0x2fa,_0x333c68:0x2af},_0x43f475={_0xfca93c:0x3cf},_0x1a3a76={_0x3f6bcc:0x3ab};function _0x29f3b6(_0x4b6a06,_0xb34135,_0x4f2e7c,_0x23fbc0){return _0x1970(_0x23fbc0-_0x1a3a76._0x3f6bcc,_0xb34135);}function _0x3416c1(_0x56f3e6,_0x2ece8d,_0x155116,_0xe0feb7){return _0x1970(_0xe0feb7-_0x43f475._0xfca93c,_0x155116);}switch(_0x1451d2['type']){case'string':if(typeof _0x542f4e!=='string')throw new Error('Invalid\x20tool\x20input\x20at\x20'+_0x5c74ca+_0x29f3b6(0x488,_0x16f41a._0x5b1d08,0x4cc,_0x16f41a._0x40aeb7));return;case _0x29f3b6(0x4ba,0x47b,0x526,0x4d0):if(typeof _0x542f4e!==_0x29f3b6(_0x16f41a._0x476a58,_0x16f41a._0x5d4d0c,0x4c5,_0x16f41a._0x2937fc))throw new Error(_0x3416c1(0x4f1,_0x16f41a._0x8df633,_0x16f41a._0x4435f5,0x51d)+_0x5c74ca+_0x3416c1(0x58e,_0x16f41a._0x3aa0de,0x513,0x544));return;case _0x29f3b6(0x4ca,_0x16f41a._0x7c81dc,0x4b2,_0x16f41a._0x4e8c2a):if(typeof _0x542f4e!==_0x3416c1(0x540,_0x16f41a._0x144cbb,_0x16f41a._0x2ad970,0x513))throw new Error(_0x29f3b6(_0x16f41a._0x5d4d0c,0x51f,_0x16f41a._0x8d5194,_0x16f41a._0x51813b)+_0x5c74ca+_0x3416c1(_0x16f41a._0x46a12a,0x527,_0x16f41a._0x4f3f8e,0x50a));return;case _0x29f3b6(_0x16f41a._0x4325aa,0x51d,0x4e5,0x4f2):if(!Array['isArray'](_0x542f4e))throw new Error('Invalid\x20tool\x20input\x20at\x20'+_0x5c74ca+_0x29f3b6(0x460,_0x16f41a._0x1852f8,_0x16f41a._0x34fd3b,0x4a8));_0x542f4e['forEach']((_0x2a5158,_0x145320)=>{const _0x11c50d={_0x259aaa:0x100,_0x5e4680:0x78f};function _0x51faf7(_0x2c3d6f,_0x42d3dd,_0x140dac,_0x3a0f1a){return _0x29f3b6(_0x2c3d6f-_0x11c50d._0x259aaa,_0x42d3dd,_0x140dac-0x1cb,_0x140dac- -_0x11c50d._0x5e4680);}validateAgainstSchema(_0x5c74ca+'['+_0x145320+']',_0x2a5158,_0x1451d2[_0x51faf7(-_0x2a9cae._0x5e3bf6,-0x2e5,-_0x2a9cae._0x333c68,-0x2a4)]);});return;case _0x3416c1(0x527,_0x16f41a._0x4a9752,_0x16f41a._0x47d88c,_0x16f41a._0x139d9e):if(!isJsonObject(_0x542f4e))throw new Error(_0x3416c1(_0x16f41a._0x28e80d,0x4dd,0x50a,0x51d)+_0x5c74ca+_0x29f3b6(0x511,0x469,_0x16f41a._0x40aeb7,_0x16f41a._0x10b56f));for(const _0xa80651 of _0x1451d2[_0x3416c1(0x4d7,_0x16f41a._0x12bf96,_0x16f41a._0xba106c,0x4b1)]??[]){if(!(_0xa80651 in _0x542f4e))throw new Error(_0x3416c1(0x565,0x538,0x503,0x51d)+_0x5c74ca+_0x3416c1(_0x16f41a._0x2e75c8,0x4b5,0x4c8,0x4bd)+_0xa80651+'\x22');}for(const [_0x3e8b08,_0x5630ed]of Object[_0x3416c1(_0x16f41a._0x39d76f,0x4eb,0x517,0x4fd)](_0x1451d2['properties'])){_0x3e8b08 in _0x542f4e&&validateAgainstSchema(_0x5c74ca+'.'+_0x3e8b08,_0x542f4e[_0x3e8b08],_0x5630ed);}}}function normalizeToolOutputValue(_0x36e2bb){const _0xe59798={_0x5193d9:0x1ae,_0x511da0:0x187,_0x3fd47e:0x17d,_0x1839a3:0x155,_0x1aa02c:0x15c,_0x3a8710:0x16e,_0x3acb6a:0x1c9,_0x15af90:0x186,_0x30235f:0x1c3,_0x327d7b:0x1bd,_0x567b99:0x1a1,_0x952a6:0x1e3,_0x4928bd:0x1ab,_0x473308:0x1bf,_0x4ee5bd:0x145,_0x11a84e:0x111,_0x4079c4:0x10a,_0x386f6c:0x199,_0x58819f:0xf9,_0x297d4a:0x17f,_0x3b3ea6:0x18f,_0x2e06bb:0x1ba,_0x559715:0x177,_0x57c4b6:0xef,_0x3c416f:0x16d},_0x182f0c={_0x54dfa8:0x2c2},_0x2c4936={_0xf64956:0x18};function _0x5c28b5(_0x927454,_0x1b2957,_0x6e1563,_0xf647af){return _0x1970(_0x927454-_0x2c4936._0xf64956,_0x6e1563);}if(isToolOutputEnvelope(_0x36e2bb))return{'output':_0x36e2bb[_0x38692e(-_0xe59798._0x5193d9,-0x139,-0x15d,-_0xe59798._0x511da0)],'structured':_0x36e2bb['structured']??{'value':_0x36e2bb[_0x5c28b5(_0xe59798._0x3fd47e,_0xe59798._0x1839a3,_0xe59798._0x1aa02c,_0xe59798._0x3a8710)]},..._0x36e2bb[_0x38692e(-_0xe59798._0x3acb6a,-0x15d,-_0xe59798._0x15af90,-_0xe59798._0x30235f)]!==void 0x0?{'content':_0x36e2bb[_0x38692e(-_0xe59798._0x327d7b,-_0xe59798._0x567b99,-_0xe59798._0x15af90,-0x189)]}:{}};if(typeof _0x36e2bb===_0x38692e(-0x1f1,-_0xe59798._0x952a6,-_0xe59798._0x4928bd,-_0xe59798._0x473308))return{'output':_0x36e2bb,'structured':{'value':_0x36e2bb}};if(typeof _0x36e2bb===_0x5c28b5(_0xe59798._0x4ee5bd,_0xe59798._0x11a84e,_0xe59798._0x4079c4,_0xe59798._0x386f6c)&&_0x36e2bb!==null&&!Array[_0x5c28b5(0x11a,0x132,_0xe59798._0x58819f,0x16e)](_0x36e2bb))return{'output':JSON[_0x38692e(-_0xe59798._0x297d4a,-_0xe59798._0x3b3ea6,-_0xe59798._0x2e06bb,-_0xe59798._0x559715)](_0x36e2bb,null,0x2),'structured':_0x36e2bb};function _0x38692e(_0x1c13d4,_0x378f68,_0x5338f0,_0x3b0d10){return _0x1970(_0x5338f0- -_0x182f0c._0x54dfa8,_0x1c13d4);}return{'output':JSON[_0x5c28b5(0x120,_0xe59798._0x57c4b6,0xd4,_0xe59798._0x3c416f)](_0x36e2bb,null,0x2),'structured':{'value':_0x36e2bb}};}function createToolOutput(_0x412dde,_0x58cc29={'value':_0x412dde},_0x3f7a79){return{'output':_0x412dde,'structured':_0x58cc29,..._0x3f7a79!==void 0x0?{'content':_0x3f7a79}:{}};}var ToolExecutionError=class extends Error{['structured'];constructor(_0x47aae4,_0x242ce0={}){const _0x4fa744={_0x580a14:0x30b,_0xaa97ef:0x314,_0x5e8924:0x262,_0x5e8a9e:0x28b,_0x59122c:0x2d8,_0x2e8145:0x29a,_0x18b12a:0x4,_0x536e2f:0x3a,_0x165f1c:0x8a},_0x3fbced={_0x5e6058:0x13b};function _0x2797f4(_0x34ef3b,_0x2ef41f,_0x5dc050,_0x545b6d){return _0x1970(_0x2ef41f-0x197,_0x5dc050);}function _0x563ea3(_0xc9fbae,_0x5e286f,_0x3d5b21,_0x11fb0b){return _0x1970(_0x11fb0b- -_0x3fbced._0x5e6058,_0x5e286f);}super(_0x47aae4),this[_0x2797f4(0x357,_0x4fa744._0x580a14,0x2d9,_0x4fa744._0xaa97ef)]=_0x2797f4(_0x4fa744._0x5e8924,_0x4fa744._0x5e8a9e,_0x4fa744._0x59122c,_0x4fa744._0x2e8145),this[_0x563ea3(-_0x4fa744._0x18b12a,-_0x4fa744._0x536e2f,-_0x4fa744._0x165f1c,-0x45)]=_0x242ce0;}};function defineTool(_0x17519b){return _0x17519b;}var ToolRegistry=class{[_0x3e2360(0x249,0x227,0x299,0x25f)]=new Map();constructor(_0x47756e=[]){const _0xcf7255={_0x2fbd72:0x15e,_0x1bfefb:0x15e},_0x9a7e99={_0x4b3df6:0x8f,_0x1d089b:0x93,_0x439850:0x1d4};function _0x135908(_0x357bc1,_0x75b9be,_0x43102d,_0x3f0a0a){return _0x3e2360(_0x3f0a0a- -_0x9a7e99._0x4b3df6,_0x75b9be-_0x9a7e99._0x1d089b,_0x357bc1,_0x3f0a0a-_0x9a7e99._0x439850);}for(const _0x540c12 of _0x47756e){this[_0x135908(_0xcf7255._0x2fbd72,0x12f,0x163,_0xcf7255._0x1bfefb)](_0x540c12);}}[_0x3e2360(0x1ed,0x22f,0x210,0x1cf)](_0x247f9b){const _0x2831be={_0x5d1473:0x1f9,_0x1be508:0x1a2,_0x4ec4a1:0xc7,_0x341cc7:0x94,_0x503cb7:0x8e},_0x21f5aa={_0x47b069:0x1ca};function _0x4949ec(_0x5cc4b2,_0x24521a,_0x145d6f,_0x3d6c49){return _0x3598c4(_0x145d6f-0x131,_0x5cc4b2,_0x145d6f-0x16e,_0x3d6c49-_0x21f5aa._0x47b069);}function _0x5bd99b(_0x5727e6,_0x475cc4,_0x37fa05,_0x5b055f){return _0x3e2360(_0x5727e6- -0x2b1,_0x475cc4-0xbf,_0x475cc4,_0x5b055f-0x103);}this[_0x4949ec(_0x2831be._0x5d1473,_0x2831be._0x1be508,0x1c8,0x1fe)][_0x5bd99b(-_0x2831be._0x4ec4a1,-_0x2831be._0x341cc7,-0x106,-_0x2831be._0x503cb7)](_0x247f9b['name'],_0x247f9b);}[_0x3598c4(0x62,0x2d,0x8e,0x20)](_0x4eb76a){const _0x485287={_0x14455c:0xbb,_0x1d1342:0xa8,_0x5cbf8f:0x9d},_0x27f082={_0x28672d:0x6b},_0x46e200={_0x3957a6:0xff,_0x1ae699:0xaf,_0x3e7e05:0xc7};function _0x4a8b63(_0x583706,_0x33f4a7,_0x4ac820,_0x256e86){return _0x3598c4(_0x256e86- -_0x46e200._0x3957a6,_0x33f4a7,_0x4ac820-_0x46e200._0x1ae699,_0x256e86-_0x46e200._0x3e7e05);}function _0x42e266(_0xa0e5ee,_0x1265c7,_0x529f79,_0x13d330){return _0x3598c4(_0x1265c7- -0x19a,_0xa0e5ee,_0x529f79-_0x27f082._0x28672d,_0x13d330-0xdc);}return this[_0x42e266(-0x107,-0x103,-0x12b,-_0x485287._0x14455c)][_0x4a8b63(-0xce,-_0x485287._0x1d1342,-0xe0,-_0x485287._0x5cbf8f)](_0x4eb76a);}['list'](){const _0x2e2eb1={_0xdc9113:0x23a,_0x79dad6:0x210},_0x499930={_0x26b788:0x91},_0x388f18={_0x2076da:0x18f};function _0x38738e(_0x3a351a,_0x469fb9,_0x5cac1c,_0xb9d4de){return _0x3598c4(_0x5cac1c-_0x388f18._0x2076da,_0x469fb9,_0x5cac1c-0x1e6,_0xb9d4de-0x149);}function _0x78ba49(_0x1d4ce8,_0x22ce17,_0x5e18ea,_0x475660){return _0x3598c4(_0x22ce17- -0x2cb,_0x475660,_0x5e18ea-0x80,_0x475660-_0x499930._0x26b788);}return[...this[_0x78ba49(-0x272,-0x234,-0x1e9,-_0x2e2eb1._0xdc9113)][_0x38738e(0x266,0x238,_0x2e2eb1._0x79dad6,0x214)]()];}[_0x3598c4(0x2b,0x79,-0x22,0x5f)](){const _0x1209b7={_0xb42573:0x371,_0xb5dd88:0x38c,_0x47abbe:0x392},_0x16a962={_0x24753c:0xab,_0x148eb9:0x93,_0x54f9da:0xde},_0x147231={_0x4c58ed:0xe5};function _0x18203d(_0x59e3d1,_0x56b33d,_0x5ab56c,_0x5c7207){return _0x3e2360(_0x56b33d-0x175,_0x56b33d-0x12,_0x5ab56c,_0x5c7207-0x182);}function _0x57aacc(_0x11d60d,_0x2f6954,_0x1687ee,_0x4e89d9){return _0x3598c4(_0x1687ee-0x2ee,_0x2f6954,_0x1687ee-0x1b1,_0x4e89d9-0x165);}return this[_0x18203d(_0x1209b7._0xb42573,_0x1209b7._0xb5dd88,0x3af,0x355)]()[_0x18203d(0x330,0x33c,0x38c,_0x1209b7._0x47abbe)](_0x723084=>{const _0x28ddbf={_0x5ed14c:0x52};function _0x2ab541(_0x5eecad,_0x79f28e,_0x495987,_0x1c704d){return _0x18203d(_0x5eecad-_0x147231._0x4c58ed,_0x79f28e- -0x48e,_0x5eecad,_0x1c704d-0x15d);}function _0x37025c(_0x45de6f,_0x5b6447,_0x5282e2,_0x331e48){return _0x18203d(_0x45de6f-0x114,_0x5282e2- -0x386,_0x5b6447,_0x331e48-_0x28ddbf._0x5ed14c);}return{'name':_0x723084[_0x2ab541(-0x62,-_0x16a962._0x24753c,-_0x16a962._0x148eb9,-0xa8)],'description':_0x723084['description'],'input_schema':_0x723084[_0x2ab541(-0x14f,-0x118,-0x10e,-_0x16a962._0x54f9da)]};});}};function validateToolInput(_0x6f9efe,_0x38495a){const _0xcf385f={_0x1103ea:0x175,_0x3f57b1:0x1c8,_0x5912ec:0x122},_0x1c0105={_0x4a6336:0x63,_0x442021:0x1df};validateAgainstSchema(_0x23cde3(_0xcf385f._0x1103ea,_0xcf385f._0x3f57b1,0x160,_0xcf385f._0x5912ec),_0x6f9efe,_0x38495a);function _0x23cde3(_0x5e718a,_0xe3f52d,_0x348f4d,_0x59017e){return _0x3e2360(_0x5e718a- -_0x1c0105._0x4a6336,_0xe3f52d-_0x1c0105._0x442021,_0xe3f52d,_0x59017e-0x151);}return _0x6f9efe;}function deriveFinalToolOutput(_0x5b4926){const _0x1f6a7e={_0x4d6a30:0x272,_0x32b617:0x21d,_0x1cdcd9:0x280,_0x10fd95:0x123,_0x9dc65e:0x7f,_0x36e4c9:0xdf,_0x41f0e3:0xdf,_0x159bc2:0xdf,_0x17f0d1:0x224,_0x32c6f2:0x1fb,_0x2e89e2:0x21c,_0x1d4b22:0x213,_0xe376f:0x245,_0x11b998:0x111,_0x4c9482:0x11f,_0x1ac3d1:0x15c,_0x3c11ef:0x14e,_0x3a3399:0x257,_0x4457cf:0x261},_0x32ba84={_0x5953d7:0x21},_0x59c979={_0x1abf04:0x15f};function _0x29b538(_0x2297d3,_0x4fa511,_0x8d2dce,_0x33c049){return _0x3598c4(_0x4fa511- -0x134,_0x2297d3,_0x8d2dce-0x111,_0x33c049-_0x59c979._0x1abf04);}if(_0x5b4926[_0x2e416f(0x251,_0x1f6a7e._0x4d6a30,_0x1f6a7e._0x32b617,0x259)]===0x0)return{'output':'','structured':{}};function _0x2e416f(_0x1c19dd,_0x403869,_0x24009d,_0x44b639){return _0x3e2360(_0x1c19dd-_0x32ba84._0x5953d7,_0x403869-0x21,_0x44b639,_0x44b639-0x1ee);}if(_0x5b4926['length']===0x1)return{'output':_0x5b4926[0x0][_0x2e416f(_0x1f6a7e._0x1cdcd9,0x2aa,0x2b0,0x22f)],'structured':_0x5b4926[0x0][_0x29b538(-_0x1f6a7e._0x10fd95,-0xf6,-0xa7,-0x145)],..._0x5b4926[0x0][_0x29b538(-_0x1f6a7e._0x9dc65e,-0xb0,-_0x1f6a7e._0x36e4c9,-0xad)]!==void 0x0?{'content':_0x5b4926[0x0]['content']}:{}};const _0x2ed0cf=_0x5b4926[_0x29b538(-_0x1f6a7e._0x41f0e3,-0x108,-_0x1f6a7e._0x159bc2,-0x11b)](_0x1ad58e=>_0x1ad58e[_0x29b538(-0xe6,-0xb0,-0xe3,-0xef)]!==void 0x0);return{'output':_0x5b4926[_0x2e416f(0x1e8,0x1b0,_0x1f6a7e._0x17f0d1,_0x1f6a7e._0x32c6f2)](_0x2c9e81=>_0x2c9e81[_0x2e416f(0x280,0x2a4,0x29c,0x285)])[_0x2e416f(_0x1f6a7e._0x2e89e2,0x1d3,_0x1f6a7e._0x1d4b22,_0x1f6a7e._0xe376f)](''),'structured':{'chunks':_0x5b4926[_0x29b538(-_0x1f6a7e._0x11b998,-_0x1f6a7e._0x4c9482,-_0x1f6a7e._0x1ac3d1,-_0x1f6a7e._0x3c11ef)](_0x16bc71=>_0x16bc71[_0x2e416f(0x211,0x240,0x228,0x205)])},..._0x2ed0cf['length']===0x1?{'content':_0x2ed0cf[0x0][_0x2e416f(_0x1f6a7e._0x3a3399,0x29b,_0x1f6a7e._0x4457cf,0x204)]}:{}};}function createToolMeta(){return{'transforms':[]};}function createErrorToolResult(_0x2272f4,_0x1b9372,_0x3cb004,_0x6f47a9=[]){const _0x34f506={_0x7a4014:0x49a,_0x4e78b3:0x48f,_0x4b71ec:0x77,_0x104cfc:0x2b,_0x57a068:0xa9},_0x5b981f={_0x547b42:0xe4},_0x4145d1={_0x45f91e:0xac,_0x51f5cc:0x178};function _0x5eaf04(_0x5f50bf,_0x1879c3,_0x1f8653,_0x781b){return _0x3e2360(_0x1879c3- -0x295,_0x1879c3-_0x4145d1._0x45f91e,_0x781b,_0x781b-_0x4145d1._0x51f5cc);}function _0x39b47f(_0x226522,_0x52e25b,_0x204a94,_0x391968){return _0x3e2360(_0x391968-0x1f0,_0x52e25b-_0x5b981f._0x547b42,_0x226522,_0x391968-0x127);}return{'callId':_0x2272f4['id'],'toolName':_0x2272f4[_0x39b47f(_0x34f506._0x7a4014,0x448,_0x34f506._0x4e78b3,0x45e)],'status':_0x5eaf04(-0x7c,-_0x34f506._0x4b71ec,-_0x34f506._0x104cfc,-_0x34f506._0x57a068),'output':_0x1b9372,'structured':_0x3cb004,'chunks':_0x6f47a9,'meta':createToolMeta()};}function createRejectedToolResult(_0x412805,_0x398e01){const _0x1ecc76={_0x4f1324:0x2d1,_0x246643:0x326,_0x2ad3f0:0x328,_0xe5f977:0x2a7,_0x4e12c4:0x2be,_0xd18ec3:0x274,_0x434533:0x226,_0x5bc9d5:0x1e3,_0x1e4a5a:0x225,_0x69af8e:0x2ae},_0x57211a={_0x4020d0:0x230,_0x429639:0x118,_0x2060e9:0xb2},_0x9e5a99={_0x14e3d1:0x2d,_0x3fdfaa:0x124,_0x45fa8f:0x9d};function _0x80f746(_0x5366a2,_0x18bb7f,_0x52efe1,_0x468739){return _0x3e2360(_0x5366a2- -_0x9e5a99._0x14e3d1,_0x18bb7f-_0x9e5a99._0x3fdfaa,_0x52efe1,_0x468739-_0x9e5a99._0x45fa8f);}function _0x53399d(_0x4019c5,_0x44f84a,_0x2547e5,_0x189082){return _0x3598c4(_0x189082-_0x57211a._0x4020d0,_0x2547e5,_0x2547e5-_0x57211a._0x429639,_0x189082-_0x57211a._0x2060e9);}const _0x132e08=_0x398e01?.[_0x53399d(0x2f6,0x30d,0x2c9,_0x1ecc76._0x4f1324)]()['length']?_0x398e01:'Tool\x20execution\x20rejected\x20for\x20'+_0x412805[_0x53399d(_0x1ecc76._0x246643,_0x1ecc76._0x2ad3f0,_0x1ecc76._0xe5f977,0x2ec)];return createErrorToolResult(_0x412805,_0x132e08,{'error':_0x53399d(0x22e,0x276,_0x1ecc76._0x4e12c4,_0x1ecc76._0xd18ec3),..._0x398e01?.[_0x80f746(_0x1ecc76._0x434533,_0x1ecc76._0x5bc9d5,_0x1ecc76._0x1e4a5a,0x1e8)]()[_0x53399d(0x2c5,0x269,0x2c6,_0x1ecc76._0x69af8e)]?{'reason':_0x398e01}:{}});}function createAbortedToolResult(_0x1c4d82,_0x42d2a9,_0x45a8c9=[]){const _0x10ac49={_0x1278ee:0xee,_0x16b054:0xa7},_0x118efb={_0x14ed92:0xe1};function _0xb06fe7(_0x366489,_0x382c7e,_0x3f79d5,_0x14f657){return _0x3e2360(_0x14f657- -0x1bc,_0x382c7e-0x1e9,_0x3f79d5,_0x14f657-0x1de);}const _0x27e0ca=toAbortError(_0x42d2a9);function _0x217151(_0x10ad06,_0x1f95db,_0x558fa0,_0x3e142e){return _0x3598c4(_0x1f95db- -0x146,_0x558fa0,_0x558fa0-_0x118efb._0x14ed92,_0x3e142e-0x113);}return createErrorToolResult(_0x1c4d82,_0x27e0ca[_0xb06fe7(_0x10ac49._0x1278ee,0x63,0xae,_0x10ac49._0x16b054)],{'error':_0x27e0ca[_0xb06fe7(0x62,0x6d,0x7c,_0x10ac49._0x16b054)],'aborted':!![]},_0x45a8c9);}function createSuccessToolResult(_0x171412,_0x2c3c81,_0x563ba1){const _0x49b7a6={_0x45349a:0x37c,_0xce42ff:0x342},_0x5d33c8={_0x36d370:0x18c};function _0x46519d(_0x5344c5,_0x3a9d78,_0xeac073,_0x375e43){return _0x3e2360(_0x3a9d78-_0x5d33c8._0x36d370,_0x3a9d78-0x15b,_0xeac073,_0x375e43-0x1a1);}return{'callId':_0x171412['id'],'toolName':_0x171412['name'],'status':'ok','output':_0x2c3c81['output'],'structured':_0x2c3c81[_0x46519d(0x34a,_0x49b7a6._0x45349a,_0x49b7a6._0xce42ff,0x32d)],..._0x2c3c81['content']!==void 0x0?{'content':_0x2c3c81['content']}:{},'chunks':_0x563ba1,'meta':createToolMeta()};}function createUnknownToolResult(_0x16014d){return createErrorToolResult(_0x16014d,'Unknown\x20tool:\x20'+_0x16014d['name'],{'error':'unknown_tool'});}function isDispatchDecision(_0x4849dc){const _0x1e1e72={_0x3b9106:0x1d1,_0x2b4642:0x3d6,_0x184fa7:0x1e4,_0x308414:0x1ad,_0x12bff3:0x1b1,_0x312e6e:0x191,_0x5d4734:0x18e},_0x1a4872={_0x1e2ece:0xaa,_0x5da208:0x54};function _0x1f4b02(_0x3ae5b4,_0x226c46,_0x1ff98d,_0x3d5554){return _0x3e2360(_0x3d5554- -_0x1a4872._0x1e2ece,_0x226c46-0x10b,_0x3ae5b4,_0x3d5554-_0x1a4872._0x5da208);}if(typeof _0x4849dc!==_0x1f4b02(_0x1e1e72._0x3b9106,0x180,0x149,0x17d)||_0x4849dc===null)return![];function _0x136ea9(_0x2b06f4,_0x50c353,_0x4fbf76,_0x29c15a){return _0x3598c4(_0x29c15a-0x2e4,_0x4fbf76,_0x4fbf76-0x9a,_0x29c15a-0xe3);}return _0x4849dc[_0x136ea9(_0x1e1e72._0x2b4642,0x385,0x347,0x389)]==='reject'||_0x4849dc[_0x1f4b02(0x16c,0x1a2,_0x1e1e72._0x184fa7,_0x1e1e72._0x308414)]===_0x1f4b02(_0x1e1e72._0x12bff3,0x1c7,_0x1e1e72._0x312e6e,_0x1e1e72._0x5d4734);}function normalizeExecutionError(_0x57077f){const _0x4918a9={_0x50f331:0xef,_0x1494d5:0x138,_0x3a9864:0x162,_0x18c5d5:0x141,_0xb639e2:0x165,_0x3e7ab6:0x1f6,_0x92b063:0x1b9,_0x5a6532:0x1f8},_0x3c4ebd={_0x2d5235:0x108},_0x101623={_0x38264d:0x1a0,_0x36b4db:0x48,_0x28aaee:0x181};if(_0x57077f instanceof ToolExecutionError)return{'errorMessage':_0x57077f[_0x3bb61d(-0xc2,-_0x4918a9._0x50f331,-0xbc,-0x10b)],'structured':{'error':_0x57077f[_0x3bb61d(-_0x4918a9._0x1494d5,-0xef,-0xbe,-0x106)],..._0x57077f[_0x3bb61d(-0x19d,-_0x4918a9._0x3a9864,-_0x4918a9._0x18c5d5,-0x19f)]}};if(_0x57077f instanceof Error)return{'errorMessage':_0x57077f[_0x2def4b(0x20c,0x1b9,0x1bc,_0x4918a9._0xb639e2)],'structured':{'error':_0x57077f[_0x2def4b(_0x4918a9._0x3e7ab6,_0x4918a9._0x92b063,_0x4918a9._0x5a6532,0x176)]}};function _0x3bb61d(_0x44e8a9,_0x5d37c0,_0x2f60a5,_0x2442a5){return _0x3598c4(_0x5d37c0- -_0x101623._0x38264d,_0x2442a5,_0x2f60a5-_0x101623._0x36b4db,_0x2442a5-_0x101623._0x28aaee);}const _0x4d95f8=String(_0x57077f);function _0x2def4b(_0x34d6fd,_0x47226a,_0x55f092,_0x277036){return _0x3598c4(_0x47226a-_0x3c4ebd._0x2d5235,_0x34d6fd,_0x55f092-0x7b,_0x277036-0x45);}return{'errorMessage':_0x4d95f8,'structured':{'error':_0x4d95f8}};}async function emitEvent(_0x517e5f,_0x2dbf2f,_0x194974){await _0x517e5f?.(_0x2dbf2f,_0x194974);}async function resolveDispatchDecision(_0x5f388e,_0x5720da,_0x33202b){const _0x201dda={_0x23e5af:0xfe,_0x4db897:0x10a,_0x5f1747:0x107,_0x4faac7:0xc7,_0xe91be6:0xa7,_0x4c91b2:0x32e,_0x5cd979:0x2e7,_0xdf0be8:0x256,_0x220448:0x2ec,_0x5b1ed4:0x2d7,_0x5453d7:0x95,_0x913614:0xd9,_0x5d8273:0x154},_0x14ffa0={_0x53673a:0x4b1,_0x3d2a26:0x4b8,_0x29a68c:0x4c7,_0x3c6388:0x49e,_0x3557eb:0x489,_0x5c272d:0x45f,_0x391379:0x3a8,_0x288063:0x41f,_0x2cb369:0x41b,_0x5cf693:0x3da},_0x510988={_0x387324:0x4f7,_0x64add3:0x49f,_0x5bdd1b:0x477,_0x357950:0x498,_0x502033:0x4a9},_0x7d721={_0x3b1cab:0x4d2};function _0x1db91c(_0x55d862,_0x490af0,_0x5bd128,_0x5b577e){return _0x3e2360(_0x5bd128- -0x12e,_0x490af0-0x13e,_0x55d862,_0x5b577e-0x1ec);}if(!_0x5f388e)return{'action':_0x1db91c(0x133,_0x201dda._0x23e5af,_0x201dda._0x4db897,0x15d)};function _0x389897(_0x1b83d5,_0x115bb2,_0x10bc47,_0x4cdb2a){return _0x3e2360(_0x1b83d5- -_0x7d721._0x3b1cab,_0x115bb2-0x1be,_0x10bc47,_0x4cdb2a-0x131);}const _0x2c15e0=Promise[_0x389897(-0x284,-0x241,-0x294,-0x29f)]()[_0x1db91c(_0x201dda._0x5f1747,_0x201dda._0x4faac7,0xed,_0x201dda._0xe91be6)](()=>_0x5f388e(_0x5720da,_0x33202b));if(!_0x33202b[_0x389897(-0x2ef,-_0x201dda._0x4c91b2,-0x30a,-_0x201dda._0x5cd979)]){const _0x2f908d=await _0x2c15e0;return isDispatchDecision(_0x2f908d)?_0x2f908d:{'action':_0x389897(-0x29a,-_0x201dda._0xdf0be8,-_0x201dda._0x220448,-_0x201dda._0x5b1ed4)};}const _0x3554cc=new Promise((_0x23f6cc,_0x4d4bbd)=>{const _0x389e93={_0x252333:0x1eb},_0x3e1344={_0x141717:0x394},_0x5ec642=()=>{function _0x211fdd(_0x5dbd20,_0x1cee94,_0x57959f,_0x246360){return _0x1970(_0x5dbd20-_0x3e1344._0x141717,_0x57959f);}_0x33202b['signal']?.['removeEventListener'](_0x211fdd(0x4bd,_0x510988._0x387324,0x4db,_0x510988._0x64add3),_0x5ec642);function _0x15c1c6(_0x41621a,_0x7d0c26,_0x3b326d,_0x5f5400){return _0x1970(_0x3b326d- -0x31c,_0x41621a);}_0x4d4bbd(toAbortError(_0x33202b[_0x211fdd(0x47d,0x480,_0x510988._0x5bdd1b,_0x510988._0x357950)]?.[_0x211fdd(_0x510988._0x502033,0x4bb,0x483,0x468)]));};function _0x2a752b(_0x48c135,_0xf77366,_0x46c14a,_0x1ac1b3){return _0x389897(_0x1ac1b3-0x74e,_0xf77366-0xa3,_0xf77366,_0x1ac1b3-0x50);}function _0x448f2a(_0x489431,_0x120fa0,_0x3a2b18,_0x40e6ba){return _0x389897(_0x40e6ba-0x6a2,_0x120fa0-_0x389e93._0x252333,_0x3a2b18,_0x40e6ba-0x76);}if(_0x33202b['signal']?.[_0x2a752b(_0x14ffa0._0x53673a,_0x14ffa0._0x3d2a26,_0x14ffa0._0x29a68c,_0x14ffa0._0x3c6388)]){_0x4d4bbd(toAbortError(_0x33202b[_0x2a752b(0x431,0x46f,_0x14ffa0._0x3557eb,_0x14ffa0._0x5c272d)]['reason']));return;}_0x33202b[_0x448f2a(0x3d1,0x3c4,_0x14ffa0._0x391379,0x3b3)]?.[_0x448f2a(_0x14ffa0._0x288063,_0x14ffa0._0x2cb369,0x41a,_0x14ffa0._0x5cf693)]('abort',_0x5ec642,{'once':!![]});}),_0x3efebb=await Promise[_0x1db91c(_0x201dda._0x5453d7,0x106,_0x201dda._0x913614,0x110)]([_0x2c15e0,_0x3554cc]);return isDispatchDecision(_0x3efebb)?_0x3efebb:{'action':_0x1db91c(_0x201dda._0x5d8273,0x155,_0x201dda._0x4db897,0x12a)};}async function executeToolCall(_0x4d9049,_0x390324,_0x2f62ed,_0x4be9b6,_0x177997){const _0x50ad08={_0x93cee2:0x216,_0x50ff38:0x203,_0x65c524:0x1c7,_0xb5826:0x1be,_0x5b8ba5:0x194,_0x25a8b8:0x183,_0x4fcf37:0x31e,_0x27474c:0x2fe,_0x58f82d:0x2e9,_0x214a30:0x18f,_0x35e917:0x295,_0xd0b4f0:0x273,_0x595382:0x24f,_0x21391f:0x1a6,_0x46d42e:0x1c0,_0x186a9c:0x18f,_0x1511bc:0x28c,_0x34d3f5:0x2ce,_0x29a7d2:0x202,_0x1d1472:0x1a0,_0x511f31:0x309,_0x2f3f10:0x336,_0x548698:0x176,_0x4a8fc3:0x11c,_0x7a1c:0x161,_0x42a2ba:0x314,_0x4730b8:0x2b0,_0xfc5d9:0x179,_0x3cf2e1:0x1e9,_0x27bfad:0x2cd,_0x209892:0x174,_0x174857:0x1b4,_0x5e3ffc:0x195,_0xfd1299:0x183,_0x470eb2:0x353,_0x567976:0x2fe,_0x328a40:0x316,_0x403cff:0x2c7,_0x1b88cd:0x2cc,_0x470b3c:0x312,_0x1ffb01:0x2e3,_0x2f2997:0x302,_0x53d49f:0x2e7,_0x2e15e1:0x300,_0x4b6e75:0x327,_0x2ef448:0x2b7,_0x1b1eab:0x2e2,_0x25337c:0x30e,_0x5c4a47:0x15f,_0x3ef389:0x19d,_0x3596e1:0x18b,_0x28ca97:0x1bc,_0x4e1a2d:0x14f,_0x14f684:0x155,_0x26c3c5:0x18b,_0x400976:0x289,_0x1436c6:0x2c9,_0x2e44d0:0x30d,_0x597641:0x2c9,_0x594bad:0x277},_0x514c08={_0x1a99e3:0xbb,_0x401cb8:0xdf,_0x2a6812:0x40e},_0x5d9957={_0x4c22b1:0x1c3,_0x442284:0x168},_0x1cfd6d={_0x262ef5:0x4e1,_0x2b6041:0x11f},_0x45dc35={_0x5503a9:0x14f},_0x30b2a2={..._0x2f62ed,'toolCallId':_0x390324['id']};throwIfAborted(_0x30b2a2[_0x2e28cc(-_0x50ad08._0x93cee2,-0x1f4,-0x1c0,-0x17e)]);function _0x2e28cc(_0x540d51,_0x46fded,_0x272fc4,_0x14826e){return _0x3598c4(_0x272fc4- -0x1f1,_0x540d51,_0x272fc4-_0x45dc35._0x5503a9,_0x14826e-0x3);}const _0x249149=await resolveDispatchDecision(_0x4be9b6,_0x390324,_0x30b2a2);throwIfAborted(_0x30b2a2['signal']);if(_0x249149['action']===_0x2e28cc(-_0x50ad08._0x50ff38,-_0x50ad08._0x65c524,-_0x50ad08._0xb5826,-0x16e)){const _0x21e4d1=createRejectedToolResult(_0x390324,_0x249149[_0x2e28cc(-0x1b8,-0x163,-_0x50ad08._0x5b8ba5,-_0x50ad08._0x25a8b8)]);return await emitEvent(_0x177997,{'type':_0x5a268e(-_0x50ad08._0x4fcf37,-0x2eb,-_0x50ad08._0x27474c,-_0x50ad08._0x58f82d),'toolCall':_0x390324,'result':_0x21e4d1},_0x30b2a2),_0x21e4d1;}const _0x4f52c7=_0x4d9049[_0x2e28cc(-0x1e2,-0x1b5,-_0x50ad08._0x214a30,-0x178)](_0x390324[_0x5a268e(-_0x50ad08._0x35e917,-_0x50ad08._0xd0b4f0,-0x2bd,-_0x50ad08._0x595382)]);function _0x5a268e(_0x54ba3a,_0xb9162b,_0x499fb3,_0x4fa8db){return _0x3e2360(_0xb9162b- -_0x1cfd6d._0x262ef5,_0xb9162b-_0x1cfd6d._0x2b6041,_0x499fb3,_0x4fa8db-0x1d0);}if(!_0x4f52c7){const _0xcfb4b9=createUnknownToolResult(_0x390324);return await emitEvent(_0x177997,{'type':'tool_completed','toolCall':_0x390324,'result':_0xcfb4b9},_0x30b2a2),_0xcfb4b9;}throwIfAborted(_0x30b2a2[_0x2e28cc(-_0x50ad08._0x21391f,-_0x50ad08._0x214a30,-_0x50ad08._0x46d42e,-_0x50ad08._0x186a9c)]),await emitEvent(_0x177997,{'type':_0x5a268e(-0x2d2,-_0x50ad08._0x1511bc,-0x278,-_0x50ad08._0x34d3f5),'toolCall':_0x390324},_0x30b2a2);try{throwIfAborted(_0x30b2a2[_0x2e28cc(-_0x50ad08._0x29a7d2,-0x16b,-_0x50ad08._0x46d42e,-_0x50ad08._0x1d1472)]);const _0x25f77=validateToolInput(_0x390324[_0x5a268e(-0x2cb,-_0x50ad08._0x511f31,-_0x50ad08._0x2f3f10,-0x328)],_0x4f52c7['inputSchema']),_0x41357c=await _0x4f52c7[_0x2e28cc(-_0x50ad08._0x548698,-_0x50ad08._0x4a8fc3,-0x169,-_0x50ad08._0x7a1c)](_0x25f77,_0x30b2a2),_0x3c65a2=[],_0x4fab07=addAbortListener(_0x30b2a2[_0x5a268e(-_0x50ad08._0x42a2ba,-_0x50ad08._0x27474c,-_0x50ad08._0x4730b8,-0x2c3)],()=>{const _0x2a0aaa={_0x7de4cc:0xf2,_0x129bb8:0x21e,_0x53f012:0x19d};function _0x5c9b74(_0x480ed1,_0x14a7ef,_0x2af758,_0x453cb9){return _0x5a268e(_0x480ed1-_0x5d9957._0x4c22b1,_0x480ed1-0x6b9,_0x2af758,_0x453cb9-_0x5d9957._0x442284);}function _0x18defa(_0x2c0d96,_0x290512,_0x44ee8e,_0x1579f1){return _0x5a268e(_0x2c0d96-_0x2a0aaa._0x7de4cc,_0x290512-_0x2a0aaa._0x129bb8,_0x1579f1,_0x1579f1-_0x2a0aaa._0x53f012);}void _0x41357c[_0x18defa(-_0x514c08._0x1a99e3,-_0x514c08._0x401cb8,-0xa5,-0xb6)](void 0x0)[_0x5c9b74(0x438,0x42f,0x48f,_0x514c08._0x2a6812)](()=>{});});try{throwIfAborted(_0x30b2a2[_0x2e28cc(-_0x50ad08._0xfc5d9,-_0x50ad08._0x3cf2e1,-_0x50ad08._0x46d42e,-0x1d2)]);let _0x28b960=await _0x41357c[_0x5a268e(-_0x50ad08._0x27bfad,-0x314,-0x2c8,-0x2c5)]();while(!_0x28b960[_0x2e28cc(-_0x50ad08._0x209892,-_0x50ad08._0x174857,-_0x50ad08._0x5e3ffc,-_0x50ad08._0xfd1299)]){throwIfAborted(_0x30b2a2[_0x5a268e(-_0x50ad08._0x470eb2,-_0x50ad08._0x567976,-_0x50ad08._0x328a40,-0x2ee)]);const _0x487b5f=normalizeToolOutputValue(_0x28b960[_0x5a268e(-0x2d6,-_0x50ad08._0x403cff,-_0x50ad08._0x1b88cd,-_0x50ad08._0x470b3c)]);_0x3c65a2[_0x5a268e(-_0x50ad08._0x1ffb01,-_0x50ad08._0x2f2997,-_0x50ad08._0x53d49f,-0x316)](_0x487b5f),await emitEvent(_0x177997,{'type':_0x5a268e(-0x24c,-0x28f,-0x248,-0x2b7),'toolCall':_0x390324,'chunk':_0x487b5f},_0x30b2a2),throwIfAborted(_0x30b2a2['signal']),_0x28b960=await _0x41357c[_0x5a268e(-0x353,-0x314,-_0x50ad08._0x2e15e1,-0x2bf)]();}throwIfAborted(_0x30b2a2[_0x5a268e(-0x2c3,-0x2fe,-_0x50ad08._0x4b6e75,-_0x50ad08._0x2ef448)]);const _0x28f7ce=_0x28b960[_0x5a268e(-0x277,-0x2c7,-_0x50ad08._0x1b1eab,-_0x50ad08._0x25337c)]===void 0x0?deriveFinalToolOutput(_0x3c65a2):normalizeToolOutputValue(_0x28b960[_0x2e28cc(-_0x50ad08._0x5c4a47,-0x146,-0x189,-0x136)]),_0x47b782=createSuccessToolResult(_0x390324,_0x28f7ce,_0x3c65a2);return await emitEvent(_0x177997,{'type':_0x2e28cc(-0x14a,-_0x50ad08._0x3ef389,-_0x50ad08._0x3596e1,-_0x50ad08._0x28ca97),'toolCall':_0x390324,'result':_0x47b782},_0x30b2a2),_0x47b782;}catch(_0x5f0e6e){if(isAbortError(_0x5f0e6e)){const _0x4fc105=createAbortedToolResult(_0x390324,_0x5f0e6e,_0x3c65a2);return await emitEvent(_0x177997,{'type':_0x2e28cc(-_0x50ad08._0x4e1a2d,-_0x50ad08._0x14f684,-_0x50ad08._0x26c3c5,-0x15a),'toolCall':_0x390324,'result':_0x4fc105},_0x30b2a2),_0x4fc105;}const {errorMessage:_0x3f266f,structured:_0x151ab3}=normalizeExecutionError(_0x5f0e6e),_0x5c45d3=createErrorToolResult(_0x390324,_0x3f266f,_0x151ab3,_0x3c65a2);return await emitEvent(_0x177997,{'type':_0x5a268e(-_0x50ad08._0x400976,-_0x50ad08._0x1436c6,-_0x50ad08._0x2e44d0,-0x2a9),'toolCall':_0x390324,'result':_0x5c45d3},_0x30b2a2),_0x5c45d3;}finally{_0x4fab07();}}catch(_0x30b37d){if(isAbortError(_0x30b37d)){const _0x50f608=createAbortedToolResult(_0x390324,_0x30b37d);return await emitEvent(_0x177997,{'type':_0x5a268e(-0x298,-_0x50ad08._0x597641,-0x311,-_0x50ad08._0x594bad),'toolCall':_0x390324,'result':_0x50f608},_0x30b2a2),_0x50f608;}const {errorMessage:_0x3b1b9b,structured:_0x3a5152}=normalizeExecutionError(_0x30b37d),_0x25fcb1=createErrorToolResult(_0x390324,_0x3b1b9b,_0x3a5152);return await emitEvent(_0x177997,{'type':'tool_completed','toolCall':_0x390324,'result':_0x25fcb1},_0x30b2a2),_0x25fcb1;}}function _0x3598c4(_0x244b0f,_0x205481,_0x1953f1,_0x2ab064){return _0x1970(_0x244b0f- -0xb8,_0x205481);}function createInternalToolRuntime(_0x497227=[],_0xd02079={}){const _0x5af63e={_0x1b66ba:0x13e,_0x1b86d7:0x146,_0x50f766:0x480,_0x55b584:0x432,_0x564411:0x471},_0x2f3088={_0x4f477b:0x1a3};let _0x3c726a=new ToolRegistry(_0x497227);return{'listToolSchemas'(){function _0x3a69e7(_0x2fd77a,_0x148e35,_0xaa2ebd,_0x4a0a69){return _0x1970(_0x4a0a69- -0x2a2,_0x148e35);}return _0x3c726a[_0x3a69e7(-0x169,-0x178,-_0x2f3088._0x4f477b,-0x1bf)]();},'setTools'(_0x2b4bdc){_0x3c726a=new ToolRegistry(_0x2b4bdc);},async 'executeCalls'(_0x21be4e,_0x1d7c69){const _0x5de29f={_0x2d23fa:0x429,_0x1e3a21:0x3ed};function _0x52909d(_0x52bb96,_0x47041e,_0x2c5061,_0xd6bf6a){return _0x1970(_0xd6bf6a- -0x2a8,_0x2c5061);}function _0x3f263e(_0x491fe4,_0x1316ef,_0x24df7b,_0x2cbb11){return _0x1970(_0x1316ef-0x365,_0x491fe4);}return await Promise[_0x52909d(-0x16f,-0x130,-_0x5af63e._0x1b66ba,-_0x5af63e._0x1b86d7)](_0x21be4e[_0x3f263e(_0x5af63e._0x50f766,_0x5af63e._0x55b584,0x460,_0x5af63e._0x564411)](async _0x3c22a4=>{const _0x1efb84={_0x37dbb7:0x6e,_0x59031b:0x131};function _0x4af583(_0x99ba50,_0x49602e,_0x53d3c,_0x421e94){return _0x3f263e(_0x421e94,_0x99ba50- -_0x1efb84._0x37dbb7,_0x53d3c-_0x1efb84._0x59031b,_0x421e94-0x199);}return await executeToolCall(_0x3c726a,_0x3c22a4,_0x1d7c69,_0xd02079['onToolCall'],_0xd02079[_0x4af583(_0x5de29f._0x2d23fa,0x47d,0x42b,_0x5de29f._0x1e3a21)]);}));},async 'execute'(_0x2835f1,_0x18808a){const [_0x480f98]=await this['executeCalls']([_0x2835f1],_0x18808a);return _0x480f98;}};}function getOrderedObserverExtensions(_0x275560,_0x5204dc){const _0x417179={_0x38d147:0x1ca,_0x5cca5d:0x21f},_0x2a8e25={_0x30a7ec:0x44,_0x46e75a:0x96,_0x39d0af:0xbd,_0x17a34c:0x41c,_0x2ec3cd:0x44a,_0x15b766:0x3c5,_0x4453a3:0x3d4,_0x52602b:0x3c7,_0x35ad1f:0x427,_0x242952:0x493,_0x24f387:0x465},_0x587654={_0x4c05c6:0x214,_0x3b7768:0x1d3},_0x3e53c1={_0x2903ce:0x293,_0x24e29b:0x146,_0xaacc9:0x183},_0x24e573={_0x23f472:0x14,_0x4f4fa2:0x173,_0x55a6c9:0xc3};function _0x2ba473(_0x26979e,_0x3a86,_0x332b63,_0x158408){return _0x3e2360(_0x332b63- -_0x24e573._0x23f472,_0x3a86-_0x24e573._0x4f4fa2,_0x26979e,_0x158408-_0x24e573._0x55a6c9);}function _0xdca892(_0x370334,_0x295ad3,_0xa2a8ac,_0x12ac8c){return _0x3598c4(_0x370334-_0x3e53c1._0x2903ce,_0xa2a8ac,_0xa2a8ac-_0x3e53c1._0x24e29b,_0x12ac8c-_0x3e53c1._0xaacc9);}return _0x275560[_0x2ba473(0x1d2,0x202,_0x417179._0x38d147,_0x417179._0x5cca5d)](_0x46fc59=>{const _0x1fa2e8={_0x258ae1:0xbf,_0x210a94:0x172};function _0x21668e(_0x368442,_0x3e1e75,_0x3f18da,_0xd9671a){return _0x2ba473(_0x3e1e75,_0x3e1e75-0x175,_0x368442-_0x587654._0x4c05c6,_0xd9671a-_0x587654._0x3b7768);}function _0x521673(_0x12c9fb,_0x390b3e,_0x587f46,_0x27568d){return _0x2ba473(_0x587f46,_0x390b3e-_0x1fa2e8._0x258ae1,_0x27568d- -_0x1fa2e8._0x210a94,_0x27568d-0xcf);}return _0x46fc59[_0x521673(_0x2a8e25._0x30a7ec,_0x2a8e25._0x46e75a,_0x2a8e25._0x39d0af,0x8d)]!==![]&&_0x46fc59[_0x21668e(_0x2a8e25._0x17a34c,0x3d6,_0x2a8e25._0x2ec3cd,_0x2a8e25._0x15b766)]===_0x5204dc&&_0x46fc59[_0x21668e(_0x2a8e25._0x4453a3,_0x2a8e25._0x52602b,0x3c5,0x3f5)]===_0x21668e(0x464,_0x2a8e25._0x35ad1f,_0x2a8e25._0x242952,_0x2a8e25._0x24f387);})['sort']((_0xc8086e,_0x101b4a)=>_0xc8086e[_0xdca892(0x31a,0x2e9,0x2f3,0x368)]-_0x101b4a[_0xdca892(0x31a,0x306,0x362,0x328)]);}function getOrderedTransformerExtensions(_0x416f4b,_0x5b18f7){const _0x4820fe={_0x4c089d:0xdc,_0x44e4bb:0x59},_0x31a045={_0xa559e8:0xdc,_0x7ba0a0:0x99},_0x7934fc={_0x129410:0x40,_0x208545:0x1e9},_0x4e0bfc={_0x2993a8:0x276,_0x4c6146:0x8e},_0x808730={_0x19f6af:0x96};function _0x303992(_0x3e0742,_0x4020bf,_0x364cc3,_0x52dafc){return _0x3e2360(_0x4020bf- -_0x808730._0x19f6af,_0x4020bf-0x98,_0x52dafc,_0x52dafc-0x1e4);}function _0x3a96a4(_0x19e9e9,_0x4e11b4,_0xa6c25e,_0x19a2e8){return _0x3e2360(_0xa6c25e- -_0x4e0bfc._0x2993a8,_0x4e11b4-_0x4e0bfc._0x4c6146,_0x19a2e8,_0x19a2e8-0x9b);}return _0x416f4b[_0x3a96a4(-_0x4820fe._0x4c089d,-0x52,-0x98,-_0x4820fe._0x44e4bb)](_0x4d4c2f=>{const _0x54bcb4={_0x31dbab:0x17c,_0x1e6339:0x1ba};function _0x583d8b(_0x22382,_0x177981,_0x47cbb9,_0xf326ba){return _0x3a96a4(_0x22382-_0x7934fc._0x129410,_0x177981-_0x7934fc._0x208545,_0x22382- -0x79,_0xf326ba);}function _0x2ed8f3(_0x5f3b79,_0x2dc41e,_0x4b986b,_0x1dee54){return _0x3a96a4(_0x5f3b79-0xad,_0x2dc41e-_0x54bcb4._0x31dbab,_0x5f3b79-_0x54bcb4._0x1e6339,_0x2dc41e);}return _0x4d4c2f['enabled']!==![]&&_0x4d4c2f['stage']===_0x5b18f7&&_0x4d4c2f[_0x583d8b(-0x11b,-_0x31a045._0xa559e8,-0xca,-0x161)]===_0x583d8b(-_0x31a045._0x7ba0a0,-0x7e,-0x49,-0x66);})[_0x303992(0x191,0x190,0x189,0x19e)]((_0x57b7c,_0x5c23ed)=>_0x57b7c[_0x303992(0x18d,0x1a3,0x17e,0x1e9)]-_0x5c23ed[_0x303992(0x178,0x1a3,0x1df,0x1f9)]);}function createExtensionRegistry(){const _0x1aa539={_0x4d9952:0x25b,_0x4e903f:0x281},_0x5c3517=[];return{'register'(_0x106621){_0x5c3517['push'](_0x106621);},async 'runTransformers'(_0x266018,_0x2a6caa,_0xc5e212){let _0x40e72c=_0x2a6caa;for(const _0xf4994 of getOrderedTransformerExtensions(_0x5c3517,_0x266018)){_0x40e72c=await _0xf4994[_0x1b2095(0x185,0x1be,0x1d1,0x1ab)](_0x40e72c,_0xc5e212);}function _0x1b2095(_0x18521b,_0x260a03,_0x498159,_0x540ad6){return _0x1970(_0x260a03-0x80,_0x540ad6);}return _0x40e72c;},async 'runObservers'(_0x48e45a,_0xed2072,_0x4bce1f){function _0xd8ea92(_0x34448e,_0x4a433b,_0x72f651,_0x45d0e5){return _0x1970(_0x34448e- -0x399,_0x4a433b);}for(const _0x403c76 of getOrderedObserverExtensions(_0x5c3517,_0x48e45a)){await _0x403c76[_0xd8ea92(-_0x1aa539._0x4d9952,-_0x1aa539._0x4e903f,-0x2b1,-0x273)](_0xed2072,_0x4bce1f);}}};}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(_0xd24c88={}){const _0x1901e0={_0x4b69b3:0x526,_0x54c3dc:0x48f},_0x3c6512={_0x57301b:0x4be,_0x48ef2a:0x4a3,_0xceeee1:0x3eb,_0x3fbd73:0x38e,_0x29f2ee:0x45a,_0x4f699c:0x415,_0x5a10cb:0x417,_0x420227:0x3ac,_0x5c279e:0x3fa,_0x164998:0x419,_0x33be54:0x483,_0x165eea:0x473,_0x4f507e:0x47c,_0x3107b7:0x498,_0x3e7218:0x3db,_0x2c59b1:0x41e,_0x362c29:0x402,_0x3f87be:0x3e4,_0x4a90ef:0x3d1,_0x59d78f:0x463,_0x3181aa:0x45a,_0x23e84e:0x379,_0x5a96d8:0x3ca,_0x55b432:0x425,_0x13f261:0x45b,_0x5b4142:0x38b,_0x25005e:0x362,_0x2a8e88:0x350,_0x27a758:0x424},_0x331e27={_0x57a24d:0x27e};let _0x5b1965=createEmptySnapshot();const _0x2c0deb=new Set();let _0x451582;const _0x1956c4=()=>{const _0x2df44a={..._0x5b1965};for(const _0x58a5d5 of _0x2c0deb)_0x58a5d5(_0x2df44a);};return{'getSnapshot'(){return{..._0x5b1965};},'recordEvent'(_0x3ae712){if(_0x3ae712[_0x1e080f(_0x3c6512._0x57301b,0x46e,_0x3c6512._0x48ef2a,0x454)]===_0x558c1c(0x3f7,0x426,_0x3c6512._0xceeee1,0x3f5)){_0x451582=Date[_0x558c1c(_0x3c6512._0x3fbd73,0x3d4,0x3c8,0x382)]();const _0x4ba902=_0xd24c88[_0x558c1c(0x3d5,0x3ef,0x3a1,0x39b)]?.(_0x3ae712[_0x1e080f(_0x3c6512._0x29f2ee,0x41b,0x41c,_0x3c6512._0x4f699c)]);_0x4ba902!==void 0x0&&(_0x5b1965={..._0x5b1965,'contextWindowLimit':_0x4ba902},_0x1956c4());return;}function _0x1e080f(_0x34bc54,_0x507db4,_0x34b4ef,_0x2ee98d){return _0x1970(_0x507db4-0x31b,_0x34b4ef);}if(_0x3ae712[_0x1e080f(0x46e,0x46e,_0x3c6512._0x5a10cb,0x465)]==='model_response'){const _0x4ed2d6=_0x3ae712['response']['usage']['inputTokens'],_0x191a1f=_0x3ae712[_0x558c1c(_0x3c6512._0x420227,_0x3c6512._0x5c279e,0x3df,_0x3c6512._0x164998)][_0x1e080f(0x44d,0x458,_0x3c6512._0x33be54,_0x3c6512._0x165eea)]['outputTokens'],_0x190361=_0x3ae712[_0x1e080f(0x435,_0x3c6512._0x4f507e,_0x3c6512._0x3107b7,0x4a2)]['usage']['reasoningTokens']??0x0,_0x1289ed=_0x4ed2d6+_0x191a1f,_0x86173d=_0x451582===void 0x0?0x0:Date['now']()-_0x451582;_0x451582=void 0x0,_0x5b1965={..._0x5b1965,'totalTokens':_0x5b1965[_0x1e080f(0x3b1,0x3f4,0x445,_0x3c6512._0x3e7218)]+_0x1289ed,'totalInputTokens':_0x5b1965[_0x1e080f(_0x3c6512._0x2c59b1,_0x3c6512._0x362c29,0x443,0x41d)]+_0x4ed2d6,'totalOutputTokens':_0x5b1965[_0x1e080f(0x3c3,0x401,_0x3c6512._0x3f87be,_0x3c6512._0x4a90ef)]+_0x191a1f,'totalReasoningTokens':_0x5b1965[_0x1e080f(_0x3c6512._0x59d78f,0x471,0x4a3,_0x3c6512._0x3181aa)]+_0x190361,'modelCallCount':_0x5b1965[_0x558c1c(_0x3c6512._0x23e84e,_0x3c6512._0x5a96d8,0x3d0,_0x3c6512._0x55b432)]+0x1,'totalModelTimeMs':_0x5b1965[_0x1e080f(0x476,0x453,_0x3c6512._0x13f261,0x459)]+_0x86173d,'currentTokens':_0x1289ed,'currentInputTokens':_0x4ed2d6,'currentOutputTokens':_0x191a1f,'currentReasoningTokens':_0x190361,'currentModelTimeMs':_0x86173d,..._0x5b1965['contextWindowLimit']&&_0x1289ed>0x0?{'contextWindowUsage':_0x1289ed/_0x5b1965['contextWindowLimit']}:{}},_0x1956c4();return;}function _0x558c1c(_0x2c7cbf,_0x1c49cd,_0x3cbe83,_0x2cfa77){return _0x1970(_0x3cbe83-_0x331e27._0x57a24d,_0x2c7cbf);}if(_0x3ae712[_0x558c1c(_0x3c6512._0x5b4142,0x3d7,_0x3c6512._0x4a90ef,0x3cc)]==='tool_call'){_0x5b1965={..._0x5b1965,'toolCallCount':_0x5b1965['toolCallCount']+0x1},_0x1956c4();return;}_0x3ae712['type']===_0x558c1c(_0x3c6512._0x25005e,0x370,_0x3c6512._0x2a8e88,0x34c)&&(_0x5b1965={..._0x5b1965,'requestCount':_0x5b1965[_0x1e080f(0x3ff,_0x3c6512._0x27a758,0x417,0x40a)]+0x1},_0x1956c4());},'reset'(){_0x5b1965=createEmptySnapshot(),_0x451582=void 0x0,_0x1956c4();},'subscribe'(_0x2c03a8){return _0x2c0deb['add'](_0x2c03a8),()=>{const _0x3abc15={_0x1f4805:0x360};function _0x1e2271(_0x300cfa,_0x24628d,_0x31f63b,_0x1ff5a7){return _0x1970(_0x1ff5a7-_0x3abc15._0x1f4805,_0x300cfa);}_0x2c0deb[_0x1e2271(_0x1901e0._0x4b69b3,0x493,_0x1901e0._0x54c3dc,0x4d1)](_0x2c03a8);};}};}function makeExtensionContext(_0x16321d){return{'state':_0x16321d};}async function runStage(_0x13dfef,_0x62cb42,_0xf5601d,_0x445891){const _0xbc908f={_0x477e3e:0x24d,_0x4b853a:0x22c},_0x18d44f={_0x190531:0xdb},_0x2eeb26=await _0x13dfef[_0x5acc8a(0x265,0x27d,_0xbc908f._0x477e3e,0x250)](_0x62cb42,_0xf5601d,_0x445891);function _0x31731d(_0x4e8b8d,_0x182729,_0x417435,_0x17cecf){return _0x3598c4(_0x182729-0xee,_0x417435,_0x417435-_0x18d44f._0x190531,_0x17cecf-0x133);}await _0x13dfef[_0x5acc8a(0x283,0x2d2,_0xbc908f._0x4b853a,0x25e)](_0x62cb42,_0x2eeb26,_0x445891);function _0x5acc8a(_0x3eb0d6,_0x12970f,_0x14adbd,_0x458e6f){return _0x3e2360(_0x3eb0d6-0x83,_0x12970f-0xf8,_0x12970f,_0x458e6f-0x1c2);}return _0x2eeb26;}async function emitEvent2(_0x38dc94,_0x1256d4,_0x4b2a79){await _0x38dc94?.(_0x1256d4,_0x4b2a79);}function _0x2505(){const _0x2cfd45=['C3vTBwfYEuLUzgv4','B25uB29Sq2fSBa','qwDLBNqUC2vUzcbYzxf1AxjLCYbHig1LC3nHz2uGD2HLBIbUBYbKzwzHDwX0ig1LC3nHz2uGAxmGy29UzMLNDxjLza','Aw5WDxq','y29UDgvUDeLUzgv4','CMvHC29UAw5Nx2nODw5R','n2ThBNfqrq','CMvXDwLYzwq','BgLZDfrVB2Xty2HLBwfZ','zMLSDgvY','ChvZAa','Dg90ywXpDxrWDxruB2TLBNm','Dg90ywXjBNb1DfrVA2vUCW','CNvUvhjHBNnMB3jTzxjZ','C2LNBMfS','CMv0DxjU','CMvQzwn0','Aw5WDxrezwX0yq','C2v0q2HHDe1VzgvS','oIbTAxnZAw5NihjLCxvPCMvKigzPzwXKici','zgvWCW','C2v0','DhvYBKLUzgv4','yMvMB3jLrMLUywXpDxrWDxq','CMvNAxn0zxi','vg9VBev4zwn1DgLVBKvYCM9Y','C2v0vg9VBhm','C3rYDwn0DxjLza','DgHPBMTPBMC','CMvJB3jKrxzLBNq','mKHOzMXeyG','Dg9VBf91C2vFzgvSDge','oIbLEhbLy3rLzcbZDhjPBMC','Dg9VBf9YzwPLy3rLza','oIbLEhbLy3rLzcbHCNjHEq','yxnZAxn0yw50x2nODw5R','DhvYBI0','CMvXDwvZDa','AM9PBG','AxnbCNjHEq','yw50AhjVCgLJx3rOAw5RAw5Nx2rLBhrH','y29UDgvUDf9KzwX0yq','x3n5C3rLBvbYB21WDa','CNvUt2jZzxj2zxjZ','Aw5WDxrty2HLBwe','C3rYAw5NAwz5','CMvXDwvZDenVDw50','Dg9VBf9Yzxn1BhrFBwvZC2fNzq','ywz0zxjuDxjUq29TCgXLDgu','C29Tzq','CMfJzq','oNjLyxnVBMLUzW','B3v0Chv0sw5KzxG','ywrKrxzLBNrmAxn0zw5LCG','CMvHC29UAw5Nx21LC3nHz2u','mtC4mJi0ELrVte5f','oIbLEhbLy3rLzcbVyMPLy3q','zg9Uzq','CMvHC29U','mta4nJq3mMLnz2HPBa','C3rYAw5N','Bwv0CMLJCW','zw5HyMXLza','z2v0','B3bLBMfPx3jLyxnVBMLUz19KzwX0yq','ywz0zxjuB29SuMvZDwX0','BgLZDa','Dg9VBf9JB21WBgv0zwq','mZe4mZKWmhffA3PSvG','DMfSDwu','DgHLBG','C3rHz2u','z2v0q29UDgv4DfDPBMrVD0XPBwL0','zxjYB3i','BNvTyMvY','yMvMB3jLvg9VBfjLC3vSDefWCgvUza','DhvYBKLK','ywjVCNrLza','ywjVCNq','C2v0vg9WAwm','C2v0u3LZDgvTuhjVBxb0','C29YDa','B2jQzwn0','zw50CMLLCW','zMLUywXnzxnZywDL','C2v0u2vZC2LVBKLK','CMvZzxrnzxnZywDLCW','B25fDMvUDa','nJa0nJCXzwfTBe1d','Bwf4vg9Rzw5Z','AxrLBxm','BgvUz3rO','C3rHDhvZ','Dg90ywXnB2rLBfrPBwvnCW','DMfSDwvZ','C3LZDgvTuhjVBxb0','oIbLEhbLy3rLzcbIB29SzwfU','y29UDgvUDa','DxnHz2u','CNvU','B3jKzxi','zxHLy3v0zq','y29TCgXLDgu','BgfZDfjLC3bVBNnL','ntGWmdqYEuH6s3zS','yM9VBgvHBG','zNvUy3rPB24','DxnLCG','yxjYyxK','zMLUywXFBwvZC2fNzq','zgvSDge','BM93','Bw9KzwW','yMvMB3jLvg9VBev4zwn1DgLVBG','CMvNAxn0CNK','sw52ywXPzcb0B29SigLUChv0igf0ia','Dg9VBhncEu5HBwu','Dg9VBf91C2vFBwvZC2fNzq','mJm2meXny0fjuG','Bw9KzwXdywXSq291BNq','DhLWzq','CMvZB2X2zq','C3LZDgvT','Dg90ywXszwfZB25PBMDuB2TLBNm','C2XPy2u','Dg9VBf9VDxrWDxrFy2H1BMS','DhjPBq','Dg9VBfj1BNrPBwu','Dg9VBf9ZDgfYDgvK','DhjHBNnMB3jTzxi','ywn0Aw9U','y2HHDe1VzgvS','ywz0zxjnB2rLBfjLC3bVBNnL','yMvMB3jLtw9KzwXszxf1zxn0','CMvZCg9UC2u','ywXS','C3rYzwfTAw5N','B3bLBMfPx3jLyxnVBMLUz19ZDw1Tyxj5x2rLBhrH','B3v0Chv0','y2f0y2G','zgvMyxvSDe1LC3nHz2u','C2vUza','BwvZC2fNzq','B2jZzxj2zxi','Aw5KzxG','C2vZC2LVBKrPCG','Bw9KzwXFCMvXDwvZDa','qwDLBNqGCMvXDwLYzxmGysbJAgf0tw9KzwW','tw9KzwWGC3rYzwfTigvUzgvKihDPDgHVDxqGysbMAw5HBcbYzxnWB25Zzq','B25vC2vYtwvZC2fNzq','zgvSzxrL','yxnRvxnLCG','Dg9tDhjPBMC','BMfTzq','oIbLEhbLy3rLzcbUDw1Izxi','AxrLBuLK','Dg9VBf9Yzxn1Bhq','Dgv4Da','BwvZC2fNzxm','BwfW','nJG2n1jQyxrQua','C3rYzwfT','ndeZmtGYmLvPvuXJrG','C2vZC2LVBKLK','DhvYBL9JB21WBgv0zq','BMv4Da','C2vZC2LVBI0','zxH0zw5ZAw9UCW','C3rHDgu','ywz0zxjnzxnZywDLqxbWzw5K','yxnZAxn0yw50twvZC2fNzuLK','Dg90ywXuB2TLBNm','A2LUza'];_0x2505=function(){return _0x2cfd45;};return _0x2505();}function replaceToolUseBlocks(_0x2caeb0,_0x3b524c){const _0x1e6a65={_0x17894e:0x280,_0x57fc91:0x287},_0x1ffbaf={_0x3b3b15:0x36e,_0x4b08ab:0x329},_0x447729={_0x3ab3db:0x470,_0x3b6155:0x65};let _0x7c1fd0=0x0;function _0x3d9f29(_0x407bd3,_0x3e948d,_0xf7d816,_0x3d89dd){return _0x3e2360(_0x407bd3- -_0x447729._0x3ab3db,_0x3e948d-_0x447729._0x3b6155,_0x3d89dd,_0x3d89dd-0xa5);}return{..._0x2caeb0,'content':_0x2caeb0['content'][_0x3d9f29(-0x2a9,-_0x1e6a65._0x17894e,-0x2dc,-_0x1e6a65._0x57fc91)](_0x18cd83=>{const _0x3dae5f={_0x3bf75e:0x58b,_0x7e7e75:0x1d0};if(_0x18cd83[_0x311d65(0x396,_0x1ffbaf._0x3b3b15,0x368,_0x1ffbaf._0x4b08ab)]!=='tool_use')return _0x18cd83;const _0x8ab2b2=_0x3b524c[_0x7c1fd0];function _0x311d65(_0x46c94b,_0x2ca588,_0xfd41de,_0x2d36a7){return _0x3d9f29(_0xfd41de-_0x3dae5f._0x3bf75e,_0x2ca588-0xc9,_0xfd41de-_0x3dae5f._0x7e7e75,_0x46c94b);}return _0x7c1fd0+=0x1,structuredClone(_0x8ab2b2);})};}function createAssistantMessageId(_0x53f0a6,_0x2c645d){return _0x53f0a6+':assistant:'+_0x2c645d;}function _0x1970(_0x125a2d,_0x3a3af0){_0x125a2d=_0x125a2d-0xca;const _0x25050d=_0x2505();let _0x197030=_0x25050d[_0x125a2d];if(_0x1970['zDplyG']===undefined){var _0x339d1c=function(_0x4b21b1){const _0x4e0b24='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0xe7d346='',_0x2ba1c8='';for(let _0x3cd7b8=0x0,_0x5c74ca,_0x542f4e,_0x1451d2=0x0;_0x542f4e=_0x4b21b1['charAt'](_0x1451d2++);~_0x542f4e&&(_0x5c74ca=_0x3cd7b8%0x4?_0x5c74ca*0x40+_0x542f4e:_0x542f4e,_0x3cd7b8++%0x4)?_0xe7d346+=String['fromCharCode'](0xff&_0x5c74ca>>(-0x2*_0x3cd7b8&0x6)):0x0){_0x542f4e=_0x4e0b24['indexOf'](_0x542f4e);}for(let _0x2a5158=0x0,_0x145320=_0xe7d346['length'];_0x2a5158<_0x145320;_0x2a5158++){_0x2ba1c8+='%'+('00'+_0xe7d346['charCodeAt'](_0x2a5158)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x2ba1c8);};_0x1970['vBJlGF']=_0x339d1c,_0x1970['jMXHjQ']={},_0x1970['zDplyG']=!![];}const _0x19996b=_0x25050d[0x0],_0x6dd2e7=_0x125a2d+_0x19996b,_0xa7afaa=_0x1970['jMXHjQ'][_0x6dd2e7];return!_0xa7afaa?(_0x197030=_0x1970['vBJlGF'](_0x197030),_0x1970['jMXHjQ'][_0x6dd2e7]=_0x197030):_0x197030=_0xa7afaa,_0x197030;}function createReasoningMessageId(_0x584124){const _0x1a2a4b={_0x4b11ef:0x48c,_0x219c29:0x451,_0x1f0737:0x450},_0x4d7e75={_0x937f6c:0x1d1,_0x240230:0x136};function _0x2db344(_0x43d3e0,_0x485126,_0x3df626,_0x56837a){return _0x3e2360(_0x3df626-0x248,_0x485126-_0x4d7e75._0x937f6c,_0x56837a,_0x56837a-_0x4d7e75._0x240230);}return _0x584124+_0x2db344(_0x1a2a4b._0x4b11ef,_0x1a2a4b._0x219c29,_0x1a2a4b._0x1f0737,0x3f9);}function withMessageId(_0x338b50,_0x303bfe){if(_0x338b50['id']===_0x303bfe)return _0x338b50;return{..._0x338b50,'id':_0x303bfe};}function createAssistantChunkEvent(_0x5d52b2,_0x5171e9){const _0xcf95d2={_0x1465de:0x1c8,_0x4b14d7:0x28a,_0xe36d81:0x305,_0x344f68:0x2ff,_0x375a8f:0x2b5,_0x2a4e7a:0x364,_0x190ed7:0x322,_0x23077d:0x26d,_0x28d39f:0x250},_0x2eb1de={_0x5ed4f0:0x263,_0x1df22f:0x47};if(_0x5d52b2[_0x4433e9(-0x1a5,-_0xcf95d2._0x1465de,-0x1b0,-0x21d)]!==_0x53d9ab(0x29d,_0xcf95d2._0x4b14d7,0x2e8,0x2bb))return void 0x0;function _0x4433e9(_0x53ea43,_0x379d47,_0x4b9ad8,_0x2097ec){return _0x3598c4(_0x379d47- -_0x2eb1de._0x5ed4f0,_0x53ea43,_0x4b9ad8-_0x2eb1de._0x1df22f,_0x2097ec-0xd);}if(_0x5d52b2['text']===void 0x0)return void 0x0;function _0x53d9ab(_0x1f3452,_0x26daac,_0x36b507,_0x26a8d0){return _0x3598c4(_0x26a8d0-0x26f,_0x26daac,_0x36b507-0x2a,_0x26a8d0-0x55);}return{'type':_0x53d9ab(_0xcf95d2._0xe36d81,_0xcf95d2._0x344f68,0x27f,_0xcf95d2._0x375a8f),'index':_0x5d52b2[_0x53d9ab(0x2f7,0x2fc,_0xcf95d2._0x2a4e7a,_0xcf95d2._0x190ed7)]??0x0,'messageId':_0x5171e9,'chunk':{'type':'content_delta','index':_0x5d52b2['index']??0x0,'text':_0x5d52b2[_0x4433e9(-_0xcf95d2._0x23077d,-_0xcf95d2._0x28d39f,-_0xcf95d2._0x23077d,-0x23f)]}};}function createToolUseChunkEvent(_0x586376,_0x37642d){const _0x1d54b2={_0x2f5909:0x401,_0x145ef4:0x3df,_0x445274:0x358,_0x509186:0x393,_0x2b38db:0x3a6,_0x259177:0x3bc,_0x31b1a0:0x3d2,_0x1c3e98:0x3ad,_0x416236:0x39d,_0x4b8a5c:0x427,_0x4c743d:0x36e,_0x3497f3:0x34a,_0x3732ac:0x332,_0x513e8c:0x34a},_0xec9965={_0x67cf70:0x6e};function _0x592c43(_0x53d3e1,_0x41b3fe,_0xf1d1b9,_0x23f059){return _0x3598c4(_0x23f059-0x38b,_0x53d3e1,_0xf1d1b9-0x38,_0x23f059-0x103);}function _0x34aa94(_0x546481,_0x68df5f,_0x127f5f,_0x35bf6d){return _0x3e2360(_0x68df5f-0x164,_0x68df5f-0x18c,_0x35bf6d,_0x35bf6d-_0xec9965._0x67cf70);}if(_0x586376[_0x592c43(_0x1d54b2._0x2f5909,_0x1d54b2._0x145ef4,0x430,0x426)]!==_0x34aa94(0x388,_0x1d54b2._0x445274,_0x1d54b2._0x509186,0x365))return void 0x0;return{'type':'tool_use_chunk','index':_0x586376['index']??0x0,'messageId':_0x37642d,'chunk':{'type':_0x34aa94(0x338,_0x1d54b2._0x445274,0x39f,_0x1d54b2._0x2b38db),'id':_0x586376['id']??'','index':_0x586376['index']??0x0,..._0x586376[_0x34aa94(_0x1d54b2._0x259177,_0x1d54b2._0x31b1a0,_0x1d54b2._0x1c3e98,_0x1d54b2._0x416236)]!==void 0x0?{'name':_0x586376[_0x592c43(0x463,0x42b,_0x1d54b2._0x4b8a5c,0x447)]}:{},..._0x586376[_0x34aa94(_0x1d54b2._0x4c743d,_0x1d54b2._0x3497f3,0x31c,0x370)]!==void 0x0?{'inputDelta':_0x586376[_0x34aa94(_0x1d54b2._0x3732ac,_0x1d54b2._0x513e8c,0x307,0x2f7)]}:{}}};}function createReasoningChunkEvent(_0x11b013,_0x22f43c){const _0x544f43={_0x5d6b9a:0x245,_0x4c7c0d:0x1d5,_0x2fa612:0x2a3,_0x4356da:0x22d,_0x347569:0x2b1,_0x52217a:0x2c3,_0xd4eca4:0x2c3,_0x2b4161:0x274,_0x3ab022:0x250,_0x43717f:0x2b9,_0x2a57c4:0x268,_0xcb5636:0x280,_0x4f1399:0x23a,_0x5aa8ad:0x1fe,_0x37ccce:0x20d,_0x356914:0x28e,_0x38d467:0x2ba,_0x577a7c:0x201,_0x411bc6:0x22f,_0x9f7565:0x1d3,_0x3cbdeb:0x273,_0x4a3fc2:0x241,_0x49ae59:0x2c0,_0x3c1079:0x27e,_0x57e7eb:0x26e,_0x2d7fd5:0x256,_0x118591:0x211,_0x35d18a:0x2a4,_0x16fb5c:0x264,_0xf3a8c8:0x2e4,_0x45d353:0x2d0,_0x45e5b1:0x2e1,_0x344797:0x2e0,_0x3790d4:0x2f6,_0x29c7c0:0x2e7,_0xb2e0bb:0x283,_0x4a6599:0x1cb,_0x2807c5:0x21b,_0x39e557:0x292,_0x553fec:0x28b},_0x1222ab={_0x35260e:0x77,_0x44632f:0x165},_0xbfd376={_0x27ffa4:0x1e9};function _0x2da1f8(_0x54bc7b,_0x3393ec,_0x5dedb5,_0x4c04d0){return _0x3e2360(_0x54bc7b- -0x8,_0x3393ec-_0xbfd376._0x27ffa4,_0x3393ec,_0x4c04d0-0x127);}function _0x222d84(_0x375980,_0x15a59a,_0x12f11e,_0x275e39){return _0x3e2360(_0x275e39-_0x1222ab._0x35260e,_0x15a59a-_0x1222ab._0x44632f,_0x15a59a,_0x275e39-0x193);}switch(_0x11b013[_0x2da1f8(_0x544f43._0x5d6b9a,0x247,0x23f,0x296)]){case _0x2da1f8(0x1f5,_0x544f43._0x4c7c0d,0x212,0x1a1):return{'type':_0x222d84(_0x544f43._0x2fa612,0x20e,_0x544f43._0x4356da,0x251),'index':_0x11b013['index'],'messageId':_0x22f43c,'chunk':{'type':_0x222d84(_0x544f43._0x347569,_0x544f43._0x52217a,_0x544f43._0xd4eca4,_0x544f43._0x2b4161),'index':_0x11b013[_0x222d84(0x312,0x330,0x294,0x2dc)]??0x0,'thinking':_0x11b013[_0x222d84(_0x544f43._0x3ab022,0x24c,_0x544f43._0x43717f,_0x544f43._0x2a57c4)]??''},'text':_0x11b013['thinking']??''};case'openai_reasoning_delta':return{'type':'reasoning_chunk','index':_0x11b013[_0x222d84(_0x544f43._0xcb5636,_0x544f43._0x4f1399,0x261,0x250)],'messageId':_0x22f43c,'chunk':{'type':_0x2da1f8(0x20d,_0x544f43._0x5aa8ad,_0x544f43._0x37ccce,0x1d3),'contentIndex':_0x11b013['contentIndex']??0x0,'delta':_0x11b013[_0x222d84(0x274,_0x544f43._0x356914,0x2eb,_0x544f43._0x38d467)]??'','itemId':_0x11b013[_0x222d84(0x331,0x2dc,0x305,0x2e7)]??'','outputIndex':_0x11b013[_0x2da1f8(_0x544f43._0x577a7c,_0x544f43._0x4c7c0d,_0x544f43._0x411bc6,_0x544f43._0x9f7565)]??0x0},'text':_0x11b013[_0x2da1f8(0x23b,0x20a,_0x544f43._0x3cbdeb,_0x544f43._0x4a3fc2)]??''};case _0x222d84(0x322,0x2e6,_0x544f43._0x49ae59,0x2d5):return{'type':'reasoning_chunk','index':_0x11b013[_0x222d84(_0x544f43._0x3c1079,0x206,_0x544f43._0x57e7eb,0x24c)],'messageId':_0x22f43c,'chunk':{'type':_0x2da1f8(_0x544f43._0x2d7fd5,_0x544f43._0x118591,_0x544f43._0x35d18a,_0x544f43._0x16fb5c),'delta':_0x11b013[_0x222d84(_0x544f43._0xf3a8c8,_0x544f43._0x45d353,_0x544f43._0x45e5b1,0x2ba)]??'','itemId':_0x11b013[_0x222d84(0x2d6,_0x544f43._0x344797,_0x544f43._0x3790d4,_0x544f43._0x29c7c0)]??'','outputIndex':_0x11b013[_0x222d84(0x260,_0x544f43._0xb2e0bb,0x266,0x280)]??0x0,'summaryIndex':_0x11b013[_0x2da1f8(0x1cd,_0x544f43._0x4a6599,_0x544f43._0x2807c5,0x1f3)]??0x0},'text':_0x11b013[_0x222d84(0x2ba,_0x544f43._0x39e557,_0x544f43._0x553fec,0x2ba)]??''};default:return void 0x0;}}function isAbortedToolResult(_0x1dd3f7){const _0x1d54b0={_0x256b06:0x514,_0x4f4a66:0x559,_0x4db201:0x509,_0x69225e:0x503,_0x324680:0x4d3,_0x294b42:0x489},_0x3c149d={_0x5ba44d:0x186},_0x26769a={_0x647574:0xd7};function _0xd4d20e(_0x4577cf,_0x32bff9,_0x2fc010,_0x40e103){return _0x3e2360(_0x2fc010-0x2e3,_0x32bff9-0xbf,_0x4577cf,_0x40e103-_0x26769a._0x647574);}function _0xf462d(_0x4f71ea,_0x183e18,_0x5dc087,_0x555dad){return _0x3598c4(_0x4f71ea-0x2e3,_0x555dad,_0x5dc087-0xe5,_0x555dad-_0x3c149d._0x5ba44d);}return _0x1dd3f7[_0xd4d20e(0x513,0x51d,_0x1d54b0._0x256b06,_0x1d54b0._0x4f4a66)]===_0xd4d20e(0x523,0x4fb,0x501,0x536)&&_0x1dd3f7[_0xd4d20e(_0x1d54b0._0x4db201,_0x1d54b0._0x69225e,_0x1d54b0._0x324680,_0x1d54b0._0x294b42)]['aborted']===!![];}async function executeModelRequest(_0x5cd5a0,_0x2ac9a2,_0x287d5c,_0x519730,_0x55768d){const _0x8849cd={_0x1e251d:0x3c7,_0x384df2:0x3c8,_0x5efaff:0x3a7,_0x25d9d3:0x3dd,_0x257d42:0x548,_0x312bc7:0x45d,_0x24b2e0:0x56c,_0x5e1da9:0x44f,_0x1776a9:0x530,_0x1a76b8:0x51a,_0x1a0d49:0x4ad,_0x139f16:0x469,_0x3eb320:0x3ac,_0x567d4d:0x3a7,_0x27dcb3:0x35f,_0x4af374:0x36e,_0x3f7bc8:0x3db,_0x4fb15e:0x3d6,_0x36d54a:0x519,_0x30296b:0x556,_0x1ce6bd:0x523,_0xa9e4b0:0x51d,_0x40dc75:0x46c,_0x2cc249:0x3cf,_0x516095:0x3c6,_0x190edd:0x4b8,_0x2b9d04:0x509,_0x1f7c27:0x4a0,_0x4a42f2:0x4ef,_0x2a450c:0x4ee,_0x5ae156:0x456,_0x590077:0x494,_0x1b8f84:0x3d8,_0x18c102:0x434,_0x287d7c:0x4f6,_0x3f4e9e:0x567,_0x265d24:0x52b},_0x372b53={_0x401324:0xc7},_0x430b6d={_0x1338f8:0x376,_0x3629bc:0xed};throwIfAborted(_0x2ac9a2[_0x4ca85d(_0x8849cd._0x1e251d,_0x8849cd._0x384df2,_0x8849cd._0x5efaff,_0x8849cd._0x25d9d3)]);function _0x4ca85d(_0x3a3ebe,_0x353dd2,_0x5d6efd,_0x184c9f){return _0x3598c4(_0x5d6efd-_0x430b6d._0x1338f8,_0x353dd2,_0x5d6efd-_0x430b6d._0x3629bc,_0x184c9f-0x131);}if(!_0x2ac9a2[_0x5f2c18(_0x8849cd._0x257d42,0x55b,0x525,0x51f)]||!_0x287d5c[_0x4ca85d(0x42e,0x41a,0x41c,_0x8849cd._0x312bc7)][_0x5f2c18(0x482,0x4ca,0x4b2,0x48b)])return await _0x287d5c[_0x5f2c18(0x541,_0x8849cd._0x24b2e0,0x50b,0x51a)][_0x4ca85d(0x3af,0x3f9,0x3ff,_0x8849cd._0x5e1da9)](_0x5cd5a0,{'signal':_0x2ac9a2['signal']});let _0x2937f6;function _0x5f2c18(_0x19021f,_0xab247c,_0x5687bf,_0x14fcbb){return _0x3e2360(_0x14fcbb-0x2c2,_0xab247c-0x124,_0x19021f,_0x14fcbb-_0x372b53._0x401324);}for await(const _0x133139 of _0x287d5c[_0x5f2c18(0x50d,_0x8849cd._0x1776a9,0x4dc,_0x8849cd._0x1a76b8)][_0x5f2c18(0x4d5,_0x8849cd._0x1a0d49,_0x8849cd._0x139f16,0x48b)](_0x5cd5a0,{'signal':_0x2ac9a2[_0x4ca85d(_0x8849cd._0x3eb320,0x354,_0x8849cd._0x567d4d,0x3da)]})){throwIfAborted(_0x2ac9a2[_0x4ca85d(_0x8849cd._0x27dcb3,_0x8849cd._0x4af374,0x3a7,0x372)]);if(_0x133139[_0x4ca85d(_0x8849cd._0x3f7bc8,0x43b,0x411,_0x8849cd._0x4fb15e)]==='done'){_0x2937f6=_0x133139[_0x5f2c18(_0x8849cd._0x36d54a,_0x8849cd._0x30296b,_0x8849cd._0x1ce6bd,_0x8849cd._0xa9e4b0)];continue;}if(_0x133139['type']==='provider_retry'){await emitEvent2(_0x287d5c['onEvent'],_0x133139,_0x519730);continue;}const _0x1859a0=createReasoningChunkEvent(_0x133139,_0x55768d['reasoningMessageId']);if(_0x1859a0&&_0x1859a0[_0x5f2c18(0x4e9,0x4e8,0x4be,0x50f)]===_0x5f2c18(0x4ce,0x4a8,_0x8849cd._0x40dc75,0x49c)&&_0x1859a0[_0x4ca85d(_0x8849cd._0x2cc249,_0x8849cd._0x516095,0x389,0x3d0)][_0x5f2c18(_0x8849cd._0x190edd,0x4d8,0x4e8,0x4f2)]>0x0){await emitEvent2(_0x287d5c[_0x5f2c18(_0x8849cd._0x2b9d04,_0x8849cd._0x1f7c27,_0x8849cd._0x4a42f2,_0x8849cd._0x2a450c)],_0x1859a0,_0x519730);continue;}const _0x4ee28e=createAssistantChunkEvent(_0x133139,_0x55768d[_0x5f2c18(0x4a0,_0x8849cd._0x5ae156,0x4e7,_0x8849cd._0x590077)]);if(_0x4ee28e){await emitEvent2(_0x287d5c[_0x4ca85d(0x423,_0x8849cd._0x1b8f84,0x3f0,_0x8849cd._0x18c102)],_0x4ee28e,_0x519730);continue;}const _0x330ebb=createToolUseChunkEvent(_0x133139,_0x55768d[_0x5f2c18(0x4c9,0x497,0x4d1,0x494)]);_0x330ebb&&await emitEvent2(_0x287d5c[_0x5f2c18(0x536,0x4d3,0x4ee,0x4ee)],_0x330ebb,_0x519730);}if(!_0x2937f6)throw new Error(_0x5f2c18(_0x8849cd._0x287d7c,_0x8849cd._0x3f4e9e,0x56a,_0x8849cd._0x265d24));return _0x2937f6;}function _0x3e2360(_0x369076,_0x3b739e,_0x26d084,_0x167abf){return _0x1970(_0x369076-0xfa,_0x26d084);}function makeTurnGuards(_0x21f60c,_0x101040,_0x215fb1,_0x5417f9,_0x1a68ab){return{async 'stage'(_0x5ac634,_0x3fe0fb){return throwIfAborted(_0x21f60c),await runStage(_0x101040,_0x5ac634,_0x3fe0fb,_0x5417f9);},async 'emit'(_0x3b5323){throwIfAborted(_0x21f60c),await emitEvent2(_0x215fb1,_0x3b5323,_0x1a68ab);},async 'stageUnchecked'(_0x13b1d6,_0x5ca94f){return await runStage(_0x101040,_0x13b1d6,_0x5ca94f,_0x5417f9);},async 'emitUnchecked'(_0x2d2110){await emitEvent2(_0x215fb1,_0x2d2110,_0x1a68ab);}};}async function runTurn(_0x4ecd21,_0x5f2080){const _0x569513={_0x122ff0:0xf0,_0x37bc3d:0x142,_0x51f829:0x106,_0x203b80:0x14e,_0x3c7042:0x42,_0x1db43d:0x3e,_0x2b6f2f:0x12a,_0x389814:0x14b,_0x1687ec:0x1df,_0x49f491:0xd1,_0x1626ce:0x15b,_0x3a837e:0x1c5,_0x35204f:0x1c8,_0xad3ef8:0x16d,_0x67c604:0x14a,_0x4d8447:0x7b,_0x2e05b7:0x15,_0x38fe99:0x8b,_0x2be255:0x44,_0xe55d35:0x97,_0x8bd318:0x114,_0x247ef1:0x4e,_0x187327:0x67,_0x3c9d67:0x3a,_0x5dec0c:0x1cb,_0x3c6430:0x1c0,_0x42e00a:0x1c7,_0x2c9b21:0x1c6,_0x576a96:0x1d2,_0x325e86:0x183,_0x3f1e2a:0x169,_0x18fc93:0x182,_0x537abe:0x1a6,_0x3284ff:0x40,_0x4eb46a:0x62,_0x5cf7af:0x1e8,_0x1ba097:0x1b8,_0x42658d:0x13e,_0x22812a:0x104,_0x849e5d:0x19,_0x79a889:0x20c,_0x1bb8bd:0x16e,_0x9ff3ba:0x1b9,_0x1564c2:0x9d,_0x3936a4:0x19,_0xfdec40:0x8,_0x2b1e84:0x3b,_0x5a423b:0x20,_0x3de0fb:0x10c,_0x236403:0x125,_0x3460c7:0x163,_0x24626c:0x86,_0x9d2cf6:0x2f,_0x39c1f8:0xf6,_0x3a55b0:0x13c,_0x3ca57e:0x110,_0x4e39b3:0x186,_0x187392:0x12a,_0x18fd3f:0x10d,_0xcf22f4:0x1ad,_0x252022:0x180,_0x5e5821:0x1ae,_0x2a3196:0x1a8,_0x392657:0x1d7,_0x3104ee:0x18,_0xa1de6c:0x21,_0x3581e7:0x2b,_0x3fe5a4:0x46,_0x5e0a72:0x7a,_0x3a5451:0x54,_0x10e9fe:0xf4,_0x411734:0x178,_0x5dc03d:0x170,_0x4fe438:0x175,_0x3e421f:0x122,_0x666adf:0x16f,_0x46ea63:0x1a9,_0x2f56db:0x1f8,_0xdbe6cf:0x194,_0x484edd:0xdf,_0x21adce:0xe0,_0x444e4a:0xe8,_0x1bf3bf:0x70,_0x275b1a:0x3f,_0x47ced0:0x29,_0x1ac857:0x1c6,_0x56dbd0:0x4d,_0x5e0578:0x14,_0x57fbe3:0x8,_0x1af2af:0x28,_0x2bc461:0x5d,_0x2ce3b3:0x33,_0x21e75e:0x160,_0x1eae5b:0x188,_0x4919f8:0xea,_0x39ba0a:0x1a1,_0x2c455b:0x1c4,_0x5f34fc:0x166,_0x32340e:0x52,_0x20ac4d:0x7d,_0x1c0f77:0x187,_0x5953dd:0x15f,_0xf688e7:0x17f,_0x388347:0x48,_0x16fa90:0xf,_0x192cec:0x26,_0x235307:0x14d,_0x5efaf1:0xfb,_0xfe6482:0x1b3,_0x512e27:0x1d6,_0x46634f:0x9,_0x16425c:0x4b,_0x187cf9:0xf5,_0x41ce30:0x121,_0x4a8a97:0x179,_0x5b536a:0xec,_0x9bfc22:0x15c,_0x40d5f7:0x1cb,_0xc69819:0x167,_0x576f35:0x157,_0x1e1d7f:0xf9,_0x494258:0x5a,_0x13003b:0x1c1,_0x18e4e8:0x181,_0x4a853d:0x197,_0x538f28:0x1c5,_0x356435:0x13b},_0x1ff729={_0x54f351:0x2a2,_0x391de8:0x28f,_0x4e24d4:0x274,_0x302109:0x2b2,_0x392edb:0x283},_0x5f5a98={_0x50a921:0x18f,_0x455cf1:0x1d7},_0x31d5fc={_0x2418df:0x56,_0x2e9534:0x1b8},_0x46d71c={_0x2c8f3f:0x1f1},_0x2eabf1=_0x4ecd21[_0x36b13d(_0x569513._0x122ff0,_0x569513._0x37bc3d,_0x569513._0x51f829,_0x569513._0x203b80)]??new AbortController()[_0x5969ab(-_0x569513._0x3c7042,0x21,-_0x569513._0x1db43d,-0x25)],_0xc36399={'sessionId':_0x4ecd21[_0x36b13d(0xe5,_0x569513._0x2b6f2f,0x178,0x17f)],'turnId':_0x4ecd21[_0x36b13d(0x17d,0x180,_0x569513._0x389814,0x17d)],'system':normalizeSystem(_0x4ecd21[_0x36b13d(0x1b6,0x1ae,0x1fa,_0x569513._0x1687ec)]),'messages':(_0x4ecd21['messages']??[])[_0x36b13d(_0x569513._0x49f491,0x126,0xf0,_0x569513._0x1626ce)](normalizeMessage),'lastResponse':void 0x0,'toolResults':[],'finalMessage':void 0x0,'sessionDir':typeof _0x5f2080[_0x36b13d(0x1da,_0x569513._0x3a837e,0x1e8,_0x569513._0x35204f)]===_0x36b13d(0x1a5,0x19e,_0x569513._0xad3ef8,_0x569513._0x67c604)?_0x5f2080[_0x5969ab(_0x569513._0x4d8447,_0x569513._0x2e05b7,_0x569513._0x38fe99,0x5e)]():_0x5f2080[_0x5969ab(_0x569513._0x2be255,0xa6,_0x569513._0xe55d35,0x5e)]},_0x165bc3=makeExtensionContext(_0xc36399);function _0x36b13d(_0x381847,_0x2768a8,_0x40862e,_0x3bd0d4){return _0x3598c4(_0x2768a8-0x111,_0x381847,_0x40862e-0x18f,_0x3bd0d4-_0x46d71c._0x2c8f3f);}function _0x5969ab(_0x461175,_0x2914aa,_0x22f7cd,_0x58c11c){return _0x3598c4(_0x58c11c- -_0x31d5fc._0x2418df,_0x461175,_0x22f7cd-_0x31d5fc._0x2e9534,_0x58c11c-0xe1);}const _0x1c87a3={'sessionId':_0xc36399[_0x36b13d(0x12a,_0x569513._0x2b6f2f,_0x569513._0x8bd318,0x11c)],'turnId':_0xc36399[_0x5969ab(_0x569513._0x247ef1,_0x569513._0x187327,_0x569513._0x3c9d67,0x19)],'state':_0xc36399,'signal':_0x2eabf1,..._0x5f2080[_0x36b13d(0x1a8,_0x569513._0x5dec0c,_0x569513._0x3c6430,_0x569513._0x42e00a)]?{'askUser':_0x5f2080[_0x36b13d(0x1f3,0x1cb,_0x569513._0x2c9b21,0x19c)]}:{},..._0x5f2080[_0x36b13d(_0x569513._0x576a96,_0x569513._0x325e86,0x16f,_0x569513._0x3f1e2a)]?{'setTopic':_0x5f2080[_0x36b13d(0x13f,0x183,0x169,_0x569513._0x18fc93)]}:{}},{stage:_0x2c5e87,emit:_0x5e35f6,stageUnchecked:_0x488450,emitUnchecked:_0x4579e5}=makeTurnGuards(_0x2eabf1,_0x5f2080[_0x36b13d(0x17f,_0x569513._0x537abe,0x1e9,0x1c4)],_0x5f2080[_0x5969ab(0x71,0x68,0x31,0x24)],_0x165bc3,_0x1c87a3),_0x21534f=async _0x5537e4=>{const _0x5edee8={_0x42861a:0x38,_0x2f32f2:0xdd,_0x19f7ba:0x263};function _0x174d0b(_0x3dd056,_0x214a95,_0x256e9a,_0x44a49a){return _0x36b13d(_0x3dd056,_0x44a49a-_0x5f5a98._0x50a921,_0x256e9a-_0x5f5a98._0x455cf1,_0x44a49a-0x1d2);}function _0x9a7ac6(_0x497cde,_0x44419b,_0x167826,_0x5d5815){return _0x5969ab(_0x167826,_0x44419b-_0x5edee8._0x42861a,_0x167826-_0x5edee8._0x2f32f2,_0x497cde-_0x5edee8._0x19f7ba);}await _0x5f2080[_0x9a7ac6(_0x1ff729._0x54f351,_0x1ff729._0x391de8,0x288,_0x1ff729._0x4e24d4)][_0x174d0b(_0x1ff729._0x302109,_0x1ff729._0x302109,0x29e,0x2ee)](_0x174d0b(_0x1ff729._0x392edb,0x28a,0x29b,0x2bf),structuredClone(_0x5537e4),_0x165bc3);};let _0x446b2f=0x0;try{const _0x4b008e=await _0x2c5e87(_0x5969ab(0x3b,0x1e,_0x569513._0x3284ff,_0x569513._0x4eb46a),normalizeMessage(_0x4ecd21[_0x36b13d(0x1bd,0x1c2,_0x569513._0x5cf7af,_0x569513._0x1ba097)]));_0xc36399['messages'][_0x36b13d(_0x569513._0x203b80,_0x569513._0x42658d,0x111,_0x569513._0x22812a)](_0x4b008e),await _0x21534f(_0x4b008e),await _0x5e35f6({'type':'user_message','message':_0x4b008e});while(!![]){throwIfAborted(_0x2eabf1),_0x446b2f+=0x1;const _0x51764a=createAssistantMessageId(_0xc36399[_0x5969ab(0x5a,0x1c,0x35,_0x569513._0x849e5d)],_0x446b2f),_0x46e247=createReasoningMessageId(_0x51764a);let _0x48e439={'model':_0x5f2080[_0x36b13d(_0x569513._0x79a889,0x1b7,_0x569513._0x1bb8bd,0x1a1)][_0x36b13d(0x1e7,0x1a4,0x1f6,_0x569513._0x9ff3ba)],'maxTokens':_0x5f2080[_0x5969ab(0x3b,_0x569513._0x1564c2,_0x569513._0x3936a4,0x50)][_0x5969ab(-_0x569513._0xfdec40,_0x569513._0x2b1e84,0x46,0x26)]??0x4000,'system':structuredClone(_0xc36399[_0x5969ab(0x4b,0x5c,_0x569513._0x5a423b,0x47)]),'messages':structuredClone(_0xc36399[_0x36b13d(_0x569513._0x3de0fb,_0x569513._0x236403,0x144,_0x569513._0x3460c7)]),'tools':_0x5f2080[_0x5969ab(0x74,_0x569513._0x24626c,_0x569513._0x9d2cf6,0x4c)][_0x36b13d(_0x569513._0x39c1f8,_0x569513._0x3a55b0,_0x569513._0x3ca57e,_0x569513._0x4e39b3)](),'metadata':{'sessionId':_0xc36399[_0x36b13d(0x10e,_0x569513._0x187392,_0x569513._0x18fd3f,0xf1)],'turnId':_0xc36399[_0x36b13d(_0x569513._0xcf22f4,_0x569513._0x252022,_0x569513._0x5e5821,_0x569513._0x2a3196)]}};_0x48e439=await _0x2c5e87(_0x36b13d(0x190,_0x569513._0x9ff3ba,_0x569513._0x392657,0x16d),_0x48e439),await _0x5e35f6({'type':_0x36b13d(0x1e2,0x1c6,0x18a,0x1bb),'request':_0x48e439});let _0x2aeb59=await executeModelRequest(_0x48e439,_0x4ecd21,_0x5f2080,_0x1c87a3,{'assistantMessageId':_0x51764a,'reasoningMessageId':_0x46e247});_0x2aeb59=await _0x2c5e87(_0x5969ab(0x7,_0x569513._0x3104ee,_0x569513._0xa1de6c,0x51),_0x2aeb59),await _0x5e35f6({'type':'model_response','response':_0x2aeb59}),_0xc36399[_0x5969ab(_0x569513._0x3581e7,_0x569513._0x3fe5a4,0x34,0x34)]=_0x2aeb59;let _0x3ffda0=await _0x2c5e87('beforeAssistantAppend',withMessageId(responseToAssistantMessage(_0x2aeb59),_0x51764a));_0x3ffda0=withMessageId(_0x3ffda0,_0x51764a);const _0x56f733=getToolUseBlocks(_0x3ffda0),_0x95a6b8=await Promise[_0x5969ab(_0x569513._0x5e0a72,0xa0,_0x569513._0x3a5451,0x54)](_0x56f733[_0x36b13d(_0x569513._0x10e9fe,0x126,0x158,_0x569513._0x411734)](_0x179af4=>_0x2c5e87(_0x5969ab(0x42,0x84,0x4f,0x3e),_0x179af4)));_0x95a6b8['length']>0x0&&(_0x3ffda0=replaceToolUseBlocks(_0x3ffda0,_0x95a6b8));const _0x32f8d3=withMessageId(_0x3ffda0,_0x51764a);_0x3ffda0=_0x32f8d3;const _0x19d617=createReasoningMessage(_0x3ffda0),_0x3c5a87=createAssistantTextMessage(_0x3ffda0),_0x4db060=createToolUseMessage(_0x3ffda0);_0x19d617&&await _0x5e35f6({'type':_0x36b13d(_0x569513._0x5dc03d,0x16a,_0x569513._0x4fe438,_0x569513._0x3e421f),'message':withMessageId(_0x19d617,_0x46e247)});_0x3c5a87&&await _0x5e35f6({'type':'assistant_message','message':withMessageId(_0x3c5a87,_0x51764a)});_0x4db060&&await _0x5e35f6({'type':_0x36b13d(_0x569513._0x666adf,_0x569513._0x46ea63,_0x569513._0x2f56db,_0x569513._0xdbe6cf),'message':withMessageId(_0x4db060,_0x51764a)});_0xc36399[_0x36b13d(_0x569513._0x484edd,0x125,_0x569513._0x21adce,_0x569513._0x444e4a)][_0x5969ab(-_0x569513._0x1bf3bf,-_0x569513._0x275b1a,-0x4f,-_0x569513._0x47ced0)](_0x32f8d3);_0x95a6b8[_0x36b13d(_0x569513._0x1ac857,0x18f,0x1cd,0x1de)]>0x0&&await _0x21534f(_0x32f8d3);for(const _0x4d3380 of _0x95a6b8){await _0x5e35f6({'type':'tool_call','toolCall':_0x4d3380});}if(_0x95a6b8[_0x5969ab(_0x569513._0x56dbd0,-_0x569513._0x5e0578,-_0x569513._0x57fbe3,_0x569513._0x1af2af)]===0x0){const _0x841857=await _0x2c5e87(_0x5969ab(-0x34,-_0x569513._0x2bc461,-_0x569513._0x2ce3b3,-0x1c),_0x3ffda0),_0x3a9d5c=withMessageId(_0x841857,_0x51764a);return _0xc36399[_0x36b13d(_0x569513._0x21e75e,_0x569513._0x1eae5b,0x136,0x15b)]=_0x3a9d5c,_0xc36399[_0x5969ab(-0x83,-0x87,-0x7b,-_0x569513._0x3c7042)][_0xc36399[_0x36b13d(0x130,0x125,_0x569513._0x4919f8,0xd9)]['length']-0x1]=_0x3a9d5c,await _0x21534f(_0x3a9d5c),await _0x5e35f6({'type':_0x36b13d(_0x569513._0x35204f,_0x569513._0x39ba0a,_0x569513._0x2c455b,_0x569513._0x5f34fc),'message':_0x3a9d5c}),throwIfAborted(_0x2eabf1),await _0x5f2080[_0x5969ab(_0x569513._0x32340e,_0x569513._0x20ac4d,0x45,0x3f)][_0x36b13d(_0x569513._0x1c0f77,_0x569513._0x5953dd,_0x569513._0xf688e7,0x1a0)](_0x5969ab(-_0x569513._0x388347,_0x569513._0x16fa90,_0x569513._0x192cec,-0x3),_0xc36399,_0x165bc3),await _0x5e35f6({'type':_0x36b13d(_0x569513._0x235307,0x12b,0xef,_0x569513._0x5efaf1),'state':_0xc36399}),{'status':'completed','finalMessage':_0x3a9d5c,'state':_0xc36399};}let _0x4441bc=await _0x5f2080[_0x36b13d(0x1ec,_0x569513._0xfe6482,_0x569513._0x512e27,0x184)]['executeCalls'](_0x95a6b8,_0x1c87a3);const _0x5d41c5=_0x4441bc[_0x5969ab(_0x569513._0x46634f,-0x29,_0x569513._0x16425c,-0x2)](isAbortedToolResult),_0x505534=_0x5d41c5?_0x488450:_0x2c5e87,_0x3168a4=_0x5d41c5?_0x4579e5:_0x5e35f6;_0x4441bc=await Promise['all'](_0x4441bc[_0x36b13d(_0x569513._0x187cf9,0x126,_0x569513._0x41ce30,0x11d)](_0x34409e=>_0x505534(_0x5969ab(0x1b,0x38,0x56,0xe),_0x34409e))),_0xc36399['toolResults'][_0x5969ab(0x26,0x20,-0x5c,-0x29)](..._0x4441bc);for(const _0x1ed386 of _0x4441bc){await _0x3168a4({'type':_0x36b13d(_0x569513._0x4a8a97,0x123,0x135,_0x569513._0x5b536a),'result':_0x1ed386});}const _0x297c72=await _0x505534(_0x36b13d(_0x569513._0x9bfc22,0x17f,_0x569513._0x40d5f7,_0x569513._0x1c0f77),createToolResultUserMessage(_0x4441bc));await _0x3168a4({'type':_0x36b13d(_0x569513._0xc69819,_0x569513._0x3460c7,_0x569513._0x576f35,0x138),'message':_0x297c72}),_0xc36399[_0x36b13d(_0x569513._0x1e1d7f,0x125,0x157,0x103)][_0x5969ab(-0x40,-_0x569513._0x494258,_0x569513._0x47ced0,-_0x569513._0x47ced0)](_0x297c72),await _0x21534f(_0x297c72);if(_0x5d41c5)return{'status':_0x36b13d(_0x569513._0x13003b,_0x569513._0x18e4e8,_0x569513._0x4a853d,0x187),'state':_0xc36399};}}catch(_0x3cd923){if(!_0x2eabf1[_0x36b13d(_0x569513._0x2a3196,_0x569513._0x18e4e8,_0x569513._0x538f28,0x14a)])throw new TurnFailedError(_0x3cd923,_0xc36399);return{'status':_0x36b13d(0x13a,0x181,_0x569513._0x356435,0x1d3),'state':_0xc36399};}}function createSessionId(){const _0x3114af={_0x94c5a2:0x124,_0x4400df:0x107,_0x28b05d:0x1a4,_0x78438f:0xfe,_0x5d6efe:0x16a,_0x2faa8f:0x142,_0x35fbdf:0x153},_0x255dc3={_0x384db3:0x34};function _0xba1fbc(_0x3cdfd4,_0x3de5b1,_0x597447,_0x52bfeb){return _0x3e2360(_0x3cdfd4- -0xf2,_0x3de5b1-0x17d,_0x597447,_0x52bfeb-_0x255dc3._0x384db3);}function _0x2b9981(_0x379755,_0x36d705,_0x396e1c,_0x320df7){return _0x3e2360(_0x320df7-0x118,_0x36d705-0x18e,_0x379755,_0x320df7-0x1df);}return _0xba1fbc(0xdc,_0x3114af._0x94c5a2,_0x3114af._0x4400df,0xce)+Date[_0xba1fbc(0x152,_0x3114af._0x28b05d,0x124,_0x3114af._0x78438f)]()+'-'+Math['random']()[_0xba1fbc(0x17b,_0x3114af._0x5d6efe,0x137,_0x3114af._0x2faa8f)](0x10)[_0xba1fbc(0x15f,0x140,0x183,_0x3114af._0x35fbdf)](0x2,0xa);}function createTurnId(_0x3740f4){const _0x1799af={_0x27bade:0x418},_0x1176b1={_0x33c9e0:0x3d1,_0x15809a:0x22};function _0x37877b(_0x2a753c,_0x3cceed,_0x267ece,_0x1f30e8){return _0x3598c4(_0x2a753c-_0x1176b1._0x33c9e0,_0x267ece,_0x267ece-_0x1176b1._0x15809a,_0x1f30e8-0xf3);}return _0x37877b(_0x1799af._0x27bade,0x41b,0x40e,0x432)+_0x3740f4;}function createDefaultMessage(_0x5d5b9d){if(_0x5d5b9d===void 0x0)return void 0x0;return normalizeUserInput(_0x5d5b9d);}function normalizeUserInput(_0x18e7fd){const _0x470784={_0x141806:0x112,_0x2e27b0:0x1b5,_0x9d779e:0x168,_0x4a907f:0x40a,_0x364e7a:0x3e7,_0x38c07c:0x428},_0x2ffba9={_0x3af944:0xd8,_0x3d601c:0x120},_0x22c0fa={_0x4ed204:0x7c};function _0x1976d3(_0x2df8cd,_0x54f905,_0x3af247,_0x4c3785){return _0x3e2360(_0x2df8cd-0x245,_0x54f905-0x1ec,_0x3af247,_0x4c3785-_0x22c0fa._0x4ed204);}if(typeof _0x18e7fd===_0x14c5dc(0x157,0x115,0x18f,0x139))return{'role':_0x14c5dc(0x113,_0x470784._0x141806,_0x470784._0x2e27b0,_0x470784._0x9d779e),'content':[{'type':_0x1976d3(_0x470784._0x4a907f,_0x470784._0x364e7a,0x3d8,_0x470784._0x38c07c),'text':_0x18e7fd}]};function _0x14c5dc(_0x5c9566,_0x322bdf,_0x22f7c9,_0xb8148b){return _0x3e2360(_0xb8148b- -_0x2ffba9._0x3af944,_0x322bdf-_0x2ffba9._0x3d601c,_0x22f7c9,_0xb8148b-0x50);}return normalizeMessage(_0x18e7fd);}function resolveChatModel(_0x143267){const _0xde0a6a={_0x4a0d20:0x448,_0x4fc96c:0x3ec,_0x21dea1:0x441,_0x191d14:0x478,_0x31b4be:0x4a1,_0x29848a:0x451,_0x4b02b5:0x2b0,_0x149e6f:0x304,_0x369253:0x322},_0x212fbe={_0x42ee4d:0x1e9,_0xcf4fc5:0x4e,_0x2005d1:0x1},_0x249dc7={_0x18676b:0x155,_0x48585c:0x183};function _0x4bc708(_0x5515bf,_0x40d287,_0x37019a,_0x320428){return _0x3598c4(_0x37019a-0x226,_0x320428,_0x37019a-_0x249dc7._0x18676b,_0x320428-_0x249dc7._0x48585c);}function _0x4d5f06(_0x5c3c83,_0x1f533f,_0x1ec6e5,_0x244dde){return _0x3e2360(_0x244dde-_0x212fbe._0x42ee4d,_0x1f533f-_0x212fbe._0xcf4fc5,_0x5c3c83,_0x244dde-_0x212fbe._0x2005d1);}if(!_0x143267[_0x4d5f06(0x463,_0xde0a6a._0x4a0d20,_0xde0a6a._0x4fc96c,_0xde0a6a._0x21dea1)])throw new Error(_0x4d5f06(0x42c,_0xde0a6a._0x191d14,_0xde0a6a._0x31b4be,_0xde0a6a._0x29848a));return _0x143267[_0x4bc708(_0xde0a6a._0x4b02b5,_0xde0a6a._0x149e6f,0x2cc,_0xde0a6a._0x369253)];}function createRegistry(_0x1216a8){const _0x58998d={_0x550b77:0x20c,_0x5a8605:0x238,_0x614ce2:0x250,_0x1e5ce9:0x194,_0x10194d:0x172,_0x120cdc:0x1fc},_0x2f4929={_0xb2b388:0x15},_0x28ad76={_0x5e9159:0x1ad};if(_0x1216a8[_0x520d9a(_0x58998d._0x550b77,_0x58998d._0x5a8605,0x1bc,_0x58998d._0x614ce2)])return _0x1216a8[_0x520d9a(0x20c,0x231,0x1fa,0x252)];const _0x167362=createExtensionRegistry(),_0x5e5eca=_0x1216a8[_0x520d9a(_0x58998d._0x1e5ce9,0x1a8,0x17d,_0x58998d._0x10194d)]??[];function _0x520d9a(_0x3f337f,_0x22f948,_0x267094,_0x49803c){return _0x3e2360(_0x3f337f- -0x3b,_0x22f948-_0x28ad76._0x5e9159,_0x267094,_0x49803c-0x30);}function _0x5a59b2(_0x520d27,_0xe12488,_0x1d0ad0,_0x502d93){return _0x3e2360(_0x1d0ad0- -0x359,_0xe12488-_0x2f4929._0xb2b388,_0x502d93,_0x502d93-0x14d);}for(const _0xfd47e9 of _0x5e5eca){_0x167362[_0x520d9a(0x1b2,0x177,0x1b9,_0x58998d._0x120cdc)](_0xfd47e9);}return _0x167362;}var Agent=class{[_0x3598c4(0x4d,0x36,0x20,0x18)];['deps'];[_0x3e2360(0x212,0x212,0x219,0x1f2)];[_0x3598c4(0x19,0x38,-0x37,0xe)];['messages'];[_0x3598c4(0xaf,0x5b,0x9b,0x83)];[_0x3e2360(0x1eb,0x1f2,0x1d7,0x19e)];constructor(_0x15cf11={}){const _0x26a627={_0x3736ec:0x28c,_0x29b2c7:0x2a8,_0x49e7f4:0x2b8,_0x5a4e19:0x28f,_0x52f078:0x277,_0x1ac998:0x25e,_0x112ea6:0x25f,_0x284f34:0x25b,_0x136fab:0x22c,_0x1fae74:0x294,_0x450a16:0x2d0,_0x5eb09f:0x2ea,_0x40a27c:0x235,_0x1b1b1c:0x210,_0x2b2c7f:0x24a,_0x4b762f:0x22e,_0x348b0f:0x210,_0x28087b:0x232,_0x4f945d:0x262,_0x2605cc:0x288,_0x3448aa:0x1f4,_0x4e827d:0x216,_0x3ddb81:0x1ae},_0x55ba9d={_0x2936ff:0x22,_0x46db5d:0x2,_0x14d14e:0x45,_0x2f0a06:0x2c},_0x5168b4={_0x4de413:0x26a,_0xd9024e:0x172},_0x52ba8e={_0x4ef745:0x2a8,_0x28e56b:0x10b},_0x2d9a96={_0x3e1df9:0x1c0,_0x579c35:0x13c};this[_0x497762(-_0x26a627._0x3736ec,-_0x26a627._0x29b2c7,-0x251,-_0x26a627._0x49e7f4)]=_0x15cf11[_0x3e754f(-_0x26a627._0x5a4e19,-_0x26a627._0x52f078,-0x241,-_0x26a627._0x1ac998)]??createSessionId(),this[_0x497762(-0x283,-0x288,-_0x26a627._0x112ea6,-0x25b)]=0x0,this[_0x3e754f(-_0x26a627._0x284f34,-0x218,-_0x26a627._0x136fab,-0x247)]=_0x15cf11['systemPrompt']??'';function _0x497762(_0x382281,_0x25f0db,_0x362c16,_0xe79a2a){return _0x3598c4(_0x25f0db- -0x2c1,_0x362c16,_0x362c16-_0x2d9a96._0x3e1df9,_0xe79a2a-_0x2d9a96._0x579c35);}this[_0x3e754f(-_0x26a627._0x1fae74,-0x2cd,-_0x26a627._0x450a16,-_0x26a627._0x5eb09f)]=(_0x15cf11['messages']??[])['map'](normalizeMessage);function _0x3e754f(_0x2d80b7,_0x479471,_0x24c7ff,_0x478823){return _0x3598c4(_0x2d80b7- -_0x52ba8e._0x4ef745,_0x479471,_0x24c7ff-0x1cb,_0x478823-_0x52ba8e._0x28e56b);}this['defaultMessage']=createDefaultMessage(_0x15cf11[_0x497762(-_0x26a627._0x40a27c,-_0x26a627._0x1b1b1c,-0x1d0,-0x1c8)]),this[_0x3e754f(-0x248,-0x24b,-0x209,-_0x26a627._0x2b2c7f)]=createAgentMetrics({'getContextWindowLimit':_0x15cf11[_0x497762(-0x219,-0x256,-0x26e,-0x28d)]});const _0x196c6f=_0x15cf11[_0x3e754f(-_0x26a627._0x4b762f,-_0x26a627._0x348b0f,-0x271,-_0x26a627._0x28087b)],_0x575221=async(_0x4833e8,_0x5a1152)=>{const _0x24faf1={_0x497d04:0x184,_0x2efd55:0xc3};this[_0x4ebee3(_0x55ba9d._0x2936ff,0x28,0x7,0x20)][_0x4ebee3(_0x55ba9d._0x46db5d,0x2c,-_0x55ba9d._0x14d14e,_0x55ba9d._0x2f0a06)](_0x4833e8);function _0x413979(_0x2ee8d0,_0xc4e971,_0x96fe1e,_0x4e1f4c){return _0x3e754f(_0x2ee8d0-_0x24faf1._0x497d04,_0x4e1f4c,_0x96fe1e-0x42,_0x4e1f4c-_0x24faf1._0x2efd55);}function _0x4ebee3(_0x59346c,_0x4b5e4c,_0x1a44f7,_0x1de693){return _0x3e754f(_0x59346c-_0x5168b4._0x4de413,_0x4b5e4c,_0x1a44f7-_0x5168b4._0xd9024e,_0x1de693-0x11e);}await _0x196c6f?.(_0x4833e8,_0x5a1152);},_0x5e264b=createInternalToolRuntime(_0x15cf11['tools']??[],{'onEvent':_0x575221,'onToolCall':_0x15cf11[_0x3e754f(-0x284,-0x26e,-_0x26a627._0x4f945d,-0x2a8)]});this[_0x3e754f(-0x271,-0x280,-0x2aa,-_0x26a627._0x2605cc)]={'registry':createRegistry(_0x15cf11),'chatModel':resolveChatModel(_0x15cf11),'toolRuntime':_0x5e264b,'askUser':_0x15cf11[_0x497762(-0x245,-0x207,-0x1d1,-0x24c)],'setTopic':_0x15cf11['setTopic'],'onEvent':_0x575221,'sessionDir':_0x15cf11[_0x3e754f(-_0x26a627._0x3448aa,-0x1ca,-_0x26a627._0x4e827d,-_0x26a627._0x3ddb81)]};}get[_0x3598c4(0x82,0xc7,0x35,0x4d)](){return this['_systemPrompt'];}[_0x3e2360(0x1ef,0x1f8,0x219,0x207)](_0x5605c0=[]){const _0x187bd6={_0xa96d5a:0x28c,_0x86ce65:0x25c,_0x438f00:0x27f},_0x21f429={_0x4e74dd:0x1b1,_0x58108d:0xef},_0x566a06={_0x4140bb:0x6d,_0x44d714:0x12c};function _0x1bc871(_0xef589c,_0x354f8c,_0x3365c7,_0x2dd257){return _0x3e2360(_0xef589c-_0x566a06._0x4140bb,_0x354f8c-_0x566a06._0x44d714,_0x3365c7,_0x2dd257-0x8c);}function _0x188f9f(_0x5941aa,_0xebdd17,_0x2b7bd0,_0x4084c3){return _0x3e2360(_0x5941aa-_0x21f429._0x4e74dd,_0xebdd17-0xf4,_0xebdd17,_0x4084c3-_0x21f429._0x58108d);}this[_0x1bc871(0x256,0x20d,_0x187bd6._0xa96d5a,0x259)][_0x188f9f(0x405,0x440,0x457,0x3da)][_0x1bc871(_0x187bd6._0x86ce65,_0x187bd6._0x438f00,0x279,0x207)](_0x5605c0);}[_0x3e2360(0x225,0x22e,0x23a,0x22f)](_0x50a1d5,_0x4a2efb={}){const _0x14b7db={_0x3b862e:0x106,_0x5d3d34:0xe9,_0x2da3ca:0xbe,_0x426f74:0x4ac,_0x59dc9a:0x471,_0x1b3edf:0x19b,_0x461427:0xf0,_0x5a1fab:0x157},_0x2c6a70={_0x221202:0x30d,_0x1dd0a1:0x10c},_0x4192fa={_0x3d39b8:0x126,_0xd62a5c:0x7};this[_0x49bb01(-_0x14b7db._0x3b862e,-_0x14b7db._0x5d3d34,-_0x14b7db._0x2da3ca,-0x10e)]=_0x50a1d5;function _0x4ad9c4(_0x1d5ab0,_0x43af73,_0x43daf2,_0x59a39a){return _0x3598c4(_0x1d5ab0-0x433,_0x43af73,_0x43daf2-_0x4192fa._0x3d39b8,_0x59a39a-_0x4192fa._0xd62a5c);}function _0x49bb01(_0x3d7707,_0x44c83e,_0x11f176,_0x5d4bc5){return _0x3e2360(_0x5d4bc5- -_0x2c6a70._0x221202,_0x44c83e-0x124,_0x3d7707,_0x5d4bc5-_0x2c6a70._0x1dd0a1);}_0x4a2efb[_0x4ad9c4(_0x14b7db._0x426f74,0x4e7,0x4e0,_0x14b7db._0x59dc9a)]===!![]&&(this[_0x49bb01(-_0x14b7db._0x1b3edf,-_0x14b7db._0x461427,-_0x14b7db._0x5a1fab,-0x147)]=[],this['turnIndex']=0x0);}[_0x3e2360(0x22a,0x246,0x1e1,0x237)](_0x4d0fd6){const _0x1d1fdf={_0x1214f8:0x117,_0x1985e3:0xd8,_0x14baa2:0x155},_0x4656aa={_0xca0a1d:0x15d,_0x55608c:0x68};function _0x3689fb(_0x301804,_0x1301aa,_0x149d74,_0x11af21){return _0x3e2360(_0x1301aa- -0xb4,_0x1301aa-_0x4656aa._0xca0a1d,_0x301804,_0x11af21-_0x4656aa._0x55608c);}this[_0x3689fb(0x12a,_0x1d1fdf._0x1214f8,_0x1d1fdf._0x1985e3,_0x1d1fdf._0x14baa2)]=_0x4d0fd6;}[_0x3e2360(0x1e7,0x212,0x1de,0x193)](_0x35557d){const _0x18e817={_0x7561bb:0x156},_0x51ccdb={_0x261861:0xe9,_0x1e6fb7:0x54,_0x23a00a:0xb9};function _0x4e4957(_0x3dadc4,_0x4aaad0,_0xe91ead,_0x4202ce){return _0x3598c4(_0x3dadc4-_0x51ccdb._0x261861,_0x4202ce,_0xe91ead-_0x51ccdb._0x1e6fb7,_0x4202ce-_0x51ccdb._0x23a00a);}this[_0x4e4957(0x120,0xf1,0x151,_0x18e817._0x7561bb)]['chatModel']=_0x35557d;}async[_0x3598c4(0xb0,0x5c,0x61,0xe4)](_0x4d2b32=this[_0x3e2360(0x261,0x28c,0x26d,0x277)],_0x3af971={}){const _0xc0e2e3={_0x592057:0xa8,_0x4666af:0x83,_0x3e4fa7:0x3d,_0x530ce9:0x76,_0xe2828c:0xbb,_0x547f2c:0x8f,_0xacf788:0xcb,_0x2d8060:0xd2,_0x28a2c9:0x43,_0x2f4600:0xba,_0x27c79b:0x6d,_0x467f93:0x4e,_0x48511d:0x26,_0x10e45d:0x15,_0x431bed:0x85,_0x13892b:0xa3,_0x45cecc:0x6d,_0x16975f:0x6b,_0x50a471:0x9c,_0x206a86:0xcf,_0x567ff4:0x93,_0x16863f:0x48,_0x2e034d:0x63,_0x581e2b:0x1c,_0x3683bc:0x42},_0x3aecb2={_0x30d22a:0xed,_0x15d0c7:0x16d},_0x4c6640={_0x25c710:0x4f,_0x468dda:0x139};if(!_0x4d2b32)throw new Error(_0x4fc916(-_0xc0e2e3._0x592057,-_0xc0e2e3._0x4666af,-0xc0,-_0xc0e2e3._0x3e4fa7));function _0x1abfbd(_0x42a42b,_0x26a848,_0x3f2af1,_0x593bf1){return _0x3598c4(_0x42a42b-_0x4c6640._0x25c710,_0x3f2af1,_0x3f2af1-0xf7,_0x593bf1-_0x4c6640._0x468dda);}this[_0x4fc916(-0xbf,-0x6f,-_0xc0e2e3._0x530ce9,-0x72)]+=0x1;function _0x4fc916(_0x41327e,_0x2b1ba2,_0x3b932d,_0x1b3f4b){return _0x3e2360(_0x2b1ba2- -0x25a,_0x2b1ba2-_0x3aecb2._0x30d22a,_0x41327e,_0x1b3f4b-_0x3aecb2._0x15d0c7);}try{const _0x24fb49=await runTurn({'sessionId':this[_0x4fc916(-_0xc0e2e3._0xe2828c,-_0xc0e2e3._0x547f2c,-_0xc0e2e3._0xacf788,-_0xc0e2e3._0x2d8060)],'turnId':createTurnId(this[_0x1abfbd(0x88,_0xc0e2e3._0x28a2c9,_0xc0e2e3._0x2f4600,_0xc0e2e3._0x27c79b)]),'streaming':_0x3af971[_0x4fc916(_0xc0e2e3._0x467f93,0x3,-0x35,-0x3c)],'signal':_0x3af971['signal'],'system':this[_0x4fc916(0x18,-_0xc0e2e3._0x48511d,-0x20,-_0xc0e2e3._0x10e45d)],'messages':this[_0x1abfbd(0x63,0x13,0x3b,_0xc0e2e3._0x431bed)],'message':normalizeUserInput(_0x4d2b32)},this[_0x1abfbd(0x86,0x77,_0xc0e2e3._0x13892b,0x35)]);return this['messages']=_0x24fb49[_0x1abfbd(_0xc0e2e3._0x45cecc,0xc0,_0xc0e2e3._0x16975f,0x9d)][_0x4fc916(-0x9d,-0x94,-0x9d,-_0xc0e2e3._0x50a471)][_0x4fc916(-_0xc0e2e3._0x206a86,-_0xc0e2e3._0x567ff4,-_0xc0e2e3._0x16863f,-0x45)](normalizeMessage),_0x24fb49;}catch(_0x453539){if(_0x453539 instanceof TurnFailedError){this[_0x1abfbd(_0xc0e2e3._0x2e034d,0xa1,_0xc0e2e3._0x581e2b,0xb8)]=synthesizeMissingToolResults(_0x453539['state']['messages'][_0x1abfbd(0x64,0x43,_0xc0e2e3._0x3683bc,_0xc0e2e3._0x4666af)](normalizeMessage));throw _0x453539['cause'];}throw _0x453539;}}};export{normalizeToolOutputValue,createToolOutput,ToolExecutionError,defineTool,ToolRegistry,validateToolInput,deriveFinalToolOutput,createInternalToolRuntime,createExtensionRegistry,createAgentMetrics,runTurn,Agent};
@@ -1,5 +0,0 @@
1
- import { C as ChatRequest, O as OpenAiResponsesRequest } from './types-3UUDPpJs.js';
2
-
3
- declare function toOpenAiResponsesRequest(request: ChatRequest): OpenAiResponsesRequest;
4
-
5
- export { toOpenAiResponsesRequest as t };