Skip to main content

Module dispatch

Module dispatch 

Source
Expand description

Tool dispatch: the execution path from invoke to tool result.

Contains ToolDispatch (the return type of invoke_with_audit), the dispatch-stage methods of ToolRegistry, touched-file recording, argument preview generation, and path containment helpers.

Structs§

ToolDispatch
Return value of ToolRegistry::invoke_with_audit: the tool result and its accompanying audit record.

Enums§

AccessTier
Access tier for a sandbox root. ReadOnly roots permit read operations only; ReadWrite roots permit both reads and writes. The primary workspace root is always ReadWrite; extra dirs declared via [sandbox] extra_readonly_dirs (or the TUI /add-dir --read-only flow) are ReadOnly.

Functions§

args_preview_for_permission
Build a short human-readable preview of tool arguments for the permission dialog. Extracts up to 80 characters.
new_shared_sandbox_roots
Construct an empty shared sandbox-roots slot.
resolve_within
Resolve a possibly-relative path against the workspace root.
resolve_within_any
Multi-root variant of resolve_within. The candidate path is resolved against a set of allowed roots; it is accepted when its canonical form falls under at least one root. Symlink-aware canonicalisation is applied per-root exactly as in the single-root case.

Type Aliases§

SharedSandboxRoots
Shared, session-scoped sandbox roots. This is the runtime-mutable companion to the static extra_roots baked into each tool at build time: the TUI’s /add-dir command (and, in future, an interactive out-of-scope-read grant) appends entries here, and every structured filesystem tool consults the snapshot in resolve_within_any on each call so newly added roots take effect immediately — without rebuilding the agent runtime.