gauntlet/docs/schema/plugin_manifest.schema.json
Benno 4f715674c0
Plugin Manifest schema (#62)
Co-authored-by: Exidex <16986685+exidex@users.noreply.github.com>
2025-03-15 19:32:13 +01:00

788 lines
No EOL
17 KiB
JSON

{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "PluginManifest",
"description": "Manifest structure for a plugin.",
"type": "object",
"required": [
"entrypoint",
"gauntlet"
],
"properties": {
"$schema": {
"type": [
"string",
"null"
]
},
"entrypoint": {
"description": "Entrypoints for the plugin.",
"type": "array",
"items": {
"$ref": "#/definitions/PluginManifestEntrypoint"
}
},
"gauntlet": {
"description": "Metadata about the plugin.",
"allOf": [
{
"$ref": "#/definitions/PluginManifestMetadata"
}
]
},
"permissions": {
"description": "Permissions required by the plugin.",
"default": {
"environment": [],
"network": [],
"filesystem": {
"read": [],
"write": []
},
"exec": {
"command": [],
"executable": []
},
"system": [],
"clipboard": [],
"main_search_bar": []
},
"allOf": [
{
"$ref": "#/definitions/PluginManifestPermissions"
}
]
},
"preferences": {
"description": "Preferences that can be configured by the user in the settings view.",
"default": [],
"type": "array",
"items": {
"$ref": "#/definitions/PluginManifestPreference"
}
},
"supported_system": {
"description": "List of supported operating systems.",
"default": [],
"type": "array",
"items": {
"$ref": "#/definitions/PluginManifestSupportedSystem"
}
}
},
"definitions": {
"PluginManifestAction": {
"description": "Action that can be performed by the plugin.",
"type": "object",
"required": [
"description",
"id",
"shortcut"
],
"properties": {
"description": {
"description": "Description of what the action does.",
"type": "string"
},
"id": {
"description": "Unique identifier for the action.",
"type": "string"
},
"shortcut": {
"description": "Keyboard shortcut to trigger the action.",
"allOf": [
{
"$ref": "#/definitions/PluginManifestActionShortcut"
}
]
}
}
},
"PluginManifestActionShortcut": {
"description": "Keyboard shortcut configuration for a plugin action.",
"type": "object",
"required": [
"key",
"kind"
],
"properties": {
"key": {
"description": "The key to be pressed for this shortcut.",
"allOf": [
{
"$ref": "#/definitions/PluginManifestActionShortcutKey"
}
]
},
"kind": {
"description": "The type of shortcut.",
"allOf": [
{
"$ref": "#/definitions/PluginManifestActionShortcutKind"
}
]
}
}
},
"PluginManifestActionShortcutKey": {
"type": "string",
"enum": [
"0",
"1",
"2",
"3",
"4",
"5",
"6",
"7",
"8",
"9",
"!",
"@",
"#",
"$",
"%",
"^",
"&",
"*",
"(",
")",
"a",
"b",
"c",
"d",
"e",
"f",
"g",
"h",
"i",
"j",
"k",
"l",
"m",
"n",
"o",
"p",
"q",
"r",
"s",
"t",
"u",
"v",
"w",
"x",
"y",
"z",
"A",
"B",
"C",
"D",
"E",
"F",
"G",
"H",
"I",
"J",
"K",
"L",
"M",
"N",
"O",
"P",
"Q",
"R",
"S",
"T",
"U",
"V",
"W",
"X",
"Y",
"Z",
"-",
"=",
",",
".",
"/",
"[",
"]",
";",
"'",
"\\",
"_",
"+",
"<",
">",
"?",
"{",
"}",
":",
"\"",
"|"
]
},
"PluginManifestActionShortcutKind": {
"description": "The type of shortcut.",
"oneOf": [
{
"description": "Main shortcut for the action (e.g. cmd).",
"type": "string",
"enum": [
"main"
]
},
{
"description": "Alternative shortcut for the action (e.g. opt).",
"type": "string",
"enum": [
"alternative"
]
}
]
},
"PluginManifestClipboardPermissions": {
"description": "Clipboard permissions for the plugin.",
"oneOf": [
{
"description": "Allows the plugin to read from the clipboard.",
"type": "string",
"enum": [
"read"
]
},
{
"description": "Allows the plugin to write to the clipboard.",
"type": "string",
"enum": [
"write"
]
},
{
"description": "Allows the plugin to clear the clipboard contents.",
"type": "string",
"enum": [
"clear"
]
}
]
},
"PluginManifestEntrypoint": {
"description": "An entrypoint for the plugin.",
"type": "object",
"required": [
"description",
"id",
"name",
"path",
"type"
],
"properties": {
"actions": {
"default": [],
"type": "array",
"items": {
"$ref": "#/definitions/PluginManifestAction"
}
},
"description": {
"type": "string"
},
"icon": {
"type": [
"string",
"null"
]
},
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"path": {
"type": "string"
},
"preferences": {
"default": [],
"type": "array",
"items": {
"$ref": "#/definitions/PluginManifestPreference"
}
},
"type": {
"$ref": "#/definitions/PluginManifestEntrypointTypes"
}
}
},
"PluginManifestEntrypointTypes": {
"description": "Types of plugin entrypoints.",
"oneOf": [
{
"description": "A command entrypoint.",
"type": "string",
"enum": [
"command"
]
},
{
"description": "A view-based entrypoint.",
"type": "string",
"enum": [
"view"
]
},
{
"description": "An inline view entrypoint.",
"type": "string",
"enum": [
"inline-view"
]
},
{
"description": "Generates new entrypoints dynamically.",
"type": "string",
"enum": [
"entrypoint-generator"
]
}
]
},
"PluginManifestMainSearchBarPermissions": {
"oneOf": [
{
"description": "Allows the plugin to read the main search bar",
"type": "string",
"enum": [
"read"
]
}
]
},
"PluginManifestMetadata": {
"description": "Metadata for the plugin manifest.",
"type": "object",
"required": [
"description",
"name"
],
"properties": {
"description": {
"description": "Description of the plugin.",
"type": "string"
},
"name": {
"description": "Name of the plugin.",
"type": "string"
}
}
},
"PluginManifestPermissions": {
"description": "Permissions required by the plugin.",
"type": "object",
"properties": {
"clipboard": {
"description": "Clipboard permissions for the plugin.",
"default": [],
"type": "array",
"items": {
"$ref": "#/definitions/PluginManifestClipboardPermissions"
}
},
"environment": {
"description": "Environment variables that the plugin can access.",
"default": [],
"type": "array",
"items": {
"type": "string"
}
},
"exec": {
"description": "Execution permissions for the plugin.",
"default": {
"command": [],
"executable": []
},
"allOf": [
{
"$ref": "#/definitions/PluginManifestPermissionsExec"
}
]
},
"filesystem": {
"description": "Filesystem permissions for the plugin.",
"default": {
"read": [],
"write": []
},
"allOf": [
{
"$ref": "#/definitions/PluginManifestPermissionsFileSystem"
}
]
},
"main_search_bar": {
"description": "Permissions for the main search bar.",
"default": [],
"type": "array",
"items": {
"$ref": "#/definitions/PluginManifestMainSearchBarPermissions"
}
},
"network": {
"description": "Network domains that the plugin can access.",
"default": [],
"type": "array",
"items": {
"type": "string"
}
},
"system": {
"description": "System permissions for the plugin.",
"default": [],
"type": "array",
"items": {
"type": "string"
}
}
}
},
"PluginManifestPermissionsExec": {
"description": "Execution permissions for the plugin.",
"type": "object",
"properties": {
"command": {
"description": "Commands that the plugin can execute.",
"default": [],
"type": "array",
"items": {
"type": "string"
}
},
"executable": {
"description": "Executables that the plugin can run.",
"default": [],
"type": "array",
"items": {
"type": "string"
}
}
}
},
"PluginManifestPermissionsFileSystem": {
"description": "Filesystem permissions for the plugin.",
"type": "object",
"properties": {
"read": {
"description": "Paths that the plugin can read from.",
"default": [],
"type": "array",
"items": {
"type": "string"
}
},
"write": {
"description": "Paths that the plugin can write to.",
"default": [],
"type": "array",
"items": {
"type": "string"
}
}
}
},
"PluginManifestPreference": {
"description": "User-configurable preference options.",
"oneOf": [
{
"description": "A numeric preference.",
"type": "object",
"required": [
"description",
"id",
"name",
"type"
],
"properties": {
"default": {
"type": [
"number",
"null"
],
"format": "double"
},
"description": {
"type": "string"
},
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"type": {
"type": "string",
"enum": [
"number"
]
}
}
},
{
"description": "A string preference.",
"type": "object",
"required": [
"description",
"id",
"name",
"type"
],
"properties": {
"default": {
"type": [
"string",
"null"
]
},
"description": {
"type": "string"
},
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"type": {
"type": "string",
"enum": [
"string"
]
}
}
},
{
"description": "An enum preference with selectable values.",
"type": "object",
"required": [
"description",
"enum_values",
"id",
"name",
"type"
],
"properties": {
"default": {
"type": [
"string",
"null"
]
},
"description": {
"type": "string"
},
"enum_values": {
"type": "array",
"items": {
"$ref": "#/definitions/PluginManifestPreferenceEnumValue"
}
},
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"type": {
"type": "string",
"enum": [
"enum"
]
}
}
},
{
"description": "A boolean preference.",
"type": "object",
"required": [
"description",
"id",
"name",
"type"
],
"properties": {
"default": {
"type": [
"boolean",
"null"
]
},
"description": {
"type": "string"
},
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"type": {
"type": "string",
"enum": [
"bool"
]
}
}
},
{
"description": "A list of strings preference.",
"type": "object",
"required": [
"description",
"id",
"name",
"type"
],
"properties": {
"description": {
"type": "string"
},
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"type": {
"type": "string",
"enum": [
"list_of_strings"
]
}
}
},
{
"description": "A list of numbers preference.",
"type": "object",
"required": [
"description",
"id",
"name",
"type"
],
"properties": {
"description": {
"type": "string"
},
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"type": {
"type": "string",
"enum": [
"list_of_numbers"
]
}
}
},
{
"description": "A list of enumerated preference values.",
"type": "object",
"required": [
"description",
"enum_values",
"id",
"name",
"type"
],
"properties": {
"description": {
"type": "string"
},
"enum_values": {
"type": "array",
"items": {
"$ref": "#/definitions/PluginManifestPreferenceEnumValue"
}
},
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"type": {
"type": "string",
"enum": [
"list_of_enums"
]
}
}
}
]
},
"PluginManifestPreferenceEnumValue": {
"description": "An enumerated preference value.",
"type": "object",
"required": [
"label",
"value"
],
"properties": {
"label": {
"type": "string"
},
"value": {
"type": "string"
}
}
},
"PluginManifestSupportedSystem": {
"oneOf": [
{
"type": "object",
"required": [
"os"
],
"properties": {
"os": {
"type": "string",
"enum": [
"linux"
]
}
}
},
{
"type": "object",
"required": [
"os"
],
"properties": {
"os": {
"type": "string",
"enum": [
"windows"
]
}
}
},
{
"type": "object",
"required": [
"os"
],
"properties": {
"os": {
"type": "string",
"enum": [
"macos"
]
}
}
}
]
}
}
}