Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ExampleConfig []byte
var ProjectExampleConfig []byte
var SlackManifest []byte
Functions ¶
func IsNamedVolume ¶ added in v0.1.7
IsNamedVolume returns true if the source part of a mount looks like a Docker named volume rather than a host path (no slashes, doesn't start with ~ or .).
Types ¶
type Config ¶
type Config struct {
PlatformType types.Platform
DiscordToken string
DiscordAppID string
SlackBotToken string
SlackAppToken string
ClaudeBinPath string
DBPath string
LogFile string
LogLevel string
LogFormat string
ContainerImage string
ContainerTimeout time.Duration
ContainerMemoryMB int64
ContainerCPUs float64
ContainerKeepAlive time.Duration
PollInterval time.Duration
APIAddr string
ClaudeCodeOAuthToken string
DiscordGuildID string
LoopDir string
MCPServers map[string]MCPServerConfig
TaskTemplates []TaskTemplate
Mounts []string
Envs map[string]string
ClaudeModel string
StreamingEnabled bool
}
Config holds all application configuration loaded from config.json.
func LoadProjectConfig ¶
LoadProjectConfig loads project-specific config from {workDir}/.loop/config.json and merges it with the main config. Only mounts, mcp_servers, and claude_model are loaded from the project config for security reasons.
Merge behavior: - Mounts: Project mounts replace global mounts entirely - MCP Servers: Merged with project servers taking precedence over main config
Relative paths in project mounts are resolved relative to workDir. If the project config file doesn't exist, returns the main config unchanged.
type MCPServerConfig ¶
type MCPServerConfig struct {
Command string `json:"command"`
Args []string `json:"args,omitempty"`
Env map[string]string `json:"env,omitempty"`
}
MCPServerConfig represents a single MCP server entry in the config.
type TaskTemplate ¶
type TaskTemplate struct {
Name string `json:"name"`
Description string `json:"description"`
Schedule string `json:"schedule"`
Type string `json:"type"`
Prompt string `json:"prompt"`
PromptPath string `json:"prompt_path"`
}
TaskTemplate represents a reusable task template with schedule and prompt.
func (*TaskTemplate) ResolvePrompt ¶ added in v0.1.8
func (t *TaskTemplate) ResolvePrompt(loopDir string) (string, error)
ResolvePrompt returns the prompt text for the template. If Prompt is set, it is returned directly. If PromptPath is set, the file is read from {loopDir}/templates/{prompt_path}. Exactly one of Prompt or PromptPath must be set.