pi-webapp 0.1.32 → 0.1.34-alpha.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.
- package/dist/extension.js +21 -21
- package/dist/hosted-recovery.js +3 -3
- package/dist/hosted-worker.js +2 -2
- package/package.json +2 -2
- package/web/dist/.vite/manifest.json +23 -23
- package/web/dist/assets/{app-CkT84si6.js → app-BasYjacK.js} +84 -84
- package/web/dist/assets/app.css +1 -1
- package/web/dist/assets/app.js +4 -4
- package/web/dist/assets/{graphql-Bu7dAtew.js → graphql-fvWfXapV.js} +1 -1
- package/web/dist/assets/{http-BtEaP0_p.js → http-DILRzPNj.js} +1 -1
- package/web/dist/assets/{php-mDUeg8is.js → php-dwgf7iSP.js} +1 -1
- package/web/dist/assets/{plugin-BNln-AV2.js → plugin-DYG70fLw.js} +1 -1
- package/web/dist/assets/{plugin-DO3fYZIM.js → plugin-DZH6Y1Po.js} +1 -1
- package/web/dist/assets/{plugin-BR-ExlfJ.js → plugin-jOGP3DFo.js} +1 -1
- package/web/dist/assets/{rst-D36AriVO.js → rst-DWsp_lUt.js} +1 -1
- package/web/dist/assets/{ruby-DfvZI7yF.js → ruby-YwiQnP0D.js} +1 -1
- package/web/dist/assets/{svelte-Bbeskamu.js → svelte-UmsPgpWI.js} +1 -1
- package/web/dist/assets/{vue-_U3Asls5.js → vue-BVcY7UAb.js} +1 -1
package/dist/hosted-recovery.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
(function(){try{var r=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},e=new r.Error().stack;e&&(r._sentryDebugIds=r._sentryDebugIds||{},r._sentryDebugIds[e]="09680f36-9ad0-4c70-932c-9b22c5b09fdf",r._sentryDebugIdIdentifier="sentry-dbid-09680f36-9ad0-4c70-932c-9b22c5b09fdf")}catch{}})();import{resolve as Se}from"node:path";import{lstat as Z,readdir as _e,rename as ee}from"node:fs/promises";import{join as k}from"node:path";import{createHash as se}from"node:crypto";var o=class extends Error{code;status;reason;constructor(e,t,n={}){super(t),this.name="HostedPluginError",this.code=e,this.status=n.status,this.reason=n.reason}};var L=r=>r.code==="ENOENT";var qe={files:4096,total:128*1024*1024,js:16*1024*1024,css:4*1024*1024,font:8*1024*1024,other:2*1024*1024};var h=r=>se("sha256").update(r).digest("hex");import{constants as M}from"node:fs";import{lstat as ae,mkdir as ce,open as q,rename as le,unlink as z}from"node:fs/promises";import{dirname as fe,join as de}from"node:path";import{randomUUID as ue}from"node:crypto";import{setTimeout as pe}from"node:timers/promises";async function S(r){await ce(r,{recursive:!0,mode:448});let e=await ae(r);if(!e.isDirectory()||e.isSymbolicLink())throw new o("invalid_storage","Plugin storage must be a real directory")}async function w(r,e){let t;try{t=await q(r,M.O_RDONLY|M.O_NONBLOCK|(M.O_NOFOLLOW??0))}catch(n){if(L(n))return null;throw n}try{let n=await t.stat();if(!n.isFile()||n.nlink>1||n.size>e)throw new o("invalid_storage","Invalid storage record size or type");let s=Buffer.alloc(Math.min(n.size+1,e+1)),i=0;for(;i<s.length;){let a=await t.read(s,i,s.length-i,i);if(!a.bytesRead)break;i+=a.bytesRead}if(i>e||i!==n.size)throw new o("invalid_storage","Storage record changed during read");return s.subarray(0,i)}finally{await t.close()}}async function x(r,e=2*1024*1024){let t=await w(r,e);if(!t)return null;try{return JSON.parse(new TextDecoder("utf-8",{fatal:!0}).decode(t))}catch{throw new o("invalid_storage","Invalid JSON storage record; original bytes preserved")}}async function b(r){let e=await w(r,2097152);if(e===null)return null;let t;try{t=JSON.parse(new TextDecoder("utf-8",{fatal:!0}).decode(e))}catch{throw new o("gc_recovery_required",`Invalid journal ${r}; stop all owners and inspect original bytes`)}if(!t||typeof t!="object"||Array.isArray(t))throw new o("gc_recovery_required",`Invalid journal ${r}; original bytes preserved`);return t}async function m(r,e){let t=`${r}.${ue()}.tmp`,n=await q(t,"wx",384);try{try{await n.writeFile(JSON.stringify(e)),await n.sync()}finally{await n.close()}await le(t,r);let s;try{s=await q(fe(r),"r"),await s.sync()}catch(i){if(!["EINVAL","EPERM","EACCES","EISDIR","ENOTSUP","EBADF"].includes(i.code??""))throw i}finally{await s?.close()}}finally{await z(t).catch(()=>{})}}async function P(r,e,t=2e3){await S(r);let n=de(r,"transaction.lock"),s=Date.now()+t,i;for(;;)try{i=await q(n,"wx",384);break}catch(a){if(a.code!=="EEXIST")throw a;if(Date.now()>=s)throw new o("storage_busy","Plugin storage is locked; stop all writers before recovering an abandoned lock");await pe(10)}try{return await i.writeFile(JSON.stringify({pid:process.pid,createdAt:new Date().toISOString()})),await e()}finally{await i.close(),await z(n)}}import{lstat as C,mkdir as he,open as B,realpath as K,readdir as F,link as ge,rename as we,unlink as _,copyFile as me,rm as ye}from"node:fs/promises";import{dirname as ve,isAbsolute as V,join as d,relative as X,resolve as be,sep as J,win32 as ke}from"node:path";import{randomUUID as W}from"node:crypto";var j=192*1024*1024,A=512*1024,Q=r=>typeof r=="string"&&/^[a-f0-9-]{36}$/.test(r);function Ie(r){if(!r||typeof r!="object"||Array.isArray(r))throw new o("invalid_input","Expected object input");return r}function Y(r){if(typeof r!="string"||!/^[\w.-]{1,160}$/.test(r)||r==="."||r==="..")throw new o("invalid_input","Invalid state key");return r}function N(r){if(r&&(!Q(r.stateRef)||typeof r.version!="string"||!Number.isSafeInteger(r.generation)||r.generation<1||!Number.isSafeInteger(r.schema)||r.schema<1||typeof r.enabled!="boolean"||typeof r.operationId!="string"))throw new o("invalid_storage","Invalid active plugin record");return r}var H=class{root;pluginId;legacy;checkpoint;constructor(e,t,n,s){this.root=d(e,h(t)),this.pluginId=t,this.legacy=n,this.checkpoint=s}active(){return x(d(this.root,"active.json")).then(N)}async recover(){return P(this.root,async()=>{let e=await this.active(),t=await b(d(this.root,"transition.json"));if(!t)return{active:e,recovered:"none"};if(!t.next||!Object.hasOwn(t,"before")||Object.keys(t).some(a=>!["version","before","next"].includes(a))||Object.hasOwn(t,"version")&&t.version!==1)throw new o("invalid_storage","Invalid activation journal; stop all owners and inspect transition.json");N(t.next),N(t.before);let n=e?.operationId===t.next.operationId?"committed":"not_committed";if(!((a,c)=>a===null||c===null?a===c:["version","generation","stateRef","schema","enabled","operationId"].every(f=>a[f]===c[f]))(e,n==="committed"?t.next:t.before))throw new o("gc_recovery_required","Activation journal does not match the active pointer; original bytes preserved");let i=t.before;if(n==="committed"&&i&&i.stateRef!==e.stateRef&&await m(d(this.root,"previous.json"),i),n==="committed"){let a=await b(d(this.root,"fork.json"));a?.version===1&&a.stateRef===e.stateRef&&Object.keys(a).every(c=>["version","stateRef"].includes(c))&&await _(d(this.root,"fork.json"))}return await _(d(this.root,"transition.json")),{active:e,recovered:n}})}async activate(e,t){return P(this.root,async()=>{let n=await this.active();if((n?.generation??0)!==e)throw new o("stale_generation","Plugin activation changed concurrently");let s=await b(d(this.root,"fork.json"));if(s&&(s.version!==1||s.stateRef!==t.stateRef||Object.keys(s).some(a=>!["version","stateRef"].includes(a))))throw new o("gc_recovery_required","Activation refused: unresolved fork.json belongs to another target; stop all owners and inspect it");let i=N({...t,generation:e+1,operationId:W()});await S(d(this.root,"states")),await S(d(this.root,"states",i.stateRef)),await m(d(this.root,"transition.json"),{version:1,before:n,next:i}),await this.checkpoint?.("prepared");try{await m(d(this.root,"active.json"),i)}catch(a){if((await this.active())?.operationId!==i.operationId)throw a}await this.checkpoint?.("committed");try{n&&n.stateRef!==i.stateRef&&await m(d(this.root,"previous.json"),n),await _(d(this.root,"transition.json")),await _(d(this.root,"fork.json")).catch(()=>{})}catch{}return await this.checkpoint?.("cleaned"),i})}async forkState(e){return P(this.root,async()=>{let t=await this.assertGeneration(e,!1),n=W(),s=d(this.root,"states",n);if(await b(d(this.root,"fork.json")))throw new o("gc_recovery_required","Unresolved fork.json; stop all owners and inspect the reserved state before retrying");await m(d(this.root,"fork.json"),{version:1,stateRef:n}),await S(s);let i=d(this.root,"states",t.stateRef);for(let a of await F(i)){if(!/^[a-f0-9]{64}\.json$/.test(a))throw new o("invalid_storage","Unexpected state file");if(!await w(d(i,a),j))throw new o("invalid_storage","Missing state file");await me(d(i,a),d(s,a))}return await this.checkpoint?.("forked"),n})}async collect(e){return P(this.root,async()=>{for(let l of["transition.json","fork.json"])if(await w(d(this.root,l),2*1024*1024))throw new o("gc_recovery_required",`GC refused: unresolved ${l}; stop all owners and inspect recovery references`);let t=await this.active(),n=N(await b(d(this.root,"previous.json")));if(!t&&await w(d(this.root,"active.json"),2*1024*1024))throw new o("gc_recovery_required","GC refused: null active pointer; restore activation metadata before cleanup");let s=[t,n].filter(l=>!!l),i=d(this.root,"states");await S(i);let a=await F(i),c=new Set(s.map(l=>l.stateRef));for(let l of a){if(!Q(l))throw new o("gc_recovery_required","GC refused: unexpected state directory; inspect states before cleanup");let u=d(i,l),p=await C(u);if(!p.isDirectory()||p.isSymbolicLink())throw new o("gc_recovery_required","GC refused: linked/non-directory state snapshot");for(let g of await F(u)){let y=await C(d(u,g));if(!/^[a-f0-9]{64}\.json$/.test(g)||!y.isFile()||y.isSymbolicLink()||y.nlink!==1)throw new o("gc_recovery_required","GC refused: unexpected snapshot content; original bytes preserved");if(!c.has(l)){let v=await x(d(u,g),j);if(!v)throw new o("gc_recovery_required","GC refused: missing snapshot record");if(Object.hasOwn(v,"committed")){let I=v;if(Object.keys(I).some($=>!["requestId","inputHash","nextHash","committed"].includes($))||I.committed!==!0||!/^[a-f0-9]{64}$/.test(I.inputHash)||!/^[a-f0-9]{64}$/.test(I.nextHash)||typeof I.requestId!="string")throw new o("gc_recovery_required",`GC refused: unresolved file intent in states/${l}; reconcile the workspace save before cleanup`)}else{if(Object.keys(v).some(I=>!["revision","schema","value","requestId","inputHash"].includes(I)))throw new o("gc_recovery_required","GC refused: unknown snapshot envelope; original bytes preserved");this.validateState(v)}}}}for(let l of c)if(!a.includes(l))throw new o("gc_recovery_required","GC refused: referenced snapshot is missing; restore recovery data first");let f=await e(s);for(let l of a)c.has(l)||await ye(d(i,l),{recursive:!0,force:!0});return f})}async assertGeneration(e,t=!0){let n=await this.active();if(!n||n.generation!==e||t&&!n.enabled)throw new o("stale_generation","Plugin generation is no longer active");return n}scopeKey(e){if(!e.scope||typeof e.scope.cwd!="string"||!e.scope.cwd||typeof e.scope.sessionId!="string"||!e.scope.sessionId||typeof e.scope.workspaceId!="string"||!e.scope.workspaceId)throw new o("invalid_scope","Missing authenticated plugin scope");return JSON.stringify([e.scope.workspaceId,e.scope.cwd,e.scope.sessionId])}statePath(e,t,n){return d(this.root,"states",e.stateRef,`${h(this.scopeKey(t)+":state:"+n)}.json`)}async call(e,t,n){if(!Number.isSafeInteger(e.generation)||!/^[\w-]{1,160}$/.test(e.requestId))throw new o("invalid_lease","Invalid invocation lease");this.scopeKey(e);let s=Ie(n);return P(this.root,async()=>{let i=await this.assertGeneration(e.generation);switch(t){case"state.read":{let a=await x(this.statePath(i,e,Y(s.key)),j);return a?(this.validateState(a),{revision:a.revision,schema:a.schema,value:a.value}):null}case"state.compareAndSwap":{let a=this.statePath(i,e,Y(s.key));if(!Number.isSafeInteger(s.expectedRevision)||s.expectedRevision<0||s.schema!==i.schema||!Object.hasOwn(s,"value"))throw new o("invalid_input","Invalid state revision or schema");if(JSON.stringify(s.value)===void 0)throw new o("invalid_input","State value must be JSON serializable");let c=JSON.stringify(s);if(Buffer.byteLength(c)>j)throw new o("state_too_large","Plugin state exceeds limit");let f=await x(a,j);f&&this.validateState(f);let l=h(c);if(f?.requestId===e.requestId&&f.inputHash===l)return{revision:f.revision,schema:f.schema,value:f.value};if((f?.revision??0)!==s.expectedRevision)throw new o("revision_conflict","Plugin state changed concurrently");let u={revision:s.expectedRevision+1,schema:i.schema,value:s.value,requestId:e.requestId,inputHash:l};return await m(a,u),{revision:u.revision,schema:u.schema,value:u.value}}case"workspace.read":{let{target:a}=await this.fileTarget(e.scope.cwd,s.path),c=s.maxBytes===void 0?A:s.maxBytes;if(!Number.isSafeInteger(c)||c<=0||c>A)throw new o("invalid_input","Invalid workspace read limit");let f=await w(a,c);return f?{text:new TextDecoder("utf-8",{fatal:!0}).decode(f),hash:h(f)}:null}case"workspace.commit":return this.commitFile(i,e,s);case"legacy.read":return this.legacy?this.legacy(e):null;default:throw new o("method_denied","Unknown host broker method")}})}validateState(e){if(!Number.isSafeInteger(e.revision)||e.revision<1||!Number.isSafeInteger(e.schema)||e.schema<1||!Object.hasOwn(e,"value")||typeof e.requestId!="string"||!/^[a-f0-9]{64}$/.test(e.inputHash))throw new o("invalid_storage","Invalid plugin state; original bytes preserved")}async fileTarget(e,t,n=!1){if(typeof t!="string"||t.length>4096||!t.endsWith(".excalidraw")||t.includes("\\")||t.includes("\0")||V(t)||ke.isAbsolute(t))throw new o("invalid_path","Use a workspace-relative .excalidraw path");let s=await K(e),i=be(s,t),a=X(s,i);if(!a||a===".."||a.startsWith(`..${J}`)||V(a))throw new o("invalid_path","Workspace path escapes root");let c=s,f=a.split(J);for(let u=0;u<f.length;u++){c=d(c,f[u]);let p;try{p=await C(c)}catch(g){if(!L(g))throw g;if(u<f.length-1){if(!n||X(s,c)!=="diagrams")throw new o("invalid_path","Workspace directory does not exist");try{await he(c,{mode:448})}catch(y){if(y.code!=="EEXIST")throw y}p=await C(c)}}if(p&&(p.isSymbolicLink()||(u<f.length-1?!p.isDirectory():!p.isFile()||p.nlink!==1)))throw new o("invalid_path","Workspace path contains a link or non-regular file")}let l=await K(ve(i));if(l!==s&&!l.startsWith(s+J))throw new o("invalid_path","Workspace directory changed");return{target:i,parent:l}}async commitFile(e,t,n){if(typeof n.text!="string"||Buffer.byteLength(n.text)>A||!(n.expectedHash===null||typeof n.expectedHash=="string"&&/^[a-f0-9]{64}$/.test(n.expectedHash)))throw new o("invalid_input","Invalid file content or expected hash");let{target:s,parent:i}=await this.fileTarget(t.scope.cwd,n.path,!0),a=d(this.root,"states",e.stateRef,`${h(this.scopeKey(t)+":file:"+t.requestId+":"+String(n.path))}.json`),c=h(JSON.stringify(n)),f=h(n.text),l=await x(a);if(l&&(l.requestId!==t.requestId||l.inputHash!==c||l.nextHash!==f))throw new o("duplicate_request","Request ID was reused with different content");let u;try{u=await B(`${s}.lock`,"wx",384)}catch(g){throw g.code==="EEXIST"?new o("file_busy","Workspace file is locked; original file preserved"):g}let p;try{await u.writeFile(JSON.stringify({pid:process.pid,requestId:t.requestId}));let g=await w(s,A),y=g?h(g):null;if(l&&y===f)return{hash:f};if(l?.committed||y!==n.expectedHash)throw new o("file_conflict","Workspace file already exists or changed externally");await m(a,{requestId:t.requestId,inputHash:c,nextHash:f,committed:!1}),p=d(i,`.plugin-${W()}.tmp`);let v=await B(p,"wx",384);try{await v.writeFile(n.text),await v.sync()}finally{await v.close()}if((await this.fileTarget(t.scope.cwd,n.path)).parent!==i)throw new o("file_conflict","Workspace directory changed during save");let $=await w(s,A);if(($?h($):null)!==n.expectedHash)throw new o("file_conflict","Workspace file changed during save");if(await this.assertGeneration(t.generation),n.expectedHash===null){try{await ge(p,s)}catch(G){throw G.code==="EEXIST"?new o("file_conflict","Workspace file was created concurrently"):G}await _(p),p=void 0}else await we(p,s),p=void 0;return await m(a,{requestId:t.requestId,inputHash:c,nextHash:f,committed:!0}),{hash:f}}finally{p&&await _(p).catch(()=>{}),await u.close(),await _(`${s}.lock`)}}};var U="ALL_HOSTS_AND_PLUGIN_WORKERS_STOPPED_AND_BACKUP_VERIFIED";async function T(r){let e=[];async function t(n,s=""){let i=await Z(n);if(!i.isDirectory()||i.isSymbolicLink())throw new o("invalid_storage","Recovery refuses linked/non-directory storage");for(let a of(await _e(n)).sort()){let c=k(n,a),f=s+a,l=await Z(c);if(l.isSymbolicLink())throw new o("invalid_storage","Recovery refuses links");if(l.isDirectory())await t(c,f+"/");else{if(e.length>=1e4)throw new o("invalid_storage","Recovery inspection budget exceeded");let u=await w(c,192*1024*1024);if(!u)throw new o("invalid_storage","Recovery input disappeared");e.push({path:f,bytes:u.length,sha256:h(u)})}}}return await t(r),{fingerprint:h(JSON.stringify(e)),files:e,warning:"Offline only: externally stop/fence ALL hosts and plugin workers, back up storage and workspace files. Never infer stopped ownership from PID alone."}}async function te(r,e,t,n){let s=new H(r,e),i=await T(s.root);if(n!==U)throw new o("confirmation_required","Explicit stopped-owner and verified-backup confirmation required");if(i.fingerprint!==t)throw new o("recovery_changed","Storage changed since inspection");return s.recover()}async function ne(r,e,t,n){let s=new H(r,e),i=s.root;if(n!==U)throw new o("confirmation_required","Explicit stopped-owner and verified-backup confirmation required");let a=await T(i);if(a.fingerprint!==t)throw new o("recovery_changed","Storage changed since inspection");if(await w(k(i,"transition.json"),2*1024*1024))throw new o("gc_recovery_required","Reconcile transition.json using broker.recover before resolving a fork");let c=await b(k(i,"fork.json")),f=await s.active(),l=await b(k(i,"previous.json"));if(!c||c.version!==1||!/^[a-f0-9-]{36}$/.test(c.stateRef)||Object.keys(c).some(p=>!["version","stateRef"].includes(p))||!f||l&&typeof l.stateRef!="string"||[f?.stateRef,l?.stateRef].includes(c.stateRef))throw new o("gc_recovery_required","Fork is unknown or referenced by active/previous; original bytes preserved");let u=`recovered-${t}-fork.json`;if(a.files.some(p=>p.path===u))throw new o("recovery_changed","Recovery evidence already exists");return await ee(k(i,"fork.json"),k(i,u)),{recovered:"fork.json",stateRef:c.stateRef,fingerprint:t}}async function re(r,e,t){if(t!==U||!/^[a-f0-9]{64}$/.test(e))throw new o("confirmation_required","Explicit stopped-owner and verified-backup confirmation required");let n=await T(r);if(n.fingerprint!==e)throw new o("recovery_changed","Storage changed since inspection; nothing recovered, inspect again");let s=n.files.filter(i=>["runtime.lock","transaction.lock"].includes(i.path));for(let i of s){let a=`recovered-${e}-${i.path}.json`;if(n.files.some(c=>c.path===a))throw new o("recovery_changed","Recovery evidence already exists")}for(let i of s)await ee(k(r,i.path),k(r,`recovered-${e}-${i.path}.json`));return await m(k(r,`recovery-${e}.json`),{version:1,fingerprint:e,locks:s,confirmation:t,recoveredAt:new Date().toISOString()}),{recovered:s.map(i=>i.path),fingerprint:e}}var[R,ie,E,O,D,...xe]=process.argv.slice(2),Pe=ie&&!xe.length&&(R==="inspect"&&!E&&!O&&!D||R==="recover-locks"&&E&&O&&!D||["recover-fork","reconcile-transition"].includes(R??"")&&E&&O&&D);if(!Pe)console.error(`Offline only. Usage: node --experimental-strip-types scripts/hosted-stopped-recovery.ts
|
|
1
|
+
(function(){try{var r=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},e=new r.Error().stack;e&&(r._sentryDebugIds=r._sentryDebugIds||{},r._sentryDebugIds[e]="f1c0e2bd-3adb-47fa-a32b-20af8e71ad62",r._sentryDebugIdIdentifier="sentry-dbid-f1c0e2bd-3adb-47fa-a32b-20af8e71ad62")}catch{}})();import{resolve as Se}from"node:path";import{lstat as Z,readdir as _e,rename as ee}from"node:fs/promises";import{join as k}from"node:path";import{createHash as se}from"node:crypto";var o=class extends Error{code;status;reason;constructor(e,t,n={}){super(t),this.name="HostedPluginError",this.code=e,this.status=n.status,this.reason=n.reason}};var L=r=>r.code==="ENOENT";var qe={files:4096,total:128*1024*1024,js:16*1024*1024,css:4*1024*1024,font:8*1024*1024,other:2*1024*1024};var h=r=>se("sha256").update(r).digest("hex");import{constants as M}from"node:fs";import{lstat as ae,mkdir as ce,open as q,rename as le,unlink as z}from"node:fs/promises";import{dirname as de,join as fe}from"node:path";import{randomUUID as ue}from"node:crypto";import{setTimeout as pe}from"node:timers/promises";async function S(r){await ce(r,{recursive:!0,mode:448});let e=await ae(r);if(!e.isDirectory()||e.isSymbolicLink())throw new o("invalid_storage","Plugin storage must be a real directory")}async function w(r,e){let t;try{t=await q(r,M.O_RDONLY|M.O_NONBLOCK|(M.O_NOFOLLOW??0))}catch(n){if(L(n))return null;throw n}try{let n=await t.stat();if(!n.isFile()||n.nlink>1||n.size>e)throw new o("invalid_storage","Invalid storage record size or type");let s=Buffer.alloc(Math.min(n.size+1,e+1)),i=0;for(;i<s.length;){let a=await t.read(s,i,s.length-i,i);if(!a.bytesRead)break;i+=a.bytesRead}if(i>e||i!==n.size)throw new o("invalid_storage","Storage record changed during read");return s.subarray(0,i)}finally{await t.close()}}async function x(r,e=2*1024*1024){let t=await w(r,e);if(!t)return null;try{return JSON.parse(new TextDecoder("utf-8",{fatal:!0}).decode(t))}catch{throw new o("invalid_storage","Invalid JSON storage record; original bytes preserved")}}async function b(r){let e=await w(r,2097152);if(e===null)return null;let t;try{t=JSON.parse(new TextDecoder("utf-8",{fatal:!0}).decode(e))}catch{throw new o("gc_recovery_required",`Invalid journal ${r}; stop all owners and inspect original bytes`)}if(!t||typeof t!="object"||Array.isArray(t))throw new o("gc_recovery_required",`Invalid journal ${r}; original bytes preserved`);return t}async function m(r,e){let t=`${r}.${ue()}.tmp`,n=await q(t,"wx",384);try{try{await n.writeFile(JSON.stringify(e)),await n.sync()}finally{await n.close()}await le(t,r);let s;try{s=await q(de(r),"r"),await s.sync()}catch(i){if(!["EINVAL","EPERM","EACCES","EISDIR","ENOTSUP","EBADF"].includes(i.code??""))throw i}finally{await s?.close()}}finally{await z(t).catch(()=>{})}}async function P(r,e,t=2e3){await S(r);let n=fe(r,"transaction.lock"),s=Date.now()+t,i;for(;;)try{i=await q(n,"wx",384);break}catch(a){if(a.code!=="EEXIST")throw a;if(Date.now()>=s)throw new o("storage_busy","Plugin storage is locked; stop all writers before recovering an abandoned lock");await pe(10)}try{return await i.writeFile(JSON.stringify({pid:process.pid,createdAt:new Date().toISOString()})),await e()}finally{await i.close(),await z(n)}}import{lstat as C,mkdir as he,open as B,realpath as K,readdir as F,link as ge,rename as we,unlink as _,copyFile as me,rm as ye}from"node:fs/promises";import{dirname as ve,isAbsolute as V,join as f,relative as X,resolve as be,sep as J,win32 as ke}from"node:path";import{randomUUID as W}from"node:crypto";var j=192*1024*1024,A=512*1024,Q=r=>typeof r=="string"&&/^[a-f0-9-]{36}$/.test(r);function Ie(r){if(!r||typeof r!="object"||Array.isArray(r))throw new o("invalid_input","Expected object input");return r}function Y(r){if(typeof r!="string"||!/^[\w.-]{1,160}$/.test(r)||r==="."||r==="..")throw new o("invalid_input","Invalid state key");return r}function N(r){if(r&&(!Q(r.stateRef)||typeof r.version!="string"||!Number.isSafeInteger(r.generation)||r.generation<1||!Number.isSafeInteger(r.schema)||r.schema<1||typeof r.enabled!="boolean"||typeof r.operationId!="string"))throw new o("invalid_storage","Invalid active plugin record");return r}var H=class{root;pluginId;legacy;checkpoint;constructor(e,t,n,s){this.root=f(e,h(t)),this.pluginId=t,this.legacy=n,this.checkpoint=s}active(){return x(f(this.root,"active.json")).then(N)}async recover(){return P(this.root,async()=>{let e=await this.active(),t=await b(f(this.root,"transition.json"));if(!t)return{active:e,recovered:"none"};if(!t.next||!Object.hasOwn(t,"before")||Object.keys(t).some(a=>!["version","before","next"].includes(a))||Object.hasOwn(t,"version")&&t.version!==1)throw new o("invalid_storage","Invalid activation journal; stop all owners and inspect transition.json");N(t.next),N(t.before);let n=e?.operationId===t.next.operationId?"committed":"not_committed";if(!((a,c)=>a===null||c===null?a===c:["version","generation","stateRef","schema","enabled","operationId"].every(d=>a[d]===c[d]))(e,n==="committed"?t.next:t.before))throw new o("gc_recovery_required","Activation journal does not match the active pointer; original bytes preserved");let i=t.before;if(n==="committed"&&i&&i.stateRef!==e.stateRef&&await m(f(this.root,"previous.json"),i),n==="committed"){let a=await b(f(this.root,"fork.json"));a?.version===1&&a.stateRef===e.stateRef&&Object.keys(a).every(c=>["version","stateRef"].includes(c))&&await _(f(this.root,"fork.json"))}return await _(f(this.root,"transition.json")),{active:e,recovered:n}})}async activate(e,t){return P(this.root,async()=>{let n=await this.active();if((n?.generation??0)!==e)throw new o("stale_generation","Plugin activation changed concurrently");let s=await b(f(this.root,"fork.json"));if(s&&(s.version!==1||s.stateRef!==t.stateRef||Object.keys(s).some(a=>!["version","stateRef"].includes(a))))throw new o("gc_recovery_required","Activation refused: unresolved fork.json belongs to another target; stop all owners and inspect it");let i=N({...t,generation:e+1,operationId:W()});await S(f(this.root,"states")),await S(f(this.root,"states",i.stateRef)),await m(f(this.root,"transition.json"),{version:1,before:n,next:i}),await this.checkpoint?.("prepared");try{await m(f(this.root,"active.json"),i)}catch(a){if((await this.active())?.operationId!==i.operationId)throw a}await this.checkpoint?.("committed");try{n&&n.stateRef!==i.stateRef&&await m(f(this.root,"previous.json"),n),await _(f(this.root,"transition.json")),await _(f(this.root,"fork.json")).catch(()=>{})}catch{}return await this.checkpoint?.("cleaned"),i})}async forkState(e){return P(this.root,async()=>{let t=await this.assertGeneration(e,!1),n=W(),s=f(this.root,"states",n);if(await b(f(this.root,"fork.json")))throw new o("gc_recovery_required","Unresolved fork.json; stop all owners and inspect the reserved state before retrying");await m(f(this.root,"fork.json"),{version:1,stateRef:n}),await S(s);let i=f(this.root,"states",t.stateRef);for(let a of await F(i)){if(!/^[a-f0-9]{64}\.json$/.test(a))throw new o("invalid_storage","Unexpected state file");if(!await w(f(i,a),j))throw new o("invalid_storage","Missing state file");await me(f(i,a),f(s,a))}return await this.checkpoint?.("forked"),n})}async collect(e){return P(this.root,async()=>{for(let l of["transition.json","fork.json"])if(await w(f(this.root,l),2*1024*1024))throw new o("gc_recovery_required",`GC refused: unresolved ${l}; stop all owners and inspect recovery references`);let t=await this.active(),n=N(await b(f(this.root,"previous.json")));if(!t&&await w(f(this.root,"active.json"),2*1024*1024))throw new o("gc_recovery_required","GC refused: null active pointer; restore activation metadata before cleanup");let s=[t,n].filter(l=>!!l),i=f(this.root,"states");await S(i);let a=await F(i),c=new Set(s.map(l=>l.stateRef));for(let l of a){if(!Q(l))throw new o("gc_recovery_required","GC refused: unexpected state directory; inspect states before cleanup");let u=f(i,l),p=await C(u);if(!p.isDirectory()||p.isSymbolicLink())throw new o("gc_recovery_required","GC refused: linked/non-directory state snapshot");for(let g of await F(u)){let y=await C(f(u,g));if(!/^[a-f0-9]{64}\.json$/.test(g)||!y.isFile()||y.isSymbolicLink()||y.nlink!==1)throw new o("gc_recovery_required","GC refused: unexpected snapshot content; original bytes preserved");if(!c.has(l)){let v=await x(f(u,g),j);if(!v)throw new o("gc_recovery_required","GC refused: missing snapshot record");if(Object.hasOwn(v,"committed")){let I=v;if(Object.keys(I).some($=>!["requestId","inputHash","nextHash","committed"].includes($))||I.committed!==!0||!/^[a-f0-9]{64}$/.test(I.inputHash)||!/^[a-f0-9]{64}$/.test(I.nextHash)||typeof I.requestId!="string")throw new o("gc_recovery_required",`GC refused: unresolved file intent in states/${l}; reconcile the workspace save before cleanup`)}else{if(Object.keys(v).some(I=>!["revision","schema","value","requestId","inputHash"].includes(I)))throw new o("gc_recovery_required","GC refused: unknown snapshot envelope; original bytes preserved");this.validateState(v)}}}}for(let l of c)if(!a.includes(l))throw new o("gc_recovery_required","GC refused: referenced snapshot is missing; restore recovery data first");let d=await e(s);for(let l of a)c.has(l)||await ye(f(i,l),{recursive:!0,force:!0});return d})}async assertGeneration(e,t=!0){let n=await this.active();if(!n||n.generation!==e||t&&!n.enabled)throw new o("stale_generation","Plugin generation is no longer active");return n}scopeKey(e){if(!e.scope||typeof e.scope.cwd!="string"||!e.scope.cwd||typeof e.scope.sessionId!="string"||!e.scope.sessionId||typeof e.scope.workspaceId!="string"||!e.scope.workspaceId)throw new o("invalid_scope","Missing authenticated plugin scope");return JSON.stringify([e.scope.workspaceId,e.scope.cwd,e.scope.sessionId])}statePath(e,t,n){return f(this.root,"states",e.stateRef,`${h(this.scopeKey(t)+":state:"+n)}.json`)}async call(e,t,n){if(!Number.isSafeInteger(e.generation)||!/^[\w-]{1,160}$/.test(e.requestId))throw new o("invalid_lease","Invalid invocation lease");this.scopeKey(e);let s=Ie(n);return P(this.root,async()=>{let i=await this.assertGeneration(e.generation);switch(t){case"state.read":{let a=await x(this.statePath(i,e,Y(s.key)),j);return a?(this.validateState(a),{revision:a.revision,schema:a.schema,value:a.value}):null}case"state.compareAndSwap":{let a=this.statePath(i,e,Y(s.key));if(!Number.isSafeInteger(s.expectedRevision)||s.expectedRevision<0||s.schema!==i.schema||!Object.hasOwn(s,"value"))throw new o("invalid_input","Invalid state revision or schema");if(JSON.stringify(s.value)===void 0)throw new o("invalid_input","State value must be JSON serializable");let c=JSON.stringify(s);if(Buffer.byteLength(c)>j)throw new o("state_too_large","Plugin state exceeds limit");let d=await x(a,j);d&&this.validateState(d);let l=h(c);if(d?.requestId===e.requestId&&d.inputHash===l)return{revision:d.revision,schema:d.schema,value:d.value};if((d?.revision??0)!==s.expectedRevision)throw new o("revision_conflict","Plugin state changed concurrently");let u={revision:s.expectedRevision+1,schema:i.schema,value:s.value,requestId:e.requestId,inputHash:l};return await m(a,u),{revision:u.revision,schema:u.schema,value:u.value}}case"workspace.read":{let{target:a}=await this.fileTarget(e.scope.cwd,s.path),c=s.maxBytes===void 0?A:s.maxBytes;if(!Number.isSafeInteger(c)||c<=0||c>A)throw new o("invalid_input","Invalid workspace read limit");let d=await w(a,c);return d?{text:new TextDecoder("utf-8",{fatal:!0}).decode(d),hash:h(d)}:null}case"workspace.commit":return this.commitFile(i,e,s);case"legacy.read":return this.legacy?this.legacy(e):null;default:throw new o("method_denied","Unknown host broker method")}})}validateState(e){if(!Number.isSafeInteger(e.revision)||e.revision<1||!Number.isSafeInteger(e.schema)||e.schema<1||!Object.hasOwn(e,"value")||typeof e.requestId!="string"||!/^[a-f0-9]{64}$/.test(e.inputHash))throw new o("invalid_storage","Invalid plugin state; original bytes preserved")}async fileTarget(e,t,n=!1){if(typeof t!="string"||t.length>4096||!t.endsWith(".excalidraw")||t.includes("\\")||t.includes("\0")||V(t)||ke.isAbsolute(t))throw new o("invalid_path","Use a workspace-relative .excalidraw path");let s=await K(e),i=be(s,t),a=X(s,i);if(!a||a===".."||a.startsWith(`..${J}`)||V(a))throw new o("invalid_path","Workspace path escapes root");let c=s,d=a.split(J);for(let u=0;u<d.length;u++){c=f(c,d[u]);let p;try{p=await C(c)}catch(g){if(!L(g))throw g;if(u<d.length-1){if(!n||X(s,c)!=="diagrams")throw new o("invalid_path","Workspace directory does not exist");try{await he(c,{mode:448})}catch(y){if(y.code!=="EEXIST")throw y}p=await C(c)}}if(p&&(p.isSymbolicLink()||(u<d.length-1?!p.isDirectory():!p.isFile()||p.nlink!==1)))throw new o("invalid_path","Workspace path contains a link or non-regular file")}let l=await K(ve(i));if(l!==s&&!l.startsWith(s+J))throw new o("invalid_path","Workspace directory changed");return{target:i,parent:l}}async commitFile(e,t,n){if(typeof n.text!="string"||Buffer.byteLength(n.text)>A||!(n.expectedHash===null||typeof n.expectedHash=="string"&&/^[a-f0-9]{64}$/.test(n.expectedHash)))throw new o("invalid_input","Invalid file content or expected hash");let{target:s,parent:i}=await this.fileTarget(t.scope.cwd,n.path,!0),a=f(this.root,"states",e.stateRef,`${h(this.scopeKey(t)+":file:"+t.requestId+":"+String(n.path))}.json`),c=h(JSON.stringify(n)),d=h(n.text),l=await x(a);if(l&&(l.requestId!==t.requestId||l.inputHash!==c||l.nextHash!==d))throw new o("duplicate_request","Request ID was reused with different content");let u;try{u=await B(`${s}.lock`,"wx",384)}catch(g){throw g.code==="EEXIST"?new o("file_busy","Workspace file is locked; original file preserved"):g}let p;try{await u.writeFile(JSON.stringify({pid:process.pid,requestId:t.requestId}));let g=await w(s,A),y=g?h(g):null;if(l&&y===d)return{hash:d};if(l?.committed||y!==n.expectedHash)throw new o("file_conflict","Workspace file already exists or changed externally");await m(a,{requestId:t.requestId,inputHash:c,nextHash:d,committed:!1}),p=f(i,`.plugin-${W()}.tmp`);let v=await B(p,"wx",384);try{await v.writeFile(n.text),await v.sync()}finally{await v.close()}if((await this.fileTarget(t.scope.cwd,n.path)).parent!==i)throw new o("file_conflict","Workspace directory changed during save");let $=await w(s,A);if(($?h($):null)!==n.expectedHash)throw new o("file_conflict","Workspace file changed during save");if(await this.assertGeneration(t.generation),n.expectedHash===null){try{await ge(p,s)}catch(G){throw G.code==="EEXIST"?new o("file_conflict","Workspace file was created concurrently"):G}await _(p),p=void 0}else await we(p,s),p=void 0;return await m(a,{requestId:t.requestId,inputHash:c,nextHash:d,committed:!0}),{hash:d}}finally{p&&await _(p).catch(()=>{}),await u.close(),await _(`${s}.lock`)}}};var U="ALL_HOSTS_AND_PLUGIN_WORKERS_STOPPED_AND_BACKUP_VERIFIED";async function T(r){let e=[];async function t(n,s=""){let i=await Z(n);if(!i.isDirectory()||i.isSymbolicLink())throw new o("invalid_storage","Recovery refuses linked/non-directory storage");for(let a of(await _e(n)).sort()){let c=k(n,a),d=s+a,l=await Z(c);if(l.isSymbolicLink())throw new o("invalid_storage","Recovery refuses links");if(l.isDirectory())await t(c,d+"/");else{if(e.length>=1e4)throw new o("invalid_storage","Recovery inspection budget exceeded");let u=await w(c,192*1024*1024);if(!u)throw new o("invalid_storage","Recovery input disappeared");e.push({path:d,bytes:u.length,sha256:h(u)})}}}return await t(r),{fingerprint:h(JSON.stringify(e)),files:e,warning:"Offline only: externally stop/fence ALL hosts and plugin workers, back up storage and workspace files. Never infer stopped ownership from PID alone."}}async function te(r,e,t,n){let s=new H(r,e),i=await T(s.root);if(n!==U)throw new o("confirmation_required","Explicit stopped-owner and verified-backup confirmation required");if(i.fingerprint!==t)throw new o("recovery_changed","Storage changed since inspection");return s.recover()}async function ne(r,e,t,n){let s=new H(r,e),i=s.root;if(n!==U)throw new o("confirmation_required","Explicit stopped-owner and verified-backup confirmation required");let a=await T(i);if(a.fingerprint!==t)throw new o("recovery_changed","Storage changed since inspection");if(await w(k(i,"transition.json"),2*1024*1024))throw new o("gc_recovery_required","Reconcile transition.json using broker.recover before resolving a fork");let c=await b(k(i,"fork.json")),d=await s.active(),l=await b(k(i,"previous.json"));if(!c||c.version!==1||!/^[a-f0-9-]{36}$/.test(c.stateRef)||Object.keys(c).some(p=>!["version","stateRef"].includes(p))||!d||l&&typeof l.stateRef!="string"||[d?.stateRef,l?.stateRef].includes(c.stateRef))throw new o("gc_recovery_required","Fork is unknown or referenced by active/previous; original bytes preserved");let u=`recovered-${t}-fork.json`;if(a.files.some(p=>p.path===u))throw new o("recovery_changed","Recovery evidence already exists");return await ee(k(i,"fork.json"),k(i,u)),{recovered:"fork.json",stateRef:c.stateRef,fingerprint:t}}async function re(r,e,t){if(t!==U||!/^[a-f0-9]{64}$/.test(e))throw new o("confirmation_required","Explicit stopped-owner and verified-backup confirmation required");let n=await T(r);if(n.fingerprint!==e)throw new o("recovery_changed","Storage changed since inspection; nothing recovered, inspect again");let s=n.files.filter(i=>["runtime.lock","transaction.lock"].includes(i.path));for(let i of s){let a=`recovered-${e}-${i.path}.json`;if(n.files.some(c=>c.path===a))throw new o("recovery_changed","Recovery evidence already exists")}for(let i of s)await ee(k(r,i.path),k(r,`recovered-${e}-${i.path}.json`));return await m(k(r,`recovery-${e}.json`),{version:1,fingerprint:e,locks:s,confirmation:t,recoveredAt:new Date().toISOString()}),{recovered:s.map(i=>i.path),fingerprint:e}}var[R,ie,E,O,D,...xe]=process.argv.slice(2),Pe=ie&&!xe.length&&(R==="inspect"&&!E&&!O&&!D||R==="recover-locks"&&E&&O&&!D||["recover-fork","reconcile-transition"].includes(R??"")&&E&&O&&D);if(!Pe)console.error(`Offline only. Usage: node --experimental-strip-types scripts/hosted-stopped-recovery.ts
|
|
2
2
|
inspect BROKER_ROOT
|
|
3
3
|
recover-locks BROKER_ROOT FINGERPRINT CONFIRMATION
|
|
4
4
|
reconcile-transition DATA_ROOT PLUGIN_ID FINGERPRINT CONFIRMATION
|
|
5
5
|
recover-fork DATA_ROOT PLUGIN_ID FINGERPRINT CONFIRMATION
|
|
6
|
-
CONFIRMATION = ALL_HOSTS_AND_PLUGIN_WORKERS_STOPPED_AND_BACKUP_VERIFIED`),process.exitCode=2;else try{let r=Se(ie),e=R==="inspect"?await T(r):R==="recover-locks"?await re(r,E,O):R==="recover-fork"?await ne(r,E,O,D):await te(r,E,O,D);console.log(JSON.stringify(e,null,2))}catch(r){console.error(r instanceof Error?r.message:"Recovery failed"),process.exitCode=1}var
|
|
6
|
+
CONFIRMATION = ALL_HOSTS_AND_PLUGIN_WORKERS_STOPPED_AND_BACKUP_VERIFIED`),process.exitCode=2;else try{let r=Se(ie),e=R==="inspect"?await T(r):R==="recover-locks"?await re(r,E,O):R==="recover-fork"?await ne(r,E,O,D):await te(r,E,O,D);console.log(JSON.stringify(e,null,2))}catch(r){console.error(r instanceof Error?r.message:"Recovery failed"),process.exitCode=1}var dt=void 0;export{dt as default};
|
|
7
7
|
|
|
8
|
-
//# debugId=
|
|
8
|
+
//# debugId=f1c0e2bd-3adb-47fa-a32b-20af8e71ad62
|
package/dist/hosted-worker.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},e=new t.Error().stack;e&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[e]="
|
|
1
|
+
(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},e=new t.Error().stack;e&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[e]="f6412e77-b38d-4579-a9ff-7491f15d8846",t._sentryDebugIdIdentifier="sentry-dbid-f6412e77-b38d-4579-a9ff-7491f15d8846")}catch{}})();import{AsyncLocalStorage as y}from"node:async_hooks";import{pathToFileURL as b}from"node:url";function c(t){let e=t&&typeof t=="object"?t:{};return{code:typeof e.code=="string"&&/^[\w.-]{1,80}$/.test(e.code)?e.code:"plugin_failed",message:t instanceof Error?t.message:"Plugin operation failed",...Number.isInteger(e.status)&&Number(e.status)>=400&&Number(e.status)<=599?{status:Number(e.status)}:{},...typeof e.reason=="string"&&/^[\w.-]{1,80}$/.test(e.reason)?{reason:e.reason}:{}}}var f=new y,s=new Map,v=0,n,a=t=>{process.connected&&process.send?.(t)};process.on("message",t=>{if(!t||typeof t!="object")return;let e=t;if(e.type==="broker-response"&&typeof e.id=="string"){let r=s.get(e.id);if(!r)return;if(s.delete(e.id),e.ok)r.resolve(e.value);else{let o=e.error;r.reject(Object.assign(new Error(o?.message??"Host broker rejected request"),{code:o?.code,status:o?.status,reason:o?.reason}))}return}if(e.type!=="request"||typeof e.id!="string"||typeof e.method!="string")return;let i=e.id;(async()=>{switch(e.method){case"initialize":{if(n)throw new Error("Already initialized");let r=e.input,o=await import(b(r.entry).href);if(typeof o.createRuntime!="function")throw new Error("Missing createRuntime export");return n=await o.createRuntime({pluginId:r.pluginId,version:r.version,generation:r.generation,broker:{call(p,g){let u=f.getStore();if(!u)return Promise.reject(new Error("Broker calls require an active invocation"));if(s.size>=64)return Promise.reject(new Error("Too many broker requests"));let d=`b${++v}`;return new Promise((m,w)=>{s.set(d,{resolve:m,reject:w}),a({type:"broker-request",id:d,invocationId:u.requestId,method:p,input:g})})}}}),{initialized:!0}}case"describe":if(!n)throw new Error("Not initialized");return n.describe();case"health":if(!n)throw new Error("Not initialized");return n.health();case"invoke":{if(!n)throw new Error("Not initialized");let r=e.input;return f.run(r,()=>n.invoke(r))}case"dispose":return await n?.dispose?.(),{disposed:!0};default:throw new Error("Unknown runtime operation")}})().then(r=>a({type:"response",id:i,ok:!0,value:r}),r=>a({type:"response",id:i,ok:!1,error:c(r)}))});process.on("disconnect",()=>{for(let t of s.values())t.reject(new Error("Host disconnected"));s.clear(),process.exitCode=1,Promise.resolve(n?.dispose?.()).finally(()=>process.exit(1))});var H=void 0;export{H as default};
|
|
2
2
|
|
|
3
|
-
//# debugId=
|
|
3
|
+
//# debugId=f6412e77-b38d-4579-a9ff-7491f15d8846
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pi-webapp",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.34-alpha.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"piWebappDesktopProtocol": 1,
|
|
6
6
|
"piWebappDataVersion": 1,
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"pi-webapp": "./bin/pi-webapp.mjs"
|
|
30
30
|
},
|
|
31
31
|
"pi": {
|
|
32
|
-
"image": "https://cdn.jsdelivr.net/npm/pi-webapp@0.1.
|
|
32
|
+
"image": "https://cdn.jsdelivr.net/npm/pi-webapp@0.1.34-alpha.1/assets/cover-webapp.png",
|
|
33
33
|
"extensions": [
|
|
34
34
|
"./dist/extension.js"
|
|
35
35
|
]
|
|
@@ -122,13 +122,13 @@
|
|
|
122
122
|
"isDynamicEntry": true
|
|
123
123
|
},
|
|
124
124
|
"../../node_modules/@shikijs/langs/dist/graphql.mjs": {
|
|
125
|
-
"file": "assets/graphql-
|
|
125
|
+
"file": "assets/graphql-fvWfXapV.js",
|
|
126
126
|
"name": "graphql",
|
|
127
127
|
"src": "../../node_modules/@shikijs/langs/dist/graphql.mjs",
|
|
128
128
|
"isDynamicEntry": true,
|
|
129
129
|
"imports": [
|
|
130
130
|
"_javascript-D_ijBMSX.js",
|
|
131
|
-
"_app-
|
|
131
|
+
"_app-BasYjacK.js",
|
|
132
132
|
"index.html"
|
|
133
133
|
]
|
|
134
134
|
},
|
|
@@ -161,12 +161,12 @@
|
|
|
161
161
|
]
|
|
162
162
|
},
|
|
163
163
|
"../../node_modules/@shikijs/langs/dist/http.mjs": {
|
|
164
|
-
"file": "assets/http-
|
|
164
|
+
"file": "assets/http-DILRzPNj.js",
|
|
165
165
|
"name": "http",
|
|
166
166
|
"src": "../../node_modules/@shikijs/langs/dist/http.mjs",
|
|
167
167
|
"isDynamicEntry": true,
|
|
168
168
|
"imports": [
|
|
169
|
-
"_app-
|
|
169
|
+
"_app-BasYjacK.js",
|
|
170
170
|
"../../node_modules/@shikijs/langs/dist/xml.mjs",
|
|
171
171
|
"../../node_modules/@shikijs/langs/dist/graphql.mjs",
|
|
172
172
|
"index.html",
|
|
@@ -275,7 +275,7 @@
|
|
|
275
275
|
]
|
|
276
276
|
},
|
|
277
277
|
"../../node_modules/@shikijs/langs/dist/php.mjs": {
|
|
278
|
-
"file": "assets/php-
|
|
278
|
+
"file": "assets/php-dwgf7iSP.js",
|
|
279
279
|
"name": "php",
|
|
280
280
|
"src": "../../node_modules/@shikijs/langs/dist/php.mjs",
|
|
281
281
|
"isDynamicEntry": true,
|
|
@@ -284,7 +284,7 @@
|
|
|
284
284
|
"../../node_modules/@shikijs/langs/dist/xml.mjs",
|
|
285
285
|
"../../node_modules/@shikijs/langs/dist/sql.mjs",
|
|
286
286
|
"_javascript-D_ijBMSX.js",
|
|
287
|
-
"_app-
|
|
287
|
+
"_app-BasYjacK.js",
|
|
288
288
|
"../../node_modules/@shikijs/langs/dist/css.mjs",
|
|
289
289
|
"../../node_modules/@shikijs/langs/dist/java.mjs",
|
|
290
290
|
"index.html"
|
|
@@ -315,7 +315,7 @@
|
|
|
315
315
|
"isDynamicEntry": true
|
|
316
316
|
},
|
|
317
317
|
"../../node_modules/@shikijs/langs/dist/rst.mjs": {
|
|
318
|
-
"file": "assets/rst-
|
|
318
|
+
"file": "assets/rst-DWsp_lUt.js",
|
|
319
319
|
"name": "rst",
|
|
320
320
|
"src": "../../node_modules/@shikijs/langs/dist/rst.mjs",
|
|
321
321
|
"isDynamicEntry": true,
|
|
@@ -324,7 +324,7 @@
|
|
|
324
324
|
"../../node_modules/@shikijs/langs/dist/cpp.mjs",
|
|
325
325
|
"../../node_modules/@shikijs/langs/dist/python.mjs",
|
|
326
326
|
"_javascript-D_ijBMSX.js",
|
|
327
|
-
"_app-
|
|
327
|
+
"_app-BasYjacK.js",
|
|
328
328
|
"../../node_modules/@shikijs/langs/dist/yaml.mjs",
|
|
329
329
|
"../../node_modules/@shikijs/langs/dist/cmake.mjs",
|
|
330
330
|
"../../node_modules/@shikijs/langs/dist/ruby.mjs",
|
|
@@ -340,7 +340,7 @@
|
|
|
340
340
|
]
|
|
341
341
|
},
|
|
342
342
|
"../../node_modules/@shikijs/langs/dist/ruby.mjs": {
|
|
343
|
-
"file": "assets/ruby-
|
|
343
|
+
"file": "assets/ruby-YwiQnP0D.js",
|
|
344
344
|
"name": "ruby",
|
|
345
345
|
"src": "../../node_modules/@shikijs/langs/dist/ruby.mjs",
|
|
346
346
|
"isDynamicEntry": true,
|
|
@@ -353,7 +353,7 @@
|
|
|
353
353
|
"../../node_modules/@shikijs/langs/dist/graphql.mjs",
|
|
354
354
|
"../../node_modules/@shikijs/langs/dist/cpp.mjs",
|
|
355
355
|
"../../node_modules/@shikijs/langs/dist/c.mjs",
|
|
356
|
-
"_app-
|
|
356
|
+
"_app-BasYjacK.js",
|
|
357
357
|
"../../node_modules/@shikijs/langs/dist/lua.mjs",
|
|
358
358
|
"../../node_modules/@shikijs/langs/dist/yaml.mjs",
|
|
359
359
|
"../../node_modules/@shikijs/langs/dist/java.mjs",
|
|
@@ -388,13 +388,13 @@
|
|
|
388
388
|
"isDynamicEntry": true
|
|
389
389
|
},
|
|
390
390
|
"../../node_modules/@shikijs/langs/dist/svelte.mjs": {
|
|
391
|
-
"file": "assets/svelte-
|
|
391
|
+
"file": "assets/svelte-UmsPgpWI.js",
|
|
392
392
|
"name": "svelte",
|
|
393
393
|
"src": "../../node_modules/@shikijs/langs/dist/svelte.mjs",
|
|
394
394
|
"isDynamicEntry": true,
|
|
395
395
|
"imports": [
|
|
396
396
|
"_javascript-D_ijBMSX.js",
|
|
397
|
-
"_app-
|
|
397
|
+
"_app-BasYjacK.js",
|
|
398
398
|
"../../node_modules/@shikijs/langs/dist/css.mjs",
|
|
399
399
|
"index.html"
|
|
400
400
|
]
|
|
@@ -430,14 +430,14 @@
|
|
|
430
430
|
"isDynamicEntry": true
|
|
431
431
|
},
|
|
432
432
|
"../../node_modules/@shikijs/langs/dist/vue.mjs": {
|
|
433
|
-
"file": "assets/vue-
|
|
433
|
+
"file": "assets/vue-BVcY7UAb.js",
|
|
434
434
|
"name": "vue",
|
|
435
435
|
"src": "../../node_modules/@shikijs/langs/dist/vue.mjs",
|
|
436
436
|
"isDynamicEntry": true,
|
|
437
437
|
"imports": [
|
|
438
438
|
"../../node_modules/@shikijs/langs/dist/css.mjs",
|
|
439
439
|
"_javascript-D_ijBMSX.js",
|
|
440
|
-
"_app-
|
|
440
|
+
"_app-BasYjacK.js",
|
|
441
441
|
"../../node_modules/@shikijs/langs/dist/html.mjs",
|
|
442
442
|
"_html-derivative-C2Epw9Yg.js",
|
|
443
443
|
"index.html"
|
|
@@ -704,22 +704,22 @@
|
|
|
704
704
|
]
|
|
705
705
|
},
|
|
706
706
|
"../../src/plugins/builtin/files/client/plugin.tsx": {
|
|
707
|
-
"file": "assets/plugin-
|
|
707
|
+
"file": "assets/plugin-DYG70fLw.js",
|
|
708
708
|
"name": "plugin",
|
|
709
709
|
"src": "../../src/plugins/builtin/files/client/plugin.tsx",
|
|
710
710
|
"isDynamicEntry": true,
|
|
711
711
|
"imports": [
|
|
712
|
-
"_app-
|
|
712
|
+
"_app-BasYjacK.js",
|
|
713
713
|
"index.html"
|
|
714
714
|
]
|
|
715
715
|
},
|
|
716
716
|
"../../src/plugins/builtin/git/client/plugin.tsx": {
|
|
717
|
-
"file": "assets/plugin-
|
|
717
|
+
"file": "assets/plugin-jOGP3DFo.js",
|
|
718
718
|
"name": "plugin",
|
|
719
719
|
"src": "../../src/plugins/builtin/git/client/plugin.tsx",
|
|
720
720
|
"isDynamicEntry": true,
|
|
721
721
|
"imports": [
|
|
722
|
-
"_app-
|
|
722
|
+
"_app-BasYjacK.js",
|
|
723
723
|
"index.html"
|
|
724
724
|
],
|
|
725
725
|
"css": [
|
|
@@ -727,20 +727,20 @@
|
|
|
727
727
|
]
|
|
728
728
|
},
|
|
729
729
|
"../../src/plugins/builtin/terminal/client/plugin.tsx": {
|
|
730
|
-
"file": "assets/plugin-
|
|
730
|
+
"file": "assets/plugin-DZH6Y1Po.js",
|
|
731
731
|
"name": "plugin",
|
|
732
732
|
"src": "../../src/plugins/builtin/terminal/client/plugin.tsx",
|
|
733
733
|
"isDynamicEntry": true,
|
|
734
734
|
"imports": [
|
|
735
|
-
"_app-
|
|
735
|
+
"_app-BasYjacK.js",
|
|
736
736
|
"index.html"
|
|
737
737
|
],
|
|
738
738
|
"css": [
|
|
739
739
|
"assets/plugin.css"
|
|
740
740
|
]
|
|
741
741
|
},
|
|
742
|
-
"_app-
|
|
743
|
-
"file": "assets/app-
|
|
742
|
+
"_app-BasYjacK.js": {
|
|
743
|
+
"file": "assets/app-BasYjacK.js",
|
|
744
744
|
"name": "app",
|
|
745
745
|
"isDynamicEntry": true,
|
|
746
746
|
"imports": [
|
|
@@ -895,7 +895,7 @@
|
|
|
895
895
|
"isEntry": true,
|
|
896
896
|
"dynamicImports": [
|
|
897
897
|
"../../src/host/client/telemetry-client.ts",
|
|
898
|
-
"_app-
|
|
898
|
+
"_app-BasYjacK.js"
|
|
899
899
|
]
|
|
900
900
|
}
|
|
901
901
|
}
|