optz: Goal orchestrator

This commit is contained in:
thanhnv
2026-07-11 12:18:59 +09:00
parent b56f7d357e
commit 4fc72332f5
34 changed files with 850 additions and 452 deletions
@@ -28,6 +28,10 @@ mkdir -p "$(dirname "$PIN_FILE")"
CMD="${1:-verify}"
MODEL="${2:-${CASAN_MODEL:-ornith:9b}}"
OLLAMA="${OLLAMA_HOST:-127.0.0.1:11434}"
case "$OLLAMA" in
http://*|https://*) OLLAMA_BASE="${OLLAMA%/}" ;;
*) OLLAMA_BASE="http://${OLLAMA%/}" ;;
esac
current_digest() {
# 1) explicit override (deterministic for CI/tests) — DISABLED in enforced mode.
@@ -44,7 +48,7 @@ current_digest() {
fi
# 2) live Ollama
local d
d="$(curl -sf "http://$OLLAMA/api/tags" 2>/dev/null | \
d="$(curl -sf "$OLLAMA_BASE/api/tags" 2>/dev/null | \
python3 -c "import json,sys
m=sys.argv[1]
try: d=json.load(sys.stdin)