Artifact manifest
agent-bundle.manifest.json sits at the top of the composite plugin root that
agent-bundle build emits (see Targets and artifacts for the root's
layout). It is the index of the artifact: one document that records the application identity
that was compiled, the compiled route graph, the host projections that were selected together with
the host documents each derived, every executable the root can start, and how the root is
distributed. Every consumer, install, uninstall, doctor, serve-app, mcp, hooks,
eval --artifact, inspect, the Workbench, and the npm prepack gate, reads this one file to
learn what a root contains. None of them probes .claude-plugin/plugin.json, .mcp.json, or a
directory layout to find out.
The contract
Who writes it
agent-bundle build, and nothing else. Everything in the document is derived: the author
declares agent-bundle.config.ts (metadata, targets, hooks, MCP servers, scripts, marketplace)
and the conventional filesystem (src/mcp/**, src/cli/**, src/hooks/**, src/events/**,
src/scripts/**), and the build writes the manifest from the normalized model, the compiled route
graph, the composite plan, and the files it emitted. Amp's index.js entry and the Claude,
Codex, Cursor, and portable plugin manifests, marketplace, MCP, and hooks documents are
serialized with the manifest from the same compiled model in one build. Every host document is
a digest-pinned files[] row, so a hand edit fails artifact digest validation. Nothing in the
file is hand-editable: change the config or the sources and rebuild.
Who reads it
Public contract
The top level has nine required keys, application, compiler, distribution,
executables, files, manifestVersion, projections, routes, runtime, plus the optional
web, present exactly when the configuration exposes an App to <plugin> web. Consumers that
install, diagnose, serve, or list a root (install, doctor, serve-app, mcp, hooks,
inspect summary) read only this contract. Operational compiler facts live under compiler
and are versioned separately.
runtime, manifestVersion
application
The application identity, recorded once and host-independent. It is what install, doctor,
and uninstall act on; host plugin manifests and this row are serialized from the same compiled
model in one build.
files[]
Every emitted file except the manifest itself, sorted by path. Source-input provenance for
each row lives on compiler.provenance, not here.
install and doctor --from use these rows as the authoritative artifact inventory. They read
each listed path directly, verify its bytes against sha256, and include it in the receipt content
hash without enumerating the root. The manifest file itself and an operator-provided .env or
.env.local beside it are also copied and hashed; unlisted files are ignored.
A tool that derives a variant of a built root, such as a Workbench development install, re-indexes
the variant's manifest because that manifest remains the inventory the installer copies and hashes.
Re-indexing re-measures, adds, or removes only non-compiled rows (a rewritten host MCP document, an
install marker). A bundle row and agent-bundle.compile-evidence.json are refused: the evidence
record describes the compiled bytes the compiler emitted, only a rebuild produces another, and the
validator fails an artifact whose evidence describes other bytes (AB6039).
projections[]
One row per selected host, sorted by host. Targets select projections; they are not identity.
documents has five optional keys, each present only when the projection emitted the file:
routes
The compiled route graph the artifact was built from, the Application IR, host-independent. It is the same projection of the same compiler pass the Workbench route catalog shows; only the Workbench's display-only fields are absent.
Every route row has the same shape:
A routes.cli.commands[] row, sorted by the joined path:
executables
Every process the artifact can start, with its Flight worker where it has one. Each hosts[]
list and each host names a projections[] row.
distribution
web
The one optional root key. Present exactly when the configuration's
web exposes at least one App whose targets intersect the
selection; <plugin> web, agent-bundle dev /web/<server>/<app>, and doctor read it and
never rediscover Apps from src/**.
Compiler record (compiler, recordVersion)
Operational record of the compiler run. Versioned by recordVersion independently of
manifestVersion: a change here is not a change to the artifact contract consumers read. The
object has exactly seven keys, all required: adapters, agentSkills, producer, project,
provenance, recordVersion, validation.
compiler.project
compiler.adapters[]
compiler.provenance[]
Rules that span sections
A reader enforces these before it accepts the document:
compiler.project.configPathis acompiler.project.sourceInputsentry whose hash iscompiler.project.configDigest, andcompiler.project.revisionis the digest ofcompiler.project.sourceInputs.compiler.provenancepaths equalfiles[]paths, and every provenancesourceInputspath is acompiler.project.sourceInputspath.compiler.adaptershosts equalprojections[]hosts.- Every pointer:
projections[].documents.*,executables.*[].pathandworker,executables.mcpServers[].launch.entryand.worker,executables.mcpServers[].apps[].path,distribution.install.*, names afiles[]row. executables.mcpServers[].launchis present exactly whenkindiscompiledorprebuilt; everylaunch.args[]row of kindartifactnames afiles[]row or a directory under the root.- Every
web.apps[].servernames anexecutables.mcpServers[]row that carrieslaunch. - Every
hosts[]entry and everyhooks[].hostnames aprojections[]row. - Every
distribution.payloads[].namedirectory holds at least onefiles[]row of kindprebuilt. compiler.validation.projections[]hosts equalprojections[]hosts.executables.scripts[].rendered.routeIdnames aroutes.scripts[]route.distribution.channelsincludesnpmexactly whencompiler.project.packageNameis present.
An abbreviated example
A root built for claude alone from a plugin with one generated MCP server, one MCP App, one
event route, and a routed CLI. Digests are elided; keys appear in canonical (sorted) order.
Schema and programmatic access
The contract ships as a JSON Schema (draft 2020-12, additionalProperties: false at every
level) at agent-bundle/schemas/agent-bundle.manifest.schema.json, and the agent-bundle entry
point exports it as artifactManifestSchema beside validateArtifactManifestSchema. The
TypeScript type, the strict parser, and the schema are tested against each other, so a document
one accepts the others accept too.
The same entry point exports the reader:
The types (ArtifactManifest, ArtifactManifestCompiler, ArtifactManifestCompilerAdapter,
ArtifactManifestProvenance, ArtifactManifestProjection, ArtifactManifestExecutables, …)
are in the generated Type API.
Reserved keys
These keys are part of the design but not emitted, and a v6 reader rejects them like any other unknown key. They are listed so that a consumer does not invent its own spelling:
Versioning
Two version numbers travel with every root. Keys are closed, so optional is not backward compatible: a reader of version N rejects any key or enumerated value it does not know (the lean web reader rejects the version mismatch itself, before it reads a slice).
manifestVersionversions the public contract consumers read (application,files[],runtime,projections[],routes,executables,distribution). It bumps on any change an old closed reader would reject, adding, renaming, or removing a public-contract key (optional or not), or changing an enumerated value set a reader closes. Within one version the key inventory is frozen. Readers refuse any othermanifestVersion. Version 6 renames eventexecution.preflighttoexecution.handlerand removes the obsoleteexecution.providersselection. Version 5 addedroutes.cli.commands[].projection.input("json"). Version 4 addedprojections[].documents.entryand theampbuilt-in host. Version 3 marks the canonical npm-root guarantee that packages preserve the manifest-owned bytes and executable; version 2 already reserved the samedistribution.installpointer shape. Version 2 renamedtargets[]toprojections[], moved the hook rows thatagent-bundle.hooks.jsonused to carry intoexecutables.hooks[]and deleted that file, and addedapplication,routes,executables,distribution, andprojections[].documents.compiler.recordVersionversions the operational compiler record (producer,project,provenance,adapters,agentSkills,validation) by the same rule over that record's keys. An internal compiler refactor that changes only those facts bumpsrecordVersionand never forces amanifestVersionbump. Readers refuse any otherrecordVersion.
Read an artifact with a framework version whose manifestVersion matches the document; a
mismatch in either direction is a rebuild, not a fallback.
Diagnostics
All are described in the Diagnostics reference.
Next
- Compiler architecture: the Application, Projection, and Artifact layers whose output this file records.
- Targets and artifacts: the root the manifest indexes.
- Artifact validation: the checks that read it.
- Host installation: how
installanddoctoruse it.