/** * Transport interface for @llodev/pm-tasks-core runtime. * * Pure type definitions — no implementation, no MCP imports. * Each adapter (pm-tasks-trello, pm-tasks-asana) provides an MCP-bound * implementation in Phase 3. Verb handlers (Phase 2) consume this interface * through dependency injection in the runtime factory (Phase 1.3). * * Canonical verb names (dotted form used in audit log entries) are documented * alongside each method below. */ import type { EstimateInput, EstimationConfig, NormalizedEstimate } from "../estimation.js"; export type TransportErrorCode = "NOT_FOUND" | "ALREADY_IN_STATE" | "RATE_LIMITED" | "AUTH_ERROR" | "MCP_ERROR" | "INVALID_REQUEST" | "UNSUPPORTED_VERB" | "NOT_APPLICABLE"; export type TransportResult = { ok: true; data: T; } | { ok: false; code: TransportErrorCode; details?: Record; }; export interface TaskCreateRequest { boardOrProjectId: string; listOrSectionId: string; name: string; description?: string; clientToken?: string; labels?: string[]; priority?: string; estimate?: EstimateInput; dueDate?: string; } export interface TaskCreateResponse { id: string; url?: string; } export interface TaskMoveRequest { taskId: string; targetListOrSectionId: string; } export interface TaskMoveResponse { previousListOrSectionId: string | null; newListOrSectionId: string; } export interface ChecklistCheckRequest { taskId: string; checklistId: string; itemId: string; targetState: "complete" | "incomplete"; } export interface ChecklistCheckResponse { previousState: "complete" | "incomplete"; newState: "complete" | "incomplete"; } export interface TaskCloseRequest { taskId: string; closeListOrSectionId?: string; } export interface TaskCloseResponse { closed: boolean; movedToListOrSectionId?: string; } export interface TaskDueDateSetRequest { taskId: string; dueAt: string; } export interface TaskDueDateSetResponse { previousDueAt: string | null; newDueAt: string; } export interface TaskAssigneeAddRequest { taskId: string; userId: string; } export interface TaskAssigneeAddResponse { added: boolean; currentAssigneeIds: string[]; } export interface TaskCommentAddRequest { taskId: string; text: string; clientToken?: string; } export interface TaskCommentAddResponse { commentId: string; postedAt: string; } export interface TaskParentSetRequest { taskId: string; parentId: string; } export interface TaskParentSetResponse { previousParentId: string | null; newParentId: string; } export interface TaskEstimateSetRequest { taskId: string; input: EstimateInput; config: EstimationConfig; } export interface TaskEstimateSetResponse { normalized: NormalizedEstimate; fieldWritten: string | null; } export interface TaskSprintSetRequest { taskId: string; sprintRef: string; } export interface TaskSprintSetResponse { previousSprintRef: string | null; newSprintRef: string; } export interface Transport { /** task.create — create a new card/task in the given board+list/project+section */ taskCreate(req: TaskCreateRequest): Promise>; /** task.move — move an existing task to a different list/section */ taskMove(req: TaskMoveRequest): Promise>; /** checklist.check — set a checklist item to complete or incomplete */ checklistCheck(req: ChecklistCheckRequest): Promise>; /** task.close — archive/complete a task */ taskClose(req: TaskCloseRequest): Promise>; /** task.due-date.set — set or replace the due date on a task */ taskDueDateSet(req: TaskDueDateSetRequest): Promise>; /** task.assignee.add — add a member/assignee to a task */ taskAssigneeAdd(req: TaskAssigneeAddRequest): Promise>; /** task.comment.add — post a comment on a task */ taskCommentAdd(req: TaskCommentAddRequest): Promise>; /** task.parent.set — set or update the parent task/epic (adapter-optional; Jira only in Phase 4) */ taskParentSet?(req: TaskParentSetRequest): Promise>; /** task.estimate.set — write a normalised story-point/time estimate (adapter-optional; Jira only in Phase 4) */ taskEstimateSet?(req: TaskEstimateSetRequest): Promise>; /** task.sprint.set — assign a task to a sprint/cycle (adapter-optional; Linear is the first supporter) */ taskSprintSet?(req: TaskSprintSetRequest): Promise>; } export interface TaskSnapshot { id: string; name: string; listOrSectionId: string | null; dueAt: string | null; assigneeIds: string[]; closed: boolean; } export interface CommentSnapshot { id: string; text: string; postedAt: string; } //# sourceMappingURL=transport.d.ts.map