refactor: separate exec policy and execution targets

This commit is contained in:
Peter Steinberger
2026-03-23 19:33:29 -07:00
parent a96eded4a0
commit 7f373823b0
14 changed files with 444 additions and 170 deletions

View File

@@ -5,9 +5,9 @@ import type { GatewayClient } from "../gateway/client.js";
import {
addAllowlistEntry,
recordAllowlistUse,
resolveApprovalAuditCandidatePath,
resolveAllowAlwaysPatterns,
resolveExecApprovals,
resolvePolicyAllowlistCandidatePath,
type ExecAllowlistEntry,
type ExecAsk,
type ExecCommandSegment,
@@ -576,7 +576,7 @@ async function executeSystemRunPhase(
phase.agentId,
match,
phase.commandText,
resolvePolicyAllowlistCandidatePath(phase.segments[0]?.resolution ?? null, phase.cwd),
resolveApprovalAuditCandidatePath(phase.segments[0]?.resolution ?? null, phase.cwd),
);
}
}