@dbx-tools/appkit-mastra 0.1.26 → 0.1.27
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/README.md +12 -10
- package/dist/src/agents.js +1 -1
- package/dist/src/chart.d.ts +1 -1
- package/dist/src/chart.js +2 -4
- package/dist/src/config.d.ts +1 -1
- package/dist/src/genie.js +18 -3
- package/dist/src/intercept.d.ts +48 -0
- package/dist/src/intercept.js +167 -0
- package/dist/src/plugin.d.ts +2 -2
- package/dist/src/plugin.js +105 -89
- package/dist/src/statement.d.ts +5 -5
- package/dist/src/statement.js +5 -5
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +5 -5
- package/src/agents.ts +1 -1
- package/src/chart.ts +4 -6
- package/src/config.ts +1 -1
- package/src/genie.ts +18 -3
- package/src/intercept.ts +206 -0
- package/src/plugin.ts +121 -90
- package/src/statement.ts +5 -5
package/dist/src/statement.d.ts
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Wraps `client.statementExecution.getStatement` with the shape
|
|
5
5
|
* + size + error handling the plugin's tools and the
|
|
6
|
-
* `/
|
|
6
|
+
* `/embed/data/:id` route both need:
|
|
7
7
|
*
|
|
8
8
|
* - {@link fetchStatementData}: low-level fetch that returns the
|
|
9
9
|
* raw `{columns, rows, rowCount}` shape used by the
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
* numeric strings to numbers so downstream charts /
|
|
13
13
|
* aggregations don't have to.
|
|
14
14
|
* - {@link STATEMENT_ROW_CAP}: hard cap callers (notably the
|
|
15
|
-
* `/
|
|
15
|
+
* `/embed/data/:id` route) clamp `limit` to so a
|
|
16
16
|
* runaway result set can't hose a response.
|
|
17
17
|
* - {@link isStatementNotFoundError}: structural detector that
|
|
18
18
|
* normalizes the SDK's two error classes plus the loose
|
|
@@ -30,7 +30,7 @@ import { WorkspaceClient } from "@databricks/sdk-experimental";
|
|
|
30
30
|
import type { GenieDatasetData } from "@dbx-tools/appkit-mastra-shared";
|
|
31
31
|
/**
|
|
32
32
|
* Hard server-side cap on rows returned by the
|
|
33
|
-
* `/
|
|
33
|
+
* `/embed/data/:id` route. Sized to keep responses small
|
|
34
34
|
* enough for inline tables to render snappily; the route surfaces
|
|
35
35
|
* a `truncated` flag whenever the upstream `rowCount` exceeds
|
|
36
36
|
* this so end users know they're seeing a sample.
|
|
@@ -48,7 +48,7 @@ export declare const STATEMENT_ROW_CAP = 500;
|
|
|
48
48
|
*
|
|
49
49
|
* Exported because every consumer in the plugin (the
|
|
50
50
|
* `get_statement` tool, the `prepare_chart` dataset resolver, and
|
|
51
|
-
* the `/
|
|
51
|
+
* the `/embed/data/:id` route) needs the exact same
|
|
52
52
|
* fetch + coercion pipeline so LLM-side `get_statement` output
|
|
53
53
|
* and UI-side `[data:<id>]` rendering stay shape-identical for
|
|
54
54
|
* the same `statement_id`.
|
|
@@ -66,7 +66,7 @@ export declare function fetchStatementData(client: WorkspaceClient, statementId:
|
|
|
66
66
|
* catalogued.
|
|
67
67
|
*
|
|
68
68
|
* Pulled into its own helper so callers (notably the
|
|
69
|
-
* `/
|
|
69
|
+
* `/embed/data/:id` route) stay decoupled from SDK
|
|
70
70
|
* error-class identity, and the conversion logic stays testable
|
|
71
71
|
* in isolation.
|
|
72
72
|
*/
|
package/dist/src/statement.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Wraps `client.statementExecution.getStatement` with the shape
|
|
5
5
|
* + size + error handling the plugin's tools and the
|
|
6
|
-
* `/
|
|
6
|
+
* `/embed/data/:id` route both need:
|
|
7
7
|
*
|
|
8
8
|
* - {@link fetchStatementData}: low-level fetch that returns the
|
|
9
9
|
* raw `{columns, rows, rowCount}` shape used by the
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
* numeric strings to numbers so downstream charts /
|
|
13
13
|
* aggregations don't have to.
|
|
14
14
|
* - {@link STATEMENT_ROW_CAP}: hard cap callers (notably the
|
|
15
|
-
* `/
|
|
15
|
+
* `/embed/data/:id` route) clamp `limit` to so a
|
|
16
16
|
* runaway result set can't hose a response.
|
|
17
17
|
* - {@link isStatementNotFoundError}: structural detector that
|
|
18
18
|
* normalizes the SDK's two error classes plus the loose
|
|
@@ -30,7 +30,7 @@ import { ApiError, HttpError, WorkspaceClient } from "@databricks/sdk-experiment
|
|
|
30
30
|
import { apiUtils } from "@dbx-tools/shared";
|
|
31
31
|
/**
|
|
32
32
|
* Hard server-side cap on rows returned by the
|
|
33
|
-
* `/
|
|
33
|
+
* `/embed/data/:id` route. Sized to keep responses small
|
|
34
34
|
* enough for inline tables to render snappily; the route surfaces
|
|
35
35
|
* a `truncated` flag whenever the upstream `rowCount` exceeds
|
|
36
36
|
* this so end users know they're seeing a sample.
|
|
@@ -63,7 +63,7 @@ function coerceCell(cell) {
|
|
|
63
63
|
*
|
|
64
64
|
* Exported because every consumer in the plugin (the
|
|
65
65
|
* `get_statement` tool, the `prepare_chart` dataset resolver, and
|
|
66
|
-
* the `/
|
|
66
|
+
* the `/embed/data/:id` route) needs the exact same
|
|
67
67
|
* fetch + coercion pipeline so LLM-side `get_statement` output
|
|
68
68
|
* and UI-side `[data:<id>]` rendering stay shape-identical for
|
|
69
69
|
* the same `statement_id`.
|
|
@@ -98,7 +98,7 @@ export async function fetchStatementData(client, statementId, options) {
|
|
|
98
98
|
* catalogued.
|
|
99
99
|
*
|
|
100
100
|
* Pulled into its own helper so callers (notably the
|
|
101
|
-
* `/
|
|
101
|
+
* `/embed/data/:id` route) stay decoupled from SDK
|
|
102
102
|
* error-class identity, and the conversion logic stays testable
|
|
103
103
|
* in isolation.
|
|
104
104
|
*/
|