nemoguardrails.server.experimental.application
Python configuration and assembly for the transparent proxy.
Use ProxyConfig for reviewed built-ins, or pass explicit ProviderIntegration objects to the same factory for custom Python composition. Both use the same application lifespan, HTTP owner, routing, and Rails repository. This surface does not load YAML, export contracts, or construct policy from generated files.
Module Contents
Classes
Functions
API
Associate a deployment-owned identifier with a Rails config directory.
Bases: BaseModel
Select one built-in provider instance and its guarded operations.
An omitted dialect selects the provider’s reviewed native bindings. Operations install guard bindings, not an HTTP route allowlist. Other routes retain passthrough behavior. A fixed Rails ID bypasses the user resolver; otherwise the application must supply a trusted resolver.
Accept an exact catalogue ID or an explicit dynamic selection.
Require an ordered concrete selection and reject coercible containers.
Reject duplicates instead of silently collapsing the declared policy.
Bases: BaseModel
Declare built-in instances and one shared Rails configuration catalogue.
Construction validates data without reading configuration files. Paths are resolved by application assembly using the existing Python path semantics. Callbacks are supplied to the application factory, not stored in this model.
Check catalogue identity and fixed references without filesystem I/O.
Snapshot lists or tuples rather than consuming arbitrary iterables.
Create one proxy from a declaration or explicit Python integrations.
A ProxyConfig cannot be combined with direct assembly settings; callbacks and local routers remain separate Python arguments. Declarative fixed Rails IDs bypass the user resolver, while dynamic providers require it. Direct calls retain their existing single-entry inference and explicit-resolver behavior.
Configuration and route validation run before lifespan-owned HTTP and Rails resources are created. No upstream calls are made during construction.