v0.1.27
v0.1.27
Features
Unified embed route (/embed/:type/:id)
The separate /charts/:chartId and /statements/:statementId routes are replaced by a single generic GET /embed/:type/:id endpoint. A resolver registry dispatches on the :type token (chart, data), so new embed kinds can be added server-side without client or grammar changes. The shared protocol exposes a single embedUrl(config, type, id, query) helper in place of the old chartUrl / statementUrl pair. The MastraClientConfig schema now carries embedPathTemplate instead of the two previous template fields.
Embed marker parser (@dbx-tools/appkit-mastra-shared)
New marker.ts module provides parseMarkers(text) and stripIncompleteMarkerTail(text). The grammar is type-agnostic ([<type>:<uuid>]) and enforces a UUID-shaped id, rejecting fabricated ids at parse time rather than at fetch time. stripIncompleteMarkerTail hides partially-streamed markers during text-delta delivery so the UI never flashes raw bracket syntax.
SSE stream frame interceptor (@dbx-tools/appkit-mastra)
New intercept.ts installs a response-level SSE interceptor on Mastra /stream responses. It strips heavyweight redundant payloads (output, messages, response, result) from terminal step-finish, finish, and tool-result frames before they reach the browser, reducing wire size without losing lifecycle metadata.
Lakebase cache-schema provisioning (@dbx-tools/appkit-autopg)
autopg() now resolves the connecting Postgres identity via getUsernameWithApiLookup and exports it as PGUSER, preventing the AppKit persistent cache from silently disabling itself when no explicit user is set. A new provisionCacheSchema helper (in provision.ts) grants the resolved role full rights on the existing appkit cache schema when running locally, so the cache migration succeeds on first connect. Controlled by the new provisionCache option (default true); always skipped inside a Databricks App.
Shared utilities (@dbx-tools/shared)
commonUtils.isRecord(value): type guard narrowingunknowntoRecord<string, unknown>.commonUtils.deleteKeys(value, keys): best-effort key deletion on an unknown value, returning whether anything was removed.
Fixes
Genie agent: fabricated chart-id guardrails
The prepare_chart tool description and GENIE_INSTRUCTIONS now explicitly instruct the model that a valid chartId is only the opaque token returned by prepare_chart in the current turn. The instructions forbid constructing ids from statement ids or labels, preventing the model from emitting markers that resolve to nothing.
Internals
- Demo client (
chat-view.tsx,Stream.tsx,mastra-client.ts) updated to consume the unifiedembedUrlhelper and the new marker parser. scripts/tag.tsandscripts/util.tsupdated (release workflow improvements).- README and cursor-rule docs refreshed to match current architecture.