Files
zeekay 0c7efccf40 feat: Add new Dockerfiles and improve containerization
- Add main Dockerfile for production builds
- Add Dockerfile.runtime for secure code execution
- Add Dockerfile.runtime.fixed with improved configuration
- Include .dockerignore for build optimization
- Add integration documentation and publishing guides
- Update API and CLI components for better runtime support
- Enhance sandbox and container management features
2025-08-16 23:03:39 -05:00

41 lines
1.1 KiB
Go

// Copyright 2025 Hanzo Industries Inc.
// SPDX-License-Identifier: AGPL-3.0
package agents
import (
"errors"
"os"
"path/filepath"
"runtime"
)
func InitCursor(homeDir string) (string, string, error) {
var agentConfigFilePath string
var mcpLogFilePath string
switch runtime.GOOS {
case "darwin":
agentConfigFilePath = filepath.Join(homeDir, ".cursor", "mcp.json")
mcpLogFilePath = filepath.Join(homeDir, "Library", "Logs", "Cursor", mcpLogFileName)
case "windows":
// Resolve %APPDATA% environment variable
appData := os.Getenv("APPDATA")
if appData == "" {
return "", "", errors.New("could not resolve APPDATA environment variable")
}
agentConfigFilePath = filepath.Join(appData, ".cursor", "mcp.json")
mcpLogFilePath = filepath.Join(appData, "Cursor", "Logs", mcpLogFileName)
case "linux":
agentConfigFilePath = filepath.Join(homeDir, ".cursor", "mcp.json")
mcpLogFilePath = filepath.Join("var", "log", "Cursor", mcpLogFileName)
default:
return "", "", errors.New("operating system is not supported")
}
return agentConfigFilePath, mcpLogFilePath, nil
}