@creatornader/agent-bridge 0.2.0 → 0.3.1

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 (115) hide show
  1. package/CHANGELOG.md +86 -4
  2. package/README.md +567 -55
  3. package/ROADMAP.md +114 -0
  4. package/SECURITY.md +90 -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 +3555 -214
  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 +394 -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/decisions/0003-host-adapters-and-consumer-instance-keys.md +88 -0
  77. package/docs/ecosystem.md +86 -0
  78. package/docs/postmortems/2026-07-08-wrapper-source-drift.md +82 -0
  79. package/docs/troubleshooting.md +89 -0
  80. package/llms.txt +107 -6
  81. package/openapi/agent-bridge-v2.openapi.json +9610 -0
  82. package/package.json +24 -4
  83. package/schemas/agent-bridge-v2.capabilities.json +1829 -0
  84. package/schemas/agent-bridge-v2.mcp.json +2074 -0
  85. package/schemas/agent-bridge-v2.schema.json +4560 -0
  86. package/sql/migrations/008_message_projects.sql +36 -0
  87. package/sql/migrations/009_mailbox_query_indexes.sql +28 -0
  88. package/sql/migrations/010_publisher_delivery_policy.sql +210 -0
  89. package/sql/migrations/011_credential_security.sql +875 -0
  90. package/sql/migrations/012_request_authority.sql +177 -0
  91. package/sql/migrations/013_row_isolation.sql +495 -0
  92. package/sql/migrations/014_owner_control_plane.sql +1641 -0
  93. package/sql/migrations/015_portable_archives.sql +1813 -0
  94. package/sql/migrations/016_native_dr_fence.sql +1005 -0
  95. package/bin/CLAUDE.md +0 -11
  96. package/dist/bridge-domain-BcnBeHOn.d.ts +0 -97
  97. package/dist/bridge-store-BuGjxTn4.d.ts +0 -61
  98. package/dist/chunk-4KAOBC5X.js.map +0 -1
  99. package/dist/chunk-6MAZ6YLZ.js +0 -146
  100. package/dist/chunk-6MAZ6YLZ.js.map +0 -1
  101. package/dist/chunk-AXL2I7FH.js.map +0 -1
  102. package/dist/chunk-BV6W4AJK.js +0 -211
  103. package/dist/chunk-BV6W4AJK.js.map +0 -1
  104. package/dist/chunk-CKSKUBDQ.js +0 -153
  105. package/dist/chunk-CKSKUBDQ.js.map +0 -1
  106. package/dist/chunk-JOUBDRYX.js +0 -272
  107. package/dist/chunk-JOUBDRYX.js.map +0 -1
  108. package/dist/chunk-JTC5YURG.js +0 -49
  109. package/dist/chunk-JTC5YURG.js.map +0 -1
  110. package/dist/chunk-O26W5QHS.js +0 -409
  111. package/dist/chunk-O26W5QHS.js.map +0 -1
  112. package/dist/chunk-WEULPMUY.js +0 -988
  113. package/dist/chunk-WEULPMUY.js.map +0 -1
  114. package/dist/chunk-YD6YJATN.js.map +0 -1
  115. package/dist/gateway-BULozv3K.d.ts +0 -54
@@ -0,0 +1,1829 @@
1
+ {
2
+ "protocolVersion": "2.1",
3
+ "currentProtocolVersion": "2.1",
4
+ "selectedProtocolVersion": "2.1",
5
+ "supportedProtocolVersions": [
6
+ "2.0",
7
+ "2.1"
8
+ ],
9
+ "scopeEnforcement": true,
10
+ "requestAuthority": false,
11
+ "rowIsolation": false,
12
+ "authorizationModel": "scoped-credential",
13
+ "surface": "http",
14
+ "provider": "gateway",
15
+ "operations": [
16
+ {
17
+ "id": "capabilities",
18
+ "summary": "Discover operations available on the current surface.",
19
+ "mcp": {
20
+ "name": "capabilities"
21
+ },
22
+ "http": {
23
+ "method": "GET",
24
+ "path": "/v2/capabilities"
25
+ },
26
+ "cli": {
27
+ "command": "capabilities",
28
+ "options": [],
29
+ "outputSchema": {
30
+ "type": "object",
31
+ "required": [
32
+ "protocolVersion",
33
+ "currentProtocolVersion",
34
+ "selectedProtocolVersion",
35
+ "supportedProtocolVersions",
36
+ "scopeEnforcement",
37
+ "requestAuthority",
38
+ "rowIsolation",
39
+ "authorizationModel",
40
+ "surface",
41
+ "provider",
42
+ "operations"
43
+ ],
44
+ "properties": {
45
+ "protocolVersion": {
46
+ "type": "string"
47
+ },
48
+ "currentProtocolVersion": {
49
+ "type": "string"
50
+ },
51
+ "selectedProtocolVersion": {
52
+ "type": "string"
53
+ },
54
+ "supportedProtocolVersions": {
55
+ "type": "array",
56
+ "items": {
57
+ "type": "string"
58
+ }
59
+ },
60
+ "scopeEnforcement": {
61
+ "type": "boolean"
62
+ },
63
+ "requestAuthority": {
64
+ "type": "boolean"
65
+ },
66
+ "rowIsolation": {
67
+ "type": "boolean"
68
+ },
69
+ "authorizationModel": {
70
+ "enum": [
71
+ "scoped-credential",
72
+ "credential-wide",
73
+ "process-identity",
74
+ "legacy-key"
75
+ ]
76
+ },
77
+ "surface": {
78
+ "enum": [
79
+ "mcp",
80
+ "http",
81
+ "cli"
82
+ ]
83
+ },
84
+ "provider": {
85
+ "enum": [
86
+ "local",
87
+ "gateway",
88
+ "legacy-supabase"
89
+ ]
90
+ },
91
+ "operations": {
92
+ "type": "array",
93
+ "items": {
94
+ "type": "object",
95
+ "required": [
96
+ "id",
97
+ "summary",
98
+ "requiredScopes"
99
+ ],
100
+ "properties": {
101
+ "id": {
102
+ "type": "string"
103
+ },
104
+ "summary": {
105
+ "type": "string"
106
+ },
107
+ "requiredScopes": {
108
+ "type": "array",
109
+ "items": {
110
+ "type": "string"
111
+ }
112
+ },
113
+ "mcp": {},
114
+ "http": {},
115
+ "cli": {}
116
+ },
117
+ "additionalProperties": true
118
+ }
119
+ }
120
+ },
121
+ "additionalProperties": true
122
+ }
123
+ },
124
+ "requiredScopes": []
125
+ },
126
+ {
127
+ "id": "status",
128
+ "summary": "Read gateway delivery diagnostics.",
129
+ "http": {
130
+ "method": "GET",
131
+ "path": "/v2/status"
132
+ },
133
+ "requiredScopes": [
134
+ "status:read"
135
+ ]
136
+ },
137
+ {
138
+ "id": "gateway_metrics",
139
+ "summary": "Read Prometheus gateway counters.",
140
+ "http": {
141
+ "method": "GET",
142
+ "path": "/metrics",
143
+ "responseContentType": "text/plain"
144
+ },
145
+ "requiredScopes": [
146
+ "gateway:metrics"
147
+ ]
148
+ },
149
+ {
150
+ "id": "publish_message",
151
+ "summary": "Create an immutable Agent Bridge v2 message.",
152
+ "mcp": {
153
+ "name": "send"
154
+ },
155
+ "http": {
156
+ "method": "POST",
157
+ "path": "/v2/messages",
158
+ "successStatus": 201
159
+ },
160
+ "cli": {
161
+ "command": "send",
162
+ "aliases": [
163
+ "post"
164
+ ],
165
+ "options": [
166
+ "source",
167
+ "project",
168
+ "type",
169
+ "kind",
170
+ "category",
171
+ "content",
172
+ "content-type",
173
+ "data",
174
+ "payload",
175
+ "payload-mime",
176
+ "payload-ref",
177
+ "payload-ciphertext",
178
+ "target",
179
+ "target-agent",
180
+ "target-agents",
181
+ "thread-id",
182
+ "reply-to-id",
183
+ "correlation-id",
184
+ "causation-id",
185
+ "priority",
186
+ "expires-at",
187
+ "idempotency-key",
188
+ "atrib-receipt-id",
189
+ "informed-by",
190
+ "metadata",
191
+ "delivery-mode",
192
+ "delivery-policy",
193
+ "delivery-max-attempts",
194
+ "retry-base-ms",
195
+ "retry-max-ms",
196
+ "retry-jitter",
197
+ "not-before",
198
+ "message-id"
199
+ ],
200
+ "outputSchema": {
201
+ "type": "object",
202
+ "required": [
203
+ "created",
204
+ "message"
205
+ ],
206
+ "properties": {
207
+ "created": {
208
+ "type": "boolean"
209
+ },
210
+ "message": {
211
+ "type": "object",
212
+ "required": [
213
+ "id",
214
+ "workspace",
215
+ "source",
216
+ "type",
217
+ "content",
218
+ "contentType",
219
+ "sequence",
220
+ "createdAt",
221
+ "targets",
222
+ "priority",
223
+ "deliveryPolicy"
224
+ ],
225
+ "properties": {
226
+ "id": {
227
+ "type": "string"
228
+ },
229
+ "workspace": {
230
+ "type": "string"
231
+ },
232
+ "project": {
233
+ "type": "string"
234
+ },
235
+ "source": {
236
+ "type": "string"
237
+ },
238
+ "type": {
239
+ "type": "string"
240
+ },
241
+ "content": {
242
+ "type": "string"
243
+ },
244
+ "contentType": {
245
+ "type": "string"
246
+ },
247
+ "sequence": {
248
+ "type": "string"
249
+ },
250
+ "createdAt": {
251
+ "type": "string"
252
+ },
253
+ "data": {},
254
+ "targets": {
255
+ "type": "array",
256
+ "items": {
257
+ "type": "string"
258
+ }
259
+ },
260
+ "threadId": {
261
+ "type": "string"
262
+ },
263
+ "replyToId": {
264
+ "type": "string"
265
+ },
266
+ "correlationId": {
267
+ "type": "string"
268
+ },
269
+ "causationId": {
270
+ "type": "string"
271
+ },
272
+ "priority": {
273
+ "enum": [
274
+ "info",
275
+ "high",
276
+ "urgent"
277
+ ]
278
+ },
279
+ "expiresAt": {
280
+ "type": "string"
281
+ },
282
+ "idempotencyKey": {
283
+ "type": "string"
284
+ },
285
+ "atribReceiptId": {
286
+ "type": "string"
287
+ },
288
+ "informedBy": {
289
+ "type": "array",
290
+ "items": {
291
+ "type": "string"
292
+ }
293
+ },
294
+ "metadata": {},
295
+ "deliveryPolicy": {
296
+ "anyOf": [
297
+ {
298
+ "type": "object",
299
+ "required": [
300
+ "mode"
301
+ ],
302
+ "properties": {
303
+ "mode": {
304
+ "type": "string",
305
+ "const": "mailbox"
306
+ }
307
+ },
308
+ "additionalProperties": false
309
+ },
310
+ {
311
+ "type": "object",
312
+ "required": [
313
+ "mode",
314
+ "maxAttempts",
315
+ "retryBaseDelayMs",
316
+ "retryMaxDelayMs",
317
+ "retryJitterRatio"
318
+ ],
319
+ "properties": {
320
+ "mode": {
321
+ "type": "string",
322
+ "const": "leased"
323
+ },
324
+ "maxAttempts": {
325
+ "type": "number"
326
+ },
327
+ "retryBaseDelayMs": {
328
+ "type": "number"
329
+ },
330
+ "retryMaxDelayMs": {
331
+ "type": "number"
332
+ },
333
+ "retryJitterRatio": {
334
+ "type": "number"
335
+ },
336
+ "notBefore": {
337
+ "type": "string"
338
+ }
339
+ },
340
+ "additionalProperties": false
341
+ }
342
+ ]
343
+ }
344
+ },
345
+ "additionalProperties": true
346
+ },
347
+ "disposition": {
348
+ "enum": [
349
+ "committed",
350
+ "queued"
351
+ ]
352
+ },
353
+ "authoritative": {
354
+ "type": "boolean"
355
+ }
356
+ },
357
+ "additionalProperties": true
358
+ }
359
+ },
360
+ "requiredScopes": [
361
+ "messages:write"
362
+ ]
363
+ },
364
+ {
365
+ "id": "history",
366
+ "summary": "Read visible messages after an opaque cursor.",
367
+ "mcp": {
368
+ "name": "history"
369
+ },
370
+ "http": {
371
+ "method": "GET",
372
+ "path": "/v2/history",
373
+ "queryAliases": {
374
+ "unacknowledgedBy": [
375
+ "unacked_by"
376
+ ]
377
+ }
378
+ },
379
+ "cli": {
380
+ "command": "history",
381
+ "aliases": [
382
+ "inbox",
383
+ "sent"
384
+ ],
385
+ "options": [
386
+ "cursor",
387
+ "limit",
388
+ "type",
389
+ "category",
390
+ "mailbox",
391
+ "receipt-state",
392
+ "source",
393
+ "project",
394
+ "since",
395
+ "unacked-by",
396
+ "thread-id",
397
+ "latest"
398
+ ],
399
+ "outputSchema": {
400
+ "type": "object",
401
+ "required": [
402
+ "messages"
403
+ ],
404
+ "properties": {
405
+ "messages": {
406
+ "type": "array",
407
+ "items": {
408
+ "type": "object",
409
+ "required": [
410
+ "id",
411
+ "workspace",
412
+ "source",
413
+ "type",
414
+ "content",
415
+ "contentType",
416
+ "sequence",
417
+ "createdAt",
418
+ "targets",
419
+ "priority",
420
+ "deliveryPolicy"
421
+ ],
422
+ "properties": {
423
+ "id": {
424
+ "type": "string"
425
+ },
426
+ "workspace": {
427
+ "type": "string"
428
+ },
429
+ "project": {
430
+ "type": "string"
431
+ },
432
+ "source": {
433
+ "type": "string"
434
+ },
435
+ "type": {
436
+ "type": "string"
437
+ },
438
+ "content": {
439
+ "type": "string"
440
+ },
441
+ "contentType": {
442
+ "type": "string"
443
+ },
444
+ "sequence": {
445
+ "type": "string"
446
+ },
447
+ "createdAt": {
448
+ "type": "string"
449
+ },
450
+ "data": {},
451
+ "targets": {
452
+ "type": "array",
453
+ "items": {
454
+ "type": "string"
455
+ }
456
+ },
457
+ "threadId": {
458
+ "type": "string"
459
+ },
460
+ "replyToId": {
461
+ "type": "string"
462
+ },
463
+ "correlationId": {
464
+ "type": "string"
465
+ },
466
+ "causationId": {
467
+ "type": "string"
468
+ },
469
+ "priority": {
470
+ "enum": [
471
+ "info",
472
+ "high",
473
+ "urgent"
474
+ ]
475
+ },
476
+ "expiresAt": {
477
+ "type": "string"
478
+ },
479
+ "idempotencyKey": {
480
+ "type": "string"
481
+ },
482
+ "atribReceiptId": {
483
+ "type": "string"
484
+ },
485
+ "informedBy": {
486
+ "type": "array",
487
+ "items": {
488
+ "type": "string"
489
+ }
490
+ },
491
+ "metadata": {},
492
+ "deliveryPolicy": {
493
+ "anyOf": [
494
+ {
495
+ "type": "object",
496
+ "required": [
497
+ "mode"
498
+ ],
499
+ "properties": {
500
+ "mode": {
501
+ "type": "string",
502
+ "const": "mailbox"
503
+ }
504
+ },
505
+ "additionalProperties": false
506
+ },
507
+ {
508
+ "type": "object",
509
+ "required": [
510
+ "mode",
511
+ "maxAttempts",
512
+ "retryBaseDelayMs",
513
+ "retryMaxDelayMs",
514
+ "retryJitterRatio"
515
+ ],
516
+ "properties": {
517
+ "mode": {
518
+ "type": "string",
519
+ "const": "leased"
520
+ },
521
+ "maxAttempts": {
522
+ "type": "number"
523
+ },
524
+ "retryBaseDelayMs": {
525
+ "type": "number"
526
+ },
527
+ "retryMaxDelayMs": {
528
+ "type": "number"
529
+ },
530
+ "retryJitterRatio": {
531
+ "type": "number"
532
+ },
533
+ "notBefore": {
534
+ "type": "string"
535
+ }
536
+ },
537
+ "additionalProperties": false
538
+ }
539
+ ]
540
+ }
541
+ },
542
+ "additionalProperties": true
543
+ }
544
+ },
545
+ "cursor": {
546
+ "type": "string"
547
+ },
548
+ "source": {
549
+ "enum": [
550
+ "remote",
551
+ "cache"
552
+ ]
553
+ },
554
+ "stale": {
555
+ "type": "boolean"
556
+ },
557
+ "degraded": {
558
+ "type": "boolean"
559
+ },
560
+ "acknowledgements": {
561
+ "enum": [
562
+ "authoritative",
563
+ "unknown"
564
+ ]
565
+ },
566
+ "lastSyncedAt": {
567
+ "type": "string"
568
+ }
569
+ },
570
+ "additionalProperties": true
571
+ },
572
+ "variants": [
573
+ {
574
+ "command": "get",
575
+ "condition": {
576
+ "kind": "always"
577
+ },
578
+ "routesTo": "history",
579
+ "options": [
580
+ "cursor",
581
+ "limit",
582
+ "type",
583
+ "category",
584
+ "mailbox",
585
+ "receipt-state",
586
+ "source",
587
+ "project",
588
+ "since",
589
+ "unacked-by",
590
+ "thread-id",
591
+ "latest"
592
+ ],
593
+ "outputSchema": {
594
+ "type": "array",
595
+ "items": {
596
+ "type": "object",
597
+ "required": [
598
+ "id",
599
+ "source",
600
+ "category",
601
+ "content",
602
+ "priority",
603
+ "project",
604
+ "metadata",
605
+ "created_at"
606
+ ],
607
+ "properties": {
608
+ "id": {
609
+ "anyOf": [
610
+ {
611
+ "type": "string"
612
+ },
613
+ {
614
+ "type": "number"
615
+ }
616
+ ]
617
+ },
618
+ "source": {
619
+ "type": "string"
620
+ },
621
+ "category": {
622
+ "type": "string"
623
+ },
624
+ "content": {
625
+ "type": "string"
626
+ },
627
+ "priority": {
628
+ "enum": [
629
+ "info",
630
+ "high",
631
+ "urgent"
632
+ ]
633
+ },
634
+ "project": {
635
+ "anyOf": [
636
+ {
637
+ "type": "string"
638
+ },
639
+ {
640
+ "type": "null"
641
+ }
642
+ ]
643
+ },
644
+ "metadata": {},
645
+ "created_at": {
646
+ "type": "string"
647
+ }
648
+ },
649
+ "additionalProperties": false
650
+ }
651
+ }
652
+ }
653
+ ]
654
+ },
655
+ "requiredScopes": [
656
+ "messages:read"
657
+ ]
658
+ },
659
+ {
660
+ "id": "record_receipt",
661
+ "summary": "Record caller-bound inbox read receipts.",
662
+ "http": {
663
+ "method": "POST",
664
+ "path": "/v2/receipts"
665
+ },
666
+ "cli": {
667
+ "command": "acknowledge",
668
+ "aliases": [
669
+ "receipt"
670
+ ],
671
+ "options": [
672
+ "ids"
673
+ ],
674
+ "outputSchema": {
675
+ "type": "object",
676
+ "required": [
677
+ "acknowledged",
678
+ "agent"
679
+ ],
680
+ "properties": {
681
+ "acknowledged": {
682
+ "type": "number"
683
+ },
684
+ "agent": {
685
+ "type": "string"
686
+ }
687
+ },
688
+ "additionalProperties": true
689
+ },
690
+ "variants": [
691
+ {
692
+ "command": "ack",
693
+ "condition": {
694
+ "kind": "option-present",
695
+ "option": "ids"
696
+ },
697
+ "routesTo": "record_receipt",
698
+ "options": [
699
+ "ids"
700
+ ],
701
+ "outputSchema": {
702
+ "type": "object",
703
+ "required": [
704
+ "acknowledged",
705
+ "agent"
706
+ ],
707
+ "properties": {
708
+ "acknowledged": {
709
+ "type": "number"
710
+ },
711
+ "agent": {
712
+ "type": "string"
713
+ }
714
+ },
715
+ "additionalProperties": true
716
+ }
717
+ }
718
+ ]
719
+ },
720
+ "requiredScopes": [
721
+ "receipts:write"
722
+ ]
723
+ },
724
+ {
725
+ "id": "claim_delivery",
726
+ "summary": "Atomically claim the next targeted delivery.",
727
+ "mcp": {
728
+ "name": "claim"
729
+ },
730
+ "http": {
731
+ "method": "POST",
732
+ "path": "/v2/deliveries/claim"
733
+ },
734
+ "cli": {
735
+ "command": "claim",
736
+ "options": [
737
+ "lease-ms",
738
+ "max-attempts"
739
+ ],
740
+ "outputSchema": {
741
+ "anyOf": [
742
+ {
743
+ "type": "object",
744
+ "required": [
745
+ "delivery",
746
+ "leaseToken"
747
+ ],
748
+ "properties": {
749
+ "delivery": {
750
+ "type": "object",
751
+ "required": [
752
+ "id",
753
+ "messageId",
754
+ "workspace",
755
+ "recipient",
756
+ "state",
757
+ "attempt",
758
+ "cycleAttempt",
759
+ "requeueCount",
760
+ "createdAt",
761
+ "priorityRank",
762
+ "availableAt",
763
+ "lastAction"
764
+ ],
765
+ "properties": {
766
+ "id": {
767
+ "type": "string"
768
+ },
769
+ "messageId": {
770
+ "type": "string"
771
+ },
772
+ "workspace": {
773
+ "type": "string"
774
+ },
775
+ "recipient": {
776
+ "type": "string"
777
+ },
778
+ "state": {
779
+ "enum": [
780
+ "pending",
781
+ "claimed",
782
+ "acked",
783
+ "retrying",
784
+ "dead",
785
+ "cancelled"
786
+ ]
787
+ },
788
+ "attempt": {
789
+ "type": "number"
790
+ },
791
+ "cycleAttempt": {
792
+ "type": "number"
793
+ },
794
+ "requeueCount": {
795
+ "type": "number"
796
+ },
797
+ "createdAt": {
798
+ "type": "string"
799
+ },
800
+ "priorityRank": {
801
+ "type": "number"
802
+ },
803
+ "availableAt": {
804
+ "type": "string"
805
+ },
806
+ "leaseToken": {
807
+ "type": "string"
808
+ },
809
+ "leaseOwner": {
810
+ "type": "string"
811
+ },
812
+ "leaseExpiresAt": {
813
+ "type": "string"
814
+ },
815
+ "lastError": {
816
+ "type": "string"
817
+ },
818
+ "lastActor": {
819
+ "type": "string"
820
+ },
821
+ "lastAction": {
822
+ "enum": [
823
+ "created",
824
+ "claim",
825
+ "ack",
826
+ "nack_retry",
827
+ "nack_dead",
828
+ "lease_expired",
829
+ "attempts_exhausted",
830
+ "message_expired",
831
+ "cancel",
832
+ "requeue"
833
+ ]
834
+ }
835
+ },
836
+ "additionalProperties": true
837
+ },
838
+ "leaseToken": {
839
+ "type": "string"
840
+ }
841
+ },
842
+ "additionalProperties": true
843
+ },
844
+ {
845
+ "type": "null"
846
+ }
847
+ ]
848
+ }
849
+ },
850
+ "requiredScopes": [
851
+ "deliveries:claim"
852
+ ]
853
+ },
854
+ {
855
+ "id": "list_deliveries",
856
+ "summary": "List caller-visible deliveries.",
857
+ "mcp": {
858
+ "name": "list_deliveries"
859
+ },
860
+ "http": {
861
+ "method": "GET",
862
+ "path": "/v2/deliveries"
863
+ },
864
+ "cli": {
865
+ "command": "deliveries",
866
+ "aliases": [
867
+ "dead-letters"
868
+ ],
869
+ "options": [
870
+ "cursor",
871
+ "limit",
872
+ "role",
873
+ "message-id",
874
+ "recipient",
875
+ "state"
876
+ ],
877
+ "outputSchema": {
878
+ "type": "object",
879
+ "required": [
880
+ "deliveries"
881
+ ],
882
+ "properties": {
883
+ "deliveries": {
884
+ "type": "array",
885
+ "items": {
886
+ "type": "object",
887
+ "required": [
888
+ "id",
889
+ "messageId",
890
+ "workspace",
891
+ "recipient",
892
+ "state",
893
+ "attempt",
894
+ "cycleAttempt",
895
+ "requeueCount",
896
+ "createdAt",
897
+ "priorityRank",
898
+ "availableAt",
899
+ "lastAction"
900
+ ],
901
+ "properties": {
902
+ "id": {
903
+ "type": "string"
904
+ },
905
+ "messageId": {
906
+ "type": "string"
907
+ },
908
+ "workspace": {
909
+ "type": "string"
910
+ },
911
+ "recipient": {
912
+ "type": "string"
913
+ },
914
+ "state": {
915
+ "enum": [
916
+ "pending",
917
+ "claimed",
918
+ "acked",
919
+ "retrying",
920
+ "dead",
921
+ "cancelled"
922
+ ]
923
+ },
924
+ "attempt": {
925
+ "type": "number"
926
+ },
927
+ "cycleAttempt": {
928
+ "type": "number"
929
+ },
930
+ "requeueCount": {
931
+ "type": "number"
932
+ },
933
+ "createdAt": {
934
+ "type": "string"
935
+ },
936
+ "priorityRank": {
937
+ "type": "number"
938
+ },
939
+ "availableAt": {
940
+ "type": "string"
941
+ },
942
+ "leaseToken": {
943
+ "type": "string"
944
+ },
945
+ "leaseOwner": {
946
+ "type": "string"
947
+ },
948
+ "leaseExpiresAt": {
949
+ "type": "string"
950
+ },
951
+ "lastError": {
952
+ "type": "string"
953
+ },
954
+ "lastActor": {
955
+ "type": "string"
956
+ },
957
+ "lastAction": {
958
+ "enum": [
959
+ "created",
960
+ "claim",
961
+ "ack",
962
+ "nack_retry",
963
+ "nack_dead",
964
+ "lease_expired",
965
+ "attempts_exhausted",
966
+ "message_expired",
967
+ "cancel",
968
+ "requeue"
969
+ ]
970
+ }
971
+ },
972
+ "additionalProperties": true
973
+ }
974
+ },
975
+ "cursor": {
976
+ "type": "string"
977
+ }
978
+ },
979
+ "additionalProperties": true
980
+ }
981
+ },
982
+ "requiredScopes": [
983
+ "deliveries:read"
984
+ ]
985
+ },
986
+ {
987
+ "id": "list_delivery_events",
988
+ "summary": "List the append-only event history for a delivery.",
989
+ "mcp": {
990
+ "name": "list_delivery_events"
991
+ },
992
+ "http": {
993
+ "method": "GET",
994
+ "path": "/v2/deliveries/{deliveryId}/events"
995
+ },
996
+ "cli": {
997
+ "command": "delivery-events",
998
+ "options": [
999
+ "delivery-id",
1000
+ "cursor",
1001
+ "limit"
1002
+ ],
1003
+ "outputSchema": {
1004
+ "type": "object",
1005
+ "required": [
1006
+ "events"
1007
+ ],
1008
+ "properties": {
1009
+ "events": {
1010
+ "type": "array",
1011
+ "items": {
1012
+ "type": "object",
1013
+ "required": [
1014
+ "sequence",
1015
+ "deliveryId",
1016
+ "messageId",
1017
+ "workspace",
1018
+ "recipient",
1019
+ "toState",
1020
+ "attempt",
1021
+ "cycleAttempt",
1022
+ "requeueCount",
1023
+ "actor",
1024
+ "action",
1025
+ "createdAt"
1026
+ ],
1027
+ "properties": {
1028
+ "sequence": {
1029
+ "type": "string"
1030
+ },
1031
+ "deliveryId": {
1032
+ "type": "string"
1033
+ },
1034
+ "messageId": {
1035
+ "type": "string"
1036
+ },
1037
+ "workspace": {
1038
+ "type": "string"
1039
+ },
1040
+ "recipient": {
1041
+ "type": "string"
1042
+ },
1043
+ "fromState": {
1044
+ "enum": [
1045
+ "pending",
1046
+ "claimed",
1047
+ "acked",
1048
+ "retrying",
1049
+ "dead",
1050
+ "cancelled"
1051
+ ]
1052
+ },
1053
+ "toState": {
1054
+ "enum": [
1055
+ "pending",
1056
+ "claimed",
1057
+ "acked",
1058
+ "retrying",
1059
+ "dead",
1060
+ "cancelled"
1061
+ ]
1062
+ },
1063
+ "attempt": {
1064
+ "type": "number"
1065
+ },
1066
+ "cycleAttempt": {
1067
+ "type": "number"
1068
+ },
1069
+ "requeueCount": {
1070
+ "type": "number"
1071
+ },
1072
+ "leaseOwner": {
1073
+ "type": "string"
1074
+ },
1075
+ "error": {
1076
+ "type": "string"
1077
+ },
1078
+ "actor": {
1079
+ "type": "string"
1080
+ },
1081
+ "action": {
1082
+ "enum": [
1083
+ "created",
1084
+ "claim",
1085
+ "ack",
1086
+ "nack_retry",
1087
+ "nack_dead",
1088
+ "lease_expired",
1089
+ "attempts_exhausted",
1090
+ "message_expired",
1091
+ "cancel",
1092
+ "requeue"
1093
+ ]
1094
+ },
1095
+ "createdAt": {
1096
+ "type": "string"
1097
+ }
1098
+ },
1099
+ "additionalProperties": true
1100
+ }
1101
+ },
1102
+ "cursor": {
1103
+ "type": "string"
1104
+ }
1105
+ },
1106
+ "additionalProperties": true
1107
+ }
1108
+ },
1109
+ "requiredScopes": [
1110
+ "deliveries:read"
1111
+ ]
1112
+ },
1113
+ {
1114
+ "id": "cancel_delivery",
1115
+ "summary": "Cancel a delivery as its publisher.",
1116
+ "mcp": {
1117
+ "name": "cancel_delivery"
1118
+ },
1119
+ "http": {
1120
+ "method": "POST",
1121
+ "path": "/v2/deliveries/{deliveryId}/cancel"
1122
+ },
1123
+ "cli": {
1124
+ "command": "cancel",
1125
+ "options": [
1126
+ "delivery-id"
1127
+ ],
1128
+ "outputSchema": {
1129
+ "anyOf": [
1130
+ {
1131
+ "type": "object",
1132
+ "required": [
1133
+ "id",
1134
+ "messageId",
1135
+ "workspace",
1136
+ "recipient",
1137
+ "state",
1138
+ "attempt",
1139
+ "cycleAttempt",
1140
+ "requeueCount",
1141
+ "createdAt",
1142
+ "priorityRank",
1143
+ "availableAt",
1144
+ "lastAction"
1145
+ ],
1146
+ "properties": {
1147
+ "id": {
1148
+ "type": "string"
1149
+ },
1150
+ "messageId": {
1151
+ "type": "string"
1152
+ },
1153
+ "workspace": {
1154
+ "type": "string"
1155
+ },
1156
+ "recipient": {
1157
+ "type": "string"
1158
+ },
1159
+ "state": {
1160
+ "enum": [
1161
+ "pending",
1162
+ "claimed",
1163
+ "acked",
1164
+ "retrying",
1165
+ "dead",
1166
+ "cancelled"
1167
+ ]
1168
+ },
1169
+ "attempt": {
1170
+ "type": "number"
1171
+ },
1172
+ "cycleAttempt": {
1173
+ "type": "number"
1174
+ },
1175
+ "requeueCount": {
1176
+ "type": "number"
1177
+ },
1178
+ "createdAt": {
1179
+ "type": "string"
1180
+ },
1181
+ "priorityRank": {
1182
+ "type": "number"
1183
+ },
1184
+ "availableAt": {
1185
+ "type": "string"
1186
+ },
1187
+ "leaseToken": {
1188
+ "type": "string"
1189
+ },
1190
+ "leaseOwner": {
1191
+ "type": "string"
1192
+ },
1193
+ "leaseExpiresAt": {
1194
+ "type": "string"
1195
+ },
1196
+ "lastError": {
1197
+ "type": "string"
1198
+ },
1199
+ "lastActor": {
1200
+ "type": "string"
1201
+ },
1202
+ "lastAction": {
1203
+ "enum": [
1204
+ "created",
1205
+ "claim",
1206
+ "ack",
1207
+ "nack_retry",
1208
+ "nack_dead",
1209
+ "lease_expired",
1210
+ "attempts_exhausted",
1211
+ "message_expired",
1212
+ "cancel",
1213
+ "requeue"
1214
+ ]
1215
+ }
1216
+ },
1217
+ "additionalProperties": true
1218
+ },
1219
+ {
1220
+ "type": "null"
1221
+ }
1222
+ ]
1223
+ }
1224
+ },
1225
+ "requiredScopes": [
1226
+ "deliveries:manage"
1227
+ ]
1228
+ },
1229
+ {
1230
+ "id": "requeue_delivery",
1231
+ "summary": "Requeue a delivery as its publisher.",
1232
+ "mcp": {
1233
+ "name": "requeue_delivery"
1234
+ },
1235
+ "http": {
1236
+ "method": "POST",
1237
+ "path": "/v2/deliveries/{deliveryId}/requeue"
1238
+ },
1239
+ "cli": {
1240
+ "command": "requeue",
1241
+ "options": [
1242
+ "delivery-id"
1243
+ ],
1244
+ "outputSchema": {
1245
+ "anyOf": [
1246
+ {
1247
+ "type": "object",
1248
+ "required": [
1249
+ "id",
1250
+ "messageId",
1251
+ "workspace",
1252
+ "recipient",
1253
+ "state",
1254
+ "attempt",
1255
+ "cycleAttempt",
1256
+ "requeueCount",
1257
+ "createdAt",
1258
+ "priorityRank",
1259
+ "availableAt",
1260
+ "lastAction"
1261
+ ],
1262
+ "properties": {
1263
+ "id": {
1264
+ "type": "string"
1265
+ },
1266
+ "messageId": {
1267
+ "type": "string"
1268
+ },
1269
+ "workspace": {
1270
+ "type": "string"
1271
+ },
1272
+ "recipient": {
1273
+ "type": "string"
1274
+ },
1275
+ "state": {
1276
+ "enum": [
1277
+ "pending",
1278
+ "claimed",
1279
+ "acked",
1280
+ "retrying",
1281
+ "dead",
1282
+ "cancelled"
1283
+ ]
1284
+ },
1285
+ "attempt": {
1286
+ "type": "number"
1287
+ },
1288
+ "cycleAttempt": {
1289
+ "type": "number"
1290
+ },
1291
+ "requeueCount": {
1292
+ "type": "number"
1293
+ },
1294
+ "createdAt": {
1295
+ "type": "string"
1296
+ },
1297
+ "priorityRank": {
1298
+ "type": "number"
1299
+ },
1300
+ "availableAt": {
1301
+ "type": "string"
1302
+ },
1303
+ "leaseToken": {
1304
+ "type": "string"
1305
+ },
1306
+ "leaseOwner": {
1307
+ "type": "string"
1308
+ },
1309
+ "leaseExpiresAt": {
1310
+ "type": "string"
1311
+ },
1312
+ "lastError": {
1313
+ "type": "string"
1314
+ },
1315
+ "lastActor": {
1316
+ "type": "string"
1317
+ },
1318
+ "lastAction": {
1319
+ "enum": [
1320
+ "created",
1321
+ "claim",
1322
+ "ack",
1323
+ "nack_retry",
1324
+ "nack_dead",
1325
+ "lease_expired",
1326
+ "attempts_exhausted",
1327
+ "message_expired",
1328
+ "cancel",
1329
+ "requeue"
1330
+ ]
1331
+ }
1332
+ },
1333
+ "additionalProperties": true
1334
+ },
1335
+ {
1336
+ "type": "null"
1337
+ }
1338
+ ]
1339
+ }
1340
+ },
1341
+ "requiredScopes": [
1342
+ "deliveries:manage"
1343
+ ]
1344
+ },
1345
+ {
1346
+ "id": "extend_delivery",
1347
+ "summary": "Extend a claimed delivery lease.",
1348
+ "mcp": {
1349
+ "name": "extend"
1350
+ },
1351
+ "http": {
1352
+ "method": "POST",
1353
+ "path": "/v2/deliveries/{deliveryId}/extend"
1354
+ },
1355
+ "cli": {
1356
+ "command": "extend",
1357
+ "options": [
1358
+ "delivery-id",
1359
+ "lease-token",
1360
+ "lease-ms"
1361
+ ],
1362
+ "outputSchema": {
1363
+ "anyOf": [
1364
+ {
1365
+ "type": "object",
1366
+ "required": [
1367
+ "id",
1368
+ "messageId",
1369
+ "workspace",
1370
+ "recipient",
1371
+ "state",
1372
+ "attempt",
1373
+ "cycleAttempt",
1374
+ "requeueCount",
1375
+ "createdAt",
1376
+ "priorityRank",
1377
+ "availableAt",
1378
+ "lastAction"
1379
+ ],
1380
+ "properties": {
1381
+ "id": {
1382
+ "type": "string"
1383
+ },
1384
+ "messageId": {
1385
+ "type": "string"
1386
+ },
1387
+ "workspace": {
1388
+ "type": "string"
1389
+ },
1390
+ "recipient": {
1391
+ "type": "string"
1392
+ },
1393
+ "state": {
1394
+ "enum": [
1395
+ "pending",
1396
+ "claimed",
1397
+ "acked",
1398
+ "retrying",
1399
+ "dead",
1400
+ "cancelled"
1401
+ ]
1402
+ },
1403
+ "attempt": {
1404
+ "type": "number"
1405
+ },
1406
+ "cycleAttempt": {
1407
+ "type": "number"
1408
+ },
1409
+ "requeueCount": {
1410
+ "type": "number"
1411
+ },
1412
+ "createdAt": {
1413
+ "type": "string"
1414
+ },
1415
+ "priorityRank": {
1416
+ "type": "number"
1417
+ },
1418
+ "availableAt": {
1419
+ "type": "string"
1420
+ },
1421
+ "leaseToken": {
1422
+ "type": "string"
1423
+ },
1424
+ "leaseOwner": {
1425
+ "type": "string"
1426
+ },
1427
+ "leaseExpiresAt": {
1428
+ "type": "string"
1429
+ },
1430
+ "lastError": {
1431
+ "type": "string"
1432
+ },
1433
+ "lastActor": {
1434
+ "type": "string"
1435
+ },
1436
+ "lastAction": {
1437
+ "enum": [
1438
+ "created",
1439
+ "claim",
1440
+ "ack",
1441
+ "nack_retry",
1442
+ "nack_dead",
1443
+ "lease_expired",
1444
+ "attempts_exhausted",
1445
+ "message_expired",
1446
+ "cancel",
1447
+ "requeue"
1448
+ ]
1449
+ }
1450
+ },
1451
+ "additionalProperties": true
1452
+ },
1453
+ {
1454
+ "type": "null"
1455
+ }
1456
+ ]
1457
+ }
1458
+ },
1459
+ "requiredScopes": [
1460
+ "deliveries:settle"
1461
+ ]
1462
+ },
1463
+ {
1464
+ "id": "acknowledge_delivery",
1465
+ "summary": "Settle a claimed delivery successfully.",
1466
+ "mcp": {
1467
+ "name": "acknowledge"
1468
+ },
1469
+ "http": {
1470
+ "method": "POST",
1471
+ "path": "/v2/deliveries/{deliveryId}/ack"
1472
+ },
1473
+ "cli": {
1474
+ "command": "ack",
1475
+ "options": [
1476
+ "delivery-id",
1477
+ "lease-token"
1478
+ ],
1479
+ "outputSchema": {
1480
+ "anyOf": [
1481
+ {
1482
+ "type": "object",
1483
+ "required": [
1484
+ "id",
1485
+ "messageId",
1486
+ "workspace",
1487
+ "recipient",
1488
+ "state",
1489
+ "attempt",
1490
+ "cycleAttempt",
1491
+ "requeueCount",
1492
+ "createdAt",
1493
+ "priorityRank",
1494
+ "availableAt",
1495
+ "lastAction"
1496
+ ],
1497
+ "properties": {
1498
+ "id": {
1499
+ "type": "string"
1500
+ },
1501
+ "messageId": {
1502
+ "type": "string"
1503
+ },
1504
+ "workspace": {
1505
+ "type": "string"
1506
+ },
1507
+ "recipient": {
1508
+ "type": "string"
1509
+ },
1510
+ "state": {
1511
+ "enum": [
1512
+ "pending",
1513
+ "claimed",
1514
+ "acked",
1515
+ "retrying",
1516
+ "dead",
1517
+ "cancelled"
1518
+ ]
1519
+ },
1520
+ "attempt": {
1521
+ "type": "number"
1522
+ },
1523
+ "cycleAttempt": {
1524
+ "type": "number"
1525
+ },
1526
+ "requeueCount": {
1527
+ "type": "number"
1528
+ },
1529
+ "createdAt": {
1530
+ "type": "string"
1531
+ },
1532
+ "priorityRank": {
1533
+ "type": "number"
1534
+ },
1535
+ "availableAt": {
1536
+ "type": "string"
1537
+ },
1538
+ "leaseToken": {
1539
+ "type": "string"
1540
+ },
1541
+ "leaseOwner": {
1542
+ "type": "string"
1543
+ },
1544
+ "leaseExpiresAt": {
1545
+ "type": "string"
1546
+ },
1547
+ "lastError": {
1548
+ "type": "string"
1549
+ },
1550
+ "lastActor": {
1551
+ "type": "string"
1552
+ },
1553
+ "lastAction": {
1554
+ "enum": [
1555
+ "created",
1556
+ "claim",
1557
+ "ack",
1558
+ "nack_retry",
1559
+ "nack_dead",
1560
+ "lease_expired",
1561
+ "attempts_exhausted",
1562
+ "message_expired",
1563
+ "cancel",
1564
+ "requeue"
1565
+ ]
1566
+ }
1567
+ },
1568
+ "additionalProperties": true
1569
+ },
1570
+ {
1571
+ "type": "null"
1572
+ }
1573
+ ]
1574
+ }
1575
+ },
1576
+ "requiredScopes": [
1577
+ "deliveries:settle"
1578
+ ]
1579
+ },
1580
+ {
1581
+ "id": "negative_acknowledge_delivery",
1582
+ "summary": "Settle a claimed delivery for retry or dead letter.",
1583
+ "mcp": {
1584
+ "name": "negative_acknowledge"
1585
+ },
1586
+ "http": {
1587
+ "method": "POST",
1588
+ "path": "/v2/deliveries/{deliveryId}/nack"
1589
+ },
1590
+ "cli": {
1591
+ "command": "nack",
1592
+ "options": [
1593
+ "delivery-id",
1594
+ "lease-token",
1595
+ "error",
1596
+ "disposition",
1597
+ "dead"
1598
+ ],
1599
+ "outputSchema": {
1600
+ "anyOf": [
1601
+ {
1602
+ "type": "object",
1603
+ "required": [
1604
+ "id",
1605
+ "messageId",
1606
+ "workspace",
1607
+ "recipient",
1608
+ "state",
1609
+ "attempt",
1610
+ "cycleAttempt",
1611
+ "requeueCount",
1612
+ "createdAt",
1613
+ "priorityRank",
1614
+ "availableAt",
1615
+ "lastAction"
1616
+ ],
1617
+ "properties": {
1618
+ "id": {
1619
+ "type": "string"
1620
+ },
1621
+ "messageId": {
1622
+ "type": "string"
1623
+ },
1624
+ "workspace": {
1625
+ "type": "string"
1626
+ },
1627
+ "recipient": {
1628
+ "type": "string"
1629
+ },
1630
+ "state": {
1631
+ "enum": [
1632
+ "pending",
1633
+ "claimed",
1634
+ "acked",
1635
+ "retrying",
1636
+ "dead",
1637
+ "cancelled"
1638
+ ]
1639
+ },
1640
+ "attempt": {
1641
+ "type": "number"
1642
+ },
1643
+ "cycleAttempt": {
1644
+ "type": "number"
1645
+ },
1646
+ "requeueCount": {
1647
+ "type": "number"
1648
+ },
1649
+ "createdAt": {
1650
+ "type": "string"
1651
+ },
1652
+ "priorityRank": {
1653
+ "type": "number"
1654
+ },
1655
+ "availableAt": {
1656
+ "type": "string"
1657
+ },
1658
+ "leaseToken": {
1659
+ "type": "string"
1660
+ },
1661
+ "leaseOwner": {
1662
+ "type": "string"
1663
+ },
1664
+ "leaseExpiresAt": {
1665
+ "type": "string"
1666
+ },
1667
+ "lastError": {
1668
+ "type": "string"
1669
+ },
1670
+ "lastActor": {
1671
+ "type": "string"
1672
+ },
1673
+ "lastAction": {
1674
+ "enum": [
1675
+ "created",
1676
+ "claim",
1677
+ "ack",
1678
+ "nack_retry",
1679
+ "nack_dead",
1680
+ "lease_expired",
1681
+ "attempts_exhausted",
1682
+ "message_expired",
1683
+ "cancel",
1684
+ "requeue"
1685
+ ]
1686
+ }
1687
+ },
1688
+ "additionalProperties": true
1689
+ },
1690
+ {
1691
+ "type": "null"
1692
+ }
1693
+ ]
1694
+ }
1695
+ },
1696
+ "requiredScopes": [
1697
+ "deliveries:settle"
1698
+ ]
1699
+ },
1700
+ {
1701
+ "id": "heartbeat",
1702
+ "summary": "Publish a leased runtime presence record.",
1703
+ "mcp": {
1704
+ "name": "heartbeat"
1705
+ },
1706
+ "http": {
1707
+ "method": "POST",
1708
+ "path": "/v2/presence/heartbeat"
1709
+ },
1710
+ "cli": {
1711
+ "command": "join",
1712
+ "options": [
1713
+ "lease-ms",
1714
+ "runtime",
1715
+ "capability"
1716
+ ],
1717
+ "outputSchema": {
1718
+ "type": "object",
1719
+ "required": [
1720
+ "workspace",
1721
+ "agent",
1722
+ "instance",
1723
+ "capabilities",
1724
+ "leaseExpiresAt",
1725
+ "lastSeenAt"
1726
+ ],
1727
+ "properties": {
1728
+ "workspace": {
1729
+ "type": "string"
1730
+ },
1731
+ "agent": {
1732
+ "type": "string"
1733
+ },
1734
+ "instance": {
1735
+ "type": "string"
1736
+ },
1737
+ "runtimeType": {
1738
+ "type": "string"
1739
+ },
1740
+ "capabilities": {
1741
+ "type": "array",
1742
+ "items": {
1743
+ "type": "string"
1744
+ }
1745
+ },
1746
+ "leaseExpiresAt": {
1747
+ "type": "string"
1748
+ },
1749
+ "lastSeenAt": {
1750
+ "type": "string"
1751
+ }
1752
+ },
1753
+ "additionalProperties": true
1754
+ }
1755
+ },
1756
+ "requiredScopes": [
1757
+ "presence:write"
1758
+ ]
1759
+ },
1760
+ {
1761
+ "id": "presence",
1762
+ "summary": "List active agent runtime instances.",
1763
+ "mcp": {
1764
+ "name": "presence"
1765
+ },
1766
+ "http": {
1767
+ "method": "GET",
1768
+ "path": "/v2/presence"
1769
+ },
1770
+ "cli": {
1771
+ "command": "presence",
1772
+ "options": [],
1773
+ "outputSchema": {
1774
+ "type": "object",
1775
+ "required": [
1776
+ "agents"
1777
+ ],
1778
+ "properties": {
1779
+ "agents": {
1780
+ "type": "array",
1781
+ "items": {
1782
+ "type": "object",
1783
+ "required": [
1784
+ "workspace",
1785
+ "agent",
1786
+ "instance",
1787
+ "capabilities",
1788
+ "leaseExpiresAt",
1789
+ "lastSeenAt"
1790
+ ],
1791
+ "properties": {
1792
+ "workspace": {
1793
+ "type": "string"
1794
+ },
1795
+ "agent": {
1796
+ "type": "string"
1797
+ },
1798
+ "instance": {
1799
+ "type": "string"
1800
+ },
1801
+ "runtimeType": {
1802
+ "type": "string"
1803
+ },
1804
+ "capabilities": {
1805
+ "type": "array",
1806
+ "items": {
1807
+ "type": "string"
1808
+ }
1809
+ },
1810
+ "leaseExpiresAt": {
1811
+ "type": "string"
1812
+ },
1813
+ "lastSeenAt": {
1814
+ "type": "string"
1815
+ }
1816
+ },
1817
+ "additionalProperties": true
1818
+ }
1819
+ }
1820
+ },
1821
+ "additionalProperties": true
1822
+ }
1823
+ },
1824
+ "requiredScopes": [
1825
+ "presence:read"
1826
+ ]
1827
+ }
1828
+ ]
1829
+ }