chore: drop Clawdis legacy references

This commit is contained in:
Peter Steinberger
2026-01-15 06:18:34 +00:00
parent 60748b1370
commit d59aab7fd3
31 changed files with 61 additions and 592 deletions

View File

@@ -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";

View File

@@ -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";