@nuvin/agent-core 0.3.0-rc.3 → 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 _0x1f6b(){const _0x3ba620=['nZKWre9eyuTW','AxnjBNrLz2vY','mte4mdm1zxD0tMj2','otK2mJeWs3DXCwvO','ChvZAa','Aw5KzxHpzG','mtKWD0nms3jR','C2HPzNq','Bwf4q29Uy3vYCMvUy3KGBxvZDcbIzsbHigzPBML0zsbWB3nPDgL2zsbPBNrLz2vY','CMvZB2X2zq','mty4ntuYmgTnzePKzG','mtuYohHcqu52qq','CMvTB3zLqwjVCNrmAxn0zw5LCG','y2fUy2vSBgvK','AxngAw5PDgu','mJq5ogncr09tuG','mtqWmdC5m0TSq0nmqW','CMvQzwn0','mJiXnZK0neXsqKPdyG','mJy2DeTqBMr6'];_0x1f6b=function(){return _0x3ba620;};return _0x1f6b();}function _0x5270(_0x3b6684,_0x458af4){_0x3b6684=_0x3b6684-0x1b0;const _0x1f6bdc=_0x1f6b();let _0x527048=_0x1f6bdc[_0x3b6684];if(_0x5270['zvzGCI']===undefined){var _0x1f6439=function(_0x2a9fc3){const _0x4da58b='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x47e339='',_0x5214af='';for(let _0x42bdf0=0x0,_0x174c63,_0x5d26b1,_0x3bd524=0x0;_0x5d26b1=_0x2a9fc3['charAt'](_0x3bd524++);~_0x5d26b1&&(_0x174c63=_0x42bdf0%0x4?_0x174c63*0x40+_0x5d26b1:_0x5d26b1,_0x42bdf0++%0x4)?_0x47e339+=String['fromCharCode'](0xff&_0x174c63>>(-0x2*_0x42bdf0&0x6)):0x0){_0x5d26b1=_0x4da58b['indexOf'](_0x5d26b1);}for(let _0x27f711=0x0,_0x251b12=_0x47e339['length'];_0x27f711<_0x251b12;_0x27f711++){_0x5214af+='%'+('00'+_0x47e339['charCodeAt'](_0x27f711)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x5214af);};_0x5270['dzyiUt']=_0x1f6439,_0x5270['gMXpeH']={},_0x5270['zvzGCI']=!![];}const _0x3f5e73=_0x1f6bdc[0x0],_0x5ec07f=_0x3b6684+_0x3f5e73,_0x1d0e63=_0x5270['gMXpeH'][_0x5ec07f];return!_0x1d0e63?(_0x527048=_0x5270['dzyiUt'](_0x527048),_0x5270['gMXpeH'][_0x5ec07f]=_0x527048):_0x527048=_0x1d0e63,_0x527048;}(function(_0x4e3078,_0x265a9c){const _0x1bc05e={_0x428286:0x41e,_0x12e51e:0x421,_0xd2a1c4:0x42b,_0x3d8384:0x132,_0x26e630:0x130,_0x24e890:0x136,_0x4ee2f5:0x13d,_0x5cee7b:0x425,_0x21feb0:0x42e,_0x270a92:0x420,_0x2747df:0x438,_0x1ff033:0x135,_0x4edbe9:0x143,_0x1acf8d:0x41d,_0x4c3093:0x41e,_0x2fecfa:0x133,_0x773a72:0x426},_0x5ba48f={_0x41fa3e:0x2f5},_0x25ba55=_0x4e3078();function _0x114904(_0x30ce8e,_0x50826a,_0x28d83b,_0x5db166){return _0x5270(_0x28d83b- -_0x5ba48f._0x41fa3e,_0x5db166);}function _0x3ac399(_0x1f1d07,_0x56c962,_0x508f01,_0x4da4d0){return _0x5270(_0x56c962-0x26d,_0x4da4d0);}while(!![]){try{const _0x248def=parseInt(_0x3ac399(_0x1bc05e._0x428286,_0x1bc05e._0x12e51e,0x41e,_0x1bc05e._0xd2a1c4))/0x1*(parseInt(_0x114904(-_0x1bc05e._0x3d8384,-_0x1bc05e._0x26e630,-_0x1bc05e._0x24e890,-_0x1bc05e._0x4ee2f5))/0x2)+parseInt(_0x3ac399(0x422,0x422,0x41d,_0x1bc05e._0x5cee7b))/0x3+parseInt(_0x114904(-0x13c,-0x144,-0x13e,-0x13d))/0x4+-parseInt(_0x3ac399(0x42c,0x429,_0x1bc05e._0x21feb0,_0x1bc05e._0x270a92))/0x5+parseInt(_0x3ac399(_0x1bc05e._0x2747df,0x430,0x427,0x427))/0x6+-parseInt(_0x114904(-_0x1bc05e._0x1ff033,-0x145,-0x13d,-_0x1bc05e._0x4edbe9))/0x7*(parseInt(_0x3ac399(0x417,_0x1bc05e._0x1acf8d,0x41a,_0x1bc05e._0x4c3093))/0x8)+parseInt(_0x114904(-0x141,-0x143,-0x13a,-_0x1bc05e._0x2fecfa))/0x9*(-parseInt(_0x3ac399(0x426,_0x1bc05e._0x773a72,0x42a,0x426))/0xa);if(_0x248def===_0x265a9c)break;else _0x25ba55['push'](_0x25ba55['shift']());}catch(_0x2d12aa){_0x25ba55['push'](_0x25ba55['shift']());}}}(_0x1f6b,0x48866));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(_0x47e339){const _0x3d26ca={_0x16084b:0x3f8,_0x466ae7:0x3f3,_0x3c5e70:0x57,_0x289781:0x54,_0x4aaae0:0x5b},_0x22515c={_0x2210da:0x20e},_0x380367={_0x256504:0x1a3,_0x2d2f09:0x1a0,_0x5c7bbb:0x1a8,_0x447ba0:0x200,_0x4772a1:0x1f8,_0x1ac8ff:0x1ff,_0x28bfac:0x207},_0x5598b3={_0x185e14:0x24a},_0x593b6b={_0xf37ace:0x11a,_0x1bdd90:0x1e8},_0x40514f={_0x545146:0x242};if(!Number[_0x1f3682(_0x3d26ca._0x16084b,0x3f5,_0x3d26ca._0x466ae7,0x3f0)](_0x47e339)||!Number[_0x3b2b2b(0x54,_0x3d26ca._0x3c5e70,0x4d,_0x3d26ca._0x289781)](_0x47e339)||_0x47e339<=0x0)throw new Error(_0x3b2b2b(_0x3d26ca._0x4aaae0,_0x3d26ca._0x3c5e70,_0x3d26ca._0x3c5e70,0x61));function _0x1f3682(_0xa5bc4d,_0x3cb19e,_0x586302,_0x1a424e){return _0x5270(_0x3cb19e-_0x40514f._0x545146,_0x1a424e);}let _0x5214af=0x0;function _0x3b2b2b(_0x4c4c6c,_0x59f93b,_0x4866c9,_0x3aa17c){return _0x5270(_0x4c4c6c- -0x166,_0x3aa17c);}const _0x42bdf0=[],_0x174c63=()=>{let _0x27f711=![];return()=>{if(_0x27f711)return;_0x27f711=!![],_0x5214af-=0x1,_0x5d26b1();};},_0x5d26b1=()=>{function _0x4fef81(_0x27a38d,_0x97f4ed,_0x4b101f,_0x4dc64e){return _0x1f3682(_0x27a38d-_0x593b6b._0xf37ace,_0x97f4ed- -0x5a2,_0x4b101f-_0x593b6b._0x1bdd90,_0x4b101f);}function _0x112848(_0x4a443c,_0x565fd3,_0xfc05df,_0x43e4cb){return _0x3b2b2b(_0x43e4cb- -_0x5598b3._0x185e14,_0x565fd3-0x97,_0xfc05df-0x104,_0xfc05df);}while(_0x42bdf0['length']>0x0){const _0x251b12=_0x42bdf0[_0x4fef81(-_0x380367._0x256504,-_0x380367._0x2d2f09,-_0x380367._0x5c7bbb,-0x1a0)]();if(!_0x251b12||_0x251b12['cancelled'])continue;_0x251b12[_0x112848(-_0x380367._0x447ba0,-0x204,-_0x380367._0x4772a1,-0x1fe)]=!![],_0x251b12[_0x112848(-_0x380367._0x1ac8ff,-0x1fb,-_0x380367._0x28bfac,-_0x380367._0x1ac8ff)](),_0x5214af+=0x1,_0x251b12['resolve'](_0x174c63());return;}},_0x3bd524=()=>{if(_0x5214af>=_0x47e339)return void 0x0;return _0x5214af+=0x1,_0x174c63();};return{'tryAcquire':_0x3bd524,'acquire'(_0x4e7d23){const _0x385e56={_0x1b00be:0x211,_0x2c0f0e:0x362,_0x59602b:0x367},_0x45f8b0={_0x51ddcd:0x90},_0x1a49b0={_0x32a956:0x101},_0x58cb58={_0x3893eb:0x266,_0xdf943c:0x1cd,_0x21bf85:0xc3};if(_0x4e7d23?.['aborted'])return Promise['reject'](toAbortError(_0x4e7d23['reason']));function _0x6c81b8(_0x161be5,_0x4a0420,_0x330060,_0x272410){return _0x3b2b2b(_0x330060- -_0x58cb58._0x3893eb,_0x4a0420-_0x58cb58._0xdf943c,_0x330060-_0x58cb58._0x21bf85,_0x272410);}const _0x35da83=_0x3bd524();if(_0x35da83!==void 0x0)return Promise[_0x6c81b8(-0x214,-0x202,-0x20a,-_0x22515c._0x2210da)](_0x35da83);return new Promise((_0x4c74d7,_0x51c081)=>{const _0x10641d={_0x300c48:0xe1,_0x436acc:0xec,_0x1cf3a1:0xf3,_0x27d1cb:0xe0,_0x3be64b:0xdf},_0x48679b={_0x5ef1ff:0x1db,_0x6b6972:0x12f,_0x296e2f:0x45};function _0x1566a6(_0x728f3a,_0x4c4418,_0xc0ef34,_0x48c496){return _0x6c81b8(_0x728f3a-0x168,_0x4c4418-_0x1a49b0._0x32a956,_0x48c496-0x582,_0x728f3a);}const _0x417cfd={'resolve':_0x4c74d7,'reject':_0x51c081,'cancelled':![],'removeAbortListener':()=>{}};_0x42bdf0[_0x472796(-0x20f,-_0x385e56._0x1b00be,-0x20f,-0x213)](_0x417cfd);function _0x472796(_0x23e32a,_0xa655a8,_0xbd0e85,_0x3cc3f1){return _0x6c81b8(_0x23e32a-0x0,_0xa655a8-_0x45f8b0._0x51ddcd,_0xbd0e85-0x0,_0x23e32a);}_0x417cfd[_0x1566a6(0x367,_0x385e56._0x2c0f0e,0x361,_0x385e56._0x59602b)]=addAbortListener(_0x4e7d23,()=>{const _0x9fffe9={_0x343eea:0x63};function _0x29616b(_0x187ffc,_0x52d35e,_0x2e13ba,_0x16adf2){return _0x472796(_0x52d35e,_0x52d35e-_0x48679b._0x5ef1ff,_0x16adf2-_0x48679b._0x6b6972,_0x16adf2-_0x48679b._0x296e2f);}if(_0x417cfd['cancelled'])return;function _0x3f425f(_0x4af6b9,_0x3f6ee6,_0x43f09f,_0x29d05c){return _0x472796(_0x43f09f,_0x3f6ee6-_0x9fffe9._0x343eea,_0x29d05c-0x24e,_0x29d05c-0x195);}_0x417cfd[_0x29616b(-_0x10641d._0x300c48,-_0x10641d._0x436acc,-_0x10641d._0x1cf3a1,-0xeb)]=!![],_0x417cfd['removeAbortListener']();const _0x3eced7=_0x42bdf0[_0x29616b(-_0x10641d._0x27d1cb,-0xdf,-0xd8,-_0x10641d._0x3be64b)](_0x417cfd);if(_0x3eced7>=0x0)_0x42bdf0['splice'](_0x3eced7,0x1);_0x417cfd[_0x29616b(-0xe1,-0xf1,-0xec,-0xe7)](toAbortError(_0x4e7d23?.['reason']));});});}};}export{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};
@@ -133,7 +133,8 @@ export interface MessageProviderState {
133
133
  export type AssistantContentBlock = AnthropicRedactedThinkingBlock | AnthropicThinkingBlock | OpenAiReasoningBlock | TextBlock | ToolUseBlock;
134
134
  export type ContentBlock = AssistantContentBlock | ImageBlock | ToolResultBlock;
135
135
  export type ContentInput = ContentBlock[] | string | null | undefined;
136
- export type MessageRole = "assistant" | "user";
136
+ export declare const MESSAGE_ROLES: readonly ["assistant", "user"];
137
+ export type MessageRole = (typeof MESSAGE_ROLES)[number];
137
138
  export type SystemInput = TextBlock[] | string | null | undefined;
138
139
  export interface Message {
139
140
  id?: string;
@@ -227,6 +228,31 @@ export interface ChatResponseUsage {
227
228
  reportedCost?: ReportedModelCost;
228
229
  estimatedCost?: EstimatedModelCost;
229
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
+ }>;
230
256
  export interface PersistedModelCallMetricsV1 {
231
257
  version: 1;
232
258
  usage: ChatResponseUsage;
@@ -337,6 +363,8 @@ export interface TurnInput {
337
363
  system?: SystemInput;
338
364
  messages?: MessageInput[];
339
365
  message: MessageInput;
366
+ /** Keep runtime-authored input in model context without publishing it through append observers. */
367
+ transientInput?: boolean;
340
368
  submission?: AgentSubmission;
341
369
  drainSteering?: () => Promise<TurnSteeringInput[]>;
342
370
  }
@@ -419,6 +447,8 @@ export interface TurnMessageMeta {
419
447
  submissionOrigin?: "coordinator" | "agent";
420
448
  /** Canonical sender ID for an agent-origin user-role append. */
421
449
  senderAgentId?: string;
450
+ /** Trusted structured metadata for a coordinator-authored subagent report. */
451
+ subagentReport?: SubagentReportMeta;
422
452
  }
423
453
  export interface EngineChatModel {
424
454
  model: string;
@@ -491,7 +521,6 @@ export interface ToolExecutionContext extends AgentEventContext {
491
521
  askUser?: (request: AskUserQuestionRequest) => Promise<AskUserAnswers>;
492
522
  executeNestedTool?: (request: NestedToolExecutionRequest) => Promise<ToolResult>;
493
523
  beginProgramTrace?: () => Promise<ProgramTraceHandle>;
494
- setTopic?: (topic: string) => void;
495
524
  }
496
525
  export interface BashExecutionTarget {
497
526
  command: string;
@@ -712,7 +741,6 @@ export interface RunTurnDeps {
712
741
  chatModel: EngineChatModel;
713
742
  toolRuntime: ToolRuntime;
714
743
  askUser?: (request: AskUserQuestionRequest) => Promise<AskUserAnswers>;
715
- setTopic?: (topic: string) => void;
716
744
  onEvent?: AgentEventHandler;
717
745
  sessionDir?: string | (() => string | undefined);
718
746
  outputFormat?: OutputFormat;
@@ -726,6 +754,9 @@ export type AgentSubmission = Readonly<{
726
754
  }> | Readonly<{
727
755
  origin: "coordinator";
728
756
  token: string;
757
+ /** Trusted delegated report delivery whose provider text must remain verbatim. */
758
+ deliveryKind?: "subagent-report";
759
+ subagentReport?: SubagentReportMeta;
729
760
  }> | Readonly<{
730
761
  origin: "agent";
731
762
  senderAgentId: string;
@@ -743,6 +774,8 @@ export interface AgentSendOptions {
743
774
  streaming?: boolean;
744
775
  signal?: AbortSignal;
745
776
  drainSteering?: SteeringInputDrain;
777
+ /** Runtime-authored model context that must not enter ordinary transcript append observers. */
778
+ transientInput?: boolean;
746
779
  submission?: AgentSubmission;
747
780
  }
748
781
  export interface AgentOptions {
@@ -757,7 +790,6 @@ export interface AgentOptions {
757
790
  chatModel?: EngineChatModel;
758
791
  tools?: AnyToolDefinition[];
759
792
  askUser?: (request: AskUserQuestionRequest) => Promise<AskUserAnswers>;
760
- setTopic?: (topic: string) => void;
761
793
  getContextWindowLimit?: (request: ChatRequest) => number | undefined;
762
794
  sessionDir?: string | (() => string | undefined);
763
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