Crane
Security Notice
This extension includes AI agent skills that can modify AI assistant behavior. Review the skill files before installing.
A container registry driven through crane, the registry client of go-containerregistry: tags resolved to digests, images and indexes described, images mirrored in by digest, digests given tags, and a file read out of an artifact's layer, every outcome a swamp record.
One model type, @dataverket/crane/registry. digest resolves references to digests and records, per tag, the digest it held last time and since when it has been the current one, so a quarantine can wait for a base image to stay unchanged. describe records an image or an index: media type, platforms, created time, labels, annotations, layers and size. copy brings an upstream image pinned by digest under /, at its source registry and whole path, where a registry mirror asks for it, leaves one already there with that digest unchanged, and checks the digest after. tag points a tag at a digest already in a repository and records the digest the tag held before, for a promotion that is a retag. blob reads one file out of an artifact's tar+gzip layer, such as release.json out of a Flux artifact, and records it as text and as JSON.
Two workflows: @dataverket/mirror-image resolves upstream tags to digests and copies every image under the namespace, asserting each; and @dataverket/base-image-watch, read-only and made to run daily, records the digest of every watched upstream tag. A skill, crane, says which to run for what. A credential comes from a vault, reaches crane on stdin into a docker config that exists for one run only, and is never an argument; without one crane uses the container config of the user running swamp. crane runs as a subprocess with argv arrays, never through a shell. Written against crane 0.22.1.
Global Arguments
| Argument | Type | Description |
|---|---|---|
| registry? | string | The registry copy and tag write to and the credential logs in to, host[:port], such as registry.example.org; a reference without a slash is read from <registry>/<namespace>/. Empty for a definition that only reads full references |
| namespace? | string | The path copy and tag work under: copy puts an image at <registry>/<namespace>/<source registry>/<path>, tag writes to <registry>/<namespace>/<name>; empty for the registry's root |
| username? | string | The credential's user, written as a vault expression; empty to use the container config of the user running swamp |
| password? | string | The credential's password or token, written as a vault expression; reaches crane on stdin, never as an argument |
| insecure? | boolean | Allow a registry served over plain HTTP or with a certificate that does not verify; localhost is plain HTTP regardless |
| craneBinary? | string |
| Argument | Type | Description |
|---|---|---|
| sources | array | Images pinned by digest, <repository>:<tag>@sha256:<digest>; each lands at <registry>/<namespace>/<source registry>/<path>:<tag>, docker.io/library/nats for nats, or at @<digest> alone when no tag is given |
| Argument | Type | Description |
|---|---|---|
| name | string | The repository under the namespace, such as config-prod, or docker.io/library/nats for an image copy put there |
| digest | string | The digest the tag is to point at; it must already be in the repository |
| tag | string | The tag to give it, such as stable |
| Argument | Type | Description |
|---|---|---|
| ref | string | The artifact, <repository>:<tag> or <repository>@sha256:<digest> |
| path? | string | The file to read out of the layer, such as release.json, when the layer is a tar or tar+gzip; empty records the whole layer as the file |
| layer? | number | Which layer of the artifact, counted from zero; a Flux artifact has one |
Resources
Mirror upstream images into a registry of your own, by digest: every reference in refs is resolved to its digest, then copied to <registry>/<namespace>/<source registry>/<path>:<tag> pinned by that digest, so the mirror holds exactly what was resolved and nothing a tag could move to in between. An image already there with that digest is left unchanged, and the digest is checked after every copy. Fails unless one mirror record per reference was made in this run. The credential is named by vault a
Watch upstream tags: the digest of every reference in refs is recorded, with the digest it held last time and since when it has been the current one, so a later step can mirror a base image only once it has stayed unchanged for as long as a quarantine asks. Read-only, nothing is copied or tagged, and no credential is taken, since the references are public upstream images; crane reads them with the container config of the user running swamp. Made to run daily: a schedule is set, and the reference
- Has README or module doc2/2earned
- README has a code example1/1earned
- README is substantive1/1earned
- Most symbols documented1/1earned
- No slow types (deprecated)1/1earned
- Dependencies pass trust audit2/2earned
- Docs keep secrets in a vault1/1earned
- Has description1/1earned
- Platform support declared (or universal)2/2earned
- License2/2earned
- Verified public repository2/2earned
Spawns a subprocess with Deno.Command().
- models/registry.ts:225 — no reason given
Documentation that puts a secret in plaintext or references a vault with syntax Swamp does not resolve.
- files/README.md:135 — no reason given