Skip to main content

Crate luft_adapters

Crate luft_adapters 

Source
Expand description

§luft-adapters

ACP (Agent Communication Protocol) backend for Luft.

AcpAdapter connects to an opencode acp subprocess as an ACP client and implements the AgentBackend trait from luft-core.

§Architecture

 Luft Runtime                    AcpAdapter
      │                                  │
      │  AgentTask                        │  spawn `opencode acp`
      ├──────────────────────────────────►│
      │                                   ├──── ACP Session.Create ────► opencode
      │                                   │◄─── SessionUpdate(event) ─── opencode
      │  AgentEvent::AgentProgress        │
      │◄──────────────────────────────────┤
      │                                   ├──── Session.Stop ───────────► opencode
      │  AgentResult                      │
      │◄──────────────────────────────────┘

§Module Layout

ModuleResponsibility
acp_adapterConfig, adapter, one-shot session lifecycle
update_mapperACP SessionUpdate → Luft ProgressDelta
permissionNon-interactive request_permission decisions
result_collectorStop reason + message → AgentResult

§Quick Start

use luft_adapters::{AcpAdapter, AcpConfig, register_acp_backend};
use luft_core::BackendRegistry;

let mut registry = BackendRegistry::new();
register_acp_backend(&mut registry, AcpConfig::default());

Structs§

AcpAdapter
ACP client backend for opencode (and compatible ACP agents).
AcpConfig
ACP backend configuration.

Functions§

register_acp_backend
Register an AcpAdapter (the opencode backend) with a registry.