feat: migrate agents to monorepo and update federation configs

This commit is contained in:
2026-07-17 21:15:33 +02:00
parent 38a9a11772
commit 8db07e5d21
10 changed files with 256 additions and 18 deletions
+22
View File
@@ -0,0 +1,22 @@
#!/bin/bash
# check_quotas.sh - Modular script to check quotas
export PATH="$HOME/.local/bin:$PATH"
check_codex_quota() {
if command -v codex &> /dev/null; then
echo "[Codex Quota]"
codex quota || echo "Failed to fetch Codex quota"
fi
}
check_agy_quota() {
if command -v agy &> /dev/null; then
echo "[Antigravity Quota]"
agy quota || echo "Failed to fetch Antigravity quota"
fi
}
echo "--- Current Quotas ---"
check_codex_quota
check_agy_quota
echo "----------------------"
+23
View File
@@ -0,0 +1,23 @@
#!/bin/bash
# install_clis.sh - Install configured CLIs
set -e
echo "Starting CLI installations..."
echo "Checking codex..."
if command -v codex &> /dev/null; then
echo "codex is already installed. Version: $(codex --version 2>/dev/null || echo 'unknown')"
else
echo "Installing codex via curl..."
curl -fsSL https://chatgpt.com/codex/install.sh | sh
echo "codex installed successfully."
fi
echo "Checking agy (antigravity)..."
if command -v agy &> /dev/null; then
echo "agy is already installed."
else
echo "Warning: agy is not installed. Please install it manually."
fi
echo "All CLIs are set up."
+23
View File
@@ -0,0 +1,23 @@
#!/bin/bash
# setup_apis.sh - Trigger browser login flows
set -e
export PATH="$HOME/.local/bin:$PATH"
CLIS=("codex" "agy")
echo "Starting API Configuration via Browser Login..."
for cli in "${CLIS[@]}"; do
echo "Configuring $cli..."
if command -v "$cli" &> /dev/null; then
if [ "$cli" == "agy" ]; then
"$cli" auth
else
"$cli" login
fi
echo "$cli configured."
else
echo "Warning: $cli not installed. Please run install_clis.sh first."
fi
done
echo "API setup complete."
+35
View File
@@ -0,0 +1,35 @@
#!/bin/bash
# update_models_config.sh - Fetches latest models and quotas
export PATH="$HOME/.local/bin:$PATH"
DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
CONFIG_FILE="$DIR/../models_config.json"
echo "{" > "$CONFIG_FILE"
echo " \"last_updated\": \"$(date -u +%Y-%m-%dT%H:%M:%SZ)\"," >> "$CONFIG_FILE"
# Logic to update config
echo " \"providers\": {" >> "$CONFIG_FILE"
# Codex Models
echo " \"codex\": {" >> "$CONFIG_FILE"
if command -v codex &> /dev/null; then
echo " \"models\": $(codex models --json 2>/dev/null || echo '[]')" >> "$CONFIG_FILE"
else
echo " \"models\": []" >> "$CONFIG_FILE"
fi
echo " }," >> "$CONFIG_FILE"
# Antigravity Models
echo " \"antigravity\": {" >> "$CONFIG_FILE"
if command -v agy &> /dev/null; then
echo " \"models\": $(agy models --json 2>/dev/null || echo '[]')" >> "$CONFIG_FILE"
else
echo " \"models\": []" >> "$CONFIG_FILE"
fi
echo " }" >> "$CONFIG_FILE"
echo " }" >> "$CONFIG_FILE"
echo "}" >> "$CONFIG_FILE"
echo "Models config updated at $CONFIG_FILE"