( config: RuntimeConfig | undefined )
| 277 | * This includes both explicit "worktree" type AND legacy "local" with srcBaseDir. |
| 278 | */ |
| 279 | export function isWorktreeRuntime( |
| 280 | config: RuntimeConfig | undefined |
| 281 | ): config is |
| 282 | | Extract<RuntimeConfig, { type: "worktree" }> |
| 283 | | Extract<RuntimeConfig, { type: "local"; srcBaseDir: string }> { |
| 284 | if (!config) return false; |
| 285 | if (config.type === "worktree") return true; |
| 286 | // Legacy: "local" with srcBaseDir is treated as worktree |
| 287 | if (config.type === "local" && "srcBaseDir" in config && config.srcBaseDir) return true; |
| 288 | return false; |
| 289 | } |
| 290 | |
| 291 | /** |
| 292 | * Type guard to check if a runtime config is project-dir local (no isolation) |
no outgoing calls
no test coverage detected