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
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:
@@ -121,6 +121,7 @@ pub async fn agent_a2a_delegate_task(
|
||||
|
||||
/// Butler delegates a user request to expert agents via the Director.
|
||||
#[cfg(feature = "multi-agent")]
|
||||
// @reserved: butler multi-agent delegation
|
||||
// @connected
|
||||
#[tauri::command]
|
||||
pub async fn butler_delegate_task(
|
||||
|
||||
@@ -68,6 +68,7 @@ pub struct AgentUpdateRequest {
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
/// Create a new agent
|
||||
// @reserved: agent CRUD management
|
||||
// @connected
|
||||
#[tauri::command]
|
||||
pub async fn agent_create(
|
||||
@@ -150,6 +151,7 @@ pub async fn agent_create(
|
||||
}
|
||||
|
||||
/// List all agents
|
||||
// @reserved: agent CRUD management
|
||||
// @connected
|
||||
#[tauri::command]
|
||||
pub async fn agent_list(
|
||||
@@ -164,6 +166,7 @@ pub async fn agent_list(
|
||||
}
|
||||
|
||||
/// Get agent info (with optional UserProfile from memory store)
|
||||
// @reserved: agent CRUD management
|
||||
// @connected
|
||||
#[tauri::command]
|
||||
pub async fn agent_get(
|
||||
|
||||
@@ -89,6 +89,7 @@ pub struct StreamChatRequest {
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
/// Send a message to an agent
|
||||
// @reserved: agent chat (desktop uses ChatStore/SaaS relay)
|
||||
// @connected
|
||||
#[tauri::command]
|
||||
pub async fn agent_chat(
|
||||
|
||||
@@ -112,6 +112,7 @@ impl From<zclaw_hands::HandResult> for HandResult {
|
||||
///
|
||||
/// Returns hands from the Kernel's HandRegistry.
|
||||
/// Hands are registered during kernel initialization.
|
||||
// @reserved: Hand autonomous capabilities
|
||||
// @connected
|
||||
#[tauri::command]
|
||||
pub async fn hand_list(
|
||||
@@ -142,6 +143,7 @@ pub async fn hand_list(
|
||||
/// Executes a hand with the given ID and input.
|
||||
/// 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.
|
||||
// @reserved: Hand autonomous capabilities
|
||||
// @connected
|
||||
#[tauri::command]
|
||||
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
|
||||
/// execution. We additionally emit Tauri events so the frontend can track when
|
||||
/// the execution finishes.
|
||||
// @reserved: Hand approval workflow
|
||||
// @connected
|
||||
#[tauri::command]
|
||||
pub async fn hand_approve(
|
||||
|
||||
@@ -57,6 +57,7 @@ pub struct KernelStatusResponse {
|
||||
///
|
||||
/// If kernel already exists with the same config, returns existing status.
|
||||
/// If config changed, reboots kernel with new config.
|
||||
// @reserved: kernel lifecycle management
|
||||
// @connected
|
||||
#[tauri::command]
|
||||
pub async fn kernel_init(
|
||||
|
||||
@@ -82,6 +82,7 @@ pub struct McpServiceStatus {
|
||||
// ────────────────────────────────────────────────────────────────
|
||||
|
||||
/// Start an MCP server and discover its tools
|
||||
// @reserved: MCP protocol management
|
||||
/// @connected — frontend: MCPServices.tsx via mcp-client.ts
|
||||
#[tauri::command]
|
||||
pub async fn mcp_start_service(
|
||||
@@ -128,6 +129,7 @@ pub async fn mcp_start_service(
|
||||
}
|
||||
|
||||
/// Stop an MCP server and remove its tools
|
||||
// @reserved: MCP protocol management
|
||||
/// @connected — frontend: MCPServices.tsx via mcp-client.ts
|
||||
#[tauri::command]
|
||||
pub async fn mcp_stop_service(
|
||||
@@ -145,6 +147,7 @@ pub async fn mcp_stop_service(
|
||||
}
|
||||
|
||||
/// List all active MCP services and their tools
|
||||
// @reserved: MCP protocol management
|
||||
/// @connected — frontend: MCPServices.tsx via mcp-client.ts
|
||||
#[tauri::command]
|
||||
pub async fn mcp_list_services(
|
||||
@@ -177,6 +180,7 @@ pub async fn mcp_list_services(
|
||||
}
|
||||
|
||||
/// Call an MCP tool directly
|
||||
// @reserved: MCP protocol management
|
||||
/// @connected — frontend: agent loop via mcp-client.ts
|
||||
#[tauri::command]
|
||||
pub async fn mcp_call_tool(
|
||||
|
||||
@@ -47,6 +47,7 @@ pub struct ScheduledTaskResponse {
|
||||
///
|
||||
/// Tasks are automatically executed by the SchedulerService which checks
|
||||
/// every 60 seconds for due triggers.
|
||||
// @reserved: scheduled task management
|
||||
// @connected
|
||||
#[tauri::command]
|
||||
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)
|
||||
// @reserved: scheduled task management
|
||||
// @connected
|
||||
#[tauri::command]
|
||||
pub async fn scheduled_task_list(
|
||||
|
||||
@@ -85,6 +85,7 @@ pub async fn skill_list(
|
||||
///
|
||||
/// Re-scans the skills directory for new or updated skills.
|
||||
/// Optionally accepts a custom directory path to scan.
|
||||
// @reserved: skill system management
|
||||
// @connected
|
||||
#[tauri::command]
|
||||
pub async fn skill_refresh(
|
||||
@@ -136,6 +137,7 @@ pub struct UpdateSkillRequest {
|
||||
}
|
||||
|
||||
/// Create a new skill in the skills directory
|
||||
// @reserved: skill system management
|
||||
// @connected
|
||||
#[tauri::command]
|
||||
pub async fn skill_create(
|
||||
@@ -184,6 +186,7 @@ pub async fn skill_create(
|
||||
}
|
||||
|
||||
/// Update an existing skill
|
||||
// @reserved: skill system management
|
||||
// @connected
|
||||
#[tauri::command]
|
||||
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.
|
||||
/// Returns the skill result as JSON.
|
||||
// @reserved: skill system management
|
||||
// @connected
|
||||
#[tauri::command]
|
||||
pub async fn skill_execute(
|
||||
|
||||
@@ -96,6 +96,7 @@ impl From<zclaw_kernel::trigger_manager::TriggerEntry> for TriggerResponse {
|
||||
}
|
||||
|
||||
/// List all triggers
|
||||
// @reserved: trigger management
|
||||
// @connected
|
||||
#[tauri::command]
|
||||
pub async fn trigger_list(
|
||||
@@ -110,6 +111,7 @@ pub async fn trigger_list(
|
||||
}
|
||||
|
||||
/// Get a specific trigger
|
||||
// @reserved: trigger management
|
||||
// @connected
|
||||
#[tauri::command]
|
||||
pub async fn trigger_get(
|
||||
@@ -127,6 +129,7 @@ pub async fn trigger_get(
|
||||
}
|
||||
|
||||
/// Create a new trigger
|
||||
// @reserved: trigger management
|
||||
// @connected
|
||||
#[tauri::command]
|
||||
pub async fn trigger_create(
|
||||
@@ -182,6 +185,7 @@ pub async fn trigger_create(
|
||||
}
|
||||
|
||||
/// Update a trigger
|
||||
// @reserved: trigger management
|
||||
// @connected
|
||||
#[tauri::command]
|
||||
pub async fn trigger_update(
|
||||
@@ -227,6 +231,7 @@ pub async fn trigger_delete(
|
||||
}
|
||||
|
||||
/// Execute a trigger manually
|
||||
// @reserved: trigger management
|
||||
// @connected
|
||||
#[tauri::command]
|
||||
pub async fn trigger_execute(
|
||||
|
||||
@@ -10,6 +10,7 @@ pub struct DirStats {
|
||||
}
|
||||
|
||||
/// Count files and total size in a directory (non-recursive, top-level only)
|
||||
// @reserved: workspace statistics
|
||||
#[tauri::command]
|
||||
pub async fn workspace_dir_stats(path: String) -> Result<DirStats, String> {
|
||||
let dir = Path::new(&path);
|
||||
|
||||
Reference in New Issue
Block a user