(root: string, mode: WorkspaceMode, sourceRoot: string | undefined)
| 228 | } |
| 229 | |
| 230 | private assertWorkspaceRootAllowed(root: string, mode: WorkspaceMode, sourceRoot: string | undefined): string { |
| 231 | if (mode === "worktree") { |
| 232 | if (!sourceRoot) { |
| 233 | throw new Error(`Stored worktree workspace is missing sourceRoot: ${root}`); |
| 234 | } |
| 235 | assertAllowedPath(sourceRoot, this.config.allowedRoots); |
| 236 | return assertAllowedPath(root, [this.config.worktreeRoot]); |
| 237 | } |
| 238 | |
| 239 | return assertAllowedPath(root, this.config.allowedRoots); |
| 240 | } |
| 241 | |
| 242 | private loadInitialAgentsFiles(root: string): LoadedAgentsFile[] { |
| 243 | const agentDir = resolve(this.config.agentDir); |
no test coverage detected