Lines 181-221javascript
181 } // closes: if (!existsSync(ENV_PATH) || flags.force)
182 } // closes: Step 2 block
183 // ─── Step 3: 收全局 skill 污染(P0.5)——清理早前灌进 ~/.claude/skills 的 sps 全量软链 ──
184 // sps 不再做全局全量投影;skills 经 HQ + 项目级 gated 投影生效(见 pruneGlobalSkillLinks)。
186 const pruned = pruneGlobalSkillLinks(log);
188 log.ok(`Cleaned ${pruned} legacy global skill link(s) from ~/.claude/skills`);
190 log.info('No legacy global skill links to clean');
192 // ─── Step 4: Install claude-agent-acp adapter globally ──────────
194 const adapter = { name: 'claude-agent-acp', pkg: '@agentclientprotocol/claude-agent-acp' };
196 execSync(`which ${adapter.name}`, { stdio: 'ignore' });
197 log.ok(`${adapter.name} already installed`);
200 log.info(`Installing ${adapter.name}...`);
202 execSync(`npm install -g ${adapter.pkg}`, { stdio: ['ignore', 'pipe', 'pipe'], timeout: 120_000 });
203 log.ok(`Installed ${adapter.name}`);
HighRuntime Package Install
Package source invokes a package manager install command at runtime.
dist/commands/setup.jsView on unpkg · L201 206 const msg = err instanceof Error ? err.message : String(err);
207 log.warn(`Failed to install ${adapter.name}: ${msg}`);
208 log.info(` You can install manually: npm install -g ${adapter.pkg}`);
212 // ─── Summary ───────────────────────────────────────────────────
213 console.log('\n Setup complete! Next steps:\n');
214 console.log(' 1. Source the env file:');
215 console.log(` source ${ENV_PATH}`);
217 console.log(' 2. (Optional) Auto-load on shell startup:');
218 console.log(` echo 'source ${ENV_PATH}' >> ~/.bashrc`);
220 console.log(' 3. Initialize your first project:');
221 console.log(' sps project init <project-name>');