(projectPath: string, workflowId: string)
| 25 | } |
| 26 | |
| 27 | async function writeManagedCommand(projectPath: string, workflowId: string): Promise<void> { |
| 28 | const adapter = CommandAdapterRegistry.get('claude'); |
| 29 | if (!adapter) { |
| 30 | throw new Error('Claude adapter not found'); |
| 31 | } |
| 32 | const commandPath = adapter.getFilePath(workflowId); |
| 33 | const fullPath = path.isAbsolute(commandPath) |
| 34 | ? commandPath |
| 35 | : path.join(projectPath, commandPath); |
| 36 | await fsp.mkdir(path.dirname(fullPath), { recursive: true }); |
| 37 | await fsp.writeFile(fullPath, '# command\n', 'utf-8'); |
| 38 | } |
| 39 | |
| 40 | function readRawConfig(): Record<string, unknown> { |
| 41 | return JSON.parse(fs.readFileSync(getGlobalConfigPath(), 'utf-8')) as Record<string, unknown>; |
no test coverage detected