diff --git a/.gitignore b/.gitignore index 6f7d20b..8769013 100644 --- a/.gitignore +++ b/.gitignore @@ -24,3 +24,4 @@ chained-jobs.json ssl/ job-scheduler-state.json var/ +swarms.json diff --git a/bin/box-ctl.py b/bin/box-ctl.py index 9af91a0..1c6efeb 100755 --- a/bin/box-ctl.py +++ b/bin/box-ctl.py @@ -2812,30 +2812,6 @@ def main(argv): elif action == "loop-remediate": dry = "--dry-run" in rest act_loop_remediate(dry_run=dry) - elif action in ("thread-list", "thread-pin", "thread-unpin", - "thread-archive", "thread-unarchive", "thread-rename"): - op = action[len("thread-"):] - agent = None - thread = None - title = None - idx = 0 - while idx < len(rest): - if rest[idx] == "--agent" and idx + 1 < len(rest): - agent = rest[idx + 1] - idx += 2 - elif rest[idx] == "--thread" and idx + 1 < len(rest): - thread = rest[idx + 1] - idx += 2 - elif rest[idx] == "--title" and idx + 1 < len(rest): - title = rest[idx + 1] - idx += 2 - else: - idx += 1 - if not agent: - fail("BAD_NAME", f"usage: {action} --agent [--thread ] [--title ]") - if op in ("pin", "unpin", "archive", "unarchive", "rename") and not thread: - fail("BAD_NAME", f"usage: {action} --agent <agent> --thread <id> [--title <title>]") - act_thread(op, agent, thread, title) elif action == "notify": # notify <agent> <message> [--sidechat <name>] [--allow-main-chat] [--sender <agent>] args = list(rest) diff --git a/bin/dm.py b/bin/dm.py index 8695b58..67a3d01 100755 --- a/bin/dm.py +++ b/bin/dm.py @@ -1117,7 +1117,10 @@ def dm_log(n=20): lines = f.readlines() for line in lines[-n:]: e = json.loads(line) - print(f"{e['ts'][:19]} {e.get('type','?'):12} {e.get('id','-'):8} {e.get('agent','-')}/{e.get('target','-')}") + id_str = str(e.get('id') or '-') + agent_str = str(e.get('agent') or '-') + target_str = str(e.get('target') or '-') + print(f"{e['ts'][:19]} {e.get('type','?'):12} {id_str:8} {agent_str}/{target_str}") def dm_thread(from_agent, to_agent, target, message, allow_main_chat=False): """Thread from one agent to another. Attribution is applied exactly once, diff --git a/jobs/auto-work-sweep-j10.json b/jobs/auto-work-sweep-j10.json new file mode 100644 index 0000000..c90d022 --- /dev/null +++ b/jobs/auto-work-sweep-j10.json @@ -0,0 +1,15 @@ +{ + "name": "auto-work-sweep-j10", + "description": "Digest/followup sweep: nudge dev's overdue pending followups", + "agent": "646", + "schedule": "19 * * * *", + "timeout": 300, + "prompt_template": "Check dev's pending followups: read followups.json, find entries past their reply-timeout with no recorded result. Nudge each overdue one once via DM (max 3 per run). Skip entries already nudged twice. Report counts back to Box, closing with the standard result verb for this job id: nudged=N skipped=M.\n\n[TOOL files.read {\"path\": \"followups.json\"}]", + "sidechat": { + "create": true, + "reuse_key": "auto-work-sweep-j10", + "name_template": "auto-work-sweep-j10-{date}" + }, + "chain_next": null, + "on_failure": "alert" +}