Repository navigation
Add MiniMax Code (mcode) to the agents panel and default agent switch - #11367
Open
joshleblanc wants to merge 12 commits into
Open
joshleblanc wants to merge 12 commits into
joshleblanc wants to merge 12 commits into
Conversation
- New omarchy-agent-usage-mcode collector scans ~/.minimax/v2/sessions/ for assistant message transcripts, sums per-day and per-model token counts, and prints the panel record contract (with MCODE_HOME override and a 30-day scan window). - mcode joins the default providers in shell/plugins/agents/manifest.json and gains an assets/mcode.svg mark so the panel can render it. - omarchy-default-agent recognises mcode (and the minimax-code / minimax aliases), installing npm:@minimax-ai/code via mise the same way it installs every other global CLI agent. - omarchy-agent launches mcode via the floating terminal the way it launches every other agent, threading a prompt through as a positional argument when one is supplied. - omarchy-menu.jsonc exposes setup.default.agent.mcode so the menu can pick mcode like any other supported provider. - README + default-agent and menu tests updated to cover the new provider; new agent-usage-mcode-scanner-test.sh covers the collector's happy and edge cases.
added 3 commits
September 11, 2026 18:57
The first pass pointed omarchy-default-agent at npm:@minimax-ai/code
through mise, which installs the binary on PATH but leaves
better-sqlite3 without its optional native binding. mcode's npm
postinstall script verifies the binding and the binary then crashes on
first sqlite touch.
This pass adds bin/omarchy-install-ai-mcode, an installer that:
- installs via 'npm install -g @minimax-ai/code --foreground-scripts
--include=optional --allow-scripts=@minimax-ai/code,better-sqlite3'
-- the same flags the mcode binary itself uses for its self-update
-- so the optional prebuild lands and the postinstall runs;
- writes a marked wrapper at ~/.local/bin/mcode that execs the npm
binary, the same way the user_install check on PATH expects;
- recognises and defers to ~/.minimax-code/bin/mcode, the official
install path, dropping a stale wrapper that would shadow it;
- leaves any foreign wrapper at the slot untouched (--now, --remove,
--owns);
- matches the --check / --now / --owns / --remove contract of
omarchy-install-hermes-cli and omarchy-install-openclaw-cli.
omarchy-default-agent's mcode case now sets agent_installer to the new
script. The default-agent test removes mcode from the mise-loop
expected_agents/expected_packages tables (the loop only exercises
mise-installed agents) and adds assert_launch/assert_bypass lines so
the launcher still covers mcode.
New test/shell.d/agent-usage-mcode-installer-test.sh exercises
--check / --owns / --now / --remove across the fresh-install,
foreign-wrapper, official-install-present, and post-remove cases
(20 assertions).
The collector now probes the platform coding-plan endpoint at /v1/api/openplatform/coding_plan/remains on the openplatform host (platform.minimax.io for en, www.minimaxi.com for cn), picks the first non-media model_remains entry, and emits Session + Weekly rows with fraction percent (0.0-1.0), an ISO resetsAt string, and unlimited: true when status === 3. The panel renders the new fields: limitWindow now passes unlimited through, LimitRow.alarming ignores unlimited windows, and the percent column shows 'Unlimited' instead of '0%'. The record also picks up the same UX signals the other collectors already carry: - scope: 'account' limits are account-wide, so sync merge keeps a single view rather than summing machines - retryAdvised set on transport failure so the shell retries sooner than its regular interval - usageStatusText / authHelpText 'Sign-in expired' on 401/403, 'MiniMax limits unavailable' on transport failure with no cache fallback, otherwise empty
The test stubs urllib.request.urlopen (and urllib.error.HTTPError for 401) and exercises the collector's happy path, unlimited path, media-only fallback, empty / error responses, cn vs en region routing, Authorization header + GET method, --limits-only reuse, scope: 'account' on the record, Sign-in expired on 401, and the connection-error / MiniMax limits unavailable path. Follows the pattern of agent-usage-claude-limits-test.sh: each case runs the collector with a throwaway MCODE_HOME and the test asserts on the JSON record via jq.
Contributor
Author
added 3 commits
September 11, 2026 23:10
The omarchy-install-ai-mcode installer already exists and omarchy-default-agent mcode routes through it when the binary isn't on PATH, so the menu is the missing user-facing discovery surface. Empty icon glyph matches the existing setup.default.agent.mcode entry; a real one can land alongside the mcode.svg hero mark when one is sourced.
Replace the placeholder </> icon with the official MiniMax M-mark. The source SVG had a 300x250 viewBox, which would letterbox inside the panel's square hero slot. Squared it to 300x300 and removed the y-offset from the transform matrix so the mark sits centered with matching top/bottom padding.
The agents panel and the install/default menus now reference U+E90F, the next free slot in the omarchy icon font, which renders the M-mark in monochrome so the menu can pick it up under the active theme's foreground color. The glyph was built from the same artwork used by the agents panel hero mark (shell/plugins/agents/assets/mcode.svg) so the two glyphs stay visually consistent. The source SVG is kept next to the font under default/fonts/omarchy/mcode.svg, matching the convention hermes.svg already uses. - default/fonts/omarchy/omarchy.ttf: +1 glyph at U+E90F, cmap + hmtx + maxp + hhea + post.glyphOrder updated to match. - default/fonts/omarchy/mcode.svg: source SVG for the glyph, kept alongside the font so future maintainers can rebuild it. - default/fonts/omarchy/README.md: documents the new slot. - default/omarchy/omarchy-menu.jsonc: setup.default.agent.mcode and install.ai.mcode now reference U+E90F under iconFont: omarchy.
|
Heads-up: #14039 (open) adds a MiniMax usage collector ( |
Preserve current agent and panel integrations while merging quattro. Provision wrappers unconditionally, respect existing commands and the preinstall opt-out in migrations, and remove only owned wrappers. Allocate distinct brand glyphs across the three independent integrations. Co-Authored-By: GPT-6 in Codex <noreply@openai.com> Co-Authored-By: Codex Medium (GPT-6.1-sol) <noreply@openai.com>
Co-Authored-By: GPT-6 in Codex <noreply@openai.com> Co-Authored-By: Codex Medium (GPT-6.1-sol) <noreply@openai.com>
Preserve unlimited allowances in the current compact meter view and exercise them through the panel parser. Co-Authored-By: GPT-6 in Codex <noreply@openai.com>
Native OAuth keys hash lexical paths rather than resolved symlink targets. Region selection follows the CLI: inherited region, versioned preference, sole reusable auth state, then China. Legacy runtime profiles only apply when the CLI enables their environment variables. Co-Authored-By: GPT-6 in Codex <noreply@openai.com> Co-Authored-By: Codex Medium (GPT-6.1-sol) <noreply@openai.com>
MiniMax expiry must show mcode login guidance rather than run the Claude/Codex/Grok account helper, which can fall back to the default agent. Keep managed account-row reauthentication intact and guard the sign-in callback too. Co-Authored-By: GPT-6 in Codex <noreply@openai.com> Co-Authored-By: Codex Medium (GPT-6.1-sol) <noreply@openai.com>
dhh
added a commit
that referenced
this pull request
Oct 15, 2026
MiniMax Code (mcode) joins the default agent picker, installed through mise as npm:@minimax-ai/code with its better-sqlite3 build allowed. Its TUI has no no-approval flag, since permission policies belong to exec mode, so the launcher runs plain mcode and passes a prompt after --. The launcher part of #11367; its usage collector and panel changes are left to the agents panel work. Co-authored-by: Josh LeBlanc <joshleblanc@users.noreply.github.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.

MiniMax Code becomes a selectable default coding agent through
mcode,minimax, orminimax-code, and gains a usage section in the agents panel. Omarchy starts its interactive terminal interface and passes initial prompts literally.The official npm package uses the ordinary mise wrapper with build approval limited to
better-sqlite3, whose native binding is required by the runtime. Provisioning and Refresh Applications recreate the wrapper; the migration preserves existing commands and the preinstall opt-out; Remove Preinstalls deletes only the recognized wrapper. No global npm installation is managed or removed.The collector reads local JSONL history from MiniMax’s active data directory, counts user prompts, and keeps transcript statistics additive across synced devices. It follows the CLI’s lexical OAuth path identity and region selection, resolves the personal billing workspace, and fetches session and weekly token-plan quotas without modifying credentials or following redirects. Quota caches are isolated by data directory, region, and bearer. Failed requests retain only that credential’s previous measurements, with their original timestamp and a stale marker.
The panel shows MiniMax’s native login instructions when its sign-in expires, and the current compact panel can label unlimited allowances. MiniMax’s branded marks support dark and light surfaces, and its menu glyph occupies U+E911 while preserving existing glyphs. The font is distributed through an
omarchy-settingsrelease.Related: #14039 also proposes MiniMax provider usage. This PR is complete against current quattro and does not depend on it or any China-region changes.
No separate issue is closed.