@nuvin/agent-core 0.2.0-rc.10 → 0.2.0-rc.12

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(_0x356b53,_0x590795){const _0x182b95={_0x51b9c8:0x2b8,_0x3f8af4:0x2a2,_0x20785e:0x2a5,_0x5beef7:0x230,_0x3b4e67:0x231,_0x1304d9:0x22f,_0x95eae0:0x29f,_0x2a3425:0x2a5,_0xd2555c:0x2ae,_0x43a158:0x298,_0x55f665:0x22c,_0x5e4002:0x23f,_0xe0cc01:0x234,_0xf2d517:0x29e,_0x3c0fef:0x2a5,_0x45cca0:0x2a0,_0x480483:0x21c,_0x35f696:0x225,_0xdf073d:0x29d,_0xbec305:0x2a4,_0xdf221c:0x29c,_0x14db03:0x2a1},_0x56871c={_0x741b31:0x227},_0x42bfb2=_0x356b53();function _0x48bd76(_0x2c6b55,_0x123d16,_0x546033,_0x1c6d8b){return _0x1a7b(_0x1c6d8b-0x1b3,_0x546033);}function _0x4f3684(_0x4091af,_0x2f25db,_0x382484,_0x41ec51){return _0x1a7b(_0x41ec51-_0x56871c._0x741b31,_0x2f25db);}while(!![]){try{const _0x38b8c3=-parseInt(_0x4f3684(0x2a9,0x2ab,_0x182b95._0x51b9c8,0x2ad))/0x1*(parseInt(_0x4f3684(_0x182b95._0x3f8af4,_0x182b95._0x20785e,0x29b,0x2a2))/0x2)+parseInt(_0x48bd76(_0x182b95._0x5beef7,_0x182b95._0x3b4e67,0x23b,_0x182b95._0x1304d9))/0x3+parseInt(_0x4f3684(_0x182b95._0x95eae0,_0x182b95._0x2a3425,_0x182b95._0xd2555c,0x2a7))/0x4*(parseInt(_0x4f3684(0x293,0x2a0,0x29e,_0x182b95._0x43a158))/0x5)+parseInt(_0x48bd76(_0x182b95._0x55f665,_0x182b95._0x5e4002,0x23f,_0x182b95._0xe0cc01))/0x6*(-parseInt(_0x4f3684(_0x182b95._0xf2d517,0x2a3,_0x182b95._0x3c0fef,_0x182b95._0x45cca0))/0x7)+-parseInt(_0x48bd76(_0x182b95._0x480483,_0x182b95._0x35f696,0x22b,0x227))/0x8+parseInt(_0x4f3684(0x29d,_0x182b95._0xdf073d,0x299,0x29a))/0x9*(parseInt(_0x4f3684(_0x182b95._0xbec305,0x29e,0x29d,_0x182b95._0xdf221c))/0xa)+-parseInt(_0x4f3684(0x298,_0x182b95._0x14db03,_0x182b95._0x95eae0,0x29d))/0xb;if(_0x38b8c3===_0x590795)break;else _0x42bfb2['push'](_0x42bfb2['shift']());}catch(_0x3b8b28){_0x42bfb2['push'](_0x42bfb2['shift']());}}}(_0x56be,0x5f63c));import{modelIdentityFromParts}from'../chunk-D5IVWJHX.js';function _0x56be(){const _0x150b55=['C3bSAwnL','ndK0ogfQEwnyuq','mty2mMzQwMLMBW','ChvZAa','Bwf4q29Uy3vYCMvUy3KGBxvZDcbIzsbHigzPBML0zsbWB3nPDgL2zsbPBNrLz2vY','AxngAw5PDgu','ywjVCNrLza','n1HhyvPVDG','y2fUy2vSBgvK','mZe0mfvHA2DKzG','AxnjBNrLz2vY','mJu0nZLlzLHdtLa','mJG2ndG2ngXQsMrjzq','mZmWzhjlCxjK','nZuWndq2ngXdB3bLvq','CMvTB3zLqwjVCNrmAxn0zw5LCG','CMvHC29U','mZCXExnnr2Th','CMvZB2X2zq','ndeYodHPquLUue0','mJe1otKZnensy2jlzW','BgvUz3rO','CMvQzwn0'];_0x56be=function(){return _0x150b55;};return _0x56be();}import{resolveAnthropicReasoningConfig,resolveOpenAiReasoningConfig}from'../chunk-IUZALP6K.js';function _0x1a7b(_0x1d1df3,_0x3cc141){_0x1d1df3=_0x1d1df3-0x70;const _0x56be5b=_0x56be();let _0x1a7bd8=_0x56be5b[_0x1d1df3];if(_0x1a7b['xJhRoT']===undefined){var _0x77f554=function(_0x165bf4){const _0x534a62='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x23b13b='',_0x5a9669='';for(let _0x5af117=0x0,_0x5d35fb,_0x9dad85,_0x508b06=0x0;_0x9dad85=_0x165bf4['charAt'](_0x508b06++);~_0x9dad85&&(_0x5d35fb=_0x5af117%0x4?_0x5d35fb*0x40+_0x9dad85:_0x9dad85,_0x5af117++%0x4)?_0x23b13b+=String['fromCharCode'](0xff&_0x5d35fb>>(-0x2*_0x5af117&0x6)):0x0){_0x9dad85=_0x534a62['indexOf'](_0x9dad85);}for(let _0x4d6e27=0x0,_0x4981ba=_0x23b13b['length'];_0x4d6e27<_0x4981ba;_0x4d6e27++){_0x5a9669+='%'+('00'+_0x23b13b['charCodeAt'](_0x4d6e27)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x5a9669);};_0x1a7b['UdLlbN']=_0x77f554,_0x1a7b['tyIuMS']={},_0x1a7b['xJhRoT']=!![];}const _0x19ab5a=_0x56be5b[0x0],_0x23fc70=_0x1d1df3+_0x19ab5a,_0x541a36=_0x1a7b['tyIuMS'][_0x23fc70];return!_0x541a36?(_0x1a7bd8=_0x1a7b['UdLlbN'](_0x1a7bd8),_0x1a7b['tyIuMS'][_0x23fc70]=_0x1a7bd8):_0x1a7bd8=_0x541a36,_0x1a7bd8;}import{TurnFailedError}from'../chunk-FFIZ6TKW.js';import{OperationAbortedError,addAbortListener,isAbortError,throwIfAborted,toAbortError}from'../chunk-X7VAACWY.js';function createAbortAwareSemaphore(_0x23b13b){const _0x22a76e={_0x469a34:0x1a8,_0x570fc1:0x194,_0x324c8e:0x284,_0x403bf8:0x28e,_0x510799:0x28b},_0x1763eb={_0x58c201:0x2c0,_0x1c8f47:0x2c0,_0x21d6ef:0x2c6,_0x1326a8:0x2c8,_0x5743bc:0x18f,_0x370b07:0x18d,_0x37590d:0x18e,_0x4dc52c:0x2c1},_0x4e0546={_0x45950a:0x66,_0x3c0141:0x85,_0x2ed82c:0x87,_0x579a74:0x7d,_0x2b3ca0:0x75,_0x27f9cc:0x71,_0x30564e:0x7d,_0x1121c4:0x71,_0x3762ff:0x76},_0xac4afe={_0x367bce:0x1c4,_0x42ad18:0x5f9},_0x387a46={_0x5d0319:0x11c};if(!Number[_0x63ad76(_0x22a76e._0x469a34,0x196,0x1a0,_0x22a76e._0x570fc1)](_0x23b13b)||!Number[_0x1d0522(-_0x22a76e._0x324c8e,-0x28c,-_0x22a76e._0x403bf8,-_0x22a76e._0x510799)](_0x23b13b)||_0x23b13b<=0x0)throw new Error(_0x63ad76(0x195,0x19c,0x19f,0x1a7));let _0x5a9669=0x0;const _0x5af117=[],_0x5d35fb=()=>{let _0x508b06=![];return()=>{if(_0x508b06)return;_0x508b06=!![],_0x5a9669-=0x1,_0x9dad85();};};function _0x63ad76(_0x5aef93,_0x699e1c,_0x30c53b,_0x330c11){return _0x1a7b(_0x30c53b-_0x387a46._0x5d0319,_0x330c11);}const _0x9dad85=()=>{const _0x5c1663={_0x133fe8:0xa4};function _0x412f85(_0x218c0b,_0x23a791,_0x59f72b,_0x285af0){return _0x1d0522(_0x218c0b-_0xac4afe._0x367bce,_0x285af0-_0xac4afe._0x42ad18,_0x59f72b-0xc2,_0x23a791);}function _0x4321f2(_0xbbfc80,_0x34f378,_0x52debf,_0x25c282){return _0x63ad76(_0xbbfc80-_0x5c1663._0x133fe8,_0x34f378-0x1d8,_0x25c282- -0x209,_0x34f378);}while(_0x5af117[_0x4321f2(-0x6c,-0x71,-_0x4e0546._0x45950a,-0x70)]>0x0){const _0x4d6e27=_0x5af117['shift']();if(!_0x4d6e27||_0x4d6e27[_0x4321f2(-_0x4e0546._0x3c0141,-0x7c,-_0x4e0546._0x2ed82c,-_0x4e0546._0x579a74)])continue;_0x4d6e27[_0x4321f2(-_0x4e0546._0x2b3ca0,-0x81,-_0x4e0546._0x27f9cc,-_0x4e0546._0x30564e)]=!![],_0x4d6e27[_0x4321f2(-0x7b,-0x77,-_0x4e0546._0x1121c4,-_0x4e0546._0x3762ff)](),_0x5a9669+=0x1,_0x4d6e27['resolve'](_0x5d35fb());return;}};function _0x1d0522(_0x2f91bb,_0x4f962e,_0x198457,_0x23b4f4){return _0x1a7b(_0x4f962e- -0x2fe,_0x23b4f4);}return{'acquire'(_0x4981ba){const _0x2f17b4={_0xed0692:0x128,_0x249629:0x124},_0x138c10={_0xc21bba:0xc,_0x380654:0xb,_0x45c40f:0x0,_0x4ebb58:0x202,_0x7b61dd:0x10,_0x5c4476:0x6,_0x47dfb3:0x3,_0x5e5d8e:0xd,_0x3a2dca:0x3,_0x4b3e46:0x8},_0x235efc={_0x299b20:0x179,_0x45bee1:0xc},_0x5b7356={_0x48d2f9:0xab,_0x131c72:0x47,_0x14c728:0x28};function _0x1a3d9c(_0x478b18,_0x5a0adb,_0x3e900e,_0x557be2){return _0x1d0522(_0x478b18-_0x5b7356._0x48d2f9,_0x478b18- -_0x5b7356._0x131c72,_0x3e900e-_0x5b7356._0x14c728,_0x557be2);}if(_0x4981ba?.[_0x1a3d9c(-_0x1763eb._0x58c201,-0x2c7,-_0x1763eb._0x1c8f47,-_0x1763eb._0x21d6ef)])return Promise[_0x1a3d9c(-0x2c7,-_0x1763eb._0x1326a8,-0x2bd,-0x2c4)](toAbortError(_0x4981ba[_0x2d310d(0x188,_0x1763eb._0x5743bc,_0x1763eb._0x370b07,_0x1763eb._0x37590d)]));if(_0x5a9669<_0x23b13b)return _0x5a9669+=0x1,Promise[_0x1a3d9c(-0x2cb,-0x2ce,-_0x1763eb._0x4dc52c,-0x2c8)](_0x5d35fb());function _0x2d310d(_0x228691,_0x48e8bb,_0x3bd1b9,_0x2a62fc){return _0x63ad76(_0x228691-_0x235efc._0x299b20,_0x48e8bb-0x61,_0x228691- -_0x235efc._0x45bee1,_0x3bd1b9);}return new Promise((_0x64d9e6,_0x12dc6b)=>{const _0x4fcd95={_0x2d34aa:0x124},_0x7c80d8={_0xdaf987:0x1c5,_0x213fe5:0x116},_0x46ce52={_0x2d64cd:0x20c,_0x516b14:0x1aa};function _0x10d58b(_0x579113,_0x5a9f4c,_0x28d6f2,_0x153b36){return _0x1a3d9c(_0x28d6f2-0x3eb,_0x5a9f4c-0x1dd,_0x28d6f2-0x139,_0x153b36);}function _0x1fcdba(_0x3061c3,_0x178a86,_0x326b96,_0x4e601d){return _0x1a3d9c(_0x3061c3-_0x46ce52._0x2d64cd,_0x178a86-0x16b,_0x326b96-_0x46ce52._0x516b14,_0x178a86);}const _0x3c72c8={'resolve':_0x64d9e6,'reject':_0x12dc6b,'cancelled':![],'removeAbortListener':()=>{}};_0x5af117[_0x10d58b(0x12b,0x125,_0x2f17b4._0xed0692,0x131)](_0x3c72c8),_0x3c72c8[_0x10d58b(_0x2f17b4._0x249629,0x128,0x11d,0x116)]=addAbortListener(_0x4981ba,()=>{if(_0x3c72c8[_0x241e9e(_0x138c10._0xc21bba,-_0x138c10._0x380654,0xb,_0x138c10._0x45c40f)])return;_0x3c72c8[_0x146b4b(0x20a,0x201,_0x138c10._0x4ebb58,_0x138c10._0x4ebb58)]=!![],_0x3c72c8[_0x146b4b(0x207,0x204,0x205,0x209)]();function _0x241e9e(_0x2cbaba,_0x5cca14,_0x323388,_0x451f2f){return _0x10d58b(_0x2cbaba-_0x7c80d8._0xdaf987,_0x5cca14-0x38,_0x451f2f- -_0x7c80d8._0x213fe5,_0x323388);}const _0x30859c=_0x5af117['indexOf'](_0x3c72c8);if(_0x30859c>=0x0)_0x5af117[_0x241e9e(_0x138c10._0x7b61dd,0x9,_0x138c10._0x5c4476,0xf)](_0x30859c,0x1);function _0x146b4b(_0x399cd7,_0x2f1717,_0x2458f4,_0x5ea300){return _0x1fcdba(_0x5ea300-0x2cb,_0x2458f4,_0x2458f4-_0x4fcd95._0x2d34aa,_0x5ea300-0x104);}_0x3c72c8[_0x241e9e(_0x138c10._0x47dfb3,0x3,0xd,0xe)](toAbortError(_0x4981ba?.[_0x241e9e(_0x138c10._0x5e5d8e,_0x138c10._0xc21bba,-_0x138c10._0x3a2dca,_0x138c10._0x4b3e46)]));});});}};}export{OperationAbortedError,TurnFailedError,addAbortListener,createAbortAwareSemaphore,isAbortError,modelIdentityFromParts,resolveAnthropicReasoningConfig,resolveOpenAiReasoningConfig,throwIfAborted,toAbortError};
1
+ (function(_0x118ab9,_0x513ca1){const _0x2671af={_0x2b67a8:0x5a5,_0x431689:0x5ac,_0x1454f0:0x5b5,_0x91bc9e:0x5b3,_0x41e641:0x5a8,_0x4d4a38:0x5b2,_0x209d7e:0x10f,_0x8fbd1e:0x11a,_0x480dfa:0x129,_0xf76acc:0x12f,_0x5cad2c:0x118,_0x2b1f85:0x5b7,_0x423b34:0x11b,_0x4ac14a:0x5a4,_0x32ff61:0x5af,_0x5cf584:0x119,_0x5bc0ff:0x124,_0x247ca1:0x117,_0x23616b:0x5be,_0x5de682:0x5b5,_0x5bfa1f:0x5c1,_0x3fdb0c:0x136,_0x4cd3c4:0x125,_0x4496d7:0x139},_0x49ff72={_0x1cf760:0x3c6};function _0x53947d(_0x95190b,_0x380622,_0x1ab1f6,_0x26694d){return _0x763d(_0x1ab1f6-_0x49ff72._0x1cf760,_0x380622);}function _0xa7281b(_0x124e78,_0x146228,_0x30e6f8,_0x103885){return _0x763d(_0x146228- -0x30c,_0x103885);}const _0x3dfcac=_0x118ab9();while(!![]){try{const _0x4104c7=parseInt(_0x53947d(0x5aa,_0x2671af._0x2b67a8,_0x2671af._0x431689,0x5ab))/0x1*(parseInt(_0x53947d(0x5bf,_0x2671af._0x1454f0,_0x2671af._0x91bc9e,0x5b5))/0x2)+-parseInt(_0x53947d(0x5b0,_0x2671af._0x41e641,_0x2671af._0x4d4a38,0x5b7))/0x3*(parseInt(_0xa7281b(-_0x2671af._0x209d7e,-_0x2671af._0x8fbd1e,-0x119,-0x110))/0x4)+-parseInt(_0xa7281b(-_0x2671af._0x480dfa,-0x125,-_0x2671af._0xf76acc,-_0x2671af._0x5cad2c))/0x5+parseInt(_0x53947d(0x5b0,0x5be,_0x2671af._0x2b1f85,0x5b1))/0x6*(parseInt(_0xa7281b(-_0x2671af._0x423b34,-_0x2671af._0x5cad2c,-0x119,-0x11f))/0x7)+-parseInt(_0x53947d(0x59d,0x59f,_0x2671af._0x4ac14a,_0x2671af._0x32ff61))/0x8+parseInt(_0xa7281b(-_0x2671af._0x5cf584,-0x123,-_0x2671af._0x5bc0ff,-_0x2671af._0x247ca1))/0x9+-parseInt(_0x53947d(0x5aa,_0x2671af._0x23616b,_0x2671af._0x5de682,_0x2671af._0x5bfa1f))/0xa*(-parseInt(_0xa7281b(-_0x2671af._0x3fdb0c,-0x12d,-_0x2671af._0x4cd3c4,-_0x2671af._0x4496d7))/0xb);if(_0x4104c7===_0x513ca1)break;else _0x3dfcac['push'](_0x3dfcac['shift']());}catch(_0x14426f){_0x3dfcac['push'](_0x3dfcac['shift']());}}}(_0x2294,0x4b06d));import{modelIdentityFromParts}from'../chunk-D5IVWJHX.js';import{resolveAnthropicReasoningConfig,resolveOpenAiReasoningConfig}from'../chunk-IUZALP6K.js';function _0x2294(){const _0x437911=['mJntB2HjBwe','mtm2ntaWnunjreXhsq','CMvQzwn0','ndi1mte1u3vZv2PK','AxngAw5PDgu','CMvTB3zLqwjVCNrmAxn0zw5LCG','mJm5otfgAu15uNe','ntiWnZHpEfj6CMy','Bwf4q29Uy3vYCMvUy3KGBxvZDcbIzsbHigzPBML0zsbWB3nPDgL2zsbPBNrLz2vY','nJqZmhDSBw1oEG','AxnjBNrLz2vY','mJm3mZmWrgnvv2Pf','mJrrq2XhAMe','C3bSAwnL','mJfvvMHOt1C','ywjVCNrLza','CMvZB2X2zq','mZG3ndK0neH3uuL0wa','ntK1mw16vuHMBa','CMvHC29U','BgvUz3rO','y2fUy2vSBgvK','C2HPzNq','ChvZAa','Aw5KzxHpzG'];_0x2294=function(){return _0x437911;};return _0x2294();}import{TurnFailedError}from'../chunk-FFIZ6TKW.js';import{OperationAbortedError,addAbortListener,isAbortError,throwIfAborted,toAbortError}from'../chunk-X7VAACWY.js';function _0x763d(_0x489332,_0x27f6d7){_0x489332=_0x489332-0x1de;const _0x229401=_0x2294();let _0x763d01=_0x229401[_0x489332];if(_0x763d['pUJXvg']===undefined){var _0x5d8be9=function(_0x3b1d75){const _0x44b9da='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x37a10e='',_0x2a45f8='';for(let _0x39acf9=0x0,_0x3cdbae,_0x4a2230,_0x14b1dc=0x0;_0x4a2230=_0x3b1d75['charAt'](_0x14b1dc++);~_0x4a2230&&(_0x3cdbae=_0x39acf9%0x4?_0x3cdbae*0x40+_0x4a2230:_0x4a2230,_0x39acf9++%0x4)?_0x37a10e+=String['fromCharCode'](0xff&_0x3cdbae>>(-0x2*_0x39acf9&0x6)):0x0){_0x4a2230=_0x44b9da['indexOf'](_0x4a2230);}for(let _0x8b6dbd=0x0,_0x4274b7=_0x37a10e['length'];_0x8b6dbd<_0x4274b7;_0x8b6dbd++){_0x2a45f8+='%'+('00'+_0x37a10e['charCodeAt'](_0x8b6dbd)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x2a45f8);};_0x763d['MEKDAT']=_0x5d8be9,_0x763d['njuuBS']={},_0x763d['pUJXvg']=!![];}const _0x5e310d=_0x229401[0x0],_0x458e5f=_0x489332+_0x5e310d,_0x3eda89=_0x763d['njuuBS'][_0x458e5f];return!_0x3eda89?(_0x763d01=_0x763d['MEKDAT'](_0x763d01),_0x763d['njuuBS'][_0x458e5f]=_0x763d01):_0x763d01=_0x3eda89,_0x763d01;}function createAbortAwareSemaphore(_0x37a10e){const _0x51d018={_0x26f3d8:0x1e7,_0x4d44d9:0x1f1,_0x2af31c:0x1f3,_0x54612b:0x1e8,_0x44dd1c:0x1f0,_0x23e928:0x2c4},_0x3aac24={_0x5d079c:0xd4,_0x105fc4:0xd3,_0x53ddc3:0xe3,_0x5b553f:0xc7,_0x34e0a2:0xd5},_0x564a7f={_0x4a0efa:0x532,_0x54f5d2:0x534},_0x1bb071={_0x2f3874:0x1a1},_0x546fc3={_0x102ce9:0x239},_0x95ce1={_0x390aa1:0x277,_0x3d62a1:0x27e,_0x232de7:0x34f,_0x75206a:0x34a,_0x5548c0:0x278,_0x288b68:0x27d,_0x29091a:0x27e,_0x12fc6b:0x277,_0x2db9d7:0x294},_0x38819d={_0x3e7816:0x32},_0x264871={_0x511aaa:0xcc,_0x3cafad:0x14c};function _0x502dba(_0x5b1028,_0x1970d7,_0x490364,_0x5a5641){return _0x763d(_0x5a5641-0x0,_0x490364);}if(!Number[_0x502dba(0x1e9,_0x51d018._0x26f3d8,_0x51d018._0x4d44d9,0x1ea)](_0x37a10e)||!Number[_0x502dba(_0x51d018._0x2af31c,0x1f1,_0x51d018._0x54612b,_0x51d018._0x44dd1c)](_0x37a10e)||_0x37a10e<=0x0)throw new Error(_0x205ca7(_0x51d018._0x23e928,0x2c7,0x2c5,0x2c9));let _0x2a45f8=0x0;const _0x39acf9=[],_0x3cdbae=()=>{let _0x14b1dc=![];return()=>{if(_0x14b1dc)return;_0x14b1dc=!![],_0x2a45f8-=0x1,_0x4a2230();};};function _0x205ca7(_0x5c2d11,_0x46f57f,_0x825015,_0x282935){return _0x763d(_0x282935-0xdb,_0x5c2d11);}const _0x4a2230=()=>{function _0x43d343(_0x5d396f,_0x56e47b,_0x378440,_0xecdb22){return _0x205ca7(_0x378440,_0x56e47b-_0x264871._0x511aaa,_0x378440-_0x264871._0x3cafad,_0x5d396f- -0x45);}function _0x5f2d53(_0x878dc4,_0x344598,_0x30674d,_0x43b7da){return _0x205ca7(_0x878dc4,_0x344598-0x8,_0x30674d-_0x38819d._0x3e7816,_0x30674d-0x92);}while(_0x39acf9[_0x43d343(_0x95ce1._0x390aa1,0x27b,0x26a,_0x95ce1._0x3d62a1)]>0x0){const _0x8b6dbd=_0x39acf9[_0x5f2d53(0x343,_0x95ce1._0x232de7,0x350,_0x95ce1._0x75206a)]();if(!_0x8b6dbd||_0x8b6dbd['cancelled'])continue;_0x8b6dbd[_0x43d343(_0x95ce1._0x5548c0,_0x95ce1._0x288b68,_0x95ce1._0x29091a,_0x95ce1._0x12fc6b)]=!![],_0x8b6dbd['removeAbortListener'](),_0x2a45f8+=0x1,_0x8b6dbd[_0x43d343(0x28c,0x285,0x294,_0x95ce1._0x2db9d7)](_0x3cdbae());return;}};return{'acquire'(_0x4274b7){const _0x373461={_0x3b98fe:0x11e,_0x573f71:0x4f3,_0x49176c:0x504,_0x338c9b:0x4fe,_0x520bcb:0x50c,_0x33662c:0x507,_0x3b9c13:0x500,_0x3461f0:0x4f4,_0x4ea7d2:0x501,_0x16c070:0x109,_0x3550b5:0x10d,_0x44ea0d:0x113,_0x12a0a1:0x11b,_0x11ede3:0x11f},_0x1b5575={_0x1e823e:0xa2};function _0x3c77ce(_0x4cd203,_0x386b1a,_0x11098b,_0x1438ae){return _0x502dba(_0x4cd203-0xb1,_0x386b1a-0x176,_0x1438ae,_0x386b1a-_0x546fc3._0x102ce9);}if(_0x4274b7?.[_0x5cf547(-_0x3aac24._0x5d079c,-_0x3aac24._0x105fc4,-0xe1,-0xdc)])return Promise[_0x5cf547(-0xe1,-_0x3aac24._0x53ddc3,-0xe3,-0xe0)](toAbortError(_0x4274b7['reason']));if(_0x2a45f8<_0x37a10e)return _0x2a45f8+=0x1,Promise[_0x5cf547(-0xd3,-0xde,-_0x3aac24._0x5b553f,-_0x3aac24._0x34e0a2)](_0x3cdbae());function _0x5cf547(_0x1fdb7d,_0x272b8c,_0x4fb5b7,_0x25d532){return _0x205ca7(_0x272b8c,_0x272b8c-_0x1bb071._0x2f3874,_0x4fb5b7-0x172,_0x1fdb7d- -0x3a4);}return new Promise((_0x3211b6,_0x1dbea8)=>{const _0x4969de={_0x57b582:0x124,_0x3fb031:0x650},_0x5862d0={_0x285a27:0x84},_0x53a8d7={'resolve':_0x3211b6,'reject':_0x1dbea8,'cancelled':![],'removeAbortListener':()=>{}};_0x39acf9[_0x287733(0x53c,_0x564a7f._0x4a0efa,0x52a,_0x564a7f._0x54f5d2)](_0x53a8d7);function _0x287733(_0x33af37,_0x4e7944,_0x20b36e,_0x277c61){return _0x5cf547(_0x277c61-0x619,_0x20b36e,_0x20b36e-0x3e,_0x277c61-_0x1b5575._0x1e823e);}_0x53a8d7['removeAbortListener']=addAbortListener(_0x4274b7,()=>{if(_0x53a8d7[_0x3b7572(-_0x373461._0x3b98fe,-0x11c,-0x129,-0x121)])return;_0x53a8d7[_0x28c3aa(0x4f3,_0x373461._0x573f71,_0x373461._0x49176c,0x4fe)]=!![],_0x53a8d7[_0x28c3aa(_0x373461._0x338c9b,_0x373461._0x520bcb,0x50d,_0x373461._0x33662c)]();const _0x5d04d1=_0x39acf9[_0x28c3aa(_0x373461._0x3b9c13,0x501,_0x373461._0x3461f0,_0x373461._0x4ea7d2)](_0x53a8d7);function _0x28c3aa(_0xe8e8f2,_0x107de4,_0x2947c8,_0x57c2fd){return _0x287733(_0xe8e8f2-0x1de,_0x107de4-_0x5862d0._0x285a27,_0x107de4,_0x57c2fd- -0x34);}function _0x3b7572(_0x5716ba,_0x1bc043,_0x4f8af0,_0x4f56d2){return _0x287733(_0x5716ba-0x116,_0x1bc043-_0x4969de._0x57b582,_0x4f56d2,_0x5716ba- -_0x4969de._0x3fb031);}if(_0x5d04d1>=0x0)_0x39acf9[_0x3b7572(-0x10d,-_0x373461._0x16c070,-_0x373461._0x3550b5,-_0x373461._0x44ea0d)](_0x5d04d1,0x1);_0x53a8d7['reject'](toAbortError(_0x4274b7?.[_0x3b7572(-0x120,-0x129,-_0x373461._0x12a0a1,-_0x373461._0x11ede3)]));});});}};}export{OperationAbortedError,TurnFailedError,addAbortListener,createAbortAwareSemaphore,isAbortError,modelIdentityFromParts,resolveAnthropicReasoningConfig,resolveOpenAiReasoningConfig,throwIfAborted,toAbortError};
@@ -277,6 +277,9 @@ export interface OpenAiReasoningSummaryDeltaChunk {
277
277
  outputIndex: number;
278
278
  summaryIndex: number;
279
279
  }
280
+ export interface ProviderStreamResetChunk {
281
+ type: "provider_stream_reset";
282
+ }
280
283
  export interface ProviderRetryChunk {
281
284
  type: "provider_retry";
282
285
  attempt: number;
@@ -290,7 +293,7 @@ export interface DoneChunk {
290
293
  type: "done";
291
294
  response: ChatResponse;
292
295
  }
293
- export type ChatResponseChunk = AnthropicSignatureDeltaChunk | AnthropicThinkingDeltaChunk | ContentDeltaChunk | DoneChunk | OpenAiReasoningDeltaChunk | OpenAiReasoningSummaryDeltaChunk | ProviderRetryChunk | ToolUseDeltaChunk;
296
+ export type ChatResponseChunk = AnthropicSignatureDeltaChunk | AnthropicThinkingDeltaChunk | ContentDeltaChunk | DoneChunk | OpenAiReasoningDeltaChunk | OpenAiReasoningSummaryDeltaChunk | ProviderStreamResetChunk | ProviderRetryChunk | ToolUseDeltaChunk;
294
297
  export interface ModelLimits {
295
298
  contextWindow?: number;
296
299
  maxOutput?: number;
@@ -554,8 +557,14 @@ export interface AgentTurnCompleteEvent {
554
557
  state: TurnState;
555
558
  }
556
559
  export interface AgentProviderRetryEvent extends ProviderRetryChunk {
560
+ assistantMessageId: string;
561
+ }
562
+ export interface AgentProviderStreamResetEvent {
563
+ type: "provider_stream_reset";
564
+ assistantMessageId: string;
565
+ reasoningMessageId: string;
557
566
  }
558
- export type AgentLifecycleEvent = AgentAssistantChunkEvent | AgentAssistantMessageEvent | AgentFinalMessageEvent | AgentModelRequestEvent | AgentModelResponseEvent | AgentProviderRetryEvent | AgentReasoningChunkEvent | AgentReasoningMessageEvent | AgentToolCallEvent | AgentToolUseChunkEvent | AgentToolUseMessageEvent | AgentToolResultEvent | AgentToolResultMessageEvent | AgentTurnCompleteEvent | AgentUserMessageEvent;
567
+ export type AgentLifecycleEvent = AgentAssistantChunkEvent | AgentAssistantMessageEvent | AgentFinalMessageEvent | AgentModelRequestEvent | AgentModelResponseEvent | AgentProviderRetryEvent | AgentProviderStreamResetEvent | AgentReasoningChunkEvent | AgentReasoningMessageEvent | AgentToolCallEvent | AgentToolUseChunkEvent | AgentToolUseMessageEvent | AgentToolResultEvent | AgentToolResultMessageEvent | AgentTurnCompleteEvent | AgentUserMessageEvent;
559
568
  export type AgentEvent = AgentLifecycleEvent | ToolRuntimeEvent;
560
569
  export type ToolRuntimeDispatchDecision = {
561
570
  action: "reject";
@@ -1,14 +1,46 @@
1
1
  import { Agent } from "../../agent/agent.ts";
2
2
  import type { AbortAwareSemaphore } from "../../shared/abort-aware-semaphore.ts";
3
3
  import type { AgentDefinitionFactoryContext, AgentOptions } from "../../shared/types.ts";
4
+ export declare const MODEL_TIERS: readonly ["fast", "balanced", "powerful"];
5
+ export type ModelTier = (typeof MODEL_TIERS)[number];
4
6
  export interface DelegatedAgentFactoryContext extends AgentDefinitionFactoryContext {
5
7
  parentSessionId: string;
6
8
  runId: string;
7
9
  signal: AbortSignal;
10
+ modelTier?: ModelTier;
8
11
  }
9
- export type DelegatedAgentDefinition = AgentOptions | ((ctx: DelegatedAgentFactoryContext) => AgentOptions | Promise<AgentOptions>);
12
+ export type DelegatedRoutingMetadata = {
13
+ requestedModelTier: ModelTier;
14
+ agentModelSet?: string;
15
+ resolvedModelIdentity: string;
16
+ };
17
+ export type DelegatedAgentResolution = {
18
+ options: AgentOptions;
19
+ routing?: DelegatedRoutingMetadata;
20
+ };
21
+ export declare class DelegatedResolutionError extends Error {
22
+ readonly requestedModelTier: ModelTier;
23
+ readonly agentModelSet?: string;
24
+ readonly selector?: string;
25
+ constructor(message: string, metadata: {
26
+ requestedModelTier: ModelTier;
27
+ agentModelSet?: string;
28
+ selector?: string;
29
+ }, options?: ErrorOptions);
30
+ }
31
+ type DelegatedAgentFactoryResult = AgentOptions | DelegatedAgentResolution;
32
+ export type DelegatedRunOutcome = Readonly<{
33
+ status: "completed" | "failed" | "aborted";
34
+ errorMessage?: string;
35
+ }>;
36
+ export interface DelegatedRunLifecycleHooks {
37
+ start(agent: Agent, context: DelegatedAgentFactoryContext): Promise<void>;
38
+ finish(context: DelegatedAgentFactoryContext, outcome: DelegatedRunOutcome): Promise<void>;
39
+ }
40
+ export type DelegatedAgentDefinition = AgentOptions | ((ctx: DelegatedAgentFactoryContext) => DelegatedAgentFactoryResult | Promise<DelegatedAgentFactoryResult>);
10
41
  export interface CreateDelegationToolsOptions {
11
42
  agents?: Record<string, DelegatedAgentDefinition>;
43
+ lifecycle?: DelegatedRunLifecycleHooks;
12
44
  semaphore?: AbortAwareSemaphore;
13
45
  /** Register an active child for shared tool refresh; returns its cleanup callback. */
14
46
  registerActiveAgent?: (agent: Agent, context: DelegatedAgentFactoryContext) => () => void;
@@ -28,12 +60,13 @@ export interface CreateDelegationToolsOptions {
28
60
  */
29
61
  releaseAgentResources?: (context: DelegatedAgentFactoryContext) => void;
30
62
  }
31
- export declare function resolveDelegatedAgentOptions(definition: DelegatedAgentDefinition, ctx: DelegatedAgentFactoryContext): Promise<AgentOptions>;
63
+ export declare function resolveDelegatedAgentOptions(definition: DelegatedAgentDefinition, ctx: DelegatedAgentFactoryContext): Promise<DelegatedAgentResolution>;
32
64
  export declare function createAssignTaskTool(options: CreateDelegationToolsOptions): import("../../shared/types.ts").ToolDefinition<{
33
65
  description: string;
34
66
  agentId: string;
35
67
  nickname: string;
36
68
  task: string;
69
+ modelTier: "fast" | "balanced" | "powerful";
37
70
  }, import("../../shared/types.ts").ToolOutputEnvelope, import("../../shared/types.ts").ToolOutputEnvelope, {
38
71
  type: "object";
39
72
  properties: {
@@ -53,6 +86,11 @@ export declare function createAssignTaskTool(options: CreateDelegationToolsOptio
53
86
  type: "string";
54
87
  description: string;
55
88
  };
89
+ modelTier: {
90
+ type: "string";
91
+ enum: ("fast" | "balanced" | "powerful")[];
92
+ description: string;
93
+ };
56
94
  };
57
95
  required: string[];
58
96
  }>;
@@ -62,6 +100,7 @@ export declare function createDelegationTools(options: CreateDelegationToolsOpti
62
100
  agentId: string;
63
101
  nickname: string;
64
102
  task: string;
103
+ modelTier: "fast" | "balanced" | "powerful";
65
104
  }, import("../../shared/types.ts").ToolOutputEnvelope, import("../../shared/types.ts").ToolOutputEnvelope, {
66
105
  type: "object";
67
106
  properties: {
@@ -81,7 +120,13 @@ export declare function createDelegationTools(options: CreateDelegationToolsOpti
81
120
  type: "string";
82
121
  description: string;
83
122
  };
123
+ modelTier: {
124
+ type: "string";
125
+ enum: ("fast" | "balanced" | "powerful")[];
126
+ description: string;
127
+ };
84
128
  };
85
129
  required: string[];
86
130
  }>[];
131
+ export {};
87
132
  //# sourceMappingURL=runtime-manager-tools.d.ts.map