AttractorEx.HTTP.Manager (attractor_phoenix v0.1.0)

Copy Markdown View Source

GenServer that owns durable runtime state for HTTP-managed pipeline runs.

Run metadata, event history, checkpoints, pending questions, and artifact indexes are persisted through a pluggable run store so HTTP and Phoenix consumers can replay run history after process restarts. The manager also admits one explicit checkpoint-backed resume for cancelled runs after the human gate has been fully cleared and the accepted answer has been durably recorded.

Summary

Functions

cancel(server, id)

child_spec(init_arg)

Returns a specification to start this module under a supervisor.

See Supervisor.

create_pipeline(server, dot, context, opts \\ [])

Creates and starts a pipeline run under HTTP management.

get_pipeline(server, id)

list_pipelines(server)

pending_questions(server, id)

pipeline_checkpoint(server, id)

pipeline_context(server, id)

pipeline_events(server, id)

pipeline_graph(server, id)

pipeline_status_payload(pipeline)

record_event(server, id, event)

register_question(server, id, question)

replay_events(server, id, opts \\ [])

Returns persisted events after the given sequence number.

reset(server)

Clears in-memory and persisted HTTP runtime state for the current manager.

resume_pipeline(server, id)

Attempts one explicit checkpoint-backed resume for an admitted interrupted run.

snapshot(server, id)

start_link(opts \\ [])

Starts the HTTP pipeline manager.

submit_answer(server, id, qid, answer)

subscribe(server, id, pid)

timeout_question(server, id, qid)