forked from Keelrleek/Harbor
watch.py: --ignore AGENT,... skips stalls already reported
This commit is contained in:
1 parent
2fb62fa105
commit
440f148c87
1 file changed
+3
@@ -57,6 +57,7 @@ def main():
|
|||||||
ap.add_argument("--every", type=float, default=60)
|
ap.add_argument("--every", type=float, default=60)
|
||||||
ap.add_argument("--stall", type=float, default=15, help="minutes without a tool call before a running agent "
|
ap.add_argument("--stall", type=float, default=15, help="minutes without a tool call before a running agent "
|
||||||
"counts as stalled (0: off)")
|
"counts as stalled (0: off)")
|
||||||
|
ap.add_argument("--ignore", default="", help="comma-separated agents whose stalls are already reported")
|
||||||
ap.add_argument("--quiet-traffic", action="store_true",
|
ap.add_argument("--quiet-traffic", action="store_true",
|
||||||
help="skip review items and messages (helpers handle them); wake only on stalls, stops and resting")
|
help="skip review items and messages (helpers handle them); wake only on stalls, stops and resting")
|
||||||
args = ap.parse_args()
|
args = ap.parse_args()
|
||||||
@@ -85,6 +86,8 @@ def main():
|
|||||||
if now["resting"] != start["resting"] and now["resting"]:
|
if now["resting"] != start["resting"] and now["resting"]:
|
||||||
found.append("resting under autopilot: " + ", ".join(k.split(":", 1)[1] for (k,) in now["resting"]))
|
found.append("resting under autopilot: " + ", ".join(k.split(":", 1)[1] for (k,) in now["resting"]))
|
||||||
for agent, last in stalled(conn, project, args.me, args.stall):
|
for agent, last in stalled(conn, project, args.me, args.stall):
|
||||||
|
if agent in {a.strip() for a in args.ignore.split(",") if a.strip()}:
|
||||||
|
continue
|
||||||
found.append(f"stalled: {agent} has made no tool call since {last[11:16]}Z (not stopped) - wake it")
|
found.append(f"stalled: {agent} has made no tool call since {last[11:16]}Z (not stopped) - wake it")
|
||||||
if found:
|
if found:
|
||||||
print("\n".join(found))
|
print("\n".join(found))
|
||||||
|
|||||||
Reference in new issue
Block a user