ReqManagedAgents.Artifacts.AgentCoreSessionStorage (ReqManagedAgents v0.6.1)

Copy Markdown View Source

ReqManagedAgents.Artifacts store over an AgentCore harness sessionStorage mount (the no-VPC filesystem type), backed by InvokeAgentRuntimeCommand.

Verbs run python3 one-liners in the session microVM (python3 is guaranteed in the base image); file bytes transit the command stream as Base64, so this store is for report-scale artifacts, not GB-scale data. Names are restricted to [A-Za-z0-9._-] (no separators, no traversal). A verb that exits non-zero unexpectedly returns {:error, {:command_failed, %CommandResult{}}} — stderr is never swallowed.

Concurrent puts of the SAME name in the same store race on a fixed .rma_b64_part temp path — callers must serialize same-name writes.

Summary

Functions

Build a store term. base_path is the harness's sessionStorage mountPath (e.g. "/mnt/data"). command_fun is injectable for tests; defaults to ReqManagedAgents.AgentCore.Client.invoke_agent_runtime_command/2 on client.

Functions

store(client, agent_runtime_arn, runtime_session_id, base_path, opts \\ [])

Build a store term. base_path is the harness's sessionStorage mountPath (e.g. "/mnt/data"). command_fun is injectable for tests; defaults to ReqManagedAgents.AgentCore.Client.invoke_agent_runtime_command/2 on client.

Raises ArgumentError if base_path contains a single quote: paths are single-quoted into shell commands, and base_path is operator-controlled config, so a bad value is a construction-time programmer error.