generated from coulomb/repo-seed
feat: implement OpsCatalog extension (BRIDGE-WP-0002)
Adds the OpsCatalog subsystem: a Git-backed YAML catalog of operations domains, targets, bridges, and actor classes. Includes catalog loader, cross-reference validator, bridge resolver (inline-first, catalog fallback), and new CLI commands: `bridge targets`, `bridge targets show`, `bridge catalog list/validate/show`. Updates `up/down/restart` to resolve bridge names from the catalog when not defined inline. 142 tests, all green. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -4,7 +4,7 @@ from __future__ import annotations
|
||||
import os
|
||||
from dataclasses import dataclass
|
||||
from pathlib import Path
|
||||
from typing import Dict
|
||||
from typing import Dict, Optional
|
||||
|
||||
import yaml
|
||||
|
||||
@@ -19,6 +19,7 @@ class ConfigError(Exception):
|
||||
class BridgeConfig:
|
||||
tunnels: Dict[str, TunnelConfig]
|
||||
actors: Dict[str, ActorInfo]
|
||||
catalog_path: Optional[Path] = None
|
||||
|
||||
|
||||
def _default_config_path() -> Path:
|
||||
@@ -43,7 +44,12 @@ def load_config() -> BridgeConfig:
|
||||
|
||||
tunnels = _parse_tunnels(raw.get("tunnels") or {})
|
||||
actors = _parse_actors(raw.get("actors") or {})
|
||||
return BridgeConfig(tunnels=tunnels, actors=actors)
|
||||
|
||||
catalog_path = None
|
||||
if "catalog_path" in raw and raw["catalog_path"]:
|
||||
catalog_path = Path(os.path.expanduser(str(raw["catalog_path"])))
|
||||
|
||||
return BridgeConfig(tunnels=tunnels, actors=actors, catalog_path=catalog_path)
|
||||
|
||||
|
||||
def _parse_tunnels(raw: dict) -> Dict[str, TunnelConfig]:
|
||||
|
||||
Reference in New Issue
Block a user