deepdebug-local-agent 1.7.0 → 1.9.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 (71) hide show
  1. package/.claude/context.md +2 -1
  2. package/CLAUDE.md +1 -1
  3. package/docs/la-protocol-v2.md +27 -4
  4. package/env.example +12 -0
  5. package/package.json +1 -1
  6. package/scripts/incident-parity/Gen.java +256 -0
  7. package/scripts/incident-parity/LogEntry.java +17 -0
  8. package/scripts/incident-parity/extract.py +51 -0
  9. package/scripts/incident-parity/gen.sh +32 -0
  10. package/src/incident-detector/README.md +52 -0
  11. package/src/incident-detector/aggregator.js +78 -0
  12. package/src/incident-detector/categorize.js +48 -0
  13. package/src/incident-detector/config.js +95 -0
  14. package/src/incident-detector/detector.js +93 -0
  15. package/src/incident-detector/emitter.js +164 -0
  16. package/src/incident-detector/index.js +44 -0
  17. package/src/incident-detector/java-compat.js +66 -0
  18. package/src/incident-detector/normalize.js +209 -0
  19. package/src/incident-detector/parse.js +114 -0
  20. package/src/incident-detector/sources/file-source.js +113 -0
  21. package/src/incident-detector/sources/loki-source.js +101 -0
  22. package/src/incident-detector/sources/stream-source.js +39 -0
  23. package/src/incident-detector/sources/webhook-source.js +109 -0
  24. package/src/incident-detector/store.js +119 -0
  25. package/src/la-protocol-v2/contract/CONTRACT_SOURCE.json +24 -16
  26. package/src/la-protocol-v2/contract/README.md +103 -3
  27. package/src/la-protocol-v2/contract/config.update.schema.json +85 -1
  28. package/src/la-protocol-v2/contract/hello.schema.json +26 -1
  29. package/src/la-protocol-v2/contract/incident.candidate.schema.json +11 -0
  30. package/src/la-protocol-v2/contract/index.json +9 -2
  31. package/src/la-protocol-v2/contract/ready.schema.json +8 -0
  32. package/src/la-protocol-v2/contract/register.schema.json +26 -1
  33. package/src/la-protocol-v2/contract/webhook.forward.schema.json +72 -3
  34. package/src/la-protocol-v2/contract.js +45 -7
  35. package/src/la-protocol-v2/llm-key/config.js +29 -0
  36. package/src/la-protocol-v2/llm-key/handler.js +33 -0
  37. package/src/la-protocol-v2/llm-key/install.js +21 -0
  38. package/src/la-protocol-v2/llm-key/store.js +173 -0
  39. package/src/la-protocol-v2/runtime.js +44 -1
  40. package/src/la-protocol-v2/session.js +47 -13
  41. package/src/la-protocol-v2/webhooks/assembler.js +85 -0
  42. package/src/la-protocol-v2/webhooks/config.js +51 -0
  43. package/src/la-protocol-v2/webhooks/handler.js +125 -0
  44. package/src/la-protocol-v2/webhooks/install.js +22 -0
  45. package/test/contract/la-protocol-v2/vectors/ack.vectors.json +91 -0
  46. package/test/contract/la-protocol-v2/vectors/config.update.vectors.json +1339 -0
  47. package/test/contract/la-protocol-v2/vectors/hello.vectors.json +261 -0
  48. package/test/contract/la-protocol-v2/vectors/incident.candidate.vectors.json +623 -0
  49. package/test/contract/la-protocol-v2/vectors/ready.vectors.json +599 -0
  50. package/test/contract/la-protocol-v2/vectors/register.vectors.json +275 -0
  51. package/test/contract/la-protocol-v2/vectors/traces/invalid-webhook-chunk-after-last.json +186 -0
  52. package/test/contract/la-protocol-v2/vectors/traces/invalid-webhook-chunk-body-hash-changes.json +186 -0
  53. package/test/contract/la-protocol-v2/vectors/traces/invalid-webhook-chunk-last-flag-wrong.json +186 -0
  54. package/test/contract/la-protocol-v2/vectors/traces/invalid-webhook-chunk-non-last-too-short.json +152 -0
  55. package/test/contract/la-protocol-v2/vectors/traces/invalid-webhook-chunk-out-of-order.json +152 -0
  56. package/test/contract/la-protocol-v2/vectors/traces/invalid-webhook-chunk-sha-mismatch.json +186 -0
  57. package/test/contract/la-protocol-v2/vectors/traces/invalid-webhook-chunk-total-changes.json +186 -0
  58. package/test/contract/la-protocol-v2/vectors/traces/valid-webhook-chunks-in-order.json +218 -0
  59. package/test/contract/la-protocol-v2/vectors/webhook.forward.vectors.json +1263 -0
  60. package/test/incident-detector/parity.test.js +66 -0
  61. package/test/incident-detector/parity.vectors.json +2619 -0
  62. package/test/incident-detector/size-model.test.js +127 -0
  63. package/test/incident-detector/sources.test.js +179 -0
  64. package/test/incident-detector/units.test.js +430 -0
  65. package/test/incident-detector/wiring.test.js +165 -0
  66. package/test/la-protocol-v2/contract-v21.test.js +107 -0
  67. package/test/la-protocol-v2/contract.test.js +6 -4
  68. package/test/la-protocol-v2/helpers/reference-cp.js +8 -4
  69. package/test/la-protocol-v2/llm-key.test.js +509 -0
  70. package/test/la-protocol-v2/traces.test.js +3 -3
  71. package/test/la-protocol-v2/webhook-receiver.test.js +702 -0
@@ -172,6 +172,605 @@
172
172
  }
173
173
  }
174
174
  }
175
+ },
176
+ {
177
+ "name": "ready-caps-incident-candidate-size-model",
178
+ "why": "the CP says it accepts stackBytes and model in incident.candidate",
179
+ "expect": {
180
+ "valid": true
181
+ },
182
+ "message": {
183
+ "schemaVersion": 2,
184
+ "type": "ready",
185
+ "msgId": "00000000-0000-4000-8000-000000000001",
186
+ "seq": 0,
187
+ "tenantId": "3f2b8c1e-5a4d-4e7b-9c21-0a1b2c3d4e5f",
188
+ "workspaceId": "ws-1",
189
+ "ts": "2026-10-29T10:00:00Z",
190
+ "paramsRaw": "{\"protocol\":2,\"sessionId\":\"e5f6a7b8-c9d0-4e1f-8a2b-4c5d6e7f8091\",\"resumed\":false,\"peerLastSeq\":0,\"limits\":{\"maxFrameBytes\":49152,\"chunkRawBytes\":32768,\"maxChunks\":64,\"ackTimeoutMs\":5000,\"maxRetries\":3,\"heartbeatSeconds\":30,\"contentFirstByteMs\":10000,\"contentTotalMs\":30000},\"capabilities\":[\"incident.candidate.size-model\"]}",
191
+ "sig": {
192
+ "keyId": "vh-cp-2026-10",
193
+ "timestamp": "1793268000",
194
+ "nonce": "Zm9vYmFyYmF6cXV4MTIzNDU2",
195
+ "tenantId": "3f2b8c1e-5a4d-4e7b-9c21-0a1b2c3d4e5f",
196
+ "workspaceId": "ws-1",
197
+ "signature": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=="
198
+ },
199
+ "payload": {
200
+ "protocol": 2,
201
+ "sessionId": "e5f6a7b8-c9d0-4e1f-8a2b-4c5d6e7f8091",
202
+ "resumed": false,
203
+ "peerLastSeq": 0,
204
+ "limits": {
205
+ "maxFrameBytes": 49152,
206
+ "chunkRawBytes": 32768,
207
+ "maxChunks": 64,
208
+ "ackTimeoutMs": 5000,
209
+ "maxRetries": 3,
210
+ "heartbeatSeconds": 30,
211
+ "contentFirstByteMs": 10000,
212
+ "contentTotalMs": 30000
213
+ },
214
+ "capabilities": [
215
+ "incident.candidate.size-model"
216
+ ]
217
+ }
218
+ }
219
+ },
220
+ {
221
+ "name": "ready-caps-empty",
222
+ "why": "a 2.1 CP with nothing extra",
223
+ "expect": {
224
+ "valid": true
225
+ },
226
+ "message": {
227
+ "schemaVersion": 2,
228
+ "type": "ready",
229
+ "msgId": "00000000-0000-4000-8000-000000000001",
230
+ "seq": 0,
231
+ "tenantId": "3f2b8c1e-5a4d-4e7b-9c21-0a1b2c3d4e5f",
232
+ "workspaceId": "ws-1",
233
+ "ts": "2026-10-29T10:00:00Z",
234
+ "paramsRaw": "{\"protocol\":2,\"sessionId\":\"e5f6a7b8-c9d0-4e1f-8a2b-4c5d6e7f8091\",\"resumed\":false,\"peerLastSeq\":0,\"limits\":{\"maxFrameBytes\":49152,\"chunkRawBytes\":32768,\"maxChunks\":64,\"ackTimeoutMs\":5000,\"maxRetries\":3,\"heartbeatSeconds\":30,\"contentFirstByteMs\":10000,\"contentTotalMs\":30000},\"capabilities\":[]}",
235
+ "sig": {
236
+ "keyId": "vh-cp-2026-10",
237
+ "timestamp": "1793268000",
238
+ "nonce": "Zm9vYmFyYmF6cXV4MTIzNDU2",
239
+ "tenantId": "3f2b8c1e-5a4d-4e7b-9c21-0a1b2c3d4e5f",
240
+ "workspaceId": "ws-1",
241
+ "signature": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=="
242
+ },
243
+ "payload": {
244
+ "protocol": 2,
245
+ "sessionId": "e5f6a7b8-c9d0-4e1f-8a2b-4c5d6e7f8091",
246
+ "resumed": false,
247
+ "peerLastSeq": 0,
248
+ "limits": {
249
+ "maxFrameBytes": 49152,
250
+ "chunkRawBytes": 32768,
251
+ "maxChunks": 64,
252
+ "ackTimeoutMs": 5000,
253
+ "maxRetries": 3,
254
+ "heartbeatSeconds": 30,
255
+ "contentFirstByteMs": 10000,
256
+ "contentTotalMs": 30000
257
+ },
258
+ "capabilities": []
259
+ }
260
+ }
261
+ },
262
+ {
263
+ "name": "ready-caps-32-entries",
264
+ "why": "at most 32",
265
+ "expect": {
266
+ "valid": true
267
+ },
268
+ "message": {
269
+ "schemaVersion": 2,
270
+ "type": "ready",
271
+ "msgId": "00000000-0000-4000-8000-000000000001",
272
+ "seq": 0,
273
+ "tenantId": "3f2b8c1e-5a4d-4e7b-9c21-0a1b2c3d4e5f",
274
+ "workspaceId": "ws-1",
275
+ "ts": "2026-10-29T10:00:00Z",
276
+ "paramsRaw": "{\"protocol\":2,\"sessionId\":\"e5f6a7b8-c9d0-4e1f-8a2b-4c5d6e7f8091\",\"resumed\":false,\"peerLastSeq\":0,\"limits\":{\"maxFrameBytes\":49152,\"chunkRawBytes\":32768,\"maxChunks\":64,\"ackTimeoutMs\":5000,\"maxRetries\":3,\"heartbeatSeconds\":30,\"contentFirstByteMs\":10000,\"contentTotalMs\":30000},\"capabilities\":[\"cap-00\",\"cap-01\",\"cap-02\",\"cap-03\",\"cap-04\",\"cap-05\",\"cap-06\",\"cap-07\",\"cap-08\",\"cap-09\",\"cap-10\",\"cap-11\",\"cap-12\",\"cap-13\",\"cap-14\",\"cap-15\",\"cap-16\",\"cap-17\",\"cap-18\",\"cap-19\",\"cap-20\",\"cap-21\",\"cap-22\",\"cap-23\",\"cap-24\",\"cap-25\",\"cap-26\",\"cap-27\",\"cap-28\",\"cap-29\",\"cap-30\",\"cap-31\"]}",
277
+ "sig": {
278
+ "keyId": "vh-cp-2026-10",
279
+ "timestamp": "1793268000",
280
+ "nonce": "Zm9vYmFyYmF6cXV4MTIzNDU2",
281
+ "tenantId": "3f2b8c1e-5a4d-4e7b-9c21-0a1b2c3d4e5f",
282
+ "workspaceId": "ws-1",
283
+ "signature": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=="
284
+ },
285
+ "payload": {
286
+ "protocol": 2,
287
+ "sessionId": "e5f6a7b8-c9d0-4e1f-8a2b-4c5d6e7f8091",
288
+ "resumed": false,
289
+ "peerLastSeq": 0,
290
+ "limits": {
291
+ "maxFrameBytes": 49152,
292
+ "chunkRawBytes": 32768,
293
+ "maxChunks": 64,
294
+ "ackTimeoutMs": 5000,
295
+ "maxRetries": 3,
296
+ "heartbeatSeconds": 30,
297
+ "contentFirstByteMs": 10000,
298
+ "contentTotalMs": 30000
299
+ },
300
+ "capabilities": [
301
+ "cap-00",
302
+ "cap-01",
303
+ "cap-02",
304
+ "cap-03",
305
+ "cap-04",
306
+ "cap-05",
307
+ "cap-06",
308
+ "cap-07",
309
+ "cap-08",
310
+ "cap-09",
311
+ "cap-10",
312
+ "cap-11",
313
+ "cap-12",
314
+ "cap-13",
315
+ "cap-14",
316
+ "cap-15",
317
+ "cap-16",
318
+ "cap-17",
319
+ "cap-18",
320
+ "cap-19",
321
+ "cap-20",
322
+ "cap-21",
323
+ "cap-22",
324
+ "cap-23",
325
+ "cap-24",
326
+ "cap-25",
327
+ "cap-26",
328
+ "cap-27",
329
+ "cap-28",
330
+ "cap-29",
331
+ "cap-30",
332
+ "cap-31"
333
+ ]
334
+ }
335
+ }
336
+ },
337
+ {
338
+ "name": "ready-caps-two-entries",
339
+ "expect": {
340
+ "valid": true
341
+ },
342
+ "message": {
343
+ "schemaVersion": 2,
344
+ "type": "ready",
345
+ "msgId": "00000000-0000-4000-8000-000000000001",
346
+ "seq": 0,
347
+ "tenantId": "3f2b8c1e-5a4d-4e7b-9c21-0a1b2c3d4e5f",
348
+ "workspaceId": "ws-1",
349
+ "ts": "2026-10-29T10:00:00Z",
350
+ "paramsRaw": "{\"protocol\":2,\"sessionId\":\"e5f6a7b8-c9d0-4e1f-8a2b-4c5d6e7f8091\",\"resumed\":false,\"peerLastSeq\":0,\"limits\":{\"maxFrameBytes\":49152,\"chunkRawBytes\":32768,\"maxChunks\":64,\"ackTimeoutMs\":5000,\"maxRetries\":3,\"heartbeatSeconds\":30,\"contentFirstByteMs\":10000,\"contentTotalMs\":30000},\"capabilities\":[\"incident.candidate.size-model\",\"content.relay\"]}",
351
+ "sig": {
352
+ "keyId": "vh-cp-2026-10",
353
+ "timestamp": "1793268000",
354
+ "nonce": "Zm9vYmFyYmF6cXV4MTIzNDU2",
355
+ "tenantId": "3f2b8c1e-5a4d-4e7b-9c21-0a1b2c3d4e5f",
356
+ "workspaceId": "ws-1",
357
+ "signature": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=="
358
+ },
359
+ "payload": {
360
+ "protocol": 2,
361
+ "sessionId": "e5f6a7b8-c9d0-4e1f-8a2b-4c5d6e7f8091",
362
+ "resumed": false,
363
+ "peerLastSeq": 0,
364
+ "limits": {
365
+ "maxFrameBytes": 49152,
366
+ "chunkRawBytes": 32768,
367
+ "maxChunks": 64,
368
+ "ackTimeoutMs": 5000,
369
+ "maxRetries": 3,
370
+ "heartbeatSeconds": 30,
371
+ "contentFirstByteMs": 10000,
372
+ "contentTotalMs": 30000
373
+ },
374
+ "capabilities": [
375
+ "incident.candidate.size-model",
376
+ "content.relay"
377
+ ]
378
+ }
379
+ }
380
+ },
381
+ {
382
+ "name": "ready-caps-33-entries",
383
+ "expect": {
384
+ "valid": false,
385
+ "code": "schema_violation",
386
+ "keyword": "maxItems"
387
+ },
388
+ "message": {
389
+ "schemaVersion": 2,
390
+ "type": "ready",
391
+ "msgId": "00000000-0000-4000-8000-000000000001",
392
+ "seq": 0,
393
+ "tenantId": "3f2b8c1e-5a4d-4e7b-9c21-0a1b2c3d4e5f",
394
+ "workspaceId": "ws-1",
395
+ "ts": "2026-10-29T10:00:00Z",
396
+ "paramsRaw": "{\"protocol\":2,\"sessionId\":\"e5f6a7b8-c9d0-4e1f-8a2b-4c5d6e7f8091\",\"resumed\":false,\"peerLastSeq\":0,\"limits\":{\"maxFrameBytes\":49152,\"chunkRawBytes\":32768,\"maxChunks\":64,\"ackTimeoutMs\":5000,\"maxRetries\":3,\"heartbeatSeconds\":30,\"contentFirstByteMs\":10000,\"contentTotalMs\":30000},\"capabilities\":[\"cap-00\",\"cap-01\",\"cap-02\",\"cap-03\",\"cap-04\",\"cap-05\",\"cap-06\",\"cap-07\",\"cap-08\",\"cap-09\",\"cap-10\",\"cap-11\",\"cap-12\",\"cap-13\",\"cap-14\",\"cap-15\",\"cap-16\",\"cap-17\",\"cap-18\",\"cap-19\",\"cap-20\",\"cap-21\",\"cap-22\",\"cap-23\",\"cap-24\",\"cap-25\",\"cap-26\",\"cap-27\",\"cap-28\",\"cap-29\",\"cap-30\",\"cap-31\",\"cap-32\"]}",
397
+ "sig": {
398
+ "keyId": "vh-cp-2026-10",
399
+ "timestamp": "1793268000",
400
+ "nonce": "Zm9vYmFyYmF6cXV4MTIzNDU2",
401
+ "tenantId": "3f2b8c1e-5a4d-4e7b-9c21-0a1b2c3d4e5f",
402
+ "workspaceId": "ws-1",
403
+ "signature": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=="
404
+ },
405
+ "payload": {
406
+ "protocol": 2,
407
+ "sessionId": "e5f6a7b8-c9d0-4e1f-8a2b-4c5d6e7f8091",
408
+ "resumed": false,
409
+ "peerLastSeq": 0,
410
+ "limits": {
411
+ "maxFrameBytes": 49152,
412
+ "chunkRawBytes": 32768,
413
+ "maxChunks": 64,
414
+ "ackTimeoutMs": 5000,
415
+ "maxRetries": 3,
416
+ "heartbeatSeconds": 30,
417
+ "contentFirstByteMs": 10000,
418
+ "contentTotalMs": 30000
419
+ },
420
+ "capabilities": [
421
+ "cap-00",
422
+ "cap-01",
423
+ "cap-02",
424
+ "cap-03",
425
+ "cap-04",
426
+ "cap-05",
427
+ "cap-06",
428
+ "cap-07",
429
+ "cap-08",
430
+ "cap-09",
431
+ "cap-10",
432
+ "cap-11",
433
+ "cap-12",
434
+ "cap-13",
435
+ "cap-14",
436
+ "cap-15",
437
+ "cap-16",
438
+ "cap-17",
439
+ "cap-18",
440
+ "cap-19",
441
+ "cap-20",
442
+ "cap-21",
443
+ "cap-22",
444
+ "cap-23",
445
+ "cap-24",
446
+ "cap-25",
447
+ "cap-26",
448
+ "cap-27",
449
+ "cap-28",
450
+ "cap-29",
451
+ "cap-30",
452
+ "cap-31",
453
+ "cap-32"
454
+ ]
455
+ }
456
+ }
457
+ },
458
+ {
459
+ "name": "ready-caps-duplicated",
460
+ "expect": {
461
+ "valid": false,
462
+ "code": "schema_violation",
463
+ "keyword": "uniqueItems"
464
+ },
465
+ "message": {
466
+ "schemaVersion": 2,
467
+ "type": "ready",
468
+ "msgId": "00000000-0000-4000-8000-000000000001",
469
+ "seq": 0,
470
+ "tenantId": "3f2b8c1e-5a4d-4e7b-9c21-0a1b2c3d4e5f",
471
+ "workspaceId": "ws-1",
472
+ "ts": "2026-10-29T10:00:00Z",
473
+ "paramsRaw": "{\"protocol\":2,\"sessionId\":\"e5f6a7b8-c9d0-4e1f-8a2b-4c5d6e7f8091\",\"resumed\":false,\"peerLastSeq\":0,\"limits\":{\"maxFrameBytes\":49152,\"chunkRawBytes\":32768,\"maxChunks\":64,\"ackTimeoutMs\":5000,\"maxRetries\":3,\"heartbeatSeconds\":30,\"contentFirstByteMs\":10000,\"contentTotalMs\":30000},\"capabilities\":[\"a\",\"a\"]}",
474
+ "sig": {
475
+ "keyId": "vh-cp-2026-10",
476
+ "timestamp": "1793268000",
477
+ "nonce": "Zm9vYmFyYmF6cXV4MTIzNDU2",
478
+ "tenantId": "3f2b8c1e-5a4d-4e7b-9c21-0a1b2c3d4e5f",
479
+ "workspaceId": "ws-1",
480
+ "signature": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=="
481
+ },
482
+ "payload": {
483
+ "protocol": 2,
484
+ "sessionId": "e5f6a7b8-c9d0-4e1f-8a2b-4c5d6e7f8091",
485
+ "resumed": false,
486
+ "peerLastSeq": 0,
487
+ "limits": {
488
+ "maxFrameBytes": 49152,
489
+ "chunkRawBytes": 32768,
490
+ "maxChunks": 64,
491
+ "ackTimeoutMs": 5000,
492
+ "maxRetries": 3,
493
+ "heartbeatSeconds": 30,
494
+ "contentFirstByteMs": 10000,
495
+ "contentTotalMs": 30000
496
+ },
497
+ "capabilities": [
498
+ "a",
499
+ "a"
500
+ ]
501
+ }
502
+ }
503
+ },
504
+ {
505
+ "name": "ready-caps-upper-case",
506
+ "why": "capability charset",
507
+ "expect": {
508
+ "valid": false,
509
+ "code": "schema_violation",
510
+ "keyword": "pattern"
511
+ },
512
+ "message": {
513
+ "schemaVersion": 2,
514
+ "type": "ready",
515
+ "msgId": "00000000-0000-4000-8000-000000000001",
516
+ "seq": 0,
517
+ "tenantId": "3f2b8c1e-5a4d-4e7b-9c21-0a1b2c3d4e5f",
518
+ "workspaceId": "ws-1",
519
+ "ts": "2026-10-29T10:00:00Z",
520
+ "paramsRaw": "{\"protocol\":2,\"sessionId\":\"e5f6a7b8-c9d0-4e1f-8a2b-4c5d6e7f8091\",\"resumed\":false,\"peerLastSeq\":0,\"limits\":{\"maxFrameBytes\":49152,\"chunkRawBytes\":32768,\"maxChunks\":64,\"ackTimeoutMs\":5000,\"maxRetries\":3,\"heartbeatSeconds\":30,\"contentFirstByteMs\":10000,\"contentTotalMs\":30000},\"capabilities\":[\"Incident.Candidate\"]}",
521
+ "sig": {
522
+ "keyId": "vh-cp-2026-10",
523
+ "timestamp": "1793268000",
524
+ "nonce": "Zm9vYmFyYmF6cXV4MTIzNDU2",
525
+ "tenantId": "3f2b8c1e-5a4d-4e7b-9c21-0a1b2c3d4e5f",
526
+ "workspaceId": "ws-1",
527
+ "signature": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=="
528
+ },
529
+ "payload": {
530
+ "protocol": 2,
531
+ "sessionId": "e5f6a7b8-c9d0-4e1f-8a2b-4c5d6e7f8091",
532
+ "resumed": false,
533
+ "peerLastSeq": 0,
534
+ "limits": {
535
+ "maxFrameBytes": 49152,
536
+ "chunkRawBytes": 32768,
537
+ "maxChunks": 64,
538
+ "ackTimeoutMs": 5000,
539
+ "maxRetries": 3,
540
+ "heartbeatSeconds": 30,
541
+ "contentFirstByteMs": 10000,
542
+ "contentTotalMs": 30000
543
+ },
544
+ "capabilities": [
545
+ "Incident.Candidate"
546
+ ]
547
+ }
548
+ }
549
+ },
550
+ {
551
+ "name": "ready-caps-with-space",
552
+ "expect": {
553
+ "valid": false,
554
+ "code": "schema_violation",
555
+ "keyword": "pattern"
556
+ },
557
+ "message": {
558
+ "schemaVersion": 2,
559
+ "type": "ready",
560
+ "msgId": "00000000-0000-4000-8000-000000000001",
561
+ "seq": 0,
562
+ "tenantId": "3f2b8c1e-5a4d-4e7b-9c21-0a1b2c3d4e5f",
563
+ "workspaceId": "ws-1",
564
+ "ts": "2026-10-29T10:00:00Z",
565
+ "paramsRaw": "{\"protocol\":2,\"sessionId\":\"e5f6a7b8-c9d0-4e1f-8a2b-4c5d6e7f8091\",\"resumed\":false,\"peerLastSeq\":0,\"limits\":{\"maxFrameBytes\":49152,\"chunkRawBytes\":32768,\"maxChunks\":64,\"ackTimeoutMs\":5000,\"maxRetries\":3,\"heartbeatSeconds\":30,\"contentFirstByteMs\":10000,\"contentTotalMs\":30000},\"capabilities\":[\"incident candidate\"]}",
566
+ "sig": {
567
+ "keyId": "vh-cp-2026-10",
568
+ "timestamp": "1793268000",
569
+ "nonce": "Zm9vYmFyYmF6cXV4MTIzNDU2",
570
+ "tenantId": "3f2b8c1e-5a4d-4e7b-9c21-0a1b2c3d4e5f",
571
+ "workspaceId": "ws-1",
572
+ "signature": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=="
573
+ },
574
+ "payload": {
575
+ "protocol": 2,
576
+ "sessionId": "e5f6a7b8-c9d0-4e1f-8a2b-4c5d6e7f8091",
577
+ "resumed": false,
578
+ "peerLastSeq": 0,
579
+ "limits": {
580
+ "maxFrameBytes": 49152,
581
+ "chunkRawBytes": 32768,
582
+ "maxChunks": 64,
583
+ "ackTimeoutMs": 5000,
584
+ "maxRetries": 3,
585
+ "heartbeatSeconds": 30,
586
+ "contentFirstByteMs": 10000,
587
+ "contentTotalMs": 30000
588
+ },
589
+ "capabilities": [
590
+ "incident candidate"
591
+ ]
592
+ }
593
+ }
594
+ },
595
+ {
596
+ "name": "ready-caps-empty-string",
597
+ "expect": {
598
+ "valid": false,
599
+ "code": "schema_violation",
600
+ "keyword": "minLength"
601
+ },
602
+ "message": {
603
+ "schemaVersion": 2,
604
+ "type": "ready",
605
+ "msgId": "00000000-0000-4000-8000-000000000001",
606
+ "seq": 0,
607
+ "tenantId": "3f2b8c1e-5a4d-4e7b-9c21-0a1b2c3d4e5f",
608
+ "workspaceId": "ws-1",
609
+ "ts": "2026-10-29T10:00:00Z",
610
+ "paramsRaw": "{\"protocol\":2,\"sessionId\":\"e5f6a7b8-c9d0-4e1f-8a2b-4c5d6e7f8091\",\"resumed\":false,\"peerLastSeq\":0,\"limits\":{\"maxFrameBytes\":49152,\"chunkRawBytes\":32768,\"maxChunks\":64,\"ackTimeoutMs\":5000,\"maxRetries\":3,\"heartbeatSeconds\":30,\"contentFirstByteMs\":10000,\"contentTotalMs\":30000},\"capabilities\":[\"\"]}",
611
+ "sig": {
612
+ "keyId": "vh-cp-2026-10",
613
+ "timestamp": "1793268000",
614
+ "nonce": "Zm9vYmFyYmF6cXV4MTIzNDU2",
615
+ "tenantId": "3f2b8c1e-5a4d-4e7b-9c21-0a1b2c3d4e5f",
616
+ "workspaceId": "ws-1",
617
+ "signature": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=="
618
+ },
619
+ "payload": {
620
+ "protocol": 2,
621
+ "sessionId": "e5f6a7b8-c9d0-4e1f-8a2b-4c5d6e7f8091",
622
+ "resumed": false,
623
+ "peerLastSeq": 0,
624
+ "limits": {
625
+ "maxFrameBytes": 49152,
626
+ "chunkRawBytes": 32768,
627
+ "maxChunks": 64,
628
+ "ackTimeoutMs": 5000,
629
+ "maxRetries": 3,
630
+ "heartbeatSeconds": 30,
631
+ "contentFirstByteMs": 10000,
632
+ "contentTotalMs": 30000
633
+ },
634
+ "capabilities": [
635
+ ""
636
+ ]
637
+ }
638
+ }
639
+ },
640
+ {
641
+ "name": "ready-caps-49-chars",
642
+ "expect": {
643
+ "valid": false,
644
+ "code": "schema_violation",
645
+ "keyword": "maxLength"
646
+ },
647
+ "message": {
648
+ "schemaVersion": 2,
649
+ "type": "ready",
650
+ "msgId": "00000000-0000-4000-8000-000000000001",
651
+ "seq": 0,
652
+ "tenantId": "3f2b8c1e-5a4d-4e7b-9c21-0a1b2c3d4e5f",
653
+ "workspaceId": "ws-1",
654
+ "ts": "2026-10-29T10:00:00Z",
655
+ "paramsRaw": "{\"protocol\":2,\"sessionId\":\"e5f6a7b8-c9d0-4e1f-8a2b-4c5d6e7f8091\",\"resumed\":false,\"peerLastSeq\":0,\"limits\":{\"maxFrameBytes\":49152,\"chunkRawBytes\":32768,\"maxChunks\":64,\"ackTimeoutMs\":5000,\"maxRetries\":3,\"heartbeatSeconds\":30,\"contentFirstByteMs\":10000,\"contentTotalMs\":30000},\"capabilities\":[\"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\"]}",
656
+ "sig": {
657
+ "keyId": "vh-cp-2026-10",
658
+ "timestamp": "1793268000",
659
+ "nonce": "Zm9vYmFyYmF6cXV4MTIzNDU2",
660
+ "tenantId": "3f2b8c1e-5a4d-4e7b-9c21-0a1b2c3d4e5f",
661
+ "workspaceId": "ws-1",
662
+ "signature": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=="
663
+ },
664
+ "payload": {
665
+ "protocol": 2,
666
+ "sessionId": "e5f6a7b8-c9d0-4e1f-8a2b-4c5d6e7f8091",
667
+ "resumed": false,
668
+ "peerLastSeq": 0,
669
+ "limits": {
670
+ "maxFrameBytes": 49152,
671
+ "chunkRawBytes": 32768,
672
+ "maxChunks": 64,
673
+ "ackTimeoutMs": 5000,
674
+ "maxRetries": 3,
675
+ "heartbeatSeconds": 30,
676
+ "contentFirstByteMs": 10000,
677
+ "contentTotalMs": 30000
678
+ },
679
+ "capabilities": [
680
+ "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
681
+ ]
682
+ }
683
+ }
684
+ },
685
+ {
686
+ "name": "ready-caps-not-an-array",
687
+ "expect": {
688
+ "valid": false,
689
+ "code": "schema_violation",
690
+ "keyword": "type"
691
+ },
692
+ "message": {
693
+ "schemaVersion": 2,
694
+ "type": "ready",
695
+ "msgId": "00000000-0000-4000-8000-000000000001",
696
+ "seq": 0,
697
+ "tenantId": "3f2b8c1e-5a4d-4e7b-9c21-0a1b2c3d4e5f",
698
+ "workspaceId": "ws-1",
699
+ "ts": "2026-10-29T10:00:00Z",
700
+ "paramsRaw": "{\"protocol\":2,\"sessionId\":\"e5f6a7b8-c9d0-4e1f-8a2b-4c5d6e7f8091\",\"resumed\":false,\"peerLastSeq\":0,\"limits\":{\"maxFrameBytes\":49152,\"chunkRawBytes\":32768,\"maxChunks\":64,\"ackTimeoutMs\":5000,\"maxRetries\":3,\"heartbeatSeconds\":30,\"contentFirstByteMs\":10000,\"contentTotalMs\":30000},\"capabilities\":\"incident.candidate.size-model\"}",
701
+ "sig": {
702
+ "keyId": "vh-cp-2026-10",
703
+ "timestamp": "1793268000",
704
+ "nonce": "Zm9vYmFyYmF6cXV4MTIzNDU2",
705
+ "tenantId": "3f2b8c1e-5a4d-4e7b-9c21-0a1b2c3d4e5f",
706
+ "workspaceId": "ws-1",
707
+ "signature": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=="
708
+ },
709
+ "payload": {
710
+ "protocol": 2,
711
+ "sessionId": "e5f6a7b8-c9d0-4e1f-8a2b-4c5d6e7f8091",
712
+ "resumed": false,
713
+ "peerLastSeq": 0,
714
+ "limits": {
715
+ "maxFrameBytes": 49152,
716
+ "chunkRawBytes": 32768,
717
+ "maxChunks": 64,
718
+ "ackTimeoutMs": 5000,
719
+ "maxRetries": 3,
720
+ "heartbeatSeconds": 30,
721
+ "contentFirstByteMs": 10000,
722
+ "contentTotalMs": 30000
723
+ },
724
+ "capabilities": "incident.candidate.size-model"
725
+ }
726
+ }
727
+ },
728
+ {
729
+ "name": "ready-caps-with-an-object",
730
+ "expect": {
731
+ "valid": false,
732
+ "code": "schema_violation",
733
+ "keyword": "type"
734
+ },
735
+ "message": {
736
+ "schemaVersion": 2,
737
+ "type": "ready",
738
+ "msgId": "00000000-0000-4000-8000-000000000001",
739
+ "seq": 0,
740
+ "tenantId": "3f2b8c1e-5a4d-4e7b-9c21-0a1b2c3d4e5f",
741
+ "workspaceId": "ws-1",
742
+ "ts": "2026-10-29T10:00:00Z",
743
+ "paramsRaw": "{\"protocol\":2,\"sessionId\":\"e5f6a7b8-c9d0-4e1f-8a2b-4c5d6e7f8091\",\"resumed\":false,\"peerLastSeq\":0,\"limits\":{\"maxFrameBytes\":49152,\"chunkRawBytes\":32768,\"maxChunks\":64,\"ackTimeoutMs\":5000,\"maxRetries\":3,\"heartbeatSeconds\":30,\"contentFirstByteMs\":10000,\"contentTotalMs\":30000},\"capabilities\":[{\"name\":\"x\"}]}",
744
+ "sig": {
745
+ "keyId": "vh-cp-2026-10",
746
+ "timestamp": "1793268000",
747
+ "nonce": "Zm9vYmFyYmF6cXV4MTIzNDU2",
748
+ "tenantId": "3f2b8c1e-5a4d-4e7b-9c21-0a1b2c3d4e5f",
749
+ "workspaceId": "ws-1",
750
+ "signature": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=="
751
+ },
752
+ "payload": {
753
+ "protocol": 2,
754
+ "sessionId": "e5f6a7b8-c9d0-4e1f-8a2b-4c5d6e7f8091",
755
+ "resumed": false,
756
+ "peerLastSeq": 0,
757
+ "limits": {
758
+ "maxFrameBytes": 49152,
759
+ "chunkRawBytes": 32768,
760
+ "maxChunks": 64,
761
+ "ackTimeoutMs": 5000,
762
+ "maxRetries": 3,
763
+ "heartbeatSeconds": 30,
764
+ "contentFirstByteMs": 10000,
765
+ "contentTotalMs": 30000
766
+ },
767
+ "capabilities": [
768
+ {
769
+ "name": "x"
770
+ }
771
+ ]
772
+ }
773
+ }
175
774
  }
176
775
  ]
177
776
  }