Skip to content

Function: evaluateFsProtectGuard() ​

ts
function evaluateFsProtectGuard(
   node, 
   input, 
   _ctx
): PolicyGuardEvaluationResult;

Defined in: fs/src/executors/fs-path-guard-executors.ts:48

Evaluates an FsProtectGuardNode (fs:protect) against proposed tool effects (SPEC.md §4.3).

Rejects write mutations targeting paths matching node.globs unless covered by input.activeLeases.

Parameters ​

ParameterTypeDescription
nodeFsProtectGuardNodeProtect 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.