Skip to content

Commit 7dbd07b

Browse files
committed
fix(codex): use omo-prefixed component bins
1 parent 7385cc0 commit 7dbd07b

25 files changed

Lines changed: 440 additions & 43 deletions

docs/guide/installation.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,7 @@ grep -A2 'omo@sisyphuslabs' ~/.codex/config.toml
264264
grep -E 'approval_policy|sandbox_mode|network_access' ~/.codex/config.toml
265265
266266
# Component binaries linked?
267-
ls ~/.local/bin/ | grep -E '^(codex-(rules|comment-checker|ultrawork|start-work-continuation|telemetry)|omo|omo-lsp)$'
267+
ls ~/.local/bin/ | grep -E '^(omo|omo-(comment-checker|lsp|rules|start-work-continuation|telemetry|ultrawork))$'
268268
269269
# Codex CLI sees the plugin?
270270
codex --help
@@ -576,7 +576,7 @@ Skip this section if `--platform=opencode`. Otherwise, the user installed the **
576576
577577
- **Plugin cache:** `~/.codex/plugins/cache/sisyphuslabs/omo/<version>/`
578578
- **Codex marketplace snapshot:** `~/.codex/.tmp/marketplaces/sisyphuslabs/` (same stable path Codex refreshes from the configured Git marketplace)
579-
- **Component binaries:** `~/.local/bin/codex-rules`, `codex-comment-checker`, `omo-lsp`, `codex-ultrawork`, `omo`, `codex-start-work-continuation`, `codex-telemetry` (or the same names under `$CODEX_LOCAL_BIN_DIR` if set)
579+
- **Component binaries:** `~/.local/bin/omo`, `omo-comment-checker`, `omo-lsp`, `omo-rules`, `omo-start-work-continuation`, `omo-telemetry`, `omo-ultrawork` (or the same names under `$CODEX_LOCAL_BIN_DIR` if set)
580580
- **Codex agent roles:** `~/.codex/agents/{codex-ultrawork-reviewer,explorer,librarian,metis,momus,plan}.toml` linked or copied from the stable marketplace snapshot, so they keep resolving when Codex prunes old plugin-cache versions
581581
- **Codex config edits:** `~/.codex/config.toml` gained `[features] plugins = true`, `[features] plugin_hooks = true`, `[marketplaces.sisyphuslabs]` pointing at `https://github.com/code-yeongyu/lazycodex.git`, `[plugins."omo@sisyphuslabs"]`, SHA256-pinned `[hooks.state."omo@sisyphuslabs:..."]` entries, and optionally autonomous permission settings if accepted
582582
@@ -601,7 +601,7 @@ The Codex CLI Light edition is fully independent of the OpenCode plugin. You can
601601
| Symptom | Fix |
602602
|---------|-----|
603603
| `codex --help` does not list the omo plugin | Re-run `bunx omo install --platform=codex` (idempotent — hook hashes are recomputed) |
604-
| `command not found: codex-rules` or `command not found: omo` | Add `~/.local/bin` to `PATH`, or set `$CODEX_LOCAL_BIN_DIR` to a directory already on `PATH` |
604+
| `command not found: omo-rules` or `command not found: omo` | Add `~/.local/bin` to `PATH`, or set `$CODEX_LOCAL_BIN_DIR` to a directory already on `PATH` |
605605
| `npm install` fails mid-install | `rm -rf ~/.codex/plugins/cache/sisyphuslabs` and retry |
606606
| Plugin block is present but hooks do not fire | Verify `~/.codex/config.toml` contains `[features]\nplugins = true\nplugin_hooks = true` and `[plugins."omo@sisyphuslabs"]` |
607607
| `Ignoring malformed agent role definition: agents.*.config_file must point to an existing file` | Re-run `bunx omo install --platform=codex` (or `bunx lazycodex install`). The installer repairs stale managed `[agents.*]` entries and recreates `~/.codex/agents/*.toml`. |
@@ -802,9 +802,9 @@ rm -rf ~/.codex/plugins/cache/sisyphuslabs
802802
# [hooks.state."omo@sisyphuslabs"]
803803
804804
# 3. Optional: remove the component symlinks
805-
rm -f ~/.local/bin/codex-rules ~/.local/bin/codex-comment-checker \
806-
~/.local/bin/omo-lsp ~/.local/bin/codex-ultrawork ~/.local/bin/omo \
807-
~/.local/bin/codex-start-work-continuation ~/.local/bin/codex-telemetry
805+
rm -f ~/.local/bin/omo ~/.local/bin/omo-comment-checker ~/.local/bin/omo-lsp \
806+
~/.local/bin/omo-rules ~/.local/bin/omo-start-work-continuation \
807+
~/.local/bin/omo-telemetry ~/.local/bin/omo-ultrawork
808808
```
809809
810810
## Operational notes

packages/omo-codex/plugin/components/comment-checker/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
"typescript"
2222
],
2323
"bin": {
24-
"codex-comment-checker": "./dist/cli.js"
24+
"omo-comment-checker": "./dist/cli.js"
2525
},
2626
"files": [
2727
"dist",

packages/omo-codex/plugin/components/comment-checker/src/cli.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,6 @@ const [command, subcommand] = process.argv.slice(2);
77
if (command === "hook" && subcommand === "post-tool-use") {
88
await runCodexHookCli();
99
} else {
10-
process.stderr.write("Usage: codex-comment-checker hook post-tool-use\n");
10+
process.stderr.write("Usage: omo-comment-checker hook post-tool-use\n");
1111
process.exitCode = 2;
1212
}

packages/omo-codex/plugin/components/comment-checker/test/package-smoke.test.ts

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,6 @@ type PackageJson = {
99
readonly optionalDependencies: Record<string, string>;
1010
};
1111

12-
type PluginJson = {
13-
readonly hooks: string;
14-
};
15-
1612
type HookCommand = {
1713
readonly command: string;
1814
};
@@ -31,12 +27,6 @@ function readPackageJson(path: string): PackageJson {
3127
return parsed;
3228
}
3329

34-
function readPluginJson(path: string): PluginJson {
35-
const parsed: unknown = JSON.parse(readFileSync(path, "utf8"));
36-
if (!isPluginJson(parsed)) throw new TypeError(`Invalid plugin metadata: ${path}`);
37-
return parsed;
38-
}
39-
4030
function readHooksJson(path: string): HooksJson {
4131
const parsed: unknown = JSON.parse(readFileSync(path, "utf8"));
4232
if (!isHooksJson(parsed)) throw new TypeError(`Invalid hooks metadata: ${path}`);
@@ -47,7 +37,6 @@ describe("plugin package metadata", () => {
4737
it("#given packaged plugin files #when validating entrypoints #then hook command uses portable plugin root interpolation", () => {
4838
// given
4939
const packageJson = readPackageJson("package.json");
50-
const pluginJson = readPluginJson(".codex-plugin/plugin.json");
5140
const hooksJson = readHooksJson("hooks/hooks.json");
5241
const cliSource = readFileSync("src/cli.ts", "utf8");
5342

@@ -60,8 +49,7 @@ describe("plugin package metadata", () => {
6049
expect(packageJson.packageManager).toBe("npm@11.12.1");
6150
expect(packageJson.dependencies ?? {}).not.toHaveProperty("@code-yeongyu/comment-checker");
6251
expect(packageJson.optionalDependencies).toHaveProperty("@code-yeongyu/comment-checker");
63-
expect(packageJson.bin["codex-comment-checker"]).toBe("./dist/cli.js");
64-
expect(pluginJson.hooks).toBe("./hooks/hooks.json");
52+
expect(packageJson.bin["omo-comment-checker"]).toBe("./dist/cli.js");
6553
expect(cliSource.startsWith("#!/usr/bin/env node")).toBe(true);
6654
expect(command).toBe(`node "${pluginRoot}/dist/cli.js" hook post-tool-use`);
6755
});
@@ -79,10 +67,6 @@ function isPackageJson(value: unknown): value is PackageJson {
7967
);
8068
}
8169

82-
function isPluginJson(value: unknown): value is PluginJson {
83-
return isRecord(value) && typeof value["hooks"] === "string";
84-
}
85-
8670
function isHooksJson(value: unknown): value is HooksJson {
8771
if (!isRecord(value) || !isRecord(value["hooks"])) return false;
8872
return Object.values(value["hooks"]).every(isHookEntries);

packages/omo-codex/plugin/components/rules/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
"typescript"
2424
],
2525
"bin": {
26-
"codex-rules": "./dist/cli.js"
26+
"omo-rules": "./dist/cli.js"
2727
},
2828
"files": [
2929
"bundled-rules",

packages/omo-codex/plugin/components/rules/src/cli.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ if (command === "hook" && subcommand === "session-start") {
2626
} else if (command === "hook" && subcommand === "post-compact") {
2727
await runHookCli("PostCompact");
2828
} else {
29-
process.stderr.write("Usage: codex-rules hook [session-start|user-prompt-submit|post-tool-use|post-compact]\n");
29+
process.stderr.write("Usage: omo-rules hook [session-start|user-prompt-submit|post-tool-use|post-compact]\n");
3030
process.exitCode = 1;
3131
}
3232

packages/omo-codex/plugin/components/rules/test/package-smoke.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ describe("plugin package metadata", () => {
6767
expect(packageJson.type).toBe("module");
6868
expect(packageJson.packageManager).toBe("npm@11.12.1");
6969
expect(packageJson.dependencies ?? {}).toEqual({ picomatch: "^4.0.3" });
70-
expect(packageJson.bin["codex-rules"]).toBe("./dist/cli.js");
70+
expect(packageJson.bin["omo-rules"]).toBe("./dist/cli.js");
7171
expect(packageJson.files).toContain("bundled-rules");
7272
expect(pluginJson.hooks).toBe("./hooks/hooks.json");
7373
expect(cliSource.startsWith("#!/usr/bin/env node")).toBe(true);

packages/omo-codex/plugin/components/start-work-continuation/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
"boulder"
2323
],
2424
"bin": {
25-
"codex-start-work-continuation": "./dist/cli.js"
25+
"omo-start-work-continuation": "./dist/cli.js"
2626
},
2727
"scripts": {
2828
"build": "tsc -p tsconfig.build.json",

packages/omo-codex/plugin/components/start-work-continuation/src/cli.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ const subcommand = process.argv[3];
1717
if (command === "hook" && (subcommand === "stop" || subcommand === "subagent-stop")) {
1818
await runHookCli();
1919
} else {
20-
process.stderr.write("Usage: codex-start-work-continuation hook <stop|subagent-stop>\n");
20+
process.stderr.write("Usage: omo-start-work-continuation hook <stop|subagent-stop>\n");
2121
process.exitCode = 1;
2222
}
2323

packages/omo-codex/plugin/components/telemetry/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
"daily-active"
2424
],
2525
"bin": {
26-
"codex-telemetry": "./dist/cli.js"
26+
"omo-telemetry": "./dist/cli.js"
2727
},
2828
"files": [
2929
"dist",

0 commit comments

Comments
 (0)