Lux.Company.ExecutionEngine.ArtifactStore (Lux v0.5.0)
View SourceIn-memory store for managing artifacts produced during objective execution.
This module is responsible for:
- Storing and retrieving artifacts in memory
- Tracking artifact metadata and relationships
- Providing access to artifacts across steps
- Extensive logging of artifact operations
Summary
Functions
Adds tags to an artifact.
Returns a specification to start this module under a supervisor.
Retrieves an artifact by ID.
Lists all artifacts with optional filtering.
Lists all artifacts for a specific step.
Starts a new ArtifactStore for an objective.
Stores a new artifact.
Updates artifact metadata.
Types
@type artifact() :: %{ id: artifact_id(), name: String.t(), content: term(), content_type: String.t(), metadata: map(), created_by: task_id(), created_at: DateTime.t(), step_id: step_id(), tags: [String.t()] }
@type artifact_id() :: String.t()
@type state() :: %{ objective_id: String.t(), artifacts: %{required(artifact_id()) => artifact()}, step_artifacts: %{required(step_id()) => MapSet.t(artifact_id())}, company_pid: pid() }
@type step_id() :: String.t()
@type task_id() :: String.t()
Functions
Adds tags to an artifact.
Returns a specification to start this module under a supervisor.
See Supervisor
.
Retrieves an artifact by ID.
Lists all artifacts with optional filtering.
Options
- :tags - List of tags to filter by (all must match)
- :content_type - Filter by content type
- :created_by - Filter by task ID
Lists all artifacts for a specific step.
Starts a new ArtifactStore for an objective.
Options
- :objective_id - The ID of the objective these artifacts belong to
- :company_pid - PID of the company process for notifications
Stores a new artifact.
Parameters
- store: The ArtifactStore pid
- name: Name of the artifact
- content: The artifact content (any term)
- content_type: MIME type or format identifier
- opts: Additional options
- :metadata - Additional metadata map
- :tags - List of tags
- :step_id - ID of the step that created the artifact
- :task_id - ID of the task that created the artifact
Updates artifact metadata.