@clowder-ai/plugin-contract 0.1.0-beta.9 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (182) hide show
  1. package/dist/codegen/generate-contract.d.ts +6 -0
  2. package/dist/codegen/generate-contract.d.ts.map +1 -1
  3. package/dist/codegen/generate-contract.js +338 -44
  4. package/dist/codegen/generate-contract.js.map +1 -1
  5. package/dist/conformance/fixtures.d.ts +3 -1
  6. package/dist/conformance/fixtures.d.ts.map +1 -1
  7. package/dist/conformance/fixtures.js +2 -1
  8. package/dist/conformance/fixtures.js.map +1 -1
  9. package/dist/conformance/index.d.ts +3 -3
  10. package/dist/conformance/index.d.ts.map +1 -1
  11. package/dist/conformance/index.js +3 -3
  12. package/dist/conformance/index.js.map +1 -1
  13. package/dist/conformance/messaging-behavior-fixture.d.ts +12 -0
  14. package/dist/conformance/messaging-behavior-fixture.d.ts.map +1 -0
  15. package/dist/conformance/messaging-behavior-fixture.js +24 -0
  16. package/dist/conformance/messaging-behavior-fixture.js.map +1 -0
  17. package/dist/conformance/messaging-loopback-adapter.d.ts +0 -3
  18. package/dist/conformance/messaging-loopback-adapter.d.ts.map +1 -1
  19. package/dist/conformance/messaging-loopback-adapter.js +1 -77
  20. package/dist/conformance/messaging-loopback-adapter.js.map +1 -1
  21. package/dist/conformance/messaging-loopback-state.d.ts +0 -6
  22. package/dist/conformance/messaging-loopback-state.d.ts.map +1 -1
  23. package/dist/conformance/messaging-loopback-state.js +0 -20
  24. package/dist/conformance/messaging-loopback-state.js.map +1 -1
  25. package/dist/conformance/runner.d.ts.map +1 -1
  26. package/dist/conformance/runner.js +3 -1
  27. package/dist/conformance/runner.js.map +1 -1
  28. package/dist/docx-materialization.d.ts +8 -0
  29. package/dist/docx-materialization.d.ts.map +1 -0
  30. package/dist/docx-materialization.js +19 -0
  31. package/dist/docx-materialization.js.map +1 -0
  32. package/dist/generated/contract.generated.d.ts +1637 -87
  33. package/dist/generated/contract.generated.d.ts.map +1 -1
  34. package/dist/generated/contract.generated.js +70 -9
  35. package/dist/generated/contract.generated.js.map +1 -1
  36. package/dist/index.d.ts +2 -3
  37. package/dist/index.d.ts.map +1 -1
  38. package/dist/index.js +2 -3
  39. package/dist/index.js.map +1 -1
  40. package/dist/types/index.d.ts +0 -1
  41. package/dist/types/index.d.ts.map +1 -1
  42. package/dist/types/index.js +0 -1
  43. package/dist/types/index.js.map +1 -1
  44. package/dist/validation/catalog.d.ts +21 -0
  45. package/dist/validation/catalog.d.ts.map +1 -0
  46. package/dist/validation/catalog.js +140 -0
  47. package/dist/validation/catalog.js.map +1 -0
  48. package/dist/validation/cloud-conversation-host.d.ts +18 -0
  49. package/dist/validation/cloud-conversation-host.d.ts.map +1 -0
  50. package/dist/validation/cloud-conversation-host.js +83 -0
  51. package/dist/validation/cloud-conversation-host.js.map +1 -0
  52. package/dist/validation/companion-bridge.d.ts +6 -0
  53. package/dist/validation/companion-bridge.d.ts.map +1 -0
  54. package/dist/validation/companion-bridge.js +198 -0
  55. package/dist/validation/companion-bridge.js.map +1 -0
  56. package/dist/validation/docx-materialization.d.ts +6 -0
  57. package/dist/validation/docx-materialization.d.ts.map +1 -0
  58. package/dist/validation/docx-materialization.js +36 -0
  59. package/dist/validation/docx-materialization.js.map +1 -0
  60. package/dist/validation/index.d.ts +9 -1
  61. package/dist/validation/index.d.ts.map +1 -1
  62. package/dist/validation/index.js +9 -1
  63. package/dist/validation/index.js.map +1 -1
  64. package/dist/validation/manifest.d.ts.map +1 -1
  65. package/dist/validation/manifest.js +317 -0
  66. package/dist/validation/manifest.js.map +1 -1
  67. package/dist/validation/members.d.ts +4 -0
  68. package/dist/validation/members.d.ts.map +1 -0
  69. package/dist/validation/members.js +11 -0
  70. package/dist/validation/members.js.map +1 -0
  71. package/dist/validation/messaging-semantic.d.ts.map +1 -1
  72. package/dist/validation/messaging-semantic.js +98 -0
  73. package/dist/validation/messaging-semantic.js.map +1 -1
  74. package/dist/validation/messaging-wire.d.ts +42 -0
  75. package/dist/validation/messaging-wire.d.ts.map +1 -0
  76. package/dist/validation/messaging-wire.js +184 -0
  77. package/dist/validation/messaging-wire.js.map +1 -0
  78. package/dist/validation/operation-rows.d.ts +25 -0
  79. package/dist/validation/operation-rows.d.ts.map +1 -0
  80. package/dist/validation/operation-rows.js +135 -0
  81. package/dist/validation/operation-rows.js.map +1 -0
  82. package/dist/validation/signals.d.ts +1 -10
  83. package/dist/validation/signals.d.ts.map +1 -1
  84. package/dist/validation/signals.js +0 -174
  85. package/dist/validation/signals.js.map +1 -1
  86. package/dist/variant.d.ts +114 -0
  87. package/dist/variant.d.ts.map +1 -0
  88. package/dist/variant.js +305 -0
  89. package/dist/variant.js.map +1 -0
  90. package/dist/wire/constants.d.ts +2 -1
  91. package/dist/wire/constants.d.ts.map +1 -1
  92. package/dist/wire/constants.js +2 -1
  93. package/dist/wire/constants.js.map +1 -1
  94. package/dist/wire/dispatch.d.ts +49 -0
  95. package/dist/wire/dispatch.d.ts.map +1 -0
  96. package/dist/wire/dispatch.js +870 -0
  97. package/dist/wire/dispatch.js.map +1 -0
  98. package/dist/wire/disposition-fixtures.d.ts +10 -2
  99. package/dist/wire/disposition-fixtures.d.ts.map +1 -1
  100. package/dist/wire/disposition-fixtures.js +539 -108
  101. package/dist/wire/disposition-fixtures.js.map +1 -1
  102. package/dist/wire/disposition.d.ts +3 -4
  103. package/dist/wire/disposition.d.ts.map +1 -1
  104. package/dist/wire/disposition.js +5 -16
  105. package/dist/wire/disposition.js.map +1 -1
  106. package/dist/wire/envelope.d.ts +31 -1
  107. package/dist/wire/envelope.d.ts.map +1 -1
  108. package/dist/wire/envelope.js +48 -1
  109. package/dist/wire/envelope.js.map +1 -1
  110. package/dist/wire/errors.d.ts +31 -1
  111. package/dist/wire/errors.d.ts.map +1 -1
  112. package/dist/wire/errors.js +36 -0
  113. package/dist/wire/errors.js.map +1 -1
  114. package/dist/wire/handshake-byte-bounds.d.ts.map +1 -1
  115. package/dist/wire/handshake-byte-bounds.js +1 -4
  116. package/dist/wire/handshake-byte-bounds.js.map +1 -1
  117. package/dist/wire/handshake.d.ts +12 -11
  118. package/dist/wire/handshake.d.ts.map +1 -1
  119. package/dist/wire/handshake.js +11 -15
  120. package/dist/wire/handshake.js.map +1 -1
  121. package/dist/wire/index.d.ts +15 -13
  122. package/dist/wire/index.d.ts.map +1 -1
  123. package/dist/wire/index.js +30 -9
  124. package/dist/wire/index.js.map +1 -1
  125. package/dist/wire/lifecycle-byte-bounds.d.ts +40 -0
  126. package/dist/wire/lifecycle-byte-bounds.d.ts.map +1 -0
  127. package/dist/wire/lifecycle-byte-bounds.js +148 -0
  128. package/dist/wire/lifecycle-byte-bounds.js.map +1 -0
  129. package/dist/wire/messaging-byte-bounds.d.ts +62 -0
  130. package/dist/wire/messaging-byte-bounds.d.ts.map +1 -0
  131. package/dist/wire/messaging-byte-bounds.js +581 -0
  132. package/dist/wire/messaging-byte-bounds.js.map +1 -0
  133. package/dist/wire/registry.d.ts +58 -107
  134. package/dist/wire/registry.d.ts.map +1 -1
  135. package/dist/wire/registry.js +45 -107
  136. package/dist/wire/registry.js.map +1 -1
  137. package/dist/wire/row-shapes.d.ts +82 -81
  138. package/dist/wire/row-shapes.d.ts.map +1 -1
  139. package/dist/wire/row-shapes.js +30 -3
  140. package/dist/wire/row-shapes.js.map +1 -1
  141. package/fixtures/behavior/messaging/adversarial-invariants.json +62 -183
  142. package/fixtures/manifest/invalid/contract-version-leading-zero-prerelease.json +1 -3
  143. package/fixtures/manifest/invalid/contract-version-range.json +1 -3
  144. package/fixtures/manifest/invalid/duplicate-signal-type.json +4 -4
  145. package/fixtures/manifest/invalid/icon-package-escape.json +20 -0
  146. package/fixtures/manifest/invalid/ipc-empty-entrypoint.json +1 -3
  147. package/fixtures/manifest/invalid/plugin-version-leading-zero-prerelease.json +1 -3
  148. package/fixtures/manifest/invalid/plugin-version-not-semver.json +1 -3
  149. package/fixtures/manifest/invalid/semver-empty-build-metadata.json +1 -3
  150. package/fixtures/manifest/invalid/stdio-missing-entrypoint.json +1 -3
  151. package/fixtures/manifest/invalid/user-authored-lifecycle.json +1 -3
  152. package/fixtures/manifest/valid/localized-product-metadata.json +25 -0
  153. package/fixtures/manifest/valid/minimal-builtin.json +1 -3
  154. package/fixtures/manifest/valid/protocol-intrinsic-lifecycle.json +1 -3
  155. package/fixtures/manifest/valid/semver-build-metadata.json +1 -3
  156. package/fixtures/manifest/valid/stdio-entrypoint.json +1 -3
  157. package/fixtures/messaging/valid/subscription-delivery.json +1 -1
  158. package/package.json +17 -4
  159. package/src/schemas/behavior-fixture.schema.json +800 -152
  160. package/src/schemas/catalog.schema.json +91 -0
  161. package/src/schemas/companion-bridge.schema.json +2256 -0
  162. package/src/schemas/docx-materialization.schema.json +302 -0
  163. package/src/schemas/manifest.schema.json +2196 -107
  164. package/src/schemas/messaging.schema.json +692 -41
  165. package/src/schemas/plugin-metadata.schema.json +62 -0
  166. package/src/schemas/signal.schema.json +68 -78
  167. package/dist/types/capability.d.ts +0 -4
  168. package/dist/types/capability.d.ts.map +0 -1
  169. package/dist/types/capability.js +0 -11
  170. package/dist/types/capability.js.map +0 -1
  171. package/dist/wire/grants.d.ts +0 -57
  172. package/dist/wire/grants.d.ts.map +0 -1
  173. package/dist/wire/grants.js +0 -59
  174. package/dist/wire/grants.js.map +0 -1
  175. package/dist/wire/signal-byte-bounds.d.ts +0 -97
  176. package/dist/wire/signal-byte-bounds.d.ts.map +0 -1
  177. package/dist/wire/signal-byte-bounds.js +0 -229
  178. package/dist/wire/signal-byte-bounds.js.map +0 -1
  179. package/fixtures/manifest/invalid/unknown-capability.json +0 -19
  180. package/fixtures/signals/invalid/destination-injection.json +0 -15
  181. package/fixtures/signals/invalid/non-utc-occurred-at.json +0 -12
  182. package/fixtures/signals/valid/feishu-meeting-artifact.json +0 -18
@@ -30,7 +30,9 @@
30
30
  * Tests verify both existence AND class correctness per key.
31
31
  */
32
32
  import { BINDING_NONCE_MAX_LENGTH, PLUGIN_ID_MAX_LENGTH, } from './handshake.js';
33
- import { PARSE_ERROR_CODE, PARSE_ERROR_MESSAGE, INVALID_REQUEST_CODE, INVALID_REQUEST_MESSAGE, METHOD_NOT_FOUND_CODE, METHOD_NOT_FOUND_MESSAGE, INVALID_PARAMS_CODE, INVALID_PARAMS_MESSAGE, HANDSHAKE_REJECTED_CODE, HANDSHAKE_REJECTED_MESSAGE, } from './errors.js';
33
+ import { PING_NONCE_MAX_LENGTH } from './row-shapes.js';
34
+ import { WIRE_UINT53_MAX } from './wire-uint53.js';
35
+ import { PARSE_ERROR_CODE, PARSE_ERROR_MESSAGE, INVALID_REQUEST_CODE, INVALID_REQUEST_MESSAGE, METHOD_NOT_FOUND_CODE, METHOD_NOT_FOUND_MESSAGE, INVALID_PARAMS_CODE, INVALID_PARAMS_MESSAGE, HANDSHAKE_REJECTED_CODE, HANDSHAKE_REJECTED_MESSAGE, DEADLINE_EXPIRED_CODE, DEADLINE_EXPIRED_MESSAGE, } from './errors.js';
34
36
  // ---------------------------------------------------------------------------
35
37
  // Closed error arm names — the 11 concrete envelope types from envelope.ts
36
38
  // ---------------------------------------------------------------------------
@@ -84,6 +86,15 @@ const RESPONSE_HANDSHAKE_REJECTED_AUTHORITY_A = {
84
86
  data: { reason: 'AUTHORITY_VIOLATION' },
85
87
  },
86
88
  };
89
+ const RESPONSE_DEADLINE_EXPIRED_DRAIN = {
90
+ jsonrpc: '2.0',
91
+ id: 'drain-deadline',
92
+ error: {
93
+ code: DEADLINE_EXPIRED_CODE,
94
+ message: DEADLINE_EXPIRED_MESSAGE,
95
+ data: {},
96
+ },
97
+ };
87
98
  const BETA8_HELLO = {
88
99
  pluginId: 'example.loopback',
89
100
  packageDigest: `sha512-${'A'.repeat(86)}==`,
@@ -99,8 +110,6 @@ const BETA8_BINDING = {
99
110
  ...BETA8_HELLO,
100
111
  pluginInstanceId: 'instance-1',
101
112
  brokerSessionId: 'session-1',
102
- grantRevision: 0,
103
- effectiveGrants: [],
104
113
  bindingNonce: 'nonce-1',
105
114
  };
106
115
  const RESPONSE_HANDSHAKE_REJECTED_HELLO = {
@@ -131,6 +140,55 @@ function readyRequestFrame(id, input) {
131
140
  function helloResultFrame(id, result) {
132
141
  return JSON.stringify({ jsonrpc: '2.0', id, result });
133
142
  }
143
+ function lifecycleRequestFrame(id, method, input) {
144
+ return JSON.stringify({
145
+ jsonrpc: '2.0',
146
+ id,
147
+ method,
148
+ params: { meta: { deadlineUnixMs: WIRE_UINT53_MAX }, input },
149
+ });
150
+ }
151
+ function messagingRequestFrame(id, method, input) {
152
+ return JSON.stringify({
153
+ jsonrpc: '2.0',
154
+ id,
155
+ method,
156
+ params: { meta: { deadlineUnixMs: WIRE_UINT53_MAX }, input },
157
+ });
158
+ }
159
+ const M0C_DRAFT = {
160
+ address: { kind: 'thread_handle', handle: 'thread-handle-1' },
161
+ idempotencyKey: 'send-1',
162
+ payload: {
163
+ provenance: { epistemicStatus: 'inference' },
164
+ elements: [
165
+ { elementId: 'element-1', kind: 'text', payload: { text: 'hello' } },
166
+ ],
167
+ },
168
+ };
169
+ const M0C_ENVELOPE = {
170
+ messageId: 'message-1',
171
+ revision: 1,
172
+ threadId: 'thread-1',
173
+ actor: { kind: 'user', id: 'user-1' },
174
+ audience: { kind: 'public' },
175
+ occurredAt: '2026-08-18T03:00:00.000Z',
176
+ payload: {
177
+ provenance: {
178
+ origin: { kind: 'host' },
179
+ epistemicStatus: 'user_intent',
180
+ },
181
+ elements: [
182
+ { elementId: 'element-1', kind: 'text', payload: { text: 'hello' } },
183
+ ],
184
+ },
185
+ };
186
+ const M0C_PUBLISH_EVENT = {
187
+ eventId: 'event-1',
188
+ sequence: 1,
189
+ type: 'message.publish',
190
+ envelope: M0C_ENVELOPE,
191
+ };
134
192
  /**
135
193
  * 9 response-candidate sub-cases per §3.8-1:
136
194
  * "your R9 correction #5's five required cases plus four controls"
@@ -165,8 +223,6 @@ export const RESPONSE_CANDIDATE_CASES = {
165
223
  * and the R8 row-10 value-failure fixture"
166
224
  */
167
225
  export const NOTIFICATION_PARTITION_CASES = {
168
- /** §3.8-1 NT #1: legal row-10 notification → T-J accept */
169
- 'nt-1-legal-row10': { vectorId: 'T-J-1', expectedClass: 'T-J' },
170
226
  /** §3.8-1 NT #2: request-only method without id → T-K close */
171
227
  'nt-2-request-method': { vectorId: 'T-K-1', expectedClass: 'T-K' },
172
228
  /** §3.8-1 NT #3: unknown method without id → T-K close */
@@ -175,7 +231,6 @@ export const NOTIFICATION_PARTITION_CASES = {
175
231
  'nt-4-invalid-params': { vectorId: 'T-K-6', expectedClass: 'T-K' },
176
232
  /** §3.8-1 NT #5: idless notification extra/missing envelope member → T-K */
177
233
  'nt-5-envelope-violation': { vectorId: 'T-K-5', expectedClass: 'T-K' },
178
- /** §3.8-1 NT #6: row-10 deadlineUnixMs:0 value failure (H7/H8) → T-K */
179
234
  'nt-6-value-failure': { vectorId: 'T-K-7', expectedClass: 'T-K' },
180
235
  /** §3.8-1 NT #7: structurally invalid idless object → T-D respond */
181
236
  'nt-7-structurally-invalid': { vectorId: 'T-D-1', expectedClass: 'T-D' },
@@ -184,6 +239,10 @@ export const NOTIFICATION_PARTITION_CASES = {
184
239
  // The fixture vectors (35 total)
185
240
  // ---------------------------------------------------------------------------
186
241
  export const DISPOSITION_FIXTURE_VECTORS = [
242
+ { id: 'T-K-4', rawFrame: "{\"jsonrpc\":\"2.0\",\"method\":\"host.lifecycle.ping\",\"params\":{\"meta\":{\"deadlineUnixMs\":1},\"input\":{\"nonce\":\"n\"}},\"error\":{\"code\":-1}}", rawFrameEncoding: 'utf8', preState: { inFlightRequests: [] }, expectedClass: 'T-K', expectedOutcome: 'close', expectedErrorArm: null, expectedErrorCode: null, expectedResponseFrame: null, zeroSideEffects: true, description: 'request-only ping notification rejects without dispatch' },
243
+ { id: 'T-K-5', rawFrame: "{\"jsonrpc\":\"2.0\",\"method\":\"host.lifecycle.ping\",\"extra\":true,\"params\":{\"meta\":{\"deadlineUnixMs\":1},\"input\":{\"nonce\":\"n\"}}}", rawFrameEncoding: 'utf8', preState: { inFlightRequests: [] }, expectedClass: 'T-K', expectedOutcome: 'close', expectedErrorArm: null, expectedErrorCode: null, expectedResponseFrame: null, zeroSideEffects: true, description: 'request-only ping notification rejects without dispatch' },
244
+ { id: 'T-K-6', rawFrame: "{\"jsonrpc\":\"2.0\",\"method\":\"host.lifecycle.ping\",\"params\":{\"meta\":{\"deadlineUnixMs\":1},\"input\":null}}", rawFrameEncoding: 'utf8', preState: { inFlightRequests: [] }, expectedClass: 'T-K', expectedOutcome: 'close', expectedErrorArm: null, expectedErrorCode: null, expectedResponseFrame: null, zeroSideEffects: true, description: 'request-only ping notification rejects without dispatch' },
245
+ { id: 'T-K-7', rawFrame: "{\"jsonrpc\":\"2.0\",\"method\":\"host.lifecycle.ping\",\"params\":{\"meta\":{\"deadlineUnixMs\":0},\"input\":{\"nonce\":\"n\"}}}", rawFrameEncoding: 'utf8', preState: { inFlightRequests: [] }, expectedClass: 'T-K', expectedOutcome: 'close', expectedErrorArm: null, expectedErrorCode: null, expectedResponseFrame: null, zeroSideEffects: true, description: 'request-only ping notification rejects without dispatch' },
187
246
  // ═════════════════════════════════════════════════════════════════════════
188
247
  // PRE-STRUCTURAL (T-A, T-B, T-C)
189
248
  // ═════════════════════════════════════════════════════════════════════════
@@ -224,20 +283,20 @@ export const DISPOSITION_FIXTURE_VECTORS = [
224
283
  description: 'frame-canonicality failure: whitespace in compact JSON',
225
284
  },
226
285
  {
227
- id: 'T-C-2',
228
- rawFrame: helloResultFrame('hello-h7-negative', {
229
- ...BETA8_BINDING,
230
- grantRevision: -1,
286
+ id: 'T-C-3',
287
+ rawFrame: messagingRequestFrame('read-fractional', 'messaging.read', {
288
+ subscriptionId: 'subscription-1',
289
+ limit: 1.5,
231
290
  }),
232
291
  rawFrameEncoding: 'utf8',
233
- preState: { inFlightRequests: [{ id: 'hello-h7-negative', method: 'broker.hello', requestSnapshot: { candidateHello: BETA8_HELLO } }] },
292
+ preState: { inFlightRequests: [] },
234
293
  expectedClass: 'T-C',
235
294
  expectedOutcome: 'close',
236
295
  expectedErrorArm: null,
237
296
  expectedErrorCode: null,
238
297
  expectedResponseFrame: null,
239
298
  zeroSideEffects: true,
240
- description: '[beta.8 H7 raw token] negative SessionBinding grantRevision is rejected at canonicality before correlation',
299
+ description: '[beta.11 messaging] fractional read limit is rejected at canonicality before method validation',
241
300
  },
242
301
  // ═════════════════════════════════════════════════════════════════════════
243
302
  // T-D: canonical idless NON-response-candidate, NOT a valid Request
@@ -375,6 +434,7 @@ export const DISPOSITION_FIXTURE_VECTORS = [
375
434
  expectedErrorArm: 'InvalidParamsEnvelope',
376
435
  expectedErrorCode: -32602,
377
436
  expectedResponseFrame: JSON.stringify(RESPONSE_INVALID_PARAMS_A),
437
+ zeroSideEffects: true,
378
438
  description: 'value violation: nonce empty string violates minLength 1',
379
439
  },
380
440
  // ═════════════════════════════════════════════════════════════════════════
@@ -399,34 +459,8 @@ export const DISPOSITION_FIXTURE_VECTORS = [
399
459
  // no JSON-RPC Response is emitted for any downstream method/params/
400
460
  // profile rejection."
401
461
  //
402
- // Frozen cases: T-J-1 (NT-1), T-K-1 (NT-2), T-K-3 (NT-3),
403
462
  // T-K-6 (NT-4), T-K-5 (NT-5), T-K-7 (NT-6), T-D-1 (NT-7).
404
- // Additional: T-J-2, T-K-2.
405
463
  // ═════════════════════════════════════════════════════════════════════════
406
- {
407
- id: 'T-J-1',
408
- rawFrame: '{"jsonrpc":"2.0","method":"host.grants.changed","params":{"meta":{"deadlineUnixMs":1},"input":{"grantRevision":0,"effectiveGrants":[]}}}',
409
- rawFrameEncoding: 'utf8',
410
- preState: { inFlightRequests: [] },
411
- expectedClass: 'T-J',
412
- expectedOutcome: 'accept',
413
- expectedErrorArm: null,
414
- expectedErrorCode: null,
415
- expectedResponseFrame: null,
416
- description: '[NT-1] legal row-10 grants.changed notification, empty grants',
417
- },
418
- {
419
- id: 'T-J-2',
420
- rawFrame: '{"jsonrpc":"2.0","method":"host.grants.changed","params":{"meta":{"deadlineUnixMs":1},"input":{"grantRevision":1,"effectiveGrants":["message.event.subscribe"]}}}',
421
- rawFrameEncoding: 'utf8',
422
- preState: { inFlightRequests: [] },
423
- expectedClass: 'T-J',
424
- expectedOutcome: 'accept',
425
- expectedErrorArm: null,
426
- expectedErrorCode: null,
427
- expectedResponseFrame: null,
428
- description: 'legal row-10 grants.changed, non-empty grants (additional NT-1 variant)',
429
- },
430
464
  {
431
465
  id: 'T-K-1',
432
466
  rawFrame: '{"jsonrpc":"2.0","method":"host.lifecycle.ping","params":{"meta":{"deadlineUnixMs":1},"input":{"nonce":"x"}}}',
@@ -437,6 +471,7 @@ export const DISPOSITION_FIXTURE_VECTORS = [
437
471
  expectedErrorArm: null,
438
472
  expectedErrorCode: null,
439
473
  expectedResponseFrame: null,
474
+ zeroSideEffects: true,
440
475
  description: '[NT-2] request-only method (ping, row 11) as notification → v0 violation',
441
476
  },
442
477
  {
@@ -463,54 +498,6 @@ export const DISPOSITION_FIXTURE_VECTORS = [
463
498
  expectedResponseFrame: null,
464
499
  description: '[NT-3] unknown method as notification → v0 violation',
465
500
  },
466
- {
467
- id: 'T-K-4',
468
- rawFrame: '{"jsonrpc":"2.0","method":"host.grants.changed","params":{"meta":{"deadlineUnixMs":1},"input":{"grantRevision":0,"effectiveGrants":[]}},"error":{"code":-32600,"message":"Invalid Request"}}',
469
- rawFrameEncoding: 'utf8',
470
- preState: { inFlightRequests: [] },
471
- expectedClass: 'T-K',
472
- expectedOutcome: 'close',
473
- expectedErrorArm: null,
474
- expectedErrorCode: null,
475
- expectedResponseFrame: null,
476
- description: '[RC-7 / NT-5 variant] Notification with extra error member → T-K close',
477
- },
478
- {
479
- id: 'T-K-5',
480
- rawFrame: '{"jsonrpc":"2.0","method":"host.grants.changed"}',
481
- rawFrameEncoding: 'utf8',
482
- preState: { inFlightRequests: [] },
483
- expectedClass: 'T-K',
484
- expectedOutcome: 'close',
485
- expectedErrorArm: null,
486
- expectedErrorCode: null,
487
- expectedResponseFrame: null,
488
- description: '[NT-5] Notification missing params → idless envelope violation → T-K close',
489
- },
490
- {
491
- id: 'T-K-6',
492
- rawFrame: '{"jsonrpc":"2.0","method":"host.grants.changed","params":{"meta":{"deadlineUnixMs":1},"input":{"grantRevision":"not-a-number","effectiveGrants":[]}}}',
493
- rawFrameEncoding: 'utf8',
494
- preState: { inFlightRequests: [] },
495
- expectedClass: 'T-K',
496
- expectedOutcome: 'close',
497
- expectedErrorArm: null,
498
- expectedErrorCode: null,
499
- expectedResponseFrame: null,
500
- description: '[NT-4] structurally valid Notification, invocation-level invalid params (grantRevision wrong type)',
501
- },
502
- {
503
- id: 'T-K-7',
504
- rawFrame: '{"jsonrpc":"2.0","method":"host.grants.changed","params":{"meta":{"deadlineUnixMs":0},"input":{"grantRevision":0,"effectiveGrants":[]}}}',
505
- rawFrameEncoding: 'utf8',
506
- preState: { inFlightRequests: [] },
507
- expectedClass: 'T-K',
508
- expectedOutcome: 'close',
509
- expectedErrorArm: null,
510
- expectedErrorCode: null,
511
- expectedResponseFrame: null,
512
- description: '[NT-6] row-10 notification with deadlineUnixMs:0 → value failure (H7), T-K close',
513
- },
514
501
  // ═════════════════════════════════════════════════════════════════════════
515
502
  // RESPONSE-CANDIDATE PARTITION — frozen 9 cases + additional coverage
516
503
  //
@@ -546,6 +533,7 @@ export const DISPOSITION_FIXTURE_VECTORS = [
546
533
  expectedErrorArm: null,
547
534
  expectedErrorCode: null,
548
535
  expectedResponseFrame: null,
536
+ zeroSideEffects: true,
549
537
  description: 'response-candidate: both result AND error present (additional coverage)',
550
538
  },
551
539
  // ── MUTUAL-EXCLUSIVITY PROOF PAIR ─────────────────────────────────────
@@ -562,6 +550,7 @@ export const DISPOSITION_FIXTURE_VECTORS = [
562
550
  expectedErrorArm: null,
563
551
  expectedErrorCode: null,
564
552
  expectedResponseFrame: null,
553
+ zeroSideEffects: true,
565
554
  description: 'proof pair: "corr-test" NOT in-flight → T-H (see T-L-2)',
566
555
  },
567
556
  {
@@ -586,6 +575,7 @@ export const DISPOSITION_FIXTURE_VECTORS = [
586
575
  expectedErrorArm: null,
587
576
  expectedErrorCode: null,
588
577
  expectedResponseFrame: null,
578
+ zeroSideEffects: true,
589
579
  description: 'response-candidate: error body is string not object (additional coverage)',
590
580
  },
591
581
  {
@@ -634,6 +624,7 @@ export const DISPOSITION_FIXTURE_VECTORS = [
634
624
  expectedErrorArm: null,
635
625
  expectedErrorCode: null,
636
626
  expectedResponseFrame: null,
627
+ zeroSideEffects: true,
637
628
  description: '[RC-5] row-9 ack with wrong deliveryId: byte-equality fails → T-H, never T-L',
638
629
  },
639
630
  // ── T-L: valid correlated response (settlement) ──────────────────────
@@ -1058,8 +1049,10 @@ export const DISPOSITION_FIXTURE_VECTORS = [
1058
1049
  description: '[beta.8 error] closed HANDSHAKE_REJECTED error settles the correlated hello',
1059
1050
  },
1060
1051
  {
1061
- id: 'T-M-9',
1062
- rawFrame: '{"jsonrpc":"2.0","id":"publish-1","method":"events.publish","params":{"meta":{"deadlineUnixMs":1},"input":{"signalType":"feishu.meeting_artifact.generated.v1","eventId":"feishu-minute-om_abc123-v7","idempotencyKey":"feishu:minute:om_abc123:7","occurredAt":"2026-08-09T04:12:31Z","payload":{"artifactId":"om_abc123","revision":"7"},"source":{"handle":"feishu://meeting-artifacts/minute/om_abc123?revision=7"}}}}',
1052
+ id: 'T-M-10',
1053
+ rawFrame: lifecycleRequestFrame('a', 'host.lifecycle.ping', {
1054
+ nonce: RAW_UTF8_BOUNDARY_CODE_POINTS.ascii.repeat(PING_NONCE_MAX_LENGTH),
1055
+ }),
1063
1056
  rawFrameEncoding: 'utf8',
1064
1057
  preState: { inFlightRequests: [] },
1065
1058
  expectedClass: 'T-M',
@@ -1067,12 +1060,42 @@ export const DISPOSITION_FIXTURE_VECTORS = [
1067
1060
  expectedErrorArm: null,
1068
1061
  expectedErrorCode: null,
1069
1062
  expectedResponseFrame: null,
1063
+ description: '[beta.10 lifecycle] maximum ASCII ping nonce reaches dispatch',
1064
+ },
1065
+ {
1066
+ id: 'T-G-16',
1067
+ rawFrame: lifecycleRequestFrame('a', 'host.lifecycle.ping', {
1068
+ nonce: RAW_UTF8_BOUNDARY_CODE_POINTS.ascii.repeat(PING_NONCE_MAX_LENGTH + 1),
1069
+ }),
1070
+ rawFrameEncoding: 'utf8',
1071
+ preState: { inFlightRequests: [] },
1072
+ expectedClass: 'T-G',
1073
+ expectedOutcome: 'respond',
1074
+ expectedErrorArm: 'InvalidParamsEnvelope',
1075
+ expectedErrorCode: INVALID_PARAMS_CODE,
1076
+ expectedResponseFrame: JSON.stringify(RESPONSE_INVALID_PARAMS_A),
1070
1077
  zeroSideEffects: true,
1071
- description: '[beta.9 C-2] declared-shape events.publish request reaches Host dispatch without a destination',
1078
+ description: '[beta.10 lifecycle] ASCII ping nonce N+1 rejects before dispatch',
1079
+ },
1080
+ {
1081
+ id: 'T-M-11',
1082
+ rawFrame: lifecycleRequestFrame('a', 'host.lifecycle.ping', {
1083
+ nonce: RAW_UTF8_BOUNDARY_CODE_POINTS.multibyte.repeat(PING_NONCE_MAX_LENGTH),
1084
+ }),
1085
+ rawFrameEncoding: 'utf8',
1086
+ preState: { inFlightRequests: [] },
1087
+ expectedClass: 'T-M',
1088
+ expectedOutcome: 'accept',
1089
+ expectedErrorArm: null,
1090
+ expectedErrorCode: null,
1091
+ expectedResponseFrame: null,
1092
+ description: '[beta.10 lifecycle] maximum multibyte ping nonce reaches dispatch',
1072
1093
  },
1073
1094
  {
1074
- id: 'T-G-15',
1075
- rawFrame: '{"jsonrpc":"2.0","id":"a","method":"events.publish","params":{"meta":{"deadlineUnixMs":1},"input":{"signalType":"feishu.meeting_artifact.generated.v1","eventId":"event-1","idempotencyKey":"event-1","occurredAt":"2026-08-09T04:12:31Z","payload":{},"destination":{"threadId":"thread-1"}}}}',
1095
+ id: 'T-G-17',
1096
+ rawFrame: lifecycleRequestFrame('a', 'host.lifecycle.ping', {
1097
+ nonce: RAW_UTF8_BOUNDARY_CODE_POINTS.multibyte.repeat(PING_NONCE_MAX_LENGTH + 1),
1098
+ }),
1076
1099
  rawFrameEncoding: 'utf8',
1077
1100
  preState: { inFlightRequests: [] },
1078
1101
  expectedClass: 'T-G',
@@ -1081,38 +1104,439 @@ export const DISPOSITION_FIXTURE_VECTORS = [
1081
1104
  expectedErrorCode: INVALID_PARAMS_CODE,
1082
1105
  expectedResponseFrame: JSON.stringify(RESPONSE_INVALID_PARAMS_A),
1083
1106
  zeroSideEffects: true,
1084
- description: '[beta.9 C-2] plugin-supplied destination is rejected before Host routing',
1107
+ description: '[beta.10 lifecycle] multibyte ping nonce N+1 rejects before dispatch',
1085
1108
  },
1086
1109
  {
1087
- id: 'T-H-12',
1088
- rawFrame: '{"jsonrpc":"2.0","id":"publish-result","result":{"publicationId":"publication-1","disposition":"accepted","destination":"thread-1"}}',
1110
+ id: 'T-M-12',
1111
+ rawFrame: lifecycleRequestFrame('a', 'host.lifecycle.ping', {
1112
+ nonce: RAW_UTF8_BOUNDARY_CODE_POINTS.escaping.repeat(PING_NONCE_MAX_LENGTH),
1113
+ }),
1089
1114
  rawFrameEncoding: 'utf8',
1090
- preState: { inFlightRequests: [{ id: 'publish-result', method: 'events.publish' }] },
1091
- expectedClass: 'T-H',
1092
- expectedOutcome: 'close',
1115
+ preState: { inFlightRequests: [] },
1116
+ expectedClass: 'T-M',
1117
+ expectedOutcome: 'accept',
1093
1118
  expectedErrorArm: null,
1094
1119
  expectedErrorCode: null,
1095
1120
  expectedResponseFrame: null,
1121
+ description: '[beta.10 lifecycle] maximum JSON-escaping ping nonce reaches dispatch',
1122
+ },
1123
+ {
1124
+ id: 'T-G-18',
1125
+ rawFrame: lifecycleRequestFrame('a', 'host.lifecycle.ping', {
1126
+ nonce: RAW_UTF8_BOUNDARY_CODE_POINTS.escaping.repeat(PING_NONCE_MAX_LENGTH + 1),
1127
+ }),
1128
+ rawFrameEncoding: 'utf8',
1129
+ preState: { inFlightRequests: [] },
1130
+ expectedClass: 'T-G',
1131
+ expectedOutcome: 'respond',
1132
+ expectedErrorArm: 'InvalidParamsEnvelope',
1133
+ expectedErrorCode: INVALID_PARAMS_CODE,
1134
+ expectedResponseFrame: JSON.stringify(RESPONSE_INVALID_PARAMS_A),
1096
1135
  zeroSideEffects: true,
1097
- description: '[beta.9 C-2] open Host receipt is rejected as a protocol violation',
1136
+ description: '[beta.10 lifecycle] JSON-escaping ping nonce N+1 rejects before dispatch',
1098
1137
  },
1099
1138
  {
1100
- id: 'T-L-7',
1101
- rawFrame: '{"jsonrpc":"2.0","id":"publish-result","result":{"publicationId":"publication-1","disposition":"duplicate"}}',
1139
+ id: 'T-L-8',
1140
+ rawFrame: JSON.stringify({
1141
+ jsonrpc: '2.0',
1142
+ id: 'ping-max',
1143
+ result: { nonce: RAW_UTF8_BOUNDARY_CODE_POINTS.multibyte.repeat(PING_NONCE_MAX_LENGTH) },
1144
+ }),
1102
1145
  rawFrameEncoding: 'utf8',
1103
- preState: { inFlightRequests: [{ id: 'publish-result', method: 'events.publish' }] },
1146
+ preState: {
1147
+ inFlightRequests: [{
1148
+ id: 'ping-max',
1149
+ method: 'host.lifecycle.ping',
1150
+ requestSnapshot: {
1151
+ nonce: RAW_UTF8_BOUNDARY_CODE_POINTS.multibyte.repeat(PING_NONCE_MAX_LENGTH),
1152
+ },
1153
+ }],
1154
+ },
1104
1155
  expectedClass: 'T-L',
1105
1156
  expectedOutcome: 'accept',
1106
1157
  expectedErrorArm: null,
1107
1158
  expectedErrorCode: null,
1108
1159
  expectedResponseFrame: null,
1160
+ description: '[beta.10 lifecycle] maximum ping nonce settles only when echoed byte-equal',
1161
+ },
1162
+ {
1163
+ id: 'T-H-13',
1164
+ rawFrame: JSON.stringify({
1165
+ jsonrpc: '2.0',
1166
+ id: 'ping-mismatch',
1167
+ result: { nonce: 'different' },
1168
+ }),
1169
+ rawFrameEncoding: 'utf8',
1170
+ preState: {
1171
+ inFlightRequests: [{
1172
+ id: 'ping-mismatch',
1173
+ method: 'host.lifecycle.ping',
1174
+ requestSnapshot: { nonce: 'expected' },
1175
+ }],
1176
+ },
1177
+ expectedClass: 'T-H',
1178
+ expectedOutcome: 'close',
1179
+ expectedErrorArm: null,
1180
+ expectedErrorCode: null,
1181
+ expectedResponseFrame: null,
1182
+ zeroSideEffects: true,
1183
+ description: '[beta.10 lifecycle] ping result with a non-equal nonce closes without settlement',
1184
+ },
1185
+ {
1186
+ id: 'T-M-14',
1187
+ rawFrame: messagingRequestFrame('send-1', 'messaging.send', M0C_DRAFT),
1188
+ rawFrameEncoding: 'utf8',
1189
+ preState: { inFlightRequests: [] },
1190
+ expectedClass: 'T-M', expectedOutcome: 'accept', expectedErrorArm: null,
1191
+ expectedErrorCode: null, expectedResponseFrame: null,
1192
+ description: '[beta.11 messaging] legal send reaches Host dispatch',
1193
+ },
1194
+ {
1195
+ id: 'T-G-21',
1196
+ rawFrame: messagingRequestFrame('a', 'messaging.send', { ...M0C_DRAFT, authority: 'host' }),
1197
+ rawFrameEncoding: 'utf8',
1198
+ preState: { inFlightRequests: [] },
1199
+ expectedClass: 'T-G', expectedOutcome: 'respond', expectedErrorArm: 'InvalidParamsEnvelope',
1200
+ expectedErrorCode: INVALID_PARAMS_CODE, expectedResponseFrame: JSON.stringify(RESPONSE_INVALID_PARAMS_A),
1201
+ zeroSideEffects: true,
1202
+ description: '[beta.11 messaging] authority-bearing send rejects before dispatch',
1203
+ },
1204
+ {
1205
+ id: 'T-M-15',
1206
+ rawFrame: messagingRequestFrame('append-1', 'messaging.appendElements', {
1207
+ handle: { kind: 'message', token: 'message-handle-1' },
1208
+ operationId: 'append-1',
1209
+ baseRevision: 1,
1210
+ elements: [{ elementId: 'element-2', kind: 'text', payload: { text: 'more' } }],
1211
+ }),
1212
+ rawFrameEncoding: 'utf8', preState: { inFlightRequests: [] },
1213
+ expectedClass: 'T-M', expectedOutcome: 'accept', expectedErrorArm: null,
1214
+ expectedErrorCode: null, expectedResponseFrame: null,
1215
+ description: '[beta.11 messaging] legal append reaches Host dispatch',
1216
+ },
1217
+ {
1218
+ id: 'T-G-22',
1219
+ rawFrame: messagingRequestFrame('a', 'messaging.appendElements', {
1220
+ handle: 'raw-handle', operationId: 'append-1', elements: [],
1221
+ }),
1222
+ rawFrameEncoding: 'utf8', preState: { inFlightRequests: [] },
1223
+ expectedClass: 'T-G', expectedOutcome: 'respond', expectedErrorArm: 'InvalidParamsEnvelope',
1224
+ expectedErrorCode: INVALID_PARAMS_CODE, expectedResponseFrame: JSON.stringify(RESPONSE_INVALID_PARAMS_A),
1109
1225
  zeroSideEffects: true,
1110
- description: '[beta.9 C-2] duplicate receipt legally settles a correlated publication',
1226
+ description: '[beta.11 messaging] malformed append rejects before dispatch',
1227
+ },
1228
+ {
1229
+ id: 'T-M-16',
1230
+ rawFrame: messagingRequestFrame('subscribe-1', 'messaging.subscribe', { handle: 'thread-handle-1' }),
1231
+ rawFrameEncoding: 'utf8', preState: { inFlightRequests: [] },
1232
+ expectedClass: 'T-M', expectedOutcome: 'accept', expectedErrorArm: null,
1233
+ expectedErrorCode: null, expectedResponseFrame: null,
1234
+ description: '[beta.11 messaging] legal subscribe reaches Host dispatch',
1235
+ },
1236
+ {
1237
+ id: 'T-G-23',
1238
+ rawFrame: messagingRequestFrame('a', 'messaging.subscribe', { handle: '' }),
1239
+ rawFrameEncoding: 'utf8', preState: { inFlightRequests: [] },
1240
+ expectedClass: 'T-G', expectedOutcome: 'respond', expectedErrorArm: 'InvalidParamsEnvelope',
1241
+ expectedErrorCode: INVALID_PARAMS_CODE, expectedResponseFrame: JSON.stringify(RESPONSE_INVALID_PARAMS_A),
1242
+ zeroSideEffects: true,
1243
+ description: '[beta.11 messaging] empty subscribe handle rejects before dispatch',
1244
+ },
1245
+ {
1246
+ id: 'T-M-17',
1247
+ rawFrame: messagingRequestFrame('read-1', 'messaging.read', { subscriptionId: 'subscription-1', limit: 2 }),
1248
+ rawFrameEncoding: 'utf8', preState: { inFlightRequests: [] },
1249
+ expectedClass: 'T-M', expectedOutcome: 'accept', expectedErrorArm: null,
1250
+ expectedErrorCode: null, expectedResponseFrame: null,
1251
+ description: '[beta.11 messaging] legal read reaches Host dispatch',
1252
+ },
1253
+ {
1254
+ id: 'T-G-24',
1255
+ rawFrame: messagingRequestFrame('a', 'messaging.read', { subscriptionId: 'subscription-1', limit: 33 }),
1256
+ rawFrameEncoding: 'utf8', preState: { inFlightRequests: [] },
1257
+ expectedClass: 'T-G', expectedOutcome: 'respond', expectedErrorArm: 'InvalidParamsEnvelope',
1258
+ expectedErrorCode: INVALID_PARAMS_CODE, expectedResponseFrame: JSON.stringify(RESPONSE_INVALID_PARAMS_A),
1259
+ zeroSideEffects: true,
1260
+ description: '[beta.11 messaging] read limit N+1 rejects before dispatch',
1261
+ },
1262
+ {
1263
+ id: 'T-M-18',
1264
+ rawFrame: messagingRequestFrame('ack-1', 'messaging.ack', { subscriptionId: 'subscription-1', ackToken: 'ack-1' }),
1265
+ rawFrameEncoding: 'utf8', preState: { inFlightRequests: [] },
1266
+ expectedClass: 'T-M', expectedOutcome: 'accept', expectedErrorArm: null,
1267
+ expectedErrorCode: null, expectedResponseFrame: null,
1268
+ description: '[beta.11 messaging] legal acknowledgement reaches Host dispatch',
1269
+ },
1270
+ {
1271
+ id: 'T-G-25',
1272
+ rawFrame: messagingRequestFrame('a', 'messaging.ack', { subscriptionId: 'subscription-1', ackToken: '' }),
1273
+ rawFrameEncoding: 'utf8', preState: { inFlightRequests: [] },
1274
+ expectedClass: 'T-G', expectedOutcome: 'respond', expectedErrorArm: 'InvalidParamsEnvelope',
1275
+ expectedErrorCode: INVALID_PARAMS_CODE, expectedResponseFrame: JSON.stringify(RESPONSE_INVALID_PARAMS_A),
1276
+ zeroSideEffects: true,
1277
+ description: '[beta.11 messaging] empty acknowledgement token rejects before dispatch',
1278
+ },
1279
+ {
1280
+ id: 'T-M-19',
1281
+ rawFrame: messagingRequestFrame('snapshot-1', 'messaging.snapshot', { subscriptionId: 'subscription-1', maxItems: 2 }),
1282
+ rawFrameEncoding: 'utf8', preState: { inFlightRequests: [] },
1283
+ expectedClass: 'T-M', expectedOutcome: 'accept', expectedErrorArm: null,
1284
+ expectedErrorCode: null, expectedResponseFrame: null,
1285
+ description: '[beta.11 messaging] legal snapshot page reaches Host dispatch',
1286
+ },
1287
+ {
1288
+ id: 'T-G-26',
1289
+ rawFrame: messagingRequestFrame('a', 'messaging.snapshot', { subscriptionId: 'subscription-1', maxItems: 0 }),
1290
+ rawFrameEncoding: 'utf8', preState: { inFlightRequests: [] },
1291
+ expectedClass: 'T-G', expectedOutcome: 'respond', expectedErrorArm: 'InvalidParamsEnvelope',
1292
+ expectedErrorCode: INVALID_PARAMS_CODE, expectedResponseFrame: JSON.stringify(RESPONSE_INVALID_PARAMS_A),
1293
+ zeroSideEffects: true,
1294
+ description: '[beta.11 messaging] zero snapshot maxItems rejects before dispatch',
1295
+ },
1296
+ {
1297
+ id: 'T-M-20',
1298
+ rawFrame: messagingRequestFrame('deliver-1', 'host.messaging.deliver', {
1299
+ deliveryId: 'delivery-1',
1300
+ kind: 'message', executionId: 'execution-1',
1301
+ threadId: M0C_ENVELOPE.threadId,
1302
+ envelope: M0C_ENVELOPE,
1303
+ }),
1304
+ rawFrameEncoding: 'utf8', preState: { inFlightRequests: [] },
1305
+ expectedClass: 'T-M', expectedOutcome: 'accept', expectedErrorArm: null,
1306
+ expectedErrorCode: null, expectedResponseFrame: null,
1307
+ description: '[beta.11 messaging] legal Host delivery reaches plugin dispatch',
1308
+ },
1309
+ {
1310
+ id: 'T-M-21',
1311
+ rawFrame: messagingRequestFrame('send-exponent', 'messaging.send', {
1312
+ address: { kind: 'thread_handle', handle: 'thread-handle-1' },
1313
+ idempotencyKey: 'send-exp',
1314
+ payload: {
1315
+ provenance: { epistemicStatus: 'inference' },
1316
+ elements: [
1317
+ {
1318
+ elementId: 'element-1',
1319
+ kind: 'rich_block',
1320
+ payload: { id: 'proof-1', kind: 'proof', v: 1, data: 1e+21 },
1321
+ },
1322
+ ],
1323
+ },
1324
+ }),
1325
+ rawFrameEncoding: 'utf8', preState: { inFlightRequests: [] },
1326
+ expectedClass: 'T-M', expectedOutcome: 'accept', expectedErrorArm: null,
1327
+ expectedErrorCode: null, expectedResponseFrame: null,
1328
+ description: '[beta.11 messaging] V8-canonical exponent in open payload is legal at T-C',
1329
+ },
1330
+ {
1331
+ id: 'T-G-27',
1332
+ rawFrame: messagingRequestFrame('a', 'host.messaging.deliver', {
1333
+ deliveryId: 'delivery-1',
1334
+ threadHandle: { kind: 'thread_handle', handle: 'thread-handle-1' },
1335
+ envelope: { ...M0C_ENVELOPE, occurredAt: '2026-08-18T03:00:00Z' },
1336
+ }),
1337
+ rawFrameEncoding: 'utf8', preState: { inFlightRequests: [] },
1338
+ expectedClass: 'T-G', expectedOutcome: 'respond', expectedErrorArm: 'InvalidParamsEnvelope',
1339
+ expectedErrorCode: INVALID_PARAMS_CODE, expectedResponseFrame: JSON.stringify(RESPONSE_INVALID_PARAMS_A),
1340
+ zeroSideEffects: true,
1341
+ description: '[beta.11 messaging] non-canonical stored timestamp rejects before callback dispatch',
1342
+ },
1343
+ {
1344
+ id: 'T-C-4',
1345
+ rawFrame: JSON.stringify({ jsonrpc: '2.0', id: 'read-publish-rev', result: {
1346
+ events: [{ ...M0C_PUBLISH_EVENT, envelope: { ...M0C_ENVELOPE, revision: 1.5 } }],
1347
+ ackToken: 'ack-1', stale: false,
1348
+ } }),
1349
+ rawFrameEncoding: 'utf8',
1350
+ preState: { inFlightRequests: [{ id: 'read-publish-rev', method: 'messaging.read', requestSnapshot: { readLimit: 2 } }] },
1351
+ expectedClass: 'T-C', expectedOutcome: 'close', expectedErrorArm: null,
1352
+ expectedErrorCode: null, expectedResponseFrame: null, zeroSideEffects: true,
1353
+ description: '[beta.11 messaging] fractional publish envelope revision in read response is rejected at canonicality',
1354
+ },
1355
+ {
1356
+ id: 'T-C-5',
1357
+ rawFrame: JSON.stringify({ jsonrpc: '2.0', id: 'read-append-rev', result: {
1358
+ events: [{
1359
+ eventId: 'event-append-1', sequence: 1, type: 'message.elements.append',
1360
+ messageId: 'message-1', threadId: 'thread-1', operationId: 'op-1',
1361
+ revision: 1.5, elements: [],
1362
+ }],
1363
+ ackToken: 'ack-1', stale: false,
1364
+ } }),
1365
+ rawFrameEncoding: 'utf8',
1366
+ preState: { inFlightRequests: [{ id: 'read-append-rev', method: 'messaging.read', requestSnapshot: { readLimit: 2 } }] },
1367
+ expectedClass: 'T-C', expectedOutcome: 'close', expectedErrorArm: null,
1368
+ expectedErrorCode: null, expectedResponseFrame: null, zeroSideEffects: true,
1369
+ description: '[beta.11 messaging] fractional append event revision in read response is rejected at canonicality',
1370
+ },
1371
+ {
1372
+ id: 'T-C-6',
1373
+ rawFrame: JSON.stringify({ jsonrpc: '2.0', id: 'read-append-baserev', result: {
1374
+ events: [{
1375
+ eventId: 'event-append-2', sequence: 1, type: 'message.elements.append',
1376
+ messageId: 'message-1', threadId: 'thread-1', operationId: 'op-1',
1377
+ baseRevision: 1.5, revision: 2, elements: [],
1378
+ }],
1379
+ ackToken: 'ack-1', stale: false,
1380
+ } }),
1381
+ rawFrameEncoding: 'utf8',
1382
+ preState: { inFlightRequests: [{ id: 'read-append-baserev', method: 'messaging.read', requestSnapshot: { readLimit: 2 } }] },
1383
+ expectedClass: 'T-C', expectedOutcome: 'close', expectedErrorArm: null,
1384
+ expectedErrorCode: null, expectedResponseFrame: null, zeroSideEffects: true,
1385
+ description: '[beta.11 messaging] fractional append event baseRevision in read response is rejected at canonicality',
1386
+ },
1387
+ {
1388
+ id: 'T-L-11',
1389
+ rawFrame: JSON.stringify({ jsonrpc: '2.0', id: 'send-result', result: {
1390
+ messageId: 'message-1', threadId: 'thread-1', revision: 1,
1391
+ messageHandle: { kind: 'message', token: 'message-handle-1' },
1392
+ } }),
1393
+ rawFrameEncoding: 'utf8', preState: { inFlightRequests: [{ id: 'send-result', method: 'messaging.send' }] },
1394
+ expectedClass: 'T-L', expectedOutcome: 'accept', expectedErrorArm: null,
1395
+ expectedErrorCode: null, expectedResponseFrame: null,
1396
+ description: '[beta.11 messaging] closed send receipt settles the request',
1397
+ },
1398
+ {
1399
+ id: 'T-H-14',
1400
+ rawFrame: JSON.stringify({ jsonrpc: '2.0', id: 'send-legacy', result: {
1401
+ messageId: 'message-1', threadId: 'thread-1', revision: 1,
1402
+ handle: { kind: 'message', token: 'message-handle-1' },
1403
+ } }),
1404
+ rawFrameEncoding: 'utf8', preState: { inFlightRequests: [{ id: 'send-legacy', method: 'messaging.send' }] },
1405
+ expectedClass: 'T-H', expectedOutcome: 'close', expectedErrorArm: null,
1406
+ expectedErrorCode: null, expectedResponseFrame: null, zeroSideEffects: true,
1407
+ description: '[beta.11 messaging] legacy send receipt closes without settlement',
1408
+ },
1409
+ {
1410
+ id: 'T-L-12',
1411
+ rawFrame: JSON.stringify({ jsonrpc: '2.0', id: 'append-result', result: {
1412
+ messageId: 'message-1', revision: 2, appliedElementIds: ['element-2'],
1413
+ } }),
1414
+ rawFrameEncoding: 'utf8', preState: { inFlightRequests: [{ id: 'append-result', method: 'messaging.appendElements', requestSnapshot: { appendElementIds: ['element-2'] } }] },
1415
+ expectedClass: 'T-L', expectedOutcome: 'accept', expectedErrorArm: null,
1416
+ expectedErrorCode: null, expectedResponseFrame: null,
1417
+ description: '[beta.11 messaging] closed append receipt settles the request',
1418
+ },
1419
+ {
1420
+ id: 'T-H-15',
1421
+ rawFrame: JSON.stringify({ jsonrpc: '2.0', id: 'append-empty', result: {
1422
+ messageId: 'message-1', revision: 2, appliedElementIds: [],
1423
+ } }),
1424
+ rawFrameEncoding: 'utf8', preState: { inFlightRequests: [{ id: 'append-empty', method: 'messaging.appendElements', requestSnapshot: { appendElementIds: ['element-2'] } }] },
1425
+ expectedClass: 'T-H', expectedOutcome: 'close', expectedErrorArm: null,
1426
+ expectedErrorCode: null, expectedResponseFrame: null, zeroSideEffects: true,
1427
+ description: '[beta.11 messaging] empty append receipt closes without settlement',
1428
+ },
1429
+ {
1430
+ id: 'T-L-13',
1431
+ rawFrame: '{"jsonrpc":"2.0","id":"subscribe-result","result":{"subscriptionId":"subscription-1"}}',
1432
+ rawFrameEncoding: 'utf8', preState: { inFlightRequests: [{ id: 'subscribe-result', method: 'messaging.subscribe' }] },
1433
+ expectedClass: 'T-L', expectedOutcome: 'accept', expectedErrorArm: null,
1434
+ expectedErrorCode: null, expectedResponseFrame: null,
1435
+ description: '[beta.11 messaging] closed subscription receipt settles the request',
1436
+ },
1437
+ {
1438
+ id: 'T-H-16',
1439
+ rawFrame: '{"jsonrpc":"2.0","id":"subscribe-open","result":{"subscriptionId":"subscription-1","extra":true}}',
1440
+ rawFrameEncoding: 'utf8', preState: { inFlightRequests: [{ id: 'subscribe-open', method: 'messaging.subscribe' }] },
1441
+ expectedClass: 'T-H', expectedOutcome: 'close', expectedErrorArm: null,
1442
+ expectedErrorCode: null, expectedResponseFrame: null, zeroSideEffects: true,
1443
+ description: '[beta.11 messaging] open subscription receipt closes without settlement',
1444
+ },
1445
+ {
1446
+ id: 'T-L-14',
1447
+ rawFrame: '{"jsonrpc":"2.0","id":"read-result","result":{"events":[],"ackToken":null,"stale":false}}',
1448
+ rawFrameEncoding: 'utf8', preState: { inFlightRequests: [{ id: 'read-result', method: 'messaging.read', requestSnapshot: { readLimit: 2 } }] },
1449
+ expectedClass: 'T-L', expectedOutcome: 'accept', expectedErrorArm: null,
1450
+ expectedErrorCode: null, expectedResponseFrame: null,
1451
+ description: '[beta.11 messaging] empty read page settles the request',
1452
+ },
1453
+ {
1454
+ id: 'T-H-17',
1455
+ rawFrame: JSON.stringify({ jsonrpc: '2.0', id: 'read-over-limit', result: {
1456
+ events: [M0C_PUBLISH_EVENT, { ...M0C_PUBLISH_EVENT, eventId: 'event-2', sequence: 2 }],
1457
+ ackToken: 'ack-2', stale: false,
1458
+ } }),
1459
+ rawFrameEncoding: 'utf8', preState: { inFlightRequests: [{ id: 'read-over-limit', method: 'messaging.read', requestSnapshot: { readLimit: 1 } }] },
1460
+ expectedClass: 'T-H', expectedOutcome: 'close', expectedErrorArm: null,
1461
+ expectedErrorCode: null, expectedResponseFrame: null, zeroSideEffects: true,
1462
+ description: '[beta.11 messaging] read page beyond the request limit closes without cursor progress',
1463
+ },
1464
+ {
1465
+ id: 'T-L-15', rawFrame: '{"jsonrpc":"2.0","id":"ack-result","result":null}',
1466
+ rawFrameEncoding: 'utf8', preState: { inFlightRequests: [{ id: 'ack-result', method: 'messaging.ack' }] },
1467
+ expectedClass: 'T-L', expectedOutcome: 'accept', expectedErrorArm: null,
1468
+ expectedErrorCode: null, expectedResponseFrame: null,
1469
+ description: '[beta.11 messaging] null acknowledgement settles the request',
1470
+ },
1471
+ {
1472
+ id: 'T-H-18', rawFrame: '{"jsonrpc":"2.0","id":"ack-open","result":{}}',
1473
+ rawFrameEncoding: 'utf8', preState: { inFlightRequests: [{ id: 'ack-open', method: 'messaging.ack' }] },
1474
+ expectedClass: 'T-H', expectedOutcome: 'close', expectedErrorArm: null,
1475
+ expectedErrorCode: null, expectedResponseFrame: null, zeroSideEffects: true,
1476
+ description: '[beta.11 messaging] non-null acknowledgement closes without cursor progress',
1477
+ },
1478
+ {
1479
+ id: 'T-L-16',
1480
+ rawFrame: JSON.stringify({ jsonrpc: '2.0', id: 'snapshot-result', result: {
1481
+ items: [], nextPageToken: null, snapshotAckToken: 'snapshot-ack-1',
1482
+ } }),
1483
+ rawFrameEncoding: 'utf8', preState: { inFlightRequests: [{ id: 'snapshot-result', method: 'messaging.snapshot', requestSnapshot: { snapshotMaxItems: 2 } }] },
1484
+ expectedClass: 'T-L', expectedOutcome: 'accept', expectedErrorArm: null,
1485
+ expectedErrorCode: null, expectedResponseFrame: null,
1486
+ description: '[beta.11 messaging] final snapshot page settles the traversal request',
1487
+ },
1488
+ {
1489
+ id: 'T-H-19',
1490
+ rawFrame: JSON.stringify({ jsonrpc: '2.0', id: 'snapshot-over-limit', result: {
1491
+ items: [M0C_ENVELOPE, { ...M0C_ENVELOPE, messageId: 'message-2' }],
1492
+ nextPageToken: null, snapshotAckToken: 'snapshot-ack-2',
1493
+ } }),
1494
+ rawFrameEncoding: 'utf8', preState: { inFlightRequests: [{ id: 'snapshot-over-limit', method: 'messaging.snapshot', requestSnapshot: { snapshotMaxItems: 1 } }] },
1495
+ expectedClass: 'T-H', expectedOutcome: 'close', expectedErrorArm: null,
1496
+ expectedErrorCode: null, expectedResponseFrame: null, zeroSideEffects: true,
1497
+ description: '[beta.11 messaging] snapshot page beyond request maxItems closes without progress',
1498
+ },
1499
+ {
1500
+ id: 'T-L-17',
1501
+ rawFrame: '{"jsonrpc":"2.0","id":"deliver-result","result":{"deliveryId":"delivery-1"}}',
1502
+ rawFrameEncoding: 'utf8', preState: { inFlightRequests: [{ id: 'deliver-result', method: 'host.messaging.deliver', requestSnapshot: { deliveryId: 'delivery-1' } }] },
1503
+ expectedClass: 'T-L', expectedOutcome: 'accept', expectedErrorArm: null,
1504
+ expectedErrorCode: null, expectedResponseFrame: null,
1505
+ description: '[beta.11 messaging] byte-equal delivery acknowledgement settles the callback',
1506
+ },
1507
+ {
1508
+ id: 'T-H-20',
1509
+ rawFrame: '{"jsonrpc":"2.0","id":"deliver-mismatch","result":{"deliveryId":"wrong-delivery"}}',
1510
+ rawFrameEncoding: 'utf8', preState: { inFlightRequests: [{ id: 'deliver-mismatch', method: 'host.messaging.deliver', requestSnapshot: { deliveryId: 'delivery-1' } }] },
1511
+ expectedClass: 'T-H', expectedOutcome: 'close', expectedErrorArm: null,
1512
+ expectedErrorCode: null, expectedResponseFrame: null, zeroSideEffects: true,
1513
+ description: '[beta.11 messaging] mismatched delivery acknowledgement closes without settlement',
1514
+ },
1515
+ {
1516
+ id: 'T-H-21',
1517
+ rawFrame: JSON.stringify({ jsonrpc: '2.0', id: 'append-provenance', result: {
1518
+ messageId: 'message-1', revision: 2, appliedElementIds: ['wrong-element'],
1519
+ } }),
1520
+ rawFrameEncoding: 'utf8',
1521
+ preState: { inFlightRequests: [{ id: 'append-provenance', method: 'messaging.appendElements', requestSnapshot: { appendElementIds: ['element-2'] } }] },
1522
+ expectedClass: 'T-H', expectedOutcome: 'close', expectedErrorArm: null,
1523
+ expectedErrorCode: null, expectedResponseFrame: null, zeroSideEffects: true,
1524
+ description: '[beta.11 messaging] append receipt with foreign element IDs closes without settlement',
1525
+ },
1526
+ {
1527
+ id: 'T-H-22',
1528
+ rawFrame: JSON.stringify({ jsonrpc: '2.0', id: 'append-no-snapshot', result: {
1529
+ messageId: 'message-1', revision: 2, appliedElementIds: ['element-2'],
1530
+ } }),
1531
+ rawFrameEncoding: 'utf8',
1532
+ preState: { inFlightRequests: [{ id: 'append-no-snapshot', method: 'messaging.appendElements' }] },
1533
+ expectedClass: 'T-H', expectedOutcome: 'close', expectedErrorArm: null,
1534
+ expectedErrorCode: null, expectedResponseFrame: null, zeroSideEffects: true,
1535
+ description: '[beta.11 messaging] append receipt without provenance snapshot closes without settlement',
1111
1536
  },
1112
1537
  ];
1113
1538
  /** Complete beta.8 handshake safety surface exported for downstream runners. */
1114
1539
  export const BETA8_HANDSHAKE_VECTOR_IDS = [
1115
- 'T-C-2',
1116
1540
  'T-M-1', 'T-M-2', 'T-M-3', 'T-M-4', 'T-M-5', 'T-M-6', 'T-M-7', 'T-M-8',
1117
1541
  'T-G-2', 'T-G-3', 'T-G-4', 'T-G-5', 'T-G-6', 'T-G-7', 'T-G-8', 'T-G-9', 'T-G-10',
1118
1542
  'T-G-11', 'T-G-12', 'T-G-13', 'T-G-14',
@@ -1120,10 +1544,17 @@ export const BETA8_HANDSHAKE_VECTOR_IDS = [
1120
1544
  'T-L-5', 'T-L-6',
1121
1545
  ];
1122
1546
  /** Complete beta.9 C-2 publish safety surface exported for downstream runners. */
1123
- export const BETA9_EVENTS_PUBLISH_VECTOR_IDS = [
1124
- 'T-M-9',
1125
- 'T-G-15',
1126
- 'T-H-12',
1127
- 'T-L-7',
1547
+ /** Complete beta.10 M0-B lifecycle safety surface for rows 10 through 12. */
1548
+ /** Complete beta.11 M0-C messaging safety surface for rows 3 through 9. */
1549
+ export const BETA11_MESSAGING_VECTOR_IDS = [
1550
+ 'T-C-3',
1551
+ 'T-H-2', 'T-H-5', 'T-H-9', 'T-L-4',
1552
+ 'T-M-14', 'T-G-21', 'T-M-15', 'T-G-22', 'T-M-16', 'T-G-23',
1553
+ 'T-M-17', 'T-G-24', 'T-M-18', 'T-G-25', 'T-M-19', 'T-G-26',
1554
+ 'T-M-20', 'T-M-21', 'T-G-27',
1555
+ 'T-C-4', 'T-C-5', 'T-C-6',
1556
+ 'T-L-11', 'T-H-14', 'T-L-12', 'T-H-15', 'T-L-13', 'T-H-16',
1557
+ 'T-L-14', 'T-H-17', 'T-L-15', 'T-H-18', 'T-L-16', 'T-H-19',
1558
+ 'T-L-17', 'T-H-20', 'T-H-21', 'T-H-22',
1128
1559
  ];
1129
1560
  //# sourceMappingURL=disposition-fixtures.js.map