Pack Manifest

Pack Manifest

Every Intelligence Pack requires a huitzo.yaml manifest file that defines metadata, policy, permissions, and configuration. This file is the single source of truth for all pack configuration — pyproject.toml is auto-generated from it by the CLI.

Schema v2 is code-first. The manifest schema is defined by the Pydantic models in huitzo_sdk.manifest (see ADR-003), not by this document. The models are the source of truth; this page is the human reference and is drift-tested against them in CI. The generated JSON Schema lives at manifest-schema.json.

Every manifest declares schema_version: 2. A required top-level schema_version: 2 literal gates the whole document. load_manifest() reads and validates the file once for both publish and install; a missing or non-2 value is rejected before any field validation runs.

No backwards compatibility. Legacy v1 forms now fail load_manifest() — there is no migration tooling. Pre-PMF, with zero customers, legacy manifests are rewritten, not migrated. The specific legacy forms that are rejected are listed in Legacy v1 forms that now fail to load.

pyproject.toml is generated. Never edit it directly. Run huitzo pack sync to regenerate it from huitzo.yaml; huitzo pack build, pack dev, and pack test regenerate it automatically when it is stale. Full field mapping: pyproject.toml Generation.

Manifest Files: Intelligence Packs use huitzo.yaml. Dashboards use huitzo-dashboard.yaml. See Dashboard Manifest for dashboard configuration.

Optional fullstack scaffolding. When a Pack ships alongside a Dashboard as one app, huitzo project init can scaffold both into a single directory. That is a CLI convenience for fullstack work — it does not change the Pack manifest below or anything about how huitzo pack ... behaves. Standalone Packs created with huitzo pack new remain fully supported. See Intelligence Projects if fullstack scaffolding is useful for your work.

Quick Example

schema_version: 2

pack:
  name: "my-company-analytics"
  namespace: "analytics"
  version: "1.0.0"
  description: "Business analytics and reporting tools"
  visibility: "organization"
  author: "My Company"
  license: "proprietary"

# Required machine-readable governance artifact (the Policy Card).
policy:
  autonomy: "act_with_approval"
  allowed_actions:
    - "llm:complete"
  data_scope:
    scope: "tenant"
  audit:
    level: "standard"

# One pack-level permissions list (must be a subset of policy.allowed_actions).
permissions:
  - "llm:complete"

commands:
  - name: "generate-report"
    description: "Generate analytics report"
    entry_point: "my_company_analytics.commands.report:generate_report"
    timeout: 300
    queue: "long"

  - name: "quick-summary"
    description: "Get quick data summary"
    entry_point: "my_company_analytics.commands.summary:quick_summary"
    timeout: 30
    queue: "fast"

state:
  collections:
    - name: reports
      scope: user
      key_prefix: analytics/reports
      model: my_company_analytics.models:Report

services:
  llm:
    required: true
    requirements:
      min_context: 16000
      capabilities: ["structured_output"]
  email:
    required: false
  telegram:
    required: false

secrets:
  user_required:
    - name: "ANALYTICS_API_KEY"
      description: "Your analytics provider API key"
      help_url: "https://analytics.example.com/api-keys"
  user_optional:
    - name: "PREMIUM_API_KEY"
      description: "Optional premium tier API key"

metadata:
  homepage: "https://example.com/analytics-pack"
  repository: "https://github.com/example/analytics-pack"
  documentation: "https://docs.example.com/analytics"
  keywords: ["analytics", "reporting", "business-intelligence"]
  category: "business"

File Structure

The manifest uses YAML format with these main sections:

Section Required Description
schema_version ✅ Yes Literal 2 — gates the whole document
pack ✅ Yes Core pack metadata (and pricing)
policy ✅ Yes Policy Card — governance artifact
permissions ❌ No (default []) One pack-level permission list
commands ✅ Yes Command definitions (≥1)
services ❌ No Typed per-service dependencies
declarations ❌ No (default advisory) strict or advisory: whether the state declarations below are complete and enforced by the code check
state ❌ No Durable state the pack keeps: state.collections[] (see State Declarations)
mcp_servers ❌ No MCP server configurations
extensions ❌ No Deployment-scoped extensions this pack depends on
ssh_targets ❌ No SSH target access declarations
secrets ❌ No User-provided secrets configuration
pipelines ❌ No Reusable command pipelines
deployment ❌ No Deployment capability flags
resources ❌ No Pack-level resource requirements
embedded_models ❌ No Embedded AI models (edge, Year 3+)
metadata ❌ No Additional discovery metadata
listing ❌ No Marketplace/hub listing presentation (publisher, links, brand, descriptions)

Every section model sets extra="forbid": unknown keys are a hard error. This is how legacy forms are rejected on load — see Legacy v1 forms that now fail to load.


pyproject.toml Generation

pyproject.toml is a derived artifact. huitzo.yaml is the source of truth; the CLI projects it into a packaging file so standard Python tooling (hatchling, uv, pytest) can build and test the pack. The generated file carries a DO NOT EDIT banner — hand edits are overwritten on the next regeneration.

When it regenerates

Command Behaviour
huitzo pack sync Regenerates unconditionally. Use after hand-editing huitzo.yaml.
huitzo pack build Regenerates first if stale.
huitzo pack dev Regenerates first if stale.
huitzo pack test Regenerates first if stale.

"Stale" means pyproject.toml is missing, or its mtime is older than huitzo.yaml's.

What maps to what

The projection is mechanical — no field is invented and nothing in pyproject.toml is authoritative on its own.

huitzo.yaml pyproject.toml
pack.name [project] name
pack.version [project] version
pack.description [project] description
pack.author / pack.author_email [project] authors
pack.dependencies [project] dependencies (always prefixed with the huitzo-sdk requirement)
pack.dev_dependencies [project.optional-dependencies] dev
commands[].name + commands[].entry_point [project.entry-points."huitzo.commands"], keyed @<namespace>/<name>/<command>

Build backend (hatchling), requires-python, and the [tool.*] blocks are fixed by the generator, not drawn from the manifest.

Implementation: tools/cli/src/huitzo_cli/pyproject_gen.py. The manifest is parsed by the SDK's typed loader (huitzo_sdk.manifest.load_manifest), so generation consumes the schema described on this page rather than raw YAML — see ADR-003.


Pack Section

The pack section defines core metadata about your Intelligence Pack.

Required Fields

pack:
  name: "my-pack"           # Unique identifier (kebab-case)
  namespace: "mypack"       # Command namespace (lowercase, no dashes)
  version: "1.0.0"          # Semantic version
  description: "Short description of what the pack does"

Optional Fields

pack:
  # ... required fields ...

  visibility: "organization"  # public | unlisted | organization | private
  author: "Your Name"         # Pack author or company
  author_email: "[email protected]"  # Author email
  license: "MIT"              # License identifier
  min_sdk_version: "2.0.0"    # Minimum SDK version required
  min_platform_version: "2.0.0"  # Minimum platform version required

  # Python dependencies beyond huitzo-sdk (which is always included)
  dependencies:
    - "pydantic>=2.0"
    - "requests>=2.31"

  # Dev-only dependencies
  dev_dependencies:
    - "pytest>=9.0"
    - "ruff>=0.14"

  # Pricing (marketplace only)
  pricing:
    model: "one-time"         # one-time | subscription | usage
    price: 49                 # USD (0 = free)

pack.permissions is removed. Permissions are declared once at the manifest root (see Permissions), never under pack. A manifest carrying pack.permissions fails to load.

Field Reference

Field Type Required Default Description
name string ✅ - Unique pack identifier. Must be kebab-case.
namespace string ✅ - Command namespace. Lowercase, no special chars.
version string ✅ - Semantic version (MAJOR.MINOR.PATCH)
description string ✅ - Short description (max 200 chars)
visibility enum ❌ organization Access control level
author string ❌ - Author name or organization
author_email string ❌ - Author email
license string ❌ proprietary License identifier
min_sdk_version string ❌ - Minimum SDK version
min_platform_version string ❌ - Minimum platform version
dependencies list ❌ [] Python dependencies beyond huitzo-sdk
dev_dependencies list ❌ [] Dev-only Python dependencies
pricing object ❌ - Marketplace pricing (see Pricing)

Visibility Levels

Level Description Discovery Access
public Available to all tenants Searchable, browsable No access grant required
unlisted Hidden from discovery Not searchable Requires pack link or ID
organization Requires explicit access grant Org members only Must have PluginAccessGrant
private Only available to owner organization Owner only Owner tenant only

Unlisted Visibility

Unlisted packs are not discoverable through search or the pack marketplace, but can be accessed and installed using a direct link or pack ID. This is ideal for:

  • Agency model: Build custom packs for specific clients without exposing to other customers
  • Beta testing: Share with select users before public release
  • Custom enterprise: Deliver tailored solutions to specific organizations

Sharing an unlisted pack (planned): a huitzo pack share command and installing by pack ID are not in the CLI yet. Today an unlisted pack is reached by its exact namespace, for example huitzo run @scope/pack/command.

Important: An unlisted pack is left out of every list, but anyone who knows its exact namespace (@scope/pack/command) can reach it. Treat the namespace like a private invitation link.

Best Practice: Use organization (the default) for internal commercial packs. Use unlisted for client-specific deliverables. Use public only for utility/demo packs.


Policy Section

The policy section is the Policy Card — a required, machine-readable governance artifact that declares what a pack is allowed to do, over whose data, at what autonomy level, what must escalate to a human, and what it must log. It is embedded in the manifest (one file, one schema, one signature path) and consumed by the install-time consent UI. See ADR-005 for the full design.

policy: is required. A v2 manifest without a policy: section fails to load.

Configuration

policy:
  autonomy: "act_with_approval"     # read_only | suggest | act_with_approval | autonomous
  allowed_actions:                  # superset of the top-level permissions: list
    - "llm:complete"
    - "http:request"
  data_scope:
    scope: "tenant"                 # user | tenant
    external_domains:               # optional; must be ⊆ services.http.allowed_domains
      - "api.example.com"
  escalation:
    requires_human_approval:        # list of command names that must escalate
      - "send-outreach"
  audit:
    level: "detailed"               # standard | detailed

Field Reference

Field Type Required Default Description
autonomy enum ✅ - read_only | suggest | act_with_approval | autonomous
allowed_actions list ✅ - Permissions the policy permits — fixed tokens and/or parameterized grants; must be a superset of permissions:
data_scope.scope enum ✅ - user | tenant
data_scope.external_domains list ❌ [] If present, must be ⊆ services.http.allowed_domains
escalation.requires_human_approval list ❌ [] Command names that must escalate to a human
audit.level enum ❌ standard standard | detailed

Autonomy Levels

Level Meaning
read_only The pack only reads; it never mutates state or acts externally.
suggest The pack proposes actions for a human to take; it does not execute them.
act_with_approval The pack may act, but escalated commands require human approval.
autonomous The pack acts without per-action approval (opt-in, surfaced at install).

Cross-Validation Rules

load_manifest() enforces these checks at load time (so both publish and install reject a violation):

  1. permissions ⊆ policy.allowed_actions — every granted permission token must also be a declared allowed action. A pack cannot hold a capability its policy does not name.
  2. policy.data_scope.external_domains ⊆ services.http.allowed_domains — a policy cannot claim egress to a domain the HTTP service does not allow. Declaring external_domains with no services.http block is an error.
  3. policy.escalation.requires_human_approval ⊆ {command names} — every escalated command name must exist in commands:.
  4. Every granted permission has its backing service/section declared — e.g. http:request requires services.http, mcp:call requires at least one mcp_servers entry. See the permission registry for the full mapping.
  5. No duplicate names or tokens — duplicate command names, MCP server names, data type names, or duplicate permission tokens (in permissions: or policy.allowed_actions) are rejected, each error naming the offending value.

Escalation wiring is a fast-follow. v1 validates and surfaces requires_human_approval and stamps audit metadata, but does not yet pause execution on those commands. Wiring it into the live approval service is a named follow-up (ADR-005).


Permissions

Permissions control which platform services, host capabilities, and other packs a pack may use. There is one top-level permissions: list for the whole pack — there are no per-command permissions and no pack.permissions. Runtime enforcement is pack-level, so the schema declares one typed list.

permissions:
  - "llm:complete"
  - "http:request"
  - "storage:write"

A permission is one of two things:

  1. A fixed token from the closed registry below (ADR-003 D6). Unknown tokens fail validation with a message listing the valid set. A token is only grantable when the service/section it requires is declared (cross-validation rule 4 in Policy → Cross-Validation Rules).
  2. The one parameterized grant, commands:execute:<@scope/pack>, described under Parameterized Grants. It is not in the registry table because it is not enumerable — its meaning depends on the pack it names.

Permission Registry (v2)

Token Description Requires declared Risk
storage:read Read from pack/user storage — (always available) low
storage:write Write to pack/user storage — low
files:read Read uploaded files services.files low
files:write Write files services.files low
files:delete Delete and move files services.files medium
llm:complete LLM completion services.llm medium
llm:stream LLM streaming services.llm medium
http:request External HTTP egress services.http medium
email:send Send email services.email medium
tts:synthesize Synthesize speech from text services.tts medium
telegram:send Send Telegram messages services.telegram medium
mcp:call Call MCP server tools mcp_servers (≥1) high
ssh:execute Execute on SSH targets services.ssh + ssh_targets high
exec:local Run local subprocesses — (declares intent) high
  • exec:local is new in v2. It names the scope for packs that run deliberately-host-gated local subprocesses. It maps to no services: block — it is an intent declaration surfaced by the Policy Card, gated by the host rather than by a context client.
  • files:delete also gates move/rename, not only deletion — both end in a delete, so both require this token in addition to files:write (see services.files.integrations). Each ctx.files operation is checked against its own token at runtime; the mapping is in Files permissions.
  • The requires column is the service/section that must be declared for the token to be grantable. The risk column is the consent-UI tier shown to users at install time.
  • This table is the whole fixed vocabulary. It stays closed on purpose: a closed set is what lets validation answer a typo with "here are the valid tokens" instead of a shrug.

Parameterized Grants

One permission cannot be enumerated, because it is parameterized by its target:

# pseudocode — a declaring pack that runs another pack's commands

permissions:
  - "commands:execute:@acme/claims"
policy:
  allowed_actions:
    - "commands:execute:@acme/claims"     # ADR-005 rule 1 still applies
Grant Description Requires declared Risk
commands:execute:<@scope/pack> Run commands published by <@scope/pack> from a pipeline stage — (the backing declaration lives in the target pack) high
  • The target is a scoped pack identity, @scope/pack — leading @ included, exactly as the platform spells a pack at runtime. There is no de-scoped or flattened form; one is rejected at publish and could never match at execution.
  • requires is empty because nothing in this manifest backs it. There is no services: block for "another pack". The backing check is the pipeline stage that names the target, enforced by the CLI validator at publish and by the pipeline gate at execution.
  • Risk is high. Cross-pack execution hands another pack the caller's execution context — the same blast radius as mcp:call or ssh:execute.
  • Holding the grant is necessary, not sufficient. You write it in your own manifest, so on its own it authorizes nothing; the tenant running the pipeline must also be entitled to the target pack. See Cross-Pack Pipelines.

A malformed grant is rejected by name — the error quotes the offending target and the identity grammar it failed, rather than listing fixed tokens that could never have applied.

Best Practice: Request only the permissions your pack needs. Users see the required permissions and their risk tiers before installing.


Pricing Section

The pricing section configures marketplace pricing for your pack. It lives under pack: (the pack.pricing field). This section only applies to Cloud (SaaS) deployments; self-hosted packs cannot be sold on the marketplace.

pack.pricing is legacy under the PAYG credit wallet. It predates the wallet and models one-time purchases, subscriptions, and USD-denominated usage pricing — three commercial models the wallet does not have. The forward path, the exact map-vs-reject disposition of every block below, and the USD→credit conversion are specified in Execution-Pricing Schema Specification → Legacy pack.pricing compatibility. Nothing has changed yet: PricingSpec still ships as documented here, and the mapping is not implemented. The Revenue Split table below is likewise superseded by the D-10 formula (§4.2) once that lands — it describes the pre-PAYG tiered marketplace share, which the credit wallet does not implement.

Basic Pricing

pack:
  pricing:
    model: "one-time"
    price: 49

Full Pricing Configuration

pack:
  pricing:
    model: "one-time"           # one-time | subscription | usage
    price: 49                   # USD (0 = free, minimum $5 for paid)
    currency: "usd"             # Only USD initially

    # Subscription-only fields
    billing_period: "monthly"   # monthly | annual
    trial_days: 14              # Free trial period

    # Usage-based fields
    per_execution: 0.05         # USD per command execution
    monthly_minimum: 5          # Optional minimum monthly charge

Pricing Models

One-Time Purchase

Customer pays once for permanent access to the pack:

pack:
  pricing:
    model: "one-time"
    price: 49
  • Best for: Tools, utilities, standalone solutions
  • Customer gets: Lifetime access to current version
  • Updates: Major versions may require repurchase (at developer's discretion)

Subscription

Recurring billing for ongoing access:

pack:
  pricing:
    model: "subscription"
    price: 19
    billing_period: "monthly"
    trial_days: 14
Field Type Default Description
billing_period enum monthly monthly or annual
trial_days int 0 Free trial duration (0-30 days)
  • Best for: Packs with ongoing value, regular updates
  • Customer gets: Access while subscribed
  • Cancellation: Loses access at end of billing period

Usage-Based

Pay-per-execution pricing:

pack:
  pricing:
    model: "usage"
    per_execution: 0.05
    monthly_minimum: 5
Field Type Default Description
per_execution float required USD per command execution
monthly_minimum float 0 Minimum monthly charge
  • Best for: API-style packs, high-volume processing
  • Customer pays: Based on actual usage
  • Billing: Monthly invoice based on execution count

Free Packs

Set price to 0 for free distribution:

pack:
  pricing:
    model: "one-time"
    price: 0

Free packs: - No Stripe account required - No platform fees - Appear in marketplace with "Free" badge - Great for community building, demos, open-source tools

Pricing Field Reference

Field Type Required Default Description
model enum ❌ one-time Pricing model
price int ❌ 0 Price in USD
currency string ❌ usd Currency code (USD only initially)
billing_period enum ❌ monthly For subscriptions only
trial_days int ❌ 0 Free trial days (subscriptions only)
per_execution float ❌ - Per-execution price (usage only)
monthly_minimum float ❌ 0 Minimum monthly charge (usage only)

Revenue Split

See Billing Reference for complete revenue split details.

Annual Revenue Platform Fee Developer Keeps
$0 - $5,000 0% 100%
$5,001 - $50,000 20% 80%
$50,001+ 10% 90%

Commands Section

The commands section lists all commands provided by the pack with their configurations. At least one command is required.

Basic Command

commands:
  - name: "hello"
    description: "Say hello"
    entry_point: "my_pack.commands.hello:hello_world"

Full Command Configuration

commands:
  - name: "analyze-data"
    description: "Analyze dataset and generate insights"
    entry_point: "my_pack.commands.analyze:analyze_data"
    timeout: 300
    queue: "long"
    retries: 3
    output_format: "json"
    schedule: null
    deprecated: false
    deprecation_message: null

commands[].permissions is removed. Permissions are declared once at the manifest root (see Permissions), never per command. A manifest carrying commands[].permissions fails to load.

Command Field Reference

Field Type Required Default Description
name string ✅ - Command name (kebab-case)
description string ✅ - One-line summary shown in listings; the full description comes from the command's docstring or description=. See Command description
entry_point string ✅ - Python entry point (module.path:function)
timeout int ❌ 60 Max execution time (seconds). Publish refuses a value above the resolved queue's ceiling (fast 570 s, medium 1170 s, long 32370 s: the stale-execution reaper's per-queue threshold of 630 / 1230 / 32430 s minus 60 s), so a command the reaper would fail mid-run is never accepted. Rows already published above their ceiling are untouched and are still failed by the reaper at their queue's threshold (scaling.md, #1926). Must equal the @command decorator's value — see Command Runtime Contract
queue enum ❌ medium Task queue: fast, medium, long. Must equal the decorator's resolved queue — see Command Runtime Contract
retries int ❌ 3 Max retry attempts
output_format string ❌ json Default output format
schedule string ❌ - Cron expression for scheduled execution, ≤128 chars (e.g., "0 8 * * 1-5")
deprecated bool ❌ false Mark command as deprecated
deprecation_message string ❌ - Message shown for deprecated commands
resources object ❌ - Resource requirements (see below)
reads list[string] ❌ [] Declared state.collections the command reads (see State Declarations)
writes list[string] ❌ [] Declared collections the command writes; a command that deletes lists the collection in both reads and writes
returns string ❌ - Result model, module.path:Class; optional, the SDK also reads the function's return annotation
calls list[string] ❌ [] Commands of this pack it calls through ctx.commands.execute or a ctx.pipeline, by name

Command Runtime Contract

timeout and queue are declarations that must equal the @command decorator's values, not a second place to configure them. Publish compares every extracted command against its manifest entry and refuses the upload with 400 command_contract_violation on any divergence, listing the violations (see rest.md#command-runtime-contract). The same gate refuses a partial wheel: every huitzo.commands entry point must load as a command, and every declared command must be extracted. The extraction child is the only place publish imports the pack: the API process never does (Untrusted code at publish). A 201 therefore means every command the manifest declares was extracted.

Why the manifest cannot simply win. The decorator is the single runtime source on every path that matters, and it is read in more than one place:

  • the SDK wrapper enforces timeout inside the command's own isolated child (asyncio.wait_for on the decorator's value), so the effective ceiling is min(decorator, row) — a manifest that raised timeout would be silently cut back by the wrapper;
  • on-demand single-command dispatch and pipeline stages resolve queue from the registry metadata, which is populated from the decorator's arguments as the build's isolated child described them, while scheduled dispatch reads the row. Writing a manifest value to the row alone would send the same command to two different queues depending on how it was started.

So the manifest is a checked mirror: editing it without editing the decorator is not a silent no-op any more — it is a publish-time error naming the command and the field.

Comparison rules

Field Compared as
load Every huitzo.commands entry point in the wheel must load as a command. One that raises ImportError, AttributeError, BadZipFile or OSError when loaded, or whose target is not decorated with @command, is a violation. command and entry_point are the entry-point name as registered; error is the reason: not decorated with @command, or the exception's type (cut to 100 characters) and message, with the build's venv path shown as <venv>; manifest and decorator are null. Each of these strings is cut to 200 characters, like every string a violation echoes (see Bounds below). Any other exception raised while an entry point loads (a SyntaxError in its module, say) is not a violation: it stops the extraction, and publish answers 400 Wheel installation failed without naming the entry point.
declared Every extracted command must have a manifest entry with the same name. A command the wheel exports but the manifest does not declare is a violation (field declared).
timeout Integer equality with the decorator's timeout. Independently, the decorator's timeout must not exceed the resolved queue's ceiling, the stale-execution reaper's threshold minus the broker's 60 s expiry margin: fast 570 s, medium 1170 s, long 32370 s. A longer command would be failed mid-run by the reaper, so publish refuses it (an explicit queue: fast with timeout: 3600 included); auto never trips the fast/medium ceilings, but a timeout above 32370 s is refused on every queue, auto included. The common trigger is the default: an omitted queue is medium, so any timeout above 1170 s without queue="long" is refused. The violation carries queue and ceiling. Existing published rows are untouched; only a (re)publish is refused (#1926).
queue The decorator's value is resolved first (see Queue Resolution) and the resolved value is compared to the manifest's. A decorator declaring auto or the legacy default alias therefore matches the concrete value it resolves to; the error shows both ('auto' (resolves to 'fast')).
missing Every manifest entry must have an extracted command with the same name. A declared command the wheel does not export is a violation; manifest is its declared entry_point and decorator is null. An entry point that failed to load accounts for a declared name when its namespace is the pack's @scope/pack/ followed by that name: the command is then reported once, as load, never also as missing. A failed entry point outside @scope/pack/ (another pack's namespace, or a bare name) accounts for no declared name; it is still reported as load.

A partial wheel never publishes. A command the manifest declares but the version does not serve leaves no trace in a successful response: the published command list is just shorter than the manifest, and a client that later calls or lists the absent command has no error to trace back to the publish. So publish accounts for every entry point and every declared command, and refuses the upload unless they all line up. A wheel with no huitzo.commands entry point at all (read from its entry_points.txt) is refused before it is installed, with No commands extracted from package; a wheel whose every entry point fails reports up to 50 of them as load and counts the rest (see Bounds below).

Extraction loads the wheel in its own venv, in a separate process, as the publish UID. Publish does not load it again in the API process. The publishing replica registers the build in the background once the publish commits; every other replica registers it on its first call through the inline miss path (or the reload notification, or its next start-up). That first registration describes the build's commands in an isolated child and stores what it learns; an entry point it cannot describe is not registered, is logged at ERROR, and is shown to staff on GET /admin/packs (see Static registration).

Every violation carries its message. Each entry in details.violations has command, field, manifest and decorator (a load entry adds entry_point and error; a duplicate entry adds decorator_total), plus message: the line publish writes for that entry, so a client can print every violation without knowing each field. details.total counts every violation, listed or not. error.message is the first entry's message; when there are more violations, it ends in (and N more; see details.violations), where N is details.total minus one. Entries are listed in this order: load, then the name checks, then declared, timeout and queue for each extracted command, then missing.

Bounds. A response lists at most 100 violations in details.violations. Extraction lists at most 50 failed entry points; the ones past the first 50 are not listed but are counted in details.total. When more than 50 entry points fail, the missing check is skipped, because an unlisted failure could account for any declared name: publish reports the failures it has, and a missing command is reported once they are fixed. Neither a namespace nor a command name has a length limit of its own, so every string a violation echoes from the wheel or the manifest (command, manifest, a string decorator, entry_point, error, and each namespace in a list) is cut to 200 characters, in the entry and in the message built from it. A duplicate entry lists at most 10 namespaces in decorator, and decorator_total counts them all. namespace_mismatch (an extracted namespace outside the pack's @scope/pack/) lists at most 100 in details.namespaces, each cut to 200 characters, and counts them all in details.total; its error.message names at most 10.

Example

commands:
  - name: "analyze-data"
    entry_point: "my_pack.commands.analyze:analyze_data"
    timeout: 300          # must equal @command(timeout=300)
    queue: "medium"       # must equal the decorator's resolved queue
{
  "error": {
    "message": "Command 'analyze-data' declares timeout 300 in the manifest but 60 in its decorator",
    "details": {
      "code": "command_contract_violation",
      "violations": [
        {"command": "analyze-data", "field": "timeout", "manifest": 300, "decorator": 60,
         "message": "Command 'analyze-data' declares timeout 300 in the manifest but 60 in its decorator"}
      ],
      "total": 1
    }
  }
}

A partial wheel: the export-csv entry point cannot import jinja2, the summarize function lost its @command, and nothing exports the declared forecast. The first two are declared too, but their failed entry points account for them, so neither is also missing:

{
  "error": {
    "message": "Entry point '@acme/my-pack/export-csv' did not load as a command: ModuleNotFoundError: No module named 'jinja2' (and 2 more; see details.violations)",
    "details": {
      "code": "command_contract_violation",
      "violations": [
        {"command": "@acme/my-pack/export-csv", "field": "load", "manifest": null, "decorator": null,
         "entry_point": "@acme/my-pack/export-csv",
         "error": "ModuleNotFoundError: No module named 'jinja2'",
         "message": "Entry point '@acme/my-pack/export-csv' did not load as a command: ModuleNotFoundError: No module named 'jinja2'"},
        {"command": "@acme/my-pack/summarize", "field": "load", "manifest": null, "decorator": null,
         "entry_point": "@acme/my-pack/summarize",
         "error": "not decorated with @command",
         "message": "Entry point '@acme/my-pack/summarize' did not load as a command: not decorated with @command"},
        {"command": "forecast", "field": "missing",
         "manifest": "my_pack.commands.forecast:forecast", "decorator": null,
         "message": "Command 'forecast' is declared in the manifest (entry point 'my_pack.commands.forecast:forecast') but the wheel does not export it"}
      ],
      "total": 3
    }
  }
}

resources.timeout_seconds is not read by the platform — it is a scheduling hint only. timeout above is the value that stops a running command.

Command Name Checks

The same gate also checks the names the wheel exports. These checks need no manifest entry, so a wheel built by hand (outside huitzo pack sync) is held to the same rules as one the CLI generated:

Field Violation when decorator shows
duplicate Two or more entry points yield the same command name in one version. One violation per duplicated name. The entry-point namespaces that yielded that name, at most 10; decorator_total counts them all
namespace The command segment of the namespace (the part after @scope/pack/) is not exactly the command's name, or is not one kebab-case identifier: a lowercase letter first, then lowercase letters, digits, and hyphens. The full namespace
  • Duplicates used to reach the database, where the unique index on (pack_version_id, name) refused the flush and publish reported it as 409 Version … already published: the wrong problem, and no offender named. Now publish reports every duplicated name and stops before any row is written.
  • The namespace rule is the SDK's own identifier segment (huitzo_sdk.identifiers.SEGMENT), the same rule the scope and pack name already follow. The Hub command palette lists only namespaces of that shape (Namespace Format), so a malformed one would publish and then silently disappear from it.
  • The segment must be the name because every resolver (get, execute, schedules, pipelines) looks a namespace up by matching its last segment against the command's name. A namespace ending in anything else would publish, be listed, and answer 404 at the address it was listed under. huitzo pack sync writes each entry point as @{scope}/{pack}/{manifest name}, so a CLI-built wheel differs only when a decorator's name disagrees with its manifest entry (typically a typo), and the declared and missing rules above already refuse that wheel too.

manifest is null for both fields: neither compares against a manifest declaration. They are reported in the same 400 command_contract_violation response as the rules above, after any load entries and ahead of the comparisons, within the same bounds:

{
  "error": {
    "message": "Command 'analyze' is exported by 2 entry points: '@acme/my-pack/analyze', '@acme/my-pack/analyze-v2' (and 2 more; see details.violations)",
    "details": {
      "code": "command_contract_violation",
      "violations": [
        {"command": "analyze", "field": "duplicate", "manifest": null,
         "decorator": ["@acme/my-pack/analyze", "@acme/my-pack/analyze-v2"],
         "decorator_total": 2,
         "message": "Command 'analyze' is exported by 2 entry points: '@acme/my-pack/analyze', '@acme/my-pack/analyze-v2'"},
        {"command": "analyze", "field": "namespace", "manifest": null,
         "decorator": "@acme/my-pack/analyze-v2",
         "message": "Command namespace '@acme/my-pack/analyze-v2' must end in the command's name 'analyze', as one kebab-case segment: a lowercase letter, then lowercase letters, digits and hyphens"},
        {"command": "Export_CSV", "field": "namespace", "manifest": null,
         "decorator": "@acme/my-pack/Export_CSV",
         "message": "Command namespace '@acme/my-pack/Export_CSV' must end in the command's name 'Export_CSV', as one kebab-case segment: a lowercase letter, then lowercase letters, digits and hyphens"}
      ],
      "total": 3
    }
  }
}

Scheduled Commands

Commands can declare a schedule field with a standard cron expression. The platform's Celery Beat scheduler checks every minute and dispatches commands whose schedule is due.

# pseudocode — scheduled command configuration
commands:
  - name: "daily-research"
    description: "Fetch and summarize daily news"
    entry_point: "my_pack.commands.research:daily_research"
    timeout: 300
    queue: "medium"
    schedule: "0 8 * * 1-5"    # Mon-Fri at 8:00 AM UTC

When a scheduled command runs, ctx.cron.is_scheduled is True and ctx.cron.schedule contains the cron expression. On-demand invocations of the same command have ctx.cron.is_scheduled set to False.

Each occurrence is dispatched at most once. The dispatcher claims every occurrence (schedule plus minute) in the database before enqueueing it, so extra scheduler ticks or a second scheduler process never enqueue or bill a command twice. If the claim cannot be written, that occurrence is skipped rather than risked twice (scaling.md#scheduled-dispatch-idempotency). The broker can still deliver a run twice when its worker dies or crashes mid-run, because commands are acknowledged only after they finish. A run that is merely slow is not redelivered: the worker's redelivery window is 36000 s (10 hours), above the longest queue budget, and every worker sharing a broker must use the same value (see scaling.md). A scheduled command with external side effects (emails, posts, charges) should therefore be idempotent, with an atomic guard keyed on the command and ctx.cron.scheduled_at (plus the subscriber for a per-user schedule): every command dispatched on one tick carries the same scheduled_at, and the value is the same on every delivery. Put the guard where an atomic insert-if-absent exists, such as the external service's idempotency key or a unique constraint in a database the pack controls. ctx.storage cannot hold it: its save is an unconditional upsert, and exists followed by save is a read-then-write check that races when two copies run at once.

Cron Expression Format: Standard five-field format: minute hour day-of-month month day-of-week. Examples:

Expression Description
* * * * * Every minute
0 8 * * 1-5 Weekdays at 8:00 AM
0 0 1,15 * * 1st and 15th of month at midnight
*/15 * * * * Every 15 minutes

Requirements: Commands with a schedule field must also declare cron in services — enforced at publish time (400 schedule_without_cron_service, naming every offending command), not merely documented convention.

Limit: A single manifest may declare at most 20 scheduled commands (400 scheduled_command_limit_exceeded past that). This is a per-pack-version bound, independent of the tenant-wide monthly_command_cap quota that governs actual dispatch volume.

No backfill. This wiring applies only to versions published after it landed (issue #1347) — Command.schedule is set at publish time from the manifest, and a pack published before this change has no schedule recorded regardless of what its huitzo.yaml says, even though the manifest itself is unchanged. A schedule takes effect starting with the pack's next publish; there is no mechanism to recompute it for an already-published version (unlike queue, which has had a recompute path).

Minimum Schedule Interval

Implementation status: fully wired (issue #1347). CommandSpec.schedule validates against the floor below at manifest parse time (huitzo-sdk 1.4.0) — a manifest declaring schedule: "* * * * *" is rejected, including step-syntax spellings such as "0/1 * * * *". Publish then projects the validated value onto the stored Command row (apps/backend/src/backend/api/v1/packs.py; the SDK @command decorator has no schedule parameter — the manifest is the sole authority, unlike timeout/queue, which have a decorator to reconcile against), so the manifest-cron dispatcher's discovery query (Command.schedule.isnot(None), apps/worker/src/worker/tasks/scheduled.py) now matches a manifest-declared schedule. The "Beat tick cost" and "quota gate interaction" rationale below describes real dispatch traffic, not a future projection.

A schedule must not fire more often than once every 15 minutes — the same floor already enforced for per-user command subscriptions (ADR-030 §5, _MIN_INTERVAL_MINUTES). Reusing that number keeps one consistent floor across both scheduling surfaces; the two are validated independently and share no code.

This floor is not the primary availability control — the per-occurrence quota gate is. That gate already exists and is already live for the sibling per-user schedule surface (ADR-030): check_scheduled_quota (apps/backend/src/backend/auth/tenant_quota.py) checks the tenant's monthly_command_cap before each occurrence (see Tenant quotas — enforcement contract), and its manifest-cron call site (apps/worker/src/worker/tasks/scheduled.py) is now reachable, since the discovery query upstream of it matches a manifest-declared schedule (see the status note above). An over-cap tenant's due schedule is skipped and logged, not dispatched, so a too-tight schedule is not the primary way a tenant gets locked out of interactive command execution — but it is not a complete substitute for the floor either, since check_scheduled_quota deliberately fails open on its own DB errors (dispatches anyway, logged, rather than halting every scheduled command platform-wide on a transient connectivity blip), and during that window a dense schedule would dispatch unchecked and could still burn the cap. The floor narrows that residual window and, independent of it, exists because a sub-15-minute schedule still costs a Beat tick's DB round-trip on every occurrence it's checked against — quota skip or not, once checking happens at all — and because a schedule that dense is essentially never an intentional design; it's the kind of value a copy-pasted or unedited schedule: field ends up with.

Enforcement point. A violation is rejected at manifest load time — a PackManifest/CommandSpec model validator, the same seam the cross-validation rules above already run on. That seam is what both huitzo pack publish (CLI, via load_manifest()) and backend install (PackManifest.model_validate(), called directly on the uploaded manifest — see apps/backend/src/backend/api/v1/packs.py) actually share: load_manifest() itself is a thin file-reading wrapper around the same PackManifest.model_validate() call, so putting the floor on the model is what makes both a huitzo pack publish and a raw upload to the backend API reject a violation before it ever reaches Beat, rather than accepting it and having every occurrence silently quota-skip. This matches the existing "reject at load, not at first run" posture for every other manifest-level constraint on this page.

Resources Configuration

Specify per-command resource requirements via the command-level resources block:

commands:
  - name: "heavy-analysis"
    description: "Analyze large datasets"
    entry_point: "my_pack.commands.heavy:heavy_analysis"
    resources:
      tier: "standard"        # standard | compute | gpu
      timeout_seconds: 300    # Max execution time
      memory_hint: "256MB"    # Helps platform optimize scheduling
      cpu_hint: "0.5"         # Relative CPU weight (0.1 - 2.0)
Field Type Default Description
tier enum standard Worker tier: standard, compute, gpu
timeout_seconds int 60 Unread hint. Nothing in the platform reads this; commands[].timeout is the value that stops a running command
memory_hint string - Expected memory usage (e.g., "256MB", "1GB")
cpu_hint string - Relative CPU intensity (0.1 - 2.0)

Tier Reference

Tier Memory CPU Status Use Case
standard 512 MB 0.5 cores Production Standard commands, API calls
compute 2 GB 1 core Future Data processing, file operations
gpu 8 GB + GPU 2 cores Future ML inference, image processing

Current Status (Year 1): - Only standard tier is available - compute and gpu tiers are planned for future releases - The tier field is accepted for forward compatibility but does not currently affect worker routing - All commands run on standard tier workers (512MB RAM, 0.5 CPU)

Queue Options

Queue Dispatch Reaper stale-execution threshold Use Case
fast Inline in the API request ~10.5 minutes Quick lookups, simple operations
medium Celery worker (async, 202) ~20.5 minutes Standard operations
long Celery worker (async, 202) ~9 hours LLM calls, complex processing, batch jobs

What actually stops a command. The Celery worker pools impose no per-queue time limit. timeout is the only thing that stops a running command. The per-queue figures above are the stale-execution reaper thresholds (apps/backend/src/backend/cleanup/stale_executions.py): a command still running past its queue's threshold has its execution record provisionally closed failure — but if it later reports its real result, the tracking layer supersedes that provisional closure with the authoritative result rather than discarding it (see system-monitor.md#stale-execution-cleanup). Choose queue so that budget comfortably exceeds timeout.

Queue Resolution

auto was removed from the manifest schema (issue #1285). A manifest declaring queue: "auto" now fails PackManifest validation at publish time — CommandSpec.queue is a QueueName literal of fast / medium / long only, and the declared default is medium. The resolver described below still runs at the backend, because it is the single normalization seam every dispatch path shares (see "One resolver, every path" below) — but for a new manifest publish it now only ever sees the three concrete values — huitzo pack add-command omits the queue: key entirely rather than writing default, and the schema rejects default exactly as it rejects auto. The resolver still handles both auto and the legacy default alias for already-published commands whose stored manifest predates the schema change, and for any pack source that constructs queue="auto" directly via the @command decorator rather than the manifest (the decorator's CommandMetadata is an unvalidated dataclass, so this stays possible indefinitely).

When the resolver does see auto, it resolves from the command's declared timeout — not from execution statistics. No statistics are collected by huitzo pack dev, huitzo pack test, or huitzo pack build, and none are consumed at runtime.

Declared timeout Resolved queue
<= 300 s fast
301–900 s medium
> 900 s long

Two properties of the resolver are worth relying on:

  • Every resolved queue is concrete. Any value outside fast/medium/long — including auto, the legacy default alias, and anything unrecognized — is normalized before dispatch, so a command can never be published to a queue no worker consumes.
  • One resolver, every path. Single commands, pipeline stages, pack upload, and scheduled dispatch all resolve through apps/backend/src/backend/commands/queues.py, so the queue stored on a published command is the queue it is actually dispatched to.

Because timeout is a kill ceiling rather than a duration estimate, prefer declaring queue explicitly — especially when a command has highly variable execution time, calls external APIs with unpredictable latency, or must run in a specific queue for operational reasons.


Services Section

Declare external service dependencies and configuration requirements. Each service is a typed model under services: (extra="forbid"). The legacy context_services form is removed and a manifest carrying it fails to load.

services:
  llm:
    required: true
    requirements:
      min_context: 16000
      capabilities: ["structured_output"]
  email:
    required: false
  telegram:
    required: false
  http:
    required: true
    allowed_domains:
      - "api.example.com"
      - "data.example.org"

Service Reference

Service Description Configuration Fields
llm Large Language Model access required, requirements, profiles
http External HTTP requests required, allowed_domains, timeout, max_redirects
db Postgres / MySQL connectors required, integrations
email Email sending service required
tts Platform speech synthesis (ctx.tts) required
telegram Telegram bot integration required
cron Scheduled task execution required (paired with per-command schedule)
files File upload/download required, max_size_mb, allowed_types, integrations
ssh SSH execution required (paired with top-level ssh_targets)

LLM Service Configuration

The LLM service is model-agnostic (ADR-006). Packs never name models. Instead a pack declares the capability floor it needs as requirements, plus optional named profiles that add per-profile overrides. The deployment's model router resolves a profile to a concrete provider/model at runtime; a customer can swap models deployment-wide without touching a pack.

services:
  llm:
    required: true
    requirements:                          # the floor every profile must meet
      min_context: 16000
      capabilities: ["structured_output"]  # enum: structured_output | tool_use
    profiles:                              # optional named profiles
      accurate:
        min_context: 200000
        capabilities: ["structured_output"]
Field Type Default Description
required bool false Whether the LLM service must be available
requirements object - Capability floor: min_context, capabilities
requirements.min_context int - Minimum context window the resolved model must provide
requirements.capabilities list [] Required capabilities: structured_output, tool_use
profiles map {} Named profiles keyed by profile name; each value has the same shape as requirements

No model names in the manifest. services.llm carries no models, default_model, max_tokens, or temperature. Those legacy fields are removed; a manifest carrying any of them fails to load. Per-call knobs (temperature, max_tokens) are passed at the SDK call site, not declared in the manifest. The implicit "default" profile uses requirements.

HTTP Service Configuration

services:
  http:
    required: true
    allowed_domains:           # allowlist of permitted egress domains
      - "api.example.com"
      - "*.example.org"        # wildcard supported
    timeout: 60                # default timeout (seconds)
    max_redirects: 5           # max redirect follows
Field Type Default Description
required bool false Whether the HTTP service must be available
allowed_domains list [] Egress allowlist (no empty entries)
timeout int 60 Default request timeout in seconds
max_redirects int 5 Maximum redirects to follow

timeout and max_redirects are validated but not applied yet (#1872): ctx.http uses the platform's HUITZO_HTTP_DEFAULT_TIMEOUT (30 seconds) and HUITZO_HTTP_MAX_REDIRECTS (5) instead.

policy.data_scope.external_domains, when declared, must be a subset of services.http.allowed_domains (cross-validation rule 2).

Database Service Configuration

Declare services: db: to receive a ctx.db client at runtime. The former top-level db_integrations key is folded into the service as services.db.integrations: omit it (or set null) to allow any tenant-visible DB integration; provide a list to restrict to specific tenant-registered postgres / mysql Integration rows by name.

services:
  db:
    required: true
    integrations:
      - "primary"
      - "warehouse"
Field Type Default Description
required bool false Whether the DB service must be available
integrations list | null null Allowed integration names; null/omitted = any tenant-visible DB integration

The actual connection details (host, port, credentials, TLS, allow_ddl, row_limit) live on the Integration row in the registry — packs never see or edit them. See Integrations Reference → Database Integration for the runtime API and security limits.

Files Service Configuration

services:
  files:
    required: true
    max_size_mb: 25
    allowed_types: ["pdf", "png", "csv"]
    integrations:
      - "s3-primary"
Field Type Default Description
required bool false Whether the files service must be available
max_size_mb int | null null Maximum upload size in MB
allowed_types list [] Allowed file types (empty = any)
integrations list | null null Allowed object-storage integration names; null/omitted = any tenant-visible object-storage integration is allowed (a wildcard, not an opt-out)

integrations mirrors services.db.integrations exactly (ADR-033): omitted or null is a wildcard — "no allowlist means wildcard, not 'no bucket'" — so if the tenant has any s3 integration registered, it is used, and it wins over the platform-configured local filesystem backend. A pack that wants a specific bucket names it explicitly (e.g. ["s3-primary"]); a pack that wants to guarantee local-filesystem storage regardless of what the tenant has registered must not declare services.files at all. As with the database integration, the actual connection details live on the Integration row in the registry — packs never see or edit them.

This field's description in manifest-schema.json (mirrored verbatim from the huitzo-sdk 1.5.0 FilesService docstring) states the inverse of the paragraph above — that null/omitted means "no external connection" and the local filesystem is used. That text is stale; the wildcard reading above is what read_files_allowed_integrations / resolve_for_command (apps/backend/src/backend/packs/manifest_reader.py, apps/backend/src/backend/integrations_registry/service.py) actually implement. Tracked for a docstring correction in a future SDK release — manifest-schema.json is a generated artifact drift-tested byte-for-byte against the SDK models, so it cannot be hand-corrected here.

Email, Telegram, and Cron Services

These services declare a single required flag:

services:
  email:
    required: true
  telegram:
    required: false
  cron:
    required: true       # required when any command declares a schedule

SSH Service

Hosted execution: ctx.ssh is wired only when the pack declares services.ssh, a non-empty ssh_targets.allowed and ssh:execute in policy.allowed_actions, and the calling tenant has a matching ssh integration. See SSH Execution — Context Factory Integration for the routes that wire it.

services.ssh is paired with the top-level ssh_targets.allowed allowlist (see SSH Targets). The ssh:execute permission requires both.

services:
  ssh:
    required: true

State Declarations

A pack can declare the durable state it keeps and, per command, which of that state the command reads and writes, what it returns, and which commands it calls. Every key is optional; a hand-written pack may declare nothing. Studio-generated packs declare everything and set declarations: strict. The runtime does not read these keys: they describe the code, and the SDK's code check (python -I -m huitzo_sdk.impact.check .) and the change-impact analyser use them. The full contract is in the SDK's docs/state.md.

declarations: strict            # or advisory (the default)

state:
  collections:
    - name: jobs
      scope: tenant             # user | tenant | pack
      key_prefix: field-service/jobs
      model: field_service.models.domain:Job
      description: Work orders

commands:
  - name: save-job
    entry_point: field_service.commands.jobs:save_job
    description: Create or update a job
    reads: [jobs]
    writes: [jobs]
    returns: field_service.models.results:SaveJobResult
    calls: []

declarations

strict says the declarations are complete and enforced: every finding of the code check is an error. advisory (the default) reports the same findings as warnings, except an unreadable or invalid manifest, which is always an error. No other value validates.

Collection Field Reference (state.collections[])

Field Type Required Description
name string ✅ Lowercase letters, digits, -, _, starting with a letter, ≤64 chars; unique in the pack
scope enum ✅ user, tenant or pack (the scopes of ctx.storage)
key_prefix string ✅ Literal prefix; the collection owns every key <key_prefix>/<id>. Segments of A-Z a-z 0-9 _ - . separated by /, no ./.. segment, no leading or trailing /, ≤200 chars
model string ✅ Record type module.path:Class, a pydantic model in the pack, ≤256 chars
description string ❌ Free text

A pack declares at most 200 collections, and a command lists at most 200 entries in each of reads, writes and calls (a reads/writes entry is at most 64 characters, a calls entry or returns value at most 256). Two collections of the same scope may not overlap (neither <key_prefix>/ may start with the other's). The validator rejects a duplicate name, an overlap, a reads/writes entry that names no declared collection, a calls entry that names no command of the manifest, a duplicate list entry, and a model/returns value that is not of the form module.path:Class.

Scope Options

Scope Description Use Case
user Per-user data, fully isolated User preferences, history
tenant Shared within organization Team settings, shared caches
pack Shared across all users of pack Global pack configuration

data_types is removed (huitzo-sdk 1.11.0). Nothing consumed the old top-level data_types section, and a manifest that still carries it fails validation with an unknown-key error. Move its entries to state.collections. Retention (ttl_days) has no declaration equivalent.


MCP Servers Section

Not available on hosted execution yet: ctx.mcp is not wired on any hosted execution path, so a command that calls it fails with IntegrationError. Tracked in #1943.

The mcp_servers section declares external MCP (Model Context Protocol) servers that your pack can connect to. MCP provides a standardized way to integrate with external tools and services.

Key Concept: Huitzo consumes MCP servers—it does not expose itself as an MCP server. MCP tools become callable via ctx.mcp in your commands. No LLM required—this is pure protocol translation. Calling MCP tools requires the mcp:call permission and at least one declared server.

Basic Configuration (STDIO)

For MCP servers that run as local subprocesses:

mcp_servers:
  - name: github
    type: stdio
    command: ["uvx", "mcp-server-github"]
    env:
      GITHUB_TOKEN: "${secrets.GITHUB_TOKEN}"
    working_dir: null

HTTP+SSE Configuration (Remote)

For MCP servers accessible over HTTP:

mcp_servers:
  - name: postgres-remote
    type: http
    url: "https://mcp.example.com/postgres"
    headers:
      Authorization: "Bearer ${secrets.MCP_API_KEY}"
    timeout: 30

Transport Types

Type Description Use Case
stdio Local subprocess, communicates via stdin/stdout CLI tools, local servers
http Remote HTTP endpoint with SSE streaming Hosted MCP servers, enterprise gateways

STDIO Transport Field Reference

Field Type Required Default Description
name string ✅ — Unique server identifier (kebab-case)
type string ✅ — Must be "stdio"
command list[str] ✅ — Command and arguments to spawn (non-empty)
env dict ❌ {} Environment variables (supports ${secrets.NAME})
working_dir string ❌ - Working directory for subprocess

HTTP+SSE Transport Field Reference

Field Type Required Default Description
name string ✅ — Unique server identifier (kebab-case)
type string ✅ — Must be "http"
url string ✅ — Server endpoint URL (https required in production)
headers dict ❌ {} HTTP headers (supports ${secrets.NAME})
timeout int ❌ 30 Request timeout in seconds
force_plaintext_headers bool ❌ false Escape hatch: allow a literal value on a credential-shaped header (e.g. Authorization) instead of ${secrets.NAME}. Off by default so a hardcoded secret is rejected before it can be committed to huitzo.yaml. Set true only when the value is genuinely non-secret.

Secret Interpolation

Use ${secrets.NAME} syntax to reference user secrets in env and headers:

mcp_servers:
  - name: github
    type: stdio
    command: ["uvx", "mcp-server-github"]
    env:
      GITHUB_TOKEN: "${secrets.GITHUB_TOKEN}"

secrets:
  user_required:
    - name: "GITHUB_TOKEN"
      description: "Your GitHub personal access token"
      help_url: "https://github.com/settings/tokens"

Usage in Commands

Access MCP tools via ctx.mcp:

# pseudocode — calling an MCP tool from a command
from huitzo_sdk import command, Context

@command("create-issue", namespace="devtools")
async def create_issue(args, ctx):
    """Create a GitHub issue using MCP."""
    result = await ctx.mcp.call(
        server="github",
        tool="create_issue",
        arguments={"owner": args.owner, "repo": args.repo, "title": args.title},
    )
    return {"issue_number": result["number"]}

Extensions Section

The extensions section declares deployment-scoped extensions this pack depends on (epic #583). Each entry pins acceptable versions with a PEP 440 specifier; huitzo pack publish verifies the target deployment's /api/v1/capabilities advertises a matching version before the pack is allowed to publish. The ExtensionRequirement model lives in the SDK (huitzo_sdk.manifest.extensions).

extensions:
  - name: example
    version: ">=1.2,<2"           # PEP 440 specifier
    required: true                # publish fails if deployment doesn't serve it

  - name: salesforce
    version: "~=0.4"              # compatible-release, PEP 440
    required: false               # publish proceeds; runtime raises ExtensionNotAvailable

Field Reference

Field Type Required Default Notes
name string ✅ — kebab-case extension name (e.g. example).
version string ❌ "" (any) PEP 440 specifier (>=, <, ~=, ==, etc.). Empty = any.
required bool ❌ true true blocks publish if the deployment lacks the extension; false defers to runtime.

Runtime Behaviour

The manifest is the third layer of the enforcement chain (manifest → deployment descriptor → runtime loader). Required extensions are validated at publish time; optional extensions surface as ExtensionNotAvailable at the call site when the active deployment does not advertise them.

For the runtime API (ctx.integrations.<name>), the error taxonomy, and the worked example, see Extensions Reference. For the operator-facing descriptor and trust contract, see Deployment Capabilities.

  • Extensions Reference — Pack-author guide for ctx.integrations.<name>.
  • Deployment Capabilities — The /api/v1/capabilities contract.
  • ADR-001 — Extension Bundle Format

SSH Targets Section

Hosted execution: ctx.ssh is wired only when the pack declares services.ssh, a non-empty ssh_targets.allowed and ssh:execute in policy.allowed_actions, and the calling tenant has a matching ssh integration. See SSH Execution — Context Factory Integration for the routes that wire it.

The ssh_targets section declares which user-registered SSH targets your pack can access via ctx.ssh.run(). This enables packs to orchestrate tasks on user-owned hardware (GPU clusters, custom servers, on-premise machines). It is paired with services.ssh and the ssh:execute permission.

Allow All Targets

ssh_targets:
  allowed:
    - "*"          # Allow all user-registered targets

Restrict to Specific Targets

ssh_targets:
  allowed:
    - "gpu-cluster"
    - "preprocessing-server"

Field Reference

Field Type Required Default Description
allowed list[str] ❌ [] Target names the pack can access. ["*"] = allow all.

Behavior

  • If ssh_targets is omitted, the pack cannot use ctx.ssh (equivalent to allowed: [])
  • If allowed contains "*", the pack can access all targets the user has registered
  • If allowed contains specific names, only those targets are accessible
  • Target names must match the name field used when registering the target
  • The ssh:execute permission requires both services.ssh and a non-empty ssh_targets.allowed
  • The allowlist is always the executing pack's own: a command run as another pack's pipeline stage reaches the targets its manifest names, never the calling pack's
  • Publishing stores services.ssh and ssh_targets.allowed with the pack version; a version published before ctx.ssh was wired on hosted execution needs a republish

Security Model

Pack manifests create an allowlist that restricts which SSH targets a pack can access:

  1. User registers targets (e.g., "gpu-cluster", "web-server", "db-server")
  2. Pack declares ssh_targets.allowed: ["gpu-cluster"]
  3. At runtime, ctx.ssh.run("gpu-cluster", ...) succeeds
  4. ctx.ssh.run("web-server", ...) raises SSHError — not in pack's allowlist

This ensures packs can only access infrastructure the user has explicitly registered and the pack has explicitly declared.

See SSH Integration and SSH Targets Guide for complete documentation.


Secrets Section

The secrets section declares external API keys and credentials that users must provide to use your pack. This enables the three-tier secrets management system.

Three-Tier Secrets Model

Tier Owner Scope Access Method
Platform Admin Platform services No SDK accessor — consumed internally when the platform services ctx.llm / ctx.email / ctx.tts / ctx.telegram
Pack Developer Single pack Pack configuration (ctx.config — not yet available)
User End User User + Pack await ctx.secrets.require("API_KEY")

Only Tier 3 is declared in huitzo.yaml. There is no manifest syntax for requesting a platform secret, because the SDK never hands one to a pack. That is an API-surface contract, not a sandbox — see Secrets Management.

User Secrets Configuration

secrets:
  user_required:
    - name: "FINANCIAL_API_KEY"
      description: "Your API key from massive.com"
      help_url: "https://massive.com/developers/api-keys"

  user_optional:
    - name: "PREMIUM_API_KEY"
      description: "Optional premium tier API key for enhanced features"

Secret Field Reference

Field Type Required Description
name string ✅ Environment variable name (UPPER_SNAKE_CASE)
description string ✅ Human-readable description of the credential
help_url string ❌ Link to documentation for obtaining the key

description and help_url are publish-time metadata, not authorization inputs, and no surface renders them to a user today — only the name is projected into the stored manifest and read by the gate. Surface them yourself from the SecretsError handler; see Installation Flow.

The secrets section has two lists: user_required and user_optional.

Required vs Optional Secrets

Both lists grant the pack identical read authority: a name in either list is readable, a name in neither is refused before the lookup runs (see Declared-secret authorization). The difference between them is intent, surfaced to users — not access.

Required Secrets (user_required): - Declares that the pack cannot do its job without this secret - Accessing a missing required secret raises SecretsError at the point of use - Installation is not blocked on these today — the pack installs and the error surfaces when a command actually reads the value

Optional Secrets (user_optional): - Pack installs without these secrets - Use await ctx.secrets.get() with fallback behavior - Enable premium or enhanced features

Accessing User Secrets in Commands

# pseudocode — accessing user secrets from a command
from huitzo_sdk import command, Context
from huitzo_sdk.errors import SecretsError

@command("fetch-data", namespace="finance")
async def fetch_data(args, ctx):
    # Required secret - raises SecretsError if missing
    api_key = await ctx.secrets.require("FINANCIAL_API_KEY")
    # Optional secret - returns None if missing
    premium_key = await ctx.secrets.get("PREMIUM_API_KEY")
    response = await ctx.http.get(
        "https://api.massive.com/data",
        headers={"Authorization": f"Bearer {api_key}"},
    )
    return response

Security Model

User secrets are: - Encrypted at rest using platform encryption keys - Scoped to user + pack - other packs cannot access - Never logged - masked in all logs and error messages - Rotatable - users can update secrets without reinstalling

See Secrets Management Reference for complete documentation.


Pipelines Section

Declare reusable command pipelines. Each pipeline is an ordered chain of stages; each stage wraps a command reference plus pipeline-level config (accept_routes, buffer_size, checkpoint_after). The section is validated against huitzo_sdk.pipeline.types.PipelinesSpec whenever the manifest is loaded (for example by huitzo pack validate), and the platform exposes the pipeline at POST /api/v1/pipelines/{scope}/{pack}/{name}/execute. See Piping Protocol for the contract and Building Pipelines for the tutorial.

# pseudocode — pipelines section keyed by pipeline name
pipelines:
  text-summarizer:
    description: "Clean text, summarize via LLM, then format as markdown"
    timeout: 300            # seconds, 1..3600
    error_strategy: fail_fast
    stages:
      - name: cleanup
        command: "demo:text-cleanup"
      - name: summarize
        command: "demo:summarize"
      - name: format
        command: "demo:format"

Pipeline Field Reference

Field Type Required Default Description
description string ❌ - Human-readable summary
timeout int ❌ 300 Total pipeline timeout in seconds (1..3600)
error_strategy enum ❌ fail_fast Only fail_fast is supported
stages list ✅ - 1..32 entries — either a StageSpec or a ParallelBlock

Stage Field Reference

Field Type Required Default Description
name string ✅ - Unique stage identifier within the pipeline
command string ✅ - Command reference: namespace:command (intra-pack) or @scope/pack:namespace:command (cross-pack)
config object ❌ {} Stage-level config overrides forwarded to the command
accept_routes list[string] ❌ null Filter incoming chunks by PipeChunk.route (Resolution 2)
buffer_size int ❌ 100 Per-edge async queue bound (1..10_000)
checkpoint_after bool ❌ false Persist this stage's terminal output to tenant-scoped checkpoint storage

parallel: blocks (fan-out / fan-in) are reserved in the spec but rejected by the runtime until parallel execution ships.


Deployment Section

The deployment section declares which deployment modes your pack supports. This enables the platform to validate pack compatibility with different deployment targets.

deployment:
  cloud_capable: true          # Can run in Huitzo cloud (default: true)
  self_hosted_capable: true    # Can run on customer infrastructure (default: true)
  edge_capable: false          # Can run on edge devices (default: false)
  offline_capable: false       # Can operate without network (default: false)
  requires_internet: true      # Requires internet for functionality (default: true)

Field Reference

Field Type Default Description
cloud_capable bool true Pack can run in Huitzo-managed cloud
self_hosted_capable bool true Pack can run on customer infrastructure
edge_capable bool false Pack can run on edge devices (Year 3+)
offline_capable bool false Pack can operate without network (Year 3+)
requires_internet bool true Pack requires internet connectivity

Year 1: All fields are validated on pack registration. Only cloud_capable and self_hosted_capable affect deployment routing. Year 3+: edge_capable and offline_capable enable edge deployment routing when edge mode is implemented.


Resources Section

The resources section declares pack-level resource requirements. This helps the platform optimize execution and validate deployment feasibility.

resources:
  min_memory_mb: 256           # Minimum memory to execute
  recommended_memory_mb: 512   # Recommended for performance
  requires_gpu: false          # GPU required for execution

Field Reference

Field Type Default Description
min_memory_mb int 256 Minimum memory in MB
recommended_memory_mb int 512 Recommended memory in MB
requires_gpu bool false GPU required for execution

Embedded Models Section (Future)

The embedded_models section declares AI models that should be bundled with the pack for edge deployment. This section is validated but inactive until edge mode is implemented (Year 3+).

embedded_models:
  - id: "custom-ner"
    format: "onnx"             # onnx | pytorch | tensorflow
    size_mb: 128
    quantization: "int8"       # none | fp16 | int8
    description: "Custom NER model for entity extraction"

Field Reference (Future)

Field Type Description
id string Unique model identifier
format enum Model format: onnx, pytorch, tensorflow
size_mb int Model size in MB
quantization enum Quantization level: none, fp16, int8
description string Human-readable description

Current Status: This section is accepted and validated for forward compatibility, but models are not bundled until edge mode is implemented.


Metadata Section

Additional metadata for discoverability and documentation.

metadata:
  homepage: "https://example.com/my-pack"
  repository: "https://github.com/example/my-pack"
  documentation: "https://docs.example.com/my-pack"
  changelog: "https://github.com/example/my-pack/blob/main/CHANGELOG.md"
  keywords:
    - "analytics"
    - "reporting"
    - "data"
  category: "business"
  icon: "chart-bar"           # Icon name (Lucide icons)
  screenshots:
    - "https://example.com/screenshot1.png"
    - "https://example.com/screenshot2.png"

Field Reference

Field Type Description
homepage string Pack homepage URL
repository string Source repository URL
documentation string Documentation URL
changelog string Changelog URL
keywords list Search keywords
category string Discovery category
icon string Icon name (Lucide icons)
screenshots list Screenshot URLs

Category Options

Category Description
business Business tools, CRM, analytics
developer Development tools, utilities
productivity Personal productivity, notes, tasks
finance Financial analysis, accounting
marketing Marketing automation, campaigns
communication Email, chat, notifications
data Data processing, ETL, analysis
ai AI/ML tools, model integration
other Uncategorized

Listing Section

The optional listing: section carries marketplace/hub presentation metadata — publisher identity, discovery links, brand assets, and descriptive copy — shared conceptually by pack and dashboard manifests. See Dashboard Manifest → Listing Section for the dashboard-side counterpart.

Additive and fully backward compatible. Introduced in huitzo-sdk 1.5.0. listing: is entirely optional; a manifest that omits it is byte-identical to one predating this feature. When present, listing.publisher is the only required field — every other field is optional presentation metadata.

listing:
  publisher:
    name: "Acme Inc."
    organization: "Acme Inc."
    contact_email: "[email protected]"

  links:
    website: "https://acme.com/analytics-pack"
    support: "https://acme.com/support"

  legal:
    terms_url: "https://acme.com/terms"

  brand:
    logo: "assets/logo.png"     # bundle-relative — never an upload-service URL
    accent: "primary"           # primary | secondary | success | warning | danger | info | neutral

  compatibility:
    notes: "Tested against huitzo-sdk 1.4+ and platform v2.x."

  commercial:                   # see Commercial Declaration below
    execution_pricing:
      mode: "fixed_credits"     # free | fixed_credits
      credits_per_execution: 5

  short_description: "Business analytics and reporting, batteries included."
  long_description: "Full-length marketing copy for the marketplace listing page."
  screenshots:
    - "assets/screenshot-1.png"
    - "assets/screenshot-2.png"

Field Reference

Field Type Required Default Description
publisher object ✅ - Publisher identity — see Publisher
links object ❌ - Discovery links — see Links
legal object ❌ - Developer-terms link — see Legal
brand object ❌ - Packaged brand assets — see Brand
compatibility object ❌ - Declared compatibility statement — see Compatibility
commercial object ❌ - Execution-pricing declaration — see Commercial Declaration
short_description string ❌ - Card-length summary (≤160 chars)
long_description string ❌ - Full listing-page copy (≤5000 chars)
screenshots list ❌ [] Bundle-relative screenshot paths

listing is publisher-supplied, untrusted input — not sanitized for rendering. Every free-text listing field (publisher.name, publisher.organization, compatibility.notes, short_description, long_description) rejects </> at parse time, which blocks raw HTML/CSS/JS tags. This is a coarse parse-time rejection, not output sanitization — it does not escape ", ', &, backticks, or newlines, so a value can still be unsafe if interpolated into an HTML attribute, a JS string literal, or a CSS context. Every consumer that renders a listing field MUST contextually escape it — never pass it to dangerouslySetInnerHTML (see .claude/rules/dashboard-design.md) or an unescaped template sink. listing.commercial.execution_pricing is untrusted too: it is a price request, never the price the platform charges.

How listing relates to metadata

listing and the pre-existing metadata: section overlap in purpose but not in shape, and neither supersedes the other today — both are optional, both may be populated, and no cross-validation ties them together:

Concern metadata field listing field Format
Homepage / product link homepage links.website metadata.homepage is any URL; listing.links.website is https://-only
Screenshots screenshots screenshots metadata.screenshots is a list of URLs; listing.screenshots is a list of bundle-relative paths — same field name, different semantics, do not conflate them
Icon / logo icon (a Lucide icon name) brand.logo (a packaged image path) Unrelated representations of the same concept

metadata remains the discovery-index field set (keywords, category, repository, changelog); listing is presentation copy for a marketplace/hub card. A future marketplace consumer stage decides precedence — this page does not assert one today.

Publisher

Field Type Required Description
name string ✅ Publisher display name (≤200 chars)
organization string ❌ Organization name (≤200 chars)
contact_email string ❌ Contact email (≤254 chars, validated format)
Field Type Required Description
website string ❌ Product website — https:// only
support string ❌ Support URL — https:// only
Field Type Required Description
terms_url string ❌ Developer/product terms URL — https:// only

Not to be confused with per-product developer-terms gating. The platform's separate D-12 per-product terms mechanism (ADR-037 §D7 — Legal Registry → Per-product terms links, PRODUCT_DEVELOPER_TERMS_DOCUMENT_KEYS) is implemented entirely backend-side, keyed off existing pack/dashboard scope/category metadata, and deliberately makes no pack-manifest or SDK schema change — see ADR-037 §D7. legal.terms_url is unrelated: it is purely publisher-supplied display metadata for the listing card, not an enforcement input.

Brand

Field Type Required Description
logo string ❌ Bundle-relative logo path (≤512 chars, no upload-service URL)
accent enum ❌ One of: primary, secondary, success, warning, danger, info, neutral

Provisional token set. The accent enum is a conservative common subset defined for schema purposes only — it is not yet reconciled against the dashboard-side brand-token vocabulary. Treat it as reconcilable, not final.

Compatibility

Field Type Required Description
notes string ❌ Free-form compatibility statement (≤1000 chars)

compatibility.notes is display copy only — unlike pack.min_platform_version, the platform does not validate or enforce it.

Commercial Declaration

Field Type Required Description
execution_pricing object ❌ {mode: "free"} or {mode: "fixed_credits", credits_per_execution: N} with an integer 1 ≤ N ≤ 10000

listing.commercial.execution_pricing is the one author-supplied pricing surface, defined by the Execution-Pricing Schema Specification — an integer-credit, per-execution developer fee (D-1 / D-10). listing.commercial is closed: execution_pricing is its only field.

Validated at publish, stored inert. The pack publish path (Upload Pack Version) rejects a malformed declaration with the spec's PRICING_* codes:

  • a missing or unknown mode, a missing, fractional (5.0 included), string or out-of-range credits_per_execution, or a price under free;
  • any server-owned key anywhere under listing (platform_fee_percent, approval_status, any stripe_*, …), matched case-insensitively — reported as PRICING_SERVER_OWNED_FIELD, never echoing its value;
  • any other unknown key (PRICING_UNKNOWN_FIELD), and the removed reserved bag (PRICING_RESERVED_BAG_REMOVED);
  • on a deployment with SaaS billing, the legacy pack.pricing rules (spec §5.1), including PRICING_DUAL_DECLARATION when both are declared.

An accepted declaration is stored in the version's manifest and does nothing else: no price is charged, reserved or shown until a server-owned pricing version approves it. The catalog API never returns listing.commercial.

SDK lag. huitzo_sdk.manifest.models.ListingCommercialDeclaration still models the 1.5.0 reserved placeholder, so huitzo validate does not yet accept execution_pricing. The SDK/CLI validator is a tracked follow-up; the Hub's publish-time check is the authority until then.

Asset and URL Constraints

Every listing URL field (links.website, links.support, legal.terms_url) must be https://, ≤2048 characters, and contain none of: whitespace, <, >, or ".

Every bundle-relative asset path (brand.logo, screenshots[]) is ≤512 characters and must: start with a letter or digit, be relative (no leading / or \, no ://), and contain no .. traversal segments — drawing from a closed character set of letters, digits, ., _, -, and /. Never an absolute path or an upload-service URL.

Asset/Content Security Validation

The constraints above are shape-only (regex/length checks at manifest parse time). A second, server-side layer runs at publish/update time (T-063, D-12) and enforces content-level security independent of the CLI:

  • URL hardening. In addition to the https://-only shape check, the server rejects any listing URL that embeds userinfo credentials (https://user:pass@host/...) or has no dot-bearing host component — raised as LISTING_URL_INSECURE.
  • MIME + magic-byte sniffing. brand.logo and every screenshots[] entry must resolve to a real file inside the published bundle (LISTING_ASSET_NOT_FOUND / LISTING_ASSET_ESCAPES_BUNDLE otherwise), be one of .png, .jpg/.jpeg, .webp, .svg (LISTING_ASSET_TYPE_NOT_ALLOWED), and — for the three raster types — have file bytes whose magic-byte signature matches the declared extension (LISTING_ASSET_MIME_MISMATCH). A renamed executable or any other extension/content mismatch is rejected, never sniffed-and-served.
  • Size caps. Each asset is capped individually and the sum of all listing assets for one publish is capped again (LISTING_ASSET_TOO_LARGE / LISTING_ASSETS_TOTAL_TOO_LARGE) — see backend.catalog.listing_asset_security for the exact byte values.
  • SVG default-deny. Every referenced .svg asset is parsed and checked against a closed element allowlist (<script>, <foreignObject>, and every SMIL animation element can never appear) plus an attribute-value scan applied to every attribute on every allowed element (not just style) — event-handler attributes (on*), a non-fragment href/ xlink:href (blocks both external references and active data: payloads), and any url(...)/expression(...)/javascript:/@import reference that does not target a local #fragment (a same-document fill="url(#gradient-id)" is legitimate and accepted; fill="url(https:// evil/x)" is not, regardless of which presentation attribute carries it) are all rejected outright. This is reject-not-rewrite: unlike the operator branding loader (backend.branding.loader.sanitize_svg, ADR-015), which strips unsafe content and serves the rewritten SVG, a listing SVG that fails the check is refused whole (LISTING_SVG_REJECTED) — a marketplace listing has no legitimate need for a rewritten asset the publisher never uploaded. The scan also caps element nesting depth so a well-formed but pathologically deep SVG fails closed with LISTING_SVG_REJECTED rather than exhausting the parser's call stack, and a listing may reference at most a bounded number of assets (LISTING_TOO_MANY_ASSETS) regardless of their total byte size.
  • Color tokens. brand.accent is a closed enum (see Brand) — Pydantic itself rejects any value outside that enum (including raw hex/rgb() strings), so no separate content check is needed.
  • Publisher ownership. Every mutating pack/dashboard endpoint that can touch a listing block — PATCH .../listing and version publish — is rejected with LISTING_PUBLISHER_MISMATCH (403) unless the caller's tenant is the resource's owner_tenant_id. This is the same generic ownership check every mutation on that resource already enforces (a version publish is rejected on ownership before its manifest is even parsed, whether or not it carries a listing block) — it now carries the stable code alongside the existing 403 message.

Scope note — packs vs. dashboards. Dashboards have a durable, extracted bundle directory (DashboardVersion.bundle_path) that brand.logo / screenshots[] paths resolve against, so the full content-validation layer above (existence, MIME/magic-byte, SVG, size) applies to dashboard listings. Packs are distributed as an installed Python wheel with no analogous extracted "bundle root" a bundle-relative asset path could resolve against; until pack publishing gains an equivalent asset root, pack listings receive the URL-hardening and ownership checks only — brand.logo / screenshots[] on a pack listing are validated for shape (this section, above) but not for file content. Tracked as a follow-up, not silently unenforced: the gap is intentional and documented here rather than a best-effort partial implementation.


Legacy v1 forms that now fail to load

There is no backwards compatibility. load_manifest() rejects every v1 form below — legacy manifests are rewritten to v2, not migrated. Because every section model sets extra="forbid", an unknown key is a hard error. The rejected forms are:

Legacy v1 form Why it fails v2 replacement
Missing schema_version, or schema_version != 2 The literal gate runs before field validation Add schema_version: 2
context_services: anywhere Removed; extra="forbid" rejects it Use the typed services: section
commands[].permissions Per-command permissions removed One top-level permissions: list
pack.permissions Pack-level field removed One top-level permissions: list
services.llm.models / default_model / max_tokens / temperature Model names removed from the manifest services.llm.requirements + profiles
Top-level db_integrations Folded into the DB service services.db.integrations
Missing policy: section policy: is required Add a policy: Policy Card

Validation

The CLI validates your manifest before building:

huitzo pack validate

Validation Rules

  1. schema_version - Must be the literal 2
  2. Required fields - All required fields must be present (pack, policy, commands)
  3. Naming conventions - Names follow kebab-case/lowercase rules
  4. Version format - Version is valid semver
  5. Command uniqueness - No duplicate command names (and no duplicate MCP server / data type names or permission tokens)
  6. Permission validity - All permission tokens are in the registry
  7. Permission backing - Each permission has its required service/section declared
  8. Policy cross-validation - permissions ⊆ policy.allowed_actions; external_domains ⊆ services.http.allowed_domains; escalated commands exist

Common Validation Errors

❌ Error: pack.name must be kebab-case
   Found: "MyPack"
   Expected: "my-pack"

❌ Error: manifest is missing required schema_version (expected 2)

❌ Error: Unknown permission "database:query"
   Valid permissions: storage:read, storage:write, files:read, files:write,
   files:delete, llm:complete, llm:stream, http:request, email:send,
   telegram:send, mcp:call, ssh:execute, exec:local, tts:synthesize

❌ Error: permission "http:request" is not in policy.allowed_actions

Complete Example

Here's a complete v2 manifest for a real-world pack:

# huitzo.yaml - Financial Intelligence Pack (schema v2)

schema_version: 2

pack:
  name: "plutus-financial"
  namespace: "plutus"
  version: "2.1.0"
  description: "Portfolio analysis and financial reporting tools"
  visibility: "organization"
  author: "Huitzo Inc."
  license: "proprietary"
  min_sdk_version: "2.0.0"

# Governance artifact (Policy Card)
policy:
  autonomy: "act_with_approval"
  allowed_actions:
    - "llm:complete"
    - "http:request"
    - "email:send"
    - "storage:read"
    - "storage:write"
    - "files:write"
  data_scope:
    scope: "tenant"
    external_domains:
      - "api.polygon.io"
      - "api.alpaca.markets"
  escalation:
    requires_human_approval:
      - "generate-report"
  audit:
    level: "detailed"

# One pack-level permissions list (⊆ policy.allowed_actions)
permissions:
  - "llm:complete"
  - "http:request"
  - "email:send"
  - "storage:read"
  - "storage:write"
  - "files:write"

# Deployment capabilities
deployment:
  cloud_capable: true
  self_hosted_capable: true
  edge_capable: false
  offline_capable: false
  requires_internet: true

# Pack-level resource requirements
resources:
  min_memory_mb: 256
  recommended_memory_mb: 512
  requires_gpu: false

commands:
  - name: "analyze-portfolio"
    description: "Analyze investment portfolio performance"
    entry_point: "plutus.commands.analyze:analyze_portfolio"
    timeout: 300
    queue: "long"
    retries: 2
    resources:
      tier: "standard"
      timeout_seconds: 300

  - name: "generate-report"
    description: "Generate PDF investment report"
    entry_point: "plutus.commands.report:generate_report"
    timeout: 600
    queue: "long"
    resources:
      tier: "standard"
      timeout_seconds: 600

  - name: "get-quote"
    description: "Get current stock quote"
    entry_point: "plutus.commands.quote:get_quote"
    timeout: 10
    queue: "fast"

  - name: "list-holdings"
    description: "List portfolio holdings"
    entry_point: "plutus.commands.holdings:list_holdings"
    timeout: 30
    queue: "fast"

state:
  collections:
    - name: portfolios
      scope: user
      key_prefix: plutus/portfolios
      model: plutus.models:Portfolio

    - name: reports
      scope: user
      key_prefix: plutus/reports
      model: plutus.models:Report

    - name: market_cache
      scope: tenant
      key_prefix: plutus/market-cache
      model: plutus.models:MarketQuote

services:
  llm:
    required: true
    requirements:
      min_context: 16000
      capabilities: ["structured_output"]
  email:
    required: true
  http:
    required: true
    allowed_domains:
      - "api.polygon.io"
      - "api.alpaca.markets"
  files:
    required: true
    max_size_mb: 25
    allowed_types: ["pdf"]

secrets:
  user_required:
    - name: "POLYGON_API_KEY"
      description: "Your Polygon.io API key for market data"
      help_url: "https://polygon.io/dashboard/api-keys"
  user_optional:
    - name: "ALPACA_API_KEY"
      description: "Alpaca Markets API key for trading data"
      help_url: "https://alpaca.markets/docs/api-references/broker-api/"

metadata:
  homepage: "https://huitzo.com/packs/plutus"
  documentation: "https://docs.huitzo.ai/packs/plutus"
  keywords: ["finance", "portfolio", "investment", "analysis"]
  category: "finance"
  icon: "trending-up"

  • ADR-003 — Pack Manifest Schema v2 – The code-first schema decision and field reference
  • ADR-005 — Policy Card v1 – The policy: section and cross-validation
  • ADR-006 — Model-Agnostic LLM Contract – Profiles + capability requirements
  • Intelligence Projects – Optional scaffolding for fullstack Pack + Dashboard apps
  • Your First Pack – Create a pack from scratch
  • SDK Overview – SDK reference
  • Architecture Overview – Deployment modes and system design
  • Piping Protocol – Command composition via pipes
  • Self-Hosting – Deploy your own instance
  • CLI Reference – CLI commands for pack development