mixle.task.catalog_router module¶
IC-10 tool/model catalog -> verified Router wiring (M3-core).
Every routable capability – a physics forward, an economic model, a climate projection, an
external domain model (IC-7) – registers with the same uniform shape (CatalogEntry, IC-10)
so a decomposer/router never special-cases a tool family. build_catalog_router() turns a flat
list of entries into one calibrated Router tier per entry (cheapest first),
falling through to a frontier/teacher callable exactly the way Cascade
already escalates uncertain calls.
Local convention (not part of the frozen IC-10 shape, documented here because M3 owns the wiring):
CatalogEntry.schema is a plain dict[str, Any] (IC-10 imposes no further shape on it), so a
registrant MAY stash two well-known keys on it: "output" (the JSON-schema of what this
entry produces, used for schema-compatibility matching in mixle.task.knowledge_routing) and
"invoke" (a Callable[[dict], Any] that actually runs the tool/model given a request dict).
Both are required by build_catalog_router(): the router returns a verified output, never an
entry id standing in for an answer.
- class CatalogCalibration(verified, trials, confidence=0.95)[source]
Bases:
objectHeld-out verifier outcomes used to gate a catalog capability.
- property lower_bound: float
One-sided Clopper-Pearson lower confidence bound.
- class CatalogEntry(id, schema, owner, cost=0.0, reliability=1.0, verifier=None)[source]
Bases:
objectA routable capability: identity, its JSON schema, owning subsystem, cost, prior reliability, and an optional verifier (the IC-10 tuple).
IC-10 (
notes/exec/contracts.md) freezesverifierasstr | None– the name of the IC-6 verifier kind that gates this entry’s output. M3’s own algorithm (step 5: “attach each verifier; verified item ids resolve gaps”) needs to actually CALL a verifier, not just look one up by name, so this field is typedAny | Nonehere and accepts either an IC-10-style string tag or a live IC-6Verifier-shaped object (anything exposing.verify(claim, context)) – a thin, additive shim over the frozen contract, not a rename of it. Field names/order/defaults are otherwise identical to the frozen stub.
- build_catalog_router(catalog, teacher, *, teacher_cost, calibration, min_verified_reliability)[source]
Build executable, schema-checked, verified tiers and one explicitly-priced frontier.
calibrationsupplies held-out verifier outcomes for every entry. A local tier is eligible only when its one-sided reliability lower bound clearsmin_verified_reliability; the entry’s caller-suppliedreliabilityprior is documentary and never authorizes an answer.