Summary
The appkit template in experimental/aitools/templates/appkit/ imports getRequestContext from @databricks/appkit, but this function does not exist in any published version of the package (checked 0.1.1 through 0.1.5).
Reproduction
Apps generated using the MCP server with the appkit template fail at runtime with:
file:///tmp/.../dist/server/trpc.js:4
import { getRequestContext } from '@databricks/appkit';
^^^^^^^^^^^^^^^^^
SyntaxError: Named export 'getRequestContext' not found. The requested module '@databricks/appkit' is a CommonJS module...
Affected File
experimental/aitools/templates/appkit/template/{{.project_name}}/server/trpc.ts:
import { getRequestContext } from '@databricks/appkit';
// ...
const { serviceDatabricksClient: client } = getRequestContext();
Current @databricks/appkit exports (v0.1.5)
export { CacheManager, Plugin, SeverityNumber, SpanStatusCode,
analytics, appKitTypesPlugin, createApp, isSQLTypeMarker,
server, sql, toPlugin };
No getRequestContext export exists.
Suggested Fix
Either:
- Add
getRequestContext to the @databricks/appkit package
- Update the template to use the existing appkit APIs
- If this is an internal/unpublished feature, document the required appkit version or provide a workaround
Environment
- CLI version: snapshot (main branch)
- @databricks/appkit: all versions 0.1.1-0.1.5 tested
- Platform: Databricks Runtime 16.2.x
Summary
The appkit template in
experimental/aitools/templates/appkit/importsgetRequestContextfrom@databricks/appkit, but this function does not exist in any published version of the package (checked 0.1.1 through 0.1.5).Reproduction
Apps generated using the MCP server with the appkit template fail at runtime with:
Affected File
experimental/aitools/templates/appkit/template/{{.project_name}}/server/trpc.ts:Current @databricks/appkit exports (v0.1.5)
No
getRequestContextexport exists.Suggested Fix
Either:
getRequestContextto the@databricks/appkitpackageEnvironment