specguard-mcp 0.1.33 → 0.1.34

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/README.md CHANGED
@@ -106,14 +106,28 @@ property can never appear in any refusal: `required` does not name it, and a clo
106
106
  only ever reports the key you did send, so nothing you submit at any value causes the linter to
107
107
  mention it. That part of the contract is reachable here and nowhere else in this toolset.
108
108
 
109
- The answer carries the whole document in **both shapes, derived from one fetched body** so they
110
- cannot disagree:
109
+ The answer is an **envelope** that carries the whole document in both shapes, derived from one
110
+ fetched body so they cannot disagree — plus the enforcement identity beside it:
111
111
 
112
112
  | field | |
113
113
  | --- | --- |
114
- | `structured` | the document **parsed** — the shape to read the field rules and any enumerated values off |
114
+ | `structured.schema` | the document **parsed** — the shape to read the field rules and any enumerated values off |
115
+ | `structured.enforced` | the identity the deployment itself serves from its `GET /version`: `schema_sha256`, the digest of the contract it actually enforces, and `schema_origin`, where those bytes come from on the server — or `null` when the deployment could not say |
115
116
  | `text` | the served bytes **unchanged** — no re-encoding, no reformatting, so a digest taken over this text matches the canonical document's, which is the mirror's whole promise |
116
117
 
118
+ **The end-to-end check is derivable from this one tool.** Take a SHA-256 digest over `text` and
119
+ compare it with `enforced.schema_sha256`: a **match** means the reference you read is the contract
120
+ that will judge you; a **mismatch** means the bytes you received are *not* what the deployment
121
+ enforces — do not author annotations against them, and read `enforced.schema_origin` to see which
122
+ half of the disagreement is the server's. The tool serves both facts side by side and never
123
+ judges: a mismatch is never refused or warned here, because the judgment is yours.
124
+
125
+ **`enforced: null` means "this deployment could not say"** — its `/version` omits the identity
126
+ keys (a build predating the identity channel), answers non-2xx, or the identity fetch fails
127
+ entirely — and the document answer still stands in full. It is not the same null as a served
128
+ `schema_sha256: null` *inside* a present `enforced`: that is the deployment's own honest "I
129
+ enforce from this origin and cannot currently read it", passed through exactly as served.
130
+
117
131
  Nothing in this bridge restates the schema's contents — not here, not in a tool description, not in
118
132
  a test. The answer *is* the contract; any prose copy of it would be one release behind the document
119
133
  this tool serves, and this repo deliberately vendors no copy of its own.
@@ -125,9 +139,9 @@ upgrading"*, not as a wrong URL. A **2xx** whose body will not parse is reported
125
139
  mirror instead, naming the route rather than your configuration: the response arrived, so the
126
140
  endpoint is not the thing to go and fix.
127
141
 
128
- **Needs no API key of any kind** — the route is unauthenticated by design, because a contract is not
129
- a secret — so it works with `SPECGUARD_ENDPOINT` alone and sends no `Authorization` header. Takes no
130
- arguments.
142
+ **Needs no API key of any kind** — both routes it reads (the schema mirror and `GET /version`) are
143
+ unauthenticated by design, because a contract is not a secret — so it works with
144
+ `SPECGUARD_ENDPOINT` alone and sends no `Authorization` header. Takes no arguments.
131
145
 
132
146
  ### `get_repository_overview`
133
147
 
@@ -430,7 +444,10 @@ cancelled after two of four shards leaves a half-sized row in the history perman
430
444
 
431
445
  Reports **which build of the SpecGuard deployment is answering**, read from the deployment's own
432
446
  unauthenticated root-level `GET /version` — the figure the release bot's `VERSION` file carries,
433
- served as `{"version": "0.1.46"}`-shaped JSON and passed through verbatim as `{version}`.
447
+ served as a JSON object and passed through verbatim. Since SPGD-1316 the body also carries the
448
+ enforced contract's identity beside the build (`schema_sha256` + `schema_origin`); this tool
449
+ passes the whole answer through without interpreting it — `get_intent_schema` is where the served
450
+ contract is read beside that identity and the two are compared.
434
451
 
435
452
  **This is the server's build, not this bridge's.** The version in the initialize handshake's
436
453
  `serverInfo` and the `specguard-mcp/<version>` User-Agent describe *this bridge* — a different
@@ -29,12 +29,12 @@ export declare function getJson(api: ApiConfig, path: string, query: Record<stri
29
29
  * is for differs per caller, while the status check and the "reached and
30
30
  * refused" hand-off to `describeFailure` do not.
31
31
  *
32
- * So this shares `fetchWithTimeout` and `describeFailure` VERBATIM — the one
33
- * total deadline, the abort, the reached-and-stopped vs could-not-reach split,
34
- * and every crafted status sentence — and differs from `getJson` in exactly
35
- * one thing: it returns what came back instead of what it parsed. A caller
36
- * that wants a parsed value parses it, and owns the diagnosis for its own
37
- * body, which is the only place that diagnosis can be correct.
32
+ * So this shares through `requestText` — the one total deadline, the abort,
33
+ * the reached-and-stopped vs could-not-reach split, and every crafted status
34
+ * sentence — and differs from `getJson` in exactly one thing: it returns what
35
+ * came back instead of what it parsed. A caller that wants a parsed value
36
+ * parses it, and owns the diagnosis for its own body, which is the only place
37
+ * that diagnosis can be correct.
38
38
  */
39
39
  export declare function getText(api: ApiConfig, path: string, fetchImpl: typeof globalThis.fetch): Promise<string>;
40
40
  /**
@@ -79,8 +79,8 @@ export declare function patchJson(api: ApiConfig, path: string, body: Record<str
79
79
  * "answered 204 but the body was not JSON" — the trap this verb specifically
80
80
  * introduces, and the reason the DELETE path has its own success handling
81
81
  * instead of sharing `requestJson`'s. The status check and the
82
- * "reached and refused" hand-off to `describeFailure` are still shared
83
- * verbatim: only what happens to a SUCCESS body differs.
82
+ * "reached and refused" hand-off to `describeFailure` are still shared through
83
+ * `requestText`: only what happens to a SUCCESS body differs.
84
84
  */
85
85
  export declare function deleteJson(api: ApiConfig, path: string, fetchImpl: typeof globalThis.fetch): Promise<string>;
86
86
  /**
@@ -37,18 +37,15 @@ export async function getJson(api, path, query, fetchImpl) {
37
37
  * is for differs per caller, while the status check and the "reached and
38
38
  * refused" hand-off to `describeFailure` do not.
39
39
  *
40
- * So this shares `fetchWithTimeout` and `describeFailure` VERBATIM — the one
41
- * total deadline, the abort, the reached-and-stopped vs could-not-reach split,
42
- * and every crafted status sentence — and differs from `getJson` in exactly
43
- * one thing: it returns what came back instead of what it parsed. A caller
44
- * that wants a parsed value parses it, and owns the diagnosis for its own
45
- * body, which is the only place that diagnosis can be correct.
40
+ * So this shares through `requestText` — the one total deadline, the abort,
41
+ * the reached-and-stopped vs could-not-reach split, and every crafted status
42
+ * sentence — and differs from `getJson` in exactly one thing: it returns what
43
+ * came back instead of what it parsed. A caller that wants a parsed value
44
+ * parses it, and owns the diagnosis for its own body, which is the only place
45
+ * that diagnosis can be correct.
46
46
  */
47
47
  export async function getText(api, path, fetchImpl) {
48
- const { response, body } = await fetchWithTimeout(new URL(`${api.endpoint}${path}`), api, fetchImpl, { method: "GET" });
49
- if (!response.ok)
50
- throw describeFailure(response.status, body, api);
51
- return body;
48
+ return requestText(new URL(`${api.endpoint}${path}`), api, fetchImpl, { method: "GET" });
52
49
  }
53
50
  /**
54
51
  * `POST` with a JSON body — the write half of the transport, and deliberately
@@ -102,14 +99,11 @@ export async function patchJson(api, path, body, fetchImpl) {
102
99
  * "answered 204 but the body was not JSON" — the trap this verb specifically
103
100
  * introduces, and the reason the DELETE path has its own success handling
104
101
  * instead of sharing `requestJson`'s. The status check and the
105
- * "reached and refused" hand-off to `describeFailure` are still shared
106
- * verbatim: only what happens to a SUCCESS body differs.
102
+ * "reached and refused" hand-off to `describeFailure` are still shared through
103
+ * `requestText`: only what happens to a SUCCESS body differs.
107
104
  */
108
105
  export async function deleteJson(api, path, fetchImpl) {
109
- const { response, body } = await fetchWithTimeout(new URL(`${api.endpoint}${path}`), api, fetchImpl, { method: "DELETE" });
110
- if (!response.ok)
111
- throw describeFailure(response.status, body, api);
112
- return body;
106
+ return requestText(new URL(`${api.endpoint}${path}`), api, fetchImpl, { method: "DELETE" });
113
107
  }
114
108
  /**
115
109
  * `DELETE` that answers with a JSON body — the destructive verb's one non-empty
@@ -179,6 +173,26 @@ async function requestJson(url, api, fetchImpl, request) {
179
173
  "or login page.", response.status);
180
174
  }
181
175
  }
176
+ /**
177
+ * The raw-body verbs' half of the response handling `requestJson` owns, in one
178
+ * place.
179
+ *
180
+ * Extracted when `getText` needed a home beside the JSON verbs rather than
181
+ * copied into it: the status check and the "reached and refused" hand-off to
182
+ * `describeFailure` are identical for both raw-body verbs, and what a SUCCESS
183
+ * body is for — the thing that differs per caller — stays out of here. There
184
+ * is deliberately NO not-JSON branch: for a bytes-are-the-answer contract,
185
+ * `requestJson`'s "was not JSON" diagnosis is wrong even when a parse would
186
+ * fail, because it names a cause (misconfigured endpoint) the correct response
187
+ * in hand refutes. A caller that wants a parsed value parses its own body and
188
+ * owns that judgment.
189
+ */
190
+ async function requestText(url, api, fetchImpl, request) {
191
+ const { response, body } = await fetchWithTimeout(url, api, fetchImpl, request);
192
+ if (!response.ok)
193
+ throw describeFailure(response.status, body, api);
194
+ return body;
195
+ }
182
196
  /** The three-clause guard both `*JsonObject` narrowings share. */
183
197
  function asJsonObject(body) {
184
198
  if (typeof body !== "object" || body === null || Array.isArray(body)) {
@@ -1 +1 @@
1
- {"version":3,"file":"specguard-api.js","sourceRoot":"","sources":["../../../src/support/specguard-api.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,qBAAqB,EACrB,gBAAgB,EAChB,wBAAwB,EACxB,oBAAoB,EACpB,2BAA2B,GAI5B,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAExC;;;;;;;;;;;;;GAaG;AACH,MAAM,CAAC,KAAK,UAAU,OAAO,CAC3B,GAAc,EACd,IAAY,EACZ,KAAyC,EACzC,SAAkC;IAElC,MAAM,GAAG,GAAG,IAAI,GAAG,CAAC,GAAG,GAAG,CAAC,QAAQ,GAAG,IAAI,EAAE,CAAC,CAAC;IAC9C,KAAK,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC;QACjD,IAAI,KAAK,KAAK,SAAS;YAAE,GAAG,CAAC,YAAY,CAAC,GAAG,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;IAC5D,CAAC;IAED,OAAO,WAAW,CAAC,GAAG,EAAE,GAAG,EAAE,SAAS,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,CAAC;AAC7D,CAAC;AAED;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,MAAM,CAAC,KAAK,UAAU,OAAO,CAC3B,GAAc,EACd,IAAY,EACZ,SAAkC;IAElC,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,GAAG,MAAM,gBAAgB,CAC/C,IAAI,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,CAAC,UAAU,CAAC,EAAE,CAAC;IAC/D,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,CAAC;AACvB,CAAC;AAED,OAAO,EACL,gBAAgB,EAChB,oBAAoB,EACpB,qBAAqB,EACrB,2BAA2B,EAC3B,wBAAwB,GACzB,CAAC"}
@@ -1,5 +1,5 @@
1
1
  import { ApiError } from "../errors.js";
2
- import { getText, requireEndpointApiConfig } from "../support/specguard-api.js";
2
+ import { getJsonObject, getText, requireEndpointApiConfig } from "../support/specguard-api.js";
3
3
  /**
4
4
  * The OpenTestIntent contract, READABLE — the reference this bridge was
5
5
  * missing beside the judge it already had.
@@ -51,29 +51,85 @@ import { getText, requireEndpointApiConfig } from "../support/specguard-api.js";
51
51
  * handling, exactly as `deleteJson` does for its empty `204`.
52
52
  *
53
53
  * The verbatim body is then served as the text view and PARSED ONCE for the
54
- * structured view, both derived from the one fetched value as
55
- * `tools/types.ts` requires. The text half is what keeps the mirror's promise
56
- * intact across this bridge: a consumer digesting what it received gets the
57
- * same digest the platform's own spec asserts, which a re-encode or a
58
- * pretty-print would destroy. The structured half is the shape an agent
59
- * actually reads a contract from — and `application/schema+json` carries the
60
- * `+json` structured-syntax suffix precisely so a client dispatching on "is
61
- * this JSON" still parses it.
54
+ * document view, both derived from the one fetched value as `tools/types.ts`
55
+ * requires. The text half is what keeps the mirror's promise intact across
56
+ * this bridge: a consumer digesting what it received gets the same digest the
57
+ * platform's own spec asserts, which a re-encode or a pretty-print would
58
+ * destroy. The structured half is the shape an agent actually reads a
59
+ * contract from — and `application/schema+json` carries the `+json`
60
+ * structured-syntax suffix precisely so a client dispatching on "is this
61
+ * JSON" still parses it.
62
62
  *
63
63
  * A 2xx body that will not parse is a genuinely malformed mirror and is
64
64
  * reported as THAT, naming the route rather than the endpoint variable: the
65
65
  * response arrived, so the configuration is not the thing to go and fix.
66
66
  *
67
+ * == The enforcement identity beside it: a SECOND body, whose disagreement IS
68
+ * the check
69
+ *
70
+ * Since SPGD-1316 the deployment also answers WHICH CONTRACT IT ENFORCES:
71
+ * `GET /version` carries `schema_sha256` — the digest of the vendored document
72
+ * this process validates every ingested annotation against — and
73
+ * `schema_origin`, the repo-relative path those bytes come from. The pairing
74
+ * the platform's own controller names is exact: the same bytes are fetchable,
75
+ * unauthenticated, from this same host at the mirror route above, so a client
76
+ * can digest them itself and check the served answer. This tool is where that
77
+ * loop closes. Until now the bridge carried those keys invisibly —
78
+ * `get_server_version` passed them through, but the tool whose question IS the
79
+ * contract named no comparison target, and `schema_sha256` appeared nowhere on
80
+ * this surface — so the question "is the reference I read the contract that
81
+ * will judge me?" was underivable from this toolset at all.
82
+ *
83
+ * `run()` now makes BOTH fetches and serves the two facts side by side. The
84
+ * identity fetch is the exact helper on the exact route `get_server_version`
85
+ * uses — `getJsonObject` against `/version` — so nothing new is invented: no
86
+ * second tool on that route, no new transport, no new credential kind, no new
87
+ * dependency. What is new is the shape of the answer: `structured` becomes an
88
+ * envelope, `{ schema, enforced }`, with the server's own key names preserved
89
+ * verbatim so the family cross-check is one vocabulary.
90
+ *
91
+ * The one-body doctrine above is RECONCILED here, not violated: `text` and
92
+ * `structured.schema` are two views of the ONE mirror body and must not
93
+ * disagree, while the whole point of `enforced` is that it CAN — a mismatch
94
+ * between a SHA-256 digest over `text` and `enforced.schema_sha256` IS the
95
+ * finding, and `enforced.schema_origin` is the fact that says which half of
96
+ * the disagreement is the server's. The tool serves both facts and never
97
+ * judges: refusing or warning on a mismatch would blind the agent in exactly
98
+ * the mangled-transport case where both facts matter most, and the judgment
99
+ * is the reader's.
100
+ *
101
+ * == The identity leg is best-effort by design
102
+ *
103
+ * Its failure must never fail the tool whose primary answer is the document.
104
+ * Any of — a deployment predating the identity channel (its `/version` omits
105
+ * the keys), a non-2xx answer, a network failure, a body that will not parse —
106
+ * yields `enforced: null` with the document answer still standing in full. No
107
+ * throw, no sentinel. `null` means "this deployment could not say", and the
108
+ * description says so in the reader's terms. This inherits the server's own
109
+ * nil doctrine in both directions: a current deployment whose vendored schema
110
+ * cannot be read answers `schema_sha256: null` at 200 — an honest null INSIDE
111
+ * a present envelope, passed through as served — while `enforced: null` is
112
+ * the envelope-level absence, the deployment having said nothing at all. The
113
+ * two nulls answer different questions and are kept apart.
114
+ *
67
115
  * == No arguments, no credential
68
116
  *
69
- * The route takes no parameters and authenticates nothing, so the tool
70
- * advertises no argument and binds no key — the second consumer of
117
+ * Neither route takes parameters and neither authenticates anything, so the
118
+ * tool advertises no argument and binds no key — the second consumer of
71
119
  * `requireEndpointApiConfig` after `get_server_version`, sending no
72
- * `Authorization` header even when every key variable is set. A contract is
73
- * not a secret, and presenting a key an endpoint does not read is not
74
- * authentication, it is leakage.
120
+ * `Authorization` header on EITHER fetch even when every key variable is set.
121
+ * A contract is not a secret, and presenting a key an endpoint does not read
122
+ * is not authentication, it is leakage.
75
123
  */
76
124
  const SCHEMA_PATH = "/schemas/open-test-intent.v1.json";
125
+ /**
126
+ * The identity route, beside the mirror route above — the exact path
127
+ * `get_server_version` reads, fetched here with the exact helper that tool
128
+ * uses. One route, one tool each: this is not a second tool on `/version`, it
129
+ * is the contract tool carrying the comparison target its own description
130
+ * invites the reader to compute.
131
+ */
132
+ const VERSION_PATH = "/version";
77
133
  const getIntentSchema = {
78
134
  name: "get_intent_schema",
79
135
  title: "OpenTestIntent schema",
@@ -85,17 +141,31 @@ const getIntentSchema = {
85
141
  "also the ONLY way to learn parts of it: a refusal names the legal values of a field you got " +
86
142
  "wrong but says nothing about a field you omitted, and an OPTIONAL property can never appear in " +
87
143
  "any refusal at all — nothing you submit, at any value, causes the linter to mention it. The " +
88
- "answer carries the whole document in both shapes, derived from one fetched body so they cannot " +
89
- "disagree: `structured` is it parsed, which is what to read the field rules and any enumerated " +
90
- "values off; `text` is the served bytes UNCHANGED, so a digest taken over it matches the " +
91
- "canonical document's. Nothing here restates the schema's contents — the answer is the contract, " +
92
- "and any prose copy of it would be one release behind. A 404 means this deployment PREDATES the " +
93
- "mirror route: the endpoint is right and the build is old. The error text names the endpoint as " +
94
- "possibly misconfigured because a non-contract 404 body names no cause — when the other tools " +
95
- "work against the same endpoint, read it as 'the deployment needs upgrading', not as a wrong " +
96
- "URL. Needs NO API key of any kind — the route is unauthenticated by design, because a contract " +
97
- "is not a secret — so it works with SPECGUARD_ENDPOINT alone and sends no Authorization header. " +
98
- "Takes no arguments.",
144
+ "answer is an envelope carrying the whole document in both shapes, derived from one fetched " +
145
+ "body so they cannot disagree: `structured.schema` is it parsed, which is what to read the " +
146
+ "field rules and any enumerated values off; `text` is the served bytes UNCHANGED, so a digest " +
147
+ "taken over it matches the canonical document's. Beside the document, `structured.enforced` " +
148
+ "carries the enforcement identity the deployment itself serves from its `GET /version` — " +
149
+ "`schema_sha256`, the digest of the contract it actually enforces, and `schema_origin`, where " +
150
+ "those bytes come from on the server — which makes the end-to-end check derivable from this " +
151
+ "one tool: take a SHA-256 digest over `text` and compare it with `enforced.schema_sha256`. A " +
152
+ "match means the reference you read IS the contract that will judge you; a mismatch means the " +
153
+ "bytes you received are NOT what the deployment enforces, and you must not author annotations " +
154
+ "against them — `enforced.schema_origin` names which half of the disagreement is the " +
155
+ "server's. The tool serves both facts side by side and never judges: a mismatch is never " +
156
+ "refused or warned here, because the judgment is the reader's and a hard failure would blind " +
157
+ "you in exactly the mangled-transport case where both facts matter most. `enforced` is null " +
158
+ "when this deployment could not say — its `/version` omits the identity keys (a build " +
159
+ "predating the identity channel), answers non-2xx, or the identity fetch fails entirely — and " +
160
+ "the document answer still stands in full; null means 'this deployment could not say', never " +
161
+ "a sentinel. Nothing here restates the schema's contents — the answer is the contract, and " +
162
+ "any prose copy of it would be one release behind. A 404 means this deployment PREDATES the " +
163
+ "mirror route: the endpoint is right and the build is old. The error text names the endpoint " +
164
+ "as possibly misconfigured because a non-contract 404 body names no cause — when the other " +
165
+ "tools work against the same endpoint, read it as 'the deployment needs upgrading', not as a " +
166
+ "wrong URL. Needs NO API key of any kind — both routes it reads are unauthenticated by " +
167
+ "design, because a contract is not a secret — so it works with SPECGUARD_ENDPOINT alone and " +
168
+ "sends no Authorization header. Takes no arguments.",
99
169
  inputSchema: {
100
170
  type: "object",
101
171
  // No properties, deliberately — a document has no ask to narrow. Still
@@ -108,11 +178,14 @@ const getIntentSchema = {
108
178
  async run(_args, context) {
109
179
  const api = requireEndpointApiConfig(context.config);
110
180
  const document = await getText(api, SCHEMA_PATH, context.fetch);
181
+ const schema = parseSchemaDocument(document, api.endpoint);
111
182
  return {
112
- // The served bytes, unchanged — see this file's header. Both views come
113
- // off this ONE value.
183
+ // The served bytes, unchanged — see this file's header. The document's
184
+ // two views come off this ONE value; `enforced` is the deliberate SECOND
185
+ // body, whose possible disagreement with a digest over this text IS the
186
+ // check.
114
187
  text: document,
115
- structured: parseSchemaDocument(document, api.endpoint),
188
+ structured: { schema, enforced: await enforcedIdentity(api, context.fetch) },
116
189
  };
117
190
  },
118
191
  };
@@ -127,9 +200,9 @@ const getIntentSchema = {
127
200
  * report has somewhere to go.
128
201
  *
129
202
  * The object narrowing is part of the same answer rather than a second failure
130
- * mode bolted beside it: `ToolResult.structured` is a `Record<string, unknown>`,
131
- * a schema document's root is a JSON object, and a mirror serving an array or a
132
- * bare scalar is malformed in exactly the way this sentence describes.
203
+ * mode bolted beside it: a schema document's root is a JSON object, and a
204
+ * mirror serving an array or a bare scalar is malformed in exactly the way
205
+ * this sentence describes.
133
206
  */
134
207
  function parseSchemaDocument(body, endpoint) {
135
208
  let parsed;
@@ -149,5 +222,43 @@ function parseSchemaDocument(body, endpoint) {
149
222
  }
150
223
  return parsed;
151
224
  }
225
+ /**
226
+ * The enforcement identity, fetched BEST-EFFORT — the `enforced` half of the
227
+ * envelope.
228
+ *
229
+ * Success is narrow and everything else is the same `null`. The narrow path: a
230
+ * 2xx JSON object carrying BOTH identity keys. A build predating the identity
231
+ * channel answers `{"version": …}` alone, and an envelope built over a missing
232
+ * key would be a fabricated half-answer rather than an honest absence, so the
233
+ * pair is required together — the same all-or-nothing choice the singular/
234
+ * plural branch in the transport makes. The values are copied through verbatim
235
+ * under the server's own key names, INCLUDING a null digest: a deployment that
236
+ * cannot currently read its vendored schema answers `schema_sha256: null` at
237
+ * 200 by its own doctrine, and that honesty is not this bridge's to improve —
238
+ * a present envelope saying "I enforce from this origin and cannot currently
239
+ * read it" is strictly more actionable than the envelope-level null below.
240
+ *
241
+ * Everything else — a non-2xx answer, an unreachable deployment, a timeout, a
242
+ * body that will not parse or is not an object, a `/version` that predates the
243
+ * route entirely — lands in the catch and returns `null`. That is deliberate:
244
+ * the identity leg is best-effort BY DESIGN, and its failure must never fail
245
+ * the tool whose primary answer is the document. `null` means "this deployment
246
+ * could not say", never a sentinel.
247
+ */
248
+ async function enforcedIdentity(api, fetchImpl) {
249
+ try {
250
+ const version = await getJsonObject(api, VERSION_PATH, {}, fetchImpl);
251
+ if ("schema_sha256" in version && "schema_origin" in version) {
252
+ return {
253
+ schema_sha256: version["schema_sha256"],
254
+ schema_origin: version["schema_origin"],
255
+ };
256
+ }
257
+ return null;
258
+ }
259
+ catch {
260
+ return null;
261
+ }
262
+ }
152
263
  export default getIntentSchema;
153
264
  //# sourceMappingURL=get-intent-schema.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"get-intent-schema.js","sourceRoot":"","sources":["../../../src/tools/get-intent-schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AACxC,OAAO,EAAE,OAAO,EAAE,wBAAwB,EAAE,MAAM,6BAA6B,CAAC;AAGhF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwEG;AACH,MAAM,WAAW,GAAG,mCAAmC,CAAC;AAExD,MAAM,eAAe,GAAmB;IACtC,IAAI,EAAE,mBAAmB;IACzB,KAAK,EAAE,uBAAuB;IAC9B,WAAW,EACT,8FAA8F;QAC9F,+FAA+F;QAC/F,gGAAgG;QAChG,iGAAiG;QACjG,+FAA+F;Q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;AAC3C,CAAC;AAED;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,KAAK,UAAU,gBAAgB,CAC7B,GAAc,EACd,SAAkC;IAElC,IAAI,CAAC;QACH,MAAM,OAAO,GAAG,MAAM,aAAa,CAAC,GAAG,EAAE,YAAY,EAAE,EAAE,EAAE,SAAS,CAAC,CAAC;QAEtE,IAAI,eAAe,IAAI,OAAO,IAAI,eAAe,IAAI,OAAO,EAAE,CAAC;YAC7D,OAAO;gBACL,aAAa,EAAE,OAAO,CAAC,eAAe,CAAC;gBACvC,aAAa,EAAE,OAAO,CAAC,eAAe,CAAC;aACxC,CAAC;QACJ,CAAC;QAED,OAAO,IAAI,CAAC;IACd,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,IAAI,CAAC;IACd,CAAC;AACH,CAAC;AAED,eAAe,eAAe,CAAC"}
@@ -44,8 +44,11 @@ import type { ToolDefinition } from "./types.js";
44
44
  * the tool advertises no argument and requires no key: it is the first tool
45
45
  * here served by `requireEndpointApiConfig`, and the transport sends no
46
46
  * `Authorization` header for it. The body is passed through verbatim —
47
- * reshaping `{version}` would be a second copy of the platform's own
48
- * identity answer, one release behind it.
47
+ * reshaping it would be a second copy of the platform's own identity answer,
48
+ * one release behind it. Since SPGD-1316 that body also carries the enforced
49
+ * contract's identity (`schema_sha256` + `schema_origin`) beside the build;
50
+ * this tool does not interpret it — `get_intent_schema` serves the contract
51
+ * beside that identity, which is where the pair is compared.
49
52
  */
50
53
  declare const getServerVersion: ToolDefinition;
51
54
  export default getServerVersion;
@@ -44,15 +44,23 @@ import { getJsonObject, requireEndpointApiConfig } from "../support/specguard-ap
44
44
  * the tool advertises no argument and requires no key: it is the first tool
45
45
  * here served by `requireEndpointApiConfig`, and the transport sends no
46
46
  * `Authorization` header for it. The body is passed through verbatim —
47
- * reshaping `{version}` would be a second copy of the platform's own
48
- * identity answer, one release behind it.
47
+ * reshaping it would be a second copy of the platform's own identity answer,
48
+ * one release behind it. Since SPGD-1316 that body also carries the enforced
49
+ * contract's identity (`schema_sha256` + `schema_origin`) beside the build;
50
+ * this tool does not interpret it — `get_intent_schema` serves the contract
51
+ * beside that identity, which is where the pair is compared.
49
52
  */
50
53
  const getServerVersion = {
51
54
  name: "get_server_version",
52
55
  title: "Server version",
53
56
  description: "Reports WHICH BUILD of the SpecGuard DEPLOYMENT is answering, read from the deployment's own " +
54
57
  "unauthenticated root-level `GET /version` — the figure the release bot's VERSION file carries, " +
55
- 'served as `{"version": "0.1.46"}`-shaped JSON and passed through verbatim as `{version}`. ' +
58
+ "served as a JSON object and passed through verbatim. Since SPGD-1316 that body also carries " +
59
+ "the enforced contract's identity beside the build — `schema_sha256`, the digest of the " +
60
+ "OpenTestIntent document this deployment validates annotations against, and `schema_origin`, " +
61
+ "where those bytes come from on the server — and the whole object is passed through without " +
62
+ "interpreting it; get_intent_schema is where the served contract is read beside that identity " +
63
+ "and the two are compared. " +
56
64
  "This is the SERVER's build, NOT this bridge's: the version in the initialize handshake's " +
57
65
  "`serverInfo` and the `specguard-mcp/<version>` User-Agent describe this bridge, a different " +
58
66
  "component released on its own cadence, so never read one as the other. Pinning which build's " +
@@ -1 +1 @@
1
- {"version":3,"file":"get-server-version.js","sourceRoot":"","sources":["../../../src/tools/get-server-version.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,wBAAwB,EAAE,MAAM,6BAA6B,CAAC;AAGtF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+CG;AACH,MAAM,gBAAgB,GAAmB;IACvC,IAAI,EAAE,oBAAoB;IAC1B,KAAK,EAAE,gBAAgB;IACvB,WAAW,EACT,+FAA+F;QAC/F,iGAAiG;QACjG,4FAA4F;QAC5F,2FAA2F;QAC3F,8FAA8F;QAC9F,+FAA+F;QAC/F,iGAAiG;QACjG,0FAA0F;QAC1F,gGAAgG;QAChG,+FAA+F;QAC/F,8FAA8F;QAC9F,iGAAiG;QACjG,gGAAgG;QAChG,gGAA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,uFAAuF;IACzF,WAAW,EAAE;QACX,IAAI,EAAE,QAAQ;QACd,4EAA4E;QAC5E,0EAA0E;QAC1E,0EAA0E;QAC1E,0EAA0E;QAC1E,mDAAmD;QACnD,oBAAoB,EAAE,KAAK;KAC5B;IAED,KAAK,CAAC,GAAG,CAAC,KAAK,EAAE,OAAO;QACtB,MAAM,GAAG,GAAG,wBAAwB,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;QAErD,MAAM,MAAM,GAAG,MAAM,aAAa,CAAC,GAAG,EAAE,UAAU,EAAE,EAAE,EAAE,OAAO,CAAC,KAAK,CAAC,CAAC;QAEvE,OAAO;YACL,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC;YACrC,UAAU,EAAE,MAAM;SACnB,CAAC;IACJ,CAAC;CACF,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "specguard-mcp",
3
- "version": "0.1.33",
3
+ "version": "0.1.34",
4
4
  "description": "MCP server exposing SpecGuard suite intelligence to AI coding agents",
5
5
  "license": "ISC",
6
6
  "type": "module",