- Add PolicySourceStore for tracking where policies come from - Implement claim extraction skill and API endpoints - Add community UI text selection extractor component - Create Go SDK aphoria client for policy operations - Document patent specifications and legal disclosures - Add guides: golden path loop, policy audit trails, pre-flight checks - Expand Unreal Engine config extractor with source tracking - Add UAT reports for policy source tracking validation - Refactor tests.rs into modular test files Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
73 lines
2.3 KiB
Rust
73 lines
2.3 KiB
Rust
//! HTTP request handlers.
|
|
//!
|
|
//! # Return Type Convention
|
|
//!
|
|
//! Handlers follow a consistent return type pattern based on HTTP semantics:
|
|
//!
|
|
//! - **POST endpoints that create resources** (assertions, votes, epochs, supersessions, sources):
|
|
//! Return `Result<(StatusCode, Json<T>)>` with `StatusCode::CREATED` (201)
|
|
//!
|
|
//! - **POST endpoints that modify state** (set quota, decay ranks):
|
|
//! Return `Result<Json<T>>` with implicit `StatusCode::OK` (200)
|
|
//!
|
|
//! - **GET endpoints** (all queries, health, audit):
|
|
//! Return `Result<Json<T>>` with implicit `StatusCode::OK` (200)
|
|
//!
|
|
//! This pattern is enforced by OpenAPI annotations and integration tests.
|
|
|
|
pub mod admin;
|
|
pub mod admission;
|
|
#[cfg(feature = "aphoria")]
|
|
pub mod aphoria;
|
|
pub mod assert;
|
|
pub mod audit;
|
|
pub mod circuit_breaker;
|
|
pub mod concepts;
|
|
pub mod constraints;
|
|
pub mod epoch;
|
|
pub mod escalation;
|
|
pub mod gold_standard;
|
|
pub mod health;
|
|
pub mod layered;
|
|
pub mod meter;
|
|
pub mod metrics;
|
|
pub mod quarantine;
|
|
pub mod query;
|
|
pub mod skeptic;
|
|
pub mod source;
|
|
pub mod source_registry;
|
|
pub mod supersede;
|
|
pub mod trace;
|
|
pub mod vote;
|
|
|
|
pub use admin::decay_trust_ranks;
|
|
pub use admission::get_admission_status;
|
|
pub use assert::create_assertion;
|
|
pub use audit::{get_audit, list_audits};
|
|
pub use circuit_breaker::{get_circuit_status, list_tripped_circuits, reset_circuit};
|
|
pub use constraints::constraints_query;
|
|
pub use epoch::create_epoch;
|
|
pub use escalation::{list_escalations, resolve_escalation};
|
|
pub use gold_standard::{
|
|
create_gold_standard, list_gold_standards, remove_gold_standard, verify_agent,
|
|
};
|
|
pub use health::health_check;
|
|
pub use layered::layered_query;
|
|
pub use meter::{get_quota_status, set_quota_limit};
|
|
pub use quarantine::{approve_quarantine, get_quarantine, list_quarantine, reject_quarantine};
|
|
pub use query::query_assertions;
|
|
pub use skeptic::skeptic_query;
|
|
pub use source::{get_provenance, store_source};
|
|
pub use source_registry::{get_source, list_sources, register_source, update_source_status};
|
|
pub use supersede::supersede;
|
|
pub use trace::trace;
|
|
pub use vote::create_vote;
|
|
|
|
pub use concepts::{
|
|
create_alias, delete_alias, list_aliases, parse_concept_path, resolve_alias, suggest_aliases,
|
|
};
|
|
pub use metrics::metrics_handler;
|
|
|
|
#[cfg(feature = "aphoria")]
|
|
pub use aphoria::{bless, export_policy, import_policy, scan};
|