Documentation
¶
Index ¶
- Constants
- func AliceHomeDir() string
- func CodexHomeForAliceHome(aliceHome string) string
- func ConfigPathForAliceHome(aliceHome string) string
- func DefaultAliceHomeName() string
- func DefaultCodexHome() string
- func DefaultConfigPath() string
- func DefaultLogDir() string
- func DefaultLogFilePath() string
- func DefaultPIDFilePath() string
- func DefaultPromptDir() string
- func DefaultRunDir() string
- func DefaultRuntimeBinaryPath() string
- func DefaultWorkspaceDir() string
- func LogDirForAliceHome(aliceHome string) string
- func LogFilePathForAliceHome(aliceHome string) string
- func LogFilePathForAliceHomeAt(aliceHome string, at time.Time) string
- func PIDFilePathForAliceHome(aliceHome string) string
- func PromptDirForAliceHome(aliceHome string) string
- func ResolveAliceHomeDir(override string) string
- func RunDirForAliceHome(aliceHome string) string
- func RuntimeBinaryPathForAliceHome(aliceHome string) string
- func WorkspaceDirForAliceHome(aliceHome string) string
- type BotConfig
- type BotPermissionsConfig
- type CodexExecPolicyConfig
- type Config
- type GroupSceneConfig
- type GroupScenesConfig
- type ImageGenerationConfig
- type LLMProfileConfig
- type SceneCodexPoliciesConfig
Constants ¶
View Source
const ( GroupSceneSessionPerChat = "per_chat" GroupSceneSessionPerThread = "per_thread" )
View Source
const ( CodexSandboxReadOnly = "read-only" CodexSandboxWorkspaceWrite = "workspace-write" CodexSandboxDangerFullAccess = "danger-full-access" CodexApprovalUntrusted = "untrusted" CodexApprovalOnRequest = "on-request" CodexApprovalNever = "never" )
View Source
const ( EnvAliceHome = "ALICE_HOME" EnvCodexHome = "CODEX_HOME" )
View Source
const DefaultALLProxy = "http://127.0.0.1:8080"
View Source
const DefaultHTTPSProxy = "http://127.0.0.1:8080"
View Source
const DefaultImmediateFeedbackMode = ImmediateFeedbackModeReaction
View Source
const DefaultImmediateFeedbackReaction = "OK"
View Source
const DefaultLLMProvider = "codex"
View Source
const DefaultRuntimeHTTPAddr = "127.0.0.1:7331"
View Source
const DefaultWorkerConcurrency = 3
View Source
const ImmediateFeedbackModeReaction = "reaction"
View Source
const ImmediateFeedbackModeReply = "reply"
View Source
const LLMProviderClaude = "claude"
View Source
const LLMProviderGemini = "gemini"
View Source
const LLMProviderKimi = "kimi"
View Source
const TriggerModeAt = "at"
View Source
const TriggerModePrefix = "prefix"
Variables ¶
This section is empty.
Functions ¶
func AliceHomeDir ¶
func AliceHomeDir() string
func CodexHomeForAliceHome ¶ added in v0.3.0
func ConfigPathForAliceHome ¶ added in v0.3.0
func DefaultAliceHomeName ¶ added in v0.3.1
func DefaultAliceHomeName() string
func DefaultCodexHome ¶
func DefaultCodexHome() string
func DefaultConfigPath ¶
func DefaultConfigPath() string
func DefaultLogDir ¶ added in v0.3.1
func DefaultLogDir() string
func DefaultLogFilePath ¶ added in v0.3.1
func DefaultLogFilePath() string
func DefaultPIDFilePath ¶
func DefaultPIDFilePath() string
func DefaultPromptDir ¶
func DefaultPromptDir() string
func DefaultRunDir ¶
func DefaultRunDir() string
func DefaultRuntimeBinaryPath ¶
func DefaultRuntimeBinaryPath() string
func DefaultWorkspaceDir ¶
func DefaultWorkspaceDir() string
func LogDirForAliceHome ¶ added in v0.3.1
func LogFilePathForAliceHome ¶ added in v0.3.1
func LogFilePathForAliceHomeAt ¶ added in v0.3.1
func PIDFilePathForAliceHome ¶ added in v0.3.0
func PromptDirForAliceHome ¶ added in v0.3.0
func ResolveAliceHomeDir ¶ added in v0.3.0
func RunDirForAliceHome ¶ added in v0.3.0
func RuntimeBinaryPathForAliceHome ¶ added in v0.3.0
func WorkspaceDirForAliceHome ¶ added in v0.3.0
Types ¶
type BotConfig ¶ added in v0.4.0
type BotConfig struct {
Name string `mapstructure:"name"`
FeishuAppID string `mapstructure:"feishu_app_id"`
FeishuAppSecret string `mapstructure:"feishu_app_secret"`
FeishuBaseURL string `mapstructure:"feishu_base_url"`
FeishuBotOpenID string `mapstructure:"feishu_bot_open_id"`
FeishuBotUserID string `mapstructure:"feishu_bot_user_id"`
TriggerMode string `mapstructure:"trigger_mode"`
TriggerPrefix string `mapstructure:"trigger_prefix"`
ImmediateFeedbackMode string `mapstructure:"immediate_feedback_mode"`
ImmediateFeedbackReaction string `mapstructure:"immediate_feedback_reaction"`
LLMProvider string `mapstructure:"llm_provider"`
LLMProfiles map[string]LLMProfileConfig `mapstructure:"llm_profiles"`
GroupScenes *GroupScenesConfig `mapstructure:"group_scenes"`
CodexCommand string `mapstructure:"codex_command"`
CodexTimeoutSecs int `mapstructure:"codex_timeout_secs"`
CodexModel string `mapstructure:"codex_model"`
CodexReasoningEffort string `mapstructure:"codex_model_reasoning_effort"`
CodexPromptPrefix string `mapstructure:"codex_prompt_prefix"`
ClaudeCommand string `mapstructure:"claude_command"`
ClaudeTimeoutSecs int `mapstructure:"claude_timeout_secs"`
ClaudePromptPrefix string `mapstructure:"claude_prompt_prefix"`
GeminiCommand string `mapstructure:"gemini_command"`
GeminiTimeoutSecs int `mapstructure:"gemini_timeout_secs"`
GeminiPromptPrefix string `mapstructure:"gemini_prompt_prefix"`
KimiCommand string `mapstructure:"kimi_command"`
KimiTimeoutSecs int `mapstructure:"kimi_timeout_secs"`
KimiPromptPrefix string `mapstructure:"kimi_prompt_prefix"`
RuntimeHTTPAddr string `mapstructure:"runtime_http_addr"`
RuntimeHTTPToken string `mapstructure:"runtime_http_token"`
FailureMessage string `mapstructure:"failure_message"`
ThinkingMessage string `mapstructure:"thinking_message"`
ImageGeneration ImageGenerationConfig `mapstructure:"image_generation"`
AliceHome string `mapstructure:"alice_home"`
WorkspaceDir string `mapstructure:"workspace_dir"`
PromptDir string `mapstructure:"prompt_dir"`
CodexHome string `mapstructure:"codex_home"`
SoulPath string `mapstructure:"soul_path"`
CodexEnv map[string]string `mapstructure:"env"`
QueueCapacity int `mapstructure:"queue_capacity"`
WorkerConcurrency int `mapstructure:"worker_concurrency"`
AutomationTaskTimeoutSecs int `mapstructure:"automation_task_timeout_secs"`
Permissions *BotPermissionsConfig `mapstructure:"permissions"`
}
type BotPermissionsConfig ¶ added in v0.4.0
type BotPermissionsConfig struct {
RuntimeMessage *bool `mapstructure:"runtime_message"`
RuntimeAutomation *bool `mapstructure:"runtime_automation"`
RuntimeCampaigns *bool `mapstructure:"runtime_campaigns"`
AllowedSkills []string `mapstructure:"allowed_skills"`
Codex SceneCodexPoliciesConfig `mapstructure:"codex"`
}
type CodexExecPolicyConfig ¶ added in v0.4.0
type Config ¶
type Config struct {
BotID string `mapstructure:"-"`
BotName string `mapstructure:"bot_name"`
FeishuAppID string `mapstructure:"feishu_app_id"`
FeishuAppSecret string `mapstructure:"feishu_app_secret"`
FeishuBaseURL string `mapstructure:"feishu_base_url"`
FeishuBotOpenID string `mapstructure:"feishu_bot_open_id"`
FeishuBotUserID string `mapstructure:"feishu_bot_user_id"`
TriggerMode string `mapstructure:"trigger_mode"`
TriggerPrefix string `mapstructure:"trigger_prefix"`
ImmediateFeedbackMode string `mapstructure:"immediate_feedback_mode"`
ImmediateFeedbackReaction string `mapstructure:"immediate_feedback_reaction"`
LLMProvider string `mapstructure:"llm_provider"`
LLMProfiles map[string]LLMProfileConfig `mapstructure:"llm_profiles"`
GroupScenes GroupScenesConfig `mapstructure:"group_scenes"`
CodexCommand string `mapstructure:"codex_command"`
CodexTimeout time.Duration `mapstructure:"-"`
CodexTimeoutSecs int `mapstructure:"codex_timeout_secs"`
CodexModel string `mapstructure:"codex_model"`
CodexReasoningEffort string `mapstructure:"codex_model_reasoning_effort"`
CodexEnv map[string]string `mapstructure:"env"`
CodexPromptPrefix string `mapstructure:"codex_prompt_prefix"`
ClaudeCommand string `mapstructure:"claude_command"`
ClaudeTimeout time.Duration `mapstructure:"-"`
ClaudeTimeoutSecs int `mapstructure:"claude_timeout_secs"`
ClaudePromptPrefix string `mapstructure:"claude_prompt_prefix"`
GeminiCommand string `mapstructure:"gemini_command"`
GeminiTimeout time.Duration `mapstructure:"-"`
GeminiTimeoutSecs int `mapstructure:"gemini_timeout_secs"`
GeminiPromptPrefix string `mapstructure:"gemini_prompt_prefix"`
KimiCommand string `mapstructure:"kimi_command"`
KimiTimeout time.Duration `mapstructure:"-"`
KimiTimeoutSecs int `mapstructure:"kimi_timeout_secs"`
KimiPromptPrefix string `mapstructure:"kimi_prompt_prefix"`
RuntimeHTTPAddr string `mapstructure:"runtime_http_addr"`
RuntimeHTTPToken string `mapstructure:"runtime_http_token"`
FailureMessage string `mapstructure:"failure_message"`
ThinkingMessage string `mapstructure:"thinking_message"`
ImageGeneration ImageGenerationConfig `mapstructure:"image_generation"`
AliceHome string `mapstructure:"alice_home"`
WorkspaceDir string `mapstructure:"workspace_dir"`
PromptDir string `mapstructure:"prompt_dir"`
CodexHome string `mapstructure:"codex_home"`
SoulPath string `mapstructure:"soul_path"`
Permissions BotPermissionsConfig `mapstructure:"permissions"`
Bots map[string]BotConfig `mapstructure:"bots"`
QueueCapacity int `mapstructure:"queue_capacity"`
WorkerConcurrency int `mapstructure:"worker_concurrency"`
AutomationTaskTimeoutSecs int `mapstructure:"automation_task_timeout_secs"`
AutomationTaskTimeout time.Duration `mapstructure:"-"`
LogLevel string `mapstructure:"log_level"`
LogFile string `mapstructure:"log_file"`
LogMaxSizeMB int `mapstructure:"log_max_size_mb"`
LogMaxBackups int `mapstructure:"log_max_backups"`
LogMaxAgeDays int `mapstructure:"log_max_age_days"`
LogCompress bool `mapstructure:"log_compress"`
}
func LoadFromFile ¶
func (Config) AllowedBundledSkills ¶ added in v0.4.0
func (Config) RuntimeConfigForBot ¶ added in v0.5.0
func (Config) RuntimeConfigs ¶ added in v0.4.0
type GroupSceneConfig ¶ added in v0.3.11
type GroupSceneConfig struct {
Enabled bool `mapstructure:"enabled"`
TriggerTag string `mapstructure:"trigger_tag"`
SessionScope string `mapstructure:"session_scope"`
LLMProfile string `mapstructure:"llm_profile"`
NoReplyToken string `mapstructure:"no_reply_token"`
CreateFeishuThread bool `mapstructure:"create_feishu_thread"`
}
type GroupScenesConfig ¶ added in v0.3.11
type GroupScenesConfig struct {
Chat GroupSceneConfig `mapstructure:"chat"`
Work GroupSceneConfig `mapstructure:"work"`
}
type ImageGenerationConfig ¶ added in v0.5.11
type ImageGenerationConfig struct {
Enabled bool `mapstructure:"enabled"`
Provider string `mapstructure:"provider"`
Model string `mapstructure:"model"`
BaseURL string `mapstructure:"base_url"`
TimeoutSecs int `mapstructure:"timeout_secs"`
Size string `mapstructure:"size"`
Quality string `mapstructure:"quality"`
Background string `mapstructure:"background"`
OutputFormat string `mapstructure:"output_format"`
InputFidelity string `mapstructure:"input_fidelity"`
UseCurrentAttachments bool `mapstructure:"use_current_attachments"`
}
type LLMProfileConfig ¶ added in v0.3.11
type SceneCodexPoliciesConfig ¶ added in v0.4.0
type SceneCodexPoliciesConfig struct {
Chat CodexExecPolicyConfig `mapstructure:"chat"`
Work CodexExecPolicyConfig `mapstructure:"work"`
}
Click to show internal directories.
Click to hide internal directories.