@lostgradient/weft 0.16.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.
Files changed (119) hide show
  1. package/README.md +1 -1
  2. package/dist/alerting/alert-manager.d.ts +5 -5
  3. package/dist/alerting/alert-manager.js +24 -6
  4. package/dist/alerting/index.d.ts +1 -1
  5. package/dist/alerting/types.d.ts +17 -13
  6. package/dist/alerting/types.js +5 -0
  7. package/dist/cli/generated/operation-catalog.snapshot.json +73 -0
  8. package/dist/cli/generated/operation-client.generated.d.ts +11 -2
  9. package/dist/cli/generated/operation-client.generated.js +2 -0
  10. package/dist/core/engine/disposal.js +7 -0
  11. package/dist/core/engine/engine-runtime-helpers.d.ts +3 -1
  12. package/dist/core/engine/engine-runtime-helpers.js +2 -2
  13. package/dist/core/engine/errors.d.ts +20 -0
  14. package/dist/core/engine/errors.js +8 -0
  15. package/dist/core/engine/index.d.ts +39 -17
  16. package/dist/core/engine/index.js +81 -9
  17. package/dist/core/engine/inline-launch-queue.d.ts +6 -2
  18. package/dist/core/engine/inline-launch-queue.js +41 -6
  19. package/dist/core/engine/internals.d.ts +2 -0
  20. package/dist/core/engine/lease-manager.d.ts +3 -2
  21. package/dist/core/engine/lease-manager.js +7 -3
  22. package/dist/core/engine/operations-time.js +6 -0
  23. package/dist/core/execution-strategy.d.ts +8 -0
  24. package/dist/core/inline-execution-strategy.d.ts +1 -0
  25. package/dist/core/inline-execution-strategy.js +33 -20
  26. package/dist/core/weft-error.d.ts +1 -1
  27. package/dist/core/weft-error.js +1 -0
  28. package/dist/core/worker-execution-strategy.d.ts +2 -0
  29. package/dist/core/worker-execution-strategy.js +7 -2
  30. package/dist/core/worker-turn-watchdog.d.ts +4 -1
  31. package/dist/core/worker-turn-watchdog.js +9 -4
  32. package/dist/index.d.ts +2 -2
  33. package/dist/index.js +1 -0
  34. package/dist/indexeddb.js +1 -1
  35. package/dist/json-schema.js +1 -1
  36. package/dist/mcp/tools.js +1 -3
  37. package/dist/server/authorization-scope.d.ts +32 -2
  38. package/dist/server/dashboard-assets.d.ts +12 -1
  39. package/dist/server/dashboard-assets.js +145 -31
  40. package/dist/server/index.d.ts +2 -0
  41. package/dist/server/index.js +4 -0
  42. package/dist/server/operations/aggregate-workflows.js +0 -7
  43. package/dist/server/operations/async-activity.js +5 -24
  44. package/dist/server/operations/bulk-cancel-workflows.js +3 -8
  45. package/dist/server/operations/bulk-delete-workflows.js +3 -8
  46. package/dist/server/operations/bulk-mutate-workflow-tags.js +3 -8
  47. package/dist/server/operations/bulk-operation-helpers.d.ts +2 -10
  48. package/dist/server/operations/bulk-operation-helpers.js +0 -6
  49. package/dist/server/operations/bulk-retry-failed-workflows.js +3 -8
  50. package/dist/server/operations/bulk-signal-workflows.js +3 -8
  51. package/dist/server/operations/cancel-schedule.js +1 -3
  52. package/dist/server/operations/cancel-workflow.js +1 -3
  53. package/dist/server/operations/create-schedule.js +2 -3
  54. package/dist/server/operations/fork-workflow.js +2 -3
  55. package/dist/server/operations/get-checkpoint-at.js +1 -6
  56. package/dist/server/operations/get-principal.d.ts +75 -0
  57. package/dist/server/operations/get-principal.js +41 -0
  58. package/dist/server/operations/get-registry.js +1 -7
  59. package/dist/server/operations/get-retention-overview.js +2 -15
  60. package/dist/server/operations/get-review.js +2 -15
  61. package/dist/server/operations/get-schedule.js +2 -8
  62. package/dist/server/operations/get-stream-chunks.js +2 -6
  63. package/dist/server/operations/get-system-lease.js +1 -7
  64. package/dist/server/operations/get-system-metrics.js +0 -4
  65. package/dist/server/operations/get-task-diagnostics.js +2 -13
  66. package/dist/server/operations/get-update-result.js +1 -6
  67. package/dist/server/operations/get-workflow-attributes.js +2 -15
  68. package/dist/server/operations/get-workflow-events.js +2 -15
  69. package/dist/server/operations/get-workflow-observability.js +2 -5
  70. package/dist/server/operations/get-workflow-result.js +0 -7
  71. package/dist/server/operations/get-workflow-timeline.js +1 -6
  72. package/dist/server/operations/get-workflow.d.ts +3 -6
  73. package/dist/server/operations/get-workflow.js +2 -12
  74. package/dist/server/operations/list-alerts.d.ts +5 -2
  75. package/dist/server/operations/list-alerts.js +2 -9
  76. package/dist/server/operations/list-checkpoints.js +1 -6
  77. package/dist/server/operations/list-reviews.js +0 -7
  78. package/dist/server/operations/list-schedules.js +3 -8
  79. package/dist/server/operations/list-task-queues.js +0 -4
  80. package/dist/server/operations/list-workers.js +0 -4
  81. package/dist/server/operations/list-workflows.js +0 -7
  82. package/dist/server/operations/pause-schedule.js +1 -3
  83. package/dist/server/operations/purge-workflows.js +2 -5
  84. package/dist/server/operations/query-workflow.js +4 -15
  85. package/dist/server/operations/replay-workflow.js +2 -6
  86. package/dist/server/operations/resume-schedule.js +1 -3
  87. package/dist/server/operations/resume-workflow.js +1 -3
  88. package/dist/server/operations/set-workflow-attributes.js +3 -15
  89. package/dist/server/operations/signal-workflow.js +3 -12
  90. package/dist/server/operations/single-workflow-tag-mutation.js +0 -7
  91. package/dist/server/operations/start-or-signal-workflow.js +2 -3
  92. package/dist/server/operations/start-workflow.js +2 -3
  93. package/dist/server/operations/static-registrations.d.ts +28 -0
  94. package/dist/server/operations/static-registrations.js +263 -0
  95. package/dist/server/operations/storage-capabilities.js +1 -3
  96. package/dist/server/operations/storage.js +7 -13
  97. package/dist/server/operations/submit-review-decision.js +3 -12
  98. package/dist/server/operations/suspend-workflow.js +1 -3
  99. package/dist/server/operations/timeout-workflow.js +1 -3
  100. package/dist/server/operations/update-schedule.js +1 -3
  101. package/dist/server/operations/update-workflow.js +2 -3
  102. package/dist/server/operations/worker-drain.js +0 -8
  103. package/dist/server/rest-binding.d.ts +3 -2
  104. package/dist/server/rest-bindings.d.ts +5 -0
  105. package/dist/server/rest-bindings.js +4 -312
  106. package/dist/server/route-model.d.ts +2 -0
  107. package/dist/server/route-model.js +1 -1
  108. package/dist/server/runtime/task-reconciliation.d.ts +10 -1
  109. package/dist/server/runtime/task-reconciliation.js +26 -2
  110. package/dist/server/serve-internals.js +12 -6
  111. package/dist/storage/indexeddb.js +28 -48
  112. package/dist/storage/testing.d.ts +6 -3
  113. package/dist/storage/testing.js +1 -1
  114. package/dist/version.d.ts +1 -1
  115. package/dist/version.js +1 -1
  116. package/dist/worker/protocol-schemas.d.ts +2 -2
  117. package/dist/worker/protocol-schemas.js +2 -2
  118. package/dist/worker/protocol.js +1 -1
  119. package/package.json +1 -1
@@ -6,11 +6,14 @@
6
6
  * surface, not a configuration export.
7
7
  */
8
8
  import { z } from 'zod';
9
- import type { AlertMetric } from '../../alerting/types.ts';
10
9
  import type { UnknownRestBinding } from '../rest-bindings.ts';
11
10
  declare const listAlertsInput: z.ZodObject<{}, z.core.$strip>;
12
11
  declare const activeAlertSchema: z.ZodObject<{
13
- metric: z.ZodType<AlertMetric, unknown, z.core.$ZodTypeInternals<AlertMetric, unknown>>;
12
+ metric: z.ZodEnum<{
13
+ "workflow.failure_rate": "workflow.failure_rate";
14
+ "activity.p99_duration": "activity.p99_duration";
15
+ "storage.size": "storage.size";
16
+ }>;
14
17
  threshold: z.ZodNumber;
15
18
  currentValue: z.ZodNumber;
16
19
  window: z.ZodNullable<z.ZodString>;
@@ -1,11 +1,8 @@
1
1
  import { z } from "zod";
2
+ import { ALERT_METRICS } from "../../alerting/types.js";
2
3
  import { shapeOperationFaultAsJson } from "../operation-fault.js";
3
4
  import { defineOperation } from "../operation-registry.js";
4
- const alertMetricSchema = z.enum([
5
- "workflow.failure_rate",
6
- "activity.p99_duration",
7
- "storage.size"
8
- ]), listAlertsInput = z.object({}), activeAlertSchema = z.object({
5
+ const alertMetricSchema = z.enum(ALERT_METRICS), listAlertsInput = z.object({}), activeAlertSchema = z.object({
9
6
  metric: alertMetricSchema,
10
7
  threshold: z.number(),
11
8
  currentValue: z.number(),
@@ -46,9 +43,5 @@ export const listAlertsOperation = defineOperation({
46
43
  inputSources: {},
47
44
  extractInput: async () => ({}),
48
45
  success: { kind: "json", status: 200 },
49
- shapeSuccess: (output) => new Response(JSON.stringify(output), {
50
- status: 200,
51
- headers: { "Content-Type": "application/json" }
52
- }),
53
46
  shapeFault: shapeOperationFaultAsJson
54
47
  };
@@ -1,7 +1,6 @@
1
1
  import { z } from "zod";
2
2
  import { negotiatedResponse } from "../handler/response-helpers.js";
3
3
  import { defineOperation } from "../operation-registry.js";
4
- import { shapeRestFault } from "./operation-helpers.js";
5
4
  const listCheckpointsInput = z.object({
6
5
  workflowId: z.string().min(1)
7
6
  }), listCheckpointsOutput = z.unknown();
@@ -23,9 +22,6 @@ export const listCheckpointsOperation = defineOperation({
23
22
  function shapeListCheckpointsSuccess(result, request) {
24
23
  return negotiatedResponse(request, result, 200);
25
24
  }
26
- function shapeListCheckpointsFault(fault) {
27
- return shapeRestFault(fault);
28
- }
29
25
  export const listCheckpointsRestBinding = {
30
26
  method: "GET",
31
27
  path: "/v1/workflows/:id/checkpoints",
@@ -38,6 +34,5 @@ export const listCheckpointsRestBinding = {
38
34
  workflowId: pathParams.id ?? ""
39
35
  }),
40
36
  success: { kind: "json", status: 200 },
41
- shapeSuccess: (output, request) => shapeListCheckpointsSuccess(output, request),
42
- shapeFault: shapeListCheckpointsFault
37
+ shapeSuccess: (output, request) => shapeListCheckpointsSuccess(output, request)
43
38
  };
@@ -37,12 +37,6 @@ function extractListReviewsInput(request) {
37
37
  filter.reviewType = reviewType;
38
38
  return filter;
39
39
  }
40
- function shapeListReviewsSuccess(result) {
41
- return new Response(JSON.stringify(result), {
42
- status: 200,
43
- headers: { "Content-Type": "application/json" }
44
- });
45
- }
46
40
  export const listReviewsRestBinding = {
47
41
  method: "GET",
48
42
  path: "/v1/reviews",
@@ -55,6 +49,5 @@ export const listReviewsRestBinding = {
55
49
  },
56
50
  extractInput: async (request) => extractListReviewsInput(request),
57
51
  success: { kind: "json", status: 200 },
58
- shapeSuccess: (output) => shapeListReviewsSuccess(output),
59
52
  shapeFault: shapeOperationFaultAsJson
60
53
  };
@@ -1,6 +1,6 @@
1
1
  import { z } from "zod";
2
2
  import { defineOperation } from "../operation-registry.js";
3
- import { invalidParamsFault, shapeRestFault } from "./operation-helpers.js";
3
+ import { invalidParamsFault } from "./operation-helpers.js";
4
4
  const VALID_SCHEDULE_STATUSES = new Set(["active", "paused", "cancelled"]);
5
5
  function isValidScheduleStatus(value) {
6
6
  return VALID_SCHEDULE_STATUSES.has(value);
@@ -71,11 +71,7 @@ export const listSchedulesOperation = defineOperation({
71
71
  const e = engine, filter = validateListSchedulesQuery(input);
72
72
  return e.listSchedules(filter);
73
73
  }
74
- });
75
- function shapeListSchedulesFault(fault) {
76
- return shapeRestFault(fault);
77
- }
78
- export const listSchedulesRestBinding = {
74
+ }), listSchedulesRestBinding = {
79
75
  method: "GET",
80
76
  path: "/v1/schedules",
81
77
  pathParamNames: [],
@@ -103,6 +99,5 @@ export const listSchedulesRestBinding = {
103
99
  result.offset = offset;
104
100
  return result;
105
101
  },
106
- success: { kind: "json", status: 200 },
107
- shapeFault: shapeListSchedulesFault
102
+ success: { kind: "json", status: 200 }
108
103
  };
@@ -96,10 +96,6 @@ export function createListTaskQueuesRestBinding() {
96
96
  inputSources: {},
97
97
  extractInput: async () => ({}),
98
98
  success: { kind: "json", status: 200 },
99
- shapeSuccess: (output) => new Response(JSON.stringify(output), {
100
- status: 200,
101
- headers: { "Content-Type": "application/json" }
102
- }),
103
99
  shapeFault: shapeOperationFaultAsJson
104
100
  };
105
101
  }
@@ -83,10 +83,6 @@ export function createListWorkersRestBinding() {
83
83
  inputSources: {},
84
84
  extractInput: async () => ({}),
85
85
  success: { kind: "json", status: 200 },
86
- shapeSuccess: (output) => new Response(JSON.stringify(output), {
87
- status: 200,
88
- headers: { "Content-Type": "application/json" }
89
- }),
90
86
  shapeFault: shapeOperationFaultAsJson
91
87
  };
92
88
  }
@@ -87,12 +87,6 @@ function extractListWorkflowsInput(request) {
87
87
  filter.include = includes;
88
88
  return filter;
89
89
  }
90
- function shapeListWorkflowsSuccess(result) {
91
- return new Response(JSON.stringify(result), {
92
- status: 200,
93
- headers: { "Content-Type": "application/json" }
94
- });
95
- }
96
90
  function shapeListWorkflowsFault(fault) {
97
91
  if (fault.code === "Unprocessable")
98
92
  return shapeRestFault(fault, { status: 400 });
@@ -119,6 +113,5 @@ export const listWorkflowsRestBinding = {
119
113
  },
120
114
  extractInput: async (request) => extractListWorkflowsInput(request),
121
115
  success: { kind: "json", status: 200 },
122
- shapeSuccess: (output) => shapeListWorkflowsSuccess(output),
123
116
  shapeFault: shapeListWorkflowsFault
124
117
  };
@@ -1,6 +1,5 @@
1
1
  import { z } from "zod";
2
2
  import { defineOperation } from "../operation-registry.js";
3
- import { shapeRestFault } from "./operation-helpers.js";
4
3
  import { mapScheduleErrorToFault } from "./schedule-faults.js";
5
4
  const pauseScheduleInput = z.object({
6
5
  scheduleId: z.string().min(1)
@@ -38,6 +37,5 @@ export const pauseScheduleOperation = defineOperation({
38
37
  extractInput: async (_request, pathParams) => ({
39
38
  scheduleId: pathParams.id ?? ""
40
39
  }),
41
- success: { kind: "empty", status: 204 },
42
- shapeFault: shapeRestFault
40
+ success: { kind: "empty", status: 204 }
43
41
  };
@@ -8,8 +8,7 @@ import {
8
8
  parseBulkListFilterFromBody,
9
9
  readOptionalJsonBody
10
10
  } from "./bulk-filter-helpers.js";
11
- import { shapeBulkJsonSuccess } from "./bulk-operation-helpers.js";
12
- import { invalidParamsFault, shapeRestFault } from "./operation-helpers.js";
11
+ import { invalidParamsFault } from "./operation-helpers.js";
13
12
  const purgeWorkflowsOutput = z.unknown();
14
13
  export const purgeWorkflowsOperation = defineOperation({
15
14
  name: "weft.workflows.purge",
@@ -51,7 +50,5 @@ export const purgeWorkflowsOperation = defineOperation({
51
50
  throw invalidParamsFault(faultMessage(error));
52
51
  }
53
52
  },
54
- success: { kind: "json", status: 200 },
55
- shapeSuccess: (output) => shapeBulkJsonSuccess(output),
56
- shapeFault: shapeRestFault
53
+ success: { kind: "json", status: 200 }
57
54
  };
@@ -1,7 +1,7 @@
1
1
  import { z } from "zod";
2
2
  import { defineOperation } from "../operation-registry.js";
3
3
  import { readRestTextBody } from "../rest-body.js";
4
- import { invalidParamsFault, shapeRestFault } from "./operation-helpers.js";
4
+ import { invalidParamsFault } from "./operation-helpers.js";
5
5
  const queryWorkflowInput = z.object({
6
6
  workflowId: z.string().min(1),
7
7
  queryName: z.string().min(1),
@@ -39,14 +39,7 @@ export const queryWorkflowOperation = defineOperation({
39
39
  };
40
40
  }
41
41
  }
42
- });
43
- function shapeQueryWorkflowSuccess(result) {
44
- return new Response(JSON.stringify(result), {
45
- status: 200,
46
- headers: { "Content-Type": "application/json" }
47
- });
48
- }
49
- export const queryWorkflowRestBinding = {
42
+ }), queryWorkflowRestBinding = {
50
43
  method: "GET",
51
44
  path: "/v1/workflows/:id/query/:name",
52
45
  pathParamNames: ["id", "name"],
@@ -59,9 +52,7 @@ export const queryWorkflowRestBinding = {
59
52
  workflowId: pathParams.id ?? "",
60
53
  queryName: pathParams.name ?? ""
61
54
  }),
62
- success: { kind: "json", status: 200 },
63
- shapeSuccess: (output) => shapeQueryWorkflowSuccess(output),
64
- shapeFault: shapeRestFault
55
+ success: { kind: "json", status: 200 }
65
56
  }, queryWorkflowWithInputRestBinding = {
66
57
  method: "POST",
67
58
  path: "/v1/workflows/:id/query/:name",
@@ -94,7 +85,5 @@ export const queryWorkflowRestBinding = {
94
85
  input: body.input
95
86
  };
96
87
  },
97
- success: { kind: "json", status: 200 },
98
- shapeSuccess: (output) => shapeQueryWorkflowSuccess(output),
99
- shapeFault: shapeRestFault
88
+ success: { kind: "json", status: 200 }
100
89
  };
@@ -1,7 +1,7 @@
1
1
  import { z } from "zod";
2
2
  import { negotiatedResponse } from "../handler/response-helpers.js";
3
3
  import { defineOperation } from "../operation-registry.js";
4
- import { invalidParamsFault, shapeRestFault } from "./operation-helpers.js";
4
+ import { invalidParamsFault } from "./operation-helpers.js";
5
5
  const replayWorkflowInput = z.object({
6
6
  workflowId: z.string().min(1),
7
7
  step: z.union([z.string(), z.number()])
@@ -44,9 +44,6 @@ export const replayWorkflowOperation = defineOperation({
44
44
  return replay;
45
45
  }
46
46
  });
47
- function shapeReplayWorkflowFault(fault) {
48
- return shapeRestFault(fault);
49
- }
50
47
  function shapeReplayWorkflowSuccess(output, request) {
51
48
  return negotiatedResponse(request, output, 200);
52
49
  }
@@ -64,6 +61,5 @@ export const replayWorkflowRestBinding = {
64
61
  step: pathParams.step ?? "0"
65
62
  }),
66
63
  success: { kind: "json", status: 200 },
67
- shapeSuccess: (output, request) => shapeReplayWorkflowSuccess(output, request),
68
- shapeFault: shapeReplayWorkflowFault
64
+ shapeSuccess: (output, request) => shapeReplayWorkflowSuccess(output, request)
69
65
  };
@@ -1,6 +1,5 @@
1
1
  import { z } from "zod";
2
2
  import { defineOperation } from "../operation-registry.js";
3
- import { shapeRestFault } from "./operation-helpers.js";
4
3
  import { mapScheduleErrorToFault } from "./schedule-faults.js";
5
4
  const resumeScheduleInput = z.object({
6
5
  scheduleId: z.string().min(1)
@@ -38,6 +37,5 @@ export const resumeScheduleOperation = defineOperation({
38
37
  extractInput: async (_request, pathParams) => ({
39
38
  scheduleId: pathParams.id ?? ""
40
39
  }),
41
- success: { kind: "empty", status: 204 },
42
- shapeFault: shapeRestFault
40
+ success: { kind: "empty", status: 204 }
43
41
  };
@@ -1,5 +1,4 @@
1
1
  import { z } from "zod";
2
- import { shapeRestFault } from "./operation-helpers.js";
3
2
  import {
4
3
  createSingleWorkflowControlOperation,
5
4
  extractWorkflowIdFromPath
@@ -35,6 +34,5 @@ export const resumeWorkflowOperation = createSingleWorkflowControlOperation({
35
34
  workflowId: { kind: "path", pathParam: "id" }
36
35
  },
37
36
  extractInput: async (_request, pathParams) => extractWorkflowIdFromPath(pathParams),
38
- success: { kind: "json", status: 200 },
39
- shapeFault: shapeRestFault
37
+ success: { kind: "json", status: 200 }
40
38
  };
@@ -1,7 +1,7 @@
1
1
  import { z } from "zod";
2
2
  import { defineOperation } from "../operation-registry.js";
3
3
  import { readRestJsonBody } from "../rest-body.js";
4
- import { isOperationFault, shapeRestFault } from "./operation-helpers.js";
4
+ import { isOperationFault } from "./operation-helpers.js";
5
5
  const setWorkflowAttributesInput = z.object({
6
6
  workflowId: z.string().min(1),
7
7
  attributes: z.unknown().optional()
@@ -32,17 +32,7 @@ export const setWorkflowAttributesOperation = defineOperation({
32
32
  };
33
33
  }
34
34
  }
35
- });
36
- function shapeSetWorkflowAttributesSuccess(output) {
37
- return new Response(JSON.stringify(output), {
38
- status: 200,
39
- headers: { "Content-Type": "application/json" }
40
- });
41
- }
42
- function shapeSetWorkflowAttributesFault(fault) {
43
- return shapeRestFault(fault);
44
- }
45
- export const setWorkflowAttributesRestBinding = {
35
+ }), setWorkflowAttributesRestBinding = {
46
36
  method: "PATCH",
47
37
  path: "/v1/workflows/:id/attributes",
48
38
  pathParamNames: ["id"],
@@ -64,7 +54,5 @@ export const setWorkflowAttributesRestBinding = {
64
54
  attributes: typeof body === "object" ? body.attributes : void 0
65
55
  };
66
56
  },
67
- success: { kind: "json", status: 200 },
68
- shapeSuccess: (output) => shapeSetWorkflowAttributesSuccess(output),
69
- shapeFault: shapeSetWorkflowAttributesFault
57
+ success: { kind: "json", status: 200 }
70
58
  };
@@ -1,7 +1,7 @@
1
1
  import { z } from "zod";
2
2
  import { isSignalIdWithinByteLimit } from "../../core/signal-id.js";
3
3
  import { readRestJsonBody } from "../rest-body.js";
4
- import { isOperationFault, shapeRestFault } from "./operation-helpers.js";
4
+ import { isOperationFault } from "./operation-helpers.js";
5
5
  import {
6
6
  createSingleWorkflowControlOperation,
7
7
  extractWorkflowIdFromPath
@@ -27,14 +27,7 @@ export const signalWorkflowOperation = createSingleWorkflowControlOperation({
27
27
  await engine.signal(input.workflowId, input.signalName, input.payload, input.signalId === void 0 ? void 0 : { signalId: input.signalId });
28
28
  return { ok: !0 };
29
29
  }
30
- });
31
- function shapeSignalWorkflowSuccess(output) {
32
- return new Response(JSON.stringify(output), {
33
- status: 200,
34
- headers: { "Content-Type": "application/json" }
35
- });
36
- }
37
- export const signalWorkflowRestBinding = {
30
+ }), signalWorkflowRestBinding = {
38
31
  method: "POST",
39
32
  path: "/v1/workflows/:id/signal/:name",
40
33
  pathParamNames: ["id", "name"],
@@ -57,7 +50,5 @@ export const signalWorkflowRestBinding = {
57
50
  ...signalId === void 0 ? {} : { signalId }
58
51
  };
59
52
  },
60
- success: { kind: "json", status: 200 },
61
- shapeSuccess: (output) => shapeSignalWorkflowSuccess(output),
62
- shapeFault: shapeRestFault
53
+ success: { kind: "json", status: 200 }
63
54
  };
@@ -66,16 +66,9 @@ export function createSingleWorkflowTagMutationRestBinding(configuration) {
66
66
  };
67
67
  },
68
68
  success: { kind: "json", status: 200 },
69
- shapeSuccess: shapeSingleWorkflowTagMutationSuccess,
70
69
  shapeFault: shapeSingleWorkflowTagMutationFault
71
70
  };
72
71
  }
73
- function shapeSingleWorkflowTagMutationSuccess(output) {
74
- return new Response(JSON.stringify(output), {
75
- status: 200,
76
- headers: { "Content-Type": "application/json" }
77
- });
78
- }
79
72
  function shapeSingleWorkflowTagMutationFault(fault) {
80
73
  if (fault.code === "Unprocessable")
81
74
  return shapeRestFault(fault, { status: 400 });
@@ -9,7 +9,7 @@ import { runtimeWorkflowEngine } from "../../core/runtime-workflow-engine.js";
9
9
  import { isSignalIdWithinByteLimit } from "../../core/signal-id.js";
10
10
  import { StartWorkflowValidationError } from "../../core/start-workflow-validation.js";
11
11
  import { defineOperation } from "../operation-registry.js";
12
- import { invalidParamsFault, shapeRestFault } from "./operation-helpers.js";
12
+ import { invalidParamsFault } from "./operation-helpers.js";
13
13
  import { buildStartOrSignalWorkflowOptions } from "./start-workflow-options.js";
14
14
  import {
15
15
  extractSharedStartWorkflowRestFields,
@@ -136,6 +136,5 @@ export const startOrSignalWorkflowOperation = defineOperation({
136
136
  onTerminalConflict: record.onTerminalConflict
137
137
  };
138
138
  },
139
- success: { kind: "json", status: 201 },
140
- shapeFault: shapeRestFault
139
+ success: { kind: "json", status: 201 }
141
140
  };
@@ -7,7 +7,7 @@ import {
7
7
  import { runtimeWorkflowEngine } from "../../core/runtime-workflow-engine.js";
8
8
  import { StartWorkflowValidationError } from "../../core/start-workflow-validation.js";
9
9
  import { defineOperation } from "../operation-registry.js";
10
- import { invalidParamsFault, shapeRestFault } from "./operation-helpers.js";
10
+ import { invalidParamsFault } from "./operation-helpers.js";
11
11
  import { buildSharedStartWorkflowOptions } from "./start-workflow-options.js";
12
12
  import {
13
13
  extractSharedStartWorkflowRestFields,
@@ -99,6 +99,5 @@ export const startWorkflowOperation = defineOperation({
99
99
  extractInput: async (request, _pathParams, context) => {
100
100
  return extractSharedStartWorkflowRestFields(await parseStartWorkflowRequestRecord(request, context));
101
101
  },
102
- success: { kind: "json", status: 201 },
103
- shapeFault: shapeRestFault
102
+ success: { kind: "json", status: 201 }
104
103
  };
@@ -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>;