Skip to main content

Publishing Evaluators

Publish a portable evaluator package or a prebuilt source package into a deployment's evaluator registry. Portable packages require no Rust toolchain, Cargo manifest, source checkout, or local WIT files.

Set VIGILO_EVALUATOR_REGISTRY_STORAGE_CONFIG to the registry owner TOML before publishing or installing evaluator packages, including in CI.

Need a build-first walkthrough before publishing? See Creating Evaluators, including the dedicated "Using Codex" section.


Core Evaluators​

vigilo setup installs the latest compatible official core collection from GitHub Releases after applying migrations and validating database placement. No separate catalog service is required. Evaluators are registered under vigilo, for example vigilo/sentiment-basic-en:0.1.0.

vigilo setup
vigilo setup --skip-evaluators

For a reproducible installation, pass --evaluators YYYY.MM.DD.N, replacing the placeholder with a published collection identifier. --skip-evaluators performs database-only setup and cannot be combined with a collection pin.

Collections use evaluators/YYYY.MM.DD.N tags: a UTC date and a sequence starting at 1. CLI releases use vX.Y.Z. Each evaluator retains its own semantic version; a collection groups exact versions without coupling them to CLI releases. Setup searches published, non-prerelease collection tags, orders them by date and sequence, and selects the newest collection whose complete ABI set is supported. It never uses GitHub's generic latest-release pointer. A pinned incompatible collection fails instead of silently selecting another.

Each release contains catalog.json, individual name-version.tar.gz packages, SHA256SUMS, and the Apache-2.0 LICENSE. The catalog records evaluator names, versions, archive names, byte sizes, SHA-256 archive checksums, BLAKE3 Wasm hashes, and WIT identities. Setup verifies the catalog, archive, embedded package identity, and exact host ABI before publishing. HTTPS access to the official repository establishes the source; checksums detect corruption and do not replace publisher authentication.

Downloads are sequential and streamed into temporary files. Catalogs are limited to 4 MiB and 1,000 evaluators. Setup enforces the same package limits as local publishing. Discovery scans at most 1,000 GitHub releases; pin a collection if that limit is reached. HTTP requests have a 10-second connection timeout and a 120-second total timeout. Set VIGILO_GITHUB_TOKEN when authenticated GitHub API requests are needed to avoid anonymous rate limits; it is not sent to archive downloads.

Matching installed versions are skipped without downloading their archives. Conflicting content fails; old versions and operator-set lifecycle states are preserved. Selecting an older collection adds its missing evaluator versions; it does not remove newer versions or switch profiles to older evaluators. To use an older evaluator, explicitly change its version reference in the profile. Existing runs retain their exact evaluator references. If a request or publication fails, setup returns an error; completed migrations and publications remain durable. Rerun setup to retry, preferably with the reported collection pinned when resuming a specific installation.

Releasing A Collection​

Automatic vigilo setup requires a published compatible collection. Publish that collection before the crate release that uses it. --skip-evaluators selects database-only setup.

Maintainers run the Release Core Evaluators workflow independently of CLI releases. It tests and builds core evaluator crates, creates validated portable packages, and compares them with the latest published collection. Unchanged collections produce no tag or release. Changed package bytes or metadata require an evaluator version bump. Core releases use stable semantic versions and reject version decreases. Archive generation is deterministic; unchanged packages retain identical checksums. Compiler or dependency changes that alter package bytes also require a version bump.

Assets are uploaded to a draft release before publication. Upload failure leaves a draft for inspection; setup ignores it. Published tags and assets are immutable. A workflow retry reserves another sequence rather than overwriting a draft.

To inspect built assets without publishing:

cargo build -p vigilo --locked --release
python3 scripts/releases/core_evaluators.py --prepare-only --output /tmp/core-evaluators

This requires Python 3.11+, the Rust wasm32-wasip2 target, and a new output directory. The preview catalog has a placeholder collection ID. Actual release publication also requires GitHub CLI authentication and repository write access.

Portable Packages​

For host-managed uploads and standalone cleanup, see the object-backed package registry.

A release archive contains a manifest and Wasm at its root. If the evaluator source has a root README, the packager includes it and the local files it links to at their original relative paths.

sentiment-basic-en-0.1.0.tar.gz
├── Vigilo.toml
├── evaluator.wasm
├── README.md
└── examples/
└── input.json

The manifest declares package metadata, the Wasm BLAKE3 hash, and the exact supported ABI identity and WIT contract hash. See the portable manifest format.

Publish a downloaded archive, or a directory containing these files:

vigilo evaluator publish sentiment-basic-en-0.1.0.tar.gz
vigilo evaluator publish ./sentiment-basic-en-0.1.0

Set DATABASE_URL or pass --database-url for publication. Archives are read without extraction. Content hashes detect corruption; they do not authenticate the publisher. Select artifacts from a trusted release source.

Create a Package​

From an evaluator source checkout, build the Wasm and create the release archive:

cargo build -p sentiment-basic-en --target wasm32-wasip2 --release
vigilo evaluator package evaluators/sentiment-basic-en --release \
--output sentiment-basic-en-0.1.0.tar.gz

Packaging requires Cargo and the source manifest but no database connection or DATABASE_URL. It validates the component, embeds its package identity, and writes a deterministic archive. Output includes the package fingerprint and the bundled file digests. The archive is installed atomically at a new output path. Publishing the archive preserves the exact Wasm bytes and registry content hash produced by source publication.

Use CommonMark links or images to reference supporting files. Relative paths resolve from the evaluator directory, with URL escapes decoded once. Heading anchors and HTTPS URLs stay external to package discovery. Supported supporting files include PNG, JPEG, WebP, GIF, SVG, Markdown, text, JSON, CSV, TSV, YAML, TOML, and PDF. Raw HTML, unsafe URL schemes, missing files, symlinks, and paths that escape the evaluator directory fail packaging. Rendered READMEs and their files are served at versioned package URLs.

Official collection publication uses a clean Git checkout and verifies that the bundled documentation is tracked. Bump the evaluator version and rebuild its Wasm before publishing a README or supporting-file change.

--release and --profile select source artifacts. Portable packages contain one artifact; source-profile selection does not change it.

Package Limits​

Package budgetDefaultCLI option
Compressed archive86 MiB--evaluator-package-max-archive-bytes
Wasm64 MiB--evaluator-package-max-wasm-bytes
README256 KiB--evaluator-package-max-readme-bytes
Each supporting file5 MiB--evaluator-package-max-asset-bytes
README and supporting files combined20 MiB--evaluator-package-max-documentation-bytes
Regular files in the archive128--evaluator-package-max-files

These options apply to evaluator package, evaluator publish, and setup. Each has a matching uppercase environment variable with a VIGILO_ prefix and underscores in place of hyphens. Expanded content is checked against its own limits as it is read.

Source Packages​

Prerequisites​

Install vigilo via Cargo:

cargo install vigilo

Verify the installation:

vigilo --version

Source-package publishing reads package identity from Cargo.toml, validates the declared WIT contract, and expects a prebuilt .


Source Manifest​

Each source package requires a Vigilo.toml file at the evaluator crate root alongside Cargo.toml.

At minimum:

[package]
manifest = "Cargo.toml"

[wit]
path = "../../vigilo/wit/evaluator/v1.0.0/evaluator.wit"
world = "evaluator-world"
package = "vigilo:evaluator"
version = "1.0.0"
interface = "evaluator"
strict = true

[profile.dev]
wasm = "wasm32-wasip2/debug/my_evaluator.wasm"

[profile.release]
wasm = "wasm32-wasip2/release/my_evaluator.wasm"

See the Vigilo.toml reference for all fields.


Build​

Build the evaluator for :

cargo build --manifest-path evaluators/my-evaluator/Cargo.toml --target wasm32-wasip2 --release

The wasm path in Vigilo.toml is resolved relative to Cargo's target directory for the evaluator package. The selected chooses this path. For the default Cargo target directory, a release artifact normally lives under:

target/wasm32-wasip2/release/<crate_name_with_underscores>.wasm

If your package uses a custom target directory, keep the configured profile path aligned with the actual artifact location.


Publish​

Publish the release artifact:

vigilo evaluator publish ./evaluators/my-evaluator --release

Publish a non-release profile by name:

vigilo evaluator publish ./evaluators/my-evaluator --profile dev

If neither --release nor --profile is provided, vigilo uses the dev profile from Vigilo.toml.


What Happens at Publish Time​

For source packages, publication performs these checks:

  1. Vigilo.toml is read from the evaluator directory.
  2. The selected [profile.<name>] resolves the compiled wasm artifact path.
  3. name, version, description, keywords, and optional package.metadata.vigilo are read from Cargo.toml.
  4. Optional [package] fields in Vigilo.toml override description, tags, and registry metadata.
  5. Required [wit] settings select a supported versioned ABI; the referenced WIT declaration and compiled component are both verified against its host adapter.
  6. The wasm artifact timestamp is compared with the Cargo manifest timestamp to catch stale builds.
  7. The wasm component is tagged with embedded package metadata, compiled with Wasmtime, hashed, and stored with its WIT contract hash and adapter identity.

Publication never guesses compatibility from a version string. Typed component linking must succeed for the declared adapter. See Evaluator Compatibility.

The published registry identity uses the strict format:

<namespace>/<name>:<version>

Current CLI publishing inserts into the built-in vigilo namespace.


Duplicate Handling​

Publishing is idempotent only when the existing registry row has the same identity and the same content hash.

  • Same <namespace>/<name>:<version> and same content hash: skipped.
  • Same <namespace>/<name>:<version> and different content hash: rejected.
  • Different identity but duplicate content hash in the same namespace: rejected.

There is no --force overwrite flag. To publish changed evaluator content, bump the evaluator version in Cargo.toml, rebuild, and publish the new version.


Stale Build Detection​

vigilo checks whether the wasm output is older than the package manifest before publishing. This catches the common mistake of changing Cargo.toml without rebuilding.

If a stale build is detected, rebuild and publish again:

cargo build --manifest-path evaluators/my-evaluator/Cargo.toml --target wasm32-wasip2 --release
vigilo evaluator publish ./evaluators/my-evaluator --release

Workspaces and Multiple Evaluators​

Each evaluator in a workspace has its own Vigilo.toml and is published independently:

my-workspace/
Cargo.toml
evaluators/
core/
Cargo.toml
Vigilo.toml
sentiment/
Cargo.toml
Vigilo.toml

Build and publish each:

cargo build --manifest-path evaluators/core/Cargo.toml --target wasm32-wasip2 --release
cargo build --manifest-path evaluators/sentiment/Cargo.toml --target wasm32-wasip2 --release

vigilo evaluator publish ./evaluators/core --release
vigilo evaluator publish ./evaluators/sentiment --release

For a small workspace, publish all evaluator directories with:

for dir in evaluators/*/; do vigilo evaluator publish "$dir" --release; done

CI Integration​

A typical CI publish workflow:

name: Publish Evaluators

on:
push:
tags:
- 'v*'

jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Install vigilo
run: cargo install vigilo

- name: Build evaluator
run: cargo build --manifest-path evaluators/my-evaluator/Cargo.toml --target wasm32-wasip2 --release

- name: Publish evaluator
run: vigilo evaluator publish ./evaluators/my-evaluator --release

Reference​

vigilo evaluator publish​

vigilo evaluator publish <evaluator-path> [--release | --profile <PROFILE>]

Arguments:

  • <evaluator-path>: path to the evaluator crate directory containing Vigilo.toml

Options:

  • --release: select the release profile from Vigilo.toml
  • --profile <PROFILE>: select a named profile from Vigilo.toml
vigilo evaluator test 'vigilo/my-evaluator:0.1.0' --input-file evaluators/my-evaluator/example-input.json
vigilo evaluator show 'vigilo/my-evaluator:0.1.0'
vigilo evaluator search --namespace vigilo my-evaluator