/** * Asana MCP transport — implements the @llodev/pm-tasks-core Transport * interface by dispatching every canonical verb through * `mcp__claude_ai_Asana__*` 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-asana/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. * * Asana-specific deltas vs the Trello transport: * - Five of seven verbs route through `update_tasks` (Asana's general * batch update endpoint) — the `updates: [{ task, ...fields }]` shape * is uniform across move / checklist.check / close / due-date / assignee. * - `taskClose` is single-call: the visual "move to Done" is a separate * caller-driven `task.move` per operations.md L12. `closeListOrSectionId` * is IGNORED at the transport layer; the response data omits * `movedToListOrSectionId` entirely. * - `taskDueDateSet` converts ISO 8601 → `YYYY-MM-DD` via `.slice(0,10)` * because Asana's `due_on` field rejects full timestamps. Malformed * input short-circuits to `INVALID_REQUEST` BEFORE the MCP call. * - `taskAssigneeAdd` sets the single primary `assignee` field; multi- * followers semantics are deferred to handler / Phase 5 hooks per * operations.md L14 simplification. */ import type { Transport } from "@llodev/pm-tasks-core/runtime"; /** * MCP-call dispatcher. The agent runtime that loads this transport * provides a function that proxies to the real `mcp__claude_ai_Asana__*` * tools. Tests inject a recording stub. */ export type McpCaller = (toolName: string, args: Record) => Promise; export interface CreateAsanaTransportOptions { mcp: McpCaller; } export declare function createAsanaTransport(opts: CreateAsanaTransportOptions): Transport; //# sourceMappingURL=transport-asana.d.ts.map