Repository navigation
Description
Goal
Finish what the 0.8.0 API-sidecar move started: gut fiberpath's ad-hoc Marlin code, consume the now-published marlin-host library for all host-protocol concerns, and move machine control onto the HTTP API sidecar — retiring the Rust-owned fiberpath interactive stdio subprocess. Severely simplify fiberpath's Marlin surface. Target: 0.9.0.
This supersedes the in-repo build-then-extract plan in #188 (the library now exists and is on PyPI as marlin-host==0.1.0, MVP + hardware-validated on RAMPS 1.4 / Marlin bugfix-2.1.x).
Current vs target
Today there are two machine paths: the CLI streamer, and a Rust-owned long-lived fiberpath interactive stdio-JSON subprocess (src-tauri/src/marlin.rs, 10 Tauri commands) that the GUI drives — while the HTTP sidecar does compute only.
Target: the sidecar owns the serial port.
GUI (Svelte) ──typed API client (polls GET /jobs/{id}?since=)──▶ fiberpath_api ──▶ marlin_host.MarlinHost ──▶ board
CLI `fiberpath stream` ─────────────────────────────────────────▶ marlin_host.MarlinHost ──▶ board
Gone: fiberpath/execution/marlin.py, fiberpath_cli/interactive.py, the interactive CLI command, the marlin.rs subprocess + its 10 Tauri commands, fiberpath's direct pyserial use.
marlin-host upgrades (app-neutral; ship as marlin-host 0.2.0 first)
Gap analysis: marlin-host already covers connect/streaming/pause/e-stop/queries more rigorously than fiberpath. Real gaps:
-
//action:*handling — board-initiated//action:pause/resume/cancel/prompt(M600, runout, LCD) is parsed then dropped; add anon_actioncallback (delivery). (only true protocol gap) -
list_ports()helper (fiberpath drops its direct pyserial import) +position()(mirrortemperatures()) - release marlin-host 0.2.0 to PyPI
fiberpath slices
- B — add
marlin-host[serial]dep, drop pyserial - C — API machine routes + background job runner over
MarlinHost:GET /ports,POST|DELETE /connection,POST /commands,POST /jobs,GET /jobs/{id}?since=,POST /jobs/{id}/pause|resume|stop(feat(api): Marlin REST surface — ports, connection, synchronous commands (part A) #190, feat(api): Marlin /jobs polled resource + background job runner #199); lock serialization; M112 bypasses the lock (safety: emergency-stop/abort must preempt serialization and reach the board out-of-band #196); crash→orphanednot 404 (build(gui): sidecar serial-crash / orphaned-job recovery #200) - D — OpenAPI regen + typed GUI client (both CI drift gates)
- E — GUI: rewire
marlin-api.tsto the API client + polling; adaptmachine-session.svelte.ts; gutmarlin.rs(drop subprocess + 10 cmds); connection-info panel (GUI: machine connection info panel in the Stream tab #146) — needs hands-on validation with the live app + board - F — delete
fiberpath/execution/+fiberpath_cli/interactive.py+ theinteractiveCLI command; rewirefiberpath_cli/stream.pyto marlin-host - G — packaging:
freeze_api.pygains serial + marlin_host + new routes;freeze_cli.pydrops execution/interactive - H — 0.9.0 release prep (version bumps, CHANGELOG, lockfiles)
Subsumes / relates
Consumer side of #187 (the protocol layer is now realized in marlin-host: #178/#179/#180/#181/#182 are done there). Implements #190, #199, #196, #200, #146 against marlin-host. Closes the loop on #188. Part of the #195 thin-shell-GUI direction.
Notes
- Drop M0/M108 from the stream pause path — adopt marlin-host's host-side pause (one-command-in-flight pacing makes board-level M0 unnecessary and fragile). Keep M0/M108 only as an explicit "operator hold" app feature if desired.
- dry-run +
;-comment logging stay app-side; recovery orchestrated viaSerialTransport.reset(flush=True)+connect().
Activity
CameronBrooks11 commentedon Jun 28, 2026
Closing as a duplicate — this is already epic #195 (local-API backend + OpenAPI-typed thin-shell GUI), which has the fuller phased plan and sub-issues (#190/#199 backend, #193/#194 frontend+shell, #196/#200/#146, consuming #187/#188). Consolidating the marlin-host-published status onto #195 instead of forking a parallel epic.