Skip to content

Add miniapp-af37075b-6a0d-41c1-bc4e-8817be9656b8 Mini App - #208

Merged
MyPrototypeWhat merged 1 commit into
MiniMax-AI:mainfrom
liuhaolin07:add-miniapp-af37075b-6a0d-41c1-bc4e-8817be9656b8
Dec 4, 2026
Merged

MyPrototypeWhat merged 1 commit into
MiniMax-AI:mainfrom
liuhaolin07:add-miniapp-af37075b-6a0d-41c1-bc4e-8817be9656b8

Conversation

@liuhaolin07

@liuhaolin07 liuhaolin07 commented Dec 4, 2026 •

Copy link
Copy Markdown
Contributor

This adds Work Group, a chat-style Mini App where several MiniMax Code Agents collaborate with you in
one thread: you mention the members you need, each replies from its own session, and a member can
mention another member to hand work over. Tool approvals and questions from an Agent arrive as cards
in the group, so a multi-agent workflow stays on one page instead of spreading across chats. I built
it because coordinating several Agents by hand meant repeating the same context in every
conversation.

Tested environment and results

  • MiniMax Code 3.1.19 on Windows 11 (x64), installed from the workspace package and opened through
    the Agent.
  • Client acceptance in the installed app: initial view and empty state, member panel, add a member →
    reload → still present → delete with confirmation, send a message → a real Agent turn completed and
    rendered, clear the conversation. Console: no errors. Network: no failed requests.
  • Runtime logic: 29 checks against a mocked Agent runtime, all passing — mention chaining, session
    continuation, the approval card, the questionnaire card, member validation, restart recovery,
    clear, and the unchanged-snapshot short circuit.
  • npm run check: validate reports 0 errors and 0 warnings for this package and for the
    repository. npm test passes 109 of 113 tests; the 2 failures and 2 skips are environment
    limits of the Windows machine this ran on, not this package — test/files.test.mjs cannot
    create symlinks without Developer Mode (EPERM), and its case-collision tests skip on a
    case-insensitive temp directory.

Not verified

  • In a live Agent turn: the tool approval card, the questionnaire card, the stop control, and
    opening a member session in the chat side panel. These were exercised against the mocked runtime
    only; the one live turn used no tools and asked no questions.
  • Dark theme rendering.

Declared access

  • agentAccess: ["session.run"] and agentConcurrency: 4, using the legacy spelling so the package
    also loads on clients before 3.1.20 (minimum client: 3.1.2).
  • The page reads theme and language through the legacy window.mcode.miniapp.host.ui alias and
    opens a member session through window.mcode.miniapp.agent.open.
  • No tool, connector, device or navigation grants.

npm run check warnings

  • None for this package. The two failing repository tests are described under "Tested environment and
    results" and do not involve this package.
Written by MiniMax-M4

How it works

  • Each member is either a real Agent from context.agent.agents() or a custom role that runs on the
    default Agent with its own instructions. Every member keeps its own session, so it remembers what
    it did earlier.
  • A mentioned member runs one Agent turn through context.agent.run. A reply that mentions another
    member queues that member next, up to 3 levels deep and 6 turns per message. With no mention, the
    coordinator replies.
  • permission.requested becomes an approval card in the group and is answered with allowOnce or
    deny only after the user chooses; question.requested becomes a questionnaire card and the
    answer continues the turn.
  • State (members, messages, approvals, questionnaires) is written atomically to context.dataDir
    as it changes. A restart marks interrupted turns and pending cards as expired instead of leaving
    them waiting.

Files

  • miniapp/node/server.mjs — Node entry: routes, group domain service, Agent turn orchestration,
    persistence.
  • miniapp/client/index.html, styles.css, app.js — the page served at /group.
  • miniapp/node/miniapp-api.ts — the repository's runtime type declarations; not loaded at runtime.

Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

@MyPrototypeWhat
MyPrototypeWhat merged commit be9a485 into MiniMax-AI:main Dec 4, 2026
2 checks passed
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.

2 participants