From 7c42e97de23f811a0b22d81a596c321427499134 Mon Sep 17 00:00:00 2001 From: claude-code-best Date: Sat, 20 Jun 2026 10:21:37 +0800 Subject: [PATCH] =?UTF-8?q?chore:=20=E7=A7=BB=E9=99=A4=20self-hosted-runne?= =?UTF-8?q?r=20stub=20=E5=8F=8A=E5=85=B6=20cli.tsx=20fast-path?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 删除 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 --- src/entrypoints/cli.tsx | 10 ---------- src/self-hosted-runner/main.ts | 4 ---- 2 files changed, 14 deletions(-) delete mode 100644 src/self-hosted-runner/main.ts diff --git a/src/entrypoints/cli.tsx b/src/entrypoints/cli.tsx index efe7e5272..a6e7a58ad 100644 --- a/src/entrypoints/cli.tsx +++ b/src/entrypoints/cli.tsx @@ -323,16 +323,6 @@ async function main(): Promise { 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 const hasTmuxFlag = args.includes('--tmux') || args.includes('--tmux=classic'); if ( diff --git a/src/self-hosted-runner/main.ts b/src/self-hosted-runner/main.ts deleted file mode 100644 index acec32b91..000000000 --- a/src/self-hosted-runner/main.ts +++ /dev/null @@ -1,4 +0,0 @@ -// Auto-generated stub — replace with real implementation -export {} -export const selfHostedRunnerMain: (args: string[]) => Promise = () => - Promise.resolve()