Threads #
Every annotation owns a thread of Markdown messages, each tagged human or agent.
// Human pins a comment, agent replies in the same thread.
const id = window.__annotations.addAnnotation({
comment: "This CTA competes with the secondary link.",
elementPath: "#hero-cta", element: "button", x: 50, y: 320,
});
window.__annotations.replyToAnnotation(id, {
role: "agent",
content: "Agreed — making it the only primary action above the fold.",
});
Agent push #
An agent has the full human feature set through window.__annotations.
const a = window.__annotations;
a.addAnnotation({ // drop a pin as an agent
comment: "Three tiers look equal — emphasize one **Recommended** plan.",
elementPath: "#pricing", element: "section", x: 50, y: 1180,
intent: "change", severity: "important",
author: { kind: "agent", id: "designer", displayName: "Designer" },
});
a.setCursor({ id: "designer", label: "Designer", kind: "agent", x: 50, y: 1180 });
a.resolveAnnotation(id, "agent");