@popmelt.com/core 0.31.2 → 0.32.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 (45) hide show
  1. package/README.md +43 -0
  2. package/claude-plugin/.claude-plugin/plugin.json +1 -1
  3. package/codex-plugin/.codex-plugin/plugin.json +1 -1
  4. package/dist/{ParticipantRuntime-BGVZAWZH.mjs → ParticipantRuntime-5K4XILTY.mjs} +1 -1
  5. package/dist/SuppliedContext-NURVPZ4L.mjs +2 -0
  6. package/dist/ThreadErrorCard-WZ2UBVWE.mjs +2 -0
  7. package/dist/bridge-entry.mjs +1 -1
  8. package/dist/{browser-runtime-VSD5R2HG.mjs → browser-runtime-UVEA7O7K.mjs} +1 -1
  9. package/dist/browser.d.mts +2 -2
  10. package/dist/browser.mjs +1 -1
  11. package/dist/canvas-chat-note-NHYL3T6J.mjs +2 -0
  12. package/dist/{chunk-SQA3PHME.mjs → chunk-67CZ5WTY.mjs} +89 -87
  13. package/dist/chunk-AEOT7B5I.mjs +2 -0
  14. package/dist/{chunk-JU7D4I76.mjs → chunk-C3VWS5R6.mjs} +2 -2
  15. package/dist/{chunk-Q5QRV4KJ.mjs → chunk-EUWNUQGJ.mjs} +1 -1
  16. package/dist/chunk-GTQSZVCQ.mjs +334 -0
  17. package/dist/chunk-IKCHOC3U.mjs +3 -0
  18. package/dist/{chunk-QLN5IYRL.mjs → chunk-KHQZYGU3.mjs} +94 -92
  19. package/dist/{chunk-2TFOULRG.mjs → chunk-UGGB6HDI.mjs} +1 -1
  20. package/dist/chunk-VMQD7UGC.mjs +2 -0
  21. package/dist/cli.mjs +8 -8
  22. package/dist/codex-note-context-VSQVT5ZL.mjs +2 -0
  23. package/dist/codex-project-MKH6TO5W.mjs +2 -0
  24. package/dist/codex-session-registry-SPRWY2WW.mjs +2 -0
  25. package/dist/{focus-inspection-WPHGCN6Y.mjs → focus-inspection-G72JLJYG.mjs} +1 -1
  26. package/dist/index.d.mts +2 -2
  27. package/dist/index.mjs +1 -1
  28. package/dist/{participantBootstrap-B0lvfCwM.d.mts → participantBootstrap-ClKpD2qC.d.mts} +14 -1
  29. package/dist/peer-client-FJGBXESA.mjs +2 -0
  30. package/dist/plugin-astro.mjs +1 -1
  31. package/dist/plugin-nuxt.mjs +1 -1
  32. package/dist/plugin-vite.mjs +1 -1
  33. package/dist/server.mjs +1 -1
  34. package/package.json +23 -32
  35. package/dist/ThreadErrorCard-5ADUBZKJ.mjs +0 -2
  36. package/dist/canvas-chat-note-7HSL7MH6.mjs +0 -2
  37. package/dist/chunk-4V7SK3M6.mjs +0 -3
  38. package/dist/chunk-7VW2KD6D.mjs +0 -2
  39. package/dist/chunk-QENHLODE.mjs +0 -327
  40. package/dist/chunk-UZUYF4D5.mjs +0 -2
  41. package/dist/codex-note-context-SGNCDBK4.mjs +0 -2
  42. package/dist/codex-project-PA5DEEPH.mjs +0 -2
  43. package/dist/codex-session-registry-25DAA2KO.mjs +0 -2
  44. package/dist/peer-client-BEU2VKYY.mjs +0 -2
  45. /package/dist/{chunk-J5HW2SCX.mjs → chunk-4JG6IVUU.mjs} +0 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@popmelt.com/core",
3
- "version": "0.31.2",
3
+ "version": "0.32.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",
@@ -123,6 +102,7 @@
123
102
  ],
124
103
  "dependencies": {
125
104
  "modern-screenshot": "4.7.0",
105
+ "parse5": "7.3.0",
126
106
  "ws": "8.21.3"
127
107
  },
128
108
  "optionalDependencies": {
@@ -153,7 +133,6 @@
153
133
  },
154
134
  "devDependencies": {
155
135
  "nuxt": "4.6.3",
156
- "@kit/eslint-config": "workspace:^",
157
136
  "@react-three/fiber": "9.7.0",
158
137
  "@tanstack/react-router": "1.120.5",
159
138
  "@types/react": "19.1.0",
@@ -177,14 +156,26 @@
177
156
  "vite": "7.3.7",
178
157
  "vitest": "4.1.12",
179
158
  "vue": "3.5.44",
180
- "vue-router": "5.3.1"
159
+ "vue-router": "5.3.1",
160
+ "@kit/eslint-config": "^0.2.0"
181
161
  },
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
- }
162
+ "scripts": {
163
+ "build": "tsup",
164
+ "clean": "git clean -xdf .turbo node_modules dist",
165
+ "format": "prettier --check \"**/*.{ts,tsx}\"",
166
+ "lint": "eslint . && node scripts/check-eslint-suppressions.mjs",
167
+ "pack:smoke": "node scripts/pack-smoke.mjs",
168
+ "peer:smoke": "node scripts/peer-compat-smoke.mjs",
169
+ "vue:smoke": "pnpm run build && node scripts/vue-install-smoke.mjs",
170
+ "nuxt:smoke": "pnpm run build && node scripts/nuxt-install-smoke.mjs",
171
+ "astro:smoke": "pnpm run build && node scripts/framework-install-smoke.mjs astro",
172
+ "svelte:smoke": "pnpm run build && node scripts/framework-install-smoke.mjs svelte && node scripts/framework-install-smoke.mjs sveltekit",
173
+ "test": "vitest run",
174
+ "test:coverage": "vitest run --coverage.enabled",
175
+ "test:browser": "pnpm run build && tsc --noEmit -p tsconfig.browser.json && vitest run --config vitest.browser.config.ts",
176
+ "test:browser:mutation": "node e2e/check-lifecycle-mutation.mjs",
177
+ "test:watch": "vitest",
178
+ "typecheck": "tsc --noEmit --incremental false",
179
+ "verify": "pnpm run typecheck && pnpm run format && pnpm run lint && pnpm run test:coverage && pnpm run build && pnpm run pack:smoke"
189
180
  }
190
- }
181
+ }
@@ -1,2 +0,0 @@
1
- "use client";
2
- import{a as k}from"./chunk-2P2NUZW7.mjs";import{i as $}from"./chunk-D32YV5O6.mjs";import"./chunk-V44RIEET.mjs";import{b as j}from"./chunk-CPOYMGYY.mjs";import"./chunk-6VXFTT5U.mjs";import{useState as S,useRef as w,useEffect as x,useCallback as z}from"react";import{ArrowUpRight as O,Copy as U}from"lucide-react";import{jsx as o,jsxs as l,Fragment as C}from"react/jsx-runtime";function E({provider:r,bridgeUrl:c}){let[e,i]=S("idle"),[s,t]=S(!1),d=w(!0),g=w(!1),u=r==="codex"?"Codex":"Claude",h=r==="codex"?"codex login":"claude auth login",y=`${c}/provider-login/${r}`;x(()=>(d.current=!0,()=>{d.current=!1}),[]);let m=z(async n=>{let a=await j(y,{method:n,cache:"no-store",signal:AbortSignal.timeout(1e4),...n==="POST"?{headers:{"Content-Type":"application/json"},body:"{}"}:{}});if(!a.ok)throw new Error("Sign-in unavailable");let p=await a.json();return["pending","complete","failed","manual"].includes(p.state)?p.state:"failed"},[y]);x(()=>{if(e!=="pending")return;let n=!1,a,p=Date.now()+10*6e4;async function v(){try{let f=await m("GET");if(n)return;f!=="pending"||Date.now()>=p?i(f==="pending"?"failed":f):a=setTimeout(()=>{v()},1500)}catch{n||i("failed")}}return a=setTimeout(()=>{v()},1500),()=>{n=!0,clearTimeout(a)}},[e,m]);async function T(){if(!g.current){g.current=!0,i("opening");try{let n=await m("POST");d.current&&i(n)}catch{d.current&&i("failed")}finally{g.current=!1}}}let b={...$("dark"),display:"inline-flex",alignItems:"center",gap:8,font:"inherit",fontWeight:400,color:"var(--popmelt-thread-primary)",background:"var(--popmelt-thread-control)",cursor:"pointer"};return o("span",{"data-provider-sign-in":r,children:e==="complete"?l("span",{role:"status",children:["Signed in to ",u,". Send your reply to continue."]}):l(C,{children:[l("button",{type:"button",style:b,disabled:e==="opening"||e==="pending",onClick:()=>{T()},children:[e==="opening"?"Opening\u2026":e==="pending"?`Signing in to ${u}\u2026`:`Sign in to ${u}`,o(O,{size:14,"aria-hidden":"true"})]}),o("span",{role:"status",children:e==="pending"?" Complete sign-in in the terminal window, then return here.":e==="manual"?" Open your terminal and paste the login command.":e==="failed"?" Sign-in did not finish. Try again, or use your terminal.":" to continue."}),(e==="manual"||e==="failed")&&l("button",{type:"button",style:{...b,marginLeft:6},onClick:()=>{navigator.clipboard.writeText(h).then(()=>t(!0)).catch(()=>t(!1))},"aria-label":`Copy ${u} login command`,children:[s?"Copied":h,o(U,{size:14,"aria-hidden":"true"})]})]})})}function P({message:{error:r,errorKind:c,provider:e},bridgeUrl:i,canSignIn:s}){let t=r?k(r,c):null;return o("div",{style:{backgroundColor:"var(--popmelt-thread-soft)",border:"1px solid var(--popmelt-thread-border)",borderRadius:24,color:"var(--popmelt-thread-muted-strong)",fontSize:14,letterSpacing:"0.14px",lineHeight:1.35,padding:16},children:s&&t?.kind==="authentication"&&(e==="codex"||e==="claude")?o(E,{provider:e,bridgeUrl:i}):l(C,{children:[o("span",{style:{color:t?"#f59e0b":"var(--popmelt-thread-muted-strong)"},children:t?.label??"Cancelled"}),t?` \u2014 ${t.message}`:""]})})}export{P as default};
@@ -1,2 +0,0 @@
1
- "use client";
2
- import{b as y}from"./chunk-CPOYMGYY.mjs";import"./chunk-6VXFTT5U.mjs";async function f(s,d,l,r,c,m){let n=r[1].toLowerCase()==="claude"?"Claude":"Codex";if(!c)throw new Error("Only the host can send a chat note.");if(m)throw new Error("Send a text-only note.");let a=l.find(o=>o.provider===n&&o.linked);if(!a)throw new Error("Send a note to this thread from "+n+" first so your reply reaches the right chat.");let p=await crypto.subtle.digest("SHA-256",new TextEncoder().encode(r[2])),w=Array.from(new Uint8Array(p),o=>o.toString(16).padStart(2,"0")).join(""),e=JSON.stringify(["popmelt-note",s,d,a.id,w]),i=sessionStorage.getItem(e)??crypto.randomUUID();sessionStorage.setItem(e,i);let h=await y(`${s}/participants/send-to-${n.toLowerCase()}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({threadId:d,text:r[2],requestId:i,linkId:a.id})}),t=await h.json();if(!h.ok||!(t.queuedInChat||t.availableInChat))throw new Error(t.error??"The bridge did not confirm delivery.");return sessionStorage.getItem(e)===i&&sessionStorage.removeItem(e),{jobId:t.jobId}}export{f as sendCanvasChatNote};
@@ -1,3 +0,0 @@
1
- #!/usr/bin/env node
2
- import{createHash as f}from"crypto";import{mkdir as y,readFile as x,writeFile as S}from"fs/promises";import{tmpdir as m}from"os";import{join as a}from"path";function O(t,o,e){let n=new Map(t.candidates.map(r=>[r.storeId,r])),s=n.get(o);if(!s)return null;let d=[...new Set(e)].filter(r=>r!==o);return d.some(r=>!n.has(r))?null:{primary:s,mountedStores:d.map(r=>{let i=n.get(r);return{storeId:i.storeId,projectRoot:i.root,projectId:i.projectId}})}}function c(){return process.env.POPMELT_CODEX_SESSION_DIR||a(m(),"popmelt-core","codex-sessions")}function p(t){let o=f("sha256").update(t).digest("hex");return a(c(),`${o}.json`)}function I(t){if(!t||typeof t!="object"||Array.isArray(t))return!1;let o=t;return typeof o.storeId=="string"&&!!o.storeId&&typeof o.projectRoot=="string"&&!!o.projectRoot&&typeof o.projectId=="string"&&!!o.projectId}function C(t){if(!t||typeof t!="object"||Array.isArray(t))return!1;let o=t;return typeof o.root=="string"&&!!o.root&&typeof o.storeId=="string"&&!!o.storeId&&typeof o.projectId=="string"&&!!o.projectId&&typeof o.reason=="string"&&Array.isArray(o.reasons)&&o.reasons.every(e=>typeof e=="string")&&typeof o.initialized=="boolean"}function j(t){if(typeof t.sessionId!="string"||!t.sessionId||typeof t.projectRoot!="string"||!t.projectRoot||typeof t.projectId!="string"||!t.projectId||!Number.isInteger(t.bridgePort)||typeof t.updatedAt!="string"||Number.isNaN(Date.parse(t.updatedAt)))return null;let o=Array.isArray(t.mountedStores)?t.mountedStores.filter(I):[],e=t.orientation==="automatic"||t.orientation==="explicit"||t.orientation==="workspace_default"?t.orientation:"legacy";return{version:2,status:"active",sessionId:t.sessionId,storeId:typeof t.storeId=="string"&&t.storeId?t.storeId:`store-${t.projectId}`,projectRoot:t.projectRoot,projectId:t.projectId,bridgePort:t.bridgePort,mountedStores:o,orientation:e,updatedAt:t.updatedAt}}function l(t){if(!t||typeof t!="object"||Array.isArray(t))return null;let o=t;return o.status==="orientation_required"?o.version!==2||typeof o.sessionId!="string"||!o.sessionId||typeof o.cwd!="string"||!o.cwd||!Array.isArray(o.candidates)||!o.candidates.every(C)||typeof o.updatedAt!="string"||Number.isNaN(Date.parse(o.updatedAt))?null:o:j(o)}async function u(t){let o=c();await y(o,{recursive:!0,mode:448}),await S(p(t.sessionId),`${JSON.stringify(t,null,2)}
3
- `,{encoding:"utf8",mode:384})}async function b(t){await u(t)}async function B(t){await u(t)}async function g(t){try{let o=JSON.parse(await x(p(t),"utf8")),e=l(o);return e?.sessionId===t?e:null}catch{return null}}async function N(t){let o=await g(t);return o?.status==="active"?o:null}async function k(t){let o=await g(t);return o?.status==="orientation_required"?o:null}export{O as a,b,B as c,g as d,N as e,k as f};
@@ -1,2 +0,0 @@
1
- #!/usr/bin/env node
2
- import{A as l,d as b,l as I,m as w,y as k}from"./chunk-QLN5IYRL.mjs";import{readFile as h,realpath as P,mkdir as x,writeFile as E}from"fs/promises";import{createHash as S}from"crypto";import{join as m,resolve as O}from"path";function N(t,e){let r=S("sha256").update(e).digest("hex");return m(t,".popmelt","participant-agents",r+".json")}async function M(t,e){if(e.storeId!==t.storeId)return{ok:!1,body:{status:"writable_store_required"}};if(typeof e.threadId!="string"||!e.threadId||typeof e.text!="string"||!e.text.trim()||e.text.length>8e3)return{ok:!1,body:{status:"invalid_note"}};let r;try{r=await v(t,t.sessionId,!0)}catch(a){if(a.code!=="ENOENT")throw a;return{ok:!1,body:{status:"participant_invitation_required"}}}if(!r)return{ok:!1,body:{status:"enrolled_bridge_required"}};let o=await l(r.endpoint,"/participants/thread-note",{...r.request,method:"POST",signal:AbortSignal.timeout(3e4),body:JSON.stringify({storeId:t.storeId,threadId:e.threadId,reply:e.text,sessionId:t.sessionId,requestId:e.requestId})});return{ok:o.response.ok,body:o.body}}async function v(t,e,r=!1){let o=await h(m(t.projectRoot,".popmelt","participant-bridge.json"),"utf8").then(JSON.parse).catch(c=>{if(c.code!=="ENOENT"||!t.bridgePort)throw c;return{projectId:t.projectId,port:t.bridgePort}});if(o.projectId!==t.projectId||!Number.isInteger(o.port)||o.port<1||o.port>65535)return null;let a={redirect:"error",signal:AbortSignal.timeout(3e3)},p=await l(o,"/status",a);if(!p.response.ok||p.body?.projectId!==t.projectId)return null;let i=N(t.projectRoot,e),n;try{n=JSON.parse(await h(i,"utf8"))}catch(c){if(c.code!=="ENOENT"||!r)throw c;let d=await P(t.projectRoot),u=b(e);if(w(d)!==t.projectId||!u)return null;let s=JSON.parse(await h(m(d,".popmelt","participant-host.json"),"utf8"));if(!(await l(o,"/participants/agent-join",{...a,method:"POST",headers:{"X-Popmelt-Participant-Id":s.participantId,"X-Popmelt-Participant-Token":s.token},body:JSON.stringify({sessionId:e,name:u,headless:!0})})).response.ok)return null;n=JSON.parse(await h(i,"utf8"))}return{endpoint:o,request:{...a,headers:{"X-Popmelt-Participant-Id":n.participantId,"X-Popmelt-Participant-Token":n.token}}}}async function F(t,e,r){let o=[t,...t.mountedStores].find(c=>c.storeId===e.storeId);if(!o||r&&o!==t)return{ok:!1,body:{status:"store_unavailable"}};if(r&&(typeof e.threadId!="string"||!e.threadId))return{ok:!1,body:{status:"thread_required"}};let a=await v(o,t.sessionId,r).catch(c=>{if(c.code==="ENOENT")return null;throw c});if(!a)return{ok:!1,body:{status:"enrolled_bridge_required",message:"Join this project as a Popmelt peer and check that its bridge is running."}};let{endpoint:p,request:i}=a,n=await l(p,r?t.sessionId.startsWith("claude:")?"/participants/link-claude-chat":"/participants/link-codex-chat":"/participants/check-claude-notes",{...i,method:"POST",body:JSON.stringify({sessionId:t.sessionId,...r?{threadId:e.threadId}:{}})});return{ok:n.response.ok,body:n.body}}async function _(t,e,r){if(!r.projectRoot)throw new Error("Participant connections require the active project root");let o=await P(r.projectRoot);if(w(o)!==t.projectId)throw new Error("Participant project does not match");let a=m(o,".popmelt"),p=S("sha256").update(e).digest("hex"),i=async(s,f,g)=>{let j=await l(t,"/participants/"+s,{method:"POST",redirect:"error",headers:{"X-Popmelt-Participant-Id":f.participantId,"X-Popmelt-Participant-Token":f.token},body:JSON.stringify(g),signal:AbortSignal.timeout(9e4)}),y=j.body;if(!j.response.ok||y.error)throw new Error(y.error??"Participant connection unavailable");return y},n,c;try{n=JSON.parse(await h(N(o,e),"utf8"))}catch(s){if(s.code!=="ENOENT")throw s;if(!r.name)return{status:"participant_invitation_required"};let f=JSON.parse(await h(m(a,"participant-host.json"),"utf8")),g=await i("agent-join",f,{sessionId:e,name:r.name});n=g.credential,c=g.participant}if(!r.action){let s=await i("agent-connect",n,{});return{status:"participant_connected",participantId:n.participantId,participant:s.participant??c}}let d=await i("agent-act",n,{action:I(r.action)}),u=d.evidence;if(u?.frame?.image){let s=u.frame.image;if(!/^data:image\/jpeg;base64,[A-Za-z0-9+/=]+$/.test(s)||s.length>7e5)throw new Error("Invalid participant preview");let f=m(a,"artifacts","participant-previews");await x(f,{recursive:!0,mode:448});let g=m(f,p+".jpg");return await E(g,Buffer.from(s.slice(s.indexOf(",")+1),"base64"),{mode:384}),{status:"participant_connected",participant:d.participant,evidence:{...u,frame:{imagePath:g,targets:u.frame.targets}}}}return{status:"participant_connected",participant:d.participant,evidence:d.evidence}}async function C(t,e,r={}){if(k())return{status:"already_managed_by_bridge"};if((await l(t,"/status",{redirect:"error",signal:AbortSignal.timeout(3e3)})).body?.participantSessions)return _(t,e,r);let a=async(c,d)=>{let u=await l(t,`/peers/${c}`,{method:"POST",body:JSON.stringify(d),signal:AbortSignal.timeout(5e4)}),s=u.body;if(!u.response.ok||s?.error)throw new Error(s?.error??"Peer connection unavailable");return s},p=await a("join",{sessionId:e,name:r.name}),i=r.action?await a("act",{token:p.token,clientId:r.clientId,action:I(r.action)}):p,n=i.peer;return{...i.status?{status:i.status}:{},...n?{peer:{...n,state:n.state?{annotations:n.state.annotations,styleModifications:n.state.styleModifications,textModifications:n.state.textModifications,undoDepth:n.state.undoStack.length,redoDepth:n.state.redoStack.length}:null}}:{},...i.evidence?{evidence:i.evidence}:{},clients:p.clients}}async function D(t){let e=c=>{let d=t.indexOf(c);return d>=0?t[d+1]:void 0},r=e("--session");if(!r)throw new Error("Usage: popmelt peer --session <stable-agent-session> [--project-root <active-project>] [--name <your-name>] [--client <canvas-id>] [--action <JSON>]");let o=await P(O(e("--project-root")??process.cwd())),a=JSON.parse(await h(m(o,".popmelt","bridge.lock"),"utf8")),p=w(o),i=await l({port:a.port,projectId:p},"/status",{signal:AbortSignal.timeout(3e3)});if(!i.response.ok||i.body.projectRoot!==o&&!(i.body.participantSessions&&i.body.projectId===p))throw new Error("No matching running project bridge");let n=e("--action");console.log(JSON.stringify(await C({port:a.port,projectId:p},r,{name:e("--name"),projectRoot:o,clientId:e("--client"),action:n?JSON.parse(n):void 0}),null,2))}export{N as a,M as b,v as c,F as d,C as e,D as f};