ag-ui-protocol / ag-ui-protocol/ag-ui

Triage & merge plan: @ferponse ADK-middleware / transport contributions

Đang mở
#2,162 1 bình luận 0 reaction 0 người được giao Xem trên GitHub
enhancement
Ngôn ngữ chính
Python
Star
15.9k
Fork
1.4k
Merge trung bình
1 ngày 17 giờ
Pull request đã merge (30 ngày)
163

Mô tả

Thank you @ferponse for the submissions and I apologize for the delay in responding, though
even this response is more of a placeholder as your requests can't be considered in bulk and, with
most of them being features rather than fixes, some require more consideration than others.

## Why this is one issue

@ferponse opened **8 PRs + 5 protocol-design issues** (Jul 1–2), all opt-in / default-off,
and pinged me on each. The PRs are individually reasonable, but nearly all of them append a
flag to the **same three files** — so they conflict with each other and, if eventually accepted,
have to be merged in **sequence**, re-running the middleware suite between each. This issue is
the single home for hat sequence; the far-reaching *protocol-direction* questions live in a separate
Proposal discussion (linked at the bottom).

## File hotspots (why serial)

| File | Region | PRs that collide |
|------|--------|------------------|
| `event_translator.py` | import block + top of `translate()` | #2104, #2073, #2076, #2099 |
| `adk_agent.py` | `__init__` / `from_app` signature | #2108, #2102, #2099, #2076 |
| `endpoint.py` | `capabilities_endpoint` transport dict | #2097, #2085 (+ #2108 feeds it) |
| run flow | `RUN_FINISHED` / completion | #2102, #2076, #2085 |

## Merge order

**Rebasing later PRs onto the earlier merges is on the contributor.**

### ⛔ Precursor — land first, standalone
- [ ] `chore` · **Bump `ag-ui-protocol` minimum pin → `>=0.1.18` (ideally `0.1.19`)** in
`integrations/adk-middleware/python/pyproject.toml`. Unblocks #2102's imports of
`Interrupt` / `RunFinishedInterruptOutcome` and de-risks all interrupt-related work.

### Phase 1 — `event_translator.py` chain (cleanest)
- [ ] `feature` · **#2104** — ACTIVITY_SNAPSHOT/DELTA from `custom_metadata` markers · *closes #2103*
→ merge first. Ask: add a malformed-delta test + assert activity-precedes-text ordering.
- [ ] `fix` · **#2073** — REASONING_ENCRYPTED_VALUE for thought signatures · *closes #2072*
→ Ask: add `self._emitted_signature_tool_call_ids.clear()` to `reset()` (unbounded growth
across sequential runs). Optionally handle streaming-fc-args id remap.
- [ ] `feature` · **#2076** — opt-in STEP_STARTED/FINISHED for workflows · *closes #2075*
→ Ask: also call `finalize_step_events()` on the `except` / RUN_ERROR path so an exception
can't leave steps open.
- [ ] `feature` · **#2099** — RAW passthrough of untranslated ADK events · *closes #2098*
→ Ask: LRO/HITL events bypass `translate()` and get no RAW event — close the gap or document
it. **Needs my scope sign-off** (author explicitly requested it).

### Phase 2 — `adk_agent.py` config
- [ ] `feature` · **#2108** — auto-discover AgentCapabilities · *closes #2107*
→ Ask: flag-off is not "100% unchanged" — `capabilities={}` now returns `None`; make it an
explicit `is not None` check **+ a test**. Fix the description: the factory is `from_app()`,
not the nonexistent `create()`.
- [ ] `feature` · **#2102** — HITL pauses → interrupts on `RUN_FINISHED.outcome` · *closes #2101*
→ **Blocked on the precursor pin bump.** Ask: add an end-to-end test that drives a real HITL
pause through the consumer loop; reuse the authoritative HITL marker set instead of treating
every unresolved `TOOL_CALL_END` as an interrupt.

### Phase 3 — `endpoint.py` transports (reconcile against #2108's capabilities path)
- [ ] `feature` · **#2097** — httpBinary (protobuf-over-HTTP) on the Python side · *closes #2094*
→ Ask: don't advertise `httpBinary` unless the protobuf extra is importable (else clients
negotiate a transport that fails with an empty stream); surface an error frame on binary
encode failure; drop the dead capabilities guard.
- [ ] `feature` · **#2085** — WebSocket transport · *closes #2084* · **request changes, land last**
→ Must: fix the 3 broken `test_capabilities.py` tests; make transport advertisement additive
(no force-override / in-place mutation / dead branch); add real `/ws` + `WebSocketAgent`
tests; and either implement or delete the single-socket HITL claim. Pending transport-roadmap
decision (see discussion).

## Protocol-direction questions (handled separately)

The 5 design issues — #2154, #2146, #2106, #2105, #2091 — touch the core protocol surface and
are being decided together, not piecemeal:

➡️ **[Proposals discussion #2161](https://github.com/ag-ui-protocol/ag-ui/discussions/2161)**

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.