ompgui 0.5.9 → 0.5.10
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/.next/BUILD_ID +1 -1
- package/.next/app-path-routes-manifest.json +7 -7
- package/.next/build-manifest.json +3 -3
- package/.next/prerender-manifest.json +3 -3
- package/.next/react-loadable-manifest.json +9 -3
- package/.next/required-server-files.js +2 -2
- package/.next/required-server-files.json +2 -2
- package/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
- package/.next/server/app/_global-error.html +1 -1
- package/.next/server/app/_global-error.rsc +2 -2
- package/.next/server/app/_global-error.segments/_full.segment.rsc +2 -2
- package/.next/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +2 -2
- package/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/.next/server/app/_not-found.html +1 -1
- package/.next/server/app/_not-found.rsc +2 -2
- package/.next/server/app/_not-found.segments/_full.segment.rsc +2 -2
- package/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +2 -2
- package/.next/server/app/_not-found.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/api/app-update/route.js +1 -1
- package/.next/server/app/api/omp-update/route.js +1 -1
- package/.next/server/app/api/omp-version/route.js +1 -1
- package/.next/server/app/api/plugins/route.js +1 -1
- package/.next/server/app/api/sessions/[id]/export/route.js +1 -1
- package/.next/server/app/api/usage/route.js +1 -1
- package/.next/server/app/index.html +1 -1
- package/.next/server/app/index.rsc +3 -3
- package/.next/server/app/index.segments/__PAGE__.segment.rsc +3 -3
- package/.next/server/app/index.segments/_full.segment.rsc +3 -3
- package/.next/server/app/index.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/login/page_client-reference-manifest.js +1 -1
- package/.next/server/app/login.html +1 -1
- package/.next/server/app/login.rsc +2 -2
- package/.next/server/app/login.segments/_full.segment.rsc +2 -2
- package/.next/server/app/login.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/login.segments/login/__PAGE__.segment.rsc +2 -2
- package/.next/server/app/page.js +2 -2
- package/.next/server/app/page_client-reference-manifest.js +1 -1
- package/.next/server/app-paths-manifest.json +7 -7
- package/.next/server/chunks/3798.js +1 -1
- package/.next/server/chunks/8005.js +2 -2
- package/.next/server/chunks/8501.js +1 -1
- package/.next/server/chunks/933.js +1 -1
- package/.next/server/middleware-build-manifest.js +1 -1
- package/.next/server/middleware-react-loadable-manifest.js +1 -1
- package/.next/server/pages/404.html +1 -1
- package/.next/server/pages/500.html +1 -1
- package/.next/server/server-reference-manifest.json +1 -1
- package/.next/static/chunks/{2041.4e10fe5e336c8426.js → 2041.17ffd4146285d582.js} +2 -2
- package/.next/static/chunks/4315-003248443d68d4df.js +1 -0
- package/.next/static/chunks/7488.1403755f69bda581.js +1 -0
- package/.next/static/chunks/8486.304d239e5e097b1b.js +1 -0
- package/.next/static/chunks/app/page-c650f2d9ae8d199b.js +59 -0
- package/.next/static/chunks/webpack-c01e953327d82b66.js +1 -0
- package/package.json +1 -1
- package/.next/static/chunks/4315-89ce29b4967be748.js +0 -1
- package/.next/static/chunks/6338.d20f504e8890057e.js +0 -1
- package/.next/static/chunks/app/page-77ea00b588788c0d.js +0 -59
- package/.next/static/chunks/webpack-167605108a414cd7.js +0 -1
- /package/.next/static/{say7tTKCMe35Qg-7bMRZ9 → NYtVaQy909o9b9LqcM3T6}/_buildManifest.js +0 -0
- /package/.next/static/{say7tTKCMe35Qg-7bMRZ9 → NYtVaQy909o9b9LqcM3T6}/_ssgManifest.js +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
globalThis.__RSC_MANIFEST=(globalThis.__RSC_MANIFEST||{});globalThis.__RSC_MANIFEST["/page"]={"moduleLoading":{"prefix":"/_next/"},"ssrModuleMapping":{"54690":{"*":{"id":"43248","name":"*","chunks":[],"async":false}},"57121":{"*":{"id":"35421","name":"*","chunks":[],"async":false}},"57958":{"*":{"id":"2699","name":"*","chunks":[],"async":false}},"61304":{"*":{"id":"60440","name":"*","chunks":[],"async":false}},"64777":{"*":{"id":"82265","name":"*","chunks":[],"async":false}},"74581":{"*":{"id":"61335","name":"*","chunks":[],"async":false}},"77397":{"*":{"id":"73786","name":"*","chunks":[],"async":false}},"78616":{"*":{"id":"84342","name":"*","chunks":[],"async":false}},"86869":{"*":{"id":"74661","name":"*","chunks":[],"async":false}},"87460":{"*":{"id":"2420","name":"*","chunks":[],"async":false}},"90484":{"*":{"id":"70664","name":"*","chunks":[],"async":false}}},"edgeSSRModuleMapping":{},"clientModules":{"/home/runner/work/ompgui/ompgui/node_modules/next/dist/client/components/client-page.js":{"id":61304,"name":"*","chunks":[],"async":false},"/home/runner/work/ompgui/ompgui/node_modules/next/dist/esm/client/components/client-page.js":{"id":61304,"name":"*","chunks":[],"async":false},"/home/runner/work/ompgui/ompgui/node_modules/next/dist/client/components/client-segment.js":{"id":78616,"name":"*","chunks":[],"async":false},"/home/runner/work/ompgui/ompgui/node_modules/next/dist/esm/client/components/client-segment.js":{"id":78616,"name":"*","chunks":[],"async":false},"/home/runner/work/ompgui/ompgui/node_modules/next/dist/client/components/http-access-fallback/error-boundary.js":{"id":64777,"name":"*","chunks":[],"async":false},"/home/runner/work/ompgui/ompgui/node_modules/next/dist/esm/client/components/http-access-fallback/error-boundary.js":{"id":64777,"name":"*","chunks":[],"async":false},"/home/runner/work/ompgui/ompgui/node_modules/next/dist/client/components/layout-router.js":{"id":57121,"name":"*","chunks":[],"async":false},"/home/runner/work/ompgui/ompgui/node_modules/next/dist/esm/client/components/layout-router.js":{"id":57121,"name":"*","chunks":[],"async":false},"/home/runner/work/ompgui/ompgui/node_modules/next/dist/client/components/render-from-template-context.js":{"id":74581,"name":"*","chunks":[],"async":false},"/home/runner/work/ompgui/ompgui/node_modules/next/dist/esm/client/components/render-from-template-context.js":{"id":74581,"name":"*","chunks":[],"async":false},"/home/runner/work/ompgui/ompgui/node_modules/next/dist/lib/framework/boundary-components.js":{"id":90484,"name":"*","chunks":[],"async":false},"/home/runner/work/ompgui/ompgui/node_modules/next/dist/esm/lib/framework/boundary-components.js":{"id":90484,"name":"*","chunks":[],"async":false},"/home/runner/work/ompgui/ompgui/node_modules/next/dist/lib/metadata/generate/icon-mark.js":{"id":86869,"name":"*","chunks":[],"async":false},"/home/runner/work/ompgui/ompgui/node_modules/next/dist/esm/lib/metadata/generate/icon-mark.js":{"id":86869,"name":"*","chunks":[],"async":false},"/home/runner/work/ompgui/ompgui/node_modules/next/font/google/target.css?{\"path\":\"app/layout.tsx\",\"import\":\"Noto_Sans_Mono\",\"arguments\":[{\"subsets\":[\"latin\",\"cyrillic\"],\"variable\":\"--font-noto-mono\",\"display\":\"swap\"}],\"variableName\":\"notoSansMono\"}":{"id":83683,"name":"*","chunks":["7177","static/chunks/app/layout-32679237fb27c4d9.js"],"async":false},"/home/runner/work/ompgui/ompgui/node_modules/pretendard/dist/web/variable/pretendardvariable.css":{"id":16259,"name":"*","chunks":["7177","static/chunks/app/layout-32679237fb27c4d9.js"],"async":false},"/home/runner/work/ompgui/ompgui/app/globals.css":{"id":66872,"name":"*","chunks":["7177","static/chunks/app/layout-32679237fb27c4d9.js"],"async":false},"/home/runner/work/ompgui/ompgui/app/error.tsx":{"id":87460,"name":"*","chunks":["4315","static/chunks/4315-
|
|
1
|
+
globalThis.__RSC_MANIFEST=(globalThis.__RSC_MANIFEST||{});globalThis.__RSC_MANIFEST["/page"]={"moduleLoading":{"prefix":"/_next/"},"ssrModuleMapping":{"54690":{"*":{"id":"43248","name":"*","chunks":[],"async":false}},"57121":{"*":{"id":"35421","name":"*","chunks":[],"async":false}},"57958":{"*":{"id":"2699","name":"*","chunks":[],"async":false}},"61304":{"*":{"id":"60440","name":"*","chunks":[],"async":false}},"64777":{"*":{"id":"82265","name":"*","chunks":[],"async":false}},"74581":{"*":{"id":"61335","name":"*","chunks":[],"async":false}},"77397":{"*":{"id":"73786","name":"*","chunks":[],"async":false}},"78616":{"*":{"id":"84342","name":"*","chunks":[],"async":false}},"86869":{"*":{"id":"74661","name":"*","chunks":[],"async":false}},"87460":{"*":{"id":"2420","name":"*","chunks":[],"async":false}},"90484":{"*":{"id":"70664","name":"*","chunks":[],"async":false}}},"edgeSSRModuleMapping":{},"clientModules":{"/home/runner/work/ompgui/ompgui/node_modules/next/dist/client/components/client-page.js":{"id":61304,"name":"*","chunks":[],"async":false},"/home/runner/work/ompgui/ompgui/node_modules/next/dist/esm/client/components/client-page.js":{"id":61304,"name":"*","chunks":[],"async":false},"/home/runner/work/ompgui/ompgui/node_modules/next/dist/client/components/client-segment.js":{"id":78616,"name":"*","chunks":[],"async":false},"/home/runner/work/ompgui/ompgui/node_modules/next/dist/esm/client/components/client-segment.js":{"id":78616,"name":"*","chunks":[],"async":false},"/home/runner/work/ompgui/ompgui/node_modules/next/dist/client/components/http-access-fallback/error-boundary.js":{"id":64777,"name":"*","chunks":[],"async":false},"/home/runner/work/ompgui/ompgui/node_modules/next/dist/esm/client/components/http-access-fallback/error-boundary.js":{"id":64777,"name":"*","chunks":[],"async":false},"/home/runner/work/ompgui/ompgui/node_modules/next/dist/client/components/layout-router.js":{"id":57121,"name":"*","chunks":[],"async":false},"/home/runner/work/ompgui/ompgui/node_modules/next/dist/esm/client/components/layout-router.js":{"id":57121,"name":"*","chunks":[],"async":false},"/home/runner/work/ompgui/ompgui/node_modules/next/dist/client/components/render-from-template-context.js":{"id":74581,"name":"*","chunks":[],"async":false},"/home/runner/work/ompgui/ompgui/node_modules/next/dist/esm/client/components/render-from-template-context.js":{"id":74581,"name":"*","chunks":[],"async":false},"/home/runner/work/ompgui/ompgui/node_modules/next/dist/lib/framework/boundary-components.js":{"id":90484,"name":"*","chunks":[],"async":false},"/home/runner/work/ompgui/ompgui/node_modules/next/dist/esm/lib/framework/boundary-components.js":{"id":90484,"name":"*","chunks":[],"async":false},"/home/runner/work/ompgui/ompgui/node_modules/next/dist/lib/metadata/generate/icon-mark.js":{"id":86869,"name":"*","chunks":[],"async":false},"/home/runner/work/ompgui/ompgui/node_modules/next/dist/esm/lib/metadata/generate/icon-mark.js":{"id":86869,"name":"*","chunks":[],"async":false},"/home/runner/work/ompgui/ompgui/node_modules/next/font/google/target.css?{\"path\":\"app/layout.tsx\",\"import\":\"Noto_Sans_Mono\",\"arguments\":[{\"subsets\":[\"latin\",\"cyrillic\"],\"variable\":\"--font-noto-mono\",\"display\":\"swap\"}],\"variableName\":\"notoSansMono\"}":{"id":83683,"name":"*","chunks":["7177","static/chunks/app/layout-32679237fb27c4d9.js"],"async":false},"/home/runner/work/ompgui/ompgui/node_modules/pretendard/dist/web/variable/pretendardvariable.css":{"id":16259,"name":"*","chunks":["7177","static/chunks/app/layout-32679237fb27c4d9.js"],"async":false},"/home/runner/work/ompgui/ompgui/app/globals.css":{"id":66872,"name":"*","chunks":["7177","static/chunks/app/layout-32679237fb27c4d9.js"],"async":false},"/home/runner/work/ompgui/ompgui/app/error.tsx":{"id":87460,"name":"*","chunks":["4315","static/chunks/4315-003248443d68d4df.js","8039","static/chunks/app/error-a88ca1da88a49a27.js"],"async":false},"/home/runner/work/ompgui/ompgui/app/global-error.tsx":{"id":54690,"name":"*","chunks":["4219","static/chunks/app/global-error-0e57c8c5d04fec63.js"],"async":false},"/home/runner/work/ompgui/ompgui/components/LoginForm.tsx":{"id":77397,"name":"*","chunks":[],"async":false},"/home/runner/work/ompgui/ompgui/components/AppShell.tsx":{"id":57958,"name":"*","chunks":["8920","static/chunks/8920-c73b529c74b3a43d.js","4315","static/chunks/4315-003248443d68d4df.js","8974","static/chunks/app/page-c650f2d9ae8d199b.js"],"async":false}},"entryCSSFiles":{"/home/runner/work/ompgui/ompgui/":[],"/home/runner/work/ompgui/ompgui/app/layout":[{"inlined":false,"path":"static/css/45214e1537eb75a6.css"}],"/home/runner/work/ompgui/ompgui/app/error":[],"/home/runner/work/ompgui/ompgui/app/global-error":[],"/home/runner/work/ompgui/ompgui/app/page":[]},"rscModuleMapping":{"16259":{"*":{"id":"72265","name":"*","chunks":[],"async":false}},"54690":{"*":{"id":"55038","name":"*","chunks":[],"async":false}},"57121":{"*":{"id":"98099","name":"*","chunks":[],"async":false}},"57958":{"*":{"id":"35790","name":"*","chunks":[],"async":false}},"61304":{"*":{"id":"15098","name":"*","chunks":[],"async":false}},"64777":{"*":{"id":"33859","name":"*","chunks":[],"async":false}},"66872":{"*":{"id":"82704","name":"*","chunks":[],"async":false}},"74581":{"*":{"id":"16237","name":"*","chunks":[],"async":false}},"77397":{"*":{"id":"59038","name":"*","chunks":[],"async":false}},"78616":{"*":{"id":"47644","name":"*","chunks":[],"async":false}},"86869":{"*":{"id":"36675","name":"*","chunks":[],"async":false}},"87460":{"*":{"id":"85034","name":"*","chunks":[],"async":false}},"90484":{"*":{"id":"98562","name":"*","chunks":[],"async":false}}},"edgeRscModuleMapping":{}};
|
|
@@ -28,12 +28,12 @@
|
|
|
28
28
|
"/icon.svg/route": "app/icon.svg/route.js",
|
|
29
29
|
"/manifest.webmanifest/route": "app/manifest.webmanifest/route.js",
|
|
30
30
|
"/api/agent/[id]/events/route": "app/api/agent/[id]/events/route.js",
|
|
31
|
-
"/api/agent/running/events/route": "app/api/agent/running/events/route.js",
|
|
32
31
|
"/api/agent/new/route": "app/api/agent/new/route.js",
|
|
33
|
-
"/api/
|
|
34
|
-
"/api/agents/unpack/route": "app/api/agents/unpack/route.js",
|
|
32
|
+
"/api/agent/running/events/route": "app/api/agent/running/events/route.js",
|
|
35
33
|
"/api/agents/route": "app/api/agents/route.js",
|
|
34
|
+
"/api/agents/[name]/route": "app/api/agents/[name]/route.js",
|
|
36
35
|
"/api/app-update/route": "app/api/app-update/route.js",
|
|
36
|
+
"/api/agents/unpack/route": "app/api/agents/unpack/route.js",
|
|
37
37
|
"/api/auth/all-providers/route": "app/api/auth/all-providers/route.js",
|
|
38
38
|
"/api/auth/api-key/[provider]/route": "app/api/auth/api-key/[provider]/route.js",
|
|
39
39
|
"/api/auth/logout/[provider]/route": "app/api/auth/logout/[provider]/route.js",
|
|
@@ -41,17 +41,17 @@
|
|
|
41
41
|
"/api/auth/login/[provider]/route": "app/api/auth/login/[provider]/route.js",
|
|
42
42
|
"/api/model-roles/route": "app/api/model-roles/route.js",
|
|
43
43
|
"/api/models-config/catalog/route": "app/api/models-config/catalog/route.js",
|
|
44
|
-
"/api/models-config/route": "app/api/models-config/route.js",
|
|
45
44
|
"/api/mcp/route": "app/api/mcp/route.js",
|
|
45
|
+
"/api/models-config/route": "app/api/models-config/route.js",
|
|
46
46
|
"/api/models-config/test/route": "app/api/models-config/test/route.js",
|
|
47
47
|
"/api/omp-settings/route": "app/api/omp-settings/route.js",
|
|
48
48
|
"/api/omp-update/route": "app/api/omp-update/route.js",
|
|
49
|
-
"/api/models/route": "app/api/models/route.js",
|
|
50
49
|
"/api/omp-version/route": "app/api/omp-version/route.js",
|
|
51
|
-
"/api/
|
|
50
|
+
"/api/models/route": "app/api/models/route.js",
|
|
52
51
|
"/api/plugins/route": "app/api/plugins/route.js",
|
|
53
|
-
"/api/sessions/[id]/
|
|
52
|
+
"/api/sessions/[id]/export/route": "app/api/sessions/[id]/export/route.js",
|
|
54
53
|
"/api/sessions/[id]/subagents/route": "app/api/sessions/[id]/subagents/route.js",
|
|
54
|
+
"/api/sessions/[id]/subagents/[subagentId]/route": "app/api/sessions/[id]/subagents/[subagentId]/route.js",
|
|
55
55
|
"/api/sessions/archive/route": "app/api/sessions/archive/route.js",
|
|
56
56
|
"/api/skills/check/route": "app/api/skills/check/route.js",
|
|
57
57
|
"/api/skills/install/route": "app/api/skills/install/route.js",
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
RPC protocol error: ${a instanceof Error?a.message:String(a)}`).slice(-8192),this.dispose(0);return}if("ready"===d.type)return void b(d);if("response"===d.type)return void this.handleResponse(d);for(let a of this.frameListeners)try{a(d)}catch{}}}),this.child.stderr.on("data",a=>{this.stderrTail=(this.stderrTail+a.toString("utf8")).slice(-8192)});const m=(b,d)=>{if(this.exited)return;this.exited=!0,this.exitInfo={code:b,signal:d};let e=Error(`omp exited (code ${b??"null"}, signal ${d??"none"})${this.stderrTail?`: ${this.stderrTail.slice(-500)}`:""}`);for(let[,a]of(c(e),this.pending))a.timer&&clearTimeout(a.timer),a.reject(e);this.pending.clear(),a.onExit?.({code:b,signal:d,stderrTail:this.stderrTail})};this.child.on("exit",m),this.child.on("error",a=>{this.stderrTail=(this.stderrTail+`
|
|
3
3
|
spawn error: ${a.message}`).slice(-8192),m(null,null)})}get isAlive(){return!this.exited}get exitDetails(){return this.exitInfo?{...this.exitInfo,stderrTail:this.stderrTail}:null}waitReady(a=6e4){let b=new Promise((b,c)=>{let d=setTimeout(()=>c(Error(`omp RPC ready timeout after ${a}ms`)),a);d.unref?.(),this.readyPromise.finally(()=>clearTimeout(d)).catch(()=>{})});return Promise.race([this.readyPromise,b])}async negotiateProtocol(a){if(!(Array.isArray(a.supportedProtocolVersions)?a.supportedProtocolVersions:[]).includes(2))return this.protocolVersion;let b=await this.sendCommand({type:"negotiate_protocol",protocolVersion:2});if(b?.protocolVersion!==2)throw Error("OMP rejected RPC protocol v2 negotiation");return this.protocolVersion=2,this.protocolVersion}onFrame(a){return this.frameListeners.add(a),()=>this.frameListeners.delete(a)}sendCommand(a,b){if(this.exited)return Promise.reject(Error("omp RPC process has exited"));let c=`w${this.nextId++}`;return new Promise((d,e)=>{let f={command:a.type,resolve:d,reject:e};b&&b>0&&(f.timer=setTimeout(()=>{this.pending.get(c)===f&&(this.pending.delete(c),e(Error(`RPC command ${a.type} timed out after ${b}ms`)))},b),f.timer.unref?.()),this.pending.set(c,f),this.writeFrame({...a,id:c},a=>{if(a){let b=this.pending.get(c);b&&(this.pending.delete(c),b.timer&&clearTimeout(b.timer),e(a))}})})}sendFrame(a){this.exited||this.writeFrame(a,()=>{})}writeFrame(a,b){let c;try{c=function(a,b,c){let d=JSON.stringify(a);if(1048576>=i(d))return[`${d}
|
|
4
4
|
`];if(1===b)throw Error("RPC frame exceeds the v1 transport limit");let e=Buffer.from(d,"utf8");if(e.byteLength>0x4000000)throw Error("RPC frame exceeds the v2 reassembly limit");let f=Math.ceil(e.byteLength/262144),g=[];for(let a=0;a<f;a++){let b=JSON.stringify({type:"rpc_chunk",chunkId:c,index:a,count:f,byteLength:e.byteLength,data:e.subarray(262144*a,(a+1)*262144).toString("base64")});if(i(b)>1048576)throw Error("RPC chunk exceeds the transport limit");g.push(`${b}
|
|
5
|
-
`)}return g}(a,this.protocolVersion,`web-${this.nextChunkId++}`)}catch(a){b(a instanceof Error?a:Error(String(a)));return}this.writeQueue=this.writeQueue.then(()=>new Promise(a=>{if(this.exited||this.child.stdin.destroyed){b(Error("RPC process is not running")),a();return}let d=0,e=f=>{if(f||d===c.length){b(f??null),a();return}this.child.stdin.write(c[d++],e)};e()}))}handleResponse(a){let b=a.id,c=b?this.pending.get(b):void 0;if(!c||!b){for(let b of this.frameListeners)try{b(a)}catch{}return}this.pending.delete(b),c.timer&&clearTimeout(c.timer),a.success?c.resolve(a.data):c.reject(new k(a.command,a.error??"RPC command failed",a.code))}async dispose(a=5e3){if(this.exited)return;let b=new Promise(a=>{if(this.exited)return a();this.child.once("exit",()=>a())});try{this.child.stdin.end()}catch{}let c=(a,b)=>{let c=this.child.pid;if(c){if("win32"===process.platform){let d=["/pid",String(c),"/t",...a?["/f"]:[]];this.spawnProcess("taskkill",d,{windowsHide:!0,stdio:"ignore"}).once("error",()=>{try{this.child.kill(b)}catch{}});return}try{process.kill(-c,b)}catch{try{this.child.kill(b)}catch{}}}},d=setTimeout(()=>{this.exited||c(!1,"SIGTERM")},a),e=setTimeout(()=>{this.exited||c(!0,"SIGKILL")},2*a);d.unref?.(),e.unref?.(),await b,clearTimeout(d),clearTimeout(e)}}},79588:(a,b,c)=>{c.d(b,{F1:()=>o,eG:()=>
|
|
5
|
+
`)}return g}(a,this.protocolVersion,`web-${this.nextChunkId++}`)}catch(a){b(a instanceof Error?a:Error(String(a)));return}this.writeQueue=this.writeQueue.then(()=>new Promise(a=>{if(this.exited||this.child.stdin.destroyed){b(Error("RPC process is not running")),a();return}let d=0,e=f=>{if(f||d===c.length){b(f??null),a();return}this.child.stdin.write(c[d++],e)};e()}))}handleResponse(a){let b=a.id,c=b?this.pending.get(b):void 0;if(!c||!b){for(let b of this.frameListeners)try{b(a)}catch{}return}this.pending.delete(b),c.timer&&clearTimeout(c.timer),a.success?c.resolve(a.data):c.reject(new k(a.command,a.error??"RPC command failed",a.code))}async dispose(a=5e3){if(this.exited)return;let b=new Promise(a=>{if(this.exited)return a();this.child.once("exit",()=>a())});try{this.child.stdin.end()}catch{}let c=(a,b)=>{let c=this.child.pid;if(c){if("win32"===process.platform){let d=["/pid",String(c),"/t",...a?["/f"]:[]];this.spawnProcess("taskkill",d,{windowsHide:!0,stdio:"ignore"}).once("error",()=>{try{this.child.kill(b)}catch{}});return}try{process.kill(-c,b)}catch{try{this.child.kill(b)}catch{}}}},d=setTimeout(()=>{this.exited||c(!1,"SIGTERM")},a),e=setTimeout(()=>{this.exited||c(!0,"SIGKILL")},2*a);d.unref?.(),e.unref?.(),await b,clearTimeout(d),clearTimeout(e)}}},79588:(a,b,c)=>{c.d(b,{F1:()=>p,YT:()=>o,eG:()=>q,nH:()=>r,wS:()=>n});var d=c(79646),e=c(29021),f=c(21820),g=c(33873);let h=null,i=0,j=null,k=0,l="win32"===process.platform?"omp.exe":"omp",m=/\x1B\[[0-9;]*m/g;function n(){if(h)return h;if(Date.now()-i<3e4)return null;let a=function(){let a=process.env.OMPGUI_OMP_BIN??process.env.OMP_WEB_OMP_BIN;if(a)return(0,e.existsSync)(a)?a:null;for(let a of(process.env.PATH??"").split(g.delimiter)){if(!a)continue;let b=(0,g.join)(a,l);if((0,e.existsSync)(b))return b}for(let a of["/opt/homebrew/bin","/usr/local/bin",(0,g.join)((0,f.homedir)(),".bun","bin"),(0,g.join)((0,f.homedir)(),".local","bin")]){let b=(0,g.join)(a,l);if((0,e.existsSync)(b))return b}return null}();return a?(h=a,i=0,a):(i=Date.now(),null)}function o(){h=null,i=0,j=null,k=0}async function p(){if(j)return j;if(Date.now()-k<3e4)return null;let a=n();if(!a)return k=Date.now(),null;try{let b=(await new Promise((b,c)=>{(0,d.execFile)(a,["--version"],{timeout:1e4,windowsHide:!0},(a,d)=>{a?c(a):b(d)})})).trim();if(b)return j=b,k=0,b}catch{}return k=Date.now(),null}function q(a,b={}){let c=n();if(!c)return Promise.reject(Error("omp binary not found. Install oh-my-pi or set OMP_WEB_OMP_BIN."));let{promise:e,resolve:f,reject:g}=Promise.withResolvers();return(0,d.execFile)(c,a,{cwd:b.cwd,timeout:b.timeout??6e4,maxBuffer:b.maxBuffer??0x1000000,env:{...process.env,FORCE_COLOR:"0",NO_COLOR:"1"},windowsHide:!0},(b,c,d)=>{b?g(Error((d||c||b.message).replace(m,"").trim().slice(-600)||`omp ${a.join(" ")} failed`)):f({stdout:c,stderr:d})}),e}function r(a){let b=a.replace(m,""),c=b.search(/[{[]/);if(c<0)return null;try{return JSON.parse(b.slice(c))}catch{return null}}}};
|