@lesliechan721/aw-plugin-core 0.1.0-beta.2 → 0.1.0-beta.20

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.
Files changed (43) hide show
  1. package/dist/aw-capabilities.d.ts +27 -0
  2. package/dist/aw-capabilities.js +107 -0
  3. package/dist/aw-capabilities.js.map +1 -0
  4. package/dist/catalog-workspace-resolution.d.ts +3 -0
  5. package/dist/catalog-workspace-resolution.js +34 -0
  6. package/dist/catalog-workspace-resolution.js.map +1 -0
  7. package/dist/generated/plugin-manifest-v3.d.ts +675 -0
  8. package/dist/generated/{plugin-manifest-v1.js → plugin-manifest-v3.js} +1 -1
  9. package/dist/generated/plugin-manifest-v3.js.map +1 -0
  10. package/dist/index.d.ts +2 -2
  11. package/dist/index.js +1 -1
  12. package/dist/index.js.map +1 -1
  13. package/dist/manifest-contract.d.ts +3 -6
  14. package/dist/manifest-contract.js +209 -406
  15. package/dist/manifest-contract.js.map +1 -1
  16. package/dist/manifest-type-contract.d.ts +2 -2
  17. package/dist/manifest.d.ts +10 -8
  18. package/dist/manifest.js +11 -7
  19. package/dist/manifest.js.map +1 -1
  20. package/dist/plugin-authoring-capabilities.d.ts +21 -0
  21. package/dist/plugin-authoring-capabilities.js +187 -0
  22. package/dist/plugin-authoring-capabilities.js.map +1 -0
  23. package/dist/plugin-config.d.ts +13 -0
  24. package/dist/plugin-config.js +645 -0
  25. package/dist/plugin-config.js.map +1 -0
  26. package/dist/plugin-requirements.d.ts +34 -0
  27. package/dist/plugin-requirements.js +249 -0
  28. package/dist/plugin-requirements.js.map +1 -0
  29. package/dist/plugin-script-contract.d.ts +10 -12
  30. package/dist/plugin-script-contract.js +34 -64
  31. package/dist/plugin-script-contract.js.map +1 -1
  32. package/dist/types.d.ts +142 -62
  33. package/dist/workspace.d.ts +54 -29
  34. package/dist/workspace.js +497 -269
  35. package/dist/workspace.js.map +1 -1
  36. package/package.json +8 -4
  37. package/schemas/plugin-manifest-v3.json +590 -0
  38. package/dist/generated/plugin-manifest-v1.d.ts +0 -368
  39. package/dist/generated/plugin-manifest-v1.js.map +0 -1
  40. package/dist/plugin-release.d.ts +0 -30
  41. package/dist/plugin-release.js +0 -187
  42. package/dist/plugin-release.js.map +0 -1
  43. package/schemas/plugin-manifest-v1.json +0 -329
@@ -0,0 +1,590 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://schemas.agent-workflows.dev/plugin-manifest-v3.json",
4
+ "title": "PluginManifestSourceV3",
5
+ "type": "object",
6
+ "additionalProperties": false,
7
+ "required": ["schemaVersion", "name", "version", "description", "marketplace"],
8
+ "properties": {
9
+ "schemaVersion": { "const": 3 },
10
+ "name": {
11
+ "type": "string",
12
+ "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
13
+ },
14
+ "version": { "$ref": "#/$defs/semver" },
15
+ "description": { "type": "string", "minLength": 1 },
16
+ "dependencies": {
17
+ "type": "array",
18
+ "maxItems": 64,
19
+ "uniqueItems": true,
20
+ "items": {
21
+ "type": "string",
22
+ "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
23
+ }
24
+ },
25
+ "requires": { "$ref": "#/$defs/requires" },
26
+ "skills": { "$ref": "#/$defs/pluginPath" },
27
+ "slashCommands": { "$ref": "#/$defs/pluginPath" },
28
+ "mcpServers": { "$ref": "#/$defs/pluginPath" },
29
+ "apps": { "$ref": "#/$defs/pluginPath" },
30
+ "distributions": { "$ref": "#/$defs/distributions" },
31
+ "marketplace": { "$ref": "#/$defs/marketplace" },
32
+ "interface": { "$ref": "#/$defs/interface" },
33
+ "extensions": { "$ref": "#/$defs/extensions" },
34
+ "artifacts": { "$ref": "#/$defs/artifacts" },
35
+ "buildConfig": { "$ref": "#/$defs/buildConfig" },
36
+ "scripts": { "$ref": "#/$defs/scripts" },
37
+ "config": { "$ref": "#/$defs/config" }
38
+ },
39
+ "$defs": {
40
+ "semver": {
41
+ "type": "string",
42
+ "pattern": "^(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)(?:-((?:0|[1-9][0-9]*|(?:[0-9A-Za-z-]*[A-Za-z-][0-9A-Za-z-]*))(?:\\.(?:0|[1-9][0-9]*|(?:[0-9A-Za-z-]*[A-Za-z-][0-9A-Za-z-]*)))*))?(?:\\+([0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*))?$"
43
+ },
44
+ "pluginPath": {
45
+ "type": "string",
46
+ "pattern": "^\\./"
47
+ },
48
+ "requires": {
49
+ "type": "object",
50
+ "additionalProperties": false,
51
+ "required": ["aw"],
52
+ "properties": {
53
+ "aw": {
54
+ "type": "object",
55
+ "additionalProperties": false,
56
+ "properties": {
57
+ "capabilities": {
58
+ "type": "array",
59
+ "uniqueItems": true,
60
+ "items": {
61
+ "type": "string",
62
+ "pattern": "^aw\\.[a-z0-9]+(?:-[a-z0-9]+)*(?:\\.[a-z0-9]+(?:-[a-z0-9]+)*)*\\.v[1-9][0-9]*$"
63
+ }
64
+ }
65
+ }
66
+ }
67
+ }
68
+ },
69
+ "runtimeExportRequires": {
70
+ "type": "object",
71
+ "additionalProperties": false,
72
+ "required": ["aw"],
73
+ "properties": {
74
+ "aw": {
75
+ "type": "object",
76
+ "additionalProperties": false,
77
+ "required": ["capabilities"],
78
+ "properties": {
79
+ "capabilities": {
80
+ "type": "array",
81
+ "uniqueItems": true,
82
+ "items": {
83
+ "type": "string",
84
+ "pattern": "^aw\\.[a-z0-9]+(?:-[a-z0-9]+)*(?:\\.[a-z0-9]+(?:-[a-z0-9]+)*)*\\.v[1-9][0-9]*$"
85
+ }
86
+ }
87
+ }
88
+ }
89
+ }
90
+ },
91
+ "distributions": {
92
+ "type": "object",
93
+ "additionalProperties": false,
94
+ "properties": {
95
+ "agentSkills": {
96
+ "type": "object",
97
+ "additionalProperties": false,
98
+ "properties": {
99
+ "skills": { "$ref": "#/$defs/pluginPath" }
100
+ }
101
+ }
102
+ }
103
+ },
104
+ "marketplace": {
105
+ "type": "object",
106
+ "additionalProperties": false,
107
+ "required": ["category", "strict", "policy"],
108
+ "properties": {
109
+ "category": { "type": "string", "minLength": 1 },
110
+ "tags": {
111
+ "type": "array",
112
+ "items": { "type": "string", "minLength": 1 }
113
+ },
114
+ "strict": { "type": "boolean" },
115
+ "policy": {
116
+ "type": "object",
117
+ "additionalProperties": false,
118
+ "required": ["installation", "authentication"],
119
+ "properties": {
120
+ "installation": { "enum": ["AVAILABLE", "NOT_AVAILABLE", "INSTALLED_BY_DEFAULT"] },
121
+ "authentication": { "enum": ["ON_INSTALL", "ON_USE"] },
122
+ "products": {
123
+ "type": "array",
124
+ "uniqueItems": true,
125
+ "items": { "type": "string", "minLength": 1 }
126
+ }
127
+ }
128
+ }
129
+ }
130
+ },
131
+ "stringArray": {
132
+ "type": "array",
133
+ "items": { "type": "string", "minLength": 1 }
134
+ },
135
+ "platformOverrides": {
136
+ "type": "object",
137
+ "additionalProperties": false,
138
+ "properties": { "claude": { "type": ["object", "null"] }, "codex": { "type": ["object", "null"] } }
139
+ },
140
+ "instruction": {
141
+ "type": "object",
142
+ "additionalProperties": false,
143
+ "required": ["name", "title", "content"],
144
+ "properties": {
145
+ "name": { "type": "string" }, "title": { "type": "string" }, "content": { "type": "string" },
146
+ "paths": { "$ref": "#/$defs/stringArray" }, "agentOverrides": { "$ref": "#/$defs/platformOverrides" }
147
+ }
148
+ },
149
+ "permission": {
150
+ "type": "object",
151
+ "additionalProperties": false,
152
+ "required": ["name"],
153
+ "properties": {
154
+ "name": { "type": "string" }, "allow": { "$ref": "#/$defs/stringArray" },
155
+ "ask": { "$ref": "#/$defs/stringArray" }, "deny": { "$ref": "#/$defs/stringArray" },
156
+ "agentOverrides": { "$ref": "#/$defs/platformOverrides" }
157
+ }
158
+ },
159
+ "hook": {
160
+ "type": "object", "additionalProperties": false, "required": ["event", "command"],
161
+ "properties": {
162
+ "event": { "type": "string" }, "matcher": { "type": "string" }, "command": { "type": "string" },
163
+ "agentOverrides": { "$ref": "#/$defs/platformOverrides" }
164
+ }
165
+ },
166
+ "nativeHook": {
167
+ "type": "object", "additionalProperties": false, "required": ["event", "command"],
168
+ "properties": { "event": { "type": "string" }, "matcher": { "type": "string" }, "command": { "type": "string" } }
169
+ },
170
+ "agent": {
171
+ "type": "object", "additionalProperties": false, "required": ["name", "description", "prompt"],
172
+ "properties": {
173
+ "name": { "type": "string" }, "description": { "type": "string" }, "prompt": { "type": "string" },
174
+ "tools": { "$ref": "#/$defs/stringArray" }, "agentOverrides": { "$ref": "#/$defs/platformOverrides" }
175
+ }
176
+ },
177
+ "extensions": {
178
+ "type": "object", "additionalProperties": false,
179
+ "properties": {
180
+ "instructions": { "type": "array", "items": { "$ref": "#/$defs/instruction" } },
181
+ "permissions": { "type": "array", "items": { "$ref": "#/$defs/permission" } },
182
+ "hooks": { "type": "array", "items": { "$ref": "#/$defs/hook" } },
183
+ "nativeHooks": {
184
+ "type": "object", "additionalProperties": false,
185
+ "properties": {
186
+ "claude": { "type": "array", "items": { "$ref": "#/$defs/nativeHook" } },
187
+ "codex": { "type": "array", "items": { "$ref": "#/$defs/nativeHook" } }
188
+ }
189
+ },
190
+ "agents": { "type": "array", "items": { "$ref": "#/$defs/agent" } }
191
+ }
192
+ },
193
+ "importReference": {
194
+ "type": "object", "additionalProperties": false, "required": ["plugin", "export"],
195
+ "properties": { "plugin": { "type": "string" }, "export": { "type": "string" } }
196
+ },
197
+ "codexSkillDelivery": {
198
+ "oneOf": [
199
+ {
200
+ "type": "object", "additionalProperties": false, "required": ["mode", "identity", "renderProfile"],
201
+ "properties": {
202
+ "mode": { "const": "codex-native" }, "identity": { "const": "shared" }, "renderProfile": { "const": "user" }
203
+ }
204
+ },
205
+ {
206
+ "type": "object", "additionalProperties": false, "required": ["mode"],
207
+ "properties": { "mode": { "const": "aw-extension" } }
208
+ }
209
+ ]
210
+ },
211
+ "artifactRuntimeImports": {
212
+ "type": "array", "items": {
213
+ "type": "object", "additionalProperties": false, "required": ["name", "plugin", "export"],
214
+ "properties": {
215
+ "name": { "type": "string" }, "plugin": { "type": "string" }, "export": { "type": "string" },
216
+ "resolved": {
217
+ "type": "object", "additionalProperties": false,
218
+ "required": ["path", "digest", "providerPluginId", "providerVersion", "source", "requiredCapabilities", "capabilitySetDigest"],
219
+ "properties": {
220
+ "path": { "type": "string" }, "digest": { "type": "string" }, "providerPluginId": { "type": "string" },
221
+ "providerVersion": { "$ref": "#/$defs/semver" }, "source": { "type": "string" },
222
+ "requiredCapabilities": { "$ref": "#/$defs/runtimeExportRequires/properties/aw/properties/capabilities" },
223
+ "capabilitySetDigest": { "type": "string", "pattern": "^sha256:[0-9a-f]{64}$" }
224
+ }
225
+ }
226
+ }
227
+ }
228
+ },
229
+ "artifactTarget": {
230
+ "oneOf": [
231
+ {
232
+ "type": "object", "additionalProperties": false,
233
+ "required": ["id", "scopes", "target", "states", "refreshKeys", "delivery"],
234
+ "properties": {
235
+ "id": { "type": "string" }, "platform": { "enum": ["codex", "claude"] },
236
+ "distribution": { "const": "agent-skills" }, "scopes": { "type": "array", "items": { "enum": ["user", "project"] } },
237
+ "target": { "const": "codex.skill" }, "kind": { "enum": ["instruction", "codexRole", "skill"] },
238
+ "projectManagedKind": { "enum": ["skill", "mcpServer", "instruction", "permission", "hook", "agent"] },
239
+ "states": { "type": "array", "items": { "enum": ["present", "disabled"] } },
240
+ "refreshKeys": { "$ref": "#/$defs/stringArray" }, "requiresCodexProjectConfig": { "type": "boolean" },
241
+ "delivery": { "$ref": "#/$defs/codexSkillDelivery" },
242
+ "roleKey": { "type": "string" }, "skillKey": { "type": "string" }, "sourceDirs": { "$ref": "#/$defs/stringArray" },
243
+ "runtimeImports": { "$ref": "#/$defs/artifactRuntimeImports" }
244
+ }
245
+ },
246
+ {
247
+ "type": "object", "additionalProperties": false,
248
+ "required": ["id", "scopes", "target", "states", "refreshKeys"],
249
+ "properties": {
250
+ "id": { "type": "string" }, "platform": { "enum": ["codex", "claude"] },
251
+ "distribution": { "const": "agent-skills" }, "scopes": { "type": "array", "items": { "enum": ["user", "project"] } },
252
+ "target": { "enum": ["codex.developerInstructionsBlock", "codex.agentRole", "claude.skill", "agent-skills.skill"] },
253
+ "kind": { "enum": ["instruction", "codexRole", "skill"] },
254
+ "projectManagedKind": { "enum": ["skill", "mcpServer", "instruction", "permission", "hook", "agent"] },
255
+ "states": { "type": "array", "items": { "enum": ["present", "disabled"] } },
256
+ "refreshKeys": { "$ref": "#/$defs/stringArray" }, "requiresCodexProjectConfig": { "type": "boolean" },
257
+ "roleKey": { "type": "string" }, "skillKey": { "type": "string" }, "sourceDirs": { "$ref": "#/$defs/stringArray" },
258
+ "runtimeImports": { "$ref": "#/$defs/artifactRuntimeImports" }
259
+ }
260
+ }
261
+ ]
262
+ },
263
+ "artifacts": {
264
+ "type": "object", "additionalProperties": false,
265
+ "properties": { "targets": { "type": "array", "items": { "$ref": "#/$defs/artifactTarget" } } }
266
+ },
267
+ "fileRules": {
268
+ "type": "object", "additionalProperties": false,
269
+ "required": ["include", "exclude"],
270
+ "properties": { "include": { "$ref": "#/$defs/stringArray" }, "exclude": { "$ref": "#/$defs/stringArray" } }
271
+ },
272
+ "buildConfig": {
273
+ "type": "object", "additionalProperties": false,
274
+ "properties": {
275
+ "cacheable": { "const": true },
276
+ "templates": {
277
+ "type": "object", "additionalProperties": false, "required": ["vars", "include"],
278
+ "properties": {
279
+ "vars": { "type": "object", "additionalProperties": { "$ref": "#/$defs/platformTemplateValue" } },
280
+ "include": { "$ref": "#/$defs/stringArray" }
281
+ }
282
+ },
283
+ "fileRules": {
284
+ "type": "object", "additionalProperties": false,
285
+ "properties": { "claude": { "$ref": "#/$defs/fileRules" }, "codex": { "$ref": "#/$defs/fileRules" } }
286
+ },
287
+ "manifestOverrides": {
288
+ "type": "object", "additionalProperties": false,
289
+ "properties": {
290
+ "claude": {
291
+ "type": "object", "additionalProperties": false,
292
+ "properties": { "commands": { "type": "string" }, "outputStyles": { "type": "string" }, "lspServers": {}, "userConfig": {}, "channels": {} }
293
+ },
294
+ "codex": { "type": "object", "maxProperties": 0 }
295
+ }
296
+ },
297
+ "runtimeExports": { "type": "array", "items": { "type": "object", "additionalProperties": false, "required": ["name", "source", "requires"], "properties": { "name": { "type": "string" }, "source": { "type": "string" }, "requires": { "$ref": "#/$defs/runtimeExportRequires" } } } },
298
+ "buildImports": { "type": "array", "items": { "type": "object", "additionalProperties": false, "required": ["plugin", "export", "env"], "properties": { "plugin": { "type": "string" }, "export": { "type": "string" }, "env": { "type": "string" } } } },
299
+ "skillRuntimeFiles": { "type": "array", "items": { "type": "object", "additionalProperties": false, "required": ["skill", "target"], "properties": { "skill": { "type": "string" }, "target": { "type": "string" }, "platforms": { "type": "array", "items": { "enum": ["codex", "claude"] } }, "distributions": { "type": "array", "items": { "const": "agent-skills" } }, "source": { "type": "string" }, "import": { "$ref": "#/$defs/importReference" } } } },
300
+ "generatedSkillRuntimeFiles": { "type": "array", "items": { "type": "object", "additionalProperties": false, "required": ["skill", "target"], "properties": { "skill": { "type": "string" }, "target": { "type": "string" }, "distributions": { "type": "array", "items": { "const": "agent-skills" } } } } }
301
+ }
302
+ },
303
+ "platformTemplateValue": {
304
+ "type": "object", "additionalProperties": false, "required": ["claude", "codex"],
305
+ "properties": {
306
+ "claude": { "anyOf": [{ "type": "string" }, { "type": "boolean" }] },
307
+ "codex": { "anyOf": [{ "type": "string" }, { "type": "boolean" }] }
308
+ }
309
+ },
310
+ "scriptEntry": {
311
+ "type": "object", "additionalProperties": false, "required": ["runner", "path"],
312
+ "properties": { "runner": { "const": "node" }, "path": { "type": "string" }, "args": { "$ref": "#/$defs/stringArray" } }
313
+ },
314
+ "preApply": {
315
+ "type": "object", "additionalProperties": false, "required": ["path"],
316
+ "properties": {
317
+ "path": { "$ref": "#/$defs/pluginPath" },
318
+ "timeoutMs": { "type": "integer", "minimum": 1000, "maximum": 1800000 }
319
+ }
320
+ },
321
+ "scripts": {
322
+ "type": "object", "additionalProperties": false,
323
+ "properties": {
324
+ "preApply": { "$ref": "#/$defs/preApply" },
325
+ "helpers": { "type": "object", "additionalProperties": false, "required": ["config"], "properties": { "config": { "type": "string" } } },
326
+ "node": { "type": "object", "additionalProperties": false, "properties": { "packageRoot": { "type": "string" }, "build": { "$ref": "#/$defs/scriptEntry" } } },
327
+ "artifacts": { "type": "object", "additionalProperties": false, "properties": { "render": { "$ref": "#/$defs/scriptEntry" } } },
328
+ "tests": { "type": "object", "additionalProperties": false, "properties": { "node": { "$ref": "#/$defs/stringArray" } } }
329
+ }
330
+ },
331
+ "configStringValidation": {
332
+ "type": "object", "additionalProperties": false,
333
+ "properties": {
334
+ "minLength": { "type": "integer", "minimum": 0 },
335
+ "maxLength": { "type": "integer", "minimum": 0, "maximum": 4096 },
336
+ "pattern": { "type": "string", "maxLength": 512 },
337
+ "format": { "enum": ["identifier", "slug", "semver", "url", "hostname", "email"] }
338
+ },
339
+ "if": { "properties": { "pattern": true }, "required": ["pattern"] },
340
+ "then": { "properties": { "maxLength": true }, "required": ["maxLength"] }
341
+ },
342
+ "configNumberValidation": {
343
+ "type": "object", "additionalProperties": false,
344
+ "properties": {
345
+ "integer": { "type": "boolean" },
346
+ "minimum": { "type": "number" },
347
+ "maximum": { "type": "number" },
348
+ "multipleOf": { "type": "number", "exclusiveMinimum": 0 }
349
+ }
350
+ },
351
+ "configObjectValidation": {
352
+ "type": "object", "additionalProperties": false,
353
+ "properties": {
354
+ "minProperties": { "type": "integer", "minimum": 0, "maximum": 32 },
355
+ "maxProperties": { "type": "integer", "minimum": 0, "maximum": 32 },
356
+ "key": { "$ref": "#/$defs/configStringValidation" }
357
+ }
358
+ },
359
+ "configStringPreset": {
360
+ "type": "object", "additionalProperties": false, "required": ["id", "title", "value"],
361
+ "properties": {
362
+ "id": { "type": "string", "minLength": 1 }, "title": { "type": "string", "minLength": 1 },
363
+ "description": { "type": "string", "minLength": 1 }, "value": { "type": "string" }, "recommended": { "const": true }
364
+ }
365
+ },
366
+ "configNumberPreset": {
367
+ "type": "object", "additionalProperties": false, "required": ["id", "title", "value"],
368
+ "properties": {
369
+ "id": { "type": "string", "minLength": 1 }, "title": { "type": "string", "minLength": 1 },
370
+ "description": { "type": "string", "minLength": 1 }, "value": { "type": "number" }, "recommended": { "const": true }
371
+ }
372
+ },
373
+ "configBooleanPreset": {
374
+ "type": "object", "additionalProperties": false, "required": ["id", "title", "value"],
375
+ "properties": {
376
+ "id": { "type": "string", "minLength": 1 }, "title": { "type": "string", "minLength": 1 },
377
+ "description": { "type": "string", "minLength": 1 }, "value": { "type": "boolean" }, "recommended": { "const": true }
378
+ }
379
+ },
380
+ "configObjectPreset": {
381
+ "type": "object", "additionalProperties": false, "required": ["id", "title", "value"],
382
+ "properties": {
383
+ "id": { "type": "string", "minLength": 1 }, "title": { "type": "string", "minLength": 1 },
384
+ "description": { "type": "string", "minLength": 1 },
385
+ "value": { "type": "object", "maxProperties": 32, "propertyNames": { "not": { "enum": ["__proto__", "constructor", "prototype"] } }, "additionalProperties": { "$ref": "#/$defs/configScalar" } },
386
+ "recommended": { "const": true }
387
+ }
388
+ },
389
+ "configStringChoices": {
390
+ "type": "object", "additionalProperties": false, "required": ["allowCustom", "presets"],
391
+ "not": { "properties": { "allowCustom": { "const": false }, "presets": { "type": "array", "maxItems": 0 } }, "required": ["allowCustom", "presets"] },
392
+ "properties": {
393
+ "allowCustom": { "type": "boolean" },
394
+ "presets": { "type": "array", "items": { "$ref": "#/$defs/configStringPreset" } }
395
+ }
396
+ },
397
+ "configNumberChoices": {
398
+ "type": "object", "additionalProperties": false, "required": ["allowCustom", "presets"],
399
+ "not": { "properties": { "allowCustom": { "const": false }, "presets": { "type": "array", "maxItems": 0 } }, "required": ["allowCustom", "presets"] },
400
+ "properties": {
401
+ "allowCustom": { "type": "boolean" },
402
+ "presets": { "type": "array", "items": { "$ref": "#/$defs/configNumberPreset" } }
403
+ }
404
+ },
405
+ "configBooleanChoices": {
406
+ "type": "object", "additionalProperties": false, "required": ["allowCustom", "presets"],
407
+ "not": { "properties": { "allowCustom": { "const": false }, "presets": { "type": "array", "maxItems": 0 } }, "required": ["allowCustom", "presets"] },
408
+ "properties": {
409
+ "allowCustom": { "type": "boolean" },
410
+ "presets": { "type": "array", "items": { "$ref": "#/$defs/configBooleanPreset" } }
411
+ }
412
+ },
413
+ "configObjectChoices": {
414
+ "type": "object", "additionalProperties": false, "required": ["allowCustom", "presets"],
415
+ "not": { "properties": { "allowCustom": { "const": false }, "presets": { "type": "array", "maxItems": 0 } }, "required": ["allowCustom", "presets"] },
416
+ "properties": {
417
+ "allowCustom": { "type": "boolean" },
418
+ "presets": { "type": "array", "items": { "$ref": "#/$defs/configObjectPreset" } }
419
+ }
420
+ },
421
+ "configScalar": {
422
+ "anyOf": [{ "type": "string" }, { "type": "number" }, { "type": "boolean" }]
423
+ },
424
+ "configStringField": {
425
+ "oneOf": [
426
+ { "$ref": "#/$defs/configPlainStringField" },
427
+ { "$ref": "#/$defs/configSensitiveStringField" }
428
+ ]
429
+ },
430
+ "configPlainStringField": {
431
+ "type": "object", "additionalProperties": false, "required": ["type"],
432
+ "properties": {
433
+ "type": { "const": "string" }, "title": { "type": "string" }, "description": { "type": "string" },
434
+ "default": { "type": "string" }, "required": { "type": "boolean" }, "sensitive": { "const": false },
435
+ "choices": { "$ref": "#/$defs/configStringChoices" }, "validation": { "$ref": "#/$defs/configStringValidation" }
436
+ }
437
+ },
438
+ "configSensitiveStringField": {
439
+ "type": "object", "additionalProperties": false, "required": ["type", "sensitive"],
440
+ "properties": {
441
+ "type": { "const": "string" }, "title": { "type": "string" }, "description": { "type": "string" },
442
+ "required": { "type": "boolean" }, "sensitive": { "const": true },
443
+ "validation": { "$ref": "#/$defs/configStringValidation" }
444
+ }
445
+ },
446
+ "configNumberField": {
447
+ "type": "object", "additionalProperties": false, "required": ["type"],
448
+ "properties": {
449
+ "type": { "const": "number" }, "title": { "type": "string" }, "description": { "type": "string" },
450
+ "default": { "type": "number" }, "required": { "type": "boolean" }, "sensitive": false,
451
+ "choices": { "$ref": "#/$defs/configNumberChoices" }, "validation": { "$ref": "#/$defs/configNumberValidation" }
452
+ }
453
+ },
454
+ "configBooleanField": {
455
+ "type": "object", "additionalProperties": false, "required": ["type"],
456
+ "properties": {
457
+ "type": { "const": "boolean" }, "title": { "type": "string" }, "description": { "type": "string" },
458
+ "default": { "type": "boolean" }, "required": { "type": "boolean" }, "sensitive": false,
459
+ "choices": { "$ref": "#/$defs/configBooleanChoices" }
460
+ }
461
+ },
462
+ "configScalarField": {
463
+ "oneOf": [{ "$ref": "#/$defs/configStringField" }, { "$ref": "#/$defs/configNumberField" }, { "$ref": "#/$defs/configBooleanField" }]
464
+ },
465
+ "configScalarChildField": {
466
+ "oneOf": [
467
+ { "$ref": "#/$defs/configStringChildField" }, { "$ref": "#/$defs/configNumberChildField" }, { "$ref": "#/$defs/configBooleanChildField" }
468
+ ]
469
+ },
470
+ "configStringChildField": {
471
+ "type": "object", "additionalProperties": false, "required": ["type"],
472
+ "properties": {
473
+ "type": { "const": "string" }, "title": { "type": "string" }, "description": { "type": "string" },
474
+ "required": { "type": "boolean" }, "sensitive": false,
475
+ "choices": { "$ref": "#/$defs/configStringChoices" }, "validation": { "$ref": "#/$defs/configStringValidation" }
476
+ }
477
+ },
478
+ "configNumberChildField": {
479
+ "type": "object", "additionalProperties": false, "required": ["type"],
480
+ "properties": {
481
+ "type": { "const": "number" }, "title": { "type": "string" }, "description": { "type": "string" },
482
+ "required": { "type": "boolean" }, "sensitive": false,
483
+ "choices": { "$ref": "#/$defs/configNumberChoices" }, "validation": { "$ref": "#/$defs/configNumberValidation" }
484
+ }
485
+ },
486
+ "configBooleanChildField": {
487
+ "type": "object", "additionalProperties": false, "required": ["type"],
488
+ "properties": {
489
+ "type": { "const": "boolean" }, "title": { "type": "string" }, "description": { "type": "string" },
490
+ "required": { "type": "boolean" }, "sensitive": false,
491
+ "choices": { "$ref": "#/$defs/configBooleanChoices" }
492
+ }
493
+ },
494
+ "configScalarDynamicField": {
495
+ "oneOf": [
496
+ { "$ref": "#/$defs/configStringDynamicField" }, { "$ref": "#/$defs/configNumberDynamicField" }, { "$ref": "#/$defs/configBooleanDynamicField" }
497
+ ]
498
+ },
499
+ "configStringDynamicField": {
500
+ "type": "object", "additionalProperties": false, "required": ["type"],
501
+ "properties": {
502
+ "type": { "const": "string" }, "title": { "type": "string" }, "description": { "type": "string" },
503
+ "sensitive": false, "choices": { "$ref": "#/$defs/configStringChoices" },
504
+ "validation": { "$ref": "#/$defs/configStringValidation" }
505
+ }
506
+ },
507
+ "configNumberDynamicField": {
508
+ "type": "object", "additionalProperties": false, "required": ["type"],
509
+ "properties": {
510
+ "type": { "const": "number" }, "title": { "type": "string" }, "description": { "type": "string" },
511
+ "sensitive": false, "choices": { "$ref": "#/$defs/configNumberChoices" },
512
+ "validation": { "$ref": "#/$defs/configNumberValidation" }
513
+ }
514
+ },
515
+ "configBooleanDynamicField": {
516
+ "type": "object", "additionalProperties": false, "required": ["type"],
517
+ "properties": {
518
+ "type": { "const": "boolean" }, "title": { "type": "string" }, "description": { "type": "string" },
519
+ "sensitive": false, "choices": { "$ref": "#/$defs/configBooleanChoices" }
520
+ }
521
+ },
522
+ "configFixedObjectField": {
523
+ "type": "object", "additionalProperties": false, "required": ["type", "properties"],
524
+ "properties": {
525
+ "type": { "const": "object" }, "title": { "type": "string" }, "description": { "type": "string" },
526
+ "default": { "type": "object", "maxProperties": 32, "propertyNames": { "not": { "enum": ["__proto__", "constructor", "prototype"] } }, "additionalProperties": { "$ref": "#/$defs/configScalar" } },
527
+ "required": { "type": "boolean" }, "sensitive": false,
528
+ "choices": { "$ref": "#/$defs/configObjectChoices" },
529
+ "properties": { "type": "object", "maxProperties": 32, "propertyNames": { "not": { "enum": ["__proto__", "constructor", "prototype"] } }, "additionalProperties": { "$ref": "#/$defs/configScalarChildField" } },
530
+ "additionalProperties": { "const": false },
531
+ "validation": { "$ref": "#/$defs/configObjectValidation" }
532
+ }
533
+ },
534
+ "configKeyValueObjectField": {
535
+ "type": "object", "additionalProperties": false, "required": ["type", "additionalProperties"],
536
+ "properties": {
537
+ "type": { "const": "object" }, "title": { "type": "string" }, "description": { "type": "string" },
538
+ "default": { "type": "object", "maxProperties": 32, "propertyNames": { "not": { "enum": ["__proto__", "constructor", "prototype"] } }, "additionalProperties": { "$ref": "#/$defs/configScalar" } },
539
+ "required": { "type": "boolean" }, "sensitive": false,
540
+ "choices": { "$ref": "#/$defs/configObjectChoices" },
541
+ "additionalProperties": { "$ref": "#/$defs/configScalarDynamicField" },
542
+ "validation": { "$ref": "#/$defs/configObjectValidation" }
543
+ }
544
+ },
545
+ "configObjectField": {
546
+ "oneOf": [
547
+ { "$ref": "#/$defs/configFixedObjectField" },
548
+ { "$ref": "#/$defs/configKeyValueObjectField" }
549
+ ]
550
+ },
551
+ "configField": {
552
+ "oneOf": [
553
+ { "$ref": "#/$defs/configStringField" }, { "$ref": "#/$defs/configNumberField" },
554
+ { "$ref": "#/$defs/configBooleanField" }, { "$ref": "#/$defs/configObjectField" }
555
+ ]
556
+ },
557
+ "config": {
558
+ "type": "object", "additionalProperties": false, "required": ["fields"],
559
+ "properties": {
560
+ "fields": { "type": "object", "propertyNames": { "not": { "enum": ["__proto__", "constructor", "prototype"] } }, "additionalProperties": { "$ref": "#/$defs/configField" } },
561
+ "presentation": {
562
+ "type": "object", "additionalProperties": false,
563
+ "properties": {
564
+ "groups": {
565
+ "type": "array", "items": {
566
+ "type": "object", "additionalProperties": false, "required": ["id", "title", "fields"],
567
+ "properties": {
568
+ "id": { "type": "string" }, "title": { "type": "string" }, "description": { "type": "string" },
569
+ "fields": { "$ref": "#/$defs/stringArray" }, "advanced": { "type": "boolean" }
570
+ }
571
+ }
572
+ }
573
+ }
574
+ }
575
+ }
576
+ },
577
+ "interface": {
578
+ "type": "object",
579
+ "additionalProperties": false,
580
+ "properties": {
581
+ "displayName": { "type": "string", "minLength": 1 },
582
+ "shortDescription": { "type": "string", "minLength": 1 },
583
+ "capabilities": {
584
+ "type": "array",
585
+ "items": { "type": "string", "minLength": 1 }
586
+ }
587
+ }
588
+ }
589
+ }
590
+ }