@nuvin/agent-core 0.0.0-rc.1 → 0.0.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.d.ts +13 -3
- package/dist/agent/index.js +1 -1
- package/dist/chunk-G2FR4UGO.js +1 -0
- package/dist/chunk-LXQDGX4K.js +1 -0
- package/dist/chunk-NYZR4XKO.js +1 -1
- package/dist/chunk-VFTQW5WK.js +1 -0
- package/dist/chunk-X7VAACWY.js +1 -1
- package/dist/formats/index.d.ts +2 -2
- package/dist/formats/index.js +1 -1
- package/dist/models/index.d.ts +3 -3
- package/dist/models/index.js +1 -1
- package/dist/{provider-adapters-F0kn75gb.d.ts → provider-adapters-Cb5hUJoD.d.ts} +1 -1
- package/dist/shared/index.d.ts +2 -2
- package/dist/shared/index.js +1 -1
- package/dist/tools/index.d.ts +28 -21
- package/dist/tools/index.js +1 -1
- package/dist/{types-D11KxtW1.d.ts → types-QPBW5jHO.d.ts} +22 -3
- package/package.json +3 -2
- package/dist/chunk-C6OLKGP6.js +0 -1
- package/dist/chunk-U2BLX7Y5.js +0 -1
- package/dist/chunk-WVVWOCQ5.js +0 -1
package/dist/shared/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { D as AutoReasoningEffort, u as ReasoningConfig, F as AnthropicThinkingConfig, G as OpenAiReasoningConfig } from '../types-
|
|
2
|
-
export {
|
|
1
|
+
import { D as AutoReasoningEffort, u as ReasoningConfig, F as AnthropicThinkingConfig, G as OpenAiReasoningConfig } from '../types-QPBW5jHO.js';
|
|
2
|
+
export { aJ as AgentAssistantChunkEvent, aI as AgentAssistantMessageEvent, bd as AgentDefinition, bc as AgentDefinitionFactoryContext, aU as AgentEvent, ay as AgentEventContext, aY as AgentEventHandler, aR as AgentFinalMessageEvent, a as AgentInput, aT as AgentLifecycleEvent, aG as AgentModelRequestEvent, aH as AgentModelResponseEvent, A as AgentOptions, aN as AgentReasoningChunkEvent, aM as AgentReasoningMessageEvent, b as AgentSendOptions, aO as AgentToolCallEvent, aP as AgentToolResultEvent, aQ as AgentToolResultMessageEvent, aL as AgentToolUseChunkEvent, aK as AgentToolUseMessageEvent, aS as AgentTurnCompleteEvent, aF as AgentUserMessageEvent, ab as AnthropicAdaptiveThinkingConfig, a5 as AnthropicAssistantContentBlock, ac as AnthropicDisabledThinkingConfig, aa as AnthropicEnabledThinkingConfig, a0 as AnthropicRedactedThinkingBlock, a4 as AnthropicRedactedThinkingWireBlock, ao as AnthropicSignatureDeltaChunk, $ as AnthropicThinkingBlock, an as AnthropicThinkingDeltaChunk, a8 as AnthropicThinkingDisplay, a9 as AnthropicThinkingEffort, a3 as AnthropicThinkingWireBlock, bb as AnyExtensionRegistration, b2 as AnyToolDefinition, ag as AssistantContentBlock, a7 as AutoReasoningConfig, B as BaseChatModelOptions, ax as ChatModel, j as ChatRequest, l as ChatResponse, v as ChatResponseChunk, h as CompileRequestInput, f as ContentBlock, al as ContentDeltaChunk, C as ContentInput, bl as CreateManagedRunInput, t as EngineChatModel, b5 as ExtensionContext, ba as ExtensionRegistration, E as ExtensionRegistry, ai as IdentifiedMessage, Y as ImageBlock, X as ImageMediaType, a_ as InferJsonSchema, H as JsonObject, J as JsonPrimitive, W as JsonSchema, U as JsonSchemaArray, Q as JsonSchemaBoolean, N as JsonSchemaNumber, V as JsonSchemaObject, L as JsonSchemaString, K as JsonSchemaType, I as JsonValue, bg as ManagedAgentRun, bh as ManagedAgentRunHandle, bf as ManagedRunError, bi as ManagedRunEvent, bj as ManagedRunEventHandler, be as ManagedRunStatus, M as Message, g as MessageInput, af as MessageProviderState, ah as MessageRole, w as ModelExecutionOptions, x as ModelInfo, ar as ModelLimits, i as ModelRequest, k as ModelResponse, b7 as Observer, b9 as ObserverExtensionRegistration, bp as OpenAiFunctionCall, bq as OpenAiFunctionCallOutput, bx as OpenAiFunctionTool, bn as OpenAiInputImage, bo as OpenAiInputMessage, bm as OpenAiInputText, bt as OpenAiOutputMessage, br as OpenAiOutputTextPart, a2 as OpenAiReasoningBlock, ap as OpenAiReasoningDeltaChunk, ad as OpenAiReasoningEffort, bu as OpenAiReasoningOutputItem, ae as OpenAiReasoningSummary, aq as OpenAiReasoningSummaryDeltaChunk, a1 as OpenAiReasoningSummaryText, bs as OpenAiRefusalPart, bv as OpenAiResponsesOutputItem, bw as OpenAiResponsesReasoningParam, O as OpenAiResponsesRequest, b4 as PayloadByStage, aw as PrepareRequestInput, r as PreparedRequest, s as ProviderCredential, y as ProviderCredentialKind, z as ProviderEndpoints, q as ProviderRequestMutator, P as ProviderSessionResolver, a6 as ReasoningVisibility, p as ResolvedProviderSession, R as RunTurnDeps, bk as RuntimeManagerOptions, b3 as Stage, S as SystemInput, e as TextBlock, b1 as ToolDefinition, az as ToolExecutionContext, b0 as ToolGenerator, au as ToolOutputEnvelope, a$ as ToolOutputValue, o as ToolResult, n as ToolResultBlock, at as ToolResultChunk, _ as ToolResultContent, Z as ToolResultContentBlock, as as ToolResultMeta, aZ as ToolRuntime, aC as ToolRuntimeCompletedEvent, aV as ToolRuntimeDispatchDecision, aE as ToolRuntimeEvent, aX as ToolRuntimeEventHandler, aB as ToolRuntimeOutputChunkEvent, aD as ToolRuntimeRejectedEvent, aA as ToolRuntimeStartedEvent, aW as ToolRuntimeToolCallHandler, aj as ToolSchema, m as ToolUseBlock, am as ToolUseDeltaChunk, b6 as Transformer, b8 as TransformerExtensionRegistration, c as TurnInput, T as TurnResult, av as TurnResultStatus, d as TurnState, ak as Usage } from '../types-QPBW5jHO.js';
|
|
3
3
|
|
|
4
4
|
declare class OperationAbortedError extends Error {
|
|
5
5
|
readonly code = "ABORT_ERR";
|
package/dist/shared/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x45bda9,_0x34f9be){var _0x286c51={_0x24b4cb:0xd8,_0x2de504:0xd4,_0xe75a21:0xd3,_0x541c02:0xd8,_0x56a0df:0xde,_0xb47cd5:0xd9,_0x10ec4e:0xd7,_0x31b4ac:0xd5,_0x583cd7:0x21d,_0x5d044a:0x221,_0x5c9d09:0x21a,_0x10e2a2:0x214,_0x184b11:0x219,_0x3a3cf1:0x215,_0x1ba193:0x222,_0x779ce3:0x21f,_0x5ce91f:0xd8,_0x412100:0xce},_0x44c47e={_0x4e7008:0x3c},_0x40edbc=_0x45bda9();function _0x241699(_0x48667c,_0xba3c4e,_0x5f5951,_0x2415b7){return _0x4b68(_0x2415b7- -0x2b4,_0xba3c4e);}function _0x2632bf(_0x438478,_0x481dd3,_0x116e4b,_0xfd1a1c){return _0x4b68(_0xfd1a1c-_0x44c47e._0x4e7008,_0x438478);}while(!![]){try{var _0x382f92=parseInt(_0x241699(-_0x286c51._0x24b4cb,-_0x286c51._0x2de504,-_0x286c51._0xe75a21,-0xd7))/0x1*(-parseInt(_0x241699(-0xd5,-_0x286c51._0x541c02,-_0x286c51._0x56a0df,-_0x286c51._0xb47cd5))/0x2)+-parseInt(_0x241699(-_0x286c51._0x10ec4e,-0xce,-0xce,-0xd3))/0x3*(-parseInt(_0x241699(-_0x286c51._0x24b4cb,-0xd3,-0xd5,-0xd8))/0x4)+-parseInt(_0x241699(-_0x286c51._0xe75a21,-0xd5,-0xd3,-_0x286c51._0x31b4ac))/0x5*(-parseInt(_0x2632bf(_0x286c51._0x583cd7,0x21c,_0x286c51._0x5d044a,0x21e))/0x6)+-parseInt(_0x2632bf(0x21c,0x217,0x21b,_0x286c51._0x5c9d09))/0x7+parseInt(_0x2632bf(_0x286c51._0x10e2a2,_0x286c51._0x184b11,_0x286c51._0x3a3cf1,0x216))/0x8+-parseInt(_0x2632bf(0x21a,_0x286c51._0x1ba193,0x222,_0x286c51._0x779ce3))/0x9+parseInt(_0x241699(-0xdf,-_0x286c51._0x56a0df,-_0x286c51._0x5ce91f,-0xdb))/0xa*(-parseInt(_0x241699(-0xd6,-0xd9,-_0x286c51._0x412100,-0xd4))/0xb);if(_0x382f92===_0x34f9be)break;else _0x40edbc['push'](_0x40edbc['shift']());}catch(_0xf39296){_0x40edbc['push'](_0x40edbc['shift']());}}}(_0x1002,0x6e122));import{mapAutoReasoningEffortToBudgetTokens,resolveAnthropicThinkingConfig,resolveOpenAiReasoningConfig}from'../chunk-NYZR4XKO.js';import{OperationAbortedError,addAbortListener,isAbortError,throwIfAborted,toAbortError}from'../chunk-X7VAACWY.js';function _0x4b68(_0x492945,_0x3865c9){_0x492945=_0x492945-0x1d9;var _0x1002db=_0x1002();var _0x4b68df=_0x1002db[_0x492945];if(_0x4b68['kZcJsm']===undefined){var _0x353924=function(_0x770c2){var _0x1beb2a='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';var _0x252ee5='',_0x14ef2e='';for(var _0x580345=0x0,_0x36ac06,_0x2e9d2c,_0x4a9f24=0x0;_0x2e9d2c=_0x770c2['charAt'](_0x4a9f24++);~_0x2e9d2c&&(_0x36ac06=_0x580345%0x4?_0x36ac06*0x40+_0x2e9d2c:_0x2e9d2c,_0x580345++%0x4)?_0x252ee5+=String['fromCharCode'](0xff&_0x36ac06>>(-0x2*_0x580345&0x6)):0x0){_0x2e9d2c=_0x1beb2a['indexOf'](_0x2e9d2c);}for(var _0x204eff=0x0,_0x4bc1f9=_0x252ee5['length'];_0x204eff<_0x4bc1f9;_0x204eff++){_0x14ef2e+='%'+('00'+_0x252ee5['charCodeAt'](_0x204eff)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x14ef2e);};_0x4b68['dbxWPb']=_0x353924,_0x4b68['IGHNCb']={},_0x4b68['kZcJsm']=!![];}var _0x3db008=_0x1002db[0x0],_0x4ee899=_0x492945+_0x3db008,_0x2a2e19=_0x4b68['IGHNCb'][_0x4ee899];return!_0x2a2e19?(_0x4b68df=_0x4b68['dbxWPb'](_0x4b68df),_0x4b68['IGHNCb'][_0x4ee899]=_0x4b68df):_0x4b68df=_0x2a2e19,_0x4b68df;}export{OperationAbortedError,addAbortListener,isAbortError,mapAutoReasoningEffortToBudgetTokens,resolveAnthropicThinkingConfig,resolveOpenAiReasoningConfig,throwIfAborted,toAbortError};function _0x1002(){var _0x59995e=['nda3ndG2ne9swufXra','nZC4ndjQCxHMEwG','nhrxBMfJsq','mtnxthvxthi','mtqYmJq3ueXzy1LK','nw1PB0T3AW','mJy0yLzHAw1u','mJi4nZGZmeH3uvjtEa','nZKYndi2B0Pfz2nw','mJyXnZC2n29nAerTwG','nty2odbfC0zSCe0'];_0x1002=function(){return _0x59995e;};return _0x1002();}
|
package/dist/tools/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { b1 as ToolDefinition, au as ToolOutputEnvelope, b2 as AnyToolDefinition, aX as ToolRuntimeEventHandler, aW as ToolRuntimeToolCallHandler, aZ as ToolRuntime, H as JsonObject, V as JsonSchemaObject, W as JsonSchema, bc as AgentDefinitionFactoryContext, A as AgentOptions, a$ as ToolOutputValue, at as ToolResultChunk, _ as ToolResultContent, a_ as InferJsonSchema, az as ToolExecutionContext, aj as ToolSchema, I as JsonValue } from '../types-QPBW5jHO.js';
|
|
2
|
+
import { CommandDefinitionReference, SerializedCommandDefinition, MCPAuthConfig, MCPServerConfig } from '@nuvin/config';
|
|
2
3
|
import { OAuthClientProvider } from '@modelcontextprotocol/sdk/client/auth.js';
|
|
3
|
-
import { MCPAuthConfig, MCPServerConfig } from '@nuvin/config';
|
|
4
4
|
import { CallToolResult, ListToolsResult } from '@modelcontextprotocol/sdk/types.js';
|
|
5
5
|
|
|
6
6
|
interface BashToolInput {
|
|
@@ -65,22 +65,8 @@ declare function createShellExecTool(options?: BashToolOptions): ToolDefinition<
|
|
|
65
65
|
required: readonly ["command"];
|
|
66
66
|
}>;
|
|
67
67
|
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
directory?: string;
|
|
71
|
-
scope?: string;
|
|
72
|
-
}
|
|
73
|
-
interface CommandReference {
|
|
74
|
-
id: string;
|
|
75
|
-
name: string;
|
|
76
|
-
description: string;
|
|
77
|
-
argumentHint?: string;
|
|
78
|
-
arguments?: string[];
|
|
79
|
-
source: CommandSource;
|
|
80
|
-
}
|
|
81
|
-
interface LoadedCommand extends CommandReference {
|
|
82
|
-
instructions: string;
|
|
83
|
-
}
|
|
68
|
+
type CommandReference = CommandDefinitionReference;
|
|
69
|
+
type LoadedCommand = SerializedCommandDefinition;
|
|
84
70
|
interface CommandToolOptions<TRef extends CommandReference = CommandReference> {
|
|
85
71
|
commands: TRef[];
|
|
86
72
|
loadCommand: (reference: TRef) => Promise<LoadedCommand>;
|
|
@@ -134,8 +120,8 @@ interface FileNewToolOptions {
|
|
|
134
120
|
name?: string;
|
|
135
121
|
}
|
|
136
122
|
declare function createFileNewTool(options?: FileNewToolOptions): ToolDefinition<{
|
|
137
|
-
filePath: string;
|
|
138
123
|
content: string;
|
|
124
|
+
filePath: string;
|
|
139
125
|
}, ToolOutputEnvelope, undefined, {
|
|
140
126
|
type: "object";
|
|
141
127
|
properties: {
|
|
@@ -444,7 +430,7 @@ declare function createLoadSkillTool<TRef extends SkillReference>(options: Skill
|
|
|
444
430
|
}>;
|
|
445
431
|
|
|
446
432
|
declare function normalizeToolOutputValue(output: ToolOutputValue): ToolResultChunk;
|
|
447
|
-
declare function createToolOutput(output: string, structured?: JsonObject): ToolOutputEnvelope;
|
|
433
|
+
declare function createToolOutput(output: string, structured?: JsonObject, content?: ToolResultContent): ToolOutputEnvelope;
|
|
448
434
|
declare class ToolExecutionError extends Error {
|
|
449
435
|
readonly structured: JsonObject;
|
|
450
436
|
constructor(message: string, structured?: JsonObject);
|
|
@@ -466,8 +452,29 @@ declare class ToolRegistry {
|
|
|
466
452
|
declare function validateToolInput<TSchema extends JsonSchemaObject>(input: JsonValue, schema: TSchema): InferJsonSchema<TSchema>;
|
|
467
453
|
declare function deriveFinalToolOutput(chunks: ToolResultChunk[]): ToolResultChunk;
|
|
468
454
|
|
|
455
|
+
interface ViewFileToolOptions {
|
|
456
|
+
defaultCwd?: string;
|
|
457
|
+
maxBytes?: number;
|
|
458
|
+
name?: string;
|
|
459
|
+
}
|
|
460
|
+
declare function createViewFileTool(options?: ViewFileToolOptions): ToolDefinition<{
|
|
461
|
+
path: string;
|
|
462
|
+
detail?: string | undefined;
|
|
463
|
+
}, ToolOutputEnvelope, undefined, {
|
|
464
|
+
type: "object";
|
|
465
|
+
properties: {
|
|
466
|
+
path: {
|
|
467
|
+
type: "string";
|
|
468
|
+
};
|
|
469
|
+
detail: {
|
|
470
|
+
type: "string";
|
|
471
|
+
};
|
|
472
|
+
};
|
|
473
|
+
required: readonly ["path"];
|
|
474
|
+
}>;
|
|
475
|
+
|
|
469
476
|
declare function resolveWorkspacePath(rootDir: string, inputPath: string): string;
|
|
470
477
|
declare function assertWorkspaceFile(filePath: string): Promise<void>;
|
|
471
478
|
declare function isProbablyBinary(buffer: Buffer): boolean;
|
|
472
479
|
|
|
473
|
-
export { type BashToolInput, type BashToolOptions, type CommandReference, type
|
|
480
|
+
export { type BashToolInput, type BashToolOptions, type CommandReference, type CommandToolOptions, type CreateDelegationToolsOptions, type DelegatedAgentDefinition, type DelegatedAgentFactoryContext, type FileEditToolOptions, type FileNewToolOptions, type FileReadToolOptions, type GlobToolOptions, type GrepToolOptions, type LoadedCommand, type LoadedSkill, type LsToolOptions, type McpConnectionOptions, type McpConnector, type McpOAuthProviderOptions, type McpServerConnectionStatus, type McpToolBundle, type McpToolClient, type McpToolDescriptor, type RipgrepMatch, type SkillReference, type SkillSource, type SkillToolOptions, ToolExecutionError, ToolRegistry, type ViewFileToolOptions, assertWorkspaceFile, buildMcpHttpHeaders, connectMcpServer, createAssignTaskTool, createBashTool, createDelegateToAgentTool, createDelegationTools, createFileEditTool, createFileNewTool, createFileReadTool, createGlobTool, createGrepTool, createInternalToolRuntime, createInvokeCommandTool, createLoadSkillTool, createLsTool, createMcpOAuthProvider, createMcpTool, createMcpToolName, createMcpToolsFromServers, createMockToolRuntime, createShellExecTool, createToolOutput, createViewFileTool, defineTool, deriveFinalToolOutput, filepath, files, isProbablyBinary, normalizeToolOutputValue, resolveWorkspacePath, search, toNuvinToolSchema, validateToolInput };
|