Skip to main content

Crate nyx_agent_api

Crate nyx_agent_api 

Source
Expand description

Loopback HTTP + WebSocket surface for the nyx-agent daemon.

This crate is published so the nyx-agent binary can be installed from crates.io with versioned internal dependencies. It is an implementation detail of Nyx Agent, not a stable public API.

The nyx-agent binary owns the long-lived daemon process and wires three things into ServerState:

Subscribers attach to the broadcast sink through the /api/v1/events?run_id=<id> WebSocket endpoint without the dispatcher knowing about them.

Re-exports§

pub use integrations::spawn_integration_delivery_task;
pub use router::build_router;
pub use state::ApiError;
pub use state::AuthConfig;
pub use state::AuthSetupAgent;
pub use state::AuthSetupAgentError;
pub use state::AuthSetupAgentFuture;
pub use state::AuthSetupAgentOutput;
pub use state::AuthSetupAgentRequest;
pub use state::AuthSetupJobStore;
pub use state::EventReplay;
pub use state::ProjectSetupAgent;
pub use state::ProjectSetupAgentError;
pub use state::ProjectSetupAgentFuture;
pub use state::ProjectSetupAgentOutput;
pub use state::ProjectSetupAgentRequest;
pub use state::ProjectSetupJobStore;
pub use state::RemediationAgent;
pub use state::RemediationAgentError;
pub use state::RemediationAgentFuture;
pub use state::RemediationAgentOutput;
pub use state::RemediationAgentRequest;
pub use state::RemediationChangedFile;
pub use state::RemediationJobError;
pub use state::RemediationJobRecord;
pub use state::RemediationJobStore;
pub use state::ScanRunOverrides;
pub use state::ScanTrigger;
pub use state::ScanTriggerError;
pub use state::ScanTriggerSource;
pub use state::SeedSetupAgent;
pub use state::SeedSetupAgentError;
pub use state::SeedSetupAgentFuture;
pub use state::SeedSetupAgentOutput;
pub use state::SeedSetupAgentRequest;
pub use state::ServerState;
pub use state::SetupContext;
pub use webhook::sign as sign_webhook;
pub use webhook::verify_signature as verify_webhook_signature;
pub use webhook::EnvSecretResolver;
pub use webhook::StaticSecretResolver;
pub use webhook::WebhookConcurrencyLimit;
pub use webhook::WebhookConfig;
pub use webhook::WebhookRateLimiter;
pub use webhook::WebhookResponse;
pub use webhook::WebhookSecretResolver;
pub use webhook::DEFAULT_WEBHOOK_MAX_CONCURRENT;
pub use webhook::DEFAULT_WEBHOOK_RATE_LIMIT_BURST;
pub use webhook::DEFAULT_WEBHOOK_RATE_LIMIT_MAX_IPS;
pub use webhook::DEFAULT_WEBHOOK_RATE_LIMIT_PER_MINUTE;
pub use webhook::MAX_WEBHOOK_BODY_BYTES;

Modules§

integrations
Outbound project integration delivery.
router
Axum router exposing the loopback HTTP and WebSocket surface.
state
webhook
POST /webhook/git route.