This commit is contained in:
lpf
2026-02-19 22:53:58 +08:00
parent e14bddd546
commit eb721c2447
8 changed files with 98 additions and 262 deletions

View File

@@ -43,10 +43,7 @@ type AgentDefaults struct {
type RuntimeControlConfig struct {
IntentHighConfidence float64 `json:"intent_high_confidence" env:"CLAWGO_INTENT_HIGH_CONFIDENCE"`
IntentConfirmMinConfidence float64 `json:"intent_confirm_min_confidence" env:"CLAWGO_INTENT_CONFIRM_MIN_CONFIDENCE"`
IntentMaxInputChars int `json:"intent_max_input_chars" env:"CLAWGO_INTENT_MAX_INPUT_CHARS"`
ConfirmTTLSeconds int `json:"confirm_ttl_seconds" env:"CLAWGO_CONFIRM_TTL_SECONDS"`
ConfirmMaxClarificationTurns int `json:"confirm_max_clarification_turns" env:"CLAWGO_CONFIRM_MAX_CLARIFY_TURNS"`
AutonomyTickIntervalSec int `json:"autonomy_tick_interval_sec" env:"CLAWGO_AUTONOMY_TICK_INTERVAL_SEC"`
AutonomyMinRunIntervalSec int `json:"autonomy_min_run_interval_sec" env:"CLAWGO_AUTONOMY_MIN_RUN_INTERVAL_SEC"`
AutonomyIdleThresholdSec int `json:"autonomy_idle_threshold_sec" env:"CLAWGO_AUTONOMY_IDLE_THRESHOLD_SEC"`
@@ -56,11 +53,6 @@ type RuntimeControlConfig struct {
AutoLearnMaxRoundsWithoutUser int `json:"autolearn_max_rounds_without_user" env:"CLAWGO_AUTOLEARN_MAX_ROUNDS_WITHOUT_USER"`
RunStateTTLSeconds int `json:"run_state_ttl_seconds" env:"CLAWGO_RUN_STATE_TTL_SECONDS"`
RunStateMax int `json:"run_state_max" env:"CLAWGO_RUN_STATE_MAX"`
RunControlLatestKeywords []string `json:"run_control_latest_keywords"`
RunControlWaitKeywords []string `json:"run_control_wait_keywords"`
RunControlStatusKeywords []string `json:"run_control_status_keywords"`
RunControlRunMentionKeywords []string `json:"run_control_run_mention_keywords"`
RunControlMinuteUnits []string `json:"run_control_minute_units"`
ToolParallelSafeNames []string `json:"tool_parallel_safe_names"`
ToolMaxParallelCalls int `json:"tool_max_parallel_calls"`
}
@@ -262,10 +254,7 @@ func DefaultConfig() *Config {
},
RuntimeControl: RuntimeControlConfig{
IntentHighConfidence: 0.75,
IntentConfirmMinConfidence: 0.45,
IntentMaxInputChars: 1200,
ConfirmTTLSeconds: 300,
ConfirmMaxClarificationTurns: 2,
AutonomyTickIntervalSec: 20,
AutonomyMinRunIntervalSec: 20,
AutonomyIdleThresholdSec: 20,
@@ -275,11 +264,6 @@ func DefaultConfig() *Config {
AutoLearnMaxRoundsWithoutUser: 200,
RunStateTTLSeconds: 1800,
RunStateMax: 500,
RunControlLatestKeywords: []string{"latest", "last run", "recent run", "最新", "最近", "上一次", "上个"},
RunControlWaitKeywords: []string{"wait", "等待", "等到", "阻塞"},
RunControlStatusKeywords: []string{"status", "状态", "进度", "running", "运行"},
RunControlRunMentionKeywords: []string{"run", "任务"},
RunControlMinuteUnits: []string{"分钟", "min", "mins", "minute", "minutes", "m"},
ToolParallelSafeNames: []string{"read_file", "list_files", "find_files", "grep_files", "memory_search", "web_search", "repo_map", "system_info"},
ToolMaxParallelCalls: 2,
},