mirror of
https://github.com/aleksey-hoffman/sigma-file-manager.git
synced 2026-10-19 01:31:05 -05:00
- Add sigma.view (layout/sort) behind view permission (@sigma-file-manager/api 1.11.0) - Derive HTTP host allowlists from installed manifests server-side; cap request body size - Reset modal scroll/focus only on setContent, not updateElement
771 lines
19 KiB
JSON
771 lines
19 KiB
JSON
{
|
|
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
"$id": "https://raw.githubusercontent.com/aleksey-hoffman/sigma-file-manager/main/packages/api/manifest.schema.json",
|
|
"title": "Sigma File Manager Extension Manifest",
|
|
"description": "Schema for Sigma File Manager extension package.json files",
|
|
"type": "object",
|
|
"required": [
|
|
"id",
|
|
"name",
|
|
"version",
|
|
"repository",
|
|
"license",
|
|
"extensionType",
|
|
"permissions",
|
|
"engines"
|
|
],
|
|
"allOf": [
|
|
{
|
|
"if": {
|
|
"properties": {
|
|
"extensionType": {
|
|
"enum": [
|
|
"iframe",
|
|
"webview"
|
|
]
|
|
}
|
|
},
|
|
"required": [
|
|
"extensionType"
|
|
]
|
|
},
|
|
"then": {
|
|
"required": [
|
|
"main"
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"if": {
|
|
"properties": {
|
|
"extensionType": {
|
|
"enum": [
|
|
"api"
|
|
]
|
|
}
|
|
},
|
|
"required": [
|
|
"extensionType"
|
|
]
|
|
},
|
|
"then": {
|
|
"anyOf": [
|
|
{
|
|
"required": [
|
|
"main"
|
|
]
|
|
},
|
|
{
|
|
"required": [
|
|
"contributes"
|
|
],
|
|
"properties": {
|
|
"contributes": {
|
|
"anyOf": [
|
|
{
|
|
"required": [
|
|
"themes"
|
|
]
|
|
},
|
|
{
|
|
"required": [
|
|
"iconThemes"
|
|
]
|
|
}
|
|
],
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"themes": {
|
|
"type": "array",
|
|
"minItems": 1
|
|
},
|
|
"iconThemes": {
|
|
"type": "array",
|
|
"minItems": 1
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
],
|
|
"properties": {
|
|
"id": {
|
|
"type": "string",
|
|
"description": "Unique extension identifier in format 'publisher.extension-name'",
|
|
"pattern": "^[a-z0-9-]+\\.[a-z0-9-]+$"
|
|
},
|
|
"name": {
|
|
"type": "string",
|
|
"description": "Display name of the extension"
|
|
},
|
|
"previousName": {
|
|
"type": "string",
|
|
"description": "Previous name of the extension (shown in extension details and used for search)"
|
|
},
|
|
"version": {
|
|
"type": "string",
|
|
"description": "Semantic version of the extension",
|
|
"pattern": "^\\d+\\.\\d+\\.\\d+(-[a-zA-Z0-9.]+)?$"
|
|
},
|
|
"publisher": {
|
|
"type": "object",
|
|
"description": "Extension publisher information",
|
|
"required": [
|
|
"name"
|
|
],
|
|
"properties": {
|
|
"name": {
|
|
"type": "string",
|
|
"description": "Publisher name"
|
|
},
|
|
"url": {
|
|
"type": "string",
|
|
"format": "uri",
|
|
"description": "Publisher website URL"
|
|
}
|
|
}
|
|
},
|
|
"repository": {
|
|
"type": "string",
|
|
"format": "uri",
|
|
"description": "GitHub repository URL"
|
|
},
|
|
"license": {
|
|
"type": "string",
|
|
"description": "SPDX license identifier"
|
|
},
|
|
"icon": {
|
|
"type": "string",
|
|
"description": "Relative path to extension icon"
|
|
},
|
|
"banner": {
|
|
"type": "string",
|
|
"description": "Relative path to banner image"
|
|
},
|
|
"media": {
|
|
"type": "array",
|
|
"description": "Preview images or videos for the extension detail overview (paths relative to the extension root, or absolute http(s) URLs)",
|
|
"items": {
|
|
"type": "object",
|
|
"required": [
|
|
"title",
|
|
"src",
|
|
"type"
|
|
],
|
|
"properties": {
|
|
"title": {
|
|
"type": "string",
|
|
"description": "Label shown under the preview"
|
|
},
|
|
"src": {
|
|
"type": "string",
|
|
"description": "Relative path to a file in the extension package, or an absolute http(s) URL"
|
|
},
|
|
"type": {
|
|
"type": "string",
|
|
"enum": [
|
|
"image",
|
|
"video"
|
|
],
|
|
"description": "How the preview is rendered"
|
|
}
|
|
},
|
|
"additionalProperties": false
|
|
}
|
|
},
|
|
"categories": {
|
|
"type": "array",
|
|
"description": "Categories for extension classification",
|
|
"items": {
|
|
"type": "string",
|
|
"enum": [
|
|
"File Management",
|
|
"Media",
|
|
"Security",
|
|
"Backup & Sync",
|
|
"Productivity",
|
|
"Search & Filter",
|
|
"Appearance",
|
|
"Integration",
|
|
"Developer Tools",
|
|
"Example",
|
|
"Other"
|
|
]
|
|
},
|
|
"minItems": 1
|
|
},
|
|
"tags": {
|
|
"type": "array",
|
|
"description": "Keywords for discovery",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"extensionType": {
|
|
"type": "string",
|
|
"description": "Extension execution type",
|
|
"enum": [
|
|
"api",
|
|
"iframe",
|
|
"webview"
|
|
],
|
|
"enumDescriptions": [
|
|
"API-only extension that runs JavaScript with access to the extension API",
|
|
"Sandboxed iframe extension with postMessage communication",
|
|
"Separate Tauri webview window for full page content"
|
|
]
|
|
},
|
|
"main": {
|
|
"type": "string",
|
|
"description": "Entry point file. Required for iframe/webview extensions and API extensions that run code."
|
|
},
|
|
"permissions": {
|
|
"type": "array",
|
|
"description": "Permissions required by the extension",
|
|
"items": {
|
|
"oneOf": [
|
|
{
|
|
"type": "string",
|
|
"enum": [
|
|
"contextMenu",
|
|
"sidebar",
|
|
"toolbar",
|
|
"commands",
|
|
"fs.read",
|
|
"fs.write",
|
|
"notifications",
|
|
"dialogs",
|
|
"shell",
|
|
"clipboard",
|
|
"openUrl",
|
|
"view"
|
|
]
|
|
},
|
|
{
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"required": [
|
|
"name",
|
|
"hosts"
|
|
],
|
|
"properties": {
|
|
"name": {
|
|
"type": "string",
|
|
"const": "http"
|
|
},
|
|
"hosts": {
|
|
"type": "array",
|
|
"minItems": 1,
|
|
"items": {
|
|
"type": "string",
|
|
"minLength": 1,
|
|
"pattern": "^https?://[A-Za-z0-9.-]+(?::(\\*|\\d+))?$"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"activationEvents": {
|
|
"type": "array",
|
|
"description": "Events that activate the extension",
|
|
"items": {
|
|
"type": "string",
|
|
"anyOf": [
|
|
{
|
|
"enum": [
|
|
"onStartup",
|
|
"onInstall",
|
|
"onUninstall",
|
|
"onEnable",
|
|
"onDisable",
|
|
"onUpdate",
|
|
"onLocaleChange"
|
|
]
|
|
},
|
|
{
|
|
"pattern": "^onCommand:.+$"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"contributes": {
|
|
"type": "object",
|
|
"description": "Static contributions declared by the extension",
|
|
"properties": {
|
|
"commands": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"required": [
|
|
"id",
|
|
"title"
|
|
],
|
|
"properties": {
|
|
"id": {
|
|
"type": "string"
|
|
},
|
|
"title": {
|
|
"type": "string"
|
|
},
|
|
"description": {
|
|
"type": "string"
|
|
},
|
|
"icon": {
|
|
"type": "string"
|
|
},
|
|
"shortcut": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"contextMenu": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"required": [
|
|
"id",
|
|
"title"
|
|
],
|
|
"properties": {
|
|
"id": {
|
|
"type": "string"
|
|
},
|
|
"title": {
|
|
"type": "string"
|
|
},
|
|
"icon": {
|
|
"type": "string"
|
|
},
|
|
"group": {
|
|
"type": "string"
|
|
},
|
|
"order": {
|
|
"type": "number"
|
|
},
|
|
"when": {
|
|
"type": "object",
|
|
"properties": {
|
|
"selectionType": {
|
|
"type": "string",
|
|
"enum": [
|
|
"single",
|
|
"multiple",
|
|
"any"
|
|
]
|
|
},
|
|
"entryType": {
|
|
"type": "string",
|
|
"enum": [
|
|
"file",
|
|
"directory",
|
|
"any"
|
|
]
|
|
},
|
|
"fileExtensions": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"sidebar": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"required": [
|
|
"id",
|
|
"title",
|
|
"icon"
|
|
],
|
|
"properties": {
|
|
"id": {
|
|
"type": "string"
|
|
},
|
|
"title": {
|
|
"type": "string"
|
|
},
|
|
"icon": {
|
|
"type": "string"
|
|
},
|
|
"order": {
|
|
"type": "number"
|
|
},
|
|
"url": {
|
|
"type": "string"
|
|
},
|
|
"shortcutCommandId": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"toolbar": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"required": [
|
|
"id",
|
|
"title",
|
|
"items"
|
|
],
|
|
"properties": {
|
|
"id": {
|
|
"type": "string"
|
|
},
|
|
"title": {
|
|
"type": "string"
|
|
},
|
|
"icon": {
|
|
"type": "string"
|
|
},
|
|
"items": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"required": [
|
|
"id",
|
|
"title"
|
|
],
|
|
"properties": {
|
|
"id": {
|
|
"type": "string"
|
|
},
|
|
"title": {
|
|
"type": "string"
|
|
},
|
|
"icon": {
|
|
"type": "string"
|
|
},
|
|
"commandId": {
|
|
"type": "string"
|
|
},
|
|
"separator": {
|
|
"type": "boolean"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"themes": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"required": [
|
|
"id",
|
|
"title",
|
|
"baseTheme",
|
|
"variables"
|
|
],
|
|
"properties": {
|
|
"id": {
|
|
"type": "string",
|
|
"pattern": "^[a-z0-9-]+$"
|
|
},
|
|
"title": {
|
|
"type": "string"
|
|
},
|
|
"description": {
|
|
"type": "string"
|
|
},
|
|
"baseTheme": {
|
|
"type": "string",
|
|
"enum": [
|
|
"light",
|
|
"dark"
|
|
]
|
|
},
|
|
"variables": {
|
|
"type": "object",
|
|
"minProperties": 1,
|
|
"propertyNames": {
|
|
"type": "string",
|
|
"pattern": "^--[a-zA-Z0-9-]+$"
|
|
},
|
|
"additionalProperties": {
|
|
"type": "string",
|
|
"minLength": 1
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"configuration": {
|
|
"type": "object",
|
|
"properties": {
|
|
"title": {
|
|
"type": "string"
|
|
},
|
|
"properties": {
|
|
"type": "object",
|
|
"additionalProperties": {
|
|
"type": "object",
|
|
"required": [
|
|
"type"
|
|
],
|
|
"properties": {
|
|
"type": {
|
|
"type": "string",
|
|
"enum": [
|
|
"string",
|
|
"number",
|
|
"boolean",
|
|
"array"
|
|
]
|
|
},
|
|
"default": {},
|
|
"description": {
|
|
"type": "string"
|
|
},
|
|
"enum": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": [
|
|
"string",
|
|
"number"
|
|
]
|
|
}
|
|
},
|
|
"enumDescriptions": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"minimum": {
|
|
"type": "number"
|
|
},
|
|
"maximum": {
|
|
"type": "number"
|
|
},
|
|
"minLength": {
|
|
"type": "number"
|
|
},
|
|
"maxLength": {
|
|
"type": "number"
|
|
},
|
|
"items": {
|
|
"type": "object",
|
|
"required": [
|
|
"type"
|
|
],
|
|
"properties": {
|
|
"type": {
|
|
"type": "string",
|
|
"enum": [
|
|
"string",
|
|
"number"
|
|
]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"keybindings": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"required": [
|
|
"command",
|
|
"key"
|
|
],
|
|
"properties": {
|
|
"command": {
|
|
"type": "string"
|
|
},
|
|
"key": {
|
|
"type": "string"
|
|
},
|
|
"when": {
|
|
"type": "string",
|
|
"enum": [
|
|
"always",
|
|
"fileSelected",
|
|
"directorySelected",
|
|
"singleSelected",
|
|
"multipleSelected",
|
|
"navigatorFocused"
|
|
]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"iconThemes": {
|
|
"type": "array",
|
|
"description": "Navigator icon themes contributed by the extension",
|
|
"minItems": 1,
|
|
"items": {
|
|
"type": "object",
|
|
"required": [
|
|
"id",
|
|
"label",
|
|
"path"
|
|
],
|
|
"properties": {
|
|
"id": {
|
|
"type": "string",
|
|
"minLength": 1,
|
|
"pattern": "\\S"
|
|
},
|
|
"label": {
|
|
"type": "string",
|
|
"minLength": 1,
|
|
"pattern": "\\S"
|
|
},
|
|
"path": {
|
|
"type": "string",
|
|
"description": "Relative path to the icon theme JSON file",
|
|
"minLength": 1,
|
|
"pattern": "^(?!\\s*$)(?!\\s*(?:[A-Za-z]:|[\\\\/]))(?!\\s*\\.\\.(?:[\\\\/]|\\s*$))(?!.*[\\\\/]\\.\\.(?:[\\\\/]|\\s*$))(?=.*[^.\\\\/\\s]).*$"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"platforms": {
|
|
"type": "array",
|
|
"description": "Supported operating systems",
|
|
"items": {
|
|
"type": "string",
|
|
"enum": [
|
|
"windows",
|
|
"macos",
|
|
"linux"
|
|
]
|
|
},
|
|
"minItems": 1,
|
|
"uniqueItems": true
|
|
},
|
|
"binaries": {
|
|
"type": "array",
|
|
"description": "Binary definitions installed and managed by the host application",
|
|
"items": {
|
|
"type": "object",
|
|
"required": [
|
|
"id",
|
|
"name",
|
|
"version",
|
|
"assets"
|
|
],
|
|
"properties": {
|
|
"id": {
|
|
"type": "string",
|
|
"description": "Unique binary identifier shared across extensions"
|
|
},
|
|
"name": {
|
|
"type": "string",
|
|
"description": "Display name of the binary"
|
|
},
|
|
"version": {
|
|
"type": "string",
|
|
"description": "Pinned binary version used for shared lookup and install",
|
|
"minLength": 1
|
|
},
|
|
"executable": {
|
|
"type": "string",
|
|
"description": "Relative path to the executable inside the extracted directory"
|
|
},
|
|
"repository": {
|
|
"type": "string",
|
|
"format": "uri",
|
|
"description": "Upstream repository URL for reference"
|
|
},
|
|
"platforms": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string",
|
|
"enum": [
|
|
"windows",
|
|
"macos",
|
|
"linux"
|
|
]
|
|
},
|
|
"minItems": 1,
|
|
"uniqueItems": true
|
|
},
|
|
"assets": {
|
|
"type": "array",
|
|
"minItems": 1,
|
|
"items": {
|
|
"type": "object",
|
|
"required": [
|
|
"platform",
|
|
"downloadUrl",
|
|
"integrity"
|
|
],
|
|
"properties": {
|
|
"platform": {
|
|
"type": "string",
|
|
"enum": [
|
|
"windows",
|
|
"macos",
|
|
"linux"
|
|
]
|
|
},
|
|
"arch": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string",
|
|
"enum": [
|
|
"x64",
|
|
"arm64"
|
|
]
|
|
},
|
|
"minItems": 1,
|
|
"uniqueItems": true
|
|
},
|
|
"downloadUrl": {
|
|
"type": "string",
|
|
"format": "uri"
|
|
},
|
|
"integrity": {
|
|
"type": "string",
|
|
"pattern": "^sha256:[a-fA-F0-9]{64}$"
|
|
},
|
|
"archive": {
|
|
"type": "boolean"
|
|
},
|
|
"executable": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"engines": {
|
|
"type": "object",
|
|
"description": "Version constraints",
|
|
"required": [
|
|
"sigmaFileManager"
|
|
],
|
|
"properties": {
|
|
"sigmaFileManager": {
|
|
"type": "string",
|
|
"description": "Required Sigma File Manager version range"
|
|
},
|
|
"extensionApi": {
|
|
"type": "string",
|
|
"description": "Required @sigma-file-manager/api version range"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|