Skip to content

Function: evaluateFsWriteGuard() ​

ts
function evaluateFsWriteGuard(
   node, 
   input, 
   ctx
): PolicyGuardEvaluationResult;

Defined in: fs/src/executors/fs-write-guard-executors.ts:32

Evaluates an FsWriteGuardNode (fs:write-guard) against proposed tool effects (SPEC.md §3.5 & §4.3).

Blocks paths matching node.denyGlobs unless exempted by node.allowGlobs or input.activeLeases, and when onlyExistingAtBaseRef: true is configured, restricts denials strictly to files present in existingPathsAtBaseRef.

Parameters ​

ParameterTypeDescription
nodeFsWriteGuardNodeWrite guard AST node.
inputPolicyGuardEvaluationInputTool name, proposed effects, and active leases.
ctxStepExecutionContext<unknown>Step execution context.

Returns ​

PolicyGuardEvaluationResult

Guard evaluation result and projected violatedEffects.

Released under the MIT License.