fix(cli): only claim uipath new scaffolds for the matching framework - #373
Draft
vldcmp-uipath wants to merge 1 commit into
Draft
fix(cli): only claim uipath new scaffolds for the matching framework#373vldcmp-uipath wants to merge 1 commit into
vldcmp-uipath wants to merge 1 commit into
Conversation
Every integration's `new` middleware returned `should_continue=False` for all calls, so installing any of them made the base `uipath new` function scaffold unreachable (UiPath/uipath-python#1543). Each middleware now takes the `project_type` / `agent_framework` that `uipath new` forwards and defers unless the scaffold is its own, via the shared `AgentFramework.<member>.claims_scaffold()` gate: `--type auto` (the default) is claimed by whichever integration is installed, `--type agent` only by the framework it names, and `--type function` by none. The rule lives in the base package, so a framework here names itself rather than restating the comparison. Also drops a duplicated `generate_pyproject` call in the agent framework, Google ADK, LlamaIndex and OpenAI Agents scaffolds, which wrote pyproject.toml twice per run. The uipath floor moves to the release that forwards these arguments; until 2.14.15 is on PyPI the packages pin its TestPyPI dev build, and uipath-runtime follows to >=0.13.1 as that release requires. Tests cover the gate in every package, including the plain-string path an older base CLI would take; uipath-llamaindex gets the scaffolding test file it was missing. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
vldcmp-uipath
force-pushed
the
fix/gate-new-middlewares-on-project-type
branch
from
September 11, 2026 12:48
49640b1 to
2f2465a
Compare
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.
Problem
Every integration's
newmiddleware returnedshould_continue=Falseunconditionally, so installing any of them made the baseuipath newfunction scaffold unreachable —uipath new <name>always produced that framework's agent project. Fixes the integrations' half of UiPath/uipath-python#1543; the companion PRs are #1886 (base CLI) and uipath-langchain-python#1069.Changes
All six middlewares take the
project_type/agent_frameworkthatuipath newforwards and defer (should_continue=True) unless the scaffold is theirs, via the shared gate added in #1886:--type auto(the default) is claimed by whichever integration is installed — today's behaviour —--type agentonly by the framework it names, and--type functionby none. The rule is identical for every framework, so it lives in the base package and each integration just names itself.Dropped a duplicated
generate_pyprojectcall in the agent framework, Google ADK, LlamaIndex and OpenAI Agents scaffolds, which wrotepyproject.tomltwice on every run. Generation order is now the same everywhere (script, then pyproject).uipathfloor moves to the release that forwards these arguments, withuipath-runtimefollowing to>=0.13.1, <0.14.0as that release requires;uipath-platformfloors align at>=0.2.27.Version bumps:
uipath-agent-framework0.1.1,uipath-claude-sdk0.1.1,uipath-google-adk0.1.1,uipath-llamaindex0.6.2,uipath-openai-agents0.1.2,uipath-pydantic-ai0.1.2.Behaviour
uipath new my-fn(or--type auto)uipath new my-fn --type functionuipath new my-agent --type agentuipath new my-agent --type agent --agent-framework pydantic-aiuipath-pydantic-aiclaims it; the others pass throughCompatibility
An older base CLI calls the middleware with just the name; the defaults (
project_type=ProjectType.AUTO) still claim the scaffold, so behaviour there is unchanged. The enums subclassstr, so a caller passing plain strings gates identically — covered by a test in every package.Testing
mypy --config-file pyproject.toml .,ruff checkandruff format --checkclean in each.uipath-llamaindexhad no scaffolding test file; it gets one.🤖 Generated with Claude Code