coordinator.contrib¶
coordinator.contrib ¶
Capability contribution discovery for the coordinator.
A capability (e.g. the zettelkasten grounded-extraction bundle) can contribute built-in agents and reusable schema definitions into the coordinator WITHOUT the coordinator importing it directly. This keeps the coordinator core generic: it only knows how to discover and merge contributions, not what any particular capability does.
Capabilities register via the angelo.coordinator.capabilities entry-point
group. Each entry point resolves to a zero-argument callable returning a
contribution dict::
{
"name": str, # capability id (e.g. "zettelkasten")
"enabled": bool, # decided at runtime by the capability
"agents": { # built-in agents contributed
name: {
"persona": str,
"role": "planner"|"implementer"|"checker"|"meta",
"description": str,
"model": str | None, # optional default model
"schema": str | None, # optional default schema name
},
...
},
"schemas": { # optional schema provider
"expand": Callable[[str], dict | None], # name -> expanded object
"list": Callable[[], list[str]], # available schema names
},
}
Only contributions whose enabled is true are surfaced. A disabled capability
contributes nothing: its agents do not appear in agents(action="list"/"get")
and its schemas cannot be resolved. This is the mechanism behind the spec's
"conditional shipping": the zettelkasten capability reports enabled=False
unless the project opted into it (ANGELO_ZETTELKASTEN env flag), so a
coordinator-only project never sees the trio or the schema attribute.
Discovery is cached for the process lifetime. Tests can call reset_cache()
to force a reload after mutating the environment.
reset_cache ¶
enabled_capabilities ¶
capability_enabled ¶
contributed_agents ¶
Merged {agent_name: definition} from all enabled capabilities.
Each definition carries the keys a capability supplied: persona,
role, description, model (optional), schema (optional default
schema name). When two enabled capabilities define the same agent name the
first discovered wins (stable, capability-order-dependent).
Source code in coordinator/contrib.py
agent_default_schemas ¶
Per-agent default schema names declared by contributed agents.
Source code in coordinator/contrib.py
schemas_available ¶
True when at least one enabled capability provides a schema registry.
Source code in coordinator/contrib.py
expand_schema ¶
Resolve a schema name to its fully-expanded object, or None.
Searches each enabled capability's schema provider in discovery order and
returns the first match. Returns None when no enabled capability knows
the name (the caller turns that into a validation error).
Source code in coordinator/contrib.py
list_schemas ¶
Names of all schemas exposed by enabled capabilities (sorted, deduped).