/** * Trello MCP transport — implements the @llodev/pm-tasks-core Transport * interface by dispatching every canonical verb through `mcp__trello__*` * tool calls. The MCP dispatcher is injected (caller-supplied callback, * matching the established `probeMCP` pattern in * pm-tasks-core/src/init-lib.ts) so this module stays: * * - testable — tests inject a recording stub * - side-effect free — `import` does not throw, log, or call anything * - decoupled at build — no `mcp__*` symbols are referenced at compile time * * Verb mappings follow `pm-tasks-trello/references/operations.md` verbatim. * Idempotency fetches stay at the handler / Phase 5 hook layer per the * Phase 2 contract; this transport is a thin dispatcher that classifies * MCP errors into TransportErrorCode and wraps each result in a typed * TransportResult envelope. */ import type { Transport, TransportResult } from "@llodev/pm-tasks-core/runtime"; import type { ChecklistInput, ChecklistResult } from "./batch.js"; /** * MCP-call dispatcher. The agent runtime that loads this transport * provides a function that proxies to the real `mcp__trello__*` tools. * Tests inject a recording stub. * * The resolved value may be either the enveloped result the Trello MCP server * actually returns (`{ summary, card: { … } }`) or the bare resource, if the * caller unwraps it first — the transport accepts both. */ export type McpCaller = (toolName: string, args: Record) => Promise; export interface CreateTrelloTransportOptions { mcp: McpCaller; } /** Trello transport plus Trello-only extension methods (F13). Not part of core Transport. */ export type TrelloTransport = Transport & { createChecklists(cardId: string, checklists: readonly ChecklistInput[], concurrency?: number): Promise>; }; export declare function createTrelloTransport(opts: CreateTrelloTransportOptions): TrelloTransport; //# sourceMappingURL=transport-trello.d.ts.map