|
| 1 | +{ |
| 2 | + "$schema": "http://json-schema.org/draft-07/schema#", |
| 3 | + "$id": "https://databricks.github.io/appkit/schemas/template-plugins.schema.v2.json", |
| 4 | + "title": "AppKit Template Plugins Manifest V2", |
| 5 | + "description": "Aggregated plugin manifest for AppKit templates. Read by Databricks CLI during init to discover available plugins, resource requirements, and scaffold guidance.", |
| 6 | + "type": "object", |
| 7 | + "required": ["version", "scaffolding", "plugins"], |
| 8 | + "properties": { |
| 9 | + "$schema": { |
| 10 | + "type": "string", |
| 11 | + "description": "Reference to the JSON Schema for validation" |
| 12 | + }, |
| 13 | + "version": { |
| 14 | + "type": "string", |
| 15 | + "const": "2.0", |
| 16 | + "description": "Schema version for the template plugins manifest" |
| 17 | + }, |
| 18 | + "scaffolding": { |
| 19 | + "$ref": "#/$defs/scaffolding" |
| 20 | + }, |
| 21 | + "plugins": { |
| 22 | + "type": "object", |
| 23 | + "description": "Map of plugin name to plugin manifest with package source", |
| 24 | + "additionalProperties": { |
| 25 | + "$ref": "#/$defs/templatePlugin" |
| 26 | + } |
| 27 | + } |
| 28 | + }, |
| 29 | + "additionalProperties": false, |
| 30 | + "$defs": { |
| 31 | + "templatePlugin": { |
| 32 | + "type": "object", |
| 33 | + "required": [ |
| 34 | + "name", |
| 35 | + "displayName", |
| 36 | + "description", |
| 37 | + "package", |
| 38 | + "resources" |
| 39 | + ], |
| 40 | + "description": "Plugin manifest with package source information", |
| 41 | + "properties": { |
| 42 | + "name": { |
| 43 | + "type": "string", |
| 44 | + "pattern": "^[a-z][a-z0-9-]*$", |
| 45 | + "description": "Plugin identifier. Must be lowercase, start with a letter, and contain only letters, numbers, and hyphens.", |
| 46 | + "examples": ["analytics", "server", "my-custom-plugin"] |
| 47 | + }, |
| 48 | + "displayName": { |
| 49 | + "type": "string", |
| 50 | + "minLength": 1, |
| 51 | + "description": "Human-readable display name for UI and CLI", |
| 52 | + "examples": ["Analytics Plugin", "Server Plugin"] |
| 53 | + }, |
| 54 | + "description": { |
| 55 | + "type": "string", |
| 56 | + "minLength": 1, |
| 57 | + "description": "Brief description of what the plugin does", |
| 58 | + "examples": ["SQL query execution against Databricks SQL Warehouses"] |
| 59 | + }, |
| 60 | + "package": { |
| 61 | + "type": "string", |
| 62 | + "minLength": 1, |
| 63 | + "description": "NPM package name or relative path that provides this plugin", |
| 64 | + "examples": ["@databricks/appkit", "./plugins/custom-plugin"] |
| 65 | + }, |
| 66 | + "requiredByTemplate": { |
| 67 | + "type": "boolean", |
| 68 | + "default": false, |
| 69 | + "description": "When true, this plugin is required by the template and cannot be deselected during CLI init." |
| 70 | + }, |
| 71 | + "onSetupMessage": { |
| 72 | + "type": "string", |
| 73 | + "description": "Human-facing message displayed after project initialization to explain manual setup steps." |
| 74 | + }, |
| 75 | + "postScaffold": { |
| 76 | + "type": "array", |
| 77 | + "description": "Ordered follow-up guidance for a human or agent after scaffolding.", |
| 78 | + "items": { |
| 79 | + "$ref": "plugin-manifest.schema.json#/$defs/postScaffoldStep" |
| 80 | + } |
| 81 | + }, |
| 82 | + "resources": { |
| 83 | + "type": "object", |
| 84 | + "required": ["required", "optional"], |
| 85 | + "description": "Databricks resource requirements for this plugin", |
| 86 | + "properties": { |
| 87 | + "required": { |
| 88 | + "type": "array", |
| 89 | + "description": "Resources that must be available for the plugin to function", |
| 90 | + "items": { |
| 91 | + "$ref": "#/$defs/resourceRequirement" |
| 92 | + } |
| 93 | + }, |
| 94 | + "optional": { |
| 95 | + "type": "array", |
| 96 | + "description": "Resources that enhance functionality but are not mandatory", |
| 97 | + "items": { |
| 98 | + "$ref": "#/$defs/resourceRequirement" |
| 99 | + } |
| 100 | + } |
| 101 | + }, |
| 102 | + "additionalProperties": false |
| 103 | + } |
| 104 | + }, |
| 105 | + "additionalProperties": false |
| 106 | + }, |
| 107 | + "scaffoldingFlag": { |
| 108 | + "type": "object", |
| 109 | + "required": ["required", "description"], |
| 110 | + "properties": { |
| 111 | + "required": { |
| 112 | + "type": "boolean" |
| 113 | + }, |
| 114 | + "description": { |
| 115 | + "type": "string", |
| 116 | + "minLength": 1 |
| 117 | + }, |
| 118 | + "pattern": { |
| 119 | + "type": "string", |
| 120 | + "minLength": 1 |
| 121 | + }, |
| 122 | + "default": { |
| 123 | + "type": "string" |
| 124 | + } |
| 125 | + }, |
| 126 | + "additionalProperties": false |
| 127 | + }, |
| 128 | + "scaffolding": { |
| 129 | + "type": "object", |
| 130 | + "required": ["command", "flags", "rules"], |
| 131 | + "properties": { |
| 132 | + "command": { |
| 133 | + "type": "string", |
| 134 | + "minLength": 1 |
| 135 | + }, |
| 136 | + "flags": { |
| 137 | + "type": "object", |
| 138 | + "minProperties": 1, |
| 139 | + "additionalProperties": { |
| 140 | + "$ref": "#/$defs/scaffoldingFlag" |
| 141 | + } |
| 142 | + }, |
| 143 | + "rules": { |
| 144 | + "type": "array", |
| 145 | + "items": { |
| 146 | + "type": "string", |
| 147 | + "minLength": 1 |
| 148 | + } |
| 149 | + } |
| 150 | + }, |
| 151 | + "additionalProperties": false |
| 152 | + }, |
| 153 | + "resourceType": { |
| 154 | + "$ref": "plugin-manifest.schema.json#/$defs/resourceType" |
| 155 | + }, |
| 156 | + "resourceFieldEntry": { |
| 157 | + "$ref": "plugin-manifest.schema.json#/$defs/resourceFieldEntry" |
| 158 | + }, |
| 159 | + "resourceRequirement": { |
| 160 | + "$ref": "plugin-manifest.schema.json#/$defs/resourceRequirement" |
| 161 | + } |
| 162 | + } |
| 163 | +} |
0 commit comments