Skip to main content

Module tools

Module tools 

Source
Expand description

Tool registry, dispatch and the built-in (gated) tools.

Every tool is registered with a Policy. Deny tools are not advertised to the model and never run; Ask tools run only if the front-end’s Approver agrees.

Structs§

AllowAll
CallScope
The run a single tool call belongs to, the approver that call’s policy was put to, and the registry the call arrived through.
DenyAll
Fetch
ReadFile
RunScope
What one run is, as far as a tool that starts children needs to know.
Shell
ToolDescriptor
Everything known about one tool, in one place.
ToolOutcome
ToolRegistry
ToolSpec
Tool definition in the OpenAI tools array format.
ToolSpecFunction
WriteFile
write_file: the workspace, and one more allowed root, the scripts directory.

Enums§

ToolError
ToolSource
Who put this tool in the registry. Shown by eclipse tools list, in the panel and in the schema document’s description of itself, because “which tool is this and who added it” is the first question when an extension misbehaves.

Constants§

TOOL_SCHEMA_ID
The $id of the document eclipse tools schema prints.

Traits§

Approver
Decides whether a tool with Policy::Ask may run.
Tool

Functions§

confine
Resolve requested against root and ensure the result, after following symlinks in its existing part, stays inside root. root must already be canonical.
truncate
Truncate to at most max bytes on a word boundary, noting the cut.