ReqManagedAgents.Host.Locator (req_managed_agents_host v0.2.0)

Copy Markdown View Source

Durable external_id -> upstream identity map over a Store. Reads and writes Locator.Record rows; translates the store's :miss (and any non-Record value found in a shared store) to the caller-facing :error.

Summary

Functions

Delete a persisted transcript (record-removal cleanup).

Fetch a persisted transcript. :miss when none was stored.

Persist a session transcript under the sibling key {:transcript, external_id}.

Types

external_id()

@type external_id() :: String.t()

Functions

delete_transcript(store, external_id)

@spec delete_transcript(ReqManagedAgents.Host.Store.store(), external_id()) :: :ok

Delete a persisted transcript (record-removal cleanup).

fetch(store, external_id)

fetch_transcript(store, external_id)

@spec fetch_transcript(ReqManagedAgents.Host.Store.store(), external_id()) ::
  {:ok, [map()]} | :miss

Fetch a persisted transcript. :miss when none was stored.

list(store)

list_by(store, metadata)

mark_context_sent(store, external_id)

@spec mark_context_sent(ReqManagedAgents.Host.Store.store(), external_id()) ::
  :ok | :error

put(store, record)

put_transcript(store, external_id, messages)

@spec put_transcript(ReqManagedAgents.Host.Store.store(), external_id(), [map()]) ::
  :ok

Persist a session transcript under the sibling key {:transcript, external_id}.

set_status(store, external_id, status)