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>
37 lines
1.1 KiB
Rust
37 lines
1.1 KiB
Rust
//! The four tools' arguments, decoded from the model's JSON then re-serialised. Shared by
|
|
//! `brokerd` (which validates them) and `toolkit` (inside the container, which runs them), so the
|
|
//! two must agree on one definition.
|
|
|
|
use serde::{Deserialize, Serialize};
|
|
|
|
/// The arguments for `read_file`.
|
|
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
|
|
#[serde(deny_unknown_fields)]
|
|
pub struct ReadFileArgs {
|
|
pub path: String,
|
|
}
|
|
|
|
/// The arguments for `write_file`.
|
|
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
|
|
#[serde(deny_unknown_fields)]
|
|
pub struct WriteFileArgs {
|
|
pub path: String,
|
|
pub content: String,
|
|
}
|
|
|
|
/// The arguments for `shell`.
|
|
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
|
|
#[serde(deny_unknown_fields)]
|
|
pub struct ShellArgs {
|
|
pub command: String,
|
|
#[serde(default, skip_serializing_if = "Option::is_none")]
|
|
pub cwd: Option<String>,
|
|
}
|
|
|
|
/// The arguments for `http_fetch`.
|
|
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
|
|
#[serde(deny_unknown_fields)]
|
|
pub struct HttpFetchArgs {
|
|
pub url: String,
|
|
}
|