# `Pixir.Delegate.DaemonClient`
[🔗](https://github.com/Ranvier-Technologies/pixir/blob/main/lib/pixir/delegate/daemon_client.ex#L1)

Short-lived CLI client for the workspace-local Delegate daemon.

This module owns the IPC attempt from ordinary `pixir delegate` commands into a
manually started foreground daemon. It treats stale endpoint files and closed sockets
as fallback-capable daemon unavailability, while authentication or workspace mismatch
remain explicit structured errors.

# `call`

```elixir
@spec call(String.t(), map(), keyword()) :: {:ok, map()} | {:error, map()}
```

Call the workspace-local daemon.

# `follow`

```elixir
@spec follow(String.t(), map(), (map() -&gt; term()), keyword()) ::
  {:ok, map()} | {:error, map()}
```

Follow a daemon stream, emitting progress frames until a final payload arrives.

The daemon sends zero or more `%{"ipc_frame" => true}` packets followed by the normal
`%{"ipc_ok" => true, "payload" => ...}` response. The callback receives decoded
frame maps in-order and should keep side effects bounded to presentation.

# `status`

```elixir
@spec status(keyword()) :: {:ok, map()} | {:error, map()}
```

Return daemon status through IPC.

# `stop`

```elixir
@spec stop(keyword()) :: {:ok, map()} | {:error, map()}
```

Ask the daemon to stop.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
