-
Notifications
You must be signed in to change notification settings - Fork 0
docs, ci: corrections that landed after #1 merged #2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -25,11 +25,12 @@ use crate::spec::ToolSpec; | |
| /// That split is the point. A tool never enforces policy on itself — it | ||
| /// describes itself accurately and the host enforces. | ||
| /// | ||
| /// # The defaults are not uniformly safe, and two of them fail OPEN | ||
| /// # The defaults are not uniformly safe — four of them are permissive | ||
| /// | ||
| /// Most defaults are the cautious answer — [`Self::scope`] is `All`, | ||
| /// [`Self::is_concurrency_safe`] is `false`, [`Self::timeout_policy`] inherits | ||
| /// the host's bound. Three are not, and a tool author who assumes otherwise | ||
| /// Two defaults are genuinely cautious: [`Self::is_concurrency_safe`] is | ||
| /// `false`, so nothing is dispatched in parallel unless a tool says it is safe, | ||
| /// and [`Self::timeout_policy`] inherits the host's bound rather than opting | ||
| /// out of it. **Four are permissive**, and a tool author who assumes otherwise | ||
| /// ships a hole: | ||
| /// | ||
| /// - **[`Self::external_effect`] defaults to `false`.** A tool that sends an | ||
|
|
@@ -45,8 +46,12 @@ use crate::spec::ToolSpec; | |
| /// - **[`Self::permission_level`] defaults to | ||
| /// [`PermissionLevel::ReadOnly`]**, not [`PermissionLevel::None`], because | ||
| /// most tools genuinely read — but a writing tool must say so. | ||
| /// - **[`Self::scope`] defaults to [`ToolScope::All`]**, the *widest* setting: | ||
| /// the tool is offered to the autonomous agent loop, the CLI and RPC alike. A | ||
| /// tool that should only ever be driven deliberately by a human has to say | ||
| /// [`ToolScope::CliRpcOnly`]; leaving the default hands it to the loop. | ||
| /// | ||
| /// If you are reviewing a `Tool` impl, those three are what to check for | ||
| /// If you are reviewing a `Tool` impl, those four are what to check for | ||
|
Comment on lines
+49
to
+54
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win Align the README safety summary with this classification.
🤖 Prompt for AI Agents |
||
| /// absence. The rest are safe to leave alone. | ||
| #[async_trait] | ||
| pub trait Tool: Send + Sync { | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This correction now conflicts with
README.md:90-96, which still describesscope = Allas cautious and says only three defaults fail open. Readers following the README will therefore receive exactly the guidance this rustdoc change is intended to correct; update that summary to countscopeamong the four permissive defaults.Useful? React with 👍 / 👎.