|
1 | 1 | { |
2 | 2 | "$schema": "https://databricks.github.io/appkit/schemas/template-plugins.schema.json", |
3 | | - "version": "1.0", |
| 3 | + "version": "2.0", |
4 | 4 | "plugins": { |
| 5 | + "agents": { |
| 6 | + "name": "agents", |
| 7 | + "displayName": "Agents Plugin", |
| 8 | + "description": "AI agents driven by markdown configs or code, with auto-tool-discovery from registered plugins", |
| 9 | + "package": "@databricks/appkit", |
| 10 | + "resources": { |
| 11 | + "required": [], |
| 12 | + "optional": [ |
| 13 | + { |
| 14 | + "type": "serving_endpoint", |
| 15 | + "alias": "Default LLM for agents", |
| 16 | + "resourceKey": "agents-serving-endpoint", |
| 17 | + "description": "Default streaming-capable LLM endpoint for agents that don't pin their own model", |
| 18 | + "permission": "CAN_QUERY", |
| 19 | + "fields": { |
| 20 | + "name": { |
| 21 | + "env": "DATABRICKS_SERVING_ENDPOINT_NAME", |
| 22 | + "description": "Default LLM serving endpoint name", |
| 23 | + "origin": "user" |
| 24 | + } |
| 25 | + } |
| 26 | + } |
| 27 | + ] |
| 28 | + }, |
| 29 | + "stability": "beta" |
| 30 | + }, |
5 | 31 | "analytics": { |
6 | 32 | "name": "analytics", |
7 | 33 | "displayName": "Analytics Plugin", |
|
18 | 44 | "fields": { |
19 | 45 | "id": { |
20 | 46 | "env": "DATABRICKS_WAREHOUSE_ID", |
21 | | - "description": "SQL Warehouse ID" |
| 47 | + "description": "SQL Warehouse ID", |
| 48 | + "discovery": { |
| 49 | + "type": "kind", |
| 50 | + "resourceKind": "warehouse" |
| 51 | + }, |
| 52 | + "origin": "user" |
22 | 53 | } |
23 | 54 | } |
24 | 55 | } |
25 | 56 | ], |
26 | 57 | "optional": [] |
27 | 58 | }, |
| 59 | + "scaffolding": { |
| 60 | + "rules": { |
| 61 | + "must": [ |
| 62 | + "Before init, ensure the SQL Warehouse passed via --set analytics.sql-warehouse.id is running" |
| 63 | + ], |
| 64 | + "should": [ |
| 65 | + "After init, ensure config/queries/ has at least one .sql file before running npm run typegen" |
| 66 | + ] |
| 67 | + } |
| 68 | + }, |
28 | 69 | "requiredByTemplate": true |
29 | 70 | }, |
30 | 71 | "files": { |
|
43 | 84 | "fields": { |
44 | 85 | "path": { |
45 | 86 | "env": "DATABRICKS_VOLUME_FILES", |
46 | | - "description": "Volume path for file storage (e.g. /Volumes/catalog/schema/volume_name)" |
| 87 | + "description": "Volume path for file storage (e.g. /Volumes/catalog/schema/volume_name)", |
| 88 | + "discovery": { |
| 89 | + "type": "kind", |
| 90 | + "resourceKind": "volume", |
| 91 | + "select": "full_name" |
| 92 | + }, |
| 93 | + "origin": "user" |
47 | 94 | } |
48 | 95 | } |
49 | 96 | } |
50 | 97 | ], |
51 | 98 | "optional": [] |
52 | 99 | }, |
| 100 | + "scaffolding": { |
| 101 | + "rules": { |
| 102 | + "must": [ |
| 103 | + "Before init, verify your Unity Catalog volume exists and you have WRITE_VOLUME permission" |
| 104 | + ] |
| 105 | + } |
| 106 | + }, |
53 | 107 | "requiredByTemplate": true |
54 | 108 | }, |
55 | 109 | "genie": { |
|
68 | 122 | "fields": { |
69 | 123 | "id": { |
70 | 124 | "env": "DATABRICKS_GENIE_SPACE_ID", |
71 | | - "description": "Default Genie Space ID" |
| 125 | + "description": "Default Genie Space ID", |
| 126 | + "discovery": { |
| 127 | + "type": "kind", |
| 128 | + "resourceKind": "genie_space" |
| 129 | + }, |
| 130 | + "origin": "user" |
| 131 | + }, |
| 132 | + "name": { |
| 133 | + "description": "Genie Space display name", |
| 134 | + "origin": "user" |
72 | 135 | } |
73 | 136 | } |
74 | 137 | } |
75 | 138 | ], |
76 | 139 | "optional": [] |
77 | 140 | }, |
| 141 | + "scaffolding": { |
| 142 | + "rules": { |
| 143 | + "must": [ |
| 144 | + "After init, configure the 'spaces' map in plugin config with alias-to-Space-ID mappings" |
| 145 | + ] |
| 146 | + } |
| 147 | + }, |
78 | 148 | "requiredByTemplate": true |
79 | 149 | }, |
| 150 | + "jobs": { |
| 151 | + "name": "jobs", |
| 152 | + "displayName": "Jobs Plugin", |
| 153 | + "description": "Manage Databricks Lakeflow Jobs.", |
| 154 | + "package": "@databricks/appkit", |
| 155 | + "resources": { |
| 156 | + "required": [ |
| 157 | + { |
| 158 | + "type": "job", |
| 159 | + "alias": "Job", |
| 160 | + "resourceKey": "job", |
| 161 | + "description": "A Databricks job to trigger and monitor", |
| 162 | + "permission": "CAN_MANAGE_RUN", |
| 163 | + "fields": { |
| 164 | + "id": { |
| 165 | + "env": "DATABRICKS_JOB_ID", |
| 166 | + "description": "Numeric Databricks job ID. Find it in the Jobs UI or via `databricks jobs list`.", |
| 167 | + "origin": "user" |
| 168 | + } |
| 169 | + } |
| 170 | + } |
| 171 | + ], |
| 172 | + "optional": [] |
| 173 | + } |
| 174 | + }, |
80 | 175 | "lakebase": { |
81 | 176 | "name": "lakebase", |
82 | 177 | "displayName": "Lakebase", |
|
91 | 186 | "description": "Lakebase Postgres database for persistent storage", |
92 | 187 | "permission": "CAN_CONNECT_AND_CREATE", |
93 | 188 | "fields": { |
| 189 | + "project": { |
| 190 | + "description": "Full Lakebase Postgres project resource name. Obtain by running `databricks postgres list-projects`, select the desired item from the output array and use its .name value.", |
| 191 | + "examples": [ |
| 192 | + "projects/{project-id}" |
| 193 | + ], |
| 194 | + "discovery": { |
| 195 | + "type": "kind", |
| 196 | + "resourceKind": "postgres_project", |
| 197 | + "select": "name" |
| 198 | + }, |
| 199 | + "origin": "user" |
| 200 | + }, |
94 | 201 | "branch": { |
95 | | - "description": "Full Lakebase Postgres branch resource name. Obtain by running `databricks postgres list-branches projects/{project-id}`, select the desired item from the output array and use its .name value.", |
| 202 | + "description": "Full Lakebase Postgres branch resource name. Obtain by running `databricks postgres list-branches {project-name}`, select the desired item from the output array and use its .name value. Requires the project resource name.", |
96 | 203 | "examples": [ |
97 | 204 | "projects/{project-id}/branches/{branch-id}" |
98 | | - ] |
| 205 | + ], |
| 206 | + "discovery": { |
| 207 | + "type": "kind", |
| 208 | + "resourceKind": "postgres_branch", |
| 209 | + "select": "name", |
| 210 | + "dependsOn": "project" |
| 211 | + }, |
| 212 | + "origin": "user" |
99 | 213 | }, |
100 | 214 | "database": { |
101 | 215 | "description": "Full Lakebase Postgres database resource name. Obtain by running `databricks postgres list-databases {branch-name}`, select the desired item from the output array and use its .name value. Requires the branch resource name.", |
102 | 216 | "examples": [ |
103 | 217 | "projects/{project-id}/branches/{branch-id}/databases/{database-id}" |
104 | | - ] |
| 218 | + ], |
| 219 | + "discovery": { |
| 220 | + "type": "kind", |
| 221 | + "resourceKind": "postgres_database", |
| 222 | + "select": "name", |
| 223 | + "dependsOn": "branch" |
| 224 | + }, |
| 225 | + "origin": "user" |
105 | 226 | }, |
106 | 227 | "host": { |
107 | 228 | "env": "PGHOST", |
| 229 | + "description": "Postgres host for local development. Auto-injected by the platform at deploy time.", |
108 | 230 | "localOnly": true, |
109 | 231 | "resolve": "postgres:host", |
110 | | - "description": "Postgres host for local development. Auto-injected by the platform at deploy time." |
| 232 | + "origin": "platform" |
111 | 233 | }, |
112 | 234 | "databaseName": { |
113 | 235 | "env": "PGDATABASE", |
| 236 | + "description": "Postgres database name for local development. Auto-injected by the platform at deploy time.", |
114 | 237 | "localOnly": true, |
115 | 238 | "resolve": "postgres:databaseName", |
116 | | - "description": "Postgres database name for local development. Auto-injected by the platform at deploy time." |
| 239 | + "origin": "platform" |
117 | 240 | }, |
118 | 241 | "endpointPath": { |
119 | 242 | "env": "LAKEBASE_ENDPOINT", |
120 | | - "bundleIgnore": true, |
121 | | - "resolve": "postgres:endpointPath", |
122 | 243 | "description": "Lakebase endpoint resource name. Auto-injected at runtime via app.yaml valueFrom: postgres. For local development, obtain by running `databricks postgres list-endpoints {branch-name}`, select the desired item from the output array and use its .name value.", |
| 244 | + "bundleIgnore": true, |
123 | 245 | "examples": [ |
124 | 246 | "projects/{project-id}/branches/{branch-id}/endpoints/{endpoint-id}" |
125 | | - ] |
| 247 | + ], |
| 248 | + "resolve": "postgres:endpointPath", |
| 249 | + "origin": "cli" |
126 | 250 | }, |
127 | 251 | "port": { |
128 | 252 | "env": "PGPORT", |
| 253 | + "description": "Postgres port. Auto-injected by the platform at deploy time.", |
129 | 254 | "localOnly": true, |
130 | 255 | "value": "5432", |
131 | | - "description": "Postgres port. Auto-injected by the platform at deploy time." |
| 256 | + "origin": "platform" |
132 | 257 | }, |
133 | 258 | "sslmode": { |
134 | 259 | "env": "PGSSLMODE", |
| 260 | + "description": "Postgres SSL mode. Auto-injected by the platform at deploy time.", |
135 | 261 | "localOnly": true, |
136 | 262 | "value": "require", |
137 | | - "description": "Postgres SSL mode. Auto-injected by the platform at deploy time." |
| 263 | + "origin": "platform" |
138 | 264 | } |
139 | 265 | } |
140 | 266 | } |
141 | 267 | ], |
142 | 268 | "optional": [] |
143 | 269 | }, |
| 270 | + "scaffolding": { |
| 271 | + "rules": { |
| 272 | + "should": [ |
| 273 | + "After init, run any database migrations for your chosen ORM before first request", |
| 274 | + "After init, verify Lakebase connectivity with 'psql $PGHOST -c \"select 1\"'" |
| 275 | + ] |
| 276 | + } |
| 277 | + }, |
144 | 278 | "requiredByTemplate": true |
145 | 279 | }, |
146 | 280 | "server": { |
|
153 | 287 | "optional": [] |
154 | 288 | }, |
155 | 289 | "requiredByTemplate": true |
| 290 | + }, |
| 291 | + "serving": { |
| 292 | + "name": "serving", |
| 293 | + "displayName": "Model Serving Plugin", |
| 294 | + "description": "Authenticated proxy to Databricks Model Serving endpoints", |
| 295 | + "package": "@databricks/appkit", |
| 296 | + "resources": { |
| 297 | + "required": [ |
| 298 | + { |
| 299 | + "type": "serving_endpoint", |
| 300 | + "alias": "Serving Endpoint", |
| 301 | + "resourceKey": "serving-endpoint", |
| 302 | + "description": "Model Serving endpoint for inference", |
| 303 | + "permission": "CAN_QUERY", |
| 304 | + "fields": { |
| 305 | + "name": { |
| 306 | + "env": "DATABRICKS_SERVING_ENDPOINT_NAME", |
| 307 | + "description": "Serving endpoint name", |
| 308 | + "origin": "user" |
| 309 | + } |
| 310 | + } |
| 311 | + } |
| 312 | + ], |
| 313 | + "optional": [] |
| 314 | + } |
| 315 | + } |
| 316 | + }, |
| 317 | + "scaffolding": { |
| 318 | + "command": "databricks apps init", |
| 319 | + "flags": { |
| 320 | + "--name": { |
| 321 | + "description": "Project name — sets {{.projectName}} in package.json, databricks.yml, and .env. Required for non-interactive scaffolding.", |
| 322 | + "required": true, |
| 323 | + "pattern": "^[a-z][a-z0-9-]*$" |
| 324 | + }, |
| 325 | + "--template": { |
| 326 | + "description": "Template path (local directory or GitHub URL)", |
| 327 | + "required": false |
| 328 | + }, |
| 329 | + "--version": { |
| 330 | + "description": "AppKit version to use; defaults to auto-detected", |
| 331 | + "required": false |
| 332 | + }, |
| 333 | + "--features": { |
| 334 | + "description": "Plugins to enable (comma-separated, no spaces; must match keys in this manifest's plugins map)", |
| 335 | + "required": false, |
| 336 | + "pattern": "^[a-zA-Z0-9_-]+(,[a-zA-Z0-9_-]+)*$" |
| 337 | + }, |
| 338 | + "--set": { |
| 339 | + "description": "Set resource values (format: plugin.resourceKey.field=value, repeatable)", |
| 340 | + "required": false |
| 341 | + }, |
| 342 | + "--output-dir": { |
| 343 | + "description": "Directory to write the project to", |
| 344 | + "required": false |
| 345 | + }, |
| 346 | + "--description": { |
| 347 | + "description": "App description", |
| 348 | + "required": false |
| 349 | + }, |
| 350 | + "--run": { |
| 351 | + "description": "Run the app after creation (none, dev, dev-remote)", |
| 352 | + "required": false |
| 353 | + }, |
| 354 | + "--auto-approve": { |
| 355 | + "description": "Pass as a bare flag (no value) to skip prompts for optional resources. Not recommended for agent-driven init — conflicts with the 'ask user when in doubt' rule.", |
| 356 | + "required": false |
| 357 | + }, |
| 358 | + "--profile": { |
| 359 | + "description": "Databricks CLI profile to use for authentication (global flag)", |
| 360 | + "required": false |
| 361 | + } |
| 362 | + }, |
| 363 | + "rules": { |
| 364 | + "must": [ |
| 365 | + "Keep all secrets and credentials only in app.yaml, databricks.yml, and/or .env" |
| 366 | + ], |
| 367 | + "should": [ |
| 368 | + "ask user when in doubt of resource to use for plugin" |
| 369 | + ], |
| 370 | + "never": [ |
| 371 | + "guess resources when multiple or no options are available", |
| 372 | + "embed secrets in files that will go to the client-bundle" |
| 373 | + ] |
156 | 374 | } |
157 | 375 | } |
158 | 376 | } |
0 commit comments