fix(deps): update dependency subagents-pydantic-ai to >=0.2.12 - autoclosed - #189
Closed
renovate[bot] wants to merge 1 commit into
Closed
fix(deps): update dependency subagents-pydantic-ai to >=0.2.12 - autoclosed#189renovate[bot] wants to merge 1 commit into
renovate[bot] wants to merge 1 commit into
Conversation
Coverage Report for CI Build 30671013267Coverage remained the same at 100.0%Details
Uncovered ChangesNo uncovered changes found. Coverage RegressionsNo coverage regressions found. Coverage Stats
💛 - Coveralls |
renovate
Bot
force-pushed
the
renovate/vstorm-co-packages
branch
from
July 31, 2026 22:47
0a5d894 to
4ee7844
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.
This PR contains the following updates:
>=0.2.10→>=0.2.12Release Notes
vstorm-co/subagents-pydantic-ai (subagents-pydantic-ai)
v0.2.12Correctness, typing, and documentation pass over the whole library. Every public
entry point keeps its name and signature, so no import or call site changes.
Fixed
TaskStatusis astr-mixinEnum, and Python 3.11 changedEnum.__format__for mixin enums, socheck_taskreportedStatus: TaskStatus.WAITING_FOR_ANSWERon 3.11+ while thetool descriptions and docs promised
waiting_for_answer.list_active_tasksandwait_taskshad the same leak. Statuses, priorities, and message types now renderas their values on every supported Python.
except Exceptionaround the run swallowed pydantic-ai's control-flow signals(
CallDeferred,ApprovalRequired,SkipModelRequest,SkipToolValidation,SkipToolExecution) and turned them into a string result the parent read as afinished task. Those signals,
UserError, and a sharedUsageLimitExceedednowpropagate. A background delegation cannot suspend at all, so it reports a
failedstatus explaining to delegate with
mode="sync"instead."Error executing task: ..."as a normal tool result, so pydantic-ai's retrybudget never engaged and the failure could be folded into a final answer. Failures
now reach the parent as
ModelRetry. Seecontain_errorsandon_failureunderAdded.
asyncio.Taskbehind a background delegation when the run ended, so it keptexecuting against torn-down deps, and one blocked in
ask_parentwaited out thefull timeout.
SubAgentCapabilitynow cancels its run's tasks in awrap_runfinalizer, and
TaskManager.cancel_all()exposes the same thing to the toolset API.agent and shared by every run it serves, so any run could inspect, answer, steer,
or cancel another run's task by id. Handles record
parent_run_idand the toolsrefuse ids belonging to another run.
hard_cancelcould overwrite a completed task's result. The guard wasif not task.done(), which is still true while the task runs itsfinally, so acancel arriving in that window replaced the real result with
cancelled.TaskHandle.finish()makes the first terminal transition win.deps._subagent_state = {...}raisedAttributeErrorfor a deps class declaredfrozen=Trueorslots=True, both of whichSubAgentDepsProtocolallows. Thestate is a typed
SubAgentStatecarried in aContextVarinstead. Reading acaller-injected
deps._subagent_statestill works.TaskHandle.created_at,started_at, andcompleted_atare timezone-aware UTC, so elapsed time and eviction order staycorrect across a DST transition.
get_subagent_system_prompt(include_dual_mode=...)was accepted and ignored.It now appends
DUAL_MODE_SYSTEM_PROMPTwhen asked. The default changed toFalse, so output is unchanged for callers that never passed it.appended
UserPromptParts directly into a graph node's request. It now goesthrough pydantic-ai's
AgentRun.enqueue, so core places the parts and they cannever land between a tool call and its return.
Agent.rundrains thewrapped event stream after the handler returns, unconditionally; the copy drained
only when there was no handler, leaving stream wrappers unfinished for a handler
that stopped reading early.
the server rejected on its merits, so replaying it unchanged is not expected to
help.
except Exception: pass. Failures are logged and delivery continues.asyncio.get_event_loop()inside a coroutine (deprecated since 3.10) is nowget_running_loop().the work was lost. It now reports the task's status and points at
check_task.make typecheck-mypywas broken. Themodule = "tests.*"override nevermatched, because
tests/had no__init__.pyand mypy named the modulestest_toolsetrather thantests.test_toolset; the target reported 583 errors theconfig intended to relax. It is green and runs in CI.
Added
contain_errorsoncreate_subagent_toolset,SubAgentCapability, andSubAgentConfig. Defaults toTrue: an unexpected subagent crash becomes aModelRetryfor the parent, logged with its traceback, so one failed delegationcannot abort the run. Set
Falseto let crashes propagate.on_failureonSubAgentConfig. Returns a steering message to the parent asan ordinary tool result instead of raising
ModelRetry, for a failure wherere-delegating is pointless.
ask_timeout_secondsoncreate_subagent_toolsetandSubAgentCapability,replacing a hardcoded 300-second wait in
ask_parent.SubAgentToolsetis a real class. It was an alias forcreate_subagent_toolset, whose result hadtask_manager,message_history_store, andget_total_usageattached afterwards behind threetype: ignorecomments. It is now aFunctionToolsetsubclass with those as typedmembers, and
create_subagent_toolset()returns an instance —SubAgentToolset(subagents=[...]),toolset.task_manager, andisinstance(t, FunctionToolset)all keep working.TaskHandle.finish()andTaskHandle.is_finishedfor idempotent terminaltransitions, plus
TERMINAL_STATUSESandutcnowas exports.TaskManager.cancel_all()andTaskManager.resolve_answer().SubAgentToolset.answer_task()andSubAgentToolset.steer_task()— thePython halves of the
answer_subagentandsend_message_to_subagenttools, foran application that drives delegation itself instead of letting a model call the
tools. Both return a
boolrather than raising. The tools now delegate to them,so there is one implementation.
SubAgentSpeccovers the whole serialisable config. It mirrored 11 keys, so aYAML-defined subagent could not set
max_retries, anyretry_*option,agent_kwargs,on_failure, orcontain_errors— the loader silently ignoredwhat it had no field for. It also validates now:
max_retriescannot be negative,retry_backoff_multipliercannot shrink the delay, andretry_max_delaycannotsit below
retry_initial_delay(which pinned every retry to the cap instead ofbacking off).
tests/test_spec.pyfails if the config gains a serialisable keythe spec cannot carry.
Removed
SubAgentDepsProtocol.subagents. The library never read it, so everyapplication carried a
dictfor nothing. Dropping a requirement only widens whatsatisfies the protocol, so a deps class that still declares the field is
unaffected.
Changed (breaking)
delegaterequires aname. A one-shot specialist was labelledoneshot-{task_id}, which told an operator reading logs or aTaskHandlenothing about what the specialist was for. The caller now supplies the label
(letters, numbers, hyphens, validated the same way as
create_agent), and itbecomes
TaskHandle.subagent_name. Naming a one-shot still does not register it:it does not count toward
max_agents, cannot be reached viatask, and reportsno chat trace. Any code or prompt that calls
delegatemust passname.Changed
SubAgentConfigenforces its required keys.name,description, andinstructionswere documented as required but optional to the type checker, andthe library indexed them directly, so a config missing one raised
KeyErrormiddelegation. Call sites are unchanged; both type checkers now catch it.
pydantic-ai-harness. pyright runs in strictmode,
src/has notype: ignore, mypy strict covers tests as well as source, andruff's complexity ceiling dropped from 30 to 15 with no per-function
noqa.TaskHandle.usageisRunUsage | None,finish_reasonisFinishReason | None,and
TaskManager.handlesisdict[str, TaskHandle].ToolsetFactoryreturns aSequence, so a factory annotatedlist[FunctionToolset[MyDeps]]satisfies it —listis invariant.toolset.pysplit into focused modules (_execution,_observability,_chat_trace,_state), with the historical names still importable fromsubagents_pydantic_ai.toolset.steering, chat traces,
failure handling, and
usage limits; API reference pages for the
registry, message bus, retry, spec, and dynamic-agent helpers; a changelog page.
Corrected the stale tool and feature tables on the index, the
general_purpose_configparameter that never existed, and the nesting guide'sclaim that
max_nesting_depthenforces a limit — it does not, the gate is whattoolsets_factoryhands the child. Snippets indocs/andREADME.mdare nowchecked for syntax and API drift by
tests/test_docs.py.v0.2.11Compare Source
Added
Configurable delegation modes, including one-shot
delegate(#50).delegation_configurationoncreate_subagent_toolsetandSubAgentCapabilitypicks which delegation entry points the orchestrator sees, so an application exposes only the delegation behaviour it needs instead of every creation and execution option at once:"default":taskonly"persisted":create_agent+task"persisted_and_oneshot":create_agent+task+delegate"oneshot_only":delegateonly"default"is the existing tool surface, so upgrading adds nothing to a deployed orchestrator. Async lifecycle tools (check_task,wait_tasks,answer_subagent,send_message_to_subagent, cancellation) remain available in every mode.One-shot delegation via
delegate. Builds an ephemeral specialist frominstructionsand runs its task in a single call, for ad-hoc work that does not deserve a named, reusable agent. A one-shot never enters the registry, never counts againstmax_agents, and cannot collide with a persisted agent's name. It also reports noChat Trace IDand stores no history:taskcan never resolve an unregistered specialist, so the id would be unredeemable, and keeping its history would let a one-shot fan-out evict genuinely continuable conversations from themax_chat_tracesLRU.Dynamic specialists configurable from the subagent toolset.
create_subagent_toolsetandSubAgentCapabilitynow takeallowed_models,capabilities_map,default_agent_factory, andmax_agents, previously reachable only throughcreate_agent_factory_toolset. The shared validation and construction path lives in the newdynamic_agent.py, so both entry points enforce identical rules. Note that"persisted"and"persisted_and_oneshot"cannot be combined withcreate_agent_factory_toolseton one agent — both define acreate_agenttool and pydantic-ai rejects duplicate tool names across toolsets. Pair"default"with the factory toolset over a shared registry when the parent also needslist_agents/remove_agent; see the dynamic-agents guide.Configuration a mode cannot reach is rejected at construction. Hiding a tool also hides everything only that tool reads, so
create_subagent_toolsetandSubAgentCapabilityraiseValueErrorrather than silently dropping arguments that could never take effect:"oneshot_only"rejectssubagentsandregistry(both reachable only throughtask), and"default"rejectsallowed_models,capabilities_map, anddefault_agent_factory(read only bycreate_agentanddelegate).Fixed
can_ask_questionswas a no-op for dynamically created agents. Agents built at runtime never received theask_parenttoolset that statically compiled subagents get, so a dynamic agent configured to ask its parent had no tool with which to do it. The toolset now injectsask_parentwhen executing a registry-backed or one-shot agent. A customdefault_agent_factorymust not attach its ownask_parent, or the tool name is duplicated at run time.Changed
registryanddefault_agent_factoryare precisely typed.registryis nowDynamicAgentRegistry | None(wasAny), since the toolset callsget_compiled,list_agents,exists, andregisteron it directly, anddefault_agent_factoryuses the new publicAgentFactoryalias (wasAny) acrosscreate_subagent_toolset,create_agent_factory_toolset, andSubAgentCapability. Runtime behaviour is unchanged, but a downstream type-checker may now flag a duck-typed registry object.Configuration
📅 Schedule: (UTC)
🚦 Automerge: Enabled.
♻ Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.