@nemesis-oss/ollama-sdk 1.22.0 → 1.23.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.
Files changed (2) hide show
  1. package/CHANGELOG.md +33 -0
  2. package/package.json +3 -2
package/CHANGELOG.md CHANGED
@@ -1,5 +1,38 @@
1
1
  # Changelog
2
2
 
3
+ ## [Unreleased]
4
+
5
+ ## [1.23.0] — weekly upstream drift watch; automated versioning with release-please
6
+
7
+ ### Added: automated versioning with release-please ([ADR 0040](./docs/adr/0040-release-please-versioning.md))
8
+
9
+ - `.github/workflows/release-please.yml` keeps one release PR open with the next version, computed from Conventional Commit PR titles: `fix:` → patch, `feat:` → minor, `feat!:` → major. Merging that PR tags the version, creates the GitHub release, and calls `publish.yml`, which now accepts `workflow_call`.
10
+ - This changelog stays hand-written. Before merging a release PR, rename `## [Unreleased]` to the new version on its branch.
11
+ - `.github/workflows/pr-title.yml` rejects PR titles that aren't Conventional Commits.
12
+ - Upstream-watch PRs title themselves `feat(contract):` when `src/generated` changed and `chore(contract):` for a pin-only refresh.
13
+
14
+ ### Added — weekly upstream drift watch (ADR 0039)
15
+
16
+ - **`npm run contract:upstream-drift` (`scripts/upstream-drift.ts`).** Compares each pinned docs source against the latest `ollama/ollama` commit touching its new `docs-index.json` `upstreamPath`, by commit ancestry through the GitHub compare API. Exits 1 on drift.
17
+ - The report also lists bridge-code commits under upstream `openai/` and `anthropic/` and the latest Ollama release. Both are informational.
18
+ - Its first live run found `675150d` ("voice: add voice catalog for Phonon"), an OpenAI-compatibility docs edit after the 1.22.0 pin.
19
+ - **`.github/workflows/upstream-watch.yml`** runs Mondays at 09:00 IST and on demand. On drift it:
20
+ - re-pins the drifted sources;
21
+ - regenerates and runs the contract gates;
22
+ - opens or updates the candidate PR on `upstream-sync/auto` and the single `upstream-drift` issue.
23
+
24
+ The PR is never auto-merged; a red gate in it means implementation work is due.
25
+ - **Re-pins keep the curated parts.**
26
+ - `contract:fetch` takes `--ref <sha>` and now writes the verbatim spec to `docs/upstream/ollama-openapi.yaml`.
27
+ - The contract source keeps its curated header (pin anchor rewritten, refresh note appended), and the body gets `CURATED_DEVIATIONS` (the `families: [array, null]` deviation) re-applied. A deviation that can neither be applied nor found adopted upstream throws.
28
+ - `refresh-mdx-pins.ts` reads its pins from `docs-index.json`, resolves each SHA from upstream, and takes `--only <ids>`.
29
+ - Both scripts update `pinnedSha`/`pinnedAt` in `docs-index.json`.
30
+ - 9 new tests in `test/contract/upstream-drift.test.ts`.
31
+
32
+ ### Fixed — structural guard against rebase artifacts
33
+
34
+ - **New `test/repo-hygiene.test.ts` fails the suite on any unresolved conflict marker in any tracked file.** The v1.22.0 PR head had shipped a green eight-check CI run carrying a stray rebase marker at `CHANGELOG.md:23` — caught only by pre-tag manual review and dropped in the `ac9a385` amendment. The changelog was (and is) neither linted nor imported by tests, so no existing gate could see it; this test scans every file `git ls-files` reports for the four conflict-marker line shapes (`<<<<<<<`, `=======` as a whole line, `|||||||`, `>>>>>>>`) and runs everywhere `npm test` runs — PR CI, the publish workflow's pre-publish suite, and local development. It is the structural fix for the artifact-class lessons of ADR 0036 (display artifacts) and ADR 0038 (piped exit codes): the class can no longer reach `main` behind a passing build.
35
+
3
36
  ## [1.22.0] — `/v1/audio/speech` recorded as a generation-excluded contract operation; MDX pin provenance for every docs source
4
37
 
5
38
  The second daily audit claimed "zero upstream drift since d9b8601" while verifying the v1.20.0 release that had absorbed exactly the two commits landing after that (retired) pin — and missed real in-window documentation drift besides: upstream `6ef847b8` ("mlxrunner: add Phonon text-to-speech support", 2026-10-22 18:36 UTC) added a `### /v1/audio/speech` section to the OpenAI-compatibility page inside the audit's own 24-hour window. The endpoint is documented (Ollama v0.40.8+; `model`/`input` ≤ 4,096 chars/`voice`/`response_format` `wav`+`pcm`/`speed` `1`/`stream_format` `audio` supported; `instructions` and the `mp3`/`opus`/`aac`/`flac` formats unsupported; 16-bit mono 24 kHz; unsupported values rejected with `400`) but absent from upstream's own `openapi.yaml` — docs ahead of spec, so no openapi re-pin. The live openapi content itself is byte-identical to the `36a6e99` pin (raw sha256 `e94c8f02…`), confirming zero *spec* drift; the audit's error was the anchor and the unchecked MDX surfaces. This release closes the documentation-alignment gap (see [ADR 0038](./docs/adr/0038-audio-speech-contract-mdx-pin-provenance.md)). 1125 pre-existing tests stay green (including the 1.21.0 cancellation-signal suite), 8 net-new tests added.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nemesis-oss/ollama-sdk",
3
- "version": "1.22.0",
3
+ "version": "1.23.0",
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",
@@ -195,6 +195,7 @@
195
195
  "contract:diff": "tsx scripts/diff-contract.ts",
196
196
  "contract:generate": "tsx scripts/generate-contract.ts && prettier --write src/generated/",
197
197
  "contract:drift": "tsx scripts/drift-contract.ts",
198
+ "contract:upstream-drift": "tsx scripts/upstream-drift.ts",
198
199
  "bench": "vitest bench --run",
199
200
  "bench:watch": "vitest bench",
200
201
  "check:types": "npx --yes @arethetypeswrong/cli@latest --pack .",
@@ -232,7 +233,7 @@
232
233
  "@opentelemetry/context-async-hooks": "^1.30.1",
233
234
  "@opentelemetry/sdk-trace-base": "^1.30.1",
234
235
  "@types/js-yaml": "^4.0.9",
235
- "@types/node": "^22.20.0",
236
+ "@types/node": "^22.20.5",
236
237
  "@vitest/coverage-v8": "^4.1.11",
237
238
  "cross-env": "^10.1.0",
238
239
  "dotenv": "^17.4.2",