Targets and artifacts
Start with the target and capability map to choose a surface. The generated host matrix records feature support and evidence. This page describes what is emitted and which object downstream tools consume.
The composite plugin root
agent-bundle build writes one composite artifact root, artifact/ by default.
output.distPath or CLI --output moves the root; it does not redesign the layout inside it.
The five built-in projections are amp, claude, codex, cursor, and portable.
Omitting targets selects only portable. An explicit selection can combine built-in projections
when the authored components satisfy their compatibility rules. Target order does not change the
result. plugin, web, npm, and browser presentation profiles are not extra built-in targets.
The following is an illustrative combined layout, not a promise that an empty plugin emits every file. Read the generated manifest for the actual executable names and included components.
Shared root components are emitted once. Amp's directory plugin keeps its registered Skills and execution support inside its nested directory so the installed copy is self-contained. The native Amp install root is therefore not the same directory as the composite artifact root.
A static Skills-only plugin does not need empty MCP servers or a Flight/state process. Some empty native hook/MCP documents are intentional discovery-isolation barriers when another selected host has content at a conventional fallback path. Do not delete those barriers as unused files.
Where each host reads its documents
Paths are stable across valid single-target and multi-target selections. Codex and Cursor use explicit pointers to avoid loading another projection's fallback documents. A third-party portable client can have different precedence and supported subsets; consult its individual record in the host matrix, not this native-layout table.
Hook wrappers
A compiled hook wrapper belongs to its selected host codec and contract. The same source hook
can therefore produce several wrappers. Config-declared hooks reaching one host use the plain
name; those reaching multiple hosts use host-qualified names. Conventional semantic events and
standalone workers are also recorded in executables.hooks.
Use hooks list and the manifest rather than constructing wrapper filenames. The native event,
payload provenance, matcher and return semantics are in the event matrix. Explicit
targets and supported event requires declarations affect selection; neither can manufacture
an event or decision the host cannot express.
Compiled surfaces
Generated MCP entries, scripts, CLI bins and browser Apps are attributed to the composite selection, not independently rebuilt as unrelated applications for each host. An Agent Document renderer and a browser App compilation are distinct environments.
Amp's MCP projection is skill-scoped. Its current adapter permits supported remote servers and globally resolvable command servers associated with exactly one bundled Skill; it rejects compiler-owned local MCP entries without a supported native path/cwd contract. Listing Amp as a target does not make the ordinary local generated-MCP starter valid for Amp.
A configured web surface adds the framework-owned command to bin/<plugin>.mjs, even without
an authored CLI command. It is a local browser host for declared MCP Apps, not a web output
target, a separate generated web/ application, or permission to bypass App consent.
One root, one set of bytes
Skills are shared by the selected targets. A host extension that changes the generated Skill
bytes can still produce a real AB4103 conflict. An explicit rejection is safer than shipping a
composite whose effective behavior depends on which host discovers it first.
The root is distributable
A copied composite artifact needs no per-host recompilation. It carries its generated installation instructions and the required installation support. npm delivery still needs an npm packaging step using the generated npm root; a directory build is not already a tarball.
The framework's install --from resolves the selected native location from the composite root.
Consumers can follow INSTALL.md without installing the compiler. A plugin may additionally
provide a thin package-bound bin through agent-bundle/install; that entry is opt-in, not
automatically generated for every package.
With package output enabled, dist/ is a complete npm root: a copy of the validated composite,
package.json, standard package documents, and declared package-only entries. A generated routed
CLI is copied unchanged and referenced as bin/<name>.mjs. An authored package bin instead
compiles to bin/<name>.js. There is no required nested artifact/ directory inside the tarball.
See shipping for prepack, actual npm pack, and installed-bin
proof. npm installation does not automatically register a plugin with a host.
agent-bundle.manifest.json
The current closed artifact contract is manifestVersion: 6. It is the index of the built
application, not another file the plugin author maintains.
For compiled/prebuilt MCP servers, canonical launch arguments distinguish artifact references from literal values. A slash in a literal does not make it a relocatable artifact path. The launcher expands only the supported declared tokens at the appropriate boundary.
The web.apps rows contain App identity, server association, allowed capabilities and optional
opening tool/input. Launch selection comes from the corresponding executable/projection record.
Do not reconstruct it from browser-profile selection or add entry, args, and env to each
web App. The exact field definitions are in Artifact manifest.
The compiler emits both the native documents and the canonical manifest. Structural validation, canonical representation, referenced-file checks and content digests have distinct roles; a reader that parses the manifest is not necessarily running every artifact-validation check. Use the appropriate public validation command, and do not change digests to bless modified output.
Persisted agent-bundle.compile-evidence.json binds compiler evidence to emitted bytes.
A matching hash is not a universal proof about reflective or unanalyzed runtime loading.
Residual checks and prebuilt dependency declarations remain necessary where compiler evidence
cannot establish self-containment. See validation.
Versions and revisions
Keep source package version, built artifact version, installed artifact version and observed running-server version distinct when collecting evidence. The installed-host proof compares the relevant observations; absent observations must not be invented.
An adapter revision and its observed native-host version describe a different contract from the plugin's own release version. The compiler record also has an independently versioned shape. Do not update a private manifest reader independently of the compiler that emits its input. Use a compatible public compiler/runtime/lifecycle package set and validate the actual deliverable.
prepack checks the applicable package/manifest version and dependency evidence. A dependency
inlined into generated JavaScript is not automatically a consumer runtime dependency; prebuilt
payloads, declarations and supported install scripts can establish real requirements.
Next
- Capability map: supported targets, feature navigation and proof boundaries.
- Artifact manifest: exact fields and canonical ownership.
- Compiler architecture: implementation stages and readers.
- Artifact validation: checks over the delivered root.
- Host installation: scopes, ownership, replacement and removal.
- Runtime environment: execution assumptions and writable state.