mirror of
https://github.com/fawney19/Aether.git
synced 2026-10-08 18:37:46 +08:00
refactor: 大规模模块拆分与代码精简,新增 ai-pipeline/data-contracts 独立 crate
- 新增 aether-ai-pipeline 和 aether-data-contracts crate,将 pipeline 逻辑与数据契约从 gateway 中解耦 - 重构 admin handlers:拆分单体模块为 auth/billing/endpoint/features/model/observability/provider/system 等独立子模块 - 合并 chat/cli 重复代码路径:精简 conversion、finalize、planner 中的 sync/chat/cli 分支 - 重构 scheduler/executor/data 层,引入 facade 模式降低模块间耦合 - 移除冗余的 intent 模块,将 plan_fallback/policy/stream_path/sync_path 迁移至 executor - 前端适配:调整 admin API 调用和 provider 模型测试对话框
This commit is contained in:
@@ -5,11 +5,11 @@ use std::sync::Mutex as StdMutex;
|
||||
use aether_runtime::{ConcurrencyGate, DistributedConcurrencyGate};
|
||||
|
||||
use super::super::async_task::{VideoTaskPollerConfig, VideoTaskService};
|
||||
use super::super::fallback_metrics;
|
||||
use super::super::cache::{
|
||||
AuthApiKeyLastUsedCache, AuthContextCache, DirectPlanBypassCache, SchedulerAffinityCache,
|
||||
};
|
||||
use super::super::data::GatewayDataState;
|
||||
use super::super::fallback_metrics;
|
||||
use super::super::rate_limit::FrontdoorUserRpmLimiter;
|
||||
use super::super::{provider_transport, usage};
|
||||
use super::{
|
||||
@@ -45,26 +45,18 @@ pub struct AppState {
|
||||
pub(crate) local_execution_runtime_miss_diagnostics:
|
||||
Arc<StdMutex<HashMap<String, LocalExecutionRuntimeMissDiagnostic>>>,
|
||||
pub(crate) admin_monitoring_error_stats_reset_at: Arc<StdMutex<Option<u64>>>,
|
||||
pub(crate) provider_delete_tasks:
|
||||
Arc<StdMutex<HashMap<String, LocalProviderDeleteTaskState>>>,
|
||||
pub(crate) provider_delete_tasks: Arc<StdMutex<HashMap<String, LocalProviderDeleteTaskState>>>,
|
||||
#[cfg(test)]
|
||||
pub(crate) provider_oauth_state_store:
|
||||
Option<Arc<StdMutex<HashMap<String, String>>>>,
|
||||
pub(crate) provider_oauth_state_store: Option<Arc<StdMutex<HashMap<String, String>>>>,
|
||||
#[cfg(test)]
|
||||
pub(crate) provider_oauth_device_session_store:
|
||||
Option<Arc<StdMutex<HashMap<String, String>>>>,
|
||||
pub(crate) provider_oauth_device_session_store: Option<Arc<StdMutex<HashMap<String, String>>>>,
|
||||
#[cfg(test)]
|
||||
pub(crate) provider_oauth_batch_task_store:
|
||||
Option<Arc<StdMutex<HashMap<String, String>>>>,
|
||||
pub(crate) provider_oauth_batch_task_store: Option<Arc<StdMutex<HashMap<String, String>>>>,
|
||||
#[cfg(test)]
|
||||
pub(crate) auth_session_store: Option<
|
||||
Arc<
|
||||
StdMutex<HashMap<String, crate::data::state::StoredUserSessionRecord>>,
|
||||
>,
|
||||
>,
|
||||
pub(crate) auth_session_store:
|
||||
Option<Arc<StdMutex<HashMap<String, crate::data::state::StoredUserSessionRecord>>>>,
|
||||
#[cfg(test)]
|
||||
pub(crate) auth_email_verification_store:
|
||||
Option<Arc<StdMutex<HashMap<String, String>>>>,
|
||||
pub(crate) auth_email_verification_store: Option<Arc<StdMutex<HashMap<String, String>>>>,
|
||||
#[cfg(test)]
|
||||
pub(crate) auth_email_delivery_store: Option<Arc<StdMutex<Vec<serde_json::Value>>>>,
|
||||
#[cfg(test)]
|
||||
@@ -97,8 +89,7 @@ pub struct AppState {
|
||||
pub(crate) admin_billing_collector_store:
|
||||
Option<Arc<StdMutex<HashMap<String, AdminBillingCollectorRecord>>>>,
|
||||
#[cfg(test)]
|
||||
pub(crate) admin_security_blacklist_store:
|
||||
Option<Arc<StdMutex<HashMap<String, String>>>>,
|
||||
pub(crate) admin_security_blacklist_store: Option<Arc<StdMutex<HashMap<String, String>>>>,
|
||||
#[cfg(test)]
|
||||
pub(crate) admin_security_whitelist_store:
|
||||
Option<Arc<StdMutex<std::collections::BTreeSet<String>>>>,
|
||||
@@ -106,9 +97,7 @@ pub struct AppState {
|
||||
pub(crate) admin_monitoring_cache_affinity_store:
|
||||
Option<Arc<StdMutex<HashMap<String, String>>>>,
|
||||
#[cfg(test)]
|
||||
pub(crate) admin_monitoring_redis_key_store:
|
||||
Option<Arc<StdMutex<HashMap<String, String>>>>,
|
||||
pub(crate) admin_monitoring_redis_key_store: Option<Arc<StdMutex<HashMap<String, String>>>>,
|
||||
#[cfg(test)]
|
||||
pub(crate) provider_oauth_token_url_overrides:
|
||||
Arc<StdMutex<HashMap<String, String>>>,
|
||||
pub(crate) provider_oauth_token_url_overrides: Arc<StdMutex<HashMap<String, String>>>,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user