codeswarm-adapters 0.8.9

Reusable ACP and native coding-agent adapters for CodeSwarm
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use std::path::PathBuf;

use codeswarm_adapters::{AcpAdapter, AgentAdapter, AgentCapabilities, Relay, RelayDecision};

#[test]
fn public_adapter_contract_is_usable_by_downstream_applications() {
    let adapter = AcpAdapter::new(0, PathBuf::from("."), "agent", Vec::new());
    assert_eq!(adapter.slot(), 0);
    assert_eq!(adapter.capabilities(), AgentCapabilities::default());

    let mut relay = Relay::new(1, 1);
    assert!(matches!(
        relay.begin("task", 0),
        RelayDecision::Dispatch { slot: 0, .. }
    ));
}