What the client does not validate
The client checks the shape of a request before it sends it:
- a config key the service does not have is refused, with the accepted list;
- a profile or a config passed to a mode that takes none is refused;
- an operand a mode does not take is refused;
- a hunt attempt given a text where a digest belongs is refused, so nothing but digests leaves the machine.
from stalwart_agents.client import Client
client = Client()
try:
client.verify_guardrail("policy.co", "execute_transfer_funds", "is_authenticated",
config={"no_such_key": 1})
except ValueError as refused:
print(refused)
It checks nothing else. Whether a combination of choices can answer the question asked --
a profile that cannot produce a certificate for a table that requires one, an enumeration
under a profile that refuses one -- is the service's to say, and it says so with a
RefusedError whose slug names the rule. A second copy of those rules in the client would
be a second version of them, and the day the two disagreed a customer would be refused by
the one they cannot see.
The client also reads no turn. A plan, a question, a carried value and the count of turns
asked to be rephrased are the runtime's (or your qls-router's), returned in each plan's
context and sent back with the next turn unchanged.