Welcome to the AgentBubble 2.0 / Quartz Chat SSOT! This is your idiot-proof, hyper-condensed cheat sheet for deploying and extending the OMP-integrated frontend agent.
TL;DR:
<iframe>alone is dead.window.postMessageRPC is the future.
1. ποΈ Architecture
We are upgrading from a dumb opaque iframe to a Bi-Directional RPC Bridge.
sequenceDiagram participant Host as π Quartz SPA (agent-bubble.inline.ts) participant Bridge as π window.postMessage participant Agent as π€ OMP Agent Iframe Host->>Bridge: `HOST_NAVIGATE` (New URL / Context) Bridge->>Agent: Updates RAG Context (No Reload!) Agent->>Bridge: `AGENT_DOM_MUTATE` (Live Edit) Bridge->>Host: Injects CSS / Highlights DOM
2. π οΈ Core API
If you are building an agent interacting with this frontend, use these exact payloads over postMessage.
1. π€ Host Context
Fired by the host when Quartzβs SPA router triggers a navigation event.
{
"type": "HOST_NAVIGATE",
"payload": { "url": "ssot.0rk.de/projects/quartz-chat", "title": "Quartz Chat" }
}2. π₯ Live Edit
Fired by the Agent Iframe to manipulate the parent Quartz DOM.
{
"type": "AGENT_DOM_EXECUTE",
"payload": { "action": "highlight", "selector": ".article-title" }
}3. π¨ Golden Rules
- NEVER RELOAD THE IFRAME: Rely on
HOST_NAVIGATEto update RAG. Reloading drops chat history. - TRUST NO ONE: The Host script MUST validate all incoming
postMessageorigins and sanitizeAGENT_DOM_EXECUTEselectors to prevent XSS. - USE NATIVE OBSERVERS: Bind to Quartzβs
navevent, not justclickevents, to catch all SPA transitions.