pi-app 0.8.1 → 0.8.5

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 (87) hide show
  1. package/.next/BUILD_ID +1 -1
  2. package/.next/app-path-routes-manifest.json +3 -3
  3. package/.next/build-manifest.json +2 -2
  4. package/.next/prerender-manifest.json +3 -3
  5. package/.next/required-server-files.js +2 -2
  6. package/.next/required-server-files.json +2 -2
  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.nft.json +1 -1
  26. package/.next/server/app/api/agent/[id]/export.html/route.js.nft.json +1 -1
  27. package/.next/server/app/api/agent/[id]/route.js.nft.json +1 -1
  28. package/.next/server/app/api/agent/new/route.js.nft.json +1 -1
  29. package/.next/server/app/api/auth/all-providers/route.js.nft.json +1 -1
  30. package/.next/server/app/api/auth/api-key/[provider]/route.js.nft.json +1 -1
  31. package/.next/server/app/api/auth/login/[provider]/route.js.nft.json +1 -1
  32. package/.next/server/app/api/auth/logout/[provider]/route.js.nft.json +1 -1
  33. package/.next/server/app/api/auth/providers/route.js.nft.json +1 -1
  34. package/.next/server/app/api/extensions/route.js.nft.json +1 -1
  35. package/.next/server/app/api/files/[...path]/route.js.nft.json +1 -1
  36. package/.next/server/app/api/health/route.js +1 -1
  37. package/.next/server/app/api/history/[id]/route.js.nft.json +1 -1
  38. package/.next/server/app/api/history/route.js.nft.json +1 -1
  39. package/.next/server/app/api/models/route.js.nft.json +1 -1
  40. package/.next/server/app/api/models-config/route.js.nft.json +1 -1
  41. package/.next/server/app/api/models-config/test/route.js.nft.json +1 -1
  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.nft.json +1 -1
  44. package/.next/server/app/api/sessions/[id]/export/route.js.nft.json +1 -1
  45. package/.next/server/app/api/sessions/[id]/route.js.nft.json +1 -1
  46. package/.next/server/app/api/sessions/route.js.nft.json +1 -1
  47. package/.next/server/app/api/settings/default-model/route.js.nft.json +1 -1
  48. package/.next/server/app/api/share/[token]/route.js.nft.json +1 -1
  49. package/.next/server/app/api/skills/install/route.js +1 -1
  50. package/.next/server/app/api/skills/route.js.nft.json +1 -1
  51. package/.next/server/app/api/skills/search/route.js +1 -1
  52. package/.next/server/app/api/terminal/run/[...cwd]/route.js.nft.json +1 -1
  53. package/.next/server/app/api/terminal/state/[...cwd]/route.js.nft.json +1 -1
  54. package/.next/server/app/api/terminal/stop/[...cwd]/route.js.nft.json +1 -1
  55. package/.next/server/app/api/terminal/stream/[...cwd]/route.js.nft.json +1 -1
  56. package/.next/server/app/api/usage/route.js.nft.json +1 -1
  57. package/.next/server/app/index.html +1 -1
  58. package/.next/server/app/index.rsc +3 -3
  59. package/.next/server/app/index.segments/__PAGE__.segment.rsc +2 -2
  60. package/.next/server/app/index.segments/_full.segment.rsc +3 -3
  61. package/.next/server/app/index.segments/_head.segment.rsc +1 -1
  62. package/.next/server/app/index.segments/_index.segment.rsc +2 -2
  63. package/.next/server/app/index.segments/_tree.segment.rsc +2 -2
  64. package/.next/server/app/page.js +2 -2
  65. package/.next/server/app/page_client-reference-manifest.js +1 -1
  66. package/.next/server/app/share/[token]/page_client-reference-manifest.js +1 -1
  67. package/.next/server/app-paths-manifest.json +3 -3
  68. package/.next/server/chunks/349.js +1 -1
  69. package/.next/server/middleware-build-manifest.js +1 -1
  70. package/.next/server/middleware-manifest.json +5 -5
  71. package/.next/server/pages/404.html +1 -1
  72. package/.next/server/pages/500.html +1 -1
  73. package/.next/server/server-reference-manifest.json +1 -1
  74. package/.next/static/chunks/{2261-1213d31c519af896.js → 2261-bdeacd38bbdf7a65.js} +1 -1
  75. package/.next/static/chunks/app/page-240da53b31249b0a.js +2 -0
  76. package/.next/static/css/bdd24a16bf93fd97.css +1 -0
  77. package/.next/trace +84 -84
  78. package/.next/trace-build +1 -1
  79. package/README.md +20 -3
  80. package/bin/pi-app.js +20 -6
  81. package/next.config.ts +4 -0
  82. package/package.json +10 -6
  83. package/public/Pi-LOGO.png +0 -0
  84. package/.next/static/chunks/app/page-84b8dd2798476830.js +0 -2
  85. package/.next/static/css/55427e8acf53e124.css +0 -1
  86. /package/.next/static/{jWlwtI3NyKCLPvodN51mW → TvNuzm5Eu3aGFWQZG7rO-}/_buildManifest.js +0 -0
  87. /package/.next/static/{jWlwtI3NyKCLPvodN51mW → TvNuzm5Eu3aGFWQZG7rO-}/_ssgManifest.js +0 -0
package/.next/trace-build CHANGED
@@ -1 +1 @@
1
- [{"name":"run-webpack","duration":27621811,"timestamp":103599810,"id":14,"parentId":1,"tags":{},"startTime":1781236908245,"traceId":"5f754b610205c293"},{"name":"run-typescript","duration":9176197,"timestamp":131225701,"id":8606,"parentId":1,"tags":{},"startTime":1781236935871,"traceId":"5f754b610205c293"},{"name":"static-check","duration":2013706,"timestamp":140462785,"id":8609,"parentId":1,"tags":{},"startTime":1781236945108,"traceId":"5f754b610205c293"},{"name":"static-generation","duration":5691335,"timestamp":142616080,"id":8725,"parentId":1,"tags":{},"startTime":1781236947261,"traceId":"5f754b610205c293"},{"name":"collect-build-traces","duration":44982767,"timestamp":142478872,"id":8722,"parentId":1,"tags":{},"startTime":1781236947124,"traceId":"5f754b610205c293"},{"name":"telemetry-flush","duration":46,"timestamp":187465911,"id":8734,"parentId":1,"tags":{},"startTime":1781236992111,"traceId":"5f754b610205c293"},{"name":"next-build","duration":84163070,"timestamp":103302897,"id":1,"tags":{"buildMode":"default","version":"16.2.6","bundler":"webpack","has-custom-webpack-config":"true","use-build-worker":"false"},"startTime":1781236907948,"traceId":"5f754b610205c293"}]
1
+ [{"name":"run-webpack","duration":27347069,"timestamp":92973653,"id":14,"parentId":1,"tags":{},"startTime":1781346011556,"traceId":"349378cb380aff32"},{"name":"run-typescript","duration":8919432,"timestamp":120324887,"id":8606,"parentId":1,"tags":{},"startTime":1781346038907,"traceId":"349378cb380aff32"},{"name":"static-check","duration":1882855,"timestamp":129310228,"id":8609,"parentId":1,"tags":{},"startTime":1781346047892,"traceId":"349378cb380aff32"},{"name":"static-generation","duration":5170340,"timestamp":132034560,"id":8725,"parentId":1,"tags":{},"startTime":1781346050616,"traceId":"349378cb380aff32"},{"name":"collect-build-traces","duration":40893260,"timestamp":131196041,"id":8722,"parentId":1,"tags":{},"startTime":1781346049778,"traceId":"349378cb380aff32"},{"name":"telemetry-flush","duration":51,"timestamp":172092573,"id":8734,"parentId":1,"tags":{},"startTime":1781346090674,"traceId":"349378cb380aff32"},{"name":"next-build","duration":79258040,"timestamp":92834596,"id":1,"tags":{"buildMode":"default","version":"16.2.6","bundler":"webpack","has-custom-webpack-config":"true","use-build-worker":"false"},"startTime":1781346011416,"traceId":"349378cb380aff32"}]
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.1",
3
+ "version": "0.8.5",
4
4
  "description": "Web UI for the pi coding agent",
5
5
  "license": "MIT",
6
6
  "homepage": "https://github.com/asiachrispy/pi-app",
@@ -42,6 +42,12 @@
42
42
  "postinstall": "node scripts/install-cli.mjs",
43
43
  "postuninstall": "node scripts/uninstall-cli.mjs",
44
44
  "package:macos": "bash scripts/package-macos-app.sh",
45
+ "release:sync-pi": "bash scripts/sync-pi-upstream.sh",
46
+ "release:sync-pi-deps": "bash scripts/sync-pi-deps.sh",
47
+ "release:prepare": "bash scripts/release-pi-app.sh",
48
+ "release:github": "bash scripts/github-release.sh",
49
+ "release:version": "node scripts/release-version.mjs",
50
+ "release:check": "node scripts/release-version.mjs --check",
45
51
  "tunnel:cloudflare": "bash scripts/tunnel-cloudflared.sh",
46
52
  "relay:server": "node --experimental-strip-types scripts/pi-relay-server.ts",
47
53
  "relay:host": "node --experimental-strip-types scripts/pi-relay-host.ts",
@@ -50,8 +56,8 @@
50
56
  "prepublishOnly": "node_modules/.bin/tsc --noEmit && node_modules/.bin/vitest run"
51
57
  },
52
58
  "dependencies": {
53
- "@earendil-works/pi-ai": "0.79.0",
54
- "@earendil-works/pi-coding-agent": "0.79.0",
59
+ "@earendil-works/pi-ai": "0.79.3",
60
+ "@earendil-works/pi-coding-agent": "0.79.3",
55
61
  "@lobehub/icons": "5.10.0",
56
62
  "@types/react-syntax-highlighter": "15.5.13",
57
63
  "katex": "0.17.0",
@@ -78,15 +84,13 @@
78
84
  "@types/react-dom": "19.2.3",
79
85
  "eslint": "9.39.4",
80
86
  "eslint-config-next": "16.2.6",
87
+ "jsdom": "27.4.0",
81
88
  "playwright": "1.60.0",
82
89
  "postcss": "8.5.15",
83
90
  "tailwindcss": "4.3.0",
84
91
  "typescript": "5.9.3",
85
92
  "vitest": "4.1.8"
86
93
  },
87
- "optionalDependencies": {
88
- "pi-fetch-tool": "0.1.5"
89
- },
90
94
  "overrides": {
91
95
  "js-cookie": "3.0.8",
92
96
  "mermaid": "11.15.0"
Binary file