Skip to content

feat(codex): dev-mode local marketplace + live skill symlink#122

Merged
madarco merged 4 commits into
nightlyfrom
feat/codex-dev-local-marketplace
Jun 27, 2026
Merged

feat(codex): dev-mode local marketplace + live skill symlink#122
madarco merged 4 commits into
nightlyfrom
feat/codex-dev-local-marketplace

Conversation

@madarco

@madarco madarco commented Jun 27, 2026

Copy link
Copy Markdown
Owner

What

Makes the Codex plugin reflect working-tree edits in dev (source checkout) without a publish/re-fetch round-trip, mirroring how the Claude host skills already symlink in dev. A published npm install is unchanged — it still installs from the madarco/agentbox GitHub marketplace.

Dev (agentbox install codex from a checkout)

  • Points [marketplaces.agentbox] at the local repo (source_type = "local") instead of the GitHub slug, so codex plugin add stages from the working tree.
  • Re-syncs the bundle skill copy (scripts/check-plugin-skill-sync.mjs --fix).
  • Symlinks the staged per-skill SKILL.md back to the repo → skill edits go live on the next Codex restart, no re-stage.
  • A whole-dir symlink was proven to make Codex report the plugin "not installed", so only the skill files are symlinked (the version dir stays real).
  • --no-dev forces the published GitHub path; a source-type flip (local ↔ git) is handled by remove-then-add in both directions.

Shared helper

  • New apps/cli/src/lib/source-checkout.ts: isSourceCheckout, resolveHostSkillsDir, resolveDevRepoRoot (returns the repo root only in a checkout carrying .agents/plugins/marketplace.json + plugins/agentbox, else null). install.ts now imports these (Claude path unchanged).

Also

  • Per-provider box system-prompt note: agentbox.yaml services/containers auto-start (agentbox-ctl status) and web services are reachable at https://<AGENTBOX_BOX_HOST>.

Verification

  • Live against real Codex: marketplace flips to local; staged dir stays real; SKILL.md is a symlink; codex plugin list shows installed, enabled; canonical edit → --fix → visible at the path Codex reads. --no-dev flips cleanly back to git.
  • pnpm -C apps/cli test (648 pass), lint, typecheck, and pnpm check:plugin-skill all green.
  • Docs: docs/development.md.

https://claude.ai/code/session_01An9tT8HqjQoGKKVWuYg4bb


Note

Low Risk
Changes are mostly dev-install ergonomics and docs; published npm installs still use GitHub, with best-effort Codex CLI and filesystem side effects gated on Codex being present.

Overview
Codex install in a source checkout now mirrors Claude host skills: agentbox install codex registers a local marketplace (source_type = "local") instead of madarco/agentbox, re-syncs the bundle skill via check-plugin-skill-sync.mjs --fix, re-stages from the working tree, and replaces staged skills/*/SKILL.md with symlinks to the repo (whole-dir symlinks break Codex “installed” detection). --no-dev forces GitHub; local ↔ git flips use marketplace remove-then-add because Codex rejects mixed source types.

Shared source-checkout.ts centralizes resolveHostSkillsDir, isSourceCheckout, and resolveDevRepoRoot; install.ts imports it (Claude symlink behavior unchanged). docs/development.md documents the dev workflow.

Sandbox system prompts (all providers) now mention agentbox.yaml auto-start, agentbox-ctl status, and web UI at https://<AGENTBOX_BOX_HOST>. Codex plugin icon (icon.svg) is replaced with a simpler mark.

Reviewed by Cursor Bugbot for commit e6964d3. Configure here.

madarco added 2 commits June 27, 2026 10:59
From a source checkout, `agentbox install codex` now points the Codex
marketplace at the local repo (`source_type = "local"`) instead of the
`madarco/agentbox` GitHub slug, re-syncs the bundle skill copy, stages the
plugin from the working tree, then symlinks the staged per-skill SKILL.md back
to the repo so skill edits go live on the next Codex restart. A published npm
install is unaffected (no `plugins/`/`.agents/` ships, so it always uses GitHub).

- New `apps/cli/src/lib/source-checkout.ts`: shared `isSourceCheckout`,
  `resolveHostSkillsDir`, and `resolveDevRepoRoot` (repo root only in a checkout
  carrying the Codex sources, else null). `install.ts` now imports these.
- `--no-dev` forces the published GitHub path even inside a checkout; a
  source-type conflict (local <-> git) is handled by remove-then-add.
- Symlink the skill *files* only — a whole-dir symlink makes Codex report the
  plugin "not installed".
- Tests for the source-checkout helpers and `marketplaceSource`; docs in
  docs/development.md.

Claude-Session: https://claude.ai/code/session_01An9tT8HqjQoGKKVWuYg4bb
…mpts

Tell the in-box agent that `agentbox.yaml` services/containers start
automatically (check with `agentbox-ctl status`) and that web services are
reachable at https://<AGENTBOX_BOX_HOST> from both box and host. Wording is
tailored per provider (local proxy for docker, cloud URL for the cloud ones).

Claude-Session: https://claude.ai/code/session_01An9tT8HqjQoGKKVWuYg4bb
@vercel

vercel Bot commented Jun 27, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
agentbox-web Ready Ready Preview, Comment Jun 27, 2026 10:17am

Request Review

Comment thread apps/cli/src/commands/install-codex.ts Outdated
Comment thread apps/cli/src/commands/install-codex.ts
- Attempt the dev skill symlink whenever a staged dir exists, not only when
  `codex plugin add` exits 0: a non-zero exit is treated as "already installed"
  and continues, leaving a staged cache we still want live-symlinked.
- Never symlink into a non-existent manifest-version path: if the manifest
  version dir is absent and the cache doesn't hold exactly one child, bail with
  "staged plugin dir not found" instead of mkdir-ing an orphan tree Codex ignores.

Claude-Session: https://claude.ai/code/session_01An9tT8HqjQoGKKVWuYg4bb
@madarco

madarco commented Jun 27, 2026

Copy link
Copy Markdown
Owner Author

bugbot run

@cursor cursor 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.

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit e6964d3. Configure here.

@madarco madarco merged commit e6964d3 into nightly Jun 27, 2026
4 checks passed
@madarco madarco deleted the feat/codex-dev-local-marketplace branch June 27, 2026 10:27
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