(agentId?: AgentId)
| 133 | * @param agentId Optional agent ID for subagents. If not provided, returns main session plan. |
| 134 | */ |
| 135 | export function getPlan(agentId?: AgentId): string | null { |
| 136 | const filePath = getPlanFilePath(agentId) |
| 137 | try { |
| 138 | return getFsImplementation().readFileSync(filePath, { encoding: 'utf-8' }) |
| 139 | } catch (error) { |
| 140 | if (isENOENT(error)) return null |
| 141 | logError(error) |
| 142 | return null |
| 143 | } |
| 144 | } |
| 145 | |
| 146 | /** |
| 147 | * Extract the plan slug from a log's message history. |
no test coverage detected