feat(main-loop): expand fleet dual monitoring to dev, verify box-relay paths and sidechat brain execution
This commit is contained in:
+21
-3
@@ -30,6 +30,10 @@ if [ -z "$AGENT" ]; then
|
||||
AGENT="muse"
|
||||
elif echo "$HOSTNAME" | grep -qi "opm"; then
|
||||
AGENT="opm"
|
||||
elif echo "$HOSTNAME" | grep -qi "dev"; then
|
||||
AGENT="dev"
|
||||
elif echo "$HOSTNAME" | grep -qi "def"; then
|
||||
AGENT="def"
|
||||
else
|
||||
AGENT="646"
|
||||
fi
|
||||
@@ -71,6 +75,9 @@ except Exception as e:
|
||||
key="$HOME/.ssh/id_ed25519"
|
||||
fi
|
||||
local ident="operator-$AGENT"
|
||||
if [ "$AGENT" = "super" ]; then
|
||||
ident="super"
|
||||
fi
|
||||
local ts
|
||||
ts=$(date +%s)
|
||||
local nonce
|
||||
@@ -212,9 +219,20 @@ case "$cmd" in
|
||||
call_exec "thread.list" "$args"
|
||||
;;
|
||||
view)
|
||||
thread_id="${1:?usage: box thread view <thread_id> [limit]}"
|
||||
target_agent="$AGENT"
|
||||
while [ $# -gt 0 ]; do
|
||||
case "$1" in
|
||||
--agent) target_agent="$2"; shift 2 ;;
|
||||
*) break ;;
|
||||
esac
|
||||
done
|
||||
if [ $# -ge 2 ] && echo " 646 opm pip muse dev def " | grep -q " $1 "; then
|
||||
target_agent="$1"
|
||||
shift
|
||||
fi
|
||||
thread_id="${1:?usage: box thread view [<agent>] <thread_id> [limit]}"
|
||||
limit="${2:-15}"
|
||||
args=$(python3 -c "import json, sys; print(json.dumps({'agent': sys.argv[1], 'thread': sys.argv[2], 'limit': int(sys.argv[3])}))" "$AGENT" "$thread_id" "$limit")
|
||||
args=$(python3 -c "import json, sys; print(json.dumps({'agent': sys.argv[1], 'thread': sys.argv[2], 'limit': int(sys.argv[3])}))" "$target_agent" "$thread_id" "$limit")
|
||||
call_exec "thread.view" "$args"
|
||||
;;
|
||||
*)
|
||||
@@ -229,7 +247,7 @@ case "$cmd" in
|
||||
call_exec "exec.ping" "{}"
|
||||
;;
|
||||
ops)
|
||||
curl -sk -sS "$EXEC_URL/ops" | python3 -m json.tool
|
||||
curl -sk -sS "${EXEC_URL%/exec}/ops" | python3 -m json.tool
|
||||
;;
|
||||
help|--help|-h)
|
||||
cat <<EOF
|
||||
|
||||
Reference in New Issue
Block a user