Add job auto-work-sweep-j10 via box-ctl
This commit is contained in:
@@ -24,3 +24,4 @@ chained-jobs.json
|
||||
ssl/
|
||||
job-scheduler-state.json
|
||||
var/
|
||||
swarms.json
|
||||
|
||||
@@ -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 <agent> [--thread <id>] [--title <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)
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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"
|
||||
}
|
||||
Reference in New Issue
Block a user