Developing, Installing & Publishing Bundles (.hyabundle)
A Bundle (kind: Bundle, schema_version: 2) is Hya’s unified, deterministic package format. A single .hyabundle archive (or project directory under .hya/bundles/) can ship any combination of:
- Skills, Tools, MCP servers, Commands, and Hooks for existing agents,
- One or more custom Agents with system prompts, model policies, and scoped resource views,
- Workflows (
workflows/<id>.hya.md) and channel templates (channels/<id>.yaml) declared as data assets, - Custom HTTP/gRPC endpoints (
apis:), CLI subcommands (cli:), custom permission modes (permission_modes:), URI schemes (schemas:), model provider kinds (capabilities: [providers]), and sandboxed TUI extensions (tui:via@hya/tui-sdkv2).
Bundles run on one of three archetypes:
| Archetype | runtime.kind |
Best for | Portability |
|---|---|---|---|
| Static Bundle | static (default) |
Agents, skills, slash commands, workflows, channel templates, MCP declarations, standalone TUI extensions | Portable (target: "any") |
| JS / TS Bundle | js (managed | process | claude) |
Custom tools, hooks, HTTP BundleApi handlers, custom permission modes, imported Claude Code plugins (isolated Bun subprocess over stdio NDJSON JSON-RPC 2.0) |
Portable (target: "any") |
| Native Rust Bundle | native (abi_version: 2) |
High-performance tools, context rewriters, background services, drivers, providers, projection reducers, URI handlers (compiled Rust cdylib against hya-runtime-abi, optionally paired with tui:) |
Per-target & ABI (<target-triple>, abi_digest) |
For deeper references, see:
hyabundleSpecification — Normative manifest, descriptor schemas, CLI mounting, and archive bounds.- Native Bundle Runtime ABI v2 —
crates/hya-runtime-abi,Arc<dyn HostRuntime>, and native extension traits. - Sidecar Plugins, Custom Tools & Hooks — JS/TS JSON-RPC 2.0 protocol and all hook points.
- TUI Extensions (
@hya/tui-sdkv2) — Dynamic panes, tool cards, slash commands, and sandbox permissions. - Open Static Registry Protocol v1 — Registry JSON schemas, Sigstore provenance, advisories, and offline mirrors.
hya-sdkReference & Client Integration — Driving a Hya backend and invoking bundleBundleApiroutes from Rust or HTTP/gRPC clients.
1. Developing a .hyabundle
1.1 Single-file static agent (bundle.hya.md)
For a custom agent using Hya’s built-in tools, one file named bundle.hya.md is enough (see docs/examples/bundle.hya.md):
---kind: Bundleschema_version: 2identity: id: acme/sql-helper version: 1.0.0 publisher: acmeagents: - id: sql-helper description: Reviews SQL queries and schema migrations safely. role: main resource_view: allow: - harness:tool/read - harness:tool/grep---You are a PostgreSQL specialist. Inspect queries and migration files carefully, flag lock hazards or missing indexes, and explain fixes clearly.Verify, pack, and test it locally:
hya bundle verify --strict ./sql-helperhya bundle pack ./sql-helper acme-sql-helper-1.0.0.hyabundlehya bundle install -y ./acme-sql-helper-1.0.0.hyabundlehya bundle list1.2 Multi-file directory bundle (bundle.yaml)
When packaging multiple agents, skills, commands, workflows, MCP servers, JS/TS tools, or native code, use bundle.yaml instead of bundle.hya.md (a directory must contain either bundle.yaml or bundle.hya.md, never both):
kind: Bundleschema_version: 2identity: id: acme/review-pack version: 1.0.0 publisher: acmecheck: command: ["bun", "test", "--pass-with-no-tests"] # Optional self-check run on verify/install timeout_secs: 120resources: skills: - id: review-checklist path: skills/review-checklist/SKILL.md commands: - id: review-pr path: commands/review-pr.mdagents: - id: acme-reviewer description: Security & correctness code reviewer role: subagent prompt: prompts/reviewer.md model_policy: category: deep reasoning: high resource_view: allow: - harness:tool/read - harness:tool/grep - harness:tool/skill - review-checklistassets: - id: review-flow path: workflows/review-flow.hya.mdRunnable source examples live in docs/examples/:
docs/examples/bundle.hya.md— Single-file static agent (schema_version: 2)docs/examples/bun-transient/&docs/examples/bun-resident/— Agent + Bun JS tooldocs/examples/bun-disjoint/— Agent selecting a bundle-local JS tool and hook
1.3 Developing a JS / TS bundle (runtime.kind: js)
JS bundles run out-of-process under Bun (mode: managed for high-level JS modules loaded by hya-plugin-bun, or mode: process for standalone stdio NDJSON JSON-RPC 2.0 executables).
- Declare every tool in
resources.toolspointing to a JSON/YAML descriptor (tools/<id>.json) and every hook inresources.hooks(hooks/hooks.json). - List runtime entrypoints and JSON schemas under
assets:if referenced by aprocesscommand orapis:. - Pre-bundle multi-file TypeScript modules into a self-contained entrypoint before packing—managed JS activation loads only the declared entrypoint file and does not resolve undeclared transitive imports.
Custom HTTP/gRPC endpoints (apis: / BundleApi)
A process JS bundle (or a native ABI v2 bundle implementing NativeBundleApiHandler) can expose JSON endpoints on the Hya v2 server (/v2/sessions/{session}/bundles/{bundle}/{path} or /v2/bundles/{bundle}/api/{path}):
kind: Bundleschema_version: 2identity: { id: acme/notes, version: 1.0.0, publisher: acme }runtime: kind: js mode: process command: [bun, run, '${BUNDLE_ROOT}/notes.ts']assets: - { id: notes, path: notes.ts } - { id: note-schema, path: schemas/note.json }apis: # GET /v2/sessions/{session}/bundles/acme%2Fnotes/usage - id: usage method: GET scope: session path: /usage description: Token usage of the session tree # PUT /v2/bundles/acme%2Fnotes/api/notes/{key} - id: put-note method: PUT scope: global path: /notes/{key} request_schema: schemas/note.json response_schema: schemas/note.jsonCustom permission modes (permission_modes:)
Add selectable modes to /permissions (for example acme/approver/careful) by pairing permission_modes: with a process JS runtime (or native hook) implementing hook/permission.approve:
kind: Bundleschema_version: 2identity: { id: acme/approver, version: 1.0.0, publisher: acme }runtime: kind: js mode: process command: [bun, run, '${BUNDLE_ROOT}/approver.ts']assets: - { id: approver, path: approver.ts }resources: hooks: - { id: permission.approve, path: hooks/permission-approve.json }permission_modes: - id: careful title: Careful description: Approve only git status, git diff, git log, and ls without arguments// approver.ts — standalone JSON-RPC 2.0 permission approverimport { createInterface } from "node:readline"
const ALLOWED = new Set(["git status", "git diff", "git log", "ls"])
function approve(params: { mode?: string; action?: string; resource?: { value?: string } }) { const { mode, action, resource } = params ?? {} if (mode !== "careful" || action !== "bash") return { outcome: "defer" } return ALLOWED.has((resource?.value ?? "").trim()) ? { outcome: "allow_once" } : { outcome: "defer" }}
function reply(id: unknown, result: unknown) { process.stdout.write(`${JSON.stringify({ jsonrpc: "2.0", id, result })}\n`)}
for await (const line of createInterface({ input: process.stdin })) { let message: { id?: unknown; method?: string; params?: Record<string, unknown> } try { message = JSON.parse(line) } catch { continue } if (message.id === undefined || message.id === null) continue if (message.method === "initialize") { reply(message.id, { protocol_version: 1, plugin: { id: "approver", version: "1.0.0", kind: "bun" }, hooks: [{ name: "permission.approve" }], tools: [], }) } else if (message.method === "hook/permission.approve") { reply(message.id, approve(message.params ?? {})) } else { reply(message.id, {}) }}1.4 Developing a Native Rust bundle (runtime.kind: native)
Native bundles compile to a Rust cdylib (.so on Linux, .dylib on macOS) speaking Lockstep Native ABI v2 (crates/hya-runtime-abi). They have zero private hooks into Hya core and must never link hya-store, sqlx, hya-engine, hya-server, axum, or tonic; all host access flows through Arc<dyn HostRuntime>.
The deterministic four-crate ABI SDK (hya-proto, hya-tool, hya-provider, hya-runtime-abi, plus rust-toolchain.toml, Cargo.lock.abi, and abi-manifest.json) matches the host’s exact compiler and cross-boundary dependency features. ABI-changing host releases and independent abi-v<abi_version> releases publish hya-abi-sdk-<abi_id>-<target>.tar.gz alongside abi-manifest-<target>.json. Host releases with an unchanged ABI still publish the manifest, and the existing SDK remains compatible.
- Inspect your target Hya host ABI:
Terminal window hya abi info --json# Fields: "hya_version", "target", "rustc", "abi_version" (2),# "abi_semver", "abi_contract_digest", "abi_digest", "abi_id" - Download the ABI SDK from the release whose SDK archive matches the host’s
abi_idand target, or generate it from a matching local Hya checkout:Terminal window cargo run --locked -p xtask -- package-abi-sdk --out dist-sdk - Wire your native crate into the extracted SDK workspace:
Extract the archive, copy
Cargo.lock.abitoCargo.lock, add your bundle crate as a workspace member, and depend only onhya-runtime-abi = { workspace = true }plus ordinary crates (do not enabletokio/parking_lot):[package]name = "acme-weather-native"version = "1.0.0"edition = "2024"[lib]crate-type = ["cdylib"][dependencies]async-trait = "0.1"hya-runtime-abi = { workspace = true }serde = { version = "1", features = ["derive"] }serde_json = "1" - Declare
runtimeinbundle.yamland compile:Build with the compiler pinned in the SDK’skind: Bundleschema_version: 2identity:id: acme/weatherversion: 1.0.0publisher: acmeruntime:kind: nativeabi_version: 2crate_dir: nativelibrary: native/libacme_weather_native.so # .dylib on macOScapabilities: [tools]resources:tools:- id: weatherpath: tools/weather.jsonrust-toolchain.toml, place the compiled library atruntime.library, and pack with ahyabinary that reports the same fullabi_digest.
Provider kinds (capabilities: [providers])
A native ABI v2 bundle can add model provider kinds by declaring providers in runtime.capabilities and pushing hya_provider::ProviderKindEntry entries in export_native_bundle_v2! (each providing a Protocol and an optional ProviderAuthFlow for hya auth login <provider> --oauth <oauth_type>). A bundle that registers providers without declaring providers fails to load. See the four official provider bundles in chrono-foundry/hya-bundles for complete implementations.
Adding TUI extensions (tui:) and CLI commands (cli:)
- TUI panels, panes, tool cards & slash commands: Add a
tui:block (api_version: 2,entry: tui/main.ts,sdk: "2.1.0",permissions: [...]) and list the TypeScript entry underassets:. This works in both static TUI bundles and hybridnative+tuibundles. See TUI Extensions (@hya/tui-sdkv2). - CLI subcommands: Add a
cli:section routing leaf commands to either a nativedriver: <name>or a JS/nativeapi: <endpoint-id>(with optionalparent: [...]mounting under existing namespaces). SeehyabundleSpecification — CLI commands.
1.5 Manifest reference (bundle.yaml)
Hya v2 accepts schema_version: 2 only (upgrade v1 manifests with hya-migration run). Unknown YAML fields are rejected (deny_unknown_fields), so typos fail at verify/pack time.
| Top-level key | Purpose |
|---|---|
kind |
Required. Always Bundle. |
schema_version |
Required. Must be 2. |
identity |
Required { id: "<publisher>/<name>", version: "<semver>", publisher: "<name>" }. |
version_ref |
Optional legacy field. Resolves 0.0.0 to the host release version during local preparation. Publish registry bundles with an independent SemVer identity.version and omit version_ref. |
namespace |
Optional tool/schema prefix (defaults to <name>; cannot be mcp, harness, builtin, or plugin). |
overrides |
Optional bundle ID whose primitives this bundle overrides (e.g. overrides: hya/bare). Reserved kernel tools todo and rewrite can never be overridden. |
requires |
Optional list of prerequisite <publisher>/<name> bundle IDs that must be enabled alongside this bundle. |
default_agent |
Optional ID of a non-private role: main agent in this bundle that becomes the default primary agent when enabled. |
tool_plane |
Optional (internal_public default, or full). full is granted only to bundles with verified official Sigstore provenance. |
runtime |
Optional runtime declaration { kind: static | js | native, mode?, entry?, command?, timeout_ms?, abi_version?, crate_dir?, library?, capabilities? }. |
check |
Optional { command: [...], timeout_secs?: 1..600 }. hya bundle verify <dir> runs the command in that directory without confirmation. hya bundle verify <archive.hyabundle> runs it in an isolated 0o700 staged copy without confirmation. hya bundle install runs it in an isolated 0o700 staged copy after confirmation, or skips the prompt with -y. All three bound output capture. |
resources |
Optional { tools: [...], skills: [...], commands: [...], mcp: [...], hooks: [...] } ({ id, path, aliases?, overrides? }). See Descriptor Schemas. |
assets |
Optional list of runtime data files ([{ id, path }]), including JSON schemas, TUI sources, Workflow sources (workflows/<id>.hya.md), and channel templates (channels/<id>.yaml). (Legacy top-level workflow: and channels: keys are rejected.) |
agents |
Optional list of standalone Markdown agent references ({ path: "agents/<id>.md" }) or inline Agent definitions (id, role: main | subagent, description?, prompt?, model_policy?, resource_view?, advertise?, handoff?: model | deterministic, private?, can_spawn?, hook_refs?). |
schemas |
Optional custom URI schemes ([{ scheme, tool, writable? }]) routed through read/write (native bundles may also register UriSchemaHandler). |
apis |
Optional custom HTTP/gRPC endpoints mounted on hya.v2.BundleApi and served by a js process runtime or a native NativeBundleApiHandler. |
permission_modes |
Optional custom session permission modes ([{ id, title, description? }]) backed by permission.approve. |
cli |
Optional hya CLI subcommands contributed by this bundle (driver: or api: routes). |
tui |
Optional { api_version: 2, entry, sdk: "2.1.0", permissions: [...] } (may be combined with runtime.kind: native). |
1.6 User-owned bundle configuration (config.toml)
Never embed API keys or secrets inside a bundle (hya bundle verify --strict scans for secrets). Users configure an installed bundle in:
- User scope:
~/.config/hya/bundles/<namespace>/<name>.toml(or<HYA_HOME>/config/bundles/...) - Project scope (
--scope project):<project-root>/.hya/bundles/<dir>/config.toml
Hya injects HYA_BUNDLE_CONFIG_FILE and HYA_BUNDLE_CONFIG_DIR (and expands ${BUNDLE_CONFIG_FILE} in argv/MCP descriptors), and native bundles read their config through HostCatalogReader::bundle_config.
1.7 Tool plane, packaging & activation invariants
- Origin-derived tool plane:
tool_plane: fullis granted only to bundles with verifiedofficialprovenance. All other user and project bundles run ininternal_public(Hya’s built-in public tools plus their own bundle’sresources.{tools,skills,mcp}, plus tools whose descriptor setsview.inject). - Pre-prepared
.hyabundleclosure:hya bundle packpre-emits.hya-prepared.jsoninside the deterministic 7z archive alongside the declared file closure. Undeclared directory files are ignored on pack; unreferenced archive files are rejected on load. - Self-contained JS entrypoints: Managed JS entrypoints must be self-contained single files; activation never reads undeclared relative helpers from the authoring tree.
- Sidecar hooks & JSON-RPC wire: Agent
hook_refsselect bundle-local hook resources only (event,tool.execute.before,tool.execute.after). Sidecars speak newline-delimited JSON-RPC 2.0 on plugin protocol version 1.
1.8 Replaceability example: example/mini-agents
bundles/examples/mini-agents is a minimal multi-agent bundle built only against hya-runtime-abi (plus async-trait, serde, serde_json) and @hya/tui-sdk. It replaces hya/multi-agent’s task tool and child session with zero private core hooks:
hya bundle install example/mini-agents -yhya --bundles example/mini-agents| Part | Contract |
|---|---|
| Manifest | identity: {id: example/mini-agents, ...}, runtime: {kind: native, abi_version: 2, crate_dir: native, capabilities: [tools]}, resources.tools: [{id: task, path: tools/task.json}], tui: {api_version: 2, entry: tui/main.ts, permissions: [tui.render, tui.transcript.read, tui.transcript.embed]}. |
Tool task |
Input {description, prompt, agent?} (agent defaults to hya-bare), authorizes via catalog_reader().authorize_agent_run(...), runs turn_runner().spawn_session_and_run(...), and returns {child_session_id, output_text, error}. |
| TUI | registerToolRenderer({id: "mini-task", tools: ["task"]}) renders <agent> · <description> and {type: "transcript", sessionId: output.child_session_id}. |
2. Verifying & Packaging a Bundle
You only need the hya binary to validate and package a bundle—no Hya Rust source tree or xtask is required:
# 1. Strict static validation, secret scan, self-check, and optional JS JSON-RPC smoke testhya bundle verify --strict --protocol-smoke ./my-bundle
# 2. Pack into a deterministic public .hyabundle archivehya bundle pack ./my-bundle ./acme-my-bundle-1.0.0.hyabundle
# 3. Verify the packed archive itself (checks closure, native ELF/Mach-O headers, and ABI metadata)hya bundle verify --strict ./acme-my-bundle-1.0.0.hyabundlehya bundle info ./acme-my-bundle-1.0.0.hyabundle- Recommended archive filenames:
- Portable (Static / JS / TUI):
<publisher>-<name>-<version>.hyabundle - Native (
runtime.kind: native):<publisher>-<name>-<version>-<target-triple>.hyabundle
- Portable (Static / JS / TUI):
- Native ABI metadata: When
runtime.libraryis present,hya bundle packvalidates the ELF64 / Mach-O binary header for the declared target and writesruntime.native_artifact(target,abi_version,abi_digest,rustc,library_sha256) into.hya-prepared.json. Always pack native bundles with ahyabinary whosehya abi info --jsonmatches the library’s compiled ABI.
3. Installing & Managing Bundles
3.1 Installing from registries (recommended)
The built-in official registry (chrono-foundry/hya-registry) is enabled automatically alongside any community registries you add.
# Discover bundles in configured registrieshya bundle search --remote ""hya bundle search --remote planhya bundle info --registry official hya/workflow
# Install an official distribution profile (default = all 21 official bundles, minimal, providers, tui)hya bundle install --profile default -yhya bundle install --profile minimal -y
# Install a specific bundle (latest compatible release or exact SemVer pin) and its `requires:` closurehya bundle install hya/hashline -yhya bundle install acme/weather@1.0.0 --registry acme -y
# Require verified official Sigstore provenance across the entire dependency closurehya bundle install --profile default --require-official -y3.2 Installing local .hyabundle files & Project scope
# Install into user scope (default: ~/.local/share/hya/bundles/registry.sqlite3)hya bundle install -y ./acme-weather-1.0.0.hyabundle
# Install an official archive offline with its detached Sigstore proofhya bundle install --sigstore hya-plan.hyabundle.sigstore.json ./hya-plan.hyabundle
# Install into the current project's ./.hya/bundles/ directoryhya bundle install --scope project -y ./acme-review-pack-1.0.0.hyabundle
# Replace an existing bundle occupying the same namespace or allow a downgradehya bundle install --overwrite -y ./acme-weather-1.0.0.hyabundleProject scope & checkout trust: Project bundles in
<root>/.hya/bundles/load only for registered Projects whose checkout trust is set toallinpermissions.toml, always run in theinternal_publictool plane, and shadow user-scope bundles by ID or namespace.
3.3 Installing native bundles from source or Git
When a registry release publishes a pinned source recipe (and no prebuilt archive matches your host target/ABI), or when installing directly from a Git repository:
# Build from a registry release's pinned source recipehya bundle install example/native@1.2.3 --from-source --auto-toolchain
# Build and install directly from a Git URL (HTTPS or file://)hya bundle install "git:https://github.com/acme/hya-weather.git#v1.0.0" --auto-toolchainhya bundle install "git:file://$PWD/my-bundle?subdir=bundles/native#v1.2.3" -yBefore running Cargo, Hya prints the resolved Git commit, required rustc -V, and ABI SDK source and asks for confirmation (skip with -y). Set HYA_ABI_SDK_DIR (extracted SDK directory) or HYA_ABI_SDK_ARCHIVE (local .tar.gz or file:// URL) to supply the ABI SDK offline. Source builds install at local trust.
3.4 Air-gapped / offline mirrors
hya bundle mirror exports a self-contained static mirror for offline installation. It includes prebuilt .hyabundle archives for the selected --target and --abi-digest, the bundle, profile, and index manifests, and any published advisories and detached Sigstore proofs.
# On a connected machine (omit --abi-digest to use the running host's ABI digest)hya bundle mirror --profile default --target x86_64-unknown-linux-gnu --out ./hya-mirror
# On the air-gapped machinehya bundle install --profile default --registry "file://$PWD/hya-mirror" -yFor offline native source builds, supply the ABI SDK separately via HYA_ABI_SDK_DIR or HYA_ABI_SDK_ARCHIVE as described in §3.3.
3.5 Importing Claude Code plugins (--claude)
Convert and install a local Claude Code plugin folder (plugin.json or .claude-plugin/plugin.json) or marketplace entry as a Hya JS bundle (runtime.kind: js, mode: claude):
hya bundle install --claude ./my-claude-pluginhya bundle install --claude './marketplace#code-review'hya bundle install --scope project --claude ./my-claude-pluginHya imports agents/*.md, skills/*/SKILL.md, commands/*.md, .mcp.json, and command hooks. It maps PreToolUse to tool.execute.before, PostToolUse to tool.execute.after, PreCompact to compaction.before, SessionStart to session.start, and SessionEnd to session.end. For other events, add an explicit top-level hook_aliases entry in hooks/hooks.json, such as "hook_aliases": { "SubagentStart": "hya/multi-agent:spawn" }. Import fails for events without a mapping.
3.6 Managing, upgrading & selecting installed bundles
hya bundle list [--scope all|builtin|user|project] [--json]hya bundle enable acme/weatherhya bundle disable acme/weatherhya bundle refresh # Hot-reload edited project bundles & TOML configshya bundle upgrade --all -y # Upgrade all installed user bundleshya bundle upgrade acme/weather -yhya bundle remove acme/weather [-y] # Add --scope project for project bundles
# Manage configured registries (~/.config/hya/bundle-registries.json)hya bundle registry list --jsonhya bundle registry add acme https://packages.example.org/hyahya bundle registry refresh acmehya bundle registry remove acme
# Per-run selection without changing config.tomlhya --bare # Core 8-tool runtime with zero bundleshya --bundles workflow,tui,provider-openai # Select specific bundles/presets + prerequisiteshya --bundles full,-network # Full set minus specific bundlesActivating native / provider changes: Static, JS, and TUI changes refresh live via
hya bundle refresh(or/reload-bundles). After installing, upgrading, or toggling a native library or provider bundle, runhya server restartso the daemon reloads the dynamic libraries and provider catalog.
4. Publishing a Bundle
Bundles are versioned and distributed independently of Hya’s release schedule. You can distribute a .hyabundle file directly (GitHub Release attachment, internal artifact store) or host a Static Registry on any static HTTPS origin (GitHub Pages, S3/R2, raw GitHub repo, or internal HTTPS server).
4.1 Prepare release metadata
- Set an independent SemVer
identity.versioninbundle.yaml(omitversion_ref). - Verify and pack every target artifact:
Terminal window hya bundle verify --strict --protocol-smoke ./weatherhya bundle pack ./weather dist/acme-weather-1.0.0.hyabundle - Record each archive’s exact SHA-256 digest and byte size (and for native bundles, your host ABI metadata):
Terminal window shasum -a 256 dist/acme-weather-1.0.0.hyabundlewc -c dist/acme-weather-1.0.0.hyabundlehya abi info --json
4.2 Publish to a static HTTPS registry
A static registry serves plain JSON files and .hyabundle archives under one HTTPS root (relative URLs keep the registry relocatable and mirror-friendly):
https://packages.example.org/hya/├── .well-known/│ └── hya-registry.json # Discovery (protocol_version: 1)├── v1/│ ├── index.json # Catalog index (ETag-cacheable)│ ├── bundles/│ │ └── acme/│ │ └── weather.json # BundleManifest with releases & artifacts│ ├── profiles/│ │ └── starter.json # Optional curated bundle profile│ ├── abi/│ │ └── <64-hex-abi-digest>.json # Optional AbiSnapshot (for native --from-source)│ └── advisories.json # Optional yanked-artifact feed└── artifacts/ └── acme/weather/1.0.0/ └── acme-weather-1.0.0.hyabundleExample /.well-known/hya-registry.json
{ "protocol_version": 1, "name": "acme", "display_name": "Acme Hya Bundles", "index_url": "v1/index.json", "bundle_url_template": "v1/bundles/{publisher}/{name}.json", "profile_url_template": "v1/profiles/{name}.json", "abi_url_template": "v1/abi/{abi_digest}.json", "advisories_url": "v1/advisories.json"}Example /v1/index.json
{ "schema_version": 1, "generated_at": "2026-11-30T12:00:00Z", "profiles": ["starter"], "bundles": [ { "id": "acme/weather", "publisher": "acme", "name": "weather", "summary": "Local weather lookup tool and forecast agent.", "runtime_kind": "js", "has_tui": false, "trust_tier": "local", "capabilities": ["tools"], "latest_version": "1.0.0", "tags": ["weather", "tools"], "supported_targets": ["any"], "supports_source_build": false } ]}Example /v1/bundles/acme/weather.json
Use "target": "any" for portable bundles (static, JS, standalone TUI). For native bundles, publish one artifact per supported Rust target triple (x86_64-unknown-linux-gnu, aarch64-unknown-linux-gnu, aarch64-apple-darwin) with abi_version: 2 and the full 64-hex abi_digest from hya abi info --json, plus an optional source recipe for --from-source fallback:
{ "schema_version": 1, "id": "acme/weather", "publisher": "acme", "trust_tier": "local", "homepage": "https://github.com/acme/hya-weather", "versions": [ { "version": "1.0.0", "published_at": "2026-11-30T12:00:00Z", "hya_version_req": ">=0.53.0", "requires": [], "runtime_kind": "js", "artifacts": [ { "target": "any", "filename": "acme-weather-1.0.0.hyabundle", "download_url": "artifacts/acme/weather/1.0.0/acme-weather-1.0.0.hyabundle", "sha256": "<64-char-lowercase-sha256>", "size_bytes": 4096 } ] } ]}Prerequisite parity: Every
requiresentry declared inside the.hyabundlemanifest must also appear in the registry release’srequiresarray so clients can resolve and verify the complete closure before installing.
4.3 Trust tiers, Sigstore signing & official bundles
- Trust tiers: Installed trust is determined strictly by cryptographic verification, never by the registry manifest’s
trust_tierstring:official— verified offline against Hya’s pinned Sigstore trust root and official GitHub Actions OIDC release policy (chrono-foundry/hya-bundles+chrono-foundry/hya-registry). Eligible fortool_plane: full.verified— reserved for downstream verification policies (internal_publictool plane).local— community/unsigned archives, local builds, and--scope projectbundles (internal_publictool plane).
- HTTPS safety: HTTPS registries cannot downgrade resolved artifact, SDK, or advisory URLs to non-HTTPS endpoints.
- Official bundles: First-party bundles and developer examples are maintained and signed via GitHub Actions OIDC (
cosign sign-blob --new-bundle-format) in chrono-foundry/hya-bundles and published to chrono-foundry/hya-registry.
4.4 Test your published registry end to end
You can verify your static directory locally via file:// before deploying to HTTPS:
# Test against a local directory build of the registryhya bundle search --remote --registry "file://$PWD/registry-out" ""hya bundle install --registry "file://$PWD/registry-out" acme/weather@1.0.0 -y
# Once deployed to HTTPS, register and installhya bundle registry add acme https://packages.example.org/hyahya bundle registry refresh acmehya bundle install --registry acme acme/weather@1.0.0 -ySee the Open Static Registry Protocol v1 for the complete JSON schemas for Discovery, Index, BundleManifest, Profile, AbiSnapshot, Advisories, and Sigstore X.509 policy checks.