@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.
@@ -1 +1 @@
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();}
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};
@@ -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 };