proto becomes bxcore, the one shared crate (M5b task 00)
Done the way the owner asked and the spike mapped: the crate and the manifests renamed, then what the build reported fixed. Layers: 138 "proto unresolved" errors across 169 files; cargo fmt reordering imports; six fixture paths built as strings in brokerd's and bxctl's tests, which the compiler cannot see, and comments naming crates/proto/; the crate-dependency check and its self-test. One more the spike did not reach: a `\nproto =` key inside a printf format in the self-test, which a word-boundary replacement skips because `n` and `p` are both word characters. make gate: gate: ok, 944 tests; no new entry in /tmp. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -5,14 +5,14 @@
|
||||
|
||||
mod support;
|
||||
|
||||
use bxcore::{
|
||||
Envelope, ErrorCode, Message, PROTOCOL_VERSION, SessionId, Turn, TurnEvent, read_frame,
|
||||
write_frame,
|
||||
};
|
||||
use loopd::channel::{Context, serve};
|
||||
use loopd::llama::Client;
|
||||
use loopd::memory::NoMemory;
|
||||
use loopd::tools::Registry;
|
||||
use proto::{
|
||||
Envelope, ErrorCode, Message, PROTOCOL_VERSION, SessionId, Turn, TurnEvent, read_frame,
|
||||
write_frame,
|
||||
};
|
||||
use std::os::unix::net::{UnixListener, UnixStream};
|
||||
use std::path::PathBuf;
|
||||
use std::sync::Arc;
|
||||
@@ -30,7 +30,7 @@ struct Loopd {
|
||||
home: Home,
|
||||
}
|
||||
|
||||
fn start(replies: Vec<proto::ToolResponse>) -> Loopd {
|
||||
fn start(replies: Vec<bxcore::ToolResponse>) -> Loopd {
|
||||
let home = Home::new();
|
||||
let server = FakeServer::start();
|
||||
let cfg = home.config(&server.socket);
|
||||
@@ -177,7 +177,7 @@ fn tool_calls_are_reported_by_name_only() {
|
||||
tool_events[1],
|
||||
&TurnEvent::ToolResult {
|
||||
name: "read_file".to_string(),
|
||||
class: proto::DataClass::Private,
|
||||
class: bxcore::DataClass::Private,
|
||||
truncated: false
|
||||
}
|
||||
);
|
||||
@@ -292,7 +292,7 @@ fn bad_frames_get_an_error_and_a_close() {
|
||||
stream
|
||||
.set_read_timeout(Some(Duration::from_secs(5)))
|
||||
.unwrap();
|
||||
let msg = Message::Error(proto::WireError {
|
||||
let msg = Message::Error(bxcore::WireError {
|
||||
code: ErrorCode::Internal,
|
||||
detail: String::new(),
|
||||
});
|
||||
@@ -311,7 +311,7 @@ fn bad_frames_get_an_error_and_a_close() {
|
||||
assert!(
|
||||
matches!(
|
||||
reply.msg,
|
||||
Message::Error(proto::WireError {
|
||||
Message::Error(bxcore::WireError {
|
||||
code: ErrorCode::BadMessage,
|
||||
..
|
||||
})
|
||||
@@ -319,7 +319,7 @@ fn bad_frames_get_an_error_and_a_close() {
|
||||
"{reply:?}"
|
||||
);
|
||||
assert!(
|
||||
matches!(read_frame(&mut stream), Err(proto::FrameError::Closed)),
|
||||
matches!(read_frame(&mut stream), Err(bxcore::FrameError::Closed)),
|
||||
"then the connection is closed"
|
||||
);
|
||||
|
||||
@@ -333,7 +333,7 @@ fn bad_frames_get_an_error_and_a_close() {
|
||||
assert!(
|
||||
matches!(
|
||||
reply.msg,
|
||||
Message::Error(proto::WireError {
|
||||
Message::Error(bxcore::WireError {
|
||||
code: ErrorCode::BadMessage,
|
||||
..
|
||||
})
|
||||
@@ -365,7 +365,7 @@ fn bad_frames_get_an_error_and_a_close() {
|
||||
assert!(
|
||||
matches!(
|
||||
reply.msg,
|
||||
Message::Error(proto::WireError {
|
||||
Message::Error(bxcore::WireError {
|
||||
code: ErrorCode::BadVersion,
|
||||
..
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user