@juspay/neurolink 8.2.0 → 8.4.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 (119) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/README.md +13 -3
  3. package/dist/adapters/providerImageAdapter.d.ts +1 -1
  4. package/dist/adapters/providerImageAdapter.js +62 -0
  5. package/dist/agent/directTools.d.ts +0 -72
  6. package/dist/agent/directTools.js +3 -74
  7. package/dist/cli/commands/config.d.ts +18 -18
  8. package/dist/cli/factories/commandFactory.js +1 -0
  9. package/dist/cli/loop/conversationSelector.js +4 -0
  10. package/dist/cli/loop/session.js +27 -15
  11. package/dist/constants/enums.d.ts +1 -0
  12. package/dist/constants/enums.js +3 -1
  13. package/dist/constants/tokens.d.ts +3 -0
  14. package/dist/constants/tokens.js +3 -0
  15. package/dist/core/baseProvider.d.ts +56 -53
  16. package/dist/core/baseProvider.js +107 -1095
  17. package/dist/core/constants.d.ts +3 -0
  18. package/dist/core/constants.js +6 -3
  19. package/dist/core/modelConfiguration.js +10 -0
  20. package/dist/core/modules/GenerationHandler.d.ts +63 -0
  21. package/dist/core/modules/GenerationHandler.js +230 -0
  22. package/dist/core/modules/MessageBuilder.d.ts +39 -0
  23. package/dist/core/modules/MessageBuilder.js +179 -0
  24. package/dist/core/modules/StreamHandler.d.ts +52 -0
  25. package/dist/core/modules/StreamHandler.js +103 -0
  26. package/dist/core/modules/TelemetryHandler.d.ts +64 -0
  27. package/dist/core/modules/TelemetryHandler.js +170 -0
  28. package/dist/core/modules/ToolsManager.d.ts +98 -0
  29. package/dist/core/modules/ToolsManager.js +521 -0
  30. package/dist/core/modules/Utilities.d.ts +88 -0
  31. package/dist/core/modules/Utilities.js +329 -0
  32. package/dist/factories/providerRegistry.js +1 -1
  33. package/dist/lib/adapters/providerImageAdapter.d.ts +1 -1
  34. package/dist/lib/adapters/providerImageAdapter.js +62 -0
  35. package/dist/lib/agent/directTools.d.ts +0 -72
  36. package/dist/lib/agent/directTools.js +3 -74
  37. package/dist/lib/constants/enums.d.ts +1 -0
  38. package/dist/lib/constants/enums.js +3 -1
  39. package/dist/lib/constants/tokens.d.ts +3 -0
  40. package/dist/lib/constants/tokens.js +3 -0
  41. package/dist/lib/core/baseProvider.d.ts +56 -53
  42. package/dist/lib/core/baseProvider.js +107 -1095
  43. package/dist/lib/core/constants.d.ts +3 -0
  44. package/dist/lib/core/constants.js +6 -3
  45. package/dist/lib/core/modelConfiguration.js +10 -0
  46. package/dist/lib/core/modules/GenerationHandler.d.ts +63 -0
  47. package/dist/lib/core/modules/GenerationHandler.js +231 -0
  48. package/dist/lib/core/modules/MessageBuilder.d.ts +39 -0
  49. package/dist/lib/core/modules/MessageBuilder.js +180 -0
  50. package/dist/lib/core/modules/StreamHandler.d.ts +52 -0
  51. package/dist/lib/core/modules/StreamHandler.js +104 -0
  52. package/dist/lib/core/modules/TelemetryHandler.d.ts +64 -0
  53. package/dist/lib/core/modules/TelemetryHandler.js +171 -0
  54. package/dist/lib/core/modules/ToolsManager.d.ts +98 -0
  55. package/dist/lib/core/modules/ToolsManager.js +522 -0
  56. package/dist/lib/core/modules/Utilities.d.ts +88 -0
  57. package/dist/lib/core/modules/Utilities.js +330 -0
  58. package/dist/lib/factories/providerRegistry.js +1 -1
  59. package/dist/lib/mcp/servers/agent/directToolsServer.js +0 -1
  60. package/dist/lib/models/modelRegistry.js +44 -0
  61. package/dist/lib/neurolink.js +35 -3
  62. package/dist/lib/providers/amazonBedrock.js +59 -10
  63. package/dist/lib/providers/anthropic.js +2 -30
  64. package/dist/lib/providers/azureOpenai.js +2 -24
  65. package/dist/lib/providers/googleAiStudio.js +2 -24
  66. package/dist/lib/providers/googleVertex.js +2 -45
  67. package/dist/lib/providers/huggingFace.js +3 -31
  68. package/dist/lib/providers/litellm.d.ts +1 -1
  69. package/dist/lib/providers/litellm.js +110 -44
  70. package/dist/lib/providers/mistral.js +5 -32
  71. package/dist/lib/providers/ollama.d.ts +1 -0
  72. package/dist/lib/providers/ollama.js +476 -129
  73. package/dist/lib/providers/openAI.js +2 -28
  74. package/dist/lib/providers/openaiCompatible.js +3 -31
  75. package/dist/lib/types/content.d.ts +16 -113
  76. package/dist/lib/types/content.js +16 -2
  77. package/dist/lib/types/conversation.d.ts +3 -17
  78. package/dist/lib/types/generateTypes.d.ts +2 -2
  79. package/dist/lib/types/index.d.ts +2 -0
  80. package/dist/lib/types/index.js +2 -0
  81. package/dist/lib/types/multimodal.d.ts +282 -0
  82. package/dist/lib/types/multimodal.js +101 -0
  83. package/dist/lib/types/streamTypes.d.ts +2 -2
  84. package/dist/lib/utils/imageProcessor.d.ts +1 -1
  85. package/dist/lib/utils/messageBuilder.js +25 -2
  86. package/dist/lib/utils/multimodalOptionsBuilder.d.ts +1 -1
  87. package/dist/lib/utils/pdfProcessor.d.ts +9 -0
  88. package/dist/lib/utils/pdfProcessor.js +67 -9
  89. package/dist/mcp/servers/agent/directToolsServer.js +0 -1
  90. package/dist/models/modelRegistry.js +44 -0
  91. package/dist/neurolink.js +35 -3
  92. package/dist/providers/amazonBedrock.js +59 -10
  93. package/dist/providers/anthropic.js +2 -30
  94. package/dist/providers/azureOpenai.js +2 -24
  95. package/dist/providers/googleAiStudio.js +2 -24
  96. package/dist/providers/googleVertex.js +2 -45
  97. package/dist/providers/huggingFace.js +3 -31
  98. package/dist/providers/litellm.d.ts +1 -1
  99. package/dist/providers/litellm.js +110 -44
  100. package/dist/providers/mistral.js +5 -32
  101. package/dist/providers/ollama.d.ts +1 -0
  102. package/dist/providers/ollama.js +476 -129
  103. package/dist/providers/openAI.js +2 -28
  104. package/dist/providers/openaiCompatible.js +3 -31
  105. package/dist/types/content.d.ts +16 -113
  106. package/dist/types/content.js +16 -2
  107. package/dist/types/conversation.d.ts +3 -17
  108. package/dist/types/generateTypes.d.ts +2 -2
  109. package/dist/types/index.d.ts +2 -0
  110. package/dist/types/index.js +2 -0
  111. package/dist/types/multimodal.d.ts +282 -0
  112. package/dist/types/multimodal.js +100 -0
  113. package/dist/types/streamTypes.d.ts +2 -2
  114. package/dist/utils/imageProcessor.d.ts +1 -1
  115. package/dist/utils/messageBuilder.js +25 -2
  116. package/dist/utils/multimodalOptionsBuilder.d.ts +1 -1
  117. package/dist/utils/pdfProcessor.d.ts +9 -0
  118. package/dist/utils/pdfProcessor.js +67 -9
  119. package/package.json +5 -2
package/CHANGELOG.md CHANGED
@@ -1,3 +1,15 @@
1
+ ## [8.4.0](https://github.com/juspay/neurolink/compare/v8.3.0...v8.4.0) (2025-12-01)
2
+
3
+ ### Features
4
+
5
+ - **(core):** comprehensive multimodal architecture with modular refactoring and enhanced testing ([fd8d207](https://github.com/juspay/neurolink/commit/fd8d207a2f9be61e65fd00d697a0456511ece30f))
6
+
7
+ ## [8.3.0](https://github.com/juspay/neurolink/compare/v8.2.0...v8.3.0) (2025-11-28)
8
+
9
+ ### Features
10
+
11
+ - **(cli):** make stream the default command in loop mode ([7aeb1d7](https://github.com/juspay/neurolink/commit/7aeb1d790e1b103b5fc1889e21431e9c7b9dcf5f))
12
+
1
13
  ## [8.2.0](https://github.com/juspay/neurolink/compare/v8.1.0...v8.2.0) (2025-11-25)
2
14
 
3
15
  ### Features
package/README.md CHANGED
@@ -73,6 +73,7 @@ NeuroLink is a comprehensive AI development platform. Every feature below is pro
73
73
  | **OpenAI Compatible** | Any OpenAI-compatible endpoint | Varies | ✅ Full | ✅ Production | [Setup Guide](docs/getting-started/provider-setup.md#openai-compatible) |
74
74
 
75
75
  **[📖 Provider Comparison Guide](docs/reference/provider-comparison.md)** - Detailed feature matrix and selection criteria
76
+ **[🔬 Provider Feature Compatibility](docs/reference/provider-feature-compatibility.md)** - Test-based compatibility reference for all 19 features across 11 providers
76
77
 
77
78
  ---
78
79
 
@@ -211,15 +212,24 @@ npx @juspay/neurolink loop
211
212
  # Start the interactive session
212
213
  $ npx @juspay/neurolink loop
213
214
 
214
- neurolink » set provider google-ai
215
+ neurolink » /set provider google-ai
215
216
  ✓ provider set to google-ai
216
217
 
217
- neurolink » set temperature 0.8
218
+ neurolink » /set temperature 0.8
218
219
  ✓ temperature set to 0.8
219
220
 
220
- neurolink » generate "Tell me a fun fact about space"
221
+ neurolink » Tell me a fun fact about space
222
+
221
223
  The quietest place on Earth is an anechoic chamber at Microsoft's headquarters in Redmond, Washington. The background noise is so low that it's measured in negative decibels, and you can hear your own heartbeat.
222
224
 
225
+ # Use "/" for CLI commands
226
+ neurolink » /generate "Draft a haiku"
227
+ ...
228
+
229
+ # Use "//" to escape prompts starting with "/"
230
+ neurolink » //what is /usr/bin used for?
231
+ ...
232
+
223
233
  # Exit the session
224
234
  neurolink » exit
225
235
  ```
@@ -2,7 +2,7 @@
2
2
  * Provider Image Adapter - Smart routing for multimodal content
3
3
  * Handles provider-specific image formatting and vision capability validation
4
4
  */
5
- import type { Content } from "../types/content.js";
5
+ import type { Content } from "../types/multimodal.js";
6
6
  /**
7
7
  * Simplified logger for essential error reporting only
8
8
  */
@@ -53,6 +53,7 @@ const VISION_CAPABILITIES = {
53
53
  anthropic: [
54
54
  "claude-3-7-sonnet",
55
55
  "claude-3-5-sonnet",
56
+ "claude-haiku-4-5",
56
57
  "claude-3-opus",
57
58
  "claude-3-sonnet",
58
59
  "claude-3-haiku",
@@ -82,6 +83,7 @@ const VISION_CAPABILITIES = {
82
83
  "gemini-1.5-flash",
83
84
  // Claude 4.x models (versioned format)
84
85
  "claude-sonnet-4-5@",
86
+ "claude-haiku-4-5",
85
87
  "claude-sonnet-4@",
86
88
  "claude-opus-4-1@",
87
89
  "claude-opus-4@",
@@ -100,9 +102,12 @@ const VISION_CAPABILITIES = {
100
102
  "claude-sonnet-3",
101
103
  "claude-opus-3",
102
104
  "claude-haiku-3",
105
+ "claude-haiku-4",
103
106
  // Additional patterns for compatibility
104
107
  "claude-3.5-sonnet",
105
108
  "claude-3.5-haiku",
109
+ "claude-4.5-haiku",
110
+ "claude-haiku-4-5",
106
111
  "claude-3.0-sonnet",
107
112
  "claude-3.0-opus",
108
113
  ],
@@ -118,6 +123,25 @@ const VISION_CAPABILITIES = {
118
123
  "gpt-4.1",
119
124
  "gpt-5",
120
125
  ],
126
+ mistral: [
127
+ // Mistral Small 3.2 (vision support for images: PNG, JPEG, WEBP, GIF)
128
+ "mistral-small",
129
+ "mistral-small-latest",
130
+ "mistral-small-3.2",
131
+ "mistral-small-2506",
132
+ // Mistral Medium 3.1 (vision support)
133
+ "mistral-medium",
134
+ "mistral-medium-latest",
135
+ "mistral-medium-3.1",
136
+ // Magistral models (vision support)
137
+ "magistral-small",
138
+ "magistral-medium",
139
+ // Pixtral models (specialized vision models)
140
+ "pixtral-12b",
141
+ "pixtral-12b-latest",
142
+ "pixtral-large",
143
+ "pixtral-large-latest",
144
+ ],
121
145
  ollama: [
122
146
  // Llama 4 family (May 2025 - Best vision + tool calling)
123
147
  "llama4:scout",
@@ -137,6 +161,44 @@ const VISION_CAPABILITIES = {
137
161
  // LLaVA (vision-focused)
138
162
  "llava",
139
163
  ],
164
+ bedrock: [
165
+ // Claude Sonnet 4.5 family (supports vision, PDFs, images)
166
+ "claude-sonnet-4-5",
167
+ "claude-sonnet-4.5",
168
+ "anthropic.claude-sonnet-4-5",
169
+ // Claude Haiku 4.5 family (supports vision, PDFs, images)
170
+ "claude-haiku-4-5",
171
+ "claude-haiku-4.5",
172
+ "anthropic.claude-haiku-4-5",
173
+ // Claude Sonnet 4 family
174
+ "claude-sonnet-4",
175
+ "claude-sonnet-4@",
176
+ "anthropic.claude-sonnet-4",
177
+ // Claude Opus 4 family
178
+ "claude-opus-4",
179
+ "claude-opus-4-1",
180
+ "claude-opus-4@",
181
+ "anthropic.claude-opus-4",
182
+ // Claude 3.7 Sonnet
183
+ "claude-3-7-sonnet",
184
+ "claude-3.7-sonnet",
185
+ "anthropic.claude-3-7-sonnet",
186
+ // Claude 3.5 Sonnet
187
+ "claude-3-5-sonnet",
188
+ "claude-3.5-sonnet",
189
+ "anthropic.claude-3-5-sonnet",
190
+ // Claude 3 Opus
191
+ "claude-3-opus",
192
+ "anthropic.claude-3-opus",
193
+ // Claude 3 Sonnet
194
+ "claude-3-sonnet",
195
+ "anthropic.claude-3-sonnet",
196
+ // Claude 3 Haiku
197
+ "claude-3-haiku",
198
+ "anthropic.claude-3-haiku",
199
+ // Generic anthropic.claude prefix (catches all Claude models)
200
+ "anthropic.claude",
201
+ ],
140
202
  };
141
203
  /**
142
204
  * Provider Image Adapter - Smart routing and formatting
@@ -275,77 +275,6 @@ export declare const directAgentTools: {
275
275
  written?: undefined;
276
276
  }>;
277
277
  };
278
- searchFiles: import("ai").Tool<z.ZodObject<{
279
- directory: z.ZodString;
280
- pattern: z.ZodString;
281
- recursive: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
282
- }, "strip", z.ZodTypeAny, {
283
- directory: string;
284
- pattern: string;
285
- recursive: boolean;
286
- }, {
287
- directory: string;
288
- pattern: string;
289
- recursive?: boolean | undefined;
290
- }>, {
291
- success: boolean;
292
- error: string;
293
- directory?: undefined;
294
- pattern?: undefined;
295
- matches?: undefined;
296
- count?: undefined;
297
- } | {
298
- success: boolean;
299
- directory: string;
300
- pattern: string;
301
- matches: {
302
- name: string;
303
- path: string;
304
- size: number;
305
- lastModified: string;
306
- }[];
307
- count: number;
308
- error?: undefined;
309
- } | {
310
- success: boolean;
311
- error: string;
312
- directory: string;
313
- pattern: string;
314
- matches?: undefined;
315
- count?: undefined;
316
- }> & {
317
- execute: (args: {
318
- directory: string;
319
- pattern: string;
320
- recursive: boolean;
321
- }, options: import("ai").ToolExecutionOptions) => PromiseLike<{
322
- success: boolean;
323
- error: string;
324
- directory?: undefined;
325
- pattern?: undefined;
326
- matches?: undefined;
327
- count?: undefined;
328
- } | {
329
- success: boolean;
330
- directory: string;
331
- pattern: string;
332
- matches: {
333
- name: string;
334
- path: string;
335
- size: number;
336
- lastModified: string;
337
- }[];
338
- count: number;
339
- error?: undefined;
340
- } | {
341
- success: boolean;
342
- error: string;
343
- directory: string;
344
- pattern: string;
345
- matches?: undefined;
346
- count?: undefined;
347
- }>;
348
- };
349
278
  analyzeCSV: import("ai").Tool<z.ZodObject<{
350
279
  filePath: z.ZodEffects<z.ZodString, string, string>;
351
280
  operation: z.ZodEnum<["count_by_column", "sum_by_column", "average_by_column", "min_max_by_column", "describe"]>;
@@ -546,7 +475,6 @@ export type FilesystemToolsMap = {
546
475
  readFile: typeof directAgentTools.readFile;
547
476
  listDirectory: typeof directAgentTools.listDirectory;
548
477
  writeFile: typeof directAgentTools.writeFile;
549
- searchFiles: typeof directAgentTools.searchFiles;
550
478
  };
551
479
  export type UtilityToolsMap = {
552
480
  getCurrentTime: typeof directAgentTools.getCurrentTime;
@@ -264,79 +264,9 @@ export const directAgentTools = {
264
264
  }
265
265
  },
266
266
  }),
267
- searchFiles: tool({
268
- description: "Search for files by name pattern in a directory",
269
- parameters: z.object({
270
- directory: z.string().describe("Directory to search in"),
271
- pattern: z
272
- .string()
273
- .describe("File name pattern to search for (supports wildcards like *.js)"),
274
- recursive: z
275
- .boolean()
276
- .optional()
277
- .default(true)
278
- .describe("Search recursively in subdirectories"),
279
- }),
280
- execute: async ({ directory, pattern, recursive }) => {
281
- try {
282
- const resolvedDir = path.resolve(directory);
283
- if (!fs.existsSync(resolvedDir)) {
284
- return {
285
- success: false,
286
- error: `Directory does not exist: ${resolvedDir}`,
287
- };
288
- }
289
- const matches = [];
290
- const searchDir = (dir, depth = 0) => {
291
- if (!recursive && depth > 0) {
292
- return;
293
- }
294
- const items = fs.readdirSync(dir);
295
- for (const item of items) {
296
- const itemPath = path.join(dir, item);
297
- const stats = fs.statSync(itemPath);
298
- if (stats.isDirectory()) {
299
- if (recursive && depth < 10) {
300
- // Prevent infinite recursion
301
- searchDir(itemPath, depth + 1);
302
- }
303
- }
304
- else if (stats.isFile()) {
305
- // Simple pattern matching (convert * to regex)
306
- const regexPattern = pattern
307
- .replace(/\*/g, ".*")
308
- .replace(/\?/g, ".");
309
- const regex = new RegExp(`^${regexPattern}$`, "i");
310
- if (regex.test(item)) {
311
- matches.push({
312
- name: item,
313
- path: itemPath,
314
- size: stats.size,
315
- lastModified: stats.mtime.toISOString(),
316
- });
317
- }
318
- }
319
- }
320
- };
321
- searchDir(resolvedDir);
322
- return {
323
- success: true,
324
- directory: resolvedDir,
325
- pattern,
326
- matches,
327
- count: matches.length,
328
- };
329
- }
330
- catch (error) {
331
- return {
332
- success: false,
333
- error: error instanceof Error ? error.message : String(error),
334
- directory,
335
- pattern,
336
- };
337
- }
338
- },
339
- }),
267
+ // NOTE: searchFiles was removed to avoid naming conflict with external MCP 'search_files' tool
268
+ // from @modelcontextprotocol/server-filesystem which provides the same functionality
269
+ // with parameters {path, pattern, excludePatterns}
340
270
  analyzeCSV: tool({
341
271
  description: "Analyze CSV file for accurate counting, aggregation, and statistical analysis. Use this for precise data operations like counting rows by column, calculating sums/averages, finding min/max values, etc. The tool reads the file directly - do NOT pass CSV content.",
342
272
  parameters: z.object({
@@ -740,7 +670,6 @@ export function getToolsForCategory(category = "all") {
740
670
  readFile: directAgentTools.readFile,
741
671
  listDirectory: directAgentTools.listDirectory,
742
672
  writeFile: directAgentTools.writeFile,
743
- searchFiles: directAgentTools.searchFiles,
744
673
  };
745
674
  case "utility":
746
675
  return {
@@ -18,9 +18,9 @@ declare const ConfigSchema: z.ZodObject<{
18
18
  apiKey?: string | undefined;
19
19
  baseURL?: string | undefined;
20
20
  }, {
21
+ model?: string | undefined;
21
22
  apiKey?: string | undefined;
22
23
  baseURL?: string | undefined;
23
- model?: string | undefined;
24
24
  }>>;
25
25
  bedrock: z.ZodOptional<z.ZodObject<{
26
26
  region: z.ZodOptional<z.ZodString>;
@@ -73,8 +73,8 @@ declare const ConfigSchema: z.ZodObject<{
73
73
  model: string;
74
74
  apiKey?: string | undefined;
75
75
  }, {
76
- apiKey?: string | undefined;
77
76
  model?: string | undefined;
77
+ apiKey?: string | undefined;
78
78
  }>>;
79
79
  azure: z.ZodOptional<z.ZodObject<{
80
80
  apiKey: z.ZodOptional<z.ZodString>;
@@ -87,8 +87,8 @@ declare const ConfigSchema: z.ZodObject<{
87
87
  endpoint?: string | undefined;
88
88
  deploymentId?: string | undefined;
89
89
  }, {
90
- apiKey?: string | undefined;
91
90
  model?: string | undefined;
91
+ apiKey?: string | undefined;
92
92
  endpoint?: string | undefined;
93
93
  deploymentId?: string | undefined;
94
94
  }>>;
@@ -99,8 +99,8 @@ declare const ConfigSchema: z.ZodObject<{
99
99
  model: string;
100
100
  apiKey?: string | undefined;
101
101
  }, {
102
- apiKey?: string | undefined;
103
102
  model?: string | undefined;
103
+ apiKey?: string | undefined;
104
104
  }>>;
105
105
  huggingface: z.ZodOptional<z.ZodObject<{
106
106
  apiKey: z.ZodOptional<z.ZodString>;
@@ -109,8 +109,8 @@ declare const ConfigSchema: z.ZodObject<{
109
109
  model: string;
110
110
  apiKey?: string | undefined;
111
111
  }, {
112
- apiKey?: string | undefined;
113
112
  model?: string | undefined;
113
+ apiKey?: string | undefined;
114
114
  }>>;
115
115
  ollama: z.ZodOptional<z.ZodObject<{
116
116
  baseUrl: z.ZodDefault<z.ZodString>;
@@ -132,8 +132,8 @@ declare const ConfigSchema: z.ZodObject<{
132
132
  model: string;
133
133
  apiKey?: string | undefined;
134
134
  }, {
135
- apiKey?: string | undefined;
136
135
  model?: string | undefined;
136
+ apiKey?: string | undefined;
137
137
  }>>;
138
138
  }, "strip", z.ZodTypeAny, {
139
139
  bedrock?: {
@@ -193,9 +193,9 @@ declare const ConfigSchema: z.ZodObject<{
193
193
  sessionToken?: string | undefined;
194
194
  } | undefined;
195
195
  openai?: {
196
+ model?: string | undefined;
196
197
  apiKey?: string | undefined;
197
198
  baseURL?: string | undefined;
198
- model?: string | undefined;
199
199
  } | undefined;
200
200
  vertex?: {
201
201
  model?: string | undefined;
@@ -207,22 +207,22 @@ declare const ConfigSchema: z.ZodObject<{
207
207
  privateKey?: string | undefined;
208
208
  } | undefined;
209
209
  anthropic?: {
210
- apiKey?: string | undefined;
211
210
  model?: string | undefined;
211
+ apiKey?: string | undefined;
212
212
  } | undefined;
213
213
  azure?: {
214
- apiKey?: string | undefined;
215
214
  model?: string | undefined;
215
+ apiKey?: string | undefined;
216
216
  endpoint?: string | undefined;
217
217
  deploymentId?: string | undefined;
218
218
  } | undefined;
219
219
  "google-ai"?: {
220
- apiKey?: string | undefined;
221
220
  model?: string | undefined;
221
+ apiKey?: string | undefined;
222
222
  } | undefined;
223
223
  huggingface?: {
224
- apiKey?: string | undefined;
225
224
  model?: string | undefined;
225
+ apiKey?: string | undefined;
226
226
  } | undefined;
227
227
  ollama?: {
228
228
  timeout?: number | undefined;
@@ -230,8 +230,8 @@ declare const ConfigSchema: z.ZodObject<{
230
230
  baseUrl?: string | undefined;
231
231
  } | undefined;
232
232
  mistral?: {
233
- apiKey?: string | undefined;
234
233
  model?: string | undefined;
234
+ apiKey?: string | undefined;
235
235
  } | undefined;
236
236
  }>>;
237
237
  profiles: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodAny>>;
@@ -562,9 +562,9 @@ declare const ConfigSchema: z.ZodObject<{
562
562
  sessionToken?: string | undefined;
563
563
  } | undefined;
564
564
  openai?: {
565
+ model?: string | undefined;
565
566
  apiKey?: string | undefined;
566
567
  baseURL?: string | undefined;
567
- model?: string | undefined;
568
568
  } | undefined;
569
569
  vertex?: {
570
570
  model?: string | undefined;
@@ -576,22 +576,22 @@ declare const ConfigSchema: z.ZodObject<{
576
576
  privateKey?: string | undefined;
577
577
  } | undefined;
578
578
  anthropic?: {
579
- apiKey?: string | undefined;
580
579
  model?: string | undefined;
580
+ apiKey?: string | undefined;
581
581
  } | undefined;
582
582
  azure?: {
583
- apiKey?: string | undefined;
584
583
  model?: string | undefined;
584
+ apiKey?: string | undefined;
585
585
  endpoint?: string | undefined;
586
586
  deploymentId?: string | undefined;
587
587
  } | undefined;
588
588
  "google-ai"?: {
589
- apiKey?: string | undefined;
590
589
  model?: string | undefined;
590
+ apiKey?: string | undefined;
591
591
  } | undefined;
592
592
  huggingface?: {
593
- apiKey?: string | undefined;
594
593
  model?: string | undefined;
594
+ apiKey?: string | undefined;
595
595
  } | undefined;
596
596
  ollama?: {
597
597
  timeout?: number | undefined;
@@ -599,8 +599,8 @@ declare const ConfigSchema: z.ZodObject<{
599
599
  baseUrl?: string | undefined;
600
600
  } | undefined;
601
601
  mistral?: {
602
- apiKey?: string | undefined;
603
602
  model?: string | undefined;
603
+ apiKey?: string | undefined;
604
604
  } | undefined;
605
605
  } | undefined;
606
606
  defaultProvider?: "bedrock" | "openai" | "vertex" | "anthropic" | "azure" | "google-ai" | "huggingface" | "ollama" | "mistral" | "auto" | undefined;
@@ -34,6 +34,7 @@ export class CLICommandFactory {
34
34
  "anthropic",
35
35
  "azure",
36
36
  "google-ai",
37
+ "google-ai-studio",
37
38
  "huggingface",
38
39
  "ollama",
39
40
  "mistral",
@@ -121,6 +121,10 @@ export class ConversationSelector {
121
121
  if (conversation &&
122
122
  conversation.messages &&
123
123
  conversation.messages.length > 0) {
124
+ // Only include conversations with session IDs prefixed with "NL_"
125
+ if (!conversation.sessionId?.startsWith("NL_")) {
126
+ return null;
127
+ }
124
128
  return this.createConversationSummary(conversation);
125
129
  }
126
130
  return null;
@@ -81,14 +81,31 @@ export class LoopSession {
81
81
  if (!command) {
82
82
  continue;
83
83
  }
84
- // Handle session variable commands first
85
- if (await this.handleSessionCommands(command)) {
86
- // Save session commands to history (both memory and file)
87
- if (command && command.trim()) {
88
- this.commandHistory.unshift(command);
89
- await saveCommandToHistory(command);
84
+ // Save command to history
85
+ if (command && command.trim()) {
86
+ this.commandHistory.unshift(command);
87
+ await saveCommandToHistory(command);
88
+ }
89
+ let processedCommand;
90
+ if (command.startsWith("//")) {
91
+ // Escape sequence - treat as stream with single /
92
+ processedCommand = ["stream", command.slice(1)];
93
+ }
94
+ else if (command.startsWith("/")) {
95
+ // Explicit CLI command: remove "/" prefix
96
+ processedCommand = command.slice(1).trim();
97
+ if (!processedCommand) {
98
+ logger.always(chalk.red("Type 'help' for available commands."));
99
+ continue;
100
+ }
101
+ // Handle session variable commands and skip further processing
102
+ if (await this.handleSessionCommands(processedCommand)) {
103
+ continue;
90
104
  }
91
- continue;
105
+ }
106
+ else {
107
+ // Default: treat as stream command with array format
108
+ processedCommand = ["stream", command];
92
109
  }
93
110
  // Execute the command
94
111
  // The .fail() handler in cli.ts is now session-aware and will
@@ -102,16 +119,11 @@ export class LoopSession {
102
119
  throw err || new Error(msg);
103
120
  })
104
121
  .exitProcess(false)
105
- .parse(command);
106
- // Save command to history (both memory and file)
107
- if (command && command.trim()) {
108
- this.commandHistory.unshift(command);
109
- await saveCommandToHistory(command);
110
- }
122
+ .parse(processedCommand);
111
123
  }
112
124
  catch (error) {
113
- // Catch errors from the main loop (e.g., readline prompt itself failing)
114
- handleError(error, "An unexpected error occurred");
125
+ // Handle command execution errors gracefully
126
+ handleError(error, "Command execution failed");
115
127
  }
116
128
  }
117
129
  // Cleanup on exit
@@ -72,6 +72,7 @@ export declare enum GoogleAIModels {
72
72
  * Supported Models for Anthropic (Direct API)
73
73
  */
74
74
  export declare enum AnthropicModels {
75
+ CLAUDE_4_5_HAIKU = "claude-haiku-4-5-20251001",
75
76
  CLAUDE_3_5_SONNET = "claude-3-5-sonnet-20241022",
76
77
  CLAUDE_3_5_HAIKU = "claude-3-5-haiku-20241022",
77
78
  CLAUDE_3_SONNET = "claude-3-sonnet-20240229",
@@ -91,7 +91,9 @@ export var GoogleAIModels;
91
91
  */
92
92
  export var AnthropicModels;
93
93
  (function (AnthropicModels) {
94
- // Claude 3.5 Series (Latest)
94
+ // Claude 4.5 Series (Latest - October 2025)
95
+ AnthropicModels["CLAUDE_4_5_HAIKU"] = "claude-haiku-4-5-20251001";
96
+ // Claude 3.5 Series
95
97
  AnthropicModels["CLAUDE_3_5_SONNET"] = "claude-3-5-sonnet-20241022";
96
98
  AnthropicModels["CLAUDE_3_5_HAIKU"] = "claude-3-5-haiku-20241022";
97
99
  // Claude 3 Series (Legacy support)
@@ -63,6 +63,7 @@ export declare const PROVIDER_TOKEN_LIMITS: {
63
63
  readonly "claude-3-5-sonnet-20241022": 4096;
64
64
  readonly "claude-3-opus-20240229": 4096;
65
65
  readonly "claude-3-5-haiku-20241022": 4096;
66
+ readonly "claude-haiku-4-5-20251001": 8192;
66
67
  readonly "claude-3-sonnet-20240229": 4096;
67
68
  readonly default: 4096;
68
69
  };
@@ -100,6 +101,7 @@ export declare const PROVIDER_TOKEN_LIMITS: {
100
101
  readonly "claude-opus-4@20250514": 4096;
101
102
  readonly "claude-3-5-sonnet-20241022": 4096;
102
103
  readonly "claude-3-5-haiku-20241022": 4096;
104
+ readonly "claude-haiku-4-5-20251001": 8192;
103
105
  readonly "claude-3-sonnet-20240229": 4096;
104
106
  readonly "claude-3-haiku-20240307": 4096;
105
107
  readonly "claude-3-opus-20240229": 4096;
@@ -111,6 +113,7 @@ export declare const PROVIDER_TOKEN_LIMITS: {
111
113
  readonly "anthropic.claude-3-haiku-20240307-v1:0": 4096;
112
114
  readonly "anthropic.claude-3-5-sonnet-20240620-v1:0": 4096;
113
115
  readonly "anthropic.claude-3-opus-20240229-v1:0": 4096;
116
+ readonly "anthropic.claude-haiku-4-5-20251001-v1:0": 8192;
114
117
  readonly "arn:aws:bedrock:us-east-2:225681119357:inference-profile/us.anthropic.claude-3-7-sonnet-20250219-v1:0": 4096;
115
118
  readonly default: 4096;
116
119
  };
@@ -63,6 +63,7 @@ export const PROVIDER_TOKEN_LIMITS = {
63
63
  "claude-3-5-sonnet-20241022": 4096,
64
64
  "claude-3-opus-20240229": 4096,
65
65
  "claude-3-5-haiku-20241022": 4096,
66
+ "claude-haiku-4-5-20251001": 8192,
66
67
  "claude-3-sonnet-20240229": 4096,
67
68
  default: 4096, // Conservative default for Anthropic
68
69
  },
@@ -100,6 +101,7 @@ export const PROVIDER_TOKEN_LIMITS = {
100
101
  "claude-opus-4@20250514": 4096,
101
102
  "claude-3-5-sonnet-20241022": 4096,
102
103
  "claude-3-5-haiku-20241022": 4096,
104
+ "claude-haiku-4-5-20251001": 8192,
103
105
  "claude-3-sonnet-20240229": 4096,
104
106
  "claude-3-haiku-20240307": 4096,
105
107
  "claude-3-opus-20240229": 4096,
@@ -111,6 +113,7 @@ export const PROVIDER_TOKEN_LIMITS = {
111
113
  "anthropic.claude-3-haiku-20240307-v1:0": 4096,
112
114
  "anthropic.claude-3-5-sonnet-20240620-v1:0": 4096,
113
115
  "anthropic.claude-3-opus-20240229-v1:0": 4096,
116
+ "anthropic.claude-haiku-4-5-20251001-v1:0": 8192,
114
117
  "arn:aws:bedrock:us-east-2:225681119357:inference-profile/us.anthropic.claude-3-7-sonnet-20250219-v1:0": 4096,
115
118
  default: 4096,
116
119
  },