* refactor(goal): sustain one ReAct run until the goal closes Keep active goals in the same runner beyond the ordinary iteration limit, with a final answer after successful closure. Remove cross-turn goal handoffs, continuation allowances and rollback bookkeeping while preserving input authorization, recovery, cancellation and terminal lifecycle ownership. Contributes to NAN-392 Co-authored-by: chengyongru <chengyongru.ai@gmail.com> * test(goal): consolidate sustained-run regression coverage Retain lifecycle, history, usage, provider-state privacy and checkpoint cancellation assertions in the existing long-run scenarios. Remove duplicate smoke cases and parameter combinations that do not exercise distinct behavior; keep real Gateway, authorization and generation regressions.
19 lines
627 B
Python
19 lines
627 B
Python
from typing import TYPE_CHECKING, Callable
|
|
|
|
from nanobot.command.router import CommandContext, CommandRouter
|
|
|
|
if TYPE_CHECKING:
|
|
from nanobot.command.application import register_builtin_commands
|
|
|
|
|
|
def __getattr__(name: str) -> Callable[[CommandRouter], None]:
|
|
if name == "register_builtin_commands":
|
|
from nanobot.command.application import register_builtin_commands
|
|
|
|
globals()[name] = register_builtin_commands
|
|
return register_builtin_commands
|
|
raise AttributeError(f"module {__name__!r} has no attribute {name!r}")
|
|
|
|
|
|
__all__ = ["CommandContext", "CommandRouter", "register_builtin_commands"]
|