neuro-cli 4.1.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 (175) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +510 -0
  3. package/dist/advisor/advisor.d.ts +50 -0
  4. package/dist/advisor/advisor.js +178 -0
  5. package/dist/agents/base.d.ts +62 -0
  6. package/dist/agents/base.js +215 -0
  7. package/dist/agents/orchestrator.d.ts +46 -0
  8. package/dist/agents/orchestrator.js +192 -0
  9. package/dist/agents/team.d.ts +51 -0
  10. package/dist/agents/team.js +210 -0
  11. package/dist/api/models.d.ts +23 -0
  12. package/dist/api/models.js +514 -0
  13. package/dist/api/ollama.d.ts +153 -0
  14. package/dist/api/ollama.js +751 -0
  15. package/dist/api/openrouter.d.ts +55 -0
  16. package/dist/api/openrouter.js +223 -0
  17. package/dist/commands/commands.d.ts +43 -0
  18. package/dist/commands/commands.js +308 -0
  19. package/dist/config/config.d.ts +8 -0
  20. package/dist/config/config.js +311 -0
  21. package/dist/context/compaction.d.ts +54 -0
  22. package/dist/context/compaction.js +251 -0
  23. package/dist/context/custom-agents.d.ts +107 -0
  24. package/dist/context/custom-agents.js +397 -0
  25. package/dist/context/custom-tools.d.ts +120 -0
  26. package/dist/context/custom-tools.js +564 -0
  27. package/dist/context/git-checkpoint.d.ts +52 -0
  28. package/dist/context/git-checkpoint.js +240 -0
  29. package/dist/context/neuro-md.d.ts +48 -0
  30. package/dist/context/neuro-md.js +202 -0
  31. package/dist/context/neuroignore.d.ts +102 -0
  32. package/dist/context/neuroignore.js +441 -0
  33. package/dist/context/repo-map.d.ts +38 -0
  34. package/dist/context/repo-map.js +220 -0
  35. package/dist/context/skill-standard.d.ts +262 -0
  36. package/dist/context/skill-standard.js +1156 -0
  37. package/dist/context/skill-system.d.ts +75 -0
  38. package/dist/context/skill-system.js +578 -0
  39. package/dist/context/tree-sitter.d.ts +99 -0
  40. package/dist/context/tree-sitter.js +1956 -0
  41. package/dist/core/acp.d.ts +325 -0
  42. package/dist/core/acp.js +1498 -0
  43. package/dist/core/api-server.d.ts +143 -0
  44. package/dist/core/api-server.js +550 -0
  45. package/dist/core/approval.d.ts +81 -0
  46. package/dist/core/approval.js +432 -0
  47. package/dist/core/auto-compact.d.ts +127 -0
  48. package/dist/core/auto-compact.js +436 -0
  49. package/dist/core/auto-mode.d.ts +232 -0
  50. package/dist/core/auto-mode.js +831 -0
  51. package/dist/core/background-session.d.ts +166 -0
  52. package/dist/core/background-session.js +696 -0
  53. package/dist/core/cicd.d.ts +257 -0
  54. package/dist/core/cicd.js +1443 -0
  55. package/dist/core/cloud-sync.d.ts +156 -0
  56. package/dist/core/cloud-sync.js +582 -0
  57. package/dist/core/code-review.d.ts +132 -0
  58. package/dist/core/code-review.js +1191 -0
  59. package/dist/core/completion.d.ts +49 -0
  60. package/dist/core/completion.js +384 -0
  61. package/dist/core/context.d.ts +38 -0
  62. package/dist/core/context.js +144 -0
  63. package/dist/core/diff-preview.d.ts +35 -0
  64. package/dist/core/diff-preview.js +173 -0
  65. package/dist/core/doom-loop.d.ts +51 -0
  66. package/dist/core/doom-loop.js +179 -0
  67. package/dist/core/engine.d.ts +183 -0
  68. package/dist/core/engine.js +942 -0
  69. package/dist/core/extended-thinking.d.ts +103 -0
  70. package/dist/core/extended-thinking.js +269 -0
  71. package/dist/core/fallback.d.ts +54 -0
  72. package/dist/core/fallback.js +104 -0
  73. package/dist/core/git-worktree.d.ts +139 -0
  74. package/dist/core/git-worktree.js +614 -0
  75. package/dist/core/headless.d.ts +30 -0
  76. package/dist/core/headless.js +101 -0
  77. package/dist/core/i18n.d.ts +83 -0
  78. package/dist/core/i18n.js +739 -0
  79. package/dist/core/linting.d.ts +129 -0
  80. package/dist/core/linting.js +699 -0
  81. package/dist/core/model-router.d.ts +109 -0
  82. package/dist/core/model-router.js +581 -0
  83. package/dist/core/multi-model.d.ts +243 -0
  84. package/dist/core/multi-model.js +1099 -0
  85. package/dist/core/multi-session.d.ts +144 -0
  86. package/dist/core/multi-session.js +442 -0
  87. package/dist/core/multimodal.d.ts +125 -0
  88. package/dist/core/multimodal.js +286 -0
  89. package/dist/core/observability.d.ts +93 -0
  90. package/dist/core/observability.js +737 -0
  91. package/dist/core/os-sandbox.d.ts +122 -0
  92. package/dist/core/os-sandbox.js +1193 -0
  93. package/dist/core/outcome-grading.d.ts +228 -0
  94. package/dist/core/outcome-grading.js +1123 -0
  95. package/dist/core/output-styles.d.ts +57 -0
  96. package/dist/core/output-styles.js +382 -0
  97. package/dist/core/parallel-agents.d.ts +183 -0
  98. package/dist/core/parallel-agents.js +563 -0
  99. package/dist/core/plugin-bundle.d.ts +236 -0
  100. package/dist/core/plugin-bundle.js +887 -0
  101. package/dist/core/plugin-sdk.d.ts +139 -0
  102. package/dist/core/plugin-sdk.js +273 -0
  103. package/dist/core/prompt-cache.d.ts +163 -0
  104. package/dist/core/prompt-cache.js +599 -0
  105. package/dist/core/sandbox.d.ts +127 -0
  106. package/dist/core/sandbox.js +369 -0
  107. package/dist/core/scheduled-tasks.d.ts +151 -0
  108. package/dist/core/scheduled-tasks.js +502 -0
  109. package/dist/core/security-scanner.d.ts +160 -0
  110. package/dist/core/security-scanner.js +1494 -0
  111. package/dist/core/session.d.ts +83 -0
  112. package/dist/core/session.js +269 -0
  113. package/dist/core/shell-completion.d.ts +51 -0
  114. package/dist/core/shell-completion.js +674 -0
  115. package/dist/core/smart-monitor.d.ts +146 -0
  116. package/dist/core/smart-monitor.js +1199 -0
  117. package/dist/core/spec-driven.d.ts +233 -0
  118. package/dist/core/spec-driven.js +1485 -0
  119. package/dist/core/spending-warnings.d.ts +123 -0
  120. package/dist/core/spending-warnings.js +456 -0
  121. package/dist/core/sub-agent.d.ts +298 -0
  122. package/dist/core/sub-agent.js +1023 -0
  123. package/dist/core/telemetry.d.ts +157 -0
  124. package/dist/core/telemetry.js +412 -0
  125. package/dist/core/terminal-ux.d.ts +134 -0
  126. package/dist/core/terminal-ux.js +649 -0
  127. package/dist/core/testing.d.ts +146 -0
  128. package/dist/core/testing.js +1200 -0
  129. package/dist/core/types.d.ts +439 -0
  130. package/dist/core/types.js +6 -0
  131. package/dist/core/undo-redo.d.ts +112 -0
  132. package/dist/core/undo-redo.js +290 -0
  133. package/dist/core/updater.d.ts +159 -0
  134. package/dist/core/updater.js +608 -0
  135. package/dist/core/vim-mode.d.ts +151 -0
  136. package/dist/core/vim-mode.js +771 -0
  137. package/dist/core/voice.d.ts +137 -0
  138. package/dist/core/voice.js +538 -0
  139. package/dist/core/web-dashboard.d.ts +109 -0
  140. package/dist/core/web-dashboard.js +484 -0
  141. package/dist/hooks/hooks.d.ts +74 -0
  142. package/dist/hooks/hooks.js +160 -0
  143. package/dist/hooks/llm-evaluator.d.ts +165 -0
  144. package/dist/hooks/llm-evaluator.js +560 -0
  145. package/dist/index.d.ts +3 -0
  146. package/dist/index.js +1186 -0
  147. package/dist/lsp/lsp-manager.d.ts +63 -0
  148. package/dist/lsp/lsp-manager.js +351 -0
  149. package/dist/mcp/client.d.ts +133 -0
  150. package/dist/mcp/client.js +684 -0
  151. package/dist/mcp/mcp-apps.d.ts +70 -0
  152. package/dist/mcp/mcp-apps.js +1007 -0
  153. package/dist/tools/bash.d.ts +5 -0
  154. package/dist/tools/bash.js +195 -0
  155. package/dist/tools/browser.d.ts +92 -0
  156. package/dist/tools/browser.js +1570 -0
  157. package/dist/tools/extended.d.ts +6 -0
  158. package/dist/tools/extended.js +191 -0
  159. package/dist/tools/file.d.ts +10 -0
  160. package/dist/tools/file.js +382 -0
  161. package/dist/tools/github.d.ts +389 -0
  162. package/dist/tools/github.js +759 -0
  163. package/dist/tools/index.d.ts +9 -0
  164. package/dist/tools/index.js +40 -0
  165. package/dist/tools/memory.d.ts +6 -0
  166. package/dist/tools/memory.js +197 -0
  167. package/dist/tools/registry.d.ts +29 -0
  168. package/dist/tools/registry.js +64 -0
  169. package/dist/tools/web.d.ts +6 -0
  170. package/dist/tools/web.js +150 -0
  171. package/dist/ui/renderer.d.ts +97 -0
  172. package/dist/ui/renderer.js +279 -0
  173. package/dist/ui/theme.d.ts +27 -0
  174. package/dist/ui/theme.js +106 -0
  175. package/package.json +83 -0
@@ -0,0 +1,439 @@
1
+ export interface Message {
2
+ role: 'system' | 'user' | 'assistant' | 'tool';
3
+ content: string;
4
+ toolCalls?: ToolCall[];
5
+ toolCallId?: string;
6
+ name?: string;
7
+ timestamp?: number;
8
+ }
9
+ export interface ToolCall {
10
+ id: string;
11
+ type: 'function';
12
+ function: {
13
+ name: string;
14
+ arguments: string;
15
+ };
16
+ }
17
+ export interface ToolResult {
18
+ toolCallId: string;
19
+ content: string;
20
+ isError?: boolean;
21
+ }
22
+ export interface ToolDefinition {
23
+ name: string;
24
+ description: string;
25
+ parameters: {
26
+ type: 'object';
27
+ properties: Record<string, {
28
+ type: string;
29
+ description: string;
30
+ enum?: string[];
31
+ }>;
32
+ required: string[];
33
+ };
34
+ }
35
+ export interface AgentConfig {
36
+ name: string;
37
+ description: string;
38
+ systemPrompt: string;
39
+ model?: string;
40
+ temperature?: number;
41
+ maxTokens?: number;
42
+ tools?: string[];
43
+ autoApprove?: boolean;
44
+ maxIterations?: number;
45
+ /** Custom agent defined by user */
46
+ isCustom?: boolean;
47
+ /** Tags for categorizing agents */
48
+ tags?: string[];
49
+ }
50
+ export interface ModelConfig {
51
+ id: string;
52
+ name: string;
53
+ provider: string;
54
+ contextWindow: number;
55
+ maxOutput: number;
56
+ inputPrice: number;
57
+ outputPrice: number;
58
+ supportsTools: boolean;
59
+ supportsVision: boolean;
60
+ supportsStreaming: boolean;
61
+ }
62
+ export interface NeuroConfig {
63
+ apiKey: string;
64
+ baseUrl: string;
65
+ defaultModel: string;
66
+ agents: Record<string, AgentConfig>;
67
+ tools: {
68
+ autoApprove: string[];
69
+ requireApproval: string[];
70
+ denied: string[];
71
+ };
72
+ context: {
73
+ maxTokens: number;
74
+ systemPromptRatio: number;
75
+ };
76
+ session: {
77
+ autoSave: boolean;
78
+ maxHistory: number;
79
+ };
80
+ ui: {
81
+ theme: 'dark' | 'light' | 'dracula' | 'nord';
82
+ showTokenCount: boolean;
83
+ showCost: boolean;
84
+ streaming: boolean;
85
+ syntaxHighlight: boolean;
86
+ };
87
+ permissionMode: PermissionMode;
88
+ fallbackChain: FallbackModelChain;
89
+ doomLoop: DoomLoopConfig;
90
+ mcp: {
91
+ servers: Record<string, MCPServerConfig>;
92
+ autoConnect: boolean;
93
+ };
94
+ diffPreview: boolean;
95
+ /** Sandbox configuration */
96
+ sandbox: SandboxConfigType;
97
+ /** Spending limit in USD (0 = unlimited) */
98
+ spendingLimit: number;
99
+ /** Prompt cache configuration */
100
+ promptCache: PromptCacheConfig;
101
+ /** Custom agents defined by the user */
102
+ customAgents: Record<string, AgentConfig>;
103
+ /** Telemetry configuration */
104
+ telemetry: TelemetryConfigType;
105
+ /** Vim mode configuration */
106
+ vimMode: VimModeConfigType;
107
+ /** i18n / language configuration */
108
+ i18n: I18nConfigType;
109
+ /** Multimodal / image support configuration */
110
+ multimodal: MultimodalConfigType;
111
+ /** Voice I/O configuration */
112
+ voice: VoiceConfigType;
113
+ /** API server configuration */
114
+ apiServer: APIServerConfigType;
115
+ /** Cloud sync configuration */
116
+ cloudSync: CloudSyncConfigType;
117
+ /** Web dashboard configuration */
118
+ dashboard: DashboardConfigType;
119
+ /** v4.0: Auto mode configuration */
120
+ autoMode: AutoModeConfigType;
121
+ /** v4.0: Scheduled tasks configuration */
122
+ scheduledTasks: ScheduledTasksConfigType;
123
+ /** v4.0: Linting configuration */
124
+ linting: LintingConfigType;
125
+ /** v4.0: Testing configuration */
126
+ testing: TestingConfigType;
127
+ /** v4.0: Code review configuration */
128
+ codeReview: CodeReviewConfigType;
129
+ /** v4.0: Security scanner configuration */
130
+ securityScanner: SecurityScannerConfigType;
131
+ }
132
+ export interface Session {
133
+ id: string;
134
+ createdAt: number;
135
+ updatedAt: number;
136
+ messages: Message[];
137
+ workingDirectory: string;
138
+ model: string;
139
+ totalInputTokens: number;
140
+ totalOutputTokens: number;
141
+ totalCost: number;
142
+ agentHistory: AgentExecution[];
143
+ /** Session tags for categorization */
144
+ tags: string[];
145
+ /** Session description (auto-generated or user-set) */
146
+ description?: string;
147
+ /** Whether this is a fork of another session */
148
+ forkedFrom?: string;
149
+ /** Parent session ID */
150
+ parentSessionId?: string;
151
+ }
152
+ export interface AgentExecution {
153
+ agentName: string;
154
+ task: string;
155
+ startTime: number;
156
+ endTime?: number;
157
+ iterations: number;
158
+ tokensUsed: number;
159
+ status: 'running' | 'completed' | 'failed' | 'cancelled';
160
+ result?: string;
161
+ }
162
+ export interface ApprovalRequest {
163
+ toolName: string;
164
+ args: Record<string, unknown>;
165
+ risk: 'low' | 'medium' | 'high';
166
+ description: string;
167
+ }
168
+ export interface FileChange {
169
+ path: string;
170
+ type: 'create' | 'modify' | 'delete';
171
+ content?: string;
172
+ diff?: string;
173
+ }
174
+ export interface SearchResult {
175
+ file: string;
176
+ line: number;
177
+ column: number;
178
+ text: string;
179
+ match: string;
180
+ }
181
+ export interface CommandResult {
182
+ stdout: string;
183
+ stderr: string;
184
+ exitCode: number;
185
+ duration: number;
186
+ }
187
+ export interface TokenUsage {
188
+ inputTokens: number;
189
+ outputTokens: number;
190
+ cost: number;
191
+ }
192
+ export type PermissionMode = 'manual' | 'auto' | 'plan' | 'yolo';
193
+ export interface FallbackModelChain {
194
+ models: string[];
195
+ maxRetries: number;
196
+ retryDelayMs: number;
197
+ }
198
+ export interface DoomLoopConfig {
199
+ maxConsecutiveErrors: number;
200
+ maxRepetitiveActions: number;
201
+ similarityThreshold: number;
202
+ autoBreak: boolean;
203
+ }
204
+ export interface HeadlessOptions {
205
+ prompt: string;
206
+ model?: string;
207
+ agent?: string;
208
+ maxTurns?: number;
209
+ allowedTools?: string[];
210
+ outputFormat?: 'text' | 'json' | 'stream-json';
211
+ autoApprove?: boolean;
212
+ continueSession?: string;
213
+ }
214
+ export interface MCPServerConfig {
215
+ transport: 'stdio' | 'sse' | 'http';
216
+ command?: string;
217
+ args?: string[];
218
+ env?: Record<string, string>;
219
+ url?: string;
220
+ headers?: Record<string, string>;
221
+ timeout?: number;
222
+ disabled?: boolean;
223
+ autoReconnect?: boolean;
224
+ maxReconnectAttempts?: number;
225
+ healthCheckIntervalMs?: number;
226
+ }
227
+ export interface SandboxConfigType {
228
+ enabled: boolean;
229
+ rootDir: string;
230
+ allowedDirs: string[];
231
+ deniedDirs: string[];
232
+ deniedPatterns: string[];
233
+ allowCommands: boolean;
234
+ allowedCommands: string[];
235
+ deniedCommands: string[];
236
+ backupOnModify: boolean;
237
+ backupDir: string;
238
+ maxFileSize: number;
239
+ allowNetwork: boolean;
240
+ allowEnvAccess: boolean;
241
+ readOnly: boolean;
242
+ }
243
+ export interface PromptCacheConfig {
244
+ enabled: boolean;
245
+ /** Cache directory */
246
+ cacheDir: string;
247
+ /** Maximum cache entries */
248
+ maxEntries: number;
249
+ /** TTL in milliseconds (default: 1 hour) */
250
+ ttlMs: number;
251
+ /** Similarity threshold for cache hits (0-1) */
252
+ similarityThreshold: number;
253
+ }
254
+ export interface SessionExport {
255
+ version: string;
256
+ exportedAt: number;
257
+ session: Session;
258
+ neuroVersion: string;
259
+ }
260
+ export interface TelemetryConfigType {
261
+ /** Whether telemetry is enabled (opt-in) */
262
+ enabled: boolean;
263
+ /** Whether to track model performance */
264
+ trackModelPerformance: boolean;
265
+ /** Whether to track tool usage */
266
+ trackToolUsage: boolean;
267
+ /** Whether to track session metrics */
268
+ trackSessionMetrics: boolean;
269
+ /** Retention period in days */
270
+ retentionDays: number;
271
+ }
272
+ export interface VimModeConfigType {
273
+ /** Whether vim keybindings are enabled */
274
+ enabled: boolean;
275
+ /** Show mode indicator in prompt */
276
+ showModeIndicator: boolean;
277
+ /** Bell on error in normal mode */
278
+ bellOnError: boolean;
279
+ }
280
+ export interface I18nConfigType {
281
+ /** Current locale code */
282
+ locale: string;
283
+ /** Fallback locale when key is missing */
284
+ fallbackLocale: string;
285
+ /** Auto-detect system language */
286
+ autoDetect: boolean;
287
+ }
288
+ export interface MultimodalConfigType {
289
+ /** Whether multimodal support is enabled */
290
+ enabled: boolean;
291
+ /** Max image file size in bytes */
292
+ maxImageSize: number;
293
+ /** Auto-detect image references in prompts */
294
+ autoDetectImages: boolean;
295
+ }
296
+ export interface VoiceConfigType {
297
+ /** Whether voice I/O is enabled */
298
+ enabled: boolean;
299
+ /** TTS engine */
300
+ ttsEngine: 'system' | 'espeak' | 'say' | 'auto';
301
+ /** STT engine */
302
+ sttEngine: 'system' | 'whisper' | 'auto';
303
+ /** Auto-speak assistant responses */
304
+ autoSpeak: boolean;
305
+ /** Language for TTS/STT */
306
+ language: string;
307
+ }
308
+ export interface APIServerConfigType {
309
+ /** Whether the API server is enabled */
310
+ enabled: boolean;
311
+ /** Host to bind to */
312
+ host: string;
313
+ /** Port to listen on */
314
+ port: number;
315
+ /** Whether authentication is required */
316
+ requireAuth: boolean;
317
+ /** Enable WebSocket support */
318
+ enableWebSocket: boolean;
319
+ }
320
+ export interface CloudSyncConfigType {
321
+ /** Whether cloud sync is enabled */
322
+ enabled: boolean;
323
+ /** Storage backend */
324
+ backend: 'gist' | 'local';
325
+ /** Auto-sync on session end */
326
+ autoSync: boolean;
327
+ /** Include session content in sync */
328
+ includeContent: boolean;
329
+ }
330
+ export interface DashboardConfigType {
331
+ /** Whether the web dashboard is enabled */
332
+ enabled: boolean;
333
+ /** Host to bind to */
334
+ host: string;
335
+ /** Port for dashboard server */
336
+ port: number;
337
+ /** Auto-open browser on start */
338
+ autoOpen: boolean;
339
+ /** Refresh interval for real-time updates (ms) */
340
+ refreshInterval: number;
341
+ }
342
+ export interface AutoModeConfigType {
343
+ /** Whether auto mode is enabled */
344
+ enabled: boolean;
345
+ /** Safety level for auto mode */
346
+ safetyLevel: 'conservative' | 'moderate' | 'aggressive';
347
+ /** Maximum iterations in auto mode */
348
+ maxIterations: number;
349
+ /** Maximum cost in USD (0 = unlimited) */
350
+ maxCost: number;
351
+ /** Maximum execution time in ms (0 = unlimited) */
352
+ maxTimeMs: number;
353
+ /** Commands that are always blocked */
354
+ blockedCommands: string[];
355
+ /** File patterns that cannot be modified */
356
+ blockedPatterns: string[];
357
+ /** Auto git commit after changes */
358
+ autoCommit: boolean;
359
+ /** Auto run tests after changes */
360
+ autoTest: boolean;
361
+ /** Pause on error */
362
+ pauseOnError: boolean;
363
+ }
364
+ export interface ScheduledTasksConfigType {
365
+ /** Whether scheduled tasks are enabled */
366
+ enabled: boolean;
367
+ /** Maximum concurrent scheduled tasks */
368
+ maxConcurrent: number;
369
+ /** Default interval unit */
370
+ defaultIntervalUnit: 'minutes' | 'hours' | 'days';
371
+ /** Whether to persist tasks across restarts */
372
+ persistTasks: boolean;
373
+ /** Directory for task persistence */
374
+ tasksDir: string;
375
+ }
376
+ export interface LintingConfigType {
377
+ /** Whether linting is enabled */
378
+ enabled: boolean;
379
+ /** Auto-run linter on file changes */
380
+ autoRunOnChange: boolean;
381
+ /** Auto-fix issues when possible */
382
+ autoFix: boolean;
383
+ /** Fail on lint errors */
384
+ failOnError: boolean;
385
+ /** Linter timeout in ms */
386
+ timeout: number;
387
+ /** File patterns to exclude */
388
+ excludePatterns: string[];
389
+ }
390
+ export interface TestingConfigType {
391
+ /** Whether testing integration is enabled */
392
+ enabled: boolean;
393
+ /** Auto-run tests on file changes */
394
+ autoRunOnChange: boolean;
395
+ /** Run tests on file save */
396
+ runOnSave: boolean;
397
+ /** Coverage threshold percentage */
398
+ coverageThreshold: number;
399
+ /** Test timeout in ms */
400
+ timeout: number;
401
+ /** Run only tests related to changed files */
402
+ relatedTestsOnly: boolean;
403
+ }
404
+ export interface CodeReviewConfigType {
405
+ /** Whether code review is enabled */
406
+ enabled: boolean;
407
+ /** Auto-review on file changes */
408
+ autoReviewOnChange: boolean;
409
+ /** Focus areas for review */
410
+ focusAreas: string[];
411
+ /** Minimum severity to report */
412
+ severityThreshold: 'critical' | 'major' | 'minor' | 'suggestion';
413
+ /** File patterns to exclude */
414
+ excludePatterns: string[];
415
+ }
416
+ export interface SecurityScannerConfigType {
417
+ /** Whether security scanning is enabled */
418
+ enabled: boolean;
419
+ /** Auto-scan on file changes */
420
+ autoScanOnChange: boolean;
421
+ /** Fail on this severity level */
422
+ failOnSeverity: 'critical' | 'high' | 'medium' | 'low';
423
+ /** File patterns to exclude */
424
+ excludePatterns: string[];
425
+ /** Custom security rules */
426
+ customRules: SecurityRuleType[];
427
+ }
428
+ export interface SecurityRuleType {
429
+ id: string;
430
+ name: string;
431
+ category: string;
432
+ severity: 'critical' | 'high' | 'medium' | 'low' | 'info';
433
+ pattern: string;
434
+ description: string;
435
+ remediation: string;
436
+ cwe?: string;
437
+ owasp?: string;
438
+ }
439
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1,6 @@
1
+ // ============================================================
2
+ // NeuroCLI - Advanced AI Terminal Coding Assistant
3
+ // Core Types & Interfaces - v4.0 with all new features
4
+ // ============================================================
5
+ export {};
6
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1,112 @@
1
+ export interface UndoAction {
2
+ id: string;
3
+ type: 'file_create' | 'file_modify' | 'file_delete';
4
+ path: string;
5
+ timestamp: number;
6
+ /** Content before the change (used by modify / delete to restore). */
7
+ originalContent?: string;
8
+ /** Content after the change (used by create / modify to re-apply). */
9
+ newContent?: string;
10
+ description: string;
11
+ }
12
+ /** Shape accepted by {@link UndoRedoSystem.push} -- id and timestamp are generated. */
13
+ export type UndoActionInput = Omit<UndoAction, 'id' | 'timestamp'>;
14
+ /**
15
+ * Production-quality undo/redo system for NeuroCLI.
16
+ *
17
+ * Tracks file-level create, modify and delete operations so that any change
18
+ * can be rolled back (undo) or re-applied (redo). The redo stack is cleared
19
+ * automatically whenever a new action is pushed -- this mirrors the behaviour
20
+ * of most professional editors and prevents ambiguous redo states.
21
+ */
22
+ export declare class UndoRedoSystem {
23
+ private undoStack;
24
+ private redoStack;
25
+ private totalUndos;
26
+ private totalRedos;
27
+ private totalActionsPushed;
28
+ /**
29
+ * Record a new action. The action is pushed onto the undo stack and the
30
+ * redo stack is cleared (standard expectation: a new edit invalidates
31
+ * previously undone changes).
32
+ */
33
+ push(action: UndoActionInput): void;
34
+ /**
35
+ * Undo the most recent action. Returns the undone action or `null` when
36
+ * there is nothing to undo. The action is moved from the undo stack to
37
+ * the redo stack and the file system change is reversed.
38
+ */
39
+ undo(): UndoAction | null;
40
+ /**
41
+ * Redo the most recently undone action. Returns the re-applied action or
42
+ * `null` when there is nothing to redo. The action is moved from the redo
43
+ * stack back to the undo stack and the file system change is re-applied.
44
+ */
45
+ redo(): UndoAction | null;
46
+ /**
47
+ * Undo up to `n` actions. Stops early if the undo stack is exhausted.
48
+ * Returns the list of actions that were undone (most-recent-first order --
49
+ * i.e. the first element is the action that was on top of the stack).
50
+ */
51
+ undoN(n: number): UndoAction[];
52
+ /**
53
+ * Redo up to `n` actions. Stops early if the redo stack is exhausted.
54
+ * Returns the list of actions that were re-applied (oldest-first order --
55
+ * i.e. the first element was the earliest undone action).
56
+ */
57
+ redoN(n: number): UndoAction[];
58
+ canUndo(): boolean;
59
+ canRedo(): boolean;
60
+ getUndoStack(): UndoAction[];
61
+ getRedoStack(): UndoAction[];
62
+ /**
63
+ * Returns a human-readable history combining both stacks.
64
+ *
65
+ * The undo entries are shown newest-first; the redo entries are shown
66
+ * oldest-first (which is the order in which they would be re-applied).
67
+ */
68
+ getHistory(): {
69
+ undo: UndoAction[];
70
+ redo: UndoAction[];
71
+ };
72
+ /**
73
+ * Clear both stacks. Cumulative stats counters are intentionally NOT
74
+ * reset so that `getStats()` retains a full session-level picture.
75
+ */
76
+ clear(): void;
77
+ getSize(): {
78
+ undo: number;
79
+ redo: number;
80
+ };
81
+ getStats(): {
82
+ totalUndos: number;
83
+ totalRedos: number;
84
+ totalActions: number;
85
+ };
86
+ /**
87
+ * Restore the file system to the state before `action` was performed.
88
+ *
89
+ * - **file_create** : delete the created file.
90
+ * - **file_modify** : restore `originalContent` (must be present).
91
+ * - **file_delete** : re-create the file with `originalContent` (must be
92
+ * present).
93
+ */
94
+ applyUndo(action: UndoAction): void;
95
+ /**
96
+ * Re-apply a previously undone action to the file system.
97
+ *
98
+ * - **file_create** : re-create the file with `newContent` (must be
99
+ * present).
100
+ * - **file_modify** : write `newContent` (must be present).
101
+ * - **file_delete** : delete the file again.
102
+ */
103
+ applyRedo(action: UndoAction): void;
104
+ /**
105
+ * Make sure the parent directory of `filePath` exists before writing.
106
+ */
107
+ private ensureDir;
108
+ }
109
+ export declare class UndoRedoError extends Error {
110
+ constructor(message: string, options?: ErrorOptions);
111
+ }
112
+ //# sourceMappingURL=undo-redo.d.ts.map