mirror of
https://github.com/hanzoai/runtime.git
synced 2026-10-30 18:23:13 +00:00
- 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
41 lines
1.2 KiB
Go
41 lines
1.2 KiB
Go
// Copyright 2025 Hanzo Industries Inc.
|
|
// SPDX-License-Identifier: AGPL-3.0
|
|
|
|
package agents
|
|
|
|
import (
|
|
"errors"
|
|
"os"
|
|
"path/filepath"
|
|
"runtime"
|
|
)
|
|
|
|
func InitClaude(homeDir string) (string, string, error) {
|
|
var agentConfigFilePath string
|
|
var mcpLogFilePath string
|
|
|
|
switch runtime.GOOS {
|
|
case "darwin":
|
|
agentConfigFilePath = filepath.Join(homeDir, "Library", "Application Support", "Claude", "claude_desktop_config.json")
|
|
mcpLogFilePath = filepath.Join(homeDir, "Library", "Logs", "Claude", 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, "Claude", "claude_desktop_config.json")
|
|
mcpLogFilePath = filepath.Join(appData, "Claude", "Logs", mcpLogFileName)
|
|
|
|
case "linux":
|
|
agentConfigFilePath = filepath.Join(homeDir, ".config", "Claude", "claude_desktop_config.json")
|
|
mcpLogFilePath = filepath.Join("var", "log", "Claude", mcpLogFileName)
|
|
default:
|
|
return "", "", errors.New("operating system is not supported")
|
|
}
|
|
|
|
return agentConfigFilePath, mcpLogFilePath, nil
|
|
}
|