@lostgradient/weft 0.17.0 → 0.18.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.
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Weft
2
2
 
3
- A Bun-native durable execution engine. Current release: `0.17.0`.
3
+ A Bun-native durable execution engine. Current release: `0.18.0`.
4
4
 
5
5
  Install the library from npm as `@lostgradient/weft`:
6
6
 
@@ -1403,6 +1403,79 @@
1403
1403
  },
1404
1404
  "outputSchema": {}
1405
1405
  },
1406
+ {
1407
+ "name": "weft.system.principal",
1408
+ "kind": "unary",
1409
+ "summary": "Report the caller's resolved principal and granted scopes",
1410
+ "description": "Report the caller's own resolved principal: the authentication method ('jwt', 'api-key', 'mtls', 'stdio-local', or 'unauthenticated'), the normalized subject when one exists, and the granted authorization scopes, sorted. Public access: an unauthenticated caller receives method 'unauthenticated' with an empty scope list rather than an error, so clients can distinguish \"no credential\" from \"credential with few scopes\" without probing other operations. Reflects only the request credential — never server auth configuration.",
1411
+ "tags": ["System"],
1412
+ "destructive": false,
1413
+ "access": {
1414
+ "kind": "public"
1415
+ },
1416
+ "transports": {
1417
+ "http": true,
1418
+ "jsonRpcHttp": true,
1419
+ "jsonRpcWebSocket": true,
1420
+ "jsonRpcStdio": true
1421
+ },
1422
+ "producibleFaults": [],
1423
+ "inputSchema": {
1424
+ "additionalProperties": false,
1425
+ "properties": {},
1426
+ "type": "object"
1427
+ },
1428
+ "outputSchema": {
1429
+ "additionalProperties": false,
1430
+ "properties": {
1431
+ "method": {
1432
+ "enum": ["jwt", "api-key", "mtls", "stdio-local", "unauthenticated"],
1433
+ "type": "string"
1434
+ },
1435
+ "scopes": {
1436
+ "items": {
1437
+ "enum": [
1438
+ "workflows:read",
1439
+ "workflows:write",
1440
+ "workflows:admin",
1441
+ "schedules:read",
1442
+ "schedules:write",
1443
+ "signals:write",
1444
+ "updates:write",
1445
+ "queries:read",
1446
+ "reviews:read",
1447
+ "reviews:write",
1448
+ "attributes:read",
1449
+ "attributes:write",
1450
+ "tags:write",
1451
+ "streams:read",
1452
+ "events:read",
1453
+ "storage:read",
1454
+ "storage:write",
1455
+ "storage:admin",
1456
+ "workers:write",
1457
+ "system:read",
1458
+ "system:admin"
1459
+ ],
1460
+ "type": "string"
1461
+ },
1462
+ "type": "array"
1463
+ },
1464
+ "subject": {
1465
+ "anyOf": [
1466
+ {
1467
+ "type": "string"
1468
+ },
1469
+ {
1470
+ "type": "null"
1471
+ }
1472
+ ]
1473
+ }
1474
+ },
1475
+ "required": ["method", "subject", "scopes"],
1476
+ "type": "object"
1477
+ }
1478
+ },
1406
1479
  {
1407
1480
  "name": "weft.system.registry",
1408
1481
  "kind": "unary",
@@ -1,7 +1,7 @@
1
1
  import { type CatalogWeftClient, type WeftClientConnection } from '../operation-client-runtime.ts';
2
- export declare const CATALOG_OPERATION_NAMES: readonly ["weft.activities.complete", "weft.activities.fail", "weft.alerts.list", "weft.recover.all", "weft.retention.get", "weft.reviews.decision.submit", "weft.reviews.get", "weft.reviews.list", "weft.schedules.cancel", "weft.schedules.create", "weft.schedules.get", "weft.schedules.list", "weft.schedules.pause", "weft.schedules.resume", "weft.schedules.update", "weft.storage.capabilities", "weft.system.lease", "weft.system.metrics", "weft.system.registry", "weft.task.queues.list", "weft.tasks.diagnostics", "weft.updates.result.get", "weft.worker.deployments.drain", "weft.worker.deployments.resume", "weft.workers.drain", "weft.workers.list", "weft.workers.resume", "weft.workflows.activities.pending.list", "weft.workflows.aggregate", "weft.workflows.attributes.get", "weft.workflows.attributes.set", "weft.workflows.bulk.cancel", "weft.workflows.bulk.delete", "weft.workflows.bulk.retryfailed", "weft.workflows.bulk.signal", "weft.workflows.bulk.tags", "weft.workflows.cancel", "weft.workflows.checkpoints.get", "weft.workflows.checkpoints.list", "weft.workflows.events.list", "weft.workflows.finalizer.get", "weft.workflows.fork", "weft.workflows.get", "weft.workflows.list", "weft.workflows.purge", "weft.workflows.query", "weft.workflows.replay", "weft.workflows.result.get", "weft.workflows.resume", "weft.workflows.scheduleprovenance.get", "weft.workflows.signal", "weft.workflows.start", "weft.workflows.startorsignal", "weft.workflows.streams.chunks", "weft.workflows.suspend", "weft.workflows.tags.add", "weft.workflows.tags.remove", "weft.workflows.timeline.get", "weft.workflows.timeout", "weft.workflows.update"];
2
+ export declare const CATALOG_OPERATION_NAMES: readonly ["weft.activities.complete", "weft.activities.fail", "weft.alerts.list", "weft.recover.all", "weft.retention.get", "weft.reviews.decision.submit", "weft.reviews.get", "weft.reviews.list", "weft.schedules.cancel", "weft.schedules.create", "weft.schedules.get", "weft.schedules.list", "weft.schedules.pause", "weft.schedules.resume", "weft.schedules.update", "weft.storage.capabilities", "weft.system.lease", "weft.system.metrics", "weft.system.principal", "weft.system.registry", "weft.task.queues.list", "weft.tasks.diagnostics", "weft.updates.result.get", "weft.worker.deployments.drain", "weft.worker.deployments.resume", "weft.workers.drain", "weft.workers.list", "weft.workers.resume", "weft.workflows.activities.pending.list", "weft.workflows.aggregate", "weft.workflows.attributes.get", "weft.workflows.attributes.set", "weft.workflows.bulk.cancel", "weft.workflows.bulk.delete", "weft.workflows.bulk.retryfailed", "weft.workflows.bulk.signal", "weft.workflows.bulk.tags", "weft.workflows.cancel", "weft.workflows.checkpoints.get", "weft.workflows.checkpoints.list", "weft.workflows.events.list", "weft.workflows.finalizer.get", "weft.workflows.fork", "weft.workflows.get", "weft.workflows.list", "weft.workflows.purge", "weft.workflows.query", "weft.workflows.replay", "weft.workflows.result.get", "weft.workflows.resume", "weft.workflows.scheduleprovenance.get", "weft.workflows.signal", "weft.workflows.start", "weft.workflows.startorsignal", "weft.workflows.streams.chunks", "weft.workflows.suspend", "weft.workflows.tags.add", "weft.workflows.tags.remove", "weft.workflows.timeline.get", "weft.workflows.timeout", "weft.workflows.update"];
3
3
  export type CatalogOperationName = (typeof CATALOG_OPERATION_NAMES)[number];
4
- export declare const CLIENT_OPERATION_NAMES: readonly ["weft.activities.complete", "weft.activities.fail", "weft.alerts.list", "weft.recover.all", "weft.retention.get", "weft.reviews.decision.submit", "weft.reviews.get", "weft.reviews.list", "weft.schedules.cancel", "weft.schedules.create", "weft.schedules.get", "weft.schedules.list", "weft.schedules.pause", "weft.schedules.resume", "weft.schedules.update", "weft.storage.capabilities", "weft.system.lease", "weft.system.metrics", "weft.system.registry", "weft.task.queues.list", "weft.tasks.diagnostics", "weft.tasks.diagnostics.deadletters.clear", "weft.updates.result.get", "weft.worker.deployments.drain", "weft.worker.deployments.resume", "weft.workers.drain", "weft.workers.list", "weft.workers.resume", "weft.workflows.activities.pending.list", "weft.workflows.aggregate", "weft.workflows.attributes.get", "weft.workflows.attributes.set", "weft.workflows.bulk.cancel", "weft.workflows.bulk.delete", "weft.workflows.bulk.retryfailed", "weft.workflows.bulk.signal", "weft.workflows.bulk.tags", "weft.workflows.cancel", "weft.workflows.checkpoints.get", "weft.workflows.checkpoints.list", "weft.workflows.events.list", "weft.workflows.finalizer.get", "weft.workflows.fork", "weft.workflows.get", "weft.workflows.list", "weft.workflows.purge", "weft.workflows.query", "weft.workflows.replay", "weft.workflows.result.get", "weft.workflows.resume", "weft.workflows.scheduleprovenance.get", "weft.workflows.signal", "weft.workflows.start", "weft.workflows.startorsignal", "weft.workflows.streams.chunks", "weft.workflows.suspend", "weft.workflows.tags.add", "weft.workflows.tags.remove", "weft.workflows.timeline.get", "weft.workflows.timeout", "weft.workflows.update"];
4
+ export declare const CLIENT_OPERATION_NAMES: readonly ["weft.activities.complete", "weft.activities.fail", "weft.alerts.list", "weft.recover.all", "weft.retention.get", "weft.reviews.decision.submit", "weft.reviews.get", "weft.reviews.list", "weft.schedules.cancel", "weft.schedules.create", "weft.schedules.get", "weft.schedules.list", "weft.schedules.pause", "weft.schedules.resume", "weft.schedules.update", "weft.storage.capabilities", "weft.system.lease", "weft.system.metrics", "weft.system.principal", "weft.system.registry", "weft.task.queues.list", "weft.tasks.diagnostics", "weft.tasks.diagnostics.deadletters.clear", "weft.updates.result.get", "weft.worker.deployments.drain", "weft.worker.deployments.resume", "weft.workers.drain", "weft.workers.list", "weft.workers.resume", "weft.workflows.activities.pending.list", "weft.workflows.aggregate", "weft.workflows.attributes.get", "weft.workflows.attributes.set", "weft.workflows.bulk.cancel", "weft.workflows.bulk.delete", "weft.workflows.bulk.retryfailed", "weft.workflows.bulk.signal", "weft.workflows.bulk.tags", "weft.workflows.cancel", "weft.workflows.checkpoints.get", "weft.workflows.checkpoints.list", "weft.workflows.events.list", "weft.workflows.finalizer.get", "weft.workflows.fork", "weft.workflows.get", "weft.workflows.list", "weft.workflows.purge", "weft.workflows.query", "weft.workflows.replay", "weft.workflows.result.get", "weft.workflows.resume", "weft.workflows.scheduleprovenance.get", "weft.workflows.signal", "weft.workflows.start", "weft.workflows.startorsignal", "weft.workflows.streams.chunks", "weft.workflows.suspend", "weft.workflows.tags.add", "weft.workflows.tags.remove", "weft.workflows.timeline.get", "weft.workflows.timeout", "weft.workflows.update"];
5
5
  export type ClientOperationName = (typeof CLIENT_OPERATION_NAMES)[number];
6
6
  export declare const CLIENT_REST_OPERATION_BINDINGS: {
7
7
  readonly 'weft.tasks.diagnostics.deadletters.clear': {
@@ -251,6 +251,15 @@ export type ClientOperationTypes = {
251
251
  readonly output: unknown;
252
252
  readonly faults: never;
253
253
  };
254
+ 'weft.system.principal': {
255
+ readonly input: {};
256
+ readonly output: {
257
+ readonly method: 'jwt' | 'api-key' | 'mtls' | 'stdio-local' | 'unauthenticated';
258
+ readonly scopes: ReadonlyArray<'workflows:read' | 'workflows:write' | 'workflows:admin' | 'schedules:read' | 'schedules:write' | 'signals:write' | 'updates:write' | 'queries:read' | 'reviews:read' | 'reviews:write' | 'attributes:read' | 'attributes:write' | 'tags:write' | 'streams:read' | 'events:read' | 'storage:read' | 'storage:write' | 'storage:admin' | 'workers:write' | 'system:read' | 'system:admin'>;
259
+ readonly subject: unknown;
260
+ };
261
+ readonly faults: never;
262
+ };
254
263
  'weft.system.registry': {
255
264
  readonly input: {};
256
265
  readonly output: {
@@ -21,6 +21,7 @@ export const CATALOG_OPERATION_NAMES = [
21
21
  "weft.storage.capabilities",
22
22
  "weft.system.lease",
23
23
  "weft.system.metrics",
24
+ "weft.system.principal",
24
25
  "weft.system.registry",
25
26
  "weft.task.queues.list",
26
27
  "weft.tasks.diagnostics",
@@ -82,6 +83,7 @@ export const CATALOG_OPERATION_NAMES = [
82
83
  "weft.storage.capabilities",
83
84
  "weft.system.lease",
84
85
  "weft.system.metrics",
86
+ "weft.system.principal",
85
87
  "weft.system.registry",
86
88
  "weft.task.queues.list",
87
89
  "weft.tasks.diagnostics",
@@ -15,11 +15,41 @@
15
15
  * imply `workflows:read` or `workflows:write`. Operation authors must declare
16
16
  * the exact scope they require. Scope-implication semantics (if any) are a
17
17
  * future track.
18
+ *
19
+ * Public export so dashboards and API-key provisioning tooling can consume
20
+ * the canonical vocabulary instead of hand-copying it.
21
+ *
22
+ * @example
23
+ * ```ts
24
+ * import { AUTHORIZATION_SCOPES } from '@lostgradient/weft/server';
25
+ *
26
+ * console.log(AUTHORIZATION_SCOPES.includes('workflows:read'));
27
+ * ```
18
28
  */
19
29
  export declare const AUTHORIZATION_SCOPES: readonly ["workflows:read", "workflows:write", "workflows:admin", "schedules:read", "schedules:write", "signals:write", "updates:write", "queries:read", "reviews:read", "reviews:write", "attributes:read", "attributes:write", "tags:write", "streams:read", "events:read", "storage:read", "storage:write", "storage:admin", "workers:write", "system:read", "system:admin"];
20
- /** String-literal union of every authorization scope. */
30
+ /**
31
+ * String-literal union of every authorization scope.
32
+ *
33
+ * @example
34
+ * ```ts
35
+ * import { type AuthorizationScope } from '@lostgradient/weft/server';
36
+ *
37
+ * const scope: AuthorizationScope = 'workflows:read';
38
+ * console.log(scope);
39
+ * ```
40
+ */
21
41
  export type AuthorizationScope = (typeof AUTHORIZATION_SCOPES)[number];
22
- /** Runtime type guard for the `AuthorizationScope` union. */
42
+ /**
43
+ * Runtime type guard for the `AuthorizationScope` union.
44
+ *
45
+ * @example
46
+ * ```ts
47
+ * import { isAuthorizationScope } from '@lostgradient/weft/server';
48
+ *
49
+ * console.log(isAuthorizationScope('workflows:read'));
50
+ * console.log(isAuthorizationScope('not-a-scope'));
51
+ * ```
52
+ */
23
53
  export declare function isAuthorizationScope(value: string): value is AuthorizationScope;
24
54
  /**
25
55
  * Extract the full set of scopes granted by a JWT payload by *merging* every
@@ -18,6 +18,8 @@ import { TaskQueue } from './task-queue.ts';
18
18
  export { wireEventBroadcasting, type EventBroadcastingHandle, } from './runtime/event-broadcasting.ts';
19
19
  export type { DashboardAssets } from './dashboard-assets.ts';
20
20
  export type { CorsOptions } from './runtime/cors.ts';
21
+ export { AUTHORIZATION_SCOPES, isAuthorizationScope, type AuthorizationScope, } from './authorization-scope.ts';
22
+ export type { GetPrincipalOutput } from './operations/get-principal.ts';
21
23
  export { createRateLimiter, createRotatingApiKeyStore, defaultAuthAuditSink, isSensitiveHeader, redactCredential, redactHeaders, validateRateLimitConfig, type ApiKeyRegistration, type AuthAuditEvent, type AuthAuditSink, type AuthConfig, type RateLimitConfig, type RateLimitDecision, type RateLimiter, type RotatingApiKeyStore, } from './authentication.ts';
22
24
  export type { RetryPolicy } from '../core/types.ts';
23
25
  export type { PrometheusExporter } from '../observability/metrics.ts';
@@ -27,6 +27,10 @@ import { TaskQueue } from "./task-queue.js";
27
27
  export {
28
28
  wireEventBroadcasting
29
29
  } from "./runtime/event-broadcasting.js";
30
+ export {
31
+ AUTHORIZATION_SCOPES,
32
+ isAuthorizationScope
33
+ } from "./authorization-scope.js";
30
34
  export {
31
35
  createRateLimiter,
32
36
  createRotatingApiKeyStore,
@@ -0,0 +1,75 @@
1
+ /**
2
+ * `weft.system.principal` operation + REST binding.
3
+ *
4
+ * Reports the caller's own resolved principal: the authentication method,
5
+ * the normalized subject, and the granted scope set. Public access by
6
+ * design — introspection has to work for every credential state to be
7
+ * useful (a dashboard probes its principal before it knows anything), and
8
+ * an unauthenticated caller learns only what it already knows: that it is
9
+ * anonymous with no scopes. The response is strictly principal-shaped —
10
+ * nothing about the server's auth configuration (key inventory,
11
+ * `unauthenticatedAccess` posture, JWT issuers) is exposed.
12
+ */
13
+ import { z } from 'zod';
14
+ import type { UnknownRestBinding } from '../rest-bindings.ts';
15
+ declare const getPrincipalInput: z.ZodObject<{}, z.core.$strip>;
16
+ declare const getPrincipalOutput: z.ZodObject<{
17
+ method: z.ZodEnum<{
18
+ jwt: "jwt";
19
+ "api-key": "api-key";
20
+ mtls: "mtls";
21
+ "stdio-local": "stdio-local";
22
+ unauthenticated: "unauthenticated";
23
+ }>;
24
+ subject: z.ZodNullable<z.ZodString>;
25
+ scopes: z.ZodArray<z.ZodEnum<{
26
+ "workflows:read": "workflows:read";
27
+ "workflows:write": "workflows:write";
28
+ "workflows:admin": "workflows:admin";
29
+ "schedules:read": "schedules:read";
30
+ "schedules:write": "schedules:write";
31
+ "signals:write": "signals:write";
32
+ "updates:write": "updates:write";
33
+ "queries:read": "queries:read";
34
+ "reviews:read": "reviews:read";
35
+ "reviews:write": "reviews:write";
36
+ "attributes:read": "attributes:read";
37
+ "attributes:write": "attributes:write";
38
+ "tags:write": "tags:write";
39
+ "streams:read": "streams:read";
40
+ "events:read": "events:read";
41
+ "storage:read": "storage:read";
42
+ "storage:write": "storage:write";
43
+ "storage:admin": "storage:admin";
44
+ "workers:write": "workers:write";
45
+ "system:read": "system:read";
46
+ "system:admin": "system:admin";
47
+ }>>;
48
+ }, z.core.$strip>;
49
+ export type GetPrincipalInput = z.infer<typeof getPrincipalInput>;
50
+ /**
51
+ * Output of `weft.system.principal`: the caller's authentication method,
52
+ * normalized subject (`null` when the credential carries none), and granted
53
+ * scopes, sorted. Anonymous callers receive `method: 'unauthenticated'`
54
+ * with an empty scope list.
55
+ *
56
+ * @example
57
+ * ```ts
58
+ * import { type GetPrincipalOutput } from '@lostgradient/weft/server';
59
+ *
60
+ * const anonymous: GetPrincipalOutput = {
61
+ * method: 'unauthenticated',
62
+ * subject: null,
63
+ * scopes: [],
64
+ * };
65
+ * console.log(anonymous.method);
66
+ * ```
67
+ */
68
+ export type GetPrincipalOutput = z.infer<typeof getPrincipalOutput>;
69
+ export declare const getPrincipalOperation: import("../operation-catalog.ts").OperationDefinition<Record<string, never>, {
70
+ method: "jwt" | "api-key" | "mtls" | "stdio-local" | "unauthenticated";
71
+ subject: string | null;
72
+ scopes: ("workflows:read" | "workflows:write" | "workflows:admin" | "schedules:read" | "schedules:write" | "signals:write" | "updates:write" | "queries:read" | "reviews:read" | "reviews:write" | "attributes:read" | "attributes:write" | "tags:write" | "streams:read" | "events:read" | "storage:read" | "storage:write" | "storage:admin" | "workers:write" | "system:read" | "system:admin")[];
73
+ }, unknown>;
74
+ export declare const getPrincipalRestBinding: UnknownRestBinding;
75
+ export {};
@@ -0,0 +1,41 @@
1
+ import { z } from "zod";
2
+ import { AUTHORIZATION_SCOPES } from "../authorization-scope.js";
3
+ import { shapeOperationFaultAsJson } from "../operation-fault.js";
4
+ import { defineOperation } from "../operation-registry.js";
5
+ const principalMethodSchema = z.enum(["jwt", "api-key", "mtls", "stdio-local", "unauthenticated"]), getPrincipalInput = z.object({}), getPrincipalOutput = z.object({
6
+ method: principalMethodSchema,
7
+ subject: z.string().nullable(),
8
+ scopes: z.array(z.enum(AUTHORIZATION_SCOPES))
9
+ });
10
+ export const getPrincipalOperation = defineOperation({
11
+ name: "weft.system.principal",
12
+ mcpExposable: !1,
13
+ summary: "Report the caller's resolved principal and granted scopes",
14
+ description: `Report the caller's own resolved principal: the authentication method ('jwt', 'api-key', 'mtls', 'stdio-local', or 'unauthenticated'), the normalized subject when one exists, and the granted authorization scopes, sorted. Public access: an unauthenticated caller receives method 'unauthenticated' with an empty scope list rather than an error, so clients can distinguish "no credential" from "credential with few scopes" without probing ` + "other operations. Reflects only the request credential \u2014 never server auth configuration.",
15
+ destructive: !1,
16
+ tags: ["System"],
17
+ inputSchema: getPrincipalInput,
18
+ outputSchema: getPrincipalOutput,
19
+ access: { kind: "public" },
20
+ discoverable: !0,
21
+ transports: { http: !0, jsonRpcHttp: !0, jsonRpcWebSocket: !0, jsonRpcStdio: !0 },
22
+ unknownKeyPolicy: { http: "strip", jsonRpc: "reject" },
23
+ invoke: async ({ principal }) => {
24
+ if (principal.method === "unauthenticated")
25
+ return { method: "unauthenticated", subject: null, scopes: [] };
26
+ return {
27
+ method: principal.method,
28
+ subject: principal.subject ?? null,
29
+ scopes: [...principal.scopes].toSorted()
30
+ };
31
+ }
32
+ }), getPrincipalRestBinding = {
33
+ method: "GET",
34
+ path: "/v1/principal",
35
+ pathParamNames: [],
36
+ operationName: "weft.system.principal",
37
+ inputSources: {},
38
+ extractInput: async () => ({}),
39
+ success: { kind: "json", status: 200 },
40
+ shapeFault: shapeOperationFaultAsJson
41
+ };
@@ -0,0 +1,28 @@
1
+ /**
2
+ * Static operation and REST-binding registrations — every operation that
3
+ * needs no per-server configuration, in one place.
4
+ *
5
+ * `rest-bindings.ts` composes these arrays with the per-server factory
6
+ * operations (metrics, workers, task queues, diagnostics) to build the live
7
+ * registry and binding set. Adding a new statically-configured operation
8
+ * means adding its import and two array entries HERE; `rest-bindings.ts`
9
+ * itself only changes when an operation needs per-server wiring.
10
+ *
11
+ * @module server/operations/static-registrations
12
+ */
13
+ import type { RegistrableOperation } from '../operation-catalog.ts';
14
+ import type { UnknownRestBinding } from '../rest-bindings.ts';
15
+ /**
16
+ * Static REST bindings for all operations that do not need per-server
17
+ * configuration. `rest-bindings.ts` re-exports this as `REST_BINDINGS` and
18
+ * appends the per-server factory bindings in `createLiveRestBindings()`.
19
+ */
20
+ export declare const STATIC_REST_BINDINGS: ReadonlyArray<UnknownRestBinding>;
21
+ /**
22
+ * Statically-configured operations, in registration order.
23
+ * `rest-bindings.ts`'s `createLiveOperationRegistry()` appends the
24
+ * per-server factory operations (metrics, workers, task queues,
25
+ * diagnostics); the registry is keyed by operation name, so relative
26
+ * order carries no behavior.
27
+ */
28
+ export declare const STATIC_OPERATIONS: ReadonlyArray<RegistrableOperation>;
@@ -0,0 +1,263 @@
1
+ import {
2
+ addWorkflowTagsOperation,
3
+ addWorkflowTagsRestBinding
4
+ } from "./add-workflow-tags.js";
5
+ import {
6
+ aggregateWorkflowsOperation,
7
+ aggregateWorkflowsRestBinding
8
+ } from "./aggregate-workflows.js";
9
+ import * as asyncActivity from "./async-activity.js";
10
+ import {
11
+ bulkCancelWorkflowsOperation,
12
+ bulkCancelWorkflowsRestBinding
13
+ } from "./bulk-cancel-workflows.js";
14
+ import {
15
+ bulkDeleteWorkflowsOperation,
16
+ bulkDeleteWorkflowsRestBinding
17
+ } from "./bulk-delete-workflows.js";
18
+ import {
19
+ bulkMutateWorkflowTagsOperation,
20
+ bulkMutateWorkflowTagsRestBinding
21
+ } from "./bulk-mutate-workflow-tags.js";
22
+ import {
23
+ bulkRetryFailedWorkflowsOperation,
24
+ bulkRetryFailedWorkflowsRestBinding
25
+ } from "./bulk-retry-failed-workflows.js";
26
+ import {
27
+ bulkSignalWorkflowsOperation,
28
+ bulkSignalWorkflowsRestBinding
29
+ } from "./bulk-signal-workflows.js";
30
+ import { cancelScheduleOperation, cancelScheduleRestBinding } from "./cancel-schedule.js";
31
+ import { cancelWorkflowOperation, cancelWorkflowRestBinding } from "./cancel-workflow.js";
32
+ import { createScheduleOperation, createScheduleRestBinding } from "./create-schedule.js";
33
+ import { fleetEventsSseOperation, fleetEventsSseRestBinding } from "./fleet-events-sse.js";
34
+ import { fleetEventsSubscriptionOperation } from "./fleet-events-subscription.js";
35
+ import { forkWorkflowOperation, forkWorkflowRestBinding } from "./fork-workflow.js";
36
+ import { getCheckpointAtOperation, getCheckpointAtRestBinding } from "./get-checkpoint-at.js";
37
+ import { getPrincipalOperation, getPrincipalRestBinding } from "./get-principal.js";
38
+ import { getRegistryOperation, getRegistryRestBinding } from "./get-registry.js";
39
+ import {
40
+ getRetentionOverviewOperation,
41
+ getRetentionOverviewRestBinding
42
+ } from "./get-retention-overview.js";
43
+ import { getReviewOperation, getReviewRestBinding } from "./get-review.js";
44
+ import { getScheduleOperation, getScheduleRestBinding } from "./get-schedule.js";
45
+ import { getStreamChunksOperation, getStreamChunksRestBinding } from "./get-stream-chunks.js";
46
+ import { getSystemLeaseOperation, getSystemLeaseRestBinding } from "./get-system-lease.js";
47
+ import {
48
+ clearTaskDeadLetterOperation,
49
+ clearTaskDeadLetterRestBinding,
50
+ getTaskDiagnosticsRestBinding
51
+ } from "./get-task-diagnostics.js";
52
+ import { getUpdateResultOperation, getUpdateResultRestBinding } from "./get-update-result.js";
53
+ import {
54
+ getWorkflowAttributesOperation,
55
+ getWorkflowAttributesRestBinding
56
+ } from "./get-workflow-attributes.js";
57
+ import {
58
+ getWorkflowEventsOperation,
59
+ getWorkflowEventsRestBinding
60
+ } from "./get-workflow-events.js";
61
+ import * as workflowObservability from "./get-workflow-observability.js";
62
+ import {
63
+ getWorkflowResultOperation,
64
+ getWorkflowResultRestBinding
65
+ } from "./get-workflow-result.js";
66
+ import {
67
+ getWorkflowTimelineOperation,
68
+ getWorkflowTimelineRestBinding
69
+ } from "./get-workflow-timeline.js";
70
+ import { getWorkflowOperation, getWorkflowRestBinding } from "./get-workflow.js";
71
+ import { listAlertsOperation, listAlertsRestBinding } from "./list-alerts.js";
72
+ import { listCheckpointsOperation, listCheckpointsRestBinding } from "./list-checkpoints.js";
73
+ import { listReviewsOperation, listReviewsRestBinding } from "./list-reviews.js";
74
+ import { listSchedulesOperation, listSchedulesRestBinding } from "./list-schedules.js";
75
+ import { listWorkflowsOperation, listWorkflowsRestBinding } from "./list-workflows.js";
76
+ import { pauseScheduleOperation, pauseScheduleRestBinding } from "./pause-schedule.js";
77
+ import { purgeWorkflowsOperation, purgeWorkflowsRestBinding } from "./purge-workflows.js";
78
+ import {
79
+ queryWorkflowOperation,
80
+ queryWorkflowRestBinding,
81
+ queryWorkflowWithInputRestBinding
82
+ } from "./query-workflow.js";
83
+ import { recoverAllOperation, recoverAllRestBinding } from "./recover-all.js";
84
+ import {
85
+ removeWorkflowTagsOperation,
86
+ removeWorkflowTagsRestBinding
87
+ } from "./remove-workflow-tags.js";
88
+ import { replayWorkflowOperation, replayWorkflowRestBinding } from "./replay-workflow.js";
89
+ import { resumeScheduleOperation, resumeScheduleRestBinding } from "./resume-schedule.js";
90
+ import { resumeWorkflowOperation, resumeWorkflowRestBinding } from "./resume-workflow.js";
91
+ import {
92
+ setWorkflowAttributesOperation,
93
+ setWorkflowAttributesRestBinding
94
+ } from "./set-workflow-attributes.js";
95
+ import { signalWorkflowOperation, signalWorkflowRestBinding } from "./signal-workflow.js";
96
+ import {
97
+ startOrSignalWorkflowOperation,
98
+ startOrSignalWorkflowRestBinding
99
+ } from "./start-or-signal-workflow.js";
100
+ import { startWorkflowOperation, startWorkflowRestBinding } from "./start-workflow.js";
101
+ import * as storageCapabilities from "./storage-capabilities.js";
102
+ import {
103
+ storageBatchOperation,
104
+ storageBatchRestBinding,
105
+ storageConditionalBatchOperation,
106
+ storageConditionalBatchRestBinding,
107
+ storageDeleteOperation,
108
+ storageDeleteRestBinding,
109
+ storageGetOperation,
110
+ storageGetRestBinding,
111
+ storagePutOperation,
112
+ storagePutRestBinding,
113
+ storageScanOperation,
114
+ storageScanRestBinding
115
+ } from "./storage.js";
116
+ import {
117
+ streamWorkflowSseOperation,
118
+ streamWorkflowSseRestBinding
119
+ } from "./stream-workflow-sse.js";
120
+ import {
121
+ submitReviewDecisionOperation,
122
+ submitReviewDecisionRestBinding
123
+ } from "./submit-review-decision.js";
124
+ import { suspendWorkflowOperation, suspendWorkflowRestBinding } from "./suspend-workflow.js";
125
+ import { timeoutWorkflowOperation, timeoutWorkflowRestBinding } from "./timeout-workflow.js";
126
+ import { updateScheduleOperation, updateScheduleRestBinding } from "./update-schedule.js";
127
+ import { updateWorkflowOperation, updateWorkflowRestBinding } from "./update-workflow.js";
128
+ import {
129
+ workflowEventsSseOperation,
130
+ workflowEventsSseRestBinding
131
+ } from "./workflow-events-sse.js";
132
+ import { workflowEventsSubscriptionOperation } from "./workflow-events-subscription.js";
133
+ export const STATIC_REST_BINDINGS = [
134
+ listAlertsRestBinding,
135
+ getPrincipalRestBinding,
136
+ startWorkflowRestBinding,
137
+ startOrSignalWorkflowRestBinding,
138
+ recoverAllRestBinding,
139
+ listWorkflowsRestBinding,
140
+ aggregateWorkflowsRestBinding,
141
+ purgeWorkflowsRestBinding,
142
+ bulkCancelWorkflowsRestBinding,
143
+ bulkSignalWorkflowsRestBinding,
144
+ bulkRetryFailedWorkflowsRestBinding,
145
+ bulkDeleteWorkflowsRestBinding,
146
+ bulkMutateWorkflowTagsRestBinding,
147
+ getWorkflowRestBinding,
148
+ cancelWorkflowRestBinding,
149
+ getWorkflowResultRestBinding,
150
+ getWorkflowAttributesRestBinding,
151
+ ...workflowObservability.workflowObservabilityRestBindings,
152
+ getWorkflowEventsRestBinding,
153
+ setWorkflowAttributesRestBinding,
154
+ signalWorkflowRestBinding,
155
+ asyncActivity.listPendingAsyncActivitiesRestBinding,
156
+ asyncActivity.completeAsyncActivityRestBinding,
157
+ asyncActivity.failAsyncActivityRestBinding,
158
+ queryWorkflowRestBinding,
159
+ queryWorkflowWithInputRestBinding,
160
+ resumeWorkflowRestBinding,
161
+ suspendWorkflowRestBinding,
162
+ forkWorkflowRestBinding,
163
+ timeoutWorkflowRestBinding,
164
+ updateWorkflowRestBinding,
165
+ createScheduleRestBinding,
166
+ updateScheduleRestBinding,
167
+ getRegistryRestBinding,
168
+ getSystemLeaseRestBinding,
169
+ getRetentionOverviewRestBinding,
170
+ getUpdateResultRestBinding,
171
+ listReviewsRestBinding,
172
+ getReviewRestBinding,
173
+ listCheckpointsRestBinding,
174
+ getCheckpointAtRestBinding,
175
+ getWorkflowTimelineRestBinding,
176
+ addWorkflowTagsRestBinding,
177
+ removeWorkflowTagsRestBinding,
178
+ submitReviewDecisionRestBinding,
179
+ cancelScheduleRestBinding,
180
+ pauseScheduleRestBinding,
181
+ resumeScheduleRestBinding,
182
+ getStreamChunksRestBinding,
183
+ streamWorkflowSseRestBinding,
184
+ workflowEventsSseRestBinding,
185
+ fleetEventsSseRestBinding,
186
+ getTaskDiagnosticsRestBinding,
187
+ clearTaskDeadLetterRestBinding,
188
+ listSchedulesRestBinding,
189
+ getScheduleRestBinding,
190
+ replayWorkflowRestBinding,
191
+ storageCapabilities.storageCapabilitiesRestBinding,
192
+ storageGetRestBinding,
193
+ storagePutRestBinding,
194
+ storageDeleteRestBinding,
195
+ storageScanRestBinding,
196
+ storageBatchRestBinding,
197
+ storageConditionalBatchRestBinding
198
+ ], STATIC_OPERATIONS = [
199
+ startWorkflowOperation,
200
+ startOrSignalWorkflowOperation,
201
+ recoverAllOperation,
202
+ listWorkflowsOperation,
203
+ aggregateWorkflowsOperation,
204
+ purgeWorkflowsOperation,
205
+ bulkCancelWorkflowsOperation,
206
+ bulkSignalWorkflowsOperation,
207
+ bulkRetryFailedWorkflowsOperation,
208
+ bulkDeleteWorkflowsOperation,
209
+ bulkMutateWorkflowTagsOperation,
210
+ getWorkflowOperation,
211
+ cancelWorkflowOperation,
212
+ getWorkflowResultOperation,
213
+ getWorkflowAttributesOperation,
214
+ ...workflowObservability.workflowObservabilityOperations,
215
+ getWorkflowEventsOperation,
216
+ setWorkflowAttributesOperation,
217
+ signalWorkflowOperation,
218
+ asyncActivity.listPendingAsyncActivitiesOperation,
219
+ asyncActivity.completeAsyncActivityOperation,
220
+ asyncActivity.failAsyncActivityOperation,
221
+ queryWorkflowOperation,
222
+ resumeWorkflowOperation,
223
+ suspendWorkflowOperation,
224
+ forkWorkflowOperation,
225
+ timeoutWorkflowOperation,
226
+ updateWorkflowOperation,
227
+ createScheduleOperation,
228
+ updateScheduleOperation,
229
+ getRegistryOperation,
230
+ getSystemLeaseOperation,
231
+ getRetentionOverviewOperation,
232
+ getUpdateResultOperation,
233
+ listReviewsOperation,
234
+ getReviewOperation,
235
+ listCheckpointsOperation,
236
+ getCheckpointAtOperation,
237
+ getWorkflowTimelineOperation,
238
+ addWorkflowTagsOperation,
239
+ removeWorkflowTagsOperation,
240
+ submitReviewDecisionOperation,
241
+ cancelScheduleOperation,
242
+ pauseScheduleOperation,
243
+ resumeScheduleOperation,
244
+ getStreamChunksOperation,
245
+ streamWorkflowSseOperation,
246
+ workflowEventsSseOperation,
247
+ fleetEventsSseOperation,
248
+ workflowEventsSubscriptionOperation,
249
+ fleetEventsSubscriptionOperation,
250
+ clearTaskDeadLetterOperation,
251
+ listSchedulesOperation,
252
+ listAlertsOperation,
253
+ getPrincipalOperation,
254
+ getScheduleOperation,
255
+ replayWorkflowOperation,
256
+ storageCapabilities.storageCapabilitiesOperation,
257
+ storageGetOperation,
258
+ storagePutOperation,
259
+ storageDeleteOperation,
260
+ storageScanOperation,
261
+ storageBatchOperation,
262
+ storageConditionalBatchOperation
263
+ ];
@@ -6,6 +6,11 @@
6
6
  * direct meta and discovery routes first; remaining requests then match
7
7
  * these operation-backed bindings.
8
8
  *
9
+ * Statically-configured operations and bindings live in
10
+ * `operations/static-registrations.ts`; this module owns the heterogeneous
11
+ * binding type, the per-server factory wiring (metrics, workers, task
12
+ * queues, diagnostics), and the composed live registry/binding builders.
13
+ *
9
14
  * @module server/rest-bindings
10
15
  */
11
16
  import type { MetricsCollector } from '../observability/metrics.ts';
@@ -1,110 +1,12 @@
1
1
  import { createOperationRegistry } from "./operation-catalog.js";
2
- import {
3
- addWorkflowTagsOperation,
4
- addWorkflowTagsRestBinding
5
- } from "./operations/add-workflow-tags.js";
6
- import {
7
- aggregateWorkflowsOperation,
8
- aggregateWorkflowsRestBinding
9
- } from "./operations/aggregate-workflows.js";
10
- import * as asyncActivity from "./operations/async-activity.js";
11
- import {
12
- bulkCancelWorkflowsOperation,
13
- bulkCancelWorkflowsRestBinding
14
- } from "./operations/bulk-cancel-workflows.js";
15
- import {
16
- bulkDeleteWorkflowsOperation,
17
- bulkDeleteWorkflowsRestBinding
18
- } from "./operations/bulk-delete-workflows.js";
19
- import {
20
- bulkMutateWorkflowTagsOperation,
21
- bulkMutateWorkflowTagsRestBinding
22
- } from "./operations/bulk-mutate-workflow-tags.js";
23
- import {
24
- bulkRetryFailedWorkflowsOperation,
25
- bulkRetryFailedWorkflowsRestBinding
26
- } from "./operations/bulk-retry-failed-workflows.js";
27
- import {
28
- bulkSignalWorkflowsOperation,
29
- bulkSignalWorkflowsRestBinding
30
- } from "./operations/bulk-signal-workflows.js";
31
- import {
32
- cancelScheduleOperation,
33
- cancelScheduleRestBinding
34
- } from "./operations/cancel-schedule.js";
35
- import {
36
- cancelWorkflowOperation,
37
- cancelWorkflowRestBinding
38
- } from "./operations/cancel-workflow.js";
39
- import {
40
- createScheduleOperation,
41
- createScheduleRestBinding
42
- } from "./operations/create-schedule.js";
43
- import {
44
- fleetEventsSseOperation,
45
- fleetEventsSseRestBinding
46
- } from "./operations/fleet-events-sse.js";
47
- import { fleetEventsSubscriptionOperation } from "./operations/fleet-events-subscription.js";
48
- import { forkWorkflowOperation, forkWorkflowRestBinding } from "./operations/fork-workflow.js";
49
- import {
50
- getCheckpointAtOperation,
51
- getCheckpointAtRestBinding
52
- } from "./operations/get-checkpoint-at.js";
53
- import { getRegistryOperation, getRegistryRestBinding } from "./operations/get-registry.js";
54
- import {
55
- getRetentionOverviewOperation,
56
- getRetentionOverviewRestBinding
57
- } from "./operations/get-retention-overview.js";
58
- import { getReviewOperation, getReviewRestBinding } from "./operations/get-review.js";
59
- import { getScheduleOperation, getScheduleRestBinding } from "./operations/get-schedule.js";
60
- import {
61
- getStreamChunksOperation,
62
- getStreamChunksRestBinding
63
- } from "./operations/get-stream-chunks.js";
64
- import {
65
- getSystemLeaseOperation,
66
- getSystemLeaseRestBinding
67
- } from "./operations/get-system-lease.js";
68
2
  import {
69
3
  createGetSystemMetricsOperation,
70
4
  createGetSystemMetricsRestBinding
71
5
  } from "./operations/get-system-metrics.js";
72
6
  import {
73
- clearTaskDeadLetterOperation,
74
- clearTaskDeadLetterRestBinding,
75
7
  createGetTaskDiagnosticsOperation,
76
- getTaskDiagnosticsOperation,
77
- getTaskDiagnosticsRestBinding
8
+ getTaskDiagnosticsOperation
78
9
  } from "./operations/get-task-diagnostics.js";
79
- import {
80
- getUpdateResultOperation,
81
- getUpdateResultRestBinding
82
- } from "./operations/get-update-result.js";
83
- import {
84
- getWorkflowAttributesOperation,
85
- getWorkflowAttributesRestBinding
86
- } from "./operations/get-workflow-attributes.js";
87
- import {
88
- getWorkflowEventsOperation,
89
- getWorkflowEventsRestBinding
90
- } from "./operations/get-workflow-events.js";
91
- import * as workflowObservability from "./operations/get-workflow-observability.js";
92
- import {
93
- getWorkflowResultOperation,
94
- getWorkflowResultRestBinding
95
- } from "./operations/get-workflow-result.js";
96
- import {
97
- getWorkflowTimelineOperation,
98
- getWorkflowTimelineRestBinding
99
- } from "./operations/get-workflow-timeline.js";
100
- import { getWorkflowOperation, getWorkflowRestBinding } from "./operations/get-workflow.js";
101
- import { listAlertsOperation, listAlertsRestBinding } from "./operations/list-alerts.js";
102
- import {
103
- listCheckpointsOperation,
104
- listCheckpointsRestBinding
105
- } from "./operations/list-checkpoints.js";
106
- import { listReviewsOperation, listReviewsRestBinding } from "./operations/list-reviews.js";
107
- import { listSchedulesOperation, listSchedulesRestBinding } from "./operations/list-schedules.js";
108
10
  import {
109
11
  createListTaskQueuesOperation,
110
12
  createListTaskQueuesRestBinding,
@@ -115,86 +17,7 @@ import {
115
17
  createListWorkersRestBinding,
116
18
  listWorkersOperation
117
19
  } from "./operations/list-workers.js";
118
- import { listWorkflowsOperation, listWorkflowsRestBinding } from "./operations/list-workflows.js";
119
- import { pauseScheduleOperation, pauseScheduleRestBinding } from "./operations/pause-schedule.js";
120
- import {
121
- purgeWorkflowsOperation,
122
- purgeWorkflowsRestBinding
123
- } from "./operations/purge-workflows.js";
124
- import {
125
- queryWorkflowOperation,
126
- queryWorkflowRestBinding,
127
- queryWorkflowWithInputRestBinding
128
- } from "./operations/query-workflow.js";
129
- import { recoverAllOperation, recoverAllRestBinding } from "./operations/recover-all.js";
130
- import {
131
- removeWorkflowTagsOperation,
132
- removeWorkflowTagsRestBinding
133
- } from "./operations/remove-workflow-tags.js";
134
- import {
135
- replayWorkflowOperation,
136
- replayWorkflowRestBinding
137
- } from "./operations/replay-workflow.js";
138
- import {
139
- resumeScheduleOperation,
140
- resumeScheduleRestBinding
141
- } from "./operations/resume-schedule.js";
142
- import {
143
- resumeWorkflowOperation,
144
- resumeWorkflowRestBinding
145
- } from "./operations/resume-workflow.js";
146
- import {
147
- setWorkflowAttributesOperation,
148
- setWorkflowAttributesRestBinding
149
- } from "./operations/set-workflow-attributes.js";
150
- import {
151
- signalWorkflowOperation,
152
- signalWorkflowRestBinding
153
- } from "./operations/signal-workflow.js";
154
- import {
155
- startOrSignalWorkflowOperation,
156
- startOrSignalWorkflowRestBinding
157
- } from "./operations/start-or-signal-workflow.js";
158
- import { startWorkflowOperation, startWorkflowRestBinding } from "./operations/start-workflow.js";
159
- import * as storageCapabilities from "./operations/storage-capabilities.js";
160
- import {
161
- storageBatchOperation,
162
- storageBatchRestBinding,
163
- storageConditionalBatchOperation,
164
- storageConditionalBatchRestBinding,
165
- storageDeleteOperation,
166
- storageDeleteRestBinding,
167
- storageGetOperation,
168
- storageGetRestBinding,
169
- storagePutOperation,
170
- storagePutRestBinding,
171
- storageScanOperation,
172
- storageScanRestBinding
173
- } from "./operations/storage.js";
174
- import {
175
- streamWorkflowSseOperation,
176
- streamWorkflowSseRestBinding
177
- } from "./operations/stream-workflow-sse.js";
178
- import {
179
- submitReviewDecisionOperation,
180
- submitReviewDecisionRestBinding
181
- } from "./operations/submit-review-decision.js";
182
- import {
183
- suspendWorkflowOperation,
184
- suspendWorkflowRestBinding
185
- } from "./operations/suspend-workflow.js";
186
- import {
187
- timeoutWorkflowOperation,
188
- timeoutWorkflowRestBinding
189
- } from "./operations/timeout-workflow.js";
190
- import {
191
- updateScheduleOperation,
192
- updateScheduleRestBinding
193
- } from "./operations/update-schedule.js";
194
- import {
195
- updateWorkflowOperation,
196
- updateWorkflowRestBinding
197
- } from "./operations/update-workflow.js";
20
+ import { STATIC_OPERATIONS, STATIC_REST_BINDINGS } from "./operations/static-registrations.js";
198
21
  import {
199
22
  clearDeploymentDrainOperation,
200
23
  clearWorkerDrainOperation,
@@ -209,76 +32,7 @@ import {
209
32
  drainDeploymentOperation,
210
33
  drainWorkerOperation
211
34
  } from "./operations/worker-drain.js";
212
- import {
213
- workflowEventsSseOperation,
214
- workflowEventsSseRestBinding
215
- } from "./operations/workflow-events-sse.js";
216
- import { workflowEventsSubscriptionOperation } from "./operations/workflow-events-subscription.js";
217
- export const REST_BINDINGS = [
218
- listAlertsRestBinding,
219
- startWorkflowRestBinding,
220
- startOrSignalWorkflowRestBinding,
221
- recoverAllRestBinding,
222
- listWorkflowsRestBinding,
223
- aggregateWorkflowsRestBinding,
224
- purgeWorkflowsRestBinding,
225
- bulkCancelWorkflowsRestBinding,
226
- bulkSignalWorkflowsRestBinding,
227
- bulkRetryFailedWorkflowsRestBinding,
228
- bulkDeleteWorkflowsRestBinding,
229
- bulkMutateWorkflowTagsRestBinding,
230
- getWorkflowRestBinding,
231
- cancelWorkflowRestBinding,
232
- getWorkflowResultRestBinding,
233
- getWorkflowAttributesRestBinding,
234
- ...workflowObservability.workflowObservabilityRestBindings,
235
- getWorkflowEventsRestBinding,
236
- setWorkflowAttributesRestBinding,
237
- signalWorkflowRestBinding,
238
- asyncActivity.listPendingAsyncActivitiesRestBinding,
239
- asyncActivity.completeAsyncActivityRestBinding,
240
- asyncActivity.failAsyncActivityRestBinding,
241
- queryWorkflowRestBinding,
242
- queryWorkflowWithInputRestBinding,
243
- resumeWorkflowRestBinding,
244
- suspendWorkflowRestBinding,
245
- forkWorkflowRestBinding,
246
- timeoutWorkflowRestBinding,
247
- updateWorkflowRestBinding,
248
- createScheduleRestBinding,
249
- updateScheduleRestBinding,
250
- getRegistryRestBinding,
251
- getSystemLeaseRestBinding,
252
- getRetentionOverviewRestBinding,
253
- getUpdateResultRestBinding,
254
- listReviewsRestBinding,
255
- getReviewRestBinding,
256
- listCheckpointsRestBinding,
257
- getCheckpointAtRestBinding,
258
- getWorkflowTimelineRestBinding,
259
- addWorkflowTagsRestBinding,
260
- removeWorkflowTagsRestBinding,
261
- submitReviewDecisionRestBinding,
262
- cancelScheduleRestBinding,
263
- pauseScheduleRestBinding,
264
- resumeScheduleRestBinding,
265
- getStreamChunksRestBinding,
266
- streamWorkflowSseRestBinding,
267
- workflowEventsSseRestBinding,
268
- fleetEventsSseRestBinding,
269
- getTaskDiagnosticsRestBinding,
270
- clearTaskDeadLetterRestBinding,
271
- listSchedulesRestBinding,
272
- getScheduleRestBinding,
273
- replayWorkflowRestBinding,
274
- storageCapabilities.storageCapabilitiesRestBinding,
275
- storageGetRestBinding,
276
- storagePutRestBinding,
277
- storageDeleteRestBinding,
278
- storageScanRestBinding,
279
- storageBatchRestBinding,
280
- storageConditionalBatchRestBinding
281
- ];
35
+ export const REST_BINDINGS = STATIC_REST_BINDINGS;
282
36
  export function createLiveRestBindings() {
283
37
  return [
284
38
  ...REST_BINDINGS,
@@ -349,70 +103,8 @@ function buildTaskDiagnosticsOperationForRegistry(options) {
349
103
  export function createLiveOperationRegistry(options) {
350
104
  const resolved = options ?? {};
351
105
  return createOperationRegistry([
352
- startWorkflowOperation,
353
- startOrSignalWorkflowOperation,
354
- recoverAllOperation,
355
- listWorkflowsOperation,
356
- aggregateWorkflowsOperation,
357
- purgeWorkflowsOperation,
358
- bulkCancelWorkflowsOperation,
359
- bulkSignalWorkflowsOperation,
360
- bulkRetryFailedWorkflowsOperation,
361
- bulkDeleteWorkflowsOperation,
362
- bulkMutateWorkflowTagsOperation,
363
- getWorkflowOperation,
364
- cancelWorkflowOperation,
365
- getWorkflowResultOperation,
366
- getWorkflowAttributesOperation,
367
- ...workflowObservability.workflowObservabilityOperations,
368
- getWorkflowEventsOperation,
369
- setWorkflowAttributesOperation,
370
- signalWorkflowOperation,
371
- asyncActivity.listPendingAsyncActivitiesOperation,
372
- asyncActivity.completeAsyncActivityOperation,
373
- asyncActivity.failAsyncActivityOperation,
374
- queryWorkflowOperation,
375
- resumeWorkflowOperation,
376
- suspendWorkflowOperation,
377
- forkWorkflowOperation,
378
- timeoutWorkflowOperation,
379
- updateWorkflowOperation,
380
- createScheduleOperation,
381
- updateScheduleOperation,
382
- getRegistryOperation,
383
- getSystemLeaseOperation,
384
- getRetentionOverviewOperation,
385
- getUpdateResultOperation,
386
- listReviewsOperation,
387
- getReviewOperation,
388
- listCheckpointsOperation,
389
- getCheckpointAtOperation,
390
- getWorkflowTimelineOperation,
391
- addWorkflowTagsOperation,
392
- removeWorkflowTagsOperation,
393
- submitReviewDecisionOperation,
394
- cancelScheduleOperation,
395
- pauseScheduleOperation,
396
- resumeScheduleOperation,
397
- getStreamChunksOperation,
398
- streamWorkflowSseOperation,
399
- workflowEventsSseOperation,
400
- fleetEventsSseOperation,
401
- workflowEventsSubscriptionOperation,
402
- fleetEventsSubscriptionOperation,
106
+ ...STATIC_OPERATIONS,
403
107
  buildTaskDiagnosticsOperationForRegistry(resolved),
404
- clearTaskDeadLetterOperation,
405
- listSchedulesOperation,
406
- listAlertsOperation,
407
- getScheduleOperation,
408
- replayWorkflowOperation,
409
- storageCapabilities.storageCapabilitiesOperation,
410
- storageGetOperation,
411
- storagePutOperation,
412
- storageDeleteOperation,
413
- storageScanOperation,
414
- storageBatchOperation,
415
- storageConditionalBatchOperation,
416
108
  buildSystemMetricsOperation(resolved),
417
109
  buildListWorkersOperationForRegistry(resolved),
418
110
  buildDrainWorkerOperationForRegistry(resolved),
package/dist/version.d.ts CHANGED
@@ -9,4 +9,4 @@
9
9
  * console.log(`Running Weft ${VERSION}`);
10
10
  * ```
11
11
  */
12
- export declare const VERSION = "0.17.0";
12
+ export declare const VERSION = "0.18.0";
package/dist/version.js CHANGED
@@ -1 +1 @@
1
- export const VERSION = "0.17.0";
1
+ export const VERSION = "0.18.0";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lostgradient/weft",
3
- "version": "0.17.0",
3
+ "version": "0.18.0",
4
4
  "description": "A Bun-native durable execution engine with pluggable key-value storage.",
5
5
  "keywords": [
6
6
  "bun",