Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions docs/interactive-capabilities/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ BitFun Playbook currently contains **22 features**, **16 settings pages**, and *
- Generated per-item interaction audit: `docs/interactive-capabilities/technical/product-control-open-audit.json`
- Generated low-level audit map: `docs/interactive-capabilities/technical/tauri-command-map.json`

说明书、网站、搜索和 Agent 只看“功能 + 设置 + 子能力”。每项子能力都必须引用已注册 Tauri Command 或可解析的源码标记;这些证据不会进入公开目录。当前 **653** 个 Tauri 命令只用于实现覆盖审计。产品 UI 交互源码会在生成和检查时扫描并校验,但不会保存成随普通 UI 改动频繁变化的版本化快照。
说明书、网站、搜索和 Agent 只看“功能 + 设置 + 子能力”。每项子能力都必须引用已注册 Tauri Command 或可解析的源码标记;这些证据不会进入公开目录。当前 **642** 个 Tauri 命令只用于实现覆盖审计。产品 UI 交互源码会在生成和检查时扫描并校验,但不会保存成随普通 UI 改动频繁变化的版本化快照。

Docs, website, search, and agents see only features, settings, and documented sub-capabilities. Every sub-capability must reference a registered Tauri command or a resolvable source marker; evidence is stripped from public projections. The **653** Tauri commands remain implementation-audit evidence only. Product UI interaction sources are scanned and validated during generation and checks, but are not stored as a versioned snapshot that churns with ordinary UI changes.
Docs, website, search, and agents see only features, settings, and documented sub-capabilities. Every sub-capability must reference a registered Tauri command or a resolvable source marker; evidence is stripped from public projections. The **642** Tauri commands remain implementation-audit evidence only. Product UI interaction sources are scanned and validated during generation and checks, but are not stored as a versioned snapshot that churns with ordinary UI changes.

## 控制边界 / Control boundary

Expand Down
162 changes: 4 additions & 158 deletions docs/interactive-capabilities/technical/tauri-command-map.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
"schemaVersion": 2,
"generatedFrom": "src/shared/interactive-capabilities/catalog.json",
"catalogDigest": "b915ffcb329182de3e033d8e48186a1dbd5c683d975484567d9dfe9b9c595c13",
"commandCount": 653,
"commandCount": 642,
"coverage": {
"commandCount": 653,
"commandCount": 642,
"documentedCommandCount": 615,
"implementationCommandCount": 38,
"implementationDigest": "965d441b20c0092bc25c1dd48db3e31f72a977479fe9d1ff7c788d8e17d7395b"
"implementationCommandCount": 27,
"implementationDigest": "4d3b2e8145a6a97b622fdb78cf1c25275881328eb7ccbc3c92ae95bf798cb190"
},
"commands": [
{
Expand Down Expand Up @@ -1280,34 +1280,6 @@
"signature": "fn cleanup_invalid_workspaces( state: State<'_, AppState>, app: tauri::AppHandle, startup_trace: State<'_, DesktopStartupTrace>, ) -> Result<usize, String>",
"remoteWorkspacePolicy": "LegacyUnaudited"
},
{
"id": "cleanup_storage",
"moduleId": "storage_commands",
"capabilityId": "feature.files-editor",
"capabilityIds": [
"feature.files-editor"
],
"documentedItemIds": [],
"visibility": "implementation",
"rustPath": "cleanup_storage",
"sourceFile": "src/apps/desktop/src/api/storage_commands.rs",
"signature": "fn cleanup_storage(state: State<'_, AppState>) -> Result<CleanupResult, String>",
"remoteWorkspacePolicy": "LegacyUnaudited"
},
{
"id": "cleanup_storage_with_policy",
"moduleId": "storage_commands",
"capabilityId": "feature.files-editor",
"capabilityIds": [
"feature.files-editor"
],
"documentedItemIds": [],
"visibility": "implementation",
"rustPath": "cleanup_storage_with_policy",
"sourceFile": "src/apps/desktop/src/api/storage_commands.rs",
"signature": "fn cleanup_storage_with_policy( state: State<'_, AppState>, policy: CleanupPolicy, ) -> Result<CleanupResult, String>",
"remoteWorkspacePolicy": "LegacyUnaudited"
},
{
"id": "clear_mcp_remote_auth",
"moduleId": "mcp",
Expand Down Expand Up @@ -3497,20 +3469,6 @@
"signature": "fn get_project_permission_rules( state: State<'_, AppState>, request: PermissionProjectRequest, ) -> Result<ProjectPermissionRulesResponse, String>",
"remoteWorkspacePolicy": "RemoteRouted"
},
{
"id": "get_project_storage_paths",
"moduleId": "storage_commands",
"capabilityId": "feature.files-editor",
"capabilityIds": [
"feature.files-editor"
],
"documentedItemIds": [],
"visibility": "implementation",
"rustPath": "get_project_storage_paths",
"sourceFile": "src/apps/desktop/src/api/storage_commands.rs",
"signature": "fn get_project_storage_paths( state: State<'_, AppState>, workspace_path: String, ) -> Result<ProjectStoragePathsInfo, String>",
"remoteWorkspacePolicy": "LegacyUnaudited"
},
{
"id": "get_readonly_tools_info",
"moduleId": "tool",
Expand Down Expand Up @@ -3799,34 +3757,6 @@
"signature": "fn get_statistics( state: State<'_, AppState>, ) -> Result<crate::api::AppStatistics, String>",
"remoteWorkspacePolicy": "LegacyUnaudited"
},
{
"id": "get_storage_paths",
"moduleId": "storage_commands",
"capabilityId": "feature.files-editor",
"capabilityIds": [
"feature.files-editor"
],
"documentedItemIds": [],
"visibility": "implementation",
"rustPath": "get_storage_paths",
"sourceFile": "src/apps/desktop/src/api/storage_commands.rs",
"signature": "fn get_storage_paths(state: State<'_, AppState>) -> Result<StoragePathsInfo, String>",
"remoteWorkspacePolicy": "LegacyUnaudited"
},
{
"id": "get_storage_statistics",
"moduleId": "storage_commands",
"capabilityId": "feature.files-editor",
"capabilityIds": [
"feature.files-editor"
],
"documentedItemIds": [],
"visibility": "implementation",
"rustPath": "get_storage_statistics",
"sourceFile": "src/apps/desktop/src/api/storage_commands.rs",
"signature": "fn get_storage_statistics(state: State<'_, AppState>) -> Result<StorageStats, String>",
"remoteWorkspacePolicy": "LegacyUnaudited"
},
{
"id": "get_subagent_detail",
"moduleId": "subagent",
Expand Down Expand Up @@ -4673,34 +4603,6 @@
"signature": "fn initialize_mcp_servers_non_destructive( state: State<'_, AppState>, startup_trace: State<'_, DesktopStartupTrace>, ) -> Result<(), String>",
"remoteWorkspacePolicy": "LegacyUnaudited"
},
{
"id": "initialize_project_storage",
"moduleId": "storage_commands",
"capabilityId": "feature.files-editor",
"capabilityIds": [
"feature.files-editor"
],
"documentedItemIds": [],
"visibility": "implementation",
"rustPath": "initialize_project_storage",
"sourceFile": "src/apps/desktop/src/api/storage_commands.rs",
"signature": "fn initialize_project_storage( state: State<'_, AppState>, workspace_path: String, ) -> Result<(), String>",
"remoteWorkspacePolicy": "LegacyUnaudited"
},
{
"id": "initialize_snapshot",
"moduleId": "snapshot_service",
"capabilityId": "feature.files-editor",
"capabilityIds": [
"feature.files-editor"
],
"documentedItemIds": [],
"visibility": "implementation",
"rustPath": "initialize_snapshot",
"sourceFile": "src/apps/desktop/src/api/snapshot_service.rs",
"signature": "fn initialize_snapshot( app_handle: AppHandle, runtime: State<'_, DesktopRuntimeContext>, request: SnapshotInitRequest, ) -> Result<serde_json::Value, String>",
"remoteWorkspacePolicy": "LegacyUnaudited"
},
{
"id": "initialize_tray_after_startup",
"moduleId": "system",
Expand Down Expand Up @@ -6680,20 +6582,6 @@
"signature": "fn read_mcp_resource( state: State<'_, AppState>, request: ReadMCPResourceRequest, ) -> Result<ResourcesReadResult, String>",
"remoteWorkspacePolicy": "LegacyUnaudited"
},
{
"id": "record_file_change",
"moduleId": "snapshot_service",
"capabilityId": "feature.files-editor",
"capabilityIds": [
"feature.files-editor"
],
"documentedItemIds": [],
"visibility": "implementation",
"rustPath": "record_file_change",
"sourceFile": "src/apps/desktop/src/api/snapshot_service.rs",
"signature": "fn record_file_change( app_handle: AppHandle, runtime: State<'_, DesktopRuntimeContext>, request: RecordFileChangeRequest, ) -> Result<String, String>",
"remoteWorkspacePolicy": "LegacyUnaudited"
},
{
"id": "recover_interrupted_dialog_turn",
"moduleId": "agentic",
Expand Down Expand Up @@ -6933,20 +6821,6 @@
"signature": "fn reload_custom_agents( state: State<'_, AppState>, request: ReloadCustomAgentsRequest, ) -> Result<(), String>",
"remoteWorkspacePolicy": "LegacyUnaudited"
},
{
"id": "reload_global_config",
"moduleId": "commands",
"capabilityId": "feature.projects",
"capabilityIds": [
"feature.projects"
],
"documentedItemIds": [],
"visibility": "implementation",
"rustPath": "reload_global_config",
"sourceFile": "src/apps/desktop/src/api/commands.rs",
"signature": "fn reload_global_config() -> Result<String, String>",
"remoteWorkspacePolicy": "LegacyUnaudited"
},
{
"id": "reload_session_context",
"moduleId": "agentic",
Expand Down Expand Up @@ -9624,20 +9498,6 @@
"signature": "fn submit_user_answers( runtime: State<'_, DesktopRuntimeContext>, tool_id: String, answers: serde_json::Value, ) -> Result<(), String>",
"remoteWorkspacePolicy": "LegacyUnaudited"
},
{
"id": "subscribe_config_updates",
"moduleId": "commands",
"capabilityId": "feature.projects",
"capabilityIds": [
"feature.projects"
],
"documentedItemIds": [],
"visibility": "implementation",
"rustPath": "subscribe_config_updates",
"sourceFile": "src/apps/desktop/src/api/commands.rs",
"signature": "fn subscribe_config_updates() -> Result<(), String>",
"remoteWorkspacePolicy": "LegacyUnaudited"
},
{
"id": "subscribe_permission_requests",
"moduleId": "agentic",
Expand All @@ -9654,20 +9514,6 @@
"signature": "fn subscribe_permission_requests( app: AppHandle, runtime: State<'_, DesktopRuntimeContext>, ) -> Result<(), String>",
"remoteWorkspacePolicy": "WorkspaceAgnostic"
},
{
"id": "sync_config_to_global",
"moduleId": "config",
"capabilityId": "setting.application.general",
"capabilityIds": [
"setting.application.general"
],
"documentedItemIds": [],
"visibility": "implementation",
"rustPath": "sync_config_to_global",
"sourceFile": "src/apps/desktop/src/api/config_api.rs",
"signature": "fn sync_config_to_global(_state: State<'_, AppState>) -> Result<String, String>",
"remoteWorkspacePolicy": "LegacyUnaudited"
},
{
"id": "terminal_ack",
"moduleId": "terminal",
Expand Down
28 changes: 0 additions & 28 deletions src/apps/desktop/src/api/commands.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4974,39 +4974,11 @@ pub async fn cancel_search(
Ok(())
}

#[tauri::command]
pub async fn reload_global_config() -> Result<String, String> {
match bitfun_core::service::config::reload_global_config().await {
Ok(_) => {
info!("Global config reloaded");
Ok("Configuration reloaded successfully".to_string())
}
Err(e) => {
error!("Failed to reload global config: {}", e);
Err(format!("Failed to reload configuration: {}", e))
}
}
}

#[tauri::command]
pub async fn get_global_config_status() -> Result<bool, String> {
Ok(bitfun_core::service::config::GlobalConfigManager::is_initialized())
}

#[tauri::command]
pub async fn subscribe_config_updates() -> Result<(), String> {
if let Some(mut receiver) = bitfun_core::service::config::subscribe_config_updates() {
tokio::spawn(async move {
while let Ok(event) = receiver.recv().await {
debug!("Config update event: {:?}", event);
}
});
Ok(())
} else {
Err("Config update subscription not available".to_string())
}
}

#[tauri::command]
pub async fn get_model_configs(
state: State<'_, AppState>,
Expand Down
14 changes: 0 additions & 14 deletions src/apps/desktop/src/api/config_api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -348,20 +348,6 @@ pub async fn reload_config(state: State<'_, AppState>) -> Result<String, String>
}
}

#[tauri::command]
pub async fn sync_config_to_global(_state: State<'_, AppState>) -> Result<String, String> {
match bitfun_core::service::config::reload_global_config().await {
Ok(_) => {
info!("Config synced to global service");
Ok("Configuration synced to global service".to_string())
}
Err(e) => {
error!("Failed to sync config to global service: {}", e);
Err(format!("Failed to sync config to global service: {}", e))
}
}
}

#[tauri::command]
pub async fn get_global_config_health() -> Result<bool, String> {
Ok(bitfun_core::service::config::GlobalConfigManager::is_initialized())
Expand Down
1 change: 0 additions & 1 deletion src/apps/desktop/src/api/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ pub mod skill_api;
pub mod snapshot_service;
pub mod speech_api;
pub mod ssh_api;
pub mod storage_commands;
pub mod subagent_api;
pub mod system_api;
pub mod terminal_api;
Expand Down
Loading
Loading