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
//! Spec for the `web_fetch` tool.
//!
//! `web_fetch` has no in-process implementation: the conversation sandbox has no
//! outbound network, so the GET is performed on the trusted side (the control
//! plane). The harness advertises this spec via a proxy tool that forwards the
//! call up the harness stream, exactly like `paid_fetch` — but non-paying. It is
//! read-only and ungated.
use ToolSpec;
use json;
/// The `web_fetch` tool name.
pub const WEB_FETCH: &str = "web_fetch";
/// Scoping/audit name for the LLM provider's native web-search-grounding
/// primitive (issue `#1226`).
///
/// E.g. a request-level flag the provider turns into its own built-in search
/// tool entry mid-generation. Unlike every other name in this crate, this is
/// NEVER advertised as a [`ToolSpec`]: the model doesn't emit a `tool_use`
/// call to invoke it (the provider grounds transparently when the flag is
/// set), so there is nothing for the harness to intercept and no schema to
/// show the model. It exists purely so this name can appear in an agent's
/// `builtinTools` grant list and be checked by
/// [`crate::capability::native_search_grounding_requirements`] — the same
/// `required ⊆ granted` comparison every real tool call goes through, applied
/// once per step instead of per call.
///
/// Re-exported from [`polyc_capability`] rather than defined here: the
/// per-step gate lives in `polyc_agent`, which cannot depend on `polyc_tools`
/// (the reverse dependency already exists), so the ONE literal lives in the
/// shared foundation crate both sides import.
pub const NATIVE_SEARCH_GROUNDING: &str = NATIVE_SEARCH_GROUNDING;
/// `web_fetch` spec — a plain HTTP GET, performed trusted-side, read-only.