Summary
Make a plugin produced by Agent Bundle publishable as a self-contained npm package. Installing the tarball must provide the exact generated Claude, Codex, and Cursor host packs plus a package-relative install command, without requiring the source repository, a checkout path, or a project-maintained install script.
This is the missing distribution boundary between the host packs tracked by #181 and ordinary npm publishing. It does not require a reusable GitHub Action: once the package is self-contained, the repository's existing Changesets/npm/provenance flow is sufficient.
Verified gap
- Agent Bundle currently writes generated host artifacts to the configured artifact directory while npm package outputs are built separately into dist.
- The publishable scaffolder allowlists dist and README, so npm pack excludes the generated host packs, INSTALL.md, install.mjs, marketplace manifests, skills, hooks, MCP entries, and artifact provenance.
- The framework install command defaults its source bundle to the current working directory; a published plugin has no package-local entrypoint that resolves its bundled host packs from import.meta.url.
- Cargo Hauler therefore still maintains host-install documentation and a Cursor installer even though that logic is framework-generic. Its current npm manifest is private and its allowlist would not publish artifact/plugin.
- The framework release checks prove compiler-package tarballs and local built-directory installs, but not installing a plugin from the exact tarball intended for publication after deleting its source tree.
Relationship to existing issues
This issue owns packaging those outputs into a consumer plugin's npm tarball and locating them at runtime from the installed package.
Acceptance criteria
- A publishable plugin tarball contains every selected host pack, required executable payload, marketplace manifest, skills/hooks/MCP resources, INSTALL.md, and artifact manifest/provenance.
- A generated package-local bin resolves the bundled artifact from import.meta.url rather than process.cwd(), then delegates to the existing Agent Bundle installer for Claude, Codex, and Cursor.
- npm install itself performs no host mutation; installation is an explicit documented command such as npx install .
- From an empty directory, after deleting the repository and source tree, a test installs the exact packed tarball and registers each supported host from package-local assets.
- Generated scaffolds provide correct files, bin, and prepack/build behavior with no project-maintained host installer.
- npm pack --json validates the full expected host-pack inventory and fails for missing, stale, or source-relative entries.
- Package version, host-manifest version, artifact provenance, and installed version are checked for agreement.
- The release workflow publishes the same verified tarball; no separate host-specific publishing service or reusable GitHub Action is introduced unless later evidence requires one.
Summary
Make a plugin produced by Agent Bundle publishable as a self-contained npm package. Installing the tarball must provide the exact generated Claude, Codex, and Cursor host packs plus a package-relative install command, without requiring the source repository, a checkout path, or a project-maintained install script.
This is the missing distribution boundary between the host packs tracked by #181 and ordinary npm publishing. It does not require a reusable GitHub Action: once the package is self-contained, the repository's existing Changesets/npm/provenance flow is sufficient.
Verified gap
Relationship to existing issues
This issue owns packaging those outputs into a consumer plugin's npm tarball and locating them at runtime from the installed package.
Acceptance criteria