27 lines
953 B
Bash
Executable File
27 lines
953 B
Bash
Executable File
#!/bin/bash
|
|
# v76-scripts/autowire-scan.sh · trigger + show results
|
|
bash /opt/weval-l99/wevia-autointent-sync.sh 2>&1 | head -1
|
|
echo ""
|
|
if [ -f /tmp/weval-autointent/last-scan.json ]; then
|
|
python3 << PYEOF
|
|
import json
|
|
with open("/tmp/weval-autointent/last-scan.json") as f:
|
|
d = json.load(f)
|
|
print(f"Auto-Wire Scan · {d.get('patterns_found', 0)} patterns candidates")
|
|
print(f"Status: {d.get('status')}")
|
|
print()
|
|
print("Top patterns:")
|
|
tc = d.get("top_candidates", {})
|
|
for sig, info in list(tc.items())[:10]:
|
|
kw = info.get("keywords", [])
|
|
if isinstance(kw, dict): kw = list(kw.values())
|
|
samp = info.get("samples",[""])[0][:60]
|
|
print(f" - count={info.get('count')} kw={kw[:4]} sample='{samp}'")
|
|
print()
|
|
print("Pour proposer un intent: POST /api/wevia-auto-intent.php?action=propose")
|
|
print("Pour voir les proposals: GET /api/wevia-auto-intent.php?action=list")
|
|
PYEOF
|
|
else
|
|
echo "No scan yet · will populate via cron */10 min"
|
|
fi
|