chore: rebrand companion-os to clanker-agent

- Rename all package names from companion-* to clanker-*
- Update npm scopes from @mariozechner to @harivansh-afk
- Rename config directories .companion -> .clanker
- Rename environment variables COMPANION_* -> CLANKER_*
- Update all documentation, README files, and install scripts
- Rename package directories (companion-channels, companion-grind, companion-teams)
- Update GitHub URLs to harivansh-afk/clanker-agent
- Preserve full git history from companion-cloud monorepo
This commit is contained in:
Harivansh Rathi 2026-03-26 16:22:52 -04:00
parent f93fe7d1a0
commit 67168d8289
356 changed files with 2249 additions and 10223 deletions

View file

@ -7,7 +7,7 @@ import { SettingsManager } from "../src/core/settings-manager.js";
* Tests for the fix to a bug where external file changes to arrays were overwritten.
*
* The bug scenario was:
* 1. Companion starts with settings.json containing packages: ["npm:some-pkg"]
* 1. Clanker starts with settings.json containing packages: ["npm:some-pkg"]
* 2. User externally edits file to packages: []
* 3. User changes an unrelated setting (e.g., theme) via UI
* 4. save() would overwrite packages back to ["npm:some-pkg"] from stale in-memory state
@ -25,7 +25,7 @@ describe("SettingsManager - External Edit Preservation", () => {
rmSync(testDir, { recursive: true });
}
mkdirSync(agentDir, { recursive: true });
mkdirSync(join(projectDir, ".companion"), { recursive: true });
mkdirSync(join(projectDir, ".clanker"), { recursive: true });
});
afterEach(() => {
@ -42,15 +42,15 @@ describe("SettingsManager - External Edit Preservation", () => {
settingsPath,
JSON.stringify({
theme: "dark",
packages: ["npm:companion-mcp-adapter"],
packages: ["npm:clanker-mcp-adapter"],
}),
);
// Companion starts up and loads settings into memory
// Clanker starts up and loads settings into memory
const manager = SettingsManager.create(projectDir, agentDir);
// At this point, globalSettings.packages = ["npm:companion-mcp-adapter"]
expect(manager.getPackages()).toEqual(["npm:companion-mcp-adapter"]);
// At this point, globalSettings.packages = ["npm:clanker-mcp-adapter"]
expect(manager.getPackages()).toEqual(["npm:clanker-mcp-adapter"]);
// User externally edits settings.json to remove the package
const currentSettings = JSON.parse(readFileSync(settingsPath, "utf-8"));
@ -102,7 +102,7 @@ describe("SettingsManager - External Edit Preservation", () => {
});
it("should preserve external project settings changes when updating unrelated project field", async () => {
const projectSettingsPath = join(projectDir, ".companion", "settings.json");
const projectSettingsPath = join(projectDir, ".clanker", "settings.json");
writeFileSync(
projectSettingsPath,
JSON.stringify({
@ -133,7 +133,7 @@ describe("SettingsManager - External Edit Preservation", () => {
});
it("should let in-memory project changes override external changes for the same project field", async () => {
const projectSettingsPath = join(projectDir, ".companion", "settings.json");
const projectSettingsPath = join(projectDir, ".clanker", "settings.json");
writeFileSync(
projectSettingsPath,
JSON.stringify({