Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ExampleConfig []byte
var ProjectExampleConfig []byte
var SlackManifest []byte
var Templates embed.FS
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
AnthropicAPIKey string
DiscordGuildID string
LoopDir string
MCPServers map[string]MCPServerConfig
TaskTemplates []TaskTemplate
Mounts []string
CopyFiles []string
Envs map[string]string
ClaudeModel string
StreamingEnabled bool
Memory MemoryConfig
Permissions types.Permissions
}
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 EmbeddingsConfig ¶ added in v0.1.33
type EmbeddingsConfig struct {
Provider string `json:"provider"` // "ollama"
Model string `json:"model"` // e.g. "nomic-embed-text"
OllamaURL string `json:"ollama_url"` // default "http://localhost:11434"
}
EmbeddingsConfig configures the embedding provider for semantic memory search.
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 MemoryConfig ¶ added in v0.1.33
type MemoryConfig struct {
Enabled bool
Paths []string
MaxChunkChars int
ReindexIntervalSec int
Embeddings EmbeddingsConfig
}
MemoryConfig groups all memory-related settings: enable flag, paths, and embeddings.
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"`
AutoDeleteSec int `json:"auto_delete_sec"`
}
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.