[hAIk]: refactor AgentCard and BrowserCard into subdirectory modules, plumb dashboard_id from launch through Agent/AgentSnapshot, add on_done auto-persist callback, fix get_all_sessions to use GET query params, atomic PydanticStore writes, graceful backend shutdown in local.sh, and add mode config JSONs

This commit is contained in:
haikdc
2026-04-18 12:05:50 -07:00
parent 21a723a45b
commit 6a9dd59eec
22 changed files with 139 additions and 91 deletions
+5 -2
View File
@@ -40,12 +40,15 @@ cleanup() {
echo ""
echo -e "${YELLOW}${BOLD}Gracefully shutting down all services...${RESET}"
for pid in $ELECTRON_PID $BACKEND_PID $FRONTEND_PID; do
# Send SIGTERM to top-level PIDs only (not recursively) so uvicorn
# can run its lifespan teardown before child processes are killed.
for pid in $ELECTRON_PID $FRONTEND_PID; do
[[ -n "$pid" ]] && kill_tree "$pid" TERM
done
[[ -n "$BACKEND_PID" ]] && kill -TERM "$BACKEND_PID" 2>/dev/null
local elapsed=0
while (( elapsed < 5 )); do
while (( elapsed < 10 )); do
local alive=false
for pid in $ELECTRON_PID $BACKEND_PID $FRONTEND_PID; do
[[ -n "$pid" ]] && kill -0 "$pid" 2>/dev/null && alive=true