pi-app 0.8.0 → 0.8.4

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 (101) hide show
  1. package/.next/BUILD_ID +1 -1
  2. package/.next/app-path-routes-manifest.json +2 -2
  3. package/.next/build-manifest.json +2 -2
  4. package/.next/prerender-manifest.json +3 -3
  5. package/.next/required-server-files.js +1 -1
  6. package/.next/required-server-files.json +1 -1
  7. package/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
  8. package/.next/server/app/_global-error.html +1 -1
  9. package/.next/server/app/_global-error.rsc +1 -1
  10. package/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  11. package/.next/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
  12. package/.next/server/app/_global-error.segments/_global-error.segment.rsc +1 -1
  13. package/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  14. package/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
  15. package/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  16. package/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  17. package/.next/server/app/_not-found.html +1 -1
  18. package/.next/server/app/_not-found.rsc +2 -2
  19. package/.next/server/app/_not-found.segments/_full.segment.rsc +2 -2
  20. package/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
  21. package/.next/server/app/_not-found.segments/_index.segment.rsc +2 -2
  22. package/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
  23. package/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
  24. package/.next/server/app/_not-found.segments/_tree.segment.rsc +2 -2
  25. package/.next/server/app/api/agent/[id]/events/route.js +1 -1
  26. package/.next/server/app/api/agent/[id]/events/route.js.nft.json +1 -1
  27. package/.next/server/app/api/agent/[id]/export.html/route.js +1 -1
  28. package/.next/server/app/api/agent/[id]/export.html/route.js.nft.json +1 -1
  29. package/.next/server/app/api/agent/[id]/route.js +1 -1
  30. package/.next/server/app/api/agent/[id]/route.js.nft.json +1 -1
  31. package/.next/server/app/api/agent/new/route.js +1 -1
  32. package/.next/server/app/api/agent/new/route.js.nft.json +1 -1
  33. package/.next/server/app/api/files/[...path]/route.js +3 -3
  34. package/.next/server/app/api/files/[...path]/route.js.nft.json +1 -1
  35. package/.next/server/app/api/history/[id]/route.js +1 -2
  36. package/.next/server/app/api/history/[id]/route.js.nft.json +1 -1
  37. package/.next/server/app/api/history/route.js +1 -2
  38. package/.next/server/app/api/history/route.js.nft.json +1 -1
  39. package/.next/server/app/api/models-config/route.js +1 -1
  40. package/.next/server/app/api/models-config/route.js.nft.json +1 -1
  41. package/.next/server/app/api/product-sessions/[id]/route.js +2 -3
  42. package/.next/server/app/api/product-sessions/[id]/route.js.nft.json +1 -1
  43. package/.next/server/app/api/sessions/[id]/context/route.js +1 -2
  44. package/.next/server/app/api/sessions/[id]/context/route.js.nft.json +1 -1
  45. package/.next/server/app/api/sessions/[id]/export/route.js +1 -2
  46. package/.next/server/app/api/sessions/[id]/export/route.js.nft.json +1 -1
  47. package/.next/server/app/api/sessions/[id]/route.js +1 -1
  48. package/.next/server/app/api/sessions/[id]/route.js.nft.json +1 -1
  49. package/.next/server/app/api/sessions/[id]/share/route.js +1 -1
  50. package/.next/server/app/api/sessions/route.js +1 -2
  51. package/.next/server/app/api/sessions/route.js.nft.json +1 -1
  52. package/.next/server/app/api/share/[token]/route.js +1 -2
  53. package/.next/server/app/api/share/[token]/route.js.nft.json +1 -1
  54. package/.next/server/app/api/skills/install/route.js +1 -1
  55. package/.next/server/app/api/skills/search/route.js +1 -1
  56. package/.next/server/app/api/terminal/run/[...cwd]/route.js +1 -1
  57. package/.next/server/app/api/terminal/run/[...cwd]/route.js.nft.json +1 -1
  58. package/.next/server/app/api/terminal/state/[...cwd]/route.js +1 -1
  59. package/.next/server/app/api/terminal/state/[...cwd]/route.js.nft.json +1 -1
  60. package/.next/server/app/api/terminal/stop/[...cwd]/route.js +1 -1
  61. package/.next/server/app/api/terminal/stop/[...cwd]/route.js.nft.json +1 -1
  62. package/.next/server/app/api/terminal/stream/[...cwd]/route.js +1 -1
  63. package/.next/server/app/api/terminal/stream/[...cwd]/route.js.nft.json +1 -1
  64. package/.next/server/app/api/usage/route.js +1 -2
  65. package/.next/server/app/api/usage/route.js.nft.json +1 -1
  66. package/.next/server/app/index.html +1 -1
  67. package/.next/server/app/index.rsc +3 -3
  68. package/.next/server/app/index.segments/__PAGE__.segment.rsc +2 -2
  69. package/.next/server/app/index.segments/_full.segment.rsc +3 -3
  70. package/.next/server/app/index.segments/_head.segment.rsc +1 -1
  71. package/.next/server/app/index.segments/_index.segment.rsc +2 -2
  72. package/.next/server/app/index.segments/_tree.segment.rsc +2 -2
  73. package/.next/server/app/page.js +2 -2
  74. package/.next/server/app/page_client-reference-manifest.js +1 -1
  75. package/.next/server/app/share/[token]/page_client-reference-manifest.js +1 -1
  76. package/.next/server/app-paths-manifest.json +2 -2
  77. package/.next/server/chunks/1185.js +2 -2
  78. package/.next/server/chunks/349.js +1 -1
  79. package/.next/server/chunks/402.js +2 -0
  80. package/.next/server/chunks/{3768.js → 5192.js} +1 -1
  81. package/.next/server/chunks/6429.js +1 -2
  82. package/.next/server/middleware-build-manifest.js +1 -1
  83. package/.next/server/middleware-manifest.json +5 -5
  84. package/.next/server/pages/404.html +1 -1
  85. package/.next/server/pages/500.html +1 -1
  86. package/.next/server/server-reference-manifest.json +1 -1
  87. package/.next/static/chunks/{2261-1213d31c519af896.js → 2261-bdeacd38bbdf7a65.js} +1 -1
  88. package/.next/static/chunks/app/page-12fb7504b3b0a7a5.js +2 -0
  89. package/.next/static/css/bdd24a16bf93fd97.css +1 -0
  90. package/.next/trace +84 -84
  91. package/.next/trace-build +1 -1
  92. package/README.md +20 -3
  93. package/bin/pi-app.js +20 -6
  94. package/next.config.ts +4 -0
  95. package/package.json +2 -4
  96. package/public/Pi-LOGO.png +0 -0
  97. package/.next/server/chunks/6402.js +0 -2
  98. package/.next/static/chunks/app/page-efc48687d0c38175.js +0 -2
  99. package/.next/static/css/55427e8acf53e124.css +0 -1
  100. /package/.next/static/{ti8s0DtntFtmi4CivW4V2 → VL7I477I2Xvb0sQR9Po90}/_buildManifest.js +0 -0
  101. /package/.next/static/{ti8s0DtntFtmi4CivW4V2 → VL7I477I2Xvb0sQR9Po90}/_ssgManifest.js +0 -0
package/.next/trace-build CHANGED
@@ -1 +1 @@
1
- [{"name":"run-webpack","duration":28222545,"timestamp":156175997,"id":14,"parentId":1,"tags":{},"startTime":1781182004326,"traceId":"9491902b6c19c8a7"},{"name":"run-typescript","duration":9148112,"timestamp":184402807,"id":8604,"parentId":1,"tags":{},"startTime":1781182032553,"traceId":"9491902b6c19c8a7"},{"name":"static-check","duration":1995937,"timestamp":193610107,"id":8607,"parentId":1,"tags":{},"startTime":1781182041760,"traceId":"9491902b6c19c8a7"},{"name":"static-generation","duration":5157335,"timestamp":196103481,"id":8723,"parentId":1,"tags":{},"startTime":1781182044254,"traceId":"9491902b6c19c8a7"},{"name":"collect-build-traces","duration":43466334,"timestamp":195613027,"id":8720,"parentId":1,"tags":{},"startTime":1781182043763,"traceId":"9491902b6c19c8a7"},{"name":"telemetry-flush","duration":50,"timestamp":239082431,"id":8732,"parentId":1,"tags":{},"startTime":1781182087233,"traceId":"9491902b6c19c8a7"},{"name":"next-build","duration":83045692,"timestamp":156036801,"id":1,"tags":{"buildMode":"default","version":"16.2.6","bundler":"webpack","has-custom-webpack-config":"true","use-build-worker":"false"},"startTime":1781182004187,"traceId":"9491902b6c19c8a7"}]
1
+ [{"name":"run-webpack","duration":27836945,"timestamp":289437050,"id":14,"parentId":1,"tags":{},"startTime":1781344189078,"traceId":"3c4ef69c6db36ac2"},{"name":"run-typescript","duration":9055964,"timestamp":317278104,"id":8606,"parentId":1,"tags":{},"startTime":1781344216919,"traceId":"3c4ef69c6db36ac2"},{"name":"static-check","duration":1764021,"timestamp":326402700,"id":8609,"parentId":1,"tags":{},"startTime":1781344226044,"traceId":"3c4ef69c6db36ac2"},{"name":"static-generation","duration":5732378,"timestamp":328263157,"id":8725,"parentId":1,"tags":{},"startTime":1781344227904,"traceId":"3c4ef69c6db36ac2"},{"name":"collect-build-traces","duration":40366249,"timestamp":328169160,"id":8722,"parentId":1,"tags":{},"startTime":1781344227810,"traceId":"3c4ef69c6db36ac2"},{"name":"telemetry-flush","duration":59,"timestamp":368538547,"id":8734,"parentId":1,"tags":{},"startTime":1781344268179,"traceId":"3c4ef69c6db36ac2"},{"name":"next-build","duration":79506031,"timestamp":289032588,"id":1,"tags":{"buildMode":"default","version":"16.2.6","bundler":"webpack","has-custom-webpack-config":"true","use-build-worker":"false"},"startTime":1781344188673,"traceId":"3c4ef69c6db36ac2"}]
package/README.md CHANGED
@@ -2,6 +2,26 @@
2
2
 
3
3
  [pi 编程智能体](https://github.com/badlogic/pi-mono) 的网页界面。在浏览器中浏览会话、与智能体对话、分叉对话、切换消息分支。
4
4
 
5
+ ## 日常维护
6
+
7
+ ```
8
+ cd ~/codespace/pi-app
9
+
10
+ # 拉社区更新
11
+ git fetch upstream
12
+ git log --oneline HEAD..upstream/main
13
+ git merge upstream/main
14
+ git push origin main
15
+
16
+ # 日常开发
17
+ git checkout -b feat/my-feature
18
+ # ... 改 ...
19
+ git commit -m "..."
20
+ git push origin feat/my-feature
21
+
22
+ ```
23
+
24
+
5
25
  ## 快速开始
6
26
 
7
27
  **无需安装,直接运行:**
@@ -68,9 +88,6 @@ PORT=8080 pi-app # 也支持环境变量
68
88
  - **模型配置** — 从智能体数据目录下的 `models.json` 读取可用模型,可在侧边栏的「Models」面板中编辑。
69
89
  - **文件浏览** — 侧边栏内置文件浏览器,可在标签页中查看当前工作目录下的文件。
70
90
 
71
- ## 规划
72
-
73
- 总计划:[docs/plan-pi-web-macos-workbench.md](docs/plan-pi-web-macos-workbench.md)
74
91
  贯穿原则:[docs/product-principles.md](docs/product-principles.md)
75
92
 
76
93
  ## 开发
package/bin/pi-app.js CHANGED
@@ -80,15 +80,29 @@ if (!fs.existsSync(nextDir)) {
80
80
  process.exit(1);
81
81
  }
82
82
 
83
- const nextArgs = ["start", "-p", port];
84
- if (hostname) nextArgs.push("-H", hostname);
85
-
86
83
  const childEnv = { ...process.env };
87
84
  if (remoteFlag && !childEnv.PI_WEB_REMOTE) childEnv.PI_WEB_REMOTE = "1";
88
85
 
89
- // Always run next's JS entry with node directly avoids .bin symlink issues
90
- // and path-with-spaces problems on Windows when shell: true is used.
91
- const child = spawn(process.execPath, [nextBin, ...nextArgs], {
86
+ // Prefer the standalone server bundled in the desktop app (a self-contained
87
+ // server.js with a pruned node_modules and no @next/swc). Fall back to
88
+ // `next start` for plain npm installs that ship the full .next + node_modules.
89
+ const standaloneServer = path.join(pkgDir, "server.js");
90
+ let spawnArgs;
91
+ if (fs.existsSync(standaloneServer)) {
92
+ // Next standalone server reads PORT/HOSTNAME from env. Default to 0.0.0.0 to
93
+ // match the previous `next start` behavior (LAN-reachable for share/pairing).
94
+ childEnv.PORT = String(port);
95
+ childEnv.HOSTNAME = hostname || "0.0.0.0";
96
+ spawnArgs = [standaloneServer];
97
+ } else {
98
+ const nextArgs = ["start", "-p", port];
99
+ if (hostname) nextArgs.push("-H", hostname);
100
+ spawnArgs = [nextBin, ...nextArgs];
101
+ }
102
+
103
+ // Always run the JS entry with node directly — avoids .bin symlink issues and
104
+ // path-with-spaces problems on Windows when shell: true is used.
105
+ const child = spawn(process.execPath, spawnArgs, {
92
106
  cwd: pkgDir,
93
107
  stdio: ["inherit", "pipe", "inherit"],
94
108
  env: childEnv,
package/next.config.ts CHANGED
@@ -25,6 +25,10 @@ const piServerExternalPackages = [
25
25
 
26
26
  const nextConfig: NextConfig = {
27
27
  distDir: process.env.NEXT_DIST_DIR ?? ".next",
28
+ // Standalone output (enabled only when packaging) traces the minimal set of
29
+ // server runtime files into .next/standalone, dramatically shrinking the
30
+ // bundled node_modules. Dev/normal builds are unaffected.
31
+ output: process.env.PI_STANDALONE === "1" ? "standalone" : undefined,
28
32
  serverExternalPackages: piServerExternalPackages,
29
33
  webpack: (config, { isServer }) => {
30
34
  if (!isServer) return config;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pi-app",
3
- "version": "0.8.0",
3
+ "version": "0.8.4",
4
4
  "description": "Web UI for the pi coding agent",
5
5
  "license": "MIT",
6
6
  "homepage": "https://github.com/asiachrispy/pi-app",
@@ -78,15 +78,13 @@
78
78
  "@types/react-dom": "19.2.3",
79
79
  "eslint": "9.39.4",
80
80
  "eslint-config-next": "16.2.6",
81
+ "jsdom": "27.4.0",
81
82
  "playwright": "1.60.0",
82
83
  "postcss": "8.5.15",
83
84
  "tailwindcss": "4.3.0",
84
85
  "typescript": "5.9.3",
85
86
  "vitest": "4.1.8"
86
87
  },
87
- "optionalDependencies": {
88
- "pi-fetch-tool": "0.1.5"
89
- },
90
88
  "overrides": {
91
89
  "js-cookie": "3.0.8",
92
90
  "mermaid": "11.15.0"
Binary file
@@ -1,2 +0,0 @@
1
- "use strict";exports.id=6402,exports.ids=[6402],exports.modules={12039:(a,b,c)=>{c.d(b,{m:()=>d});function d(a){let b="timelineSummary"===a.role&&"string"==typeof a.summary?{role:"timelineSummary",kind:"branch"===a.kind?"branch":"compaction",summary:a.summary,timestamp:"number"==typeof a.timestamp?a.timestamp:void 0}:"compactionSummary"===a.role?{role:"timelineSummary",kind:"compaction",summary:String(a.summary??""),timestamp:"number"==typeof a.timestamp?a.timestamp:void 0}:"branchSummary"===a.role?{role:"timelineSummary",kind:"branch",summary:String(a.summary??""),timestamp:"number"==typeof a.timestamp?a.timestamp:void 0}:null;if(b)return b;if("assistant"!==a.role)return a;let c=a.content;if(!Array.isArray(c))return a;let d=c.map(a=>("object"!=typeof a||null===a||Array.isArray(a)||"toolCall"!==a.type?null:{type:"toolCall",toolCallId:"string"==typeof a.toolCallId?a.toolCallId:"string"==typeof a.id?a.id:"",toolName:"string"==typeof a.toolName?a.toolName:"string"==typeof a.name?a.name:"",input:"object"!=typeof a.input||null===a.input||Array.isArray(a.input)?"object"!=typeof a.arguments||null===a.arguments||Array.isArray(a.arguments)?{}:a.arguments:a.input})??a);return{...a,content:d}}},14667:(a,b,c)=>{c.d(b,{ME:()=>f,aO:()=>e});let d=[/^\/tmp\//,/^\/tmp$/,/^\/private\/tmp\//,/^\/private\/tmp$/,/^\/var\/folders\/[^/]+\/[^/]+\/T\//,/^\/var\/folders\/[^/]+\/[^/]+\/T$/,/^\/private\/var\/folders\/[^/]+\/[^/]+\/T\//,/^\/private\/var\/folders\/[^/]+\/[^/]+\/T$/,/^[A-Za-z]:\\Users\\[^\\]+\\AppData\\Local\\Temp\\/i,/^[A-Za-z]:\\Windows\\Temp\\/i];function e(a){return!!a&&d.some(b=>b.test(a))}function f(a){return(function(a){let b=new Map;for(let c of a){if(!c.cwd)continue;let a=b.get(c.cwd);(!a||c.modified>a)&&b.set(c.cwd,c.modified)}return[...b.entries()].sort((a,b)=>b[1].localeCompare(a[1])).map(([a])=>a)})(a).filter(a=>!e(a))}},40257:(a,b,c)=>{c.d(b,{Aw:()=>h,y8:()=>i});var d=c(73024),e=c(76760),f=c(1751);function g(){return(0,e.join)((0,f.$M)(),"pi-web-preferences.json")}function h(){try{let a=(0,d.readFileSync)(g(),"utf8"),b=JSON.parse(a);return b&&"object"==typeof b?b:{}}catch{return{}}}function i(a){var b;let c,f;return b={...h(),...a},c=g(),(0,d.mkdirSync)((0,e.dirname)(c),{recursive:!0}),f=`${c}.tmp`,(0,d.writeFileSync)(f,`${JSON.stringify(b,null,2)}
2
- `,"utf8"),(0,d.renameSync)(f,c),b}},40402:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{BR:()=>s,O8:()=>r,Q0:()=>n,Uv:()=>t,dQ:()=>o,os:()=>q});var e=c(76760),f=c(75430),g=c(1751),h=c(12039),i=c(40257),j=c(58124),k=c(14667),l=a([f]);async function m(a){let b="PI_CODING_AGENT_DIR",c=process.env[b];process.env[b]=a;try{return await f.SessionManager.listAll()}finally{void 0===c?delete process.env[b]:process.env[b]=c}}async function n(){let a=[],b=b=>{for(let c of b)c.cwd&&a.push({cwd:c.cwd,modified:c.modified instanceof Date?c.modified.toISOString():String(c.modified)})};b(await f.SessionManager.listAll());let c=(0,g.$M)(),d=(0,g.AP)();if((0,e.resolve)(c)!==(0,e.resolve)(d))try{b(await m(d))}catch{}let h=(0,k.ME)(a),j=(0,i.Aw)().defaultWorkspaceCwd?.trim();return!j||h.includes(j)||(0,k.aO)(j)||h.push(j),h}async function o(){let a=await f.SessionManager.listAll(),b=new Map;for(let c of a)b.set(c.path,c.id);let c=(0,j.pI)(),d=p();return a.map(a=>{let e=c[a.id];return d.set(a.id,a.path),{path:a.path,id:a.id,cwd:a.cwd,name:a.name,created:a.created instanceof Date?a.created.toISOString():String(a.created),modified:a.modified instanceof Date?a.modified.toISOString():String(a.modified),messageCount:a.messageCount,firstMessage:a.firstMessage||"(no messages)",parentSessionId:a.parentSessionPath?b.get(a.parentSessionPath):void 0,productTitle:e?.title,productStatus:e?.status,lastResultSummary:e?.lastResultSummary}})}function p(){return globalThis.__piSessionPathCache||(globalThis.__piSessionPathCache=new Map),globalThis.__piSessionPathCache}async function q(a){let b=p().get(a);return b||(await o(),p().get(a)??null)}function r(a,b){p().set(a,b)}function s(a){p().delete(a)}function t(a,b){let c,d,e,g=new Map;for(let b of a)g.set(b.id,b);let i=(0,f.buildSessionContext)(a,b,g);if(null===b||(b&&(c=g.get(b)),c||(c=a[a.length-1]),!c))return{messages:[],entryIds:[],thinkingLevel:i.thinkingLevel,model:i.model};let j=[],k=c;for(;k;)j.unshift(k),k=k.parentId?g.get(k.parentId):void 0;for(let a of j)"compaction"===a.type&&(d=a.id,e=a.firstKeptEntryId);let l=[];if(d){l.push(d);let a=j.findIndex(a=>a.id===d),b=e?j.findIndex((b,c)=>c<a&&b.id===e):-1,c=b>=0?b:a;for(let b=c;b<a;b++)"message"===j[b].type&&l.push(j[b].id);for(let b=a+1;b<j.length;b++)"message"===j[b].type&&l.push(j[b].id)}else for(let a of j)"message"===a.type&&l.push(a.id);return{messages:i.messages.map(a=>(0,h.m)(a)),entryIds:l,thinkingLevel:i.thinkingLevel,model:i.model}}f=(l.then?(await l)():l)[0],d()}catch(a){d(a)}})},58124:(a,b,c)=>{c.d(b,{Ay:()=>l,pI:()=>k,r5:()=>j});var d=c(29021),e=c(33873),f=c(55511),g=c(1751);function h(){return(0,e.join)((0,g.$M)(),"product-sessions.json")}function i(){let a=h();if(!(0,d.existsSync)(a))return{};try{let b=(0,d.readFileSync)(a,"utf8");if(!b.trim())return{};let c=JSON.parse(b);return c&&"object"==typeof c?c:{}}catch(a){return"u">typeof console&&console.warn("[product-sessions] failed to parse store, treating as empty:",a),{}}}function j(a){return i()[a]??null}let k=function(){return i()};async function l(a,b){var c;let g;await (c=()=>{let c,g,j=i(),k=j[a];j[a]={...k,...b,startedAt:k?.startedAt??b.startedAt},c=h(),(0,d.mkdirSync)((0,e.dirname)(c),{recursive:!0}),g=`${c}.${(0,f.randomUUID)()}.tmp`,(0,d.writeFileSync)(g,JSON.stringify(j,null,2),"utf8"),(0,d.renameSync)(g,c)},g=(globalThis.__piProductSessionWriteQueue??Promise.resolve()).then(c,c),globalThis.__piProductSessionWriteQueue=g.catch(()=>void 0),g)}},80547:(a,b,c)=>{c.d(b,{As:()=>j,B9:()=>m,KJ:()=>l,af:()=>k});var d=c(73024),e=c.n(d),f=c(33873),g=c.n(f);let h=/^[a-zA-Z]:[\\/]/;function i(a){return h.test(a)||a.startsWith("\\\\")||a.startsWith("//")}function j(a){let b=a.join("/"),c=b.replace(/\\/g,"/");return i(c)?c:"/"+b.replace(/^\/+/,"")}function k(a,b){for(let c of b){let b=i(a)||i(c),d=b?g().win32:g(),e=b?"\\":g().sep,f=d.resolve(a),h=d.resolve(c),j=b?f.toLowerCase():f,k=b?h.toLowerCase():h,l=k.endsWith(e)?k:k+e;if(j===k||j.startsWith(l))return!0}return!1}function l(a,b){let c;try{c=e().realpathSync(a)}catch{return!1}let d=new Set;for(let a of b)try{d.add(e().realpathSync(a))}catch{}return k(c,d)}function m(a,b){let c=/^bytes=(\d*)-(\d*)$/.exec(a);if(!c||!c[1]&&!c[2])return{error:"invalid"};let d=c[1]?Number(c[1]):0,e=c[2]?Number(c[2]):b-1;return(!c[1]&&c[2]&&(d=Math.max(b-Number(c[2]),0),e=b-1),!Number.isSafeInteger(d)||!Number.isSafeInteger(e)||d<0||e<d||d>=b)?{error:"unsatisfiable"}:{start:d,end:Math.min(e,b-1)}}},93259:(a,b,c)=>{c.d(b,{_:()=>e});var d=c(92725);function e(a){return(0,d.rT)(a)}}};