Coming soonOOMU is launching soon. Downloads will open at launch.
← All documentation

Reference

Application Bridge API

Reference for the communication layer between OOMU's interface (the Next.js/React front end) and its desktop engine (the Tauri/Rust back end).

The bridge is the boundary where the user-facing application asks the native engine to do work: read a file safely, save a configuration, install a capability package, run inference. This document describes how that boundary works and catalogues the commands most relevant to integrators.


1. How the bridge works

The front end never touches the filesystem, database, or models directly. It calls commands; named functions implemented in Rust and exposed through Tauri's IPC. The interface invokes them through a single typed wrapper.

1.1 The invoke wrapper

All calls go through the application's invoke helper (src/lib/invoke.ts), which wraps Tauri's core invoke:

import { invoke } from "@/lib/invoke";

const mods = await invoke<InstalledMod[]>("list_installed_mods");
  • Signature: invoke<T>(command: string, args?: Record<string, unknown>): Promise<T>
  • Generic T is the expected return type; the back-end result is deserialised into it.
  • Runtime detection: when running inside the Tauri runtime, the call is dispatched to the native engine. In browser-based development (no Tauri runtime), the same call is routed to a local mock endpoint so the UI can be developed without the desktop shell.

1.2 Argument naming

Command arguments are passed as a plain object using camelCase keys. Tauri maps them to the corresponding snake_case parameters on the Rust command:

// Front end (camelCase)
await invoke("set_mod_active_state", { modId, active: nextState });

// Back end (snake_case parameters)
// fn set_mod_active_state(mod_id: String, active: bool, ...)

1.3 Error model

When a command fails, invoke throws an InvokeError rather than a raw rejection:

PropertyDescription
messageA human-readable description, always populated.
commandThe command name that failed.
codeA machine-readable error code when the back end supplied one (e.g. mod_picker_invalid_file, local_inference_cancelled).
detailThe original rejection value, preserved for debugging.

Expected cancellations (such as local_inference_cancelled) are surfaced distinctly from genuine failures, so the UI can treat a user-cancelled stream differently from an error.


2. Command reference

OOMU exposes a large command surface (roughly 290 commands as of the P1 expansion). This reference focuses on the categories an integrator works with most. Each command is a Tauri command invoked by name through the wrapper above. The full authoritative list is the set of #[tauri::command] functions registered in the Rust engine.

Convention: argument keys are shown in camelCase as the front end passes them. Return types describe the deserialised result.

2.1 Local context & path validation

These commands let the interface read user-selected files and folders safely, never by raw path access.

read_local_context

Reads a user file or directory into bounded text for use as conversation context, enforcing strict path safety.

  • Args: { path: string }; must be an absolute path. A leading ~ is expanded to the user's home directory.
  • Returns: { name, path, mimeType, byteCount, text, truncated }
  • Safety behaviour:
  • The path is canonicalised (aliases and symlinks are resolved to their real target) before any check, so a shortcut pointing outside the approved area is rejected on its real destination.
  • The resolved path must fall within the approved roots: the user's home directory, the system temporary directory, or the current workspace directory. Anything outside is refused.
  • Reads are bounded: per-file content is capped (96 KB per file), total context text is capped (128 KB), and directory walks are limited in depth (3 levels), entry count (240), and number of file excerpts (40). Oversized content is truncated and flagged with truncated: true.
  • Directory mode: when path is a directory, the response mimeType is text/x-directory-context and text contains a structured, depth-limited listing with excerpts.

list_local_directory

Lists the contents of a directory within the approved roots, for building file pickers and workspace views without granting raw filesystem access.

choose_local_model_directory / get_local_model_directory

Open a native folder picker for the local model directory, and read the currently configured directory.

choose_mod_package_path

Opens a native file picker filtered to .oomu packages.

  • Args: none
  • Returns: string | null; the chosen path, or null if cancelled. Rejects non-.oomu selections with code mod_picker_invalid_file.

2.2 Configuration

Commands that persist user configuration to the encrypted local database.

CommandPurposeArgs (camelCase)
save_agent_config / update_agent_configurationCreate/update an assistant (name, role, provider, model, reasoning).assistant config fields
get_agent_config / list_agent_configsRead one or all assistants.{ agentId } / none
delete_agent_configRemove an assistant.{ agentId }
save_provider_configAdd/update a cloud provider (API key, base URL, model ids, auto-route target flag).provider config fields
list_provider_configs / delete_provider_configManage configured providers.; / { providerId }
save_routing_preference / get_routing_preferencePersist primary/fallback route preference.route fields
set_routing_preferenceSet the active routing preference.route fields
update_chat_session_dynamic_routing_overrideTurn Auto-Route (dynamic routing) on/off for a specific session.{ sessionId, dynamicRoutingOverride }
save_session_config / get_session_configPer-session reasoning depth, context budget, model.session fields
get_default_prewarmed_model / set_default_prewarmed_modelRead/choose the local model pre-warmed on launch.; / { modelId }
set_automated_web_grounding_enabledToggle automatic web grounding (Privacy setting; off by default).{ enabled }

2.3 Capability packages (Mods)

CommandPurposeArgs (camelCase)Returns
install_mod_from_pathValidate and install a .oomu package from disk.{ path }InstalledMod
list_installed_modsList installed capabilities.noneInstalledMod[]
uninstall_modRemove an installed capability and its files.{ modId };
set_mod_active_stateToggle a Mod's global active state.{ modId, active };
bind_mod_to_agentAttach a Mod to an assistant.{ agentId, modId };
unbind_mod_to_agentDetach a Mod from an assistant.{ agentId, modId };
get_agent_modsList Mods bound to an assistant.{ agentId }Mod list

InstalledMod shape (camelCase over the IPC boundary):

type InstalledMod = {
  id: string;
  name: string;
  description: string;
  isActive: boolean;
  version: string;
  author: string;
  category: string;
  packageSize: string;
  lastUpdated: string;
  permissions: { label: string; detail: string }[];
  endpoints: string[];
};

2.4 Conversation & inference

CommandPurpose
create_chat_session / list_chat_sessions / delete_chat_session / rename_chat_sessionManage chat sessions.
list_chat_messagesRead messages in a session.
chat_turnRun a full chat turn through the router. Accepts automatedWebGroundingEnabled and dynamicRoutingOverride, and resolves Auto-Route (local vs. cloud) per turn.
classify_chat_intent_routeClassify a prompt as conversational vs. local-action (see Smart Model Routing).
stream_native_inference / cancel_native_inferenceStart and cancel a local streaming inference. Cancellation surfaces as code local_inference_cancelled.
run_provider_inferenceRun inference against a configured cloud provider.
sync_provider_modelsRefresh the model list for a provider.
get_session_context_status / execute_semantic_compactionReport a session's context usage and compact history when it approaches the context horizon.
inferLower-level single inference call.

Auto-Route (dynamic routing). When a session is bound to the special dynamic route, chat_turn scores each prompt's complexity and selects the engine per turn: below threshold → local Gemma; at/above → the provider marked as the Auto-Route target (or a cost-efficient cloud fallback). The per-session toggle is set via update_chat_session_dynamic_routing_override.

2.5 Workflows

CommandPurposeArgs (camelCase)
get_workflow_capability_catalogList available workflow capabilities (agent, control, MCP tool, system action), merged with connected MCP tools.;
compose_workflowDraft a workflow from a natural-language prompt against the catalogue.{ prompt, capabilityCatalog, workflowId?, name? }
edit_workflowRevise an existing workflow from a natural-language instruction.{ prompt, capabilityCatalog, workflowId, name? }
save_workflowPersist a workflow (versioned).workflow fields
get_workflows / get_workflow_irsList saved workflows / their compiled IR.;
run_workflowExecute a saved workflow.workflow run fields
resolve_workflow_permissionApprove or decline a paused permission gate mid-run.{ ... , approved }
reveal_workflow_output_fileOpen a workflow's output file.{ path }
delete_workflowRemove a saved workflow.{ ... }

Workflow composition (compose_workflow / edit_workflow) is gated by a feature flag (OOMU_WORKFLOW_AUTHORING_P0), enabled by default; when disabled these return a disabled response.

2.6 Trust & sandbox

CommandPurpose
get_sandbox_statusReport the current sandbox state.
get_sovereign_trust_dashboardRead all directory trust policies and active trust sessions.
upsert_sovereign_trust_policy / revoke_sovereign_trust_policyCreate/update or revoke a per-directory trust policy.
activate_sovereign_trust_session / revoke_sovereign_trust_sessionStart or end a time-boxed trust session.

See Privacy & Sandboxing for what these govern.

2.7 Locale, models & diagnostics

CommandPurpose
get_locale_state / set_active_localeRead and set the interface language (OOMU ships localised UI in multiple languages).
list_local_models / get_local_model_statusEnumerate and check the local model(s).
run_system_diagnostics / get_system_diagnostic_contextProduce a diagnostics report / context.
get_launch_readinessReport whether the workspace is ready to use.
mcp_builtin_server_configsList built-in MCP server configurations available to connect.

2.8 Projects

CommandPurpose
create_project / list_projects / get_project / update_projectManage Project workspaces.
archive_project / preview_project_deletion / delete_projectArchive, preview the impact of, or permanently delete a Project.
attach_project_source / list_project_sources / refresh_project_source / revoke_project_sourceManage a Project's knowledge folders and their indexing.
set_project_instructions / set_project_policy / set_project_connectorConfigure a Project's instructions, data policy, and connector bindings.
project_policy_preflightEvaluate a Project's data policy before a cloud/connector/remote transmission.
get_project_memory_summarySummarise Project-scoped memory with provenance.

2.9 Tasks (the control plane)

CommandPurpose
list_task_runs / get_task_runList/read canonical task runs across every runtime (workflow, agent, routine, browser, artifact, delegation).
cancel_task_run / retry_task_run / resume_task_run / acknowledge_task_failureRoute lifecycle controls to the owning runtime; retries reuse idempotency records.
reconcile_task_runs / get_recoverable_actionsReconcile non-terminal tasks with their owning runtime on startup/refresh.
reconnect_task_eventsResume the ordered task event stream from the last sequence number.
reserve_task_effect / verify_task_effectReserve an idempotent effect and verify its observed postcondition.

2.10 Routines, background helper & channels

CommandPurpose
propose_routineParse a natural-language schedule into a proposed Routine with normalized next runs.
create_routine / list_routines / get_routine / update_routine / delete_routine / duplicate_routineManage Routines.
pause_routine / resume_routine / run_routine_now / get_routine_historyControl and inspect Routine runs.
grant_routine_authorityGrant task/project-scoped preauthorization for headless consequential actions.
get_background_service_status / set_background_service_enabledRead/toggle the macOS background helper (Login Item).
list_channel_configs / save_channel_config / get_channel_statusesConfigure Signal/Telegram/WhatsApp/Discord delivery and control channels.
queue_message / get_queued_messages / execute_queued_messagesThe remote-control message queue.

2.11 Connectors (work apps)

CommandPurpose
list_connector_manifests / list_connector_accountsEnumerate available connectors and connected accounts.
begin_connector_oauthStart an OAuth (PKCE, loopback-bound) authorization for Google/Slack/Microsoft 365.
test_connector / get_capability_healthProbe a connection's real health.
execute_connector_operationRun a connector tool (reads direct; writes are approval-gated).
disconnect_connectorRevoke and remove a connected account.

2.12 Documents & artifacts

CommandPurpose
create_artifact / list_artifacts / get_artifact / revise_artifactBuild and revise a DOCX/PDF artifact from the Artifact IR.
create_workbook / create_workbook_from_template / revise_workbook_rangeXLSX workbook pipeline.
create_presentation / revise_presentation_scope / recheck_presentation_revisionPPTX presentation pipeline.
get_artifact_preview_page / get_workbook_preview / get_presentation_previewRendered previews.
export_artifact / export_workbook_revision / export_presentation_revision / choose_artifact_export_destinationExport with an explicit destination grant.
sign_artifact / verify_artifact_signature / get_artifact_pipeline_healthProvenance signing and verification.

2.13 Automation: browser & app control

CommandPurpose
start_browser_automation / get_browser_automation_session / control_browser_automation / close_native_browserGuarded browser session lifecycle.
execute_browser_actionRun one reference-based browser action (navigate, click, type, select, upload, download, wait).
export_browser_download / choose_browser_uploadQuarantined download export / approved upload.
start_app_control_session / observe_app_control_session / get_app_control_statusObserve a qualified macOS app before acting.
review_and_execute_app_control_action / control_app_control_sessionExecute a typed, approved app action; pause/take-over/return.

2.14 Media, delegation, learning & remote

CommandPurpose
ingest_media_asset / list_media_assets / get_media_asset_data / delete_media_assetMedia asset pipeline (voice/image/screenshot).
save_media_transcript / save_media_alt_text / analyze_media_image / sanitize_media_imageTranscription, vision, redaction.
create_delegation_plan / execute_delegation_plan / cancel_delegation_child / retry_delegation_childBounded parallel read-only helpers, owned by the parent Task.
prepare_learning_offer / review_learning_offer / list_saved_methods / edit_saved_method / set_saved_method_enabled / go_back_saved_method / forget_saved_methodReviewable, reversible learned recipes.
list_remote_devices / rename_remote_device / revoke_remote_device / execute_remote_command / retrieve_remote_artifactRemote device management and scoped remote commands.

2.15 Capability bundles

CommandPurpose
inspect_capability_bundleStatic inspection and capability diff before install.
activate_capability_bundle / disable_capability_bundle / list_capability_bundlesInstall/enable, disable, and list bundles.
authorize_bundle_capabilityGrant a declared capability at activation.
list_capability_registry / refresh_capability_registryBrowse the curated registry (signing and review status are distinct).

2.16 First-run setup

CommandPurpose
get_setup_state / save_setup_progressResumable first-run setup state machine.
run_setup_sample_taskRun the guided end-to-end sample task.
accept_license / decline_licenseMandatory license acceptance gate.
get_weekly_decision_brief_status / create_decision_brief_from_delegationThe "Weekly brief" starter flow.

3. Notes for integrators

  • Treat every path through read_local_context. Do not attempt to pass raw paths to other commands expecting filesystem access; the safe-path boundary is enforced centrally and exists for the user's protection.
  • Long-running work returns promptly. Heavy operations (installs, inference) run off the UI thread on the back end; the invoke promise resolves when the work completes or streams.
  • Codes over messages for control flow. When you need to branch on a specific failure (cancellation, invalid file), check InvokeError.code, not the message text.