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