{"_id":"@metaharness/host-claude-code","_rev":"5-ce2dcfcd66493629ec1bbaba2e63fba3","name":"@metaharness/host-claude-code","dist-tags":{"latest":"0.1.4"},"versions":{"0.1.0":{"name":"@metaharness/host-claude-code","version":"0.1.0","keywords":["agent-harness","claude-code","mcp","host-adapter","ruflo"],"license":"MIT","_id":"@metaharness/host-claude-code@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":"d94d991d98a5942f4e7c02e1833ac1a6a5c0312f","tarball":"https://registry.npmjs.org/@metaharness/host-claude-code/-/host-claude-code-0.1.0.tgz","fileCount":7,"integrity":"sha512-ZKrYpOZBfVgETHvF4c7yV41JSwdfZP/7YmkE/aT77Iz4M1pokaiLPI7frsY+wm6LNP92iRAlTcj81tiEB4VZng==","signatures":[{"sig":"MEYCIQCQy4sX57KbCOX+xWoRP9yC9jAatpzpk1K4Wd+FhmQC1wIhAKc891LSuwZBzDE+r8f4Myr7nZzX8wvK8MdnONYsIhq1","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":10068},"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-claude-code"},"_npmVersion":"11.10.0","description":"Claude Code host adapter for agent-harness-generator (MCP + hooks + .claude/settings.json)","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-claude-code_0.1.0_1781486104557_0.18010152802476664","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"name":"@metaharness/host-claude-code","version":"0.1.1","keywords":["agent-harness","claude-code","mcp","host-adapter","ruflo"],"license":"MIT","_id":"@metaharness/host-claude-code@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":"4954a652b791b8d907c5b8ad9c73829d54d3bfbb","tarball":"https://registry.npmjs.org/@metaharness/host-claude-code/-/host-claude-code-0.1.1.tgz","fileCount":7,"integrity":"sha512-P3qpOdMlWYsZFqNF/UiyFcV18wnvzH9lxzwa+OuzqQ+vUO0+SObRS5uQuSP5XQ5SfaA5pgC7j4mz6PHMlNGFpg==","signatures":[{"sig":"MEUCIQC+eyLKT45cLl8Ih4W2HvZsFYGI0TtYg5o0orQCLdhegQIgBmtG5iIdl4w2+J2xqJUtDqGKk3aU1GPPscT8bJ46k58=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":16907},"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-claude-code"},"_npmVersion":"10.9.7","description":"Claude Code host adapter for agent-harness-generator (MCP + hooks + .claude/settings.json)","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-claude-code_0.1.1_1781637567419_0.015036516754621143","host":"s3://npm-registry-packages-npm-production"}},"0.1.2":{"name":"@metaharness/host-claude-code","version":"0.1.2","keywords":["agent-harness","claude-code","mcp","host-adapter","ruflo"],"license":"MIT","_id":"@metaharness/host-claude-code@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":"ed9517cdc11ad4085eb51a5746f651a28d8b0b9c","tarball":"https://registry.npmjs.org/@metaharness/host-claude-code/-/host-claude-code-0.1.2.tgz","fileCount":7,"integrity":"sha512-bKSPNfsgiC8iCTB6s+b5KeWrHgnAtxq04HbUudZuy4ixsSJ2AOrucSLzXuOSD4FHJJ6a1DD1/FsfGjiad8aa5Q==","signatures":[{"sig":"MEUCIA2AAlrWOGKa+QP06qJiGeMENDPNdOQ2UjeG4N9hzZ+WAiEA+JxH12cu8pKMJYi8jgxhu2FSxs5rSzDuER/nNiOFUi4=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":16908},"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-claude-code"},"_npmVersion":"10.9.7","description":"Claude Code host adapter for agent-harness-generator (MCP + hooks + .claude/settings.json)","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-claude-code_0.1.2_1781736099179_0.4879981996644003","host":"s3://npm-registry-packages-npm-production"}},"0.1.3":{"name":"@metaharness/host-claude-code","version":"0.1.3","keywords":["agent-harness","claude-code","mcp","host-adapter","ruflo"],"license":"MIT","_id":"@metaharness/host-claude-code@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":"bc06f74926865021d9e8fdcb282c09cc888d57f0","tarball":"https://registry.npmjs.org/@metaharness/host-claude-code/-/host-claude-code-0.1.3.tgz","fileCount":7,"integrity":"sha512-dHIiNhttA9XHIIgVkPz94O7e31IWZEfH5laCxdFRmH2FjGtbW7TEomWmlcU0WX4vNAVgrrha5jyCh7VoNZvwaw==","signatures":[{"sig":"MEUCIDjtZgrKgKy2CgoQ42s/Y2xnQleHt9xSP1dG1OzL0dfGAiEAq4h+kjkE0vfr8/y6H5DK1KM6A+qNb3bi39KFMknwX7Y=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"sig":"MEUCIQDtNya0pUXiUOpMgW8ccNfofPMsVLyat2aHnGWZ28fxWgIgO+CC3+rzoQEMORmgk3M9Prw3f88CX8jfZibdcTzc+QE=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":22819},"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-claude-code"},"_npmVersion":"10.9.8","description":"Claude Code host adapter for agent-harness-generator (MCP + hooks + .claude/settings.json)","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-claude-code_0.1.3_1790437796999_0.992783031078111","host":"s3://npm-registry-packages-npm-production"}},"0.1.4":{"_id":"@metaharness/host-claude-code@0.1.4","bugs":{"url":"https://github.com/ruvnet/metaharness/issues"},"dist":{"shasum":"42dd4b64a69c2440f7c3ef82ca8a42a94f00b781","tarball":"https://registry.npmjs.org/@metaharness/host-claude-code/-/host-claude-code-0.1.4.tgz","fileCount":7,"integrity":"sha512-rC04JjFsLv/JkjtYppDSAmuMWle2SYd+kTq+8njlifNf/sqfyugMJxln05prIjtIVww1Bms5jZ561wKlquoR1g==","signatures":[{"sig":"MEUCIQDBkrjyYBEkypgUcVpBr0IqrGp/t4Ed/HadmRKz25E5gwIgcWeZhcfK5Ukd0rnhf2oC4QuswejMeUwOHESVwL75X3s=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQDmagItqAZn1ErOByMkmzMU8bcR27D5OFvXzhjEX3PydQIgfIvnoiK6rNJneHITekVv4IzVxguNC01byr4UCK9U+GQ="}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@metaharness%2fhost-claude-code@0.1.4","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":24751},"main":"./dist/index.js","name":"@metaharness/host-claude-code","type":"module","_from":"file:/home/runner/work/metaharness/metaharness/dist-release/metaharness-host-claude-code-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","claude-code","anthropic","mcp","model-context-protocol","host-adapter","hooks","claude-code-plugin"],"_resolved":"/home/runner/work/metaharness/metaharness/dist-release/metaharness-host-claude-code-0.1.4.tgz","_integrity":"sha512-rC04JjFsLv/JkjtYppDSAmuMWle2SYd+kTq+8njlifNf/sqfyugMJxln05prIjtIVww1Bms5jZ561wKlquoR1g==","repository":{"url":"git+https://github.com/ruvnet/metaharness.git","type":"git","directory":"packages/host-claude-code"},"_npmVersion":"10.9.9","description":"Claude Code host adapter for MetaHarness: turns a harness spec into .claude/settings.json, hooks and MCP server wiring.","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-claude-code_0.1.4_1794208822398_0.5616544007236285"}}},"time":{"created":"2026-06-15T01:15:04.369Z","modified":"2026-11-09T07:20:22.910Z","0.1.0":"2026-06-15T01:15:04.708Z","0.1.1":"2026-06-16T19:19:27.653Z","0.1.2":"2026-06-17T22:41:39.334Z","0.1.3":"2026-09-26T15:49:57.084Z","0.1.4":"2026-11-09T07:20:22.502Z"},"bugs":{"url":"https://github.com/ruvnet/metaharness/issues"},"license":"MIT","homepage":"https://ruv.io","keywords":["metaharness","agent-harness","claude-code","anthropic","mcp","model-context-protocol","host-adapter","hooks","claude-code-plugin"],"repository":{"url":"git+https://github.com/ruvnet/metaharness.git","type":"git","directory":"packages/host-claude-code"},"description":"Claude Code host adapter for MetaHarness: turns a harness spec into .claude/settings.json, hooks and MCP server wiring.","maintainers":[{"name":"ruvnet","email":"ruv@ruv.net"}],"readme":"# @metaharness/host-claude-code\n\n<!-- ruv-seo:start (ADR-356) -->\n![@metaharness/host-claude-code flow: HarnessSpec, adapter generateConfig, .claude settings and hooks, MCP server wiring, Claude Code loads the harness](https://raw.githubusercontent.com/ruvnet/metaharness/main/docs/assets/readme/host-claude-code.svg)\n\n`@metaharness/host-claude-code` turns a MetaHarness harness spec into the files Claude Code reads: `.claude/settings.json` with hooks, and an `install-mcp.sh` that registers the harness's MCP servers.\n\n**Supported environments:** Node.js 20+ on Linux, macOS and Windows. ESM only (`import`, not `require`). Depends on `@metaharness/kernel` for the `HostAdapter` contract.\n\n## Quickstart\n\n```bash\nmkdir demo && cd demo && npm init -y >/dev/null\nnpm install @metaharness/host-claude-code\ncat > quickstart.mjs <<'JS'\nimport adapter from '@metaharness/host-claude-code';\n\nconst files = adapter.generateConfig({\n  name: 'my-bot',\n  mcpServers: [{ name: 'my-bot', command: ['npx', '-y', 'my-bot', 'mcp'] }],\n  hooks: [{ event: 'PreToolUse', matcher: 'Bash(rm *)', handler: 'block-rm' }],\n});\nconsole.log(Object.keys(files));\nconst settings = JSON.parse(files['.claude/settings.json']);\nconsole.log('hook events:', Object.keys(settings.hooks ?? {}));\nJS\nnode quickstart.mjs\n```\n\nExpected output:\n\n```text\n[ '.claude/settings.json', 'install-mcp.sh' ]\nhook events: [ 'PreToolUse' ]\n```\n\n**Where it fits:** `npx metaharness new <name> --host claude-code` (the default host) adds this package as a dependency of the generated harness, and the generated `__tests__/smoke.test.ts` imports it.\n\n**Next:** [`@metaharness/claude-code`](https://www.npmjs.com/package/@metaharness/claude-code) — a one-command Claude Code workspace and plugin scaffold built on this adapter.\n<!-- ruv-seo:end -->\n\n## Reference\n\n[Claude Code](https://code.claude.com/docs/en/mcp) host adapter for the [agent-harness-generator](https://github.com/ruvnet/agent-harness-generator) project.\n\nGenerates the host-specific config a Claude Code-targeted harness needs:\n\n- `.claude/settings.json` with hooks (event → matcher → handler[] three-level shape, 5 handler types)\n- `claude mcp add` command lines for the harness's MCP servers\n- Permission allow/deny lists\n\n## Usage\n\n```js\nimport adapter from '@metaharness/host-claude-code';\n\nconst config = adapter.generateConfig({\n  name: 'my-bot',\n  mcpServers: [{ name: 'my-bot', command: ['npx', '-y', 'my-bot', 'mcp'] }],\n  hooks: [{ event: 'PreToolUse', matcher: 'Bash(rm *)', handler: 'block-rm' }],\n});\n// config['.claude/settings.json'] = '<JSON>'\n// config['install-mcp.sh'] = '<shell commands>'\n```\n\n## Notes\n\n- Claude Code's settings have three scopes: `~/.claude/settings.json` (user), `.claude/settings.json` (project, committed), `.claude/settings.local.json` (project, gitignored). This adapter generates the project-committed form.\n- Hooks emit JSON to stdout to influence the model (`hookSpecificOutput.permissionDecision`, `additionalContext`, `updatedInput`).\n\n## License\n\nMIT\n","readmeFilename":"README.md"}