From 501276bdeafb813452c5747778dbfa8bde75e703 Mon Sep 17 00:00:00 2001 From: kumarabhirup Date: Tue, 3 Mar 2026 15:37:39 -0800 Subject: [PATCH] refactor(cli): remove dench-specific bootstrap code syncBundledDenchSkill is now handled by the generalized seedWorkspaceFromAssets call. --- src/cli/bootstrap-external.ts | 27 +-------------------------- 1 file changed, 1 insertion(+), 26 deletions(-) diff --git a/src/cli/bootstrap-external.ts b/src/cli/bootstrap-external.ts index 79c67e42c63..44e3baeeef7 100644 --- a/src/cli/bootstrap-external.ts +++ b/src/cli/bootstrap-external.ts @@ -1,5 +1,5 @@ import { spawn, type StdioOptions } from "node:child_process"; -import { cpSync, existsSync, mkdirSync, openSync, readFileSync, readdirSync } from "node:fs"; +import { existsSync, mkdirSync, openSync, readFileSync, readdirSync } from "node:fs"; import os from "node:os"; import path from "node:path"; import process from "node:process"; @@ -977,29 +977,6 @@ function resolveModelProvider(stateDir: string): string | undefined { return undefined; } -/** - * Sync bundled Dench skill into the active workspace. - */ -function syncBundledDenchSkill(workspaceDir: string): { - mode: "installed" | "updated"; - targetDir: string; -} { - const targetDir = path.join(workspaceDir, "skills", "dench"); - const targetSkillFile = path.join(targetDir, "SKILL.md"); - const mode: "installed" | "updated" = existsSync(targetSkillFile) ? "updated" : "installed"; - const sourceDir = path.join(resolveCliPackageRoot(), "skills", "dench"); - const sourceSkillFile = path.join(sourceDir, "SKILL.md"); - if (!existsSync(sourceSkillFile)) { - throw new Error( - `Bundled Dench skill not found at ${sourceDir}. Reinstall ironclaw and rerun bootstrap.`, - ); - } - mkdirSync(path.dirname(targetDir), { recursive: true }); - // Always replace with the bundled version so ironclaw updates refresh Dench automatically. - cpSync(sourceDir, targetDir, { recursive: true, force: true }); - return { mode, targetDir }; -} - /** * Check if the agent auth store has at least one key for the given provider. */ @@ -1366,7 +1343,6 @@ export async function bootstrapCommand( }); } - const denchInstall = syncBundledDenchSkill(workspaceDir); const workspaceSeed = seedWorkspaceFromAssets({ workspaceDir, packageRoot: resolveCliPackageRoot(), @@ -1450,7 +1426,6 @@ export async function bootstrapCommand( ); } - runtime.log(theme.muted(`Dench skill ${denchInstall.mode}: ${denchInstall.targetDir}`)); runtime.log(theme.muted(`Workspace seed: ${describeWorkspaceSeedResult(workspaceSeed)}`)); if (gatewayAutoFix?.attempted) { runtime.log(