Skip to content

Feature: emit ready-to-install host packs (and/or an 'agent-bundle install <host>' command) so projects don't hand-maintain install scripts #181

Closed

Description

@ScriptedAlchemy

Motivation

Every agent-bundle project today ends up writing and maintaining its own install scripts per host. cargo-conductor ships scripts/install-cursor.sh (~100 lines: builds the Cursor plugin.json + root manifests, copies skills/ and mcp-apps/, wires hook shims with absolute paths) plus documented manual steps for Claude Code (claude plugin install <name>@<marketplace>) and Codex (config.toml edits). The framework already knows everything those scripts encode — targets, manifests, hooks, MCP entry points — so hand-maintained installers are pure drift risk. Issue #126 (now closed) was one instance of that drift; the fix belongs a level up.

Ask

Either (or both) of:

  1. Installable packs in the artifact: agent-bundle build emits, per target, a self-contained directory in the exact on-disk layout the host loads, plus a tiny generated install.sh/manifest describing where it goes (e.g. ~/.cursor/plugins/local/<name> for Cursor local plugins). "Install" then degenerates to one copy that the generated script performs.
  2. agent-bundle install <host> command: resolves the host's install location (Cursor local plugins dir, Claude marketplace/plugin dirs, Codex config.toml + managed block), places the artifact, and registers MCP servers/hooks — idempotent and reversible (--uninstall). This is where per-host quirks (Cursor's manifest-at-root expectations from Cursor target artifacts don't match how Cursor actually loads local plugins (manifest location, hooks doc collision, root tokens) #126, Codex hook trust, absolute-path shims for hooks) get solved once for all projects.

What our script does that the framework would need to cover (Cursor case)

All of this is derivable from the bundle config; none of it is project-specific.

Context

cargo-conductor (https://github.com/ScriptedAlchemy/cargo-conductor) — see scripts/install-cursor.sh and docs/install.md for the full set of manual steps this would delete.

Activity

  1. ScriptedAlchemy commented on Sep 1, 2026

    @ScriptedAlchemy
    OwnerAuthor

    Install/discovery contract coverage from host-doc audit (2026-09-01)

    Linking this lane to the meta-framework plan: #107, with lifecycle safety in #101.

    Please include these documented host outcomes in the emitted INSTALL.md / generated installer / agent-bundle install <host> work, or mark them explicitly unavailable with a reason:

    Installer output must distinguish files placed, registered, trusted/approved, and active. Generation alone cannot claim installation, and no installer may auto-trust hooks on the user's behalf.

  2. ScriptedAlchemy commented on Sep 1, 2026

    @ScriptedAlchemy
    OwnerAuthor

    The #195 install machinery now has real-host proof coverage — landed in #242 (merge 9928c3e0b, #100 stage 3):

    • Claude (2.1.257) and Codex (0.147.0): agent-bundle install <host> exercised end-to-end against the real binaries into isolated homes (CLAUDE_CONFIG_DIR / CODEX_HOME); registration observed via plugin list/plugin details (Claude) and plugin list (Codex). Both hosts materialize the install as a whole-bundle copy under plugins/cache/<marketplace>/<plugin>/<version>.
    • Cursor: collision-safe placement into an isolated HOME's .cursor/plugins/local/<name> with pinned-schema validation of the installed plugin/hooks/mcp documents and idempotency (already-installed on re-run).
    • One correction fed back into the emitted INSTALL.md: Claude Code 2.1.257 rejects claude plugin marketplace add . — emitted instructions now use ./ for Claude and Codex (codex accepts both; verified against 0.147.0), with dated notes in the pinned capability evidence.
    • The proofs run as the new host-install level: binary-gated with honest skips locally and in CI (native-host-smoke.yml), Cursor placement in default CI.
  3. ScriptedAlchemy commented on Sep 2, 2026

    @ScriptedAlchemy
    OwnerAuthor

    Core scope delivered — closing with split note

    Verified against landed install machinery and real-host proofs. The framework-owned install path from a built bundle directory is complete; npm tarball consumer packaging is tracked separately.

    Delivered here

    Ask Status Evidence
    agent-bundle install <host> — idempotent placement + registration ✅ #195 (1235be1d) — Claude/Codex/Cursor/portable/composite install capabilities, generated INSTALL.md, Cursor install.mjs fallback, marketplace metadata
    Real-host install proofs (built bundle → isolated home → host CLI registration) ✅ #242 (9928c3e0) — host-install proof level; Claude 2.1.257 + Codex 0.147.0 + Cursor placement/idempotency
    Emitted install docs distinguish placed / registered / trusted / active ✅ #195 capability evidence + #242 INSTALL.md correction (./ vs . for Claude marketplace add)

    Moved to #252

    The original motivation included publishable npm plugins whose tarball carries host packs and a package-relative installer (import.meta.url), so consumers never maintain project-specific install scripts. That distribution boundary was not part of #195/#242:

    • npm pack currently excludes generated host artifacts from publishable scaffolds
    • install defaults to process.cwd() / --from <bundle-dir>, not package-local resolution

    → #252 — Package generated host packs into publishable npm plugins

    Still on #101 (not blocking this close)

    Receipt-backed lifecycle (preview → confirm → backup → journal → verify → receipt), update/repair/uninstall/rollback/recover, format-preserving shared-config merges, and the read-only Doctor — #101 owns those; #195 shipped only the explicit operator install CLI shape G4 approved.

    Closing #181 as built-directory install/discovery complete; remaining npm-consumer and managed-lifecycle scope lives in #252 and #101 respectively.

  4. ScriptedAlchemy commented on Sep 2, 2026

    @ScriptedAlchemy
    OwnerAuthor

    Closing: built-directory install/discovery delivered (#195, #242). Remaining npm-consumer scope → #252; managed lifecycle → #101.

  5. ScriptedAlchemy commented on Sep 3, 2026

    @ScriptedAlchemy
    OwnerAuthor

    Closed-issue re-verification (lane G2, 2026-09-03) — one regressed proof repaired

    Re-checked every delivered item on origin/main (af1c18551 → c94df11ca) with the real binaries on this machine.

    Item Verdict Evidence
    agent-bundle install <host> — Claude/Codex/Cursor/portable, idempotent Cursor placement (#195) VERIFIED install.test.ts + install-surface.test.ts green (unit pool); host-install-proof.test.ts 9/9 incl. real claude plugin list/plugin details (Claude 2.1.x) and codex plugin list (codex-cli 0.147.0) registration, Cursor isolated-home placement + already-installed idempotency, portable Agent Plugins 1.0.0 placement
    Real-host proof level (#242) REGRESSED → FIXED #364 (305161a1c) added interface.logo to the Codex manifest; the shared fixture declares plugin.logo, so the binary-gated Codex proofs failed on interfaceFields (skipped in default CI, so it landed silently). Built proof repaired by #368; packed proof repaired by #367 (merge 307f404ae). Post-fix: packed-host-install-proof.test.ts 3/3, host-install-proof.test.ts 9/9 with real Claude + Codex
    Emitted INSTALL.md (./ not . for Claude marketplace add) VERIFIED src/install/surface.ts claudeInstructions/codexInstructions emit marketplace add ./; validated by install-surface.test.ts
    Installer output distinguishes placed / registered / trusted / active (host-doc audit comment) PARTIAL InstallResult.state is only installed | already-installed; Claude/Codex reach installed only after the host CLI's own install verb succeeds (registration implied), Cursor after placement (activation is the documented manual reload). Trust/activation are not modeled as states. Tracked by open #101 ("activation/trust state where observable"; "Doctor distinguishes activation deferred from installed-and-active"). Codex capability table records "installation does not auto-trust non-managed hooks"
    npm-consumer packaging → #252 VERIFIED handoff #252 closed via #281 (2655ca58d, package-relative installer bins + prepack inventory gate)
    Managed lifecycle / --uninstall → #101 VERIFIED handoff #101 open, body carries uninstall/receipts

    Also verified against the current public Cursor docs (2026-09-03): .cursor-plugin/plugin.json is the Cursor Plugin manifest and ~/.cursor/plugins/local/<name> the local root, matching the adapter and INSTALL.md.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions