Declare the MiniMax Code agent-host view - #356
Merged
Merged
Conversation
Discover fills View from the installed node, CLI and workspace bridge: the closure holds node's directory, the harness directory and node's library directories, with the ELF interpreter as an Exec overlay. The view Executor writes the native configuration into the Session home through os.Root, runs node cli.js acp through ViewSession.Launch with a closed environment, takes MCP only from ViewSession.MCP and keeps the workspace worker local. The Subagent history reader runs on the host as the Session user. The native patch ignores the workspace's project .mcp.json under protected-mcp-v1.
The reader ran on the agent host as the Session user, outside the view's containment. A Session has one live view, which runs only the CLI, so a view Executor rejects enabled Subagents with ErrUnsupportedOperation and starts no reader.
Discovery asks viewloader.For for node's interpreter overlay, lib closure, loader masks and LD_LIBRARY_PATH, and declares no view when node's libraries are not all in the interpreter's directory. The adapter's own ld.so --list loader is removed.
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.
The MiniMax Code adapter (
mcode) declares its agent-host view: lane L5-mcode, on the Runtime–HarnessViewdeclaration (#350) and the sharedviewloader(#355). Nothing launches a view yet. The agent-host library (L5a) and the end-to-end qualification (L7) follow.View declaration
Discovery declares a view when mcode is available and
SupportsExecution, and checks it withView.Validate. If the declaration or the loader fails, discovery prints the reason and declares no view.node: Node's resolved directory;mcode-harness: the bridge directory, which must containnative/cli.js;viewloaderfragment, for a dynamicnode./assetsand/opt/assets(directories);/install.jsonand/opt/install.json(files);/node_modules, so Node never falls back to the world's modules;viewloader.node.gitandrg./bin/bash.ViewProxyNone.Executor in a view
noderuns[cli.js, acp]throughViewSession.Launch, in the world workspace.PATHis the shim directory.HOMEandMINIMAX_DATA_DIRarehome/data.PI_CODING_AGENT_DIRishome/pi-agent.TMPDIRishome/tmp.MAVIS_BUILTIN_*_DIRvariables point at the closure assets.LD_LIBRARY_PATHcomes from the loader fragment, and the tool-policy variables are kept.config.yamlholds the gateway URL with no path, and the placeholder key.toolEnvFileand no local readiness check. The worker stays local.ViewSession.MCP. A stdio binding returnsErrUnsupportedOperation..mcp.json: underprotected-mcp-v1,patch-native.mjsmakes the CLI ignore the workspace's project.mcp.json, so the Session's MCP comes only from the daemon.os.Root. A link planted atdata/config.yamlthat points outside the home makes preparation fail.ErrUnsupportedOperation: Skills, read-only workspaces, restricted network, and enabled Subagents. The Subagent history reader has to run beside the CLI in the live view, and the protocol cannot start a second process in a live view yet. That protocol change is scheduled separately.Checks
go test ./apps/daemon/internal/agent/...;-raceonmcodeandviewloader;go vet ./apps/daemon/...;gofmt;node --test packages/mcode-harness/*.test.mjsgives 7 passed and 4 skipped; the skipped tests need the packaged artifact.Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.