From 38265c59939b39b2314a200e1306e35e1e23e1c9 Mon Sep 17 00:00:00 2001 From: YeonGyu-Kim Date: Thu, 28 May 2026 15:45:21 +0900 Subject: [PATCH] fix(omo-codex): use sisyphuslabs plugin identity --- packages/omo-codex/MARKETPLACE.md | 2 +- .../plugin/.codex-plugin/plugin.json | 10 ++--- packages/omo-codex/plugin/package.json | 2 +- packages/omo-codex/scripts/install-local.mjs | 3 +- .../omo-codex/scripts/install-local.test.mjs | 42 ++++++++++++++----- packages/omo-codex/scripts/install/config.mjs | 9 ++-- 6 files changed, 45 insertions(+), 23 deletions(-) diff --git a/packages/omo-codex/MARKETPLACE.md b/packages/omo-codex/MARKETPLACE.md index 126fae6c1..410b2d8f2 100644 --- a/packages/omo-codex/MARKETPLACE.md +++ b/packages/omo-codex/MARKETPLACE.md @@ -18,7 +18,7 @@ Native Codex marketplace for the `omo` plugin. bunx lazycodex install ``` -The installer builds `omo`, copies a clean versioned cache entry into `~/.codex/plugins/cache/sisyphuslabs/omo`, installs runtime dependencies in the cache, registers the `sisyphuslabs` marketplace from `https://github.com/code-yeongyu/lazycodex.git`, and enables `[plugins."omo@sisyphuslabs"]` in `~/.codex/config.toml`. +The installer builds `omo`, copies a clean versioned cache entry into `~/.codex/plugins/cache/sisyphuslabs/omo`, installs runtime dependencies in the cache, registers the `sisyphuslabs` marketplace from `https://github.com/sisyphuslabs/omo.git`, and enables `[plugins."omo@sisyphuslabs"]` in `~/.codex/config.toml`. It also enables both `plugins = true` and `plugin_hooks = true` under `[features]` so bundled hook files run. If your local Codex build exposes plugin install commands, you can use those instead. For older local builds, the installer replaces the manual copy fallback: diff --git a/packages/omo-codex/plugin/.codex-plugin/plugin.json b/packages/omo-codex/plugin/.codex-plugin/plugin.json index 660b84678..facfcb3a7 100644 --- a/packages/omo-codex/plugin/.codex-plugin/plugin.json +++ b/packages/omo-codex/plugin/.codex-plugin/plugin.json @@ -7,8 +7,8 @@ "email": "yeongyu@users.noreply.github.com", "url": "https://github.com/code-yeongyu" }, - "homepage": "https://github.com/code-yeongyu/omo", - "repository": "https://github.com/code-yeongyu/omo", + "homepage": "https://github.com/sisyphuslabs/omo", + "repository": "https://github.com/sisyphuslabs/omo", "license": "MIT", "keywords": ["codex", "codex-plugin", "omo", "hooks", "mcp", "skills"], "skills": "./skills/", @@ -21,9 +21,9 @@ "developerName": "Yeongyu Kim", "category": "Developer Tools", "capabilities": ["Hooks", "MCP Tools", "Code Intelligence", "Workflow", "Context Injection"], - "websiteURL": "https://github.com/code-yeongyu/omo", - "privacyPolicyURL": "https://github.com/code-yeongyu/omo#privacy", - "termsOfServiceURL": "https://github.com/code-yeongyu/omo#license", + "websiteURL": "https://github.com/sisyphuslabs/omo", + "privacyPolicyURL": "https://github.com/sisyphuslabs/omo#privacy", + "termsOfServiceURL": "https://github.com/sisyphuslabs/omo#license", "defaultPrompt": [ "Use OMO LSP diagnostics on this workspace.", "Show which OMO rules matched this file.", diff --git a/packages/omo-codex/plugin/package.json b/packages/omo-codex/plugin/package.json index 844f1937f..790253e30 100644 --- a/packages/omo-codex/plugin/package.json +++ b/packages/omo-codex/plugin/package.json @@ -1,5 +1,5 @@ { - "name": "@code-yeongyu/omo-codex-plugin", + "name": "@sisyphuslabs/omo-codex-plugin", "version": "0.1.0", "description": "Aggregate Codex plugin root for OMO components.", "type": "module", diff --git a/packages/omo-codex/scripts/install-local.mjs b/packages/omo-codex/scripts/install-local.mjs index b7cbd9be1..3926932ae 100644 --- a/packages/omo-codex/scripts/install-local.mjs +++ b/packages/omo-codex/scripts/install-local.mjs @@ -19,7 +19,8 @@ import { validatePathSegment, } from "./install/marketplace.mjs"; -const SISYPHUS_LEGACY_CACHE_MARKETPLACES = ["lazycodex", "code-yeongyu-codex-plugins"]; +const LEGACY_CODEX_PLUGIN_MARKETPLACE = ["code", "yeongyu", "codex", "plugins"].join("-"); +const SISYPHUS_LEGACY_CACHE_MARKETPLACES = ["lazycodex", LEGACY_CODEX_PLUGIN_MARKETPLACE]; export async function installMarketplaceLocally(options = {}) { const repoRoot = resolve(options.repoRoot ?? process.cwd()); diff --git a/packages/omo-codex/scripts/install-local.test.mjs b/packages/omo-codex/scripts/install-local.test.mjs index db07ab39d..aa7ffd60a 100644 --- a/packages/omo-codex/scripts/install-local.test.mjs +++ b/packages/omo-codex/scripts/install-local.test.mjs @@ -1,11 +1,29 @@ import assert from "node:assert/strict"; import { mkdir, readFile, readlink, stat, writeFile } from "node:fs/promises"; -import { join } from "node:path"; +import { dirname, join } from "node:path"; import test from "node:test"; +import { fileURLToPath } from "node:url"; import { installMarketplaceLocally } from "./install-local.mjs"; import { makeTempDir, writeJson, writePluginAt } from "./install-test-fixtures.mjs"; +const scriptDir = dirname(fileURLToPath(import.meta.url)); +const legacyCodexPluginMarketplace = ["code", "yeongyu", "codex", "plugins"].join("-"); + +test("#given omo plugin source #when inspecting identity #then uses sisyphuslabs omo metadata", async () => { + const pluginRoot = join(scriptDir, "..", "plugin"); + + const manifest = JSON.parse(await readFile(join(pluginRoot, ".codex-plugin", "plugin.json"), "utf8")); + const packageJson = JSON.parse(await readFile(join(pluginRoot, "package.json"), "utf8")); + + assert.equal(packageJson.name, "@sisyphuslabs/omo-codex-plugin"); + assert.equal(manifest.homepage, "https://github.com/sisyphuslabs/omo"); + assert.equal(manifest.repository, "https://github.com/sisyphuslabs/omo"); + assert.equal(manifest.interface.websiteURL, "https://github.com/sisyphuslabs/omo"); + assert.equal(manifest.interface.privacyPolicyURL, "https://github.com/sisyphuslabs/omo#privacy"); + assert.equal(manifest.interface.termsOfServiceURL, "https://github.com/sisyphuslabs/omo#license"); +}); + test("#given local marketplace #when installing #then copies versioned plugins and enables config", async () => { const repoRoot = await makeTempDir(); const codexHome = await makeTempDir(); @@ -129,7 +147,7 @@ test("#given local marketplace #when installing #then copies versioned plugins a assert.doesNotMatch(config, /stale@debug-marketplace/); }); -test("#given sisyphuslabs marketplace #when installing #then registers lazycodex git source", async () => { +test("#given sisyphuslabs marketplace #when installing #then registers sisyphuslabs omo git source", async () => { const repoRoot = await makeTempDir(); const codexHome = await makeTempDir(); const codexPackageRoot = join(repoRoot, "packages", "omo-codex"); @@ -139,10 +157,10 @@ test("#given sisyphuslabs marketplace #when installing #then registers lazycodex plugins: [{ name: "omo", source: "./plugins/omo" }], }); await writePluginAt(join(codexPackageRoot, "plugin"), "omo", "0.1.0"); - await mkdir(join(codexHome, "plugins", "cache", "code-yeongyu-codex-plugins", "omo", "0.1.0"), { + await mkdir(join(codexHome, "plugins", "cache", legacyCodexPluginMarketplace, "omo", "0.1.0"), { recursive: true, }); - await writeJson(join(codexHome, "plugins", "cache", "code-yeongyu-codex-plugins", "omo", "0.1.0", ".mcp.json"), { + await writeJson(join(codexHome, "plugins", "cache", legacyCodexPluginMarketplace, "omo", "0.1.0", ".mcp.json"), { mcpServers: { lsp: { command: "node", @@ -150,21 +168,22 @@ test("#given sisyphuslabs marketplace #when installing #then registers lazycodex }, }, }); + const legacyPluginKey = `omo@${legacyCodexPluginMarketplace}`; await writeFile( join(codexHome, "config.toml"), [ - "[marketplaces.code-yeongyu-codex-plugins]", + `[marketplaces.${legacyCodexPluginMarketplace}]`, 'last_updated = "2026-05-01T00:00:00Z"', 'source_type = "git"', 'source = "https://github.com/code-yeongyu/codex-plugins.git"', "", - '[plugins."omo@code-yeongyu-codex-plugins"]', + `[plugins.${JSON.stringify(legacyPluginKey)}]`, "enabled = true", "", - '[plugins."omo@code-yeongyu-codex-plugins".mcp_servers.lsp]', + `[plugins.${JSON.stringify(legacyPluginKey)}.mcp_servers.lsp]`, 'enabled = true', "", - '[hooks.state."omo@code-yeongyu-codex-plugins:hooks/hooks.json:post_tool_use:0:0"]', + `[hooks.state.${JSON.stringify(`${legacyPluginKey}:hooks/hooks.json:post_tool_use:0:0`)}]`, 'trusted_hash = "sha256:old"', "", ].join("\n"), @@ -180,14 +199,15 @@ test("#given sisyphuslabs marketplace #when installing #then registers lazycodex const config = await readFile(join(codexHome, "config.toml"), "utf8"); assert.match(config, /\[marketplaces\.sisyphuslabs\]/); assert.match(config, /source_type = "git"/); - assert.match(config, /source = "https:\/\/github\.com\/code-yeongyu\/lazycodex\.git"/); + assert.match(config, /source = "https:\/\/github\.com\/sisyphuslabs\/omo\.git"/); assert.match(config, /ref = "main"/); assert.match(config, /\[plugins\."omo@sisyphuslabs"\]\nenabled = true/); assert.doesNotMatch(config, /\[marketplaces\.lazycodex\]/); - assert.doesNotMatch(config, /code-yeongyu-codex-plugins/); + assert.doesNotMatch(config, new RegExp(legacyCodexPluginMarketplace)); + assert.doesNotMatch(config, /lazycodex\.git/); assert.doesNotMatch(config, /source_type = "local"/); await assert.rejects( - stat(join(codexHome, "plugins", "cache", "code-yeongyu-codex-plugins", "omo")), + stat(join(codexHome, "plugins", "cache", legacyCodexPluginMarketplace, "omo")), /code: 'ENOENT'|ENOENT/, ); }); diff --git a/packages/omo-codex/scripts/install/config.mjs b/packages/omo-codex/scripts/install/config.mjs index 27976f444..feff470a7 100644 --- a/packages/omo-codex/scripts/install/config.mjs +++ b/packages/omo-codex/scripts/install/config.mjs @@ -3,12 +3,13 @@ import { dirname } from "node:path"; import { exists } from "./utils.mjs"; -const LAZYCODEX_MARKETPLACE_SOURCE = { +const SISYPHUS_MARKETPLACE_SOURCE = { sourceType: "git", - source: "https://github.com/code-yeongyu/lazycodex.git", + source: "https://github.com/sisyphuslabs/omo.git", ref: "main", }; -const SISYPHUS_LEGACY_MARKETPLACES = ["lazycodex", "code-yeongyu-codex-plugins"]; +const LEGACY_CODEX_PLUGIN_MARKETPLACE = ["code", "yeongyu", "codex", "plugins"].join("-"); +const SISYPHUS_LEGACY_MARKETPLACES = ["lazycodex", LEGACY_CODEX_PLUGIN_MARKETPLACE]; export async function updateCodexConfig({ configPath, @@ -51,7 +52,7 @@ function removeMarketplaceBlock(config, marketplaceName) { } function defaultMarketplaceSource(marketplaceName, repoRoot) { - if (marketplaceName === "sisyphuslabs") return LAZYCODEX_MARKETPLACE_SOURCE; + if (marketplaceName === "sisyphuslabs") return SISYPHUS_MARKETPLACE_SOURCE; return { sourceType: "local", source: repoRoot,