oh-my-customcodex 0.3.7 → 0.3.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -29,7 +29,8 @@ oh-my-customcodex is built on two ideas:
29
29
 
30
30
  | Compile Concept | oh-my-customcodex |
31
31
  |----------------|-----------------|
32
- | Source code | `.agents/skills/` — reusable knowledge and workflows |
32
+ | Source repository authoring | `.codex/skills/` — skill definitions maintained by this package itself |
33
+ | Installed runtime skills | `.agents/skills/` — reusable knowledge and workflows deployed into managed projects |
33
34
  | Build artifacts | `.codex/agents/` — executable specialists assembled from skills |
34
35
  | Compiler | `mgr-sauron` (R017) — structural verification and integrity |
35
36
  | Spec | `.codex/rules/` — constraints and build rules |
@@ -270,21 +271,33 @@ omcustomcodex serve-stop # Stop Web UI
270
271
 
271
272
  ## Project Structure
272
273
 
274
+ ### Managed project runtime
275
+
273
276
  ```
274
277
  your-project/
275
278
  ├── AGENTS.md # Entry point
276
279
  ├── .codex/
277
280
  │ ├── agents/ # 48 agent definitions
278
- │ ├── skills/ # 112 skill modules
279
281
  │ ├── rules/ # 22 governance rules (R000-R021)
280
282
  │ ├── hooks/ # 15 lifecycle hook scripts
281
283
  │ ├── schemas/ # Tool input validation schemas
282
284
  │ ├── specs/ # Extracted canonical specs
283
285
  │ ├── contexts/ # 4 shared context files
284
286
  │ └── ontology/ # Knowledge graph for RAG
287
+ ├── .agents/
288
+ │ └── skills/ # 112 installed skill modules
285
289
  └── guides/ # 40 reference documents
286
290
  ```
287
291
 
292
+ ### Source Repository And Compatibility Surfaces
293
+
294
+ - This repository keeps package-authoring skills in `.codex/skills/`; that is a source-repo surface, not the installed project skill path.
295
+ - Installed projects use `.agents/skills/` for managed skills and `.codex/agents/*.md` for managed agents.
296
+ - `templates/.claude/` and `templates/CLAUDE.md*` remain upstream-compatible template inputs; they are not the active Codex runtime surface after install.
297
+ - `.codex/hooks/` is the OMX-managed hook script layer used by this package. Native Codex `hooks.json` discovery is a separate contract and is not generated by `omcustomcodex` today.
298
+ - Native Codex custom subagents in `.codex/agents/*.toml` may coexist, but `omcustomcodex` currently manages `.codex/agents/*.md` as its own agent contract.
299
+ - Project-scoped MCP configuration lives in `.codex/config.toml`, and the managed project registry lives in `~/.oh-my-customcodex/projects.json`.
300
+
288
301
  ---
289
302
 
290
303
  ## External Tool Integrations
package/dist/cli/index.js CHANGED
@@ -3091,7 +3091,7 @@ var init_package = __esm(() => {
3091
3091
  workspaces: [
3092
3092
  "packages/*"
3093
3093
  ],
3094
- version: "0.3.7",
3094
+ version: "0.3.9",
3095
3095
  description: "Batteries-included agent harness on top of GPT Codex + OMX",
3096
3096
  type: "module",
3097
3097
  bin: {
@@ -26742,7 +26742,7 @@ function installCodex(deps = defaultDeps) {
26742
26742
  if (os === "darwin") {
26743
26743
  try {
26744
26744
  info("codex.installing_brew");
26745
- deps.exec("brew install openai-codex", {
26745
+ deps.exec("brew install --cask codex", {
26746
26746
  stdio: "inherit",
26747
26747
  timeout: 120000
26748
26748
  });
@@ -28614,11 +28614,28 @@ init_fs();
28614
28614
  init_logger();
28615
28615
  init_layout();
28616
28616
  import { execSync as execSync6 } from "node:child_process";
28617
- import { writeFile as writeFile2 } from "node:fs/promises";
28617
+ import { readFile as readFile3, writeFile as writeFile2 } from "node:fs/promises";
28618
28618
  import { join as join8 } from "node:path";
28619
+ var PROJECT_CONFIG_DIR = ".codex";
28620
+ var PROJECT_CONFIG_FILE = "config.toml";
28621
+ var ONTOLOGY_SERVER_TABLE = "[mcp_servers.ontology-rag]";
28622
+ function getProjectMCPConfigPath(targetDir) {
28623
+ return join8(targetDir, PROJECT_CONFIG_DIR, PROJECT_CONFIG_FILE);
28624
+ }
28625
+ function renderOntologyMCPBlock(ontologyDir) {
28626
+ return `${ONTOLOGY_SERVER_TABLE}
28627
+ command = ".venv/bin/python"
28628
+ args = ["-m", "ontology_rag.mcp_server"]
28629
+
28630
+ [mcp_servers.ontology-rag.env]
28631
+ ONTOLOGY_DIR = "${ontologyDir}"
28632
+ `;
28633
+ }
28634
+ function hasOntologyMCPConfig(content) {
28635
+ return content.includes(ONTOLOGY_SERVER_TABLE);
28636
+ }
28619
28637
  async function generateMCPConfig(targetDir) {
28620
28638
  const layout = getProviderLayout();
28621
- const mcpConfigPath = join8(targetDir, ".mcp.json");
28622
28639
  const ontologyDir = join8(layout.rootDir, "ontology");
28623
28640
  const ontologyExists = await fileExists(join8(targetDir, ontologyDir));
28624
28641
  if (!ontologyExists) {
@@ -28628,7 +28645,7 @@ async function generateMCPConfig(targetDir) {
28628
28645
  execSync6("uv --version", { stdio: "pipe" });
28629
28646
  } catch {
28630
28647
  warn("uv (Python package manager) not found. Install it with: curl -LsSf https://astral.sh/uv/install.sh | sh");
28631
- warn("Skipping ontology-rag MCP configuration. You can set it up manually later.");
28648
+ warn("Skipping ontology-rag MCP configuration in .codex/config.toml. You can set it up manually later.");
28632
28649
  return;
28633
28650
  }
28634
28651
  try {
@@ -28637,41 +28654,24 @@ async function generateMCPConfig(targetDir) {
28637
28654
  } catch (error2) {
28638
28655
  const msg = error2 instanceof Error ? error2.message : String(error2);
28639
28656
  warn(`Failed to setup ontology-rag: ${msg}`);
28640
- warn("You can configure the MCP server manually. See: https://github.com/baekenough/oh-my-customcodex/tree/develop/packages/ontology-rag");
28657
+ warn("You can configure the MCP server manually in .codex/config.toml. See: https://github.com/baekenough/oh-my-customcodex/tree/develop/packages/ontology-rag");
28641
28658
  return;
28642
28659
  }
28643
- const config = {
28644
- mcpServers: {
28645
- "ontology-rag": {
28646
- type: "stdio",
28647
- command: ".venv/bin/python",
28648
- args: ["-m", "ontology_rag.mcp_server"],
28649
- env: {
28650
- ONTOLOGY_DIR: ontologyDir
28651
- }
28652
- }
28653
- }
28654
- };
28655
- const existingConfigPath = mcpConfigPath;
28656
- if (await fileExists(existingConfigPath)) {
28657
- try {
28658
- const { readFile: readFile3 } = await import("node:fs/promises");
28659
- const existingContent = await readFile3(existingConfigPath, "utf-8");
28660
- const existing = JSON.parse(existingContent);
28661
- if (!existing.mcpServers?.["ontology-rag"]) {
28662
- existing.mcpServers = existing.mcpServers || {};
28663
- existing.mcpServers["ontology-rag"] = config.mcpServers["ontology-rag"];
28664
- await writeFile2(mcpConfigPath, `${JSON.stringify(existing, null, 2)}
28665
- `);
28666
- }
28667
- } catch {
28668
- await writeFile2(mcpConfigPath, `${JSON.stringify(config, null, 2)}
28669
- `);
28660
+ const configPath = getProjectMCPConfigPath(targetDir);
28661
+ await ensureDirectory(join8(targetDir, PROJECT_CONFIG_DIR));
28662
+ let existingContent = "";
28663
+ if (await fileExists(configPath)) {
28664
+ existingContent = await readFile3(configPath, "utf-8");
28665
+ if (hasOntologyMCPConfig(existingContent)) {
28666
+ info("ontology-rag MCP server already configured");
28667
+ return;
28670
28668
  }
28671
- } else {
28672
- await writeFile2(mcpConfigPath, `${JSON.stringify(config, null, 2)}
28673
- `);
28674
28669
  }
28670
+ const block = renderOntologyMCPBlock(ontologyDir);
28671
+ const nextContent = existingContent.trim() ? `${existingContent.trimEnd()}
28672
+
28673
+ ${block}` : block;
28674
+ await writeFile2(configPath, nextContent, "utf-8");
28675
28675
  info("ontology-rag MCP server configured successfully");
28676
28676
  }
28677
28677
  async function checkUvAvailable() {
@@ -30689,7 +30689,7 @@ import { join as join14 } from "node:path";
30689
30689
  // src/cli/serve.ts
30690
30690
  import { spawn } from "node:child_process";
30691
30691
  import { existsSync as existsSync3 } from "node:fs";
30692
- import { readFile as readFile3, unlink, writeFile as writeFile3 } from "node:fs/promises";
30692
+ import { readFile as readFile4, unlink, writeFile as writeFile3 } from "node:fs/promises";
30693
30693
  import { join as join13 } from "node:path";
30694
30694
  var DEFAULT_PORT = 4321;
30695
30695
  var PID_FILE = join13(process.env.HOME ?? "~", ".omcodex-serve.pid");
@@ -30709,7 +30709,7 @@ function buildServeEnv(port, projectRoot) {
30709
30709
  async function readPidFromKnownFiles() {
30710
30710
  for (const pidFile of [PID_FILE, LEGACY_PID_FILE]) {
30711
30711
  try {
30712
- const raw = await readFile3(pidFile, "utf-8");
30712
+ const raw = await readFile4(pidFile, "utf-8");
30713
30713
  const pid = Number(raw.trim());
30714
30714
  if (Number.isFinite(pid) && pid > 0) {
30715
30715
  return { pid, path: pidFile };
package/dist/index.js CHANGED
@@ -1381,7 +1381,7 @@ function installCodex(deps = defaultDeps) {
1381
1381
  if (os === "darwin") {
1382
1382
  try {
1383
1383
  info("codex.installing_brew");
1384
- deps.exec("brew install openai-codex", {
1384
+ deps.exec("brew install --cask codex", {
1385
1385
  stdio: "inherit",
1386
1386
  timeout: 120000
1387
1387
  });
@@ -2180,7 +2180,7 @@ var package_default = {
2180
2180
  workspaces: [
2181
2181
  "packages/*"
2182
2182
  ],
2183
- version: "0.3.7",
2183
+ version: "0.3.9",
2184
2184
  description: "Batteries-included agent harness on top of GPT Codex + OMX",
2185
2185
  type: "module",
2186
2186
  bin: {
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "workspaces": [
4
4
  "packages/*"
5
5
  ],
6
- "version": "0.3.7",
6
+ "version": "0.3.9",
7
7
  "description": "Batteries-included agent harness on top of GPT Codex + OMX",
8
8
  "type": "module",
9
9
  "bin": {
@@ -232,7 +232,7 @@ Skills persist output to `.codex/outputs/sessions/{YYYY-MM-DD}/{skill-name}-{HHm
232
232
 
233
233
  <!-- DETAIL: Artifact Output full spec
234
234
  **Format**: Metadata header with `skill`, `date`, `query` fields, followed by skill output content.
235
- **Rules**: Opt-in per skill, final subagent writes (R010 compliance), Skills create directory (mkdir -p), .codex/outputs/ is git-untracked, no indexing required.
235
+ **Rules**: Opt-in per skill, final subagent writes with a file-write API that creates missing parent directories (R010 compliance), do not pre-create session output directories with Bash, .codex/outputs/ is git-untracked, no indexing required.
236
236
  -->
237
237
 
238
238
  ## Separation of Concerns
@@ -122,7 +122,7 @@ If only PASS/INFO: proceed automatically.
122
122
  query: "{original user query}"
123
123
  ---
124
124
  ```
125
- The review agent creates the directory and writes the artifact before returning results (R010 compliance).
125
+ The review agent writes the artifact file before returning results; use a file-write API that creates missing parent directories instead of any Bash directory-creation pre-step (R010 compliance).
126
126
 
127
127
  ## Agent Selection
128
128
 
@@ -213,7 +213,7 @@ Convergence expected by round 3. Hard stop at round 30.
213
213
  query: "{original user query}"
214
214
  ---
215
215
  ```
216
- The agent creates the directory (`mkdir -p`) before writing. This is a subagent operation (R010 compliance).
216
+ The agent writes the artifact file using a file-write API that creates missing parent directories; do not run any Bash directory-creation pre-step for session outputs (R010 compliance).
217
217
  3. GitHub issue auto-created with findings
218
218
  4. Action items with effort estimates
219
219
 
@@ -129,10 +129,11 @@ project/
129
129
  +-- AGENTS.md # Entry point
130
130
  +-- .codex/
131
131
  | +-- agents/ # Subagent definitions (44 files)
132
- | +-- skills/ # Skills (74 directories)
133
132
  | +-- rules/ # Global rules (R000-R020)
134
133
  | +-- hooks/ # Hook scripts (security, validation, HUD)
135
134
  | +-- contexts/ # Context files (ecomode)
135
+ +-- .agents/
136
+ | +-- skills/ # Installed skills (74 directories)
136
137
  +-- guides/ # Reference docs (26 topics)
137
138
  ```
138
139
 
@@ -129,10 +129,11 @@ project/
129
129
  +-- AGENTS.md # 진입점
130
130
  +-- .codex/
131
131
  | +-- agents/ # 서브에이전트 정의 (44 파일)
132
- | +-- skills/ # 스킬 (74 디렉토리)
133
132
  | +-- rules/ # 전역 규칙 (R000-R020)
134
133
  | +-- hooks/ # 훅 스크립트 (보안, 검증, HUD)
135
134
  | +-- contexts/ # 컨텍스트 파일 (ecomode)
135
+ +-- .agents/
136
+ | +-- skills/ # 설치된 스킬 (74 디렉토리)
136
137
  +-- guides/ # 레퍼런스 문서 (26 토픽)
137
138
  ```
138
139
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  ## Overview
4
4
 
5
- Quality criteria for `.claude/agents/*.md` files. Adapted from ETH Zurich research on LLM-generated agent configurations, modified to fit oh-my-customcodex's "create, connect, use" philosophy.
5
+ Quality criteria for managed agent markdown files (the `omcustomcodex` runtime contract uses `.codex/agents/*.md`). Adapted from ETH Zurich research on LLM-generated agent configurations, modified to fit oh-my-customcodex's "create, connect, use" philosophy.
6
6
 
7
7
  ## Core Principle: LLM Generation + Human Verification
8
8
 
@@ -1,6 +1,6 @@
1
1
  {
2
- "version": "0.3.7",
3
- "lastUpdated": "2026-04-22T05:10:00.000Z",
2
+ "version": "0.3.9",
3
+ "lastUpdated": "2026-04-24T08:45:48.000Z",
4
4
  "components": [
5
5
  {
6
6
  "name": "rules",