Skip to content

Kotlin sdk recursive glob matching#1399

Open
jgindin wants to merge 7 commits into
google:mainfrom
jgindin:kotlin-sdk-recursive-glob-matching
Open

Kotlin sdk recursive glob matching#1399
jgindin wants to merge 7 commits into
google:mainfrom
jgindin:kotlin-sdk-recursive-glob-matching

Conversation

@jgindin
Copy link
Copy Markdown
Collaborator

@jgindin jgindin commented May 11, 2026

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.

@jgindin jgindin requested a review from nan-yu May 11, 2026 16:27
@jgindin jgindin self-assigned this May 11, 2026
@github-project-automation github-project-automation Bot moved this to Todo in A2UI May 11, 2026
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment on lines +58 to +61
"Provides agent driven UI using the A2UI JSON format.",
params,
isSupportRequired,
"Provides agent driven UI using the A2UI JSON format.",
A2UI_EXTENSION_URI,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

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.

Suggested change
"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.",

Comment thread agent_sdks/kotlin/src/main/kotlin/com/google/a2ui/core/parser/StreamingParser.kt Outdated
Comment thread agent_sdks/kotlin/src/main/kotlin/com/google/a2ui/core/parser/StreamingParser.kt Outdated
Comment thread agent_sdks/kotlin/src/main/kotlin/com/google/a2ui/core/parser/StreamingParser.kt Outdated
Comment thread agent_sdks/kotlin/src/main/kotlin/com/google/a2ui/core/parser/StreamingParser.kt Outdated
@jgindin jgindin force-pushed the kotlin-sdk-recursive-glob-matching branch from 2d05d8b to b07f443 Compare May 12, 2026 02:46
@jgindin jgindin force-pushed the kotlin-sdk-recursive-glob-matching branch from b07f443 to acfd580 Compare May 12, 2026 14:18
jgindin added 6 commits May 12, 2026 11:15
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
@jgindin jgindin force-pushed the kotlin-sdk-recursive-glob-matching branch from acfd580 to e5e2a69 Compare May 12, 2026 15:52
}

@Test
fun loadsExamplesWithGlob() {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Conformance tests have the glob matching verification.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Todo

Development

Successfully merging this pull request may close these issues.

2 participants