Your own team of AI bots in one self-hosted binary: spaces, every account you have, handoffs, approvals and routines. Open-source, self-hosted alternative to Grok Bot, Claude Duet and OpenAI dots. Rust + React.
Rust ai-agentsai-assistantai-botautomationbotbots-teamchatbotclaude-duetgrokgrok-botgrok-bot-alternativeharnessllmmulti-agentopenai-dotsopenbotpersonal-agentrustself-hostedselfhosted-ai
<!doctype html>
<!-- From Mira's design: /home/maus/shared/ship-software-safely/mac-nudge/design/pill/pill.html (spec.md §2-3). -->
<!-- kwant Mac "needs you" pill window content (spec.md §3, §5). Drop in as apps/mac/loading/nudge.html.
Rust drives it with window.eval("kwantNudge.show([...])"); it answers by navigating to
kwant-nudge://open (clicked) or kwant-nudge://hidden (gone), which on_navigation catches and refuses. -->
<html><head><meta charset="utf-8"><meta name="color-scheme" content="light dark">
<style>
html, body { margin: 0; background: transparent; overflow: hidden; }
#slot { position: absolute; left: 10px; top: 4px; }
/* kwant "needs you" pill: one design for the Mac menu-bar pill and the in-app pill.
Spec: ../spec.md §3. Motion: transform + opacity only. */
.kw-nudge {
--kw-n-bg: #231d4b; --kw-n-edge: rgb(255 255 255 / .10);
--kw-n-t1: #f7f6ff; --kw-n-t2: #bcb7de; --kw-n-chev: #9a94c4;
--kw-n-shadow: 0 10px 28px rgb(0 0 0 / .45), 0 1px 3px rgb(0 0 0 / .35);
position: relative; box-sizing: border-box;
display: flex; align-items: center; gap: 10px;
width: 320px; height: 52px; padding: 0 12px 0 10px; margin: 0;
border: 0; border-radius: 26px;
background: var(--kw-n-bg); color: var(--kw-n-t1);
box-shadow: inset 0 0 0 1px var(--kw-n-edge), var(--kw-n-shadow);
font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", Inter, "Segoe UI", Roboto, sans-serif;
text-align: left; cursor: pointer; user-select: none; -webkit-user-select: none;
transform-origin: 50% 0;
animation: kw-nudge-rise 200ms cubic-bezier(.34, 1.56, .64, 1) backwards,
kw-nudge-fade 120ms linear backwards;
transition: transform 80ms ease-out;
}
.kw-nudge[data-theme="light"] {
--kw-n-bg: #ffffff; --kw-n-edge: rgb(29 24 64 / .12);
--kw-n-t1: #1d1840; --kw-n-t2: #5a5383; --kw-n-chev: #78719f;
--kw-n-shadow: 0 10px 28px rgb(29 24 64 / .18), 0 1px 3px rgb(29 24 64 / .12);
}
.kw-nudge:active { transform: scale(.98); }
.kw-nudge:focus-visible { outline: 2px solid #b8adff; outline-offset: 2px; }
.kw-nudge.is-leaving { animation: kw-nudge-leave 160ms cubic-bezier(.4, 0, 1, 1) forwards; pointer-events: none; }
/* phone (in-app, viewport < 640 px) */
.kw-nudge--phone { width: calc(100vw - 24px); max-width: 420px; height: 56px; border-radius: 28px; padding-left: 12px; }
/* avatar: Mac = initial disc; in-app = <ModernAvatar size={32}> in the same 32 px box */
.kw-nudge__av {
position: relative; flex: none; width: 32px; height: 32px; border-radius: 50%;
background: #b8adff; color: #1b1033;
font-size: 15px; line-height: 32px; font-weight: 700; text-align: center;
animation: kw-nudge-hop 200ms 200ms backwards;
}
/* in-app: the real avatar fills the box, no disc colour */
.kw-nudge__av--img { background: none; }
.kw-nudge__av > img, .kw-nudge__av > svg.kw-av { width: 32px; height: 32px; border-radius: 50%; display: block; }
/* AvatarMood "needs you" badge: 7x7 plate, 2 px cells, "!" #ffb020 */
.kw-nudge__badge {
position: absolute; top: -4px; right: -4px; width: 14px; height: 14px; display: block;
border-radius: 3px; background: #1b1033; box-shadow: 0 0 0 2px var(--kw-n-bg);
animation: kw-nudge-pop 160ms 200ms cubic-bezier(.34, 1.56, .64, 1) backwards;
}
.kw-nudge__text { flex: 1; min-width: 0; }
.kw-nudge__l1, .kw-nudge__l2 { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kw-nudge__l1 { font-size: 13px; line-height: 16px; font-weight: 600; letter-spacing: -.08px; }
.kw-nudge__l2 { font-size: 12px; line-height: 16px; font-weight: 400; color: var(--kw-n-t2); }
.kw-nudge__chev { flex: none; width: 14px; height: 14px; color: var(--kw-n-chev); }
.kw-nudge.is-swapping .kw-nudge__text { animation: kw-nudge-fade 120ms linear backwards; }
.kw-nudge.is-swapping .kw-nudge__av { animation: kw-nudge-hop 200ms backwards; }
@keyframes kw-nudge-rise { from { transform: translateY(-16px) scale(.94); } to { transform: none; } }
@keyframes kw-nudge-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes kw-nudge-leave { to { transform: translateY(-8px); opacity: 0; } }
@keyframes kw-nudge-hop {
0% { transform: none; animation-timing-function: cubic-bezier(.2, 0, .4, 1); }
50% { transform: translateY(-4px); animation-timing-function: cubic-bezier(.6, 0, .8, 1); }
100% { transform: none; }
}
@keyframes kw-nudge-pop { from { transform: scale(.4); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes kw-nudge-fadeout { to { opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
.kw-nudge { animation: kw-nudge-fade 160ms linear backwards; transition: none; }
.kw-nudge:active { transform: none; }
.kw-nudge.is-leaving { animation: kw-nudge-fadeout 160ms linear forwards; }
.kw-nudge__av, .kw-nudge__badge, .kw-nudge.is-swapping .kw-nudge__av { animation: none; }
}
</style>
<style>
/* Added for the app (not in Mira's design file): the same as the reduced-motion rules above, for
when the app turns them on itself (--demo-nudge shows Reduce Motion without changing settings). */
html.kw-reduce .kw-nudge { animation: kw-nudge-fade 160ms linear backwards; transition: none; }
html.kw-reduce .kw-nudge:active { transform: none; }
html.kw-reduce .kw-nudge.is-leaving { animation: kw-nudge-fadeout 160ms linear forwards; }
html.kw-reduce .kw-nudge__av, html.kw-reduce .kw-nudge__badge, html.kw-reduce .kw-nudge.is-swapping .kw-nudge__av { animation: none; }
</style></head>
<body><div id="slot"></div>
<script>
(() => {
const HOLD = 5000, AFTER_HOVER = 2000, CAP = 12000;
const VERB = { approval: 'needs your OK', question: 'asked you something', human_step: 'needs you to do a step' };
const BADGE = '<svg class="kw-nudge__badge" viewBox="0 0 14 14" aria-hidden="true"><rect x="6" y="2" width="2" height="6" fill="#ffb020"/><rect x="6" y="10" width="2" height="2" fill="#ffb020"/></svg>';
const CHEV = '<svg class="kw-nudge__chev" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.25" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="m9 18 6-6-6-6"/></svg>';
const esc = s => String(s ?? '').replace(/[&<>"]/g, c => ({ '&': '&', '<': '<', '>': '>', '"': '"' }[c]));
const initial = n => (Array.from(String(n || '?').trim())[0] || '?').toUpperCase();
const names = list => {
const u = [...new Set(list.map(i => i.name || 'A bot'))];
if (u.length === 1) return 'All from ' + u[0];
if (u.length <= 3) return u.slice(0, -1).join(', ') + ' and ' + u[u.length - 1];
return u.slice(0, 2).join(', ') + ' and ' + (u.length - 2) + ' more';
};
const theme = () => matchMedia('(prefers-color-scheme: light)').matches ? 'light' : 'dark';
let el = null, timer = 0, firstShown = 0, hovered = false;
const go = what => { location.href = 'kwant-nudge://' + what; };
// Plain text: escaped where it goes into HTML, as it is in the aria-label (an attribute set
// through the DOM, never parsed), so "R&D" is read as "R&D".
// With more than one place running, the second line names the place: "kwant.jumpin.games · …"
const placed = (items, text) => (items[0] && items[0].place ? items[0].place + ' · ' : '') + text;
const content = items => {
if (items.length === 1) {
const i = items[0];
return { av: initial(i.name), l1: (i.name || 'A bot') + ' ' + (VERB[i.kind] || 'needs you'), l2: placed(items, String(i.title ?? '')) };
}
return { av: items.length > 9 ? '9+' : String(items.length), l1: items.length + ' things need you', l2: placed(items, names(items)) };
};
// The 12 s cap only limits arrival restarts; after the pointer leaves it always waits the full 2 s.
const arm = (ms, capped) => { clearTimeout(timer); timer = setTimeout(leave, capped ? Math.max(0, Math.min(ms, CAP - (Date.now() - firstShown))) : ms); };
function leave() {
if (!el || hovered) return;
el.classList.add('is-leaving');
// a pill that springs in during the slide-out is a new one: leave it alone
const gone = el;
setTimeout(() => { gone.remove(); if (el === gone) { el = null; go('hidden'); } }, 160);
}
window.kwantNudge = {
/** items: [{kind:'approval'|'question'|'human_step', name, title}], newest last. Call again to coalesce. */
show(items) {
if (!items || !items.length) return;
const c = content(items);
const html = `<span class="kw-nudge__av">${esc(c.av)}${BADGE}</span>
<span class="kw-nudge__text"><span class="kw-nudge__l1">${esc(c.l1)}</span><span class="kw-nudge__l2">${esc(c.l2)}</span></span>${CHEV}`;
if (el && !el.classList.contains('is-leaving')) {
el.innerHTML = html; el.classList.remove('is-swapping'); void el.offsetWidth; el.classList.add('is-swapping');
} else {
el?.remove();
el = document.createElement('div');
el.className = 'kw-nudge'; el.dataset.theme = theme(); el.setAttribute('role', 'button');
el.innerHTML = html; firstShown = Date.now();
el.addEventListener('mouseenter', () => { hovered = true; clearTimeout(timer); });
el.addEventListener('mouseleave', () => { hovered = false; arm(AFTER_HOVER); });
el.addEventListener('click', () => { clearTimeout(timer); hovered = false; go('open'); const gone = el; gone.classList.add('is-leaving'); setTimeout(() => { gone.remove(); if (el === gone) el = null; }, 120); });
document.getElementById('slot').appendChild(el);
}
el.setAttribute('aria-label', c.l1 + '. ' + c.l2);
arm(HOLD, true);
},
hide() { hovered = false; leave(); },
};
if (location.hash === '#demo') kwantNudge.show([{ kind: 'approval', name: 'Juno', title: 'Run migration 0042 on the goals table' }]);
})();
</script></body></html>