1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
//! # entelix-tools
//!
//! Built-in [`entelix_core::tools::Tool`] impls. First-party code
//! touches zero `std::fs` / `std::process` (Invariant 9); shell- and
//! filesystem-class tools delegate execution through the
//! [`entelix_core::sandbox::Sandbox`] trait, whose concrete
//! implementations ship as 1.x companion crates.
//!
//! ## Surface
//!
//! - [`HttpFetchTool`] — HTTP fetch with **mandatory host allowlist**
//! (SSRF defense), redirect cap, response-size cap, method
//! allowlist, cancellation-aware. The allowlist is *opt-in by
//! construction*: an `HttpFetchTool::builder()` without any allowed
//! hosts produces a tool that refuses every URL.
//! - [`HostAllowlist`] — domain / wildcard / literal-IP rules with a
//! fail-closed default policy.
//! - [`Calculator`] — arithmetic over `f64` (`+ - * / parens`).
//! Recursive-descent parser; no `eval` or shell-out. Generated
//! from a free async fn via the [`tool`] macro.
//! - [`SearchProvider`] (trait) + [`SearchTool`] — adapter for
//! external search APIs (Brave / Tavily / Perplexity / …).
//! Concrete providers are deferred to 1.1 (same trait-only policy
//! as for `Embedder`).
//!
//! Coding-agent vertical tools (`SandboxedShellTool`,
//! `SandboxedCodeTool`, `Sandboxed{Read,Write,ListDir}FileTool`,
//! `ShellPolicy`, `CodePolicy`, `SandboxSkill`) live in the
//! `entelix-tools-coding` companion crate so this horizontal surface
//! stays free of coding-shape opinions.
// Doc-prose lints fire on legitimate proper nouns (HTTP, URL, SSRF,
// API names) and on the `RFC1918` shorthand; the redundant_pub_crate
// lint disagrees with the workspace `unreachable_pub` rule for items
// inside private modules. `Tool` trait methods return `&str` whose
// lifetime is bound by the trait — clippy keeps suggesting elision
// that the trait signature forbids.
// Make the crate self-referential so the `#[tool]` proc-macro's
// generated `::entelix_tools::SchemaTool` paths resolve when the
// macro is invoked from inside this crate. Standard Rust hygiene
// pattern for proc-macro consumers that re-export their own macro.
extern crate self as entelix_tools;
pub use ;
pub use ;
/// `#[tool]` attribute macro — generates a [`SchemaTool`] impl
/// from an `async fn` signature. Doc-comment first paragraph
/// becomes the tool description; the function name (snake_case)
/// becomes the tool struct name (PascalCase). See the
/// `entelix-tool-derive` crate docs for the full contract.
pub use tool;
pub use ;
pub use ;
pub use ;
pub use ;
pub use ;