@decantr/registry 1.0.0 → 1.0.2

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.
@@ -0,0 +1,196 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://decantr.ai/schemas/execution-pack.common.v1.json",
4
+ "title": "Decantr Execution Pack Common Definitions",
5
+ "$defs": {
6
+ "nonEmptyString": {
7
+ "type": "string",
8
+ "minLength": 1
9
+ },
10
+ "stringArray": {
11
+ "type": "array",
12
+ "items": {
13
+ "type": "string"
14
+ }
15
+ },
16
+ "executionPackTarget": {
17
+ "type": "object",
18
+ "required": ["platform", "framework", "runtime", "adapter"],
19
+ "properties": {
20
+ "platform": {
21
+ "const": "web"
22
+ },
23
+ "framework": {
24
+ "type": ["string", "null"]
25
+ },
26
+ "runtime": {
27
+ "type": ["string", "null"]
28
+ },
29
+ "adapter": {
30
+ "$ref": "#/$defs/nonEmptyString"
31
+ }
32
+ },
33
+ "additionalProperties": false
34
+ },
35
+ "executionPackScope": {
36
+ "type": "object",
37
+ "required": ["appId", "pageIds", "patternIds"],
38
+ "properties": {
39
+ "appId": {
40
+ "$ref": "#/$defs/nonEmptyString"
41
+ },
42
+ "pageIds": {
43
+ "$ref": "#/$defs/stringArray"
44
+ },
45
+ "patternIds": {
46
+ "$ref": "#/$defs/stringArray"
47
+ }
48
+ },
49
+ "additionalProperties": false
50
+ },
51
+ "executionPackExample": {
52
+ "type": "object",
53
+ "required": ["id", "label", "language", "snippet"],
54
+ "properties": {
55
+ "id": {
56
+ "$ref": "#/$defs/nonEmptyString"
57
+ },
58
+ "label": {
59
+ "$ref": "#/$defs/nonEmptyString"
60
+ },
61
+ "language": {
62
+ "$ref": "#/$defs/nonEmptyString"
63
+ },
64
+ "snippet": {
65
+ "$ref": "#/$defs/nonEmptyString"
66
+ }
67
+ },
68
+ "additionalProperties": false
69
+ },
70
+ "executionPackAntiPattern": {
71
+ "type": "object",
72
+ "required": ["id", "summary", "guidance"],
73
+ "properties": {
74
+ "id": {
75
+ "$ref": "#/$defs/nonEmptyString"
76
+ },
77
+ "summary": {
78
+ "$ref": "#/$defs/nonEmptyString"
79
+ },
80
+ "guidance": {
81
+ "$ref": "#/$defs/nonEmptyString"
82
+ }
83
+ },
84
+ "additionalProperties": false
85
+ },
86
+ "executionPackSuccessCheck": {
87
+ "type": "object",
88
+ "required": ["id", "label", "severity"],
89
+ "properties": {
90
+ "id": {
91
+ "$ref": "#/$defs/nonEmptyString"
92
+ },
93
+ "label": {
94
+ "$ref": "#/$defs/nonEmptyString"
95
+ },
96
+ "severity": {
97
+ "type": "string",
98
+ "enum": ["error", "warn", "info"]
99
+ }
100
+ },
101
+ "additionalProperties": false
102
+ },
103
+ "executionPackTokenBudget": {
104
+ "type": "object",
105
+ "required": ["target", "max", "strategy"],
106
+ "properties": {
107
+ "target": {
108
+ "type": "integer",
109
+ "minimum": 0
110
+ },
111
+ "max": {
112
+ "type": "integer",
113
+ "minimum": 0
114
+ },
115
+ "strategy": {
116
+ "$ref": "#/$defs/stringArray"
117
+ }
118
+ },
119
+ "additionalProperties": false
120
+ },
121
+ "themeRef": {
122
+ "type": "object",
123
+ "required": ["id", "mode", "shape"],
124
+ "properties": {
125
+ "id": {
126
+ "$ref": "#/$defs/nonEmptyString"
127
+ },
128
+ "mode": {
129
+ "$ref": "#/$defs/nonEmptyString"
130
+ },
131
+ "shape": {
132
+ "type": ["string", "null"]
133
+ }
134
+ },
135
+ "additionalProperties": false
136
+ },
137
+ "routeSummary": {
138
+ "type": "object",
139
+ "required": ["pageId", "path", "patternIds"],
140
+ "properties": {
141
+ "pageId": {
142
+ "$ref": "#/$defs/nonEmptyString"
143
+ },
144
+ "path": {
145
+ "$ref": "#/$defs/nonEmptyString"
146
+ },
147
+ "shell": {
148
+ "$ref": "#/$defs/nonEmptyString"
149
+ },
150
+ "patternIds": {
151
+ "$ref": "#/$defs/stringArray"
152
+ }
153
+ },
154
+ "additionalProperties": false
155
+ },
156
+ "pagePattern": {
157
+ "type": "object",
158
+ "required": ["id", "alias", "preset", "layout"],
159
+ "properties": {
160
+ "id": {
161
+ "$ref": "#/$defs/nonEmptyString"
162
+ },
163
+ "alias": {
164
+ "$ref": "#/$defs/nonEmptyString"
165
+ },
166
+ "preset": {
167
+ "$ref": "#/$defs/nonEmptyString"
168
+ },
169
+ "layout": {
170
+ "$ref": "#/$defs/nonEmptyString"
171
+ },
172
+ "presetDescription": {
173
+ "type": "string",
174
+ "description": "Per-preset prose copied from pattern.presets[preset].description. Rendered by the page-pack markdown as preset-specific guidance."
175
+ }
176
+ },
177
+ "additionalProperties": false
178
+ },
179
+ "manifestEntry": {
180
+ "type": "object",
181
+ "required": ["id", "markdown", "json"],
182
+ "properties": {
183
+ "id": {
184
+ "$ref": "#/$defs/nonEmptyString"
185
+ },
186
+ "markdown": {
187
+ "$ref": "#/$defs/nonEmptyString"
188
+ },
189
+ "json": {
190
+ "$ref": "#/$defs/nonEmptyString"
191
+ }
192
+ },
193
+ "additionalProperties": false
194
+ }
195
+ }
196
+ }
@@ -0,0 +1,106 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://decantr.ai/schemas/page-pack.v1.json",
4
+ "title": "Decantr Page Execution Pack",
5
+ "type": "object",
6
+ "required": ["$schema", "packVersion", "packType", "objective", "target", "preset", "scope", "requiredSetup", "allowedVocabulary", "examples", "antiPatterns", "successChecks", "tokenBudget", "data", "renderedMarkdown"],
7
+ "properties": {
8
+ "$schema": {
9
+ "const": "https://decantr.ai/schemas/page-pack.v1.json"
10
+ },
11
+ "packVersion": {
12
+ "const": "1.0.0"
13
+ },
14
+ "packType": {
15
+ "const": "page"
16
+ },
17
+ "objective": {
18
+ "$ref": "https://decantr.ai/schemas/execution-pack.common.v1.json#/$defs/nonEmptyString"
19
+ },
20
+ "target": {
21
+ "$ref": "https://decantr.ai/schemas/execution-pack.common.v1.json#/$defs/executionPackTarget"
22
+ },
23
+ "preset": {
24
+ "type": ["string", "null"]
25
+ },
26
+ "scope": {
27
+ "$ref": "https://decantr.ai/schemas/execution-pack.common.v1.json#/$defs/executionPackScope"
28
+ },
29
+ "requiredSetup": {
30
+ "$ref": "https://decantr.ai/schemas/execution-pack.common.v1.json#/$defs/stringArray"
31
+ },
32
+ "allowedVocabulary": {
33
+ "$ref": "https://decantr.ai/schemas/execution-pack.common.v1.json#/$defs/stringArray"
34
+ },
35
+ "examples": {
36
+ "type": "array",
37
+ "items": {
38
+ "$ref": "https://decantr.ai/schemas/execution-pack.common.v1.json#/$defs/executionPackExample"
39
+ }
40
+ },
41
+ "antiPatterns": {
42
+ "type": "array",
43
+ "items": {
44
+ "$ref": "https://decantr.ai/schemas/execution-pack.common.v1.json#/$defs/executionPackAntiPattern"
45
+ }
46
+ },
47
+ "successChecks": {
48
+ "type": "array",
49
+ "items": {
50
+ "$ref": "https://decantr.ai/schemas/execution-pack.common.v1.json#/$defs/executionPackSuccessCheck"
51
+ }
52
+ },
53
+ "tokenBudget": {
54
+ "$ref": "https://decantr.ai/schemas/execution-pack.common.v1.json#/$defs/executionPackTokenBudget"
55
+ },
56
+ "data": {
57
+ "type": "object",
58
+ "required": ["pageId", "path", "shell", "sectionId", "sectionRole", "features", "surface", "theme", "wiringSignals", "patterns"],
59
+ "properties": {
60
+ "pageId": {
61
+ "$ref": "https://decantr.ai/schemas/execution-pack.common.v1.json#/$defs/nonEmptyString"
62
+ },
63
+ "path": {
64
+ "$ref": "https://decantr.ai/schemas/execution-pack.common.v1.json#/$defs/nonEmptyString"
65
+ },
66
+ "shell": {
67
+ "$ref": "https://decantr.ai/schemas/execution-pack.common.v1.json#/$defs/nonEmptyString"
68
+ },
69
+ "sectionId": {
70
+ "type": ["string", "null"]
71
+ },
72
+ "sectionRole": {
73
+ "type": ["string", "null"]
74
+ },
75
+ "features": {
76
+ "$ref": "https://decantr.ai/schemas/execution-pack.common.v1.json#/$defs/stringArray"
77
+ },
78
+ "surface": {
79
+ "type": "string"
80
+ },
81
+ "theme": {
82
+ "$ref": "https://decantr.ai/schemas/execution-pack.common.v1.json#/$defs/themeRef"
83
+ },
84
+ "wiringSignals": {
85
+ "$ref": "https://decantr.ai/schemas/execution-pack.common.v1.json#/$defs/stringArray"
86
+ },
87
+ "patterns": {
88
+ "type": "array",
89
+ "items": {
90
+ "$ref": "https://decantr.ai/schemas/execution-pack.common.v1.json#/$defs/pagePattern"
91
+ }
92
+ },
93
+ "directives": {
94
+ "type": "array",
95
+ "description": "Execution-level directives emitted into page-pack rendering.",
96
+ "items": { "type": "string", "minLength": 1 }
97
+ }
98
+ },
99
+ "additionalProperties": false
100
+ },
101
+ "renderedMarkdown": {
102
+ "$ref": "https://decantr.ai/schemas/execution-pack.common.v1.json#/$defs/nonEmptyString"
103
+ }
104
+ },
105
+ "additionalProperties": false
106
+ }
@@ -110,8 +110,57 @@
110
110
  },
111
111
  "responsive": {
112
112
  "type": "object",
113
+ "description": "Per-breakpoint adaptation. Keys are viewport breakpoint tokens (e.g., 'mobile', 'tablet', 'desktop', or '<768px', '>=900px'). Values may be either a legacy prose string OR a structured ResponsiveBreakpointRule object. Prefer structured rules so the LLM can adapt mechanically instead of paraphrasing.",
113
114
  "additionalProperties": {
114
- "type": "string"
115
+ "oneOf": [
116
+ {
117
+ "type": "string",
118
+ "description": "Legacy prose form — kept for backward compatibility."
119
+ },
120
+ {
121
+ "type": "object",
122
+ "additionalProperties": false,
123
+ "properties": {
124
+ "layout": {
125
+ "type": "string",
126
+ "enum": ["stack", "grid", "flex-row", "flex-column", "hide", "alternate-pattern"],
127
+ "description": "Top-level layout strategy at this breakpoint. 'hide' removes the pattern entirely; 'alternate-pattern' swaps to the pattern id in alternate_pattern_id."
128
+ },
129
+ "columns": {
130
+ "type": "integer",
131
+ "minimum": 1,
132
+ "maximum": 12,
133
+ "description": "Grid column count when layout=grid."
134
+ },
135
+ "gap": {
136
+ "type": "string",
137
+ "description": "Gap as a CSS length, density-token, or atom (e.g., '1rem', 'var(--d-content-gap)', '_gap4')."
138
+ },
139
+ "hide_components": {
140
+ "type": "array",
141
+ "items": { "type": "string" },
142
+ "description": "Component ids/aliases rendered by this pattern that should be hidden at this breakpoint."
143
+ },
144
+ "stack_order": {
145
+ "type": "array",
146
+ "items": { "type": "string" },
147
+ "description": "Explicit order when layout=stack. Useful when the default DOM order doesn't map to the intended mobile reading order."
148
+ },
149
+ "alternate_pattern_id": {
150
+ "type": "string",
151
+ "description": "Pattern id to substitute when layout=alternate-pattern. Use for desktop-only patterns that need a mobile-specific counterpart."
152
+ },
153
+ "horizontal_scroll": {
154
+ "type": "boolean",
155
+ "description": "If true: permit horizontal scroll at this breakpoint (e.g., data table on mobile). Default false."
156
+ },
157
+ "notes": {
158
+ "type": "string",
159
+ "description": "Prose that doesn't fit the structured fields. Short."
160
+ }
161
+ }
162
+ }
163
+ ]
115
164
  }
116
165
  },
117
166
  "accessibility": {
@@ -0,0 +1,114 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://decantr.ai/schemas/section-pack.v1.json",
4
+ "title": "Decantr Section Execution Pack",
5
+ "type": "object",
6
+ "required": ["$schema", "packVersion", "packType", "objective", "target", "preset", "scope", "requiredSetup", "allowedVocabulary", "examples", "antiPatterns", "successChecks", "tokenBudget", "data", "renderedMarkdown"],
7
+ "properties": {
8
+ "$schema": {
9
+ "const": "https://decantr.ai/schemas/section-pack.v1.json"
10
+ },
11
+ "packVersion": {
12
+ "const": "1.0.0"
13
+ },
14
+ "packType": {
15
+ "const": "section"
16
+ },
17
+ "objective": {
18
+ "$ref": "https://decantr.ai/schemas/execution-pack.common.v1.json#/$defs/nonEmptyString"
19
+ },
20
+ "target": {
21
+ "$ref": "https://decantr.ai/schemas/execution-pack.common.v1.json#/$defs/executionPackTarget"
22
+ },
23
+ "preset": {
24
+ "type": ["string", "null"]
25
+ },
26
+ "scope": {
27
+ "$ref": "https://decantr.ai/schemas/execution-pack.common.v1.json#/$defs/executionPackScope"
28
+ },
29
+ "requiredSetup": {
30
+ "$ref": "https://decantr.ai/schemas/execution-pack.common.v1.json#/$defs/stringArray"
31
+ },
32
+ "allowedVocabulary": {
33
+ "$ref": "https://decantr.ai/schemas/execution-pack.common.v1.json#/$defs/stringArray"
34
+ },
35
+ "examples": {
36
+ "type": "array",
37
+ "items": {
38
+ "$ref": "https://decantr.ai/schemas/execution-pack.common.v1.json#/$defs/executionPackExample"
39
+ }
40
+ },
41
+ "antiPatterns": {
42
+ "type": "array",
43
+ "items": {
44
+ "$ref": "https://decantr.ai/schemas/execution-pack.common.v1.json#/$defs/executionPackAntiPattern"
45
+ }
46
+ },
47
+ "successChecks": {
48
+ "type": "array",
49
+ "items": {
50
+ "$ref": "https://decantr.ai/schemas/execution-pack.common.v1.json#/$defs/executionPackSuccessCheck"
51
+ }
52
+ },
53
+ "tokenBudget": {
54
+ "$ref": "https://decantr.ai/schemas/execution-pack.common.v1.json#/$defs/executionPackTokenBudget"
55
+ },
56
+ "data": {
57
+ "type": "object",
58
+ "required": ["sectionId", "role", "shell", "description", "features", "theme", "routes"],
59
+ "properties": {
60
+ "sectionId": {
61
+ "$ref": "https://decantr.ai/schemas/execution-pack.common.v1.json#/$defs/nonEmptyString"
62
+ },
63
+ "role": {
64
+ "$ref": "https://decantr.ai/schemas/execution-pack.common.v1.json#/$defs/nonEmptyString"
65
+ },
66
+ "shell": {
67
+ "$ref": "https://decantr.ai/schemas/execution-pack.common.v1.json#/$defs/nonEmptyString"
68
+ },
69
+ "description": {
70
+ "type": "string"
71
+ },
72
+ "features": {
73
+ "$ref": "https://decantr.ai/schemas/execution-pack.common.v1.json#/$defs/stringArray"
74
+ },
75
+ "theme": {
76
+ "$ref": "https://decantr.ai/schemas/execution-pack.common.v1.json#/$defs/themeRef"
77
+ },
78
+ "routes": {
79
+ "type": "array",
80
+ "items": {
81
+ "$ref": "https://decantr.ai/schemas/execution-pack.common.v1.json#/$defs/routeSummary"
82
+ }
83
+ },
84
+ "navigationItems": {
85
+ "type": "array",
86
+ "description": "Items rendered in the shell's primary navigation for this section.",
87
+ "items": {
88
+ "type": "object",
89
+ "required": ["label", "route"],
90
+ "additionalProperties": false,
91
+ "properties": {
92
+ "label": { "type": "string", "minLength": 1 },
93
+ "route": { "type": "string", "minLength": 1 },
94
+ "icon": { "type": "string", "minLength": 1 },
95
+ "hotkey": { "type": "string", "minLength": 1 },
96
+ "active_match": { "type": "string", "minLength": 1 },
97
+ "badge": { "type": "string", "minLength": 1 }
98
+ }
99
+ }
100
+ },
101
+ "directives": {
102
+ "type": "array",
103
+ "description": "Execution-level directives emitted into section-pack rendering.",
104
+ "items": { "type": "string", "minLength": 1 }
105
+ }
106
+ },
107
+ "additionalProperties": false
108
+ },
109
+ "renderedMarkdown": {
110
+ "$ref": "https://decantr.ai/schemas/execution-pack.common.v1.json#/$defs/nonEmptyString"
111
+ }
112
+ },
113
+ "additionalProperties": false
114
+ }