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

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(_0x31e031,_0x3987e2){const _0x37d81e={_0x7bb21a:0x350,_0x1f31aa:0x340,_0x3277e1:0x34a,_0x2d6d32:0x35f,_0x1c130b:0x4a2,_0x3809d5:0x4aa,_0x5aaae7:0x4a4,_0x208c0b:0x4a6,_0x4c18b0:0x4ad,_0x34c095:0x4b4,_0x3cdaf8:0x4b0,_0x3f7e79:0x4bd,_0x2be9ce:0x356,_0x3c756c:0x345,_0x37be37:0x34f,_0x4f7292:0x35a,_0x3e4e91:0x359,_0x403d4c:0x35e,_0x261a3f:0x361,_0x2055f6:0x49d,_0x1dd9b7:0x4ab},_0x3d180f={_0x5a11a8:0x2ce},_0x2f5894={_0x512aa3:0x177},_0x363d66=_0x31e031();function _0x3b4603(_0xd100e8,_0x440221,_0x2f48f2,_0x3af478){return _0x2dbe(_0x3af478-_0x2f5894._0x512aa3,_0x2f48f2);}function _0x52fcd7(_0x1d4505,_0x43e14d,_0x4fef5e,_0x5c1a61){return _0x2dbe(_0x1d4505-_0x3d180f._0x5a11a8,_0x43e14d);}while(!![]){try{const _0x3598e6=-parseInt(_0x3b4603(_0x37d81e._0x7bb21a,_0x37d81e._0x1f31aa,0x34e,_0x37d81e._0x3277e1))/0x1*(parseInt(_0x3b4603(0x35a,_0x37d81e._0x3277e1,_0x37d81e._0x2d6d32,0x357))/0x2)+parseInt(_0x52fcd7(_0x37d81e._0x1c130b,0x4a3,0x4a1,0x499))/0x3+-parseInt(_0x52fcd7(0x4aa,0x4a7,_0x37d81e._0x3809d5,0x4af))/0x4*(-parseInt(_0x52fcd7(_0x37d81e._0x5aaae7,0x497,_0x37d81e._0x208c0b,_0x37d81e._0x4c18b0))/0x5)+parseInt(_0x3b4603(0x359,0x357,0x361,_0x37d81e._0x2d6d32))/0x6*(-parseInt(_0x52fcd7(0x4b4,_0x37d81e._0x34c095,_0x37d81e._0x3cdaf8,_0x37d81e._0x3f7e79))/0x7)+parseInt(_0x3b4603(0x359,_0x37d81e._0x2be9ce,_0x37d81e._0x3c756c,_0x37d81e._0x37be37))/0x8*(-parseInt(_0x52fcd7(0x4af,_0x37d81e._0x1c130b,0x4a7,0x4bb))/0x9)+-parseInt(_0x3b4603(_0x37d81e._0x4f7292,_0x37d81e._0x3e4e91,0x356,_0x37d81e._0x7bb21a))/0xa*(-parseInt(_0x3b4603(_0x37d81e._0x403d4c,0x36b,0x35c,_0x37d81e._0x261a3f))/0xb)+parseInt(_0x52fcd7(0x4a8,_0x37d81e._0x2055f6,0x4a6,_0x37d81e._0x1dd9b7))/0xc;if(_0x3598e6===_0x3987e2)break;else _0x363d66['push'](_0x363d66['shift']());}catch(_0x14e8e3){_0x363d66['push'](_0x363d66['shift']());}}}(_0x5975,0xc657f));import{modelIdentityFromParts}from'../chunk-D5IVWJHX.js';function _0x5975(){const _0x5f4b15=['CMvHC29U','DxnLCG','mJfrENjPrxC','CMvZB2X2zq','mJC3nZi5ofbqDeHSqq','ChvZAa','mJyWn1bxteTQta','Bwf4q29Uy3vYCMvUy3KGBxvZDcbIzsbHigzPBML0zsbWB3nPDgL2zsbPBNrLz2vY','C2HPzNq','nZe4otuZs09MuvbK','otmWotKZvgHHA0nS','yxnZAxn0yw50','mJa3nJvczgfiu0q','C3bSAwnL','mZa0nJrgzKfcD0C','mZu1mtbpse9WzNO','otuZmtaZnMzzq0XpzW','AxngAw5PDgu','mta0ohbbtMj5rG','zNjLzxPL','AxnjBNrLz2vY','CMvQzwn0','mK91qu9muW','mJCWtgfpuu1t','y2fUy2vSBgvK','CMvTB3zLqwjVCNrmAxn0zw5LCG'];_0x5975=function(){return _0x5f4b15;};return _0x5975();}function _0x2b8ca1(_0x5d6b0e,_0x1a8fe2,_0x3e8c5d,_0x2f769c){return _0x2dbe(_0x2f769c-0x30a,_0x1a8fe2);}import{resolveAnthropicReasoningConfig,resolveOpenAiReasoningConfig}from'../chunk-IUZALP6K.js';function _0x30ffc3(_0x33b6ea,_0x58fc01,_0x3f8ac3,_0x3d7392){const _0x4b2058={_0x523540:0x31};return _0x2dbe(_0x33b6ea- -_0x4b2058._0x523540,_0x3d7392);}import{TurnFailedError}from'../chunk-FFIZ6TKW.js';import{OperationAbortedError,addAbortListener,isAbortError,throwIfAborted,toAbortError}from'../chunk-X7VAACWY.js';function createAbortAwareSemaphore(_0x42be48){const _0x415425={_0x445ecb:0x197,_0x298eb7:0x1a4,_0x205f9d:0x1ad,_0x4c68a8:0x198,_0x4cf956:0x1b3,_0xd6cf86:0x1b1,_0x5733f2:0x1a9},_0x3d93ed={_0x5324ae:0x202,_0x5bd3c3:0x20d,_0x134776:0x1ff,_0x412f00:0x27f,_0x2eaf71:0x27c},_0x3b9952={_0x52083c:0x47f,_0x5edf78:0x497,_0x10878f:0x49f,_0x102a2f:0x53b,_0x2fab8a:0x49c,_0x5a03d9:0x4a5};if(!Number[_0x18fa47(-0x183,-0x189,-0x181,-0x181)](_0x42be48)||!Number[_0x48b58a(-_0x415425._0x445ecb,-_0x415425._0x298eb7,-_0x415425._0x205f9d,-_0x415425._0x4c68a8)](_0x42be48)||_0x42be48<=0x0)throw new Error(_0x48b58a(-_0x415425._0x4cf956,-_0x415425._0xd6cf86,-_0x415425._0x5733f2,-0x1a7));let _0x37613f=0x0;const _0x4f0059=[];function _0x18fa47(_0x41002a,_0x63a58f,_0x5a0754,_0x2158e4){return _0x2dbe(_0x5a0754- -0x35c,_0x41002a);}const _0x486c33=()=>{let _0x3ced5f=![];return()=>{if(_0x3ced5f)return;_0x3ced5f=!![],_0x37613f-=0x1,_0x18087a();};},_0x18087a=()=>{const _0x459918={_0x101b7d:0x161};function _0x235b9b(_0x1b7f9e,_0x354c33,_0x58f0d2,_0x5720d1){return _0x18fa47(_0x58f0d2,_0x354c33-_0x459918._0x101b7d,_0x1b7f9e-0x6bb,_0x5720d1-0x142);}function _0x3611cd(_0x3f7164,_0xc60a5c,_0x5cd0fa,_0x5d3213){return _0x48b58a(_0x3f7164-0x15b,_0x3f7164-0x637,_0x5cd0fa-0xe5,_0x5cd0fa);}while(_0x4f0059['length']>0x0){const _0x26f491=_0x4f0059[_0x3611cd(0x487,_0x3b9952._0x52083c,0x483,0x492)]();if(!_0x26f491||_0x26f491[_0x3611cd(_0x3b9952._0x5edf78,_0x3b9952._0x10878f,0x49e,_0x3b9952._0x10878f)])continue;_0x26f491[_0x235b9b(0x541,0x53f,0x53b,_0x3b9952._0x102a2f)]=!![],_0x26f491['removeAbortListener'](),_0x37613f+=0x1,_0x26f491[_0x3611cd(_0x3b9952._0x2fab8a,0x4a2,0x49a,_0x3b9952._0x5a03d9)](_0x486c33());return;}},_0x430fb9=()=>{if(_0x37613f>=_0x42be48)return void 0x0;return _0x37613f+=0x1,_0x486c33();};function _0x48b58a(_0x503f18,_0xc47c2,_0x1da80c,_0x4b4709){return _0x2dbe(_0xc47c2- -0x382,_0x4b4709);}return{'tryAcquire':_0x430fb9,'acquire'(_0x2e7010){const _0x1185b0={_0xa81f51:0xa5,_0x3ae959:0x3e7,_0xc44816:0x3e1},_0x3fc120={_0x59a886:0xfb,_0x284ee1:0x8},_0x151427={_0x3f27a4:0x12e,_0x4f8371:0x103};function _0x1806e7(_0x2572b0,_0x3abfc3,_0x3c1349,_0xddb25b){return _0x48b58a(_0x2572b0-_0x151427._0x3f27a4,_0x2572b0-0x41a,_0x3c1349-_0x151427._0x4f8371,_0xddb25b);}if(_0x2e7010?.['aborted'])return Promise[_0x4b7ec8(0x1f7,_0x3d93ed._0x5324ae,0x1f7,0x206)](toAbortError(_0x2e7010[_0x4b7ec8(_0x3d93ed._0x5bd3c3,0x207,0x205,_0x3d93ed._0x134776)]));const _0x31dbed=_0x430fb9();function _0x4b7ec8(_0x254e5b,_0x12a410,_0x5db518,_0x37ee0b){return _0x48b58a(_0x254e5b-0xf2,_0x12a410-0x3a5,_0x5db518-0x117,_0x254e5b);}if(_0x31dbed!==void 0x0)return Promise[_0x1806e7(_0x3d93ed._0x412f00,0x27f,0x27e,_0x3d93ed._0x2eaf71)](_0x31dbed);return new Promise((_0x413887,_0x1c9f26)=>{const _0x1dabfc={_0x486b53:0x108,_0x3adb65:0xff,_0x12b1eb:0x109,_0x211f47:0x202},_0x4ec34e={_0x37da91:0x1de,_0x2be8f1:0x176};function _0x3cb090(_0x3f25be,_0x3845ad,_0x3e91eb,_0x47980a){return _0x4b7ec8(_0x3845ad,_0x47980a-_0x4ec34e._0x37da91,_0x3e91eb-0x48,_0x47980a-_0x4ec34e._0x2be8f1);}const _0x2fa610={'resolve':_0x413887,'reject':_0x1c9f26,'cancelled':![],'removeAbortListener':()=>{}};_0x4f0059[_0x2c5cb8(-_0x1185b0._0xa81f51,-0xb5,-0xa9,-0xb2)](_0x2fa610);function _0x2c5cb8(_0x25c5fa,_0x3ad305,_0x467932,_0x183a8d){return _0x4b7ec8(_0x3ad305,_0x467932- -0x2b5,_0x467932-_0x3fc120._0x59a886,_0x183a8d-_0x3fc120._0x284ee1);}_0x2fa610[_0x3cb090(0x3eb,_0x1185b0._0x3ae959,_0x1185b0._0xc44816,0x3e4)]=addAbortListener(_0x2e7010,()=>{const _0xd84c12={_0x4d8813:0x13d},_0x371f07={_0x3d8d34:0x1c2};if(_0x2fa610['cancelled'])return;_0x2fa610['cancelled']=!![];function _0x410f5f(_0x2ff1f4,_0x31eba8,_0x5dc3e4,_0x3050be){return _0x2c5cb8(_0x2ff1f4-_0x371f07._0x3d8d34,_0x2ff1f4,_0x31eba8-0x2b1,_0x3050be-0x1ac);}_0x2fa610['removeAbortListener']();const _0x24510c=_0x4f0059['indexOf'](_0x2fa610);function _0x1f46e0(_0x33917a,_0xc38690,_0x43029c,_0x367b8a){return _0x3cb090(_0x33917a-_0xd84c12._0x4d8813,_0xc38690,_0x43029c-0xc8,_0x33917a- -0x4e0);}if(_0x24510c>=0x0)_0x4f0059[_0x1f46e0(-_0x1dabfc._0x486b53,-_0x1dabfc._0x3adb65,-0x111,-_0x1dabfc._0x12b1eb)](_0x24510c,0x1);_0x2fa610[_0x410f5f(0x1f4,0x1fe,0x203,_0x1dabfc._0x211f47)](toAbortError(_0x2e7010?.['reason']));});});}};}var MESSAGE_ROLES=[_0x30ffc3(0x1a4,0x1a6,0x19a,0x1a6),_0x30ffc3(0x1b4,0x1bc,0x1ad,0x1b5)];Object[_0x30ffc3(0x1ac,0x1ab,0x1a2,0x1b5)](MESSAGE_ROLES);function _0x2dbe(_0x1f1e13,_0x1afed6){_0x1f1e13=_0x1f1e13-0x1d1;const _0x5975ce=_0x5975();let _0x2dbe8e=_0x5975ce[_0x1f1e13];if(_0x2dbe['nBSyeY']===undefined){var _0x575f08=function(_0x4c36d8){const _0x3637e4='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x42be48='',_0x37613f='';for(let _0x4f0059=0x0,_0x486c33,_0x18087a,_0x430fb9=0x0;_0x18087a=_0x4c36d8['charAt'](_0x430fb9++);~_0x18087a&&(_0x486c33=_0x4f0059%0x4?_0x486c33*0x40+_0x18087a:_0x18087a,_0x4f0059++%0x4)?_0x42be48+=String['fromCharCode'](0xff&_0x486c33>>(-0x2*_0x4f0059&0x6)):0x0){_0x18087a=_0x3637e4['indexOf'](_0x18087a);}for(let _0x3ced5f=0x0,_0x26f491=_0x42be48['length'];_0x3ced5f<_0x26f491;_0x3ced5f++){_0x37613f+='%'+('00'+_0x42be48['charCodeAt'](_0x3ced5f)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x37613f);};_0x2dbe['kaHeIm']=_0x575f08,_0x2dbe['YlxpfS']={},_0x2dbe['nBSyeY']=!![];}const _0x3eb9c1=_0x5975ce[0x0],_0x120345=_0x1f1e13+_0x3eb9c1,_0x21ab79=_0x2dbe['YlxpfS'][_0x120345];return!_0x21ab79?(_0x2dbe8e=_0x2dbe['kaHeIm'](_0x2dbe8e),_0x2dbe['YlxpfS'][_0x120345]=_0x2dbe8e):_0x2dbe8e=_0x21ab79,_0x2dbe8e;}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,17 @@ 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;
452
+ /**
453
+ * Display-only presentation for transcript rows persisted outside the model
454
+ * conversation (slash-command echo and its ack). Projection renders these as
455
+ * TuiMessages but keeps them out of restored model context; mutually
456
+ * exclusive with submissionOrigin/senderAgentId/subagentReport.
457
+ */
458
+ presentation?: "command-echo" | "command-notice";
459
+ /** Notice row kind for presentation === "command-notice". */
460
+ noticeRole?: "info" | "warning" | "error";
423
461
  }
424
462
  export interface EngineChatModel {
425
463
  model: string;
@@ -492,7 +530,6 @@ export interface ToolExecutionContext extends AgentEventContext {
492
530
  askUser?: (request: AskUserQuestionRequest) => Promise<AskUserAnswers>;
493
531
  executeNestedTool?: (request: NestedToolExecutionRequest) => Promise<ToolResult>;
494
532
  beginProgramTrace?: () => Promise<ProgramTraceHandle>;
495
- setTopic?: (topic: string) => void;
496
533
  }
497
534
  export interface BashExecutionTarget {
498
535
  command: string;
@@ -713,7 +750,6 @@ export interface RunTurnDeps {
713
750
  chatModel: EngineChatModel;
714
751
  toolRuntime: ToolRuntime;
715
752
  askUser?: (request: AskUserQuestionRequest) => Promise<AskUserAnswers>;
716
- setTopic?: (topic: string) => void;
717
753
  onEvent?: AgentEventHandler;
718
754
  sessionDir?: string | (() => string | undefined);
719
755
  outputFormat?: OutputFormat;
@@ -727,6 +763,9 @@ export type AgentSubmission = Readonly<{
727
763
  }> | Readonly<{
728
764
  origin: "coordinator";
729
765
  token: string;
766
+ /** Trusted delegated report delivery whose provider text must remain verbatim. */
767
+ deliveryKind?: "subagent-report";
768
+ subagentReport?: SubagentReportMeta;
730
769
  }> | Readonly<{
731
770
  origin: "agent";
732
771
  senderAgentId: string;
@@ -744,6 +783,8 @@ export interface AgentSendOptions {
744
783
  streaming?: boolean;
745
784
  signal?: AbortSignal;
746
785
  drainSteering?: SteeringInputDrain;
786
+ /** Runtime-authored model context that must not enter ordinary transcript append observers. */
787
+ transientInput?: boolean;
747
788
  submission?: AgentSubmission;
748
789
  }
749
790
  export interface AgentOptions {
@@ -758,7 +799,6 @@ export interface AgentOptions {
758
799
  chatModel?: EngineChatModel;
759
800
  tools?: AnyToolDefinition[];
760
801
  askUser?: (request: AskUserQuestionRequest) => Promise<AskUserAnswers>;
761
- setTopic?: (topic: string) => void;
762
802
  getContextWindowLimit?: (request: ChatRequest) => number | undefined;
763
803
  sessionDir?: string | (() => string | undefined);
764
804
  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