Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
104 changes: 67 additions & 37 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

27 changes: 14 additions & 13 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -34,43 +34,44 @@ overflow-checks = false # Disable overflow checks in release mode
[dependencies]
# octolib = { path = "../octolib", default-features = false, features = ["huggingface"] }
octolib = { version = "0.25.1", default-features = false, features = ["huggingface"] }
tokenizers = { version = "0.22.2", default-features = false } # model's own tokenizer for exact token counts
rmcp = { version = "1.7.0", default-features = false }
# fancy-regex: 0.23+ requires an explicit regex backend; pure-Rust over onig (C)
tokenizers = { version = "0.23.1", default-features = false, features = ["fancy-regex"] } # model's own tokenizer for exact token counts
rmcp = { version = "2.2.0", default-features = false }

tokio = { version = "1.52.3", features = ["rt-multi-thread", "macros", "time", "process", "fs", "sync", "signal", "io-std", "net"] }
crossterm = "0.29.0"
indicatif = "0.18.4"
indicatif = "0.18.6"
parking_lot = "0.12.5"
chrono = { version = "0.4.45", features = ["serde"] }
serde = { version = "1.0.228", features = ["derive"] }
uuid = { version = "1.23.3", features = ["v4"] }
uuid = { version = "1.23.4", features = ["v4"] }
tiktoken-rs = "0.12.0" # Token counter
reqwest = { version = "0.13.4", features = ["json", "rustls", "gzip"], default-features = false }
rustls-webpki = ">=0.103.12"
flate2 = "1.1"
zstd = "0.13"
anyhow = "1.0.102"
anyhow = "1.0.103"
serde_json = "1.0.150"
clap = { version = "4.6.1", features = ["derive"] }
clap_complete = "4.6.5"
clap_complete = "4.6.7"
toml = "1.1"
lazy_static = "1.5.0"
fuzzy-matcher = "0.3.7"
tokio-util = { version = "0.7", features = ["rt", "compat"] }
reedline = { version = "0.48", features = ["bashisms", "external_printer"] }
reedline = { version = "0.49", features = ["bashisms", "external_printer"] }
nu-ansi-term = "0.50"
regex = "1.12.3"
regex = "1.13.0"
colored = "3.1.1"
async-trait = "0.1.89"
termimad = "0.34.1"
termimad = "0.35.1"
# No plist-load/yaml-load: only bundled dumps are used (ThemeSet::load_defaults),
# and plist pulls quick-xml with open RUSTSEC advisories (2026-0194/0195).
syntect = { version = "5.3.0", default-features = false, features = ["default-syntaxes", "default-themes", "regex-fancy"] }

url = "2.5.8"
dirs = "6.0.0"
glob = "0.3.3"
ignore = "0.4.26"
ignore = "0.4.28"
futures = "0.3.32"
dotenvy = "0.15.7"
arboard = "3.6.1"
Expand All @@ -79,7 +80,7 @@ viuer = "0.11.0"
base64 = "0.22"
urlencoding = "2.1.3"
humantime-serde = "1.1.1"
tokio-tungstenite = "0.29.0"
tokio-tungstenite = "0.30.0"
futures-util = "0.3"

# OAuth 2.1 + PKCE authentication
Expand All @@ -98,9 +99,9 @@ hyper = { version = "1", features = ["http1", "server"] }
hyper-util = { version = "0.1", features = ["tokio"] }
http-body-util = "0.1"
bytes = "1"
agent-client-protocol = "0.14.0"
agent-client-protocol = "1.2.0"
tracing-subscriber = { version = "0.3.23", features = ["env-filter"] }
which = "8.0.3"
which = "8.0.4"

[target.'cfg(unix)'.dependencies]
libc = "0.2"
Expand Down
7 changes: 6 additions & 1 deletion config-templates/default.toml
Original file line number Diff line number Diff line change
Expand Up @@ -659,7 +659,8 @@ enabled = true
model = "anthropic:claude-haiku-4-5"
# Evidence-bound claims: have the agent back load-bearing repo facts with a
# verbatim «quote», then deterministically verify each quote occurs in a tool
# result; fabricated citations are re-grounded via the verify-gate (needs gate.enabled).
# result -- and that each file:line reference in the answer holds on disk;
# fabricated citations are re-grounded via the verify-gate (needs gate.enabled).
claim_check = true
# Circuit-breaker: hard-stop a turn after this many consecutive tool rounds that emitted
# a steer without the model breaking out (a steer is advisory, so a loop can otherwise
Expand Down Expand Up @@ -733,6 +734,10 @@ verifier_model = "anthropic:claude-haiku-4-5"
# Free deterministic pre-gate (no model call): refuse a `done` claim when code
# was changed but no successful check (build/test/lint/etc.) ran since the change.
require_check_after_mutation = true
# Free deterministic pre-gate (no model call): refuse a `done` claim while the
# live plan checklist still has open items -- finish them or close them out via
# the plan tool (mark complete / done / reset) first.
require_plan_complete = true

# Goal recitation: re-inject the live goal (anchor intent + next_steps) at the
# context tail each turn on long (already-compacted) sessions, so it stays in the
Expand Down
14 changes: 8 additions & 6 deletions src/acp/agent.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,17 @@ use std::collections::HashMap;
use std::path::PathBuf;
use std::rc::Rc;

use agent_client_protocol::schema::{
use agent_client_protocol::schema::v1::{
AgentCapabilities, AuthenticateRequest, AuthenticateResponse, AvailableCommand,
AvailableCommandInput, AvailableCommandsUpdate, BlobResourceContents, CancelNotification,
ClientRequest, ContentBlock, ContentChunk, EmbeddedResourceResource, ExtRequest, ExtResponse,
Implementation, InitializeRequest, InitializeResponse, LoadSessionRequest, LoadSessionResponse,
McpCapabilities, McpServer, Meta, NewSessionRequest, NewSessionResponse, PromptCapabilities,
PromptRequest, PromptResponse, ProtocolVersion, SessionInfoUpdate, SessionNotification,
SessionUpdate, StopReason, ToolCall, ToolCallStatus, ToolCallUpdate, ToolCallUpdateFields,
PromptRequest, PromptResponse, SessionInfoUpdate, SessionNotification, SessionUpdate,
StopReason, ToolCall, ToolCallStatus, ToolCallUpdate, ToolCallUpdateFields,
UnstructuredCommandInput,
};
use agent_client_protocol::schema::ProtocolVersion;
use agent_client_protocol::{ByteStreams, Client, ConnectionTo, Responder};
use tokio::sync::{mpsc, oneshot};
use tokio_util::compat::{TokioAsyncReadCompatExt, TokioAsyncWriteCompatExt};
Expand Down Expand Up @@ -1325,8 +1326,9 @@ impl OctomindAgent {
/// request carries a `oneshot` for its typed reply.
pub(super) enum Command {
SetConnection(ConnectionTo<Client>),
// Boxed: ACP 1.x InitializeRequest is ~600 bytes, dwarfing every other variant.
Initialize(
InitializeRequest,
Box<InitializeRequest>,
oneshot::Sender<Result<InitializeResponse, agent_client_protocol::Error>>,
),
Authenticate(
Expand Down Expand Up @@ -1367,7 +1369,7 @@ async fn run_actor(agent: Rc<OctomindAgent>, mut rx: mpsc::UnboundedReceiver<Com
Command::Initialize(req, reply) => {
let agent = Rc::clone(&agent);
tokio::task::spawn_local(async move {
let _ = reply.send(agent.initialize(req).await);
let _ = reply.send(agent.initialize(*req).await);
});
}
Command::Authenticate(req, reply) => {
Expand Down Expand Up @@ -1465,7 +1467,7 @@ pub(super) async fn serve(
let cmd_tx = cmd_tx.clone();
async move |req: InitializeRequest, responder, cx: ConnectionTo<Client>| {
forward(&cmd_tx, &cx, responder, move |tx| {
Command::Initialize(req, tx)
Command::Initialize(Box::new(req), tx)
})
}
},
Expand Down
Loading
Loading