@nuvin/agent-core 0.1.0-rc.0 → 0.1.0-rc.2
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.
- package/dist/VERSION +2 -2
- package/dist/agent/index.js +1 -1
- package/dist/chunk-55OPA5TR.js +1 -0
- package/dist/chunk-FFIZ6TKW.js +1 -1
- package/dist/chunk-NHBKADBW.js +1 -1
- package/dist/chunk-NYZR4XKO.js +1 -1
- package/dist/chunk-QDOE7NWO.js +1 -1
- package/dist/chunk-X7VAACWY.js +1 -1
- package/dist/formats/index.js +1 -1
- package/dist/hooks/index.js +1 -1
- package/dist/models/chat-model.d.ts +2 -0
- package/dist/models/index.js +1 -1
- package/dist/shared/index.js +1 -1
- package/dist/shared/types.d.ts +15 -0
- package/dist/tools/index.js +1 -1
- package/package.json +2 -2
- package/dist/chunk-HRU363DY.js +0 -1
package/dist/shared/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x31966e,_0x1ff036){var _0x8f1acb={_0x44c8a4:0x212,_0x13ea01:0x214,_0x13ed83:0x211,_0x459334:0x20e,_0x2875b4:0x459,_0x31492d:0x457,_0x355aec:0x464,_0x210bd7:0x461,_0x77bc93:0x213,_0x41309b:0x45a,_0x6a6644:0x217,_0x53838f:0x217,_0x5eb644:0x216,_0x11dee6:0x210,_0x1f2299:0x211,_0x509956:0x20c,_0x4c3a61:0x215,_0x4f814d:0x212,_0x296c73:0x20e,_0x365cbe:0x20f},_0x410c22={_0x5beca9:0x2fb},_0xb36b6e={_0x2aa234:0x373};function _0x4c611d(_0x21f4dd,_0x1c5e00,_0x4fc8c0,_0x4b2bf2){return _0xd15b(_0x1c5e00- -_0xb36b6e._0x2aa234,_0x21f4dd);}function _0x8534ee(_0x13b129,_0xa3244e,_0x373f6f,_0x3b7a25){return _0xd15b(_0x373f6f-_0x410c22._0x5beca9,_0xa3244e);}var _0xd9020e=_0x31966e();while(!![]){try{var _0x1e1502=parseInt(_0x4c611d(-0x20a,-0x20f,-0x210,-_0x8f1acb._0x44c8a4))/0x1*(parseInt(_0x4c611d(-0x20e,-0x213,-0x20e,-_0x8f1acb._0x13ea01))/0x2)+-parseInt(_0x4c611d(-_0x8f1acb._0x13ed83,-0x212,-_0x8f1acb._0x459334,-0x211))/0x3*(parseInt(_0x8534ee(0x454,0x456,_0x8f1acb._0x2875b4,_0x8f1acb._0x31492d))/0x4)+parseInt(_0x8534ee(0x458,_0x8f1acb._0x355aec,0x45e,_0x8f1acb._0x210bd7))/0x5+parseInt(_0x4c611d(-0x20a,-0x20d,-0x20b,-_0x8f1acb._0x77bc93))/0x6+parseInt(_0x8534ee(0x457,_0x8f1acb._0x2875b4,_0x8f1acb._0x41309b,0x458))/0x7*(parseInt(_0x4c611d(-0x214,-_0x8f1acb._0x6a6644,-0x216,-0x21b))/0x8)+parseInt(_0x4c611d(-_0x8f1acb._0x53838f,-_0x8f1acb._0x5eb644,-0x211,-0x215))/0x9*(parseInt(_0x4c611d(-_0x8f1acb._0x11dee6,-_0x8f1acb._0x1f2299,-_0x8f1acb._0x509956,-_0x8f1acb._0x4c3a61))/0xa)+-parseInt(_0x4c611d(-_0x8f1acb._0x4f814d,-0x20e,-_0x8f1acb._0x296c73,-_0x8f1acb._0x365cbe))/0xb;if(_0x1e1502===_0x1ff036)break;else _0xd9020e['push'](_0xd9020e['shift']());}catch(_0x3fdec0){_0xd9020e['push'](_0xd9020e['shift']());}}}(_0x3430,0x97679));import{mapAutoReasoningEffortToBudgetTokens,resolveAnthropicThinkingConfig,resolveOpenAiReasoningConfig}from'../chunk-NYZR4XKO.js';function _0xd15b(_0x2d1c1c,_0x4da259){_0x2d1c1c=_0x2d1c1c-0x15c;var _0x3430e0=_0x3430();var _0xd15bf3=_0x3430e0[_0x2d1c1c];if(_0xd15b['AjJlHh']===undefined){var _0x16b9d7=function(_0x25a6da){var _0x30dfc2='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';var _0x371f13='',_0x47b4ea='';for(var _0x53858f=0x0,_0x390005,_0x39840f,_0x42afc5=0x0;_0x39840f=_0x25a6da['charAt'](_0x42afc5++);~_0x39840f&&(_0x390005=_0x53858f%0x4?_0x390005*0x40+_0x39840f:_0x39840f,_0x53858f++%0x4)?_0x371f13+=String['fromCharCode'](0xff&_0x390005>>(-0x2*_0x53858f&0x6)):0x0){_0x39840f=_0x30dfc2['indexOf'](_0x39840f);}for(var _0x5306e2=0x0,_0x38421c=_0x371f13['length'];_0x5306e2<_0x38421c;_0x5306e2++){_0x47b4ea+='%'+('00'+_0x371f13['charCodeAt'](_0x5306e2)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x47b4ea);};_0xd15b['aVPQUw']=_0x16b9d7,_0xd15b['oomlRn']={},_0xd15b['AjJlHh']=!![];}var _0x14135d=_0x3430e0[0x0],_0x3f151f=_0x2d1c1c+_0x14135d,_0x32cca2=_0xd15b['oomlRn'][_0x3f151f];return!_0x32cca2?(_0xd15bf3=_0xd15b['aVPQUw'](_0xd15bf3),_0xd15b['oomlRn'][_0x3f151f]=_0xd15bf3):_0xd15bf3=_0x32cca2,_0xd15bf3;}import{TurnFailedError}from'../chunk-FFIZ6TKW.js';import{OperationAbortedError,addAbortListener,isAbortError,throwIfAborted,toAbortError}from'../chunk-X7VAACWY.js';export{OperationAbortedError,TurnFailedError,addAbortListener,isAbortError,mapAutoReasoningEffortToBudgetTokens,resolveAnthropicThinkingConfig,resolveOpenAiReasoningConfig,throwIfAborted,toAbortError};function _0x3430(){var _0x5f2282=['nJi0odaZA29MvMvQ','odKYmZG3mvb2z0v6ta','mtuZmZG4mLbnufriAa','otG4ndi0uunduuTj','ndmZmtDcuezNBK8','nJiYndbTzgD4vMy','mJHyBw9LBxa','mNHxvvb0tW','mJeZyMfyCfnR','mtKXmhjOsu1puW','mtiXmte0nvnYqKzVEG'];_0x3430=function(){return _0x5f2282;};return _0x3430();}
|
package/dist/shared/types.d.ts
CHANGED
|
@@ -356,8 +356,21 @@ export interface ChatModel {
|
|
|
356
356
|
export interface ModelExecutionOptions {
|
|
357
357
|
signal?: AbortSignal;
|
|
358
358
|
}
|
|
359
|
+
export interface TurnMessageMeta {
|
|
360
|
+
provider?: string;
|
|
361
|
+
model?: string;
|
|
362
|
+
/** ms epoch — provider request sent. */
|
|
363
|
+
turnStartedAt?: number;
|
|
364
|
+
/** ms epoch — response fully received. */
|
|
365
|
+
turnCompletedAt?: number;
|
|
366
|
+
/** ms epoch — first reasoning/thinking delta. */
|
|
367
|
+
reasoningStartedAt?: number;
|
|
368
|
+
/** ms epoch — reasoning settled (first assistant text / done). */
|
|
369
|
+
reasoningCompletedAt?: number;
|
|
370
|
+
}
|
|
359
371
|
export interface EngineChatModel {
|
|
360
372
|
model: string;
|
|
373
|
+
provider?: string;
|
|
361
374
|
maxTokens?: number;
|
|
362
375
|
complete(request: ChatRequest, options?: ModelExecutionOptions): Promise<ChatResponse>;
|
|
363
376
|
stream?(request: ChatRequest, options?: ModelExecutionOptions): AsyncIterable<ChatResponseChunk>;
|
|
@@ -537,6 +550,8 @@ export interface PayloadByStage {
|
|
|
537
550
|
}
|
|
538
551
|
export interface ExtensionContext {
|
|
539
552
|
state: TurnState;
|
|
553
|
+
/** Present only on the assistant-message `afterMessageAppend` run. */
|
|
554
|
+
turnMeta?: TurnMessageMeta;
|
|
540
555
|
}
|
|
541
556
|
export type Transformer<S extends TransformableStage> = (payload: PayloadByStage[S], ctx: ExtensionContext) => PayloadByStage[S] | Promise<PayloadByStage[S]>;
|
|
542
557
|
export type Observer<S extends Stage> = (payload: PayloadByStage[S], ctx: ExtensionContext) => Promise<void> | void;
|