Skip to content

Packages for curators

Describes Orbit 0.1.9 ·What changed ·Markdown

This page describes packages from Orbit’s side: what a manifest must contain for Orbit to accept it, how Orbit fetches, verifies, installs and audits it, and how installed packages become a root the owner signs. It is for contributors working on src/packages/ or src/compose/, and for curators who want to know exactly what Orbit checks.

The contract text is docs/package-manifest-schema.md in the Orbit repository. Its opening summary is current; many later sections are dated decision records, and several of them have been superseded. When the two disagree, the code in src/packages/mod.rs is the authority.

A package is a JSON manifest signed by a curator. It declares, per chain, positions built from instruction templates, an optional data feed, runtime requirements on the module, and optional extras (directions, egress verbs, async exits, declared errors, activation steps). It grants nothing by itself. Installing one is a local file write; only a root the owner signs gives the operator any authority. Orbit has no protocol-specific logic: trust comes from the curator’s signature, the pinned curator key, and the module’s own on-chain checks.

The wire type is PackageManifest in src/packages/mod.rs.

Field Meaning
schema_version Bare major as a string. Accepted: "3", "4", "5" (SUPPORTED_MANIFEST_MAJORS), by exact membership, never by ordering. Anything else is refused.
package_id <curator>/<package>, for example dialectic/starter-kit
version Package version. Installs pin it; a newer catalog version shows as update_available and is never adopted automatically.
curator { id, pubkey, url? }. pubkey must recover from the signature.
metadata name, strategy_type, asset_universe, chains, risk_profile, tier, description, note, integrations_ref, permission_template
chains Map keyed by decimal chain id ("8453") to a chain section (below)
bridges Bridge permission lanes: bridge_id, protocol, from_chain, to_chain, token, requirements
bridge_configuration Signed CCTP deployments and directed paths. Only at schema "5", and must be non-null when present.
access { min_tier }. Required from schema 4.
subscription Legacy (schema 3) paid-access block. Still read, because deprecated catalog versions stay resolvable.
recommended_mandate basis plus free-form values the owner may adopt
directions Bare verb to increase, decrease or neutral
egress Verbs that move value out of the Safe
async_actions Exits requested now and collected later: request and collect verb pairs
gas_routes Signed Relay data for the operator gas route (Gas Top Up only)
verification { manifest_sig, reproducible? }
Field Meaning
positions instructionKey, positionId, groupId, vars, positionTokens, tags, verifier, asset_class
feed { kind, endpoint, signer_pubkey, poll?, tokens }. kind is full or prices; poll may set severity_s, feed_s, max_age_s. Optional: a feed-less package (the Starter Kit utility, dialectic/starter-kit) gets price context from the module’s oracle routes instead.
market { kind: "market", endpoint, signer_pubkey }: the curator’s advisory market feed, next to feed. Optional. As of Orbit 0.1.8 Orbit accepts it and does not read it; see Curator market feed.
runtime_requirements Module state the package needs: type, who (safe_owner, makina, provider or curator), a check call with an expected value, an optional set call that fixes it, and an optional curator suggested value (bridge loss caps) that the owner ratifies by signing
config Per-chain addresses the instruction templates reference as ${config.<key>}
core_quote HyperEVM only: a signed HyperCore quote reference (core_token, price_reference, evm_decimals)
protective_orders Perp markets that accept reduce-only stop-loss and take-profit orders: kinds, reduce_only, grouping, optional market_slippage_bps and unlisted_market_slippage_bps. Allowed only with the hyperliquid_native_perps_v1 template.
errors Revert errors the package’s contracts can raise, by Solidity signature, with the curator’s plain words. Orbit names a failed step only from this list.
activation_steps One-time operator steps to run after the root is active

asset_class is one of usd, eth, btc, stock, tool. Onboarding uses it to compose by style (src/onboard/layers.rs); an absent or unknown value composes for every style.

instructionKey names a template file at the pinned integrations ref (instructions/<key>.yaml). The template is the only authority on what a position needs: the config keys it references and the vars the curator supplies, written through verbatim. Adding a protocol is a package plus a reviewed template, never a Rust edit (src/compose/mod.rs). groupId is reserved; emit "0". verifier names an on-chain venue check (for example erc4626); an absent or unknown verifier makes the audit report unverified, never a hard failure.

metadata.permission_template.kind opts a package into a narrow, reviewed composition shape (validate_permission_template):

Kind Scope
erc20_allowlist_v1 Only dialectic/erc20-transfers. Requires an explicit integrations_ref. Binds explicit token and recipient pairs.
gas_fixed_recipients_v1 Gas Top Up fixed recipient lists
hyperliquid_native_perps_v1 Native Hyperliquid perp market selection; the only template that may declare protective_orders. It refuses a feed block; a market block is accepted. On newer integration sources it may add one spot sale.

Grammar: <owner>/<repo>@<sha>, exactly one /, a full 40-character lowercase hex commit. Tags, branches and short SHAs are refused. A manifest without it composes against Orbit’s reviewed default source and ref. A different sha on the same source is a ref mismatch naming both. Another source is composable only if it is on ALLOWLISTED_SOURCES in src/compose/mod.rs.

These are recent additions to what a package can carry. Each is described as Orbit 0.1.8 handles it.

A chain section may carry a market block next to feed:

"market": { "kind": "market", "endpoint": "<url>", "signer_pubkey": "<curator feed key>" }

It points at the curator’s advisory market data: prices and price changes, and Hyperliquid perp markets. It is never an input to valuation, to the mandate’s limits or to any other policy check. Most current Dialectic packages carry one, including the Hyperliquid perps package (the native perps template accepts it although it refuses feed).

As of Orbit 0.1.8, Orbit accepts a manifest that carries it and otherwise ignores it. The block is covered by the curator’s signature like the rest of the manifest, but Orbit does not parse it, poll the endpoint or show it: get_package returns the parsed manifest without it, and no tool returns its data. What Orbit does read from curators is described on Data and trust.

On newer Hyperliquid integration sources, a package using the hyperliquid_native_perps_v1 template may add one optional position with the instruction key hyperliquid-spot-sale for the HYPE/USDC spot market. It brings exactly one extra action, sell_spot, which the manifest must declare in directions as decrease. Nothing else in the template changes; a manifest without the position keeps the template’s original actions.

Orbit checks every sell_spot order against what the reviewed instruction fixes: a sell, immediate-or-cancel, not reduce-only, on the reviewed market only. The agent supplies only a lowest price and a size. Orbit refuses a price or size off HyperCore’s grid before anything is sent, because HyperCore drops such an order silently. A spot sale is treated like a close: a decrease with no notional.

Orbit refuses the spot-sale position on an older integration source, and refuses any other spot market or a second spot-sale position. How an agent uses it is on Hyperliquid perps.

On the newest Hyperliquid integration source, the same template may also add one optional position with the instruction key hyperliquid-spot-buy for the HYPE/USDC spot market. It brings one extra action, buy_spot, which the manifest must declare in directions as increase. A manifest may carry the sale, the buy, both or neither; each action appears in directions exactly when its position does.

Orbit checks every buy_spot order against what the reviewed instruction fixes: a buy, immediate-or-cancel, not reduce-only, on the reviewed market only. The agent supplies a highest price and a size. Orbit bounds the highest price by the package’s signed protective_orders market slippage allowance over Hyperliquid’s own HYPE price, and refuses a buy when the package declares no allowance. A spot buy is an increase: the mandate’s limits apply, and the HYPE it adds counts towards concentration.

Orbit refuses the spot-buy position on any other integration source, and refuses any other spot market or a second spot-buy position. How an agent uses it is on Hyperliquid perps.

A package can include a reward claim through Merkl, the service some markets pay their rewards through. Dialectic’s packages use the merkl instruction key; Orbit recognises a claim by its leaf, not by the key name: a harvest whose input slots all declare the MerklClaimData type. list_actions marks such a harvest claims_rewards: true.

At call time Orbit asks the Merkl API for this Safe’s rewards on this chain only, and fills the claim data with the Safe as the only user (users is the Safe for every token). Before running it, Orbit checks that:

  • every reward row is paid to the Safe (claim data naming anyone else is refused, claim_other_recipient);
  • the Merkl root matches the one the Distributor holds (rewards_updating otherwise);
  • the Distributor does not redirect the Safe’s claim to another address (claim_recipient_elsewhere).

Tokens already claimed in full are left out; with nothing left the answer is nothing_to_claim: true, a result rather than an error. The filled claim then runs through the normal pipeline; the leaf hash and proof are unchanged because only uncommitted slots are filled.

The Orbit Starter Package (dialectic/orbit-free) carries the Merkl claim on Base and Ethereum. Older Orbit versions install such a package but cannot claim with it, because they do not fill the claim data.

A newer package version can need a newer Orbit. An Orbit that cannot accept a catalog entry lists it under rejected in list_packages with a reason, and get_package, audit_package and install_package for it fail with that refusal. The reason names what that Orbit did not accept, such as an unknown manifest field (as of Orbit 0.1.8, code: "orbit_update_required" with the field) or an integration source it does not recognise. Upgrading Orbit is the fix (see Updates). Packages already installed keep working from the signed bytes stored at install.

Hyperliquid perps 0.1.14 is built on the spot-sale integration source. Orbit versions before 0.1.8-rc.3 do not recognise that source, so they list the package under rejected (the reason names the template’s reviewed source), and get_package and audit_package for it fail. Safes that installed an earlier version keep trading with it. Hyperliquid perps 0.1.15 and later are built on the spot-buy integration source, which Orbit recognises from 0.1.8-rc.7 (the stable 0.1.8 included); earlier Orbit versions list them under rejected the same way. How an agent handles this is on Package changes.

Tiers are an ordered lattice, free < basic < pro (TIERS). A package declares one access.min_tier; a subscriber whose tier ranks at least that high may use it. access_declaration reads it once for every caller, and keeps absence distinct from an answer: a schema-4 or schema-5 manifest with neither access nor subscription is malformed, not free.

As of Orbit 0.1.8, onboarding works with these package ids (src/onboard/layers.rs):

Kind Ids
Layers dialectic/orbit-free, dialectic/orbit-basic, dialectic/orbit-pro, dialectic/orbit-pro-trading, dialectic/orbit-pro-perps
Utilities, always installed dialectic/starter-kit, dialectic/gas-top-up, dialectic/erc20-transfers (shown to users as Token Transfers), dialectic/basic-ops-subscribe

dialectic/orbit-free is shown to users as the Orbit Starter Package. It is a layer, and a different package from the Starter Kit utility (dialectic/starter-kit).

What a Safe may use is still decided by each manifest’s signed min_tier, never by its id. The tier filter on list_packages reads that field.

Each paid tier in the curator’s signed tiers carries terms: a list of {from_ts, receiver, amount, period_s, grace_s} entries (from_ts in Unix seconds, starting at 0 and strictly increasing; amount an exact USDC decimal; period_s and grace_s in seconds). A quote uses the latest entry whose from_ts has been reached at the time being priced (a renewal is priced at its next payment date) (src/onboard/subscribe.rs), so new terms are appended, never edited in place, and a payment is judged by the entry in force when it was made. Paid tiers may share one receiver: each approval is pinned to its tier’s exact amount and the collection names the tier. dialectic/basic-ops-subscribe approves exactly each tier’s price to the receiver in force, so a receiver change ships with a new version of that package. Read the live values with get_plans.

Manifest signature (verify_manifest_with):

  1. Take the manifest JSON and remove verification.manifest_sig.
  2. Canonicalize with JCS (RFC 8785).
  3. Message: makina-package-manifest/3/manifest + \n + the canonical JSON.
  4. EIP-191 personal-sign with the key in curator.pubkey; 65-byte hex signature.

The /3/ in the domain (DOMAIN_MANIFEST) is a frozen protocol identifier. It does not track schema_version and must never be derived from the document being verified: that would let the payload choose the terms its own signature is checked under. Schema 4 and 5 manifests sign under the same domain.

Other domains Orbit verifies:

Domain Signed object Key
makina-package-catalog/1/catalog Catalog envelope (JCS minus signature) Pinned curator key
makina-data-feed/1/position Feed position item The manifest’s feed.signer_pubkey
makina-data-feed/1/status Feed status item The manifest’s feed.signer_pubkey
makina-data-feed/1/key-rotation Feed key rotation statement The curator key, endorsing a new feed key (src/feed/keys.rs)

A feed key rotation therefore needs neither an Orbit change nor a reinstall.

A valid signature proves only that the manifest is what its embedded key signed. Identity comes from the pin (catalog::effective_pin): an entry under [packages.trusted_curators] in config first, then the compiled-in BUILTIN_CURATOR_PINS (curator id dialectic). verify_manifest_pinned refuses a manifest whose curator key differs from its pin, and refuses an unpinned curator with a message naming [packages.trusted_curators]. Install, and every installed-package fact that feeds an execution, go through the pinned check. Rotating the Dialectic publishing key means changing that constant and re-signing the published packages; tests/catalog_default.rs (nightly, network) goes red until both are done.

When a correctly pinned manifest fails only because it carries a field this Orbit does not know, Orbit says an update is needed (OrbitUpdateRequired) instead of calling it malformed. The parse itself stays strict.

The default catalog is https://feed.dialectic.com/v1/catalog (default_catalog_url), read with a bearer access key minted for the Safe. Without a key it is refused, never read anonymously. Git-hosted catalog URLs are not a source; they are redirected to the feed. A local file catalog and [packages] catalog_url overrides are supported.

The catalog host is untrusted for content (src/packages/catalog.rs):

  • The envelope (schema_version major 1) must be signed by the pinned curator key.
  • An entry is either inline (the full manifest) or an index row { package_id, latest, versions: [{ version, manifest_url, manifest_sha256, status }] }.
  • For an index row, Orbit fetches manifest_url and requires that the bytes hash to the signed manifest_sha256, and that the manifest’s package_id and version equal the entry’s. That blocks serving an older, still validly signed version in place of the latest.
  • Every resolved manifest goes through signature verification. Failures are listed under rejected and can never be installed. Packages whose latest version the curator retired are listed under no_longer_offered; Safes that already have them keep working.
Tool What it does
list_packages Verified catalog listing, filterable by strategy type, asset, chain and tier
get_package The full verified manifest of one package
audit_package Evidence-based audit of one package’s claims (below)
install_package Verify against the pin, audit, write the local registry, start the feed poller. Nothing on chain.
package_health Re-runs the feed audit and the accountForPosition probes for every installed package on a Safe
get_package_prices Advisory prices from the oracle routes installed packages declare. Not valuation.
remove_package Drops the package from the local registry and stops its feed. The signed root is unchanged, so its rules keep applying to its positions until the owner signs a root without them.

audit_package layers, at the default depth = "standard":

Layer Checks
L1 Manifest hygiene
L2 Venue identity: code at the vault, vault.asset() equals the declared asset
L3 Feed health against the declaration: coverage, per-item signatures, the live endpoint’s key against the manifest’s, freshness against declared cadence, auth discipline
L4 Machine fit: chain match, root overlap, mandate preview
L5 accountForPosition probes for positions already in the root

depth = "deep" adds venue view-function heuristics and probes every declared runtime requirement on chain. The audit checks claims, not operability; the fork test in compose_root is the authority on whether positions open and close. It gates almost nothing: only a signature or pin failure, a manifest Orbit cannot parse, or a claim the chain flatly refutes blocks an install.

install_package also refuses at install time when the package would contradict something already set, for example a debt package under an active no-debt mandate, or a feed-route staleness tolerance that conflicts with one an installed package declares for the same aggregator (the module keys tolerances by feed address, so both cannot hold).

The registry is one JSON file per Safe under ~/.orbit/packages/ (src/packages/registry.rs), written atomically. Each entry stores the version, the verified manifest, the raw signed manifest (so it can be re-verified against the pin later), and a content hash over the canonical raw bytes. The hash is taken over raw bytes, not the parsed struct, so an Orbit upgrade that learns a new field does not report drift on unchanged packages.

compose_root (src/tools/compose_tools.rs, src/compose/) turns installed packages into a root:

  1. Load the Safe’s persisted composition (the position set the current root was built from). A root without one refuses with a re-compose message.
  2. Continuity guard: the local rootfile’s root must equal the module’s live allowedInstrRoot(). A mismatch blocks, and so does an unreachable network.
  3. Merge installed-package positions, de-duplicated by position id.
  4. Render and transpile locally with Makina’s transpiler at the pinned rev, against the integrations source at the pinned ref (REVIEWED_INTEGRATIONS_REF unless [compose] integrations_ref overrides it). Orbit stages that source under the state directory itself. Both pins appear in every result, because a different ref over the same packages produces a different root.
  5. Preservation proof: every kept position’s instruction entries must be byte-identical to the current root’s, or composition is blocked naming the position.
  6. Write builds prove on a fork, as the Safe: apply setAllowedInstrRoot(new_root), then accountForPosition for every position. Any failure means no artifact.
  7. Deliver one setAllowedInstrRoot call for the owner, with a plain-language diff (added, removed, kept). After the owner executes it, finalize_root_update verifies and activates the exact reviewed batch, and verify_setup must report the root matching.

Composition writes only local files and prepares a call; funds never move.

Why a fixed-payee operation needs a new root

Section titled “Why a fixed-payee operation needs a new root”

The module runs only instructions whose leaf is under allowedInstrRoot, and a leaf commits to every state slot its bitmap marks as fixed (see makinaX and the module). An operation that pays a fixed recipient, such as a gas top-up to the operator or an allowlisted token transfer, bakes the recipient and amount into those fixed slots. That is the safety property: the agent cannot substitute another address at call time. It also means adding a recipient, changing an amount or removing one produces a different leaf, so a different root, and only the Safe can set a root. Every such change is a new composition and an owner signature. Removing a recipient removes its permission; unrelated positions keep byte-identical leaves through the preservation proof.

Value that leaves the Safe through a harvest-type leaf has no on-chain loss brake, so the manifest must list those verbs in egress with an explicit non-neutral direction. Policy refuses a listed verb with no declared direction, or one on which installed packages disagree.