Skip to main content

Crane

@dataverket/cranev2026.10.29.2· AGPL-3.0-only· 2d agoBEHAVIORSWORKFLOWSSKILLSACCEPTED WARNINGS
01README

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.

02Behaviors1
@dataverket/crane/registryv2026.10.29.2registry.ts

Global Arguments

ArgumentTypeDescription
registry?stringThe 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?stringThe 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?stringThe credential's user, written as a vault expression; empty to use the container config of the user running swamp
password?stringThe credential's password or token, written as a vault expression; reaches crane on stdin, never as an argument
insecure?booleanAllow a registry served over plain HTTP or with a certificate that does not verify; localhost is plain HTTP regardless
craneBinary?string
fn digest()
Resolve every reference to its digest and record each with the digest it had last time and since when it has been this one
fn describe()
Record what every reference is: an image or an index, its platforms, media type, created time, labels, annotations, layers and size
fn copy(sources: array)
Copy every source, pinned by digest, to <registry>/<namespace>/<source registry>/<path>:<tag>, the path a registry mirror is asked for; one already there with that digest is left unchanged; the digest is checked after
ArgumentTypeDescription
sourcesarrayImages 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
fn tag(name: string, digest: string, tag: string)
Point <registry>/<namespace>/<name>:<tag> at a digest already in the repository, and record the digest the tag held before
ArgumentTypeDescription
namestringThe repository under the namespace, such as config-prod, or docker.io/library/nats for an image copy put there
digeststringThe digest the tag is to point at; it must already be in the repository
tagstringThe tag to give it, such as stable
fn blob(ref: string, path?: string, layer?: number)
Read one file out of an artifact's layer, a tar or tar+gzip such as a Flux artifact's, and record its text, as JSON when it parses, with its sha256
ArgumentTypeDescription
refstringThe artifact, <repository>:<tag> or <repository>@sha256:<digest>
path?stringThe 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?numberWhich layer of the artifact, counted from zero; a Flux artifact has one

Resources

digest(infinite)— One tag resolved: its digest now, the digest it held last time, and since when it has been this one
image(infinite)— One image or index described: media type, platforms, config, labels, annotations, layers and size
mirror(infinite)— One image copied in by digest, or found already there with that digest
tagging(infinite)— One tag pointed at a digest, with the digest it held before
blob(infinite)— One file read out of an artifact's layer: its text, as JSON when it parses, and its sha256
03Workflows2
@dataverket/mirror-image8cbf0907-ea6e-4a8f-8da9-5d7292478ffd

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

resolve
1.digests— Every upstream tag resolved to its digest; one digest record each, with the digest it held last time.
copy
1.mirrors— Every image copied under the namespace by the digest this run resolved, or found there already; one mirror record each.
verify
1.every-image-mirrored— This run recorded one mirror per reference, every one with the digest resolved in this run.
@dataverket/base-image-watcha6bbc439-9318-42e8-8ae4-50c8d927ab11

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

watch
1.digests— Every tag resolved to its digest; one digest record each, carrying the previous digest and the first time this one was seen. Read-only.
verify
1.every-tag-recorded— This run recorded one digest per reference, every one a sha256 digest.
04Skills1
crane1 file
05Previous Versions1
2026.10.29.1AGPL-3.0-only
06Stats
A
100 / 100
Downloads
1
Archive size
40.7 KB
  • 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

08Platforms
09Labels