swap hive-claude to the crates.io registry dependency (#2931)
This commit is contained in:
parent
435ef193e1
commit
42fdd98a7a
4 changed files with 26 additions and 21 deletions
15
Cargo.lock
generated
15
Cargo.lock
generated
|
|
@ -1170,7 +1170,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|||
checksum = "39cab71617ae0d63f51a36d69f866391735b51691dbda63cf6f96d042b63efeb"
|
||||
dependencies = [
|
||||
"libc",
|
||||
"windows-sys 0.61.2",
|
||||
"windows-sys 0.52.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
|
@ -1687,7 +1687,8 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "hive-claude"
|
||||
version = "0.1.0"
|
||||
source = "git+https://forge.darkest.space/hyperhive/hive-claude?branch=main#4ee1940e91b0f713f1767fc5ba84426a82d562f8"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "d540ef2338fc071b60e69cac345cb5ec04627c4ef11c49138d1c39d4f687f254"
|
||||
dependencies = [
|
||||
"serde",
|
||||
"serde_json",
|
||||
|
|
@ -3409,7 +3410,7 @@ dependencies = [
|
|||
"once_cell",
|
||||
"socket2",
|
||||
"tracing",
|
||||
"windows-sys 0.61.2",
|
||||
"windows-sys 0.52.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
|
@ -3982,7 +3983,7 @@ dependencies = [
|
|||
"errno",
|
||||
"libc",
|
||||
"linux-raw-sys",
|
||||
"windows-sys 0.61.2",
|
||||
"windows-sys 0.52.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
|
@ -4041,7 +4042,7 @@ dependencies = [
|
|||
"security-framework",
|
||||
"security-framework-sys",
|
||||
"webpki-root-certs",
|
||||
"windows-sys 0.61.2",
|
||||
"windows-sys 0.52.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
|
@ -4532,7 +4533,7 @@ dependencies = [
|
|||
"getrandom 0.4.3",
|
||||
"once_cell",
|
||||
"rustix",
|
||||
"windows-sys 0.61.2",
|
||||
"windows-sys 0.52.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
|
@ -5360,7 +5361,7 @@ version = "0.1.11"
|
|||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "c2a7b1c03c876122aa43f3020e6c3c3ee5c05081c9a00739faf7503aeba10d22"
|
||||
dependencies = [
|
||||
"windows-sys 0.61.2",
|
||||
"windows-sys 0.52.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
|
|
|||
|
|
@ -57,7 +57,7 @@ hive-sh4re = { path = "hive-sh4re" }
|
|||
hive-agent-sock = { path = "hive-agent-sock" }
|
||||
hive-jobq = { path = "hive-jobq" }
|
||||
hive-core-agent-sock = { path = "hive-core-agent-sock" }
|
||||
hive-claude = { git = "https://forge.darkest.space/hyperhive/hive-claude", branch = "main" }
|
||||
hive-claude = "0.1"
|
||||
hive-host-sock = { path = "hive-host-sock" }
|
||||
hive-priv-sock = { path = "hive-priv-sock" }
|
||||
hive-sock-client = { path = "hive-sock-client" }
|
||||
|
|
|
|||
|
|
@ -572,7 +572,7 @@ fn claude_config(bus: &Bus, files: &TurnFiles) -> Config {
|
|||
state_dir.is_dir().then_some(state_dir)
|
||||
};
|
||||
Config {
|
||||
model: bus.model(),
|
||||
model: Some(bus.model()),
|
||||
effort: Some(bus.effort()),
|
||||
cwd,
|
||||
system_prompt_file: Some(files.system_prompt.clone()),
|
||||
|
|
|
|||
|
|
@ -299,18 +299,22 @@ impl TurnStats {
|
|||
let g = |i: usize| -> rusqlite::Result<u64> {
|
||||
Ok(u64::try_from(row.get::<_, i64>(i)?).unwrap_or(0))
|
||||
};
|
||||
let cost = hive_claude::TokenUsage {
|
||||
input_tokens: g(0)?,
|
||||
output_tokens: g(1)?,
|
||||
cache_read_input_tokens: g(2)?,
|
||||
cache_creation_input_tokens: g(3)?,
|
||||
};
|
||||
let last = hive_claude::TokenUsage {
|
||||
input_tokens: g(4)?,
|
||||
output_tokens: g(5)?,
|
||||
cache_read_input_tokens: g(6)?,
|
||||
cache_creation_input_tokens: g(7)?,
|
||||
};
|
||||
// `TokenUsage` is `#[non_exhaustive]` (hive-claude 0.1.0+) —
|
||||
// struct-expression construction is blocked for downstream
|
||||
// crates entirely, even with a `..base` (functional update
|
||||
// doesn't carve out an exception, per the non_exhaustive
|
||||
// reference semantics). Build off `Default` and assign the
|
||||
// (all-`pub`) fields instead.
|
||||
let mut cost = hive_claude::TokenUsage::default();
|
||||
cost.input_tokens = g(0)?;
|
||||
cost.output_tokens = g(1)?;
|
||||
cost.cache_read_input_tokens = g(2)?;
|
||||
cost.cache_creation_input_tokens = g(3)?;
|
||||
let mut last = hive_claude::TokenUsage::default();
|
||||
last.input_tokens = g(4)?;
|
||||
last.output_tokens = g(5)?;
|
||||
last.cache_read_input_tokens = g(6)?;
|
||||
last.cache_creation_input_tokens = g(7)?;
|
||||
let ctx = if last == hive_claude::TokenUsage::default() {
|
||||
None
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Reference in a new issue