@nuvin/agent-core 0.0.0-rc.2 → 0.0.0-rc.4
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-G2FR4UGO.js +1 -1
- package/dist/chunk-LXQDGX4K.js +1 -1
- package/dist/chunk-NYZR4XKO.js +1 -1
- package/dist/chunk-VFTQW5WK.js +1 -1
- package/dist/chunk-X7VAACWY.js +1 -1
- package/dist/formats/index.js +1 -1
- package/dist/models/index.d.ts +7 -9
- package/dist/models/index.js +1 -1
- package/dist/shared/index.js +1 -1
- package/dist/tools/index.d.ts +91 -1
- package/dist/tools/index.js +1 -1
- package/package.json +8 -4
package/dist/shared/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0xf1cb47,_0x1a6554){var _0x268885={_0x522873:0x26d,_0x26dace:0x26c,_0x340b04:0x6e,_0xec400:0x69,_0x1b77bb:0x6a,_0x1ce657:0x67,_0x3e16f8:0x69,_0x6b692e:0x6e,_0x3f09bc:0x274,_0x3ed230:0x270,_0x2a3651:0x271,_0x37ee7e:0x26e,_0x16bef8:0x276,_0x58c100:0x61,_0x1dc5d9:0x67,_0x1e9e35:0x267,_0x3f5661:0x26f,_0x40bfff:0x65,_0x11733c:0x64,_0x77b87a:0x68,_0x4d5675:0x66},_0x16e783={_0x2dad43:0x1df},_0x353aa9=_0xf1cb47();function _0x2adb8a(_0x17db90,_0x4810d3,_0x4eb8f9,_0x211719){return _0x28e0(_0x4eb8f9- -_0x16e783._0x2dad43,_0x4810d3);}function _0x11f82c(_0x110b03,_0x29f82a,_0x34cdb1,_0x4edfe8){return _0x28e0(_0x29f82a-0xf8,_0x110b03);}while(!![]){try{var _0x23d773=parseInt(_0x11f82c(_0x268885._0x522873,_0x268885._0x26dace,0x267,0x267))/0x1*(parseInt(_0x2adb8a(-_0x268885._0x340b04,-_0x268885._0xec400,-_0x268885._0x1b77bb,-0x66))/0x2)+-parseInt(_0x2adb8a(-_0x268885._0x1ce657,-_0x268885._0xec400,-_0x268885._0x3e16f8,-_0x268885._0x6b692e))/0x3*(-parseInt(_0x11f82c(0x275,_0x268885._0x3f09bc,0x276,_0x268885._0x3ed230))/0x4)+-parseInt(_0x11f82c(0x273,0x270,_0x268885._0x2a3651,_0x268885._0x37ee7e))/0x5*(-parseInt(_0x11f82c(_0x268885._0x2a3651,_0x268885._0x2a3651,_0x268885._0x16bef8,_0x268885._0x2a3651))/0x6)+parseInt(_0x2adb8a(-0x66,-_0x268885._0x58c100,-0x65,-_0x268885._0x1dc5d9))/0x7+-parseInt(_0x11f82c(0x26f,0x26b,_0x268885._0x1e9e35,_0x268885._0x3f5661))/0x8+-parseInt(_0x2adb8a(-_0x268885._0x40bfff,-0x5f,-0x64,-_0x268885._0x11733c))/0x9+-parseInt(_0x2adb8a(-0x69,-_0x268885._0x1ce657,-_0x268885._0x77b87a,-_0x268885._0x4d5675))/0xa;if(_0x23d773===_0x1a6554)break;else _0x353aa9['push'](_0x353aa9['shift']());}catch(_0x21181d){_0x353aa9['push'](_0x353aa9['shift']());}}}(_0x200d,0x82177));import{mapAutoReasoningEffortToBudgetTokens,resolveAnthropicThinkingConfig,resolveOpenAiReasoningConfig}from'../chunk-NYZR4XKO.js';function _0x28e0(_0x30d916,_0x540bf6){_0x30d916=_0x30d916-0x173;var _0x200dfb=_0x200d();var _0x28e020=_0x200dfb[_0x30d916];if(_0x28e0['HFpcBq']===undefined){var _0x1e7c18=function(_0x18b6ca){var _0x34d948='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';var _0x2ddf38='',_0x4a2d01='';for(var _0x557517=0x0,_0x4ea231,_0x49e452,_0xeec0bb=0x0;_0x49e452=_0x18b6ca['charAt'](_0xeec0bb++);~_0x49e452&&(_0x4ea231=_0x557517%0x4?_0x4ea231*0x40+_0x49e452:_0x49e452,_0x557517++%0x4)?_0x2ddf38+=String['fromCharCode'](0xff&_0x4ea231>>(-0x2*_0x557517&0x6)):0x0){_0x49e452=_0x34d948['indexOf'](_0x49e452);}for(var _0x1ff41d=0x0,_0x4204b2=_0x2ddf38['length'];_0x1ff41d<_0x4204b2;_0x1ff41d++){_0x4a2d01+='%'+('00'+_0x2ddf38['charCodeAt'](_0x1ff41d)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x4a2d01);};_0x28e0['tCnECQ']=_0x1e7c18,_0x28e0['zZWbDT']={},_0x28e0['HFpcBq']=!![];}var _0x41b070=_0x200dfb[0x0],_0x1db519=_0x30d916+_0x41b070,_0x4e8622=_0x28e0['zZWbDT'][_0x1db519];return!_0x4e8622?(_0x28e020=_0x28e0['tCnECQ'](_0x28e020),_0x28e0['zZWbDT'][_0x1db519]=_0x28e020):_0x28e020=_0x4e8622,_0x28e020;}function _0x200d(){var _0x3c51fd=['mJaZog9xuw5rDW','ntfsuvjrrwC','mta5nJy2ntbgt0reDwG','mtCYote5nuXyA0npBG','mtjHqwPOwfa','nda5otG1mw1tsfLizW','mZe2ntmZnMDHC0nOBa','mtK4nJm2whrrC2zt','ntG1oteXmLbQv3PttG','ntGXs1bMBMzA'];_0x200d=function(){return _0x3c51fd;};return _0x200d();}import{OperationAbortedError,addAbortListener,isAbortError,throwIfAborted,toAbortError}from'../chunk-X7VAACWY.js';export{OperationAbortedError,addAbortListener,isAbortError,mapAutoReasoningEffortToBudgetTokens,resolveAnthropicThinkingConfig,resolveOpenAiReasoningConfig,throwIfAborted,toAbortError};
|
package/dist/tools/index.d.ts
CHANGED
|
@@ -10,6 +10,7 @@ interface BashToolInput {
|
|
|
10
10
|
ignoreOutput?: boolean;
|
|
11
11
|
}
|
|
12
12
|
interface BashToolOptions {
|
|
13
|
+
allowedDirs?: readonly string[];
|
|
13
14
|
defaultCwd?: string;
|
|
14
15
|
defaultTimeoutMs?: number;
|
|
15
16
|
description?: string;
|
|
@@ -88,6 +89,7 @@ declare function createInvokeCommandTool<TRef extends CommandReference>(options:
|
|
|
88
89
|
}>;
|
|
89
90
|
|
|
90
91
|
interface FileEditToolOptions {
|
|
92
|
+
allowedDirs?: readonly string[];
|
|
91
93
|
defaultCwd?: string;
|
|
92
94
|
name?: string;
|
|
93
95
|
}
|
|
@@ -116,6 +118,7 @@ declare function createFileEditTool(options?: FileEditToolOptions): ToolDefiniti
|
|
|
116
118
|
}>;
|
|
117
119
|
|
|
118
120
|
interface FileNewToolOptions {
|
|
121
|
+
allowedDirs?: readonly string[];
|
|
119
122
|
defaultCwd?: string;
|
|
120
123
|
name?: string;
|
|
121
124
|
}
|
|
@@ -136,6 +139,7 @@ declare function createFileNewTool(options?: FileNewToolOptions): ToolDefinition
|
|
|
136
139
|
}>;
|
|
137
140
|
|
|
138
141
|
interface FileReadToolOptions {
|
|
142
|
+
allowedDirs?: readonly string[];
|
|
139
143
|
defaultCwd?: string;
|
|
140
144
|
name?: string;
|
|
141
145
|
}
|
|
@@ -160,6 +164,7 @@ declare function createFileReadTool(options?: FileReadToolOptions): ToolDefiniti
|
|
|
160
164
|
}>;
|
|
161
165
|
|
|
162
166
|
interface GlobToolOptions {
|
|
167
|
+
allowedDirs?: readonly string[];
|
|
163
168
|
defaultCwd?: string;
|
|
164
169
|
limit?: number;
|
|
165
170
|
name?: string;
|
|
@@ -185,6 +190,7 @@ declare function createGlobTool(options?: GlobToolOptions): ToolDefinition<{
|
|
|
185
190
|
}>;
|
|
186
191
|
|
|
187
192
|
interface GrepToolOptions {
|
|
193
|
+
allowedDirs?: readonly string[];
|
|
188
194
|
defaultCwd?: string;
|
|
189
195
|
limit?: number;
|
|
190
196
|
name?: string;
|
|
@@ -224,6 +230,7 @@ interface InternalToolRuntimeOptions {
|
|
|
224
230
|
declare function createInternalToolRuntime(tools?: AnyToolDefinition[], options?: InternalToolRuntimeOptions): ToolRuntime;
|
|
225
231
|
|
|
226
232
|
interface LsToolOptions {
|
|
233
|
+
allowedDirs?: readonly string[];
|
|
227
234
|
defaultCwd?: string;
|
|
228
235
|
name?: string;
|
|
229
236
|
}
|
|
@@ -453,6 +460,7 @@ declare function validateToolInput<TSchema extends JsonSchemaObject>(input: Json
|
|
|
453
460
|
declare function deriveFinalToolOutput(chunks: ToolResultChunk[]): ToolResultChunk;
|
|
454
461
|
|
|
455
462
|
interface ViewFileToolOptions {
|
|
463
|
+
allowedDirs?: readonly string[];
|
|
456
464
|
defaultCwd?: string;
|
|
457
465
|
maxBytes?: number;
|
|
458
466
|
name?: string;
|
|
@@ -473,8 +481,90 @@ declare function createViewFileTool(options?: ViewFileToolOptions): ToolDefiniti
|
|
|
473
481
|
required: readonly ["path"];
|
|
474
482
|
}>;
|
|
475
483
|
|
|
484
|
+
interface WebFetchToolOptions {
|
|
485
|
+
maxBytes?: number;
|
|
486
|
+
timeoutMs?: number;
|
|
487
|
+
name?: string;
|
|
488
|
+
}
|
|
489
|
+
declare function createWebFetchTool(options?: WebFetchToolOptions): ToolDefinition<{
|
|
490
|
+
url: string;
|
|
491
|
+
description?: string | undefined;
|
|
492
|
+
}, ToolOutputEnvelope, undefined, {
|
|
493
|
+
type: "object";
|
|
494
|
+
properties: {
|
|
495
|
+
description: {
|
|
496
|
+
type: "string";
|
|
497
|
+
};
|
|
498
|
+
url: {
|
|
499
|
+
type: "string";
|
|
500
|
+
};
|
|
501
|
+
};
|
|
502
|
+
required: readonly ["url"];
|
|
503
|
+
}>;
|
|
504
|
+
|
|
505
|
+
interface WebSearchToolOptions {
|
|
506
|
+
googleCseKey: string;
|
|
507
|
+
googleCseCx: string;
|
|
508
|
+
name?: string;
|
|
509
|
+
}
|
|
510
|
+
declare function createWebSearchTool(options: WebSearchToolOptions): ToolDefinition<{
|
|
511
|
+
query: string;
|
|
512
|
+
type?: string | undefined;
|
|
513
|
+
count?: number | undefined;
|
|
514
|
+
description?: string | undefined;
|
|
515
|
+
offset?: number | undefined;
|
|
516
|
+
safe?: boolean | undefined;
|
|
517
|
+
domains?: string[] | undefined;
|
|
518
|
+
recencyDays?: number | undefined;
|
|
519
|
+
lang?: string | undefined;
|
|
520
|
+
region?: string | undefined;
|
|
521
|
+
hydrateMeta?: boolean | undefined;
|
|
522
|
+
}, ToolOutputEnvelope, undefined, {
|
|
523
|
+
type: "object";
|
|
524
|
+
properties: {
|
|
525
|
+
description: {
|
|
526
|
+
type: "string";
|
|
527
|
+
};
|
|
528
|
+
query: {
|
|
529
|
+
type: "string";
|
|
530
|
+
};
|
|
531
|
+
count: {
|
|
532
|
+
type: "number";
|
|
533
|
+
};
|
|
534
|
+
offset: {
|
|
535
|
+
type: "number";
|
|
536
|
+
};
|
|
537
|
+
domains: {
|
|
538
|
+
type: "array";
|
|
539
|
+
items: {
|
|
540
|
+
type: "string";
|
|
541
|
+
};
|
|
542
|
+
};
|
|
543
|
+
recencyDays: {
|
|
544
|
+
type: "number";
|
|
545
|
+
};
|
|
546
|
+
lang: {
|
|
547
|
+
type: "string";
|
|
548
|
+
};
|
|
549
|
+
region: {
|
|
550
|
+
type: "string";
|
|
551
|
+
};
|
|
552
|
+
safe: {
|
|
553
|
+
type: "boolean";
|
|
554
|
+
};
|
|
555
|
+
type: {
|
|
556
|
+
type: "string";
|
|
557
|
+
};
|
|
558
|
+
hydrateMeta: {
|
|
559
|
+
type: "boolean";
|
|
560
|
+
};
|
|
561
|
+
};
|
|
562
|
+
required: readonly ["query"];
|
|
563
|
+
}>;
|
|
564
|
+
|
|
476
565
|
declare function resolveWorkspacePath(rootDir: string, inputPath: string): string;
|
|
566
|
+
declare function resolveAllowedPath(rootDir: string, allowedDirs: readonly string[], inputPath: string): string;
|
|
477
567
|
declare function assertWorkspaceFile(filePath: string): Promise<void>;
|
|
478
568
|
declare function isProbablyBinary(buffer: Buffer): boolean;
|
|
479
569
|
|
|
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 };
|
|
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 };
|