Initial commit: SHARED library with LFS for binary assets

This commit is contained in:
clxud
2026-07-02 02:00:46 +00:00
commit db5de3ac7d
9356 changed files with 47608 additions and 0 deletions
+33
View File
@@ -0,0 +1,33 @@
from __future__ import annotations
from dataclasses import dataclass
from pathlib import Path
@dataclass(frozen=True, slots=True)
class ChannelConfig:
name: str
outbox_path: Path
upstream_url: str | None # None => /api/<channel>/* returns 501
upstream_path: str = "/api/" # path prefix when proxying (channel injected via {channel})
def build_channels(
storage_root: Path,
sre_upstream: str,
tss_upstream: str | None,
) -> dict[str, ChannelConfig]:
return {
"sre": ChannelConfig(
name="sre",
outbox_path=storage_root / "external_bridge_outbox.jsonl",
upstream_url=sre_upstream.rstrip("/"),
upstream_path="/api/",
),
"tss": ChannelConfig(
name="tss",
outbox_path=storage_root / "tss_bridge_outbox.jsonl",
upstream_url=(tss_upstream.rstrip("/") if tss_upstream else None),
upstream_path="/api/tss/",
),
}