@popmelt.com/core 0.34.0 → 0.35.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +23 -863
- package/THIRD_PARTY_NOTICES.md +46 -0
- package/claude-plugin/.claude-plugin/plugin.json +1 -1
- package/codex-plugin/.codex-plugin/plugin.json +1 -1
- package/dist/ExploreAttachment-TTEKD4AU.mjs +1 -0
- package/dist/PagePreviewLayer-TJZOJBSD.mjs +1 -0
- package/dist/ParticipantRuntime-BQAOTSQZ.mjs +1 -0
- package/dist/PhoneHostGate-LNSDZOG2.mjs +1 -0
- package/dist/PopmeltTasteConnectedPane-NCCF7YUX.mjs +1 -0
- package/dist/{PreviewRuntime-EYKB7MG5.mjs → PreviewRuntime-H2UOLP6T.mjs} +1 -1
- package/dist/QueuedReplies-LQUBEZ6K.mjs +1 -0
- package/dist/SuppliedContext-YKQSMF3J.mjs +1 -0
- package/dist/ThreadErrorCard-4MOA34C4.mjs +1 -0
- package/dist/ThreadPanel-T6IXWFLA.mjs +1 -0
- package/dist/adapter-react-three-fiber.d.mts +1 -1
- package/dist/bridge-entry.mjs +1 -1
- package/dist/browser-runtime-HQM2Y6EL.mjs +1 -0
- package/dist/browser.d.mts +4 -4
- package/dist/browser.mjs +1 -1
- package/dist/{checkFixture-AMLLLJNS.mjs → checkFixture-BXILOUP5.mjs} +1 -1
- package/dist/{chunk-2ETPREWQ.mjs → chunk-66VOM5NA.mjs} +1 -1
- package/dist/chunk-APP5IYTE.mjs +1 -0
- package/dist/chunk-AYDREFWN.mjs +1 -0
- package/dist/chunk-CRJPE33X.mjs +1 -0
- package/dist/chunk-DC47WNPG.mjs +1 -0
- package/dist/chunk-DJTGR3RO.mjs +1 -0
- package/dist/chunk-DOJBWTT5.mjs +1 -0
- package/dist/chunk-F45IVFS3.mjs +1 -0
- package/dist/chunk-GKOMTSWV.mjs +1 -0
- package/dist/chunk-HU2XWUJC.mjs +1 -0
- package/dist/{chunk-MJ2PFKF3.mjs → chunk-KTRMNVPZ.mjs} +1 -1
- package/dist/{chunk-YXPRWW6B.mjs → chunk-M5P6VHZY.mjs} +1 -1
- package/dist/{chunk-QQB5G3VB.mjs → chunk-N4737FRL.mjs} +1 -1
- package/dist/{chunk-YTUQYKLM.mjs → chunk-NDGM4DAP.mjs} +1 -1
- package/dist/{chunk-GSEMSZDB.mjs → chunk-OAHYSDJ4.mjs} +1 -1
- package/dist/chunk-PYGRFSUU.mjs +1 -0
- package/dist/chunk-R34FOW4D.mjs +1 -0
- package/dist/{chunk-H2RLTCUJ.mjs → chunk-R3AJWOID.mjs} +1 -1
- package/dist/{chunk-RSUMSUAW.mjs → chunk-S7BCEQKP.mjs} +1 -1
- package/dist/{chunk-E5WNW4WE.mjs → chunk-T4CCY2EL.mjs} +1 -1
- package/dist/chunk-TH7DML4A.mjs +1 -0
- package/dist/chunk-UEGDSECJ.mjs +1 -0
- package/dist/chunk-WDAXARLI.mjs +1 -0
- package/dist/{chunk-Y6WD56SO.mjs → chunk-XG2YIAJS.mjs} +1 -1
- package/dist/chunk-Y3SF5YCR.mjs +1 -0
- package/dist/{chunk-BACXPVHP.mjs → chunk-ZG6XHKYO.mjs} +1 -1
- package/dist/chunk-ZG7MAEEV.mjs +30 -0
- package/dist/chunk-ZSL57PQ7.mjs +1 -0
- package/dist/cli.mjs +1 -1
- package/dist/codex-note-context-OUG4S6XE.mjs +1 -0
- package/dist/codex-project-B5466BL6.mjs +1 -0
- package/dist/focus-inspection-SZJ5KP23.mjs +1 -0
- package/dist/index.d.mts +5 -5
- package/dist/index.mjs +1 -1
- package/dist/media.d.mts +3 -3
- package/dist/{participantBootstrap-ClKpD2qC.d.mts → participantBootstrap-DFJlcKRI.d.mts} +2 -2
- package/dist/peer-client-SCSWLRCX.mjs +1 -0
- package/dist/plugin-astro.mjs +1 -1
- package/dist/plugin-nuxt.mjs +1 -1
- package/dist/plugin-vite.mjs +1 -1
- package/dist/server.d.mts +3 -3
- package/dist/server.mjs +1 -1
- package/dist/{steerStyles-VKQD57KC.mjs → steerStyles-E76E44PI.mjs} +1 -1
- package/dist/{subjects-EWAR5-0S.d.mts → subjects-DdavjSTL.d.mts} +12 -0
- package/dist/{video-adapter-BUMpNTCP.d.mts → video-adapter-DB6Hex1f.d.mts} +1 -1
- package/package.json +1 -3
- package/dist/ExploreAttachment-BG7ZOQSA.mjs +0 -1
- package/dist/PagePreviewLayer-CBDGPMJQ.mjs +0 -1
- package/dist/ParticipantRuntime-FSZX2PUQ.mjs +0 -1
- package/dist/PhoneHostGate-OM7FLOJ2.mjs +0 -1
- package/dist/PopmeltTasteConnectedPane-KJSBPJQR.mjs +0 -1
- package/dist/QueuedReplies-ZYUDSTS2.mjs +0 -1
- package/dist/SuppliedContext-7THB2WZY.mjs +0 -1
- package/dist/ThreadErrorCard-J2VTA5JW.mjs +0 -1
- package/dist/ThreadPanel-PNVMIIYJ.mjs +0 -1
- package/dist/browser-runtime-FFT5NH66.mjs +0 -1
- package/dist/chunk-3WSTAV5B.mjs +0 -1
- package/dist/chunk-67OWRNU3.mjs +0 -30
- package/dist/chunk-BFVLMSG5.mjs +0 -1
- package/dist/chunk-BJ25TGJN.mjs +0 -1
- package/dist/chunk-FMI4VQDZ.mjs +0 -1
- package/dist/chunk-GRPDZGPP.mjs +0 -1
- package/dist/chunk-JRP5XFYN.mjs +0 -1
- package/dist/chunk-LD3532UC.mjs +0 -1
- package/dist/chunk-MP6ZV2DN.mjs +0 -1
- package/dist/chunk-N66ZZG3L.mjs +0 -1
- package/dist/chunk-P4KM3K5M.mjs +0 -1
- package/dist/chunk-R3FPXDQS.mjs +0 -1
- package/dist/chunk-TRHC7WBO.mjs +0 -1
- package/dist/chunk-XSMCZUDR.mjs +0 -1
- package/dist/chunk-YC5CUNRU.mjs +0 -1
- package/dist/codex-note-context-NUKGR2WT.mjs +0 -1
- package/dist/codex-project-KE7ZZ6YX.mjs +0 -1
- package/dist/focus-inspection-BPPRCMNN.mjs +0 -1
- package/dist/peer-client-UQDASAO7.mjs +0 -1
- /package/dist/{chunk-G6RYESYI.mjs → chunk-6LBPTCGC.mjs} +0 -0
- /package/dist/{chunk-3GXLNBXU.mjs → chunk-XM6RE6HT.mjs} +0 -0
package/README.md
CHANGED
|
@@ -4,884 +4,44 @@
|
|
|
4
4
|
|
|
5
5
|
# Popmelt
|
|
6
6
|
|
|
7
|
-
Popmelt is a
|
|
7
|
+
Popmelt is a design layer for humans and AI. Point to an element in your local web app, describe a change, and work through it with Codex or Claude Code in a thread on the page.
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
## Install and leave your first annotation
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
You'll need a local web project, Node.js 18 or newer (or the version your framework requires), and a signed-in Codex or Claude Code CLI.
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
1. Open your project in your coding agent and ask it to install Popmelt using the [setup guide for your framework](https://popmelt.com/docs/core/getting-started).
|
|
14
14
|
|
|
15
|
-
|
|
15
|
+
```text
|
|
16
|
+
Let's install @popmelt.com/core in this project
|
|
17
|
+
```
|
|
16
18
|
|
|
17
|
-
|
|
18
|
-
-
|
|
19
|
-
|
|
20
|
-
- The Codex CLI or Claude Code CLI installed, available in your terminal, and authenticated
|
|
19
|
+
2. Start or restart your app with its usual development command and open its local URL.
|
|
20
|
+
3. Double-tap **Command** on macOS or **Control** on Windows or Linux to open the toolbar. Choose **Chat** (`C`), click a card, and type “Give this card more breathing room.”
|
|
21
|
+
4. Press **Cmd+Enter** or **Ctrl+Enter** to send the annotation. Review the change on the page and reply in the same thread.
|
|
21
22
|
|
|
22
|
-
|
|
23
|
+
Threads and screenshots are saved in your project under `.popmelt/`. When you send an annotation, the relevant context goes to your selected AI provider.
|
|
23
24
|
|
|
24
|
-
|
|
25
|
+
## Telemetry and opt-out
|
|
25
26
|
|
|
26
|
-
|
|
27
|
+
During local development, Popmelt reports daily active projects by default. Reports include a random project ID, Core version, framework, Node.js major version, and operating system. They exclude source code, annotations, and thread content. In Git projects, reporting begins after `popmelt.project.json` is committed. In a public repository, that ID can be linked back to the project.
|
|
27
28
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
```text
|
|
31
|
-
Let's install @popmelt.com/core in this project
|
|
32
|
-
```
|
|
33
|
-
|
|
34
|
-
Your agent can detect the framework, add the matching integration, and preserve your existing development command. Restart the development server when it is finished.
|
|
35
|
-
|
|
36
|
-
For the installing agent: finish with the [installation checks](#verify-the-installation), including the applicable ambient integration below. Report what is verified and any remaining step; adding dependencies alone is not a ready-to-use installation.
|
|
37
|
-
|
|
38
|
-
For manual instructions, see [Manual setup](#manual-setup). Experimental non-React integrations support DOM annotations and style edits, but do not provide React-specific component hierarchy or library previews.
|
|
39
|
-
|
|
40
|
-
To add local object recognition to an existing Popmelt project, use:
|
|
41
|
-
|
|
42
|
-
```text
|
|
43
|
-
Add @popmelt.com/see to this Popmelt Core project
|
|
44
|
-
```
|
|
45
|
-
|
|
46
|
-
The integration installs See and adds it to the existing Core provider's
|
|
47
|
-
`extensions` array without replacing Core.
|
|
48
|
-
|
|
49
|
-
## Try your first change
|
|
50
|
-
|
|
51
|
-
Pick one thing in your own app that you already want to improve:
|
|
52
|
-
|
|
53
|
-
1. Open your local app and double-tap Command on macOS or Control on Windows/Linux to open Popmelt.
|
|
54
|
-
2. Choose Chat (`C`), click the element, and describe a concrete change—for example, “Give this card more breathing room without changing the text size.”
|
|
55
|
-
3. Press Command/Control+Enter to send it, then review the result on the page.
|
|
56
|
-
4. Refine it in the same thread: “A little less padding, and keep the button aligned with the text.”
|
|
57
|
-
|
|
58
|
-
Questions, ideas, or issues? [Email](mailto:reb@popmelt.com) or [DM on X](https://x.com/bekhovsgun).
|
|
59
|
-
|
|
60
|
-
## Useful shortcuts
|
|
61
|
-
|
|
62
|
-
| Shortcut | Action |
|
|
63
|
-
| -------------------------------- | ------------------------------------------------------------------- |
|
|
64
|
-
| Double-tap Command or Control | Open or collapse Popmelt |
|
|
65
|
-
| `C` | Enter Chat mode |
|
|
66
|
-
| `S` | Enter Steer mode |
|
|
67
|
-
| `I` | Enter Imprint mode |
|
|
68
|
-
| Command/Control+Enter | Send all pending work |
|
|
69
|
-
| Command/Control+C | Capture a screenshot for pending work when no text is selected |
|
|
70
|
-
| Command/Control+Z | Undo a pending change or thread dismissal |
|
|
71
|
-
| Command/Control+Shift+Z | Redo a pending change |
|
|
72
|
-
| Backspace/Delete | Archive the open or selected historical thread |
|
|
73
|
-
| Command/Control+Backspace/Delete | Clear all annotations and pending changes |
|
|
74
|
-
| Escape | Go back, cancel, close, discard, or deselect in the current context |
|
|
75
|
-
|
|
76
|
-
Steer additionally owns the unmodified letter, arrow, Enter, Escape, and Space keys described in [Steer](#steer) while it is active. Popmelt leaves these shortcuts alone while you are typing in an input, textarea, or editable text surface.
|
|
77
|
-
|
|
78
|
-
## Use Popmelt
|
|
79
|
-
|
|
80
|
-
1. Run your project locally and open it in a browser
|
|
81
|
-
2. Double-tap Command on macOS or Control on Windows and Linux to open the Popmelt toolbar
|
|
82
|
-
3. Choose Chat (`C`), Steer (`S`), or Imprint (`I`)
|
|
83
|
-
4. Point to the relevant UI to add comments or preview design changes, or use Imprint to review the project's shared understanding
|
|
84
|
-
5. Press Command+Enter on macOS or Control+Enter on Windows and Linux to hand pending work to your coding agent
|
|
85
|
-
6. Review the result in its page-bound thread and keep iterating there
|
|
86
|
-
|
|
87
|
-
A handoff can contain several comments and changes, including work on different elements. Popmelt keeps that bundle together as one thread and presents its items separately at the beginning of the conversation. Status stays attached to the relevant parts of the page while work is queued or running, and you can reopen a thread from any of its badges. Tool and Imprint receipts show what helped the agent reach its result.
|
|
88
|
-
|
|
89
|
-
### Chat
|
|
90
|
-
|
|
91
|
-
Click and drag in Chat to draw a lasso around an area, then release and add your note. This works across HTML, Three.js, and splat scenes. Escape cancels the gesture. The loop records a region of the current view, not a 3D selection or segmentation; it follows page scrolling but does not track camera or object movement. Alt-drag retains adapter-specific object creation where available.
|
|
92
|
-
|
|
93
|
-
Chat pins a comment to a specific element. Click the element, type the comment, and press Enter to finish the draft. Use Shift+Enter for a new line or Command/Control+Enter to send the full pending bundle.
|
|
94
|
-
|
|
95
|
-
Paste images into a comment to attach visual references. An image-count chip keeps attachments visible in the draft rail; after sending, the images remain in the thread without the extra rail chip.
|
|
96
|
-
|
|
97
|
-
Double-click visible text to edit it directly. Popmelt records the text change so it can be handed off alongside comments and Steer changes.
|
|
98
|
-
|
|
99
|
-
#### Compare Explore options
|
|
100
|
-
|
|
101
|
-
When a thread is attached to one page element, Claude or Codex can also start a round from an ordinary request for visual alternatives, or revise the options in an existing card. Asking for feedback can stay conversational; the checkmark still applies only the chosen option in code.
|
|
102
|
-
|
|
103
|
-
Each new `/explore` round opens on its first suggestion. Step back once in the card or expanded canvas to compare it with **Original**, the target at the time of the request. History keeps a separate Original for each round. New rounds keep their editable recipes and pack the compiled previews together in `.popmelt`. Applying an option, editing its source, and archiving the thread preserve the reviewed previews. When you iterate on an attached option, **Based on** opens its frozen parent with the text and style edits you submitted. **Back to iteration** returns to the child. Later edits to the parent stay in its current draft. Older rounds can also replay when their saved bundle is available or their recipe rebuilds to the same hash. When runnable replay is unavailable, History shows the captured image if one was saved.
|
|
104
|
-
|
|
105
|
-
The card appears while Explore is building. Each option becomes available as soon as it passes its browser check. You can preview it, attach feedback, or queue it to be applied while later options are still building.
|
|
106
|
-
|
|
107
|
-
Click an element in a preview to attach it to your comment. Feedback on an attached element starts a revision of that option and keeps its Steer edits. Ask for all options explicitly to revise the whole round. On desktop, hold Option (Alt on Windows or Linux) to operate the fixture itself, such as clicking a button or dragging a scene.
|
|
108
|
-
|
|
109
|
-
#### On a phone
|
|
110
|
-
|
|
111
|
-
On a phone, open Chat and tap an element to comment. Swipe to scroll. The thread title has **Minimize** (leave the annotation on the page) and **Archive** (move the thread to History). Explore keeps its controls visible and opens above the conversation. Steer requires a fine pointer.
|
|
112
|
-
|
|
113
|
-
**Pair your own phone as a developer.** Use the same running dev project you use on desktop, with its Popmelt dev integration. Open the dev site over **HTTPS** on the phone first; the certificate must be trusted there. A phone cannot reach the computer's `localhost`. Use a reachable dev hostname or a private HTTPS tunnel to the app port. The bridge itself stays on loopback. From the same project directory, run:
|
|
29
|
+
**Turn telemetry off for all projects on this machine**
|
|
114
30
|
|
|
115
31
|
```sh
|
|
116
|
-
popmelt
|
|
32
|
+
npx @popmelt.com/core telemetry disable
|
|
117
33
|
```
|
|
118
34
|
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
#### Screens inside a canvas
|
|
122
|
-
|
|
123
|
-
Chat can target elements and edit visible DOM text inside **same-origin iframes**, including screens laid out in a translated/scaled canvas. Install Popmelt once in the outer page. Notes, text previews, and screenshot markers follow the selected screen through pan, zoom, and internal scrolling. Sent context includes the screen's URL, title, and frame label; identical element IDs in different screens remain distinct. Preview text edits affect only the selected screen instance, not the source code until handed off.
|
|
124
|
-
|
|
125
|
-
Give each iframe a stable, unique `id` or `data-testid` (for example, `id="passkey-success"`) and a descriptive `title`. Authored identity lets comments recover after a screen remount; without it Popmelt assigns a session-only frame ID. A frame that navigates to a different URL is not silently retargeted. Canvas fixtures may leave iframe `pointer-events: none` in their pan mode; Popmelt temporarily enables hit testing only while resolving a target and restores that setting immediately.
|
|
126
|
-
|
|
127
|
-
Cross-origin frames and sandboxed frames without same-origin access remain opaque. This support covers axis-aligned translation/scale, not rotated/skewed frame geometry, iframe Steer handles, or interaction recording inside frames. DOM-fallback screenshots include accessible frame content and scroll/clipping; native browser capture remains preferable for browser-rendered media and complex effects.
|
|
128
|
-
|
|
129
|
-
### Steer
|
|
130
|
-
|
|
131
|
-
Steer previews code-native design changes directly on the page. Point to an element, choose a family, narrow to a property, and choose a value. Click the target or press Enter at the value level to stage the preview.
|
|
132
|
-
|
|
133
|
-
| Keys | Family |
|
|
134
|
-
| ----------- | ---------------------------------- |
|
|
135
|
-
| `P` / `M` | Padding / margin |
|
|
136
|
-
| `B` / `R` | Borders / radii |
|
|
137
|
-
| `F` / `G` | Flexbox / grid |
|
|
138
|
-
| `FO` / `BG` | Type / background color |
|
|
139
|
-
| `T` / `O` | Transform / opacity and blend mode |
|
|
140
|
-
|
|
141
|
-
The omnidial can be driven entirely from the keyboard: `Q` and `E` move between properties, `A` and `D` or the arrow keys move between values, `W` or Enter goes deeper or applies, and `S` or Escape goes back. Press Space to search families, properties, colors, and values by name.
|
|
142
|
-
|
|
143
|
-
At the value level, padding, margin, gap, radius, and transform controls expose drag handles. Hold Shift while dragging to snap or constrain the change. For spacing and radius handles, hold Option/Alt or Control to isolate the touched side, axis, or corner.
|
|
144
|
-
|
|
145
|
-
### Imprint
|
|
146
|
-
|
|
147
|
-
Imprint opens the project's shared understanding. Use its filters to review grounded, emerging, and challenged explanations. Expand an explanation to see its rationale, concrete expressions, related understanding, and recent grounding evidence, or reopen its source thread. Changes to the Imprint are proposed and grounded through collaboration in threads rather than authored from this panel.
|
|
148
|
-
|
|
149
|
-
### Threads and drafts
|
|
150
|
-
|
|
151
|
-
- Click an annotation or status badge to open its thread
|
|
152
|
-
- Use the left and right chevrons in the thread header to cycle through visible threads
|
|
153
|
-
- Drag a thread header to move the panel; double-click the header to restore its default position
|
|
154
|
-
- Press Escape to close the open thread
|
|
155
|
-
- Press Backspace or Delete with a thread open, or with one of its historical annotations selected, to archive that thread
|
|
156
|
-
- Right-click a draft comment or staged Steer change in its annotation rail to remove only that draft item
|
|
157
|
-
- Right-click a replied rail to dismiss it from the canvas without deleting its history or reverting applied edits. Press **Command/Control+Z** outside a text editor to restore it before reloading. Rails with fresh drafts or active runs are protected.
|
|
158
|
-
- In the thread composer, Enter sends and Shift+Enter adds a line. During an active run, the host can press Enter or tap Send to redirect it with a new message. Command+Enter on macOS or Ctrl+Enter on Windows and Linux queues the message for later. If the original run finishes first, the message becomes a follow-up.
|
|
159
|
-
- When a reply is queued, use its pencil or trash button to edit or delete that individual message before it starts. Save an edit with the checkmark or Command/Control+Enter; Escape cancels the edit
|
|
160
|
-
- Codex permission requests appear chronologically in the thread as a compact action card, while the canvas and toolbar show **Approval needed**. Expand the card to inspect the exact command or file changes, then choose **Allow once** or **Deny**. Answered requests become an inline tool icon and label, retained in the thread history. Chat text is not a permission grant; Popmelt does not create remembered approvals. Your existing Codex permission rules still apply, so previously allowed commands may run without a new card. After 10 seconds without a response, a run waiting solely on approval yields to other queued jobs. Approving it while parked moves it to the front of the waiting queue, without interrupting active work. The exact action resumes only after reacquiring a slot; unanswered requests expire on resumption (or at 10 seconds if the run cannot safely yield). Same-thread follow-ups cannot overtake a parked run, and disconnected runs cannot be approved.
|
|
161
|
-
|
|
162
|
-
Interactive approvals require a Codex CLI that supports the app-server human-approval protocol (verified with 0.153.3). Popmelt checks the effective sandbox and reviewer before starting a coding turn; it does not fall back to unrestricted execution. Background memory review remains read-only and noninteractive. Network-specific and session-wide permission grants are not supported by this first version.
|
|
163
|
-
|
|
164
|
-
For an opt-in automatic-review trial, start the bridge or wrapped dev server with `POPMELT_CODEX_APPROVALS_REVIEWER=auto_review`. Eligible Codex approvals go to its native reviewer rather than a human; the sandbox and existing permission rules remain in place. This adds model usage and may still deny an action. The default remains human review (`user`); restarting without the variable restores it. Other providers are unchanged.
|
|
165
|
-
|
|
166
|
-
Archiving hides a thread from the active canvas without deleting its stored conversation. Delete shortcuts are disabled while a text field is focused.
|
|
167
|
-
|
|
168
|
-
### Message Codex or Claude from a canvas thread
|
|
169
|
-
|
|
170
|
-
With [multiplayer enabled](#experimental-multiplayer-opt-in), open a local chat in the same project using the [Codex plugin](#ambient-popmelt-in-codex) or the [Claude plugin](#ambient-popmelt-in-claude-code). For Claude Desktop, use the **Code** tab.
|
|
171
|
-
|
|
172
|
-
1. In the desktop chat, ask “Post ‘Which logo should we use?’ in the Popmelt thread about the install button.” Use the title or subject of a thread on your canvas. The note appears there with the app’s icon.
|
|
173
|
-
2. As the canvas host, start a text reply with `@Codex` or `@Claude`, for example `@Claude Can you find the official asset?`. The mention goes to the **last chat from that app that participated in this canvas thread**. To send from the canvas first, ask the intended desktop chat to link itself to that thread.
|
|
174
|
-
3. Codex queues the note in the addressed chat, even when it’s busy. In the addressed Claude chat, ask **“Any notes from Popmelt?”** to read it. You can then ask either chat to post its answer back to the canvas.
|
|
175
|
-
|
|
176
|
-
New local chats start with Popmelt **Edit** access. Posting with Edit starts or queues a canvas agent reply. A chat configured for **Suggest** posts discussion only. Existing project and agent permissions still apply. Only the canvas host can address a desktop chat.
|
|
177
|
-
|
|
178
|
-
### Pointer gestures
|
|
179
|
-
|
|
180
|
-
| Gesture | Action |
|
|
181
|
-
| -------------------------------------------------- | ------------------------------------------------------------------------ |
|
|
182
|
-
| Shake the pointer quickly | Switch between Chat and Steer |
|
|
183
|
-
| Hold Command/Control while pointing | Pass through the default target to the deepest element under the pointer |
|
|
184
|
-
| Double-click text in Chat | Edit the text directly |
|
|
185
|
-
| Click the toolbar annotation counter | Cycle through annotation bundles, including other routes |
|
|
186
|
-
| Scroll the annotation counter | Change the active annotation color |
|
|
187
|
-
| Hold the annotation counter | Reset the active color |
|
|
188
|
-
| Right-click Popmelt's canvas | Enter persistent page passthrough while keeping Popmelt overlays visible |
|
|
189
|
-
| Drag, scroll, pinch, or right-click in passthrough | Interact with the page and open its native context menu |
|
|
190
|
-
| Click a valid target in passthrough | Apply the active Chat or Steer action without leaving passthrough |
|
|
191
|
-
| Press Escape or choose another tool | Exit passthrough |
|
|
192
|
-
|
|
193
|
-
## Ambient Popmelt in Codex
|
|
194
|
-
|
|
195
|
-
Popmelt can also pair ordinary project-bound Codex conversations with the same local project memory. On supported Codex desktop or CLI surfaces, include this in setup unless the user wants toolbar-only use or has disabled the integration.
|
|
196
|
-
|
|
197
|
-
The bundled `popmelt-core` plugin installs the skill, MCP tools, and lifecycle hooks together; do not install separate copies of the skill or hooks. This is a personal installation, not just a project dependency. Explain that the hooks supply project context and record project-bound turns, and obtain any required permission before changing personal configuration. Preserve unrelated plugins, settings, and explicit opt-outs. See [OpenAI's plugin guidance](https://learn.chatgpt.com/docs/plugins) for supported surfaces and hook trust.
|
|
198
|
-
|
|
199
|
-
From the project, inspect the existing installation first:
|
|
200
|
-
|
|
201
|
-
```bash
|
|
202
|
-
npx @popmelt.com/core codex status
|
|
203
|
-
```
|
|
204
|
-
|
|
205
|
-
If missing or needing an update, install the bundled plugin:
|
|
206
|
-
|
|
207
|
-
```bash
|
|
208
|
-
npx @popmelt.com/core codex install
|
|
209
|
-
```
|
|
210
|
-
|
|
211
|
-
Follow the install command's restart instructions after ongoing work finishes, then begin a new Codex conversation in the project. Do not close active sessions automatically. A result of `files_installed` means plugin registration is incomplete; `installed` or `update_ready` still requires the reported restart and new conversation. Popmelt will orient the conversation automatically when one store applies. If multiple stores apply, Codex will ask you to choose one writable primary store and any read-only mounted stores; it never infers write authority from directory nesting, recency, or store size.
|
|
212
|
-
|
|
213
|
-
After restart, check that the plugin is registered and enabled and that the new session exposes the Popmelt skill, tools, and ambient context. Registration alone does not prove the hooks have loaded. If you cannot inspect the new session, report ambient activation as unverified rather than reinstalling repeatedly.
|
|
214
|
-
|
|
215
|
-
This installer is Codex-specific. Claude Code toolbar threads do not need it. For ordinary local Claude conversations, see the experimental native plugin below; do not copy Codex hooks into Claude settings.
|
|
216
|
-
|
|
217
|
-
Ambient capture stays out of toolbar-owned runs, so opening a thread from the in-page toolbar still produces exactly one toolbar job. Popmelt tools remain available for intentional context expansion, decision review, and Imprint grounding.
|
|
218
|
-
|
|
219
|
-
### Ambient Popmelt in Claude Code
|
|
220
|
-
|
|
221
|
-
The package also includes an experimental native Claude plugin with the Popmelt skill, local MCP tools, and prompt/tool/completion hooks. For local Claude Code, inspect first:
|
|
222
|
-
|
|
223
|
-
```bash
|
|
224
|
-
npx @popmelt.com/core claude status
|
|
225
|
-
```
|
|
226
|
-
|
|
227
|
-
With the user's permission for a personal plugin installation, install or update the bundle:
|
|
228
|
-
|
|
229
|
-
```bash
|
|
230
|
-
npx @popmelt.com/core claude install
|
|
231
|
-
```
|
|
232
|
-
|
|
233
|
-
The installer registers `popmelt-core@popmelt-local` through Claude's native plugin commands, using a local marketplace under `CLAUDE_CONFIG_DIR` (or `~/.claude`). It preserves disabled plugins, refuses conflicting sources/scopes, and never writes execution permission settings. Partial registration is reported separately from success. After ongoing work finishes, reload plugins or start a new Claude Code session; don't interrupt active work automatically.
|
|
234
|
-
|
|
235
|
-
Then check the setup without launching an agent request or restarting a bridge:
|
|
236
|
-
|
|
237
|
-
```bash
|
|
238
|
-
npx @popmelt.com/core claude doctor
|
|
239
|
-
```
|
|
240
|
-
|
|
241
|
-
`infrastructureReady` covers registration, locally reported sign-in, and the identity/version of an already-running project bridge. `sessionVerified` requires recent prompt-hook, MCP-tool, and completion-hook observations from one session of that installed plugin version. `ok` requires both. Observations expire after 24 hours and do not prove the session is still live or that Claude read the skill. Missing observations are **unverified**, not a reason to reinstall repeatedly. Bridge probes cover the standard 1111–1142 range; verify a custom port separately.
|
|
242
|
-
|
|
243
|
-
In a multi-store workspace, diagnostics honor the same saved human-selected primary and read-only mounts as ambient sessions. If that choice is missing, invalid, or no longer matches the available stores, orientation remains required; diagnostics never pick a replacement or rewrite the saved choice.
|
|
244
|
-
|
|
245
|
-
For a one-session trial without changing personal settings, you can instead load the packaged plugin directly:
|
|
246
|
-
|
|
247
|
-
```bash
|
|
248
|
-
claude --plugin-dir ./node_modules/@popmelt.com/core/claude-plugin
|
|
249
|
-
```
|
|
250
|
-
|
|
251
|
-
This uses Claude's native [plugin](https://code.claude.com/docs/en/plugins-reference) and [hook](https://code.claude.com/docs/en/hooks) formats. Respect Claude's workspace trust, plugin/MCP consent, and existing permission settings. The plugin adds no permission policy or execution grants.
|
|
252
|
-
|
|
253
|
-
Check that the session exposes the Popmelt skill and tools and that the next ordinary prompt receives ambient context. Use the exact tool-session ID it supplies. Store orientation, mounted read stores, focus inspection, and Imprint use the same bridge as Codex. Toolbar-owned Claude runs skip ambient capture.
|
|
254
|
-
|
|
255
|
-
The adapter keeps a private, bounded current-turn journal locally, correlates Claude's hooks, and retries against the same durable turn after bridge recovery. Missing/failed hooks remain unverified; API-error and session-end events are not recorded as successful completions. Concurrent processes using the same native Claude session are not supported in this preview. No transcript copy is read or retained.
|
|
256
|
-
|
|
257
|
-
Canvas messaging has been verified in local sessions in Claude Desktop’s **Code** tab. Chat, Cowork, and cloud sessions are outside this preview’s scope. Native plugin validation and isolated lifecycle checks do not prove activation in the user's session. Let the user choose the next real task; do not submit an automatic test annotation or paid request to manufacture readiness. The toolbar works independently.
|
|
258
|
-
|
|
259
|
-
### Point and discuss
|
|
260
|
-
|
|
261
|
-
With your app running and the Popmelt canvas active, point at an element and ask Codex, “What am I pointing at?” You can also ask it to inspect a comment or explain what was discussed in an existing thread, without pointing at that item first.
|
|
262
|
-
|
|
263
|
-
The prompt hook also supplies a small, timestamped snapshot of bridge-managed runs in the conversation's primary and mounted stores: running, awaiting approval, and queued. This conversation is identified separately; other externally hosted conversations are not counted. Reads are bounded to 500 ms and unavailable bridges are reported as unavailable, not idle. This context is advisory—agents must check live status before restarting or interrupting a bridge.
|
|
264
|
-
|
|
265
|
-
Popmelt supplies the canvas target and lets Codex read saved threads, unsent drafts, and staged changes as separate kinds of context. A small animated eye appears beside the target or its visible annotation rail during targeted tool access—even if the element itself is offscreen. It indicates access to that item, not the full time the agent spends thinking about it. Reading context does not submit your drafts or start another agent run.
|
|
266
|
-
|
|
267
|
-
When several copies of the app are open, recent canvas interaction helps select the intended page. If the target is still ambiguous, Codex can ask which page you mean instead of guessing. Focus is a timestamped snapshot, so keep the intended target selected or point again when needed.
|
|
268
|
-
|
|
269
|
-
Useful diagnostics:
|
|
270
|
-
|
|
271
|
-
```bash
|
|
272
|
-
npx @popmelt.com/core codex status
|
|
273
|
-
npx @popmelt.com/core codex doctor
|
|
274
|
-
```
|
|
275
|
-
|
|
276
|
-
`status` reports plugin registration and project discovery. `doctor` can start the local project bridge and check its health, so run it only for the intended project when starting that service is appropriate. Inspect the plugin fields and any project-selection warning as well as bridge health: a healthy bridge does not prove plugin activation, browser connectivity, or provider authentication.
|
|
277
|
-
|
|
278
|
-
## Imprint
|
|
279
|
-
|
|
280
|
-
As you work, Popmelt recognizes choices that may be useful beyond the current thread and proposes an Imprint update:
|
|
281
|
-
|
|
282
|
-
- **Yes** adds the learning to the project's shared understanding
|
|
283
|
-
- **This time** keeps it local to the current situation
|
|
284
|
-
- **No** leaves the Imprint unchanged and gives you room to explain what Popmelt misunderstood
|
|
285
|
-
|
|
286
|
-
Confirmed Imprint knowledge is available to future threads when it is relevant. Popmelt can also search the project's collaboration history when a question depends on earlier discussions, feedback, or the evolution of a part of the UI.
|
|
287
|
-
|
|
288
|
-
Enter Imprint mode with `I` to inspect the project's current understanding, supporting evidence, relationships, and exceptions.
|
|
289
|
-
|
|
290
|
-
## Manual setup
|
|
291
|
-
|
|
292
|
-
For React, add the provider below and follow the [Next.js](#nextjs),
|
|
293
|
-
[Vite](#vite), or [other development server](#other-development-servers) instructions.
|
|
294
|
-
For experimental non-React hosts, use the [standalone entry for vanilla HTML/JS or Vue](#experimental-standalone-browser-entry),
|
|
295
|
-
[Nuxt module](#experimental-nuxt-integration), [Svelte/SvelteKit setup](#experimental-svelte-and-sveltekit),
|
|
296
|
-
or [Astro integration](#experimental-astro-integration) instead of adding a React provider.
|
|
297
|
-
|
|
298
|
-
For a React app, install Popmelt and its icon peer dependency:
|
|
299
|
-
|
|
300
|
-
```bash
|
|
301
|
-
npm install @popmelt.com/core lucide-react
|
|
302
|
-
```
|
|
303
|
-
|
|
304
|
-
### Add the provider
|
|
305
|
-
|
|
306
|
-
Wrap your app with `PopmeltProvider`. In Next.js, the component that calls `useRouter()` must be a client component.
|
|
307
|
-
|
|
308
|
-
```tsx
|
|
309
|
-
'use client';
|
|
310
|
-
|
|
311
|
-
import { useRouter } from 'next/navigation';
|
|
312
|
-
|
|
313
|
-
import { PopmeltProvider } from '@popmelt.com/core';
|
|
314
|
-
|
|
315
|
-
export function Providers({ children }: { children: React.ReactNode }) {
|
|
316
|
-
const router = useRouter();
|
|
317
|
-
|
|
318
|
-
return <PopmeltProvider navigate={router.push}>{children}</PopmeltProvider>;
|
|
319
|
-
}
|
|
320
|
-
```
|
|
321
|
-
|
|
322
|
-
`navigate` is optional for single-page use. Pass your router's navigation function when Popmelt needs to restore annotations across routes.
|
|
323
|
-
|
|
324
|
-
### Add application context to comments
|
|
325
|
-
|
|
326
|
-
Use `getCommentMeta` to snapshot application-owned context whenever a human
|
|
327
|
-
submits annotations or replies in a thread. Popmelt validates and detaches the
|
|
328
|
-
JSON, includes it as contextual evidence for the model, and persists the same
|
|
329
|
-
snapshot with the stored human turn.
|
|
330
|
-
|
|
331
|
-
```tsx
|
|
332
|
-
<PopmeltProvider
|
|
333
|
-
getCommentMeta={({ kind }) => ({
|
|
334
|
-
'my-app/video-ui/v1': {
|
|
335
|
-
kind,
|
|
336
|
-
generation: {
|
|
337
|
-
prompt: generation.prompt,
|
|
338
|
-
dataVersion: store.getState().version,
|
|
339
|
-
},
|
|
340
|
-
frame: {
|
|
341
|
-
assetId: video.id,
|
|
342
|
-
timeMs: Math.round(video.currentTime * 1000),
|
|
343
|
-
},
|
|
344
|
-
interactions: recorder.snapshot(),
|
|
345
|
-
},
|
|
346
|
-
})}
|
|
347
|
-
>
|
|
348
|
-
{children}
|
|
349
|
-
</PopmeltProvider>
|
|
350
|
-
```
|
|
351
|
-
|
|
352
|
-
The hook may be synchronous or asynchronous. Return a plain JSON object; use a
|
|
353
|
-
namespaced, versioned key so multiple integrations can coexist. Comment
|
|
354
|
-
metadata is limited to 64 KiB per human turn. Keep large binaries and long
|
|
355
|
-
event logs in external storage or attachments and place their stable IDs,
|
|
356
|
-
hashes, and timestamps in `meta`.
|
|
357
|
-
|
|
358
|
-
#### Show context as a note card
|
|
359
|
-
|
|
360
|
-
Each top-level entry can use the exported `CommentMetaNote` shape. Pick a key that makes sense for your integration. Give a local note a `title` and `content`. A public web page can start with just a `sourceURI`.
|
|
361
|
-
|
|
362
|
-
```ts
|
|
363
|
-
import type { CommentMetaNote, GetCommentMeta } from '@popmelt.com/core';
|
|
364
|
-
|
|
365
|
-
const exportPolicy = {
|
|
366
|
-
source: 'Obsidian',
|
|
367
|
-
title: 'Export policy',
|
|
368
|
-
content: 'Verify the workspace before enabling export.',
|
|
369
|
-
sourceIcon: '/icons/obsidian.svg',
|
|
370
|
-
sourceURI: 'notes/Exports.md',
|
|
371
|
-
} satisfies CommentMetaNote;
|
|
372
|
-
|
|
373
|
-
const getCommentMeta: GetCommentMeta = () => ({
|
|
374
|
-
'my-app/export-policy/v1': exportPolicy,
|
|
375
|
-
});
|
|
376
|
-
```
|
|
377
|
-
|
|
378
|
-
The optional `source` prefixes the title, as in **Obsidian: Export policy**. The optional `sourceIcon` replaces the plug with a same-origin PNG or SVG asset or an image data URL. If the icon fails to display, the card shows the plug.
|
|
379
|
-
|
|
380
|
-
A `sourceURI` makes the title clickable. Project-relative paths like `notes/Exports.md` open in VS Code using the viewer’s local Popmelt project root. If the root is unknown or the relative path escapes it, the title stays plain text. Absolute file paths refer to that machine. To open a note in Obsidian, use a link such as `obsidian://open?vault=Design&file=Product%2FExports`.
|
|
381
|
-
|
|
382
|
-
#### Preview a remote source
|
|
383
|
-
|
|
384
|
-
```ts
|
|
385
|
-
import type { GetCommentMeta } from '@popmelt.com/core';
|
|
386
|
-
|
|
387
|
-
const getCommentMeta: GetCommentMeta = () => ({
|
|
388
|
-
'my-app/reference/v1': {
|
|
389
|
-
sourceURI: 'https://rbkh.design/llms',
|
|
390
|
-
content: 'Use the accessibility section for this review.', // optional
|
|
391
|
-
},
|
|
392
|
-
});
|
|
393
|
-
```
|
|
394
|
-
|
|
395
|
-
A public HTTP(S) URL opts that entry into a preview. At send time, the local bridge fills missing fields from the page title, description, and favicon. **Each developer-supplied field wins independently.** In the example, the card uses the site’s title and favicon alongside the supplied sentence. Omit `content` to use the site’s description.
|
|
396
|
-
|
|
397
|
-
Popmelt saves the preview with the human message. The model receives the text and URL and can follow the link when it needs more detail. Reopening a thread shows the saved snapshot. If a lookup fails, the message still sends and the title links to the URL, with the hostname and plug as fallbacks.
|
|
398
|
-
|
|
399
|
-
Multiple entries share one disclosure. Extra fields remain available under **Original data**, and the thread can display arbitrary JSON directly.
|
|
400
|
-
|
|
401
|
-
### Next.js
|
|
402
|
-
|
|
403
|
-
Next.js needs both the command wrapper and the config wrapper. The command wrapper discovers or starts a compatible detached bridge for the project, passes its address to Next.js, and holds a lease until the dev command exits. Clients sharing a project must use the same event transport. To switch transports, stop the existing bridge first. Older bridges that cannot confirm they are idle also require a manual stop before replacement.
|
|
404
|
-
|
|
405
|
-
Update the existing development script while preserving any flags already in use:
|
|
406
|
-
|
|
407
|
-
```json
|
|
408
|
-
{
|
|
409
|
-
"scripts": {
|
|
410
|
-
"dev": "popmelt wrap -- next dev"
|
|
411
|
-
}
|
|
412
|
-
}
|
|
413
|
-
```
|
|
414
|
-
|
|
415
|
-
Then wrap the Next config:
|
|
416
|
-
|
|
417
|
-
```ts
|
|
418
|
-
// next.config.ts
|
|
419
|
-
import { withPopmelt } from '@popmelt.com/core/next';
|
|
420
|
-
|
|
421
|
-
const nextConfig = {};
|
|
422
|
-
|
|
423
|
-
export default withPopmelt(nextConfig);
|
|
424
|
-
```
|
|
35
|
+
Popmelt also honors `DO_NOT_TRACK=1`.
|
|
425
36
|
|
|
426
|
-
|
|
37
|
+
## Docs
|
|
427
38
|
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
// vite.config.ts
|
|
434
|
-
import { popmelt } from '@popmelt.com/core/vite';
|
|
435
|
-
import react from '@vitejs/plugin-react';
|
|
436
|
-
import { defineConfig } from 'vite';
|
|
437
|
-
|
|
438
|
-
export default defineConfig({
|
|
439
|
-
plugins: [react(), popmelt()],
|
|
440
|
-
});
|
|
441
|
-
```
|
|
442
|
-
|
|
443
|
-
### Experimental standalone browser entry
|
|
444
|
-
|
|
445
|
-
The first framework-independent integration is available at `@popmelt.com/core/browser`.
|
|
446
|
-
It mounts Popmelt beside the host application, without JSX or a React provider in
|
|
447
|
-
your application code. React still renders Popmelt internally; the package's
|
|
448
|
-
existing React, React DOM, and Lucide React peer dependencies are still required.
|
|
449
|
-
This is an experimental DOM integration, not a claim of Vue/Svelte/Angular feature
|
|
450
|
-
parity. React-specific component hierarchy and library previews are not supplied
|
|
451
|
-
for other frameworks yet.
|
|
452
|
-
|
|
453
|
-
For a Vite host, keep the existing `@popmelt.com/core/vite` bridge plugin, then use
|
|
454
|
-
this in your browser entry:
|
|
455
|
-
|
|
456
|
-
```js
|
|
457
|
-
if (import.meta.env.DEV) {
|
|
458
|
-
const { mountPopmelt } = await import('@popmelt.com/core/browser');
|
|
459
|
-
const popmelt = await mountPopmelt({ enabled: true });
|
|
460
|
-
import.meta.hot?.dispose(() => popmelt.unmount());
|
|
461
|
-
}
|
|
462
|
-
```
|
|
463
|
-
|
|
464
|
-
Enablement is explicit: omitted/false `enabled` or a server-side call is a no-op
|
|
465
|
-
and does not load the renderer. `unmount()` removes the UI and releases its
|
|
466
|
-
subscriptions without deleting saved annotations or cancelling bridge jobs.
|
|
467
|
-
Call it before mounting again; simultaneous integrations on one page are rejected.
|
|
468
|
-
Use either this entry or `PopmeltProvider`, not both. Pass `bridgeUrl`, `projectId`,
|
|
469
|
-
or a host-router `navigate` callback when these are not supplied by your integration.
|
|
470
|
-
Explicit bridge/project options take effect before startup and restore prior
|
|
471
|
-
host bindings when unmounted; no manual browser-global assignment is needed.
|
|
472
|
-
|
|
473
|
-
For Vue, mount your app normally and mount Popmelt alongside it, not inside the
|
|
474
|
-
Vue component tree. Keep your Vue Vite plugin and add `popmelt()` to that same
|
|
475
|
-
plugin list. Connect the returned `unmount()` to your app's teardown (for example,
|
|
476
|
-
`app.onUnmount(() => popmelt.unmount())` in Vue 3.5+). With Vue Router, pass
|
|
477
|
-
`navigate: (url) => router.push(url)`; no router dependency is required by Core.
|
|
478
|
-
|
|
479
|
-
The vanilla HTML/JS integration requires Vite and installed npm peers; a
|
|
480
|
-
bundler-free script tag or arbitrary static-server setup is not covered.
|
|
481
|
-
Vue Router guards, nested routes, and hash-history mode are not yet tested.
|
|
482
|
-
|
|
483
|
-
### Experimental multiplayer (opt-in)
|
|
484
|
-
|
|
485
|
-
Multiplayer is off by default. The package includes peer canvases for early
|
|
486
|
-
testing, but ordinary installations do not show the host peer bubble or invite
|
|
487
|
-
controls and do not start the peer transport. Your solo annotations and threads
|
|
488
|
-
continue to work as before.
|
|
489
|
-
|
|
490
|
-
```tsx
|
|
491
|
-
<PopmeltProvider multiplayer>{children}</PopmeltProvider>
|
|
492
|
-
```
|
|
493
|
-
|
|
494
|
-
For Vue, Svelte/SvelteKit, or other browser mounts:
|
|
495
|
-
|
|
496
|
-
```ts
|
|
497
|
-
const popmelt = await mountPopmelt({ enabled: true, multiplayer: true });
|
|
498
|
-
```
|
|
499
|
-
|
|
500
|
-
Nuxt: `popmelt: { multiplayer: true }` in `nuxt.config.ts`.
|
|
501
|
-
Astro: `popmelt({ multiplayer: true })` in the integrations list.
|
|
502
|
-
When Astro uses `client: false`, set the option on your own provider/mount instead.
|
|
503
|
-
Next.js and React/Vite set it on the provider, not the dev-server plugin.
|
|
504
|
-
|
|
505
|
-
This is a client feature opt-in, not a security control or automatic server
|
|
506
|
-
configuration. Participant hosting still requires a participant-capable bridge
|
|
507
|
-
and dev-server bootstrap. Explicitly configured participant pages require this
|
|
508
|
-
opt-in too; disabling it stops enrollment and shows a disabled notice rather
|
|
509
|
-
than falling back to an unauthenticated solo writer. Preview frames never mount
|
|
510
|
-
a writer. Saved drafts and server-side invitations are not deleted or revoked
|
|
511
|
-
by changing the prop. See [participant integration](docs/participant-integration.md).
|
|
512
|
-
|
|
513
|
-
### Experimental Nuxt integration
|
|
514
|
-
|
|
515
|
-
For Nuxt 4.5.2, install Popmelt and its internal renderer peers as development
|
|
516
|
-
dependencies, then add the module:
|
|
517
|
-
|
|
518
|
-
```sh
|
|
519
|
-
npm install -D @popmelt.com/core react react-dom lucide-react
|
|
520
|
-
```
|
|
521
|
-
|
|
522
|
-
```ts
|
|
523
|
-
// nuxt.config.ts
|
|
524
|
-
export default defineNuxtConfig({
|
|
525
|
-
modules: ['@popmelt.com/core/nuxt'],
|
|
526
|
-
});
|
|
527
|
-
```
|
|
528
|
-
|
|
529
|
-
No separate Vite plugin, React provider, or manual browser mount is needed.
|
|
530
|
-
The module starts the local bridge in development and mounts Popmelt after Nuxt
|
|
531
|
-
has mounted the client app. It uses Nuxt's router for navigation and releases
|
|
532
|
-
its bridge lease on graceful shutdown. When Nuxt's CLI exits immediately, the
|
|
533
|
-
existing lease-expiry cleanup stops an idle bridge within about a minute.
|
|
534
|
-
Production builds do not register the client
|
|
535
|
-
plugin or start the bridge. Optional `popmelt` settings are `port`, `projectRoot`,
|
|
536
|
-
and `bridge` (set `bridge: false` to disable automatic bridge startup).
|
|
537
|
-
|
|
538
|
-
Use a Nuxt-compatible Node version (22.19+, 24.11+, or 26+).
|
|
539
|
-
Nuxt 3, component metadata, and advanced router configurations are not yet tested.
|
|
540
|
-
|
|
541
|
-
### Experimental Svelte and SvelteKit
|
|
542
|
-
|
|
543
|
-
Tested with Svelte 5.57.0, SvelteKit 2.70.3, and Vite 8.2.2. Install the same
|
|
544
|
-
development dependencies used by the standalone entry:
|
|
545
|
-
|
|
546
|
-
```sh
|
|
547
|
-
npm install -D @popmelt.com/core react react-dom lucide-react
|
|
548
|
-
```
|
|
549
|
-
|
|
550
|
-
Keep your existing Vite configuration and add `popmelt()` alongside `sveltekit()`
|
|
551
|
-
(or `svelte()` for a plain Svelte app):
|
|
552
|
-
|
|
553
|
-
```js
|
|
554
|
-
import { sveltekit } from '@sveltejs/kit/vite';
|
|
555
|
-
import { popmelt } from '@popmelt.com/core/vite';
|
|
556
|
-
|
|
557
|
-
export default { plugins: [sveltekit(), popmelt()] };
|
|
558
|
-
```
|
|
559
|
-
|
|
560
|
-
Mount once in your root `+layout.svelte`, without replacing its existing content:
|
|
561
|
-
|
|
562
|
-
```svelte
|
|
563
|
-
<script>
|
|
564
|
-
import { onMount } from 'svelte';
|
|
565
|
-
import { goto } from '$app/navigation';
|
|
566
|
-
import { bridgeUrl, projectId } from 'virtual:popmelt/bridge';
|
|
567
|
-
|
|
568
|
-
onMount(() => {
|
|
569
|
-
if (!import.meta.env.DEV || !bridgeUrl || !projectId) return;
|
|
570
|
-
let disposed = false;
|
|
571
|
-
const pending = import('@popmelt.com/core/browser').then(({ mountPopmelt }) => {
|
|
572
|
-
if (!disposed) return mountPopmelt({ enabled: true, bridgeUrl, projectId, navigate: goto });
|
|
573
|
-
});
|
|
574
|
-
void pending.catch(console.error);
|
|
575
|
-
return () => {
|
|
576
|
-
disposed = true;
|
|
577
|
-
void pending.then((handle) => handle?.unmount()).catch(() => {});
|
|
578
|
-
};
|
|
579
|
-
});
|
|
580
|
-
</script>
|
|
581
|
-
```
|
|
582
|
-
|
|
583
|
-
For plain Svelte, place this in `App.svelte` and omit the `goto` import and
|
|
584
|
-
`navigate` option, or supply your own router callback. TypeScript projects can
|
|
585
|
-
add `/// <reference types="@popmelt.com/core/vite/client" />` to their app's
|
|
586
|
-
ambient declarations for the virtual module types.
|
|
587
|
-
|
|
588
|
-
This setup is development-only, including during SSR. It does not provide
|
|
589
|
-
Svelte component metadata or framework-specific library previews. Advanced
|
|
590
|
-
Kit routing, form actions, and deployment adapters beyond Node are not yet tested.
|
|
591
|
-
|
|
592
|
-
### Experimental Astro integration
|
|
593
|
-
|
|
594
|
-
For Astro 7.3.1, install Popmelt and its internal renderer peers as development
|
|
595
|
-
dependencies, then add the Astro integration:
|
|
596
|
-
|
|
597
|
-
```sh
|
|
598
|
-
npm install -D @popmelt.com/core react react-dom lucide-react
|
|
599
|
-
```
|
|
600
|
-
|
|
601
|
-
```js
|
|
602
|
-
// astro.config.mjs
|
|
603
|
-
import { popmelt } from '@popmelt.com/core/astro';
|
|
604
|
-
import { defineConfig } from 'astro/config';
|
|
605
|
-
|
|
606
|
-
export default defineConfig({
|
|
607
|
-
integrations: [popmelt()],
|
|
608
|
-
});
|
|
609
|
-
```
|
|
610
|
-
|
|
611
|
-
The integration starts the bridge and mounts Popmelt automatically in development;
|
|
612
|
-
no React island or provider is needed. It supports DOM annotations and style edits,
|
|
613
|
-
with thread recovery through reloads and Astro ClientRouter navigation. Production
|
|
614
|
-
builds and previews do not mount Popmelt or start its bridge.
|
|
615
|
-
|
|
616
|
-
If your project already mounts a Popmelt provider, use `popmelt({ client: false })`
|
|
617
|
-
to keep that provider in charge of the UI. The existing `port`, `projectRoot`,
|
|
618
|
-
`basePath`, and `bridge` options remain available.
|
|
619
|
-
|
|
620
|
-
Astro component metadata, framework-specific island previews, and deployment
|
|
621
|
-
adapters are not yet covered.
|
|
622
|
-
|
|
623
|
-
### Other development servers
|
|
624
|
-
|
|
625
|
-
The wrapper can start Popmelt alongside another development command:
|
|
626
|
-
|
|
627
|
-
```json
|
|
628
|
-
{
|
|
629
|
-
"scripts": {
|
|
630
|
-
"dev": "popmelt wrap -- your-existing-dev-command"
|
|
631
|
-
}
|
|
632
|
-
}
|
|
633
|
-
```
|
|
634
|
-
|
|
635
|
-
### Local event transport
|
|
636
|
-
|
|
637
|
-
Core uses WebSocket for local bridge events by default. Commands and approvals remain authenticated HTTP requests. Older bridges without WebSocket discovery continue using SSE; authentication failures never trigger a silent downgrade.
|
|
638
|
-
|
|
639
|
-
To explicitly roll back, set `POPMELT_EXPERIMENTAL_EVENT_TRANSPORT=sse` before launching your dev server, or use `popmelt({ experimentalEventTransport: 'sse' })` for a plugin-owned bridge. Explicit plugin options take precedence over the environment. Restart only the affected app/bridge and reload its page after changing the setting. The existing option name is retained for compatibility.
|
|
640
|
-
|
|
641
|
-
### Connect your Popmelt account
|
|
642
|
-
|
|
643
|
-
Cloud account access does not require multiplayer. With your local dev server
|
|
644
|
-
running, open Popmelt Settings. For a standard installation, run this from the
|
|
645
|
-
same project directory used by the bridge (replace the URL with your app):
|
|
646
|
-
|
|
647
|
-
```bash
|
|
648
|
-
npx popmelt cloud link http://localhost:3000
|
|
649
|
-
```
|
|
650
|
-
|
|
651
|
-
Open the printed private link within five minutes, then use **Sign in** in
|
|
652
|
-
Settings. The link can be claimed once, only by that app origin. Treat it as a
|
|
653
|
-
credential: do not share it or paste it into logs/issues. Linking authorizes this
|
|
654
|
-
browser tab's session to use the local cloud connection; it does not sign you in
|
|
655
|
-
to popmelt.com or enable multiplayer. Relink after closing the browser session or
|
|
656
|
-
changing the app origin/bridge port. Participant installations instead retain
|
|
657
|
-
their existing host-only account boundary; guests cannot link around it.
|
|
658
|
-
|
|
659
|
-
The project-specific local linking key lives outside the repository in
|
|
660
|
-
`~/.popmelt-cloud-hosts/`. The CLI sends a short-lived, one-use signature, never
|
|
661
|
-
that key. OAuth refresh credentials stay in the OS credential store; they are not
|
|
662
|
-
stored in page code, localStorage, the linking URL, or the repository. If native
|
|
663
|
-
secure storage is unavailable, cloud sign-in fails closed. Settings **Disconnect**
|
|
664
|
-
removes this project's stored cloud connection, not your popmelt.com account.
|
|
665
|
-
|
|
666
|
-
New bridges default to production. Use `POPMELT_CLOUD_TASTE=staging` before
|
|
667
|
-
starting the dev server for the isolated staging service, or
|
|
668
|
-
`POPMELT_CLOUD_TASTE=off` to disable cloud access. An explicit server
|
|
669
|
-
`cloudTaste: { environment: 'staging' }` or `cloudTaste: false` overrides the
|
|
670
|
-
environment variable. Production and staging have separate credential namespaces
|
|
671
|
-
and private UI caches; switching environments requires the corresponding login.
|
|
672
|
-
|
|
673
|
-
## Verify the installation
|
|
674
|
-
|
|
675
|
-
For the installing agent, verify the user's actual app, not a separate demo or fixture. Work from the correct application directory and preserve its existing scripts and configuration.
|
|
676
|
-
|
|
677
|
-
1. **Framework and app:** confirm the installed dependencies and matching provider/mount and framework integration. Explain any relevant experimental-support limit. Start the app using its existing development command, or restart only its own development process when needed and authorized. Do not interrupt active work or other projects.
|
|
678
|
-
2. **Browser:** open the exact local URL reported by the development server. Confirm the app loads and double-tap Command or Control to check that the toolbar appears. If browser access is unavailable, report the integration as configured but browser verification as pending.
|
|
679
|
-
3. **Bridge:** confirm the local bridge belongs to this application and is healthy, then check the toolbar's connection when browser access is available. A service responding on some port is not enough. Use the applicable Codex or Claude diagnostics above with their stated limits; do not treat them as a general end-to-end check.
|
|
680
|
-
4. **Provider:** confirm the selected CLI is available to the bridge process, not only to an unrelated terminal, and check version compatibility and sign-in status using supported, non-generating diagnostics where available. Do not print credentials, change sandbox/approval settings to make checks pass, or submit a paid test prompt. If authentication cannot be checked safely, say so. These checks establish readiness, not successful end-to-end execution; the user's first real request verifies that.
|
|
681
|
-
5. **Ambient integration, when applicable:** follow the bundled Codex setup or experimental local Claude Code setup above, keeping personal installation, registration, and activation in a new session distinct. Preserve disabled integrations and get permission before personal installation. Track a required restart or unavailable surface separately from toolbar readiness; an optional ambient gap should not prevent the user from trying a working toolbar.
|
|
682
|
-
|
|
683
|
-
To start the app manually, use its existing development command, for example:
|
|
684
|
-
|
|
685
|
-
```bash
|
|
686
|
-
npm run dev
|
|
687
|
-
```
|
|
688
|
-
|
|
689
|
-
### Finish with a useful handoff
|
|
690
|
-
|
|
691
|
-
Only describe a check as verified when you observed it. Keep the completion message brief: give the exact local app URL, distinguish configured from verified, and name each remaining gap with its next step. For example, when the relevant checks pass:
|
|
692
|
-
|
|
693
|
-
```text
|
|
694
|
-
Popmelt is ready at [the app's actual local URL]. Double-tap Command/Control, click something you want changed, and leave a comment.
|
|
695
|
-
```
|
|
696
|
-
|
|
697
|
-
If ambient setup still needs a restart, say so separately. Let the user choose the first change; do not create a test annotation or launch an agent run merely to validate installation.
|
|
698
|
-
|
|
699
|
-
### If something is not ready
|
|
700
|
-
|
|
701
|
-
- **Toolbar missing:** check the provider or browser mount, development-only enablement, framework config, and whether the running app picked up the change. In Next.js, both `withPopmelt` and `popmelt wrap` are required.
|
|
702
|
-
- **Bridge disconnected:** check the intended project's bridge and the toolbar's connection settings. If a process must be restarted, identify that process and check for active work first; do not restart everything.
|
|
703
|
-
- **Provider unavailable:** distinguish a missing executable, incompatible version, missing sign-in, or a bridge environment that differs from the terminal. Give the specific installation, sign-in, or targeted restart step supported by the evidence. A denied diagnostic is unverified, not proof the provider is broken.
|
|
704
|
-
- **Ambient context missing:** inspect `codex status` for registration/enabled state, follow any pending restart, and check a new project-bound session. Resolve project selection with the user when needed; do not infer the project or install duplicate hooks.
|
|
705
|
-
|
|
706
|
-
## React Three Fiber
|
|
707
|
-
|
|
708
|
-
Popmelt can target objects rendered by React Three Fiber while Core continues to
|
|
709
|
-
own the familiar hover, annotation, and thread presentation. Install the R3F
|
|
710
|
-
peers alongside Core:
|
|
711
|
-
|
|
712
|
-
```bash
|
|
713
|
-
npm install @popmelt.com/core @react-three/fiber three
|
|
714
|
-
```
|
|
715
|
-
|
|
716
|
-
Keep `PopmeltProvider` outside the canvas and mount `PopmeltThreeAdapter` inside
|
|
717
|
-
it. The adapter renders nothing; it registers the current scene, camera, and
|
|
718
|
-
renderer with the nearest provider.
|
|
719
|
-
|
|
720
|
-
```tsx
|
|
721
|
-
import { Canvas } from '@react-three/fiber';
|
|
722
|
-
import { PopmeltProvider } from '@popmelt.com/core';
|
|
723
|
-
import { PopmeltThreeAdapter } from '@popmelt.com/core/react-three-fiber';
|
|
724
|
-
|
|
725
|
-
export function ProductPreview() {
|
|
726
|
-
return (
|
|
727
|
-
<PopmeltProvider>
|
|
728
|
-
<Canvas>
|
|
729
|
-
<PopmeltThreeAdapter />
|
|
730
|
-
<ProductScene />
|
|
731
|
-
</Canvas>
|
|
732
|
-
</PopmeltProvider>
|
|
733
|
-
);
|
|
734
|
-
}
|
|
735
|
-
```
|
|
736
|
-
|
|
737
|
-
Named objects receive readable labels automatically. Add stable application
|
|
738
|
-
identity when object names or scene ordering may change:
|
|
739
|
-
|
|
740
|
-
```tsx
|
|
741
|
-
<mesh
|
|
742
|
-
name="Bottle"
|
|
743
|
-
userData={{ popmeltId: 'hero-bottle', popmeltLabel: 'Hero bottle' }}
|
|
744
|
-
>
|
|
745
|
-
{/* geometry and material */}
|
|
746
|
-
</mesh>
|
|
747
|
-
```
|
|
748
|
-
|
|
749
|
-
Use a distinct `id` for each adapter when a page owns multiple canvases. Pass
|
|
750
|
-
`root` to target only one scene subtree, `captureFrame={false}` to omit renderer
|
|
751
|
-
screenshots, or `select`, `key`, `label`, and `describe` to adapt an application's
|
|
752
|
-
scene semantics.
|
|
753
|
-
|
|
754
|
-
For integrations that need the registered adapter instance, use the hook inside
|
|
755
|
-
the canvas instead of the component:
|
|
756
|
-
|
|
757
|
-
```tsx
|
|
758
|
-
import { usePopmeltThreeAdapter } from '@popmelt.com/core/react-three-fiber';
|
|
759
|
-
|
|
760
|
-
function ProductPopmeltAdapter() {
|
|
761
|
-
const adapter = usePopmeltThreeAdapter({ id: 'product-preview' });
|
|
762
|
-
// Optional application-specific coordination with adapter.
|
|
763
|
-
void adapter;
|
|
764
|
-
return null;
|
|
765
|
-
}
|
|
766
|
-
```
|
|
767
|
-
|
|
768
|
-
The component is the recommended default; the hook exposes the same lifecycle
|
|
769
|
-
for advanced composition.
|
|
770
|
-
|
|
771
|
-
## Media annotation
|
|
772
|
-
|
|
773
|
-
Manual image and video annotation are enabled by default in `PopmeltProvider`,
|
|
774
|
-
without a vision dependency or model download.
|
|
775
|
-
|
|
776
|
-
```tsx
|
|
777
|
-
<PopmeltProvider>{children}</PopmeltProvider>
|
|
778
|
-
|
|
779
|
-
// Optional: disable image annotation.
|
|
780
|
-
<PopmeltProvider imageAnnotation={false}>{children}</PopmeltProvider>
|
|
781
|
-
|
|
782
|
-
// Optional: disable video annotation.
|
|
783
|
-
<PopmeltProvider videoAnnotation={false}>{children}</PopmeltProvider>
|
|
784
|
-
|
|
785
|
-
// Optional: limit image discovery (all img elements are included by default).
|
|
786
|
-
<PopmeltProvider imageAnnotation={{ selector: 'img[data-popmelt-media]' }}>
|
|
787
|
-
{children}
|
|
788
|
-
</PopmeltProvider>
|
|
789
|
-
```
|
|
790
|
-
|
|
791
|
-
In Chat mode, drag over an image to create a named object. Double-click an object to
|
|
792
|
-
rename or resize it, single-click it to comment, and right-click its label to
|
|
793
|
-
delete it. Saved targets stay aligned as the image resizes.
|
|
794
|
-
|
|
795
|
-
The same interactions work on a paused video. A manual box stays at the saved
|
|
796
|
-
position unless a perception extension supplies motion tracking. Motion tracks
|
|
797
|
-
produced by an extension are persisted and remain replayable by Core alone.
|
|
798
|
-
|
|
799
|
-
Image targets use browser-local storage by default. Supply
|
|
800
|
-
`imageAnnotation.store` when the project needs another persistence layer. Add a
|
|
801
|
-
stable `data-popmelt-media-id` to images whose URL may change or whose source
|
|
802
|
-
appears more than once. Use the same attribute for durable video identities:
|
|
803
|
-
|
|
804
|
-
```tsx
|
|
805
|
-
<img data-popmelt-media-id="hero-product" src={imageUrl} alt="Product" />
|
|
806
|
-
<video data-popmelt-media-id="hero-reel" src={videoUrl} controls />
|
|
807
|
-
```
|
|
808
|
-
|
|
809
|
-
No recognition or model download occurs unless See is installed and enabled.
|
|
810
|
-
|
|
811
|
-
## Add local object recognition with See
|
|
812
|
-
|
|
813
|
-
[`@popmelt.com/see`](https://www.npmjs.com/package/@popmelt.com/see) adds
|
|
814
|
-
browser-local object detection and optional video tracking to the existing media
|
|
815
|
-
annotation experience. It requires Core 0.17.0 or newer.
|
|
816
|
-
|
|
817
|
-
Install it:
|
|
818
|
-
|
|
819
|
-
```bash
|
|
820
|
-
npm install @popmelt.com/see
|
|
821
|
-
```
|
|
822
|
-
|
|
823
|
-
Then add the extension to the existing Core provider:
|
|
824
|
-
|
|
825
|
-
```tsx
|
|
826
|
-
import { PopmeltProvider } from '@popmelt.com/core';
|
|
827
|
-
import { see } from '@popmelt.com/see';
|
|
828
|
-
|
|
829
|
-
<PopmeltProvider extensions={[see]}>{children}</PopmeltProvider>;
|
|
830
|
-
```
|
|
831
|
-
|
|
832
|
-
Recognition loads only when it is needed. Other extensions can be included in
|
|
833
|
-
the same array. Model selection, self-hosting, recognition, and video tracking are
|
|
834
|
-
documented in the See package README.
|
|
835
|
-
|
|
836
|
-
## Data and privacy
|
|
837
|
-
|
|
838
|
-
Popmelt stores its annotations, screenshots, threads, UI preferences, and Imprint locally under `.popmelt/`. Unsent annotation drafts, preview state, and the default media-object stores use origin-scoped browser storage. Supply project-backed `imageAnnotation.store` and `videoAnnotation.store` implementations when media targets must survive browser-site-data removal or move between origins.
|
|
839
|
-
|
|
840
|
-
When you send a thread, the context needed to complete that work is passed to your selected AI provider and is subject to that provider's privacy policy.
|
|
841
|
-
|
|
842
|
-
Popmelt is designed for local development. As with any AI-assisted coding, your agent may edit files or run commands, so review its work, use version control, and run your project tests before you ship.
|
|
843
|
-
|
|
844
|
-
### Project telemetry
|
|
845
|
-
|
|
846
|
-
Core counts active projects once per UTC day. Opening a visible thread, submitting an annotation, or replying in the local development bridge qualifies. Installing the package, starting an idle bridge, and background thread polling send no events.
|
|
847
|
-
|
|
848
|
-
**To opt out for every project on this machine**, run `npx @popmelt.com/core telemetry disable`. This preference lives under `~/.popmelt/telemetry/`. Use `telemetry status` to check it and `telemetry enable` to turn reporting back on. You can also launch with `POPMELT_TELEMETRY_DISABLED=1` or `DO_NOT_TRACK=1`. CI, test and production environments skip reporting. An opt-out applies to that developer independently of their teammates.
|
|
849
|
-
|
|
850
|
-
On the first enabled development start, Core creates `popmelt.project.json` at the Git root, or at the bridge project root outside Git. **Commit that file once** so clones and worktrees share the random project UUID. In Git repositories, reporting begins only after the committed file matches the local UUID. To initialize it explicitly, run `npx @popmelt.com/core telemetry init`. When creating an independent project from a template, omit the template’s identity file and initialize a new one. A UUID in a public repository can be matched to that repository.
|
|
851
|
-
|
|
852
|
-
The bridge makes at most one best-effort HTTPS POST per developer machine, project and active UTC day. The Cloudflare collector keeps the first report for each project and day across all clones. It assigns the UTC date on receipt. The request has exactly these fields:
|
|
853
|
-
|
|
854
|
-
```json
|
|
855
|
-
{
|
|
856
|
-
"event": "project_active",
|
|
857
|
-
"projectUuid": "9cc76f92-e4bc-4cbf-829b-93279b6d1b7d",
|
|
858
|
-
"packageVersion": "0.33.0",
|
|
859
|
-
"framework": "nextjs",
|
|
860
|
-
"nodeMajor": 22,
|
|
861
|
-
"os": "darwin"
|
|
862
|
-
}
|
|
863
|
-
```
|
|
864
|
-
|
|
865
|
-
`packageVersion` is the numeric Core release. `framework` is inferred from the bridge project's direct dependencies and can be `nextjs`, `vite`, `sveltekit`, `astro`, `nuxt`, or `unknown`. OS is `darwin`, `win32`, `linux`, or `other`. The request carries no developer identifier, machine identifier, repository URL, file path, annotation, or source content. Cloudflare processes the connection IP to serve the request. The Worker does not read or store it, and Workers request logging is disabled. A daily job prunes the active D1 table to 90 UTC dates. No reporting code contacts the collector from the browser.
|
|
866
|
-
|
|
867
|
-
## Bridge commands
|
|
868
|
-
|
|
869
|
-
Run a bridge without wrapping another command:
|
|
870
|
-
|
|
871
|
-
```bash
|
|
872
|
-
npx @popmelt.com/core bridge
|
|
873
|
-
```
|
|
874
|
-
|
|
875
|
-
Stop the bridge for the current project:
|
|
876
|
-
|
|
877
|
-
```bash
|
|
878
|
-
npx @popmelt.com/core stop
|
|
879
|
-
```
|
|
39
|
+
- [Annotate elements and work in threads](https://popmelt.com/docs/core/comments-and-threads)
|
|
40
|
+
- [Preview style changes with Steer](https://popmelt.com/docs/core/steer)
|
|
41
|
+
- [Review project memory with Imprint](https://popmelt.com/docs/core/imprint)
|
|
42
|
+
- [Attach application context to annotations](https://popmelt.com/docs/core/application-context)
|
|
43
|
+
- [Annotate Three.js scenes](https://popmelt.com/docs/core/media-and-3d)
|
|
880
44
|
|
|
881
45
|
## License
|
|
882
46
|
|
|
883
|
-
[PolyForm Shield 1.0.0](./LICENSE)
|
|
884
|
-
|
|
885
|
-
You may use and extend Popmelt for yourself and your team. You may not sell it, offer it as a managed service, or use the code to create a competing product or service. The software is provided as-is.
|
|
886
|
-
|
|
887
|
-
For custom licensing, contact **reb@popmelt.com**.
|
|
47
|
+
[PolyForm Shield 1.0.0](./LICENSE) · [Contact Popmelt](mailto:reb@popmelt.com)
|