Add LinkBuildingConfig and link_builder agent to config
- New LinkBuildingConfig dataclass (blm_dir, watch_folder, interval, ratio) - YAML loading block and BLM_DIR env var override in load_config() - Link Building skill_map entry with field mappings in config.yaml - link_building section in config.yaml - link_builder agent definition in agents section Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>cora-start
parent
0becf1dd89
commit
e2dca938a1
|
|
@ -66,6 +66,14 @@ class EmailConfig:
|
||||||
enabled: bool = False
|
enabled: bool = False
|
||||||
|
|
||||||
|
|
||||||
|
@dataclass
|
||||||
|
class LinkBuildingConfig:
|
||||||
|
blm_dir: str = "E:/dev/Big-Link-Man"
|
||||||
|
watch_folder: str = "" # empty = disabled
|
||||||
|
watch_interval_minutes: int = 60
|
||||||
|
default_branded_plus_ratio: float = 0.7
|
||||||
|
|
||||||
|
|
||||||
@dataclass
|
@dataclass
|
||||||
class AgentConfig:
|
class AgentConfig:
|
||||||
"""Per-agent configuration for multi-agent support."""
|
"""Per-agent configuration for multi-agent support."""
|
||||||
|
|
@ -94,6 +102,7 @@ class Config:
|
||||||
clickup: ClickUpConfig = field(default_factory=ClickUpConfig)
|
clickup: ClickUpConfig = field(default_factory=ClickUpConfig)
|
||||||
press_advantage: PressAdvantageConfig = field(default_factory=PressAdvantageConfig)
|
press_advantage: PressAdvantageConfig = field(default_factory=PressAdvantageConfig)
|
||||||
email: EmailConfig = field(default_factory=EmailConfig)
|
email: EmailConfig = field(default_factory=EmailConfig)
|
||||||
|
link_building: LinkBuildingConfig = field(default_factory=LinkBuildingConfig)
|
||||||
agents: list[AgentConfig] = field(default_factory=lambda: [AgentConfig()])
|
agents: list[AgentConfig] = field(default_factory=lambda: [AgentConfig()])
|
||||||
|
|
||||||
# Derived paths
|
# Derived paths
|
||||||
|
|
@ -141,6 +150,10 @@ def load_config() -> Config:
|
||||||
for k, v in data["email"].items():
|
for k, v in data["email"].items():
|
||||||
if hasattr(cfg.email, k):
|
if hasattr(cfg.email, k):
|
||||||
setattr(cfg.email, k, v)
|
setattr(cfg.email, k, v)
|
||||||
|
if "link_building" in data and isinstance(data["link_building"], dict):
|
||||||
|
for k, v in data["link_building"].items():
|
||||||
|
if hasattr(cfg.link_building, k):
|
||||||
|
setattr(cfg.link_building, k, v)
|
||||||
|
|
||||||
# Multi-agent configs
|
# Multi-agent configs
|
||||||
if "agents" in data and isinstance(data["agents"], list):
|
if "agents" in data and isinstance(data["agents"], list):
|
||||||
|
|
@ -190,6 +203,10 @@ def load_config() -> Config:
|
||||||
cfg.email.default_to = default_to
|
cfg.email.default_to = default_to
|
||||||
cfg.email.enabled = bool(cfg.email.username and cfg.email.password)
|
cfg.email.enabled = bool(cfg.email.username and cfg.email.password)
|
||||||
|
|
||||||
|
# Link Building env var overrides
|
||||||
|
if blm_dir := os.getenv("BLM_DIR"):
|
||||||
|
cfg.link_building.blm_dir = blm_dir
|
||||||
|
|
||||||
# Ensure data directories exist
|
# Ensure data directories exist
|
||||||
cfg.data_dir.mkdir(parents=True, exist_ok=True)
|
cfg.data_dir.mkdir(parents=True, exist_ok=True)
|
||||||
(cfg.data_dir / "uploads").mkdir(exist_ok=True)
|
(cfg.data_dir / "uploads").mkdir(exist_ok=True)
|
||||||
|
|
|
||||||
25
config.yaml
25
config.yaml
|
|
@ -56,6 +56,26 @@ clickup:
|
||||||
company_name: "Client"
|
company_name: "Client"
|
||||||
target_url: "IMSURL"
|
target_url: "IMSURL"
|
||||||
branded_url: "SocialURL"
|
branded_url: "SocialURL"
|
||||||
|
"Link Building":
|
||||||
|
tool: "run_link_building"
|
||||||
|
auto_execute: false
|
||||||
|
complete_status: "complete"
|
||||||
|
error_status: "internal review"
|
||||||
|
field_mapping:
|
||||||
|
lb_method: "LB Method"
|
||||||
|
project_name: "task_name"
|
||||||
|
money_site_url: "IMSURL"
|
||||||
|
custom_anchors: "CustomAnchors"
|
||||||
|
branded_plus_ratio: "BrandedPlusRatio"
|
||||||
|
cli_flags: "CLIFlags"
|
||||||
|
xlsx_path: "CoraFile"
|
||||||
|
|
||||||
|
# Link Building settings
|
||||||
|
link_building:
|
||||||
|
blm_dir: "E:/dev/Big-Link-Man"
|
||||||
|
watch_folder: "Z:/cora-inbox"
|
||||||
|
watch_interval_minutes: 60
|
||||||
|
default_branded_plus_ratio: 0.7
|
||||||
|
|
||||||
# Multi-agent configuration
|
# Multi-agent configuration
|
||||||
# Each agent gets its own personality, tool whitelist, and memory scope.
|
# Each agent gets its own personality, tool whitelist, and memory scope.
|
||||||
|
|
@ -85,3 +105,8 @@ agents:
|
||||||
personality_file: "" # future: identity/OPS.md
|
personality_file: "" # future: identity/OPS.md
|
||||||
tools: [run_command, delegate_task, list_files, read_file, remember, search_memory]
|
tools: [run_command, delegate_task, list_files, read_file, remember, search_memory]
|
||||||
memory_scope: ""
|
memory_scope: ""
|
||||||
|
|
||||||
|
- name: link_builder
|
||||||
|
display_name: Link Builder
|
||||||
|
tools: [run_link_building, run_cora_backlinks, blm_ingest_cora, blm_generate_batch, scan_cora_folder, delegate_task, remember, search_memory]
|
||||||
|
memory_scope: ""
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue