symfonic.capabilities.delegation.roster¶
roster ¶
The roster: who the parent may delegate to, and how a child is reached.
Registration is the last point at which a child can be refused, and it is the only point every construction path passes through — a spec the parent compiled and a child the caller handed over arrive here identically. That is why the lockdown lands here rather than in the compiler: a guard on the build path alone would cover exactly the children that were already sanitised, and miss the ones that could not be.
DelegationRoster ¶
An immutable, ordered set of registered children.
Ordered by declaration, because the order is what the parent's model reads in the roster listing, and an adopter who put the general-purpose child last meant it to be read last.
Source code in src/symfonic/capabilities/delegation/roster.py
definitions ¶
The catalogue an agent-store binding answers list with.
Source code in src/symfonic/capabilities/delegation/roster.py
describe ¶
The roster listing shown to the parent's model.
Rendered once at construction. It goes into a tool description that is sent on every turn, and re-deriving it per call would put string formatting on the hot path for a value that cannot change: the roster freezes with the graph.
Source code in src/symfonic/capabilities/delegation/roster.py
find ¶
run
async
¶
run(name: str, task: Any, *, scope: Any = None, depth: int = 1, run_id: str | None = None, root_run_id: str | None = None, parent_run_id: str | None = None) -> Any
Run child name on task and return whatever it answers.
Raises rather than returning a refusal, and raises the child's own
exception untouched. The roster is the mechanism; deciding that a
failed child should become a tool message the parent's model can read
is a policy, and it lives one layer up in
:class:~.tools.DelegationTools. A store bound into a graph needs the
exception — it has its own error contract.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
task
|
Any
|
Coerced to |
required |
depth
|
int
|
The depth to stamp on the child — the parent's, plus one. Passed rather than re-derived so the child's own ceiling check sees the tree it is actually in. |
1
|
Raises:
| Type | Description |
|---|---|
UnknownChildError
|
If |