@databricks/appkit 0.67.0 → 0.68.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 +2 -2
- package/dist/appkit/package.js +1 -1
- package/dist/database/contract/index.js +1 -1
- package/dist/database/contract/wire.d.ts.map +1 -1
- package/dist/database/contract/wire.js +5 -1
- package/dist/database/contract/wire.js.map +1 -1
- package/dist/database/errors.js +39 -3
- package/dist/database/errors.js.map +1 -1
- package/dist/database/runtime/data-path.js.map +1 -1
- package/dist/database/runtime/engine/drizzle-data-path.js +1 -1
- package/dist/database/runtime/engine/drizzle-data-path.js.map +1 -1
- package/dist/database/runtime/engine/translate.js +9 -2
- package/dist/database/runtime/engine/translate.js.map +1 -1
- package/dist/database/schema-builder/define-schema.d.ts +5 -1
- package/dist/database/schema-builder/define-schema.d.ts.map +1 -1
- package/dist/database/schema-builder/define-schema.js +4 -0
- package/dist/database/schema-builder/define-schema.js.map +1 -1
- package/dist/database/schema-builder/types.d.ts +7 -2
- package/dist/database/schema-builder/types.d.ts.map +1 -1
- package/dist/database/schema-builder/types.js.map +1 -1
- package/dist/plugins/database/crud/codecs.js +78 -0
- package/dist/plugins/database/crud/codecs.js.map +1 -0
- package/dist/plugins/database/crud/contract.js +151 -0
- package/dist/plugins/database/crud/contract.js.map +1 -0
- package/dist/plugins/database/crud/exposure.js +40 -0
- package/dist/plugins/database/crud/exposure.js.map +1 -0
- package/dist/plugins/database/crud/query.js +244 -0
- package/dist/plugins/database/crud/query.js.map +1 -0
- package/dist/plugins/database/crud/routes.js +124 -0
- package/dist/plugins/database/crud/routes.js.map +1 -0
- package/dist/plugins/database/database.d.ts +6 -0
- package/dist/plugins/database/database.d.ts.map +1 -1
- package/dist/plugins/database/database.js +58 -4
- package/dist/plugins/database/database.js.map +1 -1
- package/dist/plugins/database/defaults.js +28 -1
- package/dist/plugins/database/defaults.js.map +1 -1
- package/dist/plugins/database/entity-client.js +1 -1
- package/dist/plugins/database/entity-types.d.ts +13 -4
- package/dist/plugins/database/entity-types.d.ts.map +1 -1
- package/dist/plugins/database/lifecycle.js +2 -1
- package/dist/plugins/database/lifecycle.js.map +1 -1
- package/dist/plugins/database/types.d.ts +32 -0
- package/dist/plugins/database/types.d.ts.map +1 -1
- package/dist/plugins/server/index.js +2 -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/shared/src/schemas/manifest.d.ts +33 -33
- 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/docs/api/appkit/Function.database.md +3 -3
- package/docs/api/appkit/Function.defineSchema.md +14 -6
- package/docs/api/appkit/Interface.Schema.md +10 -2
- package/docs/api/appkit/TypeAlias.IDatabaseConfig.md +20 -0
- package/docs/api/appkit.md +2 -2
- package/llms.txt +2 -2
- package/package.json +1 -1
- package/sbom.cdx.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server-file-extractor.js","names":[
|
|
1
|
+
{"version":3,"file":"server-file-extractor.js","names":[],"sources":["../../../src/type-generator/serving/server-file-extractor.ts"],"sourcesContent":["import fs from \"node:fs\";\nimport path from \"node:path\";\n\nimport { Lang, parse, type SgNode } from \"@ast-grep/napi\";\n\nimport { createLogger } from \"../../logging/logger\";\nimport type { EndpointConfig } from \"../../plugins/serving/types\";\n\nconst logger = createLogger(\"type-generator:serving:extractor\");\n\n/**\n * Candidate paths for the server entry file, relative to the project root.\n * Checked in order; the first that exists is used.\n * Same convention as plugin sync (sync.ts SERVER_FILE_CANDIDATES).\n */\nconst SERVER_FILE_CANDIDATES = [\"server/index.ts\", \"server/server.ts\"];\n\n/**\n * Find the server entry file by checking candidate paths in order.\n *\n * @param basePath - Project root directory to search from\n * @returns Absolute path to the server file, or null if none found\n */\nexport function findServerFile(basePath: string): string | null {\n for (const candidate of SERVER_FILE_CANDIDATES) {\n const fullPath = path.join(basePath, candidate);\n if (fs.existsSync(fullPath)) {\n return fullPath;\n }\n }\n return null;\n}\n\n/**\n * Extract serving endpoint config from a server file by AST-parsing it.\n * Looks for `serving({ endpoints: { alias: { env: \"...\" }, ... } })` calls\n * and extracts the endpoint alias names and their environment variable mappings.\n *\n * @param serverFilePath - Absolute path to the server entry file\n * @returns Extracted endpoint config, or null if not found or not extractable\n */\nexport function extractServingEndpoints(\n serverFilePath: string,\n): Record<string, EndpointConfig> | null {\n let content: string;\n try {\n content = fs.readFileSync(serverFilePath, \"utf-8\");\n } catch {\n logger.debug(\"Could not read server file: %s\", serverFilePath);\n return null;\n }\n\n const lang = serverFilePath.endsWith(\".tsx\") ? Lang.Tsx : Lang.TypeScript;\n const ast = parse(lang, content);\n const root = ast.root();\n\n // Find serving(...) call expressions\n const servingCall = findServingCall(root);\n if (!servingCall) {\n logger.debug(\"No serving() call found in %s\", serverFilePath);\n return null;\n }\n\n // Get the first argument (the config object)\n const args = servingCall.field(\"arguments\");\n if (!args) {\n return null;\n }\n\n const configArg = args.children().find((child) => child.kind() === \"object\");\n if (!configArg) {\n // serving() called with no args or non-object arg\n return null;\n }\n\n // Find the \"endpoints\" property in the config object\n const endpointsPair = findProperty(configArg, \"endpoints\");\n if (!endpointsPair) {\n // Config object has no \"endpoints\" property (e.g. serving({ timeout: 5000 }))\n return null;\n }\n\n // Get the value of the endpoints property\n const endpointsValue = getPropertyValue(endpointsPair);\n if (!endpointsValue || endpointsValue.kind() !== \"object\") {\n // endpoints is a variable reference, not an inline object\n logger.debug(\n \"serving() endpoints is not an inline object literal in %s. \" +\n \"Pass endpoints explicitly via appKitServingTypesPlugin({ endpoints }) in vite.config.ts.\",\n serverFilePath,\n );\n return null;\n }\n\n // Extract each endpoint entry\n const endpoints: Record<string, EndpointConfig> = {};\n const pairs = endpointsValue\n .children()\n .filter((child) => child.kind() === \"pair\");\n\n for (const pair of pairs) {\n const entry = extractEndpointEntry(pair);\n if (entry) {\n endpoints[entry.alias] = entry.config;\n }\n }\n\n if (Object.keys(endpoints).length === 0) {\n return null;\n }\n\n logger.debug(\n \"Extracted %d endpoint(s) from %s: %s\",\n Object.keys(endpoints).length,\n serverFilePath,\n Object.keys(endpoints).join(\", \"),\n );\n\n return endpoints;\n}\n\n/**\n * Find the serving() call expression in the AST.\n * Looks for call expressions where the callee identifier is \"serving\".\n */\nfunction findServingCall(root: SgNode): SgNode | null {\n const callExpressions = root.findAll({\n rule: { kind: \"call_expression\" },\n });\n\n for (const call of callExpressions) {\n const callee = call.children()[0];\n if (callee?.kind() === \"identifier\" && callee.text() === \"serving\") {\n return call;\n }\n }\n\n return null;\n}\n\n/**\n * Find a property (pair node) with the given key name in an object expression.\n */\nfunction findProperty(objectNode: SgNode, propertyName: string): SgNode | null {\n const pairs = objectNode\n .children()\n .filter((child) => child.kind() === \"pair\");\n\n for (const pair of pairs) {\n const key = pair.children()[0];\n if (!key) continue;\n\n const keyText =\n key.kind() === \"property_identifier\"\n ? key.text()\n : key.kind() === \"string\"\n ? key.text().replace(/^['\"]|['\"]$/g, \"\")\n : null;\n\n if (keyText === propertyName) {\n return pair;\n }\n }\n\n return null;\n}\n\n/**\n * Get the value node from a pair (property: value).\n * The value is typically the last meaningful child after the colon.\n */\nfunction getPropertyValue(pairNode: SgNode): SgNode | null {\n const children = pairNode.children();\n // pair children: [key, \":\", value]\n return children.length >= 3 ? children[children.length - 1] : null;\n}\n\n/**\n * Extract a single endpoint entry from a pair node like:\n * `demo: { env: \"DATABRICKS_SERVING_ENDPOINT_NAME\", servedModel: \"my-model\" }`\n */\nfunction extractEndpointEntry(\n pair: SgNode,\n): { alias: string; config: EndpointConfig } | null {\n const children = pair.children();\n if (children.length < 3) return null;\n\n // Get alias name (the key)\n const keyNode = children[0];\n const alias =\n keyNode.kind() === \"property_identifier\"\n ? keyNode.text()\n : keyNode.kind() === \"string\"\n ? keyNode.text().replace(/^['\"]|['\"]$/g, \"\")\n : null;\n\n if (!alias) return null;\n\n // Get the value (should be an object like { env: \"...\" })\n const valueNode = children[children.length - 1];\n if (valueNode.kind() !== \"object\") return null;\n\n // Extract env field\n const envPair = findProperty(valueNode, \"env\");\n if (!envPair) return null;\n\n const envValue = getPropertyValue(envPair);\n if (!envValue || envValue.kind() !== \"string\") return null;\n\n const env = envValue.text().replace(/^['\"]|['\"]$/g, \"\");\n\n // Extract optional servedModel field\n const config: EndpointConfig = { env };\n const servedModelPair = findProperty(valueNode, \"servedModel\");\n if (servedModelPair) {\n const servedModelValue = getPropertyValue(servedModelPair);\n if (servedModelValue?.kind() === \"string\") {\n config.servedModel = servedModelValue.text().replace(/^['\"]|['\"]$/g, \"\");\n }\n }\n\n return { alias, config };\n}\n"],"mappings":";;;;;;AAQA,MAAM,SAAS,aAAa,mCAAmC;;;;;;AAO/D,MAAM,yBAAyB,CAAC,mBAAmB,mBAAmB;;;;;;;AAQtE,SAAgB,eAAe,UAAiC;AAC9D,MAAK,MAAM,aAAa,wBAAwB;EAC9C,MAAM,WAAW,KAAK,KAAK,UAAU,UAAU;AAC/C,MAAI,GAAG,WAAW,SAAS,CACzB,QAAO;;AAGX,QAAO;;;;;;;;;;AAWT,SAAgB,wBACd,gBACuC;CACvC,IAAI;AACJ,KAAI;AACF,YAAU,GAAG,aAAa,gBAAgB,QAAQ;SAC5C;AACN,SAAO,MAAM,kCAAkC,eAAe;AAC9D,SAAO;;CAQT,MAAM,cAAc,gBAJR,MADC,eAAe,SAAS,OAAO,GA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typed database plugin registration for a finalized schema.
|
|
|
13
13
|
|
|
14
14
|
## Type Parameters[](#type-parameters "Direct link to Type Parameters")
|
|
15
15
|
|
|
16
|
-
| Type Parameter
|
|
17
|
-
|
|
|
18
|
-
| `TSchema` *extends* [`Schema`](./docs/api/appkit/Interface.Schema.md) |
|
|
16
|
+
| Type Parameter |
|
|
17
|
+
| ------------------------------------------------------------------------------------- |
|
|
18
|
+
| `TSchema` *extends* [`Schema`](./docs/api/appkit/Interface.Schema.md)<`string`> |
|
|
19
19
|
|
|
20
20
|
## Parameters[](#parameters "Direct link to Parameters")
|
|
21
21
|
|
|
@@ -1,17 +1,25 @@
|
|
|
1
1
|
# Function: defineSchema()
|
|
2
2
|
|
|
3
3
|
```ts
|
|
4
|
-
function defineSchema(builder: (context: SchemaBuilderContext) =>
|
|
4
|
+
function defineSchema<TTables>(builder: (context: SchemaBuilderContext) => TTables, options?: DefineSchemaOptions): Schema<Extract<keyof TTables, string>>;
|
|
5
5
|
|
|
6
6
|
```
|
|
7
7
|
|
|
8
|
+
Compile one declared schema. The returned type keeps the table names the builder returned, so `crudRoutes` and `hooks` can name only real tables.
|
|
9
|
+
|
|
10
|
+
## Type Parameters[](#type-parameters "Direct link to Type Parameters")
|
|
11
|
+
|
|
12
|
+
| Type Parameter |
|
|
13
|
+
| ----------------------------------------------------- |
|
|
14
|
+
| `TTables` *extends* `Record`<`string`, `AppKitTable`> |
|
|
15
|
+
|
|
8
16
|
## Parameters[](#parameters "Direct link to Parameters")
|
|
9
17
|
|
|
10
|
-
| Parameter | Type
|
|
11
|
-
| ---------- |
|
|
12
|
-
| `builder` | (`context`: `SchemaBuilderContext`) => `
|
|
13
|
-
| `options?` | `DefineSchemaOptions`
|
|
18
|
+
| Parameter | Type |
|
|
19
|
+
| ---------- | ------------------------------------------------ |
|
|
20
|
+
| `builder` | (`context`: `SchemaBuilderContext`) => `TTables` |
|
|
21
|
+
| `options?` | `DefineSchemaOptions` |
|
|
14
22
|
|
|
15
23
|
## Returns[](#returns "Direct link to Returns")
|
|
16
24
|
|
|
17
|
-
[`Schema`](./docs/api/appkit/Interface.Schema.md)
|
|
25
|
+
[`Schema`](./docs/api/appkit/Interface.Schema.md)<`Extract`\<keyof `TTables`, `string`>>
|
|
@@ -1,4 +1,12 @@
|
|
|
1
|
-
# Interface: Schema
|
|
1
|
+
# Interface: Schema\<TTableName>
|
|
2
|
+
|
|
3
|
+
One finalized schema. `TTableName` keeps the declared names in the type, so configuration that addresses a table by name is checked against the schema it was written for. Code that accepts any schema uses the default.
|
|
4
|
+
|
|
5
|
+
## Type Parameters[](#type-parameters "Direct link to Type Parameters")
|
|
6
|
+
|
|
7
|
+
| Type Parameter | Default type |
|
|
8
|
+
| ------------------------------- | ------------ |
|
|
9
|
+
| `TTableName` *extends* `string` | `string` |
|
|
2
10
|
|
|
3
11
|
## Properties[](#properties "Direct link to Properties")
|
|
4
12
|
|
|
@@ -23,6 +31,6 @@ readonly $schemaName: string;
|
|
|
23
31
|
### $tables[](#tables "Direct link to $tables")
|
|
24
32
|
|
|
25
33
|
```ts
|
|
26
|
-
readonly $tables: Readonly<Record<
|
|
34
|
+
readonly $tables: Readonly<Record<TTableName, AppKitTable>>;
|
|
27
35
|
|
|
28
36
|
```
|
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
```ts
|
|
4
4
|
type IDatabaseConfig<TSchema> = {
|
|
5
|
+
crudRoutes?: CrudRoutesConfig<TSchema>;
|
|
6
|
+
hooks?: { readonly [TTable in SchemaTableName<TSchema>]?: { serialize?: ReadSerializer } };
|
|
5
7
|
schema: TSchema;
|
|
6
8
|
};
|
|
7
9
|
|
|
@@ -17,6 +19,24 @@ Configuration for one schema-bound DatabasePlugin instance.
|
|
|
17
19
|
|
|
18
20
|
## Properties[](#properties "Direct link to Properties")
|
|
19
21
|
|
|
22
|
+
### crudRoutes?[](#crudroutes "Direct link to crudRoutes?")
|
|
23
|
+
|
|
24
|
+
```ts
|
|
25
|
+
readonly optional crudRoutes: CrudRoutesConfig<TSchema>;
|
|
26
|
+
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
***
|
|
30
|
+
|
|
31
|
+
### hooks?[](#hooks "Direct link to hooks?")
|
|
32
|
+
|
|
33
|
+
```ts
|
|
34
|
+
readonly optional hooks: { readonly [TTable in SchemaTableName<TSchema>]?: { serialize?: ReadSerializer } };
|
|
35
|
+
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
***
|
|
39
|
+
|
|
20
40
|
### schema[](#schema "Direct link to schema")
|
|
21
41
|
|
|
22
42
|
```ts
|
package/docs/api/appkit.md
CHANGED
|
@@ -74,7 +74,7 @@ Documentation merge entry for Typedoc — combines the stable `@databricks/appki
|
|
|
74
74
|
| [ResourceRequirement](./docs/api/appkit/Interface.ResourceRequirement.md) | Declares a resource requirement for a plugin. Can be defined statically in a manifest or dynamically via getResourceRequirements(). |
|
|
75
75
|
| [RunAgentInput](./docs/api/appkit/Interface.RunAgentInput.md) | - |
|
|
76
76
|
| [RunAgentResult](./docs/api/appkit/Interface.RunAgentResult.md) | - |
|
|
77
|
-
| [Schema](./docs/api/appkit/Interface.Schema.md) |
|
|
77
|
+
| [Schema](./docs/api/appkit/Interface.Schema.md) | One finalized schema. `TTableName` keeps the declared names in the type, so configuration that addresses a table by name is checked against the schema it was written for. Code that accepts any schema uses the default. |
|
|
78
78
|
| [SearchRequest](./docs/api/appkit/Interface.SearchRequest.md) | - |
|
|
79
79
|
| [SearchResponse](./docs/api/appkit/Interface.SearchResponse.md) | - |
|
|
80
80
|
| [SearchResult](./docs/api/appkit/Interface.SearchResult.md) | - |
|
|
@@ -155,7 +155,7 @@ Documentation merge entry for Typedoc — combines the stable `@databricks/appki
|
|
|
155
155
|
| [createWorkspaceClient](./docs/api/appkit/Function.createWorkspaceClient.md) | Construct an AppKit workspace client. |
|
|
156
156
|
| [database](./docs/api/appkit/Function.database.md) | Create a typed database plugin registration for a finalized schema. |
|
|
157
157
|
| [defineManifest](./docs/api/appkit/Function.defineManifest.md) | Validates a raw manifest (typically a `manifest.json` import) against the canonical Zod schema and returns it as a strict [PluginManifest](./docs/api/appkit/Interface.PluginManifest.md). |
|
|
158
|
-
| [defineSchema](./docs/api/appkit/Function.defineSchema.md) |
|
|
158
|
+
| [defineSchema](./docs/api/appkit/Function.defineSchema.md) | Compile one declared schema. The returned type keeps the table names the builder returned, so `crudRoutes` and `hooks` can name only real tables. |
|
|
159
159
|
| [defineTool](./docs/api/appkit/Function.defineTool.md) | Defines a single tool entry for a plugin's internal registry. |
|
|
160
160
|
| [enumColumn](./docs/api/appkit/Function.enumColumn.md) | - |
|
|
161
161
|
| [executeFromRegistry](./docs/api/appkit/Function.executeFromRegistry.md) | Validates tool-call arguments against the entry's schema and invokes its handler. On validation failure, returns an LLM-friendly error string (matching the behavior of `tool()`) rather than throwing, so the model can self-correct on its next turn. |
|
package/llms.txt
CHANGED
|
@@ -93,7 +93,7 @@ npx @databricks/appkit docs <query>
|
|
|
93
93
|
- [Function: createWorkspaceClient()](./docs/api/appkit/Function.createWorkspaceClient.md): Construct an AppKit workspace client.
|
|
94
94
|
- [Function: database()](./docs/api/appkit/Function.database.md): Create a typed database plugin registration for a finalized schema.
|
|
95
95
|
- [Function: defineManifest()](./docs/api/appkit/Function.defineManifest.md): Validates a raw manifest (typically a manifest.json import) against the
|
|
96
|
-
- [Function: defineSchema()](./docs/api/appkit/Function.defineSchema.md):
|
|
96
|
+
- [Function: defineSchema()](./docs/api/appkit/Function.defineSchema.md): Compile one declared schema. The returned type keeps the table names the
|
|
97
97
|
- [Function: defineTool()](./docs/api/appkit/Function.defineTool.md): Defines a single tool entry for a plugin's internal registry.
|
|
98
98
|
- [Function: enumColumn()](./docs/api/appkit/Function.enumColumn.md): Parameters
|
|
99
99
|
- [Function: executeFromRegistry()](./docs/api/appkit/Function.executeFromRegistry.md): Validates tool-call arguments against the entry's schema and invokes its
|
|
@@ -171,7 +171,7 @@ npx @databricks/appkit docs <query>
|
|
|
171
171
|
- [Interface: ResourceRequirement](./docs/api/appkit/Interface.ResourceRequirement.md): Declares a resource requirement for a plugin.
|
|
172
172
|
- [Interface: RunAgentInput](./docs/api/appkit/Interface.RunAgentInput.md): Properties
|
|
173
173
|
- [Interface: RunAgentResult](./docs/api/appkit/Interface.RunAgentResult.md): Properties
|
|
174
|
-
- [Interface: Schema](./docs/api/appkit/Interface.Schema.md):
|
|
174
|
+
- [Interface: Schema<TTableName>](./docs/api/appkit/Interface.Schema.md): One finalized schema. TTableName keeps the declared names in the type, so
|
|
175
175
|
- [Interface: SearchRequest](./docs/api/appkit/Interface.SearchRequest.md): Properties
|
|
176
176
|
- [Interface: SearchResponse<T>](./docs/api/appkit/Interface.SearchResponse.md): Type Parameters
|
|
177
177
|
- [Interface: SearchResult<T>](./docs/api/appkit/Interface.SearchResult.md): Type Parameters
|