multi-harness-rl-slides / source /src /embeds /harness-ecosystem-matrix.html
sergiopaniego's picture
sergiopaniego HF Staff
Publish the deck source under source/ so the next deck can start from it
3bc016b verified
Raw History Blame Contribute Delete
6.68 kB
<div class="harness-ecosystem-matrix" style="width:100%;margin:14px 0;"></div>
<style>
.harness-ecosystem-matrix { position: relative; }
.harness-ecosystem-matrix { max-width:640px; }
.harness-ecosystem-matrix .hm-grid { display:grid; grid-template-columns: minmax(120px, 1.5fr) repeat(5, minmax(34px, .7fr)) minmax(58px, .8fr); align-items:center; }
.harness-ecosystem-matrix .hm-h { font-size:10.5px; line-height:1.25; color:var(--muted-color); padding:0 4px 8px; border-bottom:1px solid var(--border-color); text-align:center; align-self:end; }
.harness-ecosystem-matrix .hm-h.l { text-align:left; padding-left:0; }
.harness-ecosystem-matrix .hm-h b { display:block; font-weight:600; color:var(--hc, var(--muted-color)); font-size:11px; }
.harness-ecosystem-matrix .hm-row { display:contents; }
.harness-ecosystem-matrix .hm-row > div { padding:4px 4px; border-bottom:1px solid color-mix(in srgb, var(--border-color) 45%, transparent); }
.harness-ecosystem-matrix .hm-row:hover > div { background:color-mix(in srgb, var(--text-color) 4%, transparent); }
.harness-ecosystem-matrix .hm-name { padding-left:0 !important; min-width:0; }
.harness-ecosystem-matrix .hm-name b { font-size:12.5px; font-weight:600; color:var(--text-color); }
.harness-ecosystem-matrix .hm-name span { font-size:11px; color:var(--muted-color); margin-left:6px; }
.harness-ecosystem-matrix .hm-name small { display:block; font-size:11px; line-height:1.35; color:var(--muted-color); margin-top:2px; }
.harness-ecosystem-matrix .hm-c { text-align:center; }
.harness-ecosystem-matrix .dot { display:inline-block; width:12px; height:12px; border-radius:50%; border:1.6px solid var(--dc); box-sizing:border-box; }
.harness-ecosystem-matrix .dot.on { background:var(--dc); }
.harness-ecosystem-matrix .hm-span { grid-column: span 5; text-align:center; font-size:11px; color:var(--muted-color); font-style:italic; }
.harness-ecosystem-matrix .tc { display:inline-block; font-size:10px; padding:1px 6px; border-radius:999px; border:1px solid var(--border-color); color:var(--muted-color); white-space:nowrap; }
.harness-ecosystem-matrix .tc.yes { color:var(--text-color); border-color:var(--text-color); }
.harness-ecosystem-matrix .tc.no { border-style:dashed; }
.harness-ecosystem-matrix .lg { display:flex; flex-wrap:wrap; align-items:center; gap:6px 16px; margin-top:12px; font-size:12px; color:var(--muted-color); }
.harness-ecosystem-matrix .lg-t { width:100%; font-size:11px; letter-spacing:.08em; text-transform:uppercase; opacity:.75; }
.harness-ecosystem-matrix .lg .dot { --dc: var(--muted-color); vertical-align:-1px; margin-right:6px; }
.harness-ecosystem-matrix .nt { margin-top:8px; font-size:12px; line-height:1.5; color:var(--muted-color); }
@media (max-width: 640px) {
.harness-ecosystem-matrix .hm-grid { grid-template-columns: minmax(120px, 1.8fr) repeat(5, minmax(26px, .5fr)); }
.harness-ecosystem-matrix .hm-tc, .harness-ecosystem-matrix .hm-h.tc-h { display:none; }
.harness-ecosystem-matrix .hm-name small, .harness-ecosystem-matrix .hm-name span { display:none; }
.harness-ecosystem-matrix .hm-h { font-size:9.5px; padding:0 1px 6px; }
.harness-ecosystem-matrix .hm-h small { display:none; }
}
</style>
<script>
(() => {
const C = 'harness-ecosystem-matrix';
const boot = () => {
const scriptEl = document.currentScript;
let r = scriptEl ? scriptEl.previousElementSibling : null;
while (r && !(r.classList && r.classList.contains(C))) r = r.previousElementSibling;
if (!r) { const n = [...document.querySelectorAll('.'+C)].filter(e => e.dataset.mounted !== 'true'); r = n[n.length-1]; }
if (!r || r.dataset.mounted === 'true') return;
r.dataset.mounted = 'true';
const P = (i) => {
if (window.ColorPalettes && window.ColorPalettes.categorical) {
try { return window.ColorPalettes.categorical(5)[i%5]; } catch(e) {}
}
return ['rgb(232,137,171)','rgb(146,176,234)','rgb(206,192,250)','rgb(78,165,183)','rgb(170,170,178)'][i%5];
};
const esc = (t) => String(t).replace(/&/g,'&amp;').replace(/</g,'&lt;').replace(/>/g,'&gt;');
const grab = async (f) => {
for (const u of ['/data/'+f, 'assets/data/'+f, '../assets/data/'+f]) {
try { const x = await fetch(u, {cache:'no-cache'}); if (x.ok) return await x.json(); } catch(e) {}
}
throw new Error('could not load '+f);
};
// Short column heads; the full API name sits underneath on wide screens.
const HEAD = [['Anthropic','Messages'], ['OpenAI','Responses'], ['Google','generateContent'], ['chat','completions'], ['plain','text']];
grab('harness-ecosystem.json').then(D => {
const cols = D.apis.map((_, i) => P(i));
let h = `<div class="hm-grid" role="table" aria-label="Agent harnesses and the model APIs each one speaks">`
+ `<div class="hm-h l" role="columnheader">Harness</div>`
+ HEAD.map((x, i) => `<div class="hm-h" role="columnheader" style="--hc:${cols[i]}"><b>${esc(x[0])}</b><small>${esc(x[1])}</small></div>`).join('')
+ `<div class="hm-h tc-h" role="columnheader">Tool calls</div>`;
D.rows.forEach(row => {
const [name, maker, , tools, distinct] = row;
const sup = D.api_support[name];
const tc = tools === 'yes' ? 'yes' : (tools === 'no' ? 'no' : '');
h += `<div class="hm-row" role="row">`
+ `<div class="hm-name" role="cell" title="${esc(maker)}. ${esc(distinct)}."><b>${esc(name)}</b></div>`;
if (sup) {
h += sup.map((v, i) => `<div class="hm-c" role="cell" aria-label="${esc(D.apis[i])}: ${v === 2 ? 'uses' : v === 1 ? 'also supports' : 'no'}">`
+ (v ? `<span class="dot${v === 2 ? ' on' : ''}" style="--dc:${cols[i]}"></span>` : '') + `</div>`).join('');
} else {
h += `<div class="hm-span" role="cell">${esc((D.api_note || {})[name] || '')}</div>`;
}
h += `<div class="hm-c hm-tc" role="cell"><span class="tc ${tc}">${esc(tools)}</span></div></div>`;
});
h += `</div>`
+ `<div class="lg"><div class="lg-t">Legend</div><span><span class="dot on"></span>speaks it by default</span><span><span class="dot"></span>also supports it</span></div>`
+ `<div class="nt">${esc(D.note)}</div>`;
r.innerHTML = h;
}).catch(e => { r.innerHTML = `<pre style="color:#c33;font-size:12px">${esc(e.message)}</pre>`; });
};
if (document.readyState === 'loading') document.addEventListener('DOMContentLoaded', boot, { once: true }); else boot();
})();
</script>