Adds @magpie-community/agent-junie 0.1.0 (est7): Junie CLI on magpie's Agents page, plus an explicit seed.mjs that writes one Junie model profile per /v1/models entry and sets settings.json's modelForLaunch to magpie's selected model. Registry entry sits with the other agents; README agents table row added.
The three changes asked for at 12df8a6 are in 75a8c4b: repository.url is magpie-community/plugins, the README installs from the Plugins tab / `magpie plugin add` and gives seed.mjs's installed path (XDG_CONFIG_HOME aware), and the registry entry moved to the agents. seed.mjs, junie.agent.js and the tests are unchanged since that review.
Reviewed at 75a8c4b, merged locally onto main 486a68a, on mote (macOS, Bun 1.4.2), HOME=$(mktemp -d):
- bun scripts/check.mjs: exit 0. bun test: 4735 pass, 12 skip, 0 fail (the 17 junie tests included).
- seed.mjs against a local fake /v1/models: one request, Bearer key and User-Agent Junie; two 0600 profiles with id/baseUrl/apiType/apiKey/displayName/providerName/maxContextLength; model-locations appended to the user's own list; modelForLaunch set, user's other ECO entry kept. --model with an absent id refused with no writes. --remove: profiles gone, config.json and settings.json back to their values (re-indented only).
- Keys checked against Junie's docs (custom-llm-models, config.json, MCP ~/.junie/mcp/mcp.json with mcpServers, ~/.junie/skills, ~/.junie/AGENTS.md) and, for the undocumented settings keys (modelForLaunch, onboardingDefaultModelChosen, providerForLaunch, mixForLaunch, ecoModePerModel, acpEcoModePerModel), by grepping the released Junie 3976.1 macOS jar: every key is present.
- npm has no @magpie-community/agent-junie yet (404), so 0.1.0 doesn't collide. No dependencies, no install scripts; the only network call is the gateway's own /v1/models with redirect "error".
Not tried: a real Junie session through magpie (needs a JetBrains sign-in), and whether Junie's own requests carry a User-Agent matching the agent's ua "junie".
@magpie-community/agent-junie
Junie CLI through Magpie's OpenAI-compatible gateway, without LiteLLM or a background plugin runtime. This follows the community Cowork package: an ordinary agent module plus an explicit catalog seed script.
Install and connect
Install from Magpie's Plugins tab, or with the CLI:
magpie plugin add @magpie-community/agent-junie
After installation, seed.mjs is at
~/.config/magpie/plugins/node_modules/@magpie-community/agent-junie/seed.mjs.
If XDG_CONFIG_HOME is set, replace ~/.config with that directory.
The seed command requires Node.js 18 or later. With Junie closed, connect a
model and seed the catalog before starting Junie:
magpie junie <provider/model>
JUNIE_SEED="${XDG_CONFIG_HOME:-$HOME/.config}/magpie/plugins/node_modules/@magpie-community/agent-junie/seed.mjs"
node "$JUNIE_SEED" --eco on
junie
The commands below use JUNIE_SEED set above. magpie junie <provider/model> writes
~/.junie/magpie/connection.json: its id is Magpie's selected model ID,
baseUrl ends in /v1/chat/completions, and apiKey is the Junie agent's
gateway key. This connection file is outside Junie's model discovery folders.
The seed script reads that connection's endpoint and key, fetches /v1/models
with Junie's User-Agent, and writes one native JSON profile per advertised
model into ~/.junie/magpie/models/. Stable profile IDs are derived from the
gateway IDs; the original wire IDs are preserved inside the profiles. Their
display names end in · Magpie in Junie's /model picker.
The script adds its discovery directory to config.json's model-locations.
On every seed it sets settings.json's modelForLaunch to the ordinary
profile for Magpie's selected model, clears an incompatible remembered
provider/Mix, and marks default-model onboarding complete. Junie stores
these settings as strings. The picker contains exactly the advertised models,
without an additional selected-model alias.
To choose an individual catalog model as the launch default:
node "$JUNIE_SEED" --model provider/model --eco on
You can also choose an individual model in Junie's /model. Running the seed
again copies Magpie's current selection back to the launch default, unless
you explicitly override it with --model.
Refresh and remove
Run the seed script again when Magpie's catalog changes, then restart Junie. Junie discovers the local profiles; it does not poll Magpie itself. There is no background refresh process. Missing catalog entries are removed only if the seed script owns their files. The new launch default must exist in the catalog. An empty, invalid, partial or unavailable catalog leaves the existing files in place. A user edit to a generated profile is reported instead of overwritten.
node "$JUNIE_SEED"
node "$JUNIE_SEED" --remove
magpie junie default
--remove removes generated profiles and restores unchanged settings using
~/.junie/magpie/seed-state.json. Unrelated settings, native profiles and
new discovery folders remain. ECO cleanup deletes only the generated models'
preference entries, preserving later edits to native models across repeated seeds.
Run one seed command at a time, with Junie
closed, to avoid concurrent settings writes. The journal and generated
profiles contain gateway credentials and are created with private permissions.
Magpie restores the separate connection file's managed keys when disconnected.
That file is not a model profile and does not appear in Junie's picker.
Disconnecting Magpie alone leaves the seeded profiles and discovery directory
installed. Run seed.mjs --remove first to remove them and restore the launch settings.
ECO mode and limitations
--eco on|off saves per-model preferences in ecoModePerModel and
acpEcoModePerModel, preserving other models' preferences. Without this
option, existing preferences are kept and new profiles get an on preference.
Native ECO is unavailable for custom profiles in Junie 3893.6. Saving
on does not enable it, and it is not equivalent to lowering reasoning
effort. In that build, ModelOption.Custom inherits an empty
ecoModeEfforts set, so the ECO availability gate rejects it. The ACP model
picker confirms that a custom model has no ECO option. This is a Junie
capability limit, not a setting the plugin can override.
The agent module uses Junie's default ~/.junie paths, including Library
instructions, MCP and skills. The seed script honors JUNIE_HOME; when
using a relocated Junie home, provide its magpie/connection.json first.
Project configuration and CLI flags can override user defaults. Keep Magpie
running while using the generated models.
Validation
bun test packages/junie/junie.test.mjs
References: custom models, configuration, Cowork seed, and the agent contract. The agent uses the official Junie website icon.