victauri-macros 0.1.3

Proc macros for Victauri — auto-instrumentation of Tauri commands
Documentation

victauri-macros

Proc macros for Victauri -- auto-instrumentation of Tauri commands for AI agent introspection.

The #[inspectable] Macro

Annotate any #[tauri::command] to make it discoverable by Victauri's MCP server:

use victauri_macros::inspectable;

#[tauri::command]
#[inspectable(
    description = "Greet the user",
    intent = "say hello",
    category = "social",
    example = "greet someone"
)]
async fn greet(name: String) -> String {
    format!("Hello, {name}!")
}

This generates a companion function greet__schema() that returns a CommandInfo struct containing the command's name, parameters, and all metadata. Victauri's MCP tools use this for command discovery, natural language resolution, and ghost command detection.

Attributes

Attribute Required Description
description Yes What the command does
intent No Natural language intent for NL-to-command resolution
category No Grouping label (e.g., "settings", "data", "ui")
example No Example usage phrase

All code generation happens at compile time with zero runtime cost.

Documentation

Full API docs: docs.rs/victauri-macros

License

Apache-2.0 -- see LICENSE

Part of Victauri. Built by 4DA Systems.