Pixir.Delegate.DaemonEndpoint (pixir v0.1.5)

Copy Markdown View Source

Workspace-local endpoint metadata for the Delegate daemon.

The endpoint file is live capability metadata, not durable truth. It lets a short-lived pixir delegate client discover a manually started local daemon for the same workspace. The append-only Session Log remains authoritative for Delegate work; this file only describes how to reach the resident owner runtime while it is alive.

Summary

Functions

Delete endpoint metadata if present.

Delete endpoint metadata only when it still belongs to the given endpoint.

Return the workspace-local daemon endpoint file path.

Read workspace-local endpoint metadata.

Write endpoint metadata with owner-only permissions when supported.

Functions

delete(workspace)

@spec delete(String.t()) :: {:ok, :deleted | :missing} | {:error, map()}

Delete endpoint metadata if present.

delete_if_owner(workspace, endpoint)

@spec delete_if_owner(String.t(), map()) ::
  {:ok, :deleted | :missing | :skipped} | {:error, map()}

Delete endpoint metadata only when it still belongs to the given endpoint.

path(workspace)

@spec path(String.t()) :: {:ok, String.t()} | {:error, map()}

Return the workspace-local daemon endpoint file path.

read(workspace)

@spec read(String.t()) :: {:ok, map()} | {:error, map()}

Read workspace-local endpoint metadata.

write(workspace, endpoint)

@spec write(String.t(), map()) :: {:ok, String.t()} | {:error, map()}

Write endpoint metadata with owner-only permissions when supported.