6 months ago
dfa8a47The first review-fix push surfaced two real A2UI follow-up regressions on PR #83. Google workspaces could be told to use A2UI while the actual a2ui tool stayed unregistered, and the surface manager's eviction path marked old surfaces deleted without removing them from retained state. This commit registers the a2ui tool whenever the feature is enabled and the session can apply envelopes, regardless of provider, and turns eviction into a true removal while still emitting the delete/tombstone event clients need. The regression coverage now pins both the Google tool-registration path and the surface-cap retention bound. Constraint: Prompt/tool capability hints must stay aligned across providers when a workspace feature flag enables A2UI Rejected: Keep the google guard and suppress prompt/skill hints instead | would preserve an advertised-feature mismatch in the new Google A2UI flow this PR introduces Rejected: Mark evicted surfaces deleted in-place | keeps retained-state growth unbounded and defeats the documented 16-surface cap Confidence: high Scope-risk: moderate Reversibility: clean Directive: If A2UI availability changes again, update prompt guidance, skill exposure, and tool registration together; do not let any one of the three drift Tested: bun run typecheck Tested: bun test test/tools.test.ts test/a2ui/surfaceManager.test.ts Tested: bun test --max-concurrency 1 Not-tested: Long-running real-user A2UI sessions beyond local test harness coverage
Parent72c7cb3