@juspay/neurolink 7.54.0 → 8.0.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.
- package/CHANGELOG.md +34 -0
- package/dist/index.d.ts +2 -2
- package/dist/index.js +2 -2
- package/dist/lib/index.d.ts +2 -2
- package/dist/lib/index.js +2 -2
- package/dist/lib/mcp/mcpClientFactory.js +0 -3
- package/dist/lib/memory/mem0Initializer.d.ts +10 -5
- package/dist/lib/memory/mem0Initializer.js +17 -28
- package/dist/lib/neurolink.d.ts +8 -0
- package/dist/lib/neurolink.js +351 -316
- package/dist/lib/services/server/ai/observability/instrumentation.d.ts +17 -0
- package/dist/lib/services/server/ai/observability/instrumentation.js +54 -5
- package/dist/lib/types/conversation.d.ts +3 -6
- package/dist/lib/types/observability.d.ts +4 -0
- package/dist/lib/types/utilities.d.ts +0 -35
- package/dist/lib/utils/fileDetector.js +3 -3
- package/dist/lib/utils/messageBuilder.js +3 -3
- package/dist/mcp/mcpClientFactory.js +0 -3
- package/dist/memory/mem0Initializer.d.ts +10 -5
- package/dist/memory/mem0Initializer.js +17 -28
- package/dist/neurolink.d.ts +8 -0
- package/dist/neurolink.js +351 -316
- package/dist/services/server/ai/observability/instrumentation.d.ts +17 -0
- package/dist/services/server/ai/observability/instrumentation.js +54 -5
- package/dist/types/conversation.d.ts +3 -6
- package/dist/types/observability.d.ts +4 -0
- package/dist/types/utilities.d.ts +0 -35
- package/dist/utils/fileDetector.js +3 -3
- package/dist/utils/messageBuilder.js +3 -3
- package/package.json +7 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,37 @@
|
|
|
1
|
+
## [8.0.1](https://github.com/juspay/neurolink/compare/v8.0.0...v8.0.1) (2025-11-20)
|
|
2
|
+
|
|
3
|
+
### Bug Fixes
|
|
4
|
+
|
|
5
|
+
- **(lint):** prettier and lint errors ([810475c](https://github.com/juspay/neurolink/commit/810475ce5bf997e389b4ee2c769cee0c03da7dfb))
|
|
6
|
+
- **(memory):** migrate to cloud-hosted mem0 API [BZ-45257] ([3a53a0c](https://github.com/juspay/neurolink/commit/3a53a0c792102fe5cd232f8b8c0ac59e73581497))
|
|
7
|
+
|
|
8
|
+
## [8.0.0](https://github.com/juspay/neurolink/compare/v7.54.0...v8.0.0) (2025-11-19)
|
|
9
|
+
|
|
10
|
+
### ⚠ BREAKING CHANGES
|
|
11
|
+
|
|
12
|
+
- **(deps):** Node.js 20.18.1+ is now required due to undici v7 dependency.
|
|
13
|
+
Undici v7 requires the File API which is only available in Node.js 20.18.1+.
|
|
14
|
+
|
|
15
|
+
Changes:
|
|
16
|
+
|
|
17
|
+
- Update fileDetector.ts to use interceptors.redirect()
|
|
18
|
+
- Update messageBuilder.ts to use interceptors.redirect()
|
|
19
|
+
- Add getGlobalDispatcher and interceptors imports from undici
|
|
20
|
+
- Temporarily exclude known package vulnerabilities from security validation
|
|
21
|
+
- Require Node.js >=20.18.1 in package.json engines
|
|
22
|
+
- Update npm requirement to >=10.0.0
|
|
23
|
+
- Remove Node 18 from CI test matrix
|
|
24
|
+
|
|
25
|
+
Fixes build failures introduced in f19c433 (undici bump to v7)
|
|
26
|
+
|
|
27
|
+
### Features
|
|
28
|
+
|
|
29
|
+
- **(observability):** add support for userid and sessionid in langfuse traces ([b1895a6](https://github.com/juspay/neurolink/commit/b1895a622edbba9c7c360069b411a0c575a271cb))
|
|
30
|
+
|
|
31
|
+
### Bug Fixes
|
|
32
|
+
|
|
33
|
+
- **(deps):** update undici v7 API usage and require Node.js 20+ ([dc81bba](https://github.com/juspay/neurolink/commit/dc81bba41b47c37340ec9a9d7c9f0d733c06adae))
|
|
34
|
+
|
|
1
35
|
## [7.54.0](https://github.com/juspay/neurolink/compare/v7.53.5...v7.54.0) (2025-11-08)
|
|
2
36
|
|
|
3
37
|
### Features
|
package/dist/index.d.ts
CHANGED
|
@@ -23,8 +23,8 @@ export { NeuroLink };
|
|
|
23
23
|
export type { MCPServerInfo } from "./types/mcpTypes.js";
|
|
24
24
|
export type { ObservabilityConfig, LangfuseConfig, OpenTelemetryConfig, } from "./types/observability.js";
|
|
25
25
|
export { buildObservabilityConfigFromEnv } from "./utils/observabilityHelpers.js";
|
|
26
|
-
import { initializeOpenTelemetry, shutdownOpenTelemetry, flushOpenTelemetry, getLangfuseHealthStatus } from "./services/server/ai/observability/instrumentation.js";
|
|
27
|
-
export { initializeOpenTelemetry, shutdownOpenTelemetry, flushOpenTelemetry, getLangfuseHealthStatus, };
|
|
26
|
+
import { initializeOpenTelemetry, shutdownOpenTelemetry, flushOpenTelemetry, getLangfuseHealthStatus, setLangfuseContext } from "./services/server/ai/observability/instrumentation.js";
|
|
27
|
+
export { initializeOpenTelemetry, shutdownOpenTelemetry, flushOpenTelemetry, getLangfuseHealthStatus, setLangfuseContext, };
|
|
28
28
|
export type { NeuroLinkMiddleware, MiddlewareContext, MiddlewareFactoryOptions, MiddlewarePreset, MiddlewareConfig, } from "./types/middlewareTypes.js";
|
|
29
29
|
export { MiddlewareFactory } from "./middleware/factory.js";
|
|
30
30
|
export declare const VERSION = "1.0.0";
|
package/dist/index.js
CHANGED
|
@@ -21,9 +21,9 @@ export { dynamicModelProvider } from "./core/dynamicModels.js";
|
|
|
21
21
|
import { NeuroLink } from "./neurolink.js";
|
|
22
22
|
export { NeuroLink };
|
|
23
23
|
export { buildObservabilityConfigFromEnv } from "./utils/observabilityHelpers.js";
|
|
24
|
-
import { initializeOpenTelemetry, shutdownOpenTelemetry, flushOpenTelemetry, getLangfuseHealthStatus, } from "./services/server/ai/observability/instrumentation.js";
|
|
24
|
+
import { initializeOpenTelemetry, shutdownOpenTelemetry, flushOpenTelemetry, getLangfuseHealthStatus, setLangfuseContext, } from "./services/server/ai/observability/instrumentation.js";
|
|
25
25
|
import { initializeTelemetry as init, getTelemetryStatus as getStatus, } from "./telemetry/index.js";
|
|
26
|
-
export { initializeOpenTelemetry, shutdownOpenTelemetry, flushOpenTelemetry, getLangfuseHealthStatus, };
|
|
26
|
+
export { initializeOpenTelemetry, shutdownOpenTelemetry, flushOpenTelemetry, getLangfuseHealthStatus, setLangfuseContext, };
|
|
27
27
|
export { MiddlewareFactory } from "./middleware/factory.js";
|
|
28
28
|
// Version
|
|
29
29
|
export const VERSION = "1.0.0";
|
package/dist/lib/index.d.ts
CHANGED
|
@@ -23,8 +23,8 @@ export { NeuroLink };
|
|
|
23
23
|
export type { MCPServerInfo } from "./types/mcpTypes.js";
|
|
24
24
|
export type { ObservabilityConfig, LangfuseConfig, OpenTelemetryConfig, } from "./types/observability.js";
|
|
25
25
|
export { buildObservabilityConfigFromEnv } from "./utils/observabilityHelpers.js";
|
|
26
|
-
import { initializeOpenTelemetry, shutdownOpenTelemetry, flushOpenTelemetry, getLangfuseHealthStatus } from "./services/server/ai/observability/instrumentation.js";
|
|
27
|
-
export { initializeOpenTelemetry, shutdownOpenTelemetry, flushOpenTelemetry, getLangfuseHealthStatus, };
|
|
26
|
+
import { initializeOpenTelemetry, shutdownOpenTelemetry, flushOpenTelemetry, getLangfuseHealthStatus, setLangfuseContext } from "./services/server/ai/observability/instrumentation.js";
|
|
27
|
+
export { initializeOpenTelemetry, shutdownOpenTelemetry, flushOpenTelemetry, getLangfuseHealthStatus, setLangfuseContext, };
|
|
28
28
|
export type { NeuroLinkMiddleware, MiddlewareContext, MiddlewareFactoryOptions, MiddlewarePreset, MiddlewareConfig, } from "./types/middlewareTypes.js";
|
|
29
29
|
export { MiddlewareFactory } from "./middleware/factory.js";
|
|
30
30
|
export declare const VERSION = "1.0.0";
|
package/dist/lib/index.js
CHANGED
|
@@ -21,9 +21,9 @@ export { dynamicModelProvider } from "./core/dynamicModels.js";
|
|
|
21
21
|
import { NeuroLink } from "./neurolink.js";
|
|
22
22
|
export { NeuroLink };
|
|
23
23
|
export { buildObservabilityConfigFromEnv } from "./utils/observabilityHelpers.js";
|
|
24
|
-
import { initializeOpenTelemetry, shutdownOpenTelemetry, flushOpenTelemetry, getLangfuseHealthStatus, } from "./services/server/ai/observability/instrumentation.js";
|
|
24
|
+
import { initializeOpenTelemetry, shutdownOpenTelemetry, flushOpenTelemetry, getLangfuseHealthStatus, setLangfuseContext, } from "./services/server/ai/observability/instrumentation.js";
|
|
25
25
|
import { initializeTelemetry as init, getTelemetryStatus as getStatus, } from "./telemetry/index.js";
|
|
26
|
-
export { initializeOpenTelemetry, shutdownOpenTelemetry, flushOpenTelemetry, getLangfuseHealthStatus, };
|
|
26
|
+
export { initializeOpenTelemetry, shutdownOpenTelemetry, flushOpenTelemetry, getLangfuseHealthStatus, setLangfuseContext, };
|
|
27
27
|
export { MiddlewareFactory } from "./middleware/factory.js";
|
|
28
28
|
// Version
|
|
29
29
|
export const VERSION = "1.0.0";
|
|
@@ -1,10 +1,15 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Mem0 Memory Initializer
|
|
3
|
-
* Simple initialization logic for mem0ai
|
|
3
|
+
* Simple initialization logic for mem0ai cloud API integration
|
|
4
4
|
*/
|
|
5
|
-
import
|
|
6
|
-
import type { Mem0Memory } from "../types/utilities.js";
|
|
5
|
+
import { MemoryClient } from "mem0ai";
|
|
7
6
|
/**
|
|
8
|
-
*
|
|
7
|
+
* Mem0 cloud API configuration
|
|
9
8
|
*/
|
|
10
|
-
export
|
|
9
|
+
export interface Mem0Config {
|
|
10
|
+
apiKey: string;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Initialize mem0 memory instance with cloud API
|
|
14
|
+
*/
|
|
15
|
+
export declare function initializeMem0(mem0Config: Mem0Config): Promise<MemoryClient | null>;
|
|
@@ -1,43 +1,32 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Mem0 Memory Initializer
|
|
3
|
-
* Simple initialization logic for mem0ai
|
|
3
|
+
* Simple initialization logic for mem0ai cloud API integration
|
|
4
4
|
*/
|
|
5
|
-
import {
|
|
5
|
+
import { MemoryClient } from "mem0ai";
|
|
6
6
|
import { logger } from "../utils/logger.js";
|
|
7
7
|
/**
|
|
8
|
-
* Initialize mem0 memory instance with
|
|
8
|
+
* Initialize mem0 memory instance with cloud API
|
|
9
9
|
*/
|
|
10
10
|
export async function initializeMem0(mem0Config) {
|
|
11
|
-
|
|
11
|
+
// Guard: skip initialization if API key is missing
|
|
12
|
+
if (!mem0Config?.apiKey || mem0Config.apiKey.trim() === "") {
|
|
13
|
+
logger.warn("[mem0Initializer] Missing MEM0_API_KEY; skipping mem0 initialization");
|
|
14
|
+
return null;
|
|
15
|
+
}
|
|
16
|
+
logger.debug("[mem0Initializer] Starting mem0 cloud API initialization");
|
|
12
17
|
try {
|
|
13
|
-
// Create
|
|
14
|
-
const
|
|
15
|
-
|
|
16
|
-
|
|
18
|
+
// Create MemoryClient instance with cloud API
|
|
19
|
+
const client = new MemoryClient({
|
|
20
|
+
apiKey: mem0Config.apiKey,
|
|
21
|
+
});
|
|
22
|
+
logger.info("[mem0Initializer] Mem0 cloud API initialized successfully");
|
|
23
|
+
return client;
|
|
17
24
|
}
|
|
18
25
|
catch (error) {
|
|
19
|
-
logger.warn("[mem0Initializer] Failed to initialize mem0
|
|
26
|
+
logger.warn("[mem0Initializer] Failed to initialize mem0 cloud API; disabling mem0", {
|
|
20
27
|
error: error instanceof Error ? error.message : String(error),
|
|
21
28
|
});
|
|
22
|
-
return
|
|
29
|
+
return null;
|
|
23
30
|
}
|
|
24
31
|
}
|
|
25
|
-
/**
|
|
26
|
-
* Create fallback memory implementation
|
|
27
|
-
*/
|
|
28
|
-
function createFallbackMemory() {
|
|
29
|
-
return {
|
|
30
|
-
search: async () => ({ results: [] }),
|
|
31
|
-
add: async () => ({ results: [] }),
|
|
32
|
-
get: async () => null,
|
|
33
|
-
update: async () => ({
|
|
34
|
-
message: "Fallback memory does not support updates",
|
|
35
|
-
}),
|
|
36
|
-
delete: async () => ({
|
|
37
|
-
message: "Fallback memory does not support deletion",
|
|
38
|
-
}),
|
|
39
|
-
history: async () => [],
|
|
40
|
-
reset: async () => { },
|
|
41
|
-
};
|
|
42
|
-
}
|
|
43
32
|
//# sourceMappingURL=mem0Initializer.js.map
|
package/dist/lib/neurolink.d.ts
CHANGED
|
@@ -50,6 +50,10 @@ export declare class NeuroLink {
|
|
|
50
50
|
private hitlManager?;
|
|
51
51
|
private mem0Instance?;
|
|
52
52
|
private mem0Config?;
|
|
53
|
+
/**
|
|
54
|
+
* Extract and set Langfuse context from options with proper async scoping
|
|
55
|
+
*/
|
|
56
|
+
private setLangfuseContextFromOptions;
|
|
53
57
|
/**
|
|
54
58
|
* Simple sync config setup for mem0
|
|
55
59
|
*/
|
|
@@ -130,6 +134,10 @@ export declare class NeuroLink {
|
|
|
130
134
|
private initializeHITL;
|
|
131
135
|
/** Format memory context for prompt inclusion */
|
|
132
136
|
private formatMemoryContext;
|
|
137
|
+
/** Extract memory context from search results */
|
|
138
|
+
private extractMemoryContext;
|
|
139
|
+
/** Store conversation turn in mem0 */
|
|
140
|
+
private storeConversationTurn;
|
|
133
141
|
/**
|
|
134
142
|
* Set up HITL event forwarding to main emitter
|
|
135
143
|
*/
|