Saltar al contenido principal
Versión: 0.25.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


isReadOnlyHinted()?​

optional isReadOnlyHinted(toolName): Promise<boolean>;

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

Whether an MCP tool's own server marks it readOnlyHint, for the extensions whose manifest lists none (readOnlyHints.ts).

Parameters​

ParameterType
toolNamestring

Returns​

Promise<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