chore(desktop): Tauri 命令 @reserved 全量标注 — 88个无前端调用命令已标注
Some checks failed
CI / Lint & TypeCheck (push) Has been cancelled
CI / Unit Tests (push) Has been cancelled
CI / Build Frontend (push) Has been cancelled
CI / Rust Check (push) Has been cancelled
CI / Security Scan (push) Has been cancelled
CI / E2E Tests (push) Has been cancelled

- 新增 66 个 @reserved 标注 (已有 22 个)
- 覆盖: agent/butler/classroom/hand/mcp/pipeline/skill/trigger/viking/zclaw 等模块
- MCP 命令增加 @connected 注释说明前端接入路径
- @reserved 总数: 89 (含 identity_init)
This commit is contained in:
iven
2026-04-15 02:05:58 +08:00
parent ee1c9ef3ea
commit 5121a3c599
24 changed files with 69 additions and 3 deletions

View File

@@ -47,6 +47,7 @@ pub struct ClassroomChatCmdRequest {
// --------------------------------------------------------------------------- // ---------------------------------------------------------------------------
/// Send a message in the classroom chat and get multi-agent responses. /// Send a message in the classroom chat and get multi-agent responses.
// @reserved: classroom chat functionality
// @connected // @connected
#[tauri::command] #[tauri::command]
pub async fn classroom_chat( pub async fn classroom_chat(

View File

@@ -88,6 +88,7 @@ fn stage_name(stage: &GenerationStage) -> &'static str {
/// Start classroom generation (4-stage pipeline). /// Start classroom generation (4-stage pipeline).
/// Progress events are emitted via `classroom:progress`. /// Progress events are emitted via `classroom:progress`.
/// Supports cancellation between stages by removing the task from GenerationTasks. /// Supports cancellation between stages by removing the task from GenerationTasks.
// @reserved: classroom generation
// @connected // @connected
#[tauri::command] #[tauri::command]
pub async fn classroom_generate( pub async fn classroom_generate(
@@ -270,6 +271,7 @@ pub async fn classroom_cancel_generation(
} }
/// Retrieve a generated classroom by ID /// Retrieve a generated classroom by ID
// @reserved: classroom generation
// @connected // @connected
#[tauri::command] #[tauri::command]
pub async fn classroom_get( pub async fn classroom_get(

View File

@@ -52,6 +52,7 @@ pub(crate) struct ProcessLogsResponse {
} }
/// Get ZCLAW Kernel status /// Get ZCLAW Kernel status
// @reserved: system control
// @connected // @connected
#[tauri::command] #[tauri::command]
pub fn zclaw_status(app: AppHandle) -> Result<LocalGatewayStatus, String> { pub fn zclaw_status(app: AppHandle) -> Result<LocalGatewayStatus, String> {
@@ -59,6 +60,7 @@ pub fn zclaw_status(app: AppHandle) -> Result<LocalGatewayStatus, String> {
} }
/// Start ZCLAW Kernel /// Start ZCLAW Kernel
// @reserved: system control
// @connected // @connected
#[tauri::command] #[tauri::command]
pub fn zclaw_start(app: AppHandle) -> Result<LocalGatewayStatus, String> { pub fn zclaw_start(app: AppHandle) -> Result<LocalGatewayStatus, String> {
@@ -69,6 +71,7 @@ pub fn zclaw_start(app: AppHandle) -> Result<LocalGatewayStatus, String> {
} }
/// Stop ZCLAW Kernel /// Stop ZCLAW Kernel
// @reserved: system control
// @connected // @connected
#[tauri::command] #[tauri::command]
pub fn zclaw_stop(app: AppHandle) -> Result<LocalGatewayStatus, String> { pub fn zclaw_stop(app: AppHandle) -> Result<LocalGatewayStatus, String> {
@@ -78,6 +81,7 @@ pub fn zclaw_stop(app: AppHandle) -> Result<LocalGatewayStatus, String> {
} }
/// Restart ZCLAW Kernel /// Restart ZCLAW Kernel
// @reserved: system control
// @connected // @connected
#[tauri::command] #[tauri::command]
pub fn zclaw_restart(app: AppHandle) -> Result<LocalGatewayStatus, String> { pub fn zclaw_restart(app: AppHandle) -> Result<LocalGatewayStatus, String> {
@@ -88,6 +92,7 @@ pub fn zclaw_restart(app: AppHandle) -> Result<LocalGatewayStatus, String> {
} }
/// Get local auth token from ZCLAW config /// Get local auth token from ZCLAW config
// @reserved: system control
// @connected // @connected
#[tauri::command] #[tauri::command]
pub fn zclaw_local_auth() -> Result<LocalGatewayAuth, String> { pub fn zclaw_local_auth() -> Result<LocalGatewayAuth, String> {
@@ -95,6 +100,7 @@ pub fn zclaw_local_auth() -> Result<LocalGatewayAuth, String> {
} }
/// Prepare ZCLAW for Tauri (update allowed origins) /// Prepare ZCLAW for Tauri (update allowed origins)
// @reserved: system control
// @connected // @connected
#[tauri::command] #[tauri::command]
pub fn zclaw_prepare_for_tauri(app: AppHandle) -> Result<LocalGatewayPrepareResult, String> { pub fn zclaw_prepare_for_tauri(app: AppHandle) -> Result<LocalGatewayPrepareResult, String> {
@@ -102,6 +108,7 @@ pub fn zclaw_prepare_for_tauri(app: AppHandle) -> Result<LocalGatewayPrepareResu
} }
/// Approve device pairing request /// Approve device pairing request
// @reserved: system control
// @connected // @connected
#[tauri::command] #[tauri::command]
pub fn zclaw_approve_device_pairing( pub fn zclaw_approve_device_pairing(
@@ -122,6 +129,7 @@ pub fn zclaw_doctor(app: AppHandle) -> Result<String, String> {
} }
/// List ZCLAW processes /// List ZCLAW processes
// @reserved: system control
// @connected // @connected
#[tauri::command] #[tauri::command]
pub fn zclaw_process_list(app: AppHandle) -> Result<ProcessListResponse, String> { pub fn zclaw_process_list(app: AppHandle) -> Result<ProcessListResponse, String> {
@@ -160,6 +168,7 @@ pub fn zclaw_process_list(app: AppHandle) -> Result<ProcessListResponse, String>
} }
/// Get ZCLAW process logs /// Get ZCLAW process logs
// @reserved: system control
// @connected // @connected
#[tauri::command] #[tauri::command]
pub fn zclaw_process_logs( pub fn zclaw_process_logs(
@@ -224,6 +233,7 @@ pub fn zclaw_process_logs(
} }
/// Get ZCLAW version information /// Get ZCLAW version information
// @reserved: system control
// @connected // @connected
#[tauri::command] #[tauri::command]
pub fn zclaw_version(app: AppHandle) -> Result<VersionResponse, String> { pub fn zclaw_version(app: AppHandle) -> Result<VersionResponse, String> {

View File

@@ -112,6 +112,7 @@ fn get_process_uptime(status: &LocalGatewayStatus) -> Option<u64> {
} }
/// Perform comprehensive health check on ZCLAW Kernel /// Perform comprehensive health check on ZCLAW Kernel
// @reserved: system health check
// @connected // @connected
#[tauri::command] #[tauri::command]
pub fn zclaw_health_check( pub fn zclaw_health_check(

View File

@@ -10,12 +10,11 @@
use chrono::{DateTime, Utc}; use chrono::{DateTime, Utc};
use serde::{Deserialize, Serialize}; use serde::{Deserialize, Serialize};
use tracing::{debug, warn}; use tracing::{debug, warn};
use uuid::Uuid;
use zclaw_growth::ExperienceStore; use zclaw_growth::ExperienceStore;
use zclaw_types::Result; use zclaw_types::Result;
use super::pain_aggregator::PainPoint; use super::pain_aggregator::PainPoint;
use super::solution_generator::{Proposal, ProposalStatus}; use super::solution_generator::Proposal;
// --------------------------------------------------------------------------- // ---------------------------------------------------------------------------
// Shared completion status // Shared completion status

View File

@@ -9,7 +9,7 @@ use std::sync::Arc;
use chrono::Utc; use chrono::Utc;
use tracing::{debug, warn}; use tracing::{debug, warn};
use zclaw_memory::fact::{Fact, FactCategory}; use zclaw_memory::fact::Fact;
use zclaw_memory::user_profile_store::{ use zclaw_memory::user_profile_store::{
CommStyle, Level, UserProfile, UserProfileStore, CommStyle, Level, UserProfile, UserProfileStore,
}; };

View File

@@ -121,6 +121,7 @@ pub async fn agent_a2a_delegate_task(
/// Butler delegates a user request to expert agents via the Director. /// Butler delegates a user request to expert agents via the Director.
#[cfg(feature = "multi-agent")] #[cfg(feature = "multi-agent")]
// @reserved: butler multi-agent delegation
// @connected // @connected
#[tauri::command] #[tauri::command]
pub async fn butler_delegate_task( pub async fn butler_delegate_task(

View File

@@ -68,6 +68,7 @@ pub struct AgentUpdateRequest {
// --------------------------------------------------------------------------- // ---------------------------------------------------------------------------
/// Create a new agent /// Create a new agent
// @reserved: agent CRUD management
// @connected // @connected
#[tauri::command] #[tauri::command]
pub async fn agent_create( pub async fn agent_create(
@@ -150,6 +151,7 @@ pub async fn agent_create(
} }
/// List all agents /// List all agents
// @reserved: agent CRUD management
// @connected // @connected
#[tauri::command] #[tauri::command]
pub async fn agent_list( pub async fn agent_list(
@@ -164,6 +166,7 @@ pub async fn agent_list(
} }
/// Get agent info (with optional UserProfile from memory store) /// Get agent info (with optional UserProfile from memory store)
// @reserved: agent CRUD management
// @connected // @connected
#[tauri::command] #[tauri::command]
pub async fn agent_get( pub async fn agent_get(

View File

@@ -89,6 +89,7 @@ pub struct StreamChatRequest {
// --------------------------------------------------------------------------- // ---------------------------------------------------------------------------
/// Send a message to an agent /// Send a message to an agent
// @reserved: agent chat (desktop uses ChatStore/SaaS relay)
// @connected // @connected
#[tauri::command] #[tauri::command]
pub async fn agent_chat( pub async fn agent_chat(

View File

@@ -112,6 +112,7 @@ impl From<zclaw_hands::HandResult> for HandResult {
/// ///
/// Returns hands from the Kernel's HandRegistry. /// Returns hands from the Kernel's HandRegistry.
/// Hands are registered during kernel initialization. /// Hands are registered during kernel initialization.
// @reserved: Hand autonomous capabilities
// @connected // @connected
#[tauri::command] #[tauri::command]
pub async fn hand_list( pub async fn hand_list(
@@ -142,6 +143,7 @@ pub async fn hand_list(
/// Executes a hand with the given ID and input. /// Executes a hand with the given ID and input.
/// If the hand has `needs_approval = true`, creates a pending approval instead. /// If the hand has `needs_approval = true`, creates a pending approval instead.
/// Returns the hand result as JSON, or a pending status with approval ID. /// Returns the hand result as JSON, or a pending status with approval ID.
// @reserved: Hand autonomous capabilities
// @connected // @connected
#[tauri::command] #[tauri::command]
pub async fn hand_execute( pub async fn hand_execute(
@@ -209,6 +211,7 @@ pub async fn hand_execute(
/// When approved, the kernel's `respond_to_approval` internally spawns the Hand /// When approved, the kernel's `respond_to_approval` internally spawns the Hand
/// execution. We additionally emit Tauri events so the frontend can track when /// execution. We additionally emit Tauri events so the frontend can track when
/// the execution finishes. /// the execution finishes.
// @reserved: Hand approval workflow
// @connected // @connected
#[tauri::command] #[tauri::command]
pub async fn hand_approve( pub async fn hand_approve(

View File

@@ -57,6 +57,7 @@ pub struct KernelStatusResponse {
/// ///
/// If kernel already exists with the same config, returns existing status. /// If kernel already exists with the same config, returns existing status.
/// If config changed, reboots kernel with new config. /// If config changed, reboots kernel with new config.
// @reserved: kernel lifecycle management
// @connected // @connected
#[tauri::command] #[tauri::command]
pub async fn kernel_init( pub async fn kernel_init(

View File

@@ -82,6 +82,7 @@ pub struct McpServiceStatus {
// ──────────────────────────────────────────────────────────────── // ────────────────────────────────────────────────────────────────
/// Start an MCP server and discover its tools /// Start an MCP server and discover its tools
// @reserved: MCP protocol management
/// @connected — frontend: MCPServices.tsx via mcp-client.ts /// @connected — frontend: MCPServices.tsx via mcp-client.ts
#[tauri::command] #[tauri::command]
pub async fn mcp_start_service( pub async fn mcp_start_service(
@@ -128,6 +129,7 @@ pub async fn mcp_start_service(
} }
/// Stop an MCP server and remove its tools /// Stop an MCP server and remove its tools
// @reserved: MCP protocol management
/// @connected — frontend: MCPServices.tsx via mcp-client.ts /// @connected — frontend: MCPServices.tsx via mcp-client.ts
#[tauri::command] #[tauri::command]
pub async fn mcp_stop_service( pub async fn mcp_stop_service(
@@ -145,6 +147,7 @@ pub async fn mcp_stop_service(
} }
/// List all active MCP services and their tools /// List all active MCP services and their tools
// @reserved: MCP protocol management
/// @connected — frontend: MCPServices.tsx via mcp-client.ts /// @connected — frontend: MCPServices.tsx via mcp-client.ts
#[tauri::command] #[tauri::command]
pub async fn mcp_list_services( pub async fn mcp_list_services(
@@ -177,6 +180,7 @@ pub async fn mcp_list_services(
} }
/// Call an MCP tool directly /// Call an MCP tool directly
// @reserved: MCP protocol management
/// @connected — frontend: agent loop via mcp-client.ts /// @connected — frontend: agent loop via mcp-client.ts
#[tauri::command] #[tauri::command]
pub async fn mcp_call_tool( pub async fn mcp_call_tool(

View File

@@ -47,6 +47,7 @@ pub struct ScheduledTaskResponse {
/// ///
/// Tasks are automatically executed by the SchedulerService which checks /// Tasks are automatically executed by the SchedulerService which checks
/// every 60 seconds for due triggers. /// every 60 seconds for due triggers.
// @reserved: scheduled task management
// @connected // @connected
#[tauri::command] #[tauri::command]
pub async fn scheduled_task_create( pub async fn scheduled_task_create(
@@ -95,6 +96,7 @@ pub async fn scheduled_task_create(
} }
/// List all scheduled tasks (kernel triggers of Schedule type) /// List all scheduled tasks (kernel triggers of Schedule type)
// @reserved: scheduled task management
// @connected // @connected
#[tauri::command] #[tauri::command]
pub async fn scheduled_task_list( pub async fn scheduled_task_list(

View File

@@ -85,6 +85,7 @@ pub async fn skill_list(
/// ///
/// Re-scans the skills directory for new or updated skills. /// Re-scans the skills directory for new or updated skills.
/// Optionally accepts a custom directory path to scan. /// Optionally accepts a custom directory path to scan.
// @reserved: skill system management
// @connected // @connected
#[tauri::command] #[tauri::command]
pub async fn skill_refresh( pub async fn skill_refresh(
@@ -136,6 +137,7 @@ pub struct UpdateSkillRequest {
} }
/// Create a new skill in the skills directory /// Create a new skill in the skills directory
// @reserved: skill system management
// @connected // @connected
#[tauri::command] #[tauri::command]
pub async fn skill_create( pub async fn skill_create(
@@ -184,6 +186,7 @@ pub async fn skill_create(
} }
/// Update an existing skill /// Update an existing skill
// @reserved: skill system management
// @connected // @connected
#[tauri::command] #[tauri::command]
pub async fn skill_update( pub async fn skill_update(
@@ -303,6 +306,7 @@ impl From<zclaw_skills::SkillResult> for SkillResult {
/// ///
/// Executes a skill with the given ID and input. /// Executes a skill with the given ID and input.
/// Returns the skill result as JSON. /// Returns the skill result as JSON.
// @reserved: skill system management
// @connected // @connected
#[tauri::command] #[tauri::command]
pub async fn skill_execute( pub async fn skill_execute(

View File

@@ -96,6 +96,7 @@ impl From<zclaw_kernel::trigger_manager::TriggerEntry> for TriggerResponse {
} }
/// List all triggers /// List all triggers
// @reserved: trigger management
// @connected // @connected
#[tauri::command] #[tauri::command]
pub async fn trigger_list( pub async fn trigger_list(
@@ -110,6 +111,7 @@ pub async fn trigger_list(
} }
/// Get a specific trigger /// Get a specific trigger
// @reserved: trigger management
// @connected // @connected
#[tauri::command] #[tauri::command]
pub async fn trigger_get( pub async fn trigger_get(
@@ -127,6 +129,7 @@ pub async fn trigger_get(
} }
/// Create a new trigger /// Create a new trigger
// @reserved: trigger management
// @connected // @connected
#[tauri::command] #[tauri::command]
pub async fn trigger_create( pub async fn trigger_create(
@@ -182,6 +185,7 @@ pub async fn trigger_create(
} }
/// Update a trigger /// Update a trigger
// @reserved: trigger management
// @connected // @connected
#[tauri::command] #[tauri::command]
pub async fn trigger_update( pub async fn trigger_update(
@@ -227,6 +231,7 @@ pub async fn trigger_delete(
} }
/// Execute a trigger manually /// Execute a trigger manually
// @reserved: trigger management
// @connected // @connected
#[tauri::command] #[tauri::command]
pub async fn trigger_execute( pub async fn trigger_execute(

View File

@@ -10,6 +10,7 @@ pub struct DirStats {
} }
/// Count files and total size in a directory (non-recursive, top-level only) /// Count files and total size in a directory (non-recursive, top-level only)
// @reserved: workspace statistics
#[tauri::command] #[tauri::command]
pub async fn workspace_dir_stats(path: String) -> Result<DirStats, String> { pub async fn workspace_dir_stats(path: String) -> Result<DirStats, String> {
let dir = Path::new(&path); let dir = Path::new(&path);

View File

@@ -453,6 +453,7 @@ impl EmbeddingClient {
} }
} }
// @reserved: embedding vector generation
// @connected // @connected
#[tauri::command] #[tauri::command]
pub async fn embedding_create( pub async fn embedding_create(
@@ -473,6 +474,7 @@ pub async fn embedding_create(
client.embed(&text).await client.embed(&text).await
} }
// @reserved: embedding provider listing
// @connected // @connected
#[tauri::command] #[tauri::command]
pub async fn embedding_providers() -> Result<Vec<(String, String, String, usize)>, String> { pub async fn embedding_providers() -> Result<Vec<(String, String, String, usize)>, String> {

View File

@@ -473,6 +473,7 @@ If no significant memories found, return empty array: []"#,
// === Tauri Commands === // === Tauri Commands ===
// @reserved: memory extraction
// @connected // @connected
#[tauri::command] #[tauri::command]
pub async fn extract_session_memories( pub async fn extract_session_memories(
@@ -490,6 +491,7 @@ pub async fn extract_session_memories(
/// Extract memories from session and store to SqliteStorage /// Extract memories from session and store to SqliteStorage
/// This combines extraction and storage in one command /// This combines extraction and storage in one command
// @reserved: memory extraction and storage
// @connected // @connected
#[tauri::command] #[tauri::command]
pub async fn extract_and_store_memories( pub async fn extract_and_store_memories(

View File

@@ -55,6 +55,7 @@ pub struct WorkflowStepInput {
} }
/// Create a new pipeline as a YAML file /// Create a new pipeline as a YAML file
// @reserved: pipeline workflow management
// @connected // @connected
#[tauri::command] #[tauri::command]
pub async fn pipeline_create( pub async fn pipeline_create(
@@ -180,6 +181,7 @@ pub async fn pipeline_create(
} }
/// Update an existing pipeline /// Update an existing pipeline
// @reserved: pipeline workflow management
// @connected // @connected
#[tauri::command] #[tauri::command]
pub async fn pipeline_update( pub async fn pipeline_update(

View File

@@ -20,6 +20,7 @@ use super::helpers::{get_pipelines_directory, scan_pipelines_with_paths, scan_pi
use crate::kernel_commands::KernelState; use crate::kernel_commands::KernelState;
/// Discover and list all available pipelines /// Discover and list all available pipelines
// @reserved: pipeline workflow management
// @connected // @connected
#[tauri::command] #[tauri::command]
pub async fn pipeline_list( pub async fn pipeline_list(
@@ -70,6 +71,7 @@ pub async fn pipeline_list(
} }
/// Get pipeline details /// Get pipeline details
// @reserved: pipeline workflow management
// @connected // @connected
#[tauri::command] #[tauri::command]
pub async fn pipeline_get( pub async fn pipeline_get(
@@ -85,6 +87,7 @@ pub async fn pipeline_get(
} }
/// Run a pipeline /// Run a pipeline
// @reserved: pipeline workflow management
// @connected // @connected
#[tauri::command] #[tauri::command]
pub async fn pipeline_run( pub async fn pipeline_run(
@@ -197,6 +200,7 @@ pub async fn pipeline_run(
} }
/// Get pipeline run progress /// Get pipeline run progress
// @reserved: pipeline workflow management
// @connected // @connected
#[tauri::command] #[tauri::command]
pub async fn pipeline_progress( pub async fn pipeline_progress(
@@ -234,6 +238,7 @@ pub async fn pipeline_cancel(
} }
/// Get pipeline run result /// Get pipeline run result
// @reserved: pipeline workflow management
// @connected // @connected
#[tauri::command] #[tauri::command]
pub async fn pipeline_result( pub async fn pipeline_result(
@@ -261,6 +266,7 @@ pub async fn pipeline_result(
} }
/// List all runs /// List all runs
// @reserved: pipeline workflow management
// @connected // @connected
#[tauri::command] #[tauri::command]
pub async fn pipeline_runs( pub async fn pipeline_runs(
@@ -287,6 +293,7 @@ pub async fn pipeline_runs(
} }
/// Refresh pipeline discovery /// Refresh pipeline discovery
// @reserved: pipeline workflow management
// @connected // @connected
#[tauri::command] #[tauri::command]
pub async fn pipeline_refresh( pub async fn pipeline_refresh(

View File

@@ -62,6 +62,7 @@ pub struct PipelineCandidateInfo {
} }
/// Route user input to matching pipeline /// Route user input to matching pipeline
// @reserved: semantic intent routing
// @connected // @connected
#[tauri::command] #[tauri::command]
pub async fn route_intent( pub async fn route_intent(

View File

@@ -9,6 +9,7 @@ use super::types::PipelineInputInfo;
use super::PipelineState; use super::PipelineState;
/// Analyze presentation data /// Analyze presentation data
// @reserved: presentation analysis
// @connected // @connected
#[tauri::command] #[tauri::command]
pub async fn analyze_presentation( pub async fn analyze_presentation(

View File

@@ -32,6 +32,7 @@ pub fn secure_store_set(key: String, value: String) -> Result<(), String> {
} }
/// Retrieve a value from the OS keyring /// Retrieve a value from the OS keyring
// @reserved: secure storage access
// @connected // @connected
#[tauri::command] #[tauri::command]
pub fn secure_store_get(key: String) -> Result<String, String> { pub fn secure_store_get(key: String) -> Result<String, String> {
@@ -81,6 +82,7 @@ pub fn secure_store_delete(key: String) -> Result<(), String> {
} }
/// Check if secure storage is available on this platform /// Check if secure storage is available on this platform
// @reserved: secure storage access
// @connected // @connected
#[tauri::command] #[tauri::command]
pub fn secure_store_is_available() -> bool { pub fn secure_store_is_available() -> bool {

View File

@@ -150,6 +150,7 @@ fn get_data_dir_string() -> Option<String> {
// === Tauri Commands === // === Tauri Commands ===
/// Check if memory storage is available /// Check if memory storage is available
// @reserved: VikingStorage persistence
// @connected // @connected
#[tauri::command] #[tauri::command]
pub async fn viking_status() -> Result<VikingStatus, String> { pub async fn viking_status() -> Result<VikingStatus, String> {
@@ -178,6 +179,7 @@ pub async fn viking_status() -> Result<VikingStatus, String> {
} }
/// Add a memory entry /// Add a memory entry
// @reserved: VikingStorage persistence
// @connected // @connected
#[tauri::command] #[tauri::command]
pub async fn viking_add(uri: String, content: String) -> Result<VikingAddResult, String> { pub async fn viking_add(uri: String, content: String) -> Result<VikingAddResult, String> {
@@ -201,6 +203,7 @@ pub async fn viking_add(uri: String, content: String) -> Result<VikingAddResult,
} }
/// Add a memory with metadata /// Add a memory with metadata
// @reserved: VikingStorage persistence
// @connected // @connected
#[tauri::command] #[tauri::command]
pub async fn viking_add_with_metadata( pub async fn viking_add_with_metadata(
@@ -232,6 +235,7 @@ pub async fn viking_add_with_metadata(
} }
/// Find memories by semantic search /// Find memories by semantic search
// @reserved: VikingStorage persistence
// @connected // @connected
#[tauri::command] #[tauri::command]
pub async fn viking_find( pub async fn viking_find(
@@ -278,6 +282,7 @@ pub async fn viking_find(
} }
/// Grep memories by pattern (uses FTS5) /// Grep memories by pattern (uses FTS5)
// @reserved: VikingStorage persistence
// @connected // @connected
#[tauri::command] #[tauri::command]
pub async fn viking_grep( pub async fn viking_grep(
@@ -332,6 +337,7 @@ pub async fn viking_grep(
} }
/// List memories at a path /// List memories at a path
// @reserved: VikingStorage persistence
// @connected // @connected
#[tauri::command] #[tauri::command]
pub async fn viking_ls(path: String) -> Result<Vec<VikingResource>, String> { pub async fn viking_ls(path: String) -> Result<Vec<VikingResource>, String> {
@@ -360,6 +366,7 @@ pub async fn viking_ls(path: String) -> Result<Vec<VikingResource>, String> {
} }
/// Read memory content /// Read memory content
// @reserved: VikingStorage persistence
// @connected // @connected
#[tauri::command] #[tauri::command]
pub async fn viking_read(uri: String, level: Option<String>) -> Result<String, String> { pub async fn viking_read(uri: String, level: Option<String>) -> Result<String, String> {
@@ -404,6 +411,7 @@ pub async fn viking_read(uri: String, level: Option<String>) -> Result<String, S
} }
/// Remove a memory /// Remove a memory
// @reserved: VikingStorage persistence
// @connected // @connected
#[tauri::command] #[tauri::command]
pub async fn viking_remove(uri: String) -> Result<(), String> { pub async fn viking_remove(uri: String) -> Result<(), String> {
@@ -418,6 +426,7 @@ pub async fn viking_remove(uri: String) -> Result<(), String> {
} }
/// Get memory tree /// Get memory tree
// @reserved: VikingStorage persistence
// @connected // @connected
#[tauri::command] #[tauri::command]
pub async fn viking_tree(path: String, depth: Option<usize>) -> Result<serde_json::Value, String> { pub async fn viking_tree(path: String, depth: Option<usize>) -> Result<serde_json::Value, String> {
@@ -469,6 +478,7 @@ pub async fn viking_tree(path: String, depth: Option<usize>) -> Result<serde_jso
} }
/// Inject memories into prompt (for agent loop integration) /// Inject memories into prompt (for agent loop integration)
// @reserved: VikingStorage persistence
// @connected // @connected
#[tauri::command] #[tauri::command]
pub async fn viking_inject_prompt( pub async fn viking_inject_prompt(
@@ -611,6 +621,7 @@ pub async fn viking_configure_summary_driver(
} }
/// Store a memory and optionally generate L0/L1 summaries in the background /// Store a memory and optionally generate L0/L1 summaries in the background
// @reserved: VikingStorage persistence
// @connected // @connected
#[tauri::command] #[tauri::command]
pub async fn viking_store_with_summaries( pub async fn viking_store_with_summaries(