mirror of
https://github.com/lWolvesl/claw-code.git
synced 2026-04-02 07:41:52 +08:00
Enable real Agent tool delegation in the Rust CLI
The Rust Agent tool only persisted queued metadata, so delegated work never actually ran. This change wires Agent into a detached background conversation path with isolated runtime, API client, session state, restricted tool subsets, and file-backed lifecycle/result updates. Constraint: Keep the tool entrypoint in the tools crate and avoid copying the upstream TypeScript implementation Rejected: Spawn an external claw process | less aligned with the requested in-process runtime/client design Rejected: Leave execution in the CLI crate only | would keep tools::Agent as a metadata-only stub Confidence: medium Scope-risk: moderate Reversibility: clean Directive: Tool subset mappings are curated guardrails; revisit them before enabling recursive Agent access or richer agent definitions Tested: cargo build --release --manifest-path rust/Cargo.toml Tested: cargo test --manifest-path rust/Cargo.toml Not-tested: Live end-to-end background sub-agent run against Anthropic API credentials
This commit is contained in:
2
rust/Cargo.lock
generated
2
rust/Cargo.lock
generated
@@ -1545,10 +1545,12 @@ dependencies = [
|
||||
name = "tools"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"api",
|
||||
"reqwest",
|
||||
"runtime",
|
||||
"serde",
|
||||
"serde_json",
|
||||
"tokio",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
||||
Reference in New Issue
Block a user