源码快照 @ 2026-09-01 (source-only, 剔除非源码素材)
Publish Claude Code Binaries / Stage and publish binaries (push) Canceled after 0s
Publish Tutti App Runtime / Build darwin-arm64 (push) Canceled after 0s
Publish Tutti App Runtime / Build darwin-amd64 (push) Canceled after 0s
Publish Tutti App Runtime / Build linux-amd64 (push) Canceled after 0s
Publish Tutti App Runtime / Build windows-amd64 (push) Canceled after 0s
Sync Tutti Agent Skills / sync (push) Canceled after 0s
Windows Agent Adapters / Test Windows agent adapters (push) Canceled after 0s
Windows Daemon Adapters / Test Windows daemon adapters (push) Canceled after 0s
Publish Tutti App Runtime / Publish runtime catalog (push) Canceled after 0s
Publish Claude Code Binaries / Stage and publish binaries (push) Canceled after 0s
Publish Tutti App Runtime / Build darwin-arm64 (push) Canceled after 0s
Publish Tutti App Runtime / Build darwin-amd64 (push) Canceled after 0s
Publish Tutti App Runtime / Build linux-amd64 (push) Canceled after 0s
Publish Tutti App Runtime / Build windows-amd64 (push) Canceled after 0s
Sync Tutti Agent Skills / sync (push) Canceled after 0s
Windows Agent Adapters / Test Windows agent adapters (push) Canceled after 0s
Windows Daemon Adapters / Test Windows daemon adapters (push) Canceled after 0s
Publish Tutti App Runtime / Publish runtime catalog (push) Canceled after 0s
This commit is contained in:
commit
2ed3415fb7
8018 files changed
+1936476
No files matched your search
@@ -0,0 +1,43 @@
|
||||
package computer
|
||||
|
||||
import (
|
||||
"context"
|
||||
"os"
|
||||
"strings"
|
||||
)
|
||||
|
||||
// cua-driver launch resolution. TUTTI_COMPUTER_MCP_ENTRY_PATH points at an
|
||||
// explicit binary for packaged/operator installs; Windows also discovers the
|
||||
// official per-user install locations so an in-process install is visible
|
||||
// without restarting tuttid.
|
||||
const (
|
||||
computerMCPCommandOverrideEnv = "TUTTI_COMPUTER_MCP_COMMAND"
|
||||
computerMCPEntryPathEnv = "TUTTI_COMPUTER_MCP_ENTRY_PATH"
|
||||
)
|
||||
|
||||
var (
|
||||
defaultComputerMCPCommand = "cua-driver"
|
||||
defaultComputerMCPArgs = []string{"mcp"}
|
||||
)
|
||||
|
||||
// resolveComputerMCPCommand returns the full command used to launch the
|
||||
// cua-driver MCP server, honoring operator overrides.
|
||||
func resolveComputerMCPCommand(_ context.Context) []string {
|
||||
// The override is treated as the binary path; "mcp" is always appended as the subcommand.
|
||||
if command := strings.TrimSpace(os.Getenv(computerMCPCommandOverrideEnv)); command != "" {
|
||||
return []string{command, "mcp"}
|
||||
}
|
||||
if entry := strings.TrimSpace(os.Getenv(computerMCPEntryPathEnv)); entry != "" {
|
||||
return []string{entry, "mcp"}
|
||||
}
|
||||
if entry := resolveInstalledComputerDriver(); entry != "" {
|
||||
return []string{entry, "mcp"}
|
||||
}
|
||||
return append([]string{defaultComputerMCPCommand}, defaultComputerMCPArgs...)
|
||||
}
|
||||
|
||||
// computerMCPSubprocessEnv returns extra env for the cua-driver subprocess.
|
||||
// cua-driver does not need proxy exclusions, so this returns nil.
|
||||
func computerMCPSubprocessEnv() []string {
|
||||
return nil
|
||||
}
|
||||
Reference in new issue
Block a user