refactor: 移除 Python upstream 依赖,清理全部 legacy/Python 兼容层

- 移除 upstream_base_url 参数及 AETHER_GATEWAY_UPSTREAM 环境变量,gateway 不再需要指向 Python 宿主
- 删除所有 LEGACY_*/PYTHON_* 常量、路由组、header 定义及 sunset/phaseout 机制
- 将 legacy_gateway_bridge 重命名为 internal_gateway,executor 相关命名统一为 execution_runtime
- dev.sh 新增 Postgres/Redis 预检查,移除 upstream 相关启动参数和提示
- 新增 ai_public 路由处理器
- 全量适配 handler、test、state、control 等模块的命名和接口变更
This commit is contained in:
fawney19
2026-04-04 01:40:24 +08:00
parent 1d9c77522a
commit cbc811f6ce
484 changed files with 11046 additions and 3925 deletions

View File

@@ -832,7 +832,14 @@ impl HubStats {
mod tests {
use aether_runtime::bounded_queue;
use super::*;
use super::{
protocol, ControlPlaneClient, HubRouter, ProxyConn, MAX_REQUEST_BODY_FRAME_SIZE,
};
use axum::extract::ws::Message;
use bytes::Bytes;
use std::collections::HashMap;
use std::sync::Arc;
use tokio::sync::watch;
fn build_meta() -> protocol::RequestMeta {
protocol::RequestMeta {

View File

@@ -338,9 +338,11 @@ fn tunnel_error_response(status: StatusCode, kind: &str, message: &str) -> Respo
#[cfg(test)]
mod tests {
use super::super::{AppState, ConnConfig, ControlPlaneClient};
use super::*;
use super::{relay_request, Body, Request, SocketAddr, StatusCode, TUNNEL_ERROR_HEADER};
use aether_contracts::tunnel::TUNNEL_RELAY_FORWARDED_BY_HEADER;
use axum::extract::{ConnectInfo, Path, State};
use axum::response::IntoResponse;
use std::time::Duration;
fn test_app_state() -> AppState {
AppState::new(

View File

@@ -799,10 +799,16 @@ fn parse_embedded_tunnel_heartbeat_request(
#[cfg(test)]
mod tests {
use super::*;
use aether_data::repository::proxy_nodes::{
InMemoryProxyNodeRepository, ProxyNodeReadRepository,
use super::{
apply_embedded_tunnel_heartbeat, apply_embedded_tunnel_node_status, current_unix_secs,
tunnel_attachment_key, TunnelAttachmentDirectory, TunnelAttachmentRecord,
GatewayDataState,
};
use aether_data::repository::proxy_nodes::{
InMemoryProxyNodeRepository, ProxyNodeReadRepository, StoredProxyNode,
};
use serde_json::json;
use std::sync::Arc;
fn sample_proxy_node(node_id: &str) -> StoredProxyNode {
StoredProxyNode::new(