spawn: protocol types + relay + daemon HTTP for recents/gitroot/presets #26

Closed
opened 2026-06-20 14:38:57 +01:00 by naps62-yolo · 0 comments
Collaborator

Expose the daemon-side spawn data to the web, mirroring the NAP-329 ListDir broker plumbing (home daemon → registry relay → owning daemon) so it works across federated hosts. Depends on the spawn-history and gitroot work.

Wire (maestro-protocol) — all via existing RpcResult + #[serde(other)] Unknown forward-compat

  • RecentDir { cwd, last_command, last_used } + RecentDirs { dirs, truncated }.
  • GitRoot { root: Option<PathBuf> }.
  • DaemonInbound::RecentDirs/GitRoot + Outbound results + Forward* relay pairs (mirror ListDir).
  • Spawn preset list advertised alongside the daemon/catalog payload the web already fetches (extend DaemonInfo or sibling).

Daemon HTTP (maestro-daemon)

  • GET /api/daemons/:id/recent-dirs → RecentDirs.
  • GET /api/daemons/:id/gitroot?path= → GitRoot.
  • Presets ride the existing catalog payload (no new round-trip on form open).

Tests

Round-trip + forward-compat (older peer) tests for the new variants; HTTP handler tests.


Part of #21 (spawn dialog rework).

Expose the daemon-side spawn data to the web, mirroring the NAP-329 `ListDir` broker plumbing (home daemon → registry relay → owning daemon) so it works across federated hosts. Depends on the spawn-history and gitroot work. ### Wire (`maestro-protocol`) — all via existing `RpcResult` + `#[serde(other)] Unknown` forward-compat - `RecentDir { cwd, last_command, last_used }` + `RecentDirs { dirs, truncated }`. - `GitRoot { root: Option<PathBuf> }`. - `DaemonInbound::RecentDirs`/`GitRoot` + `Outbound` results + `Forward*` relay pairs (mirror `ListDir`). - Spawn preset list advertised alongside the daemon/catalog payload the web already fetches (extend `DaemonInfo` or sibling). ### Daemon HTTP (`maestro-daemon`) - `GET /api/daemons/:id/recent-dirs` → `RecentDirs`. - `GET /api/daemons/:id/gitroot?path=` → `GitRoot`. - Presets ride the existing catalog payload (no new round-trip on form open). ### Tests Round-trip + forward-compat (older peer) tests for the new variants; HTTP handler tests. --- Part of #21 (spawn dialog rework).
naps62-yolo added a new dependency 2026-06-20 14:39:46 +01:00
naps62-yolo added a new dependency 2026-06-20 14:39:46 +01:00
naps62-yolo self-assigned this 2026-06-20 21:57:33 +01:00
This repo is archived. You cannot comment on issues.
1 Participants
Due Date
No due date set.
Reference: naps62/maestro#26