chore: 移除 self-hosted-runner stub 及其 cli.tsx fast-path

- 删除 src/self-hosted-runner/main.ts(自动生成的 Promise.resolve() stub)
- 同步移除 src/entrypoints/cli.tsx 中 feature('SELF_HOSTED_RUNNER') 守卫的 fast-path 分支
- 该 flag 不在 build.ts DEFAULT_BUILD_FEATURES 也不在 dev 默认列表,所有默认配置下整段为构建期死代码

删除 stub 单独会留下未解析的动态 import,必须协同拆除。

Co-Authored-By: glm-5.2 <zai-org@claude-code-best.win>
This commit is contained in:
claude-code-best
2026-06-20 10:21:37 +08:00
parent 3c9a625621
commit b59461ae3f
2 changed files with 0 additions and 14 deletions

View File

@@ -323,16 +323,6 @@ async function main(): Promise<void> {
return; return;
} }
// Fast-path for `claude self-hosted-runner`: headless self-hosted-runner
// targeting the SelfHostedRunnerWorkerService API (register + poll; poll IS
// heartbeat). feature() must stay inline for build-time dead code elimination.
if (feature('SELF_HOSTED_RUNNER') && args[0] === 'self-hosted-runner') {
profileCheckpoint('cli_self_hosted_runner_path');
const { selfHostedRunnerMain } = await import('../self-hosted-runner/main.js');
await selfHostedRunnerMain(args.slice(1));
return;
}
// Fast-path for --worktree --tmux: exec into tmux before loading full CLI // Fast-path for --worktree --tmux: exec into tmux before loading full CLI
const hasTmuxFlag = args.includes('--tmux') || args.includes('--tmux=classic'); const hasTmuxFlag = args.includes('--tmux') || args.includes('--tmux=classic');
if ( if (

View File

@@ -1,4 +0,0 @@
// Auto-generated stub — replace with real implementation
export {}
export const selfHostedRunnerMain: (args: string[]) => Promise<void> = () =>
Promise.resolve()