symfonic.agent.facade_args¶
facade_args ¶
What the simple facade refuses at construction time.
Split out of :mod:symfonic.agent.facade for the same two reasons
:mod:symfonic.agent.facade_model was: the facade module keeps to the
300-line budget, and these are rules rather than plumbing -- each one names
an argument the constructor will not accept and says why accepting it would
be worse than raising.
Every check here runs before anything is stored, because FAC-8 says
construction validates and stores and does nothing else: a rejected argument
must fail on the line that passed it, not on the first run().
receipt_capability ¶
Detect already-imported receipt declarations without loading Mongo on default paths.
Source code in src/symfonic/agent/facade_args.py
require_capabilities ¶
Reject declarations without a contribution method before folding.
Source code in src/symfonic/agent/facade_args.py
require_instructions ¶
Refuse instructions that are neither a string nor absent.
None is a documented value and keeps FAC-5's meaning -- no system
prompt of the framework's own invention -- so only a non-string that is
not None is an error.
Source code in src/symfonic/agent/facade_args.py
require_memory_scopes ¶
Refuse a memory capability whose scope names no tenant.
Legacy rejects a blank tenant scope; MemoryScope refuses one at its
own construction too โ but the capability is a dataclass, and nothing
stops scope=None or a foreign object in the scope seat from reaching
this line. A scope that names no tenant isolates nothing, so the refusal
lands here, on the construction line, not on the first run() that
reads another tenant's rows.
Subclasses are held to the same rule: platform composition recognises a
memory capability by isinstance, so an exact-type check here would
let class Sub(MemoryCapability) carry scope=None past the gate.
Source code in src/symfonic/agent/facade_args.py
require_native_result_policy ¶
Refuse settings the native compact-only binding does not consume.
Source code in src/symfonic/agent/facade_args.py
require_provider ¶
Refuse a missing or non-conforming provider.
The facade takes the caller's own provider object rather than a name
(FAC-4), so the only thing it can check is the one method it will call.
Checking it here turns a construction-time typo into a construction-time
error instead of an AttributeError inside the first invocation.
Source code in src/symfonic/agent/facade_args.py
require_round_budget ¶
Refuse a round budget that cannot bound a loop.
bool is an int subclass, so max_model_rounds=True would pass
an unguarded integer check and silently mean one round -- a tool-using
agent would return after its first provider call with a partial answer
presented as a whole one. Zero and negatives have no reading at all: the
kernel would stop before the first round. None is the documented way
to ask for the facade default, and is the only non-integer accepted.