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:
parent
a7eaf59ced
commit
91d031ae20
13 changed files with 1435 additions and 50 deletions
|
|
@ -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]:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue