feat(omo-codex): install through sisyphuslabs marketplace

This commit is contained in:
YeonGyu-Kim
2026-05-27 18:48:33 +09:00
parent a3567056c0
commit 56f39d60fc
35 changed files with 620 additions and 305 deletions
+6 -7
View File
@@ -1,6 +1,6 @@
# codex-plugins
# Sisyphus Labs Codex Marketplace
Local marketplace for the `omo` Codex plugin components ported from `../pi-extensions`.
Native Codex marketplace for the `omo` plugin.
## Plugin
@@ -12,18 +12,17 @@ Local marketplace for the `omo` Codex plugin components ported from `../pi-exten
- `components/ultrawork`: injects the ultrawork orchestration directive when a user prompt contains `ultrawork` or `ulw`.
- `components/ultragoal`: durable repo-native multi-goal orchestration with embedded success criteria and observable evidence audit (`.omo/ultragoal/`).
## Local Install
## Install
```bash
codex plugin marketplace add /Users/yeongyu/local-workspaces/codex-plugins
node /Users/yeongyu/local-workspaces/codex-plugins/scripts/install-local.mjs /Users/yeongyu/local-workspaces/codex-plugins
bunx lazycodex install
```
The installer builds `omo`, copies a clean versioned cache entry into `~/.codex/plugins/cache/code-yeongyu-codex-plugins/omo`, installs runtime dependencies in the cache, prunes stale split-plugin cache/config entries, and enables `[plugins."omo@code-yeongyu-codex-plugins"]` 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/code-yeongyu/lazycodex.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:
```text
~/.codex/plugins/cache/code-yeongyu-codex-plugins/omo/0.1.0
~/.codex/plugins/cache/sisyphuslabs/omo/0.1.0
```
+16 -10
View File
@@ -8,7 +8,7 @@ Codex harness adapter for **oh-my-openagent**. Brings the OMO experience (rules
|------|---------|
| `plugin/` | Vendored Codex plugin namespace `omo` with 5 components. Shipped to the user via `~/.codex/plugins/cache/`. |
| `marketplace.json` | Codex marketplace manifest. Identifies `omo` as the single installable plugin. |
| `scripts/` | Node ESM build scripts (port of the original `codex-plugins/scripts/install-local.mjs`). |
| `scripts/` | Node ESM build scripts for Codex cache installation and marketplace config updates. |
| `src/` | TypeScript runtime: installer + telemetry consumed by the omodex CLI. |
| `MARKETPLACE.md` | Vendored upstream marketplace README. |
@@ -22,16 +22,22 @@ Codex harness adapter for **oh-my-openagent**. Brings the OMO experience (rules
## Install
End users invoke through the omodex CLI:
End users invoke through the omodex CLI. This package is the **Light edition** of omo — install it directly with:
```bash
bunx omo install --codex=yes
# or, equivalently:
bunx oh-my-opencode install --codex=yes
bunx oh-my-openagent install --codex=yes
bunx omo install --platform=codex
# or via the shortcut alias (same compiled CLI, defaults --platform=codex):
bunx lazycodex install
# or the longer package names:
bunx oh-my-opencode install --platform=codex
bunx oh-my-openagent install --platform=codex
```
The installer copies the built plugin into `~/.codex/plugins/cache/code-yeongyu-codex-plugins/omo/<version>/`, enables it in `~/.codex/config.toml`, and links the per-component binaries into `~/.local/bin/` (or `CODEX_LOCAL_BIN_DIR`).
To install **both** the Ultimate edition (OpenCode plugin) and the Light edition (this package) at once, use `--platform=both`.
The installer copies the built plugin into `~/.codex/plugins/cache/sisyphuslabs/omo/<version>/`, enables `omo@sisyphuslabs` in `~/.codex/config.toml`, and registers the `sisyphuslabs` marketplace from the `lazycodex` Git repository for native Codex marketplace upgrades.
To install both editions in one command, use `--platform=both`.
## Telemetry
@@ -39,7 +45,7 @@ Anonymous telemetry uses the same PostHog project as oh-my-openagent but emits t
| Source | Reason | Trigger |
|--------|--------|---------|
| `install` | `install_completed` | `bunx omo install --codex=yes` finishes (handled by `src/cli/install-codex/install-codex.ts`) |
| `install` | `install_completed` | `bunx omo install --platform=codex` or `--platform=both` finishes (handled by `src/cli/install-codex/install-codex.ts`) |
| `plugin` | `session_start` | Codex plugin `SessionStart` hook fires (handled by `plugin/components/telemetry/`) |
Both sources share the same SHA256-hashed installation identifier (`sha256("omo-codex:" + hostname)`), suppress PostHog person profiles, and write the daily dedup state to `~/.local/share/omo-codex/posthog-activity.json`.
@@ -60,9 +66,9 @@ The identity constants and opt-out behavior are pinned across both sources by `s
See `/Users/yeongyu/local-workspaces/omodex/docs/legal/privacy-policy.md` for the full disclosure.
## Provenance
## Component Sources
Vendored from [`code-yeongyu/codex-plugins`](https://github.com/code-yeongyu/codex-plugins) at the snapshot present in `/Users/yeongyu/local-workspaces/codex-plugins/` on 2026-05-25. Per-component upstream:
The bundled component implementations come from the Sisyphus Labs Codex plugin family:
- [code-yeongyu/codex-rules](https://github.com/code-yeongyu/codex-rules)
- [code-yeongyu/codex-comment-checker](https://github.com/code-yeongyu/codex-comment-checker)
+2 -2
View File
@@ -1,7 +1,7 @@
{
"name": "code-yeongyu-codex-plugins",
"name": "sisyphuslabs",
"interface": {
"displayName": "Yeongyu Codex Plugins"
"displayName": "Sisyphus Labs"
},
"plugins": [
{
@@ -51,21 +51,18 @@ node dist/cli.js hook post-tool-use < test/fixtures/post-tool-use.json
## Local Codex Installation
From the marketplace root containing this plugin:
```bash
codex plugin marketplace add /path/to/codex-plugins
node /path/to/codex-plugins/scripts/install-local.mjs /path/to/codex-plugins
bunx lazycodex install
```
If your local Codex build exposes plugin install commands, you can install from the UI or CLI instead. For older local builds, the marketplace installer builds and copies the plugin into `~/.codex/plugins/cache/<marketplace>/omo/0.1.0`, installs runtime dependencies there, and enables:
The installer builds and copies the plugin into `~/.codex/plugins/cache/sisyphuslabs/omo/0.1.0`, registers the `sisyphuslabs` marketplace from the `lazycodex` Git repository, installs runtime dependencies there, and enables:
```toml
[features]
plugins = true
plugin_hooks = true
[plugins."omo@code-yeongyu-codex-plugins"]
[plugins."omo@sisyphuslabs"]
enabled = true
```
@@ -118,17 +118,14 @@ printf '%s\n' '{"jsonrpc":"2.0","id":1,"method":"tools/list"}' | node dist/cli.j
## Local Codex Installation
From the marketplace root containing this plugin:
```bash
codex plugin marketplace add /path/to/codex-plugins
node /path/to/codex-plugins/scripts/install-local.mjs /path/to/codex-plugins
bunx lazycodex install
```
If your local Codex build exposes plugin install commands, you can install from the UI or CLI instead. For older local builds, the marketplace installer builds and copies the plugin into `~/.codex/plugins/cache/<marketplace>/omo/0.1.0` and enables:
The installer builds and copies the plugin into `~/.codex/plugins/cache/sisyphuslabs/omo/0.1.0`, registers the `sisyphuslabs` marketplace from the `lazycodex` Git repository, and enables:
```toml
[plugins."omo@code-yeongyu-codex-plugins"]
[plugins."omo@sisyphuslabs"]
enabled = true
```
@@ -42,17 +42,14 @@ Prefer strict TypeScript and keep runtime imports ESM-compatible.
## Install Locally
From the marketplace workspace:
```bash
codex plugin marketplace add /Users/yeongyu/local-workspaces/codex-plugins
node /Users/yeongyu/local-workspaces/codex-plugins/scripts/install-local.mjs /Users/yeongyu/local-workspaces/codex-plugins
bunx lazycodex install
```
The local installer builds the plugin and copies a clean cache entry to:
```text
~/.codex/plugins/cache/code-yeongyu-codex-plugins/omo/0.1.0
~/.codex/plugins/cache/sisyphuslabs/omo/0.1.0
```
It also enables:
@@ -62,7 +59,7 @@ It also enables:
plugins = true
plugin_hooks = true
[plugins."omo@code-yeongyu-codex-plugins"]
[plugins."omo@sisyphuslabs"]
enabled = true
```
@@ -46,21 +46,18 @@ npm pack --dry-run
## Local Codex Installation
From the marketplace root containing this plugin:
```bash
codex plugin marketplace add /path/to/codex-plugins
node /path/to/codex-plugins/scripts/install-local.mjs /path/to/codex-plugins
bunx lazycodex install
```
If your local Codex build exposes plugin install commands, you can install from the UI or CLI instead. For older local builds, the marketplace installer builds and copies the plugin into `~/.codex/plugins/cache/<marketplace>/omo/0.1.0`, installs runtime dependencies there, and enables:
The installer builds and copies the plugin into `~/.codex/plugins/cache/sisyphuslabs/omo/0.1.0`, registers the `sisyphuslabs` marketplace from the `lazycodex` Git repository, installs runtime dependencies there, and enables:
```toml
[features]
plugins = true
plugin_hooks = true
[plugins."omo@code-yeongyu-codex-plugins"]
[plugins."omo@sisyphuslabs"]
enabled = true
```
@@ -75,4 +72,4 @@ This plugin runs locally. The scaffold does not call a network service by itself
## Related
- [oh-my-codex](https://github.com/code-yeongyu/oh-my-codex) - source project for the ultragoal port.
- [codex-plugins](https://github.com/code-yeongyu/codex-plugins) - local Codex plugin marketplace.
- [lazycodex](https://github.com/code-yeongyu/lazycodex) - Sisyphus Labs Codex marketplace repository.
@@ -20,11 +20,10 @@ The directive is currently 11,005 chars / 232 lines and follows the GPT-5.5 prom
## Install (via this marketplace)
```bash
codex plugin marketplace add /path/to/codex-plugins
node /path/to/codex-plugins/scripts/install-local.mjs /path/to/codex-plugins
bunx lazycodex install
```
The installer copies the plugin into `~/.codex/plugins/cache/code-yeongyu-codex-plugins/omo/0.1.0`, enables it in `~/.codex/config.toml`, registers the `UserPromptSubmit` hook, and installs the bundled agent TOMLs into `~/.codex/agents/` (symlinks on Unix, copies on Windows). A manifest at `<plugin-cache>/.installed-agents.json` records the installed paths for clean uninstall.
The installer copies the plugin into `~/.codex/plugins/cache/sisyphuslabs/omo/0.1.0`, registers the `sisyphuslabs` marketplace from the `lazycodex` Git repository, enables `omo@sisyphuslabs` in `~/.codex/config.toml`, registers the `UserPromptSubmit` hook, and installs the bundled agent TOMLs into `~/.codex/agents/` (symlinks on Unix, copies on Windows). A manifest at `<plugin-cache>/.installed-agents.json` records the installed paths for clean uninstall.
## How it works
@@ -1,60 +1,11 @@
import assert from "node:assert/strict";
import { mkdir, readFile, readlink, stat, writeFile } from "node:fs/promises";
import { dirname } from "node:path";
import { join } from "node:path";
import test from "node:test";
import { tmpdir } from "node:os";
import { mkdtemp } from "node:fs/promises";
import { installMarketplaceLocally } from "./install-local.mjs";
import { linkCachedPluginBins } from "./install/cache.mjs";
async function makeTempDir() {
return mkdtemp(join(tmpdir(), "codex-plugins-install-"));
}
async function writeJson(path, value) {
await mkdir(dirname(path), { recursive: true });
await writeFile(path, `${JSON.stringify(value, null, 2)}\n`);
}
async function writePlugin(root, name, version) {
const pluginRoot = join(root, "plugins", name);
await mkdir(join(pluginRoot, ".codex-plugin"), { recursive: true });
await mkdir(join(pluginRoot, "dist"), { recursive: true });
await mkdir(join(pluginRoot, "hooks"), { recursive: true });
await mkdir(join(pluginRoot, "skills", name), { recursive: true });
await writeJson(join(pluginRoot, ".codex-plugin", "plugin.json"), {
name,
version,
description: `${name} test plugin`,
mcpServers: "./.mcp.json",
hooks: "./hooks/hooks.json",
skills: "./skills/",
});
await writeJson(join(pluginRoot, ".mcp.json"), {
mcpServers: {
[name]: {
command: "node",
args: ["./dist/cli.js", "mcp"],
cwd: ".",
},
},
});
await writeJson(join(pluginRoot, "hooks", "hooks.json"), { hooks: {} });
await writeFile(join(pluginRoot, "skills", name, "SKILL.md"), "---\nname: test\n---\n");
await writeJson(join(pluginRoot, "package.json"), {
name: `@example/${name}`,
version,
bin: {
[name]: "./dist/cli.js",
},
scripts: {
build: "node -e \"require('fs').writeFileSync('dist/cli.js', 'console.log(1)')\"",
},
dependencies: {},
});
}
import { makeTempDir, writeJson, writePlugin } from "./install-test-fixtures.mjs";
test("#given local marketplace #when installing #then copies versioned plugins and enables config", async () => {
const repoRoot = await makeTempDir();
@@ -151,6 +102,35 @@ 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 () => {
const repoRoot = await makeTempDir();
const codexHome = await makeTempDir();
await mkdir(join(repoRoot, ".agents", "plugins"), { recursive: true });
await writeJson(join(repoRoot, ".agents", "plugins", "marketplace.json"), {
name: "sisyphuslabs",
plugins: [{ name: "omo", source: "./plugins/omo" }],
});
await writePlugin(repoRoot, "omo", "0.1.0");
await installMarketplaceLocally({
repoRoot,
codexHome,
runCommand: async () => {},
log: () => {},
});
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, /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, /source_type = "local"/);
});
test("#given plugin hooks #when installing #then records trusted hook hashes", async () => {
const repoRoot = await makeTempDir();
const codexHome = await makeTempDir();
@@ -0,0 +1,50 @@
import { mkdir, mkdtemp, writeFile } from "node:fs/promises";
import { tmpdir } from "node:os";
import { dirname, join } from "node:path";
export async function makeTempDir() {
return mkdtemp(join(tmpdir(), "omo-codex-install-"));
}
export async function writeJson(path, value) {
await mkdir(dirname(path), { recursive: true });
await writeFile(path, `${JSON.stringify(value, null, 2)}\n`);
}
export async function writePlugin(root, name, version) {
const pluginRoot = join(root, "plugins", name);
await mkdir(join(pluginRoot, ".codex-plugin"), { recursive: true });
await mkdir(join(pluginRoot, "dist"), { recursive: true });
await mkdir(join(pluginRoot, "hooks"), { recursive: true });
await mkdir(join(pluginRoot, "skills", name), { recursive: true });
await writeJson(join(pluginRoot, ".codex-plugin", "plugin.json"), {
name,
version,
description: `${name} test plugin`,
mcpServers: "./.mcp.json",
hooks: "./hooks/hooks.json",
skills: "./skills/",
});
await writeJson(join(pluginRoot, ".mcp.json"), {
mcpServers: {
[name]: {
command: "node",
args: ["./dist/cli.js", "mcp"],
cwd: ".",
},
},
});
await writeJson(join(pluginRoot, "hooks", "hooks.json"), { hooks: {} });
await writeFile(join(pluginRoot, "skills", name, "SKILL.md"), "---\nname: test\n---\n");
await writeJson(join(pluginRoot, "package.json"), {
name: `@example/${name}`,
version,
bin: {
[name]: "./dist/cli.js",
},
scripts: {
build: "node -e \"require('fs').writeFileSync('dist/cli.js', 'console.log(1)')\"",
},
dependencies: {},
});
}
+35 -14
View File
@@ -3,7 +3,20 @@ import { dirname } from "node:path";
import { exists } from "./utils.mjs";
export async function updateCodexConfig({ configPath, repoRoot, marketplaceName, pluginNames, trustedHookStates = [] }) {
const LAZYCODEX_MARKETPLACE_SOURCE = {
sourceType: "git",
source: "https://github.com/code-yeongyu/lazycodex.git",
ref: "main",
};
export async function updateCodexConfig({
configPath,
repoRoot,
marketplaceName,
marketplaceSource = defaultMarketplaceSource(marketplaceName, repoRoot),
pluginNames,
trustedHookStates = [],
}) {
await mkdir(dirname(configPath), { recursive: true });
let config = "";
if (await exists(configPath)) config = await readFile(configPath, "utf8");
@@ -12,7 +25,7 @@ export async function updateCodexConfig({ configPath, repoRoot, marketplaceName,
config = removeStaleMarketplaceHookStateBlocks(config, marketplaceName, new Set(pluginNames));
config = ensureFeatureEnabled(config, "plugins");
config = ensureFeatureEnabled(config, "plugin_hooks");
config = ensureMarketplaceBlock(config, marketplaceName, repoRoot);
config = ensureMarketplaceBlock(config, marketplaceName, marketplaceSource);
for (const pluginName of pluginNames) {
config = ensurePluginEnabled(config, `${pluginName}@${marketplaceName}`);
}
@@ -23,6 +36,14 @@ export async function updateCodexConfig({ configPath, repoRoot, marketplaceName,
await writeFile(configPath, config.trimEnd() + "\n");
}
function defaultMarketplaceSource(marketplaceName, repoRoot) {
if (marketplaceName === "sisyphuslabs") return LAZYCODEX_MARKETPLACE_SOURCE;
return {
sourceType: "local",
source: repoRoot,
};
}
function removeStaleMarketplacePluginBlocks(config, marketplaceName, keepPluginNames) {
return removeTomlSections(config, (header) => {
const pluginKey = parseQuotedPluginHeader(header);
@@ -54,19 +75,19 @@ function ensureFeatureEnabled(config, featureName) {
return replaceOrInsertSetting(config, section, featureName, "true");
}
function ensureMarketplaceBlock(config, marketplaceName, repoRoot) {
function ensureMarketplaceBlock(config, marketplaceName, source) {
const header = `marketplaces.${marketplaceName}`;
if (findTomlSection(config, header)) return config;
return appendBlock(
config,
[
`[${header}]`,
`last_updated = "${new Date().toISOString().replace(/\.\d{3}Z$/, "Z")}"`,
"source_type = \"local\"",
`source = ${JSON.stringify(repoRoot)}`,
"",
].join("\n"),
);
const block = [
`[${header}]`,
`last_updated = "${new Date().toISOString().replace(/\.\d{3}Z$/, "Z")}"`,
`source_type = ${JSON.stringify(source.sourceType)}`,
`source = ${JSON.stringify(source.source)}`,
source.ref === undefined ? null : `ref = ${JSON.stringify(source.ref)}`,
"",
].filter((line) => line !== null).join("\n");
const section = findTomlSection(config, header);
if (section) return config.slice(0, section.start) + block + config.slice(section.end);
return appendBlock(config, block);
}
function ensurePluginEnabled(config, pluginKey) {
+1 -1
View File
@@ -1,4 +1,4 @@
// Codex install module entry point. Implemented in subsequent commits.
// Hosts the TypeScript port of scripts/install-local.mjs invoked from the
// omodex CLI when the user passes `--codex=yes` to `bunx omo install`.
// omodex CLI when the user passes `--platform=codex` to `bunx omo install`.
export {}