Skip to main content

Crate merry_tools

Crate merry_tools 

Source
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§

WorkspacePatchSuccess
Successful apply_patch result with one entry per changed file.
WorkspacePatchSuccessChange
One file change inside a successful apply_patch result.
WorkspacePatchSuccessLine
One line of a change entry.
WorkspaceReadImageSuccess
Structured success envelope produced by read_file when reading an image.
WorkspaceReadPdfPagesSuccess
Structured success envelope produced by read_file when rendering PDF pages as images.
WorkspaceToolLimits
Limits applied by workspace tools.
WorkspaceTools
Built-in filesystem tools with validated, session-stable definitions.
WorkspaceToolsConfig
Configuration for workspace tools.

Enums§

ExternalWriteKind
Kind of filesystem mutation attempted against an external governed tree.
WorkspacePatchOperationKind
File operation that produced a successful change entry.
WorkspacePatchSuccessLineKind
Kind of one line inside a change entry.
WorkspaceToolConfigError
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§

ExternalTreePolicy
Governance and lifecycle hooks for an external writable tree outside the workspace root (for example a durable memory store).