@lyhue1991/pi-web 0.8.6

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 (503) hide show
  1. package/.next/BUILD_ID +1 -0
  2. package/.next/app-path-routes-manifest.json +46 -0
  3. package/.next/build-manifest.json +20 -0
  4. package/.next/diagnostics/build-diagnostics.json +6 -0
  5. package/.next/diagnostics/framework.json +1 -0
  6. package/.next/export-marker.json +6 -0
  7. package/.next/images-manifest.json +68 -0
  8. package/.next/next-minimal-server.js.nft.json +1 -0
  9. package/.next/next-server.js.nft.json +1 -0
  10. package/.next/package.json +1 -0
  11. package/.next/prerender-manifest.json +143 -0
  12. package/.next/react-loadable-manifest.json +2258 -0
  13. package/.next/required-server-files.js +349 -0
  14. package/.next/required-server-files.json +349 -0
  15. package/.next/routes-manifest.json +372 -0
  16. package/.next/server/app/_global-error/page.js +32 -0
  17. package/.next/server/app/_global-error/page.js.nft.json +1 -0
  18. package/.next/server/app/_global-error/page_client-reference-manifest.js +1 -0
  19. package/.next/server/app/_global-error.html +1 -0
  20. package/.next/server/app/_global-error.meta +16 -0
  21. package/.next/server/app/_global-error.rsc +14 -0
  22. package/.next/server/app/_global-error.segments/_full.segment.rsc +14 -0
  23. package/.next/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +5 -0
  24. package/.next/server/app/_global-error.segments/_global-error.segment.rsc +5 -0
  25. package/.next/server/app/_global-error.segments/_head.segment.rsc +5 -0
  26. package/.next/server/app/_global-error.segments/_index.segment.rsc +5 -0
  27. package/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -0
  28. package/.next/server/app/_not-found/page.js +2 -0
  29. package/.next/server/app/_not-found/page.js.nft.json +1 -0
  30. package/.next/server/app/_not-found/page_client-reference-manifest.js +1 -0
  31. package/.next/server/app/_not-found.html +1 -0
  32. package/.next/server/app/_not-found.meta +16 -0
  33. package/.next/server/app/_not-found.rsc +20 -0
  34. package/.next/server/app/_not-found.segments/_full.segment.rsc +20 -0
  35. package/.next/server/app/_not-found.segments/_head.segment.rsc +6 -0
  36. package/.next/server/app/_not-found.segments/_index.segment.rsc +7 -0
  37. package/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +5 -0
  38. package/.next/server/app/_not-found.segments/_not-found.segment.rsc +5 -0
  39. package/.next/server/app/_not-found.segments/_tree.segment.rsc +5 -0
  40. package/.next/server/app/api/agent/[id]/bash-output/route.js +1 -0
  41. package/.next/server/app/api/agent/[id]/bash-output/route.js.nft.json +1 -0
  42. package/.next/server/app/api/agent/[id]/bash-output/route_client-reference-manifest.js +1 -0
  43. package/.next/server/app/api/agent/[id]/events/route.js +3 -0
  44. package/.next/server/app/api/agent/[id]/events/route.js.nft.json +1 -0
  45. package/.next/server/app/api/agent/[id]/events/route_client-reference-manifest.js +1 -0
  46. package/.next/server/app/api/agent/[id]/route.js +1 -0
  47. package/.next/server/app/api/agent/[id]/route.js.nft.json +1 -0
  48. package/.next/server/app/api/agent/[id]/route_client-reference-manifest.js +1 -0
  49. package/.next/server/app/api/agent/new/route.js +1 -0
  50. package/.next/server/app/api/agent/new/route.js.nft.json +1 -0
  51. package/.next/server/app/api/agent/new/route_client-reference-manifest.js +1 -0
  52. package/.next/server/app/api/agent/running/events/route.js +3 -0
  53. package/.next/server/app/api/agent/running/events/route.js.nft.json +1 -0
  54. package/.next/server/app/api/agent/running/events/route_client-reference-manifest.js +1 -0
  55. package/.next/server/app/api/agent/running/route.js +1 -0
  56. package/.next/server/app/api/agent/running/route.js.nft.json +1 -0
  57. package/.next/server/app/api/agent/running/route_client-reference-manifest.js +1 -0
  58. package/.next/server/app/api/auth/all-providers/route.js +1 -0
  59. package/.next/server/app/api/auth/all-providers/route.js.nft.json +1 -0
  60. package/.next/server/app/api/auth/all-providers/route_client-reference-manifest.js +1 -0
  61. package/.next/server/app/api/auth/api-key/[provider]/route.js +1 -0
  62. package/.next/server/app/api/auth/api-key/[provider]/route.js.nft.json +1 -0
  63. package/.next/server/app/api/auth/api-key/[provider]/route_client-reference-manifest.js +1 -0
  64. package/.next/server/app/api/auth/login/[provider]/route.js +3 -0
  65. package/.next/server/app/api/auth/login/[provider]/route.js.nft.json +1 -0
  66. package/.next/server/app/api/auth/login/[provider]/route_client-reference-manifest.js +1 -0
  67. package/.next/server/app/api/auth/logout/[provider]/route.js +1 -0
  68. package/.next/server/app/api/auth/logout/[provider]/route.js.nft.json +1 -0
  69. package/.next/server/app/api/auth/logout/[provider]/route_client-reference-manifest.js +1 -0
  70. package/.next/server/app/api/auth/providers/route.js +1 -0
  71. package/.next/server/app/api/auth/providers/route.js.nft.json +1 -0
  72. package/.next/server/app/api/auth/providers/route_client-reference-manifest.js +1 -0
  73. package/.next/server/app/api/cwd/browse/route.js +1 -0
  74. package/.next/server/app/api/cwd/browse/route.js.nft.json +1 -0
  75. package/.next/server/app/api/cwd/browse/route_client-reference-manifest.js +1 -0
  76. package/.next/server/app/api/cwd/validate/route.js +1 -0
  77. package/.next/server/app/api/cwd/validate/route.js.nft.json +1 -0
  78. package/.next/server/app/api/cwd/validate/route_client-reference-manifest.js +1 -0
  79. package/.next/server/app/api/default-cwd/route.js +1 -0
  80. package/.next/server/app/api/default-cwd/route.js.nft.json +1 -0
  81. package/.next/server/app/api/default-cwd/route_client-reference-manifest.js +1 -0
  82. package/.next/server/app/api/file-index/route.js +1 -0
  83. package/.next/server/app/api/file-index/route.js.nft.json +1 -0
  84. package/.next/server/app/api/file-index/route_client-reference-manifest.js +1 -0
  85. package/.next/server/app/api/files/[...path]/route.js +49 -0
  86. package/.next/server/app/api/files/[...path]/route.js.nft.json +1 -0
  87. package/.next/server/app/api/files/[...path]/route_client-reference-manifest.js +1 -0
  88. package/.next/server/app/api/git/diff/route.js +6 -0
  89. package/.next/server/app/api/git/diff/route.js.nft.json +1 -0
  90. package/.next/server/app/api/git/diff/route_client-reference-manifest.js +1 -0
  91. package/.next/server/app/api/git/status/route.js +6 -0
  92. package/.next/server/app/api/git/status/route.js.nft.json +1 -0
  93. package/.next/server/app/api/git/status/route_client-reference-manifest.js +1 -0
  94. package/.next/server/app/api/home/route.js +1 -0
  95. package/.next/server/app/api/home/route.js.nft.json +1 -0
  96. package/.next/server/app/api/home/route_client-reference-manifest.js +1 -0
  97. package/.next/server/app/api/models/route.js +1 -0
  98. package/.next/server/app/api/models/route.js.nft.json +1 -0
  99. package/.next/server/app/api/models/route_client-reference-manifest.js +1 -0
  100. package/.next/server/app/api/models-config/catalog/route.js +1 -0
  101. package/.next/server/app/api/models-config/catalog/route.js.nft.json +1 -0
  102. package/.next/server/app/api/models-config/catalog/route_client-reference-manifest.js +1 -0
  103. package/.next/server/app/api/models-config/discover/route.js +1 -0
  104. package/.next/server/app/api/models-config/discover/route.js.nft.json +1 -0
  105. package/.next/server/app/api/models-config/discover/route_client-reference-manifest.js +1 -0
  106. package/.next/server/app/api/models-config/route.js +1 -0
  107. package/.next/server/app/api/models-config/route.js.nft.json +1 -0
  108. package/.next/server/app/api/models-config/route_client-reference-manifest.js +1 -0
  109. package/.next/server/app/api/models-config/test/route.js +1 -0
  110. package/.next/server/app/api/models-config/test/route.js.nft.json +1 -0
  111. package/.next/server/app/api/models-config/test/route_client-reference-manifest.js +1 -0
  112. package/.next/server/app/api/plugins/route.js +1 -0
  113. package/.next/server/app/api/plugins/route.js.nft.json +1 -0
  114. package/.next/server/app/api/plugins/route_client-reference-manifest.js +1 -0
  115. package/.next/server/app/api/project-trust/route.js +1 -0
  116. package/.next/server/app/api/project-trust/route.js.nft.json +1 -0
  117. package/.next/server/app/api/project-trust/route_client-reference-manifest.js +1 -0
  118. package/.next/server/app/api/sessions/[id]/auto-name/route.js +10 -0
  119. package/.next/server/app/api/sessions/[id]/auto-name/route.js.nft.json +1 -0
  120. package/.next/server/app/api/sessions/[id]/auto-name/route_client-reference-manifest.js +1 -0
  121. package/.next/server/app/api/sessions/[id]/context/route.js +1 -0
  122. package/.next/server/app/api/sessions/[id]/context/route.js.nft.json +1 -0
  123. package/.next/server/app/api/sessions/[id]/context/route_client-reference-manifest.js +1 -0
  124. package/.next/server/app/api/sessions/[id]/entries/[entryId]/thinking/route.js +1 -0
  125. package/.next/server/app/api/sessions/[id]/entries/[entryId]/thinking/route.js.nft.json +1 -0
  126. package/.next/server/app/api/sessions/[id]/entries/[entryId]/thinking/route_client-reference-manifest.js +1 -0
  127. package/.next/server/app/api/sessions/[id]/export/route.js +54 -0
  128. package/.next/server/app/api/sessions/[id]/export/route.js.nft.json +1 -0
  129. package/.next/server/app/api/sessions/[id]/export/route_client-reference-manifest.js +1 -0
  130. package/.next/server/app/api/sessions/[id]/route.js +1 -0
  131. package/.next/server/app/api/sessions/[id]/route.js.nft.json +1 -0
  132. package/.next/server/app/api/sessions/[id]/route_client-reference-manifest.js +1 -0
  133. package/.next/server/app/api/sessions/[id]/state/route.js +1 -0
  134. package/.next/server/app/api/sessions/[id]/state/route.js.nft.json +1 -0
  135. package/.next/server/app/api/sessions/[id]/state/route_client-reference-manifest.js +1 -0
  136. package/.next/server/app/api/sessions/route.js +1 -0
  137. package/.next/server/app/api/sessions/route.js.nft.json +1 -0
  138. package/.next/server/app/api/sessions/route_client-reference-manifest.js +1 -0
  139. package/.next/server/app/api/skills/check/route.js +1 -0
  140. package/.next/server/app/api/skills/check/route.js.nft.json +1 -0
  141. package/.next/server/app/api/skills/check/route_client-reference-manifest.js +1 -0
  142. package/.next/server/app/api/skills/install/route.js +1 -0
  143. package/.next/server/app/api/skills/install/route.js.nft.json +1 -0
  144. package/.next/server/app/api/skills/install/route_client-reference-manifest.js +1 -0
  145. package/.next/server/app/api/skills/route.js +6 -0
  146. package/.next/server/app/api/skills/route.js.nft.json +1 -0
  147. package/.next/server/app/api/skills/route_client-reference-manifest.js +1 -0
  148. package/.next/server/app/api/skills/search/route.js +1 -0
  149. package/.next/server/app/api/skills/search/route.js.nft.json +1 -0
  150. package/.next/server/app/api/skills/search/route_client-reference-manifest.js +1 -0
  151. package/.next/server/app/api/skills/update/route.js +1 -0
  152. package/.next/server/app/api/skills/update/route.js.nft.json +1 -0
  153. package/.next/server/app/api/skills/update/route_client-reference-manifest.js +1 -0
  154. package/.next/server/app/api/worktrees/route.js +1 -0
  155. package/.next/server/app/api/worktrees/route.js.nft.json +1 -0
  156. package/.next/server/app/api/worktrees/route_client-reference-manifest.js +1 -0
  157. package/.next/server/app/favicon.ico/route.js +1 -0
  158. package/.next/server/app/favicon.ico/route.js.nft.json +1 -0
  159. package/.next/server/app/favicon.ico.body +0 -0
  160. package/.next/server/app/favicon.ico.meta +1 -0
  161. package/.next/server/app/index.html +1 -0
  162. package/.next/server/app/index.meta +14 -0
  163. package/.next/server/app/index.rsc +21 -0
  164. package/.next/server/app/index.segments/__PAGE__.segment.rsc +8 -0
  165. package/.next/server/app/index.segments/_full.segment.rsc +21 -0
  166. package/.next/server/app/index.segments/_head.segment.rsc +6 -0
  167. package/.next/server/app/index.segments/_index.segment.rsc +7 -0
  168. package/.next/server/app/index.segments/_tree.segment.rsc +6 -0
  169. package/.next/server/app/manifest.webmanifest/route.js +16 -0
  170. package/.next/server/app/manifest.webmanifest/route.js.nft.json +1 -0
  171. package/.next/server/app/manifest.webmanifest/route_client-reference-manifest.js +1 -0
  172. package/.next/server/app/manifest.webmanifest.body +1 -0
  173. package/.next/server/app/manifest.webmanifest.meta +1 -0
  174. package/.next/server/app/page.js +73 -0
  175. package/.next/server/app/page.js.nft.json +1 -0
  176. package/.next/server/app/page_client-reference-manifest.js +1 -0
  177. package/.next/server/app-paths-manifest.json +46 -0
  178. package/.next/server/chunks/1030.js +1 -0
  179. package/.next/server/chunks/1048.js +1 -0
  180. package/.next/server/chunks/1198.js +5 -0
  181. package/.next/server/chunks/123.js +79 -0
  182. package/.next/server/chunks/1309.js +14 -0
  183. package/.next/server/chunks/165.js +1 -0
  184. package/.next/server/chunks/1813.js +1 -0
  185. package/.next/server/chunks/2055.js +1 -0
  186. package/.next/server/chunks/2325.js +80 -0
  187. package/.next/server/chunks/2349.js +1 -0
  188. package/.next/server/chunks/258.js +1 -0
  189. package/.next/server/chunks/2715.js +1 -0
  190. package/.next/server/chunks/2778.js +1 -0
  191. package/.next/server/chunks/2943.js +1 -0
  192. package/.next/server/chunks/3000.js +4 -0
  193. package/.next/server/chunks/3052.js +1 -0
  194. package/.next/server/chunks/3054.js +148 -0
  195. package/.next/server/chunks/3181.js +1 -0
  196. package/.next/server/chunks/319.js +45 -0
  197. package/.next/server/chunks/3379.js +1 -0
  198. package/.next/server/chunks/3397.js +29 -0
  199. package/.next/server/chunks/358.js +19 -0
  200. package/.next/server/chunks/3672.js +1 -0
  201. package/.next/server/chunks/3818.js +1 -0
  202. package/.next/server/chunks/4120.js +148 -0
  203. package/.next/server/chunks/4266.js +1 -0
  204. package/.next/server/chunks/4365.js +43 -0
  205. package/.next/server/chunks/4407.js +23 -0
  206. package/.next/server/chunks/4741.js +20 -0
  207. package/.next/server/chunks/4768.js +80 -0
  208. package/.next/server/chunks/4893.js +1 -0
  209. package/.next/server/chunks/5409.js +1 -0
  210. package/.next/server/chunks/5414.js +1 -0
  211. package/.next/server/chunks/5460.js +255 -0
  212. package/.next/server/chunks/5582.js +3 -0
  213. package/.next/server/chunks/5737.js +24 -0
  214. package/.next/server/chunks/5773.js +104 -0
  215. package/.next/server/chunks/5985.js +24 -0
  216. package/.next/server/chunks/6073.js +64 -0
  217. package/.next/server/chunks/6346.js +1 -0
  218. package/.next/server/chunks/6429.js +1 -0
  219. package/.next/server/chunks/6900.js +90 -0
  220. package/.next/server/chunks/6953.js +1 -0
  221. package/.next/server/chunks/7058.js +166 -0
  222. package/.next/server/chunks/7162.js +287 -0
  223. package/.next/server/chunks/7287.js +141 -0
  224. package/.next/server/chunks/7307.js +1 -0
  225. package/.next/server/chunks/7424.js +4 -0
  226. package/.next/server/chunks/7635.js +1 -0
  227. package/.next/server/chunks/7702.js +93 -0
  228. package/.next/server/chunks/7960.js +1 -0
  229. package/.next/server/chunks/812.js +226 -0
  230. package/.next/server/chunks/8276.js +1 -0
  231. package/.next/server/chunks/8360.js +36 -0
  232. package/.next/server/chunks/8361.js +1 -0
  233. package/.next/server/chunks/8430.js +1 -0
  234. package/.next/server/chunks/8469.js +9 -0
  235. package/.next/server/chunks/8490.js +1 -0
  236. package/.next/server/chunks/8704.js +115 -0
  237. package/.next/server/chunks/9703.js +215 -0
  238. package/.next/server/chunks/974.js +1 -0
  239. package/.next/server/chunks/9963.js +1 -0
  240. package/.next/server/chunks/static/media/macos-trash.6c01a2a6 +0 -0
  241. package/.next/server/chunks/static/media/windows-trash.2b7fe177.exe +0 -0
  242. package/.next/server/functions-config-manifest.json +19 -0
  243. package/.next/server/instrumentation.js +1 -0
  244. package/.next/server/instrumentation.js.nft.json +1 -0
  245. package/.next/server/interception-route-rewrite-manifest.js +1 -0
  246. package/.next/server/middleware-build-manifest.js +1 -0
  247. package/.next/server/middleware-manifest.json +6 -0
  248. package/.next/server/middleware-react-loadable-manifest.js +1 -0
  249. package/.next/server/middleware.js +18 -0
  250. package/.next/server/middleware.js.nft.json +1 -0
  251. package/.next/server/next-font-manifest.js +1 -0
  252. package/.next/server/next-font-manifest.json +1 -0
  253. package/.next/server/pages/404.html +1 -0
  254. package/.next/server/pages/500.html +1 -0
  255. package/.next/server/pages-manifest.json +4 -0
  256. package/.next/server/prefetch-hints.json +1 -0
  257. package/.next/server/server-reference-manifest.js +1 -0
  258. package/.next/server/server-reference-manifest.json +1 -0
  259. package/.next/server/webpack-runtime.js +1 -0
  260. package/.next/static/JpAkqjRvCHtp3M_ChE6_B/_buildManifest.js +1 -0
  261. package/.next/static/JpAkqjRvCHtp3M_ChE6_B/_ssgManifest.js +1 -0
  262. package/.next/static/chunks/122.eef9274869d2a305.js +287 -0
  263. package/.next/static/chunks/1407.28a7fb037c2b2f35.js +43 -0
  264. package/.next/static/chunks/164.ab76942aa0c3ec72.js +1 -0
  265. package/.next/static/chunks/1744.78ed01e4e93054c1.js +93 -0
  266. package/.next/static/chunks/1812.9d1e5ae0d68e6c24.js +76 -0
  267. package/.next/static/chunks/1921.2c58179657f0a6da.js +90 -0
  268. package/.next/static/chunks/1978.260c2b48f817965f.js +1 -0
  269. package/.next/static/chunks/2082.1535d602444ae4c1.js +1 -0
  270. package/.next/static/chunks/288.d969aeba2ab92928.js +1 -0
  271. package/.next/static/chunks/318.3fee3527eeabc956.js +4 -0
  272. package/.next/static/chunks/330.f851561e21edfbbb.js +19 -0
  273. package/.next/static/chunks/348d3b01.d472dd6bc52ab90c.js +148 -0
  274. package/.next/static/chunks/3762.d5c709991fc322ef.js +148 -0
  275. package/.next/static/chunks/3794-1b03b52e3112452e.js +32 -0
  276. package/.next/static/chunks/3916.0ba385e8bbb9cc14.js +1 -0
  277. package/.next/static/chunks/4021.cdd3c8f1def79a10.js +1 -0
  278. package/.next/static/chunks/4178.0212bbaaa6124460.js +115 -0
  279. package/.next/static/chunks/4389.18c637d4861a0624.js +215 -0
  280. package/.next/static/chunks/4823.276e9524d3742f1c.js +141 -0
  281. package/.next/static/chunks/4829.cf1d50e43e6d9db5.js +1 -0
  282. package/.next/static/chunks/4bd1b696-e356ca5ba0218e27.js +1 -0
  283. package/.next/static/chunks/5019.b5a1a2b8daf17525.js +1 -0
  284. package/.next/static/chunks/5326.69460442bdcd6cd3.js +1 -0
  285. package/.next/static/chunks/5336.d3fa82872c826f30.js +79 -0
  286. package/.next/static/chunks/5590.ef62922166d308b4.js +1 -0
  287. package/.next/static/chunks/5627.62050808924cacee.js +23 -0
  288. package/.next/static/chunks/5690.9d6eb1edb1399995.js +1 -0
  289. package/.next/static/chunks/58bb9007.3ddd5d34c5f548be.js +80 -0
  290. package/.next/static/chunks/6071.e9deb627fefd3a20.js +104 -0
  291. package/.next/static/chunks/6600.583c88eef37aa524.js +1 -0
  292. package/.next/static/chunks/6710.5b0cfa12a8f68eb9.js +36 -0
  293. package/.next/static/chunks/744.e67714b764b7bed0.js +166 -0
  294. package/.next/static/chunks/7478.c2572eb272c8f7ac.js +80 -0
  295. package/.next/static/chunks/75.70c23d2729f4ae2c.js +9 -0
  296. package/.next/static/chunks/7563.d8fbeed6a250a962.js +64 -0
  297. package/.next/static/chunks/7704.a79a089b1c6a8099.js +5 -0
  298. package/.next/static/chunks/7874.8db6929b94cdf697.js +1 -0
  299. package/.next/static/chunks/7948.aca281219bad1ab4.js +1 -0
  300. package/.next/static/chunks/8311-95813758da2b283c.js +1 -0
  301. package/.next/static/chunks/8538.9462238529bbdc80.js +226 -0
  302. package/.next/static/chunks/8568.f85d8b36fc9a9037.js +1 -0
  303. package/.next/static/chunks/8603.7619d9ceac35ae03.js +1 -0
  304. package/.next/static/chunks/8783.8586d8ca9ef1dce8.js +24 -0
  305. package/.next/static/chunks/8863.bd7e87f75e046db5.js +1 -0
  306. package/.next/static/chunks/8889.1ed3f1aa3ac49dd9.js +29 -0
  307. package/.next/static/chunks/895.a198d303969f1c01.js +24 -0
  308. package/.next/static/chunks/90542734.b75ad0df50bf68f5.js +1 -0
  309. package/.next/static/chunks/9242.a1894a4c754b979d.js +1 -0
  310. package/.next/static/chunks/9471.a7e240888c3a75bc.js +1 -0
  311. package/.next/static/chunks/9500.1488aec06ee78127.js +1 -0
  312. package/.next/static/chunks/9529.438891449b77abc7.js +1 -0
  313. package/.next/static/chunks/9633.155548b5fca6e580.js +1 -0
  314. package/.next/static/chunks/9779.673004a62d70e36a.js +1 -0
  315. package/.next/static/chunks/app/_global-error/page-35860f4efe0047e5.js +1 -0
  316. package/.next/static/chunks/app/_not-found/page-ccc1f1aeb5ecc593.js +1 -0
  317. package/.next/static/chunks/app/api/agent/[id]/bash-output/route-35860f4efe0047e5.js +1 -0
  318. package/.next/static/chunks/app/api/agent/[id]/events/route-35860f4efe0047e5.js +1 -0
  319. package/.next/static/chunks/app/api/agent/[id]/route-35860f4efe0047e5.js +1 -0
  320. package/.next/static/chunks/app/api/agent/new/route-35860f4efe0047e5.js +1 -0
  321. package/.next/static/chunks/app/api/agent/running/events/route-35860f4efe0047e5.js +1 -0
  322. package/.next/static/chunks/app/api/agent/running/route-35860f4efe0047e5.js +1 -0
  323. package/.next/static/chunks/app/api/auth/all-providers/route-35860f4efe0047e5.js +1 -0
  324. package/.next/static/chunks/app/api/auth/api-key/[provider]/route-35860f4efe0047e5.js +1 -0
  325. package/.next/static/chunks/app/api/auth/login/[provider]/route-35860f4efe0047e5.js +1 -0
  326. package/.next/static/chunks/app/api/auth/logout/[provider]/route-35860f4efe0047e5.js +1 -0
  327. package/.next/static/chunks/app/api/auth/providers/route-35860f4efe0047e5.js +1 -0
  328. package/.next/static/chunks/app/api/cwd/browse/route-35860f4efe0047e5.js +1 -0
  329. package/.next/static/chunks/app/api/cwd/validate/route-35860f4efe0047e5.js +1 -0
  330. package/.next/static/chunks/app/api/default-cwd/route-35860f4efe0047e5.js +1 -0
  331. package/.next/static/chunks/app/api/file-index/route-35860f4efe0047e5.js +1 -0
  332. package/.next/static/chunks/app/api/files/[...path]/route-35860f4efe0047e5.js +1 -0
  333. package/.next/static/chunks/app/api/git/diff/route-35860f4efe0047e5.js +1 -0
  334. package/.next/static/chunks/app/api/git/status/route-35860f4efe0047e5.js +1 -0
  335. package/.next/static/chunks/app/api/home/route-35860f4efe0047e5.js +1 -0
  336. package/.next/static/chunks/app/api/models/route-35860f4efe0047e5.js +1 -0
  337. package/.next/static/chunks/app/api/models-config/catalog/route-35860f4efe0047e5.js +1 -0
  338. package/.next/static/chunks/app/api/models-config/discover/route-35860f4efe0047e5.js +1 -0
  339. package/.next/static/chunks/app/api/models-config/route-35860f4efe0047e5.js +1 -0
  340. package/.next/static/chunks/app/api/models-config/test/route-35860f4efe0047e5.js +1 -0
  341. package/.next/static/chunks/app/api/plugins/route-35860f4efe0047e5.js +1 -0
  342. package/.next/static/chunks/app/api/project-trust/route-35860f4efe0047e5.js +1 -0
  343. package/.next/static/chunks/app/api/sessions/[id]/auto-name/route-35860f4efe0047e5.js +1 -0
  344. package/.next/static/chunks/app/api/sessions/[id]/context/route-35860f4efe0047e5.js +1 -0
  345. package/.next/static/chunks/app/api/sessions/[id]/entries/[entryId]/thinking/route-35860f4efe0047e5.js +1 -0
  346. package/.next/static/chunks/app/api/sessions/[id]/export/route-35860f4efe0047e5.js +1 -0
  347. package/.next/static/chunks/app/api/sessions/[id]/route-35860f4efe0047e5.js +1 -0
  348. package/.next/static/chunks/app/api/sessions/[id]/state/route-35860f4efe0047e5.js +1 -0
  349. package/.next/static/chunks/app/api/sessions/route-35860f4efe0047e5.js +1 -0
  350. package/.next/static/chunks/app/api/skills/check/route-35860f4efe0047e5.js +1 -0
  351. package/.next/static/chunks/app/api/skills/install/route-35860f4efe0047e5.js +1 -0
  352. package/.next/static/chunks/app/api/skills/route-35860f4efe0047e5.js +1 -0
  353. package/.next/static/chunks/app/api/skills/search/route-35860f4efe0047e5.js +1 -0
  354. package/.next/static/chunks/app/api/skills/update/route-35860f4efe0047e5.js +1 -0
  355. package/.next/static/chunks/app/api/worktrees/route-35860f4efe0047e5.js +1 -0
  356. package/.next/static/chunks/app/layout-ca97634a96114a03.js +1 -0
  357. package/.next/static/chunks/app/manifest.webmanifest/route-35860f4efe0047e5.js +1 -0
  358. package/.next/static/chunks/app/page-4be55877df86a39c.js +72 -0
  359. package/.next/static/chunks/c9a5f755.309e1bea31640a4c.js +119 -0
  360. package/.next/static/chunks/d3ac728e-7964f816a1ca64e5.js +1 -0
  361. package/.next/static/chunks/f2098590.3d4ddddc296bb3a1.js +62 -0
  362. package/.next/static/chunks/framework-711ef29bc66f648c.js +1 -0
  363. package/.next/static/chunks/main-a787264d62ebe041.js +5 -0
  364. package/.next/static/chunks/main-app-44b3ecb27de577ad.js +1 -0
  365. package/.next/static/chunks/next/dist/client/components/builtin/app-error-35860f4efe0047e5.js +1 -0
  366. package/.next/static/chunks/next/dist/client/components/builtin/forbidden-35860f4efe0047e5.js +1 -0
  367. package/.next/static/chunks/next/dist/client/components/builtin/global-error-0ed2693ee1341146.js +1 -0
  368. package/.next/static/chunks/next/dist/client/components/builtin/not-found-35860f4efe0047e5.js +1 -0
  369. package/.next/static/chunks/next/dist/client/components/builtin/unauthorized-35860f4efe0047e5.js +1 -0
  370. package/.next/static/chunks/polyfills-42372ed130431b0a.js +1 -0
  371. package/.next/static/chunks/webpack-35ab8665f48061d4.js +1 -0
  372. package/.next/static/css/03c139a692325b4b.css +1 -0
  373. package/.next/static/css/121a2cf33104c046.css +1 -0
  374. package/.next/static/css/88714c00e109ce28.css +1 -0
  375. package/.next/static/media/15605e25b523335c-s.woff2 +0 -0
  376. package/.next/static/media/1a3dce5cfb5f7760-s.woff2 +0 -0
  377. package/.next/static/media/1cdd02902f937a18-s.woff2 +0 -0
  378. package/.next/static/media/4c4b3b30b6bcb2be-s.woff2 +0 -0
  379. package/.next/static/media/641a7b8a5800ee0e-s.woff2 +0 -0
  380. package/.next/static/media/7deddc85b7ffd1dc-s.p.woff2 +0 -0
  381. package/.next/static/media/KaTeX_AMS-Regular.1608a09b.woff +0 -0
  382. package/.next/static/media/KaTeX_AMS-Regular.4aafdb68.ttf +0 -0
  383. package/.next/static/media/KaTeX_AMS-Regular.a79f1c31.woff2 +0 -0
  384. package/.next/static/media/KaTeX_Caligraphic-Bold.b6770918.woff +0 -0
  385. package/.next/static/media/KaTeX_Caligraphic-Bold.cce5b8ec.ttf +0 -0
  386. package/.next/static/media/KaTeX_Caligraphic-Bold.ec17d132.woff2 +0 -0
  387. package/.next/static/media/KaTeX_Caligraphic-Regular.07ef19e7.ttf +0 -0
  388. package/.next/static/media/KaTeX_Caligraphic-Regular.55fac258.woff2 +0 -0
  389. package/.next/static/media/KaTeX_Caligraphic-Regular.dad44a7f.woff +0 -0
  390. package/.next/static/media/KaTeX_Fraktur-Bold.9f256b85.woff +0 -0
  391. package/.next/static/media/KaTeX_Fraktur-Bold.b18f59e1.ttf +0 -0
  392. package/.next/static/media/KaTeX_Fraktur-Bold.d42a5579.woff2 +0 -0
  393. package/.next/static/media/KaTeX_Fraktur-Regular.7c187121.woff +0 -0
  394. package/.next/static/media/KaTeX_Fraktur-Regular.d3c882a6.woff2 +0 -0
  395. package/.next/static/media/KaTeX_Fraktur-Regular.ed38e79f.ttf +0 -0
  396. package/.next/static/media/KaTeX_Main-Bold.b74a1a8b.ttf +0 -0
  397. package/.next/static/media/KaTeX_Main-Bold.c3fb5ac2.woff2 +0 -0
  398. package/.next/static/media/KaTeX_Main-Bold.d181c465.woff +0 -0
  399. package/.next/static/media/KaTeX_Main-BoldItalic.6f2bb1df.woff2 +0 -0
  400. package/.next/static/media/KaTeX_Main-BoldItalic.70d8b0a5.ttf +0 -0
  401. package/.next/static/media/KaTeX_Main-BoldItalic.e3f82f9d.woff +0 -0
  402. package/.next/static/media/KaTeX_Main-Italic.47373d1e.ttf +0 -0
  403. package/.next/static/media/KaTeX_Main-Italic.8916142b.woff2 +0 -0
  404. package/.next/static/media/KaTeX_Main-Italic.9024d815.woff +0 -0
  405. package/.next/static/media/KaTeX_Main-Regular.0462f03b.woff2 +0 -0
  406. package/.next/static/media/KaTeX_Main-Regular.7f51fe03.woff +0 -0
  407. package/.next/static/media/KaTeX_Main-Regular.b7f8fe9b.ttf +0 -0
  408. package/.next/static/media/KaTeX_Math-BoldItalic.572d331f.woff2 +0 -0
  409. package/.next/static/media/KaTeX_Math-BoldItalic.a879cf83.ttf +0 -0
  410. package/.next/static/media/KaTeX_Math-BoldItalic.f1035d8d.woff +0 -0
  411. package/.next/static/media/KaTeX_Math-Italic.5295ba48.woff +0 -0
  412. package/.next/static/media/KaTeX_Math-Italic.939bc644.ttf +0 -0
  413. package/.next/static/media/KaTeX_Math-Italic.f28c23ac.woff2 +0 -0
  414. package/.next/static/media/KaTeX_SansSerif-Bold.8c5b5494.woff2 +0 -0
  415. package/.next/static/media/KaTeX_SansSerif-Bold.94e1e8dc.ttf +0 -0
  416. package/.next/static/media/KaTeX_SansSerif-Bold.bf59d231.woff +0 -0
  417. package/.next/static/media/KaTeX_SansSerif-Italic.3b1e59b3.woff2 +0 -0
  418. package/.next/static/media/KaTeX_SansSerif-Italic.7c9bc82b.woff +0 -0
  419. package/.next/static/media/KaTeX_SansSerif-Italic.b4c20c84.ttf +0 -0
  420. package/.next/static/media/KaTeX_SansSerif-Regular.74048478.woff +0 -0
  421. package/.next/static/media/KaTeX_SansSerif-Regular.ba21ed5f.woff2 +0 -0
  422. package/.next/static/media/KaTeX_SansSerif-Regular.d4d7ba48.ttf +0 -0
  423. package/.next/static/media/KaTeX_Script-Regular.03e9641d.woff2 +0 -0
  424. package/.next/static/media/KaTeX_Script-Regular.07505710.woff +0 -0
  425. package/.next/static/media/KaTeX_Script-Regular.fe9cbbe1.ttf +0 -0
  426. package/.next/static/media/KaTeX_Size1-Regular.e1e279cb.woff +0 -0
  427. package/.next/static/media/KaTeX_Size1-Regular.eae34984.woff2 +0 -0
  428. package/.next/static/media/KaTeX_Size1-Regular.fabc004a.ttf +0 -0
  429. package/.next/static/media/KaTeX_Size2-Regular.57727022.woff +0 -0
  430. package/.next/static/media/KaTeX_Size2-Regular.5916a24f.woff2 +0 -0
  431. package/.next/static/media/KaTeX_Size2-Regular.d6b476ec.ttf +0 -0
  432. package/.next/static/media/KaTeX_Size3-Regular.9acaf01c.woff +0 -0
  433. package/.next/static/media/KaTeX_Size3-Regular.a144ef58.ttf +0 -0
  434. package/.next/static/media/KaTeX_Size3-Regular.b4230e7e.woff2 +0 -0
  435. package/.next/static/media/KaTeX_Size4-Regular.10d95fd3.woff2 +0 -0
  436. package/.next/static/media/KaTeX_Size4-Regular.7a996c9d.woff +0 -0
  437. package/.next/static/media/KaTeX_Size4-Regular.fbccdabe.ttf +0 -0
  438. package/.next/static/media/KaTeX_Typewriter-Regular.6258592b.woff +0 -0
  439. package/.next/static/media/KaTeX_Typewriter-Regular.a8709e36.woff2 +0 -0
  440. package/.next/static/media/KaTeX_Typewriter-Regular.d97aaf4a.ttf +0 -0
  441. package/.next/static/media/ec14413c594b3356-s.p.woff2 +0 -0
  442. package/.next/trace +37 -0
  443. package/.next/trace-build +1 -0
  444. package/.next/types/app/api/agent/[id]/bash-output/route.ts +351 -0
  445. package/.next/types/app/api/agent/[id]/events/route.ts +351 -0
  446. package/.next/types/app/api/agent/[id]/route.ts +351 -0
  447. package/.next/types/app/api/agent/new/route.ts +351 -0
  448. package/.next/types/app/api/agent/running/events/route.ts +351 -0
  449. package/.next/types/app/api/agent/running/route.ts +351 -0
  450. package/.next/types/app/api/auth/all-providers/route.ts +351 -0
  451. package/.next/types/app/api/auth/api-key/[provider]/route.ts +351 -0
  452. package/.next/types/app/api/auth/login/[provider]/route.ts +351 -0
  453. package/.next/types/app/api/auth/logout/[provider]/route.ts +351 -0
  454. package/.next/types/app/api/auth/providers/route.ts +351 -0
  455. package/.next/types/app/api/cwd/browse/route.ts +351 -0
  456. package/.next/types/app/api/cwd/validate/route.ts +351 -0
  457. package/.next/types/app/api/default-cwd/route.ts +351 -0
  458. package/.next/types/app/api/file-index/route.ts +351 -0
  459. package/.next/types/app/api/files/[...path]/route.ts +351 -0
  460. package/.next/types/app/api/git/diff/route.ts +351 -0
  461. package/.next/types/app/api/git/status/route.ts +351 -0
  462. package/.next/types/app/api/home/route.ts +351 -0
  463. package/.next/types/app/api/models/route.ts +351 -0
  464. package/.next/types/app/api/models-config/catalog/route.ts +351 -0
  465. package/.next/types/app/api/models-config/discover/route.ts +351 -0
  466. package/.next/types/app/api/models-config/route.ts +351 -0
  467. package/.next/types/app/api/models-config/test/route.ts +351 -0
  468. package/.next/types/app/api/plugins/route.ts +351 -0
  469. package/.next/types/app/api/project-trust/route.ts +351 -0
  470. package/.next/types/app/api/sessions/[id]/auto-name/route.ts +351 -0
  471. package/.next/types/app/api/sessions/[id]/context/route.ts +351 -0
  472. package/.next/types/app/api/sessions/[id]/entries/[entryId]/thinking/route.ts +351 -0
  473. package/.next/types/app/api/sessions/[id]/export/route.ts +351 -0
  474. package/.next/types/app/api/sessions/[id]/route.ts +351 -0
  475. package/.next/types/app/api/sessions/[id]/state/route.ts +351 -0
  476. package/.next/types/app/api/sessions/route.ts +351 -0
  477. package/.next/types/app/api/skills/check/route.ts +351 -0
  478. package/.next/types/app/api/skills/install/route.ts +351 -0
  479. package/.next/types/app/api/skills/route.ts +351 -0
  480. package/.next/types/app/api/skills/search/route.ts +351 -0
  481. package/.next/types/app/api/skills/update/route.ts +351 -0
  482. package/.next/types/app/api/worktrees/route.ts +351 -0
  483. package/.next/types/app/layout.ts +87 -0
  484. package/.next/types/app/page.ts +87 -0
  485. package/.next/types/cache-life.d.ts +145 -0
  486. package/.next/types/package.json +1 -0
  487. package/.next/types/routes.d.ts +111 -0
  488. package/.next/types/validator.ts +421 -0
  489. package/LICENSE +21 -0
  490. package/README.ja.md +150 -0
  491. package/README.md +155 -0
  492. package/README.ru.md +155 -0
  493. package/README.zh-CN.md +151 -0
  494. package/bin/node-version.js +35 -0
  495. package/bin/pi-web-options.js +30 -0
  496. package/bin/pi-web.js +96 -0
  497. package/next.config.ts +50 -0
  498. package/package.json +79 -0
  499. package/public/icons/apple-touch-icon.png +0 -0
  500. package/public/icons/icon-192.png +0 -0
  501. package/public/icons/icon-512.png +0 -0
  502. package/public/offline.html +83 -0
  503. package/public/sw.js +76 -0
@@ -0,0 +1,30 @@
1
+ "use strict";
2
+
3
+ // eslint-disable-next-line @typescript-eslint/no-require-imports
4
+ const { parseArgs } = require("util");
5
+
6
+ const TRUE_VALUES = new Set(["1", "true", "yes", "on"]);
7
+
8
+ function isEnabled(value) {
9
+ return typeof value === "string" && TRUE_VALUES.has(value.trim().toLowerCase());
10
+ }
11
+
12
+ function parseLaunchOptions(args = process.argv.slice(2), env = process.env) {
13
+ const { values: cliArgs } = parseArgs({
14
+ args,
15
+ options: {
16
+ port: { type: "string", short: "p" },
17
+ hostname: { type: "string", short: "H" },
18
+ "no-open": { type: "boolean" },
19
+ },
20
+ strict: false,
21
+ });
22
+
23
+ return {
24
+ port: cliArgs.port ?? env.PORT ?? "30141",
25
+ hostname: cliArgs.hostname ?? env.PI_WEB_HOSTNAME ?? "127.0.0.1",
26
+ openBrowser: !cliArgs["no-open"] && !isEnabled(env.PI_WEB_NO_OPEN),
27
+ };
28
+ }
29
+
30
+ module.exports = { parseLaunchOptions };
package/bin/pi-web.js ADDED
@@ -0,0 +1,96 @@
1
+ #!/usr/bin/env node
2
+ "use strict";
3
+
4
+ // eslint-disable-next-line @typescript-eslint/no-require-imports
5
+ const { getUnsupportedNodeVersionMessage, isNodeVersionSupported } = require("./node-version");
6
+
7
+ if (!isNodeVersionSupported(process.versions.node)) {
8
+ console.error(getUnsupportedNodeVersionMessage(process.versions.node));
9
+ process.exit(1);
10
+ }
11
+
12
+ // eslint-disable-next-line @typescript-eslint/no-require-imports
13
+ const { spawn } = require("child_process");
14
+ // eslint-disable-next-line @typescript-eslint/no-require-imports
15
+ const path = require("path");
16
+ // eslint-disable-next-line @typescript-eslint/no-require-imports
17
+ const fs = require("fs");
18
+ // eslint-disable-next-line @typescript-eslint/no-require-imports
19
+ const { parseLaunchOptions } = require("./pi-web-options");
20
+
21
+ const pkgDir = path.join(__dirname, "..");
22
+ const nextDir = path.join(pkgDir, ".next");
23
+
24
+ // Resolve next's CLI entry directly to avoid relying on .bin symlinks (which
25
+ // may not exist when installed via npx).
26
+ let nextBin;
27
+ try {
28
+ nextBin = require.resolve("next/dist/bin/next", { paths: [pkgDir] });
29
+ } catch {
30
+ // Fallback: locate next package root and derive the bin path manually.
31
+ try {
32
+ const nextPkg = require.resolve("next/package.json", { paths: [pkgDir] });
33
+ nextBin = path.join(path.dirname(nextPkg), "dist", "bin", "next");
34
+ } catch {
35
+ nextBin = path.join(pkgDir, "node_modules", "next", "dist", "bin", "next");
36
+ }
37
+ }
38
+
39
+ const { port, hostname, openBrowser } = parseLaunchOptions();
40
+ const loopbackHostnames = new Set(["127.0.0.1", "localhost", "::1", "[::1]"]);
41
+ const passwordEnabled = Boolean(process.env.PI_WEB_PASSWORD);
42
+
43
+ if (!fs.existsSync(nextDir)) {
44
+ console.error("Build artifacts not found. Please report this issue.");
45
+ process.exit(1);
46
+ }
47
+
48
+ if (!loopbackHostnames.has(hostname)) {
49
+ if (passwordEnabled) {
50
+ console.warn(
51
+ `Warning: pi-web is listening on ${hostname} with Basic Auth over HTTP. Use HTTPS or a trusted VPN to protect the password in transit.`,
52
+ );
53
+ } else {
54
+ console.warn(
55
+ `Warning: pi-web is listening on ${hostname} without authentication. Only use this on a trusted network.`,
56
+ );
57
+ }
58
+ }
59
+
60
+ const nextArgs = ["start", "-p", port];
61
+ nextArgs.push("-H", hostname);
62
+
63
+ // Always run next's JS entry with node directly — avoids .bin symlink issues
64
+ // and path-with-spaces problems on Windows when shell: true is used.
65
+ const child = spawn(process.execPath, [nextBin, ...nextArgs], {
66
+ cwd: pkgDir,
67
+ stdio: ["inherit", "pipe", "inherit"],
68
+ env: { ...process.env, PI_WEB_HOSTNAME: hostname },
69
+ });
70
+
71
+ let browserOpened = false;
72
+ const url = `http://${hostname}:${port}`;
73
+
74
+ child.stdout.on("data", (chunk) => {
75
+ const text = chunk.toString();
76
+ process.stdout.write(text);
77
+ if (openBrowser && !browserOpened && text.includes("Ready")) {
78
+ browserOpened = true;
79
+ const isWindows = process.platform === "win32";
80
+ const isMac = process.platform === "darwin";
81
+ const openCmd = isWindows ? "start" : isMac ? "open" : "xdg-open";
82
+ const opener = spawn(openCmd, [url], {
83
+ shell: isWindows,
84
+ stdio: "ignore",
85
+ detached: true,
86
+ });
87
+
88
+ opener.on("error", (error) => {
89
+ console.warn(`Could not open browser automatically: ${error.message}`);
90
+ });
91
+
92
+ opener.unref();
93
+ }
94
+ });
95
+
96
+ child.on("exit", (code) => process.exit(code ?? 0));
package/next.config.ts ADDED
@@ -0,0 +1,50 @@
1
+ import type { NextConfig } from "next";
2
+ import { readFileSync } from "fs";
3
+ import { join } from "path";
4
+
5
+ const { version } = JSON.parse(readFileSync(join(__dirname, "package.json"), "utf8")) as { version: string };
6
+ let piVersion = "unknown";
7
+ try {
8
+ const piPkgPath = join(__dirname, "node_modules/@earendil-works/pi-coding-agent/package.json");
9
+ piVersion = (JSON.parse(readFileSync(piPkgPath, "utf8")) as { version: string }).version;
10
+ } catch { /* package not found, use default */ }
11
+
12
+ const nextConfig: NextConfig = {
13
+ serverExternalPackages: [
14
+ "undici",
15
+ "@earendil-works/pi-coding-agent",
16
+ "@earendil-works/pi-agent-core",
17
+ "@earendil-works/pi-ai",
18
+ "@earendil-works/pi-tui",
19
+ ],
20
+ allowedDevOrigins: ['192.168.*.*'],
21
+ async headers() {
22
+ return [
23
+ {
24
+ source: "/",
25
+ headers: [
26
+ { key: "Cache-Control", value: "private, no-cache, max-age=0, must-revalidate" },
27
+ ],
28
+ },
29
+ {
30
+ source: "/sw.js",
31
+ headers: [
32
+ { key: "Cache-Control", value: "public, max-age=0, must-revalidate" },
33
+ { key: "Service-Worker-Allowed", value: "/" },
34
+ ],
35
+ },
36
+ {
37
+ source: "/manifest.webmanifest",
38
+ headers: [
39
+ { key: "Cache-Control", value: "public, max-age=0, must-revalidate" },
40
+ ],
41
+ },
42
+ ];
43
+ },
44
+ env: {
45
+ NEXT_PUBLIC_APP_VERSION: version,
46
+ NEXT_PUBLIC_PI_VERSION: piVersion,
47
+ },
48
+ };
49
+
50
+ export default nextConfig;
package/package.json ADDED
@@ -0,0 +1,79 @@
1
+ {
2
+ "name": "@lyhue1991/pi-web",
3
+ "version": "0.8.6",
4
+ "description": "Web UI for the pi coding agent",
5
+ "homepage": "https://github.com/lyhue1991/pi-web#readme",
6
+ "repository": {
7
+ "type": "git",
8
+ "url": "git+https://github.com/lyhue1991/pi-web.git"
9
+ },
10
+ "bugs": {
11
+ "url": "https://github.com/lyhue1991/pi-web/issues"
12
+ },
13
+ "license": "MIT",
14
+ "publishConfig": {
15
+ "access": "public"
16
+ },
17
+ "engines": {
18
+ "node": ">=22.19.0"
19
+ },
20
+ "bin": {
21
+ "pi-web": "bin/pi-web.js"
22
+ },
23
+ "files": [
24
+ "bin",
25
+ ".next",
26
+ "!.next/cache",
27
+ "!.next/dev",
28
+ "!.next/**/*.js.map",
29
+ "public",
30
+ "next.config.ts",
31
+ "package.json"
32
+ ],
33
+ "scripts": {
34
+ "dev": "next dev -H 127.0.0.1 -p 30141",
35
+ "dev:lan": "next dev -H 0.0.0.0 -p 30141",
36
+ "build": "next build --webpack",
37
+ "start": "next start -H 127.0.0.1 -p 30141",
38
+ "start:lan": "next start -H 0.0.0.0 -p 30141",
39
+ "lint": "eslint .",
40
+ "release": "npm version patch --no-git-tag-version && npm run build && npm publish --access public"
41
+ },
42
+ "dependencies": {
43
+ "@earendil-works/pi-agent-core": "0.83.0",
44
+ "@earendil-works/pi-ai": "0.83.0",
45
+ "@earendil-works/pi-coding-agent": "0.83.0",
46
+ "@earendil-works/pi-tui": "0.83.0",
47
+ "next": "16.2.12",
48
+ "proper-lockfile": "4.1.2",
49
+ "react": "^19.2.4",
50
+ "react-dom": "^19.2.4",
51
+ "trash": "^10.1.1",
52
+ "undici": "8.5.0"
53
+ },
54
+ "devDependencies": {
55
+ "@lobehub/icons": "^5.6.0",
56
+ "@tailwindcss/postcss": "^4.2.2",
57
+ "@types/node": "^25",
58
+ "@types/proper-lockfile": "4.1.4",
59
+ "@types/react": "^19",
60
+ "@types/react-dom": "^19",
61
+ "@types/react-syntax-highlighter": "^15.5.13",
62
+ "eslint": "^9",
63
+ "eslint-config-next": "16.2.12",
64
+ "jiti": "^2.7.0",
65
+ "katex": "^0.16.47",
66
+ "mammoth": "^1.12.0",
67
+ "mermaid": "^11.14.0",
68
+ "postcss": "^8",
69
+ "react-markdown": "^10.1.0",
70
+ "react-syntax-highlighter": "^16.1.1",
71
+ "rehype-katex": "^7.0.1",
72
+ "rehype-raw": "^7.0.0",
73
+ "rehype-sanitize": "^6.0.0",
74
+ "remark-gfm": "^4.0.1",
75
+ "remark-math": "^6.0.0",
76
+ "tailwindcss": "^4.2.2",
77
+ "typescript": "^5"
78
+ }
79
+ }
Binary file
Binary file
@@ -0,0 +1,83 @@
1
+ <!doctype html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="utf-8" />
5
+ <meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover" />
6
+ <meta name="theme-color" content="#1a1a1a" />
7
+ <title>Pi Web is offline</title>
8
+ <style>
9
+ :root {
10
+ color-scheme: dark;
11
+ font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
12
+ background: #1a1a1a;
13
+ color: #e8e8e8;
14
+ }
15
+
16
+ * {
17
+ box-sizing: border-box;
18
+ }
19
+
20
+ body {
21
+ min-height: 100dvh;
22
+ margin: 0;
23
+ display: grid;
24
+ place-items: center;
25
+ padding: 32px;
26
+ }
27
+
28
+ main {
29
+ width: min(100%, 420px);
30
+ text-align: center;
31
+ }
32
+
33
+ img {
34
+ width: 88px;
35
+ height: 88px;
36
+ margin-bottom: 24px;
37
+ }
38
+
39
+ h1 {
40
+ margin: 0 0 10px;
41
+ font-size: 22px;
42
+ font-weight: 650;
43
+ letter-spacing: 0;
44
+ }
45
+
46
+ p {
47
+ margin: 0;
48
+ color: #9ca3af;
49
+ font-size: 14px;
50
+ line-height: 1.6;
51
+ }
52
+
53
+ button {
54
+ margin-top: 24px;
55
+ min-height: 40px;
56
+ padding: 0 18px;
57
+ border: 1px solid #3a3a3a;
58
+ border-radius: 6px;
59
+ background: #242424;
60
+ color: #e8e8e8;
61
+ font: inherit;
62
+ cursor: pointer;
63
+ }
64
+
65
+ button:hover {
66
+ background: #2e2e2e;
67
+ }
68
+
69
+ button:focus-visible {
70
+ outline: 2px solid #60a5fa;
71
+ outline-offset: 3px;
72
+ }
73
+ </style>
74
+ </head>
75
+ <body>
76
+ <main>
77
+ <img src="/icons/icon-192.png" alt="" />
78
+ <h1>Pi Web is offline</h1>
79
+ <p>Reconnect to the local Pi Web server, then try again.</p>
80
+ <button type="button" onclick="location.reload()">Try again</button>
81
+ </main>
82
+ </body>
83
+ </html>
package/public/sw.js ADDED
@@ -0,0 +1,76 @@
1
+ const CACHE_PREFIX = "pi-web";
2
+ const CACHE_VERSION = new URL(self.location.href).searchParams.get("v") || "dev";
3
+ const STATIC_CACHE = `${CACHE_PREFIX}-static-${CACHE_VERSION}`;
4
+ const OFFLINE_URL = "/offline.html";
5
+ const PRECACHE_URLS = [
6
+ OFFLINE_URL,
7
+ "/manifest.webmanifest",
8
+ "/icons/icon-192.png",
9
+ "/icons/icon-512.png",
10
+ "/icons/apple-touch-icon.png",
11
+ ];
12
+
13
+ self.addEventListener("install", (event) => {
14
+ event.waitUntil(
15
+ caches
16
+ .open(STATIC_CACHE)
17
+ .then((cache) => cache.addAll(PRECACHE_URLS))
18
+ .then(() => self.skipWaiting()),
19
+ );
20
+ });
21
+
22
+ self.addEventListener("activate", (event) => {
23
+ event.waitUntil(
24
+ caches
25
+ .keys()
26
+ .then((keys) =>
27
+ Promise.all(
28
+ keys
29
+ .filter((key) => key.startsWith(`${CACHE_PREFIX}-`) && key !== STATIC_CACHE)
30
+ .map((key) => caches.delete(key)),
31
+ ),
32
+ )
33
+ .then(() => self.clients.claim()),
34
+ );
35
+ });
36
+
37
+ self.addEventListener("fetch", (event) => {
38
+ const { request } = event;
39
+ if (request.method !== "GET") return;
40
+
41
+ const url = new URL(request.url);
42
+ if (url.origin !== self.location.origin) return;
43
+
44
+ // Session data and live agent traffic must always come from the local server.
45
+ if (url.pathname.startsWith("/api/") || url.pathname === "/sw.js") return;
46
+
47
+ if (request.mode === "navigate") {
48
+ event.respondWith(
49
+ fetch(request).catch(async () => {
50
+ const fallback = await caches.match(OFFLINE_URL);
51
+ return fallback ?? Response.error();
52
+ }),
53
+ );
54
+ return;
55
+ }
56
+
57
+ const isStaticAsset =
58
+ url.pathname.startsWith("/_next/static/") ||
59
+ PRECACHE_URLS.includes(url.pathname);
60
+
61
+ if (isStaticAsset) {
62
+ event.respondWith(cacheFirst(request));
63
+ }
64
+ });
65
+
66
+ async function cacheFirst(request) {
67
+ const cached = await caches.match(request);
68
+ if (cached) return cached;
69
+
70
+ const response = await fetch(request);
71
+ if (response.ok && response.type === "basic") {
72
+ const cache = await caches.open(STATIC_CACHE);
73
+ await cache.put(request, response.clone());
74
+ }
75
+ return response;
76
+ }