Rename all crates from unprefixed to arc-* prefix

Rename crate directories, package names, binary names, path
dependencies, use statements, qualified paths, clap command names,
and string literals across the workspace.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Bryan Helmkamp 2026-02-28 04:20:47 -05:00
parent 622b39f40e
commit 32e4f5eb96
138 changed files with 536 additions and 536 deletions

368
Cargo.lock generated
View file

@ -2,38 +2,6 @@
# It is not intended for manual editing.
version = 4
[[package]]
name = "agent"
version = "0.1.0"
dependencies = [
"anyhow",
"async-trait",
"bollard",
"chrono",
"clap",
"dirs",
"dotenvy",
"futures",
"glob",
"htmd",
"jsonschema",
"libc",
"llm",
"mcp",
"paste",
"reqwest 0.12.28",
"serde",
"serde_json",
"shell-escape",
"tar",
"tempfile",
"thiserror 2.0.18",
"tokio",
"tokio-util",
"util",
"uuid",
]
[[package]]
name = "ahash"
version = "0.8.12"
@ -124,9 +92,140 @@ dependencies = [
[[package]]
name = "anyhow"
version = "1.0.101"
version = "1.0.102"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5f0e0fee31ef5ed1ba1316088939cea399010ed7731dba877ed44aeb407a75ea"
checksum = "7f202df86484c868dbad7eaa557ef785d5c66295e41b460ef922eca0723b842c"
[[package]]
name = "arc-agent"
version = "0.1.0"
dependencies = [
"anyhow",
"arc-llm",
"arc-mcp",
"arc-util",
"async-trait",
"bollard",
"chrono",
"clap",
"dirs",
"dotenvy",
"futures",
"glob",
"htmd",
"jsonschema",
"libc",
"paste",
"reqwest 0.12.28",
"serde",
"serde_json",
"shell-escape",
"tar",
"tempfile",
"thiserror 2.0.18",
"tokio",
"tokio-util",
"uuid",
]
[[package]]
name = "arc-attractor"
version = "0.1.0"
dependencies = [
"anyhow",
"arc-agent",
"arc-llm",
"arc-util",
"assert_cmd",
"async-trait",
"axum",
"chrono",
"clap",
"daytona-api-client",
"daytona-sdk",
"dialoguer",
"dirs",
"dotenvy",
"futures",
"git2",
"http-body-util",
"nom",
"predicates",
"rand 0.8.5",
"scopeguard",
"serde",
"serde_json",
"tempfile",
"thiserror 2.0.18",
"tokio",
"tokio-stream",
"tokio-util",
"toml",
"tower",
"uuid",
]
[[package]]
name = "arc-git-storage"
version = "0.1.0"
dependencies = [
"git2",
"tempfile",
"thiserror 2.0.18",
"walkdir",
]
[[package]]
name = "arc-llm"
version = "0.1.0"
dependencies = [
"anyhow",
"assert_cmd",
"async-trait",
"base64",
"bytes",
"clap",
"dotenvy",
"futures",
"http",
"httpmock",
"predicates",
"rand 0.8.5",
"reqwest 0.12.28",
"serde",
"serde_json",
"tempfile",
"thiserror 2.0.18",
"tokio",
"tokio-stream",
"tokio-util",
"uuid",
]
[[package]]
name = "arc-mcp"
version = "0.1.0"
dependencies = [
"anyhow",
"futures",
"reqwest 0.12.28",
"rmcp",
"serde",
"serde_json",
"tokio",
"tracing",
]
[[package]]
name = "arc-util"
version = "0.1.0"
dependencies = [
"aho-corasick",
"regex",
"serde",
"serde_json",
"toml",
]
[[package]]
name = "assert-json-diff"
@ -191,43 +290,6 @@ version = "1.1.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0"
[[package]]
name = "attractor"
version = "0.1.0"
dependencies = [
"agent",
"anyhow",
"assert_cmd",
"async-trait",
"axum",
"chrono",
"clap",
"daytona-api-client",
"daytona-sdk",
"dialoguer",
"dirs",
"dotenvy",
"futures",
"git2",
"http-body-util",
"llm",
"nom",
"predicates",
"rand 0.8.5",
"scopeguard",
"serde",
"serde_json",
"tempfile",
"thiserror 2.0.18",
"tokio",
"tokio-stream",
"tokio-util",
"toml",
"tower",
"util",
"uuid",
]
[[package]]
name = "autocfg"
version = "1.5.0"
@ -407,9 +469,9 @@ dependencies = [
[[package]]
name = "bumpalo"
version = "3.20.1"
version = "3.20.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5c6f81257d10a0f602a294ae4182251151ff97dbb504ef9afcdda4a64b24d9b4"
checksum = "5d20789868f4b01b2f2caec9f5c4e0213b41e3e5702a50157d699ae31ced2fcb"
[[package]]
name = "bytecount"
@ -458,9 +520,9 @@ checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724"
[[package]]
name = "chrono"
version = "0.4.43"
version = "0.4.44"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fac4744fb15ae8337dc853fee7fb3f4e48c0fbaa23d0afe49c447b4fab126118"
checksum = "c673075a2e0e5f4a1dde27ce9dee1ea4558c7ffe648f576438a20ca1d2acc4b0"
dependencies = [
"iana-time-zone",
"js-sys",
@ -1144,16 +1206,6 @@ dependencies = [
"wasip3",
]
[[package]]
name = "git-storage"
version = "0.1.0"
dependencies = [
"git2",
"tempfile",
"thiserror 2.0.18",
"walkdir",
]
[[package]]
name = "git2"
version = "0.19.0"
@ -1691,9 +1743,9 @@ dependencies = [
[[package]]
name = "js-sys"
version = "0.3.85"
version = "0.3.91"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8c942ebf8e95485ca0d52d97da7c5a2c387d0e7f0ba4c35e93bfcaee045955b3"
checksum = "b49715b7073f385ba4bc528e5747d02e66cb39c6146efb66b781f131f0fb399c"
dependencies = [
"once_cell",
"wasm-bindgen",
@ -1701,9 +1753,9 @@ dependencies = [
[[package]]
name = "jsonschema"
version = "0.42.1"
version = "0.42.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6103dcd3815c9bd04239a6d0343dac2b7a18ee260e800d0a6e3eb5b9333504fb"
checksum = "a44c9bb95f6ac9270bf4fd38d71c2f8704b9fe0323a293af7a5284cbd60a39b2"
dependencies = [
"ahash",
"bytecount",
@ -1768,7 +1820,7 @@ checksum = "3d0b95e02c851351f877147b7deea7b1afb1df71b63aa5f8270716e0c5720616"
dependencies = [
"bitflags",
"libc",
"redox_syscall 0.7.1",
"redox_syscall 0.7.3",
]
[[package]]
@ -1799,9 +1851,9 @@ dependencies = [
[[package]]
name = "linux-raw-sys"
version = "0.11.0"
version = "0.12.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "df1d3c3b53da64cf5760482273a98e575c651a67eec7f77df96b5b642de8f039"
checksum = "32a66949e030da00e8c7d4434b251670a91556f4144941d37452769c25d58a53"
[[package]]
name = "litemap"
@ -1809,33 +1861,6 @@ version = "0.8.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6373607a59f0be73a39b6fe456b8192fcc3585f602af20751600e974dd455e77"
[[package]]
name = "llm"
version = "0.1.0"
dependencies = [
"anyhow",
"assert_cmd",
"async-trait",
"base64",
"bytes",
"clap",
"dotenvy",
"futures",
"http",
"httpmock",
"predicates",
"rand 0.8.5",
"reqwest 0.12.28",
"serde",
"serde_json",
"tempfile",
"thiserror 2.0.18",
"tokio",
"tokio-stream",
"tokio-util",
"uuid",
]
[[package]]
name = "lock_api"
version = "0.4.14"
@ -1903,20 +1928,6 @@ version = "0.8.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "47e1ffaa40ddd1f3ed91f717a33c8c0ee23fff369e3aa8772b9605cc1d22f4c3"
[[package]]
name = "mcp"
version = "0.1.0"
dependencies = [
"anyhow",
"futures",
"reqwest 0.12.28",
"rmcp",
"serde",
"serde_json",
"tokio",
"tracing",
]
[[package]]
name = "memchr"
version = "2.8.0"
@ -2305,9 +2316,9 @@ dependencies = [
[[package]]
name = "pin-project-lite"
version = "0.2.16"
version = "0.2.17"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3b3cff922bd51709b605d9ead9aa71031d81447142d828eb4a6eba76fe619f9b"
checksum = "a89322df9ebe1c1578d689c92318e070967d1042b512afbe49518723f4e6d5cd"
[[package]]
name = "pin-utils"
@ -2554,9 +2565,9 @@ dependencies = [
[[package]]
name = "redox_syscall"
version = "0.7.1"
version = "0.7.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "35985aa610addc02e24fc232012c86fd11f14111180f902b67e2d5331f8ebf2b"
checksum = "6ce70a74e890531977d37e532c34d45e9055d2409ed08ddba14529471ed0be16"
dependencies = [
"bitflags",
]
@ -2594,9 +2605,9 @@ dependencies = [
[[package]]
name = "referencing"
version = "0.42.1"
version = "0.42.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1a76b0c93f3dd49da2900cfb3c6b883602471a0e3e34b1578a3310ca1269d418"
checksum = "97d4124f489451bb67c59d67fa16f3ae9b5690b290406a7538e38458632666df"
dependencies = [
"ahash",
"fluent-uri",
@ -2632,9 +2643,9 @@ dependencies = [
[[package]]
name = "regex-syntax"
version = "0.8.9"
version = "0.8.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a96887878f22d7bad8a3b6dc5b7440e0ada9a245242924394987b21cf2210a4c"
checksum = "dc897dd8d9e8bd1ed8cdad82b5966c3e0ecae09fb1907d58efaa013543185d0a"
[[package]]
name = "reqwest"
@ -2799,9 +2810,9 @@ checksum = "357703d41365b4b27c590e3ed91eabb1b663f07c4c084095e60cbed4362dff0d"
[[package]]
name = "rustix"
version = "1.1.3"
version = "1.1.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "146c9e247ccc180c1f61615433868c99f3de3ae256a30a43b49f67c2d9171f34"
checksum = "b6fe4565b9518b83ef4f91bb47ce29620ca828bd32cb7e408f0062e9930ba190"
dependencies = [
"bitflags",
"errno",
@ -2812,9 +2823,9 @@ dependencies = [
[[package]]
name = "rustls"
version = "0.23.36"
version = "0.23.37"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c665f33d38cea657d9614f766881e4d510e0eda4239891eea56b4cadcf01801b"
checksum = "758025cb5fccfd3bc2fd74708fd4682be41d99e5dff73c377c0646c6012c73a4"
dependencies = [
"aws-lc-rs",
"once_cell",
@ -2962,9 +2973,9 @@ checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49"
[[package]]
name = "security-framework"
version = "3.6.0"
version = "3.7.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d17b898a6d6948c3a8ee4372c17cb384f90d2e6e912ef00895b14fd7ab54ec38"
checksum = "b7f4bc775c73d9a02cde8bf7b2ec4c9d12743edf609006c7facc23998404cd1d"
dependencies = [
"bitflags",
"core-foundation 0.10.1",
@ -2975,9 +2986,9 @@ dependencies = [
[[package]]
name = "security-framework-sys"
version = "2.16.0"
version = "2.17.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "321c8673b092a9a42605034a9879d73cb79101ed5fd117bc9a597b89b4e9e61a"
checksum = "6ce2691df843ecc5d231c0b14ece2acc3efb62c0a398c7e1d875f3983ce020e3"
dependencies = [
"core-foundation-sys",
"libc",
@ -3098,9 +3109,9 @@ dependencies = [
[[package]]
name = "serde_with"
version = "3.16.1"
version = "3.17.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4fa237f2807440d238e0364a218270b98f767a00d3dada77b1c53ae88940e2e7"
checksum = "381b283ce7bc6b476d903296fb59d0d36633652b633b27f64db4fb46dcbfc3b9"
dependencies = [
"base64",
"chrono",
@ -3117,9 +3128,9 @@ dependencies = [
[[package]]
name = "serde_with_macros"
version = "3.16.1"
version = "3.17.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "52a8e3ca0ca629121f70ab50f95249e5a6f925cc0f6ffe8256c45b728875706c"
checksum = "a6d4e30573c8cb306ed6ab1dca8423eec9a463ea0e155f45399455e0368b27e0"
dependencies = [
"darling 0.21.3",
"proc-macro2",
@ -3264,9 +3275,9 @@ checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292"
[[package]]
name = "syn"
version = "2.0.116"
version = "2.0.117"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3df424c70518695237746f84cede799c9c58fcb37450d7b23716568cc8bc69cb"
checksum = "e665b8803e7b1d2a727f4023456bbbbe74da67099c585258af0ad9c5013b9b99"
dependencies = [
"proc-macro2",
"quote",
@ -3336,9 +3347,9 @@ dependencies = [
[[package]]
name = "tempfile"
version = "3.25.0"
version = "3.26.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0136791f7c95b1f6dd99f9cc786b91bb81c3800b639b3478e561ddb7be95e5f1"
checksum = "82a72c767771b47409d2345987fda8628641887d5466101319899796367354a0"
dependencies = [
"fastrand",
"getrandom 0.4.1",
@ -3765,17 +3776,6 @@ version = "0.2.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821"
[[package]]
name = "util"
version = "0.1.0"
dependencies = [
"aho-corasick",
"regex",
"serde",
"serde_json",
"toml",
]
[[package]]
name = "uuid"
version = "1.21.0"
@ -3869,9 +3869,9 @@ dependencies = [
[[package]]
name = "wasm-bindgen"
version = "0.2.108"
version = "0.2.114"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "64024a30ec1e37399cf85a7ffefebdb72205ca1c972291c51512360d90bd8566"
checksum = "6532f9a5c1ece3798cb1c2cfdba640b9b3ba884f5db45973a6f442510a87d38e"
dependencies = [
"cfg-if",
"once_cell",
@ -3882,9 +3882,9 @@ dependencies = [
[[package]]
name = "wasm-bindgen-futures"
version = "0.4.58"
version = "0.4.64"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "70a6e77fd0ae8029c9ea0063f87c46fde723e7d887703d74ad2616d792e51e6f"
checksum = "e9c5522b3a28661442748e09d40924dfb9ca614b21c00d3fd135720e48b67db8"
dependencies = [
"cfg-if",
"futures-util",
@ -3896,9 +3896,9 @@ dependencies = [
[[package]]
name = "wasm-bindgen-macro"
version = "0.2.108"
version = "0.2.114"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "008b239d9c740232e71bd39e8ef6429d27097518b6b30bdf9086833bd5b6d608"
checksum = "18a2d50fcf105fb33bb15f00e7a77b772945a2ee45dcf454961fd843e74c18e6"
dependencies = [
"quote",
"wasm-bindgen-macro-support",
@ -3906,9 +3906,9 @@ dependencies = [
[[package]]
name = "wasm-bindgen-macro-support"
version = "0.2.108"
version = "0.2.114"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5256bae2d58f54820e6490f9839c49780dff84c65aeab9e772f15d5f0e913a55"
checksum = "03ce4caeaac547cdf713d280eda22a730824dd11e6b8c3ca9e42247b25c631e3"
dependencies = [
"bumpalo",
"proc-macro2",
@ -3919,9 +3919,9 @@ dependencies = [
[[package]]
name = "wasm-bindgen-shared"
version = "0.2.108"
version = "0.2.114"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1f01b580c9ac74c8d8f0c0e4afb04eeef2acf145458e52c03845ee9cd23e3d12"
checksum = "75a326b8c223ee17883a4251907455a2431acc2791c98c26279376490c378c16"
dependencies = [
"unicode-ident",
]
@ -3975,9 +3975,9 @@ dependencies = [
[[package]]
name = "web-sys"
version = "0.3.85"
version = "0.3.91"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "312e32e551d92129218ea9a2452120f4aabc03529ef03e4d0d82fb2780608598"
checksum = "854ba17bb104abfb26ba36da9729addc7ce7f06f5c0f90f3c391f8461cca21f9"
dependencies = [
"js-sys",
"wasm-bindgen",
@ -4554,18 +4554,18 @@ dependencies = [
[[package]]
name = "zerocopy"
version = "0.8.39"
version = "0.8.40"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "db6d35d663eadb6c932438e763b262fe1a70987f9ae936e60158176d710cae4a"
checksum = "a789c6e490b576db9f7e6b6d661bcc9799f7c0ac8352f56ea20193b2681532e5"
dependencies = [
"zerocopy-derive",
]
[[package]]
name = "zerocopy-derive"
version = "0.8.39"
version = "0.8.40"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4122cd3169e94605190e77839c9a40d40ed048d305bfdc146e7df40ab0f3e517"
checksum = "f65c489a7071a749c849713807783f70672b28094011623e200cb86dcb835953"
dependencies = [
"proc-macro2",
"quote",

View file

@ -1,5 +1,5 @@
[package]
name = "agent"
name = "arc-agent"
edition.workspace = true
version.workspace = true
license.workspace = true
@ -17,7 +17,7 @@ docker = ["bollard", "tar"]
doctest = false
[[bin]]
name = "agent"
name = "arc-agent"
path = "src/main.rs"
test = false
@ -25,9 +25,9 @@ test = false
clap.workspace = true
anyhow.workspace = true
dotenvy.workspace = true
llm = { path = "../llm" }
mcp = { path = "../mcp" }
util = { path = "../util" }
arc-llm = { path = "../arc-llm" }
arc-mcp = { path = "../arc-mcp" }
arc-util = { path = "../arc-util" }
thiserror.workspace = true
serde.workspace = true
serde_json.workspace = true

View file

@ -4,16 +4,16 @@ use crate::{
subagent::{SessionFactory, SubAgentManager},
};
use clap::{Parser, ValueEnum};
use llm::client::Client;
use llm::provider::{ModelId, Provider};
use arc_llm::client::Client;
use arc_llm::provider::{ModelId, Provider};
use std::io::{IsTerminal, Write};
use std::path::PathBuf;
use std::sync::{Arc, Mutex};
use util::terminal::Styles;
use arc_util::terminal::Styles;
/// Minimal CLI for the agent agentic loop.
#[derive(Parser)]
#[command(name = "agent")]
#[command(name = "arc-agent")]
struct Cli {
/// Task prompt
prompt: String,
@ -254,12 +254,12 @@ struct DebugMiddleware {
}
#[async_trait::async_trait]
impl llm::middleware::Middleware for DebugMiddleware {
impl arc_llm::middleware::Middleware for DebugMiddleware {
async fn handle_complete(
&self,
request: llm::types::Request,
next: llm::middleware::NextFn,
) -> Result<llm::types::Response, llm::error::SdkError> {
request: arc_llm::types::Request,
next: arc_llm::middleware::NextFn,
) -> Result<arc_llm::types::Response, arc_llm::error::SdkError> {
let s = self.styles;
eprintln!(
"{}[debug] request: model={} messages={} tools={}{}",
@ -285,9 +285,9 @@ impl llm::middleware::Middleware for DebugMiddleware {
async fn handle_stream(
&self,
request: llm::types::Request,
next: llm::middleware::NextStreamFn,
) -> Result<llm::provider::StreamEventStream, llm::error::SdkError> {
request: arc_llm::types::Request,
next: arc_llm::middleware::NextStreamFn,
) -> Result<arc_llm::provider::StreamEventStream, arc_llm::error::SdkError> {
next(request).await
}
}
@ -298,12 +298,12 @@ struct VerboseMiddleware {
}
#[async_trait::async_trait]
impl llm::middleware::Middleware for VerboseMiddleware {
impl arc_llm::middleware::Middleware for VerboseMiddleware {
async fn handle_complete(
&self,
request: llm::types::Request,
next: llm::middleware::NextFn,
) -> Result<llm::types::Response, llm::error::SdkError> {
request: arc_llm::types::Request,
next: arc_llm::middleware::NextFn,
) -> Result<arc_llm::types::Response, arc_llm::error::SdkError> {
let s = self.styles;
eprintln!(
"{}[verbose] request:{}\n{}",
@ -323,9 +323,9 @@ impl llm::middleware::Middleware for VerboseMiddleware {
async fn handle_stream(
&self,
request: llm::types::Request,
next: llm::middleware::NextStreamFn,
) -> Result<llm::provider::StreamEventStream, llm::error::SdkError> {
request: arc_llm::types::Request,
next: arc_llm::middleware::NextStreamFn,
) -> Result<arc_llm::provider::StreamEventStream, arc_llm::error::SdkError> {
next(request).await
}
}
@ -542,7 +542,7 @@ pub async fn run() -> anyhow::Result<()> {
#[cfg(test)]
mod tests {
use super::*;
use llm::provider::Provider;
use arc_llm::provider::Provider;
use serde_json::json;
static NO_COLOR: Styles = Styles::new(false);

View file

@ -4,8 +4,8 @@ use crate::file_tracker::FileTracker;
use crate::history::History;
use crate::provider_profile::ProviderProfile;
use crate::types::{AgentEvent, Turn};
use llm::client::Client;
use llm::types::{Message, Request};
use arc_llm::client::Client;
use arc_llm::types::{Message, Request};
/// Check whether the context window usage exceeds the configured threshold.
/// Emits a `ContextWindowWarning` event when over the threshold.
@ -227,7 +227,7 @@ mod tests {
use crate::event::EventEmitter;
use crate::history::History;
use crate::types::Turn;
use llm::types::{ToolCall, ToolResult, Usage};
use arc_llm::types::{ToolCall, ToolResult, Usage};
use std::time::SystemTime;
#[test]

View file

@ -1,7 +1,7 @@
use std::collections::HashMap;
use std::sync::Arc;
use mcp::config::McpServerConfig;
use arc_mcp::config::McpServerConfig;
/// Callback invoked before each tool execution. Return `Ok(())` to allow,
/// `Err(message)` to deny with the given message.

View file

@ -14,7 +14,7 @@ use std::time::Instant;
/// Configuration for a Docker-based execution environment.
pub struct DockerConfig {
/// Docker image to use. Default: `"attractor-agent:latest"`.
/// Docker image to use. Default: `"arc-agent:latest"`.
pub image: String,
/// Host directory to bind-mount into the container.
pub host_working_directory: String,
@ -37,7 +37,7 @@ pub struct DockerConfig {
impl Default for DockerConfig {
fn default() -> Self {
Self {
image: "attractor-agent:latest".to_string(),
image: "arc-agent:latest".to_string(),
host_working_directory: String::new(),
container_mount_point: "/workspace".to_string(),
network_mode: Some("bridge".to_string()),

View file

@ -1,4 +1,4 @@
use llm::error::SdkError;
use arc_llm::error::SdkError;
#[derive(Debug, thiserror::Error)]
pub enum AgentError {

View file

@ -1,5 +1,5 @@
use std::collections::BTreeMap;
use llm::types::{ToolCall, ToolResult};
use arc_llm::types::{ToolCall, ToolResult};
#[derive(Debug, Clone, Copy, Default)]
struct FileOps {

View file

@ -1,5 +1,5 @@
use crate::types::Turn;
use llm::types::{ContentPart, Message, Role};
use arc_llm::types::{ContentPart, Message, Role};
#[derive(Debug, Clone, Default)]
pub struct History {
@ -89,7 +89,7 @@ impl History {
mod tests {
use super::*;
use std::time::SystemTime;
use llm::types::{ToolCall, ToolResult, Usage};
use arc_llm::types::{ToolCall, ToolResult, Usage};
#[test]
fn compact_replaces_old_turns_with_summary() {
@ -212,7 +212,7 @@ mod tests {
#[test]
fn assistant_turn_with_reasoning_in_provider_parts() {
let mut history = History::default();
let thinking = ContentPart::Thinking(llm::types::ThinkingData {
let thinking = ContentPart::Thinking(arc_llm::types::ThinkingData {
text: "Let me think about this...".into(),
signature: None,
redacted: false,
@ -237,7 +237,7 @@ mod tests {
#[test]
fn thinking_with_signature_preserved_via_provider_parts() {
let mut history = History::default();
let thinking = ContentPart::Thinking(llm::types::ThinkingData {
let thinking = ContentPart::Thinking(arc_llm::types::ThinkingData {
text: "Let me think...".into(),
signature: Some("sig_abc123".into()),
redacted: false,
@ -362,7 +362,7 @@ mod tests {
"shell",
serde_json::json!({"cmd": "ls"}),
)],
provider_parts: vec![ContentPart::Thinking(llm::types::ThinkingData {
provider_parts: vec![ContentPart::Thinking(arc_llm::types::ThinkingData {
text: "thinking...".into(),
signature: None,
redacted: false,

View file

@ -27,7 +27,7 @@ pub mod v4a_patch;
pub mod types;
pub use config::{SessionConfig, ToolApprovalFn};
pub use mcp::config::McpServerConfig;
pub use arc_mcp::config::McpServerConfig;
pub use error::AgentError;
pub use event::EventEmitter;
pub use execution_env::{format_lines_numbered, DirEntry, ExecEnvEventCallback, ExecResult, ExecutionEnvEvent, ExecutionEnvironment, GrepOptions};

View file

@ -95,7 +95,7 @@ fn is_repeating_pattern(signatures: &[u64], pattern_len: usize) -> bool {
mod tests {
use super::*;
use std::time::SystemTime;
use llm::types::{ToolCall, Usage};
use arc_llm::types::{ToolCall, Usage};
fn assistant_with_tool(name: &str, args: serde_json::Value) -> Turn {
Turn::Assistant {

View file

@ -2,7 +2,7 @@ use std::process::ExitCode;
#[tokio::main]
async fn main() -> ExitCode {
match agent::cli::run().await {
match arc_agent::cli::run().await {
Ok(()) => ExitCode::SUCCESS,
Err(e) => {
eprintln!("[error] {e}");

View file

@ -1,7 +1,7 @@
use std::sync::Arc;
use llm::types::ToolDefinition;
use mcp::connection_manager::{McpConnectionManager, call_result_to_string};
use arc_llm::types::ToolDefinition;
use arc_mcp::connection_manager::{McpConnectionManager, call_result_to_string};
use crate::tool_registry::RegisteredTool;
@ -43,11 +43,11 @@ mod tests {
use super::*;
use std::collections::HashMap;
use mcp::config::{McpServerConfig, McpTransport};
use arc_mcp::config::{McpServerConfig, McpTransport};
fn test_server_config() -> McpServerConfig {
let test_server = format!(
"{}/../mcp/tests/test_mcp_server.py",
"{}/../arc-mcp/tests/test_mcp_server.py",
env!("CARGO_MANIFEST_DIR")
);
McpServerConfig {

View file

@ -6,7 +6,7 @@ use crate::provider_profile::{ProfileCapabilities, ProviderProfile};
use crate::skills::Skill;
use crate::tool_registry::ToolRegistry;
use crate::tools::{make_edit_file_tool, register_core_tools, WebFetchSummarizer};
use llm::provider::Provider;
use arc_llm::provider::Provider;
use super::EnvContext;

View file

@ -9,7 +9,7 @@ use crate::tools::{
make_edit_file_tool, make_list_dir_tool, make_read_many_files_tool, register_core_tools,
WebFetchSummarizer,
};
use llm::provider::Provider;
use arc_llm::provider::Provider;
use super::EnvContext;

View file

@ -9,7 +9,7 @@ pub use openai::OpenAiProfile;
use crate::execution_env::ExecutionEnvironment;
use crate::skills::{format_skills_prompt_section, Skill};
use crate::tool_registry::ToolRegistry;
use llm::provider::Provider;
use arc_llm::provider::Provider;
/// Common fields shared by all provider profiles.
///

View file

@ -7,7 +7,7 @@ use crate::skills::Skill;
use crate::tool_registry::ToolRegistry;
use crate::tools::{register_core_tools, WebFetchSummarizer};
use crate::v4a_patch::make_apply_patch_tool;
use llm::provider::Provider;
use arc_llm::provider::Provider;
use super::EnvContext;

View file

@ -1,5 +1,5 @@
use crate::execution_env::ExecutionEnvironment;
use llm::provider::Provider;
use arc_llm::provider::Provider;
const BUDGET_BYTES: usize = 32768;

View file

@ -7,8 +7,8 @@ use crate::subagent::{
};
use crate::tool_registry::ToolRegistry;
use std::sync::Arc;
use llm::provider::Provider;
use llm::types::ToolDefinition;
use arc_llm::provider::Provider;
use arc_llm::types::ToolDefinition;
/// Static capabilities of a provider profile.
pub struct ProfileCapabilities {
@ -82,7 +82,7 @@ pub trait ProviderProfile: Send + Sync {
mod tests {
use super::*;
use crate::test_support::{MockExecutionEnvironment, TestProfile};
use llm::provider::Provider;
use arc_llm::provider::Provider;
#[test]
fn profile_provider_and_model() {

View file

@ -14,10 +14,10 @@ use std::collections::VecDeque;
use std::sync::{Arc, Mutex};
use std::time::SystemTime;
use futures::StreamExt;
use llm::client::Client;
use llm::error::{ProviderErrorKind, SdkError};
use llm::generate::StreamAccumulator;
use llm::types::{Message, Request, StreamEvent, ToolChoice};
use arc_llm::client::Client;
use arc_llm::error::{ProviderErrorKind, SdkError};
use arc_llm::generate::StreamAccumulator;
use arc_llm::types::{Message, Request, StreamEvent, ToolChoice};
use tokio_util::sync::CancellationToken;
pub struct Session {
@ -106,7 +106,7 @@ impl Session {
// Start MCP servers and register their tools
if !self.config.mcp_servers.is_empty() {
let mut manager = mcp::connection_manager::McpConnectionManager::new();
let mut manager = arc_mcp::connection_manager::McpConnectionManager::new();
let results = manager.start_servers(&self.config.mcp_servers).await;
for (server_name, result) in &results {
@ -373,7 +373,7 @@ impl Session {
let retry_session_id = self.id.clone();
let retry_provider = self.provider_profile.provider().as_str().to_string();
let retry_model = self.provider_profile.model().to_string();
let retry_policy = llm::types::RetryPolicy {
let retry_policy = arc_llm::types::RetryPolicy {
max_retries: 3,
on_retry: Some(std::sync::Arc::new(move |err, attempt, delay| {
retry_emitter.emit(
@ -390,7 +390,7 @@ impl Session {
..Default::default()
};
let client = self.llm_client.clone();
let stream_result = llm::retry::retry(&retry_policy, || {
let stream_result = arc_llm::retry::retry(&retry_policy, || {
let c = client.clone();
let r = request.clone();
async move { c.stream(&r).await }
@ -468,8 +468,8 @@ impl Session {
.filter(|p| {
matches!(
p,
llm::types::ContentPart::Other { .. }
| llm::types::ContentPart::Thinking(_)
arc_llm::types::ContentPart::Other { .. }
| arc_llm::types::ContentPart::Thinking(_)
)
})
.cloned()
@ -622,7 +622,7 @@ impl Session {
response_format: None,
temperature: None,
top_p: None,
max_tokens: llm::catalog::get_model_info(self.provider_profile.model())
max_tokens: arc_llm::catalog::get_model_info(self.provider_profile.model())
.and_then(|m| m.max_output),
stop_sequences: None,
reasoning_effort: self.config.reasoning_effort.clone(),
@ -645,9 +645,9 @@ mod tests {
use super::*;
use crate::test_support::*;
use crate::tool_registry::{RegisteredTool, ToolRegistry};
use llm::error::ProviderErrorDetail;
use llm::provider::{ProviderAdapter, StreamEventStream};
use llm::types::{Response, ToolDefinition};
use arc_llm::error::ProviderErrorDetail;
use arc_llm::provider::{ProviderAdapter, StreamEventStream};
use arc_llm::types::{Response, ToolDefinition};
use std::sync::atomic::{AtomicUsize, Ordering};
// --- Tests ---
@ -1681,7 +1681,7 @@ mod tests {
events.push(Ok(StreamEvent::text_delta(text, None)));
}
for part in &response.message.content {
if let llm::types::ContentPart::ToolCall(tc) = part {
if let arc_llm::types::ContentPart::ToolCall(tc) = part {
events.push(Ok(StreamEvent::ToolCallEnd { tool_call: tc.clone() }));
}
}
@ -1732,7 +1732,7 @@ mod tests {
#[tokio::test]
async fn compaction_includes_structured_prompt_and_file_tracking() {
use crate::tool_registry::RegisteredTool;
use llm::types::ToolDefinition;
use arc_llm::types::ToolDefinition;
// Provider that captures complete() requests (compaction) while returning
// canned responses for stream() calls.
@ -1852,10 +1852,10 @@ mod tests {
#[tokio::test]
async fn mcp_end_to_end_tool_call() {
use std::collections::HashMap;
use mcp::config::{McpServerConfig, McpTransport};
use arc_mcp::config::{McpServerConfig, McpTransport};
let test_server = format!(
"{}/../mcp/tests/test_mcp_server.py",
"{}/../arc-mcp/tests/test_mcp_server.py",
env!("CARGO_MANIFEST_DIR")
);
let config = SessionConfig {

View file

@ -1,7 +1,7 @@
use crate::execution_env::ExecutionEnvironment;
use crate::tool_registry::RegisteredTool;
use crate::tools::required_str;
use llm::types::ToolDefinition;
use arc_llm::types::ToolDefinition;
use std::sync::Arc;
#[derive(Debug, Clone)]

View file

@ -5,7 +5,7 @@ use crate::tools::required_str;
use crate::types::{AgentEvent, Turn};
use std::collections::{HashMap, VecDeque};
use std::sync::{Arc, Mutex};
use llm::types::ToolDefinition;
use arc_llm::types::ToolDefinition;
use tokio_util::sync::CancellationToken;
pub type SessionFactory = Arc<dyn Fn() -> Session + Send + Sync>;

View file

@ -9,10 +9,10 @@ use async_trait::async_trait;
use std::collections::HashMap;
use std::sync::atomic::{AtomicUsize, Ordering};
use std::sync::{Arc, Mutex};
use llm::client::Client;
use llm::error::SdkError;
use llm::provider::{Provider, ProviderAdapter, StreamEventStream};
use llm::types::{ContentPart, FinishReason, Message, Request, Response, StreamEvent, Usage};
use arc_llm::client::Client;
use arc_llm::error::SdkError;
use arc_llm::provider::{Provider, ProviderAdapter, StreamEventStream};
use arc_llm::types::{ContentPart, FinishReason, Message, Request, Response, StreamEvent, Usage};
use tokio_util::sync::CancellationToken;
// --- MockExecutionEnvironment ---
@ -541,7 +541,7 @@ pub fn tool_call_response(
tool_call_id: &str,
args: serde_json::Value,
) -> Response {
use llm::types::{ContentPart, Role, ToolCall};
use arc_llm::types::{ContentPart, Role, ToolCall};
Response {
id: format!("resp_{tool_call_id}"),
model: "mock-model".into(),
@ -569,7 +569,7 @@ pub fn tool_call_response(
}
pub fn make_echo_tool() -> crate::tool_registry::RegisteredTool {
use llm::types::ToolDefinition;
use arc_llm::types::ToolDefinition;
crate::tool_registry::RegisteredTool {
definition: ToolDefinition {
name: "echo".into(),
@ -589,7 +589,7 @@ pub fn make_echo_tool() -> crate::tool_registry::RegisteredTool {
}
pub fn make_error_tool() -> crate::tool_registry::RegisteredTool {
use llm::types::ToolDefinition;
use arc_llm::types::ToolDefinition;
crate::tool_registry::RegisteredTool {
definition: ToolDefinition {
name: "fail_tool".into(),
@ -691,7 +691,7 @@ impl ProviderAdapter for MockMidStreamErrorProvider {
pub fn multi_tool_call_response(
calls: Vec<(&str, &str, serde_json::Value)>,
) -> Response {
use llm::types::{ContentPart, Role, ToolCall};
use arc_llm::types::{ContentPart, Role, ToolCall};
let mut content = vec![ContentPart::text("Let me use multiple tools.")];
for (tool_name, tool_call_id, args) in &calls {
content.push(ContentPart::ToolCall(ToolCall::new(

View file

@ -4,14 +4,14 @@ use crate::execution_env::ExecutionEnvironment;
use crate::tool_registry::ToolRegistry;
use crate::truncation::truncate_tool_output;
use crate::types::AgentEvent;
use llm::types::ToolResult;
use arc_llm::types::ToolResult;
use std::sync::Arc;
use tokio_util::sync::CancellationToken;
/// Execute tool calls, choosing parallel or sequential based on `parallel` flag.
#[allow(clippy::too_many_arguments)]
pub async fn execute_tool_calls(
tool_calls: &[llm::types::ToolCall],
tool_calls: &[arc_llm::types::ToolCall],
parallel: bool,
registry: &ToolRegistry,
env: Arc<dyn ExecutionEnvironment>,
@ -36,7 +36,7 @@ pub async fn execute_tool_calls(
#[allow(clippy::too_many_arguments)]
async fn execute_tool_calls_sequential(
tool_calls: &[llm::types::ToolCall],
tool_calls: &[arc_llm::types::ToolCall],
registry: &ToolRegistry,
env: Arc<dyn ExecutionEnvironment>,
tool_approval: Option<&ToolApprovalFn>,
@ -70,7 +70,7 @@ async fn execute_tool_calls_sequential(
#[allow(clippy::too_many_arguments)]
async fn execute_tool_calls_parallel(
tool_calls: &[llm::types::ToolCall],
tool_calls: &[arc_llm::types::ToolCall],
registry: &ToolRegistry,
env: Arc<dyn ExecutionEnvironment>,
tool_approval: Option<&ToolApprovalFn>,
@ -113,7 +113,7 @@ async fn execute_tool_calls_parallel(
/// Execute a single tool call with event emission and output truncation.
#[allow(clippy::too_many_arguments)]
pub async fn execute_and_emit_one_tool(
tc: &llm::types::ToolCall,
tc: &arc_llm::types::ToolCall,
registry: &ToolRegistry,
env: Arc<dyn ExecutionEnvironment>,
tool_approval: Option<&ToolApprovalFn>,
@ -138,7 +138,7 @@ pub async fn execute_and_emit_one_tool(
/// Execute a single tool call with event emission, using a pre-looked-up tool reference.
#[allow(clippy::too_many_arguments)]
async fn execute_and_emit_one_tool_with_lookup(
tc: &llm::types::ToolCall,
tc: &arc_llm::types::ToolCall,
registered_tool: Option<&crate::tool_registry::RegisteredTool>,
env: Arc<dyn ExecutionEnvironment>,
tool_approval: Option<&ToolApprovalFn>,

View file

@ -3,7 +3,7 @@ use std::collections::HashMap;
use std::future::Future;
use std::pin::Pin;
use std::sync::Arc;
use llm::types::ToolDefinition;
use arc_llm::types::ToolDefinition;
use tokio_util::sync::CancellationToken;
pub struct ToolContext {

View file

@ -1,9 +1,9 @@
use crate::config::SessionConfig;
use crate::execution_env::GrepOptions;
use crate::tool_registry::RegisteredTool;
use llm::client::Client;
use llm::provider::ModelId;
use llm::types::{Message, Request, ToolDefinition};
use arc_llm::client::Client;
use arc_llm::provider::ModelId;
use arc_llm::types::{Message, Request, ToolDefinition};
use std::borrow::Cow;
use std::fmt::Write;
use std::sync::Arc;
@ -507,7 +507,7 @@ pub(crate) fn make_web_fetch_tool(summarizer: Option<WebFetchSummarizer>) -> Reg
let timeout_secs = timeout_ms.div_ceil(1000);
let escaped_url = shell_escape::escape(Cow::Borrowed(url));
let command = format!(
"curl -sL --max-time {timeout_secs} -H 'User-Agent: attractor-agent/0.1' {escaped_url}"
"curl -sL --max-time {timeout_secs} -H 'User-Agent: arc-agent/0.1' {escaped_url}"
);
let result = ctx.env
@ -881,7 +881,7 @@ mod tests {
let cmd = env.captured_command.lock().unwrap().clone().unwrap();
assert!(cmd.starts_with("curl -sL --max-time 30 "), "command should start with curl flags, got: {cmd}");
assert!(cmd.contains("https://example.com"), "command should contain the URL");
assert!(cmd.contains("User-Agent: attractor-agent/0.1"), "command should set user agent");
assert!(cmd.contains("User-Agent: arc-agent/0.1"), "command should set user agent");
}
#[tokio::test]
@ -984,7 +984,7 @@ mod tests {
let client = make_client(provider).await;
let summarizer = WebFetchSummarizer {
client,
model_id: ModelId::new(llm::provider::Provider::Anthropic, "mock-model"),
model_id: ModelId::new(arc_llm::provider::Provider::Anthropic, "mock-model"),
};
let tool = make_web_fetch_tool(Some(summarizer));
@ -1033,10 +1033,10 @@ mod tests {
#[tokio::test]
async fn web_fetch_summarizer_routes_to_specified_provider() {
use crate::test_support::{MockErrorProvider, MockLlmProvider, text_response};
use llm::error::{ProviderErrorDetail, ProviderErrorKind, SdkError};
use arc_llm::error::{ProviderErrorDetail, ProviderErrorKind, SdkError};
// "other_provider" is the default — it rejects all requests.
let default_provider: Arc<dyn llm::provider::ProviderAdapter> = Arc::new(
let default_provider: Arc<dyn arc_llm::provider::ProviderAdapter> = Arc::new(
MockErrorProvider {
error: SdkError::Provider {
kind: ProviderErrorKind::NotFound,
@ -1047,7 +1047,7 @@ mod tests {
},
);
// "anthropic" provider has the model we actually want.
let target_provider: Arc<dyn llm::provider::ProviderAdapter> = Arc::new(
let target_provider: Arc<dyn arc_llm::provider::ProviderAdapter> = Arc::new(
MockLlmProvider::new(vec![text_response("summarized content")]),
);
@ -1059,7 +1059,7 @@ mod tests {
let summarizer = WebFetchSummarizer {
client,
model_id: ModelId::new(llm::provider::Provider::Anthropic, "target-model"),
model_id: ModelId::new(arc_llm::provider::Provider::Anthropic, "target-model"),
};
let tool = make_web_fetch_tool(Some(summarizer));

View file

@ -1,5 +1,5 @@
use std::time::SystemTime;
use llm::types::{ContentPart, ThinkingData, ToolCall, ToolResult, Usage};
use arc_llm::types::{ContentPart, ThinkingData, ToolCall, ToolResult, Usage};
use serde::{Deserialize, Serialize};
mod system_time_iso8601 {

View file

@ -1,6 +1,6 @@
use crate::execution_env::ExecutionEnvironment;
use crate::tool_registry::RegisteredTool;
use llm::types::ToolDefinition;
use arc_llm::types::ToolDefinition;
use std::sync::Arc;
#[derive(Debug, Clone, PartialEq, Eq)]

View file

@ -2,7 +2,7 @@ use std::process::Command;
#[test]
fn no_args_prints_usage() {
let output = Command::new(env!("CARGO_BIN_EXE_agent"))
let output = Command::new(env!("CARGO_BIN_EXE_arc-agent"))
.env_clear()
.output()
.expect("failed to execute");
@ -17,7 +17,7 @@ fn no_args_prints_usage() {
#[test]
fn help_flag_prints_help() {
let output = Command::new(env!("CARGO_BIN_EXE_agent"))
let output = Command::new(env!("CARGO_BIN_EXE_arc-agent"))
.env_clear()
.arg("--help")
.output()
@ -34,7 +34,7 @@ fn help_flag_prints_help() {
#[test]
fn missing_api_key_exits_with_error() {
let tmp = std::env::temp_dir();
let output = Command::new(env!("CARGO_BIN_EXE_agent"))
let output = Command::new(env!("CARGO_BIN_EXE_arc-agent"))
.env_clear()
.current_dir(&tmp)
.arg("test prompt")
@ -51,7 +51,7 @@ fn missing_api_key_exits_with_error() {
#[test]
fn invalid_permissions_value() {
let output = Command::new(env!("CARGO_BIN_EXE_agent"))
let output = Command::new(env!("CARGO_BIN_EXE_arc-agent"))
.env_clear()
.args(["--permissions", "bogus", "test prompt"])
.output()

View file

@ -1,12 +1,12 @@
use std::path::Path;
use std::sync::Arc;
use agent::{
use arc_agent::{
AnthropicProfile, GeminiProfile, LocalExecutionEnvironment, OpenAiProfile, ProviderProfile,
Session, SessionConfig, SubAgentManager, WebFetchSummarizer,
};
use llm::client::Client;
use llm::provider::{ModelId, Provider};
use arc_llm::client::Client;
use arc_llm::provider::{ModelId, Provider};
fn summarizer_model_id(provider: Provider) -> ModelId {
match provider {
@ -50,7 +50,7 @@ async fn make_session(provider: Provider, model: &str, cwd: &Path) -> Session {
let factory_client = client.clone();
let factory_model: String = model.to_string();
let factory_cwd = cwd.to_path_buf();
let factory: agent::subagent::SessionFactory = Arc::new(move || {
let factory: arc_agent::subagent::SessionFactory = Arc::new(move || {
let sub_profile: Arc<dyn ProviderProfile> = {
let summarizer = Some(build_summarizer(provider, &factory_client));
match provider {

View file

@ -1,5 +1,5 @@
[package]
name = "attractor"
name = "arc-attractor"
edition.workspace = true
version.workspace = true
license.workspace = true
@ -13,7 +13,7 @@ readme = "README.md"
doctest = false
[[bin]]
name = "attractor"
name = "arc-attractor"
path = "src/main.rs"
test = false
@ -25,9 +25,9 @@ server = ["axum", "tower", "tokio-stream"]
clap.workspace = true
anyhow.workspace = true
dotenvy.workspace = true
agent = { path = "../agent" }
util = { path = "../util" }
llm = { path = "../llm" }
arc-agent = { path = "../arc-agent" }
arc-util = { path = "../arc-util" }
arc-llm = { path = "../arc-llm" }
thiserror.workspace = true
serde.workspace = true
serde_json.workspace = true

View file

@ -6,7 +6,7 @@ use chrono::{DateTime, Utc};
use serde::{Deserialize, Serialize};
use serde_json::Value;
use agent::ExecutionEnvironment;
use arc_agent::ExecutionEnvironment;
use crate::error::{AttractorError, Result};
@ -531,7 +531,7 @@ mod tests {
Ok(self.accessible)
}
async fn list_directory(&self, _path: &str, _depth: Option<usize>) -> std::result::Result<Vec<agent::DirEntry>, String> {
async fn list_directory(&self, _path: &str, _depth: Option<usize>) -> std::result::Result<Vec<arc_agent::DirEntry>, String> {
Err("not implemented".to_string())
}
@ -542,11 +542,11 @@ mod tests {
_working_dir: Option<&str>,
_env_vars: Option<&std::collections::HashMap<String, String>>,
_cancel_token: Option<tokio_util::sync::CancellationToken>,
) -> std::result::Result<agent::ExecResult, String> {
) -> std::result::Result<arc_agent::ExecResult, String> {
Err("not implemented".to_string())
}
async fn grep(&self, _pattern: &str, _path: &str, _options: &agent::GrepOptions) -> std::result::Result<Vec<String>, String> {
async fn grep(&self, _pattern: &str, _path: &str, _options: &arc_agent::GrepOptions) -> std::result::Result<Vec<String>, String> {
Err("not implemented".to_string())
}

View file

@ -3,14 +3,14 @@ use std::sync::{Arc, Mutex};
use async_trait::async_trait;
use agent::{
use arc_agent::{
AgentEvent, AnthropicProfile, ExecutionEnvironment, GeminiProfile, OpenAiProfile,
ProviderProfile, Session, SessionConfig, Turn,
subagent::{SessionFactory, SubAgentManager},
};
use llm::client::Client;
use llm::provider::Provider;
use util::terminal::Styles;
use arc_llm::client::Client;
use arc_llm::provider::Provider;
use arc_util::terminal::Styles;
use crate::context::Context;
use crate::error::AttractorError;
@ -131,11 +131,11 @@ impl CodergenBackend for AgentBackend {
.map(String::from)
.or_else(|| Some(self.provider.as_str().to_string()));
let max_tokens = llm::catalog::get_model_info(model).and_then(|m| m.max_output);
let max_tokens = arc_llm::catalog::get_model_info(model).and_then(|m| m.max_output);
let request = llm::types::Request {
let request = arc_llm::types::Request {
model: model.to_string(),
messages: vec![llm::types::Message::user(prompt)],
messages: vec![arc_llm::types::Message::user(prompt)],
provider,
reasoning_effort: Some(node.reasoning_effort().to_string()),
tools: None,
@ -352,7 +352,7 @@ impl CodergenBackend for AgentBackend {
// Aggregate token usage only from new turns (prevents double-counting on reuse).
let (mut turn_count, mut tool_call_count) = (0usize, 0usize);
let mut total_usage = llm::types::Usage::default();
let mut total_usage = arc_llm::types::Usage::default();
for turn in &session.history().turns()[turns_before..] {
if let Turn::Assistant {
tool_calls, usage, ..
@ -457,7 +457,7 @@ fn format_tool_args(args: &serde_json::Value) -> String {
#[cfg(test)]
mod tests {
use super::*;
use agent::subagent::SessionFactory;
use arc_agent::subagent::SessionFactory;
#[test]
fn agent_backend_stores_config() {

View file

@ -1,9 +1,9 @@
use std::path::Path;
use std::sync::Arc;
use agent::ExecutionEnvironment;
use arc_agent::ExecutionEnvironment;
use async_trait::async_trait;
use llm::provider::Provider;
use arc_llm::provider::Provider;
use crate::context::Context;
use crate::error::AttractorError;

View file

@ -12,9 +12,9 @@ use clap::{Args, Parser, Subcommand, ValueEnum};
use std::fmt;
use std::path::PathBuf;
use std::str::FromStr;
use util::terminal::Styles;
use arc_util::terminal::Styles;
use agent::AgentEvent;
use arc_agent::AgentEvent;
use crate::event::PipelineEvent;
use crate::outcome::StageUsage;
use crate::validation::{Diagnostic, Severity};
@ -55,7 +55,7 @@ impl FromStr for ExecutionEnvKind {
}
#[derive(Parser)]
#[command(name = "attractor", version, about = "DOT-based pipeline runner for AI workflows")]
#[command(name = "arc-attractor", version, about = "DOT-based pipeline runner for AI workflows")]
pub struct Cli {
#[command(subcommand)]
pub command: Command,
@ -444,7 +444,7 @@ pub fn format_event_summary(event: &PipelineEvent, styles: &Styles) -> String {
format!("[SUBGRAPH_COMPLETED] node={node_id} steps={steps_executed} status={status} duration={duration_ms}ms")
}
PipelineEvent::ExecutionEnv { event } => {
use agent::ExecutionEnvEvent;
use arc_agent::ExecutionEnvEvent;
match event {
ExecutionEnvEvent::Initializing { env_type } => format!("[EXEC_ENV_INITIALIZING] env_type={env_type}"),
ExecutionEnvEvent::Ready { env_type, duration_ms } => format!("[EXEC_ENV_READY] env_type={env_type} duration={duration_ms}ms"),
@ -750,7 +750,7 @@ pub fn format_event_detail(event: &PipelineEvent, styles: &Styles) -> String {
format!("{d}── SUBGRAPH_COMPLETED ───────────────────────{r}\n {d}node_id:{r} {node_id}\n {d}steps_executed:{r} {steps_executed}\n {d}status:{r} {status}\n {d}duration_ms:{r} {duration_ms}\n")
}
PipelineEvent::ExecutionEnv { event } => {
use agent::ExecutionEnvEvent;
use arc_agent::ExecutionEnvEvent;
match event {
ExecutionEnvEvent::Initializing { env_type } => {
format!("{d}── EXEC_ENV_INITIALIZING ────────────────────{r}\n {d}env_type:{r} {env_type}\n")
@ -821,7 +821,7 @@ pub fn format_event_detail(event: &PipelineEvent, styles: &Styles) -> String {
/// Compute the dollar cost for a stage's token usage, if pricing is available.
#[must_use]
pub fn compute_stage_cost(usage: &StageUsage) -> Option<f64> {
let info = llm::catalog::get_model_info(&usage.model)?;
let info = arc_llm::catalog::get_model_info(&usage.model)?;
let input_rate = info.input_cost_per_million?;
let output_rate = info.output_cost_per_million?;
Some(usage.input_tokens as f64 * input_rate / 1_000_000.0
@ -876,7 +876,7 @@ mod tests {
#[test]
fn format_summary_execution_env_initializing() {
let event = PipelineEvent::ExecutionEnv {
event: agent::ExecutionEnvEvent::Initializing { env_type: "docker".into() },
event: arc_agent::ExecutionEnvEvent::Initializing { env_type: "docker".into() },
};
let s = format_event_summary(&event, test_styles());
assert!(s.contains("[EXEC_ENV_INITIALIZING]"));
@ -894,7 +894,7 @@ mod tests {
#[test]
fn format_detail_execution_env_ready() {
let event = PipelineEvent::ExecutionEnv {
event: agent::ExecutionEnvEvent::Ready { env_type: "local".into(), duration_ms: 42 },
event: arc_agent::ExecutionEnvEvent::Ready { env_type: "local".into(), duration_ms: 42 },
};
let s = format_event_detail(&event, test_styles());
assert!(s.contains("EXEC_ENV_READY"));

View file

@ -2,10 +2,10 @@ use std::path::PathBuf;
use std::sync::{Arc, Mutex};
use std::time::Instant;
use agent::{DockerConfig, DockerExecutionEnvironment, ExecutionEnvironment, LocalExecutionEnvironment};
use arc_agent::{DockerConfig, DockerExecutionEnvironment, ExecutionEnvironment, LocalExecutionEnvironment};
use anyhow::bail;
use chrono::{Local, Utc};
use util::terminal::Styles;
use arc_util::terminal::Styles;
use crate::checkpoint::Checkpoint;
use crate::engine::{PipelineEngine, RunConfig};
@ -18,7 +18,7 @@ use crate::outcome::StageStatus;
use crate::pipeline::PipelineBuilder;
use crate::validation::Severity;
use llm::provider::Provider;
use arc_llm::provider::Provider;
use super::backend::AgentBackend;
use super::cli_backend::{BackendRouter, CliBackend};
@ -100,7 +100,7 @@ pub async fn run_command(args: RunArgs, styles: &'static Styles) -> anyhow::Resu
.join(".attractor")
.join("logs");
base.join(format!(
"attractor-run-{}",
"arc-run-{}",
Local::now().format("%Y%m%d-%H%M%S")
))
});
@ -159,7 +159,7 @@ pub async fn run_command(args: RunArgs, styles: &'static Styles) -> anyhow::Resu
});
// Append to progress.ndjson
if let Ok(line) = serde_json::to_string(&envelope) {
let line = util::redact::redact_jsonl_line(&line);
let line = arc_util::redact::redact_jsonl_line(&line);
use std::io::Write;
if let Ok(mut f) = std::fs::OpenOptions::new()
.create(true)
@ -171,7 +171,7 @@ pub async fn run_command(args: RunArgs, styles: &'static Styles) -> anyhow::Resu
}
// Overwrite live.json
if let Ok(pretty) = serde_json::to_string_pretty(&envelope) {
let pretty = util::redact::redact_jsonl_line(&pretty);
let pretty = arc_util::redact::redact_jsonl_line(&pretty);
let _ = std::fs::write(&live_path, pretty);
}
});
@ -339,7 +339,7 @@ pub async fn run_command(args: RunArgs, styles: &'static Styles) -> anyhow::Resu
let dry_run_mode = if args.dry_run {
true
} else {
match llm::client::Client::from_env().await {
match arc_llm::client::Client::from_env().await {
Ok(c) if c.provider_names().is_empty() => {
eprintln!(
"{yellow}Warning:{reset} No LLM providers configured. Running in dry-run mode.",
@ -399,7 +399,7 @@ pub async fn run_command(args: RunArgs, styles: &'static Styles) -> anyhow::Resu
});
// Resolve model alias through catalog
let (model, provider) = match llm::catalog::get_model_info(&model) {
let (model, provider) = match arc_llm::catalog::get_model_info(&model) {
Some(info) => (info.id, provider.or(Some(info.provider))),
None => (model, provider),
};
@ -545,7 +545,7 @@ mod tests {
}
});
let compact = serde_json::to_string(&envelope).unwrap();
let redacted = util::redact::redact_jsonl_line(&compact);
let redacted = arc_util::redact::redact_jsonl_line(&compact);
assert!(!redacted.contains("AKIAYRWQG5EJLPZLBYNP"));
assert!(redacted.contains("REDACTED"));
@ -566,7 +566,7 @@ mod tests {
}
});
let pretty = serde_json::to_string_pretty(&envelope).unwrap();
let redacted = util::redact::redact_jsonl_line(&pretty);
let redacted = arc_util::redact::redact_jsonl_line(&pretty);
assert!(!redacted.contains("AKIAYRWQG5EJLPZLBYNP"));
assert!(redacted.contains("REDACTED"));

View file

@ -1,7 +1,7 @@
use std::sync::Arc;
use llm::provider::Provider;
use util::terminal::Styles;
use arc_llm::provider::Provider;
use arc_util::terminal::Styles;
use tokio::net::TcpListener;
use crate::cli::backend::AgentBackend;
@ -21,7 +21,7 @@ pub async fn serve_command(args: ServeArgs, styles: &'static Styles) -> anyhow::
let dry_run_mode = if args.dry_run {
true
} else {
match llm::client::Client::from_env().await {
match arc_llm::client::Client::from_env().await {
Ok(c) if c.provider_names().is_empty() => {
eprintln!(
"{yellow}Warning:{reset} No LLM providers configured. Running in dry-run mode.",
@ -49,7 +49,7 @@ pub async fn serve_command(args: ServeArgs, styles: &'static Styles) -> anyhow::
});
// Resolve model alias through catalog
let (model, provider_str) = match llm::catalog::get_model_info(&model) {
let (model, provider_str) = match arc_llm::catalog::get_model_info(&model) {
Some(info) => (info.id, provider_str.or(Some(info.provider))),
None => (model, provider_str),
};

View file

@ -1,5 +1,5 @@
use anyhow::bail;
use util::terminal::Styles;
use arc_util::terminal::Styles;
use crate::pipeline::PipelineBuilder;
use crate::validation::Severity;

View file

@ -2,7 +2,7 @@ use std::collections::HashMap;
use std::path::Path;
use std::time::Instant;
use agent::execution_env::{format_lines_numbered, DirEntry, ExecEnvEventCallback, ExecResult, ExecutionEnvEvent, ExecutionEnvironment, GrepOptions};
use arc_agent::execution_env::{format_lines_numbered, DirEntry, ExecEnvEventCallback, ExecResult, ExecutionEnvEvent, ExecutionEnvironment, GrepOptions};
use async_trait::async_trait;
use serde::Deserialize;
@ -87,7 +87,7 @@ impl DaytonaExecutionEnvironment {
/// Build `SandboxBaseParams` from config, generating a unique sandbox name.
fn base_params(&self) -> daytona_sdk::SandboxBaseParams {
let name = format!(
"attractor-{}",
"arc-{}",
chrono::Utc::now().format("%Y%m%d-%H%M%S-%3f")
);
daytona_sdk::SandboxBaseParams {

View file

@ -5,7 +5,7 @@ use std::sync::atomic::{AtomicBool, Ordering};
use std::sync::Arc;
use std::time::Instant;
use agent::ExecutionEnvironment;
use arc_agent::ExecutionEnvironment;
use chrono::Utc;
use futures::FutureExt;
use rand::Rng;
@ -1085,7 +1085,7 @@ mod tests {
use std::time::Duration;
fn local_env() -> Arc<dyn ExecutionEnvironment> {
Arc::new(agent::LocalExecutionEnvironment::new(
Arc::new(arc_agent::LocalExecutionEnvironment::new(
std::env::current_dir().unwrap_or_else(|_| PathBuf::from(".")),
))
}

View file

@ -1,6 +1,6 @@
use serde::{Deserialize, Serialize};
use agent::{AgentEvent, ExecutionEnvEvent};
use arc_agent::{AgentEvent, ExecutionEnvEvent};
use crate::outcome::StageUsage;
/// Events emitted during pipeline execution for observability.
@ -201,7 +201,7 @@ impl EventEmitter {
#[cfg(test)]
mod tests {
use super::*;
use llm::types::Usage;
use arc_llm::types::Usage;
use std::sync::{Arc, Mutex};
#[test]
@ -627,7 +627,7 @@ mod tests {
#[test]
fn execution_env_event_wrapper_serialization() {
use agent::ExecutionEnvEvent;
use arc_agent::ExecutionEnvEvent;
let event = PipelineEvent::ExecutionEnv {
event: ExecutionEnvEvent::Initializing { env_type: "docker".into() },

View file

@ -1,7 +1,7 @@
use std::path::Path;
use std::sync::Arc;
use agent::ExecutionEnvironment;
use arc_agent::ExecutionEnvironment;
use async_trait::async_trait;
use crate::context::Context;
@ -312,7 +312,7 @@ mod tests {
EngineServices {
registry: std::sync::Arc::new(HandlerRegistry::new(Box::new(StartHandler))),
emitter: std::sync::Arc::new(EventEmitter::new()),
execution_env: std::sync::Arc::new(agent::LocalExecutionEnvironment::new(
execution_env: std::sync::Arc::new(arc_agent::LocalExecutionEnvironment::new(
std::env::current_dir().unwrap_or_else(|_| std::path::PathBuf::from(".")),
)),
}

View file

@ -40,7 +40,7 @@ mod tests {
EngineServices {
registry: std::sync::Arc::new(HandlerRegistry::new(Box::new(StartHandler))),
emitter: std::sync::Arc::new(EventEmitter::new()),
execution_env: std::sync::Arc::new(agent::LocalExecutionEnvironment::new(
execution_env: std::sync::Arc::new(arc_agent::LocalExecutionEnvironment::new(
std::env::current_dir().unwrap_or_else(|_| std::path::PathBuf::from(".")),
)),
}

View file

@ -37,7 +37,7 @@ mod tests {
EngineServices {
registry: std::sync::Arc::new(HandlerRegistry::new(Box::new(StartHandler))),
emitter: std::sync::Arc::new(EventEmitter::new()),
execution_env: std::sync::Arc::new(agent::LocalExecutionEnvironment::new(
execution_env: std::sync::Arc::new(arc_agent::LocalExecutionEnvironment::new(
std::env::current_dir().unwrap_or_else(|_| std::path::PathBuf::from(".")),
)),
}

View file

@ -1,7 +1,7 @@
use std::path::Path;
use std::sync::Arc;
use agent::ExecutionEnvironment;
use arc_agent::ExecutionEnvironment;
use async_trait::async_trait;
use crate::context::Context;
@ -250,7 +250,7 @@ mod tests {
EngineServices {
registry: std::sync::Arc::new(HandlerRegistry::new(Box::new(StartHandler))),
emitter: std::sync::Arc::new(EventEmitter::new()),
execution_env: std::sync::Arc::new(agent::LocalExecutionEnvironment::new(
execution_env: std::sync::Arc::new(arc_agent::LocalExecutionEnvironment::new(
std::env::current_dir().unwrap_or_else(|_| std::path::PathBuf::from(".")),
)),
}

View file

@ -218,7 +218,7 @@ mod tests {
EngineServices {
registry: std::sync::Arc::new(HandlerRegistry::new(Box::new(StartHandler))),
emitter: std::sync::Arc::new(EventEmitter::new()),
execution_env: std::sync::Arc::new(agent::LocalExecutionEnvironment::new(
execution_env: std::sync::Arc::new(arc_agent::LocalExecutionEnvironment::new(
std::env::current_dir().unwrap_or_else(|_| std::path::PathBuf::from(".")),
)),
}

View file

@ -13,7 +13,7 @@ use std::collections::HashMap;
use std::path::Path;
use std::sync::Arc;
use agent::ExecutionEnvironment;
use arc_agent::ExecutionEnvironment;
use async_trait::async_trait;
use crate::context::Context;

View file

@ -363,7 +363,7 @@ mod tests {
EngineServices {
registry: Arc::new(registry),
emitter: Arc::new(EventEmitter::new()),
execution_env: Arc::new(agent::LocalExecutionEnvironment::new(
execution_env: Arc::new(arc_agent::LocalExecutionEnvironment::new(
std::env::current_dir().unwrap_or_else(|_| std::path::PathBuf::from(".")),
)),
}

View file

@ -177,7 +177,7 @@ mod tests {
EngineServices {
registry: std::sync::Arc::new(HandlerRegistry::new(Box::new(StartHandler))),
emitter: std::sync::Arc::new(EventEmitter::new()),
execution_env: std::sync::Arc::new(agent::LocalExecutionEnvironment::new(
execution_env: std::sync::Arc::new(arc_agent::LocalExecutionEnvironment::new(
std::env::current_dir().unwrap_or_else(|_| std::path::PathBuf::from(".")),
)),
}

View file

@ -36,7 +36,7 @@ mod tests {
EngineServices {
registry: std::sync::Arc::new(HandlerRegistry::new(Box::new(StartHandler))),
emitter: std::sync::Arc::new(EventEmitter::new()),
execution_env: std::sync::Arc::new(agent::LocalExecutionEnvironment::new(
execution_env: std::sync::Arc::new(arc_agent::LocalExecutionEnvironment::new(
std::env::current_dir().unwrap_or_else(|_| std::path::PathBuf::from(".")),
)),
}

View file

@ -147,8 +147,8 @@ mod tests {
use crate::handler::HandlerRegistry;
use crate::outcome::StageStatus;
fn local_env() -> Arc<dyn agent::ExecutionEnvironment> {
Arc::new(agent::LocalExecutionEnvironment::new(
fn local_env() -> Arc<dyn arc_agent::ExecutionEnvironment> {
Arc::new(arc_agent::LocalExecutionEnvironment::new(
std::env::current_dir().unwrap_or_else(|_| std::path::PathBuf::from(".")),
))
}

View file

@ -288,7 +288,7 @@ mod tests {
EngineServices {
registry: std::sync::Arc::new(HandlerRegistry::new(Box::new(StartHandler))),
emitter: std::sync::Arc::new(EventEmitter::new()),
execution_env: std::sync::Arc::new(agent::LocalExecutionEnvironment::new(
execution_env: std::sync::Arc::new(arc_agent::LocalExecutionEnvironment::new(
std::env::current_dir().unwrap_or_else(|_| std::path::PathBuf::from(".")),
)),
}

View file

@ -2,7 +2,7 @@ use std::io::IsTerminal;
use async_trait::async_trait;
use dialoguer::console::Term;
use util::terminal::Styles;
use arc_util::terminal::Styles;
use tokio::io::{AsyncBufReadExt, BufReader};
use super::{Answer, AnswerValue, Interviewer, Question, QuestionType};

View file

@ -1,21 +1,21 @@
use clap::Parser;
use util::terminal::Styles;
use arc_util::terminal::Styles;
#[tokio::main]
async fn main() {
dotenvy::dotenv().ok();
let styles: &'static Styles = Box::leak(Box::new(Styles::detect_stderr()));
let cli = attractor::cli::Cli::parse();
let cli = arc_attractor::cli::Cli::parse();
let result = match cli.command {
attractor::cli::Command::Run(args) => attractor::cli::run::run_command(args, styles).await,
attractor::cli::Command::Validate(args) => {
attractor::cli::validate::validate_command(&args, styles)
arc_attractor::cli::Command::Run(args) => arc_attractor::cli::run::run_command(args, styles).await,
arc_attractor::cli::Command::Validate(args) => {
arc_attractor::cli::validate::validate_command(&args, styles)
}
#[cfg(feature = "server")]
attractor::cli::Command::Serve(args) => {
attractor::cli::serve::serve_command(args, styles).await
arc_attractor::cli::Command::Serve(args) => {
arc_attractor::cli::serve::serve_command(args, styles).await
}
};

View file

@ -13,7 +13,7 @@ use tokio::sync::broadcast;
use tokio_stream::wrappers::BroadcastStream;
use tokio_stream::StreamExt;
use agent::LocalExecutionEnvironment;
use arc_agent::LocalExecutionEnvironment;
use crate::checkpoint::Checkpoint;
use crate::context::Context;
@ -187,7 +187,7 @@ async fn start_pipeline(
let registry = (state.registry_factory)(Arc::clone(&interviewer) as Arc<dyn Interviewer>);
let cwd = std::env::current_dir().unwrap_or_else(|_| std::path::PathBuf::from("."));
let execution_env: Arc<dyn agent::ExecutionEnvironment> = Arc::new(LocalExecutionEnvironment::new(cwd));
let execution_env: Arc<dyn arc_agent::ExecutionEnvironment> = Arc::new(LocalExecutionEnvironment::new(cwd));
let engine = PipelineEngine::with_interviewer(
registry,
Arc::new(emitter),
@ -217,7 +217,7 @@ async fn start_pipeline(
let state_clone = Arc::clone(&state);
let id_clone = pipeline_id.clone();
tokio::spawn(async move {
let logs_root = std::env::temp_dir().join(format!("attractor-{}", uuid::Uuid::new_v4()));
let logs_root = std::env::temp_dir().join(format!("arc-{}", uuid::Uuid::new_v4()));
std::fs::create_dir_all(&logs_root).expect("failed to create logs directory");
let config = RunConfig { logs_root, cancel_token: Some(cancel_token), dry_run: state_clone.dry_run };
@ -371,7 +371,7 @@ async fn get_events(
let stream = BroadcastStream::new(rx).filter_map(|result| match result {
Ok(event) => {
let data = serde_json::to_string(&event).unwrap_or_default();
let data = util::redact::redact_jsonl_line(&data);
let data = arc_util::redact::redact_jsonl_line(&data);
Some(Ok::<Event, std::convert::Infallible>(
Event::default().data(data),
))

View file

@ -3,7 +3,7 @@ use predicates::prelude::*;
#[allow(deprecated)]
fn attractor() -> Command {
Command::cargo_bin("attractor").unwrap()
Command::cargo_bin("arc-attractor").unwrap()
}
// -- validate ----------------------------------------------------------------

View file

@ -7,20 +7,20 @@ use std::collections::HashMap;
use std::path::Path;
use std::sync::Arc;
use agent::ExecutionEnvironment;
use attractor::artifact::sync_artifacts_to_env;
use attractor::checkpoint::Checkpoint;
use attractor::context::Context;
use attractor::daytona_env::{DaytonaConfig, DaytonaExecutionEnvironment};
use attractor::engine::{PipelineEngine, RunConfig};
use attractor::error::AttractorError;
use attractor::event::EventEmitter;
use attractor::graph::{AttrValue, Edge, Graph, Node};
use attractor::handler::exit::ExitHandler;
use attractor::handler::start::StartHandler;
use attractor::handler::{Handler, HandlerRegistry};
use attractor::outcome::{Outcome, StageStatus};
use llm::provider::Provider;
use arc_agent::ExecutionEnvironment;
use arc_attractor::artifact::sync_artifacts_to_env;
use arc_attractor::checkpoint::Checkpoint;
use arc_attractor::context::Context;
use arc_attractor::daytona_env::{DaytonaConfig, DaytonaExecutionEnvironment};
use arc_attractor::engine::{PipelineEngine, RunConfig};
use arc_attractor::error::AttractorError;
use arc_attractor::event::EventEmitter;
use arc_attractor::graph::{AttrValue, Edge, Graph, Node};
use arc_attractor::handler::exit::ExitHandler;
use arc_attractor::handler::start::StartHandler;
use arc_attractor::handler::{Handler, HandlerRegistry};
use arc_attractor::outcome::{Outcome, StageStatus};
use arc_llm::provider::Provider;
async fn create_env() -> DaytonaExecutionEnvironment {
dotenvy::dotenv().ok();
@ -117,7 +117,7 @@ async fn daytona_full_lifecycle() {
#[tokio::test]
#[ignore]
async fn daytona_snapshot_sandbox() {
use attractor::daytona_env::{DaytonaSnapshotConfig, DaytonaSandboxConfig};
use arc_attractor::daytona_env::{DaytonaSnapshotConfig, DaytonaSandboxConfig};
dotenvy::dotenv().ok();
let client = daytona_sdk::Client::new()
@ -130,7 +130,7 @@ async fn daytona_snapshot_sandbox() {
..Default::default()
},
snapshot: Some(DaytonaSnapshotConfig {
name: "attractor-test-snapshot".to_string(),
name: "arc-test-snapshot".to_string(),
cpu: Some(2),
memory: Some(4),
disk: Some(10),
@ -219,7 +219,7 @@ impl Handler for LargeOutputHandler {
_context: &Context,
_graph: &Graph,
_logs_root: &Path,
_services: &attractor::handler::EngineServices,
_services: &arc_attractor::handler::EngineServices,
) -> Result<Outcome, AttractorError> {
let mut outcome = Outcome::success();
let large_value = "x".repeat(150 * 1024);
@ -313,8 +313,8 @@ async fn daytona_pipeline_artifact_offload_and_sync() {
// CLI Backend on Daytona — real CLI tools via exec_command
// ---------------------------------------------------------------------------
use attractor::cli::cli_backend::CliBackend;
use attractor::handler::codergen::{CodergenBackend, CodergenResult};
use arc_attractor::cli::cli_backend::CliBackend;
use arc_attractor::handler::codergen::{CodergenBackend, CodergenResult};
/// Helper: run a real CLI backend test on Daytona.
///

View file

@ -2,36 +2,36 @@ use std::collections::VecDeque;
use std::path::Path;
use std::sync::Arc;
use attractor::checkpoint::Checkpoint;
use attractor::context::Context;
use attractor::engine::{PipelineEngine, RunConfig};
use attractor::error::AttractorError;
use attractor::event::{EventEmitter, PipelineEvent};
use attractor::graph::{AttrValue, Edge, Graph, Node};
use attractor::handler::codergen::{CodergenBackend, CodergenHandler, CodergenResult};
use attractor::handler::conditional::ConditionalHandler;
use attractor::handler::exit::ExitHandler;
use attractor::handler::manager_loop::ManagerLoopHandler;
use attractor::handler::start::StartHandler;
use attractor::handler::script::ScriptHandler;
use attractor::handler::wait_human::WaitHumanHandler;
use attractor::handler::{Handler, HandlerRegistry};
use attractor::interviewer::auto_approve::AutoApproveInterviewer;
use attractor::interviewer::queue::QueueInterviewer;
use attractor::interviewer::recording::RecordingInterviewer;
use attractor::interviewer::{Answer, AnswerValue, Interviewer};
use attractor::outcome::{Outcome, StageStatus};
use attractor::parser::parse;
use attractor::stylesheet::{apply_stylesheet, parse_stylesheet};
use attractor::transform::{StylesheetApplicationTransform, Transform, VariableExpansionTransform};
use attractor::cli::backend::AgentBackend;
use attractor::handler::default_registry;
use llm::provider::Provider;
use attractor::validation::{validate, validate_or_raise, Severity};
use util::terminal::Styles;
use arc_attractor::checkpoint::Checkpoint;
use arc_attractor::context::Context;
use arc_attractor::engine::{PipelineEngine, RunConfig};
use arc_attractor::error::AttractorError;
use arc_attractor::event::{EventEmitter, PipelineEvent};
use arc_attractor::graph::{AttrValue, Edge, Graph, Node};
use arc_attractor::handler::codergen::{CodergenBackend, CodergenHandler, CodergenResult};
use arc_attractor::handler::conditional::ConditionalHandler;
use arc_attractor::handler::exit::ExitHandler;
use arc_attractor::handler::manager_loop::ManagerLoopHandler;
use arc_attractor::handler::start::StartHandler;
use arc_attractor::handler::script::ScriptHandler;
use arc_attractor::handler::wait_human::WaitHumanHandler;
use arc_attractor::handler::{Handler, HandlerRegistry};
use arc_attractor::interviewer::auto_approve::AutoApproveInterviewer;
use arc_attractor::interviewer::queue::QueueInterviewer;
use arc_attractor::interviewer::recording::RecordingInterviewer;
use arc_attractor::interviewer::{Answer, AnswerValue, Interviewer};
use arc_attractor::outcome::{Outcome, StageStatus};
use arc_attractor::parser::parse;
use arc_attractor::stylesheet::{apply_stylesheet, parse_stylesheet};
use arc_attractor::transform::{StylesheetApplicationTransform, Transform, VariableExpansionTransform};
use arc_attractor::cli::backend::AgentBackend;
use arc_attractor::handler::default_registry;
use arc_llm::provider::Provider;
use arc_attractor::validation::{validate, validate_or_raise, Severity};
use arc_util::terminal::Styles;
fn local_env() -> Arc<dyn agent::ExecutionEnvironment> {
Arc::new(agent::LocalExecutionEnvironment::new(
fn local_env() -> Arc<dyn arc_agent::ExecutionEnvironment> {
Arc::new(arc_agent::LocalExecutionEnvironment::new(
std::env::current_dir().unwrap_or_else(|_| std::path::PathBuf::from(".")),
))
}
@ -66,7 +66,7 @@ fn parse_and_validate_simple_linear() {
let diagnostics = validate_or_raise(&graph, &[]).expect("validation should pass");
let errors: Vec<_> = diagnostics
.iter()
.filter(|d| d.severity == attractor::validation::Severity::Error)
.filter(|d| d.severity == arc_attractor::validation::Severity::Error)
.collect();
assert!(errors.is_empty(), "expected no validation errors");
}
@ -112,7 +112,7 @@ fn parse_and_validate_branching_with_conditions() {
let diagnostics = validate_or_raise(&graph, &[]).expect("validation should pass");
let errors: Vec<_> = diagnostics
.iter()
.filter(|d| d.severity == attractor::validation::Severity::Error)
.filter(|d| d.severity == arc_attractor::validation::Severity::Error)
.collect();
assert!(errors.is_empty(), "expected no validation errors");
}
@ -151,7 +151,7 @@ fn parse_and_validate_human_gate() {
let diagnostics = validate_or_raise(&graph, &[]).expect("validation should pass");
let errors: Vec<_> = diagnostics
.iter()
.filter(|d| d.severity == attractor::validation::Severity::Error)
.filter(|d| d.severity == arc_attractor::validation::Severity::Error)
.collect();
assert!(errors.is_empty(), "expected no validation errors");
}
@ -441,11 +441,11 @@ impl Handler for AlwaysFailHandler {
async fn execute(
&self,
node: &Node,
_context: &attractor::context::Context,
_context: &arc_attractor::context::Context,
_graph: &Graph,
_logs_root: &Path,
_services: &attractor::handler::EngineServices,
) -> Result<Outcome, attractor::error::AttractorError> {
_services: &arc_attractor::handler::EngineServices,
) -> Result<Outcome, arc_attractor::error::AttractorError> {
Ok(Outcome::fail(format!("forced failure for {}", node.id)))
}
}
@ -550,11 +550,11 @@ async fn goal_gate_routes_to_retry_target_when_present() {
async fn execute(
&self,
_node: &Node,
_context: &attractor::context::Context,
_context: &arc_attractor::context::Context,
_graph: &Graph,
_logs_root: &Path,
_services: &attractor::handler::EngineServices,
) -> Result<Outcome, attractor::error::AttractorError> {
_services: &arc_attractor::handler::EngineServices,
) -> Result<Outcome, arc_attractor::error::AttractorError> {
let count = self
.call_count
.fetch_add(1, std::sync::atomic::Ordering::SeqCst);
@ -870,7 +870,7 @@ async fn retry_on_failure_then_succeed() {
_context: &Context,
_graph: &Graph,
_logs_root: &Path,
_services: &attractor::handler::EngineServices,
_services: &arc_attractor::handler::EngineServices,
) -> Result<Outcome, AttractorError> {
let count = self
.call_count
@ -1068,7 +1068,7 @@ impl CodergenBackend for MockCodergenBackend {
_thread_id: Option<&str>,
_emitter: &Arc<EventEmitter>,
_stage_dir: &std::path::Path,
_execution_env: &Arc<dyn agent::ExecutionEnvironment>,
_execution_env: &Arc<dyn arc_agent::ExecutionEnvironment>,
) -> Result<CodergenResult, AttractorError> {
Ok(CodergenResult::Text {
text: format!(
@ -1100,7 +1100,7 @@ impl Handler for CounterHandler {
_context: &Context,
_graph: &Graph,
_logs_root: &Path,
_services: &attractor::handler::EngineServices,
_services: &arc_attractor::handler::EngineServices,
) -> Result<Outcome, AttractorError> {
let count = self
.call_count
@ -1124,7 +1124,7 @@ impl Handler for LargeOutputHandler {
_context: &Context,
_graph: &Graph,
_logs_root: &Path,
_services: &attractor::handler::EngineServices,
_services: &arc_attractor::handler::EngineServices,
) -> Result<Outcome, AttractorError> {
let mut outcome = Outcome::success();
// 150KB string — well above the 100KB artifact threshold
@ -1148,7 +1148,7 @@ impl Handler for ContextSetterHandler {
_context: &Context,
_graph: &Graph,
_logs_root: &Path,
_services: &attractor::handler::EngineServices,
_services: &arc_attractor::handler::EngineServices,
) -> Result<Outcome, AttractorError> {
let mut outcome = Outcome::success();
outcome
@ -1351,8 +1351,8 @@ async fn smoke_test_with_mock_codergen_backend() {
#[tokio::test]
async fn end_to_end_parallel_fan_out_fan_in() {
use attractor::handler::fan_in::FanInHandler;
use attractor::handler::parallel::ParallelHandler;
use arc_attractor::handler::fan_in::FanInHandler;
use arc_attractor::handler::parallel::ParallelHandler;
let input = r#"digraph parallel_test {
start [shape=Mdiamond]
@ -1861,7 +1861,7 @@ async fn branching_loop_back_on_failure() {
_context: &Context,
_graph: &Graph,
_logs_root: &Path,
_services: &attractor::handler::EngineServices,
_services: &arc_attractor::handler::EngineServices,
) -> Result<Outcome, AttractorError> {
let count = self
.call_count
@ -2074,8 +2074,8 @@ async fn scenario_ship_a_feature() {
#[tokio::test]
async fn scenario_parallel_expert_review() {
use attractor::handler::fan_in::FanInHandler;
use attractor::handler::parallel::ParallelHandler;
use arc_attractor::handler::fan_in::FanInHandler;
use arc_attractor::handler::parallel::ParallelHandler;
let input = r#"digraph ParallelReview {
start [shape=Mdiamond]
@ -2157,7 +2157,7 @@ async fn scenario_node_retries_on_retry_status() {
_context: &Context,
_graph: &Graph,
_logs_root: &Path,
_services: &attractor::handler::EngineServices,
_services: &arc_attractor::handler::EngineServices,
) -> Result<Outcome, AttractorError> {
let count = self
.call_count
@ -2382,7 +2382,7 @@ async fn manager_loop_stop_condition_satisfied_e2e() {
_context: &Context,
_graph: &Graph,
_logs_root: &Path,
_services: &attractor::handler::EngineServices,
_services: &arc_attractor::handler::EngineServices,
) -> Result<Outcome, AttractorError> {
let mut outcome = Outcome::success();
outcome
@ -2814,7 +2814,7 @@ async fn custom_handler_registration_and_execution() {
_context: &Context,
_graph: &Graph,
_logs_root: &Path,
_services: &attractor::handler::EngineServices,
_services: &arc_attractor::handler::EngineServices,
) -> Result<Outcome, AttractorError> {
let mut outcome = Outcome::success();
outcome
@ -2933,13 +2933,13 @@ mod server_lifecycle {
use std::sync::Arc;
use std::time::Duration;
use attractor::handler::codergen::CodergenHandler;
use attractor::handler::exit::ExitHandler;
use attractor::handler::start::StartHandler;
use attractor::handler::wait_human::WaitHumanHandler;
use attractor::handler::HandlerRegistry;
use attractor::interviewer::Interviewer;
use attractor::server::{build_router, create_app_state};
use arc_attractor::handler::codergen::CodergenHandler;
use arc_attractor::handler::exit::ExitHandler;
use arc_attractor::handler::start::StartHandler;
use arc_attractor::handler::wait_human::WaitHumanHandler;
use arc_attractor::handler::HandlerRegistry;
use arc_attractor::interviewer::Interviewer;
use arc_attractor::server::{build_router, create_app_state};
use axum::body::Body;
use axum::http::{Request, StatusCode};
use tower::ServiceExt;
@ -3126,12 +3126,12 @@ mod sse_events {
use std::sync::Arc;
use std::time::Duration;
use attractor::handler::codergen::CodergenHandler;
use attractor::handler::exit::ExitHandler;
use attractor::handler::start::StartHandler;
use attractor::handler::HandlerRegistry;
use attractor::interviewer::Interviewer;
use attractor::server::{build_router, create_app_state};
use arc_attractor::handler::codergen::CodergenHandler;
use arc_attractor::handler::exit::ExitHandler;
use arc_attractor::handler::start::StartHandler;
use arc_attractor::handler::HandlerRegistry;
use arc_attractor::interviewer::Interviewer;
use arc_attractor::server::{build_router, create_app_state};
use axum::body::Body;
use axum::http::{Request, StatusCode};
use http_body_util::BodyExt;
@ -3269,9 +3269,9 @@ mod serve_dry_run {
use std::sync::Arc;
use std::time::Duration;
use attractor::handler::default_registry;
use attractor::interviewer::Interviewer;
use attractor::server::{build_router, create_app_state};
use arc_attractor::handler::default_registry;
use arc_attractor::interviewer::Interviewer;
use arc_attractor::server::{build_router, create_app_state};
use axum::body::Body;
use axum::http::{Request, StatusCode};
use tower::ServiceExt;
@ -3359,7 +3359,7 @@ mod serve_dry_run {
#[tokio::test]
async fn sub_pipeline_e2e_through_engine() {
use attractor::handler::sub_pipeline::SubPipelineHandler;
use arc_attractor::handler::sub_pipeline::SubPipelineHandler;
let input = r#"digraph SubPipelineE2E {
graph [goal="Test sub-pipeline"]
@ -3418,7 +3418,7 @@ async fn sub_pipeline_e2e_through_engine() {
#[tokio::test]
async fn manager_loop_with_child_observer_e2e() {
use attractor::handler::manager_loop::{ChildObserver, ManagerLoopHandler};
use arc_attractor::handler::manager_loop::{ChildObserver, ManagerLoopHandler};
use std::sync::atomic::{AtomicU32, Ordering};
struct SimulatingChildObserver {
@ -3432,16 +3432,16 @@ async fn manager_loop_with_child_observer_e2e() {
&self,
_dotfile: &str,
_workdir: &str,
_context: &attractor::context::Context,
) -> Result<(), attractor::error::AttractorError> {
_context: &arc_attractor::context::Context,
) -> Result<(), arc_attractor::error::AttractorError> {
self.launch_count.fetch_add(1, Ordering::SeqCst);
Ok(())
}
async fn observe(
&self,
context: &attractor::context::Context,
) -> Result<(), attractor::error::AttractorError> {
context: &arc_attractor::context::Context,
) -> Result<(), arc_attractor::error::AttractorError> {
let cycle = self.observe_count.fetch_add(1, Ordering::SeqCst);
if cycle >= 2 {
context.set(
@ -3458,9 +3458,9 @@ async fn manager_loop_with_child_observer_e2e() {
async fn steer(
&self,
_context: &attractor::context::Context,
_node: &attractor::graph::Node,
) -> Result<(), attractor::error::AttractorError> {
_context: &arc_attractor::context::Context,
_node: &arc_attractor::graph::Node,
) -> Result<(), arc_attractor::error::AttractorError> {
Ok(())
}
}
@ -3559,7 +3559,7 @@ async fn manager_loop_with_child_observer_e2e() {
#[tokio::test]
async fn graph_merge_e2e_through_engine() {
use attractor::transform::GraphMergeTransform;
use arc_attractor::transform::GraphMergeTransform;
// Module "val": lint -> test
let mut val_graph = Graph::new("val");
@ -3734,7 +3734,7 @@ impl Handler for FidelityCapturingHandler {
context: &Context,
_graph: &Graph,
_logs_root: &Path,
_services: &attractor::handler::EngineServices,
_services: &arc_attractor::handler::EngineServices,
) -> Result<Outcome, AttractorError> {
let fidelity = context.get_string("internal.fidelity", "none");
self.captures
@ -5106,13 +5106,13 @@ mod real_llm {
use async_trait::async_trait;
use attractor::context::Context;
use attractor::error::AttractorError;
use attractor::graph::Node;
use attractor::handler::codergen::{CodergenBackend, CodergenHandler, CodergenResult};
use arc_attractor::context::Context;
use arc_attractor::error::AttractorError;
use arc_attractor::graph::Node;
use arc_attractor::handler::codergen::{CodergenBackend, CodergenHandler, CodergenResult};
use llm::client::Client;
use llm::types::{Message, Request};
use arc_llm::client::Client;
use arc_llm::types::{Message, Request};
struct LlmCodergenBackend {
client: Arc<Client>,
@ -5129,7 +5129,7 @@ mod real_llm {
_thread_id: Option<&str>,
_emitter: &Arc<EventEmitter>,
_stage_dir: &std::path::Path,
_execution_env: &Arc<dyn agent::ExecutionEnvironment>,
_execution_env: &Arc<dyn arc_agent::ExecutionEnvironment>,
) -> Result<CodergenResult, AttractorError> {
let request = Request {
model: self.model.clone(),
@ -5174,16 +5174,16 @@ mod real_llm {
}
use super::local_env;
use attractor::checkpoint::Checkpoint;
use attractor::engine::{PipelineEngine, RunConfig};
use attractor::event::EventEmitter;
use attractor::graph::{AttrValue, Edge, Graph};
use attractor::handler::exit::ExitHandler;
use attractor::handler::start::StartHandler;
use attractor::handler::wait_human::WaitHumanHandler;
use attractor::handler::HandlerRegistry;
use attractor::interviewer::auto_approve::AutoApproveInterviewer;
use attractor::outcome::StageStatus;
use arc_attractor::checkpoint::Checkpoint;
use arc_attractor::engine::{PipelineEngine, RunConfig};
use arc_attractor::event::EventEmitter;
use arc_attractor::graph::{AttrValue, Edge, Graph};
use arc_attractor::handler::exit::ExitHandler;
use arc_attractor::handler::start::StartHandler;
use arc_attractor::handler::wait_human::WaitHumanHandler;
use arc_attractor::handler::HandlerRegistry;
use arc_attractor::interviewer::auto_approve::AutoApproveInterviewer;
use arc_attractor::outcome::StageStatus;
#[tokio::test]
#[ignore]
@ -6633,7 +6633,7 @@ async fn attractor_e2e_with_real_llm() {
Provider::Anthropic,
0,
&TEST_STYLES,
)) as Box<dyn attractor::handler::codergen::CodergenBackend>)
)) as Box<dyn arc_attractor::handler::codergen::CodergenBackend>)
});
let logs_dir = tempfile::tempdir().unwrap();
@ -6892,7 +6892,7 @@ async fn large_context_values_are_offloaded_to_artifact_store() {
assert_eq!(outcome.status, StageStatus::Success);
// The checkpoint context should contain an artifact pointer, not the full value
let checkpoint = attractor::checkpoint::Checkpoint::load(&dir.path().join("checkpoint.json"))
let checkpoint = arc_attractor::checkpoint::Checkpoint::load(&dir.path().join("checkpoint.json"))
.expect("checkpoint should load");
let pointer_value = checkpoint
.context_values
@ -6957,7 +6957,7 @@ impl RemoteMockEnv {
}
#[async_trait::async_trait]
impl agent::ExecutionEnvironment for RemoteMockEnv {
impl arc_agent::ExecutionEnvironment for RemoteMockEnv {
async fn read_file(&self, _path: &str, _offset: Option<usize>, _limit: Option<usize>) -> std::result::Result<String, String> {
Err("not implemented".to_string())
}
@ -6978,7 +6978,7 @@ impl agent::ExecutionEnvironment for RemoteMockEnv {
Ok(false)
}
async fn list_directory(&self, _path: &str, _depth: Option<usize>) -> std::result::Result<Vec<agent::DirEntry>, String> {
async fn list_directory(&self, _path: &str, _depth: Option<usize>) -> std::result::Result<Vec<arc_agent::DirEntry>, String> {
Err("not implemented".to_string())
}
@ -6989,11 +6989,11 @@ impl agent::ExecutionEnvironment for RemoteMockEnv {
_working_dir: Option<&str>,
_env_vars: Option<&std::collections::HashMap<String, String>>,
_cancel_token: Option<tokio_util::sync::CancellationToken>,
) -> std::result::Result<agent::ExecResult, String> {
) -> std::result::Result<arc_agent::ExecResult, String> {
Err("not implemented".to_string())
}
async fn grep(&self, _pattern: &str, _path: &str, _options: &agent::GrepOptions) -> std::result::Result<Vec<String>, String> {
async fn grep(&self, _pattern: &str, _path: &str, _options: &arc_agent::GrepOptions) -> std::result::Result<Vec<String>, String> {
Err("not implemented".to_string())
}
@ -7104,11 +7104,11 @@ async fn node_dir_uses_visit_count_on_revisit() {
async fn execute(
&self,
_node: &Node,
_context: &attractor::context::Context,
_context: &arc_attractor::context::Context,
_graph: &Graph,
_logs_root: &Path,
_services: &attractor::handler::EngineServices,
) -> Result<Outcome, attractor::error::AttractorError> {
_services: &arc_attractor::handler::EngineServices,
) -> Result<Outcome, arc_attractor::error::AttractorError> {
let n = self.call_count.fetch_add(1, std::sync::atomic::Ordering::SeqCst);
if n == 0 {
Ok(Outcome::fail("first attempt fails"))
@ -7192,7 +7192,7 @@ async fn node_dir_uses_visit_count_on_revisit() {
// CLI Backend end-to-end tests
// ---------------------------------------------------------------------------
use attractor::cli::cli_backend::{BackendRouter, CliBackend};
use arc_attractor::cli::cli_backend::{BackendRouter, CliBackend};
/// A mock execution environment for CLI backend e2e tests.
/// Records all exec_command and write_file calls, and returns configurable
@ -7236,7 +7236,7 @@ impl CliTestEnv {
}
#[async_trait::async_trait]
impl agent::ExecutionEnvironment for CliTestEnv {
impl arc_agent::ExecutionEnvironment for CliTestEnv {
async fn read_file(&self, _path: &str, _offset: Option<usize>, _limit: Option<usize>) -> Result<String, String> {
Ok(String::new())
}
@ -7254,7 +7254,7 @@ impl agent::ExecutionEnvironment for CliTestEnv {
Ok(false)
}
async fn list_directory(&self, _path: &str, _depth: Option<usize>) -> Result<Vec<agent::DirEntry>, String> {
async fn list_directory(&self, _path: &str, _depth: Option<usize>) -> Result<Vec<arc_agent::DirEntry>, String> {
Ok(vec![])
}
@ -7265,7 +7265,7 @@ impl agent::ExecutionEnvironment for CliTestEnv {
_working_dir: Option<&str>,
_env_vars: Option<&std::collections::HashMap<String, String>>,
_cancel_token: Option<tokio_util::sync::CancellationToken>,
) -> Result<agent::ExecResult, String> {
) -> Result<arc_agent::ExecResult, String> {
self.commands.lock().unwrap().push(command.to_string());
// git diff calls: first pair returns empty (before), second pair returns configured files
@ -7277,7 +7277,7 @@ impl agent::ExecutionEnvironment for CliTestEnv {
} else {
String::new()
};
return Ok(agent::ExecResult {
return Ok(arc_agent::ExecResult {
stdout,
stderr: String::new(),
exit_code: 0,
@ -7287,7 +7287,7 @@ impl agent::ExecutionEnvironment for CliTestEnv {
}
// CLI command: return configured stdout
Ok(agent::ExecResult {
Ok(arc_agent::ExecResult {
stdout: self.cli_stdout.clone(),
stderr: String::new(),
exit_code: 0,
@ -7296,7 +7296,7 @@ impl agent::ExecutionEnvironment for CliTestEnv {
})
}
async fn grep(&self, _pattern: &str, _path: &str, _options: &agent::GrepOptions) -> Result<Vec<String>, String> {
async fn grep(&self, _pattern: &str, _path: &str, _options: &arc_agent::GrepOptions) -> Result<Vec<String>, String> {
Ok(vec![])
}
@ -7331,7 +7331,7 @@ impl agent::ExecutionEnvironment for CliTestEnv {
async fn cli_backend_run_writes_prompt_and_calls_exec() {
let claude_output = r#"{"type":"result","result":"I fixed the bug.","usage":{"input_tokens":500,"output_tokens":200}}"#;
let test_env = Arc::new(CliTestEnv::new(claude_output));
let env: Arc<dyn agent::ExecutionEnvironment> = test_env.clone();
let env: Arc<dyn arc_agent::ExecutionEnvironment> = test_env.clone();
let backend = CliBackend::new("claude-opus-4-6".into(), Provider::Anthropic);
let node = Node::new("fix_code");
@ -7373,7 +7373,7 @@ async fn cli_backend_run_writes_prompt_and_calls_exec() {
#[tokio::test]
async fn cli_backend_run_detects_changed_files() {
let claude_output = r#"{"type":"result","result":"Created new file.","usage":{"input_tokens":100,"output_tokens":50}}"#;
let env: Arc<dyn agent::ExecutionEnvironment> = Arc::new(
let env: Arc<dyn arc_agent::ExecutionEnvironment> = Arc::new(
CliTestEnv::new(claude_output)
.with_git_diff_after("src/main.rs\nsrc/lib.rs\n"),
);
@ -7401,7 +7401,7 @@ async fn cli_backend_run_detects_changed_files() {
async fn cli_backend_run_with_codex_provider() {
let codex_output = "{\"type\":\"item.completed\",\"item\":{\"id\":\"item_0\",\"type\":\"agent_message\",\"text\":\"Implemented the feature.\"}}\n{\"type\":\"turn.completed\",\"usage\":{\"input_tokens\":300,\"output_tokens\":150}}";
let test_env = Arc::new(CliTestEnv::new(codex_output));
let env: Arc<dyn agent::ExecutionEnvironment> = test_env.clone();
let env: Arc<dyn arc_agent::ExecutionEnvironment> = test_env.clone();
let backend = CliBackend::new("gpt-5.3-codex".into(), Provider::OpenAi);
let node = Node::new("implement");
@ -7438,19 +7438,19 @@ async fn cli_backend_run_fails_on_nonzero_exit() {
// Override exec_command to return non-zero for the CLI call
struct FailingCliEnv;
#[async_trait::async_trait]
impl agent::ExecutionEnvironment for FailingCliEnv {
impl arc_agent::ExecutionEnvironment for FailingCliEnv {
async fn read_file(&self, _: &str, _: Option<usize>, _: Option<usize>) -> Result<String, String> { Ok(String::new()) }
async fn write_file(&self, _: &str, _: &str) -> Result<(), String> { Ok(()) }
async fn delete_file(&self, _: &str) -> Result<(), String> { Ok(()) }
async fn file_exists(&self, _: &str) -> Result<bool, String> { Ok(false) }
async fn list_directory(&self, _: &str, _: Option<usize>) -> Result<Vec<agent::DirEntry>, String> { Ok(vec![]) }
async fn exec_command(&self, command: &str, _: u64, _: Option<&str>, _: Option<&std::collections::HashMap<String, String>>, _: Option<tokio_util::sync::CancellationToken>) -> Result<agent::ExecResult, String> {
async fn list_directory(&self, _: &str, _: Option<usize>) -> Result<Vec<arc_agent::DirEntry>, String> { Ok(vec![]) }
async fn exec_command(&self, command: &str, _: u64, _: Option<&str>, _: Option<&std::collections::HashMap<String, String>>, _: Option<tokio_util::sync::CancellationToken>) -> Result<arc_agent::ExecResult, String> {
if command.starts_with("git") {
return Ok(agent::ExecResult { stdout: String::new(), stderr: String::new(), exit_code: 0, timed_out: false, duration_ms: 0 });
return Ok(arc_agent::ExecResult { stdout: String::new(), stderr: String::new(), exit_code: 0, timed_out: false, duration_ms: 0 });
}
Ok(agent::ExecResult { stdout: String::new(), stderr: "command not found: claude".into(), exit_code: 127, timed_out: false, duration_ms: 0 })
Ok(arc_agent::ExecResult { stdout: String::new(), stderr: "command not found: claude".into(), exit_code: 127, timed_out: false, duration_ms: 0 })
}
async fn grep(&self, _: &str, _: &str, _: &agent::GrepOptions) -> Result<Vec<String>, String> { Ok(vec![]) }
async fn grep(&self, _: &str, _: &str, _: &arc_agent::GrepOptions) -> Result<Vec<String>, String> { Ok(vec![]) }
async fn glob(&self, _: &str, _: Option<&str>) -> Result<Vec<String>, String> { Ok(vec![]) }
async fn initialize(&self) -> Result<(), String> { Ok(()) }
async fn cleanup(&self) -> Result<(), String> { Ok(()) }
@ -7459,7 +7459,7 @@ async fn cli_backend_run_fails_on_nonzero_exit() {
fn os_version(&self) -> String { "Darwin 24.0.0".into() }
}
let failing_env: Arc<dyn agent::ExecutionEnvironment> = Arc::new(FailingCliEnv);
let failing_env: Arc<dyn arc_agent::ExecutionEnvironment> = Arc::new(FailingCliEnv);
let backend = CliBackend::new("claude-opus-4-6".into(), Provider::Anthropic);
let node = Node::new("step");
let context = Context::new();
@ -7483,7 +7483,7 @@ async fn cli_backend_run_fails_on_nonzero_exit() {
#[tokio::test]
async fn cli_backend_run_fails_on_unparseable_output() {
let env: Arc<dyn agent::ExecutionEnvironment> = Arc::new(CliTestEnv::new("this is not json at all"));
let env: Arc<dyn arc_agent::ExecutionEnvironment> = Arc::new(CliTestEnv::new("this is not json at all"));
let backend = CliBackend::new("claude-opus-4-6".into(), Provider::Anthropic);
let node = Node::new("step");
@ -7507,7 +7507,7 @@ async fn cli_backend_run_fails_on_unparseable_output() {
async fn cli_backend_run_uses_node_model_override() {
let claude_output = r#"{"type":"result","result":"ok","usage":{"input_tokens":10,"output_tokens":5}}"#;
let test_env = Arc::new(CliTestEnv::new(claude_output));
let env: Arc<dyn agent::ExecutionEnvironment> = test_env.clone();
let env: Arc<dyn arc_agent::ExecutionEnvironment> = test_env.clone();
let backend = CliBackend::new("default-model".into(), Provider::Anthropic);
let mut node = Node::new("step");
@ -7532,7 +7532,7 @@ async fn cli_backend_run_uses_node_model_override() {
async fn cli_backend_run_uses_node_provider_override() {
let codex_output = "{\"type\":\"item.completed\",\"item\":{\"id\":\"item_0\",\"type\":\"agent_message\",\"text\":\"ok\"}}\n{\"type\":\"turn.completed\",\"usage\":{\"input_tokens\":10,\"output_tokens\":5}}";
let test_env = Arc::new(CliTestEnv::new(codex_output));
let env: Arc<dyn agent::ExecutionEnvironment> = test_env.clone();
let env: Arc<dyn arc_agent::ExecutionEnvironment> = test_env.clone();
let backend = CliBackend::new("default-model".into(), Provider::Anthropic);
let mut node = Node::new("step");
@ -7556,7 +7556,7 @@ async fn cli_backend_run_uses_node_provider_override() {
#[tokio::test]
async fn cli_backend_run_writes_provider_used_json() {
let claude_output = r#"{"type":"result","result":"done","usage":{"input_tokens":10,"output_tokens":5}}"#;
let env: Arc<dyn agent::ExecutionEnvironment> = Arc::new(CliTestEnv::new(claude_output));
let env: Arc<dyn arc_agent::ExecutionEnvironment> = Arc::new(CliTestEnv::new(claude_output));
let backend = CliBackend::new("claude-opus-4-6".into(), Provider::Anthropic);
let node = Node::new("step");
@ -7585,7 +7585,7 @@ async fn cli_backend_run_writes_provider_used_json() {
#[tokio::test]
async fn backend_router_delegates_to_cli_for_cli_node() {
let claude_output = r#"{"type":"result","result":"CLI response","usage":{"input_tokens":10,"output_tokens":5}}"#;
let env: Arc<dyn agent::ExecutionEnvironment> = Arc::new(CliTestEnv::new(claude_output));
let env: Arc<dyn arc_agent::ExecutionEnvironment> = Arc::new(CliTestEnv::new(claude_output));
let api_backend = Box::new(MockCodergenBackend); // would return "Response for ..."
let cli = CliBackend::new("claude-opus-4-6".into(), Provider::Anthropic);
@ -7643,7 +7643,7 @@ async fn backend_router_delegates_to_api_for_normal_node() {
#[tokio::test]
async fn backend_router_delegates_to_cli_for_backend_attr() {
let codex_output = "{\"type\":\"item.completed\",\"item\":{\"id\":\"item_0\",\"type\":\"agent_message\",\"text\":\"Codex did it\"}}\n{\"type\":\"turn.completed\",\"usage\":{\"input_tokens\":10,\"output_tokens\":5}}";
let env: Arc<dyn agent::ExecutionEnvironment> = Arc::new(CliTestEnv::new(codex_output));
let env: Arc<dyn arc_agent::ExecutionEnvironment> = Arc::new(CliTestEnv::new(codex_output));
let api_backend = Box::new(MockCodergenBackend);
let cli = CliBackend::new("gpt-5.3-codex".into(), Provider::OpenAi);
@ -7677,7 +7677,7 @@ async fn full_pipeline_with_cli_backend_node() {
// Pipeline: start -> api_work -> cli_work -> exit
// api_work uses MockCodergenBackend (API), cli_work has backend="cli"
let claude_output = r#"{"type":"result","result":"CLI completed the task.","usage":{"input_tokens":100,"output_tokens":50}}"#;
let env: Arc<dyn agent::ExecutionEnvironment> = Arc::new(CliTestEnv::new(claude_output));
let env: Arc<dyn arc_agent::ExecutionEnvironment> = Arc::new(CliTestEnv::new(claude_output));
let mut graph = Graph::new("CliPipelineTest");
@ -7755,7 +7755,7 @@ async fn full_pipeline_with_cli_backend_node() {
#[tokio::test]
async fn stylesheet_backend_property_routes_to_cli() {
let claude_output = r#"{"type":"result","result":"Styled CLI response.","usage":{"input_tokens":10,"output_tokens":5}}"#;
let env: Arc<dyn agent::ExecutionEnvironment> = Arc::new(CliTestEnv::new(claude_output));
let env: Arc<dyn arc_agent::ExecutionEnvironment> = Arc::new(CliTestEnv::new(claude_output));
let mut graph = Graph::new("StylesheetTest");
graph.attrs.insert(
@ -7825,7 +7825,7 @@ async fn stylesheet_backend_property_routes_to_cli() {
// Real CLI backend e2e tests (require actual CLI tools installed)
// ---------------------------------------------------------------------------
use attractor::cli::cli_backend::parse_cli_response;
use arc_attractor::cli::cli_backend::parse_cli_response;
/// Run a real CLI tool via LocalExecutionEnvironment and verify the full flow.
async fn run_real_cli_test(provider: Provider, model: &str) {

View file

@ -1,5 +1,5 @@
[package]
name = "git-storage"
name = "arc-git-storage"
edition.workspace = true
version.workspace = true
license.workspace = true

View file

@ -1,5 +1,5 @@
[package]
name = "llm"
name = "arc-llm"
edition.workspace = true
version.workspace = true
license.workspace = true

Some files were not shown because too many files have changed in this diff Show more