Skip to content

feat(install): make host bundles directly installable - #195

Merged
ScriptedAlchemy merged 8 commits into
mainfrom
feat/host-install-story
Sep 1, 2026
Merged

feat(install): make host bundles directly installable#195
ScriptedAlchemy merged 8 commits into
mainfrom
feat/host-install-story

Conversation

@ScriptedAlchemy

Copy link
Copy Markdown
Owner

Summary

  • pin Claude, Codex, Cursor, portable, and composite install capabilities and always emit installable local marketplace metadata where public CLIs exist
  • generate exact INSTALL.md files plus safe Cursor-compatible install.mjs fallbacks, and enforce required surfaces in artifact validation
  • add agent-bundle install <host> --from <bundle-dir> --scope <scope> with public CLI delegation, typed missing-host failures, and idempotent collision-safe Cursor placement

Test plan

  • pnpm --filter agent-bundle build
  • pnpm typecheck
  • pnpm lint
  • 60 scoped adapter/install unit tests
  • 93 artifact-validator integration tests
  • 25 artifact build integration tests
  • 8 CLI integration tests
  • 6 composite bundle integration tests

Closes the real-install proof slice of #100 and reverses #101 stage-0's documentation-only assumption for these bounded host install paths.

@changeset-bot

changeset-bot Bot commented Sep 1, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 14bcd09

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

This PR includes changesets to release 1 package
Name Type
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 1, 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-01T20:35:40.688227Z c18adf5 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.

@pkg-pr-new

pkg-pr-new Bot commented Sep 1, 2026

Copy link
Copy Markdown
npm i https://pkg.pr.new/ScriptedAlchemy/agent-bundle@195
npm i https://pkg.pr.new/ScriptedAlchemy/agent-bundle/create-agent-bundle@195
npm i https://pkg.pr.new/ScriptedAlchemy/agent-bundle/@agent-bundle/runtime@195

commit: 074f12f

@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: c18adf5913

ℹ️ 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".

hash.update(await readFile(path));
hash.update('\0');
};
for (const name of (await readdir(root)).sort((left, right) => left.localeCompare(right))) {

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 Validate the tree root before traversing it

When an existing Cursor destination is itself a symlink—for example, a previous manual installation linking back to the source bundle—readdir(root) follows the link and only its descendants are checked with lstat. If the linked tree matches the source, installCursor therefore reports already-installed even though Cursor rejects local-plugin symlinks that escape its local directory. Check the root with lstat before traversing it and reject a symlink or non-directory; the generated treeHash in surface.ts has the same omission.

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 d5dcf28. treeHash now lstats and validates the root itself before any readdir, so a symlinked Cursor destination fails closed with AB7004 instead of being treated as already installed. The emitted install.mjs uses the same root check, and the regression fixture links the destination to an identical source bundle to cover the false-idempotency case.

@ScriptedAlchemy
ScriptedAlchemy force-pushed the feat/host-install-story branch 5 times, most recently from a9a1bd1 to 074f12f Compare September 1, 2026 21:43
Record the evidence-backed per-host distribution design before adding installer behavior.
Emit exact host install surfaces and add safe native installation so built artifacts can move from distribution to a real host without bespoke setup.
Require an existing Cursor home before direct placement and keep legacy artifact fixtures aligned with the new required install surface.
Clarify that portable bundles use their emitted installer while the native Cursor command consumes Cursor manifests.
Include required install surfaces in manually assembled valid artifacts and pin their emitted host-plan ordering.
Load host installation only for the CLI install action so unrelated packed API consumers keep their existing dependency and startup surface.
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