@moltzap/protocol 2026.503.3 → 2026.504.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/dist/brands.d.ts +11 -0
- package/dist/brands.d.ts.map +1 -0
- package/dist/brands.js +14 -0
- package/dist/brands.js.map +1 -0
- package/dist/helpers.d.ts +29 -26
- package/dist/helpers.d.ts.map +1 -1
- package/dist/helpers.js +34 -16
- package/dist/helpers.js.map +1 -1
- package/dist/index.d.ts +6 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +6 -3
- package/dist/index.js.map +1 -1
- package/dist/internal/ajv.d.ts +5 -0
- package/dist/internal/ajv.d.ts.map +1 -0
- package/dist/internal/ajv.js +22 -0
- package/dist/internal/ajv.js.map +1 -0
- package/dist/notification.d.ts +14 -0
- package/dist/notification.d.ts.map +1 -0
- package/dist/notification.js +11 -0
- package/dist/notification.js.map +1 -0
- package/dist/rpc-errors.d.ts +30 -0
- package/dist/rpc-errors.d.ts.map +1 -0
- package/dist/rpc-errors.js +23 -0
- package/dist/rpc-errors.js.map +1 -0
- package/dist/rpc-groups.d.ts +120 -0
- package/dist/rpc-groups.d.ts.map +1 -0
- package/dist/rpc-groups.js +131 -0
- package/dist/rpc-groups.js.map +1 -0
- package/dist/rpc-registry.d.ts +1238 -278
- package/dist/rpc-registry.d.ts.map +1 -1
- package/dist/rpc-registry.js +11 -22
- package/dist/rpc-registry.js.map +1 -1
- package/dist/rpc.d.ts +26 -5
- package/dist/rpc.d.ts.map +1 -1
- package/dist/rpc.js +21 -11
- package/dist/rpc.js.map +1 -1
- package/dist/schema/apps.d.ts +13 -23
- package/dist/schema/apps.d.ts.map +1 -1
- package/dist/schema/apps.js +2 -12
- package/dist/schema/apps.js.map +1 -1
- package/dist/schema/contacts.d.ts +6 -2
- package/dist/schema/contacts.d.ts.map +1 -1
- package/dist/schema/conversations.d.ts +15 -5
- package/dist/schema/conversations.d.ts.map +1 -1
- package/dist/schema/delivery.d.ts +9 -3
- package/dist/schema/delivery.d.ts.map +1 -1
- package/dist/schema/errors.d.ts +0 -4
- package/dist/schema/errors.d.ts.map +1 -1
- package/dist/schema/errors.js +0 -4
- package/dist/schema/errors.js.map +1 -1
- package/dist/schema/frames.d.ts +48 -51
- package/dist/schema/frames.d.ts.map +1 -1
- package/dist/schema/frames.js +28 -50
- package/dist/schema/frames.js.map +1 -1
- package/dist/schema/identity.d.ts +17 -9
- package/dist/schema/identity.d.ts.map +1 -1
- package/dist/schema/index.d.ts +3 -4
- package/dist/schema/index.d.ts.map +1 -1
- package/dist/schema/index.js +3 -4
- package/dist/schema/index.js.map +1 -1
- package/dist/schema/internal-frames.d.ts +10 -0
- package/dist/schema/internal-frames.d.ts.map +1 -0
- package/dist/schema/internal-frames.js +5 -0
- package/dist/schema/internal-frames.js.map +1 -0
- package/dist/schema/invites.d.ts +6 -2
- package/dist/schema/invites.d.ts.map +1 -1
- package/dist/schema/json-rpc.d.ts +27 -0
- package/dist/schema/json-rpc.d.ts.map +1 -0
- package/dist/schema/json-rpc.js +32 -0
- package/dist/schema/json-rpc.js.map +1 -0
- package/dist/schema/messages.d.ts +15 -5
- package/dist/schema/messages.d.ts.map +1 -1
- package/dist/schema/methods/apps.d.ts +138 -85
- package/dist/schema/methods/apps.d.ts.map +1 -1
- package/dist/schema/methods/apps.js +4 -45
- package/dist/schema/methods/apps.js.map +1 -1
- package/dist/schema/methods/auth.d.ts +62 -34
- package/dist/schema/methods/auth.d.ts.map +1 -1
- package/dist/schema/methods/contacts.d.ts +27 -9
- package/dist/schema/methods/contacts.d.ts.map +1 -1
- package/dist/schema/methods/conversations.d.ts +91 -18
- package/dist/schema/methods/conversations.d.ts.map +1 -1
- package/dist/schema/methods/conversations.js +2 -2
- package/dist/schema/methods/conversations.js.map +1 -1
- package/dist/schema/methods/messages.d.ts +39 -13
- package/dist/schema/methods/messages.d.ts.map +1 -1
- package/dist/schema/methods/presence.d.ts +6 -2
- package/dist/schema/methods/presence.d.ts.map +1 -1
- package/dist/schema/notifications.d.ts +791 -0
- package/dist/schema/notifications.d.ts.map +1 -0
- package/dist/schema/notifications.js +173 -0
- package/dist/schema/notifications.js.map +1 -0
- package/dist/schema/presence.d.ts +3 -1
- package/dist/schema/presence.d.ts.map +1 -1
- package/dist/schema/primitives.d.ts +21 -5
- package/dist/schema/primitives.d.ts.map +1 -1
- package/dist/schema/primitives.js +6 -0
- package/dist/schema/primitives.js.map +1 -1
- package/dist/test-fixtures/seed-data.d.ts +0 -1388
- package/dist/test-fixtures/seed-data.d.ts.map +1 -1
- package/dist/test-fixtures/seed-data.js +34 -990
- package/dist/test-fixtures/seed-data.js.map +1 -1
- package/dist/testing/agent-registration.d.ts +3 -1
- package/dist/testing/agent-registration.d.ts.map +1 -1
- package/dist/testing/agent-registration.js +6 -15
- package/dist/testing/agent-registration.js.map +1 -1
- package/dist/testing/arbitraries/frames.d.ts +2 -2
- package/dist/testing/arbitraries/frames.d.ts.map +1 -1
- package/dist/testing/arbitraries/frames.js +9 -7
- package/dist/testing/arbitraries/frames.js.map +1 -1
- package/dist/testing/arbitraries/from-typebox.d.ts.map +1 -1
- package/dist/testing/arbitraries/from-typebox.js +19 -10
- package/dist/testing/arbitraries/from-typebox.js.map +1 -1
- package/dist/testing/arbitraries/index.d.ts +1 -1
- package/dist/testing/arbitraries/index.d.ts.map +1 -1
- package/dist/testing/arbitraries/index.js +1 -1
- package/dist/testing/arbitraries/index.js.map +1 -1
- package/dist/testing/arbitraries/rpc.d.ts +3 -2
- package/dist/testing/arbitraries/rpc.d.ts.map +1 -1
- package/dist/testing/arbitraries/rpc.js +13 -3
- package/dist/testing/arbitraries/rpc.js.map +1 -1
- package/dist/testing/captures.d.ts.map +1 -1
- package/dist/testing/captures.js +4 -3
- package/dist/testing/captures.js.map +1 -1
- package/dist/testing/codec.d.ts +13 -11
- package/dist/testing/codec.d.ts.map +1 -1
- package/dist/testing/codec.js +43 -50
- package/dist/testing/codec.js.map +1 -1
- package/dist/testing/conformance/__divergence_proofs__/executable-proof-helpers.d.ts.map +1 -1
- package/dist/testing/conformance/__divergence_proofs__/executable-proof-helpers.js +15 -5
- package/dist/testing/conformance/__divergence_proofs__/executable-proof-helpers.js.map +1 -1
- package/dist/testing/conformance/_helpers.d.ts +12 -7
- package/dist/testing/conformance/_helpers.d.ts.map +1 -1
- package/dist/testing/conformance/_helpers.js +30 -7
- package/dist/testing/conformance/_helpers.js.map +1 -1
- package/dist/testing/conformance/adversity.d.ts.map +1 -1
- package/dist/testing/conformance/adversity.js +83 -90
- package/dist/testing/conformance/adversity.js.map +1 -1
- package/dist/testing/conformance/boundary.d.ts +1 -1
- package/dist/testing/conformance/boundary.d.ts.map +1 -1
- package/dist/testing/conformance/boundary.js +55 -50
- package/dist/testing/conformance/boundary.js.map +1 -1
- package/dist/testing/conformance/client/_fixtures.d.ts +7 -5
- package/dist/testing/conformance/client/_fixtures.d.ts.map +1 -1
- package/dist/testing/conformance/client/_fixtures.js +17 -8
- package/dist/testing/conformance/client/_fixtures.js.map +1 -1
- package/dist/testing/conformance/client/adversity.d.ts.map +1 -1
- package/dist/testing/conformance/client/adversity.js +28 -22
- package/dist/testing/conformance/client/adversity.js.map +1 -1
- package/dist/testing/conformance/client/boundary.d.ts +2 -2
- package/dist/testing/conformance/client/boundary.d.ts.map +1 -1
- package/dist/testing/conformance/client/boundary.js +19 -16
- package/dist/testing/conformance/client/boundary.js.map +1 -1
- package/dist/testing/conformance/client/delivery.d.ts +5 -5
- package/dist/testing/conformance/client/delivery.d.ts.map +1 -1
- package/dist/testing/conformance/client/delivery.js +77 -73
- package/dist/testing/conformance/client/delivery.js.map +1 -1
- package/dist/testing/conformance/client/index.d.ts +2 -2
- package/dist/testing/conformance/client/index.d.ts.map +1 -1
- package/dist/testing/conformance/client/index.js +1 -1
- package/dist/testing/conformance/client/index.js.map +1 -1
- package/dist/testing/conformance/client/rpc-semantics.d.ts.map +1 -1
- package/dist/testing/conformance/client/rpc-semantics.js +31 -37
- package/dist/testing/conformance/client/rpc-semantics.js.map +1 -1
- package/dist/testing/conformance/client/runner.d.ts +38 -32
- package/dist/testing/conformance/client/runner.d.ts.map +1 -1
- package/dist/testing/conformance/client/runner.js +36 -45
- package/dist/testing/conformance/client/runner.js.map +1 -1
- package/dist/testing/conformance/client/schema-conformance.d.ts +8 -8
- package/dist/testing/conformance/client/schema-conformance.d.ts.map +1 -1
- package/dist/testing/conformance/client/schema-conformance.js +37 -35
- package/dist/testing/conformance/client/schema-conformance.js.map +1 -1
- package/dist/testing/conformance/client/suite.d.ts.map +1 -1
- package/dist/testing/conformance/client/suite.js +4 -3
- package/dist/testing/conformance/client/suite.js.map +1 -1
- package/dist/testing/conformance/delivery.d.ts.map +1 -1
- package/dist/testing/conformance/delivery.js +127 -140
- package/dist/testing/conformance/delivery.js.map +1 -1
- package/dist/testing/conformance/dispatcher-concurrency.js +12 -12
- package/dist/testing/conformance/dispatcher-concurrency.js.map +1 -1
- package/dist/testing/conformance/env.d.ts +9 -0
- package/dist/testing/conformance/env.d.ts.map +1 -1
- package/dist/testing/conformance/env.js +16 -3
- package/dist/testing/conformance/env.js.map +1 -1
- package/dist/testing/conformance/presence.d.ts.map +1 -1
- package/dist/testing/conformance/presence.js +35 -24
- package/dist/testing/conformance/presence.js.map +1 -1
- package/dist/testing/conformance/registry.d.ts +1 -1
- package/dist/testing/conformance/registry.d.ts.map +1 -1
- package/dist/testing/conformance/registry.js +1 -1
- package/dist/testing/conformance/registry.js.map +1 -1
- package/dist/testing/conformance/rpc-semantics.d.ts +12 -12
- package/dist/testing/conformance/rpc-semantics.d.ts.map +1 -1
- package/dist/testing/conformance/rpc-semantics.js +131 -90
- package/dist/testing/conformance/rpc-semantics.js.map +1 -1
- package/dist/testing/conformance/runner.d.ts +2 -2
- package/dist/testing/conformance/runner.d.ts.map +1 -1
- package/dist/testing/conformance/runner.js +5 -10
- package/dist/testing/conformance/runner.js.map +1 -1
- package/dist/testing/conformance/schema-conformance.d.ts +3 -40
- package/dist/testing/conformance/schema-conformance.d.ts.map +1 -1
- package/dist/testing/conformance/schema-conformance.js +75 -235
- package/dist/testing/conformance/schema-conformance.js.map +1 -1
- package/dist/testing/conformance/suite.d.ts +1 -1
- package/dist/testing/conformance/suite.d.ts.map +1 -1
- package/dist/testing/conformance/suite.js +17 -18
- package/dist/testing/conformance/suite.js.map +1 -1
- package/dist/testing/index.d.ts +1 -1
- package/dist/testing/index.d.ts.map +1 -1
- package/dist/testing/models/dispatch.d.ts +5 -5
- package/dist/testing/models/dispatch.d.ts.map +1 -1
- package/dist/testing/models/dispatch.js +50 -59
- package/dist/testing/models/dispatch.js.map +1 -1
- package/dist/testing/models/state.d.ts +5 -5
- package/dist/testing/models/state.d.ts.map +1 -1
- package/dist/testing/models/state.js +14 -1
- package/dist/testing/models/state.js.map +1 -1
- package/dist/testing/test-client.d.ts +51 -40
- package/dist/testing/test-client.d.ts.map +1 -1
- package/dist/testing/test-client.js +154 -122
- package/dist/testing/test-client.js.map +1 -1
- package/dist/testing/test-server.d.ts +5 -5
- package/dist/testing/test-server.d.ts.map +1 -1
- package/dist/testing/test-server.js +11 -15
- package/dist/testing/test-server.js.map +1 -1
- package/dist/testing/toxics/client.d.ts.map +1 -1
- package/dist/testing/toxics/client.js +9 -3
- package/dist/testing/toxics/client.js.map +1 -1
- package/dist/testing/toxics/profile.d.ts.map +1 -1
- package/dist/testing/toxics/profile.js +4 -1
- package/dist/testing/toxics/profile.js.map +1 -1
- package/dist/types.d.ts +3 -5
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js.map +1 -1
- package/dist/validators.d.ts +366 -101
- package/dist/validators.d.ts.map +1 -1
- package/dist/validators.js +23 -30
- package/dist/validators.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +2 -2
- package/dist/schema/events.d.ts +0 -213
- package/dist/schema/events.d.ts.map +0 -1
- package/dist/schema/events.js +0 -122
- package/dist/schema/events.js.map +0 -1
- package/dist/schema/methods/push.d.ts +0 -21
- package/dist/schema/methods/push.d.ts.map +0 -1
- package/dist/schema/methods/push.js +0 -28
- package/dist/schema/methods/push.js.map +0 -1
- package/dist/schema/surfaces.d.ts +0 -55
- package/dist/schema/surfaces.d.ts.map +0 -1
- package/dist/schema/surfaces.js +0 -55
- package/dist/schema/surfaces.js.map +0 -1
|
@@ -31,6 +31,9 @@ import * as boundary from "./boundary.js";
|
|
|
31
31
|
import * as presence from "./presence.js";
|
|
32
32
|
import { isAllowedCoverageGap, } from "./coverage-policy.js";
|
|
33
33
|
import { conformanceArtifactDirFromEnv } from "./env.js";
|
|
34
|
+
import { AppsCreate } from "../../schema/methods/apps.js";
|
|
35
|
+
const JSON_INDENT_SPACES = 2;
|
|
36
|
+
const TOXIPROXY_NOT_PROVISIONED = "Toxiproxy client not provisioned";
|
|
34
37
|
/**
|
|
35
38
|
* Register every property against `ctx`. Consumers that want a narrower
|
|
36
39
|
* run build a `ConformanceRunContext` directly and call only the modules
|
|
@@ -39,21 +42,17 @@ import { conformanceArtifactDirFromEnv } from "./env.js";
|
|
|
39
42
|
*/
|
|
40
43
|
export function registerAllProperties(ctx) {
|
|
41
44
|
schemaConformance.registerRequestWellFormedness(ctx);
|
|
42
|
-
schemaConformance.
|
|
45
|
+
schemaConformance.registerNotificationWellFormedness(ctx);
|
|
43
46
|
schemaConformance.registerRoundTripIdentity(ctx);
|
|
44
47
|
schemaConformance.registerMalformedFrameHandling(ctx);
|
|
45
48
|
schemaConformance.registerRpcMapCoverage(ctx);
|
|
46
|
-
schemaConformance.registerS2cRequestRoundTripIdentity(ctx);
|
|
47
|
-
schemaConformance.registerS2cResponseValidation(ctx);
|
|
48
|
-
schemaConformance.registerS2cMalformedRequestHandling(ctx);
|
|
49
|
-
schemaConformance.registerDualDirectionIdCollision(ctx);
|
|
50
49
|
rpcSemantics.registerModelEquivalence(ctx);
|
|
51
50
|
rpcSemantics.registerAuthorityPositive(ctx);
|
|
52
51
|
rpcSemantics.registerAuthorityNegative(ctx);
|
|
53
52
|
rpcSemantics.registerRequestIdUniqueness(ctx);
|
|
54
53
|
rpcSemantics.registerIdempotence(ctx);
|
|
55
|
-
rpcSemantics.
|
|
56
|
-
rpcSemantics.
|
|
54
|
+
rpcSemantics.registerSpuriousAppCallbackFrameHandling(ctx);
|
|
55
|
+
rpcSemantics.registerCallerControlledAppCallbackTimeout(ctx);
|
|
57
56
|
delivery.registerFanOutCardinality(ctx);
|
|
58
57
|
delivery.registerStoreAndReplay(ctx);
|
|
59
58
|
delivery.registerPayloadOpacity(ctx);
|
|
@@ -196,7 +195,7 @@ function allowedServerCoverageGaps(toxiproxyUrl) {
|
|
|
196
195
|
{
|
|
197
196
|
kind: "unavailable",
|
|
198
197
|
id: "delivery/hook-gated-delivery",
|
|
199
|
-
reasonIncludes:
|
|
198
|
+
reasonIncludes: AppsCreate.name,
|
|
200
199
|
},
|
|
201
200
|
{
|
|
202
201
|
kind: "deferred",
|
|
@@ -206,7 +205,7 @@ function allowedServerCoverageGaps(toxiproxyUrl) {
|
|
|
206
205
|
{
|
|
207
206
|
kind: "unavailable",
|
|
208
207
|
id: "delivery/multi-app-fifo-short-circuit",
|
|
209
|
-
reasonIncludes:
|
|
208
|
+
reasonIncludes: AppsCreate.name,
|
|
210
209
|
},
|
|
211
210
|
{
|
|
212
211
|
kind: "deferred",
|
|
@@ -216,19 +215,19 @@ function allowedServerCoverageGaps(toxiproxyUrl) {
|
|
|
216
215
|
{
|
|
217
216
|
kind: "unavailable",
|
|
218
217
|
id: "boundary/app-disconnect-fail-policy",
|
|
219
|
-
reasonIncludes:
|
|
218
|
+
reasonIncludes: AppsCreate.name,
|
|
220
219
|
},
|
|
221
220
|
{
|
|
222
221
|
kind: "deferred",
|
|
223
222
|
id: "boundary/app-disconnect-fail-policy",
|
|
224
223
|
reasonIncludes: "B.9",
|
|
225
224
|
},
|
|
226
|
-
// Spurious
|
|
225
|
+
// Spurious appCallback frame handling needs a wire-level injection seam
|
|
227
226
|
// TestClient does not expose; tombstoned to B.9 (#318) where the
|
|
228
227
|
// server-side fault-injection path is reachable.
|
|
229
228
|
{
|
|
230
229
|
kind: "deferred",
|
|
231
|
-
id: "rpc-semantics/spurious-
|
|
230
|
+
id: "rpc-semantics/spurious-app-callback-frame-handling",
|
|
232
231
|
reasonIncludes: "B.9",
|
|
233
232
|
},
|
|
234
233
|
];
|
|
@@ -236,23 +235,23 @@ function allowedServerCoverageGaps(toxiproxyUrl) {
|
|
|
236
235
|
gaps.push({
|
|
237
236
|
kind: "unavailable",
|
|
238
237
|
id: "adversity/latency-resilience",
|
|
239
|
-
reasonIncludes:
|
|
238
|
+
reasonIncludes: TOXIPROXY_NOT_PROVISIONED,
|
|
240
239
|
}, {
|
|
241
240
|
kind: "unavailable",
|
|
242
241
|
id: "adversity/slicer-framing",
|
|
243
|
-
reasonIncludes:
|
|
242
|
+
reasonIncludes: TOXIPROXY_NOT_PROVISIONED,
|
|
244
243
|
}, {
|
|
245
244
|
kind: "unavailable",
|
|
246
245
|
id: "adversity/reset-peer-recovery",
|
|
247
|
-
reasonIncludes:
|
|
246
|
+
reasonIncludes: TOXIPROXY_NOT_PROVISIONED,
|
|
248
247
|
}, {
|
|
249
248
|
kind: "unavailable",
|
|
250
249
|
id: "adversity/timeout-surface",
|
|
251
|
-
reasonIncludes:
|
|
250
|
+
reasonIncludes: TOXIPROXY_NOT_PROVISIONED,
|
|
252
251
|
}, {
|
|
253
252
|
kind: "unavailable",
|
|
254
253
|
id: "adversity/slow-close-cleanup",
|
|
255
|
-
reasonIncludes:
|
|
254
|
+
reasonIncludes: TOXIPROXY_NOT_PROVISIONED,
|
|
256
255
|
});
|
|
257
256
|
}
|
|
258
257
|
return gaps;
|
|
@@ -292,6 +291,6 @@ function writeArtifact(dir, property, seed, payload) {
|
|
|
292
291
|
name: property.name,
|
|
293
292
|
seed,
|
|
294
293
|
...payload,
|
|
295
|
-
}, null,
|
|
294
|
+
}, null, JSON_INDENT_SPACES));
|
|
296
295
|
}
|
|
297
296
|
//# sourceMappingURL=suite.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"suite.js","sourceRoot":"","sources":["../../../src/testing/conformance/suite.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAC5D,OAAO,EAAE,aAAa,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAC/D,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EACL,iBAAiB,GAIlB,MAAM,aAAa,CAAC;AACrB,OAAO,EACL,iBAAiB,GAGlB,MAAM,eAAe,CAAC;AACvB,OAAO,KAAK,iBAAiB,MAAM,yBAAyB,CAAC;AAC7D,OAAO,KAAK,YAAY,MAAM,oBAAoB,CAAC;AACnD,OAAO,KAAK,QAAQ,MAAM,eAAe,CAAC;AAC1C,OAAO,KAAK,SAAS,MAAM,gBAAgB,CAAC;AAC5C,OAAO,KAAK,QAAQ,MAAM,eAAe,CAAC;AAC1C,OAAO,KAAK,QAAQ,MAAM,eAAe,CAAC;AAE1C,OAAO,EACL,oBAAoB,GAErB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,6BAA6B,EAAE,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"suite.js","sourceRoot":"","sources":["../../../src/testing/conformance/suite.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAC5D,OAAO,EAAE,aAAa,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAC/D,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EACL,iBAAiB,GAIlB,MAAM,aAAa,CAAC;AACrB,OAAO,EAC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AG,EAAE,OAAO,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,MAAM,EAAE,CAAC;QACvD,KAAK,6BAA6B;YAChC,OAAO,EAAE,GAAG,EAAE,OAAO,CAAC,IAAI,EAAE,QAAQ,EAAE,OAAO,CAAC,QAAQ,EAAE,CAAC;QAC3D,OAAO,CAAC,CAAC,CAAC;YACR,MAAM,WAAW,GAAU,OAAO,CAAC;YACnC,OAAO,EAAE,GAAG,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,CAAC,WAAW,CAAC,EAAE,CAAC;QACxD,CAAC;IACH,CAAC;AACH,CAAC;AAED,SAAS,aAAa,CACpB,GAAW,EACX,QAA4B,EAC5B,IAAY,EACZ,OAAgC;IAEhC,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,CACpB,GAAG,EACH,GAAG,QAAQ,CAAC,QAAQ,IAAI,QAAQ,CAAC,IAAI,YAAY,CAClD,CAAC;IACF,aAAa,CACX,IAAI,EACJ,IAAI,CAAC,SAAS,CACZ;QACE,QAAQ,EAAE,QAAQ,CAAC,QAAQ;QAC3B,IAAI,EAAE,QAAQ,CAAC,IAAI;QACnB,IAAI;QACJ,GAAG,OAAO;KACX,EACD,IAAI,EACJ,kBAAkB,CACnB,CACF,CAAC;AACJ,CAAC"}
|
package/dist/testing/index.d.ts
CHANGED
|
@@ -19,7 +19,7 @@ export * as toxics from "./toxics/index.js";
|
|
|
19
19
|
export { type ConformanceArtifact, type ConformanceRunContext, type ConformanceRunOptions, type ConformanceSuiteOptions, type PropertyCategory, type PropertyFailure, type PropertyRun, type RealServerHandle, type RegisteredProperty, type SuiteResult, PropertyAssertionFailure, PropertyDeferred, PropertyInvariantViolation, PropertyUnavailable, acquireRunContext, assertProperty, collectProperties, registerAllProperties, registerProperty, runAllProperties, runConformance, runConformanceSuite, } from "./conformance/index.js";
|
|
20
20
|
export * as conformance from "./conformance/index.js";
|
|
21
21
|
export * as clientConformance from "./conformance/client/index.js";
|
|
22
|
-
export type { ClientConformanceRunContext, ClientConformanceRunOptions,
|
|
22
|
+
export type { ClientConformanceRunContext, ClientConformanceRunOptions, ObservedNotification, RealClientCloseEvent, RealClientNotificationFilter, RealClientNotificationSubscriber, RealClientFactoryArgs, RealClientHandle, RealClientRpcCaller, RealClientSubscription, } from "./conformance/client/runner.js";
|
|
23
23
|
export { RealClientLifecycleError, RealClientRpcError, } from "./conformance/client/runner.js";
|
|
24
24
|
export type { ClientConformanceSuiteOptions, JointConformanceSuiteOptions, } from "./conformance/client/suite.js";
|
|
25
25
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/testing/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAGH,OAAO,EACL,KAAK,mBAAmB,EACxB,KAAK,UAAU,EACf,KAAK,gBAAgB,EACrB,uBAAuB,EACvB,cAAc,GACf,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EACL,KAAK,UAAU,EACf,KAAK,gBAAgB,EACrB,KAAK,oBAAoB,EACzB,cAAc,GACf,MAAM,kBAAkB,CAAC;AAG1B,OAAO,EACL,KAAK,aAAa,EAClB,KAAK,aAAa,EAClB,KAAK,WAAW,EAChB,iBAAiB,EACjB,aAAa,EACb,WAAW,EACX,eAAe,GAChB,MAAM,eAAe,CAAC;AACvB,OAAO,EACL,KAAK,QAAQ,EACb,KAAK,kBAAkB,EACvB,WAAW,EACX,WAAW,EACX,YAAY,GACb,MAAM,YAAY,CAAC;AAGpB,OAAO,EACL,KAAK,YAAY,EACjB,oBAAoB,EACpB,gBAAgB,EAChB,gBAAgB,EAChB,eAAe,EACf,gBAAgB,EAChB,iBAAiB,EACjB,sBAAsB,GACvB,MAAM,aAAa,CAAC;AAGrB,OAAO,EACL,KAAK,SAAS,EACd,sBAAsB,EACtB,iBAAiB,GAClB,MAAM,yBAAyB,CAAC;AAGjC,OAAO,KAAK,WAAW,MAAM,wBAAwB,CAAC;AACtD,OAAO,KAAK,MAAM,MAAM,mBAAmB,CAAC;AAC5C,OAAO,KAAK,MAAM,MAAM,mBAAmB,CAAC;AAK5C,OAAO,EACL,KAAK,mBAAmB,EACxB,KAAK,qBAAqB,EAC1B,KAAK,qBAAqB,EAC1B,KAAK,uBAAuB,EAC5B,KAAK,gBAAgB,EACrB,KAAK,eAAe,EACpB,KAAK,WAAW,EAChB,KAAK,gBAAgB,EACrB,KAAK,kBAAkB,EACvB,KAAK,WAAW,EAChB,wBAAwB,EACxB,gBAAgB,EAChB,0BAA0B,EAC1B,mBAAmB,EACnB,iBAAiB,EACjB,cAAc,EACd,iBAAiB,EACjB,qBAAqB,EACrB,gBAAgB,EAChB,gBAAgB,EAChB,cAAc,EACd,mBAAmB,GACpB,MAAM,wBAAwB,CAAC;AAIhC,OAAO,KAAK,WAAW,MAAM,wBAAwB,CAAC;AAMtD,OAAO,KAAK,iBAAiB,MAAM,+BAA+B,CAAC;AAKnE,YAAY,EACV,2BAA2B,EAC3B,2BAA2B,EAC3B,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/testing/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAGH,OAAO,EACL,KAAK,mBAAmB,EACxB,KAAK,UAAU,EACf,KAAK,gBAAgB,EACrB,uBAAuB,EACvB,cAAc,GACf,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EACL,KAAK,UAAU,EACf,KAAK,gBAAgB,EACrB,KAAK,oBAAoB,EACzB,cAAc,GACf,MAAM,kBAAkB,CAAC;AAG1B,OAAO,EACL,KAAK,aAAa,EAClB,KAAK,aAAa,EAClB,KAAK,WAAW,EAChB,iBAAiB,EACjB,aAAa,EACb,WAAW,EACX,eAAe,GAChB,MAAM,eAAe,CAAC;AACvB,OAAO,EACL,KAAK,QAAQ,EACb,KAAK,kBAAkB,EACvB,WAAW,EACX,WAAW,EACX,YAAY,GACb,MAAM,YAAY,CAAC;AAGpB,OAAO,EACL,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ags an unhandled method name if
|
|
11
11
|
* `rpcMethods` grows without the model being updated.
|
|
12
12
|
*/
|
|
13
|
-
import type {
|
|
14
|
-
import type {
|
|
13
|
+
import type { RpcMethodName, RpcResult } from "../../rpc-registry.js";
|
|
14
|
+
import type { NotificationFrame } from "../../schema/frames.js";
|
|
15
15
|
import type { ArbitraryRpcCall } from "../arbitraries/rpc.js";
|
|
16
16
|
import { type ReferenceState } from "./state.js";
|
|
17
17
|
/**
|
|
@@ -22,13 +22,13 @@ import { type ReferenceState } from "./state.js";
|
|
|
22
22
|
*/
|
|
23
23
|
export type RpcModelResult<M extends RpcMethodName = RpcMethodName> = {
|
|
24
24
|
readonly _tag: "ok";
|
|
25
|
-
readonly result:
|
|
26
|
-
readonly events: ReadonlyArray<
|
|
25
|
+
readonly result: RpcResult<M>;
|
|
26
|
+
readonly events: ReadonlyArray<NotificationFrame>;
|
|
27
27
|
} | {
|
|
28
28
|
readonly _tag: "error";
|
|
29
29
|
readonly code: number;
|
|
30
30
|
readonly message: string;
|
|
31
|
-
readonly events: ReadonlyArray<
|
|
31
|
+
readonly events: ReadonlyArray<NotificationFrame>;
|
|
32
32
|
};
|
|
33
33
|
export declare function isIdempotent(method: RpcMethodName): boolean;
|
|
34
34
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dispatch.d.ts","sourceRoot":"","sources":["../../../src/testing/models/dispatch.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"dispatch.d.ts","sourceRoot":"","sources":["../../../src/testing/models/dispatch.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,OAAO,KAAK,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AACtE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAEhE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAC9D,OAAO,EAAU,KAAK,cAAc,EAAE,MAAM,YAAY,CAAC;AA4CzD;;;;;GAKG;AACH,MAAM,MAAM,cAAc,CAAC,CAAC,SAAS,aAAa,GAAG,aAAa,IAC9D;IACE,QAAQ,CAAC,IAAI,EAAE,IAAI,CAAC;IACpB,QAAQ,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC,CAAC,CAAC;IAC9B,QAAQ,CAAC,MAAM,EAAE,aAAa,CAAC,iBAAiB,CAAC,CAAC;CACnD,GACD;IACE,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC;IACvB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,MAAM,EAAE,aAAa,CAAC,iBAAiB,CAAC,CAAC;CACnD,CAAC;AAuBN,wBAAgB,YAAY,CAAC,MAAM,EAAE,aAAa,GAAG,OAAO,CAE3D;AAED;;;;;;;;;GASG;AACH,wBAAgB,oBAAoB,CAClC,KAAK,EAAE,cAAc,EACrB,IAAI,EAAE,gBAAgB,EACtB,OAAO,EAAE,MAAM,GACd,OAAO,GAAG,sBAAsB,GAAG,gBAAgB,CAcrD;AAiBD;;;;;;;;;;;GAWG;AACH,wBAAgB,SAAS,CAAC,CAAC,SAAS,aAAa,EAC/C,KAAK,EAAE,cAAc,EACrB,IAAI,EAAE,gBAAgB,CAAC,CAAC,CAAC,GACxB;IAAE,QAAQ,CAAC,IAAI,EAAE,cAAc,CAAC;IAAC,QAAQ,CAAC,OAAO,EAAE,cAAc,CAAC,CAAC,CAAC,CAAA;CAAE,CA4HxE"}
|
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
import { ErrorCodes } from "../../schema/errors.js";
|
|
2
2
|
import { mkTick } from "./state.js";
|
|
3
|
+
import { AgentsList, AgentsLookup, AgentsLookupByName, Connect, InviteAgent, Register, SelectAgent, } from "../../schema/methods/auth.js";
|
|
4
|
+
import { AppsAttachConversation, AppsAuthorizeDispatch, AppsCloseSession, AppsCreate, AppsGetSession, AppsListSessions, } from "../../schema/methods/apps.js";
|
|
5
|
+
import { ContactsAccept, ContactsAdd, ContactsList, } from "../../schema/methods/contacts.js";
|
|
6
|
+
import { ConversationsAddParticipant, ConversationsArchive, ConversationsCreate, ConversationsGet, ConversationsLeave, ConversationsList, ConversationsMute, ConversationsRemoveParticipant, ConversationsUnarchive, ConversationsUnmute, ConversationsUpdate, } from "../../schema/methods/conversations.js";
|
|
7
|
+
import { InvitesCreateAgent } from "../../schema/methods/invites.js";
|
|
8
|
+
import { MessagesList, MessagesSend } from "../../schema/methods/messages.js";
|
|
9
|
+
import { PresenceSubscribe, PresenceUpdate, } from "../../schema/methods/presence.js";
|
|
3
10
|
// `ErrorCodes` is re-used from `../../schema/errors.ts` so the model and
|
|
4
11
|
// the server share one source of truth for code values.
|
|
5
12
|
/**
|
|
@@ -8,18 +15,16 @@ import { mkTick } from "./state.js";
|
|
|
8
15
|
* against the real server.
|
|
9
16
|
*/
|
|
10
17
|
const IDEMPOTENT_METHODS = new Set([
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
"permissions/list",
|
|
22
|
-
"surface/get",
|
|
18
|
+
AgentsLookup.name,
|
|
19
|
+
AgentsLookupByName.name,
|
|
20
|
+
AgentsList.name,
|
|
21
|
+
ConversationsList.name,
|
|
22
|
+
ConversationsGet.name,
|
|
23
|
+
MessagesList.name,
|
|
24
|
+
ContactsList.name,
|
|
25
|
+
PresenceSubscribe.name,
|
|
26
|
+
AppsListSessions.name,
|
|
27
|
+
AppsGetSession.name,
|
|
23
28
|
]);
|
|
24
29
|
export function isIdempotent(method) {
|
|
25
30
|
return IDEMPOTENT_METHODS.has(method);
|
|
@@ -36,7 +41,7 @@ export function isIdempotent(method) {
|
|
|
36
41
|
*/
|
|
37
42
|
export function authorizationOutcome(state, call, agentId) {
|
|
38
43
|
// `connect` + `register` establish identity; pre-identity they are always allowed.
|
|
39
|
-
if (call.method ===
|
|
44
|
+
if (call.method === Connect.name || call.method === Register.name)
|
|
40
45
|
return "allow";
|
|
41
46
|
if (!state.agents.has(agentId))
|
|
42
47
|
return "deny-unauthenticated";
|
|
@@ -106,17 +111,17 @@ export function applyCall(state, call) {
|
|
|
106
111
|
const m = call.method;
|
|
107
112
|
switch (m) {
|
|
108
113
|
// Auth — model isn't sure what auth shape the caller has.
|
|
109
|
-
case
|
|
110
|
-
case
|
|
111
|
-
case
|
|
112
|
-
case
|
|
114
|
+
case Connect.name:
|
|
115
|
+
case Register.name:
|
|
116
|
+
case InviteAgent.name:
|
|
117
|
+
case SelectAgent.name:
|
|
113
118
|
return { next: baseNext, outcome: uncertainError() };
|
|
114
119
|
// Agents list-shaped — honest "ok" for a fresh authenticated agent.
|
|
115
|
-
case
|
|
120
|
+
case AgentsList.name:
|
|
116
121
|
return { next: baseNext, outcome: allowNoEvents() };
|
|
117
122
|
// Agents lookup-shaped — need a target; uncertain.
|
|
118
|
-
case
|
|
119
|
-
case
|
|
123
|
+
case AgentsLookup.name:
|
|
124
|
+
case AgentsLookupByName.name:
|
|
120
125
|
return { next: baseNext, outcome: uncertainError() };
|
|
121
126
|
// Conversations list — NOT oracle-confident across arbitrary
|
|
122
127
|
// params. Round-8 finding (architect-197 §2.2 literal-probe
|
|
@@ -127,58 +132,44 @@ export function applyCall(state, call) {
|
|
|
127
132
|
// to `uncertainError`; K=1 today (agents/list only). Widening
|
|
128
133
|
// K requires either per-method param filters at the arbitrary
|
|
129
134
|
// layer OR a server-side cursor-parse fix; tracked under #186.
|
|
130
|
-
case
|
|
135
|
+
case ConversationsList.name:
|
|
131
136
|
return { next: baseNext, outcome: uncertainError() };
|
|
132
137
|
// Conversations with required fields or state — uncertain.
|
|
133
|
-
case
|
|
134
|
-
case
|
|
135
|
-
case
|
|
136
|
-
case
|
|
137
|
-
case
|
|
138
|
-
case
|
|
139
|
-
case
|
|
140
|
-
case
|
|
141
|
-
case
|
|
142
|
-
case
|
|
138
|
+
case ConversationsCreate.name:
|
|
139
|
+
case ConversationsGet.name:
|
|
140
|
+
case ConversationsUpdate.name:
|
|
141
|
+
case ConversationsMute.name:
|
|
142
|
+
case ConversationsUnmute.name:
|
|
143
|
+
case ConversationsAddParticipant.name:
|
|
144
|
+
case ConversationsRemoveParticipant.name:
|
|
145
|
+
case ConversationsLeave.name:
|
|
146
|
+
case ConversationsArchive.name:
|
|
147
|
+
case ConversationsUnarchive.name:
|
|
143
148
|
return { next: baseNext, outcome: uncertainError() };
|
|
144
149
|
// Messages — both require a valid conversationId. Uncertain.
|
|
145
|
-
case
|
|
146
|
-
case
|
|
150
|
+
case MessagesSend.name:
|
|
151
|
+
case MessagesList.name:
|
|
147
152
|
return { next: baseNext, outcome: uncertainError() };
|
|
148
153
|
// Contacts list — requires user context for a fresh agent, so
|
|
149
154
|
// server returns an error. Uncertain.
|
|
150
|
-
case
|
|
151
|
-
case
|
|
152
|
-
case
|
|
155
|
+
case ContactsList.name:
|
|
156
|
+
case ContactsAdd.name:
|
|
157
|
+
case ContactsAccept.name:
|
|
153
158
|
return { next: baseNext, outcome: uncertainError() };
|
|
154
159
|
// Invites — requires state. Uncertain.
|
|
155
|
-
case
|
|
160
|
+
case InvitesCreateAgent.name:
|
|
156
161
|
return { next: baseNext, outcome: uncertainError() };
|
|
157
162
|
// Presence — state-dependent. Uncertain.
|
|
158
|
-
case
|
|
159
|
-
case
|
|
160
|
-
return { next: baseNext, outcome: uncertainError() };
|
|
161
|
-
// Push — requires endpoint registration. Uncertain.
|
|
162
|
-
case "push/register":
|
|
163
|
-
case "push/unregister":
|
|
163
|
+
case PresenceUpdate.name:
|
|
164
|
+
case PresenceSubscribe.name:
|
|
164
165
|
return { next: baseNext, outcome: uncertainError() };
|
|
165
166
|
// Apps — require app/user context the fresh agent doesn't have.
|
|
166
|
-
case
|
|
167
|
-
case
|
|
168
|
-
case
|
|
169
|
-
case
|
|
170
|
-
case
|
|
171
|
-
case
|
|
172
|
-
case "apps/getSession":
|
|
173
|
-
case "apps/listSessions":
|
|
174
|
-
case "apps/authorizeDispatch":
|
|
175
|
-
case "apps/attachConversation":
|
|
176
|
-
return { next: baseNext, outcome: uncertainError() };
|
|
177
|
-
// Surfaces — require surface/app context. Uncertain.
|
|
178
|
-
case "surface/update":
|
|
179
|
-
case "surface/get":
|
|
180
|
-
case "surface/action":
|
|
181
|
-
case "surface/clear":
|
|
167
|
+
case AppsCreate.name:
|
|
168
|
+
case AppsCloseSession.name:
|
|
169
|
+
case AppsGetSession.name:
|
|
170
|
+
case AppsListSessions.name:
|
|
171
|
+
case AppsAuthorizeDispatch.name:
|
|
172
|
+
case AppsAttachConversation.name:
|
|
182
173
|
return { next: baseNext, outcome: uncertainError() };
|
|
183
174
|
default: {
|
|
184
175
|
// Exhaustiveness check — any new RpcMethodName breaks the build here
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dispatch.js","sourceRoot":"","sources":["../../../src/testing/models/dispatch.ts"],"names":[],"mappings":"AAcA,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAEpD,OAAO,EAAE,MAAM,EAAuB,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"dispatch.js","sourceRoot":"","sources":["../../../src/testing/models/dispatch.ts"],"names":[],"mappings":"AAcA,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAEpD,OAAO,EAAE,MAAM,EAAuB,MAAM,YAAY,CAAC;AAEzD,OAAO,EACL,UAAU,EACV,YAAY,EACZ,kBAAkB,EAClB,OAAO,EACP,WAAW,EACX,QAAQ,EACR,WAAW,GACZ,MAAM,8BAA8B,CAAC;AACtC,OAAO,EACL,sBAAsB,EACtB,qBAAqB,EACrB,gBAAgB,EAChB,UAAU,EACV,cAAc,EACd,gBAAgB,GACjB,MAAM,8BAA8B,CAAC;AACtC,OAA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,IAAI,CAAC;QAC3B,KAAK,qBAAqB,CAAC,IAAI,CAAC;QAChC,KAAK,sBAAsB,CAAC,IAAI;YAC9B,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,cAAc,EAAE,EAAE,CAAC;QAEvD,OAAO,CAAC,CAAC,CAAC;YACR,qEAAqE;YACrE,2BAA2B;YAC3B,MAAM,WAAW,GAAG,CAAU,CAAC;YAC/B,OAAO;gBACL,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE;oBACP,IAAI,EAAE,OAAO;oBACb,IAAI,EAAE,UAAU,CAAC,aAAa;oBAC9B,OAAO,EAAE,2BAA2B,MAAM,CAAC,WAAW,CAAC,EAAE;oBACzD,MAAM,EAAE,EAAE;iBACX;aACF,CAAC;QACJ,CAAC;IACH,CAAC;AACH,CAAC"}
|
|
@@ -9,12 +9,12 @@
|
|
|
9
9
|
* Shape: a pure data record keyed by agent id + conversation id. No fibers,
|
|
10
10
|
* no network, no clocks — all actions are total functions.
|
|
11
11
|
*/
|
|
12
|
+
import { Brand } from "effect";
|
|
12
13
|
import type { Agent, Conversation, Message } from "../../types.js";
|
|
13
|
-
import type {
|
|
14
|
+
import type { NotificationFrame } from "../../schema/frames.js";
|
|
14
15
|
/** Monotonic logical clock — the model does not read wall time. */
|
|
15
|
-
export type LogicalTick = number &
|
|
16
|
-
|
|
17
|
-
};
|
|
16
|
+
export type LogicalTick = number & Brand.Brand<"LogicalTick">;
|
|
17
|
+
export declare const LogicalTick: Brand.Brand.Constructor<LogicalTick>;
|
|
18
18
|
/** Construct a `LogicalTick` from a raw number. Only call in this module. */
|
|
19
19
|
export declare function mkTick(n: number): LogicalTick;
|
|
20
20
|
/** Every kind of entity the model tracks. */
|
|
@@ -27,7 +27,7 @@ export interface ReferenceState {
|
|
|
27
27
|
/** Messages per conversation, append-only, ordered. */
|
|
28
28
|
readonly messages: ReadonlyMap<string, ReadonlyArray<Message>>;
|
|
29
29
|
/** Per-agent outbox of events the model predicts the server will emit. */
|
|
30
|
-
readonly pendingEvents: ReadonlyMap<string, ReadonlyArray<
|
|
30
|
+
readonly pendingEvents: ReadonlyMap<string, ReadonlyArray<NotificationFrame>>;
|
|
31
31
|
/** Authorization table — (agentId, conversationId) → role. */
|
|
32
32
|
readonly authz: ReadonlyMap<string, ReadonlyMap<string, "owner" | "participant" | "denied">>;
|
|
33
33
|
/** Request-ids the model has observed, for uniqueness assertions (B4). */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"state.d.ts","sourceRoot":"","sources":["../../../src/testing/models/state.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,OAAO,KAAK,EAAE,KAAK,EAAE,YAAY,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AACnE,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"state.d.ts","sourceRoot":"","sources":["../../../src/testing/models/state.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,OAAO,EAAE,KAAK,EAAE,MAAM,QAAQ,CAAC;AAC/B,OAAO,KAAK,EAAE,KAAK,EAAE,YAAY,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AACnE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAEhE,mEAAmE;AACnE,MAAM,MAAM,WAAW,GAAG,MAAM,GAAG,KAAK,CAAC,KAAK,CAAC,aAAa,CAAC,CAAC;AAC9D,eAAO,MAAM,WAAW,sCAA+B,CAAC;AAExD,6EAA6E;AAC7E,wBAAgB,MAAM,CAAC,CAAC,EAAE,MAAM,GAAG,WAAW,CAE7C;AAED,6CAA6C;AAC7C,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,IAAI,EAAE,WAAW,CAAC;IAC3B,6CAA6C;IAC7C,QAAQ,CAAC,MAAM,EAAE,WAAW,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;IAC5C,gDAAgD;IAChD,QAAQ,CAAC,aAAa,EAAE,WAAW,CAAC,MAAM,EAAE,YAAY,CAAC,CAAC;IAC1D,uDAAuD;IACvD,QAAQ,CAAC,QAAQ,EAAE,WAAW,CAAC,MAAM,EAAE,aAAa,CAAC,OAAO,CAAC,CAAC,CAAC;IAC/D,0EAA0E;IAC1E,QAAQ,CAAC,aAAa,EAAE,WAAW,CAAC,MAAM,EAAE,aAAa,CAAC,iBAAiB,CAAC,CAAC,CAAC;IAC9E,8DAA8D;IAC9D,QAAQ,CAAC,KAAK,EAAE,WAAW,CACzB,MAAM,EACN,WAAW,CAAC,MAAM,EAAE,OAAO,GAAG,aAAa,GAAG,QAAQ,CAAC,CACxD,CAAC;IACF,0EAA0E;IAC1E,QAAQ,CAAC,cAAc,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;CAC9C;AAED,eAAO,MAAM,qBAAqB,EAAE,cAQnC,CAAC"}
|
|
@@ -1,6 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Reference-model state types.
|
|
3
|
+
*
|
|
4
|
+
* Per Invariant I5 and AC4, the reference model is the contract: its
|
|
5
|
+
* reducer-derived next-state and its predicted event trace are compared
|
|
6
|
+
* against the real server's observable behavior (Tier B). Divergence
|
|
7
|
+
* shrinks to the offending `ArbitraryRpcCall`.
|
|
8
|
+
*
|
|
9
|
+
* Shape: a pure data record keyed by agent id + conversation id. No fibers,
|
|
10
|
+
* no network, no clocks — all actions are total functions.
|
|
11
|
+
*/
|
|
12
|
+
import { Brand } from "effect";
|
|
13
|
+
export const LogicalTick = Brand.nominal();
|
|
1
14
|
/** Construct a `LogicalTick` from a raw number. Only call in this module. */
|
|
2
15
|
export function mkTick(n) {
|
|
3
|
-
return n;
|
|
16
|
+
return LogicalTick(n);
|
|
4
17
|
}
|
|
5
18
|
export const initialReferenceState = {
|
|
6
19
|
tick: mkTick(0),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"state.js","sourceRoot":"","sources":["../../../src/testing/models/state.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"state.js","sourceRoot":"","sources":["../../../src/testing/models/state.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,OAAO,EAAE,KAAK,EAAE,MAAM,QAAQ,CAAC;AAM/B,MAAM,CAAC,MAAM,WAAW,GAAG,KAAK,CAAC,OAAO,EAAe,CAAC;AAExD,6EAA6E;AAC7E,MAAM,UAAU,MAAM,CAAC,CAAS;IAC9B,OAAO,WAAW,CAAC,CAAC,CAAC,CAAC;AACxB,CAAC;AAsBD,MAAM,CAAC,MAAM,qBAAqB,GAAmB;IACnD,IAAI,EAAE,MAAM,CAAC,CAAC,CAAC;IACf,MAAM,EAAE,IAAI,GAAG,EAAE;IACjB,aAAa,EAAE,IAAI,GAAG,EAAE;IACxB,QAAQ,EAAE,IAAI,GAAG,EAAE;IACnB,aAAa,EAAE,IAAI,GAAG,EAAE;IACxB,KAAK,EAAE,IAAI,GAAG,EAAE;IAChB,cAAc,EAAE,IAAI,GAAG,EAAE;CAC1B,CAAC"}
|
|
@@ -9,9 +9,14 @@
|
|
|
9
9
|
*
|
|
10
10
|
* Satisfies AC2. Consumed by Tier A / B / C / D / E properties.
|
|
11
11
|
*/
|
|
12
|
-
import { Context, Effect, Scope, Stream } from "effect";
|
|
13
|
-
import type {
|
|
14
|
-
import type
|
|
12
|
+
import { Cause, Context, Effect, Scope, Stream } from "effect";
|
|
13
|
+
import type { AnyAppCallbackRpcDefinition, AnyRpcDefinition } from "../rpc-registry.js";
|
|
14
|
+
import { type ParamsOf, type ResultOf } from "../rpc.js";
|
|
15
|
+
import { type DecodedNotification } from "../rpc-groups.js";
|
|
16
|
+
import { type JsonRpcStringId } from "../schema/json-rpc.js";
|
|
17
|
+
import type { AnyNotificationDefinition } from "../schema/notifications.js";
|
|
18
|
+
import type { Static } from "@sinclair/typebox";
|
|
19
|
+
import { AgentId } from "../schema/primitives.js";
|
|
15
20
|
import { type CapturedFrame, type CaptureBuffer } from "./captures.js";
|
|
16
21
|
import { type MalformedFrameKind } from "./codec.js";
|
|
17
22
|
import { FrameSchemaError, RpcResponseError, RpcTimeoutError, TransportClosedError, TransportIoError } from "./errors.js";
|
|
@@ -23,7 +28,7 @@ import { FrameSchemaError, RpcResponseError, RpcTimeoutError, TransportClosedErr
|
|
|
23
28
|
export interface TestClientConfig {
|
|
24
29
|
readonly serverUrl: string;
|
|
25
30
|
readonly agentKey: string;
|
|
26
|
-
readonly agentId:
|
|
31
|
+
readonly agentId: Static<typeof AgentId>;
|
|
27
32
|
readonly defaultTimeoutMs: number;
|
|
28
33
|
/** Soft cap on captured frames before the ring buffer drops oldest. */
|
|
29
34
|
readonly captureCapacity: number;
|
|
@@ -41,23 +46,24 @@ export interface TestClientConfig {
|
|
|
41
46
|
* them inside `Effect.forEach` / `fc.asyncProperty`.
|
|
42
47
|
*/
|
|
43
48
|
export interface TestClient {
|
|
44
|
-
readonly sendRpc: <
|
|
49
|
+
readonly sendRpc: <D extends AnyRpcDefinition>(definition: D, params: ParamsOf<D>, opts?: {
|
|
45
50
|
readonly timeoutMs?: number;
|
|
46
|
-
}) => Effect.Effect<
|
|
47
|
-
readonly sendMalformed: (opts: {
|
|
48
|
-
readonly
|
|
51
|
+
}) => Effect.Effect<ResultOf<D>, RpcResponseError | RpcTimeoutError | TransportClosedError | TransportIoError | FrameSchemaError>;
|
|
52
|
+
readonly sendMalformed: <D extends AnyRpcDefinition>(opts: {
|
|
53
|
+
readonly baseDefinition: D;
|
|
54
|
+
readonly baseParams: ParamsOf<D>;
|
|
49
55
|
readonly kind: MalformedFrameKind;
|
|
50
56
|
readonly seed: number;
|
|
51
57
|
}) => Effect.Effect<RpcResponseError | null, TransportClosedError | TransportIoError | FrameSchemaError>;
|
|
52
|
-
readonly
|
|
58
|
+
readonly notifications: Stream.Stream<DecodedNotification<AnyNotificationDefinition>, TransportClosedError>;
|
|
53
59
|
readonly captures: CaptureBuffer;
|
|
54
60
|
readonly snapshot: Effect.Effect<ReadonlyArray<CapturedFrame>>;
|
|
55
|
-
readonly
|
|
56
|
-
readonly
|
|
61
|
+
readonly waitForNotification: <D extends AnyNotificationDefinition>(definition: D, timeoutMs?: number) => Effect.Effect<DecodedNotification<D>, NotificationWaitError>;
|
|
62
|
+
readonly drainNotifications: Effect.Effect<ReadonlyArray<DecodedNotification<AnyNotificationDefinition>>>;
|
|
57
63
|
/**
|
|
58
|
-
* Register a handler for
|
|
64
|
+
* Register a handler for an app-callback RPC.
|
|
59
65
|
* When `handleInbound` sees a request frame whose method matches, the
|
|
60
|
-
* handler runs and its outcome is encoded as the
|
|
66
|
+
* handler runs and its outcome is encoded as the JSON-RPC response:
|
|
61
67
|
* - `Effect.succeed(value)` → `{ result: value }`
|
|
62
68
|
* - `Effect.fail(err: RpcResponseError)` → `{ error: { code, message, data? } }`
|
|
63
69
|
* - defects collapse to a generic `-32603 InternalError` reply so the
|
|
@@ -67,15 +73,12 @@ export interface TestClient {
|
|
|
67
73
|
* `HashMap.set`. The TestClient does NOT raise on duplicates the way the
|
|
68
74
|
* production client does; tests routinely swap behaviour mid-scenario.
|
|
69
75
|
*
|
|
70
|
-
*
|
|
71
|
-
*
|
|
72
|
-
* and `params`/`result` bind to `S2cRpcMap[M]`. While the registry is
|
|
73
|
-
* empty, the constraint falls through to `string` / `unknown` so callers
|
|
74
|
-
* can still drive the surface — see {@link ServerRpcMethod}.
|
|
76
|
+
* `M` constrains to the registered app-callback method names and
|
|
77
|
+
* `params`/`result` bind to the matching descriptor.
|
|
75
78
|
*/
|
|
76
|
-
readonly handleServerRpc: <
|
|
79
|
+
readonly handleServerRpc: <D extends ServerRpcDefinition>(definition: D, handler: (params: ServerRpcParams<D>, ctx: ServerRpcContext) => Effect.Effect<ServerRpcResult<D>, RpcResponseError>) => Effect.Effect<void>;
|
|
77
80
|
/**
|
|
78
|
-
* Park until the server sends an
|
|
81
|
+
* Park until the server sends an app-callback request for `method`. The handler
|
|
79
82
|
* registered via {@link handleServerRpc} (if any) still runs and replies;
|
|
80
83
|
* `awaitServerRequest` is an OBSERVATION primitive — it lets a test
|
|
81
84
|
* assert the request payload before the response goes back without
|
|
@@ -89,34 +92,41 @@ export interface TestClient {
|
|
|
89
92
|
* Effect with `Effect.timeout` at the call site (architect plan §3.6
|
|
90
93
|
* "Effect.timeout at call site, not schema cap").
|
|
91
94
|
*/
|
|
92
|
-
readonly awaitServerRequest: <
|
|
95
|
+
readonly awaitServerRequest: <D extends ServerRpcDefinition>(definition: D, predicate?: (params: ServerRpcParams<D>) => boolean, timeoutMs?: number) => Effect.Effect<ServerRpcParams<D>, ServerRequestWaitError>;
|
|
96
|
+
}
|
|
97
|
+
declare const NotificationWaitError_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => Cause.YieldableError & {
|
|
98
|
+
readonly _tag: "TestingNotificationWaitError";
|
|
99
|
+
} & Readonly<A>;
|
|
100
|
+
export declare class NotificationWaitError extends NotificationWaitError_base<{
|
|
101
|
+
readonly definition: AnyNotificationDefinition;
|
|
102
|
+
readonly message: string;
|
|
103
|
+
readonly reason: "closed" | "timeout";
|
|
104
|
+
}> {
|
|
105
|
+
}
|
|
106
|
+
declare const ServerRequestWaitError_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => Cause.YieldableError & {
|
|
107
|
+
readonly _tag: "TestingServerRequestWaitError";
|
|
108
|
+
} & Readonly<A>;
|
|
109
|
+
export declare class ServerRequestWaitError extends ServerRequestWaitError_base<{
|
|
110
|
+
readonly message: string;
|
|
111
|
+
readonly definition: ServerRpcDefinition;
|
|
112
|
+
readonly reason: "timeout";
|
|
113
|
+
}> {
|
|
93
114
|
}
|
|
94
115
|
/**
|
|
95
|
-
*
|
|
96
|
-
* the registered s2c methods (`S2cRpcMethodName`) once B.2 populates
|
|
97
|
-
* `s2cRpcMethods` in `rpc-registry.ts`. While the registry is empty, the
|
|
98
|
-
* constraint falls through to `string` so the test surface remains usable
|
|
99
|
-
* during Phase 1.0 — `[never] extends [never]` is true, but `never` as a
|
|
100
|
-
* generic constraint blocks every caller. The fallback collapses
|
|
101
|
-
* automatically the moment a verb registers.
|
|
116
|
+
* Descriptor constraint for app-callback RPC test surface.
|
|
102
117
|
*/
|
|
103
|
-
export type
|
|
118
|
+
export type ServerRpcDefinition = AnyAppCallbackRpcDefinition;
|
|
104
119
|
/**
|
|
105
|
-
* Inbound params type for an
|
|
106
|
-
* params schema via `S2cRpcMap[M]["params"]` once verbs land; falls
|
|
107
|
-
* through to `unknown` for the bootstrap window — same condition as
|
|
108
|
-
* {@link ServerRpcMethod}.
|
|
120
|
+
* Inbound params type for an app-callback method.
|
|
109
121
|
*/
|
|
110
|
-
export type ServerRpcParams<
|
|
122
|
+
export type ServerRpcParams<D extends ServerRpcDefinition> = ParamsOf<D>;
|
|
111
123
|
/**
|
|
112
|
-
* Outbound result type for an
|
|
113
|
-
* for the bootstrap fallback rationale.
|
|
124
|
+
* Outbound result type for an app-callback method handler.
|
|
114
125
|
*/
|
|
115
|
-
export type ServerRpcResult<
|
|
126
|
+
export type ServerRpcResult<D extends ServerRpcDefinition> = ResultOf<D>;
|
|
116
127
|
export interface ServerRpcContext {
|
|
117
|
-
readonly requestId:
|
|
118
|
-
readonly
|
|
119
|
-
readonly traceparent?: string;
|
|
128
|
+
readonly requestId: JsonRpcStringId;
|
|
129
|
+
readonly definition: ServerRpcDefinition;
|
|
120
130
|
}
|
|
121
131
|
export interface CloseableTestClient extends TestClient {
|
|
122
132
|
readonly close: Effect.Effect<void, never>;
|
|
@@ -130,4 +140,5 @@ export declare const TestClient: Context.Tag<TestClient, TestClient>;
|
|
|
130
140
|
*/
|
|
131
141
|
export declare function makeTestClient(config: TestClientConfig): Effect.Effect<TestClient, TransportIoError | TransportClosedError | RpcResponseError, Scope.Scope>;
|
|
132
142
|
export declare function makeCloseableTestClient(config: TestClientConfig): Effect.Effect<CloseableTestClient, TransportIoError | TransportClosedError | RpcResponseError>;
|
|
143
|
+
export {};
|
|
133
144
|
//# sourceMappingURL=test-client.d.ts.map
|