Skip to content

Commit f288c29

Browse files
committed
fix: fixed a bug in workflow agent steps (fixes #40)
1 parent b9ce6a9 commit f288c29

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

nerve/runtime/__init__.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ async def build(
3333
# import tools from builtin namespaces
3434
ns_tools = compiler.get_tools_from_namespaces(configuration.using, configuration.jail)
3535
if ns_tools:
36-
logger.info(f"🧰 importing {len(ns_tools)} tools from: {configuration.using}")
36+
logger.debug(f"🧰 importing {len(ns_tools)} tools from: {configuration.using}")
3737
runtime.tools.extend(ns_tools)
3838

3939
# import custom tools from yaml definition
@@ -42,7 +42,7 @@ async def build(
4242
[tool for tool in configuration.tools if isinstance(tool, Tool) and not tool.path],
4343
)
4444
if yml_tools:
45-
logger.info(f"🧰 importing {len(yml_tools)} tools from: {working_dir}")
45+
logger.debug(f"🧰 importing {len(yml_tools)} tools from: {working_dir}")
4646
runtime.tools.extend(yml_tools)
4747

4848
# import custom tools from files
@@ -51,13 +51,13 @@ async def build(
5151
[tool.path for tool in configuration.tools if isinstance(tool, Tool) and tool.path],
5252
)
5353
if py_tools:
54-
logger.info(f"🧰 importing {len(py_tools)} tools from: {working_dir}")
54+
logger.debug(f"🧰 importing {len(py_tools)} tools from: {working_dir}")
5555
runtime.tools.extend(py_tools)
5656

5757
# import custom tools from functions (when used as sdk)
5858
funcs = [compiler.wrap_tool_function(tool) for tool in configuration.tools if callable(tool)]
5959
if funcs:
60-
logger.info(f"🧰 importing {len(funcs)} custom tools")
60+
logger.debug(f"🧰 importing {len(funcs)} custom tools")
6161
runtime.tools.extend(funcs)
6262

6363
# import MCP servers

nerve/runtime/flow.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,7 @@ async def step(self) -> None:
135135
if state.is_active_task_done():
136136
logger.debug(f"task {self.curr_actor.runtime.name} complete") # type: ignore
137137
self.curr_actor_idx += 1
138+
self.curr_actor = None
138139
state.reset()
139140

140141
self.curr_step += 1
@@ -167,6 +168,7 @@ async def _reset(self) -> None:
167168
state.reset()
168169
await self.shell.reset()
169170
self.curr_actor_idx = 0
171+
self.curr_actor = None
170172

171173
async def run(self, task_override: str | None = None) -> None:
172174
state.on_event(

0 commit comments

Comments
 (0)