cw-support-widget
Installation
SKILL.md
CW Agents support widget
- Read
orgIdandprojectIdfrom the Builder's raw task record at.tasks/task.json. The Markdown brief (.tasks/task.md) listsprojectIdin its frontmatter. If the raw record is unavailable, get both IDs from the CW Agents project URL/<orgId>/projects/<projectId>. Don't render placeholders. If an ID still can't be determined, report what's missing in the task outcome. - Load the script once in the client app shell (for example,
apps/app/index.htmlin the current template). Place one<customware-chat>in the shared layout. If IDs arrive at runtime, render it only when both are present. - Verify in the task's running app, opened directly rather than inside an iframe: the launcher appears on every page that has the shared layout and its panel opens without console errors. This browser check is the only test the embed needs: don't add or update unit tests for it.
- Do not send messages or requests from the task's app. The support service does not accept it as a sender and answers
Support chat is not available for this app.This is expected, is not a defect and does not block the task: don't retry it, call support endpoints directly or change the embed to get around it. Sending is checked after the task, so report it as not checked by the task.
<script src="https://agents.customware.ai/support-widget/customware-chat.js" defer></script>
<customware-chat org-id="<orgId>" project-id="<projectId>"></customware-chat>
Placement and options
mode="chat-bubble"(default): floating launcher and chat panel. Keep it outside clipped containers.mode="full": fills a host region. Give the region a definite height and let the widget handle its own scrolling.style-options: JSON object with string values, for examplestyle-options='{"width":"100%","height":"100%"}'. In JS, the same object can be assigned to the element'sstyleOptionsproperty.meta: optional JS property{ email?: string; name?: string }for visitor identity. Assign it on the DOM element after registration (for example, awaitcustomElements.whenDefined("customware-chat")before using a ref). Never pass tokens, cookies, or other secrets.