@databricks/appkit 0.83.0 → 0.84.0
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.
- package/CLAUDE.md +15 -1
- package/dist/agents/databricks.d.ts +15 -3
- package/dist/agents/databricks.d.ts.map +1 -1
- package/dist/agents/databricks.js +25 -8
- package/dist/agents/databricks.js.map +1 -1
- package/dist/appkit/package.js +1 -1
- package/dist/beta.d.ts +2 -2
- package/dist/cache/index.d.ts.map +1 -1
- package/dist/cache/index.js +6 -1
- package/dist/cache/index.js.map +1 -1
- package/dist/cli/commands/agent/eval.js +1 -1
- package/dist/cli/commands/generate-types.js +1 -1
- package/dist/cli/commands/plugin/sync/sync.js +28 -15
- package/dist/cli/commands/plugin/sync/sync.js.map +1 -1
- package/dist/cli/commands/registry/add.js +3 -11
- package/dist/cli/commands/registry/add.js.map +1 -1
- package/dist/cli/commands/registry/config-writer.js +1 -1
- package/dist/connectors/lakebase/routing-pool.d.ts.map +1 -1
- package/dist/connectors/lakebase/routing-pool.js +4 -10
- package/dist/connectors/lakebase/routing-pool.js.map +1 -1
- package/dist/context/caller-context.d.ts +4 -1
- package/dist/context/caller-context.d.ts.map +1 -1
- package/dist/context/caller-context.js.map +1 -1
- package/dist/context/execution-context.d.ts +29 -1
- package/dist/context/execution-context.d.ts.map +1 -1
- package/dist/context/execution-context.js +60 -8
- package/dist/context/execution-context.js.map +1 -1
- package/dist/context/index.d.ts +2 -2
- package/dist/context/index.js +2 -1
- package/dist/context/request-scope.d.ts +2 -0
- package/dist/context/request-scope.js +39 -0
- package/dist/context/request-scope.js.map +1 -0
- package/dist/context/resource-capabilities.js +59 -0
- package/dist/context/resource-capabilities.js.map +1 -0
- package/dist/context/scoped-api.js +104 -0
- package/dist/context/scoped-api.js.map +1 -0
- package/dist/context/service-context.d.ts.map +1 -1
- package/dist/context/service-context.js +1 -1
- package/dist/context/service-context.js.map +1 -1
- package/dist/context/user-context.d.ts +16 -19
- package/dist/context/user-context.d.ts.map +1 -1
- package/dist/context/user-context.js +30 -3
- package/dist/context/user-context.js.map +1 -1
- package/dist/core/agent/load-agents.d.ts.map +1 -1
- package/dist/core/agent/load-agents.js +5 -2
- package/dist/core/agent/load-agents.js.map +1 -1
- package/dist/core/agent/run-agent.d.ts +19 -6
- package/dist/core/agent/run-agent.d.ts.map +1 -1
- package/dist/core/agent/run-agent.js +53 -17
- package/dist/core/agent/run-agent.js.map +1 -1
- package/dist/core/agent/types.d.ts +18 -1
- package/dist/core/agent/types.d.ts.map +1 -1
- package/dist/core/agent/types.js.map +1 -1
- package/dist/core/appkit.d.ts +4 -3
- package/dist/core/appkit.d.ts.map +1 -1
- package/dist/core/appkit.js +30 -9
- package/dist/core/appkit.js.map +1 -1
- package/dist/core/plugin-context.d.ts +14 -15
- package/dist/core/plugin-context.d.ts.map +1 -1
- package/dist/core/plugin-context.js +24 -14
- package/dist/core/plugin-context.js.map +1 -1
- package/dist/errors/base.d.ts +2 -2
- package/dist/errors/base.js +2 -2
- package/dist/errors/base.js.map +1 -1
- package/dist/errors/identity-expired.d.ts +14 -0
- package/dist/errors/identity-expired.d.ts.map +1 -0
- package/dist/errors/identity-expired.js +33 -0
- package/dist/errors/identity-expired.js.map +1 -0
- package/dist/errors/index.js +1 -0
- package/dist/index.d.ts +8 -5
- package/dist/index.js +5 -2
- package/dist/logging/logger.js +1 -1
- package/dist/plugin/execution-result.d.ts +4 -1
- package/dist/plugin/execution-result.d.ts.map +1 -1
- package/dist/plugin/interceptors/telemetry.js +6 -4
- package/dist/plugin/interceptors/telemetry.js.map +1 -1
- package/dist/plugin/plugin.d.ts +13 -21
- package/dist/plugin/plugin.d.ts.map +1 -1
- package/dist/plugin/plugin.js +41 -122
- package/dist/plugin/plugin.js.map +1 -1
- package/dist/plugins/agents/agents.d.ts +12 -0
- package/dist/plugins/agents/agents.d.ts.map +1 -1
- package/dist/plugins/agents/agents.js +65 -15
- package/dist/plugins/agents/agents.js.map +1 -1
- package/dist/plugins/agents/auth-mode.js +42 -0
- package/dist/plugins/agents/auth-mode.js.map +1 -0
- package/dist/plugins/agents/index.d.ts +1 -1
- package/dist/plugins/agents/mlflow.js +11 -3
- package/dist/plugins/agents/mlflow.js.map +1 -1
- package/dist/plugins/agents/tool-dispatch.js +9 -1
- package/dist/plugins/agents/tool-dispatch.js.map +1 -1
- package/dist/plugins/ai-search/ai-search.d.ts.map +1 -1
- package/dist/plugins/ai-search/ai-search.js +4 -4
- package/dist/plugins/ai-search/ai-search.js.map +1 -1
- package/dist/plugins/analytics/analytics.d.ts +2 -2
- package/dist/plugins/analytics/analytics.js +6 -6
- package/dist/plugins/analytics/analytics.js.map +1 -1
- package/dist/plugins/database/crud/contract.js +2 -2
- package/dist/plugins/database/crud/contract.js.map +1 -1
- package/dist/plugins/files/plugin.d.ts +10 -4
- package/dist/plugins/files/plugin.d.ts.map +1 -1
- package/dist/plugins/files/plugin.js +34 -13
- package/dist/plugins/files/plugin.js.map +1 -1
- package/dist/plugins/genie/genie.d.ts +9 -0
- package/dist/plugins/genie/genie.d.ts.map +1 -1
- package/dist/plugins/genie/genie.js +12 -3
- package/dist/plugins/genie/genie.js.map +1 -1
- package/dist/plugins/genie/manifest.js +1 -0
- package/dist/plugins/jobs/plugin.js +2 -2
- package/dist/plugins/jobs/plugin.js.map +1 -1
- package/dist/plugins/lakebase/lakebase.d.ts +10 -17
- package/dist/plugins/lakebase/lakebase.d.ts.map +1 -1
- package/dist/plugins/lakebase/lakebase.js +12 -17
- package/dist/plugins/lakebase/lakebase.js.map +1 -1
- package/dist/plugins/server/client-config-sanitizer.js +1 -4
- package/dist/plugins/server/client-config-sanitizer.js.map +1 -1
- package/dist/plugins/server/dev-obo-middleware.js +60 -0
- package/dist/plugins/server/dev-obo-middleware.js.map +1 -0
- package/dist/plugins/server/index.d.ts.map +1 -1
- package/dist/plugins/server/index.js +5 -2
- package/dist/plugins/server/index.js.map +1 -1
- package/dist/plugins/server/remote-tunnel/remote-tunnel-manager.js +3 -3
- package/dist/plugins/server/remote-tunnel/remote-tunnel-manager.js.map +1 -1
- package/dist/plugins/server/static-server.js +3 -3
- package/dist/plugins/server/static-server.js.map +1 -1
- package/dist/plugins/server/utils.js +3 -3
- package/dist/plugins/server/utils.js.map +1 -1
- package/dist/plugins/server/vite-dev-server.js +4 -4
- package/dist/plugins/server/vite-dev-server.js.map +1 -1
- package/dist/plugins/serving/manifest.js +1 -0
- package/dist/plugins/serving/serving.js +6 -6
- package/dist/plugins/serving/serving.js.map +1 -1
- package/dist/schemas/manifest.d.ts +35 -1
- package/dist/schemas/manifest.d.ts.map +1 -1
- package/dist/schemas/manifest.js +112 -4
- package/dist/schemas/manifest.js.map +1 -1
- package/dist/shared/src/dev-obo.js +86 -0
- package/dist/shared/src/dev-obo.js.map +1 -0
- package/dist/shared/src/index.d.ts +1 -1
- package/dist/shared/src/plugin.d.ts +12 -1
- package/dist/shared/src/plugin.d.ts.map +1 -1
- package/dist/shared/src/schemas/manifest.d.ts +41 -33
- package/dist/shared/src/schemas/manifest.d.ts.map +1 -1
- package/dist/shared/src/schemas/manifest.js +43 -4
- package/dist/shared/src/schemas/manifest.js.map +1 -1
- package/dist/stream/stream-manager.d.ts.map +1 -1
- package/dist/stream/stream-manager.js +5 -2
- package/dist/stream/stream-manager.js.map +1 -1
- package/dist/telemetry/execution-span-processor.js +21 -0
- package/dist/telemetry/execution-span-processor.js.map +1 -0
- package/dist/telemetry/telemetry-manager.js +2 -1
- package/dist/telemetry/telemetry-manager.js.map +1 -1
- package/dist/testing/create-test-app.d.ts +2 -2
- package/dist/testing/create-test-app.js.map +1 -1
- package/dist/testing/test-plugin-context.d.ts +3 -12
- package/dist/testing/test-plugin-context.d.ts.map +1 -1
- package/dist/testing/test-plugin-context.js +24 -16
- package/dist/testing/test-plugin-context.js.map +1 -1
- package/dist/type-generator/database/generate.js +3 -3
- package/dist/type-generator/database/generate.js.map +1 -1
- package/dist/type-generator/migration.js +2 -2
- package/dist/type-generator/migration.js.map +1 -1
- package/dist/type-generator/serving/server-file-extractor.js +3 -3
- package/dist/type-generator/serving/server-file-extractor.js.map +1 -1
- package/dist/utils/is-plain-object.js +11 -0
- package/dist/utils/is-plain-object.js.map +1 -0
- package/docs/api/appkit/Class.AppKitError.md +2 -1
- package/docs/api/appkit/Class.AuthenticationError.md +1 -1
- package/docs/api/appkit/Class.ConfigurationError.md +1 -1
- package/docs/api/appkit/Class.ConnectionError.md +1 -1
- package/docs/api/appkit/Class.DatabaseValidationError.md +1 -1
- package/docs/api/appkit/Class.ExecutionError.md +1 -1
- package/docs/api/appkit/Class.IdentityExpiredError.md +190 -0
- package/docs/api/appkit/Class.InitializationError.md +1 -1
- package/docs/api/appkit/Class.Plugin.md +8 -12
- package/docs/api/appkit/Class.ServerError.md +1 -1
- package/docs/api/appkit/Class.ServiceContext.md +169 -0
- package/docs/api/appkit/Class.TunnelError.md +1 -1
- package/docs/api/appkit/Class.ValidationError.md +1 -1
- package/docs/api/appkit/Function.createApp.md +12 -12
- package/docs/api/appkit/Function.getCallerContext.md +12 -0
- package/docs/api/appkit/Function.getCurrentUserId.md +14 -0
- package/docs/api/appkit/Function.getExecutionContext.md +1 -1
- package/docs/api/appkit/Function.getUserContext.md +16 -0
- package/docs/api/appkit/Function.isInUserContext.md +12 -0
- package/docs/api/appkit/Function.isUserContext.md +20 -0
- package/docs/api/appkit/Function.runAgent.md +1 -1
- package/docs/api/appkit/Function.runInCallerContext.md +27 -0
- package/docs/api/appkit/Function.runInUserContext.md +29 -0
- package/docs/api/appkit/Interface.AgentDefinition.md +11 -0
- package/docs/api/appkit/Interface.AgentsPluginConfig.md +11 -0
- package/docs/api/appkit/Interface.CallerContext.md +13 -0
- package/docs/api/appkit/Interface.IndexConfig.md +1 -1
- package/docs/api/appkit/Interface.PluginManifest.md +9 -1
- package/docs/api/appkit/Interface.RegisteredAgent.md +11 -0
- package/docs/api/appkit/Interface.RunAgentInput.md +45 -1
- package/docs/api/appkit/TypeAlias.AgentAuth.md +8 -0
- package/docs/api/appkit/TypeAlias.AppKitApi.md +35 -0
- package/docs/api/appkit/TypeAlias.ExecutionContext.md +4 -1
- package/docs/api/appkit/TypeAlias.ExecutionResult.md +65 -0
- package/docs/api/appkit/TypeAlias.ScopedPluginMap.md +12 -0
- package/docs/api/appkit/TypeAlias.UserContext.md +109 -0
- package/docs/api/appkit/TypeAlias.UserScopedApp.md +39 -0
- package/docs/api/appkit.md +14 -0
- package/docs/plugins/agents.md +45 -0
- package/docs/plugins/execution-context.md +101 -50
- package/docs/plugins/lakebase.md +6 -82
- package/llms.txt +15 -1
- package/package.json +1 -1
- package/sbom.cdx.json +1 -1
|
@@ -13,8 +13,8 @@ declare const resourceFieldEntrySchema: z.ZodObject<{
|
|
|
13
13
|
type: z.ZodLiteral<"kind">;
|
|
14
14
|
resourceKind: z.ZodEnum<{
|
|
15
15
|
volume: "volume";
|
|
16
|
-
genie_space: "genie_space";
|
|
17
16
|
warehouse: "warehouse";
|
|
17
|
+
genie_space: "genie_space";
|
|
18
18
|
postgres_project: "postgres_project";
|
|
19
19
|
postgres_branch: "postgres_branch";
|
|
20
20
|
postgres_database: "postgres_database";
|
|
@@ -34,6 +34,14 @@ declare const resourceFieldEntrySchema: z.ZodObject<{
|
|
|
34
34
|
}, z.core.$strict>;
|
|
35
35
|
declare const pluginManifestSchema: z.ZodObject<{
|
|
36
36
|
scopes: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
37
|
+
sql: "sql";
|
|
38
|
+
"sql:restricted-query": "sql:restricted-query";
|
|
39
|
+
genie: "genie";
|
|
40
|
+
postgres: "postgres";
|
|
41
|
+
"model-serving": "model-serving";
|
|
42
|
+
files: "files";
|
|
43
|
+
"vector-search": "vector-search";
|
|
44
|
+
"catalog.connections": "catalog.connections";
|
|
37
45
|
"ai-gateway": "ai-gateway";
|
|
38
46
|
"mcp.external": "mcp.external";
|
|
39
47
|
"mcp.functions": "mcp.functions";
|
|
@@ -68,8 +76,8 @@ declare const pluginManifestSchema: z.ZodObject<{
|
|
|
68
76
|
type: z.ZodLiteral<"kind">;
|
|
69
77
|
resourceKind: z.ZodEnum<{
|
|
70
78
|
volume: "volume";
|
|
71
|
-
genie_space: "genie_space";
|
|
72
79
|
warehouse: "warehouse";
|
|
80
|
+
genie_space: "genie_space";
|
|
73
81
|
postgres_project: "postgres_project";
|
|
74
82
|
postgres_branch: "postgres_branch";
|
|
75
83
|
postgres_database: "postgres_database";
|
|
@@ -109,8 +117,8 @@ declare const pluginManifestSchema: z.ZodObject<{
|
|
|
109
117
|
type: z.ZodLiteral<"kind">;
|
|
110
118
|
resourceKind: z.ZodEnum<{
|
|
111
119
|
volume: "volume";
|
|
112
|
-
genie_space: "genie_space";
|
|
113
120
|
warehouse: "warehouse";
|
|
121
|
+
genie_space: "genie_space";
|
|
114
122
|
postgres_project: "postgres_project";
|
|
115
123
|
postgres_branch: "postgres_branch";
|
|
116
124
|
postgres_database: "postgres_database";
|
|
@@ -149,8 +157,8 @@ declare const pluginManifestSchema: z.ZodObject<{
|
|
|
149
157
|
type: z.ZodLiteral<"kind">;
|
|
150
158
|
resourceKind: z.ZodEnum<{
|
|
151
159
|
volume: "volume";
|
|
152
|
-
genie_space: "genie_space";
|
|
153
160
|
warehouse: "warehouse";
|
|
161
|
+
genie_space: "genie_space";
|
|
154
162
|
postgres_project: "postgres_project";
|
|
155
163
|
postgres_branch: "postgres_branch";
|
|
156
164
|
postgres_database: "postgres_database";
|
|
@@ -171,9 +179,9 @@ declare const pluginManifestSchema: z.ZodObject<{
|
|
|
171
179
|
type: z.ZodLiteral<"sql_warehouse">;
|
|
172
180
|
}, z.core.$strict>, z.ZodObject<{
|
|
173
181
|
permission: z.ZodEnum<{
|
|
182
|
+
CAN_QUERY: "CAN_QUERY";
|
|
174
183
|
CAN_VIEW: "CAN_VIEW";
|
|
175
184
|
CAN_MANAGE: "CAN_MANAGE";
|
|
176
|
-
CAN_QUERY: "CAN_QUERY";
|
|
177
185
|
}>;
|
|
178
186
|
alias: z.ZodString;
|
|
179
187
|
resourceKey: z.ZodString;
|
|
@@ -190,8 +198,8 @@ declare const pluginManifestSchema: z.ZodObject<{
|
|
|
190
198
|
type: z.ZodLiteral<"kind">;
|
|
191
199
|
resourceKind: z.ZodEnum<{
|
|
192
200
|
volume: "volume";
|
|
193
|
-
genie_space: "genie_space";
|
|
194
201
|
warehouse: "warehouse";
|
|
202
|
+
genie_space: "genie_space";
|
|
195
203
|
postgres_project: "postgres_project";
|
|
196
204
|
postgres_branch: "postgres_branch";
|
|
197
205
|
postgres_database: "postgres_database";
|
|
@@ -230,8 +238,8 @@ declare const pluginManifestSchema: z.ZodObject<{
|
|
|
230
238
|
type: z.ZodLiteral<"kind">;
|
|
231
239
|
resourceKind: z.ZodEnum<{
|
|
232
240
|
volume: "volume";
|
|
233
|
-
genie_space: "genie_space";
|
|
234
241
|
warehouse: "warehouse";
|
|
242
|
+
genie_space: "genie_space";
|
|
235
243
|
postgres_project: "postgres_project";
|
|
236
244
|
postgres_branch: "postgres_branch";
|
|
237
245
|
postgres_database: "postgres_database";
|
|
@@ -269,8 +277,8 @@ declare const pluginManifestSchema: z.ZodObject<{
|
|
|
269
277
|
type: z.ZodLiteral<"kind">;
|
|
270
278
|
resourceKind: z.ZodEnum<{
|
|
271
279
|
volume: "volume";
|
|
272
|
-
genie_space: "genie_space";
|
|
273
280
|
warehouse: "warehouse";
|
|
281
|
+
genie_space: "genie_space";
|
|
274
282
|
postgres_project: "postgres_project";
|
|
275
283
|
postgres_branch: "postgres_branch";
|
|
276
284
|
postgres_database: "postgres_database";
|
|
@@ -308,8 +316,8 @@ declare const pluginManifestSchema: z.ZodObject<{
|
|
|
308
316
|
type: z.ZodLiteral<"kind">;
|
|
309
317
|
resourceKind: z.ZodEnum<{
|
|
310
318
|
volume: "volume";
|
|
311
|
-
genie_space: "genie_space";
|
|
312
319
|
warehouse: "warehouse";
|
|
320
|
+
genie_space: "genie_space";
|
|
313
321
|
postgres_project: "postgres_project";
|
|
314
322
|
postgres_branch: "postgres_branch";
|
|
315
323
|
postgres_database: "postgres_database";
|
|
@@ -347,8 +355,8 @@ declare const pluginManifestSchema: z.ZodObject<{
|
|
|
347
355
|
type: z.ZodLiteral<"kind">;
|
|
348
356
|
resourceKind: z.ZodEnum<{
|
|
349
357
|
volume: "volume";
|
|
350
|
-
genie_space: "genie_space";
|
|
351
358
|
warehouse: "warehouse";
|
|
359
|
+
genie_space: "genie_space";
|
|
352
360
|
postgres_project: "postgres_project";
|
|
353
361
|
postgres_branch: "postgres_branch";
|
|
354
362
|
postgres_database: "postgres_database";
|
|
@@ -386,8 +394,8 @@ declare const pluginManifestSchema: z.ZodObject<{
|
|
|
386
394
|
type: z.ZodLiteral<"kind">;
|
|
387
395
|
resourceKind: z.ZodEnum<{
|
|
388
396
|
volume: "volume";
|
|
389
|
-
genie_space: "genie_space";
|
|
390
397
|
warehouse: "warehouse";
|
|
398
|
+
genie_space: "genie_space";
|
|
391
399
|
postgres_project: "postgres_project";
|
|
392
400
|
postgres_branch: "postgres_branch";
|
|
393
401
|
postgres_database: "postgres_database";
|
|
@@ -425,8 +433,8 @@ declare const pluginManifestSchema: z.ZodObject<{
|
|
|
425
433
|
type: z.ZodLiteral<"kind">;
|
|
426
434
|
resourceKind: z.ZodEnum<{
|
|
427
435
|
volume: "volume";
|
|
428
|
-
genie_space: "genie_space";
|
|
429
436
|
warehouse: "warehouse";
|
|
437
|
+
genie_space: "genie_space";
|
|
430
438
|
postgres_project: "postgres_project";
|
|
431
439
|
postgres_branch: "postgres_branch";
|
|
432
440
|
postgres_database: "postgres_database";
|
|
@@ -447,10 +455,10 @@ declare const pluginManifestSchema: z.ZodObject<{
|
|
|
447
455
|
type: z.ZodLiteral<"postgres">;
|
|
448
456
|
}, z.core.$strict>, z.ZodObject<{
|
|
449
457
|
permission: z.ZodEnum<{
|
|
458
|
+
CAN_EDIT: "CAN_EDIT";
|
|
450
459
|
CAN_VIEW: "CAN_VIEW";
|
|
451
460
|
CAN_MANAGE: "CAN_MANAGE";
|
|
452
461
|
CAN_RUN: "CAN_RUN";
|
|
453
|
-
CAN_EDIT: "CAN_EDIT";
|
|
454
462
|
}>;
|
|
455
463
|
alias: z.ZodString;
|
|
456
464
|
resourceKey: z.ZodString;
|
|
@@ -467,8 +475,8 @@ declare const pluginManifestSchema: z.ZodObject<{
|
|
|
467
475
|
type: z.ZodLiteral<"kind">;
|
|
468
476
|
resourceKind: z.ZodEnum<{
|
|
469
477
|
volume: "volume";
|
|
470
|
-
genie_space: "genie_space";
|
|
471
478
|
warehouse: "warehouse";
|
|
479
|
+
genie_space: "genie_space";
|
|
472
480
|
postgres_project: "postgres_project";
|
|
473
481
|
postgres_branch: "postgres_branch";
|
|
474
482
|
postgres_database: "postgres_database";
|
|
@@ -489,8 +497,8 @@ declare const pluginManifestSchema: z.ZodObject<{
|
|
|
489
497
|
type: z.ZodLiteral<"genie_space">;
|
|
490
498
|
}, z.core.$strict>, z.ZodObject<{
|
|
491
499
|
permission: z.ZodEnum<{
|
|
492
|
-
CAN_MANAGE: "CAN_MANAGE";
|
|
493
500
|
CAN_EDIT: "CAN_EDIT";
|
|
501
|
+
CAN_MANAGE: "CAN_MANAGE";
|
|
494
502
|
CAN_READ: "CAN_READ";
|
|
495
503
|
}>;
|
|
496
504
|
alias: z.ZodString;
|
|
@@ -508,8 +516,8 @@ declare const pluginManifestSchema: z.ZodObject<{
|
|
|
508
516
|
type: z.ZodLiteral<"kind">;
|
|
509
517
|
resourceKind: z.ZodEnum<{
|
|
510
518
|
volume: "volume";
|
|
511
|
-
genie_space: "genie_space";
|
|
512
519
|
warehouse: "warehouse";
|
|
520
|
+
genie_space: "genie_space";
|
|
513
521
|
postgres_project: "postgres_project";
|
|
514
522
|
postgres_branch: "postgres_branch";
|
|
515
523
|
postgres_database: "postgres_database";
|
|
@@ -547,8 +555,8 @@ declare const pluginManifestSchema: z.ZodObject<{
|
|
|
547
555
|
type: z.ZodLiteral<"kind">;
|
|
548
556
|
resourceKind: z.ZodEnum<{
|
|
549
557
|
volume: "volume";
|
|
550
|
-
genie_space: "genie_space";
|
|
551
558
|
warehouse: "warehouse";
|
|
559
|
+
genie_space: "genie_space";
|
|
552
560
|
postgres_project: "postgres_project";
|
|
553
561
|
postgres_branch: "postgres_branch";
|
|
554
562
|
postgres_database: "postgres_database";
|
|
@@ -589,8 +597,8 @@ declare const pluginManifestSchema: z.ZodObject<{
|
|
|
589
597
|
type: z.ZodLiteral<"kind">;
|
|
590
598
|
resourceKind: z.ZodEnum<{
|
|
591
599
|
volume: "volume";
|
|
592
|
-
genie_space: "genie_space";
|
|
593
600
|
warehouse: "warehouse";
|
|
601
|
+
genie_space: "genie_space";
|
|
594
602
|
postgres_project: "postgres_project";
|
|
595
603
|
postgres_branch: "postgres_branch";
|
|
596
604
|
postgres_database: "postgres_database";
|
|
@@ -630,8 +638,8 @@ declare const pluginManifestSchema: z.ZodObject<{
|
|
|
630
638
|
type: z.ZodLiteral<"kind">;
|
|
631
639
|
resourceKind: z.ZodEnum<{
|
|
632
640
|
volume: "volume";
|
|
633
|
-
genie_space: "genie_space";
|
|
634
641
|
warehouse: "warehouse";
|
|
642
|
+
genie_space: "genie_space";
|
|
635
643
|
postgres_project: "postgres_project";
|
|
636
644
|
postgres_branch: "postgres_branch";
|
|
637
645
|
postgres_database: "postgres_database";
|
|
@@ -670,8 +678,8 @@ declare const pluginManifestSchema: z.ZodObject<{
|
|
|
670
678
|
type: z.ZodLiteral<"kind">;
|
|
671
679
|
resourceKind: z.ZodEnum<{
|
|
672
680
|
volume: "volume";
|
|
673
|
-
genie_space: "genie_space";
|
|
674
681
|
warehouse: "warehouse";
|
|
682
|
+
genie_space: "genie_space";
|
|
675
683
|
postgres_project: "postgres_project";
|
|
676
684
|
postgres_branch: "postgres_branch";
|
|
677
685
|
postgres_database: "postgres_database";
|
|
@@ -692,9 +700,9 @@ declare const pluginManifestSchema: z.ZodObject<{
|
|
|
692
700
|
type: z.ZodLiteral<"sql_warehouse">;
|
|
693
701
|
}, z.core.$strict>, z.ZodObject<{
|
|
694
702
|
permission: z.ZodEnum<{
|
|
703
|
+
CAN_QUERY: "CAN_QUERY";
|
|
695
704
|
CAN_VIEW: "CAN_VIEW";
|
|
696
705
|
CAN_MANAGE: "CAN_MANAGE";
|
|
697
|
-
CAN_QUERY: "CAN_QUERY";
|
|
698
706
|
}>;
|
|
699
707
|
alias: z.ZodString;
|
|
700
708
|
resourceKey: z.ZodString;
|
|
@@ -711,8 +719,8 @@ declare const pluginManifestSchema: z.ZodObject<{
|
|
|
711
719
|
type: z.ZodLiteral<"kind">;
|
|
712
720
|
resourceKind: z.ZodEnum<{
|
|
713
721
|
volume: "volume";
|
|
714
|
-
genie_space: "genie_space";
|
|
715
722
|
warehouse: "warehouse";
|
|
723
|
+
genie_space: "genie_space";
|
|
716
724
|
postgres_project: "postgres_project";
|
|
717
725
|
postgres_branch: "postgres_branch";
|
|
718
726
|
postgres_database: "postgres_database";
|
|
@@ -751,8 +759,8 @@ declare const pluginManifestSchema: z.ZodObject<{
|
|
|
751
759
|
type: z.ZodLiteral<"kind">;
|
|
752
760
|
resourceKind: z.ZodEnum<{
|
|
753
761
|
volume: "volume";
|
|
754
|
-
genie_space: "genie_space";
|
|
755
762
|
warehouse: "warehouse";
|
|
763
|
+
genie_space: "genie_space";
|
|
756
764
|
postgres_project: "postgres_project";
|
|
757
765
|
postgres_branch: "postgres_branch";
|
|
758
766
|
postgres_database: "postgres_database";
|
|
@@ -790,8 +798,8 @@ declare const pluginManifestSchema: z.ZodObject<{
|
|
|
790
798
|
type: z.ZodLiteral<"kind">;
|
|
791
799
|
resourceKind: z.ZodEnum<{
|
|
792
800
|
volume: "volume";
|
|
793
|
-
genie_space: "genie_space";
|
|
794
801
|
warehouse: "warehouse";
|
|
802
|
+
genie_space: "genie_space";
|
|
795
803
|
postgres_project: "postgres_project";
|
|
796
804
|
postgres_branch: "postgres_branch";
|
|
797
805
|
postgres_database: "postgres_database";
|
|
@@ -829,8 +837,8 @@ declare const pluginManifestSchema: z.ZodObject<{
|
|
|
829
837
|
type: z.ZodLiteral<"kind">;
|
|
830
838
|
resourceKind: z.ZodEnum<{
|
|
831
839
|
volume: "volume";
|
|
832
|
-
genie_space: "genie_space";
|
|
833
840
|
warehouse: "warehouse";
|
|
841
|
+
genie_space: "genie_space";
|
|
834
842
|
postgres_project: "postgres_project";
|
|
835
843
|
postgres_branch: "postgres_branch";
|
|
836
844
|
postgres_database: "postgres_database";
|
|
@@ -868,8 +876,8 @@ declare const pluginManifestSchema: z.ZodObject<{
|
|
|
868
876
|
type: z.ZodLiteral<"kind">;
|
|
869
877
|
resourceKind: z.ZodEnum<{
|
|
870
878
|
volume: "volume";
|
|
871
|
-
genie_space: "genie_space";
|
|
872
879
|
warehouse: "warehouse";
|
|
880
|
+
genie_space: "genie_space";
|
|
873
881
|
postgres_project: "postgres_project";
|
|
874
882
|
postgres_branch: "postgres_branch";
|
|
875
883
|
postgres_database: "postgres_database";
|
|
@@ -907,8 +915,8 @@ declare const pluginManifestSchema: z.ZodObject<{
|
|
|
907
915
|
type: z.ZodLiteral<"kind">;
|
|
908
916
|
resourceKind: z.ZodEnum<{
|
|
909
917
|
volume: "volume";
|
|
910
|
-
genie_space: "genie_space";
|
|
911
918
|
warehouse: "warehouse";
|
|
919
|
+
genie_space: "genie_space";
|
|
912
920
|
postgres_project: "postgres_project";
|
|
913
921
|
postgres_branch: "postgres_branch";
|
|
914
922
|
postgres_database: "postgres_database";
|
|
@@ -946,8 +954,8 @@ declare const pluginManifestSchema: z.ZodObject<{
|
|
|
946
954
|
type: z.ZodLiteral<"kind">;
|
|
947
955
|
resourceKind: z.ZodEnum<{
|
|
948
956
|
volume: "volume";
|
|
949
|
-
genie_space: "genie_space";
|
|
950
957
|
warehouse: "warehouse";
|
|
958
|
+
genie_space: "genie_space";
|
|
951
959
|
postgres_project: "postgres_project";
|
|
952
960
|
postgres_branch: "postgres_branch";
|
|
953
961
|
postgres_database: "postgres_database";
|
|
@@ -968,10 +976,10 @@ declare const pluginManifestSchema: z.ZodObject<{
|
|
|
968
976
|
type: z.ZodLiteral<"postgres">;
|
|
969
977
|
}, z.core.$strict>, z.ZodObject<{
|
|
970
978
|
permission: z.ZodEnum<{
|
|
979
|
+
CAN_EDIT: "CAN_EDIT";
|
|
971
980
|
CAN_VIEW: "CAN_VIEW";
|
|
972
981
|
CAN_MANAGE: "CAN_MANAGE";
|
|
973
982
|
CAN_RUN: "CAN_RUN";
|
|
974
|
-
CAN_EDIT: "CAN_EDIT";
|
|
975
983
|
}>;
|
|
976
984
|
alias: z.ZodString;
|
|
977
985
|
resourceKey: z.ZodString;
|
|
@@ -988,8 +996,8 @@ declare const pluginManifestSchema: z.ZodObject<{
|
|
|
988
996
|
type: z.ZodLiteral<"kind">;
|
|
989
997
|
resourceKind: z.ZodEnum<{
|
|
990
998
|
volume: "volume";
|
|
991
|
-
genie_space: "genie_space";
|
|
992
999
|
warehouse: "warehouse";
|
|
1000
|
+
genie_space: "genie_space";
|
|
993
1001
|
postgres_project: "postgres_project";
|
|
994
1002
|
postgres_branch: "postgres_branch";
|
|
995
1003
|
postgres_database: "postgres_database";
|
|
@@ -1010,8 +1018,8 @@ declare const pluginManifestSchema: z.ZodObject<{
|
|
|
1010
1018
|
type: z.ZodLiteral<"genie_space">;
|
|
1011
1019
|
}, z.core.$strict>, z.ZodObject<{
|
|
1012
1020
|
permission: z.ZodEnum<{
|
|
1013
|
-
CAN_MANAGE: "CAN_MANAGE";
|
|
1014
1021
|
CAN_EDIT: "CAN_EDIT";
|
|
1022
|
+
CAN_MANAGE: "CAN_MANAGE";
|
|
1015
1023
|
CAN_READ: "CAN_READ";
|
|
1016
1024
|
}>;
|
|
1017
1025
|
alias: z.ZodString;
|
|
@@ -1029,8 +1037,8 @@ declare const pluginManifestSchema: z.ZodObject<{
|
|
|
1029
1037
|
type: z.ZodLiteral<"kind">;
|
|
1030
1038
|
resourceKind: z.ZodEnum<{
|
|
1031
1039
|
volume: "volume";
|
|
1032
|
-
genie_space: "genie_space";
|
|
1033
1040
|
warehouse: "warehouse";
|
|
1041
|
+
genie_space: "genie_space";
|
|
1034
1042
|
postgres_project: "postgres_project";
|
|
1035
1043
|
postgres_branch: "postgres_branch";
|
|
1036
1044
|
postgres_database: "postgres_database";
|
|
@@ -1068,8 +1076,8 @@ declare const pluginManifestSchema: z.ZodObject<{
|
|
|
1068
1076
|
type: z.ZodLiteral<"kind">;
|
|
1069
1077
|
resourceKind: z.ZodEnum<{
|
|
1070
1078
|
volume: "volume";
|
|
1071
|
-
genie_space: "genie_space";
|
|
1072
1079
|
warehouse: "warehouse";
|
|
1080
|
+
genie_space: "genie_space";
|
|
1073
1081
|
postgres_project: "postgres_project";
|
|
1074
1082
|
postgres_branch: "postgres_branch";
|
|
1075
1083
|
postgres_database: "postgres_database";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"manifest.d.ts","names":[],"sources":["../../../../../shared/src/schemas/manifest.ts"],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"manifest.d.ts","names":[],"sources":["../../../../../shared/src/schemas/manifest.ts"],"mappings":";;;cAwea,wBAAA,EAAwB,CAAA,CAAA,SAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAsUxB,oBAAA,EAAoB,CAAA,CAAA,SAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAikBrB,kBAAA,GAAqB,CAAA,CAAE,KAAA,QAAa,wBAAA;AAAA,KAOpC,cAAA,GAAiB,CAAA,CAAE,KAAA,QAAa,oBAAA"}
|
|
@@ -46,6 +46,20 @@ const resourceTypeSchema = z.enum([
|
|
|
46
46
|
"experiment",
|
|
47
47
|
"app"
|
|
48
48
|
]).describe("Type of Databricks resource");
|
|
49
|
+
/** Apps user_api_scopes for resource types with confirmed OBO support. */
|
|
50
|
+
const SCOPE_BY_TYPE = {
|
|
51
|
+
sql_warehouse: "sql",
|
|
52
|
+
serving_endpoint: "model-serving",
|
|
53
|
+
genie_space: "genie",
|
|
54
|
+
volume: "files",
|
|
55
|
+
vector_search_index: "vector-search",
|
|
56
|
+
uc_connection: "catalog.connections"
|
|
57
|
+
};
|
|
58
|
+
const APP_ONLY_RESOURCE_TYPES = new Set([
|
|
59
|
+
"secret",
|
|
60
|
+
"database",
|
|
61
|
+
"postgres"
|
|
62
|
+
]);
|
|
49
63
|
/** Capabilities that need a user_api_scope but have no resource ID. */
|
|
50
64
|
const capabilityScopeSchema = z.enum([
|
|
51
65
|
"ai-gateway",
|
|
@@ -56,6 +70,23 @@ const capabilityScopeSchema = z.enum([
|
|
|
56
70
|
"catalog.schemas:read",
|
|
57
71
|
"catalog.tables:read"
|
|
58
72
|
]);
|
|
73
|
+
/**
|
|
74
|
+
* Every Apps user_api_scope (short names; the long forms such as
|
|
75
|
+
* `dashboards.genie` are deprecated aliases). A plugin declares one in its
|
|
76
|
+
* `scopes` when it always calls on behalf of the user, or when the capability
|
|
77
|
+
* has no resource ID.
|
|
78
|
+
*/
|
|
79
|
+
const userApiScopeSchema = z.enum([
|
|
80
|
+
"sql",
|
|
81
|
+
"sql:restricted-query",
|
|
82
|
+
"genie",
|
|
83
|
+
"postgres",
|
|
84
|
+
"model-serving",
|
|
85
|
+
"files",
|
|
86
|
+
"vector-search",
|
|
87
|
+
"catalog.connections",
|
|
88
|
+
...capabilityScopeSchema.options
|
|
89
|
+
]);
|
|
59
90
|
const secretPermissionSchema = z.enum([
|
|
60
91
|
"READ",
|
|
61
92
|
"WRITE",
|
|
@@ -329,7 +360,7 @@ const pluginScaffoldingRulesSchema = z.object({
|
|
|
329
360
|
}
|
|
330
361
|
}).describe("Structured rules for scaffolding agents declared at the plugin level. Each rule is a short directive (≤120 chars).");
|
|
331
362
|
const pluginManifestSchema = z.object({
|
|
332
|
-
scopes: z.array(
|
|
363
|
+
scopes: z.array(userApiScopeSchema).optional().describe("user_api_scopes the plugin always needs, whatever its resources are bound as: calls it makes on behalf of the user unconditionally, or capabilities with no resource ID."),
|
|
333
364
|
$schema: z.string().optional().describe("Reference to the JSON Schema for validation"),
|
|
334
365
|
name: z.string().regex(PLUGIN_NAME_PATTERN).describe("Plugin identifier and JS binding. Must start with a lowercase letter; camelCase for multi-word names (e.g. aiSearch)."),
|
|
335
366
|
displayName: z.string().min(1).describe("Human-readable display name for UI and CLI"),
|
|
@@ -392,7 +423,14 @@ const templateResourceRequirementBaseShape = {
|
|
|
392
423
|
alias: z.string().min(1).describe("Human-readable label for UI/display only."),
|
|
393
424
|
resourceKey: z.string().regex(/^[a-z][a-z0-9-]*$/).describe("Stable key for machine use: deduplication, env naming, composite keys."),
|
|
394
425
|
description: z.string().min(1).describe("Human-readable description of why this resource is needed"),
|
|
395
|
-
fields: z.record(z.string(), templateFieldEntrySchema).refine((obj) => Object.keys(obj).length >= 1, { message: "fields must contain at least one entry" }).optional().describe("Map of field name to field entry with computed origin.")
|
|
426
|
+
fields: z.record(z.string(), templateFieldEntrySchema).refine((obj) => Object.keys(obj).length >= 1, { message: "fields must contain at least one entry" }).optional().describe("Map of field name to field entry with computed origin."),
|
|
427
|
+
scope: z.string().min(1).optional().describe("Apps user_api_scope for this resource type. Present only when the type can run on behalf of the user. Resolved by sync from SCOPE_BY_TYPE."),
|
|
428
|
+
appOnly: z.literal(true).optional().describe("Present only when the type always runs as the app service principal and must be bound (secret, database, postgres). Resolved by sync from APP_ONLY_RESOURCE_TYPES."),
|
|
429
|
+
binding: z.object({
|
|
430
|
+
yamlKey: z.string().min(1).describe("DABs YAML key under the resource entry."),
|
|
431
|
+
varFields: z.array(z.tuple([z.string(), z.string()])).describe("[manifestField, dabsField] pairs. Each becomes ${var.<resourceKey>_<manifestField>} written to dabsField."),
|
|
432
|
+
staticFields: z.array(z.tuple([z.string(), z.string()])).optional().describe("[dabsField, value] constant pairs.")
|
|
433
|
+
}).strict().optional().describe("How this resource type binds in databricks.yml as a DABs app resource. Resolved by sync from DABS_BINDING_BY_TYPE.")
|
|
396
434
|
};
|
|
397
435
|
function makeTemplateResourceVariant(typeLiteral, permission) {
|
|
398
436
|
return z.object({
|
|
@@ -429,7 +467,8 @@ const templatePluginSchema = z.object({
|
|
|
429
467
|
resources: z.object({
|
|
430
468
|
required: z.array(templateResourceRequirementSchema).describe("Resources that must be available for the plugin to function"),
|
|
431
469
|
optional: z.array(templateResourceRequirementSchema).describe("Resources that enhance functionality but are not mandatory")
|
|
432
|
-
}).strict().describe("Databricks resource requirements for this plugin")
|
|
470
|
+
}).strict().describe("Databricks resource requirements for this plugin"),
|
|
471
|
+
scopes: z.array(userApiScopeSchema).min(1).optional().describe("user_api_scopes the plugin always needs, copied from the plugin manifest. Omitted when empty.")
|
|
433
472
|
}).strict().describe("Plugin manifest with package source information");
|
|
434
473
|
const scaffoldingFlagSchema = z.object({
|
|
435
474
|
description: z.string().describe("Human-readable description of the flag."),
|
|
@@ -472,5 +511,5 @@ const templatePluginsManifestSchema = z.object({
|
|
|
472
511
|
}).describe("Aggregated plugin manifest for AppKit templates. Read by Databricks CLI during init to discover available plugins and their resource requirements.");
|
|
473
512
|
|
|
474
513
|
//#endregion
|
|
475
|
-
export { pluginManifestSchema };
|
|
514
|
+
export { APP_ONLY_RESOURCE_TYPES, SCOPE_BY_TYPE, pluginManifestSchema };
|
|
476
515
|
//# sourceMappingURL=manifest.js.map
|