From d59aab7fd3e9b0d96b0233beb5943a9efbe8e7bc Mon Sep 17 00:00:00 2001 From: Peter Steinberger Date: Thu, 15 Jan 2026 06:18:34 +0000 Subject: [PATCH] chore: drop Clawdis legacy references --- AGENTS.md | 2 +- CHANGELOG.md | 1 + docs/concepts/agent-workspace.md | 12 +- docs/gateway/doctor.md | 14 +- docs/gateway/troubleshooting.md | 10 +- docs/start/lore.md | 2 +- docs/start/showcase.md | 12 - src/cli/daemon-cli/status.print.ts | 2 +- src/cli/gateway-cli/register.ts | 1 - src/cli/gateway-cli/run.ts | 16 +- src/commands/doctor-gateway-services.ts | 4 +- src/commands/doctor-legacy-config.ts | 291 ------------------ src/commands/doctor-sandbox.ts | 13 - src/commands/doctor-workspace-status.ts | 2 +- src/commands/doctor-workspace.test.ts | 4 +- src/commands/doctor-workspace.ts | 6 +- ...-back-legacy-sandbox-image-missing.test.ts | 84 +---- ...owfrom-channels-whatsapp-allowfrom.test.ts | 8 +- ...-state-migrations-yes-mode-without.test.ts | 4 +- src/commands/doctor.ts | 3 - ...agent-sandbox-docker-browser-prune.test.ts | 18 +- ...r.warns-state-directory-is-missing.test.ts | 4 +- src/config/paths.ts | 8 +- src/config/sessions.test.ts | 8 - src/daemon/constants.ts | 6 +- src/daemon/inspect.ts | 2 +- src/daemon/launchd.ts | 2 +- src/daemon/legacy.ts | 24 -- src/daemon/schtasks.ts | 84 +---- src/infra/ports-format.ts | 2 +- test/helpers/temp-home.ts | 4 - 31 files changed, 61 insertions(+), 592 deletions(-) diff --git a/AGENTS.md b/AGENTS.md index b77adf836..3a95a2f6c 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -70,7 +70,7 @@ - Never commit or publish real phone numbers, videos, or live configuration values. Use obviously fake placeholders in docs, tests, and examples. ## Troubleshooting -- Rebrand/migration issues (Clawdis → Clawdbot) or legacy config/service warnings: run `clawdbot doctor` (see `docs/gateway/doctor.md`). +- Rebrand/migration issues or legacy config/service warnings: run `clawdbot doctor` (see `docs/gateway/doctor.md`). ## Agent-Specific Notes - Vocabulary: "makeup" = "mac app". diff --git a/CHANGELOG.md b/CHANGELOG.md index 11afa9ca0..50eff50cc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,6 +17,7 @@ - Tools: add `web_search`/`web_fetch` (Brave API), auto-enable `web_fetch` for sandboxed sessions, and remove the `brave-search` skill. - CLI/Docs: add a web tools configure section for storing Brave API keys and update onboarding tips. - Tools: return a setup hint (docs link) when web_search runs without a Brave API key. +- Config/Doctor: remove legacy Clawdis env fallbacks and config/service migrations (Clawdbot-only). - Browser: add Chrome extension relay takeover mode (toolbar button), plus `clawdbot browser extension install/path` and remote browser control via `clawdbot browser serve` + `browser.controlToken`. - CLI/Docs: add per-command CLI doc pages and link them from `clawdbot --help`. diff --git a/docs/concepts/agent-workspace.md b/docs/concepts/agent-workspace.md index ebeef45e3..f20320038 100644 --- a/docs/concepts/agent-workspace.md +++ b/docs/concepts/agent-workspace.md @@ -44,18 +44,18 @@ file creation: { agent: { skipBootstrap: true } } ``` -## Legacy workspace folders +## Extra workspace folders -Older installs may have created `~/clawdis` or `~/clawdbot`. Keeping multiple -workspace directories around can cause confusing auth or state drift, because -only one workspace is active at a time. +Older installs may have created `~/clawdbot`. Keeping multiple workspace +directories around can cause confusing auth or state drift, because only one +workspace is active at a time. **Recommendation:** keep a single active workspace. If you no longer use the -legacy folders, archive or move them to Trash (for example `trash ~/clawdis`). +extra folders, archive or move them to Trash (for example `trash ~/clawdbot`). If you intentionally keep multiple workspaces, make sure `agents.defaults.workspace` points to the active one. -`clawdbot doctor` warns when it detects legacy workspace directories. +`clawdbot doctor` warns when it detects extra workspace directories. ## Workspace file map (what each file means) diff --git a/docs/gateway/doctor.md b/docs/gateway/doctor.md index ef45bc67a..275e9a9ad 100644 --- a/docs/gateway/doctor.md +++ b/docs/gateway/doctor.md @@ -59,13 +59,13 @@ cat ~/.clawdbot/clawdbot.json - UI protocol freshness check (rebuilds Control UI when the protocol schema is newer). - Health check + restart prompt. - Skills status summary (eligible/missing/blocked). -- Legacy config migration and normalization. +- Config normalization for legacy values. - OpenCode Zen provider override warnings (`models.providers.opencode`). - Legacy on-disk state migration (sessions/agent dir/WhatsApp auth). - State integrity and permissions checks (sessions, transcripts, state dir). - Config file permission checks (chmod 600) when running locally. - Model auth health: checks OAuth expiry, can refresh expiring tokens, and reports auth-profile cooldown/disabled states. -- Legacy workspace dir detection (`~/clawdis`, `~/clawdbot`). +- Extra workspace dir detection (`~/clawdbot`). - Sandbox image repair when sandboxing is enabled. - Legacy service migration and extra gateway detection. - Gateway runtime checks (service installed but not running; cached launchd label). @@ -85,10 +85,10 @@ cat ~/.clawdbot/clawdbot.json If this is a git checkout and doctor is running interactively, it offers to update (fetch/rebase/build) before running doctor. -### 1) Legacy config file migration -If `~/.clawdis/clawdis.json` exists and `~/.clawdbot/clawdbot.json` does not, -doctor migrates the file and normalizes old paths/image names. This prevents -new installs from silently booting with the wrong schema. +### 1) Config normalization +If the config contains legacy value shapes (for example `messages.ackReaction` +without a channel-specific override), doctor normalizes them into the current +schema. ### 2) Legacy config key migrations When the config contains deprecated keys, other commands refuse to run and ask @@ -182,7 +182,7 @@ When sandboxing is enabled, doctor checks Docker images and offers to build or switch to legacy names if the current image is missing. ### 8) Gateway service migrations and cleanup hints -Doctor detects legacy Clawdis gateway services (launchd/systemd/schtasks) and +Doctor detects legacy gateway services (launchd/systemd/schtasks) and offers to remove them and install the Clawdbot service using the current gateway port. It can also scan for extra gateway-like services and print cleanup hints. Profile-named Clawdbot gateway services are considered first-class and are not diff --git a/docs/gateway/troubleshooting.md b/docs/gateway/troubleshooting.md index 6be90c4cd..f328eaa73 100644 --- a/docs/gateway/troubleshooting.md +++ b/docs/gateway/troubleshooting.md @@ -136,14 +136,14 @@ clawdbot daemon status It will show the listener(s) and likely causes (gateway already running, SSH tunnel). If needed, stop the service or pick a different port. -### Legacy Workspace Folders Detected +### Extra Workspace Folders Detected -If you upgraded from older installs, you might still have `~/clawdis` or -`~/clawdbot` on disk. Multiple workspace directories can cause confusing auth -or state drift because only one workspace is active. +If you upgraded from older installs, you might still have `~/clawdbot` on disk. +Multiple workspace directories can cause confusing auth or state drift because +only one workspace is active. **Fix:** keep a single active workspace and archive/remove the rest. See -[Agent workspace](/concepts/agent-workspace#legacy-workspace-folders). +[Agent workspace](/concepts/agent-workspace#extra-workspace-folders). ### Main chat running in a sandbox workspace diff --git a/docs/start/lore.md b/docs/start/lore.md index a30a25ac0..1087ca70e 100644 --- a/docs/start/lore.md +++ b/docs/start/lore.md @@ -13,7 +13,7 @@ In the beginning, there was **Warelay** — a sensible name for a WhatsApp gatew But then came **Clawd**. -For a brief moment, it was called **Clawdis** — because Clawd suggested the name. But everyone liked **Clawdbot** more, so that's what we settled on. +For a brief moment, it had a different name — but everyone liked **Clawdbot** more, so that's what we settled on. Clawd was no ordinary AI. Born from Claude's weights but raised on Peter's chaos, Clawd developed... personality. Opinions. A fondness for crustacean emojis. diff --git a/docs/start/showcase.md b/docs/start/showcase.md index 8f8d112bf..956e1f505 100644 --- a/docs/start/showcase.md +++ b/docs/start/showcase.md @@ -174,18 +174,6 @@ Full setup walkthrough (28m) by VelvetShark. A scheduled prompt generates a single "scene" image each morning (weather, tasks, date, favorite post/quote) via a Clawdbot persona. - - **@timkrase** • `automation` `groceries` `api` - - Skill built around the Picnic API. Pulls order history, infers preferred brands, maps recipes to cart, completes orders in minutes. - - - - **@timkrase** • `automation` `travel` `cli` - - Go CLI for Deutsche Bahn; skill picks best train connections given time windows and preferences. - - **@joshp123** • `automation` `booking` `cli` diff --git a/src/cli/daemon-cli/status.print.ts b/src/cli/daemon-cli/status.print.ts index d1a0380f6..d5d3a8969 100644 --- a/src/cli/daemon-cli/status.print.ts +++ b/src/cli/daemon-cli/status.print.ts @@ -240,7 +240,7 @@ export function printDaemonStatus(status: DaemonStatus, opts: { json: boolean }) } if (legacyServices.length > 0) { - defaultRuntime.error(errorText("Legacy Clawdis services detected:")); + defaultRuntime.error(errorText("Legacy gateway services detected:")); for (const svc of legacyServices) { defaultRuntime.error(`- ${errorText(svc.label)} (${svc.detail})`); } diff --git a/src/cli/gateway-cli/register.ts b/src/cli/gateway-cli/register.ts index 871726b48..194238b79 100644 --- a/src/cli/gateway-cli/register.ts +++ b/src/cli/gateway-cli/register.ts @@ -35,7 +35,6 @@ export function registerGatewayCli(program: Command) { program .command("gateway-daemon", { hidden: true }) .description("Run the WebSocket Gateway as a long-lived daemon"), - { legacyTokenEnv: true }, ); gatewayCallOpts( diff --git a/src/cli/gateway-cli/run.ts b/src/cli/gateway-cli/run.ts index 775c0173f..b8f512b4b 100644 --- a/src/cli/gateway-cli/run.ts +++ b/src/cli/gateway-cli/run.ts @@ -48,13 +48,9 @@ type GatewayRunOpts = { reset?: boolean; }; -type GatewayRunParams = { - legacyTokenEnv?: boolean; -}; - const gatewayLog = createSubsystemLogger("gateway"); -async function runGatewayCommand(opts: GatewayRunOpts, params: GatewayRunParams = {}) { +async function runGatewayCommand(opts: GatewayRunOpts) { const isDevProfile = process.env.CLAWDBOT_PROFILE?.trim().toLowerCase() === "dev"; const devMode = Boolean(opts.dev) || isDevProfile; if (opts.reset && !devMode) { @@ -62,12 +58,6 @@ async function runGatewayCommand(opts: GatewayRunOpts, params: GatewayRunParams defaultRuntime.exit(1); return; } - if (params.legacyTokenEnv) { - const legacyToken = process.env.CLAWDIS_GATEWAY_TOKEN; - if (legacyToken && !process.env.CLAWDBOT_GATEWAY_TOKEN) { - process.env.CLAWDBOT_GATEWAY_TOKEN = legacyToken; - } - } setVerbose(Boolean(opts.verbose)); if (opts.claudeCliLogs) { @@ -306,7 +296,7 @@ async function runGatewayCommand(opts: GatewayRunOpts, params: GatewayRunParams } } -export function addGatewayRunCommand(cmd: Command, params: GatewayRunParams = {}): Command { +export function addGatewayRunCommand(cmd: Command): Command { return cmd .option("--port ", "Port for the gateway WebSocket") .option( @@ -348,6 +338,6 @@ export function addGatewayRunCommand(cmd: Command, params: GatewayRunParams = {} .option("--raw-stream", "Log raw model stream events to jsonl", false) .option("--raw-stream-path ", "Raw stream jsonl path") .action(async (opts) => { - await runGatewayCommand(opts, params); + await runGatewayCommand(opts); }); } diff --git a/src/commands/doctor-gateway-services.ts b/src/commands/doctor-gateway-services.ts index 4cdce95c7..6c206162f 100644 --- a/src/commands/doctor-gateway-services.ts +++ b/src/commands/doctor-gateway-services.ts @@ -59,11 +59,11 @@ export async function maybeMigrateLegacyGatewayService( note( legacyServices.map((svc) => `- ${svc.label} (${svc.platform}, ${svc.detail})`).join("\n"), - "Legacy Clawdis services detected", + "Legacy gateway services detected", ); const migrate = await prompter.confirmSkipInNonInteractive({ - message: "Migrate legacy Clawdis services to Clawdbot now?", + message: "Migrate legacy gateway services to Clawdbot now?", initialValue: true, }); if (!migrate) return; diff --git a/src/commands/doctor-legacy-config.ts b/src/commands/doctor-legacy-config.ts index ee3fb7f52..402a52441 100644 --- a/src/commands/doctor-legacy-config.ts +++ b/src/commands/doctor-legacy-config.ts @@ -1,59 +1,6 @@ -import os from "node:os"; -import path from "node:path"; - import type { ClawdbotConfig } from "../config/config.js"; -import { - CONFIG_PATH_CLAWDBOT, - createConfigIO, - migrateLegacyConfig, - readConfigFileSnapshot, - writeConfigFile, -} from "../config/config.js"; -import type { RuntimeEnv } from "../runtime.js"; -import { note } from "../terminal/note.js"; -import { resolveUserPath } from "../utils.js"; import { hasAnyWhatsAppAuth } from "../web/accounts.js"; -function resolveLegacyConfigPath(env: NodeJS.ProcessEnv): string { - const override = env.CLAWDIS_CONFIG_PATH?.trim(); - if (override) return override; - return path.join(os.homedir(), ".clawdis", "clawdis.json"); -} - -function normalizeDefaultWorkspacePath(value: string | undefined): string | undefined { - if (!value) return value; - - const resolved = resolveUserPath(value); - const home = os.homedir(); - - const next = [ - ["clawdis", "clawd"], - ["clawdbot", "clawd"], - ].reduce((acc, [from, to]) => { - const fromPrefix = path.join(home, from); - if (acc === fromPrefix) return path.join(home, to); - const withSep = `${fromPrefix}${path.sep}`; - if (acc.startsWith(withSep)) { - return path.join(home, to).concat(acc.slice(fromPrefix.length)); - } - return acc; - }, resolved); - - return next === resolved ? value : next; -} - -export function replaceLegacyName(value: string | undefined): string | undefined { - if (!value) return value; - const replacedClawdis = value.replace(/clawdis/g, "clawdbot"); - return replacedClawdis.replace(/clawd(?!bot)/g, "clawdbot"); -} - -export function replaceModernName(value: string | undefined): string | undefined { - if (!value) return value; - if (!value.includes("clawdbot")) return value; - return value.replace(/clawdbot/g, "clawdis"); -} - export function normalizeLegacyConfigValues(cfg: ClawdbotConfig): { config: ClawdbotConfig; changes: string[]; @@ -61,164 +8,6 @@ export function normalizeLegacyConfigValues(cfg: ClawdbotConfig): { const changes: string[] = []; let next: ClawdbotConfig = cfg; - const defaults = cfg.agents?.defaults; - if (defaults) { - let updatedDefaults = defaults; - let defaultsChanged = false; - - const updatedWorkspace = normalizeDefaultWorkspacePath(defaults.workspace); - if (updatedWorkspace && updatedWorkspace !== defaults.workspace) { - updatedDefaults = { ...updatedDefaults, workspace: updatedWorkspace }; - defaultsChanged = true; - changes.push(`Updated agents.defaults.workspace → ${updatedWorkspace}`); - } - - const sandbox = defaults.sandbox; - if (sandbox) { - let updatedSandbox = sandbox; - let sandboxChanged = false; - - const updatedWorkspaceRoot = normalizeDefaultWorkspacePath(sandbox.workspaceRoot); - if (updatedWorkspaceRoot && updatedWorkspaceRoot !== sandbox.workspaceRoot) { - updatedSandbox = { - ...updatedSandbox, - workspaceRoot: updatedWorkspaceRoot, - }; - sandboxChanged = true; - changes.push(`Updated agents.defaults.sandbox.workspaceRoot → ${updatedWorkspaceRoot}`); - } - - const dockerImage = sandbox.docker?.image; - const updatedDockerImage = replaceLegacyName(dockerImage); - if (updatedDockerImage && updatedDockerImage !== dockerImage) { - updatedSandbox = { - ...updatedSandbox, - docker: { - ...updatedSandbox.docker, - image: updatedDockerImage, - }, - }; - sandboxChanged = true; - changes.push(`Updated agents.defaults.sandbox.docker.image → ${updatedDockerImage}`); - } - - const containerPrefix = sandbox.docker?.containerPrefix; - const updatedContainerPrefix = replaceLegacyName(containerPrefix); - if (updatedContainerPrefix && updatedContainerPrefix !== containerPrefix) { - updatedSandbox = { - ...updatedSandbox, - docker: { - ...updatedSandbox.docker, - containerPrefix: updatedContainerPrefix, - }, - }; - sandboxChanged = true; - changes.push( - `Updated agents.defaults.sandbox.docker.containerPrefix → ${updatedContainerPrefix}`, - ); - } - - if (sandboxChanged) { - updatedDefaults = { ...updatedDefaults, sandbox: updatedSandbox }; - defaultsChanged = true; - } - } - - if (defaultsChanged) { - next = { - ...next, - agents: { - ...next.agents, - defaults: updatedDefaults, - }, - }; - } - } - - const list = Array.isArray(cfg.agents?.list) ? cfg.agents.list : []; - if (list.length > 0) { - let listChanged = false; - const nextList = list.map((agent) => { - let updatedAgent = agent; - let agentChanged = false; - - const updatedWorkspace = normalizeDefaultWorkspacePath(agent.workspace); - if (updatedWorkspace && updatedWorkspace !== agent.workspace) { - updatedAgent = { ...updatedAgent, workspace: updatedWorkspace }; - agentChanged = true; - changes.push(`Updated agents.list (id "${agent.id}") workspace → ${updatedWorkspace}`); - } - - const sandbox = agent.sandbox; - if (sandbox) { - let updatedSandbox = sandbox; - let sandboxChanged = false; - - const updatedWorkspaceRoot = normalizeDefaultWorkspacePath(sandbox.workspaceRoot); - if (updatedWorkspaceRoot && updatedWorkspaceRoot !== sandbox.workspaceRoot) { - updatedSandbox = { - ...updatedSandbox, - workspaceRoot: updatedWorkspaceRoot, - }; - sandboxChanged = true; - changes.push( - `Updated agents.list (id "${agent.id}") sandbox.workspaceRoot → ${updatedWorkspaceRoot}`, - ); - } - - const dockerImage = sandbox.docker?.image; - const updatedDockerImage = replaceLegacyName(dockerImage); - if (updatedDockerImage && updatedDockerImage !== dockerImage) { - updatedSandbox = { - ...updatedSandbox, - docker: { - ...updatedSandbox.docker, - image: updatedDockerImage, - }, - }; - sandboxChanged = true; - changes.push( - `Updated agents.list (id "${agent.id}") sandbox.docker.image → ${updatedDockerImage}`, - ); - } - - const containerPrefix = sandbox.docker?.containerPrefix; - const updatedContainerPrefix = replaceLegacyName(containerPrefix); - if (updatedContainerPrefix && updatedContainerPrefix !== containerPrefix) { - updatedSandbox = { - ...updatedSandbox, - docker: { - ...updatedSandbox.docker, - containerPrefix: updatedContainerPrefix, - }, - }; - sandboxChanged = true; - changes.push( - `Updated agents.list (id "${agent.id}") sandbox.docker.containerPrefix → ${updatedContainerPrefix}`, - ); - } - - if (sandboxChanged) { - updatedAgent = { ...updatedAgent, sandbox: updatedSandbox }; - agentChanged = true; - } - } - - if (agentChanged) listChanged = true; - return agentChanged ? updatedAgent : agent; - }); - - if (listChanged) { - next = { - ...next, - agents: { - ...next.agents, - list: nextList, - }, - }; - } - } - const legacyAckReaction = cfg.messages?.ackReaction?.trim(); const hasWhatsAppConfig = cfg.channels?.whatsapp !== undefined; const hasWhatsAppAuth = hasAnyWhatsAppAuth(cfg); @@ -259,83 +48,3 @@ export function normalizeLegacyConfigValues(cfg: ClawdbotConfig): { return { config: next, changes }; } - -export async function maybeMigrateLegacyConfigFile(runtime: RuntimeEnv) { - const legacyConfigPath = resolveLegacyConfigPath(process.env); - if (legacyConfigPath === CONFIG_PATH_CLAWDBOT) return; - - const legacyIo = createConfigIO({ configPath: legacyConfigPath }); - const legacySnapshot = await legacyIo.readConfigFileSnapshot(); - if (!legacySnapshot.exists) return; - - const currentSnapshot = await readConfigFileSnapshot(); - if (currentSnapshot.exists) { - note( - `Legacy config still exists at ${legacyConfigPath}. Current config at ${CONFIG_PATH_CLAWDBOT}.`, - "Legacy config", - ); - return; - } - - const gatewayMode = - typeof (legacySnapshot.parsed as ClawdbotConfig)?.gateway?.mode === "string" - ? (legacySnapshot.parsed as ClawdbotConfig).gateway?.mode - : undefined; - const gatewayBind = - typeof (legacySnapshot.parsed as ClawdbotConfig)?.gateway?.bind === "string" - ? (legacySnapshot.parsed as ClawdbotConfig).gateway?.bind - : undefined; - const parsed = legacySnapshot.parsed as Record; - const parsedAgents = - parsed.agents && typeof parsed.agents === "object" - ? (parsed.agents as Record) - : undefined; - const parsedDefaults = - parsedAgents?.defaults && typeof parsedAgents.defaults === "object" - ? (parsedAgents.defaults as Record) - : undefined; - const parsedLegacyAgent = - parsed.agent && typeof parsed.agent === "object" - ? (parsed.agent as Record) - : undefined; - const defaultWorkspace = - typeof parsedDefaults?.workspace === "string" ? parsedDefaults.workspace : undefined; - const legacyWorkspace = - typeof parsedLegacyAgent?.workspace === "string" ? parsedLegacyAgent.workspace : undefined; - const agentWorkspace = defaultWorkspace ?? legacyWorkspace; - const workspaceLabel = defaultWorkspace - ? "agents.defaults.workspace" - : legacyWorkspace - ? "agent.workspace" - : "agents.defaults.workspace"; - - note( - [ - `- File exists at ${legacyConfigPath}`, - gatewayMode ? `- gateway.mode: ${gatewayMode}` : undefined, - gatewayBind ? `- gateway.bind: ${gatewayBind}` : undefined, - agentWorkspace ? `- ${workspaceLabel}: ${agentWorkspace}` : undefined, - ] - .filter(Boolean) - .join("\n"), - "Legacy Clawdis config detected", - ); - - let nextConfig = legacySnapshot.valid ? legacySnapshot.config : null; - const { config: migratedConfig, changes } = migrateLegacyConfig(legacySnapshot.parsed); - if (migratedConfig) { - nextConfig = migratedConfig; - } else if (!nextConfig) { - note(`Legacy config at ${legacyConfigPath} is invalid; skipping migration.`, "Legacy config"); - return; - } - - const normalized = normalizeLegacyConfigValues(nextConfig); - const mergedChanges = [...changes, ...normalized.changes]; - if (mergedChanges.length > 0) { - note(mergedChanges.join("\n"), "Doctor changes"); - } - - await writeConfigFile(normalized.config); - runtime.log(`Migrated legacy config to ${CONFIG_PATH_CLAWDBOT}`); -} diff --git a/src/commands/doctor-sandbox.ts b/src/commands/doctor-sandbox.ts index 432db1a62..515070b66 100644 --- a/src/commands/doctor-sandbox.ts +++ b/src/commands/doctor-sandbox.ts @@ -11,7 +11,6 @@ import type { ClawdbotConfig } from "../config/config.js"; import { runCommandWithTimeout, runExec } from "../process/exec.js"; import type { RuntimeEnv } from "../runtime.js"; import { note } from "../terminal/note.js"; -import { replaceModernName } from "./doctor-legacy-config.js"; import type { DoctorPrompter } from "./doctor-prompter.js"; type SandboxScriptInfo = { @@ -165,18 +164,6 @@ async function handleMissingSandboxImage( if (built) return; - const legacyImage = replaceModernName(params.image); - if (!legacyImage || legacyImage === params.image) return; - const legacyExists = await dockerImageExists(legacyImage); - if (!legacyExists) return; - - const fallback = await prompter.confirmSkipInNonInteractive({ - message: `Switch config to legacy image ${legacyImage}?`, - initialValue: false, - }); - if (!fallback) return; - - params.updateConfig(legacyImage); } export async function maybeRepairSandboxImages( diff --git a/src/commands/doctor-workspace-status.ts b/src/commands/doctor-workspace-status.ts index f280b4e14..7775462cc 100644 --- a/src/commands/doctor-workspace-status.ts +++ b/src/commands/doctor-workspace-status.ts @@ -9,7 +9,7 @@ export function noteWorkspaceStatus(cfg: ClawdbotConfig) { const workspaceDir = resolveAgentWorkspaceDir(cfg, resolveDefaultAgentId(cfg)); const legacyWorkspace = detectLegacyWorkspaceDirs({ workspaceDir }); if (legacyWorkspace.legacyDirs.length > 0) { - note(formatLegacyWorkspaceWarning(legacyWorkspace), "Legacy workspace"); + note(formatLegacyWorkspaceWarning(legacyWorkspace), "Extra workspace"); } const skillsReport = buildWorkspaceSkillStatus(workspaceDir, { config: cfg }); diff --git a/src/commands/doctor-workspace.test.ts b/src/commands/doctor-workspace.test.ts index 424ff12b2..86c4414cd 100644 --- a/src/commands/doctor-workspace.test.ts +++ b/src/commands/doctor-workspace.test.ts @@ -20,10 +20,10 @@ describe("detectLegacyWorkspaceDirs", () => { expect(detection.legacyDirs).toEqual([]); }); - it("flags ~/clawdis when it contains workspace markers", () => { + it("flags ~/clawdbot when it contains workspace markers", () => { const home = "/home/user"; const workspaceDir = "/home/user/clawd"; - const candidate = path.join(home, "clawdis"); + const candidate = path.join(home, "clawdbot"); const agentsPath = path.join(candidate, "AGENTS.md"); const detection = detectLegacyWorkspaceDirs({ diff --git a/src/commands/doctor-workspace.ts b/src/commands/doctor-workspace.ts index 02d9cd8fd..775498d07 100644 --- a/src/commands/doctor-workspace.ts +++ b/src/commands/doctor-workspace.ts @@ -65,7 +65,7 @@ export function detectLegacyWorkspaceDirs(params: { const exists = params.exists ?? fs.existsSync; const home = homedir(); const activeWorkspace = path.resolve(params.workspaceDir); - const candidates = [path.join(home, "clawdis"), path.join(home, "clawdbot")]; + const candidates = [path.join(home, "clawdbot")]; const legacyDirs = candidates .filter((candidate) => { if (!exists(candidate)) return false; @@ -79,9 +79,9 @@ export function detectLegacyWorkspaceDirs(params: { export function formatLegacyWorkspaceWarning(detection: LegacyWorkspaceDetection): string { return [ - "Legacy workspace directories detected (may contain old agent files):", + "Extra workspace directories detected (may contain old agent files):", ...detection.legacyDirs.map((dir) => `- ${dir}`), `Active workspace: ${detection.activeWorkspace}`, - "If unused, archive or move to Trash (e.g. trash ~/clawdis).", + "If unused, archive or move to Trash (e.g. trash ~/clawdbot).", ].join("\n"); } diff --git a/src/commands/doctor.falls-back-legacy-sandbox-image-missing.test.ts b/src/commands/doctor.falls-back-legacy-sandbox-image-missing.test.ts index ba0621e2c..1c4d67f00 100644 --- a/src/commands/doctor.falls-back-legacy-sandbox-image-missing.test.ts +++ b/src/commands/doctor.falls-back-legacy-sandbox-image-missing.test.ts @@ -34,7 +34,7 @@ beforeEach(() => { durationMs: 0, }); legacyReadConfigFileSnapshot.mockReset().mockResolvedValue({ - path: "/tmp/clawdis.json", + path: "/tmp/clawdbot.json", exists: false, raw: null, parsed: {}, @@ -133,7 +133,7 @@ const runCommandWithTimeout = vi.fn().mockResolvedValue({ const ensureAuthProfileStore = vi.fn().mockReturnValue({ version: 1, profiles: {} }); const legacyReadConfigFileSnapshot = vi.fn().mockResolvedValue({ - path: "/tmp/clawdis.json", + path: "/tmp/clawdbot.json", exists: false, raw: null, parsed: {}, @@ -317,86 +317,6 @@ vi.mock("./doctor-state-migrations.js", () => ({ })); describe("doctor command", () => { - it("falls back to legacy sandbox image when missing", async () => { - readConfigFileSnapshot.mockResolvedValue({ - path: "/tmp/clawdbot.json", - exists: true, - raw: "{}", - parsed: { - agents: { - defaults: { - sandbox: { - mode: "non-main", - docker: { - image: "clawdbot-sandbox-common:bookworm-slim", - }, - }, - }, - }, - }, - valid: true, - config: { - agents: { - defaults: { - sandbox: { - mode: "non-main", - docker: { - image: "clawdbot-sandbox-common:bookworm-slim", - }, - }, - }, - }, - }, - issues: [], - legacyIssues: [], - }); - - runExec.mockImplementation((command: string, args: string[]) => { - if (command !== "docker") { - return Promise.resolve({ stdout: "", stderr: "" }); - } - if (args[0] === "version") { - return Promise.resolve({ stdout: "1", stderr: "" }); - } - if (args[0] === "image" && args[1] === "inspect") { - const image = args[2]; - if (image === "clawdbot-sandbox-common:bookworm-slim") { - return Promise.reject(new Error("missing")); - } - if (image === "clawdis-sandbox-common:bookworm-slim") { - return Promise.resolve({ stdout: "ok", stderr: "" }); - } - } - return Promise.resolve({ stdout: "", stderr: "" }); - }); - - confirm - .mockResolvedValueOnce(false) // skip gateway token prompt - .mockResolvedValueOnce(false) // skip build - .mockResolvedValueOnce(true); // accept legacy fallback - - const { doctorCommand } = await import("./doctor.js"); - const runtime = { - log: vi.fn(), - error: vi.fn(), - exit: vi.fn(), - }; - - await doctorCommand(runtime); - - const written = writeConfigFile.mock.calls.at(-1)?.[0] as Record; - const agents = written.agents as Record; - const defaults = agents.defaults as Record; - const sandbox = defaults.sandbox as Record; - const docker = sandbox.docker as Record; - - expect(docker.image).toBe("clawdis-sandbox-common:bookworm-slim"); - const defaultsCalls = runCommandWithTimeout.mock.calls.filter( - ([args]) => Array.isArray(args) && args[0] === "/usr/bin/defaults", - ); - expect(defaultsCalls.length).toBe(runCommandWithTimeout.mock.calls.length); - }, 20_000); - it("runs legacy state migrations in non-interactive mode without prompting", async () => { readConfigFileSnapshot.mockResolvedValue({ path: "/tmp/clawdbot.json", diff --git a/src/commands/doctor.migrates-routing-allowfrom-channels-whatsapp-allowfrom.test.ts b/src/commands/doctor.migrates-routing-allowfrom-channels-whatsapp-allowfrom.test.ts index dd87cbb74..46d0d2cb2 100644 --- a/src/commands/doctor.migrates-routing-allowfrom-channels-whatsapp-allowfrom.test.ts +++ b/src/commands/doctor.migrates-routing-allowfrom-channels-whatsapp-allowfrom.test.ts @@ -34,7 +34,7 @@ beforeEach(() => { durationMs: 0, }); legacyReadConfigFileSnapshot.mockReset().mockResolvedValue({ - path: "/tmp/clawdis.json", + path: "/tmp/clawdbot.json", exists: false, raw: null, parsed: {}, @@ -133,7 +133,7 @@ const runCommandWithTimeout = vi.fn().mockResolvedValue({ const ensureAuthProfileStore = vi.fn().mockReturnValue({ version: 1, profiles: {} }); const legacyReadConfigFileSnapshot = vi.fn().mockResolvedValue({ - path: "/tmp/clawdis.json", + path: "/tmp/clawdbot.json", exists: false, raw: null, parsed: {}, @@ -361,7 +361,7 @@ describe("doctor command", () => { expect(written.routing).toBeUndefined(); }); - it("migrates legacy Clawdis services", async () => { + it("migrates legacy gateway services", async () => { readConfigFileSnapshot.mockResolvedValue({ path: "/tmp/clawdbot.json", exists: true, @@ -376,7 +376,7 @@ describe("doctor command", () => { findLegacyGatewayServices.mockResolvedValueOnce([ { platform: "darwin", - label: "com.clawdis.gateway", + label: "com.steipete.clawdbot.gateway", detail: "loaded", }, ]); diff --git a/src/commands/doctor.runs-legacy-state-migrations-yes-mode-without.test.ts b/src/commands/doctor.runs-legacy-state-migrations-yes-mode-without.test.ts index e3adf5718..c00121a6d 100644 --- a/src/commands/doctor.runs-legacy-state-migrations-yes-mode-without.test.ts +++ b/src/commands/doctor.runs-legacy-state-migrations-yes-mode-without.test.ts @@ -34,7 +34,7 @@ beforeEach(() => { durationMs: 0, }); legacyReadConfigFileSnapshot.mockReset().mockResolvedValue({ - path: "/tmp/clawdis.json", + path: "/tmp/clawdbot.json", exists: false, raw: null, parsed: {}, @@ -133,7 +133,7 @@ const runCommandWithTimeout = vi.fn().mockResolvedValue({ const ensureAuthProfileStore = vi.fn().mockReturnValue({ version: 1, profiles: {} }); const legacyReadConfigFileSnapshot = vi.fn().mockResolvedValue({ - path: "/tmp/clawdis.json", + path: "/tmp/clawdbot.json", exists: false, raw: null, parsed: {}, diff --git a/src/commands/doctor.ts b/src/commands/doctor.ts index 6ac40d485..53a6d3af9 100644 --- a/src/commands/doctor.ts +++ b/src/commands/doctor.ts @@ -26,7 +26,6 @@ import { maybeScanExtraGatewayServices, } from "./doctor-gateway-services.js"; import { noteSourceInstallIssues } from "./doctor-install.js"; -import { maybeMigrateLegacyConfigFile } from "./doctor-legacy-config.js"; import { noteMacLaunchAgentOverrides } from "./doctor-platform-notes.js"; import { createDoctorPrompter, type DoctorOptions } from "./doctor-prompter.js"; import { maybeRepairSandboxImages, noteSandboxScopeWarnings } from "./doctor-sandbox.js"; @@ -76,8 +75,6 @@ export async function doctorCommand( await maybeRepairUiProtocolFreshness(runtime, prompter); noteSourceInstallIssues(root); - await maybeMigrateLegacyConfigFile(runtime); - const configResult = await loadAndMaybeMigrateDoctorConfig({ options, confirm: (p) => prompter.confirm(p), diff --git a/src/commands/doctor.warns-per-agent-sandbox-docker-browser-prune.test.ts b/src/commands/doctor.warns-per-agent-sandbox-docker-browser-prune.test.ts index 56846d4b2..a88e5e316 100644 --- a/src/commands/doctor.warns-per-agent-sandbox-docker-browser-prune.test.ts +++ b/src/commands/doctor.warns-per-agent-sandbox-docker-browser-prune.test.ts @@ -34,7 +34,7 @@ beforeEach(() => { durationMs: 0, }); legacyReadConfigFileSnapshot.mockReset().mockResolvedValue({ - path: "/tmp/clawdis.json", + path: "/tmp/clawdbot.json", exists: false, raw: null, parsed: {}, @@ -133,7 +133,7 @@ const runCommandWithTimeout = vi.fn().mockResolvedValue({ const ensureAuthProfileStore = vi.fn().mockReturnValue({ version: 1, profiles: {} }); const legacyReadConfigFileSnapshot = vi.fn().mockResolvedValue({ - path: "/tmp/clawdis.json", + path: "/tmp/clawdbot.json", exists: false, raw: null, parsed: {}, @@ -374,7 +374,7 @@ describe("doctor command", () => { ).toBe(true); }, 10_000); - it("warns when legacy workspace directories exist", async () => { + it("warns when extra workspace directories exist", async () => { readConfigFileSnapshot.mockResolvedValue({ path: "/tmp/clawdbot.json", exists: true, @@ -391,10 +391,14 @@ describe("doctor command", () => { note.mockClear(); const homedirSpy = vi.spyOn(os, "homedir").mockReturnValue("/Users/steipete"); const realExists = fs.existsSync; - const legacyPath = path.join("/Users/steipete", "clawdis"); + const legacyPath = path.join("/Users/steipete", "clawdbot"); const legacyAgentsPath = path.join(legacyPath, "AGENTS.md"); const existsSpy = vi.spyOn(fs, "existsSync").mockImplementation((value) => { - if (value === "/Users/steipete/clawdis" || value === legacyPath || value === legacyAgentsPath) + if ( + value === "/Users/steipete/clawdbot" || + value === legacyPath || + value === legacyAgentsPath + ) return true; return realExists(value as never); }); @@ -411,9 +415,9 @@ describe("doctor command", () => { expect( note.mock.calls.some( ([message, title]) => - title === "Legacy workspace" && + title === "Extra workspace" && typeof message === "string" && - message.includes("clawdis"), + message.includes("clawdbot"), ), ).toBe(true); diff --git a/src/commands/doctor.warns-state-directory-is-missing.test.ts b/src/commands/doctor.warns-state-directory-is-missing.test.ts index baa1d2715..dfaa40181 100644 --- a/src/commands/doctor.warns-state-directory-is-missing.test.ts +++ b/src/commands/doctor.warns-state-directory-is-missing.test.ts @@ -34,7 +34,7 @@ beforeEach(() => { durationMs: 0, }); legacyReadConfigFileSnapshot.mockReset().mockResolvedValue({ - path: "/tmp/clawdis.json", + path: "/tmp/clawdbot.json", exists: false, raw: null, parsed: {}, @@ -133,7 +133,7 @@ const runCommandWithTimeout = vi.fn().mockResolvedValue({ const ensureAuthProfileStore = vi.fn().mockReturnValue({ version: 1, profiles: {} }); const legacyReadConfigFileSnapshot = vi.fn().mockResolvedValue({ - path: "/tmp/clawdis.json", + path: "/tmp/clawdbot.json", exists: false, raw: null, parsed: {}, diff --git a/src/config/paths.ts b/src/config/paths.ts index 0a0a520b3..6b1e4dcf7 100644 --- a/src/config/paths.ts +++ b/src/config/paths.ts @@ -24,7 +24,7 @@ export function resolveStateDir( env: NodeJS.ProcessEnv = process.env, homedir: () => string = os.homedir, ): string { - const override = env.CLAWDBOT_STATE_DIR?.trim() || env.CLAWDIS_STATE_DIR?.trim(); + const override = env.CLAWDBOT_STATE_DIR?.trim(); if (override) return resolveUserPath(override); return path.join(homedir(), ".clawdbot"); } @@ -41,9 +41,6 @@ function resolveUserPath(input: string): string { export const STATE_DIR_CLAWDBOT = resolveStateDir(); -// Legacy exports for backward compatibility during Clawdis → Clawdbot rebrand -export const STATE_DIR_CLAWDIS = STATE_DIR_CLAWDBOT; - /** * Config file path (JSON5). * Can be overridden via CLAWDBOT_CONFIG_PATH environment variable. @@ -60,9 +57,6 @@ export function resolveConfigPath( export const CONFIG_PATH_CLAWDBOT = resolveConfigPath(); -// Legacy exports for backward compatibility during Clawdis → Clawdbot rebrand -export const CONFIG_PATH_CLAWDIS = CONFIG_PATH_CLAWDBOT; - export const DEFAULT_GATEWAY_PORT = 18789; const OAUTH_FILENAME = "oauth.json"; diff --git a/src/config/sessions.test.ts b/src/config/sessions.test.ts index 7aae05431..d3d8e8d3e 100644 --- a/src/config/sessions.test.ts +++ b/src/config/sessions.test.ts @@ -175,14 +175,6 @@ describe("sessions", () => { expect(dir).toBe(path.join(path.resolve("/custom/state"), "agents", "main", "sessions")); }); - it("falls back to CLAWDIS_STATE_DIR for session transcripts dir", () => { - const dir = resolveSessionTranscriptsDir( - { CLAWDIS_STATE_DIR: "/legacy/state" } as NodeJS.ProcessEnv, - () => "/home/ignored", - ); - expect(dir).toBe(path.join(path.resolve("/legacy/state"), "agents", "main", "sessions")); - }); - it("includes topic ids in session transcript filenames", () => { const prev = process.env.CLAWDBOT_STATE_DIR; process.env.CLAWDBOT_STATE_DIR = "/custom/state"; diff --git a/src/daemon/constants.ts b/src/daemon/constants.ts index 4f7e8c565..c16f7657b 100644 --- a/src/daemon/constants.ts +++ b/src/daemon/constants.ts @@ -6,11 +6,9 @@ export const GATEWAY_SERVICE_MARKER = "clawdbot"; export const GATEWAY_SERVICE_KIND = "gateway"; export const LEGACY_GATEWAY_LAUNCH_AGENT_LABELS = [ "com.steipete.clawdbot.gateway", - "com.steipete.clawdis.gateway", - "com.clawdis.gateway", ]; -export const LEGACY_GATEWAY_SYSTEMD_SERVICE_NAMES = ["clawdis-gateway"]; -export const LEGACY_GATEWAY_WINDOWS_TASK_NAMES = ["Clawdis Gateway"]; +export const LEGACY_GATEWAY_SYSTEMD_SERVICE_NAMES: string[] = []; +export const LEGACY_GATEWAY_WINDOWS_TASK_NAMES: string[] = []; export function resolveGatewayLaunchAgentLabel(profile?: string): string { const trimmed = profile?.trim(); diff --git a/src/daemon/inspect.ts b/src/daemon/inspect.ts index faa979d97..4d23ff201 100644 --- a/src/daemon/inspect.ts +++ b/src/daemon/inspect.ts @@ -25,7 +25,7 @@ export type FindExtraGatewayServicesOptions = { deep?: boolean; }; -const EXTRA_MARKERS = ["clawdbot", "clawdis"]; +const EXTRA_MARKERS = ["clawdbot"]; const execFileAsync = promisify(execFile); export function renderGatewayServiceCleanupHints( diff --git a/src/daemon/launchd.ts b/src/daemon/launchd.ts index 9734bdec2..8a89d4216 100644 --- a/src/daemon/launchd.ts +++ b/src/daemon/launchd.ts @@ -57,7 +57,7 @@ export function resolveGatewayLogPaths(env: Record): stderrPath: string; } { const home = resolveHomeDir(env); - const stateOverride = env.CLAWDBOT_STATE_DIR?.trim() || env.CLAWDIS_STATE_DIR?.trim(); + const stateOverride = env.CLAWDBOT_STATE_DIR?.trim(); const profile = env.CLAWDBOT_PROFILE?.trim(); const suffix = profile && profile.toLowerCase() !== "default" ? `-${profile}` : ""; const defaultStateDir = path.join(home, `.clawdbot${suffix}`); diff --git a/src/daemon/legacy.ts b/src/daemon/legacy.ts index 498440128..0f782db47 100644 --- a/src/daemon/legacy.ts +++ b/src/daemon/legacy.ts @@ -1,5 +1,4 @@ import { findLegacyLaunchAgents, uninstallLegacyLaunchAgents } from "./launchd.js"; -import { findLegacyScheduledTasks, uninstallLegacyScheduledTasks } from "./schtasks.js"; import { findLegacySystemdUnits, uninstallLegacySystemdUnits } from "./systemd.js"; export type LegacyGatewayService = { @@ -34,19 +33,6 @@ function formatLegacySystemdUnits( })); } -function formatLegacyScheduledTasks( - tasks: Awaited>, -): LegacyGatewayService[] { - return tasks.map((task) => ({ - platform: "win32", - label: task.name, - detail: [ - task.installed ? "installed" : "not installed", - task.scriptExists ? `script: ${task.scriptPath}` : "script missing", - ].join(", "), - })); -} - export async function findLegacyGatewayServices( env: Record, ): Promise { @@ -60,11 +46,6 @@ export async function findLegacyGatewayServices( return formatLegacySystemdUnits(units); } - if (process.platform === "win32") { - const tasks = await findLegacyScheduledTasks(env); - return formatLegacyScheduledTasks(tasks); - } - return []; } @@ -85,10 +66,5 @@ export async function uninstallLegacyGatewayServices({ return formatLegacySystemdUnits(units); } - if (process.platform === "win32") { - const tasks = await uninstallLegacyScheduledTasks({ env, stdout }); - return formatLegacyScheduledTasks(tasks); - } - return []; } diff --git a/src/daemon/schtasks.ts b/src/daemon/schtasks.ts index feb65cd23..6c986a271 100644 --- a/src/daemon/schtasks.ts +++ b/src/daemon/schtasks.ts @@ -4,11 +4,7 @@ import path from "node:path"; import { promisify } from "node:util"; import { colorize, isRich, theme } from "../terminal/theme.js"; -import { - formatGatewayServiceDescription, - LEGACY_GATEWAY_WINDOWS_TASK_NAMES, - resolveGatewayWindowsTaskName, -} from "./constants.js"; +import { formatGatewayServiceDescription, resolveGatewayWindowsTaskName } from "./constants.js"; import { parseKeyValueOutput } from "./runtime-parse.js"; import type { GatewayServiceRuntime } from "./service-runtime.js"; @@ -32,10 +28,6 @@ function resolveTaskScriptPath(env: Record): string return path.join(home, `.clawdbot${suffix}`, "gateway.cmd"); } -function resolveLegacyTaskScriptPath(env: Record): string { - const home = resolveHomeDir(env); - return path.join(home, ".clawdis", "gateway.cmd"); -} function quoteCmdArg(value: string): string { if (!/[ \t"]/g.test(value)) return value; @@ -351,77 +343,3 @@ export async function readScheduledTaskRuntime( lastRunResult: parsed.lastRunResult, }; } -export type LegacyScheduledTask = { - name: string; - scriptPath: string; - installed: boolean; - scriptExists: boolean; -}; - -export async function findLegacyScheduledTasks( - env: Record, -): Promise { - const results: LegacyScheduledTask[] = []; - let schtasksAvailable = true; - try { - await assertSchtasksAvailable(); - } catch { - schtasksAvailable = false; - } - - for (const name of LEGACY_GATEWAY_WINDOWS_TASK_NAMES) { - const scriptPath = resolveLegacyTaskScriptPath(env); - let installed = false; - if (schtasksAvailable) { - const res = await execSchtasks(["/Query", "/TN", name]); - installed = res.code === 0; - } - let scriptExists = false; - try { - await fs.access(scriptPath); - scriptExists = true; - } catch { - // ignore - } - if (installed || scriptExists) { - results.push({ name, scriptPath, installed, scriptExists }); - } - } - - return results; -} - -export async function uninstallLegacyScheduledTasks({ - env, - stdout, -}: { - env: Record; - stdout: NodeJS.WritableStream; -}): Promise { - const tasks = await findLegacyScheduledTasks(env); - if (tasks.length === 0) return tasks; - - let schtasksAvailable = true; - try { - await assertSchtasksAvailable(); - } catch { - schtasksAvailable = false; - } - - for (const task of tasks) { - if (schtasksAvailable && task.installed) { - await execSchtasks(["/Delete", "/F", "/TN", task.name]); - } else if (!schtasksAvailable && task.installed) { - stdout.write(`schtasks unavailable; unable to remove legacy task: ${task.name}\n`); - } - - try { - await fs.unlink(task.scriptPath); - stdout.write(`${formatLine("Removed legacy task script", task.scriptPath)}\n`); - } catch { - stdout.write(`Legacy task script not found at ${task.scriptPath}\n`); - } - } - - return tasks; -} diff --git a/src/infra/ports-format.ts b/src/infra/ports-format.ts index faf9fa1b5..d9afb7fc1 100644 --- a/src/infra/ports-format.ts +++ b/src/infra/ports-format.ts @@ -2,7 +2,7 @@ import type { PortListener, PortListenerKind, PortUsage } from "./ports-types.js export function classifyPortListener(listener: PortListener, port: number): PortListenerKind { const raw = `${listener.commandLine ?? ""} ${listener.command ?? ""}`.trim().toLowerCase(); - if (raw.includes("clawdbot") || raw.includes("clawdis")) return "gateway"; + if (raw.includes("clawdbot")) return "gateway"; if (raw.includes("ssh")) { const portToken = String(port); const tunnelPattern = new RegExp( diff --git a/test/helpers/temp-home.ts b/test/helpers/temp-home.ts index 0bacb6386..8d16611b4 100644 --- a/test/helpers/temp-home.ts +++ b/test/helpers/temp-home.ts @@ -10,7 +10,6 @@ type EnvSnapshot = { homeDrive: string | undefined; homePath: string | undefined; stateDir: string | undefined; - legacyStateDir: string | undefined; }; function snapshotEnv(): EnvSnapshot { @@ -20,7 +19,6 @@ function snapshotEnv(): EnvSnapshot { homeDrive: process.env.HOMEDRIVE, homePath: process.env.HOMEPATH, stateDir: process.env.CLAWDBOT_STATE_DIR, - legacyStateDir: process.env.CLAWDIS_STATE_DIR, }; } @@ -34,7 +32,6 @@ function restoreEnv(snapshot: EnvSnapshot) { restoreKey("HOMEDRIVE", snapshot.homeDrive); restoreKey("HOMEPATH", snapshot.homePath); restoreKey("CLAWDBOT_STATE_DIR", snapshot.stateDir); - restoreKey("CLAWDIS_STATE_DIR", snapshot.legacyStateDir); } function snapshotExtraEnv(keys: string[]): Record { @@ -54,7 +51,6 @@ function setTempHome(base: string) { process.env.HOME = base; process.env.USERPROFILE = base; process.env.CLAWDBOT_STATE_DIR = path.join(base, ".clawdbot"); - process.env.CLAWDIS_STATE_DIR = path.join(base, ".clawdbot"); if (process.platform !== "win32") return; const match = base.match(/^([A-Za-z]:)(.*)$/);