MingaAgent.Subagent.Handle (Minga v0.1.0)

Copy Markdown View Source

Stable runtime handle for a background sub-agent session.

The handle is owned by MingaAgent.SessionManager and projected by editor shells for status and navigation. The public, stable identifier is session_id; pid is kept for in-process routing only.

Summary

Functions

Returns the stable public handle string.

Returns a short display label for UI surfaces.

Creates a background sub-agent handle.

Returns a copy of the handle with a different parent pid.

Returns a copy of the handle with a different pid.

Types

t()

@type t() :: %MingaAgent.Subagent.Handle{
  model: String.t() | nil,
  parent_pid: pid() | nil,
  parent_session_id: String.t() | nil,
  pid: pid(),
  session_id: String.t(),
  started_at: DateTime.t(),
  task: String.t()
}

Functions

id(handle)

@spec id(t()) :: String.t()

Returns the stable public handle string.

label(handle)

@spec label(t()) :: String.t()

Returns a short display label for UI surfaces.

new(opts)

@spec new(keyword()) :: t()

Creates a background sub-agent handle.

with_parent_pid(handle, parent_pid)

@spec with_parent_pid(t(), pid() | nil) :: t()

Returns a copy of the handle with a different parent pid.

with_pid(handle, pid)

@spec with_pid(t(), pid()) :: t()

Returns a copy of the handle with a different pid.