Complete agent monitoring and Galaxy Control integration
- expose command-monitor conversations and preserve visible agent transcripts - add bounded polling and a dedicated shell interrupt tool - improve direct-provider images, skills, tool history, and usage handling - package and brand Galaxy Control across releases, installers, persistence, and docs
This commit is contained in:
Executable
+56
@@ -0,0 +1,56 @@
|
||||
#!/usr/bin/env bash
|
||||
set -e
|
||||
|
||||
workspace_root="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
|
||||
discovery_dir="$(mktemp -d)"
|
||||
trap 'rm -rf "$discovery_dir"' EXIT
|
||||
|
||||
python3 - "$workspace_root" "$discovery_dir" <<'PY'
|
||||
import json
|
||||
import os
|
||||
import pathlib
|
||||
import subprocess
|
||||
import sys
|
||||
|
||||
workspace_root = pathlib.Path(sys.argv[1])
|
||||
discovery_dir = sys.argv[2]
|
||||
environment = os.environ.copy()
|
||||
environment["GALAXY_LOCAL_CONTROL_DISCOVERY_DIR"] = discovery_dir
|
||||
result = subprocess.run(
|
||||
[
|
||||
"cargo",
|
||||
"run",
|
||||
"-p",
|
||||
"galaxy",
|
||||
"--bin",
|
||||
"galaxy-oss",
|
||||
"--features",
|
||||
"galaxy_control_cli",
|
||||
"--",
|
||||
"--galaxyctrl",
|
||||
"--output-format",
|
||||
"json",
|
||||
"instance",
|
||||
"list",
|
||||
],
|
||||
cwd=workspace_root,
|
||||
env=environment,
|
||||
capture_output=True,
|
||||
text=True,
|
||||
timeout=600,
|
||||
)
|
||||
if result.returncode != 0:
|
||||
sys.stderr.write(result.stderr)
|
||||
sys.stderr.write(result.stdout)
|
||||
raise SystemExit(result.returncode)
|
||||
try:
|
||||
output = json.loads(result.stdout)
|
||||
except json.JSONDecodeError as error:
|
||||
sys.stderr.write(result.stderr)
|
||||
sys.stderr.write(f"invalid galaxyctrl JSON output: {error}: {result.stdout!r}\n")
|
||||
raise SystemExit(1)
|
||||
if output != {"instances": []}:
|
||||
sys.stderr.write(result.stderr)
|
||||
sys.stderr.write(f"unexpected galaxyctrl output: {output!r}\n")
|
||||
raise SystemExit(1)
|
||||
PY
|
||||
Reference in New Issue
Block a user