Skip to main content

Crate subspace_agent_tools

Crate subspace_agent_tools 

Source
Expand description

The agent tools a board advertises. Copilot chat and the MCP server register the same tools, so a board’s operations behave the same through either consumer. No GPUI and no SDK dependency.

Re-exports§

pub use help::BoardDoc;
pub use help::HELP_TOOL;
pub use help::help_tool;
pub use help_image::HelpImage;
pub use help_image::help_image_reply;

Modules§

envelope
Shared metadata for content that tools return as untrusted evidence.
help
The board help tool: the same compiled-in Markdown the shell shows, read only, for the active boards alone. One generic tool, so no board or product code is needed to publish a document to Copilot chat and MCP.
help_image
Bounded, compile-time help assets. This interface never reads files or URLs.
refresh
Board-agnostic refresh coordination (REQ-17/REQ-18): concurrent refreshes of the same target share one fetch, a repeated refresh within the cooldown is refused and reported (never silently served from cache), and refreshedAt only ever increases for a target. A board picks its own target keys, such as item:42 or scope.
schema
JSON schemas for action-tagged tools.
secrets
Credential-like text detection shared by every tool surface.
web
Framework web tools shared by chat, MCP and generated commands.

Structs§

Catalog
The tools of the selected boards, in product order.
ChatToolEndpoint
One open endpoint: Streamable HTTP at url, which needs Authorization: Bearer <token>.
Invocation
One call of a tool.
ReadTool
ToolEnvironment
What a board needs to build its tools: the loaded configuration and the credential sources, as the dashboards receive them.
ToolSpec
How a consumer lists a tool.
Unattended
Approves every batch. For a consumer whose client asks its user itself.
Unmonitored
A monitor that reports nowhere and never cancels.
WriteTool

Enums§

Access
Whether a tool only reads its service or can change it.
ApprovalPolicy
Whether a surface must obtain one explicit decision before a call.
Arguments
The declarative arguments shared by chat, MCP and generated commands.
ToolHost
The process that builds the tools. A board whose tools act on state only the running app holds, such as live connections, builds them only for ToolHost::App: the headless mcp command and the generated commands cannot reach that state.

Constants§

MAX_BATCH
The most operations, and the most items such as risk ids, in one batch.
NO_RETRY

Traits§

AgentTool
One tool a board advertises.
Approval
Asks for one decision about one write batch. Chat shows an approval card; the MCP server leaves the decision to its client.
CallMonitor
Watches one call: progress reports out, cancellation in. Both are optional for a consumer.
ChatToolServer
ReadService
A board’s read actions. Request is a strict, action-tagged enum, so an unknown action or field is refused before any service call.
WriteService
A board’s write actions.

Functions§

application_tools
Builds the Application group separately without changing chat’s catalog path.
application_tools_for_boards
Restricts retained content independently of the Application tools’ own switch.
blocking
Runs a blocking client call off the async runtime.
catalog
The tools of providers, built for environment, in order.
catalog_with_help
The tools of providers, then the board help tool for docs. Every consumer builds its catalog here, so chat and MCP list the same help.
configured_repo
Only the configured repositories, compared without case and never by prefix.
decoded
encoded
summary
Every target, revision, field and complete body. JSON escapes control characters, so they cannot hide actions in the approval preview.

Type Aliases§

ToolProvider
A board’s tools for one environment.