@juspay/neurolink 7.26.1 → 7.27.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.
- package/CHANGELOG.md +6 -0
- package/dist/lib/neurolink.d.ts +7 -1
- package/dist/lib/neurolink.js +31 -0
- package/dist/neurolink.d.ts +7 -1
- package/dist/neurolink.js +31 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
## [7.27.0](https://github.com/juspay/neurolink/compare/v7.26.1...v7.27.0) (2025-08-24)
|
|
2
|
+
|
|
3
|
+
### Features
|
|
4
|
+
|
|
5
|
+
- **(History):** Added the functionality to export the conversation history for debugging purpose ([71cec7e](https://github.com/juspay/neurolink/commit/71cec7e30154d80c123cae022806dfea58edbe69))
|
|
6
|
+
|
|
1
7
|
## [7.26.1](https://github.com/juspay/neurolink/compare/v7.26.0...v7.26.1) (2025-08-21)
|
|
2
8
|
|
|
3
9
|
## [7.26.0](https://github.com/juspay/neurolink/compare/v7.25.0...v7.26.0) (2025-08-21)
|
package/dist/lib/neurolink.d.ts
CHANGED
|
@@ -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
|
*/
|
package/dist/lib/neurolink.js
CHANGED
|
@@ -2002,6 +2002,37 @@ export class NeuroLink {
|
|
|
2002
2002
|
}
|
|
2003
2003
|
return await this.conversationMemory.getStats();
|
|
2004
2004
|
}
|
|
2005
|
+
/**
|
|
2006
|
+
* Get complete conversation history for a specific session (public API)
|
|
2007
|
+
* @param sessionId - The session ID to retrieve history for
|
|
2008
|
+
* @returns Array of ChatMessage objects in chronological order, or empty array if session doesn't exist
|
|
2009
|
+
*/
|
|
2010
|
+
async getConversationHistory(sessionId) {
|
|
2011
|
+
if (!this.conversationMemory) {
|
|
2012
|
+
throw new Error("Conversation memory is not enabled");
|
|
2013
|
+
}
|
|
2014
|
+
if (!sessionId || typeof sessionId !== "string") {
|
|
2015
|
+
throw new Error("Session ID must be a non-empty string");
|
|
2016
|
+
}
|
|
2017
|
+
try {
|
|
2018
|
+
// Use the existing buildContextMessages method to get the complete history
|
|
2019
|
+
const messages = this.conversationMemory.buildContextMessages(sessionId);
|
|
2020
|
+
logger.debug("Retrieved conversation history", {
|
|
2021
|
+
sessionId,
|
|
2022
|
+
messageCount: messages.length,
|
|
2023
|
+
turnCount: messages.length / 2, // Each turn = user + assistant message
|
|
2024
|
+
});
|
|
2025
|
+
return messages;
|
|
2026
|
+
}
|
|
2027
|
+
catch (error) {
|
|
2028
|
+
logger.error("Failed to retrieve conversation history", {
|
|
2029
|
+
sessionId,
|
|
2030
|
+
error: error instanceof Error ? error.message : String(error),
|
|
2031
|
+
});
|
|
2032
|
+
// Return empty array for graceful handling of missing sessions
|
|
2033
|
+
return [];
|
|
2034
|
+
}
|
|
2035
|
+
}
|
|
2005
2036
|
/**
|
|
2006
2037
|
* Clear conversation history for a specific session (public API)
|
|
2007
2038
|
*/
|
package/dist/neurolink.d.ts
CHANGED
|
@@ -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
|
*/
|
package/dist/neurolink.js
CHANGED
|
@@ -2002,6 +2002,37 @@ export class NeuroLink {
|
|
|
2002
2002
|
}
|
|
2003
2003
|
return await this.conversationMemory.getStats();
|
|
2004
2004
|
}
|
|
2005
|
+
/**
|
|
2006
|
+
* Get complete conversation history for a specific session (public API)
|
|
2007
|
+
* @param sessionId - The session ID to retrieve history for
|
|
2008
|
+
* @returns Array of ChatMessage objects in chronological order, or empty array if session doesn't exist
|
|
2009
|
+
*/
|
|
2010
|
+
async getConversationHistory(sessionId) {
|
|
2011
|
+
if (!this.conversationMemory) {
|
|
2012
|
+
throw new Error("Conversation memory is not enabled");
|
|
2013
|
+
}
|
|
2014
|
+
if (!sessionId || typeof sessionId !== "string") {
|
|
2015
|
+
throw new Error("Session ID must be a non-empty string");
|
|
2016
|
+
}
|
|
2017
|
+
try {
|
|
2018
|
+
// Use the existing buildContextMessages method to get the complete history
|
|
2019
|
+
const messages = this.conversationMemory.buildContextMessages(sessionId);
|
|
2020
|
+
logger.debug("Retrieved conversation history", {
|
|
2021
|
+
sessionId,
|
|
2022
|
+
messageCount: messages.length,
|
|
2023
|
+
turnCount: messages.length / 2, // Each turn = user + assistant message
|
|
2024
|
+
});
|
|
2025
|
+
return messages;
|
|
2026
|
+
}
|
|
2027
|
+
catch (error) {
|
|
2028
|
+
logger.error("Failed to retrieve conversation history", {
|
|
2029
|
+
sessionId,
|
|
2030
|
+
error: error instanceof Error ? error.message : String(error),
|
|
2031
|
+
});
|
|
2032
|
+
// Return empty array for graceful handling of missing sessions
|
|
2033
|
+
return [];
|
|
2034
|
+
}
|
|
2035
|
+
}
|
|
2005
2036
|
/**
|
|
2006
2037
|
* Clear conversation history for a specific session (public API)
|
|
2007
2038
|
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@juspay/neurolink",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.27.0",
|
|
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 9 major providers: OpenAI, Anthropic, Google AI, AWS Bedrock, Azure, Hugging Face, Ollama, and Mistral AI.",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Juspay Technologies",
|