@ggui-ai/protocol-conformance 0.2.0-alpha.3 → 0.3.0-rc.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.
- package/README.md +32 -13
- package/dist/cli.d.ts +11 -1
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +48 -20
- package/dist/conformance-host.d.ts +81 -76
- package/dist/conformance-host.d.ts.map +1 -1
- package/dist/conformance-host.js +0 -44
- package/dist/fixtures/bootstrap-protocol/bootstrap-bundle-fetch-failed.json +3 -3
- package/dist/fixtures/bootstrap-protocol/bootstrap-meta-missing.json +3 -3
- package/dist/fixtures/bootstrap-protocol/bootstrap-success.json +3 -3
- package/dist/fixtures/consume-buffer/action-ack-sequence.json +28 -0
- package/dist/fixtures/consume-buffer/action-payload-schema-violation.json +37 -0
- package/dist/fixtures/consume-buffer/index.d.ts +6 -0
- package/dist/fixtures/consume-buffer/index.d.ts.map +1 -0
- package/dist/fixtures/consume-buffer/index.js +41 -0
- package/dist/fixtures/consume-buffer/undeclared-action-rejected.json +29 -0
- package/dist/fixtures/host-context/host-context-observed-persists.json +34 -0
- package/dist/fixtures/host-context/index.d.ts +5 -0
- package/dist/fixtures/host-context/index.d.ts.map +1 -0
- package/dist/fixtures/host-context/index.js +40 -0
- package/dist/fixtures/index.d.ts +28 -9
- package/dist/fixtures/index.d.ts.map +1 -1
- package/dist/fixtures/index.js +33 -14
- package/dist/fixtures/reserved-channel-authority/index.d.ts.map +1 -1
- package/dist/fixtures/reserved-channel-authority/index.js +17 -7
- package/dist/fixtures/reserved-channel-authority/props-update-roundtrip.json +4 -4
- package/dist/fixtures/schema-version-handshake/index.d.ts.map +1 -1
- package/dist/fixtures/schema-version-handshake/index.js +12 -4
- package/dist/fixtures/schema-version-handshake/version-match.json +7 -5
- package/dist/fixtures/schema-version-handshake/version-mismatch.json +9 -10
- package/dist/fixtures/subscribe-tenancy/absent-appid-defaults.json +18 -0
- package/dist/fixtures/subscribe-tenancy/app-mismatch.json +20 -0
- package/dist/fixtures/subscribe-tenancy/index.d.ts +6 -0
- package/dist/fixtures/subscribe-tenancy/index.d.ts.map +1 -0
- package/dist/fixtures/subscribe-tenancy/index.js +62 -0
- package/dist/index.d.ts +4 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -4
- package/dist/match-behavior.d.ts +19 -100
- package/dist/match-behavior.d.ts.map +1 -1
- package/dist/match-behavior.js +289 -246
- package/dist/registration-conformance/cases/gate-duplicate-hook.json +26 -0
- package/dist/registration-conformance/cases/gate-export-not-registered.json +1 -0
- package/dist/registration-conformance/cases/gate-multi-package-distinct-names-accept.json +26 -0
- package/dist/registration-conformance/cases/gate-no-gadgets-accept.json +1 -0
- package/dist/registration-conformance/cases/gate-package-mismatch.json +1 -0
- package/dist/registration-conformance/cases/gate-priority-not-registered-outranks-mismatch.json +1 -0
- package/dist/registration-conformance/cases/gate-priority-registry-outranks-public-env.json +22 -0
- package/dist/registration-conformance/cases/gate-public-env-missing.json +21 -0
- package/dist/registration-conformance/cases/gate-public-env-satisfied-accept.json +21 -0
- package/dist/registration-conformance/cases/gate-public-env-undeclared-wrapper-accept.json +26 -0
- package/dist/registration-conformance/cases/gate-registered-resolves-accept.json +1 -0
- package/dist/registration-conformance/cases/gate-stdlib-hook-accept.json +1 -0
- package/dist/registration-conformance/cases/gate-typo-classifies-as-not-registered.json +1 -0
- package/dist/registration-conformance/index.d.ts +64 -33
- package/dist/registration-conformance/index.d.ts.map +1 -1
- package/dist/registration-conformance/index.js +24 -8
- package/dist/run-conformance.d.ts +145 -6
- package/dist/run-conformance.d.ts.map +1 -1
- package/dist/run-conformance.js +531 -93
- package/dist/types.d.ts +319 -165
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +27 -23
- package/dist/ws-transport.d.ts.map +1 -1
- package/dist/ws-transport.js +3 -2
- package/package.json +3 -3
- package/dist/fixtures/observability-events/index.d.ts +0 -5
- package/dist/fixtures/observability-events/index.d.ts.map +0 -1
- package/dist/fixtures/observability-events/index.js +0 -22
- package/dist/fixtures/observability-events/observability-contract-error-emitted.json +0 -28
- package/dist/fixtures/observability-events/observability-wired-tool-invoked.json +0 -27
- package/dist/fixtures/refresh-semantics/index.d.ts +0 -5
- package/dist/fixtures/refresh-semantics/index.d.ts.map +0 -1
- package/dist/fixtures/refresh-semantics/index.js +0 -19
- package/dist/fixtures/refresh-semantics/stream-refresh-success.json +0 -39
- package/dist/fixtures/reserved-channel-authority/stream-schema-violation.json +0 -44
- package/dist/fixtures/wired-action-dispatch/index.d.ts +0 -5
- package/dist/fixtures/wired-action-dispatch/index.d.ts.map +0 -1
- package/dist/fixtures/wired-action-dispatch/index.js +0 -29
- package/dist/fixtures/wired-action-dispatch/wired-action-success.json +0 -35
- package/dist/fixtures/wired-action-dispatch/wired-action-tool-not-found.json +0 -30
- package/dist/fixtures/wired-action-dispatch/wired-action-tool-threw.json +0 -31
- package/dist/fixtures/wired-action-dispatch/wired-action-tool-timeout.json +0 -31
package/dist/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgEG;AAMH;;;;;;;;;;;;;;GAcG;AACH,MAAM,MAAM,eAAe,GACvB,wBAAwB,GACxB,sBAAsB,CAAC;AAE3B,MAAM,WAAW,wBAAwB;IACvC,QAAQ,CAAC,IAAI,EAAE,IAAI,CAAC;IACpB,oEAAoE;IACpE,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,mEAAmE;IACnE,QAAQ,CAAC,IAAI,EAAE,UAAU,CAAC;CAC3B;AAED;;;;GAIG;AACH,MAAM,WAAW,sBAAsB;IACrC,QAAQ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mB,GACnB,4BAA4B,GAC5B,wBAAwB,GACxB,iBAAiB,CAAC;IACtB,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;CAC3B,GACD;IACE,QAAQ,CAAC,IAAI,EAAE,UAAU,CAAC;IAC1B,QAAQ,CAAC,IAAI,EACT,kBAAkB,GAClB,cAAc,GACd,oBAAoB,GACpB,CAAC,MAAM,GAAG,EAAE,CAAC,CAAC;IAClB,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,OAAO,CAAC,EAAE,OAAO,CAAC;CAC5B,GACD;IACE,QAAQ,CAAC,IAAI,EAAE,WAAW,CAAC;IAC3B,QAAQ,CAAC,MAAM,EAAE,sBAAsB,CAAC;IACxC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;CAC1B,GACD;IACE,QAAQ,CAAC,IAAI,EAAE,SAAS,CAAC;IACzB,QAAQ,CAAC,aAAa,CAAC,EAAE,MAAM,CAAC;IAChC,QAAQ,CAAC,cAAc,EAAE,SAAS,MAAM,EAAE,CAAC;IAC3C,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;CAC3B,GACD;IAAE,QAAQ,CAAC,IAAI,EAAE,SAAS,CAAC;IAAC,QAAQ,CAAC,GAAG,EAAE,OAAO,CAAA;CAAE,CAAC"}
|
package/dist/types.js
CHANGED
|
@@ -13,27 +13,31 @@
|
|
|
13
13
|
* {@link TeardownStep}, and {@link ExpectedBehavior} IS the public
|
|
14
14
|
* API. Renaming a field breaks every third-party consumer of the
|
|
15
15
|
* conformance kit. Treat this file the way `@ggui-ai/protocol`'s
|
|
16
|
-
* type declarations get treated: additive changes only
|
|
17
|
-
* via `(string & {})` tails
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
*
|
|
24
|
-
*
|
|
25
|
-
*
|
|
26
|
-
*
|
|
27
|
-
*
|
|
28
|
-
*
|
|
29
|
-
*
|
|
30
|
-
*
|
|
31
|
-
*
|
|
32
|
-
* - `ExpectedBehavior['kind']`
|
|
33
|
-
*
|
|
34
|
-
*
|
|
35
|
-
*
|
|
36
|
-
*
|
|
16
|
+
* type declarations get treated: additive changes only; where a
|
|
17
|
+
* union is extensible, it is via `(string & {})` tails (see the next
|
|
18
|
+
* section for which unions those are).
|
|
19
|
+
*
|
|
20
|
+
* ## Closed vs extensibly-closed unions
|
|
21
|
+
*
|
|
22
|
+
* Two different evolution postures coexist in this module:
|
|
23
|
+
*
|
|
24
|
+
* - `SetupStep['type']` is **closed** — exactly the directive
|
|
25
|
+
* vocabulary the shipped fixture catalog authors. An unknown or
|
|
26
|
+
* malformed directive is a fixture-authoring error the runner
|
|
27
|
+
* rejects loudly (it can never be a legitimate runtime extension
|
|
28
|
+
* point, because the catalog and the vocabulary ship together).
|
|
29
|
+
* New directives land as new union arms in a kit version bump.
|
|
30
|
+
* `TeardownStep` is the same posture with a currently-empty
|
|
31
|
+
* vocabulary.
|
|
32
|
+
* - `ExpectedBehavior['kind']` and `TransportConfig['kind']` carry a
|
|
33
|
+
* `(string & {})` tail — see SPEC §11.4 (extensibly-closed
|
|
34
|
+
* unions, e.g. `SubmitActionKind` in `@ggui-ai/protocol`). Runners
|
|
35
|
+
* that
|
|
36
|
+
* receive a behavior kind they don't recognize SHOULD skip with a
|
|
37
|
+
* warning; an unrecognized transport kind is a configuration
|
|
38
|
+
* error.
|
|
39
|
+
*
|
|
40
|
+
* Everything else — tool names, envelope field names, wire error
|
|
37
41
|
* codes — is passed verbatim and the implementation under test owns
|
|
38
42
|
* the recognition set.
|
|
39
43
|
*
|
|
@@ -51,8 +55,8 @@
|
|
|
51
55
|
* pinned here, deliberately decoupled from the live source tree. A
|
|
52
56
|
* drift check between these authored unions and the live protocol /
|
|
53
57
|
* renderer types belongs in the kit's own meta-tests, NOT in this
|
|
54
|
-
* file's import graph. If `@ggui-ai/protocol` adds a new
|
|
55
|
-
*
|
|
58
|
+
* file's import graph. If `@ggui-ai/protocol` adds a new canonical
|
|
59
|
+
* member to an extensibly-closed union tomorrow, conformance kit
|
|
56
60
|
* consumers MUST NOT be forced to recompile — their fixtures
|
|
57
61
|
* continue to reference the value they authored, and the runner's
|
|
58
62
|
* extensible `(string & {})` tail handles recognition. This mirrors
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ws-transport.d.ts","sourceRoot":"","sources":["../src/ws-transport.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ws-transport.d.ts","sourceRoot":"","sources":["../src/ws-transport.ts"],"names":[],"mappings":"AAyBA,OAAO,KAAK,EAAc,wBAAwB,EAAE,MAAM,YAAY,CAAC;AAEvE;;;;GAIG;AACH,MAAM,MAAM,aAAa,GACrB;IAAE,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC;IAAC,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;CAAE,GAC1F;IAAE,QAAQ,CAAC,IAAI,EAAE,aAAa,CAAC;IAAC,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAAC;AAEnF;;;;GAIG;AACH,MAAM,WAAW,WAAW;IAC1B,gEAAgE;IAChE,IAAI,CAAC,KAAK,EAAE,OAAO,GAAG,IAAI,CAAC;IAC3B;;;;OAIG;IACH,OAAO,CAAC,OAAO,EAAE;QACf,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;QAC3B,QAAQ,CAAC,SAAS,CAAC,EAAE,CAAC,KAAK,EAAE,aAAa,KAAK,OAAO,CAAC;KACxD,GAAG,OAAO,CAAC,SAAS,aAAa,EAAE,CAAC,CAAC;IACtC,oCAAoC;IACpC,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;CACxB;AAED;;;;GAIG;AACH,wBAAsB,eAAe,CACnC,MAAM,EAAE,wBAAwB,GAC/B,OAAO,CAAC,WAAW,CAAC,CA6FtB"}
|
package/dist/ws-transport.js
CHANGED
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
* transport is NOT a full MCP client — it does not try to be
|
|
13
13
|
* compatible with the MCP SDK, and it does not implement stack
|
|
14
14
|
* management. The kit runs against an already-provisioned render
|
|
15
|
-
* (the host's `create-
|
|
15
|
+
* (the host's `create-session` setup step ran first) and treats the
|
|
16
16
|
* wire as opaque after that.
|
|
17
17
|
*
|
|
18
18
|
* Auth:
|
|
@@ -21,6 +21,7 @@
|
|
|
21
21
|
* - `session-cookie` → `Cookie: <cookie>` header.
|
|
22
22
|
*/
|
|
23
23
|
import WebSocket from 'ws';
|
|
24
|
+
import { isRecord } from '@ggui-ai/protocol';
|
|
24
25
|
/**
|
|
25
26
|
* Open a WS transport against `config.url`, wait for the socket to
|
|
26
27
|
* reach `OPEN` state, and return the transport handle. Throws if the
|
|
@@ -121,7 +122,7 @@ function authHeaders(auth) {
|
|
|
121
122
|
function safeParse(text) {
|
|
122
123
|
try {
|
|
123
124
|
const parsed = JSON.parse(text);
|
|
124
|
-
if (
|
|
125
|
+
if (!isRecord(parsed)) {
|
|
125
126
|
return { ok: false, error: 'frame is not a JSON object' };
|
|
126
127
|
}
|
|
127
128
|
return { ok: true, value: parsed };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ggui-ai/protocol-conformance",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0-rc.0",
|
|
4
4
|
"description": "Conformance test kit for the ggui protocol. Drives a behavioral fixture catalog against a live implementation over WebSocket, plus three pure-function catalogs (schema, registration, resolution) for the gadget obligations, and reports 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": [
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
},
|
|
50
50
|
"dependencies": {
|
|
51
51
|
"ws": "^8.20.1",
|
|
52
|
-
"@ggui-ai/protocol": "0.
|
|
52
|
+
"@ggui-ai/protocol": "0.3.0-rc.0"
|
|
53
53
|
},
|
|
54
54
|
"devDependencies": {
|
|
55
55
|
"@types/node": "^22.0.0",
|
|
@@ -74,7 +74,7 @@
|
|
|
74
74
|
},
|
|
75
75
|
"author": "ggui contributors <hello@ggui.ai>",
|
|
76
76
|
"scripts": {
|
|
77
|
-
"build": "tsc -p tsconfig.build.json && node ../scripts/fix-esm-imports.mjs dist && chmod +x dist/cli.js",
|
|
77
|
+
"build": "rm -rf dist && tsc -p tsconfig.build.json && node ../scripts/fix-esm-imports.mjs dist && chmod +x dist/cli.js",
|
|
78
78
|
"dev": "tsc --watch",
|
|
79
79
|
"typecheck": "tsc --noEmit",
|
|
80
80
|
"test": "vitest run --passWithNoTests",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/fixtures/observability-events/index.ts"],"names":[],"mappings":"AAiBA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAE/C;kDACkD;AAClD,eAAO,MAAM,2BAA2B,EAAE,SAAS,QAAQ,EAG1D,CAAC"}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* `observability-events` fixture sub-module.
|
|
3
|
-
*
|
|
4
|
-
* Exercises the renderer's observability-event emission contract:
|
|
5
|
-
* every wired-action dispatch emits a `wired-tool-invoked` event;
|
|
6
|
-
* every `_ggui:contract-error` envelope emits a matching
|
|
7
|
-
* `contract-error-emitted` event.
|
|
8
|
-
*
|
|
9
|
-
* Both fixtures are `ConformanceHost`-gated — the direct
|
|
10
|
-
* postMessage-frame assertion requires a `page.exposeBinding` harness
|
|
11
|
-
* hook that the runner supplies. The effects are asserted implicitly
|
|
12
|
-
* via DOM state on the `wired-action-success` + contract-error
|
|
13
|
-
* fixtures in `wired-action-dispatch/`.
|
|
14
|
-
*/
|
|
15
|
-
import observabilityContractErrorEmitted from './observability-contract-error-emitted.json' with { type: 'json' };
|
|
16
|
-
import observabilityWiredToolInvoked from './observability-wired-tool-invoked.json' with { type: 'json' };
|
|
17
|
-
/** All fixtures asserting the observability-event contract
|
|
18
|
-
* (SPEC §"Runtime Consequence Chain" Tier 3). */
|
|
19
|
-
export const observabilityEventsFixtures = [
|
|
20
|
-
observabilityContractErrorEmitted,
|
|
21
|
-
observabilityWiredToolInvoked,
|
|
22
|
-
];
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "observability-contract-error-emitted",
|
|
3
|
-
"description": "Standalone `contract-error-emitted` observability row. Every `_ggui:contract-error` envelope the server emits on the live channel MUST be mirrored as a `contract-error-emitted` observability event for host-side inspection without requiring the host to parse live-channel frames. Asserts the mirror-emission contract directly on the observability envelope.",
|
|
4
|
-
"skipReason": null,
|
|
5
|
-
"setup": [
|
|
6
|
-
{ "type": "create-render", "renderId": "ck-obs-ce-1" },
|
|
7
|
-
{ "type": "register-tool", "toolName": "broken_tool", "handler": "throw" },
|
|
8
|
-
{ "type": "register-actionspec", "name": "triggerBroken", "tool": "broken_tool" }
|
|
9
|
-
],
|
|
10
|
-
"inputEnvelope": {
|
|
11
|
-
"type": "action",
|
|
12
|
-
"channel": 0,
|
|
13
|
-
"renderId": "ck-obs-ce-1",
|
|
14
|
-
"action": {
|
|
15
|
-
"name": "triggerBroken",
|
|
16
|
-
"data": {}
|
|
17
|
-
}
|
|
18
|
-
},
|
|
19
|
-
"expectedBehavior": {
|
|
20
|
-
"kind": "observability-event",
|
|
21
|
-
"event": {
|
|
22
|
-
"kind": "contract-error-emitted",
|
|
23
|
-
"code": "TOOL_THREW",
|
|
24
|
-
"toolName": "broken_tool",
|
|
25
|
-
"actionName": "triggerBroken"
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "observability-wired-tool-invoked",
|
|
3
|
-
"description": "Standalone `wired-tool-invoked` observability row. Distinct from `wired-action-success`'s DOM-level assertion — asserts directly on the postMessage observability envelope shape so Phase 3.1 can assert wire-byte equality without DOM observation.",
|
|
4
|
-
"skipReason": null,
|
|
5
|
-
"setup": [
|
|
6
|
-
{ "type": "create-render", "renderId": "ck-obs-wired-1" },
|
|
7
|
-
{ "type": "register-tool", "toolName": "tasks_complete", "handler": "echo" },
|
|
8
|
-
{ "type": "register-actionspec", "name": "toggleTask", "tool": "tasks_complete" }
|
|
9
|
-
],
|
|
10
|
-
"inputEnvelope": {
|
|
11
|
-
"type": "action",
|
|
12
|
-
"channel": 0,
|
|
13
|
-
"renderId": "ck-obs-wired-1",
|
|
14
|
-
"action": {
|
|
15
|
-
"name": "toggleTask",
|
|
16
|
-
"data": { "id": "seed-1" }
|
|
17
|
-
}
|
|
18
|
-
},
|
|
19
|
-
"expectedBehavior": {
|
|
20
|
-
"kind": "observability-event",
|
|
21
|
-
"event": {
|
|
22
|
-
"kind": "wired-tool-invoked",
|
|
23
|
-
"toolName": "tasks_complete",
|
|
24
|
-
"actionName": "toggleTask"
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import type { TestCase } from '../../types.js';
|
|
2
|
-
/** All fixtures asserting refresh semantics (SPEC §2.3 StreamSpec +
|
|
3
|
-
* §4.4 Envelope Specification refresh triggers). */
|
|
4
|
-
export declare const refreshSemanticsFixtures: readonly TestCase[];
|
|
5
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/fixtures/refresh-semantics/index.ts"],"names":[],"mappings":"AAeA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAE/C;qDACqD;AACrD,eAAO,MAAM,wBAAwB,EAAE,SAAS,QAAQ,EAEvD,CAAC"}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* `refresh-semantics` fixture sub-module.
|
|
3
|
-
*
|
|
4
|
-
* Exercises stream-refresh contract:
|
|
5
|
-
* - Successful action → declared `streamSpec[channel].triggers` list
|
|
6
|
-
* triggers a refresh → new stream-update observed on the channel.
|
|
7
|
-
* - Failed action → refresh does NOT fire; stream state preserved.
|
|
8
|
-
*
|
|
9
|
-
* One fixture today (`stream-refresh-success`) driving through the
|
|
10
|
-
* `todo-list` blueprint's DOM state. The direct stream-update channel
|
|
11
|
-
* assertion is `ConformanceHost`-gated pending a channel-subscription
|
|
12
|
-
* transport seam.
|
|
13
|
-
*/
|
|
14
|
-
import streamRefreshSuccess from './stream-refresh-success.json' with { type: 'json' };
|
|
15
|
-
/** All fixtures asserting refresh semantics (SPEC §2.3 StreamSpec +
|
|
16
|
-
* §4.4 Envelope Specification refresh triggers). */
|
|
17
|
-
export const refreshSemanticsFixtures = [
|
|
18
|
-
streamRefreshSuccess,
|
|
19
|
-
];
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "stream-refresh-success",
|
|
3
|
-
"description": "Happy-path refresh: a wired action succeeds, the declared `streamSpec[channel].tool` refresh tool fires, and the channel's next stream-update reflects the new snapshot. Proves the refresh-after-action contract is observable on the wire (not only on the DOM).",
|
|
4
|
-
"skipReason": null,
|
|
5
|
-
"setup": [
|
|
6
|
-
{ "type": "create-render", "renderId": "ck-refresh-success-1" },
|
|
7
|
-
{ "type": "register-tool", "toolName": "tasks_create", "handler": "echo" },
|
|
8
|
-
{ "type": "register-tool", "toolName": "tasks_list", "handler": "list-snapshot" },
|
|
9
|
-
{ "type": "register-actionspec", "name": "createTask", "tool": "tasks_create" },
|
|
10
|
-
{ "type": "register-streamspec", "channel": "tasks", "tool": "tasks_list" }
|
|
11
|
-
],
|
|
12
|
-
"inputEnvelope": {
|
|
13
|
-
"type": "action",
|
|
14
|
-
"channel": 0,
|
|
15
|
-
"renderId": "ck-refresh-success-1",
|
|
16
|
-
"action": {
|
|
17
|
-
"name": "createTask",
|
|
18
|
-
"data": { "title": "ck-refresh" }
|
|
19
|
-
}
|
|
20
|
-
},
|
|
21
|
-
"expectedBehavior": {
|
|
22
|
-
"kind": "stream-update",
|
|
23
|
-
"channel": "tasks",
|
|
24
|
-
"value": {
|
|
25
|
-
"items": []
|
|
26
|
-
}
|
|
27
|
-
},
|
|
28
|
-
"expectedObservability": [
|
|
29
|
-
{
|
|
30
|
-
"kind": "wired-tool-invoked",
|
|
31
|
-
"toolName": "tasks_create",
|
|
32
|
-
"actionName": "createTask"
|
|
33
|
-
},
|
|
34
|
-
{
|
|
35
|
-
"kind": "wired-tool-invoked",
|
|
36
|
-
"toolName": "tasks_list"
|
|
37
|
-
}
|
|
38
|
-
]
|
|
39
|
-
}
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "stream-schema-violation",
|
|
3
|
-
"description": "Refresh-stream tool returns a shape that violates the declared channel schema. `assertStreamContract` rejects the payload BEFORE fanOut, emits `_ggui:contract-error` with code SCHEMA_VIOLATION + sourceAction `refresh-stream`. Channel's previous state is preserved — subscribers never see the corruption. Matches `runtime-contract.spec.ts::schema-violation-on-refresh`.",
|
|
4
|
-
"skipReason": null,
|
|
5
|
-
"setup": [
|
|
6
|
-
{ "type": "create-render", "renderId": "ck-schema-violation-1" },
|
|
7
|
-
{ "type": "register-tool", "toolName": "tasks_list", "handler": "echo" },
|
|
8
|
-
{
|
|
9
|
-
"type": "register-tool",
|
|
10
|
-
"toolName": "tasks_malformed_list",
|
|
11
|
-
"handler": "malformed-stream"
|
|
12
|
-
},
|
|
13
|
-
{
|
|
14
|
-
"type": "register-actionspec",
|
|
15
|
-
"name": "triggerMalformedRefresh",
|
|
16
|
-
"tool": "tasks_list"
|
|
17
|
-
},
|
|
18
|
-
{
|
|
19
|
-
"type": "register-streamspec",
|
|
20
|
-
"channel": "tasks",
|
|
21
|
-
"tool": "tasks_malformed_list"
|
|
22
|
-
}
|
|
23
|
-
],
|
|
24
|
-
"inputEnvelope": {
|
|
25
|
-
"type": "action",
|
|
26
|
-
"channel": 0,
|
|
27
|
-
"renderId": "ck-schema-violation-1",
|
|
28
|
-
"action": {
|
|
29
|
-
"name": "triggerMalformedRefresh",
|
|
30
|
-
"data": {}
|
|
31
|
-
}
|
|
32
|
-
},
|
|
33
|
-
"expectedBehavior": {
|
|
34
|
-
"kind": "contract-error",
|
|
35
|
-
"code": "SCHEMA_VIOLATION",
|
|
36
|
-
"toolName": "tasks_malformed_list",
|
|
37
|
-
"sourceAction": "refresh-stream",
|
|
38
|
-
"observability": {
|
|
39
|
-
"kind": "contract-error-emitted",
|
|
40
|
-
"code": "SCHEMA_VIOLATION",
|
|
41
|
-
"toolName": "tasks_malformed_list"
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import type { TestCase } from '../../types.js';
|
|
2
|
-
/** All fixtures asserting the wired-action-dispatch contract (Contract
|
|
3
|
-
* #3 — defined failure modes on `wiredActionRouter`). */
|
|
4
|
-
export declare const wiredActionDispatchFixtures: readonly TestCase[];
|
|
5
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/fixtures/wired-action-dispatch/index.ts"],"names":[],"mappings":"AAsBA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAE/C;0DAC0D;AAC1D,eAAO,MAAM,2BAA2B,EAAE,SAAS,QAAQ,EAK1D,CAAC"}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* `wired-action-dispatch` fixture sub-module.
|
|
3
|
-
*
|
|
4
|
-
* Exercises the full `wiredActionRouter` dispatch contract — every
|
|
5
|
-
* `ContractErrorCode` failure path + the happy path:
|
|
6
|
-
* - `wired-action-success` — wired action dispatches → tool
|
|
7
|
-
* executes → observability event fires.
|
|
8
|
-
* - `wired-action-tool-not-found` — `TOOL_NOT_FOUND` error code
|
|
9
|
-
* emits on `_ggui:contract-error`.
|
|
10
|
-
* - `wired-action-tool-threw` — `TOOL_THREW` with sanitized
|
|
11
|
-
* `causedBy` in payload.
|
|
12
|
-
* - `wired-action-tool-timeout` — `TOOL_TIMEOUT` after router's
|
|
13
|
-
* configured timeout.
|
|
14
|
-
*
|
|
15
|
-
* `wired-action-success` + `wired-action-tool-threw` drive against
|
|
16
|
-
* the current harness; the other two are `ConformanceHost`-gated.
|
|
17
|
-
*/
|
|
18
|
-
import wiredActionSuccess from './wired-action-success.json' with { type: 'json' };
|
|
19
|
-
import wiredActionToolNotFound from './wired-action-tool-not-found.json' with { type: 'json' };
|
|
20
|
-
import wiredActionToolThrew from './wired-action-tool-threw.json' with { type: 'json' };
|
|
21
|
-
import wiredActionToolTimeout from './wired-action-tool-timeout.json' with { type: 'json' };
|
|
22
|
-
/** All fixtures asserting the wired-action-dispatch contract (Contract
|
|
23
|
-
* #3 — defined failure modes on `wiredActionRouter`). */
|
|
24
|
-
export const wiredActionDispatchFixtures = [
|
|
25
|
-
wiredActionSuccess,
|
|
26
|
-
wiredActionToolNotFound,
|
|
27
|
-
wiredActionToolThrew,
|
|
28
|
-
wiredActionToolTimeout,
|
|
29
|
-
];
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "wired-action-success",
|
|
3
|
-
"description": "Happy-path wired-action dispatch. A declared action tool fires, the refresh-stream tool follows, and the renderer emits a `wired-tool-invoked` observability event for each invocation. Baseline proof that the protocol's declare+wire+no-agent-code claim works end-to-end.",
|
|
4
|
-
"skipReason": null,
|
|
5
|
-
"setup": [
|
|
6
|
-
{ "type": "create-render", "renderId": "ck-wired-success-1" },
|
|
7
|
-
{ "type": "register-tool", "toolName": "tasks_complete", "handler": "echo" },
|
|
8
|
-
{ "type": "register-tool", "toolName": "tasks_list", "handler": "echo" },
|
|
9
|
-
{ "type": "register-actionspec", "name": "toggleTask", "tool": "tasks_complete" }
|
|
10
|
-
],
|
|
11
|
-
"inputEnvelope": {
|
|
12
|
-
"type": "action",
|
|
13
|
-
"channel": 0,
|
|
14
|
-
"renderId": "ck-wired-success-1",
|
|
15
|
-
"action": {
|
|
16
|
-
"name": "toggleTask",
|
|
17
|
-
"data": { "id": "seed-1" }
|
|
18
|
-
}
|
|
19
|
-
},
|
|
20
|
-
"expectedBehavior": {
|
|
21
|
-
"kind": "observability-event",
|
|
22
|
-
"event": {
|
|
23
|
-
"kind": "wired-tool-invoked",
|
|
24
|
-
"toolName": "tasks_complete",
|
|
25
|
-
"actionName": "toggleTask"
|
|
26
|
-
}
|
|
27
|
-
},
|
|
28
|
-
"expectedObservability": [
|
|
29
|
-
{
|
|
30
|
-
"kind": "wired-tool-invoked",
|
|
31
|
-
"toolName": "tasks_complete",
|
|
32
|
-
"actionName": "toggleTask"
|
|
33
|
-
}
|
|
34
|
-
]
|
|
35
|
-
}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "wired-action-tool-not-found",
|
|
3
|
-
"description": "Wired-action dispatch names an action whose declared tool is not registered on the render. The router MUST emit a `_ggui:contract-error` envelope with code TOOL_NOT_FOUND and a matching `contract-error-emitted` observability event. Render stays alive.",
|
|
4
|
-
"skipReason": null,
|
|
5
|
-
"setup": [
|
|
6
|
-
{ "type": "create-render", "renderId": "ck-tool-not-found-1" },
|
|
7
|
-
{ "type": "register-tool", "toolName": "known-tool", "handler": "echo" }
|
|
8
|
-
],
|
|
9
|
-
"inputEnvelope": {
|
|
10
|
-
"type": "action",
|
|
11
|
-
"channel": 0,
|
|
12
|
-
"renderId": "ck-tool-not-found-1",
|
|
13
|
-
"action": {
|
|
14
|
-
"name": "doesNotExist",
|
|
15
|
-
"data": {}
|
|
16
|
-
}
|
|
17
|
-
},
|
|
18
|
-
"expectedBehavior": {
|
|
19
|
-
"kind": "contract-error",
|
|
20
|
-
"code": "TOOL_NOT_FOUND",
|
|
21
|
-
"toolName": "doesNotExist",
|
|
22
|
-
"actionName": "doesNotExist",
|
|
23
|
-
"sourceAction": "wired-action",
|
|
24
|
-
"observability": {
|
|
25
|
-
"kind": "contract-error-emitted",
|
|
26
|
-
"code": "TOOL_NOT_FOUND",
|
|
27
|
-
"toolName": "doesNotExist"
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "wired-action-tool-threw",
|
|
3
|
-
"description": "Wired-action tool throws synchronously (or rejects). Router catches, emits `_ggui:contract-error` with code TOOL_THREW + sanitized causedBy. Render survives — the probe UI stays interactive. Matches `runtime-contract.spec.ts::tool-throws`.",
|
|
4
|
-
"skipReason": null,
|
|
5
|
-
"setup": [
|
|
6
|
-
{ "type": "create-render", "renderId": "ck-tool-threw-1" },
|
|
7
|
-
{ "type": "register-tool", "toolName": "tasks_broken", "handler": "throw" },
|
|
8
|
-
{ "type": "register-actionspec", "name": "triggerBroken", "tool": "tasks_broken" }
|
|
9
|
-
],
|
|
10
|
-
"inputEnvelope": {
|
|
11
|
-
"type": "action",
|
|
12
|
-
"channel": 0,
|
|
13
|
-
"renderId": "ck-tool-threw-1",
|
|
14
|
-
"action": {
|
|
15
|
-
"name": "triggerBroken",
|
|
16
|
-
"data": {}
|
|
17
|
-
}
|
|
18
|
-
},
|
|
19
|
-
"expectedBehavior": {
|
|
20
|
-
"kind": "contract-error",
|
|
21
|
-
"code": "TOOL_THREW",
|
|
22
|
-
"toolName": "tasks_broken",
|
|
23
|
-
"actionName": "triggerBroken",
|
|
24
|
-
"sourceAction": "wired-action",
|
|
25
|
-
"observability": {
|
|
26
|
-
"kind": "contract-error-emitted",
|
|
27
|
-
"code": "TOOL_THREW",
|
|
28
|
-
"toolName": "tasks_broken"
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "wired-action-tool-timeout",
|
|
3
|
-
"description": "Wired-action tool exceeds the router's configured timeout. Router emits `_ggui:contract-error` with code TOOL_TIMEOUT + sourceAction `wired-action` + a matching `contract-error-emitted` observability event. Render survives; no stream update fires.",
|
|
4
|
-
"skipReason": null,
|
|
5
|
-
"setup": [
|
|
6
|
-
{ "type": "create-render", "renderId": "ck-tool-timeout-1" },
|
|
7
|
-
{ "type": "register-tool", "toolName": "hanging_tool", "handler": "timeout" },
|
|
8
|
-
{ "type": "register-actionspec", "name": "triggerTimeout", "tool": "hanging_tool" }
|
|
9
|
-
],
|
|
10
|
-
"inputEnvelope": {
|
|
11
|
-
"type": "action",
|
|
12
|
-
"channel": 0,
|
|
13
|
-
"renderId": "ck-tool-timeout-1",
|
|
14
|
-
"action": {
|
|
15
|
-
"name": "triggerTimeout",
|
|
16
|
-
"data": {}
|
|
17
|
-
}
|
|
18
|
-
},
|
|
19
|
-
"expectedBehavior": {
|
|
20
|
-
"kind": "contract-error",
|
|
21
|
-
"code": "TOOL_TIMEOUT",
|
|
22
|
-
"toolName": "hanging_tool",
|
|
23
|
-
"actionName": "triggerTimeout",
|
|
24
|
-
"sourceAction": "wired-action",
|
|
25
|
-
"observability": {
|
|
26
|
-
"kind": "contract-error-emitted",
|
|
27
|
-
"code": "TOOL_TIMEOUT",
|
|
28
|
-
"toolName": "hanging_tool"
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
}
|