@ggui-ai/protocol-conformance 0.23.0 → 0.24.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.
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "release-9-1-handshake-suggestion",
|
|
3
|
+
"description": "The ggui_handshake suggestion in the shape ggui tag 9.1 (60a234ce0, serving prod) emits on a cache hit: `origin: cache`, the templated `match-semantic` rationale, a full `blueprintMeta` WITHOUT `matchedIntent`, and the contract summary. Built with that release's own `blueprintKey` / `summarizeContract` / `decide-handshake` cache-hit shape (the suggestion schema, key and summary code are unchanged since 60a234ce0). Today's handshakeSuggestionSchema MUST accept it: `blueprintMeta.matchedIntent` (#1336) is optional, so a consumer holding this release's payload keeps parsing (VERSION-POLICY §3.6).",
|
|
4
|
+
"release": {
|
|
5
|
+
"label": "ggui tag 9.1",
|
|
6
|
+
"sha": "60a234ce0"
|
|
7
|
+
},
|
|
8
|
+
"wire": "handshake-suggestion",
|
|
9
|
+
"payload": {
|
|
10
|
+
"origin": "cache",
|
|
11
|
+
"rationale": "match-semantic: a saved interface matches this intent — reusing it",
|
|
12
|
+
"blueprintMeta": {
|
|
13
|
+
"blueprintId": "bp_3f6c2a9e-8d41-4b7a-9c15-2e7f0b6d4a18",
|
|
14
|
+
"contractHash": "a84bfa0945745fee",
|
|
15
|
+
"codeHash": "d6b5657622c1bb6b6c33576a187b3f3d320337c90d6a2298a24a28e78cea13fc",
|
|
16
|
+
"source": {
|
|
17
|
+
"kind": "llm",
|
|
18
|
+
"generator": "ui-gen-default",
|
|
19
|
+
"model": "anthropic/claude-haiku-4-5"
|
|
20
|
+
},
|
|
21
|
+
"variance": {},
|
|
22
|
+
"selectedReason": "match-semantic: a saved interface matches this intent — reusing it"
|
|
23
|
+
},
|
|
24
|
+
"proposedContractSummary": "slots=∅; actions=archive(id); streams=∅; props=messages:array!"
|
|
25
|
+
},
|
|
26
|
+
"expect": "accepted"
|
|
27
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/** The protocol-owned wires the catalog can grade. */
|
|
2
|
-
export declare const N1_COMPAT_WIRES: readonly ["app-theme", "app-theme-read", "app-theme-carry", "render-meta", "generation-profile", "ops-generate-blueprint"];
|
|
2
|
+
export declare const N1_COMPAT_WIRES: readonly ["app-theme", "app-theme-read", "app-theme-carry", "render-meta", "generation-profile", "ops-generate-blueprint", "handshake-suggestion"];
|
|
3
3
|
/** `backward`: the previous release's payload against today's parser. `forward`: a later release's payload against today's READ door. */
|
|
4
4
|
export declare const N1_COMPAT_DIRECTIONS: readonly ["backward", "forward"];
|
|
5
5
|
export type N1CompatDirection = (typeof N1_COMPAT_DIRECTIONS)[number];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/n1-compat-conformance/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/n1-compat-conformance/index.ts"],"names":[],"mappings":"AA+BA,sDAAsD;AACtD,eAAO,MAAM,eAAe,oJAAqJ,CAAC;AAElL,yIAAyI;AACzI,eAAO,MAAM,oBAAoB,kCAAmC,CAAC;AACrE,MAAM,MAAM,iBAAiB,GAAG,CAAC,OAAO,oBAAoB,CAAC,CAAC,MAAM,CAAC,CAAC;AACtE,MAAM,MAAM,YAAY,GAAG,CAAC,OAAO,eAAe,CAAC,CAAC,MAAM,CAAC,CAAC;AAE5D,MAAM,WAAW,eAAe;IAC9B,mFAAmF;IACnF,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,iKAAiK;IACjK,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,6EAA6E;IAC7E,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAC;CAC9B;AAED,MAAM,WAAW,YAAY;IAC3B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,OAAO,EAAE,eAAe,CAAC;IAClC,0CAA0C;IAC1C,QAAQ,CAAC,SAAS,EAAE,iBAAiB,CAAC;IACtC,QAAQ,CAAC,IAAI,EAAE,YAAY,CAAC;IAC5B,4FAA4F;IAC5F,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;IAC1B,gGAAgG;IAChG,QAAQ,CAAC,MAAM,EAAE,UAAU,CAAC;CAC7B;AAED,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,SAAS,EAAE,iBAAiB,CAAC;IACtC,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC;IACvB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;CACzB;AAgDD,eAAO,MAAM,eAAe,EAAE,SAAS,YAAY,EAShC,CAAC;AAoGpB,4DAA4D;AAC5D,wBAAgB,sBAAsB,IAAI,SAAS,cAAc,EAAE,CAkBlE"}
|
|
@@ -14,17 +14,18 @@
|
|
|
14
14
|
* Pure-function catalog: no transport, no adopter input — graded on every
|
|
15
15
|
* `runConformance()` and by the kit's own unit lane.
|
|
16
16
|
*/
|
|
17
|
-
import { appGenerationProfileSchema, appThemeGetResponseSchema, appThemeSchema, opsGenerateBlueprintInputSchema, parseAppThemeAtReadDoor } from '@ggui-ai/protocol';
|
|
17
|
+
import { appGenerationProfileSchema, appThemeGetResponseSchema, appThemeSchema, handshakeSuggestionSchema, opsGenerateBlueprintInputSchema, parseAppThemeAtReadDoor } from '@ggui-ai/protocol';
|
|
18
18
|
import { MCP_APP_AI_GGUI_RENDER_META_KEY, parseMcpAppAiGguiRenderMeta, } from '@ggui-ai/protocol/integrations/mcp-apps';
|
|
19
19
|
import release2AppThemeV2 from './cases/release-2-app-theme-v2.json' with { type: 'json' };
|
|
20
20
|
import release2RenderMeta from './cases/release-2-render-meta.json' with { type: 'json' };
|
|
21
21
|
import release2GenerationProfile from './cases/release-2-generation-profile.json' with { type: 'json' };
|
|
22
22
|
import release2OpsGenerateBlueprint from './cases/release-2-ops-generate-blueprint.json' with { type: 'json' };
|
|
23
|
+
import release91HandshakeSuggestion from './cases/release-9-1-handshake-suggestion.json' with { type: 'json' };
|
|
23
24
|
import forwardAppThemeUnknownMember from './cases/forward-app-theme-unknown-member.json' with { type: 'json' };
|
|
24
25
|
import forwardAppThemeCarryUnknownMember from './cases/forward-app-theme-carry-unknown-member.json' with { type: 'json' };
|
|
25
26
|
import forwardRenderMetaUnknownMember from './cases/forward-render-meta-unknown-member.json' with { type: 'json' };
|
|
26
27
|
/** The protocol-owned wires the catalog can grade. */
|
|
27
|
-
export const N1_COMPAT_WIRES = ['app-theme', 'app-theme-read', 'app-theme-carry', 'render-meta', 'generation-profile', 'ops-generate-blueprint'];
|
|
28
|
+
export const N1_COMPAT_WIRES = ['app-theme', 'app-theme-read', 'app-theme-carry', 'render-meta', 'generation-profile', 'ops-generate-blueprint', 'handshake-suggestion'];
|
|
28
29
|
/** `backward`: the previous release's payload against today's parser. `forward`: a later release's payload against today's READ door. */
|
|
29
30
|
export const N1_COMPAT_DIRECTIONS = ['backward', 'forward'];
|
|
30
31
|
function isN1CompatWire(v) {
|
|
@@ -80,6 +81,7 @@ export const N1_COMPAT_CASES = [
|
|
|
80
81
|
release2RenderMeta,
|
|
81
82
|
release2GenerationProfile,
|
|
82
83
|
release2OpsGenerateBlueprint,
|
|
84
|
+
release91HandshakeSuggestion,
|
|
83
85
|
forwardAppThemeUnknownMember,
|
|
84
86
|
forwardAppThemeCarryUnknownMember,
|
|
85
87
|
forwardRenderMetaUnknownMember,
|
|
@@ -176,6 +178,14 @@ function gradeRenderMeta(payload) {
|
|
|
176
178
|
(sentSpent ? ', spentOneShots preserved' : ''),
|
|
177
179
|
};
|
|
178
180
|
}
|
|
181
|
+
// ggui#1336 — the handshake suggestion the served release emits must keep parsing
|
|
182
|
+
// when the suggestion gains an optional member (`blueprintMeta.matchedIntent`).
|
|
183
|
+
function gradeHandshakeSuggestion(payload) {
|
|
184
|
+
const r = handshakeSuggestionSchema.safeParse(payload);
|
|
185
|
+
return r.success
|
|
186
|
+
? { pass: true, detail: 'handshakeSuggestionSchema: accepted' }
|
|
187
|
+
: { pass: false, detail: `handshakeSuggestionSchema refused the previous release's suggestion: ${r.error.issues.map((i) => i.message).join('; ')}` };
|
|
188
|
+
}
|
|
179
189
|
/** Grade every N−1 case against the protocol as shipped. */
|
|
180
190
|
export function runN1CompatConformance() {
|
|
181
191
|
return N1_COMPAT_CASES.map((c) => {
|
|
@@ -189,7 +199,9 @@ export function runN1CompatConformance() {
|
|
|
189
199
|
? gradeRenderMeta(c.payload)
|
|
190
200
|
: c.wire === 'generation-profile'
|
|
191
201
|
? gradeGenerationProfile(c.payload)
|
|
192
|
-
:
|
|
202
|
+
: c.wire === 'handshake-suggestion'
|
|
203
|
+
? gradeHandshakeSuggestion(c.payload)
|
|
204
|
+
: gradeOpsGenerateBlueprint(c.payload);
|
|
193
205
|
return { name: c.name, direction: c.direction, pass: graded.pass, detail: `${c.release.label} (${c.release.sha}) → ${graded.detail}` };
|
|
194
206
|
});
|
|
195
207
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ggui-ai/protocol-conformance",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.24.0",
|
|
4
4
|
"description": "Conformance test kit for the ggui protocol. Drives a behavioral fixture catalog against a live implementation over WebSocket, a resources/read catalog against a live MCP server, and nine pure-function catalogs (schema, registration, resolution, binding, props-schema, host-helper, refusal-envelope, registry-completeness, transport-refusal) for the gadget, tool-binding, schema-precise-render, host-helper and pre-generation-refusal obligations, reporting a scorecard-style pass / fail / skip. MCP builders adopt this kit to prove their implementation is protocol-conformant.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"keywords": [
|
|
@@ -104,7 +104,7 @@
|
|
|
104
104
|
},
|
|
105
105
|
"dependencies": {
|
|
106
106
|
"ws": "^8.20.1",
|
|
107
|
-
"@ggui-ai/protocol": "0.
|
|
107
|
+
"@ggui-ai/protocol": "0.24.0"
|
|
108
108
|
},
|
|
109
109
|
"devDependencies": {
|
|
110
110
|
"@types/node": "^22.0.0",
|