Registry API
(待译)
资源库(registry)存放组织里可安装的能力:技能(一个带 SKILL.md 的文件夹)和插件(一个带 .claude-plugin/plugin.json 的 Claude Code 插件)。命名与层级照 Google Artifact Registry:repository 是库,package 是库里的一个资源,version 是资源的一个版本。和它不同的地方:每个组织自动有一个不能删除的默认库;只收技能和插件两类;版本号用 semver 且必须递增;发布是上传一个 zip 或一组文件,而不是推镜像(OCI 推拉在 registry.deepraxis.com 上照常可用)。把资源装到智能体上用 installations(另一组接口)。资源库也能存放 git 仓库:建一个 format 为 git 的库,在里面用 JSON 建 git 包(一个 git 包就是一个 git 仓库),再用 packages.git-credential 换一个凭据,之后用普通 git 客户端推拉。克隆地址在 git 包的 clone_url,形如 https://registry.deepraxis.com/git/{组织标识}/{库名}/{包名}.git;认证用 HTTP Basic,用户名固定 x-access-token,密码是 git-credential 给的 password(也可以用 sk-praxis- 开头的 API Key 当密码),例如 git clone https://x-access-token:$PASSWORD@registry.deepraxis.com/git/acme/src/app.git,或 git -c http.extraHeader=“Authorization: Basic $(printf x-access-token:%s $PASSWORD | base64)” clone 地址(密码不进地址)。限额:一次 push ≤64 MiB 且 ≤50000 个对象,单个文件 ≤32 MiB,一个仓库 ≤1 GB;默认分支受保护,不能直接推,请推到别的分支。git 功能按组织逐步开放(registry-git 开关),没开放的组织建库建包会返回 409。
- Remove an installation —
DELETE /registry/v1/installations/{installation_id} - Update an installation —
POST /registry/v1/installations/{installation_id}:update - Read a commit —
GET /registry/v1/packages/{package_id}/git/commits/{sha} - Download a file from a ref —
GET /registry/v1/packages/{package_id}/git/files/{path} - List branches and tags —
GET /registry/v1/packages/{package_id}/git/refs - Compare two refs —
GET /registry/v1/packages/{package_id}/git/compare - List commits —
GET /registry/v1/packages/{package_id}/git/log - Resolve a ref —
GET /registry/v1/packages/{package_id}/git/resolve - List a tree —
GET /registry/v1/packages/{package_id}/git/trees/{sha} - List a tree recursively —
GET /registry/v1/packages/{package_id}/git/trees/{sha}/recursive - Create a git credential —
POST /registry/v1/packages/{package_id}/git-credential - Install a package —
POST /registry/v1/packages/{package_id}/installations - List installations —
GET /registry/v1/packages/{package_id}/installations - Retrieve package —
GET /registry/v1/packages/{package_id} - List version contents —
GET /registry/v1/packages/{package_id}/versions/{version}/contents - Publish a version —
POST /registry/v1/packages/{package_id}/versions - Download a file —
GET /registry/v1/packages/{package_id}/versions/{version}/files/{path} - List versions —
GET /registry/v1/packages/{package_id}/versions - Download version archive —
GET /registry/v1/packages/{package_id}/versions/{version}/archive - Withdraw a version —
POST /registry/v1/packages/{package_id}/versions/{version}:withdraw - Create repository —
POST /registry/v1/repositories - Delete repository —
DELETE /registry/v1/repositories/{repository_id} - List repositories —
GET /registry/v1/repositories - Create a package —
POST /registry/v1/repositories/{repository_id}/packages - List packages —
GET /registry/v1/repositories/{repository_id}/packages - Retrieve repository —
GET /registry/v1/repositories/{repository_id} - Update repository —
PATCH /registry/v1/repositories/{repository_id}