flare-plugin-sdk 0.1.0-beta.5 → 0.1.0-beta.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -6,10 +6,52 @@ Defaults below apply when a field is omitted; use omission for optional fields
6
6
  rather than sending null for non-nullable values. Start from the complete
7
7
  [template manifest](../assets/github-template/manifest.json).
8
8
 
9
+ ## JSON Schema and editor support
10
+
11
+ The self-contained [manifest.schema.json](../manifest.schema.json) uses JSON Schema
12
+ draft-07. Editors such as VS Code use it for field completion, descriptions, enum
13
+ choices, required properties, ranges and static login/capability combinations.
14
+ `npx flare-plugin-sdk@next init my-plugin` adds a `$schema` URL pinned to that SDK
15
+ version. The source templates use the npm `next` channel.
16
+
17
+ For an existing project, add this editor hint at the manifest root:
18
+
19
+ ```json
20
+ {
21
+ "$schema": "https://unpkg.com/flare-plugin-sdk@next/skill/flare-plugin/manifest.schema.json"
22
+ }
23
+ ```
24
+
25
+ Keep the other manifest fields. For reproducible editor behavior, replace `next`
26
+ with your chosen SDK version. For offline authoring, install the SDK as a development
27
+ dependency and use `./node_modules/flare-plugin-sdk/skill/flare-plugin/manifest.schema.json`
28
+ as the `$schema` value; all schema references are local to that file.
29
+
30
+ Flare accepts `$schema` as optional editor metadata and never fetches or executes
31
+ it. Older Flare builds that reject it can still use editor assistance: remove
32
+ `$schema` from the manifest and associate the schema in VS Code workspace settings
33
+ (`.vscode/settings.json`):
34
+
35
+ ```json
36
+ {
37
+ "json.schemas": [{
38
+ "fileMatch": ["/manifest.json"],
39
+ "url": "https://unpkg.com/flare-plugin-sdk@next/skill/flare-plugin/manifest.schema.json"
40
+ }]
41
+ }
42
+ ```
43
+
44
+ Schema validation does not fill defaults or replace Host validation. Flare also
45
+ checks unique IDs/interactions, canonical/approved origins, captured Deep Link
46
+ values, referenced timelines, localized catalog keys, relational compose limits,
47
+ actual JavaScript registration and runtime behavior. Some text limits use UTF-16
48
+ length in the Host rather than JSON Schema's Unicode code point count.
49
+
9
50
  ## Root object
10
51
 
11
52
  | Field | Required / default | Contract |
12
53
  | --- | --- | --- |
54
+ | `$schema` | Omitted | Editor schema URL/path only; never loaded by Flare |
13
55
  | `schemaVersion` | `1` | Manifest schema, currently exactly 1 |
14
56
  | `apiVersion` | Required | Runtime ABI, currently exactly 1 |
15
57
  | `id` | Required | Stable reverse-domain plugin ID; `[a-z][a-z0-9]*(?:\.[a-z][a-z0-9-]*)+` |