tuitbot_core/config/
defaults.rs1use super::{
7 AuthConfig, IntervalsConfig, LimitsConfig, McpPolicyConfig, ScoringConfig, StorageConfig,
8};
9
10impl Default for AuthConfig {
11 fn default() -> Self {
12 Self {
13 mode: "manual".to_string(),
14 callback_host: "127.0.0.1".to_string(),
15 callback_port: 8080,
16 }
17 }
18}
19
20impl Default for ScoringConfig {
21 fn default() -> Self {
22 Self {
23 threshold: 60,
24 keyword_relevance_max: 25.0,
25 follower_count_max: 15.0,
26 recency_max: 10.0,
27 engagement_rate_max: 15.0,
28 reply_count_max: 15.0,
29 content_type_max: 10.0,
30 }
31 }
32}
33
34impl Default for LimitsConfig {
35 fn default() -> Self {
36 Self {
37 max_replies_per_day: 5,
38 max_tweets_per_day: 6,
39 max_threads_per_week: 1,
40 min_action_delay_seconds: 45,
41 max_action_delay_seconds: 180,
42 max_replies_per_author_per_day: 1,
43 banned_phrases: vec![
44 "check out".to_string(),
45 "you should try".to_string(),
46 "I recommend".to_string(),
47 "link in bio".to_string(),
48 ],
49 product_mention_ratio: 0.2,
50 }
51 }
52}
53
54impl Default for IntervalsConfig {
55 fn default() -> Self {
56 Self {
57 mentions_check_seconds: 300,
58 discovery_search_seconds: 900,
59 content_post_window_seconds: 10800,
60 thread_interval_seconds: 604800,
61 }
62 }
63}
64
65impl Default for StorageConfig {
66 fn default() -> Self {
67 Self {
68 db_path: "~/.tuitbot/tuitbot.db".to_string(),
69 retention_days: 90,
70 }
71 }
72}
73
74impl Default for McpPolicyConfig {
75 fn default() -> Self {
76 Self {
77 enforce_for_mutations: true,
78 require_approval_for: vec![
79 "post_tweet".to_string(),
80 "reply_to_tweet".to_string(),
81 "follow_user".to_string(),
82 "like_tweet".to_string(),
83 ],
84 blocked_tools: Vec::new(),
85 dry_run_mutations: false,
86 max_mutations_per_hour: 20,
87 template: None,
88 rules: Vec::new(),
89 rate_limits: Vec::new(),
90 }
91 }
92}