@nuvin/agent-core 0.2.0-rc.2 → 0.2.0-rc.3

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,7 +1,9 @@
1
+ import type { ModelReasoningConfig } from "@nuvin/config";
1
2
  import type { ChatModelAuthScheme, ChatModelSurface } from "./chat-model.ts";
2
3
  export interface ModelProfile {
3
4
  contextWindow?: number;
4
5
  maxOutput?: number;
6
+ reasoning?: ModelReasoningConfig;
5
7
  surface?: ChatModelSurface;
6
8
  baseUrl?: string;
7
9
  }
@@ -29,7 +31,13 @@ export interface ResolvedModelProfile {
29
31
  supportsModelFetch?: boolean;
30
32
  contextWindow?: number;
31
33
  maxOutput?: number;
34
+ reasoning?: ModelReasoningConfig;
32
35
  }
36
+ export declare const REASONING_METADATA_VERSIONS: {
37
+ readonly anthropic: "2026-07-22";
38
+ readonly openai: "2026-07-22";
39
+ readonly codex: "0.145.0+25af12f7e61572b0bc18ddb1008be543b91519b0";
40
+ };
33
41
  export declare function getProviderProfile(provider: string): ProviderProfile | undefined;
34
42
  export declare function getModelProfile(provider: string, model: string): ModelProfile | undefined;
35
43
  export declare function resolveModelProfile(provider: string, model: string): ResolvedModelProfile | undefined;
@@ -43,7 +43,7 @@ interface OpenAiChatCompletionsRequest {
43
43
  messages: OpenAiChatCompletionMessage[];
44
44
  max_completion_tokens?: number;
45
45
  max_tokens?: number;
46
- reasoning_effort?: "high" | "low" | "medium" | "minimal" | "none" | "xhigh";
46
+ reasoning_effort?: "high" | "low" | "max" | "medium" | "minimal" | "none" | "xhigh";
47
47
  stream: boolean;
48
48
  stream_options?: {
49
49
  include_usage: true;
@@ -1 +1 @@
1
- (function(_0x231ab8,_0x347ff9){var _0xdbfbf2={_0x53e11f:0x22,_0x35f21b:0x1f,_0x1ce949:0x418,_0x34f7f5:0x41d,_0x6d0e3d:0x41a,_0x1467c6:0x1f,_0x2b6163:0x1a,_0x3e4e88:0x15,_0x9bbc2b:0x421,_0x1d01e5:0x12,_0x3d5118:0x17,_0x55c0ff:0x14,_0xfe3c2f:0x17,_0x5ca0b1:0x40c,_0x4cf0f3:0x17,_0x4a05cb:0x1c,_0x3b5c6f:0x19,_0x191289:0x410,_0xe921ad:0x13,_0x57e031:0x18,_0x5dec03:0x417,_0x443113:0x417,_0x5aedaf:0x413},_0x4f2f33={_0x42d435:0x179},_0x279f30={_0x4f7326:0x283};function _0x5de123(_0x5d12ab,_0x2feb84,_0x46ab7a,_0xd51d2a){return _0x494c(_0x46ab7a-_0x279f30._0x4f7326,_0x5d12ab);}var _0x513984=_0x231ab8();function _0x12a96c(_0x1caa54,_0x48adcb,_0x3a0ef6,_0x123d1d){return _0x494c(_0x48adcb- -_0x4f2f33._0x42d435,_0x123d1d);}while(!![]){try{var _0x164269=-parseInt(_0x12a96c(_0xdbfbf2._0x53e11f,_0xdbfbf2._0x35f21b,0x21,0x21))/0x1*(parseInt(_0x5de123(_0xdbfbf2._0x1ce949,_0xdbfbf2._0x34f7f5,0x419,_0xdbfbf2._0x6d0e3d))/0x2)+parseInt(_0x12a96c(_0xdbfbf2._0x1467c6,_0xdbfbf2._0x2b6163,_0xdbfbf2._0x3e4e88,_0xdbfbf2._0x2b6163))/0x3*(-parseInt(_0x5de123(0x422,0x41a,0x41c,_0xdbfbf2._0x9bbc2b))/0x4)+parseInt(_0x12a96c(_0xdbfbf2._0x1d01e5,_0xdbfbf2._0x3d5118,_0xdbfbf2._0x55c0ff,_0xdbfbf2._0xfe3c2f))/0x5+parseInt(_0x5de123(_0xdbfbf2._0x5ca0b1,0x411,0x411,0x415))/0x6+parseInt(_0x12a96c(_0xdbfbf2._0x4cf0f3,_0xdbfbf2._0x4a05cb,0x21,0x20))/0x7*(parseInt(_0x12a96c(0x20,0x1e,0x1d,0x23))/0x8)+parseInt(_0x12a96c(0x17,_0xdbfbf2._0x3b5c6f,_0xdbfbf2._0x3e4e88,_0xdbfbf2._0x3b5c6f))/0x9*(parseInt(_0x5de123(0x413,0x40c,0x412,_0xdbfbf2._0x191289))/0xa)+parseInt(_0x12a96c(_0xdbfbf2._0xe921ad,_0xdbfbf2._0x57e031,0x16,_0xdbfbf2._0x1d01e5))/0xb*(-parseInt(_0x5de123(0x41b,_0xdbfbf2._0x5dec03,_0xdbfbf2._0x443113,_0xdbfbf2._0x5aedaf))/0xc);if(_0x164269===_0x347ff9)break;else _0x513984['push'](_0x513984['shift']());}catch(_0x56176f){_0x513984['push'](_0x513984['shift']());}}}(_0x5c28,0xe86fe));import{modelIdentityFromParts}from'../chunk-D5IVWJHX.js';import{mapAutoReasoningEffortToBudgetTokens,resolveAnthropicThinkingConfig,resolveOpenAiReasoningConfig}from'../chunk-NYZR4XKO.js';function _0x5c28(){var _0x4bd20a=['mJbHzezAA3i','mtq0mdq1zwjouwnN','mtfHqK5ju1a','mZe4mtuWovftugzXqq','mte1mtyXDfDxyNHp','nJq4ndGXmMHAuffQEG','nJK2mdCZwwf6y2jY','mKzXwLztwq','mtm2EfPoueLw','mtqZnZCXm0L5CLPMDq','mtz1zxnPuKG','mZK0ndCWmhH1zKvlwG'];_0x5c28=function(){return _0x4bd20a;};return _0x5c28();}import{TurnFailedError}from'../chunk-FFIZ6TKW.js';function _0x494c(_0x29c78f,_0x4d2400){_0x29c78f=_0x29c78f-0x18e;var _0x5c28f6=_0x5c28();var _0x494c58=_0x5c28f6[_0x29c78f];if(_0x494c['PhmulH']===undefined){var _0x367384=function(_0x4b9098){var _0x160e42='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';var _0x5a49c6='',_0xbb03a6='';for(var _0x2bd7fa=0x0,_0x3068ec,_0x4026a2,_0x5a0472=0x0;_0x4026a2=_0x4b9098['charAt'](_0x5a0472++);~_0x4026a2&&(_0x3068ec=_0x2bd7fa%0x4?_0x3068ec*0x40+_0x4026a2:_0x4026a2,_0x2bd7fa++%0x4)?_0x5a49c6+=String['fromCharCode'](0xff&_0x3068ec>>(-0x2*_0x2bd7fa&0x6)):0x0){_0x4026a2=_0x160e42['indexOf'](_0x4026a2);}for(var _0x416446=0x0,_0x586afb=_0x5a49c6['length'];_0x416446<_0x586afb;_0x416446++){_0xbb03a6+='%'+('00'+_0x5a49c6['charCodeAt'](_0x416446)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0xbb03a6);};_0x494c['IKnZDM']=_0x367384,_0x494c['rqCLNx']={},_0x494c['PhmulH']=!![];}var _0x480f41=_0x5c28f6[0x0],_0x2c35c8=_0x29c78f+_0x480f41,_0x3f885e=_0x494c['rqCLNx'][_0x2c35c8];return!_0x3f885e?(_0x494c58=_0x494c['IKnZDM'](_0x494c58),_0x494c['rqCLNx'][_0x2c35c8]=_0x494c58):_0x494c58=_0x3f885e,_0x494c58;}import{OperationAbortedError,addAbortListener,isAbortError,throwIfAborted,toAbortError}from'../chunk-X7VAACWY.js';export{OperationAbortedError,TurnFailedError,addAbortListener,isAbortError,mapAutoReasoningEffortToBudgetTokens,modelIdentityFromParts,resolveAnthropicThinkingConfig,resolveOpenAiReasoningConfig,throwIfAborted,toAbortError};
1
+ (function(_0x52d6a9,_0x19b009){var _0x1af99f={_0x5f604f:0x187,_0x5b8d97:0x184,_0x143e9d:0xca,_0x571f70:0xc9,_0x5a51c1:0xc8,_0x29b68e:0xca,_0x3899cb:0xd3,_0x184fd0:0xd0,_0xff9145:0xcb,_0x8c15cd:0x189,_0x3a3656:0x18a,_0x161592:0x18d,_0x583c86:0x185,_0x2fd984:0x180,_0x31c6f1:0x188,_0x561f84:0xc9},_0x3ea0bf=_0x52d6a9();function _0x17f373(_0x395d31,_0x424fa5,_0x5c23f4,_0x408dee){return _0x4cd4(_0x424fa5- -0x325,_0x395d31);}function _0x4eada4(_0x275509,_0x44c80a,_0x59dfe2,_0x63b107){return _0x4cd4(_0x59dfe2- -0xcf,_0x63b107);}while(!![]){try{var _0x100239=-parseInt(_0x17f373(-0x182,-_0x1af99f._0x5f604f,-0x188,-_0x1af99f._0x5b8d97))/0x1+parseInt(_0x4eada4(_0x1af99f._0x143e9d,_0x1af99f._0x571f70,_0x1af99f._0x5a51c1,0xc6))/0x2+parseInt(_0x4eada4(0xc8,0xc6,_0x1af99f._0x29b68e,0xcc))/0x3*(parseInt(_0x4eada4(0xd5,_0x1af99f._0x3899cb,_0x1af99f._0x184fd0,_0x1af99f._0xff9145))/0x4)+-parseInt(_0x17f373(-0x184,-_0x1af99f._0x8c15cd,-0x187,-0x184))/0x5*(-parseInt(_0x17f373(-0x189,-_0x1af99f._0x3a3656,-_0x1af99f._0x161592,-0x189))/0x6)+-parseInt(_0x17f373(-0x183,-_0x1af99f._0x583c86,-_0x1af99f._0x2fd984,-0x186))/0x7*(parseInt(_0x17f373(-0x189,-0x18b,-_0x1af99f._0x5f604f,-0x18e))/0x8)+parseInt(_0x17f373(-0x186,-_0x1af99f._0x31c6f1,-0x189,-_0x1af99f._0x5f604f))/0x9+-parseInt(_0x4eada4(0xca,0xca,_0x1af99f._0x561f84,0xcb))/0xa;if(_0x100239===_0x19b009)break;else _0x3ea0bf['push'](_0x3ea0bf['shift']());}catch(_0x595eb2){_0x3ea0bf['push'](_0x3ea0bf['shift']());}}}(_0xae9d,0x93226));function _0xae9d(){var _0x2450e2=['nJqWmteYvNH5shLz','odKWotaWzvHQswT0','m0LAqxznBa','ndCYnJiZmMjQsgvPCq','nNvhtwDpAa','mtG3mte1mhjVsNj6Da','mtaZndq3mtDxs1fpsxu','odq1ndqWwLLwEMnb','mZuWmdiWneLIuhDkDa','mtr3wu1jrNC'];_0xae9d=function(){return _0x2450e2;};return _0xae9d();}import{modelIdentityFromParts}from'../chunk-D5IVWJHX.js';import{resolveAnthropicReasoningConfig,resolveOpenAiReasoningConfig}from'../chunk-IUZALP6K.js';function _0x4cd4(_0x3c3a66,_0xd56804){_0x3c3a66=_0x3c3a66-0x197;var _0xae9db=_0xae9d();var _0x4cd407=_0xae9db[_0x3c3a66];if(_0x4cd4['mVxHgH']===undefined){var _0x55cea6=function(_0x2f0f7b){var _0x5bec90='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';var _0x3544ab='',_0xe3ed64='';for(var _0x3c5953=0x0,_0x524d85,_0x3e7deb,_0xf31e2=0x0;_0x3e7deb=_0x2f0f7b['charAt'](_0xf31e2++);~_0x3e7deb&&(_0x524d85=_0x3c5953%0x4?_0x524d85*0x40+_0x3e7deb:_0x3e7deb,_0x3c5953++%0x4)?_0x3544ab+=String['fromCharCode'](0xff&_0x524d85>>(-0x2*_0x3c5953&0x6)):0x0){_0x3e7deb=_0x5bec90['indexOf'](_0x3e7deb);}for(var _0x5d27dd=0x0,_0x2e0a18=_0x3544ab['length'];_0x5d27dd<_0x2e0a18;_0x5d27dd++){_0xe3ed64+='%'+('00'+_0x3544ab['charCodeAt'](_0x5d27dd)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0xe3ed64);};_0x4cd4['yrhrFk']=_0x55cea6,_0x4cd4['mnLfiT']={},_0x4cd4['mVxHgH']=!![];}var _0x31c2f8=_0xae9db[0x0],_0x15c899=_0x3c3a66+_0x31c2f8,_0x9418c7=_0x4cd4['mnLfiT'][_0x15c899];return!_0x9418c7?(_0x4cd407=_0x4cd4['yrhrFk'](_0x4cd407),_0x4cd4['mnLfiT'][_0x15c899]=_0x4cd407):_0x4cd407=_0x9418c7,_0x4cd407;}import{TurnFailedError}from'../chunk-FFIZ6TKW.js';import{OperationAbortedError,addAbortListener,isAbortError,throwIfAborted,toAbortError}from'../chunk-X7VAACWY.js';export{OperationAbortedError,TurnFailedError,addAbortListener,isAbortError,modelIdentityFromParts,resolveAnthropicReasoningConfig,resolveOpenAiReasoningConfig,throwIfAborted,toAbortError};
@@ -1,5 +1,4 @@
1
- import type { AnthropicThinkingConfig, AutoReasoningEffort, OpenAiReasoningConfig, ReasoningConfig } from "./types.ts";
2
- export declare function mapAutoReasoningEffortToBudgetTokens(effort: AutoReasoningEffort): number;
3
- export declare function resolveAnthropicThinkingConfig(reasoning: ReasoningConfig | undefined): AnthropicThinkingConfig | undefined;
4
- export declare function resolveOpenAiReasoningConfig(reasoning: ReasoningConfig | undefined): OpenAiReasoningConfig | undefined;
1
+ import type { AnthropicReasoningConfig, CodexReasoningConfig, OpenAiReasoningConfig, ReasoningConfig } from "./types.ts";
2
+ export declare function resolveAnthropicReasoningConfig(reasoning: ReasoningConfig | undefined): AnthropicReasoningConfig | undefined;
3
+ export declare function resolveOpenAiReasoningConfig(reasoning: ReasoningConfig | undefined): CodexReasoningConfig | OpenAiReasoningConfig | undefined;
5
4
  //# sourceMappingURL=reasoning-config.d.ts.map
@@ -82,12 +82,8 @@ export interface AnthropicRedactedThinkingWireBlock {
82
82
  }
83
83
  export type AnthropicAssistantContentBlock = AnthropicRedactedThinkingWireBlock | AnthropicThinkingWireBlock | TextBlock | ToolUseBlock;
84
84
  export type ReasoningVisibility = "continuity-only" | "user-visible";
85
- export type AutoReasoningEffort = "low" | "medium" | "high";
86
- export interface AutoReasoningConfig {
87
- effort: AutoReasoningEffort;
88
- }
89
85
  export type AnthropicThinkingDisplay = "omitted" | "summarized";
90
- export type AnthropicThinkingEffort = "low" | "medium" | "high";
86
+ export type AnthropicThinkingEffort = "low" | "medium" | "high" | "xhigh" | "max";
91
87
  export interface AnthropicEnabledThinkingConfig {
92
88
  type: "enabled";
93
89
  budgetTokens: number;
@@ -97,23 +93,29 @@ export interface AnthropicEnabledThinkingConfig {
97
93
  export interface AnthropicAdaptiveThinkingConfig {
98
94
  type: "adaptive";
99
95
  display?: AnthropicThinkingDisplay;
100
- effort?: AnthropicThinkingEffort;
101
96
  interleaved?: boolean;
102
97
  }
103
98
  export interface AnthropicDisabledThinkingConfig {
104
99
  type: "disabled";
105
100
  }
106
101
  export type AnthropicThinkingConfig = AnthropicAdaptiveThinkingConfig | AnthropicDisabledThinkingConfig | AnthropicEnabledThinkingConfig;
107
- export type OpenAiReasoningEffort = "high" | "low" | "medium" | "minimal" | "none" | "xhigh";
102
+ export interface AnthropicReasoningConfig {
103
+ thinking: AnthropicThinkingConfig;
104
+ effort?: AnthropicThinkingEffort;
105
+ }
106
+ export type OpenAiReasoningEffort = "none" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max";
108
107
  export type OpenAiReasoningSummary = "auto" | "concise" | "detailed";
109
108
  export interface OpenAiReasoningConfig {
110
109
  effort?: OpenAiReasoningEffort;
111
110
  includeEncryptedContent?: boolean;
112
111
  summary?: OpenAiReasoningSummary;
113
112
  }
113
+ export interface CodexReasoningConfig {
114
+ effort: string;
115
+ }
114
116
  export interface ReasoningConfig {
115
- auto?: AutoReasoningConfig;
116
- anthropic?: AnthropicThinkingConfig;
117
+ anthropic?: AnthropicReasoningConfig;
118
+ codex?: CodexReasoningConfig;
117
119
  openai?: OpenAiReasoningConfig;
118
120
  visibility?: ReasoningVisibility;
119
121
  }
@@ -320,6 +322,7 @@ export interface TurnInput {
320
322
  system?: SystemInput;
321
323
  messages?: MessageInput[];
322
324
  message: MessageInput;
325
+ drainSteering?: () => Promise<MessageInput[]>;
323
326
  }
324
327
  export interface TurnState {
325
328
  sessionId: string;
@@ -641,9 +644,11 @@ export interface RunTurnDeps {
641
644
  outputFormat?: OutputFormat;
642
645
  }
643
646
  export type AgentInput = MessageInput | string;
647
+ export type SteeringInputDrain = () => Promise<AgentInput[]>;
644
648
  export interface AgentSendOptions {
645
649
  streaming?: boolean;
646
650
  signal?: AbortSignal;
651
+ drainSteering?: SteeringInputDrain;
647
652
  }
648
653
  export interface AgentOptions {
649
654
  sessionId?: string;
@@ -778,7 +783,7 @@ export interface OpenAiReasoningOutputItem {
778
783
  }
779
784
  export type OpenAiResponsesOutputItem = JsonObject | OpenAiFunctionCall | OpenAiOutputMessage | OpenAiReasoningOutputItem;
780
785
  export interface OpenAiResponsesReasoningParam {
781
- effort?: OpenAiReasoningEffort;
786
+ effort?: string;
782
787
  generate_summary?: OpenAiReasoningSummary;
783
788
  summary?: OpenAiReasoningSummary;
784
789
  }
@@ -13,7 +13,10 @@ export * from "./internal-tool-runtime.ts";
13
13
  export * from "./kill-shell-tool.ts";
14
14
  export * from "./ls-tool.ts";
15
15
  export * from "./lsp-tool.ts";
16
+ export * from "./mcp-connection-generation.ts";
16
17
  export * from "./mcp-oauth-provider.ts";
18
+ export * from "./mcp-safe-error.ts";
19
+ export { extractOwnedMcpSafeError } from "./mcp-safe-error-provenance.ts";
17
20
  export * from "./mcp-server-manager.ts";
18
21
  export * from "./mcp-tool-adapter.ts";
19
22
  export * from "./mock-tool-runtime.ts";