@popmelt.com/core 0.33.1 → 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.
Files changed (128) hide show
  1. package/README.md +23 -840
  2. package/THIRD_PARTY_NOTICES.md +46 -0
  3. package/claude-plugin/.claude-plugin/plugin.json +1 -1
  4. package/codex-plugin/.codex-plugin/plugin.json +1 -1
  5. package/dist/ExploreAttachment-TTEKD4AU.mjs +1 -0
  6. package/dist/PagePreviewLayer-TJZOJBSD.mjs +1 -0
  7. package/dist/ParticipantRuntime-BQAOTSQZ.mjs +1 -0
  8. package/dist/PhoneHostGate-LNSDZOG2.mjs +1 -0
  9. package/dist/PopmeltTasteConnectedPane-NCCF7YUX.mjs +1 -0
  10. package/dist/{PreviewRuntime-LFPK56NW.mjs → PreviewRuntime-H2UOLP6T.mjs} +1 -1
  11. package/dist/QueuedReplies-LQUBEZ6K.mjs +1 -0
  12. package/dist/SuppliedContext-YKQSMF3J.mjs +1 -0
  13. package/dist/ThreadErrorCard-4MOA34C4.mjs +1 -0
  14. package/dist/ThreadPanel-T6IXWFLA.mjs +1 -0
  15. package/dist/adapter-react-three-fiber.d.mts +1 -1
  16. package/dist/bridge-entry.mjs +1 -1
  17. package/dist/bridgeSSEStream-K3UIMBTC.mjs +1 -0
  18. package/dist/{bridgeWebSocketStream-H3DCP4T3.mjs → bridgeWebSocketStream-2SUZUBE3.mjs} +1 -1
  19. package/dist/browser-runtime-HQM2Y6EL.mjs +1 -0
  20. package/dist/browser.d.mts +4 -4
  21. package/dist/browser.mjs +1 -1
  22. package/dist/{canvas-chat-note-NHYL3T6J.mjs → canvas-chat-note-MGAEUYJO.mjs} +1 -1
  23. package/dist/{checkFixture-MWBOYIM2.mjs → checkFixture-BXILOUP5.mjs} +1 -1
  24. package/dist/chunk-53SKVMWR.mjs +1 -0
  25. package/dist/chunk-57FM7XQV.mjs +1 -0
  26. package/dist/chunk-5D2ADU7H.mjs +1 -0
  27. package/dist/chunk-66VOM5NA.mjs +1 -0
  28. package/dist/chunk-67QNAAUC.mjs +1 -0
  29. package/dist/chunk-6LBPTCGC.mjs +1 -0
  30. package/dist/chunk-APP5IYTE.mjs +1 -0
  31. package/dist/chunk-AYDREFWN.mjs +1 -0
  32. package/dist/chunk-CRJPE33X.mjs +1 -0
  33. package/dist/chunk-DC47WNPG.mjs +1 -0
  34. package/dist/chunk-DJTGR3RO.mjs +1 -0
  35. package/dist/chunk-DOCRI237.mjs +1 -0
  36. package/dist/chunk-DOJBWTT5.mjs +1 -0
  37. package/dist/chunk-F45IVFS3.mjs +1 -0
  38. package/dist/chunk-G2ZHJXHZ.mjs +1 -0
  39. package/dist/{chunk-75PQGTKX.mjs → chunk-G7JR5Z3P.mjs} +1 -1
  40. package/dist/chunk-GKOMTSWV.mjs +1 -0
  41. package/dist/{chunk-EAV2VV2V.mjs → chunk-HAE5LUJX.mjs} +1 -1
  42. package/dist/chunk-HU2XWUJC.mjs +1 -0
  43. package/dist/{chunk-IKCHOC3U.mjs → chunk-HV7HRQ2S.mjs} +0 -1
  44. package/dist/chunk-KTRMNVPZ.mjs +1 -0
  45. package/dist/chunk-M5P6VHZY.mjs +1 -0
  46. package/dist/chunk-N4737FRL.mjs +1 -0
  47. package/dist/{chunk-JMMP5JSP.mjs → chunk-NDGM4DAP.mjs} +1 -1
  48. package/dist/chunk-NSCO633B.mjs +1 -0
  49. package/dist/{chunk-GASEZICN.mjs → chunk-OAHYSDJ4.mjs} +1 -1
  50. package/dist/chunk-PH2MLB3T.mjs +1 -0
  51. package/dist/chunk-PYGRFSUU.mjs +1 -0
  52. package/dist/chunk-Q6C7ZA3H.mjs +1 -0
  53. package/dist/chunk-Q6N77LIS.mjs +1 -0
  54. package/dist/chunk-Q74FBX2I.mjs +1 -0
  55. package/dist/chunk-R34FOW4D.mjs +1 -0
  56. package/dist/chunk-R3AJWOID.mjs +1 -0
  57. package/dist/chunk-RK6UROPO.mjs +1 -0
  58. package/dist/chunk-RR4SHK7O.mjs +1 -0
  59. package/dist/{chunk-GL4I4MI6.mjs → chunk-RUJC32MA.mjs} +1 -1
  60. package/dist/{chunk-2IASPT6L.mjs → chunk-RUTWU5W2.mjs} +1 -1
  61. package/dist/chunk-S7BCEQKP.mjs +1 -0
  62. package/dist/{chunk-HVD5ZG6W.mjs → chunk-T4CCY2EL.mjs} +1 -1
  63. package/dist/chunk-TH7DML4A.mjs +1 -0
  64. package/dist/chunk-UEGDSECJ.mjs +1 -0
  65. package/dist/chunk-WDAXARLI.mjs +1 -0
  66. package/dist/chunk-XG2YIAJS.mjs +1 -0
  67. package/dist/chunk-XM6RE6HT.mjs +1 -0
  68. package/dist/{chunk-DNOKP3JS.mjs → chunk-XT6PHPPG.mjs} +1 -1
  69. package/dist/chunk-Y3SF5YCR.mjs +1 -0
  70. package/dist/chunk-YFDD7HGT.mjs +1 -0
  71. package/dist/chunk-ZG6XHKYO.mjs +1 -0
  72. package/dist/chunk-ZG7MAEEV.mjs +30 -0
  73. package/dist/chunk-ZSL57PQ7.mjs +1 -0
  74. package/dist/chunk-ZVDKW7TO.mjs +1 -0
  75. package/dist/cli.mjs +1 -1
  76. package/dist/codex-note-context-OUG4S6XE.mjs +1 -0
  77. package/dist/codex-project-B5466BL6.mjs +1 -0
  78. package/dist/{codex-session-registry-SPRWY2WW.mjs → codex-session-registry-ONODFWFD.mjs} +1 -2
  79. package/dist/focus-inspection-SZJ5KP23.mjs +1 -0
  80. package/dist/index.d.mts +30 -5
  81. package/dist/index.mjs +1 -1
  82. package/dist/media.d.mts +3 -3
  83. package/dist/memory-store.mjs +1 -1
  84. package/dist/{participantBootstrap-ClKpD2qC.d.mts → participantBootstrap-DFJlcKRI.d.mts} +2 -2
  85. package/dist/peer-client-SCSWLRCX.mjs +1 -0
  86. package/dist/plugin-astro.mjs +1 -1
  87. package/dist/plugin-next.mjs +1 -1
  88. package/dist/plugin-nuxt.mjs +1 -1
  89. package/dist/plugin-vite.mjs +1 -1
  90. package/dist/server.d.mts +3 -3
  91. package/dist/server.mjs +1 -1
  92. package/dist/steerStyles-E76E44PI.mjs +1 -0
  93. package/dist/{subjects-EWAR5-0S.d.mts → subjects-DdavjSTL.d.mts} +12 -0
  94. package/dist/{video-adapter-BUMpNTCP.d.mts → video-adapter-DB6Hex1f.d.mts} +1 -1
  95. package/package.json +1 -3
  96. package/dist/ExploreAttachment-VKCCEIM7.mjs +0 -1
  97. package/dist/ParticipantRuntime-YS5SIZUQ.mjs +0 -1
  98. package/dist/PopmeltTasteConnectedPane-FKIJM3C7.mjs +0 -1
  99. package/dist/QueuedReplies-ZYUDSTS2.mjs +0 -1
  100. package/dist/SuppliedContext-RWN6UR3K.mjs +0 -1
  101. package/dist/ThreadErrorCard-7J62GD5W.mjs +0 -1
  102. package/dist/ThreadPanel-KVNM67WO.mjs +0 -1
  103. package/dist/bridgeSSEStream-NEYI73TC.mjs +0 -1
  104. package/dist/browser-runtime-AP35S5MK.mjs +0 -1
  105. package/dist/chunk-27ADDVGC.mjs +0 -1
  106. package/dist/chunk-2VCHBI7Y.mjs +0 -1
  107. package/dist/chunk-2ZJ4FBTG.mjs +0 -1
  108. package/dist/chunk-6V2VCKPG.mjs +0 -1
  109. package/dist/chunk-6VXFTT5U.mjs +0 -1
  110. package/dist/chunk-BVTLSUQT.mjs +0 -1
  111. package/dist/chunk-CPOYMGYY.mjs +0 -1
  112. package/dist/chunk-H7XMDLGU.mjs +0 -30
  113. package/dist/chunk-N2QUNHV6.mjs +0 -1
  114. package/dist/chunk-N6JTX4PD.mjs +0 -2
  115. package/dist/chunk-ODIGT4YJ.mjs +0 -1
  116. package/dist/chunk-PSSHCTJ2.mjs +0 -1
  117. package/dist/chunk-QOJCTLQW.mjs +0 -1
  118. package/dist/chunk-RESPUCV7.mjs +0 -1
  119. package/dist/chunk-SHAIHRV2.mjs +0 -1
  120. package/dist/chunk-VPPVURBR.mjs +0 -2
  121. package/dist/chunk-W5NIRROD.mjs +0 -1
  122. package/dist/chunk-XKD2ABCO.mjs +0 -1
  123. package/dist/chunk-YLKEDOII.mjs +0 -31
  124. package/dist/chunk-ZHJZPC7U.mjs +0 -1
  125. package/dist/codex-note-context-4JYQ437H.mjs +0 -2
  126. package/dist/codex-project-FA4EK6VR.mjs +0 -2
  127. package/dist/focus-inspection-VBS5656D.mjs +0 -1
  128. package/dist/peer-client-KJCPXT76.mjs +0 -2
package/README.md CHANGED
@@ -4,861 +4,44 @@
4
4
 
5
5
  # Popmelt
6
6
 
7
- Popmelt is a tiny, powerful design layer for humans and AI. Turn your local web app into a design sandbox with the AI tools you already love.
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
- Run your app locally and Popmelt appears as a toolbar in the browser. Point to any part of your UI, describe what you have in mind, or steer the design directly. Work through the result with Codex or Claude Code in a thread right on the page. Stack as many threads as you want so different ideas can move forward without losing their context.
9
+ ## Install and leave your first annotation
10
10
 
11
- As you collaborate, Popmelt builds an Imprint: a living project memory of your intent, preferences, and design decisions. Later threads use that shared understanding instead of starting from scratch.
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
- Runs locally, learns naturally. Your annotations, screenshots, threads, and Imprint live with your project under `.popmelt/`.
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
- ## What you need
15
+ ```text
16
+ Let's install @popmelt.com/core in this project
17
+ ```
16
18
 
17
- - A local web project: React is the established integration; vanilla HTML/JS with Vite, Vue, Nuxt, Svelte/SvelteKit, and Astro have experimental DOM integrations
18
- - Node.js 18 or newer, or a newer version required by your framework
19
- - React 18 or newer for a React host; non-React integrations still require the renderer peers listed in their setup instructions
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
- The Codex and Claude Code desktop apps work too. Open your local app in their built-in browser and use Popmelt there just as you would in any other browser. The corresponding CLI still needs to be installed and authenticated because it runs the threads.
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
- Claude thread runs use Claude Code's authentication configuration, including API keys. Popmelt inherits `ANTHROPIC_API_KEY` from the environment of its local bridge and leaves Claude's credential/helper configuration intact; it does not store keys or select a separate billing mode. Claude's non-interactive runs use an API key when one is present, subject to its authentication precedence and managed policies. To use subscription authentication, remove the API key from that environment and configure Claude Code accordingly. Launch the app/bridge from the intended environment; an already-running bridge does not pick up later shell changes, so restart it only after active runs finish. See [Claude Code authentication](https://code.claude.com/docs/en/authentication).
25
+ ## Telemetry and opt-out
25
26
 
26
- ## Install with your coding agent
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
- From inside your project, give your coding agent this prompt:
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
- #### Screens inside a canvas
100
-
101
- 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.
102
-
103
- 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.
104
-
105
- 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.
106
-
107
- ### Steer
108
-
109
- 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.
110
-
111
- | Keys | Family |
112
- | ----------- | ---------------------------------- |
113
- | `P` / `M` | Padding / margin |
114
- | `B` / `R` | Borders / radii |
115
- | `F` / `G` | Flexbox / grid |
116
- | `FO` / `BG` | Type / background color |
117
- | `T` / `O` | Transform / opacity and blend mode |
118
-
119
- 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.
120
-
121
- 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.
122
-
123
- ### Imprint
124
-
125
- 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.
126
-
127
- ### Threads and drafts
128
-
129
- - Click an annotation or status badge to open its thread
130
- - Use the left and right chevrons in the thread header to cycle through visible threads
131
- - Drag a thread header to move the panel; double-click the header to restore its default position
132
- - Press Escape to close the open thread
133
- - Press Backspace or Delete with a thread open, or with one of its historical annotations selected, to archive that thread
134
- - Right-click a draft comment or staged Steer change in its annotation rail to remove only that draft item
135
- - 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.
136
- - 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
137
- - 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.
138
-
139
- 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.
140
-
141
- 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.
142
-
143
- Archiving hides a thread from the active canvas without deleting its stored conversation. Delete shortcuts are disabled while a text field is focused.
144
-
145
- ### Message Codex or Claude from a canvas thread
146
-
147
- 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.
148
-
149
- 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.
150
- 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.
151
- 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.
152
-
153
- 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.
154
-
155
- ### Pointer gestures
156
-
157
- | Gesture | Action |
158
- | -------------------------------------------------- | ------------------------------------------------------------------------ |
159
- | Shake the pointer quickly | Switch between Chat and Steer |
160
- | Hold Command/Control while pointing | Pass through the default target to the deepest element under the pointer |
161
- | Double-click text in Chat | Edit the text directly |
162
- | Click the toolbar annotation counter | Cycle through annotation bundles, including other routes |
163
- | Scroll the annotation counter | Change the active annotation color |
164
- | Hold the annotation counter | Reset the active color |
165
- | Right-click Popmelt's canvas | Enter persistent page passthrough while keeping Popmelt overlays visible |
166
- | Drag, scroll, pinch, or right-click in passthrough | Interact with the page and open its native context menu |
167
- | Click a valid target in passthrough | Apply the active Chat or Steer action without leaving passthrough |
168
- | Press Escape or choose another tool | Exit passthrough |
169
-
170
- ## Ambient Popmelt in Codex
171
-
172
- 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.
173
-
174
- 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.
175
-
176
- From the project, inspect the existing installation first:
177
-
178
- ```bash
179
- npx @popmelt.com/core codex status
180
- ```
181
-
182
- If missing or needing an update, install the bundled plugin:
183
-
184
- ```bash
185
- npx @popmelt.com/core codex install
186
- ```
187
-
188
- 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.
189
-
190
- 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.
191
-
192
- 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.
193
-
194
- 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.
195
-
196
- ### Ambient Popmelt in Claude Code
197
-
198
- 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:
199
-
200
- ```bash
201
- npx @popmelt.com/core claude status
202
- ```
203
-
204
- With the user's permission for a personal plugin installation, install or update the bundle:
205
-
206
- ```bash
207
- npx @popmelt.com/core claude install
208
- ```
209
-
210
- 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.
211
-
212
- Then check the setup without launching an agent request or restarting a bridge:
213
-
214
- ```bash
215
- npx @popmelt.com/core claude doctor
216
- ```
217
-
218
- `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–1120 range; verify a custom port separately.
219
-
220
- 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.
221
-
222
- For a one-session trial without changing personal settings, you can instead load the packaged plugin directly:
223
-
224
- ```bash
225
- claude --plugin-dir ./node_modules/@popmelt.com/core/claude-plugin
226
- ```
227
-
228
- 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.
229
-
230
- 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.
231
-
232
- 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.
233
-
234
- 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.
235
-
236
- ### Point and discuss
237
-
238
- 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.
239
-
240
- 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.
241
-
242
- 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.
243
-
244
- 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.
245
-
246
- Useful diagnostics:
247
-
248
- ```bash
249
- npx @popmelt.com/core codex status
250
- npx @popmelt.com/core codex doctor
251
- ```
252
-
253
- `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.
254
-
255
- ## Imprint
256
-
257
- As you work, Popmelt recognizes choices that may be useful beyond the current thread and proposes an Imprint update:
258
-
259
- - **Yes** adds the learning to the project's shared understanding
260
- - **This time** keeps it local to the current situation
261
- - **No** leaves the Imprint unchanged and gives you room to explain what Popmelt misunderstood
262
-
263
- 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.
264
-
265
- Enter Imprint mode with `I` to inspect the project's current understanding, supporting evidence, relationships, and exceptions.
266
-
267
- ## Manual setup
268
-
269
- For React, add the provider below and follow the [Next.js](#nextjs),
270
- [Vite](#vite), or [other development server](#other-development-servers) instructions.
271
- For experimental non-React hosts, use the [standalone entry for vanilla HTML/JS or Vue](#experimental-standalone-browser-entry),
272
- [Nuxt module](#experimental-nuxt-integration), [Svelte/SvelteKit setup](#experimental-svelte-and-sveltekit),
273
- or [Astro integration](#experimental-astro-integration) instead of adding a React provider.
274
-
275
- For a React app, install Popmelt and its icon peer dependency:
276
-
277
- ```bash
278
- npm install @popmelt.com/core lucide-react
279
- ```
280
-
281
- ### Add the provider
282
-
283
- Wrap your app with `PopmeltProvider`. In Next.js, the component that calls `useRouter()` must be a client component.
284
-
285
- ```tsx
286
- 'use client';
287
-
288
- import { useRouter } from 'next/navigation';
289
-
290
- import { PopmeltProvider } from '@popmelt.com/core';
291
-
292
- export function Providers({ children }: { children: React.ReactNode }) {
293
- const router = useRouter();
294
-
295
- return <PopmeltProvider navigate={router.push}>{children}</PopmeltProvider>;
296
- }
297
- ```
298
-
299
- `navigate` is optional for single-page use. Pass your router's navigation function when Popmelt needs to restore annotations across routes.
300
-
301
- ### Add application context to comments
302
-
303
- Use `getCommentMeta` to snapshot application-owned context whenever a human
304
- submits annotations or replies in a thread. Popmelt validates and detaches the
305
- JSON, includes it as contextual evidence for the model, and persists the same
306
- snapshot with the stored human turn.
307
-
308
- ```tsx
309
- <PopmeltProvider
310
- getCommentMeta={({ kind }) => ({
311
- 'my-app/video-ui/v1': {
312
- kind,
313
- generation: {
314
- prompt: generation.prompt,
315
- dataVersion: store.getState().version,
316
- },
317
- frame: {
318
- assetId: video.id,
319
- timeMs: Math.round(video.currentTime * 1000),
320
- },
321
- interactions: recorder.snapshot(),
322
- },
323
- })}
324
- >
325
- {children}
326
- </PopmeltProvider>
327
- ```
328
-
329
- The hook may be synchronous or asynchronous. Return a plain JSON object; use a
330
- namespaced, versioned key so multiple integrations can coexist. Comment
331
- metadata is limited to 64 KiB per human turn. Keep large binaries and long
332
- event logs in external storage or attachments and place their stable IDs,
333
- hashes, and timestamps in `meta`.
334
-
335
- #### Show context as a note card
336
-
337
- 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`.
338
-
339
- ```ts
340
- import type { CommentMetaNote, GetCommentMeta } from '@popmelt.com/core';
341
-
342
- const exportPolicy = {
343
- source: 'Obsidian',
344
- title: 'Export policy',
345
- content: 'Verify the workspace before enabling export.',
346
- sourceIcon: '/icons/obsidian.svg',
347
- sourceURI: 'notes/Exports.md',
348
- } satisfies CommentMetaNote;
349
-
350
- const getCommentMeta: GetCommentMeta = () => ({
351
- 'my-app/export-policy/v1': exportPolicy,
352
- });
353
- ```
354
-
355
- 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.
356
-
357
- 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`.
358
-
359
- #### Preview a remote source
360
-
361
- ```ts
362
- import type { GetCommentMeta } from '@popmelt.com/core';
363
-
364
- const getCommentMeta: GetCommentMeta = () => ({
365
- 'my-app/reference/v1': {
366
- sourceURI: 'https://rbkh.design/llms',
367
- content: 'Use the accessibility section for this review.', // optional
368
- },
369
- });
370
- ```
371
-
372
- 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.
373
-
374
- 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.
375
-
376
- Multiple entries share one disclosure. Extra fields remain available under **Original data**, and the thread can display arbitrary JSON directly.
377
-
378
- ### Next.js
379
-
380
- 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.
381
-
382
- Update the existing development script while preserving any flags already in use:
383
-
384
- ```json
385
- {
386
- "scripts": {
387
- "dev": "popmelt wrap -- next dev"
388
- }
389
- }
390
- ```
391
-
392
- Then wrap the Next config:
393
-
394
- ```ts
395
- // next.config.ts
396
- import { withPopmelt } from '@popmelt.com/core/next';
397
-
398
- const nextConfig = {};
399
-
400
- export default withPopmelt(nextConfig);
401
- ```
402
-
403
- The command wrapper starts the project bridge. The config wrapper connects the browser toolbar to it. Using only one is not a complete setup.
404
-
405
- ### Vite
406
-
407
- Add the Vite plugin:
408
-
409
- ```ts
410
- // vite.config.ts
411
- import { popmelt } from '@popmelt.com/core/vite';
412
- import react from '@vitejs/plugin-react';
413
- import { defineConfig } from 'vite';
414
-
415
- export default defineConfig({
416
- plugins: [react(), popmelt()],
417
- });
418
- ```
419
-
420
- ### Experimental standalone browser entry
421
-
422
- The first framework-independent integration is available at `@popmelt.com/core/browser`.
423
- It mounts Popmelt beside the host application, without JSX or a React provider in
424
- your application code. React still renders Popmelt internally; the package's
425
- existing React, React DOM, and Lucide React peer dependencies are still required.
426
- This is an experimental DOM integration, not a claim of Vue/Svelte/Angular feature
427
- parity. React-specific component hierarchy and library previews are not supplied
428
- for other frameworks yet.
429
-
430
- For a Vite host, keep the existing `@popmelt.com/core/vite` bridge plugin, then use
431
- this in your browser entry:
432
-
433
- ```js
434
- if (import.meta.env.DEV) {
435
- const { mountPopmelt } = await import('@popmelt.com/core/browser');
436
- const popmelt = await mountPopmelt({ enabled: true });
437
- import.meta.hot?.dispose(() => popmelt.unmount());
438
- }
439
- ```
440
-
441
- Enablement is explicit: omitted/false `enabled` or a server-side call is a no-op
442
- and does not load the renderer. `unmount()` removes the UI and releases its
443
- subscriptions without deleting saved annotations or cancelling bridge jobs.
444
- Call it before mounting again; simultaneous integrations on one page are rejected.
445
- Use either this entry or `PopmeltProvider`, not both. Pass `bridgeUrl`, `projectId`,
446
- or a host-router `navigate` callback when these are not supplied by your integration.
447
- Explicit bridge/project options take effect before startup and restore prior
448
- host bindings when unmounted; no manual browser-global assignment is needed.
449
-
450
- For Vue, mount your app normally and mount Popmelt alongside it, not inside the
451
- Vue component tree. Keep your Vue Vite plugin and add `popmelt()` to that same
452
- plugin list. Connect the returned `unmount()` to your app's teardown (for example,
453
- `app.onUnmount(() => popmelt.unmount())` in Vue 3.5+). With Vue Router, pass
454
- `navigate: (url) => router.push(url)`; no router dependency is required by Core.
455
-
456
- The vanilla HTML/JS integration requires Vite and installed npm peers; a
457
- bundler-free script tag or arbitrary static-server setup is not covered.
458
- Vue Router guards, nested routes, and hash-history mode are not yet tested.
459
-
460
- ### Experimental multiplayer (opt-in)
461
-
462
- Multiplayer is off by default. The package includes peer canvases for early
463
- testing, but ordinary installations do not show the host peer bubble or invite
464
- controls and do not start the peer transport. Your solo annotations and threads
465
- continue to work as before.
466
-
467
- ```tsx
468
- <PopmeltProvider multiplayer>{children}</PopmeltProvider>
469
- ```
470
-
471
- For Vue, Svelte/SvelteKit, or other browser mounts:
472
-
473
- ```ts
474
- const popmelt = await mountPopmelt({ enabled: true, multiplayer: true });
475
- ```
476
-
477
- Nuxt: `popmelt: { multiplayer: true }` in `nuxt.config.ts`.
478
- Astro: `popmelt({ multiplayer: true })` in the integrations list.
479
- When Astro uses `client: false`, set the option on your own provider/mount instead.
480
- Next.js and React/Vite set it on the provider, not the dev-server plugin.
481
-
482
- This is a client feature opt-in, not a security control or automatic server
483
- configuration. Participant hosting still requires a participant-capable bridge
484
- and dev-server bootstrap. Explicitly configured participant pages require this
485
- opt-in too; disabling it stops enrollment and shows a disabled notice rather
486
- than falling back to an unauthenticated solo writer. Preview frames never mount
487
- a writer. Saved drafts and server-side invitations are not deleted or revoked
488
- by changing the prop. See [participant integration](docs/participant-integration.md).
489
-
490
- ### Experimental Nuxt integration
491
-
492
- For Nuxt 4.5.2, install Popmelt and its internal renderer peers as development
493
- dependencies, then add the module:
29
+ **Turn telemetry off for all projects on this machine**
494
30
 
495
31
  ```sh
496
- npm install -D @popmelt.com/core react react-dom lucide-react
497
- ```
498
-
499
- ```ts
500
- // nuxt.config.ts
501
- export default defineNuxtConfig({
502
- modules: ['@popmelt.com/core/nuxt'],
503
- });
504
- ```
505
-
506
- No separate Vite plugin, React provider, or manual browser mount is needed.
507
- The module starts the local bridge in development and mounts Popmelt after Nuxt
508
- has mounted the client app. It uses Nuxt's router for navigation and releases
509
- its bridge lease on graceful shutdown. When Nuxt's CLI exits immediately, the
510
- existing lease-expiry cleanup stops an idle bridge within about a minute.
511
- Production builds do not register the client
512
- plugin or start the bridge. Optional `popmelt` settings are `port`, `projectRoot`,
513
- and `bridge` (set `bridge: false` to disable automatic bridge startup).
514
-
515
- Use a Nuxt-compatible Node version (22.19+, 24.11+, or 26+).
516
- Nuxt 3, component metadata, and advanced router configurations are not yet tested.
517
-
518
- ### Experimental Svelte and SvelteKit
519
-
520
- Tested with Svelte 5.57.0, SvelteKit 2.70.3, and Vite 8.2.2. Install the same
521
- development dependencies used by the standalone entry:
522
-
523
- ```sh
524
- npm install -D @popmelt.com/core react react-dom lucide-react
525
- ```
526
-
527
- Keep your existing Vite configuration and add `popmelt()` alongside `sveltekit()`
528
- (or `svelte()` for a plain Svelte app):
529
-
530
- ```js
531
- import { sveltekit } from '@sveltejs/kit/vite';
532
- import { popmelt } from '@popmelt.com/core/vite';
533
-
534
- export default { plugins: [sveltekit(), popmelt()] };
535
- ```
536
-
537
- Mount once in your root `+layout.svelte`, without replacing its existing content:
538
-
539
- ```svelte
540
- <script>
541
- import { onMount } from 'svelte';
542
- import { goto } from '$app/navigation';
543
- import { bridgeUrl, projectId } from 'virtual:popmelt/bridge';
544
-
545
- onMount(() => {
546
- if (!import.meta.env.DEV || !bridgeUrl || !projectId) return;
547
- let disposed = false;
548
- const pending = import('@popmelt.com/core/browser').then(({ mountPopmelt }) => {
549
- if (!disposed) return mountPopmelt({ enabled: true, bridgeUrl, projectId, navigate: goto });
550
- });
551
- void pending.catch(console.error);
552
- return () => {
553
- disposed = true;
554
- void pending.then((handle) => handle?.unmount()).catch(() => {});
555
- };
556
- });
557
- </script>
558
- ```
559
-
560
- For plain Svelte, place this in `App.svelte` and omit the `goto` import and
561
- `navigate` option, or supply your own router callback. TypeScript projects can
562
- add `/// <reference types="@popmelt.com/core/vite/client" />` to their app's
563
- ambient declarations for the virtual module types.
564
-
565
- This setup is development-only, including during SSR. It does not provide
566
- Svelte component metadata or framework-specific library previews. Advanced
567
- Kit routing, form actions, and deployment adapters beyond Node are not yet tested.
568
-
569
- ### Experimental Astro integration
570
-
571
- For Astro 7.3.1, install Popmelt and its internal renderer peers as development
572
- dependencies, then add the Astro integration:
573
-
574
- ```sh
575
- npm install -D @popmelt.com/core react react-dom lucide-react
576
- ```
577
-
578
- ```js
579
- // astro.config.mjs
580
- import { popmelt } from '@popmelt.com/core/astro';
581
- import { defineConfig } from 'astro/config';
582
-
583
- export default defineConfig({
584
- integrations: [popmelt()],
585
- });
586
- ```
587
-
588
- The integration starts the bridge and mounts Popmelt automatically in development;
589
- no React island or provider is needed. It supports DOM annotations and style edits,
590
- with thread recovery through reloads and Astro ClientRouter navigation. Production
591
- builds and previews do not mount Popmelt or start its bridge.
592
-
593
- If your project already mounts a Popmelt provider, use `popmelt({ client: false })`
594
- to keep that provider in charge of the UI. The existing `port`, `projectRoot`,
595
- `basePath`, and `bridge` options remain available.
596
-
597
- Astro component metadata, framework-specific island previews, and deployment
598
- adapters are not yet covered.
599
-
600
- ### Other development servers
601
-
602
- The wrapper can start Popmelt alongside another development command:
603
-
604
- ```json
605
- {
606
- "scripts": {
607
- "dev": "popmelt wrap -- your-existing-dev-command"
608
- }
609
- }
610
- ```
611
-
612
- ### Local event transport
613
-
614
- 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.
615
-
616
- 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.
617
-
618
- ### Connect your Popmelt account
619
-
620
- Cloud account access does not require multiplayer. With your local dev server
621
- running, open Popmelt Settings. For a standard installation, run this from the
622
- same project directory used by the bridge (replace the URL with your app):
623
-
624
- ```bash
625
- npx popmelt cloud link http://localhost:3000
626
- ```
627
-
628
- Open the printed private link within five minutes, then use **Sign in** in
629
- Settings. The link can be claimed once, only by that app origin. Treat it as a
630
- credential: do not share it or paste it into logs/issues. Linking authorizes this
631
- browser tab's session to use the local cloud connection; it does not sign you in
632
- to popmelt.com or enable multiplayer. Relink after closing the browser session or
633
- changing the app origin/bridge port. Participant installations instead retain
634
- their existing host-only account boundary; guests cannot link around it.
635
-
636
- The project-specific local linking key lives outside the repository in
637
- `~/.popmelt-cloud-hosts/`. The CLI sends a short-lived, one-use signature, never
638
- that key. OAuth refresh credentials stay in the OS credential store; they are not
639
- stored in page code, localStorage, the linking URL, or the repository. If native
640
- secure storage is unavailable, cloud sign-in fails closed. Settings **Disconnect**
641
- removes this project's stored cloud connection, not your popmelt.com account.
642
-
643
- New bridges default to production. Use `POPMELT_CLOUD_TASTE=staging` before
644
- starting the dev server for the isolated staging service, or
645
- `POPMELT_CLOUD_TASTE=off` to disable cloud access. An explicit server
646
- `cloudTaste: { environment: 'staging' }` or `cloudTaste: false` overrides the
647
- environment variable. Production and staging have separate credential namespaces
648
- and private UI caches; switching environments requires the corresponding login.
649
-
650
- ## Verify the installation
651
-
652
- 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.
653
-
654
- 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.
655
- 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.
656
- 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.
657
- 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.
658
- 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.
659
-
660
- To start the app manually, use its existing development command, for example:
661
-
662
- ```bash
663
- npm run dev
664
- ```
665
-
666
- ### Finish with a useful handoff
667
-
668
- 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:
669
-
670
- ```text
671
- Popmelt is ready at [the app's actual local URL]. Double-tap Command/Control, click something you want changed, and leave a comment.
672
- ```
673
-
674
- 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.
675
-
676
- ### If something is not ready
677
-
678
- - **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.
679
- - **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.
680
- - **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.
681
- - **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.
682
-
683
- ## React Three Fiber
684
-
685
- Popmelt can target objects rendered by React Three Fiber while Core continues to
686
- own the familiar hover, annotation, and thread presentation. Install the R3F
687
- peers alongside Core:
688
-
689
- ```bash
690
- npm install @popmelt.com/core @react-three/fiber three
691
- ```
692
-
693
- Keep `PopmeltProvider` outside the canvas and mount `PopmeltThreeAdapter` inside
694
- it. The adapter renders nothing; it registers the current scene, camera, and
695
- renderer with the nearest provider.
696
-
697
- ```tsx
698
- import { Canvas } from '@react-three/fiber';
699
- import { PopmeltProvider } from '@popmelt.com/core';
700
- import { PopmeltThreeAdapter } from '@popmelt.com/core/react-three-fiber';
701
-
702
- export function ProductPreview() {
703
- return (
704
- <PopmeltProvider>
705
- <Canvas>
706
- <PopmeltThreeAdapter />
707
- <ProductScene />
708
- </Canvas>
709
- </PopmeltProvider>
710
- );
711
- }
712
- ```
713
-
714
- Named objects receive readable labels automatically. Add stable application
715
- identity when object names or scene ordering may change:
716
-
717
- ```tsx
718
- <mesh
719
- name="Bottle"
720
- userData={{ popmeltId: 'hero-bottle', popmeltLabel: 'Hero bottle' }}
721
- >
722
- {/* geometry and material */}
723
- </mesh>
724
- ```
725
-
726
- Use a distinct `id` for each adapter when a page owns multiple canvases. Pass
727
- `root` to target only one scene subtree, `captureFrame={false}` to omit renderer
728
- screenshots, or `select`, `key`, `label`, and `describe` to adapt an application's
729
- scene semantics.
730
-
731
- For integrations that need the registered adapter instance, use the hook inside
732
- the canvas instead of the component:
733
-
734
- ```tsx
735
- import { usePopmeltThreeAdapter } from '@popmelt.com/core/react-three-fiber';
736
-
737
- function ProductPopmeltAdapter() {
738
- const adapter = usePopmeltThreeAdapter({ id: 'product-preview' });
739
- // Optional application-specific coordination with adapter.
740
- void adapter;
741
- return null;
742
- }
743
- ```
744
-
745
- The component is the recommended default; the hook exposes the same lifecycle
746
- for advanced composition.
747
-
748
- ## Media annotation
749
-
750
- Manual image and video annotation are enabled by default in `PopmeltProvider`,
751
- without a vision dependency or model download.
752
-
753
- ```tsx
754
- <PopmeltProvider>{children}</PopmeltProvider>
755
-
756
- // Optional: disable image annotation.
757
- <PopmeltProvider imageAnnotation={false}>{children}</PopmeltProvider>
758
-
759
- // Optional: disable video annotation.
760
- <PopmeltProvider videoAnnotation={false}>{children}</PopmeltProvider>
761
-
762
- // Optional: limit image discovery (all img elements are included by default).
763
- <PopmeltProvider imageAnnotation={{ selector: 'img[data-popmelt-media]' }}>
764
- {children}
765
- </PopmeltProvider>
32
+ npx @popmelt.com/core telemetry disable
766
33
  ```
767
34
 
768
- In Chat mode, drag over an image to create a named object. Double-click an object to
769
- rename or resize it, single-click it to comment, and right-click its label to
770
- delete it. Saved targets stay aligned as the image resizes.
35
+ Popmelt also honors `DO_NOT_TRACK=1`.
771
36
 
772
- The same interactions work on a paused video. A manual box stays at the saved
773
- position unless a perception extension supplies motion tracking. Motion tracks
774
- produced by an extension are persisted and remain replayable by Core alone.
37
+ ## Docs
775
38
 
776
- Image targets use browser-local storage by default. Supply
777
- `imageAnnotation.store` when the project needs another persistence layer. Add a
778
- stable `data-popmelt-media-id` to images whose URL may change or whose source
779
- appears more than once. Use the same attribute for durable video identities:
780
-
781
- ```tsx
782
- <img data-popmelt-media-id="hero-product" src={imageUrl} alt="Product" />
783
- <video data-popmelt-media-id="hero-reel" src={videoUrl} controls />
784
- ```
785
-
786
- No recognition or model download occurs unless See is installed and enabled.
787
-
788
- ## Add local object recognition with See
789
-
790
- [`@popmelt.com/see`](https://www.npmjs.com/package/@popmelt.com/see) adds
791
- browser-local object detection and optional video tracking to the existing media
792
- annotation experience. It requires Core 0.17.0 or newer.
793
-
794
- Install it:
795
-
796
- ```bash
797
- npm install @popmelt.com/see
798
- ```
799
-
800
- Then add the extension to the existing Core provider:
801
-
802
- ```tsx
803
- import { PopmeltProvider } from '@popmelt.com/core';
804
- import { see } from '@popmelt.com/see';
805
-
806
- <PopmeltProvider extensions={[see]}>{children}</PopmeltProvider>;
807
- ```
808
-
809
- Recognition loads only when it is needed. Other extensions can be included in
810
- the same array. Model selection, self-hosting, recognition, and video tracking are
811
- documented in the See package README.
812
-
813
- ## Data and privacy
814
-
815
- 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.
816
-
817
- 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.
818
-
819
- 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.
820
-
821
- ### Project telemetry
822
-
823
- 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.
824
-
825
- **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.
826
-
827
- 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.
828
-
829
- 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:
830
-
831
- ```json
832
- {
833
- "event": "project_active",
834
- "projectUuid": "9cc76f92-e4bc-4cbf-829b-93279b6d1b7d",
835
- "packageVersion": "0.33.0",
836
- "framework": "nextjs",
837
- "nodeMajor": 22,
838
- "os": "darwin"
839
- }
840
- ```
841
-
842
- `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.
843
-
844
- ## Bridge commands
845
-
846
- Run a bridge without wrapping another command:
847
-
848
- ```bash
849
- npx @popmelt.com/core bridge
850
- ```
851
-
852
- Stop the bridge for the current project:
853
-
854
- ```bash
855
- npx @popmelt.com/core stop
856
- ```
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)
857
44
 
858
45
  ## License
859
46
 
860
- [PolyForm Shield 1.0.0](./LICENSE)
861
-
862
- 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.
863
-
864
- For custom licensing, contact **reb@popmelt.com**.
47
+ [PolyForm Shield 1.0.0](./LICENSE) · [Contact Popmelt](mailto:reb@popmelt.com)