feat(exec): add template aliases, tolerant read-only validation, and thread titling filter
This commit is contained in:
+11
-2
@@ -59,7 +59,7 @@ PIPELINES_FILE = NETVM_ROOT / "pipelines.json"
|
||||
JOB_DISPATCH_PY = BIN_DIR / "job-dispatch.py"
|
||||
|
||||
# Agent Constants
|
||||
VALID_NODES = ["muse", "pip", "646", "opm"]
|
||||
VALID_NODES = ["muse", "pip", "646", "opm", "def", "dev"]
|
||||
DEFAULT_SENDER = "super"
|
||||
DEFAULT_AGENT_SIDECHATS = {
|
||||
"646": "646 tasks",
|
||||
@@ -177,6 +177,8 @@ def get_node_network_info(node: str) -> dict:
|
||||
"pip": 9420,
|
||||
"646": 9430,
|
||||
"opm": 9440,
|
||||
"def": 9450,
|
||||
"dev": 9460,
|
||||
}
|
||||
cdp_port = pinned_ports.get(node, 9222 + int(tag[4:7], 16) % 2000)
|
||||
|
||||
@@ -1176,12 +1178,18 @@ def cmd_thread_list(args):
|
||||
agent = args.agent
|
||||
threads = []
|
||||
|
||||
def is_noise(title):
|
||||
t = (title or "").lower().strip()
|
||||
return bool(re.search(r"generate.*(chat|session)?.*title", t))
|
||||
|
||||
# Fast path: try fast headless gateway via muse_hybrid (isolated per-node WARP egress)
|
||||
try:
|
||||
import muse_hybrid
|
||||
gw_threads, gw_err = muse_hybrid.get_threads(agent)
|
||||
if gw_threads and not gw_err:
|
||||
for t in gw_threads:
|
||||
if is_noise(t.get("title")):
|
||||
continue
|
||||
threads.append({
|
||||
"id": t.get("session_id", ""),
|
||||
"kind": "thread" if t.get("thread") else "chat",
|
||||
@@ -1198,7 +1206,8 @@ def cmd_thread_list(args):
|
||||
res = subprocess.run(cmd, capture_output=True, text=True)
|
||||
try:
|
||||
data = json.loads(res.stdout)
|
||||
threads = data.get("threads", []) if data.get("ok") else []
|
||||
raw_threads = data.get("threads", []) if data.get("ok") else []
|
||||
threads = [t for t in raw_threads if not is_noise(t.get("title"))]
|
||||
except Exception:
|
||||
threads = []
|
||||
|
||||
|
||||
Reference in New Issue
Block a user