@lostgradient/weft 0.12.0 → 0.14.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 (226) hide show
  1. package/README.md +1 -1
  2. package/dist/cli/api.d.ts +2 -0
  3. package/dist/cli/api.js +3 -4
  4. package/dist/cli/generated/operation-catalog.snapshot.json +508 -12
  5. package/dist/cli/generated/operation-client.generated.d.ts +118 -10
  6. package/dist/cli/generated/operation-client.generated.js +74 -1
  7. package/dist/cli/help-text.d.ts +3 -3
  8. package/dist/cli/help-text.js +4 -4
  9. package/dist/cli/operation-catalog-snapshot.d.ts +12 -3
  10. package/dist/cli/operation-catalog-snapshot.js +14 -5
  11. package/dist/cli/operation-client-runtime.d.ts +29 -0
  12. package/dist/cli/schedule.js +1 -3
  13. package/dist/cli/serve-registrations.d.ts +3 -3
  14. package/dist/cli/serve-registrations.js +2 -2
  15. package/dist/cli/shutdown.d.ts +11 -0
  16. package/dist/cli/shutdown.js +25 -0
  17. package/dist/cli/validate.d.ts +1 -1
  18. package/dist/cli/version-check.d.ts +1 -1
  19. package/dist/cli/version-check.js +1 -1
  20. package/dist/cli-main.js +10 -29
  21. package/dist/client/client-storage.d.ts +24 -0
  22. package/dist/client/client-storage.js +14 -0
  23. package/dist/client/handle-delegation.d.ts +3 -3
  24. package/dist/client/handle-delegation.js +2 -2
  25. package/dist/client/http-client-requests.d.ts +5 -3
  26. package/dist/client/http-client-requests.js +20 -2
  27. package/dist/client/http-client-storage.d.ts +3 -0
  28. package/dist/client/http-client-storage.js +82 -0
  29. package/dist/client/http-client.d.ts +9 -6
  30. package/dist/client/http-client.js +13 -18
  31. package/dist/client/http-operations.d.ts +3 -1
  32. package/dist/client/http-operations.js +77 -1
  33. package/dist/client/http-request.d.ts +20 -14
  34. package/dist/client/http-request.js +21 -31
  35. package/dist/client/in-process-operations.d.ts +2 -2
  36. package/dist/client/in-process-operations.js +2 -2
  37. package/dist/client/index.d.ts +5 -1
  38. package/dist/client/index.js +13 -2
  39. package/dist/client/interface.d.ts +26 -26
  40. package/dist/client/local.d.ts +9 -6
  41. package/dist/client/local.js +9 -4
  42. package/dist/client/search-params.js +10 -6
  43. package/dist/client/start-body.d.ts +3 -1
  44. package/dist/client/start-body.js +9 -0
  45. package/dist/core/bulk-workflow-filter.d.ts +2 -1
  46. package/dist/core/bulk-workflow-filter.js +5 -1
  47. package/dist/core/context/parallel-operations.d.ts +0 -2
  48. package/dist/core/context/parallel-operations.js +0 -7
  49. package/dist/core/engine/async-activity-records.d.ts +12 -1
  50. package/dist/core/engine/async-activity-records.js +81 -2
  51. package/dist/core/engine/bulk-operations-purge.js +16 -1
  52. package/dist/core/engine/bulk-operations-shared.js +2 -0
  53. package/dist/core/engine/callback-checkpoint-persistence.d.ts +2 -0
  54. package/dist/core/engine/callback-checkpoint-persistence.js +6 -3
  55. package/dist/core/engine/callback-creators-schedule.d.ts +2 -1
  56. package/dist/core/engine/callback-creators-schedule.js +3 -3
  57. package/dist/core/engine/callback-creators.js +4 -22
  58. package/dist/core/engine/checkpoint-io.d.ts +1 -1
  59. package/dist/core/engine/checkpoint-reads.js +11 -1
  60. package/dist/core/engine/child-workflow.js +15 -6
  61. package/dist/core/engine/construction.js +3 -0
  62. package/dist/core/engine/disposal.js +2 -0
  63. package/dist/core/engine/engine-internal-types.d.ts +4 -1
  64. package/dist/core/engine/fenced-write.d.ts +5 -3
  65. package/dist/core/engine/finalizer-status.d.ts +10 -0
  66. package/dist/core/engine/finalizer-status.js +82 -0
  67. package/dist/core/engine/index.d.ts +26 -2
  68. package/dist/core/engine/index.js +71 -8
  69. package/dist/core/engine/internals.d.ts +3 -0
  70. package/dist/core/engine/lease-health.d.ts +64 -0
  71. package/dist/core/engine/lease-health.js +0 -0
  72. package/dist/core/engine/lease-manager.d.ts +4 -2
  73. package/dist/core/engine/lease-manager.js +32 -4
  74. package/dist/core/engine/lifecycle/recovered-services.js +0 -2
  75. package/dist/core/engine/lifecycle/shared.d.ts +11 -8
  76. package/dist/core/engine/lifecycle/start-batch.js +12 -0
  77. package/dist/core/engine/lifecycle/start.d.ts +1 -1
  78. package/dist/core/engine/lifecycle/start.js +34 -5
  79. package/dist/core/engine/operations-coordination.d.ts +1 -12
  80. package/dist/core/engine/operations-coordination.js +58 -11
  81. package/dist/core/engine/operations-speculate.d.ts +1 -1
  82. package/dist/core/engine/operations-speculate.js +19 -5
  83. package/dist/core/engine/parallel-dispatch.d.ts +1 -1
  84. package/dist/core/engine/parallel-dispatch.js +1 -1
  85. package/dist/core/engine/registration.js +14 -0
  86. package/dist/core/engine/review-list-entries.d.ts +1 -1
  87. package/dist/core/engine/review-list-entries.js +6 -30
  88. package/dist/core/engine/schedule-handle.d.ts +4 -4
  89. package/dist/core/engine/schedule-handle.js +2 -2
  90. package/dist/core/engine/schedule-overlap.d.ts +11 -0
  91. package/dist/core/engine/schedule-overlap.js +50 -0
  92. package/dist/core/engine/schedule-run.d.ts +11 -3
  93. package/dist/core/engine/schedule-run.js +27 -4
  94. package/dist/core/engine/schedule-timer.js +10 -1
  95. package/dist/core/engine/schedules.d.ts +5 -4
  96. package/dist/core/engine/schedules.js +62 -56
  97. package/dist/core/engine/state-utilities.js +1 -1
  98. package/dist/core/engine/storage-io.d.ts +12 -0
  99. package/dist/core/engine/storage-io.js +49 -10
  100. package/dist/core/engine/termination/finalizer-claim.d.ts +8 -6
  101. package/dist/core/engine/termination/finalizer-claim.js +2 -1
  102. package/dist/core/engine/termination/finalizer.js +10 -14
  103. package/dist/core/engine/timeline-coordinator-constants.d.ts +3 -0
  104. package/dist/core/engine/timeline-coordinator-constants.js +1 -0
  105. package/dist/core/engine/timeline-coordinator-detail.d.ts +13 -0
  106. package/dist/core/engine/timeline-coordinator-detail.js +76 -0
  107. package/dist/core/engine/validation/schedule-options.d.ts +8 -1
  108. package/dist/core/engine/validation/schedule-options.js +18 -0
  109. package/dist/core/engine/validation/schedule.d.ts +1 -1
  110. package/dist/core/engine/validation/schedule.js +27 -3
  111. package/dist/core/engine/validation.js +66 -2
  112. package/dist/core/engine/workflow-state-stream.d.ts +5 -1
  113. package/dist/core/engine/workflow-state-stream.js +37 -14
  114. package/dist/core/events/schedule-events.d.ts +3 -4
  115. package/dist/core/events/workflow-events.d.ts +2 -1
  116. package/dist/core/list-filter-validation.d.ts +3 -0
  117. package/dist/core/list-filter-validation.js +11 -0
  118. package/dist/core/registry-snapshot.d.ts +32 -0
  119. package/dist/core/registry-snapshot.js +28 -0
  120. package/dist/core/review/index.d.ts +91 -4
  121. package/dist/core/review/index.js +29 -0
  122. package/dist/core/types/activity.d.ts +52 -5
  123. package/dist/core/types/bulk.d.ts +1 -0
  124. package/dist/core/types/list-options.d.ts +6 -0
  125. package/dist/core/types/options.d.ts +6 -5
  126. package/dist/core/types/reviews.d.ts +2 -2
  127. package/dist/core/types/schedules.d.ts +45 -2
  128. package/dist/core/types/services-resolution.d.ts +5 -5
  129. package/dist/core/types/state.d.ts +64 -0
  130. package/dist/core/types/workflow-log.d.ts +3 -2
  131. package/dist/core/types/workflow-observability.d.ts +50 -0
  132. package/dist/core/types/workflow-observability.js +0 -0
  133. package/dist/core/types/workflow-registry.d.ts +7 -0
  134. package/dist/core/types.d.ts +1 -0
  135. package/dist/core/types.js +1 -0
  136. package/dist/diagnostics/validate.d.ts +9 -30
  137. package/dist/diagnostics/validate.js +83 -21
  138. package/dist/diagnostics/version-check.d.ts +2 -2
  139. package/dist/http.js +2 -2
  140. package/dist/index.d.ts +4 -3
  141. package/dist/indexeddb.js +1 -1
  142. package/dist/server/access-policy-metadata.d.ts +92 -0
  143. package/dist/server/access-policy-metadata.js +78 -0
  144. package/dist/server/fault-to-http.d.ts +3 -7
  145. package/dist/server/fault-to-http.js +2 -34
  146. package/dist/server/handler/index.js +1 -1
  147. package/dist/server/handler/route-dispatch.d.ts +10 -3
  148. package/dist/server/handler/route-dispatch.js +19 -4
  149. package/dist/server/index.d.ts +1 -1
  150. package/dist/server/index.js +1 -0
  151. package/dist/server/interactive-operations.js +2 -0
  152. package/dist/server/openapi-error-responses.js +41 -4
  153. package/dist/server/openapi.d.ts +3 -1
  154. package/dist/server/openapi.js +4 -0
  155. package/dist/server/openrpc-document-schema.d.ts +64 -0
  156. package/dist/server/openrpc-document-schema.js +6 -26
  157. package/dist/server/openrpc.d.ts +4 -0
  158. package/dist/server/openrpc.js +9 -33
  159. package/dist/server/operation-catalog/index.d.ts +1 -1
  160. package/dist/server/operation-catalog/raise-fault.d.ts +2 -1
  161. package/dist/server/operation-catalog/types.d.ts +2 -1
  162. package/dist/server/operation-fault.d.ts +22 -8
  163. package/dist/server/operation-fault.js +65 -13
  164. package/dist/server/operation-registry.d.ts +1 -1
  165. package/dist/server/operations/aggregate-workflows.d.ts +6 -0
  166. package/dist/server/operations/aggregate-workflows.js +3 -2
  167. package/dist/server/operations/async-activity.d.ts +14 -0
  168. package/dist/server/operations/async-activity.js +88 -4
  169. package/dist/server/operations/bulk-filter-helpers.d.ts +3 -0
  170. package/dist/server/operations/bulk-filter-helpers.js +27 -3
  171. package/dist/server/operations/bulk-mutate-workflow-tags.d.ts +6 -0
  172. package/dist/server/operations/bulk-signal-workflows.d.ts +6 -0
  173. package/dist/server/operations/get-stream-chunks.js +2 -7
  174. package/dist/server/operations/get-system-lease.d.ts +19 -0
  175. package/dist/server/operations/get-system-lease.js +48 -0
  176. package/dist/server/operations/get-workflow-observability.d.ts +24 -0
  177. package/dist/server/operations/get-workflow-observability.js +80 -0
  178. package/dist/server/operations/get-workflow-result.js +2 -2
  179. package/dist/server/operations/get-workflow.d.ts +2 -2
  180. package/dist/server/operations/list-filter-query-extractor.js +15 -0
  181. package/dist/server/operations/list-reviews.js +2 -19
  182. package/dist/server/operations/list-workflows.d.ts +6 -0
  183. package/dist/server/operations/list-workflows.js +12 -3
  184. package/dist/server/operations/operation-helpers.d.ts +9 -18
  185. package/dist/server/operations/operation-helpers.js +5 -23
  186. package/dist/server/operations/purge-workflows.d.ts +3 -0
  187. package/dist/server/operations/recover-all.js +1 -9
  188. package/dist/server/operations/single-workflow-control-operation.d.ts +2 -1
  189. package/dist/server/operations/single-workflow-tag-mutation.js +2 -2
  190. package/dist/server/operations/sse-stream.js +2 -7
  191. package/dist/server/operations/storage-capabilities.d.ts +34 -0
  192. package/dist/server/operations/storage-capabilities.js +38 -0
  193. package/dist/server/operations/storage.js +8 -17
  194. package/dist/server/operations/stream-workflow-sse.js +3 -9
  195. package/dist/server/operations/update-schedule.d.ts +8 -0
  196. package/dist/server/operations/update-schedule.js +70 -7
  197. package/dist/server/operations/workflow-events-sse.js +2 -2
  198. package/dist/server/rest-binding.d.ts +7 -6
  199. package/dist/server/rest-bindings.d.ts +2 -13
  200. package/dist/server/rest-bindings.js +19 -10
  201. package/dist/server/task-queue.d.ts +7 -5
  202. package/dist/storage/bounded-ndjson-response.d.ts +5 -0
  203. package/dist/storage/bounded-ndjson-response.js +33 -0
  204. package/dist/storage/capabilities.d.ts +1 -1
  205. package/dist/storage/cloudflare-value-codec.d.ts +5 -3
  206. package/dist/storage/cloudflare-value-codec.js +1 -1
  207. package/dist/storage/compressed-storage.js +1 -1
  208. package/dist/storage/http.js +5 -37
  209. package/dist/storage/index.d.ts +7 -1
  210. package/dist/storage/interface.d.ts +16 -4
  211. package/dist/storage/interface.js +1 -1
  212. package/dist/storage/key-prefixes.d.ts +1 -1
  213. package/dist/storage/key-prefixes.js +4 -0
  214. package/dist/storage/lmdb.js +1 -1
  215. package/dist/storage/memory.js +1 -1
  216. package/dist/storage/neon.d.ts +3 -16
  217. package/dist/storage/neon.js +4 -4
  218. package/dist/storage/postgres.js +4 -4
  219. package/dist/storage/resolve.js +1 -1
  220. package/dist/storage/scoped-storage.js +1 -1
  221. package/dist/storage/testing.js +1 -1
  222. package/dist/storage/turso.js +2 -2
  223. package/dist/version.d.ts +1 -1
  224. package/dist/version.js +1 -1
  225. package/dist/web-extension.js +1 -1
  226. package/package.json +1 -1
@@ -10,7 +10,8 @@
10
10
  "tags": ["Activities"],
11
11
  "destructive": true,
12
12
  "access": {
13
- "kind": "public"
13
+ "kind": "scoped",
14
+ "scopes": ["workflows:write"]
14
15
  },
15
16
  "transports": {
16
17
  "http": true,
@@ -51,7 +52,8 @@
51
52
  "tags": ["Activities"],
52
53
  "destructive": true,
53
54
  "access": {
54
- "kind": "public"
55
+ "kind": "scoped",
56
+ "scopes": ["workflows:write"]
55
57
  },
56
58
  "transports": {
57
59
  "http": true,
@@ -811,7 +813,7 @@
811
813
  "name": "weft.schedules.update",
812
814
  "kind": "unary",
813
815
  "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.",
816
+ "description": "Update an existing recurring schedule by `id`, replacing its recurrence specification and optionally changing description, overlap, backfill, or jitter. Omitted options retain their persisted values; schedule id, workflow type, and input remain unchanged. Returns null on success. Faults with NotFound when no schedule with the given id exists and InvalidParams for malformed fields.",
815
817
  "tags": ["Schedules"],
816
818
  "destructive": false,
817
819
  "access": {
@@ -823,16 +825,22 @@
823
825
  "jsonRpcWebSocket": true,
824
826
  "jsonRpcStdio": true
825
827
  },
826
- "producibleFaults": ["Conflict", "NotFound"],
828
+ "producibleFaults": ["Conflict", "InvalidParams", "NotFound"],
827
829
  "inputSchema": {
828
830
  "additionalProperties": false,
829
831
  "properties": {
832
+ "backfill": {},
830
833
  "cronExpression": {
831
834
  "description": "Cron expression. Supply exactly one of cronExpression or every; runtime validation requires a non-empty string."
832
835
  },
836
+ "description": {
837
+ "description": "Operator-facing schedule description. Runtime validation requires a string."
838
+ },
833
839
  "every": {
834
840
  "description": "Interval period (duration string or milliseconds). Supply exactly one of cronExpression or every."
835
841
  },
842
+ "jitter": {},
843
+ "overlap": {},
836
844
  "scheduleId": {
837
845
  "minLength": 1,
838
846
  "type": "string"
@@ -853,7 +861,7 @@
853
861
  "destructive": true,
854
862
  "access": {
855
863
  "kind": "scoped",
856
- "scopes": ["storage:admin", "storage:write"]
864
+ "scopes": ["storage:admin"]
857
865
  },
858
866
  "transports": {
859
867
  "http": true,
@@ -914,6 +922,64 @@
914
922
  "type": "null"
915
923
  }
916
924
  },
925
+ {
926
+ "name": "weft.storage.capabilities",
927
+ "kind": "unary",
928
+ "summary": "Report the connected storage backend's capability profile",
929
+ "tags": ["Storage"],
930
+ "destructive": false,
931
+ "access": {
932
+ "kind": "scoped",
933
+ "scopes": ["storage:admin", "storage:read"]
934
+ },
935
+ "transports": {
936
+ "http": true,
937
+ "jsonRpcHttp": true,
938
+ "jsonRpcWebSocket": true,
939
+ "jsonRpcStdio": true
940
+ },
941
+ "producibleFaults": [],
942
+ "inputSchema": {
943
+ "additionalProperties": false,
944
+ "properties": {},
945
+ "type": "object"
946
+ },
947
+ "outputSchema": {
948
+ "additionalProperties": false,
949
+ "properties": {
950
+ "atomicBatch": {
951
+ "type": "boolean"
952
+ },
953
+ "boundedRangeDelete": {
954
+ "type": "boolean"
955
+ },
956
+ "conditionalBatch": {
957
+ "type": "boolean"
958
+ },
959
+ "persistence": {
960
+ "enum": ["ephemeral", "local", "remote"],
961
+ "type": "string"
962
+ },
963
+ "readAfterWrite": {
964
+ "enum": ["linearizable", "session", "eventual"],
965
+ "type": "string"
966
+ },
967
+ "scanConsistency": {
968
+ "enum": ["snapshot", "best-effort"],
969
+ "type": "string"
970
+ }
971
+ },
972
+ "required": [
973
+ "persistence",
974
+ "readAfterWrite",
975
+ "scanConsistency",
976
+ "atomicBatch",
977
+ "conditionalBatch",
978
+ "boundedRangeDelete"
979
+ ],
980
+ "type": "object"
981
+ }
982
+ },
917
983
  {
918
984
  "name": "weft.storage.conditionalbatch",
919
985
  "kind": "unary",
@@ -921,8 +987,8 @@
921
987
  "tags": ["Storage"],
922
988
  "destructive": true,
923
989
  "access": {
924
- "kind": "scopedAlternatives",
925
- "alternatives": [["storage:admin"], ["storage:read", "storage:write"]]
990
+ "kind": "scoped",
991
+ "scopes": ["storage:admin"]
926
992
  },
927
993
  "transports": {
928
994
  "http": true,
@@ -1023,7 +1089,7 @@
1023
1089
  "destructive": true,
1024
1090
  "access": {
1025
1091
  "kind": "scoped",
1026
- "scopes": ["storage:admin", "storage:write"]
1092
+ "scopes": ["storage:admin"]
1027
1093
  },
1028
1094
  "transports": {
1029
1095
  "http": true,
@@ -1055,7 +1121,7 @@
1055
1121
  "destructive": false,
1056
1122
  "access": {
1057
1123
  "kind": "scoped",
1058
- "scopes": ["storage:admin", "storage:read"]
1124
+ "scopes": ["storage:admin"]
1059
1125
  },
1060
1126
  "transports": {
1061
1127
  "http": true,
@@ -1095,7 +1161,7 @@
1095
1161
  "destructive": true,
1096
1162
  "access": {
1097
1163
  "kind": "scoped",
1098
- "scopes": ["storage:admin", "storage:write"]
1164
+ "scopes": ["storage:admin"]
1099
1165
  },
1100
1166
  "transports": {
1101
1167
  "http": true,
@@ -1131,7 +1197,7 @@
1131
1197
  "destructive": false,
1132
1198
  "access": {
1133
1199
  "kind": "scoped",
1134
- "scopes": ["storage:admin", "storage:read"]
1200
+ "scopes": ["storage:admin"]
1135
1201
  },
1136
1202
  "transports": {
1137
1203
  "http": true,
@@ -1172,6 +1238,76 @@
1172
1238
  },
1173
1239
  "outputSchema": {}
1174
1240
  },
1241
+ {
1242
+ "name": "weft.system.lease",
1243
+ "kind": "unary",
1244
+ "summary": "Get ownership-lease health for this engine process",
1245
+ "description": "Reports whether lease ownership is disabled, not yet held, healthy, or contested. Contested results preserve the confirmed deposed or renewal-unconfirmable reason.",
1246
+ "tags": ["System"],
1247
+ "destructive": false,
1248
+ "access": {
1249
+ "kind": "scoped",
1250
+ "scopes": ["system:read"]
1251
+ },
1252
+ "transports": {
1253
+ "http": true,
1254
+ "jsonRpcHttp": true,
1255
+ "jsonRpcWebSocket": true,
1256
+ "jsonRpcStdio": true
1257
+ },
1258
+ "producibleFaults": [],
1259
+ "inputSchema": {
1260
+ "additionalProperties": false,
1261
+ "properties": {},
1262
+ "type": "object"
1263
+ },
1264
+ "outputSchema": {
1265
+ "additionalProperties": false,
1266
+ "properties": {
1267
+ "expiresAt": {
1268
+ "maximum": 9007199254740991,
1269
+ "minimum": 0,
1270
+ "type": "integer"
1271
+ },
1272
+ "fencingEpoch": {
1273
+ "exclusiveMinimum": 0,
1274
+ "maximum": 9007199254740991,
1275
+ "type": "integer"
1276
+ },
1277
+ "heldSince": {
1278
+ "maximum": 9007199254740991,
1279
+ "minimum": 0,
1280
+ "type": "integer"
1281
+ },
1282
+ "holderId": {
1283
+ "minLength": 1,
1284
+ "type": "string"
1285
+ },
1286
+ "holdsLease": {
1287
+ "type": "boolean"
1288
+ },
1289
+ "lastRenewedAt": {
1290
+ "maximum": 9007199254740991,
1291
+ "minimum": 0,
1292
+ "type": "integer"
1293
+ },
1294
+ "lossReason": {
1295
+ "enum": ["deposed", "renewal-unconfirmable"],
1296
+ "type": "string"
1297
+ },
1298
+ "mode": {
1299
+ "enum": ["none", "lease"],
1300
+ "type": "string"
1301
+ },
1302
+ "status": {
1303
+ "enum": ["disabled", "healthy", "no-lease", "contested"],
1304
+ "type": "string"
1305
+ }
1306
+ },
1307
+ "required": ["mode", "status", "holdsLease"],
1308
+ "type": "object"
1309
+ }
1310
+ },
1175
1311
  {
1176
1312
  "name": "weft.system.metrics",
1177
1313
  "kind": "unary",
@@ -1564,6 +1700,20 @@
1564
1700
  },
1565
1701
  "required": ["ok"],
1566
1702
  "type": "object"
1703
+ },
1704
+ "rest": {
1705
+ "method": "DELETE",
1706
+ "path": "/v1/tasks/diagnostics/dead-letter/:operationId",
1707
+ "inputSources": {
1708
+ "operationId": {
1709
+ "kind": "path",
1710
+ "pathParam": "operationId"
1711
+ }
1712
+ },
1713
+ "success": {
1714
+ "kind": "json",
1715
+ "status": 200
1716
+ }
1567
1717
  }
1568
1718
  },
1569
1719
  {
@@ -2170,6 +2320,88 @@
2170
2320
  ]
2171
2321
  }
2172
2322
  },
2323
+ {
2324
+ "name": "weft.workflows.activities.pending.list",
2325
+ "kind": "unary",
2326
+ "summary": "List pending async activities for a workflow",
2327
+ "description": "Read a bounded, deterministic page of durable activity task tokens awaiting out-of-band completion. The cursor is opaque and scoped to the selected workflow. A listed token may be consumed concurrently, so a later completion can return NotFound.",
2328
+ "tags": ["Activities"],
2329
+ "destructive": false,
2330
+ "access": {
2331
+ "kind": "scoped",
2332
+ "scopes": ["workflows:read"]
2333
+ },
2334
+ "transports": {
2335
+ "http": true,
2336
+ "jsonRpcHttp": true,
2337
+ "jsonRpcStdio": true,
2338
+ "jsonRpcWebSocket": true
2339
+ },
2340
+ "producibleFaults": ["InvalidParams", "NotFound"],
2341
+ "inputSchema": {
2342
+ "additionalProperties": false,
2343
+ "properties": {
2344
+ "cursor": {
2345
+ "maxLength": 8192,
2346
+ "type": "string"
2347
+ },
2348
+ "limit": {
2349
+ "default": 50,
2350
+ "maximum": 200,
2351
+ "minimum": 1,
2352
+ "type": "integer"
2353
+ },
2354
+ "workflowId": {
2355
+ "minLength": 1,
2356
+ "type": "string"
2357
+ }
2358
+ },
2359
+ "required": ["workflowId", "limit"],
2360
+ "type": "object"
2361
+ },
2362
+ "outputSchema": {
2363
+ "additionalProperties": false,
2364
+ "properties": {
2365
+ "items": {
2366
+ "items": {
2367
+ "additionalProperties": false,
2368
+ "properties": {
2369
+ "activityName": {
2370
+ "type": "string"
2371
+ },
2372
+ "attempt": {
2373
+ "exclusiveMinimum": 0,
2374
+ "maximum": 9007199254740991,
2375
+ "type": "integer"
2376
+ },
2377
+ "createdAt": {
2378
+ "type": "number"
2379
+ },
2380
+ "operationId": {
2381
+ "type": "string"
2382
+ },
2383
+ "step": {
2384
+ "maximum": 9007199254740991,
2385
+ "minimum": 0,
2386
+ "type": "integer"
2387
+ },
2388
+ "token": {
2389
+ "type": "string"
2390
+ }
2391
+ },
2392
+ "required": ["token", "operationId", "activityName", "step", "attempt", "createdAt"],
2393
+ "type": "object"
2394
+ },
2395
+ "type": "array"
2396
+ },
2397
+ "nextCursor": {
2398
+ "type": "string"
2399
+ }
2400
+ },
2401
+ "required": ["items"],
2402
+ "type": "object"
2403
+ }
2404
+ },
2173
2405
  {
2174
2406
  "name": "weft.workflows.aggregate",
2175
2407
  "kind": "unary",
@@ -2397,6 +2629,18 @@
2397
2629
  "minimum": 1,
2398
2630
  "type": "integer"
2399
2631
  },
2632
+ "parentWorkflowExecutionToken": {
2633
+ "minLength": 1,
2634
+ "type": "string"
2635
+ },
2636
+ "parentWorkflowId": {
2637
+ "minLength": 1,
2638
+ "type": "string"
2639
+ },
2640
+ "scheduleId": {
2641
+ "minLength": 1,
2642
+ "type": "string"
2643
+ },
2400
2644
  "status": {
2401
2645
  "anyOf": [
2402
2646
  {
@@ -2680,11 +2924,23 @@
2680
2924
  "minimum": 0,
2681
2925
  "type": "integer"
2682
2926
  },
2927
+ "parentWorkflowExecutionToken": {
2928
+ "minLength": 1,
2929
+ "type": "string"
2930
+ },
2931
+ "parentWorkflowId": {
2932
+ "minLength": 1,
2933
+ "type": "string"
2934
+ },
2683
2935
  "requestId": {
2684
2936
  "maxLength": 200,
2685
2937
  "minLength": 1,
2686
2938
  "type": "string"
2687
2939
  },
2940
+ "scheduleId": {
2941
+ "minLength": 1,
2942
+ "type": "string"
2943
+ },
2688
2944
  "status": {
2689
2945
  "anyOf": [
2690
2946
  {},
@@ -2836,11 +3092,23 @@
2836
3092
  "minimum": 0,
2837
3093
  "type": "integer"
2838
3094
  },
3095
+ "parentWorkflowExecutionToken": {
3096
+ "minLength": 1,
3097
+ "type": "string"
3098
+ },
3099
+ "parentWorkflowId": {
3100
+ "minLength": 1,
3101
+ "type": "string"
3102
+ },
2839
3103
  "requestId": {
2840
3104
  "maxLength": 200,
2841
3105
  "minLength": 1,
2842
3106
  "type": "string"
2843
3107
  },
3108
+ "scheduleId": {
3109
+ "minLength": 1,
3110
+ "type": "string"
3111
+ },
2844
3112
  "status": {
2845
3113
  "anyOf": [
2846
3114
  {},
@@ -2992,11 +3260,23 @@
2992
3260
  "minimum": 0,
2993
3261
  "type": "integer"
2994
3262
  },
3263
+ "parentWorkflowExecutionToken": {
3264
+ "minLength": 1,
3265
+ "type": "string"
3266
+ },
3267
+ "parentWorkflowId": {
3268
+ "minLength": 1,
3269
+ "type": "string"
3270
+ },
2995
3271
  "requestId": {
2996
3272
  "maxLength": 200,
2997
3273
  "minLength": 1,
2998
3274
  "type": "string"
2999
3275
  },
3276
+ "scheduleId": {
3277
+ "minLength": 1,
3278
+ "type": "string"
3279
+ },
3000
3280
  "status": {
3001
3281
  "anyOf": [
3002
3282
  {},
@@ -3152,12 +3432,24 @@
3152
3432
  "minimum": 0,
3153
3433
  "type": "integer"
3154
3434
  },
3435
+ "parentWorkflowExecutionToken": {
3436
+ "minLength": 1,
3437
+ "type": "string"
3438
+ },
3439
+ "parentWorkflowId": {
3440
+ "minLength": 1,
3441
+ "type": "string"
3442
+ },
3155
3443
  "payload": {},
3156
3444
  "requestId": {
3157
3445
  "maxLength": 200,
3158
3446
  "minLength": 1,
3159
3447
  "type": "string"
3160
3448
  },
3449
+ "scheduleId": {
3450
+ "minLength": 1,
3451
+ "type": "string"
3452
+ },
3161
3453
  "status": {
3162
3454
  "anyOf": [
3163
3455
  {},
@@ -3313,6 +3605,18 @@
3313
3605
  "minimum": 0,
3314
3606
  "type": "integer"
3315
3607
  },
3608
+ "parentWorkflowExecutionToken": {
3609
+ "minLength": 1,
3610
+ "type": "string"
3611
+ },
3612
+ "parentWorkflowId": {
3613
+ "minLength": 1,
3614
+ "type": "string"
3615
+ },
3616
+ "scheduleId": {
3617
+ "minLength": 1,
3618
+ "type": "string"
3619
+ },
3316
3620
  "status": {
3317
3621
  "anyOf": [
3318
3622
  {},
@@ -3696,6 +4000,125 @@
3696
4000
  "type": "object"
3697
4001
  }
3698
4002
  },
4003
+ {
4004
+ "name": "weft.workflows.finalizer.get",
4005
+ "kind": "unary",
4006
+ "summary": "Get workflow finalizer progress and outcome",
4007
+ "description": "Read durable post-terminal finalizer progress or its succeeded or failed outcome. Returns null when the workflow did not record finalizer work.",
4008
+ "tags": ["Workflows"],
4009
+ "destructive": false,
4010
+ "access": {
4011
+ "kind": "public"
4012
+ },
4013
+ "transports": {
4014
+ "http": true,
4015
+ "jsonRpcHttp": true,
4016
+ "jsonRpcWebSocket": true,
4017
+ "jsonRpcStdio": true
4018
+ },
4019
+ "producibleFaults": [],
4020
+ "inputSchema": {
4021
+ "additionalProperties": false,
4022
+ "properties": {
4023
+ "workflowId": {
4024
+ "minLength": 1,
4025
+ "type": "string"
4026
+ }
4027
+ },
4028
+ "required": ["workflowId"],
4029
+ "type": "object"
4030
+ },
4031
+ "outputSchema": {
4032
+ "anyOf": [
4033
+ {
4034
+ "oneOf": [
4035
+ {
4036
+ "additionalProperties": false,
4037
+ "properties": {
4038
+ "attempts": {
4039
+ "maximum": 9007199254740991,
4040
+ "minimum": 0,
4041
+ "type": "integer"
4042
+ },
4043
+ "status": {
4044
+ "const": "pending",
4045
+ "type": "string"
4046
+ }
4047
+ },
4048
+ "required": ["status", "attempts"],
4049
+ "type": "object"
4050
+ },
4051
+ {
4052
+ "additionalProperties": false,
4053
+ "properties": {
4054
+ "attempts": {
4055
+ "exclusiveMinimum": 0,
4056
+ "maximum": 9007199254740991,
4057
+ "type": "integer"
4058
+ },
4059
+ "startedAt": {
4060
+ "minimum": 0,
4061
+ "type": "number"
4062
+ },
4063
+ "status": {
4064
+ "const": "running",
4065
+ "type": "string"
4066
+ }
4067
+ },
4068
+ "required": ["status", "attempts", "startedAt"],
4069
+ "type": "object"
4070
+ },
4071
+ {
4072
+ "additionalProperties": false,
4073
+ "properties": {
4074
+ "attempts": {
4075
+ "exclusiveMinimum": 0,
4076
+ "maximum": 9007199254740991,
4077
+ "type": "integer"
4078
+ },
4079
+ "completedAt": {
4080
+ "minimum": 0,
4081
+ "type": "number"
4082
+ },
4083
+ "status": {
4084
+ "const": "succeeded",
4085
+ "type": "string"
4086
+ }
4087
+ },
4088
+ "required": ["status", "attempts", "completedAt"],
4089
+ "type": "object"
4090
+ },
4091
+ {
4092
+ "additionalProperties": false,
4093
+ "properties": {
4094
+ "attempts": {
4095
+ "maximum": 9007199254740991,
4096
+ "minimum": 0,
4097
+ "type": "integer"
4098
+ },
4099
+ "error": {
4100
+ "type": "string"
4101
+ },
4102
+ "failedAt": {
4103
+ "minimum": 0,
4104
+ "type": "number"
4105
+ },
4106
+ "status": {
4107
+ "const": "failed",
4108
+ "type": "string"
4109
+ }
4110
+ },
4111
+ "required": ["status", "attempts", "failedAt", "error"],
4112
+ "type": "object"
4113
+ }
4114
+ ]
4115
+ },
4116
+ {
4117
+ "type": "null"
4118
+ }
4119
+ ]
4120
+ }
4121
+ },
3699
4122
  {
3700
4123
  "name": "weft.workflows.fork",
3701
4124
  "kind": "unary",
@@ -3769,7 +4192,7 @@
3769
4192
  "name": "weft.workflows.list",
3770
4193
  "kind": "unary",
3771
4194
  "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.",
4195
+ "description": "List workflows visible to the caller, optionally filtered by status, type, originating schedule, direct parent run, 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
4196
  "tags": ["Workflows"],
3774
4197
  "destructive": false,
3775
4198
  "access": {
@@ -3876,6 +4299,18 @@
3876
4299
  "minimum": 0,
3877
4300
  "type": "integer"
3878
4301
  },
4302
+ "parentWorkflowExecutionToken": {
4303
+ "minLength": 1,
4304
+ "type": "string"
4305
+ },
4306
+ "parentWorkflowId": {
4307
+ "minLength": 1,
4308
+ "type": "string"
4309
+ },
4310
+ "scheduleId": {
4311
+ "minLength": 1,
4312
+ "type": "string"
4313
+ },
3879
4314
  "status": {
3880
4315
  "anyOf": [
3881
4316
  {},
@@ -4013,6 +4448,18 @@
4013
4448
  "minimum": 0,
4014
4449
  "type": "integer"
4015
4450
  },
4451
+ "parentWorkflowExecutionToken": {
4452
+ "minLength": 1,
4453
+ "type": "string"
4454
+ },
4455
+ "parentWorkflowId": {
4456
+ "minLength": 1,
4457
+ "type": "string"
4458
+ },
4459
+ "scheduleId": {
4460
+ "minLength": 1,
4461
+ "type": "string"
4462
+ },
4016
4463
  "status": {
4017
4464
  "anyOf": [
4018
4465
  {},
@@ -4198,6 +4645,55 @@
4198
4645
  "type": "object"
4199
4646
  }
4200
4647
  },
4648
+ {
4649
+ "name": "weft.workflows.scheduleprovenance.get",
4650
+ "kind": "unary",
4651
+ "summary": "Get the schedule occurrence that launched a workflow",
4652
+ "description": "Read the durable schedule id and optional occurrence timestamp that launched a workflow. Returns null for runs that were not launched by a schedule or whose workflow history was purged.",
4653
+ "tags": ["Workflows"],
4654
+ "destructive": false,
4655
+ "access": {
4656
+ "kind": "public"
4657
+ },
4658
+ "transports": {
4659
+ "http": true,
4660
+ "jsonRpcHttp": true,
4661
+ "jsonRpcWebSocket": true,
4662
+ "jsonRpcStdio": true
4663
+ },
4664
+ "producibleFaults": [],
4665
+ "inputSchema": {
4666
+ "additionalProperties": false,
4667
+ "properties": {
4668
+ "workflowId": {
4669
+ "minLength": 1,
4670
+ "type": "string"
4671
+ }
4672
+ },
4673
+ "required": ["workflowId"],
4674
+ "type": "object"
4675
+ },
4676
+ "outputSchema": {
4677
+ "anyOf": [
4678
+ {
4679
+ "additionalProperties": false,
4680
+ "properties": {
4681
+ "occurrence": {
4682
+ "type": "number"
4683
+ },
4684
+ "scheduleId": {
4685
+ "type": "string"
4686
+ }
4687
+ },
4688
+ "required": ["scheduleId"],
4689
+ "type": "object"
4690
+ },
4691
+ {
4692
+ "type": "null"
4693
+ }
4694
+ ]
4695
+ }
4696
+ },
4201
4697
  {
4202
4698
  "name": "weft.workflows.signal",
4203
4699
  "kind": "unary",