View Source Spooks.Checkpoint.SpookCheckpoints (Spooks Agentic Workflow Engine v0.1.1)

Logic for handling checkpoints (saving and retrieving the state of agent workflows) in Spooks.

Right now Ecto is the only supported repository for checkpoints.

Summary

Functions

Checks if checkpoints are enabled for the given context.

Gets the checkpoint for the given context. Returns nil if there is no checkpoint.

After retrieving a checkpoint from the database we must convert its data back into a struct.

After retrieving a checkpoint from the database we must convert its data back into a struct.

Checks if there is a checkpoint for the given context.

Removes the checkpoint for the given context.

Saves a checkpoint for the given context and event.

Functions

checkpoints_enabled?(workflow_context)

Checks if checkpoints are enabled for the given context.

get_checkpoint(workflow_context)

Gets the checkpoint for the given context. Returns nil if there is no checkpoint.

get_checkpoint_event(checkpoint)

After retrieving a checkpoint from the database we must convert its data back into a struct.

get_workflow_context(checkpoint)

After retrieving a checkpoint from the database we must convert its data back into a struct.

has_checkpoint?(workflow_context)

Checks if there is a checkpoint for the given context.

remove_checkpoint(workflow_context)

Removes the checkpoint for the given context.

save_checkpoint(workflow_context, event)

Saves a checkpoint for the given context and event.