Multi-Agent Collaboration for Team and Friends
TypeScript agent-automationagent-orchestrationagent-workflowai-agentsai-collaborationai-memoryai-workforceautonomous-agentsclaude-codeclaude-code-skillscodexcoding-agentmulti-agentmultiple-agentone-person-businessone-person-companyone-person-teamopencodesolopreneur
refactor(shared): remove deprecated AgentTask, use TaskApi everywhere
Gener4a1a73681673
diff --git a/src/shared/src/api-types.ts b/src/shared/src/api-types.tsindex aa8ec234c..a4d44f1ce 100644--- a/src/shared/src/api-types.ts+++ b/src/shared/src/api-types.ts@@ -5,10 +5,10 @@ import type {AgentRuntime,Conversation,Message,- AgentTask,TaskMessage,MachineToken,} from "./types";+import type { TaskApi } from "./schemas";export interface ApiResponse<T> {data: T;@@ -39,8 +39,8 @@ export type GetConversationResponse = ApiResponse<Conversation>;export type ListMessagesResponse = ApiListResponse<Message>;-export type ListTasksResponse = ApiListResponse<AgentTask>;-export type GetTaskResponse = ApiResponse<AgentTask>;+export type ListTasksResponse = ApiListResponse<TaskApi>;+export type GetTaskResponse = ApiResponse<TaskApi>;export type ListTaskMessagesResponse = ApiListResponse<TaskMessage>;diff --git a/src/shared/src/index.ts b/src/shared/src/index.tsindex 2f9bd2360..d55c0af74 100644--- a/src/shared/src/index.ts+++ b/src/shared/src/index.ts@@ -7,8 +7,6 @@ export type {Machine,Conversation,Message,- AgentTask,- TaskAgentData,TaskMessage,MachineToken,Email,diff --git a/src/shared/src/types.ts b/src/shared/src/types.tsindex a434b4ce8..117f1ff18 100644--- a/src/shared/src/types.ts+++ b/src/shared/src/types.ts@@ -63,32 +63,6 @@ export interface Message {created_at: string;}-/** @deprecated Use TaskApiSchema from schemas.ts for runtime validation. */-export interface AgentTask {- id: string;- agent_id: string;- runtime_id: string;- conversation_id: string;- workspace_id: string;- prompt: string;- status: string;- priority: number;- dispatched_at: string | null;- started_at: string | null;- completed_at: string | null;- result: unknown;- error: string | null;- agent?: TaskAgentData;- created_at: string;- type: string;-}--export interface TaskAgentData {- id: string;- name: string;- instructions: string;-}-export interface TaskMessage {id: string;task_id: string;diff --git a/src/web/src/lib/api.ts b/src/web/src/lib/api.tsindex e937eb4ea..f42a19fcb 100644--- a/src/web/src/lib/api.ts+++ b/src/web/src/lib/api.ts@@ -7,7 +7,7 @@ import type {Email,LoginResponse,Message,- AgentTask,+ TaskApi,TaskMessage,User,Workspace,@@ -16,7 +16,7 @@ import { ApiError } from "@/lib/errors";// Re-export AgentRuntime as Runtime for convenienceexport type Runtime = AgentRuntime;-export type Task = AgentTask;+export type Task = TaskApi;const API_BASE = "";