diff --git a/cortex-tui-framework/crates/cortex-tui-terminal/src/application.rs b/cortex-tui-framework/crates/cortex-tui-terminal/src/application.rs index 3f2fef25..56b1c67d 100644 --- a/cortex-tui-framework/crates/cortex-tui-terminal/src/application.rs +++ b/cortex-tui-framework/crates/cortex-tui-terminal/src/application.rs @@ -3,10 +3,10 @@ use crate::backend::TerminalBackend; use crate::renderer::{FramePacer, Renderer}; use crate::CrosstermBackend; -use crossterm::event::{poll, read}; use cortex_tui_buffer::Buffer; use cortex_tui_core::Result; use cortex_tui_input::Event; +use crossterm::event::{poll, read}; use std::time::{Duration, Instant}; /// Application state for the event loop. diff --git a/cortex-tui-framework/crates/cortex-tui-terminal/src/backend.rs b/cortex-tui-framework/crates/cortex-tui-terminal/src/backend.rs index 63979a09..8aa6bd97 100644 --- a/cortex-tui-framework/crates/cortex-tui-terminal/src/backend.rs +++ b/cortex-tui-framework/crates/cortex-tui-terminal/src/backend.rs @@ -1,6 +1,7 @@ //! Terminal backend abstraction and crossterm implementation. use crate::Capabilities; +use cortex_tui_core::{Color, Error, Result, TextAttributes}; use crossterm::{ cursor::{Hide, MoveTo, Show}, event::{ @@ -17,7 +18,6 @@ use crossterm::{ LeaveAlternateScreen, }, }; -use cortex_tui_core::{Color, Error, Result, TextAttributes}; use std::io::{self, Stdout, Write}; /// Trait for terminal backend implementations. diff --git a/cortex-tui-framework/src/lib.rs b/cortex-tui-framework/src/lib.rs index 9db54af8..12e3c33c 100644 --- a/cortex-tui-framework/src/lib.rs +++ b/cortex-tui-framework/src/lib.rs @@ -48,7 +48,9 @@ pub use cortex_tui_widgets as widgets; pub mod prelude { pub use cortex_tui_core::{Color, Point, Rect, Size, Style, TextAttributes}; pub use cortex_tui_input::{Event, KeyCode, KeyModifiers, MouseButton, MouseEvent}; - pub use cortex_tui_layout::{AlignContent, AlignItems, FlexDirection, FlexWrap, JustifyContent}; + pub use cortex_tui_layout::{ + AlignContent, AlignItems, FlexDirection, FlexWrap, JustifyContent, + }; pub use cortex_tui_terminal::Application; pub use cortex_tui_widgets::{BoxWidget, Input, ScrollBox, TextWidget, Widget}; } diff --git a/src/cortex-app-server/src/api/agents.rs b/src/cortex-app-server/src/api/agents.rs index 7d22fdb9..6a846942 100644 --- a/src/cortex-app-server/src/api/agents.rs +++ b/src/cortex-app-server/src/api/agents.rs @@ -2,7 +2,10 @@ use std::sync::Arc; -use axum::{Json, extract::{Path, State}}; +use axum::{ + Json, + extract::{Path, State}, +}; use crate::error::{AppError, AppResult}; use crate::state::AppState; @@ -344,9 +347,7 @@ fn parse_agent_content(content: &str, _format: &str) -> AppResult<(String, Agent } /// Import an agent from file content. -pub async fn import_agent( - Json(req): Json, -) -> AppResult> { +pub async fn import_agent(Json(req): Json) -> AppResult> { // Parse the content to extract name and other metadata let (name, agent) = parse_agent_content(&req.content, &req.format)?; diff --git a/src/cortex-app-server/src/api/discovery.rs b/src/cortex-app-server/src/api/discovery.rs index f77983f8..d7958312 100644 --- a/src/cortex-app-server/src/api/discovery.rs +++ b/src/cortex-app-server/src/api/discovery.rs @@ -3,7 +3,10 @@ use std::sync::Arc; use std::time::{Duration, Instant}; -use axum::{Json, extract::{Query, State}}; +use axum::{ + Json, + extract::{Query, State}, +}; use crate::error::AppResult; use crate::mdns::MdnsDiscovery; diff --git a/src/cortex-app-server/src/api/files.rs b/src/cortex-app-server/src/api/files.rs index fe06dd59..99c23852 100644 --- a/src/cortex-app-server/src/api/files.rs +++ b/src/cortex-app-server/src/api/files.rs @@ -2,7 +2,10 @@ use std::sync::Arc; -use axum::{Json, extract::{Query, State}}; +use axum::{ + Json, + extract::{Query, State}, +}; use crate::error::{AppError, AppResult}; use crate::state::AppState; diff --git a/src/cortex-app-server/src/api/mod.rs b/src/cortex-app-server/src/api/mod.rs index ac68993c..fc7f16ad 100644 --- a/src/cortex-app-server/src/api/mod.rs +++ b/src/cortex-app-server/src/api/mod.rs @@ -76,7 +76,10 @@ pub fn routes() -> Router> { .route("/agents", post(agents::create_agent)) .route("/agents/builtin", get(agents::list_builtin_agents)) .route("/agents/import", post(agents::import_agent)) - .route("/agents/generate-prompt", post(agents::generate_agent_prompt)) + .route( + "/agents/generate-prompt", + post(agents::generate_agent_prompt), + ) .route("/agents/:name", get(agents::get_agent)) .route("/agents/:name", axum::routing::put(agents::update_agent)) .route("/agents/:name", delete(agents::delete_agent)) diff --git a/src/cortex-app-server/src/api/models.rs b/src/cortex-app-server/src/api/models.rs index ebcaa7cb..c2b9e656 100644 --- a/src/cortex-app-server/src/api/models.rs +++ b/src/cortex-app-server/src/api/models.rs @@ -2,7 +2,10 @@ use std::sync::Arc; -use axum::{Json, extract::{Path, State}}; +use axum::{ + Json, + extract::{Path, State}, +}; use crate::error::{AppError, AppResult}; use crate::state::AppState; diff --git a/src/cortex-app-server/src/api/stored_sessions.rs b/src/cortex-app-server/src/api/stored_sessions.rs index 5caf1964..b49edc0c 100644 --- a/src/cortex-app-server/src/api/stored_sessions.rs +++ b/src/cortex-app-server/src/api/stored_sessions.rs @@ -2,7 +2,10 @@ use std::sync::Arc; -use axum::{Json, extract::{Path, State}}; +use axum::{ + Json, + extract::{Path, State}, +}; use crate::error::{AppError, AppResult}; use crate::state::AppState; diff --git a/src/cortex-app-server/src/api/terminals.rs b/src/cortex-app-server/src/api/terminals.rs index c3498fe3..a9f5b34c 100644 --- a/src/cortex-app-server/src/api/terminals.rs +++ b/src/cortex-app-server/src/api/terminals.rs @@ -5,7 +5,10 @@ use std::sync::Arc; -use axum::{Json, extract::{Path, Query, State}}; +use axum::{ + Json, + extract::{Path, Query, State}, +}; use crate::error::{AppError, AppResult}; use crate::state::AppState; diff --git a/src/cortex-app-server/src/api/tools.rs b/src/cortex-app-server/src/api/tools.rs index d0eef421..f8dbbd40 100644 --- a/src/cortex-app-server/src/api/tools.rs +++ b/src/cortex-app-server/src/api/tools.rs @@ -2,7 +2,10 @@ use std::sync::Arc; -use axum::{Json, extract::{Path, State}}; +use axum::{ + Json, + extract::{Path, State}, +}; use crate::error::AppResult; use crate::state::AppState; diff --git a/src/cortex-app-server/src/auth.rs b/src/cortex-app-server/src/auth.rs index bca3bb59..414f36f1 100644 --- a/src/cortex-app-server/src/auth.rs +++ b/src/cortex-app-server/src/auth.rs @@ -100,7 +100,7 @@ pub struct AuthService { /// Decoding key for JWT. decoding_key: Option, /// API key hash cache. - api_key_hashes: RwLock>, + _api_key_hashes: RwLock>, /// Revoked tokens. revoked_tokens: RwLock>, } @@ -134,7 +134,7 @@ impl AuthService { config, encoding_key, decoding_key, - api_key_hashes: RwLock::new(HashMap::new()), + _api_key_hashes: RwLock::new(HashMap::new()), revoked_tokens: RwLock::new(HashMap::new()), } } diff --git a/src/cortex-app-server/src/session_manager.rs b/src/cortex-app-server/src/session_manager.rs index 3391e1af..9c9c70da 100644 --- a/src/cortex-app-server/src/session_manager.rs +++ b/src/cortex-app-server/src/session_manager.rs @@ -655,7 +655,7 @@ pub enum SessionError { } /// Forward events from CLI session to WebSocket. -async fn forward_events( +async fn _forward_events( event_rx: async_channel::Receiver, ws_tx: mpsc::Sender, session_id: String, diff --git a/src/cortex-app-server/src/storage.rs b/src/cortex-app-server/src/storage.rs index 1f96ffcf..6c5d44e5 100644 --- a/src/cortex-app-server/src/storage.rs +++ b/src/cortex-app-server/src/storage.rs @@ -5,7 +5,7 @@ //! the same storage directory. use std::fs; -use std::io::{BufRead, BufReader, BufWriter, Write}; +use std::io::{BufRead, BufReader, BufWriter}; use std::path::{Path, PathBuf}; use fs2::FileExt; @@ -93,8 +93,7 @@ impl SessionStorage { file.lock_exclusive()?; let writer = BufWriter::new(&file); - let result = - serde_json::to_writer_pretty(writer, session).map_err(std::io::Error::other); + let result = serde_json::to_writer_pretty(writer, session).map_err(std::io::Error::other); // Lock is automatically released when file is dropped file.unlock()?; diff --git a/src/cortex-app-server/src/websocket.rs b/src/cortex-app-server/src/websocket.rs index 62a39a4e..f5e21845 100644 --- a/src/cortex-app-server/src/websocket.rs +++ b/src/cortex-app-server/src/websocket.rs @@ -72,7 +72,7 @@ async fn handle_socket(socket: WebSocket, state: Arc, query: WsConnect // Create connection context let mut ctx = ConnectionContext { - id: connection_id.clone(), + _id: connection_id.clone(), user_id: None, session_id: query.session_id, authenticated: query.token.is_some(), @@ -448,7 +448,7 @@ async fn handle_text_message( #[derive(Debug)] struct ConnectionContext { /// Connection ID. - id: String, + _id: String, /// User ID if authenticated. user_id: Option, /// Session ID if joined. diff --git a/src/cortex-cli/src/agent_cmd/handlers/copy.rs b/src/cortex-cli/src/agent_cmd/handlers/copy.rs index 08017906..deed2251 100644 --- a/src/cortex-cli/src/agent_cmd/handlers/copy.rs +++ b/src/cortex-cli/src/agent_cmd/handlers/copy.rs @@ -1,6 +1,6 @@ //! Handler for the `agent copy` command. -use anyhow::{bail, Context, Result}; +use anyhow::{Context, Result, bail}; use crate::agent_cmd::cli::CopyArgs; use crate::agent_cmd::loader::{ diff --git a/src/cortex-cli/src/agent_cmd/handlers/create.rs b/src/cortex-cli/src/agent_cmd/handlers/create.rs index f70b43fe..346dea0d 100644 --- a/src/cortex-cli/src/agent_cmd/handlers/create.rs +++ b/src/cortex-cli/src/agent_cmd/handlers/create.rs @@ -1,12 +1,12 @@ //! Handler for the `agent create` command. -use anyhow::{bail, Context, Result}; +use anyhow::{Context, Result, bail}; use std::io::{self, BufRead, Write}; use crate::agent_cmd::cli::CreateArgs; use crate::agent_cmd::loader::get_agents_dir; use crate::agent_cmd::types::AgentMode; -use crate::agent_cmd::utils::{validate_model_name, AVAILABLE_TOOLS, RESERVED_NAMES}; +use crate::agent_cmd::utils::{AVAILABLE_TOOLS, RESERVED_NAMES, validate_model_name}; use super::generate::run_generate; diff --git a/src/cortex-cli/src/agent_cmd/handlers/edit.rs b/src/cortex-cli/src/agent_cmd/handlers/edit.rs index 3d8b83c0..116fc6c4 100644 --- a/src/cortex-cli/src/agent_cmd/handlers/edit.rs +++ b/src/cortex-cli/src/agent_cmd/handlers/edit.rs @@ -1,6 +1,6 @@ //! Handler for the `agent edit` command. -use anyhow::{bail, Context, Result}; +use anyhow::{Context, Result, bail}; use std::io::{self, BufRead, Write}; use crate::agent_cmd::cli::EditArgs; diff --git a/src/cortex-cli/src/agent_cmd/handlers/generate.rs b/src/cortex-cli/src/agent_cmd/handlers/generate.rs index 5fe9c61d..b3bbabd6 100644 --- a/src/cortex-cli/src/agent_cmd/handlers/generate.rs +++ b/src/cortex-cli/src/agent_cmd/handlers/generate.rs @@ -1,6 +1,6 @@ //! Handler for AI-powered agent generation. -use anyhow::{bail, Context, Result}; +use anyhow::{Context, Result, bail}; use std::io::{self, BufRead, Write}; use crate::agent_cmd::cli::CreateArgs; diff --git a/src/cortex-cli/src/agent_cmd/handlers/install.rs b/src/cortex-cli/src/agent_cmd/handlers/install.rs index 85a52996..1db23a89 100644 --- a/src/cortex-cli/src/agent_cmd/handlers/install.rs +++ b/src/cortex-cli/src/agent_cmd/handlers/install.rs @@ -1,6 +1,6 @@ //! Handler for the `agent install` command. -use anyhow::{bail, Context, Result}; +use anyhow::{Context, Result, bail}; use crate::agent_cmd::cli::InstallArgs; use crate::agent_cmd::loader::get_agents_dir; diff --git a/src/cortex-cli/src/agent_cmd/handlers/remove.rs b/src/cortex-cli/src/agent_cmd/handlers/remove.rs index 78b1d96c..bc4cf394 100644 --- a/src/cortex-cli/src/agent_cmd/handlers/remove.rs +++ b/src/cortex-cli/src/agent_cmd/handlers/remove.rs @@ -1,6 +1,6 @@ //! Handler for the `agent remove` command. -use anyhow::{bail, Context, Result}; +use anyhow::{Context, Result, bail}; use std::io::{self, BufRead, Write}; use crate::agent_cmd::cli::RemoveArgs; diff --git a/src/cortex-cli/src/agent_cmd/utils.rs b/src/cortex-cli/src/agent_cmd/utils.rs index eabea9cd..a64b2af8 100644 --- a/src/cortex-cli/src/agent_cmd/utils.rs +++ b/src/cortex-cli/src/agent_cmd/utils.rs @@ -2,7 +2,7 @@ //! //! Contains helper functions used across the agent command module. -use anyhow::{bail, Result}; +use anyhow::{Result, bail}; /// Validate a model name for agent creation. /// diff --git a/src/cortex-cli/src/cli/handlers.rs b/src/cortex-cli/src/cli/handlers.rs index d8cb93df..c8f9c351 100644 --- a/src/cortex-cli/src/cli/handlers.rs +++ b/src/cortex-cli/src/cli/handlers.rs @@ -183,12 +183,10 @@ async fn run_init(init_cli: InitCommand) -> Result<()> { /// Handle login command. async fn handle_login(login_cli: LoginCommand) -> Result<()> { match login_cli.action { - Some(LoginSubcommand::Status) => { - run_login_status(login_cli.config_overrides).await; - } + Some(LoginSubcommand::Status) => run_login_status(login_cli.config_overrides).await, None => { if let Some(token) = login_cli.token { - run_login_with_api_key(login_cli.config_overrides, token).await; + run_login_with_api_key(login_cli.config_overrides, token).await } else if login_cli.use_sso { eprintln!("Starting enterprise SSO authentication..."); run_login_with_device_code( @@ -196,28 +194,27 @@ async fn handle_login(login_cli: LoginCommand) -> Result<()> { login_cli.issuer_base_url, login_cli.client_id, ) - .await; + .await } else if login_cli.use_device_code { run_login_with_device_code( login_cli.config_overrides, login_cli.issuer_base_url, login_cli.client_id, ) - .await; + .await } else if login_cli.with_api_key { let api_key = read_api_key_from_stdin(); - run_login_with_api_key(login_cli.config_overrides, api_key).await; + run_login_with_api_key(login_cli.config_overrides, api_key).await } else { run_login_with_device_code( login_cli.config_overrides, login_cli.issuer_base_url, login_cli.client_id, ) - .await; + .await } } } - Ok(()) } /// Handle logout command. @@ -226,8 +223,7 @@ async fn handle_logout(logout_cli: LogoutCommand) -> Result<()> { if logout_cli.all { eprintln!("Logging out from all accounts..."); } - run_logout(logout_cli.config_overrides, skip_confirmation).await; - Ok(()) + run_logout(logout_cli.config_overrides, skip_confirmation).await } /// Handle completion command. diff --git a/src/cortex-cli/src/dag_cmd/commands.rs b/src/cortex-cli/src/dag_cmd/commands.rs index ff03e4b3..53e32e0a 100644 --- a/src/cortex-cli/src/dag_cmd/commands.rs +++ b/src/cortex-cli/src/dag_cmd/commands.rs @@ -1,6 +1,6 @@ //! Command handlers for DAG operations. -use anyhow::{Context, Result, bail}; +use anyhow::{Result, bail}; use cortex_agents::task::{DagHydrator, DagStore, TaskStatus}; use std::collections::HashMap; use std::io::{self, Write}; diff --git a/src/cortex-cli/src/dag_cmd/mod.rs b/src/cortex-cli/src/dag_cmd/mod.rs index 46ed94a1..e5cdb326 100644 --- a/src/cortex-cli/src/dag_cmd/mod.rs +++ b/src/cortex-cli/src/dag_cmd/mod.rs @@ -43,8 +43,9 @@ use anyhow::Result; // Re-export public types pub use args::{ - DagCli, DagCommands, DagCreateArgs, DagDeleteArgs, DagGraphArgs, DagListArgs, DagResumeArgs, - DagRunArgs, DagStatusArgs, DagValidateArgs, DEFAULT_MAX_CONCURRENT, DEFAULT_TASK_TIMEOUT_SECS, + DEFAULT_MAX_CONCURRENT, DEFAULT_TASK_TIMEOUT_SECS, DagCli, DagCommands, DagCreateArgs, + DagDeleteArgs, DagGraphArgs, DagListArgs, DagResumeArgs, DagRunArgs, DagStatusArgs, + DagValidateArgs, }; pub use types::{ DagExecutionStats, DagOutputFormat, DagSpecInput, ExecutionStrategy, FailureMode, diff --git a/src/cortex-cli/src/dag_cmd/scheduler.rs b/src/cortex-cli/src/dag_cmd/scheduler.rs index cd7e9acd..13bd3558 100644 --- a/src/cortex-cli/src/dag_cmd/scheduler.rs +++ b/src/cortex-cli/src/dag_cmd/scheduler.rs @@ -6,7 +6,7 @@ use std::sync::Arc; use std::time::{Duration, Instant}; use tokio::sync::{Mutex, RwLock, Semaphore}; -use crate::styled_output::{print_error, print_success, print_info}; +use crate::styled_output::{print_error, print_info, print_success}; use super::executor::TaskExecutor; use super::types::{DagExecutionStats, FailureMode, TaskExecutionResult}; diff --git a/src/cortex-cli/src/dag_cmd/tests.rs b/src/cortex-cli/src/dag_cmd/tests.rs index 7e772dce..a2bc60cb 100644 --- a/src/cortex-cli/src/dag_cmd/tests.rs +++ b/src/cortex-cli/src/dag_cmd/tests.rs @@ -81,8 +81,8 @@ fn test_dag_creation_with_cycle_detection() { #[tokio::test] async fn test_task_executor() { let executor = TaskExecutor::new(30, false); - let task = Task::new("test", "Test task") - .with_metadata("command", serde_json::json!("echo hello")); + let task = + Task::new("test", "Test task").with_metadata("command", serde_json::json!("echo hello")); // Note: This test requires a running shell let mut task_with_id = task; diff --git a/src/cortex-cli/src/debug_cmd/handlers/file.rs b/src/cortex-cli/src/debug_cmd/handlers/file.rs index 0ce0f55c..6c96e8b3 100644 --- a/src/cortex-cli/src/debug_cmd/handlers/file.rs +++ b/src/cortex-cli/src/debug_cmd/handlers/file.rs @@ -1,7 +1,6 @@ //! File command handler. use anyhow::Result; -use std::path::PathBuf; use crate::debug_cmd::commands::FileArgs; use crate::debug_cmd::types::{FileDebugOutput, FileMetadata}; diff --git a/src/cortex-cli/src/debug_cmd/handlers/ripgrep.rs b/src/cortex-cli/src/debug_cmd/handlers/ripgrep.rs index eed63847..907ea3b8 100644 --- a/src/cortex-cli/src/debug_cmd/handlers/ripgrep.rs +++ b/src/cortex-cli/src/debug_cmd/handlers/ripgrep.rs @@ -1,6 +1,6 @@ //! Ripgrep command handler. -use anyhow::{bail, Result}; +use anyhow::{Result, bail}; use std::path::PathBuf; use crate::debug_cmd::commands::RipgrepArgs; diff --git a/src/cortex-cli/src/debug_cmd/handlers/snapshot.rs b/src/cortex-cli/src/debug_cmd/handlers/snapshot.rs index 3b07cbe5..1fece90d 100644 --- a/src/cortex-cli/src/debug_cmd/handlers/snapshot.rs +++ b/src/cortex-cli/src/debug_cmd/handlers/snapshot.rs @@ -1,6 +1,6 @@ //! Snapshot command handler. -use anyhow::{bail, Context, Result}; +use anyhow::{Context, Result, bail}; use cortex_engine::list_sessions; use cortex_engine::rollout::get_rollout_path; diff --git a/src/cortex-cli/src/debug_cmd/handlers/wait.rs b/src/cortex-cli/src/debug_cmd/handlers/wait.rs index f1bc1335..89cbbaa2 100644 --- a/src/cortex-cli/src/debug_cmd/handlers/wait.rs +++ b/src/cortex-cli/src/debug_cmd/handlers/wait.rs @@ -1,6 +1,6 @@ //! Wait command handler. -use anyhow::{bail, Result}; +use anyhow::{Result, bail}; use cortex_engine::create_default_client; use std::time::Duration; diff --git a/src/cortex-cli/src/exec_cmd/runner.rs b/src/cortex-cli/src/exec_cmd/runner.rs index c1bf89e3..510f8c70 100644 --- a/src/cortex-cli/src/exec_cmd/runner.rs +++ b/src/cortex-cli/src/exec_cmd/runner.rs @@ -9,7 +9,7 @@ use anyhow::{Context, Result, bail}; use cortex_common::resolve_model_alias; use cortex_engine::Session; use cortex_protocol::{ - ConversationId, Event, EventMsg, Op, SandboxPolicy, Submission, UserInput, AskForApproval, + AskForApproval, ConversationId, Event, EventMsg, Op, SandboxPolicy, Submission, UserInput, }; use super::autonomy::AutonomyLevel; @@ -18,7 +18,7 @@ use super::helpers::{ collect_files_by_pattern, ensure_utf8_locale, fetch_url_content, get_git_diff, read_clipboard, validate_path_environment, }; -use super::jsonrpc::{event_to_jsonrpc, JsonRpcRequest, JsonRpcResponse}; +use super::jsonrpc::{JsonRpcRequest, JsonRpcResponse, event_to_jsonrpc}; use super::output::{ExecInputFormat, ExecOutputFormat}; impl ExecCli { diff --git a/src/cortex-cli/src/import_cmd.rs b/src/cortex-cli/src/import_cmd.rs index 9ef8a96b..f5b084c6 100644 --- a/src/cortex-cli/src/import_cmd.rs +++ b/src/cortex-cli/src/import_cmd.rs @@ -3,7 +3,6 @@ //! Imports a session from a portable JSON format (exported or shared). use anyhow::{Context, Result, bail}; -use base64::Engine; use clap::Parser; use std::collections::HashSet; use std::path::PathBuf; diff --git a/src/cortex-cli/src/mcp_cmd/debug.rs b/src/cortex-cli/src/mcp_cmd/debug.rs index a162d1be..c50d3bf6 100644 --- a/src/cortex-cli/src/mcp_cmd/debug.rs +++ b/src/cortex-cli/src/mcp_cmd/debug.rs @@ -9,7 +9,7 @@ use std::io::Write; use super::auth::get_auth_status_for_display; use super::config::get_mcp_server; -use super::macros::{safe_print, safe_println}; +use super::macros::safe_println; use super::types::DebugArgs; use super::validation::validate_server_name; diff --git a/src/cortex-cli/src/mcp_cmd/handlers.rs b/src/cortex-cli/src/mcp_cmd/handlers.rs index 4f3dc144..93d3b457 100644 --- a/src/cortex-cli/src/mcp_cmd/handlers.rs +++ b/src/cortex-cli/src/mcp_cmd/handlers.rs @@ -10,12 +10,12 @@ use std::io::{self, BufRead, Write}; use super::auth::{get_auth_status_for_display, remove_auth_silent}; use super::config::{get_mcp_server, get_mcp_servers}; use super::types::{ - AddArgs, AddMcpSseArgs, AddMcpStreamableHttpArgs, AddMcpTransportArgs, DisableArgs, - EnableArgs, GetArgs, ListArgs, RemoveArgs, RenameArgs, + AddArgs, AddMcpSseArgs, AddMcpStreamableHttpArgs, AddMcpTransportArgs, DisableArgs, EnableArgs, + GetArgs, ListArgs, RemoveArgs, RenameArgs, }; use super::validation::{ - validate_bearer_token_env_var, validate_command_args, validate_env_var_name, - validate_env_var_value, validate_server_name, validate_url, validate_url_internal, MAX_ENV_VARS, + MAX_ENV_VARS, validate_bearer_token_env_var, validate_command_args, validate_env_var_name, + validate_env_var_value, validate_server_name, validate_url, validate_url_internal, }; /// Run the list command. diff --git a/src/cortex-cli/src/mcp_cmd/macros.rs b/src/cortex-cli/src/mcp_cmd/macros.rs index a1320bf4..c6f9c36e 100644 --- a/src/cortex-cli/src/mcp_cmd/macros.rs +++ b/src/cortex-cli/src/mcp_cmd/macros.rs @@ -15,11 +15,13 @@ macro_rules! safe_println { } /// Safely prints to stdout without newline, ignoring broken pipe errors. +#[allow(unused_macros)] macro_rules! safe_print { ($($arg:tt)*) => { let _ = write!(std::io::stdout(), $($arg)*); }; } +#[allow(unused_imports)] pub(crate) use safe_print; pub(crate) use safe_println; diff --git a/src/cortex-cli/src/run_cmd/attachments.rs b/src/cortex-cli/src/run_cmd/attachments.rs index facc1f7c..e77e7e49 100644 --- a/src/cortex-cli/src/run_cmd/attachments.rs +++ b/src/cortex-cli/src/run_cmd/attachments.rs @@ -41,8 +41,9 @@ pub async fn process_file_attachments( bail!("File not found: {}", file_path.display()); } - let metadata = std::fs::metadata(&resolved_path) - .with_context(|| format!("Failed to read file metadata: {}", resolved_path.display()))?; + let metadata = std::fs::metadata(&resolved_path).with_context(|| { + format!("Failed to read file metadata: {}", resolved_path.display()) + })?; // Validate file is safe to attach validate_file_attachment(&resolved_path, &metadata)?; diff --git a/src/cortex-cli/src/run_cmd/execution.rs b/src/cortex-cli/src/run_cmd/execution.rs index de068d59..5ec34066 100644 --- a/src/cortex-cli/src/run_cmd/execution.rs +++ b/src/cortex-cli/src/run_cmd/execution.rs @@ -2,7 +2,6 @@ use anyhow::{Context, Result, bail}; use std::io::{self, IsTerminal, Read, Write}; -use std::path::PathBuf; use std::time::Duration; use crate::styled_output::{print_success, print_warning}; diff --git a/src/cortex-cli/src/run_cmd/output.rs b/src/cortex-cli/src/run_cmd/output.rs index 56f53efb..99112457 100644 --- a/src/cortex-cli/src/run_cmd/output.rs +++ b/src/cortex-cli/src/run_cmd/output.rs @@ -1,6 +1,6 @@ //! Output handling utilities: clipboard, notifications, and formatting. -use anyhow::{Context, Result, bail}; +use anyhow::{Context, Result}; use std::io::Write; /// Copy text to system clipboard. diff --git a/src/cortex-common/src/model_presets/mod.rs b/src/cortex-common/src/model_presets/mod.rs index b5e51fba..18804186 100644 --- a/src/cortex-common/src/model_presets/mod.rs +++ b/src/cortex-common/src/model_presets/mod.rs @@ -18,10 +18,10 @@ pub use types::{ModelAlias, ModelPreset, ModelResolution}; pub use constants::{DEFAULT_MODEL, DEFAULT_MODELS, DEFAULT_PROVIDER}; // Re-export preset data and helpers -pub use presets::{get_model_preset, get_models_for_provider, MODEL_PRESETS}; +pub use presets::{MODEL_PRESETS, get_model_preset, get_models_for_provider}; // Re-export alias data and helpers -pub use aliases::{list_model_aliases, resolve_model_alias, MODEL_ALIASES}; +pub use aliases::{MODEL_ALIASES, list_model_aliases, resolve_model_alias}; // Re-export resolution functions pub use resolution::{resolve_model_with_info, warn_if_ambiguous_model}; diff --git a/src/cortex-core/src/markdown/languages.rs b/src/cortex-core/src/markdown/languages.rs index 0e557a72..baae39f2 100644 --- a/src/cortex-core/src/markdown/languages.rs +++ b/src/cortex-core/src/markdown/languages.rs @@ -6,8 +6,8 @@ //! - A global default highlighter singleton //! - Helper functions for language detection -use once_cell::sync::Lazy; use cortex_tui_syntax::{Highlighter, LanguageConfig}; +use once_cell::sync::Lazy; use std::sync::Arc; // ============================================================================ diff --git a/src/cortex-core/src/markdown/renderer/handlers.rs b/src/cortex-core/src/markdown/renderer/handlers.rs index e319e028..1b50cf0f 100644 --- a/src/cortex-core/src/markdown/renderer/handlers.rs +++ b/src/cortex-core/src/markdown/renderer/handlers.rs @@ -7,7 +7,7 @@ use unicode_width::UnicodeWidthStr; use crate::markdown::inline::{render_blockquote_prefix, render_hr}; use crate::markdown::list::ListContext; -use crate::markdown::table::{render_table_simple, TableBuilder}; +use crate::markdown::table::{TableBuilder, render_table_simple}; use super::helpers::{get_bullet, heading_level_to_u8}; use super::state::RenderState; @@ -34,11 +34,7 @@ impl<'a> RenderState<'a> { self.code_language = match kind { CodeBlockKind::Fenced(lang) => { let lang = lang.to_string(); - if lang.is_empty() { - None - } else { - Some(lang) - } + if lang.is_empty() { None } else { Some(lang) } } CodeBlockKind::Indented => None, }; diff --git a/src/cortex-core/src/markdown/renderer/incremental.rs b/src/cortex-core/src/markdown/renderer/incremental.rs index d94dfbb6..b666551b 100644 --- a/src/cortex-core/src/markdown/renderer/incremental.rs +++ b/src/cortex-core/src/markdown/renderer/incremental.rs @@ -2,8 +2,8 @@ use ratatui::text::Line; -use super::helpers::hash_string; use super::MarkdownRenderer; +use super::helpers::hash_string; /// Incremental markdown renderer with intelligent caching. /// diff --git a/src/cortex-core/src/markdown/renderer/state.rs b/src/cortex-core/src/markdown/renderer/state.rs index 2c67d51b..d34c45d7 100644 --- a/src/cortex-core/src/markdown/renderer/state.rs +++ b/src/cortex-core/src/markdown/renderer/state.rs @@ -5,7 +5,7 @@ use ratatui::style::Style; use ratatui::text::{Line, Span}; use crate::markdown::list::ListContext; -use crate::markdown::table::{render_table_simple, TableBuilder}; +use crate::markdown::table::{TableBuilder, render_table_simple}; use super::MarkdownRenderer; diff --git a/src/cortex-core/src/markdown/table/render.rs b/src/cortex-core/src/markdown/table/render.rs index 8729c175..fcec8bd6 100644 --- a/src/cortex-core/src/markdown/table/render.rs +++ b/src/cortex-core/src/markdown/table/render.rs @@ -6,7 +6,7 @@ use ratatui::style::{Color, Style}; use ratatui::text::{Line, Span}; use super::border; -use super::types::{Alignment, Table, TableCell, CELL_PADDING}; +use super::types::{Alignment, CELL_PADDING, Table, TableCell}; use super::utils::{align_text, truncate_with_ellipsis}; /// Renders a table to Lines with full ASCII borders. diff --git a/src/cortex-core/src/markdown/table/tests.rs b/src/cortex-core/src/markdown/table/tests.rs index 4c3ebe5b..b483a020 100644 --- a/src/cortex-core/src/markdown/table/tests.rs +++ b/src/cortex-core/src/markdown/table/tests.rs @@ -5,10 +5,10 @@ mod tests { use ratatui::style::{Color, Style}; use ratatui::text::Span; + use crate::markdown::table::utils::{align_text, longest_word_width, truncate_with_ellipsis}; use crate::markdown::table::{ - border, render_table, render_table_simple, Alignment, Table, TableBuilder, TableCell, + Alignment, Table, TableBuilder, TableCell, border, render_table, render_table_simple, }; - use crate::markdown::table::utils::{align_text, longest_word_width, truncate_with_ellipsis}; #[test] fn test_empty_table() { diff --git a/src/cortex-core/src/widgets/chat/mod.rs b/src/cortex-core/src/widgets/chat/mod.rs index fd6d903f..fe375fb4 100644 --- a/src/cortex-core/src/widgets/chat/mod.rs +++ b/src/cortex-core/src/widgets/chat/mod.rs @@ -30,7 +30,7 @@ mod wrapping; // Re-export public types and widgets pub use message_cell::MessageCell; pub use types::{Message, MessageRole, StyledSegment}; -pub use widget::{extract_selected_text, ChatWidget}; +pub use widget::{ChatWidget, extract_selected_text}; // Re-export utility functions for internal use pub use parsing::parse_markdown_lite; diff --git a/src/cortex-core/src/widgets/spinner/approval.rs b/src/cortex-core/src/widgets/spinner/approval.rs index 35d89490..032b0748 100644 --- a/src/cortex-core/src/widgets/spinner/approval.rs +++ b/src/cortex-core/src/widgets/spinner/approval.rs @@ -1,6 +1,6 @@ //! Approval indicator for awaiting user confirmation. -use crate::animation::{interpolate_color, Pulse, Spinner}; +use crate::animation::{Pulse, Spinner, interpolate_color}; use crate::style::{CYAN_PRIMARY, ELECTRIC_BLUE, TEXT}; use ratatui::prelude::*; use ratatui::widgets::Widget; diff --git a/src/cortex-core/src/widgets/spinner/streaming.rs b/src/cortex-core/src/widgets/spinner/streaming.rs index b4fb07d1..56d8b53e 100644 --- a/src/cortex-core/src/widgets/spinner/streaming.rs +++ b/src/cortex-core/src/widgets/spinner/streaming.rs @@ -1,6 +1,6 @@ //! Streaming indicator for AI response streaming with token count. -use crate::animation::{interpolate_color, Pulse, Spinner, TokenCounter}; +use crate::animation::{Pulse, Spinner, TokenCounter, interpolate_color}; use crate::style::{CYAN_PRIMARY, ELECTRIC_BLUE, TEXT, TEXT_DIM}; use ratatui::prelude::*; use ratatui::widgets::Widget; diff --git a/src/cortex-engine/examples/test_api.rs b/src/cortex-engine/examples/test_api.rs index 91669cbc..8f16315c 100644 --- a/src/cortex-engine/examples/test_api.rs +++ b/src/cortex-engine/examples/test_api.rs @@ -42,7 +42,8 @@ async fn main() { AUTHORIZATION, format!( "Bearer {}", - std::env::var("CORTEX_API_KEY").expect("CORTEX_API_KEY environment variable required") + std::env::var("CORTEX_API_KEY") + .expect("CORTEX_API_KEY environment variable required") ), ) .json(&body) diff --git a/src/cortex-engine/src/auth/manager.rs b/src/cortex-engine/src/auth/manager.rs index 4755209b..533d9ace 100644 --- a/src/cortex-engine/src/auth/manager.rs +++ b/src/cortex-engine/src/auth/manager.rs @@ -77,5 +77,3 @@ impl AuthManager { &self.store } } - - diff --git a/src/cortex-engine/src/auth/mod.rs b/src/cortex-engine/src/auth/mod.rs index b88cd7f3..015ffd4a 100644 --- a/src/cortex-engine/src/auth/mod.rs +++ b/src/cortex-engine/src/auth/mod.rs @@ -36,7 +36,6 @@ const KEYRING_OAUTH_ACCOUNT: &str = "oauth-tokens"; #[cfg(test)] mod tests { use super::*; - use secrecy::ExposeSecret; #[test] fn test_api_key_credential() { diff --git a/src/cortex-engine/src/auth/utils.rs b/src/cortex-engine/src/auth/utils.rs index 70eb9ea2..bed7fd3f 100644 --- a/src/cortex-engine/src/auth/utils.rs +++ b/src/cortex-engine/src/auth/utils.rs @@ -5,7 +5,7 @@ use std::time::{SystemTime, UNIX_EPOCH}; -use base64::{engine::general_purpose::STANDARD as BASE64, Engine}; +use base64::{Engine, engine::general_purpose::STANDARD as BASE64}; use secrecy::SecretString; use sha2::{Digest, Sha256}; diff --git a/src/cortex-engine/src/commands/mod.rs b/src/cortex-engine/src/commands/mod.rs index 31bfa3e1..218bfed9 100644 --- a/src/cortex-engine/src/commands/mod.rs +++ b/src/cortex-engine/src/commands/mod.rs @@ -16,13 +16,13 @@ //! - /model - Change model //! - /cost - Show token usage and cost -mod types; -mod registry; -mod navigation; -mod information; mod configuration; -mod development; mod custom; +mod development; +mod information; +mod navigation; +mod registry; +mod types; // Re-export main types pub use types::{ @@ -37,14 +37,6 @@ pub use registry::CommandRegistry; pub use custom::DynamicCustomCommand; // Re-export individual commands for direct use if needed -pub use navigation::{ - ClearCommand, CompactCommand, ExitCommand, FavoriteCommand, HelpCommand, ResumeCommand, - RewindCommand, SessionsCommand, UndoCommand, -}; -pub use information::{ - AgentsCommand, ConfigCommand, CostCommand, ModelCommand, PluginsCommand, RateLimitsCommand, - SkillsCommand, -}; pub use configuration::{ AutoCommand, CustomCommandsCommand, DelegatesCommand, ExperimentalCommand, HooksCommand, InstallGithubAppCommand, SpecCommand, @@ -53,3 +45,11 @@ pub use development::{ BgProcessCommand, BugCommand, DiagnosticsCommand, GhostCommand, IdeCommand, MultiEditCommand, ReviewCommand, ShareCommand, }; +pub use information::{ + AgentsCommand, ConfigCommand, CostCommand, ModelCommand, PluginsCommand, RateLimitsCommand, + SkillsCommand, +}; +pub use navigation::{ + ClearCommand, CompactCommand, ExitCommand, FavoriteCommand, HelpCommand, ResumeCommand, + RewindCommand, SessionsCommand, UndoCommand, +}; diff --git a/src/cortex-engine/src/commands/registry.rs b/src/cortex-engine/src/commands/registry.rs index 1bfd3af7..cdce988d 100644 --- a/src/cortex-engine/src/commands/registry.rs +++ b/src/cortex-engine/src/commands/registry.rs @@ -7,23 +7,23 @@ use tokio::sync::RwLock; use crate::error::Result; -use super::navigation::{ - ClearCommand, CompactCommand, ExitCommand, FavoriteCommand, HelpCommand, ResumeCommand, - RewindCommand, SessionsCommand, UndoCommand, -}; -use super::information::{ - AgentsCommand, ConfigCommand, CostCommand, ModelCommand, PluginsCommand, RateLimitsCommand, - SkillsCommand, -}; use super::configuration::{ AutoCommand, CustomCommandsCommand, DelegatesCommand, ExperimentalCommand, HooksCommand, InstallGithubAppCommand, SpecCommand, }; +use super::custom::DynamicCustomCommand; use super::development::{ BgProcessCommand, BugCommand, DiagnosticsCommand, GhostCommand, IdeCommand, MultiEditCommand, ReviewCommand, ShareCommand, }; -use super::custom::DynamicCustomCommand; +use super::information::{ + AgentsCommand, ConfigCommand, CostCommand, ModelCommand, PluginsCommand, RateLimitsCommand, + SkillsCommand, +}; +use super::navigation::{ + ClearCommand, CompactCommand, ExitCommand, FavoriteCommand, HelpCommand, ResumeCommand, + RewindCommand, SessionsCommand, UndoCommand, +}; use super::types::{CommandContext, CommandHandler, CommandInvocation, CommandMeta, CommandResult}; /// Command registry. diff --git a/src/cortex-engine/src/mcp/client.rs b/src/cortex-engine/src/mcp/client.rs index e18552b4..6ee0ce2b 100644 --- a/src/cortex-engine/src/mcp/client.rs +++ b/src/cortex-engine/src/mcp/client.rs @@ -18,9 +18,9 @@ use tokio::sync::{Mutex, RwLock}; use tracing::{error, info, warn}; use cortex_mcp_types::{ - CallToolParams, CallToolResult, InitializeParams, - InitializeResult, JSONRPC_VERSION, JsonRpcRequest, JsonRpcResponse, ListResourcesResult, - ListToolsResult, ReadResourceParams, ReadResourceResult, Resource, Tool, methods, + CallToolParams, CallToolResult, InitializeParams, InitializeResult, JSONRPC_VERSION, + JsonRpcRequest, JsonRpcResponse, ListResourcesResult, ListToolsResult, ReadResourceParams, + ReadResourceResult, Resource, Tool, methods, }; use cortex_common::create_default_client; diff --git a/src/cortex-engine/src/mcp/manager.rs b/src/cortex-engine/src/mcp/manager.rs index d53e65f0..6a69314b 100644 --- a/src/cortex-engine/src/mcp/manager.rs +++ b/src/cortex-engine/src/mcp/manager.rs @@ -25,7 +25,11 @@ pub enum McpLifecycleEvent { /// Server was added to the manager ServerAdded { name: String }, /// Server was connected and tools discovered - ServerConnected { name: String, tool_count: usize, tool_names: Vec }, + ServerConnected { + name: String, + tool_count: usize, + tool_names: Vec, + }, /// Server was disconnected ServerDisconnected { name: String }, /// Server was removed from the manager @@ -108,7 +112,9 @@ impl McpConnectionManager { /// Remove a server. pub async fn remove_server(&self, name: &str) -> Result<()> { - self.send_event(McpLifecycleEvent::ServerRemoved { name: name.to_string() }); + self.send_event(McpLifecycleEvent::ServerRemoved { + name: name.to_string(), + }); // Disconnect if connected if let Some(client) = self.clients.write().await.remove(name) { @@ -232,7 +238,9 @@ impl McpConnectionManager { let result = client.disconnect().await; if result.is_ok() { - self.send_event(McpLifecycleEvent::ServerDisconnected { name: name.to_string() }); + self.send_event(McpLifecycleEvent::ServerDisconnected { + name: name.to_string(), + }); } result diff --git a/src/cortex-engine/src/mcp/mod.rs b/src/cortex-engine/src/mcp/mod.rs index 4c140ebe..de4ae35b 100644 --- a/src/cortex-engine/src/mcp/mod.rs +++ b/src/cortex-engine/src/mcp/mod.rs @@ -28,8 +28,8 @@ pub use manager::{McpConnectionManager, create_qualified_name, parse_qualified_n // Registry exports pub use registry::{ - McpRegistryClient, RegistryServer, RegistryInstallConfig, StdioConfig, HttpConfig, - REGISTRY_URL, DEFAULT_CACHE_TTL, + DEFAULT_CACHE_TTL, HttpConfig, McpRegistryClient, REGISTRY_URL, RegistryInstallConfig, + RegistryServer, StdioConfig, }; use std::collections::HashMap; diff --git a/src/cortex-engine/src/mcp/registry.rs b/src/cortex-engine/src/mcp/registry.rs index 84094222..d500b1c4 100644 --- a/src/cortex-engine/src/mcp/registry.rs +++ b/src/cortex-engine/src/mcp/registry.rs @@ -139,7 +139,9 @@ impl McpRegistryClient { cache_ttl: Duration, cache_dir: Option, ) -> Result { - let http_client = create_default_client().map_err(|e| anyhow::anyhow!(e)).context("Failed to create HTTP client")?; + let http_client = create_default_client() + .map_err(|e| anyhow::anyhow!(e)) + .context("Failed to create HTTP client")?; Ok(Self { http_client, @@ -306,7 +308,9 @@ impl McpRegistryClient { .filter(|s| { s.name.to_lowercase().contains(&query_lower) || s.description.to_lowercase().contains(&query_lower) - || s.tags.iter().any(|t| t.to_lowercase().contains(&query_lower)) + || s.tags + .iter() + .any(|t| t.to_lowercase().contains(&query_lower)) || s.category .as_ref() .map(|c| c.to_lowercase().contains(&query_lower)) @@ -385,7 +389,11 @@ impl McpRegistryClient { vendor: Some("Anthropic".to_string()), homepage: Some("https://github.com/modelcontextprotocol/servers".to_string()), category: Some("database".to_string()), - tags: vec!["database".to_string(), "sql".to_string(), "postgres".to_string()], + tags: vec![ + "database".to_string(), + "sql".to_string(), + "postgres".to_string(), + ], install: RegistryInstallConfig { stdio: Some(StdioConfig { command: "npx".to_string(), @@ -404,7 +412,11 @@ impl McpRegistryClient { vendor: Some("Anthropic".to_string()), homepage: Some("https://github.com/modelcontextprotocol/servers".to_string()), category: Some("database".to_string()), - tags: vec!["database".to_string(), "sql".to_string(), "sqlite".to_string()], + tags: vec![ + "database".to_string(), + "sql".to_string(), + "sqlite".to_string(), + ], install: RegistryInstallConfig { stdio: Some(StdioConfig { command: "npx".to_string(), diff --git a/src/cortex-engine/src/rollout/reader.rs b/src/cortex-engine/src/rollout/reader.rs index 363bffa2..e16c5ab8 100644 --- a/src/cortex-engine/src/rollout/reader.rs +++ b/src/cortex-engine/src/rollout/reader.rs @@ -84,11 +84,6 @@ pub fn read_rollout(path: &Path) -> Result> { line_num, error_msg ); - eprintln!( - "Warning: Session file appears to be corrupted ({} entries skipped). \ - Some conversation history may be missing.", - corrupted_count - ); } } diff --git a/src/cortex-engine/src/sandbox/policy.rs b/src/cortex-engine/src/sandbox/policy.rs index 6c67c7f1..4768a1a5 100644 --- a/src/cortex-engine/src/sandbox/policy.rs +++ b/src/cortex-engine/src/sandbox/policy.rs @@ -210,10 +210,7 @@ impl ProtectedPaths { /// Get standard protected paths for a workspace. pub fn for_workspace(workspace: &Path) -> Self { Self { - read_only: vec![ - workspace.join(".git"), - workspace.join(".cortex"), - ], + read_only: vec![workspace.join(".git"), workspace.join(".cortex")], denied: vec![ // Sensitive credential directories dirs::home_dir().map(|h| h.join(".ssh")).unwrap_or_default(), diff --git a/src/cortex-engine/src/security/approval_memory.rs b/src/cortex-engine/src/security/approval_memory.rs index 1f2a95c7..c0c19bf2 100644 --- a/src/cortex-engine/src/security/approval_memory.rs +++ b/src/cortex-engine/src/security/approval_memory.rs @@ -2,10 +2,10 @@ //! //! Remembers user decisions (allow/deny/always) for the duration of a session. +use serde::{Deserialize, Serialize}; use std::collections::HashMap; use std::sync::Arc; use tokio::sync::RwLock; -use serde::{Deserialize, Serialize}; /// User's decision for an approval request. #[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize)] @@ -98,7 +98,7 @@ impl ApprovalMemory { /// Record an approval decision. pub async fn record(&self, approval_type: ApprovalType, decision: ApprovalDecision) { let key = approval_type.key(); - + match decision { ApprovalDecision::Always | ApprovalDecision::Never => { // Store as pattern for future matching @@ -182,7 +182,9 @@ mod tests { assert!(memory.check(&approval).await.is_none()); // Record allow - memory.record(approval.clone(), ApprovalDecision::Allow).await; + memory + .record(approval.clone(), ApprovalDecision::Allow) + .await; // Should remember assert_eq!(memory.check(&approval).await, Some(ApprovalDecision::Allow)); @@ -195,17 +197,25 @@ mod tests { let approval2 = ApprovalType::BashCommand("git push origin dev".to_string()); // Record "always" for git push - memory.record(approval1.clone(), ApprovalDecision::Always).await; + memory + .record(approval1.clone(), ApprovalDecision::Always) + .await; // Both should match - assert_eq!(memory.check(&approval1).await, Some(ApprovalDecision::Always)); - assert_eq!(memory.check(&approval2).await, Some(ApprovalDecision::Always)); + assert_eq!( + memory.check(&approval1).await, + Some(ApprovalDecision::Always) + ); + assert_eq!( + memory.check(&approval2).await, + Some(ApprovalDecision::Always) + ); } #[tokio::test] async fn test_different_types() { let memory = ApprovalMemory::new(); - + let bash = ApprovalType::BashCommand("ls".to_string()); let edit = ApprovalType::FileEdit("/tmp/test.txt".to_string()); diff --git a/src/cortex-engine/src/security/doom_loop.rs b/src/cortex-engine/src/security/doom_loop.rs index 1f8e1f33..afcef8ad 100644 --- a/src/cortex-engine/src/security/doom_loop.rs +++ b/src/cortex-engine/src/security/doom_loop.rs @@ -3,9 +3,9 @@ //! Detects when the agent is stuck in infinite loops of tool calls //! and prompts the user for intervention. +use serde::{Deserialize, Serialize}; use std::collections::{HashMap, HashSet}; use std::time::{Duration, Instant}; -use serde::{Deserialize, Serialize}; /// Configuration for doom loop detection. #[derive(Debug, Clone, Serialize, Deserialize)] @@ -118,14 +118,15 @@ impl HashDoomLoopDetector { // Clean old entries outside the window and their associated counts let window = Duration::from_secs(self.config.window_seconds); let now = Instant::now(); - + // Collect hashes of expired records to clean up counts - let expired_hashes: Vec = self.call_history + let expired_hashes: Vec = self + .call_history .iter() .filter(|r| now.duration_since(r.timestamp) >= window) .map(|r| r.hash) .collect(); - + // Decrement counts for expired records for expired_hash in expired_hashes { if let Some(count) = self.identical_call_counts.get_mut(&expired_hash) { @@ -135,9 +136,10 @@ impl HashDoomLoopDetector { } } } - + // Remove expired records - self.call_history.retain(|r| now.duration_since(r.timestamp) < window); + self.call_history + .retain(|r| now.duration_since(r.timestamp) < window); // Record this call self.call_history.push(ToolCallRecord { @@ -180,9 +182,9 @@ impl HashDoomLoopDetector { /// Hash a tool call for comparison. fn hash_call(tool_name: &str, params_str: &str) -> u64 { - use std::hash::{Hash, Hasher}; use std::collections::hash_map::DefaultHasher; - + use std::hash::{Hash, Hasher}; + let mut hasher = DefaultHasher::new(); tool_name.hash(&mut hasher); params_str.hash(&mut hasher); @@ -207,10 +209,7 @@ pub enum DoomLoopCheck { hash: u64, }, /// Too many total calls in this turn. - TooManyCalls { - count: usize, - max: usize, - }, + TooManyCalls { count: usize, max: usize }, } impl DoomLoopCheck { @@ -223,20 +222,16 @@ impl DoomLoopCheck { pub fn message(&self) -> Option { match self { DoomLoopCheck::Ok => None, - DoomLoopCheck::LoopDetected { tool, count, .. } => { - Some(format!( - "Potential doom loop detected: '{}' called {} times with same parameters. \ + DoomLoopCheck::LoopDetected { tool, count, .. } => Some(format!( + "Potential doom loop detected: '{}' called {} times with same parameters. \ The agent may be stuck. Continue?", - tool, count - )) - } - DoomLoopCheck::TooManyCalls { count, max } => { - Some(format!( - "Too many tool calls in this turn ({}/{}). \ + tool, count + )), + DoomLoopCheck::TooManyCalls { count, max } => Some(format!( + "Too many tool calls in this turn ({}/{}). \ The agent may be stuck in a loop. Continue?", - count, max - )) - } + count, max + )), } } } @@ -255,15 +250,21 @@ mod tests { enabled: true, default_action: "ask".to_string(), }; - + let mut detector = HashDoomLoopDetector::with_config(config); - + // Same call multiple times let params = json!({"file": "test.txt"}); - - assert!(matches!(detector.record_call("read", ¶ms), DoomLoopCheck::Ok)); - assert!(matches!(detector.record_call("read", ¶ms), DoomLoopCheck::Ok)); - + + assert!(matches!( + detector.record_call("read", ¶ms), + DoomLoopCheck::Ok + )); + assert!(matches!( + detector.record_call("read", ¶ms), + DoomLoopCheck::Ok + )); + // Third identical call should trigger match detector.record_call("read", ¶ms) { DoomLoopCheck::LoopDetected { tool, count, .. } => { @@ -277,10 +278,13 @@ mod tests { #[test] fn test_different_params_no_loop() { let mut detector = HashDoomLoopDetector::default_config(); - + for i in 0..10 { let params = json!({"file": format!("test{}.txt", i)}); - assert!(matches!(detector.record_call("read", ¶ms), DoomLoopCheck::Ok)); + assert!(matches!( + detector.record_call("read", ¶ms), + DoomLoopCheck::Ok + )); } } @@ -290,16 +294,19 @@ mod tests { max_identical_calls: 2, ..Default::default() }; - + let mut detector = HashDoomLoopDetector::with_config(config); let params = json!({"file": "test.txt"}); - + detector.record_call("read", ¶ms); - + if let DoomLoopCheck::LoopDetected { hash, .. } = detector.record_call("read", ¶ms) { detector.allow_pattern(hash); // Now it should be ok - assert!(matches!(detector.record_call("read", ¶ms), DoomLoopCheck::Ok)); + assert!(matches!( + detector.record_call("read", ¶ms), + DoomLoopCheck::Ok + )); } } } diff --git a/src/cortex-engine/src/security/external_directory.rs b/src/cortex-engine/src/security/external_directory.rs index a3dcd4d6..1144436d 100644 --- a/src/cortex-engine/src/security/external_directory.rs +++ b/src/cortex-engine/src/security/external_directory.rs @@ -27,17 +27,23 @@ impl ExternalDirectoryChecker { /// Check if a path is external to the project. pub fn is_external(&self, path: &Path) -> bool { let path = path.canonicalize().unwrap_or_else(|_| path.to_path_buf()); - let root = self.project_root.canonicalize().unwrap_or_else(|_| self.project_root.clone()); - + let root = self + .project_root + .canonicalize() + .unwrap_or_else(|_| self.project_root.clone()); + !path.starts_with(&root) } /// Check if a path is allowed (either in project or explicitly allowed). pub async fn is_allowed(&self, path: &Path) -> bool { let path = path.canonicalize().unwrap_or_else(|_| path.to_path_buf()); - + // Check project root - let root = self.project_root.canonicalize().unwrap_or_else(|_| self.project_root.clone()); + let root = self + .project_root + .canonicalize() + .unwrap_or_else(|_| self.project_root.clone()); if path.starts_with(&root) { return true; } @@ -71,8 +77,11 @@ impl ExternalDirectoryChecker { /// Get relative path from project root, or absolute if external. pub fn relative_path(&self, path: &Path) -> PathBuf { let path = path.canonicalize().unwrap_or_else(|_| path.to_path_buf()); - let root = self.project_root.canonicalize().unwrap_or_else(|_| self.project_root.clone()); - + let root = self + .project_root + .canonicalize() + .unwrap_or_else(|_| self.project_root.clone()); + path.strip_prefix(&root) .map(|p| p.to_path_buf()) .unwrap_or(path) @@ -92,26 +101,26 @@ impl Clone for ExternalDirectoryChecker { pub fn is_external_path(path: &Path, root: &Path) -> bool { let path = path.canonicalize().unwrap_or_else(|_| path.to_path_buf()); let root = root.canonicalize().unwrap_or_else(|_| root.to_path_buf()); - + !path.starts_with(&root) } /// Get common external directories that might need access. pub fn common_external_dirs() -> Vec { let mut dirs = Vec::new(); - + // Home directory if let Some(home) = dirs::home_dir() { // Common config locations dirs.push(home.join(".config")); dirs.push(home.join(".local")); - + #[cfg(target_os = "macos")] { dirs.push(home.join("Library/Application Support")); dirs.push(home.join("Library/Preferences")); } - + #[cfg(target_os = "windows")] { if let Some(app_data) = dirs::config_dir() { @@ -119,10 +128,10 @@ pub fn common_external_dirs() -> Vec { } } } - + // Temp directory dirs.push(std::env::temp_dir()); - + dirs } @@ -184,7 +193,7 @@ mod tests { std::fs::create_dir_all(&src_dir).unwrap(); let inside = src_dir.join("main.rs"); std::fs::write(&inside, "fn main() {}").unwrap(); - + let relative = checker.relative_path(&inside); let expected = PathBuf::from("src").join("main.rs"); assert_eq!(relative, expected); diff --git a/src/cortex-engine/src/security/file_time.rs b/src/cortex-engine/src/security/file_time.rs index f5455ca0..e1c60654 100644 --- a/src/cortex-engine/src/security/file_time.rs +++ b/src/cortex-engine/src/security/file_time.rs @@ -7,18 +7,18 @@ use std::collections::HashMap; use std::path::{Path, PathBuf}; use std::sync::Arc; use std::time::SystemTime; -use tokio::sync::RwLock; use thiserror::Error; +use tokio::sync::RwLock; /// Error types for file time tracking. #[derive(Debug, Error)] pub enum FileTimeError { #[error("File '{0}' must be read before editing")] NotRead(String), - + #[error("File '{0}' was modified externally since last read")] ModifiedExternally(String), - + #[error("Cannot get modification time for '{0}': {1}")] IoError(String, String), } @@ -51,7 +51,7 @@ impl FileTimeTracker { /// Record that a file was read. pub async fn record_read(&self, session_id: &str, path: &Path) -> Result<(), FileTimeError> { let path = path.canonicalize().unwrap_or_else(|_| path.to_path_buf()); - + let mtime = tokio::fs::metadata(&path) .await .and_then(|m| m.modified()) @@ -72,13 +72,17 @@ impl FileTimeTracker { } /// Assert that a file can be written (was read and not modified externally). - pub async fn assert_writable(&self, session_id: &str, path: &Path) -> Result<(), FileTimeError> { + pub async fn assert_writable( + &self, + session_id: &str, + path: &Path, + ) -> Result<(), FileTimeError> { let path = path.canonicalize().unwrap_or_else(|_| path.to_path_buf()); - + // Check if file was read let records = self.records.read().await; let session_records = records.get(session_id); - + let record = session_records .and_then(|r| r.get(&path)) .ok_or_else(|| FileTimeError::NotRead(path.display().to_string()))?; @@ -91,7 +95,9 @@ impl FileTimeTracker { .map_err(|e| FileTimeError::IoError(path.display().to_string(), e.to_string()))?; if current_mtime != record.mtime_at_read { - return Err(FileTimeError::ModifiedExternally(path.display().to_string())); + return Err(FileTimeError::ModifiedExternally( + path.display().to_string(), + )); } } @@ -104,7 +110,7 @@ impl FileTimeTracker { F: std::future::Future, { let path = path.canonicalize().unwrap_or_else(|_| path.to_path_buf()); - + // Get or create lock for this file let lock = { let mut locks = self.locks.write().await; @@ -136,7 +142,11 @@ impl FileTimeTracker { } /// Get the time a file was last read. - pub async fn last_read_time(&self, session_id: &str, path: &Path) -> Option { + pub async fn last_read_time( + &self, + session_id: &str, + path: &Path, + ) -> Option { let path = path.canonicalize().unwrap_or_else(|_| path.to_path_buf()); let records = self.records.read().await; records @@ -163,14 +173,14 @@ pub fn global_tracker() -> &'static FileTimeTracker { #[cfg(test)] mod tests { use super::*; - use tempfile::NamedTempFile; use std::io::Write; + use tempfile::NamedTempFile; #[tokio::test] async fn test_read_before_write() { let tracker = FileTimeTracker::new(); let session = "test-session"; - + // Create temp file let mut file = NamedTempFile::new().unwrap(); writeln!(file, "test content").unwrap(); @@ -192,7 +202,7 @@ mod tests { async fn test_external_modification() { let tracker = FileTimeTracker::new(); let session = "test-session"; - + // Create temp file let file = NamedTempFile::new().unwrap(); let path = file.path().to_path_buf(); @@ -222,16 +232,20 @@ mod tests { // Two concurrent writes should be serialized let h1 = tokio::spawn(async move { - tracker.with_lock(&path, async { - tokio::time::sleep(std::time::Duration::from_millis(50)).await; - counter.fetch_add(1, std::sync::atomic::Ordering::SeqCst); - }).await; + tracker + .with_lock(&path, async { + tokio::time::sleep(std::time::Duration::from_millis(50)).await; + counter.fetch_add(1, std::sync::atomic::Ordering::SeqCst); + }) + .await; }); let h2 = tokio::spawn(async move { - tracker2.with_lock(&path2, async { - counter2.fetch_add(1, std::sync::atomic::Ordering::SeqCst); - }).await; + tracker2 + .with_lock(&path2, async { + counter2.fetch_add(1, std::sync::atomic::Ordering::SeqCst); + }) + .await; }); h1.await.unwrap(); diff --git a/src/cortex-engine/src/security/mod.rs b/src/cortex-engine/src/security/mod.rs index b7d706bb..5e5e636b 100644 --- a/src/cortex-engine/src/security/mod.rs +++ b/src/cortex-engine/src/security/mod.rs @@ -32,9 +32,7 @@ pub use approval_memory::{ApprovalDecision, ApprovalMemory, ApprovalType, global pub use doom_loop::{DoomLoopCheck, DoomLoopConfig, HashDoomLoopDetector}; -pub use external_directory::{ - ExternalDirectoryChecker, common_external_dirs, is_external_path, -}; +pub use external_directory::{ExternalDirectoryChecker, common_external_dirs, is_external_path}; pub use file_time::{FileTimeError, FileTimeTracker, global_tracker}; diff --git a/src/cortex-engine/src/security/wildcard.rs b/src/cortex-engine/src/security/wildcard.rs index ee27e957..71556f3e 100644 --- a/src/cortex-engine/src/security/wildcard.rs +++ b/src/cortex-engine/src/security/wildcard.rs @@ -5,8 +5,8 @@ //! - `?` matches single character //! - Patterns like "git diff*", "rm -rf*", etc. -use std::collections::HashMap; use serde::{Deserialize, Serialize}; +use std::collections::HashMap; /// Permission level for a pattern. #[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize)] @@ -57,7 +57,10 @@ impl WildcardMatcher { "deny" => Permission::Deny, _ => Permission::Ask, }; - PermissionPattern { pattern, permission } + PermissionPattern { + pattern, + permission, + } }) .collect(); Self { patterns } @@ -100,16 +103,11 @@ impl WildcardMatcher { fn glob_match(pattern: &str, text: &str) -> bool { let pattern_chars: Vec = pattern.chars().collect(); let text_chars: Vec = text.chars().collect(); - + Self::glob_match_recursive(&pattern_chars, &text_chars, 0, 0) } - fn glob_match_recursive( - pattern: &[char], - text: &[char], - pi: usize, - ti: usize, - ) -> bool { + fn glob_match_recursive(pattern: &[char], text: &[char], pi: usize, ti: usize) -> bool { // If pattern is exhausted, text must be too if pi >= pattern.len() { return ti >= text.len(); @@ -167,7 +165,7 @@ impl WildcardMatcher { /// Default bash command patterns for safety. pub fn default_bash_patterns() -> WildcardMatcher { let mut matcher = WildcardMatcher::new(); - + // Safe commands - always allow matcher.add_pattern("git status*", Permission::Allow); matcher.add_pattern("git diff*", Permission::Allow); @@ -188,7 +186,7 @@ pub fn default_bash_patterns() -> WildcardMatcher { matcher.add_pattern("date", Permission::Allow); matcher.add_pattern("which *", Permission::Allow); matcher.add_pattern("type *", Permission::Allow); - + // Build commands - ask matcher.add_pattern("cargo *", Permission::Ask); matcher.add_pattern("npm *", Permission::Ask); @@ -200,7 +198,7 @@ pub fn default_bash_patterns() -> WildcardMatcher { matcher.add_pattern("node *", Permission::Ask); matcher.add_pattern("make*", Permission::Ask); matcher.add_pattern("cmake*", Permission::Ask); - + // Git write operations - ask matcher.add_pattern("git add*", Permission::Ask); matcher.add_pattern("git commit*", Permission::Ask); @@ -210,7 +208,7 @@ pub fn default_bash_patterns() -> WildcardMatcher { matcher.add_pattern("git rebase*", Permission::Ask); matcher.add_pattern("git reset*", Permission::Ask); matcher.add_pattern("git checkout*", Permission::Ask); - + // Dangerous commands - deny matcher.add_pattern("rm -rf /*", Permission::Deny); matcher.add_pattern("rm -rf ~*", Permission::Deny); @@ -224,7 +222,7 @@ pub fn default_bash_patterns() -> WildcardMatcher { matcher.add_pattern("dd if=* of=/dev/*", Permission::Deny); matcher.add_pattern("mkfs*", Permission::Deny); matcher.add_pattern(":(){ :|:& };:*", Permission::Deny); // Fork bomb - + matcher } @@ -235,8 +233,14 @@ mod tests { #[test] fn test_wildcard_matching() { assert!(WildcardMatcher::matches_pattern("git diff*", "git diff")); - assert!(WildcardMatcher::matches_pattern("git diff*", "git diff --staged")); - assert!(WildcardMatcher::matches_pattern("git diff*", "git diff HEAD~1")); + assert!(WildcardMatcher::matches_pattern( + "git diff*", + "git diff --staged" + )); + assert!(WildcardMatcher::matches_pattern( + "git diff*", + "git diff HEAD~1" + )); assert!(!WildcardMatcher::matches_pattern("git diff*", "git status")); } @@ -254,8 +258,14 @@ mod tests { matcher.add_pattern("git push*", Permission::Ask); matcher.add_pattern("rm -rf*", Permission::Deny); - assert_eq!(matcher.match_command("git diff --staged"), Some(Permission::Allow)); - assert_eq!(matcher.match_command("git push origin main"), Some(Permission::Ask)); + assert_eq!( + matcher.match_command("git diff --staged"), + Some(Permission::Allow) + ); + assert_eq!( + matcher.match_command("git push origin main"), + Some(Permission::Ask) + ); assert_eq!(matcher.match_command("rm -rf /"), Some(Permission::Deny)); assert_eq!(matcher.match_command("unknown command"), None); } @@ -263,7 +273,7 @@ mod tests { #[test] fn test_default_patterns() { let matcher = default_bash_patterns(); - + assert_eq!(matcher.match_command("git status"), Some(Permission::Allow)); assert_eq!(matcher.match_command("rm -rf /"), Some(Permission::Deny)); assert_eq!(matcher.match_command("cargo build"), Some(Permission::Ask)); diff --git a/src/cortex-engine/src/session/agent_loop.rs b/src/cortex-engine/src/session/agent_loop.rs index b68fd84e..48231c36 100644 --- a/src/cortex-engine/src/session/agent_loop.rs +++ b/src/cortex-engine/src/session/agent_loop.rs @@ -15,11 +15,11 @@ use crate::client::{ CompletionRequest, Message, ResponseEvent, ToolCall, ToolDefinition as ClientToolDefinition, }; use crate::error::{CortexError, Result}; -use crate::tools::context::ToolOutputChunk; use crate::tools::ToolContext; +use crate::tools::context::ToolOutputChunk; -use super::types::PendingToolCall; use super::Session; +use super::types::PendingToolCall; impl Session { /// Run the main session loop, processing submissions. diff --git a/src/cortex-engine/src/session/handlers.rs b/src/cortex-engine/src/session/handlers.rs index c87e6c10..f59ea29a 100644 --- a/src/cortex-engine/src/session/handlers.rs +++ b/src/cortex-engine/src/session/handlers.rs @@ -12,8 +12,8 @@ use cortex_protocol::{ use crate::client::{Message, MessageRole}; use crate::error::Result; -use crate::rollout::recorder::SessionMeta; use crate::rollout::RolloutRecorder; +use crate::rollout::recorder::SessionMeta; use crate::summarization::SummarizationStrategy; use super::Session; diff --git a/src/cortex-engine/src/session/lifecycle.rs b/src/cortex-engine/src/session/lifecycle.rs index 21a9b0f1..18190102 100644 --- a/src/cortex-engine/src/session/lifecycle.rs +++ b/src/cortex-engine/src/session/lifecycle.rs @@ -20,9 +20,9 @@ use crate::rollout::recorder::SessionMeta; use crate::rollout::{RolloutRecorder, SESSIONS_SUBDIR, get_rollout_path, read_rollout}; use crate::tools::ToolRouter; +use super::Session; use super::prompt::build_system_prompt; use super::types::{SessionHandle, SessionInfo, TokenCounter}; -use super::Session; impl Session { /// Create a new session with channels. diff --git a/src/cortex-engine/src/tools/handlers/create_agent.rs b/src/cortex-engine/src/tools/handlers/create_agent.rs index bd2edaa9..914250d0 100644 --- a/src/cortex-engine/src/tools/handlers/create_agent.rs +++ b/src/cortex-engine/src/tools/handlers/create_agent.rs @@ -238,14 +238,11 @@ mod tests { // Personal location uses the actual home directory, so this test // just verifies it doesn't fail unexpectedly - if result.is_err() { - // Expected if home dir doesn't exist or is not writable - assert!(true); - } else { - let tool_result = result.unwrap(); + if let Ok(tool_result) = result { assert!(tool_result.success); assert!(tool_result.output.contains("Agent created successfully")); } + // else: Expected if home dir doesn't exist or is not writable } #[tokio::test] @@ -320,10 +317,7 @@ mod tests { let result = handler.execute(args, &context).await; - if let Err(ref e) = result { - eprintln!("Error: {:?}", e); - } - assert!(result.is_ok()); + assert!(result.is_ok(), "Error: {:?}", result.err()); let tool_result = result.unwrap(); assert!(tool_result.success); diff --git a/src/cortex-engine/src/tools/handlers/edit_strategies/helpers.rs b/src/cortex-engine/src/tools/handlers/edit_strategies/helpers.rs index d1b3a93b..08d952a2 100644 --- a/src/cortex-engine/src/tools/handlers/edit_strategies/helpers.rs +++ b/src/cortex-engine/src/tools/handlers/edit_strategies/helpers.rs @@ -231,7 +231,11 @@ pub fn find_best_match_range( } /// Finds a match using surrounding context lines. -pub fn find_context_match(content: &str, search: &str, context_lines: usize) -> Option> { +pub fn find_context_match( + content: &str, + search: &str, + context_lines: usize, +) -> Option> { let content_lines: Vec<&str> = content.lines().collect(); let search_lines: Vec<&str> = search.lines().collect(); diff --git a/src/cortex-engine/src/tools/handlers/edit_strategies/mod.rs b/src/cortex-engine/src/tools/handlers/edit_strategies/mod.rs index 633b90b8..93e6f0ab 100644 --- a/src/cortex-engine/src/tools/handlers/edit_strategies/mod.rs +++ b/src/cortex-engine/src/tools/handlers/edit_strategies/mod.rs @@ -38,4 +38,4 @@ pub use strategies::{ pub use cascade::{CascadeReplacer, CascadeResult}; // Re-export legacy compatibility types -pub use legacy::{fuzzy_replace, FuzzyMatcher, MatchError, MatchResult, Strategy}; +pub use legacy::{FuzzyMatcher, MatchError, MatchResult, Strategy, fuzzy_replace}; diff --git a/src/cortex-engine/src/tools/registry/plugins.rs b/src/cortex-engine/src/tools/registry/plugins.rs index 11e3dd3e..f44eaba5 100644 --- a/src/cortex-engine/src/tools/registry/plugins.rs +++ b/src/cortex-engine/src/tools/registry/plugins.rs @@ -2,8 +2,8 @@ use serde_json::{Value, json}; -use super::types::PluginTool; use super::ToolRegistry; +use super::types::PluginTool; use crate::error::Result; use crate::tools::spec::{ToolDefinition, ToolResult}; diff --git a/src/cortex-exec/src/tests.rs b/src/cortex-exec/src/tests.rs index 9ca0570f..9cde462b 100644 --- a/src/cortex-exec/src/tests.rs +++ b/src/cortex-exec/src/tests.rs @@ -8,7 +8,6 @@ //! 5. Real execution scenarios (npm, cargo, etc.) use super::*; -use std::path::PathBuf; use std::time::Duration; /// Default timeout value in seconds for reference @@ -140,7 +139,6 @@ mod exec_result_tests { } mod sandbox_detection_tests { - /// Tests permission error pattern detection #[test] @@ -181,7 +179,6 @@ mod sandbox_detection_tests { } mod tailwind_scenario_tests { - /// Simulates commands needed to create a Tailwind project #[test] diff --git a/src/cortex-execpolicy/src/detection.rs b/src/cortex-execpolicy/src/detection.rs index 1329c656..3c8b8d85 100644 --- a/src/cortex-execpolicy/src/detection.rs +++ b/src/cortex-execpolicy/src/detection.rs @@ -676,11 +676,7 @@ impl<'a> DetectionHelper<'a> { } /// Check for credential/secret access. - pub fn check_credential_access( - &self, - parsed: &ParsedCommand, - detection: &mut DangerDetection, - ) { + pub fn check_credential_access(&self, parsed: &ParsedCommand, detection: &mut DangerDetection) { let prog = parsed.program_basename.as_str(); // Reading sensitive files diff --git a/src/cortex-feedback/src/lib.rs b/src/cortex-feedback/src/lib.rs index fb16a2cd..3cb23707 100644 --- a/src/cortex-feedback/src/lib.rs +++ b/src/cortex-feedback/src/lib.rs @@ -18,7 +18,7 @@ use tracing_subscriber::fmt::writer::MakeWriter; const DEFAULT_MAX_BYTES: usize = 4 * 1024 * 1024; /// Timeout for feedback upload in seconds. -const UPLOAD_TIMEOUT_SECS: u64 = 10; +const _UPLOAD_TIMEOUT_SECS: u64 = 10; /// Feedback collector that captures logs in a ring buffer. #[derive(Clone)] diff --git a/src/cortex-gui/src-tauri/gen/schemas/acl-manifests.json b/src/cortex-gui/src-tauri/gen/schemas/acl-manifests.json index d897b8c2..629f2298 100644 --- a/src/cortex-gui/src-tauri/gen/schemas/acl-manifests.json +++ b/src/cortex-gui/src-tauri/gen/schemas/acl-manifests.json @@ -1 +1 @@ -{"clipboard-manager":{"default_permission":{"identifier":"default","description":"No features are enabled by default, as we believe\nthe clipboard can be inherently dangerous and it is \napplication specific if read and/or write access is needed.\n\nClipboard interaction needs to be explicitly enabled.\n","permissions":[]},"permissions":{"allow-clear":{"identifier":"allow-clear","description":"Enables the clear command without any pre-configured scope.","commands":{"allow":["clear"],"deny":[]}},"allow-read-image":{"identifier":"allow-read-image","description":"Enables the read_image command without any pre-configured scope.","commands":{"allow":["read_image"],"deny":[]}},"allow-read-text":{"identifier":"allow-read-text","description":"Enables the read_text command without any pre-configured scope.","commands":{"allow":["read_text"],"deny":[]}},"allow-write-html":{"identifier":"allow-write-html","description":"Enables the write_html command without any pre-configured scope.","commands":{"allow":["write_html"],"deny":[]}},"allow-write-image":{"identifier":"allow-write-image","description":"Enables the write_image command without any pre-configured scope.","commands":{"allow":["write_image"],"deny":[]}},"allow-write-text":{"identifier":"allow-write-text","description":"Enables the write_text command without any pre-configured scope.","commands":{"allow":["write_text"],"deny":[]}},"deny-clear":{"identifier":"deny-clear","description":"Denies the clear command without any pre-configured scope.","commands":{"allow":[],"deny":["clear"]}},"deny-read-image":{"identifier":"deny-read-image","description":"Denies the read_image command without any pre-configured scope.","commands":{"allow":[],"deny":["read_image"]}},"deny-read-text":{"identifier":"deny-read-text","description":"Denies the read_text command without any pre-configured scope.","commands":{"allow":[],"deny":["read_text"]}},"deny-write-html":{"identifier":"deny-write-html","description":"Denies the write_html command without any pre-configured scope.","commands":{"allow":[],"deny":["write_html"]}},"deny-write-image":{"identifier":"deny-write-image","description":"Denies the write_image command without any pre-configured scope.","commands":{"allow":[],"deny":["write_image"]}},"deny-write-text":{"identifier":"deny-write-text","description":"Denies the write_text command without any pre-configured scope.","commands":{"allow":[],"deny":["write_text"]}}},"permission_sets":{},"global_scope_schema":null},"core":{"default_permission":{"identifier":"default","description":"Default core plugins set.","permissions":["core:path:default","core:event:default","core:window:default","core:webview:default","core:app:default","core:image:default","core:resources:default","core:menu:default","core:tray:default"]},"permissions":{},"permission_sets":{},"global_scope_schema":null},"core:app":{"default_permission":{"identifier":"default","description":"Default permissions for the plugin.","permissions":["allow-version","allow-name","allow-tauri-version","allow-identifier","allow-bundle-type","allow-register-listener","allow-remove-listener"]},"permissions":{"allow-app-hide":{"identifier":"allow-app-hide","description":"Enables the app_hide command without any pre-configured scope.","commands":{"allow":["app_hide"],"deny":[]}},"allow-app-show":{"identifier":"allow-app-show","description":"Enables the app_show command without any pre-configured scope.","commands":{"allow":["app_show"],"deny":[]}},"allow-bundle-type":{"identifier":"allow-bundle-type","description":"Enables the bundle_type command without any pre-configured scope.","commands":{"allow":["bundle_type"],"deny":[]}},"allow-default-window-icon":{"identifier":"allow-default-window-icon","description":"Enables the default_window_icon command without any pre-configured scope.","commands":{"allow":["default_window_icon"],"deny":[]}},"allow-fetch-data-store-identifiers":{"identifier":"allow-fetch-data-store-identifiers","description":"Enables the fetch_data_store_identifiers command without any pre-configured scope.","commands":{"allow":["fetch_data_store_identifiers"],"deny":[]}},"allow-identifier":{"identifier":"allow-identifier","description":"Enables the identifier command without any pre-configured scope.","commands":{"allow":["identifier"],"deny":[]}},"allow-name":{"identifier":"allow-name","description":"Enables the name command without any pre-configured scope.","commands":{"allow":["name"],"deny":[]}},"allow-register-listener":{"identifier":"allow-register-listener","description":"Enables the register_listener command without any pre-configured scope.","commands":{"allow":["register_listener"],"deny":[]}},"allow-remove-data-store":{"identifier":"allow-remove-data-store","description":"Enables the remove_data_store command without any pre-configured scope.","commands":{"allow":["remove_data_store"],"deny":[]}},"allow-remove-listener":{"identifier":"allow-remove-listener","description":"Enables the remove_listener command without any pre-configured scope.","commands":{"allow":["remove_listener"],"deny":[]}},"allow-set-app-theme":{"identifier":"allow-set-app-theme","description":"Enables the set_app_theme command without any pre-configured scope.","commands":{"allow":["set_app_theme"],"deny":[]}},"allow-set-dock-visibility":{"identifier":"allow-set-dock-visibility","description":"Enables the set_dock_visibility command without any pre-configured scope.","commands":{"allow":["set_dock_visibility"],"deny":[]}},"allow-tauri-version":{"identifier":"allow-tauri-version","description":"Enables the tauri_version command without any pre-configured scope.","commands":{"allow":["tauri_version"],"deny":[]}},"allow-version":{"identifier":"allow-version","description":"Enables the version command without any pre-configured scope.","commands":{"allow":["version"],"deny":[]}},"deny-app-hide":{"identifier":"deny-app-hide","description":"Denies the app_hide command without any pre-configured scope.","commands":{"allow":[],"deny":["app_hide"]}},"deny-app-show":{"identifier":"deny-app-show","description":"Denies the app_show command without any pre-configured scope.","commands":{"allow":[],"deny":["app_show"]}},"deny-bundle-type":{"identifier":"deny-bundle-type","description":"Denies the bundle_type command without any pre-configured scope.","commands":{"allow":[],"deny":["bundle_type"]}},"deny-default-window-icon":{"identifier":"deny-default-window-icon","description":"Denies the default_window_icon command without any pre-configured scope.","commands":{"allow":[],"deny":["default_window_icon"]}},"deny-fetch-data-store-identifiers":{"identifier":"deny-fetch-data-store-identifiers","description":"Denies the fetch_data_store_identifiers command without any pre-configured scope.","commands":{"allow":[],"deny":["fetch_data_store_identifiers"]}},"deny-identifier":{"identifier":"deny-identifier","description":"Denies the identifier command without any pre-configured scope.","commands":{"allow":[],"deny":["identifier"]}},"deny-name":{"identifier":"deny-name","description":"Denies the name command without any pre-configured scope.","commands":{"allow":[],"deny":["name"]}},"deny-register-listener":{"identifier":"deny-register-listener","description":"Denies the register_listener command without any pre-configured scope.","commands":{"allow":[],"deny":["register_listener"]}},"deny-remove-data-store":{"identifier":"deny-remove-data-store","description":"Denies the remove_data_store command without any pre-configured scope.","commands":{"allow":[],"deny":["remove_data_store"]}},"deny-remove-listener":{"identifier":"deny-remove-listener","description":"Denies the remove_listener command without any pre-configured scope.","commands":{"allow":[],"deny":["remove_listener"]}},"deny-set-app-theme":{"identifier":"deny-set-app-theme","description":"Denies the set_app_theme command without any pre-configured scope.","commands":{"allow":[],"deny":["set_app_theme"]}},"deny-set-dock-visibility":{"identifier":"deny-set-dock-visibility","description":"Denies the set_dock_visibility command without any pre-configured scope.","commands":{"allow":[],"deny":["set_dock_visibility"]}},"deny-tauri-version":{"identifier":"deny-tauri-version","description":"Denies the tauri_version command without any pre-configured scope.","commands":{"allow":[],"deny":["tauri_version"]}},"deny-version":{"identifier":"deny-version","description":"Denies the version command without any pre-configured scope.","commands":{"allow":[],"deny":["version"]}}},"permission_sets":{},"global_scope_schema":null},"core:event":{"default_permission":{"identifier":"default","description":"Default permissions for the plugin, which enables all commands.","permissions":["allow-listen","allow-unlisten","allow-emit","allow-emit-to"]},"permissions":{"allow-emit":{"identifier":"allow-emit","description":"Enables the emit command without any pre-configured scope.","commands":{"allow":["emit"],"deny":[]}},"allow-emit-to":{"identifier":"allow-emit-to","description":"Enables the emit_to command without any pre-configured scope.","commands":{"allow":["emit_to"],"deny":[]}},"allow-listen":{"identifier":"allow-listen","description":"Enables the listen command without any pre-configured scope.","commands":{"allow":["listen"],"deny":[]}},"allow-unlisten":{"identifier":"allow-unlisten","description":"Enables the unlisten command without any pre-configured scope.","commands":{"allow":["unlisten"],"deny":[]}},"deny-emit":{"identifier":"deny-emit","description":"Denies the emit command without any pre-configured scope.","commands":{"allow":[],"deny":["emit"]}},"deny-emit-to":{"identifier":"deny-emit-to","description":"Denies the emit_to command without any pre-configured scope.","commands":{"allow":[],"deny":["emit_to"]}},"deny-listen":{"identifier":"deny-listen","description":"Denies the listen command without any pre-configured scope.","commands":{"allow":[],"deny":["listen"]}},"deny-unlisten":{"identifier":"deny-unlisten","description":"Denies the unlisten command without any pre-configured scope.","commands":{"allow":[],"deny":["unlisten"]}}},"permission_sets":{},"global_scope_schema":null},"core:image":{"default_permission":{"identifier":"default","description":"Default permissions for the plugin, which enables all commands.","permissions":["allow-new","allow-from-bytes","allow-from-path","allow-rgba","allow-size"]},"permissions":{"allow-from-bytes":{"identifier":"allow-from-bytes","description":"Enables the from_bytes command without any pre-configured scope.","commands":{"allow":["from_bytes"],"deny":[]}},"allow-from-path":{"identifier":"allow-from-path","description":"Enables the from_path command without any pre-configured scope.","commands":{"allow":["from_path"],"deny":[]}},"allow-new":{"identifier":"allow-new","description":"Enables the new command without any pre-configured scope.","commands":{"allow":["new"],"deny":[]}},"allow-rgba":{"identifier":"allow-rgba","description":"Enables the rgba command without any pre-configured scope.","commands":{"allow":["rgba"],"deny":[]}},"allow-size":{"identifier":"allow-size","description":"Enables the size command without any pre-configured scope.","commands":{"allow":["size"],"deny":[]}},"deny-from-bytes":{"identifier":"deny-from-bytes","description":"Denies the from_bytes command without any pre-configured scope.","commands":{"allow":[],"deny":["from_bytes"]}},"deny-from-path":{"identifier":"deny-from-path","description":"Denies the from_path command without any pre-configured scope.","commands":{"allow":[],"deny":["from_path"]}},"deny-new":{"identifier":"deny-new","description":"Denies the new command without any pre-configured scope.","commands":{"allow":[],"deny":["new"]}},"deny-rgba":{"identifier":"deny-rgba","description":"Denies the rgba command without any pre-configured scope.","commands":{"allow":[],"deny":["rgba"]}},"deny-size":{"identifier":"deny-size","description":"Denies the size command without any pre-configured scope.","commands":{"allow":[],"deny":["size"]}}},"permission_sets":{},"global_scope_schema":null},"core:menu":{"default_permission":{"identifier":"default","description":"Default permissions for the plugin, which enables all commands.","permissions":["allow-new","allow-append","allow-prepend","allow-insert","allow-remove","allow-remove-at","allow-items","allow-get","allow-popup","allow-create-default","allow-set-as-app-menu","allow-set-as-window-menu","allow-text","allow-set-text","allow-is-enabled","allow-set-enabled","allow-set-accelerator","allow-set-as-windows-menu-for-nsapp","allow-set-as-help-menu-for-nsapp","allow-is-checked","allow-set-checked","allow-set-icon"]},"permissions":{"allow-append":{"identifier":"allow-append","description":"Enables the append command without any pre-configured scope.","commands":{"allow":["append"],"deny":[]}},"allow-create-default":{"identifier":"allow-create-default","description":"Enables the create_default command without any pre-configured scope.","commands":{"allow":["create_default"],"deny":[]}},"allow-get":{"identifier":"allow-get","description":"Enables the get command without any pre-configured scope.","commands":{"allow":["get"],"deny":[]}},"allow-insert":{"identifier":"allow-insert","description":"Enables the insert command without any pre-configured scope.","commands":{"allow":["insert"],"deny":[]}},"allow-is-checked":{"identifier":"allow-is-checked","description":"Enables the is_checked command without any pre-configured scope.","commands":{"allow":["is_checked"],"deny":[]}},"allow-is-enabled":{"identifier":"allow-is-enabled","description":"Enables the is_enabled command without any pre-configured scope.","commands":{"allow":["is_enabled"],"deny":[]}},"allow-items":{"identifier":"allow-items","description":"Enables the items command without any pre-configured scope.","commands":{"allow":["items"],"deny":[]}},"allow-new":{"identifier":"allow-new","description":"Enables the new command without any pre-configured scope.","commands":{"allow":["new"],"deny":[]}},"allow-popup":{"identifier":"allow-popup","description":"Enables the popup command without any pre-configured scope.","commands":{"allow":["popup"],"deny":[]}},"allow-prepend":{"identifier":"allow-prepend","description":"Enables the prepend command without any pre-configured scope.","commands":{"allow":["prepend"],"deny":[]}},"allow-remove":{"identifier":"allow-remove","description":"Enables the remove command without any pre-configured scope.","commands":{"allow":["remove"],"deny":[]}},"allow-remove-at":{"identifier":"allow-remove-at","description":"Enables the remove_at command without any pre-configured scope.","commands":{"allow":["remove_at"],"deny":[]}},"allow-set-accelerator":{"identifier":"allow-set-accelerator","description":"Enables the set_accelerator command without any pre-configured scope.","commands":{"allow":["set_accelerator"],"deny":[]}},"allow-set-as-app-menu":{"identifier":"allow-set-as-app-menu","description":"Enables the set_as_app_menu command without any pre-configured scope.","commands":{"allow":["set_as_app_menu"],"deny":[]}},"allow-set-as-help-menu-for-nsapp":{"identifier":"allow-set-as-help-menu-for-nsapp","description":"Enables the set_as_help_menu_for_nsapp command without any pre-configured scope.","commands":{"allow":["set_as_help_menu_for_nsapp"],"deny":[]}},"allow-set-as-window-menu":{"identifier":"allow-set-as-window-menu","description":"Enables the set_as_window_menu command without any pre-configured scope.","commands":{"allow":["set_as_window_menu"],"deny":[]}},"allow-set-as-windows-menu-for-nsapp":{"identifier":"allow-set-as-windows-menu-for-nsapp","description":"Enables the set_as_windows_menu_for_nsapp command without any pre-configured scope.","commands":{"allow":["set_as_windows_menu_for_nsapp"],"deny":[]}},"allow-set-checked":{"identifier":"allow-set-checked","description":"Enables the set_checked command without any pre-configured scope.","commands":{"allow":["set_checked"],"deny":[]}},"allow-set-enabled":{"identifier":"allow-set-enabled","description":"Enables the set_enabled command without any pre-configured scope.","commands":{"allow":["set_enabled"],"deny":[]}},"allow-set-icon":{"identifier":"allow-set-icon","description":"Enables the set_icon command without any pre-configured scope.","commands":{"allow":["set_icon"],"deny":[]}},"allow-set-text":{"identifier":"allow-set-text","description":"Enables the set_text command without any pre-configured scope.","commands":{"allow":["set_text"],"deny":[]}},"allow-text":{"identifier":"allow-text","description":"Enables the text command without any pre-configured scope.","commands":{"allow":["text"],"deny":[]}},"deny-append":{"identifier":"deny-append","description":"Denies the append command without any pre-configured scope.","commands":{"allow":[],"deny":["append"]}},"deny-create-default":{"identifier":"deny-create-default","description":"Denies the create_default command without any pre-configured scope.","commands":{"allow":[],"deny":["create_default"]}},"deny-get":{"identifier":"deny-get","description":"Denies the get command without any pre-configured scope.","commands":{"allow":[],"deny":["get"]}},"deny-insert":{"identifier":"deny-insert","description":"Denies the insert command without any pre-configured scope.","commands":{"allow":[],"deny":["insert"]}},"deny-is-checked":{"identifier":"deny-is-checked","description":"Denies the is_checked command without any pre-configured scope.","commands":{"allow":[],"deny":["is_checked"]}},"deny-is-enabled":{"identifier":"deny-is-enabled","description":"Denies the is_enabled command without any pre-configured scope.","commands":{"allow":[],"deny":["is_enabled"]}},"deny-items":{"identifier":"deny-items","description":"Denies the items command without any pre-configured scope.","commands":{"allow":[],"deny":["items"]}},"deny-new":{"identifier":"deny-new","description":"Denies the new command without any pre-configured scope.","commands":{"allow":[],"deny":["new"]}},"deny-popup":{"identifier":"deny-popup","description":"Denies the popup command without any pre-configured scope.","commands":{"allow":[],"deny":["popup"]}},"deny-prepend":{"identifier":"deny-prepend","description":"Denies the prepend command without any pre-configured scope.","commands":{"allow":[],"deny":["prepend"]}},"deny-remove":{"identifier":"deny-remove","description":"Denies the remove command without any pre-configured scope.","commands":{"allow":[],"deny":["remove"]}},"deny-remove-at":{"identifier":"deny-remove-at","description":"Denies the remove_at command without any pre-configured scope.","commands":{"allow":[],"deny":["remove_at"]}},"deny-set-accelerator":{"identifier":"deny-set-accelerator","description":"Denies the set_accelerator command without any pre-configured scope.","commands":{"allow":[],"deny":["set_accelerator"]}},"deny-set-as-app-menu":{"identifier":"deny-set-as-app-menu","description":"Denies the set_as_app_menu command without any pre-configured scope.","commands":{"allow":[],"deny":["set_as_app_menu"]}},"deny-set-as-help-menu-for-nsapp":{"identifier":"deny-set-as-help-menu-for-nsapp","description":"Denies the set_as_help_menu_for_nsapp command without any pre-configured scope.","commands":{"allow":[],"deny":["set_as_help_menu_for_nsapp"]}},"deny-set-as-window-menu":{"identifier":"deny-set-as-window-menu","description":"Denies the set_as_window_menu command without any pre-configured scope.","commands":{"allow":[],"deny":["set_as_window_menu"]}},"deny-set-as-windows-menu-for-nsapp":{"identifier":"deny-set-as-windows-menu-for-nsapp","description":"Denies the set_as_windows_menu_for_nsapp command without any pre-configured scope.","commands":{"allow":[],"deny":["set_as_windows_menu_for_nsapp"]}},"deny-set-checked":{"identifier":"deny-set-checked","description":"Denies the set_checked command without any pre-configured scope.","commands":{"allow":[],"deny":["set_checked"]}},"deny-set-enabled":{"identifier":"deny-set-enabled","description":"Denies the set_enabled command without any pre-configured scope.","commands":{"allow":[],"deny":["set_enabled"]}},"deny-set-icon":{"identifier":"deny-set-icon","description":"Denies the set_icon command without any pre-configured scope.","commands":{"allow":[],"deny":["set_icon"]}},"deny-set-text":{"identifier":"deny-set-text","description":"Denies the set_text command without any pre-configured scope.","commands":{"allow":[],"deny":["set_text"]}},"deny-text":{"identifier":"deny-text","description":"Denies the text command without any pre-configured scope.","commands":{"allow":[],"deny":["text"]}}},"permission_sets":{},"global_scope_schema":null},"core:path":{"default_permission":{"identifier":"default","description":"Default permissions for the plugin, which enables all commands.","permissions":["allow-resolve-directory","allow-resolve","allow-normalize","allow-join","allow-dirname","allow-extname","allow-basename","allow-is-absolute"]},"permissions":{"allow-basename":{"identifier":"allow-basename","description":"Enables the basename command without any pre-configured scope.","commands":{"allow":["basename"],"deny":[]}},"allow-dirname":{"identifier":"allow-dirname","description":"Enables the dirname command without any pre-configured scope.","commands":{"allow":["dirname"],"deny":[]}},"allow-extname":{"identifier":"allow-extname","description":"Enables the extname command without any pre-configured scope.","commands":{"allow":["extname"],"deny":[]}},"allow-is-absolute":{"identifier":"allow-is-absolute","description":"Enables the is_absolute command without any pre-configured scope.","commands":{"allow":["is_absolute"],"deny":[]}},"allow-join":{"identifier":"allow-join","description":"Enables the join command without any pre-configured scope.","commands":{"allow":["join"],"deny":[]}},"allow-normalize":{"identifier":"allow-normalize","description":"Enables the normalize command without any pre-configured scope.","commands":{"allow":["normalize"],"deny":[]}},"allow-resolve":{"identifier":"allow-resolve","description":"Enables the resolve command without any pre-configured scope.","commands":{"allow":["resolve"],"deny":[]}},"allow-resolve-directory":{"identifier":"allow-resolve-directory","description":"Enables the resolve_directory command without any pre-configured scope.","commands":{"allow":["resolve_directory"],"deny":[]}},"deny-basename":{"identifier":"deny-basename","description":"Denies the basename command without any pre-configured scope.","commands":{"allow":[],"deny":["basename"]}},"deny-dirname":{"identifier":"deny-dirname","description":"Denies the dirname command without any pre-configured scope.","commands":{"allow":[],"deny":["dirname"]}},"deny-extname":{"identifier":"deny-extname","description":"Denies the extname command without any pre-configured scope.","commands":{"allow":[],"deny":["extname"]}},"deny-is-absolute":{"identifier":"deny-is-absolute","description":"Denies the is_absolute command without any pre-configured scope.","commands":{"allow":[],"deny":["is_absolute"]}},"deny-join":{"identifier":"deny-join","description":"Denies the join command without any pre-configured scope.","commands":{"allow":[],"deny":["join"]}},"deny-normalize":{"identifier":"deny-normalize","description":"Denies the normalize command without any pre-configured scope.","commands":{"allow":[],"deny":["normalize"]}},"deny-resolve":{"identifier":"deny-resolve","description":"Denies the resolve command without any pre-configured scope.","commands":{"allow":[],"deny":["resolve"]}},"deny-resolve-directory":{"identifier":"deny-resolve-directory","description":"Denies the resolve_directory command without any pre-configured scope.","commands":{"allow":[],"deny":["resolve_directory"]}}},"permission_sets":{},"global_scope_schema":null},"core:resources":{"default_permission":{"identifier":"default","description":"Default permissions for the plugin, which enables all commands.","permissions":["allow-close"]},"permissions":{"allow-close":{"identifier":"allow-close","description":"Enables the close command without any pre-configured scope.","commands":{"allow":["close"],"deny":[]}},"deny-close":{"identifier":"deny-close","description":"Denies the close command without any pre-configured scope.","commands":{"allow":[],"deny":["close"]}}},"permission_sets":{},"global_scope_schema":null},"core:tray":{"default_permission":{"identifier":"default","description":"Default permissions for the plugin, which enables all commands.","permissions":["allow-new","allow-get-by-id","allow-remove-by-id","allow-set-icon","allow-set-menu","allow-set-tooltip","allow-set-title","allow-set-visible","allow-set-temp-dir-path","allow-set-icon-as-template","allow-set-show-menu-on-left-click"]},"permissions":{"allow-get-by-id":{"identifier":"allow-get-by-id","description":"Enables the get_by_id command without any pre-configured scope.","commands":{"allow":["get_by_id"],"deny":[]}},"allow-new":{"identifier":"allow-new","description":"Enables the new command without any pre-configured scope.","commands":{"allow":["new"],"deny":[]}},"allow-remove-by-id":{"identifier":"allow-remove-by-id","description":"Enables the remove_by_id command without any pre-configured scope.","commands":{"allow":["remove_by_id"],"deny":[]}},"allow-set-icon":{"identifier":"allow-set-icon","description":"Enables the set_icon command without any pre-configured scope.","commands":{"allow":["set_icon"],"deny":[]}},"allow-set-icon-as-template":{"identifier":"allow-set-icon-as-template","description":"Enables the set_icon_as_template command without any pre-configured scope.","commands":{"allow":["set_icon_as_template"],"deny":[]}},"allow-set-menu":{"identifier":"allow-set-menu","description":"Enables the set_menu command without any pre-configured scope.","commands":{"allow":["set_menu"],"deny":[]}},"allow-set-show-menu-on-left-click":{"identifier":"allow-set-show-menu-on-left-click","description":"Enables the set_show_menu_on_left_click command without any pre-configured scope.","commands":{"allow":["set_show_menu_on_left_click"],"deny":[]}},"allow-set-temp-dir-path":{"identifier":"allow-set-temp-dir-path","description":"Enables the set_temp_dir_path command without any pre-configured scope.","commands":{"allow":["set_temp_dir_path"],"deny":[]}},"allow-set-title":{"identifier":"allow-set-title","description":"Enables the set_title command without any pre-configured scope.","commands":{"allow":["set_title"],"deny":[]}},"allow-set-tooltip":{"identifier":"allow-set-tooltip","description":"Enables the set_tooltip command without any pre-configured scope.","commands":{"allow":["set_tooltip"],"deny":[]}},"allow-set-visible":{"identifier":"allow-set-visible","description":"Enables the set_visible command without any pre-configured scope.","commands":{"allow":["set_visible"],"deny":[]}},"deny-get-by-id":{"identifier":"deny-get-by-id","description":"Denies the get_by_id command without any pre-configured scope.","commands":{"allow":[],"deny":["get_by_id"]}},"deny-new":{"identifier":"deny-new","description":"Denies the new command without any pre-configured scope.","commands":{"allow":[],"deny":["new"]}},"deny-remove-by-id":{"identifier":"deny-remove-by-id","description":"Denies the remove_by_id command without any pre-configured scope.","commands":{"allow":[],"deny":["remove_by_id"]}},"deny-set-icon":{"identifier":"deny-set-icon","description":"Denies the set_icon command without any pre-configured scope.","commands":{"allow":[],"deny":["set_icon"]}},"deny-set-icon-as-template":{"identifier":"deny-set-icon-as-template","description":"Denies the set_icon_as_template command without any pre-configured scope.","commands":{"allow":[],"deny":["set_icon_as_template"]}},"deny-set-menu":{"identifier":"deny-set-menu","description":"Denies the set_menu command without any pre-configured scope.","commands":{"allow":[],"deny":["set_menu"]}},"deny-set-show-menu-on-left-click":{"identifier":"deny-set-show-menu-on-left-click","description":"Denies the set_show_menu_on_left_click command without any pre-configured scope.","commands":{"allow":[],"deny":["set_show_menu_on_left_click"]}},"deny-set-temp-dir-path":{"identifier":"deny-set-temp-dir-path","description":"Denies the set_temp_dir_path command without any pre-configured scope.","commands":{"allow":[],"deny":["set_temp_dir_path"]}},"deny-set-title":{"identifier":"deny-set-title","description":"Denies the set_title command without any pre-configured scope.","commands":{"allow":[],"deny":["set_title"]}},"deny-set-tooltip":{"identifier":"deny-set-tooltip","description":"Denies the set_tooltip command without any pre-configured scope.","commands":{"allow":[],"deny":["set_tooltip"]}},"deny-set-visible":{"identifier":"deny-set-visible","description":"Denies the set_visible command without any pre-configured scope.","commands":{"allow":[],"deny":["set_visible"]}}},"permission_sets":{},"global_scope_schema":null},"core:webview":{"default_permission":{"identifier":"default","description":"Default permissions for the plugin.","permissions":["allow-get-all-webviews","allow-webview-position","allow-webview-size","allow-internal-toggle-devtools"]},"permissions":{"allow-clear-all-browsing-data":{"identifier":"allow-clear-all-browsing-data","description":"Enables the clear_all_browsing_data command without any pre-configured scope.","commands":{"allow":["clear_all_browsing_data"],"deny":[]}},"allow-create-webview":{"identifier":"allow-create-webview","description":"Enables the create_webview command without any pre-configured scope.","commands":{"allow":["create_webview"],"deny":[]}},"allow-create-webview-window":{"identifier":"allow-create-webview-window","description":"Enables the create_webview_window command without any pre-configured scope.","commands":{"allow":["create_webview_window"],"deny":[]}},"allow-get-all-webviews":{"identifier":"allow-get-all-webviews","description":"Enables the get_all_webviews command without any pre-configured scope.","commands":{"allow":["get_all_webviews"],"deny":[]}},"allow-internal-toggle-devtools":{"identifier":"allow-internal-toggle-devtools","description":"Enables the internal_toggle_devtools command without any pre-configured scope.","commands":{"allow":["internal_toggle_devtools"],"deny":[]}},"allow-print":{"identifier":"allow-print","description":"Enables the print command without any pre-configured scope.","commands":{"allow":["print"],"deny":[]}},"allow-reparent":{"identifier":"allow-reparent","description":"Enables the reparent command without any pre-configured scope.","commands":{"allow":["reparent"],"deny":[]}},"allow-set-webview-auto-resize":{"identifier":"allow-set-webview-auto-resize","description":"Enables the set_webview_auto_resize command without any pre-configured scope.","commands":{"allow":["set_webview_auto_resize"],"deny":[]}},"allow-set-webview-background-color":{"identifier":"allow-set-webview-background-color","description":"Enables the set_webview_background_color command without any pre-configured scope.","commands":{"allow":["set_webview_background_color"],"deny":[]}},"allow-set-webview-focus":{"identifier":"allow-set-webview-focus","description":"Enables the set_webview_focus command without any pre-configured scope.","commands":{"allow":["set_webview_focus"],"deny":[]}},"allow-set-webview-position":{"identifier":"allow-set-webview-position","description":"Enables the set_webview_position command without any pre-configured scope.","commands":{"allow":["set_webview_position"],"deny":[]}},"allow-set-webview-size":{"identifier":"allow-set-webview-size","description":"Enables the set_webview_size command without any pre-configured scope.","commands":{"allow":["set_webview_size"],"deny":[]}},"allow-set-webview-zoom":{"identifier":"allow-set-webview-zoom","description":"Enables the set_webview_zoom command without any pre-configured scope.","commands":{"allow":["set_webview_zoom"],"deny":[]}},"allow-webview-close":{"identifier":"allow-webview-close","description":"Enables the webview_close command without any pre-configured scope.","commands":{"allow":["webview_close"],"deny":[]}},"allow-webview-hide":{"identifier":"allow-webview-hide","description":"Enables the webview_hide command without any pre-configured scope.","commands":{"allow":["webview_hide"],"deny":[]}},"allow-webview-position":{"identifier":"allow-webview-position","description":"Enables the webview_position command without any pre-configured scope.","commands":{"allow":["webview_position"],"deny":[]}},"allow-webview-show":{"identifier":"allow-webview-show","description":"Enables the webview_show command without any pre-configured scope.","commands":{"allow":["webview_show"],"deny":[]}},"allow-webview-size":{"identifier":"allow-webview-size","description":"Enables the webview_size command without any pre-configured scope.","commands":{"allow":["webview_size"],"deny":[]}},"deny-clear-all-browsing-data":{"identifier":"deny-clear-all-browsing-data","description":"Denies the clear_all_browsing_data command without any pre-configured scope.","commands":{"allow":[],"deny":["clear_all_browsing_data"]}},"deny-create-webview":{"identifier":"deny-create-webview","description":"Denies the create_webview command without any pre-configured scope.","commands":{"allow":[],"deny":["create_webview"]}},"deny-create-webview-window":{"identifier":"deny-create-webview-window","description":"Denies the create_webview_window command without any pre-configured scope.","commands":{"allow":[],"deny":["create_webview_window"]}},"deny-get-all-webviews":{"identifier":"deny-get-all-webviews","description":"Denies the get_all_webviews command without any pre-configured scope.","commands":{"allow":[],"deny":["get_all_webviews"]}},"deny-internal-toggle-devtools":{"identifier":"deny-internal-toggle-devtools","description":"Denies the internal_toggle_devtools command without any pre-configured scope.","commands":{"allow":[],"deny":["internal_toggle_devtools"]}},"deny-print":{"identifier":"deny-print","description":"Denies the print command without any pre-configured scope.","commands":{"allow":[],"deny":["print"]}},"deny-reparent":{"identifier":"deny-reparent","description":"Denies the reparent command without any pre-configured scope.","commands":{"allow":[],"deny":["reparent"]}},"deny-set-webview-auto-resize":{"identifier":"deny-set-webview-auto-resize","description":"Denies the set_webview_auto_resize command without any pre-configured scope.","commands":{"allow":[],"deny":["set_webview_auto_resize"]}},"deny-set-webview-background-color":{"identifier":"deny-set-webview-background-color","description":"Denies the set_webview_background_color command without any pre-configured scope.","commands":{"allow":[],"deny":["set_webview_background_color"]}},"deny-set-webview-focus":{"identifier":"deny-set-webview-focus","description":"Denies the set_webview_focus command without any pre-configured scope.","commands":{"allow":[],"deny":["set_webview_focus"]}},"deny-set-webview-position":{"identifier":"deny-set-webview-position","description":"Denies the set_webview_position command without any pre-configured scope.","commands":{"allow":[],"deny":["set_webview_position"]}},"deny-set-webview-size":{"identifier":"deny-set-webview-size","description":"Denies the set_webview_size command without any pre-configured scope.","commands":{"allow":[],"deny":["set_webview_size"]}},"deny-set-webview-zoom":{"identifier":"deny-set-webview-zoom","description":"Denies the set_webview_zoom command without any pre-configured scope.","commands":{"allow":[],"deny":["set_webview_zoom"]}},"deny-webview-close":{"identifier":"deny-webview-close","description":"Denies the webview_close command without any pre-configured scope.","commands":{"allow":[],"deny":["webview_close"]}},"deny-webview-hide":{"identifier":"deny-webview-hide","description":"Denies the webview_hide command without any pre-configured scope.","commands":{"allow":[],"deny":["webview_hide"]}},"deny-webview-position":{"identifier":"deny-webview-position","description":"Denies the webview_position command without any pre-configured scope.","commands":{"allow":[],"deny":["webview_position"]}},"deny-webview-show":{"identifier":"deny-webview-show","description":"Denies the webview_show command without any pre-configured scope.","commands":{"allow":[],"deny":["webview_show"]}},"deny-webview-size":{"identifier":"deny-webview-size","description":"Denies the webview_size command without any pre-configured scope.","commands":{"allow":[],"deny":["webview_size"]}}},"permission_sets":{},"global_scope_schema":null},"core:window":{"default_permission":{"identifier":"default","description":"Default permissions for the plugin.","permissions":["allow-get-all-windows","allow-scale-factor","allow-inner-position","allow-outer-position","allow-inner-size","allow-outer-size","allow-is-fullscreen","allow-is-minimized","allow-is-maximized","allow-is-focused","allow-is-decorated","allow-is-resizable","allow-is-maximizable","allow-is-minimizable","allow-is-closable","allow-is-visible","allow-is-enabled","allow-title","allow-current-monitor","allow-primary-monitor","allow-monitor-from-point","allow-available-monitors","allow-cursor-position","allow-theme","allow-is-always-on-top","allow-internal-toggle-maximize"]},"permissions":{"allow-available-monitors":{"identifier":"allow-available-monitors","description":"Enables the available_monitors command without any pre-configured scope.","commands":{"allow":["available_monitors"],"deny":[]}},"allow-center":{"identifier":"allow-center","description":"Enables the center command without any pre-configured scope.","commands":{"allow":["center"],"deny":[]}},"allow-close":{"identifier":"allow-close","description":"Enables the close command without any pre-configured scope.","commands":{"allow":["close"],"deny":[]}},"allow-create":{"identifier":"allow-create","description":"Enables the create command without any pre-configured scope.","commands":{"allow":["create"],"deny":[]}},"allow-current-monitor":{"identifier":"allow-current-monitor","description":"Enables the current_monitor command without any pre-configured scope.","commands":{"allow":["current_monitor"],"deny":[]}},"allow-cursor-position":{"identifier":"allow-cursor-position","description":"Enables the cursor_position command without any pre-configured scope.","commands":{"allow":["cursor_position"],"deny":[]}},"allow-destroy":{"identifier":"allow-destroy","description":"Enables the destroy command without any pre-configured scope.","commands":{"allow":["destroy"],"deny":[]}},"allow-get-all-windows":{"identifier":"allow-get-all-windows","description":"Enables the get_all_windows command without any pre-configured scope.","commands":{"allow":["get_all_windows"],"deny":[]}},"allow-hide":{"identifier":"allow-hide","description":"Enables the hide command without any pre-configured scope.","commands":{"allow":["hide"],"deny":[]}},"allow-inner-position":{"identifier":"allow-inner-position","description":"Enables the inner_position command without any pre-configured scope.","commands":{"allow":["inner_position"],"deny":[]}},"allow-inner-size":{"identifier":"allow-inner-size","description":"Enables the inner_size command without any pre-configured scope.","commands":{"allow":["inner_size"],"deny":[]}},"allow-internal-toggle-maximize":{"identifier":"allow-internal-toggle-maximize","description":"Enables the internal_toggle_maximize command without any pre-configured scope.","commands":{"allow":["internal_toggle_maximize"],"deny":[]}},"allow-is-always-on-top":{"identifier":"allow-is-always-on-top","description":"Enables the is_always_on_top command without any pre-configured scope.","commands":{"allow":["is_always_on_top"],"deny":[]}},"allow-is-closable":{"identifier":"allow-is-closable","description":"Enables the is_closable command without any pre-configured scope.","commands":{"allow":["is_closable"],"deny":[]}},"allow-is-decorated":{"identifier":"allow-is-decorated","description":"Enables the is_decorated command without any pre-configured scope.","commands":{"allow":["is_decorated"],"deny":[]}},"allow-is-enabled":{"identifier":"allow-is-enabled","description":"Enables the is_enabled command without any pre-configured scope.","commands":{"allow":["is_enabled"],"deny":[]}},"allow-is-focused":{"identifier":"allow-is-focused","description":"Enables the is_focused command without any pre-configured scope.","commands":{"allow":["is_focused"],"deny":[]}},"allow-is-fullscreen":{"identifier":"allow-is-fullscreen","description":"Enables the is_fullscreen command without any pre-configured scope.","commands":{"allow":["is_fullscreen"],"deny":[]}},"allow-is-maximizable":{"identifier":"allow-is-maximizable","description":"Enables the is_maximizable command without any pre-configured scope.","commands":{"allow":["is_maximizable"],"deny":[]}},"allow-is-maximized":{"identifier":"allow-is-maximized","description":"Enables the is_maximized command without any pre-configured scope.","commands":{"allow":["is_maximized"],"deny":[]}},"allow-is-minimizable":{"identifier":"allow-is-minimizable","description":"Enables the is_minimizable command without any pre-configured scope.","commands":{"allow":["is_minimizable"],"deny":[]}},"allow-is-minimized":{"identifier":"allow-is-minimized","description":"Enables the is_minimized command without any pre-configured scope.","commands":{"allow":["is_minimized"],"deny":[]}},"allow-is-resizable":{"identifier":"allow-is-resizable","description":"Enables the is_resizable command without any pre-configured scope.","commands":{"allow":["is_resizable"],"deny":[]}},"allow-is-visible":{"identifier":"allow-is-visible","description":"Enables the is_visible command without any pre-configured scope.","commands":{"allow":["is_visible"],"deny":[]}},"allow-maximize":{"identifier":"allow-maximize","description":"Enables the maximize command without any pre-configured scope.","commands":{"allow":["maximize"],"deny":[]}},"allow-minimize":{"identifier":"allow-minimize","description":"Enables the minimize command without any pre-configured scope.","commands":{"allow":["minimize"],"deny":[]}},"allow-monitor-from-point":{"identifier":"allow-monitor-from-point","description":"Enables the monitor_from_point command without any pre-configured scope.","commands":{"allow":["monitor_from_point"],"deny":[]}},"allow-outer-position":{"identifier":"allow-outer-position","description":"Enables the outer_position command without any pre-configured scope.","commands":{"allow":["outer_position"],"deny":[]}},"allow-outer-size":{"identifier":"allow-outer-size","description":"Enables the outer_size command without any pre-configured scope.","commands":{"allow":["outer_size"],"deny":[]}},"allow-primary-monitor":{"identifier":"allow-primary-monitor","description":"Enables the primary_monitor command without any pre-configured scope.","commands":{"allow":["primary_monitor"],"deny":[]}},"allow-request-user-attention":{"identifier":"allow-request-user-attention","description":"Enables the request_user_attention command without any pre-configured scope.","commands":{"allow":["request_user_attention"],"deny":[]}},"allow-scale-factor":{"identifier":"allow-scale-factor","description":"Enables the scale_factor command without any pre-configured scope.","commands":{"allow":["scale_factor"],"deny":[]}},"allow-set-always-on-bottom":{"identifier":"allow-set-always-on-bottom","description":"Enables the set_always_on_bottom command without any pre-configured scope.","commands":{"allow":["set_always_on_bottom"],"deny":[]}},"allow-set-always-on-top":{"identifier":"allow-set-always-on-top","description":"Enables the set_always_on_top command without any pre-configured scope.","commands":{"allow":["set_always_on_top"],"deny":[]}},"allow-set-background-color":{"identifier":"allow-set-background-color","description":"Enables the set_background_color command without any pre-configured scope.","commands":{"allow":["set_background_color"],"deny":[]}},"allow-set-badge-count":{"identifier":"allow-set-badge-count","description":"Enables the set_badge_count command without any pre-configured scope.","commands":{"allow":["set_badge_count"],"deny":[]}},"allow-set-badge-label":{"identifier":"allow-set-badge-label","description":"Enables the set_badge_label command without any pre-configured scope.","commands":{"allow":["set_badge_label"],"deny":[]}},"allow-set-closable":{"identifier":"allow-set-closable","description":"Enables the set_closable command without any pre-configured scope.","commands":{"allow":["set_closable"],"deny":[]}},"allow-set-content-protected":{"identifier":"allow-set-content-protected","description":"Enables the set_content_protected command without any pre-configured scope.","commands":{"allow":["set_content_protected"],"deny":[]}},"allow-set-cursor-grab":{"identifier":"allow-set-cursor-grab","description":"Enables the set_cursor_grab command without any pre-configured scope.","commands":{"allow":["set_cursor_grab"],"deny":[]}},"allow-set-cursor-icon":{"identifier":"allow-set-cursor-icon","description":"Enables the set_cursor_icon command without any pre-configured scope.","commands":{"allow":["set_cursor_icon"],"deny":[]}},"allow-set-cursor-position":{"identifier":"allow-set-cursor-position","description":"Enables the set_cursor_position command without any pre-configured scope.","commands":{"allow":["set_cursor_position"],"deny":[]}},"allow-set-cursor-visible":{"identifier":"allow-set-cursor-visible","description":"Enables the set_cursor_visible command without any pre-configured scope.","commands":{"allow":["set_cursor_visible"],"deny":[]}},"allow-set-decorations":{"identifier":"allow-set-decorations","description":"Enables the set_decorations command without any pre-configured scope.","commands":{"allow":["set_decorations"],"deny":[]}},"allow-set-effects":{"identifier":"allow-set-effects","description":"Enables the set_effects command without any pre-configured scope.","commands":{"allow":["set_effects"],"deny":[]}},"allow-set-enabled":{"identifier":"allow-set-enabled","description":"Enables the set_enabled command without any pre-configured scope.","commands":{"allow":["set_enabled"],"deny":[]}},"allow-set-focus":{"identifier":"allow-set-focus","description":"Enables the set_focus command without any pre-configured scope.","commands":{"allow":["set_focus"],"deny":[]}},"allow-set-focusable":{"identifier":"allow-set-focusable","description":"Enables the set_focusable command without any pre-configured scope.","commands":{"allow":["set_focusable"],"deny":[]}},"allow-set-fullscreen":{"identifier":"allow-set-fullscreen","description":"Enables the set_fullscreen command without any pre-configured scope.","commands":{"allow":["set_fullscreen"],"deny":[]}},"allow-set-icon":{"identifier":"allow-set-icon","description":"Enables the set_icon command without any pre-configured scope.","commands":{"allow":["set_icon"],"deny":[]}},"allow-set-ignore-cursor-events":{"identifier":"allow-set-ignore-cursor-events","description":"Enables the set_ignore_cursor_events command without any pre-configured scope.","commands":{"allow":["set_ignore_cursor_events"],"deny":[]}},"allow-set-max-size":{"identifier":"allow-set-max-size","description":"Enables the set_max_size command without any pre-configured scope.","commands":{"allow":["set_max_size"],"deny":[]}},"allow-set-maximizable":{"identifier":"allow-set-maximizable","description":"Enables the set_maximizable command without any pre-configured scope.","commands":{"allow":["set_maximizable"],"deny":[]}},"allow-set-min-size":{"identifier":"allow-set-min-size","description":"Enables the set_min_size command without any pre-configured scope.","commands":{"allow":["set_min_size"],"deny":[]}},"allow-set-minimizable":{"identifier":"allow-set-minimizable","description":"Enables the set_minimizable command without any pre-configured scope.","commands":{"allow":["set_minimizable"],"deny":[]}},"allow-set-overlay-icon":{"identifier":"allow-set-overlay-icon","description":"Enables the set_overlay_icon command without any pre-configured scope.","commands":{"allow":["set_overlay_icon"],"deny":[]}},"allow-set-position":{"identifier":"allow-set-position","description":"Enables the set_position command without any pre-configured scope.","commands":{"allow":["set_position"],"deny":[]}},"allow-set-progress-bar":{"identifier":"allow-set-progress-bar","description":"Enables the set_progress_bar command without any pre-configured scope.","commands":{"allow":["set_progress_bar"],"deny":[]}},"allow-set-resizable":{"identifier":"allow-set-resizable","description":"Enables the set_resizable command without any pre-configured scope.","commands":{"allow":["set_resizable"],"deny":[]}},"allow-set-shadow":{"identifier":"allow-set-shadow","description":"Enables the set_shadow command without any pre-configured scope.","commands":{"allow":["set_shadow"],"deny":[]}},"allow-set-simple-fullscreen":{"identifier":"allow-set-simple-fullscreen","description":"Enables the set_simple_fullscreen command without any pre-configured scope.","commands":{"allow":["set_simple_fullscreen"],"deny":[]}},"allow-set-size":{"identifier":"allow-set-size","description":"Enables the set_size command without any pre-configured scope.","commands":{"allow":["set_size"],"deny":[]}},"allow-set-size-constraints":{"identifier":"allow-set-size-constraints","description":"Enables the set_size_constraints command without any pre-configured scope.","commands":{"allow":["set_size_constraints"],"deny":[]}},"allow-set-skip-taskbar":{"identifier":"allow-set-skip-taskbar","description":"Enables the set_skip_taskbar command without any pre-configured scope.","commands":{"allow":["set_skip_taskbar"],"deny":[]}},"allow-set-theme":{"identifier":"allow-set-theme","description":"Enables the set_theme command without any pre-configured scope.","commands":{"allow":["set_theme"],"deny":[]}},"allow-set-title":{"identifier":"allow-set-title","description":"Enables the set_title command without any pre-configured scope.","commands":{"allow":["set_title"],"deny":[]}},"allow-set-title-bar-style":{"identifier":"allow-set-title-bar-style","description":"Enables the set_title_bar_style command without any pre-configured scope.","commands":{"allow":["set_title_bar_style"],"deny":[]}},"allow-set-visible-on-all-workspaces":{"identifier":"allow-set-visible-on-all-workspaces","description":"Enables the set_visible_on_all_workspaces command without any pre-configured scope.","commands":{"allow":["set_visible_on_all_workspaces"],"deny":[]}},"allow-show":{"identifier":"allow-show","description":"Enables the show command without any pre-configured scope.","commands":{"allow":["show"],"deny":[]}},"allow-start-dragging":{"identifier":"allow-start-dragging","description":"Enables the start_dragging command without any pre-configured scope.","commands":{"allow":["start_dragging"],"deny":[]}},"allow-start-resize-dragging":{"identifier":"allow-start-resize-dragging","description":"Enables the start_resize_dragging command without any pre-configured scope.","commands":{"allow":["start_resize_dragging"],"deny":[]}},"allow-theme":{"identifier":"allow-theme","description":"Enables the theme command without any pre-configured scope.","commands":{"allow":["theme"],"deny":[]}},"allow-title":{"identifier":"allow-title","description":"Enables the title command without any pre-configured scope.","commands":{"allow":["title"],"deny":[]}},"allow-toggle-maximize":{"identifier":"allow-toggle-maximize","description":"Enables the toggle_maximize command without any pre-configured scope.","commands":{"allow":["toggle_maximize"],"deny":[]}},"allow-unmaximize":{"identifier":"allow-unmaximize","description":"Enables the unmaximize command without any pre-configured scope.","commands":{"allow":["unmaximize"],"deny":[]}},"allow-unminimize":{"identifier":"allow-unminimize","description":"Enables the unminimize command without any pre-configured scope.","commands":{"allow":["unminimize"],"deny":[]}},"deny-available-monitors":{"identifier":"deny-available-monitors","description":"Denies the available_monitors command without any pre-configured scope.","commands":{"allow":[],"deny":["available_monitors"]}},"deny-center":{"identifier":"deny-center","description":"Denies the center command without any pre-configured scope.","commands":{"allow":[],"deny":["center"]}},"deny-close":{"identifier":"deny-close","description":"Denies the close command without any pre-configured scope.","commands":{"allow":[],"deny":["close"]}},"deny-create":{"identifier":"deny-create","description":"Denies the create command without any pre-configured scope.","commands":{"allow":[],"deny":["create"]}},"deny-current-monitor":{"identifier":"deny-current-monitor","description":"Denies the current_monitor command without any pre-configured scope.","commands":{"allow":[],"deny":["current_monitor"]}},"deny-cursor-position":{"identifier":"deny-cursor-position","description":"Denies the cursor_position command without any pre-configured scope.","commands":{"allow":[],"deny":["cursor_position"]}},"deny-destroy":{"identifier":"deny-destroy","description":"Denies the destroy command without any pre-configured scope.","commands":{"allow":[],"deny":["destroy"]}},"deny-get-all-windows":{"identifier":"deny-get-all-windows","description":"Denies the get_all_windows command without any pre-configured scope.","commands":{"allow":[],"deny":["get_all_windows"]}},"deny-hide":{"identifier":"deny-hide","description":"Denies the hide command without any pre-configured scope.","commands":{"allow":[],"deny":["hide"]}},"deny-inner-position":{"identifier":"deny-inner-position","description":"Denies the inner_position command without any pre-configured scope.","commands":{"allow":[],"deny":["inner_position"]}},"deny-inner-size":{"identifier":"deny-inner-size","description":"Denies the inner_size command without any pre-configured scope.","commands":{"allow":[],"deny":["inner_size"]}},"deny-internal-toggle-maximize":{"identifier":"deny-internal-toggle-maximize","description":"Denies the internal_toggle_maximize command without any pre-configured scope.","commands":{"allow":[],"deny":["internal_toggle_maximize"]}},"deny-is-always-on-top":{"identifier":"deny-is-always-on-top","description":"Denies the is_always_on_top command without any pre-configured scope.","commands":{"allow":[],"deny":["is_always_on_top"]}},"deny-is-closable":{"identifier":"deny-is-closable","description":"Denies the is_closable command without any pre-configured scope.","commands":{"allow":[],"deny":["is_closable"]}},"deny-is-decorated":{"identifier":"deny-is-decorated","description":"Denies the is_decorated command without any pre-configured scope.","commands":{"allow":[],"deny":["is_decorated"]}},"deny-is-enabled":{"identifier":"deny-is-enabled","description":"Denies the is_enabled command without any pre-configured scope.","commands":{"allow":[],"deny":["is_enabled"]}},"deny-is-focused":{"identifier":"deny-is-focused","description":"Denies the is_focused command without any pre-configured scope.","commands":{"allow":[],"deny":["is_focused"]}},"deny-is-fullscreen":{"identifier":"deny-is-fullscreen","description":"Denies the is_fullscreen command without any pre-configured scope.","commands":{"allow":[],"deny":["is_fullscreen"]}},"deny-is-maximizable":{"identifier":"deny-is-maximizable","description":"Denies the is_maximizable command without any pre-configured scope.","commands":{"allow":[],"deny":["is_maximizable"]}},"deny-is-maximized":{"identifier":"deny-is-maximized","description":"Denies the is_maximized command without any pre-configured scope.","commands":{"allow":[],"deny":["is_maximized"]}},"deny-is-minimizable":{"identifier":"deny-is-minimizable","description":"Denies the is_minimizable command without any pre-configured scope.","commands":{"allow":[],"deny":["is_minimizable"]}},"deny-is-minimized":{"identifier":"deny-is-minimized","description":"Denies the is_minimized command without any pre-configured scope.","commands":{"allow":[],"deny":["is_minimized"]}},"deny-is-resizable":{"identifier":"deny-is-resizable","description":"Denies the is_resizable command without any pre-configured scope.","commands":{"allow":[],"deny":["is_resizable"]}},"deny-is-visible":{"identifier":"deny-is-visible","description":"Denies the is_visible command without any pre-configured scope.","commands":{"allow":[],"deny":["is_visible"]}},"deny-maximize":{"identifier":"deny-maximize","description":"Denies the maximize command without any pre-configured scope.","commands":{"allow":[],"deny":["maximize"]}},"deny-minimize":{"identifier":"deny-minimize","description":"Denies the minimize command without any pre-configured scope.","commands":{"allow":[],"deny":["minimize"]}},"deny-monitor-from-point":{"identifier":"deny-monitor-from-point","description":"Denies the monitor_from_point command without any pre-configured scope.","commands":{"allow":[],"deny":["monitor_from_point"]}},"deny-outer-position":{"identifier":"deny-outer-position","description":"Denies the outer_position command without any pre-configured scope.","commands":{"allow":[],"deny":["outer_position"]}},"deny-outer-size":{"identifier":"deny-outer-size","description":"Denies the outer_size command without any pre-configured scope.","commands":{"allow":[],"deny":["outer_size"]}},"deny-primary-monitor":{"identifier":"deny-primary-monitor","description":"Denies the primary_monitor command without any pre-configured scope.","commands":{"allow":[],"deny":["primary_monitor"]}},"deny-request-user-attention":{"identifier":"deny-request-user-attention","description":"Denies the request_user_attention command without any pre-configured scope.","commands":{"allow":[],"deny":["request_user_attention"]}},"deny-scale-factor":{"identifier":"deny-scale-factor","description":"Denies the scale_factor command without any pre-configured scope.","commands":{"allow":[],"deny":["scale_factor"]}},"deny-set-always-on-bottom":{"identifier":"deny-set-always-on-bottom","description":"Denies the set_always_on_bottom command without any pre-configured scope.","commands":{"allow":[],"deny":["set_always_on_bottom"]}},"deny-set-always-on-top":{"identifier":"deny-set-always-on-top","description":"Denies the set_always_on_top command without any pre-configured scope.","commands":{"allow":[],"deny":["set_always_on_top"]}},"deny-set-background-color":{"identifier":"deny-set-background-color","description":"Denies the set_background_color command without any pre-configured scope.","commands":{"allow":[],"deny":["set_background_color"]}},"deny-set-badge-count":{"identifier":"deny-set-badge-count","description":"Denies the set_badge_count command without any pre-configured scope.","commands":{"allow":[],"deny":["set_badge_count"]}},"deny-set-badge-label":{"identifier":"deny-set-badge-label","description":"Denies the set_badge_label command without any pre-configured scope.","commands":{"allow":[],"deny":["set_badge_label"]}},"deny-set-closable":{"identifier":"deny-set-closable","description":"Denies the set_closable command without any pre-configured scope.","commands":{"allow":[],"deny":["set_closable"]}},"deny-set-content-protected":{"identifier":"deny-set-content-protected","description":"Denies the set_content_protected command without any pre-configured scope.","commands":{"allow":[],"deny":["set_content_protected"]}},"deny-set-cursor-grab":{"identifier":"deny-set-cursor-grab","description":"Denies the set_cursor_grab command without any pre-configured scope.","commands":{"allow":[],"deny":["set_cursor_grab"]}},"deny-set-cursor-icon":{"identifier":"deny-set-cursor-icon","description":"Denies the set_cursor_icon command without any pre-configured scope.","commands":{"allow":[],"deny":["set_cursor_icon"]}},"deny-set-cursor-position":{"identifier":"deny-set-cursor-position","description":"Denies the set_cursor_position command without any pre-configured scope.","commands":{"allow":[],"deny":["set_cursor_position"]}},"deny-set-cursor-visible":{"identifier":"deny-set-cursor-visible","description":"Denies the set_cursor_visible command without any pre-configured scope.","commands":{"allow":[],"deny":["set_cursor_visible"]}},"deny-set-decorations":{"identifier":"deny-set-decorations","description":"Denies the set_decorations command without any pre-configured scope.","commands":{"allow":[],"deny":["set_decorations"]}},"deny-set-effects":{"identifier":"deny-set-effects","description":"Denies the set_effects command without any pre-configured scope.","commands":{"allow":[],"deny":["set_effects"]}},"deny-set-enabled":{"identifier":"deny-set-enabled","description":"Denies the set_enabled command without any pre-configured scope.","commands":{"allow":[],"deny":["set_enabled"]}},"deny-set-focus":{"identifier":"deny-set-focus","description":"Denies the set_focus command without any pre-configured scope.","commands":{"allow":[],"deny":["set_focus"]}},"deny-set-focusable":{"identifier":"deny-set-focusable","description":"Denies the set_focusable command without any pre-configured scope.","commands":{"allow":[],"deny":["set_focusable"]}},"deny-set-fullscreen":{"identifier":"deny-set-fullscreen","description":"Denies the set_fullscreen command without any pre-configured scope.","commands":{"allow":[],"deny":["set_fullscreen"]}},"deny-set-icon":{"identifier":"deny-set-icon","description":"Denies the set_icon command without any pre-configured scope.","commands":{"allow":[],"deny":["set_icon"]}},"deny-set-ignore-cursor-events":{"identifier":"deny-set-ignore-cursor-events","description":"Denies the set_ignore_cursor_events command without any pre-configured scope.","commands":{"allow":[],"deny":["set_ignore_cursor_events"]}},"deny-set-max-size":{"identifier":"deny-set-max-size","description":"Denies the set_max_size command without any pre-configured scope.","commands":{"allow":[],"deny":["set_max_size"]}},"deny-set-maximizable":{"identifier":"deny-set-maximizable","description":"Denies the set_maximizable command without any pre-configured scope.","commands":{"allow":[],"deny":["set_maximizable"]}},"deny-set-min-size":{"identifier":"deny-set-min-size","description":"Denies the set_min_size command without any pre-configured scope.","commands":{"allow":[],"deny":["set_min_size"]}},"deny-set-minimizable":{"identifier":"deny-set-minimizable","description":"Denies the set_minimizable command without any pre-configured scope.","commands":{"allow":[],"deny":["set_minimizable"]}},"deny-set-overlay-icon":{"identifier":"deny-set-overlay-icon","description":"Denies the set_overlay_icon command without any pre-configured scope.","commands":{"allow":[],"deny":["set_overlay_icon"]}},"deny-set-position":{"identifier":"deny-set-position","description":"Denies the set_position command without any pre-configured scope.","commands":{"allow":[],"deny":["set_position"]}},"deny-set-progress-bar":{"identifier":"deny-set-progress-bar","description":"Denies the set_progress_bar command without any pre-configured scope.","commands":{"allow":[],"deny":["set_progress_bar"]}},"deny-set-resizable":{"identifier":"deny-set-resizable","description":"Denies the set_resizable command without any pre-configured scope.","commands":{"allow":[],"deny":["set_resizable"]}},"deny-set-shadow":{"identifier":"deny-set-shadow","description":"Denies the set_shadow command without any pre-configured scope.","commands":{"allow":[],"deny":["set_shadow"]}},"deny-set-simple-fullscreen":{"identifier":"deny-set-simple-fullscreen","description":"Denies the set_simple_fullscreen command without any pre-configured scope.","commands":{"allow":[],"deny":["set_simple_fullscreen"]}},"deny-set-size":{"identifier":"deny-set-size","description":"Denies the set_size command without any pre-configured scope.","commands":{"allow":[],"deny":["set_size"]}},"deny-set-size-constraints":{"identifier":"deny-set-size-constraints","description":"Denies the set_size_constraints command without any pre-configured scope.","commands":{"allow":[],"deny":["set_size_constraints"]}},"deny-set-skip-taskbar":{"identifier":"deny-set-skip-taskbar","description":"Denies the set_skip_taskbar command without any pre-configured scope.","commands":{"allow":[],"deny":["set_skip_taskbar"]}},"deny-set-theme":{"identifier":"deny-set-theme","description":"Denies the set_theme command without any pre-configured scope.","commands":{"allow":[],"deny":["set_theme"]}},"deny-set-title":{"identifier":"deny-set-title","description":"Denies the set_title command without any pre-configured scope.","commands":{"allow":[],"deny":["set_title"]}},"deny-set-title-bar-style":{"identifier":"deny-set-title-bar-style","description":"Denies the set_title_bar_style command without any pre-configured scope.","commands":{"allow":[],"deny":["set_title_bar_style"]}},"deny-set-visible-on-all-workspaces":{"identifier":"deny-set-visible-on-all-workspaces","description":"Denies the set_visible_on_all_workspaces command without any pre-configured scope.","commands":{"allow":[],"deny":["set_visible_on_all_workspaces"]}},"deny-show":{"identifier":"deny-show","description":"Denies the show command without any pre-configured scope.","commands":{"allow":[],"deny":["show"]}},"deny-start-dragging":{"identifier":"deny-start-dragging","description":"Denies the start_dragging command without any pre-configured scope.","commands":{"allow":[],"deny":["start_dragging"]}},"deny-start-resize-dragging":{"identifier":"deny-start-resize-dragging","description":"Denies the start_resize_dragging command without any pre-configured scope.","commands":{"allow":[],"deny":["start_resize_dragging"]}},"deny-theme":{"identifier":"deny-theme","description":"Denies the theme command without any pre-configured scope.","commands":{"allow":[],"deny":["theme"]}},"deny-title":{"identifier":"deny-title","description":"Denies the title command without any pre-configured scope.","commands":{"allow":[],"deny":["title"]}},"deny-toggle-maximize":{"identifier":"deny-toggle-maximize","description":"Denies the toggle_maximize command without any pre-configured scope.","commands":{"allow":[],"deny":["toggle_maximize"]}},"deny-unmaximize":{"identifier":"deny-unmaximize","description":"Denies the unmaximize command without any pre-configured scope.","commands":{"allow":[],"deny":["unmaximize"]}},"deny-unminimize":{"identifier":"deny-unminimize","description":"Denies the unminimize command without any pre-configured scope.","commands":{"allow":[],"deny":["unminimize"]}}},"permission_sets":{},"global_scope_schema":null},"deep-link":{"default_permission":{"identifier":"default","description":"Allows reading the opened deep link via the get_current command","permissions":["allow-get-current"]},"permissions":{"allow-get-current":{"identifier":"allow-get-current","description":"Enables the get_current command without any pre-configured scope.","commands":{"allow":["get_current"],"deny":[]}},"allow-is-registered":{"identifier":"allow-is-registered","description":"Enables the is_registered command without any pre-configured scope.","commands":{"allow":["is_registered"],"deny":[]}},"allow-register":{"identifier":"allow-register","description":"Enables the register command without any pre-configured scope.","commands":{"allow":["register"],"deny":[]}},"allow-unregister":{"identifier":"allow-unregister","description":"Enables the unregister command without any pre-configured scope.","commands":{"allow":["unregister"],"deny":[]}},"deny-get-current":{"identifier":"deny-get-current","description":"Denies the get_current command without any pre-configured scope.","commands":{"allow":[],"deny":["get_current"]}},"deny-is-registered":{"identifier":"deny-is-registered","description":"Denies the is_registered command without any pre-configured scope.","commands":{"allow":[],"deny":["is_registered"]}},"deny-register":{"identifier":"deny-register","description":"Denies the register command without any pre-configured scope.","commands":{"allow":[],"deny":["register"]}},"deny-unregister":{"identifier":"deny-unregister","description":"Denies the unregister command without any pre-configured scope.","commands":{"allow":[],"deny":["unregister"]}}},"permission_sets":{},"global_scope_schema":null},"dialog":{"default_permission":{"identifier":"default","description":"This permission set configures the types of dialogs\navailable from the dialog plugin.\n\n#### Granted Permissions\n\nAll dialog types are enabled.\n\n\n","permissions":["allow-ask","allow-confirm","allow-message","allow-save","allow-open"]},"permissions":{"allow-ask":{"identifier":"allow-ask","description":"Enables the ask command without any pre-configured scope.","commands":{"allow":["ask"],"deny":[]}},"allow-confirm":{"identifier":"allow-confirm","description":"Enables the confirm command without any pre-configured scope.","commands":{"allow":["confirm"],"deny":[]}},"allow-message":{"identifier":"allow-message","description":"Enables the message command without any pre-configured scope.","commands":{"allow":["message"],"deny":[]}},"allow-open":{"identifier":"allow-open","description":"Enables the open command without any pre-configured scope.","commands":{"allow":["open"],"deny":[]}},"allow-save":{"identifier":"allow-save","description":"Enables the save command without any pre-configured scope.","commands":{"allow":["save"],"deny":[]}},"deny-ask":{"identifier":"deny-ask","description":"Denies the ask command without any pre-configured scope.","commands":{"allow":[],"deny":["ask"]}},"deny-confirm":{"identifier":"deny-confirm","description":"Denies the confirm command without any pre-configured scope.","commands":{"allow":[],"deny":["confirm"]}},"deny-message":{"identifier":"deny-message","description":"Denies the message command without any pre-configured scope.","commands":{"allow":[],"deny":["message"]}},"deny-open":{"identifier":"deny-open","description":"Denies the open command without any pre-configured scope.","commands":{"allow":[],"deny":["open"]}},"deny-save":{"identifier":"deny-save","description":"Denies the save command without any pre-configured scope.","commands":{"allow":[],"deny":["save"]}}},"permission_sets":{},"global_scope_schema":null},"notification":{"default_permission":{"identifier":"default","description":"This permission set configures which\nnotification features are by default exposed.\n\n#### Granted Permissions\n\nIt allows all notification related features.\n\n","permissions":["allow-is-permission-granted","allow-request-permission","allow-notify","allow-register-action-types","allow-register-listener","allow-cancel","allow-get-pending","allow-remove-active","allow-get-active","allow-check-permissions","allow-show","allow-batch","allow-list-channels","allow-delete-channel","allow-create-channel","allow-permission-state"]},"permissions":{"allow-batch":{"identifier":"allow-batch","description":"Enables the batch command without any pre-configured scope.","commands":{"allow":["batch"],"deny":[]}},"allow-cancel":{"identifier":"allow-cancel","description":"Enables the cancel command without any pre-configured scope.","commands":{"allow":["cancel"],"deny":[]}},"allow-check-permissions":{"identifier":"allow-check-permissions","description":"Enables the check_permissions command without any pre-configured scope.","commands":{"allow":["check_permissions"],"deny":[]}},"allow-create-channel":{"identifier":"allow-create-channel","description":"Enables the create_channel command without any pre-configured scope.","commands":{"allow":["create_channel"],"deny":[]}},"allow-delete-channel":{"identifier":"allow-delete-channel","description":"Enables the delete_channel command without any pre-configured scope.","commands":{"allow":["delete_channel"],"deny":[]}},"allow-get-active":{"identifier":"allow-get-active","description":"Enables the get_active command without any pre-configured scope.","commands":{"allow":["get_active"],"deny":[]}},"allow-get-pending":{"identifier":"allow-get-pending","description":"Enables the get_pending command without any pre-configured scope.","commands":{"allow":["get_pending"],"deny":[]}},"allow-is-permission-granted":{"identifier":"allow-is-permission-granted","description":"Enables the is_permission_granted command without any pre-configured scope.","commands":{"allow":["is_permission_granted"],"deny":[]}},"allow-list-channels":{"identifier":"allow-list-channels","description":"Enables the list_channels command without any pre-configured scope.","commands":{"allow":["list_channels"],"deny":[]}},"allow-notify":{"identifier":"allow-notify","description":"Enables the notify command without any pre-configured scope.","commands":{"allow":["notify"],"deny":[]}},"allow-permission-state":{"identifier":"allow-permission-state","description":"Enables the permission_state command without any pre-configured scope.","commands":{"allow":["permission_state"],"deny":[]}},"allow-register-action-types":{"identifier":"allow-register-action-types","description":"Enables the register_action_types command without any pre-configured scope.","commands":{"allow":["register_action_types"],"deny":[]}},"allow-register-listener":{"identifier":"allow-register-listener","description":"Enables the register_listener command without any pre-configured scope.","commands":{"allow":["register_listener"],"deny":[]}},"allow-remove-active":{"identifier":"allow-remove-active","description":"Enables the remove_active command without any pre-configured scope.","commands":{"allow":["remove_active"],"deny":[]}},"allow-request-permission":{"identifier":"allow-request-permission","description":"Enables the request_permission command without any pre-configured scope.","commands":{"allow":["request_permission"],"deny":[]}},"allow-show":{"identifier":"allow-show","description":"Enables the show command without any pre-configured scope.","commands":{"allow":["show"],"deny":[]}},"deny-batch":{"identifier":"deny-batch","description":"Denies the batch command without any pre-configured scope.","commands":{"allow":[],"deny":["batch"]}},"deny-cancel":{"identifier":"deny-cancel","description":"Denies the cancel command without any pre-configured scope.","commands":{"allow":[],"deny":["cancel"]}},"deny-check-permissions":{"identifier":"deny-check-permissions","description":"Denies the check_permissions command without any pre-configured scope.","commands":{"allow":[],"deny":["check_permissions"]}},"deny-create-channel":{"identifier":"deny-create-channel","description":"Denies the create_channel command without any pre-configured scope.","commands":{"allow":[],"deny":["create_channel"]}},"deny-delete-channel":{"identifier":"deny-delete-channel","description":"Denies the delete_channel command without any pre-configured scope.","commands":{"allow":[],"deny":["delete_channel"]}},"deny-get-active":{"identifier":"deny-get-active","description":"Denies the get_active command without any pre-configured scope.","commands":{"allow":[],"deny":["get_active"]}},"deny-get-pending":{"identifier":"deny-get-pending","description":"Denies the get_pending command without any pre-configured scope.","commands":{"allow":[],"deny":["get_pending"]}},"deny-is-permission-granted":{"identifier":"deny-is-permission-granted","description":"Denies the is_permission_granted command without any pre-configured scope.","commands":{"allow":[],"deny":["is_permission_granted"]}},"deny-list-channels":{"identifier":"deny-list-channels","description":"Denies the list_channels command without any pre-configured scope.","commands":{"allow":[],"deny":["list_channels"]}},"deny-notify":{"identifier":"deny-notify","description":"Denies the notify command without any pre-configured scope.","commands":{"allow":[],"deny":["notify"]}},"deny-permission-state":{"identifier":"deny-permission-state","description":"Denies the permission_state command without any pre-configured scope.","commands":{"allow":[],"deny":["permission_state"]}},"deny-register-action-types":{"identifier":"deny-register-action-types","description":"Denies the register_action_types command without any pre-configured scope.","commands":{"allow":[],"deny":["register_action_types"]}},"deny-register-listener":{"identifier":"deny-register-listener","description":"Denies the register_listener command without any pre-configured scope.","commands":{"allow":[],"deny":["register_listener"]}},"deny-remove-active":{"identifier":"deny-remove-active","description":"Denies the remove_active command without any pre-configured scope.","commands":{"allow":[],"deny":["remove_active"]}},"deny-request-permission":{"identifier":"deny-request-permission","description":"Denies the request_permission command without any pre-configured scope.","commands":{"allow":[],"deny":["request_permission"]}},"deny-show":{"identifier":"deny-show","description":"Denies the show command without any pre-configured scope.","commands":{"allow":[],"deny":["show"]}}},"permission_sets":{},"global_scope_schema":null},"os":{"default_permission":{"identifier":"default","description":"This permission set configures which\noperating system information are available\nto gather from the frontend.\n\n#### Granted Permissions\n\nAll information except the host name are available.\n\n","permissions":["allow-arch","allow-exe-extension","allow-family","allow-locale","allow-os-type","allow-platform","allow-version"]},"permissions":{"allow-arch":{"identifier":"allow-arch","description":"Enables the arch command without any pre-configured scope.","commands":{"allow":["arch"],"deny":[]}},"allow-exe-extension":{"identifier":"allow-exe-extension","description":"Enables the exe_extension command without any pre-configured scope.","commands":{"allow":["exe_extension"],"deny":[]}},"allow-family":{"identifier":"allow-family","description":"Enables the family command without any pre-configured scope.","commands":{"allow":["family"],"deny":[]}},"allow-hostname":{"identifier":"allow-hostname","description":"Enables the hostname command without any pre-configured scope.","commands":{"allow":["hostname"],"deny":[]}},"allow-locale":{"identifier":"allow-locale","description":"Enables the locale command without any pre-configured scope.","commands":{"allow":["locale"],"deny":[]}},"allow-os-type":{"identifier":"allow-os-type","description":"Enables the os_type command without any pre-configured scope.","commands":{"allow":["os_type"],"deny":[]}},"allow-platform":{"identifier":"allow-platform","description":"Enables the platform command without any pre-configured scope.","commands":{"allow":["platform"],"deny":[]}},"allow-version":{"identifier":"allow-version","description":"Enables the version command without any pre-configured scope.","commands":{"allow":["version"],"deny":[]}},"deny-arch":{"identifier":"deny-arch","description":"Denies the arch command without any pre-configured scope.","commands":{"allow":[],"deny":["arch"]}},"deny-exe-extension":{"identifier":"deny-exe-extension","description":"Denies the exe_extension command without any pre-configured scope.","commands":{"allow":[],"deny":["exe_extension"]}},"deny-family":{"identifier":"deny-family","description":"Denies the family command without any pre-configured scope.","commands":{"allow":[],"deny":["family"]}},"deny-hostname":{"identifier":"deny-hostname","description":"Denies the hostname command without any pre-configured scope.","commands":{"allow":[],"deny":["hostname"]}},"deny-locale":{"identifier":"deny-locale","description":"Denies the locale command without any pre-configured scope.","commands":{"allow":[],"deny":["locale"]}},"deny-os-type":{"identifier":"deny-os-type","description":"Denies the os_type command without any pre-configured scope.","commands":{"allow":[],"deny":["os_type"]}},"deny-platform":{"identifier":"deny-platform","description":"Denies the platform command without any pre-configured scope.","commands":{"allow":[],"deny":["platform"]}},"deny-version":{"identifier":"deny-version","description":"Denies the version command without any pre-configured scope.","commands":{"allow":[],"deny":["version"]}}},"permission_sets":{},"global_scope_schema":null},"process":{"default_permission":{"identifier":"default","description":"This permission set configures which\nprocess features are by default exposed.\n\n#### Granted Permissions\n\nThis enables to quit via `allow-exit` and restart via `allow-restart`\nthe application.\n","permissions":["allow-exit","allow-restart"]},"permissions":{"allow-exit":{"identifier":"allow-exit","description":"Enables the exit command without any pre-configured scope.","commands":{"allow":["exit"],"deny":[]}},"allow-restart":{"identifier":"allow-restart","description":"Enables the restart command without any pre-configured scope.","commands":{"allow":["restart"],"deny":[]}},"deny-exit":{"identifier":"deny-exit","description":"Denies the exit command without any pre-configured scope.","commands":{"allow":[],"deny":["exit"]}},"deny-restart":{"identifier":"deny-restart","description":"Denies the restart command without any pre-configured scope.","commands":{"allow":[],"deny":["restart"]}}},"permission_sets":{},"global_scope_schema":null},"shell":{"default_permission":{"identifier":"default","description":"This permission set configures which\nshell functionality is exposed by default.\n\n#### Granted Permissions\n\nIt allows to use the `open` functionality with a reasonable\nscope pre-configured. It will allow opening `http(s)://`,\n`tel:` and `mailto:` links.\n","permissions":["allow-open"]},"permissions":{"allow-execute":{"identifier":"allow-execute","description":"Enables the execute command without any pre-configured scope.","commands":{"allow":["execute"],"deny":[]}},"allow-kill":{"identifier":"allow-kill","description":"Enables the kill command without any pre-configured scope.","commands":{"allow":["kill"],"deny":[]}},"allow-open":{"identifier":"allow-open","description":"Enables the open command without any pre-configured scope.","commands":{"allow":["open"],"deny":[]}},"allow-spawn":{"identifier":"allow-spawn","description":"Enables the spawn command without any pre-configured scope.","commands":{"allow":["spawn"],"deny":[]}},"allow-stdin-write":{"identifier":"allow-stdin-write","description":"Enables the stdin_write command without any pre-configured scope.","commands":{"allow":["stdin_write"],"deny":[]}},"deny-execute":{"identifier":"deny-execute","description":"Denies the execute command without any pre-configured scope.","commands":{"allow":[],"deny":["execute"]}},"deny-kill":{"identifier":"deny-kill","description":"Denies the kill command without any pre-configured scope.","commands":{"allow":[],"deny":["kill"]}},"deny-open":{"identifier":"deny-open","description":"Denies the open command without any pre-configured scope.","commands":{"allow":[],"deny":["open"]}},"deny-spawn":{"identifier":"deny-spawn","description":"Denies the spawn command without any pre-configured scope.","commands":{"allow":[],"deny":["spawn"]}},"deny-stdin-write":{"identifier":"deny-stdin-write","description":"Denies the stdin_write command without any pre-configured scope.","commands":{"allow":[],"deny":["stdin_write"]}}},"permission_sets":{},"global_scope_schema":{"$schema":"http://json-schema.org/draft-07/schema#","anyOf":[{"additionalProperties":false,"properties":{"args":{"allOf":[{"$ref":"#/definitions/ShellScopeEntryAllowedArgs"}],"description":"The allowed arguments for the command execution."},"cmd":{"description":"The command name. It can start with a variable that resolves to a system base directory. The variables are: `$AUDIO`, `$CACHE`, `$CONFIG`, `$DATA`, `$LOCALDATA`, `$DESKTOP`, `$DOCUMENT`, `$DOWNLOAD`, `$EXE`, `$FONT`, `$HOME`, `$PICTURE`, `$PUBLIC`, `$RUNTIME`, `$TEMPLATE`, `$VIDEO`, `$RESOURCE`, `$LOG`, `$TEMP`, `$APPCONFIG`, `$APPDATA`, `$APPLOCALDATA`, `$APPCACHE`, `$APPLOG`.","type":"string"},"name":{"description":"The name for this allowed shell command configuration.\n\nThis name will be used inside of the webview API to call this command along with any specified arguments.","type":"string"}},"required":["cmd","name"],"type":"object"},{"additionalProperties":false,"properties":{"args":{"allOf":[{"$ref":"#/definitions/ShellScopeEntryAllowedArgs"}],"description":"The allowed arguments for the command execution."},"name":{"description":"The name for this allowed shell command configuration.\n\nThis name will be used inside of the webview API to call this command along with any specified arguments.","type":"string"},"sidecar":{"description":"If this command is a sidecar command.","type":"boolean"}},"required":["name","sidecar"],"type":"object"}],"definitions":{"ShellScopeEntryAllowedArg":{"anyOf":[{"description":"A non-configurable argument that is passed to the command in the order it was specified.","type":"string"},{"additionalProperties":false,"description":"A variable that is set while calling the command from the webview API.","properties":{"raw":{"default":false,"description":"Marks the validator as a raw regex, meaning the plugin should not make any modification at runtime.\n\nThis means the regex will not match on the entire string by default, which might be exploited if your regex allow unexpected input to be considered valid. When using this option, make sure your regex is correct.","type":"boolean"},"validator":{"description":"[regex] validator to require passed values to conform to an expected input.\n\nThis will require the argument value passed to this variable to match the `validator` regex before it will be executed.\n\nThe regex string is by default surrounded by `^...$` to match the full string. For example the `https?://\\w+` regex would be registered as `^https?://\\w+$`.\n\n[regex]: ","type":"string"}},"required":["validator"],"type":"object"}],"description":"A command argument allowed to be executed by the webview API."},"ShellScopeEntryAllowedArgs":{"anyOf":[{"description":"Use a simple boolean to allow all or disable all arguments to this command configuration.","type":"boolean"},{"description":"A specific set of [`ShellScopeEntryAllowedArg`] that are valid to call for the command configuration.","items":{"$ref":"#/definitions/ShellScopeEntryAllowedArg"},"type":"array"}],"description":"A set of command arguments allowed to be executed by the webview API.\n\nA value of `true` will allow any arguments to be passed to the command. `false` will disable all arguments. A list of [`ShellScopeEntryAllowedArg`] will set those arguments as the only valid arguments to be passed to the attached command configuration."}},"description":"Shell scope entry.","title":"ShellScopeEntry"}},"updater":{"default_permission":{"identifier":"default","description":"This permission set configures which kind of\nupdater functions are exposed to the frontend.\n\n#### Granted Permissions\n\nThe full workflow from checking for updates to installing them\nis enabled.\n\n","permissions":["allow-check","allow-download","allow-install","allow-download-and-install"]},"permissions":{"allow-check":{"identifier":"allow-check","description":"Enables the check command without any pre-configured scope.","commands":{"allow":["check"],"deny":[]}},"allow-download":{"identifier":"allow-download","description":"Enables the download command without any pre-configured scope.","commands":{"allow":["download"],"deny":[]}},"allow-download-and-install":{"identifier":"allow-download-and-install","description":"Enables the download_and_install command without any pre-configured scope.","commands":{"allow":["download_and_install"],"deny":[]}},"allow-install":{"identifier":"allow-install","description":"Enables the install command without any pre-configured scope.","commands":{"allow":["install"],"deny":[]}},"deny-check":{"identifier":"deny-check","description":"Denies the check command without any pre-configured scope.","commands":{"allow":[],"deny":["check"]}},"deny-download":{"identifier":"deny-download","description":"Denies the download command without any pre-configured scope.","commands":{"allow":[],"deny":["download"]}},"deny-download-and-install":{"identifier":"deny-download-and-install","description":"Denies the download_and_install command without any pre-configured scope.","commands":{"allow":[],"deny":["download_and_install"]}},"deny-install":{"identifier":"deny-install","description":"Denies the install command without any pre-configured scope.","commands":{"allow":[],"deny":["install"]}}},"permission_sets":{},"global_scope_schema":null}} \ No newline at end of file +{"clipboard-manager":{"default_permission":{"identifier":"default","description":"No features are enabled by default, as we believe\nthe clipboard can be inherently dangerous and it is \napplication specific if read and/or write access is needed.\n\nClipboard interaction needs to be explicitly enabled.\n","permissions":[]},"permissions":{"allow-clear":{"identifier":"allow-clear","description":"Enables the clear command without any pre-configured scope.","commands":{"allow":["clear"],"deny":[]}},"allow-read-image":{"identifier":"allow-read-image","description":"Enables the read_image command without any pre-configured scope.","commands":{"allow":["read_image"],"deny":[]}},"allow-read-text":{"identifier":"allow-read-text","description":"Enables the read_text command without any pre-configured scope.","commands":{"allow":["read_text"],"deny":[]}},"allow-write-html":{"identifier":"allow-write-html","description":"Enables the write_html command without any pre-configured scope.","commands":{"allow":["write_html"],"deny":[]}},"allow-write-image":{"identifier":"allow-write-image","description":"Enables the write_image command without any pre-configured scope.","commands":{"allow":["write_image"],"deny":[]}},"allow-write-text":{"identifier":"allow-write-text","description":"Enables the write_text command without any pre-configured scope.","commands":{"allow":["write_text"],"deny":[]}},"deny-clear":{"identifier":"deny-clear","description":"Denies the clear command without any pre-configured scope.","commands":{"allow":[],"deny":["clear"]}},"deny-read-image":{"identifier":"deny-read-image","description":"Denies the read_image command without any pre-configured scope.","commands":{"allow":[],"deny":["read_image"]}},"deny-read-text":{"identifier":"deny-read-text","description":"Denies the read_text command without any pre-configured scope.","commands":{"allow":[],"deny":["read_text"]}},"deny-write-html":{"identifier":"deny-write-html","description":"Denies the write_html command without any pre-configured scope.","commands":{"allow":[],"deny":["write_html"]}},"deny-write-image":{"identifier":"deny-write-image","description":"Denies the write_image command without any pre-configured scope.","commands":{"allow":[],"deny":["write_image"]}},"deny-write-text":{"identifier":"deny-write-text","description":"Denies the write_text command without any pre-configured scope.","commands":{"allow":[],"deny":["write_text"]}}},"permission_sets":{},"global_scope_schema":null},"core":{"default_permission":{"identifier":"default","description":"Default core plugins set.","permissions":["core:path:default","core:event:default","core:window:default","core:webview:default","core:app:default","core:image:default","core:resources:default","core:menu:default","core:tray:default"]},"permissions":{},"permission_sets":{},"global_scope_schema":null},"core:app":{"default_permission":{"identifier":"default","description":"Default permissions for the plugin.","permissions":["allow-version","allow-name","allow-tauri-version","allow-identifier","allow-bundle-type","allow-register-listener","allow-remove-listener"]},"permissions":{"allow-app-hide":{"identifier":"allow-app-hide","description":"Enables the app_hide command without any pre-configured scope.","commands":{"allow":["app_hide"],"deny":[]}},"allow-app-show":{"identifier":"allow-app-show","description":"Enables the app_show command without any pre-configured scope.","commands":{"allow":["app_show"],"deny":[]}},"allow-bundle-type":{"identifier":"allow-bundle-type","description":"Enables the bundle_type command without any pre-configured scope.","commands":{"allow":["bundle_type"],"deny":[]}},"allow-default-window-icon":{"identifier":"allow-default-window-icon","description":"Enables the default_window_icon command without any pre-configured scope.","commands":{"allow":["default_window_icon"],"deny":[]}},"allow-fetch-data-store-identifiers":{"identifier":"allow-fetch-data-store-identifiers","description":"Enables the fetch_data_store_identifiers command without any pre-configured scope.","commands":{"allow":["fetch_data_store_identifiers"],"deny":[]}},"allow-identifier":{"identifier":"allow-identifier","description":"Enables the identifier command without any pre-configured scope.","commands":{"allow":["identifier"],"deny":[]}},"allow-name":{"identifier":"allow-name","description":"Enables the name command without any pre-configured scope.","commands":{"allow":["name"],"deny":[]}},"allow-register-listener":{"identifier":"allow-register-listener","description":"Enables the register_listener command without any pre-configured scope.","commands":{"allow":["register_listener"],"deny":[]}},"allow-remove-data-store":{"identifier":"allow-remove-data-store","description":"Enables the remove_data_store command without any pre-configured scope.","commands":{"allow":["remove_data_store"],"deny":[]}},"allow-remove-listener":{"identifier":"allow-remove-listener","description":"Enables the remove_listener command without any pre-configured scope.","commands":{"allow":["remove_listener"],"deny":[]}},"allow-set-app-theme":{"identifier":"allow-set-app-theme","description":"Enables the set_app_theme command without any pre-configured scope.","commands":{"allow":["set_app_theme"],"deny":[]}},"allow-set-dock-visibility":{"identifier":"allow-set-dock-visibility","description":"Enables the set_dock_visibility command without any pre-configured scope.","commands":{"allow":["set_dock_visibility"],"deny":[]}},"allow-tauri-version":{"identifier":"allow-tauri-version","description":"Enables the tauri_version command without any pre-configured scope.","commands":{"allow":["tauri_version"],"deny":[]}},"allow-version":{"identifier":"allow-version","description":"Enables the version command without any pre-configured scope.","commands":{"allow":["version"],"deny":[]}},"deny-app-hide":{"identifier":"deny-app-hide","description":"Denies the app_hide command without any pre-configured scope.","commands":{"allow":[],"deny":["app_hide"]}},"deny-app-show":{"identifier":"deny-app-show","description":"Denies the app_show command without any pre-configured scope.","commands":{"allow":[],"deny":["app_show"]}},"deny-bundle-type":{"identifier":"deny-bundle-type","description":"Denies the bundle_type command without any pre-configured scope.","commands":{"allow":[],"deny":["bundle_type"]}},"deny-default-window-icon":{"identifier":"deny-default-window-icon","description":"Denies the default_window_icon command without any pre-configured scope.","commands":{"allow":[],"deny":["default_window_icon"]}},"deny-fetch-data-store-identifiers":{"identifier":"deny-fetch-data-store-identifiers","description":"Denies the fetch_data_store_identifiers command without any pre-configured scope.","commands":{"allow":[],"deny":["fetch_data_store_identifiers"]}},"deny-identifier":{"identifier":"deny-identifier","description":"Denies the identifier command without any pre-configured scope.","commands":{"allow":[],"deny":["identifier"]}},"deny-name":{"identifier":"deny-name","description":"Denies the name command without any pre-configured scope.","commands":{"allow":[],"deny":["name"]}},"deny-register-listener":{"identifier":"deny-register-listener","description":"Denies the register_listener command without any pre-configured scope.","commands":{"allow":[],"deny":["register_listener"]}},"deny-remove-data-store":{"identifier":"deny-remove-data-store","description":"Denies the remove_data_store command without any pre-configured scope.","commands":{"allow":[],"deny":["remove_data_store"]}},"deny-remove-listener":{"identifier":"deny-remove-listener","description":"Denies the remove_listener command without any pre-configured scope.","commands":{"allow":[],"deny":["remove_listener"]}},"deny-set-app-theme":{"identifier":"deny-set-app-theme","description":"Denies the set_app_theme command without any pre-configured scope.","commands":{"allow":[],"deny":["set_app_theme"]}},"deny-set-dock-visibility":{"identifier":"deny-set-dock-visibility","description":"Denies the set_dock_visibility command without any pre-configured scope.","commands":{"allow":[],"deny":["set_dock_visibility"]}},"deny-tauri-version":{"identifier":"deny-tauri-version","description":"Denies the tauri_version command without any pre-configured scope.","commands":{"allow":[],"deny":["tauri_version"]}},"deny-version":{"identifier":"deny-version","description":"Denies the version command without any pre-configured scope.","commands":{"allow":[],"deny":["version"]}}},"permission_sets":{},"global_scope_schema":null},"core:event":{"default_permission":{"identifier":"default","description":"Default permissions for the plugin, which enables all commands.","permissions":["allow-listen","allow-unlisten","allow-emit","allow-emit-to"]},"permissions":{"allow-emit":{"identifier":"allow-emit","description":"Enables the emit command without any pre-configured scope.","commands":{"allow":["emit"],"deny":[]}},"allow-emit-to":{"identifier":"allow-emit-to","description":"Enables the emit_to command without any pre-configured scope.","commands":{"allow":["emit_to"],"deny":[]}},"allow-listen":{"identifier":"allow-listen","description":"Enables the listen command without any pre-configured scope.","commands":{"allow":["listen"],"deny":[]}},"allow-unlisten":{"identifier":"allow-unlisten","description":"Enables the unlisten command without any pre-configured scope.","commands":{"allow":["unlisten"],"deny":[]}},"deny-emit":{"identifier":"deny-emit","description":"Denies the emit command without any pre-configured scope.","commands":{"allow":[],"deny":["emit"]}},"deny-emit-to":{"identifier":"deny-emit-to","description":"Denies the emit_to command without any pre-configured scope.","commands":{"allow":[],"deny":["emit_to"]}},"deny-listen":{"identifier":"deny-listen","description":"Denies the listen command without any pre-configured scope.","commands":{"allow":[],"deny":["listen"]}},"deny-unlisten":{"identifier":"deny-unlisten","description":"Denies the unlisten command without any pre-configured scope.","commands":{"allow":[],"deny":["unlisten"]}}},"permission_sets":{},"global_scope_schema":null},"core:image":{"default_permission":{"identifier":"default","description":"Default permissions for the plugin, which enables all commands.","permissions":["allow-new","allow-from-bytes","allow-from-path","allow-rgba","allow-size"]},"permissions":{"allow-from-bytes":{"identifier":"allow-from-bytes","description":"Enables the from_bytes command without any pre-configured scope.","commands":{"allow":["from_bytes"],"deny":[]}},"allow-from-path":{"identifier":"allow-from-path","description":"Enables the from_path command without any pre-configured scope.","commands":{"allow":["from_path"],"deny":[]}},"allow-new":{"identifier":"allow-new","description":"Enables the new command without any pre-configured scope.","commands":{"allow":["new"],"deny":[]}},"allow-rgba":{"identifier":"allow-rgba","description":"Enables the rgba command without any pre-configured scope.","commands":{"allow":["rgba"],"deny":[]}},"allow-size":{"identifier":"allow-size","description":"Enables the size command without any pre-configured scope.","commands":{"allow":["size"],"deny":[]}},"deny-from-bytes":{"identifier":"deny-from-bytes","description":"Denies the from_bytes command without any pre-configured scope.","commands":{"allow":[],"deny":["from_bytes"]}},"deny-from-path":{"identifier":"deny-from-path","description":"Denies the from_path command without any pre-configured scope.","commands":{"allow":[],"deny":["from_path"]}},"deny-new":{"identifier":"deny-new","description":"Denies the new command without any pre-configured scope.","commands":{"allow":[],"deny":["new"]}},"deny-rgba":{"identifier":"deny-rgba","description":"Denies the rgba command without any pre-configured scope.","commands":{"allow":[],"deny":["rgba"]}},"deny-size":{"identifier":"deny-size","description":"Denies the size command without any pre-configured scope.","commands":{"allow":[],"deny":["size"]}}},"permission_sets":{},"global_scope_schema":null},"core:menu":{"default_permission":{"identifier":"default","description":"Default permissions for the plugin, which enables all commands.","permissions":["allow-new","allow-append","allow-prepend","allow-insert","allow-remove","allow-remove-at","allow-items","allow-get","allow-popup","allow-create-default","allow-set-as-app-menu","allow-set-as-window-menu","allow-text","allow-set-text","allow-is-enabled","allow-set-enabled","allow-set-accelerator","allow-set-as-windows-menu-for-nsapp","allow-set-as-help-menu-for-nsapp","allow-is-checked","allow-set-checked","allow-set-icon"]},"permissions":{"allow-append":{"identifier":"allow-append","description":"Enables the append command without any pre-configured scope.","commands":{"allow":["append"],"deny":[]}},"allow-create-default":{"identifier":"allow-create-default","description":"Enables the create_default command without any pre-configured scope.","commands":{"allow":["create_default"],"deny":[]}},"allow-get":{"identifier":"allow-get","description":"Enables the get command without any pre-configured scope.","commands":{"allow":["get"],"deny":[]}},"allow-insert":{"identifier":"allow-insert","description":"Enables the insert command without any pre-configured scope.","commands":{"allow":["insert"],"deny":[]}},"allow-is-checked":{"identifier":"allow-is-checked","description":"Enables the is_checked command without any pre-configured scope.","commands":{"allow":["is_checked"],"deny":[]}},"allow-is-enabled":{"identifier":"allow-is-enabled","description":"Enables the is_enabled command without any pre-configured scope.","commands":{"allow":["is_enabled"],"deny":[]}},"allow-items":{"identifier":"allow-items","description":"Enables the items command without any pre-configured scope.","commands":{"allow":["items"],"deny":[]}},"allow-new":{"identifier":"allow-new","description":"Enables the new command without any pre-configured scope.","commands":{"allow":["new"],"deny":[]}},"allow-popup":{"identifier":"allow-popup","description":"Enables the popup command without any pre-configured scope.","commands":{"allow":["popup"],"deny":[]}},"allow-prepend":{"identifier":"allow-prepend","description":"Enables the prepend command without any pre-configured scope.","commands":{"allow":["prepend"],"deny":[]}},"allow-remove":{"identifier":"allow-remove","description":"Enables the remove command without any pre-configured scope.","commands":{"allow":["remove"],"deny":[]}},"allow-remove-at":{"identifier":"allow-remove-at","description":"Enables the remove_at command without any pre-configured scope.","commands":{"allow":["remove_at"],"deny":[]}},"allow-set-accelerator":{"identifier":"allow-set-accelerator","description":"Enables the set_accelerator command without any pre-configured scope.","commands":{"allow":["set_accelerator"],"deny":[]}},"allow-set-as-app-menu":{"identifier":"allow-set-as-app-menu","description":"Enables the set_as_app_menu command without any pre-configured scope.","commands":{"allow":["set_as_app_menu"],"deny":[]}},"allow-set-as-help-menu-for-nsapp":{"identifier":"allow-set-as-help-menu-for-nsapp","description":"Enables the set_as_help_menu_for_nsapp command without any pre-configured scope.","commands":{"allow":["set_as_help_menu_for_nsapp"],"deny":[]}},"allow-set-as-window-menu":{"identifier":"allow-set-as-window-menu","description":"Enables the set_as_window_menu command without any pre-configured scope.","commands":{"allow":["set_as_window_menu"],"deny":[]}},"allow-set-as-windows-menu-for-nsapp":{"identifier":"allow-set-as-windows-menu-for-nsapp","description":"Enables the set_as_windows_menu_for_nsapp command without any pre-configured scope.","commands":{"allow":["set_as_windows_menu_for_nsapp"],"deny":[]}},"allow-set-checked":{"identifier":"allow-set-checked","description":"Enables the set_checked command without any pre-configured scope.","commands":{"allow":["set_checked"],"deny":[]}},"allow-set-enabled":{"identifier":"allow-set-enabled","description":"Enables the set_enabled command without any pre-configured scope.","commands":{"allow":["set_enabled"],"deny":[]}},"allow-set-icon":{"identifier":"allow-set-icon","description":"Enables the set_icon command without any pre-configured scope.","commands":{"allow":["set_icon"],"deny":[]}},"allow-set-text":{"identifier":"allow-set-text","description":"Enables the set_text command without any pre-configured scope.","commands":{"allow":["set_text"],"deny":[]}},"allow-text":{"identifier":"allow-text","description":"Enables the text command without any pre-configured scope.","commands":{"allow":["text"],"deny":[]}},"deny-append":{"identifier":"deny-append","description":"Denies the append command without any pre-configured scope.","commands":{"allow":[],"deny":["append"]}},"deny-create-default":{"identifier":"deny-create-default","description":"Denies the create_default command without any pre-configured scope.","commands":{"allow":[],"deny":["create_default"]}},"deny-get":{"identifier":"deny-get","description":"Denies the get command without any pre-configured scope.","commands":{"allow":[],"deny":["get"]}},"deny-insert":{"identifier":"deny-insert","description":"Denies the insert command without any pre-configured scope.","commands":{"allow":[],"deny":["insert"]}},"deny-is-checked":{"identifier":"deny-is-checked","description":"Denies the is_checked command without any pre-configured scope.","commands":{"allow":[],"deny":["is_checked"]}},"deny-is-enabled":{"identifier":"deny-is-enabled","description":"Denies the is_enabled command without any pre-configured scope.","commands":{"allow":[],"deny":["is_enabled"]}},"deny-items":{"identifier":"deny-items","description":"Denies the items command without any pre-configured scope.","commands":{"allow":[],"deny":["items"]}},"deny-new":{"identifier":"deny-new","description":"Denies the new command without any pre-configured scope.","commands":{"allow":[],"deny":["new"]}},"deny-popup":{"identifier":"deny-popup","description":"Denies the popup command without any pre-configured scope.","commands":{"allow":[],"deny":["popup"]}},"deny-prepend":{"identifier":"deny-prepend","description":"Denies the prepend command without any pre-configured scope.","commands":{"allow":[],"deny":["prepend"]}},"deny-remove":{"identifier":"deny-remove","description":"Denies the remove command without any pre-configured scope.","commands":{"allow":[],"deny":["remove"]}},"deny-remove-at":{"identifier":"deny-remove-at","description":"Denies the remove_at command without any pre-configured scope.","commands":{"allow":[],"deny":["remove_at"]}},"deny-set-accelerator":{"identifier":"deny-set-accelerator","description":"Denies the set_accelerator command without any pre-configured scope.","commands":{"allow":[],"deny":["set_accelerator"]}},"deny-set-as-app-menu":{"identifier":"deny-set-as-app-menu","description":"Denies the set_as_app_menu command without any pre-configured scope.","commands":{"allow":[],"deny":["set_as_app_menu"]}},"deny-set-as-help-menu-for-nsapp":{"identifier":"deny-set-as-help-menu-for-nsapp","description":"Denies the set_as_help_menu_for_nsapp command without any pre-configured scope.","commands":{"allow":[],"deny":["set_as_help_menu_for_nsapp"]}},"deny-set-as-window-menu":{"identifier":"deny-set-as-window-menu","description":"Denies the set_as_window_menu command without any pre-configured scope.","commands":{"allow":[],"deny":["set_as_window_menu"]}},"deny-set-as-windows-menu-for-nsapp":{"identifier":"deny-set-as-windows-menu-for-nsapp","description":"Denies the set_as_windows_menu_for_nsapp command without any pre-configured scope.","commands":{"allow":[],"deny":["set_as_windows_menu_for_nsapp"]}},"deny-set-checked":{"identifier":"deny-set-checked","description":"Denies the set_checked command without any pre-configured scope.","commands":{"allow":[],"deny":["set_checked"]}},"deny-set-enabled":{"identifier":"deny-set-enabled","description":"Denies the set_enabled command without any pre-configured scope.","commands":{"allow":[],"deny":["set_enabled"]}},"deny-set-icon":{"identifier":"deny-set-icon","description":"Denies the set_icon command without any pre-configured scope.","commands":{"allow":[],"deny":["set_icon"]}},"deny-set-text":{"identifier":"deny-set-text","description":"Denies the set_text command without any pre-configured scope.","commands":{"allow":[],"deny":["set_text"]}},"deny-text":{"identifier":"deny-text","description":"Denies the text command without any pre-configured scope.","commands":{"allow":[],"deny":["text"]}}},"permission_sets":{},"global_scope_schema":null},"core:path":{"default_permission":{"identifier":"default","description":"Default permissions for the plugin, which enables all commands.","permissions":["allow-resolve-directory","allow-resolve","allow-normalize","allow-join","allow-dirname","allow-extname","allow-basename","allow-is-absolute"]},"permissions":{"allow-basename":{"identifier":"allow-basename","description":"Enables the basename command without any pre-configured scope.","commands":{"allow":["basename"],"deny":[]}},"allow-dirname":{"identifier":"allow-dirname","description":"Enables the dirname command without any pre-configured scope.","commands":{"allow":["dirname"],"deny":[]}},"allow-extname":{"identifier":"allow-extname","description":"Enables the extname command without any pre-configured scope.","commands":{"allow":["extname"],"deny":[]}},"allow-is-absolute":{"identifier":"allow-is-absolute","description":"Enables the is_absolute command without any pre-configured scope.","commands":{"allow":["is_absolute"],"deny":[]}},"allow-join":{"identifier":"allow-join","description":"Enables the join command without any pre-configured scope.","commands":{"allow":["join"],"deny":[]}},"allow-normalize":{"identifier":"allow-normalize","description":"Enables the normalize command without any pre-configured scope.","commands":{"allow":["normalize"],"deny":[]}},"allow-resolve":{"identifier":"allow-resolve","description":"Enables the resolve command without any pre-configured scope.","commands":{"allow":["resolve"],"deny":[]}},"allow-resolve-directory":{"identifier":"allow-resolve-directory","description":"Enables the resolve_directory command without any pre-configured scope.","commands":{"allow":["resolve_directory"],"deny":[]}},"deny-basename":{"identifier":"deny-basename","description":"Denies the basename command without any pre-configured scope.","commands":{"allow":[],"deny":["basename"]}},"deny-dirname":{"identifier":"deny-dirname","description":"Denies the dirname command without any pre-configured scope.","commands":{"allow":[],"deny":["dirname"]}},"deny-extname":{"identifier":"deny-extname","description":"Denies the extname command without any pre-configured scope.","commands":{"allow":[],"deny":["extname"]}},"deny-is-absolute":{"identifier":"deny-is-absolute","description":"Denies the is_absolute command without any pre-configured scope.","commands":{"allow":[],"deny":["is_absolute"]}},"deny-join":{"identifier":"deny-join","description":"Denies the join command without any pre-configured scope.","commands":{"allow":[],"deny":["join"]}},"deny-normalize":{"identifier":"deny-normalize","description":"Denies the normalize command without any pre-configured scope.","commands":{"allow":[],"deny":["normalize"]}},"deny-resolve":{"identifier":"deny-resolve","description":"Denies the resolve command without any pre-configured scope.","commands":{"allow":[],"deny":["resolve"]}},"deny-resolve-directory":{"identifier":"deny-resolve-directory","description":"Denies the resolve_directory command without any pre-configured scope.","commands":{"allow":[],"deny":["resolve_directory"]}}},"permission_sets":{},"global_scope_schema":null},"core:resources":{"default_permission":{"identifier":"default","description":"Default permissions for the plugin, which enables all commands.","permissions":["allow-close"]},"permissions":{"allow-close":{"identifier":"allow-close","description":"Enables the close command without any pre-configured scope.","commands":{"allow":["close"],"deny":[]}},"deny-close":{"identifier":"deny-close","description":"Denies the close command without any pre-configured scope.","commands":{"allow":[],"deny":["close"]}}},"permission_sets":{},"global_scope_schema":null},"core:tray":{"default_permission":{"identifier":"default","description":"Default permissions for the plugin, which enables all commands.","permissions":["allow-new","allow-get-by-id","allow-remove-by-id","allow-set-icon","allow-set-menu","allow-set-tooltip","allow-set-title","allow-set-visible","allow-set-temp-dir-path","allow-set-icon-as-template","allow-set-show-menu-on-left-click"]},"permissions":{"allow-get-by-id":{"identifier":"allow-get-by-id","description":"Enables the get_by_id command without any pre-configured scope.","commands":{"allow":["get_by_id"],"deny":[]}},"allow-new":{"identifier":"allow-new","description":"Enables the new command without any pre-configured scope.","commands":{"allow":["new"],"deny":[]}},"allow-remove-by-id":{"identifier":"allow-remove-by-id","description":"Enables the remove_by_id command without any pre-configured scope.","commands":{"allow":["remove_by_id"],"deny":[]}},"allow-set-icon":{"identifier":"allow-set-icon","description":"Enables the set_icon command without any pre-configured scope.","commands":{"allow":["set_icon"],"deny":[]}},"allow-set-icon-as-template":{"identifier":"allow-set-icon-as-template","description":"Enables the set_icon_as_template command without any pre-configured scope.","commands":{"allow":["set_icon_as_template"],"deny":[]}},"allow-set-menu":{"identifier":"allow-set-menu","description":"Enables the set_menu command without any pre-configured scope.","commands":{"allow":["set_menu"],"deny":[]}},"allow-set-show-menu-on-left-click":{"identifier":"allow-set-show-menu-on-left-click","description":"Enables the set_show_menu_on_left_click command without any pre-configured scope.","commands":{"allow":["set_show_menu_on_left_click"],"deny":[]}},"allow-set-temp-dir-path":{"identifier":"allow-set-temp-dir-path","description":"Enables the set_temp_dir_path command without any pre-configured scope.","commands":{"allow":["set_temp_dir_path"],"deny":[]}},"allow-set-title":{"identifier":"allow-set-title","description":"Enables the set_title command without any pre-configured scope.","commands":{"allow":["set_title"],"deny":[]}},"allow-set-tooltip":{"identifier":"allow-set-tooltip","description":"Enables the set_tooltip command without any pre-configured scope.","commands":{"allow":["set_tooltip"],"deny":[]}},"allow-set-visible":{"identifier":"allow-set-visible","description":"Enables the set_visible command without any pre-configured scope.","commands":{"allow":["set_visible"],"deny":[]}},"deny-get-by-id":{"identifier":"deny-get-by-id","description":"Denies the get_by_id command without any pre-configured scope.","commands":{"allow":[],"deny":["get_by_id"]}},"deny-new":{"identifier":"deny-new","description":"Denies the new command without any pre-configured scope.","commands":{"allow":[],"deny":["new"]}},"deny-remove-by-id":{"identifier":"deny-remove-by-id","description":"Denies the remove_by_id command without any pre-configured scope.","commands":{"allow":[],"deny":["remove_by_id"]}},"deny-set-icon":{"identifier":"deny-set-icon","description":"Denies the set_icon command without any pre-configured scope.","commands":{"allow":[],"deny":["set_icon"]}},"deny-set-icon-as-template":{"identifier":"deny-set-icon-as-template","description":"Denies the set_icon_as_template command without any pre-configured scope.","commands":{"allow":[],"deny":["set_icon_as_template"]}},"deny-set-menu":{"identifier":"deny-set-menu","description":"Denies the set_menu command without any pre-configured scope.","commands":{"allow":[],"deny":["set_menu"]}},"deny-set-show-menu-on-left-click":{"identifier":"deny-set-show-menu-on-left-click","description":"Denies the set_show_menu_on_left_click command without any pre-configured scope.","commands":{"allow":[],"deny":["set_show_menu_on_left_click"]}},"deny-set-temp-dir-path":{"identifier":"deny-set-temp-dir-path","description":"Denies the set_temp_dir_path command without any pre-configured scope.","commands":{"allow":[],"deny":["set_temp_dir_path"]}},"deny-set-title":{"identifier":"deny-set-title","description":"Denies the set_title command without any pre-configured scope.","commands":{"allow":[],"deny":["set_title"]}},"deny-set-tooltip":{"identifier":"deny-set-tooltip","description":"Denies the set_tooltip command without any pre-configured scope.","commands":{"allow":[],"deny":["set_tooltip"]}},"deny-set-visible":{"identifier":"deny-set-visible","description":"Denies the set_visible command without any pre-configured scope.","commands":{"allow":[],"deny":["set_visible"]}}},"permission_sets":{},"global_scope_schema":null},"core:webview":{"default_permission":{"identifier":"default","description":"Default permissions for the plugin.","permissions":["allow-get-all-webviews","allow-webview-position","allow-webview-size","allow-internal-toggle-devtools"]},"permissions":{"allow-clear-all-browsing-data":{"identifier":"allow-clear-all-browsing-data","description":"Enables the clear_all_browsing_data command without any pre-configured scope.","commands":{"allow":["clear_all_browsing_data"],"deny":[]}},"allow-create-webview":{"identifier":"allow-create-webview","description":"Enables the create_webview command without any pre-configured scope.","commands":{"allow":["create_webview"],"deny":[]}},"allow-create-webview-window":{"identifier":"allow-create-webview-window","description":"Enables the create_webview_window command without any pre-configured scope.","commands":{"allow":["create_webview_window"],"deny":[]}},"allow-get-all-webviews":{"identifier":"allow-get-all-webviews","description":"Enables the get_all_webviews command without any pre-configured scope.","commands":{"allow":["get_all_webviews"],"deny":[]}},"allow-internal-toggle-devtools":{"identifier":"allow-internal-toggle-devtools","description":"Enables the internal_toggle_devtools command without any pre-configured scope.","commands":{"allow":["internal_toggle_devtools"],"deny":[]}},"allow-print":{"identifier":"allow-print","description":"Enables the print command without any pre-configured scope.","commands":{"allow":["print"],"deny":[]}},"allow-reparent":{"identifier":"allow-reparent","description":"Enables the reparent command without any pre-configured scope.","commands":{"allow":["reparent"],"deny":[]}},"allow-set-webview-auto-resize":{"identifier":"allow-set-webview-auto-resize","description":"Enables the set_webview_auto_resize command without any pre-configured scope.","commands":{"allow":["set_webview_auto_resize"],"deny":[]}},"allow-set-webview-background-color":{"identifier":"allow-set-webview-background-color","description":"Enables the set_webview_background_color command without any pre-configured scope.","commands":{"allow":["set_webview_background_color"],"deny":[]}},"allow-set-webview-focus":{"identifier":"allow-set-webview-focus","description":"Enables the set_webview_focus command without any pre-configured scope.","commands":{"allow":["set_webview_focus"],"deny":[]}},"allow-set-webview-position":{"identifier":"allow-set-webview-position","description":"Enables the set_webview_position command without any pre-configured scope.","commands":{"allow":["set_webview_position"],"deny":[]}},"allow-set-webview-size":{"identifier":"allow-set-webview-size","description":"Enables the set_webview_size command without any pre-configured scope.","commands":{"allow":["set_webview_size"],"deny":[]}},"allow-set-webview-zoom":{"identifier":"allow-set-webview-zoom","description":"Enables the set_webview_zoom command without any pre-configured scope.","commands":{"allow":["set_webview_zoom"],"deny":[]}},"allow-webview-close":{"identifier":"allow-webview-close","description":"Enables the webview_close command without any pre-configured scope.","commands":{"allow":["webview_close"],"deny":[]}},"allow-webview-hide":{"identifier":"allow-webview-hide","description":"Enables the webview_hide command without any pre-configured scope.","commands":{"allow":["webview_hide"],"deny":[]}},"allow-webview-position":{"identifier":"allow-webview-position","description":"Enables the webview_position command without any pre-configured scope.","commands":{"allow":["webview_position"],"deny":[]}},"allow-webview-show":{"identifier":"allow-webview-show","description":"Enables the webview_show command without any pre-configured scope.","commands":{"allow":["webview_show"],"deny":[]}},"allow-webview-size":{"identifier":"allow-webview-size","description":"Enables the webview_size command without any pre-configured scope.","commands":{"allow":["webview_size"],"deny":[]}},"deny-clear-all-browsing-data":{"identifier":"deny-clear-all-browsing-data","description":"Denies the clear_all_browsing_data command without any pre-configured scope.","commands":{"allow":[],"deny":["clear_all_browsing_data"]}},"deny-create-webview":{"identifier":"deny-create-webview","description":"Denies the create_webview command without any pre-configured scope.","commands":{"allow":[],"deny":["create_webview"]}},"deny-create-webview-window":{"identifier":"deny-create-webview-window","description":"Denies the create_webview_window command without any pre-configured scope.","commands":{"allow":[],"deny":["create_webview_window"]}},"deny-get-all-webviews":{"identifier":"deny-get-all-webviews","description":"Denies the get_all_webviews command without any pre-configured scope.","commands":{"allow":[],"deny":["get_all_webviews"]}},"deny-internal-toggle-devtools":{"identifier":"deny-internal-toggle-devtools","description":"Denies the internal_toggle_devtools command without any pre-configured scope.","commands":{"allow":[],"deny":["internal_toggle_devtools"]}},"deny-print":{"identifier":"deny-print","description":"Denies the print command without any pre-configured scope.","commands":{"allow":[],"deny":["print"]}},"deny-reparent":{"identifier":"deny-reparent","description":"Denies the reparent command without any pre-configured scope.","commands":{"allow":[],"deny":["reparent"]}},"deny-set-webview-auto-resize":{"identifier":"deny-set-webview-auto-resize","description":"Denies the set_webview_auto_resize command without any pre-configured scope.","commands":{"allow":[],"deny":["set_webview_auto_resize"]}},"deny-set-webview-background-color":{"identifier":"deny-set-webview-background-color","description":"Denies the set_webview_background_color command without any pre-configured scope.","commands":{"allow":[],"deny":["set_webview_background_color"]}},"deny-set-webview-focus":{"identifier":"deny-set-webview-focus","description":"Denies the set_webview_focus command without any pre-configured scope.","commands":{"allow":[],"deny":["set_webview_focus"]}},"deny-set-webview-position":{"identifier":"deny-set-webview-position","description":"Denies the set_webview_position command without any pre-configured scope.","commands":{"allow":[],"deny":["set_webview_position"]}},"deny-set-webview-size":{"identifier":"deny-set-webview-size","description":"Denies the set_webview_size command without any pre-configured scope.","commands":{"allow":[],"deny":["set_webview_size"]}},"deny-set-webview-zoom":{"identifier":"deny-set-webview-zoom","description":"Denies the set_webview_zoom command without any pre-configured scope.","commands":{"allow":[],"deny":["set_webview_zoom"]}},"deny-webview-close":{"identifier":"deny-webview-close","description":"Denies the webview_close command without any pre-configured scope.","commands":{"allow":[],"deny":["webview_close"]}},"deny-webview-hide":{"identifier":"deny-webview-hide","description":"Denies the webview_hide command without any pre-configured scope.","commands":{"allow":[],"deny":["webview_hide"]}},"deny-webview-position":{"identifier":"deny-webview-position","description":"Denies the webview_position command without any pre-configured scope.","commands":{"allow":[],"deny":["webview_position"]}},"deny-webview-show":{"identifier":"deny-webview-show","description":"Denies the webview_show command without any pre-configured scope.","commands":{"allow":[],"deny":["webview_show"]}},"deny-webview-size":{"identifier":"deny-webview-size","description":"Denies the webview_size command without any pre-configured scope.","commands":{"allow":[],"deny":["webview_size"]}}},"permission_sets":{},"global_scope_schema":null},"core:window":{"default_permission":{"identifier":"default","description":"Default permissions for the plugin.","permissions":["allow-get-all-windows","allow-scale-factor","allow-inner-position","allow-outer-position","allow-inner-size","allow-outer-size","allow-is-fullscreen","allow-is-minimized","allow-is-maximized","allow-is-focused","allow-is-decorated","allow-is-resizable","allow-is-maximizable","allow-is-minimizable","allow-is-closable","allow-is-visible","allow-is-enabled","allow-title","allow-current-monitor","allow-primary-monitor","allow-monitor-from-point","allow-available-monitors","allow-cursor-position","allow-theme","allow-is-always-on-top","allow-internal-toggle-maximize"]},"permissions":{"allow-available-monitors":{"identifier":"allow-available-monitors","description":"Enables the available_monitors command without any pre-configured scope.","commands":{"allow":["available_monitors"],"deny":[]}},"allow-center":{"identifier":"allow-center","description":"Enables the center command without any pre-configured scope.","commands":{"allow":["center"],"deny":[]}},"allow-close":{"identifier":"allow-close","description":"Enables the close command without any pre-configured scope.","commands":{"allow":["close"],"deny":[]}},"allow-create":{"identifier":"allow-create","description":"Enables the create command without any pre-configured scope.","commands":{"allow":["create"],"deny":[]}},"allow-current-monitor":{"identifier":"allow-current-monitor","description":"Enables the current_monitor command without any pre-configured scope.","commands":{"allow":["current_monitor"],"deny":[]}},"allow-cursor-position":{"identifier":"allow-cursor-position","description":"Enables the cursor_position command without any pre-configured scope.","commands":{"allow":["cursor_position"],"deny":[]}},"allow-destroy":{"identifier":"allow-destroy","description":"Enables the destroy command without any pre-configured scope.","commands":{"allow":["destroy"],"deny":[]}},"allow-get-all-windows":{"identifier":"allow-get-all-windows","description":"Enables the get_all_windows command without any pre-configured scope.","commands":{"allow":["get_all_windows"],"deny":[]}},"allow-hide":{"identifier":"allow-hide","description":"Enables the hide command without any pre-configured scope.","commands":{"allow":["hide"],"deny":[]}},"allow-inner-position":{"identifier":"allow-inner-position","description":"Enables the inner_position command without any pre-configured scope.","commands":{"allow":["inner_position"],"deny":[]}},"allow-inner-size":{"identifier":"allow-inner-size","description":"Enables the inner_size command without any pre-configured scope.","commands":{"allow":["inner_size"],"deny":[]}},"allow-internal-toggle-maximize":{"identifier":"allow-internal-toggle-maximize","description":"Enables the internal_toggle_maximize command without any pre-configured scope.","commands":{"allow":["internal_toggle_maximize"],"deny":[]}},"allow-is-always-on-top":{"identifier":"allow-is-always-on-top","description":"Enables the is_always_on_top command without any pre-configured scope.","commands":{"allow":["is_always_on_top"],"deny":[]}},"allow-is-closable":{"identifier":"allow-is-closable","description":"Enables the is_closable command without any pre-configured scope.","commands":{"allow":["is_closable"],"deny":[]}},"allow-is-decorated":{"identifier":"allow-is-decorated","description":"Enables the is_decorated command without any pre-configured scope.","commands":{"allow":["is_decorated"],"deny":[]}},"allow-is-enabled":{"identifier":"allow-is-enabled","description":"Enables the is_enabled command without any pre-configured scope.","commands":{"allow":["is_enabled"],"deny":[]}},"allow-is-focused":{"identifier":"allow-is-focused","description":"Enables the is_focused command without any pre-configured scope.","commands":{"allow":["is_focused"],"deny":[]}},"allow-is-fullscreen":{"identifier":"allow-is-fullscreen","description":"Enables the is_fullscreen command without any pre-configured scope.","commands":{"allow":["is_fullscreen"],"deny":[]}},"allow-is-maximizable":{"identifier":"allow-is-maximizable","description":"Enables the is_maximizable command without any pre-configured scope.","commands":{"allow":["is_maximizable"],"deny":[]}},"allow-is-maximized":{"identifier":"allow-is-maximized","description":"Enables the is_maximized command without any pre-configured scope.","commands":{"allow":["is_maximized"],"deny":[]}},"allow-is-minimizable":{"identifier":"allow-is-minimizable","description":"Enables the is_minimizable command without any pre-configured scope.","commands":{"allow":["is_minimizable"],"deny":[]}},"allow-is-minimized":{"identifier":"allow-is-minimized","description":"Enables the is_minimized command without any pre-configured scope.","commands":{"allow":["is_minimized"],"deny":[]}},"allow-is-resizable":{"identifier":"allow-is-resizable","description":"Enables the is_resizable command without any pre-configured scope.","commands":{"allow":["is_resizable"],"deny":[]}},"allow-is-visible":{"identifier":"allow-is-visible","description":"Enables the is_visible command without any pre-configured scope.","commands":{"allow":["is_visible"],"deny":[]}},"allow-maximize":{"identifier":"allow-maximize","description":"Enables the maximize command without any pre-configured scope.","commands":{"allow":["maximize"],"deny":[]}},"allow-minimize":{"identifier":"allow-minimize","description":"Enables the minimize command without any pre-configured scope.","commands":{"allow":["minimize"],"deny":[]}},"allow-monitor-from-point":{"identifier":"allow-monitor-from-point","description":"Enables the monitor_from_point command without any pre-configured scope.","commands":{"allow":["monitor_from_point"],"deny":[]}},"allow-outer-position":{"identifier":"allow-outer-position","description":"Enables the outer_position command without any pre-configured scope.","commands":{"allow":["outer_position"],"deny":[]}},"allow-outer-size":{"identifier":"allow-outer-size","description":"Enables the outer_size command without any pre-configured scope.","commands":{"allow":["outer_size"],"deny":[]}},"allow-primary-monitor":{"identifier":"allow-primary-monitor","description":"Enables the primary_monitor command without any pre-configured scope.","commands":{"allow":["primary_monitor"],"deny":[]}},"allow-request-user-attention":{"identifier":"allow-request-user-attention","description":"Enables the request_user_attention command without any pre-configured scope.","commands":{"allow":["request_user_attention"],"deny":[]}},"allow-scale-factor":{"identifier":"allow-scale-factor","description":"Enables the scale_factor command without any pre-configured scope.","commands":{"allow":["scale_factor"],"deny":[]}},"allow-set-always-on-bottom":{"identifier":"allow-set-always-on-bottom","description":"Enables the set_always_on_bottom command without any pre-configured scope.","commands":{"allow":["set_always_on_bottom"],"deny":[]}},"allow-set-always-on-top":{"identifier":"allow-set-always-on-top","description":"Enables the set_always_on_top command without any pre-configured scope.","commands":{"allow":["set_always_on_top"],"deny":[]}},"allow-set-background-color":{"identifier":"allow-set-background-color","description":"Enables the set_background_color command without any pre-configured scope.","commands":{"allow":["set_background_color"],"deny":[]}},"allow-set-badge-count":{"identifier":"allow-set-badge-count","description":"Enables the set_badge_count command without any pre-configured scope.","commands":{"allow":["set_badge_count"],"deny":[]}},"allow-set-badge-label":{"identifier":"allow-set-badge-label","description":"Enables the set_badge_label command without any pre-configured scope.","commands":{"allow":["set_badge_label"],"deny":[]}},"allow-set-closable":{"identifier":"allow-set-closable","description":"Enables the set_closable command without any pre-configured scope.","commands":{"allow":["set_closable"],"deny":[]}},"allow-set-content-protected":{"identifier":"allow-set-content-protected","description":"Enables the set_content_protected command without any pre-configured scope.","commands":{"allow":["set_content_protected"],"deny":[]}},"allow-set-cursor-grab":{"identifier":"allow-set-cursor-grab","description":"Enables the set_cursor_grab command without any pre-configured scope.","commands":{"allow":["set_cursor_grab"],"deny":[]}},"allow-set-cursor-icon":{"identifier":"allow-set-cursor-icon","description":"Enables the set_cursor_icon command without any pre-configured scope.","commands":{"allow":["set_cursor_icon"],"deny":[]}},"allow-set-cursor-position":{"identifier":"allow-set-cursor-position","description":"Enables the set_cursor_position command without any pre-configured scope.","commands":{"allow":["set_cursor_position"],"deny":[]}},"allow-set-cursor-visible":{"identifier":"allow-set-cursor-visible","description":"Enables the set_cursor_visible command without any pre-configured scope.","commands":{"allow":["set_cursor_visible"],"deny":[]}},"allow-set-decorations":{"identifier":"allow-set-decorations","description":"Enables the set_decorations command without any pre-configured scope.","commands":{"allow":["set_decorations"],"deny":[]}},"allow-set-effects":{"identifier":"allow-set-effects","description":"Enables the set_effects command without any pre-configured scope.","commands":{"allow":["set_effects"],"deny":[]}},"allow-set-enabled":{"identifier":"allow-set-enabled","description":"Enables the set_enabled command without any pre-configured scope.","commands":{"allow":["set_enabled"],"deny":[]}},"allow-set-focus":{"identifier":"allow-set-focus","description":"Enables the set_focus command without any pre-configured scope.","commands":{"allow":["set_focus"],"deny":[]}},"allow-set-focusable":{"identifier":"allow-set-focusable","description":"Enables the set_focusable command without any pre-configured scope.","commands":{"allow":["set_focusable"],"deny":[]}},"allow-set-fullscreen":{"identifier":"allow-set-fullscreen","description":"Enables the set_fullscreen command without any pre-configured scope.","commands":{"allow":["set_fullscreen"],"deny":[]}},"allow-set-icon":{"identifier":"allow-set-icon","description":"Enables the set_icon command without any pre-configured scope.","commands":{"allow":["set_icon"],"deny":[]}},"allow-set-ignore-cursor-events":{"identifier":"allow-set-ignore-cursor-events","description":"Enables the set_ignore_cursor_events command without any pre-configured scope.","commands":{"allow":["set_ignore_cursor_events"],"deny":[]}},"allow-set-max-size":{"identifier":"allow-set-max-size","description":"Enables the set_max_size command without any pre-configured scope.","commands":{"allow":["set_max_size"],"deny":[]}},"allow-set-maximizable":{"identifier":"allow-set-maximizable","description":"Enables the set_maximizable command without any pre-configured scope.","commands":{"allow":["set_maximizable"],"deny":[]}},"allow-set-min-size":{"identifier":"allow-set-min-size","description":"Enables the set_min_size command without any pre-configured scope.","commands":{"allow":["set_min_size"],"deny":[]}},"allow-set-minimizable":{"identifier":"allow-set-minimizable","description":"Enables the set_minimizable command without any pre-configured scope.","commands":{"allow":["set_minimizable"],"deny":[]}},"allow-set-overlay-icon":{"identifier":"allow-set-overlay-icon","description":"Enables the set_overlay_icon command without any pre-configured scope.","commands":{"allow":["set_overlay_icon"],"deny":[]}},"allow-set-position":{"identifier":"allow-set-position","description":"Enables the set_position command without any pre-configured scope.","commands":{"allow":["set_position"],"deny":[]}},"allow-set-progress-bar":{"identifier":"allow-set-progress-bar","description":"Enables the set_progress_bar command without any pre-configured scope.","commands":{"allow":["set_progress_bar"],"deny":[]}},"allow-set-resizable":{"identifier":"allow-set-resizable","description":"Enables the set_resizable command without any pre-configured scope.","commands":{"allow":["set_resizable"],"deny":[]}},"allow-set-shadow":{"identifier":"allow-set-shadow","description":"Enables the set_shadow command without any pre-configured scope.","commands":{"allow":["set_shadow"],"deny":[]}},"allow-set-simple-fullscreen":{"identifier":"allow-set-simple-fullscreen","description":"Enables the set_simple_fullscreen command without any pre-configured scope.","commands":{"allow":["set_simple_fullscreen"],"deny":[]}},"allow-set-size":{"identifier":"allow-set-size","description":"Enables the set_size command without any pre-configured scope.","commands":{"allow":["set_size"],"deny":[]}},"allow-set-size-constraints":{"identifier":"allow-set-size-constraints","description":"Enables the set_size_constraints command without any pre-configured scope.","commands":{"allow":["set_size_constraints"],"deny":[]}},"allow-set-skip-taskbar":{"identifier":"allow-set-skip-taskbar","description":"Enables the set_skip_taskbar command without any pre-configured scope.","commands":{"allow":["set_skip_taskbar"],"deny":[]}},"allow-set-theme":{"identifier":"allow-set-theme","description":"Enables the set_theme command without any pre-configured scope.","commands":{"allow":["set_theme"],"deny":[]}},"allow-set-title":{"identifier":"allow-set-title","description":"Enables the set_title command without any pre-configured scope.","commands":{"allow":["set_title"],"deny":[]}},"allow-set-title-bar-style":{"identifier":"allow-set-title-bar-style","description":"Enables the set_title_bar_style command without any pre-configured scope.","commands":{"allow":["set_title_bar_style"],"deny":[]}},"allow-set-visible-on-all-workspaces":{"identifier":"allow-set-visible-on-all-workspaces","description":"Enables the set_visible_on_all_workspaces command without any pre-configured scope.","commands":{"allow":["set_visible_on_all_workspaces"],"deny":[]}},"allow-show":{"identifier":"allow-show","description":"Enables the show command without any pre-configured scope.","commands":{"allow":["show"],"deny":[]}},"allow-start-dragging":{"identifier":"allow-start-dragging","description":"Enables the start_dragging command without any pre-configured scope.","commands":{"allow":["start_dragging"],"deny":[]}},"allow-start-resize-dragging":{"identifier":"allow-start-resize-dragging","description":"Enables the start_resize_dragging command without any pre-configured scope.","commands":{"allow":["start_resize_dragging"],"deny":[]}},"allow-theme":{"identifier":"allow-theme","description":"Enables the theme command without any pre-configured scope.","commands":{"allow":["theme"],"deny":[]}},"allow-title":{"identifier":"allow-title","description":"Enables the title command without any pre-configured scope.","commands":{"allow":["title"],"deny":[]}},"allow-toggle-maximize":{"identifier":"allow-toggle-maximize","description":"Enables the toggle_maximize command without any pre-configured scope.","commands":{"allow":["toggle_maximize"],"deny":[]}},"allow-unmaximize":{"identifier":"allow-unmaximize","description":"Enables the unmaximize command without any pre-configured scope.","commands":{"allow":["unmaximize"],"deny":[]}},"allow-unminimize":{"identifier":"allow-unminimize","description":"Enables the unminimize command without any pre-configured scope.","commands":{"allow":["unminimize"],"deny":[]}},"deny-available-monitors":{"identifier":"deny-available-monitors","description":"Denies the available_monitors command without any pre-configured scope.","commands":{"allow":[],"deny":["available_monitors"]}},"deny-center":{"identifier":"deny-center","description":"Denies the center command without any pre-configured scope.","commands":{"allow":[],"deny":["center"]}},"deny-close":{"identifier":"deny-close","description":"Denies the close command without any pre-configured scope.","commands":{"allow":[],"deny":["close"]}},"deny-create":{"identifier":"deny-create","description":"Denies the create command without any pre-configured scope.","commands":{"allow":[],"deny":["create"]}},"deny-current-monitor":{"identifier":"deny-current-monitor","description":"Denies the current_monitor command without any pre-configured scope.","commands":{"allow":[],"deny":["current_monitor"]}},"deny-cursor-position":{"identifier":"deny-cursor-position","description":"Denies the cursor_position command without any pre-configured scope.","commands":{"allow":[],"deny":["cursor_position"]}},"deny-destroy":{"identifier":"deny-destroy","description":"Denies the destroy command without any pre-configured scope.","commands":{"allow":[],"deny":["destroy"]}},"deny-get-all-windows":{"identifier":"deny-get-all-windows","description":"Denies the get_all_windows command without any pre-configured scope.","commands":{"allow":[],"deny":["get_all_windows"]}},"deny-hide":{"identifier":"deny-hide","description":"Denies the hide command without any pre-configured scope.","commands":{"allow":[],"deny":["hide"]}},"deny-inner-position":{"identifier":"deny-inner-position","description":"Denies the inner_position command without any pre-configured scope.","commands":{"allow":[],"deny":["inner_position"]}},"deny-inner-size":{"identifier":"deny-inner-size","description":"Denies the inner_size command without any pre-configured scope.","commands":{"allow":[],"deny":["inner_size"]}},"deny-internal-toggle-maximize":{"identifier":"deny-internal-toggle-maximize","description":"Denies the internal_toggle_maximize command without any pre-configured scope.","commands":{"allow":[],"deny":["internal_toggle_maximize"]}},"deny-is-always-on-top":{"identifier":"deny-is-always-on-top","description":"Denies the is_always_on_top command without any pre-configured scope.","commands":{"allow":[],"deny":["is_always_on_top"]}},"deny-is-closable":{"identifier":"deny-is-closable","description":"Denies the is_closable command without any pre-configured scope.","commands":{"allow":[],"deny":["is_closable"]}},"deny-is-decorated":{"identifier":"deny-is-decorated","description":"Denies the is_decorated command without any pre-configured scope.","commands":{"allow":[],"deny":["is_decorated"]}},"deny-is-enabled":{"identifier":"deny-is-enabled","description":"Denies the is_enabled command without any pre-configured scope.","commands":{"allow":[],"deny":["is_enabled"]}},"deny-is-focused":{"identifier":"deny-is-focused","description":"Denies the is_focused command without any pre-configured scope.","commands":{"allow":[],"deny":["is_focused"]}},"deny-is-fullscreen":{"identifier":"deny-is-fullscreen","description":"Denies the is_fullscreen command without any pre-configured scope.","commands":{"allow":[],"deny":["is_fullscreen"]}},"deny-is-maximizable":{"identifier":"deny-is-maximizable","description":"Denies the is_maximizable command without any pre-configured scope.","commands":{"allow":[],"deny":["is_maximizable"]}},"deny-is-maximized":{"identifier":"deny-is-maximized","description":"Denies the is_maximized command without any pre-configured scope.","commands":{"allow":[],"deny":["is_maximized"]}},"deny-is-minimizable":{"identifier":"deny-is-minimizable","description":"Denies the is_minimizable command without any pre-configured scope.","commands":{"allow":[],"deny":["is_minimizable"]}},"deny-is-minimized":{"identifier":"deny-is-minimized","description":"Denies the is_minimized command without any pre-configured scope.","commands":{"allow":[],"deny":["is_minimized"]}},"deny-is-resizable":{"identifier":"deny-is-resizable","description":"Denies the is_resizable command without any pre-configured scope.","commands":{"allow":[],"deny":["is_resizable"]}},"deny-is-visible":{"identifier":"deny-is-visible","description":"Denies the is_visible command without any pre-configured scope.","commands":{"allow":[],"deny":["is_visible"]}},"deny-maximize":{"identifier":"deny-maximize","description":"Denies the maximize command without any pre-configured scope.","commands":{"allow":[],"deny":["maximize"]}},"deny-minimize":{"identifier":"deny-minimize","description":"Denies the minimize command without any pre-configured scope.","commands":{"allow":[],"deny":["minimize"]}},"deny-monitor-from-point":{"identifier":"deny-monitor-from-point","description":"Denies the monitor_from_point command without any pre-configured scope.","commands":{"allow":[],"deny":["monitor_from_point"]}},"deny-outer-position":{"identifier":"deny-outer-position","description":"Denies the outer_position command without any pre-configured scope.","commands":{"allow":[],"deny":["outer_position"]}},"deny-outer-size":{"identifier":"deny-outer-size","description":"Denies the outer_size command without any pre-configured scope.","commands":{"allow":[],"deny":["outer_size"]}},"deny-primary-monitor":{"identifier":"deny-primary-monitor","description":"Denies the primary_monitor command without any pre-configured scope.","commands":{"allow":[],"deny":["primary_monitor"]}},"deny-request-user-attention":{"identifier":"deny-request-user-attention","description":"Denies the request_user_attention command without any pre-configured scope.","commands":{"allow":[],"deny":["request_user_attention"]}},"deny-scale-factor":{"identifier":"deny-scale-factor","description":"Denies the scale_factor command without any pre-configured scope.","commands":{"allow":[],"deny":["scale_factor"]}},"deny-set-always-on-bottom":{"identifier":"deny-set-always-on-bottom","description":"Denies the set_always_on_bottom command without any pre-configured scope.","commands":{"allow":[],"deny":["set_always_on_bottom"]}},"deny-set-always-on-top":{"identifier":"deny-set-always-on-top","description":"Denies the set_always_on_top command without any pre-configured scope.","commands":{"allow":[],"deny":["set_always_on_top"]}},"deny-set-background-color":{"identifier":"deny-set-background-color","description":"Denies the set_background_color command without any pre-configured scope.","commands":{"allow":[],"deny":["set_background_color"]}},"deny-set-badge-count":{"identifier":"deny-set-badge-count","description":"Denies the set_badge_count command without any pre-configured scope.","commands":{"allow":[],"deny":["set_badge_count"]}},"deny-set-badge-label":{"identifier":"deny-set-badge-label","description":"Denies the set_badge_label command without any pre-configured scope.","commands":{"allow":[],"deny":["set_badge_label"]}},"deny-set-closable":{"identifier":"deny-set-closable","description":"Denies the set_closable command without any pre-configured scope.","commands":{"allow":[],"deny":["set_closable"]}},"deny-set-content-protected":{"identifier":"deny-set-content-protected","description":"Denies the set_content_protected command without any pre-configured scope.","commands":{"allow":[],"deny":["set_content_protected"]}},"deny-set-cursor-grab":{"identifier":"deny-set-cursor-grab","description":"Denies the set_cursor_grab command without any pre-configured scope.","commands":{"allow":[],"deny":["set_cursor_grab"]}},"deny-set-cursor-icon":{"identifier":"deny-set-cursor-icon","description":"Denies the set_cursor_icon command without any pre-configured scope.","commands":{"allow":[],"deny":["set_cursor_icon"]}},"deny-set-cursor-position":{"identifier":"deny-set-cursor-position","description":"Denies the set_cursor_position command without any pre-configured scope.","commands":{"allow":[],"deny":["set_cursor_position"]}},"deny-set-cursor-visible":{"identifier":"deny-set-cursor-visible","description":"Denies the set_cursor_visible command without any pre-configured scope.","commands":{"allow":[],"deny":["set_cursor_visible"]}},"deny-set-decorations":{"identifier":"deny-set-decorations","description":"Denies the set_decorations command without any pre-configured scope.","commands":{"allow":[],"deny":["set_decorations"]}},"deny-set-effects":{"identifier":"deny-set-effects","description":"Denies the set_effects command without any pre-configured scope.","commands":{"allow":[],"deny":["set_effects"]}},"deny-set-enabled":{"identifier":"deny-set-enabled","description":"Denies the set_enabled command without any pre-configured scope.","commands":{"allow":[],"deny":["set_enabled"]}},"deny-set-focus":{"identifier":"deny-set-focus","description":"Denies the set_focus command without any pre-configured scope.","commands":{"allow":[],"deny":["set_focus"]}},"deny-set-focusable":{"identifier":"deny-set-focusable","description":"Denies the set_focusable command without any pre-configured scope.","commands":{"allow":[],"deny":["set_focusable"]}},"deny-set-fullscreen":{"identifier":"deny-set-fullscreen","description":"Denies the set_fullscreen command without any pre-configured scope.","commands":{"allow":[],"deny":["set_fullscreen"]}},"deny-set-icon":{"identifier":"deny-set-icon","description":"Denies the set_icon command without any pre-configured scope.","commands":{"allow":[],"deny":["set_icon"]}},"deny-set-ignore-cursor-events":{"identifier":"deny-set-ignore-cursor-events","description":"Denies the set_ignore_cursor_events command without any pre-configured scope.","commands":{"allow":[],"deny":["set_ignore_cursor_events"]}},"deny-set-max-size":{"identifier":"deny-set-max-size","description":"Denies the set_max_size command without any pre-configured scope.","commands":{"allow":[],"deny":["set_max_size"]}},"deny-set-maximizable":{"identifier":"deny-set-maximizable","description":"Denies the set_maximizable command without any pre-configured scope.","commands":{"allow":[],"deny":["set_maximizable"]}},"deny-set-min-size":{"identifier":"deny-set-min-size","description":"Denies the set_min_size command without any pre-configured scope.","commands":{"allow":[],"deny":["set_min_size"]}},"deny-set-minimizable":{"identifier":"deny-set-minimizable","description":"Denies the set_minimizable command without any pre-configured scope.","commands":{"allow":[],"deny":["set_minimizable"]}},"deny-set-overlay-icon":{"identifier":"deny-set-overlay-icon","description":"Denies the set_overlay_icon command without any pre-configured scope.","commands":{"allow":[],"deny":["set_overlay_icon"]}},"deny-set-position":{"identifier":"deny-set-position","description":"Denies the set_position command without any pre-configured scope.","commands":{"allow":[],"deny":["set_position"]}},"deny-set-progress-bar":{"identifier":"deny-set-progress-bar","description":"Denies the set_progress_bar command without any pre-configured scope.","commands":{"allow":[],"deny":["set_progress_bar"]}},"deny-set-resizable":{"identifier":"deny-set-resizable","description":"Denies the set_resizable command without any pre-configured scope.","commands":{"allow":[],"deny":["set_resizable"]}},"deny-set-shadow":{"identifier":"deny-set-shadow","description":"Denies the set_shadow command without any pre-configured scope.","commands":{"allow":[],"deny":["set_shadow"]}},"deny-set-simple-fullscreen":{"identifier":"deny-set-simple-fullscreen","description":"Denies the set_simple_fullscreen command without any pre-configured scope.","commands":{"allow":[],"deny":["set_simple_fullscreen"]}},"deny-set-size":{"identifier":"deny-set-size","description":"Denies the set_size command without any pre-configured scope.","commands":{"allow":[],"deny":["set_size"]}},"deny-set-size-constraints":{"identifier":"deny-set-size-constraints","description":"Denies the set_size_constraints command without any pre-configured scope.","commands":{"allow":[],"deny":["set_size_constraints"]}},"deny-set-skip-taskbar":{"identifier":"deny-set-skip-taskbar","description":"Denies the set_skip_taskbar command without any pre-configured scope.","commands":{"allow":[],"deny":["set_skip_taskbar"]}},"deny-set-theme":{"identifier":"deny-set-theme","description":"Denies the set_theme command without any pre-configured scope.","commands":{"allow":[],"deny":["set_theme"]}},"deny-set-title":{"identifier":"deny-set-title","description":"Denies the set_title command without any pre-configured scope.","commands":{"allow":[],"deny":["set_title"]}},"deny-set-title-bar-style":{"identifier":"deny-set-title-bar-style","description":"Denies the set_title_bar_style command without any pre-configured scope.","commands":{"allow":[],"deny":["set_title_bar_style"]}},"deny-set-visible-on-all-workspaces":{"identifier":"deny-set-visible-on-all-workspaces","description":"Denies the set_visible_on_all_workspaces command without any pre-configured scope.","commands":{"allow":[],"deny":["set_visible_on_all_workspaces"]}},"deny-show":{"identifier":"deny-show","description":"Denies the show command without any pre-configured scope.","commands":{"allow":[],"deny":["show"]}},"deny-start-dragging":{"identifier":"deny-start-dragging","description":"Denies the start_dragging command without any pre-configured scope.","commands":{"allow":[],"deny":["start_dragging"]}},"deny-start-resize-dragging":{"identifier":"deny-start-resize-dragging","description":"Denies the start_resize_dragging command without any pre-configured scope.","commands":{"allow":[],"deny":["start_resize_dragging"]}},"deny-theme":{"identifier":"deny-theme","description":"Denies the theme command without any pre-configured scope.","commands":{"allow":[],"deny":["theme"]}},"deny-title":{"identifier":"deny-title","description":"Denies the title command without any pre-configured scope.","commands":{"allow":[],"deny":["title"]}},"deny-toggle-maximize":{"identifier":"deny-toggle-maximize","description":"Denies the toggle_maximize command without any pre-configured scope.","commands":{"allow":[],"deny":["toggle_maximize"]}},"deny-unmaximize":{"identifier":"deny-unmaximize","description":"Denies the unmaximize command without any pre-configured scope.","commands":{"allow":[],"deny":["unmaximize"]}},"deny-unminimize":{"identifier":"deny-unminimize","description":"Denies the unminimize command without any pre-configured scope.","commands":{"allow":[],"deny":["unminimize"]}}},"permission_sets":{},"global_scope_schema":null},"deep-link":{"default_permission":{"identifier":"default","description":"Allows reading the opened deep link via the get_current command","permissions":["allow-get-current"]},"permissions":{"allow-get-current":{"identifier":"allow-get-current","description":"Enables the get_current command without any pre-configured scope.","commands":{"allow":["get_current"],"deny":[]}},"allow-is-registered":{"identifier":"allow-is-registered","description":"Enables the is_registered command without any pre-configured scope.","commands":{"allow":["is_registered"],"deny":[]}},"allow-register":{"identifier":"allow-register","description":"Enables the register command without any pre-configured scope.","commands":{"allow":["register"],"deny":[]}},"allow-unregister":{"identifier":"allow-unregister","description":"Enables the unregister command without any pre-configured scope.","commands":{"allow":["unregister"],"deny":[]}},"deny-get-current":{"identifier":"deny-get-current","description":"Denies the get_current command without any pre-configured scope.","commands":{"allow":[],"deny":["get_current"]}},"deny-is-registered":{"identifier":"deny-is-registered","description":"Denies the is_registered command without any pre-configured scope.","commands":{"allow":[],"deny":["is_registered"]}},"deny-register":{"identifier":"deny-register","description":"Denies the register command without any pre-configured scope.","commands":{"allow":[],"deny":["register"]}},"deny-unregister":{"identifier":"deny-unregister","description":"Denies the unregister command without any pre-configured scope.","commands":{"allow":[],"deny":["unregister"]}}},"permission_sets":{},"global_scope_schema":null},"dialog":{"default_permission":{"identifier":"default","description":"This permission set configures the types of dialogs\navailable from the dialog plugin.\n\n#### Granted Permissions\n\nAll dialog types are enabled.\n\n\n","permissions":["allow-ask","allow-confirm","allow-message","allow-save","allow-open"]},"permissions":{"allow-ask":{"identifier":"allow-ask","description":"Enables the ask command without any pre-configured scope.","commands":{"allow":["ask"],"deny":[]}},"allow-confirm":{"identifier":"allow-confirm","description":"Enables the confirm command without any pre-configured scope.","commands":{"allow":["confirm"],"deny":[]}},"allow-message":{"identifier":"allow-message","description":"Enables the message command without any pre-configured scope.","commands":{"allow":["message"],"deny":[]}},"allow-open":{"identifier":"allow-open","description":"Enables the open command without any pre-configured scope.","commands":{"allow":["open"],"deny":[]}},"allow-save":{"identifier":"allow-save","description":"Enables the save command without any pre-configured scope.","commands":{"allow":["save"],"deny":[]}},"deny-ask":{"identifier":"deny-ask","description":"Denies the ask command without any pre-configured scope.","commands":{"allow":[],"deny":["ask"]}},"deny-confirm":{"identifier":"deny-confirm","description":"Denies the confirm command without any pre-configured scope.","commands":{"allow":[],"deny":["confirm"]}},"deny-message":{"identifier":"deny-message","description":"Denies the message command without any pre-configured scope.","commands":{"allow":[],"deny":["message"]}},"deny-open":{"identifier":"deny-open","description":"Denies the open command without any pre-configured scope.","commands":{"allow":[],"deny":["open"]}},"deny-save":{"identifier":"deny-save","description":"Denies the save command without any pre-configured scope.","commands":{"allow":[],"deny":["save"]}}},"permission_sets":{},"global_scope_schema":null},"notification":{"default_permission":{"identifier":"default","description":"This permission set configures which\nnotification features are by default exposed.\n\n#### Granted Permissions\n\nIt allows all notification related features.\n\n","permissions":["allow-is-permission-granted","allow-request-permission","allow-notify","allow-register-action-types","allow-register-listener","allow-cancel","allow-get-pending","allow-remove-active","allow-get-active","allow-check-permissions","allow-show","allow-batch","allow-list-channels","allow-delete-channel","allow-create-channel","allow-permission-state"]},"permissions":{"allow-batch":{"identifier":"allow-batch","description":"Enables the batch command without any pre-configured scope.","commands":{"allow":["batch"],"deny":[]}},"allow-cancel":{"identifier":"allow-cancel","description":"Enables the cancel command without any pre-configured scope.","commands":{"allow":["cancel"],"deny":[]}},"allow-check-permissions":{"identifier":"allow-check-permissions","description":"Enables the check_permissions command without any pre-configured scope.","commands":{"allow":["check_permissions"],"deny":[]}},"allow-create-channel":{"identifier":"allow-create-channel","description":"Enables the create_channel command without any pre-configured scope.","commands":{"allow":["create_channel"],"deny":[]}},"allow-delete-channel":{"identifier":"allow-delete-channel","description":"Enables the delete_channel command without any pre-configured scope.","commands":{"allow":["delete_channel"],"deny":[]}},"allow-get-active":{"identifier":"allow-get-active","description":"Enables the get_active command without any pre-configured scope.","commands":{"allow":["get_active"],"deny":[]}},"allow-get-pending":{"identifier":"allow-get-pending","description":"Enables the get_pending command without any pre-configured scope.","commands":{"allow":["get_pending"],"deny":[]}},"allow-is-permission-granted":{"identifier":"allow-is-permission-granted","description":"Enables the is_permission_granted command without any pre-configured scope.","commands":{"allow":["is_permission_granted"],"deny":[]}},"allow-list-channels":{"identifier":"allow-list-channels","description":"Enables the list_channels command without any pre-configured scope.","commands":{"allow":["list_channels"],"deny":[]}},"allow-notify":{"identifier":"allow-notify","description":"Enables the notify command without any pre-configured scope.","commands":{"allow":["notify"],"deny":[]}},"allow-permission-state":{"identifier":"allow-permission-state","description":"Enables the permission_state command without any pre-configured scope.","commands":{"allow":["permission_state"],"deny":[]}},"allow-register-action-types":{"identifier":"allow-register-action-types","description":"Enables the register_action_types command without any pre-configured scope.","commands":{"allow":["register_action_types"],"deny":[]}},"allow-register-listener":{"identifier":"allow-register-listener","description":"Enables the register_listener command without any pre-configured scope.","commands":{"allow":["register_listener"],"deny":[]}},"allow-remove-active":{"identifier":"allow-remove-active","description":"Enables the remove_active command without any pre-configured scope.","commands":{"allow":["remove_active"],"deny":[]}},"allow-request-permission":{"identifier":"allow-request-permission","description":"Enables the request_permission command without any pre-configured scope.","commands":{"allow":["request_permission"],"deny":[]}},"allow-show":{"identifier":"allow-show","description":"Enables the show command without any pre-configured scope.","commands":{"allow":["show"],"deny":[]}},"deny-batch":{"identifier":"deny-batch","description":"Denies the batch command without any pre-configured scope.","commands":{"allow":[],"deny":["batch"]}},"deny-cancel":{"identifier":"deny-cancel","description":"Denies the cancel command without any pre-configured scope.","commands":{"allow":[],"deny":["cancel"]}},"deny-check-permissions":{"identifier":"deny-check-permissions","description":"Denies the check_permissions command without any pre-configured scope.","commands":{"allow":[],"deny":["check_permissions"]}},"deny-create-channel":{"identifier":"deny-create-channel","description":"Denies the create_channel command without any pre-configured scope.","commands":{"allow":[],"deny":["create_channel"]}},"deny-delete-channel":{"identifier":"deny-delete-channel","description":"Denies the delete_channel command without any pre-configured scope.","commands":{"allow":[],"deny":["delete_channel"]}},"deny-get-active":{"identifier":"deny-get-active","description":"Denies the get_active command without any pre-configured scope.","commands":{"allow":[],"deny":["get_active"]}},"deny-get-pending":{"identifier":"deny-get-pending","description":"Denies the get_pending command without any pre-configured scope.","commands":{"allow":[],"deny":["get_pending"]}},"deny-is-permission-granted":{"identifier":"deny-is-permission-granted","description":"Denies the is_permission_granted command without any pre-configured scope.","commands":{"allow":[],"deny":["is_permission_granted"]}},"deny-list-channels":{"identifier":"deny-list-channels","description":"Denies the list_channels command without any pre-configured scope.","commands":{"allow":[],"deny":["list_channels"]}},"deny-notify":{"identifier":"deny-notify","description":"Denies the notify command without any pre-configured scope.","commands":{"allow":[],"deny":["notify"]}},"deny-permission-state":{"identifier":"deny-permission-state","description":"Denies the permission_state command without any pre-configured scope.","commands":{"allow":[],"deny":["permission_state"]}},"deny-register-action-types":{"identifier":"deny-register-action-types","description":"Denies the register_action_types command without any pre-configured scope.","commands":{"allow":[],"deny":["register_action_types"]}},"deny-register-listener":{"identifier":"deny-register-listener","description":"Denies the register_listener command without any pre-configured scope.","commands":{"allow":[],"deny":["register_listener"]}},"deny-remove-active":{"identifier":"deny-remove-active","description":"Denies the remove_active command without any pre-configured scope.","commands":{"allow":[],"deny":["remove_active"]}},"deny-request-permission":{"identifier":"deny-request-permission","description":"Denies the request_permission command without any pre-configured scope.","commands":{"allow":[],"deny":["request_permission"]}},"deny-show":{"identifier":"deny-show","description":"Denies the show command without any pre-configured scope.","commands":{"allow":[],"deny":["show"]}}},"permission_sets":{},"global_scope_schema":null},"os":{"default_permission":{"identifier":"default","description":"This permission set configures which\noperating system information are available\nto gather from the frontend.\n\n#### Granted Permissions\n\nAll information except the host name are available.\n\n","permissions":["allow-arch","allow-exe-extension","allow-family","allow-locale","allow-os-type","allow-platform","allow-version"]},"permissions":{"allow-arch":{"identifier":"allow-arch","description":"Enables the arch command without any pre-configured scope.","commands":{"allow":["arch"],"deny":[]}},"allow-exe-extension":{"identifier":"allow-exe-extension","description":"Enables the exe_extension command without any pre-configured scope.","commands":{"allow":["exe_extension"],"deny":[]}},"allow-family":{"identifier":"allow-family","description":"Enables the family command without any pre-configured scope.","commands":{"allow":["family"],"deny":[]}},"allow-hostname":{"identifier":"allow-hostname","description":"Enables the hostname command without any pre-configured scope.","commands":{"allow":["hostname"],"deny":[]}},"allow-locale":{"identifier":"allow-locale","description":"Enables the locale command without any pre-configured scope.","commands":{"allow":["locale"],"deny":[]}},"allow-os-type":{"identifier":"allow-os-type","description":"Enables the os_type command without any pre-configured scope.","commands":{"allow":["os_type"],"deny":[]}},"allow-platform":{"identifier":"allow-platform","description":"Enables the platform command without any pre-configured scope.","commands":{"allow":["platform"],"deny":[]}},"allow-version":{"identifier":"allow-version","description":"Enables the version command without any pre-configured scope.","commands":{"allow":["version"],"deny":[]}},"deny-arch":{"identifier":"deny-arch","description":"Denies the arch command without any pre-configured scope.","commands":{"allow":[],"deny":["arch"]}},"deny-exe-extension":{"identifier":"deny-exe-extension","description":"Denies the exe_extension command without any pre-configured scope.","commands":{"allow":[],"deny":["exe_extension"]}},"deny-family":{"identifier":"deny-family","description":"Denies the family command without any pre-configured scope.","commands":{"allow":[],"deny":["family"]}},"deny-hostname":{"identifier":"deny-hostname","description":"Denies the hostname command without any pre-configured scope.","commands":{"allow":[],"deny":["hostname"]}},"deny-locale":{"identifier":"deny-locale","description":"Denies the locale command without any pre-configured scope.","commands":{"allow":[],"deny":["locale"]}},"deny-os-type":{"identifier":"deny-os-type","description":"Denies the os_type command without any pre-configured scope.","commands":{"allow":[],"deny":["os_type"]}},"deny-platform":{"identifier":"deny-platform","description":"Denies the platform command without any pre-configured scope.","commands":{"allow":[],"deny":["platform"]}},"deny-version":{"identifier":"deny-version","description":"Denies the version command without any pre-configured scope.","commands":{"allow":[],"deny":["version"]}}},"permission_sets":{},"global_scope_schema":null},"process":{"default_permission":{"identifier":"default","description":"This permission set configures which\nprocess features are by default exposed.\n\n#### Granted Permissions\n\nThis enables to quit via `allow-exit` and restart via `allow-restart`\nthe application.\n","permissions":["allow-exit","allow-restart"]},"permissions":{"allow-exit":{"identifier":"allow-exit","description":"Enables the exit command without any pre-configured scope.","commands":{"allow":["exit"],"deny":[]}},"allow-restart":{"identifier":"allow-restart","description":"Enables the restart command without any pre-configured scope.","commands":{"allow":["restart"],"deny":[]}},"deny-exit":{"identifier":"deny-exit","description":"Denies the exit command without any pre-configured scope.","commands":{"allow":[],"deny":["exit"]}},"deny-restart":{"identifier":"deny-restart","description":"Denies the restart command without any pre-configured scope.","commands":{"allow":[],"deny":["restart"]}}},"permission_sets":{},"global_scope_schema":null},"shell":{"default_permission":{"identifier":"default","description":"This permission set configures which\nshell functionality is exposed by default.\n\n#### Granted Permissions\n\nIt allows to use the `open` functionality with a reasonable\nscope pre-configured. It will allow opening `http(s)://`,\n`tel:` and `mailto:` links.\n","permissions":["allow-open"]},"permissions":{"allow-execute":{"identifier":"allow-execute","description":"Enables the execute command without any pre-configured scope.","commands":{"allow":["execute"],"deny":[]}},"allow-kill":{"identifier":"allow-kill","description":"Enables the kill command without any pre-configured scope.","commands":{"allow":["kill"],"deny":[]}},"allow-open":{"identifier":"allow-open","description":"Enables the open command without any pre-configured scope.","commands":{"allow":["open"],"deny":[]}},"allow-spawn":{"identifier":"allow-spawn","description":"Enables the spawn command without any pre-configured scope.","commands":{"allow":["spawn"],"deny":[]}},"allow-stdin-write":{"identifier":"allow-stdin-write","description":"Enables the stdin_write command without any pre-configured scope.","commands":{"allow":["stdin_write"],"deny":[]}},"deny-execute":{"identifier":"deny-execute","description":"Denies the execute command without any pre-configured scope.","commands":{"allow":[],"deny":["execute"]}},"deny-kill":{"identifier":"deny-kill","description":"Denies the kill command without any pre-configured scope.","commands":{"allow":[],"deny":["kill"]}},"deny-open":{"identifier":"deny-open","description":"Denies the open command without any pre-configured scope.","commands":{"allow":[],"deny":["open"]}},"deny-spawn":{"identifier":"deny-spawn","description":"Denies the spawn command without any pre-configured scope.","commands":{"allow":[],"deny":["spawn"]}},"deny-stdin-write":{"identifier":"deny-stdin-write","description":"Denies the stdin_write command without any pre-configured scope.","commands":{"allow":[],"deny":["stdin_write"]}}},"permission_sets":{},"global_scope_schema":{"$schema":"http://json-schema.org/draft-07/schema#","title":"ShellScopeEntry","description":"Shell scope entry.","anyOf":[{"type":"object","required":["cmd","name"],"properties":{"name":{"description":"The name for this allowed shell command configuration.\n\nThis name will be used inside of the webview API to call this command along with any specified arguments.","type":"string"},"cmd":{"description":"The command name. It can start with a variable that resolves to a system base directory. The variables are: `$AUDIO`, `$CACHE`, `$CONFIG`, `$DATA`, `$LOCALDATA`, `$DESKTOP`, `$DOCUMENT`, `$DOWNLOAD`, `$EXE`, `$FONT`, `$HOME`, `$PICTURE`, `$PUBLIC`, `$RUNTIME`, `$TEMPLATE`, `$VIDEO`, `$RESOURCE`, `$LOG`, `$TEMP`, `$APPCONFIG`, `$APPDATA`, `$APPLOCALDATA`, `$APPCACHE`, `$APPLOG`.","type":"string"},"args":{"description":"The allowed arguments for the command execution.","allOf":[{"$ref":"#/definitions/ShellScopeEntryAllowedArgs"}]}},"additionalProperties":false},{"type":"object","required":["name","sidecar"],"properties":{"name":{"description":"The name for this allowed shell command configuration.\n\nThis name will be used inside of the webview API to call this command along with any specified arguments.","type":"string"},"args":{"description":"The allowed arguments for the command execution.","allOf":[{"$ref":"#/definitions/ShellScopeEntryAllowedArgs"}]},"sidecar":{"description":"If this command is a sidecar command.","type":"boolean"}},"additionalProperties":false}],"definitions":{"ShellScopeEntryAllowedArgs":{"description":"A set of command arguments allowed to be executed by the webview API.\n\nA value of `true` will allow any arguments to be passed to the command. `false` will disable all arguments. A list of [`ShellScopeEntryAllowedArg`] will set those arguments as the only valid arguments to be passed to the attached command configuration.","anyOf":[{"description":"Use a simple boolean to allow all or disable all arguments to this command configuration.","type":"boolean"},{"description":"A specific set of [`ShellScopeEntryAllowedArg`] that are valid to call for the command configuration.","type":"array","items":{"$ref":"#/definitions/ShellScopeEntryAllowedArg"}}]},"ShellScopeEntryAllowedArg":{"description":"A command argument allowed to be executed by the webview API.","anyOf":[{"description":"A non-configurable argument that is passed to the command in the order it was specified.","type":"string"},{"description":"A variable that is set while calling the command from the webview API.","type":"object","required":["validator"],"properties":{"validator":{"description":"[regex] validator to require passed values to conform to an expected input.\n\nThis will require the argument value passed to this variable to match the `validator` regex before it will be executed.\n\nThe regex string is by default surrounded by `^...$` to match the full string. For example the `https?://\\w+` regex would be registered as `^https?://\\w+$`.\n\n[regex]: ","type":"string"},"raw":{"description":"Marks the validator as a raw regex, meaning the plugin should not make any modification at runtime.\n\nThis means the regex will not match on the entire string by default, which might be exploited if your regex allow unexpected input to be considered valid. When using this option, make sure your regex is correct.","default":false,"type":"boolean"}},"additionalProperties":false}]}}}},"updater":{"default_permission":{"identifier":"default","description":"This permission set configures which kind of\nupdater functions are exposed to the frontend.\n\n#### Granted Permissions\n\nThe full workflow from checking for updates to installing them\nis enabled.\n\n","permissions":["allow-check","allow-download","allow-install","allow-download-and-install"]},"permissions":{"allow-check":{"identifier":"allow-check","description":"Enables the check command without any pre-configured scope.","commands":{"allow":["check"],"deny":[]}},"allow-download":{"identifier":"allow-download","description":"Enables the download command without any pre-configured scope.","commands":{"allow":["download"],"deny":[]}},"allow-download-and-install":{"identifier":"allow-download-and-install","description":"Enables the download_and_install command without any pre-configured scope.","commands":{"allow":["download_and_install"],"deny":[]}},"allow-install":{"identifier":"allow-install","description":"Enables the install command without any pre-configured scope.","commands":{"allow":["install"],"deny":[]}},"deny-check":{"identifier":"deny-check","description":"Denies the check command without any pre-configured scope.","commands":{"allow":[],"deny":["check"]}},"deny-download":{"identifier":"deny-download","description":"Denies the download command without any pre-configured scope.","commands":{"allow":[],"deny":["download"]}},"deny-download-and-install":{"identifier":"deny-download-and-install","description":"Denies the download_and_install command without any pre-configured scope.","commands":{"allow":[],"deny":["download_and_install"]}},"deny-install":{"identifier":"deny-install","description":"Denies the install command without any pre-configured scope.","commands":{"allow":[],"deny":["install"]}}},"permission_sets":{},"global_scope_schema":null}} \ No newline at end of file diff --git a/src/cortex-gui/src-tauri/gen/schemas/desktop-schema.json b/src/cortex-gui/src-tauri/gen/schemas/desktop-schema.json index 41f95fec..ef5d9ac0 100644 --- a/src/cortex-gui/src-tauri/gen/schemas/desktop-schema.json +++ b/src/cortex-gui/src-tauri/gen/schemas/desktop-schema.json @@ -223,6 +223,14 @@ "name" ], "properties": { + "name": { + "description": "The name for this allowed shell command configuration.\n\nThis name will be used inside of the webview API to call this command along with any specified arguments.", + "type": "string" + }, + "cmd": { + "description": "The command name. It can start with a variable that resolves to a system base directory. The variables are: `$AUDIO`, `$CACHE`, `$CONFIG`, `$DATA`, `$LOCALDATA`, `$DESKTOP`, `$DOCUMENT`, `$DOWNLOAD`, `$EXE`, `$FONT`, `$HOME`, `$PICTURE`, `$PUBLIC`, `$RUNTIME`, `$TEMPLATE`, `$VIDEO`, `$RESOURCE`, `$LOG`, `$TEMP`, `$APPCONFIG`, `$APPDATA`, `$APPLOCALDATA`, `$APPCACHE`, `$APPLOG`.", + "type": "string" + }, "args": { "description": "The allowed arguments for the command execution.", "allOf": [ @@ -230,14 +238,6 @@ "$ref": "#/definitions/ShellScopeEntryAllowedArgs" } ] - }, - "cmd": { - "description": "The command name. It can start with a variable that resolves to a system base directory. The variables are: `$AUDIO`, `$CACHE`, `$CONFIG`, `$DATA`, `$LOCALDATA`, `$DESKTOP`, `$DOCUMENT`, `$DOWNLOAD`, `$EXE`, `$FONT`, `$HOME`, `$PICTURE`, `$PUBLIC`, `$RUNTIME`, `$TEMPLATE`, `$VIDEO`, `$RESOURCE`, `$LOG`, `$TEMP`, `$APPCONFIG`, `$APPDATA`, `$APPLOCALDATA`, `$APPCACHE`, `$APPLOG`.", - "type": "string" - }, - "name": { - "description": "The name for this allowed shell command configuration.\n\nThis name will be used inside of the webview API to call this command along with any specified arguments.", - "type": "string" } }, "additionalProperties": false @@ -249,6 +249,10 @@ "sidecar" ], "properties": { + "name": { + "description": "The name for this allowed shell command configuration.\n\nThis name will be used inside of the webview API to call this command along with any specified arguments.", + "type": "string" + }, "args": { "description": "The allowed arguments for the command execution.", "allOf": [ @@ -257,10 +261,6 @@ } ] }, - "name": { - "description": "The name for this allowed shell command configuration.\n\nThis name will be used inside of the webview API to call this command along with any specified arguments.", - "type": "string" - }, "sidecar": { "description": "If this command is a sidecar command.", "type": "boolean" @@ -283,6 +283,14 @@ "name" ], "properties": { + "name": { + "description": "The name for this allowed shell command configuration.\n\nThis name will be used inside of the webview API to call this command along with any specified arguments.", + "type": "string" + }, + "cmd": { + "description": "The command name. It can start with a variable that resolves to a system base directory. The variables are: `$AUDIO`, `$CACHE`, `$CONFIG`, `$DATA`, `$LOCALDATA`, `$DESKTOP`, `$DOCUMENT`, `$DOWNLOAD`, `$EXE`, `$FONT`, `$HOME`, `$PICTURE`, `$PUBLIC`, `$RUNTIME`, `$TEMPLATE`, `$VIDEO`, `$RESOURCE`, `$LOG`, `$TEMP`, `$APPCONFIG`, `$APPDATA`, `$APPLOCALDATA`, `$APPCACHE`, `$APPLOG`.", + "type": "string" + }, "args": { "description": "The allowed arguments for the command execution.", "allOf": [ @@ -290,14 +298,6 @@ "$ref": "#/definitions/ShellScopeEntryAllowedArgs" } ] - }, - "cmd": { - "description": "The command name. It can start with a variable that resolves to a system base directory. The variables are: `$AUDIO`, `$CACHE`, `$CONFIG`, `$DATA`, `$LOCALDATA`, `$DESKTOP`, `$DOCUMENT`, `$DOWNLOAD`, `$EXE`, `$FONT`, `$HOME`, `$PICTURE`, `$PUBLIC`, `$RUNTIME`, `$TEMPLATE`, `$VIDEO`, `$RESOURCE`, `$LOG`, `$TEMP`, `$APPCONFIG`, `$APPDATA`, `$APPLOCALDATA`, `$APPCACHE`, `$APPLOG`.", - "type": "string" - }, - "name": { - "description": "The name for this allowed shell command configuration.\n\nThis name will be used inside of the webview API to call this command along with any specified arguments.", - "type": "string" } }, "additionalProperties": false @@ -309,6 +309,10 @@ "sidecar" ], "properties": { + "name": { + "description": "The name for this allowed shell command configuration.\n\nThis name will be used inside of the webview API to call this command along with any specified arguments.", + "type": "string" + }, "args": { "description": "The allowed arguments for the command execution.", "allOf": [ @@ -317,10 +321,6 @@ } ] }, - "name": { - "description": "The name for this allowed shell command configuration.\n\nThis name will be used inside of the webview API to call this command along with any specified arguments.", - "type": "string" - }, "sidecar": { "description": "If this command is a sidecar command.", "type": "boolean" @@ -3098,6 +3098,22 @@ } ] }, + "ShellScopeEntryAllowedArgs": { + "description": "A set of command arguments allowed to be executed by the webview API.\n\nA value of `true` will allow any arguments to be passed to the command. `false` will disable all arguments. A list of [`ShellScopeEntryAllowedArg`] will set those arguments as the only valid arguments to be passed to the attached command configuration.", + "anyOf": [ + { + "description": "Use a simple boolean to allow all or disable all arguments to this command configuration.", + "type": "boolean" + }, + { + "description": "A specific set of [`ShellScopeEntryAllowedArg`] that are valid to call for the command configuration.", + "type": "array", + "items": { + "$ref": "#/definitions/ShellScopeEntryAllowedArg" + } + } + ] + }, "ShellScopeEntryAllowedArg": { "description": "A command argument allowed to be executed by the webview API.", "anyOf": [ @@ -3112,35 +3128,19 @@ "validator" ], "properties": { + "validator": { + "description": "[regex] validator to require passed values to conform to an expected input.\n\nThis will require the argument value passed to this variable to match the `validator` regex before it will be executed.\n\nThe regex string is by default surrounded by `^...$` to match the full string. For example the `https?://\\w+` regex would be registered as `^https?://\\w+$`.\n\n[regex]: ", + "type": "string" + }, "raw": { "description": "Marks the validator as a raw regex, meaning the plugin should not make any modification at runtime.\n\nThis means the regex will not match on the entire string by default, which might be exploited if your regex allow unexpected input to be considered valid. When using this option, make sure your regex is correct.", "default": false, "type": "boolean" - }, - "validator": { - "description": "[regex] validator to require passed values to conform to an expected input.\n\nThis will require the argument value passed to this variable to match the `validator` regex before it will be executed.\n\nThe regex string is by default surrounded by `^...$` to match the full string. For example the `https?://\\w+` regex would be registered as `^https?://\\w+$`.\n\n[regex]: ", - "type": "string" } }, "additionalProperties": false } ] - }, - "ShellScopeEntryAllowedArgs": { - "description": "A set of command arguments allowed to be executed by the webview API.\n\nA value of `true` will allow any arguments to be passed to the command. `false` will disable all arguments. A list of [`ShellScopeEntryAllowedArg`] will set those arguments as the only valid arguments to be passed to the attached command configuration.", - "anyOf": [ - { - "description": "Use a simple boolean to allow all or disable all arguments to this command configuration.", - "type": "boolean" - }, - { - "description": "A specific set of [`ShellScopeEntryAllowedArg`] that are valid to call for the command configuration.", - "type": "array", - "items": { - "$ref": "#/definitions/ShellScopeEntryAllowedArg" - } - } - ] } } } \ No newline at end of file diff --git a/src/cortex-gui/src-tauri/gen/schemas/linux-schema.json b/src/cortex-gui/src-tauri/gen/schemas/linux-schema.json index 41f95fec..ef5d9ac0 100644 --- a/src/cortex-gui/src-tauri/gen/schemas/linux-schema.json +++ b/src/cortex-gui/src-tauri/gen/schemas/linux-schema.json @@ -223,6 +223,14 @@ "name" ], "properties": { + "name": { + "description": "The name for this allowed shell command configuration.\n\nThis name will be used inside of the webview API to call this command along with any specified arguments.", + "type": "string" + }, + "cmd": { + "description": "The command name. It can start with a variable that resolves to a system base directory. The variables are: `$AUDIO`, `$CACHE`, `$CONFIG`, `$DATA`, `$LOCALDATA`, `$DESKTOP`, `$DOCUMENT`, `$DOWNLOAD`, `$EXE`, `$FONT`, `$HOME`, `$PICTURE`, `$PUBLIC`, `$RUNTIME`, `$TEMPLATE`, `$VIDEO`, `$RESOURCE`, `$LOG`, `$TEMP`, `$APPCONFIG`, `$APPDATA`, `$APPLOCALDATA`, `$APPCACHE`, `$APPLOG`.", + "type": "string" + }, "args": { "description": "The allowed arguments for the command execution.", "allOf": [ @@ -230,14 +238,6 @@ "$ref": "#/definitions/ShellScopeEntryAllowedArgs" } ] - }, - "cmd": { - "description": "The command name. It can start with a variable that resolves to a system base directory. The variables are: `$AUDIO`, `$CACHE`, `$CONFIG`, `$DATA`, `$LOCALDATA`, `$DESKTOP`, `$DOCUMENT`, `$DOWNLOAD`, `$EXE`, `$FONT`, `$HOME`, `$PICTURE`, `$PUBLIC`, `$RUNTIME`, `$TEMPLATE`, `$VIDEO`, `$RESOURCE`, `$LOG`, `$TEMP`, `$APPCONFIG`, `$APPDATA`, `$APPLOCALDATA`, `$APPCACHE`, `$APPLOG`.", - "type": "string" - }, - "name": { - "description": "The name for this allowed shell command configuration.\n\nThis name will be used inside of the webview API to call this command along with any specified arguments.", - "type": "string" } }, "additionalProperties": false @@ -249,6 +249,10 @@ "sidecar" ], "properties": { + "name": { + "description": "The name for this allowed shell command configuration.\n\nThis name will be used inside of the webview API to call this command along with any specified arguments.", + "type": "string" + }, "args": { "description": "The allowed arguments for the command execution.", "allOf": [ @@ -257,10 +261,6 @@ } ] }, - "name": { - "description": "The name for this allowed shell command configuration.\n\nThis name will be used inside of the webview API to call this command along with any specified arguments.", - "type": "string" - }, "sidecar": { "description": "If this command is a sidecar command.", "type": "boolean" @@ -283,6 +283,14 @@ "name" ], "properties": { + "name": { + "description": "The name for this allowed shell command configuration.\n\nThis name will be used inside of the webview API to call this command along with any specified arguments.", + "type": "string" + }, + "cmd": { + "description": "The command name. It can start with a variable that resolves to a system base directory. The variables are: `$AUDIO`, `$CACHE`, `$CONFIG`, `$DATA`, `$LOCALDATA`, `$DESKTOP`, `$DOCUMENT`, `$DOWNLOAD`, `$EXE`, `$FONT`, `$HOME`, `$PICTURE`, `$PUBLIC`, `$RUNTIME`, `$TEMPLATE`, `$VIDEO`, `$RESOURCE`, `$LOG`, `$TEMP`, `$APPCONFIG`, `$APPDATA`, `$APPLOCALDATA`, `$APPCACHE`, `$APPLOG`.", + "type": "string" + }, "args": { "description": "The allowed arguments for the command execution.", "allOf": [ @@ -290,14 +298,6 @@ "$ref": "#/definitions/ShellScopeEntryAllowedArgs" } ] - }, - "cmd": { - "description": "The command name. It can start with a variable that resolves to a system base directory. The variables are: `$AUDIO`, `$CACHE`, `$CONFIG`, `$DATA`, `$LOCALDATA`, `$DESKTOP`, `$DOCUMENT`, `$DOWNLOAD`, `$EXE`, `$FONT`, `$HOME`, `$PICTURE`, `$PUBLIC`, `$RUNTIME`, `$TEMPLATE`, `$VIDEO`, `$RESOURCE`, `$LOG`, `$TEMP`, `$APPCONFIG`, `$APPDATA`, `$APPLOCALDATA`, `$APPCACHE`, `$APPLOG`.", - "type": "string" - }, - "name": { - "description": "The name for this allowed shell command configuration.\n\nThis name will be used inside of the webview API to call this command along with any specified arguments.", - "type": "string" } }, "additionalProperties": false @@ -309,6 +309,10 @@ "sidecar" ], "properties": { + "name": { + "description": "The name for this allowed shell command configuration.\n\nThis name will be used inside of the webview API to call this command along with any specified arguments.", + "type": "string" + }, "args": { "description": "The allowed arguments for the command execution.", "allOf": [ @@ -317,10 +321,6 @@ } ] }, - "name": { - "description": "The name for this allowed shell command configuration.\n\nThis name will be used inside of the webview API to call this command along with any specified arguments.", - "type": "string" - }, "sidecar": { "description": "If this command is a sidecar command.", "type": "boolean" @@ -3098,6 +3098,22 @@ } ] }, + "ShellScopeEntryAllowedArgs": { + "description": "A set of command arguments allowed to be executed by the webview API.\n\nA value of `true` will allow any arguments to be passed to the command. `false` will disable all arguments. A list of [`ShellScopeEntryAllowedArg`] will set those arguments as the only valid arguments to be passed to the attached command configuration.", + "anyOf": [ + { + "description": "Use a simple boolean to allow all or disable all arguments to this command configuration.", + "type": "boolean" + }, + { + "description": "A specific set of [`ShellScopeEntryAllowedArg`] that are valid to call for the command configuration.", + "type": "array", + "items": { + "$ref": "#/definitions/ShellScopeEntryAllowedArg" + } + } + ] + }, "ShellScopeEntryAllowedArg": { "description": "A command argument allowed to be executed by the webview API.", "anyOf": [ @@ -3112,35 +3128,19 @@ "validator" ], "properties": { + "validator": { + "description": "[regex] validator to require passed values to conform to an expected input.\n\nThis will require the argument value passed to this variable to match the `validator` regex before it will be executed.\n\nThe regex string is by default surrounded by `^...$` to match the full string. For example the `https?://\\w+` regex would be registered as `^https?://\\w+$`.\n\n[regex]: ", + "type": "string" + }, "raw": { "description": "Marks the validator as a raw regex, meaning the plugin should not make any modification at runtime.\n\nThis means the regex will not match on the entire string by default, which might be exploited if your regex allow unexpected input to be considered valid. When using this option, make sure your regex is correct.", "default": false, "type": "boolean" - }, - "validator": { - "description": "[regex] validator to require passed values to conform to an expected input.\n\nThis will require the argument value passed to this variable to match the `validator` regex before it will be executed.\n\nThe regex string is by default surrounded by `^...$` to match the full string. For example the `https?://\\w+` regex would be registered as `^https?://\\w+$`.\n\n[regex]: ", - "type": "string" } }, "additionalProperties": false } ] - }, - "ShellScopeEntryAllowedArgs": { - "description": "A set of command arguments allowed to be executed by the webview API.\n\nA value of `true` will allow any arguments to be passed to the command. `false` will disable all arguments. A list of [`ShellScopeEntryAllowedArg`] will set those arguments as the only valid arguments to be passed to the attached command configuration.", - "anyOf": [ - { - "description": "Use a simple boolean to allow all or disable all arguments to this command configuration.", - "type": "boolean" - }, - { - "description": "A specific set of [`ShellScopeEntryAllowedArg`] that are valid to call for the command configuration.", - "type": "array", - "items": { - "$ref": "#/definitions/ShellScopeEntryAllowedArg" - } - } - ] } } } \ No newline at end of file diff --git a/src/cortex-gui/src-tauri/src/acp/executor.rs b/src/cortex-gui/src-tauri/src/acp/executor.rs index 2364909b..e244b1bb 100755 --- a/src/cortex-gui/src-tauri/src/acp/executor.rs +++ b/src/cortex-gui/src-tauri/src/acp/executor.rs @@ -7,7 +7,6 @@ use std::path::PathBuf; use std::process::Stdio; use std::time::Duration; -use tokio::process::Command; use tokio::time::timeout; use super::types::{ diff --git a/src/cortex-gui/src-tauri/src/ai/agents/commands.rs b/src/cortex-gui/src-tauri/src/ai/agents/commands.rs index face7cab..e29b9245 100644 --- a/src/cortex-gui/src-tauri/src/ai/agents/commands.rs +++ b/src/cortex-gui/src-tauri/src/ai/agents/commands.rs @@ -4,7 +4,9 @@ use tauri::{AppHandle, Emitter, State}; use tokio::sync::mpsc; use super::orchestrator::AgentState; -use super::types::{AgentStatus, AgentStreamChunk, AgentTask, AgentType, OrchestratorStats, SubAgent}; +use super::types::{ + AgentStatus, AgentStreamChunk, AgentTask, AgentType, OrchestratorStats, SubAgent, +}; #[tauri::command] pub async fn agent_spawn( diff --git a/src/cortex-gui/src-tauri/src/ai/agents/mod.rs b/src/cortex-gui/src-tauri/src/ai/agents/mod.rs index 84777dd0..4d14eb7c 100644 --- a/src/cortex-gui/src-tauri/src/ai/agents/mod.rs +++ b/src/cortex-gui/src-tauri/src/ai/agents/mod.rs @@ -12,25 +12,11 @@ mod storage; mod storage_types; mod types; -// Re-export types -pub use types::{ - AgentError, AgentStatus, AgentStreamChunk, AgentTask, AgentType, OrchestratorStats, SubAgent, - ts, -}; - // Re-export orchestrator -pub use orchestrator::{AgentOrchestrator, AgentState}; - -// Re-export storage types -pub use storage_types::{ - AgentHistoryEntry, AgentStoreData, CortexAgentMetadata, StoredAgent, -}; +pub use orchestrator::AgentState; // Re-export storage -pub use storage::{ - AgentStoreState, agent_store_add_history, agent_store_load, agent_store_save, - agent_store_update_stats, get_os_agents_dir, get_os_cortex_dir, -}; +pub use storage::AgentStoreState; // Re-export runtime commands pub use commands::{ @@ -38,5 +24,10 @@ pub use commands::{ agent_get_task, agent_list, agent_list_tasks, agent_remove, agent_run_task, agent_spawn, }; +// Re-export storage commands +pub use storage::{ + agent_store_add_history, agent_store_load, agent_store_save, agent_store_update_stats, +}; + // Re-export prompt generation pub use prompt_generation::agent_generate_prompt; diff --git a/src/cortex-gui/src-tauri/src/ai/agents/orchestrator.rs b/src/cortex-gui/src-tauri/src/ai/agents/orchestrator.rs index c0d84f8b..a4934fee 100644 --- a/src/cortex-gui/src-tauri/src/ai/agents/orchestrator.rs +++ b/src/cortex-gui/src-tauri/src/ai/agents/orchestrator.rs @@ -2,7 +2,7 @@ use std::collections::HashMap; use std::sync::Arc; -use tokio::sync::{mpsc, Mutex as TokioMutex}; +use tokio::sync::{Mutex as TokioMutex, mpsc}; use uuid::Uuid; use super::types::{ @@ -105,7 +105,7 @@ impl AgentOrchestrator { let tid = task.id.clone(); agent.set_status(AgentStatus::Running); task.start(); - let (ctx, mut crx) = tokio::sync::watch::channel(false); + let (ctx, crx) = tokio::sync::watch::channel(false); self.running.insert(tid.clone(), ctx); self.tasks.insert(tid.clone(), task); let (a, t, s, _p) = ( diff --git a/src/cortex-gui/src-tauri/src/ai/agents/storage.rs b/src/cortex-gui/src-tauri/src/ai/agents/storage.rs index 6ecf61a2..1de02d4c 100644 --- a/src/cortex-gui/src-tauri/src/ai/agents/storage.rs +++ b/src/cortex-gui/src-tauri/src/ai/agents/storage.rs @@ -6,10 +6,8 @@ use std::sync::Mutex; use tauri::{AppHandle, Manager, State}; -use super::storage_types::{ - AgentHistoryEntry, AgentStoreData, CortexAgentMetadata, StoredAgent, -}; -use super::types::{ts, AgentStatus, AgentType}; +use super::storage_types::{AgentHistoryEntry, AgentStoreData, CortexAgentMetadata, StoredAgent}; +use super::types::{AgentStatus, AgentType, ts}; // ============================================================================ // OS-Specific Agents Directory @@ -116,7 +114,11 @@ impl AgentStoreState { } /// Save history to legacy file - pub fn save_history(&self, app: &AppHandle, history: &[AgentHistoryEntry]) -> Result<(), String> { + pub fn save_history( + &self, + app: &AppHandle, + history: &[AgentHistoryEntry], + ) -> Result<(), String> { let path = self.get_legacy_storage_path(app)?; // Ensure parent directory exists diff --git a/src/cortex-gui/src-tauri/src/ai/mod.rs b/src/cortex-gui/src-tauri/src/ai/mod.rs index 2334597a..18181226 100755 --- a/src/cortex-gui/src-tauri/src/ai/mod.rs +++ b/src/cortex-gui/src-tauri/src/ai/mod.rs @@ -34,13 +34,10 @@ pub use agents::{ agent_store_load, agent_store_save, agent_store_update_stats, }; pub use providers::{SharedProviderManager, create_shared_provider_manager, get_provider_models}; -pub use session::{CreateSessionOptions, SessionError, SessionInfo, SessionManager}; +pub use session::{CreateSessionOptions, SessionInfo, SessionManager}; pub use session_commands::*; pub use thread::{ThreadManagerState, ThreadSummary, threads_to_summaries}; -pub use tools::{ - AIToolsState, ToolCall, ToolDefinition, ToolResult, tools_execute, tools_execute_batch, - tools_get, tools_list, -}; +pub use tools::{AIToolsState, tools_execute, tools_execute_batch, tools_get, tools_list}; pub use types::*; use serde::{Deserialize, Serialize}; diff --git a/src/cortex-gui/src-tauri/src/ai/session.rs b/src/cortex-gui/src-tauri/src/ai/session.rs index 4da5ec20..fb201322 100755 --- a/src/cortex-gui/src-tauri/src/ai/session.rs +++ b/src/cortex-gui/src-tauri/src/ai/session.rs @@ -7,12 +7,11 @@ use std::collections::HashMap; use std::sync::Arc; use std::time::Instant; -use chrono; use cortex_engine::{Config as CoreConfig, Session, SessionHandle}; use cortex_protocol::{ AskForApproval, ConversationId, Event, EventMsg, Op, ReviewDecision, Submission, UserInput, }; -use tauri::{AppHandle, Emitter, Manager}; +use tauri::{AppHandle, Emitter}; use tokio::sync::RwLock; use tracing::{debug, error, info, warn}; use uuid::Uuid; diff --git a/src/cortex-gui/src-tauri/src/ai/tools.rs b/src/cortex-gui/src-tauri/src/ai/tools.rs index fa81dd66..140549c7 100755 --- a/src/cortex-gui/src-tauri/src/ai/tools.rs +++ b/src/cortex-gui/src-tauri/src/ai/tools.rs @@ -7,7 +7,6 @@ use std::path::{Path, PathBuf}; use std::process::Stdio; use std::sync::Arc; use tokio::fs; -use tokio::process::Command; use tokio::sync::RwLock; #[derive(Clone, Debug, Serialize, Deserialize)] diff --git a/src/cortex-gui/src-tauri/src/browser.rs b/src/cortex-gui/src-tauri/src/browser.rs index 36372882..25cb2b44 100755 --- a/src/cortex-gui/src-tauri/src/browser.rs +++ b/src/cortex-gui/src-tauri/src/browser.rs @@ -4,9 +4,8 @@ //! not as separate windows. use serde::{Deserialize, Serialize}; -use tauri::webview::PageLoadEvent; use tauri::{AppHandle, Manager, Runtime, WebviewBuilder, WebviewUrl, command}; -use tracing::{info, warn}; +use tracing::info; #[derive(Debug, Clone, Serialize, Deserialize)] pub struct BrowserWebviewInfo { @@ -86,7 +85,7 @@ pub async fn browser_create( .auto_resize(); // Add the webview to the main window at the specified position - let webview = main_window + let _webview = main_window .add_child( webview_builder, tauri::LogicalPosition::new(params.x, params.y), diff --git a/src/cortex-gui/src-tauri/src/context_server/transport.rs b/src/cortex-gui/src-tauri/src/context_server/transport.rs index 9912567f..f0be2315 100755 --- a/src/cortex-gui/src-tauri/src/context_server/transport.rs +++ b/src/cortex-gui/src-tauri/src/context_server/transport.rs @@ -5,7 +5,7 @@ use anyhow::{Context, Result, anyhow}; use std::collections::HashMap; use std::io::{BufRead, BufReader, Write}; -use std::process::{Child, ChildStdin, ChildStdout, Command, Stdio}; +use std::process::{Child, ChildStdin, ChildStdout, Stdio}; use std::sync::Arc; use tokio::io::{AsyncBufReadExt, AsyncWriteExt, BufReader as TokioBufReader}; use tokio::sync::Mutex; diff --git a/src/cortex-gui/src-tauri/src/dap/commands/misc.rs b/src/cortex-gui/src-tauri/src/dap/commands/misc.rs index 9aaf075a..058214c6 100644 --- a/src/cortex-gui/src-tauri/src/dap/commands/misc.rs +++ b/src/cortex-gui/src-tauri/src/dap/commands/misc.rs @@ -6,7 +6,7 @@ use tauri::State; use super::super::protocol::{ - CompletionItem, ExceptionInfoResponse, Module, ModulesResponse, Source, SourceResponse, + CompletionItem, ExceptionInfoResponse, ModulesResponse, Source, SourceResponse, }; use super::state::DebuggerState; diff --git a/src/cortex-gui/src-tauri/src/dap/commands/mod.rs b/src/cortex-gui/src-tauri/src/dap/commands/mod.rs index 427022f7..27405985 100644 --- a/src/cortex-gui/src-tauri/src/dap/commands/mod.rs +++ b/src/cortex-gui/src-tauri/src/dap/commands/mod.rs @@ -29,13 +29,6 @@ mod variables; // Re-export state pub use state::DebuggerState; -// Re-export types -pub use types::{ - BreakpointLocation, DataBreakpointInput, DataBreakpointResult, DebugSessionInfo, - DisassembleResult, EvaluateResult, ExceptionBreakpointResult, ExceptionFilterOptionInput, - InstructionBreakpointInput, InstructionBreakpointResult, SessionBreakpoint, SetVariableResult, -}; - // Re-export session commands (using * to include hidden __cmd__ functions) pub use session::*; diff --git a/src/cortex-gui/src-tauri/src/dap/mod.rs b/src/cortex-gui/src-tauri/src/dap/mod.rs index 446ec6e7..3dd872b0 100755 --- a/src/cortex-gui/src-tauri/src/dap/mod.rs +++ b/src/cortex-gui/src-tauri/src/dap/mod.rs @@ -9,8 +9,5 @@ pub mod protocol; mod session; mod transport; -pub use client::DapClient; pub use commands::DebuggerState; -pub use protocol::*; pub use session::{DebugSession, DebugSessionConfig, DebugSessionEvent, DebugSessionState}; -pub use transport::Transport; diff --git a/src/cortex-gui/src-tauri/src/dap/protocol/mod.rs b/src/cortex-gui/src-tauri/src/dap/protocol/mod.rs index bef96e24..2ca906eb 100644 --- a/src/cortex-gui/src-tauri/src/dap/protocol/mod.rs +++ b/src/cortex-gui/src-tauri/src/dap/protocol/mod.rs @@ -12,7 +12,6 @@ mod types; // Re-export all types for backwards compatibility pub use events::*; -pub use launch::*; pub use messages::*; pub use requests::*; pub use responses::*; diff --git a/src/cortex-gui/src-tauri/src/dap/protocol/responses.rs b/src/cortex-gui/src-tauri/src/dap/protocol/responses.rs index 43d0c2f3..ea45e09d 100644 --- a/src/cortex-gui/src-tauri/src/dap/protocol/responses.rs +++ b/src/cortex-gui/src-tauri/src/dap/protocol/responses.rs @@ -5,8 +5,8 @@ use serde::{Deserialize, Serialize}; use super::types::{ - Breakpoint, CompletionItem, DisassembledInstruction, Module, Scope, Source, StackFrame, - Thread, Variable, VariablePresentationHint, + Breakpoint, CompletionItem, DisassembledInstruction, Module, Scope, StackFrame, Thread, + Variable, VariablePresentationHint, }; #[derive(Debug, Clone, Serialize, Deserialize, Default)] diff --git a/src/cortex-gui/src-tauri/src/dap/session/breakpoints.rs b/src/cortex-gui/src-tauri/src/dap/session/breakpoints.rs index c5ef1734..d99c72f5 100644 --- a/src/cortex-gui/src-tauri/src/dap/session/breakpoints.rs +++ b/src/cortex-gui/src-tauri/src/dap/session/breakpoints.rs @@ -178,9 +178,7 @@ impl DebugSession { } /// Get all breakpoints - pub async fn breakpoints( - &self, - ) -> std::collections::HashMap> { + pub async fn breakpoints(&self) -> std::collections::HashMap> { self.breakpoints.read().await.clone() } } diff --git a/src/cortex-gui/src-tauri/src/dap/session/core.rs b/src/cortex-gui/src-tauri/src/dap/session/core.rs index d2b26ba5..53d62a59 100644 --- a/src/cortex-gui/src-tauri/src/dap/session/core.rs +++ b/src/cortex-gui/src-tauri/src/dap/session/core.rs @@ -4,7 +4,7 @@ use std::collections::HashMap; use std::sync::Arc; use anyhow::Result; -use tokio::sync::{mpsc, RwLock}; +use tokio::sync::{RwLock, mpsc}; use crate::dap::client::DapClient; use crate::dap::protocol::{Capabilities, DapEvent, StackFrame, Thread}; diff --git a/src/cortex-gui/src-tauri/src/dap/session/mod.rs b/src/cortex-gui/src-tauri/src/dap/session/mod.rs index b06333a7..523441ba 100644 --- a/src/cortex-gui/src-tauri/src/dap/session/mod.rs +++ b/src/cortex-gui/src-tauri/src/dap/session/mod.rs @@ -16,4 +16,4 @@ mod variables; // Re-export public types pub use core::DebugSession; -pub use types::{DebugSessionConfig, DebugSessionEvent, DebugSessionState, SessionBreakpoint}; +pub use types::{DebugSessionConfig, DebugSessionEvent, DebugSessionState}; diff --git a/src/cortex-gui/src-tauri/src/dap/transport.rs b/src/cortex-gui/src-tauri/src/dap/transport.rs index eb6b9308..1f99fa8a 100755 --- a/src/cortex-gui/src-tauri/src/dap/transport.rs +++ b/src/cortex-gui/src-tauri/src/dap/transport.rs @@ -9,7 +9,6 @@ use tokio::io::{AsyncBufReadExt, AsyncReadExt, AsyncWriteExt, BufReader as Tokio use tokio::net::TcpStream; use tokio::process::{ Child as TokioChild, ChildStdin as TokioChildStdin, ChildStdout as TokioChildStdout, - Command as TokioCommand, }; use super::protocol::DapMessage; diff --git a/src/cortex-gui/src-tauri/src/extensions/mod.rs b/src/cortex-gui/src-tauri/src/extensions/mod.rs index 1fda9484..a9ab5310 100644 --- a/src/cortex-gui/src-tauri/src/extensions/mod.rs +++ b/src/cortex-gui/src-tauri/src/extensions/mod.rs @@ -12,35 +12,8 @@ pub mod types; pub mod utils; pub mod vscode; -// Re-export all types for backwards compatibility -pub use types::{ - CommandContribution, EngineRequirements, Extension, ExtensionContributes, ExtensionManifest, - ExtensionSource, ExtensionTheme, KeybindingContribution, LanguageContribution, - MarketplaceExtension, PanelContribution, SettingsContribution, SettingsProperty, - SnippetContribution, ThemeContribution, -}; - // Re-export state types pub use state::{ExtensionsManager, ExtensionsState}; -// Re-export host -pub use host::ExtensionHost; - -// Re-export all Tauri commands for registration in lib.rs -pub use api::{ - execute_extension_command, get_extension_commands, get_extension_keybindings, - get_extension_languages, get_extension_panels, get_extension_settings, get_extension_snippets, - get_extension_themes, -}; - -pub use commands::{ - disable_extension, enable_extension, get_enabled_extensions, get_extension, get_extensions, - get_extensions_directory, install_extension_from_path, load_extensions, - open_extensions_directory, preload_extensions, update_extension, validate_extension_manifest, -}; - -pub use marketplace::{get_featured_extensions, install_from_marketplace, search_marketplace}; - -pub use vscode::{ - vscode_execute_builtin_command, vscode_execute_command, vscode_get_command_palette_items, -}; +// Re-export preload_extensions for lib.rs setup +pub use commands::preload_extensions; diff --git a/src/cortex-gui/src-tauri/src/extensions/utils.rs b/src/cortex-gui/src-tauri/src/extensions/utils.rs index 04c77170..acfa6707 100644 --- a/src/cortex-gui/src-tauri/src/extensions/utils.rs +++ b/src/cortex-gui/src-tauri/src/extensions/utils.rs @@ -40,8 +40,6 @@ pub fn extract_zip_package( zip_path: &std::path::Path, target_dir: &std::path::Path, ) -> Result<(), String> { - use std::io::Read; - let file = fs::File::open(zip_path).map_err(|e| format!("Failed to open zip file: {}", e))?; let mut archive = diff --git a/src/cortex-gui/src-tauri/src/factory/audit.rs b/src/cortex-gui/src-tauri/src/factory/audit.rs index cacc0b5c..ddcc92e5 100755 --- a/src/cortex-gui/src-tauri/src/factory/audit.rs +++ b/src/cortex-gui/src-tauri/src/factory/audit.rs @@ -10,7 +10,7 @@ use std::path::PathBuf; use rusqlite::{Connection, params}; -use super::types::{AuditEntry, AuditEventType, AuditFilter, AuditResult, RiskLevel}; +use super::types::{AuditEntry, AuditEventType, AuditFilter, AuditResult}; /// Audit logger for tracking all factory events pub struct AuditLogger { diff --git a/src/cortex-gui/src-tauri/src/factory/executor/actions.rs b/src/cortex-gui/src-tauri/src/factory/executor/actions.rs index 807676d6..8c4a93bc 100644 --- a/src/cortex-gui/src-tauri/src/factory/executor/actions.rs +++ b/src/cortex-gui/src-tauri/src/factory/executor/actions.rs @@ -5,11 +5,11 @@ use crate::factory::types::{ActionType, ExecutionState, WorkflowNode}; +use super::WorkflowExecutor; use super::helpers::{ execute_ai_call, execute_http_request, execute_shell_command, execute_tool, send_notification, substitute_variables, }; -use super::WorkflowExecutor; impl WorkflowExecutor { /// Execute an action node - Real implementations @@ -288,8 +288,7 @@ impl WorkflowExecutor { // Substitute variables in prompt let resolved_prompt = substitute_variables(prompt, &execution.variables); - let resolved_system = - system_prompt.map(|s| substitute_variables(s, &execution.variables)); + let resolved_system = system_prompt.map(|s| substitute_variables(s, &execution.variables)); // Execute AI call (uses internal AI provider) let response = execute_ai_call( diff --git a/src/cortex-gui/src-tauri/src/factory/executor/control_flow.rs b/src/cortex-gui/src-tauri/src/factory/executor/control_flow.rs index 4f1068df..99601bdb 100644 --- a/src/cortex-gui/src-tauri/src/factory/executor/control_flow.rs +++ b/src/cortex-gui/src-tauri/src/factory/executor/control_flow.rs @@ -5,8 +5,8 @@ use crate::factory::types::{ExecutionState, Workflow, WorkflowNode}; -use super::helpers::evaluate_expression; use super::WorkflowExecutor; +use super::helpers::evaluate_expression; impl WorkflowExecutor { /// Execute a condition node diff --git a/src/cortex-gui/src-tauri/src/factory/executor/mod.rs b/src/cortex-gui/src-tauri/src/factory/executor/mod.rs index 8a815a6f..f0d53e43 100644 --- a/src/cortex-gui/src-tauri/src/factory/executor/mod.rs +++ b/src/cortex-gui/src-tauri/src/factory/executor/mod.rs @@ -13,8 +13,7 @@ pub mod types; use std::collections::HashMap; use crate::factory::types::{ - ActionType, ExecutionState, ExecutionStatus, NodeExecutionResult, NodeType, Workflow, - WorkflowNode, + ExecutionState, ExecutionStatus, NodeExecutionResult, NodeType, Workflow, WorkflowNode, }; use helpers::now_ms; diff --git a/src/cortex-gui/src-tauri/src/factory/executor/triggers.rs b/src/cortex-gui/src-tauri/src/factory/executor/triggers.rs index 9206c569..ee576786 100644 --- a/src/cortex-gui/src-tauri/src/factory/executor/triggers.rs +++ b/src/cortex-gui/src-tauri/src/factory/executor/triggers.rs @@ -5,8 +5,8 @@ use crate::factory::types::{ExecutionState, TriggerType, WorkflowNode}; -use super::helpers::now_ms; use super::WorkflowExecutor; +use super::helpers::now_ms; impl WorkflowExecutor { /// Execute a trigger node diff --git a/src/cortex-gui/src-tauri/src/factory/persistence.rs b/src/cortex-gui/src-tauri/src/factory/persistence.rs index 5b284abd..958c4b42 100755 --- a/src/cortex-gui/src-tauri/src/factory/persistence.rs +++ b/src/cortex-gui/src-tauri/src/factory/persistence.rs @@ -4,7 +4,7 @@ //! to the `.cortex/factory/` directory. use std::fs::{self, File}; -use std::io::{BufReader, BufWriter, Write}; +use std::io::{BufReader, BufWriter}; use std::path::PathBuf; use super::types::{AgentRuntimeState, InterceptionRule, Workflow, WorkflowExport}; diff --git a/src/cortex-gui/src-tauri/src/formatter/mod.rs b/src/cortex-gui/src-tauri/src/formatter/mod.rs index f18c8e31..c287f305 100644 --- a/src/cortex-gui/src-tauri/src/formatter/mod.rs +++ b/src/cortex-gui/src-tauri/src/formatter/mod.rs @@ -8,24 +8,3 @@ pub mod commands; mod handlers; mod prettier; mod types; - -// Re-export types for external use -pub use types::{ - ConfigInfo, FormatRange, FormatRequest, FormatResult, FormatterInfo, FormatterOptions, - FormatterType, -}; - -// Re-export Tauri commands -pub use commands::{ - formatter_check_available, formatter_detect_config, formatter_format, formatter_format_with, - formatter_get_parser, -}; - -// Re-export Tauri command macro-generated items -pub use commands::{ - __cmd__formatter_check_available, __cmd__formatter_detect_config, __cmd__formatter_format, - __cmd__formatter_format_with, __cmd__formatter_get_parser, -}; - -// Re-export Prettier configuration constant -pub use prettier::PRETTIER_CONFIG_FILES; diff --git a/src/cortex-gui/src-tauri/src/fs/directory.rs b/src/cortex-gui/src-tauri/src/fs/directory.rs index beb18eb1..2331de0b 100644 --- a/src/cortex-gui/src-tauri/src/fs/directory.rs +++ b/src/cortex-gui/src-tauri/src/fs/directory.rs @@ -4,7 +4,6 @@ //! listing, and tree traversal with parallel processing. use futures::stream::{FuturesUnordered, StreamExt}; -use parking_lot::Mutex; use std::path::PathBuf; use std::sync::Arc; use tauri::{AppHandle, Manager}; @@ -15,9 +14,11 @@ use tracing::{info, warn}; use crate::fs::security::{validate_path_for_delete, validate_path_for_write}; use crate::fs::types::{ - CortexProject, DirectoryCache, FileEntry, FileMetadata, IoSemaphore, BATCH_SIZE, + BATCH_SIZE, CortexProject, DirectoryCache, FileEntry, FileMetadata, IoSemaphore, +}; +use crate::fs::utils::{ + get_extension, is_hidden, parallel_sort_entries, should_ignore, system_time_to_unix, }; -use crate::fs::utils::{get_extension, is_hidden, parallel_sort_entries, should_ignore, system_time_to_unix}; // ============================================================================ // Directory Create/Delete Operations diff --git a/src/cortex-gui/src-tauri/src/fs/mod.rs b/src/cortex-gui/src-tauri/src/fs/mod.rs index 69c9f4d0..a582d31a 100644 --- a/src/cortex-gui/src-tauri/src/fs/mod.rs +++ b/src/cortex-gui/src-tauri/src/fs/mod.rs @@ -33,12 +33,7 @@ pub mod watcher; pub mod workspace_edit; // Re-export types for public use -pub use types::{ - CortexProject, DirectoryCache, FileChangeEvent, FileEntry, FileMetadata, FileWatcherState, - IoSemaphore, ContentSearchResponse, SearchMatch, SearchResult, LineEnding, - TextEdit, TextEditPosition, TextEditRange, - BATCH_SIZE, CACHE_TTL_SECS, MAX_CACHE_ENTRIES, MAX_CONCURRENT_IO, -}; +pub use types::{DirectoryCache, FileEntry, FileWatcherState, IoSemaphore}; // Re-export everything from submodules for Tauri command registration // Note: Tauri's #[tauri::command] macro generates internal items that need to be accessible @@ -126,7 +121,7 @@ mod tests { #[test] fn test_parallel_sort() { use utils::parallel_sort_entries; - + let mut entries = vec![ FileEntry { name: "zebra.txt".to_string(), diff --git a/src/cortex-gui/src-tauri/src/fs/operations.rs b/src/cortex-gui/src-tauri/src/fs/operations.rs index c8ece06c..c6a86aa3 100644 --- a/src/cortex-gui/src-tauri/src/fs/operations.rs +++ b/src/cortex-gui/src-tauri/src/fs/operations.rs @@ -9,7 +9,9 @@ use tauri::{AppHandle, Manager}; use tokio::fs; use tracing::info; -use crate::fs::security::{validate_path_for_delete, validate_path_for_read, validate_path_for_write}; +use crate::fs::security::{ + validate_path_for_delete, validate_path_for_read, validate_path_for_write, +}; use crate::fs::types::DirectoryCache; // ============================================================================ diff --git a/src/cortex-gui/src-tauri/src/fs/search.rs b/src/cortex-gui/src-tauri/src/fs/search.rs index 5cd4844b..eb0401c3 100644 --- a/src/cortex-gui/src-tauri/src/fs/search.rs +++ b/src/cortex-gui/src-tauri/src/fs/search.rs @@ -16,9 +16,7 @@ use tokio::sync::Semaphore; use tokio::task::JoinSet; use tracing::{info, warn}; -use crate::fs::types::{ - ContentSearchResponse, FileEntry, IoSemaphore, SearchMatch, SearchResult, -}; +use crate::fs::types::{ContentSearchResponse, FileEntry, IoSemaphore, SearchMatch, SearchResult}; use crate::fs::utils::{get_extension, should_ignore, should_skip_for_search, system_time_to_unix}; // ============================================================================ diff --git a/src/cortex-gui/src-tauri/src/fs/workspace_edit.rs b/src/cortex-gui/src-tauri/src/fs/workspace_edit.rs index 0f17dd13..875d5ca5 100644 --- a/src/cortex-gui/src-tauri/src/fs/workspace_edit.rs +++ b/src/cortex-gui/src-tauri/src/fs/workspace_edit.rs @@ -3,7 +3,7 @@ //! This module provides support for applying workspace edits, primarily used //! by refactoring features like Rename Symbol. -use crate::fs::types::{TextEdit, TextEditPosition, TextEditRange}; +use crate::fs::types::TextEdit; /// Apply a set of text edits to a file /// @@ -111,6 +111,3 @@ pub async fn apply_workspace_edit(uri: String, edits: Vec) -> Result<( Ok(()) } - -// Re-export types for convenience -pub use crate::fs::types::{TextEdit as WorkspaceTextEdit, TextEditPosition as WorkspaceTextEditPosition, TextEditRange as WorkspaceTextEditRange}; diff --git a/src/cortex-gui/src-tauri/src/git/clone.rs b/src/cortex-gui/src-tauri/src/git/clone.rs index e6140ab9..a71b5122 100644 --- a/src/cortex-gui/src-tauri/src/git/clone.rs +++ b/src/cortex-gui/src-tauri/src/git/clone.rs @@ -1,14 +1,14 @@ //! Git clone operations with progress tracking. +use std::io::{BufRead, BufReader}; use std::path::Path; use std::process::Stdio; use std::time::{Duration, Instant}; -use std::io::{BufRead, BufReader}; use tauri::Emitter; use tracing::info; -use crate::process_utils; use super::types::CloneProgress; +use crate::process_utils; // ============================================================================ // Clone Commands diff --git a/src/cortex-gui/src-tauri/src/git/log.rs b/src/cortex-gui/src-tauri/src/git/log.rs index e71a2ea3..9e3507b0 100644 --- a/src/cortex-gui/src-tauri/src/git/log.rs +++ b/src/cortex-gui/src-tauri/src/git/log.rs @@ -3,9 +3,9 @@ use git2::BranchType; use std::collections::HashMap; +use super::command::git_command_with_timeout; use super::helpers::find_repo; use super::types::{BranchComparison, GitCommit}; -use super::command::git_command_with_timeout; use std::path::Path; // ============================================================================ diff --git a/src/cortex-gui/src-tauri/src/git/mod.rs b/src/cortex-gui/src-tauri/src/git/mod.rs index 13b884cd..db618271 100644 --- a/src/cortex-gui/src-tauri/src/git/mod.rs +++ b/src/cortex-gui/src-tauri/src/git/mod.rs @@ -19,8 +19,8 @@ pub mod log; pub mod merge; pub mod rebase; pub mod remote; -pub mod stash; pub mod staging; +pub mod stash; pub mod status; pub mod submodule; pub mod tag; diff --git a/src/cortex-gui/src-tauri/src/git/rebase.rs b/src/cortex-gui/src-tauri/src/git/rebase.rs index 0386a2fd..eb017f64 100644 --- a/src/cortex-gui/src-tauri/src/git/rebase.rs +++ b/src/cortex-gui/src-tauri/src/git/rebase.rs @@ -1,6 +1,6 @@ //! Git rebase operations. -use git2::{BranchType, Oid, RepositoryState, StatusOptions}; +use git2::{Oid, RepositoryState, StatusOptions}; use std::path::Path; use tracing::{error, info}; diff --git a/src/cortex-gui/src-tauri/src/git/stash.rs b/src/cortex-gui/src-tauri/src/git/stash.rs index a967d547..766f340b 100644 --- a/src/cortex-gui/src-tauri/src/git/stash.rs +++ b/src/cortex-gui/src-tauri/src/git/stash.rs @@ -2,9 +2,9 @@ use std::path::Path; -use git2::build::CheckoutBuilder; use git2::StashApplyOptions; use git2::StashFlags; +use git2::build::CheckoutBuilder; use tracing::info; use super::command::git_command_with_timeout; diff --git a/src/cortex-gui/src-tauri/src/git/status.rs b/src/cortex-gui/src-tauri/src/git/status.rs index 4f667de4..986aa8a3 100644 --- a/src/cortex-gui/src-tauri/src/git/status.rs +++ b/src/cortex-gui/src-tauri/src/git/status.rs @@ -3,7 +3,7 @@ use git2::{BranchType, StatusOptions}; use tracing::info; -use super::cache::{cache_status, get_cached_status, MAX_STATUS_FILES}; +use super::cache::{MAX_STATUS_FILES, cache_status, get_cached_status}; use super::helpers::{find_repo, status_to_string}; use super::types::{ BranchesResponse, GitBranch, GitBranchResponse, GitFile, GitHeadResponse, GitRemote, diff --git a/src/cortex-gui/src-tauri/src/lib.rs b/src/cortex-gui/src-tauri/src/lib.rs index 0e4e6e29..6c887cb8 100755 --- a/src/cortex-gui/src-tauri/src/lib.rs +++ b/src/cortex-gui/src-tauri/src/lib.rs @@ -56,8 +56,7 @@ use std::sync::{Arc, Mutex, OnceLock}; use serde::{Deserialize, Serialize}; use tauri::{AppHandle, Emitter, Manager, RunEvent, WebviewWindow, WindowEvent}; -use tauri_plugin_shell::ShellExt; -use tauri_plugin_shell::process::{CommandChild, CommandEvent}; +use tauri_plugin_shell::process::CommandChild; use tokio::sync::mpsc; use tracing::{error, info, warn}; @@ -142,7 +141,7 @@ use remote::RemoteManager; use repl::{KernelEvent, KernelInfo, KernelManager, KernelSpec}; use toolchain::ToolchainState; -const MAX_LOG_ENTRIES: usize = 500; +const _MAX_LOG_ENTRIES: usize = 500; /// Lazy initialization wrapper for heavy state managers. /// Uses `OnceLock` to defer initialization until first access. @@ -759,11 +758,11 @@ pub fn run() { toolchain::commands::toolchain_clear_cache, toolchain::commands::toolchain_get_env_for_project, // Formatter commands - formatter::formatter_format, - formatter::formatter_format_with, - formatter::formatter_detect_config, - formatter::formatter_check_available, - formatter::formatter_get_parser, + formatter::commands::formatter_format, + formatter::commands::formatter_format_with, + formatter::commands::formatter_detect_config, + formatter::commands::formatter_check_available, + formatter::commands::formatter_get_parser, // Language selector commands language_selector::language_detect_from_path, language_selector::language_detect_with_confidence, @@ -965,17 +964,17 @@ pub fn run() { ssh_terminal::ssh_exec, ssh_terminal::ssh_close_all, // Settings commands - settings::settings_load, - settings::settings_save, - settings::settings_get, - settings::settings_update, - settings::settings_reset, - settings::settings_reset_section, - settings::settings_get_path, - settings::settings_export, - settings::settings_import, - settings::settings_get_extension, - settings::settings_set_extension, + settings::commands::settings_load, + settings::commands::settings_save, + settings::commands::settings_get, + settings::commands::settings_update, + settings::commands::settings_reset, + settings::commands::settings_reset_section, + settings::commands::settings_get_path, + settings::commands::settings_export, + settings::commands::settings_import, + settings::commands::settings_get_extension, + settings::commands::settings_set_extension, // File System commands fs::fs_read_file, fs::fs_read_file_binary, @@ -1267,8 +1266,8 @@ pub fn run() { extensions::vscode::vscode_execute_command, extensions::vscode::vscode_get_command_palette_items, // Profile management commands - settings::profiles_save, - settings::profiles_load, + settings::profiles::profiles_save, + settings::profiles::profiles_load, // Remote port forwarding commands remote::commands::remote_forward_port, remote::commands::remote_stop_forward, diff --git a/src/cortex-gui/src-tauri/src/lsp/client/extended_features.rs b/src/cortex-gui/src-tauri/src/lsp/client/extended_features.rs index a39e3815..a8e4824d 100644 --- a/src/cortex-gui/src-tauri/src/lsp/client/extended_features.rs +++ b/src/cortex-gui/src-tauri/src/lsp/client/extended_features.rs @@ -328,11 +328,7 @@ impl LspClient { } /// Request inlay hints - pub async fn inlay_hints( - &self, - uri: &str, - range: Range, - ) -> Result> { + pub async fn inlay_hints(&self, uri: &str, range: Range) -> Result> { let lsp_params = json!({ "textDocument": { "uri": uri }, "range": { diff --git a/src/cortex-gui/src-tauri/src/lsp/commands/mod.rs b/src/cortex-gui/src-tauri/src/lsp/commands/mod.rs index 8057d101..760c29a7 100644 --- a/src/cortex-gui/src-tauri/src/lsp/commands/mod.rs +++ b/src/cortex-gui/src-tauri/src/lsp/commands/mod.rs @@ -26,57 +26,8 @@ pub use state::LspState; // Re-export the event setup function pub use events::setup_lsp_events; -// Re-export types from features module +// Re-export types from features module (used by lsp/client/extended_features.rs) pub use features::{ - Color, ColorInformation, ColorPresentation, DocumentHighlight, DocumentHighlightKind, - DocumentLink, FoldingRange, FoldingRangeKind, InlayHint, InlayHintKind, InlayHintLabelPart, - LinkedEditingRanges, SelectionRange, -}; - -// Re-export all Tauri commands for registration - -// Server lifecycle commands -pub use server::{ - lsp_clear_logs, lsp_get_logs, lsp_get_server_info, lsp_get_servers_for_language, - lsp_list_servers, lsp_restart, lsp_start_server, lsp_stop_all_servers, lsp_stop_server, -}; - -// Document notification commands -pub use document::{lsp_did_change, lsp_did_close, lsp_did_open, lsp_did_save}; - -// Navigation commands -pub use navigation::{ - lsp_definition, lsp_hover, lsp_implementation, lsp_references, lsp_type_definition, -}; - -// Completion commands -pub use completion::lsp_completion; - -// Code action commands -pub use actions::{lsp_code_action, lsp_execute_command, lsp_rename, lsp_signature_help}; - -// Formatting commands -pub use formatting::{lsp_format, lsp_format_range}; - -// Multi-provider commands -pub use multi_provider::{ - lsp_multi_code_action, lsp_multi_completion, lsp_multi_definition, lsp_multi_hover, - lsp_multi_implementation, lsp_multi_references, lsp_multi_type_definition, -}; - -// CodeLens commands -pub use code_lens::{lsp_code_lens, lsp_code_lens_resolve, lsp_multi_code_lens}; - -// Semantic tokens commands -pub use semantic_tokens::{lsp_multi_semantic_tokens, lsp_semantic_tokens}; - -// Document symbols command -pub use symbols::lsp_document_symbols; - -// Feature commands (highlights, links, selection, colors, folding, linked editing, inlay hints) -pub use features::{ - lsp_color_presentations, lsp_document_colors, lsp_document_highlights, lsp_document_links, - lsp_folding_ranges, lsp_inlay_hints, lsp_linked_editing_ranges, - lsp_multi_document_highlights, lsp_multi_document_links, lsp_multi_folding_ranges, - lsp_multi_inlay_hints, lsp_selection_ranges, + Color, ColorInformation, ColorPresentation, DocumentHighlight, DocumentLink, FoldingRange, + InlayHint, LinkedEditingRanges, SelectionRange, }; diff --git a/src/cortex-gui/src-tauri/src/lsp/mod.rs b/src/cortex-gui/src-tauri/src/lsp/mod.rs index 2d9f0928..6b039300 100755 --- a/src/cortex-gui/src-tauri/src/lsp/mod.rs +++ b/src/cortex-gui/src-tauri/src/lsp/mod.rs @@ -10,47 +10,5 @@ pub mod client; pub mod commands; pub mod types; -pub use client::LspClient; -pub use types::*; - -// Re-export all Tauri commands from the commands module -pub use commands::{ - // State - LspState, - // Event setup - setup_lsp_events, - // Types from features - Color, ColorInformation, ColorPresentation, DocumentHighlight, DocumentHighlightKind, - DocumentLink, FoldingRange, FoldingRangeKind, InlayHint, InlayHintKind, InlayHintLabelPart, - LinkedEditingRanges, SelectionRange, - // Server lifecycle commands - lsp_start_server, lsp_stop_server, lsp_stop_all_servers, lsp_list_servers, - lsp_get_server_info, lsp_restart, lsp_get_logs, lsp_clear_logs, lsp_get_servers_for_language, - // Document notification commands - lsp_did_open, lsp_did_change, lsp_did_save, lsp_did_close, - // Navigation commands - lsp_hover, lsp_definition, lsp_references, lsp_type_definition, lsp_implementation, - // Completion commands - lsp_completion, - // Code action commands - lsp_signature_help, lsp_rename, lsp_code_action, lsp_execute_command, - // Formatting commands - lsp_format, lsp_format_range, - // Document symbols command - lsp_document_symbols, - // Multi-provider commands - lsp_multi_completion, lsp_multi_hover, lsp_multi_definition, lsp_multi_references, - lsp_multi_type_definition, lsp_multi_implementation, lsp_multi_code_action, - // CodeLens commands - lsp_code_lens, lsp_multi_code_lens, lsp_code_lens_resolve, - // Semantic tokens commands - lsp_semantic_tokens, lsp_multi_semantic_tokens, - // Feature commands - lsp_document_highlights, lsp_multi_document_highlights, - lsp_document_links, lsp_multi_document_links, - lsp_selection_ranges, - lsp_document_colors, lsp_color_presentations, - lsp_folding_ranges, lsp_multi_folding_ranges, - lsp_linked_editing_ranges, - lsp_inlay_hints, lsp_multi_inlay_hints, -}; +// Re-export state and event setup +pub use commands::{LspState, setup_lsp_events}; diff --git a/src/cortex-gui/src-tauri/src/mcp/tools.rs b/src/cortex-gui/src-tauri/src/mcp/tools.rs index ff1b79d2..bff161c5 100755 --- a/src/cortex-gui/src-tauri/src/mcp/tools.rs +++ b/src/cortex-gui/src-tauri/src/mcp/tools.rs @@ -304,9 +304,6 @@ async fn capture_window_screenshot_linux( window: &WebviewWindow, request: &ScreenshotRequest, ) -> Result { - use std::io::Read; - use std::process::Command; - // Create a temporary file for the screenshot let temp_dir = std::env::temp_dir(); let temp_file = temp_dir.join(format!("cortex_screenshot_{}.png", std::process::id())); @@ -358,10 +355,8 @@ async fn capture_window_screenshot_linux( #[cfg(target_os = "linux")] async fn capture_linux_screenshot( output_path: &str, - window: &WebviewWindow, + _window: &WebviewWindow, ) -> Result<(), String> { - use std::process::Command; - // Try gnome-screenshot first (most common on GNOME desktops) if let Ok(status) = crate::process_utils::command("gnome-screenshot") .args(["-w", "-f", output_path]) @@ -510,7 +505,7 @@ async fn handle_execute_js(app: &AppHandle, payload: Value) -> So Err(e) => return SocketResponse::error(format!("Invalid payload: {}", e)), }; - let window = match app.get_webview_window(&request.window_label) { + let _window = match app.get_webview_window(&request.window_label) { Some(w) => w, None => { return SocketResponse::error(format!("Window not found: {}", request.window_label)); diff --git a/src/cortex-gui/src-tauri/src/notebook.rs b/src/cortex-gui/src-tauri/src/notebook.rs index d43745fe..95cf7545 100644 --- a/src/cortex-gui/src-tauri/src/notebook.rs +++ b/src/cortex-gui/src-tauri/src/notebook.rs @@ -4,11 +4,10 @@ //! The commands bridge to the existing REPL kernel infrastructure. use crate::repl::{KernelEvent, KernelInfo, KernelManager}; -use serde::{Deserialize, Serialize}; -use std::sync::{Arc, Mutex}; +use std::sync::Mutex; use tauri::{AppHandle, Emitter, Manager, command}; use tokio::sync::mpsc; -use tracing::{info, warn}; +use tracing::info; /// Notebook-specific kernel state pub struct NotebookKernelState { diff --git a/src/cortex-gui/src-tauri/src/process.rs b/src/cortex-gui/src-tauri/src/process.rs index 853128df..0ac97e3a 100644 --- a/src/cortex-gui/src-tauri/src/process.rs +++ b/src/cortex-gui/src-tauri/src/process.rs @@ -4,7 +4,7 @@ use serde::{Deserialize, Serialize}; use tauri::command; -use tracing::{info, warn}; +use tracing::info; /// Process information structure #[derive(Debug, Clone, Serialize, Deserialize)] diff --git a/src/cortex-gui/src-tauri/src/process_utils.rs b/src/cortex-gui/src-tauri/src/process_utils.rs index 0878e58b..f0ff44cc 100644 --- a/src/cortex-gui/src-tauri/src/process_utils.rs +++ b/src/cortex-gui/src-tauri/src/process_utils.rs @@ -12,6 +12,7 @@ pub const CREATE_NO_WINDOW: u32 = 0x08000000; /// Create a std::process::Command that doesn't show a window on Windows pub fn command(program: &str) -> std::process::Command { + #[allow(unused_mut)] let mut cmd = std::process::Command::new(program); #[cfg(windows)] cmd.creation_flags(CREATE_NO_WINDOW); @@ -20,6 +21,7 @@ pub fn command(program: &str) -> std::process::Command { /// Create a tokio::process::Command that doesn't show a window on Windows pub fn async_command(program: &str) -> tokio::process::Command { + #[allow(unused_mut)] let mut cmd = tokio::process::Command::new(program); #[cfg(windows)] cmd.creation_flags(CREATE_NO_WINDOW); diff --git a/src/cortex-gui/src-tauri/src/remote/manager.rs b/src/cortex-gui/src-tauri/src/remote/manager.rs index ff19932d..a633fbea 100644 --- a/src/cortex-gui/src-tauri/src/remote/manager.rs +++ b/src/cortex-gui/src-tauri/src/remote/manager.rs @@ -9,7 +9,7 @@ use std::sync::{Arc, Mutex}; use tokio::sync::RwLock; use tracing::info; -use super::connection::{set_file_permissions, SshConnection}; +use super::connection::{SshConnection, set_file_permissions}; use super::credentials::{SecureAuthCredentials, SecureSshCredentials}; use super::error::RemoteError; use super::types::{ diff --git a/src/cortex-gui/src-tauri/src/remote/mod.rs b/src/cortex-gui/src-tauri/src/remote/mod.rs index 278a63fc..b448d208 100644 --- a/src/cortex-gui/src-tauri/src/remote/mod.rs +++ b/src/cortex-gui/src-tauri/src/remote/mod.rs @@ -21,12 +21,6 @@ pub mod manager; pub mod types; // Re-export main types for backwards compatibility -pub use commands::*; -pub use connection::{set_file_permissions, SshConnection}; -pub use credentials::{SecureAuthCredentials, SecureSshCredentials}; -pub use error::RemoteError; +pub use credentials::SecureAuthCredentials; pub use manager::RemoteManager; -pub use types::{ - AuthMethod, CommandResult, ConnectionInfo, ConnectionProfile, ConnectionStatus, PortForward, - RemoteFileEntry, RemoteFileNode, -}; +pub use types::AuthMethod; diff --git a/src/cortex-gui/src-tauri/src/repl/kernel.rs b/src/cortex-gui/src-tauri/src/repl/kernel.rs index e3d0dddd..9d5293be 100755 --- a/src/cortex-gui/src-tauri/src/repl/kernel.rs +++ b/src/cortex-gui/src-tauri/src/repl/kernel.rs @@ -2,14 +2,15 @@ use std::collections::HashMap; use std::io::{BufRead, BufReader, Write}; -use std::process::{Child, Command, Stdio}; +use std::process::{Child, Stdio}; use std::sync::{Arc, Mutex}; use std::thread; use std::time::{SystemTime, UNIX_EPOCH}; -use serde_json; use tokio::sync::mpsc; -use tracing::{error, info, warn}; +use tracing::info; +#[cfg(windows)] +use tracing::warn; use super::types::*; diff --git a/src/cortex-gui/src-tauri/src/repl/mod.rs b/src/cortex-gui/src-tauri/src/repl/mod.rs index 0139df41..c8307da1 100755 --- a/src/cortex-gui/src-tauri/src/repl/mod.rs +++ b/src/cortex-gui/src-tauri/src/repl/mod.rs @@ -7,6 +7,5 @@ mod jupyter; mod kernel; mod types; -pub use jupyter::*; pub use kernel::*; pub use types::*; diff --git a/src/cortex-gui/src-tauri/src/rules_library.rs b/src/cortex-gui/src-tauri/src/rules_library.rs index 7390dd1c..65d18904 100755 --- a/src/cortex-gui/src-tauri/src/rules_library.rs +++ b/src/cortex-gui/src-tauri/src/rules_library.rs @@ -3,13 +3,12 @@ //! This module provides file system operations for .rules files, //! including scanning project directories, reading, writing, and deleting rules files. -use notify::{Config, Event, EventKind, RecommendedWatcher, RecursiveMode, Watcher}; +use notify::{Event, EventKind, RecommendedWatcher, RecursiveMode, Watcher}; use parking_lot::Mutex; use serde::{Deserialize, Serialize}; use std::collections::HashMap; use std::path::{Path, PathBuf}; -use std::sync::Arc; -use tauri::{AppHandle, Emitter, Manager}; +use tauri::{AppHandle, Emitter}; use tokio::sync::mpsc; use tracing::{debug, error, info, warn}; diff --git a/src/cortex-gui/src-tauri/src/settings/commands.rs b/src/cortex-gui/src-tauri/src/settings/commands.rs index 3d116c5b..ecdba663 100644 --- a/src/cortex-gui/src-tauri/src/settings/commands.rs +++ b/src/cortex-gui/src-tauri/src/settings/commands.rs @@ -15,9 +15,7 @@ use tauri::{AppHandle, Manager}; use tracing::info; use super::secure_store::SecureApiKeyStore; -use super::storage::{ - ensure_settings_dir, get_settings_path, set_file_permissions, SettingsState, -}; +use super::storage::{SettingsState, ensure_settings_dir, get_settings_path, set_file_permissions}; use super::types::{ AISettings, CommandPaletteSettings, CortexSettings, DebugSettings, EditorSettings, ExplorerSettings, ExtensionSettingsMap, FilesSettings, HttpSettings, LanguageEditorOverride, diff --git a/src/cortex-gui/src-tauri/src/settings/mod.rs b/src/cortex-gui/src-tauri/src/settings/mod.rs index ad8a0457..890210a4 100644 --- a/src/cortex-gui/src-tauri/src/settings/mod.rs +++ b/src/cortex-gui/src-tauri/src/settings/mod.rs @@ -30,38 +30,5 @@ pub const SETTINGS_VERSION: u32 = 2; /// Keyring service name for secure settings pub const KEYRING_SERVICE: &str = "Cortex-desktop"; -// Re-export types -pub use types::{ - AISettings, CommandPaletteSettings, CortexSettings, DebugSettings, EditorSettings, - ExplorerSettings, ExtensionSettingsMap, FilesSettings, GitSettings, HttpSettings, - LanguageEditorOverride, ScreencastModeSettings, SearchSettings, SecuritySettings, - TerminalSettings, ThemeSettings, WorkbenchSettings, ZenModeSettings, -}; - -// Re-export secure store -pub use secure_store::{get_api_key_internal, SecureApiKeyStore}; - // Re-export storage -pub use storage::{preload_settings, SettingsState}; - -// Re-export commands (for Tauri invoke_handler) -// We need to re-export both the functions and the Tauri-generated __cmd__ items -pub use commands::{ - settings_delete_api_key, settings_export, settings_get, settings_get_api_key_exists, - settings_get_extension, settings_get_path, settings_import, settings_load, settings_reset, - settings_reset_section, settings_save, settings_set_api_key, settings_set_extension, - settings_update, -}; - -// Re-export Tauri command macro-generated items -pub use commands::{ - __cmd__settings_delete_api_key, __cmd__settings_export, __cmd__settings_get, - __cmd__settings_get_api_key_exists, __cmd__settings_get_extension, __cmd__settings_get_path, - __cmd__settings_import, __cmd__settings_load, __cmd__settings_reset, - __cmd__settings_reset_section, __cmd__settings_save, __cmd__settings_set_api_key, - __cmd__settings_set_extension, __cmd__settings_update, -}; - -// Re-export profiles commands -pub use profiles::{profiles_load, profiles_save}; -pub use profiles::{__cmd__profiles_load, __cmd__profiles_save}; +pub use storage::{SettingsState, preload_settings}; diff --git a/src/cortex-gui/src-tauri/src/settings/types.rs b/src/cortex-gui/src-tauri/src/settings/types.rs index abe5975e..e31add29 100644 --- a/src/cortex-gui/src-tauri/src/settings/types.rs +++ b/src/cortex-gui/src-tauri/src/settings/types.rs @@ -8,8 +8,8 @@ use serde::{Deserialize, Serialize}; use std::collections::HashMap; -use super::secure_store::SecureApiKeyStore; use super::SETTINGS_VERSION; +use super::secure_store::SecureApiKeyStore; /// Editor-related settings #[derive(Debug, Clone, Serialize, Deserialize)] diff --git a/src/cortex-gui/src-tauri/src/ssh_terminal.rs b/src/cortex-gui/src-tauri/src/ssh_terminal.rs index 3d9dac27..7b778b8b 100755 --- a/src/cortex-gui/src-tauri/src/ssh_terminal.rs +++ b/src/cortex-gui/src-tauri/src/ssh_terminal.rs @@ -25,7 +25,7 @@ use tauri::{AppHandle, Emitter, Manager}; use tracing::{error, info, warn}; use uuid::Uuid; -use crate::remote::{AuthMethod, SecureAuthCredentials, SecureSshCredentials}; +use crate::remote::{AuthMethod, SecureAuthCredentials}; /// Output batching interval in milliseconds const OUTPUT_BATCH_INTERVAL_MS: u64 = 16; @@ -515,7 +515,7 @@ impl SSHTerminalState { .get(session_id) .ok_or_else(|| format!("Session {} not found", session_id))?; - let mut session = session.lock(); + let session = session.lock(); { let channel = session.channel.clone(); drop(session); // Release session lock temporarily diff --git a/src/cortex-gui/src-tauri/src/tasks.rs b/src/cortex-gui/src-tauri/src/tasks.rs index a7bf729f..1bad59da 100644 --- a/src/cortex-gui/src-tauri/src/tasks.rs +++ b/src/cortex-gui/src-tauri/src/tasks.rs @@ -7,7 +7,6 @@ use serde::{Deserialize, Serialize}; use std::collections::HashMap; use std::path::PathBuf; use std::process::Stdio; -use tokio::process::Command; /// Task definition from tasks.json #[derive(Debug, Clone, Serialize, Deserialize)] diff --git a/src/cortex-gui/src-tauri/src/terminal/commands.rs b/src/cortex-gui/src-tauri/src/terminal/commands.rs index 8fd727da..7fdef037 100644 --- a/src/cortex-gui/src-tauri/src/terminal/commands.rs +++ b/src/cortex-gui/src-tauri/src/terminal/commands.rs @@ -7,9 +7,7 @@ use tracing::info; use super::process::{get_process_on_port_impl, kill_process_by_pid, list_listening_ports_impl}; use super::state::TerminalState; -use super::types::{ - CreateTerminalOptions, PortProcess, TerminalInfo, UpdateTerminalOptions, -}; +use super::types::{CreateTerminalOptions, PortProcess, TerminalInfo, UpdateTerminalOptions}; // ===== Terminal Commands ===== diff --git a/src/cortex-gui/src-tauri/src/terminal/mod.rs b/src/cortex-gui/src-tauri/src/terminal/mod.rs index 876c418b..ea887612 100644 --- a/src/cortex-gui/src-tauri/src/terminal/mod.rs +++ b/src/cortex-gui/src-tauri/src/terminal/mod.rs @@ -28,18 +28,7 @@ mod state; mod types; // Re-export public types for external use -pub use types::{ - CreateTerminalOptions, PortProcess, TerminalInfo, TerminalOutput, TerminalStatus, - UpdateTerminalOptions, -}; +pub use types::CreateTerminalOptions; // Re-export state pub use state::TerminalState; - -// Re-export all Tauri commands for the invoke_handler -pub use commands::{ - get_process_on_port, kill_process_on_port, list_listening_ports, path_exists, - terminal_ack, terminal_close, terminal_close_all, terminal_create, terminal_detect_shells, - terminal_get, terminal_get_default_shell, terminal_list, terminal_resize, terminal_send_eof, - terminal_send_interrupt, terminal_update, terminal_write, -}; diff --git a/src/cortex-gui/src-tauri/src/terminal/process.rs b/src/cortex-gui/src-tauri/src/terminal/process.rs index 72e9671b..f99ed573 100644 --- a/src/cortex-gui/src-tauri/src/terminal/process.rs +++ b/src/cortex-gui/src-tauri/src/terminal/process.rs @@ -3,8 +3,6 @@ //! Provides functions for killing processes and process trees, //! used when closing terminals and managing port conflicts. -use tracing::info; - /// Kill a process and all its child processes (process tree) /// This is important for terminals as the shell may spawn child processes pub fn kill_process_tree(pid: u32) -> Result<(), String> { @@ -325,8 +323,8 @@ pub fn get_process_on_port_impl(port: u16) -> Result Result, String> { - use std::collections::HashMap; use super::types::PortProcess; + use std::collections::HashMap; let mut processes: Vec = Vec::new(); let mut seen_ports: HashMap = HashMap::new(); @@ -382,8 +380,8 @@ pub fn list_listening_ports_impl() -> Result, Str #[cfg(any(target_os = "linux", target_os = "macos"))] pub fn list_listening_ports_impl() -> Result, String> { - use std::collections::HashMap; use super::types::PortProcess; + use std::collections::HashMap; let mut processes: Vec = Vec::new(); let mut seen_ports: HashMap = HashMap::new(); diff --git a/src/cortex-gui/src-tauri/src/terminal/state.rs b/src/cortex-gui/src-tauri/src/terminal/state.rs index e7fe799e..8366bdfd 100644 --- a/src/cortex-gui/src-tauri/src/terminal/state.rs +++ b/src/cortex-gui/src-tauri/src/terminal/state.rs @@ -19,10 +19,8 @@ use uuid::Uuid; use super::constants::{DANGEROUS_ENV_VARS, OUTPUT_BUFFER_MAX_SIZE, PTY_READ_BUFFER_SIZE}; use super::flow_control::{FlowController, OutputBatcher}; use super::process::kill_process_tree; -use super::shell_integration::{inject_shell_integration, SHELL_INTEGRATION_PWSH}; -use super::types::{ - CreateTerminalOptions, TerminalInfo, TerminalStatus, UpdateTerminalOptions, -}; +use super::shell_integration::{SHELL_INTEGRATION_PWSH, inject_shell_integration}; +use super::types::{CreateTerminalOptions, TerminalInfo, TerminalStatus, UpdateTerminalOptions}; /// Terminal state stored in Tauri app state #[derive(Clone)] diff --git a/src/cortex-gui/src-tauri/src/terminal/types.rs b/src/cortex-gui/src-tauri/src/terminal/types.rs index 13f97e47..1cb40ea6 100644 --- a/src/cortex-gui/src-tauri/src/terminal/types.rs +++ b/src/cortex-gui/src-tauri/src/terminal/types.rs @@ -2,8 +2,8 @@ //! //! Contains all the data structures used by the terminal PTY system. -use std::collections::HashMap; use serde::{Deserialize, Serialize}; +use std::collections::HashMap; /// Information about a terminal #[derive(Debug, Clone, Serialize, Deserialize)] diff --git a/src/cortex-gui/src-tauri/src/testing/execution.rs b/src/cortex-gui/src-tauri/src/testing/execution.rs index 009acfe4..eba478f9 100644 --- a/src/cortex-gui/src-tauri/src/testing/execution.rs +++ b/src/cortex-gui/src-tauri/src/testing/execution.rs @@ -2,12 +2,10 @@ use std::path::PathBuf; use std::process::Stdio; -use tokio::io::{AsyncBufReadExt, BufReader}; use tauri::{AppHandle, Emitter, Manager}; +use tokio::io::{AsyncBufReadExt, BufReader}; use uuid::Uuid; -use super::types::TestFramework; - /// Run tests with the specified framework #[tauri::command] pub async fn testing_run( diff --git a/src/cortex-gui/src-tauri/src/testing/mod.rs b/src/cortex-gui/src-tauri/src/testing/mod.rs index 2809fb50..d2dad609 100644 --- a/src/cortex-gui/src-tauri/src/testing/mod.rs +++ b/src/cortex-gui/src-tauri/src/testing/mod.rs @@ -15,24 +15,5 @@ pub mod single_test; pub mod types; pub mod watch; -// Re-export types -pub use types::{ - FrameworkDetection, TestFramework, TestItem, TestItemKind, TestResult, TestRunResult, - TestStatus, -}; - -// Re-export coverage types -pub use coverage::{ - BranchCoverage, CoverageReport, CoverageSummary, FileCoverage, LineCoverage, -}; - // Re-export watch state pub use watch::TestWatcherState; - -// Re-export Tauri commands -pub use coverage::{testing_coverage, testing_get_file_coverage}; -pub use detection::testing_detect_framework; -pub use discovery::testing_discover; -pub use execution::{glob_files, testing_run, testing_run_streaming, testing_stop}; -pub use single_test::testing_run_single_test; -pub use watch::{testing_stop_all_watchers, testing_stop_watch, testing_watch}; diff --git a/src/cortex-gui/src-tauri/src/toolchain.rs b/src/cortex-gui/src-tauri/src/toolchain.rs index edf4e5af..963ea949 100755 --- a/src/cortex-gui/src-tauri/src/toolchain.rs +++ b/src/cortex-gui/src-tauri/src/toolchain.rs @@ -7,7 +7,6 @@ use parking_lot::Mutex; use serde::{Deserialize, Serialize}; use std::collections::HashMap; use std::path::{Path, PathBuf}; -use std::process::Command; use std::sync::Arc; use tracing::debug; diff --git a/src/cortex-gui/src-tauri/src/workspace_settings.rs b/src/cortex-gui/src-tauri/src/workspace_settings.rs index 5ad25c43..95a77491 100755 --- a/src/cortex-gui/src-tauri/src/workspace_settings.rs +++ b/src/cortex-gui/src-tauri/src/workspace_settings.rs @@ -10,11 +10,10 @@ use serde::{Deserialize, Serialize}; use serde_json::{Map, Value}; -use std::collections::HashMap; use std::fs; use std::path::{Path, PathBuf}; use tauri::Manager; -use tracing::{info, warn}; +use tracing::info; /// Workspace settings stored in .cortex/settings.json or .vscode/settings.json #[derive(Debug, Clone, Serialize, Deserialize, Default)] diff --git a/src/cortex-gui/src-tauri/src/wsl.rs b/src/cortex-gui/src-tauri/src/wsl.rs index 971f0cd6..85c51b83 100755 --- a/src/cortex-gui/src-tauri/src/wsl.rs +++ b/src/cortex-gui/src-tauri/src/wsl.rs @@ -11,12 +11,11 @@ use serde::{Deserialize, Serialize}; use std::collections::HashMap; -use std::process::Command; use std::sync::Arc; use tauri::{AppHandle, Manager}; use thiserror::Error; use tokio::sync::RwLock; -use tracing::{info, warn}; +use tracing::info; /// Shell-escape a path for safe use in shell commands. /// Uses single quotes and escapes any embedded single quotes. @@ -271,18 +270,18 @@ impl WSLManager { } /// Connect to a WSL distribution - pub async fn connect(&self, distro_name: &str) -> Result { + pub async fn connect(&self, _distro_name: &str) -> Result { #[cfg(target_os = "windows")] { // Verify the distro exists let detection = Self::detect_distributions()?; - if !detection.distros.iter().any(|d| d.name == distro_name) { - return Err(WSLError::DistroNotFound(distro_name.to_string())); + if !detection.distros.iter().any(|d| d.name == _distro_name) { + return Err(WSLError::DistroNotFound(_distro_name.to_string())); } // Get the home directory in WSL let output = crate::process_utils::command("wsl") - .args(["-d", distro_name, "--", "echo", "$HOME"]) + .args(["-d", _distro_name, "--", "echo", "$HOME"]) .output() .map_err(|e| WSLError::ExecutionFailed(e.to_string()))?; @@ -296,17 +295,17 @@ impl WSLManager { // Convert to Windows path for cross-platform access let wsl_path = format!( "\\\\wsl$\\{}\\{}", - distro_name, + _distro_name, home_path.trim_start_matches('/') ); // Store connection { let mut connections = self.connections.write().await; - connections.insert(distro_name.to_string(), wsl_path.clone()); + connections.insert(_distro_name.to_string(), wsl_path.clone()); } - info!("Connected to WSL distribution: {}", distro_name); + info!("Connected to WSL distribution: {}", _distro_name); Ok(WSLConnectionResult { base_path: wsl_path, }) @@ -328,23 +327,23 @@ impl WSLManager { /// Execute a command in a WSL distribution pub fn execute( - distro_name: &str, - command: &str, - working_dir: Option<&str>, + _distro_name: &str, + _command: &str, + _working_dir: Option<&str>, ) -> Result { #[cfg(target_os = "windows")] { let mut cmd = crate::process_utils::command("wsl"); - cmd.args(["-d", distro_name, "--"]); + cmd.args(["-d", _distro_name, "--"]); - if let Some(cwd) = working_dir { + if let Some(cwd) = _working_dir { // SECURITY: Escape the working directory path to prevent command injection let escaped_cwd = shell_escape_path(cwd); // NOTE: The command itself is passed as-is because it's intentionally // user-provided shell code. Only the working directory is escaped. - cmd.args(["sh", "-c", &format!("cd {} && {}", escaped_cwd, command)]); + cmd.args(["sh", "-c", &format!("cd {} && {}", escaped_cwd, _command)]); } else { - cmd.args(["sh", "-c", command]); + cmd.args(["sh", "-c", _command]); } let output = cmd @@ -365,18 +364,18 @@ impl WSLManager { } /// Open a folder in WSL - pub fn open_folder(distro_name: &str, folder_path: &str) -> Result<(), WSLError> { + pub fn open_folder(_distro_name: &str, _folder_path: &str) -> Result<(), WSLError> { #[cfg(target_os = "windows")] { // Convert WSL path to Windows UNC path if needed - let windows_path = if folder_path.starts_with('/') { + let windows_path = if _folder_path.starts_with('/') { format!( "\\\\wsl$\\{}{}", - distro_name, - folder_path.replace('/', "\\") + _distro_name, + _folder_path.replace('/', "\\") ) } else { - folder_path.to_string() + _folder_path.to_string() }; // Use explorer to open the folder @@ -385,7 +384,7 @@ impl WSLManager { .spawn() .map_err(|e| WSLError::ExecutionFailed(e.to_string()))?; - info!("Opened folder in WSL: {} -> {}", folder_path, windows_path); + info!("Opened folder in WSL: {} -> {}", _folder_path, windows_path); Ok(()) } diff --git a/src/cortex-login/src/lib.rs b/src/cortex-login/src/lib.rs index fbe39242..2694981c 100644 --- a/src/cortex-login/src/lib.rs +++ b/src/cortex-login/src/lib.rs @@ -18,8 +18,8 @@ pub mod types; mod utils; // Storage backends -pub mod keyring; mod encrypted; +pub mod keyring; mod legacy; // High-level APIs diff --git a/src/cortex-login/src/storage.rs b/src/cortex-login/src/storage.rs index c37b603c..ee742d93 100644 --- a/src/cortex-login/src/storage.rs +++ b/src/cortex-login/src/storage.rs @@ -7,9 +7,13 @@ use aes_gcm::aead::{OsRng, rand_core::RngCore}; use anyhow::Result; use std::path::Path; -use crate::encrypted::{delete_from_encrypted_file, load_from_encrypted_file, save_to_encrypted_file}; +use crate::encrypted::{ + delete_from_encrypted_file, load_from_encrypted_file, save_to_encrypted_file, +}; use crate::keyring::{delete_from_keyring, load_from_keyring, save_to_keyring}; -use crate::legacy::{delete_from_file_legacy, get_legacy_auth_path, load_from_file_legacy, save_to_file_legacy}; +use crate::legacy::{ + delete_from_file_legacy, get_legacy_auth_path, load_from_file_legacy, save_to_file_legacy, +}; use crate::types::{CredentialsStoreMode, SecureAuthData}; /// Load authentication data from storage. diff --git a/src/cortex-lsp/src/downloader/archive.rs b/src/cortex-lsp/src/downloader/archive.rs index 859fe255..499e242d 100644 --- a/src/cortex-lsp/src/downloader/archive.rs +++ b/src/cortex-lsp/src/downloader/archive.rs @@ -98,10 +98,7 @@ pub async fn extract_zip(archive_path: &Path, dest_dir: &Path) -> Result<()> { if !parent.starts_with(&dest_dir) { return Err(std::io::Error::new( std::io::ErrorKind::InvalidInput, - format!( - "Parent directory would escape destination: {}", - entry_name - ), + format!("Parent directory would escape destination: {}", entry_name), )); } std::fs::create_dir_all(parent)?; @@ -142,10 +139,7 @@ pub fn safe_tar_unpack( if !parent.starts_with(dest_dir) { return Err(std::io::Error::new( std::io::ErrorKind::InvalidInput, - format!( - "Parent directory would escape destination: {}", - entry_name - ), + format!("Parent directory would escape destination: {}", entry_name), )); } std::fs::create_dir_all(parent)?; diff --git a/src/cortex-lsp/src/downloader/tests.rs b/src/cortex-lsp/src/downloader/tests.rs index d73cbaf5..dec7e3a5 100644 --- a/src/cortex-lsp/src/downloader/tests.rs +++ b/src/cortex-lsp/src/downloader/tests.rs @@ -2,7 +2,9 @@ #[cfg(test)] mod tests { - use crate::downloader::{archive::validate_path_safe, core::LspDownloader, servers, types::InstallMethod}; + use crate::downloader::{ + archive::validate_path_safe, core::LspDownloader, servers, types::InstallMethod, + }; #[test] fn test_resolve_pattern() { diff --git a/src/cortex-mcp-server/src/lib.rs b/src/cortex-mcp-server/src/lib.rs index fa554c71..e7841551 100644 --- a/src/cortex-mcp-server/src/lib.rs +++ b/src/cortex-mcp-server/src/lib.rs @@ -40,7 +40,9 @@ mod server; pub use handlers::{AsyncToolHandler, FnToolHandler, ToolHandler}; // Provider types -pub use providers::{PromptProvider, ResourceProvider, StaticPromptProvider, StaticResourceProvider}; +pub use providers::{ + PromptProvider, ResourceProvider, StaticPromptProvider, StaticResourceProvider, +}; // Server types pub use server::{McpServer, ServerState}; diff --git a/src/cortex-mcp-server/src/server.rs b/src/cortex-mcp-server/src/server.rs index 5c7ee98f..96fb8d89 100644 --- a/src/cortex-mcp-server/src/server.rs +++ b/src/cortex-mcp-server/src/server.rs @@ -14,9 +14,9 @@ use tracing::{debug, error, info, warn}; use cortex_mcp_types::{ CallToolParams, CallToolResult, CancelledNotification, GetPromptParams, Implementation, InitializeParams, InitializeResult, JsonRpcError, JsonRpcNotification, JsonRpcRequest, - JsonRpcResponse, ListPromptsResult, ListResourcesResult, ListToolsResult, LogLevel, - LogMessage, ReadResourceParams, ReadResourceResult, RequestId, ServerCapabilities, - SetLogLevelParams, Tool, methods, + JsonRpcResponse, ListPromptsResult, ListResourcesResult, ListToolsResult, LogLevel, LogMessage, + ReadResourceParams, ReadResourceResult, RequestId, ServerCapabilities, SetLogLevelParams, Tool, + methods, }; use crate::handlers::ToolHandler; diff --git a/src/cortex-mcp-types/src/initialization.rs b/src/cortex-mcp-types/src/initialization.rs index e2ea5fc7..35f7d4c4 100644 --- a/src/cortex-mcp-types/src/initialization.rs +++ b/src/cortex-mcp-types/src/initialization.rs @@ -3,8 +3,8 @@ use schemars::JsonSchema; use serde::{Deserialize, Serialize}; -use crate::capabilities::{ClientCapabilities, ServerCapabilities}; use crate::PROTOCOL_VERSION; +use crate::capabilities::{ClientCapabilities, ServerCapabilities}; /// Initialize request parameters. #[derive(Debug, Clone, Serialize, Deserialize, JsonSchema)] diff --git a/src/cortex-mcp-types/src/lib.rs b/src/cortex-mcp-types/src/lib.rs index 4a183e4b..21754fd1 100644 --- a/src/cortex-mcp-types/src/lib.rs +++ b/src/cortex-mcp-types/src/lib.rs @@ -54,8 +54,8 @@ pub const LATEST_PROTOCOL_VERSION: &str = "2024-11-05"; // JSON-RPC types pub use jsonrpc::{ - ErrorCode, JsonRpcError, JsonRpcNotification, JsonRpcRequest, JsonRpcResponse, RequestId, - JSONRPC_VERSION, + ErrorCode, JSONRPC_VERSION, JsonRpcError, JsonRpcNotification, JsonRpcRequest, JsonRpcResponse, + RequestId, }; // Initialization types @@ -63,8 +63,8 @@ pub use initialization::{Implementation, InitializeParams, InitializeResult}; // Capability types pub use capabilities::{ - ClientCapabilities, LoggingCapability, PromptsCapability, ResourcesCapability, - RootsCapability, SamplingCapability, ServerCapabilities, ToolsCapability, + ClientCapabilities, LoggingCapability, PromptsCapability, ResourcesCapability, RootsCapability, + SamplingCapability, ServerCapabilities, ToolsCapability, }; // Tool types @@ -82,8 +82,8 @@ pub use resources::{ // Prompt types pub use prompts::{ - GetPromptParams, GetPromptResult, ListPromptsParams, ListPromptsResult, Prompt, - PromptArgument, PromptMessage, Role, + GetPromptParams, GetPromptResult, ListPromptsParams, ListPromptsResult, Prompt, PromptArgument, + PromptMessage, Role, }; // Content types @@ -103,5 +103,3 @@ pub use roots::{ListRootsResult, Root}; // Notification types pub use notifications::{CancelledNotification, ProgressNotification, ProgressToken}; - - diff --git a/src/cortex-plugins/src/hooks/ai_response_hooks.rs b/src/cortex-plugins/src/hooks/ai_response_hooks.rs index 50511b90..457a6eac 100644 --- a/src/cortex-plugins/src/hooks/ai_response_hooks.rs +++ b/src/cortex-plugins/src/hooks/ai_response_hooks.rs @@ -4,8 +4,8 @@ use async_trait::async_trait; use serde::{Deserialize, Serialize}; use std::collections::HashMap; -use crate::Result; use super::types::{HookPriority, HookResult}; +use crate::Result; // ============================================================================ // AI Response Before Hook diff --git a/src/cortex-plugins/src/hooks/chat_hooks.rs b/src/cortex-plugins/src/hooks/chat_hooks.rs index 68a7394e..74c81e95 100644 --- a/src/cortex-plugins/src/hooks/chat_hooks.rs +++ b/src/cortex-plugins/src/hooks/chat_hooks.rs @@ -3,8 +3,8 @@ use async_trait::async_trait; use serde::{Deserialize, Serialize}; -use crate::Result; use super::types::{HookPriority, HookResult}; +use crate::Result; /// Input for chat.message hook. #[derive(Debug, Clone, Serialize, Deserialize)] diff --git a/src/cortex-plugins/src/hooks/clipboard_hooks.rs b/src/cortex-plugins/src/hooks/clipboard_hooks.rs index 5405d2b8..9ddfcb80 100644 --- a/src/cortex-plugins/src/hooks/clipboard_hooks.rs +++ b/src/cortex-plugins/src/hooks/clipboard_hooks.rs @@ -3,8 +3,8 @@ use async_trait::async_trait; use serde::{Deserialize, Serialize}; -use crate::Result; use super::types::{HookPriority, HookResult}; +use crate::Result; // ============================================================================ // Clipboard Copy Hook diff --git a/src/cortex-plugins/src/hooks/command_hooks.rs b/src/cortex-plugins/src/hooks/command_hooks.rs index 86b093ee..ab086b9b 100644 --- a/src/cortex-plugins/src/hooks/command_hooks.rs +++ b/src/cortex-plugins/src/hooks/command_hooks.rs @@ -3,8 +3,8 @@ use async_trait::async_trait; use serde::{Deserialize, Serialize}; -use crate::Result; use super::types::{HookPriority, HookResult}; +use crate::Result; // ============================================================================ // Command Execute Before Hook diff --git a/src/cortex-plugins/src/hooks/config_hooks.rs b/src/cortex-plugins/src/hooks/config_hooks.rs index 35b58fd5..9805c157 100644 --- a/src/cortex-plugins/src/hooks/config_hooks.rs +++ b/src/cortex-plugins/src/hooks/config_hooks.rs @@ -3,8 +3,8 @@ use async_trait::async_trait; use serde::{Deserialize, Serialize}; -use crate::Result; use super::types::{HookPriority, HookResult}; +use crate::Result; /// Input for config.changed hook. #[derive(Debug, Clone, Serialize, Deserialize)] diff --git a/src/cortex-plugins/src/hooks/dispatcher.rs b/src/cortex-plugins/src/hooks/dispatcher.rs index e1a9677c..471ef8a3 100644 --- a/src/cortex-plugins/src/hooks/dispatcher.rs +++ b/src/cortex-plugins/src/hooks/dispatcher.rs @@ -2,14 +2,14 @@ use std::sync::Arc; -use crate::Result; -use super::types::HookResult; +use super::chat_hooks::{ChatMessageInput, ChatMessageOutput}; +use super::permission_hooks::{PermissionAskInput, PermissionAskOutput, PermissionDecision}; use super::registry::HookRegistry; use super::tool_hooks::{ ToolExecuteAfterInput, ToolExecuteAfterOutput, ToolExecuteBeforeInput, ToolExecuteBeforeOutput, }; -use super::chat_hooks::{ChatMessageInput, ChatMessageOutput}; -use super::permission_hooks::{PermissionAskInput, PermissionAskOutput, PermissionDecision}; +use super::types::HookResult; +use crate::Result; /// Dispatcher for executing hooks. pub struct HookDispatcher { diff --git a/src/cortex-plugins/src/hooks/error_hooks.rs b/src/cortex-plugins/src/hooks/error_hooks.rs index d34c908d..0d965d5c 100644 --- a/src/cortex-plugins/src/hooks/error_hooks.rs +++ b/src/cortex-plugins/src/hooks/error_hooks.rs @@ -5,8 +5,8 @@ use serde::{Deserialize, Serialize}; use std::collections::HashMap; use std::path::PathBuf; -use crate::Result; use super::types::{HookPriority, HookResult}; +use crate::Result; /// Input for error.handle hook - when an error occurs. #[derive(Debug, Clone, Serialize, Deserialize)] diff --git a/src/cortex-plugins/src/hooks/file_hooks.rs b/src/cortex-plugins/src/hooks/file_hooks.rs index dc12ff9f..c09820d1 100644 --- a/src/cortex-plugins/src/hooks/file_hooks.rs +++ b/src/cortex-plugins/src/hooks/file_hooks.rs @@ -4,8 +4,8 @@ use async_trait::async_trait; use serde::{Deserialize, Serialize}; use std::path::PathBuf; -use crate::Result; use super::types::{HookPriority, HookResult}; +use crate::Result; /// File operation types. #[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize)] diff --git a/src/cortex-plugins/src/hooks/focus_hooks.rs b/src/cortex-plugins/src/hooks/focus_hooks.rs index 4b34eeb4..0d5a3d87 100644 --- a/src/cortex-plugins/src/hooks/focus_hooks.rs +++ b/src/cortex-plugins/src/hooks/focus_hooks.rs @@ -3,8 +3,8 @@ use async_trait::async_trait; use serde::{Deserialize, Serialize}; -use crate::Result; use super::types::{HookPriority, HookResult}; +use crate::Result; /// Input for focus.change hook. #[derive(Debug, Clone, Serialize, Deserialize)] diff --git a/src/cortex-plugins/src/hooks/input_hooks.rs b/src/cortex-plugins/src/hooks/input_hooks.rs index 4d537c4f..b68ddb33 100644 --- a/src/cortex-plugins/src/hooks/input_hooks.rs +++ b/src/cortex-plugins/src/hooks/input_hooks.rs @@ -4,8 +4,8 @@ use async_trait::async_trait; use serde::{Deserialize, Serialize}; use std::path::PathBuf; -use crate::Result; use super::types::{HookPriority, HookResult}; +use crate::Result; /// Input for input.intercept hook - intercepts user input before processing. #[derive(Debug, Clone, Serialize, Deserialize)] diff --git a/src/cortex-plugins/src/hooks/mod.rs b/src/cortex-plugins/src/hooks/mod.rs index bc3f3177..83a23437 100644 --- a/src/cortex-plugins/src/hooks/mod.rs +++ b/src/cortex-plugins/src/hooks/mod.rs @@ -132,8 +132,8 @@ pub use dispatcher::HookDispatcher; #[cfg(test)] mod tests { use super::*; - use async_trait::async_trait; use crate::Result; + use async_trait::async_trait; use std::sync::Arc; struct TestBeforeHook { diff --git a/src/cortex-plugins/src/hooks/permission_hooks.rs b/src/cortex-plugins/src/hooks/permission_hooks.rs index 6df7459b..299e37ef 100644 --- a/src/cortex-plugins/src/hooks/permission_hooks.rs +++ b/src/cortex-plugins/src/hooks/permission_hooks.rs @@ -3,8 +3,8 @@ use async_trait::async_trait; use serde::{Deserialize, Serialize}; -use crate::Result; use super::types::HookPriority; +use crate::Result; /// Input for permission.ask hook. #[derive(Debug, Clone, Serialize, Deserialize)] diff --git a/src/cortex-plugins/src/hooks/prompt_hooks.rs b/src/cortex-plugins/src/hooks/prompt_hooks.rs index 13a9131b..1a8c879e 100644 --- a/src/cortex-plugins/src/hooks/prompt_hooks.rs +++ b/src/cortex-plugins/src/hooks/prompt_hooks.rs @@ -4,8 +4,8 @@ use async_trait::async_trait; use serde::{Deserialize, Serialize}; use std::path::PathBuf; -use crate::Result; use super::types::{HookPriority, HookResult}; +use crate::Result; /// Input for prompt.inject hook - allows modifying prompts before AI processing. #[derive(Debug, Clone, Serialize, Deserialize)] diff --git a/src/cortex-plugins/src/hooks/registry.rs b/src/cortex-plugins/src/hooks/registry.rs index 2fd0f01a..9ccf7039 100644 --- a/src/cortex-plugins/src/hooks/registry.rs +++ b/src/cortex-plugins/src/hooks/registry.rs @@ -3,11 +3,11 @@ use std::sync::Arc; use tokio::sync::RwLock; -use crate::manifest::HookType; -use super::types::HookPriority; -use super::tool_hooks::{ToolExecuteAfterHook, ToolExecuteBeforeHook}; use super::chat_hooks::ChatMessageHook; use super::permission_hooks::PermissionAskHook; +use super::tool_hooks::{ToolExecuteAfterHook, ToolExecuteBeforeHook}; +use super::types::HookPriority; +use crate::manifest::HookType; /// Registered hook with metadata for tool.execute.before hook type. pub(crate) struct RegisteredToolBeforeHook { diff --git a/src/cortex-plugins/src/hooks/session_hooks.rs b/src/cortex-plugins/src/hooks/session_hooks.rs index 9089931f..0c663421 100644 --- a/src/cortex-plugins/src/hooks/session_hooks.rs +++ b/src/cortex-plugins/src/hooks/session_hooks.rs @@ -4,9 +4,9 @@ use async_trait::async_trait; use serde::{Deserialize, Serialize}; use std::path::PathBuf; -use crate::Result; -use super::types::{HookPriority, HookResult}; use super::prompt_hooks::ContextDocument; +use super::types::{HookPriority, HookResult}; +use crate::Result; // ============================================================================ // Session Start Hook diff --git a/src/cortex-plugins/src/hooks/tool_hooks.rs b/src/cortex-plugins/src/hooks/tool_hooks.rs index eee3638d..48c116a3 100644 --- a/src/cortex-plugins/src/hooks/tool_hooks.rs +++ b/src/cortex-plugins/src/hooks/tool_hooks.rs @@ -4,8 +4,8 @@ use async_trait::async_trait; use serde::{Deserialize, Serialize}; use std::collections::HashMap; -use crate::Result; use super::types::{HookPriority, HookResult}; +use crate::Result; // ============================================================================ // Tool Execute Before Hook diff --git a/src/cortex-plugins/src/hooks/ui_hooks.rs b/src/cortex-plugins/src/hooks/ui_hooks.rs index ffcb54c0..ce93e9a6 100644 --- a/src/cortex-plugins/src/hooks/ui_hooks.rs +++ b/src/cortex-plugins/src/hooks/ui_hooks.rs @@ -4,8 +4,8 @@ use async_trait::async_trait; use serde::{Deserialize, Serialize}; use std::collections::HashMap; -use crate::Result; use super::types::{HookPriority, HookResult}; +use crate::Result; /// Input for ui.render hook. #[derive(Debug, Clone, Serialize, Deserialize)] diff --git a/src/cortex-plugins/src/hooks/workspace_hooks.rs b/src/cortex-plugins/src/hooks/workspace_hooks.rs index 1f9dfd5c..4b8f680e 100644 --- a/src/cortex-plugins/src/hooks/workspace_hooks.rs +++ b/src/cortex-plugins/src/hooks/workspace_hooks.rs @@ -5,9 +5,9 @@ use serde::{Deserialize, Serialize}; use std::collections::HashMap; use std::path::PathBuf; -use crate::Result; -use super::types::{HookPriority, HookResult}; use super::prompt_hooks::ContextDocument; +use super::types::{HookPriority, HookResult}; +use crate::Result; /// Input for workspace.changed hook. #[derive(Debug, Clone, Serialize, Deserialize)] diff --git a/src/cortex-prompt-harness/src/lib.rs b/src/cortex-prompt-harness/src/lib.rs index 5ba6f7b7..0cc8bae2 100644 --- a/src/cortex-prompt-harness/src/lib.rs +++ b/src/cortex-prompt-harness/src/lib.rs @@ -365,8 +365,10 @@ impl PromptHarness { /// Notify about tools discovered from an MCP server. pub fn notify_mcp_tools_discovered(&mut self, server_name: &str, tool_names: &[String]) { - self.notifier - .add(AgentNotification::mcp_tools_discovered(server_name, tool_names)); + self.notifier.add(AgentNotification::mcp_tools_discovered( + server_name, + tool_names, + )); } /// Check if there are pending notifications. diff --git a/src/cortex-sandbox/src/boundary.rs b/src/cortex-sandbox/src/boundary.rs index 3e2f91cb..53f9dfa9 100644 --- a/src/cortex-sandbox/src/boundary.rs +++ b/src/cortex-sandbox/src/boundary.rs @@ -350,7 +350,8 @@ mod tests { let _ = fs::create_dir_all(&other_dir); // Path in allowed root should be permitted - let result = validate_path_in_boundary(&other_dir, &test_dir, std::slice::from_ref(&other_dir)); + let result = + validate_path_in_boundary(&other_dir, &test_dir, std::slice::from_ref(&other_dir)); assert!(result.is_ok()); // Cleanup diff --git a/src/cortex-skills/src/lib.rs b/src/cortex-skills/src/lib.rs index b241c6a2..06ce2cd0 100644 --- a/src/cortex-skills/src/lib.rs +++ b/src/cortex-skills/src/lib.rs @@ -1,4 +1,8 @@ -#![allow(clippy::too_many_arguments, clippy::field_reassign_with_default, clippy::ptr_arg)] +#![allow( + clippy::too_many_arguments, + clippy::field_reassign_with_default, + clippy::ptr_arg +)] //! Skills system for Cortex CLI. //! //! This crate provides a complete skills framework with: diff --git a/src/cortex-tui-capture/src/capture.rs b/src/cortex-tui-capture/src/capture.rs index d04eb43d..e2983bcb 100644 --- a/src/cortex-tui-capture/src/capture.rs +++ b/src/cortex-tui-capture/src/capture.rs @@ -487,7 +487,7 @@ impl FrameCapture { StyleRendering::Plain => self.buffer.to_ascii(&self.config), StyleRendering::Ansi => self.buffer.to_ansi(&self.config), StyleRendering::Annotated => self.buffer.to_ascii(&self.config), // Fallback to ASCII (specialized rendering not yet implemented) - StyleRendering::HtmlTags => self.buffer.to_ascii(&self.config), // Fallback to ASCII (specialized rendering not yet implemented) + StyleRendering::HtmlTags => self.buffer.to_ascii(&self.config), // Fallback to ASCII (specialized rendering not yet implemented) }; let mut frame = CapturedFrame::new( diff --git a/src/cortex-tui-capture/src/lib.rs b/src/cortex-tui-capture/src/lib.rs index 95747afe..7dbec361 100644 --- a/src/cortex-tui-capture/src/lib.rs +++ b/src/cortex-tui-capture/src/lib.rs @@ -95,8 +95,8 @@ pub use integration::{CaptureManager, ExportResult, QuickCapture}; pub use mock_terminal::{MockBackend, MockTerminal}; pub use recorder::{SessionRecorder, SessionReport, SessionStats}; pub use screenshot_generator::{ - generate_all_screenshots, generate_screenshots_to, GeneratorConfig, GeneratorResult, - ScreenshotGenerator, ScreenshotScenario, DEFAULT_OUTPUT_DIR, + DEFAULT_OUTPUT_DIR, GeneratorConfig, GeneratorResult, ScreenshotGenerator, ScreenshotScenario, + generate_all_screenshots, generate_screenshots_to, }; pub use types::{ActionType, CaptureError, CaptureResult, CapturedFrame, TuiAction, TuiEvent}; diff --git a/src/cortex-tui-capture/src/screenshot_generator/mocks/mod.rs b/src/cortex-tui-capture/src/screenshot_generator/mocks/mod.rs index 854a904b..5bd30351 100644 --- a/src/cortex-tui-capture/src/screenshot_generator/mocks/mod.rs +++ b/src/cortex-tui-capture/src/screenshot_generator/mocks/mod.rs @@ -2,14 +2,14 @@ //! //! This module contains all the mock content generators organized by category. +mod input; +mod states; +mod tools; mod views; mod widgets; -mod tools; -mod states; -mod input; +pub use input::*; +pub use states::*; +pub use tools::*; pub use views::*; pub use widgets::*; -pub use tools::*; -pub use states::*; -pub use input::*; diff --git a/src/cortex-tui-capture/src/screenshot_generator/mod.rs b/src/cortex-tui-capture/src/screenshot_generator/mod.rs index e7388480..3bbaf644 100644 --- a/src/cortex-tui-capture/src/screenshot_generator/mod.rs +++ b/src/cortex-tui-capture/src/screenshot_generator/mod.rs @@ -32,7 +32,7 @@ mod scenarios; mod types; pub use generator::ScreenshotGenerator; -pub use types::{GeneratorConfig, GeneratorResult, ScreenshotScenario, DEFAULT_OUTPUT_DIR}; +pub use types::{DEFAULT_OUTPUT_DIR, GeneratorConfig, GeneratorResult, ScreenshotScenario}; use crate::types::CaptureResult; use std::path::PathBuf; diff --git a/src/cortex-tui/src/app/methods.rs b/src/cortex-tui/src/app/methods.rs index a7143fc0..0da67ab0 100644 --- a/src/cortex-tui/src/app/methods.rs +++ b/src/cortex-tui/src/app/methods.rs @@ -7,9 +7,9 @@ use crate::views::tool_call::{ContentSegment, ToolResultDisplay, ToolStatus}; use super::approval::ApprovalState; use super::session::ActiveModal; -use super::subagent::SubagentTaskDisplay; -use super::types::{ApprovalMode, AppView, FocusTarget, OperationMode}; use super::state::AppState; +use super::subagent::SubagentTaskDisplay; +use super::types::{AppView, ApprovalMode, FocusTarget, OperationMode}; // ============================================================================ // APPSTATE METHODS - Approval diff --git a/src/cortex-tui/src/app/mod.rs b/src/cortex-tui/src/app/mod.rs index f15d5f6e..7b9c9fe4 100644 --- a/src/cortex-tui/src/app/mod.rs +++ b/src/cortex-tui/src/app/mod.rs @@ -17,5 +17,7 @@ pub use autocomplete::{AutocompleteItem, AutocompleteState}; pub use session::{ActiveModal, SessionSummary}; pub use state::AppState; pub use streaming::StreamingState; -pub use subagent::{SubagentDisplayStatus, SubagentTaskDisplay, SubagentTodoItem, SubagentTodoStatus}; -pub use types::{ApprovalMode, AppView, AutocompleteTrigger, FocusTarget, OperationMode}; +pub use subagent::{ + SubagentDisplayStatus, SubagentTaskDisplay, SubagentTodoItem, SubagentTodoStatus, +}; +pub use types::{AppView, ApprovalMode, AutocompleteTrigger, FocusTarget, OperationMode}; diff --git a/src/cortex-tui/src/bridge/event_adapter/mod.rs b/src/cortex-tui/src/bridge/event_adapter/mod.rs index 1b29fcc2..60675c71 100644 --- a/src/cortex-tui/src/bridge/event_adapter/mod.rs +++ b/src/cortex-tui/src/bridge/event_adapter/mod.rs @@ -377,13 +377,12 @@ pub fn adapt_events(events: Vec) -> Vec { #[cfg(test)] mod tests { use super::*; - use crate::views::minimal_session::ChatMessage; + use cortex_core::widgets::chat::MessageRole; use cortex_protocol::{ AgentMessageDeltaEvent, AskForApproval, ConversationId, ExecApprovalRequestEvent, SandboxPolicy, SessionConfiguredEvent, TaskCompleteEvent, TaskStartedEvent, UserMessageEvent, }; - use cortex_core::widgets::chat::MessageRole; use std::path::PathBuf; fn make_event(msg: EventMsg) -> Event { diff --git a/src/cortex-tui/src/cards/mcp.rs b/src/cortex-tui/src/cards/mcp.rs index 80d4933a..d5f58e14 100644 --- a/src/cortex-tui/src/cards/mcp.rs +++ b/src/cortex-tui/src/cards/mcp.rs @@ -113,6 +113,7 @@ impl McpServerInfo { } /// Formats the server info for display (legacy method). + #[cfg(test)] fn format_display(&self) -> String { let symbol = self.status.symbol(); let name = &self.name; diff --git a/src/cortex-tui/src/cards/models.rs b/src/cortex-tui/src/cards/models.rs index 47f3708e..a5d0e48d 100644 --- a/src/cortex-tui/src/cards/models.rs +++ b/src/cortex-tui/src/cards/models.rs @@ -91,7 +91,7 @@ pub struct ModelsCard { /// Selection list widget. list: SelectionList, /// Currently active model ID. - current_model: Option, + _current_model: Option, /// Whether a selection has been made. completed: bool, } @@ -127,7 +127,7 @@ impl ModelsCard { Self { models, list, - current_model, + _current_model: current_model, completed: false, } } diff --git a/src/cortex-tui/src/commands/executor/dispatch.rs b/src/cortex-tui/src/commands/executor/dispatch.rs index 21c00176..92da5235 100644 --- a/src/cortex-tui/src/commands/executor/dispatch.rs +++ b/src/cortex-tui/src/commands/executor/dispatch.rs @@ -101,7 +101,7 @@ impl CommandExecutor { "mcp" => self.cmd_mcp(cmd), "mcp-tools" | "tools" | "lt" => CommandResult::OpenModal(ModalType::McpManager), "mcp-auth" | "auth" => CommandResult::OpenModal(ModalType::McpManager), - "mcp-reload" | "reload" => CommandResult::OpenModal(ModalType::McpManager), + "mcp-reload" => CommandResult::OpenModal(ModalType::McpManager), "mcp-logs" => CommandResult::OpenModal(ModalType::McpManager), // ============ DEBUG ============ diff --git a/src/cortex-tui/src/commands/forms.rs b/src/cortex-tui/src/commands/forms.rs index fa9bcfc8..00b42ae6 100644 --- a/src/cortex-tui/src/commands/forms.rs +++ b/src/cortex-tui/src/commands/forms.rs @@ -27,15 +27,19 @@ impl FormRegistry { "rename" => Some(FormState::new( "Rename Session", "rename", - vec![FormField::text("name", "New Session Name") - .required() - .with_placeholder("Enter new session name...")], + vec![ + FormField::text("name", "New Session Name") + .required() + .with_placeholder("Enter new session name..."), + ], )), "fork" => Some(FormState::new( "Fork Session", "fork", - vec![FormField::text("name", "Fork Name").with_placeholder("Optional fork name...")], + vec![ + FormField::text("name", "Fork Name").with_placeholder("Optional fork name..."), + ], )), "export" => Some(FormState::new( @@ -55,24 +59,30 @@ impl FormRegistry { "delete" => Some(FormState::new( "Delete Session", "delete", - vec![FormField::text("session_id", "Session ID") - .required() - .with_placeholder("Enter session ID to delete...")], + vec![ + FormField::text("session_id", "Session ID") + .required() + .with_placeholder("Enter session ID to delete..."), + ], )), "resume" => Some(FormState::new( "Resume Session", "resume", - vec![FormField::text("session_id", "Session ID") - .with_placeholder("Optional session ID (latest if empty)...")], + vec![ + FormField::text("session_id", "Session ID") + .with_placeholder("Optional session ID (latest if empty)..."), + ], )), "rewind" => Some(FormState::new( "Rewind Session", "rewind", - vec![FormField::number("steps", "Steps") - .with_placeholder("1") - .with_value("1")], + vec![ + FormField::number("steps", "Steps") + .with_placeholder("1") + .with_value("1"), + ], )), // ============================================================ @@ -81,9 +91,11 @@ impl FormRegistry { "goto" => Some(FormState::new( "Go To Message", "goto", - vec![FormField::number("message_number", "Message Number") - .required() - .with_placeholder("Enter message number...")], + vec![ + FormField::number("message_number", "Message Number") + .required() + .with_placeholder("Enter message number..."), + ], )), "scroll" => Some(FormState::new( @@ -104,16 +116,20 @@ impl FormRegistry { "search" => Some(FormState::new( "Search Messages", "search", - vec![FormField::text("pattern", "Search Pattern") - .required() - .with_placeholder("Enter search pattern...")], + vec![ + FormField::text("pattern", "Search Pattern") + .required() + .with_placeholder("Enter search pattern..."), + ], )), "diff" => Some(FormState::new( "Show Diff", "diff", - vec![FormField::text("file_path", "File Path") - .with_placeholder("Optional file path...")], + vec![ + FormField::text("file_path", "File Path") + .with_placeholder("Optional file path..."), + ], )), // ============================================================ @@ -122,41 +138,51 @@ impl FormRegistry { "ls" => Some(FormState::new( "List Directory", "ls", - vec![FormField::text("directory", "Directory Path") - .with_placeholder(".") - .with_value(".")], + vec![ + FormField::text("directory", "Directory Path") + .with_placeholder(".") + .with_value("."), + ], )), "tree" => Some(FormState::new( "Directory Tree", "tree", - vec![FormField::text("directory", "Directory Path") - .with_placeholder(".") - .with_value(".")], + vec![ + FormField::text("directory", "Directory Path") + .with_placeholder(".") + .with_value("."), + ], )), "mention" => Some(FormState::new( "Mention File/Symbol", "mention", - vec![FormField::text("target", "File or Symbol") - .required() - .with_placeholder("Enter file path or symbol name...")], + vec![ + FormField::text("target", "File or Symbol") + .required() + .with_placeholder("Enter file path or symbol name..."), + ], )), "add" => Some(FormState::new( "Add Files to Context", "add", - vec![FormField::text("files", "File Paths (space separated)") - .required() - .with_placeholder("path/to/file1 path/to/file2...")], + vec![ + FormField::text("files", "File Paths (space separated)") + .required() + .with_placeholder("path/to/file1 path/to/file2..."), + ], )), "remove" => Some(FormState::new( "Remove Files from Context", "remove", - vec![FormField::text("files", "File Paths (space separated)") - .required() - .with_placeholder("path/to/file1 path/to/file2...")], + vec![ + FormField::text("files", "File Paths (space separated)") + .required() + .with_placeholder("path/to/file1 path/to/file2..."), + ], )), // ============================================================ @@ -165,17 +191,21 @@ impl FormRegistry { "temperature" => Some(FormState::new( "Set Temperature", "temperature", - vec![FormField::number("value", "Value (0.0-2.0)") - .required() - .with_placeholder("0.7")], + vec![ + FormField::number("value", "Value (0.0-2.0)") + .required() + .with_placeholder("0.7"), + ], )), "tokens" => Some(FormState::new( "Set Max Tokens", "tokens", - vec![FormField::number("max_tokens", "Max Tokens") - .required() - .with_placeholder("4096")], + vec![ + FormField::number("max_tokens", "Max Tokens") + .required() + .with_placeholder("4096"), + ], )), "approval" => Some(FormState::new( @@ -208,24 +238,30 @@ impl FormRegistry { "provider" => Some(FormState::new( "Set Provider", "provider", - vec![FormField::text("provider", "Provider Name") - .required() - .with_placeholder("anthropic, openai, groq...")], + vec![ + FormField::text("provider", "Provider Name") + .required() + .with_placeholder("anthropic, openai, groq..."), + ], )), "model" => Some(FormState::new( "Set Model", "model", - vec![FormField::text("model", "Model Name") - .required() - .with_placeholder("claude-sonnet-4-20250514, gpt-4...")], + vec![ + FormField::text("model", "Model Name") + .required() + .with_placeholder("claude-sonnet-4-20250514, gpt-4..."), + ], )), "theme" => Some(FormState::new( "Set Theme", "theme", - vec![FormField::text("theme", "Theme Name") - .with_placeholder("dark, light, custom...")], + vec![ + FormField::text("theme", "Theme Name") + .with_placeholder("dark, light, custom..."), + ], )), // ============================================================ @@ -270,9 +306,11 @@ impl FormRegistry { "mcp-remove" => Some(FormState::new( "Remove MCP Server", "mcp-remove", - vec![FormField::text("server_name", "Server Name") - .required() - .with_placeholder("Enter server name to remove...")], + vec![ + FormField::text("server_name", "Server Name") + .required() + .with_placeholder("Enter server name to remove..."), + ], )), "mcp-auth" => Some(FormState::new( @@ -291,15 +329,19 @@ impl FormRegistry { "mcp-logs" => Some(FormState::new( "MCP Server Logs", "mcp-logs", - vec![FormField::text("server_name", "Server Name") - .with_placeholder("Optional server name (all if empty)...")], + vec![ + FormField::text("server_name", "Server Name") + .with_placeholder("Optional server name (all if empty)..."), + ], )), "mcp-reload" => Some(FormState::new( "Reload MCP Server", "mcp-reload", - vec![FormField::text("server_name", "Server Name") - .with_placeholder("Optional server name (all if empty)...")], + vec![ + FormField::text("server_name", "Server Name") + .with_placeholder("Optional server name (all if empty)..."), + ], )), // ============================================================ @@ -314,8 +356,10 @@ impl FormRegistry { "config" => Some(FormState::new( "View/Edit Config", "config", - vec![FormField::text("key", "Config Key") - .with_placeholder("Optional config key (all if empty)...")], + vec![ + FormField::text("key", "Config Key") + .with_placeholder("Optional config key (all if empty)..."), + ], )), "logs" => Some(FormState::new( @@ -336,16 +380,20 @@ impl FormRegistry { "dump" => Some(FormState::new( "Dump State", "dump", - vec![FormField::text("filename", "Output Filename") - .with_placeholder("Optional filename (stdout if empty)...")], + vec![ + FormField::text("filename", "Output Filename") + .with_placeholder("Optional filename (stdout if empty)..."), + ], )), "eval" => Some(FormState::new( "Evaluate Expression", "eval", - vec![FormField::text("expression", "Expression") - .required() - .with_placeholder("Enter expression to evaluate...")], + vec![ + FormField::text("expression", "Expression") + .required() + .with_placeholder("Enter expression to evaluate..."), + ], )), // No form needed for this command diff --git a/src/cortex-tui/src/interactive/builders/agents.rs b/src/cortex-tui/src/interactive/builders/agents.rs index 5b3c1067..65f64e6d 100644 --- a/src/cortex-tui/src/interactive/builders/agents.rs +++ b/src/cortex-tui/src/interactive/builders/agents.rs @@ -321,7 +321,7 @@ pub fn build_agents_selector( // Add project agents if !project_agents.is_empty() { - current_category = Some(AgentCategory::Project); + let _current_category = Some(AgentCategory::Project); items.push( InteractiveItem::new( format!("__cat_{}", AgentCategory::Project.label()), @@ -352,7 +352,7 @@ pub fn build_agents_selector( // Add global agents if !global_agents.is_empty() { - current_category = Some(AgentCategory::Global); + let _current_category = Some(AgentCategory::Global); items.push( InteractiveItem::new( format!("__cat_{}", AgentCategory::Global.label()), diff --git a/src/cortex-tui/src/mentions.rs b/src/cortex-tui/src/mentions.rs index c0690113..f4df88ca 100644 --- a/src/cortex-tui/src/mentions.rs +++ b/src/cortex-tui/src/mentions.rs @@ -40,7 +40,7 @@ use std::path::{Path, PathBuf}; const MAX_FILES_TO_SCAN: usize = 1000; /// Default number of results to return. -const DEFAULT_RESULT_LIMIT: usize = 10; +const _DEFAULT_RESULT_LIMIT: usize = 10; /// Directories to ignore during search. const IGNORED_DIRS: &[&str] = &[ diff --git a/src/cortex-tui/src/modal/mcp_manager/handlers.rs b/src/cortex-tui/src/modal/mcp_manager/handlers.rs index 478a0ee3..81683d92 100644 --- a/src/cortex-tui/src/modal/mcp_manager/handlers.rs +++ b/src/cortex-tui/src/modal/mcp_manager/handlers.rs @@ -5,8 +5,7 @@ use super::registry::{get_local_registry_entries, get_registry_server_config}; use super::state::McpManagerModal; use super::types::{ - AddHttpServerFocus, AddStdioServerFocus, McpMode, McpServerSource, McpStatus, - RegistryLoadState, + AddHttpServerFocus, AddStdioServerFocus, McpMode, McpServerSource, McpStatus, RegistryLoadState, }; use crate::modal::{ModalAction, ModalResult}; use crate::widgets::selection_list::SelectionResult; @@ -91,7 +90,7 @@ impl McpManagerModal { McpServerSource::Custom => { // Go to step 2: choose transport type self.mode = McpMode::ChooseTransport { - source, + _source: source, selected: 0, }; } @@ -101,7 +100,7 @@ impl McpManagerModal { selected: 0, search_query: String::new(), entries: get_local_registry_entries(), - load_state: RegistryLoadState::Loaded, + _load_state: RegistryLoadState::Loaded, }; } } @@ -121,7 +120,7 @@ impl McpManagerModal { /// Handle key events in choose transport mode (Step 2) pub(crate) fn handle_choose_transport_key(&mut self, key: KeyEvent) -> ModalResult { if let McpMode::ChooseTransport { - source: _, + _source: _, ref mut selected, } = self.mode { @@ -206,7 +205,7 @@ impl McpManagerModal { KeyCode::Esc => { // Go back to step 2 self.mode = McpMode::ChooseTransport { - source: McpServerSource::Custom, + _source: McpServerSource::Custom, selected: 0, }; ModalResult::Continue @@ -268,7 +267,7 @@ impl McpManagerModal { KeyCode::Esc => { // Go back to step 2 self.mode = McpMode::ChooseTransport { - source: McpServerSource::Custom, + _source: McpServerSource::Custom, selected: 1, }; ModalResult::Continue @@ -304,7 +303,7 @@ impl McpManagerModal { ref mut selected, ref mut search_query, ref entries, - load_state: _, + _load_state: _, } = self.mode { // Filter entries based on search @@ -317,7 +316,9 @@ impl McpManagerModal { .filter(|e| { e.name.to_lowercase().contains(&query_lower) || e.description.to_lowercase().contains(&query_lower) - || e.tags.iter().any(|t| t.to_lowercase().contains(&query_lower)) + || e.tags + .iter() + .any(|t| t.to_lowercase().contains(&query_lower)) || e.category .as_ref() .map(|c| c.to_lowercase().contains(&query_lower)) diff --git a/src/cortex-tui/src/modal/mcp_manager/mod.rs b/src/cortex-tui/src/modal/mcp_manager/mod.rs index 11a67bc4..f95ab7e5 100644 --- a/src/cortex-tui/src/modal/mcp_manager/mod.rs +++ b/src/cortex-tui/src/modal/mcp_manager/mod.rs @@ -60,7 +60,7 @@ impl Modal for McpManagerModal { selected: _, search_query, entries: _, - load_state: _, + _load_state: _, } => { search_query.push_str(text); true @@ -156,14 +156,14 @@ impl Modal for McpManagerModal { } McpMode::AddStdioServer { .. } => { self.mode = McpMode::ChooseTransport { - source: Source::Custom, + _source: Source::Custom, selected: 0, }; CancelBehavior::Handled } McpMode::AddHttpServer { .. } => { self.mode = McpMode::ChooseTransport { - source: Source::Custom, + _source: Source::Custom, selected: 1, }; CancelBehavior::Handled diff --git a/src/cortex-tui/src/modal/mcp_manager/registry.rs b/src/cortex-tui/src/modal/mcp_manager/registry.rs index d11fe929..ecb0d2e4 100644 --- a/src/cortex-tui/src/modal/mcp_manager/registry.rs +++ b/src/cortex-tui/src/modal/mcp_manager/registry.rs @@ -15,17 +15,17 @@ pub struct RegistryEntry { /// Category pub category: Option, /// Vendor - pub vendor: Option, + pub _vendor: Option, /// Tags for search pub tags: Vec, /// Whether stdio transport is available - pub has_stdio: bool, + pub _has_stdio: bool, /// Whether HTTP transport is available - pub has_http: bool, + pub _has_http: bool, /// Required environment variables pub required_env: Vec, /// Source (local or remote) - pub source: RegistrySource, + pub _source: RegistrySource, } /// Source of the registry entry @@ -50,12 +50,12 @@ impl From for RegistryEntry { name: server.name, description: server.description, category: server.category, - vendor: server.vendor, + _vendor: server.vendor, tags: server.tags, - has_stdio: server.install.stdio.is_some(), - has_http: server.install.http.is_some(), + _has_stdio: server.install.stdio.is_some(), + _has_http: server.install.http.is_some(), required_env, - source: RegistrySource::Remote, + _source: RegistrySource::Remote, } } } @@ -178,19 +178,19 @@ pub fn get_local_registry_entries() -> Vec { name: name.to_string(), description: description.to_string(), category: None, - vendor: None, + _vendor: None, tags: vec![], - has_stdio: true, - has_http: false, + _has_stdio: true, + _has_http: false, required_env, - source: RegistrySource::Local, + _source: RegistrySource::Local, } }) .collect() } /// Convert a RegistryServer from remote to command/args for installation -pub fn get_remote_server_config(server: &RegistryServer) -> Option<(String, Vec)> { +pub fn _get_remote_server_config(server: &RegistryServer) -> Option<(String, Vec)> { server .install .stdio diff --git a/src/cortex-tui/src/modal/mcp_manager/rendering.rs b/src/cortex-tui/src/modal/mcp_manager/rendering.rs index 75f4cde6..8ed345b3 100644 --- a/src/cortex-tui/src/modal/mcp_manager/rendering.rs +++ b/src/cortex-tui/src/modal/mcp_manager/rendering.rs @@ -235,7 +235,7 @@ impl McpManagerModal { /// Render the choose transport view (Step 2) pub(crate) fn render_choose_transport(&self, area: Rect, buf: &mut Buffer) { if let McpMode::ChooseTransport { - source: _, + _source: _, selected, } = self.mode { @@ -508,7 +508,7 @@ impl McpManagerModal { selected, ref search_query, ref entries, - load_state: _, + _load_state: _, } = self.mode { Clear.render(area, buf); @@ -559,7 +559,9 @@ impl McpManagerModal { .filter(|e| { e.name.to_lowercase().contains(&query_lower) || e.description.to_lowercase().contains(&query_lower) - || e.tags.iter().any(|t| t.to_lowercase().contains(&query_lower)) + || e.tags + .iter() + .any(|t| t.to_lowercase().contains(&query_lower)) || e.category .as_ref() .map(|c| c.to_lowercase().contains(&query_lower)) @@ -611,11 +613,19 @@ impl McpManagerModal { if desc_start_x < list_area.x + list_area.width { let max_desc_len = (list_area.x + list_area.width - desc_start_x) as usize; let truncated_desc = if entry.description.len() > max_desc_len { - format!("{}...", &entry.description[..max_desc_len.saturating_sub(3)]) + format!( + "{}...", + &entry.description[..max_desc_len.saturating_sub(3)] + ) } else { entry.description.clone() }; - buf.set_string(desc_start_x, y, &truncated_desc, Style::default().fg(TEXT_DIM)); + buf.set_string( + desc_start_x, + y, + &truncated_desc, + Style::default().fg(TEXT_DIM), + ); } } diff --git a/src/cortex-tui/src/modal/mcp_manager/types.rs b/src/cortex-tui/src/modal/mcp_manager/types.rs index daf1cda0..f7ec63c6 100644 --- a/src/cortex-tui/src/modal/mcp_manager/types.rs +++ b/src/cortex-tui/src/modal/mcp_manager/types.rs @@ -83,9 +83,9 @@ pub enum McpTransportType { pub enum RegistryLoadState { #[default] NotLoaded, - Loading, + _Loading, Loaded, - Error, + _Error, } // ============================================================================ @@ -103,7 +103,7 @@ pub enum McpMode { }, /// Step 2: Choose transport type (stdio or HTTP) ChooseTransport { - source: McpServerSource, + _source: McpServerSource, selected: usize, // 0 = Stdio, 1 = HTTP }, /// Step 3a: Adding a stdio server @@ -126,7 +126,7 @@ pub enum McpMode { /// Cached registry entries (if loaded) entries: Vec, /// Loading state - load_state: RegistryLoadState, + _load_state: RegistryLoadState, }, /// Confirming deletion ConfirmDelete { server_name: String }, diff --git a/src/cortex-tui/src/modal/mod.rs b/src/cortex-tui/src/modal/mod.rs index 3bcf5282..92669f05 100644 --- a/src/cortex-tui/src/modal/mod.rs +++ b/src/cortex-tui/src/modal/mod.rs @@ -27,7 +27,9 @@ pub mod upgrade; pub use commands::CommandsModal; pub use help::HelpModal; pub use login::{LoginModal, LoginState}; -pub use mcp_manager::{McpManagerModal, McpServerInfo, McpServerSource, McpStatus, McpTransportType}; +pub use mcp_manager::{ + McpManagerModal, McpServerInfo, McpServerSource, McpStatus, McpTransportType, +}; pub use models::{ModelInfo, ModelsModal}; pub use pickers::{ApprovalPickerModal, LogLevelPickerModal}; pub use providers::{ProviderInfo, ProvidersModal, known_providers}; diff --git a/src/cortex-tui/src/modal/models.rs b/src/cortex-tui/src/modal/models.rs index fcbf306d..3a921acf 100644 --- a/src/cortex-tui/src/modal/models.rs +++ b/src/cortex-tui/src/modal/models.rs @@ -117,7 +117,7 @@ pub struct ModelsModal { /// Selection list widget. list: SelectionList, /// Currently active model ID. - current_model: Option, + _current_model: Option, /// Provider groups for rendering (provider name -> list of model indices). provider_groups: Vec<(String, Vec)>, /// Whether to show provider headers (false if only one provider). @@ -169,7 +169,7 @@ impl ModelsModal { Self { models, list, - current_model, + _current_model: current_model, provider_groups, show_provider_headers, } diff --git a/src/cortex-tui/src/modal/pickers.rs b/src/cortex-tui/src/modal/pickers.rs index 75c97cba..8e5189ec 100644 --- a/src/cortex-tui/src/modal/pickers.rs +++ b/src/cortex-tui/src/modal/pickers.rs @@ -12,7 +12,7 @@ use ratatui::{buffer::Buffer, layout::Rect, widgets::Widget}; /// Modal for selecting approval mode (ask, session, always, never) pub struct ApprovalPickerModal { list: SelectionList, - current: Option, + _current: Option, } impl ApprovalPickerModal { @@ -38,7 +38,7 @@ impl ApprovalPickerModal { Self { list: SelectionList::new(items), - current, + _current: current, } } } @@ -88,7 +88,7 @@ impl Modal for ApprovalPickerModal { /// Modal for selecting log level (trace, debug, info, warn, error) pub struct LogLevelPickerModal { list: SelectionList, - current: Option, + _current: Option, } impl LogLevelPickerModal { @@ -118,7 +118,7 @@ impl LogLevelPickerModal { Self { list: SelectionList::new(items), - current, + _current: current, } } } diff --git a/src/cortex-tui/src/modal/providers.rs b/src/cortex-tui/src/modal/providers.rs index 59998c39..70890b04 100644 --- a/src/cortex-tui/src/modal/providers.rs +++ b/src/cortex-tui/src/modal/providers.rs @@ -84,7 +84,7 @@ pub struct ProvidersModal { /// Selection list widget. list: SelectionList, /// Currently active provider ID. - current_provider: Option, + _current_provider: Option, } impl ProvidersModal { @@ -124,7 +124,7 @@ impl ProvidersModal { Self { providers, list, - current_provider, + _current_provider: current_provider, } } diff --git a/src/cortex-tui/src/modal/sessions/rendering.rs b/src/cortex-tui/src/modal/sessions/rendering.rs index ac48e95b..861156ed 100644 --- a/src/cortex-tui/src/modal/sessions/rendering.rs +++ b/src/cortex-tui/src/modal/sessions/rendering.rs @@ -4,7 +4,9 @@ use ratatui::buffer::Buffer; use ratatui::layout::Rect; use ratatui::style::{Modifier, Style}; -use cortex_core::style::{BORDER, CYAN_PRIMARY, SURFACE_0, SURFACE_1, TEXT, TEXT_DIM, TEXT_MUTED, VOID, YELLOW}; +use cortex_core::style::{ + BORDER, CYAN_PRIMARY, SURFACE_0, SURFACE_1, TEXT, TEXT_DIM, TEXT_MUTED, VOID, YELLOW, +}; use super::session_action::SessionAction; use super::session_info::SessionInfo; @@ -78,12 +80,7 @@ pub fn render_search_bar(search_query: &str, area: Rect, buf: &mut Buffer) { } /// Render a single session row. -pub fn render_session_row( - session: &SessionInfo, - is_selected: bool, - area: Rect, - buf: &mut Buffer, -) { +pub fn render_session_row(session: &SessionInfo, is_selected: bool, area: Rect, buf: &mut Buffer) { let (bg, fg, prefix_fg) = if is_selected { (CYAN_PRIMARY, VOID, VOID) } else { diff --git a/src/cortex-tui/src/runner/app_runner/runner.rs b/src/cortex-tui/src/runner/app_runner/runner.rs index 13f0e25e..19fc3314 100644 --- a/src/cortex-tui/src/runner/app_runner/runner.rs +++ b/src/cortex-tui/src/runner/app_runner/runner.rs @@ -356,7 +356,7 @@ impl AppRunner { // Check if user is authenticated (OAuth/API key login) or has API keys configured // This is a fast local check - no network calls - let mut auth_status = match load_auth(&cortex_home, CredentialsStoreMode::default()) { + let auth_status = match load_auth(&cortex_home, CredentialsStoreMode::default()) { Ok(Some(auth)) if !auth.is_expired() => { tracing::info!("User authenticated via {}", auth.mode); AuthStatus::Authenticated @@ -415,7 +415,7 @@ impl AppRunner { } else { tracing::warn!("Login succeeded but could not load token from keyring"); } - auth_status = AuthStatus::Authenticated; + let _auth_status = AuthStatus::Authenticated; } LoginResult::ContinueWithApiKey => { // Show API key setup instructions and exit diff --git a/src/cortex-tui/src/runner/auth_handlers.rs b/src/cortex-tui/src/runner/auth_handlers.rs index 0c21f0f2..1702f709 100644 --- a/src/cortex-tui/src/runner/auth_handlers.rs +++ b/src/cortex-tui/src/runner/auth_handlers.rs @@ -103,6 +103,7 @@ pub async fn start_login_flow() -> Result<(String, String, String)> { struct DeviceCodeResponse { user_code: String, device_code: String, + #[allow(dead_code)] verification_uri: String, } diff --git a/src/cortex-tui/src/runner/event_loop/auth.rs b/src/cortex-tui/src/runner/event_loop/auth.rs index b1d5dde0..7bdd1053 100644 --- a/src/cortex-tui/src/runner/event_loop/auth.rs +++ b/src/cortex-tui/src/runner/event_loop/auth.rs @@ -392,7 +392,7 @@ impl EventLoop { } /// Save provider API key to config - pub(super) fn save_provider_api_key( + pub(super) fn _save_provider_api_key( &self, provider: &str, api_key: &str, @@ -460,7 +460,7 @@ impl EventLoop { } /// Remove MCP server from storage - pub(super) fn remove_mcp_server(&self, name: &str) -> anyhow::Result<()> { + pub(super) fn _remove_mcp_server(&self, name: &str) -> anyhow::Result<()> { let storage = crate::mcp_storage::McpStorage::new()?; storage.remove_server(name)?; Ok(()) diff --git a/src/cortex-tui/src/runner/event_loop/commands.rs b/src/cortex-tui/src/runner/event_loop/commands.rs index ca841778..c825aec4 100644 --- a/src/cortex-tui/src/runner/event_loop/commands.rs +++ b/src/cortex-tui/src/runner/event_loop/commands.rs @@ -1,5 +1,5 @@ //! Command handling: slash commands and result processing. -//! +//! //! This module handles the execution of slash commands and the processing //! of their results. Due to the large number of command handlers, they are //! delegated to the main event_loop module in the original monolithic file. @@ -9,7 +9,7 @@ use anyhow::Result; use crate::app::AppView; use crate::commands::{CommandResult, FormRegistry, ModalType, ViewType}; -use crate::session::{CortexSession, ExportFormat, export_session, default_export_filename}; +use crate::session::{CortexSession, ExportFormat, default_export_filename, export_session}; use super::core::EventLoop; @@ -253,42 +253,38 @@ impl EventLoop { let interactive = build_mcp_selector(&servers); self.app_state.enter_interactive_mode(interactive); } - ModalType::Form(cmd_name) => { - match cmd_name.as_str() { - "temperature" => { - let interactive = - crate::interactive::builders::build_temperature_selector( - self.app_state.temperature, - ); - self.app_state.enter_interactive_mode(interactive); - } - "scroll" => { - let interactive = - crate::interactive::builders::build_scroll_selector(); - self.app_state.enter_interactive_mode(interactive); - } - _ => { - let registry = FormRegistry::new(); - if let Some(form_state) = registry.get_form(&cmd_name) { - self.app_state.active_modal = - Some(crate::app::ActiveModal::Form(form_state)); - } else { - let usage = match cmd_name.as_str() { - "rename" => "/rename ", - "remove" => "/remove ...", - "search" => "/search ", - "mention" => "/mention ", - "tokens" => "/tokens ", - "goto" => "/goto ", - "delete" => "/delete ", - "eval" => "/eval ", - _ => &cmd_name, - }; - self.app_state.toasts.info(format!("Usage: {}", usage)); - } + ModalType::Form(cmd_name) => match cmd_name.as_str() { + "temperature" => { + let interactive = crate::interactive::builders::build_temperature_selector( + self.app_state.temperature, + ); + self.app_state.enter_interactive_mode(interactive); + } + "scroll" => { + let interactive = crate::interactive::builders::build_scroll_selector(); + self.app_state.enter_interactive_mode(interactive); + } + _ => { + let registry = FormRegistry::new(); + if let Some(form_state) = registry.get_form(&cmd_name) { + self.app_state.active_modal = + Some(crate::app::ActiveModal::Form(form_state)); + } else { + let usage = match cmd_name.as_str() { + "rename" => "/rename ", + "remove" => "/remove ...", + "search" => "/search ", + "mention" => "/mention ", + "tokens" => "/tokens ", + "goto" => "/goto ", + "delete" => "/delete ", + "eval" => "/eval ", + _ => &cmd_name, + }; + self.app_state.toasts.info(format!("Usage: {}", usage)); } } - } + }, ModalType::ApprovalPicker => { let current = self.app_state.approval_mode_string(); let interactive = @@ -308,8 +304,7 @@ impl EventLoop { } ModalType::ThemePicker => { let current = self.app_state.settings.get("theme").map(|s| s.as_str()); - let interactive = - crate::interactive::builders::build_theme_selector(current); + let interactive = crate::interactive::builders::build_theme_selector(current); self.app_state.enter_interactive_mode(interactive); } ModalType::Fork => { @@ -381,7 +376,7 @@ impl EventLoop { // This is a stub - the full implementation is in the main event_loop module // For now, we handle basic commands here tracing::debug!("Async command: {}", cmd); - + match cmd { "providers:list" => { self.handle_providers_list(); diff --git a/src/cortex-tui/src/runner/event_loop/core.rs b/src/cortex-tui/src/runner/event_loop/core.rs index c88fc2b8..b08aeb53 100644 --- a/src/cortex-tui/src/runner/event_loop/core.rs +++ b/src/cortex-tui/src/runner/event_loop/core.rs @@ -22,9 +22,9 @@ use crate::runner::terminal::CortexTerminal; use crate::session::CortexSession; use crate::capture::TuiCapture; +use cortex_core::EngineEvent; use cortex_engine::streaming::StreamEvent; use cortex_engine::tools::{ToolRegistry, UnifiedToolExecutor}; -use cortex_core::EngineEvent; // ============================================================================ // ERROR MESSAGE HELPERS @@ -91,7 +91,7 @@ pub struct EventLoop { pub(super) command_executor: CommandExecutor, /// Form registry for command forms. - pub(super) form_registry: FormRegistry, + pub(super) _form_registry: FormRegistry, /// Permission manager for tool approvals. pub(super) permission_manager: PermissionManager, @@ -100,7 +100,8 @@ pub struct EventLoop { pub(super) provider_manager: Option>>, /// Subagent executor for running subagents. - pub(super) subagent_executor: Option>, + pub(super) _subagent_executor: + Option>, /// Whether the event loop is running. pub(super) running: Arc, @@ -160,7 +161,7 @@ pub struct EventLoop { /// Undo stack for session message exchanges. /// Each entry is a pair of (user_message, assistant_message). - pub(super) undo_stack: Vec>, + pub(super) _undo_stack: Vec>, /// TUI capture manager for debugging (enabled via CORTEX_TUI_CAPTURE=1). pub(super) tui_capture: TuiCapture, @@ -185,10 +186,10 @@ impl EventLoop { mouse_handler: MouseHandler::new(), modal_stack: ModalStack::new(), command_executor: CommandExecutor::new(), - form_registry: FormRegistry::new(), + _form_registry: FormRegistry::new(), permission_manager: PermissionManager::new(), provider_manager: None, - subagent_executor: None, + _subagent_executor: None, running: Arc::new(AtomicBool::new(false)), background_tasks: Vec::new(), last_render: Instant::now(), @@ -208,7 +209,7 @@ impl EventLoop { tool_event_tx, tool_event_rx: Some(tool_event_rx), is_continuation: false, - undo_stack: Vec::new(), + _undo_stack: Vec::new(), tui_capture, } } diff --git a/src/cortex-tui/src/runner/event_loop/input.rs b/src/cortex-tui/src/runner/event_loop/input.rs index ed649b22..736573f5 100644 --- a/src/cortex-tui/src/runner/event_loop/input.rs +++ b/src/cortex-tui/src/runner/event_loop/input.rs @@ -113,8 +113,8 @@ impl EventLoop { } else { // Not streaming - check for other animation states // Include brain animation on welcome screen (messages empty) - let brain_animating = self.app_state.messages.is_empty() - && self.app_state.view == AppView::Session; + let brain_animating = + self.app_state.messages.is_empty() && self.app_state.view == AppView::Session; needs_render = self.app_state.toasts.has_visible() || self.app_state.has_active_tool_calls() || self.app_state.has_active_subagents() @@ -170,10 +170,7 @@ impl EventLoop { self.app_state.exit_interactive_mode(); } } - crate::interactive::InteractiveResult::FormSubmitted { - action_id, - values, - } => { + crate::interactive::InteractiveResult::FormSubmitted { action_id, values } => { // Handle inline form submission // Returns true if we should stay in interactive mode let stay_open = self.handle_inline_form_submission(&action_id, values); @@ -241,9 +238,7 @@ impl EventLoop { } // Handle Questions view input - if self.app_state.view == AppView::Questions - && self.handle_question_key(key_event).await? - { + if self.app_state.view == AppView::Questions && self.handle_question_key(key_event).await? { self.render(terminal)?; return Ok(()); } @@ -586,10 +581,10 @@ impl EventLoop { /// Handles an event from the cortex-core backend. /// /// Converts the protocol event to an application event and dispatches it. - pub(super) fn handle_backend_event(&mut self, event: cortex_protocol::Event) -> Result<()> { + pub(super) fn _handle_backend_event(&mut self, event: cortex_protocol::Event) -> Result<()> { // Convert to AppEvent if let Some(app_event) = adapt_event(event) { - self.handle_app_event(app_event)?; + self._handle_app_event(app_event)?; } Ok(()) } @@ -598,7 +593,7 @@ impl EventLoop { /// /// This method processes streaming events, tool events, message events, /// and other high-level application events converted from backend events. - fn handle_app_event(&mut self, event: AppEvent) -> Result<()> { + fn _handle_app_event(&mut self, event: AppEvent) -> Result<()> { match event { AppEvent::StreamingStarted => { self.stream_controller.start_processing(); diff --git a/src/cortex-tui/src/runner/event_loop/mod.rs b/src/cortex-tui/src/runner/event_loop/mod.rs index 6b316a7a..afbd4718 100644 --- a/src/cortex-tui/src/runner/event_loop/mod.rs +++ b/src/cortex-tui/src/runner/event_loop/mod.rs @@ -45,5 +45,5 @@ mod tests; pub use self::core::{EventLoop, PendingToolCall}; // Re-export helpers that might be needed externally -pub use self::core::simplify_error_message; pub use self::core::open_browser_url; +pub use self::core::simplify_error_message; diff --git a/src/cortex-tui/src/runner/event_loop/modal.rs b/src/cortex-tui/src/runner/event_loop/modal.rs index d42b9bfe..a7dc4a06 100644 --- a/src/cortex-tui/src/runner/event_loop/modal.rs +++ b/src/cortex-tui/src/runner/event_loop/modal.rs @@ -575,7 +575,7 @@ impl EventLoop { /// Process pending actions from the card handler. pub(super) fn process_card_actions(&mut self) { let actions = self.card_handler.take_actions(); - for action in actions { + for _action in actions { tracing::debug!("Card action received"); // Handle card actions - implementation in the main module } diff --git a/src/cortex-tui/src/runner/event_loop/mouse.rs b/src/cortex-tui/src/runner/event_loop/mouse.rs index f29becc3..222977f0 100644 --- a/src/cortex-tui/src/runner/event_loop/mouse.rs +++ b/src/cortex-tui/src/runner/event_loop/mouse.rs @@ -68,7 +68,11 @@ impl EventLoop { self.render(terminal)?; } - MouseAction::Drag { start, current, button: _ } => { + MouseAction::Drag { + start, + current, + button: _, + } => { // Start text selection from start position if not already started let (sx, sy) = start; let (cx, cy) = current; @@ -518,7 +522,7 @@ impl EventLoop { .add_pending_tool_result(tool_call_id, "Questions".to_string(), output, true); if !self.app_state.streaming.is_streaming && self.app_state.has_pending_tool_results() { - self.continue_with_tool_results().await; + let _ = self.continue_with_tool_results().await; } Ok(()) @@ -547,7 +551,7 @@ impl EventLoop { ); if !self.app_state.streaming.is_streaming && self.app_state.has_pending_tool_results() { - self.continue_with_tool_results().await; + let _ = self.continue_with_tool_results().await; } Ok(()) diff --git a/src/cortex-tui/src/runner/event_loop/rendering.rs b/src/cortex-tui/src/runner/event_loop/rendering.rs index 8da2ce07..e3d716c0 100644 --- a/src/cortex-tui/src/runner/event_loop/rendering.rs +++ b/src/cortex-tui/src/runner/event_loop/rendering.rs @@ -255,7 +255,7 @@ impl EventLoop { } /// Returns the chat area rectangle if available. - pub(super) fn get_chat_area(&self) -> Option { + pub(super) fn _get_chat_area(&self) -> Option { self.click_zones.get_zone_rect(ClickZoneId::ChatArea) } diff --git a/src/cortex-tui/src/runner/event_loop/streaming.rs b/src/cortex-tui/src/runner/event_loop/streaming.rs index 90cffad7..34f1c15c 100644 --- a/src/cortex-tui/src/runner/event_loop/streaming.rs +++ b/src/cortex-tui/src/runner/event_loop/streaming.rs @@ -13,10 +13,12 @@ use crate::question::{QuestionRequest, QuestionState}; use crate::session::StoredToolCall; use crate::views::tool_call::ToolStatus; -use cortex_engine::client::{CompletionRequest, Message, ResponseEvent, ToolDefinition as ClientToolDefinition}; +use cortex_engine::client::{ + CompletionRequest, Message, ResponseEvent, ToolDefinition as ClientToolDefinition, +}; use cortex_engine::streaming::StreamEvent; -use super::core::{simplify_error_message, EventLoop, PendingToolCall}; +use super::core::{EventLoop, PendingToolCall, simplify_error_message}; impl EventLoop { /// Handles message submission using the new provider system. @@ -415,10 +417,10 @@ impl EventLoop { if self.running_tool_tasks.is_empty() && self.running_subagents.is_empty() { if self.app_state.has_pending_tool_results() { tracing::info!("Calling continue_with_tool_results from StreamEvent::Done"); - self.continue_with_tool_results().await; + let _ = self.continue_with_tool_results().await; } else if self.app_state.has_queued_messages() { tracing::info!("Processing message queue"); - self.process_message_queue().await; + let _ = self.process_message_queue().await; } else { // No more work to do - full reset the prompt timer tracing::info!("Conversation turn complete, full resetting streaming state"); @@ -488,7 +490,7 @@ impl EventLoop { self.streaming_task = None; // Even on error, check for queued messages - self.process_message_queue().await; + let _ = self.process_message_queue().await; } /// Handle tool call from stream diff --git a/src/cortex-tui/src/runner/event_loop/subagent.rs b/src/cortex-tui/src/runner/event_loop/subagent.rs index 461fb051..9283ed70 100644 --- a/src/cortex-tui/src/runner/event_loop/subagent.rs +++ b/src/cortex-tui/src/runner/event_loop/subagent.rs @@ -10,7 +10,7 @@ use cortex_engine::client::{Message, ResponseEvent, ToolDefinition as ClientTool use cortex_engine::tools::handlers::subagent::ProgressEvent; use tokio_stream::StreamExt; -use super::core::{simplify_error_message, EventLoop}; +use super::core::{EventLoop, simplify_error_message}; impl EventLoop { /// Spawns a subagent task (for Task tool). @@ -515,7 +515,7 @@ impl EventLoop { } /// Handles events from background subagent execution tasks. - pub(super) async fn handle_subagent_event(&mut self, event: SubagentEvent) { + pub(super) async fn _handle_subagent_event(&mut self, event: SubagentEvent) { use crate::app::SubagentDisplayStatus; match event { @@ -630,7 +630,7 @@ impl EventLoop { tool_call_id, } => { tracing::info!("Subagent completed: {}", session_id); - self.handle_subagent_completed(session_id, output, tool_call_id) + self._handle_subagent_completed(session_id, output, tool_call_id) .await; } @@ -640,14 +640,14 @@ impl EventLoop { tool_call_id, } => { tracing::error!("Subagent failed: {} - {}", session_id, error); - self.handle_subagent_failed(session_id, error, tool_call_id) + self._handle_subagent_failed(session_id, error, tool_call_id) .await; } } } /// Handle subagent completion - async fn handle_subagent_completed( + async fn _handle_subagent_completed( &mut self, session_id: String, output: String, @@ -707,8 +707,7 @@ impl EventLoop { // Force-save assistant message if stream not done if !self.stream_done_received && !self.pending_assistant_tool_calls.is_empty() { if let Some(ref mut session) = self.cortex_session { - let tool_calls_for_message = - std::mem::take(&mut self.pending_assistant_tool_calls); + let tool_calls_for_message = std::mem::take(&mut self.pending_assistant_tool_calls); let content = self.stream_controller.full_text(); let mut stored_msg = crate::session::StoredMessage::assistant(&content); @@ -729,9 +728,9 @@ impl EventLoop { // Continue agentic loop if no more subagents or tools running if self.running_subagents.is_empty() && self.running_tool_tasks.is_empty() { if self.app_state.has_pending_tool_results() { - self.continue_with_tool_results().await; + let _ = self.continue_with_tool_results().await; } else if self.app_state.has_queued_messages() { - self.process_message_queue().await; + let _ = self.process_message_queue().await; } else { self.app_state.streaming.full_reset(); } @@ -739,7 +738,7 @@ impl EventLoop { } /// Handle subagent failure - async fn handle_subagent_failed( + async fn _handle_subagent_failed( &mut self, session_id: String, error: String, @@ -790,8 +789,7 @@ impl EventLoop { // Force-save assistant message if stream not done if !self.stream_done_received && !self.pending_assistant_tool_calls.is_empty() { if let Some(ref mut session) = self.cortex_session { - let tool_calls_for_message = - std::mem::take(&mut self.pending_assistant_tool_calls); + let tool_calls_for_message = std::mem::take(&mut self.pending_assistant_tool_calls); let content = self.stream_controller.full_text(); let mut stored_msg = crate::session::StoredMessage::assistant(&content); @@ -812,9 +810,9 @@ impl EventLoop { // Continue agentic loop if no more subagents or tools running if self.running_subagents.is_empty() && self.running_tool_tasks.is_empty() { if self.app_state.has_pending_tool_results() { - self.continue_with_tool_results().await; + let _ = self.continue_with_tool_results().await; } else if self.app_state.has_queued_messages() { - self.process_message_queue().await; + let _ = self.process_message_queue().await; } else { self.app_state.streaming.full_reset(); } diff --git a/src/cortex-tui/src/runner/event_loop/tests.rs b/src/cortex-tui/src/runner/event_loop/tests.rs index 4c3745cf..53bda22e 100644 --- a/src/cortex-tui/src/runner/event_loop/tests.rs +++ b/src/cortex-tui/src/runner/event_loop/tests.rs @@ -2,7 +2,7 @@ #[cfg(test)] mod tests { - use crate::actions::{ActionContext, ActionMapper}; + use crate::actions::ActionContext; use crate::app::{AppState, ApprovalMode, ApprovalState, FocusTarget}; use crate::runner::event_loop::EventLoop; diff --git a/src/cortex-tui/src/runner/event_loop/tools.rs b/src/cortex-tui/src/runner/event_loop/tools.rs index c702500e..45dc52bf 100644 --- a/src/cortex-tui/src/runner/event_loop/tools.rs +++ b/src/cortex-tui/src/runner/event_loop/tools.rs @@ -292,7 +292,8 @@ impl EventLoop { success, duration, } => { - self.handle_tool_completed(id, name, output, success, duration).await; + self.handle_tool_completed(id, name, output, success, duration) + .await; } ToolEvent::Failed { @@ -352,8 +353,6 @@ impl EventLoop { success: bool, duration: Duration, ) { - use crate::views::tool_call::ToolStatus; - // Handle login events specially if name == "login" { if id == "login_init" && success { @@ -412,8 +411,7 @@ impl EventLoop { // Force-save assistant message if stream not done if !self.stream_done_received && !self.pending_assistant_tool_calls.is_empty() { if let Some(ref mut session) = self.cortex_session { - let tool_calls_for_message = - std::mem::take(&mut self.pending_assistant_tool_calls); + let tool_calls_for_message = std::mem::take(&mut self.pending_assistant_tool_calls); let content = self.stream_controller.full_text(); let mut stored_msg = crate::session::StoredMessage::assistant(&content); @@ -442,10 +440,10 @@ impl EventLoop { if self.running_tool_tasks.is_empty() && self.running_subagents.is_empty() { if self.app_state.has_pending_tool_results() { tracing::info!("Calling continue_with_tool_results from ToolEvent::Completed"); - self.continue_with_tool_results().await; + let _ = self.continue_with_tool_results().await; } else if self.app_state.has_queued_messages() { tracing::info!("Processing message queue after tool completion"); - self.process_message_queue().await; + let _ = self.process_message_queue().await; } else { tracing::info!("All tools done, full resetting streaming state"); self.app_state.streaming.full_reset(); @@ -503,12 +501,8 @@ impl EventLoop { self.stream_controller.set_executing_tool(None); self.app_state.streaming.stop_tool_execution(); - self.app_state.update_tool_result( - &id, - error.clone(), - false, - format!("Error: {}", error), - ); + self.app_state + .update_tool_result(&id, error.clone(), false, format!("Error: {}", error)); // If this is a Task tool, update subagent status to Failed if name == "Task" || name == "task" { @@ -537,8 +531,7 @@ impl EventLoop { // Same as Completed: force-save assistant message if stream not done if !self.stream_done_received && !self.pending_assistant_tool_calls.is_empty() { if let Some(ref mut session) = self.cortex_session { - let tool_calls_for_message = - std::mem::take(&mut self.pending_assistant_tool_calls); + let tool_calls_for_message = std::mem::take(&mut self.pending_assistant_tool_calls); let content = self.stream_controller.full_text(); let mut stored_msg = crate::session::StoredMessage::assistant(&content); @@ -554,9 +547,9 @@ impl EventLoop { // Continue agentic loop if no more tools are running if self.running_tool_tasks.is_empty() && self.running_subagents.is_empty() { if self.app_state.has_pending_tool_results() { - self.continue_with_tool_results().await; + let _ = self.continue_with_tool_results().await; } else if self.app_state.has_queued_messages() { - self.process_message_queue().await; + let _ = self.process_message_queue().await; } else { self.app_state.streaming.full_reset(); } diff --git a/src/cortex-tui/src/runner/login_screen.rs b/src/cortex-tui/src/runner/login_screen.rs index e9a6062c..d8679429 100644 --- a/src/cortex-tui/src/runner/login_screen.rs +++ b/src/cortex-tui/src/runner/login_screen.rs @@ -95,6 +95,7 @@ enum AsyncMessage { DeviceCodeReceived { user_code: String, device_code: String, + #[allow(dead_code)] verification_uri: String, }, DeviceCodeError(String), @@ -114,6 +115,7 @@ pub struct LoginScreen { user_code: Option, verification_uri: Option, cortex_home: PathBuf, + #[allow(dead_code)] message: Option, async_rx: Option>, copied_notification: Option, diff --git a/src/cortex-tui/src/runner/trust_screen.rs b/src/cortex-tui/src/runner/trust_screen.rs index fac3ef0c..940cb66d 100644 --- a/src/cortex-tui/src/runner/trust_screen.rs +++ b/src/cortex-tui/src/runner/trust_screen.rs @@ -87,9 +87,10 @@ impl TrustScreen { if event::poll(Duration::from_millis(100))? && let Event::Key(key) = event::read()? - && let Some(result) = self.handle_key(key) { - return Ok(result); - } + && let Some(result) = self.handle_key(key) + { + return Ok(result); + } } } diff --git a/src/cortex-tui/src/views/minimal_session/rendering.rs b/src/cortex-tui/src/views/minimal_session/rendering.rs index fa2c8d9a..d8598e37 100644 --- a/src/cortex-tui/src/views/minimal_session/rendering.rs +++ b/src/cortex-tui/src/views/minimal_session/rendering.rs @@ -17,8 +17,8 @@ use crate::app::{AppState, SubagentDisplayStatus, SubagentTaskDisplay}; use crate::ui::colors::AdaptiveColors; use crate::views::tool_call::{ContentSegment, ToolCallDisplay, ToolStatus}; -use super::text_utils::wrap_text; use super::VERSION; +use super::text_utils::wrap_text; /// Renders the "← Back to main conversation" hint when viewing a subagent. /// Displays in the top-left area of the screen. @@ -30,11 +30,7 @@ pub fn render_back_to_main_hint(area: Rect, buf: &mut Buffer, colors: &AdaptiveC } /// Renders a single message to lines. -pub fn render_message( - msg: &Message, - width: u16, - colors: &AdaptiveColors, -) -> Vec> { +pub fn render_message(msg: &Message, width: u16, colors: &AdaptiveColors) -> Vec> { let mut lines = Vec::new(); // Colors for user messages @@ -477,7 +473,9 @@ pub fn generate_welcome_lines( .text_color(colors.text) .border_color(colors.accent); - let info_cards = InfoCardPair::new(left_card, right_card).gap(2).right_width(25); + let info_cards = InfoCardPair::new(left_card, right_card) + .gap(2) + .right_width(25); // Generate lines from info cards lines.extend(info_cards.to_lines(width)); @@ -686,7 +684,7 @@ pub fn render_scroll_to_bottom_hint(area: Rect, buf: &mut Buffer, colors: &Adapt /// Renders the MOTD (Message of the Day) with cards layout. /// /// Layout: Main card with mascot + welcome, then two info cards below. -pub fn render_motd(area: Rect, buf: &mut Buffer, colors: &AdaptiveColors, app_state: &AppState) { +pub fn _render_motd(area: Rect, buf: &mut Buffer, colors: &AdaptiveColors, app_state: &AppState) { let card_width = 79_u16.min(area.width.saturating_sub(2)); let welcome_card_height = 11_u16; let info_cards_height = 4_u16; // 2 items + 2 borders @@ -695,7 +693,7 @@ pub fn render_motd(area: Rect, buf: &mut Buffer, colors: &AdaptiveColors, app_st // Ensure we have enough space if area.width < 40 || area.height < total_height { - render_welcome_text_centered(area, buf, colors, app_state); + _render_welcome_text_centered(area, buf, colors, app_state); return; } @@ -739,10 +737,7 @@ pub fn render_motd(area: Rect, buf: &mut Buffer, colors: &AdaptiveColors, app_st ); // Get info from app_state - let _user_email = app_state - .user_email - .as_deref() - .unwrap_or("user@cortex.ai"); + let _user_email = app_state.user_email.as_deref().unwrap_or("user@cortex.ai"); let org_name = app_state.org_name.as_deref().unwrap_or("Personal"); let cwd = std::env::current_dir() .map(|p| p.display().to_string()) @@ -772,12 +767,7 @@ pub fn render_motd(area: Rect, buf: &mut Buffer, colors: &AdaptiveColors, app_st /// Renders the welcome text next to the brain (legacy). #[allow(dead_code)] -pub fn render_welcome_text( - area: Rect, - buf: &mut Buffer, - colors: &AdaptiveColors, - model: &str, -) { +pub fn render_welcome_text(area: Rect, buf: &mut Buffer, colors: &AdaptiveColors, model: &str) { let accent = colors.accent; let text_color = colors.text; let dim = colors.text_dim; @@ -813,7 +803,7 @@ pub fn render_welcome_text( } /// Renders welcome text centered (fallback for small terminals). -pub fn render_welcome_text_centered( +pub fn _render_welcome_text_centered( area: Rect, buf: &mut Buffer, colors: &AdaptiveColors, diff --git a/src/cortex-tui/src/views/minimal_session/view.rs b/src/cortex-tui/src/views/minimal_session/view.rs index 37c2cc84..5cca3589 100644 --- a/src/cortex-tui/src/views/minimal_session/view.rs +++ b/src/cortex-tui/src/views/minimal_session/view.rs @@ -4,7 +4,7 @@ use std::time::{SystemTime, UNIX_EPOCH}; use ratatui::buffer::Buffer; use ratatui::layout::Rect; -use ratatui::style::{Color, Modifier, Style}; +use ratatui::style::{Modifier, Style}; use ratatui::text::{Line, Span}; use ratatui::widgets::{Paragraph, Widget}; @@ -17,8 +17,8 @@ use crate::widgets::{HintContext, KeyHints, StatusIndicator}; use super::layout::LayoutManager; use super::rendering::{ - generate_message_lines, generate_welcome_lines, render_message, render_motd, render_scrollbar, - render_scroll_to_bottom_hint, render_subagent, render_tool_call, + _render_motd, generate_message_lines, generate_welcome_lines, render_message, + render_scroll_to_bottom_hint, render_scrollbar, render_subagent, render_tool_call, }; // Re-export for convenience @@ -62,7 +62,7 @@ impl<'a> MinimalSessionView<'a> { } /// Renders a single tool call with status indicator - fn render_tool_call( + fn _render_tool_call( &self, call: &crate::views::tool_call::ToolCallDisplay, width: u16, @@ -71,7 +71,7 @@ impl<'a> MinimalSessionView<'a> { } /// Renders a subagent task with todos in Factory-style format - fn render_subagent( + fn _render_subagent( &self, task: &crate::app::SubagentTaskDisplay, width: u16, @@ -80,7 +80,7 @@ impl<'a> MinimalSessionView<'a> { } /// Renders the chat area with welcome cards as part of scrollable content. - fn render_chat_with_welcome(&self, area: Rect, buf: &mut Buffer) { + fn _render_chat_with_welcome(&self, area: Rect, buf: &mut Buffer) { if area.is_empty() { return; } @@ -100,7 +100,7 @@ impl<'a> MinimalSessionView<'a> { area.width, welcome_height.min(area.height.saturating_sub(1)), ); - render_motd(welcome_area, buf, &self.colors, self.app_state); + _render_motd(welcome_area, buf, &self.colors, self.app_state); return; } @@ -110,7 +110,7 @@ impl<'a> MinimalSessionView<'a> { // If scrolled past welcome cards, only show messages if scroll_offset > 0 { // Render only messages (welcome cards scrolled out of view) - self.render_messages_only(area, buf); + self._render_messages_only(area, buf); } else { // Show welcome cards at top, messages below let welcome_area = Rect::new( @@ -119,7 +119,7 @@ impl<'a> MinimalSessionView<'a> { area.width, welcome_height.min(area.height.saturating_sub(1)), ); - render_motd(welcome_area, buf, &self.colors, self.app_state); + _render_motd(welcome_area, buf, &self.colors, self.app_state); // Render messages below welcome cards let messages_y = area.y + 1 + welcome_height + 1; // 1 margin + welcome + 1 gap @@ -130,7 +130,7 @@ impl<'a> MinimalSessionView<'a> { area.width, area.height.saturating_sub(welcome_height + 2), ); - self.render_messages_only(messages_area, buf); + self._render_messages_only(messages_area, buf); } } } @@ -206,22 +206,22 @@ impl<'a> MinimalSessionView<'a> { } /// Generates welcome card as styled lines using TUI components. - fn generate_welcome_lines(&self, width: u16) -> Vec> { + fn _generate_welcome_lines(&self, width: u16) -> Vec> { generate_welcome_lines(width, &self.colors, self.app_state) } /// Generates message lines for scrollable content. - fn generate_message_lines(&self, width: u16) -> Vec> { + fn _generate_message_lines(&self, width: u16) -> Vec> { generate_message_lines(width, &self.colors, self.app_state) } /// Renders only the chat messages (no welcome cards) - legacy function for compatibility. - fn render_messages_only(&self, area: Rect, buf: &mut Buffer) { + fn _render_messages_only(&self, area: Rect, buf: &mut Buffer) { if area.is_empty() || area.height == 0 { return; } - let all_lines = self.generate_message_lines(area.width); + let all_lines = self._generate_message_lines(area.width); let total_lines = all_lines.len(); let visible_lines = area.height as usize; @@ -271,16 +271,16 @@ impl<'a> MinimalSessionView<'a> { let dim_style = Style::default().fg(self.colors.text_dim); // Draw top border - buf.get_mut(area.x, area.y) - .set_char(border::TOP_LEFT) - .set_style(dim_style); - buf.get_mut(area.right() - 1, area.y) - .set_char(border::TOP_RIGHT) - .set_style(dim_style); + if let Some(cell) = buf.cell_mut((area.x, area.y)) { + cell.set_char(border::TOP_LEFT).set_style(dim_style); + } + if let Some(cell) = buf.cell_mut((area.right() - 1, area.y)) { + cell.set_char(border::TOP_RIGHT).set_style(dim_style); + } for x in (area.x + 1)..(area.right() - 1) { - buf.get_mut(x, area.y) - .set_char(border::HORIZONTAL) - .set_style(dim_style); + if let Some(cell) = buf.cell_mut((x, area.y)) { + cell.set_char(border::HORIZONTAL).set_style(dim_style); + } } // Show queue indicator if there are pending messages @@ -299,25 +299,25 @@ impl<'a> MinimalSessionView<'a> { } // Draw bottom border - buf.get_mut(area.x, area.bottom() - 1) - .set_char(border::BOTTOM_LEFT) - .set_style(dim_style); - buf.get_mut(area.right() - 1, area.bottom() - 1) - .set_char(border::BOTTOM_RIGHT) - .set_style(dim_style); + if let Some(cell) = buf.cell_mut((area.x, area.bottom() - 1)) { + cell.set_char(border::BOTTOM_LEFT).set_style(dim_style); + } + if let Some(cell) = buf.cell_mut((area.right() - 1, area.bottom() - 1)) { + cell.set_char(border::BOTTOM_RIGHT).set_style(dim_style); + } for x in (area.x + 1)..(area.right() - 1) { - buf.get_mut(x, area.bottom() - 1) - .set_char(border::HORIZONTAL) - .set_style(dim_style); + if let Some(cell) = buf.cell_mut((x, area.bottom() - 1)) { + cell.set_char(border::HORIZONTAL).set_style(dim_style); + } } // Draw side borders - buf.get_mut(area.x, area.y + 1) - .set_char(border::VERTICAL) - .set_style(dim_style); - buf.get_mut(area.right() - 1, area.y + 1) - .set_char(border::VERTICAL) - .set_style(dim_style); + if let Some(cell) = buf.cell_mut((area.x, area.y + 1)) { + cell.set_char(border::VERTICAL).set_style(dim_style); + } + if let Some(cell) = buf.cell_mut((area.right() - 1, area.y + 1)) { + cell.set_char(border::VERTICAL).set_style(dim_style); + } // Get input text from app_state let input_text = self.app_state.input.text(); @@ -451,37 +451,41 @@ impl<'a> MinimalSessionView<'a> { let actual_height = item_count + 2; // items + top/bottom border // Draw top border with rounded corners - buf.get_mut(area.x, area.y) - .set_char('╭') - .set_style(border_style); - buf.get_mut(area.right() - 1, area.y) - .set_char('╮') - .set_style(border_style); + if let Some(cell) = buf.cell_mut((area.x, area.y)) { + cell.set_char('╭').set_style(border_style); + } + if let Some(cell) = buf.cell_mut((area.right() - 1, area.y)) { + cell.set_char('╮').set_style(border_style); + } for x in (area.x + 1)..(area.right() - 1) { - buf.get_mut(x, area.y).set_char('─').set_style(border_style); + if let Some(cell) = buf.cell_mut((x, area.y)) { + cell.set_char('─').set_style(border_style); + } } // Draw side borders (only for actual content height) for y in (area.y + 1)..(area.y + actual_height - 1) { - buf.get_mut(area.x, y).set_char('│').set_style(border_style); - buf.get_mut(area.right() - 1, y) - .set_char('│') - .set_style(border_style); + if let Some(cell) = buf.cell_mut((area.x, y)) { + cell.set_char('│').set_style(border_style); + } + if let Some(cell) = buf.cell_mut((area.right() - 1, y)) { + cell.set_char('│').set_style(border_style); + } } // Draw bottom border at actual content height (not at area.bottom) let bottom_y = area.y + actual_height - 1; if bottom_y > area.y { - buf.get_mut(area.x, bottom_y) - .set_char('╰') - .set_style(border_style); - buf.get_mut(area.right() - 1, bottom_y) - .set_char('╯') - .set_style(border_style); + if let Some(cell) = buf.cell_mut((area.x, bottom_y)) { + cell.set_char('╰').set_style(border_style); + } + if let Some(cell) = buf.cell_mut((area.right() - 1, bottom_y)) { + cell.set_char('╯').set_style(border_style); + } for x in (area.x + 1)..(area.right() - 1) { - buf.get_mut(x, bottom_y) - .set_char('─') - .set_style(border_style); + if let Some(cell) = buf.cell_mut((x, bottom_y)) { + cell.set_char('─').set_style(border_style); + } } } @@ -510,9 +514,10 @@ impl<'a> MinimalSessionView<'a> { // Icon let mut x = inner_x; if item.icon != '\0' { - buf.get_mut(x, y) - .set_char(item.icon) - .set_style(Style::default().fg(accent)); + if let Some(cell) = buf.cell_mut((x, y)) { + cell.set_char(item.icon) + .set_style(Style::default().fg(accent)); + } x += 2; } @@ -526,7 +531,9 @@ impl<'a> MinimalSessionView<'a> { if x >= area.right() - 2 { break; } - buf.get_mut(x, y).set_char(ch).set_style(label_style); + if let Some(cell) = buf.cell_mut((x, y)) { + cell.set_char(ch).set_style(label_style); + } x += 1; } @@ -539,7 +546,9 @@ impl<'a> MinimalSessionView<'a> { if x >= area.right() - 2 { break; } - buf.get_mut(x, y).set_char(ch).set_style(desc_style); + if let Some(cell) = buf.cell_mut((x, y)) { + cell.set_char(ch).set_style(desc_style); + } x += 1; } } diff --git a/src/cortex-tui/src/views/tasks.rs b/src/cortex-tui/src/views/tasks.rs index 79c32936..f5ce74aa 100644 --- a/src/cortex-tui/src/views/tasks.rs +++ b/src/cortex-tui/src/views/tasks.rs @@ -8,7 +8,6 @@ use ratatui::widgets::{Block, Borders, Cell, Clear, Paragraph, Row, Table}; use cortex_agents::background::{AgentStatus, RunningAgentInfo}; use cortex_common::{format_duration, truncate_first_line, truncate_id_default}; -use std::time::Duration; /// View for displaying background tasks/agents. pub struct TasksView { @@ -207,7 +206,7 @@ fn status_badge(status: &AgentStatus) -> Span<'static> { #[cfg(test)] mod tests { use super::*; - use std::time::Instant; + use std::time::{Duration, Instant}; fn make_test_agent(id: &str, task: &str, status: AgentStatus) -> RunningAgentInfo { RunningAgentInfo { diff --git a/src/cortex-tui/src/widgets/backtrack_overlay.rs b/src/cortex-tui/src/widgets/backtrack_overlay.rs index 010632a5..6c3010af 100644 --- a/src/cortex-tui/src/widgets/backtrack_overlay.rs +++ b/src/cortex-tui/src/widgets/backtrack_overlay.rs @@ -33,10 +33,10 @@ const OVERLAY_WIDTH_PERCENT: u16 = 80; const OVERLAY_HEIGHT_PERCENT: u16 = 60; /// Maximum number of messages to show in the list. -const MAX_VISIBLE_MESSAGES: usize = 20; +const _MAX_VISIBLE_MESSAGES: usize = 20; /// Maximum content preview length per message. -const MAX_CONTENT_PREVIEW: usize = 80; +const _MAX_CONTENT_PREVIEW: usize = 80; // ============================================================ // BACKTRACK OVERLAY diff --git a/src/cortex-tui/src/widgets/help_browser/mod.rs b/src/cortex-tui/src/widgets/help_browser/mod.rs index 7eb03760..bec7173b 100644 --- a/src/cortex-tui/src/widgets/help_browser/mod.rs +++ b/src/cortex-tui/src/widgets/help_browser/mod.rs @@ -28,7 +28,7 @@ mod tests; mod utils; // Re-export all public types for backwards compatibility -pub use content::{get_help_sections, HelpContent, HelpSection}; +pub use content::{HelpContent, HelpSection, get_help_sections}; pub use render::HelpBrowser; pub use state::{HelpBrowserState, HelpFocus}; pub use utils::wrap_text; diff --git a/src/cortex-tui/src/widgets/help_browser/state.rs b/src/cortex-tui/src/widgets/help_browser/state.rs index a8e07030..ebfe52c3 100644 --- a/src/cortex-tui/src/widgets/help_browser/state.rs +++ b/src/cortex-tui/src/widgets/help_browser/state.rs @@ -2,7 +2,7 @@ use unicode_segmentation::UnicodeSegmentation; -use super::content::{get_help_sections, HelpSection}; +use super::content::{HelpSection, get_help_sections}; // ============================================================ // HELP FOCUS STATE diff --git a/src/cortex-tui/src/widgets/help_browser/tests.rs b/src/cortex-tui/src/widgets/help_browser/tests.rs index 62b8e531..ed8a583a 100644 --- a/src/cortex-tui/src/widgets/help_browser/tests.rs +++ b/src/cortex-tui/src/widgets/help_browser/tests.rs @@ -6,7 +6,7 @@ mod tests { use ratatui::layout::Rect; use ratatui::widgets::Widget; - use crate::widgets::help_browser::content::{get_help_sections, HelpContent, HelpSection}; + use crate::widgets::help_browser::content::{HelpContent, HelpSection, get_help_sections}; use crate::widgets::help_browser::render::HelpBrowser; use crate::widgets::help_browser::state::{HelpBrowserState, HelpFocus}; use crate::widgets::help_browser::utils::wrap_text; diff --git a/src/cortex-tui/src/widgets/key_hints.rs b/src/cortex-tui/src/widgets/key_hints.rs index 1aa85ceb..ef30b1e2 100644 --- a/src/cortex-tui/src/widgets/key_hints.rs +++ b/src/cortex-tui/src/widgets/key_hints.rs @@ -55,10 +55,7 @@ impl HintContext { ("Esc", "close"), ("/", "filter"), ], - HintContext::SubagentView => vec![ - ("Esc", "back to main"), - ("↑/↓", "scroll"), - ], + HintContext::SubagentView => vec![("Esc", "back to main"), ("↑/↓", "scroll")], } } } @@ -219,7 +216,7 @@ impl KeyHints { } /// Builds the spans for rendering (full mode for backward compatibility). - fn build_spans(&self) -> Vec> { + fn _build_spans(&self) -> Vec> { self.build_spans_with_mode(HintDisplayMode::Full) } } diff --git a/src/cortex-utils/pty/src/lib.rs b/src/cortex-utils/pty/src/lib.rs index 94213f37..9b9a2973 100644 --- a/src/cortex-utils/pty/src/lib.rs +++ b/src/cortex-utils/pty/src/lib.rs @@ -29,8 +29,8 @@ // Re-export core types from portable-pty for convenient access pub use portable_pty::{ - Child, CommandBuilder, ExitStatus, MasterPty, PtyPair, PtySize, PtySystem, SlavePty, - native_pty_system, + native_pty_system, Child, CommandBuilder, ExitStatus, MasterPty, PtyPair, PtySize, PtySystem, + SlavePty, }; /// Default terminal width in columns.