Skip to content

feat: publish the global edition of MiniMax Code (agent.minimax.io) - #4

Closed
tylerdotai wants to merge 1 commit into
unfallenwill:mainfrom
tylerdotai:feat/global-edition
Closed

tylerdotai wants to merge 1 commit into
unfallenwill:mainfrom
tylerdotai:feat/global-edition

Conversation

@tylerdotai

Copy link
Copy Markdown

What

Publish the global edition of MiniMax Code (agent.minimax.io) next to the
CN edition (agent.minimax.cn).

Why

MiniMax ships two separate desktop apps, with different backends, accounts,
bundle ids and UI languages. The packages published here are the CN edition
only. From the published minimax-code_3.1.4_amd64.deb:

$ grep -A2 '"app_id"' build-info.json
  "app_id": "com.minimax.agent.cn",

$ cat resources/app/.env.local
NEXT_PUBLIC_DOMAIN_URL="https://agent.minimax.cn"
NEXT_PUBLIC_LOCALE="zh"
OSS_TYPE=matrix_oss_cn

So anyone on agent.minimax.io who installs the released package gets the
Chinese edition talking to the CN backend — and there is no global package to
install instead.

Upstream publishes both editions (their download config exposes
cnX64MacosDownloadUrl → filecdn.minimax.chat and
overseasX64MacosDownloadUrl → file.cdn.minimax.io), and
packaging/resolve-version.sh already knew how to choose between them — but
nothing ever set MMX_REGION, so the default (cn) was the only edition that
was ever built.

Changes

  • scripts/lib_common.sh — MMX_REGION (cn | overseas) selects an
    edition profile: app id, package name, install prefix, desktop entry, icon
    name, deep-link scheme, electron-updater manifest and release-tag prefix.
    Each edition gets its own package identity, so both can be installed side by
    side instead of overwriting each other.
  • install.sh — verify that the extracted payload really is the requested
    edition (read NEXT_PUBLIC_DOMAIN_URL from the payload's .env.local) and
    fail the build on a mismatch, instead of shipping a package that quietly
    talks to the wrong backend. build-info.json now records region/domain.
  • packaging/build.sh — stage the icon tree under the package's own name,
    so the two editions never claim the same files.
  • packaging/templates/desktop.tmpl — register only the deep-link scheme
    the edition actually uses (minimax-cn vs minimax); the payload derives it
    from the locale.
  • packaging/resolve-version.sh — the electron-updater fallback pointed at
    …/minimax-agent/release, which 404s; it now uses the edition's -prod
    manifest (verified 200 for both editions).
  • .github/workflows/build.yml — build both editions (matrix) and publish
    minimax-code-v<version> and minimax-code-global-v<version>. A manual run
    can build one edition or both, and takes a DMG URL per edition.
  • tests/run.sh, tests/fixtures/fake_asar — 5 new cases: each edition
    builds with its own identity, a payload from the other edition is refused,
    the per-edition profile is checked, an unknown region is rejected.
  • README.md — document both editions. Also corrects the claim that
    packages are built "for both architectures": only x86-64 is built today
    (resolve_arch rejects anything else) — see the arm64 issue.

Verification

  • tests/run.sh → 31 passed, 0 failed (26 before, +5 new).
  • Built the global edition from the official global DMG (3.1.4,
    file.cdn.minimax.io):
    • edition check reports payload edition OK: https://agent.minimax.io
    • build-info.json → "region": "overseas", "app_id": "com.minimax.agent"
    • packaged app package.json name → minimax-code-global
    • the app starts and reports readiness ("outcome":"ready") on Linux
  • Packaged it end to end: minimax-code-global_3.1.4_amd64.deb and
    minimax-code-global-3.1.4.x86_64.rpm, with
    • /opt/minimax-code-global, /usr/bin/minimax-code-global,
      minimax-code-global.desktop (Icon=minimax-code-global,
      StartupWMClass=minimax-code-global, MimeType=x-scheme-handler/minimax;)
    • icons installed as minimax-code-global.png — no file clash with the CN
      package, so both can be installed side by side
  • The CN path is unchanged: same package name, install prefix, release tag and
    asset names as before.

Note

This touches .github/workflows/build.yml, which #2 and #3 also touch — happy
to rebase on top of whichever lands first.

MiniMax ships two separate desktop apps with different backends, accounts,
bundle ids and UI languages:

  cn        agent.minimax.cn   com.minimax.agent.cn   locale zh
  overseas  agent.minimax.io   com.minimax.agent      locale en

The published packages were the CN edition only, so anyone on agent.minimax.io
had no Linux package to install. The upstream payload is per-edition (app.asar
carries a different .env.local), and packaging/resolve-version.sh already knew
how to pick between the two DMGs -- but nothing ever set MMX_REGION, so the
default (cn) was the only edition that was ever built.

- MMX_REGION selects an edition profile: app id, package name, install
  prefix, desktop entry, icon name, deep-link scheme, electron-updater
  manifest and release-tag prefix. Each edition gets its own package
  identity, so the two can be installed side by side instead of overwriting
  each other.
- install.sh verifies that the extracted payload really is the requested
  edition (NEXT_PUBLIC_DOMAIN_URL in the payload's .env.local) and fails the
  build on a mismatch, instead of shipping a package that quietly talks to
  the wrong backend. build-info.json now records region/domain.
- The icon tree is staged under the package's own name so the two editions
  never claim the same files.
- The desktop entry registers only the deep-link scheme the edition uses
  (the payload derives it from the locale).
- resolve-version.sh's electron-updater fallback pointed at a path that
  404s; it now uses the edition's -prod manifest (200 for both editions).
- The workflow builds both editions and publishes minimax-code-v<version> and
  minimax-code-global-v<version>; a manual run can build one or both.
- 5 new offline test cases.
- README: document both editions, and correct the claim that packages are
  built for both architectures (only x86-64 is built).

Verified: 31/31 offline tests; the global edition built from the official
global DMG, packaged as .deb/.rpm, and starts on Linux (outcome: ready).
@tylerdotai

Copy link
Copy Markdown
Author

Closing this in favour of a single consolidated issue (#6) — four findings in one place, so there is one thing to read and reply to rather than three overlapping PRs. The work is not lost: the branch is still up in the fork and I will open a PR for any part of it you want.

@tylerdotai tylerdotai closed this Oct 20, 2026
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