@juspay/neurolink 8.26.0 → 8.26.1

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/CHANGELOG.md +6 -0
  2. package/README.md +47 -25
  3. package/dist/adapters/providerImageAdapter.js +11 -0
  4. package/dist/cli/commands/config.js +16 -23
  5. package/dist/cli/commands/setup-anthropic.js +3 -26
  6. package/dist/cli/commands/setup-azure.js +3 -22
  7. package/dist/cli/commands/setup-bedrock.js +3 -26
  8. package/dist/cli/commands/setup-google-ai.js +3 -22
  9. package/dist/cli/commands/setup-mistral.js +3 -31
  10. package/dist/cli/commands/setup-openai.js +3 -22
  11. package/dist/cli/factories/commandFactory.js +32 -0
  12. package/dist/cli/factories/ollamaCommandFactory.js +5 -17
  13. package/dist/cli/loop/optionsSchema.d.ts +1 -1
  14. package/dist/cli/loop/optionsSchema.js +13 -0
  15. package/dist/config/modelSpecificPrompts.d.ts +9 -0
  16. package/dist/config/modelSpecificPrompts.js +38 -0
  17. package/dist/constants/enums.d.ts +8 -0
  18. package/dist/constants/enums.js +8 -0
  19. package/dist/constants/tokens.d.ts +25 -0
  20. package/dist/constants/tokens.js +18 -0
  21. package/dist/core/analytics.js +7 -28
  22. package/dist/core/baseProvider.js +1 -0
  23. package/dist/core/constants.d.ts +1 -0
  24. package/dist/core/constants.js +1 -0
  25. package/dist/core/modules/GenerationHandler.js +43 -5
  26. package/dist/core/streamAnalytics.d.ts +1 -0
  27. package/dist/core/streamAnalytics.js +8 -16
  28. package/dist/lib/adapters/providerImageAdapter.js +11 -0
  29. package/dist/lib/config/modelSpecificPrompts.d.ts +9 -0
  30. package/dist/lib/config/modelSpecificPrompts.js +39 -0
  31. package/dist/lib/constants/enums.d.ts +8 -0
  32. package/dist/lib/constants/enums.js +8 -0
  33. package/dist/lib/constants/tokens.d.ts +25 -0
  34. package/dist/lib/constants/tokens.js +18 -0
  35. package/dist/lib/core/analytics.js +7 -28
  36. package/dist/lib/core/baseProvider.js +1 -0
  37. package/dist/lib/core/constants.d.ts +1 -0
  38. package/dist/lib/core/constants.js +1 -0
  39. package/dist/lib/core/modules/GenerationHandler.js +43 -5
  40. package/dist/lib/core/streamAnalytics.d.ts +1 -0
  41. package/dist/lib/core/streamAnalytics.js +8 -16
  42. package/dist/lib/providers/googleAiStudio.d.ts +15 -0
  43. package/dist/lib/providers/googleAiStudio.js +659 -3
  44. package/dist/lib/providers/googleVertex.d.ts +25 -0
  45. package/dist/lib/providers/googleVertex.js +978 -3
  46. package/dist/lib/types/analytics.d.ts +4 -0
  47. package/dist/lib/types/cli.d.ts +16 -0
  48. package/dist/lib/types/conversation.d.ts +72 -4
  49. package/dist/lib/types/conversation.js +30 -0
  50. package/dist/lib/types/generateTypes.d.ts +135 -0
  51. package/dist/lib/types/groundingTypes.d.ts +231 -0
  52. package/dist/lib/types/groundingTypes.js +12 -0
  53. package/dist/lib/types/providers.d.ts +29 -0
  54. package/dist/lib/types/streamTypes.d.ts +54 -0
  55. package/dist/lib/utils/analyticsUtils.js +22 -2
  56. package/dist/lib/utils/modelChoices.d.ts +82 -0
  57. package/dist/lib/utils/modelChoices.js +402 -0
  58. package/dist/lib/utils/modelDetection.d.ts +9 -0
  59. package/dist/lib/utils/modelDetection.js +81 -0
  60. package/dist/lib/utils/schemaConversion.d.ts +12 -0
  61. package/dist/lib/utils/schemaConversion.js +90 -0
  62. package/dist/lib/utils/thinkingConfig.d.ts +108 -0
  63. package/dist/lib/utils/thinkingConfig.js +105 -0
  64. package/dist/lib/utils/tokenUtils.d.ts +124 -0
  65. package/dist/lib/utils/tokenUtils.js +240 -0
  66. package/dist/lib/utils/transformationUtils.js +15 -26
  67. package/dist/providers/googleAiStudio.d.ts +15 -0
  68. package/dist/providers/googleAiStudio.js +659 -3
  69. package/dist/providers/googleVertex.d.ts +25 -0
  70. package/dist/providers/googleVertex.js +978 -3
  71. package/dist/types/analytics.d.ts +4 -0
  72. package/dist/types/cli.d.ts +16 -0
  73. package/dist/types/conversation.d.ts +72 -4
  74. package/dist/types/conversation.js +30 -0
  75. package/dist/types/generateTypes.d.ts +135 -0
  76. package/dist/types/groundingTypes.d.ts +231 -0
  77. package/dist/types/groundingTypes.js +11 -0
  78. package/dist/types/providers.d.ts +29 -0
  79. package/dist/types/streamTypes.d.ts +54 -0
  80. package/dist/utils/analyticsUtils.js +22 -2
  81. package/dist/utils/modelChoices.d.ts +82 -0
  82. package/dist/utils/modelChoices.js +401 -0
  83. package/dist/utils/modelDetection.d.ts +9 -0
  84. package/dist/utils/modelDetection.js +80 -0
  85. package/dist/utils/schemaConversion.d.ts +12 -0
  86. package/dist/utils/schemaConversion.js +90 -0
  87. package/dist/utils/thinkingConfig.d.ts +108 -0
  88. package/dist/utils/thinkingConfig.js +104 -0
  89. package/dist/utils/tokenUtils.d.ts +124 -0
  90. package/dist/utils/tokenUtils.js +239 -0
  91. package/dist/utils/transformationUtils.js +15 -26
  92. package/package.json +4 -3
@@ -3,6 +3,7 @@
3
3
  * Centralizes repeated object transformation patterns to improve code reuse and maintainability
4
4
  */
5
5
  import { logger } from "./logger.js";
6
+ import { inlineJsonSchema } from "./schemaConversion.js";
6
7
  // ============================================================================
7
8
  // TOOL EXECUTION TRANSFORMATIONS
8
9
  // ============================================================================
@@ -262,42 +263,30 @@ export function transformAvailableTools(availableTools) {
262
263
  const directParameters = toolRecord.parameters;
263
264
  const fallbackSchema = toolRecord.schema;
264
265
  if (inputSchema && typeof inputSchema === "object") {
265
- if (inputSchema.$ref && inputSchema.definitions) {
266
- const definitions = inputSchema.definitions;
267
- const refValue = inputSchema.$ref;
268
- if (typeof refValue === "string") {
269
- const refKey = refValue.replace("#/definitions/", "");
270
- if (definitions[refKey] && typeof definitions[refKey] === "object") {
271
- const resolvedSchema = definitions[refKey];
272
- extractedParameters = {
273
- type: resolvedSchema.type || "object",
274
- properties: resolvedSchema.properties || {},
275
- required: resolvedSchema.required || [],
276
- ...resolvedSchema, // Include all schema metadata
277
- };
278
- }
279
- }
280
- }
281
- else if (inputSchema.properties) {
266
+ // Use shared inlineJsonSchema for recursive $ref resolution
267
+ const inlinedSchema = inlineJsonSchema(inputSchema);
268
+ if (inlinedSchema.properties) {
282
269
  extractedParameters = {
283
- type: inputSchema.type || "object",
284
- properties: inputSchema.properties,
285
- required: inputSchema.required || [],
286
- ...inputSchema,
270
+ type: inlinedSchema.type || "object",
271
+ properties: inlinedSchema.properties,
272
+ required: inlinedSchema.required || [],
273
+ ...inlinedSchema,
287
274
  };
288
275
  }
289
- else if (inputSchema.type === "object") {
290
- extractedParameters = inputSchema;
276
+ else if (inlinedSchema.type === "object") {
277
+ extractedParameters = inlinedSchema;
291
278
  }
292
279
  else {
293
- extractedParameters = inputSchema;
280
+ extractedParameters = inlinedSchema;
294
281
  }
295
282
  }
296
283
  else if (directParameters && typeof directParameters === "object") {
297
- extractedParameters = directParameters;
284
+ // Also inline $ref for direct parameters if present
285
+ extractedParameters = inlineJsonSchema(directParameters);
298
286
  }
299
287
  else if (fallbackSchema && typeof fallbackSchema === "object") {
300
- extractedParameters = fallbackSchema;
288
+ // Also inline $ref for fallback schema if present
289
+ extractedParameters = inlineJsonSchema(fallbackSchema);
301
290
  }
302
291
  if (!extractedParameters || typeof extractedParameters !== "object") {
303
292
  extractedParameters = {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@juspay/neurolink",
3
- "version": "8.26.0",
3
+ "version": "8.26.1",
4
4
  "description": "Universal AI Development Platform with working MCP integration, multi-provider support, and professional CLI. Built-in tools operational, 58+ external MCP servers discoverable. Connect to filesystem, GitHub, database operations, and more. Build, test, and deploy AI applications with 13 providers: OpenAI, Anthropic, Google AI, AWS Bedrock, Azure, Hugging Face, Ollama, and Mistral AI.",
5
5
  "author": {
6
6
  "name": "Juspay Technologies",
@@ -164,9 +164,8 @@
164
164
  "@aws-sdk/client-sagemaker-runtime": "^3.886.0",
165
165
  "@aws-sdk/credential-provider-node": "^3.886.0",
166
166
  "@aws-sdk/types": "^3.862.0",
167
- "@google-cloud/text-to-speech": "^5.0.0",
168
167
  "@google-cloud/vertexai": "^1.10.0",
169
- "@google/genai": "^1.19.0",
168
+ "@google/genai": "^1.34.0",
170
169
  "@google/generative-ai": "^0.24.1",
171
170
  "@huggingface/inference": "^2.8.1",
172
171
  "@langfuse/otel": "^4.2.0",
@@ -215,6 +214,7 @@
215
214
  "@changesets/changelog-github": "^0.5.1",
216
215
  "@changesets/cli": "^2.29.7",
217
216
  "@eslint/js": "^9.35.0",
217
+ "@google-cloud/text-to-speech": "^5.0.0",
218
218
  "@semantic-release/changelog": "^6.0.3",
219
219
  "@semantic-release/commit-analyzer": "^13.0.1",
220
220
  "@semantic-release/git": "^10.0.1",
@@ -279,6 +279,7 @@
279
279
  "gpt-4",
280
280
  "claude",
281
281
  "gemini",
282
+ "gemini-3",
282
283
  "ai-sdk",
283
284
  "typescript",
284
285
  "cli-tool",