feat: add web interface with real-time streaming and timed runs

- Add Fastify-based web server with SSE for real-time updates
- Create responsive dark-themed UI with:
  - Prompt input with directory and duration options
  - Live countdown timer for timed runs
  - Real-time output streaming
  - Collapsible sessions panel
  - Cost and task tracking
- Support timed runs that repeat prompts for specified duration
- Add /api endpoints for sessions, scheduled runs, and status
- Update Session class to parse Claude CLI JSON output
- Add 'claudeman web' command to start the interface

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
arkon
2026-01-18 05:14:34 +01:00
co-authored by Claude Opus 4.5
parent e1bb800473
commit c4aae98a01
9 changed files with 2835 additions and 65 deletions
+21
View File
@@ -449,4 +449,25 @@ program
console.log('');
});
// Web interface command
program
.command('web')
.description('Start the web interface')
.option('-p, --port <port>', 'Port to listen on', '3000')
.action(async (options) => {
const { startWebServer } = await import('./web/server.js');
const port = parseInt(options.port, 10);
console.log(chalk.cyan(`Starting Claudeman web interface on port ${port}...`));
try {
await startWebServer(port);
console.log(chalk.green(`\n✓ Web interface running at http://localhost:${port}`));
console.log(chalk.gray(' Press Ctrl+C to stop\n'));
} catch (err) {
console.error(chalk.red(`✗ Failed to start web server: ${(err as Error).message}`));
process.exit(1);
}
});
export { program };