@nuvin/agent-core 0.0.0-rc.2 → 0.0.0-rc.20

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.
Files changed (92) hide show
  1. package/dist/VERSION +2 -2
  2. package/dist/agent/agent.d.ts +28 -0
  3. package/dist/agent/context-compactor.d.ts +8 -0
  4. package/dist/agent/extension-registry.d.ts +3 -0
  5. package/dist/agent/index.d.ts +8 -30
  6. package/dist/agent/index.js +1 -1
  7. package/dist/agent/messages-to-text.d.ts +3 -0
  8. package/dist/agent/metrics.d.ts +30 -0
  9. package/dist/agent/topic-reminder-extension.d.ts +32 -0
  10. package/dist/agent/turn-engine.d.ts +3 -0
  11. package/dist/chunk-FFIZ6TKW.js +1 -0
  12. package/dist/chunk-HRU363DY.js +1 -0
  13. package/dist/chunk-NHBKADBW.js +1 -0
  14. package/dist/chunk-NYZR4XKO.js +1 -1
  15. package/dist/chunk-QDOE7NWO.js +1 -0
  16. package/dist/chunk-X7VAACWY.js +1 -1
  17. package/dist/formats/base64-image-content.d.ts +4 -0
  18. package/dist/formats/index.d.ts +4 -25
  19. package/dist/formats/index.js +1 -1
  20. package/dist/formats/message-format.d.ts +33 -0
  21. package/dist/formats/provider-adapters.d.ts +3 -0
  22. package/dist/hooks/executor.d.ts +3 -0
  23. package/dist/hooks/extensions.d.ts +28 -0
  24. package/dist/hooks/index.d.ts +7 -0
  25. package/dist/hooks/index.js +1 -0
  26. package/dist/hooks/registry.d.ts +8 -0
  27. package/dist/hooks/types.d.ts +40 -0
  28. package/dist/lsp/client.d.ts +11 -0
  29. package/dist/lsp/index.d.ts +24 -0
  30. package/dist/lsp/installer.d.ts +11 -0
  31. package/dist/lsp/language.d.ts +2 -0
  32. package/dist/lsp/server.d.ts +6 -0
  33. package/dist/lsp/types.d.ts +68 -0
  34. package/dist/models/anthropic-model.d.ts +27 -0
  35. package/dist/models/anthropic-surface.d.ts +5 -0
  36. package/dist/models/chat-model.d.ts +31 -0
  37. package/dist/models/github-model.d.ts +32 -0
  38. package/dist/models/http-transport.d.ts +10 -0
  39. package/dist/models/index.d.ts +16 -344
  40. package/dist/models/index.js +1 -1
  41. package/dist/models/mock-model.d.ts +15 -0
  42. package/dist/models/model-errors.d.ts +16 -0
  43. package/dist/models/model-limits.d.ts +7 -0
  44. package/dist/models/model-registry.d.ts +44 -0
  45. package/dist/models/model-surface-router.d.ts +19 -0
  46. package/dist/models/model-transports.d.ts +17 -0
  47. package/dist/models/openai-model.d.ts +67 -0
  48. package/dist/models/openai-surfaces.d.ts +74 -0
  49. package/dist/models/provider-adapter.d.ts +23 -0
  50. package/dist/models/provider-session.d.ts +16 -0
  51. package/dist/models/routed-model.d.ts +90 -0
  52. package/dist/shared/abort.d.ts +9 -0
  53. package/dist/shared/index.d.ts +5 -17
  54. package/dist/shared/index.js +1 -1
  55. package/dist/shared/reasoning-config.d.ts +5 -0
  56. package/dist/shared/turn-failed.d.ts +6 -0
  57. package/dist/shared/types.d.ts +737 -0
  58. package/dist/tools/ask-user-tool.d.ts +55 -0
  59. package/dist/tools/bash-tool.d.ts +63 -0
  60. package/dist/tools/command-tool.d.ts +23 -0
  61. package/dist/tools/file-edit-tool.d.ts +29 -0
  62. package/dist/tools/file-new-tool.d.ts +21 -0
  63. package/dist/tools/file-read-tool.d.ts +27 -0
  64. package/dist/tools/glob-tool.d.ts +26 -0
  65. package/dist/tools/grep-tool.d.ts +34 -0
  66. package/dist/tools/index.d.ts +28 -480
  67. package/dist/tools/index.js +1 -1
  68. package/dist/tools/internal-tool-runtime.d.ts +8 -0
  69. package/dist/tools/ls-tool.d.ts +20 -0
  70. package/dist/tools/lsp-tool.d.ts +36 -0
  71. package/dist/tools/mcp-oauth-provider.d.ts +11 -0
  72. package/dist/tools/mcp-server-manager.d.ts +43 -0
  73. package/dist/tools/mcp-tool-adapter.d.ts +47 -0
  74. package/dist/tools/mock-tool-runtime.d.ts +3 -0
  75. package/dist/tools/ripgrep.d.ts +20 -0
  76. package/dist/tools/runtime-manager-tools.d.ts +58 -0
  77. package/dist/tools/safe-fetch.d.ts +36 -0
  78. package/dist/tools/skill-tool.d.ts +33 -0
  79. package/dist/tools/todo-write-tool.d.ts +66 -0
  80. package/dist/tools/tool-output-offload.d.ts +12 -0
  81. package/dist/tools/tools.d.ts +24 -0
  82. package/dist/tools/update-topic-tool.d.ts +12 -0
  83. package/dist/tools/view-file-tool.d.ts +22 -0
  84. package/dist/tools/web-fetch-tool.d.ts +23 -0
  85. package/dist/tools/web-search-tool.d.ts +75 -0
  86. package/dist/tools/workspace-paths.d.ts +5 -0
  87. package/package.json +17 -4
  88. package/dist/chunk-G2FR4UGO.js +0 -1
  89. package/dist/chunk-LXQDGX4K.js +0 -1
  90. package/dist/chunk-VFTQW5WK.js +0 -1
  91. package/dist/provider-adapters-Cb5hUJoD.d.ts +0 -5
  92. package/dist/types-QPBW5jHO.d.ts +0 -695
@@ -1,480 +1,28 @@
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';
3
- import { OAuthClientProvider } from '@modelcontextprotocol/sdk/client/auth.js';
4
- import { CallToolResult, ListToolsResult } from '@modelcontextprotocol/sdk/types.js';
5
-
6
- interface BashToolInput {
7
- command: string;
8
- cwd?: string;
9
- timeoutMs?: number;
10
- ignoreOutput?: boolean;
11
- }
12
- interface BashToolOptions {
13
- defaultCwd?: string;
14
- defaultTimeoutMs?: number;
15
- description?: string;
16
- env?: NodeJS.ProcessEnv;
17
- name?: string;
18
- shellPath?: string;
19
- stripAnsi?: boolean;
20
- }
21
- declare function createBashTool(options?: BashToolOptions): ToolDefinition<{
22
- command: string;
23
- cwd?: string | undefined;
24
- timeoutMs?: number | undefined;
25
- ignoreOutput?: boolean | undefined;
26
- }, string, ToolOutputEnvelope, {
27
- type: "object";
28
- properties: {
29
- command: {
30
- type: "string";
31
- };
32
- cwd: {
33
- type: "string";
34
- };
35
- timeoutMs: {
36
- type: "number";
37
- };
38
- ignoreOutput: {
39
- type: "boolean";
40
- };
41
- };
42
- required: readonly ["command"];
43
- }>;
44
- declare function createShellExecTool(options?: BashToolOptions): ToolDefinition<{
45
- command: string;
46
- cwd?: string | undefined;
47
- timeoutMs?: number | undefined;
48
- ignoreOutput?: boolean | undefined;
49
- }, string, ToolOutputEnvelope, {
50
- type: "object";
51
- properties: {
52
- command: {
53
- type: "string";
54
- };
55
- cwd: {
56
- type: "string";
57
- };
58
- timeoutMs: {
59
- type: "number";
60
- };
61
- ignoreOutput: {
62
- type: "boolean";
63
- };
64
- };
65
- required: readonly ["command"];
66
- }>;
67
-
68
- type CommandReference = CommandDefinitionReference;
69
- type LoadedCommand = SerializedCommandDefinition;
70
- interface CommandToolOptions<TRef extends CommandReference = CommandReference> {
71
- commands: TRef[];
72
- loadCommand: (reference: TRef) => Promise<LoadedCommand>;
73
- }
74
- declare function createInvokeCommandTool<TRef extends CommandReference>(options: CommandToolOptions<TRef>): ToolDefinition<{
75
- name: string;
76
- args?: string | undefined;
77
- }, ToolOutputEnvelope, undefined, {
78
- type: "object";
79
- properties: {
80
- name: {
81
- type: "string";
82
- };
83
- args: {
84
- type: "string";
85
- };
86
- };
87
- required: readonly ["name"];
88
- }>;
89
-
90
- interface FileEditToolOptions {
91
- defaultCwd?: string;
92
- name?: string;
93
- }
94
- declare function createFileEditTool(options?: FileEditToolOptions): ToolDefinition<{
95
- filePath: string;
96
- oldText: string;
97
- newText: string;
98
- dryRun?: boolean | undefined;
99
- }, ToolOutputEnvelope, undefined, {
100
- type: "object";
101
- properties: {
102
- filePath: {
103
- type: "string";
104
- };
105
- oldText: {
106
- type: "string";
107
- };
108
- newText: {
109
- type: "string";
110
- };
111
- dryRun: {
112
- type: "boolean";
113
- };
114
- };
115
- required: readonly ["filePath", "oldText", "newText"];
116
- }>;
117
-
118
- interface FileNewToolOptions {
119
- defaultCwd?: string;
120
- name?: string;
121
- }
122
- declare function createFileNewTool(options?: FileNewToolOptions): ToolDefinition<{
123
- content: string;
124
- filePath: string;
125
- }, ToolOutputEnvelope, undefined, {
126
- type: "object";
127
- properties: {
128
- filePath: {
129
- type: "string";
130
- };
131
- content: {
132
- type: "string";
133
- };
134
- };
135
- required: readonly ["filePath", "content"];
136
- }>;
137
-
138
- interface FileReadToolOptions {
139
- defaultCwd?: string;
140
- name?: string;
141
- }
142
- declare function createFileReadTool(options?: FileReadToolOptions): ToolDefinition<{
143
- path: string;
144
- lineStart?: number | undefined;
145
- lineEnd?: number | undefined;
146
- }, ToolOutputEnvelope, undefined, {
147
- type: "object";
148
- properties: {
149
- path: {
150
- type: "string";
151
- };
152
- lineStart: {
153
- type: "number";
154
- };
155
- lineEnd: {
156
- type: "number";
157
- };
158
- };
159
- required: readonly ["path"];
160
- }>;
161
-
162
- interface GlobToolOptions {
163
- defaultCwd?: string;
164
- limit?: number;
165
- name?: string;
166
- }
167
- declare function createGlobTool(options?: GlobToolOptions): ToolDefinition<{
168
- pattern: string;
169
- path?: string | undefined;
170
- limit?: number | undefined;
171
- }, ToolOutputEnvelope, undefined, {
172
- type: "object";
173
- properties: {
174
- pattern: {
175
- type: "string";
176
- };
177
- path: {
178
- type: "string";
179
- };
180
- limit: {
181
- type: "number";
182
- };
183
- };
184
- required: readonly ["pattern"];
185
- }>;
186
-
187
- interface GrepToolOptions {
188
- defaultCwd?: string;
189
- limit?: number;
190
- name?: string;
191
- }
192
- declare function createGrepTool(options?: GrepToolOptions): ToolDefinition<{
193
- pattern: string;
194
- path?: string | undefined;
195
- limit?: number | undefined;
196
- include?: string | undefined;
197
- context?: number | undefined;
198
- }, ToolOutputEnvelope, undefined, {
199
- type: "object";
200
- properties: {
201
- pattern: {
202
- type: "string";
203
- };
204
- path: {
205
- type: "string";
206
- };
207
- include: {
208
- type: "string";
209
- };
210
- limit: {
211
- type: "number";
212
- };
213
- context: {
214
- type: "number";
215
- };
216
- };
217
- required: readonly ["pattern"];
218
- }>;
219
-
220
- interface InternalToolRuntimeOptions {
221
- onEvent?: ToolRuntimeEventHandler;
222
- onToolCall?: ToolRuntimeToolCallHandler;
223
- }
224
- declare function createInternalToolRuntime(tools?: AnyToolDefinition[], options?: InternalToolRuntimeOptions): ToolRuntime;
225
-
226
- interface LsToolOptions {
227
- defaultCwd?: string;
228
- name?: string;
229
- }
230
- declare function createLsTool(options?: LsToolOptions): ToolDefinition<{
231
- path: string;
232
- limit: number;
233
- }, ToolOutputEnvelope, undefined, {
234
- type: "object";
235
- properties: {
236
- path: {
237
- type: "string";
238
- };
239
- limit: {
240
- type: "number";
241
- };
242
- };
243
- }>;
244
-
245
- interface McpOAuthProviderOptions {
246
- serverName: string;
247
- callbackUrl: string;
248
- storageDir: string;
249
- config: MCPAuthConfig;
250
- onRedirect(url: URL): void | Promise<void>;
251
- }
252
- declare function createMcpOAuthProvider(options: McpOAuthProviderOptions): OAuthClientProvider;
253
-
254
- interface McpToolDescriptor {
255
- name: string;
256
- description?: string;
257
- inputSchema?: unknown;
258
- }
259
- interface McpToolClient {
260
- callTool(input: {
261
- name: string;
262
- arguments?: JsonObject;
263
- }): Promise<CallToolResult>;
264
- }
265
- declare function createMcpToolName(serverName: string, toolName: string): string;
266
- declare function toNuvinToolSchema(inputSchema: unknown): JsonSchemaObject;
267
- declare function createMcpTool(options: {
268
- serverName: string;
269
- tool: McpToolDescriptor;
270
- client: McpToolClient;
271
- }): ToolDefinition<{
272
- [x: string]: string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | /*elided*/ any | {
273
- [x: string]: string | number | boolean | /*elided*/ any | /*elided*/ any;
274
- })[] | {
275
- [x: string]: string | number | boolean | (string | number | boolean | /*elided*/ any | /*elided*/ any)[] | /*elided*/ any;
276
- })[] | {
277
- [x: string]: string | number | boolean | (string | number | boolean | (string | number | boolean | /*elided*/ any | /*elided*/ any)[] | /*elided*/ any)[] | /*elided*/ any;
278
- })[] | {
279
- [x: string]: string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | /*elided*/ any | /*elided*/ any)[] | /*elided*/ any)[] | /*elided*/ any)[] | /*elided*/ any;
280
- })[] | {
281
- [x: string]: string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | /*elided*/ any | /*elided*/ any)[] | /*elided*/ any)[] | /*elided*/ any)[] | /*elided*/ any)[] | /*elided*/ any;
282
- })[] | {
283
- [x: string]: string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | /*elided*/ any | /*elided*/ any)[] | /*elided*/ any)[] | /*elided*/ any)[] | /*elided*/ any)[] | /*elided*/ any)[] | /*elided*/ any;
284
- })[] | {
285
- [x: string]: string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | /*elided*/ any | /*elided*/ any)[] | /*elided*/ any)[] | /*elided*/ any)[] | /*elided*/ any)[] | /*elided*/ any)[] | /*elided*/ any)[] | /*elided*/ any;
286
- })[] | {
287
- [x: string]: string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | /*elided*/ any | /*elided*/ any)[] | /*elided*/ any)[] | /*elided*/ any)[] | /*elided*/ any)[] | /*elided*/ any)[] | /*elided*/ any)[] | /*elided*/ any)[] | /*elided*/ any;
288
- })[] | {
289
- [x: string]: string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | /*elided*/ any | /*elided*/ any)[] | /*elided*/ any)[] | /*elided*/ any)[] | /*elided*/ any)[] | /*elided*/ any)[] | /*elided*/ any)[] | /*elided*/ any)[] | /*elided*/ any)[] | /*elided*/ any;
290
- })[] | {
291
- [x: string]: string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | /*elided*/ any | /*elided*/ any)[] | /*elided*/ any)[] | /*elided*/ any)[] | /*elided*/ any)[] | /*elided*/ any)[] | /*elided*/ any)[] | /*elided*/ any)[] | /*elided*/ any)[] | /*elided*/ any)[] | /*elided*/ any;
292
- })[] | {
293
- [x: string]: string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | /*elided*/ any | /*elided*/ any)[] | /*elided*/ any)[] | /*elided*/ any)[] | /*elided*/ any)[] | /*elided*/ any)[] | /*elided*/ any)[] | /*elided*/ any)[] | /*elided*/ any)[] | /*elided*/ any)[] | /*elided*/ any)[] | /*elided*/ any;
294
- })[] | {
295
- [x: string]: string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | /*elided*/ any | /*elided*/ any)[] | /*elided*/ any)[] | /*elided*/ any)[] | /*elided*/ any)[] | /*elided*/ any)[] | /*elided*/ any)[] | /*elided*/ any)[] | /*elided*/ any)[] | /*elided*/ any)[] | /*elided*/ any)[] | /*elided*/ any)[] | /*elided*/ any;
296
- };
297
- }, ToolOutputEnvelope, undefined, JsonSchemaObject<Record<string, JsonSchema>, readonly string[] | undefined>>;
298
-
299
- interface ConnectedMcpClient extends McpToolClient {
300
- listTools(): Promise<ListToolsResult>;
301
- close(): Promise<void>;
302
- }
303
- type McpServerConnectionStatus = {
304
- status: "connected";
305
- toolCount: number;
306
- } | {
307
- status: "disabled";
308
- } | {
309
- status: "authRequired";
310
- message: string;
311
- } | {
312
- status: "error";
313
- message: string;
314
- };
315
- interface McpToolBundle {
316
- tools: AnyToolDefinition[];
317
- servers: Record<string, McpServerConnectionStatus>;
318
- close(): Promise<void>;
319
- }
320
- interface McpConnectionOptions {
321
- oauth?: {
322
- storageDir: string;
323
- callbackUrl: string;
324
- onRedirect(serverName: string, url: URL): void | Promise<void>;
325
- };
326
- }
327
- type McpConnector = (serverName: string, config: MCPServerConfig, options?: McpConnectionOptions) => Promise<ConnectedMcpClient>;
328
- declare function buildMcpHttpHeaders(config: MCPServerConfig): Record<string, string> | undefined;
329
- declare function connectMcpServer(serverName: string, config: MCPServerConfig, options?: McpConnectionOptions): Promise<ConnectedMcpClient>;
330
- declare function createMcpToolsFromServers(options: {
331
- servers?: Record<string, MCPServerConfig>;
332
- allowedTools?: Record<string, Record<string, boolean>>;
333
- connection?: McpConnectionOptions;
334
- connect?: McpConnector;
335
- }): Promise<McpToolBundle>;
336
-
337
- declare function createMockToolRuntime(): ToolRuntime;
338
-
339
- type RipgrepMatch = {
340
- filePath: string;
341
- isContext?: boolean;
342
- lineNum: number;
343
- lineText: string;
344
- };
345
- declare function filepath(): Promise<string>;
346
- declare function files(opts: {
347
- cwd: string;
348
- glob?: string[];
349
- }): AsyncGenerator<string>;
350
- declare function search(opts: {
351
- context?: number;
352
- cwd: string;
353
- file?: string;
354
- glob?: string;
355
- limit?: number;
356
- pattern: string;
357
- }): Promise<RipgrepMatch[]>;
358
-
359
- interface DelegatedAgentFactoryContext extends AgentDefinitionFactoryContext {
360
- parentSessionId: string;
361
- runId: string;
362
- }
363
- type DelegatedAgentDefinition = AgentOptions | ((ctx: DelegatedAgentFactoryContext) => AgentOptions | Promise<AgentOptions>);
364
- interface CreateDelegationToolsOptions {
365
- agents?: Record<string, DelegatedAgentDefinition>;
366
- }
367
- declare function createAssignTaskTool(options: CreateDelegationToolsOptions): ToolDefinition<{
368
- task: string;
369
- agentId: string;
370
- }, ToolOutputEnvelope, ToolOutputEnvelope, {
371
- type: "object";
372
- properties: {
373
- agentId: {
374
- type: "string";
375
- };
376
- task: {
377
- type: "string";
378
- };
379
- };
380
- required: string[];
381
- }>;
382
- declare const createDelegateToAgentTool: typeof createAssignTaskTool;
383
- declare function createDelegationTools(options: CreateDelegationToolsOptions): ToolDefinition<{
384
- task: string;
385
- agentId: string;
386
- }, ToolOutputEnvelope, ToolOutputEnvelope, {
387
- type: "object";
388
- properties: {
389
- agentId: {
390
- type: "string";
391
- };
392
- task: {
393
- type: "string";
394
- };
395
- };
396
- required: string[];
397
- }>[];
398
-
399
- /** Minimal shape of a skill source reference — matches @nuvin/config SkillDefinitionSource */
400
- interface SkillSource {
401
- path: string;
402
- directory?: string;
403
- scope?: string;
404
- }
405
- /** Minimal shape of a skill reference — matches @nuvin/config SkillDefinitionReference */
406
- interface SkillReference {
407
- id: string;
408
- name: string;
409
- description: string;
410
- source: SkillSource;
411
- }
412
- /** Minimal shape of a loaded skill — matches @nuvin/config SerializedSkillDefinition */
413
- interface LoadedSkill extends SkillReference {
414
- instructions: string;
415
- }
416
- interface SkillToolOptions<TRef extends SkillReference = SkillReference> {
417
- skills: TRef[];
418
- loadSkill: (reference: TRef) => Promise<LoadedSkill>;
419
- }
420
- declare function createLoadSkillTool<TRef extends SkillReference>(options: SkillToolOptions<TRef>): ToolDefinition<{
421
- name: string;
422
- }, ToolOutputEnvelope, undefined, {
423
- type: "object";
424
- properties: {
425
- name: {
426
- type: "string";
427
- };
428
- };
429
- required: readonly ["name"];
430
- }>;
431
-
432
- declare function normalizeToolOutputValue(output: ToolOutputValue): ToolResultChunk;
433
- declare function createToolOutput(output: string, structured?: JsonObject, content?: ToolResultContent): ToolOutputEnvelope;
434
- declare class ToolExecutionError extends Error {
435
- readonly structured: JsonObject;
436
- constructor(message: string, structured?: JsonObject);
437
- }
438
- declare function defineTool<TSchema extends JsonSchemaObject, TYield extends ToolOutputValue = ToolOutputValue, TReturn extends ToolOutputValue | undefined = ToolOutputValue | undefined>(definition: {
439
- name: string;
440
- description: string;
441
- inputSchema: TSchema;
442
- execute(input: InferJsonSchema<TSchema>, ctx: ToolExecutionContext): AsyncGenerator<TYield, TReturn, void>;
443
- }): ToolDefinition<InferJsonSchema<TSchema>, TYield, TReturn, TSchema>;
444
- declare class ToolRegistry {
445
- private readonly toolsByName;
446
- constructor(tools?: AnyToolDefinition[]);
447
- register(tool: AnyToolDefinition): void;
448
- get(name: string): AnyToolDefinition | undefined;
449
- list(): AnyToolDefinition[];
450
- listToolSchemas(): ToolSchema[];
451
- }
452
- declare function validateToolInput<TSchema extends JsonSchemaObject>(input: JsonValue, schema: TSchema): InferJsonSchema<TSchema>;
453
- declare function deriveFinalToolOutput(chunks: ToolResultChunk[]): ToolResultChunk;
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
-
476
- declare function resolveWorkspacePath(rootDir: string, inputPath: string): string;
477
- declare function assertWorkspaceFile(filePath: string): Promise<void>;
478
- declare function isProbablyBinary(buffer: Buffer): boolean;
479
-
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 };
1
+ export * from "../lsp/index.ts";
2
+ export * from "./ask-user-tool.ts";
3
+ export * from "./bash-tool.ts";
4
+ export * from "./command-tool.ts";
5
+ export * from "./file-edit-tool.ts";
6
+ export * from "./file-new-tool.ts";
7
+ export * from "./file-read-tool.ts";
8
+ export * from "./glob-tool.ts";
9
+ export * from "./grep-tool.ts";
10
+ export * from "./internal-tool-runtime.ts";
11
+ export * from "./ls-tool.ts";
12
+ export * from "./lsp-tool.ts";
13
+ export * from "./mcp-oauth-provider.ts";
14
+ export * from "./mcp-server-manager.ts";
15
+ export * from "./mcp-tool-adapter.ts";
16
+ export * from "./mock-tool-runtime.ts";
17
+ export * from "./ripgrep.ts";
18
+ export * from "./runtime-manager-tools.ts";
19
+ export * from "./skill-tool.ts";
20
+ export * from "./todo-write-tool.ts";
21
+ export * from "./tool-output-offload.ts";
22
+ export * from "./tools.ts";
23
+ export * from "./update-topic-tool.ts";
24
+ export * from "./view-file-tool.ts";
25
+ export * from "./web-fetch-tool.ts";
26
+ export * from "./web-search-tool.ts";
27
+ export * from "./workspace-paths.ts";
28
+ //# sourceMappingURL=index.d.ts.map