Skip to content

feat(scaffold): publishable host-pack templates with generated installers and a gated provenance release (#252) - #289

Merged
ScriptedAlchemy merged 1 commit into
mainfrom
feat/252-scaffold-release
Sep 2, 2026
Merged

feat(scaffold): publishable host-pack templates with generated installers and a gated provenance release (#252)#289
ScriptedAlchemy merged 1 commit into
mainfrom
feat/252-scaffold-release

Conversation

@ScriptedAlchemy

Copy link
Copy Markdown
Owner

Summary

Final slice of #252: the scaffolder templates adopt the #281 packaging contract, and the release path publishes with provenance behind the packed gates.

Templates (create-agent-bundle)

  • cli-tool: ships artifact in files, wires the generated my-agent-plugin-install bin, and runs agent-bundle prepack as its npm prepack — scaffolded projects pack a publishable host-pack plugin out of the box.
  • mcp-server: same packaging adoption (kept private: true); gains a real lib (src/status.ts, already authored and tested) so the template has a package build, plus the plugin-name bin and library exports map.
  • minimal (skills-only): intentionally untouched — no package build, no bin, no prepack, asserted by a new scaffold test.
  • Template READMEs state that npm install never mutates a host and installation is the explicit … install <host> command.

Tests

  • scaffold.test.ts: pins the publishable packaging fields per template and the minimal template's absence of them.
  • scaffold-packed-matrix.e2e.test.ts (release lane): each journey now runs npm run prepack, and the cli-tool journey does a real npm pack --json and asserts the tarball inventory — artifact/agent-bundle.manifest.json, all three host manifests (artifact/{portable/plugin.json, codex/.codex-plugin/plugin.json, claude/.claude-plugin/plugin.json}), and dist/bin/greeter-install.js — parsed via the shared npm-12-safe packOutputFromJson.

Release wiring

  • pnpm release now runs pnpm check:release (pack dry-run + release audit + packed release pool, which includes this matrix) before changeset publish.
  • The changesets publish step exports NPM_CONFIG_PROVENANCE: true.
  • Deliberately NOT changed: .changeset/config.json keeps "access": "restricted" — flipping to public access is the release owner's naming/licensing decision, now documented in docs/preview-packages.md.

These journeys are also what surfaced the packed-consumer AB5000 regression fixed in #288; this PR is rebased on that fix.

Test plan

@ScriptedAlchemy
ScriptedAlchemy merged commit 0b46b02 into main Sep 2, 2026
@changeset-bot

changeset-bot Bot commented Sep 2, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: b429b1e

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
create-agent-bundle Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 2, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-09-02T06:19:38.475361Z b429b1e PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: b429b1ea3b

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

"bin": {
"my-agent-plugin": "./dist/bin/my-agent-plugin.js"
"my-agent-plugin": "./dist/bin/my-agent-plugin.js",
"my-agent-plugin-install": "./dist/bin/my-agent-plugin-install.js"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Omit installer bins for portable-only scaffolds

When a user selects the documented --targets portable option, planPackageEntries emits no installer because there is no installable host, but this unconditional bin entry still references dist/bin/<plugin>-install.js; agent-bundle prepack consequently raises AB7012 because that file was never generated. The MCP template has the same problem with its unconditional plugin-name installer bin, so both manifests need to omit the installer bin when the selected targets contain no Claude, Codex, Cursor, or unified plugin target.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in 3c2240169. The scaffolder now removes generated installer bin entries when the selected targets contain no installable host. A regression test covers portable-only CLI and MCP scaffolds while preserving the CLI package bin.

node dist/bin/my-agent-plugin.js World

# after publishing/installing the package
npx my-agent-plugin-install install cursor

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Document a host built by the default scaffold

The template still targets only portable, codex, and claude, and the generated installer validates its arguments against exactly those built install hosts, so this new cursor command always exits with “Cannot install host ...; built hosts: claude, codex” for a default scaffold. The MCP README repeats the same invalid example; use claude or codex, or add cursor to the template targets.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in 3c2240169. Both generated template READMEs now demonstrate install claude, which is included in the default target set and is consistent with the installer-bin filtering.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant