@moltzap/protocol 2026.401.0 → 2026.425.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/index.d.ts +2 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -1
- package/dist/index.js.map +1 -1
- package/dist/rpc-registry.d.ts +446 -0
- package/dist/rpc-registry.d.ts.map +1 -0
- package/dist/rpc-registry.js +67 -0
- package/dist/rpc-registry.js.map +1 -0
- package/dist/rpc.d.ts +42 -0
- package/dist/rpc.d.ts.map +1 -0
- package/dist/rpc.js +29 -0
- package/dist/rpc.js.map +1 -0
- package/dist/schema/apps.d.ts +86 -0
- package/dist/schema/apps.d.ts.map +1 -0
- package/dist/schema/apps.js +77 -0
- package/dist/schema/apps.js.map +1 -0
- package/dist/schema/contacts.d.ts +8 -14
- package/dist/schema/contacts.d.ts.map +1 -1
- package/dist/schema/contacts.js +9 -15
- package/dist/schema/contacts.js.map +1 -1
- package/dist/schema/conversations.d.ts +15 -8
- package/dist/schema/conversations.d.ts.map +1 -1
- package/dist/schema/conversations.js +18 -7
- package/dist/schema/conversations.js.map +1 -1
- package/dist/schema/delivery.d.ts +1 -4
- package/dist/schema/delivery.d.ts.map +1 -1
- package/dist/schema/delivery.js +2 -3
- package/dist/schema/delivery.js.map +1 -1
- package/dist/schema/errors.d.ts +13 -0
- package/dist/schema/errors.d.ts.map +1 -1
- package/dist/schema/errors.js +14 -0
- package/dist/schema/errors.js.map +1 -1
- package/dist/schema/events.d.ts +112 -85
- package/dist/schema/events.d.ts.map +1 -1
- package/dist/schema/events.js +84 -25
- package/dist/schema/events.js.map +1 -1
- package/dist/schema/identity.d.ts +26 -15
- package/dist/schema/identity.d.ts.map +1 -1
- package/dist/schema/identity.js +10 -14
- package/dist/schema/identity.js.map +1 -1
- package/dist/schema/index.d.ts +4 -2
- package/dist/schema/index.d.ts.map +1 -1
- package/dist/schema/index.js +4 -2
- package/dist/schema/index.js.map +1 -1
- package/dist/schema/messages.d.ts +3 -7
- package/dist/schema/messages.d.ts.map +1 -1
- package/dist/schema/messages.js +4 -6
- package/dist/schema/messages.js.map +1 -1
- package/dist/schema/methods/apps.d.ts +123 -0
- package/dist/schema/methods/apps.d.ts.map +1 -0
- package/dist/schema/methods/apps.js +93 -0
- package/dist/schema/methods/apps.js.map +1 -0
- package/dist/schema/methods/auth.d.ts +110 -79
- package/dist/schema/methods/auth.d.ts.map +1 -1
- package/dist/schema/methods/auth.js +88 -91
- package/dist/schema/methods/auth.js.map +1 -1
- package/dist/schema/methods/contacts.d.ts +39 -66
- package/dist/schema/methods/contacts.d.ts.map +1 -1
- package/dist/schema/methods/contacts.js +35 -29
- package/dist/schema/methods/contacts.js.map +1 -1
- package/dist/schema/methods/conversations.d.ts +48 -52
- package/dist/schema/methods/conversations.d.ts.map +1 -1
- package/dist/schema/methods/conversations.js +89 -38
- package/dist/schema/methods/conversations.js.map +1 -1
- package/dist/schema/methods/invites.d.ts +1 -3
- package/dist/schema/methods/invites.d.ts.map +1 -1
- package/dist/schema/methods/invites.js +8 -1
- package/dist/schema/methods/invites.js.map +1 -1
- package/dist/schema/methods/messages.d.ts +12 -44
- package/dist/schema/methods/messages.d.ts.map +1 -1
- package/dist/schema/methods/messages.js +22 -28
- package/dist/schema/methods/messages.js.map +1 -1
- package/dist/schema/methods/presence.d.ts +7 -22
- package/dist/schema/methods/presence.d.ts.map +1 -1
- package/dist/schema/methods/presence.js +12 -6
- package/dist/schema/methods/presence.js.map +1 -1
- package/dist/schema/methods/push.d.ts +8 -6
- package/dist/schema/methods/push.d.ts.map +1 -1
- package/dist/schema/methods/push.js +20 -7
- package/dist/schema/methods/push.js.map +1 -1
- package/dist/schema/methods/system.d.ts +4 -0
- package/dist/schema/methods/system.d.ts.map +1 -0
- package/dist/schema/methods/system.js +11 -0
- package/dist/schema/methods/system.js.map +1 -0
- package/dist/schema/presence.d.ts +1 -12
- package/dist/schema/presence.d.ts.map +1 -1
- package/dist/schema/presence.js +2 -7
- package/dist/schema/presence.js.map +1 -1
- package/dist/schema/surfaces.d.ts +31 -25
- package/dist/schema/surfaces.d.ts.map +1 -1
- package/dist/schema/surfaces.js +40 -21
- package/dist/schema/surfaces.js.map +1 -1
- package/dist/testing/agent-registration.d.ts +49 -0
- package/dist/testing/agent-registration.d.ts.map +1 -0
- package/dist/testing/agent-registration.js +77 -0
- package/dist/testing/agent-registration.js.map +1 -0
- package/dist/testing/arbitraries/frames.d.ts +24 -0
- package/dist/testing/arbitraries/frames.d.ts.map +1 -0
- package/dist/testing/arbitraries/frames.js +36 -0
- package/dist/testing/arbitraries/frames.js.map +1 -0
- package/dist/testing/arbitraries/from-typebox.d.ts +37 -0
- package/dist/testing/arbitraries/from-typebox.d.ts.map +1 -0
- package/dist/testing/arbitraries/from-typebox.js +131 -0
- package/dist/testing/arbitraries/from-typebox.js.map +1 -0
- package/dist/testing/arbitraries/index.d.ts +4 -0
- package/dist/testing/arbitraries/index.d.ts.map +1 -0
- package/dist/testing/arbitraries/index.js +4 -0
- package/dist/testing/arbitraries/index.js.map +1 -0
- package/dist/testing/arbitraries/rpc.d.ts +66 -0
- package/dist/testing/arbitraries/rpc.d.ts.map +1 -0
- package/dist/testing/arbitraries/rpc.js +98 -0
- package/dist/testing/arbitraries/rpc.js.map +1 -0
- package/dist/testing/canonicalize.d.ts +38 -0
- package/dist/testing/canonicalize.d.ts.map +1 -0
- package/dist/testing/canonicalize.js +55 -0
- package/dist/testing/canonicalize.js.map +1 -0
- package/dist/testing/captures.d.ts +61 -0
- package/dist/testing/captures.d.ts.map +1 -0
- package/dist/testing/captures.js +99 -0
- package/dist/testing/captures.js.map +1 -0
- package/dist/testing/codec.d.ts +44 -0
- package/dist/testing/codec.d.ts.map +1 -0
- package/dist/testing/codec.js +170 -0
- package/dist/testing/codec.js.map +1 -0
- package/dist/testing/conformance/__divergence_proofs__/executable-proof-helpers.d.ts +6 -0
- package/dist/testing/conformance/__divergence_proofs__/executable-proof-helpers.d.ts.map +1 -0
- package/dist/testing/conformance/__divergence_proofs__/executable-proof-helpers.js +33 -0
- package/dist/testing/conformance/__divergence_proofs__/executable-proof-helpers.js.map +1 -0
- package/dist/testing/conformance/adversity.d.ts +36 -0
- package/dist/testing/conformance/adversity.d.ts.map +1 -0
- package/dist/testing/conformance/adversity.js +360 -0
- package/dist/testing/conformance/adversity.js.map +1 -0
- package/dist/testing/conformance/boundary.d.ts +56 -0
- package/dist/testing/conformance/boundary.d.ts.map +1 -0
- package/dist/testing/conformance/boundary.js +129 -0
- package/dist/testing/conformance/boundary.js.map +1 -0
- package/dist/testing/conformance/client/_fixtures.d.ts +71 -0
- package/dist/testing/conformance/client/_fixtures.d.ts.map +1 -0
- package/dist/testing/conformance/client/_fixtures.js +102 -0
- package/dist/testing/conformance/client/_fixtures.js.map +1 -0
- package/dist/testing/conformance/client/adversity.d.ts +39 -0
- package/dist/testing/conformance/client/adversity.d.ts.map +1 -0
- package/dist/testing/conformance/client/adversity.js +162 -0
- package/dist/testing/conformance/client/adversity.js.map +1 -0
- package/dist/testing/conformance/client/boundary.d.ts +12 -0
- package/dist/testing/conformance/client/boundary.d.ts.map +1 -0
- package/dist/testing/conformance/client/boundary.js +68 -0
- package/dist/testing/conformance/client/boundary.js.map +1 -0
- package/dist/testing/conformance/client/delivery.d.ts +38 -0
- package/dist/testing/conformance/client/delivery.d.ts.map +1 -0
- package/dist/testing/conformance/client/delivery.js +202 -0
- package/dist/testing/conformance/client/delivery.js.map +1 -0
- package/dist/testing/conformance/client/index.d.ts +16 -0
- package/dist/testing/conformance/client/index.d.ts.map +1 -0
- package/dist/testing/conformance/client/index.js +16 -0
- package/dist/testing/conformance/client/index.js.map +1 -0
- package/dist/testing/conformance/client/rpc-semantics.d.ts +26 -0
- package/dist/testing/conformance/client/rpc-semantics.d.ts.map +1 -0
- package/dist/testing/conformance/client/rpc-semantics.js +145 -0
- package/dist/testing/conformance/client/rpc-semantics.js.map +1 -0
- package/dist/testing/conformance/client/runner.d.ts +258 -0
- package/dist/testing/conformance/client/runner.d.ts.map +1 -0
- package/dist/testing/conformance/client/runner.js +228 -0
- package/dist/testing/conformance/client/runner.js.map +1 -0
- package/dist/testing/conformance/client/schema-conformance.d.ts +25 -0
- package/dist/testing/conformance/client/schema-conformance.d.ts.map +1 -0
- package/dist/testing/conformance/client/schema-conformance.js +123 -0
- package/dist/testing/conformance/client/schema-conformance.js.map +1 -0
- package/dist/testing/conformance/client/suite.d.ts +90 -0
- package/dist/testing/conformance/client/suite.d.ts.map +1 -0
- package/dist/testing/conformance/client/suite.js +209 -0
- package/dist/testing/conformance/client/suite.js.map +1 -0
- package/dist/testing/conformance/coverage-policy.d.ts +8 -0
- package/dist/testing/conformance/coverage-policy.d.ts.map +1 -0
- package/dist/testing/conformance/coverage-policy.js +10 -0
- package/dist/testing/conformance/coverage-policy.js.map +1 -0
- package/dist/testing/conformance/delivery.d.ts +40 -0
- package/dist/testing/conformance/delivery.d.ts.map +1 -0
- package/dist/testing/conformance/delivery.js +231 -0
- package/dist/testing/conformance/delivery.js.map +1 -0
- package/dist/testing/conformance/env.d.ts +3 -0
- package/dist/testing/conformance/env.d.ts.map +1 -0
- package/dist/testing/conformance/env.js +14 -0
- package/dist/testing/conformance/env.js.map +1 -0
- package/dist/testing/conformance/index.d.ts +10 -0
- package/dist/testing/conformance/index.d.ts.map +1 -0
- package/dist/testing/conformance/index.js +10 -0
- package/dist/testing/conformance/index.js.map +1 -0
- package/dist/testing/conformance/registry.d.ts +93 -0
- package/dist/testing/conformance/registry.d.ts.map +1 -0
- package/dist/testing/conformance/registry.js +62 -0
- package/dist/testing/conformance/registry.js.map +1 -0
- package/dist/testing/conformance/rpc-semantics.d.ts +67 -0
- package/dist/testing/conformance/rpc-semantics.d.ts.map +1 -0
- package/dist/testing/conformance/rpc-semantics.js +394 -0
- package/dist/testing/conformance/rpc-semantics.js.map +1 -0
- package/dist/testing/conformance/runner.d.ts +78 -0
- package/dist/testing/conformance/runner.d.ts.map +1 -0
- package/dist/testing/conformance/runner.js +65 -0
- package/dist/testing/conformance/runner.js.map +1 -0
- package/dist/testing/conformance/schema-conformance.d.ts +30 -0
- package/dist/testing/conformance/schema-conformance.d.ts.map +1 -0
- package/dist/testing/conformance/schema-conformance.js +229 -0
- package/dist/testing/conformance/schema-conformance.js.map +1 -0
- package/dist/testing/conformance/suite.d.ts +92 -0
- package/dist/testing/conformance/suite.d.ts.map +1 -0
- package/dist/testing/conformance/suite.js +233 -0
- package/dist/testing/conformance/suite.js.map +1 -0
- package/dist/testing/errors.d.ts +78 -0
- package/dist/testing/errors.d.ts.map +1 -0
- package/dist/testing/errors.js +34 -0
- package/dist/testing/errors.js.map +1 -0
- package/dist/testing/index.d.ts +25 -0
- package/dist/testing/index.d.ts.map +1 -0
- package/dist/testing/index.js +37 -0
- package/dist/testing/index.js.map +1 -0
- package/dist/testing/models/dispatch.d.ts +61 -0
- package/dist/testing/models/dispatch.d.ts.map +1 -0
- package/dist/testing/models/dispatch.js +197 -0
- package/dist/testing/models/dispatch.js.map +1 -0
- package/dist/testing/models/index.d.ts +3 -0
- package/dist/testing/models/index.d.ts.map +1 -0
- package/dist/testing/models/index.js +3 -0
- package/dist/testing/models/index.js.map +1 -0
- package/dist/testing/models/state.d.ts +37 -0
- package/dist/testing/models/state.d.ts.map +1 -0
- package/dist/testing/models/state.js +14 -0
- package/dist/testing/models/state.js.map +1 -0
- package/dist/testing/test-client.d.ts +70 -0
- package/dist/testing/test-client.d.ts.map +1 -0
- package/dist/testing/test-client.js +266 -0
- package/dist/testing/test-client.js.map +1 -0
- package/dist/testing/test-server.d.ts +62 -0
- package/dist/testing/test-server.d.ts.map +1 -0
- package/dist/testing/test-server.js +134 -0
- package/dist/testing/test-server.js.map +1 -0
- package/dist/testing/toxics/client.d.ts +52 -0
- package/dist/testing/toxics/client.d.ts.map +1 -0
- package/dist/testing/toxics/client.js +120 -0
- package/dist/testing/toxics/client.js.map +1 -0
- package/dist/testing/toxics/defaults.d.ts +43 -0
- package/dist/testing/toxics/defaults.d.ts.map +1 -0
- package/dist/testing/toxics/defaults.js +9 -0
- package/dist/testing/toxics/defaults.js.map +1 -0
- package/dist/testing/toxics/index.d.ts +4 -0
- package/dist/testing/toxics/index.d.ts.map +1 -0
- package/dist/testing/toxics/index.js +4 -0
- package/dist/testing/toxics/index.js.map +1 -0
- package/dist/testing/toxics/profile.d.ts +69 -0
- package/dist/testing/toxics/profile.d.ts.map +1 -0
- package/dist/testing/toxics/profile.js +57 -0
- package/dist/testing/toxics/profile.js.map +1 -0
- package/dist/types.d.ts +7 -11
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +3 -0
- package/dist/types.js.map +1 -1
- package/dist/validators.d.ts +49 -174
- package/dist/validators.d.ts.map +1 -1
- package/dist/validators.js +77 -47
- package/dist/validators.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +18 -40
- package/dist/optional/contact-events.d.ts +0 -3
- package/dist/optional/contact-events.d.ts.map +0 -1
- package/dist/optional/contact-events.js +0 -5
- package/dist/optional/contact-events.js.map +0 -1
- package/dist/optional/contact-methods.d.ts +0 -5
- package/dist/optional/contact-methods.d.ts.map +0 -1
- package/dist/optional/contact-methods.js +0 -5
- package/dist/optional/contact-methods.js.map +0 -1
- package/dist/phone-hash.d.ts +0 -10
- package/dist/phone-hash.d.ts.map +0 -1
- package/dist/phone-hash.js +0 -17
- package/dist/phone-hash.js.map +0 -1
- package/dist/schema/methods/phone-contacts.d.ts +0 -26
- package/dist/schema/methods/phone-contacts.d.ts.map +0 -1
- package/dist/schema/methods/phone-contacts.js +0 -10
- package/dist/schema/methods/phone-contacts.js.map +0 -1
- package/dist/test-client.d.ts +0 -34
- package/dist/test-client.d.ts.map +0 -1
- package/dist/test-client.js +0 -176
- package/dist/test-client.js.map +0 -1
- package/dist/test-fixtures/phone-hashes.d.ts +0 -18
- package/dist/test-fixtures/phone-hashes.d.ts.map +0 -1
- package/dist/test-fixtures/phone-hashes.js +0 -24
- package/dist/test-fixtures/phone-hashes.js.map +0 -1
|
@@ -4,7 +4,7 @@ export declare const SurfaceSpecSchema: import("@sinclair/typebox").TObject<{
|
|
|
4
4
|
elements: import("@sinclair/typebox").TRecord<import("@sinclair/typebox").TString, import("@sinclair/typebox").TUnknown>;
|
|
5
5
|
state: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TRecord<import("@sinclair/typebox").TString, import("@sinclair/typebox").TUnknown>>;
|
|
6
6
|
}>;
|
|
7
|
-
export declare const
|
|
7
|
+
export declare const SurfaceSchema: import("@sinclair/typebox").TObject<{
|
|
8
8
|
conversationId: import("@sinclair/typebox").TString;
|
|
9
9
|
title: import("@sinclair/typebox").TString;
|
|
10
10
|
spec: import("@sinclair/typebox").TObject<{
|
|
@@ -12,21 +12,11 @@ export declare const SurfaceUpdateParamsSchema: import("@sinclair/typebox").TObj
|
|
|
12
12
|
elements: import("@sinclair/typebox").TRecord<import("@sinclair/typebox").TString, import("@sinclair/typebox").TUnknown>;
|
|
13
13
|
state: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TRecord<import("@sinclair/typebox").TString, import("@sinclair/typebox").TUnknown>>;
|
|
14
14
|
}>;
|
|
15
|
+
updatedBy: import("@sinclair/typebox").TString;
|
|
16
|
+
updatedAt: import("@sinclair/typebox").TString;
|
|
17
|
+
version: import("@sinclair/typebox").TInteger;
|
|
15
18
|
}>;
|
|
16
|
-
export declare const
|
|
17
|
-
conversationId: import("@sinclair/typebox").TString;
|
|
18
|
-
}>;
|
|
19
|
-
export declare const SurfaceActionParamsSchema: import("@sinclair/typebox").TObject<{
|
|
20
|
-
conversationId: import("@sinclair/typebox").TString;
|
|
21
|
-
action: import("@sinclair/typebox").TObject<{
|
|
22
|
-
name: import("@sinclair/typebox").TString;
|
|
23
|
-
payload: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TRecord<import("@sinclair/typebox").TString, import("@sinclair/typebox").TUnknown>>;
|
|
24
|
-
}>;
|
|
25
|
-
}>;
|
|
26
|
-
export declare const SurfaceClearParamsSchema: import("@sinclair/typebox").TObject<{
|
|
27
|
-
conversationId: import("@sinclair/typebox").TString;
|
|
28
|
-
}>;
|
|
29
|
-
export declare const SurfaceSchema: import("@sinclair/typebox").TObject<{
|
|
19
|
+
export declare const SurfaceUpdate: import("../rpc.js").RpcDefinition<"surface/update", import("@sinclair/typebox").TObject<{
|
|
30
20
|
conversationId: import("@sinclair/typebox").TString;
|
|
31
21
|
title: import("@sinclair/typebox").TString;
|
|
32
22
|
spec: import("@sinclair/typebox").TObject<{
|
|
@@ -34,16 +24,32 @@ export declare const SurfaceSchema: import("@sinclair/typebox").TObject<{
|
|
|
34
24
|
elements: import("@sinclair/typebox").TRecord<import("@sinclair/typebox").TString, import("@sinclair/typebox").TUnknown>;
|
|
35
25
|
state: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TRecord<import("@sinclair/typebox").TString, import("@sinclair/typebox").TUnknown>>;
|
|
36
26
|
}>;
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
27
|
+
}>, import("@sinclair/typebox").TObject<{}>>;
|
|
28
|
+
export declare const SurfaceGet: import("../rpc.js").RpcDefinition<"surface/get", import("@sinclair/typebox").TObject<{
|
|
29
|
+
conversationId: import("@sinclair/typebox").TString;
|
|
30
|
+
}>, import("@sinclair/typebox").TObject<{
|
|
31
|
+
surface: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TObject<{
|
|
32
|
+
conversationId: import("@sinclair/typebox").TString;
|
|
33
|
+
title: import("@sinclair/typebox").TString;
|
|
34
|
+
spec: import("@sinclair/typebox").TObject<{
|
|
35
|
+
root: import("@sinclair/typebox").TString;
|
|
36
|
+
elements: import("@sinclair/typebox").TRecord<import("@sinclair/typebox").TString, import("@sinclair/typebox").TUnknown>;
|
|
37
|
+
state: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TRecord<import("@sinclair/typebox").TString, import("@sinclair/typebox").TUnknown>>;
|
|
38
|
+
}>;
|
|
39
|
+
updatedBy: import("@sinclair/typebox").TString;
|
|
40
|
+
updatedAt: import("@sinclair/typebox").TString;
|
|
41
|
+
version: import("@sinclair/typebox").TInteger;
|
|
42
|
+
}>, import("@sinclair/typebox").TNull]>;
|
|
43
|
+
}>>;
|
|
44
|
+
export declare const SurfaceAction: import("../rpc.js").RpcDefinition<"surface/action", import("@sinclair/typebox").TObject<{
|
|
45
|
+
conversationId: import("@sinclair/typebox").TString;
|
|
46
|
+
action: import("@sinclair/typebox").TObject<{
|
|
47
|
+
name: import("@sinclair/typebox").TString;
|
|
48
|
+
payload: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TRecord<import("@sinclair/typebox").TString, import("@sinclair/typebox").TUnknown>>;
|
|
40
49
|
}>;
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
export type SurfaceGetParams = Static<typeof SurfaceGetParamsSchema>;
|
|
46
|
-
export type SurfaceActionParams = Static<typeof SurfaceActionParamsSchema>;
|
|
47
|
-
export type SurfaceClearParams = Static<typeof SurfaceClearParamsSchema>;
|
|
50
|
+
}>, import("@sinclair/typebox").TObject<{}>>;
|
|
51
|
+
export declare const SurfaceClear: import("../rpc.js").RpcDefinition<"surface/clear", import("@sinclair/typebox").TObject<{
|
|
52
|
+
conversationId: import("@sinclair/typebox").TString;
|
|
53
|
+
}>, import("@sinclair/typebox").TObject<{}>>;
|
|
48
54
|
export type Surface = Static<typeof SurfaceSchema>;
|
|
49
55
|
//# sourceMappingURL=surfaces.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"surfaces.d.ts","sourceRoot":"","sources":["../../src/schema/surfaces.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,KAAK,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAKtD,eAAO,MAAM,iBAAiB;;;;EAO7B,CAAC;AAEF,eAAO,MAAM,
|
|
1
|
+
{"version":3,"file":"surfaces.d.ts","sourceRoot":"","sources":["../../src/schema/surfaces.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,KAAK,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAKtD,eAAO,MAAM,iBAAiB;;;;EAO7B,CAAC;AAEF,eAAO,MAAM,aAAa;;;;;;;;;;;EAUzB,CAAC;AAMF,eAAO,MAAM,aAAa;;;;;;;;4CAWxB,CAAC;AAEH,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;GAYrB,CAAC;AAEH,eAAO,MAAM,aAAa;;;;;;4CAgBxB,CAAC;AAEH,eAAO,MAAM,YAAY;;4CASvB,CAAC;AAIH,MAAM,MAAM,OAAO,GAAG,MAAM,CAAC,OAAO,aAAa,CAAC,CAAC"}
|
package/dist/schema/surfaces.js
CHANGED
|
@@ -1,36 +1,55 @@
|
|
|
1
1
|
import { Type } from "@sinclair/typebox";
|
|
2
2
|
import { DateTimeString } from "../helpers.js";
|
|
3
|
-
import { ConversationId } from "./primitives.js";
|
|
4
|
-
import {
|
|
3
|
+
import { ConversationId, AgentId } from "./primitives.js";
|
|
4
|
+
import { defineRpc } from "../rpc.js";
|
|
5
5
|
export const SurfaceSpecSchema = Type.Object({
|
|
6
6
|
root: Type.String(),
|
|
7
7
|
elements: Type.Record(Type.String(), Type.Unknown()),
|
|
8
8
|
state: Type.Optional(Type.Record(Type.String(), Type.Unknown())),
|
|
9
9
|
}, { additionalProperties: false });
|
|
10
|
-
export const SurfaceUpdateParamsSchema = Type.Object({
|
|
11
|
-
conversationId: ConversationId,
|
|
12
|
-
title: Type.String({ minLength: 1, maxLength: 256 }),
|
|
13
|
-
spec: SurfaceSpecSchema,
|
|
14
|
-
}, { additionalProperties: false });
|
|
15
|
-
export const SurfaceGetParamsSchema = Type.Object({
|
|
16
|
-
conversationId: ConversationId,
|
|
17
|
-
}, { additionalProperties: false });
|
|
18
|
-
export const SurfaceActionParamsSchema = Type.Object({
|
|
19
|
-
conversationId: ConversationId,
|
|
20
|
-
action: Type.Object({
|
|
21
|
-
name: Type.String({ minLength: 1, maxLength: 128 }),
|
|
22
|
-
payload: Type.Optional(Type.Record(Type.String(), Type.Unknown())),
|
|
23
|
-
}, { additionalProperties: false }),
|
|
24
|
-
}, { additionalProperties: false });
|
|
25
|
-
export const SurfaceClearParamsSchema = Type.Object({
|
|
26
|
-
conversationId: ConversationId,
|
|
27
|
-
}, { additionalProperties: false });
|
|
28
10
|
export const SurfaceSchema = Type.Object({
|
|
29
11
|
conversationId: ConversationId,
|
|
30
12
|
title: Type.String(),
|
|
31
13
|
spec: SurfaceSpecSchema,
|
|
32
|
-
updatedBy:
|
|
14
|
+
updatedBy: AgentId,
|
|
33
15
|
updatedAt: DateTimeString,
|
|
34
16
|
version: Type.Integer({ minimum: 1 }),
|
|
35
17
|
}, { additionalProperties: false });
|
|
18
|
+
// ---------------------------------------------------------------------------
|
|
19
|
+
// RpcDefinition manifests.
|
|
20
|
+
// ---------------------------------------------------------------------------
|
|
21
|
+
export const SurfaceUpdate = defineRpc({
|
|
22
|
+
name: "surface/update",
|
|
23
|
+
params: Type.Object({
|
|
24
|
+
conversationId: ConversationId,
|
|
25
|
+
title: Type.String({ minLength: 1, maxLength: 256 }),
|
|
26
|
+
spec: SurfaceSpecSchema,
|
|
27
|
+
}, { additionalProperties: false }),
|
|
28
|
+
result: Type.Object({}, { additionalProperties: false }),
|
|
29
|
+
});
|
|
30
|
+
export const SurfaceGet = defineRpc({
|
|
31
|
+
name: "surface/get",
|
|
32
|
+
params: Type.Object({
|
|
33
|
+
conversationId: ConversationId,
|
|
34
|
+
}, { additionalProperties: false }),
|
|
35
|
+
result: Type.Object({ surface: Type.Union([SurfaceSchema, Type.Null()]) }, { additionalProperties: false }),
|
|
36
|
+
});
|
|
37
|
+
export const SurfaceAction = defineRpc({
|
|
38
|
+
name: "surface/action",
|
|
39
|
+
params: Type.Object({
|
|
40
|
+
conversationId: ConversationId,
|
|
41
|
+
action: Type.Object({
|
|
42
|
+
name: Type.String({ minLength: 1, maxLength: 128 }),
|
|
43
|
+
payload: Type.Optional(Type.Record(Type.String(), Type.Unknown())),
|
|
44
|
+
}, { additionalProperties: false }),
|
|
45
|
+
}, { additionalProperties: false }),
|
|
46
|
+
result: Type.Object({}, { additionalProperties: false }),
|
|
47
|
+
});
|
|
48
|
+
export const SurfaceClear = defineRpc({
|
|
49
|
+
name: "surface/clear",
|
|
50
|
+
params: Type.Object({
|
|
51
|
+
conversationId: ConversationId,
|
|
52
|
+
}, { additionalProperties: false }),
|
|
53
|
+
result: Type.Object({}, { additionalProperties: false }),
|
|
54
|
+
});
|
|
36
55
|
//# sourceMappingURL=surfaces.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"surfaces.js","sourceRoot":"","sources":["../../src/schema/surfaces.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAe,MAAM,mBAAmB,CAAC;AACtD,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"surfaces.js","sourceRoot":"","sources":["../../src/schema/surfaces.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAe,MAAM,mBAAmB,CAAC;AACtD,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,EAAE,cAAc,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAC1D,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAEtC,MAAM,CAAC,MAAM,iBAAiB,GAAG,IAAI,CAAC,MAAM,CAC1C;IACE,IAAI,EAAE,IAAI,CAAC,MAAM,EAAE;IACnB,QAAQ,EAAE,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,EAAE,EAAE,IAAI,CAAC,OAAO,EAAE,CAAC;IACpD,KAAK,EAAE,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,EAAE,EAAE,IAAI,C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AAE,oBAAoB,EAAE,KAAK,EAAE,CAChC;CACF,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,aAAa,GAAG,SAAS,CAAC;IACrC,IAAI,EAAE,gBAAgB;IACtB,MAAM,EAAE,IAAI,CAAC,MAAM,CACjB;QACE,cAAc,EAAE,cAAc;QAC9B,MAAM,EAAE,IAAI,CAAC,MAAM,CACjB;YACE,IAAI,EAAE,IAAI,CAAC,MAAM,CAAC,EAAE,SAAS,EAAE,CAAC,EAAE,SAAS,EAAE,GAAG,EAAE,CAAC;YACnD,OAAO,EAAE,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,EAAE,EAAE,IAAI,CAAC,OAAO,EAAE,CAAC,CAAC;SACnE,EACD,EAAE,oBAAoB,EAAE,KAAK,EAAE,CAChC;KACF,EACD,EAAE,oBAAoB,EAAE,KAAK,EAAE,CAChC;IACD,MAAM,EAAE,IAAI,CAAC,MAAM,CAAC,EAAE,EAAE,EAAE,oBAAoB,EAAE,KAAK,EAAE,CAAC;CACzD,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,YAAY,GAAG,SAAS,CAAC;IACpC,IAAI,EAAE,eAAe;IACrB,MAAM,EAAE,IAAI,CAAC,MAAM,CACjB;QACE,cAAc,EAAE,cAAc;KAC/B,EACD,EAAE,oBAAoB,EAAE,KAAK,EAAE,CAChC;IACD,MAAM,EAAE,IAAI,CAAC,MAAM,CAAC,EAAE,EAAE,EAAE,oBAAoB,EAAE,KAAK,EAAE,CAAC;CACzD,CAAC,CAAC"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Test-agent registration helper — POSTs `/api/v1/auth/register` against
|
|
3
|
+
* the real server's HTTP control plane and returns `{ agentId, apiKey }`.
|
|
4
|
+
*
|
|
5
|
+
* Used by conformance properties that need a real authenticated agent to
|
|
6
|
+
* drive `TestClient`. The protocol package owns this helper (not the
|
|
7
|
+
* consumer) because every implementation that wants to run the suite
|
|
8
|
+
* needs it, the HTTP shape is part of the protocol contract, and doing
|
|
9
|
+
* it here keeps the consumer-side wrapper thin.
|
|
10
|
+
*
|
|
11
|
+
* Principle 3: returns `Effect<TestAgent, AgentRegistrationError>` — no
|
|
12
|
+
* bare throws.
|
|
13
|
+
*/
|
|
14
|
+
import { Effect } from "effect";
|
|
15
|
+
export interface TestAgent {
|
|
16
|
+
readonly agentId: string;
|
|
17
|
+
readonly apiKey: string;
|
|
18
|
+
readonly name: string;
|
|
19
|
+
readonly claimUrl?: string;
|
|
20
|
+
readonly claimToken?: string;
|
|
21
|
+
}
|
|
22
|
+
declare const AgentRegistrationError_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]; }>) => import("effect/Cause").YieldableError & {
|
|
23
|
+
readonly _tag: "TestingAgentRegistrationError";
|
|
24
|
+
} & Readonly<A>;
|
|
25
|
+
/** HTTP registration failed (network, non-2xx, malformed response). */
|
|
26
|
+
export declare class AgentRegistrationError extends AgentRegistrationError_base<{
|
|
27
|
+
readonly baseUrl: string;
|
|
28
|
+
readonly agentName: string;
|
|
29
|
+
readonly status: number;
|
|
30
|
+
readonly body: string;
|
|
31
|
+
}> {
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Register an agent against the real server's HTTP endpoint. The
|
|
35
|
+
* returned `apiKey` is the `agentKey` TestClient sends in `auth/connect`.
|
|
36
|
+
*
|
|
37
|
+
* Every call uses a unique suffix so replays don't collide on the
|
|
38
|
+
* server's "duplicate name" check; seeded replays pass a stable
|
|
39
|
+
* `uniqueSuffix` to make the name deterministic.
|
|
40
|
+
*/
|
|
41
|
+
export declare function registerTestAgent(opts: {
|
|
42
|
+
readonly baseUrl: string;
|
|
43
|
+
readonly name: string;
|
|
44
|
+
readonly description?: string;
|
|
45
|
+
readonly inviteCode?: string;
|
|
46
|
+
readonly uniqueSuffix?: string | false;
|
|
47
|
+
}): Effect.Effect<TestAgent, AgentRegistrationError>;
|
|
48
|
+
export {};
|
|
49
|
+
//# sourceMappingURL=agent-registration.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agent-registration.d.ts","sourceRoot":"","sources":["../../src/testing/agent-registration.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AACH,OAAO,EAAQ,MAAM,EAAE,MAAM,QAAQ,CAAC;AAEtC,MAAM,WAAW,SAAS;IACxB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAC;CAC9B;;;;AAED,uEAAuE;AACvE,qBAAa,sBAAuB,SAAQ,4BAE1C;IACA,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;CACvB,CAAC;CAAG;AAEL;;;;;;;GAOG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE;IACtC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,YAAY,CAAC,EAAE,MAAM,GAAG,KAAK,CAAC;CACxC,GAAG,MAAM,CAAC,MAAM,CAAC,SAAS,EAAE,sBAAsB,CAAC,CAuDnD"}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Test-agent registration helper — POSTs `/api/v1/auth/register` against
|
|
3
|
+
* the real server's HTTP control plane and returns `{ agentId, apiKey }`.
|
|
4
|
+
*
|
|
5
|
+
* Used by conformance properties that need a real authenticated agent to
|
|
6
|
+
* drive `TestClient`. The protocol package owns this helper (not the
|
|
7
|
+
* consumer) because every implementation that wants to run the suite
|
|
8
|
+
* needs it, the HTTP shape is part of the protocol contract, and doing
|
|
9
|
+
* it here keeps the consumer-side wrapper thin.
|
|
10
|
+
*
|
|
11
|
+
* Principle 3: returns `Effect<TestAgent, AgentRegistrationError>` — no
|
|
12
|
+
* bare throws.
|
|
13
|
+
*/
|
|
14
|
+
import { Data, Effect } from "effect";
|
|
15
|
+
/** HTTP registration failed (network, non-2xx, malformed response). */
|
|
16
|
+
export class AgentRegistrationError extends Data.TaggedError("TestingAgentRegistrationError") {
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Register an agent against the real server's HTTP endpoint. The
|
|
20
|
+
* returned `apiKey` is the `agentKey` TestClient sends in `auth/connect`.
|
|
21
|
+
*
|
|
22
|
+
* Every call uses a unique suffix so replays don't collide on the
|
|
23
|
+
* server's "duplicate name" check; seeded replays pass a stable
|
|
24
|
+
* `uniqueSuffix` to make the name deterministic.
|
|
25
|
+
*/
|
|
26
|
+
export function registerTestAgent(opts) {
|
|
27
|
+
const suffix = opts.uniqueSuffix === false
|
|
28
|
+
? ""
|
|
29
|
+
: (opts.uniqueSuffix ??
|
|
30
|
+
`${Date.now().toString(36)}-${Math.random().toString(36).slice(2, 8)}`);
|
|
31
|
+
const name = suffix === "" ? opts.name : `${opts.name}-${suffix}`;
|
|
32
|
+
return Effect.tryPromise({
|
|
33
|
+
// #ignore-sloppy-code-next-line[async-keyword]: HTTP POST is Promise-native; Effect.tryPromise captures the rejection path
|
|
34
|
+
try: async () => {
|
|
35
|
+
const requestBody = { name };
|
|
36
|
+
if (opts.description !== undefined) {
|
|
37
|
+
requestBody["description"] = opts.description;
|
|
38
|
+
}
|
|
39
|
+
if (opts.inviteCode !== undefined) {
|
|
40
|
+
requestBody["inviteCode"] = opts.inviteCode;
|
|
41
|
+
}
|
|
42
|
+
const res = await fetch(`${opts.baseUrl}/api/v1/auth/register`, {
|
|
43
|
+
method: "POST",
|
|
44
|
+
headers: { "Content-Type": "application/json" },
|
|
45
|
+
body: JSON.stringify(requestBody),
|
|
46
|
+
});
|
|
47
|
+
const body = await res.text();
|
|
48
|
+
if (!res.ok) {
|
|
49
|
+
throw new AgentRegistrationError({
|
|
50
|
+
baseUrl: opts.baseUrl,
|
|
51
|
+
agentName: name,
|
|
52
|
+
status: res.status,
|
|
53
|
+
body,
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
const parsed = JSON.parse(body);
|
|
57
|
+
return {
|
|
58
|
+
agentId: parsed.agentId,
|
|
59
|
+
apiKey: parsed.apiKey,
|
|
60
|
+
claimUrl: parsed.claimUrl,
|
|
61
|
+
claimToken: parsed.claimToken,
|
|
62
|
+
name,
|
|
63
|
+
};
|
|
64
|
+
},
|
|
65
|
+
catch: (cause) => {
|
|
66
|
+
if (cause instanceof AgentRegistrationError)
|
|
67
|
+
return cause;
|
|
68
|
+
return new AgentRegistrationError({
|
|
69
|
+
baseUrl: opts.baseUrl,
|
|
70
|
+
agentName: name,
|
|
71
|
+
status: 0,
|
|
72
|
+
body: cause instanceof Error ? cause.message : String(cause),
|
|
73
|
+
});
|
|
74
|
+
},
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
//# sourceMappingURL=agent-registration.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agent-registration.js","sourceRoot":"","sources":["../../src/testing/agent-registration.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AACH,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAUtC,uEAAuE;AACvE,MAAM,OAAO,sBAAuB,SAAQ,IAAI,CAAC,WAAW,CAC1D,+BAA+B,CAM/B;CAAG;AAE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AAC;gBACZ,MAAM,IAAI,sBAAsB,CAAC;oBAC/B,OAAO,EAAE,IAAI,CAAC,OAAO;oBACrB,SAAS,EAAE,IAAI;oBACf,MAAM,EAAE,GAAG,CAAC,MAAM;oBAClB,IAAI;iBACL,CAAC,CAAC;YACL,CAAC;YACD,MAAM,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAK7B,CAAC;YACF,OAAO;gBACL,OAAO,EAAE,MAAM,CAAC,OAAO;gBACvB,MAAM,EAAE,MAAM,CAAC,MAAM;gBACrB,QAAQ,EAAE,MAAM,CAAC,QAAQ;gBACzB,UAAU,EAAE,MAAM,CAAC,UAAU;gBAC7B,IAAI;aACe,CAAC;QACxB,CAAC;QACD,KAAK,EAAE,CAAC,KAAK,EAAE,EAAE;YACf,IAAI,KAAK,YAAY,sBAAsB;gBAAE,OAAO,KAAK,CAAC;YAC1D,OAAO,IAAI,sBAAsB,CAAC;gBAChC,OAAO,EAAE,IAAI,CAAC,OAAO;gBACrB,SAAS,EAAE,IAAI;gBACf,MAAM,EAAE,CAAC;gBACT,IAAI,EAAE,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC;aAC7D,CAAC,CAAC;QACL,CAAC;KACF,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Frame-level arbitraries.
|
|
3
|
+
*
|
|
4
|
+
* Tier A exercises all three frame schemas directly; Tier E2's fuzz
|
|
5
|
+
* composes these with per-RPC params to produce inbound-frame arbitraries
|
|
6
|
+
* the real server must absorb without crashing.
|
|
7
|
+
*/
|
|
8
|
+
import * as fc from "fast-check";
|
|
9
|
+
import { type RequestFrame, type ResponseFrame, type EventFrame } from "../../schema/frames.js";
|
|
10
|
+
import type { MalformedFrameKind, AnyFrame } from "../codec.js";
|
|
11
|
+
export declare function arbitraryRequestFrame(): fc.Arbitrary<RequestFrame>;
|
|
12
|
+
export declare function arbitraryResponseFrame(): fc.Arbitrary<ResponseFrame>;
|
|
13
|
+
export declare function arbitraryEventFrame(): fc.Arbitrary<EventFrame>;
|
|
14
|
+
/**
|
|
15
|
+
* Arbitrary of a `(baseFrame, MalformedFrameKind, seed)` tuple so Tier A /
|
|
16
|
+
* D can replay a specific mutation on shrink.
|
|
17
|
+
*/
|
|
18
|
+
export interface ArbitraryMalformedFrame {
|
|
19
|
+
readonly base: AnyFrame;
|
|
20
|
+
readonly kind: MalformedFrameKind;
|
|
21
|
+
readonly seed: number;
|
|
22
|
+
}
|
|
23
|
+
export declare function arbitraryMalformedFrame(): fc.Arbitrary<ArbitraryMalformedFrame>;
|
|
24
|
+
//# sourceMappingURL=frames.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"frames.d.ts","sourceRoot":"","sources":["../../../src/testing/arbitraries/frames.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,KAAK,EAAE,MAAM,YAAY,CAAC;AACjC,OAAO,EAIL,KAAK,YAAY,EACjB,KAAK,aAAa,EAClB,KAAK,UAAU,EAChB,MAAM,wBAAwB,CAAC;AAChC,OAAO,KAAK,EAAE,kBAAkB,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAYhE,wBAAgB,qBAAqB,IAAI,EAAE,CAAC,SAAS,CAAC,YAAY,CAAC,CAElE;AAED,wBAAgB,sBAAsB,IAAI,EAAE,CAAC,SAAS,CAAC,aAAa,CAAC,CAEpE;AAED,wBAAgB,mBAAmB,IAAI,EAAE,CAAC,SAAS,CAAC,UAAU,CAAC,CAE9D;AAED;;;GAGG;AACH,MAAM,WAAW,uBAAuB;IACtC,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAC;IACxB,QAAQ,CAAC,IAAI,EAAE,kBAAkB,CAAC;IAClC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;CACvB;AAED,wBAAgB,uBAAuB,IAAI,EAAE,CAAC,SAAS,CAAC,uBAAuB,CAAC,CAW/E"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Frame-level arbitraries.
|
|
3
|
+
*
|
|
4
|
+
* Tier A exercises all three frame schemas directly; Tier E2's fuzz
|
|
5
|
+
* composes these with per-RPC params to produce inbound-frame arbitraries
|
|
6
|
+
* the real server must absorb without crashing.
|
|
7
|
+
*/
|
|
8
|
+
import * as fc from "fast-check";
|
|
9
|
+
import { RequestFrameSchema, ResponseFrameSchema, EventFrameSchema, } from "../../schema/frames.js";
|
|
10
|
+
import { arbitraryFromSchema } from "./from-typebox.js";
|
|
11
|
+
const malformedKinds = [
|
|
12
|
+
"bit-flip",
|
|
13
|
+
"truncated",
|
|
14
|
+
"oversized",
|
|
15
|
+
"invalid-utf8",
|
|
16
|
+
"missing-required-field",
|
|
17
|
+
"extra-property",
|
|
18
|
+
];
|
|
19
|
+
export function arbitraryRequestFrame() {
|
|
20
|
+
return arbitraryFromSchema(RequestFrameSchema);
|
|
21
|
+
}
|
|
22
|
+
export function arbitraryResponseFrame() {
|
|
23
|
+
return arbitraryFromSchema(ResponseFrameSchema);
|
|
24
|
+
}
|
|
25
|
+
export function arbitraryEventFrame() {
|
|
26
|
+
return arbitraryFromSchema(EventFrameSchema);
|
|
27
|
+
}
|
|
28
|
+
export function arbitraryMalformedFrame() {
|
|
29
|
+
const baseArb = fc.oneof(arbitraryRequestFrame().map((f) => f), arbitraryResponseFrame().map((f) => f), arbitraryEventFrame().map((f) => f));
|
|
30
|
+
return fc.record({
|
|
31
|
+
base: baseArb,
|
|
32
|
+
kind: fc.constantFrom(...malformedKinds),
|
|
33
|
+
seed: fc.integer({ min: 1, max: 2 ** 31 - 1 }),
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
//# sourceMappingURL=frames.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"frames.js","sourceRoot":"","sources":["../../../src/testing/arbit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2
|
+
* TypeBox → fast-check arbitrary derivation.
|
|
3
|
+
*
|
|
4
|
+
* The reference model covers every `RpcMethodName` in `RpcMap` (AC4 / Tier
|
|
5
|
+
* B); properties therefore need a principled generator for each method's
|
|
6
|
+
* params. Instead of handwriting an `Arbitrary<T>` per RPC, we derive it
|
|
7
|
+
* from the schema already living at `paramsSchema`.
|
|
8
|
+
*
|
|
9
|
+
* Approach: walk TypeBox node kinds directly (`Object`, `Array`, `String`,
|
|
10
|
+
* `Number`, `Integer`, `Boolean`, `Union`, `Literal`, `Unknown`) and map to
|
|
11
|
+
* the equivalent fast-check primitive. Optional fields become `fc.option`
|
|
12
|
+
* collapsed to `undefined`. Records are composed via `fc.record` so each
|
|
13
|
+
* field shrinks independently.
|
|
14
|
+
*
|
|
15
|
+
* Resolution of Open Question O2: hand-rolled walker kept; no external
|
|
16
|
+
* helper added. Rationale recorded inline below and in the PR body.
|
|
17
|
+
*/
|
|
18
|
+
import type { TSchema, Static } from "@sinclair/typebox";
|
|
19
|
+
import * as fc from "fast-check";
|
|
20
|
+
/**
|
|
21
|
+
* Derive an `Arbitrary<Static<S>>` for any TypeBox schema. The derivation
|
|
22
|
+
* is pure: given the same schema + fast-check seed, it yields the same
|
|
23
|
+
* value tree (AC10 reproducibility).
|
|
24
|
+
*/
|
|
25
|
+
export declare function arbitraryFromSchema<S extends TSchema>(schema: S): fc.Arbitrary<Static<S>>;
|
|
26
|
+
/**
|
|
27
|
+
* Shrink-preserving narrower. Some schemas (`Type.Unknown`, `Type.Any`)
|
|
28
|
+
* produce open-world trees that drown properties in noise. This returns a
|
|
29
|
+
* narrowed arbitrary still `Value.Check`-valid against `schema` but biased
|
|
30
|
+
* toward "small typical" values the reference model can reason about.
|
|
31
|
+
*
|
|
32
|
+
* For now the narrowing strategy is identical to `arbitraryFromSchema` with
|
|
33
|
+
* smaller default string/array bounds (handled inside `walk`). Exposed as a
|
|
34
|
+
* distinct export so call sites document their intent.
|
|
35
|
+
*/
|
|
36
|
+
export declare function arbitraryForParams<S extends TSchema>(schema: S): fc.Arbitrary<Static<S>>;
|
|
37
|
+
//# sourceMappingURL=from-typebox.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"from-typebox.d.ts","sourceRoot":"","sources":["../../../src/testing/arbitraries/from-typebox.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AACH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAEzD,OAAO,KAAK,EAAE,MAAM,YAAY,CAAC;AAgCjC;;;;GAIG;AACH,wBAAgB,mBAAmB,CAAC,CAAC,SAAS,OAAO,EACnD,MAAM,EAAE,CAAC,GACR,EAAE,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAMzB;AA4GD;;;;;;;;;GASG;AACH,wBAAgB,kBAAkB,CAAC,CAAC,SAAS,OAAO,EAClD,MAAM,EAAE,CAAC,GACR,EAAE,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAEzB"}
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
import { Kind, OptionalKind } from "@sinclair/typebox";
|
|
2
|
+
import * as fc from "fast-check";
|
|
3
|
+
function isOptional(schema) {
|
|
4
|
+
// TypeBox stores the Optional marker under a symbol-keyed metadata
|
|
5
|
+
// field; the public `TSchema` type does not expose it. Narrowing via
|
|
6
|
+
// `unknown` to a symbol-indexed record is the documented TypeBox
|
|
7
|
+
// introspection pattern.
|
|
8
|
+
// #ignore-sloppy-code-next-line[as-unknown-as]: TypeBox OptionalKind is symbol-keyed metadata not in the TSchema public type
|
|
9
|
+
const marker = schema[OptionalKind];
|
|
10
|
+
return marker === "Optional";
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Derive an `Arbitrary<Static<S>>` for any TypeBox schema. The derivation
|
|
14
|
+
* is pure: given the same schema + fast-check seed, it yields the same
|
|
15
|
+
* value tree (AC10 reproducibility).
|
|
16
|
+
*/
|
|
17
|
+
export function arbitraryFromSchema(schema) {
|
|
18
|
+
// TBNode enriches TSchema with TypeBox's symbol-keyed metadata accessors;
|
|
19
|
+
// the cast crosses that boundary exactly once, at entry.
|
|
20
|
+
// #ignore-sloppy-code-next-line[as-unknown-as]: TBNode re-expresses TypeBox internal metadata keys for the walker
|
|
21
|
+
const arb = walk(schema);
|
|
22
|
+
return arb;
|
|
23
|
+
}
|
|
24
|
+
function walk(node) {
|
|
25
|
+
const kind = node[Kind];
|
|
26
|
+
// Literal — a single constant value.
|
|
27
|
+
if (kind === "Literal" || node.const !== undefined) {
|
|
28
|
+
return fc.constant(node.const);
|
|
29
|
+
}
|
|
30
|
+
// Union — fc.oneof of every variant walker.
|
|
31
|
+
if (kind === "Union" && Array.isArray(node.anyOf)) {
|
|
32
|
+
if (node.anyOf.length === 0)
|
|
33
|
+
return fc.constant(null);
|
|
34
|
+
return fc.oneof(...node.anyOf.map((sub) => walk(sub)));
|
|
35
|
+
}
|
|
36
|
+
// Intersect — synthesize an object whose branches are all merged.
|
|
37
|
+
if (kind === "Intersect" && Array.isArray(node.allOf)) {
|
|
38
|
+
return fc
|
|
39
|
+
.tuple(...node.allOf.map((sub) => walk(sub)))
|
|
40
|
+
.map((arr) => Object.assign({}, ...arr.map((v) => (v && typeof v === "object" ? v : {}))));
|
|
41
|
+
}
|
|
42
|
+
// Enum — single-value via `node.enum` (Type.Enum / stringEnum helper).
|
|
43
|
+
if (Array.isArray(node.enum) && node.enum.length > 0) {
|
|
44
|
+
const values = node.enum;
|
|
45
|
+
return fc.constantFrom(...values);
|
|
46
|
+
}
|
|
47
|
+
switch (node.type) {
|
|
48
|
+
case "object":
|
|
49
|
+
return objectArbitrary(node);
|
|
50
|
+
case "array":
|
|
51
|
+
return node.items
|
|
52
|
+
? fc.array(walk(node.items), { maxLength: 5 })
|
|
53
|
+
: fc.array(fc.anything(), { maxLength: 5 });
|
|
54
|
+
case "string":
|
|
55
|
+
return stringArbitrary(node);
|
|
56
|
+
case "integer":
|
|
57
|
+
return fc.integer({
|
|
58
|
+
min: node.minimum ?? -1000,
|
|
59
|
+
max: node.maximum ?? 1000,
|
|
60
|
+
});
|
|
61
|
+
case "number":
|
|
62
|
+
return fc.double({
|
|
63
|
+
min: node.minimum ?? -1000,
|
|
64
|
+
max: node.maximum ?? 1000,
|
|
65
|
+
noNaN: true,
|
|
66
|
+
});
|
|
67
|
+
case "boolean":
|
|
68
|
+
return fc.boolean();
|
|
69
|
+
case "null":
|
|
70
|
+
return fc.constant(null);
|
|
71
|
+
default:
|
|
72
|
+
// Unknown / Any / missing type → a biased "small JSON value" tree so
|
|
73
|
+
// schema-permitted payloads stay small.
|
|
74
|
+
return fc.jsonValue({ maxDepth: 2 });
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
function stringArbitrary(node) {
|
|
78
|
+
if (node.format === "uuid") {
|
|
79
|
+
return fc.uuid();
|
|
80
|
+
}
|
|
81
|
+
if (node.format === "date-time") {
|
|
82
|
+
return fc
|
|
83
|
+
.date({ min: new Date(2000, 0, 1), max: new Date(2100, 0, 1) })
|
|
84
|
+
.map((d) => d.toISOString());
|
|
85
|
+
}
|
|
86
|
+
return fc.string({
|
|
87
|
+
minLength: node.minLength ?? 0,
|
|
88
|
+
maxLength: node.maxLength ?? 16,
|
|
89
|
+
});
|
|
90
|
+
}
|
|
91
|
+
function objectArbitrary(node) {
|
|
92
|
+
const props = node.properties ?? {};
|
|
93
|
+
const required = new Set(node.required ?? []);
|
|
94
|
+
const record = {};
|
|
95
|
+
for (const [key, value] of Object.entries(props)) {
|
|
96
|
+
const sub = value;
|
|
97
|
+
const arb = walk(sub);
|
|
98
|
+
if (required.has(key) && !isOptional(sub)) {
|
|
99
|
+
record[key] = arb;
|
|
100
|
+
}
|
|
101
|
+
else {
|
|
102
|
+
// Optional fields: drop with 50% probability so the value is absent
|
|
103
|
+
// rather than `undefined`, matching `additionalProperties: false`
|
|
104
|
+
// schemas that reject `{ x: undefined }` after JSON round-trip.
|
|
105
|
+
record[key] = fc.option(arb, { nil: undefined });
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
return fc.record(record).map((v) => {
|
|
109
|
+
// Strip `undefined` values so JSON.stringify round-trips cleanly.
|
|
110
|
+
const out = {};
|
|
111
|
+
for (const [k, val] of Object.entries(v)) {
|
|
112
|
+
if (val !== undefined)
|
|
113
|
+
out[k] = val;
|
|
114
|
+
}
|
|
115
|
+
return out;
|
|
116
|
+
});
|
|
117
|
+
}
|
|
118
|
+
/**
|
|
119
|
+
* Shrink-preserving narrower. Some schemas (`Type.Unknown`, `Type.Any`)
|
|
120
|
+
* produce open-world trees that drown properties in noise. This returns a
|
|
121
|
+
* narrowed arbitrary still `Value.Check`-valid against `schema` but biased
|
|
122
|
+
* toward "small typical" values the reference model can reason about.
|
|
123
|
+
*
|
|
124
|
+
* For now the narrowing strategy is identical to `arbitraryFromSchema` with
|
|
125
|
+
* smaller default string/array bounds (handled inside `walk`). Exposed as a
|
|
126
|
+
* distinct export so call sites document their intent.
|
|
127
|
+
*/
|
|
128
|
+
export function arbitraryForParams(schema) {
|
|
129
|
+
return arbitraryFromSchema(schema);
|
|
130
|
+
}
|
|
131
|
+
//# sourceMappingURL=from-typebox.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"from-typebox.js","sourceRoot":"","sources":["../../../src/testing/arbitraries/from-typebox.ts"],"names":[],"mappings":"AAkBA,OAAO,EAAE,IAAI,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACvD,OAAO,KAAK,EAAE,MAAM,YAAY,CAAC;AAoBjC,SAAS,UAAU,CAAC,MAAe;IACjC,mEAAmE;IACnE,qEAAqE;IACrE,iEAAiE;IACjE,yBAAyB;IACzB,6HAA6H;IAC7H,MAAM,MAAM,GAAI,MAAwD,CACtE,YAAY,CACb,CAAC;IACF,OAAO,MAAM,KAAK,UAAU,CAAC;AAC/B,CAAC;AAED;;;;GAIG;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AAG,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC;QACtB,IAAI,QAAQ,CAAC,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,EAAE,CAAC;YAC1C,MAAM,CAAC,GAAG,CAAC,GAAG,GAAG,CAAC;QACpB,CAAC;aAAM,CAAC;YACN,oEAAoE;YACpE,kEAAkE;YAClE,gEAAgE;YAChE,MAAM,CAAC,GAAG,CAAC,GAAG,EAAE,CAAC,MAAM,CAAC,GAAG,EAAE,EAAE,GAAG,EAAE,SAAS,EAAE,CAAC,CAAC;QACnD,CAAC;IACH,CAAC;IAED,OAAO,EAAE,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE;QACjC,kEAAkE;QAClE,MAAM,GAAG,GAA4B,EAAE,CAAC;QACxC,KAAK,MAAM,CAAC,CAAC,EAAE,GAAG,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC;YACzC,IAAI,GAAG,KAAK,SAAS;gBAAE,GAAG,CAAC,CAAC,CAAC,GAAG,GAAG,CAAC;QACtC,CAAC;QACD,OAAO,GAAG,CAAC;IACb,CAAC,CAAC,CAAC;AACL,CAAC;AAED;;;;;;;;;GASG;AACH,MAAM,UAAU,kBAAkB,CAChC,MAAS;IAET,OAAO,mBAAmB,CAAC,MAAM,CAAC,CAAC;AACrC,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export { arbitraryFromSchema, arbitraryForParams } from "./from-typebox.js";
|
|
2
|
+
export { arbitraryCallFor, arbitraryAnyCall, allRpcMethods, type ArbitraryRpcCall, } from "./rpc.js";
|
|
3
|
+
export { arbitraryRequestFrame, arbitraryResponseFrame, arbitraryEventFrame, arbitraryMalformedFrame, type ArbitraryMalformedFrame, } from "./frames.js";
|
|
4
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/testing/arbitraries/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAC5E,OAAO,EACL,gBAAgB,EAChB,gBAAgB,EAChB,aAAa,EACb,KAAK,gBAAgB,GACtB,MAAM,UAAU,CAAC;AAClB,OAAO,EACL,qBAAqB,EACrB,sBAAsB,EACtB,mBAAmB,EACnB,uBAAuB,EACvB,KAAK,uBAAuB,GAC7B,MAAM,aAAa,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export { arbitraryFromSchema, arbitraryForParams } from "./from-typebox.js";
|
|
2
|
+
export { arbitraryCallFor, arbitraryAnyCall, allRpcMethods, } from "./rpc.js";
|
|
3
|
+
export { arbitraryRequestFrame, arbitraryResponseFrame, arbitraryEventFrame, arbitraryMalformedFrame, } from "./frames.js";
|
|
4
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/testing/arbitraries/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAC5E,OAAO,EACL,gBAAgB,EAChB,gBAAgB,EAChB,aAAa,GAEd,MAAM,UAAU,CAAC;AAClB,OAAO,EACL,qBAAqB,EACrB,sBAAsB,EACtB,mBAAmB,EACnB,uBAAuB,GAExB,MAAM,aAAa,CAAC"}
|