minovative-mind-cli 1.0.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.
Files changed (53) hide show
  1. package/README.md +418 -0
  2. package/bin/dev.cmd +3 -0
  3. package/bin/dev.js +5 -0
  4. package/bin/run.cmd +3 -0
  5. package/bin/run.js +5 -0
  6. package/dist/commands/chat.d.ts +7 -0
  7. package/dist/commands/chat.js +30 -0
  8. package/dist/commands/login.d.ts +5 -0
  9. package/dist/commands/login.js +18 -0
  10. package/dist/commands/logout.d.ts +5 -0
  11. package/dist/commands/logout.js +12 -0
  12. package/dist/index.d.ts +1 -0
  13. package/dist/index.js +1 -0
  14. package/dist/services/agent-tools.d.ts +36 -0
  15. package/dist/services/agent-tools.js +764 -0
  16. package/dist/services/agent.d.ts +21 -0
  17. package/dist/services/agent.js +648 -0
  18. package/dist/services/ai.d.ts +60 -0
  19. package/dist/services/ai.js +331 -0
  20. package/dist/services/auth.d.ts +3 -0
  21. package/dist/services/auth.js +183 -0
  22. package/dist/services/changeLogger.d.ts +23 -0
  23. package/dist/services/changeLogger.js +57 -0
  24. package/dist/services/contextAgent.d.ts +20 -0
  25. package/dist/services/contextAgent.js +440 -0
  26. package/dist/services/proxyClient.d.ts +21 -0
  27. package/dist/services/proxyClient.js +119 -0
  28. package/dist/services/verificationService.d.ts +10 -0
  29. package/dist/services/verificationService.js +148 -0
  30. package/dist/utils/atomicWrite.d.ts +6 -0
  31. package/dist/utils/atomicWrite.js +29 -0
  32. package/dist/utils/config.d.ts +17 -0
  33. package/dist/utils/config.js +17 -0
  34. package/dist/utils/contextPrompts.d.ts +3 -0
  35. package/dist/utils/contextPrompts.js +34 -0
  36. package/dist/utils/dependencyTracer.d.ts +48 -0
  37. package/dist/utils/dependencyTracer.js +647 -0
  38. package/dist/utils/excludedExtensions.d.ts +8 -0
  39. package/dist/utils/excludedExtensions.js +125 -0
  40. package/dist/utils/fuzzyMatch.d.ts +21 -0
  41. package/dist/utils/fuzzyMatch.js +121 -0
  42. package/dist/utils/logger.d.ts +8 -0
  43. package/dist/utils/logger.js +17 -0
  44. package/dist/utils/pathSecurity.d.ts +10 -0
  45. package/dist/utils/pathSecurity.js +26 -0
  46. package/dist/utils/symbolExtractor.d.ts +6 -0
  47. package/dist/utils/symbolExtractor.js +249 -0
  48. package/dist/utils/syntaxValidator.d.ts +5 -0
  49. package/dist/utils/syntaxValidator.js +81 -0
  50. package/dist/utils/systemPrompts.d.ts +5 -0
  51. package/dist/utils/systemPrompts.js +119 -0
  52. package/oclif.manifest.json +69 -0
  53. package/package.json +81 -0
package/README.md ADDED
@@ -0,0 +1,418 @@
1
+ # Minovative Mind CLI
2
+
3
+ An automated AI agent powered by Vertex AI that helps you write software right inside your terminal.
4
+
5
+ [![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)
6
+ [![Version](https://img.shields.io/npm/v/minovative-mind-cli.svg)](https://npmjs.org/package/minovative-mind-cli)
7
+ [![Downloads/week](https://img.shields.io/npm/dw/minovative-mind-cli.svg)](https://npmjs.org/package/minovative-mind-cli)
8
+
9
+ See [FEATURES.md](./FEATURES.md) and [ARCHITECTURE.md](./ARCHITECTURE.md) to learn more about the built-in safety, context intelligence, and self-correction systems.
10
+
11
+ ## Supported Models
12
+
13
+ The CLI supports the following advanced reasoning and coding models via Vertex AI Model Garden. You can hot-swap between these models at any time during a chat session by typing `/models` in the CLI:
14
+
15
+ - **Gemini 2.5 Pro**: Best for complex coding and large context windows.
16
+ - **Gemini 2.5 Flash**: Lightning fast, balanced performance for everyday tasks.
17
+ - **Claude Opus 4.6**: Anthropic's highly capable model for complex reasoning.
18
+ - **Claude Sonnet 4.6**: Anthropic's fast and highly intelligent coding model.
19
+
20
+ Note: Background utility tasks (like Intent Routing, Context Investigation, and Auto-Commits) are hardcoded to use fast, lightweight Gemini models (Flash and Flash-Lite) to keep the CLI snappy and cost-effective, reserving your selected model exclusively for the heavy lifting of writing code.
21
+
22
+ <!-- toc -->
23
+ * [Minovative Mind CLI](#minovative-mind-cli)
24
+ * [Usage](#usage)
25
+ * [Commands](#commands)
26
+ <!-- tocstop -->
27
+
28
+ # Usage
29
+
30
+ <!-- usage -->
31
+ ```sh-session
32
+ $ npm install -g minovative-mind-cli
33
+ $ minovative-mind-cli COMMAND
34
+ running command...
35
+ $ minovative-mind-cli (--version)
36
+ minovative-mind-cli/1.0.0 darwin-arm64 node-v25.6.1
37
+ $ minovative-mind-cli --help [COMMAND]
38
+ USAGE
39
+ $ minovative-mind-cli COMMAND
40
+ ...
41
+ ```
42
+ <!-- usagestop -->
43
+
44
+ # Commands
45
+
46
+ <!-- commands -->
47
+ * [`minovative-mind-cli chat`](#minovative-mind-cli-chat)
48
+ * [`minovative-mind-cli help [COMMAND]`](#minovative-mind-cli-help-command)
49
+ * [`minovative-mind-cli login`](#minovative-mind-cli-login)
50
+ * [`minovative-mind-cli logout`](#minovative-mind-cli-logout)
51
+ * [`minovative-mind-cli plugins`](#minovative-mind-cli-plugins)
52
+ * [`minovative-mind-cli plugins add PLUGIN`](#minovative-mind-cli-plugins-add-plugin)
53
+ * [`minovative-mind-cli plugins:inspect PLUGIN...`](#minovative-mind-cli-pluginsinspect-plugin)
54
+ * [`minovative-mind-cli plugins install PLUGIN`](#minovative-mind-cli-plugins-install-plugin)
55
+ * [`minovative-mind-cli plugins link PATH`](#minovative-mind-cli-plugins-link-path)
56
+ * [`minovative-mind-cli plugins remove [PLUGIN]`](#minovative-mind-cli-plugins-remove-plugin)
57
+ * [`minovative-mind-cli plugins reset`](#minovative-mind-cli-plugins-reset)
58
+ * [`minovative-mind-cli plugins uninstall [PLUGIN]`](#minovative-mind-cli-plugins-uninstall-plugin)
59
+ * [`minovative-mind-cli plugins unlink [PLUGIN]`](#minovative-mind-cli-plugins-unlink-plugin)
60
+ * [`minovative-mind-cli plugins update`](#minovative-mind-cli-plugins-update)
61
+
62
+ ## `minovative-mind-cli chat`
63
+
64
+ Start an interactive AI coding agent session powered by Vertex AI.
65
+
66
+ ```
67
+ USAGE
68
+ $ minovative-mind-cli chat
69
+
70
+ DESCRIPTION
71
+ Start an interactive AI coding agent session powered by Vertex AI.
72
+
73
+ EXAMPLES
74
+ $ minovative-mind-cli
75
+
76
+ $ minovative-mind-cli --help
77
+ ```
78
+
79
+ _See code: [src/commands/chat.ts](https://github.com/quarantiine/minovative-mind-cli/blob/v1.0.0/src/commands/chat.ts)_
80
+
81
+ ## `minovative-mind-cli help [COMMAND]`
82
+
83
+ Display help for minovative-mind-cli.
84
+
85
+ ```
86
+ USAGE
87
+ $ minovative-mind-cli help [COMMAND...] [-n]
88
+
89
+ ARGUMENTS
90
+ [COMMAND...] Command to show help for.
91
+
92
+ FLAGS
93
+ -n, --nested-commands Include all nested commands in the output.
94
+
95
+ DESCRIPTION
96
+ Display help for minovative-mind-cli.
97
+ ```
98
+
99
+ _See code: [@oclif/plugin-help](https://github.com/oclif/plugin-help/blob/6.2.50/src/commands/help.ts)_
100
+
101
+ ## `minovative-mind-cli login`
102
+
103
+ Sign in to your Minovative Mind account using GitHub
104
+
105
+ ```
106
+ USAGE
107
+ $ minovative-mind-cli login
108
+
109
+ DESCRIPTION
110
+ Sign in to your Minovative Mind account using GitHub
111
+ ```
112
+
113
+ _See code: [src/commands/login.ts](https://github.com/quarantiine/minovative-mind-cli/blob/v1.0.0/src/commands/login.ts)_
114
+
115
+ ## `minovative-mind-cli logout`
116
+
117
+ Sign out of your Minovative Mind account
118
+
119
+ ```
120
+ USAGE
121
+ $ minovative-mind-cli logout
122
+
123
+ DESCRIPTION
124
+ Sign out of your Minovative Mind account
125
+ ```
126
+
127
+ _See code: [src/commands/logout.ts](https://github.com/quarantiine/minovative-mind-cli/blob/v1.0.0/src/commands/logout.ts)_
128
+
129
+ ## `minovative-mind-cli plugins`
130
+
131
+ List installed plugins.
132
+
133
+ ```
134
+ USAGE
135
+ $ minovative-mind-cli plugins [--json] [--core]
136
+
137
+ FLAGS
138
+ --core Show core plugins.
139
+
140
+ GLOBAL FLAGS
141
+ --json Format output as json.
142
+
143
+ DESCRIPTION
144
+ List installed plugins.
145
+
146
+ EXAMPLES
147
+ $ minovative-mind-cli plugins
148
+ ```
149
+
150
+ _See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/5.4.72/src/commands/plugins/index.ts)_
151
+
152
+ ## `minovative-mind-cli plugins add PLUGIN`
153
+
154
+ Installs a plugin into minovative-mind-cli.
155
+
156
+ ```
157
+ USAGE
158
+ $ minovative-mind-cli plugins add PLUGIN... [--json] [-f] [-h] [-s | -v]
159
+
160
+ ARGUMENTS
161
+ PLUGIN... Plugin to install.
162
+
163
+ FLAGS
164
+ -f, --force Force npm to fetch remote resources even if a local copy exists on disk.
165
+ -h, --help Show CLI help.
166
+ -s, --silent Silences npm output.
167
+ -v, --verbose Show verbose npm output.
168
+
169
+ GLOBAL FLAGS
170
+ --json Format output as json.
171
+
172
+ DESCRIPTION
173
+ Installs a plugin into minovative-mind-cli.
174
+
175
+ Uses npm to install plugins.
176
+
177
+ Installation of a user-installed plugin will override a core plugin.
178
+
179
+ Use the MINOVATIVE_MIND_CLI_NPM_LOG_LEVEL environment variable to set the npm loglevel.
180
+ Use the MINOVATIVE_MIND_CLI_NPM_REGISTRY environment variable to set the npm registry.
181
+
182
+ ALIASES
183
+ $ minovative-mind-cli plugins add
184
+
185
+ EXAMPLES
186
+ Install a plugin from npm registry.
187
+
188
+ $ minovative-mind-cli plugins add myplugin
189
+
190
+ Install a plugin from a github url.
191
+
192
+ $ minovative-mind-cli plugins add https://github.com/someuser/someplugin
193
+
194
+ Install a plugin from a github slug.
195
+
196
+ $ minovative-mind-cli plugins add someuser/someplugin
197
+ ```
198
+
199
+ ## `minovative-mind-cli plugins:inspect PLUGIN...`
200
+
201
+ Displays installation properties of a plugin.
202
+
203
+ ```
204
+ USAGE
205
+ $ minovative-mind-cli plugins inspect PLUGIN...
206
+
207
+ ARGUMENTS
208
+ PLUGIN... [default: .] Plugin to inspect.
209
+
210
+ FLAGS
211
+ -h, --help Show CLI help.
212
+ -v, --verbose
213
+
214
+ GLOBAL FLAGS
215
+ --json Format output as json.
216
+
217
+ DESCRIPTION
218
+ Displays installation properties of a plugin.
219
+
220
+ EXAMPLES
221
+ $ minovative-mind-cli plugins inspect myplugin
222
+ ```
223
+
224
+ _See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/5.4.72/src/commands/plugins/inspect.ts)_
225
+
226
+ ## `minovative-mind-cli plugins install PLUGIN`
227
+
228
+ Installs a plugin into minovative-mind-cli.
229
+
230
+ ```
231
+ USAGE
232
+ $ minovative-mind-cli plugins install PLUGIN... [--json] [-f] [-h] [-s | -v]
233
+
234
+ ARGUMENTS
235
+ PLUGIN... Plugin to install.
236
+
237
+ FLAGS
238
+ -f, --force Force npm to fetch remote resources even if a local copy exists on disk.
239
+ -h, --help Show CLI help.
240
+ -s, --silent Silences npm output.
241
+ -v, --verbose Show verbose npm output.
242
+
243
+ GLOBAL FLAGS
244
+ --json Format output as json.
245
+
246
+ DESCRIPTION
247
+ Installs a plugin into minovative-mind-cli.
248
+
249
+ Uses npm to install plugins.
250
+
251
+ Installation of a user-installed plugin will override a core plugin.
252
+
253
+ Use the MINOVATIVE_MIND_CLI_NPM_LOG_LEVEL environment variable to set the npm loglevel.
254
+ Use the MINOVATIVE_MIND_CLI_NPM_REGISTRY environment variable to set the npm registry.
255
+
256
+ ALIASES
257
+ $ minovative-mind-cli plugins add
258
+
259
+ EXAMPLES
260
+ Install a plugin from npm registry.
261
+
262
+ $ minovative-mind-cli plugins install myplugin
263
+
264
+ Install a plugin from a github url.
265
+
266
+ $ minovative-mind-cli plugins install https://github.com/someuser/someplugin
267
+
268
+ Install a plugin from a github slug.
269
+
270
+ $ minovative-mind-cli plugins install someuser/someplugin
271
+ ```
272
+
273
+ _See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/5.4.72/src/commands/plugins/install.ts)_
274
+
275
+ ## `minovative-mind-cli plugins link PATH`
276
+
277
+ Links a plugin into the CLI for development.
278
+
279
+ ```
280
+ USAGE
281
+ $ minovative-mind-cli plugins link PATH [-h] [--install] [-v]
282
+
283
+ ARGUMENTS
284
+ PATH [default: .] path to plugin
285
+
286
+ FLAGS
287
+ -h, --help Show CLI help.
288
+ -v, --verbose
289
+ --[no-]install Install dependencies after linking the plugin.
290
+
291
+ DESCRIPTION
292
+ Links a plugin into the CLI for development.
293
+
294
+ Installation of a linked plugin will override a user-installed or core plugin.
295
+
296
+ e.g. If you have a user-installed or core plugin that has a 'hello' command, installing a linked plugin with a 'hello'
297
+ command will override the user-installed or core plugin implementation. This is useful for development work.
298
+
299
+
300
+ EXAMPLES
301
+ $ minovative-mind-cli plugins link myplugin
302
+ ```
303
+
304
+ _See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/5.4.72/src/commands/plugins/link.ts)_
305
+
306
+ ## `minovative-mind-cli plugins remove [PLUGIN]`
307
+
308
+ Removes a plugin from the CLI.
309
+
310
+ ```
311
+ USAGE
312
+ $ minovative-mind-cli plugins remove [PLUGIN...] [-h] [-v]
313
+
314
+ ARGUMENTS
315
+ [PLUGIN...] plugin to uninstall
316
+
317
+ FLAGS
318
+ -h, --help Show CLI help.
319
+ -v, --verbose
320
+
321
+ DESCRIPTION
322
+ Removes a plugin from the CLI.
323
+
324
+ ALIASES
325
+ $ minovative-mind-cli plugins unlink
326
+ $ minovative-mind-cli plugins remove
327
+
328
+ EXAMPLES
329
+ $ minovative-mind-cli plugins remove myplugin
330
+ ```
331
+
332
+ ## `minovative-mind-cli plugins reset`
333
+
334
+ Remove all user-installed and linked plugins.
335
+
336
+ ```
337
+ USAGE
338
+ $ minovative-mind-cli plugins reset [--hard] [--reinstall]
339
+
340
+ FLAGS
341
+ --hard Delete node_modules and package manager related files in addition to uninstalling plugins.
342
+ --reinstall Reinstall all plugins after uninstalling.
343
+ ```
344
+
345
+ _See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/5.4.72/src/commands/plugins/reset.ts)_
346
+
347
+ ## `minovative-mind-cli plugins uninstall [PLUGIN]`
348
+
349
+ Removes a plugin from the CLI.
350
+
351
+ ```
352
+ USAGE
353
+ $ minovative-mind-cli plugins uninstall [PLUGIN...] [-h] [-v]
354
+
355
+ ARGUMENTS
356
+ [PLUGIN...] plugin to uninstall
357
+
358
+ FLAGS
359
+ -h, --help Show CLI help.
360
+ -v, --verbose
361
+
362
+ DESCRIPTION
363
+ Removes a plugin from the CLI.
364
+
365
+ ALIASES
366
+ $ minovative-mind-cli plugins unlink
367
+ $ minovative-mind-cli plugins remove
368
+
369
+ EXAMPLES
370
+ $ minovative-mind-cli plugins uninstall myplugin
371
+ ```
372
+
373
+ _See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/5.4.72/src/commands/plugins/uninstall.ts)_
374
+
375
+ ## `minovative-mind-cli plugins unlink [PLUGIN]`
376
+
377
+ Removes a plugin from the CLI.
378
+
379
+ ```
380
+ USAGE
381
+ $ minovative-mind-cli plugins unlink [PLUGIN...] [-h] [-v]
382
+
383
+ ARGUMENTS
384
+ [PLUGIN...] plugin to uninstall
385
+
386
+ FLAGS
387
+ -h, --help Show CLI help.
388
+ -v, --verbose
389
+
390
+ DESCRIPTION
391
+ Removes a plugin from the CLI.
392
+
393
+ ALIASES
394
+ $ minovative-mind-cli plugins unlink
395
+ $ minovative-mind-cli plugins remove
396
+
397
+ EXAMPLES
398
+ $ minovative-mind-cli plugins unlink myplugin
399
+ ```
400
+
401
+ ## `minovative-mind-cli plugins update`
402
+
403
+ Update installed plugins.
404
+
405
+ ```
406
+ USAGE
407
+ $ minovative-mind-cli plugins update [-h] [-v]
408
+
409
+ FLAGS
410
+ -h, --help Show CLI help.
411
+ -v, --verbose
412
+
413
+ DESCRIPTION
414
+ Update installed plugins.
415
+ ```
416
+
417
+ _See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/5.4.72/src/commands/plugins/update.ts)_
418
+ <!-- commandsstop -->
package/bin/dev.cmd ADDED
@@ -0,0 +1,3 @@
1
+ @echo off
2
+
3
+ node --loader ts-node/esm --no-warnings=ExperimentalWarning "%~dp0\dev" %*
package/bin/dev.js ADDED
@@ -0,0 +1,5 @@
1
+ #!/usr/bin/env -S node --loader ts-node/esm --disable-warning=ExperimentalWarning
2
+
3
+ import {execute} from '@oclif/core'
4
+
5
+ await execute({development: true, dir: import.meta.url})
package/bin/run.cmd ADDED
@@ -0,0 +1,3 @@
1
+ @echo off
2
+
3
+ node "%~dp0\run" %*
package/bin/run.js ADDED
@@ -0,0 +1,5 @@
1
+ #!/usr/bin/env node
2
+
3
+ import {execute} from '@oclif/core'
4
+
5
+ execute({dir: import.meta.url}).catch(console.error)
@@ -0,0 +1,7 @@
1
+ import 'dotenv/config';
2
+ import { Command } from '@oclif/core';
3
+ export default class DefaultCommand extends Command {
4
+ static description: string;
5
+ static examples: string[];
6
+ run(): Promise<void>;
7
+ }
@@ -0,0 +1,30 @@
1
+ import 'dotenv/config';
2
+ import { Command } from '@oclif/core';
3
+ import * as p from '@clack/prompts';
4
+ import pc from 'picocolors';
5
+ import { startAgentLoop } from '../services/agent.js';
6
+ import { getAuthorizedIdToken, login } from '../services/auth.js';
7
+ export default class DefaultCommand extends Command {
8
+ static description = 'Start an interactive AI coding agent session powered by Vertex AI.';
9
+ static examples = ['<%= config.bin %>', '<%= config.bin %> --help'];
10
+ async run() {
11
+ const workspaceRoot = process.cwd();
12
+ console.clear();
13
+ p.intro(`${pc.bgCyan(pc.black(' Minovative Mind '))} ${pc.dim('v' + this.config.version)}`);
14
+ // Check authentication
15
+ let idToken = await getAuthorizedIdToken();
16
+ if (!idToken) {
17
+ p.log.warn('You are not signed in.');
18
+ const success = await login();
19
+ if (!success) {
20
+ p.outro(pc.red('Login failed. Cannot start chat.'));
21
+ this.exit(1);
22
+ }
23
+ // Re-fetch token after successful login
24
+ idToken = await getAuthorizedIdToken();
25
+ }
26
+ p.log.info(`${pc.dim('Workspace:')} ${pc.cyan(workspaceRoot)}`);
27
+ p.log.info(`${pc.dim('Commands:')} Type ${pc.yellow('/')} to open the command menu. Type ${pc.yellow('exit')} to leave.`);
28
+ await startAgentLoop(workspaceRoot, this.config.version);
29
+ }
30
+ }
@@ -0,0 +1,5 @@
1
+ import { Command } from '@oclif/core';
2
+ export default class LoginCommand extends Command {
3
+ static description: string;
4
+ run(): Promise<void>;
5
+ }
@@ -0,0 +1,18 @@
1
+ import { Command } from '@oclif/core';
2
+ import { login } from '../services/auth.js';
3
+ import * as p from '@clack/prompts';
4
+ import pc from 'picocolors';
5
+ export default class LoginCommand extends Command {
6
+ static description = 'Sign in to your Minovative Mind account using GitHub';
7
+ async run() {
8
+ p.intro(`${pc.bgCyan(pc.black(' Minovative Mind '))} - Login`);
9
+ const success = await login();
10
+ if (success) {
11
+ p.outro(pc.green('You are now ready to use the Minovative Mind CLI!'));
12
+ }
13
+ else {
14
+ p.outro(pc.red('Login failed.'));
15
+ this.exit(1);
16
+ }
17
+ }
18
+ }
@@ -0,0 +1,5 @@
1
+ import { Command } from '@oclif/core';
2
+ export default class LogoutCommand extends Command {
3
+ static description: string;
4
+ run(): Promise<void>;
5
+ }
@@ -0,0 +1,12 @@
1
+ import { Command } from '@oclif/core';
2
+ import { logout } from '../services/auth.js';
3
+ import * as p from '@clack/prompts';
4
+ import pc from 'picocolors';
5
+ export default class LogoutCommand extends Command {
6
+ static description = 'Sign out of your Minovative Mind account';
7
+ async run() {
8
+ p.intro(`${pc.bgCyan(pc.black(' Minovative Mind '))} - Logout`);
9
+ logout();
10
+ p.outro(pc.green('You have been signed out.'));
11
+ }
12
+ }
@@ -0,0 +1 @@
1
+ export { run } from '@oclif/core';
package/dist/index.js ADDED
@@ -0,0 +1 @@
1
+ export { run } from '@oclif/core';
@@ -0,0 +1,36 @@
1
+ import { type FunctionDeclaration } from '@google/generative-ai';
2
+ export interface ToolResult {
3
+ error?: string;
4
+ output: string;
5
+ }
6
+ /**
7
+ * FunctionDeclaration-compatible schema objects that describe
8
+ * every tool the agent can invoke. Passed to the model at init.
9
+ */
10
+ export declare const toolDeclarations: FunctionDeclaration[];
11
+ export type ApprovalMode = 'ask' | 'skip-once' | 'skip-all';
12
+ export declare function getApprovalMode(): ApprovalMode;
13
+ export declare function setApprovalMode(mode: ApprovalMode): void;
14
+ /**
15
+ * If set to 'skip-once', reverts to 'ask' after a single command is run.
16
+ */
17
+ export declare function consumeSkipOnce(): void;
18
+ export declare function readFile(workspaceRoot: string, filePath: string, startLine?: number, endLine?: number, targetElements?: string[]): Promise<ToolResult>;
19
+ export declare function writeFile(workspaceRoot: string, filePath: string, content: string): Promise<ToolResult>;
20
+ export declare function deleteFile(workspaceRoot: string, filePath: string): Promise<ToolResult>;
21
+ export declare function renameFile(workspaceRoot: string, sourcePath: string, targetPath: string): Promise<ToolResult>;
22
+ export declare function modifyFile(workspaceRoot: string, filePath: string, edits: Array<{
23
+ searchContent: string;
24
+ replaceContent: string;
25
+ }>): Promise<ToolResult>;
26
+ export declare function listDirectory(workspaceRoot: string, dirPath: string, maxDepth?: number): Promise<ToolResult>;
27
+ export declare function runCommand(workspaceRoot: string, command: string): Promise<ToolResult>;
28
+ export declare function grepSearch(workspaceRoot: string, pattern: string, fileGlob?: string): Promise<ToolResult>;
29
+ export declare function traceDependencies(workspaceRoot: string, filePath: string, direction?: string, maxDepth?: number): Promise<ToolResult>;
30
+ export declare function findRecentChanges(workspaceRoot: string, dirPath?: string, minutes?: number, maxDepth?: number): Promise<ToolResult>;
31
+ export declare function createAndRunTest(workspaceRoot: string, language: string, code: string): Promise<ToolResult>;
32
+ /**
33
+ * Dispatches a function call from the model to the appropriate local tool.
34
+ * Returns the tool result as a string to feed back to the model.
35
+ */
36
+ export declare function executeTool(workspaceRoot: string, toolName: string, args: Record<string, unknown>): Promise<ToolResult>;