Tauri Command Reference
This page documents the current command surface registered in src-tauri/src/lib.rs and consumed by the React frontend.
Naming and Payload Conventions
- Rust command names use
snake_case. - Frontend
invokecalls use the same command names. - Argument key casing depends on the command signature:
- direct function arguments typically use Rust-style names
- request structs can opt into
camelCasevia serde attributes (for exampleSpawnAgentRequest)
Command Groups
Agents (commands/agent.rs)
spawn_agentlist_agentslist_agent_metricskill_agentpause_agentresume_agentclear_agent_sessionrename_agentreorder_agentsupdate_agent_configenable_agent_worktreelist_agent_worktreesassign_agent_worktreedelete_agent_worktreedisable_agent_worktree
Worktree commands update agent config only. UI callers that move an agent between the source checkout and a worktree must follow the config command with clear_agent_session so the provider starts fresh in the new workspace instead of resuming across a cwd change. enable_agent_worktree accepts an optional worktree_name. Wardian uses the provided name, or the agent session name when it is omitted, for the wardian/<slug> branch and the project-sibling <source-checkout>.wt/<slug> folder. list_agent_worktrees includes external Git worktrees for known source workspaces and marks only unassigned Wardian-managed worktrees as deletable. delete_agent_worktree removes only unassigned Git-registered worktrees under Wardian-managed roots, including legacy <wardian-home>/agents/<session-id>/worktrees/ paths, cleans Wardian-generated build-cache redirects, and uses non-force Git removal; it does not remove assigned worktrees, source checkouts, or external worktree paths.
The live control protocol exposes CLI wrappers for the same worktree operations: agent_worktree_list, agent_worktree_enable, agent_worktree_join, and agent_worktree_disable. Unlike the raw Tauri worktree commands, the control mutation handlers call clear_agent_session after moving an agent workspace so CLI behavior matches the GUI flow.
Terminal (commands/terminal.rs)
send_input_to_agentsubmit_prompt_to_agentsend_binary_input_to_agentinject_session_inputbroadcast_inputresize_agent_terminalread_agent_pty
send_input_to_agent and send_binary_input_to_agent are raw PTY input paths for terminal interaction. They must not be used as the source of truth for structured agent-to-agent communication.
submit_prompt_to_agent is the structured prompt submission command for live agents. It returns a DeliveryDetail and routes through the same backend live-surface delivery service used by CLI sends, command panel sends, remote prompt sends, workflow live routing, and mailbox drain. It must not be replaced with raw send_input_to_agent calls for prompt injection. Fixed sleeps before injection are not a correctness mechanism; delivery should wait for readiness evidence or queue the interaction.
read_agent_pty drains buffered terminal output after agent-pty-output-ready. It is display data and compatibility evidence only. Structured ask/reply completion, Queue evidence, and provider status transitions must not depend on replaying this text.
Classes (commands/class.rs)
list_agent_classescreate_agent_classdelete_agent_classget_default_class_instructionreset_class_to_defaultreset_all_class_prompts
Watchlists (commands/watchlist.rs)
load_watchlistssave_watchlistsload_queue_itemssave_queue_itemsload_queue_preferencessave_queue_preferencesload_agent_interactionssave_agent_interactions
The CLI team and watchlist commands read and write watchlists/index.json directly. They normalize the current v2 state shape and legacy flat watchlist arrays for reads, write canonical v2 JSON for mutations, and best-effort notify the running app when the local control endpoint is available. Team create/add/split operations also seed communication-topology edges while preserving existing seed-suppression tombstones.
Queue commands persist the frontend Queue projection and preferences for the active Wardian home. Queue items should carry stable evidence_id and evidence_source fields when they are derived from provider runtime events, interaction-store events, or other live runtime evidence. Startup hydration may restore these items, but it must not create new completion or action-needed evidence.
load_agent_interactions and save_agent_interactions preserve the existing lightweight graph interaction projection. They are separate from the backend interaction control plane records used by structured ask and reply.
Filesystem and Explorer (commands/fs.rs)
resolve_system_include_directoriesvalidate_directory_pathget_explorer_rootget_directory_treedelete_filereveal_in_explorerread_file_preview
Workflows (commands/workflow.rs)
Current workflow commands:
workflow_parseworkflow_validateworkflow_writeworkflow_list_blueprintsworkflow_list_runsworkflow_read_runworkflow_runworkflow_resumeworkflow_approveworkflow_cancelschedule_createschedule_listschedule_pauseschedule_resumeschedule_removeschedule_run_now
Old workflow system command names such as run_workflow, list_workflows, list_scheduled_runs, and create_scheduled_run belong to the retired JSON workflow system. Do not add new frontend behavior against those names.
Library (commands/library.rs)
get_library_treesave_library_itemupdate_library_metadataopen_library_folderdeploy_skillremove_deployed_skilllist_deployed_skillslist_deployed_skill_refslist_skill_deploymentslibrary_watchlibrary_unwatch
Settings and Patch (commands/settings.rs, commands/patch.rs)
run_gemini_patchlist_available_shellsget_settings_folder_pathload_shell_settingsreturns resolved shell settings plus sparse user overrides.save_shell_settingsaccepts the versioned shell settings document and persists sparse overrides.load_app_settingsreturns resolved app settings plus sparse user overrides.save_app_settingsaccepts the versioned app settings document and persists sparse overrides.save_agent_session_persistencesave_opencode_theme
Remote Access (commands/remote.rs)
load_remote_access_statusload_remote_gateway_configsave_remote_gateway_configcreate_remote_pairing_offerlist_remote_deviceslist_pending_remote_pairing_requestsload_remote_setup_checkapprove_remote_pairing_requestreject_remote_pairing_requestrevoke_remote_device
Debug builds also register debug_create_remote_session for native gateway tests. It is not registered in release builds.
Git (commands/git.rs)
git_statusgit_initgit_clone_repositorygit_current_branchgit_loggit_commit_changesgit_diff_filegit_diff_file_against_workspacegit_show_file_revisiongit_stagegit_unstagegit_discard_changesgit_ignoregit_commitgit_commit_signedgit_commit_staged_signedgit_commit_all_signedgit_commit_signed_no_verifygit_commit_staged_signed_no_verifygit_commit_all_signed_no_verifygit_commit_no_verifygit_commit_staged_no_verifygit_commit_all_no_verifygit_commit_emptygit_commit_empty_no_verifygit_commit_amendgit_commit_amend_no_verifygit_commit_staged_amend_no_verifygit_commit_all_amend_no_verifygit_commit_staged_amendgit_commit_all_amendgit_undo_last_commitgit_rebase_abortgit_pullgit_list_branchesgit_checkout_branchgit_create_branchgit_stash_pushgit_list_stashesgit_show_stashgit_stash_stagedgit_stash_apply_latestgit_stash_applygit_stash_pop_latestgit_stash_popgit_stash_dropgit_stash_drop_allgit_fetchgit_pushgit_create_worktreegit_remove_worktreegit_watchgit_unwatch
Event Surface (Backend -> Frontend)
Common app-level events:
agent-metricsagent-json-eventagent-pty-output-readyagent-terminal-clearedagents-updatedworkflow-telemetryworkflow-progressworkflow-status-updatedscheduled-runs-updatedgit-changedlibrary-changedwith payload{ "library_type": "skills" }
For payload semantics, see IPC and Event Governance and the workflow engine docs.
Live Control Protocol
The standalone wardian CLI primarily talks to the desktop app through Wardian's live control endpoint rather than Tauri invoke. These command contracts share DTOs with crates/wardian-core/src/control.rs:
send_messageasksubmit_replyagent_watch
send_message routes provider-aware delivery to one or more targets. Delivery responses contain runtime_state, delivery_state, input_mode, optional message_id, delivery_phase, observed_state, reason, profile, and provider-specific error details. When the target runtime is not ready for live input, the command should queue the message in the mailbox or fail according to its queue policy instead of injecting text early. This slice does not create durable message interactions for ordinary send calls; structured durability belongs to ask and reply.
ask creates a task interaction with reply_required, delivers the prompt plus reply instructions, and waits for the parent task to reach a terminal structured state. It returns the attached structured reply when complete. Output-marker waiting remains a compatibility mode, but it is not the structured ask/reply completion path.
submit_reply resolves the request ID against the interaction store, creates or attaches a reply interaction, and completes the parent task. Unknown request IDs fail deterministically. Duplicate replies must be rejected or handled by an explicit idempotency policy. When origin contains a Wardian agent session ID, the backend verifies that the sender is the task target.
agent_watch returns ordered status, transcript, output, and delivery evidence from watch state. delivery snapshots are derived from delivery watch events. Raw PTY output is opt-in and should be used only for terminal rendering or transport debugging.
Provider input readiness is tracked separately from provider install readiness. Live delivery gates on per-session provider input state:
{
"session_id": "uuid-1",
"generation": 7,
"state": "ready",
"ready_evidence": "prompt_detected",
"observed_at": "2026-05-25T16:00:00.000Z"
}Provider runtime status remains authoritative for provider-internal states such as action_required. Interaction status tracks Wardian-owned delivery and reply lifecycle only.
Change Management Guidance
When adding or changing commands:
- Register/unregister in
src-tauri/src/lib.rs. - Update frontend invoke callsites.
- Update this reference page.
- Update user or developer guides impacted by behavior changes.