docs(maestro): refresh local_api/broker module docs for NAP-327
ci / rust (push) Failing after 57s

The 501 path is gone; update the stale "rejects cross-daemon create" / "broker
is attach-only" module docs to describe the brokered create/kill RPCs.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-06-15 16:30:40 +00:00
co-authored by Claude Opus 4.8
parent 1cdb126977
commit 906538c776
2 changed files with 19 additions and 10 deletions
+12 -5
View File
@@ -1,9 +1,16 @@
//! Home-daemon broker handle (NAP-247).
//! Home-daemon broker handle (NAP-247, extended in NAP-327).
//!
//! The HTTP `WS /api/attach/:id` handler uses this to ask the registry to
//! resolve a peer-owned session into an [`AttachCandidates`] (a pair-scoped
//! JWT + the target daemon's T2 perimeter info). The actual control-link
//! send and the reply correlation live here so the handler stays thin.
//! The HTTP handlers use this to issue correlated request/reply RPCs over the
//! daemon's single registry control link, keeping themselves thin:
//!
//! - `WS /api/attach/:id` → `resolve_attach`: resolve a peer-owned session into
//! an [`AttachCandidates`] (pair-scoped JWT + T2 perimeter info) (NAP-247).
//! - `POST /api/sessions` / `DELETE /api/sessions/:id` for a peer target →
//! `forward_create` / `forward_kill`: relay the op to the owning daemon and
//! await its result (NAP-327).
//!
//! Each call correlates its reply by `reply_to`, fails fast while the link is
//! down (NAP-263), and cleans up its pending entry on every exit path (NAP-259).
use std::collections::HashMap;
use std::hash::Hash;
+7 -5
View File
@@ -14,12 +14,14 @@
//! trust — same model `maestro-web` documents per the connection-orchestration
//! spec. Cookie auth can be added later if a real use case demands it.
//!
//! ## Scope (v1)
//! ## Scope
//!
//! The daemon only surfaces its own sessions and itself. Peer-catalog mirroring
//! is NAP-246; cross-daemon broker attach is NAP-247. Until those land,
//! `POST /api/sessions` rejects requests targeting other daemons and
//! `WS /api/attach/:id` only handles sessions this daemon owns.
//! The daemon surfaces its own sessions plus the peer-catalog mirror (NAP-246).
//! Cross-daemon operations are brokered over the registry control link:
//! `WS /api/attach/:id` dials a peer over T2 (NAP-247), and `POST /api/sessions`
//! / `DELETE /api/sessions/:id` for a peer-owned target relay a create/kill RPC
//! to the owning daemon (NAP-327) — control-plane only, no session bytes
//! traverse the registry.
use std::sync::Arc;