// ADDITIVE: WAYRA — the empire's lungs (Doctrine v13, 4th edge organ). // Quechua *wayra* = "wind, air" (Wiktionary: https://en.wiktionary.org/wiki/wayra). // Route: /wayra. Always-learning firehose: live feed of last 100 ingested items // (Yuyay/novelty score badges), search box, per-source dashboard, and a per-item // "Take it and make it our own" button. Data from /api/a11oy/v1/wayra/*. // WAYRA(s) = quality(s) · novelty(s) · Yuyay_13(extract(s)) ∈ [0,1]. // Pushed by HfApi DIRECT, never GitHub Actions. import { useEffect, useState } from 'react'; type Item = { source: string; source_detail?: string; title?: string; url?: string; wayra_factor?: number; yuyay_score?: number; novelty_score?: number; decision?: string; organ_routing?: string[]; content_hash?: string; parsed_summary?: string; }; type SrcStat = { source: string; total: number; accepted: number; review: number; dropped: number; last_fetch?: string; }; const API = '/api/a11oy/v1/wayra'; function Badge({ d }: { d?: string }) { const map: Record = { accept: '#2ecc71', review: '#f1c40f', drop: '#e74c3c', }; return ( {d} ); } export function Wayra() { const [summary, setSummary] = useState(null); const [items, setItems] = useState([]); const [sources, setSources] = useState([]); const [digest, setDigest] = useState('loading…'); const [q, setQ] = useState(''); useEffect(() => { fetch(`${API}/summary`).then((r) => r.json()).then((s) => { setSummary(s); setSources(s.source_stats || []); }); fetch(`${API}/feed?limit=100`).then((r) => r.json()).then((f) => setItems(f.items || [])); fetch(`${API}/digest`).then((r) => r.json()).then((d) => setDigest(d.transcript || '')); }, []); useEffect(() => { const t = setTimeout(() => { const url = q ? `${API}/search?q=${encodeURIComponent(q)}` : `${API}/feed?limit=100`; fetch(url).then((r) => r.json()).then((r) => setItems(r.items || [])); }, 220); return () => clearTimeout(t); }, [q]); async function takeIt(hash?: string) { if (!hash) return; const r = await fetch(`${API}/take-it`, { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify({ content_hash: hash }), }).then((x) => x.json()); if (r.ok) { alert(`Drafted ${r.draft.kind} for ${r.draft.target_organ} — ${r.draft.status}.\n\n${r.draft.title}`); } else { alert(`Could not draft: ${r.error || 'unknown'}`); } } const t = summary?.totals; return (

WAYRA · the empire's lungs

Quechua wayra = wind, air ( Wiktionary) · Doctrine v13, 4th edge organ · always-learning firehose · WAYRA(s) = quality · novelty · Yuyay₁₃ ∈ [0,1]
{t && [ ['events', t.events], ['receipts', t.receipts], ['chain', t.chain_verified ? 'verified' : 'broken'], ['sources', sources.length], ['daily cap', summary.thresholds?.daily_cap], ].map(([l, n]) => (
{String(n)}
{String(l)}
))}
Live feed — last 100 ingested items setQ(e.target.value)} placeholder="Search anything WAYRA has seen…" style={{ width: '100%', padding: '9px 12px', margin: '10px 0', background: '#0e1620', border: '1px solid #1f2c3a', borderRadius: 8, color: '#e7eef6', }} />
{items.map((it, i) => ( ))}
SourceItemWAYRAYuyayNov DecisionRoute
{it.source}
{it.source_detail}
{(it.title || '').slice(0, 90)} {(it.wayra_factor || 0).toFixed(2)} {(it.yuyay_score || 0).toFixed(2)} {(it.novelty_score || 0).toFixed(2)} {(it.organ_routing || []).join(', ')} {it.decision === 'accept' && ( )}
Per-source dashboard {sources.map((s) => ( ))}
SourceTotalAccRevDrop
{s.source}{s.total}{s.accepted} {s.review}{s.dropped}
Hatun-Willay digest — Wallpa-narrated top-5
{digest}
RECEIVE-ONLY from public sources · Khipu receipt on every event · Yuyay-13 gate enforced · daily cap 50 · HfApi direct push, never GitHub Actions.
); }