@clowder-ai/plugin-contract 0.1.0-beta.1 → 0.1.0-beta.11
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 +5 -0
- package/dist/codegen/generate-contract.d.ts.map +1 -1
- package/dist/codegen/generate-contract.js +45 -4
- package/dist/codegen/generate-contract.js.map +1 -1
- package/dist/conformance/behavior-executor.d.ts +18 -0
- package/dist/conformance/behavior-executor.d.ts.map +1 -0
- package/dist/conformance/behavior-executor.js +52 -0
- package/dist/conformance/behavior-executor.js.map +1 -0
- 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 +6 -0
- package/dist/conformance/index.d.ts.map +1 -1
- package/dist/conformance/index.js +5 -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/messaging-loopback-adapter.d.ts +23 -0
- package/dist/conformance/messaging-loopback-adapter.d.ts.map +1 -0
- package/dist/conformance/messaging-loopback-adapter.js +389 -0
- package/dist/conformance/messaging-loopback-adapter.js.map +1 -0
- package/dist/conformance/messaging-loopback-state.d.ts +22 -0
- package/dist/conformance/messaging-loopback-state.d.ts.map +1 -0
- package/dist/conformance/messaging-loopback-state.js +101 -0
- package/dist/conformance/messaging-loopback-state.js.map +1 -0
- package/dist/conformance/runner.d.ts +18 -1
- package/dist/conformance/runner.d.ts.map +1 -1
- package/dist/conformance/runner.js +153 -66
- 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/generated/contract.generated.d.ts +370 -4
- package/dist/generated/contract.generated.d.ts.map +1 -1
- package/dist/generated/contract.generated.js +7 -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/index.d.ts +3 -0
- package/dist/validation/index.d.ts.map +1 -1
- package/dist/validation/index.js +3 -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 +53 -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 +56 -5
- package/fixtures/manifest/invalid/duplicate-signal-type.json +33 -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 +15 -6
- package/src/schemas/manifest.schema.json +5 -2
- package/src/schemas/messaging.schema.json +209 -32
- package/src/schemas/physical-limb.schema.json +319 -0
- package/src/schemas/signal.schema.json +129 -0
|
@@ -0,0 +1,294 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Complete 13-row beta.11 standalone production method registry.
|
|
3
|
+
* Mechanized verbatim from the #1165 frozen shape (rev11).
|
|
4
|
+
*
|
|
5
|
+
* Every row carries machine-readable metadata:
|
|
6
|
+
* - method name, direction, grant requirement
|
|
7
|
+
* - notification flag (only row 10)
|
|
8
|
+
* - ready status (all rows through the beta.11 M0-C closure)
|
|
9
|
+
* - leaf closure status and which matrix entries cause reservation
|
|
10
|
+
* - settlement key source
|
|
11
|
+
*
|
|
12
|
+
* A row may be marked `ready` only when its matrix entries all reach
|
|
13
|
+
* CLOSED + generated byte proofs + N/N+1 conformance pass.
|
|
14
|
+
* This module defines nothing new.
|
|
15
|
+
*
|
|
16
|
+
*/
|
|
17
|
+
import type { Capability } from '../generated/contract.generated.js';
|
|
18
|
+
/** Message direction on the wire. */
|
|
19
|
+
export type MethodDirection = 'plugin-to-host' | 'host-to-plugin';
|
|
20
|
+
/** Grant required to invoke a method, or protocol-intrinsic for handshake/lifecycle. */
|
|
21
|
+
export type GrantRequirement = Capability | 'protocol-intrinsic';
|
|
22
|
+
/** Leaf closure status from the variable-width leaf matrix. */
|
|
23
|
+
export type LeafClosureStatus = 'CLOSED' | 'RESERVED';
|
|
24
|
+
/** A schema field that must exist before or with a method's leaf closure. */
|
|
25
|
+
export interface SchemaClosurePrerequisite {
|
|
26
|
+
readonly schemaPath: string;
|
|
27
|
+
readonly timing: 'before-or-with-closure';
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* A single row of the production method registry.
|
|
31
|
+
* Most rows remain unpublished and unadvertised. beta.8 closes the two
|
|
32
|
+
* handshake rows; beta.9 appends the C-2 events.publish row.
|
|
33
|
+
*/
|
|
34
|
+
export interface RegistryRow {
|
|
35
|
+
readonly rowNumber: number;
|
|
36
|
+
readonly method: string;
|
|
37
|
+
readonly direction: MethodDirection;
|
|
38
|
+
readonly grant: GrantRequirement;
|
|
39
|
+
readonly isNotification: boolean;
|
|
40
|
+
readonly ready: boolean;
|
|
41
|
+
readonly leafClosure: LeafClosureStatus;
|
|
42
|
+
readonly reservedEntries: readonly string[];
|
|
43
|
+
readonly settlementKeySource: string;
|
|
44
|
+
/** Derived compact-frame maxima, present only for rows with closed wire shapes. */
|
|
45
|
+
readonly maxEncodedRequestBytes?: number;
|
|
46
|
+
readonly maxEncodedResultBytes?: number;
|
|
47
|
+
readonly maxEncodedErrorBytes?: number;
|
|
48
|
+
/** Schema fields required before this row may change from RESERVED to CLOSED. */
|
|
49
|
+
readonly schemaClosurePrerequisites?: readonly SchemaClosurePrerequisite[];
|
|
50
|
+
}
|
|
51
|
+
/** A registry row whose input is publicly ready for dispatch. */
|
|
52
|
+
export interface ReadyRegistryRow extends RegistryRow {
|
|
53
|
+
readonly ready: true;
|
|
54
|
+
}
|
|
55
|
+
/** A registry row that remains unready, whether its leaves are CLOSED or RESERVED. */
|
|
56
|
+
export interface UnreadyRegistryRow extends RegistryRow {
|
|
57
|
+
readonly ready: false;
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* The exact 13 production method names, in registry order.
|
|
61
|
+
* No production method exists for fixture setup/observe, grant presets,
|
|
62
|
+
* revocation, permission-matrix inspection, or replay deletion.
|
|
63
|
+
*/
|
|
64
|
+
export declare const WIRE_METHOD_NAMES: readonly ["broker.hello", "broker.ready", "messaging.send", "messaging.appendElements", "messaging.subscribe", "messaging.read", "messaging.ack", "messaging.snapshot", "host.messaging.deliver", "host.grants.changed", "host.lifecycle.ping", "host.lifecycle.drain", "events.publish"];
|
|
65
|
+
/** Union of all 13 production method names. */
|
|
66
|
+
export type WireMethodName = (typeof WIRE_METHOD_NAMES)[number];
|
|
67
|
+
/**
|
|
68
|
+
* Literal readiness partition. This prevents a registry edit from widening a
|
|
69
|
+
* newly closed row back to `boolean` or accidentally advertising another row.
|
|
70
|
+
*/
|
|
71
|
+
export type WireMethodRegistry = {
|
|
72
|
+
readonly [Method in WireMethodName]: ReadyRegistryRow;
|
|
73
|
+
};
|
|
74
|
+
/**
|
|
75
|
+
* Machine-readable registry of all 13 production methods.
|
|
76
|
+
*
|
|
77
|
+
* Every value traces to the #1165 frozen shape. Row metadata includes
|
|
78
|
+
* the exact matrix entry IDs that block leaf closure. Settlement key
|
|
79
|
+
* sources follow the canonical per-row specification.
|
|
80
|
+
*
|
|
81
|
+
* Rows 1–2 closed in beta.8, row 13 in beta.9, rows 10–12 in beta.10,
|
|
82
|
+
* and rows 3–9 in beta.11.
|
|
83
|
+
*/
|
|
84
|
+
export declare const WIRE_METHOD_REGISTRY: {
|
|
85
|
+
readonly 'broker.hello': {
|
|
86
|
+
readonly maxEncodedRequestBytes: number;
|
|
87
|
+
readonly maxEncodedResultBytes: number;
|
|
88
|
+
readonly maxEncodedErrorBytes: number;
|
|
89
|
+
readonly rowNumber: 1;
|
|
90
|
+
readonly method: "broker.hello";
|
|
91
|
+
readonly direction: "plugin-to-host";
|
|
92
|
+
readonly grant: "protocol-intrinsic";
|
|
93
|
+
readonly isNotification: false;
|
|
94
|
+
readonly ready: true;
|
|
95
|
+
readonly leafClosure: "CLOSED";
|
|
96
|
+
readonly reservedEntries: readonly [];
|
|
97
|
+
readonly settlementKeySource: "—";
|
|
98
|
+
};
|
|
99
|
+
readonly 'broker.ready': {
|
|
100
|
+
readonly maxEncodedRequestBytes: number;
|
|
101
|
+
readonly maxEncodedResultBytes: number;
|
|
102
|
+
readonly maxEncodedErrorBytes: number;
|
|
103
|
+
readonly rowNumber: 2;
|
|
104
|
+
readonly method: "broker.ready";
|
|
105
|
+
readonly direction: "plugin-to-host";
|
|
106
|
+
readonly grant: "protocol-intrinsic";
|
|
107
|
+
readonly isNotification: false;
|
|
108
|
+
readonly ready: true;
|
|
109
|
+
readonly leafClosure: "CLOSED";
|
|
110
|
+
readonly reservedEntries: readonly [];
|
|
111
|
+
readonly settlementKeySource: "—";
|
|
112
|
+
};
|
|
113
|
+
readonly 'messaging.send': {
|
|
114
|
+
readonly maxEncodedRequestBytes: number;
|
|
115
|
+
readonly maxEncodedResultBytes: number;
|
|
116
|
+
readonly maxEncodedErrorBytes: number;
|
|
117
|
+
readonly rowNumber: 3;
|
|
118
|
+
readonly method: "messaging.send";
|
|
119
|
+
readonly direction: "plugin-to-host";
|
|
120
|
+
readonly grant: "messaging.send";
|
|
121
|
+
readonly isNotification: false;
|
|
122
|
+
readonly ready: true;
|
|
123
|
+
readonly leafClosure: "CLOSED";
|
|
124
|
+
readonly reservedEntries: readonly [];
|
|
125
|
+
readonly settlementKeySource: "input.idempotencyKey";
|
|
126
|
+
};
|
|
127
|
+
readonly 'messaging.appendElements': {
|
|
128
|
+
readonly maxEncodedRequestBytes: number;
|
|
129
|
+
readonly maxEncodedResultBytes: number;
|
|
130
|
+
readonly maxEncodedErrorBytes: number;
|
|
131
|
+
readonly rowNumber: 4;
|
|
132
|
+
readonly method: "messaging.appendElements";
|
|
133
|
+
readonly direction: "plugin-to-host";
|
|
134
|
+
readonly grant: "messaging.appendElements";
|
|
135
|
+
readonly isNotification: false;
|
|
136
|
+
readonly ready: true;
|
|
137
|
+
readonly leafClosure: "CLOSED";
|
|
138
|
+
readonly reservedEntries: readonly [];
|
|
139
|
+
readonly settlementKeySource: "(Host-resolved messageId from input.handle, input.operationId)";
|
|
140
|
+
};
|
|
141
|
+
readonly 'messaging.subscribe': {
|
|
142
|
+
readonly maxEncodedRequestBytes: number;
|
|
143
|
+
readonly maxEncodedResultBytes: number;
|
|
144
|
+
readonly maxEncodedErrorBytes: number;
|
|
145
|
+
readonly rowNumber: 5;
|
|
146
|
+
readonly method: "messaging.subscribe";
|
|
147
|
+
readonly direction: "plugin-to-host";
|
|
148
|
+
readonly grant: "message.event.subscribe";
|
|
149
|
+
readonly isNotification: false;
|
|
150
|
+
readonly ready: true;
|
|
151
|
+
readonly leafClosure: "CLOSED";
|
|
152
|
+
readonly reservedEntries: readonly [];
|
|
153
|
+
readonly settlementKeySource: "Host-resolved input.handle identity (K-1 create-or-get authoritative)";
|
|
154
|
+
};
|
|
155
|
+
readonly 'messaging.read': {
|
|
156
|
+
readonly maxEncodedRequestBytes: number;
|
|
157
|
+
readonly maxEncodedResultBytes: number;
|
|
158
|
+
readonly maxEncodedErrorBytes: number;
|
|
159
|
+
readonly rowNumber: 6;
|
|
160
|
+
readonly method: "messaging.read";
|
|
161
|
+
readonly direction: "plugin-to-host";
|
|
162
|
+
readonly grant: "message.event.subscribe";
|
|
163
|
+
readonly isNotification: false;
|
|
164
|
+
readonly ready: true;
|
|
165
|
+
readonly leafClosure: "CLOSED";
|
|
166
|
+
readonly reservedEntries: readonly [];
|
|
167
|
+
readonly settlementKeySource: "none (at-least-once; bounded page assembly)";
|
|
168
|
+
};
|
|
169
|
+
readonly 'messaging.ack': {
|
|
170
|
+
readonly maxEncodedRequestBytes: number;
|
|
171
|
+
readonly maxEncodedResultBytes: number;
|
|
172
|
+
readonly maxEncodedErrorBytes: number;
|
|
173
|
+
readonly rowNumber: 7;
|
|
174
|
+
readonly method: "messaging.ack";
|
|
175
|
+
readonly direction: "plugin-to-host";
|
|
176
|
+
readonly grant: "message.event.subscribe";
|
|
177
|
+
readonly isNotification: false;
|
|
178
|
+
readonly ready: true;
|
|
179
|
+
readonly leafClosure: "CLOSED";
|
|
180
|
+
readonly reservedEntries: readonly [];
|
|
181
|
+
readonly settlementKeySource: "(input.subscriptionId, input.ackToken)";
|
|
182
|
+
};
|
|
183
|
+
readonly 'messaging.snapshot': {
|
|
184
|
+
readonly maxEncodedRequestBytes: number;
|
|
185
|
+
readonly maxEncodedResultBytes: number;
|
|
186
|
+
readonly maxEncodedErrorBytes: number;
|
|
187
|
+
readonly rowNumber: 8;
|
|
188
|
+
readonly method: "messaging.snapshot";
|
|
189
|
+
readonly direction: "plugin-to-host";
|
|
190
|
+
readonly grant: "message.event.subscribe";
|
|
191
|
+
readonly isNotification: false;
|
|
192
|
+
readonly ready: true;
|
|
193
|
+
readonly leafClosure: "CLOSED";
|
|
194
|
+
readonly reservedEntries: readonly [];
|
|
195
|
+
readonly settlementKeySource: "none for traversal; completion = D1b Host entitlement through messaging.ack";
|
|
196
|
+
};
|
|
197
|
+
readonly 'host.messaging.deliver': {
|
|
198
|
+
readonly maxEncodedRequestBytes: number;
|
|
199
|
+
readonly maxEncodedResultBytes: number;
|
|
200
|
+
readonly maxEncodedErrorBytes: number;
|
|
201
|
+
readonly rowNumber: 9;
|
|
202
|
+
readonly method: "host.messaging.deliver";
|
|
203
|
+
readonly direction: "host-to-plugin";
|
|
204
|
+
readonly grant: "onMessage";
|
|
205
|
+
readonly isNotification: false;
|
|
206
|
+
readonly ready: true;
|
|
207
|
+
readonly leafClosure: "CLOSED";
|
|
208
|
+
readonly reservedEntries: readonly [];
|
|
209
|
+
readonly settlementKeySource: "input.deliveryId (Host-side authoritative)";
|
|
210
|
+
};
|
|
211
|
+
readonly 'host.grants.changed': {
|
|
212
|
+
readonly maxEncodedRequestBytes: number;
|
|
213
|
+
readonly rowNumber: 10;
|
|
214
|
+
readonly method: "host.grants.changed";
|
|
215
|
+
readonly direction: "host-to-plugin";
|
|
216
|
+
readonly grant: "protocol-intrinsic";
|
|
217
|
+
readonly isNotification: true;
|
|
218
|
+
readonly ready: true;
|
|
219
|
+
readonly leafClosure: "CLOSED";
|
|
220
|
+
readonly reservedEntries: readonly [];
|
|
221
|
+
readonly settlementKeySource: "(grantRevision monotonic)";
|
|
222
|
+
};
|
|
223
|
+
readonly 'host.lifecycle.ping': {
|
|
224
|
+
readonly maxEncodedRequestBytes: number;
|
|
225
|
+
readonly maxEncodedResultBytes: number;
|
|
226
|
+
readonly maxEncodedErrorBytes: number;
|
|
227
|
+
readonly rowNumber: 11;
|
|
228
|
+
readonly method: "host.lifecycle.ping";
|
|
229
|
+
readonly direction: "host-to-plugin";
|
|
230
|
+
readonly grant: "protocol-intrinsic";
|
|
231
|
+
readonly isNotification: false;
|
|
232
|
+
readonly ready: true;
|
|
233
|
+
readonly leafClosure: "CLOSED";
|
|
234
|
+
readonly reservedEntries: readonly [];
|
|
235
|
+
readonly settlementKeySource: "—";
|
|
236
|
+
};
|
|
237
|
+
readonly 'host.lifecycle.drain': {
|
|
238
|
+
readonly maxEncodedRequestBytes: number;
|
|
239
|
+
readonly maxEncodedResultBytes: number;
|
|
240
|
+
readonly maxEncodedErrorBytes: number;
|
|
241
|
+
readonly rowNumber: 12;
|
|
242
|
+
readonly method: "host.lifecycle.drain";
|
|
243
|
+
readonly direction: "host-to-plugin";
|
|
244
|
+
readonly grant: "protocol-intrinsic";
|
|
245
|
+
readonly isNotification: false;
|
|
246
|
+
readonly ready: true;
|
|
247
|
+
readonly leafClosure: "CLOSED";
|
|
248
|
+
readonly reservedEntries: readonly [];
|
|
249
|
+
readonly settlementKeySource: "—";
|
|
250
|
+
};
|
|
251
|
+
readonly 'events.publish': {
|
|
252
|
+
readonly maxEncodedRequestBytes: number;
|
|
253
|
+
readonly maxEncodedResultBytes: number;
|
|
254
|
+
readonly maxEncodedErrorBytes: number;
|
|
255
|
+
readonly rowNumber: 13;
|
|
256
|
+
readonly method: "events.publish";
|
|
257
|
+
readonly direction: "plugin-to-host";
|
|
258
|
+
readonly grant: "events.publish";
|
|
259
|
+
readonly isNotification: false;
|
|
260
|
+
readonly ready: true;
|
|
261
|
+
readonly leafClosure: "CLOSED";
|
|
262
|
+
readonly reservedEntries: readonly [];
|
|
263
|
+
readonly settlementKeySource: "(Host-bound producer instance, input.signalType, input.idempotencyKey)";
|
|
264
|
+
};
|
|
265
|
+
};
|
|
266
|
+
/** Plugin-to-host method names. */
|
|
267
|
+
export declare const PLUGIN_TO_HOST_METHODS: readonly WireMethodName[];
|
|
268
|
+
/** Host-to-plugin method names. */
|
|
269
|
+
export declare const HOST_TO_PLUGIN_METHODS: readonly WireMethodName[];
|
|
270
|
+
/** Notification method names (only row 10 in v0). */
|
|
271
|
+
export declare const NOTIFICATION_METHODS: readonly WireMethodName[];
|
|
272
|
+
/** Method names with CLOSED leaf shapes (frozen). */
|
|
273
|
+
export declare const CLOSED_LEAF_ROWS: readonly WireMethodName[];
|
|
274
|
+
/** Method names with RESERVED leaf shapes (may change). */
|
|
275
|
+
export declare const RESERVED_LEAF_ROWS: readonly WireMethodName[];
|
|
276
|
+
/** Method names that are legal for wire advertisement in beta.11. */
|
|
277
|
+
export declare const READY_ROWS: readonly WireMethodName[];
|
|
278
|
+
/** Total number of production methods. */
|
|
279
|
+
export declare const WIRE_METHOD_COUNT: 13;
|
|
280
|
+
/**
|
|
281
|
+
* Look up a registry row by method name.
|
|
282
|
+
* Returns undefined for unknown method names.
|
|
283
|
+
*/
|
|
284
|
+
export declare function getRegistryRow(method: string): RegistryRow | undefined;
|
|
285
|
+
/**
|
|
286
|
+
* Check whether a method name is a valid wire method.
|
|
287
|
+
*/
|
|
288
|
+
export declare function isWireMethod(method: string): method is WireMethodName;
|
|
289
|
+
/**
|
|
290
|
+
* Get the grant requirement for a method.
|
|
291
|
+
* Returns undefined for unknown method names.
|
|
292
|
+
*/
|
|
293
|
+
export declare function getMethodGrant(method: string): GrantRequirement | undefined;
|
|
294
|
+
//# sourceMappingURL=registry.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../../src/wire/registry.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oCAAoC,CAAC;AAUrE,qCAAqC;AACrC,MAAM,MAAM,eAAe,GAAG,gBAAgB,GAAG,gBAAgB,CAAC;AAElE,wFAAwF;AACxF,MAAM,MAAM,gBAAgB,GAAG,UAAU,GAAG,oBAAoB,CAAC;AAEjE,+DAA+D;AAC/D,MAAM,MAAM,iBAAiB,GAAG,QAAQ,GAAG,UAAU,CAAC;AAEtD,6EAA6E;AAC7E,MAAM,WAAW,yBAAyB;IACxC,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,MAAM,EAAE,wBAAwB,CAAC;CAC3C;AAMD;;;;GAIG;AACH,MAAM,WAAW,WAAW;IAC1B,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,SAAS,EAAE,eAAe,CAAC;IACpC,QAAQ,CAAC,KAAK,EAAE,gBAAgB,CAAC;IACjC,QAAQ,CAAC,cAAc,EAAE,OAAO,CAAC;IACjC,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAC;IACxB,QAAQ,CAAC,WAAW,EAAE,iBAAiB,CAAC;IACxC,QAAQ,CAAC,eAAe,EAAE,SAAS,MAAM,EAAE,CAAC;IAC5C,QAAQ,CAAC,mBA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,CAAC;AAExE,qDAAqD;AACrD,eAAO,MAAM,gBAAgB,EAAE,SAAS,cAAc,EAC2B,CAAC;AAElF,2DAA2D;AAC3D,eAAO,MAAM,kBAAkB,EAAE,SAAS,cAAc,EAGtB,CAAC;AAEnC,qEAAqE;AACrE,eAAO,MAAM,UAAU,EAAE,SAAS,cAAc,EACc,CAAC;AAE/D,0CAA0C;AAC1C,eAAO,MAAM,iBAAiB,EAAG,EAAW,CAAC;AAM7C;;;GAGG;AACH,wBAAgB,cAAc,CAAC,MAAM,EAAE,MAAM,GAAG,WAAW,GAAG,SAAS,CAEtE;AAED;;GAEG;AACH,wBAAgB,YAAY,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,IAAI,cAAc,CAErE;AAED;;;GAGG;AACH,wBAAgB,cAAc,CAAC,MAAM,EAAE,MAAM,GAAG,gBAAgB,GAAG,SAAS,CAE3E"}
|
|
@@ -0,0 +1,256 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Complete 13-row beta.11 standalone production method registry.
|
|
3
|
+
* Mechanized verbatim from the #1165 frozen shape (rev11).
|
|
4
|
+
*
|
|
5
|
+
* Every row carries machine-readable metadata:
|
|
6
|
+
* - method name, direction, grant requirement
|
|
7
|
+
* - notification flag (only row 10)
|
|
8
|
+
* - ready status (all rows through the beta.11 M0-C closure)
|
|
9
|
+
* - leaf closure status and which matrix entries cause reservation
|
|
10
|
+
* - settlement key source
|
|
11
|
+
*
|
|
12
|
+
* A row may be marked `ready` only when its matrix entries all reach
|
|
13
|
+
* CLOSED + generated byte proofs + N/N+1 conformance pass.
|
|
14
|
+
* This module defines nothing new.
|
|
15
|
+
*
|
|
16
|
+
*/
|
|
17
|
+
import { HANDSHAKE_ROW_ENCODED_BYTE_BOUNDS } from './handshake-byte-bounds.js';
|
|
18
|
+
import { LIFECYCLE_ROW_ENCODED_BYTE_BOUNDS } from './lifecycle-byte-bounds.js';
|
|
19
|
+
import { MESSAGING_ROW_ENCODED_BYTE_BOUNDS } from './messaging-byte-bounds.js';
|
|
20
|
+
import { EVENTS_PUBLISH_ROW_ENCODED_BYTE_BOUNDS } from './signal-byte-bounds.js';
|
|
21
|
+
// ---------------------------------------------------------------------------
|
|
22
|
+
// Method name enum
|
|
23
|
+
// ---------------------------------------------------------------------------
|
|
24
|
+
/**
|
|
25
|
+
* The exact 13 production method names, in registry order.
|
|
26
|
+
* No production method exists for fixture setup/observe, grant presets,
|
|
27
|
+
* revocation, permission-matrix inspection, or replay deletion.
|
|
28
|
+
*/
|
|
29
|
+
export const WIRE_METHOD_NAMES = [
|
|
30
|
+
'broker.hello',
|
|
31
|
+
'broker.ready',
|
|
32
|
+
'messaging.send',
|
|
33
|
+
'messaging.appendElements',
|
|
34
|
+
'messaging.subscribe',
|
|
35
|
+
'messaging.read',
|
|
36
|
+
'messaging.ack',
|
|
37
|
+
'messaging.snapshot',
|
|
38
|
+
'host.messaging.deliver',
|
|
39
|
+
'host.grants.changed',
|
|
40
|
+
'host.lifecycle.ping',
|
|
41
|
+
'host.lifecycle.drain',
|
|
42
|
+
'events.publish',
|
|
43
|
+
];
|
|
44
|
+
// ---------------------------------------------------------------------------
|
|
45
|
+
// The complete registry (frozen)
|
|
46
|
+
// ---------------------------------------------------------------------------
|
|
47
|
+
/**
|
|
48
|
+
* Machine-readable registry of all 13 production methods.
|
|
49
|
+
*
|
|
50
|
+
* Every value traces to the #1165 frozen shape. Row metadata includes
|
|
51
|
+
* the exact matrix entry IDs that block leaf closure. Settlement key
|
|
52
|
+
* sources follow the canonical per-row specification.
|
|
53
|
+
*
|
|
54
|
+
* Rows 1–2 closed in beta.8, row 13 in beta.9, rows 10–12 in beta.10,
|
|
55
|
+
* and rows 3–9 in beta.11.
|
|
56
|
+
*/
|
|
57
|
+
export const WIRE_METHOD_REGISTRY = {
|
|
58
|
+
'broker.hello': {
|
|
59
|
+
rowNumber: 1,
|
|
60
|
+
method: 'broker.hello',
|
|
61
|
+
direction: 'plugin-to-host',
|
|
62
|
+
grant: 'protocol-intrinsic',
|
|
63
|
+
isNotification: false,
|
|
64
|
+
ready: true,
|
|
65
|
+
leafClosure: 'CLOSED',
|
|
66
|
+
reservedEntries: [],
|
|
67
|
+
settlementKeySource: '—',
|
|
68
|
+
...HANDSHAKE_ROW_ENCODED_BYTE_BOUNDS['broker.hello'],
|
|
69
|
+
},
|
|
70
|
+
'broker.ready': {
|
|
71
|
+
rowNumber: 2,
|
|
72
|
+
method: 'broker.ready',
|
|
73
|
+
direction: 'plugin-to-host',
|
|
74
|
+
grant: 'protocol-intrinsic',
|
|
75
|
+
isNotification: false,
|
|
76
|
+
ready: true,
|
|
77
|
+
leafClosure: 'CLOSED',
|
|
78
|
+
reservedEntries: [],
|
|
79
|
+
settlementKeySource: '—',
|
|
80
|
+
...HANDSHAKE_ROW_ENCODED_BYTE_BOUNDS['broker.ready'],
|
|
81
|
+
},
|
|
82
|
+
'messaging.send': {
|
|
83
|
+
rowNumber: 3,
|
|
84
|
+
method: 'messaging.send',
|
|
85
|
+
direction: 'plugin-to-host',
|
|
86
|
+
grant: 'messaging.send',
|
|
87
|
+
isNotification: false,
|
|
88
|
+
ready: true,
|
|
89
|
+
leafClosure: 'CLOSED',
|
|
90
|
+
reservedEntries: [],
|
|
91
|
+
settlementKeySource: 'input.idempotencyKey',
|
|
92
|
+
...MESSAGING_ROW_ENCODED_BYTE_BOUNDS['messaging.send'],
|
|
93
|
+
},
|
|
94
|
+
'messaging.appendElements': {
|
|
95
|
+
rowNumber: 4,
|
|
96
|
+
method: 'messaging.appendElements',
|
|
97
|
+
direction: 'plugin-to-host',
|
|
98
|
+
grant: 'messaging.appendElements',
|
|
99
|
+
isNotification: false,
|
|
100
|
+
ready: true,
|
|
101
|
+
leafClosure: 'CLOSED',
|
|
102
|
+
reservedEntries: [],
|
|
103
|
+
settlementKeySource: '(Host-resolved messageId from input.handle, input.operationId)',
|
|
104
|
+
...MESSAGING_ROW_ENCODED_BYTE_BOUNDS['messaging.appendElements'],
|
|
105
|
+
},
|
|
106
|
+
'messaging.subscribe': {
|
|
107
|
+
rowNumber: 5,
|
|
108
|
+
method: 'messaging.subscribe',
|
|
109
|
+
direction: 'plugin-to-host',
|
|
110
|
+
grant: 'message.event.subscribe',
|
|
111
|
+
isNotification: false,
|
|
112
|
+
ready: true,
|
|
113
|
+
leafClosure: 'CLOSED',
|
|
114
|
+
reservedEntries: [],
|
|
115
|
+
settlementKeySource: 'Host-resolved input.handle identity (K-1 create-or-get authoritative)',
|
|
116
|
+
...MESSAGING_ROW_ENCODED_BYTE_BOUNDS['messaging.subscribe'],
|
|
117
|
+
},
|
|
118
|
+
'messaging.read': {
|
|
119
|
+
rowNumber: 6,
|
|
120
|
+
method: 'messaging.read',
|
|
121
|
+
direction: 'plugin-to-host',
|
|
122
|
+
grant: 'message.event.subscribe',
|
|
123
|
+
isNotification: false,
|
|
124
|
+
ready: true,
|
|
125
|
+
leafClosure: 'CLOSED',
|
|
126
|
+
reservedEntries: [],
|
|
127
|
+
settlementKeySource: 'none (at-least-once; bounded page assembly)',
|
|
128
|
+
...MESSAGING_ROW_ENCODED_BYTE_BOUNDS['messaging.read'],
|
|
129
|
+
},
|
|
130
|
+
'messaging.ack': {
|
|
131
|
+
rowNumber: 7,
|
|
132
|
+
method: 'messaging.ack',
|
|
133
|
+
direction: 'plugin-to-host',
|
|
134
|
+
grant: 'message.event.subscribe',
|
|
135
|
+
isNotification: false,
|
|
136
|
+
ready: true,
|
|
137
|
+
leafClosure: 'CLOSED',
|
|
138
|
+
reservedEntries: [],
|
|
139
|
+
settlementKeySource: '(input.subscriptionId, input.ackToken)',
|
|
140
|
+
...MESSAGING_ROW_ENCODED_BYTE_BOUNDS['messaging.ack'],
|
|
141
|
+
},
|
|
142
|
+
'messaging.snapshot': {
|
|
143
|
+
rowNumber: 8,
|
|
144
|
+
method: 'messaging.snapshot',
|
|
145
|
+
direction: 'plugin-to-host',
|
|
146
|
+
grant: 'message.event.subscribe',
|
|
147
|
+
isNotification: false,
|
|
148
|
+
ready: true,
|
|
149
|
+
leafClosure: 'CLOSED',
|
|
150
|
+
reservedEntries: [],
|
|
151
|
+
settlementKeySource: 'none for traversal; completion = D1b Host entitlement through messaging.ack',
|
|
152
|
+
...MESSAGING_ROW_ENCODED_BYTE_BOUNDS['messaging.snapshot'],
|
|
153
|
+
},
|
|
154
|
+
'host.messaging.deliver': {
|
|
155
|
+
rowNumber: 9,
|
|
156
|
+
method: 'host.messaging.deliver',
|
|
157
|
+
direction: 'host-to-plugin',
|
|
158
|
+
grant: 'onMessage',
|
|
159
|
+
isNotification: false,
|
|
160
|
+
ready: true,
|
|
161
|
+
leafClosure: 'CLOSED',
|
|
162
|
+
reservedEntries: [],
|
|
163
|
+
settlementKeySource: 'input.deliveryId (Host-side authoritative)',
|
|
164
|
+
...MESSAGING_ROW_ENCODED_BYTE_BOUNDS['host.messaging.deliver'],
|
|
165
|
+
},
|
|
166
|
+
'host.grants.changed': {
|
|
167
|
+
rowNumber: 10,
|
|
168
|
+
method: 'host.grants.changed',
|
|
169
|
+
direction: 'host-to-plugin',
|
|
170
|
+
grant: 'protocol-intrinsic',
|
|
171
|
+
isNotification: true,
|
|
172
|
+
ready: true,
|
|
173
|
+
leafClosure: 'CLOSED',
|
|
174
|
+
reservedEntries: [],
|
|
175
|
+
settlementKeySource: '(grantRevision monotonic)',
|
|
176
|
+
...LIFECYCLE_ROW_ENCODED_BYTE_BOUNDS['host.grants.changed'],
|
|
177
|
+
},
|
|
178
|
+
'host.lifecycle.ping': {
|
|
179
|
+
rowNumber: 11,
|
|
180
|
+
method: 'host.lifecycle.ping',
|
|
181
|
+
direction: 'host-to-plugin',
|
|
182
|
+
grant: 'protocol-intrinsic',
|
|
183
|
+
isNotification: false,
|
|
184
|
+
ready: true,
|
|
185
|
+
leafClosure: 'CLOSED',
|
|
186
|
+
reservedEntries: [],
|
|
187
|
+
settlementKeySource: '—',
|
|
188
|
+
...LIFECYCLE_ROW_ENCODED_BYTE_BOUNDS['host.lifecycle.ping'],
|
|
189
|
+
},
|
|
190
|
+
'host.lifecycle.drain': {
|
|
191
|
+
rowNumber: 12,
|
|
192
|
+
method: 'host.lifecycle.drain',
|
|
193
|
+
direction: 'host-to-plugin',
|
|
194
|
+
grant: 'protocol-intrinsic',
|
|
195
|
+
isNotification: false,
|
|
196
|
+
ready: true,
|
|
197
|
+
leafClosure: 'CLOSED',
|
|
198
|
+
reservedEntries: [],
|
|
199
|
+
settlementKeySource: '—',
|
|
200
|
+
...LIFECYCLE_ROW_ENCODED_BYTE_BOUNDS['host.lifecycle.drain'],
|
|
201
|
+
},
|
|
202
|
+
'events.publish': {
|
|
203
|
+
rowNumber: 13,
|
|
204
|
+
method: 'events.publish',
|
|
205
|
+
direction: 'plugin-to-host',
|
|
206
|
+
grant: 'events.publish',
|
|
207
|
+
isNotification: false,
|
|
208
|
+
ready: true,
|
|
209
|
+
leafClosure: 'CLOSED',
|
|
210
|
+
reservedEntries: [],
|
|
211
|
+
settlementKeySource: '(Host-bound producer instance, input.signalType, input.idempotencyKey)',
|
|
212
|
+
...EVENTS_PUBLISH_ROW_ENCODED_BYTE_BOUNDS,
|
|
213
|
+
},
|
|
214
|
+
};
|
|
215
|
+
// ---------------------------------------------------------------------------
|
|
216
|
+
// Derived helpers
|
|
217
|
+
// ---------------------------------------------------------------------------
|
|
218
|
+
/** Plugin-to-host method names. */
|
|
219
|
+
export const PLUGIN_TO_HOST_METHODS = WIRE_METHOD_NAMES.filter(m => WIRE_METHOD_REGISTRY[m].direction === 'plugin-to-host');
|
|
220
|
+
/** Host-to-plugin method names. */
|
|
221
|
+
export const HOST_TO_PLUGIN_METHODS = WIRE_METHOD_NAMES.filter(m => WIRE_METHOD_REGISTRY[m].direction === 'host-to-plugin');
|
|
222
|
+
/** Notification method names (only row 10 in v0). */
|
|
223
|
+
export const NOTIFICATION_METHODS = WIRE_METHOD_NAMES.filter(m => WIRE_METHOD_REGISTRY[m].isNotification);
|
|
224
|
+
/** Method names with CLOSED leaf shapes (frozen). */
|
|
225
|
+
export const CLOSED_LEAF_ROWS = WIRE_METHOD_NAMES.filter(m => WIRE_METHOD_REGISTRY[m].leafClosure === 'CLOSED');
|
|
226
|
+
/** Method names with RESERVED leaf shapes (may change). */
|
|
227
|
+
export const RESERVED_LEAF_ROWS = WIRE_METHOD_NAMES.filter(m => WIRE_METHOD_REGISTRY[m]
|
|
228
|
+
.leafClosure === 'RESERVED');
|
|
229
|
+
/** Method names that are legal for wire advertisement in beta.11. */
|
|
230
|
+
export const READY_ROWS = WIRE_METHOD_NAMES.filter(m => WIRE_METHOD_REGISTRY[m].ready);
|
|
231
|
+
/** Total number of production methods. */
|
|
232
|
+
export const WIRE_METHOD_COUNT = 13;
|
|
233
|
+
// ---------------------------------------------------------------------------
|
|
234
|
+
// Lookup helpers
|
|
235
|
+
// ---------------------------------------------------------------------------
|
|
236
|
+
/**
|
|
237
|
+
* Look up a registry row by method name.
|
|
238
|
+
* Returns undefined for unknown method names.
|
|
239
|
+
*/
|
|
240
|
+
export function getRegistryRow(method) {
|
|
241
|
+
return WIRE_METHOD_REGISTRY[method];
|
|
242
|
+
}
|
|
243
|
+
/**
|
|
244
|
+
* Check whether a method name is a valid wire method.
|
|
245
|
+
*/
|
|
246
|
+
export function isWireMethod(method) {
|
|
247
|
+
return WIRE_METHOD_NAMES.includes(method);
|
|
248
|
+
}
|
|
249
|
+
/**
|
|
250
|
+
* Get the grant requirement for a method.
|
|
251
|
+
* Returns undefined for unknown method names.
|
|
252
|
+
*/
|
|
253
|
+
export function getMethodGrant(method) {
|
|
254
|
+
return getRegistryRow(method)?.grant;
|
|
255
|
+
}
|
|
256
|
+
//# sourceMappingURL=registry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"registry.js","sourceRoot":"","sources":["../../src/wire/registry.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAGH,OAAO,EAAE,iCAAiC,EAAE,MAAM,4BAA4B,CAAC;AAC/E,OAAO,EAAE,iCAAiC,EAA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BAAgB,GAC3B,iBAAiB,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,oBAAoB,CAAC,CAAC,CAAC,CAAC,WAAW,KAAK,QAAQ,CAAC,CAAC;AAElF,2DAA2D;AAC3D,MAAM,CAAC,MAAM,kBAAkB,GAC7B,iBAAiB,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAC1B,oBAAsE,CAAC,CAAC,CAAC;KACvE,WAAW,KAAK,UAAU,CAAC,CAAC;AAEnC,qEAAqE;AACrE,MAAM,CAAC,MAAM,UAAU,GACrB,iBAAiB,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,oBAAoB,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;AAE/D,0CAA0C;AAC1C,MAAM,CAAC,MAAM,iBAAiB,GAAG,EAAW,CAAC;AAE7C,8EAA8E;AAC9E,iBAAiB;AACjB,8EAA8E;AAE9E;;;GAGG;AACH,MAAM,UAAU,cAAc,CAAC,MAAc;IAC3C,OAAQ,oBAAoD,CAAC,MAAM,CAAC,CAAC;AACvE,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,YAAY,CAAC,MAAc;IACzC,OAAQ,iBAAuC,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;AACnE,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,cAAc,CAAC,MAAc;IAC3C,OAAO,cAAc,CAAC,MAAM,CAAC,EAAE,KAAK,CAAC;AACvC,CAAC"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* RequestId — wire-protocol request correlation identifier.
|
|
3
|
+
* Mechanized verbatim from #1165 maintainer R4-intake (5005069362).
|
|
4
|
+
*
|
|
5
|
+
* String-only, ASCII, attempt correlation only (not authoritative for settlement).
|
|
6
|
+
* Response echo must be byte-for-byte equal.
|
|
7
|
+
*/
|
|
8
|
+
/** Branded RequestId type. */
|
|
9
|
+
export type RequestId = string & {
|
|
10
|
+
readonly __brand: 'RequestId';
|
|
11
|
+
};
|
|
12
|
+
/** ASCII grammar pattern for RequestId values. */
|
|
13
|
+
export declare const REQUEST_ID_PATTERN: RegExp;
|
|
14
|
+
/** Minimum length in characters/bytes (ASCII). */
|
|
15
|
+
export declare const REQUEST_ID_MIN_LENGTH: 1;
|
|
16
|
+
/** Maximum length in characters/bytes (ASCII). */
|
|
17
|
+
export declare const REQUEST_ID_MAX_LENGTH: 128;
|
|
18
|
+
/** Minimum compact-JSON encoded bytes (including quotes). */
|
|
19
|
+
export declare const REQUEST_ID_MIN_ENCODED_BYTES: 3;
|
|
20
|
+
/** Maximum compact-JSON encoded bytes (including quotes). */
|
|
21
|
+
export declare const REQUEST_ID_MAX_ENCODED_BYTES: 130;
|
|
22
|
+
/**
|
|
23
|
+
* Validate a value as a RequestId.
|
|
24
|
+
* Returns the validated RequestId or null if invalid.
|
|
25
|
+
* Does NOT check in-flight uniqueness (that is a runtime concern).
|
|
26
|
+
*/
|
|
27
|
+
export declare function validateRequestId(value: unknown): RequestId | null;
|
|
28
|
+
/**
|
|
29
|
+
* Check if a raw JSON token could be a RequestId.
|
|
30
|
+
* Used in pre-dispatch: detects string tokens with valid grammar.
|
|
31
|
+
* Non-string types (numeric, null, boolean, object, array) return false.
|
|
32
|
+
*/
|
|
33
|
+
export declare function isRequestIdShaped(value: unknown): value is string;
|
|
34
|
+
//# sourceMappingURL=request-id.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"request-id.d.ts","sourceRoot":"","sources":["../../src/wire/request-id.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,8BAA8B;AAC9B,MAAM,MAAM,SAAS,GAAG,MAAM,GAAG;IAAE,QAAQ,CAAC,OAAO,EAAE,WAAW,CAAA;CAAE,CAAC;AAEnE,kDAAkD;AAClD,eAAO,MAAM,kBAAkB,QAAwC,CAAC;AAExE,kDAAkD;AAClD,eAAO,MAAM,qBAAqB,EAAG,CAAU,CAAC;AAEhD,kDAAkD;AAClD,eAAO,MAAM,qBAAqB,EAAG,GAAY,CAAC;AAElD,6DAA6D;AAC7D,eAAO,MAAM,4BAA4B,EAAG,CAAU,CAAC;AAEvD,6DAA6D;AAC7D,eAAO,MAAM,4BAA4B,EAAG,GAAY,CAAC;AAEzD;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,OAAO,GAAG,SAAS,GAAG,IAAI,CAKlE;AAED;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,MAAM,CAEjE"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* RequestId — wire-protocol request correlation identifier.
|
|
3
|
+
* Mechanized verbatim from #1165 maintainer R4-intake (5005069362).
|
|
4
|
+
*
|
|
5
|
+
* String-only, ASCII, attempt correlation only (not authoritative for settlement).
|
|
6
|
+
* Response echo must be byte-for-byte equal.
|
|
7
|
+
*/
|
|
8
|
+
/** ASCII grammar pattern for RequestId values. */
|
|
9
|
+
export const REQUEST_ID_PATTERN = /^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$/;
|
|
10
|
+
/** Minimum length in characters/bytes (ASCII). */
|
|
11
|
+
export const REQUEST_ID_MIN_LENGTH = 1;
|
|
12
|
+
/** Maximum length in characters/bytes (ASCII). */
|
|
13
|
+
export const REQUEST_ID_MAX_LENGTH = 128;
|
|
14
|
+
/** Minimum compact-JSON encoded bytes (including quotes). */
|
|
15
|
+
export const REQUEST_ID_MIN_ENCODED_BYTES = 3; // 1 + 2 quotes
|
|
16
|
+
/** Maximum compact-JSON encoded bytes (including quotes). */
|
|
17
|
+
export const REQUEST_ID_MAX_ENCODED_BYTES = 130; // 128 + 2 quotes
|
|
18
|
+
/**
|
|
19
|
+
* Validate a value as a RequestId.
|
|
20
|
+
* Returns the validated RequestId or null if invalid.
|
|
21
|
+
* Does NOT check in-flight uniqueness (that is a runtime concern).
|
|
22
|
+
*/
|
|
23
|
+
export function validateRequestId(value) {
|
|
24
|
+
if (typeof value !== 'string')
|
|
25
|
+
return null;
|
|
26
|
+
if (value.length < REQUEST_ID_MIN_LENGTH || value.length > REQUEST_ID_MAX_LENGTH)
|
|
27
|
+
return null;
|
|
28
|
+
if (!REQUEST_ID_PATTERN.test(value))
|
|
29
|
+
return null;
|
|
30
|
+
return value;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Check if a raw JSON token could be a RequestId.
|
|
34
|
+
* Used in pre-dispatch: detects string tokens with valid grammar.
|
|
35
|
+
* Non-string types (numeric, null, boolean, object, array) return false.
|
|
36
|
+
*/
|
|
37
|
+
export function isRequestIdShaped(value) {
|
|
38
|
+
return typeof value === 'string';
|
|
39
|
+
}
|
|
40
|
+
//# sourceMappingURL=request-id.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"request-id.js","sourceRoot":"","sources":["../../src/wire/request-id.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAKH,kDAAkD;AAClD,MAAM,CAAC,MAAM,kBAAkB,GAAG,qCAAqC,CAAC;AAExE,kDAAkD;AAClD,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAU,CAAC;AAEhD,kDAAkD;AAClD,MAAM,CAAC,MAAM,qBAAqB,GAAG,GAAY,CAAC;AAElD,6DAA6D;AAC7D,MAAM,CAAC,MAAM,4BAA4B,GAAG,CAAU,CAAC,CAAC,eAAe;AAEvE,6DAA6D;AAC7D,MAAM,CAAC,MAAM,4BAA4B,GAAG,GAAY,CAAC,CAAC,iBAAiB;AAE3E;;;;GAIG;AACH,MAAM,UAAU,iBAAiB,CAAC,KAAc;IAC9C,IAAI,OAAO,KAAK,KAAK,QAAQ;QAAE,OAAO,IAAI,CAAC;IAC3C,IAAI,KAAK,CAAC,MAAM,GAAG,qBAAqB,IAAI,KAAK,CAAC,MAAM,GAAG,qBAAqB;QAAE,OAAO,IAAI,CAAC;IAC9F,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,KAAK,CAAC;QAAE,OAAO,IAAI,CAAC;IACjD,OAAO,KAAkB,CAAC;AAC5B,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,iBAAiB,CAAC,KAAc;IAC9C,OAAO,OAAO,KAAK,KAAK,QAAQ,CAAC;AACnC,CAAC"}
|