PromptRunner.RunJournal (PromptRunnerSDK v0.12.1)

Copy Markdown View Source

Append-only durable run records.

A journal is never reopened with truncate semantics. Every acknowledged append is flushed before returning. Earlier corruption and sequence gaps are errors; a single torn final line is quarantined before the next append.

Summary

Functions

append(path, run_id, type, data \\ %{})

@spec append(String.t(), String.t(), String.t(), map()) ::
  {:ok, non_neg_integer()} | {:error, term()}

read(path)

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