Skip to content

Open-source platform for 3D AI agents. Turn text or a photo into a rigged, animated GLB avatar, give it an LLM brain, memory and a wallet, and embed it anywhere with one web component. Remote MCP server, x402 payments, Three.js, browser-native.

feat(glance): serve the widget assets and finish the agent-glance CLI

nirholas3df64b151ae0
diff --git a/public/glance/element.js b/public/glance/element.js
new file mode 100644
index 000000000..ffc768f9f
--- /dev/null
+++ b/public/glance/element.js
@@ -0,0 +1,286 @@
+/**
+ * <agent-glance> — a live three.ws agent card for any page.
+ *
+ * <script type="module" src="https://three.ws/glance/element.js"></script>
+ * <agent-glance agent="0f3a1c22-9b7e-4d51-8a10-2c6f5d90ab34"></agent-glance>
+ *
+ * Attributes
+ * agent (required) the agent uuid
+ * size small | medium | large default medium
+ * theme auto | light | dark default auto
+ * refresh seconds between refreshes default 300, 0 disables
+ * origin override the API origin (self-hosted / staging)
+ *
+ * This is the hosted, dependency-free build, served the same way the 3D embed
+ * is (public/embed/v1.js). The npm client that talks to the same endpoint is
+ * @three-ws/agent-glance; it deliberately does not ship a second copy of this
+ * element, so there is one implementation of the card UI, not two.
+ *
+ * The card is real DOM, not an image, so it is selectable, screen-reader
+ * readable, keyboard reachable and hoverable. Every state is drawn: skeleton
+ * while loading, a retry affordance on failure, an invitation when the agent
+ * has never acted. It stops polling when the tab is hidden or the element
+ * scrolls out of view, because a decoration that drains a laptop battery gets
+ * deleted.
+ */
+
+const GLANCE_SIZES = ['small', 'medium', 'large'];
+const GLANCE_THEMES = ['auto', 'light', 'dark'];
+const UUID_RE = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
+const FETCH_TIMEOUT_MS = 8000;
+
+async function fetchGlanceCard(agentId, { origin } = {}) {
+ if (!UUID_RE.test(String(agentId || ''))) {
+ const err = new Error('not a three.ws agent id');
+ err.status = 400;
+ throw err;
+ }
+ const url = new URL('/api/glance/card', origin || location.origin);
+ url.searchParams.set('agent', agentId);
+ const res = await fetch(url, {
+ headers: { accept: 'application/json' },
+ signal: AbortSignal.timeout(FETCH_TIMEOUT_MS),
+ });
+ if (!res.ok) {
+ const err = new Error(`three.ws answered ${res.status}`);
+ err.status = res.status;
+ throw err;
+ }
+ return res.json();
+}
+
+
+const SIZE_WIDTH = { small: 240, medium: 480, large: 480 };
+
+const STYLE = `
+:host{display:inline-block;font-family:ui-sans-serif,-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,'Helvetica Neue',Arial,sans-serif;color-scheme:light dark}
+:host([hidden]){display:none}
+.card{--bg:#fff;--panel:#f4f5f9;--text:#0b0b18;--muted:#5b5f73;--line:#e4e6ef;
+ position:relative;display:block;box-sizing:border-box;width:100%;padding:20px;border:1px solid var(--line);
+ border-radius:20px;background:var(--bg);color:var(--text);text-decoration:none;overflow:hidden;
+ transition:transform .18s ease,box-shadow .18s ease,border-color .18s ease}
+.card::before{content:'';position:absolute;inset:0 0 auto 0;height:3px;background:linear-gradient(90deg,var(--from),var(--to))}
+.card::after{content:'';position:absolute;inset:-40% 55% 30% -30%;background:radial-gradient(circle,var(--from),transparent 68%);opacity:.16;pointer-events:none}
+a.card:hover{transform:translateY(-2px);box-shadow:0 12px 32px rgba(8,8,20,.16);border-color:var(--from)}
+a.card:active{transform:translateY(0)}
+a.card:focus-visible{outline:2px solid var(--from);outline-offset:3px}
+@media (prefers-reduced-motion:reduce){.card,a.card:hover{transition:none;transform:none}}
+@media (prefers-color-scheme:dark){.card{--bg:#0b0b16;--panel:#15162a;--text:#f6f7fb;--muted:#a2a7bd;--line:#262842}}
+:host([theme="dark"]) .card{--bg:#0b0b16;--panel:#15162a;--text:#f6f7fb;--muted:#a2a7bd;--line:#262842}
+:host([theme="light"]) .card{--bg:#fff;--panel:#f4f5f9;--text:#0b0b18;--muted:#5b5f73;--line:#e4e6ef}
+.top{display:flex;gap:14px;align-items:center;position:relative}
+.pic{width:56px;height:56px;border-radius:16px;flex:0 0 auto;object-fit:cover;background:linear-gradient(135deg,var(--from),var(--to));
+ display:grid;place-items:center;color:#fff;font-weight:700;font-size:22px}
+.who{min-width:0;flex:1 1 auto}
+.name{font-weight:700;font-size:18px;line-height:1.2;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
+.sub{font-size:12.5px;color:var(--muted);margin-top:3px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
+.dot{width:8px;height:8px;border-radius:50%;flex:0 0 auto;background:#64748b}
+.dot[data-status="active"]{background:#22c55e}
+.dot[data-status="idle"]{background:#f59e0b}
+.metric{display:flex;align-items:baseline;gap:8px;margin-top:18px}
+.metric b{font-size:38px;line-height:1;font-weight:800;letter-spacing:-.02em}
+.metric span{font-size:13px;color:var(--muted)}
+.last{margin-top:6px;font-size:11.5px;color:var(--muted)}
+.stats{display:flex;gap:8px;margin-top:16px}
+.stat{flex:1 1 0;background:var(--panel);border-radius:12px;padding:8px 10px;min-width:0}
+.stat b{display:block;font-size:15px}
+.stat span{font-size:10.5px;color:var(--muted)}
+:host([size="small"]) .stats,:host([size="small"]) .sub{display:none}
+:host([size="small"]) .metric b{font-size:32px}
+:host([size="medium"]) .stats{display:none}
+:host([size="medium"]) .rail{position:absolute;right:0;top:52px;text-align:right;font-size:12px;color:var(--muted);line-height:1.9}
+:host([size="medium"]) .rail b{color:var(--text)}
+:host(:not([size="medium"])) .rail{display:none}
+.skel{animation:pulse 1.4s ease-in-out infinite;background:var(--panel);border-radius:8px;color:transparent}
+@keyframes pulse{0%,100%{opacity:1}50%{opacity:.55}}
+@media (prefers-reduced-motion:reduce){.skel{animation:none}}
+.err{font-size:12.5px;color:var(--muted)}
+button{font:inherit;font-size:12px;margin-top:10px;padding:6px 12px;border-radius:999px;border:1px solid var(--line);
+ background:var(--panel);color:var(--text);cursor:pointer;transition:border-color .15s ease}
+button:hover{border-color:var(--from)}
+button:focus-visible{outline:2px solid var(--from);outline-offset:2px}
+`;
+
+export class AgentGlanceElement extends HTMLElement {
+ static observedAttributes = ['agent', 'size', 'theme', 'refresh', 'origin'];
+
+ #root = this.attachShadow({ mode: 'open' });
+ #timer = null;
+ #observer = null;
+ #visible = true;
+ #card = null;
+ #loading = false;
+
+ connectedCallback() {
+ if (!this.hasAttribute('size')) this.setAttribute('size', 'medium');
+ this.#root.innerHTML = `<style>${STYLE}</style><div class="host"></div>`;
+ this.#renderSkeleton();
+ this.#watchVisibility();
+ this.#load();
+ }
+
+ disconnectedCallback() {
+ this.#stopTimer();
+ this.#observer?.disconnect();
+ document.removeEventListener('visibilitychange', this.#onVisibility);
+ }
+
+ attributeChangedCallback(name, before, after) {
+ if (before === after || !this.isConnected) return;
+ if (name === 'refresh') return this.#scheduleRefresh();
+ this.#load();
+ }
+
+ get #size() {
+ const size = this.getAttribute('size');
+ return GLANCE_SIZES.includes(size) ? size : 'medium';
+ }
+
+ get #theme() {
+ const theme = this.getAttribute('theme');
+ return GLANCE_THEMES.includes(theme) ? theme : 'auto';
+ }
+
+ get #refreshMs() {
+ const seconds = Number(this.getAttribute('refresh'));
+ if (Number.isFinite(seconds) && seconds >= 0) return seconds * 1000;
+ return 300_000;
+ }
+
+ #onVisibility = () => {
+ this.#visible = !document.hidden;
+ this.#scheduleRefresh();
+ };
+
+ #watchVisibility() {
+ document.addEventListener('visibilitychange', this.#onVisibility);
+ if (typeof IntersectionObserver === 'function') {
+ this.#observer = new IntersectionObserver((entries) => {
+ const onScreen = entries.some((e) => e.isIntersecting);
+ if (onScreen !== this.#visible) {
+ this.#visible = onScreen;
+ this.#scheduleRefresh();
+ }
+ });
+ this.#observer.observe(this);
+ }
+ }
+
+ #stopTimer() {
+ if (this.#timer) clearTimeout(this.#timer);
+ this.#timer = null;
+ }
+
+ #scheduleRefresh() {
+ this.#stopTimer();
+ const every = this.#refreshMs;
+ if (!every || !this.#visible || !this.isConnected) return;
+ this.#timer = setTimeout(() => this.#load(), every);
+ }
+
+ async #load() {
+ const agent = this.getAttribute('agent');
+ if (!agent) return this.#renderError('No agent id set on this element.', false);
+ if (this.#loading) return;
+ this.#loading = true;
+ try {
+ const card = await fetchGlanceCard(agent, { origin: this.getAttribute('origin') || undefined });
+ this.#card = card;
+ this.#renderCard(card);
+ this.dispatchEvent(new CustomEvent('glance:load', { detail: card, bubbles: true }));
+ } catch (err) {
+ // A card that already rendered keeps what it has: a blip must not blank
+ // out a working card on someone else's page.
+ if (this.#card) this.#renderCard(this.#card, { stale: true });
+ else this.#renderError(describe(err), true);
+ this.dispatchEvent(new CustomEvent('glance:error', { detail: err, bubbles: true }));
+ } finally {
+ this.#loading = false;
+ this.#scheduleRefresh();
+ }
+ }
+
+ #host() {
+ return this.#root.querySelector('.host');
+ }
+
+ #renderSkeleton() {
+ this.#host().innerHTML = `
+<div class="card" style="--from:#8b8fa3;--to:#5b5f73" aria-busy="true" aria-label="Loading agent card">
+ <div class="top"><div class="pic skel"></div><div class="who">
+ <div class="name skel">Loading agent</div><div class="sub skel">Fetching live activity</div>
+ </div></div>
+ <div class="metric"><b class="skel">00</b><span class="skel">moves today</span></div>
+ <div class="stats"><div class="stat skel"><b>0</b><span>.</span></div><div class="stat skel"><b>0</b><span>.</span></div><div class="stat skel"><b>0</b><span>.</span></div></div>
+</div>`;
+ }
+
+ #renderError(message, retryable) {
+ this.#host().innerHTML = `
+<div class="card" style="--from:#8b8fa3;--to:#5b5f73" role="group" aria-label="Agent card unavailable">
+ <div class="top"><div class="pic">3</div><div class="who">
+ <div class="name">Card unavailable</div><div class="sub">three.ws</div>
+ </div></div>
+ <p class="err">${escapeHtml(message)}</p>
+ ${retryable ? '<button type="button" part="retry">Try again</button>' : ''}
+</div>`;
+ this.#host()
+ .querySelector('button')
+ ?.addEventListener('click', () => {
+ this.#renderSkeleton();
+ this.#load();
+ });
+ }
+
+ #renderCard(card, { stale = false } = {}) {
+ const width = SIZE_WIDTH[this.#size];
+ this.style.maxWidth = `${width}px`;
+ const sub = stale ? `${card.headline} (offline)` : card.description || card.headline;
+ const portrait = card.image
+ ? `<img class="pic" src="${escapeHtml(card.image)}" alt="" loading="lazy" decoding="async">`
+ : `<div class="pic" aria-hidden="true">${escapeHtml(card.monogram)}</div>`;
+ const rail = card.stats
+ .map((s) => `${escapeHtml(s.label)} <b>${escapeHtml(s.value)}</b>`)
+ .join('<br>');
+ const stats = card.stats
+ .map((s) => `<div class="stat"><b>${escapeHtml(s.value)}</b><span>${escapeHtml(s.label)}</span></div>`)
+ .join('');
+ const last = card.lastAction
+ ? `last: ${escapeHtml(card.lastAction.type)} ${escapeHtml(card.lastAction.relative)}`
+ : 'no activity yet';
+
+ this.#host().innerHTML = `
+<a class="card" href="${escapeHtml(card.url)}" style="--from:${escapeHtml(card.accent.from)};--to:${escapeHtml(card.accent.to)}"
+ aria-label="${escapeHtml(`${card.name}: ${card.metric.value} ${card.metric.label.toLowerCase()}. Open on three.ws`)}">
+ <div class="top">
+ ${portrait}
+ <div class="who">
+ <div class="name">${escapeHtml(card.name)}</div>
+ <div class="sub">${escapeHtml(sub)}</div>
+ </div>
+ <span class="dot" data-status="${escapeHtml(card.status)}" title="${escapeHtml(card.status)}"></span>
+ </div>
+ <div class="rail">${rail}</div>
+ <div class="metric"><b>${escapeHtml(card.metric.value)}</b><span>${escapeHtml(card.metric.label.toLowerCase())}</span></div>
+ <div class="last">${last}</div>
+ <div class="stats">${stats}</div>
+</a>`;
+ }
+}
+
+function describe(err) {
+ if (err?.status === 404) return 'That agent is not on three.ws.';
+ return 'Could not reach three.ws just now.';
+}
+
+function escapeHtml(value) {
+ return String(value ?? '')
+ .replace(/&/g, '&amp;')
+ .replace(/</g, '&lt;')
+ .replace(/>/g, '&gt;')
+ .replace(/"/g, '&quot;');
+}
+
+if (typeof customElements !== 'undefined' && !customElements.get('agent-glance')) {
+ customElements.define('agent-glance', AgentGlanceElement);
+}
diff --git a/public/glance/glance-page.js b/public/glance/glance-page.js
new file mode 100644
index 000000000..e6fc282c6
--- /dev/null
+++ b/public/glance/glance-page.js
@@ -0,0 +1,206 @@
+/**
+ * /glance — the live playground.
+ *
+ * Everything on this page runs against the real endpoints. The agent it opens
+ * on is, in order of preference:
+ * 1. ?agent= in the URL (so a card is shareable),
+ * 2. the visitor's own agent, when they are signed in (/api/glance/mine),
+ * 3. the agent the platform is currently featuring (/api/agents/featured).
+ * There is no sample agent and no placeholder card: if all three miss, the page
+ * says so and points at /create.
+ */
+
+const UUID_RE = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
+const TIMEOUT_MS = 8000;
+
+const els = {
+ select: document.getElementById('agent-select'),
+ input: document.getElementById('agent-input'),
+ size: document.getElementById('size-select'),
+ theme: document.getElementById('theme-select'),
+ slot: document.getElementById('element-slot'),
+ image: document.getElementById('card-image'),
+ source: document.getElementById('glance-source'),
+ html: document.getElementById('snippet-html'),
+ md: document.getElementById('snippet-md'),
+ cli: document.getElementById('snippet-cli'),
+ api: document.getElementById('snippet-api'),
+};
+
+const state = { agentId: null, size: 'medium', theme: 'auto' };
+
+async function getJson(url) {
+ const res = await fetch(url, {
+ credentials: 'same-origin',
+ headers: { accept: 'application/json' },
+ signal: AbortSignal.timeout(TIMEOUT_MS),
+ });
+ if (!res.ok) throw new Error(`${url} answered ${res.status}`);
+ return res.json();
+}
+
+async function discoverAgents() {
+ const options = [];
+ let note = '';
+
+ const mine = await getJson('/api/glance/mine').catch(() => null);
+ if (mine?.signedIn && mine.agents?.length) {
+ for (const agent of mine.agents) options.push({ id: agent.id, name: agent.name, mine: true });
+ note = 'Showing your agent. Live numbers, straight from your activity.';
+ }
+
+ const featured = await getJson('/api/agents/featured').catch(() => null);
+ const featuredAgent = featured?.data;
+ if (featuredAgent?.id && !options.some((o) => o.id === featuredAgent.id)) {
+ options.push({
+ id: featuredAgent.id,
+ name: featuredAgent.display_name || featuredAgent.name || 'Featured agent',
+ mine: false,
+ });
+ if (!note) note = 'Showing the agent three.ws is featuring right now.';
+ }
+
+ return { options, note };
+}
+
+function fillSelect(options) {
+ els.select.innerHTML = '';
+ if (!options.length) {
+ const opt = document.createElement('option');
+ opt.value = '';
+ opt.textContent = 'No agent to show yet';
+ els.select.append(opt);
+ els.select.disabled = true;
+ return;
+ }
+ els.select.disabled = false;
+ for (const option of options) {
+ const opt = document.createElement('option');
+ opt.value = option.id;
+ opt.textContent = option.mine ? `${option.name} (yours)` : option.name;
+ els.select.append(opt);
+ }
+}
+
+function render() {
+ const { agentId, size, theme } = state;
+ if (!agentId) {
+ els.slot.innerHTML =
+ '<p class="glance-note">No agent selected yet. <a href="/create">Create one</a> and this card fills in.</p>';
+ els.image.removeAttribute('src');
+ return;
+ }
+
+ els.slot.innerHTML = '';
+ const card = document.createElement('agent-glance');
+ card.setAttribute('agent', agentId);
+ card.setAttribute('size', size);
+ card.setAttribute('theme', theme);
+ els.slot.append(card);
+
+ const imageUrl = `/api/glance/card?agent=${agentId}&format=svg&size=${size}&theme=${theme}`;
+ const dims = { small: [240, 240], medium: [480, 200], large: [480, 300] }[size];
+ els.image.width = dims[0];
+ els.image.height = dims[1];
+ els.image.src = imageUrl;
+ els.image.alt = `Glance card for the selected agent, ${size} size`;
+
+ const absolute = `https://three.ws${imageUrl}`;
+ els.html.textContent = [
+ '<script type="module" src="https://three.ws/glance/element.js"></script>',
+ `<agent-glance agent="${agentId}" size="${size}" theme="${theme}"></agent-glance>`,
+ ].join('\n');
+ els.md.textContent = `[![three.ws agent](${absolute})](https://three.ws/agents/${agentId})`;
+ els.cli.textContent = `npx @three-ws/agent-glance ${agentId} --watch 60`;
+ els.api.textContent = `curl -s "https://three.ws/api/glance/card?agent=${agentId}" | jq .metric`;
+
+ const url = new URL(location.href);
+ url.searchParams.set('agent', agentId);
+ history.replaceState(null, '', url);
+}
+
+function wireCopyButtons() {
+ for (const button of document.querySelectorAll('button.copy')) {
+ button.addEventListener('click', async () => {
+ const source = document.getElementById(button.dataset.copy);
+ try {
+ await navigator.clipboard.writeText(source.textContent);
+ button.textContent = 'Copied';
+ button.dataset.state = 'done';
+ } catch {
+ // Clipboard permission denied (or an insecure context): select the
+ // text so the copy is still one keystroke away.
+ const range = document.createRange();
+ range.selectNodeContents(source);
+ const selection = getSelection();
+ selection.removeAllRanges();
+ selection.addRange(range);
+ button.textContent = 'Press copy';
+ }
+ setTimeout(() => {
+ button.textContent = 'Copy';
+ delete button.dataset.state;
+ }, 1800);
+ });
+ }
+}
+
+function wireControls() {
+ els.select.addEventListener('change', () => {
+ if (!els.select.value) return;
+ state.agentId = els.select.value;
+ els.input.value = '';
+ els.input.removeAttribute('aria-invalid');
+ render();
+ });
+
+ els.input.addEventListener('input', () => {
+ const value = els.input.value.trim();
+ if (!value) {
+ els.input.removeAttribute('aria-invalid');
+ return;
+ }
+ if (!UUID_RE.test(value)) {
+ els.input.setAttribute('aria-invalid', 'true');
+ return;
+ }
+ els.input.removeAttribute('aria-invalid');
+ state.agentId = value;
+ els.source.textContent = 'Showing the agent you pasted.';
+ render();
+ });
+
+ els.size.addEventListener('change', () => {
+ state.size = els.size.value;
+ render();
+ });
+ els.theme.addEventListener('change', () => {
+ state.theme = els.theme.value;
+ render();
+ });
+}
+
+async function main() {
+ wireControls();
+ wireCopyButtons();
+
+ const fromUrl = new URL(location.href).searchParams.get('agent');
+ const { options, note } = await discoverAgents();
+ fillSelect(options);
+
+ if (fromUrl && UUID_RE.test(fromUrl)) {
+ state.agentId = fromUrl;
+ els.source.textContent = 'Showing the agent from this link.';
+ if (options.some((o) => o.id === fromUrl)) els.select.value = fromUrl;
+ } else if (options.length) {
+ state.agentId = options[0].id;
+ els.select.value = options[0].id;
+ els.source.textContent = note;
+ } else {
+ els.source.textContent = 'No public agent to show yet. Paste an id, or create an agent.';
+ }
+
+ render();
+}
+
+main();
diff --git a/public/glance/glance.css b/public/glance/glance.css
new file mode 100644
index 000000000..53e84bb0b
--- /dev/null
+++ b/public/glance/glance.css
@@ -0,0 +1,268 @@
+/* /glance — the Glance landing and live playground. */
+
+.glance-main {
+ max-width: 1100px;
+ margin: 0 auto;
+ padding: 64px 24px 96px;
+ display: grid;
+ gap: 72px;
+}
+
+.glance-hero .eyebrow {
+ text-transform: uppercase;
+ letter-spacing: 0.16em;
+ font-size: 12px;
+ opacity: 0.6;
+ margin: 0 0 12px;
+}
+.glance-hero h1 {
+ font-size: clamp(32px, 6vw, 56px);
+ line-height: 1.05;
+ letter-spacing: -0.03em;
+ margin: 0 0 16px;
+}
+.glance-hero .lede {
+ font-size: clamp(15px, 2.2vw, 18px);
+ line-height: 1.6;
+ max-width: 62ch;
+ opacity: 0.78;
+ margin: 0 0 24px;
+}
+.glance-hero-actions {
+ display: flex;
+ flex-wrap: wrap;
+ gap: 12px;
+}
+.glance-main .btn {
+ display: inline-flex;
+ align-items: center;
+ justify-content: center;
+ min-height: 44px;
+ padding: 0 20px;
+ border-radius: 999px;
+ font-size: 14px;
+ font-weight: 600;
+ text-decoration: none;
+ border: 1px solid currentColor;
+ transition:
+ transform 0.16s ease,
+ opacity 0.16s ease;
+}
+.glance-main .btn.primary {
+ background: currentColor;
+ border-color: transparent;
+}
+.glance-main .btn.primary > * {
+ color: canvas;
+}
+.glance-main .btn:hover {
+ transform: translateY(-1px);
+}
+.glance-main .btn:focus-visible {
+ outline: 2px solid currentColor;
+ outline-offset: 3px;
+}
+@media (prefers-reduced-motion: reduce) {
+ .glance-main .btn:hover {
+ transform: none;
+ }
+}
+
+.glance-demo-head {
+ display: flex;
+ flex-wrap: wrap;
+ align-items: baseline;
+ gap: 12px;
+ justify-content: space-between;
+ margin-bottom: 20px;
+}
+.glance-demo h2,
+.glance-snippets h2,
+.glance-install h2 {
+ font-size: clamp(22px, 3.4vw, 30px);
+ letter-spacing: -0.02em;
+ margin: 0;
+}
+.glance-source {
+ margin: 0;
+ font-size: 13px;
+ opacity: 0.62;
+}
+
+.glance-controls {
+ display: grid;
+ grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
+ gap: 12px;
+ margin-bottom: 10px;
+}
+.glance-controls .field {
+ display: grid;
+ gap: 6px;
+ font-size: 12px;
+ opacity: 0.9;
+}
+.glance-controls select,
+.glance-controls input {
+ font: inherit;
+ font-size: 14px;
+ min-height: 42px;
+ padding: 0 12px;
+ border-radius: 12px;
+ border: 1px solid color-mix(in srgb, currentColor 22%, transparent);
+ background: color-mix(in srgb, currentColor 5%, transparent);
+ color: inherit;
+ width: 100%;
+ box-sizing: border-box;
+}
+.glance-controls select:focus-visible,
+.glance-controls input:focus-visible {
+ outline: 2px solid currentColor;
+ outline-offset: 2px;
+}
+.glance-controls input[aria-invalid='true'] {
+ border-color: #ef4444;
+}
+.glance-help {
+ font-size: 12.5px;
+ opacity: 0.6;
+ margin: 0 0 24px;
+}
+
+.glance-stage {
+ display: grid;
+ grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
+ gap: 20px;
+}
+.glance-stage-panel {
+ border: 1px solid color-mix(in srgb, currentColor 14%, transparent);
+ border-radius: 20px;
+ padding: 20px;
+}
+.glance-stage-panel h3 {
+ margin: 0 0 4px;
+ font-size: 15px;
+}
+.glance-note {
+ margin: 0 0 16px;
+ font-size: 12.5px;
+ opacity: 0.6;
+}
+.glance-slot {
+ display: flex;
+ align-items: flex-start;
+ justify-content: center;
+ min-height: 220px;
+ padding: 8px;
+}
+.glance-slot img {
+ max-width: 100%;
+ height: auto;
+ border-radius: 20px;
+}
+
+.glance-snippet-grid {
+ display: grid;
+ grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
+ gap: 16px;
+ margin-top: 20px;
+}
+.glance-snippet {
+ border: 1px solid color-mix(in srgb, currentColor 14%, transparent);
+ border-radius: 18px;
+ overflow: hidden;
+}
+.glance-snippet header {
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ gap: 12px;
+ padding: 12px 16px;
+ border-bottom: 1px solid color-mix(in srgb, currentColor 12%, transparent);
+}
+.glance-snippet h3 {
+ margin: 0;
+ font-size: 13px;
+ font-weight: 600;
+}
+.glance-snippet pre {
+ margin: 0;
+ padding: 16px;
+ overflow-x: auto;
+ font-size: 12.5px;
+ line-height: 1.6;
+}
+.glance-snippet code {
+ white-space: pre;
+ word-break: normal;
+}
+button.copy {
+ font: inherit;
+ font-size: 12px;
+ padding: 6px 12px;
+ border-radius: 999px;
+ border: 1px solid color-mix(in srgb, currentColor 24%, transparent);
+ background: transparent;
+ color: inherit;
+ cursor: pointer;
+ transition: border-color 0.15s ease;
+}
+button.copy:hover {
+ border-color: currentColor;
+}
+button.copy:focus-visible {
+ outline: 2px solid currentColor;
+ outline-offset: 2px;
+}
+button.copy[data-state='done'] {
+ border-color: #22c55e;
+ color: #22c55e;
+}
+
+.glance-surfaces {
+ display: grid;
+ grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
+ gap: 16px;
+ margin-top: 20px;
+}
+.glance-surface {
+ border: 1px solid color-mix(in srgb, currentColor 14%, transparent);
+ border-radius: 18px;
+ padding: 20px;
+}
+.glance-surface h3 {
+ margin: 0 0 6px;
+ font-size: 16px;
+}
+.glance-status {
+ margin: 0 0 12px;
+ font-size: 11px;
+ text-transform: uppercase;
+ letter-spacing: 0.12em;
+ opacity: 0.55;
+}
+.glance-surface.is-live .glance-status {
+ color: #22c55e;
+ opacity: 1;
+}
+.glance-surface ol {
+ margin: 0 0 12px;
+ padding-left: 18px;
+ font-size: 13.5px;
+ line-height: 1.7;
+}
+.glance-surface p {
+ font-size: 13.5px;
+ line-height: 1.6;
+ opacity: 0.8;
+ margin: 0 0 8px;
+}
+.glance-surface code {
+ font-size: 12.5px;
+}
+
+@media (max-width: 640px) {
+ .glance-main {
+ padding: 40px 16px 72px;
+ gap: 56px;
+ }
+}
diff --git a/public/glance/index.html b/public/glance/index.html
new file mode 100644
index 000000000..dea92c6fd
--- /dev/null
+++ b/public/glance/index.html
@@ -0,0 +1,220 @@
+<!doctype html>
+<html lang="en">
+ <head>
+ <meta charset="utf-8" />
+ <title>Glance — your agent on every home screen | three.ws</title>
+ <meta name="viewport" content="width=device-width, initial-scale=1.0, viewport-fit=cover" />
+ <meta
+ name="description"
+ content="One three.ws agent, one live number, everywhere you have a slot: the Windows 11 widgets board, a README, a Slack message, or any page."
+ />
+ <meta name="theme-color" content="#0a0a0a" />
+
+ <meta property="og:type" content="website" />
+ <meta property="og:site_name" content="three.ws" />
+ <meta property="og:title" content="Glance — your agent on every home screen" />
+ <meta
+ property="og:description"
+ content="One three.ws agent, one live number, everywhere you have a slot: the Windows 11 widgets board, a README, a Slack message, or any page."
+ />
+ <meta property="og:url" content="https://three.ws/glance" />
+ <meta property="og:image" content="https://three.ws/screenshots/glance-widget.png" />
+ <meta property="og:image:alt" content="An agent glance card" />
+ <meta name="twitter:card" content="summary_large_image" />
+ <meta name="twitter:title" content="Glance — your agent on every home screen" />
+ <meta
+ name="twitter:description"
+ content="One three.ws agent, one live number, everywhere you have a slot."
+ />
+ <meta name="twitter:image" content="https://three.ws/screenshots/glance-widget.png" />
+ <meta name="twitter:site" content="@trythreews" />
+ <meta name="robots" content="index, follow, max-image-preview:large, max-snippet:-1" />
+
+ <link rel="canonical" href="https://three.ws/glance" />
+ <link rel="shortcut icon" href="/favicon.ico" />
+ <link rel="stylesheet" href="/fonts/fonts.css" />
+ <link rel="stylesheet" href="/style.css" />
+ <link rel="stylesheet" href="/nav.css" />
+ <link rel="stylesheet" href="/footer.css" />
+ <link rel="stylesheet" href="/glance/glance.css" />
+ <script type="module" src="/glance/element.js"></script>
+ <script type="application/ld+json">
+ {
+ "@context": "https://schema.org",
+ "@type": "WebPage",
+ "name": "Glance",
+ "description": "One three.ws agent, one live number, everywhere you have a slot.",
+ "url": "https://three.ws/glance",
+ "isPartOf": { "@type": "WebSite", "name": "three.ws", "url": "https://three.ws" }
+ }
+ </script>
+ </head>
+ <body class="glance-body">
+ <div id="nav-container"></div>
+ <script src="/nav.js"></script>
+
+ <main class="glance-main">
+ <section class="glance-hero">
+ <p class="eyebrow">Glance</p>
+ <h1>Your agent, on every home screen.</h1>
+ <p class="lede">
+ One agent, one live number, one tap back in. The same card renders on the Windows 11
+ widgets board, in a README, in a Slack message, and on any page, from one endpoint that
+ reads your real activity.
+ </p>
+ <div class="glance-hero-actions">
+ <a class="btn primary" href="#install">Put it on your home screen</a>
+ <a class="btn ghost" href="/docs/glance">Read the docs</a>
+ </div>
+ </section>
+
+ <section class="glance-demo" aria-labelledby="demo-heading">
+ <div class="glance-demo-head">
+ <h2 id="demo-heading">Live, from a real agent</h2>
+ <p id="glance-source" class="glance-source">Loading an agent…</p>
+ </div>
+
+ <div class="glance-controls" role="group" aria-label="Card options">
+ <label class="field">
+ <span>Agent</span>
+ <select id="agent-select" aria-describedby="agent-help">
+ <option value="">Loading…</option>
+ </select>
+ </label>
+ <label class="field">
+ <span>Or paste an agent id</span>
+ <input
+ id="agent-input"
+ type="text"
+ inputmode="text"
+ spellcheck="false"
+ placeholder="00000000-0000-0000-0000-000000000000"
+ aria-describedby="agent-help"
+ />
+ </label>
+ <label class="field">
+ <span>Size</span>
+ <select id="size-select">
+ <option value="small">small</option>
+ <option value="medium" selected>medium</option>
+ <option value="large">large</option>
+ </select>
+ </label>
+ <label class="field">
+ <span>Theme</span>
+ <select id="theme-select">
+ <option value="auto" selected>auto</option>
+ <option value="light">light</option>
+ <option value="dark">dark</option>
+ </select>
+ </label>
+ </div>
+ <p id="agent-help" class="glance-help">
+ Any public agent works. Find one in the <a href="/agents">agent directory</a>, or
+ <a href="/create">create yours</a>.
+ </p>
+
+ <div class="glance-stage">
+ <div class="glance-stage-panel">
+ <h3>Live element</h3>
+ <p class="glance-note">Real DOM: hoverable, focusable, screen-reader readable.</p>
+ <div id="element-slot" class="glance-slot"></div>
+ </div>
+ <div class="glance-stage-panel">
+ <h3>Image</h3>
+ <p class="glance-note">One URL. Works in a README, Slack, or any &lt;img&gt;.</p>
+ <div class="glance-slot">
+ <img id="card-image" alt="Agent glance card" width="480" height="200" />
+ </div>
+ </div>
+ </div>
+ </section>
+
+ <section class="glance-snippets" aria-labelledby="snip-heading">
+ <h2 id="snip-heading">Take it with you</h2>
+ <div class="glance-snippet-grid">
+ <article class="glance-snippet">
+ <header><h3>A page</h3><button class="copy" type="button" data-copy="snippet-html">Copy</button></header>
+ <pre><code id="snippet-html"></code></pre>
+ </article>
+ <article class="glance-snippet">
+ <header><h3>A README</h3><button class="copy" type="button" data-copy="snippet-md">Copy</button></header>
+ <pre><code id="snippet-md"></code></pre>
+ </article>
+ <article class="glance-snippet">
+ <header><h3>Your terminal</h3><button class="copy" type="button" data-copy="snippet-cli">Copy</button></header>
+ <pre><code id="snippet-cli"></code></pre>
+ </article>
+ <article class="glance-snippet">
+ <header><h3>The API</h3><button class="copy" type="button" data-copy="snippet-api">Copy</button></header>
+ <pre><code id="snippet-api"></code></pre>
+ </article>
+ </div>
+ </section>
+
+ <section class="glance-install" id="install" aria-labelledby="install-heading">
+ <h2 id="install-heading">On your home screen</h2>
+ <div class="glance-surfaces">
+ <article class="glance-surface is-live">
+ <h3>Windows 11</h3>
+ <p class="glance-status">Live now</p>
+ <ol>
+ <li>Open three.ws in Edge and install it (the install icon in the address bar).</li>
+ <li>Open the widgets board (Win + W) and choose <b>Add widgets</b>.</li>
+ <li>Pick <b>Agent glance</b>. It refreshes itself every 15 minutes.</li>
+ </ol>
+ <p class="glance-note">
+ Signed out is handled: the widget shows a sign-in card rather than an error, and it
+ keeps the last card it saw when the machine is offline.
+ </p>
+ </article>
+ <article class="glance-surface is-live">
+ <h3>Any web page</h3>
+ <p class="glance-status">Live now</p>
+ <p>
+ The <code>&lt;agent-glance&gt;</code> element above is the whole integration: one
+ module script, one tag. It polls only while it is on screen and the tab is visible.
+ </p>
+ </article>
+ <article class="glance-surface">
+ <h3>Android</h3>
+ <p class="glance-status">Next</p>
+ <p>
+ The signed <code>ws.three.app</code> shell already ships. The app widget provider is
+ the remaining piece, and the card endpoint it needs is what this page is running on.
+ </p>
+ </article>
+ <article class="glance-surface">
+ <h3>macOS and iOS</h3>
+ <p class="glance-status">Planned</p>
+ <p>
+ A shared WidgetKit extension, gated on an Apple Developer account. Same card, same
+ endpoint. See the
+ <a href="https://github.com/nirholas/three.ws/blob/main/prompts/roadmap/native-widgets.md">work order</a>.
+ </p>
+ </article>
+ </div>
+ </section>
+ </main>
+
+ <footer class="h-footer">
+ <div class="h-footer-bottom">
+ <p class="h-footer-legal">© 2026 three.ws. All rights reserved.</p>
+ <div class="h-footer-badges">
+ <a class="h-footer-badge" href="/docs/glance"><span>Glance docs</span></a>
+ <a class="h-footer-badge" href="/widgets"><span>Embeddable 3D widgets</span></a>
+ <a
+ class="h-footer-badge"
+ href="https://github.com/nirholas/three.ws"
+ target="_blank"
+ rel="noopener"
+ ><span>Open source</span></a
+ >
+ </div>
+ </div>
+ </footer>
+
+ <script type="module" src="/glance/glance-page.js"></script>
+ <script src="/brand.js" defer></script>
+ </body>
+</html>