Skip to main content

Module policy

Module policy 

Source
Expand description

Scoped chat policy contracts and deterministic resolution.

UAR owns policy resolution. Hosts submit intent at global, agent, conversation, or turn scope; the runtime resolves one immutable policy before it assembles context or exposes tools to a model.

Structs§

ConversationPolicyRecord
Durable conversation-scoped policy record owned by UAR persistence.
EffectiveResourceSelection
Resolved selection for one resource kind.
EffectiveRunPolicy
Secret-free, immutable policy used to execute one run.
ModelRoute
Explicit provider/model route requested by a policy scope.
PolicyResolutionContext
Transport-free inputs shared by the service and embedded resolvers.
PolicyResolutionInput
Input required to resolve one immutable effective policy.
PolicyUniverse
Resources enabled by configuration and available on the current runtime.
ResourceSelection
Resource-selection intent at one policy scope.
RunPolicy
Versioned policy supplied at global, agent, conversation, or turn scope.

Enums§

ChatMode
User-visible execution mode for a chat run.
PolicyScope
Scope that supplied an effective policy value.
SelectionMode
How a scope selects resources from the set allowed by its parent scope.
ToolApprovalPolicy
Tool-call approval constraint.

Constants§

RUN_POLICY_VERSION
Current serialized policy schema version.

Functions§

load_persisted_conversation_policy
Load the durable conversation-scoped policy from persistence, if present.
policy_from_agent_artifact
Convert a persisted agent artifact into its policy scope.
resolve_effective_run_policy_core
Resolve the effective policy for a conversation and turn using the full Global → Agent → Conversation → Turn precedence.
resolve_run_policy
Resolve one run policy using deny-safe, non-widening scope precedence.