{"_id":"@adhd/sox-host-registry","_rev":"6-0f76fe8807cfac192a3b433f143ce9f5","name":"@adhd/sox-host-registry","dist-tags":{"latest":"0.6.0"},"versions":{"0.2.0":{"name":"@adhd/sox-host-registry","version":"0.2.0","license":"MIT","_id":"@adhd/sox-host-registry@0.2.0","maintainers":[{"name":"pseudosky","email":"skywinston.sk@gmail.com"}],"dist":{"shasum":"7fa8600665968dcace254d55a4291f9817ebc8a4","tarball":"https://registry.npmjs.org/@adhd/sox-host-registry/-/sox-host-registry-0.2.0.tgz","fileCount":18,"integrity":"sha512-e69H8AdaoCciX+SsmzPaTAkt937jAp/dfjvBRFo+cahxsiTFAu9Ry2QEp7HQ4O9L25KwU73y4LcXL7uqM7fo7A==","signatures":[{"sig":"MEUCIQDy6tpOSBPum1FIZ2YZHRqu1lYU9P5XZ9WP4SwbUFSI/gIgHmtXZtPL2+6AHzcHN4QgpgwX1iQtNlsildLOWgDMFoI=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":60811},"main":"./dist/index.js","_from":"file:adhd-sox-host-registry-0.2.0.tgz","types":"./dist/index.d.ts","engines":{"node":">=20"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.js"}},"_npmUser":{"name":"pseudosky","email":"skywinston.sk@gmail.com"},"_resolved":"/private/var/folders/yg/cfczgtx54bzfh74lx2_mv0z80000gp/T/1945a95ba185489e10546fc69472ae59/adhd-sox-host-registry-0.2.0.tgz","_integrity":"sha512-e69H8AdaoCciX+SsmzPaTAkt937jAp/dfjvBRFo+cahxsiTFAu9Ry2QEp7HQ4O9L25KwU73y4LcXL7uqM7fo7A==","_npmVersion":"11.6.2","description":"Pluggable per-host registry: claude + codex modules with detect/scopePaths/surfaces","directories":{},"_nodeVersion":"24.11.1","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/sox-host-registry_0.2.0_1782451182010_0.19925317927363517","host":"s3://npm-registry-packages-npm-production"}},"0.3.0":{"name":"@adhd/sox-host-registry","version":"0.3.0","license":"MIT","_id":"@adhd/sox-host-registry@0.3.0","maintainers":[{"name":"pseudosky","email":"skywinston.sk@gmail.com"}],"dist":{"shasum":"325e85e838991a684884222f28f029fb0d0827a6","tarball":"https://registry.npmjs.org/@adhd/sox-host-registry/-/sox-host-registry-0.3.0.tgz","fileCount":22,"integrity":"sha512-ABUJJInfbBc23vR3QQo/Svf3QV/PopIm/42oBco/Rgjlkuddw99gsUyd3Ly3QMfjWR7tZgLODTgqQdY/d6Vc9A==","signatures":[{"sig":"MEQCIAU3Tvfl7Y6xt08OtfJ4KM5ipdsRlOjgDKmQF832RL4WAiA0Eul5yTGif0wdgYwut//4EYpPr5T4PH8wP7Iqn/e9SA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":86428},"main":"./dist/index.js","_from":"file:adhd-sox-host-registry-0.3.0.tgz","types":"./dist/index.d.ts","engines":{"node":">=20"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.js"}},"_npmUser":{"name":"pseudosky","email":"skywinston.sk@gmail.com"},"_resolved":"/private/var/folders/yg/cfczgtx54bzfh74lx2_mv0z80000gp/T/b9c39e0f8bfa28b02a5fa3411a7e91df/adhd-sox-host-registry-0.3.0.tgz","_integrity":"sha512-ABUJJInfbBc23vR3QQo/Svf3QV/PopIm/42oBco/Rgjlkuddw99gsUyd3Ly3QMfjWR7tZgLODTgqQdY/d6Vc9A==","_npmVersion":"11.6.2","description":"Pluggable per-host registry: claude + codex modules with detect/scopePaths/surfaces","directories":{},"_nodeVersion":"24.11.1","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/sox-host-registry_0.3.0_1786144737311_0.7092958106780214","host":"s3://npm-registry-packages-npm-production"}},"0.3.1":{"name":"@adhd/sox-host-registry","version":"0.3.1","license":"MIT","_id":"@adhd/sox-host-registry@0.3.1","maintainers":[{"name":"pseudosky","email":"skywinston.sk@gmail.com"}],"dist":{"shasum":"1e30acbe1a2f859a1da676af8b9ffe7ef8053dfd","tarball":"https://registry.npmjs.org/@adhd/sox-host-registry/-/sox-host-registry-0.3.1.tgz","fileCount":30,"integrity":"sha512-yrqdZQe7kLhQMPlUyb7KvjuNOal8HPnE+LdoC8HJAQRFncALcjoGPxYIiGk7xij06G/Qo4CW1gg5wi/Nzlae1w==","signatures":[{"sig":"MEYCIQCGZGdN/8bZMSeBvPkWFNk/RkW/dxKhtImjhr1cSS19AQIhAIA/bV/hZjcUkMnP8fnhjyORVMUrpVjR3uxUsiQRzRO0","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":112345},"main":"./dist/index.js","_from":"file:adhd-sox-host-registry-0.3.1.tgz","types":"./dist/index.d.ts","engines":{"node":">=20"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.js"}},"_npmUser":{"name":"pseudosky","email":"skywinston.sk@gmail.com"},"_resolved":"/private/var/folders/yg/cfczgtx54bzfh74lx2_mv0z80000gp/T/03ce145a8d8787e838e169110861b661/adhd-sox-host-registry-0.3.1.tgz","_integrity":"sha512-yrqdZQe7kLhQMPlUyb7KvjuNOal8HPnE+LdoC8HJAQRFncALcjoGPxYIiGk7xij06G/Qo4CW1gg5wi/Nzlae1w==","_npmVersion":"11.6.2","description":"Pluggable per-host registry: claude + codex modules with detect/scopePaths/surfaces","directories":{},"_nodeVersion":"24.11.1","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/sox-host-registry_0.3.1_1787113044007_0.9049770752557635","host":"s3://npm-registry-packages-npm-production"}},"0.4.0":{"name":"@adhd/sox-host-registry","version":"0.4.0","keywords":["mcp","host","registry","claude","codex","typescript"],"license":"MIT","_id":"@adhd/sox-host-registry@0.4.0","maintainers":[{"name":"pseudosky","email":"skywinston.sk@gmail.com"}],"homepage":"https://github.com/PseudoSky/adhd","bugs":{"url":"https://github.com/PseudoSky/adhd/issues"},"dist":{"shasum":"d81bf87995137f0a717fff079e441cfc8637d70b","tarball":"https://registry.npmjs.org/@adhd/sox-host-registry/-/sox-host-registry-0.4.0.tgz","fileCount":40,"integrity":"sha512-X0BTh+1z8XADGMpA/jBHM0FnrwxhQqmEuIptaquXqyvLKx8EZXZge2L12kXZufNUhvrK54ozkK/iAVvbmNygnw==","signatures":[{"sig":"MEUCIFsqlMiG28MvU3Y5yj21RS0uBm5/9YiOlEN33vVnufSIAiEAlMv50ZAmd+vKH+Sj6Qx4/vEHJpFisVtGgpJpTIgNl7k=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":149792},"main":"./dist/index.js","_from":"file:adhd-sox-host-registry-0.4.0.tgz","types":"./dist/index.d.ts","engines":{"node":">=20"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.js"}},"_npmUser":{"name":"pseudosky","email":"skywinston.sk@gmail.com"},"_resolved":"/private/var/folders/yg/cfczgtx54bzfh74lx2_mv0z80000gp/T/df9eb71b4bad550a6c61034839955678/adhd-sox-host-registry-0.4.0.tgz","_integrity":"sha512-X0BTh+1z8XADGMpA/jBHM0FnrwxhQqmEuIptaquXqyvLKx8EZXZge2L12kXZufNUhvrK54ozkK/iAVvbmNygnw==","repository":{"url":"git+https://github.com/PseudoSky/adhd.git","type":"git"},"_npmVersion":"11.6.2","description":"Pluggable per-host registry: claude + codex modules with detect/scopePaths/surfaces","directories":{},"_nodeVersion":"24.11.1","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/sox-host-registry_0.4.0_1788566484686_0.6765002147605415","host":"s3://npm-registry-packages-npm-production"}},"0.5.0":{"name":"@adhd/sox-host-registry","version":"0.5.0","keywords":["mcp","host","registry","claude","codex","typescript"],"license":"MIT","_id":"@adhd/sox-host-registry@0.5.0","maintainers":[{"name":"pseudosky","email":"skywinston.sk@gmail.com"}],"homepage":"https://github.com/PseudoSky/adhd","bugs":{"url":"https://github.com/PseudoSky/adhd/issues"},"dist":{"shasum":"6a3b7a473c8e6966a1e338c63fc311743dba6f74","tarball":"https://registry.npmjs.org/@adhd/sox-host-registry/-/sox-host-registry-0.5.0.tgz","fileCount":40,"integrity":"sha512-F0fjbbDccwhvNkeCitJD/dqOvw73eEb4H28qh9nV/lOmcmKhMyYq5DDg3ywUTzlgp+/5LtKNH/Xifv/g9SXfQA==","signatures":[{"sig":"MEYCIQDZNI3IeSwsRHVOozYuu2rCQRucA7LLItglaJYFeqQgkAIhANN0BMIMV9nM0jG1Dk5dHlzdsoYpwG7G9PxHFObe0umQ","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"sig":"MEUCIC3zgCHmopOcjS6ILT3UbNYEUXmDltXMxGnRFLvpH3vqAiEAzWjKMWOxZgLLCzdO/gEI64lpQQIdeNj54L4+cJmrVqY=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":150397},"main":"./dist/index.js","_from":"file:adhd-sox-host-registry-0.5.0.tgz","types":"./dist/index.d.ts","engines":{"node":">=20"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.js"}},"_npmUser":{"name":"pseudosky","email":"skywinston.sk@gmail.com"},"_resolved":"/private/var/folders/yg/cfczgtx54bzfh74lx2_mv0z80000gp/T/5f11e55d6b08917dd802ea6a057502f0/adhd-sox-host-registry-0.5.0.tgz","_integrity":"sha512-F0fjbbDccwhvNkeCitJD/dqOvw73eEb4H28qh9nV/lOmcmKhMyYq5DDg3ywUTzlgp+/5LtKNH/Xifv/g9SXfQA==","repository":{"url":"git+https://github.com/PseudoSky/adhd.git","type":"git"},"_npmVersion":"11.6.2","description":"Pluggable per-host registry: claude + codex modules with detect/scopePaths/surfaces","directories":{},"_nodeVersion":"24.11.1","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/sox-host-registry_0.5.0_1790046410506_0.681052676125931","host":"s3://npm-registry-packages-npm-production"}},"0.6.0":{"_id":"@adhd/sox-host-registry@0.6.0","bugs":{"url":"https://github.com/PseudoSky/adhd/issues"},"dist":{"shasum":"5b522fd8689dc4f4cfdd43202ae94fe2cedfd332","tarball":"https://registry.npmjs.org/@adhd/sox-host-registry/-/sox-host-registry-0.6.0.tgz","fileCount":44,"integrity":"sha512-dDeslWJdXD1F7jwUWiKgGBVc7kFoddU2ZBc+N/Iyxh6wOTbXrKZwuq3zIA/+07Gcb1r2BFHlwjriIHGdpUNi3g==","signatures":[{"sig":"MEQCIEZ4n9jDtk0cnO2eAaxydyyU970Ogx1cAsWFykAv52sUAiBIviW4ok1GnH3DQTV9teS90qa3z6e4iWZzOHvp/F+OLw==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQD6rkfkkr8umo4blNLBaUBjIPIA4tOXzawevcZmxVfZBQIgf8NGfZhcXppf5n8ymt1vp5VOuSdprw1gRy7hZbOFSeo="}],"unpackedSize":189344},"main":"./dist/index.js","name":"@adhd/sox-host-registry","_from":"file:adhd-sox-host-registry-0.6.0.tgz","types":"./dist/index.d.ts","engines":{"node":">=20"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.js"}},"license":"MIT","version":"0.6.0","_npmUser":{"name":"pseudosky","email":"skywinston.sk@gmail.com"},"homepage":"https://github.com/PseudoSky/adhd","keywords":["mcp","host","registry","claude","codex","opencode","agent-mcp","typescript"],"_resolved":"/private/var/folders/yg/cfczgtx54bzfh74lx2_mv0z80000gp/T/505a86e23143d09a81a63799f6d8e84d/adhd-sox-host-registry-0.6.0.tgz","_integrity":"sha512-dDeslWJdXD1F7jwUWiKgGBVc7kFoddU2ZBc+N/Iyxh6wOTbXrKZwuq3zIA/+07Gcb1r2BFHlwjriIHGdpUNi3g==","repository":{"url":"git+https://github.com/PseudoSky/adhd.git","type":"git"},"_npmVersion":"11.6.2","description":"Pluggable per-host registry: claude, codex, opencode, and agent-mcp modules with detect/scopePaths/surfaces + per-host agent renderers","directories":{},"maintainers":[{"name":"pseudosky","email":"skywinston.sk@gmail.com"}],"_nodeVersion":"24.11.1","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/sox-host-registry_0.6.0_1790650239419_0.6211913490233436"}}},"time":{"created":"2026-06-26T05:19:41.835Z","modified":"2026-09-29T02:50:39.706Z","0.2.0":"2026-06-26T05:19:42.156Z","0.3.0":"2026-08-07T23:18:57.445Z","0.3.1":"2026-08-19T04:17:24.150Z","0.4.0":"2026-09-05T00:01:24.827Z","0.5.0":"2026-09-22T03:06:50.589Z","0.6.0":"2026-09-29T02:50:39.518Z"},"bugs":{"url":"https://github.com/PseudoSky/adhd/issues"},"license":"MIT","homepage":"https://github.com/PseudoSky/adhd","keywords":["mcp","host","registry","claude","codex","opencode","agent-mcp","typescript"],"repository":{"url":"git+https://github.com/PseudoSky/adhd.git","type":"git"},"description":"Pluggable per-host registry: claude, codex, opencode, and agent-mcp modules with detect/scopePaths/surfaces + per-host agent renderers","maintainers":[{"name":"pseudosky","email":"skywinston.sk@gmail.com"}],"readme":"# @adhd/sox-host-registry\n\nThe pluggable per-host registry for the `soxe` ecosystem: three self-contained host modules (**Claude Code**, **Codex**, **OpenCode**), each declaring how to detect that host in a workspace, where its per-scope config/agent/skill files live on disk, and how to render a host-agnostic agent definition into that host's native format. This is the *only* package in the ecosystem allowed to contain literal host-discovery paths (`.claude/`, `.codex/`, `.opencode/`, `~/.claude/`, `~/.codex/`, `~/.config/opencode/`) — everything else resolves a target through it instead of hard-coding a path.\n\n```bash\npnpm add @adhd/sox-host-registry\n```\n\n## Quick start\n\n```typescript\nimport { detectHosts, getHost, listHosts } from '@adhd/sox-host-registry';\n\nlistHosts(); // ['claude', 'codex', 'opencode']\n\n// Which host(s) are set up in this workspace?\nconst detected = detectHosts(process.cwd()); // e.g. ['claude']\n\nconst claude = getHost('claude');\nclaude.scopePaths('project'); // { project: '.claude' } — relative to the workspace root\nclaude.scopePaths('user');    // { user: '/Users/you/.claude' } — home-expanded, absolute\nclaude.surfaces.agent;        // { capability: 'file-drop', paths: { project: '.claude/agents', user: '/Users/you/.claude/agents' } }\nclaude.surfaces['mcp-server'].capability; // 'config-merge'\n```\n\n### Rendering one agent definition for every host\n\n`agentRenderers` is the \"author once, install everywhere\" half of the package: write a single host-agnostic `AgentIr`, and get back the exact frontmatter/config value each host expects — Claude tool names get capitalized and MCP servers become `mcp__<server>__*` wildcards, OpenCode gets YAML frontmatter with `mode`/`permission`, Codex gets a TOML `[agents.<name>]` value.\n\n```typescript\nimport { agentRenderers } from '@adhd/sox-host-registry';\nimport type { AgentIr } from '@adhd/sox-host-registry';\n\nconst researcher: AgentIr = {\n  name: 'researcher',\n  description: 'Discovery researcher for third-party tools, patterns, and use cases before you build.',\n  model: 'sonnet',\n  temperature: 0.4,\n  mode: 'all',\n  tools: [\n    'read',\n    'bash',\n    { logical: 'search', server: 'search' },\n  ],\n  permission: {\n    read: 'allow',\n    bash: { '*': 'allow', 'rm -rf *': 'deny' },\n  },\n};\n\nconst prose = '# researcher\\n\\nYou are a research agent.\\n';\n\nconst forClaude = agentRenderers.claude.render(researcher, prose);\n// { kind: 'file-body', content: '---\\nname: researcher\\n...tools: Read, Bash, mcp__search__*\\n---\\n# researcher\\n...' }\n\nconst forCodex = agentRenderers.codex.render(researcher, prose);\n// { kind: 'config-value', value: { description: '...', model: 'sonnet', prompt: '# researcher\\n...' } }\n// The install engine's config-merge capability serializes this object to TOML\n// at keyPath `agents.researcher` — codex has no file-drop surface for agents.\n```\n\n## API reference\n\n### Registry lookup\n\n```typescript\nfunction getHost(name: string): HostModule;       // throws on an unknown host name\nfunction listHosts(): string[];                    // ['claude', 'codex', 'opencode']\nfunction detectHosts(workspaceRoot: string): string[]; // hosts whose detect() is true here\nfunction resolveWorkspaceRoot(workspaceRoot?: string): string; // workspaceRoot ?? process.cwd()\n\nconst claudeHost: HostModule;\nconst codexHost: HostModule;\nconst opencodeHost: HostModule;\n```\n\n### `HostModule` — the shape every host implements\n\n```typescript\ntype HostScope = 'project' | 'user' | 'local' | 'org';\n\ninterface HostModule {\n  readonly host: string;\n  detect(workspaceRoot: string): boolean;\n  scopePaths(scope: HostScope): Partial<Record<HostScope, string>>;\n  readonly surfaces: SurfaceMap; // extension type -> Surface\n  readonly render?: HostRenderer; // present on claude/opencode/codex\n}\n\ntype CapabilityId =\n  | 'file-drop'       // write a file/dir at a discovery path\n  | 'config-merge'    // merge a key into a shared JSON or TOML config file\n  | 'array-merge'     // append to arrays (permissions/env) with deny-wins semantics\n  | 'object-array-merge'\n  | 'bin-link'        // executable on PATH\n  | 'run-service'     // soxe spawns + supervises\n  | 'materialize';    // place built code at a stable store path\n\ninterface Surface {\n  capability: CapabilityId;\n  format?: 'json' | 'toml';\n  mcpConfig?: McpConfig;\n  postInstallHint?: string;\n  paths: Partial<Record<HostScope, string>>;\n}\ntype SurfaceMap = Record<string, Surface>;\n```\n\n### Agent rendering\n\n```typescript\ninterface AgentIr {\n  name?: string;\n  description?: string;\n  model?: string;\n  temperature?: number;\n  mode?: string;\n  tools?: AgentToolRef[]; // string, or { logical: string; server: string }\n  permission?: Record<string, string | Record<string, string>>;\n}\ninterface AgentOverride {\n  name?: string; description?: string; model?: string; temperature?: number; mode?: string;\n  tools?: string[];\n  permission?: Record<string, string | Record<string, string>>;\n  version?: string;\n  toolMap?: Record<string, string>; // logical server name -> concrete registration key\n  fallbackPath?: string;\n}\ntype RenderedArtifact =\n  | { kind: 'file-body'; content: string }\n  | { kind: 'config-value'; value: unknown };\n\ninterface HostRenderer {\n  renderHeader(ir: AgentIr, overrides?: AgentOverride): Record<string, unknown>;\n  renderToolNames(ir: AgentIr, overrides?: AgentOverride): string | null;\n  render(ir: AgentIr, prose: string, overrides?: AgentOverride): RenderedArtifact;\n}\n\nconst agentRenderers: { claude: HostRenderer; opencode: HostRenderer; codex: HostRenderer };\nfunction stripFrontmatter(content: string): string;\nfunction yamlScalar(value: unknown): string;\nfunction yamlStringify(obj: Record<string, unknown>): string;\n```\n\n### Helpers\n\n```typescript\nfunction expandHome(p: string): string;              // leading ~ -> effective home dir\nfunction existsIn(workspaceRoot: string, rel: string): boolean; // for detect() implementations\n```\n\n## Invariants / gotchas\n\n- **This is the only package allowed to hard-code a host discovery path.** If you find `.claude/`, `.codex/`, or `.opencode/` written literally anywhere else in a consumer, that's a bug to route through `getHost(...).scopePaths(...)` instead.\n- **Claude's `managed` (org/enterprise policy) tier is never emitted.** `scopePaths()` and `surfaces` for `claudeHost` never produce a path under that tier — soxe never writes it.\n- **`expandHome` reroutes under `SOX_SANDBOX_ROOT` when that env var is set** (test/sandbox isolation only), read at call time, not at import time. This is a *different* switch from `SOX_ECOSYSTEM_HOME` in `@adhd/sox-host-runtime` — the data root never reroutes a host placement path, and the sandbox root never moves soxe's own bookkeeping.\n- **Claude MCP entries require an explicit `type`** (`\"http\"` or `\"sse\"`; `\"stdio\"` for local) — a `url` entry with no recognized `type` is silently treated as broken and skipped by Claude Code itself.\n- **User-scope Claude MCP config lives in `~/.claude.json`, not `settings.json`.**\n","readmeFilename":"README.md"}