Pi.Agent.Job (pi_bridge v0.6.22)

Copy Markdown View Source

Supervised agent job lifecycle handle.

Summary

Functions

Returns a specification to start this module under a supervisor.

Types

status()

@type status() :: :running | :done | :failed | :cancelled

t()

@type t() :: %Pi.Agent.Job{
  child_session_id: String.t(),
  duration_ms: non_neg_integer() | nil,
  error: term(),
  finished_at: DateTime.t() | nil,
  id: String.t(),
  model: term(),
  parent_session_id: String.t() | nil,
  pid: pid() | nil,
  result: term(),
  role: atom() | String.t() | nil,
  started_at: DateTime.t() | nil,
  status: status(),
  task: String.t()
}

Functions

cancel(pid)

child_spec(init_arg)

Returns a specification to start this module under a supervisor.

See Supervisor.

new(task, opts \\ [])

start_link(arg)