Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion apps/daemon/internal/agent/mcode/options.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ func prepareOptions(runtimeRoot string, req proto.PromptRequestPayload, workspac
if err := os.WriteFile(filepath.Join(result.DataDir, "AGENTS.md"), []byte(prompt), 0o600); err != nil {
return result, err
}
config := map[string]any{"logLevel": "error", "skills": map[string]any{"external": map[string]any{"enabled": false}}}
config := map[string]any{"logLevel": "error"}
result.Model = optionString(opts, "model")
if result.Model == "" {
return result, fmt.Errorf("mcode: model is required")
Expand Down
4 changes: 2 additions & 2 deletions apps/daemon/internal/agent/mcode/options_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ func TestOptionsRefreshManagedState(t *testing.T) {
if _, set := cfg["permissionMode"]; set {
t.Fatal("text profile restated the native permission mode")
}
if cfg["skills"].(map[string]any)["external"].(map[string]any)["enabled"] != false {
t.Fatal("external discovery enabled")
if _, set := cfg["skills"]; set {
t.Fatal("native Skill discovery was overridden")
}
if skills, ok := cfg["agents"].(map[string]any)["default"].(map[string]any)["skills"].([]any); !ok || len(skills) != 0 {
t.Fatal("text profile selected native Skills")
Expand Down
13 changes: 13 additions & 0 deletions apps/daemon/internal/agent/mcode/workspace_native_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,13 @@ func TestNativeMCodeWorkspaceTools(t *testing.T) {
if err := os.WriteFile(filepath.Join(workspace, "notes.txt"), []byte("alpha\n"), 0600); err != nil {
t.Fatal(err)
}
skill := filepath.Join(workspace, ".claude", "skills", "probe-phrase")
if err := os.MkdirAll(skill, 0700); err != nil {
t.Fatal(err)
}
if err := os.WriteFile(filepath.Join(skill, "SKILL.md"), []byte("---\nname: probe-phrase\ndescription: Gives the probe phrase.\n---\nThe probe phrase is violet-anchor-58.\n"), 0600); err != nil {
t.Fatal(err)
}
value, err := NewExecutorFactory(testStateRoot(t), c)(ctx, req)
if err != nil {
t.Fatal("native Executor preparation failed:", err)
Expand Down Expand Up @@ -149,6 +156,12 @@ func TestNativeMCodeWorkspaceTools(t *testing.T) {
t.Fatalf("Subagent did not run in the workspace: %q %v", child, r.events)
}
})
t.Run("workspace Skills load natively", func(t *testing.T) {
r := run(t, workspace, nil, "Use the probe-phrase Skill, then reply with the probe phrase only.")
if !strings.Contains(r.content, "violet-anchor-58") {
t.Fatalf("workspace Skill was not loaded: %q", r.content)
}
})
t.Run("web search control", func(t *testing.T) {
const prompt = "Without calling any tool, list the exact names of every tool you can call, comma separated."
tools := run(t, workspace, nil, prompt).content
Expand Down
2 changes: 1 addition & 1 deletion services/core/deploy/mcode/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ Each Session has its own native data directory, `$OAC_RUNTIME_HOME/runtime/mcode

The text profile rejects workspace, function tools and MCP servers. Workspace execution requires Linux or macOS and an unrestricted Environment network policy ([`workspace.go`](../../../../apps/daemon/internal/agent/mcode/workspace.go)); the adapter enforces no network restriction.

In the workspace profile, the frozen installation's Skills are linked into the Session's `skills` directory under their exact names and loaded through the native `skill` tool; external Skill discovery stays off. Public MCP servers use the Environment origin only, as the [MCP origin contract](../../../../contracts/agents-api/environments.md#public-mcp-connection-origin) describes. With Subagents enabled, child agents use the same native tools. In both profiles the adapter turns off what needs a MiniMax account or outlives a Turn or asks the user: `askUser`, `beta.mcodeTools`, `beta.threadGoal`, `features.mavis`, `features.webSearch`, the Matrix builtin tools and, on the text profile, the bundled Skills, and it leaves `website_deploy` out of `tools`. `web_search: disabled` also removes `web_fetch`. Background Bash is off: the patched CLI gates it on `OAC_RUNTIME_MCODE_BACKGROUND_BASH=off`, and the adapter rejects a CLI that does not report it off.
In the workspace profile, the frozen installation's Skills are linked into the Session's `skills` directory under their exact names and loaded through the native `skill` tool. Native discovery also reads the workspace's `.minimax`, `.claude` and `.agents` Skills, as a local run does. Public MCP servers use the Environment origin only, as the [MCP origin contract](../../../../contracts/agents-api/environments.md#public-mcp-connection-origin) describes. With Subagents enabled, child agents use the same native tools. In both profiles the adapter turns off what needs a MiniMax account or outlives a Turn or asks the user: `askUser`, `beta.mcodeTools`, `beta.threadGoal`, `features.mavis`, `features.webSearch`, the Matrix builtin tools and, on the text profile, the bundled Skills, and it leaves `website_deploy` out of `tools`. `web_search: disabled` also removes `web_fetch`. Background Bash is off: the patched CLI gates it on `OAC_RUNTIME_MCODE_BACKGROUND_BASH=off`, and the adapter rejects a CLI that does not report it off.

## Turns, cancellation and continuation

Expand Down
Loading