@clowder-ai/plugin-contract 0.1.0-beta.8 → 0.2.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 (144) hide show
  1. package/dist/codegen/generate-contract.d.ts +7 -0
  2. package/dist/codegen/generate-contract.d.ts.map +1 -1
  3. package/dist/codegen/generate-contract.js +350 -19
  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 +2 -1
  10. package/dist/conformance/index.d.ts.map +1 -1
  11. package/dist/conformance/index.js +2 -1
  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 +30 -0
  16. package/dist/conformance/messaging-behavior-fixture.js.map +1 -0
  17. package/dist/conformance/runner.d.ts.map +1 -1
  18. package/dist/conformance/runner.js +23 -3
  19. package/dist/conformance/runner.js.map +1 -1
  20. package/dist/conformance/stdio-harness/wire-shape.d.ts +1 -1
  21. package/dist/docx-materialization.d.ts +8 -0
  22. package/dist/docx-materialization.d.ts.map +1 -0
  23. package/dist/docx-materialization.js +19 -0
  24. package/dist/docx-materialization.js.map +1 -0
  25. package/dist/generated/contract.generated.d.ts +1665 -33
  26. package/dist/generated/contract.generated.d.ts.map +1 -1
  27. package/dist/generated/contract.generated.js +72 -3
  28. package/dist/generated/contract.generated.js.map +1 -1
  29. package/dist/index.d.ts +2 -1
  30. package/dist/index.d.ts.map +1 -1
  31. package/dist/index.js +2 -1
  32. package/dist/index.js.map +1 -1
  33. package/dist/validation/catalog.d.ts +21 -0
  34. package/dist/validation/catalog.d.ts.map +1 -0
  35. package/dist/validation/catalog.js +140 -0
  36. package/dist/validation/catalog.js.map +1 -0
  37. package/dist/validation/cloud-conversation-host.d.ts +18 -0
  38. package/dist/validation/cloud-conversation-host.d.ts.map +1 -0
  39. package/dist/validation/cloud-conversation-host.js +83 -0
  40. package/dist/validation/cloud-conversation-host.js.map +1 -0
  41. package/dist/validation/companion-bridge.d.ts +6 -0
  42. package/dist/validation/companion-bridge.d.ts.map +1 -0
  43. package/dist/validation/companion-bridge.js +198 -0
  44. package/dist/validation/companion-bridge.js.map +1 -0
  45. package/dist/validation/docx-materialization.d.ts +6 -0
  46. package/dist/validation/docx-materialization.d.ts.map +1 -0
  47. package/dist/validation/docx-materialization.js +36 -0
  48. package/dist/validation/docx-materialization.js.map +1 -0
  49. package/dist/validation/index.d.ts +9 -0
  50. package/dist/validation/index.d.ts.map +1 -1
  51. package/dist/validation/index.js +9 -0
  52. package/dist/validation/index.js.map +1 -1
  53. package/dist/validation/manifest.d.ts.map +1 -1
  54. package/dist/validation/manifest.js +324 -1
  55. package/dist/validation/manifest.js.map +1 -1
  56. package/dist/validation/members.d.ts +4 -0
  57. package/dist/validation/members.d.ts.map +1 -0
  58. package/dist/validation/members.js +11 -0
  59. package/dist/validation/members.js.map +1 -0
  60. package/dist/validation/messaging-semantic.d.ts.map +1 -1
  61. package/dist/validation/messaging-semantic.js +98 -0
  62. package/dist/validation/messaging-semantic.js.map +1 -1
  63. package/dist/validation/messaging-wire.d.ts +42 -0
  64. package/dist/validation/messaging-wire.d.ts.map +1 -0
  65. package/dist/validation/messaging-wire.js +184 -0
  66. package/dist/validation/messaging-wire.js.map +1 -0
  67. package/dist/validation/operation-rows.d.ts +25 -0
  68. package/dist/validation/operation-rows.d.ts.map +1 -0
  69. package/dist/validation/operation-rows.js +135 -0
  70. package/dist/validation/operation-rows.js.map +1 -0
  71. package/dist/validation/signals.d.ts +17 -0
  72. package/dist/validation/signals.d.ts.map +1 -0
  73. package/dist/validation/signals.js +32 -0
  74. package/dist/validation/signals.js.map +1 -0
  75. package/dist/variant.d.ts +114 -0
  76. package/dist/variant.d.ts.map +1 -0
  77. package/dist/variant.js +305 -0
  78. package/dist/variant.js.map +1 -0
  79. package/dist/wire/constants.d.ts +2 -1
  80. package/dist/wire/constants.d.ts.map +1 -1
  81. package/dist/wire/constants.js +2 -1
  82. package/dist/wire/constants.js.map +1 -1
  83. package/dist/wire/dispatch.d.ts +49 -0
  84. package/dist/wire/dispatch.d.ts.map +1 -0
  85. package/dist/wire/dispatch.js +880 -0
  86. package/dist/wire/dispatch.js.map +1 -0
  87. package/dist/wire/disposition-fixtures.d.ts +10 -0
  88. package/dist/wire/disposition-fixtures.d.ts.map +1 -1
  89. package/dist/wire/disposition-fixtures.js +661 -75
  90. package/dist/wire/disposition-fixtures.js.map +1 -1
  91. package/dist/wire/envelope.d.ts +31 -0
  92. package/dist/wire/envelope.d.ts.map +1 -1
  93. package/dist/wire/envelope.js +48 -1
  94. package/dist/wire/envelope.js.map +1 -1
  95. package/dist/wire/errors.d.ts +31 -1
  96. package/dist/wire/errors.d.ts.map +1 -1
  97. package/dist/wire/errors.js +36 -0
  98. package/dist/wire/errors.js.map +1 -1
  99. package/dist/wire/grants.d.ts +4 -4
  100. package/dist/wire/grants.js +3 -3
  101. package/dist/wire/handshake-byte-bounds.d.ts.map +1 -1
  102. package/dist/wire/handshake-byte-bounds.js +5 -2
  103. package/dist/wire/handshake-byte-bounds.js.map +1 -1
  104. package/dist/wire/handshake.d.ts +6 -0
  105. package/dist/wire/handshake.d.ts.map +1 -1
  106. package/dist/wire/handshake.js +6 -3
  107. package/dist/wire/handshake.js.map +1 -1
  108. package/dist/wire/index.d.ts +13 -6
  109. package/dist/wire/index.d.ts.map +1 -1
  110. package/dist/wire/index.js +31 -6
  111. package/dist/wire/index.js.map +1 -1
  112. package/dist/wire/lifecycle-byte-bounds.d.ts +40 -0
  113. package/dist/wire/lifecycle-byte-bounds.d.ts.map +1 -0
  114. package/dist/wire/lifecycle-byte-bounds.js +149 -0
  115. package/dist/wire/lifecycle-byte-bounds.js.map +1 -0
  116. package/dist/wire/messaging-byte-bounds.d.ts +62 -0
  117. package/dist/wire/messaging-byte-bounds.d.ts.map +1 -0
  118. package/dist/wire/messaging-byte-bounds.js +581 -0
  119. package/dist/wire/messaging-byte-bounds.js.map +1 -0
  120. package/dist/wire/registry.d.ts +63 -77
  121. package/dist/wire/registry.d.ts.map +1 -1
  122. package/dist/wire/registry.js +47 -76
  123. package/dist/wire/registry.js.map +1 -1
  124. package/dist/wire/row-shapes.d.ts +87 -70
  125. package/dist/wire/row-shapes.d.ts.map +1 -1
  126. package/dist/wire/row-shapes.js +31 -4
  127. package/dist/wire/row-shapes.js.map +1 -1
  128. package/fixtures/behavior/messaging/adversarial-invariants.json +92 -2
  129. package/fixtures/manifest/invalid/duplicate-signal-type.json +35 -0
  130. package/fixtures/manifest/invalid/icon-package-escape.json +22 -0
  131. package/fixtures/manifest/valid/localized-product-metadata.json +27 -0
  132. package/fixtures/messaging/valid/subscription-delivery.json +1 -1
  133. package/fixtures/signals/invalid/dynamic-schema-url.json +10 -0
  134. package/fixtures/signals/invalid/forbidden-raw-privacy.json +10 -0
  135. package/fixtures/signals/valid/remote-service-declaration.json +10 -0
  136. package/package.json +17 -3
  137. package/src/schemas/behavior-fixture.schema.json +903 -116
  138. package/src/schemas/catalog.schema.json +91 -0
  139. package/src/schemas/companion-bridge.schema.json +2256 -0
  140. package/src/schemas/docx-materialization.schema.json +302 -0
  141. package/src/schemas/manifest.schema.json +2276 -88
  142. package/src/schemas/messaging.schema.json +692 -41
  143. package/src/schemas/plugin-metadata.schema.json +62 -0
  144. package/src/schemas/signal.schema.json +119 -0
@@ -30,7 +30,10 @@
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 { MAX_GRANT_ITEMS, VALID_CAPABILITIES } from './grants.js';
34
+ import { PING_NONCE_MAX_LENGTH } from './row-shapes.js';
35
+ import { WIRE_UINT53_MAX } from './wire-uint53.js';
36
+ 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
37
  // ---------------------------------------------------------------------------
35
38
  // Closed error arm names — the 11 concrete envelope types from envelope.ts
36
39
  // ---------------------------------------------------------------------------
@@ -84,6 +87,15 @@ const RESPONSE_HANDSHAKE_REJECTED_AUTHORITY_A = {
84
87
  data: { reason: 'AUTHORITY_VIOLATION' },
85
88
  },
86
89
  };
90
+ const RESPONSE_DEADLINE_EXPIRED_DRAIN = {
91
+ jsonrpc: '2.0',
92
+ id: 'drain-deadline',
93
+ error: {
94
+ code: DEADLINE_EXPIRED_CODE,
95
+ message: DEADLINE_EXPIRED_MESSAGE,
96
+ data: {},
97
+ },
98
+ };
87
99
  const BETA8_HELLO = {
88
100
  pluginId: 'example.loopback',
89
101
  packageDigest: `sha512-${'A'.repeat(86)}==`,
@@ -95,6 +107,9 @@ const RAW_UTF8_BOUNDARY_CODE_POINTS = {
95
107
  multibyte: '😀',
96
108
  escaping: '\u0000',
97
109
  };
110
+ const ALL_CAPABILITY_VALUES = [...VALID_CAPABILITIES]
111
+ .sort((a, b) => Buffer.byteLength(JSON.stringify(b)) - Buffer.byteLength(JSON.stringify(a)) || a.localeCompare(b))
112
+ .slice(0, MAX_GRANT_ITEMS);
98
113
  const BETA8_BINDING = {
99
114
  ...BETA8_HELLO,
100
115
  pluginInstanceId: 'instance-1',
@@ -131,6 +146,65 @@ function readyRequestFrame(id, input) {
131
146
  function helloResultFrame(id, result) {
132
147
  return JSON.stringify({ jsonrpc: '2.0', id, result });
133
148
  }
149
+ function lifecycleRequestFrame(id, method, input) {
150
+ return JSON.stringify({
151
+ jsonrpc: '2.0',
152
+ id,
153
+ method,
154
+ params: { meta: { deadlineUnixMs: WIRE_UINT53_MAX }, input },
155
+ });
156
+ }
157
+ function grantsChangedNotificationFrame(effectiveGrants) {
158
+ return JSON.stringify({
159
+ jsonrpc: '2.0',
160
+ method: 'host.grants.changed',
161
+ params: {
162
+ meta: { deadlineUnixMs: WIRE_UINT53_MAX },
163
+ input: { grantRevision: WIRE_UINT53_MAX, effectiveGrants },
164
+ },
165
+ });
166
+ }
167
+ function messagingRequestFrame(id, method, input) {
168
+ return JSON.stringify({
169
+ jsonrpc: '2.0',
170
+ id,
171
+ method,
172
+ params: { meta: { deadlineUnixMs: WIRE_UINT53_MAX }, input },
173
+ });
174
+ }
175
+ const M0C_DRAFT = {
176
+ address: { kind: 'thread_handle', handle: 'thread-handle-1' },
177
+ idempotencyKey: 'send-1',
178
+ payload: {
179
+ provenance: { epistemicStatus: 'inference' },
180
+ elements: [
181
+ { elementId: 'element-1', kind: 'text', payload: { text: 'hello' } },
182
+ ],
183
+ },
184
+ };
185
+ const M0C_ENVELOPE = {
186
+ messageId: 'message-1',
187
+ revision: 1,
188
+ threadId: 'thread-1',
189
+ actor: { kind: 'user', id: 'user-1' },
190
+ audience: { kind: 'public' },
191
+ occurredAt: '2026-08-18T03:00:00.000Z',
192
+ payload: {
193
+ provenance: {
194
+ origin: { kind: 'host' },
195
+ epistemicStatus: 'user_intent',
196
+ },
197
+ elements: [
198
+ { elementId: 'element-1', kind: 'text', payload: { text: 'hello' } },
199
+ ],
200
+ },
201
+ };
202
+ const M0C_PUBLISH_EVENT = {
203
+ eventId: 'event-1',
204
+ sequence: 1,
205
+ type: 'message.publish',
206
+ envelope: M0C_ENVELOPE,
207
+ };
134
208
  /**
135
209
  * 9 response-candidate sub-cases per §3.8-1:
136
210
  * "your R9 correction #5's five required cases plus four controls"
@@ -166,7 +240,7 @@ export const RESPONSE_CANDIDATE_CASES = {
166
240
  */
167
241
  export const NOTIFICATION_PARTITION_CASES = {
168
242
  /** §3.8-1 NT #1: legal row-10 notification → T-J accept */
169
- 'nt-1-legal-row10': { vectorId: 'T-J-1', expectedClass: 'T-J' },
243
+ 'nt-1-removed-callback': { vectorId: 'T-K-11', expectedClass: 'T-K' },
170
244
  /** §3.8-1 NT #2: request-only method without id → T-K close */
171
245
  'nt-2-request-method': { vectorId: 'T-K-1', expectedClass: 'T-K' },
172
246
  /** §3.8-1 NT #3: unknown method without id → T-K close */
@@ -184,6 +258,10 @@ export const NOTIFICATION_PARTITION_CASES = {
184
258
  // The fixture vectors (35 total)
185
259
  // ---------------------------------------------------------------------------
186
260
  export const DISPOSITION_FIXTURE_VECTORS = [
261
+ { 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' },
262
+ { 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' },
263
+ { 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' },
264
+ { 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
265
  // ═════════════════════════════════════════════════════════════════════════
188
266
  // PRE-STRUCTURAL (T-A, T-B, T-C)
189
267
  // ═════════════════════════════════════════════════════════════════════════
@@ -239,6 +317,22 @@ export const DISPOSITION_FIXTURE_VECTORS = [
239
317
  zeroSideEffects: true,
240
318
  description: '[beta.8 H7 raw token] negative SessionBinding grantRevision is rejected at canonicality before correlation',
241
319
  },
320
+ {
321
+ id: 'T-C-3',
322
+ rawFrame: messagingRequestFrame('read-fractional', 'messaging.read', {
323
+ subscriptionId: 'subscription-1',
324
+ limit: 1.5,
325
+ }),
326
+ rawFrameEncoding: 'utf8',
327
+ preState: { inFlightRequests: [] },
328
+ expectedClass: 'T-C',
329
+ expectedOutcome: 'close',
330
+ expectedErrorArm: null,
331
+ expectedErrorCode: null,
332
+ expectedResponseFrame: null,
333
+ zeroSideEffects: true,
334
+ description: '[beta.11 messaging] fractional read limit is rejected at canonicality before method validation',
335
+ },
242
336
  // ═════════════════════════════════════════════════════════════════════════
243
337
  // T-D: canonical idless NON-response-candidate, NOT a valid Request
244
338
  // object (missing/non-string jsonrpc/method)
@@ -336,7 +430,7 @@ export const DISPOSITION_FIXTURE_VECTORS = [
336
430
  expectedErrorArm: 'MethodNotFoundEnvelope',
337
431
  expectedErrorCode: -32601,
338
432
  expectedResponseFrame: JSON.stringify(RESPONSE_METHOD_NOT_FOUND_A),
339
- description: 'envelope violation: unknown method not in 12-row registry',
433
+ description: 'envelope violation: unknown method not in 13-row registry',
340
434
  },
341
435
  {
342
436
  id: 'T-F-3',
@@ -375,6 +469,7 @@ export const DISPOSITION_FIXTURE_VECTORS = [
375
469
  expectedErrorArm: 'InvalidParamsEnvelope',
376
470
  expectedErrorCode: -32602,
377
471
  expectedResponseFrame: JSON.stringify(RESPONSE_INVALID_PARAMS_A),
472
+ zeroSideEffects: true,
378
473
  description: 'value violation: nonce empty string violates minLength 1',
379
474
  },
380
475
  // ═════════════════════════════════════════════════════════════════════════
@@ -403,30 +498,6 @@ export const DISPOSITION_FIXTURE_VECTORS = [
403
498
  // T-K-6 (NT-4), T-K-5 (NT-5), T-K-7 (NT-6), T-D-1 (NT-7).
404
499
  // Additional: T-J-2, T-K-2.
405
500
  // ═════════════════════════════════════════════════════════════════════════
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
501
  {
431
502
  id: 'T-K-1',
432
503
  rawFrame: '{"jsonrpc":"2.0","method":"host.lifecycle.ping","params":{"meta":{"deadlineUnixMs":1},"input":{"nonce":"x"}}}',
@@ -437,6 +508,7 @@ export const DISPOSITION_FIXTURE_VECTORS = [
437
508
  expectedErrorArm: null,
438
509
  expectedErrorCode: null,
439
510
  expectedResponseFrame: null,
511
+ zeroSideEffects: true,
440
512
  description: '[NT-2] request-only method (ping, row 11) as notification → v0 violation',
441
513
  },
442
514
  {
@@ -463,54 +535,6 @@ export const DISPOSITION_FIXTURE_VECTORS = [
463
535
  expectedResponseFrame: null,
464
536
  description: '[NT-3] unknown method as notification → v0 violation',
465
537
  },
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
538
  // ═════════════════════════════════════════════════════════════════════════
515
539
  // RESPONSE-CANDIDATE PARTITION — frozen 9 cases + additional coverage
516
540
  //
@@ -546,6 +570,7 @@ export const DISPOSITION_FIXTURE_VECTORS = [
546
570
  expectedErrorArm: null,
547
571
  expectedErrorCode: null,
548
572
  expectedResponseFrame: null,
573
+ zeroSideEffects: true,
549
574
  description: 'response-candidate: both result AND error present (additional coverage)',
550
575
  },
551
576
  // ── MUTUAL-EXCLUSIVITY PROOF PAIR ─────────────────────────────────────
@@ -562,6 +587,7 @@ export const DISPOSITION_FIXTURE_VECTORS = [
562
587
  expectedErrorArm: null,
563
588
  expectedErrorCode: null,
564
589
  expectedResponseFrame: null,
590
+ zeroSideEffects: true,
565
591
  description: 'proof pair: "corr-test" NOT in-flight → T-H (see T-L-2)',
566
592
  },
567
593
  {
@@ -586,6 +612,7 @@ export const DISPOSITION_FIXTURE_VECTORS = [
586
612
  expectedErrorArm: null,
587
613
  expectedErrorCode: null,
588
614
  expectedResponseFrame: null,
615
+ zeroSideEffects: true,
589
616
  description: 'response-candidate: error body is string not object (additional coverage)',
590
617
  },
591
618
  {
@@ -634,6 +661,7 @@ export const DISPOSITION_FIXTURE_VECTORS = [
634
661
  expectedErrorArm: null,
635
662
  expectedErrorCode: null,
636
663
  expectedResponseFrame: null,
664
+ zeroSideEffects: true,
637
665
  description: '[RC-5] row-9 ack with wrong deliveryId: byte-equality fails → T-H, never T-L',
638
666
  },
639
667
  // ── T-L: valid correlated response (settlement) ──────────────────────
@@ -1057,6 +1085,550 @@ export const DISPOSITION_FIXTURE_VECTORS = [
1057
1085
  zeroSideEffects: true,
1058
1086
  description: '[beta.8 error] closed HANDSHAKE_REJECTED error settles the correlated hello',
1059
1087
  },
1088
+ {
1089
+ id: 'T-K-11',
1090
+ rawFrame: grantsChangedNotificationFrame(ALL_CAPABILITY_VALUES),
1091
+ rawFrameEncoding: 'utf8',
1092
+ preState: { inFlightRequests: [] },
1093
+ expectedClass: 'T-K',
1094
+ expectedOutcome: 'close',
1095
+ expectedErrorArm: null,
1096
+ expectedErrorCode: null,
1097
+ expectedResponseFrame: null,
1098
+ zeroSideEffects: true,
1099
+ description: 'removed grant callback closes without dispatch',
1100
+ },
1101
+ {
1102
+ id: 'T-K-8',
1103
+ rawFrame: grantsChangedNotificationFrame([
1104
+ ...ALL_CAPABILITY_VALUES,
1105
+ ALL_CAPABILITY_VALUES[0],
1106
+ ]),
1107
+ rawFrameEncoding: 'utf8',
1108
+ preState: { inFlightRequests: [] },
1109
+ expectedClass: 'T-K',
1110
+ expectedOutcome: 'close',
1111
+ expectedErrorArm: null,
1112
+ expectedErrorCode: null,
1113
+ expectedResponseFrame: null,
1114
+ zeroSideEffects: true,
1115
+ description: '[beta.10 lifecycle] N+1 grant snapshot notification closes before dispatch',
1116
+ },
1117
+ {
1118
+ id: 'T-K-9',
1119
+ rawFrame: grantsChangedNotificationFrame([
1120
+ ALL_CAPABILITY_VALUES[0],
1121
+ ALL_CAPABILITY_VALUES[0],
1122
+ ]),
1123
+ rawFrameEncoding: 'utf8',
1124
+ preState: { inFlightRequests: [] },
1125
+ expectedClass: 'T-K',
1126
+ expectedOutcome: 'close',
1127
+ expectedErrorArm: null,
1128
+ expectedErrorCode: null,
1129
+ expectedResponseFrame: null,
1130
+ zeroSideEffects: true,
1131
+ description: '[beta.10 lifecycle] duplicate grants within the cardinality bound close before dispatch',
1132
+ },
1133
+ {
1134
+ id: 'T-K-10',
1135
+ rawFrame: grantsChangedNotificationFrame(['unknown.capability']),
1136
+ rawFrameEncoding: 'utf8',
1137
+ preState: { inFlightRequests: [] },
1138
+ expectedClass: 'T-K',
1139
+ expectedOutcome: 'close',
1140
+ expectedErrorArm: null,
1141
+ expectedErrorCode: null,
1142
+ expectedResponseFrame: null,
1143
+ zeroSideEffects: true,
1144
+ description: '[beta.10 lifecycle] unknown grant closes before dispatch',
1145
+ },
1146
+ {
1147
+ id: 'T-M-10',
1148
+ rawFrame: lifecycleRequestFrame('a', 'host.lifecycle.ping', {
1149
+ nonce: RAW_UTF8_BOUNDARY_CODE_POINTS.ascii.repeat(PING_NONCE_MAX_LENGTH),
1150
+ }),
1151
+ rawFrameEncoding: 'utf8',
1152
+ preState: { inFlightRequests: [] },
1153
+ expectedClass: 'T-M',
1154
+ expectedOutcome: 'accept',
1155
+ expectedErrorArm: null,
1156
+ expectedErrorCode: null,
1157
+ expectedResponseFrame: null,
1158
+ description: '[beta.10 lifecycle] maximum ASCII ping nonce reaches dispatch',
1159
+ },
1160
+ {
1161
+ id: 'T-G-16',
1162
+ rawFrame: lifecycleRequestFrame('a', 'host.lifecycle.ping', {
1163
+ nonce: RAW_UTF8_BOUNDARY_CODE_POINTS.ascii.repeat(PING_NONCE_MAX_LENGTH + 1),
1164
+ }),
1165
+ rawFrameEncoding: 'utf8',
1166
+ preState: { inFlightRequests: [] },
1167
+ expectedClass: 'T-G',
1168
+ expectedOutcome: 'respond',
1169
+ expectedErrorArm: 'InvalidParamsEnvelope',
1170
+ expectedErrorCode: INVALID_PARAMS_CODE,
1171
+ expectedResponseFrame: JSON.stringify(RESPONSE_INVALID_PARAMS_A),
1172
+ zeroSideEffects: true,
1173
+ description: '[beta.10 lifecycle] ASCII ping nonce N+1 rejects before dispatch',
1174
+ },
1175
+ {
1176
+ id: 'T-M-11',
1177
+ rawFrame: lifecycleRequestFrame('a', 'host.lifecycle.ping', {
1178
+ nonce: RAW_UTF8_BOUNDARY_CODE_POINTS.multibyte.repeat(PING_NONCE_MAX_LENGTH),
1179
+ }),
1180
+ rawFrameEncoding: 'utf8',
1181
+ preState: { inFlightRequests: [] },
1182
+ expectedClass: 'T-M',
1183
+ expectedOutcome: 'accept',
1184
+ expectedErrorArm: null,
1185
+ expectedErrorCode: null,
1186
+ expectedResponseFrame: null,
1187
+ description: '[beta.10 lifecycle] maximum multibyte ping nonce reaches dispatch',
1188
+ },
1189
+ {
1190
+ id: 'T-G-17',
1191
+ rawFrame: lifecycleRequestFrame('a', 'host.lifecycle.ping', {
1192
+ nonce: RAW_UTF8_BOUNDARY_CODE_POINTS.multibyte.repeat(PING_NONCE_MAX_LENGTH + 1),
1193
+ }),
1194
+ rawFrameEncoding: 'utf8',
1195
+ preState: { inFlightRequests: [] },
1196
+ expectedClass: 'T-G',
1197
+ expectedOutcome: 'respond',
1198
+ expectedErrorArm: 'InvalidParamsEnvelope',
1199
+ expectedErrorCode: INVALID_PARAMS_CODE,
1200
+ expectedResponseFrame: JSON.stringify(RESPONSE_INVALID_PARAMS_A),
1201
+ zeroSideEffects: true,
1202
+ description: '[beta.10 lifecycle] multibyte ping nonce N+1 rejects before dispatch',
1203
+ },
1204
+ {
1205
+ id: 'T-M-12',
1206
+ rawFrame: lifecycleRequestFrame('a', 'host.lifecycle.ping', {
1207
+ nonce: RAW_UTF8_BOUNDARY_CODE_POINTS.escaping.repeat(PING_NONCE_MAX_LENGTH),
1208
+ }),
1209
+ rawFrameEncoding: 'utf8',
1210
+ preState: { inFlightRequests: [] },
1211
+ expectedClass: 'T-M',
1212
+ expectedOutcome: 'accept',
1213
+ expectedErrorArm: null,
1214
+ expectedErrorCode: null,
1215
+ expectedResponseFrame: null,
1216
+ description: '[beta.10 lifecycle] maximum JSON-escaping ping nonce reaches dispatch',
1217
+ },
1218
+ {
1219
+ id: 'T-G-18',
1220
+ rawFrame: lifecycleRequestFrame('a', 'host.lifecycle.ping', {
1221
+ nonce: RAW_UTF8_BOUNDARY_CODE_POINTS.escaping.repeat(PING_NONCE_MAX_LENGTH + 1),
1222
+ }),
1223
+ rawFrameEncoding: 'utf8',
1224
+ preState: { inFlightRequests: [] },
1225
+ expectedClass: 'T-G',
1226
+ expectedOutcome: 'respond',
1227
+ expectedErrorArm: 'InvalidParamsEnvelope',
1228
+ expectedErrorCode: INVALID_PARAMS_CODE,
1229
+ expectedResponseFrame: JSON.stringify(RESPONSE_INVALID_PARAMS_A),
1230
+ zeroSideEffects: true,
1231
+ description: '[beta.10 lifecycle] JSON-escaping ping nonce N+1 rejects before dispatch',
1232
+ },
1233
+ {
1234
+ id: 'T-L-8',
1235
+ rawFrame: JSON.stringify({
1236
+ jsonrpc: '2.0',
1237
+ id: 'ping-max',
1238
+ result: { nonce: RAW_UTF8_BOUNDARY_CODE_POINTS.multibyte.repeat(PING_NONCE_MAX_LENGTH) },
1239
+ }),
1240
+ rawFrameEncoding: 'utf8',
1241
+ preState: {
1242
+ inFlightRequests: [{
1243
+ id: 'ping-max',
1244
+ method: 'host.lifecycle.ping',
1245
+ requestSnapshot: {
1246
+ nonce: RAW_UTF8_BOUNDARY_CODE_POINTS.multibyte.repeat(PING_NONCE_MAX_LENGTH),
1247
+ },
1248
+ }],
1249
+ },
1250
+ expectedClass: 'T-L',
1251
+ expectedOutcome: 'accept',
1252
+ expectedErrorArm: null,
1253
+ expectedErrorCode: null,
1254
+ expectedResponseFrame: null,
1255
+ description: '[beta.10 lifecycle] maximum ping nonce settles only when echoed byte-equal',
1256
+ },
1257
+ {
1258
+ id: 'T-H-13',
1259
+ rawFrame: JSON.stringify({
1260
+ jsonrpc: '2.0',
1261
+ id: 'ping-mismatch',
1262
+ result: { nonce: 'different' },
1263
+ }),
1264
+ rawFrameEncoding: 'utf8',
1265
+ preState: {
1266
+ inFlightRequests: [{
1267
+ id: 'ping-mismatch',
1268
+ method: 'host.lifecycle.ping',
1269
+ requestSnapshot: { nonce: 'expected' },
1270
+ }],
1271
+ },
1272
+ expectedClass: 'T-H',
1273
+ expectedOutcome: 'close',
1274
+ expectedErrorArm: null,
1275
+ expectedErrorCode: null,
1276
+ expectedResponseFrame: null,
1277
+ zeroSideEffects: true,
1278
+ description: '[beta.10 lifecycle] ping result with a non-equal nonce closes without settlement',
1279
+ },
1280
+ {
1281
+ id: 'T-M-14',
1282
+ rawFrame: messagingRequestFrame('send-1', 'messaging.send', M0C_DRAFT),
1283
+ rawFrameEncoding: 'utf8',
1284
+ preState: { inFlightRequests: [] },
1285
+ expectedClass: 'T-M', expectedOutcome: 'accept', expectedErrorArm: null,
1286
+ expectedErrorCode: null, expectedResponseFrame: null,
1287
+ description: '[beta.11 messaging] legal send reaches Host dispatch',
1288
+ },
1289
+ {
1290
+ id: 'T-G-21',
1291
+ rawFrame: messagingRequestFrame('a', 'messaging.send', { ...M0C_DRAFT, authority: 'host' }),
1292
+ rawFrameEncoding: 'utf8',
1293
+ preState: { inFlightRequests: [] },
1294
+ expectedClass: 'T-G', expectedOutcome: 'respond', expectedErrorArm: 'InvalidParamsEnvelope',
1295
+ expectedErrorCode: INVALID_PARAMS_CODE, expectedResponseFrame: JSON.stringify(RESPONSE_INVALID_PARAMS_A),
1296
+ zeroSideEffects: true,
1297
+ description: '[beta.11 messaging] authority-bearing send rejects before dispatch',
1298
+ },
1299
+ {
1300
+ id: 'T-M-15',
1301
+ rawFrame: messagingRequestFrame('append-1', 'messaging.appendElements', {
1302
+ handle: { kind: 'message', token: 'message-handle-1' },
1303
+ operationId: 'append-1',
1304
+ baseRevision: 1,
1305
+ elements: [{ elementId: 'element-2', kind: 'text', payload: { text: 'more' } }],
1306
+ }),
1307
+ rawFrameEncoding: 'utf8', preState: { inFlightRequests: [] },
1308
+ expectedClass: 'T-M', expectedOutcome: 'accept', expectedErrorArm: null,
1309
+ expectedErrorCode: null, expectedResponseFrame: null,
1310
+ description: '[beta.11 messaging] legal append reaches Host dispatch',
1311
+ },
1312
+ {
1313
+ id: 'T-G-22',
1314
+ rawFrame: messagingRequestFrame('a', 'messaging.appendElements', {
1315
+ handle: 'raw-handle', operationId: 'append-1', elements: [],
1316
+ }),
1317
+ rawFrameEncoding: 'utf8', preState: { inFlightRequests: [] },
1318
+ expectedClass: 'T-G', expectedOutcome: 'respond', expectedErrorArm: 'InvalidParamsEnvelope',
1319
+ expectedErrorCode: INVALID_PARAMS_CODE, expectedResponseFrame: JSON.stringify(RESPONSE_INVALID_PARAMS_A),
1320
+ zeroSideEffects: true,
1321
+ description: '[beta.11 messaging] malformed append rejects before dispatch',
1322
+ },
1323
+ {
1324
+ id: 'T-M-16',
1325
+ rawFrame: messagingRequestFrame('subscribe-1', 'messaging.subscribe', { handle: 'thread-handle-1' }),
1326
+ rawFrameEncoding: 'utf8', preState: { inFlightRequests: [] },
1327
+ expectedClass: 'T-M', expectedOutcome: 'accept', expectedErrorArm: null,
1328
+ expectedErrorCode: null, expectedResponseFrame: null,
1329
+ description: '[beta.11 messaging] legal subscribe reaches Host dispatch',
1330
+ },
1331
+ {
1332
+ id: 'T-G-23',
1333
+ rawFrame: messagingRequestFrame('a', 'messaging.subscribe', { handle: '' }),
1334
+ rawFrameEncoding: 'utf8', preState: { inFlightRequests: [] },
1335
+ expectedClass: 'T-G', expectedOutcome: 'respond', expectedErrorArm: 'InvalidParamsEnvelope',
1336
+ expectedErrorCode: INVALID_PARAMS_CODE, expectedResponseFrame: JSON.stringify(RESPONSE_INVALID_PARAMS_A),
1337
+ zeroSideEffects: true,
1338
+ description: '[beta.11 messaging] empty subscribe handle rejects before dispatch',
1339
+ },
1340
+ {
1341
+ id: 'T-M-17',
1342
+ rawFrame: messagingRequestFrame('read-1', 'messaging.read', { subscriptionId: 'subscription-1', limit: 2 }),
1343
+ rawFrameEncoding: 'utf8', preState: { inFlightRequests: [] },
1344
+ expectedClass: 'T-M', expectedOutcome: 'accept', expectedErrorArm: null,
1345
+ expectedErrorCode: null, expectedResponseFrame: null,
1346
+ description: '[beta.11 messaging] legal read reaches Host dispatch',
1347
+ },
1348
+ {
1349
+ id: 'T-G-24',
1350
+ rawFrame: messagingRequestFrame('a', 'messaging.read', { subscriptionId: 'subscription-1', limit: 33 }),
1351
+ rawFrameEncoding: 'utf8', preState: { inFlightRequests: [] },
1352
+ expectedClass: 'T-G', expectedOutcome: 'respond', expectedErrorArm: 'InvalidParamsEnvelope',
1353
+ expectedErrorCode: INVALID_PARAMS_CODE, expectedResponseFrame: JSON.stringify(RESPONSE_INVALID_PARAMS_A),
1354
+ zeroSideEffects: true,
1355
+ description: '[beta.11 messaging] read limit N+1 rejects before dispatch',
1356
+ },
1357
+ {
1358
+ id: 'T-M-18',
1359
+ rawFrame: messagingRequestFrame('ack-1', 'messaging.ack', { subscriptionId: 'subscription-1', ackToken: 'ack-1' }),
1360
+ rawFrameEncoding: 'utf8', preState: { inFlightRequests: [] },
1361
+ expectedClass: 'T-M', expectedOutcome: 'accept', expectedErrorArm: null,
1362
+ expectedErrorCode: null, expectedResponseFrame: null,
1363
+ description: '[beta.11 messaging] legal acknowledgement reaches Host dispatch',
1364
+ },
1365
+ {
1366
+ id: 'T-G-25',
1367
+ rawFrame: messagingRequestFrame('a', 'messaging.ack', { subscriptionId: 'subscription-1', ackToken: '' }),
1368
+ rawFrameEncoding: 'utf8', preState: { inFlightRequests: [] },
1369
+ expectedClass: 'T-G', expectedOutcome: 'respond', expectedErrorArm: 'InvalidParamsEnvelope',
1370
+ expectedErrorCode: INVALID_PARAMS_CODE, expectedResponseFrame: JSON.stringify(RESPONSE_INVALID_PARAMS_A),
1371
+ zeroSideEffects: true,
1372
+ description: '[beta.11 messaging] empty acknowledgement token rejects before dispatch',
1373
+ },
1374
+ {
1375
+ id: 'T-M-19',
1376
+ rawFrame: messagingRequestFrame('snapshot-1', 'messaging.snapshot', { subscriptionId: 'subscription-1', maxItems: 2 }),
1377
+ rawFrameEncoding: 'utf8', preState: { inFlightRequests: [] },
1378
+ expectedClass: 'T-M', expectedOutcome: 'accept', expectedErrorArm: null,
1379
+ expectedErrorCode: null, expectedResponseFrame: null,
1380
+ description: '[beta.11 messaging] legal snapshot page reaches Host dispatch',
1381
+ },
1382
+ {
1383
+ id: 'T-G-26',
1384
+ rawFrame: messagingRequestFrame('a', 'messaging.snapshot', { subscriptionId: 'subscription-1', maxItems: 0 }),
1385
+ rawFrameEncoding: 'utf8', preState: { inFlightRequests: [] },
1386
+ expectedClass: 'T-G', expectedOutcome: 'respond', expectedErrorArm: 'InvalidParamsEnvelope',
1387
+ expectedErrorCode: INVALID_PARAMS_CODE, expectedResponseFrame: JSON.stringify(RESPONSE_INVALID_PARAMS_A),
1388
+ zeroSideEffects: true,
1389
+ description: '[beta.11 messaging] zero snapshot maxItems rejects before dispatch',
1390
+ },
1391
+ {
1392
+ id: 'T-M-20',
1393
+ rawFrame: messagingRequestFrame('deliver-1', 'host.messaging.deliver', {
1394
+ deliveryId: 'delivery-1',
1395
+ kind: 'message', executionId: 'execution-1',
1396
+ threadId: M0C_ENVELOPE.threadId,
1397
+ envelope: M0C_ENVELOPE,
1398
+ }),
1399
+ rawFrameEncoding: 'utf8', preState: { inFlightRequests: [] },
1400
+ expectedClass: 'T-M', expectedOutcome: 'accept', expectedErrorArm: null,
1401
+ expectedErrorCode: null, expectedResponseFrame: null,
1402
+ description: '[beta.11 messaging] legal Host delivery reaches plugin dispatch',
1403
+ },
1404
+ {
1405
+ id: 'T-M-21',
1406
+ rawFrame: messagingRequestFrame('send-exponent', 'messaging.send', {
1407
+ address: { kind: 'thread_handle', handle: 'thread-handle-1' },
1408
+ idempotencyKey: 'send-exp',
1409
+ payload: {
1410
+ provenance: { epistemicStatus: 'inference' },
1411
+ elements: [
1412
+ {
1413
+ elementId: 'element-1',
1414
+ kind: 'rich_block',
1415
+ payload: { id: 'proof-1', kind: 'proof', v: 1, data: 1e+21 },
1416
+ },
1417
+ ],
1418
+ },
1419
+ }),
1420
+ rawFrameEncoding: 'utf8', preState: { inFlightRequests: [] },
1421
+ expectedClass: 'T-M', expectedOutcome: 'accept', expectedErrorArm: null,
1422
+ expectedErrorCode: null, expectedResponseFrame: null,
1423
+ description: '[beta.11 messaging] V8-canonical exponent in open payload is legal at T-C',
1424
+ },
1425
+ {
1426
+ id: 'T-G-27',
1427
+ rawFrame: messagingRequestFrame('a', 'host.messaging.deliver', {
1428
+ deliveryId: 'delivery-1',
1429
+ threadHandle: { kind: 'thread_handle', handle: 'thread-handle-1' },
1430
+ envelope: { ...M0C_ENVELOPE, occurredAt: '2026-08-18T03:00:00Z' },
1431
+ }),
1432
+ rawFrameEncoding: 'utf8', preState: { inFlightRequests: [] },
1433
+ expectedClass: 'T-G', expectedOutcome: 'respond', expectedErrorArm: 'InvalidParamsEnvelope',
1434
+ expectedErrorCode: INVALID_PARAMS_CODE, expectedResponseFrame: JSON.stringify(RESPONSE_INVALID_PARAMS_A),
1435
+ zeroSideEffects: true,
1436
+ description: '[beta.11 messaging] non-canonical stored timestamp rejects before callback dispatch',
1437
+ },
1438
+ {
1439
+ id: 'T-C-4',
1440
+ rawFrame: JSON.stringify({ jsonrpc: '2.0', id: 'read-publish-rev', result: {
1441
+ events: [{ ...M0C_PUBLISH_EVENT, envelope: { ...M0C_ENVELOPE, revision: 1.5 } }],
1442
+ ackToken: 'ack-1', stale: false,
1443
+ } }),
1444
+ rawFrameEncoding: 'utf8',
1445
+ preState: { inFlightRequests: [{ id: 'read-publish-rev', method: 'messaging.read', requestSnapshot: { readLimit: 2 } }] },
1446
+ expectedClass: 'T-C', expectedOutcome: 'close', expectedErrorArm: null,
1447
+ expectedErrorCode: null, expectedResponseFrame: null, zeroSideEffects: true,
1448
+ description: '[beta.11 messaging] fractional publish envelope revision in read response is rejected at canonicality',
1449
+ },
1450
+ {
1451
+ id: 'T-C-5',
1452
+ rawFrame: JSON.stringify({ jsonrpc: '2.0', id: 'read-append-rev', result: {
1453
+ events: [{
1454
+ eventId: 'event-append-1', sequence: 1, type: 'message.elements.append',
1455
+ messageId: 'message-1', threadId: 'thread-1', operationId: 'op-1',
1456
+ revision: 1.5, elements: [],
1457
+ }],
1458
+ ackToken: 'ack-1', stale: false,
1459
+ } }),
1460
+ rawFrameEncoding: 'utf8',
1461
+ preState: { inFlightRequests: [{ id: 'read-append-rev', method: 'messaging.read', requestSnapshot: { readLimit: 2 } }] },
1462
+ expectedClass: 'T-C', expectedOutcome: 'close', expectedErrorArm: null,
1463
+ expectedErrorCode: null, expectedResponseFrame: null, zeroSideEffects: true,
1464
+ description: '[beta.11 messaging] fractional append event revision in read response is rejected at canonicality',
1465
+ },
1466
+ {
1467
+ id: 'T-C-6',
1468
+ rawFrame: JSON.stringify({ jsonrpc: '2.0', id: 'read-append-baserev', result: {
1469
+ events: [{
1470
+ eventId: 'event-append-2', sequence: 1, type: 'message.elements.append',
1471
+ messageId: 'message-1', threadId: 'thread-1', operationId: 'op-1',
1472
+ baseRevision: 1.5, revision: 2, elements: [],
1473
+ }],
1474
+ ackToken: 'ack-1', stale: false,
1475
+ } }),
1476
+ rawFrameEncoding: 'utf8',
1477
+ preState: { inFlightRequests: [{ id: 'read-append-baserev', method: 'messaging.read', requestSnapshot: { readLimit: 2 } }] },
1478
+ expectedClass: 'T-C', expectedOutcome: 'close', expectedErrorArm: null,
1479
+ expectedErrorCode: null, expectedResponseFrame: null, zeroSideEffects: true,
1480
+ description: '[beta.11 messaging] fractional append event baseRevision in read response is rejected at canonicality',
1481
+ },
1482
+ {
1483
+ id: 'T-L-11',
1484
+ rawFrame: JSON.stringify({ jsonrpc: '2.0', id: 'send-result', result: {
1485
+ messageId: 'message-1', threadId: 'thread-1', revision: 1,
1486
+ messageHandle: { kind: 'message', token: 'message-handle-1' },
1487
+ } }),
1488
+ rawFrameEncoding: 'utf8', preState: { inFlightRequests: [{ id: 'send-result', method: 'messaging.send' }] },
1489
+ expectedClass: 'T-L', expectedOutcome: 'accept', expectedErrorArm: null,
1490
+ expectedErrorCode: null, expectedResponseFrame: null,
1491
+ description: '[beta.11 messaging] closed send receipt settles the request',
1492
+ },
1493
+ {
1494
+ id: 'T-H-14',
1495
+ rawFrame: JSON.stringify({ jsonrpc: '2.0', id: 'send-legacy', result: {
1496
+ messageId: 'message-1', threadId: 'thread-1', revision: 1,
1497
+ handle: { kind: 'message', token: 'message-handle-1' },
1498
+ } }),
1499
+ rawFrameEncoding: 'utf8', preState: { inFlightRequests: [{ id: 'send-legacy', method: 'messaging.send' }] },
1500
+ expectedClass: 'T-H', expectedOutcome: 'close', expectedErrorArm: null,
1501
+ expectedErrorCode: null, expectedResponseFrame: null, zeroSideEffects: true,
1502
+ description: '[beta.11 messaging] legacy send receipt closes without settlement',
1503
+ },
1504
+ {
1505
+ id: 'T-L-12',
1506
+ rawFrame: JSON.stringify({ jsonrpc: '2.0', id: 'append-result', result: {
1507
+ messageId: 'message-1', revision: 2, appliedElementIds: ['element-2'],
1508
+ } }),
1509
+ rawFrameEncoding: 'utf8', preState: { inFlightRequests: [{ id: 'append-result', method: 'messaging.appendElements', requestSnapshot: { appendElementIds: ['element-2'] } }] },
1510
+ expectedClass: 'T-L', expectedOutcome: 'accept', expectedErrorArm: null,
1511
+ expectedErrorCode: null, expectedResponseFrame: null,
1512
+ description: '[beta.11 messaging] closed append receipt settles the request',
1513
+ },
1514
+ {
1515
+ id: 'T-H-15',
1516
+ rawFrame: JSON.stringify({ jsonrpc: '2.0', id: 'append-empty', result: {
1517
+ messageId: 'message-1', revision: 2, appliedElementIds: [],
1518
+ } }),
1519
+ rawFrameEncoding: 'utf8', preState: { inFlightRequests: [{ id: 'append-empty', method: 'messaging.appendElements', requestSnapshot: { appendElementIds: ['element-2'] } }] },
1520
+ expectedClass: 'T-H', expectedOutcome: 'close', expectedErrorArm: null,
1521
+ expectedErrorCode: null, expectedResponseFrame: null, zeroSideEffects: true,
1522
+ description: '[beta.11 messaging] empty append receipt closes without settlement',
1523
+ },
1524
+ {
1525
+ id: 'T-L-13',
1526
+ rawFrame: '{"jsonrpc":"2.0","id":"subscribe-result","result":{"subscriptionId":"subscription-1"}}',
1527
+ rawFrameEncoding: 'utf8', preState: { inFlightRequests: [{ id: 'subscribe-result', method: 'messaging.subscribe' }] },
1528
+ expectedClass: 'T-L', expectedOutcome: 'accept', expectedErrorArm: null,
1529
+ expectedErrorCode: null, expectedResponseFrame: null,
1530
+ description: '[beta.11 messaging] closed subscription receipt settles the request',
1531
+ },
1532
+ {
1533
+ id: 'T-H-16',
1534
+ rawFrame: '{"jsonrpc":"2.0","id":"subscribe-open","result":{"subscriptionId":"subscription-1","extra":true}}',
1535
+ rawFrameEncoding: 'utf8', preState: { inFlightRequests: [{ id: 'subscribe-open', method: 'messaging.subscribe' }] },
1536
+ expectedClass: 'T-H', expectedOutcome: 'close', expectedErrorArm: null,
1537
+ expectedErrorCode: null, expectedResponseFrame: null, zeroSideEffects: true,
1538
+ description: '[beta.11 messaging] open subscription receipt closes without settlement',
1539
+ },
1540
+ {
1541
+ id: 'T-L-14',
1542
+ rawFrame: '{"jsonrpc":"2.0","id":"read-result","result":{"events":[],"ackToken":null,"stale":false}}',
1543
+ rawFrameEncoding: 'utf8', preState: { inFlightRequests: [{ id: 'read-result', method: 'messaging.read', requestSnapshot: { readLimit: 2 } }] },
1544
+ expectedClass: 'T-L', expectedOutcome: 'accept', expectedErrorArm: null,
1545
+ expectedErrorCode: null, expectedResponseFrame: null,
1546
+ description: '[beta.11 messaging] empty read page settles the request',
1547
+ },
1548
+ {
1549
+ id: 'T-H-17',
1550
+ rawFrame: JSON.stringify({ jsonrpc: '2.0', id: 'read-over-limit', result: {
1551
+ events: [M0C_PUBLISH_EVENT, { ...M0C_PUBLISH_EVENT, eventId: 'event-2', sequence: 2 }],
1552
+ ackToken: 'ack-2', stale: false,
1553
+ } }),
1554
+ rawFrameEncoding: 'utf8', preState: { inFlightRequests: [{ id: 'read-over-limit', method: 'messaging.read', requestSnapshot: { readLimit: 1 } }] },
1555
+ expectedClass: 'T-H', expectedOutcome: 'close', expectedErrorArm: null,
1556
+ expectedErrorCode: null, expectedResponseFrame: null, zeroSideEffects: true,
1557
+ description: '[beta.11 messaging] read page beyond the request limit closes without cursor progress',
1558
+ },
1559
+ {
1560
+ id: 'T-L-15', rawFrame: '{"jsonrpc":"2.0","id":"ack-result","result":null}',
1561
+ rawFrameEncoding: 'utf8', preState: { inFlightRequests: [{ id: 'ack-result', method: 'messaging.ack' }] },
1562
+ expectedClass: 'T-L', expectedOutcome: 'accept', expectedErrorArm: null,
1563
+ expectedErrorCode: null, expectedResponseFrame: null,
1564
+ description: '[beta.11 messaging] null acknowledgement settles the request',
1565
+ },
1566
+ {
1567
+ id: 'T-H-18', rawFrame: '{"jsonrpc":"2.0","id":"ack-open","result":{}}',
1568
+ rawFrameEncoding: 'utf8', preState: { inFlightRequests: [{ id: 'ack-open', method: 'messaging.ack' }] },
1569
+ expectedClass: 'T-H', expectedOutcome: 'close', expectedErrorArm: null,
1570
+ expectedErrorCode: null, expectedResponseFrame: null, zeroSideEffects: true,
1571
+ description: '[beta.11 messaging] non-null acknowledgement closes without cursor progress',
1572
+ },
1573
+ {
1574
+ id: 'T-L-16',
1575
+ rawFrame: JSON.stringify({ jsonrpc: '2.0', id: 'snapshot-result', result: {
1576
+ items: [], nextPageToken: null, snapshotAckToken: 'snapshot-ack-1',
1577
+ } }),
1578
+ rawFrameEncoding: 'utf8', preState: { inFlightRequests: [{ id: 'snapshot-result', method: 'messaging.snapshot', requestSnapshot: { snapshotMaxItems: 2 } }] },
1579
+ expectedClass: 'T-L', expectedOutcome: 'accept', expectedErrorArm: null,
1580
+ expectedErrorCode: null, expectedResponseFrame: null,
1581
+ description: '[beta.11 messaging] final snapshot page settles the traversal request',
1582
+ },
1583
+ {
1584
+ id: 'T-H-19',
1585
+ rawFrame: JSON.stringify({ jsonrpc: '2.0', id: 'snapshot-over-limit', result: {
1586
+ items: [M0C_ENVELOPE, { ...M0C_ENVELOPE, messageId: 'message-2' }],
1587
+ nextPageToken: null, snapshotAckToken: 'snapshot-ack-2',
1588
+ } }),
1589
+ rawFrameEncoding: 'utf8', preState: { inFlightRequests: [{ id: 'snapshot-over-limit', method: 'messaging.snapshot', requestSnapshot: { snapshotMaxItems: 1 } }] },
1590
+ expectedClass: 'T-H', expectedOutcome: 'close', expectedErrorArm: null,
1591
+ expectedErrorCode: null, expectedResponseFrame: null, zeroSideEffects: true,
1592
+ description: '[beta.11 messaging] snapshot page beyond request maxItems closes without progress',
1593
+ },
1594
+ {
1595
+ id: 'T-L-17',
1596
+ rawFrame: '{"jsonrpc":"2.0","id":"deliver-result","result":{"deliveryId":"delivery-1"}}',
1597
+ rawFrameEncoding: 'utf8', preState: { inFlightRequests: [{ id: 'deliver-result', method: 'host.messaging.deliver', requestSnapshot: { deliveryId: 'delivery-1' } }] },
1598
+ expectedClass: 'T-L', expectedOutcome: 'accept', expectedErrorArm: null,
1599
+ expectedErrorCode: null, expectedResponseFrame: null,
1600
+ description: '[beta.11 messaging] byte-equal delivery acknowledgement settles the callback',
1601
+ },
1602
+ {
1603
+ id: 'T-H-20',
1604
+ rawFrame: '{"jsonrpc":"2.0","id":"deliver-mismatch","result":{"deliveryId":"wrong-delivery"}}',
1605
+ rawFrameEncoding: 'utf8', preState: { inFlightRequests: [{ id: 'deliver-mismatch', method: 'host.messaging.deliver', requestSnapshot: { deliveryId: 'delivery-1' } }] },
1606
+ expectedClass: 'T-H', expectedOutcome: 'close', expectedErrorArm: null,
1607
+ expectedErrorCode: null, expectedResponseFrame: null, zeroSideEffects: true,
1608
+ description: '[beta.11 messaging] mismatched delivery acknowledgement closes without settlement',
1609
+ },
1610
+ {
1611
+ id: 'T-H-21',
1612
+ rawFrame: JSON.stringify({ jsonrpc: '2.0', id: 'append-provenance', result: {
1613
+ messageId: 'message-1', revision: 2, appliedElementIds: ['wrong-element'],
1614
+ } }),
1615
+ rawFrameEncoding: 'utf8',
1616
+ preState: { inFlightRequests: [{ id: 'append-provenance', method: 'messaging.appendElements', requestSnapshot: { appendElementIds: ['element-2'] } }] },
1617
+ expectedClass: 'T-H', expectedOutcome: 'close', expectedErrorArm: null,
1618
+ expectedErrorCode: null, expectedResponseFrame: null, zeroSideEffects: true,
1619
+ description: '[beta.11 messaging] append receipt with foreign element IDs closes without settlement',
1620
+ },
1621
+ {
1622
+ id: 'T-H-22',
1623
+ rawFrame: JSON.stringify({ jsonrpc: '2.0', id: 'append-no-snapshot', result: {
1624
+ messageId: 'message-1', revision: 2, appliedElementIds: ['element-2'],
1625
+ } }),
1626
+ rawFrameEncoding: 'utf8',
1627
+ preState: { inFlightRequests: [{ id: 'append-no-snapshot', method: 'messaging.appendElements' }] },
1628
+ expectedClass: 'T-H', expectedOutcome: 'close', expectedErrorArm: null,
1629
+ expectedErrorCode: null, expectedResponseFrame: null, zeroSideEffects: true,
1630
+ description: '[beta.11 messaging] append receipt without provenance snapshot closes without settlement',
1631
+ },
1060
1632
  ];
1061
1633
  /** Complete beta.8 handshake safety surface exported for downstream runners. */
1062
1634
  export const BETA8_HANDSHAKE_VECTOR_IDS = [
@@ -1067,4 +1639,18 @@ export const BETA8_HANDSHAKE_VECTOR_IDS = [
1067
1639
  'T-H-10', 'T-H-11',
1068
1640
  'T-L-5', 'T-L-6',
1069
1641
  ];
1642
+ /** Complete beta.9 C-2 publish safety surface exported for downstream runners. */
1643
+ /** Complete beta.10 M0-B lifecycle safety surface for rows 10 through 12. */
1644
+ /** Complete beta.11 M0-C messaging safety surface for rows 3 through 9. */
1645
+ export const BETA11_MESSAGING_VECTOR_IDS = [
1646
+ 'T-C-3',
1647
+ 'T-H-2', 'T-H-5', 'T-H-9', 'T-L-4',
1648
+ 'T-M-14', 'T-G-21', 'T-M-15', 'T-G-22', 'T-M-16', 'T-G-23',
1649
+ 'T-M-17', 'T-G-24', 'T-M-18', 'T-G-25', 'T-M-19', 'T-G-26',
1650
+ 'T-M-20', 'T-M-21', 'T-G-27',
1651
+ 'T-C-4', 'T-C-5', 'T-C-6',
1652
+ 'T-L-11', 'T-H-14', 'T-L-12', 'T-H-15', 'T-L-13', 'T-H-16',
1653
+ 'T-L-14', 'T-H-17', 'T-L-15', 'T-H-18', 'T-L-16', 'T-H-19',
1654
+ 'T-L-17', 'T-H-20', 'T-H-21', 'T-H-22',
1655
+ ];
1070
1656
  //# sourceMappingURL=disposition-fixtures.js.map