feat(macp): add registerMacpCommand for mosaic macp CLI surface
Adds mosaic macp tasks list|submit|gate|events tail subcommands to @mosaicstack/macp, wires registerMacpCommand into the root mosaic CLI, and ships a smoke test asserting command structure without touching disk or starting an event emitter. Ref CU-05-08. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -16,14 +16,9 @@ vi.mock('./daemon.js', () => ({
|
||||
|
||||
vi.mock('./login.js', () => ({
|
||||
getGatewayUrl: vi.fn().mockReturnValue('http://localhost:14242'),
|
||||
}));
|
||||
|
||||
// Mock readline so tests don't block on stdin
|
||||
vi.mock('node:readline', () => ({
|
||||
createInterface: vi.fn().mockReturnValue({
|
||||
question: vi.fn((_q: string, cb: (a: string) => void) => cb('test-input')),
|
||||
close: vi.fn(),
|
||||
}),
|
||||
// promptLine/promptSecret are used by ensureSession; return fixed values so tests don't block on stdin
|
||||
promptLine: vi.fn().mockResolvedValue('test@example.com'),
|
||||
promptSecret: vi.fn().mockResolvedValue('test-password'),
|
||||
}));
|
||||
|
||||
const mockFetch = vi.fn();
|
||||
|
||||
Reference in New Issue
Block a user