@nuvin/agent-core 0.2.0-rc.8 → 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(_0x428978,_0x24cdac){const _0x32d11a={_0x25d884:0x27d,_0xd49c93:0x283,_0x4fa62b:0x280,_0xe7488a:0x283,_0x5e5cae:0x286,_0x19e0f5:0x281,_0x2db678:0x290,_0x5b6ecd:0xa8,_0x3d4b3d:0xb6,_0x398cb9:0xb7,_0x269045:0x290,_0x2488bf:0xab,_0x42da32:0x28a,_0x2ce87d:0x27f,_0x2d47c9:0x28d,_0x291ee6:0x291},_0x4175cd={_0x21a23:0x23},_0x4c0493={_0x16150d:0x318},_0x5eccf9=_0x428978();function _0x8ef9ec(_0x5828e3,_0x3754ff,_0x482fd7,_0x56dd01){return _0x1e6e(_0x3754ff- -_0x4c0493._0x16150d,_0x482fd7);}function _0x1b5710(_0x5bba50,_0x16ca45,_0x48b04c,_0x4713d2){return _0x1e6e(_0x48b04c-_0x4175cd._0x21a23,_0x5bba50);}while(!![]){try{const _0x35dd26=parseInt(_0x8ef9ec(-0x27f,-0x281,-_0x32d11a._0x25d884,-_0x32d11a._0xd49c93))/0x1*(-parseInt(_0x8ef9ec(-_0x32d11a._0x4fa62b,-_0x32d11a._0xe7488a,-_0x32d11a._0x5e5cae,-_0x32d11a._0x19e0f5))/0x2)+-parseInt(_0x8ef9ec(-_0x32d11a._0x2db678,-0x293,-0x28f,-0x28b))/0x3*(-parseInt(_0x1b5710(_0x32d11a._0x5b6ecd,0xb1,0xb2,0xab))/0x4)+parseInt(_0x1b5710(0xb7,_0x32d11a._0x3d4b3d,_0x32d11a._0x398cb9,0xb6))/0x5*(parseInt(_0x8ef9ec(-0x28a,-0x285,-0x282,-_0x32d11a._0x269045))/0x6)+-parseInt(_0x1b5710(0xb2,0xa4,0xaf,_0x32d11a._0x2488bf))/0x7+-parseInt(_0x8ef9ec(-0x286,-0x288,-0x285,-0x292))/0x8+-parseInt(_0x8ef9ec(-_0x32d11a._0x42da32,-0x287,-0x284,-_0x32d11a._0x2ce87d))/0x9+parseInt(_0x8ef9ec(-_0x32d11a._0x2d47c9,-0x28f,-_0x32d11a._0x291ee6,-0x290))/0xa*(parseInt(_0x8ef9ec(-0x28f,-_0x32d11a._0x5e5cae,-_0x32d11a._0x291ee6,-0x27d))/0xb);if(_0x35dd26===_0x24cdac)break;else _0x5eccf9['push'](_0x5eccf9['shift']());}catch(_0x5cb6c5){_0x5eccf9['push'](_0x5eccf9['shift']());}}}(_0x4f5c,0x28bfb));import{modelIdentityFromParts}from'../chunk-D5IVWJHX.js';import{resolveAnthropicReasoningConfig,resolveOpenAiReasoningConfig}from'../chunk-IUZALP6K.js';function _0x1e6e(_0x7bb52,_0x26b348){_0x7bb52=_0x7bb52-0x84;const _0x4f5cab=_0x4f5c();let _0x1e6efd=_0x4f5cab[_0x7bb52];if(_0x1e6e['SnflGK']===undefined){var _0x192347=function(_0x1883f6){const _0x1f3ab1='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x4f9108='',_0x140652='';for(let _0x2bb637=0x0,_0x1f925f,_0x510391,_0xd2890b=0x0;_0x510391=_0x1883f6['charAt'](_0xd2890b++);~_0x510391&&(_0x1f925f=_0x2bb637%0x4?_0x1f925f*0x40+_0x510391:_0x510391,_0x2bb637++%0x4)?_0x4f9108+=String['fromCharCode'](0xff&_0x1f925f>>(-0x2*_0x2bb637&0x6)):0x0){_0x510391=_0x1f3ab1['indexOf'](_0x510391);}for(let _0x268250=0x0,_0x32c540=_0x4f9108['length'];_0x268250<_0x32c540;_0x268250++){_0x140652+='%'+('00'+_0x4f9108['charCodeAt'](_0x268250)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x140652);};_0x1e6e['ezxuRL']=_0x192347,_0x1e6e['wJiYeW']={},_0x1e6e['SnflGK']=!![];}const _0x3f418f=_0x4f5cab[0x0],_0x18ae93=_0x7bb52+_0x3f418f,_0x257044=_0x1e6e['wJiYeW'][_0x18ae93];return!_0x257044?(_0x1e6efd=_0x1e6e['ezxuRL'](_0x1e6efd),_0x1e6e['wJiYeW'][_0x18ae93]=_0x1e6efd):_0x1e6efd=_0x257044,_0x1e6efd;}import{TurnFailedError}from'../chunk-FFIZ6TKW.js';import{OperationAbortedError,addAbortListener,isAbortError,throwIfAborted,toAbortError}from'../chunk-X7VAACWY.js';function createAbortAwareSemaphore(_0x4f9108){const _0x282656={_0xa904dc:0x29,_0x2ed539:0x2d,_0x57b7e1:0x1dd,_0xd2e9e:0x1d6,_0x42f04d:0x1dc},_0x34ec02={_0x58a3f0:0x45c,_0x3dee4b:0x451,_0x47df99:0x467,_0x3e7b7e:0x46e,_0x46eb78:0x46c,_0x1904a0:0x462,_0x3b2d70:0x45a},_0x3d37c3={_0x4586c3:0x248,_0x33fd65:0x24b,_0x8c0e85:0x22d,_0x5f3e6d:0x238,_0xcecd4d:0x232,_0x2f38cf:0x393,_0x5c69c0:0x389},_0x192c33={_0x5a179b:0xe0,_0x1a05dc:0x88,_0x12316a:0x56e},_0x46f33b={_0x25a4d5:0x266},_0x1d0074={_0x4a09a3:0x57};if(!Number[_0x557e2c(_0x282656._0xa904dc,_0x282656._0x2ed539,0x2b,0x34)](_0x4f9108)||!Number[_0x205482(-_0x282656._0x57b7e1,-0x1d7,-_0x282656._0xd2e9e,-_0x282656._0x42f04d)](_0x4f9108)||_0x4f9108<=0x0)throw new Error('maxConcurrency\x20must\x20be\x20a\x20finite\x20positive\x20integer');function _0x557e2c(_0xeaf149,_0x3dbd40,_0x1b3388,_0x152073){return _0x1e6e(_0x3dbd40- -_0x1d0074._0x4a09a3,_0x152073);}let _0x140652=0x0;function _0x205482(_0x3c9a05,_0x3c842a,_0x6eb1a9,_0x5025ec){return _0x1e6e(_0x5025ec- -_0x46f33b._0x25a4d5,_0x3c9a05);}const _0x2bb637=[],_0x1f925f=()=>{let _0xd2890b=![];return()=>{if(_0xd2890b)return;_0xd2890b=!![],_0x140652-=0x1,_0x510391();};},_0x510391=()=>{const _0x57d3cd={_0x5b5b5b:0x172,_0xdeb178:0x272,_0x1bdbdf:0x12d};function _0x265b5f(_0x3168d3,_0x5e18f7,_0x2d3454,_0x158299){return _0x557e2c(_0x3168d3-_0x57d3cd._0x5b5b5b,_0x158299- -_0x57d3cd._0xdeb178,_0x2d3454-_0x57d3cd._0x1bdbdf,_0x2d3454);}function _0x46bdd4(_0x4d53d6,_0x3c7c18,_0x6c4069,_0x442482){return _0x205482(_0x442482,_0x3c7c18-_0x192c33._0x5a179b,_0x6c4069-_0x192c33._0x1a05dc,_0x6c4069-_0x192c33._0x12316a);}while(_0x2bb637[_0x265b5f(-0x238,-_0x3d37c3._0x4586c3,-_0x3d37c3._0x33fd65,-0x242)]>0x0){const _0x268250=_0x2bb637[_0x265b5f(-_0x3d37c3._0x8c0e85,-_0x3d37c3._0x5f3e6d,-_0x3d37c3._0xcecd4d,-0x230)]();if(!_0x268250||_0x268250[_0x46bdd4(_0x3d37c3._0x2f38cf,0x39e,0x393,0x39e)])continue;_0x268250['cancelled']=!![],_0x268250['removeAbortListener'](),_0x140652+=0x1,_0x268250[_0x46bdd4(0x398,0x38b,0x38e,_0x3d37c3._0x5c69c0)](_0x1f925f());return;}};return{'acquire'(_0x32c540){const _0x178e24={_0x86e920:0x3,_0x1b8ea2:0xd,_0x291829:0x8,_0x33084c:0x2,_0x56b70d:0x9,_0xb232fc:0x4},_0x25c96c={_0x7a443f:0x1e4,_0xab5a64:0x1f4,_0x4a18af:0x1f1,_0x52ec6d:0x1ee,_0x4659e2:0x1ec,_0x387242:0x1f2,_0x26b5cc:0x2db,_0x2e12ca:0x2dd},_0x18fa99={_0x94f320:0x464,_0x472e52:0x3},_0x2f3e08={_0xa27e4c:0x15e},_0x26b1b8={_0x258bfd:0x2de,_0x143e85:0x164};function _0x38af2e(_0x3d8583,_0x5ef3d1,_0x5b9e19,_0x2a64a4){return _0x557e2c(_0x3d8583-0x1d1,_0x2a64a4-_0x26b1b8._0x258bfd,_0x5b9e19-_0x26b1b8._0x143e85,_0x5b9e19);}if(_0x32c540?.['aborted'])return Promise[_0x341fa8(0x456,_0x34ec02._0x58a3f0,_0x34ec02._0x3dee4b,_0x34ec02._0x47df99)](toAbortError(_0x32c540[_0x341fa8(_0x34ec02._0x3e7b7e,_0x34ec02._0x46eb78,_0x34ec02._0x1904a0,0x46e)]));function _0x341fa8(_0x553976,_0x2cb7a9,_0x4102cb,_0x5ba33a){return _0x205482(_0x5ba33a,_0x2cb7a9-0xd0,_0x4102cb-_0x2f3e08._0xa27e4c,_0x2cb7a9-0x63a);}if(_0x140652<_0x4f9108)return _0x140652+=0x1,Promise[_0x341fa8(_0x34ec02._0x58a3f0,_0x34ec02._0x3b2d70,0x451,0x451)](_0x1f925f());return new Promise((_0x17322c,_0x2371aa)=>{function _0x954e77(_0x3630c2,_0x47800f,_0x3f686b,_0x63169b){return _0x341fa8(_0x3630c2-0x1bf,_0x47800f- -_0x18fa99._0x94f320,_0x3f686b-_0x18fa99._0x472e52,_0x63169b);}const _0x564e2e={'resolve':_0x17322c,'reject':_0x2371aa,'cancelled':![],'removeAbortListener':()=>{}};_0x2bb637[_0x954e77(0x2,-_0x178e24._0x86e920,-_0x178e24._0x1b8ea2,-0x8)](_0x564e2e);function _0x5e0c06(_0x5d09cd,_0x9ccc06,_0x29f24a,_0xd43e1f){return _0x341fa8(_0x5d09cd-0x76,_0x5d09cd- -0x154,_0x29f24a-0x73,_0x9ccc06);}_0x564e2e[_0x954e77(_0x178e24._0x291829,-_0x178e24._0x33084c,-_0x178e24._0x56b70d,-_0x178e24._0xb232fc)]=addAbortListener(_0x32c540,()=>{const _0x27fefc={_0x2003d3:0x25},_0xed0a87={_0x2efa3b:0x1a7,_0x16d561:0xd8};if(_0x564e2e[_0x2d4850(-0x1e8,-0x1ef,-_0x25c96c._0x7a443f,-_0x25c96c._0xab5a64)])return;_0x564e2e[_0x2d4850(-_0x25c96c._0x4a18af,-0x1ef,-0x1eb,-0x1e8)]=!![],_0x564e2e[_0x2d4850(-_0x25c96c._0x52ec6d,-_0x25c96c._0x4659e2,-0x1e8,-_0x25c96c._0x387242)]();const _0x1004b4=_0x2bb637[_0x52e933(0x2e6,0x2d9,_0x25c96c._0x26b5cc,0x2e3)](_0x564e2e);function _0x52e933(_0x4d52a1,_0x4138a4,_0x430609,_0x4b496f){return _0x954e77(_0x4d52a1-_0xed0a87._0x2efa3b,_0x430609-0x2d5,_0x430609-_0xed0a87._0x16d561,_0x4b496f);}if(_0x1004b4>=0x0)_0x2bb637['splice'](_0x1004b4,0x1);function _0x2d4850(_0x471c0b,_0x126e92,_0x3d0a3d,_0x2dea71){return _0x5e0c06(_0x126e92- -0x4fa,_0x2dea71,_0x3d0a3d-_0x27fefc._0x2003d3,_0x2dea71-0x168);}_0x564e2e[_0x2d4850(-0x1fa,-0x1f2,-_0x25c96c._0x4a18af,-0x1e8)](toAbortError(_0x32c540?.[_0x52e933(0x2e5,0x2e8,_0x25c96c._0x2e12ca,_0x25c96c._0x2e12ca)]));});});}};}export{OperationAbortedError,TurnFailedError,addAbortListener,createAbortAwareSemaphore,isAbortError,modelIdentityFromParts,resolveAnthropicReasoningConfig,resolveOpenAiReasoningConfig,throwIfAborted,toAbortError};function _0x4f5c(){const _0xa5556c=['ndK5mZbQBu5ny3q','AxnjBNrLz2vY','y2fUy2vSBgvK','mtC0ntGWn29sz1jdtq','ChvZAa','CMvTB3zLqwjVCNrmAxn0zw5LCG','mZq3ndi4thfJrg5p','ndu5mJGWB093z2HA','nZC3otG3EM5orMvX','oteZueD2uejJ','mtHdAxfZsxm','mJK0nJeWrufbB2H6','mJm1nZyYzwLrAwTq','Aw5KzxHpzG','mwngvwrrAG','CMvHC29U','C2HPzNq','AxngAw5PDgu','m29WA2jUDq','CMvZB2X2zq','BgvUz3rO','CMvQzwn0'];_0x4f5c=function(){return _0xa5556c;};return _0x4f5c();}
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;