@popmelt.com/core 0.28.4 → 0.30.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 (56) hide show
  1. package/README.md +20 -2
  2. package/claude-plugin/.claude-plugin/plugin.json +1 -1
  3. package/claude-plugin/skills/popmelt-core/SKILL.md +6 -0
  4. package/codex-plugin/.codex-plugin/plugin.json +1 -1
  5. package/codex-plugin/skills/popmelt-core/SKILL.md +6 -0
  6. package/dist/{ParticipantRuntime-U4YOVIGA.mjs → ParticipantRuntime-AKVKVNO2.mjs} +14 -14
  7. package/dist/{PopmeltTasteConnectedPane-ODOMXUNO.mjs → PopmeltTasteConnectedPane-L5ULGACH.mjs} +12 -12
  8. package/dist/QueuedReplies-ZYUDSTS2.mjs +46 -0
  9. package/dist/ThreadErrorCard-Q5GQ4EIF.mjs +2 -0
  10. package/dist/bridge-entry.mjs +1 -1
  11. package/dist/bridge-recovery-3IQN3U6D.mjs +2 -0
  12. package/dist/bridgeSSEStream-NEYI73TC.mjs +4 -0
  13. package/dist/bridgeWebSocketStream-H3DCP4T3.mjs +2 -0
  14. package/dist/browser-runtime-PPQ2GUER.mjs +2 -0
  15. package/dist/browser.mjs +1 -1
  16. package/dist/canvas-chat-note-7HSL7MH6.mjs +2 -0
  17. package/dist/chunk-2BVRVVHJ.mjs +347 -0
  18. package/dist/chunk-2P2NUZW7.mjs +2 -0
  19. package/dist/chunk-2RRYBN2J.mjs +17 -0
  20. package/dist/chunk-4BEN6VQ7.mjs +2 -0
  21. package/dist/chunk-4V7SK3M6.mjs +3 -0
  22. package/dist/chunk-6VXFTT5U.mjs +2 -0
  23. package/dist/chunk-AR4MHLWP.mjs +342 -0
  24. package/dist/chunk-CPOYMGYY.mjs +2 -0
  25. package/dist/chunk-ENGMQINZ.mjs +62 -0
  26. package/dist/{chunk-3DUSECUJ.mjs → chunk-HTHUSDZT.mjs} +1 -1
  27. package/dist/chunk-MZNY6VXR.mjs +2 -0
  28. package/dist/{chunk-CKD6RNCO.mjs → chunk-N4F7DGFN.mjs} +1 -1
  29. package/dist/chunk-O6HC437G.mjs +307 -0
  30. package/dist/chunk-OFHBVUTT.mjs +315 -0
  31. package/dist/chunk-YYWUENSJ.mjs +2 -0
  32. package/dist/chunk-ZQTLCQPC.mjs +1 -0
  33. package/dist/cli.mjs +34 -328
  34. package/dist/codex-note-context-ZLQU57WU.mjs +2 -0
  35. package/dist/codex-project-P3J62GZR.mjs +2 -0
  36. package/dist/codex-session-registry-25DAA2KO.mjs +2 -0
  37. package/dist/{dev-server-rQIWJcSX.d.mts → dev-server-DtX2_HCa.d.mts} +2 -0
  38. package/dist/index.mjs +1 -1
  39. package/dist/memory-store.d.mts +1 -1
  40. package/dist/peer-client-DGX6OHMK.mjs +2 -0
  41. package/dist/plugin-astro.d.mts +1 -1
  42. package/dist/plugin-astro.mjs +1 -1
  43. package/dist/plugin-nuxt.d.mts +1 -1
  44. package/dist/plugin-nuxt.mjs +1 -1
  45. package/dist/plugin-vite.d.mts +1 -1
  46. package/dist/plugin-vite.mjs +1 -1
  47. package/dist/server.d.mts +2 -2
  48. package/dist/server.mjs +5 -5
  49. package/dist/{types-Bur49CLH.d.mts → types-C8tjyhiF.d.mts} +21 -0
  50. package/package.json +22 -32
  51. package/dist/browser-runtime-2L55FIH3.mjs +0 -2
  52. package/dist/chunk-5NOCGSQL.mjs +0 -291
  53. package/dist/chunk-ERUGF5VG.mjs +0 -347
  54. package/dist/chunk-L4G2KO2P.mjs +0 -1
  55. package/dist/chunk-OYJINEC5.mjs +0 -77
  56. package/dist/chunk-YYK7MXEK.mjs +0 -369
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ import{a}from"./chunk-YYWUENSJ.mjs";import"./chunk-4BEN6VQ7.mjs";import"./chunk-OFHBVUTT.mjs";import"./chunk-4V7SK3M6.mjs";export{a as canvasReceiptsForTurn};
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ import{A as f,v as a,w as b,x as c,y as d,z as e}from"./chunk-OFHBVUTT.mjs";export{f as callCodexBridge,c as codexExecutionOwner,a as discoverCodexPopmeltProjects,e as ensureCodexBridge,b as findCodexPopmeltProject,d as isBridgeOwnedCodexRun};
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ import{a,b,c,d,e,f}from"./chunk-4V7SK3M6.mjs";export{e as readCodexSessionBinding,f as readCodexSessionOrientation,d as readCodexSessionRecord,a as selectCodexStoreOrientation,b as writeCodexSessionBinding,c as writeCodexSessionOrientation};
@@ -5,6 +5,8 @@ type PopmeltPluginOptions = {
5
5
  projectRoot?: string;
6
6
  basePath?: string;
7
7
  bridge?: boolean;
8
+ /** Local event delivery only; SSE remains the default. */
9
+ experimentalEventTransport?: 'sse' | 'websocket';
8
10
  };
9
11
  type ConnectNext = () => void;
10
12
  type ConnectMiddleware = (req: IncomingMessage, res: ServerResponse, next: ConnectNext) => void;
package/dist/index.mjs CHANGED
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- export{b as PopmeltProvider}from"./chunk-YYK7MXEK.mjs";import"./chunk-ERUGF5VG.mjs";import"./chunk-JQHZFDY5.mjs";export{a as isPopmeltPreview}from"./chunk-EX63NVDN.mjs";import"./chunk-N2ZEZCHO.mjs";export{b as usePopmelt}from"./chunk-J3UIBBU2.mjs";import"./chunk-3LBOX7HQ.mjs";import"./chunk-3DUSECUJ.mjs";import"./chunk-OYJINEC5.mjs";import"./chunk-MP7S5ALD.mjs";import"./chunk-XTOCFTVW.mjs";import"./chunk-LVEMYZOA.mjs";import"./chunk-XOGBFVWI.mjs";import"./chunk-HGW2U6PD.mjs";
2
+ export{b as PopmeltProvider}from"./chunk-AR4MHLWP.mjs";import"./chunk-3LBOX7HQ.mjs";import"./chunk-HTHUSDZT.mjs";import"./chunk-2BVRVVHJ.mjs";import"./chunk-ENGMQINZ.mjs";import"./chunk-JQHZFDY5.mjs";import"./chunk-MP7S5ALD.mjs";import"./chunk-XOGBFVWI.mjs";import"./chunk-2P2NUZW7.mjs";import"./chunk-MZNY6VXR.mjs";import"./chunk-2RRYBN2J.mjs";import"./chunk-CPOYMGYY.mjs";export{a as isPopmeltPreview}from"./chunk-EX63NVDN.mjs";import"./chunk-N2ZEZCHO.mjs";export{b as usePopmelt}from"./chunk-J3UIBBU2.mjs";import"./chunk-6VXFTT5U.mjs";import"./chunk-XTOCFTVW.mjs";import"./chunk-LVEMYZOA.mjs";import"./chunk-HGW2U6PD.mjs";
@@ -1,5 +1,5 @@
1
1
  import { M as MemoryId, P as ProposalRecord, D as DecisionRecord, A as AuthorityContext, T as Timestamp, S as SourceReference, a as DecisionKind, b as DecisionSubject, c as ProposalDeferralContext, C as CanonicalRecord, L as LifecycleEvent, R as RelationshipRecord, d as ProjectMemoryBundle, e as ArtifactManifestEntry, f as Tombstone, g as RetrievalPacket, I as IterationOutcome, h as IterationRecord, i as LegacyImportOptions, j as LegacyImportReport, k as ModelEntryRecord, J as JsonValue } from './index-CHp2bgs1.mjs';
2
- import { M as MemoryReviewReceipt, I as ImprintThreadSummary, a as ImprintGroundingAction, b as ImprintView } from './types-Bur49CLH.mjs';
2
+ import { M as MemoryReviewReceipt, I as ImprintThreadSummary, a as ImprintGroundingAction, b as ImprintView } from './types-C8tjyhiF.mjs';
3
3
 
4
4
  type ReviewCommandBase = {
5
5
  proposalId: MemoryId;
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ import{a,b,c,d,e,f}from"./chunk-4BEN6VQ7.mjs";import"./chunk-OFHBVUTT.mjs";export{a as agentCredentialFile,e as callPeer,d as canvasChatRequest,c as enrolledCanvasEndpoint,f as runPeerCommand,b as sendThreadNote};
@@ -1,4 +1,4 @@
1
- import { P as PopmeltPluginOptions } from './dev-server-rQIWJcSX.mjs';
1
+ import { P as PopmeltPluginOptions } from './dev-server-DtX2_HCa.mjs';
2
2
  import { popmelt as popmelt$1 } from './plugin-vite.mjs';
3
3
  import 'node:http';
4
4
 
@@ -1,4 +1,4 @@
1
- import{a as o}from"./chunk-CKD6RNCO.mjs";import"./chunk-L4G2KO2P.mjs";import"./chunk-NOHXTT24.mjs";import{fileURLToPath as d}from"url";function c(t={}){return{name:"popmelt",hooks:{"astro:config:setup"({command:r,config:i,updateConfig:n,injectScript:p}){if(r!=="dev")return;let{client:e=!0,multiplayer:a=!1,...s}=t;n({vite:{plugins:[o({...s,projectRoot:t.projectRoot??d(i.root)})],optimizeDeps:{include:e?["react","react/jsx-runtime","react/jsx-dev-runtime","react-dom","react-dom/client","lucide-react"]:[]}}}),p("page",e?l(a):`
1
+ import{a as o}from"./chunk-N4F7DGFN.mjs";import"./chunk-ZQTLCQPC.mjs";import"./chunk-NOHXTT24.mjs";import{fileURLToPath as d}from"url";function c(t={}){return{name:"popmelt",hooks:{"astro:config:setup"({command:r,config:i,updateConfig:n,injectScript:p}){if(r!=="dev")return;let{client:e=!0,multiplayer:a=!1,...s}=t;n({vite:{plugins:[o({...s,projectRoot:t.projectRoot??d(i.root)})],optimizeDeps:{include:e?["react","react/jsx-runtime","react/jsx-dev-runtime","react-dom","react-dom/client","lucide-react"]:[]}}}),p("page",e?l(a):`
2
2
  import { bridgeUrl, projectId } from 'virtual:popmelt/bridge';
3
3
  if (bridgeUrl) window.__POPMELT_BRIDGE_URL__ = bridgeUrl;
4
4
  if (projectId) window.__POPMELT_PROJECT_ID__ = projectId;
@@ -1,5 +1,5 @@
1
1
  import { NuxtModule } from 'nuxt/schema';
2
- import { P as PopmeltPluginOptions } from './dev-server-rQIWJcSX.mjs';
2
+ import { P as PopmeltPluginOptions } from './dev-server-DtX2_HCa.mjs';
3
3
  import 'node:http';
4
4
 
5
5
  type PopmeltNuxtOptions = Pick<PopmeltPluginOptions, 'port' | 'projectRoot' | 'bridge'> & {
@@ -1,4 +1,4 @@
1
- import{a as s,b as l}from"./chunk-L4G2KO2P.mjs";import{b as i}from"./chunk-NOHXTT24.mjs";import{addPluginTemplate as d,defineNuxtModule as m}from"nuxt/kit";var a=m({meta:{name:"@popmelt.com/core/nuxt",configKey:"popmelt"},async setup(o,e){if(!e.options.dev)return;let n={config:{server:e.options.devServer},middlewares:{use(){}}},t=await s({...o,projectRoot:o.projectRoot??e.options.rootDir},n,3e3);if(t.port===null)return;e.hook("vite:extend",({config:p})=>{p.optimizeDeps??={},p.optimizeDeps.include=[...new Set([...p.optimizeDeps.include??[],"react","react/jsx-runtime","react/jsx-dev-runtime","react-dom","react-dom/client","lucide-react"])]});let r=await l(t,n),u=r?i(r):void 0;e.hook("close",async()=>{u?.(),await r?.release()}),d({filename:"popmelt.client.mjs",mode:"client",getContents:()=>`import { defineNuxtPlugin } from '#app';
1
+ import{a as s,b as l}from"./chunk-ZQTLCQPC.mjs";import{b as i}from"./chunk-NOHXTT24.mjs";import{addPluginTemplate as d,defineNuxtModule as m}from"nuxt/kit";var a=m({meta:{name:"@popmelt.com/core/nuxt",configKey:"popmelt"},async setup(o,e){if(!e.options.dev)return;let n={config:{server:e.options.devServer},middlewares:{use(){}}},t=await s({...o,projectRoot:o.projectRoot??e.options.rootDir},n,3e3);if(t.port===null)return;e.hook("vite:extend",({config:p})=>{p.optimizeDeps??={},p.optimizeDeps.include=[...new Set([...p.optimizeDeps.include??[],"react","react/jsx-runtime","react/jsx-dev-runtime","react-dom","react-dom/client","lucide-react"])]});let r=await l(t,n),u=r?i(r):void 0;e.hook("close",async()=>{u?.(),await r?.release()}),d({filename:"popmelt.client.mjs",mode:"client",getContents:()=>`import { defineNuxtPlugin } from '#app';
2
2
  export default defineNuxtPlugin((nuxtApp) => {
3
3
  let disposed = false;
4
4
  let mounting;
@@ -1,4 +1,4 @@
1
- import { P as PopmeltPluginOptions, D as DevServerLike } from './dev-server-rQIWJcSX.mjs';
1
+ import { P as PopmeltPluginOptions, D as DevServerLike } from './dev-server-DtX2_HCa.mjs';
2
2
  import 'node:http';
3
3
 
4
4
  type Plugin = {
@@ -1 +1 @@
1
- import{a}from"./chunk-CKD6RNCO.mjs";import"./chunk-L4G2KO2P.mjs";import"./chunk-NOHXTT24.mjs";export{a as popmelt};
1
+ import{a}from"./chunk-N4F7DGFN.mjs";import"./chunk-ZQTLCQPC.mjs";import"./chunk-NOHXTT24.mjs";export{a as popmelt};
package/dist/server.d.mts CHANGED
@@ -1,5 +1,5 @@
1
- import { P as ParticipantAgentAdapter, c as ParticipantCredential, d as PopmeltHandle, e as ImprintGraph, f as ImprintTransaction, g as ImprintMutation, h as ImprintContext, i as ImprintSummaryKind, j as ImprintExplanationKind, k as ImprintScope, l as ImprintTopologyRelationType, m as ImprintExplanationRef, I as ImprintThreadSummary, a as ImprintGroundingAction, n as ImprintRelation, Q as QualifiedImprintRelation, o as PopmeltOptions } from './types-Bur49CLH.mjs';
2
- export { p as ImprintConcrete, q as ImprintEvidence, r as ImprintExplanation, s as ImprintExplanationState, t as ImprintRelationType, u as ParticipantAgentView } from './types-Bur49CLH.mjs';
1
+ import { P as ParticipantAgentAdapter, c as ParticipantCredential, d as PopmeltHandle, e as ImprintGraph, f as ImprintTransaction, g as ImprintMutation, h as ImprintContext, i as ImprintSummaryKind, j as ImprintExplanationKind, k as ImprintScope, l as ImprintTopologyRelationType, m as ImprintExplanationRef, I as ImprintThreadSummary, a as ImprintGroundingAction, n as ImprintRelation, Q as QualifiedImprintRelation, o as PopmeltOptions } from './types-C8tjyhiF.mjs';
2
+ export { p as ImprintConcrete, q as ImprintEvidence, r as ImprintExplanation, s as ImprintExplanationState, t as ImprintRelationType, u as ParticipantAgentView } from './types-C8tjyhiF.mjs';
3
3
  import * as node_http from 'node:http';
4
4
  import { IncomingMessage, ServerResponse } from 'node:http';
5
5
 
package/dist/server.mjs CHANGED
@@ -1,5 +1,5 @@
1
- import{a as $,b as v,c as ee,d as te,e as re,f as oe,g as M,h as B,i as L,j as H}from"./chunk-5NOCGSQL.mjs";import{a as X,b as Z}from"./chunk-GL4I4MI6.mjs";import"./chunk-QXVMGZFP.mjs";import{a as J,b as U}from"./chunk-NOHXTT24.mjs";import{spawn as Pe}from"child_process";import{closeSync as ye,openSync as _e}from"fs";import{appendFile as Ee,mkdir as Te,readFile as Oe,realpath as Ie}from"fs/promises";import{dirname as Se,join as A}from"path";import{fileURLToPath as Re}from"url";import{spawn as ne}from"child_process";import{mkdtemp as ie,readFile as ae,rm as se}from"fs/promises";import{tmpdir as ce}from"os";import{join as G}from"path";import V from"ws";async function F(e,t){let c=Date.now()+25e3;for(;Date.now()<c;){let r=await e();if(r)return r;await new Promise(i=>setTimeout(i,100))}throw new Error(`Timed out waiting for ${t}`)}function pe(e){let t=new URL(e);if(t.protocol!=="http:"||!["localhost","127.0.0.1"].includes(t.hostname)||t.username||t.password||t.hash||t.search)throw new Error("Managed participants require an explicit local app URL");return async c=>{let r=await ie(G(ce(),"popmelt-participant-")),i=ne(process.env.CHROME_PATH??(process.platform==="darwin"?"/Applications/Google Chrome.app/Contents/MacOS/Google Chrome":"google-chrome"),["--headless=new","--no-first-run","--no-default-browser-check","--remote-debugging-address=127.0.0.1","--remote-debugging-port=0","--window-size=1440,1000",`--user-data-dir=${r}`,"about:blank"],{stdio:["ignore","ignore","pipe"]}),h,_="",a,d=!1,f=0,l=new Map;i.on("error",o=>{h=o}),i.stderr.on("data",o=>{_=(_+o).slice(-4e3)});let E=()=>{for(let o of l.values())clearTimeout(o.timer),o.reject(new Error("Participant browser disconnected"));l.clear()},n=async()=>{if(!d){if(d=!0,E(),a?.close(),i.pid&&i.exitCode===null&&i.signalCode===null){let o=new Promise(I=>i.once("exit",()=>I()));i.kill("SIGTERM");let T=setTimeout(()=>i.kill("SIGKILL"),3e3);await o,clearTimeout(T)}await se(r,{recursive:!0,force:!0})}};try{let o=await F(async()=>{if(h)throw h;if(i.exitCode!==null||i.signalCode!==null)throw new Error(`Participant browser exited: ${_}`);return ae(G(r,"DevToolsActivePort"),"utf8").then(p=>p.split(`
2
- `)[0]).catch(()=>null)},"participant browser startup"),D=(await(await fetch(`http://127.0.0.1:${o}/json/list`,{signal:AbortSignal.timeout(3e3)})).json()).find(p=>p.type==="page");if(!D)throw new Error("Participant browser has no page");a=new V(D.webSocketDebuggerUrl,{handshakeTimeout:5e3}),await new Promise((p,s)=>{a.once("open",p),a.once("error",s)}),a.on("close",E),a.on("error",E),a.on("message",p=>{let s=JSON.parse(p.toString()),u=l.get(s.id);u&&(l.delete(s.id),clearTimeout(u.timer),s.error?u.reject(new Error(s.error.message??"Participant browser request failed")):u.resolve(s.result))});let P=(p,s={})=>new Promise((u,O)=>{if(d||a?.readyState!==V.OPEN){O(new Error("Participant browser is closed"));return}let g=++f,R=setTimeout(()=>{l.delete(g),O(new Error(`Participant browser timed out: ${p}. Action was not retried.`))},35e3);l.set(g,{resolve:u,reject:O,timer:R}),a.send(JSON.stringify({id:g,method:p,params:s}))}),y=async(p,s=!1)=>{let u=await P("Runtime.evaluate",{expression:p,userGesture:s,awaitPromise:!0,returnByValue:!0});if(u.exceptionDetails)throw new Error("Participant action failed: "+JSON.stringify(u.exceptionDetails));return u.result?.value};await P("Page.enable"),await P("Runtime.enable");let Y=(await P("Page.getFrameTree")).frameTree.frame.id,S=new Set,b=!1;await P("Runtime.addBinding",{name:"__popmeltCapture"}),a.on("message",p=>{let s=JSON.parse(p.toString());if(s.method==="Runtime.executionContextCreated"){let w=s.params.context;w.auxData?.isDefault&&w.auxData.frameId===Y&&S.add(w.id)}if(s.method==="Runtime.executionContextDestroyed"&&S.delete(s.params.executionContextId),s.method==="Runtime.executionContextsCleared"&&S.clear(),s.method!=="Runtime.bindingCalled"||s.params.name!=="__popmeltCapture"||!S.has(s.params.executionContextId))return;let u=s.params.executionContextId,O=s.params.payload;if(O.length>22e4)return;let g;try{g=JSON.parse(O)}catch{return}if(!Number.isSafeInteger(g.id)||!Array.isArray(g.selectors)||g.selectors.length>200||g.selectors.some(w=>typeof w!="string"||w.length>1024))return;let R=w=>P("Runtime.evaluate",{contextId:u,expression:`window.__POPMELT_CAPTURE_DELIVER__?.(${g.id},${JSON.stringify(w)})`}).catch(()=>{});if(b){R(null);return}b=!0,(async()=>{try{if(!await y(`location.origin + location.pathname === ${JSON.stringify(t.href)}`))return null;let w=await y(`window.__POPMELT_AGENT_VIEW__.geometry(${JSON.stringify(g.selectors)})`),m=w.clip;if(![m.x,m.y,m.width,m.height].every(Number.isFinite)||m.x<0||m.y<0||m.width<=0||m.height<=0||m.width>4096||m.height>4096)return null;await y("window.__POPMELT_CAPTURE_CHROME__ = [...document.querySelectorAll('[data-popmelt-top-layer-host]')].map(element => [element, element.style.opacity]); window.__POPMELT_CAPTURE_CHROME__.forEach(([element]) => element.style.opacity = '0');");try{let C=await P("Page.captureScreenshot",{format:"jpeg",quality:80,captureBeyondViewport:!0,clip:{...m,scale:Math.min(1,1280/Math.max(m.width,m.height))}});return typeof C.data!="string"||C.data.length>5e5?null:{image:"data:image/jpeg;base64,"+C.data,targets:w.targets}}finally{await y("window.__POPMELT_CAPTURE_CHROME__?.forEach(([element, opacity]) => element.style.opacity = opacity); delete window.__POPMELT_CAPTURE_CHROME__;").catch(()=>{})}}catch{return null}})().then(R).finally(()=>{b=!1})}),await P("Page.addScriptToEvaluateOnNewDocument",{source:`if (location.origin + location.pathname === ${JSON.stringify(t.href)}) {
1
+ import{a as B,b as J,c as S,d as re,e as oe,f as ne,g as ie,h as M,i as H,j as L,k as U}from"./chunk-O6HC437G.mjs";import{a as ee,b as te}from"./chunk-GL4I4MI6.mjs";import"./chunk-QXVMGZFP.mjs";import{a as G,b as V}from"./chunk-NOHXTT24.mjs";import{spawn as ye}from"child_process";import{closeSync as _e,openSync as Ee}from"fs";import{appendFile as Te,mkdir as Oe,readFile as Ie,realpath as ve}from"fs/promises";import{dirname as Re,join as j}from"path";import{fileURLToPath as Se}from"url";import{spawn as ae}from"child_process";import{mkdtemp as se,readFile as ce,rm as pe}from"fs/promises";import{tmpdir as le}from"os";import{join as F}from"path";import W from"ws";async function q(e,t){let c=Date.now()+25e3;for(;Date.now()<c;){let r=await e();if(r)return r;await new Promise(i=>setTimeout(i,100))}throw new Error(`Timed out waiting for ${t}`)}function de(e){let t=new URL(e);if(t.protocol!=="http:"||!["localhost","127.0.0.1"].includes(t.hostname)||t.username||t.password||t.hash||t.search)throw new Error("Managed participants require an explicit local app URL");return async c=>{let r=await se(F(le(),"popmelt-participant-")),i=ae(process.env.CHROME_PATH??(process.platform==="darwin"?"/Applications/Google Chrome.app/Contents/MacOS/Google Chrome":"google-chrome"),["--headless=new","--no-first-run","--no-default-browser-check","--remote-debugging-address=127.0.0.1","--remote-debugging-port=0","--window-size=1440,1000",`--user-data-dir=${r}`,"about:blank"],{stdio:["ignore","ignore","pipe"]}),h,_="",a,d=!1,f=0,l=new Map;i.on("error",o=>{h=o}),i.stderr.on("data",o=>{_=(_+o).slice(-4e3)});let E=()=>{for(let o of l.values())clearTimeout(o.timer),o.reject(new Error("Participant browser disconnected"));l.clear()},n=async()=>{if(!d){if(d=!0,E(),a?.close(),i.pid&&i.exitCode===null&&i.signalCode===null){let o=new Promise(I=>i.once("exit",()=>I()));i.kill("SIGTERM");let T=setTimeout(()=>i.kill("SIGKILL"),3e3);await o,clearTimeout(T)}await pe(r,{recursive:!0,force:!0})}};try{let o=await q(async()=>{if(h)throw h;if(i.exitCode!==null||i.signalCode!==null)throw new Error(`Participant browser exited: ${_}`);return ce(F(r,"DevToolsActivePort"),"utf8").then(p=>p.split(`
2
+ `)[0]).catch(()=>null)},"participant browser startup"),D=(await(await fetch(`http://127.0.0.1:${o}/json/list`,{signal:AbortSignal.timeout(3e3)})).json()).find(p=>p.type==="page");if(!D)throw new Error("Participant browser has no page");a=new W(D.webSocketDebuggerUrl,{handshakeTimeout:5e3}),await new Promise((p,s)=>{a.once("open",p),a.once("error",s)}),a.on("close",E),a.on("error",E),a.on("message",p=>{let s=JSON.parse(p.toString()),u=l.get(s.id);u&&(l.delete(s.id),clearTimeout(u.timer),s.error?u.reject(new Error(s.error.message??"Participant browser request failed")):u.resolve(s.result))});let P=(p,s={})=>new Promise((u,O)=>{if(d||a?.readyState!==W.OPEN){O(new Error("Participant browser is closed"));return}let g=++f,R=setTimeout(()=>{l.delete(g),O(new Error(`Participant browser timed out: ${p}. Action was not retried.`))},35e3);l.set(g,{resolve:u,reject:O,timer:R}),a.send(JSON.stringify({id:g,method:p,params:s}))}),y=async(p,s=!1)=>{let u=await P("Runtime.evaluate",{expression:p,userGesture:s,awaitPromise:!0,returnByValue:!0});if(u.exceptionDetails)throw new Error("Participant action failed: "+JSON.stringify(u.exceptionDetails));return u.result?.value};await P("Page.enable"),await P("Runtime.enable");let Z=(await P("Page.getFrameTree")).frameTree.frame.id,v=new Set,b=!1;await P("Runtime.addBinding",{name:"__popmeltCapture"}),a.on("message",p=>{let s=JSON.parse(p.toString());if(s.method==="Runtime.executionContextCreated"){let w=s.params.context;w.auxData?.isDefault&&w.auxData.frameId===Z&&v.add(w.id)}if(s.method==="Runtime.executionContextDestroyed"&&v.delete(s.params.executionContextId),s.method==="Runtime.executionContextsCleared"&&v.clear(),s.method!=="Runtime.bindingCalled"||s.params.name!=="__popmeltCapture"||!v.has(s.params.executionContextId))return;let u=s.params.executionContextId,O=s.params.payload;if(O.length>22e4)return;let g;try{g=JSON.parse(O)}catch{return}if(!Number.isSafeInteger(g.id)||!Array.isArray(g.selectors)||g.selectors.length>200||g.selectors.some(w=>typeof w!="string"||w.length>1024))return;let R=w=>P("Runtime.evaluate",{contextId:u,expression:`window.__POPMELT_CAPTURE_DELIVER__?.(${g.id},${JSON.stringify(w)})`}).catch(()=>{});if(b){R(null);return}b=!0,(async()=>{try{if(!await y(`location.origin + location.pathname === ${JSON.stringify(t.href)}`))return null;let w=await y(`window.__POPMELT_AGENT_VIEW__.geometry(${JSON.stringify(g.selectors)})`),m=w.clip;if(![m.x,m.y,m.width,m.height].every(Number.isFinite)||m.x<0||m.y<0||m.width<=0||m.height<=0||m.width>4096||m.height>4096)return null;await y("window.__POPMELT_CAPTURE_CHROME__ = [...document.querySelectorAll('[data-popmelt-top-layer-host]')].map(element => [element, element.style.opacity]); window.__POPMELT_CAPTURE_CHROME__.forEach(([element]) => element.style.opacity = '0');");try{let C=await P("Page.captureScreenshot",{format:"jpeg",quality:80,captureBeyondViewport:!0,clip:{...m,scale:Math.min(1,1280/Math.max(m.width,m.height))}});return typeof C.data!="string"||C.data.length>5e5?null:{image:"data:image/jpeg;base64,"+C.data,targets:w.targets}}finally{await y("window.__POPMELT_CAPTURE_CHROME__?.forEach(([element, opacity]) => element.style.opacity = opacity); delete window.__POPMELT_CAPTURE_CHROME__;").catch(()=>{})}}catch{return null}})().then(R).finally(()=>{b=!1})}),await P("Page.addScriptToEvaluateOnNewDocument",{source:`if (location.origin + location.pathname === ${JSON.stringify(t.href)}) {
3
3
  window.__POPMELT_AGENT_CREDENTIAL__ = ${JSON.stringify(c)};
4
4
  const waiting = new Map(); let id = 0;
5
5
  window.__POPMELT_CAPTURE_DELIVER__ = (id, frame) => { const pending = waiting.get(id); if (!pending) return; waiting.delete(id); clearTimeout(pending.timer); pending.resolve(frame); };
@@ -7,8 +7,8 @@ import{a as $,b as v,c as ee,d as te,e as re,f as oe,g as M,h as B,i as L,j as H
7
7
  frame: selectors => stopped ? Promise.resolve(null) : new Promise(resolve => { const key = ++id; owned.add(key); const timer = setTimeout(() => window.__POPMELT_CAPTURE_DELIVER__(key, null), 5000); waiting.set(key, {resolve: frame => { owned.delete(key); resolve(frame); }, timer}); window.__popmeltCapture(JSON.stringify({id: key, selectors})); }),
8
8
  stop: () => { stopped = true; for (const key of owned) window.__POPMELT_CAPTURE_DELIVER__(key, null); }
9
9
  }; };
10
- }`});let x=()=>F(()=>y(`location.origin + location.pathname === ${JSON.stringify(t.href)} && Boolean(window.__POPMELT_AGENT_VIEW__)`),"native participant canvas");a.on("message",p=>{JSON.parse(p.toString()).method==="Page.loadEventFired"&&x().then(()=>y("window.__POPMELT_AGENT_VIEW__.share()",!0)).catch(()=>{})}),await P("Page.navigate",{url:t.href}),await x(),await y("window.__POPMELT_AGENT_VIEW__.share()",!0);let j=Promise.resolve();return{act(p){let s=j.then(async()=>(await x(),y(`window.__POPMELT_AGENT_VIEW__.act(${JSON.stringify(p)})`)));return j=s.catch(()=>{}),s},close:n}}catch(o){throw await n(),o}}}import{randomBytes as W,timingSafeEqual as le}from"crypto";import{readFile as de,writeFile as me,mkdir as ue}from"fs/promises";import{join as q}from"path";var k=(e,t)=>typeof e=="string"&&Buffer.byteLength(e)===Buffer.byteLength(t)&&le(Buffer.from(e),Buffer.from(t));async function N(e){let t=q(e.projectRoot,".popmelt");await ue(t,{recursive:!0});let c=q(t,"participant-host-recovery.json"),r;try{if(r=JSON.parse(await de(c,"utf8")).token,typeof r!="string"||!/^[\w-]{43}$/.test(r))throw new Error("Invalid host recovery capability")}catch(a){if(a.code!=="ENOENT")throw a;r=W(32).toString("base64url"),await me(c,JSON.stringify({token:r}),{mode:384,flag:"wx"})}let i=W(32).toString("base64url"),h=`popmelt-host-${e.projectId}`;return{handler:async(a,d)=>{if(d.setHeader("Cache-Control","no-store"),a.method!=="POST"||a.headers.origin!==e.origin||a.headers["content-type"]!=="application/json"){d.statusCode=403,d.end();return}try{let f="";for await(let o of a)if(f+=o,f.length>2048)throw new Error("Invalid host proof");let l=JSON.parse(f),E=a.headers.cookie?.split(";").map(o=>o.trim()).find(o=>o.startsWith(`${h}=`))?.slice(h.length+1),n;if(i&&k(l.token,i))i="";else if(!k(E,r))if(l.credential){if(n=await e.host(),l.credential.participantId!==n.participantId||!k(l.credential.token,n.token))throw new Error("Invalid host proof")}else throw new Error("Host proof required");n??=await e.host(),d.setHeader("Set-Cookie",`${h}=${r}; Path=/__popmelt/host; HttpOnly; SameSite=Strict; Max-Age=31536000`),d.setHeader("Content-Type","application/json"),d.end(JSON.stringify(n))}catch{d.statusCode=403,d.end()}},claimUrl:`${e.origin}/#popmelt-host=${i}`}}import{chmod as fe,mkdir as ge,writeFile as we}from"fs/promises";import{join as z}from"path";async function he(e){let{bridge:t}=e;if(!t.participantHost)throw new Error("The bridge does not support participant sessions");let c=await N({projectRoot:e.projectRoot,projectId:t.projectId,origin:e.origin,host:t.participantHost}),r=z(e.projectRoot,".popmelt");await ge(r,{recursive:!0});let i=z(r,"participant-host-link.json");return await we(i,JSON.stringify({url:c.claimUrl}),{mode:384}),await fe(i,384),{hostEntry:c.handler,async read(){return{version:1,url:`http://127.0.0.1:${t.port}`,projectId:t.projectId,revision:await e.sourceRevision?.()??"unversioned"}}}}var ve=1111,K=3e4,be=8e3;async function xe(e){return Ie(e).catch(()=>e)}async function Q(e,t){let r=(await Oe(t,"utf8").catch(()=>"")).slice(-be).trim();return new Error(r?`${e}
10
+ }`});let x=()=>q(()=>y(`location.origin + location.pathname === ${JSON.stringify(t.href)} && Boolean(window.__POPMELT_AGENT_VIEW__)`),"native participant canvas");a.on("message",p=>{JSON.parse(p.toString()).method==="Page.loadEventFired"&&x().then(()=>y("window.__POPMELT_AGENT_VIEW__.share()",!0)).catch(()=>{})}),await P("Page.navigate",{url:t.href}),await x(),await y("window.__POPMELT_AGENT_VIEW__.share()",!0);let $=Promise.resolve();return{act(p){let s=$.then(async()=>(await x(),y(`window.__POPMELT_AGENT_VIEW__.act(${JSON.stringify(p)})`)));return $=s.catch(()=>{}),s},close:n}}catch(o){throw await n(),o}}}import{randomBytes as z,timingSafeEqual as me}from"crypto";import{readFile as ue,writeFile as fe,mkdir as ge}from"fs/promises";import{join as K}from"path";var N=(e,t)=>typeof e=="string"&&Buffer.byteLength(e)===Buffer.byteLength(t)&&me(Buffer.from(e),Buffer.from(t));async function k(e){let t=K(e.projectRoot,".popmelt");await ge(t,{recursive:!0});let c=K(t,"participant-host-recovery.json"),r;try{if(r=JSON.parse(await ue(c,"utf8")).token,typeof r!="string"||!/^[\w-]{43}$/.test(r))throw new Error("Invalid host recovery capability")}catch(a){if(a.code!=="ENOENT")throw a;r=z(32).toString("base64url"),await fe(c,JSON.stringify({token:r}),{mode:384,flag:"wx"})}let i=z(32).toString("base64url"),h=`popmelt-host-${e.projectId}`;return{handler:async(a,d)=>{if(d.setHeader("Cache-Control","no-store"),a.method!=="POST"||a.headers.origin!==e.origin||a.headers["content-type"]!=="application/json"){d.statusCode=403,d.end();return}try{let f="";for await(let o of a)if(f+=o,f.length>2048)throw new Error("Invalid host proof");let l=JSON.parse(f),E=a.headers.cookie?.split(";").map(o=>o.trim()).find(o=>o.startsWith(`${h}=`))?.slice(h.length+1),n;if(i&&N(l.token,i))i="";else if(!N(E,r))if(l.credential){if(n=await e.host(),l.credential.participantId!==n.participantId||!N(l.credential.token,n.token))throw new Error("Invalid host proof")}else throw new Error("Host proof required");n??=await e.host(),d.setHeader("Set-Cookie",`${h}=${r}; Path=/__popmelt/host; HttpOnly; SameSite=Strict; Max-Age=31536000`),d.setHeader("Content-Type","application/json"),d.end(JSON.stringify(n))}catch{d.statusCode=403,d.end()}},claimUrl:`${e.origin}/#popmelt-host=${i}`}}import{chmod as we,mkdir as he,writeFile as Q}from"fs/promises";import{join as A}from"path";async function Pe(e){let{bridge:t}=e;if(!t.participantHost)throw new Error("The bridge does not support participant sessions");let c=await k({projectRoot:e.projectRoot,projectId:t.projectId,origin:e.origin,host:t.participantHost}),r=A(e.projectRoot,".popmelt");await he(r,{recursive:!0}),await Q(A(r,"participant-bridge.json"),JSON.stringify({port:t.port,projectId:t.projectId}),{mode:384});let i=A(r,"participant-host-link.json");return await Q(i,JSON.stringify({url:c.claimUrl}),{mode:384}),await we(i,384),{hostEntry:c.handler,async read(){return{version:1,url:`http://127.0.0.1:${t.port}`,projectId:t.projectId,revision:await e.sourceRevision?.()??"unversioned"}}}}var be=1111,X=3e4,xe=8e3;async function Ce(e){return ve(e).catch(()=>e)}async function Y(e,t){let r=(await Ie(t,"utf8").catch(()=>"")).slice(-xe).trim();return new Error(r?`${e}
11
11
  Bridge log (${t}):
12
- ${r}`:e)}async function ot(e){if(process.env.NODE_ENV==="production"&&!e?.force)throw new Error("[Bridge] Refusing to start in production. Pass { force: true } to override.");if(e?.detached){let c=await Ce(e);if(e.manageLease===!1)return c;let r=await J({port:c.port,projectId:c.projectId});if(!r)return console.warn("[popmelt] detached bridge started without a process lease"),c;let i=U(r);return{...c,close:async()=>{i(),await r.release()}}}let t=await H(e);return process.env.POPMELT_BRIDGE_PORT=String(t.port),process.env.POPMELT_PROJECT_ID=t.projectId,t}async function Ce(e){let t=e.port??ve,c=await xe(e.projectRoot??process.cwd()),r=$(c),i=await B(c);for(let n=t;n<t+10;n++){let o=await L(n);if(o&&o.projectId===r){if(o.version&&o.version!==v){if(o.restartMode==="detached"){try{await fetch(`http://127.0.0.1:${n}/shutdown`,{method:"POST"})}catch{}await new Promise(I=>setTimeout(I,500));break}continue}if(!M(o,{projectId:r,version:v,restartMode:"detached"}))continue;let T=e.devOrigin;if(T&&o.devOrigin!==T)try{await fetch(`http://127.0.0.1:${n}/config`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({devOrigin:T})})}catch{}return process.env.POPMELT_BRIDGE_PORT=String(n),process.env.POPMELT_PROJECT_ID=r,{port:n,projectId:r,storeId:i.storeId,close:async()=>{}}}}let h=A(Se(Re(import.meta.url)),"bridge-entry.mjs"),_=A(c,".popmelt"),a=A(_,"bridge.log");await Te(_,{recursive:!0}),await Ee(a,`
12
+ ${r}`:e)}async function it(e){if(process.env.NODE_ENV==="production"&&!e?.force)throw new Error("[Bridge] Refusing to start in production. Pass { force: true } to override.");if(e={...e,experimentalEventTransport:B(e?.experimentalEventTransport)},e.detached){let c=await Me(e);if(e.manageLease===!1)return c;let r=await G({port:c.port,projectId:c.projectId});if(!r)return console.warn("[popmelt] detached bridge started without a process lease"),c;let i=V(r);return{...c,close:async()=>{i(),await r.release()}}}let t=await U(e);return process.env.POPMELT_BRIDGE_PORT=String(t.port),process.env.POPMELT_PROJECT_ID=t.projectId,t}async function Me(e){let t=e.port??be,c=await Ce(e.projectRoot??process.cwd()),r=J(c),i=await H(c);for(let n=t;n<t+10;n++){let o=await L(n);if(o&&o.projectId===r){if(o.version&&o.version!==S){if(o.restartMode==="detached"){try{await fetch(`http://127.0.0.1:${n}/shutdown`,{method:"POST"})}catch{}await new Promise(I=>setTimeout(I,500));break}continue}if(!M(o,{projectId:r,version:S,restartMode:"detached",eventTransport:e.experimentalEventTransport}))continue;let T=e.devOrigin;if(T&&o.devOrigin!==T)try{await fetch(`http://127.0.0.1:${n}/config`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({devOrigin:T})})}catch{}return process.env.POPMELT_BRIDGE_PORT=String(n),process.env.POPMELT_PROJECT_ID=r,{port:n,projectId:r,storeId:i.storeId,close:async()=>{}}}}let h=j(Re(Se(import.meta.url)),"bridge-entry.mjs"),_=j(c,".popmelt"),a=j(_,"bridge.log");await Oe(_,{recursive:!0}),await Te(a,`
13
13
  [${new Date().toISOString()}] Starting detached bridge
14
- `);let d=_e(a,"a"),f;try{f=Pe(process.execPath,[h],{detached:!0,stdio:["ignore","ignore",d],env:{...process.env,POPMELT_PORT:String(t),POPMELT_PROJECT_ROOT:c,POPMELT_DEV_ORIGIN:e.devOrigin??"",POPMELT_COPILOT_PATH:e.copilotPath??""}})}finally{ye(d)}let l=null;f.once("error",n=>{l=`spawn error: ${n.message}`}),f.once("exit",(n,o)=>{l=`child exited before becoming healthy (${o?`signal ${o}`:`code ${n??"unknown"}`})`}),f.unref();let E=Date.now()+K;for(;Date.now()<E;){if(await new Promise(n=>setTimeout(n,100)),l)throw await Q(`[Bridge] Detached bridge ${l}`,a);for(let n=t;n<t+10;n++){let o=await L(n);if(M(o,{projectId:r,version:v,restartMode:"detached"}))return process.env.POPMELT_BRIDGE_PORT=String(n),process.env.POPMELT_PROJECT_ID=r,{port:n,projectId:r,storeId:i.storeId,close:async()=>{}}}}throw f.kill("SIGTERM"),await Q(`[Bridge] Detached bridge failed to start within ${K/1e3}s (port ${t})`,a)}export{oe as ImprintService,ee as ImprintStore,he as createParticipantDevBootstrap,N as createParticipantHostEntry,re as formatImprintPrompt,X as imprintExplanationRef,pe as managedParticipantBrowser,te as parseImprintDraft,Z as qualifyImprintRelation,ot as startPopmelt};
14
+ `);let d=Ee(a,"a"),f;try{f=ye(process.execPath,[h],{detached:!0,stdio:["ignore","ignore",d],env:{...process.env,POPMELT_PORT:String(t),POPMELT_PROJECT_ROOT:c,POPMELT_DEV_ORIGIN:e.devOrigin??"",POPMELT_COPILOT_PATH:e.copilotPath??"",POPMELT_EXPERIMENTAL_EVENT_TRANSPORT:e.experimentalEventTransport}})}finally{_e(d)}let l=null;f.once("error",n=>{l=`spawn error: ${n.message}`}),f.once("exit",(n,o)=>{l=`child exited before becoming healthy (${o?`signal ${o}`:`code ${n??"unknown"}`})`}),f.unref();let E=Date.now()+X;for(;Date.now()<E;){if(await new Promise(n=>setTimeout(n,100)),l)throw await Y(`[Bridge] Detached bridge ${l}`,a);for(let n=t;n<t+10;n++){let o=await L(n);if(M(o,{projectId:r,version:S,restartMode:"detached",eventTransport:e.experimentalEventTransport}))return process.env.POPMELT_BRIDGE_PORT=String(n),process.env.POPMELT_PROJECT_ID=r,{port:n,projectId:r,storeId:i.storeId,close:async()=>{}}}}throw f.kill("SIGTERM"),await Y(`[Bridge] Detached bridge failed to start within ${X/1e3}s (port ${t})`,a)}export{ie as ImprintService,re as ImprintStore,Pe as createParticipantDevBootstrap,k as createParticipantHostEntry,ne as formatImprintPrompt,ee as imprintExplanationRef,de as managedParticipantBrowser,oe as parseImprintDraft,te as qualifyImprintRelation,it as startPopmelt};
@@ -58,6 +58,23 @@ type ParticipantCredential = {
58
58
  token: string;
59
59
  };
60
60
 
61
+ /** For a host that owns turn scheduling. Each note must start a distinct turn. */
62
+ type CanvasNoteTurn = {
63
+ threadId: string;
64
+ clientUserMessageId: string;
65
+ input: [{
66
+ type: 'text';
67
+ text: string;
68
+ text_elements: [];
69
+ }];
70
+ additionalContext: {
71
+ popmelt_receipt: {
72
+ kind: 'untrusted';
73
+ value: string;
74
+ };
75
+ };
76
+ };
77
+
61
78
  /** Browser hosting is replaceable; this boundary owns only local agent enrollment. */
62
79
  type ParticipantAgentView = {
63
80
  act(action: PeerAction): Promise<unknown>;
@@ -303,6 +320,8 @@ type ImprintView = {
303
320
  };
304
321
 
305
322
  type PopmeltOptions = {
323
+ /** Local events. Overrides POPMELT_EXPERIMENTAL_EVENT_TRANSPORT; defaults to WebSocket. */
324
+ experimentalEventTransport?: 'sse' | 'websocket';
306
325
  port?: number;
307
326
  projectRoot?: string;
308
327
  tempDir?: string;
@@ -327,6 +346,8 @@ type PopmeltOptions = {
327
346
  /** Optional context metadata. Never used as a save, Send, or approval gate. */
328
347
  sourceRevision?: () => Promise<string>;
329
348
  agentAdapter?: ParticipantAgentAdapter;
349
+ /** Experimental host transport: preserve the visible input and attach its context to the same Codex turn. */
350
+ sendCanvasNoteTurn?: (turn: CanvasNoteTurn) => Promise<void>;
330
351
  };
331
352
  };
332
353
  type PopmeltHandle = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@popmelt.com/core",
3
- "version": "0.28.4",
3
+ "version": "0.30.0",
4
4
  "description": "A tiny, powerful design layer for humans and AI",
5
5
  "license": "PolyForm-Shield-1.0.0",
6
6
  "author": "Popmelt <reb@popmelt.com> (https://popmelt.com)",
@@ -24,30 +24,9 @@
24
24
  "popmelt": "dist/cli.mjs"
25
25
  },
26
26
  "sideEffects": false,
27
- "packageManager": "pnpm@9.12.0",
28
27
  "engines": {
29
28
  "node": ">=18.0.0"
30
29
  },
31
- "scripts": {
32
- "build": "tsup",
33
- "clean": "git clean -xdf .turbo node_modules dist",
34
- "format": "prettier --check \"**/*.{ts,tsx}\"",
35
- "lint": "eslint . && node scripts/check-eslint-suppressions.mjs",
36
- "pack:smoke": "node scripts/pack-smoke.mjs",
37
- "peer:smoke": "node scripts/peer-compat-smoke.mjs",
38
- "vue:smoke": "pnpm run build && node scripts/vue-install-smoke.mjs",
39
- "nuxt:smoke": "pnpm run build && node scripts/nuxt-install-smoke.mjs",
40
- "astro:smoke": "pnpm run build && node scripts/framework-install-smoke.mjs astro",
41
- "svelte:smoke": "pnpm run build && node scripts/framework-install-smoke.mjs svelte && node scripts/framework-install-smoke.mjs sveltekit",
42
- "prepublishOnly": "pnpm run verify",
43
- "test": "vitest run",
44
- "test:coverage": "vitest run --coverage.enabled",
45
- "test:browser": "pnpm run build && tsc --noEmit -p tsconfig.browser.json && vitest run --config vitest.browser.config.ts",
46
- "test:browser:mutation": "node e2e/check-lifecycle-mutation.mjs",
47
- "test:watch": "vitest",
48
- "typecheck": "tsc --noEmit --incremental false",
49
- "verify": "pnpm run typecheck && pnpm run format && pnpm run lint && pnpm run test:coverage && pnpm run build && pnpm run pack:smoke"
50
- },
51
30
  "exports": {
52
31
  ".": {
53
32
  "types": "./dist/index.d.mts",
@@ -153,7 +132,6 @@
153
132
  },
154
133
  "devDependencies": {
155
134
  "nuxt": "4.6.3",
156
- "@kit/eslint-config": "workspace:^",
157
135
  "@react-three/fiber": "9.7.0",
158
136
  "@tanstack/react-router": "1.120.5",
159
137
  "@types/react": "19.1.0",
@@ -177,14 +155,26 @@
177
155
  "vite": "7.3.7",
178
156
  "vitest": "4.1.12",
179
157
  "vue": "3.5.44",
180
- "vue-router": "5.3.1"
158
+ "vue-router": "5.3.1",
159
+ "@kit/eslint-config": "^0.2.0"
181
160
  },
182
- "pnpm": {
183
- "overrides": {
184
- "postcss@<8.5.23": "8.5.23",
185
- "source-map-js@<1.2.2": "1.2.2",
186
- "esbuild@<0.28.1": "0.28.1",
187
- "sharp@<0.35.5": "0.35.5"
188
- }
161
+ "scripts": {
162
+ "build": "tsup",
163
+ "clean": "git clean -xdf .turbo node_modules dist",
164
+ "format": "prettier --check \"**/*.{ts,tsx}\"",
165
+ "lint": "eslint . && node scripts/check-eslint-suppressions.mjs",
166
+ "pack:smoke": "node scripts/pack-smoke.mjs",
167
+ "peer:smoke": "node scripts/peer-compat-smoke.mjs",
168
+ "vue:smoke": "pnpm run build && node scripts/vue-install-smoke.mjs",
169
+ "nuxt:smoke": "pnpm run build && node scripts/nuxt-install-smoke.mjs",
170
+ "astro:smoke": "pnpm run build && node scripts/framework-install-smoke.mjs astro",
171
+ "svelte:smoke": "pnpm run build && node scripts/framework-install-smoke.mjs svelte && node scripts/framework-install-smoke.mjs sveltekit",
172
+ "test": "vitest run",
173
+ "test:coverage": "vitest run --coverage.enabled",
174
+ "test:browser": "pnpm run build && tsc --noEmit -p tsconfig.browser.json && vitest run --config vitest.browser.config.ts",
175
+ "test:browser:mutation": "node e2e/check-lifecycle-mutation.mjs",
176
+ "test:watch": "vitest",
177
+ "typecheck": "tsc --noEmit --incremental false",
178
+ "verify": "pnpm run typecheck && pnpm run format && pnpm run lint && pnpm run test:coverage && pnpm run build && pnpm run pack:smoke"
189
179
  }
190
- }
180
+ }
@@ -1,2 +0,0 @@
1
- "use client";
2
- import{b as m,a as i}from"./chunk-YYK7MXEK.mjs";import"./chunk-ERUGF5VG.mjs";import"./chunk-JQHZFDY5.mjs";import"./chunk-EX63NVDN.mjs";import"./chunk-N2ZEZCHO.mjs";import"./chunk-J3UIBBU2.mjs";import"./chunk-3LBOX7HQ.mjs";import"./chunk-3DUSECUJ.mjs";import"./chunk-OYJINEC5.mjs";import"./chunk-MP7S5ALD.mjs";import"./chunk-XTOCFTVW.mjs";import"./chunk-LVEMYZOA.mjs";import"./chunk-XOGBFVWI.mjs";import"./chunk-HGW2U6PD.mjs";import{createElement as p}from"react";import{createRoot as e}from"react-dom/client";function n(o,t){let r=e(o);return r.render(p(m,t)),()=>{r.unmount(),i()}}export{n as mountBrowserRuntime};