Expand description
Built-in tools for Merry runtimes.
This crate owns Merry-provided tool implementations and adapts filesystem
bounded text/image reads and opt-in constrained workspace edits into
runtime-registered tools without making the runtime own real workspace
access policy. The public merry::tool declaration macro is re-exported by
the facade crate; this crate only contains the implementation dependency.
A workspace has one root. A relative path is normalized to root-relative
components and dot segments are resolved lexically; an absolute path is used
as the caller named it, and an absolute path below the workspace root is
rewritten to its relative spelling so one file never has two identities. A
path outside the workspace root is not limited to a configured root, because
the process sandbox, accepted process profile, and trusted path rules already
decide which paths exist and which of them are writable. Every spelling is
accepted, including dot-prefixed components. A relative path is walked
without following symlink components, and on Unix file opens also use
O_NOFOLLOW to avoid following a symlink swapped into the leaf path between
validation and open. This is not an OS sandbox and does not claim complete
hardening against malicious concurrent filesystem mutation, including
replacement of intermediate directories during an operation.
Re-exports§
pub use browser::BROWSER_NETWORK_TOOL;pub use browser::BROWSER_TAB_TOOL;pub use browser::BrowserConfig;pub use browser::BrowserLaunchSpec;pub use browser::BrowserLauncherFuture;pub use browser::BrowserNetworkTool;pub use browser::BrowserProcessHandle;pub use browser::BrowserProcessLauncher;pub use browser::BrowserSessionManager;pub use browser::BrowserTabTool;pub use browser::ProcessRunnerBrowserLauncher;pub use browser::child_browser_process_handle;pub use web_fetch::WEB_FETCH_TOOL;pub use web_fetch::WebFetchConfig;pub use web_fetch::WebFetchTool;
Modules§
- browser
- Native CDP browser automation and inspection tools (
browser_tab&browser_network). - ssrf
- Dual-gate SSRF URL and IP validation for outbound web and browser tools.
- web_
fetch - Lightweight HTTP fetcher with dual-gate SSRF protection and HTML-to-Markdown conversion.
Structs§
- Workspace
Patch Success - Successful
apply_patchresult with one entry per changed file. - Workspace
Patch Success Change - One file change inside a successful
apply_patchresult. - Workspace
Patch Success Line - One line of a change entry.
- Workspace
Read Image Success - Structured success envelope produced by
read_filewhen reading an image. - Workspace
Read PdfPages Success - Structured success envelope produced by
read_filewhen rendering PDF pages as images. - Workspace
Tool Limits - Limits applied by workspace tools.
- Workspace
Tools - Built-in filesystem tools with validated, session-stable definitions.
- Workspace
Tools Config - Configuration for workspace tools.
Enums§
- External
Write Kind - Kind of filesystem mutation attempted against an external governed tree.
- Workspace
Patch Operation Kind - File operation that produced a successful change entry.
- Workspace
Patch Success Line Kind - Kind of one line inside a change entry.
- Workspace
Tool Config Error - Errors raised while validating workspace tool configuration.
Constants§
- APPLY_
PATCH_ TOOL - Registered tool name for opt-in constrained file patches.
- READ_
FILE_ TOOL - Registered tool name for bounded read-only file reads (UTF-8 text, images, PDFs, Office docs, and notebooks).
Traits§
- External
Tree Policy - Governance and lifecycle hooks for an external writable tree outside the workspace root (for example a durable memory store).