@juspay/neurolink 12.27.1 → 12.28.0
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/CHANGELOG.md +3 -3
- package/dist/agent/directTools.d.ts +118 -94
- package/dist/agent/directTools.js +578 -446
- package/dist/agent/index.d.ts +1 -0
- package/dist/agent/index.js +1 -0
- package/dist/agent/prompts/terminalAgentPrompt.d.ts +13 -0
- package/dist/agent/prompts/terminalAgentPrompt.js +59 -0
- package/dist/browser/neurolink.min.js +382 -378
- package/dist/cli/factories/commandFactory.d.ts +25 -0
- package/dist/cli/factories/commandFactory.js +94 -8
- package/dist/cli/loop/optionsSchema.d.ts +1 -1
- package/dist/cli/loop/session.js +6 -0
- package/dist/cli/utils/stdinRef.d.ts +16 -0
- package/dist/cli/utils/stdinRef.js +21 -0
- package/dist/core/baseProvider.d.ts +17 -1
- package/dist/core/baseProvider.js +48 -1
- package/dist/core/modules/ToolsManager.d.ts +7 -1
- package/dist/core/modules/ToolsManager.js +8 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/mcp/externalServerManager.js +173 -8
- package/dist/mcp/mcpCircuitBreaker.d.ts +8 -3
- package/dist/mcp/mcpCircuitBreaker.js +25 -9
- package/dist/mcp/mcpClientFactory.d.ts +9 -4
- package/dist/mcp/mcpClientFactory.js +26 -15
- package/dist/mcp/toolDiscoveryService.d.ts +8 -3
- package/dist/mcp/toolDiscoveryService.js +17 -7
- package/dist/mcp/toolRegistry.d.ts +12 -1
- package/dist/mcp/toolRegistry.js +26 -2
- package/dist/neurolink.d.ts +13 -0
- package/dist/neurolink.js +97 -10
- package/dist/session/globalSessionState.d.ts +8 -0
- package/dist/session/globalSessionState.js +17 -0
- package/dist/types/agentMode.d.ts +9 -0
- package/dist/types/agentMode.js +1 -0
- package/dist/types/cli.d.ts +6 -0
- package/dist/types/config.d.ts +9 -0
- package/dist/types/fileToolRoots.d.ts +17 -0
- package/dist/types/fileToolRoots.js +7 -0
- package/dist/types/generate.d.ts +17 -0
- package/dist/types/index.d.ts +2 -0
- package/dist/types/index.js +2 -0
- package/dist/types/providers.d.ts +6 -0
- package/dist/types/stream.d.ts +7 -0
- package/dist/types/tools.d.ts +7 -0
- package/dist/utils/fileToolRoots.d.ts +34 -0
- package/dist/utils/fileToolRoots.js +111 -0
- package/dist/utils/pathSandbox.d.ts +9 -6
- package/dist/utils/pathSandbox.js +35 -9
- package/docs-site/static/search-index.json +6 -5
- package/package.json +6 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
## [12.
|
|
1
|
+
## [12.28.0](https://github.com/juspay/neurolink/compare/v12.27.2...v12.28.0) (2026-09-26)
|
|
2
2
|
|
|
3
|
-
###
|
|
3
|
+
### Features
|
|
4
4
|
|
|
5
|
-
- **(
|
|
5
|
+
- **(agent):** add terminal agent mode, file-tool roots and a TUA-Bench harness ([91c9eba](https://github.com/juspay/neurolink/commit/91c9eba0d4afec7d42eecab799ad7bffc51c6f35))
|
|
6
6
|
|
|
7
7
|
## [11.2.3](https://github.com/juspay/neurolink/compare/v11.2.2...v11.2.3) (2026-08-19)
|
|
8
8
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { AllToolsMap, BasicToolsMap, FilesystemToolsMap, Tool, UtilityToolsMap } from "../types/index.js";
|
|
1
|
+
import type { AllToolsMap, FileToolRootPolicy, BasicToolsMap, FilesystemToolsMap, Tool, UtilityToolsMap } from "../types/index.js";
|
|
2
2
|
/**
|
|
3
3
|
* Vertex location for the websearchGrounding tool:
|
|
4
4
|
* NEUROLINK_WEBSEARCH_LOCATION, else `global`.
|
|
@@ -65,10 +65,13 @@ export declare function buildWebsearchResults(groundingMetadata: {
|
|
|
65
65
|
domain: string;
|
|
66
66
|
}[];
|
|
67
67
|
/**
|
|
68
|
-
* Direct tool definitions that work immediately with Gemini/AI SDK
|
|
69
|
-
* These bypass MCP complexity and provide reliable agent functionality
|
|
68
|
+
* Direct tool definitions that work immediately with Gemini/AI SDK.
|
|
69
|
+
* These bypass MCP complexity and provide reliable agent functionality.
|
|
70
|
+
*
|
|
71
|
+
* `createDirectAgentTools` builds a fresh set bound to `policy`; the shared
|
|
72
|
+
* `directAgentTools` below keeps the working-directory default.
|
|
70
73
|
*/
|
|
71
|
-
export declare
|
|
74
|
+
export declare function createDirectAgentTools(policy: FileToolRootPolicy): {
|
|
72
75
|
getCurrentTime: Tool<{
|
|
73
76
|
timezone?: string | undefined;
|
|
74
77
|
}, {
|
|
@@ -93,57 +96,136 @@ export declare const directAgentTools: {
|
|
|
93
96
|
iso?: undefined;
|
|
94
97
|
timestamp?: undefined;
|
|
95
98
|
}>;
|
|
96
|
-
readFile: Tool
|
|
97
|
-
|
|
99
|
+
readFile: Tool;
|
|
100
|
+
listDirectory: Tool;
|
|
101
|
+
calculateMath: Tool<{
|
|
102
|
+
expression: string;
|
|
103
|
+
precision: number;
|
|
98
104
|
}, {
|
|
99
105
|
success: boolean;
|
|
100
106
|
error: string;
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
lastModified?: undefined;
|
|
107
|
+
expression?: undefined;
|
|
108
|
+
result?: undefined;
|
|
109
|
+
type?: undefined;
|
|
105
110
|
} | {
|
|
106
111
|
success: boolean;
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
lastModified: string;
|
|
112
|
+
expression: string;
|
|
113
|
+
result: any;
|
|
114
|
+
type: "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function";
|
|
111
115
|
error?: undefined;
|
|
112
116
|
} | {
|
|
113
117
|
success: boolean;
|
|
114
118
|
error: string;
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
lastModified?: undefined;
|
|
119
|
+
expression: string;
|
|
120
|
+
result?: undefined;
|
|
121
|
+
type?: undefined;
|
|
119
122
|
}>;
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
+
writeFile: Tool;
|
|
124
|
+
analyzeCSV: Tool;
|
|
125
|
+
websearchGrounding: Tool<{
|
|
126
|
+
query: string;
|
|
127
|
+
maxResults: number;
|
|
128
|
+
maxWords: number;
|
|
123
129
|
}, {
|
|
124
130
|
success: boolean;
|
|
125
131
|
error: string;
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
132
|
+
requiredEnvVars: string[];
|
|
133
|
+
query?: undefined;
|
|
134
|
+
searchResults?: undefined;
|
|
135
|
+
rawContent?: undefined;
|
|
136
|
+
totalResults?: undefined;
|
|
137
|
+
provider?: undefined;
|
|
138
|
+
model?: undefined;
|
|
139
|
+
responseTime?: undefined;
|
|
140
|
+
timestamp?: undefined;
|
|
141
|
+
grounded?: undefined;
|
|
129
142
|
} | {
|
|
130
143
|
success: boolean;
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
144
|
+
error: string;
|
|
145
|
+
query: string;
|
|
146
|
+
requiredEnvVars?: undefined;
|
|
147
|
+
searchResults?: undefined;
|
|
148
|
+
rawContent?: undefined;
|
|
149
|
+
totalResults?: undefined;
|
|
150
|
+
provider?: undefined;
|
|
151
|
+
model?: undefined;
|
|
152
|
+
responseTime?: undefined;
|
|
153
|
+
timestamp?: undefined;
|
|
154
|
+
grounded?: undefined;
|
|
155
|
+
} | {
|
|
156
|
+
success: boolean;
|
|
157
|
+
query: string;
|
|
158
|
+
searchResults: {
|
|
159
|
+
title: string;
|
|
160
|
+
url: string;
|
|
161
|
+
snippet: string;
|
|
162
|
+
domain: string;
|
|
137
163
|
}[];
|
|
138
|
-
|
|
164
|
+
rawContent: string;
|
|
165
|
+
totalResults: number;
|
|
166
|
+
provider: string;
|
|
167
|
+
model: string;
|
|
168
|
+
responseTime: number;
|
|
169
|
+
timestamp: number;
|
|
170
|
+
grounded: boolean;
|
|
171
|
+
error?: undefined;
|
|
172
|
+
requiredEnvVars?: undefined;
|
|
173
|
+
} | {
|
|
174
|
+
success: boolean;
|
|
175
|
+
error: string;
|
|
176
|
+
query: string;
|
|
177
|
+
provider: string;
|
|
178
|
+
requiredEnvVars?: undefined;
|
|
179
|
+
searchResults?: undefined;
|
|
180
|
+
rawContent?: undefined;
|
|
181
|
+
totalResults?: undefined;
|
|
182
|
+
model?: undefined;
|
|
183
|
+
responseTime?: undefined;
|
|
184
|
+
timestamp?: undefined;
|
|
185
|
+
grounded?: undefined;
|
|
186
|
+
}>;
|
|
187
|
+
};
|
|
188
|
+
/**
|
|
189
|
+
* Bash command execution tool - exported separately for opt-in use.
|
|
190
|
+
*
|
|
191
|
+
* SECURITY: This tool is NOT included in directAgentTools by default.
|
|
192
|
+
* It must be explicitly enabled via:
|
|
193
|
+
* - Environment variable: NEUROLINK_ENABLE_BASH_TOOL=true
|
|
194
|
+
* - Config: toolConfig.enableBashTool = true
|
|
195
|
+
*
|
|
196
|
+
* Import this directly when you need bash execution capabilities:
|
|
197
|
+
* import { bashTool } from '../agent/directTools.js';
|
|
198
|
+
*/
|
|
199
|
+
export declare function createBashTool(policy: FileToolRootPolicy): Tool;
|
|
200
|
+
/** The opt-in bash tool with the working-directory default. */
|
|
201
|
+
export declare const bashTool: Tool;
|
|
202
|
+
export declare const directAgentTools: {
|
|
203
|
+
getCurrentTime: Tool<{
|
|
204
|
+
timezone?: string | undefined;
|
|
205
|
+
}, {
|
|
206
|
+
success: boolean;
|
|
207
|
+
time: string;
|
|
208
|
+
timezone: string;
|
|
209
|
+
iso: string;
|
|
210
|
+
timestamp?: undefined;
|
|
211
|
+
error?: undefined;
|
|
212
|
+
} | {
|
|
213
|
+
success: boolean;
|
|
214
|
+
time: string;
|
|
215
|
+
iso: string;
|
|
216
|
+
timestamp: number;
|
|
217
|
+
timezone?: undefined;
|
|
139
218
|
error?: undefined;
|
|
140
219
|
} | {
|
|
141
220
|
success: boolean;
|
|
142
221
|
error: string;
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
222
|
+
time?: undefined;
|
|
223
|
+
timezone?: undefined;
|
|
224
|
+
iso?: undefined;
|
|
225
|
+
timestamp?: undefined;
|
|
146
226
|
}>;
|
|
227
|
+
readFile: Tool;
|
|
228
|
+
listDirectory: Tool;
|
|
147
229
|
calculateMath: Tool<{
|
|
148
230
|
expression: string;
|
|
149
231
|
precision: number;
|
|
@@ -166,54 +248,8 @@ export declare const directAgentTools: {
|
|
|
166
248
|
result?: undefined;
|
|
167
249
|
type?: undefined;
|
|
168
250
|
}>;
|
|
169
|
-
writeFile: Tool
|
|
170
|
-
|
|
171
|
-
content: string;
|
|
172
|
-
mode: "create" | "append" | "overwrite";
|
|
173
|
-
}, {
|
|
174
|
-
success: boolean;
|
|
175
|
-
error: string;
|
|
176
|
-
path?: undefined;
|
|
177
|
-
mode?: undefined;
|
|
178
|
-
size?: undefined;
|
|
179
|
-
written?: undefined;
|
|
180
|
-
} | {
|
|
181
|
-
success: boolean;
|
|
182
|
-
path: string;
|
|
183
|
-
mode: "create" | "append" | "overwrite";
|
|
184
|
-
size: number;
|
|
185
|
-
written: number;
|
|
186
|
-
error?: undefined;
|
|
187
|
-
} | {
|
|
188
|
-
success: boolean;
|
|
189
|
-
error: string;
|
|
190
|
-
path: string;
|
|
191
|
-
mode?: undefined;
|
|
192
|
-
size?: undefined;
|
|
193
|
-
written?: undefined;
|
|
194
|
-
}>;
|
|
195
|
-
analyzeCSV: Tool<{
|
|
196
|
-
filePath: string;
|
|
197
|
-
operation: "count_by_column" | "sum_by_column" | "average_by_column" | "min_max_by_column" | "describe";
|
|
198
|
-
column: string;
|
|
199
|
-
maxRows: number;
|
|
200
|
-
}, {
|
|
201
|
-
success: boolean;
|
|
202
|
-
operation: "count_by_column" | "sum_by_column" | "average_by_column" | "min_max_by_column" | "describe";
|
|
203
|
-
column: string;
|
|
204
|
-
result: string;
|
|
205
|
-
rowCount: number;
|
|
206
|
-
} | {
|
|
207
|
-
success: boolean;
|
|
208
|
-
error: string;
|
|
209
|
-
operation?: undefined;
|
|
210
|
-
column?: undefined;
|
|
211
|
-
} | {
|
|
212
|
-
success: boolean;
|
|
213
|
-
error: string;
|
|
214
|
-
operation: "count_by_column" | "sum_by_column" | "average_by_column" | "min_max_by_column" | "describe";
|
|
215
|
-
column: string;
|
|
216
|
-
}>;
|
|
251
|
+
writeFile: Tool;
|
|
252
|
+
analyzeCSV: Tool;
|
|
217
253
|
websearchGrounding: Tool<{
|
|
218
254
|
query: string;
|
|
219
255
|
maxResults: number;
|
|
@@ -277,18 +313,6 @@ export declare const directAgentTools: {
|
|
|
277
313
|
grounded?: undefined;
|
|
278
314
|
}>;
|
|
279
315
|
};
|
|
280
|
-
/**
|
|
281
|
-
* Bash command execution tool - exported separately for opt-in use.
|
|
282
|
-
*
|
|
283
|
-
* SECURITY: This tool is NOT included in directAgentTools by default.
|
|
284
|
-
* It must be explicitly enabled via:
|
|
285
|
-
* - Environment variable: NEUROLINK_ENABLE_BASH_TOOL=true
|
|
286
|
-
* - Config: toolConfig.enableBashTool = true
|
|
287
|
-
*
|
|
288
|
-
* Import this directly when you need bash execution capabilities:
|
|
289
|
-
* import { bashTool } from '../agent/directTools.js';
|
|
290
|
-
*/
|
|
291
|
-
export declare const bashTool: Tool;
|
|
292
316
|
/**
|
|
293
317
|
* Get a subset of tools for specific use cases with improved type safety
|
|
294
318
|
*/
|