Add SharedTool, share_belt and owned_belt - #46
Conversation
Updated the test in `mod_tests.rs` to use the correct expected value for an edge case scenario, ensuring the test accurately validates the module's behavior under that condition. Auto-committed-on: macbook Co-authored-by: Medulla <medulla@tinyhumans.ai>
The `shared` module is now publicly re-exported from the library root so that downstream consumers can access its types and functions directly through the crate's public API. Auto-committed-on: macbook Co-authored-by: Medulla <medulla@tinyhumans.ai>
Replace the stub module with a working implementation that bridges between shared `Arc<dyn Tool>` references and owned `Box<dyn Tool>` belts. A host can now keep one copy of each built tool and hand out per-turn owned belts without rebuilding any tool, while `SharedTool` delegates every call to the shared instance so state like connections or caches is never duplicated. Auto-committed-on: macbook Co-authored-by: Medulla <medulla@tinyhumans.ai>
Add the `shared` subdirectory to the crate tree diagram in AGENTS.md and include a table entry for the `shared` module in README.md, describing `SharedTool` and its belt-based ownership pattern. Also reformat a long assertion in the module's test file to improve readability. Auto-committed-on: macbook Co-authored-by: Medulla <medulla@tinyhumans.ai>
The test for `every_execute_entry_point_reaches_the_inner_override` was constructing a `ToolCallOptions` with a redundant `..ToolCallOptions::default()` spread, since the only field set was already the default. The subsequent call to `execute_with_options` also unnecessarily cloned the options. Both have been cleaned up to make the test more concise and idiomatic. Auto-committed-on: macbook Co-authored-by: Medulla <medulla@tinyhumans.ai>
…across owned belts Co-authored-by: Medulla <medulla@tinyhumans.ai>
Tiny Sweeper reviewTiny Sweeper reviewed this change across 6 lane(s) and found 0 active actionable finding(s). Detailed lane evidence and any incomplete work are listed below. State: Incomplete Review snapshot
Completeness: Incomplete What changedThe review could not produce a supported behavioral summary; inspect the cited changed surface and lane details below. FeaturesNone identified with supported citations. TestsNo supported feature-to-test mapping was produced. Test execution is not inferred. FindingsNo active actionable findings. Could not review: AGENTS.md, README.md, crates/tinytools/README.md, crates/tinytools/src/lib.rs, crates/tinytools/src/shared/mod.rs, crates/tinytools/src/shared/mod_tests.rs, crates/tinytools/src/shared/types.rs Before merge
Agent review detailscritique
security
tests
commits
description
e2e
Evidence and run details
|
|
Warning Review limit reached
This review includes 7 billable files and costs up to $1.75. Or wait 58 minutes for your next included review. View limit detailsLimit details: You’ve used the included review currently available. Review configuration: ⚙️ Run configuration
📒 Files selected for processing (7)
Comment |
There was a problem hiding this comment.
tinysweeper found nothing blocking, but could not review everything, so this is not an approval: AGENTS.md, README.md, crates/tinytools/README.md, crates/tinytools/src/lib.rs, crates/tinytools/src/shared/mod.rs, crates/tinytools/src/shared/mod_tests.rs, crates/tinytools/src/shared/types.rs.
$0.0038 · 38,048 in / 19,992 out · 12,806 cached (34%) · flash, deepseek/deepseek-v4-flash
tests: $0.0030 · 10,476 in / 15,010 out · 9,323 cached (89%) · deepseek/deepseek-v4-flash
description: $0.0003 · 9,954 in / 93 out · 0 cached (0%) · deepseek/deepseek-v4-flash
Summary
Moves OpenCompany's
hive/shared_tool.rsinto the vocabulary crate so hosts stop re-implementing it.tinytools::sharedmodule, re-exported at the crate root:SharedTool::new(Arc<dyn Tool>)— an ownedBox<dyn Tool>handle over one shared instance. It forwards all 26Toolmethods explicitly, including the 22 defaulted declarations, so a wrappedWrite/effectful/hidden tool never reads as the trait default.share_belt(Vec<Box<dyn Tool>>) -> Vec<Arc<dyn Tool>>owned_belt(&[Arc<dyn Tool>]) -> Vec<Box<dyn Tool>>— per-turn owned belt, no tool rebuilt.execute*entry points), plus belt sharing/ordering.Commands run