Skip to content

feat(api): Marlin REST surface — ports, connection, synchronous commands (part A) #190

Closed

Description

@CameronBrooks11

Part of the local-API GUI architecture epic. Consumes the #187 host-protocol layer.

Scope — plain request/response REST (no WebSockets)

  • GET /ports — list serial ports.
  • POST /connection / DELETE /connection — connect / disconnect.
  • POST /commands {gcode} → {responses} — synchronous single command (jog / M114 / home).
  • POST /jobs {definition|gcode} → {job_id, total} — start a stream.
  • GET /jobs/{id} → {sent, total, state, recent_log} — polled progress.
  • POST /jobs/{id}/pause | /resume | /stop.

The API process owns the serial port via a server-side job runner (background task feeding the port + a lock that serializes manual /commands against the running job — this supersedes the #186 concern, server-side). Firmware-initiated messages (//action:, errors) surface in the polled status.

Why

The Marlin protocol is request/response (send line → ok); progress is a polling concern, not a streaming one. No push channel needed.

Acceptance

  • Connect, jog, run/poll/pause/resume/stop a job — all over plain REST; manual commands can't interleave with the job.

Activity

  1. added
    enhancement
    python
    on Jun 26, 2026
  2. changed the title [-]feat(api): Marlin REST surface — connection, synchronous commands, and a polled job resource owning the serial port[/-] [+]feat(api): Marlin REST surface — ports, connection, synchronous commands (part A)[/+] on Jun 26, 2026
  3. CameronBrooks11 commented on Jun 26, 2026

    @CameronBrooks11
    MemberAuthor

    Plan-review verdict (2026-06-25): SPLIT. Retitled to part A (ports + connection + synchronous commands — lands and dogfoods first). The polled /jobs resource + background runner split out to #199 (gated on #179 + #180).

  4. CameronBrooks11 commented on Jun 28, 2026

    @CameronBrooks11
    MemberAuthor

    Done — shipped in #260 (GET /machine/ports, POST/DELETE /machine/connection, POST /machine/commands). The sidecar owns the serial port via marlin-host. Released in fiberpath 0.9.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementpython

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions