{"_id":"@metaharness/host-codex","_rev":"5-f882b48624522a7bd021498d2d6662cb","name":"@metaharness/host-codex","dist-tags":{"latest":"0.1.4"},"versions":{"0.1.0":{"name":"@metaharness/host-codex","version":"0.1.0","keywords":["agent-harness","openai-codex","codex","mcp","host-adapter","ruflo"],"license":"MIT","_id":"@metaharness/host-codex@0.1.0","maintainers":[{"name":"ruvnet","email":"ruv@ruv.net"}],"homepage":"https://github.com/ruvnet/agent-harness-generator","bugs":{"url":"https://github.com/ruvnet/agent-harness-generator/issues"},"dist":{"shasum":"8c82286e81a91a3913b2474f5cd132b8537e1cdc","tarball":"https://registry.npmjs.org/@metaharness/host-codex/-/host-codex-0.1.0.tgz","fileCount":7,"integrity":"sha512-iC2VyJwagbj/NhPdO2ExUsR0qYR6WPxrmFvi+xNP5+tICCm+q/bxXFBvftv62rTZ4Jk/ef2/N7VQXF0E8BXNuw==","signatures":[{"sig":"MEUCIQC4h6OHxFohrs/CUx4CS74BmoJpyz2L0iy7NH23LsNgPQIgdLEX+127Zc/eN5Z0wCDLkxwjRASe1uY+6n3s2DFQ4pM=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":10668},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":">=20.0.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"5b81b587a95a11537dac220392b949e14934e873","scripts":{"lint":"tsc --noEmit","test":"vitest run --passWithNoTests","build":"tsc"},"_npmUser":{"name":"ruvnet","email":"ruv@ruv.net"},"repository":{"url":"git+https://github.com/ruvnet/agent-harness-generator.git","type":"git","directory":"packages/host-codex"},"_npmVersion":"11.10.0","description":"OpenAI Codex CLI host adapter for agent-harness-generator (MCP via ~/.codex/config.toml)","directories":{},"_nodeVersion":"24.12.0","dependencies":{"@metaharness/kernel":"0.1.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"vitest":"^2.0.0","typescript":"^5.4.0","@types/node":"^20.0.0"},"_npmOperationalInternal":{"tmp":"tmp/host-codex_0.1.0_1781486108546_0.6883360608989757","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"name":"@metaharness/host-codex","version":"0.1.1","keywords":["agent-harness","openai-codex","codex","mcp","host-adapter","ruflo"],"license":"MIT","_id":"@metaharness/host-codex@0.1.1","maintainers":[{"name":"ruvnet","email":"ruv@ruv.net"}],"homepage":"https://github.com/ruvnet/agent-harness-generator","bugs":{"url":"https://github.com/ruvnet/agent-harness-generator/issues"},"dist":{"shasum":"740499d58b40cc6451ea86a99c5c22825eb108de","tarball":"https://registry.npmjs.org/@metaharness/host-codex/-/host-codex-0.1.1.tgz","fileCount":7,"integrity":"sha512-H+jcKZbBxNwWurxWYlWys9W5m1eHxJxx4oc3YVIYcEWO9DHJyT/xjyYXsoopRU19w37420wBPRrqf2XohQFvWA==","signatures":[{"sig":"MEQCIDVqdf0Oups57b1zTB6C98Xw//rZ5bRG7zwuoe6JPMeLAiBgDez96IzVdGbAUlnOMLONsv1nQ0dK+xB2mFi3vZm7FQ==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":12936},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":">=20.0.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"db1af4134a9c8330bacaa1a53cba2a21d28b78ad","scripts":{"lint":"tsc --noEmit","test":"vitest run --passWithNoTests","build":"tsc"},"_npmUser":{"name":"ruvnet","email":"ruv@ruv.net"},"repository":{"url":"git+https://github.com/ruvnet/agent-harness-generator.git","type":"git","directory":"packages/host-codex"},"_npmVersion":"10.9.7","description":"OpenAI Codex CLI host adapter for agent-harness-generator (MCP via ~/.codex/config.toml)","directories":{},"_nodeVersion":"22.22.2","dependencies":{"@metaharness/kernel":"0.1.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"vitest":"^2.0.0","typescript":"^5.4.0","@types/node":"^20.0.0"},"_npmOperationalInternal":{"tmp":"tmp/host-codex_0.1.1_1781637569046_0.6857593483789461","host":"s3://npm-registry-packages-npm-production"}},"0.1.2":{"name":"@metaharness/host-codex","version":"0.1.2","keywords":["agent-harness","openai-codex","codex","mcp","host-adapter","ruflo"],"license":"MIT","_id":"@metaharness/host-codex@0.1.2","maintainers":[{"name":"ruvnet","email":"ruv@ruv.net"}],"homepage":"https://github.com/ruvnet/agent-harness-generator","bugs":{"url":"https://github.com/ruvnet/agent-harness-generator/issues"},"dist":{"shasum":"618d28d414752052ebff8569ef1aba61f6e8492d","tarball":"https://registry.npmjs.org/@metaharness/host-codex/-/host-codex-0.1.2.tgz","fileCount":7,"integrity":"sha512-P3BvwtIBFYnWaD3Vcm5oTcAifjshhg8HIfIog/251oWOoixph0ll9vkyguVtTa8AiBI/ZHhcUBecYBPT/iH/Dw==","signatures":[{"sig":"MEUCIBh7hvGvMe+tFpV2Ydq4KW1U3u4eawDLtK+r+KmkM/sEAiEAzKHQ2PnH4d8SH9B/TGYizkp7DBE0sJo2nxfgIYGwP68=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":12937},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":">=20.0.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"82b3ce543ca7807e8bf95115563e81a601fc0738","scripts":{"lint":"tsc --noEmit","test":"vitest run --passWithNoTests","build":"tsc"},"_npmUser":{"name":"ruvnet","email":"ruv@ruv.net"},"repository":{"url":"git+https://github.com/ruvnet/agent-harness-generator.git","type":"git","directory":"packages/host-codex"},"_npmVersion":"10.9.7","description":"OpenAI Codex CLI host adapter for agent-harness-generator (MCP via ~/.codex/config.toml)","directories":{},"_nodeVersion":"22.22.2","dependencies":{"@metaharness/kernel":"^0.1.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"vitest":"^2.0.0","typescript":"^5.4.0","@types/node":"^20.0.0"},"_npmOperationalInternal":{"tmp":"tmp/host-codex_0.1.2_1781736100991_0.4915532644524021","host":"s3://npm-registry-packages-npm-production"}},"0.1.3":{"name":"@metaharness/host-codex","version":"0.1.3","keywords":["agent-harness","openai-codex","codex","mcp","host-adapter","ruflo"],"license":"MIT","_id":"@metaharness/host-codex@0.1.3","maintainers":[{"name":"ruvnet","email":"ruv@ruv.net"}],"homepage":"https://github.com/ruvnet/agent-harness-generator","bugs":{"url":"https://github.com/ruvnet/agent-harness-generator/issues"},"dist":{"shasum":"1e21e443364a0af04a6cf3565f0fd8aa7957cc50","tarball":"https://registry.npmjs.org/@metaharness/host-codex/-/host-codex-0.1.3.tgz","fileCount":7,"integrity":"sha512-U5CBQK+uRnqcRs/fN/H7edFYAt9n5L8X3ErYB+AUjoejtcp2TvjOUTuUCTVyXWoUMinGXhw4E/6Qc9Vo1GXfVA==","signatures":[{"sig":"MEYCIQCHzEPBWpBOf2VthlQcKWIexh7G4dT9VPH+8MU682SpTAIhANuTRRl2YVCsdBpJnet31ZNS9dnbtn1ef+XxmG5gs3uP","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"sig":"MEUCIG55adnMvbuzi+kBvArWsjvXJB/hzY8/2n30YSGBRuMgAiEA850Y2UgwJb2WCrRYhISdeL4F2LaLAd2qG9sbHYcFuwI=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":16667},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":">=20.0.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"scripts":{"lint":"tsc --noEmit","test":"vitest run --passWithNoTests","build":"tsc"},"_npmUser":{"name":"ruvnet","email":"ruv@ruv.net"},"repository":{"url":"git+https://github.com/ruvnet/agent-harness-generator.git","type":"git","directory":"packages/host-codex"},"_npmVersion":"10.9.8","description":"OpenAI Codex CLI host adapter for agent-harness-generator (MCP via ~/.codex/config.toml)","directories":{},"_nodeVersion":"22.23.2","dependencies":{"@metaharness/kernel":"^0.1.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"vitest":"^2.0.0","typescript":"^5.4.0","@types/node":"^20.0.0"},"_npmOperationalInternal":{"tmp":"tmp/host-codex_0.1.3_1790437798219_0.48313399974365234","host":"s3://npm-registry-packages-npm-production"}},"0.1.4":{"_id":"@metaharness/host-codex@0.1.4","bugs":{"url":"https://github.com/ruvnet/metaharness/issues"},"dist":{"shasum":"72e7cae336c4e7e3bc347f657dcb0d968861ffa2","tarball":"https://registry.npmjs.org/@metaharness/host-codex/-/host-codex-0.1.4.tgz","fileCount":7,"integrity":"sha512-KSZSKM+TRaPUwLa0iXYD3lT0ADM8O4mMqijVqqnVLz4vcGric6j+FBITz0rCRqKBEz9csuWd8mXWUT3MFU+15g==","signatures":[{"sig":"MEYCIQCAzFKAGtB2RRpGs+QYqhhDSuyMbFjKQMith85xrLBh4QIhAJm7sKUFXUe/0BvwosI7G1I4LZL2Z2bg/tl4qgW+tV3c","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIBecPYkPWPqOBN/9OcqtmDqtRcKVX3wPJ4E/YAnOdh8aAiEA9Fn7mabQrftY9JwnDU8QxavvrGvsEzFTA/HUxiuphro="}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@metaharness%2fhost-codex@0.1.4","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":18333},"main":"./dist/index.js","name":"@metaharness/host-codex","type":"module","_from":"file:/home/runner/work/metaharness/metaharness/dist-release/metaharness-host-codex-0.1.4.tgz","types":"./dist/index.d.ts","engines":{"node":">=20.0.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"license":"MIT","scripts":{"lint":"tsc --noEmit","test":"vitest run --passWithNoTests","build":"tsc"},"version":"0.1.4","_npmUser":{"name":"ruvnet","email":"ruv@ruv.net"},"homepage":"https://ruv.io","keywords":["metaharness","agent-harness","openai-codex","codex","codex-cli","mcp","model-context-protocol","host-adapter"],"_resolved":"/home/runner/work/metaharness/metaharness/dist-release/metaharness-host-codex-0.1.4.tgz","_integrity":"sha512-KSZSKM+TRaPUwLa0iXYD3lT0ADM8O4mMqijVqqnVLz4vcGric6j+FBITz0rCRqKBEz9csuWd8mXWUT3MFU+15g==","repository":{"url":"git+https://github.com/ruvnet/metaharness.git","type":"git","directory":"packages/host-codex"},"_npmVersion":"10.9.9","description":"OpenAI Codex CLI host adapter for MetaHarness: writes the MCP server entry for ~/.codex/config.toml from a harness spec.","directories":{},"maintainers":[{"name":"ruvnet","email":"ruv@ruv.net"}],"_nodeVersion":"22.23.4","dependencies":{"@metaharness/kernel":"^0.1.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"vitest":"^4.1.12","typescript":"^5.4.0","@types/node":"^20.0.0"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/host-codex_0.1.4_1794227141328_0.48762373737998144"}}},"time":{"created":"2026-06-15T01:15:08.413Z","modified":"2026-11-09T12:25:41.837Z","0.1.0":"2026-06-15T01:15:08.688Z","0.1.1":"2026-06-16T19:19:29.171Z","0.1.2":"2026-06-17T22:41:41.182Z","0.1.3":"2026-09-26T15:49:58.305Z","0.1.4":"2026-11-09T12:25:41.422Z"},"bugs":{"url":"https://github.com/ruvnet/metaharness/issues"},"license":"MIT","homepage":"https://ruv.io","keywords":["metaharness","agent-harness","openai-codex","codex","codex-cli","mcp","model-context-protocol","host-adapter"],"repository":{"url":"git+https://github.com/ruvnet/metaharness.git","type":"git","directory":"packages/host-codex"},"description":"OpenAI Codex CLI host adapter for MetaHarness: writes the MCP server entry for ~/.codex/config.toml from a harness spec.","maintainers":[{"name":"ruvnet","email":"ruv@ruv.net"}],"readme":"# @metaharness/host-codex\n\n<!-- ruv-seo:start (ADR-356) -->\nTurns a MetaHarness harness spec into the files the OpenAI Codex CLI reads: an MCP server entry for `~/.codex/config.toml`, the matching `codex mcp add` commands, and an `AGENTS.md`.\n\n**Supported environments:** Node.js 20+ on Linux, macOS and Windows. ESM only (`import`, not `require`). Pure JavaScript with no native build step; `@metaharness/kernel` is used only for its `HarnessSpec` and `HostAdapter` types.\n\n## Quickstart\n\n```bash\nnpm install @metaharness/host-codex\n```\n\nSave this as `quickstart.mjs` and run `node quickstart.mjs`:\n\n```js\nimport adapter from '@metaharness/host-codex';\n\nconst files = adapter.generateConfig({\n  name: 'my-bot',\n  description: 'demo harness',\n  mcpServers: [{ name: 'my-bot', command: ['node', './bin/mcp.js'] }],\n});\nconsole.log(`host: ${adapter.name}`);\nfor (const [path, body] of Object.entries(files)) {\n  console.log(`${path}  (${body.split('\\n').length} lines)`);\n}\n```\n\nExpected output:\n\n```text\nhost: codex\n.codex/config.toml  (4 lines)\ninstall-mcp.sh  (2 lines)\nAGENTS.md  (4 lines)\n```\n\n**Next:** [`@metaharness/codex`](https://www.npmjs.com/package/@metaharness/codex) — scaffold a complete, doctor-checked harness for this host in one command (`npx @metaharness/codex my-bot`).\n\n**Where it fits:** `npx metaharness new <name> --host codex` adds this package as a dependency of the generated harness, and the generated `__tests__/smoke.test.ts` imports it, so `npm test` in that harness fails if the adapter is missing or broken.\n<!-- ruv-seo:end -->\n\n## Reference\n\n[OpenAI Codex CLI](https://developers.openai.com/codex) host adapter for the [agent-harness-generator](https://github.com/ruvnet/agent-harness-generator) project.\n\nGenerates the host-specific config a Codex-targeted harness needs:\n\n- `~/.codex/config.toml` with `[mcp_servers.<name>]` tables (note: **TOML, not JSON**)\n- `codex mcp add` command lines\n\n## Usage\n\n```js\nimport adapter from '@metaharness/host-codex';\n\nconst config = adapter.generateConfig({\n  name: 'my-bot',\n  mcpServers: [{ name: 'my-bot', command: ['npx', '-y', 'my-bot', 'mcp'] }],\n});\n// config['.codex/config.toml'] = '<TOML>'\n// config['install-mcp.sh'] = '<shell commands>'\n```\n\n## Quirks vs Claude Code (call these out for your users)\n\n1. **TOML not JSON.** Codex config is TOML.\n2. **Trusted-project gate.** Project-scoped `.codex/config.toml` is only honored after the project is marked trusted — known footgun ([codex#3441](https://github.com/openai/codex/issues/3441)).\n3. **No first-class hooks system.** Codex has no `PreToolUse`/`PostToolUse` analog. Generated harnesses approximate lifecycle events via MCP tool calls.\n\n## License\n\nMIT\n","readmeFilename":"README.md"}