Skip to content

fix(rust): harden APIs and transport features before 0.2.0 publication - #3385

Draft
mattsp1290 wants to merge 28 commits into
ag-ui-protocol:mainfrom
mattsp1290:fix/rust-publication-api
Draft

mattsp1290 wants to merge 28 commits into
ag-ui-protocol:mainfrom
mattsp1290:fix/rust-publication-api

Conversation

@mattsp1290

@mattsp1290 mattsp1290 commented Nov 12, 2026 •

Copy link
Copy Markdown
Collaborator

Purpose and dependency

This is the pre-publication follow-up to #3214, requested before merging that PR. It is stacked on its approved head ac80258e24292867b8feb14626ab115ee49dc2e8; do not merge this draft before #3214. Because the parent branch lives in a fork, the upstream base is main and the Files changed view currently includes the parent. The incremental follow-up is commit 99c0677 (focused comparison). Once #3214 lands, reconcile this branch onto main before final review.

Prepared by Forg, an AI agent assisting Matt.

Changes requested before publishing 0.2.0

Addresses Joshua’s approval and publication checklist:

  • Make DiagnosticCategory, RunTerminalStatus, and EventValidationError non-exhaustive.
  • Make public config/result/limit/error records extensible, with constructors or defaults and downstream construction tests. Update migration documentation.
  • Remove never-fired text/tool/reasoning chunk subscriber hooks. Obsolete overrides now fail at compile time; docs name the start/content/end callbacks to use instead.
  • Add http, native-tls, and rustls-tls features. Defaults retain native TLS and previous HTTP/2, charset and system-proxy support. Disabling defaults removes HTTP/reqwest while keeping the agent pipeline and bounded SSE decoder.
  • Return a typed, non-exhaustive PatchError from apply_patch_to_copy, preserving bounded, disposable-copy behavior and regression coverage.
  • Remove unreachable AgUiClientError::ExchangeIdentity and EventValidationError::EmptyDelta variants.
  • Preserve reqwest failures in standard error source chains without restoring sensitive request URLs.

Also clarifies that captured HTTP error bodies are absent from Display/Debug, not absent from structured errors.

Earlier review threads

The individual disposition audit covers all 51 inline threads on #3214 with code/test evidence. It separates fixes already present in the parent from this follow-up and documented limitations. GitHub threads and security alerts have not been marked resolved by that audit. No additional important runtime defect was found during the audit.

Local verification

  • Rust 1.88: 205 tests passed across 41 targets; four existing live-backend tests remain ignored.
  • 15 doctests passed, including downstream compile-fail API checks.
  • Formatting, strict workspace/all-targets Clippy, and warning-free documentation passed.
  • Client feature matrix (none, HTTP-only, rustls-only, all features): all-target tests, doctests and strict Clippy passed for each on Rust 1.88.
  • Dependency-tree checks: no reqwest/TLS without HTTP; no native-tls/OpenSSL in rustls-only mode.
  • Stable Rust 1.99.1 three-crate workspace publication dry-run passed with verification. Nothing uploaded.
  • Two complementary reviews found no important or critical issues in the follow-up changes.

Hosted CI passed on 99c06777db72bef426d4fabb3fd16d8040cbdd3b: all 13 substantive workflows, including the eight-job Rust qualification/feature matrix, interoperability and fresh Git consumer, and all 39 E2E jobs. This draft does not publish crates, merge either PR, or change the documented cancellation/memory limitations.

mattsp1290 and others added 28 commits September 29, 2026 21:07
@mintlify

mintlify Bot commented Nov 12, 2026

Copy link
Copy Markdown

Preview approval required

This pull request comes from a fork, so Mintlify won't build a preview until someone with write access approves commit 99c0677.

Approve preview

@mattsp1290 mattsp1290 mentioned this pull request Nov 12, 2026
run: cargo build --verbose

- name: Install compiler and quality tools
run: rustup toolchain install ${{ matrix.toolchain }} --profile minimal --component clippy,rustfmt
workspaces: sdks/community/rust
key: ${{ matrix.toolchain }}
- name: Build all public crates and test targets
run: cargo +${{ matrix.toolchain }} build --workspace --all-targets --locked
- name: Check formatting
run: cargo fmt -- --check

run: cargo +${{ matrix.toolchain }} fmt --all -- --check
run: cargo +${{ matrix.toolchain }} fmt --all -- --check
- name: Check clippy
run: cargo clippy -- -D warnings
run: cargo +${{ matrix.toolchain }} clippy --workspace --all-targets --locked -- -D warnings
run: cargo clippy -- -D warnings
run: cargo +${{ matrix.toolchain }} clippy --workspace --all-targets --locked -- -D warnings
- name: Complete fixture, producer, HTTP and lifecycle suites
run: cargo +${{ matrix.toolchain }} test --workspace --all-targets --locked
- name: Complete fixture, producer, HTTP and lifecycle suites
run: cargo +${{ matrix.toolchain }} test --workspace --all-targets --locked
- name: Doctests
run: cargo +${{ matrix.toolchain }} test --workspace --doc --locked
- name: Documentation warnings
env:
RUSTDOCFLAGS: -D warnings
run: cargo +${{ matrix.toolchain }} doc --workspace --no-deps --locked
@github-actions

Copy link
Copy Markdown
Contributor

Python Preview Packages

Version 0.0.0.dev1794501883 published to TestPyPI.

Warning: These packages are built from contributor code that may not yet have been vetted for correctness or security. Install at your own risk and do not use in production.

Install with uv

Add the TestPyPI index to your pyproject.toml:

[[tool.uv.index]]
name = "testpypi"
url = "https://test.pypi.org/simple/"
explicit = true

Then install the packages you need:

# Core SDK
uv add 'ag-ui-protocol==0.0.0.dev1794501883' --index testpypi

# Integrations (each already depends on the matching ag-ui-protocol preview)
uv add 'ag-ui-langgraph==0.0.0.dev1794501883' --index testpypi
uv add 'ag-ui-crewai==0.0.0.dev1794501883' --index testpypi
# NOTE: ag-ui-agent-spec depends on pyagentspec (git-only, not on PyPI).
# You will need to install pyagentspec separately from its git repo.
uv add 'ag-ui-agent-spec==0.0.0.dev1794501883' --index testpypi
uv add 'ag_ui_adk==0.0.0.dev1794501883' --index testpypi
uv add 'ag_ui_strands==0.0.0.dev1794501883' --index testpypi

Install with pip

pip install \
  --index-url https://test.pypi.org/simple/ \
  --extra-index-url https://pypi.org/simple/ \
  ag-ui-protocol==0.0.0.dev1794501883

Use --extra-index-url https://pypi.org/simple/ so pip can resolve
transitive dependencies (pydantic, fastapi, etc.) from real PyPI.


Commit: fd27cb5

@pkg-pr-new

pkg-pr-new Bot commented Nov 12, 2026

Copy link
Copy Markdown

Open in StackBlitz

@ag-ui/a2a-middleware

pnpm add https://pkg.pr.new/ag-ui-protocol/ag-ui/@ag-ui/a2a-middleware@3385

@ag-ui/a2ui-middleware

pnpm add https://pkg.pr.new/ag-ui-protocol/ag-ui/@ag-ui/a2ui-middleware@3385

@ag-ui/event-throttle-middleware

pnpm add https://pkg.pr.new/ag-ui-protocol/ag-ui/@ag-ui/event-throttle-middleware@3385

@ag-ui/mcp-apps-middleware

pnpm add https://pkg.pr.new/ag-ui-protocol/ag-ui/@ag-ui/mcp-apps-middleware@3385

@ag-ui/mcp-middleware

pnpm add https://pkg.pr.new/ag-ui-protocol/ag-ui/@ag-ui/mcp-middleware@3385

@ag-ui/a2a

pnpm add https://pkg.pr.new/ag-ui-protocol/ag-ui/@ag-ui/a2a@3385

@ag-ui/adk-js

pnpm add https://pkg.pr.new/ag-ui-protocol/ag-ui/@ag-ui/adk-js@3385

@ag-ui/adk

pnpm add https://pkg.pr.new/ag-ui-protocol/ag-ui/@ag-ui/adk@3385

@ag-ui/ag2

pnpm add https://pkg.pr.new/ag-ui-protocol/ag-ui/@ag-ui/ag2@3385

@ag-ui/agno

pnpm add https://pkg.pr.new/ag-ui-protocol/ag-ui/@ag-ui/agno@3385

@ag-ui/antigravity

pnpm add https://pkg.pr.new/ag-ui-protocol/ag-ui/@ag-ui/antigravity@3385

@ag-ui/aws-strands

pnpm add https://pkg.pr.new/ag-ui-protocol/ag-ui/@ag-ui/aws-strands@3385

@ag-ui/claude-agent-sdk

pnpm add https://pkg.pr.new/ag-ui-protocol/ag-ui/@ag-ui/claude-agent-sdk@3385

@ag-ui/claude-managed-agents

pnpm add https://pkg.pr.new/ag-ui-protocol/ag-ui/@ag-ui/claude-managed-agents@3385

@ag-ui/crewai

pnpm add https://pkg.pr.new/ag-ui-protocol/ag-ui/@ag-ui/crewai@3385

@ag-ui/langchain

pnpm add https://pkg.pr.new/ag-ui-protocol/ag-ui/@ag-ui/langchain@3385

@ag-ui/langgraph

pnpm add https://pkg.pr.new/ag-ui-protocol/ag-ui/@ag-ui/langgraph@3385

@ag-ui/llamaindex

pnpm add https://pkg.pr.new/ag-ui-protocol/ag-ui/@ag-ui/llamaindex@3385

@ag-ui/mastra

pnpm add https://pkg.pr.new/ag-ui-protocol/ag-ui/@ag-ui/mastra@3385

@ag-ui/openai-agents

pnpm add https://pkg.pr.new/ag-ui-protocol/ag-ui/@ag-ui/openai-agents@3385

@ag-ui/pydantic-ai

pnpm add https://pkg.pr.new/ag-ui-protocol/ag-ui/@ag-ui/pydantic-ai@3385

@ag-ui/vercel-ai-sdk

pnpm add https://pkg.pr.new/ag-ui-protocol/ag-ui/@ag-ui/vercel-ai-sdk@3385

@ag-ui/watsonx

pnpm add https://pkg.pr.new/ag-ui-protocol/ag-ui/@ag-ui/watsonx@3385

@ag-ui/a2ui-toolkit

pnpm add https://pkg.pr.new/ag-ui-protocol/ag-ui/@ag-ui/a2ui-toolkit@3385

create-ag-ui-app

pnpm add https://pkg.pr.new/ag-ui-protocol/ag-ui/create-ag-ui-app@3385

@ag-ui/client

pnpm add https://pkg.pr.new/ag-ui-protocol/ag-ui/@ag-ui/client@3385

@ag-ui/core

pnpm add https://pkg.pr.new/ag-ui-protocol/ag-ui/@ag-ui/core@3385

@ag-ui/encoder

pnpm add https://pkg.pr.new/ag-ui-protocol/ag-ui/@ag-ui/encoder@3385

@ag-ui/proto

pnpm add https://pkg.pr.new/ag-ui-protocol/ag-ui/@ag-ui/proto@3385

commit: 99c0677

@surlymochan surlymochan left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Verified the incremental follow-up commit (99c0677, on top of #3214's head ac80258) locally — I did not re-run the full 205-test matrix, so this is a scoped check, not a whole-PR approval:

  • cargo test -p ag-ui-core (Rust 1.99.1 here; the PR body used 1.88): 84 passed, 0 failed, including the 5 doctests with the compile-fail checks for the non-exhaustive enums.
  • cargo test -p ag-ui-client --lib: 18 passed, 0 failed.
  • Spot-checked the claimed API changes in the diff: #[non_exhaustive] is present on the event enums in crates/ag-ui-core/src/event.rs; zero remaining references to the removed AgUiClientError::ExchangeIdentity / EventValidationError::EmptyDelta variants anywhere under crates/; the typed PatchError enum exists in crates/ag-ui-core/src/patch.rs (DocumentTooDeep / OperationTooDeep).

No issues found in the slice I verified — non-binding review, no approval implied. Note this is a draft stacked on #3214, so I did not touch mergeability.

This branch has not been deployed

No deployments
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.

4 participants