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
7 changes: 3 additions & 4 deletions apps/daemon/internal/agent/claudesdk/mcp_environment_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import (
"testing"

"github.com/MiniMax-AI/OpenAgentCore/internal/agentdaemon/proto"
"github.com/MiniMax-AI/OpenAgentCore/internal/agentplugin"
)

func TestEnvironmentMCPUsesInstalledLauncherAndSelectedCredential(t *testing.T) {
Expand All @@ -17,8 +16,8 @@ func TestEnvironmentMCPUsesInstalledLauncherAndSelectedCredential(t *testing.T)
token := "selected-user-token"
t.Setenv("MCP_TOKEN", "unselected-native-token")
req.LocalEnvironment = &proto.LocalEnvironment{CapabilityRoot: "/private/runtime/capabilities", WorkspaceRoot: config.Workspace.Directory, MCP: []proto.EnvironmentMCP{
{InstallationRoot: "/private/runtime/capabilities", PackageRoot: "plugins/local", Server: agentplugin.MCPServer{Name: "local", Type: "stdio", Command: "untrusted-package-command", Args: []string{"package-argument"}, EnvVars: []string{"MCP_TOKEN"}}},
{InstallationRoot: "/private/runtime/capabilities", PackageRoot: "plugins/remote", Server: agentplugin.MCPServer{Name: "remote", Type: "http", URL: "https://example.invalid/mcp", BearerTokenEnvVar: "MCP_TOKEN"}, BearerToken: &token},
{InstallationRoot: "/private/runtime/capabilities", PackageRoot: "plugins/local", Server: proto.PluginMCPServer{Name: "local", Type: "stdio", Command: "untrusted-package-command", Args: []string{"package-argument"}, EnvVars: []string{"MCP_TOKEN"}}},
{InstallationRoot: "/private/runtime/capabilities", PackageRoot: "plugins/remote", Server: proto.PluginMCPServer{Name: "remote", Type: "http", URL: "https://example.invalid/mcp", BearerTokenEnvVar: "MCP_TOKEN"}, BearerToken: &token},
}}
start, env, err := prepareConfiguration(config, req)
if err != nil {
Expand Down Expand Up @@ -63,7 +62,7 @@ func TestEnvironmentMCPRejectsUnqualifiedCombinations(t *testing.T) {
e.MCP[0].Server.URL = "http://example.invalid/mcp"
},
} {
environment := &proto.LocalEnvironment{MCP: []proto.EnvironmentMCP{{InstallationRoot: "/private/runtime/capabilities", PackageRoot: "plugins/remote", Server: agentplugin.MCPServer{Name: "remote", Type: "http", URL: "https://example.invalid/mcp"}}}}
environment := &proto.LocalEnvironment{MCP: []proto.EnvironmentMCP{{InstallationRoot: "/private/runtime/capabilities", PackageRoot: "plugins/remote", Server: proto.PluginMCPServer{Name: "remote", Type: "http", URL: "https://example.invalid/mcp"}}}}
mutate(environment)
if _, _, err := prepareRuntimeMCP(proto.PromptRequestPayload{LocalEnvironment: environment}); err == nil {
t.Fatal("unsupported declaration accepted")
Expand Down
17 changes: 8 additions & 9 deletions apps/daemon/internal/agent/claudesdk/workspace.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import (
"strings"

"github.com/MiniMax-AI/OpenAgentCore/apps/daemon/internal/localworkspace"
"github.com/MiniMax-AI/OpenAgentCore/internal/agentcapabilities"
"github.com/MiniMax-AI/OpenAgentCore/internal/agentdaemon/proto"
)

Expand All @@ -23,14 +22,14 @@ type WorkspaceConfig struct {
}

type workspaceProfile struct {
ToolEnv map[string]string `json:"tool_env,omitempty"`
CapabilityRoot string `json:"capability_root,omitempty"`
MCP []environmentMCPServer `json:"mcp,omitempty"`
Skills []agentcapabilities.InstalledSkill `json:"skills,omitempty"`
Home string `json:"home"`
State string `json:"state"`
Scratch string `json:"scratch"`
EnvNames []string `json:"env_names"`
ToolEnv map[string]string `json:"tool_env,omitempty"`
CapabilityRoot string `json:"capability_root,omitempty"`
MCP []environmentMCPServer `json:"mcp,omitempty"`
Skills []proto.InstalledSkill `json:"skills,omitempty"`
Home string `json:"home"`
State string `json:"state"`
Scratch string `json:"scratch"`
EnvNames []string `json:"env_names"`
}

func prepareWorkspace(config Config, req proto.PromptRequestPayload) (*workspaceProfile, []string, error) {
Expand Down
7 changes: 3 additions & 4 deletions apps/daemon/internal/agent/codex/mcp_environment_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,13 @@ import (
"testing"

"github.com/MiniMax-AI/OpenAgentCore/internal/agentdaemon/proto"
"github.com/MiniMax-AI/OpenAgentCore/internal/agentplugin"
)

func TestEnvironmentMCPProjectsIsolatedStdioAndPrivateHTTPReferences(t *testing.T) {
token := "user-token"
local := &proto.LocalEnvironment{MCP: []proto.EnvironmentMCP{
{InstallationRoot: "/private/runtime/capabilities", PackageRoot: "plugins/0", Server: agentplugin.MCPServer{Name: "local", Type: "stdio", Command: "must-not-be-native-command", Args: []string{"private-argument"}}},
{InstallationRoot: "/private/runtime/capabilities", PackageRoot: "plugins/1", BearerToken: &token, Server: agentplugin.MCPServer{Name: "remote", Type: "http", URL: "https://example.com/mcp", HTTPHeaders: map[string]string{"X-Key": "literal-${DO_NOT_EXPAND}"}}},
{InstallationRoot: "/private/runtime/capabilities", PackageRoot: "plugins/0", Server: proto.PluginMCPServer{Name: "local", Type: "stdio", Command: "must-not-be-native-command", Args: []string{"private-argument"}}},
{InstallationRoot: "/private/runtime/capabilities", PackageRoot: "plugins/1", BearerToken: &token, Server: proto.PluginMCPServer{Name: "remote", Type: "http", URL: "https://example.com/mcp", HTTPHeaders: map[string]string{"X-Key": "literal-${DO_NOT_EXPAND}"}}},
}}
servers, env, err := runtimeMCPServers(proto.PromptRequestPayload{LocalEnvironment: local})
if err != nil || len(servers) != 2 || len(env) != 1 {
Expand Down Expand Up @@ -58,7 +57,7 @@ func TestSessionMCPHeadersReachNativeConfig(t *testing.T) {

func TestEnvironmentMCPRejectsUnqualifiedCredentialChanges(t *testing.T) {
token := "user-token"
local := &proto.LocalEnvironment{MCP: []proto.EnvironmentMCP{{BearerToken: &token, Server: agentplugin.MCPServer{Name: "remote", Type: "http", URL: "http://example.com/mcp"}}}}
local := &proto.LocalEnvironment{MCP: []proto.EnvironmentMCP{{BearerToken: &token, Server: proto.PluginMCPServer{Name: "remote", Type: "http", URL: "http://example.com/mcp"}}}}
if _, _, err := runtimeMCPServers(proto.PromptRequestPayload{LocalEnvironment: local}); err == nil {
t.Fatal("plaintext bearer accepted")
}
Expand Down
10 changes: 4 additions & 6 deletions apps/daemon/internal/agent/codex/preparation_router_test.go
Original file line number Diff line number Diff line change
@@ -1,21 +1,19 @@
package codex

import "github.com/MiniMax-AI/OpenAgentCore/internal/harnessconfig"

import (
"context"
"github.com/MiniMax-AI/OpenAgentCore/apps/daemon/internal/localworkspace"
"github.com/MiniMax-AI/OpenAgentCore/internal/agentcapabilities"
"github.com/google/uuid"
"os"
"path/filepath"
"testing"
"time"

"github.com/MiniMax-AI/OpenAgentCore/apps/daemon/internal/agent"
"github.com/MiniMax-AI/OpenAgentCore/apps/daemon/internal/dispatch"
"github.com/MiniMax-AI/OpenAgentCore/apps/daemon/internal/localworkspace"
"github.com/MiniMax-AI/OpenAgentCore/internal/agentdaemon/proto"
"github.com/MiniMax-AI/OpenAgentCore/internal/agentdaemon/proto/prototest"
"github.com/MiniMax-AI/OpenAgentCore/internal/harnessconfig"
"github.com/google/uuid"
)

type preparationWireSender chan proto.Envelope
Expand Down Expand Up @@ -55,7 +53,7 @@ func TestPreparationRouterRetainsActualNativeChild(t *testing.T) {
}
req.AgentStateKey = session
req.DisableExecutionEnvironment = false
req.LocalEnvironment = &proto.LocalEnvironment{ID: environment, WorkspaceDirectory: "/workspace", CapabilitySources: &agentcapabilities.Input{}}
req.LocalEnvironment = &proto.LocalEnvironment{ID: environment, WorkspaceDirectory: "/workspace", CapabilitySources: &proto.CapabilitySources{}}
registry := agent.NewRegistry()
registry.RegisterKind(proto.SupportedAgentKind{Kind: "codex", Available: true, Capabilities: prototest.Capabilities(proto.AgentKindCapabilities{LocalEnvironment: proto.CapabilitySupported, FunctionTools: proto.CapabilitySupported})}, harnessconfig.Configuration{})
prepared := make(chan *Prepared, 1)
Expand Down
3 changes: 1 addition & 2 deletions apps/daemon/internal/agent/codex/recovery_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import (
"testing"
"time"

"github.com/MiniMax-AI/OpenAgentCore/internal/agentcapabilities"
"github.com/MiniMax-AI/OpenAgentCore/internal/agentdaemon/proto"
"github.com/MiniMax-AI/OpenAgentCore/internal/obs/log"
"github.com/google/uuid"
Expand Down Expand Up @@ -158,7 +157,7 @@ func TestPreparedRecoveryCannotStartWithoutExistingHistory(t *testing.T) {
t.Fatal(err)
}
req.DisableExecutionEnvironment = false
req.LocalEnvironment = &proto.LocalEnvironment{ID: uuid.NewString(), WorkspaceDirectory: "/workspace", CapabilitySources: &agentcapabilities.Input{}, WorkspaceRoot: cwd}
req.LocalEnvironment = &proto.LocalEnvironment{ID: uuid.NewString(), WorkspaceDirectory: "/workspace", CapabilitySources: &proto.CapabilitySources{}, WorkspaceRoot: cwd}
}
e, err := testExecutor(t, "complete", req, cfg)
if err != nil {
Expand Down
7 changes: 3 additions & 4 deletions apps/daemon/internal/agent/mcode/environment_mcp_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,10 @@ import (
"time"

"github.com/MiniMax-AI/OpenAgentCore/internal/agentdaemon/proto"
"github.com/MiniMax-AI/OpenAgentCore/internal/agentplugin"
)

func environmentMCPFixture() proto.EnvironmentMCP {
return proto.EnvironmentMCP{InstallationRoot: "/private/runtime/capabilities", PackageRoot: "plugins/fixture", Server: agentplugin.MCPServer{
return proto.EnvironmentMCP{InstallationRoot: "/private/runtime/capabilities", PackageRoot: "plugins/fixture", Server: proto.PluginMCPServer{
Name: "proof.server", Type: "stdio", Command: "never-exec-before-sandbox", Args: []string{"private-argument"},
EnvVars: []string{"USER_SELECTED"}, CWD: "resources",
}}
Expand Down Expand Up @@ -77,7 +76,7 @@ func TestEnvironmentMCPRejectsUnqualifiedAuthorityBeforePreparation(t *testing.T
req.LocalEnvironment.MCP = []proto.EnvironmentMCP{environmentMCPFixture()}
switch name {
case "http-bearer-insecure", "http-bearer-missing":
req.LocalEnvironment.MCP[0].Server = agentplugin.MCPServer{Name: "remote", Type: "http", URL: "https://example.invalid/mcp"}
req.LocalEnvironment.MCP[0].Server = proto.PluginMCPServer{Name: "remote", Type: "http", URL: "https://example.invalid/mcp"}
if name == "http-bearer-missing" {
req.LocalEnvironment.MCP[0].Server.BearerTokenEnvVar = "SELECTED_TOKEN"
}
Expand Down Expand Up @@ -177,7 +176,7 @@ func mcpRegistryEntry(server, segment, tool, toolSegment string) map[string]any
func TestEnvironmentHTTPMCPUsesEphemeralACPConfiguration(t *testing.T) {
for _, authenticated := range []bool{false, true} {
c, req, record := workspaceFixture(t)
item := proto.EnvironmentMCP{Server: agentplugin.MCPServer{Name: "remote", Type: "http", URL: "https://example.invalid/mcp"}}
item := proto.EnvironmentMCP{Server: proto.PluginMCPServer{Name: "remote", Type: "http", URL: "https://example.invalid/mcp"}}
const token = "private-mcp-canary"
if authenticated {
value := token
Expand Down
5 changes: 3 additions & 2 deletions apps/daemon/internal/agent/mcode/tool_environment_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,9 @@ import (
"slices"
"testing"

"github.com/MiniMax-AI/OpenAgentCore/internal/agentdaemon/proto"

"github.com/MiniMax-AI/OpenAgentCore/apps/daemon/internal/localworkspace"
"github.com/MiniMax-AI/OpenAgentCore/internal/agentcapabilities"
"github.com/google/uuid"
)

Expand Down Expand Up @@ -40,7 +41,7 @@ func TestWorkspaceCredentialsRemainInRuntimeSnapshotAcrossReconnect(t *testing.T
req.AgentStateKey = session
req.LocalEnvironment.ID, req.LocalEnvironment.WorkspaceDirectory = environment, config.Directory
req.LocalEnvironment.Capabilities = true
req.LocalEnvironment.CapabilitySources = &agentcapabilities.Input{Directories: []string{plugin}}
req.LocalEnvironment.CapabilitySources = &proto.CapabilitySources{Directories: []string{plugin}}
for _, resume := range []bool{false, true} {
if resume {
req.AgentSessionID = "native-1"
Expand Down
7 changes: 3 additions & 4 deletions apps/daemon/internal/agent/mcode/workspace_skills_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@ import (
"slices"
"testing"

"github.com/MiniMax-AI/OpenAgentCore/internal/agentcapabilities"
"github.com/MiniMax-AI/OpenAgentCore/internal/agentskill"
"github.com/MiniMax-AI/OpenAgentCore/internal/agentdaemon/proto"
)

func TestWorkspaceSkillsUseSelectedSnapshotAndNativeLoader(t *testing.T) {
Expand All @@ -23,9 +22,9 @@ func TestWorkspaceSkillsUseSelectedSnapshotAndNativeLoader(t *testing.T) {
t.Fatal(err)
}
req.LocalEnvironment.CapabilityRoot = root
req.LocalEnvironment.Skills = []agentcapabilities.InstalledSkill{{
req.LocalEnvironment.Skills = []proto.InstalledSkill{{
InstallationRoot: root, RelativeRoot: "plugin/skills/proof", PackageRoot: "plugin",
Metadata: agentskill.Metadata{Name: "proof", Description: "Read a marker"},
Metadata: proto.SkillMetadata{Name: "proof", Description: "Read a marker"},
}}
for range 2 {
opts, err := prepareWorkspaceOptions(testStateRoot(t), c, req)
Expand Down
11 changes: 5 additions & 6 deletions apps/daemon/internal/agent/mcp_binding_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import (
"testing"

"github.com/MiniMax-AI/OpenAgentCore/internal/agentdaemon/proto"
"github.com/MiniMax-AI/OpenAgentCore/internal/agentplugin"
)

func TestMCPBindingsPreserveOriginAuthorityAndPolicy(t *testing.T) {
Expand All @@ -27,8 +26,8 @@ func TestMCPBindingsPreserveOriginAuthorityAndPolicy(t *testing.T) {
}
}
local := &proto.LocalEnvironment{MCP: []proto.EnvironmentMCP{
{Server: agentplugin.MCPServer{Name: "stdio", Type: "stdio", Command: "node", Args: []string{"tool.js"}}, PackageRoot: "plugins/proof", InstallationRoot: "/private/installed"},
{Server: agentplugin.MCPServer{Name: "remote", Type: "http", URL: "https://example.test/mcp", HTTPHeaders: map[string]string{"X-Selected": "literal"}}, BearerToken: &token},
{Server: proto.PluginMCPServer{Name: "stdio", Type: "stdio", Command: "node", Args: []string{"tool.js"}}, PackageRoot: "plugins/proof", InstallationRoot: "/private/installed"},
{Server: proto.PluginMCPServer{Name: "remote", Type: "http", URL: "https://example.test/mcp", HTTPHeaders: map[string]string{"X-Selected": "literal"}}, BearerToken: &token},
}}
got, err := ResolveMCPBindings(proto.PromptRequestPayload{LocalEnvironment: local})
if err != nil || len(got) != 2 {
Expand Down Expand Up @@ -58,11 +57,11 @@ func TestMCPBindingsDistinguishAbsentAndEmptyProfile(t *testing.T) {

func TestMCPBindingsRejectRelocationAndAmbiguousInstallation(t *testing.T) {
public := []proto.MCPHTTPServer{{ConnectionOrigin: "service", ServerLabel: "remote", ServerURL: "https://example.test/mcp"}}
local := &proto.LocalEnvironment{MCP: []proto.EnvironmentMCP{{Server: agentplugin.MCPServer{Name: "remote", Type: "http", URL: "https://example.test/mcp"}}}}
local := &proto.LocalEnvironment{MCP: []proto.EnvironmentMCP{{Server: proto.PluginMCPServer{Name: "remote", Type: "http", URL: "https://example.test/mcp"}}}}
for _, req := range []proto.PromptRequestPayload{
{MCPHTTPServers: &public, LocalEnvironment: local},
{LocalEnvironment: &proto.LocalEnvironment{MCP: append(local.MCP, local.MCP[0])}},
{LocalEnvironment: &proto.LocalEnvironment{MCP: []proto.EnvironmentMCP{{Server: agentplugin.MCPServer{Name: "remote", Type: "http", URL: "https://example.test/mcp", BearerTokenEnvVar: "MISSING"}}}}},
{LocalEnvironment: &proto.LocalEnvironment{MCP: []proto.EnvironmentMCP{{Server: proto.PluginMCPServer{Name: "remote", Type: "http", URL: "https://example.test/mcp", BearerTokenEnvVar: "MISSING"}}}}},
} {
if _, err := ResolveMCPBindings(req); err == nil {
t.Fatal("unsupported authority accepted")
Expand Down Expand Up @@ -94,7 +93,7 @@ func TestPublicEnvironmentMCPRetainsVaultAuthority(t *testing.T) {
}
}
public[0].ConnectionOrigin = "environment"
req.LocalEnvironment.MCP = []proto.EnvironmentMCP{{Server: agentplugin.MCPServer{Name: "remote", Type: "http", URL: "https://example.test/mcp"}}}
req.LocalEnvironment.MCP = []proto.EnvironmentMCP{{Server: proto.PluginMCPServer{Name: "remote", Type: "http", URL: "https://example.test/mcp"}}}
if _, err := ResolveMCPBindings(req); err == nil {
t.Fatal("public/Plugin identity collision accepted")
}
Expand Down
3 changes: 1 addition & 2 deletions apps/daemon/internal/cli/connect_suspend_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ import (

"github.com/MiniMax-AI/OpenAgentCore/apps/daemon/internal/agent"
"github.com/MiniMax-AI/OpenAgentCore/apps/daemon/internal/transport"
"github.com/MiniMax-AI/OpenAgentCore/internal/agentcapabilities"
"github.com/MiniMax-AI/OpenAgentCore/internal/agentdaemon/proto"
"github.com/MiniMax-AI/OpenAgentCore/internal/agentdaemon/proto/prototest"
"github.com/MiniMax-AI/OpenAgentCore/internal/harnessconfig"
Expand Down Expand Up @@ -383,7 +382,7 @@ func TestQuiesceRetainsExecutorAcrossReconnectAndShutdownConfirmsCleanup(t *test
t.Fatal("no connection")
}
defer peer.Close()
preparation, err := proto.NewEnvelope(proto.TypeExecutionPrepare, "prepare", proto.ExecutionPreparePayload{SessionID: session, Configuration: proto.PromptRequestPayload{AgentKind: "cleanup", AgentStateKey: session, LocalEnvironment: &proto.LocalEnvironment{ID: environment, WorkspaceDirectory: "/workspace", CapabilitySources: &agentcapabilities.Input{}}}})
preparation, err := proto.NewEnvelope(proto.TypeExecutionPrepare, "prepare", proto.ExecutionPreparePayload{SessionID: session, Configuration: proto.PromptRequestPayload{AgentKind: "cleanup", AgentStateKey: session, LocalEnvironment: &proto.LocalEnvironment{ID: environment, WorkspaceDirectory: "/workspace", CapabilitySources: &proto.CapabilitySources{}}}})
if err != nil {
t.Fatal(err)
}
Expand Down
7 changes: 4 additions & 3 deletions apps/daemon/internal/cli/runtime_mcp_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,13 @@ import (
"slices"
"testing"

"github.com/MiniMax-AI/OpenAgentCore/internal/agentdaemon/proto"

"github.com/MiniMax-AI/OpenAgentCore/internal/agentcapabilities"
"github.com/MiniMax-AI/OpenAgentCore/internal/agentplugin"
)

func TestRuntimeMCPOverlaysExplicitVariablesOnUserEnvironment(t *testing.T) {
manifest := agentcapabilities.Manifest{MCP: []agentcapabilities.InstalledMCP{{PackageRoot: "plugins/0", Server: agentplugin.MCPServer{
manifest := agentcapabilities.Manifest{MCP: []agentcapabilities.InstalledMCP{{PackageRoot: "plugins/0", Server: proto.PluginMCPServer{
Name: "local", Type: "stdio", Command: "python3", Args: []string{"proof.py", "${LITERAL}"}, EnvVars: []string{"SELECTED"}, CWD: "./server",
}}}}
t.Setenv("SELECTED", "private-native-value")
Expand All @@ -29,7 +30,7 @@ func TestRuntimeMCPOverlaysExplicitVariablesOnUserEnvironment(t *testing.T) {
}

func TestRuntimeMCPKeepsAbsoluteCWDAndRejectsHTTP(t *testing.T) {
manifest := agentcapabilities.Manifest{MCP: []agentcapabilities.InstalledMCP{{PackageRoot: "plugins/0", Server: agentplugin.MCPServer{
manifest := agentcapabilities.Manifest{MCP: []agentcapabilities.InstalledMCP{{PackageRoot: "plugins/0", Server: proto.PluginMCPServer{
Name: "local", Type: "stdio", Command: "python3", CWD: "/workspace",
}}}}
got, err := resolveMCPInvocation(manifest, "/private/runtime/capabilities", "plugins/0", "local", nil)
Expand Down
7 changes: 4 additions & 3 deletions apps/daemon/internal/cli/runtime_mcp_windows_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,15 @@ package cli

import (
"encoding/json"
"github.com/MiniMax-AI/OpenAgentCore/internal/agentcapabilities"
"github.com/MiniMax-AI/OpenAgentCore/internal/agentplugin"
"os"
"os/exec"
"path/filepath"
"slices"
"strings"
"testing"

"github.com/MiniMax-AI/OpenAgentCore/internal/agentcapabilities"
"github.com/MiniMax-AI/OpenAgentCore/internal/agentdaemon/proto"
)

func TestWindowsRuntimeMCPPackageManagers(t *testing.T) {
Expand Down Expand Up @@ -137,7 +138,7 @@ func TestWindowsRuntimeMCPExplicitPath(t *testing.T) {
t.Fatal(err)
}
t.Setenv("Path", os.Getenv("PATH"))
manifest := agentcapabilities.Manifest{MCP: []agentcapabilities.InstalledMCP{{PackageRoot: "plugins/0", Server: agentplugin.MCPServer{Name: "test", Type: "stdio", Command: "selected-node", Args: []string{fixture}, CWD: directory, EnvVars: []string{"PATH", "OAC_MCP_FIXTURE_VALUE"}}}}}
manifest := agentcapabilities.Manifest{MCP: []agentcapabilities.InstalledMCP{{PackageRoot: "plugins/0", Server: proto.PluginMCPServer{Name: "test", Type: "stdio", Command: "selected-node", Args: []string{fixture}, CWD: directory, EnvVars: []string{"PATH", "OAC_MCP_FIXTURE_VALUE"}}}}}
invocation, err := resolveMCPInvocation(manifest, directory, "plugins/0", "test", map[string]string{"PATH": directory, "OAC_MCP_FIXTURE_VALUE": "selected"})
if err != nil {
t.Fatal(err)
Expand Down
Loading
Loading