@nuvin/agent-core 0.0.0-rc.4 → 0.0.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.
- package/dist/VERSION +2 -2
- package/dist/agent/index.d.ts +3 -2
- package/dist/agent/index.js +1 -1
- package/dist/chunk-G2FR4UGO.js +1 -1
- package/dist/chunk-LXQDGX4K.js +1 -1
- package/dist/chunk-NYZR4XKO.js +1 -1
- package/dist/chunk-P54V754C.js +1 -0
- package/dist/chunk-X7VAACWY.js +1 -1
- package/dist/formats/index.js +1 -1
- package/dist/models/index.js +1 -1
- package/dist/shared/index.js +1 -1
- package/dist/tools/index.d.ts +70 -3
- package/dist/tools/index.js +1 -1
- package/package.json +6 -1
- package/dist/chunk-VFTQW5WK.js +0 -1
package/dist/shared/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function _0x1ead(_0x29a891,_0x3db51c){_0x29a891=_0x29a891-0x133;var _0x383cb8=_0x383c();var _0x1eadec=_0x383cb8[_0x29a891];if(_0x1ead['pmaacz']===undefined){var _0x36bcd4=function(_0x48060d){var _0x108c9d='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';var _0x5813aa='',_0x3bc88e='';for(var _0x24f177=0x0,_0x5d7316,_0x269b3b,_0x295272=0x0;_0x269b3b=_0x48060d['charAt'](_0x295272++);~_0x269b3b&&(_0x5d7316=_0x24f177%0x4?_0x5d7316*0x40+_0x269b3b:_0x269b3b,_0x24f177++%0x4)?_0x5813aa+=String['fromCharCode'](0xff&_0x5d7316>>(-0x2*_0x24f177&0x6)):0x0){_0x269b3b=_0x108c9d['indexOf'](_0x269b3b);}for(var _0x42c76e=0x0,_0x57bedc=_0x5813aa['length'];_0x42c76e<_0x57bedc;_0x42c76e++){_0x3bc88e+='%'+('00'+_0x5813aa['charCodeAt'](_0x42c76e)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x3bc88e);};_0x1ead['qpKrzf']=_0x36bcd4,_0x1ead['RXmCmd']={},_0x1ead['pmaacz']=!![];}var _0x53a817=_0x383cb8[0x0],_0x13a990=_0x29a891+_0x53a817,_0x1a5b9a=_0x1ead['RXmCmd'][_0x13a990];return!_0x1a5b9a?(_0x1eadec=_0x1ead['qpKrzf'](_0x1eadec),_0x1ead['RXmCmd'][_0x13a990]=_0x1eadec):_0x1eadec=_0x1a5b9a,_0x1eadec;}(function(_0x4b1bbe,_0x1a9f54){var _0x43a7bd={_0x1d7b2e:0x142,_0x156a90:0x144,_0x33058e:0x192,_0x445974:0x190,_0x490c8b:0x18e,_0x41e77a:0x142,_0x3f0d9b:0x149,_0x2d8a5e:0x195,_0x2c117f:0x14a,_0x244c4e:0x191,_0x59646f:0x192,_0x1776d8:0x143,_0x501c2c:0x13e,_0x18ea90:0x199,_0x38b2ba:0x18e,_0x4ecb26:0x145},_0x1938b9={_0x33b3d3:0x58},_0xc90991=_0x4b1bbe();function _0xbb026b(_0x429e12,_0x977d5a,_0x3fa0f6,_0x527c79){return _0x1ead(_0x429e12-_0x1938b9._0x33b3d3,_0x527c79);}function _0x2f1565(_0x36b22c,_0x5aa7ab,_0x423990,_0x3893d6){return _0x1ead(_0x36b22c-0x10,_0x3893d6);}while(!![]){try{var _0x92237e=parseInt(_0x2f1565(0x147,0x143,_0x43a7bd._0x1d7b2e,_0x43a7bd._0x156a90))/0x1*(-parseInt(_0x2f1565(0x14d,0x14a,0x152,0x14d))/0x2)+-parseInt(_0xbb026b(0x18d,_0x43a7bd._0x33058e,_0x43a7bd._0x445974,_0x43a7bd._0x490c8b))/0x3+parseInt(_0x2f1565(_0x43a7bd._0x156a90,_0x43a7bd._0x1d7b2e,_0x43a7bd._0x41e77a,_0x43a7bd._0x3f0d9b))/0x4+-parseInt(_0xbb026b(_0x43a7bd._0x33058e,0x192,0x197,_0x43a7bd._0x2d8a5e))/0x5*(parseInt(_0x2f1565(0x14b,_0x43a7bd._0x2c117f,0x14f,0x14c))/0x6)+-parseInt(_0xbb026b(_0x43a7bd._0x445974,0x190,_0x43a7bd._0x244c4e,_0x43a7bd._0x59646f))/0x7+-parseInt(_0x2f1565(_0x43a7bd._0x1776d8,0x140,0x143,_0x43a7bd._0x501c2c))/0x8*(-parseInt(_0xbb026b(0x194,0x19a,_0x43a7bd._0x18ea90,0x191))/0x9)+-parseInt(_0xbb026b(_0x43a7bd._0x38b2ba,0x188,_0x43a7bd._0x445974,0x18a))/0xa*(-parseInt(_0x2f1565(0x149,0x14b,0x148,_0x43a7bd._0x4ecb26))/0xb);if(_0x92237e===_0x1a9f54)break;else _0xc90991['push'](_0xc90991['shift']());}catch(_0xecebf1){_0xc90991['push'](_0xc90991['shift']());}}}(_0x383c,0xe3577));import{mapAutoReasoningEffortToBudgetTokens,resolveAnthropicThinkingConfig,resolveOpenAiReasoningConfig}from'../chunk-NYZR4XKO.js';import{OperationAbortedError,addAbortListener,isAbortError,throwIfAborted,toAbortError}from'../chunk-X7VAACWY.js';function _0x383c(){var _0xaf5ca0=['mti1ote1n0LLCNL5Bq','ndi3nJeWteX4zhfp','mu9lDgrdrW','mtiZmZmXmJvusvjwsKC','nJGYrw5urxrR','mJvZzhnzBLi','ndi1nZa2wuDrANvA','ovPprgvguG','mZqZmZyXmejrDg5bvG','ntK2ntu1mNjoEeziEG','nZe0otG3nLjyz1rzBG'];_0x383c=function(){return _0xaf5ca0;};return _0x383c();}export{OperationAbortedError,addAbortListener,isAbortError,mapAutoReasoningEffortToBudgetTokens,resolveAnthropicThinkingConfig,resolveOpenAiReasoningConfig,throwIfAborted,toAbortError};
|
package/dist/tools/index.d.ts
CHANGED
|
@@ -1,8 +1,40 @@
|
|
|
1
|
+
import { Diagnostic, Location, Hover, DocumentSymbol, SymbolInformation, CallHierarchyItem, CallHierarchyIncomingCall, CallHierarchyOutgoingCall } from 'vscode-languageserver-types';
|
|
1
2
|
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
3
|
import { CommandDefinitionReference, SerializedCommandDefinition, MCPAuthConfig, MCPServerConfig } from '@nuvin/config';
|
|
3
4
|
import { OAuthClientProvider } from '@modelcontextprotocol/sdk/client/auth.js';
|
|
4
5
|
import { CallToolResult, ListToolsResult } from '@modelcontextprotocol/sdk/types.js';
|
|
5
6
|
|
|
7
|
+
interface LspPosition {
|
|
8
|
+
file: string;
|
|
9
|
+
line: number;
|
|
10
|
+
character: number;
|
|
11
|
+
}
|
|
12
|
+
interface LspServiceConfig {
|
|
13
|
+
enabled?: boolean;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
interface LspService {
|
|
17
|
+
isEnabled(): boolean;
|
|
18
|
+
hasClients(file: string): Promise<boolean>;
|
|
19
|
+
touchFile(filePath: string, waitDiagnostics?: boolean): Promise<void>;
|
|
20
|
+
diagnostics(): Promise<Record<string, Diagnostic[]>>;
|
|
21
|
+
diagnosticsForFile(filePath: string): Promise<Diagnostic[]>;
|
|
22
|
+
definition(pos: LspPosition): Promise<Location[]>;
|
|
23
|
+
references(pos: LspPosition): Promise<Location[]>;
|
|
24
|
+
hover(pos: LspPosition): Promise<Hover[]>;
|
|
25
|
+
documentSymbol(filePath: string): Promise<(DocumentSymbol | SymbolInformation)[]>;
|
|
26
|
+
workspaceSymbol(query: string): Promise<SymbolInformation[]>;
|
|
27
|
+
implementation(pos: LspPosition): Promise<Location[]>;
|
|
28
|
+
prepareCallHierarchy(pos: LspPosition): Promise<CallHierarchyItem[]>;
|
|
29
|
+
incomingCalls(pos: LspPosition): Promise<CallHierarchyIncomingCall[]>;
|
|
30
|
+
outgoingCalls(pos: LspPosition): Promise<CallHierarchyOutgoingCall[]>;
|
|
31
|
+
shutdown(): Promise<void>;
|
|
32
|
+
status(): {
|
|
33
|
+
connectedClients: number;
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
declare function createLspService(config?: LspServiceConfig): LspService;
|
|
37
|
+
|
|
6
38
|
interface BashToolInput {
|
|
7
39
|
command: string;
|
|
8
40
|
cwd?: string;
|
|
@@ -21,8 +53,8 @@ interface BashToolOptions {
|
|
|
21
53
|
}
|
|
22
54
|
declare function createBashTool(options?: BashToolOptions): ToolDefinition<{
|
|
23
55
|
command: string;
|
|
24
|
-
cwd?: string | undefined;
|
|
25
56
|
timeoutMs?: number | undefined;
|
|
57
|
+
cwd?: string | undefined;
|
|
26
58
|
ignoreOutput?: boolean | undefined;
|
|
27
59
|
}, string, ToolOutputEnvelope, {
|
|
28
60
|
type: "object";
|
|
@@ -44,8 +76,8 @@ declare function createBashTool(options?: BashToolOptions): ToolDefinition<{
|
|
|
44
76
|
}>;
|
|
45
77
|
declare function createShellExecTool(options?: BashToolOptions): ToolDefinition<{
|
|
46
78
|
command: string;
|
|
47
|
-
cwd?: string | undefined;
|
|
48
79
|
timeoutMs?: number | undefined;
|
|
80
|
+
cwd?: string | undefined;
|
|
49
81
|
ignoreOutput?: boolean | undefined;
|
|
50
82
|
}, string, ToolOutputEnvelope, {
|
|
51
83
|
type: "object";
|
|
@@ -249,6 +281,41 @@ declare function createLsTool(options?: LsToolOptions): ToolDefinition<{
|
|
|
249
281
|
};
|
|
250
282
|
}>;
|
|
251
283
|
|
|
284
|
+
interface LspToolOptions {
|
|
285
|
+
defaultCwd?: string;
|
|
286
|
+
allowedDirs?: readonly string[];
|
|
287
|
+
lspService?: LspService;
|
|
288
|
+
name?: string;
|
|
289
|
+
}
|
|
290
|
+
declare function createLspTool(options?: LspToolOptions): ToolDefinition<{
|
|
291
|
+
filePath: string;
|
|
292
|
+
line: number;
|
|
293
|
+
character: number;
|
|
294
|
+
operation: string;
|
|
295
|
+
query?: string | undefined;
|
|
296
|
+
}, ToolOutputEnvelope, undefined, {
|
|
297
|
+
type: "object";
|
|
298
|
+
properties: {
|
|
299
|
+
operation: {
|
|
300
|
+
type: "string";
|
|
301
|
+
enum: string[];
|
|
302
|
+
};
|
|
303
|
+
filePath: {
|
|
304
|
+
type: "string";
|
|
305
|
+
};
|
|
306
|
+
line: {
|
|
307
|
+
type: "number";
|
|
308
|
+
};
|
|
309
|
+
character: {
|
|
310
|
+
type: "number";
|
|
311
|
+
};
|
|
312
|
+
query: {
|
|
313
|
+
type: "string";
|
|
314
|
+
};
|
|
315
|
+
};
|
|
316
|
+
required: readonly ["operation", "filePath", "line", "character"];
|
|
317
|
+
}>;
|
|
318
|
+
|
|
252
319
|
interface McpOAuthProviderOptions {
|
|
253
320
|
serverName: string;
|
|
254
321
|
callbackUrl: string;
|
|
@@ -567,4 +634,4 @@ declare function resolveAllowedPath(rootDir: string, allowedDirs: readonly strin
|
|
|
567
634
|
declare function assertWorkspaceFile(filePath: string): Promise<void>;
|
|
568
635
|
declare function isProbablyBinary(buffer: Buffer): boolean;
|
|
569
636
|
|
|
570
|
-
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, type WebFetchToolOptions, type WebSearchToolOptions, assertWorkspaceFile, buildMcpHttpHeaders, connectMcpServer, createAssignTaskTool, createBashTool, createDelegateToAgentTool, createDelegationTools, createFileEditTool, createFileNewTool, createFileReadTool, createGlobTool, createGrepTool, createInternalToolRuntime, createInvokeCommandTool, createLoadSkillTool, createLsTool, createMcpOAuthProvider, createMcpTool, createMcpToolName, createMcpToolsFromServers, createMockToolRuntime, createShellExecTool, createToolOutput, createViewFileTool, createWebFetchTool, createWebSearchTool, defineTool, deriveFinalToolOutput, filepath, files, isProbablyBinary, normalizeToolOutputValue, resolveAllowedPath, resolveWorkspacePath, search, toNuvinToolSchema, validateToolInput };
|
|
637
|
+
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 LspService, type LspServiceConfig, type LspToolOptions, 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, type WebFetchToolOptions, type WebSearchToolOptions, assertWorkspaceFile, buildMcpHttpHeaders, connectMcpServer, createAssignTaskTool, createBashTool, createDelegateToAgentTool, createDelegationTools, createFileEditTool, createFileNewTool, createFileReadTool, createGlobTool, createGrepTool, createInternalToolRuntime, createInvokeCommandTool, createLoadSkillTool, createLsTool, createLspService, createLspTool, createMcpOAuthProvider, createMcpTool, createMcpToolName, createMcpToolsFromServers, createMockToolRuntime, createShellExecTool, createToolOutput, createViewFileTool, createWebFetchTool, createWebSearchTool, defineTool, deriveFinalToolOutput, filepath, files, isProbablyBinary, normalizeToolOutputValue, resolveAllowedPath, resolveWorkspacePath, search, toNuvinToolSchema, validateToolInput };
|