-
Notifications
You must be signed in to change notification settings - Fork 12.4k
feat(integrations): add MiniMax Code (mcode) agent integration (#4644) #4645
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -89,6 +89,7 @@ body: | |
| - Kimi Code | ||
| - Kiro CLI | ||
| - Lingma | ||
| - MiniMax Code | ||
| - Mistral Vibe | ||
| - Muse Code | ||
| - Oh My Pi | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -83,6 +83,7 @@ body: | |
| - Kimi Code | ||
| - Kiro CLI | ||
| - Lingma | ||
| - MiniMax Code | ||
| - Mistral Vibe | ||
| - Muse Code | ||
| - Oh My Pi | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -13,7 +13,7 @@ | |
|
|
||
| # Agents that always render /speckit-<name>, regardless of ai_skills. | ||
| ALWAYS_SLASH_AGENTS: frozenset[str] = frozenset( | ||
| {"devin", "droid", "dsh", "grok", "muse", "qodercli", "trae", "zed"} | ||
| {"devin", "droid", "dsh", "grok", "mcode", "muse", "qodercli", "trae", "zed"} | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The existing |
||
| ) | ||
|
|
||
| # Agents that render /speckit-<name> only when ai_skills is enabled. | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,74 @@ | ||
| """MiniMax Code integration — skills-based agent. | ||
|
|
||
| MiniMax Code discovers project skills from | ||
| ``.minimax/skills/speckit-<name>/SKILL.md`` and invokes them via their | ||
| slash shortcut (``/speckit-<command>``). | ||
|
|
||
| See: https://github.com/MiniMax-AI/minimax-code | ||
| """ | ||
|
|
||
| from __future__ import annotations | ||
|
|
||
| from collections.abc import Mapping, Sequence | ||
| from pathlib import Path | ||
| from typing import Any | ||
|
|
||
| from ..base import IntegrationOption, SkillsIntegration | ||
|
|
||
|
|
||
| class McodeIntegration(SkillsIntegration): | ||
| """Integration for MiniMax Code CLI.""" | ||
|
|
||
| key = "mcode" | ||
| config = { | ||
| "name": "MiniMax Code", | ||
| "folder": ".minimax/", | ||
| "commands_subdir": "skills", | ||
| "install_url": "https://github.com/MiniMax-AI/minimax-code", | ||
| "requires_cli": True, | ||
| } | ||
| registrar_config = { | ||
| "dir": ".minimax/skills", | ||
| "format": "markdown", | ||
| "args": "$ARGUMENTS", | ||
| "extension": "/SKILL.md", | ||
| } | ||
| multi_install_safe = True | ||
|
|
||
| @classmethod | ||
| def options(cls) -> list[IntegrationOption]: | ||
| opts = super().options() | ||
| opts.append( | ||
| IntegrationOption( | ||
| "--skills", | ||
| is_flag=True, | ||
| default=True, | ||
| help="Install as agent skills (default for MiniMax Code)", | ||
| ) | ||
| ) | ||
| return opts | ||
|
|
||
| def build_exec_args( | ||
| self, | ||
| prompt: str, | ||
| *, | ||
| model: str | None = None, | ||
| output_json: bool = True, | ||
| integration_args: Sequence[str] | None = None, | ||
| integration_options: Mapping[str, Any] | None = None, | ||
| project_root: Path | None = None, | ||
| ) -> list[str] | None: | ||
| self.validate_runtime_config( | ||
| integration_args, | ||
| integration_options, | ||
| ) | ||
| # Spec Kit dispatch is non-interactive: a permission request cannot be | ||
| # answered by the caller. Allow the workflow to run to completion. | ||
| # Extra args come afterward so operators can select a stricter mode. | ||
| args = [self._resolve_executable(), "exec", prompt, "--permission", "full"] | ||
| self._apply_extra_args_env_var(args) | ||
| if model: | ||
| args.extend(["--model", model]) | ||
| if output_json: | ||
| args.extend(["--output-format", "json"]) | ||
| return args |
Uh oh!
There was an error while loading. Please reload this page.