feat(dist): ship the package as an Agent Plugins 1.0.0 plugin root - #753
Open
filip131311 wants to merge 1 commit into
Open
feat(dist): ship the package as an Agent Plugins 1.0.0 plugin root#753filip131311 wants to merge 1 commit into
filip131311 wants to merge 1 commit into
Conversation
Adds packages/argent/plugin.json and packages/argent/mcp.json, so the
published tarball is also a loadable Agent Plugins 1.0.0 plugin: the spec
fixes plugin.json, mcp.json and skills/ at the package root, and skills/
already lands there at build time.
Purely additive. `argent init` — its editor detection, the MCP entries it
writes, the rules and agents it copies, global vs. local install modes —
is untouched; nothing under packages/argent-installer changes. The plugin
route is a second way in for clients that implement the standard, not a
replacement for the one that configures the ten editors we support today.
The MCP server launches via `npx -y @swmansion/argent@<version> mcp`
rather than a ${PLUGIN_ROOT}-relative path: a plugin directory can reach a
client by a route that never runs `npm install` (a git clone, a
marketplace copy), so the server cannot be assumed to sit next to the
manifest. Pinning the version is what keeps the launched server on the
same release as the skills shipped beside it.
Both files are inert at build time, so nothing else in the repo notices
when a release bump leaves them behind — the plugin would keep launching
the previous release next to this release's skills.
check-workspace-versions.mjs now holds them to packages/argent/package.json
the same way it holds server.json: version, npx pin, both $schema values,
the server key the bundled skills name in their tool calls, and the
`files` entries without which neither file ships at all.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds two files —
packages/argent/plugin.jsonandpackages/argent/mcp.json— so the published npm tarball doubles as a loadable Agent Plugins 1.0.0 plugin root. The spec fixesplugin.json,mcp.jsonandskills/at the plugin root, andskills/already lands there at build time (bundle-tools.cjscopiespackages/skills/skills→packages/argent/skills), so the layout is a two-file gap, not a restructure.What this does NOT change
argent initis untouched and stays the default. Zero lines change underpackages/argent-installer/— editor detection, the MCP entries written into all ten supported clients, global vs.--localcommittable mode, rules and agent copying, stale-config cleanup, allowlists, telemetry all behave exactly as before. This is an additional way in for clients that implement the standard, not a replacement.The README section says so explicitly, and lists what a plugin structurally cannot carry (the spec has only two portable component types — Agent Skills and MCP servers):
rules/argent.md, theargent-environment-inspectorsubagent, and the per-client touchesinitapplies.Why npx, and why pinned
{ "type": "stdio", "command": "npx", "args": ["-y", "@swmansion/argent@0.19.0", "mcp"] }A plugin directory can reach a client by a route that never runs
npm install— a git clone, a marketplace copy — so the server can't be assumed to sit next to the manifest, which rules out the${PLUGIN_ROOT}/dist/cli.jsform. The version pin keeps the launched server on the same release as the skills shipped beside it in the same plugin; an unpinned@latestwould silently decouple them.Trade-off worth knowing: the first launch downloads the package (~36 MB of platform binaries) unless it's already in the npx cache. Documented in the README.
The server key stays
argent, matchingMCP_SERVER_KEYin the installer — clients namespace a plugin server's tools by that id, so renaming it would rename everymcp__argent__*tool the bundled skills call for by name.Keeping it from rotting
Both files are inert at build time, so nothing in the repo would notice a release bump leaving them behind — the plugin would keep launching the previous release next to this release's skills.
scripts/check-workspace-versions.mjs(already run byrepo-hygiene.yml) now holds them topackages/argent/package.jsonthe same way it holdsserver.json, via a new purepluginManifestMismatches():plugin.jsonversion == the workspace version@swmansion/argent@<that version>(an unpinned or stale spec fails)$schemavalues name spec 1.0.0 and agree with each othermcp.jsondeclares anargentstdio serverfileslists both filenames — npm shipspackage.json/README/LICENSE implicitly and nothing else, so forgetting either one publishes a tarball that isn't a plugin root while every other check still passesNote for the next release:
plugin.json'sversionandmcp.json's npx pin join the version-bump file set. Getting either wrong now fails CI rather than shipping quietly.Testing
node --test scripts/check-workspace-versions.test.mjs— 42 pass (17 new: thepluginManifestMismatches()matrix plus spawned-script runs for plugin drift, a combined half-finished bump, and missing/malformed file handling)node scripts/check-workspace-versions.mjsagainst this branch → in sync at 0.19.0agent-plugins.org/schemas/1.0.0/→ VALIDnpm pack --dry-run -w @swmansion/argent→plugin.jsonandmcp.jsonpresent in the tarball contentstsc -p tsconfig.scripts.json,eslint scripts/,prettier --checkall cleanFollow-ups (not in this PR)
copilot-plugins/awesome-copilot-style repos; each client has its own route)com.anthropic.claude-code/extension namespace dir if we want the rule and subagent to travel with the plugin for Claude Code🤖 Generated with Claude Code