Design directive (make true over time)
agent-mesh is a library for other projects (plus the in-tree amesh
reference consumer). Library crates SHALL NOT contain TUI components.
Instead they expose STRUCTS and API seams that demand the creation of a
GUI/TUI/API surface by the consumer. (Workspace-wide agent-* directive;
canonical contract lives in agent-bridle's issue — this one scopes it to
the mesh.)
Audited 2026-07-15: library crates are currently TUI-free (the stdin use in
agent-mesh-cli/src/mcp.rs is MCP stdio transport, not interactive UI).
This issue is a ratchet to hold plus the demand-side design below.
The mesh's decision surfaces
Where the mesh's own semantics demand a human decision, expose the struct —
never the prompt:
- First-contact key pinning (the TOFU ceremony). The Zero-Trust /
floating-identity research pass confirmed exactly one top failure mode
for pubkey-as-identity systems with a primary source: RFC 7401's own
admission that keyless first contact is a "leap of faith… subject to
man-in-the-middle." The mesh must expose an introduction struct —
{ fingerprint, pubkey, channel-of-introduction, proposed caveats } —
and a DecisionSurface-style seam for the pin/reject choice. newt can
render it as a matrix chooser with an audit escalation into a rich
trust-management TUI; hermes as a flat allow/deny list; a daemon
consumer as a pre-pinned-keys policy file. The library never asks.
- Caveat grants on introduction (what a newly-pinned peer may do) —
same seam, composed with agent-bridle's verdict contract (bridle #220).
- Quiet-peer disclosure (any future "reveal this quiet identity to X"
affordance) — same seam.
Alignment with the floating-identity doctrine
docs/decisions/floating_identity.md: identities are durable; locations
are fungible candidates. This directive is the same law one layer up:
decision semantics are durable (library); presentation surfaces are
fungible candidates (consumers). newt's matrix chooser, hermes's flat
list, a policy file, a GUI — all candidate renderings of one decision
struct. No consumer's layout may become load-bearing for mesh semantics.
Laws
- No TUI deps (ratatui/crossterm/cursive/dialoguer/inquire/console/…) in
any agent-mesh-* library crate; CI deny-list enforces.
- The library defines the decision SPACE; the consumer defines LAYOUT.
Escalations (e.g. audit) are optional-to-render — grants must be
complete without them.
- Headless is fail-closed: no surface bound → no pin, no grant.
amesh (in-tree consumer) may render prompts, but only through the same
public seam any external consumer would use — it is the reference
implementation, not a privileged backdoor.
Acceptance
Related: docs/decisions/floating_identity.md (PR #63), #61/#64 (identity
dialing), agent-bridle #220 (verdict/policy contract).
Design directive (make true over time)
agent-mesh is a library for other projects (plus the in-tree
ameshreference consumer). Library crates SHALL NOT contain TUI components.
Instead they expose STRUCTS and API seams that demand the creation of a
GUI/TUI/API surface by the consumer. (Workspace-wide agent-* directive;
canonical contract lives in agent-bridle's issue — this one scopes it to
the mesh.)
Audited 2026-07-15: library crates are currently TUI-free (the stdin use in
agent-mesh-cli/src/mcp.rsis MCP stdio transport, not interactive UI).This issue is a ratchet to hold plus the demand-side design below.
The mesh's decision surfaces
Where the mesh's own semantics demand a human decision, expose the struct —
never the prompt:
floating-identity research pass confirmed exactly one top failure mode
for pubkey-as-identity systems with a primary source: RFC 7401's own
admission that keyless first contact is a "leap of faith… subject to
man-in-the-middle." The mesh must expose an introduction struct —
{ fingerprint, pubkey, channel-of-introduction, proposed caveats }—and a
DecisionSurface-style seam for the pin/reject choice. newt canrender it as a matrix chooser with an
auditescalation into a richtrust-management TUI; hermes as a flat allow/deny list; a daemon
consumer as a pre-pinned-keys policy file. The library never asks.
same seam, composed with agent-bridle's verdict contract (bridle #220).
affordance) — same seam.
Alignment with the floating-identity doctrine
docs/decisions/floating_identity.md: identities are durable; locationsare fungible candidates. This directive is the same law one layer up:
decision semantics are durable (library); presentation surfaces are
fungible candidates (consumers). newt's matrix chooser, hermes's flat
list, a policy file, a GUI — all candidate renderings of one decision
struct. No consumer's layout may become load-bearing for mesh semantics.
Laws
any
agent-mesh-*library crate; CI deny-list enforces.Escalations (e.g.
audit) are optional-to-render — grants must becomplete without them.
amesh(in-tree consumer) may render prompts, but only through the samepublic seam any external consumer would use — it is the reference
implementation, not a privileged backdoor.
Acceptance
protocol crate (design doc first; see floating_identity.md)
ameshfirst-contact prompt (when built) routes through the seamTOFU admission (doctrine PR follow-up)
Related:
docs/decisions/floating_identity.md(PR #63), #61/#64 (identitydialing), agent-bridle #220 (verdict/policy contract).