agent-ecosystem/mcp-server/src/agent-teams-controller.d.ts
iliya 4cf330e8cc feat: integrate agent-teams-controller and enhance task management
- Added agent-teams-controller as a dependency and updated the bundling configuration to exclude it.
- Refactored task management functions to utilize the new taskStore, improving code organization and maintainability.
- Introduced new methods for handling task states, including soft deletion and restoration.
- Enhanced kanban functionality with improved reviewer management and task column updates.
- Updated tests to reflect changes in task creation and approval processes, ensuring robust coverage.
- Improved task ID handling and display logic for better user experience across components.
2026-03-07 16:01:32 +02:00

66 lines
2.7 KiB
TypeScript

declare module 'agent-teams-controller' {
export interface ControllerContextOptions {
teamName: string;
claudeDir?: string;
}
export interface ControllerTaskApi {
createTask(flags: Record<string, unknown>): unknown;
getTask(taskId: string): unknown;
listTasks(): unknown[];
listDeletedTasks(): unknown[];
resolveTaskId(taskRef: string): string;
setTaskStatus(taskId: string, status: string, actor?: string): unknown;
startTask(taskId: string, actor?: string): unknown;
completeTask(taskId: string, actor?: string): unknown;
softDeleteTask(taskId: string, actor?: string): unknown;
restoreTask(taskId: string, actor?: string): unknown;
setTaskOwner(taskId: string, owner: string | null): unknown;
updateTaskFields(taskId: string, fields: { subject?: string; description?: string }): unknown;
addTaskComment(taskId: string, flags: Record<string, unknown>): unknown;
attachTaskFile(taskId: string, flags: Record<string, unknown>): unknown;
attachCommentFile(taskId: string, commentId: string, flags: Record<string, unknown>): unknown;
addTaskAttachmentMeta(taskId: string, meta: Record<string, unknown>): unknown;
removeTaskAttachment(taskId: string, attachmentId: string): unknown;
setNeedsClarification(taskId: string, value: string | null): unknown;
linkTask(taskId: string, targetId: string, linkType: string): unknown;
unlinkTask(taskId: string, targetId: string, linkType: string): unknown;
taskBriefing(memberName: string): Promise<string>;
}
export interface ControllerKanbanApi {
getKanbanState(): unknown;
setKanbanColumn(taskId: string, column: string): unknown;
clearKanban(taskId: string): unknown;
listReviewers(): string[];
addReviewer(reviewer: string): string[];
removeReviewer(reviewer: string): string[];
updateColumnOrder(columnId: string, orderedTaskIds: string[]): unknown;
}
export interface ControllerReviewApi {
approveReview(taskId: string, flags?: Record<string, unknown>): unknown;
requestChanges(taskId: string, flags?: Record<string, unknown>): unknown;
}
export interface ControllerMessageApi {
sendMessage(flags: Record<string, unknown>): unknown;
}
export interface ControllerProcessApi {
registerProcess(flags: Record<string, unknown>): unknown;
stopProcess(flags: Record<string, unknown>): unknown;
unregisterProcess(flags: Record<string, unknown>): unknown;
listProcesses(): unknown[];
}
export interface AgentTeamsController {
tasks: ControllerTaskApi;
kanban: ControllerKanbanApi;
review: ControllerReviewApi;
messages: ControllerMessageApi;
processes: ControllerProcessApi;
}
export function createController(options: ControllerContextOptions): AgentTeamsController;
}