@clowder-ai/plugin-contract 0.1.0-beta.1 → 0.1.0-beta.10

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.
Files changed (157) hide show
  1. package/dist/codegen/generate-contract.d.ts +5 -0
  2. package/dist/codegen/generate-contract.d.ts.map +1 -1
  3. package/dist/codegen/generate-contract.js +45 -4
  4. package/dist/codegen/generate-contract.js.map +1 -1
  5. package/dist/conformance/behavior-executor.d.ts +18 -0
  6. package/dist/conformance/behavior-executor.d.ts.map +1 -0
  7. package/dist/conformance/behavior-executor.js +52 -0
  8. package/dist/conformance/behavior-executor.js.map +1 -0
  9. package/dist/conformance/fixtures.d.ts +9 -0
  10. package/dist/conformance/fixtures.d.ts.map +1 -0
  11. package/dist/conformance/fixtures.js +8 -0
  12. package/dist/conformance/fixtures.js.map +1 -0
  13. package/dist/conformance/index.d.ts +5 -0
  14. package/dist/conformance/index.d.ts.map +1 -1
  15. package/dist/conformance/index.js +4 -0
  16. package/dist/conformance/index.js.map +1 -1
  17. package/dist/conformance/messaging-loopback-adapter.d.ts +23 -0
  18. package/dist/conformance/messaging-loopback-adapter.d.ts.map +1 -0
  19. package/dist/conformance/messaging-loopback-adapter.js +389 -0
  20. package/dist/conformance/messaging-loopback-adapter.js.map +1 -0
  21. package/dist/conformance/messaging-loopback-state.d.ts +22 -0
  22. package/dist/conformance/messaging-loopback-state.d.ts.map +1 -0
  23. package/dist/conformance/messaging-loopback-state.js +101 -0
  24. package/dist/conformance/messaging-loopback-state.js.map +1 -0
  25. package/dist/conformance/runner.d.ts +18 -1
  26. package/dist/conformance/runner.d.ts.map +1 -1
  27. package/dist/conformance/runner.js +153 -66
  28. package/dist/conformance/runner.js.map +1 -1
  29. package/dist/conformance/stdio-harness/child-process-harness.d.ts +65 -0
  30. package/dist/conformance/stdio-harness/child-process-harness.d.ts.map +1 -0
  31. package/dist/conformance/stdio-harness/child-process-harness.js +296 -0
  32. package/dist/conformance/stdio-harness/child-process-harness.js.map +1 -0
  33. package/dist/conformance/stdio-harness/dual-transport-oracle.d.ts +26 -0
  34. package/dist/conformance/stdio-harness/dual-transport-oracle.d.ts.map +1 -0
  35. package/dist/conformance/stdio-harness/dual-transport-oracle.js +32 -0
  36. package/dist/conformance/stdio-harness/dual-transport-oracle.js.map +1 -0
  37. package/dist/conformance/stdio-harness/harness-process-spawn.d.ts +27 -0
  38. package/dist/conformance/stdio-harness/harness-process-spawn.d.ts.map +1 -0
  39. package/dist/conformance/stdio-harness/harness-process-spawn.js +43 -0
  40. package/dist/conformance/stdio-harness/harness-process-spawn.js.map +1 -0
  41. package/dist/conformance/stdio-harness/index.d.ts +5 -0
  42. package/dist/conformance/stdio-harness/index.d.ts.map +1 -0
  43. package/dist/conformance/stdio-harness/index.js +4 -0
  44. package/dist/conformance/stdio-harness/index.js.map +1 -0
  45. package/dist/conformance/stdio-harness/ndjson-frame.d.ts +31 -0
  46. package/dist/conformance/stdio-harness/ndjson-frame.d.ts.map +1 -0
  47. package/dist/conformance/stdio-harness/ndjson-frame.js +125 -0
  48. package/dist/conformance/stdio-harness/ndjson-frame.js.map +1 -0
  49. package/dist/conformance/stdio-harness/node-process-tree-runtime.d.ts +15 -0
  50. package/dist/conformance/stdio-harness/node-process-tree-runtime.d.ts.map +1 -0
  51. package/dist/conformance/stdio-harness/node-process-tree-runtime.js +78 -0
  52. package/dist/conformance/stdio-harness/node-process-tree-runtime.js.map +1 -0
  53. package/dist/conformance/stdio-harness/process-tree-controller.d.ts +51 -0
  54. package/dist/conformance/stdio-harness/process-tree-controller.d.ts.map +1 -0
  55. package/dist/conformance/stdio-harness/process-tree-controller.js +162 -0
  56. package/dist/conformance/stdio-harness/process-tree-controller.js.map +1 -0
  57. package/dist/conformance/stdio-harness/windows-sentinel.d.ts +15 -0
  58. package/dist/conformance/stdio-harness/windows-sentinel.d.ts.map +1 -0
  59. package/dist/conformance/stdio-harness/windows-sentinel.js +160 -0
  60. package/dist/conformance/stdio-harness/windows-sentinel.js.map +1 -0
  61. package/dist/conformance/stdio-harness/wire-shape.d.ts +18 -0
  62. package/dist/conformance/stdio-harness/wire-shape.d.ts.map +1 -0
  63. package/dist/conformance/stdio-harness/wire-shape.js +2 -0
  64. package/dist/conformance/stdio-harness/wire-shape.js.map +1 -0
  65. package/dist/generated/contract.generated.d.ts +305 -1
  66. package/dist/generated/contract.generated.d.ts.map +1 -1
  67. package/dist/generated/contract.generated.js +1 -1
  68. package/dist/generated/contract.generated.js.map +1 -1
  69. package/dist/index.d.ts +3 -1
  70. package/dist/index.d.ts.map +1 -1
  71. package/dist/index.js +5 -1
  72. package/dist/index.js.map +1 -1
  73. package/dist/validation/index.d.ts +2 -0
  74. package/dist/validation/index.d.ts.map +1 -1
  75. package/dist/validation/index.js +2 -0
  76. package/dist/validation/index.js.map +1 -1
  77. package/dist/validation/manifest.d.ts +23 -0
  78. package/dist/validation/manifest.d.ts.map +1 -0
  79. package/dist/validation/manifest.js +53 -0
  80. package/dist/validation/manifest.js.map +1 -0
  81. package/dist/validation/signals.d.ts +26 -0
  82. package/dist/validation/signals.d.ts.map +1 -0
  83. package/dist/validation/signals.js +206 -0
  84. package/dist/validation/signals.js.map +1 -0
  85. package/dist/wire/constants.d.ts +36 -0
  86. package/dist/wire/constants.d.ts.map +1 -0
  87. package/dist/wire/constants.js +36 -0
  88. package/dist/wire/constants.js.map +1 -0
  89. package/dist/wire/disposition-fixtures.d.ts +110 -0
  90. package/dist/wire/disposition-fixtures.d.ts.map +1 -0
  91. package/dist/wire/disposition-fixtures.js +1462 -0
  92. package/dist/wire/disposition-fixtures.js.map +1 -0
  93. package/dist/wire/disposition.d.ts +102 -0
  94. package/dist/wire/disposition.d.ts.map +1 -0
  95. package/dist/wire/disposition.js +217 -0
  96. package/dist/wire/disposition.js.map +1 -0
  97. package/dist/wire/envelope.d.ts +253 -0
  98. package/dist/wire/envelope.d.ts.map +1 -0
  99. package/dist/wire/envelope.js +19 -0
  100. package/dist/wire/envelope.js.map +1 -0
  101. package/dist/wire/errors.d.ts +222 -0
  102. package/dist/wire/errors.d.ts.map +1 -0
  103. package/dist/wire/errors.js +153 -0
  104. package/dist/wire/errors.js.map +1 -0
  105. package/dist/wire/grants.d.ts +57 -0
  106. package/dist/wire/grants.d.ts.map +1 -0
  107. package/dist/wire/grants.js +59 -0
  108. package/dist/wire/grants.js.map +1 -0
  109. package/dist/wire/handshake-byte-bounds.d.ts +69 -0
  110. package/dist/wire/handshake-byte-bounds.d.ts.map +1 -0
  111. package/dist/wire/handshake-byte-bounds.js +173 -0
  112. package/dist/wire/handshake-byte-bounds.js.map +1 -0
  113. package/dist/wire/handshake.d.ts +146 -0
  114. package/dist/wire/handshake.d.ts.map +1 -0
  115. package/dist/wire/handshake.js +189 -0
  116. package/dist/wire/handshake.js.map +1 -0
  117. package/dist/wire/index.d.ts +35 -0
  118. package/dist/wire/index.d.ts.map +1 -0
  119. package/dist/wire/index.js +53 -0
  120. package/dist/wire/index.js.map +1 -0
  121. package/dist/wire/lifecycle-byte-bounds.d.ts +55 -0
  122. package/dist/wire/lifecycle-byte-bounds.d.ts.map +1 -0
  123. package/dist/wire/lifecycle-byte-bounds.js +209 -0
  124. package/dist/wire/lifecycle-byte-bounds.js.map +1 -0
  125. package/dist/wire/registry.d.ts +283 -0
  126. package/dist/wire/registry.d.ts.map +1 -0
  127. package/dist/wire/registry.js +258 -0
  128. package/dist/wire/registry.js.map +1 -0
  129. package/dist/wire/request-id.d.ts +34 -0
  130. package/dist/wire/request-id.d.ts.map +1 -0
  131. package/dist/wire/request-id.js +40 -0
  132. package/dist/wire/request-id.js.map +1 -0
  133. package/dist/wire/row-shapes.d.ts +212 -0
  134. package/dist/wire/row-shapes.d.ts.map +1 -0
  135. package/dist/wire/row-shapes.js +59 -0
  136. package/dist/wire/row-shapes.js.map +1 -0
  137. package/dist/wire/signal-byte-bounds.d.ts +97 -0
  138. package/dist/wire/signal-byte-bounds.d.ts.map +1 -0
  139. package/dist/wire/signal-byte-bounds.js +229 -0
  140. package/dist/wire/signal-byte-bounds.js.map +1 -0
  141. package/dist/wire/wire-uint53.d.ts +26 -0
  142. package/dist/wire/wire-uint53.d.ts.map +1 -0
  143. package/dist/wire/wire-uint53.js +32 -0
  144. package/dist/wire/wire-uint53.js.map +1 -0
  145. package/fixtures/behavior/messaging/adversarial-invariants.json +56 -5
  146. package/fixtures/manifest/invalid/duplicate-signal-type.json +33 -0
  147. package/fixtures/signals/invalid/destination-injection.json +15 -0
  148. package/fixtures/signals/invalid/dynamic-schema-url.json +10 -0
  149. package/fixtures/signals/invalid/forbidden-raw-privacy.json +10 -0
  150. package/fixtures/signals/invalid/non-utc-occurred-at.json +12 -0
  151. package/fixtures/signals/valid/feishu-meeting-artifact.json +18 -0
  152. package/fixtures/signals/valid/remote-service-declaration.json +10 -0
  153. package/package.json +13 -5
  154. package/src/schemas/manifest.schema.json +5 -2
  155. package/src/schemas/messaging.schema.json +1 -0
  156. package/src/schemas/physical-limb.schema.json +319 -0
  157. package/src/schemas/signal.schema.json +129 -0
@@ -0,0 +1,258 @@
1
+ /**
2
+ * 13-row production method registry: the frozen original 12 plus C-2 row 13.
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 (rows 1–2 in beta.8, row 13 in beta.9, rows 10–12 in beta.10)
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
+ * ## Reserved matrix entry in-flight coordinates
17
+ *
18
+ * M7 — future-write admission half in review at clowder-ai#1185
19
+ * (exact 05ad80c6, gate PASS, Fable APPROVE current HEAD);
20
+ * stored-data attestation/migration half outstanding.
21
+ * Affects rows 6, 8, 9. M7 remains RESERVED.
22
+ */
23
+ import { HANDSHAKE_ROW_ENCODED_BYTE_BOUNDS } from './handshake-byte-bounds.js';
24
+ import { LIFECYCLE_ROW_ENCODED_BYTE_BOUNDS } from './lifecycle-byte-bounds.js';
25
+ import { EVENTS_PUBLISH_ROW_ENCODED_BYTE_BOUNDS } from './signal-byte-bounds.js';
26
+ // ---------------------------------------------------------------------------
27
+ // Method name enum
28
+ // ---------------------------------------------------------------------------
29
+ /**
30
+ * The exact 13 production method names, in registry order.
31
+ * No production method exists for fixture setup/observe, grant presets,
32
+ * revocation, permission-matrix inspection, or replay deletion.
33
+ */
34
+ export const WIRE_METHOD_NAMES = [
35
+ 'broker.hello',
36
+ 'broker.ready',
37
+ 'messaging.send',
38
+ 'messaging.appendElements',
39
+ 'messaging.subscribe',
40
+ 'messaging.read',
41
+ 'messaging.ack',
42
+ 'messaging.snapshot',
43
+ 'host.messaging.deliver',
44
+ 'host.grants.changed',
45
+ 'host.lifecycle.ping',
46
+ 'host.lifecycle.drain',
47
+ 'events.publish',
48
+ ];
49
+ // ---------------------------------------------------------------------------
50
+ // The complete registry (frozen)
51
+ // ---------------------------------------------------------------------------
52
+ /**
53
+ * Machine-readable registry of all 13 production methods.
54
+ *
55
+ * Every value traces to the #1165 frozen shape. Row metadata includes
56
+ * the exact matrix entry IDs that block leaf closure. Settlement key
57
+ * sources follow the canonical per-row specification.
58
+ *
59
+ * Rows 1–2 are ready after beta.8; row 13 after beta.9; rows 10–12
60
+ * after beta.10.
61
+ */
62
+ export const WIRE_METHOD_REGISTRY = {
63
+ 'broker.hello': {
64
+ rowNumber: 1,
65
+ method: 'broker.hello',
66
+ direction: 'plugin-to-host',
67
+ grant: 'protocol-intrinsic',
68
+ isNotification: false,
69
+ ready: true,
70
+ leafClosure: 'CLOSED',
71
+ reservedEntries: [],
72
+ settlementKeySource: '—',
73
+ ...HANDSHAKE_ROW_ENCODED_BYTE_BOUNDS['broker.hello'],
74
+ },
75
+ 'broker.ready': {
76
+ rowNumber: 2,
77
+ method: 'broker.ready',
78
+ direction: 'plugin-to-host',
79
+ grant: 'protocol-intrinsic',
80
+ isNotification: false,
81
+ ready: true,
82
+ leafClosure: 'CLOSED',
83
+ reservedEntries: [],
84
+ settlementKeySource: '—',
85
+ ...HANDSHAKE_ROW_ENCODED_BYTE_BOUNDS['broker.ready'],
86
+ },
87
+ 'messaging.send': {
88
+ rowNumber: 3,
89
+ method: 'messaging.send',
90
+ direction: 'plugin-to-host',
91
+ grant: 'messaging.send',
92
+ isNotification: false,
93
+ ready: false,
94
+ leafClosure: 'RESERVED',
95
+ reservedEntries: ['M1', 'M2', 'M5', 'I1'],
96
+ settlementKeySource: 'input.idempotencyKey',
97
+ // The receipt handle is publishable independently, but it is never a
98
+ // substitute for closing this row's remaining M1/M2/M5/I1 obligations.
99
+ schemaClosurePrerequisites: [
100
+ { schemaPath: 'SendReceipt.handle', timing: 'before-or-with-closure' },
101
+ ],
102
+ },
103
+ 'messaging.appendElements': {
104
+ rowNumber: 4,
105
+ method: 'messaging.appendElements',
106
+ direction: 'plugin-to-host',
107
+ grant: 'messaging.appendElements',
108
+ isNotification: false,
109
+ ready: false,
110
+ leafClosure: 'RESERVED',
111
+ reservedEntries: ['M1', 'M2', 'M5', 'I1'],
112
+ settlementKeySource: '(Host-resolved messageId from input.handle, input.operationId)',
113
+ },
114
+ 'messaging.subscribe': {
115
+ rowNumber: 5,
116
+ method: 'messaging.subscribe',
117
+ direction: 'plugin-to-host',
118
+ grant: 'message.event.subscribe',
119
+ isNotification: false,
120
+ ready: false,
121
+ leafClosure: 'CLOSED',
122
+ reservedEntries: [],
123
+ settlementKeySource: 'Host-resolved input.handle identity (K-1 create-or-get authoritative)',
124
+ },
125
+ 'messaging.read': {
126
+ rowNumber: 6,
127
+ method: 'messaging.read',
128
+ direction: 'plugin-to-host',
129
+ grant: 'message.event.subscribe',
130
+ isNotification: false,
131
+ ready: false,
132
+ leafClosure: 'RESERVED',
133
+ reservedEntries: ['M1', 'M2', 'M5', 'M6', 'M7', 'I1'],
134
+ settlementKeySource: 'none (at-least-once; bounded page assembly)',
135
+ },
136
+ 'messaging.ack': {
137
+ rowNumber: 7,
138
+ method: 'messaging.ack',
139
+ direction: 'plugin-to-host',
140
+ grant: 'message.event.subscribe',
141
+ isNotification: false,
142
+ ready: false,
143
+ leafClosure: 'CLOSED',
144
+ reservedEntries: [],
145
+ settlementKeySource: '(input.subscriptionId, input.ackToken)',
146
+ },
147
+ 'messaging.snapshot': {
148
+ rowNumber: 8,
149
+ method: 'messaging.snapshot',
150
+ direction: 'plugin-to-host',
151
+ grant: 'message.event.subscribe',
152
+ isNotification: false,
153
+ ready: false,
154
+ leafClosure: 'RESERVED',
155
+ reservedEntries: ['M1', 'M2', 'M5', 'M7', 'I1'],
156
+ settlementKeySource: 'none for traversal; completion = D1b Host entitlement through messaging.ack',
157
+ },
158
+ 'host.messaging.deliver': {
159
+ rowNumber: 9,
160
+ method: 'host.messaging.deliver',
161
+ direction: 'host-to-plugin',
162
+ grant: 'onMessage',
163
+ isNotification: false,
164
+ ready: false,
165
+ leafClosure: 'RESERVED',
166
+ reservedEntries: ['M1', 'M2', 'M5', 'M7', 'I1'],
167
+ settlementKeySource: 'input.deliveryId (Host-side authoritative)',
168
+ },
169
+ 'host.grants.changed': {
170
+ rowNumber: 10,
171
+ method: 'host.grants.changed',
172
+ direction: 'host-to-plugin',
173
+ grant: 'protocol-intrinsic',
174
+ isNotification: true,
175
+ ready: true,
176
+ leafClosure: 'CLOSED',
177
+ reservedEntries: [],
178
+ settlementKeySource: '(grantRevision monotonic)',
179
+ ...LIFECYCLE_ROW_ENCODED_BYTE_BOUNDS['host.grants.changed'],
180
+ },
181
+ 'host.lifecycle.ping': {
182
+ rowNumber: 11,
183
+ method: 'host.lifecycle.ping',
184
+ direction: 'host-to-plugin',
185
+ grant: 'protocol-intrinsic',
186
+ isNotification: false,
187
+ ready: true,
188
+ leafClosure: 'CLOSED',
189
+ reservedEntries: [],
190
+ settlementKeySource: '—',
191
+ ...LIFECYCLE_ROW_ENCODED_BYTE_BOUNDS['host.lifecycle.ping'],
192
+ },
193
+ 'host.lifecycle.drain': {
194
+ rowNumber: 12,
195
+ method: 'host.lifecycle.drain',
196
+ direction: 'host-to-plugin',
197
+ grant: 'protocol-intrinsic',
198
+ isNotification: false,
199
+ ready: true,
200
+ leafClosure: 'CLOSED',
201
+ reservedEntries: [],
202
+ settlementKeySource: '—',
203
+ ...LIFECYCLE_ROW_ENCODED_BYTE_BOUNDS['host.lifecycle.drain'],
204
+ },
205
+ 'events.publish': {
206
+ rowNumber: 13,
207
+ method: 'events.publish',
208
+ direction: 'plugin-to-host',
209
+ grant: 'events.publish',
210
+ isNotification: false,
211
+ ready: true,
212
+ leafClosure: 'CLOSED',
213
+ reservedEntries: [],
214
+ settlementKeySource: '(Host-bound producer instance, input.signalType, input.idempotencyKey)',
215
+ ...EVENTS_PUBLISH_ROW_ENCODED_BYTE_BOUNDS,
216
+ },
217
+ };
218
+ // ---------------------------------------------------------------------------
219
+ // Derived helpers
220
+ // ---------------------------------------------------------------------------
221
+ /** Plugin-to-host method names. */
222
+ export const PLUGIN_TO_HOST_METHODS = WIRE_METHOD_NAMES.filter(m => WIRE_METHOD_REGISTRY[m].direction === 'plugin-to-host');
223
+ /** Host-to-plugin method names. */
224
+ export const HOST_TO_PLUGIN_METHODS = WIRE_METHOD_NAMES.filter(m => WIRE_METHOD_REGISTRY[m].direction === 'host-to-plugin');
225
+ /** Notification method names (only row 10 in v0). */
226
+ export const NOTIFICATION_METHODS = WIRE_METHOD_NAMES.filter(m => WIRE_METHOD_REGISTRY[m].isNotification);
227
+ /** Method names with CLOSED leaf shapes (frozen). */
228
+ export const CLOSED_LEAF_ROWS = WIRE_METHOD_NAMES.filter(m => WIRE_METHOD_REGISTRY[m].leafClosure === 'CLOSED');
229
+ /** Method names with RESERVED leaf shapes (may change). */
230
+ export const RESERVED_LEAF_ROWS = WIRE_METHOD_NAMES.filter(m => WIRE_METHOD_REGISTRY[m].leafClosure === 'RESERVED');
231
+ /** Method names that are legal for wire advertisement in beta.10. */
232
+ export const READY_ROWS = WIRE_METHOD_NAMES.filter(m => WIRE_METHOD_REGISTRY[m].ready);
233
+ /** Total number of production methods. */
234
+ export const WIRE_METHOD_COUNT = 13;
235
+ // ---------------------------------------------------------------------------
236
+ // Lookup helpers
237
+ // ---------------------------------------------------------------------------
238
+ /**
239
+ * Look up a registry row by method name.
240
+ * Returns undefined for unknown method names.
241
+ */
242
+ export function getRegistryRow(method) {
243
+ return WIRE_METHOD_REGISTRY[method];
244
+ }
245
+ /**
246
+ * Check whether a method name is a valid wire method.
247
+ */
248
+ export function isWireMethod(method) {
249
+ return WIRE_METHOD_NAMES.includes(method);
250
+ }
251
+ /**
252
+ * Get the grant requirement for a method.
253
+ * Returns undefined for unknown method names.
254
+ */
255
+ export function getMethodGrant(method) {
256
+ return getRegistryRow(method)?.grant;
257
+ }
258
+ //# sourceMappingURL=registry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"registry.js","sourceRoot":"","sources":["../../src/wire/registry.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAGH,OAAO,EAAE,iCAAiC,EAAE,MAAM,4BAA4B,CAAC;AAC/E,OAAO,EAAE,iCAAiC,EAAE,MAAM,4BAA4B,CAAC;AAC/E,OAAO,EAAE,sCAAsC,EAAE,MAAM,yBAAyB,CAAC;AA0DjF,8EAA8E;AAC9E,mBAAmB;AACnB,8EAA8E;AAE9E;;;;GAIG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG;IAC/B,cAAc;IACd,cAAc;IACd,gBAAgB;IAChB,0BAA0B;IAC1B,qBAAqB;IACrB,gBAAgB;IAChB,eAAe;IACf,oBAAoB;IACpB,wBAAwB;IACxB,qBAAqB;IACrB,qBAAqB;IACrB,sBAAsB;IACtB,gBAAgB;CACR,CAAC;AAqBX,8EAA8E;AAC9E,iCAAiC;AACjC,8EAA8E;AAE9E;;;;;;;;;GASG;AACH,MAAM,CAAC,MAAM,oBAAo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E,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"}
@@ -0,0 +1,212 @@
1
+ /**
2
+ * Per-row input/result shapes for the 13-row method registry.
3
+ * Mechanized from #1165 frozen shape.
4
+ *
5
+ * CLOSED rows (1, 2, 5, 7, 10, 11, 12): full executable shapes with bounds.
6
+ * RESERVED rows (3, 4, 6, 8, 9): type stubs only — no executable
7
+ * contract may be exported until the row's matrix entries close.
8
+ *
9
+ * Each closed row's shape is additionalProperties: false.
10
+ * Bounds constants are provided for runtime validation.
11
+ */
12
+ import type { GrantSnapshot } from './grants.js';
13
+ import type { BrokerReadyParams, CandidateHello, SessionBinding } from './handshake.js';
14
+ /**
15
+ * Row 5 input: subscribe to a handle for event delivery.
16
+ * Wire shape: `{ handle: string }` — additionalProperties: false.
17
+ *
18
+ * The handle is a reference identifier (1..256 code points, M4 CLOSED).
19
+ * The peer responds with a subscriptionId for subsequent read/ack calls.
20
+ */
21
+ export interface SubscribeInput {
22
+ /** M4 CLOSED — 1..256 code points. */
23
+ readonly handle: string;
24
+ }
25
+ /**
26
+ * Row 5 result: the created subscription identifier.
27
+ * Wire shape: `{ subscriptionId: string }` — additionalProperties: false.
28
+ */
29
+ export interface SubscribeResult {
30
+ /** M4 CLOSED — 1..128 code points. */
31
+ readonly subscriptionId: string;
32
+ }
33
+ /** Minimum code-point length for subscribe handle. */
34
+ export declare const SUBSCRIBE_HANDLE_MIN_LENGTH: 1;
35
+ /** Maximum code-point length for subscribe handle. */
36
+ export declare const SUBSCRIBE_HANDLE_MAX_LENGTH: 256;
37
+ /**
38
+ * Maximum compact-JSON encoded bytes for subscribe handle.
39
+ * Worst case: every code point is a 6-byte escape (\uXXXX).
40
+ * 6 * 256 + 2 quotes = 1538 bytes.
41
+ */
42
+ export declare const SUBSCRIBE_HANDLE_MAX_ENCODED_BYTES: 1538;
43
+ /** Minimum code-point length for subscriptionId. */
44
+ export declare const SUBSCRIBE_SUBSCRIPTION_ID_MIN_LENGTH: 1;
45
+ /** Maximum code-point length for subscriptionId. */
46
+ export declare const SUBSCRIBE_SUBSCRIPTION_ID_MAX_LENGTH: 128;
47
+ /**
48
+ * Maximum compact-JSON encoded bytes for subscriptionId.
49
+ * 6 * 128 + 2 quotes = 770 bytes.
50
+ */
51
+ export declare const SUBSCRIBE_SUBSCRIPTION_ID_MAX_ENCODED_BYTES: 770;
52
+ /**
53
+ * Row 7 input: acknowledge consumed events on a subscription.
54
+ * Wire shape: `{ subscriptionId, ackToken }` — additionalProperties: false.
55
+ *
56
+ * Closed shape per R3 addendum (owner-specified).
57
+ */
58
+ export interface MessagingAckRequest {
59
+ /** M4 CLOSED — 1..128 code points. */
60
+ readonly subscriptionId: string;
61
+ /** M4 CLOSED — 1..512 code points. */
62
+ readonly ackToken: string;
63
+ }
64
+ /**
65
+ * Row 7 result: null.
66
+ * Ack is fire-and-confirm — a null result signals success.
67
+ */
68
+ export type MessagingAckResult = null;
69
+ /** Minimum code-point length for ack subscriptionId. */
70
+ export declare const ACK_SUBSCRIPTION_ID_MIN_LENGTH: 1;
71
+ /** Maximum code-point length for ack subscriptionId. */
72
+ export declare const ACK_SUBSCRIPTION_ID_MAX_LENGTH: 128;
73
+ /**
74
+ * Maximum compact-JSON encoded bytes for ack subscriptionId.
75
+ * 6 * 128 + 2 quotes = 770 bytes.
76
+ */
77
+ export declare const ACK_SUBSCRIPTION_ID_MAX_ENCODED_BYTES: 770;
78
+ /** Minimum code-point length for ackToken. */
79
+ export declare const ACK_TOKEN_MIN_LENGTH: 1;
80
+ /** Maximum code-point length for ackToken. */
81
+ export declare const ACK_TOKEN_MAX_LENGTH: 512;
82
+ /**
83
+ * Maximum compact-JSON encoded bytes for ackToken.
84
+ * 6 * 512 + 2 quotes = 3074 bytes.
85
+ */
86
+ export declare const ACK_TOKEN_MAX_ENCODED_BYTES: 3074;
87
+ /**
88
+ * Row 10 input: grant-change notification payload.
89
+ *
90
+ * This is a NOTIFICATION (no id, no response). In v0, row 10 is the
91
+ * only legal notification — all other rows are request/response.
92
+ *
93
+ * The input shape is the GrantSnapshot defined in grants.ts:
94
+ * { grantRevision: WireUInt53, effectiveGrants: Capability[] 0..17 }
95
+ *
96
+ * additionalProperties: false. CLOSED.
97
+ */
98
+ export type GrantsChangedInput = GrantSnapshot;
99
+ export type { GrantSnapshot } from './grants.js';
100
+ /**
101
+ * Row 11 input: liveness ping carrying a nonce.
102
+ * Wire shape: `{ nonce: string }` — additionalProperties: false.
103
+ *
104
+ * The peer MUST echo the nonce verbatim in the result.
105
+ */
106
+ export interface PingInput {
107
+ /** M4 CLOSED — string 1..512 code points. */
108
+ readonly nonce: string;
109
+ }
110
+ /**
111
+ * Row 11 result: echo of the input nonce.
112
+ * Wire shape: `{ nonce: string }` — additionalProperties: false.
113
+ *
114
+ * The nonce in the result MUST be byte-equal to the nonce in the input.
115
+ */
116
+ export interface PingResult {
117
+ /** Byte-equal echo of the input nonce. */
118
+ readonly nonce: string;
119
+ }
120
+ /** Minimum code-point length for ping nonce. */
121
+ export declare const PING_NONCE_MIN_LENGTH: 1;
122
+ /** Maximum code-point length for ping nonce. */
123
+ export declare const PING_NONCE_MAX_LENGTH: 512;
124
+ /**
125
+ * Maximum compact-JSON encoded bytes for ping nonce.
126
+ * Worst case: every code point is a 6-byte escape (\uXXXX).
127
+ * 6 * 512 + 2 quotes = 3074 bytes.
128
+ */
129
+ export declare const PING_NONCE_MAX_ENCODED_BYTES: 3074;
130
+ /**
131
+ * Row 12 input: graceful drain with a drain-specific deadline.
132
+ * Wire shape: `{ deadlineUnixMs: number }` — additionalProperties: false.
133
+ *
134
+ * Note: this deadlineUnixMs is the drain-specific deadline in
135
+ * `params.input`, distinct from the request-level deadline in
136
+ * `params.meta.deadlineUnixMs` (CallMeta). Both may coexist.
137
+ *
138
+ * W2 covers "row 12 `params.input.deadlineUnixMs`".
139
+ */
140
+ export interface DrainInput {
141
+ /**
142
+ * Drain-specific deadline.
143
+ * WireUInt53(1, 9_007_199_254_740_991) — same profile as CallMeta.
144
+ */
145
+ readonly deadlineUnixMs: number;
146
+ }
147
+ /**
148
+ * Row 12 result: null.
149
+ * Drain is fire-and-confirm — a null result signals the plugin
150
+ * has completed its graceful shutdown sequence.
151
+ */
152
+ export type DrainResult = null;
153
+ /**
154
+ * Row 1 — broker.hello: CLOSED in beta.8.
155
+ *
156
+ * Plugin → Host handshake. CandidateHello → SessionBinding.
157
+ * See handshake.ts for structural types.
158
+ * Candidate grammar and the Host-authoritative binding are closed by beta.8.
159
+ */
160
+ export type HelloInput = CandidateHello;
161
+ export type HelloResult = SessionBinding;
162
+ /**
163
+ * Row 2 — broker.ready: CLOSED in beta.8.
164
+ *
165
+ * Plugin → Host activation. The structural type (BrokerReadyParams)
166
+ * is the executable input shape; success is a null JSON-RPC result.
167
+ */
168
+ export type ReadyInput = BrokerReadyParams;
169
+ export type ReadyResult = null;
170
+ /**
171
+ * Row 3 — messaging.send: RESERVED (M1/M2/M5/I1).
172
+ *
173
+ * Plugin → Host message send. The domain types (MessageDraft,
174
+ * SendReceipt) exist in the generated contract types, but the wire
175
+ * input/result shapes remain reserved until the row's matrix entries close.
176
+ */
177
+ export type SendInput = never;
178
+ export type SendResult = never;
179
+ /**
180
+ * Row 4 — messaging.appendElements: RESERVED (M1/M2/M5/I1).
181
+ *
182
+ * Plugin → Host element append. The domain types exist in the
183
+ * generated contract types, but the wire input/result shapes remain
184
+ * reserved until the row's matrix entries close.
185
+ */
186
+ export type AppendInput = never;
187
+ export type AppendResult = never;
188
+ /**
189
+ * Row 6 — messaging.read: RESERVED (M1/M2/M3/M4/M5/M6/M7/I1).
190
+ *
191
+ * Plugin → Host subscription read. The wire input/result shapes
192
+ * remain reserved until the row's matrix entries close.
193
+ */
194
+ export type ReadInput = never;
195
+ export type ReadResult = never;
196
+ /**
197
+ * Row 8 — messaging.snapshot: RESERVED (M1/M2/M5/M7/I1).
198
+ *
199
+ * Plugin → Host snapshot request. The wire input/result shapes
200
+ * remain reserved until the row's matrix entries close.
201
+ */
202
+ export type SnapshotInput = never;
203
+ export type SnapshotResult = never;
204
+ /**
205
+ * Row 9 — host.messaging.deliver: RESERVED (M1/M2/M5/M7/I1).
206
+ *
207
+ * Host → Plugin delivery push. The wire input/result shapes
208
+ * remain reserved until the row's matrix entries close.
209
+ */
210
+ export type DeliverInput = never;
211
+ export type DeliverResult = never;
212
+ //# 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;AAGH,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,WAAW,cAAc;IAC7B,sCAAsC;IACtC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;CACzB;AAED;;;GAGG;AACH,MAAM,WAAW,eAAe;IAC9B,sCAAsC;IACtC,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAC;CACjC;AAED,sDAAsD;AACtD,eAAO,MAAM,2BAA2B,EAAG,CAAU,CAAC;AAEtD,sDAAsD;AACtD,eAAO,MAAM,2BAA2B,EAAG,GAAY,CAAC;AAExD;;;;GAIG;AACH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G,GAAY,CAAC;AAElD;;;;GAIG;AACH,eAAO,MAAM,4BAA4B,EAAG,IAAa,CAAC;AAM1D;;;;;;;;;GASG;AACH,MAAM,WAAW,UAAU;IACzB;;;OAGG;IACH,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAC;CACjC;AAED;;;;GAIG;AACH,MAAM,MAAM,WAAW,GAAG,IAAI,CAAC;AAY/B;;;;;;GAMG;AACH,MAAM,MAAM,UAAU,GAAG,cAAc,CAAC;AACxC,MAAM,MAAM,WAAW,GAAG,cAAc,CAAC;AAEzC;;;;;GAKG;AACH,MAAM,MAAM,UAAU,GAAG,iBAAiB,CAAC;AAC3C,MAAM,MAAM,WAAW,GAAG,IAAI,CAAC;AAe/B;;;;;;GAMG;AACH,MAAM,MAAM,SAAS,GAAG,KAAK,CAAC;AAC9B,MAAM,MAAM,UAAU,GAAG,KAAK,CAAC;AAE/B;;;;;;GAMG;AACH,MAAM,MAAM,WAAW,GAAG,KAAK,CAAC;AAChC,MAAM,MAAM,YAAY,GAAG,KAAK,CAAC;AAEjC;;;;;GAKG;AACH,MAAM,MAAM,SAAS,GAAG,KAAK,CAAC;AAC9B,MAAM,MAAM,UAAU,GAAG,KAAK,CAAC;AAE/B;;;;;GAKG;AACH,MAAM,MAAM,aAAa,GAAG,KAAK,CAAC;AAClC,MAAM,MAAM,cAAc,GAAG,KAAK,CAAC;AAEnC;;;;;GAKG;AACH,MAAM,MAAM,YAAY,GAAG,KAAK,CAAC;AACjC,MAAM,MAAM,aAAa,GAAG,KAAK,CAAC"}
@@ -0,0 +1,59 @@
1
+ /**
2
+ * Per-row input/result shapes for the 13-row method registry.
3
+ * Mechanized from #1165 frozen shape.
4
+ *
5
+ * CLOSED rows (1, 2, 5, 7, 10, 11, 12): full executable shapes with bounds.
6
+ * RESERVED rows (3, 4, 6, 8, 9): type stubs only — no executable
7
+ * contract may be exported until the row's matrix entries close.
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
+ //# sourceMappingURL=row-shapes.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"row-shapes.js","sourceRoot":"","sources":["../../src/wire/row-shapes.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAmCH,sDAAsD;AACtD,MAAM,CAAC,MAAM,2BAA2B,GAAG,CAAU,CAAC;AAEtD,sDAAsD;AACtD,MAAM,CAAC,MAAM,2BAA2B,GAAG,GAAY,CAAC;AAExD;;;;GAIG;AACH,MAAM,CAAC,MAAM,kCAAkC,GAAG,IAAa,CAAC;AAEhE,oDAAoD;AACpD,MAAM,CAAC,MAAM,oCAAoC,GAAG,CAAU,CAAC;AAE/D,oDAAoD;AACpD,MAAM,CAAC,MAAM,oCAAoC,GAAG,GAAY,CAAC;AAEjE;;;GAGG;AACH,MAAM,CAAC,MAAM,2CAA2C,GAAG,GAAY,CAAC;AAyBxE,wDAAwD;AACxD,MAAM,CAAC,MAAM,8BAA8B,GAAG,CAAU,CAAC;AAEzD,wDAAwD;AACxD,MAAM,CAAC,MAAM,8BAA8B,GAAG,GAAY,CAAC;AAE3D;;;GAGG;AACH,MAAM,CAAC,MAAM,qCAAqC,GAAG,GAAY,CAAC;AAElE,8CAA8C;AAC9C,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAU,CAAC;AAE/C,8CAA8C;AAC9C,MAAM,CAAC,MAAM,oBAAoB,GAAG,GAAY,CAAC;AAEjD;;;GAGG;AACH,MAAM,CAAC,MAAM,2BAA2B,GAAG,IAAa,CAAC;AAiDzD,gDAAgD;AAChD,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAU,CAAC;AAEhD,gDAAgD;AAChD,MAAM,CAAC,MAAM,qBAAqB,GAAG,GAAY,CAAC;AAElD;;;;GAIG;AACH,MAAM,CAAC,MAAM,4BAA4B,GAAG,IAAa,CAAC"}