feat: communication spine — gateway, TUI, Discord (#61)

Co-authored-by: Jason Woltje <jason@diversecanvas.com>
Co-committed-by: Jason Woltje <jason@diversecanvas.com>
This commit was merged in pull request #61.
This commit is contained in:
2026-03-13 01:33:32 +00:00
committed by jason.woltje
parent 888bc32be1
commit 4f84a01072
14 changed files with 5143 additions and 10 deletions

28
packages/cli/src/cli.ts Normal file
View File

@@ -0,0 +1,28 @@
#!/usr/bin/env node
import { Command } from 'commander';
const program = new Command();
program.name('mosaic').description('Mosaic Stack CLI').version('0.0.0');
program
.command('tui')
.description('Launch interactive TUI connected to the gateway')
.option('-g, --gateway <url>', 'Gateway URL', 'http://localhost:4000')
.option('-c, --conversation <id>', 'Resume a conversation by ID')
.action(async (opts: { gateway: string; conversation?: string }) => {
// Dynamic import to avoid loading React/Ink for other commands
const { render } = await import('ink');
const React = await import('react');
const { TuiApp } = await import('./tui/app.js');
render(
React.createElement(TuiApp, {
gatewayUrl: opts.gateway,
conversationId: opts.conversation,
}),
);
});
program.parse();