Documentation
¶
Index ¶
- Constants
- func AliceHomeDir() string
- func BundledSkillSourceDirForAliceHome(aliceHome string) string
- func CodexHomeForAliceHome(aliceHome string) string
- func ConfigPathForAliceHome(aliceHome string) string
- func DefaultAgentsSkillsDir() string
- func DefaultAliceHomeName() string
- func DefaultBundledSkillSourceDir() string
- func DefaultClaudeSkillsDir() 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 ResolveCodexHomeDir(override string) string
- func RunDirForAliceHome(aliceHome string) string
- func RuntimeBinaryPathForAliceHome(aliceHome string) string
- func SoulPathForAliceHome(aliceHome string) string
- func WorkspaceDirForAliceHome(aliceHome string) string
- type BotConfig
- type BotPermissionsConfig
- type CodexExecPolicyConfig
- type Config
- type GroupSceneConfig
- type GroupScenesConfig
- type LLMProfileConfig
Constants ¶
const ( // GroupSceneSessionPerChat scopes group sessions per chat. GroupSceneSessionPerChat = "per_chat" // GroupSceneSessionPerThread scopes group sessions per thread. GroupSceneSessionPerThread = "per_thread" // GroupSceneSessionPerUser scopes group sessions per user. GroupSceneSessionPerUser = "per_user" // GroupSceneSessionPerMessage scopes group sessions per message. GroupSceneSessionPerMessage = "per_message" )
const ( CodexSandboxReadOnly = "read-only" CodexSandboxWorkspaceWrite = "workspace-write" CodexSandboxDangerFullAccess = "danger-full-access" CodexApprovalUntrusted = "untrusted" CodexApprovalOnRequest = "on-request" CodexApprovalNever = "never" )
const ( EnvAliceHome = "ALICE_HOME" EnvCodexHome = "CODEX_HOME" )
const DefaultAuthStatusTimeoutSecs = 15
DefaultAuthStatusTimeoutSecs is the default auth status check timeout in seconds.
const DefaultCodexHighIdleTimeoutSecs = 1800
DefaultCodexHighIdleTimeoutSecs is the default high idle timeout in seconds.
const DefaultCodexIdleTimeoutSecs = 900
DefaultCodexIdleTimeoutSecs is the default low idle timeout in seconds.
const DefaultCodexXHighIdleTimeoutSecs = 3600
DefaultCodexXHighIdleTimeoutSecs is the default extreme idle timeout in seconds.
const DefaultImmediateFeedbackMode = ImmediateFeedbackModeReaction
DefaultImmediateFeedbackMode is the default immediate feedback mode.
const DefaultImmediateFeedbackReaction = "OK"
DefaultImmediateFeedbackReaction is the default reaction emoji for immediate feedback.
const DefaultLLMProvider = "codex"
DefaultLLMProvider is the default LLM backend identifier.
const DefaultLLMTimeoutSecs = 172800
DefaultLLMTimeoutSecs is the default LLM subprocess timeout in seconds.
const DefaultLocalRuntimeStoreOpenTimeoutSecs = 10
DefaultLocalRuntimeStoreOpenTimeoutSecs is the default local runtime store open timeout in seconds.
const DefaultRuntimeAPIShutdownTimeoutSecs = 5
DefaultRuntimeAPIShutdownTimeoutSecs is the default runtime API shutdown timeout in seconds.
const DefaultRuntimeHTTPAddr = "127.0.0.1:7331"
DefaultRuntimeHTTPAddr is the default runtime HTTP listen address.
const DefaultWorkerConcurrency = 3
DefaultWorkerConcurrency is the default worker pool size.
const ImmediateFeedbackModeReaction = "reaction"
ImmediateFeedbackModeReaction sends a reaction as immediate feedback.
const ImmediateFeedbackModeReply = "reply"
ImmediateFeedbackModeReply sends a reply as immediate feedback.
const LLMProviderClaude = "claude"
LLMProviderClaude is the Claude provider name constant.
const LLMProviderKimi = "kimi"
LLMProviderKimi is the Kimi provider name constant.
const LLMProviderOpenCode = "opencode"
LLMProviderOpenCode is the OpenCode provider name constant.
const TriggerModeAll = "all"
TriggerModeAll sets the trigger mode to all messages.
const TriggerModeAt = "at"
TriggerModeAt sets the trigger mode to at-mentions only.
const TriggerModePrefix = "prefix"
TriggerModePrefix sets the trigger mode to message prefix matching.
Variables ¶
This section is empty.
Functions ¶
func AliceHomeDir ¶
func AliceHomeDir() string
func BundledSkillSourceDirForAliceHome ¶ added in v0.6.3
func CodexHomeForAliceHome ¶ added in v0.3.0
func ConfigPathForAliceHome ¶ added in v0.3.0
func DefaultAgentsSkillsDir ¶ added in v0.6.3
func DefaultAgentsSkillsDir() string
func DefaultAliceHomeName ¶ added in v0.3.1
func DefaultAliceHomeName() string
func DefaultBundledSkillSourceDir ¶ added in v0.6.3
func DefaultBundledSkillSourceDir() string
func DefaultClaudeSkillsDir ¶ added in v0.6.3
func DefaultClaudeSkillsDir() 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 ResolveCodexHomeDir ¶ added in v0.6.2
func RunDirForAliceHome ¶ added in v0.3.0
func RuntimeBinaryPathForAliceHome ¶ added in v0.3.0
func SoulPathForAliceHome ¶ added in v0.6.53
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"`
TriggerMode string `mapstructure:"trigger_mode"`
TriggerPrefix string `mapstructure:"trigger_prefix"`
ImmediateFeedbackMode string `mapstructure:"immediate_feedback_mode"`
ImmediateFeedbackReaction string `mapstructure:"immediate_feedback_reaction"`
LLMProfiles map[string]LLMProfileConfig `mapstructure:"llm_profiles"`
GroupScenes *GroupScenesConfig `mapstructure:"group_scenes"`
PrivateScenes *GroupScenesConfig `mapstructure:"private_scenes"`
RuntimeHTTPAddr string `mapstructure:"runtime_http_addr"`
RuntimeHTTPToken string `mapstructure:"runtime_http_token"`
FailureMessage string `mapstructure:"failure_message"`
ThinkingMessage string `mapstructure:"thinking_message"`
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"`
Env map[string]string `mapstructure:"env"`
QueueCapacity int `mapstructure:"queue_capacity"`
WorkerConcurrency int `mapstructure:"worker_concurrency"`
AutomationTaskTimeoutSecs int `mapstructure:"automation_task_timeout_secs"`
AuthStatusTimeoutSecs int `mapstructure:"auth_status_timeout_secs"`
RuntimeAPIShutdownTimeoutSecs int `mapstructure:"runtime_api_shutdown_timeout_secs"`
LocalRuntimeStoreOpenTimeoutSecs int `mapstructure:"local_runtime_store_open_timeout_secs"`
CodexIdleTimeoutSecs int `mapstructure:"codex_idle_timeout_secs"`
CodexHighIdleTimeoutSecs int `mapstructure:"codex_high_idle_timeout_secs"`
CodexXHighIdleTimeoutSecs int `mapstructure:"codex_xhigh_idle_timeout_secs"`
ShowShellCommands *bool `mapstructure:"show_shell_commands"`
DisableIdentityHints *bool `mapstructure:"disable_identity_hints"`
Permissions *BotPermissionsConfig `mapstructure:"permissions"`
}
BotConfig is a per-bot configuration.
type BotPermissionsConfig ¶ added in v0.4.0
type BotPermissionsConfig struct {
RuntimeMessage *bool `mapstructure:"runtime_message"`
RuntimeAutomation *bool `mapstructure:"runtime_automation"`
AllowedSkills []string `mapstructure:"allowed_skills"`
}
BotPermissionsConfig is bot-level permission controls.
type CodexExecPolicyConfig ¶ added in v0.4.0
type CodexExecPolicyConfig struct {
Sandbox string `mapstructure:"sandbox"`
AskForApproval string `mapstructure:"ask_for_approval"`
AddDirs []string `mapstructure:"add_dirs"`
}
CodexExecPolicyConfig is the sandbox and approval policy configuration.
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"`
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"`
PrivateScenes GroupScenesConfig `mapstructure:"private_scenes"`
// Shared env for all LLM subprocesses (HTTPS_PROXY, API keys, etc.)
CodexEnv map[string]string `mapstructure:"env"`
CodexHome string `mapstructure:"codex_home"`
RuntimeHTTPAddr string `mapstructure:"runtime_http_addr"`
RuntimeHTTPToken string `mapstructure:"runtime_http_token"`
FailureMessage string `mapstructure:"failure_message"`
ThinkingMessage string `mapstructure:"thinking_message"`
AliceHome string `mapstructure:"alice_home"`
WorkspaceDir string `mapstructure:"workspace_dir"`
PromptDir string `mapstructure:"prompt_dir"`
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:"-"`
AuthStatusTimeoutSecs int `mapstructure:"auth_status_timeout_secs"`
AuthStatusTimeout time.Duration `mapstructure:"-"`
RuntimeAPIShutdownTimeoutSecs int `mapstructure:"runtime_api_shutdown_timeout_secs"`
RuntimeAPIShutdownTimeout time.Duration `mapstructure:"-"`
LocalRuntimeStoreOpenTimeoutSecs int `mapstructure:"local_runtime_store_open_timeout_secs"`
LocalRuntimeStoreOpenTimeout time.Duration `mapstructure:"-"`
CodexIdleTimeoutSecs int `mapstructure:"codex_idle_timeout_secs"`
CodexIdleTimeout time.Duration `mapstructure:"-"`
CodexHighIdleTimeoutSecs int `mapstructure:"codex_high_idle_timeout_secs"`
CodexHighIdleTimeout time.Duration `mapstructure:"-"`
CodexXHighIdleTimeoutSecs int `mapstructure:"codex_xhigh_idle_timeout_secs"`
CodexXHighIdleTimeout time.Duration `mapstructure:"-"`
ShowShellCommands *bool `mapstructure:"show_shell_commands"`
DisableIdentityHints *bool `mapstructure:"disable_identity_hints"`
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"`
}
Config is the top-level runtime configuration.
func LoadFromFile ¶
func (Config) AllowedBundledSkills ¶ added in v0.4.0
func (Config) ResolvedLLMProviders ¶ added in v0.5.18
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"`
DisableIdentityHints *bool `mapstructure:"disable_identity_hints"`
}
GroupSceneConfig is a group chat scene configuration.
type GroupScenesConfig ¶ added in v0.3.11
type GroupScenesConfig struct {
Chat GroupSceneConfig `mapstructure:"chat"`
Work GroupSceneConfig `mapstructure:"work"`
}
GroupScenesConfig is a pair of group chat scene configurations.
type LLMProfileConfig ¶ added in v0.3.11
type LLMProfileConfig struct {
Provider string `mapstructure:"provider"`
Command string `mapstructure:"command"`
TimeoutSecs int `mapstructure:"timeout_secs"`
Model string `mapstructure:"model"`
Profile string `mapstructure:"profile"`
ReasoningEffort string `mapstructure:"reasoning_effort"`
Variant string `mapstructure:"variant"`
Personality string `mapstructure:"personality"`
PromptPrefix string `mapstructure:"prompt_prefix"`
Permissions *CodexExecPolicyConfig `mapstructure:"permissions"`
// Computed at finalization, not from YAML.
Timeout time.Duration `mapstructure:"-"`
}
LLMProfileConfig is an LLM backend profile configuration.