@juspay/neurolink 7.26.1 → 7.28.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 (33) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/dist/cli/commands/config.d.ts +3 -3
  3. package/dist/lib/mcp/toolDiscoveryService.js +1 -1
  4. package/dist/lib/neurolink.d.ts +7 -1
  5. package/dist/lib/neurolink.js +1130 -56
  6. package/dist/lib/providers/amazonBedrock.d.ts +2 -2
  7. package/dist/lib/providers/amazonBedrock.js +16 -7
  8. package/dist/lib/providers/googleVertex.d.ts +28 -3
  9. package/dist/lib/providers/googleVertex.js +1132 -84
  10. package/dist/lib/providers/litellm.d.ts +1 -1
  11. package/dist/lib/providers/litellm.js +7 -4
  12. package/dist/lib/providers/openaiCompatible.d.ts +1 -1
  13. package/dist/lib/providers/openaiCompatible.js +7 -4
  14. package/dist/lib/proxy/proxyFetch.js +124 -2
  15. package/dist/lib/utils/providerHealth.d.ts +57 -1
  16. package/dist/lib/utils/providerHealth.js +638 -33
  17. package/dist/lib/utils/transformationUtils.js +3 -3
  18. package/dist/mcp/toolDiscoveryService.js +1 -1
  19. package/dist/neurolink.d.ts +7 -1
  20. package/dist/neurolink.js +1130 -56
  21. package/dist/providers/amazonBedrock.d.ts +2 -2
  22. package/dist/providers/amazonBedrock.js +16 -7
  23. package/dist/providers/googleVertex.d.ts +28 -3
  24. package/dist/providers/googleVertex.js +1132 -84
  25. package/dist/providers/litellm.d.ts +1 -1
  26. package/dist/providers/litellm.js +7 -4
  27. package/dist/providers/openaiCompatible.d.ts +1 -1
  28. package/dist/providers/openaiCompatible.js +7 -4
  29. package/dist/proxy/proxyFetch.js +124 -2
  30. package/dist/utils/providerHealth.d.ts +57 -1
  31. package/dist/utils/providerHealth.js +638 -33
  32. package/dist/utils/transformationUtils.js +3 -3
  33. package/package.json +1 -1
@@ -60,12 +60,12 @@ export function transformToolExecutions(toolExecutions) {
60
60
  {};
61
61
  }
62
62
  // Enhanced output extraction with success indication
63
- let output = teRecord.output ||
63
+ const output = teRecord.output ||
64
64
  teRecord.result ||
65
65
  teRecord.response ||
66
66
  "success";
67
67
  // Enhanced duration extraction
68
- let duration = teRecord.duration ??
68
+ const duration = teRecord.duration ??
69
69
  teRecord.executionTime ??
70
70
  teRecord.responseTime ??
71
71
  0;
@@ -105,7 +105,7 @@ export function transformToolExecutionsForMCP(toolExecutions) {
105
105
  toolName = `mcp_tool_execution_${index}`;
106
106
  }
107
107
  // Enhanced execution time extraction
108
- let executionTime = teRecord.duration ??
108
+ const executionTime = teRecord.duration ??
109
109
  teRecord.executionTime ??
110
110
  teRecord.responseTime ??
111
111
  0;
@@ -460,7 +460,7 @@ export class ToolDiscoveryService extends EventEmitter {
460
460
  isArray: Array.isArray(result),
461
461
  isObject: isObject(result),
462
462
  hasKeys: isObject(result) ? Object.keys(result).length : 0,
463
- fullResponse: result // Log the complete response, not a truncated sample
463
+ fullResponse: result, // Log the complete response, not a truncated sample
464
464
  });
465
465
  // COMPLETELY PERMISSIVE APPROACH:
466
466
  // - Any response format is valid (objects, strings, arrays, booleans, numbers)
@@ -12,7 +12,7 @@ import type { MCPServerInfo, MCPExecutableTool } from "./types/mcpTypes.js";
12
12
  import type { JsonObject } from "./types/common.js";
13
13
  import type { BatchOperationResult } from "./types/typeAliases.js";
14
14
  import { EventEmitter } from "events";
15
- import type { ConversationMemoryConfig } from "./types/conversationTypes.js";
15
+ import type { ConversationMemoryConfig, ChatMessage } from "./types/conversationTypes.js";
16
16
  import type { ExternalMCPServerInstance, ExternalMCPOperationResult, ExternalMCPToolInfo } from "./types/externalMcp.js";
17
17
  export interface ProviderStatus {
18
18
  provider: string;
@@ -394,6 +394,12 @@ export declare class NeuroLink {
394
394
  * Get conversation memory statistics (public API)
395
395
  */
396
396
  getConversationStats(): Promise<import("./types/conversationTypes.js").ConversationMemoryStats>;
397
+ /**
398
+ * Get complete conversation history for a specific session (public API)
399
+ * @param sessionId - The session ID to retrieve history for
400
+ * @returns Array of ChatMessage objects in chronological order, or empty array if session doesn't exist
401
+ */
402
+ getConversationHistory(sessionId: string): Promise<ChatMessage[]>;
397
403
  /**
398
404
  * Clear conversation history for a specific session (public API)
399
405
  */