import { randomUUID } from "node:crypto"; import type { ExecApprovalForwarder } from "../../infra/exec-approval-forwarder.js"; import type { ExecApprovalDecision } from "../../infra/exec-approvals.js"; import type { PluginApprovalRequestPayload } from "../../infra/plugin-approvals.js"; import {
DEFAULT_PLUGIN_APPROVAL_TIMEOUT_MS,
MAX_PLUGIN_APPROVAL_TIMEOUT_MS,
} from "../../infra/plugin-approvals.js"; import { normalizeOptionalString } from "../../shared/string-coerce.js"; import type { ExecApprovalManager } from "../exec-approval-manager.js"; import {
ErrorCodes,
errorShape,
formatValidationErrors,
validatePluginApprovalRequestParams,
validatePluginApprovalResolveParams,
} from "../protocol/index.js"; import {
handleApprovalResolve,
handleApprovalWaitDecision,
handlePendingApprovalRequest,
isApprovalDecision,
} from "./approval-shared.js"; import type { GatewayRequestHandlers } from "./types.js";
// Always server-generate the ID — never accept plugin-provided IDs. // Kind-prefix so /approve routing can distinguish plugin vs exec IDs deterministically. const record = manager.create(request, timeoutMs, `plugin:${randomUUID()}`);
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.