pydo.harness.validate_session_policy()
Generated on 13 Nov 2026
from pydo version
v0.46.0
Usage
client.harness.validate_session_policy(body={...})Description
Stateless preflight: parses the same environment spec as CreateSession and runs the identical resolve + validate pipeline against the capability descriptor stamped on the selected template’s image (resolved per-request via the sandbox, not a separate registry). Returns per-rule verdicts. Nothing is provisioned or persisted.
Each rule is validated against the descriptor for the (agent, version) the template resolves to and gets a verdict: exact, degraded, unsupported, or unverified. ok is false when any strict rule is unsupported or unverified — i.e. CreateSession would reject the policy for that agent. An empty spec.permissions returns ok: true with no verdicts. Because it shares the create path’s descriptor lookup, the verdicts match what CreateSession would compute.
Parameters
bodyJSON or IO[bytes] requiredThe same environment spec you would submit to CreateSession (YAML). Only agent/template selection and the permissions block are used. The live API also accepts
application/yaml,text/yaml, andtext/x-yaml; OpenAPIcontentlists a single media type so generated clients can emit this operation.
Response Example
More Information
See /v2/agents/sessions/policy/validate in the API reference for additional detail on responses, headers, parameters, and more.