feat(swarm-worker): dispatch prose swarm slots to ephemeral Muse subagents
- daemon: route non-shell slot tasks to a fresh subagent session on dev/def/muse via muse_hybrid; add bin/ to sys.path so muse_hybrid/prompt_envelope import under the tmux supervisor - prompt_envelope: add wrap_subagent_task() - plain task assignment without [TOOL tmux/swarm/cron] meta tags (subagents refused those as relayed test traffic) - box-ctl/reporter: swarm-attach accepts optional session-id, stored as slot.subagent_session_id - executor: _looks_like_shell requires an existing executable (prose like 'verify ...' no longer misread as shell) - poller: pick up pending swarms as well as running - response-harvester: monitor running slot subagent sessions from swarms.json, allow '/' in RESULT/VERB job ids, archive ephemeral threads on any verdict (OK or FAIL), reap slot sessions for terminal swarms
This commit is contained in:
@@ -119,3 +119,18 @@ def wrap(job_name, job_id, agent, target, rendered):
|
||||
bottom += f"Conclude with your [RESULT {job_id}] line reporting outcomes.\n"
|
||||
return top + rendered.strip() + "\n" + bottom
|
||||
|
||||
|
||||
def wrap_subagent_task(job_id, task_text):
|
||||
"""Format an authentic direct task assignment for a subagent worker without test-traffic meta tags."""
|
||||
return (
|
||||
f"Operator assignment for swarm slot {job_id}:\n\n"
|
||||
f"Task:\n"
|
||||
f"{task_text.strip()}\n\n"
|
||||
f"Instructions:\n"
|
||||
f"1. Carry out this task directly using your available tools.\n"
|
||||
f"2. When finished, conclude your final response with your verdict line:\n"
|
||||
f"[RESULT {job_id}] OK: <one-line summary of actions and outcome>\n"
|
||||
f"(or [RESULT {job_id}] FAIL: <reason> if the task could not be completed)\n"
|
||||
)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user