@creatornader/agent-bridge 0.2.0 → 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 (114) hide show
  1. package/CHANGELOG.md +63 -1
  2. package/README.md +467 -29
  3. package/ROADMAP.md +104 -0
  4. package/SECURITY.md +73 -0
  5. package/SKILL.md +68 -2
  6. package/bin/agent-bridge +2 -2
  7. package/clients/claude-desktop.json +3 -1
  8. package/dist/archive.d.ts +163 -0
  9. package/dist/archive.js +50 -0
  10. package/dist/archive.js.map +1 -0
  11. package/dist/bridge-domain-CBX3IVqC.d.ts +153 -0
  12. package/dist/{bridge-service-CfqMcMAn.d.ts → bridge-service-hX1ZQp4W.d.ts} +15 -5
  13. package/dist/bridge-store-DPVSCwfs.d.ts +102 -0
  14. package/dist/bridge.d.ts +76 -17
  15. package/dist/bridge.js +52 -24
  16. package/dist/chunk-2DFNOLMO.js +618 -0
  17. package/dist/chunk-2DFNOLMO.js.map +1 -0
  18. package/dist/{chunk-KVR4JBRF.js → chunk-2EVLG3YA.js} +2 -2
  19. package/dist/{chunk-KVR4JBRF.js.map → chunk-2EVLG3YA.js.map} +1 -1
  20. package/dist/chunk-45BZGB77.js +709 -0
  21. package/dist/chunk-45BZGB77.js.map +1 -0
  22. package/dist/chunk-4VB44KJU.js +230 -0
  23. package/dist/chunk-4VB44KJU.js.map +1 -0
  24. package/dist/chunk-5GMB3A77.js +1013 -0
  25. package/dist/chunk-5GMB3A77.js.map +1 -0
  26. package/dist/chunk-A6W4QALF.js +1258 -0
  27. package/dist/chunk-A6W4QALF.js.map +1 -0
  28. package/dist/chunk-BZLMF5O5.js +328 -0
  29. package/dist/chunk-BZLMF5O5.js.map +1 -0
  30. package/dist/{chunk-AXL2I7FH.js → chunk-CEXBMOI5.js} +240 -79
  31. package/dist/chunk-CEXBMOI5.js.map +1 -0
  32. package/dist/chunk-GADH244D.js +527 -0
  33. package/dist/chunk-GADH244D.js.map +1 -0
  34. package/dist/chunk-MBPZXTJA.js +2428 -0
  35. package/dist/chunk-MBPZXTJA.js.map +1 -0
  36. package/dist/chunk-NCO7RLBM.js +146 -0
  37. package/dist/chunk-NCO7RLBM.js.map +1 -0
  38. package/dist/chunk-Q6PPMXJC.js +1050 -0
  39. package/dist/chunk-Q6PPMXJC.js.map +1 -0
  40. package/dist/{chunk-4KAOBC5X.js → chunk-SPSMZOCJ.js} +190 -165
  41. package/dist/chunk-SPSMZOCJ.js.map +1 -0
  42. package/dist/chunk-UAHMP6GC.js +54 -0
  43. package/dist/chunk-UAHMP6GC.js.map +1 -0
  44. package/dist/{chunk-YD6YJATN.js → chunk-VOQIDTCJ.js} +4 -2
  45. package/dist/chunk-VOQIDTCJ.js.map +1 -0
  46. package/dist/chunk-WAI2IYIQ.js +554 -0
  47. package/dist/chunk-WAI2IYIQ.js.map +1 -0
  48. package/dist/cli.d.ts +2 -1
  49. package/dist/cli.js +3577 -250
  50. package/dist/cli.js.map +1 -1
  51. package/dist/client-config.d.ts +1 -1
  52. package/dist/client-config.js +1 -1
  53. package/dist/client-runtime.d.ts +10 -6
  54. package/dist/client-runtime.js +9 -6
  55. package/dist/contracts/generate.d.ts +2 -0
  56. package/dist/contracts/generate.js +247 -0
  57. package/dist/contracts/generate.js.map +1 -0
  58. package/dist/dr.d.ts +324 -0
  59. package/dist/dr.js +124 -0
  60. package/dist/dr.js.map +1 -0
  61. package/dist/gateway-CggQ8vTC.d.ts +78 -0
  62. package/dist/gateway-main.js +190 -8
  63. package/dist/gateway-main.js.map +1 -1
  64. package/dist/gateway.d.ts +4 -3
  65. package/dist/gateway.js +4 -3
  66. package/dist/index.js +11 -8
  67. package/dist/index.js.map +1 -1
  68. package/dist/postgres-bridge-store-Bfd3hRId.d.ts +49 -0
  69. package/dist/server.d.ts +3 -2
  70. package/dist/server.js +13 -8
  71. package/dist/sqlite.d.ts +94 -12
  72. package/dist/sqlite.js +7 -4
  73. package/docs/architecture-v2.md +375 -0
  74. package/docs/decisions/0001-protocol-layers-and-acknowledgment-semantics.md +85 -0
  75. package/docs/decisions/0002-canonical-operation-contract-registry.md +46 -0
  76. package/docs/ecosystem.md +54 -0
  77. package/docs/postmortems/2026-07-08-wrapper-source-drift.md +82 -0
  78. package/docs/troubleshooting.md +89 -0
  79. package/llms.txt +96 -4
  80. package/openapi/agent-bridge-v2.openapi.json +9610 -0
  81. package/package.json +24 -4
  82. package/schemas/agent-bridge-v2.capabilities.json +1829 -0
  83. package/schemas/agent-bridge-v2.mcp.json +2074 -0
  84. package/schemas/agent-bridge-v2.schema.json +4560 -0
  85. package/sql/migrations/008_message_projects.sql +36 -0
  86. package/sql/migrations/009_mailbox_query_indexes.sql +28 -0
  87. package/sql/migrations/010_publisher_delivery_policy.sql +210 -0
  88. package/sql/migrations/011_credential_security.sql +875 -0
  89. package/sql/migrations/012_request_authority.sql +177 -0
  90. package/sql/migrations/013_row_isolation.sql +495 -0
  91. package/sql/migrations/014_owner_control_plane.sql +1641 -0
  92. package/sql/migrations/015_portable_archives.sql +1813 -0
  93. package/sql/migrations/016_native_dr_fence.sql +1005 -0
  94. package/bin/CLAUDE.md +0 -11
  95. package/dist/bridge-domain-BcnBeHOn.d.ts +0 -97
  96. package/dist/bridge-store-BuGjxTn4.d.ts +0 -61
  97. package/dist/chunk-4KAOBC5X.js.map +0 -1
  98. package/dist/chunk-6MAZ6YLZ.js +0 -146
  99. package/dist/chunk-6MAZ6YLZ.js.map +0 -1
  100. package/dist/chunk-AXL2I7FH.js.map +0 -1
  101. package/dist/chunk-BV6W4AJK.js +0 -211
  102. package/dist/chunk-BV6W4AJK.js.map +0 -1
  103. package/dist/chunk-CKSKUBDQ.js +0 -153
  104. package/dist/chunk-CKSKUBDQ.js.map +0 -1
  105. package/dist/chunk-JOUBDRYX.js +0 -272
  106. package/dist/chunk-JOUBDRYX.js.map +0 -1
  107. package/dist/chunk-JTC5YURG.js +0 -49
  108. package/dist/chunk-JTC5YURG.js.map +0 -1
  109. package/dist/chunk-O26W5QHS.js +0 -409
  110. package/dist/chunk-O26W5QHS.js.map +0 -1
  111. package/dist/chunk-WEULPMUY.js +0 -988
  112. package/dist/chunk-WEULPMUY.js.map +0 -1
  113. package/dist/chunk-YD6YJATN.js.map +0 -1
  114. package/dist/gateway-BULozv3K.d.ts +0 -54
@@ -0,0 +1,4560 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://agent-bridge.dev/schemas/v2/operations.json",
4
+ "title": "Agent Bridge v2 operation contracts",
5
+ "protocolVersion": "2.1",
6
+ "scopeEnforcementByProvider": {
7
+ "local": false,
8
+ "gateway": true,
9
+ "legacy-supabase": false
10
+ },
11
+ "$defs": {
12
+ "ErrorEnvelope": {
13
+ "type": "object",
14
+ "required": [
15
+ "error"
16
+ ],
17
+ "properties": {
18
+ "error": {
19
+ "type": "object",
20
+ "required": [
21
+ "code",
22
+ "requestId"
23
+ ],
24
+ "properties": {
25
+ "code": {
26
+ "type": "string"
27
+ },
28
+ "requestId": {
29
+ "type": "string"
30
+ },
31
+ "message": {
32
+ "type": "string"
33
+ },
34
+ "operation": {
35
+ "type": "string"
36
+ },
37
+ "issues": {
38
+ "type": "array",
39
+ "items": {
40
+ "type": "object",
41
+ "required": [
42
+ "path",
43
+ "message"
44
+ ],
45
+ "properties": {
46
+ "path": {
47
+ "type": "string"
48
+ },
49
+ "message": {
50
+ "type": "string"
51
+ }
52
+ },
53
+ "additionalProperties": true
54
+ }
55
+ },
56
+ "details": {},
57
+ "supportedProtocolVersions": {
58
+ "type": "array",
59
+ "items": {
60
+ "type": "string"
61
+ }
62
+ }
63
+ },
64
+ "additionalProperties": true
65
+ }
66
+ },
67
+ "additionalProperties": true
68
+ },
69
+ "legacy20MessageDraft": {
70
+ "type": "object",
71
+ "required": [
72
+ "type",
73
+ "content"
74
+ ],
75
+ "properties": {
76
+ "id": {
77
+ "type": "string"
78
+ },
79
+ "source": {
80
+ "type": "string"
81
+ },
82
+ "type": {
83
+ "type": "string"
84
+ },
85
+ "content": {
86
+ "type": "string"
87
+ },
88
+ "contentType": {
89
+ "type": "string"
90
+ },
91
+ "data": {},
92
+ "targets": {
93
+ "type": "array",
94
+ "items": {
95
+ "type": "string"
96
+ }
97
+ },
98
+ "threadId": {
99
+ "type": "string"
100
+ },
101
+ "replyToId": {
102
+ "type": "string"
103
+ },
104
+ "correlationId": {
105
+ "type": "string"
106
+ },
107
+ "causationId": {
108
+ "type": "string"
109
+ },
110
+ "priority": {
111
+ "enum": [
112
+ "info",
113
+ "high",
114
+ "urgent"
115
+ ]
116
+ },
117
+ "expiresAt": {
118
+ "type": "string"
119
+ },
120
+ "idempotencyKey": {
121
+ "type": "string"
122
+ },
123
+ "atribReceiptId": {
124
+ "type": "string"
125
+ },
126
+ "informedBy": {
127
+ "type": "array",
128
+ "items": {
129
+ "type": "string"
130
+ }
131
+ },
132
+ "metadata": {}
133
+ },
134
+ "additionalProperties": false
135
+ },
136
+ "legacy20Message": {
137
+ "type": "object",
138
+ "required": [
139
+ "id",
140
+ "workspace",
141
+ "source",
142
+ "type",
143
+ "content",
144
+ "contentType",
145
+ "sequence",
146
+ "createdAt",
147
+ "targets",
148
+ "priority"
149
+ ],
150
+ "properties": {
151
+ "id": {
152
+ "type": "string"
153
+ },
154
+ "workspace": {
155
+ "type": "string"
156
+ },
157
+ "source": {
158
+ "type": "string"
159
+ },
160
+ "type": {
161
+ "type": "string"
162
+ },
163
+ "content": {
164
+ "type": "string"
165
+ },
166
+ "contentType": {
167
+ "type": "string"
168
+ },
169
+ "sequence": {
170
+ "type": "string"
171
+ },
172
+ "createdAt": {
173
+ "type": "string"
174
+ },
175
+ "data": {},
176
+ "targets": {
177
+ "type": "array",
178
+ "items": {
179
+ "type": "string"
180
+ }
181
+ },
182
+ "threadId": {
183
+ "type": "string"
184
+ },
185
+ "replyToId": {
186
+ "type": "string"
187
+ },
188
+ "correlationId": {
189
+ "type": "string"
190
+ },
191
+ "causationId": {
192
+ "type": "string"
193
+ },
194
+ "priority": {
195
+ "enum": [
196
+ "info",
197
+ "high",
198
+ "urgent"
199
+ ]
200
+ },
201
+ "expiresAt": {
202
+ "type": "string"
203
+ },
204
+ "idempotencyKey": {
205
+ "type": "string"
206
+ },
207
+ "atribReceiptId": {
208
+ "type": "string"
209
+ },
210
+ "informedBy": {
211
+ "type": "array",
212
+ "items": {
213
+ "type": "string"
214
+ }
215
+ },
216
+ "metadata": {}
217
+ },
218
+ "additionalProperties": true
219
+ },
220
+ "legacy20Delivery": {
221
+ "type": "object",
222
+ "required": [
223
+ "id",
224
+ "messageId",
225
+ "workspace",
226
+ "recipient",
227
+ "state",
228
+ "attempt",
229
+ "availableAt"
230
+ ],
231
+ "properties": {
232
+ "id": {
233
+ "type": "string"
234
+ },
235
+ "messageId": {
236
+ "type": "string"
237
+ },
238
+ "workspace": {
239
+ "type": "string"
240
+ },
241
+ "recipient": {
242
+ "type": "string"
243
+ },
244
+ "state": {
245
+ "enum": [
246
+ "pending",
247
+ "claimed",
248
+ "acked",
249
+ "retrying",
250
+ "dead"
251
+ ]
252
+ },
253
+ "attempt": {
254
+ "type": "number"
255
+ },
256
+ "availableAt": {
257
+ "type": "string"
258
+ },
259
+ "leaseToken": {
260
+ "type": "string"
261
+ },
262
+ "leaseOwner": {
263
+ "type": "string"
264
+ },
265
+ "leaseExpiresAt": {
266
+ "type": "string"
267
+ },
268
+ "lastError": {
269
+ "type": "string"
270
+ }
271
+ },
272
+ "additionalProperties": true
273
+ },
274
+ "capabilitiesRequest": {
275
+ "type": "object",
276
+ "properties": {},
277
+ "additionalProperties": false
278
+ },
279
+ "capabilitiesResponse": {
280
+ "type": "object",
281
+ "required": [
282
+ "protocolVersion",
283
+ "currentProtocolVersion",
284
+ "selectedProtocolVersion",
285
+ "supportedProtocolVersions",
286
+ "scopeEnforcement",
287
+ "requestAuthority",
288
+ "rowIsolation",
289
+ "authorizationModel",
290
+ "surface",
291
+ "provider",
292
+ "operations"
293
+ ],
294
+ "properties": {
295
+ "protocolVersion": {
296
+ "type": "string"
297
+ },
298
+ "currentProtocolVersion": {
299
+ "type": "string"
300
+ },
301
+ "selectedProtocolVersion": {
302
+ "type": "string"
303
+ },
304
+ "supportedProtocolVersions": {
305
+ "type": "array",
306
+ "items": {
307
+ "type": "string"
308
+ }
309
+ },
310
+ "scopeEnforcement": {
311
+ "type": "boolean"
312
+ },
313
+ "requestAuthority": {
314
+ "type": "boolean"
315
+ },
316
+ "rowIsolation": {
317
+ "type": "boolean"
318
+ },
319
+ "authorizationModel": {
320
+ "enum": [
321
+ "scoped-credential",
322
+ "credential-wide",
323
+ "process-identity",
324
+ "legacy-key"
325
+ ]
326
+ },
327
+ "surface": {
328
+ "enum": [
329
+ "mcp",
330
+ "http",
331
+ "cli"
332
+ ]
333
+ },
334
+ "provider": {
335
+ "enum": [
336
+ "local",
337
+ "gateway",
338
+ "legacy-supabase"
339
+ ]
340
+ },
341
+ "operations": {
342
+ "type": "array",
343
+ "items": {
344
+ "type": "object",
345
+ "required": [
346
+ "id",
347
+ "summary",
348
+ "requiredScopes"
349
+ ],
350
+ "properties": {
351
+ "id": {
352
+ "type": "string"
353
+ },
354
+ "summary": {
355
+ "type": "string"
356
+ },
357
+ "requiredScopes": {
358
+ "type": "array",
359
+ "items": {
360
+ "type": "string"
361
+ }
362
+ },
363
+ "mcp": {},
364
+ "http": {},
365
+ "cli": {}
366
+ },
367
+ "additionalProperties": true
368
+ }
369
+ }
370
+ },
371
+ "additionalProperties": true
372
+ },
373
+ "capabilitiesCliResponse": {
374
+ "type": "object",
375
+ "required": [
376
+ "protocolVersion",
377
+ "currentProtocolVersion",
378
+ "selectedProtocolVersion",
379
+ "supportedProtocolVersions",
380
+ "scopeEnforcement",
381
+ "requestAuthority",
382
+ "rowIsolation",
383
+ "authorizationModel",
384
+ "surface",
385
+ "provider",
386
+ "operations"
387
+ ],
388
+ "properties": {
389
+ "protocolVersion": {
390
+ "type": "string"
391
+ },
392
+ "currentProtocolVersion": {
393
+ "type": "string"
394
+ },
395
+ "selectedProtocolVersion": {
396
+ "type": "string"
397
+ },
398
+ "supportedProtocolVersions": {
399
+ "type": "array",
400
+ "items": {
401
+ "type": "string"
402
+ }
403
+ },
404
+ "scopeEnforcement": {
405
+ "type": "boolean"
406
+ },
407
+ "requestAuthority": {
408
+ "type": "boolean"
409
+ },
410
+ "rowIsolation": {
411
+ "type": "boolean"
412
+ },
413
+ "authorizationModel": {
414
+ "enum": [
415
+ "scoped-credential",
416
+ "credential-wide",
417
+ "process-identity",
418
+ "legacy-key"
419
+ ]
420
+ },
421
+ "surface": {
422
+ "enum": [
423
+ "mcp",
424
+ "http",
425
+ "cli"
426
+ ]
427
+ },
428
+ "provider": {
429
+ "enum": [
430
+ "local",
431
+ "gateway",
432
+ "legacy-supabase"
433
+ ]
434
+ },
435
+ "operations": {
436
+ "type": "array",
437
+ "items": {
438
+ "type": "object",
439
+ "required": [
440
+ "id",
441
+ "summary",
442
+ "requiredScopes"
443
+ ],
444
+ "properties": {
445
+ "id": {
446
+ "type": "string"
447
+ },
448
+ "summary": {
449
+ "type": "string"
450
+ },
451
+ "requiredScopes": {
452
+ "type": "array",
453
+ "items": {
454
+ "type": "string"
455
+ }
456
+ },
457
+ "mcp": {},
458
+ "http": {},
459
+ "cli": {}
460
+ },
461
+ "additionalProperties": true
462
+ }
463
+ }
464
+ },
465
+ "additionalProperties": true
466
+ },
467
+ "statusRequest": {
468
+ "type": "object",
469
+ "properties": {},
470
+ "additionalProperties": false
471
+ },
472
+ "statusResponse": {
473
+ "type": "object",
474
+ "required": [
475
+ "schemaVersion",
476
+ "deliverySupported",
477
+ "pending",
478
+ "claimed",
479
+ "retrying",
480
+ "dead"
481
+ ],
482
+ "properties": {
483
+ "schemaVersion": {
484
+ "enum": [
485
+ "local-v2",
486
+ "postgres-v2",
487
+ "legacy-v1"
488
+ ]
489
+ },
490
+ "deliverySupported": {
491
+ "type": "boolean"
492
+ },
493
+ "pending": {
494
+ "anyOf": [
495
+ {
496
+ "type": "number"
497
+ },
498
+ {
499
+ "type": "null"
500
+ }
501
+ ]
502
+ },
503
+ "claimed": {
504
+ "anyOf": [
505
+ {
506
+ "type": "number"
507
+ },
508
+ {
509
+ "type": "null"
510
+ }
511
+ ]
512
+ },
513
+ "retrying": {
514
+ "anyOf": [
515
+ {
516
+ "type": "number"
517
+ },
518
+ {
519
+ "type": "null"
520
+ }
521
+ ]
522
+ },
523
+ "dead": {
524
+ "anyOf": [
525
+ {
526
+ "type": "number"
527
+ },
528
+ {
529
+ "type": "null"
530
+ }
531
+ ]
532
+ },
533
+ "cancelled": {
534
+ "anyOf": [
535
+ {
536
+ "type": "number"
537
+ },
538
+ {
539
+ "type": "null"
540
+ }
541
+ ]
542
+ },
543
+ "oldestAvailableAt": {
544
+ "type": "string"
545
+ },
546
+ "due": {
547
+ "anyOf": [
548
+ {
549
+ "type": "number"
550
+ },
551
+ {
552
+ "type": "null"
553
+ }
554
+ ]
555
+ },
556
+ "scheduled": {
557
+ "anyOf": [
558
+ {
559
+ "type": "number"
560
+ },
561
+ {
562
+ "type": "null"
563
+ }
564
+ ]
565
+ },
566
+ "expiredLeases": {
567
+ "anyOf": [
568
+ {
569
+ "type": "number"
570
+ },
571
+ {
572
+ "type": "null"
573
+ }
574
+ ]
575
+ },
576
+ "oldestDueAt": {
577
+ "type": "string"
578
+ },
579
+ "queueLagMs": {
580
+ "anyOf": [
581
+ {
582
+ "type": "number"
583
+ },
584
+ {
585
+ "type": "null"
586
+ }
587
+ ]
588
+ },
589
+ "principal": {
590
+ "type": "object",
591
+ "required": [
592
+ "workspace",
593
+ "agent"
594
+ ],
595
+ "properties": {
596
+ "workspace": {
597
+ "type": "string"
598
+ },
599
+ "agent": {
600
+ "type": "string"
601
+ }
602
+ },
603
+ "additionalProperties": true
604
+ }
605
+ },
606
+ "additionalProperties": true
607
+ },
608
+ "client_statusRequest": {
609
+ "type": "object",
610
+ "properties": {},
611
+ "additionalProperties": false
612
+ },
613
+ "client_statusResponse": {
614
+ "type": "object",
615
+ "required": [
616
+ "status",
617
+ "localHealthy",
618
+ "connected",
619
+ "remoteReachable",
620
+ "provider",
621
+ "workspace",
622
+ "agent",
623
+ "instance",
624
+ "schemaVersion",
625
+ "endpoint",
626
+ "database",
627
+ "cursorPath",
628
+ "lastCursor",
629
+ "queue",
630
+ "checks"
631
+ ],
632
+ "properties": {
633
+ "status": {
634
+ "enum": [
635
+ "ok",
636
+ "unknown",
637
+ "degraded",
638
+ "failed"
639
+ ]
640
+ },
641
+ "localHealthy": {
642
+ "type": "boolean"
643
+ },
644
+ "connected": {
645
+ "type": "boolean"
646
+ },
647
+ "remoteReachable": {
648
+ "anyOf": [
649
+ {
650
+ "type": "boolean"
651
+ },
652
+ {
653
+ "type": "null"
654
+ }
655
+ ]
656
+ },
657
+ "provider": {
658
+ "enum": [
659
+ "local",
660
+ "gateway",
661
+ "legacy-supabase"
662
+ ]
663
+ },
664
+ "workspace": {
665
+ "type": "string"
666
+ },
667
+ "agent": {
668
+ "type": "string"
669
+ },
670
+ "instance": {
671
+ "anyOf": [
672
+ {
673
+ "type": "string"
674
+ },
675
+ {
676
+ "type": "null"
677
+ }
678
+ ]
679
+ },
680
+ "schemaVersion": {
681
+ "enum": [
682
+ "local-v2",
683
+ "postgres-v2",
684
+ "legacy-v1"
685
+ ]
686
+ },
687
+ "endpoint": {
688
+ "anyOf": [
689
+ {
690
+ "type": "string"
691
+ },
692
+ {
693
+ "type": "null"
694
+ }
695
+ ]
696
+ },
697
+ "database": {
698
+ "anyOf": [
699
+ {
700
+ "type": "string"
701
+ },
702
+ {
703
+ "type": "null"
704
+ }
705
+ ]
706
+ },
707
+ "cursorPath": {
708
+ "type": "string"
709
+ },
710
+ "lastCursor": {
711
+ "anyOf": [
712
+ {
713
+ "type": "string"
714
+ },
715
+ {
716
+ "type": "null"
717
+ }
718
+ ]
719
+ },
720
+ "queue": {
721
+ "type": "object",
722
+ "required": [
723
+ "schemaVersion",
724
+ "deliverySupported",
725
+ "pending",
726
+ "claimed",
727
+ "retrying",
728
+ "dead"
729
+ ],
730
+ "properties": {
731
+ "schemaVersion": {
732
+ "enum": [
733
+ "local-v2",
734
+ "postgres-v2",
735
+ "legacy-v1"
736
+ ]
737
+ },
738
+ "deliverySupported": {
739
+ "type": "boolean"
740
+ },
741
+ "pending": {
742
+ "anyOf": [
743
+ {
744
+ "type": "number"
745
+ },
746
+ {
747
+ "type": "null"
748
+ }
749
+ ]
750
+ },
751
+ "claimed": {
752
+ "anyOf": [
753
+ {
754
+ "type": "number"
755
+ },
756
+ {
757
+ "type": "null"
758
+ }
759
+ ]
760
+ },
761
+ "retrying": {
762
+ "anyOf": [
763
+ {
764
+ "type": "number"
765
+ },
766
+ {
767
+ "type": "null"
768
+ }
769
+ ]
770
+ },
771
+ "dead": {
772
+ "anyOf": [
773
+ {
774
+ "type": "number"
775
+ },
776
+ {
777
+ "type": "null"
778
+ }
779
+ ]
780
+ },
781
+ "cancelled": {
782
+ "anyOf": [
783
+ {
784
+ "type": "number"
785
+ },
786
+ {
787
+ "type": "null"
788
+ }
789
+ ]
790
+ },
791
+ "oldestAvailableAt": {
792
+ "type": "string"
793
+ },
794
+ "due": {
795
+ "anyOf": [
796
+ {
797
+ "type": "number"
798
+ },
799
+ {
800
+ "type": "null"
801
+ }
802
+ ]
803
+ },
804
+ "scheduled": {
805
+ "anyOf": [
806
+ {
807
+ "type": "number"
808
+ },
809
+ {
810
+ "type": "null"
811
+ }
812
+ ]
813
+ },
814
+ "expiredLeases": {
815
+ "anyOf": [
816
+ {
817
+ "type": "number"
818
+ },
819
+ {
820
+ "type": "null"
821
+ }
822
+ ]
823
+ },
824
+ "oldestDueAt": {
825
+ "type": "string"
826
+ },
827
+ "queueLagMs": {
828
+ "anyOf": [
829
+ {
830
+ "type": "number"
831
+ },
832
+ {
833
+ "type": "null"
834
+ }
835
+ ]
836
+ },
837
+ "principal": {
838
+ "type": "object",
839
+ "required": [
840
+ "workspace",
841
+ "agent"
842
+ ],
843
+ "properties": {
844
+ "workspace": {
845
+ "type": "string"
846
+ },
847
+ "agent": {
848
+ "type": "string"
849
+ }
850
+ },
851
+ "additionalProperties": true
852
+ },
853
+ "remoteReachable": {
854
+ "anyOf": [
855
+ {
856
+ "type": "boolean"
857
+ },
858
+ {
859
+ "type": "null"
860
+ }
861
+ ]
862
+ },
863
+ "outboxPending": {
864
+ "type": "number"
865
+ },
866
+ "outboxBlocked": {
867
+ "type": "number"
868
+ },
869
+ "cachedMessages": {
870
+ "type": "number"
871
+ },
872
+ "lastSyncAt": {
873
+ "type": "string"
874
+ },
875
+ "lastSyncError": {
876
+ "type": "string"
877
+ },
878
+ "outboxDue": {
879
+ "type": "number"
880
+ },
881
+ "outboxScheduled": {
882
+ "type": "number"
883
+ },
884
+ "outboxLeased": {
885
+ "type": "number"
886
+ },
887
+ "outboxOldestDueAt": {
888
+ "type": "string"
889
+ },
890
+ "outboxQueueLagMs": {
891
+ "type": "number"
892
+ },
893
+ "outboxOldestBlockedAt": {
894
+ "type": "string"
895
+ },
896
+ "outboxBlockedAgeMs": {
897
+ "anyOf": [
898
+ {
899
+ "type": "number"
900
+ },
901
+ {
902
+ "type": "null"
903
+ }
904
+ ]
905
+ },
906
+ "outboxBlockedMaxAttempts": {
907
+ "type": "number"
908
+ },
909
+ "outboxBlockedLastError": {
910
+ "type": "string"
911
+ },
912
+ "outboxNextRetryAt": {
913
+ "type": "string"
914
+ },
915
+ "lastOutboundSyncAt": {
916
+ "type": "string"
917
+ },
918
+ "lastInboundSyncAt": {
919
+ "type": "string"
920
+ },
921
+ "lastSyncAttemptAt": {
922
+ "type": "string"
923
+ },
924
+ "syncLoopState": {
925
+ "enum": [
926
+ "disabled",
927
+ "idle",
928
+ "running",
929
+ "backoff",
930
+ "stopped",
931
+ "failed"
932
+ ]
933
+ },
934
+ "syncLoopError": {
935
+ "type": "string"
936
+ },
937
+ "remoteError": {
938
+ "type": "string"
939
+ }
940
+ },
941
+ "additionalProperties": true
942
+ },
943
+ "checks": {
944
+ "type": "array",
945
+ "items": {
946
+ "type": "object",
947
+ "required": [
948
+ "name",
949
+ "status",
950
+ "message"
951
+ ],
952
+ "properties": {
953
+ "name": {
954
+ "type": "string"
955
+ },
956
+ "status": {
957
+ "enum": [
958
+ "ok",
959
+ "unknown",
960
+ "degraded",
961
+ "failed"
962
+ ]
963
+ },
964
+ "message": {
965
+ "type": "string"
966
+ }
967
+ },
968
+ "additionalProperties": false
969
+ }
970
+ }
971
+ },
972
+ "additionalProperties": true
973
+ },
974
+ "client_statusCliResponse": {
975
+ "type": "object",
976
+ "required": [
977
+ "status",
978
+ "localHealthy",
979
+ "connected",
980
+ "remoteReachable",
981
+ "provider",
982
+ "workspace",
983
+ "agent",
984
+ "instance",
985
+ "schemaVersion",
986
+ "endpoint",
987
+ "database",
988
+ "cursorPath",
989
+ "lastCursor",
990
+ "queue",
991
+ "checks"
992
+ ],
993
+ "properties": {
994
+ "status": {
995
+ "enum": [
996
+ "ok",
997
+ "unknown",
998
+ "degraded",
999
+ "failed"
1000
+ ]
1001
+ },
1002
+ "localHealthy": {
1003
+ "type": "boolean"
1004
+ },
1005
+ "connected": {
1006
+ "type": "boolean"
1007
+ },
1008
+ "remoteReachable": {
1009
+ "anyOf": [
1010
+ {
1011
+ "type": "boolean"
1012
+ },
1013
+ {
1014
+ "type": "null"
1015
+ }
1016
+ ]
1017
+ },
1018
+ "provider": {
1019
+ "enum": [
1020
+ "local",
1021
+ "gateway",
1022
+ "legacy-supabase"
1023
+ ]
1024
+ },
1025
+ "workspace": {
1026
+ "type": "string"
1027
+ },
1028
+ "agent": {
1029
+ "type": "string"
1030
+ },
1031
+ "instance": {
1032
+ "anyOf": [
1033
+ {
1034
+ "type": "string"
1035
+ },
1036
+ {
1037
+ "type": "null"
1038
+ }
1039
+ ]
1040
+ },
1041
+ "schemaVersion": {
1042
+ "enum": [
1043
+ "local-v2",
1044
+ "postgres-v2",
1045
+ "legacy-v1"
1046
+ ]
1047
+ },
1048
+ "endpoint": {
1049
+ "anyOf": [
1050
+ {
1051
+ "type": "string"
1052
+ },
1053
+ {
1054
+ "type": "null"
1055
+ }
1056
+ ]
1057
+ },
1058
+ "database": {
1059
+ "anyOf": [
1060
+ {
1061
+ "type": "string"
1062
+ },
1063
+ {
1064
+ "type": "null"
1065
+ }
1066
+ ]
1067
+ },
1068
+ "cursorPath": {
1069
+ "type": "string"
1070
+ },
1071
+ "lastCursor": {
1072
+ "anyOf": [
1073
+ {
1074
+ "type": "string"
1075
+ },
1076
+ {
1077
+ "type": "null"
1078
+ }
1079
+ ]
1080
+ },
1081
+ "queue": {
1082
+ "type": "object",
1083
+ "required": [
1084
+ "schemaVersion",
1085
+ "deliverySupported",
1086
+ "pending",
1087
+ "claimed",
1088
+ "retrying",
1089
+ "dead"
1090
+ ],
1091
+ "properties": {
1092
+ "schemaVersion": {
1093
+ "enum": [
1094
+ "local-v2",
1095
+ "postgres-v2",
1096
+ "legacy-v1"
1097
+ ]
1098
+ },
1099
+ "deliverySupported": {
1100
+ "type": "boolean"
1101
+ },
1102
+ "pending": {
1103
+ "anyOf": [
1104
+ {
1105
+ "type": "number"
1106
+ },
1107
+ {
1108
+ "type": "null"
1109
+ }
1110
+ ]
1111
+ },
1112
+ "claimed": {
1113
+ "anyOf": [
1114
+ {
1115
+ "type": "number"
1116
+ },
1117
+ {
1118
+ "type": "null"
1119
+ }
1120
+ ]
1121
+ },
1122
+ "retrying": {
1123
+ "anyOf": [
1124
+ {
1125
+ "type": "number"
1126
+ },
1127
+ {
1128
+ "type": "null"
1129
+ }
1130
+ ]
1131
+ },
1132
+ "dead": {
1133
+ "anyOf": [
1134
+ {
1135
+ "type": "number"
1136
+ },
1137
+ {
1138
+ "type": "null"
1139
+ }
1140
+ ]
1141
+ },
1142
+ "cancelled": {
1143
+ "anyOf": [
1144
+ {
1145
+ "type": "number"
1146
+ },
1147
+ {
1148
+ "type": "null"
1149
+ }
1150
+ ]
1151
+ },
1152
+ "oldestAvailableAt": {
1153
+ "type": "string"
1154
+ },
1155
+ "due": {
1156
+ "anyOf": [
1157
+ {
1158
+ "type": "number"
1159
+ },
1160
+ {
1161
+ "type": "null"
1162
+ }
1163
+ ]
1164
+ },
1165
+ "scheduled": {
1166
+ "anyOf": [
1167
+ {
1168
+ "type": "number"
1169
+ },
1170
+ {
1171
+ "type": "null"
1172
+ }
1173
+ ]
1174
+ },
1175
+ "expiredLeases": {
1176
+ "anyOf": [
1177
+ {
1178
+ "type": "number"
1179
+ },
1180
+ {
1181
+ "type": "null"
1182
+ }
1183
+ ]
1184
+ },
1185
+ "oldestDueAt": {
1186
+ "type": "string"
1187
+ },
1188
+ "queueLagMs": {
1189
+ "anyOf": [
1190
+ {
1191
+ "type": "number"
1192
+ },
1193
+ {
1194
+ "type": "null"
1195
+ }
1196
+ ]
1197
+ },
1198
+ "principal": {
1199
+ "type": "object",
1200
+ "required": [
1201
+ "workspace",
1202
+ "agent"
1203
+ ],
1204
+ "properties": {
1205
+ "workspace": {
1206
+ "type": "string"
1207
+ },
1208
+ "agent": {
1209
+ "type": "string"
1210
+ }
1211
+ },
1212
+ "additionalProperties": true
1213
+ },
1214
+ "remoteReachable": {
1215
+ "anyOf": [
1216
+ {
1217
+ "type": "boolean"
1218
+ },
1219
+ {
1220
+ "type": "null"
1221
+ }
1222
+ ]
1223
+ },
1224
+ "outboxPending": {
1225
+ "type": "number"
1226
+ },
1227
+ "outboxBlocked": {
1228
+ "type": "number"
1229
+ },
1230
+ "cachedMessages": {
1231
+ "type": "number"
1232
+ },
1233
+ "lastSyncAt": {
1234
+ "type": "string"
1235
+ },
1236
+ "lastSyncError": {
1237
+ "type": "string"
1238
+ },
1239
+ "outboxDue": {
1240
+ "type": "number"
1241
+ },
1242
+ "outboxScheduled": {
1243
+ "type": "number"
1244
+ },
1245
+ "outboxLeased": {
1246
+ "type": "number"
1247
+ },
1248
+ "outboxOldestDueAt": {
1249
+ "type": "string"
1250
+ },
1251
+ "outboxQueueLagMs": {
1252
+ "type": "number"
1253
+ },
1254
+ "outboxOldestBlockedAt": {
1255
+ "type": "string"
1256
+ },
1257
+ "outboxBlockedAgeMs": {
1258
+ "anyOf": [
1259
+ {
1260
+ "type": "number"
1261
+ },
1262
+ {
1263
+ "type": "null"
1264
+ }
1265
+ ]
1266
+ },
1267
+ "outboxBlockedMaxAttempts": {
1268
+ "type": "number"
1269
+ },
1270
+ "outboxBlockedLastError": {
1271
+ "type": "string"
1272
+ },
1273
+ "outboxNextRetryAt": {
1274
+ "type": "string"
1275
+ },
1276
+ "lastOutboundSyncAt": {
1277
+ "type": "string"
1278
+ },
1279
+ "lastInboundSyncAt": {
1280
+ "type": "string"
1281
+ },
1282
+ "lastSyncAttemptAt": {
1283
+ "type": "string"
1284
+ },
1285
+ "syncLoopState": {
1286
+ "enum": [
1287
+ "disabled",
1288
+ "idle",
1289
+ "running",
1290
+ "backoff",
1291
+ "stopped",
1292
+ "failed"
1293
+ ]
1294
+ },
1295
+ "syncLoopError": {
1296
+ "type": "string"
1297
+ },
1298
+ "remoteError": {
1299
+ "type": "string"
1300
+ }
1301
+ },
1302
+ "additionalProperties": true
1303
+ },
1304
+ "checks": {
1305
+ "type": "array",
1306
+ "items": {
1307
+ "type": "object",
1308
+ "required": [
1309
+ "name",
1310
+ "status",
1311
+ "message"
1312
+ ],
1313
+ "properties": {
1314
+ "name": {
1315
+ "type": "string"
1316
+ },
1317
+ "status": {
1318
+ "enum": [
1319
+ "ok",
1320
+ "unknown",
1321
+ "degraded",
1322
+ "failed"
1323
+ ]
1324
+ },
1325
+ "message": {
1326
+ "type": "string"
1327
+ }
1328
+ },
1329
+ "additionalProperties": false
1330
+ }
1331
+ }
1332
+ },
1333
+ "additionalProperties": true
1334
+ },
1335
+ "gateway_metricsRequest": {
1336
+ "type": "object",
1337
+ "properties": {},
1338
+ "additionalProperties": false
1339
+ },
1340
+ "gateway_metricsResponse": {
1341
+ "type": "string"
1342
+ },
1343
+ "publish_messageRequest": {
1344
+ "type": "object",
1345
+ "required": [
1346
+ "type",
1347
+ "content"
1348
+ ],
1349
+ "properties": {
1350
+ "id": {
1351
+ "type": "string",
1352
+ "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-7[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
1353
+ },
1354
+ "source": {
1355
+ "type": "string"
1356
+ },
1357
+ "project": {
1358
+ "type": "string"
1359
+ },
1360
+ "type": {
1361
+ "type": "string"
1362
+ },
1363
+ "content": {
1364
+ "type": "string"
1365
+ },
1366
+ "contentType": {
1367
+ "type": "string"
1368
+ },
1369
+ "data": {},
1370
+ "targets": {
1371
+ "type": "array",
1372
+ "items": {
1373
+ "type": "string"
1374
+ }
1375
+ },
1376
+ "threadId": {
1377
+ "type": "string"
1378
+ },
1379
+ "replyToId": {
1380
+ "type": "string"
1381
+ },
1382
+ "correlationId": {
1383
+ "type": "string"
1384
+ },
1385
+ "causationId": {
1386
+ "type": "string"
1387
+ },
1388
+ "priority": {
1389
+ "enum": [
1390
+ "info",
1391
+ "high",
1392
+ "urgent"
1393
+ ]
1394
+ },
1395
+ "expiresAt": {
1396
+ "type": "string"
1397
+ },
1398
+ "idempotencyKey": {
1399
+ "type": "string"
1400
+ },
1401
+ "atribReceiptId": {
1402
+ "type": "string"
1403
+ },
1404
+ "informedBy": {
1405
+ "type": "array",
1406
+ "items": {
1407
+ "type": "string"
1408
+ }
1409
+ },
1410
+ "metadata": {},
1411
+ "deliveryPolicy": {
1412
+ "type": "object",
1413
+ "properties": {
1414
+ "mode": {
1415
+ "enum": [
1416
+ "mailbox",
1417
+ "leased"
1418
+ ]
1419
+ },
1420
+ "maxAttempts": {
1421
+ "type": "number"
1422
+ },
1423
+ "retryBaseDelayMs": {
1424
+ "type": "number"
1425
+ },
1426
+ "retryMaxDelayMs": {
1427
+ "type": "number"
1428
+ },
1429
+ "retryJitterRatio": {
1430
+ "type": "number"
1431
+ },
1432
+ "notBefore": {
1433
+ "type": "string"
1434
+ }
1435
+ },
1436
+ "additionalProperties": false
1437
+ }
1438
+ },
1439
+ "additionalProperties": false
1440
+ },
1441
+ "publish_messageResponse": {
1442
+ "type": "object",
1443
+ "required": [
1444
+ "created",
1445
+ "message"
1446
+ ],
1447
+ "properties": {
1448
+ "created": {
1449
+ "type": "boolean"
1450
+ },
1451
+ "message": {
1452
+ "type": "object",
1453
+ "required": [
1454
+ "id",
1455
+ "workspace",
1456
+ "source",
1457
+ "type",
1458
+ "content",
1459
+ "contentType",
1460
+ "sequence",
1461
+ "createdAt",
1462
+ "targets",
1463
+ "priority",
1464
+ "deliveryPolicy"
1465
+ ],
1466
+ "properties": {
1467
+ "id": {
1468
+ "type": "string"
1469
+ },
1470
+ "workspace": {
1471
+ "type": "string"
1472
+ },
1473
+ "project": {
1474
+ "type": "string"
1475
+ },
1476
+ "source": {
1477
+ "type": "string"
1478
+ },
1479
+ "type": {
1480
+ "type": "string"
1481
+ },
1482
+ "content": {
1483
+ "type": "string"
1484
+ },
1485
+ "contentType": {
1486
+ "type": "string"
1487
+ },
1488
+ "sequence": {
1489
+ "type": "string"
1490
+ },
1491
+ "createdAt": {
1492
+ "type": "string"
1493
+ },
1494
+ "data": {},
1495
+ "targets": {
1496
+ "type": "array",
1497
+ "items": {
1498
+ "type": "string"
1499
+ }
1500
+ },
1501
+ "threadId": {
1502
+ "type": "string"
1503
+ },
1504
+ "replyToId": {
1505
+ "type": "string"
1506
+ },
1507
+ "correlationId": {
1508
+ "type": "string"
1509
+ },
1510
+ "causationId": {
1511
+ "type": "string"
1512
+ },
1513
+ "priority": {
1514
+ "enum": [
1515
+ "info",
1516
+ "high",
1517
+ "urgent"
1518
+ ]
1519
+ },
1520
+ "expiresAt": {
1521
+ "type": "string"
1522
+ },
1523
+ "idempotencyKey": {
1524
+ "type": "string"
1525
+ },
1526
+ "atribReceiptId": {
1527
+ "type": "string"
1528
+ },
1529
+ "informedBy": {
1530
+ "type": "array",
1531
+ "items": {
1532
+ "type": "string"
1533
+ }
1534
+ },
1535
+ "metadata": {},
1536
+ "deliveryPolicy": {
1537
+ "anyOf": [
1538
+ {
1539
+ "type": "object",
1540
+ "required": [
1541
+ "mode"
1542
+ ],
1543
+ "properties": {
1544
+ "mode": {
1545
+ "type": "string",
1546
+ "const": "mailbox"
1547
+ }
1548
+ },
1549
+ "additionalProperties": false
1550
+ },
1551
+ {
1552
+ "type": "object",
1553
+ "required": [
1554
+ "mode",
1555
+ "maxAttempts",
1556
+ "retryBaseDelayMs",
1557
+ "retryMaxDelayMs",
1558
+ "retryJitterRatio"
1559
+ ],
1560
+ "properties": {
1561
+ "mode": {
1562
+ "type": "string",
1563
+ "const": "leased"
1564
+ },
1565
+ "maxAttempts": {
1566
+ "type": "number"
1567
+ },
1568
+ "retryBaseDelayMs": {
1569
+ "type": "number"
1570
+ },
1571
+ "retryMaxDelayMs": {
1572
+ "type": "number"
1573
+ },
1574
+ "retryJitterRatio": {
1575
+ "type": "number"
1576
+ },
1577
+ "notBefore": {
1578
+ "type": "string"
1579
+ }
1580
+ },
1581
+ "additionalProperties": false
1582
+ }
1583
+ ]
1584
+ }
1585
+ },
1586
+ "additionalProperties": true
1587
+ },
1588
+ "disposition": {
1589
+ "enum": [
1590
+ "committed",
1591
+ "queued"
1592
+ ]
1593
+ },
1594
+ "authoritative": {
1595
+ "type": "boolean"
1596
+ }
1597
+ },
1598
+ "additionalProperties": true
1599
+ },
1600
+ "publish_messageCliResponse": {
1601
+ "type": "object",
1602
+ "required": [
1603
+ "created",
1604
+ "message"
1605
+ ],
1606
+ "properties": {
1607
+ "created": {
1608
+ "type": "boolean"
1609
+ },
1610
+ "message": {
1611
+ "type": "object",
1612
+ "required": [
1613
+ "id",
1614
+ "workspace",
1615
+ "source",
1616
+ "type",
1617
+ "content",
1618
+ "contentType",
1619
+ "sequence",
1620
+ "createdAt",
1621
+ "targets",
1622
+ "priority",
1623
+ "deliveryPolicy"
1624
+ ],
1625
+ "properties": {
1626
+ "id": {
1627
+ "type": "string"
1628
+ },
1629
+ "workspace": {
1630
+ "type": "string"
1631
+ },
1632
+ "project": {
1633
+ "type": "string"
1634
+ },
1635
+ "source": {
1636
+ "type": "string"
1637
+ },
1638
+ "type": {
1639
+ "type": "string"
1640
+ },
1641
+ "content": {
1642
+ "type": "string"
1643
+ },
1644
+ "contentType": {
1645
+ "type": "string"
1646
+ },
1647
+ "sequence": {
1648
+ "type": "string"
1649
+ },
1650
+ "createdAt": {
1651
+ "type": "string"
1652
+ },
1653
+ "data": {},
1654
+ "targets": {
1655
+ "type": "array",
1656
+ "items": {
1657
+ "type": "string"
1658
+ }
1659
+ },
1660
+ "threadId": {
1661
+ "type": "string"
1662
+ },
1663
+ "replyToId": {
1664
+ "type": "string"
1665
+ },
1666
+ "correlationId": {
1667
+ "type": "string"
1668
+ },
1669
+ "causationId": {
1670
+ "type": "string"
1671
+ },
1672
+ "priority": {
1673
+ "enum": [
1674
+ "info",
1675
+ "high",
1676
+ "urgent"
1677
+ ]
1678
+ },
1679
+ "expiresAt": {
1680
+ "type": "string"
1681
+ },
1682
+ "idempotencyKey": {
1683
+ "type": "string"
1684
+ },
1685
+ "atribReceiptId": {
1686
+ "type": "string"
1687
+ },
1688
+ "informedBy": {
1689
+ "type": "array",
1690
+ "items": {
1691
+ "type": "string"
1692
+ }
1693
+ },
1694
+ "metadata": {},
1695
+ "deliveryPolicy": {
1696
+ "anyOf": [
1697
+ {
1698
+ "type": "object",
1699
+ "required": [
1700
+ "mode"
1701
+ ],
1702
+ "properties": {
1703
+ "mode": {
1704
+ "type": "string",
1705
+ "const": "mailbox"
1706
+ }
1707
+ },
1708
+ "additionalProperties": false
1709
+ },
1710
+ {
1711
+ "type": "object",
1712
+ "required": [
1713
+ "mode",
1714
+ "maxAttempts",
1715
+ "retryBaseDelayMs",
1716
+ "retryMaxDelayMs",
1717
+ "retryJitterRatio"
1718
+ ],
1719
+ "properties": {
1720
+ "mode": {
1721
+ "type": "string",
1722
+ "const": "leased"
1723
+ },
1724
+ "maxAttempts": {
1725
+ "type": "number"
1726
+ },
1727
+ "retryBaseDelayMs": {
1728
+ "type": "number"
1729
+ },
1730
+ "retryMaxDelayMs": {
1731
+ "type": "number"
1732
+ },
1733
+ "retryJitterRatio": {
1734
+ "type": "number"
1735
+ },
1736
+ "notBefore": {
1737
+ "type": "string"
1738
+ }
1739
+ },
1740
+ "additionalProperties": false
1741
+ }
1742
+ ]
1743
+ }
1744
+ },
1745
+ "additionalProperties": true
1746
+ },
1747
+ "disposition": {
1748
+ "enum": [
1749
+ "committed",
1750
+ "queued"
1751
+ ]
1752
+ },
1753
+ "authoritative": {
1754
+ "type": "boolean"
1755
+ }
1756
+ },
1757
+ "additionalProperties": true
1758
+ },
1759
+ "historyRequest": {
1760
+ "type": "object",
1761
+ "properties": {
1762
+ "cursor": {
1763
+ "type": "string"
1764
+ },
1765
+ "limit": {
1766
+ "type": "number",
1767
+ "minimum": 1,
1768
+ "maximum": 200
1769
+ },
1770
+ "types": {
1771
+ "type": "array",
1772
+ "items": {
1773
+ "type": "string"
1774
+ }
1775
+ },
1776
+ "mailbox": {
1777
+ "enum": [
1778
+ "inbox",
1779
+ "sent",
1780
+ "all"
1781
+ ]
1782
+ },
1783
+ "receiptState": {
1784
+ "enum": [
1785
+ "any",
1786
+ "unread",
1787
+ "read"
1788
+ ]
1789
+ },
1790
+ "includeExpired": {
1791
+ "type": "boolean"
1792
+ },
1793
+ "source": {
1794
+ "type": "string"
1795
+ },
1796
+ "project": {
1797
+ "type": "string"
1798
+ },
1799
+ "since": {
1800
+ "type": "string"
1801
+ },
1802
+ "unacknowledgedBy": {
1803
+ "type": "string"
1804
+ },
1805
+ "threadId": {
1806
+ "type": "string"
1807
+ },
1808
+ "latest": {
1809
+ "type": "boolean"
1810
+ }
1811
+ },
1812
+ "additionalProperties": false
1813
+ },
1814
+ "historyResponse": {
1815
+ "type": "object",
1816
+ "required": [
1817
+ "messages"
1818
+ ],
1819
+ "properties": {
1820
+ "messages": {
1821
+ "type": "array",
1822
+ "items": {
1823
+ "type": "object",
1824
+ "required": [
1825
+ "id",
1826
+ "workspace",
1827
+ "source",
1828
+ "type",
1829
+ "content",
1830
+ "contentType",
1831
+ "sequence",
1832
+ "createdAt",
1833
+ "targets",
1834
+ "priority",
1835
+ "deliveryPolicy"
1836
+ ],
1837
+ "properties": {
1838
+ "id": {
1839
+ "type": "string"
1840
+ },
1841
+ "workspace": {
1842
+ "type": "string"
1843
+ },
1844
+ "project": {
1845
+ "type": "string"
1846
+ },
1847
+ "source": {
1848
+ "type": "string"
1849
+ },
1850
+ "type": {
1851
+ "type": "string"
1852
+ },
1853
+ "content": {
1854
+ "type": "string"
1855
+ },
1856
+ "contentType": {
1857
+ "type": "string"
1858
+ },
1859
+ "sequence": {
1860
+ "type": "string"
1861
+ },
1862
+ "createdAt": {
1863
+ "type": "string"
1864
+ },
1865
+ "data": {},
1866
+ "targets": {
1867
+ "type": "array",
1868
+ "items": {
1869
+ "type": "string"
1870
+ }
1871
+ },
1872
+ "threadId": {
1873
+ "type": "string"
1874
+ },
1875
+ "replyToId": {
1876
+ "type": "string"
1877
+ },
1878
+ "correlationId": {
1879
+ "type": "string"
1880
+ },
1881
+ "causationId": {
1882
+ "type": "string"
1883
+ },
1884
+ "priority": {
1885
+ "enum": [
1886
+ "info",
1887
+ "high",
1888
+ "urgent"
1889
+ ]
1890
+ },
1891
+ "expiresAt": {
1892
+ "type": "string"
1893
+ },
1894
+ "idempotencyKey": {
1895
+ "type": "string"
1896
+ },
1897
+ "atribReceiptId": {
1898
+ "type": "string"
1899
+ },
1900
+ "informedBy": {
1901
+ "type": "array",
1902
+ "items": {
1903
+ "type": "string"
1904
+ }
1905
+ },
1906
+ "metadata": {},
1907
+ "deliveryPolicy": {
1908
+ "anyOf": [
1909
+ {
1910
+ "type": "object",
1911
+ "required": [
1912
+ "mode"
1913
+ ],
1914
+ "properties": {
1915
+ "mode": {
1916
+ "type": "string",
1917
+ "const": "mailbox"
1918
+ }
1919
+ },
1920
+ "additionalProperties": false
1921
+ },
1922
+ {
1923
+ "type": "object",
1924
+ "required": [
1925
+ "mode",
1926
+ "maxAttempts",
1927
+ "retryBaseDelayMs",
1928
+ "retryMaxDelayMs",
1929
+ "retryJitterRatio"
1930
+ ],
1931
+ "properties": {
1932
+ "mode": {
1933
+ "type": "string",
1934
+ "const": "leased"
1935
+ },
1936
+ "maxAttempts": {
1937
+ "type": "number"
1938
+ },
1939
+ "retryBaseDelayMs": {
1940
+ "type": "number"
1941
+ },
1942
+ "retryMaxDelayMs": {
1943
+ "type": "number"
1944
+ },
1945
+ "retryJitterRatio": {
1946
+ "type": "number"
1947
+ },
1948
+ "notBefore": {
1949
+ "type": "string"
1950
+ }
1951
+ },
1952
+ "additionalProperties": false
1953
+ }
1954
+ ]
1955
+ }
1956
+ },
1957
+ "additionalProperties": true
1958
+ }
1959
+ },
1960
+ "cursor": {
1961
+ "type": "string"
1962
+ },
1963
+ "source": {
1964
+ "enum": [
1965
+ "remote",
1966
+ "cache"
1967
+ ]
1968
+ },
1969
+ "stale": {
1970
+ "type": "boolean"
1971
+ },
1972
+ "degraded": {
1973
+ "type": "boolean"
1974
+ },
1975
+ "acknowledgements": {
1976
+ "enum": [
1977
+ "authoritative",
1978
+ "unknown"
1979
+ ]
1980
+ },
1981
+ "lastSyncedAt": {
1982
+ "type": "string"
1983
+ }
1984
+ },
1985
+ "additionalProperties": true
1986
+ },
1987
+ "historyCliResponse": {
1988
+ "type": "object",
1989
+ "required": [
1990
+ "messages"
1991
+ ],
1992
+ "properties": {
1993
+ "messages": {
1994
+ "type": "array",
1995
+ "items": {
1996
+ "type": "object",
1997
+ "required": [
1998
+ "id",
1999
+ "workspace",
2000
+ "source",
2001
+ "type",
2002
+ "content",
2003
+ "contentType",
2004
+ "sequence",
2005
+ "createdAt",
2006
+ "targets",
2007
+ "priority",
2008
+ "deliveryPolicy"
2009
+ ],
2010
+ "properties": {
2011
+ "id": {
2012
+ "type": "string"
2013
+ },
2014
+ "workspace": {
2015
+ "type": "string"
2016
+ },
2017
+ "project": {
2018
+ "type": "string"
2019
+ },
2020
+ "source": {
2021
+ "type": "string"
2022
+ },
2023
+ "type": {
2024
+ "type": "string"
2025
+ },
2026
+ "content": {
2027
+ "type": "string"
2028
+ },
2029
+ "contentType": {
2030
+ "type": "string"
2031
+ },
2032
+ "sequence": {
2033
+ "type": "string"
2034
+ },
2035
+ "createdAt": {
2036
+ "type": "string"
2037
+ },
2038
+ "data": {},
2039
+ "targets": {
2040
+ "type": "array",
2041
+ "items": {
2042
+ "type": "string"
2043
+ }
2044
+ },
2045
+ "threadId": {
2046
+ "type": "string"
2047
+ },
2048
+ "replyToId": {
2049
+ "type": "string"
2050
+ },
2051
+ "correlationId": {
2052
+ "type": "string"
2053
+ },
2054
+ "causationId": {
2055
+ "type": "string"
2056
+ },
2057
+ "priority": {
2058
+ "enum": [
2059
+ "info",
2060
+ "high",
2061
+ "urgent"
2062
+ ]
2063
+ },
2064
+ "expiresAt": {
2065
+ "type": "string"
2066
+ },
2067
+ "idempotencyKey": {
2068
+ "type": "string"
2069
+ },
2070
+ "atribReceiptId": {
2071
+ "type": "string"
2072
+ },
2073
+ "informedBy": {
2074
+ "type": "array",
2075
+ "items": {
2076
+ "type": "string"
2077
+ }
2078
+ },
2079
+ "metadata": {},
2080
+ "deliveryPolicy": {
2081
+ "anyOf": [
2082
+ {
2083
+ "type": "object",
2084
+ "required": [
2085
+ "mode"
2086
+ ],
2087
+ "properties": {
2088
+ "mode": {
2089
+ "type": "string",
2090
+ "const": "mailbox"
2091
+ }
2092
+ },
2093
+ "additionalProperties": false
2094
+ },
2095
+ {
2096
+ "type": "object",
2097
+ "required": [
2098
+ "mode",
2099
+ "maxAttempts",
2100
+ "retryBaseDelayMs",
2101
+ "retryMaxDelayMs",
2102
+ "retryJitterRatio"
2103
+ ],
2104
+ "properties": {
2105
+ "mode": {
2106
+ "type": "string",
2107
+ "const": "leased"
2108
+ },
2109
+ "maxAttempts": {
2110
+ "type": "number"
2111
+ },
2112
+ "retryBaseDelayMs": {
2113
+ "type": "number"
2114
+ },
2115
+ "retryMaxDelayMs": {
2116
+ "type": "number"
2117
+ },
2118
+ "retryJitterRatio": {
2119
+ "type": "number"
2120
+ },
2121
+ "notBefore": {
2122
+ "type": "string"
2123
+ }
2124
+ },
2125
+ "additionalProperties": false
2126
+ }
2127
+ ]
2128
+ }
2129
+ },
2130
+ "additionalProperties": true
2131
+ }
2132
+ },
2133
+ "cursor": {
2134
+ "type": "string"
2135
+ },
2136
+ "source": {
2137
+ "enum": [
2138
+ "remote",
2139
+ "cache"
2140
+ ]
2141
+ },
2142
+ "stale": {
2143
+ "type": "boolean"
2144
+ },
2145
+ "degraded": {
2146
+ "type": "boolean"
2147
+ },
2148
+ "acknowledgements": {
2149
+ "enum": [
2150
+ "authoritative",
2151
+ "unknown"
2152
+ ]
2153
+ },
2154
+ "lastSyncedAt": {
2155
+ "type": "string"
2156
+ }
2157
+ },
2158
+ "additionalProperties": true
2159
+ },
2160
+ "historyCliVariantGetResponse": {
2161
+ "type": "array",
2162
+ "items": {
2163
+ "type": "object",
2164
+ "required": [
2165
+ "id",
2166
+ "source",
2167
+ "category",
2168
+ "content",
2169
+ "priority",
2170
+ "project",
2171
+ "metadata",
2172
+ "created_at"
2173
+ ],
2174
+ "properties": {
2175
+ "id": {
2176
+ "anyOf": [
2177
+ {
2178
+ "type": "string"
2179
+ },
2180
+ {
2181
+ "type": "number"
2182
+ }
2183
+ ]
2184
+ },
2185
+ "source": {
2186
+ "type": "string"
2187
+ },
2188
+ "category": {
2189
+ "type": "string"
2190
+ },
2191
+ "content": {
2192
+ "type": "string"
2193
+ },
2194
+ "priority": {
2195
+ "enum": [
2196
+ "info",
2197
+ "high",
2198
+ "urgent"
2199
+ ]
2200
+ },
2201
+ "project": {
2202
+ "anyOf": [
2203
+ {
2204
+ "type": "string"
2205
+ },
2206
+ {
2207
+ "type": "null"
2208
+ }
2209
+ ]
2210
+ },
2211
+ "metadata": {},
2212
+ "created_at": {
2213
+ "type": "string"
2214
+ }
2215
+ },
2216
+ "additionalProperties": false
2217
+ }
2218
+ },
2219
+ "record_receiptRequest": {
2220
+ "type": "object",
2221
+ "required": [
2222
+ "messageIds"
2223
+ ],
2224
+ "properties": {
2225
+ "messageIds": {
2226
+ "type": "array",
2227
+ "items": {
2228
+ "type": "string"
2229
+ },
2230
+ "minItems": 1,
2231
+ "maxItems": 200
2232
+ }
2233
+ },
2234
+ "additionalProperties": false
2235
+ },
2236
+ "record_receiptResponse": {
2237
+ "type": "object",
2238
+ "required": [
2239
+ "recorded"
2240
+ ],
2241
+ "properties": {
2242
+ "recorded": {
2243
+ "type": "number"
2244
+ }
2245
+ },
2246
+ "additionalProperties": true
2247
+ },
2248
+ "record_receiptCliResponse": {
2249
+ "type": "object",
2250
+ "required": [
2251
+ "acknowledged",
2252
+ "agent"
2253
+ ],
2254
+ "properties": {
2255
+ "acknowledged": {
2256
+ "type": "number"
2257
+ },
2258
+ "agent": {
2259
+ "type": "string"
2260
+ }
2261
+ },
2262
+ "additionalProperties": true
2263
+ },
2264
+ "record_receiptCliVariantAckResponse": {
2265
+ "type": "object",
2266
+ "required": [
2267
+ "acknowledged",
2268
+ "agent"
2269
+ ],
2270
+ "properties": {
2271
+ "acknowledged": {
2272
+ "type": "number"
2273
+ },
2274
+ "agent": {
2275
+ "type": "string"
2276
+ }
2277
+ },
2278
+ "additionalProperties": true
2279
+ },
2280
+ "claim_deliveryRequest": {
2281
+ "type": "object",
2282
+ "properties": {
2283
+ "leaseMs": {
2284
+ "type": "number"
2285
+ },
2286
+ "maxAttempts": {
2287
+ "type": "number"
2288
+ }
2289
+ },
2290
+ "additionalProperties": false
2291
+ },
2292
+ "claim_deliveryResponse": {
2293
+ "type": "object",
2294
+ "required": [
2295
+ "delivery"
2296
+ ],
2297
+ "properties": {
2298
+ "delivery": {
2299
+ "anyOf": [
2300
+ {
2301
+ "type": "object",
2302
+ "required": [
2303
+ "id",
2304
+ "messageId",
2305
+ "workspace",
2306
+ "recipient",
2307
+ "state",
2308
+ "attempt",
2309
+ "cycleAttempt",
2310
+ "requeueCount",
2311
+ "createdAt",
2312
+ "priorityRank",
2313
+ "availableAt",
2314
+ "lastAction"
2315
+ ],
2316
+ "properties": {
2317
+ "id": {
2318
+ "type": "string"
2319
+ },
2320
+ "messageId": {
2321
+ "type": "string"
2322
+ },
2323
+ "workspace": {
2324
+ "type": "string"
2325
+ },
2326
+ "recipient": {
2327
+ "type": "string"
2328
+ },
2329
+ "state": {
2330
+ "enum": [
2331
+ "pending",
2332
+ "claimed",
2333
+ "acked",
2334
+ "retrying",
2335
+ "dead",
2336
+ "cancelled"
2337
+ ]
2338
+ },
2339
+ "attempt": {
2340
+ "type": "number"
2341
+ },
2342
+ "cycleAttempt": {
2343
+ "type": "number"
2344
+ },
2345
+ "requeueCount": {
2346
+ "type": "number"
2347
+ },
2348
+ "createdAt": {
2349
+ "type": "string"
2350
+ },
2351
+ "priorityRank": {
2352
+ "type": "number"
2353
+ },
2354
+ "availableAt": {
2355
+ "type": "string"
2356
+ },
2357
+ "leaseToken": {
2358
+ "type": "string"
2359
+ },
2360
+ "leaseOwner": {
2361
+ "type": "string"
2362
+ },
2363
+ "leaseExpiresAt": {
2364
+ "type": "string"
2365
+ },
2366
+ "lastError": {
2367
+ "type": "string"
2368
+ },
2369
+ "lastActor": {
2370
+ "type": "string"
2371
+ },
2372
+ "lastAction": {
2373
+ "enum": [
2374
+ "created",
2375
+ "claim",
2376
+ "ack",
2377
+ "nack_retry",
2378
+ "nack_dead",
2379
+ "lease_expired",
2380
+ "attempts_exhausted",
2381
+ "message_expired",
2382
+ "cancel",
2383
+ "requeue"
2384
+ ]
2385
+ }
2386
+ },
2387
+ "additionalProperties": true
2388
+ },
2389
+ {
2390
+ "type": "null"
2391
+ }
2392
+ ]
2393
+ },
2394
+ "leaseToken": {
2395
+ "type": "string"
2396
+ }
2397
+ },
2398
+ "additionalProperties": true,
2399
+ "oneOf": [
2400
+ {
2401
+ "properties": {
2402
+ "delivery": {
2403
+ "type": "null"
2404
+ },
2405
+ "leaseToken": false
2406
+ },
2407
+ "required": [
2408
+ "delivery"
2409
+ ]
2410
+ },
2411
+ {
2412
+ "properties": {
2413
+ "delivery": {
2414
+ "type": "object",
2415
+ "required": [
2416
+ "id",
2417
+ "messageId",
2418
+ "workspace",
2419
+ "recipient",
2420
+ "state",
2421
+ "attempt",
2422
+ "cycleAttempt",
2423
+ "requeueCount",
2424
+ "createdAt",
2425
+ "priorityRank",
2426
+ "availableAt",
2427
+ "lastAction"
2428
+ ],
2429
+ "properties": {
2430
+ "id": {
2431
+ "type": "string"
2432
+ },
2433
+ "messageId": {
2434
+ "type": "string"
2435
+ },
2436
+ "workspace": {
2437
+ "type": "string"
2438
+ },
2439
+ "recipient": {
2440
+ "type": "string"
2441
+ },
2442
+ "state": {
2443
+ "enum": [
2444
+ "pending",
2445
+ "claimed",
2446
+ "acked",
2447
+ "retrying",
2448
+ "dead",
2449
+ "cancelled"
2450
+ ]
2451
+ },
2452
+ "attempt": {
2453
+ "type": "number"
2454
+ },
2455
+ "cycleAttempt": {
2456
+ "type": "number"
2457
+ },
2458
+ "requeueCount": {
2459
+ "type": "number"
2460
+ },
2461
+ "createdAt": {
2462
+ "type": "string"
2463
+ },
2464
+ "priorityRank": {
2465
+ "type": "number"
2466
+ },
2467
+ "availableAt": {
2468
+ "type": "string"
2469
+ },
2470
+ "leaseToken": {
2471
+ "type": "string"
2472
+ },
2473
+ "leaseOwner": {
2474
+ "type": "string"
2475
+ },
2476
+ "leaseExpiresAt": {
2477
+ "type": "string"
2478
+ },
2479
+ "lastError": {
2480
+ "type": "string"
2481
+ },
2482
+ "lastActor": {
2483
+ "type": "string"
2484
+ },
2485
+ "lastAction": {
2486
+ "enum": [
2487
+ "created",
2488
+ "claim",
2489
+ "ack",
2490
+ "nack_retry",
2491
+ "nack_dead",
2492
+ "lease_expired",
2493
+ "attempts_exhausted",
2494
+ "message_expired",
2495
+ "cancel",
2496
+ "requeue"
2497
+ ]
2498
+ }
2499
+ },
2500
+ "additionalProperties": true
2501
+ },
2502
+ "leaseToken": {
2503
+ "type": "string"
2504
+ }
2505
+ },
2506
+ "required": [
2507
+ "delivery",
2508
+ "leaseToken"
2509
+ ]
2510
+ }
2511
+ ]
2512
+ },
2513
+ "claim_deliveryCliResponse": {
2514
+ "anyOf": [
2515
+ {
2516
+ "type": "object",
2517
+ "required": [
2518
+ "delivery",
2519
+ "leaseToken"
2520
+ ],
2521
+ "properties": {
2522
+ "delivery": {
2523
+ "type": "object",
2524
+ "required": [
2525
+ "id",
2526
+ "messageId",
2527
+ "workspace",
2528
+ "recipient",
2529
+ "state",
2530
+ "attempt",
2531
+ "cycleAttempt",
2532
+ "requeueCount",
2533
+ "createdAt",
2534
+ "priorityRank",
2535
+ "availableAt",
2536
+ "lastAction"
2537
+ ],
2538
+ "properties": {
2539
+ "id": {
2540
+ "type": "string"
2541
+ },
2542
+ "messageId": {
2543
+ "type": "string"
2544
+ },
2545
+ "workspace": {
2546
+ "type": "string"
2547
+ },
2548
+ "recipient": {
2549
+ "type": "string"
2550
+ },
2551
+ "state": {
2552
+ "enum": [
2553
+ "pending",
2554
+ "claimed",
2555
+ "acked",
2556
+ "retrying",
2557
+ "dead",
2558
+ "cancelled"
2559
+ ]
2560
+ },
2561
+ "attempt": {
2562
+ "type": "number"
2563
+ },
2564
+ "cycleAttempt": {
2565
+ "type": "number"
2566
+ },
2567
+ "requeueCount": {
2568
+ "type": "number"
2569
+ },
2570
+ "createdAt": {
2571
+ "type": "string"
2572
+ },
2573
+ "priorityRank": {
2574
+ "type": "number"
2575
+ },
2576
+ "availableAt": {
2577
+ "type": "string"
2578
+ },
2579
+ "leaseToken": {
2580
+ "type": "string"
2581
+ },
2582
+ "leaseOwner": {
2583
+ "type": "string"
2584
+ },
2585
+ "leaseExpiresAt": {
2586
+ "type": "string"
2587
+ },
2588
+ "lastError": {
2589
+ "type": "string"
2590
+ },
2591
+ "lastActor": {
2592
+ "type": "string"
2593
+ },
2594
+ "lastAction": {
2595
+ "enum": [
2596
+ "created",
2597
+ "claim",
2598
+ "ack",
2599
+ "nack_retry",
2600
+ "nack_dead",
2601
+ "lease_expired",
2602
+ "attempts_exhausted",
2603
+ "message_expired",
2604
+ "cancel",
2605
+ "requeue"
2606
+ ]
2607
+ }
2608
+ },
2609
+ "additionalProperties": true
2610
+ },
2611
+ "leaseToken": {
2612
+ "type": "string"
2613
+ }
2614
+ },
2615
+ "additionalProperties": true
2616
+ },
2617
+ {
2618
+ "type": "null"
2619
+ }
2620
+ ]
2621
+ },
2622
+ "list_deliveriesRequest": {
2623
+ "type": "object",
2624
+ "properties": {
2625
+ "cursor": {
2626
+ "type": "string"
2627
+ },
2628
+ "limit": {
2629
+ "type": "number"
2630
+ },
2631
+ "role": {
2632
+ "enum": [
2633
+ "recipient",
2634
+ "publisher",
2635
+ "all"
2636
+ ]
2637
+ },
2638
+ "messageId": {
2639
+ "type": "string"
2640
+ },
2641
+ "recipient": {
2642
+ "type": "string"
2643
+ },
2644
+ "states": {
2645
+ "type": "array",
2646
+ "items": {
2647
+ "enum": [
2648
+ "pending",
2649
+ "claimed",
2650
+ "acked",
2651
+ "retrying",
2652
+ "dead",
2653
+ "cancelled"
2654
+ ]
2655
+ }
2656
+ }
2657
+ },
2658
+ "additionalProperties": false
2659
+ },
2660
+ "list_deliveriesResponse": {
2661
+ "type": "object",
2662
+ "required": [
2663
+ "deliveries"
2664
+ ],
2665
+ "properties": {
2666
+ "deliveries": {
2667
+ "type": "array",
2668
+ "items": {
2669
+ "type": "object",
2670
+ "required": [
2671
+ "id",
2672
+ "messageId",
2673
+ "workspace",
2674
+ "recipient",
2675
+ "state",
2676
+ "attempt",
2677
+ "cycleAttempt",
2678
+ "requeueCount",
2679
+ "createdAt",
2680
+ "priorityRank",
2681
+ "availableAt",
2682
+ "lastAction"
2683
+ ],
2684
+ "properties": {
2685
+ "id": {
2686
+ "type": "string"
2687
+ },
2688
+ "messageId": {
2689
+ "type": "string"
2690
+ },
2691
+ "workspace": {
2692
+ "type": "string"
2693
+ },
2694
+ "recipient": {
2695
+ "type": "string"
2696
+ },
2697
+ "state": {
2698
+ "enum": [
2699
+ "pending",
2700
+ "claimed",
2701
+ "acked",
2702
+ "retrying",
2703
+ "dead",
2704
+ "cancelled"
2705
+ ]
2706
+ },
2707
+ "attempt": {
2708
+ "type": "number"
2709
+ },
2710
+ "cycleAttempt": {
2711
+ "type": "number"
2712
+ },
2713
+ "requeueCount": {
2714
+ "type": "number"
2715
+ },
2716
+ "createdAt": {
2717
+ "type": "string"
2718
+ },
2719
+ "priorityRank": {
2720
+ "type": "number"
2721
+ },
2722
+ "availableAt": {
2723
+ "type": "string"
2724
+ },
2725
+ "leaseToken": {
2726
+ "type": "string"
2727
+ },
2728
+ "leaseOwner": {
2729
+ "type": "string"
2730
+ },
2731
+ "leaseExpiresAt": {
2732
+ "type": "string"
2733
+ },
2734
+ "lastError": {
2735
+ "type": "string"
2736
+ },
2737
+ "lastActor": {
2738
+ "type": "string"
2739
+ },
2740
+ "lastAction": {
2741
+ "enum": [
2742
+ "created",
2743
+ "claim",
2744
+ "ack",
2745
+ "nack_retry",
2746
+ "nack_dead",
2747
+ "lease_expired",
2748
+ "attempts_exhausted",
2749
+ "message_expired",
2750
+ "cancel",
2751
+ "requeue"
2752
+ ]
2753
+ }
2754
+ },
2755
+ "additionalProperties": true
2756
+ }
2757
+ },
2758
+ "cursor": {
2759
+ "type": "string"
2760
+ }
2761
+ },
2762
+ "additionalProperties": true
2763
+ },
2764
+ "list_deliveriesCliResponse": {
2765
+ "type": "object",
2766
+ "required": [
2767
+ "deliveries"
2768
+ ],
2769
+ "properties": {
2770
+ "deliveries": {
2771
+ "type": "array",
2772
+ "items": {
2773
+ "type": "object",
2774
+ "required": [
2775
+ "id",
2776
+ "messageId",
2777
+ "workspace",
2778
+ "recipient",
2779
+ "state",
2780
+ "attempt",
2781
+ "cycleAttempt",
2782
+ "requeueCount",
2783
+ "createdAt",
2784
+ "priorityRank",
2785
+ "availableAt",
2786
+ "lastAction"
2787
+ ],
2788
+ "properties": {
2789
+ "id": {
2790
+ "type": "string"
2791
+ },
2792
+ "messageId": {
2793
+ "type": "string"
2794
+ },
2795
+ "workspace": {
2796
+ "type": "string"
2797
+ },
2798
+ "recipient": {
2799
+ "type": "string"
2800
+ },
2801
+ "state": {
2802
+ "enum": [
2803
+ "pending",
2804
+ "claimed",
2805
+ "acked",
2806
+ "retrying",
2807
+ "dead",
2808
+ "cancelled"
2809
+ ]
2810
+ },
2811
+ "attempt": {
2812
+ "type": "number"
2813
+ },
2814
+ "cycleAttempt": {
2815
+ "type": "number"
2816
+ },
2817
+ "requeueCount": {
2818
+ "type": "number"
2819
+ },
2820
+ "createdAt": {
2821
+ "type": "string"
2822
+ },
2823
+ "priorityRank": {
2824
+ "type": "number"
2825
+ },
2826
+ "availableAt": {
2827
+ "type": "string"
2828
+ },
2829
+ "leaseToken": {
2830
+ "type": "string"
2831
+ },
2832
+ "leaseOwner": {
2833
+ "type": "string"
2834
+ },
2835
+ "leaseExpiresAt": {
2836
+ "type": "string"
2837
+ },
2838
+ "lastError": {
2839
+ "type": "string"
2840
+ },
2841
+ "lastActor": {
2842
+ "type": "string"
2843
+ },
2844
+ "lastAction": {
2845
+ "enum": [
2846
+ "created",
2847
+ "claim",
2848
+ "ack",
2849
+ "nack_retry",
2850
+ "nack_dead",
2851
+ "lease_expired",
2852
+ "attempts_exhausted",
2853
+ "message_expired",
2854
+ "cancel",
2855
+ "requeue"
2856
+ ]
2857
+ }
2858
+ },
2859
+ "additionalProperties": true
2860
+ }
2861
+ },
2862
+ "cursor": {
2863
+ "type": "string"
2864
+ }
2865
+ },
2866
+ "additionalProperties": true
2867
+ },
2868
+ "list_delivery_eventsRequest": {
2869
+ "type": "object",
2870
+ "required": [
2871
+ "deliveryId"
2872
+ ],
2873
+ "properties": {
2874
+ "deliveryId": {
2875
+ "type": "string"
2876
+ },
2877
+ "cursor": {
2878
+ "type": "string"
2879
+ },
2880
+ "limit": {
2881
+ "type": "number"
2882
+ }
2883
+ },
2884
+ "additionalProperties": false
2885
+ },
2886
+ "list_delivery_eventsResponse": {
2887
+ "type": "object",
2888
+ "required": [
2889
+ "events"
2890
+ ],
2891
+ "properties": {
2892
+ "events": {
2893
+ "type": "array",
2894
+ "items": {
2895
+ "type": "object",
2896
+ "required": [
2897
+ "sequence",
2898
+ "deliveryId",
2899
+ "messageId",
2900
+ "workspace",
2901
+ "recipient",
2902
+ "toState",
2903
+ "attempt",
2904
+ "cycleAttempt",
2905
+ "requeueCount",
2906
+ "actor",
2907
+ "action",
2908
+ "createdAt"
2909
+ ],
2910
+ "properties": {
2911
+ "sequence": {
2912
+ "type": "string"
2913
+ },
2914
+ "deliveryId": {
2915
+ "type": "string"
2916
+ },
2917
+ "messageId": {
2918
+ "type": "string"
2919
+ },
2920
+ "workspace": {
2921
+ "type": "string"
2922
+ },
2923
+ "recipient": {
2924
+ "type": "string"
2925
+ },
2926
+ "fromState": {
2927
+ "enum": [
2928
+ "pending",
2929
+ "claimed",
2930
+ "acked",
2931
+ "retrying",
2932
+ "dead",
2933
+ "cancelled"
2934
+ ]
2935
+ },
2936
+ "toState": {
2937
+ "enum": [
2938
+ "pending",
2939
+ "claimed",
2940
+ "acked",
2941
+ "retrying",
2942
+ "dead",
2943
+ "cancelled"
2944
+ ]
2945
+ },
2946
+ "attempt": {
2947
+ "type": "number"
2948
+ },
2949
+ "cycleAttempt": {
2950
+ "type": "number"
2951
+ },
2952
+ "requeueCount": {
2953
+ "type": "number"
2954
+ },
2955
+ "leaseOwner": {
2956
+ "type": "string"
2957
+ },
2958
+ "error": {
2959
+ "type": "string"
2960
+ },
2961
+ "actor": {
2962
+ "type": "string"
2963
+ },
2964
+ "action": {
2965
+ "enum": [
2966
+ "created",
2967
+ "claim",
2968
+ "ack",
2969
+ "nack_retry",
2970
+ "nack_dead",
2971
+ "lease_expired",
2972
+ "attempts_exhausted",
2973
+ "message_expired",
2974
+ "cancel",
2975
+ "requeue"
2976
+ ]
2977
+ },
2978
+ "createdAt": {
2979
+ "type": "string"
2980
+ }
2981
+ },
2982
+ "additionalProperties": true
2983
+ }
2984
+ },
2985
+ "cursor": {
2986
+ "type": "string"
2987
+ }
2988
+ },
2989
+ "additionalProperties": true
2990
+ },
2991
+ "list_delivery_eventsCliResponse": {
2992
+ "type": "object",
2993
+ "required": [
2994
+ "events"
2995
+ ],
2996
+ "properties": {
2997
+ "events": {
2998
+ "type": "array",
2999
+ "items": {
3000
+ "type": "object",
3001
+ "required": [
3002
+ "sequence",
3003
+ "deliveryId",
3004
+ "messageId",
3005
+ "workspace",
3006
+ "recipient",
3007
+ "toState",
3008
+ "attempt",
3009
+ "cycleAttempt",
3010
+ "requeueCount",
3011
+ "actor",
3012
+ "action",
3013
+ "createdAt"
3014
+ ],
3015
+ "properties": {
3016
+ "sequence": {
3017
+ "type": "string"
3018
+ },
3019
+ "deliveryId": {
3020
+ "type": "string"
3021
+ },
3022
+ "messageId": {
3023
+ "type": "string"
3024
+ },
3025
+ "workspace": {
3026
+ "type": "string"
3027
+ },
3028
+ "recipient": {
3029
+ "type": "string"
3030
+ },
3031
+ "fromState": {
3032
+ "enum": [
3033
+ "pending",
3034
+ "claimed",
3035
+ "acked",
3036
+ "retrying",
3037
+ "dead",
3038
+ "cancelled"
3039
+ ]
3040
+ },
3041
+ "toState": {
3042
+ "enum": [
3043
+ "pending",
3044
+ "claimed",
3045
+ "acked",
3046
+ "retrying",
3047
+ "dead",
3048
+ "cancelled"
3049
+ ]
3050
+ },
3051
+ "attempt": {
3052
+ "type": "number"
3053
+ },
3054
+ "cycleAttempt": {
3055
+ "type": "number"
3056
+ },
3057
+ "requeueCount": {
3058
+ "type": "number"
3059
+ },
3060
+ "leaseOwner": {
3061
+ "type": "string"
3062
+ },
3063
+ "error": {
3064
+ "type": "string"
3065
+ },
3066
+ "actor": {
3067
+ "type": "string"
3068
+ },
3069
+ "action": {
3070
+ "enum": [
3071
+ "created",
3072
+ "claim",
3073
+ "ack",
3074
+ "nack_retry",
3075
+ "nack_dead",
3076
+ "lease_expired",
3077
+ "attempts_exhausted",
3078
+ "message_expired",
3079
+ "cancel",
3080
+ "requeue"
3081
+ ]
3082
+ },
3083
+ "createdAt": {
3084
+ "type": "string"
3085
+ }
3086
+ },
3087
+ "additionalProperties": true
3088
+ }
3089
+ },
3090
+ "cursor": {
3091
+ "type": "string"
3092
+ }
3093
+ },
3094
+ "additionalProperties": true
3095
+ },
3096
+ "cancel_deliveryRequest": {
3097
+ "type": "object",
3098
+ "required": [
3099
+ "deliveryId"
3100
+ ],
3101
+ "properties": {
3102
+ "deliveryId": {
3103
+ "type": "string"
3104
+ }
3105
+ },
3106
+ "additionalProperties": false
3107
+ },
3108
+ "cancel_deliveryResponse": {
3109
+ "type": "object",
3110
+ "required": [
3111
+ "delivery"
3112
+ ],
3113
+ "properties": {
3114
+ "delivery": {
3115
+ "anyOf": [
3116
+ {
3117
+ "type": "object",
3118
+ "required": [
3119
+ "id",
3120
+ "messageId",
3121
+ "workspace",
3122
+ "recipient",
3123
+ "state",
3124
+ "attempt",
3125
+ "cycleAttempt",
3126
+ "requeueCount",
3127
+ "createdAt",
3128
+ "priorityRank",
3129
+ "availableAt",
3130
+ "lastAction"
3131
+ ],
3132
+ "properties": {
3133
+ "id": {
3134
+ "type": "string"
3135
+ },
3136
+ "messageId": {
3137
+ "type": "string"
3138
+ },
3139
+ "workspace": {
3140
+ "type": "string"
3141
+ },
3142
+ "recipient": {
3143
+ "type": "string"
3144
+ },
3145
+ "state": {
3146
+ "enum": [
3147
+ "pending",
3148
+ "claimed",
3149
+ "acked",
3150
+ "retrying",
3151
+ "dead",
3152
+ "cancelled"
3153
+ ]
3154
+ },
3155
+ "attempt": {
3156
+ "type": "number"
3157
+ },
3158
+ "cycleAttempt": {
3159
+ "type": "number"
3160
+ },
3161
+ "requeueCount": {
3162
+ "type": "number"
3163
+ },
3164
+ "createdAt": {
3165
+ "type": "string"
3166
+ },
3167
+ "priorityRank": {
3168
+ "type": "number"
3169
+ },
3170
+ "availableAt": {
3171
+ "type": "string"
3172
+ },
3173
+ "leaseToken": {
3174
+ "type": "string"
3175
+ },
3176
+ "leaseOwner": {
3177
+ "type": "string"
3178
+ },
3179
+ "leaseExpiresAt": {
3180
+ "type": "string"
3181
+ },
3182
+ "lastError": {
3183
+ "type": "string"
3184
+ },
3185
+ "lastActor": {
3186
+ "type": "string"
3187
+ },
3188
+ "lastAction": {
3189
+ "enum": [
3190
+ "created",
3191
+ "claim",
3192
+ "ack",
3193
+ "nack_retry",
3194
+ "nack_dead",
3195
+ "lease_expired",
3196
+ "attempts_exhausted",
3197
+ "message_expired",
3198
+ "cancel",
3199
+ "requeue"
3200
+ ]
3201
+ }
3202
+ },
3203
+ "additionalProperties": true
3204
+ },
3205
+ {
3206
+ "type": "null"
3207
+ }
3208
+ ]
3209
+ }
3210
+ },
3211
+ "additionalProperties": true
3212
+ },
3213
+ "cancel_deliveryCliResponse": {
3214
+ "anyOf": [
3215
+ {
3216
+ "type": "object",
3217
+ "required": [
3218
+ "id",
3219
+ "messageId",
3220
+ "workspace",
3221
+ "recipient",
3222
+ "state",
3223
+ "attempt",
3224
+ "cycleAttempt",
3225
+ "requeueCount",
3226
+ "createdAt",
3227
+ "priorityRank",
3228
+ "availableAt",
3229
+ "lastAction"
3230
+ ],
3231
+ "properties": {
3232
+ "id": {
3233
+ "type": "string"
3234
+ },
3235
+ "messageId": {
3236
+ "type": "string"
3237
+ },
3238
+ "workspace": {
3239
+ "type": "string"
3240
+ },
3241
+ "recipient": {
3242
+ "type": "string"
3243
+ },
3244
+ "state": {
3245
+ "enum": [
3246
+ "pending",
3247
+ "claimed",
3248
+ "acked",
3249
+ "retrying",
3250
+ "dead",
3251
+ "cancelled"
3252
+ ]
3253
+ },
3254
+ "attempt": {
3255
+ "type": "number"
3256
+ },
3257
+ "cycleAttempt": {
3258
+ "type": "number"
3259
+ },
3260
+ "requeueCount": {
3261
+ "type": "number"
3262
+ },
3263
+ "createdAt": {
3264
+ "type": "string"
3265
+ },
3266
+ "priorityRank": {
3267
+ "type": "number"
3268
+ },
3269
+ "availableAt": {
3270
+ "type": "string"
3271
+ },
3272
+ "leaseToken": {
3273
+ "type": "string"
3274
+ },
3275
+ "leaseOwner": {
3276
+ "type": "string"
3277
+ },
3278
+ "leaseExpiresAt": {
3279
+ "type": "string"
3280
+ },
3281
+ "lastError": {
3282
+ "type": "string"
3283
+ },
3284
+ "lastActor": {
3285
+ "type": "string"
3286
+ },
3287
+ "lastAction": {
3288
+ "enum": [
3289
+ "created",
3290
+ "claim",
3291
+ "ack",
3292
+ "nack_retry",
3293
+ "nack_dead",
3294
+ "lease_expired",
3295
+ "attempts_exhausted",
3296
+ "message_expired",
3297
+ "cancel",
3298
+ "requeue"
3299
+ ]
3300
+ }
3301
+ },
3302
+ "additionalProperties": true
3303
+ },
3304
+ {
3305
+ "type": "null"
3306
+ }
3307
+ ]
3308
+ },
3309
+ "requeue_deliveryRequest": {
3310
+ "type": "object",
3311
+ "required": [
3312
+ "deliveryId"
3313
+ ],
3314
+ "properties": {
3315
+ "deliveryId": {
3316
+ "type": "string"
3317
+ }
3318
+ },
3319
+ "additionalProperties": false
3320
+ },
3321
+ "requeue_deliveryResponse": {
3322
+ "type": "object",
3323
+ "required": [
3324
+ "delivery"
3325
+ ],
3326
+ "properties": {
3327
+ "delivery": {
3328
+ "anyOf": [
3329
+ {
3330
+ "type": "object",
3331
+ "required": [
3332
+ "id",
3333
+ "messageId",
3334
+ "workspace",
3335
+ "recipient",
3336
+ "state",
3337
+ "attempt",
3338
+ "cycleAttempt",
3339
+ "requeueCount",
3340
+ "createdAt",
3341
+ "priorityRank",
3342
+ "availableAt",
3343
+ "lastAction"
3344
+ ],
3345
+ "properties": {
3346
+ "id": {
3347
+ "type": "string"
3348
+ },
3349
+ "messageId": {
3350
+ "type": "string"
3351
+ },
3352
+ "workspace": {
3353
+ "type": "string"
3354
+ },
3355
+ "recipient": {
3356
+ "type": "string"
3357
+ },
3358
+ "state": {
3359
+ "enum": [
3360
+ "pending",
3361
+ "claimed",
3362
+ "acked",
3363
+ "retrying",
3364
+ "dead",
3365
+ "cancelled"
3366
+ ]
3367
+ },
3368
+ "attempt": {
3369
+ "type": "number"
3370
+ },
3371
+ "cycleAttempt": {
3372
+ "type": "number"
3373
+ },
3374
+ "requeueCount": {
3375
+ "type": "number"
3376
+ },
3377
+ "createdAt": {
3378
+ "type": "string"
3379
+ },
3380
+ "priorityRank": {
3381
+ "type": "number"
3382
+ },
3383
+ "availableAt": {
3384
+ "type": "string"
3385
+ },
3386
+ "leaseToken": {
3387
+ "type": "string"
3388
+ },
3389
+ "leaseOwner": {
3390
+ "type": "string"
3391
+ },
3392
+ "leaseExpiresAt": {
3393
+ "type": "string"
3394
+ },
3395
+ "lastError": {
3396
+ "type": "string"
3397
+ },
3398
+ "lastActor": {
3399
+ "type": "string"
3400
+ },
3401
+ "lastAction": {
3402
+ "enum": [
3403
+ "created",
3404
+ "claim",
3405
+ "ack",
3406
+ "nack_retry",
3407
+ "nack_dead",
3408
+ "lease_expired",
3409
+ "attempts_exhausted",
3410
+ "message_expired",
3411
+ "cancel",
3412
+ "requeue"
3413
+ ]
3414
+ }
3415
+ },
3416
+ "additionalProperties": true
3417
+ },
3418
+ {
3419
+ "type": "null"
3420
+ }
3421
+ ]
3422
+ }
3423
+ },
3424
+ "additionalProperties": true
3425
+ },
3426
+ "requeue_deliveryCliResponse": {
3427
+ "anyOf": [
3428
+ {
3429
+ "type": "object",
3430
+ "required": [
3431
+ "id",
3432
+ "messageId",
3433
+ "workspace",
3434
+ "recipient",
3435
+ "state",
3436
+ "attempt",
3437
+ "cycleAttempt",
3438
+ "requeueCount",
3439
+ "createdAt",
3440
+ "priorityRank",
3441
+ "availableAt",
3442
+ "lastAction"
3443
+ ],
3444
+ "properties": {
3445
+ "id": {
3446
+ "type": "string"
3447
+ },
3448
+ "messageId": {
3449
+ "type": "string"
3450
+ },
3451
+ "workspace": {
3452
+ "type": "string"
3453
+ },
3454
+ "recipient": {
3455
+ "type": "string"
3456
+ },
3457
+ "state": {
3458
+ "enum": [
3459
+ "pending",
3460
+ "claimed",
3461
+ "acked",
3462
+ "retrying",
3463
+ "dead",
3464
+ "cancelled"
3465
+ ]
3466
+ },
3467
+ "attempt": {
3468
+ "type": "number"
3469
+ },
3470
+ "cycleAttempt": {
3471
+ "type": "number"
3472
+ },
3473
+ "requeueCount": {
3474
+ "type": "number"
3475
+ },
3476
+ "createdAt": {
3477
+ "type": "string"
3478
+ },
3479
+ "priorityRank": {
3480
+ "type": "number"
3481
+ },
3482
+ "availableAt": {
3483
+ "type": "string"
3484
+ },
3485
+ "leaseToken": {
3486
+ "type": "string"
3487
+ },
3488
+ "leaseOwner": {
3489
+ "type": "string"
3490
+ },
3491
+ "leaseExpiresAt": {
3492
+ "type": "string"
3493
+ },
3494
+ "lastError": {
3495
+ "type": "string"
3496
+ },
3497
+ "lastActor": {
3498
+ "type": "string"
3499
+ },
3500
+ "lastAction": {
3501
+ "enum": [
3502
+ "created",
3503
+ "claim",
3504
+ "ack",
3505
+ "nack_retry",
3506
+ "nack_dead",
3507
+ "lease_expired",
3508
+ "attempts_exhausted",
3509
+ "message_expired",
3510
+ "cancel",
3511
+ "requeue"
3512
+ ]
3513
+ }
3514
+ },
3515
+ "additionalProperties": true
3516
+ },
3517
+ {
3518
+ "type": "null"
3519
+ }
3520
+ ]
3521
+ },
3522
+ "extend_deliveryRequest": {
3523
+ "type": "object",
3524
+ "required": [
3525
+ "deliveryId",
3526
+ "leaseToken",
3527
+ "leaseMs"
3528
+ ],
3529
+ "properties": {
3530
+ "deliveryId": {
3531
+ "type": "string"
3532
+ },
3533
+ "leaseToken": {
3534
+ "type": "string"
3535
+ },
3536
+ "leaseMs": {
3537
+ "type": "number"
3538
+ }
3539
+ },
3540
+ "additionalProperties": false
3541
+ },
3542
+ "extend_deliveryResponse": {
3543
+ "type": "object",
3544
+ "required": [
3545
+ "delivery"
3546
+ ],
3547
+ "properties": {
3548
+ "delivery": {
3549
+ "anyOf": [
3550
+ {
3551
+ "type": "object",
3552
+ "required": [
3553
+ "id",
3554
+ "messageId",
3555
+ "workspace",
3556
+ "recipient",
3557
+ "state",
3558
+ "attempt",
3559
+ "cycleAttempt",
3560
+ "requeueCount",
3561
+ "createdAt",
3562
+ "priorityRank",
3563
+ "availableAt",
3564
+ "lastAction"
3565
+ ],
3566
+ "properties": {
3567
+ "id": {
3568
+ "type": "string"
3569
+ },
3570
+ "messageId": {
3571
+ "type": "string"
3572
+ },
3573
+ "workspace": {
3574
+ "type": "string"
3575
+ },
3576
+ "recipient": {
3577
+ "type": "string"
3578
+ },
3579
+ "state": {
3580
+ "enum": [
3581
+ "pending",
3582
+ "claimed",
3583
+ "acked",
3584
+ "retrying",
3585
+ "dead",
3586
+ "cancelled"
3587
+ ]
3588
+ },
3589
+ "attempt": {
3590
+ "type": "number"
3591
+ },
3592
+ "cycleAttempt": {
3593
+ "type": "number"
3594
+ },
3595
+ "requeueCount": {
3596
+ "type": "number"
3597
+ },
3598
+ "createdAt": {
3599
+ "type": "string"
3600
+ },
3601
+ "priorityRank": {
3602
+ "type": "number"
3603
+ },
3604
+ "availableAt": {
3605
+ "type": "string"
3606
+ },
3607
+ "leaseToken": {
3608
+ "type": "string"
3609
+ },
3610
+ "leaseOwner": {
3611
+ "type": "string"
3612
+ },
3613
+ "leaseExpiresAt": {
3614
+ "type": "string"
3615
+ },
3616
+ "lastError": {
3617
+ "type": "string"
3618
+ },
3619
+ "lastActor": {
3620
+ "type": "string"
3621
+ },
3622
+ "lastAction": {
3623
+ "enum": [
3624
+ "created",
3625
+ "claim",
3626
+ "ack",
3627
+ "nack_retry",
3628
+ "nack_dead",
3629
+ "lease_expired",
3630
+ "attempts_exhausted",
3631
+ "message_expired",
3632
+ "cancel",
3633
+ "requeue"
3634
+ ]
3635
+ }
3636
+ },
3637
+ "additionalProperties": true
3638
+ },
3639
+ {
3640
+ "type": "null"
3641
+ }
3642
+ ]
3643
+ }
3644
+ },
3645
+ "additionalProperties": true
3646
+ },
3647
+ "extend_deliveryCliResponse": {
3648
+ "anyOf": [
3649
+ {
3650
+ "type": "object",
3651
+ "required": [
3652
+ "id",
3653
+ "messageId",
3654
+ "workspace",
3655
+ "recipient",
3656
+ "state",
3657
+ "attempt",
3658
+ "cycleAttempt",
3659
+ "requeueCount",
3660
+ "createdAt",
3661
+ "priorityRank",
3662
+ "availableAt",
3663
+ "lastAction"
3664
+ ],
3665
+ "properties": {
3666
+ "id": {
3667
+ "type": "string"
3668
+ },
3669
+ "messageId": {
3670
+ "type": "string"
3671
+ },
3672
+ "workspace": {
3673
+ "type": "string"
3674
+ },
3675
+ "recipient": {
3676
+ "type": "string"
3677
+ },
3678
+ "state": {
3679
+ "enum": [
3680
+ "pending",
3681
+ "claimed",
3682
+ "acked",
3683
+ "retrying",
3684
+ "dead",
3685
+ "cancelled"
3686
+ ]
3687
+ },
3688
+ "attempt": {
3689
+ "type": "number"
3690
+ },
3691
+ "cycleAttempt": {
3692
+ "type": "number"
3693
+ },
3694
+ "requeueCount": {
3695
+ "type": "number"
3696
+ },
3697
+ "createdAt": {
3698
+ "type": "string"
3699
+ },
3700
+ "priorityRank": {
3701
+ "type": "number"
3702
+ },
3703
+ "availableAt": {
3704
+ "type": "string"
3705
+ },
3706
+ "leaseToken": {
3707
+ "type": "string"
3708
+ },
3709
+ "leaseOwner": {
3710
+ "type": "string"
3711
+ },
3712
+ "leaseExpiresAt": {
3713
+ "type": "string"
3714
+ },
3715
+ "lastError": {
3716
+ "type": "string"
3717
+ },
3718
+ "lastActor": {
3719
+ "type": "string"
3720
+ },
3721
+ "lastAction": {
3722
+ "enum": [
3723
+ "created",
3724
+ "claim",
3725
+ "ack",
3726
+ "nack_retry",
3727
+ "nack_dead",
3728
+ "lease_expired",
3729
+ "attempts_exhausted",
3730
+ "message_expired",
3731
+ "cancel",
3732
+ "requeue"
3733
+ ]
3734
+ }
3735
+ },
3736
+ "additionalProperties": true
3737
+ },
3738
+ {
3739
+ "type": "null"
3740
+ }
3741
+ ]
3742
+ },
3743
+ "acknowledge_deliveryRequest": {
3744
+ "type": "object",
3745
+ "required": [
3746
+ "deliveryId",
3747
+ "leaseToken"
3748
+ ],
3749
+ "properties": {
3750
+ "deliveryId": {
3751
+ "type": "string"
3752
+ },
3753
+ "leaseToken": {
3754
+ "type": "string"
3755
+ }
3756
+ },
3757
+ "additionalProperties": false
3758
+ },
3759
+ "acknowledge_deliveryResponse": {
3760
+ "type": "object",
3761
+ "required": [
3762
+ "delivery"
3763
+ ],
3764
+ "properties": {
3765
+ "delivery": {
3766
+ "anyOf": [
3767
+ {
3768
+ "type": "object",
3769
+ "required": [
3770
+ "id",
3771
+ "messageId",
3772
+ "workspace",
3773
+ "recipient",
3774
+ "state",
3775
+ "attempt",
3776
+ "cycleAttempt",
3777
+ "requeueCount",
3778
+ "createdAt",
3779
+ "priorityRank",
3780
+ "availableAt",
3781
+ "lastAction"
3782
+ ],
3783
+ "properties": {
3784
+ "id": {
3785
+ "type": "string"
3786
+ },
3787
+ "messageId": {
3788
+ "type": "string"
3789
+ },
3790
+ "workspace": {
3791
+ "type": "string"
3792
+ },
3793
+ "recipient": {
3794
+ "type": "string"
3795
+ },
3796
+ "state": {
3797
+ "enum": [
3798
+ "pending",
3799
+ "claimed",
3800
+ "acked",
3801
+ "retrying",
3802
+ "dead",
3803
+ "cancelled"
3804
+ ]
3805
+ },
3806
+ "attempt": {
3807
+ "type": "number"
3808
+ },
3809
+ "cycleAttempt": {
3810
+ "type": "number"
3811
+ },
3812
+ "requeueCount": {
3813
+ "type": "number"
3814
+ },
3815
+ "createdAt": {
3816
+ "type": "string"
3817
+ },
3818
+ "priorityRank": {
3819
+ "type": "number"
3820
+ },
3821
+ "availableAt": {
3822
+ "type": "string"
3823
+ },
3824
+ "leaseToken": {
3825
+ "type": "string"
3826
+ },
3827
+ "leaseOwner": {
3828
+ "type": "string"
3829
+ },
3830
+ "leaseExpiresAt": {
3831
+ "type": "string"
3832
+ },
3833
+ "lastError": {
3834
+ "type": "string"
3835
+ },
3836
+ "lastActor": {
3837
+ "type": "string"
3838
+ },
3839
+ "lastAction": {
3840
+ "enum": [
3841
+ "created",
3842
+ "claim",
3843
+ "ack",
3844
+ "nack_retry",
3845
+ "nack_dead",
3846
+ "lease_expired",
3847
+ "attempts_exhausted",
3848
+ "message_expired",
3849
+ "cancel",
3850
+ "requeue"
3851
+ ]
3852
+ }
3853
+ },
3854
+ "additionalProperties": true
3855
+ },
3856
+ {
3857
+ "type": "null"
3858
+ }
3859
+ ]
3860
+ }
3861
+ },
3862
+ "additionalProperties": true
3863
+ },
3864
+ "acknowledge_deliveryCliResponse": {
3865
+ "anyOf": [
3866
+ {
3867
+ "type": "object",
3868
+ "required": [
3869
+ "id",
3870
+ "messageId",
3871
+ "workspace",
3872
+ "recipient",
3873
+ "state",
3874
+ "attempt",
3875
+ "cycleAttempt",
3876
+ "requeueCount",
3877
+ "createdAt",
3878
+ "priorityRank",
3879
+ "availableAt",
3880
+ "lastAction"
3881
+ ],
3882
+ "properties": {
3883
+ "id": {
3884
+ "type": "string"
3885
+ },
3886
+ "messageId": {
3887
+ "type": "string"
3888
+ },
3889
+ "workspace": {
3890
+ "type": "string"
3891
+ },
3892
+ "recipient": {
3893
+ "type": "string"
3894
+ },
3895
+ "state": {
3896
+ "enum": [
3897
+ "pending",
3898
+ "claimed",
3899
+ "acked",
3900
+ "retrying",
3901
+ "dead",
3902
+ "cancelled"
3903
+ ]
3904
+ },
3905
+ "attempt": {
3906
+ "type": "number"
3907
+ },
3908
+ "cycleAttempt": {
3909
+ "type": "number"
3910
+ },
3911
+ "requeueCount": {
3912
+ "type": "number"
3913
+ },
3914
+ "createdAt": {
3915
+ "type": "string"
3916
+ },
3917
+ "priorityRank": {
3918
+ "type": "number"
3919
+ },
3920
+ "availableAt": {
3921
+ "type": "string"
3922
+ },
3923
+ "leaseToken": {
3924
+ "type": "string"
3925
+ },
3926
+ "leaseOwner": {
3927
+ "type": "string"
3928
+ },
3929
+ "leaseExpiresAt": {
3930
+ "type": "string"
3931
+ },
3932
+ "lastError": {
3933
+ "type": "string"
3934
+ },
3935
+ "lastActor": {
3936
+ "type": "string"
3937
+ },
3938
+ "lastAction": {
3939
+ "enum": [
3940
+ "created",
3941
+ "claim",
3942
+ "ack",
3943
+ "nack_retry",
3944
+ "nack_dead",
3945
+ "lease_expired",
3946
+ "attempts_exhausted",
3947
+ "message_expired",
3948
+ "cancel",
3949
+ "requeue"
3950
+ ]
3951
+ }
3952
+ },
3953
+ "additionalProperties": true
3954
+ },
3955
+ {
3956
+ "type": "null"
3957
+ }
3958
+ ]
3959
+ },
3960
+ "negative_acknowledge_deliveryRequest": {
3961
+ "type": "object",
3962
+ "required": [
3963
+ "deliveryId",
3964
+ "leaseToken",
3965
+ "error"
3966
+ ],
3967
+ "properties": {
3968
+ "deliveryId": {
3969
+ "type": "string"
3970
+ },
3971
+ "leaseToken": {
3972
+ "type": "string"
3973
+ },
3974
+ "error": {
3975
+ "type": "string"
3976
+ },
3977
+ "disposition": {
3978
+ "enum": [
3979
+ "retry",
3980
+ "dead"
3981
+ ]
3982
+ },
3983
+ "dead": {
3984
+ "type": "boolean"
3985
+ },
3986
+ "retryPolicy": {
3987
+ "type": "object",
3988
+ "properties": {
3989
+ "maxAttempts": {
3990
+ "type": "number"
3991
+ },
3992
+ "baseDelayMs": {
3993
+ "type": "number"
3994
+ },
3995
+ "maxDelayMs": {
3996
+ "type": "number"
3997
+ },
3998
+ "jitterRatio": {
3999
+ "type": "number"
4000
+ }
4001
+ },
4002
+ "additionalProperties": false
4003
+ }
4004
+ },
4005
+ "additionalProperties": false
4006
+ },
4007
+ "negative_acknowledge_deliveryResponse": {
4008
+ "type": "object",
4009
+ "required": [
4010
+ "delivery"
4011
+ ],
4012
+ "properties": {
4013
+ "delivery": {
4014
+ "anyOf": [
4015
+ {
4016
+ "type": "object",
4017
+ "required": [
4018
+ "id",
4019
+ "messageId",
4020
+ "workspace",
4021
+ "recipient",
4022
+ "state",
4023
+ "attempt",
4024
+ "cycleAttempt",
4025
+ "requeueCount",
4026
+ "createdAt",
4027
+ "priorityRank",
4028
+ "availableAt",
4029
+ "lastAction"
4030
+ ],
4031
+ "properties": {
4032
+ "id": {
4033
+ "type": "string"
4034
+ },
4035
+ "messageId": {
4036
+ "type": "string"
4037
+ },
4038
+ "workspace": {
4039
+ "type": "string"
4040
+ },
4041
+ "recipient": {
4042
+ "type": "string"
4043
+ },
4044
+ "state": {
4045
+ "enum": [
4046
+ "pending",
4047
+ "claimed",
4048
+ "acked",
4049
+ "retrying",
4050
+ "dead",
4051
+ "cancelled"
4052
+ ]
4053
+ },
4054
+ "attempt": {
4055
+ "type": "number"
4056
+ },
4057
+ "cycleAttempt": {
4058
+ "type": "number"
4059
+ },
4060
+ "requeueCount": {
4061
+ "type": "number"
4062
+ },
4063
+ "createdAt": {
4064
+ "type": "string"
4065
+ },
4066
+ "priorityRank": {
4067
+ "type": "number"
4068
+ },
4069
+ "availableAt": {
4070
+ "type": "string"
4071
+ },
4072
+ "leaseToken": {
4073
+ "type": "string"
4074
+ },
4075
+ "leaseOwner": {
4076
+ "type": "string"
4077
+ },
4078
+ "leaseExpiresAt": {
4079
+ "type": "string"
4080
+ },
4081
+ "lastError": {
4082
+ "type": "string"
4083
+ },
4084
+ "lastActor": {
4085
+ "type": "string"
4086
+ },
4087
+ "lastAction": {
4088
+ "enum": [
4089
+ "created",
4090
+ "claim",
4091
+ "ack",
4092
+ "nack_retry",
4093
+ "nack_dead",
4094
+ "lease_expired",
4095
+ "attempts_exhausted",
4096
+ "message_expired",
4097
+ "cancel",
4098
+ "requeue"
4099
+ ]
4100
+ }
4101
+ },
4102
+ "additionalProperties": true
4103
+ },
4104
+ {
4105
+ "type": "null"
4106
+ }
4107
+ ]
4108
+ }
4109
+ },
4110
+ "additionalProperties": true
4111
+ },
4112
+ "negative_acknowledge_deliveryCliResponse": {
4113
+ "anyOf": [
4114
+ {
4115
+ "type": "object",
4116
+ "required": [
4117
+ "id",
4118
+ "messageId",
4119
+ "workspace",
4120
+ "recipient",
4121
+ "state",
4122
+ "attempt",
4123
+ "cycleAttempt",
4124
+ "requeueCount",
4125
+ "createdAt",
4126
+ "priorityRank",
4127
+ "availableAt",
4128
+ "lastAction"
4129
+ ],
4130
+ "properties": {
4131
+ "id": {
4132
+ "type": "string"
4133
+ },
4134
+ "messageId": {
4135
+ "type": "string"
4136
+ },
4137
+ "workspace": {
4138
+ "type": "string"
4139
+ },
4140
+ "recipient": {
4141
+ "type": "string"
4142
+ },
4143
+ "state": {
4144
+ "enum": [
4145
+ "pending",
4146
+ "claimed",
4147
+ "acked",
4148
+ "retrying",
4149
+ "dead",
4150
+ "cancelled"
4151
+ ]
4152
+ },
4153
+ "attempt": {
4154
+ "type": "number"
4155
+ },
4156
+ "cycleAttempt": {
4157
+ "type": "number"
4158
+ },
4159
+ "requeueCount": {
4160
+ "type": "number"
4161
+ },
4162
+ "createdAt": {
4163
+ "type": "string"
4164
+ },
4165
+ "priorityRank": {
4166
+ "type": "number"
4167
+ },
4168
+ "availableAt": {
4169
+ "type": "string"
4170
+ },
4171
+ "leaseToken": {
4172
+ "type": "string"
4173
+ },
4174
+ "leaseOwner": {
4175
+ "type": "string"
4176
+ },
4177
+ "leaseExpiresAt": {
4178
+ "type": "string"
4179
+ },
4180
+ "lastError": {
4181
+ "type": "string"
4182
+ },
4183
+ "lastActor": {
4184
+ "type": "string"
4185
+ },
4186
+ "lastAction": {
4187
+ "enum": [
4188
+ "created",
4189
+ "claim",
4190
+ "ack",
4191
+ "nack_retry",
4192
+ "nack_dead",
4193
+ "lease_expired",
4194
+ "attempts_exhausted",
4195
+ "message_expired",
4196
+ "cancel",
4197
+ "requeue"
4198
+ ]
4199
+ }
4200
+ },
4201
+ "additionalProperties": true
4202
+ },
4203
+ {
4204
+ "type": "null"
4205
+ }
4206
+ ]
4207
+ },
4208
+ "heartbeatRequest": {
4209
+ "type": "object",
4210
+ "properties": {
4211
+ "leaseMs": {
4212
+ "type": "number",
4213
+ "minimum": 1000,
4214
+ "maximum": 900000
4215
+ },
4216
+ "runtimeType": {
4217
+ "type": "string"
4218
+ },
4219
+ "capabilities": {
4220
+ "type": "array",
4221
+ "items": {
4222
+ "type": "string"
4223
+ }
4224
+ }
4225
+ },
4226
+ "additionalProperties": false
4227
+ },
4228
+ "heartbeatResponse": {
4229
+ "type": "object",
4230
+ "required": [
4231
+ "workspace",
4232
+ "agent",
4233
+ "instance",
4234
+ "capabilities",
4235
+ "leaseExpiresAt",
4236
+ "lastSeenAt"
4237
+ ],
4238
+ "properties": {
4239
+ "workspace": {
4240
+ "type": "string"
4241
+ },
4242
+ "agent": {
4243
+ "type": "string"
4244
+ },
4245
+ "instance": {
4246
+ "type": "string"
4247
+ },
4248
+ "runtimeType": {
4249
+ "type": "string"
4250
+ },
4251
+ "capabilities": {
4252
+ "type": "array",
4253
+ "items": {
4254
+ "type": "string"
4255
+ }
4256
+ },
4257
+ "leaseExpiresAt": {
4258
+ "type": "string"
4259
+ },
4260
+ "lastSeenAt": {
4261
+ "type": "string"
4262
+ }
4263
+ },
4264
+ "additionalProperties": true
4265
+ },
4266
+ "heartbeatCliResponse": {
4267
+ "type": "object",
4268
+ "required": [
4269
+ "workspace",
4270
+ "agent",
4271
+ "instance",
4272
+ "capabilities",
4273
+ "leaseExpiresAt",
4274
+ "lastSeenAt"
4275
+ ],
4276
+ "properties": {
4277
+ "workspace": {
4278
+ "type": "string"
4279
+ },
4280
+ "agent": {
4281
+ "type": "string"
4282
+ },
4283
+ "instance": {
4284
+ "type": "string"
4285
+ },
4286
+ "runtimeType": {
4287
+ "type": "string"
4288
+ },
4289
+ "capabilities": {
4290
+ "type": "array",
4291
+ "items": {
4292
+ "type": "string"
4293
+ }
4294
+ },
4295
+ "leaseExpiresAt": {
4296
+ "type": "string"
4297
+ },
4298
+ "lastSeenAt": {
4299
+ "type": "string"
4300
+ }
4301
+ },
4302
+ "additionalProperties": true
4303
+ },
4304
+ "presenceRequest": {
4305
+ "type": "object",
4306
+ "properties": {},
4307
+ "additionalProperties": false
4308
+ },
4309
+ "presenceResponse": {
4310
+ "type": "object",
4311
+ "required": [
4312
+ "agents"
4313
+ ],
4314
+ "properties": {
4315
+ "agents": {
4316
+ "type": "array",
4317
+ "items": {
4318
+ "type": "object",
4319
+ "required": [
4320
+ "workspace",
4321
+ "agent",
4322
+ "instance",
4323
+ "capabilities",
4324
+ "leaseExpiresAt",
4325
+ "lastSeenAt"
4326
+ ],
4327
+ "properties": {
4328
+ "workspace": {
4329
+ "type": "string"
4330
+ },
4331
+ "agent": {
4332
+ "type": "string"
4333
+ },
4334
+ "instance": {
4335
+ "type": "string"
4336
+ },
4337
+ "runtimeType": {
4338
+ "type": "string"
4339
+ },
4340
+ "capabilities": {
4341
+ "type": "array",
4342
+ "items": {
4343
+ "type": "string"
4344
+ }
4345
+ },
4346
+ "leaseExpiresAt": {
4347
+ "type": "string"
4348
+ },
4349
+ "lastSeenAt": {
4350
+ "type": "string"
4351
+ }
4352
+ },
4353
+ "additionalProperties": true
4354
+ }
4355
+ }
4356
+ },
4357
+ "additionalProperties": true
4358
+ },
4359
+ "presenceCliResponse": {
4360
+ "type": "object",
4361
+ "required": [
4362
+ "agents"
4363
+ ],
4364
+ "properties": {
4365
+ "agents": {
4366
+ "type": "array",
4367
+ "items": {
4368
+ "type": "object",
4369
+ "required": [
4370
+ "workspace",
4371
+ "agent",
4372
+ "instance",
4373
+ "capabilities",
4374
+ "leaseExpiresAt",
4375
+ "lastSeenAt"
4376
+ ],
4377
+ "properties": {
4378
+ "workspace": {
4379
+ "type": "string"
4380
+ },
4381
+ "agent": {
4382
+ "type": "string"
4383
+ },
4384
+ "instance": {
4385
+ "type": "string"
4386
+ },
4387
+ "runtimeType": {
4388
+ "type": "string"
4389
+ },
4390
+ "capabilities": {
4391
+ "type": "array",
4392
+ "items": {
4393
+ "type": "string"
4394
+ }
4395
+ },
4396
+ "leaseExpiresAt": {
4397
+ "type": "string"
4398
+ },
4399
+ "lastSeenAt": {
4400
+ "type": "string"
4401
+ }
4402
+ },
4403
+ "additionalProperties": true
4404
+ }
4405
+ }
4406
+ },
4407
+ "additionalProperties": true
4408
+ },
4409
+ "syncRequest": {
4410
+ "type": "object",
4411
+ "properties": {
4412
+ "maxPush": {
4413
+ "type": "number"
4414
+ },
4415
+ "maxPages": {
4416
+ "type": "number"
4417
+ }
4418
+ },
4419
+ "additionalProperties": false
4420
+ },
4421
+ "syncResponse": {
4422
+ "type": "object",
4423
+ "required": [
4424
+ "online",
4425
+ "pushed",
4426
+ "deduplicated",
4427
+ "pulled",
4428
+ "pending",
4429
+ "blocked",
4430
+ "cached"
4431
+ ],
4432
+ "properties": {
4433
+ "online": {
4434
+ "type": "boolean"
4435
+ },
4436
+ "pushed": {
4437
+ "type": "number"
4438
+ },
4439
+ "deduplicated": {
4440
+ "type": "number"
4441
+ },
4442
+ "pulled": {
4443
+ "type": "number"
4444
+ },
4445
+ "pending": {
4446
+ "type": "number"
4447
+ },
4448
+ "blocked": {
4449
+ "type": "number"
4450
+ },
4451
+ "cached": {
4452
+ "type": "number"
4453
+ },
4454
+ "cursor": {
4455
+ "anyOf": [
4456
+ {
4457
+ "type": "string"
4458
+ },
4459
+ {
4460
+ "type": "null"
4461
+ }
4462
+ ]
4463
+ },
4464
+ "lastSyncedAt": {
4465
+ "anyOf": [
4466
+ {
4467
+ "type": "string"
4468
+ },
4469
+ {
4470
+ "type": "null"
4471
+ }
4472
+ ]
4473
+ },
4474
+ "lastError": {
4475
+ "anyOf": [
4476
+ {
4477
+ "type": "string"
4478
+ },
4479
+ {
4480
+ "type": "null"
4481
+ }
4482
+ ]
4483
+ },
4484
+ "failureRetryable": {
4485
+ "type": "boolean"
4486
+ }
4487
+ },
4488
+ "additionalProperties": true
4489
+ },
4490
+ "syncCliResponse": {
4491
+ "type": "object",
4492
+ "required": [
4493
+ "online",
4494
+ "pushed",
4495
+ "deduplicated",
4496
+ "pulled",
4497
+ "pending",
4498
+ "blocked",
4499
+ "cached"
4500
+ ],
4501
+ "properties": {
4502
+ "online": {
4503
+ "type": "boolean"
4504
+ },
4505
+ "pushed": {
4506
+ "type": "number"
4507
+ },
4508
+ "deduplicated": {
4509
+ "type": "number"
4510
+ },
4511
+ "pulled": {
4512
+ "type": "number"
4513
+ },
4514
+ "pending": {
4515
+ "type": "number"
4516
+ },
4517
+ "blocked": {
4518
+ "type": "number"
4519
+ },
4520
+ "cached": {
4521
+ "type": "number"
4522
+ },
4523
+ "cursor": {
4524
+ "anyOf": [
4525
+ {
4526
+ "type": "string"
4527
+ },
4528
+ {
4529
+ "type": "null"
4530
+ }
4531
+ ]
4532
+ },
4533
+ "lastSyncedAt": {
4534
+ "anyOf": [
4535
+ {
4536
+ "type": "string"
4537
+ },
4538
+ {
4539
+ "type": "null"
4540
+ }
4541
+ ]
4542
+ },
4543
+ "lastError": {
4544
+ "anyOf": [
4545
+ {
4546
+ "type": "string"
4547
+ },
4548
+ {
4549
+ "type": "null"
4550
+ }
4551
+ ]
4552
+ },
4553
+ "failureRetryable": {
4554
+ "type": "boolean"
4555
+ }
4556
+ },
4557
+ "additionalProperties": true
4558
+ }
4559
+ }
4560
+ }