pub struct OpsRouterBuilder { /* private fields */ }Expand description
Builds the /_ops monitoring router.
Implementations§
Source§impl OpsRouterBuilder
impl OpsRouterBuilder
Sourcepub fn new() -> Self
pub fn new() -> Self
Start an empty builder. Self::build returns
OpsBuilderError::MissingAuthenticator until
Self::with_authenticator or Self::with_dev_auth is called.
Sourcepub fn with_authenticator(self, auth: Arc<dyn Authenticator>) -> Self
pub fn with_authenticator(self, auth: Arc<dyn Authenticator>) -> Self
Required — Self::build returns Err if not called.
Sourcepub fn with_dev_auth(self) -> Self
pub fn with_dev_auth(self) -> Self
Capability-shaped default for laptop-dev — wires
klieo_auth_common::AllowAnonymous so every request reaches
the /_ops router without credentials.
TEST FIXTURE / DEMO ONLY. Gated behind the dev-auth
feature (CWE-1188); production builds without that feature
cannot reach AllowAnonymous and fail to compile rather than
silently accepting any caller. Pair with a non-production
network boundary (loopback bind, dev container) — never expose
a dev-auth /_ops to a multi-tenant network.
Sourcepub fn with_run_log_store(self, store: Arc<dyn RunLogStore>) -> Self
pub fn with_run_log_store(self, store: Arc<dyn RunLogStore>) -> Self
Enables GET /runs (with the ?needs_reconciliation=true triage
filter), GET /runs/{id}, GET /agents, and
GET /runs/{id}/reconciliation — the ADR-055 reconciliation worksheet
for a failed/cancelled run (committed side effects + attempted-unknown
calls). Wire Self::with_kv_store too for in-flight-call detection.
Sourcepub fn with_task_store(self, store: Arc<A2aTaskStore>) -> Self
pub fn with_task_store(self, store: Arc<A2aTaskStore>) -> Self
Enables GET /tasks.
Sourcepub fn with_resume_buffer(self, buf: Arc<KvResumeBuffer>) -> Self
pub fn with_resume_buffer(self, buf: Arc<KvResumeBuffer>) -> Self
Enables GET /streams.
Sourcepub fn with_kv_store(self, kv: Arc<dyn KvStore>) -> Self
pub fn with_kv_store(self, kv: Arc<dyn KvStore>) -> Self
Provide the KvStore holding suspend checkpoints (klieo.run-checkpoints).
Enables in-flight-call detection on the reconciliation endpoint; that
endpoint still works without it (checkpoint-derived unknowns are omitted).
Sourcepub fn build(self) -> Result<Router, OpsBuilderError>
pub fn build(self) -> Result<Router, OpsBuilderError>
§Errors
Returns OpsBuilderError::MissingAuthenticator if
Self::with_authenticator was not called before build.