diff --git a/README.md b/README.md index ff566a9..0119179 100644 --- a/README.md +++ b/README.md @@ -203,6 +203,7 @@ Example: full manifest { "$schema": "https://open-plugins.com/schemas/1.0.0/plugin.schema.json", "name": "plugin-name", + "icon": "./icon.png", "version": "1.2.0", "description": "Brief plugin description", "author": { @@ -235,6 +236,7 @@ If a required field is missing, has the wrong type, is empty, or otherwise viola | Field | Type | Description | | ------------- | -------- | --------------------------------------------------------------------- | +| `icon` | string | Plugin icon image: a plugin-relative path (§4.1) or an absolute `https:` URL. See §5.7. | | `version` | string | Version string (Semantic Versioning RECOMMENDED). Used for update checks and cache freshness. | | `description` | string | Short description of plugin purpose. | | `author` | object | Author object with optional `name`, `email`, and `url` string fields. | @@ -268,6 +270,17 @@ Invalid names: `My-Plugin` (uppercase), `-start` (leading hyphen), `has--double` The optional `extensions` field contains client-specific manifest data keyed by extension namespace. See §8 for processing rules. +### 5.7 Icon + +The optional `icon` field is a string identifying an image that represents the plugin in host user interfaces. If present, its value MUST be either: + +1. a plugin-relative path as defined in §4.1 (beginning with `./` and resolving within the plugin root), or +2. an absolute `https:` URL that contains no user information and no fragment. + +The image SHOULD be square and at least 512x512 pixels. Whether a host retrieves and renders the icon is host-defined, and a host MAY ignore `icon` entirely. Hosts MUST NOT retrieve a remote icon while loading a plugin (see §5.2). + +If `icon` is present but is neither a valid plugin-relative path nor a valid absolute `https:` URL, or if a plugin-relative path resolves outside the plugin root, the host MUST ignore the `icon` field and MUST continue loading the plugin. The `icon` field is advisory only; its value or validity MUST NOT affect component discovery or execution. + ## 6. Component discovery > **See also:** [§4 Plugin package model](#4-plugin-package-model) for directory layout conventions. diff --git a/schemas/1.0.0/plugin.schema.json b/schemas/1.0.0/plugin.schema.json index 99b095e..37dc75f 100644 --- a/schemas/1.0.0/plugin.schema.json +++ b/schemas/1.0.0/plugin.schema.json @@ -58,6 +58,10 @@ "additionalProperties": { "type": "object" } + }, + "icon": { + "type": "string", + "description": "Optional plugin icon image, either a plugin-relative path beginning with './' (resolved within the plugin root) or an absolute https: URL with no user information or fragment. The image SHOULD be square and at least 512x512 pixels. Advisory only; hosts MUST ignore an invalid value and MUST NOT retrieve a remote icon while loading a plugin." } }, "required": ["$schema", "name"],