@nuvin/agent-core 0.1.0-rc.5 → 0.1.0-rc.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/VERSION +2 -2
- package/dist/agent/index.js +1 -1
- package/dist/chunk-FFIZ6TKW.js +1 -1
- package/dist/chunk-FKZ3QQWZ.js +1 -1
- package/dist/chunk-NHBKADBW.js +1 -1
- package/dist/chunk-NYZR4XKO.js +1 -1
- package/dist/chunk-QDOE7NWO.js +1 -1
- package/dist/chunk-X7VAACWY.js +1 -1
- package/dist/formats/index.js +1 -1
- package/dist/hooks/index.js +1 -1
- package/dist/models/chat-model.d.ts +2 -1
- package/dist/models/index.js +1 -1
- package/dist/shared/index.js +1 -1
- package/dist/tools/index.js +1 -1
- package/package.json +2 -2
package/dist/chunk-NHBKADBW.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x3e2c53,_0x38731c){const _0x251a1c={_0x4cd0bc:0x2c3,_0x1b92e7:0x2b4,_0x2ba6e3:0x2c4,_0x296cff:0x27e,_0x4631b4:0x280,_0x3394b0:0x286,_0x308a43:0x29d,_0x444dd8:0x29a,_0x16ce00:0x2ab,_0x40c310:0x2c0,_0x442e1a:0x2b9,_0x56eee9:0x2b0,_0x333ca5:0x297,_0x583235:0x290,_0x2f7b82:0x293,_0x107156:0x2ad,_0xfb0340:0x2aa,_0x5458ba:0x290,_0x5eb3ae:0x2d8,_0x5877f4:0x2ef},_0x339db4={_0x5be6e9:0x398},_0x2b7179=_0x3e2c53();function _0x55b388(_0x16edde,_0x39eb25,_0x300c27,_0x5630fc){return _0xecda(_0x16edde- -_0x339db4._0x5be6e9,_0x39eb25);}function _0x934560(_0x38f9d5,_0x4b91c1,_0x1376f8,_0x2c4ecf){return _0xecda(_0x4b91c1- -0x368,_0x2c4ecf);}while(!![]){try{const _0x49f363=-parseInt(_0x934560(-0x272,-0x28b,-0x2ab,-0x282))/0x1+parseInt(_0x55b388(-_0x251a1c._0x4cd0bc,-_0x251a1c._0x1b92e7,-_0x251a1c._0x2ba6e3,-0x2af))/0x2*(-parseInt(_0x934560(-_0x251a1c._0x296cff,-_0x251a1c._0x4631b4,-_0x251a1c._0x3394b0,-_0x251a1c._0x308a43))/0x3)+parseInt(_0x934560(-0x2a4,-0x29f,-0x27f,-_0x251a1c._0x444dd8))/0x4+-parseInt(_0x55b388(-0x2a7,-_0x251a1c._0x16ce00,-_0x251a1c._0x40c310,-0x2a2))/0x5*(parseInt(_0x934560(-_0x251a1c._0x442e1a,-_0x251a1c._0x56eee9,-_0x251a1c._0x333ca5,-0x2aa))/0x6)+parseInt(_0x934560(-_0x251a1c._0x583235,-0x279,-_0x251a1c._0x2f7b82,-0x25a))/0x7+-parseInt(_0x934560(-0x2c2,-_0x251a1c._0x107156,-0x2ab,-_0x251a1c._0x40c310))/0x8*(-parseInt(_0x934560(-_0x251a1c._0xfb0340,-_0x251a1c._0x5458ba,-0x2aa,-0x27b))/0x9)+-parseInt(_0x55b388(-0x2e5,-0x2fc,-0x2cb,-0x2c6))/0xa*(-parseInt(_0x55b388(-_0x251a1c._0x5eb3ae,-0x2d4,-0x2c1,-_0x251a1c._0x5877f4))/0xb);if(_0x49f363===_0x38731c)break;else _0x2b7179['push'](_0x2b7179['shift']());}catch(_0x18b387){_0x2b7179['push'](_0x2b7179['shift']());}}}(_0x2f95,0x69555));import{resolveOpenAiReasoningConfig}from'./chunk-NYZR4XKO.js';import{normalizeContent}from'./chunk-QDOE7NWO.js';function systemToInstructions(_0x210b6b){const _0x39e37e={_0x3b4767:0x441,_0x88abe8:0x7a,_0x38f7b7:0x6f},_0x39d79a={_0x3bed55:0x387},_0x595820={_0x463555:0x148};function _0x43f893(_0x21c548,_0x3b1a75,_0x2462a6,_0x1d80d7){return _0xecda(_0x2462a6- -_0x595820._0x463555,_0x1d80d7);}function _0x5b760a(_0xd0a676,_0x40e45b,_0x2a2a1e,_0x39ab41){return _0xecda(_0x39ab41-_0x39d79a._0x3bed55,_0x40e45b);}return normalizeContent(_0x210b6b)['filter'](_0x35a499=>_0x35a499[_0x5b760a(0x43e,0x469,0x452,0x44c)]==='text')[_0x5b760a(0x44f,0x466,_0x39e37e._0x3b4767,0x44a)](_0x9ed8cf=>_0x9ed8cf['text'])[_0x43f893(-_0x39e37e._0x88abe8,-0x76,-_0x39e37e._0x38f7b7,-0x63)]('\x0a\x0a');}function pushUserContentMessage(_0x39bc54,_0x3a6a42,_0x1106da){const _0x3ae6c4={_0x501404:0x260,_0x42d710:0x28c,_0x43b42f:0x262,_0x3c38ce:0x26e,_0x3d24c6:0x275},_0x53fea7={_0x3434a6:0x191},_0x1fc3b7={_0x3ba439:0x135};function _0x1d0e85(_0x5735c0,_0x40e1ff,_0x2d53b6,_0x5f4531){return _0xecda(_0x5f4531- -_0x1fc3b7._0x3ba439,_0x40e1ff);}if(_0x1106da[_0x57554a(0x258,_0x3ae6c4._0x501404,0x297,0x277)]===0x0)return;function _0x57554a(_0x5b5ea3,_0x378b60,_0x2eae62,_0x2422e6){return _0xecda(_0x2422e6-_0x53fea7._0x3434a6,_0x5b5ea3);}_0x39bc54[_0x57554a(_0x3ae6c4._0x42d710,_0x3ae6c4._0x43b42f,_0x3ae6c4._0x3c38ce,_0x3ae6c4._0x3d24c6)]({'type':'message','role':_0x3a6a42,'content':_0x1106da});}function hasSerializableToolUse(_0xc377ce){const _0x10f3e2={_0x46c7e1:0x33b,_0x4b9aee:0x1c0,_0x5b36b0:0x1a0,_0x4325c0:0x1ac,_0x52172d:0x1a5,_0x5a4940:0x342,_0x4678aa:0x349},_0x66405={_0x99c930:0xba};function _0x1383ef(_0x12190c,_0x2c04f7,_0x123062,_0x2d5237){return _0xecda(_0x2c04f7-_0x66405._0x99c930,_0x123062);}function _0x21c5d7(_0x50b75e,_0x227d0e,_0xa6a6bc,_0x1b7a0f){return _0xecda(_0xa6a6bc-0x26a,_0x227d0e);}return _0xc377ce['id'][_0x21c5d7(_0x10f3e2._0x46c7e1,0x342,0x355,0x352)]()[_0x1383ef(_0x10f3e2._0x4b9aee,_0x10f3e2._0x5b36b0,0x1b7,0x19c)]>0x0&&_0xc377ce[_0x1383ef(0x18d,_0x10f3e2._0x4325c0,_0x10f3e2._0x52172d,0x1a4)][_0x21c5d7(0x36c,0x348,0x355,_0x10f3e2._0x5a4940)]()[_0x21c5d7(_0x10f3e2._0x4678aa,0x36b,0x350,0x36c)]>0x0;}function hasSerializableToolResult(_0x58e36d){const _0x1ce41b={_0x84e6f4:0x3d0,_0xa414c1:0x3f3,_0x164b65:0x3d3},_0xd0efdd={_0x545063:0x2fc};function _0x2596ec(_0x2eb656,_0x2f8c29,_0x21c63a,_0x596f03){return _0xecda(_0x21c63a-_0xd0efdd._0x545063,_0x596f03);}function _0x5aeb59(_0x578f73,_0x1f19c2,_0x2f36ef,_0x1e2270){return _0xecda(_0x578f73- -0x14e,_0x1f19c2);}return _0x58e36d[_0x2596ec(_0x1ce41b._0x84e6f4,_0x1ce41b._0xa414c1,0x3e9,_0x1ce41b._0x164b65)][_0x5aeb59(-0x63,-0x59,-0x80,-0x6b)]()['length']>0x0;}function isResponseInputObject(_0xadfd51){const _0x44ed93={_0x4e8e16:0x8b,_0x40705d:0x91,_0x59d9a4:0x8f,_0x190c70:0xa2,_0x8b508a:0x99,_0x12a3ba:0x90},_0x5b7e3f={_0x3ffa62:0x3b};function _0xadd93b(_0x5d859f,_0x32f418,_0x187361,_0x106ce5){return _0xecda(_0x106ce5- -0x172,_0x5d859f);}if(typeof _0xadfd51!==_0x5d0453(0x87,0x8e,0x9f,_0x44ed93._0x4e8e16)||_0xadfd51===null||Array[_0xadd93b(-0x8e,-_0x44ed93._0x40705d,-_0x44ed93._0x59d9a4,-_0x44ed93._0x190c70)](_0xadfd51))return![];const _0x8c30e9=_0xadfd51;function _0x5d0453(_0x248ece,_0x1371de,_0x16e430,_0x3d31f2){return _0xecda(_0x248ece- -_0x5b7e3f._0x3ffa62,_0x16e430);}return typeof _0x8c30e9['type']===_0x5d0453(_0x44ed93._0x8b508a,0xa6,_0x44ed93._0x12a3ba,0x8f);}function _0xecda(_0x26a807,_0x1d15e1){_0x26a807=_0x26a807-0xb3;const _0x2f955b=_0x2f95();let _0xecda1f=_0x2f955b[_0x26a807];if(_0xecda['egDJCP']===undefined){var _0x3f1b23=function(_0x4ec44d){const _0x3fa981='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x210b6b='',_0x35a499='';for(let _0x9ed8cf=0x0,_0x39bc54,_0x3a6a42,_0x1106da=0x0;_0x3a6a42=_0x4ec44d['charAt'](_0x1106da++);~_0x3a6a42&&(_0x39bc54=_0x9ed8cf%0x4?_0x39bc54*0x40+_0x3a6a42:_0x3a6a42,_0x9ed8cf++%0x4)?_0x210b6b+=String['fromCharCode'](0xff&_0x39bc54>>(-0x2*_0x9ed8cf&0x6)):0x0){_0x3a6a42=_0x3fa981['indexOf'](_0x3a6a42);}for(let _0xc377ce=0x0,_0x58e36d=_0x210b6b['length'];_0xc377ce<_0x58e36d;_0xc377ce++){_0x35a499+='%'+('00'+_0x210b6b['charCodeAt'](_0xc377ce)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x35a499);};_0xecda['AeyCqa']=_0x3f1b23,_0xecda['GfdqHO']={},_0xecda['egDJCP']=!![];}const _0x4c6c13=_0x2f955b[0x0],_0x63d4c1=_0x26a807+_0x4c6c13,_0x48d1e0=_0xecda['GfdqHO'][_0x63d4c1];return!_0x48d1e0?(_0xecda1f=_0xecda['AeyCqa'](_0xecda1f),_0xecda['GfdqHO'][_0x63d4c1]=_0xecda1f):_0xecda1f=_0x48d1e0,_0xecda1f;}function isImageToolResultBlock(_0x4958b9){const _0x346ae4={_0x5c5542:0x28a,_0x2f7b9b:0x281,_0x48e2e3:0x291,_0x34cbbf:0x273,_0x51d26a:0x28c,_0x2891cf:0x28b,_0xbc4d62:0x2ee,_0xc9984e:0x2da,_0x445bf0:0x2b7,_0x430909:0x2e8,_0x5caf69:0x2a3,_0x54dcf1:0x2c1,_0x594fd7:0x26b,_0x39f033:0x276,_0x2e9732:0x2ea,_0x51a9ad:0x2b0,_0xe0226c:0x2b2,_0x172518:0x2da,_0x5ddac1:0x2eb,_0x543f8d:0x2d7,_0x533205:0x295,_0x34624d:0x2a5,_0x26f37c:0x28f,_0x1f1e17:0x27f,_0x33ed78:0x2a6,_0xf9516b:0x29f,_0x50bdff:0x29e},_0x14004f={_0x29e921:0x39f};function _0x37d116(_0x12da82,_0x9fea80,_0x13c3c0,_0xd7dc80){return _0xecda(_0xd7dc80- -_0x14004f._0x29e921,_0x13c3c0);}function _0x50324a(_0x45fd76,_0x568a32,_0x119450,_0x3a4f98){return _0xecda(_0x3a4f98-0x1b1,_0x119450);}if(typeof _0x4958b9!==_0x50324a(_0x346ae4._0x5c5542,_0x346ae4._0x2f7b9b,_0x346ae4._0x48e2e3,_0x346ae4._0x34cbbf)||_0x4958b9===null||Array[_0x50324a(_0x346ae4._0x51d26a,0x297,_0x346ae4._0x2891cf,0x281)](_0x4958b9))return![];const _0x5ae369=_0x4958b9;return _0x5ae369[_0x37d116(-0x2bd,-_0x346ae4._0xbc4d62,-0x2c5,-_0x346ae4._0xc9984e)]===_0x37d116(-_0x346ae4._0x445bf0,-0x2df,-_0x346ae4._0x430909,-0x2c8)&&_0x5ae369[_0x37d116(-0x2b7,-0x2b1,-_0x346ae4._0x5caf69,-_0x346ae4._0x54dcf1)]?.[_0x50324a(0x27f,_0x346ae4._0x594fd7,0x257,_0x346ae4._0x39f033)]===_0x37d116(-0x307,-0x2f2,-0x2d2,-_0x346ae4._0x2e9732)&&typeof _0x5ae369[_0x37d116(-_0x346ae4._0x51a9ad,-_0x346ae4._0xe0226c,-0x2ca,-0x2c1)][_0x37d116(-0x2db,-_0x346ae4._0x172518,-0x30b,-_0x346ae4._0x5ddac1)]===_0x37d116(-0x2e0,-_0x346ae4._0x543f8d,-0x2b0,-0x2cb)&&typeof _0x5ae369[_0x50324a(_0x346ae4._0x533205,_0x346ae4._0x2f7b9b,_0x346ae4._0x34624d,_0x346ae4._0x26f37c)][_0x50324a(_0x346ae4._0x26f37c,_0x346ae4._0x1f1e17,_0x346ae4._0x33ed78,_0x346ae4._0xf9516b)]===_0x50324a(_0x346ae4._0x50bdff,_0x346ae4._0x533205,0x28f,0x285);}function getToolResultText(_0x5cc965){const _0xf4fd71={_0xe6ef31:0x181,_0x30aa02:0x198,_0x481f4a:0x18f,_0x17473d:0x197,_0x2a6739:0x18c,_0x34ae73:0x1a4,_0x55236c:0x186,_0x475e90:0x195},_0x28be32={_0x2ed130:0x224,_0x2b1754:0x24f};if(typeof _0x5cc965==='string')return _0x5cc965;function _0x574169(_0x1cf0a8,_0x23d5fc,_0x5604fa,_0xffcba3){return _0xecda(_0x5604fa-0xbe,_0x23d5fc);}function _0x3e6b65(_0x77a409,_0x5e7b54,_0x382b5b,_0xb8672c){return _0xecda(_0x382b5b-0x331,_0x77a409);}const _0x179739=_0x5cc965[_0x574169(_0xf4fd71._0xe6ef31,0x1ad,0x1a0,_0xf4fd71._0x30aa02)](_0xc4128=>{const _0x588705={_0x2c67e0:0x9f};function _0x2a8e29(_0x340db2,_0x5a67e7,_0x47dfb8,_0x477fc4){return _0x574169(_0x340db2-_0x588705._0x2c67e0,_0x477fc4,_0x340db2- -0x224,_0x477fc4-0x170);}function _0x58a5f1(_0x4a2d46,_0x3c8945,_0x3cdb80,_0x59fe7d){return _0x574169(_0x4a2d46-0x17c,_0x59fe7d,_0x3c8945-0xa8,_0x59fe7d-0x2);}return typeof _0xc4128===_0x58a5f1(0x21d,0x228,_0x28be32._0x2ed130,0x20c)&&_0xc4128!==null&&_0xc4128['type']===_0x58a5f1(0x223,0x241,0x25f,_0x28be32._0x2b1754);})[_0x574169(_0xf4fd71._0x481f4a,_0xf4fd71._0x17473d,0x181,_0xf4fd71._0x2a6739)](_0x1d1792=>_0x1d1792[_0x3e6b65(0x42b,0x413,0x40c,0x428)])[_0x574169(_0xf4fd71._0x34ae73,0x178,0x197,_0xf4fd71._0x55236c)]('\x0a\x0a')['trim']();return _0x179739['length']>0x0?_0x179739:_0x574169(_0xf4fd71._0x475e90,0x19c,0x17d,0x15f);}function getToolResultImages(_0x1f8bb4){const _0x41d722={_0x53d74d:0x207};function _0x328b7d(_0x57b84a,_0x97b147,_0x58f611,_0xaf7e1){return _0xecda(_0x58f611-0x138,_0x97b147);}return Array['isArray'](_0x1f8bb4)?_0x1f8bb4[_0x328b7d(0x20d,0x208,0x21a,_0x41d722._0x53d74d)](isImageToolResultBlock):[];}function resolveReasoningVisibility(_0x13f417){const _0x573d0e={_0x2ebc6a:0x29e,_0x26f54d:0x2a7,_0x5445f9:0x28c,_0x42a314:0x3f,_0x404c7d:0x9,_0x28301a:0x22,_0x317461:0x2d0},_0x5f48fb={_0x32d6be:0xc5};function _0x63b77f(_0x16f3a3,_0xf5da2f,_0x5c121d,_0x4e7231){return _0xecda(_0x5c121d- -0x38a,_0xf5da2f);}function _0x3ec956(_0x23a02c,_0x2a0d9a,_0x97b3b5,_0x28f170){return _0xecda(_0x28f170- -_0x5f48fb._0x32d6be,_0x97b3b5);}return _0x13f417[_0x63b77f(-_0x573d0e._0x2ebc6a,-0x293,-_0x573d0e._0x26f54d,-_0x573d0e._0x5445f9)]?.[_0x3ec956(0x27,_0x573d0e._0x42a314,_0x573d0e._0x404c7d,_0x573d0e._0x28301a)]??_0x63b77f(-0x2b8,-0x2c9,-0x2bf,-_0x573d0e._0x317461);}function _0x2f95(){const _0x2bfa42=['BwvZC2fNzxm','zMLSDgvY','CMvHC29UAw5N','ChvZAa','C3LZDgvT','BgvUz3rO','DMLZAwjPBgL0Eq','oda5n21HuKTxuq','Aw5WDxrFC2nOzw1H','C3vTBwfYEq','DhjPBq','DxnLCG','Dg9VBf91C2vFAwq','zgf0yq','mti4nZuZogX6EMrgEq','Aw5WDxrFDgv4Da','ntm0mgfirMztDW','BMfTzq','odaZme9IBvv6Da','BwvKAwfFDhLWzq','yMfZzty0','ChjVDMLKzxjtDgf0zq','BwvZC2fNzq','mtqXnMrpqLvvua','Aw5WDxrFAw1Hz2u','C3rYAwn0','mty4ywTiBLLz','sw1Hz2uGCMv0DxjUzwqGyNKGvMLLD0zPBguGzM9YihrVB2WGCMvZDwX0ia','yxv0BW','zgf0ytO','vg9VBcbYzxr1CM5LzcbPBwfNzsbJB250zw50lG','mJm4n3Phrhr1wa','Bw9KzwW','B2jQzwn0','BwfW','Dg9VBhm','DhLWzq','B3v0Chv0x3rLEhq','zNvUy3rPB25Fy2fSBa','CM9Szq','mtm4ntyWu2z1wM9J','Bwf4vg9Rzw5Z','DxnLCI12AxnPyMXL','B3v0Chv0rM9YBwf0','Aw5WDxq','A2v5CW','zwzMB3j0','AxnbCNjHEq','zNvUy3rPB25Fy2fSBf9VDxrWDxq','y29UDgvUDa','yxnZAxn0yw50','C3rYAw5N','nJHeA0P4D2q','Dg9VBf9Yzxn1Bhq','Aw1Hz2u','mZq0nJaXBxDAuuft','AM9PBG','B3bLBMfPuMvZCg9UC2vZt3v0Chv0','Dgv4Da','o2jHC2u2ncW','ndiXnJm1v1ftEefe','C291CMnL','zgvZy3jPChrPB24','CMvHC29UAw5NlMvUy3j5ChrLzf9JB250zw50'];_0x2f95=function(){return _0x2bfa42;};return _0x2f95();}function createOpenAiResponsesReasoning(_0x445cb8){const _0x2bd204={_0xd741d4:0x15d,_0x3f7ba7:0x156,_0xf8cf42:0x13a,_0x78fc88:0x146,_0x421194:0x17c,_0x4afd3f:0x18a,_0x1a8787:0x14f,_0x121e30:0x179,_0x1ed6c9:0x15a,_0x167f4a:0x48e,_0x17a96d:0x491,_0x1fb44a:0x159,_0x5c2c4f:0x495,_0x4d26db:0x48e,_0x2e74b9:0x153,_0xe24180:0x147,_0x1ab377:0x16b},_0x42fc0d={_0x46bdfc:0x239},_0x4f1a86=resolveOpenAiReasoningConfig(_0x445cb8[_0x5a8608(-_0x2bd204._0xd741d4,-_0x2bd204._0x3f7ba7,-_0x2bd204._0xf8cf42,-_0x2bd204._0x78fc88)]);if(!_0x4f1a86)return{};const _0x59c302={};function _0x5a8608(_0x56da0b,_0x4bd9b9,_0x4cdca6,_0x47a9ca){return _0xecda(_0x4bd9b9- -_0x42fc0d._0x46bdfc,_0x56da0b);}const _0x5557aa=_0x4f1a86['summary']??(resolveReasoningVisibility(_0x445cb8)===_0x5a8608(-0x152,-0x16e,-0x16e,-0x15d)?_0x5a8608(-0x193,-_0x2bd204._0x421194,-0x19c,-0x183):void 0x0);_0x4f1a86[_0x5a8608(-0x14c,-0x16a,-_0x2bd204._0x4afd3f,-_0x2bd204._0x1a8787)]&&(_0x59c302['effort']=_0x4f1a86[_0x5a8608(-_0x2bd204._0x121e30,-0x16a,-_0x2bd204._0x1ed6c9,-0x151)]);_0x5557aa&&(_0x59c302[_0x5e7a4d(_0x2bd204._0x167f4a,_0x2bd204._0x17a96d,0x49c,0x49d)]=_0x5557aa);function _0x5e7a4d(_0x2ec41f,_0x24ab7a,_0x589dfa,_0x199de2){return _0xecda(_0x199de2-0x3b3,_0x589dfa);}return{..._0x4f1a86['includeEncryptedContent']===![]?{}:{'include':[_0x5a8608(-0x144,-_0x2bd204._0x1fb44a,-0x162,-0x174)]},...Object[_0x5e7a4d(_0x2bd204._0x5c2c4f,0x48d,_0x2bd204._0x4d26db,0x481)](_0x59c302)[_0x5a8608(-0x155,-_0x2bd204._0x2e74b9,-_0x2bd204._0xe24180,-_0x2bd204._0x1ab377)]>0x0?{'reasoning':_0x59c302}:{}};}function pushAssistantProviderState(_0x17a7da,_0x8f2e9){const _0x15dbad={_0x10d516:0x2ba,_0x135ee8:0x2c8,_0x4bb42f:0x2d9,_0x3427ea:0x2aa,_0x2f5b2a:0x1b6,_0xf7ea04:0x1a6,_0x1b5e99:0x1b9,_0x2d7f9d:0x1c2,_0x16d18c:0x1c0,_0x5a8f92:0x1c3,_0x5749a7:0x1a1};if(_0x8f2e9['role']!==_0x5f4fd8(0x1af,0x1c8,0x1a4,0x1ae))return![];const _0x2ba94b=_0x8f2e9[_0x5d95f5(-_0x15dbad._0x10d516,-_0x15dbad._0x135ee8,-_0x15dbad._0x4bb42f,-_0x15dbad._0x3427ea)]?.[_0x5f4fd8(_0x15dbad._0x2f5b2a,0x1c4,_0x15dbad._0xf7ea04,_0x15dbad._0x1b5e99)]??[];if(_0x2ba94b[_0x5f4fd8(_0x15dbad._0x2d7f9d,0x1d4,0x1b3,0x1ae)]===0x0)return![];for(const _0xc6480f of _0x2ba94b){isResponseInputObject(_0xc6480f)&&_0x17a7da[_0x5f4fd8(_0x15dbad._0x16d18c,_0x15dbad._0x5a8f92,_0x15dbad._0x5749a7,0x1c0)](structuredClone(_0xc6480f));}function _0x5f4fd8(_0x28dcca,_0x409129,_0x2073fb,_0x1eb010){return _0xecda(_0x28dcca-0xdc,_0x1eb010);}function _0x5d95f5(_0x2df20a,_0x4fd37b,_0x578823,_0x4005ab){return _0xecda(_0x2df20a- -0x370,_0x4fd37b);}return!![];}function toOpenAiResponsesRequest(_0x295eda){const _0x48c1c2={_0x473217:0xcc,_0x31406b:0xb2,_0x137f27:0x67,_0x32f07c:0x5f,_0x1f724b:0x7b,_0x384978:0x7e,_0x2270ca:0x9b,_0x20ee6:0x83,_0x4c1d26:0x63,_0x3c5d55:0xc6,_0x592e15:0xad,_0xacffd3:0xaf,_0x3df5d2:0x61,_0x4ad9ff:0xa8,_0x7a8558:0x5a,_0x21b4af:0x4f,_0x2dc532:0x5f,_0x3412c3:0x6c,_0x1d4883:0xcb,_0x398b71:0x37,_0x29610a:0x53,_0x238297:0x38,_0x1fc014:0xbf,_0x3163b4:0x54,_0x214901:0x2f,_0x527dcf:0xc1,_0x5694de:0xc3,_0x3d3282:0x66,_0x2691fa:0x62,_0x3ccdf4:0x42,_0xf27705:0x45,_0x154e40:0x92,_0x4e5f1e:0xae,_0x164848:0xa1,_0x241fd8:0x65,_0x3ffef1:0x70,_0x10236d:0x67,_0x4af021:0x75,_0x7dd418:0x9a,_0x54e795:0xb8,_0x5b6116:0x8c,_0xfb408a:0xb3,_0x44367e:0xcd,_0x1573b0:0xeb,_0x496d94:0x9e,_0x1e32c0:0xbd,_0x2558c6:0xbc,_0x3f7579:0x7b,_0x22a9ed:0x43,_0x2a72e6:0x5c,_0x394c21:0x56,_0x1fb711:0x4c,_0x4d1c47:0x5d,_0x1fd447:0x5c,_0x27ec67:0x5b,_0xa45e7a:0xcc,_0x4be8b4:0xbe,_0x1a0fb3:0x52,_0x1ca4bf:0x71,_0x480489:0xab,_0x274af5:0xaa,_0x4edec9:0x9f,_0xea832f:0x84,_0x325ac4:0x66,_0x1f7978:0x94,_0x5999ec:0xd4,_0x3253e3:0xd9,_0x220750:0xb3,_0x13ce53:0x57,_0x360130:0x34,_0x4738f8:0x54},_0x4d5daf={_0x19faba:0x414,_0x5b311f:0x406,_0x3e1ca9:0x88,_0x5ddfca:0xa3},_0x4d0dbc={_0x1fbc16:0x66},_0x49ee19={_0x4d5110:0x19},_0x4aa7bd=[];function _0x4fd43a(_0x2b5df4,_0x1dbf99,_0x107a24,_0x35942a){return _0xecda(_0x1dbf99- -_0x49ee19._0x4d5110,_0x2b5df4);}function _0x3b29b5(_0x2adc0c,_0x4cc896,_0x151257,_0x162625){return _0xecda(_0x151257- -_0x4d0dbc._0x1fbc16,_0x2adc0c);}for(const _0xbe52ff of _0x295eda[_0x4fd43a(_0x48c1c2._0x473217,0xc8,_0x48c1c2._0x31406b,0xd1)]){if(pushAssistantProviderState(_0x4aa7bd,_0xbe52ff))continue;const _0x2acc2c=[];for(const _0x1e7464 of normalizeContent(_0xbe52ff['content'])){if(_0x1e7464[_0x3b29b5(0x6f,_0x48c1c2._0x137f27,_0x48c1c2._0x32f07c,_0x48c1c2._0x1f724b)]==='text'){_0x2acc2c[_0x3b29b5(0x75,0x87,_0x48c1c2._0x384978,_0x48c1c2._0x2270ca)](_0xbe52ff[_0x3b29b5(0x66,0x62,0x62,0x69)]===_0x3b29b5(0x8a,_0x48c1c2._0x20ee6,0x6d,_0x48c1c2._0x4c1d26)?{'type':_0x4fd43a(_0x48c1c2._0x3c5d55,_0x48c1c2._0x592e15,0xaf,_0x48c1c2._0xacffd3),'text':_0x1e7464[_0x3b29b5(_0x48c1c2._0x3df5d2,0x79,0x75,0x6d)]}:{'type':_0x3b29b5(_0x48c1c2._0x4ad9ff,0x9f,0x8a,0x7f),'text':_0x1e7464[_0x3b29b5(_0x48c1c2._0x7a8558,0x65,0x75,0x7e)]});continue;}if(_0x1e7464[_0x3b29b5(_0x48c1c2._0x21b4af,0x70,_0x48c1c2._0x2dc532,_0x48c1c2._0x3412c3)]==='image'){_0x2acc2c[_0x4fd43a(0xc5,_0x48c1c2._0x1d4883,0xc1,0xea)]({'type':_0x3b29b5(0x6f,_0x48c1c2._0x398b71,_0x48c1c2._0x29610a,_0x48c1c2._0x238297),'image_url':_0x4fd43a(0xaf,0xa5,_0x48c1c2._0x1fc014,0x95)+_0x1e7464[_0x3b29b5(0x95,0x6b,0x78,0x8e)][_0x3b29b5(_0x48c1c2._0x3163b4,_0x48c1c2._0x214901,0x4e,0x4b)]+_0x4fd43a(_0x48c1c2._0x527dcf,_0x48c1c2._0x5694de,0xb4,0xc6)+_0x1e7464['source']['data']});continue;}pushUserContentMessage(_0x4aa7bd,_0xbe52ff[_0x3b29b5(_0x48c1c2._0x3d3282,0x48,_0x48c1c2._0x2691fa,0x50)],_0x2acc2c['splice'](0x0));if(_0x1e7464[_0x3b29b5(0x67,_0x48c1c2._0x3ccdf4,0x5f,_0x48c1c2._0xf27705)]==='tool_use'){if(!hasSerializableToolUse(_0x1e7464))continue;_0x4aa7bd[_0x3b29b5(0x74,0x6c,0x7e,_0x48c1c2._0x384978)]({'type':_0x4fd43a(_0x48c1c2._0x154e40,_0x48c1c2._0x4e5f1e,0x93,_0x48c1c2._0x164848),'call_id':_0x1e7464['id'],'name':_0x1e7464['name'],'arguments':JSON['stringify'](_0x1e7464[_0x3b29b5(_0x48c1c2._0x241fd8,_0x48c1c2._0x3ffef1,_0x48c1c2._0x10236d,0x49)]??{})});continue;}if(_0x1e7464['type']===_0x4fd43a(0xa0,0xbd,0xac,0xb3)){if(!hasSerializableToolResult(_0x1e7464))continue;const _0x161240=getToolResultText(_0x1e7464[_0x3b29b5(0x65,0x87,0x6c,_0x48c1c2._0x4af021)]);_0x4aa7bd[_0x3b29b5(0x94,0x9c,0x7e,0x86)]({'type':_0x4fd43a(_0x48c1c2._0x7dd418,_0x48c1c2._0x54e795,0xc0,0xab),'call_id':_0x1e7464['tool_use_id'],'output':_0x161240});const _0x4b81ee=getToolResultImages(_0x1e7464[_0x3b29b5(_0x48c1c2._0x5b6116,0x72,0x6c,0x65)]);_0x4b81ee[_0x4fd43a(_0x48c1c2._0xfb408a,_0x48c1c2._0x44367e,0xb6,0xc3)]>0x0&&_0x4aa7bd[_0x4fd43a(_0x48c1c2._0x1573b0,_0x48c1c2._0x1d4883,0xc3,0xd3)]({'type':_0x4fd43a(0xab,_0x48c1c2._0x496d94,0x9d,_0x48c1c2._0x1e32c0),'role':_0x4fd43a(0xda,0xd3,_0x48c1c2._0x2558c6,0xcf),'content':[{'type':_0x3b29b5(0x9c,0xa5,0x8a,_0x48c1c2._0x3f7579),'text':_0x3b29b5(_0x48c1c2._0x22a9ed,_0x48c1c2._0x2a72e6,_0x48c1c2._0x394c21,0x56)+_0x1e7464['tool_use_id']+'.'},..._0x4b81ee[_0x3b29b5(_0x48c1c2._0x1fb711,_0x48c1c2._0x32f07c,_0x48c1c2._0x4d1c47,0x5f)](_0x5b3577=>({'type':'input_image','image_url':'data:'+_0x5b3577['source'][_0x3b29b5(0x60,0x30,0x4e,0x51)]+_0x4fd43a(0xba,0xc3,0xcb,0xcd)+_0x5b3577[_0x4fd43a(0xe5,0xc5,0xc2,0xd8)][_0x4fd43a(0xec,0xd5,0xb9,0xb5)]}))]});}}pushUserContentMessage(_0x4aa7bd,_0xbe52ff['role'],_0x2acc2c);}return{...createOpenAiResponsesReasoning(_0x295eda),'model':_0x295eda[_0x3b29b5(0x3c,_0x48c1c2._0x1fd447,_0x48c1c2._0x27ec67,0x50)],'instructions':systemToInstructions(_0x295eda[_0x4fd43a(_0x48c1c2._0x1d4883,_0x48c1c2._0xa45e7a,0xbb,_0x48c1c2._0x4be8b4)]),'input':_0x4aa7bd,'max_output_tokens':_0x295eda[_0x3b29b5(_0x48c1c2._0x1a0fb3,0x7e,0x64,_0x48c1c2._0x1ca4bf)],'tools':_0x295eda[_0x4fd43a(0xbf,_0x48c1c2._0x480489,_0x48c1c2._0x274af5,_0x48c1c2._0x4edec9)]['map'](_0x34357a=>{const _0x362df4={_0x56c8a8:0x1},_0x4e5ee1={_0x335b19:0x4e,_0xbb0e0e:0x38d,_0x30a26e:0x89};function _0x203f99(_0x347664,_0x49b67b,_0x492536,_0x258244){return _0x3b29b5(_0x49b67b,_0x49b67b-_0x4e5ee1._0x335b19,_0x258244-_0x4e5ee1._0xbb0e0e,_0x258244-_0x4e5ee1._0x30a26e);}function _0x2f3b28(_0x2e44dc,_0x40932b,_0x22a4bb,_0x5282bd){return _0x3b29b5(_0x40932b,_0x40932b-0xcd,_0x5282bd-0x20,_0x5282bd-_0x362df4._0x56c8a8);}return{'type':'function','name':_0x34357a['name'],'description':_0x34357a[_0x203f99(0x413,_0x4d5daf._0x19faba,0x410,_0x4d5daf._0x5b311f)],'parameters':_0x34357a[_0x2f3b28(0xa4,0xb4,_0x4d5daf._0x3e1ca9,_0x4d5daf._0x5ddfca)]};}),..._0x295eda[_0x3b29b5(_0x48c1c2._0xea832f,_0x48c1c2._0x1a0fb3,_0x48c1c2._0x325ac4,0x6c)]?{'text':{'format':{'type':'json_schema','name':_0x295eda[_0x4fd43a(_0x48c1c2._0x527dcf,0xb3,_0x48c1c2._0x1f7978,0xab)][_0x4fd43a(_0x48c1c2._0x5999ec,_0x48c1c2._0x3253e3,0xcc,0xc7)]??'structured_output','schema':_0x295eda[_0x4fd43a(0xb1,_0x48c1c2._0x220750,0xa9,0xa7)]['schema'],'strict':_0x295eda[_0x3b29b5(_0x48c1c2._0x13ce53,0x4c,0x66,0x60)][_0x3b29b5(0x50,_0x48c1c2._0x360130,_0x48c1c2._0x4738f8,0x39)]??!![]}}}:{}};}export{toOpenAiResponsesRequest};
|
|
1
|
+
function _0x54f2(_0x544475,_0x310e75){_0x544475=_0x544475-0x1d1;const _0x433de9=_0x433d();let _0x54f229=_0x433de9[_0x544475];if(_0x54f2['jOqHhJ']===undefined){var _0x4b33d8=function(_0x1019c8){const _0xd034a2='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x9d4b5e='',_0x1e9f11='';for(let _0x3ff3d7=0x0,_0x42ce8e,_0x52e098,_0x253399=0x0;_0x52e098=_0x1019c8['charAt'](_0x253399++);~_0x52e098&&(_0x42ce8e=_0x3ff3d7%0x4?_0x42ce8e*0x40+_0x52e098:_0x52e098,_0x3ff3d7++%0x4)?_0x9d4b5e+=String['fromCharCode'](0xff&_0x42ce8e>>(-0x2*_0x3ff3d7&0x6)):0x0){_0x52e098=_0xd034a2['indexOf'](_0x52e098);}for(let _0x34ded0=0x0,_0x120eb7=_0x9d4b5e['length'];_0x34ded0<_0x120eb7;_0x34ded0++){_0x1e9f11+='%'+('00'+_0x9d4b5e['charCodeAt'](_0x34ded0)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x1e9f11);};_0x54f2['CMrlOh']=_0x4b33d8,_0x54f2['RHdPvp']={},_0x54f2['jOqHhJ']=!![];}const _0x46b955=_0x433de9[0x0],_0x3a6dde=_0x544475+_0x46b955,_0x41489b=_0x54f2['RHdPvp'][_0x3a6dde];return!_0x41489b?(_0x54f229=_0x54f2['CMrlOh'](_0x54f229),_0x54f2['RHdPvp'][_0x3a6dde]=_0x54f229):_0x54f229=_0x41489b,_0x54f229;}(function(_0x389a11,_0x31990f){const _0x25828b={_0x3b5889:0x11d,_0x321ca2:0xfc,_0x1595cb:0xd5,_0x39d6fc:0xbf,_0x5d13bf:0xc9,_0x1d0e68:0xc0,_0x3c7270:0x12,_0x4846f1:0x14,_0x2bdc3c:0x6,_0x4a05da:0xff,_0x446193:0xd6,_0x18efb5:0xf1,_0x5abe2e:0x104,_0x52b51b:0x121,_0x51e8ee:0x103,_0x52cf3d:0xf8,_0x18f221:0x16,_0x30e7ba:0x8,_0x579862:0x2a,_0x1e0d19:0xde,_0x616e60:0xd4,_0x1543f8:0xc2,_0x4f7dfb:0x5d,_0x5b7e13:0x3b},_0x17b77b={_0x4cdb29:0x210};function _0x3706e6(_0x4a51f9,_0x405d09,_0x328f95,_0x38a12a){return _0x54f2(_0x328f95- -0x2d5,_0x38a12a);}function _0x211543(_0x10df77,_0x37bc02,_0x36cb04,_0x329ee9){return _0x54f2(_0x329ee9- -_0x17b77b._0x4cdb29,_0x10df77);}const _0x51b22b=_0x389a11();while(!![]){try{const _0x548b04=parseInt(_0x3706e6(-0xf7,-0xf0,-0xdc,-0xd3))/0x1+parseInt(_0x3706e6(-_0x25828b._0x3b5889,-0xf5,-0xfe,-_0x25828b._0x321ca2))/0x2*(-parseInt(_0x3706e6(-0xf2,-_0x25828b._0x1595cb,-0xd7,-_0x25828b._0x39d6fc))/0x3)+parseInt(_0x3706e6(-0xdd,-0xcc,-_0x25828b._0x5d13bf,-_0x25828b._0x1d0e68))/0x4*(-parseInt(_0x211543(_0x25828b._0x3c7270,-_0x25828b._0x4846f1,-_0x25828b._0x2bdc3c,-0x2))/0x5)+parseInt(_0x3706e6(-0xd7,-_0x25828b._0x4a05da,-0xf4,-0xf7))/0x6*(parseInt(_0x3706e6(-0xbe,-0xda,-_0x25828b._0x446193,-0xcd))/0x7)+-parseInt(_0x3706e6(-_0x25828b._0x18efb5,-0x124,-_0x25828b._0x5abe2e,-_0x25828b._0x52b51b))/0x8*(-parseInt(_0x3706e6(-0x11c,-0xe9,-_0x25828b._0x51e8ee,-_0x25828b._0x52cf3d))/0x9)+-parseInt(_0x211543(0x7,-_0x25828b._0x18f221,-_0x25828b._0x30e7ba,-0x5))/0xa*(parseInt(_0x211543(-0x29,-0x3b,-_0x25828b._0x579862,-0x24))/0xb)+-parseInt(_0x3706e6(-0xd8,-_0x25828b._0x1e0d19,-_0x25828b._0x616e60,-_0x25828b._0x1543f8))/0xc*(parseInt(_0x211543(-0x42,-0x33,-_0x25828b._0x4f7dfb,-_0x25828b._0x5b7e13))/0xd);if(_0x548b04===_0x31990f)break;else _0x51b22b['push'](_0x51b22b['shift']());}catch(_0x10fb50){_0x51b22b['push'](_0x51b22b['shift']());}}}(_0x433d,0x8017f));import{resolveOpenAiReasoningConfig}from'./chunk-NYZR4XKO.js';import{normalizeContent}from'./chunk-QDOE7NWO.js';function systemToInstructions(_0x9d4b5e){const _0x2c691d={_0x4045a2:0x1ab,_0xeb97a2:0x1cd,_0x37372a:0x3ac,_0x658969:0x3d6,_0x17f77a:0x3b8,_0x58b6cf:0x3a2},_0x4a43a3={_0x36bc56:0x3a0};function _0x309266(_0x4aae0c,_0x21fc19,_0x4019d,_0x59fd50){return _0x54f2(_0x4019d-0x1c8,_0x4aae0c);}function _0x5f1ca0(_0x34b7cc,_0x1c3e10,_0x27166c,_0x41e124){return _0x54f2(_0x1c3e10- -_0x4a43a3._0x36bc56,_0x27166c);}return normalizeContent(_0x9d4b5e)[_0x5f1ca0(-0x1c0,-_0x2c691d._0x4045a2,-0x1a0,-_0x2c691d._0xeb97a2)](_0x1e9f11=>_0x1e9f11[_0x5f1ca0(-0x1df,-0x1cd,-0x1c1,-0x1c0)]==='text')[_0x309266(_0x2c691d._0x37372a,0x3d7,0x3ba,0x3cd)](_0x3ff3d7=>_0x3ff3d7['text'])[_0x309266(_0x2c691d._0x658969,0x3bf,_0x2c691d._0x17f77a,_0x2c691d._0x58b6cf)]('\x0a\x0a');}function pushUserContentMessage(_0x42ce8e,_0x52e098,_0x253399){const _0x492a96={_0x5018a2:0x2fc,_0x3c7400:0x2fe,_0x19589d:0x2fe,_0x551fda:0x2c7},_0x1bc87f={_0x217fa6:0xeb};function _0x523bd8(_0x16e371,_0x2141d2,_0x568197,_0x4264da){return _0x54f2(_0x2141d2-_0x1bc87f._0x217fa6,_0x568197);}if(_0x253399['length']===0x0)return;function _0xc463cd(_0x47f744,_0xee3917,_0x3cb2a3,_0x4aaba7){return _0x54f2(_0xee3917- -0x1cb,_0x47f744);}_0x42ce8e[_0x523bd8(_0x492a96._0x5018a2,_0x492a96._0x3c7400,_0x492a96._0x19589d,0x2fc)]({'type':_0x523bd8(0x2d3,_0x492a96._0x551fda,0x2d2,0x2c1),'role':_0x52e098,'content':_0x253399});}function hasSerializableToolUse(_0x34ded0){const _0x49c714={_0x564242:0x6a,_0x3cb852:0x54,_0x4f3a9a:0x60,_0xebe2b8:0x71,_0x3022b0:0x7d,_0x3fb568:0x68,_0x52c4fc:0x79},_0xa1a409={_0x3b8d67:0x18c};function _0x57a0cb(_0x4c0716,_0x4e73ed,_0x87953a,_0xfc67cd){return _0x54f2(_0x87953a- -_0xa1a409._0x3b8d67,_0x4c0716);}function _0x1182b2(_0x403ef2,_0x54a0ce,_0x4c939c,_0x500d7a){return _0x54f2(_0x54a0ce-0x149,_0x4c939c);}return _0x34ded0['id'][_0x57a0cb(0x5b,0x8c,_0x49c714._0x564242,_0x49c714._0x3cb852)]()['length']>0x0&&_0x34ded0[_0x57a0cb(_0x49c714._0x4f3a9a,_0x49c714._0xebe2b8,_0x49c714._0x3022b0,0x91)]['trim']()[_0x57a0cb(0x7a,0x69,_0x49c714._0x3fb568,_0x49c714._0x52c4fc)]>0x0;}function hasSerializableToolResult(_0x120eb7){const _0x20c5f8={_0x181fbc:0x3e6,_0x2ceca6:0x401,_0x3165e1:0x45e,_0x67a877:0x46d};function _0x6c471a(_0x133869,_0x14a47f,_0xd2c1a1,_0x485869){return _0x54f2(_0x133869-0x200,_0x485869);}function _0xe0ad32(_0x1f1ee2,_0x389c22,_0x3e89d5,_0x5b2995){return _0x54f2(_0x3e89d5-0x25b,_0x1f1ee2);}return _0x120eb7[_0x6c471a(_0x20c5f8._0x181fbc,0x3e4,0x3d9,_0x20c5f8._0x2ceca6)][_0xe0ad32(0x45e,_0x20c5f8._0x3165e1,0x451,_0x20c5f8._0x67a877)]()['length']>0x0;}function isResponseInputObject(_0x206534){const _0x119f1a={_0x4e4e86:0x1b5,_0x1b86dd:0x19c,_0xf63447:0x1be,_0x571cac:0x1b4,_0x4ad25f:0x1e3,_0x2ad480:0x1be,_0x40addc:0x1a3},_0x2ccbbc={_0x237e4a:0x15};if(typeof _0x206534!==_0x22cefd(-_0x119f1a._0x4e4e86,-_0x119f1a._0x1b86dd,-_0x119f1a._0xf63447,-_0x119f1a._0x571cac)||_0x206534===null||Array[_0x1fd134(0x203,_0x119f1a._0x4ad25f,0x1e1,0x1cf)](_0x206534))return![];const _0x11706a=_0x206534;function _0x22cefd(_0x98e54,_0x4650a1,_0x268711,_0xcf363d){return _0x54f2(_0x98e54- -0x39a,_0x4650a1);}function _0x1fd134(_0x9b15fa,_0x16938c,_0x4d885f,_0x380392){return _0x54f2(_0x16938c- -_0x2ccbbc._0x237e4a,_0x9b15fa);}return typeof _0x11706a[_0x1fd134(0x1c4,_0x119f1a._0x2ad480,0x1ca,_0x119f1a._0x40addc)]==='string';}function isImageToolResultBlock(_0x1e6e97){const _0x79f9b5={_0xe3b639:0x14c,_0x211b98:0x16a,_0x5003f8:0x37b,_0x1d4bfd:0x39c,_0x476024:0x17f,_0x59f063:0x179,_0x27a246:0x178,_0x2fa757:0x180,_0x36f8fa:0x17e,_0x16eccd:0x173,_0x26efa9:0x177,_0x2a3b95:0x372,_0x1e43e6:0x354,_0x3bcd13:0x33c,_0xb1a440:0x359,_0x312c1c:0x350},_0x12bd53={_0x587579:0x183};if(typeof _0x1e6e97!==_0xbda3f3(0x18a,_0x79f9b5._0xe3b639,_0x79f9b5._0x211b98,0x164)||_0x1e6e97===null||Array[_0x36e1bc(0x376,_0x79f9b5._0x5003f8,_0x79f9b5._0x1d4bfd,0x377)](_0x1e6e97))return![];const _0x2586ad=_0x1e6e97;function _0x36e1bc(_0x4e3161,_0x1350fb,_0xa267a3,_0x1ad2ff){return _0x54f2(_0x1350fb-_0x12bd53._0x587579,_0x4e3161);}function _0xbda3f3(_0x50130d,_0x3d6e4a,_0x112a66,_0xcc303b){return _0x54f2(_0x112a66- -0x7b,_0xcc303b);}return _0x2586ad['type']===_0xbda3f3(0x196,_0x79f9b5._0x476024,0x18d,0x178)&&_0x2586ad['source']?.['type']===_0xbda3f3(0x17c,_0x79f9b5._0x59f063,_0x79f9b5._0x27a246,0x15b)&&typeof _0x2586ad[_0xbda3f3(0x173,_0x79f9b5._0x2fa757,0x168,_0x79f9b5._0x36f8fa)][_0xbda3f3(_0x79f9b5._0x16eccd,0x184,0x182,0x181)]==='string'&&typeof _0x2586ad[_0xbda3f3(_0x79f9b5._0x26efa9,0x186,0x168,0x169)][_0x36e1bc(0x390,_0x79f9b5._0x2a3b95,_0x79f9b5._0x1e43e6,0x36a)]===_0x36e1bc(_0x79f9b5._0x3bcd13,_0x79f9b5._0xb1a440,_0x79f9b5._0x312c1c,0x349);}function getToolResultText(_0x2e4775){const _0x222396={_0x3e765b:0x35b,_0x532a4a:0x364,_0x4d5c0a:0x355,_0x41efae:0x3aa,_0x35b1be:0x38a,_0x29ab49:0x394,_0x22a756:0x387,_0x431bb5:0x37b,_0x54223b:0x3a9,_0x44f95c:0x127,_0x4c3373:0xf4,_0x188d25:0x135,_0x5555b8:0x118},_0x3b9e1e={_0x38ed5b:0xe1},_0x3a368d={_0x450a5c:0x4e6,_0x2c5281:0x516,_0x338ade:0x4f0},_0x327723={_0x1b9678:0x1a5,_0x1bc157:0x48c,_0x5deff8:0x179},_0x108f54={_0x106ece:0x1e2,_0x3bb62a:0x10c};if(typeof _0x2e4775===_0x28b172(_0x222396._0x3e765b,0x36b,_0x222396._0x532a4a,_0x222396._0x4d5c0a))return _0x2e4775;const _0x626739=_0x2e4775[_0x28b172(_0x222396._0x41efae,_0x222396._0x35b1be,0x36a,0x38c)](_0x2a18aa=>{function _0x2868c8(_0x5d94e5,_0x17b2c5,_0x2b7e6b,_0x45dc55){return _0x28b172(_0x5d94e5-_0x108f54._0x106ece,_0x17b2c5-0x17a,_0x2b7e6b-_0x108f54._0x3bb62a,_0x2b7e6b);}function _0x8bd885(_0x51dfcf,_0x3a9fca,_0x4b67c2,_0x3dbb39){return _0x370cb6(_0x51dfcf-_0x327723._0x1b9678,_0x3dbb39,_0x3a9fca-_0x327723._0x1bc157,_0x3dbb39-_0x327723._0x5deff8);}return typeof _0x2a18aa===_0x2868c8(_0x3a368d._0x450a5c,0x4f4,_0x3a368d._0x2c5281,0x4da)&&_0x2a18aa!==null&&_0x2a18aa['type']===_0x2868c8(0x507,0x4f7,_0x3a368d._0x338ade,0x4da);})[_0x28b172(_0x222396._0x29ab49,_0x222396._0x22a756,_0x222396._0x431bb5,_0x222396._0x54223b)](_0x5adc97=>_0x5adc97[_0x28b172(0x393,0x37d,0x37a,0x373)])[_0x370cb6(_0x222396._0x44f95c,_0x222396._0x4c3373,0x10f,0x120)]('\x0a\x0a')[_0x370cb6(0x117,_0x222396._0x188d25,0x115,_0x222396._0x5555b8)]();function _0x370cb6(_0x4db44e,_0x49700c,_0x3027ed,_0x540641){return _0x54f2(_0x3027ed- -_0x3b9e1e._0x38ed5b,_0x49700c);}function _0x28b172(_0x5b4246,_0x21ace7,_0x154f9c,_0x299176){return _0x54f2(_0x21ace7-0x195,_0x299176);}return _0x626739['length']>0x0?_0x626739:_0x370cb6(0x125,0x11e,0x110,0xf5);}function getToolResultImages(_0x16646c){return Array['isArray'](_0x16646c)?_0x16646c['filter'](isImageToolResultBlock):[];}function resolveReasoningVisibility(_0x46cf09){const _0x4408cd={_0x486a28:0x2de,_0x485ae6:0x2d4,_0xbc2339:0x2db,_0x12a431:0x316,_0x15293b:0x300,_0xc911a5:0x308,_0x2ef04e:0x317},_0x42ec22={_0x41c51b:0xf0};function _0x5ec8cc(_0x4b1d99,_0x308840,_0x5c21d9,_0x4bd3f2){return _0x54f2(_0x4b1d99-0x3e2,_0x5c21d9);}function _0x5dd7be(_0x35c14f,_0x585e39,_0x7e0d9,_0x3db89d){return _0x54f2(_0x585e39-_0x42ec22._0x41c51b,_0x7e0d9);}return _0x46cf09[_0x5dd7be(_0x4408cd._0x486a28,0x2ea,0x2d8,_0x4408cd._0x485ae6)]?.[_0x5dd7be(0x2e9,_0x4408cd._0xbc2339,0x2ea,0x2d7)]??_0x5dd7be(_0x4408cd._0x12a431,_0x4408cd._0x15293b,_0x4408cd._0xc911a5,_0x4408cd._0x2ef04e);}function createOpenAiResponsesReasoning(_0x1d8568){const _0x28ab3a={_0x2ec306:0x1be,_0x4af67b:0x196,_0x1b6073:0xd7,_0x2c0d29:0x1ba,_0x47868a:0x1b1,_0x204c19:0x105,_0x8974b8:0x102,_0x221d68:0xec,_0x32bf04:0x10d,_0x493a65:0x109,_0x5a5d90:0xdf,_0x15015c:0x18b,_0x54341d:0xe5,_0x1eaf86:0xd9,_0x1a6b58:0xf8,_0x1fb5a2:0xdd,_0x12086d:0xbb,_0x4da21f:0xf5},_0x660a19={_0x5b20d1:0x46},_0x4624a5=resolveOpenAiReasoningConfig(_0x1d8568[_0x3f9b0e(0x1b4,_0x28ab3a._0x2ec306,_0x28ab3a._0x4af67b,_0x28ab3a._0x4af67b)]);if(!_0x4624a5)return{};const _0x5aaa52={};function _0x3f9b0e(_0x6a271,_0x20d055,_0x388a34,_0x3e47d9){return _0x54f2(_0x6a271- -_0x660a19._0x5b20d1,_0x388a34);}const _0x549629=_0x4624a5[_0x2c79d1(-0xe5,-0xf9,-_0x28ab3a._0x1b6073,-_0x28ab3a._0x1b6073)]??(resolveReasoningVisibility(_0x1d8568)===_0x3f9b0e(0x1ca,0x1d2,_0x28ab3a._0x2c0d29,_0x28ab3a._0x47868a)?_0x2c79d1(-0xfb,-_0x28ab3a._0x204c19,-_0x28ab3a._0x8974b8,-_0x28ab3a._0x221d68):void 0x0);_0x4624a5[_0x2c79d1(-0xf4,-0xfe,-_0x28ab3a._0x32bf04,-_0x28ab3a._0x493a65)]&&(_0x5aaa52[_0x2c79d1(-0xf4,-_0x28ab3a._0x5a5d90,-0x101,-0xf5)]=_0x4624a5[_0x3f9b0e(0x199,0x19a,_0x28ab3a._0x15015c,0x1b0)]);_0x549629&&(_0x5aaa52[_0x2c79d1(-_0x28ab3a._0x54341d,-_0x28ab3a._0x1eaf86,-_0x28ab3a._0x1a6b58,-_0x28ab3a._0x1fb5a2)]=_0x549629);function _0x2c79d1(_0x4ca747,_0x2b4696,_0x242b4c,_0x3d439a){return _0x54f2(_0x4ca747- -0x2d3,_0x2b4696);}return{..._0x4624a5[_0x2c79d1(-0xd1,-0xb2,-0xb0,-0xbc)]===![]?{}:{'include':[_0x2c79d1(-0xc2,-_0x28ab3a._0x12086d,-0xc1,-0xcc)]},...Object['keys'](_0x5aaa52)[_0x2c79d1(-0xdf,-0xda,-0xc6,-_0x28ab3a._0x4da21f)]>0x0?{'reasoning':_0x5aaa52}:{}};}function pushAssistantProviderState(_0x152764,_0x1a8621){const _0x303c32={_0x6bba66:0x317,_0x59ed8d:0x33d,_0x2a7612:0x310,_0x26416e:0x332,_0x1dcb68:0x4d7,_0x18ee1a:0x50a,_0x1da086:0x4de,_0x359974:0x4ee,_0x111b57:0x326,_0x45ea67:0x328,_0x3297de:0x353,_0x141284:0x342};function _0x1ab8bb(_0x49c091,_0x48e9a6,_0x5df9d7,_0x3264d5){return _0x54f2(_0x3264d5-0x14e,_0x48e9a6);}if(_0x1a8621['role']!==_0x1ab8bb(_0x303c32._0x6bba66,_0x303c32._0x59ed8d,_0x303c32._0x2a7612,_0x303c32._0x26416e))return![];const _0x540194=_0x1a8621[_0x2ae7a8(0x4e8,0x4dd,_0x303c32._0x1dcb68,_0x303c32._0x18ee1a)]?.[_0x2ae7a8(0x4e6,_0x303c32._0x1da086,_0x303c32._0x359974,0x506)]??[];function _0x2ae7a8(_0x5a7d99,_0x5da3c3,_0x15869c,_0x374c4f){return _0x54f2(_0x5a7d99-0x306,_0x374c4f);}if(_0x540194[_0x1ab8bb(_0x303c32._0x111b57,_0x303c32._0x45ea67,_0x303c32._0x3297de,_0x303c32._0x141284)]===0x0)return![];for(const _0x4263df of _0x540194){isResponseInputObject(_0x4263df)&&_0x152764['push'](structuredClone(_0x4263df));}return!![];}function _0x433d(){const _0x3dae7f=['DhjPBq','BwvZC2fNzxm','AxnbCNjHEq','otCZmtqWy1nqD3vS','CMvHC29UAw5N','C3rYDwn0DxjLzf9VDxrWDxq','zgf0ytO','BwvKAwfFDhLWzq','mJa2mJK3ngLLwu5kAG','mta1n01XCM95qG','Aw5WDxrFDgv4Da','mtj3B2Lxyxu','Aw5JBhvKzuvUy3j5ChrLzenVBNrLBNq','Dg9VBhm','B3v0Chv0rM9YBwf0','B3v0Chv0x3rLEhq','zNvUy3rPB25Fy2fSBa','sw1Hz2uGCMv0DxjUzwqGyNKGvMLLD0zPBguGzM9YihrVB2WGCMvZDwX0ia','Aw1Hz2u','BMfTzq','Aw5WDxrFAw1Hz2u','mJe0mJa1meTcAKnlyq','mJy5mdrwzhD2r1e','C3bSAwnL','nJvtDenwuuK','y29UDgvUDa','DxnLCI12AxnPyMXL','CMvHC29UAw5NlMvUy3j5ChrLzf9JB250zw50','Bwf4vg9Rzw5Z','ChvZAa','CM9Szq','mtG3otC2t1b4Dezn','mZzZB3bfu3i','DhLWzq','Bw9KzwW','ntG0oti4nwnWyLLAsa','C3rYAw5N','mKLXAw9sqq','yxv0BW','Aw5WDxq','DxnLCG','ANnVBL9Zy2HLBwe','BwvZC2fNzq','zNvUy3rPB24','C3rYAw5NAwz5','zwzMB3j0','B3bLBMfPuMvZCg9UC2vZt3v0Chv0','mZu2mZrQC0nsqMG','ChjVDMLKzxjtDgf0zq','C291CMnL','yxnZAxn0yw50','B2jQzwn0','Dg9VBf91C2vFAwq','o2jHC2u2ncW','Dgv4Da','zgvZy3jPChrPB24','C3LZDgvT','DMLZAwjPBgL0Eq','mtfMENfpzwS','C2nOzw1H','C3vTBwfYEq','zgf0yq','AM9PBG','vg9VBcbYzxr1CM5LzcbPBwfNzsbJB250zw50lG','BwfW','yMfZzty0','BgvUz3rO','zMLSDgvY'];_0x433d=function(){return _0x3dae7f;};return _0x433d();}function toOpenAiResponsesRequest(_0x20a8d3){const _0x1ff43f={_0x34c74d:0x3d4,_0x48f1a2:0x108,_0x440668:0x13c,_0x28c2a7:0x10e,_0xace331:0x3b5,_0x4ec30d:0x3b0,_0x301dd4:0x3cf,_0x569091:0x11a,_0x8b1c09:0x119,_0x5a926b:0x39b,_0x8ac5a5:0x3ea,_0x14ad43:0xfe,_0x5528c0:0x3b5,_0x5c7b8d:0x3b1,_0x3a05d4:0x11c,_0x1b6da3:0x114,_0x1b36a3:0x10a,_0x5b0daa:0x3df,_0xb06e0f:0x3d8,_0x43192a:0x3d8,_0x3cf9e3:0x3da,_0x5b7e2b:0x3fa,_0x5a3f3d:0xdc,_0x152e89:0x107,_0x24f2fb:0xf2,_0x389c9f:0xce,_0x378c39:0xe6,_0x12f31d:0x3e1,_0x2ade19:0x3e2,_0x4180c4:0x10d,_0x47e2b5:0x127,_0x2077f4:0xef,_0x35f65c:0xfa,_0x391071:0x13b,_0x55d858:0x123,_0x57d8e5:0x113,_0xcce39:0x106,_0x415a5c:0xf9,_0x2b9b7a:0x103,_0x155b40:0x3d2,_0x30b249:0x3e6,_0x5e44f4:0x3d9,_0x1b6206:0x3e5,_0x526d12:0xf0,_0x559580:0xe5,_0xbad561:0xea,_0x3a4c26:0xec,_0x5cc588:0x3f2,_0x2a4138:0x3dc,_0x3ce3bb:0x3a6,_0x45429b:0x3bd,_0x22e69f:0x10f,_0x507f42:0xf8,_0x54b2a3:0x3e4,_0x32f6f1:0x3c9,_0x57618d:0x3ad,_0x54fd9f:0x3a7,_0x29e6fe:0x3a7,_0x345bbc:0x3df,_0x55a16e:0x3b9,_0x90f325:0x3cd,_0x5e3cce:0x10b,_0x206dc1:0x118,_0x1f1ce0:0x101,_0x40418b:0x3f4,_0x266e53:0x3b8},_0xc05ffc={_0x4a74cb:0x46b,_0xb1b1a6:0x48b,_0x427b18:0x47f},_0x2fda02={_0x22190f:0xa8},_0x9e13ff={_0x152fae:0x1d2};function _0x5a6339(_0x45decc,_0xc4b1b4,_0x5856c4,_0x5404cb){return _0x54f2(_0x5404cb- -0xec,_0x45decc);}function _0x2498d6(_0x3ebaf5,_0x3e364a,_0x2324a1,_0x1eb5b2){return _0x54f2(_0x3ebaf5-_0x9e13ff._0x152fae,_0x1eb5b2);}const _0x133bab=[];for(const _0x44d97a of _0x20a8d3[_0x2498d6(0x3c9,_0x1ff43f._0x34c74d,0x3ba,0x3dd)]){if(pushAssistantProviderState(_0x133bab,_0x44d97a))continue;const _0x4f92dd=[];for(const _0x525fc8 of normalizeContent(_0x44d97a[_0x5a6339(_0x1ff43f._0x48f1a2,0x142,0x13c,0x123)])){if(_0x525fc8[_0x2498d6(0x3a5,0x3aa,0x3b3,0x388)]==='text'){_0x4f92dd['push'](_0x44d97a[_0x5a6339(0x131,_0x1ff43f._0x440668,_0x1ff43f._0x28c2a7,0x128)]===_0x2498d6(0x3b6,_0x1ff43f._0xace331,_0x1ff43f._0x4ec30d,_0x1ff43f._0x301dd4)?{'type':_0x5a6339(_0x1ff43f._0x569091,0x132,0x119,_0x1ff43f._0x8b1c09),'text':_0x525fc8[_0x2498d6(0x3ba,0x3da,0x3a8,_0x1ff43f._0x5a926b)]}:{'type':_0x2498d6(0x3d2,0x3bd,0x3e8,0x3d5),'text':_0x525fc8[_0x5a6339(0x104,0x105,0xf3,0xfc)]});continue;}if(_0x525fc8[_0x5a6339(0xe6,0x100,0xf9,0xe7)]==='image'){_0x4f92dd[_0x2498d6(0x3e5,0x401,_0x1ff43f._0x8ac5a5,0x3e4)]({'type':_0x5a6339(_0x1ff43f._0x28c2a7,0x114,_0x1ff43f._0x14ad43,0x11e),'image_url':'data:'+_0x525fc8[_0x2498d6(_0x1ff43f._0x5528c0,_0x1ff43f._0x5c7b8d,0x3ce,0x3c2)]['media_type']+_0x5a6339(0xfa,_0x1ff43f._0x3a05d4,0xf8,0xfb)+_0x525fc8[_0x5a6339(0xe3,_0x1ff43f._0x1b6da3,_0x1ff43f._0x1b36a3,0xf7)]['data']});continue;}pushUserContentMessage(_0x133bab,_0x44d97a['role'],_0x4f92dd[_0x2498d6(_0x1ff43f._0x5b0daa,0x3d5,0x3eb,_0x1ff43f._0xb06e0f)](0x0));if(_0x525fc8['type']==='tool_use'){if(!hasSerializableToolUse(_0x525fc8))continue;_0x133bab['push']({'type':_0x2498d6(_0x1ff43f._0x43192a,_0x1ff43f._0x3cf9e3,0x3c9,_0x1ff43f._0x5b7e2b),'call_id':_0x525fc8['id'],'name':_0x525fc8['name'],'arguments':JSON[_0x5a6339(_0x1ff43f._0x5a3f3d,_0x1ff43f._0x152e89,0x106,_0x1ff43f._0x24f2fb)](_0x525fc8[_0x5a6339(_0x1ff43f._0x389c9f,0x10a,0xe6,0xed)]??{})});continue;}if(_0x525fc8[_0x5a6339(_0x1ff43f._0x378c39,0xda,0xcf,0xe7)]==='tool_result'){if(!hasSerializableToolResult(_0x525fc8))continue;const _0x4f97f2=getToolResultText(_0x525fc8[_0x2498d6(_0x1ff43f._0x12f31d,_0x1ff43f._0x2ade19,0x3c6,0x3f6)]);_0x133bab[_0x5a6339(0x120,_0x1ff43f._0x4180c4,0x11e,_0x1ff43f._0x47e2b5)]({'type':'function_call_output','call_id':_0x525fc8[_0x5a6339(_0x1ff43f._0x2077f4,0xfb,0x102,_0x1ff43f._0x35f65c)],'output':_0x4f97f2});const _0x4d46a1=getToolResultImages(_0x525fc8[_0x5a6339(0x139,0x13f,_0x1ff43f._0x391071,_0x1ff43f._0x55d858)]);_0x4d46a1[_0x5a6339(_0x1ff43f._0x57d8e5,0xff,_0x1ff43f._0x35f65c,0x108)]>0x0&&_0x133bab[_0x5a6339(0x134,_0x1ff43f._0xcce39,_0x1ff43f._0x47e2b5,0x127)]({'type':'message','role':_0x5a6339(0xcd,_0x1ff43f._0x415a5c,_0x1ff43f._0x2b9b7a,0xee),'content':[{'type':_0x2498d6(_0x1ff43f._0x155b40,0x3c0,_0x1ff43f._0x30b249,0x3c0),'text':_0x2498d6(_0x1ff43f._0x5e44f4,_0x1ff43f._0x1b6206,0x3ca,0x3df)+_0x525fc8[_0x5a6339(_0x1ff43f._0x526d12,_0x1ff43f._0x559580,0x111,_0x1ff43f._0x35f65c)]+'.'},..._0x4d46a1[_0x5a6339(_0x1ff43f._0xbad561,_0x1ff43f._0x3a4c26,_0x1ff43f._0x55d858,0x106)](_0x18e363=>({'type':'input_image','image_url':_0x2498d6(0x3ce,0x3bf,0x3c4,0x3c9)+_0x18e363[_0x5a6339(0x10f,0x10a,0x117,0xf7)][_0x5a6339(0xf1,0x129,0x104,0x111)]+_0x5a6339(0xef,0xde,0xe1,0xfb)+_0x18e363[_0x5a6339(0x10e,0x105,0xda,0xf7)][_0x5a6339(0xfe,0x10c,0x121,0x103)]}))]});}}pushUserContentMessage(_0x133bab,_0x44d97a[_0x2498d6(0x3e6,0x3ff,_0x1ff43f._0x5cc588,_0x1ff43f._0x2a4138)],_0x4f92dd);}return{...createOpenAiResponsesReasoning(_0x20a8d3),'model':_0x20a8d3[_0x2498d6(_0x1ff43f._0x3ce3bb,0x39b,0x3c0,_0x1ff43f._0x45429b)],'instructions':systemToInstructions(_0x20a8d3[_0x5a6339(_0x1ff43f._0x22e69f,_0x1ff43f._0x507f42,0xef,_0x1ff43f._0x14ad43)]),'input':_0x133bab,'max_output_tokens':_0x20a8d3[_0x2498d6(_0x1ff43f._0x54b2a3,0x3f8,0x404,0x3ea)],'tools':_0x20a8d3[_0x2498d6(0x3d5,0x3d0,0x3cc,0x3b5)]['map'](_0x217cf5=>{const _0x1a5712={_0x2892e1:0xbc,_0x437ea1:0x19f};function _0x4b36a3(_0x2591a9,_0x525672,_0x4e6031,_0x38b392){return _0x2498d6(_0x2591a9-_0x1a5712._0x2892e1,_0x525672-0x13e,_0x4e6031-_0x1a5712._0x437ea1,_0x38b392);}function _0x5d1745(_0x1526cb,_0x4ce54a,_0x5751d3,_0x2609f3){return _0x5a6339(_0x2609f3,_0x4ce54a-0x12e,_0x5751d3-_0x2fda02._0x22190f,_0x5751d3-0x1c5);}return{'type':_0x4b36a3(_0xc05ffc._0x4a74cb,0x46d,0x457,0x48c),'name':_0x217cf5[_0x4b36a3(0x497,_0xc05ffc._0xb1b1a6,0x4b6,_0xc05ffc._0x427b18)],'description':_0x217cf5[_0x5d1745(0x2ab,0x2aa,0x2c2,0x2d3)],'parameters':_0x217cf5['input_schema']};}),..._0x20a8d3[_0x2498d6(0x3d6,0x3df,_0x1ff43f._0x32f6f1,0x3f8)]?{'text':{'format':{'type':_0x2498d6(_0x1ff43f._0x57618d,0x3ac,_0x1ff43f._0x54fd9f,_0x1ff43f._0x29e6fe),'name':_0x20a8d3[_0x2498d6(0x3d6,0x3c7,_0x1ff43f._0x345bbc,_0x1ff43f._0x55a16e)]['name']??_0x2498d6(_0x1ff43f._0x90f325,0x3c0,0x3e4,0x3d2),'schema':_0x20a8d3['outputFormat'][_0x5a6339(_0x1ff43f._0x5e3cce,_0x1ff43f._0x206dc1,0xee,_0x1ff43f._0x1f1ce0)],'strict':_0x20a8d3[_0x2498d6(0x3d6,_0x1ff43f._0x40418b,_0x1ff43f._0x266e53,0x3b5)]['strict']??!![]}}}:{}};}export{toOpenAiResponsesRequest};
|
package/dist/chunk-NYZR4XKO.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function _0x13e4(){var _0x45e773=['yxv0BW','mJyYmJjouKf5uum','mteZmdi1nZHlv1fouM0','ofrpqLHkAW','zwzMB3j0','ntn4wufMy0G','otGZotq2nKvXvefKDG','yw50AhjVCgLJ','zw5HyMXLza','nZmYnZu5me1nDLzxqq','mZC4ntq5wxvbwwjj','B3bLBMfP','mtHjCLfeq08','mJK2nta4otzLALHlCMe','mJrSvhbTtNa','mJyXotmWC3D1yxzp'];_0x13e4=function(){return _0x45e773;};return _0x13e4();}function _0x2ed1(_0xb6551a,_0x1db1cb){_0xb6551a=_0xb6551a-0x1e8;var _0x13e42f=_0x13e4();var _0x2ed1be=_0x13e42f[_0xb6551a];if(_0x2ed1['jGofKk']===undefined){var _0x1f94b0=function(_0x242716){var _0xcf2455='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';var _0xb68b90='',_0x4b66ea='';for(var _0x569d90=0x0,_0x438f4b,_0x58fb8f,_0x1e0f83=0x0;_0x58fb8f=_0x242716['charAt'](_0x1e0f83++);~_0x58fb8f&&(_0x438f4b=_0x569d90%0x4?_0x438f4b*0x40+_0x58fb8f:_0x58fb8f,_0x569d90++%0x4)?_0xb68b90+=String['fromCharCode'](0xff&_0x438f4b>>(-0x2*_0x569d90&0x6)):0x0){_0x58fb8f=_0xcf2455['indexOf'](_0x58fb8f);}for(var _0x42e508=0x0,_0x33acdf=_0xb68b90['length'];_0x42e508<_0x33acdf;_0x42e508++){_0x4b66ea+='%'+('00'+_0xb68b90['charCodeAt'](_0x42e508)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x4b66ea);};_0x2ed1['AfvPgs']=_0x1f94b0,_0x2ed1['pLxHeJ']={},_0x2ed1['jGofKk']=!![];}var _0xba9458=_0x13e42f[0x0],_0x1d15ed=_0xb6551a+_0xba9458,_0x18a8c5=_0x2ed1['pLxHeJ'][_0x1d15ed];return!_0x18a8c5?(_0x2ed1be=_0x2ed1['AfvPgs'](_0x2ed1be),_0x2ed1['pLxHeJ'][_0x1d15ed]=_0x2ed1be):_0x2ed1be=_0x18a8c5,_0x2ed1be;}(function(_0x27331f,_0x643465){var _0x2e10d1={_0x479197:0x53f,_0x3a25ff:0x53e,_0x308a39:0xd7,_0x8d16c8:0xd2,_0x522d5b:0x52c,_0x6acf32:0xcc,_0x55f393:0xc9,_0x41ab1f:0xcb,_0x410a0a:0x534,_0x738e68:0x53b,_0x21775b:0x53a,_0x43ab6a:0xce,_0x2631b6:0xc8,_0x3f4870:0xca,_0x263c1d:0x52d},_0x7c8788={_0x5d8744:0x347};function _0x58eb85(_0x5cfb94,_0x48384e,_0x54cafd,_0xecc369){return _0x2ed1(_0x54cafd-_0x7c8788._0x5d8744,_0xecc369);}var _0x1e50e8=_0x27331f();function _0x258115(_0x17808d,_0x132d4f,_0x24cb0d,_0x5b7d88){return _0x2ed1(_0x5b7d88- -0x120,_0x132d4f);}while(!![]){try{var _0x204f20=parseInt(_0x58eb85(_0x2e10d1._0x479197,_0x2e10d1._0x3a25ff,0x53d,0x53f))/0x1*(-parseInt(_0x258115(_0x2e10d1._0x308a39,_0x2e10d1._0x8d16c8,0xd6,0xd2))/0x2)+parseInt(_0x58eb85(_0x2e10d1._0x522d5b,0x532,0x532,0x52e))/0x3*(parseInt(_0x258115(0xcf,_0x2e10d1._0x6acf32,_0x2e10d1._0x55f393,0xcf))/0x4)+-parseInt(_0x258115(_0x2e10d1._0x8d16c8,_0x2e10d1._0x41ab1f,0xcc,0xd0))/0x5*(-parseInt(_0x58eb85(0x53b,0x53b,0x534,0x53b))/0x6)+-parseInt(_0x258115(0xdb,_0x2e10d1._0x6acf32,0xd4,0xd3))/0x7+parseInt(_0x58eb85(_0x2e10d1._0x410a0a,0x53b,_0x2e10d1._0x738e68,_0x2e10d1._0x21775b))/0x8*(-parseInt(_0x58eb85(0x536,_0x2e10d1._0x3a25ff,_0x2e10d1._0x3a25ff,0x540))/0x9)+parseInt(_0x258115(_0x2e10d1._0x43ab6a,0xc5,_0x2e10d1._0x2631b6,_0x2e10d1._0x3f4870))/0xa+parseInt(_0x58eb85(_0x2e10d1._0x263c1d,0x537,0x535,0x52d))/0xb;if(_0x204f20===_0x643465)break;else _0x1e50e8['push'](_0x1e50e8['shift']());}catch(_0x124948){_0x1e50e8['push'](_0x1e50e8['shift']());}}}(_0x13e4,0xe56dc));var ANTHROPIC_AUTO_BUDGET_TOKENS={'low':0x400,'medium':0x800,'high':0x1000};function mapAutoReasoningEffortToBudgetTokens(_0xb68b90){return ANTHROPIC_AUTO_BUDGET_TOKENS[_0xb68b90];}function resolveAnthropicThinkingConfig(_0x4b66ea){var _0x47bcc0={_0x520d5b:0xeb,_0x53fdb5:0xe3,_0x267d2c:0xe8,_0x6db488:0xdd,_0x566363:0xe3,_0x5163e5:0xe5,_0x2ed641:0xea,_0x4db33a:0xe9,_0x4df384:0xfa,_0x5669c6:0xf9},_0x3da0a8={_0x154330:0x2d3};if(!_0x4b66ea)return void 0x0;function _0x6198ae(_0x24426a,_0x378368,_0x362193,_0x5cb436){return _0x2ed1(_0x378368- -0x2f0,_0x24426a);}if(_0x4b66ea[_0x43a7db(-0xed,-_0x47bcc0._0x520d5b,-0xec,-_0x47bcc0._0x53fdb5)])return structuredClone(_0x4b66ea[_0x43a7db(-0xea,-0xeb,-0xec,-_0x47bcc0._0x267d2c)]);if(!_0x4b66ea[_0x43a7db(-_0x47bcc0._0x6db488,-0xe2,-_0x47bcc0._0x566363,-_0x47bcc0._0x5163e5)])return void 0x0;function _0x43a7db(_0x298ca8,_0x5d8dcd,_0x342080,_0x6b67c0){return _0x2ed1(_0x5d8dcd- -_0x3da0a8._0x154330,_0x298ca8);}return{'type':_0x43a7db(-0xe8,-_0x47bcc0._0x2ed641,-0xe7,-_0x47bcc0._0x4db33a),'budgetTokens':mapAutoReasoningEffortToBudgetTokens(_0x4b66ea['auto'][_0x6198ae(-0xfa,-0xfb,-_0x47bcc0._0x4df384,-_0x47bcc0._0x5669c6)])};}function resolveOpenAiReasoningConfig(_0x569d90){var _0x4738b4={_0x495958:0x148,_0x29d863:0x148,_0x59a5e7:0x143,_0x411fa1:0x144},_0x427686={_0x2eb3bc:0x2dc},_0x51858c={_0x33f12f:0xa9};if(!_0x569d90)return void 0x0;const _0x438f4b=_0x569d90['auto']?{'effort':_0x569d90[_0x197ff9(_0x4738b4._0x495958,_0x4738b4._0x29d863,0x150,0x147)]['effort']}:void 0x0;if(!_0x569d90[_0x197ff9(_0x4738b4._0x59a5e7,0x13e,0x146,_0x4738b4._0x411fa1)])return _0x438f4b;function _0x197ff9(_0x2f5fe1,_0x1c8059,_0x113fe6,_0x5a0d5c){return _0x2ed1(_0x2f5fe1- -_0x51858c._0x33f12f,_0x5a0d5c);}function _0x37ee34(_0x5e263e,_0x54a501,_0x143878,_0x3461bf){return _0x2ed1(_0x54a501-_0x427686._0x2eb3bc,_0x3461bf);}return{..._0x438f4b??{},...structuredClone(_0x569d90['openai'])};}export{mapAutoReasoningEffortToBudgetTokens,resolveAnthropicThinkingConfig,resolveOpenAiReasoningConfig};
|
package/dist/chunk-QDOE7NWO.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0xf0906e,_0x50f37f){const _0x7db01d={_0xce1708:0x19,_0x3e3d04:0x27,_0xc62977:0x2d,_0x4da437:0x3f,_0x47252b:0x42,_0x5afb98:0x5d,_0x382a5b:0x44,_0x3f3512:0x45,_0x5ae888:0x26,_0x14e0d1:0x3f,_0x120f48:0x5c,_0x55cd57:0x110,_0x50ca91:0xfb,_0x39180d:0xf3,_0x24760b:0xdc,_0x461cf1:0x109,_0x212450:0x2f,_0x3b3f6f:0x47,_0x422d4c:0x48,_0x25e535:0x11d,_0x1a2bb9:0x11c},_0x5d11f6={_0x12e162:0x1cb},_0x1e1866={_0x8f7fb5:0x106};function _0x116649(_0x28c86b,_0x5bd7e4,_0x305a79,_0x4d6346){return _0x427d(_0x4d6346- -_0x1e1866._0x8f7fb5,_0x28c86b);}const _0x3bc975=_0xf0906e();function _0xc6c2f3(_0x500933,_0x199670,_0x1fcbed,_0x56cce9){return _0x427d(_0x56cce9- -_0x5d11f6._0x12e162,_0x500933);}while(!![]){try{const _0x245bad=parseInt(_0x116649(-_0x7db01d._0xce1708,-0x17,-_0x7db01d._0x3e3d04,-_0x7db01d._0xc62977))/0x1+-parseInt(_0x116649(-_0x7db01d._0x4da437,-_0x7db01d._0x47252b,-0x46,-_0x7db01d._0x5afb98))/0x2+parseInt(_0x116649(-_0x7db01d._0x382a5b,-0x3a,-0x48,-0x36))/0x3*(-parseInt(_0x116649(-_0x7db01d._0x3f3512,-_0x7db01d._0x5ae888,-0x4c,-_0x7db01d._0x14e0d1))/0x4)+-parseInt(_0x116649(-0x3e,-_0x7db01d._0x120f48,-0x58,-0x4e))/0x5+-parseInt(_0xc6c2f3(-_0x7db01d._0x55cd57,-0xde,-_0x7db01d._0x50ca91,-_0x7db01d._0x39180d))/0x6+parseInt(_0xc6c2f3(-0x101,-_0x7db01d._0x24760b,-_0x7db01d._0x461cf1,-0xf8))/0x7*(-parseInt(_0x116649(-_0x7db01d._0x212450,-_0x7db01d._0x3b3f6f,-0x30,-_0x7db01d._0x422d4c))/0x8)+parseInt(_0xc6c2f3(-_0x7db01d._0x25e535,-_0x7db01d._0x1a2bb9,-0x10d,-0x110))/0x9;if(_0x245bad===_0x50f37f)break;else _0x3bc975['push'](_0x3bc975['shift']());}catch(_0x2f751f){_0x3bc975['push'](_0x3bc975['shift']());}}}(_0x37c9,0x56765));function createTextBlock(_0x2e14fd){return{'type':'text','text':_0x2e14fd};}function normalizeTextBlock(_0x3431a9){const _0x3e49a7={_0x1f2652:0x225,_0x23e99d:0x227},_0x3cbe51={_0x317d9b:0x17b};function _0x5385c9(_0x1d6e94,_0x38d714,_0x5e1d93,_0x3e46fe){return _0x427d(_0x3e46fe-_0x3cbe51._0x317d9b,_0x5e1d93);}return createTextBlock(_0x3431a9[_0x5385c9(0x22b,_0x3e49a7._0x1f2652,0x211,_0x3e49a7._0x23e99d)]??'');}function normalizeContent(_0x381ee9){const _0x4a3630={_0x4fd29f:0xd0,_0xcd591f:0xce,_0x21bafe:0xa1,_0x56aa89:0xd9,_0x139ca7:0xd9,_0x49fbfe:0xf4},_0x513821={_0x780857:0x249,_0xd92548:0x238,_0x528191:0x255,_0x3541e6:0x22d,_0xba5e18:0x244},_0x46779e={_0x51b541:0x2c,_0x3f0820:0x187},_0x469702={_0x55ba95:0x5};function _0x5aa828(_0x27a841,_0x255374,_0x2b0d85,_0x167a97){return _0x427d(_0x2b0d85-_0x469702._0x55ba95,_0x255374);}if(typeof _0x381ee9===_0x16f7f6(-_0x4a3630._0x4fd29f,-0xcc,-0xe9,-0xb4))return[createTextBlock(_0x381ee9)];function _0x16f7f6(_0x2b373b,_0x111d59,_0x4ebb19,_0x356f97){return _0x427d(_0x111d59- -0x18c,_0x2b373b);}if(!Array[_0x16f7f6(-_0x4a3630._0xcd591f,-0xbb,-_0x4a3630._0x21bafe,-0xcb)](_0x381ee9))return[];return _0x381ee9[_0x16f7f6(-_0x4a3630._0x56aa89,-_0x4a3630._0x139ca7,-_0x4a3630._0x49fbfe,-0xe2)](_0x5db7d3=>{const _0x3aa1d3={_0x4fa98c:0xf5,_0x38fa86:0xef};function _0x44437c(_0x4c1053,_0x3bc892,_0x3a8daa,_0x49e8f6){return _0x16f7f6(_0x49e8f6,_0x3a8daa-_0x3aa1d3._0x4fa98c,_0x3a8daa-_0x3aa1d3._0x38fa86,_0x49e8f6-0xcd);}function _0x261aa7(_0x294009,_0x4b9df4,_0x153754,_0x12165b){return _0x5aa828(_0x294009-_0x46779e._0x51b541,_0x153754,_0x294009-_0x46779e._0x3f0820,_0x12165b-0x165);}if(_0x5db7d3[_0x261aa7(0x237,_0x513821._0x780857,0x23a,0x21c)]===_0x261aa7(_0x513821._0xd92548,_0x513821._0x528191,_0x513821._0x3541e6,_0x513821._0xba5e18))return normalizeTextBlock(_0x5db7d3);return structuredClone(_0x5db7d3);});}function _0x37c9(){const _0x350f3c=['zxjYB3i','mZKWmZG1ohDOrMjOtq','otG2odnSsvHTvNi','B3v0Chv0vg9Rzw5Z','BwvZC2fNzxm','Dg9VBhm','Dg9VBf91C2vFAwq','yxnZAxn0yw50','CMvHC29UAw5N','CMvHC29UAw5Nx3rVA2vUCW','zw5JCNLWDgvKq29UDgvUDa','DhvYBKLK','ChvZAa','khjLzgfJDgvKihjLyxnVBMLUzYK','mZK1mtK4vLDMzgz2','C2vZC2LVBL9Pza','DhLWzq','Dgv4Da','C3vTBwfYEq','y2XHDwrLlxnVBM5LDc00ltiWmJuWnte0','Dg9VBf9Yzxn1Bhq','CM9Szq','C3LZDgvT','AM9PBG','BwfW','Bw9KzwW','yw50AhjVCgLJx3jLzgfJDgvKx3rOAw5RAw5N','y29UDgvUDa','Bwf4x3rVA2vUCW','mJmYotiZmePczhLAuq','ywrK','zMLSDgvY','mJm2mtq4ntDitxfgqu0','yw50AhjVCgLJx3rOAw5RAw5N','C3rHDhvZ','nJmYAMHpvK1J','CMvHC29UAw5Nvg9Rzw5Z','C3rYAw5N','Bwf4vg9Rzw5Z','DxnHz2u','BwvZC2fNzq','C2vZC2LVBKLK','B3bLBMfPx3jLyxnVBMLUzW','B3v0Chv0','mZK2A3v2svzy','DgHPBMTPBMC','BgvUz3rO','B3v0Chv0rM9YBwf0','Dg9VBf91C2u','Bwv0ywrHDge','DhjPBq','Aw5WDxrFDg9Rzw5Z','DxnLCG','mtqYnZDuEvfmr1C','AxnbCNjHEq','ChjVDMLKzxjtDgf0zq','nte2nZrtr0viBuu','kgvUy3j5ChrLzcbYzwfZB25PBMCP','y2fSBeLK','zMXHDe1HCa'];_0x37c9=function(){return _0x350f3c;};return _0x37c9();}function normalizeSystem(_0xda18f6=[]){const _0x1060a0={_0xe2de16:0x142,_0x290117:0x149},_0x829529={_0x52fa15:0x84},_0x3cea55={_0x560fd8:0x152};function _0x39d1e4(_0xe34d6,_0x347d91,_0x1e2226,_0x485242){return _0x427d(_0x485242- -_0x3cea55._0x560fd8,_0xe34d6);}function _0x5d25c9(_0x3b2bb1,_0x5cd8a0,_0x180290,_0x49d6be){return _0x427d(_0x3b2bb1-_0x829529._0x52fa15,_0x49d6be);}return normalizeContent(_0xda18f6)[_0x5d25c9(0x13e,_0x1060a0._0xe2de16,0x13e,_0x1060a0._0x290117)](_0x522cde=>_0x522cde[_0x5d25c9(0x12f,0x119,0x111,0x127)]===_0x5d25c9(0x130,0x12c,0x128,0x12e));}function normalizeMessage(_0x2a3b48){const _0x1099af={_0x2b8104:0x388,_0x40ca0b:0x379,_0x5edf70:0x37e,_0xba284f:0x37f,_0x4fda23:0x369,_0x17119e:0x2e7,_0x1f55aa:0x2e4,_0x1f93a4:0x306,_0x9eb73a:0x303,_0x4dc46d:0x2e6,_0x3a3102:0x31d},_0x3bebc0={_0x18af4f:0x2b9},_0x174073={_0x4cb619:0x231};function _0x39db4b(_0x416d4f,_0x47cee2,_0x82ff50,_0x33e289){return _0x427d(_0x47cee2-_0x174073._0x4cb619,_0x33e289);}function _0x12d382(_0x4d6e2e,_0x390521,_0xfa4e06,_0xac07ce){return _0x427d(_0xfa4e06-_0x3bebc0._0x18af4f,_0x390521);}return{...typeof _0x2a3b48['id']===_0x12d382(_0x1099af._0x2b8104,0x36f,_0x1099af._0x40ca0b,_0x1099af._0x5edf70)?{'id':_0x2a3b48['id']}:{},'role':_0x2a3b48[_0x12d382(_0x1099af._0xba284f,0x375,_0x1099af._0x4fda23,0x364)],'content':normalizeContent(_0x2a3b48[_0x39db4b(0x2d5,_0x1099af._0x17119e,_0x1099af._0x1f55aa,0x2d6)]),..._0x2a3b48[_0x39db4b(0x31a,0x303,0x318,_0x1099af._0x1f93a4)]?{'providerState':structuredClone(_0x2a3b48[_0x39db4b(0x2ed,_0x1099af._0x9eb73a,_0x1099af._0x4dc46d,_0x1099af._0x3a3102)])}:{}};}function compileRequest(_0x1f7288){const _0x571845={_0x4711f5:0x1a5,_0x24d290:0x198,_0x27a2f3:0x180,_0x31bc42:0x181,_0x128080:0x2f4,_0x3729c8:0x2dd,_0x1e0247:0x2e7,_0x584294:0x177,_0x1c2d37:0x2c6,_0x61687:0x2af,_0x7fc5da:0x293,_0x5bff2e:0x297},_0x131ed1={_0x129d65:0x202};function _0x441259(_0x8ea50d,_0x5c42d6,_0x52d496,_0x302bbf){return _0x427d(_0x5c42d6-_0x131ed1._0x129d65,_0x52d496);}function _0x5e56b4(_0x519df3,_0x277d18,_0x563e62,_0xff6c20){return _0x427d(_0xff6c20- -0x24c,_0x563e62);}return{'model':_0x1f7288[_0x5e56b4(-0x19f,-_0x571845._0x4711f5,-0x181,-_0x571845._0x24d290)]??_0x5e56b4(-0x180,-_0x571845._0x27a2f3,-_0x571845._0x31bc42,-0x19e),'max_tokens':_0x1f7288['max_tokens']??0x400,..._0x1f7288['reasoning']?{'reasoning':structuredClone(_0x1f7288['reasoning'])}:{},'system':normalizeSystem(_0x1f7288[_0x441259(0x2a7,0x2b3,0x2c0,0x29e)]),'messages':_0x1f7288[_0x441259(_0x571845._0x128080,_0x571845._0x3729c8,_0x571845._0x1e0247,0x2d5)]['map'](normalizeMessage),'tools':structuredClone(_0x1f7288[_0x5e56b4(-0x16e,-_0x571845._0x584294,-0x168,-0x170)]??[]),'metadata':{'session_id':_0x1f7288[_0x441259(_0x571845._0x3729c8,_0x571845._0x1c2d37,_0x571845._0x61687,0x2ba)],'turn_id':_0x1f7288[_0x441259(_0x571845._0x7fc5da,0x2a8,0x2c6,_0x571845._0x5bff2e)]}};}function toChatRequest(_0x130b5c){const _0x52bea8={_0x21b1e4:0x3fb,_0x3fd5be:0x40f,_0xeda16:0x48f,_0x1dd622:0x48d,_0x504d96:0x45d,_0x35f4ef:0x466,_0x373679:0x421,_0x3f2341:0x422,_0x4cb951:0x414,_0x4b7c70:0x406,_0x49f6c6:0x440,_0x599b5d:0x432,_0x46da3a:0x41a,_0x5d8e95:0x41a,_0x5a8ad0:0x426,_0xa6c3e4:0x410,_0x339302:0x405},_0x4a6870={_0x202f54:0x346};function _0x212bbf(_0x1d4fb3,_0x28b2d1,_0x4840d0,_0x66d16c){return _0x427d(_0x1d4fb3-_0x4a6870._0x202f54,_0x4840d0);}function _0x757fd(_0x18081f,_0x1f4d45,_0x1b8d49,_0x2953b5){return _0x427d(_0x2953b5-0x3ae,_0x18081f);}return{'model':_0x130b5c[_0x212bbf(0x3fa,_0x52bea8._0x21b1e4,0x3e0,_0x52bea8._0x3fd5be)],'maxTokens':_0x130b5c[_0x757fd(0x457,0x452,0x461,0x465)],..._0x130b5c[_0x757fd(0x475,0x4a6,_0x52bea8._0xeda16,_0x52bea8._0x1dd622)]?{'reasoning':structuredClone(_0x130b5c['reasoning'])}:{},'system':structuredClone(_0x130b5c[_0x757fd(0x442,_0x52bea8._0x504d96,_0x52bea8._0x35f4ef,0x45f)]),'messages':structuredClone(_0x130b5c[_0x212bbf(_0x52bea8._0x373679,_0x52bea8._0x3f2341,_0x52bea8._0x4cb951,_0x52bea8._0x4b7c70)]),'tools':structuredClone(_0x130b5c[_0x212bbf(_0x52bea8._0x3f2341,0x41d,_0x52bea8._0x49f6c6,_0x52bea8._0x599b5d)]),'metadata':{'sessionId':_0x130b5c[_0x212bbf(0x412,_0x52bea8._0x46da3a,0x41c,_0x52bea8._0x5d8e95)][_0x212bbf(0x3f0,0x3f5,0x3f0,0x3dc)],'turnId':_0x130b5c[_0x212bbf(0x412,0x417,0x407,_0x52bea8._0x5a8ad0)]['turn_id']},..._0x130b5c[_0x212bbf(_0x52bea8._0xa6c3e4,0x422,_0x52bea8._0x339302,0x400)]?{'outputFormat':structuredClone(_0x130b5c[_0x757fd(0x480,0x474,0x45c,0x478)])}:{}};}function toModelRequest(_0x4a4861){const _0x3fd133={_0x451fda:0x15f,_0x173c9c:0x178,_0xac86f2:0x1e7,_0x44cef0:0x1dc,_0x1d7133:0x210,_0x3711e1:0x1fb,_0x3c05f5:0x205,_0x17a1fb:0x210,_0x254477:0x1fa,_0x45a746:0x1ec,_0x455369:0x20a,_0x51111d:0x1f2,_0x521bcf:0x1f6,_0x39123a:0x208,_0x36f47e:0x1e6,_0x525295:0x1f2,_0x311aad:0x1dc,_0x39e8d7:0x1ae,_0x2a53e6:0x1db,_0x2f8da3:0x206,_0x20b6a8:0x1fc,_0x357e39:0x1f1};function _0x3f9572(_0x335121,_0x359b7c,_0x2c5d8b,_0x1eb757){return _0x427d(_0x2c5d8b-0x126,_0x359b7c);}function _0x185313(_0xbdb7e4,_0x1267b9,_0x1efb4f,_0x50ba21){return _0x427d(_0x1efb4f-0xc4,_0x50ba21);}return{'model':_0x4a4861[_0x185313(0x163,_0x3fd133._0x451fda,_0x3fd133._0x173c9c,0x15b)],'max_tokens':_0x4a4861[_0x3f9572(0x1f7,0x1f9,_0x3fd133._0xac86f2,_0x3fd133._0x44cef0)],..._0x4a4861[_0x3f9572(_0x3fd133._0x1d7133,_0x3fd133._0x3711e1,_0x3fd133._0x3c05f5,_0x3fd133._0x17a1fb)]?{'reasoning':structuredClone(_0x4a4861[_0x3f9572(_0x3fd133._0x254477,0x204,_0x3fd133._0x3c05f5,_0x3fd133._0x45a746)])}:{},'system':structuredClone(_0x4a4861['system']),'messages':structuredClone(_0x4a4861[_0x3f9572(_0x3fd133._0x455369,_0x3fd133._0x51111d,0x201,_0x3fd133._0x521bcf)]),'tools':structuredClone(_0x4a4861['tools']),'metadata':{'session_id':_0x4a4861[_0x3f9572(_0x3fd133._0x39123a,0x1d4,_0x3fd133._0x51111d,_0x3fd133._0x36f47e)]['sessionId'],'turn_id':_0x4a4861[_0x3f9572(0x20c,0x20f,_0x3fd133._0x525295,_0x3fd133._0x311aad)][_0x3f9572(0x1e4,0x1bc,0x1cc,_0x3fd133._0x39e8d7)]},..._0x4a4861[_0x3f9572(_0x3fd133._0x2a53e6,0x202,0x1f0,_0x3fd133._0x2f8da3)]?{'outputFormat':structuredClone(_0x4a4861[_0x3f9572(_0x3fd133._0x20b6a8,0x1ee,0x1f0,_0x3fd133._0x357e39)])}:{}};}function toProviderModelRequest(_0x26048c){const _0x3f7f66={_0x2b343c:0x29c,_0x26109e:0x293,_0x3cb15d:0x144,_0x40a566:0x13c,_0xef47a:0x14f},_0x35f33f={_0x207b83:0x349};function _0x274b1d(_0x5bd23c,_0x36d260,_0x312e19,_0xd934fc){return _0x427d(_0xd934fc- -0x229,_0x36d260);}function _0x4ed95e(_0x46217f,_0x3a53b7,_0x3a6210,_0x15cd0b){return _0x427d(_0x15cd0b- -_0x35f33f._0x207b83,_0x46217f);}return{'model':_0x26048c[_0x4ed95e(-_0x3f7f66._0x2b343c,-_0x3f7f66._0x26109e,-0x297,-0x295)],'max_tokens':_0x26048c['maxTokens'],'system':structuredClone(_0x26048c['system']),'messages':structuredClone(_0x26048c[_0x274b1d(-_0x3f7f66._0x3cb15d,-_0x3f7f66._0x40a566,-_0x3f7f66._0xef47a,-0x14e)]),'tools':structuredClone(_0x26048c['tools'])};}function toChatResponse(_0x2c7343){const _0x116518={_0x487834:0x161,_0x348bd9:0x173,_0x45895c:0x189,_0x5661c8:0x2c7,_0x24e255:0x2b0,_0x31de8f:0x2ce,_0x123e78:0x2bd,_0x5ef009:0x29c,_0x223656:0x2b0,_0x30f39b:0x153,_0x3470f3:0x167,_0x752654:0x177,_0x771871:0x12c,_0x55dd6b:0x149,_0x51d21e:0x12b,_0x10b375:0x2c1,_0x12236b:0x295,_0x5ba785:0x2b0,_0x2eee1a:0x297,_0x31de5b:0x2c1,_0x4c542b:0x2a5,_0x3b85f8:0x2b5},_0x54ee4a={_0x1fc30b:0x1ee};function _0x214230(_0x4e6f0c,_0x447850,_0x578896,_0x20b82f){return _0x427d(_0x447850- -0x229,_0x578896);}function _0x1c5678(_0x85006c,_0x1a02ae,_0x8e57c,_0xfb0a89){return _0x427d(_0x8e57c-_0x54ee4a._0x1fc30b,_0xfb0a89);}return{'id':_0x2c7343['id'],'content':structuredClone(_0x2c7343[_0x214230(-_0x116518._0x487834,-_0x116518._0x348bd9,-0x16b,-_0x116518._0x45895c)]),'stopReason':_0x2c7343['stop_reason'],'usage':{'inputTokens':_0x2c7343[_0x1c5678(_0x116518._0x5661c8,0x29b,_0x116518._0x24e255,0x2c9)][_0x1c5678(_0x116518._0x31de8f,0x2d0,0x2bc,_0x116518._0x123e78)],'outputTokens':_0x2c7343[_0x1c5678(0x299,_0x116518._0x5ef009,_0x116518._0x223656,0x29a)]['output_tokens'],..._0x2c7343[_0x214230(-_0x116518._0x30f39b,-_0x116518._0x3470f3,-0x177,-_0x116518._0x752654)][_0x214230(-_0x116518._0x771871,-_0x116518._0x55dd6b,-0x13d,-_0x116518._0x51d21e)]!==void 0x0?{'reasoningTokens':_0x2c7343[_0x1c5678(_0x116518._0x10b375,_0x116518._0x12236b,_0x116518._0x5ba785,_0x116518._0x2eee1a)]['reasoning_tokens']}:{}},..._0x2c7343[_0x1c5678(_0x116518._0x31de5b,_0x116518._0x4c542b,0x2c0,_0x116518._0x3b85f8)]?{'providerState':structuredClone(_0x2c7343['providerState'])}:{}};}function toModelResponse(_0x225af2){const _0x23ad20={_0x5cbb24:0x231,_0x7a574f:0x21b,_0x503304:0x212,_0x41bda5:0x217,_0xa2e90:0x20d,_0x3594e4:0x1e9,_0x45fb45:0x1cd,_0xf5e3cf:0x1c6,_0x4e92f1:0x1d6,_0x268d81:0x1e5,_0x47f220:0x1ce,_0x35c011:0x1bf,_0x2ef996:0x20c,_0x4400ce:0x208,_0x54338c:0x234,_0x3a042b:0x219,_0x59a102:0x1fa,_0x37b8a8:0x20e,_0x3f2e9a:0x216,_0x4ed51e:0x1f6},_0x78a92e={_0x42942e:0x10b};function _0xaf1bea(_0x305daf,_0xff710f,_0x152425,_0x370fee){return _0x427d(_0x370fee-0x157,_0x152425);}function _0x513ad9(_0x51ba59,_0x497216,_0x5ff366,_0x1c13eb){return _0x427d(_0x5ff366-_0x78a92e._0x42942e,_0x497216);}return{'id':_0x225af2['id'],'type':_0xaf1bea(_0x23ad20._0x5cbb24,0x237,_0x23ad20._0x7a574f,0x21a),'role':'assistant','content':structuredClone(_0x225af2[_0xaf1bea(0x226,_0x23ad20._0x503304,_0x23ad20._0x41bda5,_0x23ad20._0xa2e90)]),'stop_reason':_0x225af2['stopReason'],'stop_sequence':null,'usage':{'input_tokens':_0x225af2['usage']['inputTokens'],'output_tokens':_0x225af2[_0x513ad9(_0x23ad20._0x3594e4,0x1c3,_0x23ad20._0x45fb45,_0x23ad20._0xf5e3cf)][_0x513ad9(0x1fa,_0x23ad20._0x4e92f1,_0x23ad20._0x268d81,_0x23ad20._0x47f220)],..._0x225af2['usage'][_0x513ad9(_0x23ad20._0x35c011,0x1e8,0x1ca,0x1ad)]!==void 0x0?{'reasoning_tokens':_0x225af2[_0xaf1bea(_0x23ad20._0x2ef996,_0x23ad20._0x4400ce,_0x23ad20._0x54338c,_0x23ad20._0x3a042b)][_0xaf1bea(_0x23ad20._0x59a102,_0x23ad20._0x37b8a8,0x21e,_0x23ad20._0x3f2e9a)]}:{}},..._0x225af2[_0x513ad9(0x1eb,0x1c8,0x1dd,_0x23ad20._0x4ed51e)]?{'providerState':structuredClone(_0x225af2['providerState'])}:{}};}function responseToAssistantMessage(_0x511671){const _0x33c2a8={_0x39f8ed:0x22a,_0xc3f667:0x235},_0x7ab8ba={_0x413d4d:0x318};function _0x3ffa7d(_0x19d295,_0x638647,_0x23c05f,_0x53ad5d){return _0x427d(_0x53ad5d- -0x3b7,_0x638647);}function _0x5a18ac(_0x52fcd8,_0x2e8f0b,_0x2a54d8,_0x5f3685){return _0x427d(_0x2a54d8- -_0x7ab8ba._0x413d4d,_0x2e8f0b);}return{'role':_0x5a18ac(-_0x33c2a8._0x39f8ed,-0x233,-0x23a,-0x227),'content':normalizeContent(_0x511671['content']),..._0x511671[_0x5a18ac(-_0x33c2a8._0xc3f667,-0x22c,-0x246,-0x230)]?{'providerState':structuredClone(_0x511671['providerState'])}:{}};}function createReasoningMessage(_0x5d87c0){const _0x1bd0a2={_0x43648f:0x2b,_0x135466:0x18,_0x3c7b9a:0x242,_0x532f0b:0x235,_0x560445:0x240,_0x4e74d1:0x40,_0x348e6e:0x57,_0x4a7f46:0x42},_0x4f97a2={_0x340cce:0x55,_0x34d6ba:0x4f,_0x5e9e46:0x4f,_0xfa61ac:0x64,_0x2a6738:0xaa,_0x1e0ffd:0xae,_0x224a7d:0xb1,_0xef3887:0xa2,_0x5cccc5:0x9d},_0x321fe4={_0x530b5c:0x179},_0x209658={_0x4207a8:0x9e};function _0x40783b(_0x562e1c,_0xc700ba,_0x4a51bf,_0x24ff13){return _0x427d(_0xc700ba- -_0x209658._0x4207a8,_0x4a51bf);}const _0x2c40d3=normalizeContent(_0x5d87c0?.[_0x40783b(_0x1bd0a2._0x43648f,_0x1bd0a2._0x135466,0x29,0x29)])[_0x2b6599(-_0x1bd0a2._0x3c7b9a,-0x249,-0x226,-0x23e)](_0x44deb6=>{function _0x36f8f9(_0xe3deac,_0x3c5e55,_0x49558c,_0x33f35e){return _0x40783b(_0xe3deac-0xbf,_0x3c5e55-0x38,_0x33f35e,_0x33f35e-0x73);}function _0x29e78f(_0x5953bb,_0x2ba691,_0x391d24,_0xca9d89){return _0x40783b(_0x5953bb-0x139,_0xca9d89- -0xbb,_0x5953bb,_0xca9d89-_0x321fe4._0x530b5c);}return _0x44deb6[_0x36f8f9(0x3d,0x45,_0x4f97a2._0x340cce,0x3c)]===_0x36f8f9(_0x4f97a2._0x34d6ba,_0x4f97a2._0x5e9e46,_0x4f97a2._0xfa61ac,0x42)||_0x44deb6[_0x29e78f(-0xa7,-0xca,-_0x4f97a2._0x2a6738,-_0x4f97a2._0x1e0ffd)]===_0x29e78f(-0xaf,-_0x4f97a2._0x224a7d,-_0x4f97a2._0xef3887,-_0x4f97a2._0x5cccc5)||_0x44deb6['type']==='openai_reasoning';});if(_0x2c40d3[_0x2b6599(-_0x1bd0a2._0x532f0b,-_0x1bd0a2._0x560445,-0x226,-0x22f)]===0x0)return void 0x0;function _0x2b6599(_0x58e0d4,_0x3671ec,_0x493511,_0x4baf0c){return _0x427d(_0x4baf0c- -0x2f8,_0x493511);}return{'role':_0x40783b(0x59,_0x1bd0a2._0x4e74d1,_0x1bd0a2._0x348e6e,_0x1bd0a2._0x4a7f46),'content':_0x2c40d3};}function createAssistantTextMessage(_0x3a644f){const _0x28674f={_0x341b9f:0x161,_0x35ae12:0x160,_0x129e06:0x31},_0xd5a9c5={_0x424168:0x15,_0x36b746:0x133,_0x3ecbfd:0xb2};function _0x53508e(_0x21fb43,_0x54b87c,_0x59eb5b,_0x14cd73){return _0x427d(_0x54b87c-0xab,_0x59eb5b);}const _0x48588b=normalizeContent(_0x3a644f?.[_0x53508e(0x15b,_0x28674f._0x341b9f,0x157,_0x28674f._0x35ae12)])[_0xab299d(-_0x28674f._0x129e06,-0x22,-0x40,-0x39)](_0x5ea145=>{function _0x3fa2dd(_0x5c787d,_0x3e986d,_0x3eb631,_0xcc6937){return _0x53508e(_0x5c787d-_0xd5a9c5._0x424168,_0x3eb631- -_0xd5a9c5._0x36b746,_0x3e986d,_0xcc6937-_0xd5a9c5._0x3ecbfd);}return _0x5ea145[_0x3fa2dd(0xa,0x10,0x23,0x36)]==='text';});if(_0x48588b['length']===0x0)return void 0x0;function _0xab299d(_0x5d60eb,_0x1caa73,_0x15e130,_0x30d8a9){return _0x427d(_0x15e130- -0xfa,_0x30d8a9);}return{'role':'assistant','content':_0x48588b};}function createToolUseMessage(_0x11ca64){const _0x511384={_0x409e01:0x47,_0x244772:0x4d,_0x25e8e2:0x1b,_0x564bc0:0xb,_0x1c2dd6:0x41},_0x5ec55e={_0x353a73:0x140,_0x23d496:0x13d,_0x2c69f9:0x151},_0x5338ea={_0x4f4413:0x25},_0xd6cb6d=normalizeContent(_0x11ca64?.['content'])[_0x189ca9(-_0x511384._0x409e01,-_0x511384._0x244772,-0x57,-0x5b)](_0x57cd65=>{const _0x1fa6e2={_0x21f194:0x187,_0x21826c:0x1d7,_0x5f5039:0xa3};function _0x5f1b3d(_0x185e52,_0x1caf65,_0x5c4b09,_0x9d845a){return _0x189ca9(_0x5c4b09-_0x1fa6e2._0x21f194,_0x1caf65,_0x5c4b09-_0x1fa6e2._0x21826c,_0x9d845a-_0x1fa6e2._0x5f5039);}function _0x138539(_0x3d5f14,_0xdebc72,_0x5c6dd5,_0x5dce4a){return _0x189ca9(_0x5dce4a-0x2cf,_0x3d5f14,_0x5c6dd5-_0x5338ea._0x4f4413,_0x5dce4a-0x127);}return _0x57cd65[_0x5f1b3d(_0x5ec55e._0x353a73,0x141,0x131,_0x5ec55e._0x23d496)]===_0x5f1b3d(_0x5ec55e._0x2c69f9,0x14e,0x151,0x15c);});if(_0xd6cb6d['length']===0x0)return void 0x0;function _0x4d7842(_0x16152b,_0x46ce31,_0x3c61ae,_0x1f9c98){return _0x427d(_0x1f9c98- -0x25e,_0x46ce31);}function _0x189ca9(_0x180b57,_0x3affcf,_0x45136a,_0x1b493f){return _0x427d(_0x180b57- -0x101,_0x3affcf);}return{'role':_0x189ca9(-0x23,-_0x511384._0x25e8e2,-_0x511384._0x564bc0,-_0x511384._0x1c2dd6),'content':_0xd6cb6d};}function _0x427d(_0x572173,_0x406ee3){_0x572173=_0x572173-0xa5;const _0x37c98f=_0x37c9();let _0x427db9=_0x37c98f[_0x572173];if(_0x427d['pIdLeB']===undefined){var _0x14f8d1=function(_0x18a5dd){const _0x35ded7='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x2e14fd='',_0x3431a9='';for(let _0x381ee9=0x0,_0x5db7d3,_0xda18f6,_0x522cde=0x0;_0xda18f6=_0x18a5dd['charAt'](_0x522cde++);~_0xda18f6&&(_0x5db7d3=_0x381ee9%0x4?_0x5db7d3*0x40+_0xda18f6:_0xda18f6,_0x381ee9++%0x4)?_0x2e14fd+=String['fromCharCode'](0xff&_0x5db7d3>>(-0x2*_0x381ee9&0x6)):0x0){_0xda18f6=_0x35ded7['indexOf'](_0xda18f6);}for(let _0x2a3b48=0x0,_0x1f7288=_0x2e14fd['length'];_0x2a3b48<_0x1f7288;_0x2a3b48++){_0x3431a9+='%'+('00'+_0x2e14fd['charCodeAt'](_0x2a3b48)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x3431a9);};_0x427d['myBQzH']=_0x14f8d1,_0x427d['ZMCNxJ']={},_0x427d['pIdLeB']=!![];}const _0x5822a5=_0x37c98f[0x0],_0x1b80aa=_0x572173+_0x5822a5,_0x13bebc=_0x427d['ZMCNxJ'][_0x1b80aa];return!_0x13bebc?(_0x427db9=_0x427d['myBQzH'](_0x427db9),_0x427d['ZMCNxJ'][_0x1b80aa]=_0x427db9):_0x427db9=_0x13bebc,_0x427db9;}function getTextFromMessage(_0x2e3505){const _0x258e8d={_0x281593:0x6b,_0x439380:0x7c,_0x5b416c:0x153,_0x5dee42:0x13d,_0x49bc98:0x154,_0x15a143:0x14c,_0x456a0d:0x80,_0x54d383:0x8d},_0x2a8bab={_0x4d9e13:0x99},_0x151b13={_0x11acf9:0x129};function _0x1dbcb5(_0x4c46a1,_0x386eb2,_0x5a314f,_0x34c080){return _0x427d(_0x5a314f- -_0x151b13._0x11acf9,_0x34c080);}function _0x5882ce(_0xce9223,_0x2bfce6,_0x1ab463,_0x4d064c){return _0x427d(_0xce9223-_0x2a8bab._0x4d9e13,_0x2bfce6);}return normalizeContent(_0x2e3505?.[_0x1dbcb5(-_0x258e8d._0x281593,-_0x258e8d._0x439380,-0x73,-0x81)])[_0x5882ce(_0x258e8d._0x5b416c,0x14d,_0x258e8d._0x5dee42,_0x258e8d._0x5dee42)](_0x410aab=>_0x410aab[_0x1dbcb5(-0x86,-0x70,-0x7e,-0x6a)]===_0x5882ce(0x145,0x144,0x163,0x15b))[_0x5882ce(0x14c,_0x258e8d._0x49bc98,_0x258e8d._0x15a143,0x15b)](_0x36c4cc=>_0x36c4cc[_0x5882ce(0x145,0x143,0x160,0x149)])[_0x1dbcb5(-0x74,-_0x258e8d._0x456a0d,-0x77,-_0x258e8d._0x54d383)]('\x0a');}function getReasoningTextFromMessage(_0x19183e){const _0x1a868c={_0xa3661a:0x105,_0x3d1235:0x11f,_0x35f3c6:0x12,_0x547c47:0x3e,_0x2ec17d:0x2b},_0x251976={_0x4f3d0b:0x8b,_0x115731:0xa4,_0x1f9b69:0x95,_0x30e3c9:0x85,_0x29154a:0xab,_0x2153e2:0x7a,_0x4dfb61:0x65,_0x53020d:0x82,_0x5f1842:0x82,_0x3ae1fe:0x99,_0x9e619a:0x93,_0x54edee:0xab,_0x342526:0xc6,_0x33e3f1:0xce,_0x5c286c:0x9a,_0x542b63:0x92,_0x4621f0:0x79,_0x109e4c:0xb5,_0x19bece:0xc8,_0x857348:0x70,_0x18c146:0x8d,_0xbd5879:0x99,_0x14ac50:0xb0,_0x53a4a9:0xcd,_0x116c5d:0x94,_0xbb4d68:0xac,_0x2ce5e8:0xa3,_0x476d7c:0x85,_0x51282a:0xc9,_0xd8e722:0xb3,_0x178c04:0x94,_0xa96b43:0x8a,_0x30785b:0x73,_0x31beb0:0x6a,_0x6f7e8:0xa5,_0x44bc54:0x94,_0x138812:0x93,_0x37b767:0x90,_0x5da4f1:0xa7,_0x452f50:0xa2,_0x237644:0x8c,_0x24f277:0x8f,_0x494739:0x89,_0x2d1f99:0x6b},_0x4fa30f={_0x5dd545:0x101};function _0x4abbfe(_0x5cf01a,_0x487d65,_0x46f817,_0x3abaad){return _0x427d(_0x5cf01a- -0x1d1,_0x3abaad);}function _0x503c1d(_0x2e397e,_0x5c8368,_0x32d90a,_0x4becb6){return _0x427d(_0x4becb6- -_0x4fa30f._0x5dd545,_0x5c8368);}return normalizeContent(_0x19183e?.[_0x4abbfe(-0x11b,-_0x1a868c._0xa3661a,-0x132,-_0x1a868c._0x3d1235)])[_0x503c1d(-0x31,-_0x1a868c._0x35f3c6,-_0x1a868c._0x547c47,-_0x1a868c._0x2ec17d)](_0x3d588d=>{const _0x4b25c3={_0x3110cd:0x74};if(_0x3d588d['type']===_0x5ab784(-_0x251976._0x4f3d0b,-0xa9,-_0x251976._0x115731,-0x78))return _0x3d588d[_0x5e0e46(-0xae,-_0x251976._0x1f9b69,-_0x251976._0x30e3c9,-_0x251976._0x29154a)][_0x5ab784(-_0x251976._0x2153e2,-_0x251976._0x4dfb61,-_0x251976._0x53020d,-_0x251976._0x5f1842)]()[_0x5ab784(-0x7e,-0x7f,-_0x251976._0x1f9b69,-_0x251976._0x3ae1fe)]>0x0?[_0x3d588d[_0x5e0e46(-_0x251976._0x9e619a,-0x95,-0x83,-_0x251976._0x54edee)]]:[];if(_0x3d588d[_0x5e0e46(-_0x251976._0x342526,-0xb2,-_0x251976._0x33e3f1,-_0x251976._0x5c286c)]===_0x5ab784(-_0x251976._0x542b63,-0x9c,-_0x251976._0x4f3d0b,-_0x251976._0x4621f0))return[_0x5e0e46(-_0x251976._0x342526,-_0x251976._0x109e4c,-0xaf,-_0x251976._0x19bece)];if(_0x3d588d[_0x5ab784(-0x9c,-0xa8,-0x94,-0x83)]!==_0x5ab784(-_0x251976._0x5f1842,-_0x251976._0x857348,-_0x251976._0x18c146,-_0x251976._0xbd5879))return[];const _0x5ae807=_0x3d588d[_0x5e0e46(-0x9c,-_0x251976._0x14ac50,-_0x251976._0x53a4a9,-_0x251976._0x29154a)][_0x5ab784(-_0x251976._0x116c5d,-0x96,-_0x251976._0xbb4d68,-_0x251976._0x14ac50)](_0x59a3f1=>_0x59a3f1[_0x5ab784(-0x9b,-0xac,-0xb2,-0x86)])[_0x5e0e46(-0xae,-_0x251976._0x2ce5e8,-0xb4,-_0x251976._0x476d7c)](_0x53e343=>_0x53e343[_0x5ab784(-0x7a,-0x6c,-0x90,-0x95)]()['length']>0x0)[_0x5e0e46(-_0x251976._0x51282a,-0xab,-_0x251976._0xd8e722,-0xc8)]('\x0a\x0a');if(_0x5ae807[_0x5e0e46(-0x7d,-_0x251976._0x178c04,-0xa5,-_0x251976._0xa96b43)]>0x0)return[_0x5ae807];if(_0x3d588d['text']&&_0x3d588d['text'][_0x5ab784(-0x7a,-0x6d,-_0x251976._0x30785b,-_0x251976._0x31beb0)]()[_0x5e0e46(-_0x251976._0x6f7e8,-_0x251976._0x44bc54,-_0x251976._0x4f3d0b,-_0x251976._0x138812)]>0x0)return[_0x3d588d[_0x5ab784(-0x9b,-0x83,-_0x251976._0x37b767,-_0x251976._0x5da4f1)]];function _0x5e0e46(_0x1098f3,_0x26f22a,_0x42f1bb,_0x3e90cb){return _0x4abbfe(_0x26f22a-_0x4b25c3._0x3110cd,_0x26f22a-0x1cf,_0x42f1bb-0x82,_0x1098f3);}function _0x5ab784(_0x555020,_0x42ebf8,_0x497acf,_0x5445a6){return _0x4abbfe(_0x555020-0x8a,_0x42ebf8-0x7b,_0x497acf-0x1dc,_0x497acf);}return _0x3d588d[_0x5ab784(-_0x251976._0x452f50,-0xae,-0x9e,-_0x251976._0x237644)]?[_0x5e0e46(-_0x251976._0x24f277,-_0x251976._0x494739,-_0x251976._0x2d1f99,-0x7c)]:[];})['join']('\x0a\x0a');}function getToolUseBlocks(_0x23837b){const _0x3775d4={_0x2f1be2:0x107,_0x46af77:0xeb,_0x26d217:0x377,_0x252dcc:0x391,_0x229737:0x37c},_0x4e6433={_0x406fe2:0x1a1};function _0x2321e8(_0x3e407f,_0x31bc1e,_0x2d7b70,_0x5f94bb){return _0x427d(_0x31bc1e-0x2d7,_0x3e407f);}function _0x197e54(_0x4b0f64,_0x781c44,_0x172f18,_0xb3fb30){return _0x427d(_0xb3fb30- -_0x4e6433._0x406fe2,_0x4b0f64);}return normalizeContent(_0x23837b?.[_0x197e54(-_0x3775d4._0x2f1be2,-0xfa,-0xde,-_0x3775d4._0x46af77)])[_0x2321e8(_0x3775d4._0x26d217,_0x3775d4._0x252dcc,_0x3775d4._0x229737,0x3a2)](_0x7b5797=>_0x7b5797['type']==='tool_use');}function getToolResultBlocks(_0x145504){const _0x3e9185={_0x117605:0x156,_0x79cf75:0x15f,_0x4434ca:0x14c,_0x5aa7e4:0x145},_0x401b1f={_0x488d22:0x215};function _0x3ead95(_0x51ea23,_0x14152f,_0x56c69a,_0x4247ac){return _0x427d(_0x56c69a-0x7c,_0x14152f);}function _0x2e2905(_0x24b771,_0x4668bd,_0x561474,_0xd9630d){return _0x427d(_0x4668bd- -_0x401b1f._0x488d22,_0x561474);}return normalizeContent(_0x145504?.[_0x2e2905(-_0x3e9185._0x117605,-_0x3e9185._0x79cf75,-0x165,-_0x3e9185._0x4434ca)])[_0x2e2905(-0x13e,-0x15b,-_0x3e9185._0x5aa7e4,-0x16f)](_0x2ea0ff=>_0x2ea0ff[_0x2e2905(-0x170,-0x16a,-0x16e,-0x175)]==='tool_result');}function createToolResultUserMessage(_0x33b40a){const _0x480b81={_0x573f36:0xd7,_0x29ba45:0xb4,_0x576d92:0xcf},_0x5ef32f={_0x2ff836:0x5b,_0x4094e4:0x27d,_0x1d082d:0x26d,_0x530068:0x251,_0x389616:0x276,_0x345486:0x28a,_0x18cec1:0x31,_0x460c12:0x1a},_0x4af80b={_0x211654:0x5f},_0x2b370a={_0x2e4dcb:0x19e};function _0x15bd72(_0x5a4296,_0x400a9d,_0xb7b61b,_0x380033){return _0x427d(_0xb7b61b- -_0x2b370a._0x2e4dcb,_0x5a4296);}return{'role':_0x15bd72(-_0x480b81._0x573f36,-_0x480b81._0x29ba45,-_0x480b81._0x576d92,-0xca),'content':_0x33b40a['map'](_0x5b8b09=>{const _0x2eec7d={_0x299cd4:0x18e,_0x962bb0:0x96,_0x403ae3:0xe5};function _0x1bf5ed(_0x2a8078,_0x2658d1,_0x3d1269,_0x12e5bd){return _0x15bd72(_0x3d1269,_0x2658d1-_0x2eec7d._0x299cd4,_0x2a8078-_0x2eec7d._0x962bb0,_0x12e5bd-_0x2eec7d._0x403ae3);}function _0x45ccfa(_0x110e0c,_0x5cc510,_0x3b13eb,_0x378aa1){return _0x15bd72(_0x3b13eb,_0x5cc510-0x79,_0x110e0c- -0x195,_0x378aa1-_0x4af80b._0x211654);}return{'type':_0x1bf5ed(-0x59,-0x6c,-0x74,-_0x5ef32f._0x2ff836),'tool_use_id':_0x5b8b09[_0x1bf5ed(-0x33,-0x43,-0x26,-0x16)],'content':_0x5b8b09[_0x45ccfa(-_0x5ef32f._0x4094e4,-0x291,-0x288,-0x265)]??_0x5b8b09[_0x45ccfa(-_0x5ef32f._0x1d082d,-0x271,-0x287,-_0x5ef32f._0x530068)],'is_error':_0x5b8b09[_0x45ccfa(-_0x5ef32f._0x389616,-0x28b,-0x292,-_0x5ef32f._0x345486)]===_0x1bf5ed(-_0x5ef32f._0x18cec1,-0x24,-0x4e,-_0x5ef32f._0x460c12)};})};}var INTERRUPTED_TOOL_RESULT_TEXT='Tool\x20execution\x20was\x20interrupted\x20before\x20completion\x20and\x20produced\x20no\x20result.';function synthesizeMissingToolResults(_0x334bd){const _0x53e8f5={_0x3aa694:0x469,_0x4f9d1f:0x14f,_0x71a3f7:0x15b,_0x3e0c7c:0x14e,_0x534fd5:0x140,_0x2e3f74:0x151,_0x2cb207:0x15a,_0xf5d8a8:0x450,_0x3d1cc9:0x461,_0x465548:0x46a,_0x241861:0x446,_0x2d93be:0x464,_0x5ec555:0x431,_0x56e0de:0x448},_0x5ca549={_0xf07351:0x38d},_0x4d63e2=new Set();for(const _0x2b9f37 of _0x334bd){for(const _0x5fee1a of getToolResultBlocks(_0x2b9f37)){_0x4d63e2['add'](_0x5fee1a[_0x331577(0x46a,0x45a,_0x53e8f5._0x3aa694,0x457)]);}}function _0x2f9d46(_0x43d0c6,_0x2d86a9,_0xc42414,_0x4057e8){return _0x427d(_0x2d86a9- -0x20b,_0x4057e8);}function _0x331577(_0x55254d,_0x52d370,_0x4ca2dd,_0x1666fa){return _0x427d(_0x55254d-_0x5ca549._0xf07351,_0x4ca2dd);}const _0x355874=[];for(const _0x216a4d of _0x334bd){_0x355874[_0x2f9d46(-_0x53e8f5._0x4f9d1f,-0x164,-_0x53e8f5._0x71a3f7,-_0x53e8f5._0x3e0c7c)](_0x216a4d);const _0x2af8ea=getToolUseBlocks(_0x216a4d)[_0x2f9d46(-_0x53e8f5._0x534fd5,-_0x53e8f5._0x2e3f74,-_0x53e8f5._0x2cb207,-0x138)](_0x3ce4d7=>!_0x4d63e2['has'](_0x3ce4d7['id']));if(_0x2af8ea['length']===0x0)continue;_0x355874['push']({'role':_0x331577(0x45c,_0x53e8f5._0xf5d8a8,_0x53e8f5._0x3d1cc9,_0x53e8f5._0x465548),'content':_0x2af8ea['map'](_0xbafbc3=>({'type':_0x2f9d46(-0x177,-0x15c,-0x160,-0x150),'tool_use_id':_0xbafbc3['id'],'content':INTERRUPTED_TOOL_RESULT_TEXT,'is_error':!![]}))});for(const _0x407ff4 of _0x2af8ea){_0x4d63e2[_0x331577(_0x53e8f5._0x241861,_0x53e8f5._0x2d93be,_0x53e8f5._0x5ec555,_0x53e8f5._0x56e0de)](_0x407ff4['id']);}}return _0x355874;}export{createTextBlock,normalizeTextBlock,normalizeContent,normalizeSystem,normalizeMessage,compileRequest,toChatRequest,toModelRequest,toProviderModelRequest,toChatResponse,toModelResponse,responseToAssistantMessage,createReasoningMessage,createAssistantTextMessage,createToolUseMessage,getTextFromMessage,getReasoningTextFromMessage,getToolUseBlocks,getToolResultBlocks,createToolResultUserMessage,INTERRUPTED_TOOL_RESULT_TEXT,synthesizeMissingToolResults};
|
|
1
|
+
(function(_0x4009d0,_0x48648e){const _0x44fe12={_0x636d0d:0x2c,_0x2c2c42:0x1e,_0x183df1:0x2c,_0x261797:0x4d3,_0x4bd8a3:0x4ca,_0x37b501:0x31,_0x33d398:0x39,_0x149876:0x40,_0x43b381:0x4af,_0xc2404a:0x491,_0x12a665:0x480,_0x4746d6:0x2d,_0x339b2e:0x1c,_0xa5970:0x4b,_0x58a57f:0x59,_0x447ad8:0x48c,_0x3d4033:0x49b,_0x5d8de1:0x497,_0x129ccb:0x4a6,_0x1e5ec1:0x31,_0x5f5045:0x51,_0xcc4f78:0x39,_0x50df86:0x32,_0x2e47d8:0x4b7,_0x287c6b:0x4c8,_0x449f89:0x4bb,_0x487c82:0x14,_0x326459:0x2a,_0x493b5d:0x4b9},_0x4c0acf={_0x499f0f:0x17c};function _0x6aae68(_0xa7dc19,_0x41933f,_0x2bc088,_0x35b3ff){return _0xfe7f(_0xa7dc19-0x35a,_0x35b3ff);}function _0x444e3a(_0x378f74,_0x1a433e,_0x54d6dd,_0x5674f3){return _0xfe7f(_0x5674f3- -_0x4c0acf._0x499f0f,_0x378f74);}const _0x23b6a2=_0x4009d0();while(!![]){try{const _0xe2221d=parseInt(_0x444e3a(-_0x44fe12._0x636d0d,-0x1d,-_0x44fe12._0x2c2c42,-_0x44fe12._0x183df1))/0x1*(parseInt(_0x6aae68(0x4b4,_0x44fe12._0x261797,_0x44fe12._0x4bd8a3,0x4cf))/0x2)+parseInt(_0x444e3a(-_0x44fe12._0x37b501,-0x34,-_0x44fe12._0x33d398,-_0x44fe12._0x149876))/0x3+parseInt(_0x6aae68(0x4b5,0x4ac,0x4b7,_0x44fe12._0x43b381))/0x4*(parseInt(_0x6aae68(_0x44fe12._0xc2404a,_0x44fe12._0x12a665,0x49c,0x489))/0x5)+parseInt(_0x444e3a(-_0x44fe12._0x4746d6,-0x27,-_0x44fe12._0x339b2e,-_0x44fe12._0x33d398))/0x6*(parseInt(_0x444e3a(-_0x44fe12._0xa5970,-_0x44fe12._0x58a57f,-0x45,-0x56))/0x7)+-parseInt(_0x6aae68(_0x44fe12._0x447ad8,_0x44fe12._0x3d4033,_0x44fe12._0x5d8de1,_0x44fe12._0x129ccb))/0x8+parseInt(_0x444e3a(-_0x44fe12._0x1e5ec1,-_0x44fe12._0x5f5045,-_0x44fe12._0xcc4f78,-_0x44fe12._0x50df86))/0x9*(parseInt(_0x6aae68(_0x44fe12._0x2e47d8,_0x44fe12._0x287c6b,0x4c5,_0x44fe12._0x449f89))/0xa)+-parseInt(_0x444e3a(-0x3b,-0x21,-_0x44fe12._0x487c82,-_0x44fe12._0x326459))/0xb*(parseInt(_0x6aae68(0x4a2,_0x44fe12._0x493b5d,0x499,0x4b9))/0xc);if(_0xe2221d===_0x48648e)break;else _0x23b6a2['push'](_0x23b6a2['shift']());}catch(_0x1687ae){_0x23b6a2['push'](_0x23b6a2['shift']());}}}(_0xecab,0xa47c8));function _0xfe7f(_0x47cac0,_0x4a1f86){_0x47cac0=_0x47cac0-0x125;const _0xecabaf=_0xecab();let _0xfe7f84=_0xecabaf[_0x47cac0];if(_0xfe7f['iujYcq']===undefined){var _0x2dceed=function(_0x630ce6){const _0x28800b='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x25dbd2='',_0x20e156='';for(let _0x20eccb=0x0,_0x19e38e,_0x1fe509,_0x27cfb9=0x0;_0x1fe509=_0x630ce6['charAt'](_0x27cfb9++);~_0x1fe509&&(_0x19e38e=_0x20eccb%0x4?_0x19e38e*0x40+_0x1fe509:_0x1fe509,_0x20eccb++%0x4)?_0x25dbd2+=String['fromCharCode'](0xff&_0x19e38e>>(-0x2*_0x20eccb&0x6)):0x0){_0x1fe509=_0x28800b['indexOf'](_0x1fe509);}for(let _0x3f3883=0x0,_0x548347=_0x25dbd2['length'];_0x3f3883<_0x548347;_0x3f3883++){_0x20e156+='%'+('00'+_0x25dbd2['charCodeAt'](_0x3f3883)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x20e156);};_0xfe7f['kAXVeI']=_0x2dceed,_0xfe7f['ulVvzi']={},_0xfe7f['iujYcq']=!![];}const _0x383594=_0xecabaf[0x0],_0x1cb2fc=_0x47cac0+_0x383594,_0x211278=_0xfe7f['ulVvzi'][_0x1cb2fc];return!_0x211278?(_0xfe7f84=_0xfe7f['kAXVeI'](_0xfe7f84),_0xfe7f['ulVvzi'][_0x1cb2fc]=_0xfe7f84):_0xfe7f84=_0x211278,_0xfe7f84;}function createTextBlock(_0x25dbd2){const _0x30d445={_0x251891:0x3b1};function _0x471d14(_0x1ea36e,_0x575985,_0x29339e,_0x1a282d){return _0xfe7f(_0x1a282d- -_0x30d445._0x251891,_0x1ea36e);}return{'type':_0x471d14(-0x27b,-0x253,-0x253,-0x26c),'text':_0x25dbd2};}function normalizeTextBlock(_0x20e156){const _0x60169d={_0x1eb769:0x4cf,_0x7314ec:0x4b8};function _0x2aa069(_0x4ea3e4,_0x51833b,_0x5ddb7b,_0x3abb3d){return _0xfe7f(_0x3abb3d-0x36d,_0x51833b);}return createTextBlock(_0x20e156[_0x2aa069(0x4b6,_0x60169d._0x1eb769,_0x60169d._0x7314ec,0x4b2)]??'');}function normalizeContent(_0x20eccb){const _0xc43143={_0x58677a:0x275,_0x3fc6da:0xb2,_0x467584:0xc6},_0x491379={_0x4248f0:0x48f,_0x171d4c:0x475,_0x774e45:0x48e},_0x9f0ebe={_0x3152c7:0xdd,_0x2cb93a:0x6fd},_0x3b9bd6={_0x4de081:0x1da},_0x1bc9fa={_0x5dd375:0x3bc};if(typeof _0x20eccb==='string')return[createTextBlock(_0x20eccb)];function _0x320d3e(_0x53de42,_0x1cefae,_0x588793,_0x49bf68){return _0xfe7f(_0x588793- -_0x1bc9fa._0x5dd375,_0x49bf68);}function _0x2610c7(_0x2bf09a,_0x561cb5,_0x2a8dad,_0x2449fe){return _0xfe7f(_0x2449fe- -0x21c,_0x561cb5);}if(!Array[_0x320d3e(-_0xc43143._0x58677a,-0x24a,-0x268,-0x264)](_0x20eccb))return[];return _0x20eccb[_0x2610c7(-0xae,-0xc5,-_0xc43143._0x3fc6da,-_0xc43143._0x467584)](_0x19e38e=>{function _0x2f3398(_0x29e363,_0x268d5d,_0x4fe69b,_0x10c3b4){return _0x320d3e(_0x29e363-_0x3b9bd6._0x4de081,_0x268d5d-0x70,_0x10c3b4-0x53c,_0x4fe69b);}if(_0x19e38e[_0x2a9f7b(0x47b,0x463,0x48a,0x470)]===_0x2a9f7b(0x486,_0x491379._0x4248f0,_0x491379._0x171d4c,_0x491379._0x774e45))return normalizeTextBlock(_0x19e38e);function _0x2a9f7b(_0x93e45c,_0xb2f352,_0x4feaca,_0x54cc57){return _0x320d3e(_0x93e45c-0x5,_0xb2f352-_0x9f0ebe._0x3152c7,_0x93e45c-_0x9f0ebe._0x2cb93a,_0x4feaca);}return structuredClone(_0x19e38e);});}function normalizeSystem(_0x1fe509=[]){const _0x566762={_0x517710:0x219,_0x258513:0x1ff},_0x1a3170={_0x48d263:0x367};function _0xfb9087(_0x51ac08,_0x14215f,_0x1be826,_0x6fbddd){return _0xfe7f(_0x51ac08- -_0x1a3170._0x48d263,_0x14215f);}function _0x2770b2(_0x1eb302,_0x4957b4,_0x1e0010,_0xa8e7cc){return _0xfe7f(_0x1eb302-0x116,_0x4957b4);}return normalizeContent(_0x1fe509)[_0xfb9087(-_0x566762._0x517710,-0x228,-_0x566762._0x258513,-0x205)](_0x27cfb9=>_0x27cfb9[_0x2770b2(0x250,0x256,0x23e,0x23c)]==='text');}function normalizeMessage(_0x3f3883){const _0x465f4c={_0x39d28a:0xb5,_0x1a8382:0x97,_0x406bb4:0xa1,_0x54dfa2:0x8d,_0x5206b8:0x78,_0x5d7578:0x83},_0x59a0c4={_0x549b06:0x2ec};function _0x5afafa(_0x29a727,_0x251c76,_0x484be9,_0x4d9879){return _0xfe7f(_0x4d9879-_0x59a0c4._0x549b06,_0x251c76);}function _0x37ca03(_0x559b3f,_0x18753e,_0x2aa74,_0x144e2c){return _0xfe7f(_0x559b3f- -0x1e2,_0x144e2c);}return{...typeof _0x3f3883['id']===_0x37ca03(-_0x465f4c._0x39d28a,-_0x465f4c._0x1a8382,-0xa6,-_0x465f4c._0x406bb4)?{'id':_0x3f3883['id']}:{},'role':_0x3f3883['role'],'content':normalizeContent(_0x3f3883['content']),..._0x3f3883['providerState']?{'providerState':structuredClone(_0x3f3883[_0x37ca03(-0x97,-_0x465f4c._0x54dfa2,-_0x465f4c._0x5206b8,-_0x465f4c._0x5d7578)])}:{}};}function compileRequest(_0x548347){const _0x25254c={_0x929a77:0xf9,_0x1767cb:0xf5,_0x5332e7:0xfb,_0x4e85fc:0x119,_0x567aa7:0x10c,_0x2db8a4:0x102,_0x3dddb9:0xde,_0x5c3ba2:0xd3,_0x291814:0xe8,_0x474506:0x123,_0x86f0e5:0x124,_0x2eb860:0x12f,_0x138d6e:0x10a,_0x32a511:0x11e};function _0x4c2c7a(_0x59f5f0,_0x2c49c4,_0x321833,_0x373822){return _0xfe7f(_0x59f5f0- -0x22f,_0x2c49c4);}function _0x372bc1(_0x136833,_0x22c37f,_0x4108d2,_0x2c6d70){return _0xfe7f(_0x22c37f- -0x1c,_0x136833);}return{'model':_0x548347[_0x4c2c7a(-0xf4,-0x111,-_0x25254c._0x929a77,-_0x25254c._0x1767cb)]??_0x4c2c7a(-_0x25254c._0x5332e7,-_0x25254c._0x4e85fc,-0xe4,-0x119),'max_tokens':_0x548347['max_tokens']??0x400,..._0x548347[_0x4c2c7a(-0xf7,-_0x25254c._0x567aa7,-_0x25254c._0x2db8a4,-0x107)]?{'reasoning':structuredClone(_0x548347[_0x4c2c7a(-0xf7,-_0x25254c._0x3dddb9,-0xea,-0x112)])}:{},'system':normalizeSystem(_0x548347['system']),'messages':_0x548347[_0x4c2c7a(-_0x25254c._0x5c3ba2,-_0x25254c._0x291814,-0xe3,-0xd5)]['map'](normalizeMessage),'tools':structuredClone(_0x548347[_0x372bc1(_0x25254c._0x474506,0x112,0x126,0x10a)]??[]),'metadata':{'session_id':_0x548347[_0x372bc1(0x12a,_0x25254c._0x86f0e5,_0x25254c._0x2eb860,_0x25254c._0x138d6e)],'turn_id':_0x548347[_0x372bc1(0x12b,_0x25254c._0x474506,0x11e,_0x25254c._0x32a511)]}};}function toChatRequest(_0x481ca3){const _0x4aec6f={_0xcede7d:0xb5,_0x48b4e8:0xc3,_0x3f65ed:0xb8,_0x18c64b:0xaa,_0x1692bd:0xa6,_0x5641a3:0xb3,_0x54d9f3:0xad,_0x1e9393:0xa8,_0x471c89:0xad,_0x1c0aa6:0xb9,_0x1b8955:0x92,_0x32facc:0x9f,_0x1ba0b7:0x94,_0x144adc:0x9c,_0x459f0f:0x9e,_0x1fdae4:0xa8,_0x58e79b:0x8e,_0x15cae8:0xa4,_0x7b88c2:0x4b4,_0x30149b:0x4cb,_0x186652:0x4ba,_0x26795e:0xce,_0x213575:0xb3,_0x162940:0xb6};function _0x243d06(_0x2bbdeb,_0x2db563,_0x287489,_0x486725){return _0xfe7f(_0x486725-0x373,_0x287489);}function _0x15e477(_0x8e8502,_0x5fba5f,_0x524718,_0x291443){return _0xfe7f(_0x291443- -0x1e5,_0x5fba5f);}return{'model':_0x481ca3[_0x15e477(-_0x4aec6f._0xcede7d,-_0x4aec6f._0x48b4e8,-_0x4aec6f._0x3f65ed,-_0x4aec6f._0x18c64b)],'maxTokens':_0x481ca3[_0x15e477(-0xcc,-_0x4aec6f._0x1692bd,-0xca,-0xbc)],..._0x481ca3[_0x15e477(-_0x4aec6f._0x5641a3,-0xac,-0xbf,-_0x4aec6f._0x54d9f3)]?{'reasoning':structuredClone(_0x481ca3[_0x15e477(-0xb0,-0xa0,-_0x4aec6f._0x1e9393,-_0x4aec6f._0x471c89)])}:{},'system':structuredClone(_0x481ca3[_0x15e477(-0xbf,-0x98,-_0x4aec6f._0x1c0aa6,-0xb5)]),'messages':structuredClone(_0x481ca3[_0x15e477(-_0x4aec6f._0x1b8955,-0x98,-0x82,-0x89)]),'tools':structuredClone(_0x481ca3['tools']),'metadata':{'sessionId':_0x481ca3[_0x15e477(-_0x4aec6f._0x32facc,-_0x4aec6f._0x1ba0b7,-_0x4aec6f._0x144adc,-_0x4aec6f._0x459f0f)][_0x15e477(-_0x4aec6f._0x1fdae4,-_0x4aec6f._0x58e79b,-0x91,-_0x4aec6f._0x15cae8)],'turnId':_0x481ca3[_0x243d06(_0x4aec6f._0x7b88c2,_0x4aec6f._0x30149b,0x4ce,_0x4aec6f._0x186652)]['turn_id']},..._0x481ca3['outputFormat']?{'outputFormat':structuredClone(_0x481ca3[_0x15e477(-0xa6,-_0x4aec6f._0x26795e,-_0x4aec6f._0x213575,-_0x4aec6f._0x162940)])}:{}};}function _0xecab(){const _0x261f0e=['CMvHC29UAw5Nvg9Rzw5Z','yxnZAxn0yw50','vg9VBcbLEgvJDxrPB24GD2fZigLUDgvYCNvWDgvKigjLzM9YzsbJB21WBgv0Aw9UigfUzcbWCM9KDwnLzcbUBYbYzxn1BhqU','mJu0nfrkDK1wrW','mtm4mdu4ngL0zNbTuW','BwvZC2fNzxm','odq2mZyWwerkqKjL','C3rVCf9YzwfZB24','Dg9VBf9Yzxn1Bhq','BwvZC2fNzq','AM9PBG','ywrK','mtrYBNzxzMq','CMvHC29UAw5Nx3rVA2vUCW','B3v0Chv0vg9Rzw5Z','Bwf4x3rVA2vUCW','yw50AhjVCgLJx3rOAw5RAw5N','C3rHDhvZ','Aw5WDxruB2TLBNm','C3rYAw5N','Dg9VBhm','B3v0Chv0rM9YBwf0','C3LZDgvT','Dg9VBf91C2u','mZu0nZmYofbxvwvTzW','ChvZAa','y2XHDwrLlxnVBM5LDc00ltiWmJuWnte0','y29UDgvUDa','DhjPBq','mtbZALPuAeW','CMvHC29UAw5N','B3v0Chv0','DhLWzq','Bw9KzwW','mJCXotq0m1rjvMLkAW','khjLzgfJDgvKihjLyxnVBMLUzYK','zxjYB3i','DhvYBKLK','C2vZC2LVBKLK','C2vZC2LVBL9Pza','BgvUz3rO','nJC3mJiWt0XPv01b','yw50AhjVCgLJx3jLzgfJDgvKx3rOAw5RAw5N','Dgv4Da','DxnHz2u','Bwv0ywrHDge','mJuXotCXmZjcveThugq','DxnLCG','ntrlAKndDgK','ChjVDMLKzxjtDgf0zq','B3bLBMfPx3jLyxnVBMLUzW','DgHPBMTPBMC','zMLSDgvY','B3v0Chv0x3rVA2vUCW','nJK3uwPsAhLl','AgfZ','mtfoBhzjwfe','Aw5WDxrFDg9Rzw5Z','AxnbCNjHEq','y2fSBeLK','BwfW'];_0xecab=function(){return _0x261f0e;};return _0xecab();}function toModelRequest(_0x841402){const _0x272917={_0x460526:0x83,_0x27d39f:0x9a,_0x4598cf:0x78,_0xda60e1:0x8e,_0x5df2ef:0x97,_0x35e867:0x7a,_0x324dc1:0x244,_0x2b364d:0x25d,_0x3b40e1:0x89,_0xb3c493:0xad,_0x736748:0x242,_0x4f3d91:0x232,_0x3dfdce:0xc1,_0x191d32:0xa0,_0xbcbabd:0x254,_0xe4d6f6:0x268,_0x145db7:0x246,_0x5ee1a4:0x25c,_0x1cd701:0x9f,_0x335525:0x6f},_0x51702b={_0x5846d8:0xa1};function _0x2e43df(_0xeba530,_0x4e16a0,_0x4687e2,_0x2bda16){return _0xfe7f(_0x4687e2- -_0x51702b._0x5846d8,_0x4e16a0);}function _0xe50bc2(_0x5ca16d,_0x2f5870,_0x4ea428,_0x566570){return _0xfe7f(_0x566570- -0x38b,_0x2f5870);}return{'model':_0x841402[_0x2e43df(_0x272917._0x460526,0xa1,_0x272917._0x27d39f,0x8e)],'max_tokens':_0x841402['maxTokens'],..._0x841402[_0x2e43df(0xab,0x9d,0x97,0x7f)]?{'reasoning':structuredClone(_0x841402[_0x2e43df(_0x272917._0x4598cf,_0x272917._0xda60e1,_0x272917._0x5df2ef,_0x272917._0x35e867)])}:{},'system':structuredClone(_0x841402['system']),'messages':structuredClone(_0x841402['messages']),'tools':structuredClone(_0x841402[_0xe50bc2(-0x26e,-_0x272917._0x324dc1,-0x27a,-_0x272917._0x2b364d)]),'metadata':{'session_id':_0x841402[_0x2e43df(_0x272917._0x3b40e1,0x97,0xa6,_0x272917._0xb3c493)][_0xe50bc2(-_0x272917._0x736748,-0x25b,-_0x272917._0x4f3d91,-0x24b)],'turn_id':_0x841402[_0x2e43df(_0x272917._0x3dfdce,_0x272917._0x191d32,0xa6,0xc4)]['turnId']},..._0x841402[_0xe50bc2(-_0x272917._0xbcbabd,-_0x272917._0xe4d6f6,-_0x272917._0x145db7,-_0x272917._0x5ee1a4)]?{'outputFormat':structuredClone(_0x841402[_0x2e43df(0x86,_0x272917._0x1cd701,0x8e,_0x272917._0x335525)])}:{}};}function toProviderModelRequest(_0x156b5a){const _0x404881={_0x5ed2c1:0x31e,_0x4eef09:0x335,_0x20b1ad:0x321,_0x782385:0x9d,_0x17e5ca:0x8e,_0x326473:0x350,_0x4efeaf:0x340,_0x16b972:0x323,_0x3429b9:0x33b},_0x2fce95={_0x21b576:0x1f5},_0x35d572={_0x35b1d0:0xa2};function _0x579e46(_0x1f8c83,_0x86daee,_0x1617e6,_0x14ac27){return _0xfe7f(_0x1617e6- -_0x35d572._0x35b1d0,_0x86daee);}function _0x354747(_0x734fc1,_0x1f595c,_0x4adf4e,_0x2a3dd4){return _0xfe7f(_0x734fc1-_0x2fce95._0x21b576,_0x1f595c);}return{'model':_0x156b5a[_0x354747(0x330,_0x404881._0x5ed2c1,_0x404881._0x4eef09,_0x404881._0x20b1ad)],'max_tokens':_0x156b5a['maxTokens'],'system':structuredClone(_0x156b5a[_0x579e46(0x93,_0x404881._0x782385,_0x404881._0x17e5ca,0x78)]),'messages':structuredClone(_0x156b5a[_0x354747(0x351,_0x404881._0x326473,0x353,_0x404881._0x4efeaf)]),'tools':structuredClone(_0x156b5a[_0x354747(_0x404881._0x16b972,_0x404881._0x3429b9,0x33b,0x31f)])};}function _0x1a1e1e(_0x168da7,_0x53feb4,_0x3d3a84,_0x35d114){return _0xfe7f(_0x35d114- -0x398,_0x168da7);}function toChatResponse(_0x37782f){const _0x114467={_0x316537:0x1f0,_0x3054a0:0x1f3,_0x3b7109:0x201,_0x19c243:0x1ff,_0x44f417:0x205,_0x30dd53:0x203,_0x1d2004:0x21a,_0xb966e5:0x1f7,_0x517e3c:0x1ed,_0x442b3d:0x20e,_0x291938:0x224,_0x186537:0x20c,_0x49759f:0x257,_0x5471b0:0x274,_0x43a590:0x267,_0x1af76d:0x276,_0x4c6d05:0x20a,_0x2a7d20:0x220,_0x3105ac:0x21c,_0x4afcf7:0x1e2,_0x5223a3:0x1c6,_0x70e0de:0x254,_0x502c2c:0x269,_0x41bd43:0x238,_0x201eb5:0x232,_0x16bb90:0x234,_0x4737a0:0x206,_0x4ae701:0x20a,_0x5df5b6:0x25c,_0x48e185:0x247},_0x299a35={_0x4857ea:0xbb};function _0x4c223c(_0x2ee9ba,_0x23cfdd,_0x20b0a3,_0xc9a501){return _0xfe7f(_0x2ee9ba-0x111,_0x20b0a3);}function _0x425fc1(_0x3ec18a,_0x234e5c,_0x269373,_0xf39842){return _0xfe7f(_0x3ec18a-_0x299a35._0x4857ea,_0x269373);}return{'id':_0x37782f['id'],'content':structuredClone(_0x37782f[_0x425fc1(_0x114467._0x316537,_0x114467._0x3054a0,_0x114467._0x3b7109,_0x114467._0x19c243)]),'stopReason':_0x37782f[_0x425fc1(0x219,_0x114467._0x44f417,_0x114467._0x30dd53,0x20c)],'usage':{'inputTokens':_0x37782f[_0x425fc1(0x201,_0x114467._0x1d2004,_0x114467._0xb966e5,_0x114467._0x517e3c)][_0x425fc1(_0x114467._0x442b3d,_0x114467._0x291938,0x1f6,_0x114467._0x186537)],'outputTokens':_0x37782f[_0x4c223c(_0x114467._0x49759f,_0x114467._0x5471b0,_0x114467._0x43a590,_0x114467._0x1af76d)][_0x425fc1(_0x114467._0x4c6d05,_0x114467._0x2a7d20,_0x114467._0x3105ac,0x208)],..._0x37782f['usage'][_0x425fc1(_0x114467._0x4afcf7,_0x114467._0x5223a3,0x1cb,_0x114467._0x5223a3)]!==void 0x0?{'reasoningTokens':_0x37782f[_0x4c223c(0x257,_0x114467._0x70e0de,_0x114467._0x502c2c,0x240)][_0x4c223c(_0x114467._0x41bd43,_0x114467._0x201eb5,0x236,_0x114467._0x16bb90)]}:{}},..._0x37782f[_0x425fc1(_0x114467._0x4737a0,0x217,0x219,_0x114467._0x4ae701)]?{'providerState':structuredClone(_0x37782f[_0x4c223c(_0x114467._0x5df5b6,0x259,0x260,_0x114467._0x48e185)])}:{}};}function toModelResponse(_0x5c13a0){const _0xb509c4={_0x36c7a7:0x187,_0x78c27a:0x1ac,_0x51aad3:0x18d,_0x4a3c36:0x1a3,_0x3df5f2:0x1a3,_0x4a9d30:0x1b2,_0x41762f:0x1a1,_0x12bfa2:0x1bc,_0x230a13:0x1a0,_0x1bafb8:0x1a3,_0x168479:0x1c1,_0x1f8d5f:0x1a7,_0x78f358:0x1cc,_0x3abf91:0x1c6,_0x1e04a7:0x1b0,_0x4b7ac0:0x1af,_0xe6f5d3:0x1b7,_0x1e746e:0x1bf,_0x3f0b17:0x1f4,_0x1a2c73:0x1f0,_0x26a686:0x18f,_0x576979:0x1a9,_0x131aeb:0x1de,_0x52eabd:0x1c7,_0x1c633d:0x1e4,_0x581ca7:0x1be,_0xd2143c:0x1c9},_0x5f2ac6={_0x3a979e:0x87};function _0x467c3f(_0x133afc,_0x171132,_0x2a8a5f,_0x5bb27a){return _0xfe7f(_0x2a8a5f-_0x5f2ac6._0x3a979e,_0x133afc);}function _0x36f771(_0x3c08fd,_0x5b66a6,_0x41d98b,_0x43ac9f){return _0xfe7f(_0x41d98b- -0x2ed,_0x3c08fd);}return{'id':_0x5c13a0['id'],'type':_0x36f771(-_0xb509c4._0x36c7a7,-_0xb509c4._0x78c27a,-_0xb509c4._0x51aad3,-_0xb509c4._0x4a3c36),'role':_0x36f771(-_0xb509c4._0x3df5f2,-0x1a5,-0x195,-_0xb509c4._0x4a9d30),'content':structuredClone(_0x5c13a0[_0x467c3f(0x1a4,_0xb509c4._0x41762f,_0xb509c4._0x12bfa2,_0xb509c4._0x230a13)]),'stop_reason':_0x5c13a0['stopReason'],'stop_sequence':null,'usage':{'input_tokens':_0x5c13a0[_0x36f771(-_0xb509c4._0x1bafb8,-_0xb509c4._0x168479,-_0xb509c4._0x1f8d5f,-0x1b0)][_0x36f771(-0x1b0,-_0xb509c4._0x78f358,-0x1c1,-0x1da)],'output_tokens':_0x5c13a0[_0x36f771(-_0xb509c4._0x3abf91,-0x1a3,-0x1a7,-_0xb509c4._0x1e04a7)][_0x467c3f(0x1cc,0x1be,_0xb509c4._0x4b7ac0,_0xb509c4._0x4a9d30)],..._0x5c13a0[_0x36f771(-_0xb509c4._0xe6f5d3,-_0xb509c4._0x1e746e,-0x1a7,-0x19d)][_0x467c3f(_0xb509c4._0x3f0b17,_0xb509c4._0x1a2c73,0x1de,0x1da)]!==void 0x0?{'reasoning_tokens':_0x5c13a0[_0x36f771(-_0xb509c4._0x26a686,-_0xb509c4._0x576979,-0x1a7,-_0xb509c4._0x4a9d30)][_0x467c3f(0x1da,0x1d3,_0xb509c4._0x131aeb,_0xb509c4._0x52eabd)]}:{}},..._0x5c13a0['providerState']?{'providerState':structuredClone(_0x5c13a0[_0x467c3f(_0xb509c4._0x1c633d,_0xb509c4._0x581ca7,0x1d2,_0xb509c4._0xd2143c)])}:{}};}function responseToAssistantMessage(_0x21fa60){const _0x1f3ff6={_0xf5fed9:0xa1,_0x4560bf:0xaa,_0x5ceed0:0x26e,_0x47ee36:0x257,_0x3671b3:0xb9};function _0x29eb80(_0x2cdc82,_0x35add3,_0x5a1565,_0x271244){return _0xfe7f(_0x2cdc82- -0xa6,_0x5a1565);}function _0x20830a(_0x4eb5fd,_0xd959ad,_0x542d50,_0x1ebceb){return _0xfe7f(_0x4eb5fd-0x123,_0x1ebceb);}return{'role':_0x29eb80(0xb2,0xd0,_0x1f3ff6._0xf5fed9,_0x1f3ff6._0x4560bf),'content':normalizeContent(_0x21fa60[_0x20830a(0x258,_0x1f3ff6._0x5ceed0,0x241,_0x1f3ff6._0x47ee36)]),..._0x21fa60['providerState']?{'providerState':structuredClone(_0x21fa60[_0x29eb80(0xa5,0x8e,_0x1f3ff6._0x3671b3,0xa7)])}:{}};}function createReasoningMessage(_0x3ad2de){const _0x45e0da={_0x18c335:0x1ae,_0x359710:0x1c3,_0x29ac8d:0x1c8,_0x535ddb:0x1bb,_0x259465:0x195,_0x4b6d83:0x18c,_0x492974:0x197,_0x3a2216:0x1b3},_0x511b97={_0x4d9c15:0x5b},_0x57b1ef={_0x31c259:0x425,_0x4cbde0:0x419,_0x58bdaa:0x326,_0x4d5d24:0x312,_0x386099:0x41c,_0x142e37:0x428,_0x1a7f2d:0x43e,_0x5891b3:0x440,_0x18e4ab:0x41f},_0x338a50={_0x1ee05a:0x5d5,_0x42092a:0x174},_0x53c2f3=normalizeContent(_0x3ad2de?.[_0x3d4d27(-_0x45e0da._0x18c335,-_0x45e0da._0x359710,-0x1ad,-_0x45e0da._0x29ac8d)])[_0x24af8c(_0x45e0da._0x535ddb,_0x45e0da._0x18c335,_0x45e0da._0x259465,0x1a9)](_0x32bab9=>{const _0x1afe48={_0x5a97e2:0x9b,_0x48d915:0x15f};function _0x20d83b(_0x322097,_0x245f90,_0x47e443,_0x47695a){return _0x3d4d27(_0x245f90-_0x338a50._0x1ee05a,_0x245f90-_0x338a50._0x42092a,_0x47e443-0x122,_0x47695a);}function _0x44538e(_0x40f10b,_0x2e3764,_0x159479,_0x1c3258){return _0x24af8c(_0x40f10b-_0x1afe48._0x5a97e2,_0x2e3764-_0x1afe48._0x48d915,_0x159479,_0x40f10b-0x182);}return _0x32bab9[_0x20d83b(_0x57b1ef._0x31c259,0x42c,_0x57b1ef._0x4cbde0,0x410)]==='anthropic_redacted_thinking'||_0x32bab9[_0x44538e(0x317,0x329,_0x57b1ef._0x58bdaa,_0x57b1ef._0x4d5d24)]===_0x20d83b(0x434,_0x57b1ef._0x386099,0x424,_0x57b1ef._0x142e37)||_0x32bab9['type']===_0x20d83b(0x428,_0x57b1ef._0x1a7f2d,_0x57b1ef._0x5891b3,_0x57b1ef._0x18e4ab);});function _0x3d4d27(_0x556541,_0xf328ce,_0x56c9e1,_0x4b60cf){return _0xfe7f(_0x556541- -0x2e3,_0x4b60cf);}function _0x24af8c(_0x8f69a5,_0x19b63f,_0x57c623,_0x24e971){return _0xfe7f(_0x24e971-_0x511b97._0x4d9c15,_0x57c623);}if(_0x53c2f3[_0x24af8c(_0x45e0da._0x4b6d83,0x1b5,_0x45e0da._0x492974,0x19d)]===0x0)return void 0x0;return{'role':_0x24af8c(_0x45e0da._0x3a2216,0x1b5,0x1c1,0x1b3),'content':_0x53c2f3};}function createAssistantTextMessage(_0x20a342){const _0x2d5a3f={_0x1a0d26:0x1ac,_0x5a7c92:0x1d1,_0x5c8f96:0x1b6,_0x205550:0x1ce},_0x4854fa={_0x480b95:0xe1},_0x42e549={_0x1dccbb:0x50,_0x5cd2ab:0x16f},_0x10e12c=normalizeContent(_0x20a342?.['content'])[_0x1013c4(-_0x2d5a3f._0x1a0d26,-0x1b1,-0x1bf,-0x197)](_0x9eb182=>{const _0x6ffc60={_0x262e19:0x11},_0x266201={_0x2d0e2b:0x36,_0x4e53c7:0x10b,_0x2cb5df:0x92};function _0x37e3ae(_0x5a6e89,_0x4c0c4f,_0x97821c,_0x4acfc9){return _0x1013c4(_0x4c0c4f,_0x5a6e89-_0x266201._0x2d0e2b,_0x97821c-_0x266201._0x4e53c7,_0x4acfc9-_0x266201._0x2cb5df);}function _0x39fbe8(_0x2ce4c4,_0x312228,_0x1ea501,_0x25561c){return _0x1013c4(_0x25561c,_0x312228-0x209,_0x1ea501-_0x6ffc60._0x262e19,_0x25561c-0x17b);}return _0x9eb182[_0x39fbe8(_0x42e549._0x1dccbb,0x44,0x62,0x26)]===_0x37e3ae(-0x184,-_0x42e549._0x5cd2ab,-0x1a3,-0x1a1);});function _0xbea90(_0xb34599,_0xa0a34f,_0x10a3e0,_0x37b937){return _0xfe7f(_0x37b937-_0x4854fa._0x480b95,_0xb34599);}function _0x1013c4(_0x49880c,_0x49050c,_0xcdaf04,_0x3dd538){return _0xfe7f(_0x49050c- -0x2ff,_0x49880c);}if(_0x10e12c[_0x1013c4(-_0x2d5a3f._0x5a7c92,-0x1bd,-_0x2d5a3f._0x5c8f96,-_0x2d5a3f._0x205550)]===0x0)return void 0x0;return{'role':'assistant','content':_0x10e12c};}function createToolUseMessage(_0x538ced){const _0x67c33d={_0x35add6:0x27c,_0x1a9adf:0x27e,_0x41ace4:0x264,_0x1a94a4:0x240,_0x24fc00:0x23e,_0x552fd6:0x458},_0x7f4e25={_0xb4df76:0x39c},_0x16d92f={_0x24f69b:0x2ce,_0x59fb18:0x2e0,_0x5c5b67:0x2be,_0x37d23e:0x2f0},_0x1b70fe={_0x4e4418:0x153},_0x4f55d9={_0x556b45:0x14};function _0x1751fe(_0x520762,_0x1400e0,_0x48f689,_0x59427a){return _0xfe7f(_0x48f689-0x312,_0x1400e0);}const _0x34bc2a=normalizeContent(_0x538ced?.[_0x717f61(-0x271,-0x267,-_0x67c33d._0x35add6,-_0x67c33d._0x1a9adf)])['filter'](_0x373d10=>{function _0x113b8d(_0x50f715,_0x58c0dd,_0x3046ad,_0x406435){return _0x717f61(_0x50f715-0xfe,_0x58c0dd-0x60f,_0x3046ad,_0x406435-_0x4f55d9._0x556b45);}function _0x42e0c3(_0xc15f75,_0x589060,_0x30428d,_0x1e73ad){return _0x717f61(_0xc15f75-0xf5,_0x589060-0x543,_0x1e73ad,_0x1e73ad-_0x1b70fe._0x4e4418);}return _0x373d10[_0x42e0c3(_0x16d92f._0x24f69b,0x2e1,0x2c6,_0x16d92f._0x59fb18)]===_0x42e0c3(_0x16d92f._0x5c5b67,0x2d8,_0x16d92f._0x37d23e,0x2e1);});function _0x717f61(_0x6d53fb,_0x3259dd,_0x5d23db,_0x33c33e){return _0xfe7f(_0x3259dd- -_0x7f4e25._0xb4df76,_0x5d23db);}if(_0x34bc2a[_0x717f61(-_0x67c33d._0x41ace4,-0x25a,-_0x67c33d._0x1a94a4,-_0x67c33d._0x24fc00)]===0x0)return void 0x0;return{'role':_0x1751fe(0x452,_0x67c33d._0x552fd6,0x46a,0x482),'content':_0x34bc2a};}function getTextFromMessage(_0x5287c9){const _0x532bb4={_0x4ac70d:0x4ad,_0x49548a:0x4a3,_0x3b16d1:0x4ab,_0x7032ab:0x4d6,_0x4acb64:0x47c,_0x9aa54b:0x463,_0x6efb94:0x454,_0x3f63eb:0x4c7};function _0xe9adba(_0x322236,_0x351638,_0x37d554,_0x2ef2ab){return _0xfe7f(_0x37d554-0x36e,_0x322236);}function _0x2729ae(_0x58d870,_0x1a677d,_0xd306b,_0x259b73){return _0xfe7f(_0xd306b-0x30d,_0x259b73);}return normalizeContent(_0x5287c9?.[_0xe9adba(0x489,_0x532bb4._0x4ac70d,0x4a3,_0x532bb4._0x49548a)])[_0xe9adba(0x4c0,_0x532bb4._0x3b16d1,0x4bc,_0x532bb4._0x7032ab)](_0x511949=>_0x511949['type']===_0x2729ae(0x435,0x45f,0x452,0x464))[_0x2729ae(_0x532bb4._0x4acb64,0x45f,_0x532bb4._0x9aa54b,_0x532bb4._0x6efb94)](_0x939729=>_0x939729[_0x2729ae(0x451,0x463,0x452,0x44a)])[_0xe9adba(0x4ec,_0x532bb4._0x3f63eb,0x4cf,0x4ed)]('\x0a');}function getReasoningTextFromMessage(_0x5e62cb){const _0xc37b9a={_0x339da5:0x34d,_0x12f9b2:0x335,_0x43d1e0:0x338},_0x296b2a={_0x309d83:0x1fc,_0x50149:0x20a,_0x59741c:0x213,_0x172834:0x20d,_0x12ed48:0x1f7,_0x64c398:0x207,_0x39afbc:0x18d,_0x533c5c:0x1a0,_0x18d767:0x1d8,_0x4f4f2b:0x1f0,_0x1b260f:0x1f7,_0x4709c9:0x1f9,_0x5deeec:0x192,_0x43655e:0x177,_0x1ebffb:0x198,_0x53c1a6:0x195,_0x36bc16:0x173,_0x435bfb:0x1d3,_0x24d786:0x1e7,_0x26616d:0x1e7,_0x391922:0x169,_0x3c331f:0x19e,_0x3937a3:0x202,_0x599fc2:0x1f6,_0x3e853a:0x1fe,_0xee41fa:0x1fb,_0x340878:0x183,_0x347a7e:0x173,_0x317a17:0x206,_0x58e587:0x1ee,_0x378b67:0x18a,_0x3b6616:0x173,_0x38bde5:0x16e},_0x32ba82={_0x1c444d:0x1d7};function _0x4b198f(_0x2d48bc,_0x32dac9,_0x115020,_0x4f0aa2){return _0xfe7f(_0x4f0aa2-_0x32ba82._0x1c444d,_0x2d48bc);}return normalizeContent(_0x5e62cb?.['content'])['flatMap'](_0x2781da=>{const _0x45f48c={_0x30c94c:0x33d},_0x91de01={_0x38b43d:0x2cf};if(_0x2781da[_0x3ebcfb(-_0x296b2a._0x309d83,-0x210,-0x202,-0x203)]===_0x3ebcfb(-0x1f6,-_0x296b2a._0x50149,-0x21b,-_0x296b2a._0x59741c))return _0x2781da[_0x3ebcfb(-_0x296b2a._0x172834,-_0x296b2a._0x12ed48,-0x1d2,-0x1f0)][_0x3ebcfb(-0x224,-0x1fe,-0x20b,-_0x296b2a._0x64c398)]()[_0x41ecdb(-_0x296b2a._0x39afbc,-0x1a1,-0x181,-_0x296b2a._0x533c5c)]>0x0?[_0x2781da[_0x3ebcfb(-0x1e5,-0x1eb,-_0x296b2a._0x18d767,-_0x296b2a._0x4f4f2b)]]:[];if(_0x2781da['type']===_0x3ebcfb(-_0x296b2a._0x1b260f,-0x1dc,-0x204,-_0x296b2a._0x4709c9))return[_0x41ecdb(-_0x296b2a._0x5deeec,-_0x296b2a._0x43655e,-0x19f,-_0x296b2a._0x1ebffb)];if(_0x2781da['type']!==_0x41ecdb(-0x183,-0x176,-_0x296b2a._0x53c1a6,-_0x296b2a._0x36bc16))return[];function _0x41ecdb(_0x1acc30,_0x347a61,_0x2b0dc6,_0x4b902c){return _0xfe7f(_0x1acc30- -_0x91de01._0x38b43d,_0x4b902c);}function _0x3ebcfb(_0x29db33,_0x7cc4b7,_0x50a204,_0x6b30b9){return _0xfe7f(_0x6b30b9- -_0x45f48c._0x30c94c,_0x29db33);}const _0xe220dc=_0x2781da['summary'][_0x3ebcfb(-_0x296b2a._0x435bfb,-0x1d1,-_0x296b2a._0x24d786,-_0x296b2a._0x26616d)](_0xdcefd1=>_0xdcefd1[_0x3ebcfb(-0x1ed,-0x206,-0x215,-0x1f8)])[_0x41ecdb(-0x181,-_0x296b2a._0x391922,-_0x296b2a._0x3c331f,-0x16f)](_0x4558ce=>_0x4558ce[_0x41ecdb(-0x199,-0x1a9,-0x180,-0x19e)]()[_0x41ecdb(-0x18d,-0x17d,-0x18a,-0x19c)]>0x0)['join']('\x0a\x0a');if(_0xe220dc[_0x3ebcfb(-_0x296b2a._0x3937a3,-_0x296b2a._0x599fc2,-_0x296b2a._0x3e853a,-_0x296b2a._0xee41fa)]>0x0)return[_0xe220dc];if(_0x2781da[_0x41ecdb(-0x18a,-_0x296b2a._0x340878,-_0x296b2a._0x347a7e,-0x190)]&&_0x2781da['text'][_0x3ebcfb(-_0x296b2a._0x317a17,-0x21f,-0x1f7,-0x207)]()[_0x3ebcfb(-_0x296b2a._0x58e587,-0x1de,-0x1e6,-_0x296b2a._0xee41fa)]>0x0)return[_0x2781da[_0x41ecdb(-_0x296b2a._0x378b67,-_0x296b2a._0x53c1a6,-_0x296b2a._0x3b6616,-_0x296b2a._0x38bde5)]];return _0x2781da['encryptedContent']?['(encrypted\x20reasoning)']:[];})[_0x4b198f(_0xc37b9a._0x339da5,0x34d,_0xc37b9a._0x12f9b2,_0xc37b9a._0x43d1e0)]('\x0a\x0a');}function getToolUseBlocks(_0x1547bf){const _0x1d97f3={_0x2264be:0x1e,_0x4130e4:0x34,_0x384a6f:0x4c,_0x51a387:0x1ce,_0x5f56dd:0x1eb},_0x5bfe81={_0x1c9703:0x83};function _0x17c998(_0x1fb19c,_0x44356b,_0x56418a,_0x25092f){return _0xfe7f(_0x25092f-_0x5bfe81._0x1c9703,_0x44356b);}function _0x255619(_0x3f9f9d,_0xfecdd0,_0x4d8a00,_0x5f41b7){return _0xfe7f(_0x4d8a00- -0x169,_0xfecdd0);}return normalizeContent(_0x1547bf?.[_0x255619(-_0x1d97f3._0x2264be,-0x19,-_0x1d97f3._0x4130e4,-_0x1d97f3._0x384a6f)])[_0x17c998(0x1b5,_0x1d97f3._0x51a387,_0x1d97f3._0x5f56dd,0x1d1)](_0x1c454d=>_0x1c454d[_0x255619(-0x1a,-0x40,-0x2f,-0x31)]==='tool_use');}function getToolResultBlocks(_0x2a887b){const _0x5552bc={_0x4fc946:0x314,_0x1182c2:0x2f8,_0x285355:0x2ff,_0x2faa6e:0x31e,_0x28220e:0x320},_0x460d1f={_0x10e126:0x1e2};function _0x237b4b(_0x557ee6,_0x241227,_0x517700,_0x30e82d){return _0xfe7f(_0x241227-_0x460d1f._0x10e126,_0x30e82d);}function _0x403aa4(_0x29dfe0,_0x1b289e,_0x2c7a11,_0xa0f2f9){return _0xfe7f(_0x2c7a11-0x1c4,_0xa0f2f9);}return normalizeContent(_0x2a887b?.[_0x237b4b(_0x5552bc._0x4fc946,0x317,_0x5552bc._0x1182c2,_0x5552bc._0x285355)])[_0x237b4b(_0x5552bc._0x2faa6e,0x330,_0x5552bc._0x28220e,0x33d)](_0xfefce4=>_0xfefce4[_0x237b4b(0x310,0x31c,0x300,0x30b)]===_0x237b4b(0x341,0x341,0x35d,0x34d));}function createToolResultUserMessage(_0x316eaf){const _0x2dfda0={_0x1c35c5:0x22f,_0x2d8101:0x246,_0x195ec5:0x22f,_0x27922c:0x209,_0x2b42c2:0x219,_0x5b4917:0x220},_0x29e221={_0x4dfa06:0x9a,_0x23d255:0xcd,_0x42520c:0xc4,_0x245f9f:0xad,_0xbc06b5:0xa9,_0x1bc38f:0x415,_0xca79d7:0x43a},_0x5d21da={_0xd36819:0x9f,_0x39596a:0x138},_0x21b470={_0x40eb29:0x21};function _0x50958a(_0x466f2e,_0x1d7453,_0x15b5ca,_0x406bff){return _0xfe7f(_0x1d7453-_0x21b470._0x40eb29,_0x406bff);}function _0x412395(_0x3ed118,_0x4603c4,_0x299a71,_0x855eb){return _0xfe7f(_0x855eb- -0x376,_0x4603c4);}return{'role':_0x412395(-_0x2dfda0._0x1c35c5,-0x246,-_0x2dfda0._0x2d8101,-0x22d),'content':_0x316eaf[_0x412395(-_0x2dfda0._0x195ec5,-_0x2dfda0._0x27922c,-_0x2dfda0._0x2b42c2,-_0x2dfda0._0x5b4917)](_0x2ad4af=>{function _0x1061b3(_0xca4d44,_0x40f8b5,_0x1a52e8,_0x317e41){return _0x50958a(_0xca4d44-0x5a,_0x317e41- -0xcf,_0x1a52e8-0x1cc,_0x40f8b5);}function _0x377d87(_0x482fc9,_0x468871,_0x34449a,_0x29bb6f){return _0x412395(_0x482fc9-_0x5d21da._0xd36819,_0x482fc9,_0x34449a-_0x5d21da._0x39596a,_0x34449a-0x660);}return{'type':_0x1061b3(0xc4,_0x29e221._0x4dfa06,_0x29e221._0x23d255,0xb1),'tool_use_id':_0x2ad4af[_0x1061b3(_0x29e221._0x42520c,_0x29e221._0x245f9f,0xbd,0xa7)],'content':_0x2ad4af['content']??_0x2ad4af[_0x1061b3(0xa1,_0x29e221._0xbc06b5,0x75,0x8b)],'is_error':_0x2ad4af[_0x377d87(0x426,0x406,_0x29e221._0x1bc38f,0x425)]===_0x377d87(0x428,_0x29e221._0xca79d7,0x428,0x409)};})};}var INTERRUPTED_TOOL_RESULT_TEXT=_0x1a1e1e(-0x223,-0x237,-0x256,-0x23f);function synthesizeMissingToolResults(_0x2a6b65){const _0x1c642a={_0x1ce94a:0x97,_0x2778d:0xb5,_0x475389:0x96,_0x56283a:0x2a7,_0x19f0e4:0x2b5,_0x3c2e70:0x299,_0x23aab7:0x2b6,_0xbdb320:0x2b8},_0x30b5c6={_0x4ed0e2:0x1ab,_0x5c872b:0x141,_0x27996b:0x50c},_0x2226a6={_0x3c6631:0x1a1},_0x48bf3a=new Set();for(const _0x47c1af of _0x2a6b65){for(const _0x31021d of getToolResultBlocks(_0x47c1af)){_0x48bf3a['add'](_0x31021d['tool_use_id']);}}const _0x26b44a=[];function _0x1fbae6(_0x5da463,_0x2f78ac,_0x1aa196,_0x256e50){return _0x1a1e1e(_0x1aa196,_0x2f78ac-0x1e4,_0x1aa196-0x158,_0x2f78ac-_0x2226a6._0x3c6631);}for(const _0x1c5ee0 of _0x2a6b65){_0x26b44a[_0x1fbae6(-0xa9,-0xc4,-0xcf,-0xc4)](_0x1c5ee0);const _0x464cbf=getToolUseBlocks(_0x1c5ee0)['filter'](_0x3f025b=>!_0x48bf3a[_0x1fbae6(-0xb8,-0xa6,-0xa6,-0xad)](_0x3f025b['id']));if(_0x464cbf[_0x1fbae6(-_0x1c642a._0x1ce94a,-_0x1c642a._0x2778d,-0xc5,-_0x1c642a._0x475389)]===0x0)continue;_0x26b44a[_0x2a7702(_0x1c642a._0x56283a,_0x1c642a._0x19f0e4,0x28a,0x2bf)]({'role':'user','content':_0x464cbf['map'](_0x4c87de=>({'type':_0x2a7702(0x2d3,0x2de,0x2d0,0x2cc),'tool_use_id':_0x4c87de['id'],'content':INTERRUPTED_TOOL_RESULT_TEXT,'is_error':!![]}))});for(const _0x2cfd18 of _0x464cbf){_0x48bf3a[_0x2a7702(_0x1c642a._0x3c2e70,_0x1c642a._0x23aab7,_0x1c642a._0xbdb320,0x298)](_0x2cfd18['id']);}}function _0x2a7702(_0xe62816,_0x114ab7,_0x571a38,_0x107f74){return _0x1a1e1e(_0x571a38,_0x114ab7-_0x30b5c6._0x4ed0e2,_0x571a38-_0x30b5c6._0x5c872b,_0xe62816-_0x30b5c6._0x27996b);}return _0x26b44a;}export{createTextBlock,normalizeTextBlock,normalizeContent,normalizeSystem,normalizeMessage,compileRequest,toChatRequest,toModelRequest,toProviderModelRequest,toChatResponse,toModelResponse,responseToAssistantMessage,createReasoningMessage,createAssistantTextMessage,createToolUseMessage,getTextFromMessage,getReasoningTextFromMessage,getToolUseBlocks,getToolResultBlocks,createToolResultUserMessage,INTERRUPTED_TOOL_RESULT_TEXT,synthesizeMissingToolResults};
|
package/dist/chunk-X7VAACWY.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function _0x1dad(){var _0x254eee=['ywjVCNrLza','mxDuqNvgta','mtG3mZzTrxrSq00','mtu2mJe4ng16Ewv5Aq','BwvZC2fNzq','qujpuLrFrvjs','mJjcEefXyum','mJu4nJvqvwjIsfa','mZu0zvndzufN','BMfTzq','t3bLCMf0Aw9UigfIB3j0zwq','mte2ndu3mK1ZrwnQuW','C3rYAw5N','y29Kzq','CMvTB3zLrxzLBNrmAxn0zw5LCG','ndeZC3nbBKny','odu0mZaYywvKz0zA','m3HPvhruqG','ndq4oda3nwPOB3DUvG','ywjVCNq','ywrKrxzLBNrmAxn0zw5LCG','BgvUz3rO','mtC0ntmWwe9kCKjL','qwjVCNrfCNjVCG'];_0x1dad=function(){return _0x254eee;};return _0x1dad();}function _0x57fd58(_0x2bf05e,_0x23afb1,_0x45b054,_0x4ce2e3){return _0x336d(_0x4ce2e3-0x19e,_0x2bf05e);}function _0x336d(_0x58a56a,_0x1d27f9){_0x58a56a=_0x58a56a-0x194;var _0x1dadea=_0x1dad();var _0x336dfe=_0x1dadea[_0x58a56a];if(_0x336d['XcbAXo']===undefined){var _0x353cfb=function(_0x4750ec){var _0x36427b='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';var _0x42f33e='',_0x26c0fa='';for(var _0x2e0158=0x0,_0x13bf6f,_0x1479be,_0x5ea033=0x0;_0x1479be=_0x4750ec['charAt'](_0x5ea033++);~_0x1479be&&(_0x13bf6f=_0x2e0158%0x4?_0x13bf6f*0x40+_0x1479be:_0x1479be,_0x2e0158++%0x4)?_0x42f33e+=String['fromCharCode'](0xff&_0x13bf6f>>(-0x2*_0x2e0158&0x6)):0x0){_0x1479be=_0x36427b['indexOf'](_0x1479be);}for(var _0x5a0831=0x0,_0x144937=_0x42f33e['length'];_0x5a0831<_0x144937;_0x5a0831++){_0x26c0fa+='%'+('00'+_0x42f33e['charCodeAt'](_0x5a0831)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x26c0fa);};_0x336d['KZHGFz']=_0x353cfb,_0x336d['dSYgms']={},_0x336d['XcbAXo']=!![];}var _0x59fe12=_0x1dadea[0x0],_0x5e014e=_0x58a56a+_0x59fe12,_0xb46922=_0x336d['dSYgms'][_0x5e014e];return!_0xb46922?(_0x336dfe=_0x336d['KZHGFz'](_0x336dfe),_0x336d['dSYgms'][_0x5e014e]=_0x336dfe):_0x336dfe=_0xb46922,_0x336dfe;}(function(_0x2e45cb,_0x58ae08){var _0x237aaa={_0x8fc4e5:0x506,_0x5abc2a:0x50c,_0x503a2b:0x502,_0xe30648:0x4fe,_0x3c927a:0x325,_0x173cac:0x32e,_0x616994:0x322,_0x41047c:0x4f8,_0x367e7f:0x4f8,_0x415153:0x33c,_0x4c8e75:0x33f,_0x3267c8:0x50d,_0x1bfb5d:0x50a,_0x58bde2:0x50e,_0x592022:0x4fc,_0x137bb3:0x500,_0x884362:0x507,_0x4bc094:0x507,_0x33633a:0x4fc,_0x284440:0x4ff,_0xc0952b:0x32e,_0x31a37c:0x320,_0x121743:0x50d,_0x418e13:0x508,_0x2c22f4:0x505},_0x2e2cee={_0xbe9943:0x18b},_0x2b6426={_0x124bb1:0x364},_0x1c10fa=_0x2e45cb();function _0x305b93(_0x4314c2,_0x2a92e7,_0x494776,_0x1f3d0f){return _0x336d(_0x4314c2-_0x2b6426._0x124bb1,_0x494776);}function _0x529d55(_0x57e125,_0x29af81,_0x446b67,_0xf07e55){return _0x336d(_0x57e125-_0x2e2cee._0xbe9943,_0x29af81);}while(!![]){try{var _0xbe410d=-parseInt(_0x305b93(_0x237aaa._0x8fc4e5,_0x237aaa._0x5abc2a,0x504,0x50f))/0x1*(-parseInt(_0x305b93(0x4fd,_0x237aaa._0x503a2b,_0x237aaa._0xe30648,0x507))/0x2)+-parseInt(_0x529d55(_0x237aaa._0x3c927a,_0x237aaa._0x173cac,_0x237aaa._0x616994,0x32e))/0x3*(-parseInt(_0x305b93(_0x237aaa._0x41047c,0x4fa,_0x237aaa._0x367e7f,0x4f0))/0x4)+parseInt(_0x529d55(0x333,0x333,_0x237aaa._0x415153,_0x237aaa._0x4c8e75))/0x5*(parseInt(_0x305b93(_0x237aaa._0x3267c8,0x50f,_0x237aaa._0x1bfb5d,_0x237aaa._0x58bde2))/0x6)+-parseInt(_0x305b93(_0x237aaa._0x592022,0x4ff,0x501,_0x237aaa._0x137bb3))/0x7*(parseInt(_0x305b93(_0x237aaa._0x884362,0x510,_0x237aaa._0x4bc094,_0x237aaa._0x33633a))/0x8)+-parseInt(_0x305b93(_0x237aaa._0x284440,_0x237aaa._0x592022,0x502,_0x237aaa._0x4bc094))/0x9+parseInt(_0x529d55(0x32a,0x332,_0x237aaa._0xc0952b,_0x237aaa._0x31a37c))/0xa*(parseInt(_0x305b93(0x50b,0x506,_0x237aaa._0x121743,0x505))/0xb)+-parseInt(_0x305b93(_0x237aaa._0x418e13,0x508,0x502,_0x237aaa._0x2c22f4))/0xc;if(_0xbe410d===_0x58ae08)break;else _0x1c10fa['push'](_0x1c10fa['shift']());}catch(_0x4703d9){_0x1c10fa['push'](_0x1c10fa['shift']());}}}(_0x1dad,0x4722c));var OperationAbortedError=class extends Error{[_0x57fd58(0x33e,0x33f,0x33e,0x334)]='ABORT_ERR';constructor(_0x42f33e=_0x2d597f(-0x15c,-0x15c,-0x150,-0x153)){var _0x28cdd4={_0x11433c:0x25f,_0xccbbd1:0x258,_0x264ce1:0x261},_0x14c4ab={_0x317367:0x67,_0x18e199:0xdf};function _0x4022d7(_0x215aa3,_0x2e66d9,_0x157596,_0x55843f){return _0x57fd58(_0x55843f,_0x2e66d9-_0x14c4ab._0x317367,_0x157596-0x81,_0x215aa3- -_0x14c4ab._0x18e199);}super(_0x42f33e),this['name']=_0x4022d7(_0x28cdd4._0x11433c,0x256,_0x28cdd4._0xccbbd1,_0x28cdd4._0x264ce1);}};function toAbortError(_0x26c0fa){var _0x203202={_0x22babf:0x2de,_0x115eab:0x2d0,_0x3d1e29:0x2ce,_0x2ab905:0x2c5,_0x1c24c6:0x2c4,_0x1da220:0x2ce},_0x2bbe77={_0x4ef805:0x400};if(isAbortError(_0x26c0fa))return _0x26c0fa;function _0x2a7914(_0x54980e,_0x21fa95,_0x2c7a9a,_0x331cdc){return _0x57fd58(_0x331cdc,_0x21fa95-0xd3,_0x2c7a9a-0x19,_0x2c7a9a- -0x6e);}if(_0x26c0fa instanceof Error)return new OperationAbortedError(_0x26c0fa[_0x2a7914(_0x203202._0x22babf,0x2da,0x2d5,0x2da)]);if(typeof _0x26c0fa===_0x2a7914(_0x203202._0x115eab,_0x203202._0x3d1e29,_0x203202._0x2ab905,_0x203202._0x1c24c6)&&_0x26c0fa[_0x2a7914(0x2c6,0x2c6,_0x203202._0x1da220,0x2d5)]>0x0)return new OperationAbortedError(_0x26c0fa);function _0x125d64(_0x99f5f5,_0x2cbed1,_0x308833,_0xe51d0f){return _0x2d597f(_0x99f5f5-0x161,_0x99f5f5-_0x2bbe77._0x4ef805,_0xe51d0f,_0xe51d0f-0xc);}return new OperationAbortedError();}function isAbortError(_0x2e0158){var _0x4905b8={_0x4ddb93:0x64,_0x23691e:0xec,_0x21c601:0xe1,_0x4db97c:0xe0,_0x377efd:0xeb,_0x4edce9:0xd5,_0x2b507d:0xf0,_0x3c84c5:0xf6,_0x403983:0xe9},_0x20f8ff={_0x5e234b:0x1b8,_0xfb9637:0xaa},_0x1dc1a8={_0x11f5fd:0x254};function _0xfe054b(_0x260997,_0x5e3a27,_0x50f0f1,_0x4e1ac3){return _0x57fd58(_0x5e3a27,_0x5e3a27-0x79,_0x50f0f1-0x3a,_0x260997- -_0x1dc1a8._0x11f5fd);}function _0x364b96(_0x32eab8,_0xbe7b8,_0x186846,_0x4dcdd8){return _0x2d597f(_0x32eab8-0x5f,_0x186846-_0x20f8ff._0x5e234b,_0x32eab8,_0x4dcdd8-_0x20f8ff._0xfb9637);}return _0x2e0158 instanceof OperationAbortedError||_0x2e0158 instanceof Error&&(_0x2e0158[_0x364b96(0x65,_0x4905b8._0x4ddb93,0x5b,0x65)]===_0xfe054b(0xea,0xec,0xf0,_0x4905b8._0x23691e)||_0xfe054b(0xe0,0xdf,_0x4905b8._0x21c601,0xe6)in _0x2e0158&&_0x2e0158[_0xfe054b(_0x4905b8._0x4db97c,_0x4905b8._0x377efd,_0x4905b8._0x4edce9,0xd4)]===_0xfe054b(_0x4905b8._0x2b507d,0xee,_0x4905b8._0x3c84c5,_0x4905b8._0x403983));}function _0x2d597f(_0x73ef34,_0x5e1397,_0x471e2c,_0x48bf06){return _0x336d(_0x5e1397- -0x307,_0x471e2c);}function throwIfAborted(_0x13bf6f){var _0x51ec9a={_0x5dffbe:0x340,_0x343f67:0x344},_0x53de81={_0xe95090:0x5};function _0x58754d(_0x5105d3,_0x42a892,_0x1b3ba7,_0x344dca){return _0x57fd58(_0x1b3ba7,_0x42a892-0x25,_0x1b3ba7-0x3f,_0x344dca-_0x53de81._0xe95090);}if(!_0x13bf6f?.[_0x58754d(0x339,_0x51ec9a._0x5dffbe,0x338,_0x51ec9a._0x343f67)])return;throw toAbortError(_0x13bf6f['reason']);}function addAbortListener(_0x1479be,_0x5ea033){var _0x56823a={_0x235f53:0x23a,_0x1ec137:0x231,_0x1302e8:0x541,_0x376d4f:0x237,_0x3d5881:0x238,_0x4de126:0x241},_0x4541cc={_0x4a7177:0x544},_0x10e8ed={_0x52084b:0x777},_0x234677={_0xdf7a88:0x6ab,_0x480b66:0x4d};if(!_0x1479be)return()=>{};function _0x2fb904(_0x150ff3,_0x7236c4,_0x3560e9,_0x5df1c3){return _0x57fd58(_0x5df1c3,_0x7236c4-0xfb,_0x3560e9-0x19f,_0x150ff3- -0x571);}if(_0x1479be[_0x2fb904(-0x232,-0x229,-_0x56823a._0x235f53,-_0x56823a._0x1ec137)])return _0x5ea033(),()=>{};const _0x5a0831=()=>{_0x5ea033();};function _0x25e27c(_0x1c60ce,_0x353950,_0xb78947,_0x337dbd){return _0x2d597f(_0x1c60ce-0x1d1,_0x1c60ce-_0x234677._0xdf7a88,_0xb78947,_0x337dbd-_0x234677._0x480b66);}return _0x1479be[_0x25e27c(_0x56823a._0x1302e8,0x547,0x546,0x544)](_0x2fb904(-_0x56823a._0x376d4f,-_0x56823a._0x3d5881,-0x23a,-_0x56823a._0x4de126),_0x5a0831,{'once':!![]}),()=>{function _0x4d18c4(_0x2db605,_0x11ab33,_0x18bf5d,_0x3b40da){return _0x2fb904(_0x11ab33-_0x10e8ed._0x52084b,_0x11ab33-0x135,_0x18bf5d-0x17c,_0x3b40da);}_0x1479be[_0x4d18c4(_0x4541cc._0x4a7177,0x53b,0x53c,0x53a)]('abort',_0x5a0831);};}export{OperationAbortedError,toAbortError,isAbortError,throwIfAborted,addAbortListener};
|
package/dist/formats/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function _0x903a(){const _0x34ea60=['Dgv4Da','mtu5ntD3thfAB1q','ChvZAa','Aw1Hz2uVANbN','mtu2oePgwuzbra','nZi0mteYCNPLANv6','mJjxCNPZD2S','mteXodC4menVt05ysG','mJe5mZuZmhjmrwHgtq','Aw5KzxG','mteXzuz4s0jY','DgvZDa','CMvWBgfJzq','zNjVBq','BgvUz3rO','mtG3odeXnxrLr1bvwq','C2XPy2u','nZC4ogjssNDLEG','nMzUD3Pmwa','mJq1mtG0mxvXt3v3yG'];_0x903a=function(){return _0x34ea60;};return _0x903a();}(function(_0x2a4631,_0x1a1c2b){const _0x4071b2={_0x21ddb7:0x323,_0x3602a3:0x327,_0xfd0034:0x332,_0xfa3085:0x69,_0x44713f:0x60,_0x5299b6:0x32a,_0x53d02a:0x32e,_0x4e1d97:0x331,_0x21b300:0x6a,_0x13d2d1:0x32f,_0x567f4f:0x33c,_0x497665:0x335,_0x5c8d06:0x336,_0x70b89c:0x5f,_0x5a6d5c:0x57,_0x235f69:0x321,_0x27a1af:0x32b,_0x51caf1:0x50,_0x5c9f66:0x5a,_0x1fc86b:0x61,_0x4a8084:0x330,_0x1fc7a7:0x339,_0x56a51f:0x329,_0x2b65e8:0x32d};function _0x249dac(_0x3044a8,_0x99b0d7,_0x1456d4,_0x4205d6){return _0x1a25(_0x1456d4- -0x67,_0x3044a8);}const _0x441745=_0x2a4631();function _0x23b7eb(_0x566e5a,_0x796a67,_0x45bf89,_0x1c0c94){return _0x1a25(_0x1c0c94-0x267,_0x566e5a);}while(!![]){try{const _0x34de3e=parseInt(_0x23b7eb(_0x4071b2._0x21ddb7,_0x4071b2._0x3602a3,_0x4071b2._0xfd0034,0x32c))/0x1+-parseInt(_0x249dac(_0x4071b2._0xfa3085,0x66,_0x4071b2._0x44713f,0x68))/0x2+parseInt(_0x23b7eb(_0x4071b2._0x5299b6,_0x4071b2._0x53d02a,0x32d,_0x4071b2._0x4e1d97))/0x3*(-parseInt(_0x249dac(0x63,0x6b,_0x4071b2._0x21b300,0x6e))/0x4)+-parseInt(_0x23b7eb(_0x4071b2._0x13d2d1,_0x4071b2._0x567f4f,_0x4071b2._0x497665,_0x4071b2._0x5c8d06))/0x5*(-parseInt(_0x249dac(_0x4071b2._0x70b89c,_0x4071b2._0x5a6d5c,0x57,0x4e))/0x6)+-parseInt(_0x23b7eb(_0x4071b2._0x5299b6,0x31c,0x320,0x326))/0x7+-parseInt(_0x23b7eb(_0x4071b2._0x235f69,0x335,0x32f,_0x4071b2._0x27a1af))/0x8*(-parseInt(_0x249dac(_0x4071b2._0x51caf1,0x60,_0x4071b2._0x5c9f66,_0x4071b2._0x1fc86b))/0x9)+-parseInt(_0x23b7eb(_0x4071b2._0x4a8084,_0x4071b2._0x1fc7a7,_0x4071b2._0x3602a3,0x32f))/0xa*(-parseInt(_0x23b7eb(_0x4071b2._0x56a51f,0x324,0x32b,_0x4071b2._0x2b65e8))/0xb);if(_0x34de3e===_0x1a1c2b)break;else _0x441745['push'](_0x441745['shift']());}catch(_0xc1dd68){_0x441745['push'](_0x441745['shift']());}}}(_0x903a,0xdcc41));import{toOpenAiResponsesRequest}from'../chunk-NHBKADBW.js';import'../chunk-NYZR4XKO.js';import{INTERRUPTED_TOOL_RESULT_TEXT,compileRequest,createAssistantTextMessage,createReasoningMessage,createTextBlock,createToolResultUserMessage,createToolUseMessage,getReasoningTextFromMessage,getTextFromMessage,getToolResultBlocks,getToolUseBlocks,normalizeContent,normalizeMessage,normalizeSystem,normalizeTextBlock,responseToAssistantMessage,synthesizeMissingToolResults,toChatRequest,toChatResponse,toModelRequest,toModelResponse,toProviderModelRequest}from'../chunk-QDOE7NWO.js';var DATA_URI_REGEX=/data:(image\/(?:png|jpeg|jpg|gif|webp));base64,([A-Za-z0-9+/\r\n]+={0,2})/g;function normalizeMediaType(_0x2f32b5){const _0x2f9cde={_0x979c37:0x172,_0x22d973:0x175};function _0x47048c(_0x43cc0b,_0x24b8c6,_0x2f25fa,_0x4dfd8a){return _0x1a25(_0x2f25fa-0xb2,_0x43cc0b);}return _0x2f32b5===_0x47048c(_0x2f9cde._0x979c37,0x176,_0x2f9cde._0x22d973,0x16b)?'image/jpeg':_0x2f32b5;}function isValidBase64(_0x7ef608){const _0x56ed64={_0x144619:0x30b,_0x42c50a:0x30c,_0x2550cf:0x310,_0x45ab27:0x306,_0x4c9345:0x30c,_0xf63bdc:0x309},_0x27ba56={_0x27cfc2:0x23e};if(_0x7ef608[_0x5e1924(_0x56ed64._0x144619,_0x56ed64._0x42c50a,0x308,_0x56ed64._0x42c50a)]===0x0||_0x7ef608[_0x5e1924(0x312,_0x56ed64._0x2550cf,_0x56ed64._0x45ab27,_0x56ed64._0x4c9345)]%0x4!==0x0)return![];function _0x5e1924(_0x600fbd,_0x751d6b,_0x5b21ee,_0xd9b477){return _0x1a25(_0xd9b477-_0x27ba56._0x27cfc2,_0x5b21ee);}function _0x420e6e(_0x3ba28f,_0x6832d9,_0x39b168,_0x26b3c9){return _0x1a25(_0x26b3c9- -0x3b2,_0x6832d9);}return/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/[_0x5e1924(_0x56ed64._0x42c50a,0x30b,0x309,_0x56ed64._0xf63bdc)](_0x7ef608);}function collectImageMatches(_0x30889c){const _0x491cc4={_0x4e6b0e:0x230,_0x1fd511:0x237},_0x508138={_0x59bafc:0x2a1,_0x19045e:0x29a,_0x35580b:0x290};function _0x443e37(_0x482939,_0x10b8f5,_0x5e564f,_0x2df3a4){return _0x1a25(_0x10b8f5- -0x2fb,_0x482939);}return DATA_URI_REGEX['lastIndex']=0x0,Array[_0x443e37(-0x238,-0x22e,-_0x491cc4._0x4e6b0e,-_0x491cc4._0x1fd511)](_0x30889c['matchAll'](DATA_URI_REGEX))['filter'](_0x1448e0=>{const _0x15a273={_0x26c031:0xd9};function _0x573c41(_0x5b4774,_0x5c1c45,_0x30f3f8,_0x184010){return _0x443e37(_0x184010,_0x30f3f8-0x4c9,_0x30f3f8-_0x15a273._0x26c031,_0x184010-_0x15a273._0x26c031);}const _0x3a2db8=(_0x1448e0[0x2]??'')[_0x573c41(_0x508138._0x59bafc,0x29c,_0x508138._0x19045e,_0x508138._0x35580b)](/[\r\n]/g,'');return isValidBase64(_0x3a2db8);});}function _0x1a25(_0x57132d,_0x4cf195){_0x57132d=_0x57132d-0xbe;const _0x903ad4=_0x903a();let _0x1a2526=_0x903ad4[_0x57132d];if(_0x1a25['HWmkna']===undefined){var _0x596c06=function(_0x20a9f8){const _0x22c6d7='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x2f32b5='',_0x7ef608='';for(let _0x30889c=0x0,_0x1448e0,_0x3a2db8,_0x396898=0x0;_0x3a2db8=_0x20a9f8['charAt'](_0x396898++);~_0x3a2db8&&(_0x1448e0=_0x30889c%0x4?_0x1448e0*0x40+_0x3a2db8:_0x3a2db8,_0x30889c++%0x4)?_0x2f32b5+=String['fromCharCode'](0xff&_0x1448e0>>(-0x2*_0x30889c&0x6)):0x0){_0x3a2db8=_0x22c6d7['indexOf'](_0x3a2db8);}for(let _0x25cd00=0x0,_0x2c5a69=_0x2f32b5['length'];_0x25cd00<_0x2c5a69;_0x25cd00++){_0x7ef608+='%'+('00'+_0x2f32b5['charCodeAt'](_0x25cd00)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x7ef608);};_0x1a25['ZcMySv']=_0x596c06,_0x1a25['NbaWgH']={},_0x1a25['HWmkna']=!![];}const _0x5f1403=_0x903ad4[0x0],_0x41a505=_0x57132d+_0x5f1403,_0x1795e6=_0x1a25['NbaWgH'][_0x41a505];return!_0x1795e6?(_0x1a2526=_0x1a25['ZcMySv'](_0x1a2526),_0x1a25['NbaWgH'][_0x41a505]=_0x1a2526):_0x1a2526=_0x1795e6,_0x1a2526;}function hasPastedImages(_0x396898){const _0x372b99={_0x4e3c25:0x1e0,_0x2363b6:0x1cf};function _0x105cee(_0x364107,_0x5c1da7,_0x20181d,_0x5b26a8){return _0x1a25(_0x364107-0x10b,_0x5b26a8);}return collectImageMatches(_0x396898)[_0x105cee(0x1d9,_0x372b99._0x4e3c25,0x1d3,_0x372b99._0x2363b6)]>0x0;}function contentFromPastedText(_0x25cd00){const _0x27597b={_0x125255:0x157,_0x255407:0x15f,_0x2c6d64:0x155,_0x242813:0x155,_0x59f8de:0x15a,_0x1f922a:0x165,_0x54e165:0x160,_0x590c60:0x15e,_0x2971f0:0x45e,_0x392226:0x462,_0x33f668:0x45a,_0x55c155:0x45d,_0x23a742:0x468,_0x368492:0x464,_0x2d93e1:0x45f,_0x1df7d7:0x459,_0x369b05:0x45e,_0x1bb570:0x45c,_0x3967a0:0x44c,_0x2f5bc5:0x452,_0x53414a:0x45b},_0x30210d={_0x1db96b:0x396},_0x2c5a69=collectImageMatches(_0x25cd00),_0x18e170=[];let _0xa7a296=0x0;function _0x16f086(_0x32cbf3,_0x4956a7,_0x4e29e6,_0x57ea4e){return _0x1a25(_0x4956a7-0x95,_0x57ea4e);}for(const _0x5dfecf of _0x2c5a69){const _0x9c6a16=_0x5dfecf[_0x40b89f(0x468,0x469,0x469,0x45f)]??0x0,[_0x19e25a,_0x6bedb8,_0x1d0481]=_0x5dfecf;_0x9c6a16>_0xa7a296&&_0x18e170[_0x16f086(0x156,_0x27597b._0x125255,0x14f,_0x27597b._0x255407)]({'type':_0x16f086(_0x27597b._0x2c6d64,_0x27597b._0x242813,_0x27597b._0x59f8de,0x14c),'text':_0x25cd00[_0x16f086(0x16d,_0x27597b._0x1f922a,_0x27597b._0x54e165,0x16f)](_0xa7a296,_0x9c6a16)}),_0x18e170[_0x16f086(0x14e,0x157,_0x27597b._0x590c60,0x151)]({'type':'image','source':{'type':'base64','media_type':normalizeMediaType(_0x6bedb8),'data':_0x1d0481[_0x40b89f(_0x27597b._0x2971f0,0x46b,0x45d,_0x27597b._0x392226)](/[\r\n]/g,'')}}),_0xa7a296=_0x9c6a16+_0x19e25a[_0x40b89f(_0x27597b._0x33f668,_0x27597b._0x55c155,_0x27597b._0x23a742,_0x27597b._0x368492)];}function _0x40b89f(_0x13231e,_0x2443f2,_0x450f60,_0x15a5e1){return _0x1a25(_0x15a5e1-_0x30210d._0x1db96b,_0x2443f2);}return _0xa7a296<_0x25cd00['length']&&_0x18e170[_0x40b89f(_0x27597b._0x2d93e1,_0x27597b._0x1df7d7,_0x27597b._0x369b05,0x458)]({'type':_0x40b89f(0x45e,_0x27597b._0x1bb570,_0x27597b._0x3967a0,0x456),'text':_0x25cd00['slice'](_0xa7a296)}),_0x18e170[_0x40b89f(0x465,0x46b,0x46a,_0x27597b._0x368492)]>0x0?_0x18e170:[{'type':_0x40b89f(_0x27597b._0x2f5bc5,0x457,_0x27597b._0x53414a,0x456),'text':_0x25cd00}];}export{INTERRUPTED_TOOL_RESULT_TEXT,compileRequest,contentFromPastedText,createAssistantTextMessage,createReasoningMessage,createTextBlock,createToolResultUserMessage,createToolUseMessage,getReasoningTextFromMessage,getTextFromMessage,getToolResultBlocks,getToolUseBlocks,hasPastedImages,normalizeContent,normalizeMessage,normalizeSystem,normalizeTextBlock,responseToAssistantMessage,synthesizeMissingToolResults,toChatRequest,toChatResponse,toModelRequest,toModelResponse,toOpenAiResponsesRequest,toProviderModelRequest};
|
package/dist/hooks/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x2bea84,_0x5eb6fb){const _0xed36c0={_0x1421fa:0x416,_0x508d98:0x419,_0x920beb:0x40d,_0x2f7819:0x2c,_0x3244e2:0x2d,_0x209ce5:0x38,_0x6f5b56:0x45,_0x27c478:0x44,_0x1f86e2:0x47,_0x285031:0x3e,_0x44fcdf:0x66,_0x39eb34:0x14,_0x34f6e8:0x1b,_0x170a47:0x1b,_0x5c3c04:0x41a,_0x426f6b:0xa,_0x1ccb83:0x4a},_0x5d10fa={_0x50a60c:0x28d},_0xcafc3b={_0x1b0c0e:0x16c};function _0x95c0b6(_0x58c829,_0x317f54,_0x5d448e,_0x539cea){return _0x17fc(_0x5d448e- -_0xcafc3b._0x1b0c0e,_0x58c829);}function _0x2e98e8(_0x42e459,_0x3b946b,_0x5a9ca7,_0x2e8d97){return _0x17fc(_0x42e459-_0x5d10fa._0x50a60c,_0x3b946b);}const _0x3a7cff=_0x2bea84();while(!![]){try{const _0x57ac70=parseInt(_0x2e98e8(_0xed36c0._0x1421fa,_0xed36c0._0x508d98,_0xed36c0._0x920beb,0x3f7))/0x1+parseInt(_0x95c0b6(_0xed36c0._0x2f7819,0x1b,_0xed36c0._0x3244e2,_0xed36c0._0x209ce5))/0x2+parseInt(_0x95c0b6(_0xed36c0._0x6f5b56,_0xed36c0._0x27c478,0x48,0x3c))/0x3*(-parseInt(_0x95c0b6(0x32,_0xed36c0._0x1f86e2,0x39,0x4b))/0x4)+-parseInt(_0x95c0b6(_0xed36c0._0x2f7819,0x39,0x29,0x14))/0x5*(-parseInt(_0x95c0b6(0x56,_0xed36c0._0x285031,0x50,_0xed36c0._0x44fcdf))/0x6)+parseInt(_0x95c0b6(_0xed36c0._0x39eb34,0x32,_0xed36c0._0x34f6e8,_0xed36c0._0x170a47))/0x7+parseInt(_0x2e98e8(0x438,0x43c,0x421,_0xed36c0._0x5c3c04))/0x8*(-parseInt(_0x95c0b6(0x13,0x3c,0x1c,0x1f))/0x9)+parseInt(_0x95c0b6(0x24,0xf,0x15,_0xed36c0._0x426f6b))/0xa*(-parseInt(_0x95c0b6(0x1e,_0xed36c0._0x1ccb83,_0xed36c0._0x209ce5,0x32))/0xb);if(_0x57ac70===_0x5eb6fb)break;else _0x3a7cff['push'](_0x3a7cff['shift']());}catch(_0x192d31){_0x3a7cff['push'](_0x3a7cff['shift']());}}}(_0x20f4,0x372f3));import{spawn}from'child_process';var DEFAULT_TIMEOUT_S=0x3c;function _0x20f4(){const _0x4c5fc7=['DgLTzw91Da','mtu0nwfUCNn0rW','CgvYBwLZC2LVBKrLy2LZAw9U','Bwf0y2HLCG','ywz0zxjuB29SuMvZDwX0','nda0mJaWEMH3DMHv','DhjPBq','B2jZzxj2zxi','C3rHDhvZ','zw5K','zgvUEq','DgvZDa','zw5Kx3r1CM4','Ag9VAZPoB3rPzMLJyxrPB24','u3rVCa','zgvJAxnPB24','mZm1nvjcCK9Pwa','ndbpt0rSCum','Ag9VAZPtDg9W','CNvU','BwvZC2fNzq','C3rHDgu','ugvYBwLZC2LVBIbKzw5PzwqGzM9Yia','mZjetMH0EKu','zxjYB3i','CgLWzq','CMvHC29U','CgfZCW','Ag9VA3m','D3jPDgu','CgfYC2u','y29TBwfUza','nJC1otn3C1bdse8','BgvUz3rO','A2LSBa','C2vZC2LVBKLK','zw52','BM93','CgvYBwLZC2LVBKrLy2LZAw9UuMvHC29U','BMfTzq','mte1oejmsuTcwa','tM90AwzPy2f0Aw9U','C3rYAw5NAwz5','Aw5WDxq','zgf0yq','C3rKAw4','mte5mg9eAfvOyW','qwDLBNqGzMLUAxnOzwqGCMvZCg9UzgLUzW','B3v0Chv0','yMXVy2S','u0Lhs0Lmta','sg9VAYbLEgL0zwqGD2L0AcbJB2rLia','mtiWntGZnhnTDM9dta','nJe3oteZAvfntw9z','mZi4mJy5r29sDePb','BwfW','yMvMB3jLrMLUywXpDxrWDxq','rvbjueu','z2v0sg9VA3m','AgfZsg9VA3m','CMvQzwn0','uhjLvg9VBfvZzq','Ag9VA1nWzwnPzMLJt3v0Chv0','ug9ZDfrVB2XvC2u','ChvZAa'];_0x20f4=function(){return _0x4c5fc7;};return _0x20f4();}async function executeCommandHook(_0x4653be,_0x3e6d78,_0x4f513a=DEFAULT_TIMEOUT_S,_0x10c0b6){const _0x37158a={_0x5c1e73:0x259,_0xe110ee:0x25d,_0x2f7e9d:0x23e},_0x5f804d={_0x41b994:0xd1,_0x36c09f:0xbb,_0xf4527e:0xa2,_0x5cb2d7:0xa9,_0x10f7f4:0xc2,_0x1e8a71:0xd5,_0x4b86e1:0x2c6,_0x4d0551:0x2c2,_0x22fc43:0x2cd,_0x4d572d:0x2d1,_0x5f25fb:0xd3,_0x4a3d83:0xe4,_0x3e360a:0xde,_0x73b281:0x2aa,_0x239d93:0x2b6,_0x3f1f08:0xcc,_0x39ea16:0x107,_0x3b1fb3:0xed,_0x535859:0x2c5,_0x19edc1:0x2a7,_0x4a1cfc:0x2cd,_0x1cb2e7:0x2de,_0xfbd365:0x2ab,_0x4a0f5d:0xb1,_0x31cb4c:0xcb},_0xede88a={_0x33e974:0x168,_0x24d8ab:0x17b,_0x297ea4:0x16b,_0x7aefaf:0xd7},_0x56e735={_0x1e1a27:0xe3,_0x1bab1c:0x1af},_0x498833={_0x4b1c5a:0x85},_0x333d4c=Date[_0x5aedc3(0x225,_0x37158a._0x5c1e73,_0x37158a._0xe110ee,_0x37158a._0x2f7e9d)]();function _0x5aedc3(_0x4e0437,_0x4e9608,_0x566f13,_0x5addd8){return _0x17fc(_0x5addd8-_0x498833._0x4b1c5a,_0x4e0437);}return new Promise(_0x414404=>{const _0x13bb0a={_0x1adf98:0x3a3,_0x3e7c1a:0xa7},_0x2b15aa={_0x3c3ebb:0x36d,_0x5d841f:0x35c,_0x4f971a:0x34f,_0x2c328e:0x387,_0x4f1659:0x356,_0x270636:0x344,_0x2a15b6:0x327,_0x57bb56:0x34d,_0x26c199:0x358,_0x33a5ec:0x394,_0x423b8d:0x35c,_0x255778:0x33b,_0x5c11de:0x369,_0x5775e3:0x39d,_0x274e06:0x37f,_0x3bdfdd:0x359,_0x3a03fe:0x374,_0x325a96:0x343},_0x35a863={_0x2430fd:0xf1,_0x4d6aa0:0x119,_0x4fc2a5:0x12c,_0x50188e:0x10c,_0x56ebf9:0xc3,_0x3589d8:0xdb,_0x2ced2b:0x101,_0x38e274:0x112,_0x56e679:0xef},_0x51d7d6={_0x13e371:0x6},_0x5c68d7={_0x216209:0x433,_0x533bb0:0x431,_0x6dc887:0x41e},_0xdda7ac={_0x4a59d9:0x6f,_0x266c16:0x4fa,_0x2021c6:0xb8},_0x5c6557=spawn('sh',['-c',_0x4653be],{'stdio':[_0x3a85ac(-_0x5f804d._0x41b994,-_0x5f804d._0x36c09f,-_0x5f804d._0xf4527e,-0xa3),_0x3a85ac(-_0x5f804d._0x5cb2d7,-0xbb,-_0x5f804d._0x10f7f4,-_0x5f804d._0x1e8a71),_0x284fb6(_0x5f804d._0x4b86e1,0x2b7,_0x5f804d._0x4d0551,_0x5f804d._0x22fc43)],'env':{...process[_0x284fb6(_0x5f804d._0x4d572d,0x2dc,0x2b6,0x2cd)],'CLAUDE_PROJECT_DIR':_0x10c0b6??process['cwd']()}});function _0x284fb6(_0xd680d6,_0x3e7799,_0x326c76,_0x15ab5a){return _0x5aedc3(_0x326c76,_0x3e7799-_0x56e735._0x1e1a27,_0x326c76-_0x56e735._0x1bab1c,_0xd680d6-0x94);}let _0x20c429='',_0x2a8b6c='';_0x5c6557['stdout']['on'](_0x3a85ac(-_0x5f804d._0x5f25fb,-0xe9,-_0x5f804d._0x4a3d83,-_0x5f804d._0x3e360a),_0x40dc7d=>{_0x20c429+=_0x40dc7d['toString']();}),_0x5c6557['stderr']['on'](_0x284fb6(0x298,_0x5f804d._0x73b281,_0x5f804d._0x239d93,0x2ae),_0x231ea5=>{_0x2a8b6c+=_0x231ea5['toString']();}),_0x5c6557[_0x3a85ac(-_0x5f804d._0x3f1f08,-0xe8,-_0x5f804d._0x39ea16,-_0x5f804d._0x3b1fb3)]['on'](_0x284fb6(_0x5f804d._0x535859,0x2c1,_0x5f804d._0x19edc1,_0x5f804d._0x4a1cfc),_0x10b777=>{function _0x3851af(_0x19459d,_0xc179ee,_0x5464c1,_0x53bed6){return _0x3a85ac(_0x19459d-_0xdda7ac._0x4a59d9,_0x53bed6-_0xdda7ac._0x266c16,_0x5464c1-_0xdda7ac._0x2021c6,_0x5464c1);}if(_0x10b777['code']!==_0x3851af(_0x5c68d7._0x216209,0x41c,_0x5c68d7._0x533bb0,_0x5c68d7._0x6dc887))throw _0x10b777;});function _0x3a85ac(_0x5574a8,_0x4d2fea,_0x3fcb9b,_0x5d7ac4){return _0x5aedc3(_0x5d7ac4,_0x4d2fea-_0x51d7d6._0x13e371,_0x3fcb9b-0xd2,_0x4d2fea- -0x2ed);}_0x5c6557['stdin'][_0x284fb6(0x2ca,_0x5f804d._0x1cb2e7,0x2da,_0x5f804d._0xfbd365)](JSON[_0x284fb6(0x2d7,0x2b7,0x2c7,0x2f4)](_0x3e6d78)),_0x5c6557['stdin'][_0x3a85ac(-_0x5f804d._0x4a0f5d,-_0x5f804d._0x31cb4c,-0xc0,-0xc7)]();const _0x24f3a5=setTimeout(()=>{const _0xce4426={_0x347eca:0x53c};_0x5c6557[_0x7d3099(_0x35a863._0x2430fd,_0x35a863._0x4d6aa0,_0x35a863._0x4fc2a5,_0x35a863._0x50188e)](_0x7d3099(_0x35a863._0x56ebf9,0xf2,0xec,_0x35a863._0x3589d8));function _0x7d3099(_0xccd1e8,_0x173193,_0x3e1e8f,_0x124c92){return _0x284fb6(_0x124c92- -0x1c3,_0x173193-0x13c,_0x3e1e8f,_0x124c92-0x15);}function _0xd71868(_0x34fe20,_0x153537,_0x2c3d4a,_0x39c720){return _0x3a85ac(_0x34fe20-0x17f,_0x39c720-_0xce4426._0x347eca,_0x2c3d4a-0x19b,_0x153537);}_0x414404({'status':_0x7d3099(0xe2,_0x35a863._0x2ced2b,_0x35a863._0x38e274,0x102),'error':'Hook\x20timed\x20out\x20after\x20'+_0x4f513a+'s','duration_ms':Date[_0x7d3099(0x108,_0x35a863._0x56e679,0xf8,0x10f)]()-_0x333d4c});},_0x4f513a*0x3e8);_0x5c6557['on']('close',_0x24df51=>{const _0x296253={_0x3a83f8:0xad,_0x11e7f7:0xc0},_0x33dfd4={_0x534a22:0x412,_0x1bd380:0x1d8};clearTimeout(_0x24f3a5);function _0x20ebb5(_0x5f3944,_0x12e57e,_0x1d627a,_0x546c63){return _0x3a85ac(_0x5f3944-0xcd,_0x5f3944-_0x33dfd4._0x534a22,_0x1d627a-_0x33dfd4._0x1bd380,_0x12e57e);}const _0x431e49=Date['now']()-_0x333d4c;if(_0x24df51===0x2){_0x414404({'status':_0x297f18(0x36a,_0x2b15aa._0x3c3ebb,0x33d,0x354),'output':{'decision':_0x297f18(0x34e,0x33e,_0x2b15aa._0x5d841f,0x354),'reason':_0x2a8b6c[_0x297f18(_0x2b15aa._0x4f971a,_0x2b15aa._0x2c328e,0x37b,0x36a)]()||'Hook\x20blocked\x20execution'},'duration_ms':_0x431e49});return;}if(_0x24df51!==0x0){_0x414404({'status':'error','error':_0x297f18(0x343,0x354,0x349,_0x2b15aa._0x4f1659)+_0x24df51+(_0x2a8b6c['trim']()?':\x20'+_0x2a8b6c[_0x20ebb5(_0x2b15aa._0x270636,0x360,_0x2b15aa._0x2a15b6,0x325)]():''),'duration_ms':_0x431e49});return;}function _0x297f18(_0x38505f,_0x5ad187,_0x10f1de,_0x3bf167){return _0x3a85ac(_0x38505f-_0x296253._0x3a83f8,_0x3bf167-0x438,_0x10f1de-_0x296253._0x11e7f7,_0x10f1de);}const _0x4cedce=_0x20c429[_0x20ebb5(0x344,_0x2b15aa._0x57bb56,0x360,_0x2b15aa._0x26c199)]();if(_0x4cedce[_0x297f18(_0x2b15aa._0x33a5ec,0x39a,_0x2b15aa._0x2c328e,0x385)]===0x0){_0x414404({'status':'pass','duration_ms':_0x431e49});return;}try{const _0x4d4b3a=JSON[_0x20ebb5(_0x2b15aa._0x423b8d,0x36e,_0x2b15aa._0x255778,0x34b)](_0x4cedce);_0x414404({'status':_0x297f18(0x392,_0x2b15aa._0x5c11de,_0x2b15aa._0x5775e3,_0x2b15aa._0x274e06),'output':_0x4d4b3a,'duration_ms':_0x431e49});}catch{_0x414404({'status':_0x20ebb5(_0x2b15aa._0x3bdfdd,_0x2b15aa._0x3a03fe,0x35e,_0x2b15aa._0x325a96),'duration_ms':_0x431e49});}}),_0x5c6557['on']('error',_0x4e3147=>{const _0x574ebd={_0x3772a5:0x13a,_0x84bc54:0x1b0};function _0x74a29(_0x59b0af,_0x6fccc4,_0x2a78ae,_0x68d2bd){return _0x284fb6(_0x2a78ae- -_0x13bb0a._0x1adf98,_0x6fccc4-0xf2,_0x6fccc4,_0x68d2bd-_0x13bb0a._0x3e7c1a);}function _0x259a72(_0x3e57c5,_0x7d6491,_0x1e1a2a,_0x40d653){return _0x284fb6(_0x7d6491- -_0x574ebd._0x3772a5,_0x7d6491-_0x574ebd._0x84bc54,_0x1e1a2a,_0x40d653-0x2f);}clearTimeout(_0x24f3a5),_0x414404({'status':'error','error':_0x4e3147[_0x259a72(_0xede88a._0x33e974,0x187,_0xede88a._0x24d8ab,_0xede88a._0x297ea4)],'duration_ms':Date[_0x74a29(-_0xede88a._0x7aefaf,-0xb0,-0xd1,-0xbb)]()-_0x333d4c});});});}function createHookExtensions(_0xe88c7e,_0x54bc92,_0x10aebc={}){const _0x5aa98c={_0x29959f:0x15a,_0x53e7d2:0x160,_0x175ad0:0x164,_0x326715:0x319,_0x34e88b:0x31c,_0x36b481:0x329,_0x45a330:0x31a,_0x4c446d:0x30e,_0x580094:0x14a,_0x36a2f9:0x15b,_0x171bd6:0x149,_0x40ae0c:0x16e,_0x3032bf:0x312,_0x2f1066:0x2ea,_0x455068:0x303,_0x32ac55:0x178,_0x1e7d03:0x30b,_0x17fb48:0x17c,_0x4577d5:0x14d,_0x3b986b:0x163,_0x26ab98:0x149},_0x109578={_0x168b1d:0x178},_0x283282={_0x529b5f:0x11a,_0x490909:0x14e,_0x16ce6d:0x1d7,_0x124169:0x19a,_0x13c378:0x1ae,_0x1f0e2e:0x1ec,_0x5abf49:0x1f9,_0x5afd4e:0x20a,_0x2bb994:0x1e9},_0xf5a3df={_0x37781f:0x2d,_0x132dc6:0x43,_0x4c491f:0x36,_0x8de163:0x236,_0x42cf73:0x21b,_0x1b0f15:0x206,_0x2e16d8:0x89,_0x5011be:0x69,_0x12ea1e:0x82,_0x1c17f8:0x50,_0x185145:0x227},_0x64769c={_0x428d46:0x1d9,_0x404b05:0x533,_0x151e14:0x1a1},_0x23c2f6={_0x3821b0:0x3a2,_0x58cda5:0x39b,_0x171f8f:0xf3,_0xfa0a68:0xe7,_0x4cc6a1:0x10f,_0x15d1c1:0x11d},_0xabc8cb={_0x1f36eb:0x40,_0x10af31:0x416,_0x4959a9:0x7c},_0xcca1ed={_0x15551c:0x38},_0x490a1b=[];function _0x47f35a(_0xa6a61b,_0x17c5f8,_0x2475ec,_0x24c12e){return _0x17fc(_0x17c5f8- -_0xcca1ed._0x15551c,_0xa6a61b);}const {sessionId:_0x1fd873,projectDir:_0x2e3353}=_0x10aebc,_0x28bd4e=_0x3396f0=>_0xe88c7e[_0xcd5e85(0x2e6,0x2ee,0x306,0x302)]?_0xe88c7e[_0x47f35a(0x166,0x156,0x13b,0x156)](_0x3396f0):_0xe88c7e[_0xcd5e85(0x30f,0x31a,0x305,0x305)](_0x3396f0)[_0x47f35a(0x18a,0x17d,0x18d,0x18a)]>0x0;_0x28bd4e('PostToolUse')&&_0x490a1b[_0x47f35a(_0x5aa98c._0x29959f,0x15b,_0x5aa98c._0x53e7d2,_0x5aa98c._0x175ad0)]({'id':'hook:PostToolUse','stage':_0x47f35a(0x17b,0x160,0x170,0x152),'kind':_0xcd5e85(_0x5aa98c._0x326715,_0x5aa98c._0x34e88b,0x313,0x330),'order':0x0,'enabled':!![],'run':async(_0x4cbcfa,_0x123387)=>{const _0x57cb09={_0x353c0b:0x23e},_0x51b7cb=_0xe88c7e[_0x376172(0x38d,0x393,0x3ae,0x3af)](_0x376172(0x3a4,0x398,0x380,0x37f),_0x4cbcfa['toolName']);function _0x353f69(_0x15e455,_0x1ef138,_0x4ef5c1,_0xd1addc){return _0xcd5e85(_0x4ef5c1,_0x1ef138-_0xabc8cb._0x1f36eb,_0x1ef138- -_0xabc8cb._0x10af31,_0xd1addc-_0xabc8cb._0x4959a9);}function _0x376172(_0x12599b,_0x1c0e61,_0x547205,_0x31304c){return _0x47f35a(_0x12599b,_0x1c0e61-_0x57cb09._0x353c0b,_0x547205-0x84,_0x31304c-0x1a1);}for(const _0x13d92c of _0x51b7cb){const _0x5996ec={'tool_name':_0x4cbcfa['toolName'],'tool_input':void 0x0,'tool_output':_0x4cbcfa['output'],'tool_result_status':_0x4cbcfa[_0x376172(0x3bd,_0x23c2f6._0x3821b0,0x3b8,0x3a6)],'session_id':_0x1fd873??_0x123387[_0x376172(0x39c,0x3af,_0x23c2f6._0x58cda5,0x3ba)][_0x353f69(-_0x23c2f6._0x171f8f,-_0x23c2f6._0xfa0a68,-0x102,-0xd9)]};await _0x54bc92(_0x13d92c['command'],_0x5996ec,_0x13d92c[_0x353f69(-_0x23c2f6._0x4cc6a1,-0x10a,-_0x23c2f6._0x15d1c1,-0x11a)],_0x2e3353);}}});_0x28bd4e(_0xcd5e85(0x337,_0x5aa98c._0x36b481,_0x5aa98c._0x45a330,_0x5aa98c._0x4c446d))&&_0x490a1b[_0x47f35a(_0x5aa98c._0x580094,_0x5aa98c._0x36a2f9,_0x5aa98c._0x171bd6,0x15c)]({'id':_0x47f35a(0x15b,_0x5aa98c._0x40ae0c,0x18d,0x14e),'stage':_0xcd5e85(_0x5aa98c._0x3032bf,_0x5aa98c._0x2f1066,_0x5aa98c._0x455068,0x303),'kind':'observer','order':0x0,'enabled':!![],'run':async(_0x3d1b38,_0x65ba6c)=>{const _0x2e0882={_0x56c38a:0x112,_0x37dc8d:0x26,_0x6b4edb:0x13b},_0x4e6d2d=_0xe88c7e[_0x413904(_0xf5a3df._0x37781f,_0xf5a3df._0x132dc6,_0xf5a3df._0x4c491f,0x4d)]('Stop');function _0x4a135b(_0x3e30a9,_0x4b0d05,_0x254f8f,_0x28d8e5){return _0xcd5e85(_0x3e30a9,_0x4b0d05-_0x64769c._0x428d46,_0x28d8e5- -_0x64769c._0x404b05,_0x28d8e5-_0x64769c._0x151e14);}function _0x413904(_0x5c63a6,_0x196660,_0xd648d5,_0x52f296){return _0x47f35a(_0x52f296,_0x196660- -_0x2e0882._0x56c38a,_0xd648d5-_0x2e0882._0x37dc8d,_0x52f296-_0x2e0882._0x6b4edb);}for(const _0x4adc11 of _0x4e6d2d){const _0x43ba9d={'stop_reason':_0x4a135b(-_0xf5a3df._0x8de163,-0x234,-0x214,-_0xf5a3df._0x42cf73),'session_id':_0x1fd873??_0x65ba6c['state'][_0x4a135b(-0x1f1,-_0xf5a3df._0x1b0f15,-0x20b,-0x204)]};await _0x54bc92(_0x4adc11[_0x413904(_0xf5a3df._0x2e16d8,_0xf5a3df._0x5011be,_0xf5a3df._0x12ea1e,_0xf5a3df._0x1c17f8)],_0x43ba9d,_0x4adc11[_0x4a135b(-0x20e,-0x213,-0x207,-_0xf5a3df._0x185145)],_0x2e3353);}}});_0x28bd4e(_0x47f35a(_0x5aa98c._0x32ac55,0x185,0x171,0x18a))&&_0x490a1b[_0xcd5e85(0x309,0x310,_0x5aa98c._0x1e7d03,0x2ef)]({'id':_0x47f35a(_0x5aa98c._0x17fb48,0x169,0x155,0x16e),'stage':'afterTurnComplete','kind':_0x47f35a(_0x5aa98c._0x4577d5,_0x5aa98c._0x3b986b,_0x5aa98c._0x26ab98,0x14d),'order':0x0,'enabled':!![],'run':async(_0x40dcce,_0xe3ba15)=>{const _0x2d1ba9={_0x12d20a:0xb,_0x2042f2:0x1ca,_0xa249a5:0x15f},_0x19286a={_0x527d91:0x6d,_0x1a32d7:0x14e};function _0x5de580(_0x572815,_0x2f6f6d,_0xe52731,_0x10a65d){return _0x47f35a(_0x2f6f6d,_0x572815-_0x19286a._0x527d91,_0xe52731-0x91,_0x10a65d-_0x19286a._0x1a32d7);}function _0x3ef1ce(_0x188e21,_0x1cbc2f,_0x4c1fc9,_0x205370){return _0xcd5e85(_0x1cbc2f,_0x1cbc2f-_0x2d1ba9._0x12d20a,_0x188e21- -_0x2d1ba9._0x2042f2,_0x205370-_0x2d1ba9._0xa249a5);}const _0x4be2b1=_0xe88c7e[_0x3ef1ce(0x13b,_0x283282._0x529b5f,0x148,_0x283282._0x490909)]('Notification');for(const _0x18f4da of _0x4be2b1){const _0x4f0082={'message':_0x5de580(0x1b7,_0x283282._0x16ce6d,_0x283282._0x124169,_0x283282._0x13c378),'session_id':_0x1fd873??_0x40dcce[_0x5de580(_0x283282._0x1f0e2e,0x1cf,_0x283282._0x5abf49,_0x283282._0x5afd4e)]};await _0x54bc92(_0x18f4da[_0x5de580(0x1e8,0x1e1,0x1d2,0x203)],_0x4f0082,_0x18f4da[_0x5de580(0x1c9,0x1e2,_0x283282._0x2bb994,0x1c6)],_0x2e3353);}}});function _0xcd5e85(_0x51fdc6,_0x40dfea,_0x577268,_0x1141a0){return _0x17fc(_0x577268-_0x109578._0x168b1d,_0x51fdc6);}return _0x490a1b;}function _0x17fc(_0x3555a9,_0x31c1f7){_0x3555a9=_0x3555a9-0x17f;const _0x20f400=_0x20f4();let _0x17fc23=_0x20f400[_0x3555a9];if(_0x17fc['XRtMIg']===undefined){var _0x3eeb1e=function(_0x437988){const _0x3693fe='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x4653be='',_0x3e6d78='';for(let _0x4f513a=0x0,_0x10c0b6,_0x333d4c,_0x414404=0x0;_0x333d4c=_0x437988['charAt'](_0x414404++);~_0x333d4c&&(_0x10c0b6=_0x4f513a%0x4?_0x10c0b6*0x40+_0x333d4c:_0x333d4c,_0x4f513a++%0x4)?_0x4653be+=String['fromCharCode'](0xff&_0x10c0b6>>(-0x2*_0x4f513a&0x6)):0x0){_0x333d4c=_0x3693fe['indexOf'](_0x333d4c);}for(let _0x5c6557=0x0,_0x20c429=_0x4653be['length'];_0x5c6557<_0x20c429;_0x5c6557++){_0x3e6d78+='%'+('00'+_0x4653be['charCodeAt'](_0x5c6557)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x3e6d78);};_0x17fc['TicPBP']=_0x3eeb1e,_0x17fc['BZmbQf']={},_0x17fc['XRtMIg']=!![];}const _0x36bc8c=_0x20f400[0x0],_0x2d9817=_0x3555a9+_0x36bc8c,_0x1d8e41=_0x17fc['BZmbQf'][_0x2d9817];return!_0x1d8e41?(_0x17fc23=_0x17fc['TicPBP'](_0x17fc23),_0x17fc['BZmbQf'][_0x2d9817]=_0x17fc23):_0x17fc23=_0x1d8e41,_0x17fc23;}function createHookOnToolCallMiddleware(_0xff69dd,_0x100e93,_0x27fb98,_0x38331b={}){const _0x3e30d1={_0xf7a4fd:0xc7,_0x294589:0xde,_0x375158:0xc9,_0x19c7b0:0xce,_0x39270f:0xbf,_0x552993:0x7e,_0x3ac230:0x1cd,_0x20da22:0x18b,_0x1aa185:0x197,_0x23a3f4:0xaa,_0xed5947:0xc3,_0x220941:0x199,_0x38cb57:0x1b2,_0x3d5c71:0x192,_0x13d276:0x175,_0x522011:0xb2,_0x440fc1:0x1aa,_0x2693e4:0x1ad,_0x59135a:0xaa,_0x1e164f:0xb3,_0x1c63ad:0xc6,_0x13c3c7:0x19e,_0x5a9ba2:0x19f,_0x50fad9:0xed,_0x871d3a:0xd1,_0x291d2e:0xe4,_0x22ff0e:0xdf,_0x29bfe8:0xb1,_0x345f46:0xbc,_0x14aec2:0x9c,_0x4cfff0:0x172,_0xc1ceaf:0x1a8,_0x3ce654:0xa1,_0x189d84:0xbc,_0x55b1bf:0x1b5,_0x12251e:0x1be},_0x4072fb={_0x4dc95a:0x254},{sessionId:_0x1e74e7,projectDir:_0x4f7452}=_0x38331b;return async(_0x184534,_0x4346ae)=>{const _0xd82097=_0xff69dd[_0x2c48b1(-_0x3e30d1._0xf7a4fd,-_0x3e30d1._0x294589,-0xd3,-_0x3e30d1._0x375158)](_0x2c48b1(-0xc4,-_0x3e30d1._0x19c7b0,-_0x3e30d1._0x39270f,-0xaa),_0x184534[_0x2c48b1(-0x99,-0xba,-0x7e,-_0x3e30d1._0x552993)]);function _0x973f8e(_0x237c85,_0x250525,_0x590c01,_0xe6b69a){return _0x17fc(_0xe6b69a-0x3,_0x250525);}function _0x2c48b1(_0x50db43,_0x435b1f,_0x5ea932,_0x26975b){return _0x17fc(_0x50db43- -_0x4072fb._0x4dc95a,_0x435b1f);}for(const _0x3d5f1a of _0xd82097){const _0x32bdd9={'tool_name':_0x184534['name'],'tool_input':_0x184534[_0x973f8e(0x1b0,0x1b8,_0x3e30d1._0x3ac230,0x1c2)],'session_id':_0x1e74e7},_0x41cc50=await _0x100e93(_0x3d5f1a['command'],_0x32bdd9,_0x3d5f1a[_0x973f8e(_0x3e30d1._0x20da22,0x18f,0x1af,_0x3e30d1._0x1aa185)],_0x4f7452),_0x3bf744=_0x41cc50[_0x2c48b1(-0xd1,-0xec,-0xdf,-0xba)]?.['hookSpecificOutput']?.[_0x2c48b1(-0xbe,-_0x3e30d1._0x23a3f4,-0xde,-_0x3e30d1._0xed5947)];if(_0x3bf744==='allow')return{'action':_0x973f8e(_0x3e30d1._0x220941,0x1ad,0x1bc,0x1aa)};if(_0x3bf744===_0x973f8e(0x1a7,_0x3e30d1._0x38cb57,0x18a,0x1a1))return{'action':_0x973f8e(_0x3e30d1._0x3d5c71,_0x3e30d1._0x13d276,_0x3e30d1._0x38cb57,_0x3e30d1._0x3d5c71),'reason':_0x41cc50[_0x973f8e(0x16b,0x193,_0x3e30d1._0x3d5c71,0x186)]?.[_0x2c48b1(-0xc3,-_0x3e30d1._0x522011,-0xe3,-_0x3e30d1._0x19c7b0)]?.[_0x973f8e(0x1bf,_0x3e30d1._0x440fc1,_0x3e30d1._0x2693e4,0x1bd)]||_0x2c48b1(-_0x3e30d1._0x59135a,-0xa9,-_0x3e30d1._0x1e164f,-_0x3e30d1._0x1c63ad)+_0x184534[_0x2c48b1(-0x99,-0x84,-0xa4,-0x8b)]};if(_0x41cc50[_0x973f8e(_0x3e30d1._0x13c3c7,0x1b7,0x19d,_0x3e30d1._0x5a9ba2)]===_0x2c48b1(-0xd0,-_0x3e30d1._0x50fad9,-0xdc,-0xc0)||_0x41cc50[_0x2c48b1(-_0x3e30d1._0x871d3a,-_0x3e30d1._0x291d2e,-0xd0,-_0x3e30d1._0x22ff0e)]?.[_0x2c48b1(-_0x3e30d1._0x29bfe8,-_0x3e30d1._0x522011,-_0x3e30d1._0x345f46,-_0x3e30d1._0x14aec2)]===_0x2c48b1(-0xd0,-0xd3,-0xe9,-0xee))return{'action':_0x973f8e(_0x3e30d1._0x4cfff0,0x17a,_0x3e30d1._0xc1ceaf,0x192),'reason':_0x41cc50['output']?.[_0x2c48b1(-0xa6,-_0x3e30d1._0x3ce654,-0x98,-_0x3e30d1._0x189d84)]||'Blocked\x20by\x20PreToolUse\x20hook\x20for\x20'+_0x184534[_0x973f8e(_0x3e30d1._0x13c3c7,0x1bc,_0x3e30d1._0x55b1bf,_0x3e30d1._0x12251e)]};}return _0x27fb98(_0x184534,_0x4346ae);};}var DEFAULT_TIMEOUT_S2=0x3c;function createHookRegistry(_0x54fe64){const _0x561299={_0x35e26e:0x26f,_0x21557a:0x286,_0x4d410b:0x264,_0x341fb7:0x282,_0x48dc1b:0x477,_0x6d2cb1:0x28e,_0x3a35d7:0x47e,_0x52e7f0:0x457,_0x825980:0x29f,_0x55d901:0x2b5},_0x2c1b5e={_0x4d51fa:0x2d2};return{'hasHooks'(_0xf37028){return(_0x54fe64[_0xf37028]?.['length']??0x0)>0x0;},'getHooks'(_0x14e05e,_0x3b779c){const _0x251c58=_0x54fe64[_0x14e05e];if(!_0x251c58)return[];function _0x586f66(_0x2d1f3e,_0x4b9070,_0xc35caf,_0x3d01c8){return _0x17fc(_0xc35caf-_0x2c1b5e._0x4d51fa,_0x3d01c8);}const _0x2c23c8=[];function _0x33e9e7(_0xd8101c,_0x221df2,_0x3efdfc,_0x74155c){return _0x17fc(_0x3efdfc-0xef,_0x74155c);}for(const _0x5859e1 of _0x251c58){if(!_0x5859e1[_0x33e9e7(0x279,0x26a,0x286,_0x561299._0x35e26e)]||_0x5859e1[_0x33e9e7(0x275,0x272,_0x561299._0x21557a,0x29d)]==='*'){_0x2c23c8[_0x33e9e7(_0x561299._0x4d410b,0x283,_0x561299._0x341fb7,0x26d)](..._0x5859e1['hooks'][_0x586f66(_0x561299._0x48dc1b,0x452,0x45c,0x45e)](_0x14fd72=>({'command':_0x14fd72['command'],'timeout':_0x14fd72[_0x33e9e7(0x293,0x298,0x283,0x29a)]??DEFAULT_TIMEOUT_S2})));continue;}if(_0x3b779c===void 0x0)continue;const _0x552696=new RegExp('^(?:'+_0x5859e1['matcher']+')$');_0x552696[_0x33e9e7(0x27e,0x29d,_0x561299._0x6d2cb1,0x291)](_0x3b779c)&&_0x2c23c8[_0x586f66(_0x561299._0x3a35d7,0x449,0x465,_0x561299._0x52e7f0)](..._0x5859e1[_0x33e9e7(0x298,0x2bc,_0x561299._0x825980,_0x561299._0x55d901)]['map'](_0x3b74d9=>({'command':_0x3b74d9[_0x33e9e7(0x293,0x293,0x2a2,0x2b6)],'timeout':_0x3b74d9[_0x586f66(0x476,0x475,0x466,0x451)]??DEFAULT_TIMEOUT_S2})));}return _0x2c23c8;}};}export{createHookExtensions,createHookOnToolCallMiddleware,createHookRegistry,executeCommandHook};
|
|
1
|
+
(function(_0x377b0f,_0x1803ba){const _0xd7a838={_0x2f2052:0x215,_0x10f114:0x98,_0x717d23:0xa6,_0x563c5b:0xdc,_0x402925:0xb9,_0x2e6fee:0x213,_0x11a36a:0x20c,_0x37a93f:0x219,_0xa44101:0x21a,_0x1f345d:0xaf,_0x94e50f:0x22d},_0x149619={_0x2fd1a4:0x240};function _0x3a895d(_0x5e3ee8,_0x1326dd,_0x557171,_0x3ae5f5){return _0x418f(_0x1326dd- -_0x149619._0x2fd1a4,_0x3ae5f5);}function _0x1f0df3(_0x523518,_0x1f1f2f,_0x51ce4e,_0x27b85b){return _0x418f(_0x1f1f2f- -0x3c7,_0x51ce4e);}const _0x44b796=_0x377b0f();while(!![]){try{const _0x4a8643=parseInt(_0x1f0df3(-_0xd7a838._0x2f2052,-0x216,-0x1f9,-0x223))/0x1*(parseInt(_0x3a895d(-_0xd7a838._0x10f114,-0x94,-0xaa,-0xa2))/0x2)+parseInt(_0x3a895d(-0x92,-0x9c,-_0xd7a838._0x717d23,-0xb3))/0x3+parseInt(_0x3a895d(-0xcc,-0xc1,-_0xd7a838._0x717d23,-0xa3))/0x4*(-parseInt(_0x3a895d(-_0xd7a838._0x563c5b,-0xc4,-0xc8,-_0xd7a838._0x402925))/0x5)+parseInt(_0x1f0df3(-0x21b,-0x220,-_0xd7a838._0x2e6fee,-_0xd7a838._0x11a36a))/0x6*(-parseInt(_0x1f0df3(-_0xd7a838._0x37a93f,-0x212,-_0xd7a838._0xa44101,-0x235))/0x7)+parseInt(_0x3a895d(-0xbf,-_0xd7a838._0x1f345d,-0xc4,-0x9b))/0x8+-parseInt(_0x1f0df3(-0x24d,-_0xd7a838._0x94e50f,-0x21c,-0x22f))/0x9+parseInt(_0x3a895d(-0xca,-0xb8,-0xcb,-0xa0))/0xa;if(_0x4a8643===_0x1803ba)break;else _0x44b796['push'](_0x44b796['shift']());}catch(_0x3f3cbf){_0x44b796['push'](_0x44b796['shift']());}}}(_0x1ab3,0xcc651));import{spawn}from'child_process';var DEFAULT_TIMEOUT_S=0x3c;async function executeCommandHook(_0x2cd094,_0xd73ee2,_0x345cf6=DEFAULT_TIMEOUT_S,_0xbeb4b9){const _0x5b4611={_0x14cd9a:0x380,_0x2fb38a:0x3c8,_0x27f678:0x3d1,_0x5088b2:0x3ce,_0x59514e:0x3cb,_0x3ad52a:0x3e4,_0x2a979c:0x3a3,_0x1c79c6:0x3a7,_0x4c7022:0x384,_0x4e39d8:0x3d4,_0x326233:0x3f0,_0x2917e9:0x38e,_0x42c5cd:0x38c,_0x4f8a90:0x405,_0x3c785a:0x3f6,_0xa922ba:0x3dc,_0x46cf5d:0x3f1,_0x5c4f1:0x367,_0x1933e6:0x34f,_0x5d7996:0x35d,_0x4ac511:0x3ed,_0x2bdc8b:0x3d3,_0xbf7578:0x39a,_0x112b09:0x37a,_0x32cba2:0x3a3,_0x29973d:0x3c2},_0x38d1ce=Date['now']();return new Promise(_0x5d0de6=>{const _0xf629d2={_0x44918a:0x24f,_0x216a87:0x244,_0x274210:0x23c,_0x97e3bf:0x103},_0x7747b4={_0x5a7bf6:0x110},_0x310413={_0x1f5eb9:0xf1,_0x27e259:0x105,_0x108f94:0xf0,_0x1bc6db:0x14f,_0x538555:0x12b,_0x3d9771:0x11c,_0xf6dfbd:0x132,_0x1d42fa:0x150,_0x5bc622:0x142,_0x765916:0x161,_0x3ba1b3:0x122,_0x2dc7d4:0x103,_0x13372e:0x10b,_0x3054ba:0x15f,_0xf93a61:0x164,_0x1b01fa:0x159,_0x334cf0:0x18d,_0x2d866e:0x171,_0x37d27:0x15a,_0x14f5ef:0xee,_0x1a343a:0xdb,_0x4f160d:0xca,_0x32effe:0x109,_0x2ea09c:0x112,_0xbbdad6:0x129,_0x1967ec:0xee},_0x2e6040={_0x4982a5:0x136,_0xec965b:0x187},_0x4eeafb={_0x358e4a:0x235},_0x95b708={_0x1c162a:0x51b,_0x104044:0x4f9,_0x3d3ea7:0x12f,_0x5d207e:0x155,_0x854d39:0x135,_0x578fb2:0x132,_0x5aaaa9:0x109,_0x57ea86:0x113},_0x5d89aa={_0xb1ac1e:0xc0},_0x40df6c={_0x58207d:0x114,_0x502f59:0x18e},_0xd6ed6b={_0x372bd7:0x90,_0x2b88d6:0x7b},_0x522f21={_0x167301:0x503},_0x3b7f91={_0xb6aee5:0x199,_0x3c27c4:0x3c},_0x216072={_0x46c05e:0x425},_0x3ebc1f={_0x58ce3b:0x63,_0x358a42:0x3f},_0x565e68={_0x689bfb:0x2fe,_0x521eb8:0x302},_0x326f21={_0x1a5b20:0x39},_0x3bbf38={_0x44fe37:0x1d6};function _0x24f155(_0x40ce99,_0x2a0a64,_0x23cfb4,_0x33dcbc){return _0x418f(_0x33dcbc-_0x3bbf38._0x44fe37,_0x23cfb4);}const _0x20875a=spawn('sh',['-c',_0x2cd094],{'stdio':[_0x24f155(_0x5b4611._0x14cd9a,0x361,0x36b,0x36f),_0x44693d(_0x5b4611._0x2fb38a,0x3ce,0x3b3,_0x5b4611._0x27f678),_0x44693d(0x3ba,_0x5b4611._0x5088b2,0x3cf,0x3ac)],'env':{...process[_0x44693d(_0x5b4611._0x59514e,_0x5b4611._0x2fb38a,0x3e0,_0x5b4611._0x3ad52a)],'CLAUDE_PROJECT_DIR':_0xbeb4b9??process[_0x24f155(0x3a6,_0x5b4611._0x2a979c,_0x5b4611._0x1c79c6,_0x5b4611._0x4c7022)]()}});let _0x2486c0='',_0x594ef6='';_0x20875a['stdout']['on'](_0x44693d(_0x5b4611._0x4e39d8,_0x5b4611._0x326233,0x3e7,0x3e2),_0x5a0cab=>{function _0x3c33e8(_0x2087d2,_0x5087f5,_0x1ec0ca,_0x10351b){return _0x24f155(_0x2087d2-0x88,_0x5087f5-_0x326f21._0x1a5b20,_0x1ec0ca,_0x10351b- -0x5e);}_0x2486c0+=_0x5a0cab[_0x3c33e8(0x324,_0x565e68._0x689bfb,0x2f4,_0x565e68._0x521eb8)]();}),_0x20875a[_0x24f155(_0x5b4611._0x2917e9,0x3ac,0x37e,_0x5b4611._0x42c5cd)]['on'](_0x44693d(0x400,0x3f0,0x3e2,_0x5b4611._0x4f8a90),_0x37179c=>{function _0x682a23(_0x2dd322,_0x53102e,_0x5f0064,_0x518fb6){return _0x44693d(_0x2dd322-0x5d,_0x2dd322-_0x3ebc1f._0x58ce3b,_0x5f0064,_0x518fb6-_0x3ebc1f._0x358a42);}_0x594ef6+=_0x37179c[_0x682a23(0x422,0x428,0x40f,_0x216072._0x46c05e)]();}),_0x20875a['stdin']['on'](_0x44693d(0x3bf,0x3de,_0x5b4611._0x3c785a,0x3fd),_0x22a989=>{function _0x4df30c(_0x4e3562,_0x4d69b3,_0x21756b,_0x46a58c){return _0x44693d(_0x4e3562-_0x3b7f91._0xb6aee5,_0x21756b- -0x35f,_0x4e3562,_0x46a58c-_0x3b7f91._0x3c27c4);}function _0x1aef07(_0x5296fa,_0xe46b87,_0x1f71ff,_0x31d1ea){return _0x24f155(_0x5296fa-0x10e,_0xe46b87-0xb2,_0x5296fa,_0x1f71ff- -_0x522f21._0x167301);}if(_0x22a989[_0x4df30c(0xab,_0xd6ed6b._0x372bd7,0x8d,0x7a)]!==_0x4df30c(_0xd6ed6b._0x2b88d6,0x83,0x64,0x4f))throw _0x22a989;}),_0x20875a[_0x44693d(_0x5b4611._0xa922ba,0x3d4,_0x5b4611._0x46cf5d,_0x5b4611._0x326233)]['write'](JSON[_0x24f155(0x375,_0x5b4611._0x5c4f1,_0x5b4611._0x1933e6,_0x5b4611._0x5d7996)](_0xd73ee2)),_0x20875a[_0x44693d(_0x5b4611._0x4ac511,0x3d4,_0x5b4611._0x2bdc8b,0x3e8)][_0x44693d(0x399,0x3af,0x3d1,_0x5b4611._0xbf7578)]();const _0x32f02d=setTimeout(()=>{_0x20875a[_0x208d64(0x50a,_0x95b708._0x1c162a,0x50e,_0x95b708._0x104044)]('SIGKILL');function _0x208d64(_0x50ec4d,_0x37238b,_0x23abf9,_0x4495e2){return _0x24f155(_0x50ec4d-_0x40df6c._0x58207d,_0x37238b-0x126,_0x23abf9,_0x50ec4d-_0x40df6c._0x502f59);}function _0x4d1c72(_0x4c78e5,_0x40e36a,_0x598818,_0x3b044d){return _0x24f155(_0x4c78e5-0xe,_0x40e36a-_0x5d89aa._0xb1ac1e,_0x40e36a,_0x3b044d- -0x241);}_0x5d0de6({'status':'error','error':_0x4d1c72(_0x95b708._0x3d3ea7,_0x95b708._0x5d207e,0x157,_0x95b708._0x854d39)+_0x345cf6+'s','duration_ms':Date[_0x4d1c72(0x119,_0x95b708._0x578fb2,_0x95b708._0x5aaaa9,_0x95b708._0x57ea86)]()-_0x38d1ce});},_0x345cf6*0x3e8);function _0x44693d(_0xab0437,_0x21b276,_0x2468d5,_0x3bcc00){return _0x418f(_0x21b276-_0x4eeafb._0x358e4a,_0x2468d5);}_0x20875a['on'](_0x24f155(0x38d,_0x5b4611._0x112b09,_0x5b4611._0x32cba2,0x38e),_0xd1296f=>{const _0x27140e={_0x5ca491:0x11a};clearTimeout(_0x32f02d);const _0x21d01e=Date[_0x1f25e3(0x113,_0x310413._0x1f5eb9,_0x310413._0x27e259,_0x310413._0x108f94)]()-_0x38d1ce;function _0x3afd42(_0x253502,_0x9286e6,_0x1e6a70,_0x434ef1){return _0x24f155(_0x253502-_0x27140e._0x5ca491,_0x9286e6-0x3a,_0x253502,_0x9286e6- -0x221);}function _0x1f25e3(_0x2c1077,_0x5b3d0f,_0x459314,_0xc5422f){return _0x24f155(_0x2c1077-_0x2e6040._0x4982a5,_0x5b3d0f-_0x2e6040._0xec965b,_0x459314,_0x5b3d0f- -0x263);}if(_0xd1296f===0x2){_0x5d0de6({'status':'block','output':{'decision':_0x3afd42(0x162,0x14a,0x143,_0x310413._0x1bc6db),'reason':_0x594ef6[_0x3afd42(0x162,0x164,0x16d,0x14d)]()||_0x1f25e3(_0x310413._0x538555,0x10b,0x10b,0xeb)},'duration_ms':_0x21d01e});return;}if(_0xd1296f!==0x0){_0x5d0de6({'status':_0x1f25e3(0x119,_0x310413._0x3d9771,0xff,_0x310413._0xf6dfbd),'error':_0x3afd42(_0x310413._0x1d42fa,_0x310413._0x5bc622,_0x310413._0x765916,0x140)+_0xd1296f+(_0x594ef6[_0x1f25e3(_0x310413._0x3ba1b3,_0x310413._0x3ba1b3,_0x310413._0x2dc7d4,_0x310413._0x13372e)]()?':\x20'+_0x594ef6[_0x3afd42(_0x310413._0x3054ba,_0x310413._0xf93a61,0x153,_0x310413._0x1b01fa)]():''),'duration_ms':_0x21d01e});return;}const _0x529981=_0x2486c0['trim']();if(_0x529981[_0x3afd42(_0x310413._0x334cf0,_0x310413._0x2d866e,0x15d,_0x310413._0x37d27)]===0x0){_0x5d0de6({'status':_0x1f25e3(0xe0,_0x310413._0x14f5ef,_0x310413._0x1a343a,_0x310413._0x4f160d),'duration_ms':_0x21d01e});return;}try{const _0x551e9c=JSON[_0x1f25e3(0xee,_0x310413._0x32effe,_0x310413._0x2ea09c,_0x310413._0xbbdad6)](_0x529981);_0x5d0de6({'status':_0x3afd42(0x12d,0x130,0x141,0x14c),'output':_0x551e9c,'duration_ms':_0x21d01e});}catch{_0x5d0de6({'status':_0x1f25e3(0xf1,_0x310413._0x1967ec,0x106,0xd2),'duration_ms':_0x21d01e});}}),_0x20875a['on'](_0x44693d(_0x5b4611._0x29973d,0x3de,0x3cc,_0x5b4611._0x3c785a),_0x2af284=>{const _0x2e64e5={_0x458a9b:0x184};function _0x2027a7(_0x43a449,_0x36bec8,_0x30e234,_0x127e29){return _0x44693d(_0x43a449-_0x2e64e5._0x458a9b,_0x127e29- -0x4b7,_0x36bec8,_0x127e29-0x7e);}function _0x5a7bfe(_0x44568e,_0x40afca,_0x4868ba,_0x5c0efb){return _0x24f155(_0x44568e-0x149,_0x40afca-_0x7747b4._0x5a7bf6,_0x4868ba,_0x40afca- -0x12b);}clearTimeout(_0x32f02d),_0x5d0de6({'status':_0x5a7bfe(_0xf629d2._0x44918a,0x254,_0xf629d2._0x216a87,_0xf629d2._0x274210),'error':_0x2af284[_0x2027a7(-_0xf629d2._0x97e3bf,-0xe6,-0xe2,-0xf7)],'duration_ms':Date['now']()-_0x38d1ce});});});}function createHookExtensions(_0x13cd5f,_0x3b3b56,_0xdab05={}){const _0x2190be={_0x485c78:0x156,_0x500061:0x149,_0x5d772d:0x135,_0x430585:0x152,_0x6004ed:0x170,_0x43668f:0x150,_0x266939:0x155,_0x4ee9c6:0x15e,_0x19d45e:0x1ae,_0x5c835d:0x18f,_0x44933a:0x183,_0x260c83:0x18b,_0x390109:0x190,_0x102215:0x191,_0x5d2b99:0x18c,_0x1a73ce:0x146,_0x2b7e0f:0x129,_0x5b2651:0x159,_0x228d9d:0x15c,_0x39aef9:0x15d},_0x3e918c={_0x599bbd:0x1cb,_0x32b635:0x1aa,_0x45d58b:0x51f,_0x53e367:0x542,_0x4bd44b:0x551,_0x42dfc3:0x56e},_0x2e9d6f={_0xa66692:0x1bb,_0x5bdffe:0x195,_0x593e04:0x1d3,_0x100e20:0x1e9,_0x47ae01:0x528,_0x1ee1f5:0x516,_0x289bb8:0x512,_0x36c776:0x1b6,_0x4f65be:0x1a8,_0x5c64ce:0x504,_0x5844fe:0x523,_0x3e8080:0x521},_0x252799={_0x2ba209:0x22,_0x24f9c6:0x69,_0x421656:0x59,_0x2f33e7:0x67,_0x508319:0x5e,_0x4ebfd6:0x73},_0x4ab599={_0x209f21:0x1a7},_0x5ea6a7={_0x1a78bb:0x308};function _0x56e6d3(_0x1973ec,_0x4631c7,_0x47b7a2,_0x2ab00a){return _0x418f(_0x4631c7- -0x27,_0x2ab00a);}const _0x128ecc=[],{sessionId:_0x46f5be,projectDir:_0x101beb}=_0xdab05;function _0x132b1a(_0x399620,_0x15e3d6,_0x1cc704,_0x377aba){return _0x418f(_0x1cc704- -_0x5ea6a7._0x1a78bb,_0x15e3d6);}const _0x360824=_0x2bdf34=>_0x13cd5f[_0x132b1a(-0x18a,-0x199,-0x186,-0x166)]?_0x13cd5f['hasHooks'](_0x2bdf34):_0x13cd5f[_0x132b1a(-0x14f,-0x175,-0x156,-0x156)](_0x2bdf34)['length']>0x0;return _0x360824(_0x132b1a(-_0x2190be._0x485c78,-0x15e,-0x15e,-_0x2190be._0x500061))&&_0x128ecc[_0x56e6d3(_0x2190be._0x5d772d,_0x2190be._0x430585,_0x2190be._0x6004ed,_0x2190be._0x43668f)]({'id':_0x132b1a(-0x159,-0x157,-0x14b,-_0x2190be._0x266939),'stage':'afterToolResult','kind':_0x132b1a(-_0x2190be._0x4ee9c6,-0x172,-0x160,-0x14d),'order':0x0,'enabled':!![],'run':async(_0x3a172e,_0x23f713)=>{function _0x1f55da(_0x25d8df,_0x385ef8,_0x29c1f2,_0x150c13){return _0x132b1a(_0x25d8df-0x1f2,_0x29c1f2,_0x385ef8-_0x4ab599._0x209f21,_0x150c13-0x12a);}const _0x2af822=_0x13cd5f[_0x526ff0(-0x33,-0x21,-_0x252799._0x2ba209,-0x39)]('PostToolUse',_0x3a172e[_0x1f55da(_0x252799._0x24f9c6,_0x252799._0x421656,0x48,_0x252799._0x2f33e7)]);function _0x526ff0(_0x409d69,_0x34e38d,_0x52c869,_0x308326){return _0x132b1a(_0x409d69-0x113,_0x34e38d,_0x308326-0x11d,_0x308326-0x50);}for(const _0x1b06d2 of _0x2af822){const _0x5dbb0c={'tool_name':_0x3a172e[_0x526ff0(-0x18,-0x4e,-0x1d,-0x31)],'tool_input':void 0x0,'tool_output':_0x3a172e[_0x1f55da(0x5c,_0x252799._0x508319,0x66,0x74)],'tool_result_status':_0x3a172e[_0x526ff0(-0x61,-0x69,-0x72,-0x6a)],'session_id':_0x46f5be??_0x23f713[_0x1f55da(0x6f,0x53,0x49,_0x252799._0x4ebfd6)]['sessionId']};await _0x3b3b56(_0x1b06d2['command'],_0x5dbb0c,_0x1b06d2['timeout'],_0x101beb);}}}),_0x360824('Stop')&&_0x128ecc[_0x132b1a(-0x19d,-_0x2190be._0x19d45e,-_0x2190be._0x5c835d,-_0x2190be._0x44933a)]({'id':_0x132b1a(-0x18b,-0x1ae,-_0x2190be._0x260c83,-0x179),'stage':_0x56e6d3(0x190,0x189,_0x2190be._0x390109,0x1a4),'kind':'observer','order':0x0,'enabled':!![],'run':async(_0x5d1dd2,_0x3dcbea)=>{const _0x528e96={_0x223e7d:0x99},_0x3a0350={_0x11ff97:0x68c};function _0x257575(_0x184d33,_0x248d19,_0x1b74ee,_0x4ba234){return _0x132b1a(_0x184d33-0xf0,_0x1b74ee,_0x248d19-_0x3a0350._0x11ff97,_0x4ba234-0x11b);}const _0x49c7e9=_0x13cd5f[_0x421184(-_0x2e9d6f._0xa66692,-0x1aa,-_0x2e9d6f._0x5bdffe,-0x1c1)](_0x421184(-0x1d4,-_0x2e9d6f._0x593e04,-_0x2e9d6f._0x100e20,-0x1b4));function _0x421184(_0x82d0b9,_0x25e1bd,_0xea2a10,_0x2140ca){return _0x56e6d3(_0x82d0b9-0xfc,_0x25e1bd- -0x335,_0xea2a10-_0x528e96._0x223e7d,_0x82d0b9);}for(const _0x5da8d4 of _0x49c7e9){const _0x5cb8b8={'stop_reason':_0x257575(_0x2e9d6f._0x47ae01,_0x2e9d6f._0x1ee1f5,0x4f8,_0x2e9d6f._0x289bb8),'session_id':_0x46f5be??_0x3dcbea[_0x421184(-_0x2e9d6f._0x36c776,-_0x2e9d6f._0x4f65be,-0x1b9,-0x19e)][_0x257575(0x4fa,_0x2e9d6f._0x5c64ce,_0x2e9d6f._0x5844fe,_0x2e9d6f._0x3e8080)]};await _0x3b3b56(_0x5da8d4['command'],_0x5cb8b8,_0x5da8d4['timeout'],_0x101beb);}}}),_0x360824(_0x56e6d3(0x175,0x17b,_0x2190be._0x102215,0x191))&&_0x128ecc[_0x132b1a(-0x1a6,-0x16f,-0x18f,-_0x2190be._0x5d2b99)]({'id':_0x132b1a(-_0x2190be._0x1a73ce,-_0x2190be._0x2b7e0f,-0x14a,-_0x2190be._0x5b2651),'stage':_0x132b1a(-0x18f,-_0x2190be._0x228d9d,-0x178,-_0x2190be._0x39aef9),'kind':'observer','order':0x0,'enabled':!![],'run':async(_0x4c2dba,_0x9ab658)=>{const _0x11429d={_0x4b5a97:0xed,_0x2e51ab:0x75};function _0x352e4c(_0x1bca94,_0x3e1777,_0x4d547e,_0x83040){return _0x132b1a(_0x1bca94-0x1ba,_0x4d547e,_0x3e1777-0x6bb,_0x83040-0xe);}function _0x3086db(_0x438e01,_0x3ee003,_0x230864,_0x4e6484){return _0x132b1a(_0x438e01-_0x11429d._0x4b5a97,_0x230864,_0x438e01- -_0x11429d._0x2e51ab,_0x4e6484-0x19);}const _0x1cbd1a=_0x13cd5f[_0x3086db(-_0x3e918c._0x599bbd,-0x1cd,-0x1b7,-_0x3e918c._0x32b635)]('Notification');for(const _0x56327b of _0x1cbd1a){const _0x540f07={'message':_0x352e4c(_0x3e918c._0x45d58b,0x536,0x549,_0x3e918c._0x53e367),'session_id':_0x46f5be??_0x4c2dba['sessionId']};await _0x3b3b56(_0x56327b[_0x352e4c(0x555,_0x3e918c._0x4bd44b,0x541,_0x3e918c._0x42dfc3)],_0x540f07,_0x56327b['timeout'],_0x101beb);}}}),_0x128ecc;}function createHookOnToolCallMiddleware(_0x5eccf2,_0x594c30,_0xf91105,_0x1aacc8={}){const _0x2b3525={_0x2f80ea:0x589,_0xf31660:0x574,_0x15bcf0:0x570,_0x5d3ee8:0x581,_0xe4d448:0x594,_0x373174:0x21b,_0x58cf22:0x20e,_0x16f4b9:0x22b,_0x35be7e:0x22e,_0x6a58af:0x216,_0x1e4a93:0x218,_0x578717:0x57d,_0x51e4fa:0x56c,_0x3c6a11:0x243,_0xd6b6ff:0x22f,_0x34f9e5:0x246,_0x103aee:0x558,_0x41d5f8:0x554,_0x537b18:0x580,_0x3753ca:0x557,_0x3c0f6d:0x595,_0x1fe0df:0x590,_0x248760:0x573,_0x2be035:0x551,_0xd36dc:0x20b,_0x50432f:0x227,_0x2cb11a:0x23a,_0x47684f:0x240,_0x2b882e:0x230,_0x1c4671:0x545,_0x5680d8:0x552,_0x357a35:0x5aa,_0xb5a48d:0x588,_0x3e61b3:0x58d,_0x5db06f:0x58e,_0x5a87f8:0x563,_0x32b673:0x235,_0x18a4b4:0x245,_0x904c4e:0x56f,_0x315ac1:0x55b,_0x3c410d:0x23b,_0x50b99a:0x221,_0x18e3cf:0x21e,_0x441f58:0x21b,_0x205c86:0x226},{sessionId:_0x2443c2,projectDir:_0x4d1e41}=_0x1aacc8;return async(_0x2f20e9,_0x29f9d2)=>{const _0x2bc1f7={_0xb410bc:0x3ce};function _0x24514c(_0x17f198,_0x5edc1c,_0x3e44d7,_0xa5728f){return _0x418f(_0x3e44d7-_0x2bc1f7._0xb410bc,_0x17f198);}function _0x2c74f6(_0x47d9fd,_0x541ea1,_0x1d1dfc,_0x4b4797){return _0x418f(_0x1d1dfc-0x8a,_0x4b4797);}const _0x247456=_0x5eccf2[_0x24514c(0x58d,_0x2b3525._0x2f80ea,0x580,_0x2b3525._0xf31660)](_0x24514c(_0x2b3525._0x15bcf0,0x56b,_0x2b3525._0x5d3ee8,_0x2b3525._0xe4d448),_0x2f20e9[_0x2c74f6(_0x2b3525._0x373174,0x1f1,_0x2b3525._0x58cf22,_0x2b3525._0x16f4b9)]);for(const _0x11bd61 of _0x247456){const _0x3699bc={'tool_name':_0x2f20e9[_0x2c74f6(0x231,_0x2b3525._0x35be7e,0x20e,0x1ff)],'tool_input':_0x2f20e9['input'],'session_id':_0x2443c2},_0x161941=await _0x594c30(_0x11bd61[_0x2c74f6(0x20a,0x20f,0x228,0x23e)],_0x3699bc,_0x11bd61[_0x2c74f6(0x239,_0x2b3525._0x6a58af,0x237,_0x2b3525._0x1e4a93)],_0x4d1e41),_0x1a0f05=_0x161941[_0x2c74f6(0x231,0x232,0x249,0x227)]?.['hookSpecificOutput']?.[_0x24514c(0x573,_0x2b3525._0x578717,0x587,_0x2b3525._0x51e4fa)];if(_0x1a0f05===_0x2c74f6(_0x2b3525._0x3c6a11,_0x2b3525._0xd6b6ff,0x225,_0x2b3525._0x34f9e5))return{'action':_0x24514c(_0x2b3525._0x103aee,0x571,_0x2b3525._0x41d5f8,0x570)};if(_0x1a0f05==='deny')return{'action':_0x24514c(_0x2b3525._0x537b18,_0x2b3525._0x3753ca,0x579,_0x2b3525._0x3c0f6d),'reason':_0x161941[_0x24514c(0x57d,0x56d,0x58d,0x5a9)]?.[_0x24514c(_0x2b3525._0x1fe0df,_0x2b3525._0xe4d448,_0x2b3525._0x248760,_0x2b3525._0x2be035)]?.[_0x2c74f6(_0x2b3525._0xd36dc,0x211,_0x2b3525._0x50432f,0x22c)]||_0x2c74f6(_0x2b3525._0x2cb11a,_0x2b3525._0x47684f,0x22d,_0x2b3525._0x2b882e)+_0x2f20e9[_0x24514c(_0x2b3525._0x1c4671,0x546,_0x2b3525._0x5680d8,0x54b)]};if(_0x161941[_0x2c74f6(0x21e,0x1f0,_0x2b3525._0xd36dc,0x20a)]==='block'||_0x161941[_0x24514c(_0x2b3525._0x357a35,_0x2b3525._0xb5a48d,_0x2b3525._0x3e61b3,_0x2b3525._0x5db06f)]?.['decision']===_0x24514c(0x582,0x545,_0x2b3525._0x5a87f8,0x56c))return{'action':_0x2c74f6(0x22e,_0x2b3525._0xd6b6ff,_0x2b3525._0x32b673,0x231),'reason':_0x161941[_0x2c74f6(0x251,0x25e,0x249,_0x2b3525._0x18a4b4)]?.[_0x24514c(0x55c,0x582,_0x2b3525._0x904c4e,_0x2b3525._0x315ac1)]||_0x2c74f6(_0x2b3525._0x3c410d,_0x2b3525._0x50b99a,_0x2b3525._0x18e3cf,_0x2b3525._0x441f58)+_0x2f20e9[_0x2c74f6(_0x2b3525._0x205c86,_0x2b3525._0x6a58af,0x20e,0x211)]};}return _0xf91105(_0x2f20e9,_0x29f9d2);};}function _0x418f(_0x8fb184,_0x46678f){_0x8fb184=_0x8fb184-0x179;const _0x1ab359=_0x1ab3();let _0x418f4b=_0x1ab359[_0x8fb184];if(_0x418f['JuqSbt']===undefined){var _0x2869f1=function(_0x40a910){const _0x157822='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x2cd094='',_0xd73ee2='';for(let _0x345cf6=0x0,_0xbeb4b9,_0x38d1ce,_0x5d0de6=0x0;_0x38d1ce=_0x40a910['charAt'](_0x5d0de6++);~_0x38d1ce&&(_0xbeb4b9=_0x345cf6%0x4?_0xbeb4b9*0x40+_0x38d1ce:_0x38d1ce,_0x345cf6++%0x4)?_0x2cd094+=String['fromCharCode'](0xff&_0xbeb4b9>>(-0x2*_0x345cf6&0x6)):0x0){_0x38d1ce=_0x157822['indexOf'](_0x38d1ce);}for(let _0x20875a=0x0,_0x2486c0=_0x2cd094['length'];_0x20875a<_0x2486c0;_0x20875a++){_0xd73ee2+='%'+('00'+_0x2cd094['charCodeAt'](_0x20875a)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0xd73ee2);};_0x418f['iZbshU']=_0x2869f1,_0x418f['MHYCya']={},_0x418f['JuqSbt']=!![];}const _0x1f5e2d=_0x1ab359[0x0],_0x50b3ea=_0x8fb184+_0x1f5e2d,_0x100301=_0x418f['MHYCya'][_0x50b3ea];return!_0x100301?(_0x418f4b=_0x418f['iZbshU'](_0x418f4b),_0x418f['MHYCya'][_0x50b3ea]=_0x418f4b):_0x418f4b=_0x100301,_0x418f4b;}function _0x1ab3(){const _0x8b8db9=['ywz0zxjuDxjUq29TCgXLDgu','mJmZmtaXnKjSyu1pza','zw5Kx3r1CM4','zw52','qMXVy2TLzcbIEsbqCMvuB29SvxnLigHVB2SGzM9Yia','yMXVy2S','CgfYC2u','BwfW','sg9VAYbIBg9JA2vKigv4zwn1DgLVBG','CgLWzq','mta0mZiXndnxEg5VrxO','ywXSB3C','Ag9VA3m','CgvYBwLZC2LVBKrLy2LZAw9UuMvHC29U','y29TBwfUza','C3rKAw4','sg9VAYb0Aw1LzcbVDxqGywz0zxiG','CMvHC29U','tM90AwzPy2f0Aw9U','ugvYBwLZC2LVBIbKzw5PzwqGzM9Yia','mZy2otiWmuTXwNvvwa','Ag9VA1nWzwnPzMLJt3v0Chv0','A2LSBa','nJmYnhPYwvbIua','B2jZzxj2zxi','zxjYB3i','ug9ZDfrVB2XvC2u','CMvQzwn0','nte0mdeWrhPMAu9r','DgLTzw91Da','y3DK','DhjPBq','yMvMB3jLrMLUywXpDxrWDxq','nejxvgvrDW','z2v0sg9VA3m','uhjLvg9VBfvZzq','C3rHDgu','mZi2ow9IENvoBa','C3rKzxjY','y29Kzq','y2XVC2u','CgvYBwLZC2LVBKrLy2LZAw9U','Dg9VBe5HBwu','zgf0yq','BgvUz3rO','Ag9VAZPqB3n0vg9VBfvZzq','Ag9VAZPoB3rPzMLJyxrPB24','B3v0Chv0','ChvZAa','zw5K','CgfZCW','nZK5odK1nvDcr1votW','Ag9VAZPtDg9W','BM93','ngT6u3rNqq','C2vZC2LVBKLK','C3rHDhvZ','AgfZsg9VA3m','qwDLBNqGzMLUAxnOzwqGCMvZCg9UzgLUzW','BMfTzq','DgvZDa','CNvU','C3rYAw5NAwz5','mtu0ntG3mZbvy1H5CvG','u3rVCa','Dg9tDhjPBMC','BwvZC2fNzq','xIG/oG','sg9VAYbLEgL0zwqGD2L0AcbJB2rLia','rvbjueu','Bwf0y2HLCG'];_0x1ab3=function(){return _0x8b8db9;};return _0x1ab3();}var DEFAULT_TIMEOUT_S2=0x3c;function createHookRegistry(_0x4c425a){const _0x4b1b60={_0x4bda50:0x1ef,_0x47e99a:0x1e7,_0x2d1989:0x20e,_0x2c41eb:0x157,_0x402fff:0x153,_0x41fdcd:0x139,_0xed690f:0x1f2,_0x36f3cb:0x1dc,_0x553971:0x141,_0x49b8b9:0x1f9,_0x23cf5f:0x204,_0x6e134a:0x143,_0x4886fd:0x202,_0x604a15:0x1e2,_0x2d96df:0x1ee,_0x521ee1:0x1eb},_0x5497c1={_0xb7d288:0x2d0},_0x4c8c06={_0x2f029e:0x1b2,_0x58cf3a:0x1d0,_0x25c305:0x1cb},_0x2a42cf={_0x61d77f:0x387};return{'hasHooks'(_0x571da5){function _0x221a93(_0x192bf4,_0x5ad6db,_0x1b2728,_0x1ed66c){return _0x418f(_0x1ed66c- -_0x2a42cf._0x61d77f,_0x1b2728);}return(_0x4c425a[_0x571da5]?.[_0x221a93(-_0x4c8c06._0x2f029e,-_0x4c8c06._0x58cf3a,-0x1ba,-_0x4c8c06._0x25c305)]??0x0)>0x0;},'getHooks'(_0x9ac5ec,_0x5e5a64){const _0x39afbc=_0x4c425a[_0x9ac5ec];function _0xd0b8ad(_0x7fd06f,_0x1b648f,_0x2a9647,_0x580fa2){return _0x418f(_0x1b648f- -_0x5497c1._0xb7d288,_0x7fd06f);}if(!_0x39afbc)return[];const _0x52535f=[];function _0x252f51(_0x16907e,_0x25f684,_0xa72235,_0x28c200){return _0x418f(_0x25f684- -0x37e,_0x16907e);}for(const _0x35b951 of _0x39afbc){if(!_0x35b951[_0x252f51(-0x1ed,-_0x4b1b60._0x4bda50,-_0x4b1b60._0x47e99a,-0x1d0)]||_0x35b951[_0x252f51(-0x1d9,-0x1ef,-0x1de,-_0x4b1b60._0x2d1989)]==='*'){_0x52535f[_0xd0b8ad(-0x171,-_0x4b1b60._0x2c41eb,-0x16c,-_0x4b1b60._0x402fff)](..._0x35b951['hooks'][_0xd0b8ad(-0x13f,-_0x4b1b60._0x41fdcd,-0x13c,-0x14d)](_0x1716c5=>({'command':_0x1716c5[_0x252f51(-0x1c2,-0x1e0,-0x1cf,-0x1f3)],'timeout':_0x1716c5[_0x252f51(-0x1c4,-0x1d1,-0x1b3,-0x1e5)]??DEFAULT_TIMEOUT_S2})));continue;}if(_0x5e5a64===void 0x0)continue;const _0x3841e4=new RegExp(_0x252f51(-0x1d4,-_0x4b1b60._0xed690f,-0x200,-_0x4b1b60._0x36f3cb)+_0x35b951[_0xd0b8ad(-0x152,-_0x4b1b60._0x553971,-0x149,-0x121)]+')$');_0x3841e4[_0x252f51(-0x1f2,-_0x4b1b60._0x49b8b9,-_0x4b1b60._0x23cf5f,-0x203)](_0x5e5a64)&&_0x52535f[_0xd0b8ad(-_0x4b1b60._0x41fdcd,-_0x4b1b60._0x2c41eb,-0x165,-_0x4b1b60._0x6e134a)](..._0x35b951[_0x252f51(-_0x4b1b60._0x4886fd,-_0x4b1b60._0x604a15,-0x1c4,-0x1e0)][_0x252f51(-_0x4b1b60._0x2d96df,-0x1e7,-0x1c4,-_0x4b1b60._0x521ee1)](_0x4fa2c3=>({'command':_0x4fa2c3[_0x252f51(-0x1f5,-0x1e0,-0x1dc,-0x1e2)],'timeout':_0x4fa2c3['timeout']??DEFAULT_TIMEOUT_S2})));}return _0x52535f;}};}export{createHookExtensions,createHookOnToolCallMiddleware,createHookRegistry,executeCommandHook};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { BaseChatModelOptions, ChatRequest, ChatResponse, ChatResponseChunk, EngineChatModel, ModelExecutionOptions } from "../shared/types.ts";
|
|
2
|
-
import type { AnthropicModelOptions } from "./anthropic-model.ts";
|
|
2
|
+
import type { AnthropicHeaderResolver, AnthropicModelOptions } from "./anthropic-model.ts";
|
|
3
3
|
import type { OpenAiHeaderResolver, WebSocketFactory } from "./openai-model.ts";
|
|
4
4
|
import type { ProviderRequestMutator, ProviderSessionResolver } from "./provider-session.ts";
|
|
5
5
|
export declare const AVAILABLE_CHAT_MODEL_SURFACES: readonly ["anthropic-messages", "openai-chat-completions", "openai-responses", "openai-responses-ws"];
|
|
@@ -14,6 +14,7 @@ export interface ChatModelOptions extends Partial<BaseChatModelOptions> {
|
|
|
14
14
|
providerSessionResolver?: ProviderSessionResolver;
|
|
15
15
|
requestMutators?: ProviderRequestMutator[];
|
|
16
16
|
headerResolver?: OpenAiHeaderResolver;
|
|
17
|
+
anthropicHeaderResolver?: AnthropicHeaderResolver;
|
|
17
18
|
webSocketFactory?: WebSocketFactory;
|
|
18
19
|
}
|
|
19
20
|
export declare function providerFromSurface(surface: ChatModelSurface): string;
|