@jami-studio/registry-schema 0.1.0
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.
- package/LICENSE +182 -0
- package/package.json +41 -0
- package/src/index.d.ts +296 -0
- package/src/index.mjs +237 -0
- package/src/json-source.mjs +156 -0
- package/src/part-taxonomy.mjs +158 -0
- package/src/schemas/agent-manifest.schema.json +186 -0
- package/src/schemas/item-graph.schema.json +59 -0
- package/src/schemas/registry-item.schema.json +69 -0
- package/src/schemas/registry-ref.schema.json +34 -0
- package/src/schemas/shadcn-registry-item.schema.json +319 -0
- package/src/schemas/theme-ref.schema.json +25 -0
- package/src/schemas/workbench-state.schema.json +73 -0
- package/src/schemas/workspace-ref.schema.json +28 -0
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://jami.studio/schemas/registry/theme-ref.schema.json",
|
|
4
|
+
"title": "themeRef",
|
|
5
|
+
"description": "Studio UI side of the theme handshake. Identifies a theme registry item by registryRef and its factory/custom/default kind. Mirrors the Jami Harness theme-ref so both sides resolve the same registry identity.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"required": ["themeId", "registryRef", "kind"],
|
|
8
|
+
"additionalProperties": false,
|
|
9
|
+
"properties": {
|
|
10
|
+
"themeId": {
|
|
11
|
+
"type": "string",
|
|
12
|
+
"pattern": "^theme_[a-z0-9][a-z0-9_-]*$"
|
|
13
|
+
},
|
|
14
|
+
"tokenSchemaVersion": { "type": "string" },
|
|
15
|
+
"registryRef": { "$ref": "https://jami.studio/schemas/registry/registry-ref.schema.json" },
|
|
16
|
+
"kind": {
|
|
17
|
+
"type": "string",
|
|
18
|
+
"enum": ["factory", "custom", "default"]
|
|
19
|
+
},
|
|
20
|
+
"state": {
|
|
21
|
+
"type": "string",
|
|
22
|
+
"enum": ["current", "deprecated", "missing_token", "invalid_alias", "contrast_failure", "migration_needed", "unsupported_family"]
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://jami.studio/schemas/registry/workbench-state.schema.json",
|
|
4
|
+
"title": "workbenchState",
|
|
5
|
+
"description": "Persisted shape of the Studio UI workbench overlay. This is the durable record written to localStorage today and to a hosted persistence backend when one is configured: an explicit schemaVersion, an optional persistence revision, and the saved theme draft. It is intentionally the saved slice only (not the live, unsaved draft or transient UI flags), so the same record validates whether it came from the browser, the in-memory adapter, or the operator-deferred hosted adapter.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"required": ["schemaVersion", "saved"],
|
|
8
|
+
"additionalProperties": false,
|
|
9
|
+
"properties": {
|
|
10
|
+
"schemaVersion": {
|
|
11
|
+
"const": "2026-06-23.workbench-state"
|
|
12
|
+
},
|
|
13
|
+
"revision": {
|
|
14
|
+
"description": "Opaque persistence revision the saved record resolved to. Null for a never-persisted local record; a string once an adapter has assigned a revision for optimistic-concurrency conflict detection.",
|
|
15
|
+
"type": ["string", "null"]
|
|
16
|
+
},
|
|
17
|
+
"saved": {
|
|
18
|
+
"$ref": "#/$defs/draft"
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
"$defs": {
|
|
22
|
+
"draft": {
|
|
23
|
+
"type": "object",
|
|
24
|
+
"required": ["target", "themeName", "presetName", "controls"],
|
|
25
|
+
"additionalProperties": false,
|
|
26
|
+
"properties": {
|
|
27
|
+
"target": {
|
|
28
|
+
"type": "string",
|
|
29
|
+
"minLength": 1,
|
|
30
|
+
"maxLength": 200
|
|
31
|
+
},
|
|
32
|
+
"themeName": {
|
|
33
|
+
"type": "string",
|
|
34
|
+
"minLength": 1,
|
|
35
|
+
"maxLength": 200
|
|
36
|
+
},
|
|
37
|
+
"presetName": {
|
|
38
|
+
"type": "string",
|
|
39
|
+
"minLength": 1,
|
|
40
|
+
"maxLength": 200
|
|
41
|
+
},
|
|
42
|
+
"controls": {
|
|
43
|
+
"$ref": "#/$defs/controls"
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
"controls": {
|
|
48
|
+
"type": "object",
|
|
49
|
+
"description": "Token-driven workbench control values. The eight factory controls are always present; brand options and imports may add further string controls. Property names are constrained to safe identifiers and values to strings so a persisted record can never carry an event handler, callback, or executable control.",
|
|
50
|
+
"required": ["accent", "focusRing", "radius", "spacing", "density", "motion", "dockWidth", "fontSize"],
|
|
51
|
+
"additionalProperties": {
|
|
52
|
+
"type": "string",
|
|
53
|
+
"maxLength": 2000
|
|
54
|
+
},
|
|
55
|
+
"propertyNames": {
|
|
56
|
+
"allOf": [
|
|
57
|
+
{ "pattern": "^[a-zA-Z][a-zA-Z0-9_-]*$" },
|
|
58
|
+
{ "not": { "enum": ["__proto__", "prototype", "constructor"] } }
|
|
59
|
+
]
|
|
60
|
+
},
|
|
61
|
+
"properties": {
|
|
62
|
+
"accent": { "type": "string" },
|
|
63
|
+
"focusRing": { "type": "string" },
|
|
64
|
+
"radius": { "type": "string" },
|
|
65
|
+
"spacing": { "type": "string" },
|
|
66
|
+
"density": { "type": "string" },
|
|
67
|
+
"motion": { "type": "string" },
|
|
68
|
+
"dockWidth": { "type": "string" },
|
|
69
|
+
"fontSize": { "type": "string" }
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://jami.studio/schemas/registry/workspace-ref.schema.json",
|
|
4
|
+
"title": "workspaceRef",
|
|
5
|
+
"description": "Studio UI side of the workspace handshake. Identifies an installed workspace descriptor by registryRef and lists the registry items it installs. Mirrors the Jami Harness workspace-ref so both sides resolve the same registry identity.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"required": ["workspaceId", "registryRef", "installedItems"],
|
|
8
|
+
"additionalProperties": false,
|
|
9
|
+
"properties": {
|
|
10
|
+
"workspaceId": {
|
|
11
|
+
"type": "string",
|
|
12
|
+
"pattern": "^workspace_[a-z0-9][a-z0-9_-]*$"
|
|
13
|
+
},
|
|
14
|
+
"audience": {
|
|
15
|
+
"type": "string",
|
|
16
|
+
"enum": ["workspace", "docs", "operations", "governance", "custom"]
|
|
17
|
+
},
|
|
18
|
+
"registryRef": { "$ref": "https://jami.studio/schemas/registry/registry-ref.schema.json" },
|
|
19
|
+
"installedItems": {
|
|
20
|
+
"type": "array",
|
|
21
|
+
"items": { "$ref": "https://jami.studio/schemas/registry/registry-ref.schema.json" }
|
|
22
|
+
},
|
|
23
|
+
"registryState": {
|
|
24
|
+
"type": "string",
|
|
25
|
+
"enum": ["current", "missing_dependency", "unsupported_workspace_version", "stale_registry_item"]
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
}
|