@perturbationai/pai 0.1.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 (687) hide show
  1. package/.next/BUILD_ID +1 -0
  2. package/.next/app-path-routes-manifest.json +62 -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 +189 -0
  12. package/.next/react-loadable-manifest.json +2367 -0
  13. package/.next/required-server-files.js +389 -0
  14. package/.next/required-server-files.json +389 -0
  15. package/.next/routes-manifest.json +479 -0
  16. package/.next/server/app/_global-error/page.js +31 -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 +27 -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 +20 -0
  24. package/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -0
  25. package/.next/server/app/_not-found/page.js +1 -0
  26. package/.next/server/app/_not-found/page.js.nft.json +1 -0
  27. package/.next/server/app/_not-found/page_client-reference-manifest.js +1 -0
  28. package/.next/server/app/_not-found.html +1 -0
  29. package/.next/server/app/_not-found.meta +27 -0
  30. package/.next/server/app/_not-found.rsc +21 -0
  31. package/.next/server/app/_not-found.segments/_full.segment.rsc +21 -0
  32. package/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +25 -0
  33. package/.next/server/app/_not-found.segments/_tree.segment.rsc +6 -0
  34. package/.next/server/app/api/agent/[id]/bash-output/route.js +1 -0
  35. package/.next/server/app/api/agent/[id]/bash-output/route.js.nft.json +1 -0
  36. package/.next/server/app/api/agent/[id]/bash-output/route_client-reference-manifest.js +1 -0
  37. package/.next/server/app/api/agent/[id]/events/route.js +3 -0
  38. package/.next/server/app/api/agent/[id]/events/route.js.nft.json +1 -0
  39. package/.next/server/app/api/agent/[id]/events/route_client-reference-manifest.js +1 -0
  40. package/.next/server/app/api/agent/[id]/lease/route.js +1 -0
  41. package/.next/server/app/api/agent/[id]/lease/route.js.nft.json +1 -0
  42. package/.next/server/app/api/agent/[id]/lease/route_client-reference-manifest.js +1 -0
  43. package/.next/server/app/api/agent/[id]/route.js +1 -0
  44. package/.next/server/app/api/agent/[id]/route.js.nft.json +1 -0
  45. package/.next/server/app/api/agent/[id]/route_client-reference-manifest.js +1 -0
  46. package/.next/server/app/api/agent/new/route.js +1 -0
  47. package/.next/server/app/api/agent/new/route.js.nft.json +1 -0
  48. package/.next/server/app/api/agent/new/route_client-reference-manifest.js +1 -0
  49. package/.next/server/app/api/agent/running/route.js +1 -0
  50. package/.next/server/app/api/agent/running/route.js.nft.json +1 -0
  51. package/.next/server/app/api/agent/running/route_client-reference-manifest.js +1 -0
  52. package/.next/server/app/api/app-update/route.js +1 -0
  53. package/.next/server/app/api/app-update/route.js.nft.json +1 -0
  54. package/.next/server/app/api/app-update/route_client-reference-manifest.js +1 -0
  55. package/.next/server/app/api/auth/api-key/[provider]/route.js +1 -0
  56. package/.next/server/app/api/auth/api-key/[provider]/route.js.nft.json +1 -0
  57. package/.next/server/app/api/auth/api-key/[provider]/route_client-reference-manifest.js +1 -0
  58. package/.next/server/app/api/auth/login/[provider]/route.js +3 -0
  59. package/.next/server/app/api/auth/login/[provider]/route.js.nft.json +1 -0
  60. package/.next/server/app/api/auth/login/[provider]/route_client-reference-manifest.js +1 -0
  61. package/.next/server/app/api/auth/logout/[provider]/route.js +1 -0
  62. package/.next/server/app/api/auth/logout/[provider]/route.js.nft.json +1 -0
  63. package/.next/server/app/api/auth/logout/[provider]/route_client-reference-manifest.js +1 -0
  64. package/.next/server/app/api/auth/providers/route.js +1 -0
  65. package/.next/server/app/api/auth/providers/route.js.nft.json +1 -0
  66. package/.next/server/app/api/auth/providers/route_client-reference-manifest.js +1 -0
  67. package/.next/server/app/api/cwd/browse/route.js +1 -0
  68. package/.next/server/app/api/cwd/browse/route.js.nft.json +1 -0
  69. package/.next/server/app/api/cwd/browse/route_client-reference-manifest.js +1 -0
  70. package/.next/server/app/api/cwd/validate/route.js +1 -0
  71. package/.next/server/app/api/cwd/validate/route.js.nft.json +1 -0
  72. package/.next/server/app/api/cwd/validate/route_client-reference-manifest.js +1 -0
  73. package/.next/server/app/api/default-cwd/route.js +1 -0
  74. package/.next/server/app/api/default-cwd/route.js.nft.json +1 -0
  75. package/.next/server/app/api/default-cwd/route_client-reference-manifest.js +1 -0
  76. package/.next/server/app/api/file-index/route.js +1 -0
  77. package/.next/server/app/api/file-index/route.js.nft.json +1 -0
  78. package/.next/server/app/api/file-index/route_client-reference-manifest.js +1 -0
  79. package/.next/server/app/api/files/[...path]/route.js +49 -0
  80. package/.next/server/app/api/files/[...path]/route.js.nft.json +1 -0
  81. package/.next/server/app/api/files/[...path]/route_client-reference-manifest.js +1 -0
  82. package/.next/server/app/api/git/diff/route.js +6 -0
  83. package/.next/server/app/api/git/diff/route.js.nft.json +1 -0
  84. package/.next/server/app/api/git/diff/route_client-reference-manifest.js +1 -0
  85. package/.next/server/app/api/git/status/route.js +6 -0
  86. package/.next/server/app/api/git/status/route.js.nft.json +1 -0
  87. package/.next/server/app/api/git/status/route_client-reference-manifest.js +1 -0
  88. package/.next/server/app/api/home/route.js +1 -0
  89. package/.next/server/app/api/home/route.js.nft.json +1 -0
  90. package/.next/server/app/api/home/route_client-reference-manifest.js +1 -0
  91. package/.next/server/app/api/models/route.js +1 -0
  92. package/.next/server/app/api/models/route.js.nft.json +1 -0
  93. package/.next/server/app/api/models/route_client-reference-manifest.js +1 -0
  94. package/.next/server/app/api/models-config/catalog/route.js +1 -0
  95. package/.next/server/app/api/models-config/catalog/route.js.nft.json +1 -0
  96. package/.next/server/app/api/models-config/catalog/route_client-reference-manifest.js +1 -0
  97. package/.next/server/app/api/models-config/discover/route.js +1 -0
  98. package/.next/server/app/api/models-config/discover/route.js.nft.json +1 -0
  99. package/.next/server/app/api/models-config/discover/route_client-reference-manifest.js +1 -0
  100. package/.next/server/app/api/models-config/route.js +1 -0
  101. package/.next/server/app/api/models-config/route.js.nft.json +1 -0
  102. package/.next/server/app/api/models-config/route_client-reference-manifest.js +1 -0
  103. package/.next/server/app/api/models-config/test/route.js +1 -0
  104. package/.next/server/app/api/models-config/test/route.js.nft.json +1 -0
  105. package/.next/server/app/api/models-config/test/route_client-reference-manifest.js +1 -0
  106. package/.next/server/app/api/pai-build/route.js +1 -0
  107. package/.next/server/app/api/pai-build/route.js.nft.json +1 -0
  108. package/.next/server/app/api/pai-build/route_client-reference-manifest.js +1 -0
  109. package/.next/server/app/api/plugins/check/route.js +1 -0
  110. package/.next/server/app/api/plugins/check/route.js.nft.json +1 -0
  111. package/.next/server/app/api/plugins/check/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/provider-usage/query/route.js +1 -0
  119. package/.next/server/app/api/provider-usage/query/route.js.nft.json +1 -0
  120. package/.next/server/app/api/provider-usage/query/route_client-reference-manifest.js +1 -0
  121. package/.next/server/app/api/push/config/route.js +1 -0
  122. package/.next/server/app/api/push/config/route.js.nft.json +1 -0
  123. package/.next/server/app/api/push/config/route_client-reference-manifest.js +1 -0
  124. package/.next/server/app/api/push/subscribe/route.js +1 -0
  125. package/.next/server/app/api/push/subscribe/route.js.nft.json +1 -0
  126. package/.next/server/app/api/push/subscribe/route_client-reference-manifest.js +1 -0
  127. package/.next/server/app/api/sessions/[id]/auto-name/route.js +10 -0
  128. package/.next/server/app/api/sessions/[id]/auto-name/route.js.nft.json +1 -0
  129. package/.next/server/app/api/sessions/[id]/auto-name/route_client-reference-manifest.js +1 -0
  130. package/.next/server/app/api/sessions/[id]/context/route.js +1 -0
  131. package/.next/server/app/api/sessions/[id]/context/route.js.nft.json +1 -0
  132. package/.next/server/app/api/sessions/[id]/context/route_client-reference-manifest.js +1 -0
  133. package/.next/server/app/api/sessions/[id]/entries/[entryId]/thinking/route.js +1 -0
  134. package/.next/server/app/api/sessions/[id]/entries/[entryId]/thinking/route.js.nft.json +1 -0
  135. package/.next/server/app/api/sessions/[id]/entries/[entryId]/thinking/route_client-reference-manifest.js +1 -0
  136. package/.next/server/app/api/sessions/[id]/entries/[entryId]/tool-result-image/route.js +1 -0
  137. package/.next/server/app/api/sessions/[id]/entries/[entryId]/tool-result-image/route.js.nft.json +1 -0
  138. package/.next/server/app/api/sessions/[id]/entries/[entryId]/tool-result-image/route_client-reference-manifest.js +1 -0
  139. package/.next/server/app/api/sessions/[id]/export/route.js +94 -0
  140. package/.next/server/app/api/sessions/[id]/export/route.js.nft.json +1 -0
  141. package/.next/server/app/api/sessions/[id]/export/route_client-reference-manifest.js +1 -0
  142. package/.next/server/app/api/sessions/[id]/route.js +1 -0
  143. package/.next/server/app/api/sessions/[id]/route.js.nft.json +1 -0
  144. package/.next/server/app/api/sessions/[id]/route_client-reference-manifest.js +1 -0
  145. package/.next/server/app/api/sessions/[id]/state/route.js +1 -0
  146. package/.next/server/app/api/sessions/[id]/state/route.js.nft.json +1 -0
  147. package/.next/server/app/api/sessions/[id]/state/route_client-reference-manifest.js +1 -0
  148. package/.next/server/app/api/sessions/route.js +1 -0
  149. package/.next/server/app/api/sessions/route.js.nft.json +1 -0
  150. package/.next/server/app/api/sessions/route_client-reference-manifest.js +1 -0
  151. package/.next/server/app/api/sessions/search/route.js +1 -0
  152. package/.next/server/app/api/sessions/search/route.js.nft.json +1 -0
  153. package/.next/server/app/api/sessions/search/route_client-reference-manifest.js +1 -0
  154. package/.next/server/app/api/skills/check/route.js +1 -0
  155. package/.next/server/app/api/skills/check/route.js.nft.json +1 -0
  156. package/.next/server/app/api/skills/check/route_client-reference-manifest.js +1 -0
  157. package/.next/server/app/api/skills/install/route.js +1 -0
  158. package/.next/server/app/api/skills/install/route.js.nft.json +1 -0
  159. package/.next/server/app/api/skills/install/route_client-reference-manifest.js +1 -0
  160. package/.next/server/app/api/skills/route.js +4 -0
  161. package/.next/server/app/api/skills/route.js.nft.json +1 -0
  162. package/.next/server/app/api/skills/route_client-reference-manifest.js +1 -0
  163. package/.next/server/app/api/skills/search/route.js +1 -0
  164. package/.next/server/app/api/skills/search/route.js.nft.json +1 -0
  165. package/.next/server/app/api/skills/search/route_client-reference-manifest.js +1 -0
  166. package/.next/server/app/api/skills/update/route.js +1 -0
  167. package/.next/server/app/api/skills/update/route.js.nft.json +1 -0
  168. package/.next/server/app/api/skills/update/route_client-reference-manifest.js +1 -0
  169. package/.next/server/app/api/subagents/[id]/route.js +1 -0
  170. package/.next/server/app/api/subagents/[id]/route.js.nft.json +1 -0
  171. package/.next/server/app/api/subagents/[id]/route_client-reference-manifest.js +1 -0
  172. package/.next/server/app/api/subagents/profiles/route.js +1 -0
  173. package/.next/server/app/api/subagents/profiles/route.js.nft.json +1 -0
  174. package/.next/server/app/api/subagents/profiles/route_client-reference-manifest.js +1 -0
  175. package/.next/server/app/api/subagents/settings/route.js +1 -0
  176. package/.next/server/app/api/subagents/settings/route.js.nft.json +1 -0
  177. package/.next/server/app/api/subagents/settings/route_client-reference-manifest.js +1 -0
  178. package/.next/server/app/api/terminal/[id]/events/route.js +4 -0
  179. package/.next/server/app/api/terminal/[id]/events/route.js.nft.json +1 -0
  180. package/.next/server/app/api/terminal/[id]/events/route_client-reference-manifest.js +1 -0
  181. package/.next/server/app/api/terminal/[id]/route.js +1 -0
  182. package/.next/server/app/api/terminal/[id]/route.js.nft.json +1 -0
  183. package/.next/server/app/api/terminal/[id]/route_client-reference-manifest.js +1 -0
  184. package/.next/server/app/api/terminal/route.js +1 -0
  185. package/.next/server/app/api/terminal/route.js.nft.json +1 -0
  186. package/.next/server/app/api/terminal/route_client-reference-manifest.js +1 -0
  187. package/.next/server/app/api/tools/settings/route.js +1 -0
  188. package/.next/server/app/api/tools/settings/route.js.nft.json +1 -0
  189. package/.next/server/app/api/tools/settings/route_client-reference-manifest.js +1 -0
  190. package/.next/server/app/api/web-auth/route.js +1 -0
  191. package/.next/server/app/api/web-auth/route.js.nft.json +1 -0
  192. package/.next/server/app/api/web-auth/route_client-reference-manifest.js +1 -0
  193. package/.next/server/app/api/worktrees/route.js +1 -0
  194. package/.next/server/app/api/worktrees/route.js.nft.json +1 -0
  195. package/.next/server/app/api/worktrees/route_client-reference-manifest.js +1 -0
  196. package/.next/server/app/favicon.ico/route.js +1 -0
  197. package/.next/server/app/favicon.ico/route.js.nft.json +1 -0
  198. package/.next/server/app/favicon.ico.body +0 -0
  199. package/.next/server/app/favicon.ico.meta +1 -0
  200. package/.next/server/app/index.html +1 -0
  201. package/.next/server/app/index.meta +21 -0
  202. package/.next/server/app/index.rsc +26 -0
  203. package/.next/server/app/index.segments/__PAGE__.segment.rsc +29 -0
  204. package/.next/server/app/index.segments/_full.segment.rsc +26 -0
  205. package/.next/server/app/index.segments/_tree.segment.rsc +7 -0
  206. package/.next/server/app/login/page.js +3 -0
  207. package/.next/server/app/login/page.js.nft.json +1 -0
  208. package/.next/server/app/login/page_client-reference-manifest.js +1 -0
  209. package/.next/server/app/login.html +1 -0
  210. package/.next/server/app/login.meta +26 -0
  211. package/.next/server/app/login.rsc +25 -0
  212. package/.next/server/app/login.segments/_full.segment.rsc +25 -0
  213. package/.next/server/app/login.segments/_tree.segment.rsc +6 -0
  214. package/.next/server/app/login.segments/login/__PAGE__.segment.rsc +29 -0
  215. package/.next/server/app/manifest.webmanifest/route.js +17 -0
  216. package/.next/server/app/manifest.webmanifest/route.js.nft.json +1 -0
  217. package/.next/server/app/manifest.webmanifest/route_client-reference-manifest.js +1 -0
  218. package/.next/server/app/manifest.webmanifest.body +1 -0
  219. package/.next/server/app/manifest.webmanifest.meta +1 -0
  220. package/.next/server/app/page.js +305 -0
  221. package/.next/server/app/page.js.nft.json +1 -0
  222. package/.next/server/app/page_client-reference-manifest.js +1 -0
  223. package/.next/server/app-paths-manifest.json +62 -0
  224. package/.next/server/chunks/1094.js +160 -0
  225. package/.next/server/chunks/127.js +1 -0
  226. package/.next/server/chunks/1515.js +1 -0
  227. package/.next/server/chunks/1555.js +1 -0
  228. package/.next/server/chunks/1601.js +24 -0
  229. package/.next/server/chunks/1625.js +1 -0
  230. package/.next/server/chunks/1800.js +1 -0
  231. package/.next/server/chunks/1813.js +1 -0
  232. package/.next/server/chunks/1860.js +1 -0
  233. package/.next/server/chunks/2075.js +23 -0
  234. package/.next/server/chunks/2106.js +1 -0
  235. package/.next/server/chunks/2169.js +36 -0
  236. package/.next/server/chunks/2190.js +1 -0
  237. package/.next/server/chunks/2243.js +1 -0
  238. package/.next/server/chunks/2325.js +82 -0
  239. package/.next/server/chunks/2349.js +1 -0
  240. package/.next/server/chunks/2408.js +1 -0
  241. package/.next/server/chunks/2430.js +193 -0
  242. package/.next/server/chunks/2452.js +93 -0
  243. package/.next/server/chunks/2744.js +1 -0
  244. package/.next/server/chunks/2903.js +1 -0
  245. package/.next/server/chunks/295.js +1 -0
  246. package/.next/server/chunks/3012.js +1 -0
  247. package/.next/server/chunks/3186.js +86 -0
  248. package/.next/server/chunks/3379.js +1 -0
  249. package/.next/server/chunks/3383.js +27 -0
  250. package/.next/server/chunks/3569.js +1 -0
  251. package/.next/server/chunks/3618.js +1 -0
  252. package/.next/server/chunks/3869.js +8 -0
  253. package/.next/server/chunks/3894.js +1 -0
  254. package/.next/server/chunks/426.js +14 -0
  255. package/.next/server/chunks/4267.js +1 -0
  256. package/.next/server/chunks/4315.js +1 -0
  257. package/.next/server/chunks/4367.js +1 -0
  258. package/.next/server/chunks/4372.js +1 -0
  259. package/.next/server/chunks/4538.js +24 -0
  260. package/.next/server/chunks/4548.js +1 -0
  261. package/.next/server/chunks/4563.js +38 -0
  262. package/.next/server/chunks/4674.js +1 -0
  263. package/.next/server/chunks/4741.js +165 -0
  264. package/.next/server/chunks/4980.js +1 -0
  265. package/.next/server/chunks/5029.js +1 -0
  266. package/.next/server/chunks/5318.js +1 -0
  267. package/.next/server/chunks/5582.js +8 -0
  268. package/.next/server/chunks/5974.js +77 -0
  269. package/.next/server/chunks/6052.js +141 -0
  270. package/.next/server/chunks/611.js +1 -0
  271. package/.next/server/chunks/6253.js +104 -0
  272. package/.next/server/chunks/6337.js +1 -0
  273. package/.next/server/chunks/6366.js +80 -0
  274. package/.next/server/chunks/6429.js +14 -0
  275. package/.next/server/chunks/673.js +287 -0
  276. package/.next/server/chunks/6916.js +226 -0
  277. package/.next/server/chunks/703.js +1 -0
  278. package/.next/server/chunks/7233.js +1 -0
  279. package/.next/server/chunks/7265.js +215 -0
  280. package/.next/server/chunks/7307.js +1 -0
  281. package/.next/server/chunks/7561.js +1 -0
  282. package/.next/server/chunks/7710.js +1 -0
  283. package/.next/server/chunks/7744.js +64 -0
  284. package/.next/server/chunks/7790.js +1 -0
  285. package/.next/server/chunks/7799.js +34 -0
  286. package/.next/server/chunks/7872.js +1 -0
  287. package/.next/server/chunks/8106.js +1 -0
  288. package/.next/server/chunks/8294.js +1 -0
  289. package/.next/server/chunks/8333.js +79 -0
  290. package/.next/server/chunks/835.js +1 -0
  291. package/.next/server/chunks/8397.js +41 -0
  292. package/.next/server/chunks/8604.js +115 -0
  293. package/.next/server/chunks/8713.js +148 -0
  294. package/.next/server/chunks/8782.js +153 -0
  295. package/.next/server/chunks/8920.js +62 -0
  296. package/.next/server/chunks/922.js +5 -0
  297. package/.next/server/chunks/9280.js +255 -0
  298. package/.next/server/chunks/9486.js +1 -0
  299. package/.next/server/chunks/9509.js +1 -0
  300. package/.next/server/chunks/9510.js +90 -0
  301. package/.next/server/chunks/974.js +1 -0
  302. package/.next/server/functions-config-manifest.json +26 -0
  303. package/.next/server/instrumentation.js +1 -0
  304. package/.next/server/instrumentation.js.nft.json +1 -0
  305. package/.next/server/interception-route-rewrite-manifest.js +1 -0
  306. package/.next/server/middleware-build-manifest.js +1 -0
  307. package/.next/server/middleware-manifest.json +6 -0
  308. package/.next/server/middleware-react-loadable-manifest.js +1 -0
  309. package/.next/server/middleware.js +163 -0
  310. package/.next/server/middleware.js.nft.json +1 -0
  311. package/.next/server/next-font-manifest.js +1 -0
  312. package/.next/server/next-font-manifest.json +1 -0
  313. package/.next/server/pages/404.html +1 -0
  314. package/.next/server/pages/500.html +1 -0
  315. package/.next/server/pages-manifest.json +4 -0
  316. package/.next/server/prefetch-hints.json +53 -0
  317. package/.next/server/server-reference-manifest.js +1 -0
  318. package/.next/server/server-reference-manifest.json +1 -0
  319. package/.next/server/webpack-runtime.js +1 -0
  320. package/.next/static/chunks/103.23142a67b02246a8.js +215 -0
  321. package/.next/static/chunks/1032.12b382a9096ab2a4.js +1 -0
  322. package/.next/static/chunks/1063.775c442bdbeef08b.js +1 -0
  323. package/.next/static/chunks/1278-dc35945f883c971b.js +1 -0
  324. package/.next/static/chunks/1327.09252bb80616cc3a.js +1 -0
  325. package/.next/static/chunks/1708.d029f8776e4578de.js +1 -0
  326. package/.next/static/chunks/1781.866132cea8e77cd0.js +1 -0
  327. package/.next/static/chunks/1ba63609.b2ae90f43319a29e.js +153 -0
  328. package/.next/static/chunks/2081.47b6e9391094055f.js +1 -0
  329. package/.next/static/chunks/2181.ba21239d3ac39f81.js +1 -0
  330. package/.next/static/chunks/2258.4defa30121ef44a5.js +1 -0
  331. package/.next/static/chunks/2325.23caf22075e51aa5.js +1 -0
  332. package/.next/static/chunks/2356.523277bb8c6bf72a.js +23 -0
  333. package/.next/static/chunks/2418.b5d9e177e10a686e.js +1 -0
  334. package/.next/static/chunks/2480.cf27ca02e5b19761.js +24 -0
  335. package/.next/static/chunks/2539.c5a4f2fd8e421c70.js +41 -0
  336. package/.next/static/chunks/2619.9431a3f48da8eef4.js +1 -0
  337. package/.next/static/chunks/268.72794ee2773c2060.js +80 -0
  338. package/.next/static/chunks/2695.6f49435bae1e6f33.js +90 -0
  339. package/.next/static/chunks/2703.495a65ed14b2f094.js +36 -0
  340. package/.next/static/chunks/2821.934bcf60fbdc28c6.js +1 -0
  341. package/.next/static/chunks/3251.0dce7a0a0ff67235.js +1 -0
  342. package/.next/static/chunks/3308.be8762955e7155d1.js +73 -0
  343. package/.next/static/chunks/3336.a76f9485fe7cb762.js +1 -0
  344. package/.next/static/chunks/370.8e8f3cf8eb0e29dd.js +1 -0
  345. package/.next/static/chunks/3716.72bf4c9d7325debd.js +1 -0
  346. package/.next/static/chunks/3794-d29203733ca4633c.js +52 -0
  347. package/.next/static/chunks/398.ffa02af9062a3950.js +77 -0
  348. package/.next/static/chunks/3995.eca0f5bef1fc3ae5.js +38 -0
  349. package/.next/static/chunks/4004.74b9bcf5478b1663.js +160 -0
  350. package/.next/static/chunks/4202.8440832386f023c7.js +226 -0
  351. package/.next/static/chunks/4238.6f102dcbcf2ae339.js +141 -0
  352. package/.next/static/chunks/4405.7a19458960a1058e.js +287 -0
  353. package/.next/static/chunks/4424.fd0c93a807a333e1.js +1 -0
  354. package/.next/static/chunks/4866.d1060b4faf2ae1e2.js +1 -0
  355. package/.next/static/chunks/4970.8a63b4953b0e4946.js +1 -0
  356. package/.next/static/chunks/4bd1b696-8a4ab4fdf0ae305a.js +1 -0
  357. package/.next/static/chunks/5020.9ac8d0dc8390bb6e.js +1 -0
  358. package/.next/static/chunks/5137.f163e94c74a94d01.js +1 -0
  359. package/.next/static/chunks/5242.7b643c6b3394cac1.js +1 -0
  360. package/.next/static/chunks/5361.afc00ab2626bacbf.js +1 -0
  361. package/.next/static/chunks/5521.cfdf2cfc6db31407.js +1 -0
  362. package/.next/static/chunks/5526.ff46471041fdcb79.js +86 -0
  363. package/.next/static/chunks/5681.dd0e66b0de16e54b.js +27 -0
  364. package/.next/static/chunks/5772-ddd18c0d4b7715e5.js +3 -0
  365. package/.next/static/chunks/6121.eb9023b1cbc78ee2.js +1 -0
  366. package/.next/static/chunks/6161.4836cd7d031026bf.js +1 -0
  367. package/.next/static/chunks/6195.1153369f5f8b13a2.js +24 -0
  368. package/.next/static/chunks/6294.24f510c0c3e3714c.js +1 -0
  369. package/.next/static/chunks/6654.16f727522ec47f5a.js +1 -0
  370. package/.next/static/chunks/6794.f746d8fbbf248ecf.js +93 -0
  371. package/.next/static/chunks/7256.e07cf52d87d40252.js +1 -0
  372. package/.next/static/chunks/7268.236544be8e242c16.js +1 -0
  373. package/.next/static/chunks/7331.2add3c4e125a2dba.js +104 -0
  374. package/.next/static/chunks/7543.89f7b805ed0f2901.js +1 -0
  375. package/.next/static/chunks/8200.a36b9f8c983c6b9e.js +5 -0
  376. package/.next/static/chunks/869.7152372b662e31af.js +1 -0
  377. package/.next/static/chunks/8863.fa0320ea586efb3b.js +1 -0
  378. package/.next/static/chunks/8885.cf60cac98bf8b70c.js +79 -0
  379. package/.next/static/chunks/8901.e117d206a917bda0.js +1 -0
  380. package/.next/static/chunks/90542734.ae439f2382f58c51.js +1 -0
  381. package/.next/static/chunks/918.6a9bbe564e4a2d0f.js +115 -0
  382. package/.next/static/chunks/934.9006461bd0548660.js +1 -0
  383. package/.next/static/chunks/9445-fde6feabcb39142c.js +7 -0
  384. package/.next/static/chunks/9522.c7c6e9c330f9ba6b.js +1 -0
  385. package/.next/static/chunks/9614.3221013d7f0af27f.js +64 -0
  386. package/.next/static/chunks/9698.4d09a99b9d99f3e5.js +148 -0
  387. package/.next/static/chunks/9705.40a82b97f214e28b.js +1 -0
  388. package/.next/static/chunks/973.88e865b52eff479a.js +8 -0
  389. package/.next/static/chunks/9764.2669775c6e107a01.js +62 -0
  390. package/.next/static/chunks/9793.4567af813117ad25.js +1 -0
  391. package/.next/static/chunks/993e5495.8797001fcfcf2889.js +62 -0
  392. package/.next/static/chunks/9974.9a0f79beca65e8c4.js +34 -0
  393. package/.next/static/chunks/app/_global-error/page-b0c778bd41811424.js +1 -0
  394. package/.next/static/chunks/app/_not-found/page-1277d68244ea7b2b.js +1 -0
  395. package/.next/static/chunks/app/api/agent/[id]/bash-output/route-b0c778bd41811424.js +1 -0
  396. package/.next/static/chunks/app/api/agent/[id]/events/route-b0c778bd41811424.js +1 -0
  397. package/.next/static/chunks/app/api/agent/[id]/lease/route-b0c778bd41811424.js +1 -0
  398. package/.next/static/chunks/app/api/agent/[id]/route-b0c778bd41811424.js +1 -0
  399. package/.next/static/chunks/app/api/agent/new/route-b0c778bd41811424.js +1 -0
  400. package/.next/static/chunks/app/api/agent/running/route-b0c778bd41811424.js +1 -0
  401. package/.next/static/chunks/app/api/app-update/route-b0c778bd41811424.js +1 -0
  402. package/.next/static/chunks/app/api/auth/api-key/[provider]/route-b0c778bd41811424.js +1 -0
  403. package/.next/static/chunks/app/api/auth/login/[provider]/route-b0c778bd41811424.js +1 -0
  404. package/.next/static/chunks/app/api/auth/logout/[provider]/route-b0c778bd41811424.js +1 -0
  405. package/.next/static/chunks/app/api/auth/providers/route-b0c778bd41811424.js +1 -0
  406. package/.next/static/chunks/app/api/cwd/browse/route-b0c778bd41811424.js +1 -0
  407. package/.next/static/chunks/app/api/cwd/validate/route-b0c778bd41811424.js +1 -0
  408. package/.next/static/chunks/app/api/default-cwd/route-b0c778bd41811424.js +1 -0
  409. package/.next/static/chunks/app/api/file-index/route-b0c778bd41811424.js +1 -0
  410. package/.next/static/chunks/app/api/files/[...path]/route-b0c778bd41811424.js +1 -0
  411. package/.next/static/chunks/app/api/git/diff/route-b0c778bd41811424.js +1 -0
  412. package/.next/static/chunks/app/api/git/status/route-b0c778bd41811424.js +1 -0
  413. package/.next/static/chunks/app/api/home/route-b0c778bd41811424.js +1 -0
  414. package/.next/static/chunks/app/api/models/route-b0c778bd41811424.js +1 -0
  415. package/.next/static/chunks/app/api/models-config/catalog/route-b0c778bd41811424.js +1 -0
  416. package/.next/static/chunks/app/api/models-config/discover/route-b0c778bd41811424.js +1 -0
  417. package/.next/static/chunks/app/api/models-config/route-b0c778bd41811424.js +1 -0
  418. package/.next/static/chunks/app/api/models-config/test/route-b0c778bd41811424.js +1 -0
  419. package/.next/static/chunks/app/api/pai-build/route-b0c778bd41811424.js +1 -0
  420. package/.next/static/chunks/app/api/plugins/check/route-b0c778bd41811424.js +1 -0
  421. package/.next/static/chunks/app/api/plugins/route-b0c778bd41811424.js +1 -0
  422. package/.next/static/chunks/app/api/project-trust/route-b0c778bd41811424.js +1 -0
  423. package/.next/static/chunks/app/api/provider-usage/query/route-b0c778bd41811424.js +1 -0
  424. package/.next/static/chunks/app/api/push/config/route-b0c778bd41811424.js +1 -0
  425. package/.next/static/chunks/app/api/push/subscribe/route-b0c778bd41811424.js +1 -0
  426. package/.next/static/chunks/app/api/sessions/[id]/auto-name/route-b0c778bd41811424.js +1 -0
  427. package/.next/static/chunks/app/api/sessions/[id]/context/route-b0c778bd41811424.js +1 -0
  428. package/.next/static/chunks/app/api/sessions/[id]/entries/[entryId]/thinking/route-b0c778bd41811424.js +1 -0
  429. package/.next/static/chunks/app/api/sessions/[id]/entries/[entryId]/tool-result-image/route-b0c778bd41811424.js +1 -0
  430. package/.next/static/chunks/app/api/sessions/[id]/export/route-b0c778bd41811424.js +1 -0
  431. package/.next/static/chunks/app/api/sessions/[id]/route-b0c778bd41811424.js +1 -0
  432. package/.next/static/chunks/app/api/sessions/[id]/state/route-b0c778bd41811424.js +1 -0
  433. package/.next/static/chunks/app/api/sessions/route-b0c778bd41811424.js +1 -0
  434. package/.next/static/chunks/app/api/sessions/search/route-b0c778bd41811424.js +1 -0
  435. package/.next/static/chunks/app/api/skills/check/route-b0c778bd41811424.js +1 -0
  436. package/.next/static/chunks/app/api/skills/install/route-b0c778bd41811424.js +1 -0
  437. package/.next/static/chunks/app/api/skills/route-b0c778bd41811424.js +1 -0
  438. package/.next/static/chunks/app/api/skills/search/route-b0c778bd41811424.js +1 -0
  439. package/.next/static/chunks/app/api/skills/update/route-b0c778bd41811424.js +1 -0
  440. package/.next/static/chunks/app/api/subagents/[id]/route-b0c778bd41811424.js +1 -0
  441. package/.next/static/chunks/app/api/subagents/profiles/route-b0c778bd41811424.js +1 -0
  442. package/.next/static/chunks/app/api/subagents/settings/route-b0c778bd41811424.js +1 -0
  443. package/.next/static/chunks/app/api/terminal/[id]/events/route-b0c778bd41811424.js +1 -0
  444. package/.next/static/chunks/app/api/terminal/[id]/route-b0c778bd41811424.js +1 -0
  445. package/.next/static/chunks/app/api/terminal/route-b0c778bd41811424.js +1 -0
  446. package/.next/static/chunks/app/api/tools/settings/route-b0c778bd41811424.js +1 -0
  447. package/.next/static/chunks/app/api/web-auth/route-b0c778bd41811424.js +1 -0
  448. package/.next/static/chunks/app/api/worktrees/route-b0c778bd41811424.js +1 -0
  449. package/.next/static/chunks/app/layout-088b4f7c6817016a.js +1 -0
  450. package/.next/static/chunks/app/login/page-0a4eaa36c9880978.js +1 -0
  451. package/.next/static/chunks/app/manifest.webmanifest/route-b0c778bd41811424.js +1 -0
  452. package/.next/static/chunks/app/page-9330b0673fd0ee3b.js +283 -0
  453. package/.next/static/chunks/bf2ff291.3a109dffc1fe84af.js +122 -0
  454. package/.next/static/chunks/d3ac728e-7964f816a1ca64e5.js +1 -0
  455. package/.next/static/chunks/da12927c.476aa688a637649c.js +82 -0
  456. package/.next/static/chunks/db9d41be.e72ce090a86a3691.js +1 -0
  457. package/.next/static/chunks/e868780c-1584512c612787d7.js +18 -0
  458. package/.next/static/chunks/framework-b33a8f5d57cd8d87.js +1 -0
  459. package/.next/static/chunks/main-app-2e1ad4a7e5124b81.js +1 -0
  460. package/.next/static/chunks/main-dac5ab3797407fcb.js +5 -0
  461. package/.next/static/chunks/next/dist/client/components/builtin/app-error-b0c778bd41811424.js +1 -0
  462. package/.next/static/chunks/next/dist/client/components/builtin/forbidden-b0c778bd41811424.js +1 -0
  463. package/.next/static/chunks/next/dist/client/components/builtin/global-error-7e2ea4794d31f251.js +1 -0
  464. package/.next/static/chunks/next/dist/client/components/builtin/not-found-b0c778bd41811424.js +1 -0
  465. package/.next/static/chunks/next/dist/client/components/builtin/unauthorized-b0c778bd41811424.js +1 -0
  466. package/.next/static/chunks/polyfills-42372ed130431b0a.js +1 -0
  467. package/.next/static/chunks/webpack-d232d9c46db4ab26.js +1 -0
  468. package/.next/static/css/4cbedad236d913cb.css +1 -0
  469. package/.next/static/css/766b205e84dc3b3a.css +1 -0
  470. package/.next/static/css/88714c00e109ce28.css +1 -0
  471. package/.next/static/css/f0281200807c64f6.css +1 -0
  472. package/.next/static/lvHOldpC6q8_bCIwJCjJV/_buildManifest.js +1 -0
  473. package/.next/static/lvHOldpC6q8_bCIwJCjJV/_ssgManifest.js +1 -0
  474. package/.next/static/media/15605e25b523335c-s.woff2 +0 -0
  475. package/.next/static/media/1a3dce5cfb5f7760-s.woff2 +0 -0
  476. package/.next/static/media/1cdd02902f937a18-s.woff2 +0 -0
  477. package/.next/static/media/4c4b3b30b6bcb2be-s.woff2 +0 -0
  478. package/.next/static/media/641a7b8a5800ee0e-s.woff2 +0 -0
  479. package/.next/static/media/7deddc85b7ffd1dc-s.p.woff2 +0 -0
  480. package/.next/static/media/KaTeX_AMS-Regular.1608a09b.woff +0 -0
  481. package/.next/static/media/KaTeX_AMS-Regular.4aafdb68.ttf +0 -0
  482. package/.next/static/media/KaTeX_AMS-Regular.a79f1c31.woff2 +0 -0
  483. package/.next/static/media/KaTeX_Caligraphic-Bold.b6770918.woff +0 -0
  484. package/.next/static/media/KaTeX_Caligraphic-Bold.cce5b8ec.ttf +0 -0
  485. package/.next/static/media/KaTeX_Caligraphic-Bold.ec17d132.woff2 +0 -0
  486. package/.next/static/media/KaTeX_Caligraphic-Regular.07ef19e7.ttf +0 -0
  487. package/.next/static/media/KaTeX_Caligraphic-Regular.55fac258.woff2 +0 -0
  488. package/.next/static/media/KaTeX_Caligraphic-Regular.dad44a7f.woff +0 -0
  489. package/.next/static/media/KaTeX_Fraktur-Bold.9f256b85.woff +0 -0
  490. package/.next/static/media/KaTeX_Fraktur-Bold.b18f59e1.ttf +0 -0
  491. package/.next/static/media/KaTeX_Fraktur-Bold.d42a5579.woff2 +0 -0
  492. package/.next/static/media/KaTeX_Fraktur-Regular.7c187121.woff +0 -0
  493. package/.next/static/media/KaTeX_Fraktur-Regular.d3c882a6.woff2 +0 -0
  494. package/.next/static/media/KaTeX_Fraktur-Regular.ed38e79f.ttf +0 -0
  495. package/.next/static/media/KaTeX_Main-Bold.b74a1a8b.ttf +0 -0
  496. package/.next/static/media/KaTeX_Main-Bold.c3fb5ac2.woff2 +0 -0
  497. package/.next/static/media/KaTeX_Main-Bold.d181c465.woff +0 -0
  498. package/.next/static/media/KaTeX_Main-BoldItalic.6f2bb1df.woff2 +0 -0
  499. package/.next/static/media/KaTeX_Main-BoldItalic.70d8b0a5.ttf +0 -0
  500. package/.next/static/media/KaTeX_Main-BoldItalic.e3f82f9d.woff +0 -0
  501. package/.next/static/media/KaTeX_Main-Italic.47373d1e.ttf +0 -0
  502. package/.next/static/media/KaTeX_Main-Italic.8916142b.woff2 +0 -0
  503. package/.next/static/media/KaTeX_Main-Italic.9024d815.woff +0 -0
  504. package/.next/static/media/KaTeX_Main-Regular.0462f03b.woff2 +0 -0
  505. package/.next/static/media/KaTeX_Main-Regular.7f51fe03.woff +0 -0
  506. package/.next/static/media/KaTeX_Main-Regular.b7f8fe9b.ttf +0 -0
  507. package/.next/static/media/KaTeX_Math-BoldItalic.572d331f.woff2 +0 -0
  508. package/.next/static/media/KaTeX_Math-BoldItalic.a879cf83.ttf +0 -0
  509. package/.next/static/media/KaTeX_Math-BoldItalic.f1035d8d.woff +0 -0
  510. package/.next/static/media/KaTeX_Math-Italic.5295ba48.woff +0 -0
  511. package/.next/static/media/KaTeX_Math-Italic.939bc644.ttf +0 -0
  512. package/.next/static/media/KaTeX_Math-Italic.f28c23ac.woff2 +0 -0
  513. package/.next/static/media/KaTeX_SansSerif-Bold.8c5b5494.woff2 +0 -0
  514. package/.next/static/media/KaTeX_SansSerif-Bold.94e1e8dc.ttf +0 -0
  515. package/.next/static/media/KaTeX_SansSerif-Bold.bf59d231.woff +0 -0
  516. package/.next/static/media/KaTeX_SansSerif-Italic.3b1e59b3.woff2 +0 -0
  517. package/.next/static/media/KaTeX_SansSerif-Italic.7c9bc82b.woff +0 -0
  518. package/.next/static/media/KaTeX_SansSerif-Italic.b4c20c84.ttf +0 -0
  519. package/.next/static/media/KaTeX_SansSerif-Regular.74048478.woff +0 -0
  520. package/.next/static/media/KaTeX_SansSerif-Regular.ba21ed5f.woff2 +0 -0
  521. package/.next/static/media/KaTeX_SansSerif-Regular.d4d7ba48.ttf +0 -0
  522. package/.next/static/media/KaTeX_Script-Regular.03e9641d.woff2 +0 -0
  523. package/.next/static/media/KaTeX_Script-Regular.07505710.woff +0 -0
  524. package/.next/static/media/KaTeX_Script-Regular.fe9cbbe1.ttf +0 -0
  525. package/.next/static/media/KaTeX_Size1-Regular.e1e279cb.woff +0 -0
  526. package/.next/static/media/KaTeX_Size1-Regular.eae34984.woff2 +0 -0
  527. package/.next/static/media/KaTeX_Size1-Regular.fabc004a.ttf +0 -0
  528. package/.next/static/media/KaTeX_Size2-Regular.57727022.woff +0 -0
  529. package/.next/static/media/KaTeX_Size2-Regular.5916a24f.woff2 +0 -0
  530. package/.next/static/media/KaTeX_Size2-Regular.d6b476ec.ttf +0 -0
  531. package/.next/static/media/KaTeX_Size3-Regular.9acaf01c.woff +0 -0
  532. package/.next/static/media/KaTeX_Size3-Regular.a144ef58.ttf +0 -0
  533. package/.next/static/media/KaTeX_Size3-Regular.b4230e7e.woff2 +0 -0
  534. package/.next/static/media/KaTeX_Size4-Regular.10d95fd3.woff2 +0 -0
  535. package/.next/static/media/KaTeX_Size4-Regular.7a996c9d.woff +0 -0
  536. package/.next/static/media/KaTeX_Size4-Regular.fbccdabe.ttf +0 -0
  537. package/.next/static/media/KaTeX_Typewriter-Regular.6258592b.woff +0 -0
  538. package/.next/static/media/KaTeX_Typewriter-Regular.a8709e36.woff2 +0 -0
  539. package/.next/static/media/KaTeX_Typewriter-Regular.d97aaf4a.ttf +0 -0
  540. package/.next/static/media/ec14413c594b3356-s.p.woff2 +0 -0
  541. package/.next/trace +41 -0
  542. package/.next/trace-build +1 -0
  543. package/.next/types/app/api/agent/[id]/bash-output/route.ts +353 -0
  544. package/.next/types/app/api/agent/[id]/events/route.ts +353 -0
  545. package/.next/types/app/api/agent/[id]/lease/route.ts +353 -0
  546. package/.next/types/app/api/agent/[id]/route.ts +353 -0
  547. package/.next/types/app/api/agent/new/route.ts +353 -0
  548. package/.next/types/app/api/agent/running/route.ts +353 -0
  549. package/.next/types/app/api/app-update/route.ts +353 -0
  550. package/.next/types/app/api/auth/api-key/[provider]/route.ts +353 -0
  551. package/.next/types/app/api/auth/login/[provider]/route.ts +353 -0
  552. package/.next/types/app/api/auth/logout/[provider]/route.ts +353 -0
  553. package/.next/types/app/api/auth/providers/route.ts +353 -0
  554. package/.next/types/app/api/cwd/browse/route.ts +353 -0
  555. package/.next/types/app/api/cwd/validate/route.ts +353 -0
  556. package/.next/types/app/api/default-cwd/route.ts +353 -0
  557. package/.next/types/app/api/file-index/route.ts +353 -0
  558. package/.next/types/app/api/files/[...path]/route.ts +353 -0
  559. package/.next/types/app/api/git/diff/route.ts +353 -0
  560. package/.next/types/app/api/git/status/route.ts +353 -0
  561. package/.next/types/app/api/home/route.ts +353 -0
  562. package/.next/types/app/api/models/route.ts +353 -0
  563. package/.next/types/app/api/models-config/catalog/route.ts +353 -0
  564. package/.next/types/app/api/models-config/discover/route.ts +353 -0
  565. package/.next/types/app/api/models-config/route.ts +353 -0
  566. package/.next/types/app/api/models-config/test/route.ts +353 -0
  567. package/.next/types/app/api/pai-build/route.ts +353 -0
  568. package/.next/types/app/api/plugins/check/route.ts +353 -0
  569. package/.next/types/app/api/plugins/route.ts +353 -0
  570. package/.next/types/app/api/project-trust/route.ts +353 -0
  571. package/.next/types/app/api/provider-usage/query/route.ts +353 -0
  572. package/.next/types/app/api/push/config/route.ts +353 -0
  573. package/.next/types/app/api/push/subscribe/route.ts +353 -0
  574. package/.next/types/app/api/sessions/[id]/auto-name/route.ts +353 -0
  575. package/.next/types/app/api/sessions/[id]/context/route.ts +353 -0
  576. package/.next/types/app/api/sessions/[id]/entries/[entryId]/thinking/route.ts +353 -0
  577. package/.next/types/app/api/sessions/[id]/entries/[entryId]/tool-result-image/route.ts +353 -0
  578. package/.next/types/app/api/sessions/[id]/export/route.ts +353 -0
  579. package/.next/types/app/api/sessions/[id]/route.ts +353 -0
  580. package/.next/types/app/api/sessions/[id]/state/route.ts +353 -0
  581. package/.next/types/app/api/sessions/route.ts +353 -0
  582. package/.next/types/app/api/sessions/search/route.ts +353 -0
  583. package/.next/types/app/api/skills/check/route.ts +353 -0
  584. package/.next/types/app/api/skills/install/route.ts +353 -0
  585. package/.next/types/app/api/skills/route.ts +353 -0
  586. package/.next/types/app/api/skills/search/route.ts +353 -0
  587. package/.next/types/app/api/skills/update/route.ts +353 -0
  588. package/.next/types/app/api/subagents/[id]/route.ts +353 -0
  589. package/.next/types/app/api/subagents/profiles/route.ts +353 -0
  590. package/.next/types/app/api/subagents/settings/route.ts +353 -0
  591. package/.next/types/app/api/terminal/[id]/events/route.ts +353 -0
  592. package/.next/types/app/api/terminal/[id]/route.ts +353 -0
  593. package/.next/types/app/api/terminal/route.ts +353 -0
  594. package/.next/types/app/api/tools/settings/route.ts +353 -0
  595. package/.next/types/app/api/web-auth/route.ts +353 -0
  596. package/.next/types/app/api/worktrees/route.ts +353 -0
  597. package/.next/types/app/layout.ts +89 -0
  598. package/.next/types/app/login/page.ts +89 -0
  599. package/.next/types/app/page.ts +89 -0
  600. package/.next/types/cache-life.d.ts +146 -0
  601. package/.next/types/package.json +1 -0
  602. package/.next/types/root-params.d.ts +3 -0
  603. package/.next/types/routes.d.ts +127 -0
  604. package/.next/types/validator.ts +565 -0
  605. package/LICENSE +27 -0
  606. package/README.md +119 -0
  607. package/bin/node-version.js +35 -0
  608. package/bin/pi-web-options.js +89 -0
  609. package/bin/pi-web.js +132 -0
  610. package/bin/prepare-terminal.js +14 -0
  611. package/bin/process-lifecycle.js +81 -0
  612. package/next.config.ts +86 -0
  613. package/package.json +89 -0
  614. package/public/apple-touch-icon.png +0 -0
  615. package/public/icons/apple-touch-icon.png +0 -0
  616. package/public/icons/catppuccin/LICENSE +22 -0
  617. package/public/icons/catppuccin/README.md +10 -0
  618. package/public/icons/catppuccin/latte/_file.svg +3 -0
  619. package/public/icons/catppuccin/latte/_folder.svg +3 -0
  620. package/public/icons/catppuccin/latte/_folder_open.svg +3 -0
  621. package/public/icons/catppuccin/latte/bash.svg +7 -0
  622. package/public/icons/catppuccin/latte/bun-lock.svg +8 -0
  623. package/public/icons/catppuccin/latte/config.svg +3 -0
  624. package/public/icons/catppuccin/latte/css.svg +6 -0
  625. package/public/icons/catppuccin/latte/database.svg +3 -0
  626. package/public/icons/catppuccin/latte/docker.svg +3 -0
  627. package/public/icons/catppuccin/latte/env.svg +3 -0
  628. package/public/icons/catppuccin/latte/eslint.svg +6 -0
  629. package/public/icons/catppuccin/latte/git.svg +6 -0
  630. package/public/icons/catppuccin/latte/go.svg +3 -0
  631. package/public/icons/catppuccin/latte/graphql.svg +3 -0
  632. package/public/icons/catppuccin/latte/html.svg +6 -0
  633. package/public/icons/catppuccin/latte/javascript-react.svg +8 -0
  634. package/public/icons/catppuccin/latte/javascript.svg +6 -0
  635. package/public/icons/catppuccin/latte/json.svg +3 -0
  636. package/public/icons/catppuccin/latte/lock.svg +3 -0
  637. package/public/icons/catppuccin/latte/markdown.svg +3 -0
  638. package/public/icons/catppuccin/latte/ms-word.svg +6 -0
  639. package/public/icons/catppuccin/latte/next.svg +6 -0
  640. package/public/icons/catppuccin/latte/npm-lock.svg +7 -0
  641. package/public/icons/catppuccin/latte/pdf.svg +3 -0
  642. package/public/icons/catppuccin/latte/python.svg +8 -0
  643. package/public/icons/catppuccin/latte/rust.svg +6 -0
  644. package/public/icons/catppuccin/latte/sass.svg +3 -0
  645. package/public/icons/catppuccin/latte/terraform.svg +3 -0
  646. package/public/icons/catppuccin/latte/toml.svg +3 -0
  647. package/public/icons/catppuccin/latte/typescript-react.svg +8 -0
  648. package/public/icons/catppuccin/latte/typescript.svg +6 -0
  649. package/public/icons/catppuccin/latte/yaml.svg +3 -0
  650. package/public/icons/catppuccin/mocha/_file.svg +3 -0
  651. package/public/icons/catppuccin/mocha/_folder.svg +3 -0
  652. package/public/icons/catppuccin/mocha/_folder_open.svg +3 -0
  653. package/public/icons/catppuccin/mocha/bash.svg +7 -0
  654. package/public/icons/catppuccin/mocha/bun-lock.svg +8 -0
  655. package/public/icons/catppuccin/mocha/config.svg +3 -0
  656. package/public/icons/catppuccin/mocha/css.svg +6 -0
  657. package/public/icons/catppuccin/mocha/database.svg +3 -0
  658. package/public/icons/catppuccin/mocha/docker.svg +3 -0
  659. package/public/icons/catppuccin/mocha/env.svg +3 -0
  660. package/public/icons/catppuccin/mocha/eslint.svg +6 -0
  661. package/public/icons/catppuccin/mocha/git.svg +6 -0
  662. package/public/icons/catppuccin/mocha/go.svg +3 -0
  663. package/public/icons/catppuccin/mocha/graphql.svg +3 -0
  664. package/public/icons/catppuccin/mocha/html.svg +6 -0
  665. package/public/icons/catppuccin/mocha/javascript-react.svg +8 -0
  666. package/public/icons/catppuccin/mocha/javascript.svg +6 -0
  667. package/public/icons/catppuccin/mocha/json.svg +3 -0
  668. package/public/icons/catppuccin/mocha/lock.svg +3 -0
  669. package/public/icons/catppuccin/mocha/markdown.svg +3 -0
  670. package/public/icons/catppuccin/mocha/ms-word.svg +6 -0
  671. package/public/icons/catppuccin/mocha/next.svg +6 -0
  672. package/public/icons/catppuccin/mocha/npm-lock.svg +7 -0
  673. package/public/icons/catppuccin/mocha/pdf.svg +3 -0
  674. package/public/icons/catppuccin/mocha/python.svg +8 -0
  675. package/public/icons/catppuccin/mocha/rust.svg +6 -0
  676. package/public/icons/catppuccin/mocha/sass.svg +3 -0
  677. package/public/icons/catppuccin/mocha/terraform.svg +3 -0
  678. package/public/icons/catppuccin/mocha/toml.svg +3 -0
  679. package/public/icons/catppuccin/mocha/typescript-react.svg +8 -0
  680. package/public/icons/catppuccin/mocha/typescript.svg +6 -0
  681. package/public/icons/catppuccin/mocha/yaml.svg +3 -0
  682. package/public/icons/icon-192.png +0 -0
  683. package/public/icons/icon-512.png +0 -0
  684. package/public/offline.html +83 -0
  685. package/public/provider-icons.svg +54 -0
  686. package/public/sw.js +143 -0
  687. package/public/sw.test.mjs +141 -0
package/README.md ADDED
@@ -0,0 +1,119 @@
1
+ # PAI
2
+
3
+ A phone-first build of [pi-web](https://github.com/agegr/pi-web).
4
+
5
+ pi-web runs the [pi](https://github.com/earendil-works/pi) coding agent in a browser —
6
+ sessions, files, git, skills, model configuration — and all of that is upstream's. What it
7
+ did not have is a layout composed for a phone, and it carries a handful of defects that a
8
+ phone runs into first. That is what this build changes, and nothing else.
9
+
10
+ ```sh
11
+ npx @perturbationai/pai
12
+ ```
13
+
14
+ It serves on `127.0.0.1:30141`. Add it to your home screen and it runs standalone, with
15
+ lock-screen notifications when a session finishes.
16
+
17
+ ```sh
18
+ npx @perturbationai/pai --help # ports, hostname, the PI_WEB_* environment
19
+ ```
20
+
21
+ The environment variables are upstream's and unchanged — `PI_WEB_PASSWORD`,
22
+ `PI_WEB_ALLOWED_HOSTS`, `PI_WEB_HOSTNAME` — so anything already configured against pi-web
23
+ keeps working.
24
+
25
+ ## What is different from pi-web
26
+
27
+ Every change is listed below. The complete diff is one link: **[v0.9.1 → this
28
+ build](../../compare/upstream...main)** — the first commit in this repository is upstream
29
+ v0.9.1 imported verbatim, so the comparison against it is exactly what PAI changes.
30
+
31
+ ### Fixed
32
+
33
+ Upstream defects rather than preferences. Each was reproduced before it was patched, and
34
+ each is better sent upstream than carried here.
35
+
36
+ - **A new session did not survive being left.** The workspace's last-open memory was not
37
+ cleared, so the next load restored the session that was open before it. Loading a bare
38
+ `/` ended at `?session=<the previous one>`. It matters most on a phone, where a
39
+ home-screen app is relaunched constantly.
40
+ - **The first tap on a session row only produced a hover state,** revealing rename and
41
+ delete under the finger, so opening the session took a second tap.
42
+ - **Hover painted into the inline style stuck after a touch.** iOS fires `mouseenter` and
43
+ often never `mouseleave`, so the tint stayed under the finger — including a blue flash
44
+ on whichever control the session dialog opened beneath.
45
+ - **An expanded thinking block lost its collapse target,** leaving a 14×17 icon as the
46
+ only way back. It is 26×26 now, and 38×38 where the pointer is coarse.
47
+ - **The model button omitted its provider,** although the dropdown already groups by
48
+ provider and the same model id can exist under two of them.
49
+ - **A model that is no longer configured went on being named,** which reads as a working
50
+ selection. It now says "Select model".
51
+ - **The keyboard's height was read once,** and WebKit reports a half-settled value on the
52
+ resize event itself. Read again as it settles, and polled.
53
+ - **The home indicator's inset stayed reserved while the keyboard covered it.**
54
+ - **A device kept the first build it ever cached.** The service worker named its cache
55
+ after the package version, which a patched build never moves. Each build gets its own.
56
+ - **`/apple-touch-icon.png` was a 404** — the path Safari falls back to when adding to the
57
+ home screen, which is where a miss gets the generated letter tile instead of the mark.
58
+ - **A tap in the terminal does not raise the keyboard on iOS.** iOS raises it when a focus
59
+ lands inside a user gesture, and xterm focuses its hidden textarea as soon as the
60
+ connection opens, long before a thumb arrives. Reproduced against stock v0.9.1.
61
+ - **A terminal in an installed iOS web app never connects.** `connect()` returned on
62
+ `navigator.onLine` in silence — no error, no retry. A home-screen web app reports itself
63
+ offline while every other request on the page goes through.
64
+
65
+ ### Changed
66
+
67
+ Most are confined to a phone by a width or a pointer query. Three are not, and are how
68
+ this build looks on a desktop as well: Send's ground, the process group's frame, and the
69
+ model list's group headers.
70
+
71
+ - **The composer is one card,** with its controls on a row above the text line and Stop
72
+ coming out onto that row while a turn runs rather than staying inside a menu.
73
+ - **Send is the app's own mark on a phone,** and keeps that dark ground without the mark
74
+ everywhere else, where upstream paints the stock accent.
75
+ - **Every control on that row is 44pt to a thumb** without being drawn at 44 — a
76
+ transparent extender behind each one is what the browser hit-tests.
77
+ - **The top bar floats over the transcript,** at 44pt, with the session name centred and
78
+ the context window drawn as a ring beside it. The session panel is a full dialog.
79
+ - **The drawer takes 70% of the screen** and gives the session list the room: the file
80
+ explorer starts collapsed on a phone unless asked for.
81
+ - **An empty new session stays centred, and drops onto the keyboard when one opens.**
82
+ - **The model list is reachable by thumb,** hung off the button that opened it, its
83
+ provider headings without upstream's upper case.
84
+ - **A turn's process details are one enclosed group,** the model named once at its header.
85
+ - **The turn line says "cache read" rather than "cache R",** and how long the turn took.
86
+ - **It is called PAI,** with its own mark and wordmark.
87
+
88
+ ### Added
89
+
90
+ - **Swipe a session row left for rename and delete.**
91
+ - **Swipe in from the left edge to open the drawer** — installed app only, where that edge
92
+ is not already the browser's back gesture.
93
+ - **Pull the transcript down to put the keyboard away.**
94
+ - **A notice when the server has been rebuilt under an open page,** with a reload. An
95
+ installed web app resumes from memory rather than reloading.
96
+ - **A way back to the latest message.**
97
+ - **A way out of the exported history.**
98
+
99
+ ## Building from source
100
+
101
+ ```sh
102
+ npm install
103
+ npm test # upstream's suite, 1020 tests
104
+ npm run build
105
+ npm start
106
+ ```
107
+
108
+ ## License and attribution
109
+
110
+ MIT, and a derivative work of **[pi-web](https://github.com/agegr/pi-web)** by **agegr**,
111
+ whose copyright notice is reproduced in `LICENSE` as that license requires. The changes
112
+ carried here are © 2026 Perturbation AI, under the same terms.
113
+
114
+ The agent underneath is **[pi](https://github.com/earendil-works/pi)**
115
+ (`@earendil-works/pi-coding-agent`) by **Mario Zechner**, also MIT. It is a dependency
116
+ rather than something this build changes, and it is named here because it is what does the
117
+ work.
118
+
119
+ Neither project endorses this one. PAI is not official, and carries none of their marks.
@@ -0,0 +1,35 @@
1
+ "use strict";
2
+
3
+ const MIN_NODE_VERSION = "22.19.0";
4
+
5
+ function parseNodeVersion(version) {
6
+ const match = /^v?(\d+)\.(\d+)\.(\d+)/.exec(version);
7
+ if (!match) return null;
8
+ return match.slice(1).map(Number);
9
+ }
10
+
11
+ function isNodeVersionSupported(version) {
12
+ const current = parseNodeVersion(version);
13
+ const minimum = parseNodeVersion(MIN_NODE_VERSION);
14
+ if (!current || !minimum) return false;
15
+
16
+ for (let index = 0; index < minimum.length; index += 1) {
17
+ if (current[index] > minimum[index]) return true;
18
+ if (current[index] < minimum[index]) return false;
19
+ }
20
+ return true;
21
+ }
22
+
23
+ function getUnsupportedNodeVersionMessage(version) {
24
+ return [
25
+ `PAI requires Node.js ${MIN_NODE_VERSION} or newer.`,
26
+ `Current Node.js version: ${version}.`,
27
+ "Upgrade Node.js and try again: https://nodejs.org/",
28
+ ].join("\n");
29
+ }
30
+
31
+ module.exports = {
32
+ MIN_NODE_VERSION,
33
+ getUnsupportedNodeVersionMessage,
34
+ isNodeVersionSupported,
35
+ };
@@ -0,0 +1,89 @@
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
+ const CLI_OPTIONS = {
9
+ port: { type: "string", short: "p" },
10
+ hostname: { type: "string", short: "H" },
11
+ "no-open": { type: "boolean" },
12
+ help: { type: "boolean", short: "h" },
13
+ };
14
+
15
+ function isEnabled(value) {
16
+ return typeof value === "string" && TRUE_VALUES.has(value.trim().toLowerCase());
17
+ }
18
+
19
+ function normalizePort(value) {
20
+ if (typeof value !== "string" || !/^\d+$/.test(value)) {
21
+ throw new Error("Port must be a non-negative integer.");
22
+ }
23
+
24
+ const port = Number(value);
25
+ if (!Number.isSafeInteger(port) || port > 65535) {
26
+ throw new Error("Port must be between 0 and 65535.");
27
+ }
28
+
29
+ return String(port);
30
+ }
31
+
32
+ function getHelpText() {
33
+ return `Usage: pai [options]
34
+
35
+ Start the PAI server.
36
+
37
+ Options:
38
+ -p, --port <port> Server port (default: 30141, or PORT)
39
+ -H, --hostname <host> Bind hostname (default: 127.0.0.1, or PI_WEB_HOSTNAME)
40
+ --no-open Do not open a browser automatically
41
+ -h, --help Show this help message and exit
42
+
43
+ Environment:
44
+ PORT Default port when --port is omitted
45
+ PI_WEB_HOSTNAME Default hostname when --hostname is omitted
46
+ PI_WEB_NO_OPEN Set to 1/true/yes/on to disable browser open
47
+ PI_WEB_PASSWORD Enable browser password login and API Basic Auth
48
+ PI_WEB_ALLOWED_HOSTS Extra exact proxy/custom hostnames, comma-separated
49
+ PI_WEB_SKIP_VERSION_CHECK Set to 1 to disable update checks
50
+ PI_WEB_IDLE_TIMEOUT_MS Session idle timeout in ms (0 disables; default 600000)
51
+ `;
52
+ }
53
+
54
+ function parseLaunchOptions(args = process.argv.slice(2), env = process.env) {
55
+ let values;
56
+ let positionals;
57
+ try {
58
+ ({ values, positionals } = parseArgs({
59
+ args,
60
+ options: CLI_OPTIONS,
61
+ strict: true,
62
+ allowPositionals: true,
63
+ }));
64
+ } catch (error) {
65
+ const message = error instanceof Error ? error.message : String(error);
66
+ const err = new Error(`${message}\nUse --help to see available options.`);
67
+ err.code = "ERR_PARSE_ARGS_UNKNOWN_OPTION";
68
+ throw err;
69
+ }
70
+
71
+ if (values.help) {
72
+ return { help: true };
73
+ }
74
+
75
+ if (positionals.length > 0) {
76
+ throw new Error(
77
+ `Unexpected argument(s): ${positionals.join(" ")}\nUse --help to see available options.`,
78
+ );
79
+ }
80
+
81
+ return {
82
+ help: false,
83
+ port: normalizePort(values.port ?? env.PORT ?? "30141"),
84
+ hostname: values.hostname ?? env.PI_WEB_HOSTNAME ?? "127.0.0.1",
85
+ openBrowser: !values["no-open"] && !isEnabled(env.PI_WEB_NO_OPEN),
86
+ };
87
+ }
88
+
89
+ module.exports = { parseLaunchOptions, getHelpText };
package/bin/pi-web.js ADDED
@@ -0,0 +1,132 @@
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 { getHelpText, parseLaunchOptions } = require("./pi-web-options");
20
+ // eslint-disable-next-line @typescript-eslint/no-require-imports
21
+ const { wireChildProcessLifecycle } = require("./process-lifecycle");
22
+
23
+ let launchOptions;
24
+ try {
25
+ launchOptions = parseLaunchOptions();
26
+ } catch (error) {
27
+ fs.writeSync(
28
+ process.stderr.fd,
29
+ `${error instanceof Error ? error.message : String(error)}\n`,
30
+ );
31
+ process.exit(1);
32
+ }
33
+
34
+ if (launchOptions.help) {
35
+ fs.writeSync(process.stdout.fd, getHelpText());
36
+ process.exit(0);
37
+ }
38
+
39
+ const { port, hostname, openBrowser } = launchOptions;
40
+
41
+ const pkgDir = path.join(__dirname, "..");
42
+ const nextDir = path.join(pkgDir, ".next");
43
+
44
+ // Resolve next's CLI entry directly to avoid relying on .bin symlinks (which
45
+ // may not exist when installed via npx).
46
+ let nextBin;
47
+ try {
48
+ nextBin = require.resolve("next/dist/bin/next", { paths: [pkgDir] });
49
+ } catch {
50
+ // Fallback: locate next package root and derive the bin path manually.
51
+ try {
52
+ const nextPkg = require.resolve("next/package.json", { paths: [pkgDir] });
53
+ nextBin = path.join(path.dirname(nextPkg), "dist", "bin", "next");
54
+ } catch {
55
+ nextBin = path.join(pkgDir, "node_modules", "next", "dist", "bin", "next");
56
+ }
57
+ }
58
+
59
+ const loopbackHostnames = new Set(["127.0.0.1", "localhost", "::1", "[::1]"]);
60
+ const passwordEnabled = Boolean(process.env.PI_WEB_PASSWORD);
61
+
62
+ if (!fs.existsSync(nextDir)) {
63
+ console.error("Build artifacts not found. Please report this issue.");
64
+ process.exit(1);
65
+ }
66
+
67
+ if (!loopbackHostnames.has(hostname)) {
68
+ if (passwordEnabled) {
69
+ console.warn(
70
+ `Warning: PAI is listening on ${hostname} with password authentication over HTTP. Use HTTPS or a trusted VPN to protect the password in transit.`,
71
+ );
72
+ } else {
73
+ console.warn(
74
+ `Warning: PAI is listening on ${hostname} without authentication. Only use this on a trusted network.`,
75
+ );
76
+ }
77
+ }
78
+
79
+ const nextArgs = ["start", "-p", port];
80
+ nextArgs.push("-H", hostname);
81
+
82
+ // Always run next's JS entry with node directly — avoids .bin symlink issues
83
+ // and path-with-spaces problems on Windows when shell: true is used.
84
+ const child = spawn(process.execPath, [nextBin, ...nextArgs], {
85
+ cwd: pkgDir,
86
+ stdio: ["inherit", "pipe", "inherit"],
87
+ env: { ...process.env, PI_WEB_HOSTNAME: hostname },
88
+ });
89
+ wireChildProcessLifecycle(child);
90
+
91
+ let browserOpened = false;
92
+ const url = `http://${hostname}:${port}`;
93
+
94
+ child.stdout.on("data", (chunk) => {
95
+ const text = chunk.toString();
96
+ process.stdout.write(text);
97
+ if (openBrowser && !browserOpened && text.includes("Ready")) {
98
+ browserOpened = true;
99
+ const isWindows = process.platform === "win32";
100
+ const isMac = process.platform === "darwin";
101
+ // Avoid `shell: true` to suppress Node.js DEP0190 deprecation
102
+ // ("Passing args to a child process with shell option true can lead to
103
+ // security vulnerabilities, as the arguments are not escaped").
104
+ // Pass a structured argv so Node.js handles escaping instead of
105
+ // concatenating the args into a shell command string.
106
+ let opener;
107
+ if (isWindows) {
108
+ // `start` is a cmd.exe built-in, so invoke cmd directly. The empty
109
+ // title argument is required by `start` before the target URL.
110
+ opener = spawn(process.env.ComSpec || "cmd.exe", ["/c", "start", "", url], {
111
+ stdio: "ignore",
112
+ detached: true,
113
+ });
114
+ } else if (isMac) {
115
+ opener = spawn("open", [url], {
116
+ stdio: "ignore",
117
+ detached: true,
118
+ });
119
+ } else {
120
+ opener = spawn("xdg-open", [url], {
121
+ stdio: "ignore",
122
+ detached: true,
123
+ });
124
+ }
125
+
126
+ opener.on("error", (error) => {
127
+ console.warn(`Could not open browser automatically: ${error.message}`);
128
+ });
129
+
130
+ opener.unref();
131
+ }
132
+ });
@@ -0,0 +1,14 @@
1
+ // node-pty 1.1.0 ships macOS spawn-helper binaries without executable bits.
2
+ // Remove this workaround once the upstream package preserves those modes.
3
+ /* eslint-disable @typescript-eslint/no-require-imports */
4
+ const { chmodSync, statSync } = require("node:fs");
5
+ const { dirname, join } = require("node:path");
6
+
7
+ if (process.platform === "darwin") {
8
+ const root = dirname(require.resolve("node-pty/package.json"));
9
+ for (const directory of ["build/Release", "build/Debug", `prebuilds/darwin-${process.arch}`]) {
10
+ const helper = join(root, directory, "spawn-helper");
11
+ const stat = statSync(helper, { throwIfNoEntry: false });
12
+ if (stat?.isFile() && (stat.mode & 0o111) !== 0o111) chmodSync(helper, stat.mode | 0o111);
13
+ }
14
+ }
@@ -0,0 +1,81 @@
1
+ "use strict";
2
+
3
+ // eslint-disable-next-line @typescript-eslint/no-require-imports
4
+ const os = require("node:os");
5
+
6
+ const forwardedSignals = ["SIGINT", "SIGTERM"];
7
+ const shutdownTimeoutMs = 5_000;
8
+
9
+ function getSignalExitCode(signal) {
10
+ const signalNumber = signal ? os.constants.signals[signal] : undefined;
11
+ return typeof signalNumber === "number" ? 128 + signalNumber : 1;
12
+ }
13
+
14
+ function wireChildProcessLifecycle(
15
+ child,
16
+ parentProcess = process,
17
+ timeoutMs = shutdownTimeoutMs,
18
+ log = console.error,
19
+ ) {
20
+ const signalHandlers = new Map();
21
+ let shutdownTimer;
22
+ // Set once we forward a signal, so an exit we asked for stays quiet and one
23
+ // we did not gets reported.
24
+ let shuttingDown = false;
25
+
26
+ const forceKill = () => child.kill("SIGKILL");
27
+
28
+ function unwire() {
29
+ if (shutdownTimer) clearTimeout(shutdownTimer);
30
+ for (const [forwardedSignal, handler] of signalHandlers) {
31
+ parentProcess.removeListener(forwardedSignal, handler);
32
+ }
33
+ child.removeListener("error", handleError);
34
+ }
35
+
36
+ function handleError(error) {
37
+ const failedToSpawn = child.pid === undefined;
38
+ log(
39
+ `[pai] ${failedToSpawn ? "could not run the Next.js process" : "Next.js process error"}: ${error.message}`,
40
+ );
41
+
42
+ if (failedToSpawn) {
43
+ unwire();
44
+ parentProcess.exit(1);
45
+ }
46
+ }
47
+
48
+ for (const signal of forwardedSignals) {
49
+ const handler = () => {
50
+ if (shutdownTimer) {
51
+ forceKill();
52
+ return;
53
+ }
54
+
55
+ shuttingDown = true;
56
+ shutdownTimer = setTimeout(forceKill, timeoutMs);
57
+ shutdownTimer.unref();
58
+ child.kill(signal);
59
+ };
60
+ signalHandlers.set(signal, handler);
61
+ parentProcess.on(signal, handler);
62
+ }
63
+
64
+ child.on("error", handleError);
65
+
66
+ child.once("exit", (code, signal) => {
67
+ unwire();
68
+
69
+ // A shutdown the user asked for needs no explanation; anything else left
70
+ // the window closing with no stated reason.
71
+ if (!shuttingDown) {
72
+ log(
73
+ `[pai] Next.js exited unexpectedly (${signal ? `signal ${signal}` : `code ${code}`})`,
74
+ );
75
+ }
76
+
77
+ parentProcess.exit(code ?? getSignalExitCode(signal));
78
+ });
79
+ }
80
+
81
+ module.exports = { wireChildProcessLifecycle };
package/next.config.ts ADDED
@@ -0,0 +1,86 @@
1
+ import type { NextConfig } from "next";
2
+ import { readFileSync } from "fs";
3
+ import { dirname, join } from "path";
4
+ import { fileURLToPath } from "url";
5
+
6
+ const configDir = dirname(fileURLToPath(import.meta.url));
7
+ const { version } = JSON.parse(readFileSync(join(configDir, "package.json"), "utf8")) as { version: string };
8
+ let piVersion = "unknown";
9
+ try {
10
+ const piPkgPath = join(configDir, "node_modules/@earendil-works/pi-coding-agent/package.json");
11
+ piVersion = (JSON.parse(readFileSync(piPkgPath, "utf8")) as { version: string }).version;
12
+ } catch { /* package not found, use default */ }
13
+
14
+ const nextConfig: NextConfig = {
15
+ outputFileTracingRoot: configDir,
16
+ serverExternalPackages: [
17
+ "node-pty",
18
+ "undici",
19
+ "web-push",
20
+ "@earendil-works/pi-coding-agent",
21
+ "@earendil-works/pi-agent-core",
22
+ "@earendil-works/pi-ai",
23
+ "@earendil-works/pi-tui",
24
+ ],
25
+ // Next 16 blocks cross-origin access to dev resources by default. Allow the
26
+ // loopback and the RFC1918 LAN ranges so the dev server stays reachable
27
+ // from other machines on the same LAN.
28
+ allowedDevOrigins: [
29
+ "127.0.0.1",
30
+ "10.*.*.*",
31
+ // 172.16.0.0/12
32
+ "172.16.*.*",
33
+ "172.17.*.*",
34
+ "172.18.*.*",
35
+ "172.19.*.*",
36
+ "172.20.*.*",
37
+ "172.21.*.*",
38
+ "172.22.*.*",
39
+ "172.23.*.*",
40
+ "172.24.*.*",
41
+ "172.25.*.*",
42
+ "172.26.*.*",
43
+ "172.27.*.*",
44
+ "172.28.*.*",
45
+ "172.29.*.*",
46
+ "172.30.*.*",
47
+ "172.31.*.*",
48
+ "192.168.*.*",
49
+ ],
50
+ async headers() {
51
+ return [
52
+ {
53
+ source: "/",
54
+ headers: [
55
+ { key: "Cache-Control", value: "private, no-cache, max-age=0, must-revalidate" },
56
+ ],
57
+ },
58
+ {
59
+ source: "/sw.js",
60
+ headers: [
61
+ { key: "Cache-Control", value: "public, max-age=0, must-revalidate" },
62
+ { key: "Service-Worker-Allowed", value: "/" },
63
+ ],
64
+ },
65
+ {
66
+ source: "/manifest.webmanifest",
67
+ headers: [
68
+ { key: "Cache-Control", value: "public, max-age=0, must-revalidate" },
69
+ ],
70
+ },
71
+ ];
72
+ },
73
+ env: {
74
+ NEXT_PUBLIC_APP_VERSION: version,
75
+ NEXT_PUBLIC_PI_VERSION: piVersion,
76
+ // The service worker names its cache after whatever is in its own URL, and
77
+ // that has been the package version — which a patched build never moves.
78
+ // So anything precached (the icons, the offline page) is served from the
79
+ // first build that ever cached it, on every device that cached it, for
80
+ // good. A value that changes per production build gives each build its own
81
+ // cache, and the worker's activate handler drops the ones before it.
82
+ NEXT_PUBLIC_PAI_BUILD: process.env.NODE_ENV === "production" ? String(Date.now()) : "dev",
83
+ },
84
+ };
85
+
86
+ export default nextConfig;
package/package.json ADDED
@@ -0,0 +1,89 @@
1
+ {
2
+ "name": "@perturbationai/pai",
3
+ "version": "0.1.0",
4
+ "description": "A phone-first build of pi-web.",
5
+ "homepage": "https://github.com/PerturbationAI/pai#readme",
6
+ "repository": {
7
+ "type": "git",
8
+ "url": "git+https://github.com/PerturbationAI/pai.git"
9
+ },
10
+ "bugs": {
11
+ "url": "https://github.com/PerturbationAI/pai/issues"
12
+ },
13
+ "license": "MIT",
14
+ "engines": {
15
+ "node": ">=22.19.0"
16
+ },
17
+ "bin": {
18
+ "pai": "bin/pi-web.js"
19
+ },
20
+ "files": [
21
+ "bin",
22
+ ".next",
23
+ "!.next/cache",
24
+ "!.next/dev",
25
+ "!.next/**/*.js.map",
26
+ "public",
27
+ "next.config.ts",
28
+ "package.json"
29
+ ],
30
+ "scripts": {
31
+ "postinstall": "node bin/prepare-terminal.js",
32
+ "dev": "next dev -H 127.0.0.1 -p 30141",
33
+ "dev:lan": "next dev -H 0.0.0.0 -p 30141",
34
+ "build": "next build --webpack",
35
+ "start": "next start -H 127.0.0.1 -p 30141",
36
+ "start:lan": "next start -H 0.0.0.0 -p 30141",
37
+ "lint": "eslint .",
38
+ "test:terminal": "node e2e/terminal.mjs",
39
+ "test:e2e": "node e2e/run.mjs",
40
+ "test": "node --experimental-strip-types --test \"app/**/*.test.mjs\" \"components/**/*.test.mjs\" \"hooks/**/*.test.mjs\" \"lib/**/*.test.mjs\" \"public/**/*.test.mjs\""
41
+ },
42
+ "dependencies": {
43
+ "@earendil-works/pi-agent-core": "0.85.1",
44
+ "@earendil-works/pi-ai": "0.85.1",
45
+ "@earendil-works/pi-coding-agent": "0.85.1",
46
+ "@earendil-works/pi-tui": "0.85.1",
47
+ "@xterm/addon-fit": "0.11.0",
48
+ "@xterm/xterm": "6.0.0",
49
+ "ansi_up": "^6.0.6",
50
+ "js-yaml": "^5.2.3",
51
+ "next": "16.3.1",
52
+ "node-pty": "1.2.0-beta.15",
53
+ "proper-lockfile": "4.1.2",
54
+ "react": "^19.2.4",
55
+ "react-dom": "^19.2.4",
56
+ "remark-frontmatter": "^5.0.0",
57
+ "semver": "7.8.0",
58
+ "undici": "8.10.0",
59
+ "web-push": "^3.6.7"
60
+ },
61
+ "devDependencies": {
62
+ "@tailwindcss/postcss": "^4.2.2",
63
+ "@types/js-yaml": "^4.0.9",
64
+ "@types/node": "^25",
65
+ "@types/proper-lockfile": "4.1.4",
66
+ "@types/react": "^19",
67
+ "@types/react-dom": "^19",
68
+ "@types/react-syntax-highlighter": "^15.5.13",
69
+ "@types/semver": "7.8.0",
70
+ "@types/web-push": "^3.6.4",
71
+ "eslint": "^9",
72
+ "eslint-config-next": "16.3.1",
73
+ "jiti": "^2.7.0",
74
+ "katex": "^0.16.47",
75
+ "mammoth": "^1.12.0",
76
+ "mermaid": "^11.16.1",
77
+ "playwright": "^1.62.1",
78
+ "postcss": "^8.5.26",
79
+ "react-markdown": "^10.1.0",
80
+ "react-syntax-highlighter": "^16.1.1",
81
+ "rehype-katex": "^7.0.1",
82
+ "rehype-raw": "^7.0.0",
83
+ "rehype-sanitize": "^6.0.0",
84
+ "remark-gfm": "^4.0.1",
85
+ "remark-math": "^6.0.0",
86
+ "tailwindcss": "^4.2.2",
87
+ "typescript": "^5"
88
+ }
89
+ }
Binary file
@@ -0,0 +1,22 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2023 Catppuccin
4
+ Copyright (c) 2023 thang-nm
5
+
6
+ Permission is hereby granted, free of charge, to any person obtaining a copy
7
+ of this software and associated documentation files (the "Software"), to deal
8
+ in the Software without restriction, including without limitation the rights
9
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10
+ copies of the Software, and to permit persons to whom the Software is
11
+ furnished to do so, subject to the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be included in all
14
+ copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22
+ SOFTWARE.