#!/bin/bash # V92 Decisions reader ยท via temp file (avoid stdin issues) TMP=$(mktemp) curl -sk --max-time 5 "http://127.0.0.1/api/wevia-decisions-api.php?action=summary" > "$TMP" 2>/dev/null python3 -c " import json with open('$TMP') as f: d = json.load(f) s = d.get('stats', {}) print('WEVIA Memoire cross-session (V92 Decisions Table)') print(f' Total: {s.get(\"total\")} Active: {s.get(\"active\")} Critical: {s.get(\"critical\")} High: {s.get(\"high\")}') print(f' Opus tracked: {s.get(\"opus_count\")} Topics: {s.get(\"topics_count\")}') print() print('Par Opus:') for o in d.get('by_opus', []): print(f' - {o[\"opus_id\"]}: {o[\"n\"]} decisions') print() print('Latest decisions:') for l in d.get('latest', []): print(f' - [{l[\"impact\"]}] {l[\"topic\"]} ({l[\"opus_id\"]})') print() print('API: /api/wevia-decisions-api.php?action=list|summary') " rm -f "$TMP"