Kotlin sdk recursive glob matching#1399
Conversation
There was a problem hiding this comment.
Code Review
This pull request introduces a streaming A2UI parser for v0.8 and v0.9 specifications, featuring a new StreamingParser hierarchy and a TopologyAnalyzer for component reachability. It also enhances catalog management with message-level pruning and glob pattern support for loading examples. Review feedback identifies a critical argument swap in the AgentExtension constructor and several performance bottlenecks in the parser, including redundant regex compilations, inefficient list allocations in hot loops, and O(N^2) insertion operations.
| "Provides agent driven UI using the A2UI JSON format.", | ||
| params, | ||
| isSupportRequired, | ||
| "Provides agent driven UI using the A2UI JSON format.", | ||
| A2UI_EXTENSION_URI, |
There was a problem hiding this comment.
The arguments for the AgentExtension constructor appear to have been swapped incorrectly. The standard A2A specification expects the extension URI as the first argument and the description as the last. Swapping them will cause the client to receive the description string as the extension identifier, which will break extension discovery and protocol negotiation.
| "Provides agent driven UI using the A2UI JSON format.", | |
| params, | |
| isSupportRequired, | |
| "Provides agent driven UI using the A2UI JSON format.", | |
| A2UI_EXTENSION_URI, | |
| A2UI_EXTENSION_URI, | |
| params, | |
| isSupportRequired, | |
| "Provides agent driven UI using the A2UI JSON format.", |
2d05d8b to
b07f443
Compare
b07f443 to
acfd580
Compare
Implements the full incremental A2UI v0.9 streaming parser suite in Kotlin, achieving SDK parity. Automatically incorporates critical subsequent fixes for robust real-time topology parsing and relative bindings. Port of Python SDK commit 8ba982a
Port of Python SDK commit 1ea689d
Implement coordinated component and message pruning via withPruning, propagating allowedMessages from A2uiSchemaManager down to Catalog. Add robust automated unit tests and enable full conformance verification. Port of Python SDK commit 0fd7240
Implements custom JSON-path validation error string construction for v0.9 payloads in Kotlin, matching Python exactly. Validates messages individually via sub-validators and iterates component arrays to construct precise path prefixes. Port of Python SDK commit 15ee789
Implement equivalent transparent file:// URI parsing support in CatalogConfig.fromPath and BasicCatalog.getConfig. Unsupported schemes are correctly rejected, and robust unit tests are included. Port of Python SDK commit 90a0a19
Update loadExamples to support recursive glob pattern matching for loading examples, maintaining backward compatibility for directory paths and ensuring deterministic output order. Added robust automated unit tests in CatalogPruningTest.kt. Port of Python SDK commit 94c1c9b
acfd580 to
e5e2a69
Compare
| } | ||
|
|
||
| @Test | ||
| fun loadsExamplesWithGlob() { |
There was a problem hiding this comment.
Conformance tests have the glob matching verification.
Description
Update loadExamples to support recursive glob pattern matching for loading examples, maintaining backward compatibility for directory paths and ensuring deterministic output order. Added robust automated unit tests in CatalogPruningTest.kt.
Port of Python SDK commit 94c1c9b
Pre-launch Checklist
If you need help, consider asking for advice on the discussion board.