refactor(security): unify exec approval request matching

This commit is contained in:
Peter Steinberger
2026-02-26 03:54:27 +01:00
parent 75dfb71e4e
commit 92eb3dfc9d
8 changed files with 182 additions and 78 deletions

View File

@@ -11,20 +11,22 @@ export type ExecHost = "sandbox" | "gateway" | "node";
export type ExecSecurity = "deny" | "allowlist" | "full";
export type ExecAsk = "off" | "on-miss" | "always";
export type ExecApprovalRequestPayload = {
command: string;
commandArgv?: string[];
cwd?: string | null;
nodeId?: string | null;
host?: string | null;
security?: string | null;
ask?: string | null;
agentId?: string | null;
resolvedPath?: string | null;
sessionKey?: string | null;
};
export type ExecApprovalRequest = {
id: string;
request: {
command: string;
commandArgv?: string[] | null;
cwd?: string | null;
nodeId?: string | null;
host?: string | null;
security?: string | null;
ask?: string | null;
agentId?: string | null;
resolvedPath?: string | null;
sessionKey?: string | null;
};
request: ExecApprovalRequestPayload;
createdAtMs: number;
expiresAtMs: number;
};