@clowder-ai/plugin-contract 0.1.0-beta.2 → 0.1.0-beta.20
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/codegen/generate-contract.d.ts +10 -0
- package/dist/codegen/generate-contract.d.ts.map +1 -1
- package/dist/codegen/generate-contract.js +201 -19
- package/dist/codegen/generate-contract.js.map +1 -1
- package/dist/conformance/fixtures.d.ts +11 -0
- package/dist/conformance/fixtures.d.ts.map +1 -0
- package/dist/conformance/fixtures.js +9 -0
- package/dist/conformance/fixtures.js.map +1 -0
- package/dist/conformance/index.d.ts +4 -0
- package/dist/conformance/index.d.ts.map +1 -1
- package/dist/conformance/index.js +3 -0
- package/dist/conformance/index.js.map +1 -1
- package/dist/conformance/messaging-behavior-fixture.d.ts +12 -0
- package/dist/conformance/messaging-behavior-fixture.d.ts.map +1 -0
- package/dist/conformance/messaging-behavior-fixture.js +30 -0
- package/dist/conformance/messaging-behavior-fixture.js.map +1 -0
- package/dist/conformance/runner.d.ts.map +1 -1
- package/dist/conformance/runner.js +22 -2
- package/dist/conformance/runner.js.map +1 -1
- package/dist/conformance/stdio-harness/child-process-harness.d.ts +65 -0
- package/dist/conformance/stdio-harness/child-process-harness.d.ts.map +1 -0
- package/dist/conformance/stdio-harness/child-process-harness.js +296 -0
- package/dist/conformance/stdio-harness/child-process-harness.js.map +1 -0
- package/dist/conformance/stdio-harness/dual-transport-oracle.d.ts +26 -0
- package/dist/conformance/stdio-harness/dual-transport-oracle.d.ts.map +1 -0
- package/dist/conformance/stdio-harness/dual-transport-oracle.js +32 -0
- package/dist/conformance/stdio-harness/dual-transport-oracle.js.map +1 -0
- package/dist/conformance/stdio-harness/harness-process-spawn.d.ts +27 -0
- package/dist/conformance/stdio-harness/harness-process-spawn.d.ts.map +1 -0
- package/dist/conformance/stdio-harness/harness-process-spawn.js +43 -0
- package/dist/conformance/stdio-harness/harness-process-spawn.js.map +1 -0
- package/dist/conformance/stdio-harness/index.d.ts +5 -0
- package/dist/conformance/stdio-harness/index.d.ts.map +1 -0
- package/dist/conformance/stdio-harness/index.js +4 -0
- package/dist/conformance/stdio-harness/index.js.map +1 -0
- package/dist/conformance/stdio-harness/ndjson-frame.d.ts +31 -0
- package/dist/conformance/stdio-harness/ndjson-frame.d.ts.map +1 -0
- package/dist/conformance/stdio-harness/ndjson-frame.js +125 -0
- package/dist/conformance/stdio-harness/ndjson-frame.js.map +1 -0
- package/dist/conformance/stdio-harness/node-process-tree-runtime.d.ts +15 -0
- package/dist/conformance/stdio-harness/node-process-tree-runtime.d.ts.map +1 -0
- package/dist/conformance/stdio-harness/node-process-tree-runtime.js +78 -0
- package/dist/conformance/stdio-harness/node-process-tree-runtime.js.map +1 -0
- package/dist/conformance/stdio-harness/process-tree-controller.d.ts +51 -0
- package/dist/conformance/stdio-harness/process-tree-controller.d.ts.map +1 -0
- package/dist/conformance/stdio-harness/process-tree-controller.js +162 -0
- package/dist/conformance/stdio-harness/process-tree-controller.js.map +1 -0
- package/dist/conformance/stdio-harness/windows-sentinel.d.ts +15 -0
- package/dist/conformance/stdio-harness/windows-sentinel.d.ts.map +1 -0
- package/dist/conformance/stdio-harness/windows-sentinel.js +160 -0
- package/dist/conformance/stdio-harness/windows-sentinel.js.map +1 -0
- package/dist/conformance/stdio-harness/wire-shape.d.ts +18 -0
- package/dist/conformance/stdio-harness/wire-shape.d.ts.map +1 -0
- package/dist/conformance/stdio-harness/wire-shape.js +2 -0
- package/dist/conformance/stdio-harness/wire-shape.js.map +1 -0
- package/dist/docx-materialization.d.ts +8 -0
- package/dist/docx-materialization.d.ts.map +1 -0
- package/dist/docx-materialization.js +19 -0
- package/dist/docx-materialization.js.map +1 -0
- package/dist/generated/contract.generated.d.ts +957 -12
- package/dist/generated/contract.generated.d.ts.map +1 -1
- package/dist/generated/contract.generated.js +9 -1
- package/dist/generated/contract.generated.js.map +1 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +5 -1
- package/dist/index.js.map +1 -1
- package/dist/validation/catalog.d.ts +21 -0
- package/dist/validation/catalog.d.ts.map +1 -0
- package/dist/validation/catalog.js +140 -0
- package/dist/validation/catalog.js.map +1 -0
- package/dist/validation/companion-bridge.d.ts +6 -0
- package/dist/validation/companion-bridge.d.ts.map +1 -0
- package/dist/validation/companion-bridge.js +57 -0
- package/dist/validation/companion-bridge.js.map +1 -0
- package/dist/validation/docx-materialization.d.ts +6 -0
- package/dist/validation/docx-materialization.d.ts.map +1 -0
- package/dist/validation/docx-materialization.js +36 -0
- package/dist/validation/docx-materialization.js.map +1 -0
- package/dist/validation/index.d.ts +6 -0
- package/dist/validation/index.d.ts.map +1 -1
- package/dist/validation/index.js +6 -0
- package/dist/validation/index.js.map +1 -1
- package/dist/validation/manifest.d.ts +23 -0
- package/dist/validation/manifest.d.ts.map +1 -0
- package/dist/validation/manifest.js +160 -0
- package/dist/validation/manifest.js.map +1 -0
- package/dist/validation/messaging-semantic.d.ts.map +1 -1
- package/dist/validation/messaging-semantic.js +49 -0
- package/dist/validation/messaging-semantic.js.map +1 -1
- package/dist/validation/messaging-wire.d.ts +38 -0
- package/dist/validation/messaging-wire.d.ts.map +1 -0
- package/dist/validation/messaging-wire.js +164 -0
- package/dist/validation/messaging-wire.js.map +1 -0
- package/dist/validation/signals.d.ts +26 -0
- package/dist/validation/signals.d.ts.map +1 -0
- package/dist/validation/signals.js +206 -0
- package/dist/validation/signals.js.map +1 -0
- package/dist/wire/constants.d.ts +36 -0
- package/dist/wire/constants.d.ts.map +1 -0
- package/dist/wire/constants.js +36 -0
- package/dist/wire/constants.js.map +1 -0
- package/dist/wire/disposition-fixtures.d.ts +118 -0
- package/dist/wire/disposition-fixtures.d.ts.map +1 -0
- package/dist/wire/disposition-fixtures.js +1881 -0
- package/dist/wire/disposition-fixtures.js.map +1 -0
- package/dist/wire/disposition.d.ts +102 -0
- package/dist/wire/disposition.d.ts.map +1 -0
- package/dist/wire/disposition.js +217 -0
- package/dist/wire/disposition.js.map +1 -0
- package/dist/wire/envelope.d.ts +253 -0
- package/dist/wire/envelope.d.ts.map +1 -0
- package/dist/wire/envelope.js +19 -0
- package/dist/wire/envelope.js.map +1 -0
- package/dist/wire/errors.d.ts +222 -0
- package/dist/wire/errors.d.ts.map +1 -0
- package/dist/wire/errors.js +153 -0
- package/dist/wire/errors.js.map +1 -0
- package/dist/wire/grants.d.ts +57 -0
- package/dist/wire/grants.d.ts.map +1 -0
- package/dist/wire/grants.js +59 -0
- package/dist/wire/grants.js.map +1 -0
- package/dist/wire/handshake-byte-bounds.d.ts +69 -0
- package/dist/wire/handshake-byte-bounds.d.ts.map +1 -0
- package/dist/wire/handshake-byte-bounds.js +173 -0
- package/dist/wire/handshake-byte-bounds.js.map +1 -0
- package/dist/wire/handshake.d.ts +146 -0
- package/dist/wire/handshake.d.ts.map +1 -0
- package/dist/wire/handshake.js +189 -0
- package/dist/wire/handshake.js.map +1 -0
- package/dist/wire/index.d.ts +37 -0
- package/dist/wire/index.d.ts.map +1 -0
- package/dist/wire/index.js +61 -0
- package/dist/wire/index.js.map +1 -0
- package/dist/wire/lifecycle-byte-bounds.d.ts +55 -0
- package/dist/wire/lifecycle-byte-bounds.d.ts.map +1 -0
- package/dist/wire/lifecycle-byte-bounds.js +209 -0
- package/dist/wire/lifecycle-byte-bounds.js.map +1 -0
- package/dist/wire/messaging-byte-bounds.d.ts +61 -0
- package/dist/wire/messaging-byte-bounds.d.ts.map +1 -0
- package/dist/wire/messaging-byte-bounds.js +459 -0
- package/dist/wire/messaging-byte-bounds.js.map +1 -0
- package/dist/wire/registry.d.ts +294 -0
- package/dist/wire/registry.d.ts.map +1 -0
- package/dist/wire/registry.js +256 -0
- package/dist/wire/registry.js.map +1 -0
- package/dist/wire/request-id.d.ts +34 -0
- package/dist/wire/request-id.d.ts.map +1 -0
- package/dist/wire/request-id.js +40 -0
- package/dist/wire/request-id.js.map +1 -0
- package/dist/wire/row-shapes.d.ts +217 -0
- package/dist/wire/row-shapes.d.ts.map +1 -0
- package/dist/wire/row-shapes.js +75 -0
- package/dist/wire/row-shapes.js.map +1 -0
- package/dist/wire/signal-byte-bounds.d.ts +97 -0
- package/dist/wire/signal-byte-bounds.d.ts.map +1 -0
- package/dist/wire/signal-byte-bounds.js +229 -0
- package/dist/wire/signal-byte-bounds.js.map +1 -0
- package/dist/wire/wire-uint53.d.ts +26 -0
- package/dist/wire/wire-uint53.d.ts.map +1 -0
- package/dist/wire/wire-uint53.js +32 -0
- package/dist/wire/wire-uint53.js.map +1 -0
- package/fixtures/behavior/messaging/adversarial-invariants.json +85 -0
- package/fixtures/manifest/invalid/duplicate-signal-type.json +33 -0
- package/fixtures/manifest/invalid/icon-package-escape.json +22 -0
- package/fixtures/manifest/valid/localized-product-metadata.json +27 -0
- package/fixtures/messaging/valid/subscription-delivery.json +1 -1
- package/fixtures/signals/invalid/destination-injection.json +15 -0
- package/fixtures/signals/invalid/dynamic-schema-url.json +10 -0
- package/fixtures/signals/invalid/forbidden-raw-privacy.json +10 -0
- package/fixtures/signals/invalid/non-utc-occurred-at.json +12 -0
- package/fixtures/signals/valid/feishu-meeting-artifact.json +18 -0
- package/fixtures/signals/valid/remote-service-declaration.json +10 -0
- package/package.json +19 -6
- package/src/schemas/behavior-fixture.schema.json +262 -2
- package/src/schemas/catalog.schema.json +91 -0
- package/src/schemas/companion-bridge.schema.json +937 -0
- package/src/schemas/docx-materialization.schema.json +302 -0
- package/src/schemas/manifest.schema.json +490 -4
- package/src/schemas/messaging.schema.json +209 -32
- package/src/schemas/physical-limb.schema.json +319 -0
- package/src/schemas/plugin-metadata.schema.json +62 -0
- package/src/schemas/signal.schema.json +129 -0
|
@@ -0,0 +1,217 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Per-row input/result shapes for the 13-row method registry.
|
|
3
|
+
* Mechanized from #1165 frozen shape.
|
|
4
|
+
*
|
|
5
|
+
* Every row has a closed executable target shape. Rows 3–9 are exposed for
|
|
6
|
+
* the beta.11 M0-C slice; registry readiness still depends on the exact
|
|
7
|
+
* source-admission and byte-proof evidence tracked by that slice.
|
|
8
|
+
*
|
|
9
|
+
* Each closed row's shape is additionalProperties: false.
|
|
10
|
+
* Bounds constants are provided for runtime validation.
|
|
11
|
+
*/
|
|
12
|
+
import type { AppendElementsRequest, AppendReceipt, M0CAckInput, M0CAckResult, M0CDeliverInput, M0CDeliverResult, M0CReadEmptyResult, M0CReadInput, M0CReadNormalResult, M0CReadResult, M0CReadStaleResult, M0CSnapshotFinalResult, M0CSnapshotInput, M0CSnapshotIntermediateResult, M0CSnapshotResult, M0CSubscribeInput, M0CSubscribeResult, MessageDraft, SendReceipt } from '../generated/contract.generated.js';
|
|
13
|
+
import type { GrantSnapshot } from './grants.js';
|
|
14
|
+
import type { BrokerReadyParams, CandidateHello, SessionBinding } from './handshake.js';
|
|
15
|
+
/**
|
|
16
|
+
* Row 5 input: subscribe to a handle for event delivery.
|
|
17
|
+
* Wire shape: `{ handle: string }` — additionalProperties: false.
|
|
18
|
+
*
|
|
19
|
+
* The handle is a reference identifier (1..256 code points, M4 CLOSED).
|
|
20
|
+
* The peer responds with a subscriptionId for subsequent read/ack calls.
|
|
21
|
+
*/
|
|
22
|
+
export type SubscribeInput = M0CSubscribeInput;
|
|
23
|
+
/**
|
|
24
|
+
* Row 5 result: the created subscription identifier.
|
|
25
|
+
* Wire shape: `{ subscriptionId: string }` — additionalProperties: false.
|
|
26
|
+
*/
|
|
27
|
+
export type SubscribeResult = M0CSubscribeResult;
|
|
28
|
+
/** Minimum code-point length for subscribe handle. */
|
|
29
|
+
export declare const SUBSCRIBE_HANDLE_MIN_LENGTH: 1;
|
|
30
|
+
/** Maximum code-point length for subscribe handle. */
|
|
31
|
+
export declare const SUBSCRIBE_HANDLE_MAX_LENGTH: 256;
|
|
32
|
+
/**
|
|
33
|
+
* Maximum compact-JSON encoded bytes for subscribe handle.
|
|
34
|
+
* Worst case: every code point is a 6-byte escape (\uXXXX).
|
|
35
|
+
* 6 * 256 + 2 quotes = 1538 bytes.
|
|
36
|
+
*/
|
|
37
|
+
export declare const SUBSCRIBE_HANDLE_MAX_ENCODED_BYTES: 1538;
|
|
38
|
+
/** Minimum code-point length for subscriptionId. */
|
|
39
|
+
export declare const SUBSCRIBE_SUBSCRIPTION_ID_MIN_LENGTH: 1;
|
|
40
|
+
/** Maximum code-point length for subscriptionId. */
|
|
41
|
+
export declare const SUBSCRIBE_SUBSCRIPTION_ID_MAX_LENGTH: 128;
|
|
42
|
+
/**
|
|
43
|
+
* Maximum compact-JSON encoded bytes for subscriptionId.
|
|
44
|
+
* 6 * 128 + 2 quotes = 770 bytes.
|
|
45
|
+
*/
|
|
46
|
+
export declare const SUBSCRIBE_SUBSCRIPTION_ID_MAX_ENCODED_BYTES: 770;
|
|
47
|
+
/**
|
|
48
|
+
* Row 7 input: acknowledge consumed events on a subscription.
|
|
49
|
+
* Wire shape: `{ subscriptionId, ackToken }` — additionalProperties: false.
|
|
50
|
+
*
|
|
51
|
+
* Closed shape per R3 addendum (owner-specified).
|
|
52
|
+
*/
|
|
53
|
+
export type MessagingAckRequest = M0CAckInput;
|
|
54
|
+
/**
|
|
55
|
+
* Row 7 result: null.
|
|
56
|
+
* Ack is fire-and-confirm — a null result signals success.
|
|
57
|
+
*/
|
|
58
|
+
export type MessagingAckResult = M0CAckResult;
|
|
59
|
+
/** Minimum code-point length for ack subscriptionId. */
|
|
60
|
+
export declare const ACK_SUBSCRIPTION_ID_MIN_LENGTH: 1;
|
|
61
|
+
/** Maximum code-point length for ack subscriptionId. */
|
|
62
|
+
export declare const ACK_SUBSCRIPTION_ID_MAX_LENGTH: 128;
|
|
63
|
+
/**
|
|
64
|
+
* Maximum compact-JSON encoded bytes for ack subscriptionId.
|
|
65
|
+
* 6 * 128 + 2 quotes = 770 bytes.
|
|
66
|
+
*/
|
|
67
|
+
export declare const ACK_SUBSCRIPTION_ID_MAX_ENCODED_BYTES: 770;
|
|
68
|
+
/** Minimum code-point length for ackToken. */
|
|
69
|
+
export declare const ACK_TOKEN_MIN_LENGTH: 1;
|
|
70
|
+
/** Maximum code-point length for ackToken. */
|
|
71
|
+
export declare const ACK_TOKEN_MAX_LENGTH: 512;
|
|
72
|
+
/**
|
|
73
|
+
* Maximum compact-JSON encoded bytes for ackToken.
|
|
74
|
+
* 6 * 512 + 2 quotes = 3074 bytes.
|
|
75
|
+
*/
|
|
76
|
+
export declare const ACK_TOKEN_MAX_ENCODED_BYTES: 3074;
|
|
77
|
+
/**
|
|
78
|
+
* Row 10 input: grant-change notification payload.
|
|
79
|
+
*
|
|
80
|
+
* This is a NOTIFICATION (no id, no response). In v0, row 10 is the
|
|
81
|
+
* only legal notification — all other rows are request/response.
|
|
82
|
+
*
|
|
83
|
+
* The input shape is the GrantSnapshot defined in grants.ts:
|
|
84
|
+
* { grantRevision: WireUInt53, effectiveGrants: Capability[] 0..17 }
|
|
85
|
+
*
|
|
86
|
+
* additionalProperties: false. CLOSED.
|
|
87
|
+
*/
|
|
88
|
+
export type GrantsChangedInput = GrantSnapshot;
|
|
89
|
+
export type { GrantSnapshot } from './grants.js';
|
|
90
|
+
/**
|
|
91
|
+
* Row 11 input: liveness ping carrying a nonce.
|
|
92
|
+
* Wire shape: `{ nonce: string }` — additionalProperties: false.
|
|
93
|
+
*
|
|
94
|
+
* The peer MUST echo the nonce verbatim in the result.
|
|
95
|
+
*/
|
|
96
|
+
export interface PingInput {
|
|
97
|
+
/** M4 CLOSED — string 1..512 code points. */
|
|
98
|
+
readonly nonce: string;
|
|
99
|
+
}
|
|
100
|
+
/**
|
|
101
|
+
* Row 11 result: echo of the input nonce.
|
|
102
|
+
* Wire shape: `{ nonce: string }` — additionalProperties: false.
|
|
103
|
+
*
|
|
104
|
+
* The nonce in the result MUST be byte-equal to the nonce in the input.
|
|
105
|
+
*/
|
|
106
|
+
export interface PingResult {
|
|
107
|
+
/** Byte-equal echo of the input nonce. */
|
|
108
|
+
readonly nonce: string;
|
|
109
|
+
}
|
|
110
|
+
/** Minimum code-point length for ping nonce. */
|
|
111
|
+
export declare const PING_NONCE_MIN_LENGTH: 1;
|
|
112
|
+
/** Maximum code-point length for ping nonce. */
|
|
113
|
+
export declare const PING_NONCE_MAX_LENGTH: 512;
|
|
114
|
+
/**
|
|
115
|
+
* Maximum compact-JSON encoded bytes for ping nonce.
|
|
116
|
+
* Worst case: every code point is a 6-byte escape (\uXXXX).
|
|
117
|
+
* 6 * 512 + 2 quotes = 3074 bytes.
|
|
118
|
+
*/
|
|
119
|
+
export declare const PING_NONCE_MAX_ENCODED_BYTES: 3074;
|
|
120
|
+
/**
|
|
121
|
+
* Row 12 input: graceful drain with a drain-specific deadline.
|
|
122
|
+
* Wire shape: `{ deadlineUnixMs: number }` — additionalProperties: false.
|
|
123
|
+
*
|
|
124
|
+
* Note: this deadlineUnixMs is the drain-specific deadline in
|
|
125
|
+
* `params.input`, distinct from the request-level deadline in
|
|
126
|
+
* `params.meta.deadlineUnixMs` (CallMeta). Both may coexist.
|
|
127
|
+
*
|
|
128
|
+
* W2 covers "row 12 `params.input.deadlineUnixMs`".
|
|
129
|
+
*/
|
|
130
|
+
export interface DrainInput {
|
|
131
|
+
/**
|
|
132
|
+
* Drain-specific deadline.
|
|
133
|
+
* WireUInt53(1, 9_007_199_254_740_991) — same profile as CallMeta.
|
|
134
|
+
*/
|
|
135
|
+
readonly deadlineUnixMs: number;
|
|
136
|
+
}
|
|
137
|
+
/**
|
|
138
|
+
* Row 12 result: null.
|
|
139
|
+
* Drain is fire-and-confirm — a null result signals the plugin
|
|
140
|
+
* has completed its graceful shutdown sequence.
|
|
141
|
+
*/
|
|
142
|
+
export type DrainResult = null;
|
|
143
|
+
/**
|
|
144
|
+
* Row 1 — broker.hello: CLOSED in beta.8.
|
|
145
|
+
*
|
|
146
|
+
* Plugin → Host handshake. CandidateHello → SessionBinding.
|
|
147
|
+
* See handshake.ts for structural types.
|
|
148
|
+
* Candidate grammar and the Host-authoritative binding are closed by beta.8.
|
|
149
|
+
*/
|
|
150
|
+
export type HelloInput = CandidateHello;
|
|
151
|
+
export type HelloResult = SessionBinding;
|
|
152
|
+
/**
|
|
153
|
+
* Row 2 — broker.ready: CLOSED in beta.8.
|
|
154
|
+
*
|
|
155
|
+
* Plugin → Host activation. The structural type (BrokerReadyParams)
|
|
156
|
+
* is the executable input shape; success is a null JSON-RPC result.
|
|
157
|
+
*/
|
|
158
|
+
export type ReadyInput = BrokerReadyParams;
|
|
159
|
+
export type ReadyResult = null;
|
|
160
|
+
/**
|
|
161
|
+
* Row 3 — messaging.send.
|
|
162
|
+
* Plugin → Host message send using the canonical generated domain types.
|
|
163
|
+
*/
|
|
164
|
+
export type SendInput = MessageDraft;
|
|
165
|
+
export type SendResult = SendReceipt;
|
|
166
|
+
/**
|
|
167
|
+
* Row 4 — messaging.appendElements.
|
|
168
|
+
* Plugin → Host append with revision-CAS settlement in K-1.
|
|
169
|
+
*/
|
|
170
|
+
export type AppendInput = AppendElementsRequest;
|
|
171
|
+
export type AppendResult = AppendReceipt;
|
|
172
|
+
/**
|
|
173
|
+
* Row 6 request. No page token is exposed: reads resume from the Host-owned
|
|
174
|
+
* acknowledged cursor.
|
|
175
|
+
*/
|
|
176
|
+
export type SubscriptionReadPageRequest = M0CReadInput;
|
|
177
|
+
export type SubscriptionNormalPageResponse = M0CReadNormalResult;
|
|
178
|
+
export type SubscriptionEmptyPageResponse = M0CReadEmptyResult;
|
|
179
|
+
export type SubscriptionStalePageResponse = M0CReadStaleResult;
|
|
180
|
+
/** Closed three-variant row-6 result. */
|
|
181
|
+
export type BoundedSubscriptionReadPageResponse = M0CReadResult;
|
|
182
|
+
export type ReadInput = SubscriptionReadPageRequest;
|
|
183
|
+
export type ReadResult = BoundedSubscriptionReadPageResponse;
|
|
184
|
+
export declare const READ_SUBSCRIPTION_ID_MIN_LENGTH: 1;
|
|
185
|
+
export declare const READ_SUBSCRIPTION_ID_MAX_LENGTH: 128;
|
|
186
|
+
export declare const READ_LIMIT_MIN: 1;
|
|
187
|
+
export declare const READ_LIMIT_MAX: 32;
|
|
188
|
+
export declare const READ_ACK_TOKEN_MIN_LENGTH: 1;
|
|
189
|
+
export declare const READ_ACK_TOKEN_MAX_LENGTH: 512;
|
|
190
|
+
/**
|
|
191
|
+
* Row 8 request. An absent pageToken starts an immutable Host view.
|
|
192
|
+
*/
|
|
193
|
+
export type SnapshotPageRequest = M0CSnapshotInput;
|
|
194
|
+
export type SnapshotIntermediatePageResponse = M0CSnapshotIntermediateResult;
|
|
195
|
+
export type SnapshotFinalPageResponse = M0CSnapshotFinalResult;
|
|
196
|
+
/** Closed intermediate/final row-8 result. */
|
|
197
|
+
export type SnapshotPageResponse = M0CSnapshotResult;
|
|
198
|
+
export type SnapshotInput = SnapshotPageRequest;
|
|
199
|
+
export type SnapshotResult = SnapshotPageResponse;
|
|
200
|
+
export declare const SNAPSHOT_SUBSCRIPTION_ID_MIN_LENGTH: 1;
|
|
201
|
+
export declare const SNAPSHOT_SUBSCRIPTION_ID_MAX_LENGTH: 128;
|
|
202
|
+
export declare const SNAPSHOT_MAX_ITEMS_MIN: 1;
|
|
203
|
+
export declare const SNAPSHOT_MAX_ITEMS_MAX: 64;
|
|
204
|
+
export declare const SNAPSHOT_PAGE_TOKEN_MIN_LENGTH: 1;
|
|
205
|
+
export declare const SNAPSHOT_PAGE_TOKEN_MAX_LENGTH: 512;
|
|
206
|
+
export declare const SNAPSHOT_ACK_TOKEN_MIN_LENGTH: 1;
|
|
207
|
+
export declare const SNAPSHOT_ACK_TOKEN_MAX_LENGTH: 512;
|
|
208
|
+
/**
|
|
209
|
+
* Row 9 — Host → Plugin callback request and byte-equal acknowledgement.
|
|
210
|
+
*/
|
|
211
|
+
export type HostMessagingDeliverRequest = M0CDeliverInput;
|
|
212
|
+
export type HostMessagingDeliverResult = M0CDeliverResult;
|
|
213
|
+
export type DeliverInput = HostMessagingDeliverRequest;
|
|
214
|
+
export type DeliverResult = HostMessagingDeliverResult;
|
|
215
|
+
export declare const DELIVER_DELIVERY_ID_MIN_LENGTH: 1;
|
|
216
|
+
export declare const DELIVER_DELIVERY_ID_MAX_LENGTH: 128;
|
|
217
|
+
//# sourceMappingURL=row-shapes.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"row-shapes.d.ts","sourceRoot":"","sources":["../../src/wire/row-shapes.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,KAAK,EACV,qBAAqB,EACrB,aAAa,EAEb,WAAW,EACX,YAAY,EACZ,eAAe,EACf,gBAAgB,EAChB,kBAAkB,EAClB,YAAY,EACZ,mBAAmB,EACnB,aAAa,EACb,kBAAkB,EAClB,sBAAsB,EACtB,gBAAgB,EAChB,6BAA6B,EAC7B,iBAAiB,EACjB,iBAAiB,EACjB,kBAAkB,EAClB,YAAY,EACZ,WAAW,EACZ,MAAM,oCAAoC,CAAC;AAC5C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AACjD,OAAO,KAAK,EACV,iBAAiB,EACjB,cAAc,EACd,cAAc,EACf,MAAM,gBAAgB,CAAC;AAMxB;;;;;;GAMG;AACH,MAAM,MAAM,cAAc,GAAG,iBAAiB,CAAC;AAE/C;;;GAGG;AACH,MAAM,MAAM,eAAe,GAAG,kBAAkB,CAAC;AAEjD,sDAAsD;AACtD,eAAO,MAAM,2BAA2B,EAAG,CAAU,CAAC;AAEtD,sDAAsD;AACtD,eAAO,MAAM,2BAA2B,EAAG,GAAY,CAAC;AAExD;;;;GAIG;AACH,eAAO,MAAM,kCAAkC,EAAG,IAAa,CAAC;AAEhE,oDAAoD;AACpD,eAAO,MAAM,oCAAoC,EAAG,CAAU,CAAC;AAE/D,oDAAoD;AACpD,eAAO,MAAM,oCAAoC,EAAG,GAAY,CAAC;AAEjE;;;GAGG;AACH,eAAO,MAAM,2CAA2C,EAAG,GAAY,CAAC;AAMxE;;;;;GAKG;AACH,MAAM,MAAM,mBAAmB,GAAG,WAAW,CAAC;AAE9C;;;GAGG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AAM,mCAAmC,EAAG,GAAY,CAAC;AAChE,eAAO,MAAM,sBAAsB,EAAG,CAAU,CAAC;AACjD,eAAO,MAAM,sBAAsB,EAAG,EAAW,CAAC;AAClD,eAAO,MAAM,8BAA8B,EAAG,CAAU,CAAC;AACzD,eAAO,MAAM,8BAA8B,EAAG,GAAY,CAAC;AAC3D,eAAO,MAAM,6BAA6B,EAAG,CAAU,CAAC;AACxD,eAAO,MAAM,6BAA6B,EAAG,GAAY,CAAC;AAE1D;;GAEG;AACH,MAAM,MAAM,2BAA2B,GAAG,eAAe,CAAC;AAE1D,MAAM,MAAM,0BAA0B,GAAG,gBAAgB,CAAC;AAE1D,MAAM,MAAM,YAAY,GAAG,2BAA2B,CAAC;AACvD,MAAM,MAAM,aAAa,GAAG,0BAA0B,CAAC;AAEvD,eAAO,MAAM,8BAA8B,EAAG,CAAU,CAAC;AACzD,eAAO,MAAM,8BAA8B,EAAG,GAAY,CAAC"}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Per-row input/result shapes for the 13-row method registry.
|
|
3
|
+
* Mechanized from #1165 frozen shape.
|
|
4
|
+
*
|
|
5
|
+
* Every row has a closed executable target shape. Rows 3–9 are exposed for
|
|
6
|
+
* the beta.11 M0-C slice; registry readiness still depends on the exact
|
|
7
|
+
* source-admission and byte-proof evidence tracked by that slice.
|
|
8
|
+
*
|
|
9
|
+
* Each closed row's shape is additionalProperties: false.
|
|
10
|
+
* Bounds constants are provided for runtime validation.
|
|
11
|
+
*/
|
|
12
|
+
/** Minimum code-point length for subscribe handle. */
|
|
13
|
+
export const SUBSCRIBE_HANDLE_MIN_LENGTH = 1;
|
|
14
|
+
/** Maximum code-point length for subscribe handle. */
|
|
15
|
+
export const SUBSCRIBE_HANDLE_MAX_LENGTH = 256;
|
|
16
|
+
/**
|
|
17
|
+
* Maximum compact-JSON encoded bytes for subscribe handle.
|
|
18
|
+
* Worst case: every code point is a 6-byte escape (\uXXXX).
|
|
19
|
+
* 6 * 256 + 2 quotes = 1538 bytes.
|
|
20
|
+
*/
|
|
21
|
+
export const SUBSCRIBE_HANDLE_MAX_ENCODED_BYTES = 1538;
|
|
22
|
+
/** Minimum code-point length for subscriptionId. */
|
|
23
|
+
export const SUBSCRIBE_SUBSCRIPTION_ID_MIN_LENGTH = 1;
|
|
24
|
+
/** Maximum code-point length for subscriptionId. */
|
|
25
|
+
export const SUBSCRIBE_SUBSCRIPTION_ID_MAX_LENGTH = 128;
|
|
26
|
+
/**
|
|
27
|
+
* Maximum compact-JSON encoded bytes for subscriptionId.
|
|
28
|
+
* 6 * 128 + 2 quotes = 770 bytes.
|
|
29
|
+
*/
|
|
30
|
+
export const SUBSCRIBE_SUBSCRIPTION_ID_MAX_ENCODED_BYTES = 770;
|
|
31
|
+
/** Minimum code-point length for ack subscriptionId. */
|
|
32
|
+
export const ACK_SUBSCRIPTION_ID_MIN_LENGTH = 1;
|
|
33
|
+
/** Maximum code-point length for ack subscriptionId. */
|
|
34
|
+
export const ACK_SUBSCRIPTION_ID_MAX_LENGTH = 128;
|
|
35
|
+
/**
|
|
36
|
+
* Maximum compact-JSON encoded bytes for ack subscriptionId.
|
|
37
|
+
* 6 * 128 + 2 quotes = 770 bytes.
|
|
38
|
+
*/
|
|
39
|
+
export const ACK_SUBSCRIPTION_ID_MAX_ENCODED_BYTES = 770;
|
|
40
|
+
/** Minimum code-point length for ackToken. */
|
|
41
|
+
export const ACK_TOKEN_MIN_LENGTH = 1;
|
|
42
|
+
/** Maximum code-point length for ackToken. */
|
|
43
|
+
export const ACK_TOKEN_MAX_LENGTH = 512;
|
|
44
|
+
/**
|
|
45
|
+
* Maximum compact-JSON encoded bytes for ackToken.
|
|
46
|
+
* 6 * 512 + 2 quotes = 3074 bytes.
|
|
47
|
+
*/
|
|
48
|
+
export const ACK_TOKEN_MAX_ENCODED_BYTES = 3074;
|
|
49
|
+
/** Minimum code-point length for ping nonce. */
|
|
50
|
+
export const PING_NONCE_MIN_LENGTH = 1;
|
|
51
|
+
/** Maximum code-point length for ping nonce. */
|
|
52
|
+
export const PING_NONCE_MAX_LENGTH = 512;
|
|
53
|
+
/**
|
|
54
|
+
* Maximum compact-JSON encoded bytes for ping nonce.
|
|
55
|
+
* Worst case: every code point is a 6-byte escape (\uXXXX).
|
|
56
|
+
* 6 * 512 + 2 quotes = 3074 bytes.
|
|
57
|
+
*/
|
|
58
|
+
export const PING_NONCE_MAX_ENCODED_BYTES = 3074;
|
|
59
|
+
export const READ_SUBSCRIPTION_ID_MIN_LENGTH = 1;
|
|
60
|
+
export const READ_SUBSCRIPTION_ID_MAX_LENGTH = 128;
|
|
61
|
+
export const READ_LIMIT_MIN = 1;
|
|
62
|
+
export const READ_LIMIT_MAX = 32;
|
|
63
|
+
export const READ_ACK_TOKEN_MIN_LENGTH = 1;
|
|
64
|
+
export const READ_ACK_TOKEN_MAX_LENGTH = 512;
|
|
65
|
+
export const SNAPSHOT_SUBSCRIPTION_ID_MIN_LENGTH = 1;
|
|
66
|
+
export const SNAPSHOT_SUBSCRIPTION_ID_MAX_LENGTH = 128;
|
|
67
|
+
export const SNAPSHOT_MAX_ITEMS_MIN = 1;
|
|
68
|
+
export const SNAPSHOT_MAX_ITEMS_MAX = 64;
|
|
69
|
+
export const SNAPSHOT_PAGE_TOKEN_MIN_LENGTH = 1;
|
|
70
|
+
export const SNAPSHOT_PAGE_TOKEN_MAX_LENGTH = 512;
|
|
71
|
+
export const SNAPSHOT_ACK_TOKEN_MIN_LENGTH = 1;
|
|
72
|
+
export const SNAPSHOT_ACK_TOKEN_MAX_LENGTH = 512;
|
|
73
|
+
export const DELIVER_DELIVERY_ID_MIN_LENGTH = 1;
|
|
74
|
+
export const DELIVER_DELIVERY_ID_MAX_LENGTH = 128;
|
|
75
|
+
//# sourceMappingURL=row-shapes.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"row-shapes.js","sourceRoot":"","sources":["../../src/wire/row-shapes.ts"],"names":[],"mappings":"A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,MAAM,yBAAyB,GAAG,CAAU,CAAC;AACpD,MAAM,CAAC,MAAM,yBAAyB,GAAG,GAAY,CAAC;AAiBtD,MAAM,CAAC,MAAM,mCAAmC,GAAG,CAAU,CAAC;AAC9D,MAAM,CAAC,MAAM,mCAAmC,GAAG,GAAY,CAAC;AAChE,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAU,CAAC;AACjD,MAAM,CAAC,MAAM,sBAAsB,GAAG,EAAW,CAAC;AAClD,MAAM,CAAC,MAAM,8BAA8B,GAAG,CAAU,CAAC;AACzD,MAAM,CAAC,MAAM,8BAA8B,GAAG,GAAY,CAAC;AAC3D,MAAM,CAAC,MAAM,6BAA6B,GAAG,CAAU,CAAC;AACxD,MAAM,CAAC,MAAM,6BAA6B,GAAG,GAAY,CAAC;AAY1D,MAAM,CAAC,MAAM,8BAA8B,GAAG,CAAU,CAAC;AACzD,MAAM,CAAC,MAAM,8BAA8B,GAAG,GAAY,CAAC"}
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Derived compact-JSON byte bounds for the beta.9 C-2 events.publish row.
|
|
3
|
+
*
|
|
4
|
+
* Signal payloads are bounded by their compact encoded byte length, not by a
|
|
5
|
+
* string code-point count. That makes the generic leaf proof insufficient for
|
|
6
|
+
* row 13: this module constructs an exactly 64 KiB JSON object independently
|
|
7
|
+
* for ASCII, multibyte, and escaped-string families, then measures the entire
|
|
8
|
+
* request envelope and one rejected N+1 witness for every bounded leaf.
|
|
9
|
+
*/
|
|
10
|
+
import type { EventsPublishInput, EventsPublishResult } from '../generated/contract.generated.js';
|
|
11
|
+
export declare const EVENTS_PUBLISH_BYTE_PROOF_ENCODING_FAMILIES: readonly ["ascii", "multibyte", "escaping"];
|
|
12
|
+
export type EventsPublishByteProofEncodingFamily = (typeof EVENTS_PUBLISH_BYTE_PROOF_ENCODING_FAMILIES)[number];
|
|
13
|
+
export declare const SIGNAL_TYPE_MAX_LENGTH: 128;
|
|
14
|
+
export declare const SIGNAL_EVENT_ID_MAX_LENGTH: 128;
|
|
15
|
+
export declare const SIGNAL_IDEMPOTENCY_KEY_MAX_LENGTH: 256;
|
|
16
|
+
export declare const SIGNAL_OCCURRED_AT_MAX_LENGTH: 30;
|
|
17
|
+
export declare const SIGNAL_SOURCE_HANDLE_MAX_LENGTH: 512;
|
|
18
|
+
interface EventsPublishProofInput {
|
|
19
|
+
readonly requestId: string;
|
|
20
|
+
readonly input: EventsPublishInput;
|
|
21
|
+
readonly payloadEncodedBytes: number;
|
|
22
|
+
}
|
|
23
|
+
export interface EventsPublishNPlusOneWitness extends EventsPublishProofInput {
|
|
24
|
+
readonly leaf: 'requestId' | 'signalType' | 'eventId' | 'idempotencyKey' | 'occurredAt' | 'payloadBytes' | 'sourceHandle';
|
|
25
|
+
readonly encodedBytes: number;
|
|
26
|
+
readonly fitsFrame: boolean;
|
|
27
|
+
}
|
|
28
|
+
export interface EventsPublishEncodedByteProofCase {
|
|
29
|
+
readonly family: EventsPublishByteProofEncodingFamily;
|
|
30
|
+
readonly encodedBytes: number;
|
|
31
|
+
readonly fitsFrame: boolean;
|
|
32
|
+
readonly nPlusOne: readonly {
|
|
33
|
+
readonly leaf: string;
|
|
34
|
+
readonly encodedBytes: number;
|
|
35
|
+
readonly fitsFrame: boolean;
|
|
36
|
+
}[];
|
|
37
|
+
}
|
|
38
|
+
export interface EventsPublishEncodedByteProof {
|
|
39
|
+
readonly maxEncodedBytes: number;
|
|
40
|
+
readonly cases: readonly EventsPublishEncodedByteProofCase[];
|
|
41
|
+
}
|
|
42
|
+
export interface EventsPublishRowEncodedByteBounds {
|
|
43
|
+
readonly maxEncodedRequestBytes: number;
|
|
44
|
+
readonly maxEncodedResultBytes: number;
|
|
45
|
+
readonly maxEncodedErrorBytes: number;
|
|
46
|
+
}
|
|
47
|
+
export declare function eventsPublishMaximumInput(family: EventsPublishByteProofEncodingFamily): EventsPublishProofInput;
|
|
48
|
+
export declare function eventsPublishNPlusOneInputs(family: EventsPublishByteProofEncodingFamily): readonly EventsPublishNPlusOneWitness[];
|
|
49
|
+
export declare function eventsPublishMaximumResult(): {
|
|
50
|
+
readonly requestId: string;
|
|
51
|
+
readonly result: EventsPublishResult;
|
|
52
|
+
};
|
|
53
|
+
export declare function eventsPublishResultNPlusOneWitnesses(): readonly [{
|
|
54
|
+
readonly leaf: "requestId";
|
|
55
|
+
readonly requestId: string;
|
|
56
|
+
readonly result: EventsPublishResult;
|
|
57
|
+
}, {
|
|
58
|
+
readonly leaf: "publicationId";
|
|
59
|
+
readonly result: {
|
|
60
|
+
readonly publicationId: string;
|
|
61
|
+
readonly disposition: import("../generated/contract.generated.js").EventsPublishDisposition;
|
|
62
|
+
};
|
|
63
|
+
readonly requestId: string;
|
|
64
|
+
}];
|
|
65
|
+
export declare function eventsPublishStandardErrorEnvelopes(): ({
|
|
66
|
+
arm: string;
|
|
67
|
+
id: null;
|
|
68
|
+
error: {
|
|
69
|
+
code: -32602 | -32700 | -32600 | -32601 | -32603;
|
|
70
|
+
message: "Parse error" | "Invalid Request" | "Method not found" | "Invalid params" | "Internal error";
|
|
71
|
+
};
|
|
72
|
+
} | {
|
|
73
|
+
arm: string;
|
|
74
|
+
id: string;
|
|
75
|
+
error: {
|
|
76
|
+
code: -32602 | -32700 | -32600 | -32601 | -32603;
|
|
77
|
+
message: "Parse error" | "Invalid Request" | "Method not found" | "Invalid params" | "Internal error";
|
|
78
|
+
};
|
|
79
|
+
})[];
|
|
80
|
+
export declare function eventsPublishStandardErrorNPlusOneWitnesses(): {
|
|
81
|
+
id: string;
|
|
82
|
+
arm: string;
|
|
83
|
+
error: {
|
|
84
|
+
code: -32602 | -32700 | -32600 | -32601 | -32603;
|
|
85
|
+
message: "Parse error" | "Invalid Request" | "Method not found" | "Invalid params" | "Internal error";
|
|
86
|
+
};
|
|
87
|
+
}[];
|
|
88
|
+
export declare const EVENTS_PUBLISH_REQUEST_BYTE_PROOF: EventsPublishEncodedByteProof;
|
|
89
|
+
export declare const EVENTS_PUBLISH_RESULT_BYTE_PROOF: EventsPublishEncodedByteProof;
|
|
90
|
+
export declare const EVENTS_PUBLISH_ERROR_BYTE_PROOF: EventsPublishEncodedByteProof;
|
|
91
|
+
export declare const EVENTS_PUBLISH_ROW_ENCODED_BYTE_BOUNDS: {
|
|
92
|
+
readonly maxEncodedRequestBytes: number;
|
|
93
|
+
readonly maxEncodedResultBytes: number;
|
|
94
|
+
readonly maxEncodedErrorBytes: number;
|
|
95
|
+
};
|
|
96
|
+
export {};
|
|
97
|
+
//# sourceMappingURL=signal-byte-bounds.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"signal-byte-bounds.d.ts","sourceRoot":"","sources":["../../src/wire/signal-byte-bounds.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EACV,kBAAkB,EAClB,mBAAmB,EACpB,MAAM,oCAAoC,CAAC;AAY5C,eAAO,MAAM,2CAA2C,6CAI9C,CAAC;AAEX,MAAM,MAAM,oCAAoC,GAC9C,CAAC,OAAO,2CAA2C,CAAC,CAAC,MAAM,CAAC,CAAC;AAE/D,eAAO,MAAM,sBAAsB,EAAG,GAAY,CAAC;AACnD,eAAO,MAAM,0BAA0B,EAAG,GAAY,CAAC;AACvD,eAAO,MAAM,iCAAiC,EAAG,GAAY,CAAC;AAC9D,eAAO,MAAM,6BAA6B,EAAG,EAAW,CAAC;AACzD,eAAO,MAAM,+BAA+B,EAAG,GAAY,CAAC;AAI5D,UAAU,uBAAuB;IAC/B,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,KAAK,EAAE,kBAAkB,CAAC;IACnC,QAAQ,CAAC,mBAAmB,EAAE,MAAM,CAAC;CACtC;AAED,MAAM,WAAW,4BAA6B,SAAQ,uBAAuB;IAC3E,QAAQ,CAAC,IAAI,EACT,WAAW,GACX,YAAY,GACZ,SAAS,GACT,gBAAgB,GAChB,YAAY,GACZ,cAAc,GACd,c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BAAiB,CAAC;AAGhE,eAAO,MAAM,gCAAgC,+BAM5C,CAAC;AAEF,eAAO,MAAM,+BAA+B,+BAO3C,CAAC;AAEF,eAAO,MAAM,sCAAsC;;;;CAIG,CAAC"}
|
|
@@ -0,0 +1,229 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Derived compact-JSON byte bounds for the beta.9 C-2 events.publish row.
|
|
3
|
+
*
|
|
4
|
+
* Signal payloads are bounded by their compact encoded byte length, not by a
|
|
5
|
+
* string code-point count. That makes the generic leaf proof insufficient for
|
|
6
|
+
* row 13: this module constructs an exactly 64 KiB JSON object independently
|
|
7
|
+
* for ASCII, multibyte, and escaped-string families, then measures the entire
|
|
8
|
+
* request envelope and one rejected N+1 witness for every bounded leaf.
|
|
9
|
+
*/
|
|
10
|
+
import { SIGNAL_PAYLOAD_MAX_ENCODED_BYTES } from '../validation/signals.js';
|
|
11
|
+
import { MAX_FRAME_BYTES } from './constants.js';
|
|
12
|
+
import { ERROR_CODE_TO_MESSAGE, INVALID_REQUEST_CODE, PARSE_ERROR_CODE, STANDARD_ERROR_CODES, } from './errors.js';
|
|
13
|
+
import { REQUEST_ID_MAX_LENGTH } from './request-id.js';
|
|
14
|
+
import { WIRE_UINT53_MAX } from './wire-uint53.js';
|
|
15
|
+
export const EVENTS_PUBLISH_BYTE_PROOF_ENCODING_FAMILIES = [
|
|
16
|
+
'ascii',
|
|
17
|
+
'multibyte',
|
|
18
|
+
'escaping',
|
|
19
|
+
];
|
|
20
|
+
export const SIGNAL_TYPE_MAX_LENGTH = 128;
|
|
21
|
+
export const SIGNAL_EVENT_ID_MAX_LENGTH = 128;
|
|
22
|
+
export const SIGNAL_IDEMPOTENCY_KEY_MAX_LENGTH = 256;
|
|
23
|
+
export const SIGNAL_OCCURRED_AT_MAX_LENGTH = 30;
|
|
24
|
+
export const SIGNAL_SOURCE_HANDLE_MAX_LENGTH = 512;
|
|
25
|
+
const MAX_OCCURRED_AT = '2026-08-09T04:12:31.123456789Z';
|
|
26
|
+
function byteLength(value) {
|
|
27
|
+
return Buffer.byteLength(JSON.stringify(value), 'utf8');
|
|
28
|
+
}
|
|
29
|
+
function familyCharacter(family) {
|
|
30
|
+
switch (family) {
|
|
31
|
+
case 'ascii':
|
|
32
|
+
return 'a';
|
|
33
|
+
case 'multibyte':
|
|
34
|
+
return '😀';
|
|
35
|
+
case 'escaping':
|
|
36
|
+
// Quote is admissible in idempotency/source handles and requires JSON
|
|
37
|
+
// escaping. Control characters would be a larger escape but are forbidden
|
|
38
|
+
// by those leaf grammars, so using them would not prove a legal maximum.
|
|
39
|
+
return '"';
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
function exactPayload(family, extraBytes = 0) {
|
|
43
|
+
const targetBytes = SIGNAL_PAYLOAD_MAX_ENCODED_BYTES + extraBytes;
|
|
44
|
+
const dataCharacter = family === 'escaping' ? '\u0000' : familyCharacter(family);
|
|
45
|
+
const empty = { data: '', pad: '' };
|
|
46
|
+
const staticBytes = byteLength(empty);
|
|
47
|
+
const unitBytes = byteLength({ data: dataCharacter, pad: '' }) - staticBytes;
|
|
48
|
+
const repetitions = Math.floor((targetBytes - staticBytes) / unitBytes);
|
|
49
|
+
const data = dataCharacter.repeat(repetitions);
|
|
50
|
+
const usedBytes = byteLength({ data, pad: '' });
|
|
51
|
+
const payload = { data, pad: 'a'.repeat(targetBytes - usedBytes) };
|
|
52
|
+
if (byteLength(payload) !== targetBytes) {
|
|
53
|
+
throw new Error(`failed to construct exact ${targetBytes}-byte signal payload`);
|
|
54
|
+
}
|
|
55
|
+
return payload;
|
|
56
|
+
}
|
|
57
|
+
function signalType(length = SIGNAL_TYPE_MAX_LENGTH) {
|
|
58
|
+
return `a.${'a'.repeat(length - 2)}`;
|
|
59
|
+
}
|
|
60
|
+
function inputFor(family, overrides = {}, payloadExtraBytes = 0) {
|
|
61
|
+
const character = familyCharacter(family);
|
|
62
|
+
return {
|
|
63
|
+
signalType: signalType(),
|
|
64
|
+
eventId: 'a'.repeat(SIGNAL_EVENT_ID_MAX_LENGTH),
|
|
65
|
+
idempotencyKey: character.repeat(SIGNAL_IDEMPOTENCY_KEY_MAX_LENGTH),
|
|
66
|
+
occurredAt: MAX_OCCURRED_AT,
|
|
67
|
+
payload: exactPayload(family, payloadExtraBytes),
|
|
68
|
+
source: { handle: character.repeat(SIGNAL_SOURCE_HANDLE_MAX_LENGTH) },
|
|
69
|
+
...overrides,
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
function requestFrame(requestId, input) {
|
|
73
|
+
return {
|
|
74
|
+
jsonrpc: '2.0',
|
|
75
|
+
id: requestId,
|
|
76
|
+
method: 'events.publish',
|
|
77
|
+
params: {
|
|
78
|
+
meta: { deadlineUnixMs: WIRE_UINT53_MAX },
|
|
79
|
+
input,
|
|
80
|
+
},
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
export function eventsPublishMaximumInput(family) {
|
|
84
|
+
const input = inputFor(family);
|
|
85
|
+
return {
|
|
86
|
+
requestId: 'a'.repeat(REQUEST_ID_MAX_LENGTH),
|
|
87
|
+
input,
|
|
88
|
+
payloadEncodedBytes: byteLength(input.payload),
|
|
89
|
+
};
|
|
90
|
+
}
|
|
91
|
+
export function eventsPublishNPlusOneInputs(family) {
|
|
92
|
+
const maximum = eventsPublishMaximumInput(family);
|
|
93
|
+
const character = familyCharacter(family);
|
|
94
|
+
const occurredAtNPlusOne = `${MAX_OCCURRED_AT.slice(0, -1)}0Z`;
|
|
95
|
+
const candidates = [
|
|
96
|
+
{
|
|
97
|
+
leaf: 'requestId',
|
|
98
|
+
requestId: 'a'.repeat(REQUEST_ID_MAX_LENGTH + 1),
|
|
99
|
+
input: maximum.input,
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
leaf: 'signalType',
|
|
103
|
+
input: inputFor(family, { signalType: signalType(SIGNAL_TYPE_MAX_LENGTH + 1) }),
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
leaf: 'eventId',
|
|
107
|
+
input: inputFor(family, { eventId: 'a'.repeat(SIGNAL_EVENT_ID_MAX_LENGTH + 1) }),
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
leaf: 'idempotencyKey',
|
|
111
|
+
input: inputFor(family, {
|
|
112
|
+
idempotencyKey: character.repeat(SIGNAL_IDEMPOTENCY_KEY_MAX_LENGTH + 1),
|
|
113
|
+
}),
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
leaf: 'occurredAt',
|
|
117
|
+
input: inputFor(family, { occurredAt: occurredAtNPlusOne }),
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
leaf: 'payloadBytes',
|
|
121
|
+
input: inputFor(family, {}, 1),
|
|
122
|
+
},
|
|
123
|
+
{
|
|
124
|
+
leaf: 'sourceHandle',
|
|
125
|
+
input: inputFor(family, {
|
|
126
|
+
source: { handle: character.repeat(SIGNAL_SOURCE_HANDLE_MAX_LENGTH + 1) },
|
|
127
|
+
}),
|
|
128
|
+
},
|
|
129
|
+
];
|
|
130
|
+
return candidates.map(({ leaf, requestId = maximum.requestId, input }) => {
|
|
131
|
+
const encodedBytes = byteLength(requestFrame(requestId, input));
|
|
132
|
+
return {
|
|
133
|
+
leaf,
|
|
134
|
+
requestId,
|
|
135
|
+
input,
|
|
136
|
+
payloadEncodedBytes: byteLength(input.payload),
|
|
137
|
+
encodedBytes,
|
|
138
|
+
fitsFrame: encodedBytes <= MAX_FRAME_BYTES,
|
|
139
|
+
};
|
|
140
|
+
});
|
|
141
|
+
}
|
|
142
|
+
function requestProof() {
|
|
143
|
+
const cases = EVENTS_PUBLISH_BYTE_PROOF_ENCODING_FAMILIES.map((family) => {
|
|
144
|
+
const maximum = eventsPublishMaximumInput(family);
|
|
145
|
+
const encodedBytes = byteLength(requestFrame(maximum.requestId, maximum.input));
|
|
146
|
+
return {
|
|
147
|
+
family,
|
|
148
|
+
encodedBytes,
|
|
149
|
+
fitsFrame: encodedBytes <= MAX_FRAME_BYTES,
|
|
150
|
+
nPlusOne: eventsPublishNPlusOneInputs(family).map(({ leaf, encodedBytes: witnessBytes, fitsFrame }) => ({
|
|
151
|
+
leaf,
|
|
152
|
+
encodedBytes: witnessBytes,
|
|
153
|
+
fitsFrame,
|
|
154
|
+
})),
|
|
155
|
+
};
|
|
156
|
+
});
|
|
157
|
+
return {
|
|
158
|
+
maxEncodedBytes: Math.max(...cases.map(({ encodedBytes }) => encodedBytes)),
|
|
159
|
+
cases,
|
|
160
|
+
};
|
|
161
|
+
}
|
|
162
|
+
function responseFrame(requestId, result) {
|
|
163
|
+
return { jsonrpc: '2.0', id: requestId, result };
|
|
164
|
+
}
|
|
165
|
+
export function eventsPublishMaximumResult() {
|
|
166
|
+
return {
|
|
167
|
+
requestId: 'a'.repeat(REQUEST_ID_MAX_LENGTH),
|
|
168
|
+
result: { publicationId: 'a'.repeat(SIGNAL_EVENT_ID_MAX_LENGTH), disposition: 'duplicate' },
|
|
169
|
+
};
|
|
170
|
+
}
|
|
171
|
+
export function eventsPublishResultNPlusOneWitnesses() {
|
|
172
|
+
const maximum = eventsPublishMaximumResult();
|
|
173
|
+
return [
|
|
174
|
+
{ ...maximum, leaf: 'requestId', requestId: 'a'.repeat(REQUEST_ID_MAX_LENGTH + 1) },
|
|
175
|
+
{
|
|
176
|
+
...maximum,
|
|
177
|
+
leaf: 'publicationId',
|
|
178
|
+
result: { ...maximum.result, publicationId: 'a'.repeat(SIGNAL_EVENT_ID_MAX_LENGTH + 1) },
|
|
179
|
+
},
|
|
180
|
+
];
|
|
181
|
+
}
|
|
182
|
+
export function eventsPublishStandardErrorEnvelopes() {
|
|
183
|
+
const requestId = 'a'.repeat(REQUEST_ID_MAX_LENGTH);
|
|
184
|
+
return STANDARD_ERROR_CODES.flatMap((code) => {
|
|
185
|
+
const error = { code, message: ERROR_CODE_TO_MESSAGE[code] };
|
|
186
|
+
const arm = `standard:${code}`;
|
|
187
|
+
if (code === PARSE_ERROR_CODE)
|
|
188
|
+
return [{ arm, id: null, error }];
|
|
189
|
+
if (code === INVALID_REQUEST_CODE) {
|
|
190
|
+
return [{ arm: `${arm}:null`, id: null, error }, { arm, id: requestId, error }];
|
|
191
|
+
}
|
|
192
|
+
return [{ arm, id: requestId, error }];
|
|
193
|
+
});
|
|
194
|
+
}
|
|
195
|
+
export function eventsPublishStandardErrorNPlusOneWitnesses() {
|
|
196
|
+
return eventsPublishStandardErrorEnvelopes()
|
|
197
|
+
.filter((envelope) => envelope.id !== null)
|
|
198
|
+
.map((envelope) => ({ ...envelope, id: 'a'.repeat(REQUEST_ID_MAX_LENGTH + 1) }));
|
|
199
|
+
}
|
|
200
|
+
function repeatedProof(encodedBytes, nPlusOne) {
|
|
201
|
+
return {
|
|
202
|
+
maxEncodedBytes: encodedBytes,
|
|
203
|
+
cases: EVENTS_PUBLISH_BYTE_PROOF_ENCODING_FAMILIES.map((family) => ({
|
|
204
|
+
family,
|
|
205
|
+
encodedBytes,
|
|
206
|
+
fitsFrame: encodedBytes <= MAX_FRAME_BYTES,
|
|
207
|
+
nPlusOne: nPlusOne.map((witness) => ({
|
|
208
|
+
...witness,
|
|
209
|
+
fitsFrame: witness.encodedBytes <= MAX_FRAME_BYTES,
|
|
210
|
+
})),
|
|
211
|
+
})),
|
|
212
|
+
};
|
|
213
|
+
}
|
|
214
|
+
export const EVENTS_PUBLISH_REQUEST_BYTE_PROOF = requestProof();
|
|
215
|
+
const maximumResult = eventsPublishMaximumResult();
|
|
216
|
+
export const EVENTS_PUBLISH_RESULT_BYTE_PROOF = repeatedProof(byteLength(responseFrame(maximumResult.requestId, maximumResult.result)), eventsPublishResultNPlusOneWitnesses().map(({ leaf, requestId, result }) => ({
|
|
217
|
+
leaf,
|
|
218
|
+
encodedBytes: byteLength(responseFrame(requestId, result)),
|
|
219
|
+
})));
|
|
220
|
+
export const EVENTS_PUBLISH_ERROR_BYTE_PROOF = repeatedProof(Math.max(...eventsPublishStandardErrorEnvelopes().map(({ id, error }) => byteLength({ jsonrpc: '2.0', id, error }))), eventsPublishStandardErrorNPlusOneWitnesses().map(({ arm, id, error }) => ({
|
|
221
|
+
leaf: `${arm}.requestId`,
|
|
222
|
+
encodedBytes: byteLength({ jsonrpc: '2.0', id, error }),
|
|
223
|
+
})));
|
|
224
|
+
export const EVENTS_PUBLISH_ROW_ENCODED_BYTE_BOUNDS = {
|
|
225
|
+
maxEncodedRequestBytes: EVENTS_PUBLISH_REQUEST_BYTE_PROOF.maxEncodedBytes,
|
|
226
|
+
maxEncodedResultBytes: EVENTS_PUBLISH_RESULT_BYTE_PROOF.maxEncodedBytes,
|
|
227
|
+
maxEncodedErrorBytes: EVENTS_PUBLISH_ERROR_BYTE_PROOF.maxEncodedBytes,
|
|
228
|
+
};
|
|
229
|
+
//# sourceMappingURL=signal-byte-bounds.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"signal-byte-bounds.js","sourceRoot":"","sources":["../../src/wire/signal-byte-bounds.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAMH,OAAO,EAAE,gCAAgC,EAAE,MAAM,0BAA0B,CAAC;AAC5E,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AACjD,OAAO,EACL,qBAAqB,EACrB,oBAAoB,EACpB,gBAAgB,EAChB,oBAAoB,GACrB,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAC;AACxD,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAEnD,MAAM,CAAC,MAAM,2CAA2C,GAAG;IACzD,OAAO;IACP,WAAW;IACX,UAAU;CACF,CAAC;AAKX,MAAM,CAAC,MAAM,sBAAsB,GAAG,GAAY,CAAC;AACnD,MAAM,CAAC,MAAM,0BAA0B,GAAG,GAAY,CAAC;AACvD,MAAM,CAAC,MAAM,iCAAiC,GAAG,GAAY,CAAC;AAC9D,MAAM,CAAC,MAAM,6BAA6B,GAAG,EAAW,CAAC;AACzD,MAAM,CAAC,MAAM,+B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