Skip to content

feat(publish): real AdaptlyPost MCP wiring (9 platforms, DRY_RUN-aware) #22

@wesleysimplicio

Description

@wesleysimplicio

Context

lib/publish/adaptlypost.ts:19-41 is a mock that returns https://adaptlypost.test/drafts/<id> regardless of DRY_RUN. SETUP.md § 5 documents the MCP setup (@adaptlypost/mcp-server).

Goal

Real adapter that schedules pieces through the AdaptlyPost MCP across the 9 supported platforms.

Acceptance criteria

  • Reads ADAPTLYPOST_API_KEY; throws clearly if missing and DRY_RUN=false
  • Maps platforms array to the AdaptlyPost MCP tool params (IG, TikTok, Facebook, LinkedIn, X, Threads, Pinterest, YouTube Shorts, FB Reels)
  • Validates each platform's media_paths against qa-tech-specs before scheduling (refuse to schedule if any platform fails its hard specs)
  • Honors DRY_RUN=true → write draft payload to outputs/<piece>/adaptlypost-draft.json and return synthetic URL
  • Real path returns actual draft URL from the MCP
  • Retries on transient MCP errors (3 attempts, exponential backoff; AGENTS-style)
  • After 3 failures, the piece status flips to review with error transcript (per DESIGN.md § Failure Modes)
  • E2E spec with mocked MCP transport

Files

  • lib/publish/adaptlypost.ts:19-41
  • e2e/adaptlypost-publish.spec.ts (extend, do not replace existing test)

Depends on

  • #qa-tech-specs (validation step)

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions