Default lifetime for a freshly minted pairing token. Tokens expire so a
leaked or forgotten token can’t be replayed indefinitely; --ttl-days 0
opts out for long-lived automation.
Clamp a client-supplied pairing TTL so a daemon socket caller can’t mint a
never-expiring token by sending ttl_days <= 0: non-positive input becomes
the default TTL, positive values pass through. The local mermaid pair CLI
deliberately does not call this — its --ttl-days 0 “never expires”
opt-out is an owner-only choice with no privilege boundary (#65).
RFC3339 expiry ttl_days from now, or None when ttl_days <= 0
(never expires). Shared by the daemon pair command and the local CLI so
both honor the same TTL semantics.
Name of the per-user daemon control pipe for sid. Namespaced by the
user’s SID so two users on one machine get distinct pipes (the analog of
the unix socket living in a per-user data dir) — the ACL from
pipe_sddl then enforces that separation, rather than merely naming it.
SDDL for the daemon pipe’s DACL: protected (P, no inherited ACEs),
granting GA (generic all) to SY (LocalSystem) and to the owning user’s
SID — and to no one else, since a DACL denies anything it doesn’t grant.
This is the named-pipe analog of the 0600 unix socket + uid peer check
(#66). Remote access is separately refused via
PIPE_REJECT_REMOTE_CLIENTS on the server, not the DACL.
Open a STREAMING daemon connection: send one JSON line, return a
line-iterator over the responses. Used by subscribe_task, whose
connection stays open (ack line, then NDJSON events until the terminal
result) — request_daemon_json reads exactly one line and closes.
auth.token is injected from MERMAID_DAEMON_TOKEN like the one-shot
path.