Saltar al contenido principal
Versión: 0.20.0

Interface: PlanScope

Defined in: core/hooks/planGate.ts:5

What plan mode lets through besides reading: see createPlanGate().

Properties​

PropertyTypeDescriptionDefined in
projectDirstringBase for relative paths: the session's cwd.core/hooks/planGate.ts:7
readOnlyTools?readonly string[]The enabled extensions' MCP tools that only read (mcp__<server>__<tool>).core/hooks/planGate.ts:13

Methods​

isPlanFile()?​

optional isPlanFile(filePath): boolean;

Defined in: core/hooks/planGate.ts:9

Whether Write/Edit may touch this file (absolute) in plan mode.

Parameters​

ParameterType
filePathstring

Returns​

boolean


isReadOnlyTool()?​

optional isReadOnlyTool(toolName, input): boolean;

Defined in: core/hooks/planGate.ts:11

Whether one of the agent's own MCP tools only reads.

Parameters​

ParameterType
toolNamestring
inputRecord<string, unknown>

Returns​

boolean