Skip to main content

Crate rightkit_agent_tools

Crate rightkit_agent_tools 

Source
Expand description

rightkit-agent-tools: one typed tool interface for agents over the Right Suite.

  • Tool / ToolSpec: a name, a JSON schema and an effect class.
  • Toolbox: registry plus the one gate every call passes (hard exposure rules, per-caller allowlist, argument schema, the caller’s admission hook, journal).
  • Backends: <app>.* over each app’s in-app control service (rightkit-qa-driver on rightkit-daemon, including the app’s own typed commands), desktop.* over rightkit-automation, browser.* over rightkit-browser, speech.* over the shared speech service (rightkit-speech-client, the first client).
  • right-ctl <app> <command>: the CLI over the same toolbox.

HeardRight’s rules are built in and not configurable: no dictation, text delivery, pasteboard or history tool can be registered or called (exposure).

Re-exports§

pub use backends::control::control_tools;
pub use backends::control::AppProfile;
pub use backends::control::CommandPolicy;
pub use backends::control::CLIENT_APP;
pub use backends::control::CONTROL_METHODS;

Modules§

backends
Backends that turn a capability into typed crate::Tools.
exposure
Hard exposure rules, applied before any allowlist or admission hook and not overridable by configuration.

Structs§

CallCtx
Caller
Who is calling (the allowlist key).
CancelToken
Cooperative cancellation a tool may poll.
JsonlJournal
Appends one JSON object per event to a file (content-free; never uploaded).
MemoryJournal
Metrics
Content-free counters.
ToolError
Stable machine-readable failure.
ToolRequest
Content-free description of one intended call (no argument values).
ToolSpec
Toolbox

Enums§

DeniedBy
Effect
What a tool does to the world, for admission and journaling. Content-free.
ToolEvent
Lifecycle events for the caller’s journal. Content-free.
Verdict

Constants§

CTL_CALLER
The caller identity right-ctl uses (and the service-side allowlist key).
ERR_CANCELLED
ERR_DENIED
ERR_INVALID_ARGS
ERR_NOT_ALLOWED
ERR_NOT_EXPOSED
ERR_UNKNOWN_TOOL

Traits§

Journal
Tool
ToolAdmission
The caller-supplied pre-effect hook (CodeRight EFF-001: validate, approve, execute, settle). approve runs after the toolbox’s own validation and before the tool does anything; a denial executes nothing.

Functions§

add_app
Register one app profile and grant CTL_CALLER its patterns.
control_toolbox
A toolbox for the CLI caller: <app>.* tools for each named app (built-in AppProfile::for_app profile), speech.* when HeardRight is among them, and allowlist patterns granting right-ctl exactly what each profile allows.
shared
Convenience: share a toolbox.
validate_args
Minimal schema check: required present, declared primitive types and enums match.