@baimingtao/lbs-agent 1.5.0 → 1.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -78,20 +78,18 @@ def cmd_run_agent(config: AppConfig, agent_name: str, task: str) -> None:
|
|
|
78
78
|
except Exception as e:
|
|
79
79
|
print(f" [WARN] session save failed: {e}")
|
|
80
80
|
|
|
81
|
-
from runtime.orchestration.display import green, red, faint, pink,
|
|
82
|
-
sep = color("─" * 52, Colors.FAINT)
|
|
81
|
+
from runtime.orchestration.display import green, red, faint, pink, mint, bold
|
|
83
82
|
icon = green("✓") if result.success else red("✕")
|
|
84
|
-
print(
|
|
83
|
+
print()
|
|
85
84
|
print(f" {icon} {bold(result.agent_name)}")
|
|
86
85
|
parts = [
|
|
87
86
|
faint(f"iter {result.iterations}"),
|
|
88
87
|
faint(f"tools {result.total_tool_calls}"),
|
|
89
|
-
|
|
88
|
+
mint(f"{result.duration_seconds:.1f}s"),
|
|
90
89
|
]
|
|
91
|
-
print("
|
|
90
|
+
print(f" {faint(' · ').join(parts)}")
|
|
92
91
|
if result.error:
|
|
93
92
|
print(f" {red(result.error[:200])}")
|
|
94
|
-
print(sep)
|
|
95
93
|
print()
|
|
96
94
|
if result.content:
|
|
97
95
|
print(result.content)
|
|
@@ -100,10 +98,9 @@ def cmd_run_agent(config: AppConfig, agent_name: str, task: str) -> None:
|
|
|
100
98
|
print()
|
|
101
99
|
|
|
102
100
|
if result.steps:
|
|
103
|
-
print(f" {faint('trace')}")
|
|
104
101
|
for step in result.steps:
|
|
105
102
|
tools = ", ".join(t.name for t in step.tool_execs) if step.tool_execs else "-"
|
|
106
|
-
print(f"
|
|
103
|
+
print(f" {faint(f'{step.iteration:02d}')} {pink('·')} {faint(tools)}")
|
|
107
104
|
print()
|
|
108
105
|
finally:
|
|
109
106
|
container.shutdown()
|
package/package.json
CHANGED
|
@@ -252,19 +252,18 @@ class AgentLoop:
|
|
|
252
252
|
|
|
253
253
|
logger.info("[%s] loop started (%s): %s", self.config.name, mode, task[:100])
|
|
254
254
|
if self.config.report_progress:
|
|
255
|
-
from runtime.orchestration.display import pink, purple, mint, faint, bold
|
|
256
|
-
sep = color("─" * 52, Colors.FAINT)
|
|
257
|
-
self._print(f"\n{sep}")
|
|
255
|
+
from runtime.orchestration.display import pink, purple, mint, faint, bold
|
|
258
256
|
agent_label = self.config.display_name or self.config.name
|
|
257
|
+
self._print("")
|
|
259
258
|
self._print(f" {purple('◐')} {bold(agent_label)}")
|
|
260
259
|
chain = [self.config.model] + self.config.fallback_models
|
|
261
260
|
model_str = faint(" → ").join(pink(m) for m in chain)
|
|
262
|
-
self._print(f"
|
|
261
|
+
self._print(f" {model_str}")
|
|
263
262
|
tools_list = self.config.tools or []
|
|
264
263
|
if tools_list:
|
|
265
264
|
tools_str = faint(", ").join(mint(t) for t in tools_list)
|
|
266
|
-
self._print(f"
|
|
267
|
-
self._print(
|
|
265
|
+
self._print(f" {tools_str}")
|
|
266
|
+
self._print("")
|
|
268
267
|
|
|
269
268
|
return tools_schema
|
|
270
269
|
|
|
@@ -2000,20 +1999,19 @@ class AgentLoop:
|
|
|
2000
1999
|
compression_results=list(self.compression_results),
|
|
2001
2000
|
)
|
|
2002
2001
|
|
|
2003
|
-
from runtime.orchestration.display import green, red, faint,
|
|
2004
|
-
sep = color("─" * 52, Colors.FAINT)
|
|
2005
|
-
self._print(f"\n{sep}")
|
|
2002
|
+
from runtime.orchestration.display import green, red, faint, mint, bold
|
|
2006
2003
|
icon = green("✓") if success else red("✕")
|
|
2004
|
+
self._print("")
|
|
2007
2005
|
self._print(f" {icon} {bold(self.config.name)}")
|
|
2008
2006
|
parts = [
|
|
2009
2007
|
faint(f"iter {self.current_iteration}"),
|
|
2010
2008
|
faint(f"tools {self._tool_call_count}"),
|
|
2011
|
-
|
|
2009
|
+
mint(f"{duration:.1f}s"),
|
|
2012
2010
|
]
|
|
2013
|
-
self._print("
|
|
2011
|
+
self._print(f" {faint(' · ').join(parts)}")
|
|
2014
2012
|
if error:
|
|
2015
2013
|
self._print(f" {red(error[:200])}")
|
|
2016
|
-
self._print(
|
|
2014
|
+
self._print("")
|
|
2017
2015
|
|
|
2018
2016
|
logger.info(
|
|
2019
2017
|
"[%s] loop finished: success=%s iterations=%d tools=%d duration=%.1fs",
|