Skip to content

Commit 2617c0f

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

21 files changed

+1085
-122
lines changed

docs/docs/api/appkit/Interface.PluginManifest.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,22 @@ Omit.onSetupMessage
168168

169169
***
170170

171+
### postScaffold?
172+
173+
```ts
174+
optional postScaffold: PostScaffoldStep[];
175+
```
176+
177+
Ordered follow-up steps that a user or agent should perform after scaffolding.
178+
179+
#### Inherited from
180+
181+
```ts
182+
Omit.postScaffold
183+
```
184+
185+
***
186+
171187
### repository?
172188

173189
```ts

docs/docs/api/appkit/Interface.ResourceFieldEntry.md

Lines changed: 0 additions & 76 deletions
This file was deleted.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Type Alias: ResourceFieldEntry
2+
3+
```ts
4+
type ResourceFieldEntry = GeneratedResourceFieldEntry;
5+
```

docs/docs/api/appkit/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ plugin architecture, and React integration.
4040
| [RequestedClaims](Interface.RequestedClaims.md) | Optional claims for fine-grained Unity Catalog table permissions When specified, the returned token will be scoped to only the requested tables |
4141
| [RequestedResource](Interface.RequestedResource.md) | Resource to request permissions for in Unity Catalog |
4242
| [ResourceEntry](Interface.ResourceEntry.md) | Internal representation of a resource in the registry. Extends ResourceRequirement with resolution state and plugin ownership. |
43-
| [ResourceFieldEntry](Interface.ResourceFieldEntry.md) | Defines a single field for a resource. Each field has its own environment variable and optional description. Single-value types use one key (e.g. id); multi-value types (database, secret) use multiple (e.g. instance_name, database_name or scope, key). |
4443
| [ResourceRequirement](Interface.ResourceRequirement.md) | Declares a resource requirement for a plugin. Can be defined statically in a manifest or dynamically via getResourceRequirements(). Narrows the generated base: type → ResourceType enum, permission → ResourcePermission union. |
4544
| [StreamExecutionSettings](Interface.StreamExecutionSettings.md) | Execution settings for streaming endpoints. Extends PluginExecutionSettings with SSE stream configuration. |
4645
| [TelemetryConfig](Interface.TelemetryConfig.md) | OpenTelemetry configuration for AppKit applications |
@@ -53,6 +52,7 @@ plugin architecture, and React integration.
5352
| [ConfigSchema](TypeAlias.ConfigSchema.md) | Configuration schema definition for plugin config. Re-exported from the standard JSON Schema Draft 7 types. |
5453
| [IAppRouter](TypeAlias.IAppRouter.md) | Express router type for plugin route registration |
5554
| [PluginData](TypeAlias.PluginData.md) | Tuple of plugin class, config, and name. Created by `toPlugin()` and passed to `createApp()`. |
55+
| [ResourceFieldEntry](TypeAlias.ResourceFieldEntry.md) | - |
5656
| [ResourcePermission](TypeAlias.ResourcePermission.md) | Union of all possible permission levels across all resource types. |
5757
| [ToPlugin](TypeAlias.ToPlugin.md) | Factory function type returned by `toPlugin()`. Accepts optional config and returns a PluginData tuple. |
5858

docs/docs/api/appkit/typedoc-sidebar.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -132,11 +132,6 @@ const typedocSidebar: SidebarsConfig = {
132132
id: "api/appkit/Interface.ResourceEntry",
133133
label: "ResourceEntry"
134134
},
135-
{
136-
type: "doc",
137-
id: "api/appkit/Interface.ResourceFieldEntry",
138-
label: "ResourceFieldEntry"
139-
},
140135
{
141136
type: "doc",
142137
id: "api/appkit/Interface.ResourceRequirement",
@@ -178,6 +173,11 @@ const typedocSidebar: SidebarsConfig = {
178173
id: "api/appkit/TypeAlias.PluginData",
179174
label: "PluginData"
180175
},
176+
{
177+
type: "doc",
178+
id: "api/appkit/TypeAlias.ResourceFieldEntry",
179+
label: "ResourceFieldEntry"
180+
},
181181
{
182182
type: "doc",
183183
id: "api/appkit/TypeAlias.ResourcePermission",

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
}

0 commit comments

Comments
 (0)