AbstractAgentProcessRepository

Abstract base class for AgentProcessRepository implementations that enforces ephemeral process handling.

Ephemeral processes (marked with processOptions.ephemeral = true) are not persisted and cannot spawn child processes. This class uses the template method pattern to prevent persistence of ephemeral processes while allowing implementations to customize actual persistence logic.

Implementations should:

  • Extend this class instead of implementing AgentProcessRepository directly

  • Override doSave and doUpdate instead of save and update

  • The final save and update methods will handle ephemeral checks automatically

Inheritors

Constructors

Link copied to clipboard
constructor()

Functions

Link copied to clipboard
abstract fun delete(agentProcess: AgentProcess)
Link copied to clipboard
abstract fun findById(id: String): AgentProcess?
Link copied to clipboard
abstract fun findByParentId(parentId: String): List<AgentProcess>

Find all child processes for the given parent process ID.

Link copied to clipboard
override fun save(agentProcess: AgentProcess): AgentProcess

Save a new agent process. This method checks if the process is ephemeral and logs an error if persistence is attempted. Non-ephemeral processes are delegated to doSave.

Link copied to clipboard
override fun update(agentProcess: AgentProcess)

Update an existing agent process. This method checks if the process is ephemeral and logs an error if persistence is attempted. Non-ephemeral processes are delegated to doUpdate.