Use protobuf definition to generate language independent types#9
Merged
Use protobuf definition to generate language independent types#9
Conversation
# Conflicts: # package-lock.json # packages/langium-ai-tools/package.json
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.
This pull request introduces significant improvements to the
langium-ai-toolspackage and related example projects, focusing on adding Protocol Buffers (protobuf) support for evaluator results, standardizing naming conventions, and updating dependencies for compatibility and new features. The most important changes are grouped below.Protocol Buffers Integration & Metadata Structure:
interface.protofile defining protobuf messages for evaluator results, diagnostics, syntax statistics, and metadata, enabling structured, cross-language data exchange.buildandwatchscripts inlangium-ai-tools/package.jsonto generate TypeScript code from the protobuf definitions and copy them to the distribution folder. Also added@protobuf-ts/runtimeand@protobuf-ts/pluginas dependencies for protobuf support. [1] [2]langium-ai-tools/src/index.tsfor external use..gitignoreinsrc/gen/to exclude generated TypeScript files from version control.Evaluator Result and API Standardization:
LangiumDocumentAnalyzer.evaluateDocumentto return a protocol-compatibleEvaluatorResultMsgobject, including syntax statistics in the new metadata structure and ensuring diagnostic codes are always strings. [1] [2]SyntaxStatisticTypeScript type in favor of the protobuf-based definition.Naming Consistency and Data Structure Updates:
response_lengthwithresponseLengthand_runtimewithruntimeacross the codebase and type definitions for consistency and protobuf compatibility. [1] [2] [3] [4] [5]Dependency and Example Updates:
langium-ai-toolsandlangiumdependencies to version~4.1.xin bothlangium-ai-mcpand the example evaluator, ensuring compatibility with new features and protobuf integration. [1] [2]langiumas a direct dependency inlangium-ai-mcpfor explicit compatibility.preparescript fromlangium-ai-mcp/package.json.These changes collectively modernize the evaluator infrastructure, improve interoperability, and lay the groundwork for future protocol-based integrations.