feat(text2sql): add stream runtime and semantic readiness#25
Merged
Conversation
…dling - Introduced a new SQLite dry-run method in the SqliteQueryService to validate SQL queries against the SQLite database. - Updated the SqlValidationService to incorporate datasource ID and type in the dry-run validation process. - Enhanced error handling for missing columns during SQLite dry-runs, returning specific DomainError codes. - Added new utility methods for summarizing tool payloads and normalizing SQLite errors. - Improved the Text2SqlStreamEventMapper to include detailed summaries in tool call events. - Expanded test coverage for SQL validation and error scenarios.
Add semantic asset preparation/readiness services and thread the new readiness evidence through retrieval, delivery contracts, health output, and Text2SQL v2 coverage gates. This also expands replay, indexing, and quality tests so the new semantic asset flow is exercised end to end.
Introduce a shared chat stream protocol package for SSE framing, parsing, terminal detection, and UI projection helpers. Adopt it across backend writers, frontend readers, smoke checks, and stream contract tests so protocol behavior has one owner. Also harden stream recovery for invalid JSON transport failures and preserve simple count shortcuts when broad schema evidence includes amount-like columns.
Propagate stream abort signals from the frontend stop action through the chat workflow, LangGraph runtime, SQL generation, and LLM gateway so user cancellation stops provider work instead of only closing the browser reader. Also add stop-generation UI, USER_CANCELLED visibility semantics, updated protocol docs, and refreshed graphify artifacts.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR brings the broader Text2SQL feature branch together for
main: chat streaming now has a shared protocol toolkit, frontend cancellation is wired through the backend runtime path, semantic asset readiness becomes part of the Text2SQL/RAG flow, and SQLite validation has stronger dry-run diagnostics. It also refreshes the project README as the primary English entry point with Chinese and Japanese translations plus functional screenshots.These ship together because the stream protocol, runtime evidence, semantic context, validation behavior, and README now describe the same end-to-end Text2SQL delivery surface.
What Changed
@text2sql/chat-stream-protocolpackage for SSE framing, parsing, terminal guards, and UI projection helpers.AbortSignalfrom frontend stop generation through backend workflow, LangGraph, SQL generation, and LLM provider paths.README.mdin English, addsREADME.zh-CN.mdandREADME.ja.md, and includes feature screenshots for modeling, datasource onboarding, ChatBI, SQL evidence, and chart output.Screenshots
Verification
git diff --check origin/main..HEAD