diff --git a/package.json b/package.json index 1a9dabd..64a829b 100644 --- a/package.json +++ b/package.json @@ -11,7 +11,7 @@ }, "packageManager": "pnpm@9.15.0", "omnigraph": { - "serverVersion": "0.7.0" + "serverVersion": "0.8.0" }, "scripts": { "sync-spec": "tsx scripts/sync-spec.ts", diff --git a/packages/mcp/package.json b/packages/mcp/package.json index 947c114..dbc1867 100644 --- a/packages/mcp/package.json +++ b/packages/mcp/package.json @@ -1,6 +1,6 @@ { "name": "@modernrelay/omnigraph-mcp", - "version": "0.7.0", + "version": "0.8.0", "description": "MCP server exposing an Omnigraph database to LLM clients (Tools + Resources, stdio transport).", "license": "MIT", "repository": { diff --git a/packages/mcp/src/version.gen.ts b/packages/mcp/src/version.gen.ts index d4ea02e..5e03e19 100644 --- a/packages/mcp/src/version.gen.ts +++ b/packages/mcp/src/version.gen.ts @@ -4,4 +4,4 @@ /** * The MCP server package version reported in the MCP initialize response. */ -export const MCP_PACKAGE_VERSION = "0.7.0"; +export const MCP_PACKAGE_VERSION = "0.8.0"; diff --git a/packages/mcp/test/server.test.ts b/packages/mcp/test/server.test.ts index f44bb04..c0ba40b 100644 --- a/packages/mcp/test/server.test.ts +++ b/packages/mcp/test/server.test.ts @@ -91,7 +91,7 @@ describe('omnigraph-mcp server', () => { const { client } = await setup(); const info = client.getServerVersion(); expect(info?.name).toBe('omnigraph-mcp'); - expect(info?.version).toBe('0.7.0'); + expect(info?.version).toBe('0.8.0'); }); it('lists every expected tool', async () => { @@ -135,7 +135,7 @@ describe('omnigraph-mcp server', () => { const parsed = JSON.parse(block.text); expect(parsed.status).toBe('ok'); expect(parsed.version).toBe('0.3.0'); - expect(parsed.sdkServerVersion).toBe('0.7.0'); + expect(parsed.sdkServerVersion).toBe('0.8.0'); }); it('calls the query tool and preserves opaque param keys', async () => { diff --git a/packages/sdk/package.json b/packages/sdk/package.json index 8fa6d51..3a8862b 100644 --- a/packages/sdk/package.json +++ b/packages/sdk/package.json @@ -1,6 +1,6 @@ { "name": "@modernrelay/omnigraph", - "version": "0.7.0", + "version": "0.8.0", "description": "TypeScript SDK for the Omnigraph HTTP API.", "license": "MIT", "repository": { diff --git a/packages/sdk/src/generated/types.gen.ts b/packages/sdk/src/generated/types.gen.ts index 77dc98b..0baf192 100644 --- a/packages/sdk/src/generated/types.gen.ts +++ b/packages/sdk/src/generated/types.gen.ts @@ -164,6 +164,10 @@ export type GraphListResponse = { }; export type HealthOutput = { + /** + * The internal-schema (storage-format) version this binary writes and reads. + */ + internal_schema_version: number; source_version?: string | null; status: string; version: string; @@ -342,8 +346,8 @@ export const ParamKind = { export type ParamKind = (typeof ParamKind)[keyof typeof ParamKind]; /** - * Response for `GET /queries`: the `mcp.expose` subset of a graph's - * stored-query registry, each with typed parameters. + * Response for `GET /queries`: every stored query in a graph's + * registry, each with typed parameters. */ export type QueriesCatalogOutput = { queries: Array; @@ -474,6 +478,11 @@ export type SchemaOutput = { export type SnapshotOutput = { branch: string; + /** + * The on-disk internal-schema (storage-format) version this graph's branch + * is stamped at. + */ + internal_schema_version: number; manifest_version: number; tables: Array; }; @@ -1025,7 +1034,7 @@ export type ClusterListQueriesError = export type ClusterListQueriesResponses = { /** - * Stored-query catalog (the mcp.expose subset, with typed params) + * Stored-query catalog (every stored query, with typed params) */ 200: QueriesCatalogOutput; }; diff --git a/packages/sdk/src/version.gen.ts b/packages/sdk/src/version.gen.ts index cb483e6..dd67389 100644 --- a/packages/sdk/src/version.gen.ts +++ b/packages/sdk/src/version.gen.ts @@ -6,4 +6,4 @@ * The SDK targets the corresponding OpenAPI spec exactly; behaviour against * a different server major.minor is undefined. */ -export const SERVER_VERSION = "0.7.0"; +export const SERVER_VERSION = "0.8.0"; diff --git a/packages/sdk/test/client.test.ts b/packages/sdk/test/client.test.ts index fa8a862..87a1986 100644 --- a/packages/sdk/test/client.test.ts +++ b/packages/sdk/test/client.test.ts @@ -4,13 +4,17 @@ import { stubFetch } from './helpers'; describe('top-level client operations', () => { it('health sends GET /healthz', async () => { - const { fetch, calls } = stubFetch({ body: { status: 'ok', version: '0.3.1' } }); + const { fetch, calls } = stubFetch({ + body: { status: 'ok', version: '0.8.0', internal_schema_version: 4 }, + }); const og = new Omnigraph({ baseUrl: 'http://x', fetch }); const h = await og.health(); expect(calls[0]?.method).toBe('GET'); expect(calls[0]?.url).toBe('http://x/healthz'); expect(h.status).toBe('ok'); - expect(h.version).toBe('0.3.1'); + expect(h.version).toBe('0.8.0'); + // New in server 0.8.0: the storage-format version, camelized like any field. + expect(h.internalSchemaVersion).toBe(4); }); it('snapshot encodes branch as a query param', async () => { diff --git a/spec/openapi.json b/spec/openapi.json index fb76fae..277bf65 100644 --- a/spec/openapi.json +++ b/spec/openapi.json @@ -7,7 +7,7 @@ "name": "MIT", "identifier": "MIT" }, - "version": "0.7.0" + "version": "0.8.0" }, "paths": { "/graphs": { @@ -1006,7 +1006,7 @@ "queries" ], "summary": "List the graph's exposed stored queries as a typed tool catalog.", - "description": "Returns the `mcp.expose == true` subset of the `queries:` registry, each\nwith its MCP tool name, read/mutate flag, description/instruction, and\ntyped parameters — enough for a client to register them as tools without\nfetching `.gq` source. Read-gated; the catalog is graph-wide (branch\nindependent — `read` is authorized against `main`). **Not** Cedar-filtered\nper query yet, so it can list a query whose `invoke_query` the caller\nlacks (a known gap until per-query authorization lands).", + "description": "Returns every stored query in the `queries:` registry, each\nwith its MCP tool name, read/mutate flag, description/instruction, and\ntyped parameters — enough for a client to register them as tools without\nfetching `.gq` source. Cluster-served graphs have no per-query expose flag,\nso the catalog lists them all. Read-gated; the catalog is graph-wide (branch\nindependent — `read` is authorized against `main`). **Not** Cedar-filtered\nper query yet, so it can list a query whose `invoke_query` the caller\nlacks (a known gap until per-query authorization lands).", "operationId": "cluster_list_queries", "parameters": [ { @@ -1021,7 +1021,7 @@ ], "responses": { "200": { - "description": "Stored-query catalog (the mcp.expose subset, with typed params)", + "description": "Stored-query catalog (every stored query, with typed params)", "content": { "application/json": { "schema": { @@ -1964,9 +1964,16 @@ "type": "object", "required": [ "status", - "version" + "version", + "internal_schema_version" ], "properties": { + "internal_schema_version": { + "type": "integer", + "format": "int32", + "description": "The internal-schema (storage-format) version this binary writes and reads.", + "minimum": 0 + }, "source_version": { "type": [ "string", @@ -2248,7 +2255,7 @@ }, "QueriesCatalogOutput": { "type": "object", - "description": "Response for `GET /queries`: the `mcp.expose` subset of a graph's\nstored-query registry, each with typed parameters.", + "description": "Response for `GET /queries`: every stored query in a graph's\nregistry, each with typed parameters.", "required": [ "queries" ], @@ -2491,12 +2498,19 @@ "required": [ "branch", "manifest_version", + "internal_schema_version", "tables" ], "properties": { "branch": { "type": "string" }, + "internal_schema_version": { + "type": "integer", + "format": "int32", + "description": "The on-disk internal-schema (storage-format) version this graph's branch\nis stamped at.", + "minimum": 0 + }, "manifest_version": { "type": "integer", "format": "int64",