@juspay/neurolink 11.8.0 → 11.8.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 CHANGED
@@ -1,8 +1,8 @@
1
- ## [11.8.0](https://github.com/juspay/neurolink/compare/v11.7.1...v11.8.0) (2026-08-20)
1
+ ## [11.8.1](https://github.com/juspay/neurolink/compare/v11.8.0...v11.8.1) (2026-08-21)
2
2
 
3
- ### Features
3
+ ### Bug Fixes
4
4
 
5
- - **(sagemaker):** implement streaming via the doStream hook ([225daa2](https://github.com/juspay/neurolink/commit/225daa2612c77cc91c7309bb2555c637b6bbdcc0))
5
+ - **(core):** carry reasoning deltas on the agentic loop's stream channel ([6aa27f0](https://github.com/juspay/neurolink/commit/6aa27f002d8b67c515e54d455f5c7d78ddce6882))
6
6
 
7
7
  ## [11.2.3](https://github.com/juspay/neurolink/compare/v11.2.2...v11.2.3) (2026-08-19)
8
8
 
@@ -1,4 +1,4 @@
1
- import type { AgenticLoopAdapter, AgenticLoopOptions, AgenticLoopResult } from "../types/index.js";
1
+ import type { AgenticLoopAdapter, AgenticLoopChunk, AgenticLoopOptions, AgenticLoopResult } from "../types/index.js";
2
2
  /**
3
3
  * Run one adapter-parameterized agentic tool-calling turn. Owns the
4
4
  * maxSteps-bounded loop, generic tool dispatch (with an opt-in
@@ -16,8 +16,6 @@ import type { AgenticLoopAdapter, AgenticLoopOptions, AgenticLoopResult } from "
16
16
  * stop reason) is delegated to `adapter`.
17
17
  */
18
18
  export declare function runAgenticLoop<TConversation>(adapter: AgenticLoopAdapter<TConversation>, initialConversation: TConversation, options: AgenticLoopOptions): {
19
- stream: AsyncIterable<{
20
- content: string;
21
- }>;
19
+ stream: AsyncIterable<AgenticLoopChunk>;
22
20
  resultPromise: Promise<AgenticLoopResult<TConversation>>;
23
21
  };
@@ -1,4 +1,4 @@
1
- import type { AgenticLoopAdapter, AgenticLoopOptions, AgenticLoopResult } from "../types/index.js";
1
+ import type { AgenticLoopAdapter, AgenticLoopChunk, AgenticLoopOptions, AgenticLoopResult } from "../types/index.js";
2
2
  /**
3
3
  * Run one adapter-parameterized agentic tool-calling turn. Owns the
4
4
  * maxSteps-bounded loop, generic tool dispatch (with an opt-in
@@ -16,8 +16,6 @@ import type { AgenticLoopAdapter, AgenticLoopOptions, AgenticLoopResult } from "
16
16
  * stop reason) is delegated to `adapter`.
17
17
  */
18
18
  export declare function runAgenticLoop<TConversation>(adapter: AgenticLoopAdapter<TConversation>, initialConversation: TConversation, options: AgenticLoopOptions): {
19
- stream: AsyncIterable<{
20
- content: string;
21
- }>;
19
+ stream: AsyncIterable<AgenticLoopChunk>;
22
20
  resultPromise: Promise<AgenticLoopResult<TConversation>>;
23
21
  };
@@ -1,3 +1,17 @@
1
+ /**
2
+ * One chunk on the engine's stream.
3
+ *
4
+ * `reasoning` is carried alongside `content` rather than instead of it: the
5
+ * providers that emit extended thinking (direct Anthropic, Google AI Studio,
6
+ * Vertex) push a chunk with empty `content` and the thinking delta in
7
+ * `reasoning`, so a channel typed `{ content: string }` alone would drop
8
+ * every thinking delta the moment those providers move onto the engine —
9
+ * silently, since the text path would keep working.
10
+ */
11
+ export type AgenticLoopChunk = {
12
+ content: string;
13
+ reasoning?: string;
14
+ };
1
15
  export type AgenticLoopToolCall = {
2
16
  id: string;
3
17
  name: string;
@@ -97,9 +111,7 @@ export type AgenticLoopAdapter<TConversation = unknown, TRaw = unknown> = {
97
111
  } | undefined;
98
112
  buildStepRequest(conversation: TConversation, step: number): AgenticLoopStepRequest;
99
113
  executeStep(request: AgenticLoopStepRequest, channel: {
100
- push(chunk: {
101
- content: string;
102
- }): void;
114
+ push(chunk: AgenticLoopChunk): void;
103
115
  }, signal: AbortSignal): Promise<AgenticLoopStepResult<TRaw>>;
104
116
  buildToolResultMessages(conversation: TConversation, stepResult: AgenticLoopStepResult<TRaw>, toolResults: AgenticLoopToolCallResult[]): TConversation;
105
117
  mapFinishReason(rawStopReason: string | undefined, hadToolCalls: boolean): string;
@@ -1,3 +1,17 @@
1
+ /**
2
+ * One chunk on the engine's stream.
3
+ *
4
+ * `reasoning` is carried alongside `content` rather than instead of it: the
5
+ * providers that emit extended thinking (direct Anthropic, Google AI Studio,
6
+ * Vertex) push a chunk with empty `content` and the thinking delta in
7
+ * `reasoning`, so a channel typed `{ content: string }` alone would drop
8
+ * every thinking delta the moment those providers move onto the engine —
9
+ * silently, since the text path would keep working.
10
+ */
11
+ export type AgenticLoopChunk = {
12
+ content: string;
13
+ reasoning?: string;
14
+ };
1
15
  export type AgenticLoopToolCall = {
2
16
  id: string;
3
17
  name: string;
@@ -97,9 +111,7 @@ export type AgenticLoopAdapter<TConversation = unknown, TRaw = unknown> = {
97
111
  } | undefined;
98
112
  buildStepRequest(conversation: TConversation, step: number): AgenticLoopStepRequest;
99
113
  executeStep(request: AgenticLoopStepRequest, channel: {
100
- push(chunk: {
101
- content: string;
102
- }): void;
114
+ push(chunk: AgenticLoopChunk): void;
103
115
  }, signal: AbortSignal): Promise<AgenticLoopStepResult<TRaw>>;
104
116
  buildToolResultMessages(conversation: TConversation, stepResult: AgenticLoopStepResult<TRaw>, toolResults: AgenticLoopToolCallResult[]): TConversation;
105
117
  mapFinishReason(rawStopReason: string | undefined, hadToolCalls: boolean): string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@juspay/neurolink",
3
- "version": "11.8.0",
3
+ "version": "11.8.1",
4
4
  "packageManager": "pnpm@10.15.1",
5
5
  "description": "TypeScript AI SDK with 24+ LLM providers behind one consistent API. MCP-native (connect any MCP server), voice TTS/STT/realtime, RAG, agents, memory, context compaction. OpenAI · Anthropic · Gemini · Bedrock · Azure · Ollama · DeepSeek · NVIDIA NIM and more.",
6
6
  "author": {