Skip to main content

Module daemon

Module daemon 

Source

Constants§

DAEMON_TOKEN_ENV
DEFAULT_PAIRING_TTL_DAYS
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.

Functions§

clamp_pairing_ttl_days
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).
daemon_socket_path
generate_pairing_token
hash_pairing_token
pairing_expiry_from_now
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.
request_daemon_json
request_daemon_text
snapshot_field_from_daemon