Crate gestura_core_agents

Crate gestura_core_agents 

Source
Expand description

Agent lifecycle management and delegation primitives for Gestura.

gestura-core-agents provides the typed orchestration model for spawning specialist agents, delegating structured work, and tracking task execution results across local and remote execution modes.

§Design role

This crate owns the agent/delegation vocabulary used by supervisor-style orchestration without pulling in GUI-specific concerns. It is intentionally a domain crate for types and lifecycle primitives, while presentation-layer integration and higher-level runtime coordination remain elsewhere.

§Main concepts

  • AgentRole: specialist roles such as supervisor, implementer, reviewer, tester, and remote worker
  • AgentSpawnRequest: spawn-time contract including workspace, execution mode, and advertised capabilities
  • DelegatedTask: structured delegated work with approvals, dependencies, reviewer/test gates, memory tags, and remote-target metadata
  • TaskResult: normalized result payload including artifacts and tool-call provenance
  • AgentManager and AgentSpawner: lifecycle primitives for creating and managing active agents

§Execution model

Delegated work supports several execution environments:

  • shared workspace
  • isolated workspace
  • git worktree-backed execution
  • remote execution targets

This lets the rest of the system reason about isolation and provenance using typed metadata instead of ad hoc strings.

§Stable import paths

Most application code should import these types through gestura_core::agents::*. GUI-specific orchestration wrappers remain in the GUI crate.

Structs§

AgentEnvelope
IPC envelope for events exchanged with agents
AgentInfo
Public agent info for status queries
AgentManager
Core agent manager implementation
AgentSpawnRequest
Spawn configuration for a managed agent.
DelegatedTask
Task that can be delegated to a subagent
DelegationBrief
Structured brief attached to delegated work.
OrchestratorToolCall
Record of a tool call during orchestrated task execution
RemoteAgentTarget
Remote target details for delegated work that may execute via A2A.
TaskArtifactRecord
Artifact produced by delegated task execution.
TaskResult
Result from a delegated task

Enums§

AgentCommand
Commands that can be sent to an agent task
AgentExecutionMode
Execution mode used by a subagent.
AgentRole
Specialist role assigned to a managed agent.
AgentStatus
Status value for an agent
TaskTerminalStateHint
Optional terminal-state mapping returned by delegated execution.

Traits§

AgentSpawner
Trait for spawning and managing isolated agents