Expand description
Resolve a repo root to its caliband control socket, and ensure a daemon is running for it.
Mirrors caliban’s socket-path rule:
${CALIBAN_DAEMON_RUNTIME_DIR:-$XDG_RUNTIME_DIR/caliban}/<hash16>.sock,
falling back to ${TMPDIR}/caliban-daemon/<hash16>.sock, where hash16 is
the first 16 hex chars of SHA-256(canonical_workspace_root).
Structs§
- Discovery
Env - The subset of process environment that affects socket-path resolution. Captured explicitly so resolution is a pure, testable function.
- Ensure
Config - Configuration for
ensure_caliband.
Functions§
- canonical_
root - Canonicalize a repo root, mapping the IO error to a discovery error.
- control_
socket_ path - Compute the control socket path for a (already canonical) repo root.
- ensure_
caliband - Ensure a caliband daemon is reachable for
workspace_root, returning a client bound to its control socket. If none is reachable andautostartis set, spawns the daemon and waits for the socket. - hash16
- First 16 hex chars of
SHA-256of the path’s string form. - resolve_
socket - Canonicalize a repo root and compute its control socket path.