fix(fase2): mypy-clean src — typed workflow factory + third-party stub config
This commit is contained in:
parent
7491367fb6
commit
4e87e473e4
2 changed files with 13 additions and 2 deletions
|
|
@ -45,3 +45,11 @@ src = ["src", "tests", "spikes"]
|
|||
pythonpath = ["src", "."]
|
||||
testpaths = ["tests"]
|
||||
asyncio_mode = "auto"
|
||||
|
||||
[tool.mypy]
|
||||
python_version = "3.10"
|
||||
|
||||
# Third-party libs without bundled type stubs (py.typed) — analysed as untyped, not errors.
|
||||
[[tool.mypy.overrides]]
|
||||
module = ["pulp.*", "agent_framework_foundry.*"]
|
||||
ignore_missing_imports = true
|
||||
|
|
|
|||
|
|
@ -18,6 +18,7 @@ resume is fragile; the durable verdict is captured out-of-band in Step 12).
|
|||
from __future__ import annotations
|
||||
|
||||
from collections.abc import Callable, Sequence
|
||||
from typing import Any
|
||||
|
||||
from agent_framework import Agent, BaseChatClient, Message
|
||||
from agent_framework.orchestrations import GroupChatBuilder
|
||||
|
|
@ -54,13 +55,15 @@ def fresh_workflow(
|
|||
*,
|
||||
max_rounds: int = 3,
|
||||
enable_layer1_hitl: bool = False,
|
||||
) -> object:
|
||||
) -> Any:
|
||||
"""Build a FRESH maker-checker GroupChat with FRESH clients per call (B7). Bounded by
|
||||
``with_max_rounds`` (B4) plus a higher turn-count termination safety net. ``client_factory``
|
||||
is called once per role, so each run owns its own clients — no state survives between runs.
|
||||
"""
|
||||
agents = maker_checker_agents(client_factory)
|
||||
names = [a.name for a in agents]
|
||||
# Agents are built from _MAKER_CHECKER_ROLES in order with name=role, so the role tuple
|
||||
# IS the (typed, non-None) name list the selector cycles over.
|
||||
names: list[str] = list(_MAKER_CHECKER_ROLES)
|
||||
counter = {"n": 0}
|
||||
|
||||
def select(_state: object) -> str:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue