@juspay/neurolink 13.10.5 → 13.12.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 +3 -3
- package/dist/agent/agent.js +7 -6
- package/dist/browser/neurolink.min.js +439 -439
- package/dist/cli/loop/optionsSchema.d.ts +1 -1
- package/dist/core/nativeGenerateLoop.js +241 -3
- package/dist/neurolink.d.ts +7 -0
- package/dist/neurolink.js +21 -0
- package/dist/providers/anthropic/client.d.ts +17 -0
- package/dist/providers/anthropic/client.js +155 -6
- package/dist/providers/anthropic/loopAdapter.js +86 -41
- package/dist/providers/anthropic/threads.d.ts +80 -0
- package/dist/providers/anthropic/threads.js +442 -0
- package/dist/server/routes/claudeProxyRoutes.js +19 -1
- package/dist/types/generate.d.ts +26 -0
- package/dist/types/loopEngine.d.ts +68 -0
- package/dist/types/stream.d.ts +25 -0
- package/docs-site/static/search-index.json +2 -0
- package/package.json +8 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
## [13.
|
|
1
|
+
## [13.12.0](https://github.com/juspay/neurolink/compare/v13.11.0...v13.12.0) (2026-11-12)
|
|
2
2
|
|
|
3
|
-
###
|
|
3
|
+
### Features
|
|
4
4
|
|
|
5
|
-
- **(
|
|
5
|
+
- **(anthropic):** let a message thread carry across the calls of a session ([0343258](https://github.com/juspay/neurolink/commit/0343258f995fa2713e6f5c46c5057e8076b0cc7d))
|
|
6
6
|
|
|
7
7
|
## [11.2.3](https://github.com/juspay/neurolink/compare/v11.2.2...v11.2.3) (2026-08-19)
|
|
8
8
|
|
package/dist/agent/agent.js
CHANGED
|
@@ -9,6 +9,7 @@ import { EventEmitter } from "events";
|
|
|
9
9
|
import { ErrorFactory } from "../utils/errorHandling.js";
|
|
10
10
|
import { logger } from "../utils/logger.js";
|
|
11
11
|
import { toToolExecutionRecords } from "../core/toolExecutionRecorder.js";
|
|
12
|
+
import { validateToolInput } from "../core/nativeGenerateLoop.js";
|
|
12
13
|
/**
|
|
13
14
|
* Agent - Wraps a NeuroLink instance with specialized behavior
|
|
14
15
|
*
|
|
@@ -117,9 +118,9 @@ export class Agent {
|
|
|
117
118
|
}
|
|
118
119
|
// Validate input if schema provided
|
|
119
120
|
if (this.inputSchema && typeof input !== "string") {
|
|
120
|
-
const validation = this.inputSchema
|
|
121
|
-
if (
|
|
122
|
-
throw new Error(`Input validation failed: ${validation.error
|
|
121
|
+
const validation = await validateToolInput({ inputSchema: this.inputSchema }, input);
|
|
122
|
+
if (validation.error) {
|
|
123
|
+
throw new Error(`Input validation failed: ${validation.error}`);
|
|
123
124
|
}
|
|
124
125
|
}
|
|
125
126
|
// Build the prompt with agent context
|
|
@@ -230,9 +231,9 @@ export class Agent {
|
|
|
230
231
|
}
|
|
231
232
|
// Validate input if schema provided
|
|
232
233
|
if (this.inputSchema && typeof input !== "string") {
|
|
233
|
-
const validation = this.inputSchema
|
|
234
|
-
if (
|
|
235
|
-
throw new Error(`Input validation failed: ${validation.error
|
|
234
|
+
const validation = await validateToolInput({ inputSchema: this.inputSchema }, input);
|
|
235
|
+
if (validation.error) {
|
|
236
|
+
throw new Error(`Input validation failed: ${validation.error}`);
|
|
236
237
|
}
|
|
237
238
|
}
|
|
238
239
|
const prompt = this.buildPrompt(input, options?.context);
|