generated from coulomb/repo-seed
session-memory: Claude + Codex + Grok distributors + registry (WP-0007 T02/T03)
Thin per-flavor distributors over the shared base: Claude (CLAUDE.md, optional skill-stub mode), Codex (AGENTS.md), Grok (.grok/instructions.md). registry maps flavor->distributor — adding a flavor is one entry + one module. Same agnostic body renders to distinct per-flavor targets (FR-A3). 7 new tests; suite 117/117. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
26
session_memory/distribute/registry.py
Normal file
26
session_memory/distribute/registry.py
Normal file
@@ -0,0 +1,26 @@
|
||||
"""Distributor registry (T03) — flavor -> distributor, the one place that knows
|
||||
about all flavor edges. Adding a flavor = one entry here + one adapter module.
|
||||
"""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from typing import Optional
|
||||
|
||||
from .base import BaseDistributor
|
||||
from .claude import ClaudeDistributor
|
||||
from .codex import CodexDistributor
|
||||
from .grok import GrokDistributor
|
||||
|
||||
_REGISTRY: dict[str, BaseDistributor] = {
|
||||
"claude": ClaudeDistributor(),
|
||||
"codex": CodexDistributor(),
|
||||
"grok": GrokDistributor(),
|
||||
}
|
||||
|
||||
|
||||
def get_distributor(flavor: str) -> Optional[BaseDistributor]:
|
||||
return _REGISTRY.get(flavor)
|
||||
|
||||
|
||||
def all_flavors() -> list[str]:
|
||||
return list(_REGISTRY)
|
||||
Reference in New Issue
Block a user