@nuvin/agent-core 0.3.0-rc.4 → 0.3.0-rc.5

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.
@@ -6,6 +6,7 @@ export interface ModelProfile {
6
6
  reasoning?: ModelReasoningConfig;
7
7
  surface?: ChatModelSurface;
8
8
  baseUrl?: string;
9
+ forceStreaming?: boolean;
9
10
  }
10
11
  export interface ProviderProfile {
11
12
  label?: string;
@@ -17,6 +18,7 @@ export interface ProviderProfile {
17
18
  defaultModel?: string;
18
19
  defaultModels: string[];
19
20
  supportsModelFetch: boolean;
21
+ forceStreaming?: boolean;
20
22
  models: Record<string, ModelProfile>;
21
23
  }
22
24
  export interface ResolvedModelProfile {
@@ -29,6 +31,7 @@ export interface ResolvedModelProfile {
29
31
  defaultModel?: string;
30
32
  defaultModels?: string[];
31
33
  supportsModelFetch?: boolean;
34
+ forceStreaming?: boolean;
32
35
  contextWindow?: number;
33
36
  maxOutput?: number;
34
37
  reasoning?: ModelReasoningConfig;
@@ -22,6 +22,8 @@ export interface OpenAiModelOptions extends Partial<BaseChatModelOptions> {
22
22
  chatCompletionsPath?: string;
23
23
  responsesPath?: string;
24
24
  fetch?: typeof globalThis.fetch;
25
+ /** Force `stream: true` even for non-streaming requests (backend is SSE-only). */
26
+ forceStreaming?: boolean;
25
27
  providerSessionResolver?: ProviderSessionResolver;
26
28
  promptCacheKeyResolver?: OpenAiPromptCacheKeyResolver;
27
29
  requestMutators?: ProviderRequestMutator[];
@@ -32,6 +34,7 @@ export interface OpenAiModelOptions extends Partial<BaseChatModelOptions> {
32
34
  export declare class OpenAiModel extends RoutedModel {
33
35
  private readonly responsesSocketSessions;
34
36
  private readonly promptCacheKeyResolver?;
37
+ private readonly forceStreaming;
35
38
  protected readonly chatCompletionsPath: string;
36
39
  protected readonly responsesPath: string;
37
40
  constructor(options?: OpenAiModelOptions);
@@ -1 +1 @@
1
- (function(_0x50ec99,_0x2d6cd5){const _0x5f379f={_0x4a65a1:0x55b,_0x1d0d52:0x55a,_0x402795:0x56e,_0x20b1b3:0x56d,_0x3b9c6c:0x56f,_0x3a88ef:0x429,_0x270186:0x42c,_0x44aecc:0x435,_0x40e07a:0x569,_0x35f876:0x427,_0x262cc5:0x42e,_0x3db25d:0x423,_0x4974d4:0x424,_0x5aca7f:0x55f,_0x259a5a:0x560,_0x3b798d:0x555,_0x13172c:0x563,_0x2b8f2c:0x56b,_0x2186bc:0x419,_0x172b5e:0x41d,_0x4ebe34:0x428,_0x3b2c97:0x425},_0x512a0e={_0x630ebc:0x295};function _0x305d10(_0x5db3ad,_0x497cbc,_0x488b65,_0x2cf896){return _0x509d(_0x5db3ad-0x3d7,_0x497cbc);}const _0x23e4b8=_0x50ec99();function _0x47ffd9(_0x5b4f76,_0x4311d4,_0x3e909d,_0x2acf99){return _0x509d(_0x5b4f76-_0x512a0e._0x630ebc,_0x2acf99);}while(!![]){try{const _0x3c345e=-parseInt(_0x305d10(_0x5f379f._0x4a65a1,0x564,0x568,_0x5f379f._0x1d0d52))/0x1+parseInt(_0x305d10(0x567,0x566,_0x5f379f._0x402795,_0x5f379f._0x20b1b3))/0x2*(parseInt(_0x305d10(0x562,0x564,_0x5f379f._0x3b9c6c,_0x5f379f._0x3b9c6c))/0x3)+parseInt(_0x47ffd9(_0x5f379f._0x3a88ef,_0x5f379f._0x270186,_0x5f379f._0x44aecc,0x435))/0x4+-parseInt(_0x305d10(0x560,0x558,_0x5f379f._0x40e07a,0x563))/0x5*(-parseInt(_0x47ffd9(_0x5f379f._0x35f876,_0x5f379f._0x262cc5,_0x5f379f._0x3db25d,_0x5f379f._0x4974d4))/0x6)+-parseInt(_0x305d10(_0x5f379f._0x5aca7f,_0x5f379f._0x259a5a,0x56a,_0x5f379f._0x3b798d))/0x7*(-parseInt(_0x47ffd9(0x417,0x411,0x416,0x40f))/0x8)+-parseInt(_0x305d10(_0x5f379f._0x13172c,0x56a,_0x5f379f._0x4a65a1,_0x5f379f._0x4a65a1))/0x9*(parseInt(_0x305d10(0x566,0x55e,0x562,_0x5f379f._0x2b8f2c))/0xa)+parseInt(_0x47ffd9(0x416,_0x5f379f._0x2186bc,0x41f,_0x5f379f._0x172b5e))/0xb*(-parseInt(_0x47ffd9(_0x5f379f._0x4ebe34,0x429,_0x5f379f._0x3b2c97,0x427))/0xc);if(_0x3c345e===_0x2d6cd5)break;else _0x23e4b8['push'](_0x23e4b8['shift']());}catch(_0x93a3b2){_0x23e4b8['push'](_0x23e4b8['shift']());}}}(_0x496d,0x443e8));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 _0x509d(_0x4f4347,_0xcc2911){_0x4f4347=_0x4f4347-0x181;const _0x496df2=_0x496d();let _0x509d08=_0x496df2[_0x4f4347];if(_0x509d['NXjsEM']===undefined){var _0x4bc96e=function(_0x1d6a33){const _0x4d43c7='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x4376d0='',_0x4dc606='';for(let _0x66793d=0x0,_0x1add49,_0x36b4ae,_0x502da2=0x0;_0x36b4ae=_0x1d6a33['charAt'](_0x502da2++);~_0x36b4ae&&(_0x1add49=_0x66793d%0x4?_0x1add49*0x40+_0x36b4ae:_0x36b4ae,_0x66793d++%0x4)?_0x4376d0+=String['fromCharCode'](0xff&_0x1add49>>(-0x2*_0x66793d&0x6)):0x0){_0x36b4ae=_0x4d43c7['indexOf'](_0x36b4ae);}for(let _0x46dfc4=0x0,_0x529b68=_0x4376d0['length'];_0x46dfc4<_0x529b68;_0x46dfc4++){_0x4dc606+='%'+('00'+_0x4376d0['charCodeAt'](_0x46dfc4)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x4dc606);};_0x509d['ZhVorf']=_0x4bc96e,_0x509d['vRSIve']={},_0x509d['NXjsEM']=!![];}const _0x2abd4e=_0x496df2[0x0],_0x4d3cf9=_0x4f4347+_0x2abd4e,_0x6ab552=_0x509d['vRSIve'][_0x4d3cf9];return!_0x6ab552?(_0x509d08=_0x509d['ZhVorf'](_0x509d08),_0x509d['vRSIve'][_0x4d3cf9]=_0x509d08):_0x509d08=_0x6ab552,_0x509d08;}function _0x11c68e(_0x219ed3,_0x560db7,_0xe56f25,_0x5675a3){return _0x509d(_0x219ed3-0x31a,_0x5675a3);}function createAbortAwareSemaphore(_0x4376d0){const _0x55195a={_0x19e93d:0xb8,_0x4f6c8c:0xc6},_0x199ef9={_0x203406:0x1f,_0xf09298:0x22,_0x58cea2:0x23,_0x37beaf:0x2c,_0x3978d7:0x30,_0xb5a789:0x19f},_0x3d145={_0xfaff30:0x198},_0x408171={_0x3a1151:0xea},_0x8a78e8={_0x12526e:0x1ea},_0x314d0c={_0x5c3f05:0x1d2,_0x276c35:0x1e2,_0x4ecdfc:0x1d6,_0x369487:0x370,_0x34a4f0:0x37b,_0x48e181:0x1cc},_0x30900c={_0x2f3b71:0xc6,_0x1204c3:0xc0,_0x59e876:0x7},_0x52a77c={_0x419441:0x8b,_0x703e5e:0xeb,_0x745414:0x290};if(!Number['isFinite'](_0x4376d0)||!Number[_0x4f29bd(0xc6,0xd6,0xc8,0xce)](_0x4376d0)||_0x4376d0<=0x0)throw new Error(_0x4f29bd(_0x55195a._0x19e93d,_0x55195a._0x4f6c8c,0xae,0xb9));function _0x4f29bd(_0x3c6ab6,_0xd50327,_0x2cd731,_0x39dd9a){return _0x509d(_0x39dd9a- -0xcc,_0xd50327);}let _0x4dc606=0x0;const _0x66793d=[],_0x1add49=()=>{let _0x46dfc4=![];return()=>{if(_0x46dfc4)return;_0x46dfc4=!![],_0x4dc606-=0x1,_0x36b4ae();};},_0x36b4ae=()=>{function _0x4b08f6(_0x2d75fe,_0x31b139,_0x1d5ef5,_0x4a4b60){return _0x4f29bd(_0x2d75fe-_0x52a77c._0x419441,_0x31b139,_0x1d5ef5-_0x52a77c._0x703e5e,_0x4a4b60- -_0x52a77c._0x745414);}function _0x48dd8a(_0x318d05,_0x2b4d6e,_0x46add2,_0x40c91a){return _0x14890b(_0x46add2,_0x2b4d6e-_0x30900c._0x2f3b71,_0x46add2-_0x30900c._0x1204c3,_0x40c91a-_0x30900c._0x59e876);}while(_0x66793d[_0x4b08f6(-_0x314d0c._0x5c3f05,-0x1d4,-_0x314d0c._0x276c35,-_0x314d0c._0x4ecdfc)]>0x0){const _0x529b68=_0x66793d[_0x48dd8a(_0x314d0c._0x369487,0x374,0x36f,_0x314d0c._0x34a4f0)]();if(!_0x529b68||_0x529b68['cancelled'])continue;_0x529b68['cancelled']=!![],_0x529b68['removeAbortListener'](),_0x4dc606+=0x1,_0x529b68[_0x4b08f6(-0x1cc,-_0x314d0c._0x48e181,-0x1ca,-0x1ce)](_0x1add49());return;}};function _0x14890b(_0x4b67c4,_0xed71b9,_0x53c413,_0x27a806){return _0x509d(_0x27a806-_0x8a78e8._0x12526e,_0x4b67c4);}const _0x502da2=()=>{if(_0x4dc606>=_0x4376d0)return void 0x0;return _0x4dc606+=0x1,_0x1add49();};return{'tryAcquire':_0x502da2,'acquire'(_0x3fd245){const _0x2eb0ed={_0x1d0aa3:0xf3,_0x4cc138:0xe1,_0x2be143:0xe5,_0x187e79:0xec},_0x3a96b1={_0x4c5832:0xb8,_0x1ec0c8:0xa2,_0x38a4e0:0xa7,_0x5dc2ba:0xa4,_0x394024:0x1c8,_0x3e0eda:0x1d5,_0x3df323:0x1bf,_0x220a00:0x1d6,_0x1b394f:0x1ca,_0x527754:0x1cc,_0x42f8e2:0x1dc,_0x301bca:0x1e7};function _0x59aa09(_0x705eb7,_0x3c92b4,_0x34c342,_0x4a8ea3){return _0x4f29bd(_0x705eb7-0x3f,_0x3c92b4,_0x34c342-0x14a,_0x705eb7-_0x408171._0x3a1151);}if(_0x3fd245?.[_0x1f58d3(-_0x199ef9._0x203406,-0x22,-0x1b,-_0x199ef9._0xf09298)])return Promise[_0x1f58d3(-0x21,-0x1b,-0x21,-_0x199ef9._0x58cea2)](toAbortError(_0x3fd245[_0x1f58d3(-_0x199ef9._0x37beaf,-_0x199ef9._0x37beaf,-0x24,-_0x199ef9._0x3978d7)]));const _0x2bbf06=_0x502da2();if(_0x2bbf06!==void 0x0)return Promise[_0x59aa09(0x1ac,0x1b0,0x1b7,_0x199ef9._0xb5a789)](_0x2bbf06);function _0x1f58d3(_0x48fb2a,_0x3c2fc1,_0x238163,_0x5911d0){return _0x14890b(_0x238163,_0x3c2fc1-_0x3d145._0xfaff30,_0x238163-0x1ba,_0x3c2fc1- -0x39d);}return new Promise((_0x4db447,_0x3a2f86)=>{const _0x5ea060={_0x286c0c:0x359,_0xaa4439:0x164};function _0xef5ff5(_0x89fea1,_0x4745b8,_0x3aa378,_0xc792ff){return _0x59aa09(_0x4745b8-_0x5ea060._0x286c0c,_0x89fea1,_0x3aa378-_0x5ea060._0xaa4439,_0xc792ff-0xc3);}const _0x6887a9={'resolve':_0x4db447,'reject':_0x3a2f86,'cancelled':![],'removeAbortListener':()=>{}};_0x66793d[_0x419bf7(_0x2eb0ed._0x1d0aa3,0xf4,0xea,0xef)](_0x6887a9);function _0x419bf7(_0x4f17ea,_0x38ddbd,_0x14c1b1,_0x3e2434){return _0x59aa09(_0x14c1b1- -0xcb,_0x3e2434,_0x14c1b1-0xa5,_0x3e2434-0x3b);}_0x6887a9[_0x419bf7(_0x2eb0ed._0x4cc138,_0x2eb0ed._0x2be143,_0x2eb0ed._0x187e79,_0x2eb0ed._0x4cc138)]=addAbortListener(_0x3fd245,()=>{const _0x53fa32={_0xa5057b:0xe3},_0x14c3d2={_0x25722b:0x41};if(_0x6887a9['cancelled'])return;_0x6887a9['cancelled']=!![];function _0x2ea7d6(_0x5d96b1,_0x4ad666,_0x29fcc2,_0x347a7d){return _0x419bf7(_0x5d96b1-0x1c3,_0x4ad666-0x68,_0x5d96b1- -_0x14c3d2._0x25722b,_0x347a7d);}function _0x48339a(_0x4376e0,_0x7f3092,_0x348838,_0xdecd4f){return _0x419bf7(_0x4376e0-_0x53fa32._0xa5057b,_0x7f3092-0x187,_0x348838- -0x2b5,_0xdecd4f);}_0x6887a9[_0x2ea7d6(0xab,_0x3a96b1._0x4c5832,_0x3a96b1._0x1ec0c8,0xa1)]();const _0xb6d437=_0x66793d[_0x2ea7d6(_0x3a96b1._0x38a4e0,0xac,_0x3a96b1._0x5dc2ba,0xab)](_0x6887a9);if(_0xb6d437>=0x0)_0x66793d[_0x48339a(-0x1c9,-_0x3a96b1._0x394024,-_0x3a96b1._0x3e0eda,-0x1ca)](_0xb6d437,0x1);_0x6887a9[_0x48339a(-_0x3a96b1._0x3df323,-_0x3a96b1._0x220a00,-_0x3a96b1._0x1b394f,-_0x3a96b1._0x527754)](toAbortError(_0x3fd245?.[_0x48339a(-_0x3a96b1._0x42f8e2,-_0x3a96b1._0x301bca,-0x1db,-0x1da)]));});});}};}var MESSAGE_ROLES=[_0x11c68e(0x49d,0x499,0x491,0x49d),'user'];function _0x6144b8(_0x597208,_0x58e4c0,_0x546bc9,_0x14b284){return _0x509d(_0x14b284-0x7,_0x597208);}Object[_0x6144b8(0x1aa,0x193,0x1a8,0x19d)](MESSAGE_ROLES);function _0x496d(){const _0x3c352f=['nZi3ndq0t2TUu3jK','Aw5KzxHpzG','zNjLzxPL','ChvZAa','CMvQzwn0','CMvTB3zLqwjVCNrmAxn0zw5LCG','AxnjBNrLz2vY','mtqZuMzPALvZ','nZeYDfb3s2Lc','yxnZAxn0yw50','nte0odu5Dez4suni','Bwf4q29Uy3vYCMvUy3KGBxvZDcbIzsbHigzPBML0zsbWB3nPDgL2zsbPBNrLz2vY','BgvUz3rO','CMvHC29U','mti5ntbSvfjYAxa','nvDkvefJCW','C2HPzNq','mta4mdqYowvPrwTuCa','nJy0nduYr2D2C3rq','C3bSAwnL','CMvZB2X2zq','mtbAv011Bw4','mLjbrw1qta','ywjVCNrLza','mtK5odCZmLbOA0PvvG','mtu4mZy0ueHvDe9W'];_0x496d=function(){return _0x3c352f;};return _0x496d();}export{MESSAGE_ROLES,OperationAbortedError,TurnFailedError,addAbortListener,createAbortAwareSemaphore,isAbortError,modelIdentityFromParts,resolveAnthropicReasoningConfig,resolveOpenAiReasoningConfig,throwIfAborted,toAbortError};
1
+ (function(_0x45cf20,_0x4e981d){const _0x5e3845={_0x5df0b8:0x2c3,_0x295550:0x2b7,_0x354c53:0x2c6,_0x4e017b:0x1af,_0xe7614d:0x1bd,_0xbbe857:0x2c1,_0x5b159f:0x2ae,_0x41d527:0x2b0,_0x4fae43:0x1ca,_0x19d4dc:0x1d0,_0x2fe60e:0x2be,_0x418056:0x2b7,_0x12cd7c:0x2bd,_0x2e7e53:0x1b1},_0x23601e={_0x1d1e54:0x180},_0x54062e=_0x45cf20();function _0x184d76(_0x3a2129,_0x1b229b,_0x1d2fb4,_0x3051a5){return _0x4a37(_0x3a2129-0x82,_0x3051a5);}function _0x17bd8d(_0x264281,_0x1c2d0a,_0x5da4e5,_0x4737f1){return _0x4a37(_0x264281-_0x23601e._0x1d1e54,_0x1c2d0a);}while(!![]){try{const _0x587889=parseInt(_0x17bd8d(0x2b8,0x2ae,_0x5e3845._0x5df0b8,_0x5e3845._0x295550))/0x1+-parseInt(_0x17bd8d(_0x5e3845._0x354c53,0x2c0,0x2ce,0x2ca))/0x2+parseInt(_0x184d76(0x1b8,0x1c1,0x1af,_0x5e3845._0x4e017b))/0x3*(-parseInt(_0x184d76(_0x5e3845._0xe7614d,0x1b0,0x1c3,0x1ba))/0x4)+-parseInt(_0x17bd8d(0x2b4,_0x5e3845._0xbbe857,_0x5e3845._0x5b159f,_0x5e3845._0x41d527))/0x5+parseInt(_0x184d76(_0x5e3845._0x4fae43,_0x5e3845._0x19d4dc,0x1d1,0x1c9))/0x6*(parseInt(_0x184d76(0x1cd,0x1d0,0x1c2,0x1c3))/0x7)+parseInt(_0x17bd8d(_0x5e3845._0x2fe60e,_0x5e3845._0x418056,0x2b2,0x2c1))/0x8*(parseInt(_0x17bd8d(0x2b9,_0x5e3845._0x12cd7c,0x2b6,0x2c6))/0x9)+-parseInt(_0x184d76(0x1b7,_0x5e3845._0x2e7e53,0x1be,0x1ab))/0xa;if(_0x587889===_0x4e981d)break;else _0x54062e['push'](_0x54062e['shift']());}catch(_0x4c2fd6){_0x54062e['push'](_0x54062e['shift']());}}}(_0x932f,0xc06a4));function _0x932f(){const _0x1ac0fd=['mZe4mtmWnhnvvNrsBG','Bwf4q29Uy3vYCMvUy3KGBxvZDcbIzsbHigzPBML0zsbWB3nPDgL2zsbPBNrLz2vY','CMvTB3zLqwjVCNrmAxn0zw5LCG','y2fUy2vSBgvK','ywjVCNrLza','DxnLCG','AxnjBNrLz2vY','BgvUz3rO','ndm5nteYwKToueHV','yxnZAxn0yw50','oteYEwThu2jt','CMvHC29U','zNjLzxPL','mJaZmtrSB1LbAuu','C3bSAwnL','CMvQzwn0','nJu2mJqXmg5HDu9ZzG','mteWmJm5mfbUv1DlqW','m3biBevACa','Aw5KzxHpzG','oda3nteZzujgz09Z','mJDwu0XrugS','CMvZB2X2zq','ndm5odHju0fwDLi','ChvZAa','AxngAw5PDgu'];_0x932f=function(){return _0x1ac0fd;};return _0x932f();}import{modelIdentityFromParts}from'../chunk-D5IVWJHX.js';function _0x1992e1(_0x48bb7b,_0x513c12,_0x1c361a,_0x305061){const _0x3d4e68={_0x5ba6db:0x285};return _0x4a37(_0x48bb7b- -_0x3d4e68._0x5ba6db,_0x513c12);}import{resolveAnthropicReasoningConfig,resolveOpenAiReasoningConfig}from'../chunk-IUZALP6K.js';function _0x156553(_0x4ed0d9,_0x208130,_0x311e85,_0x1ec31c){return _0x4a37(_0x4ed0d9- -0x283,_0x1ec31c);}import{TurnFailedError}from'../chunk-FFIZ6TKW.js';import{OperationAbortedError,addAbortListener,isAbortError,throwIfAborted,toAbortError}from'../chunk-X7VAACWY.js';function createAbortAwareSemaphore(_0x34a886){const _0x3b265f={_0x33d8ec:0x97,_0xcccfa1:0x8f,_0x415570:0x8c,_0x564d32:0x92,_0x43c5f7:0x90,_0x1d8d20:0x99,_0xe08fe8:0x28c,_0x584f64:0x286,_0x3e9b21:0x286},_0x10b239={_0x5a7a3f:0x25e,_0xc53d3d:0x4c3,_0x4cc11b:0x4df},_0x180979={_0x4f4481:0xc5,_0x550e8c:0xcf,_0x21b3fc:0xc3,_0x4c9762:0xcc,_0x2d9f13:0x4b7,_0x5bb249:0x4c0,_0x35e4f1:0x4ba,_0x32fdaf:0xc4,_0x2055aa:0xcd},_0x52c3af={_0x2f284d:0xcf};if(!Number[_0x9b79f5(-_0x3b265f._0x33d8ec,-_0x3b265f._0xcccfa1,-_0x3b265f._0x415570,-_0x3b265f._0x564d32)](_0x34a886)||!Number[_0x9b79f5(-_0x3b265f._0x43c5f7,-_0x3b265f._0xcccfa1,-_0x3b265f._0x1d8d20,-0x99)](_0x34a886)||_0x34a886<=0x0)throw new Error(_0x19d4bd(-_0x3b265f._0xe08fe8,-0x27b,-_0x3b265f._0x584f64,-_0x3b265f._0x3e9b21));let _0xab9489=0x0;const _0x2a3679=[];function _0x9b79f5(_0x3c0132,_0x44a6c7,_0x2d78b1,_0x16b385){return _0x4a37(_0x3c0132- -0x1d4,_0x16b385);}const _0x307bdd=()=>{let _0x425e94=![];return()=>{if(_0x425e94)return;_0x425e94=!![],_0xab9489-=0x1,_0xce6f5c();};},_0xce6f5c=()=>{function _0x2eb961(_0x1b0ad8,_0x232892,_0x3e921a,_0x1b4904){return _0x19d4bd(_0x232892,_0x232892-_0x52c3af._0x2f284d,_0x3e921a-0x5,_0x3e921a-0x34f);}function _0x465ba7(_0x4a4d5e,_0x3efda4,_0x365f75,_0x220205){return _0x19d4bd(_0x220205,_0x3efda4-0xec,_0x365f75-0x18d,_0x3efda4-0x73c);}while(_0x2a3679[_0x2eb961(_0x180979._0x4f4481,0xc9,_0x180979._0x550e8c,_0x180979._0x21b3fc)]>0x0){const _0x42f5be=_0x2a3679['shift']();if(!_0x42f5be||_0x42f5be[_0x2eb961(_0x180979._0x4c9762,0xc0,0xcb,0xd4)])continue;_0x42f5be[_0x465ba7(0x4b7,0x4b8,0x4b6,0x4bf)]=!![],_0x42f5be[_0x465ba7(0x4b0,_0x180979._0x2d9f13,_0x180979._0x5bb249,_0x180979._0x35e4f1)](),_0xab9489+=0x1,_0x42f5be[_0x2eb961(0xc4,_0x180979._0x32fdaf,0xc4,_0x180979._0x2055aa)](_0x307bdd());return;}};function _0x19d4bd(_0x204f98,_0x3de23f,_0x2131df,_0x1af53f){return _0x4a37(_0x1af53f- -0x3c5,_0x204f98);}const _0x112137=()=>{if(_0xab9489>=_0x34a886)return void 0x0;return _0xab9489+=0x1,_0x307bdd();};return{'tryAcquire':_0x112137,'acquire'(_0x54093b){const _0x494806={_0x5a45ab:0x25b,_0x168c62:0x265,_0x12a1d7:0x434,_0x1560a9:0x42f},_0x16e6cc={_0x508db5:0xf7,_0x819636:0xfe,_0x485834:0x100,_0xbddba:0xfe,_0x6c9ac0:0x10f,_0xa0220e:0x103,_0x5996dd:0xf1,_0x5961bd:0xec},_0x18280c={_0x8b6a7:0xc9},_0x10a496={_0x1b7a7d:0x2f0,_0x5f4b02:0x7e,_0x45bc88:0x71},_0x5c15c1={_0x8c03d1:0x571};function _0x1e2d4f(_0x2c055f,_0xae93aa,_0x3b1fdf,_0x516745){return _0x9b79f5(_0x516745-_0x5c15c1._0x8c03d1,_0xae93aa-0x1be,_0x3b1fdf-0x58,_0x3b1fdf);}if(_0x54093b?.[_0x5ee1f4(0x25e,_0x10b239._0x5a7a3f,0x268,0x25b)])return Promise[_0x1e2d4f(_0x10b239._0xc53d3d,0x4d7,0x4c8,0x4d0)](toAbortError(_0x54093b['reason']));const _0x20ba89=_0x112137();if(_0x20ba89!==void 0x0)return Promise[_0x1e2d4f(_0x10b239._0x4cc11b,0x4d2,0x4d1,0x4d7)](_0x20ba89);function _0x5ee1f4(_0x19dcc5,_0x282416,_0x453081,_0x346cd3){return _0x9b79f5(_0x282416-_0x10a496._0x1b7a7d,_0x282416-_0x10a496._0x5f4b02,_0x453081-_0x10a496._0x45bc88,_0x19dcc5);}return new Promise((_0x5bd17d,_0x213d89)=>{const _0x1a1ed6={_0x3e5a8c:0x3,_0x1c3116:0xc7,_0x3bd0fd:0x16d},_0xb17414={'resolve':_0x5bd17d,'reject':_0x213d89,'cancelled':![],'removeAbortListener':()=>{}};function _0x16491b(_0x5cbd53,_0x199455,_0x219a2b,_0x121a5c){return _0x5ee1f4(_0x199455,_0x219a2b-_0x1a1ed6._0x3e5a8c,_0x219a2b-_0x1a1ed6._0x1c3116,_0x121a5c-_0x1a1ed6._0x3bd0fd);}_0x2a3679[_0x16491b(_0x494806._0x5a45ab,_0x494806._0x168c62,0x25b,0x25f)](_0xb17414);function _0x59f187(_0x35774b,_0x4690c4,_0x268c91,_0x37f3f1){return _0x5ee1f4(_0x37f3f1,_0x35774b-0x1d8,_0x268c91-_0x18280c._0x8b6a7,_0x37f3f1-0x1e);}_0xb17414[_0x59f187(_0x494806._0x12a1d7,0x431,_0x494806._0x1560a9,0x43d)]=addAbortListener(_0x54093b,()=>{const _0x53181c={_0x16c6a6:0x382,_0x55b044:0x62},_0x135f13={_0x382ab5:0x354};if(_0xb17414['cancelled'])return;_0xb17414[_0x44b855(-0xfa,-0xee,-_0x16e6cc._0x508db5,-0xf4)]=!![],_0xb17414[_0x44b855(-0x102,-_0x16e6cc._0x819636,-0xf1,-0xf5)]();function _0x44b855(_0x32161e,_0x18d118,_0x4e195d,_0x2b27ac){return _0x16491b(_0x32161e-0x6a,_0x32161e,_0x2b27ac- -_0x135f13._0x382ab5,_0x2b27ac-0x168);}const _0x38ceee=_0x2a3679[_0x44b855(-0x104,-0x104,-_0x16e6cc._0x485834,-_0x16e6cc._0xbddba)](_0xb17414);if(_0x38ceee>=0x0)_0x2a3679[_0x44b855(-0x10d,-0xf6,-_0x16e6cc._0x6c9ac0,-_0x16e6cc._0xa0220e)](_0x38ceee,0x1);function _0x547337(_0x549daf,_0x36db79,_0x1c674b,_0x4cd864){return _0x59f187(_0x36db79- -_0x53181c._0x16c6a6,_0x36db79-0x7c,_0x1c674b-_0x53181c._0x55b044,_0x4cd864);}_0xb17414['reject'](toAbortError(_0x54093b?.[_0x44b855(-_0x16e6cc._0x5996dd,-0xeb,-0xf5,-_0x16e6cc._0x5961bd)]));});});}};}function _0x4a37(_0x2080fd,_0x18cf30){_0x2080fd=_0x2080fd-0x132;const _0x932fcc=_0x932f();let _0x4a37e6=_0x932fcc[_0x2080fd];if(_0x4a37['qWPluU']===undefined){var _0x378483=function(_0x3140ee){const _0x10a03d='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x34a886='',_0xab9489='';for(let _0x2a3679=0x0,_0x307bdd,_0xce6f5c,_0x112137=0x0;_0xce6f5c=_0x3140ee['charAt'](_0x112137++);~_0xce6f5c&&(_0x307bdd=_0x2a3679%0x4?_0x307bdd*0x40+_0xce6f5c:_0xce6f5c,_0x2a3679++%0x4)?_0x34a886+=String['fromCharCode'](0xff&_0x307bdd>>(-0x2*_0x2a3679&0x6)):0x0){_0xce6f5c=_0x10a03d['indexOf'](_0xce6f5c);}for(let _0x425e94=0x0,_0x42f5be=_0x34a886['length'];_0x425e94<_0x42f5be;_0x425e94++){_0xab9489+='%'+('00'+_0x34a886['charCodeAt'](_0x425e94)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0xab9489);};_0x4a37['LXGlLq']=_0x378483,_0x4a37['liWxXy']={},_0x4a37['qWPluU']=!![];}const _0x1e7a6f=_0x932fcc[0x0],_0x3e2d1c=_0x2080fd+_0x1e7a6f,_0x552859=_0x4a37['liWxXy'][_0x3e2d1c];return!_0x552859?(_0x4a37e6=_0x4a37['LXGlLq'](_0x4a37e6),_0x4a37['liWxXy'][_0x3e2d1c]=_0x4a37e6):_0x4a37e6=_0x552859,_0x4a37e6;}var MESSAGE_ROLES=[_0x156553(-0x13c,-0x130,-0x142,-0x141),_0x156553(-0x140,-0x136,-0x141,-0x142)];Object[_0x156553(-0x139,-0x12c,-0x12c,-0x131)](MESSAGE_ROLES);export{MESSAGE_ROLES,OperationAbortedError,TurnFailedError,addAbortListener,createAbortAwareSemaphore,isAbortError,modelIdentityFromParts,resolveAnthropicReasoningConfig,resolveOpenAiReasoningConfig,throwIfAborted,toAbortError};
@@ -228,6 +228,31 @@ export interface ChatResponseUsage {
228
228
  reportedCost?: ReportedModelCost;
229
229
  estimatedCost?: EstimatedModelCost;
230
230
  }
231
+ export type ModelUsageTotals = Readonly<{
232
+ totalTokens: number;
233
+ totalInputTokens: number;
234
+ totalOutputTokens: number;
235
+ totalReasoningTokens: number;
236
+ requestCount: number;
237
+ modelCallCount: number;
238
+ totalModelTimeMs: number;
239
+ totalCostUsdTicks: number;
240
+ totalReportedCostUsdTicks: number;
241
+ totalEstimatedCostUsdTicks: number;
242
+ reportedCostCallCount: number;
243
+ estimatedCostCallCount: number;
244
+ unpricedModelCallCount: number;
245
+ historicalMetricsComplete: boolean;
246
+ missingHistoricalModelCallCount: number;
247
+ }>;
248
+ export type SubagentReportMeta = Readonly<{
249
+ agentId: string;
250
+ runId: string;
251
+ turnId: string;
252
+ status: "completed" | "failed" | "aborted";
253
+ turnUsage: ModelUsageTotals;
254
+ cumulativeUsage: ModelUsageTotals;
255
+ }>;
231
256
  export interface PersistedModelCallMetricsV1 {
232
257
  version: 1;
233
258
  usage: ChatResponseUsage;
@@ -338,6 +363,8 @@ export interface TurnInput {
338
363
  system?: SystemInput;
339
364
  messages?: MessageInput[];
340
365
  message: MessageInput;
366
+ /** Keep runtime-authored input in model context without publishing it through append observers. */
367
+ transientInput?: boolean;
341
368
  submission?: AgentSubmission;
342
369
  drainSteering?: () => Promise<TurnSteeringInput[]>;
343
370
  }
@@ -420,6 +447,8 @@ export interface TurnMessageMeta {
420
447
  submissionOrigin?: "coordinator" | "agent";
421
448
  /** Canonical sender ID for an agent-origin user-role append. */
422
449
  senderAgentId?: string;
450
+ /** Trusted structured metadata for a coordinator-authored subagent report. */
451
+ subagentReport?: SubagentReportMeta;
423
452
  }
424
453
  export interface EngineChatModel {
425
454
  model: string;
@@ -492,7 +521,6 @@ export interface ToolExecutionContext extends AgentEventContext {
492
521
  askUser?: (request: AskUserQuestionRequest) => Promise<AskUserAnswers>;
493
522
  executeNestedTool?: (request: NestedToolExecutionRequest) => Promise<ToolResult>;
494
523
  beginProgramTrace?: () => Promise<ProgramTraceHandle>;
495
- setTopic?: (topic: string) => void;
496
524
  }
497
525
  export interface BashExecutionTarget {
498
526
  command: string;
@@ -713,7 +741,6 @@ export interface RunTurnDeps {
713
741
  chatModel: EngineChatModel;
714
742
  toolRuntime: ToolRuntime;
715
743
  askUser?: (request: AskUserQuestionRequest) => Promise<AskUserAnswers>;
716
- setTopic?: (topic: string) => void;
717
744
  onEvent?: AgentEventHandler;
718
745
  sessionDir?: string | (() => string | undefined);
719
746
  outputFormat?: OutputFormat;
@@ -727,6 +754,9 @@ export type AgentSubmission = Readonly<{
727
754
  }> | Readonly<{
728
755
  origin: "coordinator";
729
756
  token: string;
757
+ /** Trusted delegated report delivery whose provider text must remain verbatim. */
758
+ deliveryKind?: "subagent-report";
759
+ subagentReport?: SubagentReportMeta;
730
760
  }> | Readonly<{
731
761
  origin: "agent";
732
762
  senderAgentId: string;
@@ -744,6 +774,8 @@ export interface AgentSendOptions {
744
774
  streaming?: boolean;
745
775
  signal?: AbortSignal;
746
776
  drainSteering?: SteeringInputDrain;
777
+ /** Runtime-authored model context that must not enter ordinary transcript append observers. */
778
+ transientInput?: boolean;
747
779
  submission?: AgentSubmission;
748
780
  }
749
781
  export interface AgentOptions {
@@ -758,7 +790,6 @@ export interface AgentOptions {
758
790
  chatModel?: EngineChatModel;
759
791
  tools?: AnyToolDefinition[];
760
792
  askUser?: (request: AskUserQuestionRequest) => Promise<AskUserAnswers>;
761
- setTopic?: (topic: string) => void;
762
793
  getContextWindowLimit?: (request: ChatRequest) => number | undefined;
763
794
  sessionDir?: string | (() => string | undefined);
764
795
  outputFormat?: OutputFormat;
@@ -35,12 +35,13 @@ export * from "./session/ask-user-tool.ts";
35
35
  export * from "./session/lsp-tool.ts";
36
36
  export * from "./session/skill-tool.ts";
37
37
  export * from "./session/todo-write-tool.ts";
38
- export * from "./session/update-topic-tool.ts";
39
- export * from "./shell/background-process-registry.ts";
38
+ export * from "./shell/background-bash-controller.ts";
39
+ export * from "./shell/background-bash-process.ts";
40
40
  export * from "./shell/bash-output-tool.ts";
41
41
  export * from "./shell/bash-tool.ts";
42
42
  export * from "./shell/command-tool.ts";
43
43
  export * from "./shell/kill-shell-tool.ts";
44
+ export * from "./shell/process-tree-termination.ts";
44
45
  export * from "./web/web-fetch-tool.ts";
45
46
  export * from "./web/web-search-tool.ts";
46
47
  //# sourceMappingURL=index.d.ts.map