-- Generated by Gleam CI helpers. module CI.Component (run, version, help, auth_login, auth_org, auth_logout, auth_status, list_issues, list_projects, list_orgs, quality_gate_status, import_repositories, api, integrate_git, integrate_claude, integrate_copilot, integrate_codex, integrate_antigravity, integrate_cursor, integrate_opencode, integrate_devin, integrate_pi, context, analyze, analyze_secrets, analyze_dependency_risks, analyze_agentic, remediate, link, link_list, config_get, config_list, config_set, config_unset, architecture_current_get, architecture_intended_get, architecture_intended_set, architecture_directives_get, architecture_directives_set, architecture_findings_get, architecture_install_skill, system_status, system_reset, allowlist_secrets_show, allowlist_secrets_add, allowlist_secrets_remove, allowlist_secrets_clear, update, update_status) where import Prelude import CI.Contract as Contract import Data.Maybe (Maybe) import Effect (Effect) import CI.ModuleDependencies as Dependencies import CI.CLI as Native -- | Execute any sonar command with literal comma-separated arguments. -- | @param project Working directory containing the source checkout; defaults to the current directory. Default: ".". -- | @param runDir Fresh directory for this invocation’s execution report and task logs; must not already exist. -- | @param executable Native CLI executable name or absolute path; defaults to this operation’s tool. -- | @param timeoutMs Maximum task duration in milliseconds; defaults to 900000. Default: 900000. -- | @param artifacts Comma-separated NAME=PATH output artifacts; use CSV double quotes around entries containing commas. -- | @param arguments Required comma-separated literal native argument tokens; CSV quoting preserves embedded commas. run :: { project :: Maybe String, runDir :: String, executable :: Maybe String, timeoutMs :: Maybe Int, artifacts :: Maybe String, arguments :: String } -> Effect Contract.ExecutionResult run args = do json <- Native.csvInput (Contract.input (Contract.encodeInput args)) >>= Contract.cliInput Native.executeWithSetup Dependencies.ensureFor "sonarqube" "run" json -- | Print the SonarQube CLI version. -- | @param project Working directory containing the source checkout; defaults to the current directory. Default: ".". -- | @param runDir Fresh directory for this invocation’s execution report and task logs; must not already exist. -- | @param executable Native CLI executable name or absolute path; defaults to this operation’s tool. -- | @param timeoutMs Maximum task duration in milliseconds; defaults to 900000. Default: 900000. -- | @param artifacts Comma-separated NAME=PATH output artifacts; use CSV double quotes around entries containing commas. version :: { project :: Maybe String, runDir :: String, executable :: Maybe String, timeoutMs :: Maybe Int, artifacts :: Maybe String } -> Effect Contract.ExecutionResult version args = do json <- Native.csvInput (Contract.input (Contract.encodeInput args)) >>= Contract.cliInput Native.executeWithSetup Dependencies.ensureFor "sonarqube" "version" json -- | Show SonarQube CLI commands and options. -- | @param project Working directory containing the source checkout; defaults to the current directory. Default: ".". -- | @param runDir Fresh directory for this invocation’s execution report and task logs; must not already exist. -- | @param executable Native CLI executable name or absolute path; defaults to this operation’s tool. -- | @param timeoutMs Maximum task duration in milliseconds; defaults to 900000. Default: 900000. -- | @param artifacts Comma-separated NAME=PATH output artifacts; use CSV double quotes around entries containing commas. help :: { project :: Maybe String, runDir :: String, executable :: Maybe String, timeoutMs :: Maybe Int, artifacts :: Maybe String } -> Effect Contract.ExecutionResult help args = do json <- Native.csvInput (Contract.input (Contract.encodeInput args)) >>= Contract.cliInput Native.executeWithSetup Dependencies.ensureFor "sonarqube" "help" json -- | Authenticate via browser or an existing token and save credentials in the system keychain. For CI and automation, use environment variables instead: https://docs.sonarsource.com/sonarqube-cli/using-sonarqube-cli/environment-variables -- | @param project Working directory containing the source checkout; defaults to the current directory. Default: ".". -- | @param runDir Fresh directory for this invocation’s execution report and task logs; must not already exist. -- | @param executable Native CLI executable name or absolute path; defaults to this operation’s tool. -- | @param timeoutMs Maximum task duration in milliseconds; defaults to 900000. Default: 900000. -- | @param artifacts Comma-separated NAME=PATH output artifacts; use CSV double quotes around entries containing commas. -- | @param server SonarQube Server URL, SonarQube Cloud EU (https://sonarcloud.io), or SonarQube Cloud US (https://sonarqube.us). Defaults to SonarQube Cloud EU. -- | @param org SonarQube Cloud organization key (required for SonarQube Cloud) -- | @param withToken Read an existing token from standard input auth_login :: { project :: Maybe String, runDir :: String, executable :: Maybe String, timeoutMs :: Maybe Int, artifacts :: Maybe String, server :: Maybe String, org :: Maybe String, withToken :: Maybe Boolean } -> Effect Contract.ExecutionResult auth_login args = do json <- Native.csvInput (Contract.input (Contract.encodeInput args)) >>= Contract.cliInput Native.executeWithSetup Dependencies.ensureFor "sonarqube" "auth_login" json -- | Switch the active SonarQube Cloud organization without logging in again Uses native credentials; for CI supply SONARQUBE_CLI_TOKEN and SONARQUBE_CLI_ORG or SONARQUBE_CLI_SERVER. -- | @param project Working directory containing the source checkout; defaults to the current directory. Default: ".". -- | @param runDir Fresh directory for this invocation’s execution report and task logs; must not already exist. -- | @param executable Native CLI executable name or absolute path; defaults to this operation’s tool. -- | @param timeoutMs Maximum task duration in milliseconds; defaults to 900000. Default: 900000. -- | @param artifacts Comma-separated NAME=PATH output artifacts; use CSV double quotes around entries containing commas. -- | @param org SonarQube Cloud organization key auth_org :: { project :: Maybe String, runDir :: String, executable :: Maybe String, timeoutMs :: Maybe Int, artifacts :: Maybe String, org :: Maybe String } -> Effect Contract.ExecutionResult auth_org args = do json <- Native.csvInput (Contract.input (Contract.encodeInput args)) >>= Contract.cliInput Native.executeWithSetup Dependencies.ensureFor "sonarqube" "auth_org" json -- | Remove the active connection, or all saved connections for a hostname with --server -- | @param project Working directory containing the source checkout; defaults to the current directory. Default: ".". -- | @param runDir Fresh directory for this invocation’s execution report and task logs; must not already exist. -- | @param executable Native CLI executable name or absolute path; defaults to this operation’s tool. -- | @param timeoutMs Maximum task duration in milliseconds; defaults to 900000. Default: 900000. -- | @param artifacts Comma-separated NAME=PATH output artifacts; use CSV double quotes around entries containing commas. -- | @param server Select a saved server URL and clear all saved connections and the shared token for its hostname auth_logout :: { project :: Maybe String, runDir :: String, executable :: Maybe String, timeoutMs :: Maybe Int, artifacts :: Maybe String, server :: Maybe String } -> Effect Contract.ExecutionResult auth_logout args = do json <- Native.csvInput (Contract.input (Contract.encodeInput args)) >>= Contract.cliInput Native.executeWithSetup Dependencies.ensureFor "sonarqube" "auth_logout" json -- | Show active authentication connection with token verification -- | @param project Working directory containing the source checkout; defaults to the current directory. Default: ".". -- | @param runDir Fresh directory for this invocation’s execution report and task logs; must not already exist. -- | @param executable Native CLI executable name or absolute path; defaults to this operation’s tool. -- | @param timeoutMs Maximum task duration in milliseconds; defaults to 900000. Default: 900000. -- | @param artifacts Comma-separated NAME=PATH output artifacts; use CSV double quotes around entries containing commas. -- | @param format Output format auth_status :: { project :: Maybe String, runDir :: String, executable :: Maybe String, timeoutMs :: Maybe Int, artifacts :: Maybe String, format :: Maybe String } -> Effect Contract.ExecutionResult auth_status args = do json <- Native.csvInput (Contract.input (Contract.encodeInput args)) >>= Contract.cliInput Native.executeWithSetup Dependencies.ensureFor "sonarqube" "auth_status" json -- | Search for issues in SonarQube Uses native credentials; for CI supply SONARQUBE_CLI_TOKEN and SONARQUBE_CLI_ORG or SONARQUBE_CLI_SERVER. -- | @param project Working directory containing the source checkout; defaults to the current directory. Default: ".". -- | @param runDir Fresh directory for this invocation’s execution report and task logs; must not already exist. -- | @param executable Native CLI executable name or absolute path; defaults to this operation’s tool. -- | @param timeoutMs Maximum task duration in milliseconds; defaults to 900000. Default: 900000. -- | @param artifacts Comma-separated NAME=PATH output artifacts; use CSV double quotes around entries containing commas. -- | @param projectKey Project key -- | @param statuses Filter by status (comma-separated list of: OPEN, CONFIRMED, FALSE_POSITIVE, ACCEPTED, FIXED). Defaults to OPEN, CONFIRMED. Comma-separated values; whitespace is trimmed and entries are passed literally. -- | @param severities Filter by severity. Valid values depend on server mode — Multi-Quality Rule (MQR) mode: INFO, LOW, MEDIUM, HIGH, BLOCKER; Standard Experience mode: INFO, MINOR, MAJOR, CRITICAL, BLOCKER. Comma-separated values; whitespace is trimmed and entries are passed literally. -- | @param format Output format -- | @param branch Branch name. Cannot be combined with --pull-request. -- | @param pullRequest Pull request ID. Cannot be combined with --branch. -- | @param file Limit results to one file, or to a directory's own files (not its subdirectories): a full path from the project root, or just a name if it matches only one -- | @param newCode Only show issues on new code (the leak period) -- | @param pageSize Page size (1-500) -- | @param page Page number list_issues :: { project :: Maybe String, runDir :: String, executable :: Maybe String, timeoutMs :: Maybe Int, artifacts :: Maybe String, projectKey :: Maybe String, statuses :: Maybe String, severities :: Maybe String, format :: Maybe String, branch :: Maybe String, pullRequest :: Maybe String, file :: Maybe String, newCode :: Maybe Boolean, pageSize :: Maybe Int, page :: Maybe Int } -> Effect Contract.ExecutionResult list_issues args = do json <- Native.csvInput (Contract.input (Contract.encodeInput args)) >>= Contract.cliInput Native.executeWithSetup Dependencies.ensureFor "sonarqube" "list_issues" json -- | Search for projects in SonarQube Uses native credentials; for CI supply SONARQUBE_CLI_TOKEN and SONARQUBE_CLI_ORG or SONARQUBE_CLI_SERVER. -- | @param project Working directory containing the source checkout; defaults to the current directory. Default: ".". -- | @param runDir Fresh directory for this invocation’s execution report and task logs; must not already exist. -- | @param executable Native CLI executable name or absolute path; defaults to this operation’s tool. -- | @param timeoutMs Maximum task duration in milliseconds; defaults to 900000. Default: 900000. -- | @param artifacts Comma-separated NAME=PATH output artifacts; use CSV double quotes around entries containing commas. -- | @param query Search query to filter projects by name or key -- | @param format Output format -- | @param page Page number -- | @param pageSize Page size (1-500) list_projects :: { project :: Maybe String, runDir :: String, executable :: Maybe String, timeoutMs :: Maybe Int, artifacts :: Maybe String, query :: Maybe String, format :: Maybe String, page :: Maybe Int, pageSize :: Maybe Int } -> Effect Contract.ExecutionResult list_projects args = do json <- Native.csvInput (Contract.input (Contract.encodeInput args)) >>= Contract.cliInput Native.executeWithSetup Dependencies.ensureFor "sonarqube" "list_projects" json -- | List organizations you have access to (SonarQube Cloud only) Uses native credentials; for CI supply SONARQUBE_CLI_TOKEN and SONARQUBE_CLI_ORG or SONARQUBE_CLI_SERVER. -- | @param project Working directory containing the source checkout; defaults to the current directory. Default: ".". -- | @param runDir Fresh directory for this invocation’s execution report and task logs; must not already exist. -- | @param executable Native CLI executable name or absolute path; defaults to this operation’s tool. -- | @param timeoutMs Maximum task duration in milliseconds; defaults to 900000. Default: 900000. -- | @param artifacts Comma-separated NAME=PATH output artifacts; use CSV double quotes around entries containing commas. -- | @param format Output format -- | @param page Page number -- | @param pageSize Page size (1-500) list_orgs :: { project :: Maybe String, runDir :: String, executable :: Maybe String, timeoutMs :: Maybe Int, artifacts :: Maybe String, format :: Maybe String, page :: Maybe Int, pageSize :: Maybe Int } -> Effect Contract.ExecutionResult list_orgs args = do json <- Native.csvInput (Contract.input (Contract.encodeInput args)) >>= Contract.cliInput Native.executeWithSetup Dependencies.ensureFor "sonarqube" "list_orgs" json -- | Show the quality gate verdict for a project Uses native credentials; for CI supply SONARQUBE_CLI_TOKEN and SONARQUBE_CLI_ORG or SONARQUBE_CLI_SERVER. -- | @param project Working directory containing the source checkout; defaults to the current directory. Default: ".". -- | @param runDir Fresh directory for this invocation’s execution report and task logs; must not already exist. -- | @param executable Native CLI executable name or absolute path; defaults to this operation’s tool. -- | @param timeoutMs Maximum task duration in milliseconds; defaults to 900000. Default: 900000. -- | @param artifacts Comma-separated NAME=PATH output artifacts; use CSV double quotes around entries containing commas. -- | @param projectKey Project key -- | @param format Output format -- | @param branch Branch name. Cannot be combined with --pull-request. -- | @param pullRequest Pull request ID. Cannot be combined with --branch. -- | @param all Also show passing conditions. By default only failing conditions are shown. -- | @param category Only show the breakdown for one category of failing conditions -- | @param top Number of entries to include in the breakdown, per condition -- | @param path File or directory path to show conditions for, instead of the whole project quality_gate_status :: { project :: Maybe String, runDir :: String, executable :: Maybe String, timeoutMs :: Maybe Int, artifacts :: Maybe String, projectKey :: Maybe String, format :: Maybe String, branch :: Maybe String, pullRequest :: Maybe String, all :: Maybe Boolean, category :: Maybe String, top :: Maybe Int, path :: Maybe String } -> Effect Contract.ExecutionResult quality_gate_status args = do json <- Native.csvInput (Contract.input (Contract.encodeInput args)) >>= Contract.cliInput Native.executeWithSetup Dependencies.ensureFor "sonarqube" "quality_gate_status" json -- | Import repositories from a connected DevOps platform into SonarQube Uses native credentials; for CI supply SONARQUBE_CLI_TOKEN and SONARQUBE_CLI_ORG or SONARQUBE_CLI_SERVER. -- | @param project Working directory containing the source checkout; defaults to the current directory. Default: ".". -- | @param runDir Fresh directory for this invocation’s execution report and task logs; must not already exist. -- | @param executable Native CLI executable name or absolute path; defaults to this operation’s tool. -- | @param timeoutMs Maximum task duration in milliseconds; defaults to 900000. Default: 900000. -- | @param artifacts Comma-separated NAME=PATH output artifacts; use CSV double quotes around entries containing commas. -- | @param repo DevOps platform repository slug (e.g. my-org/my-repo). Repeatable and/or comma-separated to import multiple repositories. Cannot be combined with --all or --regex. Comma-separated values; whitespace is trimmed and entries are passed literally. -- | @param all Import every eligible repository in the organization (not already imported, and allowed by its project visibility settings). Cannot be combined with --repo or --regex. -- | @param regex Import only eligible repositories whose DevOps platform name (not slug) matches this regular expression. Case-sensitive by default; wrap as /pattern/flags to add flags like case-insensitive matching. Cannot be combined with --repo or --all. Examples: --regex "^test-" --regex "/^archived-/i" -- | @param dopSetting SonarQube Server only: key of the DevOps platform setting to import from. Required when several are configured and prompts are off. -- | @param nonInteractive Skip all prompts; require explicit flags Default: true. import_repositories :: { project :: Maybe String, runDir :: String, executable :: Maybe String, timeoutMs :: Maybe Int, artifacts :: Maybe String, repo :: Maybe String, all :: Maybe Boolean, regex :: Maybe String, dopSetting :: Maybe String, nonInteractive :: Maybe Boolean } -> Effect Contract.ExecutionResult import_repositories args = do json <- Native.csvInput (Contract.input (Contract.encodeInput args)) >>= Contract.cliInput Native.executeWithSetup Dependencies.ensureFor "sonarqube" "import_repositories" json -- | Make authenticated API requests to SonarQube Uses native credentials; for CI supply SONARQUBE_CLI_TOKEN and SONARQUBE_CLI_ORG or SONARQUBE_CLI_SERVER. -- | @param project Working directory containing the source checkout; defaults to the current directory. Default: ".". -- | @param runDir Fresh directory for this invocation’s execution report and task logs; must not already exist. -- | @param executable Native CLI executable name or absolute path; defaults to this operation’s tool. -- | @param timeoutMs Maximum task duration in milliseconds; defaults to 900000. Default: 900000. -- | @param artifacts Comma-separated NAME=PATH output artifacts; use CSV double quotes around entries containing commas. -- | @param data JSON string for request body. The tool will automatically format as either form data or JSON body. -- | @param verbose Print request and response details for debugging. -- | @param method HTTP method (get, post, patch, put, delete) Allowed values: get, post, patch, put, delete. -- | @param endpoint API endpoint path. Must start with "/", and can contain query parameters. api :: { project :: Maybe String, runDir :: String, executable :: Maybe String, timeoutMs :: Maybe Int, artifacts :: Maybe String, "data" :: Maybe String, verbose :: Maybe Boolean, method :: String, endpoint :: String } -> Effect Contract.ExecutionResult api args = do json <- Native.csvInput (Contract.input (Contract.encodeInput args)) >>= Contract.cliInput Native.executeWithSetup Dependencies.ensureFor "sonarqube" "api" json -- | Install a Git pre-commit hook that scans staged files for secrets and dependency risks before each commit, or a Git pre-push hook that scans committed files for secrets before each push. Uses native credentials; for CI supply SONARQUBE_CLI_TOKEN and SONARQUBE_CLI_ORG or SONARQUBE_CLI_SERVER. -- | @param project Working directory containing the source checkout; defaults to the current directory. Default: ".". -- | @param runDir Fresh directory for this invocation’s execution report and task logs; must not already exist. -- | @param executable Native CLI executable name or absolute path; defaults to this operation’s tool. -- | @param timeoutMs Maximum task duration in milliseconds; defaults to 900000. Default: 900000. -- | @param artifacts Comma-separated NAME=PATH output artifacts; use CSV double quotes around entries containing commas. -- | @param hook Hook to install: pre-commit (scan staged files) or pre-push (scan files in unpushed commits) -- | @param force Overwrite existing hook if it is not from sonar integrate git -- | @param nonInteractive Non-interactive mode (no prompts) Default: true. -- | @param local Install the hook for this repository only, instead of globally (workaround for setups where a global hook does not fit, e.g. Husky) -- | @param global Backwards compatibility; the hook is installed globally by default integrate_git :: { project :: Maybe String, runDir :: String, executable :: Maybe String, timeoutMs :: Maybe Int, artifacts :: Maybe String, hook :: Maybe String, force :: Maybe Boolean, nonInteractive :: Maybe Boolean, local :: Maybe Boolean, global :: Maybe Boolean } -> Effect Contract.ExecutionResult integrate_git args = do json <- Native.csvInput (Contract.input (Contract.encodeInput args)) >>= Contract.cliInput Native.executeWithSetup Dependencies.ensureFor "sonarqube" "integrate_git" json -- | Setup SonarQube integration for Claude Code. This will install secrets scanning hooks, configure Vortex analysis and MCP Server. Uses native credentials; for CI supply SONARQUBE_CLI_TOKEN and SONARQUBE_CLI_ORG or SONARQUBE_CLI_SERVER. -- | @param project Working directory containing the source checkout; defaults to the current directory. Default: ".". -- | @param runDir Fresh directory for this invocation’s execution report and task logs; must not already exist. -- | @param executable Native CLI executable name or absolute path; defaults to this operation’s tool. -- | @param timeoutMs Maximum task duration in milliseconds; defaults to 900000. Default: 900000. -- | @param artifacts Comma-separated NAME=PATH output artifacts; use CSV double quotes around entries containing commas. -- | @param nonInteractive Non-interactive mode (no prompts) Default: true. -- | @param global Backwards compatibility; integrations are installed globally by default integrate_claude :: { project :: Maybe String, runDir :: String, executable :: Maybe String, timeoutMs :: Maybe Int, artifacts :: Maybe String, nonInteractive :: Maybe Boolean, global :: Maybe Boolean } -> Effect Contract.ExecutionResult integrate_claude args = do json <- Native.csvInput (Contract.input (Contract.encodeInput args)) >>= Contract.cliInput Native.executeWithSetup Dependencies.ensureFor "sonarqube" "integrate_claude" json -- | Setup SonarQube integration for GitHub Copilot CLI. This will install secrets scanning hooks, configure Vortex analysis and MCP Server. Uses native credentials; for CI supply SONARQUBE_CLI_TOKEN and SONARQUBE_CLI_ORG or SONARQUBE_CLI_SERVER. -- | @param project Working directory containing the source checkout; defaults to the current directory. Default: ".". -- | @param runDir Fresh directory for this invocation’s execution report and task logs; must not already exist. -- | @param executable Native CLI executable name or absolute path; defaults to this operation’s tool. -- | @param timeoutMs Maximum task duration in milliseconds; defaults to 900000. Default: 900000. -- | @param artifacts Comma-separated NAME=PATH output artifacts; use CSV double quotes around entries containing commas. -- | @param nonInteractive Non-interactive mode (no prompts) Default: true. -- | @param global Backwards compatibility; integrations are installed globally by default integrate_copilot :: { project :: Maybe String, runDir :: String, executable :: Maybe String, timeoutMs :: Maybe Int, artifacts :: Maybe String, nonInteractive :: Maybe Boolean, global :: Maybe Boolean } -> Effect Contract.ExecutionResult integrate_copilot args = do json <- Native.csvInput (Contract.input (Contract.encodeInput args)) >>= Contract.cliInput Native.executeWithSetup Dependencies.ensureFor "sonarqube" "integrate_copilot" json -- | Setup SonarQube integration for Codex. This will install secrets scanning hooks, configure Vortex analysis and MCP Server. Uses native credentials; for CI supply SONARQUBE_CLI_TOKEN and SONARQUBE_CLI_ORG or SONARQUBE_CLI_SERVER. -- | @param project Working directory containing the source checkout; defaults to the current directory. Default: ".". -- | @param runDir Fresh directory for this invocation’s execution report and task logs; must not already exist. -- | @param executable Native CLI executable name or absolute path; defaults to this operation’s tool. -- | @param timeoutMs Maximum task duration in milliseconds; defaults to 900000. Default: 900000. -- | @param artifacts Comma-separated NAME=PATH output artifacts; use CSV double quotes around entries containing commas. -- | @param nonInteractive Non-interactive mode (no prompts) Default: true. -- | @param global Backwards compatibility; integrations are installed globally by default integrate_codex :: { project :: Maybe String, runDir :: String, executable :: Maybe String, timeoutMs :: Maybe Int, artifacts :: Maybe String, nonInteractive :: Maybe Boolean, global :: Maybe Boolean } -> Effect Contract.ExecutionResult integrate_codex args = do json <- Native.csvInput (Contract.input (Contract.encodeInput args)) >>= Contract.cliInput Native.executeWithSetup Dependencies.ensureFor "sonarqube" "integrate_codex" json -- | Setup SonarQube integration for Antigravity. Installs secrets scanning hooks, prompt-secrets instructions, and Vortex Context. Uses native credentials; for CI supply SONARQUBE_CLI_TOKEN and SONARQUBE_CLI_ORG or SONARQUBE_CLI_SERVER. -- | @param project Working directory containing the source checkout; defaults to the current directory. Default: ".". -- | @param runDir Fresh directory for this invocation’s execution report and task logs; must not already exist. -- | @param executable Native CLI executable name or absolute path; defaults to this operation’s tool. -- | @param timeoutMs Maximum task duration in milliseconds; defaults to 900000. Default: 900000. -- | @param artifacts Comma-separated NAME=PATH output artifacts; use CSV double quotes around entries containing commas. -- | @param nonInteractive Non-interactive mode (no prompts) Default: true. -- | @param global Backwards compatibility; integrations are installed globally by default integrate_antigravity :: { project :: Maybe String, runDir :: String, executable :: Maybe String, timeoutMs :: Maybe Int, artifacts :: Maybe String, nonInteractive :: Maybe Boolean, global :: Maybe Boolean } -> Effect Contract.ExecutionResult integrate_antigravity args = do json <- Native.csvInput (Contract.input (Contract.encodeInput args)) >>= Contract.cliInput Native.executeWithSetup Dependencies.ensureFor "sonarqube" "integrate_antigravity" json -- | Setup SonarQube integration for Cursor. This will configure the SonarQube MCP Server, install secrets scanning hooks, and configure Vortex analysis. Note: Cursor's cloud/background agents only pick up project-level hooks, not global ones. Uses native credentials; for CI supply SONARQUBE_CLI_TOKEN and SONARQUBE_CLI_ORG or SONARQUBE_CLI_SERVER. -- | @param project Working directory containing the source checkout; defaults to the current directory. Default: ".". -- | @param runDir Fresh directory for this invocation’s execution report and task logs; must not already exist. -- | @param executable Native CLI executable name or absolute path; defaults to this operation’s tool. -- | @param timeoutMs Maximum task duration in milliseconds; defaults to 900000. Default: 900000. -- | @param artifacts Comma-separated NAME=PATH output artifacts; use CSV double quotes around entries containing commas. -- | @param nonInteractive Non-interactive mode (no prompts) Default: true. -- | @param global Backwards compatibility; integrations are installed globally by default integrate_cursor :: { project :: Maybe String, runDir :: String, executable :: Maybe String, timeoutMs :: Maybe Int, artifacts :: Maybe String, nonInteractive :: Maybe Boolean, global :: Maybe Boolean } -> Effect Contract.ExecutionResult integrate_cursor args = do json <- Native.csvInput (Contract.input (Contract.encodeInput args)) >>= Contract.cliInput Native.executeWithSetup Dependencies.ensureFor "sonarqube" "integrate_cursor" json -- | Setup SonarQube integration for OpenCode. This will install secrets scanning hooks, configure Vortex analysis and MCP Server. Uses native credentials; for CI supply SONARQUBE_CLI_TOKEN and SONARQUBE_CLI_ORG or SONARQUBE_CLI_SERVER. -- | @param project Working directory containing the source checkout; defaults to the current directory. Default: ".". -- | @param runDir Fresh directory for this invocation’s execution report and task logs; must not already exist. -- | @param executable Native CLI executable name or absolute path; defaults to this operation’s tool. -- | @param timeoutMs Maximum task duration in milliseconds; defaults to 900000. Default: 900000. -- | @param artifacts Comma-separated NAME=PATH output artifacts; use CSV double quotes around entries containing commas. -- | @param nonInteractive Non-interactive mode (no prompts) Default: true. -- | @param global Backwards compatibility; integrations are installed globally by default integrate_opencode :: { project :: Maybe String, runDir :: String, executable :: Maybe String, timeoutMs :: Maybe Int, artifacts :: Maybe String, nonInteractive :: Maybe Boolean, global :: Maybe Boolean } -> Effect Contract.ExecutionResult integrate_opencode args = do json <- Native.csvInput (Contract.input (Contract.encodeInput args)) >>= Contract.cliInput Native.executeWithSetup Dependencies.ensureFor "sonarqube" "integrate_opencode" json -- | Setup SonarQube integration for Devin. This will install secrets scanning hooks, configure Vortex analysis and MCP Server. Uses native credentials; for CI supply SONARQUBE_CLI_TOKEN and SONARQUBE_CLI_ORG or SONARQUBE_CLI_SERVER. -- | @param project Working directory containing the source checkout; defaults to the current directory. Default: ".". -- | @param runDir Fresh directory for this invocation’s execution report and task logs; must not already exist. -- | @param executable Native CLI executable name or absolute path; defaults to this operation’s tool. -- | @param timeoutMs Maximum task duration in milliseconds; defaults to 900000. Default: 900000. -- | @param artifacts Comma-separated NAME=PATH output artifacts; use CSV double quotes around entries containing commas. -- | @param nonInteractive Non-interactive mode (no prompts) Default: true. -- | @param global Backwards compatibility; integrations are installed globally by default integrate_devin :: { project :: Maybe String, runDir :: String, executable :: Maybe String, timeoutMs :: Maybe Int, artifacts :: Maybe String, nonInteractive :: Maybe Boolean, global :: Maybe Boolean } -> Effect Contract.ExecutionResult integrate_devin args = do json <- Native.csvInput (Contract.input (Contract.encodeInput args)) >>= Contract.cliInput Native.executeWithSetup Dependencies.ensureFor "sonarqube" "integrate_devin" json -- | Setup SonarQube integration for Pi. This will install secrets scanning hooks, configure Vortex analysis and the SonarQube MCP Server. Uses native credentials; for CI supply SONARQUBE_CLI_TOKEN and SONARQUBE_CLI_ORG or SONARQUBE_CLI_SERVER. -- | @param project Working directory containing the source checkout; defaults to the current directory. Default: ".". -- | @param runDir Fresh directory for this invocation’s execution report and task logs; must not already exist. -- | @param executable Native CLI executable name or absolute path; defaults to this operation’s tool. -- | @param timeoutMs Maximum task duration in milliseconds; defaults to 900000. Default: 900000. -- | @param artifacts Comma-separated NAME=PATH output artifacts; use CSV double quotes around entries containing commas. -- | @param nonInteractive Non-interactive mode (no prompts) Default: true. -- | @param global Backwards compatibility; integrations are installed globally by default integrate_pi :: { project :: Maybe String, runDir :: String, executable :: Maybe String, timeoutMs :: Maybe Int, artifacts :: Maybe String, nonInteractive :: Maybe Boolean, global :: Maybe Boolean } -> Effect Contract.ExecutionResult integrate_pi args = do json <- Native.csvInput (Contract.input (Contract.encodeInput args)) >>= Contract.cliInput Native.executeWithSetup Dependencies.ensureFor "sonarqube" "integrate_pi" json -- | Augment AI agents with context from your codebase -- | @param project Working directory containing the source checkout; defaults to the current directory. Default: ".". -- | @param runDir Fresh directory for this invocation’s execution report and task logs; must not already exist. -- | @param executable Native CLI executable name or absolute path; defaults to this operation’s tool. -- | @param timeoutMs Maximum task duration in milliseconds; defaults to 900000. Default: 900000. -- | @param artifacts Comma-separated NAME=PATH output artifacts; use CSV double quotes around entries containing commas. -- | @param action Action forwarded to sonar-context-augmentation -- | @param contextArguments Additional arguments forwarded to sonar-context-augmentation Comma-separated literal tokens. context :: { project :: Maybe String, runDir :: String, executable :: Maybe String, timeoutMs :: Maybe Int, artifacts :: Maybe String, action :: String, contextArguments :: Maybe String } -> Effect Contract.ExecutionResult context args = do json <- Native.csvInput (Contract.input (Contract.encodeInput args)) >>= Contract.cliInput Native.executeWithSetup Dependencies.ensureFor "sonarqube" "context" json -- | Analyze code for quality and security issues Uses native credentials; for CI supply SONARQUBE_CLI_TOKEN and SONARQUBE_CLI_ORG or SONARQUBE_CLI_SERVER. -- | @param project Working directory containing the source checkout; defaults to the current directory. Default: ".". -- | @param runDir Fresh directory for this invocation’s execution report and task logs; must not already exist. -- | @param executable Native CLI executable name or absolute path; defaults to this operation’s tool. -- | @param timeoutMs Maximum task duration in milliseconds; defaults to 900000. Default: 900000. -- | @param artifacts Comma-separated NAME=PATH output artifacts; use CSV double quotes around entries containing commas. -- | @param files Analyze specific file(s) instead of the git change set (repeatable) Comma-separated values; whitespace is trimmed and entries are passed literally. -- | @param staged Analyze staged files only (git diff --cached) -- | @param base Analyze files changed vs a branch or ref (e.g. main) -- | @param projectKey SonarQube project key (overrides auto-detected project) -- | @param force Skip the large change set confirmation prompt -- | @param depth Analysis depth: STANDARD (fast) or DEEP (cross-file). Default: STANDARD for one --file; DEEP otherwise. Allowed values: STANDARD, DEEP. -- | @param format Output format analyze :: { project :: Maybe String, runDir :: String, executable :: Maybe String, timeoutMs :: Maybe Int, artifacts :: Maybe String, files :: Maybe String, staged :: Maybe Boolean, base :: Maybe String, projectKey :: Maybe String, force :: Maybe Boolean, depth :: Maybe String, format :: Maybe String } -> Effect Contract.ExecutionResult analyze args = do json <- Native.csvInput (Contract.input (Contract.encodeInput args)) >>= Contract.cliInput Native.executeWithSetup Dependencies.ensureFor "sonarqube" "analyze" json -- | Scan files or stdin for hardcoded secrets Uses native credentials; for CI supply SONARQUBE_CLI_TOKEN and SONARQUBE_CLI_ORG or SONARQUBE_CLI_SERVER. -- | @param project Working directory containing the source checkout; defaults to the current directory. Default: ".". -- | @param runDir Fresh directory for this invocation’s execution report and task logs; must not already exist. -- | @param executable Native CLI executable name or absolute path; defaults to this operation’s tool. -- | @param timeoutMs Maximum task duration in milliseconds; defaults to 900000. Default: 900000. -- | @param artifacts Comma-separated NAME=PATH output artifacts; use CSV double quotes around entries containing commas. -- | @param stdin Read from standard input instead of paths -- | @param exclude File or directory to skip (repeatable; exact path or directory prefix, no wildcards). Overrides the secrets.exclude config key Comma-separated values; whitespace is trimmed and entries are passed literally. -- | @param paths File or directory paths to scan for secrets Comma-separated literal tokens. analyze_secrets :: { project :: Maybe String, runDir :: String, executable :: Maybe String, timeoutMs :: Maybe Int, artifacts :: Maybe String, stdin :: Maybe Boolean, exclude :: Maybe String, paths :: Maybe String } -> Effect Contract.ExecutionResult analyze_secrets args = do json <- Native.csvInput (Contract.input (Contract.encodeInput args)) >>= Contract.cliInput Native.executeWithSetup Dependencies.ensureFor "sonarqube" "analyze_secrets" json -- | Analyze project dependencies for security and license risks Uses native credentials; for CI supply SONARQUBE_CLI_TOKEN and SONARQUBE_CLI_ORG or SONARQUBE_CLI_SERVER. -- | @param project Working directory containing the source checkout; defaults to the current directory. Default: ".". -- | @param runDir Fresh directory for this invocation’s execution report and task logs; must not already exist. -- | @param executable Native CLI executable name or absolute path; defaults to this operation’s tool. -- | @param timeoutMs Maximum task duration in milliseconds; defaults to 900000. Default: 900000. -- | @param artifacts Comma-separated NAME=PATH output artifacts; use CSV double quotes around entries containing commas. -- | @param projectKey Project key (auto-detected when omitted) -- | @param format Output format -- | @param statuses Filter issues by status Raw: new | open | confirm | accept | safe | fixed Presets: active | to_fix | all active: new, open, confirm to_fix: new, open, confirm, accept all: new, open, confirm, accept, safe, fixed Presets and raw statuses can be combined; the resulting set is the union. Examples: --statuses active --statuses new,confirm --statuses active,safe Comma-separated values; whitespace is trimmed and entries are passed literally. -- | @param minSeverity Minimum severity level to include. Allowed values: BLOCKER, HIGH, MEDIUM, LOW, INFO (default: all severities) analyze_dependency_risks :: { project :: Maybe String, runDir :: String, executable :: Maybe String, timeoutMs :: Maybe Int, artifacts :: Maybe String, projectKey :: Maybe String, format :: Maybe String, statuses :: Maybe String, minSeverity :: Maybe String } -> Effect Contract.ExecutionResult analyze_dependency_risks args = do json <- Native.csvInput (Contract.input (Contract.encodeInput args)) >>= Contract.cliInput Native.executeWithSetup Dependencies.ensureFor "sonarqube" "analyze_dependency_risks" json -- | Run server-side Vortex analysis. Limitations apply Uses native credentials; for CI supply SONARQUBE_CLI_TOKEN and SONARQUBE_CLI_ORG or SONARQUBE_CLI_SERVER. -- | @param project Working directory containing the source checkout; defaults to the current directory. Default: ".". -- | @param runDir Fresh directory for this invocation’s execution report and task logs; must not already exist. -- | @param executable Native CLI executable name or absolute path; defaults to this operation’s tool. -- | @param timeoutMs Maximum task duration in milliseconds; defaults to 900000. Default: 900000. -- | @param artifacts Comma-separated NAME=PATH output artifacts; use CSV double quotes around entries containing commas. -- | @param files Analyze specific file(s) instead of the git change set (repeatable) Comma-separated values; whitespace is trimmed and entries are passed literally. -- | @param staged Analyze staged files only (git diff --cached) -- | @param base Analyze files changed vs a branch or ref (e.g. main) -- | @param projectKey SonarQube project key (overrides auto-detected project) -- | @param force Skip the large change set confirmation prompt -- | @param depth Analysis depth: STANDARD (fast) or DEEP (cross-file). Default: STANDARD for one --file; DEEP otherwise. Allowed values: STANDARD, DEEP. -- | @param format Output format -- | @param branch Branch name for analysis context analyze_agentic :: { project :: Maybe String, runDir :: String, executable :: Maybe String, timeoutMs :: Maybe Int, artifacts :: Maybe String, files :: Maybe String, staged :: Maybe Boolean, base :: Maybe String, projectKey :: Maybe String, force :: Maybe Boolean, depth :: Maybe String, format :: Maybe String, branch :: Maybe String } -> Effect Contract.ExecutionResult analyze_agentic args = do json <- Native.csvInput (Contract.input (Contract.encodeInput args)) >>= Contract.cliInput Native.executeWithSetup Dependencies.ensureFor "sonarqube" "analyze_agentic" json -- | Trigger AI agent remediation for eligible issues (SonarQube Cloud only) Uses native credentials; for CI supply SONARQUBE_CLI_TOKEN and SONARQUBE_CLI_ORG or SONARQUBE_CLI_SERVER. -- | @param project Working directory containing the source checkout; defaults to the current directory. Default: ".". -- | @param runDir Fresh directory for this invocation’s execution report and task logs; must not already exist. -- | @param executable Native CLI executable name or absolute path; defaults to this operation’s tool. -- | @param timeoutMs Maximum task duration in milliseconds; defaults to 900000. Default: 900000. -- | @param artifacts Comma-separated NAME=PATH output artifacts; use CSV double quotes around entries containing commas. -- | @param projectKey SonarQube Cloud project key (overrides auto-detected project) -- | @param issues Comma-separated issue keys to remediate non-interactively (max 20). Required when stdin is not a TTY. Comma-separated values; whitespace is trimmed and entries are passed literally. remediate :: { project :: Maybe String, runDir :: String, executable :: Maybe String, timeoutMs :: Maybe Int, artifacts :: Maybe String, projectKey :: Maybe String, issues :: Maybe String } -> Effect Contract.ExecutionResult remediate args = do json <- Native.csvInput (Contract.input (Contract.encodeInput args)) >>= Contract.cliInput Native.executeWithSetup Dependencies.ensureFor "sonarqube" "remediate" json -- | Link a project to the active connection in .sonar-config.json Uses native credentials; for CI supply SONARQUBE_CLI_TOKEN and SONARQUBE_CLI_ORG or SONARQUBE_CLI_SERVER. -- | @param project Working directory containing the source checkout; defaults to the current directory. Default: ".". -- | @param runDir Fresh directory for this invocation’s execution report and task logs; must not already exist. -- | @param executable Native CLI executable name or absolute path; defaults to this operation’s tool. -- | @param timeoutMs Maximum task duration in milliseconds; defaults to 900000. Default: 900000. -- | @param artifacts Comma-separated NAME=PATH output artifacts; use CSV double quotes around entries containing commas. -- | @param path Path to the project root, relative to the repository root -- | @param monorepo Add or update this directory in the projects array instead of replacing the single link -- | @param projectKey SonarQube project key (omit to pick one: a verified suggestion, or a search) link :: { project :: Maybe String, runDir :: String, executable :: Maybe String, timeoutMs :: Maybe Int, artifacts :: Maybe String, path :: Maybe String, monorepo :: Maybe Boolean, projectKey :: String } -> Effect Contract.ExecutionResult link args = do json <- Native.csvInput (Contract.input (Contract.encodeInput args)) >>= Contract.cliInput Native.executeWithSetup Dependencies.ensureFor "sonarqube" "link" json -- | List linked projects at, under or enclosing a path as JSON, nearest first Uses native credentials; for CI supply SONARQUBE_CLI_TOKEN and SONARQUBE_CLI_ORG or SONARQUBE_CLI_SERVER. -- | @param project Working directory containing the source checkout; defaults to the current directory. Default: ".". -- | @param runDir Fresh directory for this invocation’s execution report and task logs; must not already exist. -- | @param executable Native CLI executable name or absolute path; defaults to this operation’s tool. -- | @param timeoutMs Maximum task duration in milliseconds; defaults to 900000. Default: 900000. -- | @param artifacts Comma-separated NAME=PATH output artifacts; use CSV double quotes around entries containing commas. -- | @param path File or directory to list projects for (default: current directory) -- | @param pattern Only list projects whose key or directory matches this regex -- | @param page Page number -- | @param pageSize Page size (1-100) link_list :: { project :: Maybe String, runDir :: String, executable :: Maybe String, timeoutMs :: Maybe Int, artifacts :: Maybe String, path :: Maybe String, pattern :: Maybe String, page :: Maybe Int, pageSize :: Maybe Int } -> Effect Contract.ExecutionResult link_list args = do json <- Native.csvInput (Contract.input (Contract.encodeInput args)) >>= Contract.cliInput Native.executeWithSetup Dependencies.ensureFor "sonarqube" "link_list" json -- | Print a stored sonar config value -- | @param project Working directory containing the source checkout; defaults to the current directory. Default: ".". -- | @param runDir Fresh directory for this invocation’s execution report and task logs; must not already exist. -- | @param executable Native CLI executable name or absolute path; defaults to this operation’s tool. -- | @param timeoutMs Maximum task duration in milliseconds; defaults to 900000. Default: 900000. -- | @param artifacts Comma-separated NAME=PATH output artifacts; use CSV double quotes around entries containing commas. -- | @param format Output format -- | @param key Config key to read config_get :: { project :: Maybe String, runDir :: String, executable :: Maybe String, timeoutMs :: Maybe Int, artifacts :: Maybe String, format :: Maybe String, key :: String } -> Effect Contract.ExecutionResult config_get args = do json <- Native.csvInput (Contract.input (Contract.encodeInput args)) >>= Contract.cliInput Native.executeWithSetup Dependencies.ensureFor "sonarqube" "config_get" json -- | Print every sonar config key with its current value -- | @param project Working directory containing the source checkout; defaults to the current directory. Default: ".". -- | @param runDir Fresh directory for this invocation’s execution report and task logs; must not already exist. -- | @param executable Native CLI executable name or absolute path; defaults to this operation’s tool. -- | @param timeoutMs Maximum task duration in milliseconds; defaults to 900000. Default: 900000. -- | @param artifacts Comma-separated NAME=PATH output artifacts; use CSV double quotes around entries containing commas. -- | @param format Output format -- | @param onlySet Only show keys that currently have a value config_list :: { project :: Maybe String, runDir :: String, executable :: Maybe String, timeoutMs :: Maybe Int, artifacts :: Maybe String, format :: Maybe String, onlySet :: Maybe Boolean } -> Effect Contract.ExecutionResult config_list args = do json <- Native.csvInput (Contract.input (Contract.encodeInput args)) >>= Contract.cliInput Native.executeWithSetup Dependencies.ensureFor "sonarqube" "config_list" json -- | Store a sonar config value -- | @param project Working directory containing the source checkout; defaults to the current directory. Default: ".". -- | @param runDir Fresh directory for this invocation’s execution report and task logs; must not already exist. -- | @param executable Native CLI executable name or absolute path; defaults to this operation’s tool. -- | @param timeoutMs Maximum task duration in milliseconds; defaults to 900000. Default: 900000. -- | @param artifacts Comma-separated NAME=PATH output artifacts; use CSV double quotes around entries containing commas. -- | @param key Config key to set -- | @param value Value to store; omit to enter it interactively without echoing config_set :: { project :: Maybe String, runDir :: String, executable :: Maybe String, timeoutMs :: Maybe Int, artifacts :: Maybe String, key :: String, value :: String } -> Effect Contract.ExecutionResult config_set args = do json <- Native.csvInput (Contract.input (Contract.encodeInput args)) >>= Contract.cliInput Native.executeWithSetup Dependencies.ensureFor "sonarqube" "config_set" json -- | Remove a stored sonar config value -- | @param project Working directory containing the source checkout; defaults to the current directory. Default: ".". -- | @param runDir Fresh directory for this invocation’s execution report and task logs; must not already exist. -- | @param executable Native CLI executable name or absolute path; defaults to this operation’s tool. -- | @param timeoutMs Maximum task duration in milliseconds; defaults to 900000. Default: 900000. -- | @param artifacts Comma-separated NAME=PATH output artifacts; use CSV double quotes around entries containing commas. -- | @param key Config key to unset config_unset :: { project :: Maybe String, runDir :: String, executable :: Maybe String, timeoutMs :: Maybe Int, artifacts :: Maybe String, key :: String } -> Effect Contract.ExecutionResult config_unset args = do json <- Native.csvInput (Contract.input (Contract.encodeInput args)) >>= Contract.cliInput Native.executeWithSetup Dependencies.ensureFor "sonarqube" "config_unset" json -- | Current architecture, at most 150 nodes, 20 dependencies and 5 feedback pairs across languages; drill down with --component and --depth Uses native credentials; for CI supply SONARQUBE_CLI_TOKEN and SONARQUBE_CLI_ORG or SONARQUBE_CLI_SERVER. -- | @param project Working directory containing the source checkout; defaults to the current directory. Default: ".". -- | @param runDir Fresh directory for this invocation’s execution report and task logs; must not already exist. -- | @param executable Native CLI executable name or absolute path; defaults to this operation’s tool. -- | @param timeoutMs Maximum task duration in milliseconds; defaults to 900000. Default: 900000. -- | @param artifacts Comma-separated NAME=PATH output artifacts; use CSV double quotes around entries containing commas. -- | @param projectKey Project key -- | @param component Node key to start below, from a previous current get -- | @param depth Levels below the start node (default 1) -- | @param from Dependency source key, including descendants; requires --to -- | @param to Dependency destination key, including descendants; requires --from -- | @param page Dependency page (default 1; requires --from/--to) -- | @param pageSize Dependencies per page (default/maximum 20) -- | @param language Only this language (default: all) -- | @param format Output format (default: text on a terminal, toon otherwise) architecture_current_get :: { project :: Maybe String, runDir :: String, executable :: Maybe String, timeoutMs :: Maybe Int, artifacts :: Maybe String, projectKey :: Maybe String, component :: Maybe String, depth :: Maybe Int, from :: Maybe String, to :: Maybe String, page :: Maybe Int, pageSize :: Maybe Int, language :: Maybe String, format :: Maybe String } -> Effect Contract.ExecutionResult architecture_current_get args = do json <- Native.csvInput (Contract.input (Contract.encodeInput args)) >>= Contract.cliInput Native.executeWithSetup Dependencies.ensureFor "sonarqube" "architecture_current_get" json -- | Intended architecture; full JSON can be saved with intended set, --component/--depth give partial views, --language exports are CLI-only and cannot be passed to MCP architecture_set Uses native credentials; for CI supply SONARQUBE_CLI_TOKEN and SONARQUBE_CLI_ORG or SONARQUBE_CLI_SERVER. -- | @param project Working directory containing the source checkout; defaults to the current directory. Default: ".". -- | @param runDir Fresh directory for this invocation’s execution report and task logs; must not already exist. -- | @param executable Native CLI executable name or absolute path; defaults to this operation’s tool. -- | @param timeoutMs Maximum task duration in milliseconds; defaults to 900000. Default: 900000. -- | @param artifacts Comma-separated NAME=PATH output artifacts; use CSV double quotes around entries containing commas. -- | @param projectKey Project key -- | @param component Group key to start below, e.g. Domain/Billing -- | @param depth Levels of groups below the start group (default: all) -- | @param language Only this language (default: all) -- | @param format Output format (default: text on a terminal, toon otherwise) architecture_intended_get :: { project :: Maybe String, runDir :: String, executable :: Maybe String, timeoutMs :: Maybe Int, artifacts :: Maybe String, projectKey :: Maybe String, component :: Maybe String, depth :: Maybe Int, language :: Maybe String, format :: Maybe String } -> Effect Contract.ExecutionResult architecture_intended_get args = do json <- Native.csvInput (Contract.input (Contract.encodeInput args)) >>= Contract.cliInput Native.executeWithSetup Dependencies.ensureFor "sonarqube" "architecture_intended_get" json -- | Replace the intended architecture with a file shaped like the output of intended get --format json Uses native credentials; for CI supply SONARQUBE_CLI_TOKEN and SONARQUBE_CLI_ORG or SONARQUBE_CLI_SERVER. -- | @param project Working directory containing the source checkout; defaults to the current directory. Default: ".". -- | @param runDir Fresh directory for this invocation’s execution report and task logs; must not already exist. -- | @param executable Native CLI executable name or absolute path; defaults to this operation’s tool. -- | @param timeoutMs Maximum task duration in milliseconds; defaults to 900000. Default: 900000. -- | @param artifacts Comma-separated NAME=PATH output artifacts; use CSV double quotes around entries containing commas. -- | @param file Intended architecture JSON file -- | @param dryRun Validate and show the changes, removals first, without writing -- | @param projectKey Project key architecture_intended_set :: { project :: Maybe String, runDir :: String, executable :: Maybe String, timeoutMs :: Maybe Int, artifacts :: Maybe String, file :: String, dryRun :: Maybe Boolean, projectKey :: Maybe String } -> Effect Contract.ExecutionResult architecture_intended_set args = do json <- Native.csvInput (Contract.input (Contract.encodeInput args)) >>= Contract.cliInput Native.executeWithSetup Dependencies.ensureFor "sonarqube" "architecture_intended_set" json -- | Read a directive by id or list a page of visible project directives Uses native credentials; for CI supply SONARQUBE_CLI_TOKEN and SONARQUBE_CLI_ORG or SONARQUBE_CLI_SERVER. -- | @param project Working directory containing the source checkout; defaults to the current directory. Default: ".". -- | @param runDir Fresh directory for this invocation’s execution report and task logs; must not already exist. -- | @param executable Native CLI executable name or absolute path; defaults to this operation’s tool. -- | @param timeoutMs Maximum task duration in milliseconds; defaults to 900000. Default: 900000. -- | @param artifacts Comma-separated NAME=PATH output artifacts; use CSV double quotes around entries containing commas. -- | @param id Directive UUID; cannot be combined with pagination -- | @param projectKey Project key -- | @param format Output format (default: text on a terminal, toon otherwise) -- | @param page Page number (default 1) -- | @param pageSize Items per page (default 50, maximum 1000) architecture_directives_get :: { project :: Maybe String, runDir :: String, executable :: Maybe String, timeoutMs :: Maybe Int, artifacts :: Maybe String, id :: Maybe String, projectKey :: Maybe String, format :: Maybe String, page :: Maybe Int, pageSize :: Maybe Int } -> Effect Contract.ExecutionResult architecture_directives_get args = do json <- Native.csvInput (Contract.input (Contract.encodeInput args)) >>= Contract.cliInput Native.executeWithSetup Dependencies.ensureFor "sonarqube" "architecture_directives_get" json -- | Create, update or delete explicit project directives Uses native credentials; for CI supply SONARQUBE_CLI_TOKEN and SONARQUBE_CLI_ORG or SONARQUBE_CLI_SERVER. -- | @param project Working directory containing the source checkout; defaults to the current directory. Default: ".". -- | @param runDir Fresh directory for this invocation’s execution report and task logs; must not already exist. -- | @param executable Native CLI executable name or absolute path; defaults to this operation’s tool. -- | @param timeoutMs Maximum task duration in milliseconds; defaults to 900000. Default: 900000. -- | @param artifacts Comma-separated NAME=PATH output artifacts; use CSV double quotes around entries containing commas. -- | @param file JSON object with create, update and delete arrays -- | @param dryRun Preview changes without writing -- | @param projectKey Project key architecture_directives_set :: { project :: Maybe String, runDir :: String, executable :: Maybe String, timeoutMs :: Maybe Int, artifacts :: Maybe String, file :: String, dryRun :: Maybe Boolean, projectKey :: Maybe String } -> Effect Contract.ExecutionResult architecture_directives_set args = do json <- Native.csvInput (Contract.input (Contract.encodeInput args)) >>= Contract.cliInput Native.executeWithSetup Dependencies.ensureFor "sonarqube" "architecture_directives_set" json -- | List findings with their details from the latest main-branch analysis Uses native credentials; for CI supply SONARQUBE_CLI_TOKEN and SONARQUBE_CLI_ORG or SONARQUBE_CLI_SERVER. -- | @param project Working directory containing the source checkout; defaults to the current directory. Default: ".". -- | @param runDir Fresh directory for this invocation’s execution report and task logs; must not already exist. -- | @param executable Native CLI executable name or absolute path; defaults to this operation’s tool. -- | @param timeoutMs Maximum task duration in milliseconds; defaults to 900000. Default: 900000. -- | @param artifacts Comma-separated NAME=PATH output artifacts; use CSV double quotes around entries containing commas. -- | @param projectKey Project key -- | @param category Only this category -- | @param type Only this finding type -- | @param language Only this language (default: all) -- | @param format Output format (default: text on a terminal, toon otherwise) -- | @param page Page number (default 1) -- | @param pageSize Items per page (default 50, 0 counts only, maximum 1000) architecture_findings_get :: { project :: Maybe String, runDir :: String, executable :: Maybe String, timeoutMs :: Maybe Int, artifacts :: Maybe String, projectKey :: Maybe String, category :: Maybe String, "type" :: Maybe String, language :: Maybe String, format :: Maybe String, page :: Maybe Int, pageSize :: Maybe Int } -> Effect Contract.ExecutionResult architecture_findings_get args = do json <- Native.csvInput (Contract.input (Contract.encodeInput args)) >>= Contract.cliInput Native.executeWithSetup Dependencies.ensureFor "sonarqube" "architecture_findings_get" json -- | Install the architecture skill for Claude Code and Cursor in this repository Uses native credentials; for CI supply SONARQUBE_CLI_TOKEN and SONARQUBE_CLI_ORG or SONARQUBE_CLI_SERVER. -- | @param project Working directory containing the source checkout; defaults to the current directory. Default: ".". -- | @param runDir Fresh directory for this invocation’s execution report and task logs; must not already exist. -- | @param executable Native CLI executable name or absolute path; defaults to this operation’s tool. -- | @param timeoutMs Maximum task duration in milliseconds; defaults to 900000. Default: 900000. -- | @param artifacts Comma-separated NAME=PATH output artifacts; use CSV double quotes around entries containing commas. -- | @param global Install in the home directory instead of the repository -- | @param force Replace a SKILL.md that was not written by this command architecture_install_skill :: { project :: Maybe String, runDir :: String, executable :: Maybe String, timeoutMs :: Maybe Int, artifacts :: Maybe String, global :: Maybe Boolean, force :: Maybe Boolean } -> Effect Contract.ExecutionResult architecture_install_skill args = do json <- Native.csvInput (Contract.input (Contract.encodeInput args)) >>= Contract.cliInput Native.executeWithSetup Dependencies.ensureFor "sonarqube" "architecture_install_skill" json -- | Show overall system status: authentication, installed binaries, and integrations -- | @param project Working directory containing the source checkout; defaults to the current directory. Default: ".". -- | @param runDir Fresh directory for this invocation’s execution report and task logs; must not already exist. -- | @param executable Native CLI executable name or absolute path; defaults to this operation’s tool. -- | @param timeoutMs Maximum task duration in milliseconds; defaults to 900000. Default: 900000. -- | @param artifacts Comma-separated NAME=PATH output artifacts; use CSV double quotes around entries containing commas. -- | @param format Output format -- | @param json Output as JSON for machine consumption system_status :: { project :: Maybe String, runDir :: String, executable :: Maybe String, timeoutMs :: Maybe Int, artifacts :: Maybe String, format :: Maybe String, json :: Maybe Boolean } -> Effect Contract.ExecutionResult system_status args = do json <- Native.csvInput (Contract.input (Contract.encodeInput args)) >>= Contract.cliInput Native.executeWithSetup Dependencies.ensureFor "sonarqube" "system_status" json -- | Reset the CLI to factory defaults: remove tokens, binaries, integrations, cached files, and local stats data. Pass --all to also remove CLI configuration (sonar config). -- | @param project Working directory containing the source checkout; defaults to the current directory. Default: ".". -- | @param runDir Fresh directory for this invocation’s execution report and task logs; must not already exist. -- | @param executable Native CLI executable name or absolute path; defaults to this operation’s tool. -- | @param timeoutMs Maximum task duration in milliseconds; defaults to 900000. Default: 900000. -- | @param artifacts Comma-separated NAME=PATH output artifacts; use CSV double quotes around entries containing commas. -- | @param force Skip the interactive confirmation prompt (required for non-interactive use) -- | @param all Also remove CLI configuration (sonar config), including network and telemetry configuration system_reset :: { project :: Maybe String, runDir :: String, executable :: Maybe String, timeoutMs :: Maybe Int, artifacts :: Maybe String, force :: Maybe Boolean, all :: Maybe Boolean } -> Effect Contract.ExecutionResult system_reset args = do json <- Native.csvInput (Contract.input (Contract.encodeInput args)) >>= Contract.cliInput Native.executeWithSetup Dependencies.ensureFor "sonarqube" "system_reset" json -- | List entries in the sonar-secrets allowlist -- | @param project Working directory containing the source checkout; defaults to the current directory. Default: ".". -- | @param runDir Fresh directory for this invocation’s execution report and task logs; must not already exist. -- | @param executable Native CLI executable name or absolute path; defaults to this operation’s tool. -- | @param timeoutMs Maximum task duration in milliseconds; defaults to 900000. Default: 900000. -- | @param artifacts Comma-separated NAME=PATH output artifacts; use CSV double quotes around entries containing commas. allowlist_secrets_show :: { project :: Maybe String, runDir :: String, executable :: Maybe String, timeoutMs :: Maybe Int, artifacts :: Maybe String } -> Effect Contract.ExecutionResult allowlist_secrets_show args = do json <- Native.csvInput (Contract.input (Contract.encodeInput args)) >>= Contract.cliInput Native.executeWithSetup Dependencies.ensureFor "sonarqube" "allowlist_secrets_show" json -- | Add a secret value to the sonar-secrets allowlist (interactive; requires a real terminal, not usable by agents or scripts) -- | @param project Working directory containing the source checkout; defaults to the current directory. Default: ".". -- | @param runDir Fresh directory for this invocation’s execution report and task logs; must not already exist. -- | @param executable Native CLI executable name or absolute path; defaults to this operation’s tool. -- | @param timeoutMs Maximum task duration in milliseconds; defaults to 900000. Default: 900000. -- | @param artifacts Comma-separated NAME=PATH output artifacts; use CSV double quotes around entries containing commas. allowlist_secrets_add :: { project :: Maybe String, runDir :: String, executable :: Maybe String, timeoutMs :: Maybe Int, artifacts :: Maybe String } -> Effect Contract.ExecutionResult allowlist_secrets_add args = do json <- Native.csvInput (Contract.input (Contract.encodeInput args)) >>= Contract.cliInput Native.executeWithSetup Dependencies.ensureFor "sonarqube" "allowlist_secrets_add" json -- | Remove an entry from the sonar-secrets allowlist by key -- | @param project Working directory containing the source checkout; defaults to the current directory. Default: ".". -- | @param runDir Fresh directory for this invocation’s execution report and task logs; must not already exist. -- | @param executable Native CLI executable name or absolute path; defaults to this operation’s tool. -- | @param timeoutMs Maximum task duration in milliseconds; defaults to 900000. Default: 900000. -- | @param artifacts Comma-separated NAME=PATH output artifacts; use CSV double quotes around entries containing commas. -- | @param key Unique key of the allowlist entry to remove allowlist_secrets_remove :: { project :: Maybe String, runDir :: String, executable :: Maybe String, timeoutMs :: Maybe Int, artifacts :: Maybe String, key :: String } -> Effect Contract.ExecutionResult allowlist_secrets_remove args = do json <- Native.csvInput (Contract.input (Contract.encodeInput args)) >>= Contract.cliInput Native.executeWithSetup Dependencies.ensureFor "sonarqube" "allowlist_secrets_remove" json -- | Remove all entries from the sonar-secrets allowlist -- | @param project Working directory containing the source checkout; defaults to the current directory. Default: ".". -- | @param runDir Fresh directory for this invocation’s execution report and task logs; must not already exist. -- | @param executable Native CLI executable name or absolute path; defaults to this operation’s tool. -- | @param timeoutMs Maximum task duration in milliseconds; defaults to 900000. Default: 900000. -- | @param artifacts Comma-separated NAME=PATH output artifacts; use CSV double quotes around entries containing commas. -- | @param force Skip the interactive confirmation prompt (required for non-interactive use) allowlist_secrets_clear :: { project :: Maybe String, runDir :: String, executable :: Maybe String, timeoutMs :: Maybe Int, artifacts :: Maybe String, force :: Maybe Boolean } -> Effect Contract.ExecutionResult allowlist_secrets_clear args = do json <- Native.csvInput (Contract.input (Contract.encodeInput args)) >>= Contract.cliInput Native.executeWithSetup Dependencies.ensureFor "sonarqube" "allowlist_secrets_clear" json -- | Update SonarQube CLI to the latest version -- | @param project Working directory containing the source checkout; defaults to the current directory. Default: ".". -- | @param runDir Fresh directory for this invocation’s execution report and task logs; must not already exist. -- | @param executable Native CLI executable name or absolute path; defaults to this operation’s tool. -- | @param timeoutMs Maximum task duration in milliseconds; defaults to 900000. Default: 900000. -- | @param artifacts Comma-separated NAME=PATH output artifacts; use CSV double quotes around entries containing commas. -- | @param status Check for a newer version without installing -- | @param force Install the latest version even if already up to date update :: { project :: Maybe String, runDir :: String, executable :: Maybe String, timeoutMs :: Maybe Int, artifacts :: Maybe String, status :: Maybe Boolean, force :: Maybe Boolean } -> Effect Contract.ExecutionResult update args = do json <- Native.csvInput (Contract.input (Contract.encodeInput args)) >>= Contract.cliInput Native.executeWithSetup Dependencies.ensureFor "sonarqube" "update" json -- | Check for a newer version without installing -- | @param project Working directory containing the source checkout; defaults to the current directory. Default: ".". -- | @param runDir Fresh directory for this invocation’s execution report and task logs; must not already exist. -- | @param executable Native CLI executable name or absolute path; defaults to this operation’s tool. -- | @param timeoutMs Maximum task duration in milliseconds; defaults to 900000. Default: 900000. -- | @param artifacts Comma-separated NAME=PATH output artifacts; use CSV double quotes around entries containing commas. -- | @param format Output format update_status :: { project :: Maybe String, runDir :: String, executable :: Maybe String, timeoutMs :: Maybe Int, artifacts :: Maybe String, format :: Maybe String } -> Effect Contract.ExecutionResult update_status args = do json <- Native.csvInput (Contract.input (Contract.encodeInput args)) >>= Contract.cliInput Native.executeWithSetup Dependencies.ensureFor "sonarqube" "update_status" json