Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 0 additions & 42 deletions src/application/bootstrap/run-cli.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -282,48 +282,6 @@ describe("runCli bootstrap", () => {
}
});

test("preserves legacy managed skills when OO_SKILLS_SYNC_DISABLED is set", async () => {
const sandbox = await createCliSandbox();

sandbox.env.OO_SKILLS_SYNC_DISABLED = "1";

try {
const managedRegistryPath = join(
resolveManagedSkillAgentHomeDirectory(sandbox.env, "universal"),
"skills",
"gpt-image-2",
);

await mkdir(managedRegistryPath, { recursive: true });
await writeFile(join(managedRegistryPath, "SKILL.md"), "skill\n");
await writeFile(
join(managedRegistryPath, ".oo-metadata.json"),
JSON.stringify({
kind: "registry",
packageName: "@alwaysmavs/gpt-image-2",
schemaVersion: 1,
version: "1.0.0",
}),
);

const result = await sandbox.run(["--help"]);

expect(result.exitCode).toBe(0);
// Legacy cleanup is part of the guarded block, so the managed skill
// must remain untouched.
expect((await stat(managedRegistryPath)).isDirectory()).toBe(true);
expect(
(await stat(join(managedRegistryPath, "SKILL.md"))).isFile(),
).toBe(true);
expect(
(await stat(join(managedRegistryPath, ".oo-metadata.json"))).isFile(),
).toBe(true);
}
finally {
await sandbox.cleanup();
}
});

test("writes debug logs to the log directory during cli startup", async () => {
const sandbox = await createCliSandbox();

Expand Down
11 changes: 2 additions & 9 deletions src/application/bootstrap/run-cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ import {
import { createTranslator } from "../../i18n/translator.ts";
import { createCliCatalog } from "../commands/catalog.ts";
import { synchronizeManagedSkillsForAvailableHosts } from "../commands/skills/auto-sync.ts";
import { removeLegacyGptImage2ManagedSkills } from "../commands/skills/legacy-gpt-image-2-cleanup.ts";
import { APP_NAME } from "../config/app-config.ts";
import {
formatCliVersionText,
Expand Down Expand Up @@ -301,15 +300,9 @@ export async function executeCli(invocation: CliInvocation): Promise<number> {
const adapter = new CommanderCliAdapter();

// OO_SKILLS_SYNC_DISABLED suppresses the startup skills synchronization
// and legacy-cleanup side effects so embedded callers never write skill
// files into other agents' home directories (e.g. ~/.agents, ~/.claude).
// so embedded callers never write skill files into other agents' home
// directories (e.g. ~/.agents, ~/.claude).
if (readEnvBoolean(invocation.env.OO_SKILLS_SYNC_DISABLED) !== true) {
// TODO(gpt-image-2-removal): Temporary compatibility cleanup. Remove this
// call and `legacy-gpt-image-2-cleanup.ts` once enough releases have
// shipped that no user still has the oo-managed `@alwaysmavs/gpt-image-2`
// skills materialized in an AI agent. Must run before the sync below so
// the canonical sources are gone before re-publishing could re-create them.
await removeLegacyGptImage2ManagedSkills(context);
await synchronizeManagedSkillsForAvailableHosts(context);
}

Expand Down
208 changes: 0 additions & 208 deletions src/application/commands/skills/legacy-gpt-image-2-cleanup.test.ts

This file was deleted.

Loading
Loading