#!/usr/bin/env bash # _resolve.sh — shared helper: given a fleet project name, echo "\t\t". # Sourced by start/stop/update scripts. Reads the PO's fleet.toml (the only project↔location record). set -euo pipefail PO_ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)" resolve_project() { local name="$1" python3 - "$PO_ROOT/fleet.toml" "$name" <<'PY' import sys, tomllib path, name = sys.argv[1], sys.argv[2] with open(path, "rb") as f: raw = tomllib.load(f) for p in raw.get("project", []): if p.get("name") == name: print("\t".join([p.get("location", ""), p.get("config", "agents.toml"), p.get("harness", "")])) sys.exit(0) sys.exit(f"_resolve: no project named {name!r} in {path}") PY }