{ "$schema": "http://json-schema.org/schema", "$id": "ScriptRunnerSchema", "title": "Product", "description": "ScriptRunnerSchema", "type": "object", "properties": { "actions": { "description": "A list of available actions", "type": "array", "items": { "type": "object", "additionalProperties": false, "required": ["name", "command"], "properties": { "name": { "type": "string", "description": "Human-readable action name shown in the launcher and used to match execution history/installs." }, "categories":{ "type":"array", "description":"Optional grouping tags shown in the launcher; the reader also injects the source name so each value should be a user-facing category label.", "items": { "type":"string", "description":"Single category label." } }, "description": { "type": "string", "description":"Optional subtitle rendered together with the action name inside the UI." }, "command": { "type": "string", "description": "Command line template that runs when the action is executed. Relative paths (starting with .) are resolved against the config file and {paramName} placeholders are replaced with collected parameter values before launching." }, "useSystemShell": { "type": "boolean", "description": "When true the job is started through the OS shell (UseShellExecute) so the system handles windowing/URL opening instead of ScriptRunner capturing the output." }, "runCommandAsAdmin":{ "type":"boolean", "description":"Indicates that the action must be run from an elevated ScriptRunner process; execution is blocked with a warning if the app lacks administrator rights." }, "workingDirectory": { "type": "string", "description":"Optional working directory for the main command. Relative values are expanded against the config file folder; defaults to that folder when omitted." }, "installCommand":{ "type": "string", "description":"Optional setup command surfaced through the Install button. It uses the same placeholder replacement rules as the main command." }, "runInstallCommandAsAdmin":{ "type":"boolean", "description":"Requires elevated rights before the install command can be executed." }, "installCommandWorkingDirectory":{ "type": "string", "description":"Working directory for the install command. Defaults to the config file folder and honours relative paths." }, "autoParameterBuilderPattern":{ "type": "string", "description":"Custom template (using {name} and {value}) that controls how parameters are auto-appended to the command when no predefined builder style is selected." }, "autoParameterBuilderStyle":{ "type":"string", "description":"Shortcut for built-in auto parameter builders (currently only PowerShell-style -Name 'Value' emission).", "enum": [ "powershell" ] }, "predefinedArgumentSets":{ "type": "array", "description":"Collection of named parameter presets surfaced in the UI drop-down (a \"\" set is always injected at runtime).", "items": { "type": "object", "properties": { "description": { "type": "string", "description":"Display name of the preset shown to the user." }, "fallbackToDefault":{ "type":"boolean", "description":"When true any missing parameter values inherit from the auto-generated default set." }, "arguments":{ "type":"object", "description":"Map of parameter name to the value that should be pre-filled when this preset is selected.", "additionalProperties":{ "type":"string" } } } } }, "predefinedArgumentSetsOrdering":{ "type":"string", "description":"Optional alphabetical ordering for the presets displayed in the combo box.", "enum":[ "Ascending", "Descending" ] }, "environmentVariables":{ "type":"object", "description":"Environment variables that are passed to the spawned process. Values can also include {paramName} placeholders which are replaced before execution.", "additionalProperties": { "type":"string" } }, "docs":{ "type":"string", "description": "path to markdown file with documentation" }, "params": { "type": "array", "description":"Ordered list of parameter prompts that ScriptRunner renders before launching the command.", "items": { "type": "object", "additionalProperties": true, "properties": { "name": { "type": "string", "description":"Identifier used in {paramName} placeholders, preset dictionaries and environment-variable substitutions." }, "description": { "type": "string", "description":"Helper text shown next to the control; falls back to the parameter name when not provided." }, "default": { "type": "string", "description":"Initial value for the control and the default argument set." }, "autoParameterBuilderPattern":{ "type": "string", "description":"Overrides the action-level autoParameterBuilderPattern for this parameter only." }, "valueGeneratorCommand":{ "type": "string", "description":"Optional helper command that ScriptRunner executes on demand to populate the field (relative paths are resolved from the config directory)." }, "valueGeneratorLabel":{ "type": "string", "description":"Custom tooltip/label for the auto-fill button shown when valueGeneratorCommand is set." }, "skipFromAutoParameterBuilder":{ "type": "boolean", "description":"Prevents this parameter from being appended automatically to the command when auto parameter builders run." }, "prompt": { "type":"string", "description":"Selects the UI control type that will be rendered for the parameter and determines which promptSettings apply.", "enum": [ "text", "multilineText", "password", "checkbox", "dropdown", "multiSelect", "filePicker", "directoryPicker", "datePicker", "numeric", "timePicker", "fileContent" ] } }, "required": ["name", "prompt"], "anyOf": [ { "properties": { "prompt": { "const": "datePicker" }, "promptSettings": { "type": "object", "additionalProperties": false, "description":"Tuning for the date picker control.", "properties": { "format": { "type": "string", "description":"Custom date format string applied when reading/writing the value." }, "yearVisible": { "type": "string", "description":"\"true\"/\"false\" toggle that hides or shows the year selector." }, "monthVisible": { "type": "string", "description":"\"true\"/\"false\" toggle that hides or shows the month selector." }, "dayVisible": { "type": "string", "description":"\"true\"/\"false\" toggle that hides or shows the day selector." }, "todayAsDefault": { "type": "string", "description":"\"true\" sets the default date to today when no stored value exists." }, "culture": { "type": "string", "description":"Culture name passed to DateTime parsing/formatting (e.g. en-US)." } } } }, "required": ["prompt"] }, { "properties": { "prompt": { "const": "timePicker" }, "promptSettings": { "type": "object", "additionalProperties": false, "description":"Tuning for the time picker control.", "properties": { "format": { "type": "string", "description":"Custom time format string applied when serializing the value." } } } }, "required": ["prompt"] }, { "properties": { "prompt": { "const": "dropdown" }, "promptSettings": { "type": "object", "description":"Configuration for dropdown prompts.", "properties": { "options": { "description":"Static options as a comma-delimited string, array of values, or array of {label,value} objects.", "oneOf": [ { "type": "string" }, { "type": "array", "items": { "type": "string" } }, { "type": "array", "items": { "type": "object", "required": ["label", "value"], "properties": { "label": { "type": "string" }, "value": { "type": "string" } } } } ] }, "searchable": { "type": "boolean", "description":"Switches the control to the SearchableComboBox implementation." }, "optionsGeneratorCommand": { "type": "string", "description":"Command executed on demand to refresh the available options." }, "delimiter": { "type": "string", "description":"Separator used when parsing string-based option lists." } } } }, "required": ["prompt"] }, { "properties": { "prompt": { "const": "multiSelect" }, "promptSettings": { "type": "object", "description":"Configuration for checkbox-style multi-select prompts.", "properties": { "options": { "description":"Static options as a comma-delimited string, array of values, or array of {label,value} objects.", "oneOf": [ { "type": "string" }, { "type": "array", "items": { "type": "string" } }, { "type": "array", "items": { "type": "object", "required": ["label", "value"], "properties": { "label": { "type": "string" }, "value": { "type": "string" } } } } ] }, "delimiter": { "type": "string", "description":"Separator applied when storing multiple selected values." } } } }, "required": ["prompt"] }, { "properties": { "prompt": { "const": "checkbox" }, "promptSettings": { "type": "object", "description":"Optional overrides for checkbox prompts.", "properties": { "checkedValue": { "type": "string", "description":"String that will be written when the box is checked (defaults to $true/true depending on autoParameterBuilderStyle)." }, "uncheckedValue": { "type": "string", "description":"String that will be written when the box is unchecked." } } } }, "required": ["prompt"] }, { "properties": { "prompt": { "const": "numeric" }, "promptSettings": { "type": "object", "description":"Bounds for numeric prompts.", "properties": { "min": { "type": "string", "description":"Minimum allowed value." }, "max": { "type": "string", "description":"Maximum allowed value." }, "step": { "type": "string", "description":"Increment applied when clicking the spinner." } } } }, "required": ["prompt"] }, { "properties": { "prompt": { "const": "fileContent" }, "promptSettings": { "type": "object", "description":"Editor-specific settings for inline file content prompts.", "properties": { "extension": { "type": "string", "description":"Extension (without leading dot) used for syntax highlighting and when exporting the buffer." }, "templateText" : { "type": "string", "description":"Default text placed into the editor when the referenced file does not exist yet." }, "useWslPathFormat" : { "type": "string", "description":"When true (and running on Windows) the file path is converted to WSL format before being passed to the script." } } } }, "required": ["prompt"] }, { "properties": { "prompt": { "const": "multilineText" }, "promptSettings": { "type": "object", "description":"Settings for the multi-line text editor.", "properties": { "syntax": { "type": "string", "description":"Language identifier used to pick the TextMate grammar (e.g. json, ps1, sh)." } } } }, "required": ["prompt"] }, { "properties": { "prompt": { "const": "filePicker" }, "promptSettings": { "type": "object", "description":"Settings for the file picker.", "properties": { "useWslPathFormat" : { "type": "string", "description":"When true (and running on Windows) the file path is converted to WSL format before being passed to the script." } } } }, "required": ["prompt"] }, { "properties": { "prompt": { "const": "filePicker" }, "promptSettings": { "type": "object", "description":"Settings for the file picker.", "properties": { "useWslPathFormat" : { "type": "string", "description":"When true (and running on Windows) the file path is converted to WSL format before being passed to the script." } } } }, "required": ["prompt"] }, { "properties": { "prompt": { "const": "directoryPicker" }, "promptSettings": { "type": "object", "description":"Settings for the directory picker.", "properties": { "useWslPathFormat" : { "type": "string", "description":"When true (and running on Windows) the file path is converted to WSL format before being passed to the script." } } } }, "required": ["prompt"] }, { "properties": { "prompt": { "enum": [ "text", "password" ] } }, "required": ["prompt"] } ] } }, "interactiveInputs":{ "type":"array", "description":"Regex-triggered quick actions that appear while a command is running and push canned input back to STDIN.", "items": { "type":"object", "properties": { "whenMatched":{ "type":"string", "description":"Regular expression evaluated against the live console output." }, "inputs":{ "type":"array", "description":"Buttons to display when the regex matches.", "items": { "type":"object", "properties": { "label":{ "type":"string", "description":"Button label rendered in the UI." }, "value":{ "type":"string", "description":"Raw text that will be sent to the process input stream when the button is clicked." } } } } } } }, "troubleshooting":{ "type":"array", "description":"Patterns that raise contextual alerts while the main command runs.", "items": { "type":"object", "properties": { "whenMatched":{ "type":"string", "description":"Regular expression matched against sanitized console output." }, "alertMessage":{ "type":"string", "description":"Message shown to the user; regex capture groups can be referenced via ${name}." }, "severity": { "type":"string", "description":"Visual style for the alert.", "enum": [ "error", "warning", "info", "success" ] } }, "required": ["whenMatched", "alertMessage"] } }, "installTroubleshooting":{ "type":"array", "description":"Same as troubleshooting but evaluated when running the installCommand.", "items": { "type":"object", "properties": { "whenMatched":{ "type":"string", "description":"Regular expression matched against the install command output." }, "alertMessage":{ "type":"string", "description":"Message shown to the user; regex capture groups can be referenced via ${name}." }, "severity": { "type":"string", "description":"Visual style for the alert.", "enum": [ "error", "warning", "info", "success" ] } }, "required": ["whenMatched", "alertMessage"] } } } } } } }