refactor: 移除独立 hub/proxy/executor/gateway crate,统一为 gateway tunnel 架构

- 删除 aether-hub、aether-proxy 独立项目及其 Dockerfile/配置
- 删除 crates/aether-executor 和 crates/aether-gateway 全部模块
- 新增 apps/ 目录作为应用入口
- 将 hub 概念重构为 gateway tunnel transport
- 将 executor 重构为 execution runtime
- 新增 tunnel.rs 合约定义和 testkit tunnel/execution_runtime 模块
- 更新 Python 服务层和测试适配新架构命名
This commit is contained in:
fawney19
2026-04-03 14:59:58 +08:00
parent ddf18fed9a
commit 8f26e1a31f
983 changed files with 103098 additions and 105837 deletions

View File

@@ -0,0 +1,57 @@
use std::collections::BTreeMap;
use std::path::{Path, PathBuf};
use std::sync::{Arc, Mutex};
use std::time::{SystemTime, UNIX_EPOCH};
use aether_contracts::{ExecutionPlan, ExecutionTimeouts, ProxySnapshot, RequestBody};
use aether_data::repository::video_tasks::{
StoredVideoTask, UpsertVideoTask, VideoTaskStatus as StoredVideoTaskStatus,
};
use serde::{Deserialize, Serialize};
use serde_json::{json, Map, Value};
use uuid::Uuid;
use crate::gateway::provider_transport::{
resolve_local_gemini_auth, resolve_local_standard_auth, resolve_transport_execution_timeouts,
supports_local_gemini_transport, supports_local_standard_transport,
GatewayProviderTransportSnapshot,
};
use crate::gateway::GatewayControlAuthContext;
const DEFAULT_VIDEO_TASK_POLL_INTERVAL_SECONDS: u32 = 10;
const DEFAULT_VIDEO_TASK_MAX_POLL_COUNT: u32 = 360;
pub(crate) use self::service::VideoTaskService;
pub use self::types::VideoTaskTruthSourceMode;
pub(crate) use self::types::{
GeminiVideoTaskSeed, LocalVideoTaskContentAction, LocalVideoTaskFollowUpPlan,
LocalVideoTaskPersistence, LocalVideoTaskReadRefreshPlan, LocalVideoTaskReadResponse,
LocalVideoTaskRegistryMutation, LocalVideoTaskSeed, LocalVideoTaskSnapshot,
LocalVideoTaskStatus, LocalVideoTaskSuccessPlan, LocalVideoTaskTransport, OpenAiVideoTaskSeed,
VideoTaskSyncReportMode,
};
pub(crate) use self::helpers::{
extract_gemini_short_id_from_cancel_path, extract_gemini_short_id_from_path,
extract_openai_task_id_from_cancel_path, extract_openai_task_id_from_content_path,
extract_openai_task_id_from_path, extract_openai_task_id_from_remix_path,
};
use self::helpers::{
build_video_follow_up_report_context, context_text, context_u64, current_unix_timestamp_secs,
gemini_metadata_video_url, generate_local_short_id, local_status_from_stored,
map_openai_task_status, non_empty_owned, parse_video_content_variant, request_body_string,
request_body_text, request_body_u32, resolve_follow_up_auth,
resolve_local_video_registry_mutation,
};
use self::store::{FileVideoTaskStore, InMemoryVideoTaskStore, VideoTaskStore};
use self::types::LocalVideoTaskProjectionTarget;
mod helpers;
mod seed;
mod service;
mod store;
mod types;
#[cfg(test)]
mod tests;