Skip to content

Registry

Registries are OPTIONAL. They provide package discovery, search, and version resolution. No central authority is required; users MAY configure multiple registries, and registries are additive.

A registry is a JSON file hosted at any URL. The file contains a package index:

{
"registry_version": 1,
"name": "community-packages",
"url": "https://registry.example.com/index.json",
"packages": [
{
"name": "api-testing",
"version": "1.0.0",
"description": "Skills and tools for API testing workflows.",
"author": {
"name": "Example Org"
},
"url": "https://registry.example.com/packages/api-testing-1.0.0.ccpkg",
"checksum": "sha256:a1b2c3d4...",
"tags": ["api", "testing", "openapi"],
"published_at": "2026-02-14T12:00:00Z",
"downloads": 1234,
"verified": true
}
]
}

Registry index fields:

FieldRequiredTypeDescription
registry_versionREQUIREDnumberSchema version. Currently 1.
nameREQUIREDstringHuman-readable registry name.
urlREQUIREDstringCanonical URL of this registry index.
packagesREQUIREDarrayArray of package entries.

Package entry fields:

FieldRequiredTypeDescription
nameREQUIREDstringPackage name.
versionREQUIREDstringPackage version (semver).
descriptionREQUIREDstringPackage description.
authorREQUIREDobjectAuthor object (same schema as manifest).
urlREQUIREDstringDownload URL for the .ccpkg archive.
checksumREQUIREDstringSHA-256 checksum of the archive.
tagsOPTIONALstring[]Searchable tags.
published_atOPTIONALstringISO 8601 publication timestamp.
downloadsOPTIONALnumberDownload count.
verifiedOPTIONALbooleanWhether the registry has verified the package.

Users configure registries in their host settings:

{
"ccpkg": {
"registries": [
"https://registry.example.com/index.json",
"https://my-team.github.io/packages/index.json"
]
}
}

When a user installs a package by name (e.g., ccpkg install api-testing):

  1. The installer queries all configured registries.
  2. Matching packages are collected across registries.
  3. If multiple versions match, the highest semver version is selected.
  4. If the same name and version appear in multiple registries, the first registry in the configuration list takes precedence.

Registry URLs MUST use HTTPS (see Transport Security).

Registries SHOULD provide a version endpoint that enables efficient update checking without downloading the full index.

Version endpoint format:

A registry MAY expose per-package version information at a predictable URL derived from the registry base URL:

{registry-base-url}/packages/{name}/versions.json

Response schema:

{
"name": "api-testing",
"latest": "2.1.0",
"versions": [
{
"version": "2.1.0",
"published_at": "2026-03-01T12:00:00Z",
"checksum": "sha256:...",
"url": "https://..."
},
{
"version": "2.0.0",
"published_at": "2026-02-15T12:00:00Z",
"checksum": "sha256:...",
"url": "https://..."
}
]
}
FieldRequiredTypeDescription
nameREQUIREDstringPackage name
latestREQUIREDstringLatest stable version (semver)
versionsREQUIREDarrayAll published versions, newest first

Each version entry uses the same fields as a registry package entry.

Registries SHOULD support ETag and If-None-Match headers to enable efficient polling. An installer that checks for updates SHOULD cache responses and use conditional requests to minimize bandwidth.

Registries MAY publish security advisories for packages. An advisory indicates that one or more versions of a package have a known vulnerability.

Advisory endpoint format:

{registry-base-url}/advisories.json

Response schema:

{
"advisories": [
{
"id": "CCPKG-2026-001",
"package": "vulnerable-pkg",
"affected_versions": "<1.2.3",
"severity": "high",
"title": "Command injection in hook script",
"description": "...",
"fixed_in": "1.2.3",
"published_at": "2026-03-01T00:00:00Z",
"url": "https://..."
}
]
}
FieldRequiredTypeDescription
idREQUIREDstringUnique advisory identifier
packageREQUIREDstringAffected package name
affected_versionsREQUIREDstringSemver range of affected versions
severityREQUIREDstringOne of: critical, high, medium, low
titleREQUIREDstringShort description of the vulnerability
descriptionOPTIONALstringDetailed description
fixed_inOPTIONALstringVersion that fixes the vulnerability
published_atREQUIREDstringISO 8601 timestamp
urlOPTIONALstringLink to full advisory details

Installers that support update discovery SHOULD check the advisory endpoint and SHOULD surface advisories affecting installed packages. The urgency of notification is an implementation concern.