Skip to main content
Version: 0.19.0

Interface: PlanModeSpec<TConfig>

Defined in: core/agentSpec.ts:242

The domain's part of "plan" mode: which files hold the plan and which of its own tools only read.

Type Parameters​

Type ParameterDefault type
TConfig extends BaseSessionConfigBaseSessionConfig

Methods​

isPlanFile()?​

optional isPlanFile(filePath, config): boolean;

Defined in: core/agentSpec.ts:248

Whether filePath (absolute) is a plan file Write/Edit may touch in plan mode, e.g. drafts/<slug>/plan.md. It must also be writable under the file scope (knowledgeDir or extraWritableDirs), which still applies.

Parameters​

ParameterType
filePathstring
configTConfig

Returns​

boolean


isReadOnlyTool()?​

optional isReadOnlyTool(toolName, input): boolean;

Defined in: core/agentSpec.ts:254

Whether one of the agent's own MCP tools (mcp__<server>__<tool>) only reads, so plan mode lets it run. Every MCP tool it doesn't vouch for is denied there: a forgotten tool can't change anything.

Parameters​

ParameterType
toolNamestring
inputRecord<string, unknown>

Returns​

boolean