@qt4798/pi-web 0.14.5 → 0.15.0

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 (314) hide show
  1. package/.next/BUILD_ID +1 -1
  2. package/.next/app-path-routes-manifest.json +10 -9
  3. package/.next/build-manifest.json +2 -2
  4. package/.next/required-server-files.js +1 -1
  5. package/.next/required-server-files.json +1 -1
  6. package/.next/routes-manifest.json +6 -0
  7. package/.next/server/app/_global-error/page.js +2 -2
  8. package/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
  9. package/.next/server/app/_global-error.html +1 -1
  10. package/.next/server/app/_global-error.rsc +1 -1
  11. package/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  12. package/.next/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
  13. package/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  14. package/.next/server/app/_not-found/page.js +1 -1
  15. package/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  16. package/.next/server/app/_not-found.html +1 -1
  17. package/.next/server/app/_not-found.rsc +1 -1
  18. package/.next/server/app/_not-found.segments/_full.segment.rsc +1 -1
  19. package/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
  20. package/.next/server/app/_not-found.segments/_tree.segment.rsc +1 -1
  21. package/.next/server/app/api/agent/[id]/bash-output/route.js +1 -1
  22. package/.next/server/app/api/agent/[id]/events/route.js +2 -2
  23. package/.next/server/app/api/agent/[id]/route.js +1 -1
  24. package/.next/server/app/api/agent/new/route.js +1 -1
  25. package/.next/server/app/api/agent/running/events/route.js +1 -1
  26. package/.next/server/app/api/agent/running/route.js +1 -1
  27. package/.next/server/app/api/app-update/route.js +1 -1
  28. package/.next/server/app/api/auth/all-providers/route.js +1 -1
  29. package/.next/server/app/api/auth/api-key/[provider]/route.js +1 -1
  30. package/.next/server/app/api/auth/combined/route.js +1 -1
  31. package/.next/server/app/api/auth/login/[provider]/route.js +2 -2
  32. package/.next/server/app/api/auth/logout/[provider]/route.js +1 -1
  33. package/.next/server/app/api/auth/providers/route.js +1 -1
  34. package/.next/server/app/api/backup/export/route.js +1 -1
  35. package/.next/server/app/api/backup/import/route.js +1 -1
  36. package/.next/server/app/api/cwd/browse/route.js +1 -1
  37. package/.next/server/app/api/cwd/validate/route.js +1 -1
  38. package/.next/server/app/api/deepseek/balance/route.js +1 -1
  39. package/.next/server/app/api/default-cwd/route.js +1 -1
  40. package/.next/server/app/api/events/route.js +1 -1
  41. package/.next/server/app/api/features/route.js +1 -1
  42. package/.next/server/app/api/file-index/route.js +1 -1
  43. package/.next/server/app/api/files/[...path]/route.js +1 -1
  44. package/.next/server/app/api/git/diff/route.js +2 -2
  45. package/.next/server/app/api/git/push/route.js +1 -1
  46. package/.next/server/app/api/git/stash/route.js +1 -1
  47. package/.next/server/app/api/git/status/route.js +1 -1
  48. package/.next/server/app/api/home/route.js +1 -1
  49. package/.next/server/app/api/import/discover/route.js +1 -1
  50. package/.next/server/app/api/import/execute/route.js +1 -1
  51. package/.next/server/app/api/import/status/route.js +1 -1
  52. package/.next/server/app/api/logs/route.js +1 -1
  53. package/.next/server/app/api/mcp/restart/route.js +1 -1
  54. package/.next/server/app/api/mcp/route.js +2 -2
  55. package/.next/server/app/api/models/route.js +1 -1
  56. package/.next/server/app/api/models-config/builtin/route.js +1 -1
  57. package/.next/server/app/api/models-config/catalog/route.js +1 -1
  58. package/.next/server/app/api/models-config/discover/route.js +1 -1
  59. package/.next/server/app/api/models-config/route.js +1 -1
  60. package/.next/server/app/api/models-config/test/route.js +1 -1
  61. package/.next/server/app/api/modes/route.js +1 -1
  62. package/.next/server/app/api/plugins/route.js +1 -1
  63. package/.next/server/app/api/project-aliases/route.js +1 -1
  64. package/.next/server/app/api/project-state/route.js +1 -1
  65. package/.next/server/app/api/project-trust/route.js +1 -1
  66. package/.next/server/app/api/projects/visibility/route.js +1 -0
  67. package/.next/server/app/api/projects/visibility/route.js.nft.json +1 -0
  68. package/.next/server/app/api/projects/visibility/route_client-reference-manifest.js +1 -0
  69. package/.next/server/app/api/proxy/route.js +1 -1
  70. package/.next/server/app/api/proxy/test/route.js +1 -1
  71. package/.next/server/app/api/sessions/[id]/auto-name/route.js +2 -2
  72. package/.next/server/app/api/sessions/[id]/context/route.js +1 -1
  73. package/.next/server/app/api/sessions/[id]/entries/[entryId]/thinking/route.js +1 -1
  74. package/.next/server/app/api/sessions/[id]/entries/[entryId]/tool-result-image/route.js +1 -1
  75. package/.next/server/app/api/sessions/[id]/export/route.js +2 -2
  76. package/.next/server/app/api/sessions/[id]/queue-recovery/route.js +1 -1
  77. package/.next/server/app/api/sessions/[id]/route.js +1 -1
  78. package/.next/server/app/api/sessions/[id]/state/route.js +1 -1
  79. package/.next/server/app/api/sessions/route.js +1 -1
  80. package/.next/server/app/api/settings/title-model/route.js +1 -1
  81. package/.next/server/app/api/skills/check/route.js +1 -1
  82. package/.next/server/app/api/skills/install/route.js +1 -1
  83. package/.next/server/app/api/skills/route.js +1 -1
  84. package/.next/server/app/api/skills/search/route.js +1 -1
  85. package/.next/server/app/api/skills/update/route.js +1 -1
  86. package/.next/server/app/api/snippets/[id]/route.js +1 -1
  87. package/.next/server/app/api/snippets/route.js +1 -1
  88. package/.next/server/app/api/subagents/agents/[name]/route.js +2 -2
  89. package/.next/server/app/api/subagents/route.js +2 -2
  90. package/.next/server/app/api/subagents/transcript/route.js +1 -1
  91. package/.next/server/app/api/tasks/[id]/[action]/route.js +1 -1
  92. package/.next/server/app/api/tasks/[id]/changed-files/route.js +1 -1
  93. package/.next/server/app/api/tasks/[id]/diff/route.js +2 -2
  94. package/.next/server/app/api/tasks/[id]/events/route.js +1 -1
  95. package/.next/server/app/api/tasks/[id]/route.js +1 -1
  96. package/.next/server/app/api/tasks/batch/route.js +1 -1
  97. package/.next/server/app/api/tasks/events/route.js +1 -1
  98. package/.next/server/app/api/tasks/route.js +1 -1
  99. package/.next/server/app/api/tasks/settings/route.js +1 -1
  100. package/.next/server/app/api/tasks/templates/route.js +1 -1
  101. package/.next/server/app/api/themes/[name]/route.js +1 -1
  102. package/.next/server/app/api/themes/route.js +1 -1
  103. package/.next/server/app/api/tools/settings/route.js +1 -1
  104. package/.next/server/app/api/usage/route.js +1 -1
  105. package/.next/server/app/api/vision-config/route.js +2 -2
  106. package/.next/server/app/api/worktrees/route.js +1 -1
  107. package/.next/server/app/icon.ico/route.js +1 -1
  108. package/.next/server/app/icon.png/route.js +1 -1
  109. package/.next/server/app/icon.svg/route.js +1 -1
  110. package/.next/server/app/index.html +1 -1
  111. package/.next/server/app/index.rsc +3 -3
  112. package/.next/server/app/index.segments/__PAGE__.segment.rsc +3 -3
  113. package/.next/server/app/index.segments/_full.segment.rsc +3 -3
  114. package/.next/server/app/index.segments/_tree.segment.rsc +1 -1
  115. package/.next/server/app/page.js +13 -13
  116. package/.next/server/app/page_client-reference-manifest.js +1 -1
  117. package/.next/server/app-paths-manifest.json +10 -9
  118. package/.next/server/chunks/4253.js +2 -2
  119. package/.next/server/chunks/5582.js +2 -2
  120. package/.next/server/chunks/7774.js +4 -4
  121. package/.next/server/chunks/7915.js +1 -1
  122. package/.next/server/middleware-build-manifest.js +1 -1
  123. package/.next/server/middleware.js +5 -5
  124. package/.next/server/pages/404.html +1 -1
  125. package/.next/server/pages/500.html +1 -1
  126. package/.next/static/7XacC0R7vHhpqCM-jwNxr/_buildManifest.js +1 -0
  127. package/.next/static/chunks/4548-ad8419ab84c26555.js +1 -0
  128. package/.next/static/chunks/app/{api/agent/[id]/route-4f2c90c5d91a3084.js → _global-error/page-e7e9c70b392ea831.js} +1 -1
  129. package/.next/static/chunks/app/{_global-error/page-4f2c90c5d91a3084.js → api/agent/[id]/bash-output/route-e7e9c70b392ea831.js} +1 -1
  130. package/.next/static/chunks/app/api/agent/[id]/{bash-output/route-4f2c90c5d91a3084.js → events/route-e7e9c70b392ea831.js} +1 -1
  131. package/.next/static/chunks/app/api/agent/[id]/{events/route-4f2c90c5d91a3084.js → route-e7e9c70b392ea831.js} +1 -1
  132. package/.next/static/chunks/app/api/agent/new/route-e7e9c70b392ea831.js +1 -0
  133. package/.next/static/chunks/app/api/agent/running/events/route-e7e9c70b392ea831.js +1 -0
  134. package/.next/static/chunks/app/api/agent/running/route-e7e9c70b392ea831.js +1 -0
  135. package/.next/static/chunks/app/api/app-update/route-e7e9c70b392ea831.js +1 -0
  136. package/.next/static/chunks/app/api/auth/all-providers/route-e7e9c70b392ea831.js +1 -0
  137. package/.next/static/chunks/app/api/auth/api-key/[provider]/route-e7e9c70b392ea831.js +1 -0
  138. package/.next/static/chunks/app/api/auth/combined/route-e7e9c70b392ea831.js +1 -0
  139. package/.next/static/chunks/app/api/auth/login/[provider]/route-e7e9c70b392ea831.js +1 -0
  140. package/.next/static/chunks/app/api/auth/logout/[provider]/route-e7e9c70b392ea831.js +1 -0
  141. package/.next/static/chunks/app/api/auth/providers/route-e7e9c70b392ea831.js +1 -0
  142. package/.next/static/chunks/app/api/backup/export/route-e7e9c70b392ea831.js +1 -0
  143. package/.next/static/chunks/app/api/backup/import/route-e7e9c70b392ea831.js +1 -0
  144. package/.next/static/chunks/app/api/cwd/browse/route-e7e9c70b392ea831.js +1 -0
  145. package/.next/static/chunks/app/api/cwd/validate/route-e7e9c70b392ea831.js +1 -0
  146. package/.next/static/chunks/app/api/deepseek/balance/route-e7e9c70b392ea831.js +1 -0
  147. package/.next/static/chunks/app/api/default-cwd/route-e7e9c70b392ea831.js +1 -0
  148. package/.next/static/chunks/app/api/events/route-e7e9c70b392ea831.js +1 -0
  149. package/.next/static/chunks/app/api/features/route-e7e9c70b392ea831.js +1 -0
  150. package/.next/static/chunks/app/api/file-index/route-e7e9c70b392ea831.js +1 -0
  151. package/.next/static/chunks/app/api/files/[...path]/route-e7e9c70b392ea831.js +1 -0
  152. package/.next/static/chunks/app/api/git/diff/route-e7e9c70b392ea831.js +1 -0
  153. package/.next/static/chunks/app/api/git/push/route-e7e9c70b392ea831.js +1 -0
  154. package/.next/static/chunks/app/api/git/stash/route-e7e9c70b392ea831.js +1 -0
  155. package/.next/static/chunks/app/api/git/status/route-e7e9c70b392ea831.js +1 -0
  156. package/.next/static/chunks/app/api/home/route-e7e9c70b392ea831.js +1 -0
  157. package/.next/static/chunks/app/api/import/discover/route-e7e9c70b392ea831.js +1 -0
  158. package/.next/static/chunks/app/api/import/execute/route-e7e9c70b392ea831.js +1 -0
  159. package/.next/static/chunks/app/api/import/status/route-e7e9c70b392ea831.js +1 -0
  160. package/.next/static/chunks/app/api/logs/route-e7e9c70b392ea831.js +1 -0
  161. package/.next/static/chunks/app/api/mcp/restart/route-e7e9c70b392ea831.js +1 -0
  162. package/.next/static/chunks/app/api/mcp/route-e7e9c70b392ea831.js +1 -0
  163. package/.next/static/chunks/app/api/models/route-e7e9c70b392ea831.js +1 -0
  164. package/.next/static/chunks/app/api/models-config/builtin/route-e7e9c70b392ea831.js +1 -0
  165. package/.next/static/chunks/app/api/models-config/catalog/route-e7e9c70b392ea831.js +1 -0
  166. package/.next/static/chunks/app/api/models-config/discover/route-e7e9c70b392ea831.js +1 -0
  167. package/.next/static/chunks/app/api/models-config/route-e7e9c70b392ea831.js +1 -0
  168. package/.next/static/chunks/app/api/models-config/test/route-e7e9c70b392ea831.js +1 -0
  169. package/.next/static/chunks/app/api/modes/route-e7e9c70b392ea831.js +1 -0
  170. package/.next/static/chunks/app/api/plugins/route-e7e9c70b392ea831.js +1 -0
  171. package/.next/static/chunks/app/api/project-aliases/route-e7e9c70b392ea831.js +1 -0
  172. package/.next/static/chunks/app/api/project-state/route-e7e9c70b392ea831.js +1 -0
  173. package/.next/static/chunks/app/api/project-trust/route-e7e9c70b392ea831.js +1 -0
  174. package/.next/static/chunks/app/api/projects/visibility/route-e7e9c70b392ea831.js +1 -0
  175. package/.next/static/chunks/app/api/proxy/route-e7e9c70b392ea831.js +1 -0
  176. package/.next/static/chunks/app/api/proxy/test/route-e7e9c70b392ea831.js +1 -0
  177. package/.next/static/chunks/app/api/sessions/[id]/auto-name/route-e7e9c70b392ea831.js +1 -0
  178. package/.next/static/chunks/app/api/sessions/[id]/context/route-e7e9c70b392ea831.js +1 -0
  179. package/.next/static/chunks/app/api/sessions/[id]/entries/[entryId]/thinking/route-e7e9c70b392ea831.js +1 -0
  180. package/.next/static/chunks/app/api/sessions/[id]/entries/[entryId]/tool-result-image/route-e7e9c70b392ea831.js +1 -0
  181. package/.next/static/chunks/app/api/sessions/[id]/export/route-e7e9c70b392ea831.js +1 -0
  182. package/.next/static/chunks/app/api/sessions/[id]/queue-recovery/route-e7e9c70b392ea831.js +1 -0
  183. package/.next/static/chunks/app/api/sessions/[id]/route-e7e9c70b392ea831.js +1 -0
  184. package/.next/static/chunks/app/api/sessions/[id]/state/route-e7e9c70b392ea831.js +1 -0
  185. package/.next/static/chunks/app/api/sessions/route-e7e9c70b392ea831.js +1 -0
  186. package/.next/static/chunks/app/api/settings/title-model/route-e7e9c70b392ea831.js +1 -0
  187. package/.next/static/chunks/app/api/skills/check/route-e7e9c70b392ea831.js +1 -0
  188. package/.next/static/chunks/app/api/skills/install/route-e7e9c70b392ea831.js +1 -0
  189. package/.next/static/chunks/app/api/skills/route-e7e9c70b392ea831.js +1 -0
  190. package/.next/static/chunks/app/api/skills/search/route-e7e9c70b392ea831.js +1 -0
  191. package/.next/static/chunks/app/api/skills/update/route-e7e9c70b392ea831.js +1 -0
  192. package/.next/static/chunks/app/api/snippets/[id]/route-e7e9c70b392ea831.js +1 -0
  193. package/.next/static/chunks/app/api/snippets/route-e7e9c70b392ea831.js +1 -0
  194. package/.next/static/chunks/app/api/subagents/agents/[name]/route-e7e9c70b392ea831.js +1 -0
  195. package/.next/static/chunks/app/api/subagents/route-e7e9c70b392ea831.js +1 -0
  196. package/.next/static/chunks/app/api/subagents/transcript/route-e7e9c70b392ea831.js +1 -0
  197. package/.next/static/chunks/app/api/tasks/[id]/[action]/route-e7e9c70b392ea831.js +1 -0
  198. package/.next/static/chunks/app/api/tasks/[id]/changed-files/route-e7e9c70b392ea831.js +1 -0
  199. package/.next/static/chunks/app/api/tasks/[id]/diff/route-e7e9c70b392ea831.js +1 -0
  200. package/.next/static/chunks/app/api/tasks/[id]/events/route-e7e9c70b392ea831.js +1 -0
  201. package/.next/static/chunks/app/api/tasks/[id]/route-e7e9c70b392ea831.js +1 -0
  202. package/.next/static/chunks/app/api/tasks/batch/route-e7e9c70b392ea831.js +1 -0
  203. package/.next/static/chunks/app/api/tasks/events/route-e7e9c70b392ea831.js +1 -0
  204. package/.next/static/chunks/app/api/tasks/route-e7e9c70b392ea831.js +1 -0
  205. package/.next/static/chunks/app/api/tasks/settings/route-e7e9c70b392ea831.js +1 -0
  206. package/.next/static/chunks/app/api/tasks/templates/route-e7e9c70b392ea831.js +1 -0
  207. package/.next/static/chunks/app/api/themes/[name]/route-e7e9c70b392ea831.js +1 -0
  208. package/.next/static/chunks/app/api/themes/route-e7e9c70b392ea831.js +1 -0
  209. package/.next/static/chunks/app/api/tools/settings/route-e7e9c70b392ea831.js +1 -0
  210. package/.next/static/chunks/app/api/usage/route-e7e9c70b392ea831.js +1 -0
  211. package/.next/static/chunks/app/api/vision-config/route-e7e9c70b392ea831.js +1 -0
  212. package/.next/static/chunks/app/api/worktrees/route-e7e9c70b392ea831.js +1 -0
  213. package/.next/static/chunks/app/page-3c4fd3945e1b2845.js +48 -0
  214. package/.next/static/chunks/next/dist/client/components/builtin/app-error-e7e9c70b392ea831.js +1 -0
  215. package/.next/static/chunks/next/dist/client/components/builtin/forbidden-e7e9c70b392ea831.js +1 -0
  216. package/.next/static/chunks/next/dist/client/components/builtin/not-found-e7e9c70b392ea831.js +1 -0
  217. package/.next/static/chunks/next/dist/client/components/builtin/unauthorized-e7e9c70b392ea831.js +1 -0
  218. package/.next/trace +8 -8
  219. package/.next/trace-build +1 -1
  220. package/.next/types/app/api/projects/visibility/route.ts +353 -0
  221. package/.next/types/routes.d.ts +2 -1
  222. package/.next/types/validator.ts +9 -0
  223. package/bin/memory-watchdog.js +135 -0
  224. package/bin/pi-web.js +8 -2
  225. package/bin/watchdog-preload.js +20 -0
  226. package/package.json +2 -1
  227. package/.next/static/chunks/2891-5fe49d0522e2729e.js +0 -1
  228. package/.next/static/chunks/app/api/agent/new/route-4f2c90c5d91a3084.js +0 -1
  229. package/.next/static/chunks/app/api/agent/running/events/route-4f2c90c5d91a3084.js +0 -1
  230. package/.next/static/chunks/app/api/agent/running/route-4f2c90c5d91a3084.js +0 -1
  231. package/.next/static/chunks/app/api/app-update/route-4f2c90c5d91a3084.js +0 -1
  232. package/.next/static/chunks/app/api/auth/all-providers/route-4f2c90c5d91a3084.js +0 -1
  233. package/.next/static/chunks/app/api/auth/api-key/[provider]/route-4f2c90c5d91a3084.js +0 -1
  234. package/.next/static/chunks/app/api/auth/combined/route-4f2c90c5d91a3084.js +0 -1
  235. package/.next/static/chunks/app/api/auth/login/[provider]/route-4f2c90c5d91a3084.js +0 -1
  236. package/.next/static/chunks/app/api/auth/logout/[provider]/route-4f2c90c5d91a3084.js +0 -1
  237. package/.next/static/chunks/app/api/auth/providers/route-4f2c90c5d91a3084.js +0 -1
  238. package/.next/static/chunks/app/api/backup/export/route-4f2c90c5d91a3084.js +0 -1
  239. package/.next/static/chunks/app/api/backup/import/route-4f2c90c5d91a3084.js +0 -1
  240. package/.next/static/chunks/app/api/cwd/browse/route-4f2c90c5d91a3084.js +0 -1
  241. package/.next/static/chunks/app/api/cwd/validate/route-4f2c90c5d91a3084.js +0 -1
  242. package/.next/static/chunks/app/api/deepseek/balance/route-4f2c90c5d91a3084.js +0 -1
  243. package/.next/static/chunks/app/api/default-cwd/route-4f2c90c5d91a3084.js +0 -1
  244. package/.next/static/chunks/app/api/events/route-4f2c90c5d91a3084.js +0 -1
  245. package/.next/static/chunks/app/api/features/route-4f2c90c5d91a3084.js +0 -1
  246. package/.next/static/chunks/app/api/file-index/route-4f2c90c5d91a3084.js +0 -1
  247. package/.next/static/chunks/app/api/files/[...path]/route-4f2c90c5d91a3084.js +0 -1
  248. package/.next/static/chunks/app/api/git/diff/route-4f2c90c5d91a3084.js +0 -1
  249. package/.next/static/chunks/app/api/git/push/route-4f2c90c5d91a3084.js +0 -1
  250. package/.next/static/chunks/app/api/git/stash/route-4f2c90c5d91a3084.js +0 -1
  251. package/.next/static/chunks/app/api/git/status/route-4f2c90c5d91a3084.js +0 -1
  252. package/.next/static/chunks/app/api/home/route-4f2c90c5d91a3084.js +0 -1
  253. package/.next/static/chunks/app/api/import/discover/route-4f2c90c5d91a3084.js +0 -1
  254. package/.next/static/chunks/app/api/import/execute/route-4f2c90c5d91a3084.js +0 -1
  255. package/.next/static/chunks/app/api/import/status/route-4f2c90c5d91a3084.js +0 -1
  256. package/.next/static/chunks/app/api/logs/route-4f2c90c5d91a3084.js +0 -1
  257. package/.next/static/chunks/app/api/mcp/restart/route-4f2c90c5d91a3084.js +0 -1
  258. package/.next/static/chunks/app/api/mcp/route-4f2c90c5d91a3084.js +0 -1
  259. package/.next/static/chunks/app/api/models/route-4f2c90c5d91a3084.js +0 -1
  260. package/.next/static/chunks/app/api/models-config/builtin/route-4f2c90c5d91a3084.js +0 -1
  261. package/.next/static/chunks/app/api/models-config/catalog/route-4f2c90c5d91a3084.js +0 -1
  262. package/.next/static/chunks/app/api/models-config/discover/route-4f2c90c5d91a3084.js +0 -1
  263. package/.next/static/chunks/app/api/models-config/route-4f2c90c5d91a3084.js +0 -1
  264. package/.next/static/chunks/app/api/models-config/test/route-4f2c90c5d91a3084.js +0 -1
  265. package/.next/static/chunks/app/api/modes/route-4f2c90c5d91a3084.js +0 -1
  266. package/.next/static/chunks/app/api/plugins/route-4f2c90c5d91a3084.js +0 -1
  267. package/.next/static/chunks/app/api/project-aliases/route-4f2c90c5d91a3084.js +0 -1
  268. package/.next/static/chunks/app/api/project-state/route-4f2c90c5d91a3084.js +0 -1
  269. package/.next/static/chunks/app/api/project-trust/route-4f2c90c5d91a3084.js +0 -1
  270. package/.next/static/chunks/app/api/proxy/route-4f2c90c5d91a3084.js +0 -1
  271. package/.next/static/chunks/app/api/proxy/test/route-4f2c90c5d91a3084.js +0 -1
  272. package/.next/static/chunks/app/api/sessions/[id]/auto-name/route-4f2c90c5d91a3084.js +0 -1
  273. package/.next/static/chunks/app/api/sessions/[id]/context/route-4f2c90c5d91a3084.js +0 -1
  274. package/.next/static/chunks/app/api/sessions/[id]/entries/[entryId]/thinking/route-4f2c90c5d91a3084.js +0 -1
  275. package/.next/static/chunks/app/api/sessions/[id]/entries/[entryId]/tool-result-image/route-4f2c90c5d91a3084.js +0 -1
  276. package/.next/static/chunks/app/api/sessions/[id]/export/route-4f2c90c5d91a3084.js +0 -1
  277. package/.next/static/chunks/app/api/sessions/[id]/queue-recovery/route-4f2c90c5d91a3084.js +0 -1
  278. package/.next/static/chunks/app/api/sessions/[id]/route-4f2c90c5d91a3084.js +0 -1
  279. package/.next/static/chunks/app/api/sessions/[id]/state/route-4f2c90c5d91a3084.js +0 -1
  280. package/.next/static/chunks/app/api/sessions/route-4f2c90c5d91a3084.js +0 -1
  281. package/.next/static/chunks/app/api/settings/title-model/route-4f2c90c5d91a3084.js +0 -1
  282. package/.next/static/chunks/app/api/skills/check/route-4f2c90c5d91a3084.js +0 -1
  283. package/.next/static/chunks/app/api/skills/install/route-4f2c90c5d91a3084.js +0 -1
  284. package/.next/static/chunks/app/api/skills/route-4f2c90c5d91a3084.js +0 -1
  285. package/.next/static/chunks/app/api/skills/search/route-4f2c90c5d91a3084.js +0 -1
  286. package/.next/static/chunks/app/api/skills/update/route-4f2c90c5d91a3084.js +0 -1
  287. package/.next/static/chunks/app/api/snippets/[id]/route-4f2c90c5d91a3084.js +0 -1
  288. package/.next/static/chunks/app/api/snippets/route-4f2c90c5d91a3084.js +0 -1
  289. package/.next/static/chunks/app/api/subagents/agents/[name]/route-4f2c90c5d91a3084.js +0 -1
  290. package/.next/static/chunks/app/api/subagents/route-4f2c90c5d91a3084.js +0 -1
  291. package/.next/static/chunks/app/api/subagents/transcript/route-4f2c90c5d91a3084.js +0 -1
  292. package/.next/static/chunks/app/api/tasks/[id]/[action]/route-4f2c90c5d91a3084.js +0 -1
  293. package/.next/static/chunks/app/api/tasks/[id]/changed-files/route-4f2c90c5d91a3084.js +0 -1
  294. package/.next/static/chunks/app/api/tasks/[id]/diff/route-4f2c90c5d91a3084.js +0 -1
  295. package/.next/static/chunks/app/api/tasks/[id]/events/route-4f2c90c5d91a3084.js +0 -1
  296. package/.next/static/chunks/app/api/tasks/[id]/route-4f2c90c5d91a3084.js +0 -1
  297. package/.next/static/chunks/app/api/tasks/batch/route-4f2c90c5d91a3084.js +0 -1
  298. package/.next/static/chunks/app/api/tasks/events/route-4f2c90c5d91a3084.js +0 -1
  299. package/.next/static/chunks/app/api/tasks/route-4f2c90c5d91a3084.js +0 -1
  300. package/.next/static/chunks/app/api/tasks/settings/route-4f2c90c5d91a3084.js +0 -1
  301. package/.next/static/chunks/app/api/tasks/templates/route-4f2c90c5d91a3084.js +0 -1
  302. package/.next/static/chunks/app/api/themes/[name]/route-4f2c90c5d91a3084.js +0 -1
  303. package/.next/static/chunks/app/api/themes/route-4f2c90c5d91a3084.js +0 -1
  304. package/.next/static/chunks/app/api/tools/settings/route-4f2c90c5d91a3084.js +0 -1
  305. package/.next/static/chunks/app/api/usage/route-4f2c90c5d91a3084.js +0 -1
  306. package/.next/static/chunks/app/api/vision-config/route-4f2c90c5d91a3084.js +0 -1
  307. package/.next/static/chunks/app/api/worktrees/route-4f2c90c5d91a3084.js +0 -1
  308. package/.next/static/chunks/app/page-687fb0d7531bf538.js +0 -48
  309. package/.next/static/chunks/next/dist/client/components/builtin/app-error-4f2c90c5d91a3084.js +0 -1
  310. package/.next/static/chunks/next/dist/client/components/builtin/forbidden-4f2c90c5d91a3084.js +0 -1
  311. package/.next/static/chunks/next/dist/client/components/builtin/not-found-4f2c90c5d91a3084.js +0 -1
  312. package/.next/static/chunks/next/dist/client/components/builtin/unauthorized-4f2c90c5d91a3084.js +0 -1
  313. package/.next/static/eHjtdT0tG0uXlGPgazDCc/_buildManifest.js +0 -1
  314. /package/.next/static/{eHjtdT0tG0uXlGPgazDCc → 7XacC0R7vHhpqCM-jwNxr}/_ssgManifest.js +0 -0
package/.next/trace-build CHANGED
@@ -1 +1 @@
1
- [{"name":"run-webpack","duration":15312077,"timestamp":117773448716,"id":14,"parentId":1,"tags":{},"startTime":1787965947943,"traceId":"d0f6d228f3eef686"},{"name":"run-typescript","duration":3196674,"timestamp":117788762858,"id":865,"parentId":1,"tags":{},"startTime":1787965963257,"traceId":"d0f6d228f3eef686"},{"name":"static-check","duration":1752961,"timestamp":117791968144,"id":868,"parentId":1,"tags":{},"startTime":1787965966462,"traceId":"d0f6d228f3eef686"},{"name":"static-generation","duration":2308410,"timestamp":117793838766,"id":1052,"parentId":1,"tags":{},"startTime":1787965968333,"traceId":"d0f6d228f3eef686"},{"name":"collect-build-traces","duration":15760482,"timestamp":117793722456,"id":1049,"parentId":1,"tags":{},"startTime":1787965968217,"traceId":"d0f6d228f3eef686"},{"name":"output-standalone","duration":1405803,"timestamp":117809485690,"id":1060,"parentId":1,"tags":{},"startTime":1787965983980,"traceId":"d0f6d228f3eef686"},{"name":"telemetry-flush","duration":17,"timestamp":117810893659,"id":1063,"parentId":1,"tags":{},"startTime":1787965985388,"traceId":"d0f6d228f3eef686"},{"name":"next-build","duration":38192930,"timestamp":117772700749,"id":1,"tags":{"buildMode":"default","version":"16.3.1","bundler":"webpack","has-custom-webpack-config":"false","use-build-worker":"true"},"startTime":1787965947195,"traceId":"d0f6d228f3eef686"}]
1
+ [{"name":"run-webpack","duration":27058721,"timestamp":238426118487,"id":14,"parentId":1,"tags":{},"startTime":1788086601032,"traceId":"de2bf01339ceaa03"},{"name":"run-typescript","duration":13738665,"timestamp":238453180918,"id":1062,"parentId":1,"tags":{},"startTime":1788086628093,"traceId":"de2bf01339ceaa03"},{"name":"static-check","duration":3282343,"timestamp":238466932072,"id":1065,"parentId":1,"tags":{},"startTime":1788086641843,"traceId":"de2bf01339ceaa03"},{"name":"static-generation","duration":3662774,"timestamp":238470449775,"id":1251,"parentId":1,"tags":{},"startTime":1788086645361,"traceId":"de2bf01339ceaa03"},{"name":"collect-build-traces","duration":26494479,"timestamp":238470217739,"id":1248,"parentId":1,"tags":{},"startTime":1788086645128,"traceId":"de2bf01339ceaa03"},{"name":"output-standalone","duration":2598825,"timestamp":238496715252,"id":1259,"parentId":1,"tags":{},"startTime":1788086671624,"traceId":"de2bf01339ceaa03"},{"name":"telemetry-flush","duration":34,"timestamp":238499317653,"id":1262,"parentId":1,"tags":{},"startTime":1788086674227,"traceId":"de2bf01339ceaa03"},{"name":"next-build","duration":73982145,"timestamp":238425335547,"id":1,"tags":{"buildMode":"default","version":"16.3.1","bundler":"webpack","has-custom-webpack-config":"false","use-build-worker":"true"},"startTime":1788086600249,"traceId":"de2bf01339ceaa03"}]
@@ -0,0 +1,353 @@
1
+ // File: /Volumes/1T 原装/项目研发/pi-web-QT/app/api/projects/visibility/route.ts
2
+ import * as entry from '../../../../../../app/api/projects/visibility/route.js'
3
+ import type { NextRequest } from 'next/server.js'
4
+
5
+ import type { InstantConfigForTypeCheckInternal, Prefetch } from 'next/dist/build/segment-config/app/app-segment-config.js'
6
+
7
+ type TEntry = typeof import('../../../../../../app/api/projects/visibility/route.js')
8
+
9
+ type SegmentParams<T extends Object = any> = T extends Record<string, any>
10
+ ? { [K in keyof T]: T[K] extends string ? string | string[] | undefined : never }
11
+ : T
12
+
13
+ // Check that the entry is a valid entry
14
+ checkFields<Diff<{
15
+ GET?: Function
16
+ HEAD?: Function
17
+ OPTIONS?: Function
18
+ POST?: Function
19
+ PUT?: Function
20
+ DELETE?: Function
21
+ PATCH?: Function
22
+ config?: {}
23
+ generateStaticParams?: Function
24
+ instant?: InstantConfigForTypeCheckInternal
25
+ prefetch?: Prefetch
26
+ unstable_dynamicStaleTime?: number
27
+ revalidate?: RevalidateRange<TEntry> | false
28
+ dynamic?: 'auto' | 'force-dynamic' | 'error' | 'force-static'
29
+ dynamicParams?: boolean
30
+ fetchCache?: 'auto' | 'force-no-store' | 'only-no-store' | 'default-no-store' | 'default-cache' | 'only-cache' | 'force-cache'
31
+ /** @deprecated The `preferredRegion` config is deprecated. Remove this export. */
32
+ preferredRegion?: 'auto' | 'global' | 'home' | string | string[]
33
+ runtime?: 'nodejs' | 'experimental-edge' | 'edge'
34
+ maxDuration?: number
35
+
36
+ }, TEntry, ''>>()
37
+
38
+ type RouteContext = { params: Promise<SegmentParams> }
39
+ // Check the prop type of the entry function
40
+ if ('GET' in entry) {
41
+ checkFields<
42
+ Diff<
43
+ ParamCheck<Request | NextRequest>,
44
+ {
45
+ __tag__: 'GET'
46
+ __param_position__: 'first'
47
+ __param_type__: FirstArg<MaybeField<TEntry, 'GET'>>
48
+ },
49
+ 'GET'
50
+ >
51
+ >()
52
+ checkFields<
53
+ Diff<
54
+ ParamCheck<RouteContext>,
55
+ {
56
+ __tag__: 'GET'
57
+ __param_position__: 'second'
58
+ __param_type__: SecondArg<MaybeField<TEntry, 'GET'>>
59
+ },
60
+ 'GET'
61
+ >
62
+ >()
63
+
64
+ checkFields<
65
+ Diff<
66
+ {
67
+ __tag__: 'GET',
68
+ __return_type__: Response | void | never | Promise<Response | void | never>
69
+ },
70
+ {
71
+ __tag__: 'GET',
72
+ __return_type__: ReturnType<MaybeField<TEntry, 'GET'>>
73
+ },
74
+ 'GET'
75
+ >
76
+ >()
77
+ }
78
+ // Check the prop type of the entry function
79
+ if ('HEAD' in entry) {
80
+ checkFields<
81
+ Diff<
82
+ ParamCheck<Request | NextRequest>,
83
+ {
84
+ __tag__: 'HEAD'
85
+ __param_position__: 'first'
86
+ __param_type__: FirstArg<MaybeField<TEntry, 'HEAD'>>
87
+ },
88
+ 'HEAD'
89
+ >
90
+ >()
91
+ checkFields<
92
+ Diff<
93
+ ParamCheck<RouteContext>,
94
+ {
95
+ __tag__: 'HEAD'
96
+ __param_position__: 'second'
97
+ __param_type__: SecondArg<MaybeField<TEntry, 'HEAD'>>
98
+ },
99
+ 'HEAD'
100
+ >
101
+ >()
102
+
103
+ checkFields<
104
+ Diff<
105
+ {
106
+ __tag__: 'HEAD',
107
+ __return_type__: Response | void | never | Promise<Response | void | never>
108
+ },
109
+ {
110
+ __tag__: 'HEAD',
111
+ __return_type__: ReturnType<MaybeField<TEntry, 'HEAD'>>
112
+ },
113
+ 'HEAD'
114
+ >
115
+ >()
116
+ }
117
+ // Check the prop type of the entry function
118
+ if ('OPTIONS' in entry) {
119
+ checkFields<
120
+ Diff<
121
+ ParamCheck<Request | NextRequest>,
122
+ {
123
+ __tag__: 'OPTIONS'
124
+ __param_position__: 'first'
125
+ __param_type__: FirstArg<MaybeField<TEntry, 'OPTIONS'>>
126
+ },
127
+ 'OPTIONS'
128
+ >
129
+ >()
130
+ checkFields<
131
+ Diff<
132
+ ParamCheck<RouteContext>,
133
+ {
134
+ __tag__: 'OPTIONS'
135
+ __param_position__: 'second'
136
+ __param_type__: SecondArg<MaybeField<TEntry, 'OPTIONS'>>
137
+ },
138
+ 'OPTIONS'
139
+ >
140
+ >()
141
+
142
+ checkFields<
143
+ Diff<
144
+ {
145
+ __tag__: 'OPTIONS',
146
+ __return_type__: Response | void | never | Promise<Response | void | never>
147
+ },
148
+ {
149
+ __tag__: 'OPTIONS',
150
+ __return_type__: ReturnType<MaybeField<TEntry, 'OPTIONS'>>
151
+ },
152
+ 'OPTIONS'
153
+ >
154
+ >()
155
+ }
156
+ // Check the prop type of the entry function
157
+ if ('POST' in entry) {
158
+ checkFields<
159
+ Diff<
160
+ ParamCheck<Request | NextRequest>,
161
+ {
162
+ __tag__: 'POST'
163
+ __param_position__: 'first'
164
+ __param_type__: FirstArg<MaybeField<TEntry, 'POST'>>
165
+ },
166
+ 'POST'
167
+ >
168
+ >()
169
+ checkFields<
170
+ Diff<
171
+ ParamCheck<RouteContext>,
172
+ {
173
+ __tag__: 'POST'
174
+ __param_position__: 'second'
175
+ __param_type__: SecondArg<MaybeField<TEntry, 'POST'>>
176
+ },
177
+ 'POST'
178
+ >
179
+ >()
180
+
181
+ checkFields<
182
+ Diff<
183
+ {
184
+ __tag__: 'POST',
185
+ __return_type__: Response | void | never | Promise<Response | void | never>
186
+ },
187
+ {
188
+ __tag__: 'POST',
189
+ __return_type__: ReturnType<MaybeField<TEntry, 'POST'>>
190
+ },
191
+ 'POST'
192
+ >
193
+ >()
194
+ }
195
+ // Check the prop type of the entry function
196
+ if ('PUT' in entry) {
197
+ checkFields<
198
+ Diff<
199
+ ParamCheck<Request | NextRequest>,
200
+ {
201
+ __tag__: 'PUT'
202
+ __param_position__: 'first'
203
+ __param_type__: FirstArg<MaybeField<TEntry, 'PUT'>>
204
+ },
205
+ 'PUT'
206
+ >
207
+ >()
208
+ checkFields<
209
+ Diff<
210
+ ParamCheck<RouteContext>,
211
+ {
212
+ __tag__: 'PUT'
213
+ __param_position__: 'second'
214
+ __param_type__: SecondArg<MaybeField<TEntry, 'PUT'>>
215
+ },
216
+ 'PUT'
217
+ >
218
+ >()
219
+
220
+ checkFields<
221
+ Diff<
222
+ {
223
+ __tag__: 'PUT',
224
+ __return_type__: Response | void | never | Promise<Response | void | never>
225
+ },
226
+ {
227
+ __tag__: 'PUT',
228
+ __return_type__: ReturnType<MaybeField<TEntry, 'PUT'>>
229
+ },
230
+ 'PUT'
231
+ >
232
+ >()
233
+ }
234
+ // Check the prop type of the entry function
235
+ if ('DELETE' in entry) {
236
+ checkFields<
237
+ Diff<
238
+ ParamCheck<Request | NextRequest>,
239
+ {
240
+ __tag__: 'DELETE'
241
+ __param_position__: 'first'
242
+ __param_type__: FirstArg<MaybeField<TEntry, 'DELETE'>>
243
+ },
244
+ 'DELETE'
245
+ >
246
+ >()
247
+ checkFields<
248
+ Diff<
249
+ ParamCheck<RouteContext>,
250
+ {
251
+ __tag__: 'DELETE'
252
+ __param_position__: 'second'
253
+ __param_type__: SecondArg<MaybeField<TEntry, 'DELETE'>>
254
+ },
255
+ 'DELETE'
256
+ >
257
+ >()
258
+
259
+ checkFields<
260
+ Diff<
261
+ {
262
+ __tag__: 'DELETE',
263
+ __return_type__: Response | void | never | Promise<Response | void | never>
264
+ },
265
+ {
266
+ __tag__: 'DELETE',
267
+ __return_type__: ReturnType<MaybeField<TEntry, 'DELETE'>>
268
+ },
269
+ 'DELETE'
270
+ >
271
+ >()
272
+ }
273
+ // Check the prop type of the entry function
274
+ if ('PATCH' in entry) {
275
+ checkFields<
276
+ Diff<
277
+ ParamCheck<Request | NextRequest>,
278
+ {
279
+ __tag__: 'PATCH'
280
+ __param_position__: 'first'
281
+ __param_type__: FirstArg<MaybeField<TEntry, 'PATCH'>>
282
+ },
283
+ 'PATCH'
284
+ >
285
+ >()
286
+ checkFields<
287
+ Diff<
288
+ ParamCheck<RouteContext>,
289
+ {
290
+ __tag__: 'PATCH'
291
+ __param_position__: 'second'
292
+ __param_type__: SecondArg<MaybeField<TEntry, 'PATCH'>>
293
+ },
294
+ 'PATCH'
295
+ >
296
+ >()
297
+
298
+ checkFields<
299
+ Diff<
300
+ {
301
+ __tag__: 'PATCH',
302
+ __return_type__: Response | void | never | Promise<Response | void | never>
303
+ },
304
+ {
305
+ __tag__: 'PATCH',
306
+ __return_type__: ReturnType<MaybeField<TEntry, 'PATCH'>>
307
+ },
308
+ 'PATCH'
309
+ >
310
+ >()
311
+ }
312
+
313
+ // Check the arguments and return type of the generateStaticParams function
314
+ if ('generateStaticParams' in entry) {
315
+ checkFields<Diff<{ params: SegmentParams }, FirstArg<MaybeField<TEntry, 'generateStaticParams'>>, 'generateStaticParams'>>()
316
+ checkFields<Diff<{ __tag__: 'generateStaticParams', __return_type__: any[] | Promise<any[]> }, { __tag__: 'generateStaticParams', __return_type__: ReturnType<MaybeField<TEntry, 'generateStaticParams'>> }>>()
317
+ }
318
+
319
+ export interface PageProps {
320
+ params?: Promise<SegmentParams>
321
+ searchParams?: Promise<any>
322
+ }
323
+ export interface LayoutProps {
324
+ children?: React.ReactNode
325
+
326
+ params?: Promise<SegmentParams>
327
+ }
328
+
329
+ // =============
330
+ // Utility types
331
+ type RevalidateRange<T> = T extends { revalidate: any } ? NonNegative<T['revalidate']> : never
332
+
333
+ // If T is unknown or any, it will be an empty {} type. Otherwise, it will be the same as Omit<T, keyof Base>.
334
+ type OmitWithTag<T, K extends keyof any, _M> = Omit<T, K>
335
+ type Diff<Base, T extends Base, Message extends string = ''> = 0 extends (1 & T) ? {} : OmitWithTag<T, keyof Base, Message>
336
+
337
+ type FirstArg<T extends Function> = T extends (...args: [infer T, any]) => any ? unknown extends T ? any : T : never
338
+ type SecondArg<T extends Function> = T extends (...args: [any, infer T]) => any ? unknown extends T ? any : T : never
339
+ type MaybeField<T, K extends string> = T extends { [k in K]: infer G } ? G extends Function ? G : never : never
340
+
341
+ type ParamCheck<T> = {
342
+ __tag__: string
343
+ __param_position__: string
344
+ __param_type__: T
345
+ }
346
+
347
+ function checkFields<_ extends { [k in keyof any]: never }>() {}
348
+
349
+ // https://github.com/sindresorhus/type-fest
350
+ type Numeric = number | bigint
351
+ type Zero = 0 | 0n
352
+ type Negative<T extends Numeric> = T extends Zero ? never : `${T}` extends `-${string}` ? T : never
353
+ type NonNegative<T extends Numeric> = T extends Zero ? T : Negative<T> extends never ? T : '__invalid_negative_number__'
@@ -2,7 +2,7 @@
2
2
  // Do not edit this file manually
3
3
 
4
4
  type AppRoutes = "/"
5
- type AppRouteHandlerRoutes = "/api/agent/[id]" | "/api/agent/[id]/bash-output" | "/api/agent/[id]/events" | "/api/agent/new" | "/api/agent/running" | "/api/agent/running/events" | "/api/app-update" | "/api/auth/all-providers" | "/api/auth/api-key/[provider]" | "/api/auth/combined" | "/api/auth/login/[provider]" | "/api/auth/logout/[provider]" | "/api/auth/providers" | "/api/backup/export" | "/api/backup/import" | "/api/cwd/browse" | "/api/cwd/validate" | "/api/deepseek/balance" | "/api/default-cwd" | "/api/events" | "/api/features" | "/api/file-index" | "/api/files/[...path]" | "/api/git/diff" | "/api/git/push" | "/api/git/stash" | "/api/git/status" | "/api/home" | "/api/import/discover" | "/api/import/execute" | "/api/import/status" | "/api/logs" | "/api/mcp" | "/api/mcp/restart" | "/api/models" | "/api/models-config" | "/api/models-config/builtin" | "/api/models-config/catalog" | "/api/models-config/discover" | "/api/models-config/test" | "/api/modes" | "/api/plugins" | "/api/project-aliases" | "/api/project-state" | "/api/project-trust" | "/api/proxy" | "/api/proxy/test" | "/api/sessions" | "/api/sessions/[id]" | "/api/sessions/[id]/auto-name" | "/api/sessions/[id]/context" | "/api/sessions/[id]/entries/[entryId]/thinking" | "/api/sessions/[id]/entries/[entryId]/tool-result-image" | "/api/sessions/[id]/export" | "/api/sessions/[id]/queue-recovery" | "/api/sessions/[id]/state" | "/api/settings/title-model" | "/api/skills" | "/api/skills/check" | "/api/skills/install" | "/api/skills/search" | "/api/skills/update" | "/api/snippets" | "/api/snippets/[id]" | "/api/subagents" | "/api/subagents/agents/[name]" | "/api/subagents/transcript" | "/api/tasks" | "/api/tasks/[id]" | "/api/tasks/[id]/[action]" | "/api/tasks/[id]/changed-files" | "/api/tasks/[id]/diff" | "/api/tasks/[id]/events" | "/api/tasks/batch" | "/api/tasks/events" | "/api/tasks/settings" | "/api/tasks/templates" | "/api/themes" | "/api/themes/[name]" | "/api/tools/settings" | "/api/usage" | "/api/vision-config" | "/api/worktrees"
5
+ type AppRouteHandlerRoutes = "/api/agent/[id]" | "/api/agent/[id]/bash-output" | "/api/agent/[id]/events" | "/api/agent/new" | "/api/agent/running" | "/api/agent/running/events" | "/api/app-update" | "/api/auth/all-providers" | "/api/auth/api-key/[provider]" | "/api/auth/combined" | "/api/auth/login/[provider]" | "/api/auth/logout/[provider]" | "/api/auth/providers" | "/api/backup/export" | "/api/backup/import" | "/api/cwd/browse" | "/api/cwd/validate" | "/api/deepseek/balance" | "/api/default-cwd" | "/api/events" | "/api/features" | "/api/file-index" | "/api/files/[...path]" | "/api/git/diff" | "/api/git/push" | "/api/git/stash" | "/api/git/status" | "/api/home" | "/api/import/discover" | "/api/import/execute" | "/api/import/status" | "/api/logs" | "/api/mcp" | "/api/mcp/restart" | "/api/models" | "/api/models-config" | "/api/models-config/builtin" | "/api/models-config/catalog" | "/api/models-config/discover" | "/api/models-config/test" | "/api/modes" | "/api/plugins" | "/api/project-aliases" | "/api/project-state" | "/api/project-trust" | "/api/projects/visibility" | "/api/proxy" | "/api/proxy/test" | "/api/sessions" | "/api/sessions/[id]" | "/api/sessions/[id]/auto-name" | "/api/sessions/[id]/context" | "/api/sessions/[id]/entries/[entryId]/thinking" | "/api/sessions/[id]/entries/[entryId]/tool-result-image" | "/api/sessions/[id]/export" | "/api/sessions/[id]/queue-recovery" | "/api/sessions/[id]/state" | "/api/settings/title-model" | "/api/skills" | "/api/skills/check" | "/api/skills/install" | "/api/skills/search" | "/api/skills/update" | "/api/snippets" | "/api/snippets/[id]" | "/api/subagents" | "/api/subagents/agents/[name]" | "/api/subagents/transcript" | "/api/tasks" | "/api/tasks/[id]" | "/api/tasks/[id]/[action]" | "/api/tasks/[id]/changed-files" | "/api/tasks/[id]/diff" | "/api/tasks/[id]/events" | "/api/tasks/batch" | "/api/tasks/events" | "/api/tasks/settings" | "/api/tasks/templates" | "/api/themes" | "/api/themes/[name]" | "/api/tools/settings" | "/api/usage" | "/api/vision-config" | "/api/worktrees"
6
6
  type PageRoutes = never
7
7
  type LayoutRoutes = "/"
8
8
  type RedirectRoutes = never
@@ -57,6 +57,7 @@ interface ParamMap {
57
57
  "/api/project-aliases": {}
58
58
  "/api/project-state": {}
59
59
  "/api/project-trust": {}
60
+ "/api/projects/visibility": {}
60
61
  "/api/proxy": {}
61
62
  "/api/proxy/test": {}
62
63
  "/api/sessions": {}
@@ -461,6 +461,15 @@ type RouteHandlerConfig<Route extends AppRouteHandlerRoutes = AppRouteHandlerRou
461
461
  type __Unused = __Check
462
462
  }
463
463
 
464
+ // Validate ../../app/api/projects/visibility/route.ts
465
+ {
466
+ type __IsExpected<Specific extends RouteHandlerConfig<"/api/projects/visibility">> = Specific
467
+ const handler = {} as typeof import("../../app/api/projects/visibility/route.js")
468
+ type __Check = __IsExpected<typeof handler>
469
+ // @ts-ignore
470
+ type __Unused = __Check
471
+ }
472
+
464
473
  // Validate ../../app/api/proxy/route.ts
465
474
  {
466
475
  type __IsExpected<Specific extends RouteHandlerConfig<"/api/proxy">> = Specific
@@ -0,0 +1,135 @@
1
+ "use strict";
2
+
3
+ // Idle memory watchdog for the next-server process. V8 only returns freed
4
+ // heap to the OS on process exit, so a long-running server's RSS settles at
5
+ // its high-water mark no matter how much GC reclaims internally. This module
6
+ // watches RSS and exits the process once it has stayed above the threshold
7
+ // while no agent session is running; the supervisor (launchd KeepAlive) then
8
+ // starts a fresh process.
9
+
10
+ const DEFAULT_RESTART_MB = 1229;
11
+ const DEFAULT_CHECK_MINUTES = 5;
12
+ const CONSECUTIVE_OVER_LIMIT = 2;
13
+ const STARTUP_GRACE_TICKS = 3;
14
+ const RUNNING_CHECK_TIMEOUT_MS = 5000;
15
+
16
+ function parsePositiveInt(raw, fallback, minimum) {
17
+ const n = Number.parseInt(raw ?? "", 10);
18
+ if (!Number.isFinite(n) || n < minimum) return fallback;
19
+ return n;
20
+ }
21
+
22
+ /**
23
+ * Resolve the watchdog config from env. Returns null when the watchdog must
24
+ * not run: explicitly disabled (PI_WEB_RSS_RESTART_MB=0), running on Windows
25
+ * (no launchd-style supervisor to restart us, and auto-restart is not wanted
26
+ * there), or no port known (without a port we cannot ask /api/agent/running
27
+ * and must never exit).
28
+ */
29
+ function resolveConfig(env) {
30
+ if (process.platform === "win32") return null;
31
+ const rawRestart = env.PI_WEB_RSS_RESTART_MB;
32
+ if (rawRestart !== undefined && rawRestart !== "" && Number(rawRestart) === 0) {
33
+ return null;
34
+ }
35
+ const port = Number.parseInt(env.PI_WEB_PORT ?? "", 10);
36
+ if (!Number.isFinite(port) || port <= 0) return null;
37
+ return {
38
+ port,
39
+ hostname: env.PI_WEB_HOSTNAME || "127.0.0.1",
40
+ restartMb: parsePositiveInt(rawRestart, DEFAULT_RESTART_MB, 1),
41
+ checkMinutes: parsePositiveInt(env.PI_WEB_RSS_CHECK_MINUTES, DEFAULT_CHECK_MINUTES, 1),
42
+ };
43
+ }
44
+
45
+ function basicAuthHeaders(env) {
46
+ // Next.js loads PI_WEB_PASSWORD from .env in production, and the proxy gate
47
+ // rejects unauthenticated /api calls. Reuse the credential this process
48
+ // already holds so the loopback check passes without weakening auth.
49
+ const password = env.PI_WEB_PASSWORD;
50
+ if (!password) return undefined;
51
+ return { authorization: `Basic ${Buffer.from(`pi:${password}`).toString("base64")}` };
52
+ }
53
+
54
+ async function isServerIdle(config, env) {
55
+ const res = await fetch(`http://${config.hostname}:${config.port}/api/agent/running`, {
56
+ headers: basicAuthHeaders(env),
57
+ signal: AbortSignal.timeout(RUNNING_CHECK_TIMEOUT_MS),
58
+ });
59
+ if (!res.ok) return null;
60
+ const data = await res.json();
61
+ const ids = Array.isArray(data && data.runningSessionIds) ? data.runningSessionIds : [];
62
+ return ids.length === 0;
63
+ }
64
+
65
+ /**
66
+ * Start the watchdog loop in the current process. Never throws; failures to
67
+ * check are skipped conservatively (streak reset) so a transient error can
68
+ * never cause an exit.
69
+ */
70
+ function startMemoryWatchdog(log = defaultLog) {
71
+ const config = resolveConfig(process.env);
72
+ if (!config) return null;
73
+
74
+ let ticks = 0;
75
+ let overLimitStreak = 0;
76
+ let loggedNonIdle = false;
77
+ log(`watching RSS every ${config.checkMinutes}min, restart at >= ${config.restartMb}MB when idle (grace: ${STARTUP_GRACE_TICKS} ticks)`);
78
+
79
+ const timer = setInterval(() => {
80
+ ticks += 1;
81
+ const rssMb = process.memoryUsage().rss / (1024 * 1024);
82
+ if (ticks <= STARTUP_GRACE_TICKS || rssMb < config.restartMb) {
83
+ overLimitStreak = 0;
84
+ return;
85
+ }
86
+ isServerIdle(config, process.env)
87
+ .then((idle) => {
88
+ if (idle !== true) {
89
+ // Sessions running, or the check failed — never exit on unknown state.
90
+ if (!loggedNonIdle) {
91
+ loggedNonIdle = true;
92
+ log(`over limit (${Math.round(rssMb)}MB) but idle check says ${idle === null ? "unavailable (check failed)" : "sessions running"}; not restarting`);
93
+ }
94
+ overLimitStreak = 0;
95
+ return;
96
+ }
97
+ overLimitStreak += 1;
98
+ log(`RSS ${Math.round(rssMb)}MB >= ${config.restartMb}MB and idle (${overLimitStreak}/${CONSECUTIVE_OVER_LIMIT})`);
99
+ if (overLimitStreak >= CONSECUTIVE_OVER_LIMIT) {
100
+ clearInterval(timer);
101
+ log("exiting so the supervisor can restart us and reclaim memory");
102
+ process.exit(0);
103
+ }
104
+ })
105
+ .catch((err) => {
106
+ if (!loggedNonIdle) {
107
+ loggedNonIdle = true;
108
+ log(`over limit but idle check errored: ${err && err.message}; not restarting`);
109
+ }
110
+ overLimitStreak = 0;
111
+ });
112
+ }, config.checkMinutes * 60 * 1000);
113
+ // The server itself keeps the process alive; the watchdog must never be the
114
+ // reason a process stays up.
115
+ timer.unref();
116
+ return timer;
117
+ }
118
+
119
+ function defaultLog(message) {
120
+ console.log(`[memory-watchdog] ${message}`);
121
+ }
122
+
123
+ module.exports = { startMemoryWatchdog, resolveConfig };
124
+
125
+ // CLI: `node bin/memory-watchdog.js` runs the loop in-process (smoke tests).
126
+ // The interval is unref'd for server use, so re-ref it to keep this process
127
+ // alive.
128
+ if (require.main === module) {
129
+ const timer = startMemoryWatchdog();
130
+ if (!timer) {
131
+ console.log("[memory-watchdog] disabled (PI_WEB_RSS_RESTART_MB=0 or no PI_WEB_PORT)");
132
+ } else {
133
+ timer.ref();
134
+ }
135
+ }
package/bin/pi-web.js CHANGED
@@ -48,6 +48,12 @@ const { port, hostname, openBrowser } = parseLaunchOptions();
48
48
  const { mergedNodeOptions } = require("./with-memory-limit");
49
49
  process.env.NODE_OPTIONS = mergedNodeOptions(process.env.NODE_OPTIONS);
50
50
 
51
+ // Idle memory watchdog, loaded only into the next-server process. Injected as
52
+ // a node CLI arg (not NODE_OPTIONS) so agent-spawned child processes never
53
+ // inherit it. Disabled with PI_WEB_RSS_RESTART_MB=0; the module itself also
54
+ // refuses to run when it doesn't know the port to ask about running sessions.
55
+ const watchdogPreload = path.join(__dirname, "watchdog-preload.js");
56
+
51
57
  if (!fs.existsSync(nextDir)) {
52
58
  console.error("Build artifacts not found. Please report this issue.");
53
59
  process.exit(1);
@@ -71,10 +77,10 @@ const nextArgs = ["start", "-p", port, "-H", hostname];
71
77
 
72
78
  // Always run next's JS entry with node directly — avoids .bin symlink issues
73
79
  // and path-with-spaces problems on Windows when shell: true is used.
74
- const child = spawn(process.execPath, [nextBin, ...nextArgs], {
80
+ const child = spawn(process.execPath, ["--require", watchdogPreload, nextBin, ...nextArgs], {
75
81
  cwd: pkgDir,
76
82
  stdio: ["inherit", "pipe", "inherit"],
77
- env: { ...process.env, PI_WEB_HOSTNAME: hostname },
83
+ env: { ...process.env, PI_WEB_HOSTNAME: hostname, PI_WEB_PORT: String(port) },
78
84
  });
79
85
  wireChildProcessLifecycle(child);
80
86
 
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+
3
+ // Loaded into the next-server process via `node --require bin/watchdog-preload.js
4
+ // next start ...` (wired up in pi-web.js). Startup is deferred so a problem
5
+ // here can never delay or break server boot — worst case is one warn line and
6
+ // no watchdog.
7
+
8
+ try {
9
+ // eslint-disable-next-line @typescript-eslint/no-require-imports
10
+ const { startMemoryWatchdog } = require("./memory-watchdog");
11
+ setTimeout(() => {
12
+ try {
13
+ startMemoryWatchdog();
14
+ } catch (err) {
15
+ console.warn(`[memory-watchdog] failed to start: ${err && err.message}`);
16
+ }
17
+ }, 3000).unref();
18
+ } catch (err) {
19
+ console.warn(`[memory-watchdog] preload failed: ${err && err.message}`);
20
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@qt4798/pi-web",
3
- "version": "0.14.5",
3
+ "version": "0.15.0",
4
4
  "description": "Web workspace for the pi coding agent",
5
5
  "homepage": "https://github.com/t479842598/pi-web-QT#readme",
6
6
  "repository": {
@@ -55,6 +55,7 @@
55
55
  "ansi_up": "^6.0.6",
56
56
  "js-yaml": "^5.2.3",
57
57
  "katex": "^0.16.47",
58
+ "lucide-react": "^1.37.0",
58
59
  "mammoth": "^1.12.0",
59
60
  "mermaid": "^11.14.0",
60
61
  "next": "16.3.1",