Behaviour for pluggable artifact storage backends.
Mirrors Python ADK's BaseArtifactService. Artifacts are binary blobs
(files, images, etc.) attached to a session, keyed by filename with
versioning support.
Summary
Callbacks
Delete an artifact by filename.
List artifact filenames for a session.
Load an artifact by filename and optional version.
Save an artifact, returning the new version number.
Types
Callbacks
@callback delete( app_name :: String.t(), user_id :: String.t(), session_id :: String.t(), filename :: String.t(), opts :: keyword() ) :: :ok | {:error, term()}
Delete an artifact by filename.
@callback list( app_name :: String.t(), user_id :: String.t(), session_id :: String.t(), opts :: keyword() ) :: {:ok, [String.t()]} | {:error, term()}
List artifact filenames for a session.
@callback load( app_name :: String.t(), user_id :: String.t(), session_id :: String.t(), filename :: String.t(), opts :: keyword() ) :: {:ok, artifact()} | :not_found | {:error, term()}
Load an artifact by filename and optional version.
@callback save( app_name :: String.t(), user_id :: String.t(), session_id :: String.t(), filename :: String.t(), artifact :: artifact(), opts :: keyword() ) :: {:ok, non_neg_integer()} | {:error, term()}
Save an artifact, returning the new version number.