mirror of
https://github.com/fabro-sh/fabro.git
synced 2026-10-08 03:10:26 +00:00
Rename coding-agent-loop crate to agent
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
5932b500e7
commit
30cf3a6787
29 changed files with 35 additions and 47 deletions
56
Cargo.lock
generated
56
Cargo.lock
generated
|
|
@ -2,6 +2,24 @@
|
|||
# It is not intended for manual editing.
|
||||
version = 4
|
||||
|
||||
[[package]]
|
||||
name = "agent"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"async-trait",
|
||||
"chrono",
|
||||
"futures",
|
||||
"glob",
|
||||
"jsonschema",
|
||||
"libc",
|
||||
"serde",
|
||||
"serde_json",
|
||||
"thiserror 2.0.18",
|
||||
"tokio",
|
||||
"unified-llm",
|
||||
"uuid",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "ahash"
|
||||
version = "0.8.12"
|
||||
|
|
@ -132,12 +150,12 @@ checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0"
|
|||
name = "attractor"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"agent",
|
||||
"anyhow",
|
||||
"async-trait",
|
||||
"axum",
|
||||
"chrono",
|
||||
"clap",
|
||||
"coding-agent-loop",
|
||||
"dotenvy",
|
||||
"futures",
|
||||
"http-body-util",
|
||||
|
|
@ -383,24 +401,6 @@ dependencies = [
|
|||
"cc",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "coding-agent-loop"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"async-trait",
|
||||
"chrono",
|
||||
"futures",
|
||||
"glob",
|
||||
"jsonschema",
|
||||
"libc",
|
||||
"serde",
|
||||
"serde_json",
|
||||
"thiserror 2.0.18",
|
||||
"tokio",
|
||||
"unified-llm",
|
||||
"uuid",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "colorchoice"
|
||||
version = "1.0.4"
|
||||
|
|
@ -2303,12 +2303,15 @@ name = "unified-llm"
|
|||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"assert_cmd",
|
||||
"async-trait",
|
||||
"base64",
|
||||
"bytes",
|
||||
"clap",
|
||||
"dotenvy",
|
||||
"futures",
|
||||
"http",
|
||||
"predicates",
|
||||
"rand",
|
||||
"reqwest 0.12.28",
|
||||
"serde",
|
||||
|
|
@ -2320,21 +2323,6 @@ dependencies = [
|
|||
"uuid",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "unified-llm-cli"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"assert_cmd",
|
||||
"clap",
|
||||
"dotenvy",
|
||||
"futures",
|
||||
"predicates",
|
||||
"serde_json",
|
||||
"tokio",
|
||||
"unified-llm",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "untrusted"
|
||||
version = "0.9.0"
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
[package]
|
||||
name = "coding-agent-loop"
|
||||
name = "agent"
|
||||
edition.workspace = true
|
||||
version.workspace = true
|
||||
license.workspace = true
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
# coding-agent-loop
|
||||
# agent
|
||||
|
||||
A programmable agentic loop for building coding agents. This crate provides the core session management, tool execution, and LLM interaction loop used to power interactive coding assistants.
|
||||
|
||||
|
|
@ -114,7 +114,7 @@ pub struct SessionConfig {
|
|||
## Usage
|
||||
|
||||
```rust
|
||||
use coding_agent_loop::{
|
||||
use agent::{
|
||||
AnthropicProfile, LocalExecutionEnvironment, Session, SessionConfig,
|
||||
};
|
||||
use std::path::PathBuf;
|
||||
|
|
@ -183,7 +183,7 @@ abort_flag.store(true, std::sync::atomic::Ordering::SeqCst);
|
|||
Register additional tools via the profile's `ToolRegistry`:
|
||||
|
||||
```rust
|
||||
use coding_agent_loop::tool_registry::{RegisteredTool, ToolExecutor};
|
||||
use agent::tool_registry::{RegisteredTool, ToolExecutor};
|
||||
use unified_llm::types::ToolDefinition;
|
||||
use std::sync::Arc;
|
||||
|
||||
|
|
@ -216,7 +216,7 @@ profile.tool_registry_mut().register(custom_tool);
|
|||
Spawn child sessions for delegated tasks:
|
||||
|
||||
```rust
|
||||
use coding_agent_loop::subagent::SubAgentManager;
|
||||
use agent::subagent::SubAgentManager;
|
||||
|
||||
let mut profile = AnthropicProfile::new("claude-sonnet-4-20250514");
|
||||
let manager = Arc::new(tokio::sync::Mutex::new(SubAgentManager::new(3)));
|
||||
|
|
@ -21,7 +21,7 @@ server = ["axum", "tower", "tokio-stream"]
|
|||
clap.workspace = true
|
||||
anyhow.workspace = true
|
||||
dotenvy.workspace = true
|
||||
coding-agent-loop = { path = "../coding-agent-loop" }
|
||||
agent = { path = "../agent" }
|
||||
unified-llm = { path = "../unified-llm" }
|
||||
thiserror.workspace = true
|
||||
serde.workspace = true
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ use std::sync::Arc;
|
|||
|
||||
use async_trait::async_trait;
|
||||
|
||||
use coding_agent_loop::{
|
||||
use agent::{
|
||||
AnthropicProfile, GeminiProfile, LocalExecutionEnvironment, OpenAiProfile, ProviderProfile,
|
||||
Session, SessionConfig, Turn,
|
||||
};
|
||||
|
|
@ -14,7 +14,7 @@ use crate::error::AttractorError;
|
|||
use crate::graph::Node;
|
||||
use crate::handler::codergen::{CodergenBackend, CodergenResult};
|
||||
|
||||
/// LLM backend that delegates to a `coding-agent-loop` Session per invocation.
|
||||
/// LLM backend that delegates to an `agent` Session per invocation.
|
||||
pub struct AgentBackend {
|
||||
model: String,
|
||||
provider: Option<String>,
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
# Spec Format Reference
|
||||
|
||||
Common format shared by `specs/unified-llm-spec.md`, `specs/coding-agent-loop-spec.md`, and `specs/attractor-spec.md`.
|
||||
Common format shared by `specs/unified-llm-spec.md`, `specs/coding-agent-loop-spec.md` (agent crate), and `specs/attractor-spec.md`.
|
||||
|
||||
---
|
||||
|
||||
|
|
@ -38,7 +38,7 @@ An ASCII art box diagram showing the layers/components and how they connect. All
|
|||
|
||||
### 4.5 Relationship to Companion Specs
|
||||
|
||||
When the spec depends on another (coding-agent-loop depends on unified-llm; attractor depends on coding-agent-loop), it states this explicitly with the types it imports and how the layering works.
|
||||
When the spec depends on another (agent depends on unified-llm; attractor depends on agent), it states this explicitly with the types it imports and how the layering works.
|
||||
|
||||
## 5. Core Technical Sections
|
||||
|
||||
|
|
@ -79,7 +79,7 @@ When a non-obvious choice is made, it's explained inline with **bold "Why..." qu
|
|||
|
||||
## 6. Out of Scope / Nice-to-Haves (optional)
|
||||
|
||||
A section explicitly listing features that are *intentionally excluded*, with an explanation of why each is out of scope and where in the architecture it could be added later. Prevents scope creep and signals extensibility points. (Present in coding-agent-loop-spec; not all specs include this.)
|
||||
A section explicitly listing features that are *intentionally excluded*, with an explanation of why each is out of scope and where in the architecture it could be added later. Prevents scope creep and signals extensibility points. (Present in the agent spec; not all specs include this.)
|
||||
|
||||
## 7. Definition of Done
|
||||
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ Although bringing your own agentic loop and unified LLM SDK is not required to b
|
|||
## Specs
|
||||
|
||||
- [Attractor Specification](./attractor-spec.md)
|
||||
- [Coding Agent Loop Specification](./coding-agent-loop-spec.md)
|
||||
- [Agent Specification](./coding-agent-loop-spec.md)
|
||||
- [Unified LLM Client Specification](./unified-llm-spec.md)
|
||||
|
||||
## Building Attractor
|
||||
|
|
|
|||
|
|
@ -55,7 +55,7 @@ For reference on DOT syntax, see the Graphviz DOT language specification: https:
|
|||
|
||||
Attractor defines the orchestration layer: graph definition, traversal, state management, and extensibility. It does NOT require any specific LLM integration. The codergen handler (Section 4.5) needs a way to call an LLM and get a response -- how you provide that is up to you.
|
||||
|
||||
The codergen handler takes a backend that conforms to the `CodergenBackend` interface (Section 4.5). What that backend does internally is entirely up to the implementor -- use the companion [Coding Agent Loop](./coding-agent-loop-spec.md) and [Unified LLM Client](./unified-llm-spec.md) specs, spawn CLI agents (Claude Code, Codex, Gemini CLI) in subprocesses, run agents in tmux panes with a manager attaching to them, call an LLM API directly, or anything else. The pipeline definition (the DOT file) does not change regardless of backend choice.
|
||||
The codergen handler takes a backend that conforms to the `CodergenBackend` interface (Section 4.5). What that backend does internally is entirely up to the implementor -- use the companion [Agent](./coding-agent-loop-spec.md) and [Unified LLM Client](./unified-llm-spec.md) specs, spawn CLI agents (Claude Code, Codex, Gemini CLI) in subprocesses, run agents in tmux panes with a manager attaching to them, call an LLM API directly, or anything else. The pipeline definition (the DOT file) does not change regardless of backend choice.
|
||||
|
||||
Attractor pipelines are driven by an event stream (Section 9.6). TUI, web, and IDE frontends consume events and submit human-in-the-loop answers. The pipeline engine is headless; the presentation layer is separate.
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue