@nuvin/agent-core 0.2.0-rc.7 → 0.2.0-rc.9

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.
@@ -1 +1 @@
1
- function _0x1439(){const _0x50b1b0=['mJG0nJa0vg1mA3Pt','BgvUz3rO','ndG0mJy5DvHpuwzU','Aw5KzxHpzG','mtaXndiZwevhrhLk','C3bSAwnL','mtm4otC5ogLqvfr4ta','mtiWntm5n0fMrMHbza','mJq5nJC1mfjwq0LArG','mMf3qMP5qq','ntK0m1fwAxP3DW','CMvTB3zLqwjVCNrmAxn0zw5LCG','ywjVCNrLza','Bwf4q29Uy3vYCMvUy3KGBxvZDcbIzsbHigzPBML0zsbWB3nPDgL2zsbPBNrLz2vY','CMvHC29U','mtiYnhLore5wEq','CMvZB2X2zq','C2HPzNq','nwvSyKHZuG','y2fUy2vSBgvK','CMvQzwn0','ChvZAa'];_0x1439=function(){return _0x50b1b0;};return _0x1439();}(function(_0x238424,_0x5e95e2){const _0x5bf322={_0x490744:0x2c,_0x599c79:0x34,_0xb22374:0x2b,_0x39f7a7:0x45,_0x510ca0:0x43,_0x2ca170:0x429,_0x5eddcc:0x428,_0x3f71ff:0x425,_0x1ddaf6:0x425,_0xa796e7:0x42c,_0x1a6427:0x427,_0x213e8e:0x44,_0x1158c5:0x46,_0x1e1287:0x3c,_0x3fba86:0x4a,_0x577747:0x41a,_0xff75b5:0x41b,_0x46553d:0x424,_0x23e50c:0x41c};function _0x3c937e(_0x1ed782,_0x2278f0,_0x393df6,_0x153139){return _0x304d(_0x393df6- -0x234,_0x2278f0);}const _0x5f60d9=_0x238424();function _0x2eb34f(_0x14d3eb,_0x5f0288,_0x1f2a62,_0x179d26){return _0x304d(_0x14d3eb-0x22d,_0x5f0288);}while(!![]){try{const _0x1e2a15=parseInt(_0x3c937e(-0x37,-_0x5bf322._0x490744,-_0x5bf322._0x599c79,-_0x5bf322._0xb22374))/0x1*(parseInt(_0x3c937e(-0x3c,-0x4e,-_0x5bf322._0x39f7a7,-_0x5bf322._0x510ca0))/0x2)+parseInt(_0x3c937e(-0x32,-0x2c,-0x36,-0x2c))/0x3+parseInt(_0x2eb34f(_0x5bf322._0x2ca170,_0x5bf322._0x5eddcc,0x421,_0x5bf322._0x3f71ff))/0x4*(parseInt(_0x2eb34f(_0x5bf322._0x1ddaf6,_0x5bf322._0xa796e7,0x41c,_0x5bf322._0x1a6427))/0x5)+-parseInt(_0x2eb34f(0x419,0x41f,0x417,0x410))/0x6+parseInt(_0x3c937e(-0x3b,-0x4f,-_0x5bf322._0x213e8e,-0x44))/0x7*(parseInt(_0x3c937e(-_0x5bf322._0x1158c5,-_0x5bf322._0x1e1287,-0x3f,-_0x5bf322._0x3fba86))/0x8)+parseInt(_0x2eb34f(_0x5bf322._0x577747,0x411,0x417,0x424))/0x9+-parseInt(_0x2eb34f(_0x5bf322._0xff75b5,0x422,_0x5bf322._0x46553d,_0x5bf322._0x23e50c))/0xa;if(_0x1e2a15===_0x5e95e2)break;else _0x5f60d9['push'](_0x5f60d9['shift']());}catch(_0x4bda82){_0x5f60d9['push'](_0x5f60d9['shift']());}}}(_0x1439,0x1c727));import{modelIdentityFromParts}from'../chunk-D5IVWJHX.js';import{resolveAnthropicReasoningConfig,resolveOpenAiReasoningConfig}from'../chunk-IUZALP6K.js';import{TurnFailedError}from'../chunk-FFIZ6TKW.js';import{OperationAbortedError,addAbortListener,isAbortError,throwIfAborted,toAbortError}from'../chunk-X7VAACWY.js';function _0x304d(_0x32ce05,_0x196c56){_0x32ce05=_0x32ce05-0x1ec;const _0x14393d=_0x1439();let _0x304dc5=_0x14393d[_0x32ce05];if(_0x304d['SMmRwK']===undefined){var _0x5e6f97=function(_0x12713d){const _0x5566f3='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x2a0cc5='',_0x48683e='';for(let _0x1410b4=0x0,_0x3e4806,_0x53c4ff,_0x9df3c2=0x0;_0x53c4ff=_0x12713d['charAt'](_0x9df3c2++);~_0x53c4ff&&(_0x3e4806=_0x1410b4%0x4?_0x3e4806*0x40+_0x53c4ff:_0x53c4ff,_0x1410b4++%0x4)?_0x2a0cc5+=String['fromCharCode'](0xff&_0x3e4806>>(-0x2*_0x1410b4&0x6)):0x0){_0x53c4ff=_0x5566f3['indexOf'](_0x53c4ff);}for(let _0x4e15cc=0x0,_0x53754e=_0x2a0cc5['length'];_0x4e15cc<_0x53754e;_0x4e15cc++){_0x48683e+='%'+('00'+_0x2a0cc5['charCodeAt'](_0x4e15cc)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x48683e);};_0x304d['hnanVG']=_0x5e6f97,_0x304d['oUXBWD']={},_0x304d['SMmRwK']=!![];}const _0x40179c=_0x14393d[0x0],_0x1b1819=_0x32ce05+_0x40179c,_0x583211=_0x304d['oUXBWD'][_0x1b1819];return!_0x583211?(_0x304dc5=_0x304d['hnanVG'](_0x304dc5),_0x304d['oUXBWD'][_0x1b1819]=_0x304dc5):_0x304dc5=_0x583211,_0x304dc5;}function createAbortAwareSemaphore(_0x2a0cc5){const _0xc65bf={_0x16f8f2:0x47c,_0x36314d:0x488},_0x5cc3d7={_0x365d35:0x123,_0x38827c:0x134,_0x40b176:0x13b,_0x44a12f:0x128,_0x4bd0ee:0x135,_0x2fbba5:0x12b},_0xdf3d9a={_0xb1e133:0x138},_0x3581b9={_0x5c97a1:0xb3,_0x54d2e6:0x354},_0x4684cc={_0x163e60:0x5cf,_0x230b32:0x5d4,_0x569d84:0x5c7,_0x67774d:0x260,_0x86e88e:0x254,_0x447372:0x25b,_0x38ef81:0x5b6,_0x19aa6a:0x5c4,_0xa3f2f2:0x5cb},_0x5d1989={_0x531287:0xc3,_0x2412e0:0x5a,_0x344d03:0x22c};if(!Number['isFinite'](_0x2a0cc5)||!Number['isInteger'](_0x2a0cc5)||_0x2a0cc5<=0x0)throw new Error(_0x26b118(0x47e,_0xc65bf._0x16f8f2,0x481,_0xc65bf._0x36314d));let _0x48683e=0x0;const _0x1410b4=[];function _0x26b118(_0x49116a,_0xdb7e85,_0x29e416,_0x4acf6d){return _0x304d(_0x29e416-0x28e,_0x4acf6d);}const _0x3e4806=()=>{let _0x9df3c2=![];return()=>{if(_0x9df3c2)return;_0x9df3c2=!![],_0x48683e-=0x1,_0x53c4ff();};},_0x53c4ff=()=>{const _0x530a12={_0x1a2829:0x7f,_0x506ec9:0x183};function _0x3b367b(_0x4a3db1,_0x2bd337,_0xca8381,_0x3862b1){return _0x26b118(_0x4a3db1-_0x5d1989._0x531287,_0x2bd337-_0x5d1989._0x2412e0,_0x3862b1- -_0x5d1989._0x344d03,_0x2bd337);}function _0x36f85e(_0x294a56,_0x5c3d85,_0x3f58fc,_0x4aa91e){return _0x26b118(_0x294a56-_0x530a12._0x1a2829,_0x5c3d85-_0x530a12._0x506ec9,_0x294a56-0x140,_0x3f58fc);}while(_0x1410b4[_0x36f85e(0x5cb,_0x4684cc._0x163e60,_0x4684cc._0x230b32,0x5cd)]>0x0){const _0x4e15cc=_0x1410b4[_0x36f85e(0x5c5,0x5cc,0x5bc,0x5bd)]();if(!_0x4e15cc||_0x4e15cc[_0x36f85e(0x5c7,0x5bf,0x5c3,_0x4684cc._0x569d84)])continue;_0x4e15cc[_0x3b367b(0x252,_0x4684cc._0x67774d,_0x4684cc._0x86e88e,_0x4684cc._0x447372)]=!![],_0x4e15cc[_0x36f85e(0x5bf,0x5b5,_0x4684cc._0x38ef81,0x5c0)](),_0x48683e+=0x1,_0x4e15cc[_0x36f85e(_0x4684cc._0x19aa6a,0x5cc,_0x4684cc._0xa3f2f2,0x5c3)](_0x3e4806());return;}};return{'acquire'(_0x53754e){const _0x2a51a8={_0xbccf6e:0x388,_0x8b9e05:0x38a},_0x12d343={_0x353775:0xf0,_0x1b3ef6:0xe0,_0x1129a8:0xe8,_0x400544:0xda,_0x7b0b93:0xe2,_0x5861a9:0xe4,_0x3d1912:0xaf,_0xd8bfc7:0xaf,_0x10ab6e:0xac,_0x6e0fca:0xbb};function _0x62a416(_0x321ba0,_0x301343,_0x239225,_0x47afa5){return _0x26b118(_0x321ba0-_0x3581b9._0x5c97a1,_0x301343-0x1d3,_0x301343- -_0x3581b9._0x54d2e6,_0x47afa5);}if(_0x53754e?.[_0x62a416(0x127,0x12c,0x129,_0x5cc3d7._0x365d35)])return Promise[_0x62a416(0x13e,_0x5cc3d7._0x38827c,_0x5cc3d7._0x40b176,0x131)](toAbortError(_0x53754e[_0x62a416(_0x5cc3d7._0x44a12f,0x12e,_0x5cc3d7._0x4bd0ee,_0x5cc3d7._0x2fbba5)]));if(_0x48683e<_0x2a0cc5)return _0x48683e+=0x1,Promise['resolve'](_0x3e4806());function _0x36c727(_0xa0507f,_0x10d657,_0x4dc2fa,_0x3086ad){return _0x26b118(_0xa0507f-0x10c,_0x10d657-_0xdf3d9a._0xb1e133,_0x4dc2fa-0x4b,_0x10d657);}return new Promise((_0x17248a,_0x3266c0)=>{const _0x57ef0d={_0x2f176e:0x1ce,_0x581c4a:0x433,_0x5db2b2:0x90},_0x524309={_0x31ea6b:0x1af,_0x37cb1e:0x265,_0x1775ad:0x1c7},_0x570bfc={_0x41fc6b:0x14c},_0x2467d9={'resolve':_0x17248a,'reject':_0x3266c0,'cancelled':![],'removeAbortListener':()=>{}};function _0x5ae943(_0x57284a,_0x2c1bf2,_0x2fac07,_0x43c86d){return _0x36c727(_0x57284a-0xfd,_0x2fac07,_0x2c1bf2- -_0x570bfc._0x41fc6b,_0x43c86d-0x8);}function _0x170b20(_0x508243,_0x1f6cee,_0x22a681,_0x5a391e){return _0x62a416(_0x508243-_0x524309._0x31ea6b,_0x5a391e- -_0x524309._0x37cb1e,_0x22a681-_0x524309._0x1775ad,_0x22a681);}_0x1410b4[_0x5ae943(0x393,_0x2a51a8._0xbccf6e,_0x2a51a8._0x8b9e05,0x392)](_0x2467d9),_0x2467d9[_0x5ae943(0x389,0x37e,0x37d,0x386)]=addAbortListener(_0x53754e,()=>{function _0x141b68(_0x58df52,_0x555d93,_0x2a025a,_0x1172d8){return _0x5ae943(_0x58df52-_0x57ef0d._0x2f176e,_0x1172d8- -_0x57ef0d._0x581c4a,_0x58df52,_0x1172d8-_0x57ef0d._0x5db2b2);}function _0x2bb24f(_0x14a05d,_0x7da38c,_0x18fd25,_0x3c9b8a){return _0x170b20(_0x14a05d-0x10a,_0x7da38c-0x97,_0x14a05d,_0x3c9b8a-0x21a);}if(_0x2467d9['cancelled'])return;_0x2467d9[_0x2bb24f(_0x12d343._0x353775,_0x12d343._0x1b3ef6,0xe4,_0x12d343._0x1129a8)]=!![],_0x2467d9[_0x2bb24f(_0x12d343._0x400544,_0x12d343._0x7b0b93,0xe3,_0x12d343._0x1b3ef6)]();const _0x2ae04d=_0x1410b4[_0x2bb24f(0xf8,0xe7,_0x12d343._0x5861a9,0xee)](_0x2467d9);if(_0x2ae04d>=0x0)_0x1410b4[_0x141b68(-_0x12d343._0x3d1912,-0xaf,-0xab,-0xa5)](_0x2ae04d,0x1);_0x2467d9[_0x141b68(-_0x12d343._0xd8bfc7,-0xb7,-0xab,-_0x12d343._0x10ab6e)](toAbortError(_0x53754e?.[_0x141b68(-0xb5,-_0x12d343._0x6e0fca,-0xa8,-0xb2)]));});});}};}export{OperationAbortedError,TurnFailedError,addAbortListener,createAbortAwareSemaphore,isAbortError,modelIdentityFromParts,resolveAnthropicReasoningConfig,resolveOpenAiReasoningConfig,throwIfAborted,toAbortError};
1
+ (function(_0x347104,_0x4b6609){const _0x12014c={_0x42e73f:0x1c1,_0x2237ee:0x1c2,_0x23a14d:0x1c2,_0x5917d7:0x493,_0x23cfb6:0x497,_0x821fff:0x1cb,_0x5d567d:0x1c5,_0x58fb21:0x1bd,_0x531651:0x49f,_0x9fc41:0x496,_0x5df345:0x48d,_0x1e749d:0x49d,_0x1ce2fc:0x48e,_0x48f1f5:0x49d,_0x165d7d:0x49a,_0x2323f8:0x491,_0x5db008:0x48c,_0x56cec3:0x492,_0x5f3ed5:0x488,_0x356e0e:0x486,_0x3107dc:0x493,_0x23957b:0x486};function _0x264a77(_0x932f5c,_0x121573,_0x1d032a,_0x17ae08){return _0x2b31(_0x121573- -0x340,_0x17ae08);}const _0x156f07=_0x347104();function _0x4fd38c(_0x3a0663,_0x545063,_0x53eb22,_0x30d64c){return _0x2b31(_0x545063-0x309,_0x30d64c);}while(!![]){try{const _0xe552cd=parseInt(_0x264a77(-_0x12014c._0x42e73f,-_0x12014c._0x2237ee,-_0x12014c._0x23a14d,-0x1cd))/0x1+parseInt(_0x4fd38c(_0x12014c._0x5917d7,_0x12014c._0x5917d7,_0x12014c._0x23cfb6,0x496))/0x2*(parseInt(_0x4fd38c(0x495,0x499,0x491,0x4a0))/0x3)+parseInt(_0x264a77(-0x1c7,-0x1c0,-0x1ba,-_0x12014c._0x821fff))/0x4+-parseInt(_0x264a77(-0x1c5,-0x1bd,-_0x12014c._0x5d567d,-_0x12014c._0x58fb21))/0x5*(-parseInt(_0x4fd38c(_0x12014c._0x531651,_0x12014c._0x9fc41,_0x12014c._0x5df345,_0x12014c._0x1e749d))/0x6)+-parseInt(_0x4fd38c(0x497,0x48d,_0x12014c._0x1ce2fc,0x489))/0x7*(-parseInt(_0x4fd38c(_0x12014c._0x48f1f5,_0x12014c._0x165d7d,_0x12014c._0x2323f8,0x498))/0x8)+-parseInt(_0x4fd38c(_0x12014c._0x5db008,_0x12014c._0x56cec3,0x48e,_0x12014c._0x5f3ed5))/0x9*(parseInt(_0x4fd38c(0x48e,0x491,_0x12014c._0x356e0e,0x48b))/0xa)+-parseInt(_0x4fd38c(0x485,0x48f,0x497,0x486))/0xb*(parseInt(_0x4fd38c(_0x12014c._0x3107dc,0x490,0x492,_0x12014c._0x23957b))/0xc);if(_0xe552cd===_0x4b6609)break;else _0x156f07['push'](_0x156f07['shift']());}catch(_0x2417f6){_0x156f07['push'](_0x156f07['shift']());}}}(_0x410f,0xd7533));function _0x410f(){const _0x20d539=['ChvZAa','mtyYnZa1ou5pDNfssW','CMvTB3zLqwjVCNrmAxn0zw5LCG','mtGXmJiWog1dBhzXqG','Bwf4q29Uy3vYCMvUy3KGBxvZDcbIzsbHigzPBML0zsbWB3nPDgL2zsbPBNrLz2vY','AxnjBNrLz2vY','nxnmD1rsDW','mJfKyKPIzfi','C2HPzNq','nduYmtKZmdzuC25vDu0','mtjywvvXwNu','mta1mhrvvgH4zW','ode0otvNs3f6z3e','nJiXodjdBg9rv1m','y2fUy2vSBgvK','BgvUz3rO','nte3mZa3nfjAs2D3CW','CMvQzwn0','CMvZB2X2zq','mtuZs1r4ruXZ','mZC3nta5nNjcCufdAW','C3bSAwnL'];_0x410f=function(){return _0x20d539;};return _0x410f();}import{modelIdentityFromParts}from'../chunk-D5IVWJHX.js';import{resolveAnthropicReasoningConfig,resolveOpenAiReasoningConfig}from'../chunk-IUZALP6K.js';import{TurnFailedError}from'../chunk-FFIZ6TKW.js';import{OperationAbortedError,addAbortListener,isAbortError,throwIfAborted,toAbortError}from'../chunk-X7VAACWY.js';function createAbortAwareSemaphore(_0x3a164e){const _0x4c1d77={_0x2e52f5:0x254,_0xfccf89:0x260,_0x210f79:0x230,_0x2b02a2:0x22a},_0x271fcb={_0x1feb00:0x7c,_0x378f38:0x7e,_0x5f2be0:0x85,_0x2b76f5:0x84,_0x1e6cc0:0x86},_0x387e75={_0x2817a5:0x198},_0x3add55={_0x259226:0x74,_0x3627b6:0x4,_0x26f9b6:0x1,_0x931307:0x0,_0x49baea:0x3,_0xf24f58:0x9,_0x3c7144:0xa,_0x4579c2:0xa},_0x2dc613={_0x2d402d:0x253},_0x4ff36e={_0x1fff85:0x3e1},_0x696c44={_0x9712f5:0x3ab};function _0x99bd2(_0x2b54,_0xfaafe3,_0x48feb4,_0x11b899){return _0x2b31(_0x48feb4- -_0x696c44._0x9712f5,_0x2b54);}if(!Number['isFinite'](_0x3a164e)||!Number[_0x372d40(-0x255,-_0x4c1d77._0x2e52f5,-0x25f,-_0x4c1d77._0xfccf89)](_0x3a164e)||_0x3a164e<=0x0)throw new Error(_0x99bd2(-_0x4c1d77._0x210f79,-0x229,-_0x4c1d77._0x2b02a2,-0x226));let _0x15e098=0x0;function _0x372d40(_0x25249b,_0xaf1917,_0x849462,_0x5b35fc){return _0x2b31(_0x849462- -_0x4ff36e._0x1fff85,_0xaf1917);}const _0x413ae3=[],_0x2d34b0=()=>{let _0xb7cd35=![];return()=>{if(_0xb7cd35)return;_0xb7cd35=!![],_0x15e098-=0x1,_0x5a09aa();};},_0x5a09aa=()=>{function _0x365d1a(_0x5e3b80,_0x32428b,_0x5dd29c,_0x683b15){return _0x372d40(_0x5e3b80-0xa3,_0x5dd29c,_0x32428b-0x2be,_0x683b15-0xa0);}function _0x500b4c(_0x1ec8d6,_0x5cafb3,_0x1f3de2,_0xa05293){return _0x372d40(_0x1ec8d6-0x72,_0x1ec8d6,_0x5cafb3-_0x2dc613._0x2d402d,_0xa05293-0x18c);}while(_0x413ae3[_0x365d1a(_0x3add55._0x259226,0x69,0x6c,0x69)]>0x0){const _0xd94b67=_0x413ae3[_0x500b4c(-0x10,-0x9,-0x11,-0xc)]();if(!_0xd94b67||_0xd94b67[_0x500b4c(_0x3add55._0x3627b6,-0x3,-0xc,-_0x3add55._0x26f9b6)])continue;_0xd94b67[_0x500b4c(_0x3add55._0x931307,-_0x3add55._0x49baea,0x0,-_0x3add55._0xf24f58)]=!![],_0xd94b67['removeAbortListener'](),_0x15e098+=0x1,_0xd94b67[_0x500b4c(-0x3,0x1,-_0x3add55._0x3c7144,_0x3add55._0x4579c2)](_0x2d34b0());return;}};return{'acquire'(_0x56eb81){const _0x46a582={_0x2f596e:0x1d7,_0x25ea00:0x1d3,_0x5b5809:0x1df},_0x5efb61={_0x642230:0x15c,_0x98bbdb:0x26f},_0x298b95={_0x472d7a:0x627};if(_0x56eb81?.['aborted'])return Promise[_0x2dc467(-_0x271fcb._0x1feb00,-_0x271fcb._0x378f38,-_0x271fcb._0x5f2be0,-0x83)](toAbortError(_0x56eb81['reason']));function _0x17afa9(_0xb02781,_0x398316,_0x527f73,_0x1db5b8){return _0x99bd2(_0xb02781,_0x398316-0x133,_0x398316-_0x298b95._0x472d7a,_0x1db5b8-0xf9);}if(_0x15e098<_0x3a164e)return _0x15e098+=0x1,Promise[_0x2dc467(-0x7a,-0x7e,-_0x271fcb._0x2b76f5,-_0x271fcb._0x1e6cc0)](_0x2d34b0());function _0x2dc467(_0x4fd7c8,_0x1c63e3,_0x5d62b3,_0x443df1){return _0x99bd2(_0x443df1,_0x1c63e3-0xee,_0x5d62b3-_0x387e75._0x2817a5,_0x443df1-0x63);}return new Promise((_0x2197bd,_0x3c3874)=>{const _0x29c107={_0x499aab:0x1f9,_0x4ba2cf:0x20b,_0x2aed88:0x205,_0x4f145c:0x208,_0x6a6d40:0x1fd,_0x6dd31c:0x284,_0x3b1b42:0x286,_0x170f7c:0x27d};function _0x250129(_0x20dafb,_0x27553f,_0x2ce09d,_0x26e36b){return _0x2dc467(_0x20dafb-_0x5efb61._0x642230,_0x27553f-0xcd,_0x26e36b-_0x5efb61._0x98bbdb,_0x2ce09d);}const _0x7fbf49={'resolve':_0x2197bd,'reject':_0x3c3874,'cancelled':![],'removeAbortListener':()=>{}};_0x413ae3[_0x250129(_0x46a582._0x2f596e,_0x46a582._0x25ea00,_0x46a582._0x5b5809,0x1d9)](_0x7fbf49),_0x7fbf49['removeAbortListener']=addAbortListener(_0x56eb81,()=>{const _0x2fb8a0={_0x387bd4:0x5f},_0x5bd777={_0xc947ea:0x3e0};function _0x577125(_0x348c1d,_0x31bd7b,_0x16707c,_0x5906aa){return _0x250129(_0x348c1d-0x1d0,_0x31bd7b-0x7d,_0x16707c,_0x31bd7b- -_0x5bd777._0xc947ea);}if(_0x7fbf49[_0x577125(-0x1fe,-0x1f9,-_0x29c107._0x499aab,-0x1f4)])return;_0x7fbf49[_0x577125(-0x1f7,-0x1f9,-0x1f1,-0x1f4)]=!![],_0x7fbf49[_0x577125(-_0x29c107._0x4ba2cf,-_0x29c107._0x2aed88,-_0x29c107._0x4f145c,-_0x29c107._0x6a6d40)]();function _0x6d6e12(_0x5299a5,_0x4716f8,_0x217f55,_0x392d95){return _0x250129(_0x5299a5-0x37,_0x4716f8-_0x2fb8a0._0x387bd4,_0x217f55,_0x5299a5-0x94);}const _0x2737a4=_0x413ae3['indexOf'](_0x7fbf49);if(_0x2737a4>=0x0)_0x413ae3[_0x6d6e12(0x282,_0x29c107._0x6dd31c,_0x29c107._0x3b1b42,_0x29c107._0x170f7c)](_0x2737a4,0x1);_0x7fbf49['reject'](toAbortError(_0x56eb81?.['reason']));});});}};}function _0x2b31(_0x991c51,_0x3ffe1e){_0x991c51=_0x991c51-0x17d;const _0x410ff7=_0x410f();let _0x2b313e=_0x410ff7[_0x991c51];if(_0x2b31['FRQNLp']===undefined){var _0x2036da=function(_0x2e5fa6){const _0x39abd8='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x3a164e='',_0x15e098='';for(let _0x413ae3=0x0,_0x2d34b0,_0x5a09aa,_0xb7cd35=0x0;_0x5a09aa=_0x2e5fa6['charAt'](_0xb7cd35++);~_0x5a09aa&&(_0x2d34b0=_0x413ae3%0x4?_0x2d34b0*0x40+_0x5a09aa:_0x5a09aa,_0x413ae3++%0x4)?_0x3a164e+=String['fromCharCode'](0xff&_0x2d34b0>>(-0x2*_0x413ae3&0x6)):0x0){_0x5a09aa=_0x39abd8['indexOf'](_0x5a09aa);}for(let _0xd94b67=0x0,_0x56eb81=_0x3a164e['length'];_0xd94b67<_0x56eb81;_0xd94b67++){_0x15e098+='%'+('00'+_0x3a164e['charCodeAt'](_0xd94b67)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x15e098);};_0x2b31['ysWSkz']=_0x2036da,_0x2b31['JZLwRk']={},_0x2b31['FRQNLp']=!![];}const _0x27e41d=_0x410ff7[0x0],_0x171c35=_0x991c51+_0x27e41d,_0x23baf9=_0x2b31['JZLwRk'][_0x171c35];return!_0x23baf9?(_0x2b313e=_0x2b31['ysWSkz'](_0x2b313e),_0x2b31['JZLwRk'][_0x171c35]=_0x2b313e):_0x2b313e=_0x23baf9,_0x2b313e;}export{OperationAbortedError,TurnFailedError,addAbortListener,createAbortAwareSemaphore,isAbortError,modelIdentityFromParts,resolveAnthropicReasoningConfig,resolveOpenAiReasoningConfig,throwIfAborted,toAbortError};
@@ -4,9 +4,10 @@ export interface JsonObject {
4
4
  }
5
5
  export type JsonValue = JsonObject | JsonPrimitive | JsonValue[];
6
6
  export type JsonSchemaType = "array" | "boolean" | "number" | "object" | "string";
7
- export interface JsonSchemaString {
7
+ export interface JsonSchemaString<TEnum extends readonly string[] | undefined = readonly string[] | undefined> {
8
8
  type: "string";
9
9
  description?: string;
10
+ enum?: TEnum;
10
11
  }
11
12
  export interface JsonSchemaNumber {
12
13
  type: "number";
@@ -22,8 +23,12 @@ export interface JsonSchemaObject<TProperties extends Record<string, JsonSchema>
22
23
  type: "object";
23
24
  properties: TProperties;
24
25
  required?: TRequired;
26
+ additionalProperties?: boolean;
25
27
  }
26
- export type JsonSchema = JsonSchemaArray | JsonSchemaBoolean | JsonSchemaNumber | JsonSchemaObject | JsonSchemaString;
28
+ export interface JsonSchemaAnyOf<TVariants extends readonly JsonSchema[] = readonly JsonSchema[]> {
29
+ anyOf: TVariants;
30
+ }
31
+ export type JsonSchema = JsonSchemaAnyOf | JsonSchemaArray | JsonSchemaBoolean | JsonSchemaNumber | JsonSchemaObject | JsonSchemaString;
27
32
  export interface TextBlock {
28
33
  type: "text";
29
34
  text: string;
@@ -579,10 +584,14 @@ export interface ToolRuntime {
579
584
  executeCalls(toolCalls: ToolUseBlock[], ctx: ToolExecutionContext): Promise<ToolResult[]>;
580
585
  execute(toolCall: ToolUseBlock, ctx: ToolExecutionContext): Promise<ToolResult>;
581
586
  }
582
- export type InferJsonSchema<TSchema extends JsonSchema> = TSchema extends JsonSchemaString ? string : TSchema extends JsonSchemaNumber ? number : TSchema extends JsonSchemaBoolean ? boolean : TSchema extends JsonSchemaArray<infer TItem> ? InferJsonSchema<TItem>[] : TSchema extends JsonSchemaObject<infer TProperties, infer TRequired> ? Expand<RequiredProperties<TProperties, TRequired> & OptionalProperties<TProperties, TRequired>> : never;
587
+ export type InferJsonSchema<TSchema extends JsonSchema> = TSchema extends JsonSchemaAnyOf<infer TVariants> ? JsonSchema extends TVariants[number] ? JsonValue : InferJsonSchemaAnyOf<TVariants> : TSchema extends JsonSchemaString<infer TEnum> ? TEnum extends readonly string[] ? TEnum[number] : string : TSchema extends JsonSchemaNumber ? number : TSchema extends JsonSchemaBoolean ? boolean : TSchema extends JsonSchemaArray<infer TItem> ? InferJsonSchema<TItem>[] : TSchema extends JsonSchemaObject<infer TProperties, infer TRequired> ? Expand<RequiredProperties<TProperties, TRequired> & OptionalProperties<TProperties, TRequired>> : never;
583
588
  type Expand<TValue> = TValue extends infer TObject ? {
584
589
  [TKey in keyof TObject]: TObject[TKey];
585
590
  } : never;
591
+ type JsonSchemaObjectPropertyKeys<TSchema extends JsonSchema> = TSchema extends JsonSchemaObject<infer TProperties> ? Extract<keyof TProperties, string> : never;
592
+ type InferJsonSchemaAnyOfVariant<TVariant extends JsonSchema, TAllVariants extends JsonSchema> = TVariant extends JsonSchemaObject<infer TProperties, infer TRequired> ? Expand<RequiredProperties<TProperties, TRequired> & OptionalProperties<TProperties, TRequired> & (TVariant["additionalProperties"] extends false ? Partial<Record<Exclude<JsonSchemaObjectPropertyKeys<TAllVariants>, keyof TProperties>, never>> : Record<never, never>)> : InferJsonSchema<TVariant>;
593
+ type InferJsonSchemaAnyOfVariants<TVariant extends JsonSchema, TAllVariants extends JsonSchema> = TVariant extends JsonSchema ? InferJsonSchemaAnyOfVariant<TVariant, TAllVariants> : never;
594
+ type InferJsonSchemaAnyOf<TVariants extends readonly JsonSchema[]> = InferJsonSchemaAnyOfVariants<TVariants[number], TVariants[number]>;
586
595
  type RequiredKeyUnion<TRequired extends readonly string[] | undefined> = TRequired extends readonly string[] ? TRequired[number] : never;
587
596
  type OptionalKeyUnion<TProperties extends Record<string, JsonSchema>, TRequired extends readonly string[] | undefined> = Exclude<keyof TProperties, RequiredKeyUnion<TRequired>>;
588
597
  type RequiredProperties<TProperties extends Record<string, JsonSchema>, TRequired extends readonly string[] | undefined> = {
@@ -597,7 +606,7 @@ export type ToolGenerator<TYield extends ToolOutputValue = ToolOutputValue, TRet
597
606
  export interface ToolDefinitionLifecycle {
598
607
  acquire(): () => void;
599
608
  }
600
- export interface ToolDefinition<TInput extends JsonObject = JsonObject, TYield extends ToolOutputValue = ToolOutputValue, TReturn extends ToolOutputValue | undefined = ToolOutputValue | undefined, TSchema extends JsonSchemaObject = JsonSchemaObject> {
609
+ export interface ToolDefinition<TInput extends object = JsonObject, TYield extends ToolOutputValue = ToolOutputValue, TReturn extends ToolOutputValue | undefined = ToolOutputValue | undefined, TSchema extends JsonSchemaObject = JsonSchemaObject> {
601
610
  name: string;
602
611
  description: string;
603
612
  inputSchema: TSchema;
@@ -605,7 +614,7 @@ export interface ToolDefinition<TInput extends JsonObject = JsonObject, TYield e
605
614
  internalLifecycle?: ToolDefinitionLifecycle;
606
615
  execute(input: TInput, ctx: ToolExecutionContext): ToolGenerator<TYield, TReturn>;
607
616
  }
608
- export type AnyToolDefinition = ToolDefinition<JsonObject, ToolOutputValue, ToolOutputValue | undefined, JsonSchemaObject>;
617
+ export type AnyToolDefinition = ToolDefinition<object, ToolOutputValue, ToolOutputValue | undefined, JsonSchemaObject>;
609
618
  export type TransformableStage = "afterModelResponse" | "afterToolResult" | "beforeAssistantAppend" | "beforeFinalOutput" | "beforeModelRequest" | "beforeToolExecution" | "beforeToolResultAppend" | "onUserMessage";
610
619
  export type ObserverOnlyStage = "afterMessageAppend" | "afterTurnComplete";
611
620
  export type Stage = ObserverOnlyStage | TransformableStage;