docs(agentex): use canonical agentex.protocol.acp import paths#254
Merged
max-parke-scale merged 2 commits intoJun 9, 2026
Merged
Conversation
Merged
3 tasks
165038d to
5d283e4
Compare
max-parke-scale
added a commit
that referenced
this pull request
Jun 8, 2026
#254 migrated the docs' mkdocstrings directives to agentex.protocol.acp.* (scale-agentex-python#371, first released in agentex-sdk 0.11.5). The doc build installs the frozen lock pinned at 0.9.4, so griffe could not collect the symbols and `mkdocs build` aborted. Bumping floors openai-agents>=0.14.3 (requires websockets>=15), which conflicts with the backend's websockets~=14.2 pin; relaxed to ~=15.0 (backend doesn't import websockets; uvicorn 0.35 supports 15). Cascades openai-agents 0.4.2->0.14.8, openai 2.24->2.41, temporalio 1.23->1.28. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
72a1eec to
6d3bc0e
Compare
max-parke-scale
added a commit
that referenced
this pull request
Jun 9, 2026
## Summary Decouples the documentation build from the backend's workspace `uv.lock` so documenting a newly released SDK API surface no longer forces backend dependency bumps. ## Problem The mkdocs site documents the published `agentex` SDK via mkdocstrings, which introspects the *installed* `agentex` package. The build installed it from the frozen workspace lock (`uv sync --group docs`), pinning the docs to whatever `agentex-sdk` the backend's lock resolved. Documenting a new path like `agentex.protocol.*` (released in `agentex-sdk` 0.11.5) therefore required bumping `agentex-sdk` in the lock — and because every protocol-supporting SDK floors `openai-agents>=0.14.3` (→ `websockets>=15`) and `temporalio>=1.26`, that cascaded backend-runtime bumps the docs don't need. ## Change Docs deps now live in `agentex/docs/requirements.txt` and install into an ephemeral environment, independent of the workspace lock: - **CI** (`ci.yml`, `build-agentex.yml`) and **Makefile** (`serve-docs`, `build-docs`): `uv run --isolated --no-project --with-requirements requirements.txt mkdocs build` - **Dockerfile** `docs-builder` stage: `uv pip install --system -r docs/requirements.txt` (honors `UV_INDEX_URL` for private-index prod builds) The workspace lock and backend dependency resolution are untouched — **zero `pyproject.toml` / `uv.lock` changes**. Docs always render against the latest published SDK. ## Verified - Isolated `mkdocs build` green locally — griffe introspects an ephemeral uv env, not `.venv`. - `make build-docs` green. ## Notes - The `docs` dependency-group in `agentex/pyproject.toml` is now unused by the build (left in place; `install-docs` still references it). Removing it + relocking is a trivial follow-up. - [#254](#254) (canonical `agentex.protocol.acp` doc paths) stacks on this branch and goes green because the isolated build pulls `agentex-sdk>=0.12.0`. 🧑💻🤖 — posted via [Claude Code](https://claude.com/claude-code) <!-- claude-code --> <!-- greptile_comment --> <h3>Greptile Summary</h3> This PR decouples the mkdocs documentation build from the workspace `uv.lock` by introducing `agentex/docs/requirements.txt` and switching all build paths (CI, Makefile, Dockerfile) to an isolated `uv` invocation that installs directly from that file. Backend runtime dependencies are completely untouched. - **New `docs/requirements.txt`**: `agentex-sdk>=0.12.0` floats so the docs always track the latest SDK release; the mkdocs toolchain (`mkdocs`, `mkdocs-material`, `mkdocstrings-python`, etc.) is pinned to known-good versions with Dependabot keeping them current. - **CI & Makefile**: All `uv sync --group docs` invocations replaced with `uv run --isolated --no-project --with-requirements requirements.txt mkdocs build`; the docs job in `ci.yml` intentionally omits uv caching to always resolve the latest SDK. - **Dockerfile `docs-builder` stage**: Now runs `uv pip install --system -r docs/requirements.txt` with a `UV_INDEX_URL` conditional preserved for private-index production builds; the `docs` dependency group removed from both `pyproject.toml` files and `uv.lock`. <details><summary><h3>Confidence Score: 5/5</h3></summary> Safe to merge — build isolation is well-structured and backend dependencies are untouched. The change is purely mechanical: three build surfaces (CI workflows, Makefile, Dockerfile) are updated in a consistent pattern, all verified locally by the author. Backend runtime dependencies and uv.lock are untouched. agentex/Dockerfile — minor layer-ordering opportunity to avoid busting the install cache on every markdown edit. </details> <h3>Important Files Changed</h3> | Filename | Overview | |----------|----------| | .github/workflows/build-agentex.yml | Docs build step switched from uv sync --group docs to isolated uv run --isolated --no-project --with-requirements requirements.txt; no issues. | | .github/workflows/ci.yml | Same isolated docs-build invocation as build-agentex.yml; docs job intentionally omits uv caching to always resolve the latest agentex-sdk. | | agentex/Dockerfile | docs-builder stage now installs from docs/requirements.txt via uv pip install; COPY of full docs/ before the install step sacrifices Docker layer cache efficiency. | | agentex/Makefile | Removed install-docs target; serve-docs and build-docs now use isolated uv invocations consistent with CI. | | agentex/docs/requirements.txt | New file with agentex-sdk>=0.12.0 floating and all mkdocs toolchain packages pinned to known-good versions; clean. | | agentex/pyproject.toml | Removed the docs dependency-group; workspace lock is untouched. | | pyproject.toml | Removed the top-level docs group that forwarded to agentex[docs]; clean. | | uv.lock | All docs-only packages removed from lock; backend runtime dependencies untouched. | </details> <details><summary><h3>Flowchart</h3></summary> ```mermaid %%{init: {'theme': 'neutral'}}%% flowchart TD subgraph OLD["Before (workspace-coupled)"] A1["uv sync --group docs\n(reads uv.lock)"] --> B1["uv run mkdocs build"] A1 -.->|"forces lock bump\nfor new SDK APIs"| C1["agentex-sdk in uv.lock"] end subgraph NEW["After (isolated)"] A2["docs/requirements.txt\nagentex-sdk>=0.12.0 (float)\nmkdocs==1.6.1 (pinned)\n..."] --> B2["uv run --isolated --no-project\n--with-requirements requirements.txt\nmkdocs build"] A2 -.->|"no workspace lock\ninvolved"| C2["agentex-sdk from PyPI\n(latest >= 0.12.0)"] end subgraph DOCKER["Dockerfile docs-builder stage"] D1["COPY docs/requirements.txt"] --> D2["uv pip install --system\n-r docs/requirements.txt\n(UV_INDEX_URL conditional)"] D2 --> D3["COPY docs/ + src/"] D3 --> D4["mkdocs build"] end NEW --> DOCKER ``` </details> <a href="https://app.greptile.com/api/ide/cursor?prompt=Fix%20the%20following%201%20code%20review%20issue.%20Work%20through%20them%20one%20at%20a%20time%2C%20proposing%20concise%20fixes.%0A%0A---%0A%0A%23%23%23%20Issue%201%20of%201%0Aagentex%2FDockerfile%3A68-77%0AOnly%20%60docs%2Frequirements.txt%60%20is%20needed%20to%20run%20the%20install%20step%20%E2%80%94%20copying%20the%20entire%20%60docs%2F%60%20directory%20first%20means%20any%20change%20to%20a%20markdown%20file%20or%20config%20will%20bust%20the%20%60uv%20pip%20install%60%20cache%20layer%2C%20forcing%20a%20fresh%20package%20download%20on%20every%20docs%20edit.%20Copy%20just%20the%20requirements%20file%20for%20the%20install%2C%20then%20copy%20the%20rest%20of%20%60docs%2F%60.%0A%0A%60%60%60suggestion%0ACOPY%20%24%7BSOURCE_DIR%7D%2Fdocs%2Frequirements.txt%20docs%2Frequirements.txt%0A%23%20Docs%20build%20is%20decoupled%20from%20the%20workspace%20lock%3A%20install%20the%20toolchain%20%2B%20latest%0A%23%20SDK%20from%20docs%2Frequirements.txt%20so%20doc%20generation%20tracks%20SDK%20releases.%0ARUN%20if%20%5B%20-n%20%22%24%7BUV_INDEX_URL%7D%22%20%5D%3B%20then%20%5C%0A%20%20%20%20%20%20%20%20uv%20pip%20install%20--system%20--index-url%20%22%24%7BUV_INDEX_URL%7D%22%20-r%20docs%2Frequirements.txt%3B%20%5C%0A%20%20%20%20else%20%5C%0A%20%20%20%20%20%20%20%20uv%20pip%20install%20--system%20-r%20docs%2Frequirements.txt%3B%20%5C%0A%20%20%20%20fi%0ACOPY%20%24%7BSOURCE_DIR%7D%2Fdocs%2F%20docs%2F%0ACOPY%20%24%7BSOURCE_DIR%7D%2Fsrc%2F%20src%2F%0ARUN%20cd%20docs%20%26%26%20mkdocs%20build%0A%60%60%60%0A%0A&pr=286&platform=github"><picture><source media="(prefers-color-scheme: dark)" srcset="https://greptile-static-assets.s3.amazonaws.com/badges/FixAllInCursorDark.svg?v=3"><source media="(prefers-color-scheme: light)" srcset="https://greptile-static-assets.s3.amazonaws.com/badges/FixAllInCursor.svg?v=3"><img alt="Fix All in Cursor" src="https://greptile-static-assets.s3.amazonaws.com/badges/FixAllInCursor.svg?v=3" height="20"></picture></a> <a href="https://app.greptile.com/ide/claude-code?prompt=Fix%20the%20following%201%20code%20review%20issue.%20Work%20through%20them%20one%20at%20a%20time%2C%20proposing%20concise%20fixes.%0A%0A---%0A%0A%23%23%23%20Issue%201%20of%201%0Aagentex%2FDockerfile%3A68-77%0AOnly%20%60docs%2Frequirements.txt%60%20is%20needed%20to%20run%20the%20install%20step%20%E2%80%94%20copying%20the%20entire%20%60docs%2F%60%20directory%20first%20means%20any%20change%20to%20a%20markdown%20file%20or%20config%20will%20bust%20the%20%60uv%20pip%20install%60%20cache%20layer%2C%20forcing%20a%20fresh%20package%20download%20on%20every%20docs%20edit.%20Copy%20just%20the%20requirements%20file%20for%20the%20install%2C%20then%20copy%20the%20rest%20of%20%60docs%2F%60.%0A%0A%60%60%60suggestion%0ACOPY%20%24%7BSOURCE_DIR%7D%2Fdocs%2Frequirements.txt%20docs%2Frequirements.txt%0A%23%20Docs%20build%20is%20decoupled%20from%20the%20workspace%20lock%3A%20install%20the%20toolchain%20%2B%20latest%0A%23%20SDK%20from%20docs%2Frequirements.txt%20so%20doc%20generation%20tracks%20SDK%20releases.%0ARUN%20if%20%5B%20-n%20%22%24%7BUV_INDEX_URL%7D%22%20%5D%3B%20then%20%5C%0A%20%20%20%20%20%20%20%20uv%20pip%20install%20--system%20--index-url%20%22%24%7BUV_INDEX_URL%7D%22%20-r%20docs%2Frequirements.txt%3B%20%5C%0A%20%20%20%20else%20%5C%0A%20%20%20%20%20%20%20%20uv%20pip%20install%20--system%20-r%20docs%2Frequirements.txt%3B%20%5C%0A%20%20%20%20fi%0ACOPY%20%24%7BSOURCE_DIR%7D%2Fdocs%2F%20docs%2F%0ACOPY%20%24%7BSOURCE_DIR%7D%2Fsrc%2F%20src%2F%0ARUN%20cd%20docs%20%26%26%20mkdocs%20build%0A%60%60%60%0A%0A&repo=scaleapi%2Fscale-agentex&pr=286&platform=github"><picture><source media="(prefers-color-scheme: dark)" srcset="https://greptile-static-assets.s3.amazonaws.com/badges/FixAllInClaudeDark.svg?v=3"><source media="(prefers-color-scheme: light)" srcset="https://greptile-static-assets.s3.amazonaws.com/badges/FixAllInClaude.svg?v=3"><img alt="Fix All in Claude Code" src="https://greptile-static-assets.s3.amazonaws.com/badges/FixAllInClaude.svg?v=3" height="20"></picture></a> <a href="https://app.greptile.com/api/ide/codex?prompt=IMPORTANT%3A%20Work%20in%20the%20repository%20%22scaleapi%2Fscale-agentex%22%20on%20the%20existing%20branch%20%22maxparke%2Fagx1-292-docs-build-isolation%22.%20Checkout%20that%20branch%20%E2%80%94%20do%20NOT%20create%20a%20new%20branch%20or%20open%20a%20new%20PR.%20Push%20your%20changes%20to%20%22maxparke%2Fagx1-292-docs-build-isolation%22.%0A%0AFix%20the%20following%201%20code%20review%20issue.%20Work%20through%20them%20one%20at%20a%20time%2C%20proposing%20concise%20fixes.%0A%0A---%0A%0A%23%23%23%20Issue%201%20of%201%0Aagentex%2FDockerfile%3A68-77%0AOnly%20%60docs%2Frequirements.txt%60%20is%20needed%20to%20run%20the%20install%20step%20%E2%80%94%20copying%20the%20entire%20%60docs%2F%60%20directory%20first%20means%20any%20change%20to%20a%20markdown%20file%20or%20config%20will%20bust%20the%20%60uv%20pip%20install%60%20cache%20layer%2C%20forcing%20a%20fresh%20package%20download%20on%20every%20docs%20edit.%20Copy%20just%20the%20requirements%20file%20for%20the%20install%2C%20then%20copy%20the%20rest%20of%20%60docs%2F%60.%0A%0A%60%60%60suggestion%0ACOPY%20%24%7BSOURCE_DIR%7D%2Fdocs%2Frequirements.txt%20docs%2Frequirements.txt%0A%23%20Docs%20build%20is%20decoupled%20from%20the%20workspace%20lock%3A%20install%20the%20toolchain%20%2B%20latest%0A%23%20SDK%20from%20docs%2Frequirements.txt%20so%20doc%20generation%20tracks%20SDK%20releases.%0ARUN%20if%20%5B%20-n%20%22%24%7BUV_INDEX_URL%7D%22%20%5D%3B%20then%20%5C%0A%20%20%20%20%20%20%20%20uv%20pip%20install%20--system%20--index-url%20%22%24%7BUV_INDEX_URL%7D%22%20-r%20docs%2Frequirements.txt%3B%20%5C%0A%20%20%20%20else%20%5C%0A%20%20%20%20%20%20%20%20uv%20pip%20install%20--system%20-r%20docs%2Frequirements.txt%3B%20%5C%0A%20%20%20%20fi%0ACOPY%20%24%7BSOURCE_DIR%7D%2Fdocs%2F%20docs%2F%0ACOPY%20%24%7BSOURCE_DIR%7D%2Fsrc%2F%20src%2F%0ARUN%20cd%20docs%20%26%26%20mkdocs%20build%0A%60%60%60%0A%0A&repo=scaleapi%2Fscale-agentex&pr=286&platform=github"><picture><source media="(prefers-color-scheme: dark)" srcset="https://greptile-static-assets.s3.amazonaws.com/badges/FixAllInCodexDark.svg?v=3"><source media="(prefers-color-scheme: light)" srcset="https://greptile-static-assets.s3.amazonaws.com/badges/FixAllInCodex.svg?v=3"><img alt="Fix All in Codex" src="https://greptile-static-assets.s3.amazonaws.com/badges/FixAllInCodex.svg?v=3" height="20"></picture></a> <details><summary>Prompt To Fix All With AI</summary> `````markdown Fix the following 1 code review issue. Work through them one at a time, proposing concise fixes. --- ### Issue 1 of 1 agentex/Dockerfile:68-77 Only `docs/requirements.txt` is needed to run the install step — copying the entire `docs/` directory first means any change to a markdown file or config will bust the `uv pip install` cache layer, forcing a fresh package download on every docs edit. Copy just the requirements file for the install, then copy the rest of `docs/`. ```suggestion COPY ${SOURCE_DIR}/docs/requirements.txt docs/requirements.txt # Docs build is decoupled from the workspace lock: install the toolchain + latest # SDK from docs/requirements.txt so doc generation tracks SDK releases. RUN if [ -n "${UV_INDEX_URL}" ]; then \ uv pip install --system --index-url "${UV_INDEX_URL}" -r docs/requirements.txt; \ else \ uv pip install --system -r docs/requirements.txt; \ fi COPY ${SOURCE_DIR}/docs/ docs/ COPY ${SOURCE_DIR}/src/ src/ RUN cd docs && mkdocs build ``` ````` </details> <sub>Reviews (3): Last reviewed commit: ["build(docs): drop the now-unused docs de..."](1afad5c) | [Re-trigger Greptile](https://app.greptile.com/api/retrigger?id=36304983)</sub> <!-- /greptile_comment --> --------- Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Protocol-shape types (RPCMethod, CreateTaskParams, SendMessageParams, SendEventParams, CancelTaskParams) moved from agentex.lib.types.acp to the new canonical agentex.protocol.acp location in scaleapi/scale-agentex-python#371. The old path still works via a back-compat shim, but scaffolded user code following these docs should start on the canonical path. Updates: - 8 `from agentex.lib.types.acp import ...` imports in code samples - 2 `::: agentex.lib.types.acp.X` mkdocstrings references in API docs No content / behavior changes; same classes, new import path. The other lib/types/* modules (tracing, agent_card, credentials, etc.) stay on the old path because they have heavier transitive deps and weren't migrated. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
6d3bc0e to
5a42081
Compare
declan-scale
approved these changes
Jun 9, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Updates the agentex mkdocs site to use the new canonical
agentex.protocol.acpimport paths for protocol-shape types (RPCMethod,CreateTaskParams,SendMessageParams,SendEventParams,CancelTaskParams).Companion to scaleapi/scale-agentex-python#371, which moved these types out of
agentex.lib.types.*into the new slim-safeagentex.protocol.*package. The old path still works via a back-compat shim — this PR isn't fixing a breakage, it's making sure scaffolded user code following these docs starts on the canonical path.Requested in a review comment on #371.
Changes
10 markdown files in
agentex/docs/:from agentex.lib.types.acp import ...→from agentex.protocol.acp import ...::: agentex.lib.types.acp.X→::: agentex.protocol.acp.Xagent_types/sync.mdandapi/types.md)No content / behavior changes; same classes, new import path.
What's not touched
Other
agentex.lib.types.*modules (tracing,agent_card,credentials,fastacp,llm_messages,converters) stay on the old path because they have heavier transitive deps and weren't migrated by #371. No doc references to those needed updates.Test plan
mkdocs buildrenders green againstagentex-sdk0.12.0 (verified locally via the build(docs): isolate docs build from the workspace lock #286 build path).::: agentex.protocol.acp.*mkdocstrings directives resolve at the new path.🧑💻🤖 — posted via Claude Code
Greptile Summary
This PR updates all
agentexmkdocs documentation to use the new canonicalagentex.protocol.acpimport path in place of the legacyagentex.lib.types.acppath for the five protocol-shape types (CreateTaskParams,SendMessageParams,SendEventParams,CancelTaskParams, and the referenced variants). No content or behavioral changes are made; only import paths in code samples and mkdocstrings directives are touched.from agentex.lib.types.acp import ...tofrom agentex.protocol.acp import ....::: agentex.lib.types.acp.Xto::: agentex.protocol.acp.X.agentex.lib.types.acpreferences exist anywhere in the docs tree.Confidence Score: 5/5
Purely mechanical doc-path update with no logic changes; all old references have been replaced and none remain in the docs tree.
Every changed line is a string substitution in markdown files — no executable code, no schema changes, no API surface changes. A post-diff grep confirms zero remaining agentex.lib.types.acp references in the docs directory, so the migration is complete and consistent.
No files require special attention.
Important Files Changed
Flowchart
%%{init: {'theme': 'neutral'}}%% flowchart TD A["10 markdown doc files\n(code samples + mkdocstrings directives)"] B["agentex.lib.types.acp\n(legacy path — back-compat shim)"] C["agentex.protocol.acp\n(canonical path — agentex-sdk ≥ 0.12.0)"] D["Types migrated:\nCreateTaskParams\nSendMessageParams\nSendEventParams\nCancelTaskParams"] A -->|"old import path"| B A -->|"new import path ✅"| C B -.->|"re-exports via shim"| C C --> DReviews (6): Last reviewed commit: "Merge branch 'main' into maxparke/agx1-2..." | Re-trigger Greptile