feat(agent): hierarchical executor with path resolve, runtime probe, quiet UI
Make Zed Agent closer to Cursor: deterministic DevOps path index, live Traefik port probe before blind edits, stop-after-edit, and quieter Russian progress.
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
ROOT="$(cd "$(dirname "$0")/.." && pwd)"
|
||||
cd "$ROOT"
|
||||
PYTHONPATH=router python3 -m py_compile router/agent_hier.py router/router.py
|
||||
PYTHONPATH=router python3 -m unittest discover -s test/unit -q
|
||||
scp router/agent_hier.py router/router.py \
|
||||
eventhub-ift:/opt/ai-router-stack/router/
|
||||
scp config/orchestration.yaml eventhub-ift:/opt/ai-router-stack/config/
|
||||
ssh -o BatchMode=yes eventhub-ift bash -s <<'REMOTE'
|
||||
set -euo pipefail
|
||||
cd /opt/ai-router-stack
|
||||
set -a; source .env; set +a
|
||||
sed -i 's/\r$//' router/agent_hier.py router/router.py config/orchestration.yaml || true
|
||||
docker build -f router/Dockerfile -t "${ROUTER_IMAGE:-git.sabilin.com/eventhub/ai-router-gateway:ift}" .
|
||||
TS=$(date +%Y%m%d%H%M%S)
|
||||
ORCH="orchestration_config_${TS}"
|
||||
docker config create "$ORCH" ./config/orchestration.yaml
|
||||
OLD_ORCH=$(docker service inspect ai-router_router --format '{{range .Spec.TaskTemplate.ContainerSpec.Configs}}{{println .ConfigName}}{{end}}' | grep orchestration | tail -1 || true)
|
||||
RARGS=(--image "${ROUTER_IMAGE:-git.sabilin.com/eventhub/ai-router-gateway:ift}" --force)
|
||||
RARGS+=(--config-add "source=${ORCH},target=/app/config/orchestration.yaml")
|
||||
[[ -n "${OLD_ORCH:-}" ]] && RARGS+=(--config-rm "$OLD_ORCH")
|
||||
docker service update "${RARGS[@]}" ai-router_router >/dev/null
|
||||
for i in $(seq 1 40); do
|
||||
curl -sf --max-time 5 https://ai-router.ift.calentiq.com/health >/dev/null && break
|
||||
sleep 2
|
||||
done
|
||||
docker exec "$(docker ps -q -f name=ai-router_router | head -1)" \
|
||||
grep -E 'executor_tool_loop_timeout_sec|executor_escalate_after_read|executor_rewrite_reread|executor_newest_tool' \
|
||||
/app/config/orchestration.yaml
|
||||
echo FAST_AFTER_READ_OK
|
||||
REMOTE
|
||||
Reference in New Issue
Block a user