feat: complete ONI Agent project with full Mod API, Python toolchain, and development guide
- Implement all Mod API endpoints (buildings, research, geysers, alerts, critters, deconstruct, prioritize, research, schedule, wardrobe) - Enhance Python tools with comprehensive CLI, analysis (O2/food/power/temp/water), and 7 blueprints (SPOM, toilet, ranch, farm, cooling, bedroom) - Add utility scripts: auto_repair, auto_analyze, watch mode, setup - Write Agent-Mod integration constraints and development guide - Create skills directory with ONI agent skill definition
This commit is contained in:
26
scripts/watch.sh
Executable file
26
scripts/watch.sh
Executable file
@ -0,0 +1,26 @@
|
||||
#!/usr/bin/env bash
|
||||
# ONI Agent - Watch Mode
|
||||
# Continuously polls game state and runs analysis on a timer.
|
||||
set -euo pipefail
|
||||
|
||||
SCRIPT_DIR="$(dirname "$0")"
|
||||
TOOLS_DIR="$SCRIPT_DIR/../tools"
|
||||
INTERVAL=${1:-60}
|
||||
|
||||
if ! [[ "$INTERVAL" =~ ^[0-9]+$ ]] || [ "$INTERVAL" -lt 10 ]; then
|
||||
echo "Usage: watch.sh [interval_seconds] (minimum 10)"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "[ONI Agent] Watch mode started (interval: ${INTERVAL}s)"
|
||||
echo "Press Ctrl+C to stop."
|
||||
echo ""
|
||||
|
||||
while true; do
|
||||
clear 2>/dev/null || true
|
||||
output=$(python3 "$TOOLS_DIR/oni_analyzer.py" 2>&1)
|
||||
echo "$output"
|
||||
echo ""
|
||||
echo "[Next update in ${INTERVAL}s...]"
|
||||
sleep "$INTERVAL"
|
||||
done
|
||||
Reference in New Issue
Block a user