Skip to content

fix(computer-use): match computer_* tool names in capability gates - #579

Merged
hetaoBackend merged 1 commit into
mainfrom
fix/computer-use-tool-prefix
Nov 2, 2026
Merged

hetaoBackend merged 1 commit into
mainfrom
fix/computer-use-tool-prefix

Conversation

@dyh-sjtu

@dyh-sjtu dyh-sjtu commented Nov 1, 2026 •

Copy link
Copy Markdown
Collaborator

Change

Fixes #573.

The Computer Use runtime tools are exposed as computer_* (for example computer_screenshot, computer_click), but two capability gates in the published source still matched the old desktop_ prefix:

  • isComputerUseRuntimeToolName in packages/agent-tools/src/desktop/canonical-tool-policy.ts
  • the Computer Use availability filter in packages/local-runtime-v2/src/service/turn-system/agent-host/assembly/local-turn-tool-catalog.ts (renamed to isComputerToolAvailable)

As a result, computer_* tools were not recognised as Computer Use tools, so they bypassed the canonical-tool policy and were not hidden when Computer Use was unavailable. Both gates now match computer_, consistent with the tool names that are actually registered. Only the local-runtime-v2 path calls these helpers, so no compatibility match for desktop_ is kept.

This is a partial port; release/extraction.json sourceRevision is unchanged.

  • PR labels: bug, cli

Validation

  • Checks run and results: MCODE_VERIFY_REPORT_DIR=<outside repo> pnpm verify (full profile) on revision 286304f: PASS — 17 gates passed on darwin (Node 22.20.0)
  • Performance: basic; the change only adjusts two tool-name prefix checks and does not touch covered runtime paths.
  • NOT RUN, platform limitations and live-service boundaries: test:windows skipped (not applicable on macOS); test:release-package skipped (requires an npm release archive). No live Computer Use session was exercised; the change was not tested on Windows.

Publication and contribution checks

  • I have permission to contribute these changes under the existing licenses applicable to the changed files/packages; imported material and its provenance are identified and existing notices are preserved.
  • No credentials, account data, real user content, internal source history or private review material is included.
  • Added/removed source files were reviewed before regenerating release/public-source.json; new tests are declared in test/vitest-suites.json where applicable. (No files added or removed.)
  • Shared English/Chinese documentation and capability/verification records are updated where applicable. Mock/offline results are not described as live-service acceptance. (No documentation changes needed.)

Maintainer handoff

Publication scope or license changes (if any): none.

Shared-source port: complete.


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

The native Computer Use catalog names its tools computer_*, but the
read-only role ceiling and the runtime-availability filter still matched
the retired desktop_* prefix. Explore and Verifier could therefore receive
computer_* tools, and the tools stayed listed when the Computer Use runtime
was unavailable.

Fixes #573
@dyh-sjtu dyh-sjtu added the bug Something isn't working label Nov 1, 2026
@dyh-sjtu dyh-sjtu added the cli Standalone mcode: TUI, headless, ACP and source builds/tooling label Nov 1, 2026
@hetaoBackend
hetaoBackend merged commit 39c1f42 into main Nov 2, 2026
15 checks passed
7723qqq added a commit to 7723qqq/minimax-code that referenced this pull request Nov 4, 2026
The full residual-diff review against upstream/main (a5a05c2) classified
every remaining difference: Bun porting, fork i18n catalogs, F-series
behavior, the A17/D2 accepted cost, test-coverage differences, the excluded
code-sdk/code-sdk-python boundary, and the registered TUI-A06
plugin-marketplace cluster left for the v2 Agent/Plugin batch. The
computer_* capability-gate fix (MiniMax-AI#579) is absorbed, so the revision now
advances from 9b9885e to a5a05c2.

Also aligns canonical-tool-policy.ts's trailing newline with upstream (a
formatting-noise item found by the review). productBaseline stays 0.4.12 and
packageRoots is unchanged. check:source re-run after the edit: PASS (4660).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working cli Standalone mcode: TUI, headless, ACP and source builds/tooling

Projects

None yet

3 participants