@popmelt.com/core 0.29.0 → 0.30.1

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 (48) hide show
  1. package/README.md +46 -32
  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-XGBQEJLU.mjs +139 -0
  7. package/dist/{PopmeltTasteConnectedPane-A7QLXPE4.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/browser-runtime-7324UU2Y.mjs +2 -0
  12. package/dist/browser.mjs +1 -1
  13. package/dist/canvas-chat-note-7HSL7MH6.mjs +2 -0
  14. package/dist/chunk-2RRYBN2J.mjs +17 -0
  15. package/dist/chunk-3JJP637I.mjs +307 -0
  16. package/dist/chunk-4V7SK3M6.mjs +3 -0
  17. package/dist/{chunk-XZ6MNKUQ.mjs → chunk-5IEPFMP7.mjs} +23 -23
  18. package/dist/chunk-CPOYMGYY.mjs +2 -0
  19. package/dist/chunk-CWX3XV2M.mjs +2 -0
  20. package/dist/chunk-CXTR5UHL.mjs +342 -0
  21. package/dist/{chunk-MBBS4FJH.mjs → chunk-ENGMQINZ.mjs} +1 -1
  22. package/dist/chunk-GHBFZOHT.mjs +2 -0
  23. package/dist/{chunk-5VILWL5E.mjs → chunk-HTHUSDZT.mjs} +1 -1
  24. package/dist/chunk-MZNY6VXR.mjs +2 -0
  25. package/dist/chunk-PCP5ENOU.mjs +315 -0
  26. package/dist/{chunk-GIJABDSK.mjs → chunk-VNSLQY5N.mjs} +1 -1
  27. package/dist/cli.mjs +34 -340
  28. package/dist/codex-note-context-EKARSPXV.mjs +2 -0
  29. package/dist/codex-project-JDNFTUP7.mjs +2 -0
  30. package/dist/codex-session-registry-25DAA2KO.mjs +2 -0
  31. package/dist/index.mjs +1 -1
  32. package/dist/memory-store.d.mts +1 -1
  33. package/dist/peer-client-CVBTNOO5.mjs +2 -0
  34. package/dist/plugin-astro.mjs +1 -1
  35. package/dist/plugin-nuxt.mjs +1 -1
  36. package/dist/plugin-vite.mjs +1 -1
  37. package/dist/server.d.mts +2 -2
  38. package/dist/server.mjs +5 -5
  39. package/dist/{types-BethD1Ix.d.mts → types-C8tjyhiF.d.mts} +19 -0
  40. package/package.json +22 -32
  41. package/dist/ParticipantRuntime-ITMSYN4F.mjs +0 -139
  42. package/dist/ThreadErrorCard-MHFJXR4W.mjs +0 -2
  43. package/dist/browser-runtime-4IAKTM6S.mjs +0 -2
  44. package/dist/chunk-BZFM6VPZ.mjs +0 -303
  45. package/dist/chunk-MFNS5MBM.mjs +0 -2
  46. package/dist/chunk-QRVEMJ4U.mjs +0 -367
  47. package/dist/chunk-VLFWNZFS.mjs +0 -17
  48. /package/dist/{chunk-J4YWKBXJ.mjs → chunk-42LISDBE.mjs} +0 -0
@@ -0,0 +1,3 @@
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};