refactor(cli): run local mode only (P1.1)
Team mode is not part of the community edition (ADR-0003), so the CLI no longer detects or switches to it. - Remove the mode detector, the --local and --team flags, the Clerk browser login (/login, /logout, /whoami) and /mode. - Remove the /admin command and its team-server REST client. - The welcome banner drops the Mode line. - The installed-REPL test starts plain `waggle` and checks that the team commands are gone.
This commit is contained in:
@@ -458,7 +458,7 @@ describe('@waggle/cli runtime UX', () => {
|
||||
|
||||
let stdout = '';
|
||||
let stderr = '';
|
||||
child = spawnInCwd(bin('npx'), ['waggle', '--local'], projectDir, home);
|
||||
child = spawnInCwd(bin('npx'), ['waggle'], projectDir, home);
|
||||
child.stdout.setEncoding('utf8');
|
||||
child.stderr.setEncoding('utf8');
|
||||
child.stdout.on('data', (chunk) => { stdout += chunk; });
|
||||
@@ -484,9 +484,12 @@ describe('@waggle/cli runtime UX', () => {
|
||||
await waitFor(() => expectedText.every((text) => stdout.includes(text)), 10_000);
|
||||
};
|
||||
|
||||
await writeCommand('/help', ['Available commands:', '/models', '/whoami']);
|
||||
await writeCommand('/mode', 'Current mode: local');
|
||||
await writeCommand('/whoami', ['User:', 'not logged in', 'Server:']);
|
||||
await writeCommand('/help', ['Available commands:', '/models', '/cost']);
|
||||
// The CLI runs local mode only: team login and admin commands are gone (ADR-0003).
|
||||
for (const teamCommand of ['login', 'logout', 'whoami', 'mode', 'admin']) {
|
||||
expect(stdout).not.toMatch(new RegExp(`/${teamCommand}\\b`));
|
||||
}
|
||||
await writeCommand('/admin', 'Unknown command: /admin');
|
||||
await writeCommand('/models', ['Available models:', 'No models configured']);
|
||||
await writeCommand('/cost', ['Tokens: 0 in / 0 out', 'Est. cost: $0.0000']);
|
||||
await writeCommand('/clear', 'Conversation cleared.');
|
||||
@@ -496,10 +499,8 @@ describe('@waggle/cli runtime UX', () => {
|
||||
|
||||
expect(child.exitCode).toBe(0);
|
||||
expect(stdout).toContain('Waggle');
|
||||
expect(stdout).toContain('Mode:');
|
||||
expect(stdout).toContain('local');
|
||||
expect(stdout).not.toContain('Mode:');
|
||||
expect(stdout).toContain('Available commands:');
|
||||
expect(stdout).toContain('Current mode: local');
|
||||
expect(stdout).toContain('No models configured');
|
||||
expect(stdout).toContain('Conversation cleared.');
|
||||
expect(stdout).toContain('Goodbye!');
|
||||
@@ -592,7 +593,7 @@ describe('@waggle/cli runtime UX', () => {
|
||||
let stderr = '';
|
||||
child = spawnInCwd(
|
||||
bin('npx'),
|
||||
['waggle', '--local'],
|
||||
['waggle'],
|
||||
projectDir,
|
||||
home,
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user