chore: initial commit for Pretor v0.1.0-alpha

正式发布 Pretor 平台的首个 alpha 版本。本项目旨在构建一个基于分布式架构的多智能体协同工作流水线。

核心功能实现:
1. 建立基于 BaseIndividual 的动态插件加载机制。
2. 实现三类核心 worker_individual 子个体。
3. 集成 Ray 框架支持分布式集群调度。
4. 基于 PostgreSQL 的全量持久化存储方案。
5. 提供完整的 FastAPI 后端与 React 前端交互界面。
This commit is contained in:
2026-04-29 10:09:07 +08:00
commit d84212f780
163 changed files with 19251 additions and 0 deletions
+105
View File
@@ -0,0 +1,105 @@
// General types
export interface TokenData {
user_id: string;
user_name: string;
}
export interface User {
user_id?: string;
user_name: string;
role?: string;
status?: string;
}
// Provider types
export interface Provider {
provider_type: 'openai' | 'claude' | 'local' | 'deepseek';
provider_title: string;
provider_url?: string;
provider_owner?: string;
provider_models?: string[];
// Based on your UI needs we might infer some local status fields
status?: string;
model?: string;
}
export interface ProviderRegisterRequest {
provider_type: 'openai' | 'claude' | 'local' | 'deepseek';
provider_title: string;
provider_url: string;
provider_apikey: string;
}
export interface ProviderListResponse {
provider_list: Record<string, Provider>;
}
// Cluster types (Websocket response)
export interface ClusterResources {
CPU?: number;
memory?: number;
GPU?: number;
[key: string]: number | undefined;
}
export interface ClusterNode {
node_id: string;
node_name: string;
alive: boolean;
resources: ClusterResources;
remaining: ClusterResources;
}
// Chat types
export interface ChatMessageRequest {
message: string;
}
export interface ChatMessageResponse {
message: string; // Either event_id or text
}
// Workflow types
export interface Workflow {
event_id: string;
workflow_title: string;
status?: string;
}
export interface WorkflowStep {
step: number;
name: string;
node: string;
action: string;
desc: string;
status: string;
agent_id?: string;
}
export interface WorkflowDetail {
event_id: string;
workflow_title: string | null;
status: string;
command?: string;
current_step: number;
user_name: string;
message: string;
create_time: string;
steps: WorkflowStep[];
}
// Workflow Template Validation
export interface WorkStep {
name: string;
desc?: string;
actor: string; // the name of the worker individual
inputs?: string[];
outputs?: string[];
}
export interface WorkflowTemplate {
name: string;
desc?: string;
steps: WorkStep[];
}