Skip to content

Commit 1be9482

Browse files
committed
chore: poc manifest 3
1 parent c7f5fa6 commit 1be9482

File tree

17 files changed

+1063
-41
lines changed

17 files changed

+1063
-41
lines changed

docs/static/schemas/plugin-manifest.schema.json

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,13 @@
9191
"type": "string",
9292
"description": "Message displayed to the user after project initialization. Use this to inform about manual setup steps (e.g. environment variables, resource provisioning)."
9393
},
94+
"postScaffold": {
95+
"type": "array",
96+
"description": "Ordered follow-up steps that a user or agent should perform after scaffolding.",
97+
"items": {
98+
"$ref": "#/$defs/postScaffoldStep"
99+
}
100+
},
94101
"hidden": {
95102
"type": "boolean",
96103
"default": false,
@@ -197,6 +204,12 @@
197204
"type": "string",
198205
"description": "Human-readable description for this field"
199206
},
207+
"discovery": {
208+
"$ref": "#/$defs/discoveryDescriptor"
209+
},
210+
"resolution": {
211+
"$ref": "#/$defs/resourceResolution"
212+
},
200213
"bundleIgnore": {
201214
"type": "boolean",
202215
"default": false,
@@ -224,6 +237,65 @@
224237
},
225238
"additionalProperties": false
226239
},
240+
"discoveryDescriptor": {
241+
"type": "object",
242+
"required": ["cliCommand", "selectField"],
243+
"properties": {
244+
"cliCommand": {
245+
"type": "string",
246+
"minLength": 1,
247+
"description": "CLI command to list candidate values. Use <PROFILE> as a placeholder for the Databricks CLI profile."
248+
},
249+
"selectField": {
250+
"type": "string",
251+
"minLength": 1,
252+
"description": "jq-style field used to extract the machine-readable value from each command result."
253+
},
254+
"displayField": {
255+
"type": "string",
256+
"minLength": 1,
257+
"description": "jq-style field used to extract a human-readable display value from each command result."
258+
},
259+
"dependsOn": {
260+
"type": "string",
261+
"minLength": 1,
262+
"description": "Field name in the same resource that must be resolved before running this discovery command."
263+
},
264+
"shortcut": {
265+
"type": "string",
266+
"minLength": 1,
267+
"description": "Optional shortcut command that returns a single value directly."
268+
}
269+
},
270+
"additionalProperties": false
271+
},
272+
"resourceResolution": {
273+
"type": "string",
274+
"enum": ["user-provided", "platform-injected"],
275+
"description": "Indicates whether the value must be supplied by the user/agent or is injected automatically by the platform."
276+
},
277+
"postScaffoldStep": {
278+
"type": "object",
279+
"required": ["step", "instruction"],
280+
"properties": {
281+
"step": {
282+
"type": "integer",
283+
"minimum": 1,
284+
"description": "1-based step number in the post-scaffold flow."
285+
},
286+
"instruction": {
287+
"type": "string",
288+
"minLength": 1,
289+
"description": "Instruction to follow after scaffolding."
290+
},
291+
"blocking": {
292+
"type": "boolean",
293+
"default": false,
294+
"description": "When true, this step must be completed before proceeding."
295+
}
296+
},
297+
"additionalProperties": false
298+
},
227299
"resourceRequirement": {
228300
"type": "object",
229301
"description": "Declares a resource requirement for a plugin. Can be defined statically in a manifest or dynamically via getResourceRequirements().",

docs/static/schemas/template-plugins.schema.json

Lines changed: 70 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,12 @@
1212
},
1313
"version": {
1414
"type": "string",
15-
"const": "1.0",
15+
"enum": ["1.0", "2.0"],
1616
"description": "Schema version for the template plugins manifest"
1717
},
18+
"scaffolding": {
19+
"$ref": "#/$defs/scaffolding"
20+
},
1821
"plugins": {
1922
"type": "object",
2023
"description": "Map of plugin name to plugin manifest with package source",
@@ -23,6 +26,19 @@
2326
}
2427
}
2528
},
29+
"allOf": [
30+
{
31+
"if": {
32+
"properties": {
33+
"version": { "const": "2.0" }
34+
},
35+
"required": ["version"]
36+
},
37+
"then": {
38+
"required": ["scaffolding"]
39+
}
40+
}
41+
],
2642
"additionalProperties": false,
2743
"$defs": {
2844
"templatePlugin": {
@@ -69,6 +85,13 @@
6985
"type": "string",
7086
"description": "Message displayed to the user after project initialization. Use this to inform about manual setup steps (e.g. environment variables, resource provisioning)."
7187
},
88+
"postScaffold": {
89+
"type": "array",
90+
"description": "Ordered follow-up steps that a user or agent should perform after scaffolding.",
91+
"items": {
92+
"$ref": "plugin-manifest.schema.json#/$defs/postScaffoldStep"
93+
}
94+
},
7295
"resources": {
7396
"type": "object",
7497
"required": ["required", "optional"],
@@ -94,6 +117,52 @@
94117
},
95118
"additionalProperties": false
96119
},
120+
"scaffoldingFlag": {
121+
"type": "object",
122+
"required": ["required", "description"],
123+
"properties": {
124+
"required": {
125+
"type": "boolean"
126+
},
127+
"description": {
128+
"type": "string",
129+
"minLength": 1
130+
},
131+
"pattern": {
132+
"type": "string",
133+
"minLength": 1
134+
},
135+
"default": {
136+
"type": "string"
137+
}
138+
},
139+
"additionalProperties": false
140+
},
141+
"scaffolding": {
142+
"type": "object",
143+
"required": ["command", "flags", "rules"],
144+
"properties": {
145+
"command": {
146+
"type": "string",
147+
"minLength": 1
148+
},
149+
"flags": {
150+
"type": "object",
151+
"minProperties": 1,
152+
"additionalProperties": {
153+
"$ref": "#/$defs/scaffoldingFlag"
154+
}
155+
},
156+
"rules": {
157+
"type": "array",
158+
"items": {
159+
"type": "string",
160+
"minLength": 1
161+
}
162+
}
163+
},
164+
"additionalProperties": false
165+
},
97166
"resourceType": {
98167
"$ref": "plugin-manifest.schema.json#/$defs/resourceType"
99168
},

packages/appkit/src/plugins/analytics/manifest.json

Lines changed: 32 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,30 @@
33
"name": "analytics",
44
"displayName": "Analytics Plugin",
55
"description": "SQL query execution against Databricks SQL Warehouses",
6+
"onSetupMessage": "Run 'databricks warehouses list' to find your SQL Warehouse ID.",
7+
"postScaffold": [
8+
{
9+
"step": 1,
10+
"instruction": "Create SQL query files in config/queries/"
11+
},
12+
{
13+
"step": 2,
14+
"instruction": "Run: npm run typegen",
15+
"blocking": true
16+
},
17+
{
18+
"step": 3,
19+
"instruction": "Read client/src/appKitTypes.d.ts for generated types"
20+
},
21+
{
22+
"step": 4,
23+
"instruction": "Write UI code using the generated types"
24+
},
25+
{
26+
"step": 5,
27+
"instruction": "Update tests/smoke.spec.ts selectors for your app"
28+
}
29+
],
630
"resources": {
731
"required": [
832
{
@@ -14,7 +38,14 @@
1438
"fields": {
1539
"id": {
1640
"env": "DATABRICKS_WAREHOUSE_ID",
17-
"description": "SQL Warehouse ID"
41+
"description": "SQL Warehouse ID",
42+
"discovery": {
43+
"cliCommand": "databricks warehouses list --profile <PROFILE> -o json",
44+
"selectField": ".id",
45+
"displayField": ".name",
46+
"shortcut": "databricks experimental aitools tools get-default-warehouse --profile <PROFILE>"
47+
},
48+
"resolution": "user-provided"
1849
}
1950
}
2051
}

packages/appkit/src/plugins/files/manifest.json

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,17 @@
33
"name": "files",
44
"displayName": "Files Plugin",
55
"description": "File operations against Databricks Volumes and Unity Catalog",
6+
"onSetupMessage": "Provide the full volume path, e.g. /Volumes/catalog/schema/volume_name.",
7+
"postScaffold": [
8+
{
9+
"step": 1,
10+
"instruction": "Use the files plugin API to read/write volume files in your tRPC procedures"
11+
},
12+
{
13+
"step": 2,
14+
"instruction": "Build UI for file upload/download using tRPC"
15+
}
16+
],
617
"resources": {
718
"required": [
819
{
@@ -14,7 +25,8 @@
1425
"fields": {
1526
"path": {
1627
"env": "DATABRICKS_VOLUME_FILES",
17-
"description": "Volume path for file storage (e.g. /Volumes/catalog/schema/volume_name)"
28+
"description": "Volume path for file storage (e.g. /Volumes/catalog/schema/volume_name)",
29+
"resolution": "user-provided"
1830
}
1931
}
2032
}

packages/appkit/src/plugins/genie/manifest.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
{
2+
"$schema": "https://databricks.github.io/appkit/schemas/plugin-manifest.schema.json",
23
"name": "genie",
34
"displayName": "Genie Plugin",
45
"description": "AI/BI Genie space integration for natural language data queries",
6+
"onSetupMessage": "Find your Genie Space ID in the AI/BI Genie UI.",
57
"resources": {
68
"required": [
79
{
@@ -13,7 +15,8 @@
1315
"fields": {
1416
"id": {
1517
"env": "DATABRICKS_GENIE_SPACE_ID",
16-
"description": "Default Genie Space ID"
18+
"description": "Default Genie Space ID",
19+
"resolution": "user-provided"
1720
}
1821
}
1922
}

packages/appkit/src/plugins/lakebase/manifest.json

Lines changed: 43 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,25 @@
33
"name": "lakebase",
44
"displayName": "Lakebase",
55
"description": "SQL query execution against Databricks Lakebase Autoscaling",
6+
"onSetupMessage": "Run 'databricks postgres list-branches projects/{project-id}' to find your Lakebase branch.",
7+
"postScaffold": [
8+
{
9+
"step": 1,
10+
"instruction": "Define your schema in server/server.ts startup"
11+
},
12+
{
13+
"step": 2,
14+
"instruction": "Write tRPC procedures using pool.query() in server/server.ts"
15+
},
16+
{
17+
"step": 3,
18+
"instruction": "Build React frontend consuming tRPC procedures"
19+
},
20+
{
21+
"step": 4,
22+
"instruction": "Update tests/smoke.spec.ts selectors for your app"
23+
}
24+
],
625
"hidden": false,
726
"resources": {
827
"required": [
@@ -15,25 +34,33 @@
1534
"fields": {
1635
"branch": {
1736
"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.",
18-
"examples": ["projects/{project-id}/branches/{branch-id}"]
37+
"examples": ["projects/{project-id}/branches/{branch-id}"],
38+
"discovery": {
39+
"cliCommand": "databricks postgres list-branches projects/{project-id} --profile <PROFILE> -o json",
40+
"selectField": ".name"
41+
},
42+
"resolution": "user-provided"
1943
},
2044
"database": {
21-
"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.",
45+
"description": "Full Lakebase Postgres database resource name for the selected branch.",
2246
"examples": [
2347
"projects/{project-id}/branches/{branch-id}/databases/{database-id}"
24-
]
48+
],
49+
"resolution": "user-provided"
2550
},
2651
"host": {
2752
"env": "PGHOST",
2853
"localOnly": true,
2954
"resolve": "postgres:host",
30-
"description": "Postgres host for local development. Auto-injected by the platform at deploy time."
55+
"description": "Postgres host for local development. Auto-injected by the platform at deploy time.",
56+
"resolution": "platform-injected"
3157
},
3258
"databaseName": {
3359
"env": "PGDATABASE",
3460
"localOnly": true,
3561
"resolve": "postgres:databaseName",
36-
"description": "Postgres database name for local development. Auto-injected by the platform at deploy time."
62+
"description": "Postgres database name for local development. Auto-injected by the platform at deploy time.",
63+
"resolution": "platform-injected"
3764
},
3865
"endpointPath": {
3966
"env": "LAKEBASE_ENDPOINT",
@@ -42,19 +69,27 @@
4269
"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.",
4370
"examples": [
4471
"projects/{project-id}/branches/{branch-id}/endpoints/{endpoint-id}"
45-
]
72+
],
73+
"discovery": {
74+
"cliCommand": "databricks postgres list-endpoints {branch} --profile <PROFILE> -o json",
75+
"selectField": ".name",
76+
"dependsOn": "branch"
77+
},
78+
"resolution": "user-provided"
4679
},
4780
"port": {
4881
"env": "PGPORT",
4982
"localOnly": true,
5083
"value": "5432",
51-
"description": "Postgres port. Auto-injected by the platform at deploy time."
84+
"description": "Postgres port. Auto-injected by the platform at deploy time.",
85+
"resolution": "platform-injected"
5286
},
5387
"sslmode": {
5488
"env": "PGSSLMODE",
5589
"localOnly": true,
5690
"value": "require",
57-
"description": "Postgres SSL mode. Auto-injected by the platform at deploy time."
91+
"description": "Postgres SSL mode. Auto-injected by the platform at deploy time.",
92+
"resolution": "platform-injected"
5893
}
5994
}
6095
}

packages/appkit/src/registry/types.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,12 @@ export {
3030
};
3131

3232
// Re-export generated base type from shared (schema-derived, used directly).
33-
export type { ResourceFieldEntry } from "shared";
33+
export type {
34+
DiscoveryDescriptor,
35+
PostScaffoldStep,
36+
ResourceFieldEntry,
37+
ResourceResolution,
38+
} from "shared";
3439

3540
// Import shared base types for strict extension below.
3641
import type {

0 commit comments

Comments
 (0)