fix: secure console operation posts

This commit is contained in:
lda
2026-08-11 22:01:21 +07:00 Verified
parent 6a73a5ae12
commit e017cc0a97
5 changed files with 243 additions and 23 deletions
+2 -1
View File
@@ -14,6 +14,7 @@ import {
type OperationExchange,
type WorkflowRpcOptions,
} from "./service.js";
import type { OperationName } from "./method-registry.js";
type JsonRpcRequest = {
readonly jsonrpc: "2.0";
@@ -51,7 +52,7 @@ const jsonResponse = (body: unknown, status = 200): Response =>
const runOperation = (
options: WorkflowRpcOptions,
operation: string = "workflow.health",
operation: OperationName = "workflow.health",
params: unknown = {},
): Promise<OperationExchange> =>
Effect.gen(function* () {