@supercollab/cli 0.4.8 → 0.4.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -1
- package/bin/supercollab.js +9 -4
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -168,7 +168,9 @@ to run the installer immediately.
|
|
|
168
168
|
The installer first runs the MCP smoke check, then calls Claude Code's own
|
|
169
169
|
`claude mcp add` with absolute Node and CLI paths plus explicit `HOME`, `PATH`,
|
|
170
170
|
and `SUPERCOLLAB_WORKDIR` values. This avoids Homebrew, nvm, shell startup, and
|
|
171
|
-
GUI path differences.
|
|
171
|
+
GUI path differences. It also removes older `supercollab` entries from Claude
|
|
172
|
+
Code's local, user, and project scopes before adding the new one, so stale
|
|
173
|
+
conflicting endpoints do not block startup.
|
|
172
174
|
|
|
173
175
|
Default server: `https://hyper.polynode.dev`.
|
|
174
176
|
|
package/bin/supercollab.js
CHANGED
|
@@ -8,7 +8,7 @@ import { fileURLToPath } from 'node:url';
|
|
|
8
8
|
import * as readlineCore from 'node:readline';
|
|
9
9
|
import { stdin as input, stdout as output } from 'node:process';
|
|
10
10
|
|
|
11
|
-
const VERSION = '0.4.
|
|
11
|
+
const VERSION = '0.4.9';
|
|
12
12
|
const CLI_ENTRY = fileURLToPath(import.meta.url);
|
|
13
13
|
const DEFAULT_SERVER = process.env.SUPERCOLLAB_URL || 'https://hyper.polynode.dev';
|
|
14
14
|
const DEFAULT_CONFIG = process.env.SUPERCOLLAB_CONFIG || path.join(os.homedir(), '.supercollab', 'config.json');
|
|
@@ -1868,7 +1868,8 @@ async function installClaudeCodeMcp(config, file, opts = {}) {
|
|
|
1868
1868
|
const plan = claudeCodeInstallPlan(file, opts);
|
|
1869
1869
|
const dryRun = Boolean(opts['dry-run'] || opts.dryRun);
|
|
1870
1870
|
const smoke = await runMcpSmoke({ ...opts, config: file, timeout: opts.timeout || 5000 });
|
|
1871
|
-
const
|
|
1871
|
+
const cleanupScopes = ['local', 'user', 'project'];
|
|
1872
|
+
const cleanupCommands = cleanupScopes.map((scope) => ['mcp', 'remove', 'supercollab', '-s', scope]);
|
|
1872
1873
|
|
|
1873
1874
|
if (dryRun) {
|
|
1874
1875
|
return {
|
|
@@ -1876,7 +1877,7 @@ async function installClaudeCodeMcp(config, file, opts = {}) {
|
|
|
1876
1877
|
dry_run: true,
|
|
1877
1878
|
client: 'claude-code',
|
|
1878
1879
|
smoke,
|
|
1879
|
-
|
|
1880
|
+
cleanup_commands: cleanupCommands.map((args) => shellCommand(plan.command, args)),
|
|
1880
1881
|
install_command: shellCommand(plan.command, plan.args),
|
|
1881
1882
|
scope: plan.scope,
|
|
1882
1883
|
cwd: plan.cwd,
|
|
@@ -1889,7 +1890,10 @@ async function installClaudeCodeMcp(config, file, opts = {}) {
|
|
|
1889
1890
|
throw new Error(`Claude Code CLI not found or not runnable as ${plan.command}. Install Claude Code first, or pass --claude /absolute/path/to/claude. ${probe.stderr || probe.error || ''}`.trim());
|
|
1890
1891
|
}
|
|
1891
1892
|
|
|
1892
|
-
|
|
1893
|
+
const cleanup = cleanupCommands.map((args) => ({
|
|
1894
|
+
scope: args.at(-1),
|
|
1895
|
+
...runProcess(plan.command, args, { cwd: plan.cwd }),
|
|
1896
|
+
}));
|
|
1893
1897
|
const add = runProcess(plan.command, plan.args, { cwd: plan.cwd });
|
|
1894
1898
|
if (!add.ok) {
|
|
1895
1899
|
throw new Error(`claude mcp add failed: ${add.stderr || add.stdout || add.error || `exit ${add.status}`}`);
|
|
@@ -1903,6 +1907,7 @@ async function installClaudeCodeMcp(config, file, opts = {}) {
|
|
|
1903
1907
|
cwd: plan.cwd,
|
|
1904
1908
|
config: path.resolve(file),
|
|
1905
1909
|
smoke,
|
|
1910
|
+
cleanup,
|
|
1906
1911
|
install_command: shellCommand(plan.command, plan.args),
|
|
1907
1912
|
claude_add: { stdout: add.stdout, stderr: add.stderr },
|
|
1908
1913
|
claude_list: { ok: list.ok, stdout: list.stdout, stderr: list.stderr },
|