Skip to content

Comments

feat(appkit): add Genie plugin for AI/BI space integration#108

Open
calvarjorge wants to merge 5 commits intomainfrom
feat/genie-plugin
Open

feat(appkit): add Genie plugin for AI/BI space integration#108
calvarjorge wants to merge 5 commits intomainfrom
feat/genie-plugin

Conversation

@calvarjorge
Copy link
Contributor

@calvarjorge calvarjorge commented Feb 17, 2026

Summary

  • Add new Genie plugin
  • Single SSE endpoint (POST /api/genie/:alias/messages) handles both new and follow-up conversations
  • Space alias abstraction: users configure URL aliases, which map to a Genie Space ID in the backend.
  • Always executes as user (OBO) via asUser(req)
  • SSE event flow: message_startstatus (×N) → message_resultquery_result (×N per query attachment)
  • Configurable timeout (default 2min, 0 for indefinite)
  • No cache/retry (chat is stateful and non-idempotent)
  • Programmatic sendMessage API exposed via exports()
  • Conversation history SSE endpoint (GET /api/genie/:alias/conversations/:conversationId) replays full conversation using the same event types, enabling page refresh without losing chat state
    • includeQueryResults query param (default true) controls whether query result data is fetched
    • Messages streamed first, then query results fetched in parallel
    • Server-side pagination with 200-message safety cap
    • Programmatic getConversation API exposed via exports()
  • Fix pre-existing ajv type resolution issue in shared package

Add a new Genie plugin that provides an opinionated chat API powered by
Databricks AI/BI Genie spaces. Users configure named space aliases in
plugin config, and the backend resolves aliases to actual space IDs.

Key design:
- Single SSE endpoint: POST /api/genie/:alias/messages
- Always executes as user (OBO) via asUser(req)
- SSE event flow: message_start → status (×N) → message_result → query_result (×N)
- Space alias abstraction keeps space IDs out of URLs and client code
- No cache/retry (chat is stateful and non-idempotent)
- Configurable timeout (default 2min, 0 for indefinite)

Also fixes pre-existing ajv type resolution issue in shared package
where pnpm hoisting caused TypeScript to resolve ajv@6 types instead
of the declared ajv@8 dependency.

Signed-off-by: Jorge Calvar <jorge.calvar@databricks.com>
Cast error entries to `any` when mapping validation errors so the code
works regardless of which ajv version TypeScript resolves (v6 has
`dataPath`, v8 has `instancePath`).

Signed-off-by: Jorge Calvar <jorge.calvar@databricks.com>
Signed-off-by: Jorge Calvar <jorge.calvar@databricks.com>
Add genie manifest.json to tsdown copy config so it's available at
runtime when loading from the built dist/ output.

Signed-off-by: Jorge Calvar <jorge.calvar@databricks.com>
@calvarjorge calvarjorge marked this pull request as draft February 18, 2026 08:50
SSE endpoint (GET /api/genie/:alias/conversations/:conversationId)
that replays full conversation history reusing existing event types,
enabling page refresh without losing chat state.

Signed-off-by: Jorge Calvar <jorge.calvar@databricks.com>
@calvarjorge calvarjorge marked this pull request as ready for review February 18, 2026 16:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant