@mcpbox/mcpbox-claude 0.1.9 → 0.1.10

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.
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "mcpbox-claude",
3
3
  "description": "MCPBox × Claude Code glue. Drives the mcpbox MCP server (daruma tracker + full MeiSei pipeline torii→…→fujin→daruma). Ships /mcpbox:{tasks,plan,next,mine,status,close,sync,capture,doctor,mode} and pipeline commands, SessionStart/Stop/UserPromptSubmit hooks, and a managed CLAUDE.md policy that makes mcpbox the default tracker AND pipeline substrate.",
4
- "version": "0.1.9",
4
+ "version": "0.1.10",
5
5
  "author": {
6
6
  "name": "tupical"
7
7
  },
package/lib/codex.mjs CHANGED
@@ -66,8 +66,25 @@ export function removeCodexPolicy({ projectDir } = {}) {
66
66
 
67
67
  // [mcp_servers.mcpbox] entry in the global ~/.codex/config.toml.
68
68
  // `configPath` overrides the target (used by tests).
69
- export function installCodexMcp({ configPath } = {}) {
70
- return installManagedBlock({ target: codexConfigPath(configPath), begin: TOML_BEGIN, end: TOML_END, block: TOML_BLOCK });
69
+ export async function installCodexMcp({ configPath } = {}) {
70
+ const target = codexConfigPath(configPath);
71
+ // Someone else may already declare the server — oh-my-claudecode keeps its own
72
+ // "OMC MANAGED MCP REGISTRY" block, for one. Appending ours next to it makes
73
+ // `[mcp_servers.mcpbox]` a duplicate key, which is a TOML parse error: codex
74
+ // then fails to read its whole config. An entry that already points at us is
75
+ // the entry we wanted, so leave it alone.
76
+ let existing = "";
77
+ try {
78
+ existing = await fs.readFile(target, "utf8");
79
+ } catch { /* absent → install */ }
80
+ const outsideOurBlock = existing.replace(
81
+ new RegExp(`${TOML_BEGIN}[\\s\\S]*?${TOML_END}\\n?`, "g"),
82
+ "",
83
+ );
84
+ if (/^\s*\[mcp_servers\.mcpbox\]/m.test(outsideOurBlock)) {
85
+ return { action: "unchanged", path: target, reason: "already declared outside the managed block" };
86
+ }
87
+ return installManagedBlock({ target, begin: TOML_BEGIN, end: TOML_END, block: TOML_BLOCK });
71
88
  }
72
89
 
73
90
  export function removeCodexMcp({ configPath } = {}) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mcpbox/mcpbox-claude",
3
- "version": "0.1.9",
3
+ "version": "0.1.10",
4
4
  "description": "MCPBox agent harness for Claude Code: managed policy (daruma tracker + full pipeline), hooks, and slash commands over the single mcpbox MCP server.",
5
5
  "type": "module",
6
6
  "publishConfig": {