Overview
This document specifies the HTTP API that OCX-compatible registries must implement. Registries serve component metadata and files as static JSON endpoints.V2 Changes: Registry targets are now root-relative (no
.opencode/ prefix required). The OCX CLI handles path resolution based on component type.Discovery (Optional)
/.well-known/ocx.json lookup.
Response:
If not provided, clients must be configured with the full registry URL.
ocx registry add currently validates registries by requesting <registry-url>/index.json directly. It does not resolve /.well-known/ocx.json during add flows.Required Endpoints
Registry Index
Component summaries inside
components[] use this shape:
namespace and per-component version are not part of the runtime-required summary contract.
For v2 registries, publish
$schema: "https://ocx.kdco.dev/schemas/v2/registry.json". If $schema is missing (or uses the unversioned legacy URL), OCX CLI treats the payload as legacy v1 compatibility mode.Component resolution uses the configured alias from
ocx registry add --name <alias> (for <alias>/<component> refs), not any registry-declared namespace field.Component Packument
File Content
Component Types
Targets in registry files are root-relative. The OCX CLI resolves them to the appropriate
.opencode/ subdirectory based on component type.
Blocked Paths
Registry components cannot target these paths:.ocx/— OCX state and receiptocx.jsonc— OCX configurationpackage.json— Package manifest.git/— Git internals.env— Environment secretsnode_modules/— Dependencies
- Absolute paths (starting with
/or drive letters likeC:) are rejected - Path traversal sequences (
../,..\\) are rejected - Null bytes and control characters are rejected
Minimal Compliant Registry
A registry with a single skill needs three files:/index.json:
/components/my-skill.json:
Hosting Options
See Also
- Creating Registries — Guide to building your own registry.
- ocx build — CLI command for building registries.
- Enterprise Overview — Locking, versioning, and integrity verification.