feat: migrate SDK + MCP to omnigraph-server v0.8.0#13
Merged
Conversation
Follow the documented upgrade recipe: bump the serverVersion pin to 0.8.0, sync-spec from the v0.8.0 tag, regenerate types and version stamps, bump both packages to 0.8.0. The 0.8.0 API delta is additive — same operation set (coverage: 17/17 bound, 3 intentionally unbound), two new required response fields: - /healthz gains internal_schema_version (the storage-format version the binary serves) - snapshot gains internal_schema_version (the graph branch's on-disk stamp) Both surface automatically through the Camelize<> public DTOs as internalSchemaVersion; the health test pins the camelization. Note for operators: server 0.8.0 is a breaking ENGINE release (storage format v4 — pre-0.8.0 graphs are rebuilt via export/import, not migrated), but the HTTP surface change is additive, so no SDK call sites change. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011iy1zTac7zj73h3ESSVP6r
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Catches the SDK up to the engine's v0.8.0 stable release (published 2026-07-01; npm was at 0.7.0 against a 0.8.0 server).
Follows the documented upgrade recipe (README → "when omnigraph cuts a release"):
serverVersionpin →sync-spec(from thev0.8.0tag) →generate→ package version bumps.API delta (additive — no call-site changes):
check-coveragegreen (17/17 bound, 3 intentionally unbound aliases)./healthzresponse gains requiredinternal_schema_version(storage-format version the binary serves).internal_schema_version(the graph branch's on-disk stamp).internalSchemaVersionautomatically via theCamelize<>DTOs; the health unit test now pins the camelization.Operator note: server 0.8.0 is a breaking engine release (storage format v4 — pre-0.8.0 graphs are rebuilt via export/import), but the HTTP surface is additive, so existing SDK code keeps working; only the graph itself must be on v0.8.0 format.
Gate:
check-drift✓ (spec == upstream v0.8.0),check-versions✓,check-coverage✓, build ✓, typecheck ✓, tests 86+14 ✓.After merge: tag
v0.8.0→ release workflow publishes both packages to npm (provenance,latest) and creates the GitHub release.🤖 Generated with Claude Code
https://claude.ai/code/session_011iy1zTac7zj73h3ESSVP6r
Greptile Summary
This PR syncs the TypeScript SDK and MCP server to omnigraph-server v0.8.0, adding the new required
internal_schema_versionfield toHealthOutputandSnapshotOutput(surfaced asinternalSchemaVersionvia theCamelize<>DTOs) and updating all version pins.spec/openapi.jsonand the auto-generatedtypes.gen.tsaddinternal_schema_version: number(required, int32) to bothHealthOutputandSnapshotOutput, and updateQueriesCatalogOutput's description to reflect that cluster-served graphs expose all stored queries rather than themcp.exposesubset.internal_schema_version: 4; however, the MCPfakeFetch/healthzstub and all snapshot stubs in both packages are not updated to include the new required field, leaving the MCP health round-trip and both snapshot camelization paths without coverage for the new field.Confidence Score: 4/5
Safe to merge for existing callers — the HTTP surface change is additive and no call sites break. The only gap is incomplete test stubs that omit the new
internal_schema_versionfield from snapshot and MCP health fakes.The generated types, OpenAPI spec, and version pins are all consistent and correct. The SDK health test was properly extended to cover
internalSchemaVersion. The snapshot stubs in both packages and the MCPfakeFetch/healthzstub were not updated to include the new required field, so those test paths give no confidence thatinternalSchemaVersioncamelizes and round-trips correctly through the MCP layer or the snapshot path.packages/mcp/test/server.test.ts and packages/sdk/test/client.test.ts — specifically the /healthz fakeFetch stub and all snapshot stubs, which are missing the new required field.
Important Files Changed
internal_schema_version(int32, min 0) to bothHealthOutputandSnapshotOutput, and updates/queriesdescription to reflect all-query catalog semantics.internal_schema_version: numberas required onHealthOutputandSnapshotOutput, and updates doc strings forQueriesCatalogOutput.internal_schema_version: 4with an assertion onh.internalSchemaVersion; snapshot stubs still omit the new required field and include a non-existentsnapshot_idfield.fakeFetch/healthzstub not updated to includeinternal_schema_version, leaving MCP health tool round-trip for the new field untested.omnigraph-server 0.7.0(stale after the version bump).omnigraph.serverVersionpin updated from 0.7.0 to 0.8.0 as required by the upgrade recipe.Sequence Diagram
%%{init: {'theme': 'neutral'}}%% sequenceDiagram participant Client as SDK / MCP Client participant SDK as @modernrelay/omnigraph v0.8.0 participant Server as omnigraph-server v0.8.0 Client->>SDK: og.health() SDK->>Server: GET /healthz Server-->>SDK: "{ status, version, internal_schema_version: 4 }" SDK-->>Client: "Camelize → { status, version, internalSchemaVersion: 4 }" Client->>SDK: "og.snapshot({ branch })" SDK->>Server: "GET /graphs/{id}/snapshot?branch=..." Server-->>SDK: "{ branch, manifest_version, internal_schema_version: 4, tables }" SDK-->>Client: "Camelize → { branch, manifestVersion, internalSchemaVersion: 4, tables }" Client->>SDK: og.queries.list() SDK->>Server: "GET /graphs/{id}/queries" Note over Server: 0.8.0: returns ALL stored queries (not just mcp.expose subset) Server-->>SDK: "{ queries: [...all...] }" SDK-->>Client: "{ queries: [...all...] }"%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%% sequenceDiagram participant Client as SDK / MCP Client participant SDK as @modernrelay/omnigraph v0.8.0 participant Server as omnigraph-server v0.8.0 Client->>SDK: og.health() SDK->>Server: GET /healthz Server-->>SDK: "{ status, version, internal_schema_version: 4 }" SDK-->>Client: "Camelize → { status, version, internalSchemaVersion: 4 }" Client->>SDK: "og.snapshot({ branch })" SDK->>Server: "GET /graphs/{id}/snapshot?branch=..." Server-->>SDK: "{ branch, manifest_version, internal_schema_version: 4, tables }" SDK-->>Client: "Camelize → { branch, manifestVersion, internalSchemaVersion: 4, tables }" Client->>SDK: og.queries.list() SDK->>Server: "GET /graphs/{id}/queries" Note over Server: 0.8.0: returns ALL stored queries (not just mcp.expose subset) Server-->>SDK: "{ queries: [...all...] }" SDK-->>Client: "{ queries: [...all...] }"Comments Outside Diff (2)
packages/mcp/test/server.test.ts, line 28-30 (link)The
fakeFetch()/healthzstub still returns{ status: 'ok', version: '0.3.0' }withoutinternal_schema_version, even thoughHealthOutputnow declares it as a required field. The SDK test (client.test.ts) was correctly updated to includeinternal_schema_version: 4and assert onh.internalSchemaVersion. But the MCP test's health-tool test ('calls the health tool and round-trips the SDK SERVER_VERSION') never checks whetherinternalSchemaVersionis present in the tool's JSON response — so the camelization round-trip through the MCP layer is not covered. When the real server returns the field, the tool will include it; the test just doesn't verify this.packages/sdk/test/client.test.ts, line 21-29 (link)internal_schema_versionfieldBoth snapshot test stubs (
'snapshot encodes branch as a query param'and'snapshot allows omitting branch') provide{ branch, tables, snapshot_id }. After this PR,SnapshotOutputhas two required numeric fields —manifest_version(pre-existing) and the newly addedinternal_schema_version— but neither appears in the stubs, andsnapshot_idis not a real schema field. The PR added ainternalSchemaVersionassertion only for the health path; the parallel coverage for snapshot is absent. Any code that readss.internalSchemaVersionfrom a real server response will receive a number, but the test stubs leave itundefined.Reviews (1): Last reviewed commit: "feat: migrate SDK + MCP to omnigraph-ser..." | Re-trigger Greptile