Skip to content

PR #387 Phase-A: AG-UI protocol adapter + generative UI (reconciled, single commit — signed)#24

Open
plauzy wants to merge 2 commits into
mainfrom
kiro/pr387-phase-a-agui-core-signed
Open

PR #387 Phase-A: AG-UI protocol adapter + generative UI (reconciled, single commit — signed)#24
plauzy wants to merge 2 commits into
mainfrom
kiro/pr387-phase-a-agui-core-signed

Conversation

@plauzy

@plauzy plauzy commented Jul 12, 2026

Copy link
Copy Markdown
Owner

This pull request was created by @kiro-agent on behalf of @plauzy 👻

Comment with /kiro fix to address specific feedback or /kiro all to address everything.
Learn about Kiro Web


What this is

Closes out Phase-A of awslabs#387 as a single, verified-signed commit rebased onto the latest upstream main. Reproduces the reconciled AG-UI core work ("best of both implementations" from #19), authored by plauzy + Co-authored-by: Kiro Agent, matching awslabs/cli-agent-orchestrator@33c593d.

Supersedes the unsigned #22 (same content, now SSH-signed → Verified). Please close #22.

  • Rebased onto latest main; the only merge conflict was CHANGELOG.md (kept both). All 15 newer main commits preserved.
  • 155 files, +15,317 / −115, single commit.

Scope (additive, opt-in)

  • AG-UI streamingGET /agui/v1/stream maps CAO's normalized events to AG-UI typed events (STATE_SNAPSHOT on connect, RFC-6902 STATE_DELTA, ?since= replay), behind CAO_AGUI_ENABLED + scope auth. Metadata-only.
  • Generative UI — frozen, server-validated component allow-list; off-list components refused at adapter, renderer, and replay artifact.
  • Standalone dashboard PWA (cao_pwa/); browser-openable deterministic replay artifact.
  • Opt-in OpenTelemetry ([otel] extra) + credentials-free mock_cli provider.
  • A2A is intentionally omitted here and lands hardened in Phase-B.

Shift-left testing

test/api/test_agui_*, test/services/test_agui_stream_mapping.py, test/ext_apps/*; cao_pwa vitest incl. generative-UI + safety-refusal; Playwright live spec (cao_pwa/playwright.live.config.ts) with renderer-true assertions, iframe refusal, server-restart ?since= replay, reload persistence; examples/agui-dashboard/showcase.sh gates on the six GENERATIVE_UI frames. Verified locally: AG-UI + ext_apps unit suites pass.

Video verification proof

docs/media/agui-generative-ui-demo.webm, docs/media/agui-live-remediation-demo.webm, referenced from docs/pwa.md and the CHANGELOG generative-UI anchor.

Implements the AG-UI L1 adapter proposed in awslabs#386.

Co-authored-by: Kiro Agent <244629292+kiro-agent@users.noreply.github.com>

…hase-A (reconciled)

Closes out Phase-A of awslabs#387 as a single, net-new commit rebased onto the
latest upstream `main`. This squashes the reconciled AG-UI core work (the
"best of both implementations" adjudicated in #19) into one authored
change so it can be reviewed cleanly before it goes upstream.

Additive and opt-in: every new surface is default-off (gated by env/config) or
a new module that is not imported unless enabled, so the existing localhost
dashboard, MCP servers, and API stay byte-identical when the flags are unset.

Protocols & UI
- AG-UI streaming: GET /agui/v1/stream maps CAO's normalized event vocabulary
  to AG-UI typed events, with a STATE_SNAPSHOT on connect, an RFC-6902
  STATE_DELTA shared-state channel, and ?since= replay, behind CAO_AGUI_ENABLED
  + scope auth. Metadata-only by construction (message bodies never carried).
- Generative UI: agents author UI via a frozen, server-validated allow-list of
  named components (approval/choice/diff/progress/metrics/agent cards) with JSON
  props — no HTML/script/eval; off-list components are refused at the adapter,
  the renderer, and the replay artifact.
- Standalone dashboard PWA (cao_pwa/) that consumes the stream from any browser
  and resumes via ?since=; a browser-openable deterministic replay artifact.
- Opt-in OpenTelemetry GenAI instrumentation ([otel] extra) and a
  credentials-free mock_cli provider for CI.

Reconciliation (best-of-both)
- Renderer-true demo vocabulary (diff_summary title, progress.value on the
  0.0-1.0 scale) pinned by live-spec assertions so drift fails the spec instead
  of hiding behind HTTP 200.
- OTel packaging under [otel] with an actionable degrade hint; find_spec-based
  subprocess guard.
- agui-author skill registered in SHIPPED_SKILLS and guarded by the
  packaging-parity suite.

Shift-left testing
- Backend unit/integration: AG-UI stream mapping, emit_ui validation/refusal,
  enablement gating, and auth hardening (test/api/test_agui_*,
  test/services/test_agui_stream_mapping.py, test/ext_apps/*).
- Frontend: cao_pwa vitest incl. generative-UI + safety-refusal cases; tsc
  clean; vite build within the bundle-size budget.
- Live path: Playwright live spec (cao_pwa/playwright.live.config.ts) exercises
  the six components with renderer-true assertions, iframe refusal, the
  server-restart ?since= replay, and reload persistence; showcase.sh gates on
  the six GENERATIVE_UI frames arriving on the live stream.

Video verification proof
- Recorded walkthroughs committed under docs/media/:
  agui-generative-ui-demo.webm and agui-live-remediation-demo.webm, referenced
  from docs/pwa.md and the CHANGELOG generative-UI anchor.

Implements the AG-UI L1 adapter proposed in awslabs#386.

Co-authored-by: Kiro Agent <244629292+kiro-agent@users.noreply.github.com>
Brings the branch current with upstream: profile lifecycle (awslabs#395), GraphView
contract (awslabs#402), bundled cao-mcp-server launch fix (awslabs#403), and the v2.3.0
release. Feature surface unchanged; only conflict resolution below.

Co-authored-by: Kiro Agent <244629292+kiro-agent@users.noreply.github.com>

# Conflicts:
#	CHANGELOG.md
#	pyproject.toml
#	uv.lock
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant