@nemesis-oss/ollama-sdk 1.25.1 → 1.25.3

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.
@@ -1,5 +1,5 @@
1
1
  import { a as McpToolDescriptor } from './types-CI-gM2u5.cjs';
2
- import { O as OllamaRuntime } from './runtime-CUzw4GAE.cjs';
2
+ import { O as OllamaRuntime } from './runtime-BoTPAvJH.cjs';
3
3
  import 'zod';
4
4
  import './types-CH3pdrak.cjs';
5
5
 
@@ -1,5 +1,5 @@
1
1
  import { a as McpToolDescriptor } from './types-CI-gM2u5.js';
2
- import { O as OllamaRuntime } from './runtime-D_rMXIVT.js';
2
+ import { O as OllamaRuntime } from './runtime-DQRudJFP.js';
3
3
  import 'zod';
4
4
  import './types-CH3pdrak.js';
5
5
 
@@ -91,11 +91,17 @@ interface SseEvent {
91
91
  readonly retry?: number | undefined;
92
92
  }
93
93
  /**
94
- * Parses an SSE byte stream into discrete events.
94
+ * Parses an SSE byte stream into discrete events, per the WHATWG "event stream
95
+ * interpretation" (https://html.spec.whatwg.org/multipage/server-sent-events.html).
95
96
  *
96
97
  * Supports CRLF, CR, and LF line endings; comments; repeated data fields;
97
- * event/id/retry fields; UTF-8 chunks split across arbitrary byte boundaries;
98
- * and a terminal event without a trailing blank line.
98
+ * event/id/retry fields; and UTF-8 chunks split across arbitrary byte boundaries.
99
+ *
100
+ * End-of-stream is strict. An event is dispatched only by its blank-line
101
+ * terminator, so a final event whose terminator never arrived is discarded, as
102
+ * the spec requires. The discard is then reported by throwing
103
+ * {@link OllamaStreamError}: a stream that ends mid-event was truncated, and a
104
+ * silent discard would let a truncated response look complete.
99
105
  */
100
106
  declare function parseSseStream(stream: ReadableStream<Uint8Array>): AsyncGenerator<SseEvent, void, undefined>;
101
107
 
@@ -91,11 +91,17 @@ interface SseEvent {
91
91
  readonly retry?: number | undefined;
92
92
  }
93
93
  /**
94
- * Parses an SSE byte stream into discrete events.
94
+ * Parses an SSE byte stream into discrete events, per the WHATWG "event stream
95
+ * interpretation" (https://html.spec.whatwg.org/multipage/server-sent-events.html).
95
96
  *
96
97
  * Supports CRLF, CR, and LF line endings; comments; repeated data fields;
97
- * event/id/retry fields; UTF-8 chunks split across arbitrary byte boundaries;
98
- * and a terminal event without a trailing blank line.
98
+ * event/id/retry fields; and UTF-8 chunks split across arbitrary byte boundaries.
99
+ *
100
+ * End-of-stream is strict. An event is dispatched only by its blank-line
101
+ * terminator, so a final event whose terminator never arrived is discarded, as
102
+ * the spec requires. The discard is then reported by throwing
103
+ * {@link OllamaStreamError}: a stream that ends mid-event was truncated, and a
104
+ * silent discard would let a truncated response look complete.
99
105
  */
100
106
  declare function parseSseStream(stream: ReadableStream<Uint8Array>): AsyncGenerator<SseEvent, void, undefined>;
101
107
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nemesis-oss/ollama-sdk",
3
- "version": "1.25.1",
3
+ "version": "1.25.3",
4
4
  "description": "Production-grade TypeScript SDK for Ollama with native fetch, high availability failover, multi-turn tool calling, structured outputs, reasoning stream tokens, OpenAI/Anthropic bridges, MCP, Web Stream adapters, and a contract-first hybrid architecture that generates TypeScript types, API classes, MCP tools, and Zod schemas from a single canonical IR.",
5
5
  "keywords": [
6
6
  "ollama",
@@ -166,7 +166,7 @@
166
166
  "LICENSE"
167
167
  ],
168
168
  "engines": {
169
- "node": ">=20.0.0"
169
+ "node": ">=22.0.0"
170
170
  },
171
171
  "publishConfig": {
172
172
  "access": "public",
@@ -231,18 +231,18 @@
231
231
  "@edge-runtime/vm": "^5.0.0",
232
232
  "@eslint/js": "^10.0.1",
233
233
  "@opentelemetry/api": "^1.9.1",
234
- "@opentelemetry/context-async-hooks": "^1.30.1",
235
- "@opentelemetry/sdk-trace-base": "^1.30.1",
234
+ "@opentelemetry/context-async-hooks": "^3.1.1",
235
+ "@opentelemetry/sdk-trace-base": "^2.12.0",
236
236
  "@types/js-yaml": "^4.0.9",
237
- "@types/node": "^26.6.5",
238
- "@vitest/coverage-v8": "^5.0.5",
237
+ "@types/node": "^26.6.6",
238
+ "@vitest/coverage-v8": "^5.1.0",
239
239
  "cross-env": "^10.1.0",
240
240
  "dotenv": "^18.0.9",
241
241
  "esbuild": "^0.28.2",
242
242
  "eslint": "^10.14.0",
243
243
  "eslint-config-prettier": "^10.1.8",
244
244
  "js-yaml": "^5.5.0",
245
- "prettier": "^3.9.4",
245
+ "prettier": "^3.9.10",
246
246
  "tsup": "^8.5.1",
247
247
  "tsx": "^4.23.15",
248
248
  "typescript": "^5.9.3",