#[non_exhaustive]pub struct BuiltinToolsConfig {
pub file_tracker: Arc<FileTracker>,
pub todo_store: Arc<TodoStore>,
pub on_question: Option<Arc<OnQuestion>>,
pub workspace: Option<PathBuf>,
pub dangerous_tools: bool,
pub env_policy: EnvPolicy,
pub protected_paths: Vec<PathBuf>,
pub twitter_credentials: Option<TwitterCredentials>,
pub allowlist: Option<Vec<String>>,
pub path_policy: Option<Arc<CorePathPolicy>>,
pub skill_dirs: Vec<PathBuf>,
pub context_recall_store: Option<Arc<ContextRecallStore>>,
}Expand description
Configuration for creating built-in tools.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.file_tracker: Arc<FileTracker>Shared mtime-based read-before-write tracker.
todo_store: Arc<TodoStore>Shared todo-list store for the todo tool.
on_question: Option<Arc<OnQuestion>>Optional callback that resolves structured questions raised by the agent.
workspace: Option<PathBuf>Optional workspace root; tools restrict path access to descendants when set.
dangerous_tools: boolEnable dangerous tools (e.g. bash). Default: false.
env_policy: EnvPolicyEnvironment variable policy for bash subprocesses.
protected_paths: Vec<PathBuf>File path patterns to deny access to (e.g., *.env, *.pem).
twitter_credentials: Option<TwitterCredentials>X/Twitter credentials for the twitter_post builtin tool (per-tenant).
allowlist: Option<Vec<String>>Optional allowlist of builtin tool names. When Some, only tools whose
name appears in this list are returned. When None, all builtins are
returned (backward compatible).
path_policy: Option<Arc<CorePathPolicy>>Application-layer path policy applied to all filesystem builtins
(bash, read, write, edit, patch). When set, check_path is called
before any I/O, complementing the existing workspace + protected_paths
mechanism and the Linux-only Landlock sandbox.
skill_dirs: Vec<PathBuf>Explicit, highest-precedence skill directories given to the skill tool
(each holding <name>/SKILL.md). These are searched before the
conventional .opencode/.claude/skills walk and are the SAME dirs the
Level-1 catalog is built from, so the catalog never advertises a skill the
tool cannot load. Empty (default) = conventional discovery only.
context_recall_store: Option<Arc<ContextRecallStore>>When present, registers the fetch_full_output / recall_context tools
and is shared with the runner for indexing. None = feature off (zero
overhead: tools not registered, no indexing).